码迷,mamicode.com
首页 >  
搜索关键字:print    ( 43532个结果
交集去重
public class jiaoji { /** * @param args */ public static void main(String[] args) { String s1="abc"; String s2="abdgca"; System.out.println...
分类:其他好文   时间:2014-10-10 17:36:24    阅读次数:164
(原创) cocos2d-x 3.0+ lua 学习和工作(4) : 公共函数(3): 深度克隆clone()
先上一段代码:local tbl = { ["a"] = 1, ["b"] = 2 }local cpy = tblfor k, v in pairs( tbl ) do print( "tab: " .. k .. ":".. v ) -- 打印tbl里的元素值endfor k, v i...
分类:其他好文   时间:2014-10-10 16:03:40    阅读次数:176
找出系统中所有以user0开头并且是可以登录和没有密码的用户,并生成文本文件保存。
为了实验,创建5个用户user01user02user03user04user05,其中user02的shell是/sbin/nologin,并且没有密码,user03没有密码,user05的shell是/sbin/nologingrepuser0/etc/passwd|awk-F\:‘{print$1,$7}‘>>boss1.txtgrepuser0/etc/shadow|awk-F\:‘{print$2}‘>>boss2...
分类:其他好文   时间:2014-10-10 15:37:14    阅读次数:195
Gray Code
[leetcode]Given a non-negative integer n representing the total number of bits in the code, print the sequence of gray code. A gray code sequence must begin with 0....
分类:其他好文   时间:2014-10-10 15:07:44    阅读次数:167
用123456789,建3个3位数,数值比为1:2:3
public class mylin { /** * @param args */ public static void main(String[] args) { int n1 = 0; int n2 = 0; for (int i = 123; i ...
分类:其他好文   时间:2014-10-10 14:33:04    阅读次数:158
python开发技术详解(二)
文章目录:数据类型数据类型a=1b=2print id(a)print id(b)Out[1]: 163578032Out[2]: 163578032
分类:编程语言   时间:2014-10-10 13:12:34    阅读次数:129
SQLalchemy 查询总结
#简单查询 print(session.query(User).all()) print(session.query(User.name, User.fullname).all()) print(session.query(User, User.name).all()) ...
分类:数据库   时间:2014-10-10 01:21:04    阅读次数:170
php常用函数之Array篇
array("...","..."...);用途:生成一个数组;>>例子:$a=array("Dog","Cat","Horse"); print_r($a);输出:"0"=>"Dog","1"=>"Cat","2"=>"Horse";array_combine(array1,array2)...
分类:Web程序   时间:2014-10-10 00:01:23    阅读次数:323
2013 ACM/ICPC 长沙现场赛 A题 - Alice's Print Service (ZOJ 3726)
Alice's Print ServiceTime Limit:2 Seconds Memory Limit:65536 KBAlice is providing print service, while the pricing doesn't seem to be reasonable, so p...
分类:其他好文   时间:2014-10-09 22:55:28    阅读次数:163
提取最近一小时的访问次数
times=`tail-1/Data/logs/nginx/access.log|awk‘{print$4}‘`m_time=`echo${times}|awk-F:‘{print$2}‘`foriin010203040506070809;doif[$i-eq${m_time}];thenm_time=`echo${m_time#0}`fidoneif[${m_time}="00"];thens_time="23"elselet"s_time=${m_time}-1"num=`exprlength${s_ti..
分类:其他好文   时间:2014-10-09 19:08:58    阅读次数:221
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!