11 2015 档案

摘要:ImageRequest imageRequest = new ImageRequest(Config.USER_ASSETS_URL + md5(userid) + "/images/avatar.jpg", new Response.Listener... 阅读全文
posted @ 2015-11-26 18:34 龟窝 阅读(145) 评论(0) 推荐(0)
摘要:private static final String md5(final String s) { final String MD5 = "MD5"; try { // Create MD5 Hash MessageDi... 阅读全文
posted @ 2015-11-26 17:42 龟窝 阅读(418) 评论(0) 推荐(0)
摘要:第一种Person person = gson.fromJson(str, Person.class);第二种List ps = gson.fromJson(str, new TypeToken>(){}.getType());for(int i = 0; i < ps.size() ; i++){... 阅读全文
posted @ 2015-11-22 13:18 龟窝 阅读(144) 评论(0) 推荐(0)
摘要:首先在menu文件夹中创建post.xml showAsAction=never会永远折叠在三个点里面,=ifRoom有空间会出来orderInCategory 表示不折叠优先级每个标签就添加一个item然后在activity中加入 @Override protected void... 阅读全文
posted @ 2015-11-19 01:50 龟窝 阅读(348) 评论(0) 推荐(0)
摘要:直接把//setContentView(R.layout.activity_welcome);注释掉就是了 阅读全文
posted @ 2015-11-16 17:28 龟窝 阅读(228) 评论(0) 推荐(0)
摘要:public class ActivityDemo extends Activity { private static final String TAG = "ActivityDemo"; public void onCreate(Bundle savedI... 阅读全文
posted @ 2015-11-16 17:24 龟窝 阅读(128) 评论(0) 推荐(0)
摘要:在数据库配置中这么配就可以了 'yii\db\Connection', 'dsn' => 'mysql:host=127.0.0.1; dbname=ohmycto; charset=utf8', 'username' => 'website', 'password' => 'me... 阅读全文
posted @ 2015-11-16 01:34 龟窝 阅读(1062) 评论(0) 推荐(0)
摘要:首先,需要在basic/web/文件夹下添加一个.htaccess文件这样进入项目就会自动访问index.php文件,url就不会错乱了Options +FollowSymLinksIndexIgnore */*RewriteEngine on# if a directory or a file e... 阅读全文
posted @ 2015-11-15 14:17 龟窝 阅读(984) 评论(0) 推荐(0)
摘要:Android模拟器访问10.0.2.2即可 阅读全文
posted @ 2015-11-15 00:46 龟窝 阅读(238) 评论(0) 推荐(0)
摘要:Yii::app()->request->baseUrl 返回app所在目录,可以用来挂模板。var_dump(Yii::app()->db); 可以用来测试数据库配置成功否 阅读全文
posted @ 2015-11-13 22:10 龟窝 阅读(223) 评论(0) 推荐(0)
摘要:sudo apt-get install openssh-server 装serversudo /etc/init.d/ssh stopsudo /etc/init.d/ssh startsudo /etc/init.d/ssh restart 字面意思要修改root的ssh权限,即修改 /etc/... 阅读全文
posted @ 2015-11-13 10:37 龟窝 阅读(367) 评论(0) 推荐(0)
摘要:commit时留下的邮箱,会显示在github的提交记录里,然后居然自动找服务器上的这个邮箱注册的人,显示这个用户名。 阅读全文
posted @ 2015-11-12 21:42 龟窝 阅读(134) 评论(0) 推荐(0)
摘要:偶然发现,耳机孔插上耳机对手机的磁感应器有非常大的影响。具体影响的方式和解决的方法,慢慢研究下 阅读全文
posted @ 2015-11-09 15:36 龟窝 阅读(178) 评论(0) 推荐(0)
摘要:用法直接看samplepackage com.turtle920.androidaudioprocess;import android.media.MediaPlayer;import android.os.Environment;import android.support.v7.app.AppC... 阅读全文
posted @ 2015-11-09 14:25 龟窝 阅读(846) 评论(0) 推荐(0)
摘要:Android2.2以后orientation sensors 就被deprecated了官方建议用acceleration and magnetic sensor 来算关于这个问题,CSDN上一篇博文讲的非常好http://blog.csdn.net/flowingflying/article/d... 阅读全文
posted @ 2015-11-09 10:36 龟窝 阅读(1887) 评论(0) 推荐(0)
摘要:Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app. This approach stream... 阅读全文
posted @ 2015-11-08 19:17 龟窝 阅读(335) 评论(0) 推荐(0)