码迷,mamicode.com
首页 >  
搜索关键字:print    ( 43532个结果
leetcode笔记:Gray Code(2016腾讯软件开发笔试题)
一.题目描述 The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total number of bits in the code, print the...
分类:其他好文   时间:2015-09-09 23:00:04    阅读次数:422
C/C++ 指针数组、二维数组
一、 二维数组1> 初始化int a[3][3] = { {1,0,0}, {0,1,0}, {0,0,1} }; // 这里是 {} , 而不是()2> 将二维数组当做一维数组处理void print_array( int * p, int row, int line){ for(int i=0....
分类:编程语言   时间:2015-09-09 19:18:55    阅读次数:243
Python学习二---字符串
一、字符串1.1、字符串和转义字符转义字符需要使用\来表示1.2、字符串连接print 字符串1 字符串2,打印出来的字符串直接连接在一起没有空格print 字符串1,字符串2,打印出来的字符串直接连接在一起有空格也可以使用变量赋值的方式来输出 字符串,使用+号将变量连接在一起,结果同上1.3、st...
分类:编程语言   时间:2015-09-09 16:33:05    阅读次数:254
import和from import陷阱一
1 #from datetime import datetime2 import datetime3 format="output-%Y-%m-%d-%H%M%S.txt"4 str="output-1997-12-23-030000.txt"5 print datetime.strptime(st...
分类:其他好文   时间:2015-09-09 14:46:23    阅读次数:153
gdb 分析出错
1 创建测试代码test.php2 运行文件 php test.php 获取到pid3 运行 gdb -p pid4 进入gdb交互(gdb) print (char *)executor_globals.active_op_array->filename$1 = 0x9853a34 "/home/...
分类:数据库   时间:2015-09-09 13:28:51    阅读次数:264
红绿互换
gr2rg(){ ??perl?-ne?‘s/ ??(\033\[(\d+;)*[34])([12]) ??((;\d+)*m) ??/$1.(3-$3).$4/xge; ??print‘?$* } 把上面几行加入 .bash_profile 里面,实现红绿互换 -bash-3.2# echo -e "\e[31mRED\e[0m" ...
分类:其他好文   时间:2015-09-09 11:41:46    阅读次数:180
awk
[root@VM_166_163_centos~]#echo"100ms90ms"|awk‘{print$NF}‘90ms[root@VM_166_163_centos~]#echo"100ms90ms"|awk‘{print+$NF}‘90
分类:其他好文   时间:2015-09-09 11:38:20    阅读次数:147
PHP:字符串转数组,数组转字符串;字符串截取、替换、查找
字符串转数组$str = 'one|two|three|four';print_r(explode('|', $str)); //explode 以字符串分割字符串到数组$str = 'one two three'; //str_split 以位数分割$arr1 = str_spli...
分类:编程语言   时间:2015-09-09 11:29:58    阅读次数:139
poj 3390 Print Words in Lines 动态规划
意甲冠军:给n每行长度和字符可放置最大数量字m,每一行产生值至(m-x)^2,x是一个字符上线人数(包含空话之间格)。为了让所有的完成,产生的话值最小和。分析:动态规划非常重要的就是状态的定义,在由子问题向父问题推进的过程中,定义的状态要能对之前的全部情况进行总结。比方背包问题中dp[i][v]中的...
分类:其他好文   时间:2015-09-08 21:46:21    阅读次数:152
InvokeRepeating 和 CancelInvoke
voidStart(){//2秒后每隔3秒执行PPP方法InvokeRepeating("PPP",2.0f,3f);}voidPPP(){print("ssss");}voidUpdate(){//按下左键时取消调用InvokeRepeatingif(Input.GetMouseButtonDown(0)){CancelInvoke("PPP");}}
分类:其他好文   时间:2015-09-08 20:25:09    阅读次数:231
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!