2021
09-10
09-10
Android sqlite cursor的遍历实例详解
查询并获得了cursor对象后,用while(corsor.moveToNext()){}遍历,当corsor.moveToNext()方法调用,如果发现没有对象,会返回falsepublicList<MMImage>getAll(){List<MMImage>list=newArrayList<MMImage>();Cursorc=null;try{c=database.query(TABLE,null,null,null,null,null,null);while(c.moveToNext()){MMImagemmImage=getMMImageFr...
继续阅读 >
Matplotlib编程实现importmatplotlib.pyplotaspltimportnumpyasnpfrommatplotlib.widgetsimportCursorlineprops=dict(color="red",lw=2)fig,ax=plt.subplots(1,1,subplot_kw=dict(facecolor="lemonchiffon"))x=np.random.random(100)y=np.random.random(100)ax.scatter(x,y,marker="o",color="red")ax.set_xlim(-0.02,1.02)ax.set_ylim(-0.02,1.02)cursor=Cursor(ax,useblit=True,**lineprops)plt.s...