摘要: ``` python #!/usr/bin/env python #encoding: utf-8 import unittest import myclass class mytest(unittest.TestCase): ##初始化工作 def setUp(self): pass #退出清理工作 def tearDown(self): pas... 阅读全文
posted @ 2015-09-23 15:18 海阔天空1985 阅读(106) 评论(0) 推荐(0) 编辑
摘要: ``` shell #!/bin/bash while getopts "a:bc" arg #选项后面的冒号表示该选项需要参数 do case $arg in a) echo "a's arg:$OPTARG" #参数存在$OPTARG中 ;; b) ... 阅读全文
posted @ 2015-09-21 17:28 海阔天空1985 阅读(825) 评论(0) 推荐(0) 编辑
摘要: [redis 常用命令](http://www.linuxidc.com/Linux/2012-03/57573.htm)[超强、超详细Redis数据库入门教程](http://www.jb51.net/article/56448.htm)[redis:hash数据类型与操作](http://blo... 阅读全文
posted @ 2015-08-05 14:03 海阔天空1985 阅读(93) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/five3/article/details/7104466 阅读全文
posted @ 2015-08-04 11:20 海阔天空1985 阅读(73) 评论(0) 推荐(0) 编辑
摘要: if the server is placing data into a shared memory region, the client shouldn't try to access the data until the server is done 阅读全文
posted @ 2015-08-03 11:06 海阔天空1985 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 变革,永远需要代价;深蹲,只是为了跳得更高。从来就没有,不需要抵抗重力的飞翔! 阅读全文
posted @ 2015-07-31 16:05 海阔天空1985 阅读(79) 评论(0) 推荐(0) 编辑
摘要: ``` python#-*- encoding=utf-8 -*-print '----------------------方法1--------------------------'#方法1,实现__new__方法#并在将一个类的实例绑定到类变量_instance上,#如果cls._instanc... 阅读全文
posted @ 2015-07-31 12:20 海阔天空1985 阅读(96) 评论(0) 推荐(0) 编辑
摘要: Linux下如何查看版本信息, 包括位数、版本信息以及CPU内核信息、CPU具体型号等等,整个CPU信息一目了然。 1、# uname -a (Linux查看版本当前操作系统内核信息) Linux localhost.localdomain 2.4.20-8 #1 Thu Mar 13 ... 阅读全文
posted @ 2015-07-27 10:37 海阔天空1985 阅读(92) 评论(0) 推荐(0) 编辑
摘要: ```python#include #include #include #include #include #define IPCKEY 0x366378int test_share_mem_write(){ int shm_id; key_t key; void * p_sm =... 阅读全文
posted @ 2015-07-24 19:52 海阔天空1985 阅读(190) 评论(0) 推荐(0) 编辑
摘要: [Python之isinstance](http://blog.csdn.net/business122/article/details/7608176) 阅读全文
posted @ 2015-07-20 10:35 海阔天空1985 阅读(73) 评论(0) 推荐(0) 编辑