随笔分类 - 技术
工作中遇到的问题即解决办法
摘要:shuts down an ExecutorService in two phases, first by calling shutdown to reject incoming tasks, and then calling shutdownNow, if necessary, to cancel any lingering tasks: void shutdownAndAwaitTermination(ExecutorService pool) { pool.shutdown(); // Disable new tasks from being submitted try { ...
阅读全文
摘要:ubuntu下eclipse使用svn 想更改用户,但上一个用户已设置记住密码eclipse安装文件夹->configration文件夹->org.eclipse.core.runtime文件夹->显示隐藏文件(Ctrl+h)->找到.keyring删除这个文件
阅读全文
摘要:1.Refactoringhttp://sourcemaking.com/refactoring2.Inversion of Control Containers and the Dependency Injection patternhttp://martinfowler.com/articles/injection.html3.ConCurrentHashMaphttp://www.ibm.com/developerworks/java/library/j-jtp08223/4..Continuous Integrationhttp://martinfowler.com/articles/
阅读全文
摘要:TelephonyManager tm = (TelephonyManager)Context.getSystemService(Context.TELEPHONY_SERVICE);注意:一些电话信息需要相应的权限。// 获取服务提供商名字,比如电信,联通,移动用下面的方法第一种方法: 获取手机的IMSI码,并判断是中国移动\中国联通\中国电信getSimOperatorName() //Returns the Service Provider Name (SPN).IMSI 国际移动用户识别码(IMSI:International Mobile Subscriber Identifica.
阅读全文
摘要:最近做一个功能,需要同步本地联系人信息,主要从SIM卡和android通信录得到SIM卡获取联系人,由于SIM卡容量有限,它只存储了联系人的名字和号码View Code 1 private static final int NAME_COLUMN = 0; 2 3 private static final int NUMBER_COLUMN = 1; 4 5 private static final String SURI = "content://icc/adn"; 6 7 private Context context...
阅读全文
摘要:网络地址本为用户提供三种数据同步方式:1.地址本备份(上传):用户通过点击手机终端上的“备份”菜单实现手机终端数据全量备份到服务器上,并且服务器上原来的所有地址本数据将被自动删除到回收站中,使得终端与服务器上的地址本数据保持一致;采用OMA SyncML DS 协议定义的“客户端刷新同步(Refresh Sync from Client Only)”方式实现。2.地址本恢复(下载):用户通过点击手机终端上的“恢复”菜单实现手机终端数据全量备份到服务器上,并且服务器会对数据进行比对分析将服务器原来有而手机终端没有的地址本数据恢复到手机终端上,使得终端与服务器上的地址本数据保持一致;采用OMA S
阅读全文
浙公网安备 33010602011771号