代码改变世界

阅读排行榜

Java编程中尽可能要做到的一些地方

2012-08-26 15:11 by java20130722, 118 阅读, 收藏,
摘要: 下面是参考网络资源总结的一些在Java编程中尽可能要做到的一些地方。1. 尽量在合适的场合使用单例使用单例可以减轻加载的负担,缩短加载的时间,提高加载的效率,但并不是所有地方都适用于单例,简单来说,单例主要适用于以下三个方面:第一,控制资源的使用,通过线程同步来控制资源的并发访问;第二,控制实例的产生,以达到节约资源的目的;第三,控制数据共享,在不建立直接关联的条件下,让多个不相关的进程或线程之间实现通信。2. 尽量避免随意使用静态变量要知道,当某个对象被定义为stataic变量所引用,那么gc通常是不会回收这个对象所占有的内存,如1 public class A{2 static B b = 阅读全文

Head Fisrt Android Development读书笔记(7)Database Persistent

2012-11-02 14:59 by java20130722, 117 阅读, 收藏,
摘要: Creating the databaseCreate a new class called TimeTrackerOpenHelper that extends SQLiteOpenHelper. Pass the database name and the database version to super.TimeTrackerOpenHelper(Context context)super(context, "timetracker.db", null, 1)// timetracker.db is the db name, 1 is versionpublic v 阅读全文

linux 常用命令

2013-03-28 12:28 by java20130722, 114 阅读, 收藏,
摘要: 1. 复制一个文件到另外一个文件中example1 文件中内容 : test1example2 文件中内容 : test2 复制example1 的内容到example2 中 cat example1 >> example2 结果:example2文件中的内容:test1test22. 查找文件例如查找文件c.c仅仅在当前目录下查找: find c.c当前目录以及当前目录下的目录递归查找 find . -name c.c3. 切换登陆用户su - {username} 例如:su - root 切换到root用户4. 查看PATH, CLASSPATHenv $PATH ... 阅读全文

Business mobile application development. The developer’s insight.

2012-11-07 17:48 by java20130722, 113 阅读, 收藏,
摘要: from:http://www.enterra-inc.com/techzone/business_mobile_application_development/On July 11th 2008 Apple corporation announced the launch of AppStore application marketplace – a successor of iTunes Store. iPhone and iPod users became able to setup the approved third-party applications through store. 阅读全文

Head Fisrt Android Development读书笔记(6)Lists and Adapters

2012-10-16 15:39 by java20130722, 112 阅读, 收藏,
摘要: ListView = ScrollView[ ViewGroup[A View for Each Row] ]Adapteran interface whose implementations provide data and the display of that data used by the ListView.public class TimeTrackerAdapter extends BaseAdapter {...}View getView(int index, View view, ViewGroup parent)return the view used to display 阅读全文