一. Java反射机制
Reflection 是Java被视为动态(或准动态)语言的一个关键性质。这个机制允许程序在运行时透过Reflection APIs取得任何一个已知名称的class的内部信息,包括其modifiers(诸如public, static 等等)、superclass(例如Object)、实现之interfaces(例如Serializable),也包括fields和meth...
分类:
移动开发 时间:
2015-08-19 11:13:17
阅读次数:
217
#region 返回DBF表 public static System.Data.DataTable getDTFromDBF(string fullPath) { string pDir = System.IO.Path.GetDirectory...
分类:
数据库 时间:
2015-08-19 11:03:01
阅读次数:
165
正在使用AsyncTaskLoader时间。当手机被解锁,重复加载数据,码,如以下: static class CouponShopQueryLoader extends AsyncTaskLoader> { private int couponId; public CouponSh...
分类:
移动开发 时间:
2015-08-19 11:02:42
阅读次数:
163
public static List ToList(DataTable dt){ List> list = new List>(); foreach (DataRow dr in dt.Rows) { Dictionary result = new Dictionary(); fo...
分类:
其他好文 时间:
2015-08-19 10:58:39
阅读次数:
129
JAVA 文件 import java.io.File; import javax.xml.parsers.*; import org.w3c.dom.*; public class XmlReaderTest { public static void main(String[] args) thr...
分类:
编程语言 时间:
2015-08-19 10:48:01
阅读次数:
119
/** * 设置图片根据屏幕宽度进行等比例缩放 * @param imageView */ public static void setImageMatchScreenWidth(ImageView imageView){ BitmapDrawable bitmapDrawable =...
分类:
移动开发 时间:
2015-08-19 10:43:18
阅读次数:
142
通过调用API可以实现C#窗体的动画效果,主要调用user32.dll的行数AnimateWindow1、函数申明[System.Runtime.InteropServices.DllImport("user32")] private static extern bool AnimateWindow...
public static final Bitmap createRGBImage(Bitmap bitmap,int color)
{
int bitmap_w=bitmap.getWidth();
int bitmap_h=bitmap.getHeight();
int[] arrayColor=new int[bitmap_w*bitmap_h];
int coun...
分类:
移动开发 时间:
2015-08-19 07:07:15
阅读次数:
152
单例工具类的创建1.利用一次性代码static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ });2.不可以通过继承的方式,使子类成为单例。如果继承,会引发如下两个问题 - 如果先创建父类,那么子类创建出来的对象也永远是父类 - ....
分类:
其他好文 时间:
2015-08-19 07:04:15
阅读次数:
132
package?org.webdriver.autotest.Study;
import?java.util.*;
public?class?sort_examp{
?public?static?void?main(String[]?args)
?{
??Integer[]?num={49,38,65,97,76,13,27,49,78,34,12,64,1}...
分类:
编程语言 时间:
2015-08-19 00:47:27
阅读次数:
136