图解: 说明:在我们Thread 的类里面,存在一个属性,这个属性是:ThreadLocal类实现的内部类(ThreadLocalMap),所以对于每一个线程来说,他都具有一个本地的map,保存属于自己的参数 类似于:session 里面 存放一个map, 把用户看做线程,session当做Thre ...
分类:
其他好文 时间:
2017-10-19 16:00:26
阅读次数:
137
Golang 的文件读取方法很多,刚上手时不知道怎么选择,所以贴在此处便后速查。 一次性读取 小文件推荐一次性读取,这样程序更简单,而且速度最快。 代码如下: func ReadAll(filePth string) ([]byte, error) { f, err := os.Open(fileP ...
分类:
其他好文 时间:
2017-10-17 15:40:26
阅读次数:
185
Spring内部有一个task是Spring自带的一个设定时间自动任务调度 task使用的时候很方便,但是他能做的东西不如quartz那么的多! 可以使用注解和配置两种方式,配置的方式如下 引入Spring放在appcation.xml开头 <!-- 注册bean --> <!-- 开启任务调度 - ...
分类:
编程语言 时间:
2017-10-17 15:03:02
阅读次数:
229
原文地址:http://blog.csdn.net/xiaozhi819/article/details/6901137 ...
分类:
编程语言 时间:
2017-10-17 12:26:43
阅读次数:
188
1.mAdapter.changeCursor(cursor); NotepadListAdapter extends CursorAdapter { newView() bindView()} 2.LoaderManager类 3.gradle环境升级指南 4. 5. 6. 7. 8. 9. 10 ...
分类:
其他好文 时间:
2017-10-17 10:00:24
阅读次数:
149
一 public static int Count(String fileName , String str) throws Exception{ //获取文件中的字符 FileReader fr = new FileReader(new File(fileName)); BufferedReade ...
分类:
其他好文 时间:
2017-10-16 21:45:14
阅读次数:
677
内置模块 一、os 用于提供系统级别的操作 二、sys 三、hashlib import hashlib # ######## md5 ######## hash = hashlib.md5() hash.update('admin') print hash.hexdigest() # ###### ...
分类:
编程语言 时间:
2017-10-15 18:07:55
阅读次数:
155
参考:http://blog.csdn.net/mycwq/article/details/24488691 在新装的CentOS 5.7系统中,先安装了nginx(含nginx必备依赖:gzip 模块需要 zlib 库;rewrite 模块需要 pcre 库;ssl 功能需要 openssl 库) ...
分类:
数据库 时间:
2017-10-15 17:55:59
阅读次数:
260
Rating :1500 0/100 (0%) NOIP2017初赛终于过去啦,迎来的是新一轮的奋斗——复赛。为了激励自己,我便傻逼傻逼的写了一个Rating计算器,反应我每天的刷题记录。程序如下: 运行结果如下(模拟): Let's fight ! 持续更新中... ...
分类:
其他好文 时间:
2017-10-15 00:30:19
阅读次数:
192
nginx安装 本文是介绍使用源码编译安装,包括具体的编译参数信息。 正式开始前,编译环境gcc g++ 开发库之类的需要提前装好。 安装make: 安装g++: 一般我们都需要先装pcre, zlib,前者为了重写rewrite,后者为了gzip压缩。 1.选定源码目录 可以是任何目录,本文选定的 ...
分类:
数据库 时间:
2017-10-14 18:36:54
阅读次数:
341