python print格式化输出。1. 打印字符串print ("His name is %s"%("Aviad"))效果:2.打印整数print ("He is %d years old"%(25))效果:3.打印浮点数print ("His height is %f m"%(1.83))效果:...
分类:
编程语言 时间:
2014-10-19 21:08:48
阅读次数:
279
获取当前目录下的路径,目录和文件并写入文本1 # -*- coding:utf-8 -*-2 import os3 for root,dirs,files in os.walk(os.getcwd()):4 print root,dirs,files 5 open('mycd.cdc','a').....
分类:
编程语言 时间:
2014-10-19 18:34:01
阅读次数:
208
PHP经常容易记乱的知识 1.echo和print的区别 PHP中echo和print的功能基本相同(输出),但是两者之间还是有细微差别的。echo输出后没有返回值,但print有返回值,当其执行失败时返回flase。因此可以作为一个普通函数来使用,例如执行下面的代码后变量$r的值将为1。 $...
分类:
Web程序 时间:
2014-10-19 16:58:10
阅读次数:
237
输出每个IP的网络连接数,是作很多事情的第一步:netstat -nat | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nnetstat -nat|awk '{print $5}'|awk -F : '{print $1}'|aw...
分类:
其他好文 时间:
2014-10-19 12:50:34
阅读次数:
241
《python基础教程(第二版)》学习笔记 语句/循环/条件(第5章)print 'AB', 123 ==> AB 123 # 插入了一个空格print 'AB', 'CD' ==> AB CD # 插入了一个空格print 1,2,3 ==> 1 2 3print (1,2,3) ==> (1, ...
分类:
编程语言 时间:
2014-10-19 09:02:03
阅读次数:
269
public class Test { final static int[] sizeTable = { 9, 99, 999, 9999, 99999, 999999, 9999999, 99999999, 999999999, Integer.MAX_VALUE...
分类:
编程语言 时间:
2014-10-18 23:55:01
阅读次数:
241
最近在学php遇到时区问题,废话不说上代码。。for的高级运用距离星期一还有几天?\n"); print("\n"); for($currentDate = time(); //定义$currentDate时间格式 date("l", $curren...
分类:
Web程序 时间:
2014-10-18 23:38:54
阅读次数:
301
1、HelloWorld
using LuaInterface;
public class HelloWorld : MonoBehaviour {
void Start () {
LuaState l = new LuaState();
// 在C#下使用Lua
l.DoString("print('hello world 世界')");
}
}
2、...
分类:
其他好文 时间:
2014-10-18 18:26:42
阅读次数:
648
复习一下原来学习的排序算法。
#include
using namespace std;
void print(int *a,int n) {
for(int i=0;i<n; ++i) {
cout<<a[i]<<' ';
}
cout<<endl;
}
void InsertSort(int *a,int n) {
int i,...
分类:
编程语言 时间:
2014-10-18 15:33:11
阅读次数:
146
ShellExecute( hWnd: HWND; {指定父窗口句柄} Operation: PChar; {指定动作, 譬如: open、print} FileName: PChar; {指定要打开的文件或程序} Parameters: PChar; {给要打开的程序指定参...
分类:
其他好文 时间:
2014-10-18 15:29:08
阅读次数:
119