我想绘制一个基本图,基本上由x = [1,2,3,...,d]的两个列表组成,y = [y1,y2,...,yd]。使用后,pyplot.plot(x,y)我收到大量有关findfont错误的警告消息(请参阅下文。)
我刚安装了matplotlib。我能找到的所有线程都涉及手动更改字体并弹出警告消息。我没有那样做。我刚刚安装了软件包,仅此而已。
我正在使用pycharm,python 3.6和Windows进行编程。
DEBUG findfont: Matching :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=10.0.
DEBUG findfont: score(<Font 'cmex10' (cmex10.ttf) normal normal 400 normal>) = 10.05
DEBUG findfont: score(<Font 'STIXSizeOneSym' (STIXSizOneSymReg.ttf) normal normal regular normal>) = 10.05
DEBUG findfont: score(<Font 'cmb10' (cmb10.ttf) normal normal 400 normal>) = 10.05
DEBUG findfont: score(<Font 'DejaVu Sans' (DejaVuSans-Bold.ttf) normal normal bold normal>) = 0.33499999999999996
DEBUG findfont: score(<Font 'STIXNonUnicode' (STIXNonUniBolIta.ttf) italic normal bold normal>) = 11.335
DEBUG findfont: score(<Font 'DejaVu Sans Mono' (DejaVuSansMono-Bold.ttf) normal …Run Code Online (Sandbox Code Playgroud) 背景: 我正在尝试为纸牌游戏构建一个牌组构建器。不同的牌组基于我想要在本地保护的一个数组列表。这意味着你可以创建你的牌组,然后我希望你能够保护它,然后创建一个新的牌组,能够再次保存它... ->这会产生我想要在同一个类中保护的多个 Arraylists 。
问题: 在知道我想要的不仅仅是一个 Arraylist 的情况下,将 Arraylist 存储在 Room 中的最佳方式是什么?
据我现在所知,我必须创建一个实体类,它基本上会创建一个(?)表,我必须在其中逐个保存Arraylists?
有更好的方法吗?
奖励: 我也希望有一个关于如何做到这一点的基本示例,因为这似乎是我自己很难实现的。
非常感谢!
编辑:
代码示例
因此,我使用您的代码示例的基线实现的内容如下:
我创建了 SaveDeck 类,它应该能够使用给定的 Deckname 保存 Deck : :-
@Entity 公共类 SaveDeck 实现可序列化 { @PrimaryKey(autoGenerate = true) 私有 int _id;
public SaveDeck(int _id, String deckName, int cardImage, int typeImage, Integer cardCost, String cardName, Integer cardNumber) {
this._id = _id;
DeckName = deckName;
CardImage = cardImage;
TypeImage = typeImage;
CardCost = cardCost;
CardName = cardName;
CardNumber = cardNumber;
} …Run Code Online (Sandbox Code Playgroud)