2014年9月20日

R on Ubuntu

摘要: I have been usingRrecently. R is statistics programming language. R has attracted more and more attention as analytics in cloud gets more and more hot... 阅读全文

posted @ 2014-09-20 18:51 ghostli123 阅读(407) 评论(0) 推荐(0) 编辑

2013年11月19日

In close() at SocketHttpClientConnection in Android

摘要: Inclose() at SocketHttpClientConnection Error In Android.whenitried toacessnetwork data onMainThreadabove Android 3.0 >= . I am unable to access . I am getting errorInclose() at SocketHttpClientConnection.Thenienabled strict mode issue solved.Add this code inonCreatemethod.StrictMode.ThreadPolicy 阅读全文

posted @ 2013-11-19 13:48 ghostli123 阅读(292) 评论(0) 推荐(0) 编辑

2013年10月29日

Java read txt file

摘要: package com.Yang;import java.io.BufferedReader;import java.io.File;import java.io.FileInputStream;import java.io.InputStreamReader;public class Parser { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub String filePath = "bigtable_dns.txt";// 阅读全文

posted @ 2013-10-29 11:18 ghostli123 阅读(602) 评论(0) 推荐(0) 编辑

2013年10月17日

Read/Write file in Android

摘要: http://www.cnblogs.com/freeliver54/archive/2011/09/16/2178910.html 阅读全文

posted @ 2013-10-17 11:04 ghostli123 阅读(132) 评论(0) 推荐(0) 编辑

2013年10月16日

Get IP Address in Android 4.0+

摘要: 在android2.3以下的系统中,可以使用如下的代码来获取Android系统的本地IP地址:[java]private String getLocalIPAddress() throws SocketException{ for(Enumeration en = NetworkInterface.getNetworkInterfaces();en.hasMoreElements();){ NetworkInterface intf = en.nextElement(); www.2cto.com for(Enumeration enumIpAddr = intf.getInetAddress 阅读全文

posted @ 2013-10-16 14:49 ghostli123 阅读(347) 评论(0) 推荐(0) 编辑

2013年4月21日

android time format

摘要: http://lszdb1983.blog.163.com/blog/static/204263482012010614570/ 阅读全文

posted @ 2013-04-21 22:31 ghostli123 阅读(140) 评论(0) 推荐(0) 编辑

2013年4月18日

Convert uid to packageName or appName

摘要: public String getPackageName(int uid) { PackageManager pm = getPackageManager(); final List<ApplicationInfo> installed = pm.getInstalledApplications(0); for (final ApplicationInfo apinfo : installed) { if (uid == apinfo.uid) { return apinfo.packageName; } } return ""; }public static 阅读全文

posted @ 2013-04-18 21:09 ghostli123 阅读(390) 评论(0) 推荐(0) 编辑

2013年4月16日

To pop a non-blocked Dialog in any Component

摘要: result=-1;Thread action=new Thread() { public void run() { flag=true; Looper.prepare(); d1 = new AlertDialog.Builder(mContext).setTitle("OK") .setMessage("name" + " " + "OK") .setPositiveButton("OK", mListener) .setNegativeButton("NO", mLis 阅读全文

posted @ 2013-04-16 11:04 ghostli123 阅读(154) 评论(0) 推荐(0) 编辑

2013年4月15日

revise PackageManagerService.java

摘要: after brunch bravo, the services.jar has been modified, but not framework.jar.then ghostli123@ghostli123-HP-Pro-3380-MT:~/bravo/out/target/product/bravo/system/framework$ adb push services.jar /system/framework 阅读全文

posted @ 2013-04-15 20:12 ghostli123 阅读(125) 评论(0) 推荐(0) 编辑

2013年4月10日

Develop an Android Application

摘要: Read all the information of installed packagespackage com.example.phonesecurity;import java.util.List;import android.content.Context;import android.content.pm.ApplicationInfo;import android.content.pm.PackageInfo;import android.content.pm.PackageManager;import android.content.pm.PackageManager.NameN 阅读全文

posted @ 2013-04-10 20:05 ghostli123 阅读(401) 评论(0) 推荐(0) 编辑

导航