【申明:本文仅限于自我归纳总结和相互交流,有纰漏还望各位指出。 联系邮箱:Mr_chenping@163.com】
题目:
c++ 各种排序算法实现
题目分析:
具体排序原理参考相关算法书籍
算法实现:
#include
static void swap(int *a, int *b)
{
int tmp;
tmp = *a;
*a = *b;...
分类:
编程语言 时间:
2015-06-10 14:13:38
阅读次数:
155
要求:删除linux下2天前的指定文件find 文件问题:在 tmp 目录下有大量包含 picture_* 的临时文件,每天晚上 2:00 对一天前的文件进行清理。之前在 crontab 下跑如下脚本,但是发现脚本效率很低,每次执行时负载猛涨,影响到其他服务#!/bin/shfind /tmp -n...
分类:
系统相关 时间:
2015-06-10 12:08:31
阅读次数:
192
1、在本地安装openshiftrhc(Rails集成ruby)2、在openshift注册账号,记录下ssh3、进入本地"CommandPromptwithRubyandRails"rhcappcreatemysitediy-0.1
rhcappshow-amysite4、使用putty,ssh连接mysite(ssh@mysite.rhcloud.com)5、安装nginx和pcre插件cd$OPENSHIFT_TMP_DIR
wg..
分类:
其他好文 时间:
2015-06-10 10:36:44
阅读次数:
594
错误状况最近项目SVN每次更新项目都会出现Can’t open file ‘项目目录/.svn/tmp/text-base/xxx.xml.svn-base’类似的错误,同时导致项目目录被Locked,只有执行clean up才能进行解锁。同时,针对单个文件或文件夹的更新操作却没有问题。其中错误信息中“xxx.xml”文件为导致错误的文件。原因分析及查找:
1、浏览SVN资源库,查看出错的xxx....
分类:
其他好文 时间:
2015-06-09 20:10:28
阅读次数:
145
编辑nginx配置: server { listen 8098; server_name 127.0.0.1; location / { include uwsgi_params; # uwsgi_pass unix:/tmp/uwsgi.sock; u...
分类:
其他好文 时间:
2015-06-09 19:29:48
阅读次数:
101
对红薯开源的oschina mysql配置文件的说明: [client]
password ? ? ? ?=?
port ? ? ? ? ? ?= 3306
socket ? ? ? ? ?= /tmp/mysql.sock
#限制mysql server接收的数据包的大小(这里是客户端传入...
分类:
数据库 时间:
2015-06-09 17:57:06
阅读次数:
172
从服务器下载文件scp username@servername:/path/filename /tmp/local_destination例如:scp codinglog@192.168.0.101:/home/kimi/test.txt ##把 192.168.0.101 上的 /home/kim...
分类:
Web程序 时间:
2015-06-09 15:28:35
阅读次数:
134
1. 将synchronized加在方法上, 即可实现对此方法的同步public synchronized void deposit(float amt) { float tmp = amount; tmp += amt; try { Thread.sleep(1);...
分类:
编程语言 时间:
2015-06-09 06:09:37
阅读次数:
127
Redis集群部署1.安装redis3.0.1,参见《Redis3.0.1安装和配置》2.创建目录mkdir-p/usr/local/redis/70003.复制文件cd/tmp
#复制默认的配置文档
cpredis-3.0.1/redis.conf/usr/local/redis/redis.default.conf
#把编译好的server复制到运行目录
cpredis-3.0.1/src/redis-server/..
分类:
其他好文 时间:
2015-06-08 19:51:53
阅读次数:
223
echo的使用记录-n用法:输出不换行
例如:
echo-n"a1:"
echo"b2"
得到:
a1:b2
-e用法:允许后面的输出进行转义
例如:
exit_script()
{
echo-e"\033[1;40;31mInstall$1error,willexit.\n\033[0m"
rm-f$LOCKfile
exit1
}
LOCKfile=/tmp/.$(basename$0)
if[-f"$LOCKfile"]
..
分类:
其他好文 时间:
2015-06-08 19:51:00
阅读次数:
142