开篇语:上班以后,烦恼少了,至少是没有什么好烦的了,只要负责好自己的工作就可以了,因此也有更多的时间去探索自己喜欢的程序。买回来的书已经看了一半,DEMO也敲了不少,昨晚终于在这里开BLOG,记录一些读书笔记。以我自己的经验来看,写笔记、测试、体会是加深理解的利器,往往起到事半功倍的效果。这几天在看...
分类:
编程语言 时间:
2014-07-22 22:47:56
阅读次数:
304
string是最简单的类型,一个key对应一个value,string类型是二进制安全的。redis的string可以包含任何数据,比如JPG图片或者序列化的对象操作 set 设置key对应的值为string类型的value 例如: set name haoxing //设置key为那么value为...
分类:
其他好文 时间:
2014-07-22 22:39:55
阅读次数:
261
(英文部分为转的。代码是个人代码)
1 What’s inotify
The inotify API provides a mechanism for monitoring file system events. Inotify can be used to monitor individual files, or to monitor directories. When a direc...
分类:
系统相关 时间:
2014-07-22 22:39:53
阅读次数:
476
官网FAQ里查到以下说明:“You may find that not all of these icons are used on your system. This is because the number of overlays allowed by Windows is limited.....
分类:
其他好文 时间:
2014-07-22 22:35:16
阅读次数:
600
package多线程;
importjava.util.concurrent.locks.Condition;
importjava.util.concurrent.locks.Lock;
importjava.util.concurrent.locks.ReentrantLock;
publicclassPandCnewLock{
publicstaticvoidmain(String[]args){
// Producerp=newProducer2();
// Consumerc=..
分类:
编程语言 时间:
2014-07-22 18:21:02
阅读次数:
288
mysql-uroot-e"showprocesslist"|grep-i"Locked">>locklist.txt;
forlineinawk‘{print$1}‘locklist.txt
do
echo"kill$line;">>lock_kill.sql
done查看mysql数据库表大小#!/bin/bash
database=cms
user=root
password=‘123456‘
mysql-u${user}-p${password}-e"use$d..
分类:
数据库 时间:
2014-07-22 18:15:42
阅读次数:
334
本篇介绍一些Spring与其他框架结合的实用功能,包括:Apache CXF WebService框架、Redis缓存、RabbitMQ消息、MyBatis框架。
另外对于Profile,也是Spring3.0开始新加的功能,对于开发测试环境、和生产环境分别采用不同的配置,有一定用处。...
分类:
编程语言 时间:
2014-07-22 14:10:04
阅读次数:
449
bool flock ( int handle, int operation [, int &wouldblock] );flock() 操作的 handle 必须是一个已经打开的文件指针。operation 可以是以下值之一:要取得共享锁定(读取程序),将 operation 设为 LOCK_SH...
分类:
Web程序 时间:
2014-07-22 00:07:34
阅读次数:
278
LOCK_EX是表示排它锁(Exclude),是独占的,一般用于写操作,而如果换成LOCK_SH(Share)则是共享,多用于读取。有时为了保证多进程对文件的读写都是唯一的,无论读写都进行LOCK_EX的请求。 以下是一段演示程序,...
分类:
其他好文 时间:
2014-07-21 23:31:03
阅读次数:
238
##mongodb的用户管理(认证管理)用户分三种全局用户数据库对应用户只读用户###创建全局用户(全局用户只能在admin账户下创建)创建了一个名为zhuima,密码为zhuima的全局账户[root@redis~]#hostname
redis.unix178.com
[root@redis~]#mongo
MongoDBshellversion:2.4.6
connecti..
分类:
数据库 时间:
2014-07-21 22:31:27
阅读次数:
396