out的使用————————————————————————————————————————————————— class Program { static void Main(string[] args) { string tmp; //先声明,但不初始化 User _user=n...
分类:
其他好文 时间:
2014-10-17 18:06:53
阅读次数:
133
//dest 字符串存放??val 要转换的数据 base: 10 进制 16 16进制? char * ltos(char *dest, ULONG val, ULONG base) { char tmp[16] = {0}; char *rtn = dest; char ph[11] = {"0x00000000"}; ? // 这个是根...
分类:
其他好文 时间:
2014-10-17 12:15:12
阅读次数:
138
自己YY了个DP:设f[n][l]为n位数中包含不超过l个1的总个数f[n][l]=f[n-1][l]+f[n-1][l-1]然后用_search()从高位向低位扫描即可,tmp记录当前已记下多少个数了(这些数肯定都比第I个小)一开始f数组的初值YY错了,看了nocow改过来就好了 1 /* 2 P...
分类:
其他好文 时间:
2014-10-16 22:42:03
阅读次数:
305
前提:- 先要把U盘插入路由器的usb口,大多数情况Openwrt都会自动挂载的吧,尽量找当前年或前一年的固件。ssh进路由器,可以看到/mnt/sda1- 让路由器联网,因为需要从网络上下载安装包;(当然也可以提前下载发到/tmp下面安装。。。)2. Python 安装的命令mkdir /mnt/...
分类:
编程语言 时间:
2014-10-16 12:03:52
阅读次数:
455
<?php/***简单洗牌算法*/$card_num=54;//牌数print_r(wash_card($card_num));functionwash_card($card_num){$cards=$tmp=array();for($i=0;$i<$card_num;$i++){$tmp[$i]=$i;}for($i=0;$i<$card_num;$i++){$index=rand(0,$card_num-$i-1);$cards[$i]=$tmp[$index];unse..
分类:
Web程序 时间:
2014-10-15 06:38:00
阅读次数:
207
expect+ssh修改主机密码foripin`cat/tmp/myhosts`;do
expect-c"spawnssh-p33842$ip;expect*assword*{send\"myoldpasswd\r\"};expectroot@*{send\"echoroot:‘mynewpassword‘|/usr/sbin/chpasswd\r\"};expectroot@*{send\"ipaddr\r\"};expectof";done
分类:
其他好文 时间:
2014-10-15 04:41:50
阅读次数:
204
一、环境准备:
系统环境:CentOS 6.5
Tomcat 7.0.26
jdk-7u17-linux-x64.rpm
solr-4.10.1.tgz
首先将软件包上传到/tmp目录下
1、 jdk安装
]# rpm -ivh jdk-7u17-linux...
分类:
系统相关 时间:
2014-10-14 21:19:09
阅读次数:
380
ERROR2002(HY000):Can‘tconnecttolocalMySQLserverthroughsocket‘/tmp/mysql.sock‘(111)1、[root@localhost~]#find/-namemysql.sock/var/lib/mysql/mysql.sock创建符号连接:ln-s/var/lib/mysql/mysql.sock/tmp/mysql.sock2、vi/etc/my.conf检查下行内容是否存在:[client]sock..
分类:
数据库 时间:
2014-10-14 19:44:29
阅读次数:
213
function datetime_to_unix(datetime){
var tmp_datetime = datetime.replace(/:/g,'-');
tmp_datetime = tmp_datetime.replace(/ /g,'-');
var arr = tmp_datetime.split("-");
var now = new Date...
分类:
Web程序 时间:
2014-10-14 18:22:59
阅读次数:
248
select*frommy_tableintooutfile‘/tmp/abc.xls‘;然后就是ftp把文件弄回本地了。我的是程序自动放到C:\下另外,还有一种导出的方式,相较于上者而言,这种可以对已经存在的文件直接覆盖。//使用outfile的方法mysql>select1intooutfile‘/tmp/t1.txt‘;QueryOK,1rowaffected(0.0..
分类:
数据库 时间:
2014-10-14 15:17:49
阅读次数:
278