码迷,mamicode.com
首页 >  
搜索关键字:print    ( 43532个结果
VC 整数转16进制的字符串
int EX0IEN; cstring strEX0IEN; char c1[4]; sprintf(c1, "0x%02x",EX0IEN); strEX0IEN.Format("%s", c1);
分类:其他好文   时间:2014-11-17 10:36:54    阅读次数:207
文件统计
#!/bin/shname=`ls ./`for i in $name;do aaa=`find $i -type f |xargs ls -ltr|tail -1|awk -F" " '{print $6$7" "$8}'` count=`find $i -type f -exe...
分类:其他好文   时间:2014-11-17 10:32:59    阅读次数:131
node.js基础语法
nodejs基础语法 Node.js的数据类型 Node.js的逻辑判断 Node.js的各种循环 Node.js中使用函数 看看和js有没有什么区别 使用 node 的 REPL 模式 REPL (Read-eval-print loop),即输入—求值—输出循环。 Number (数字) Boo...
分类:Web程序   时间:2014-11-17 00:28:54    阅读次数:295
Python 爬虫网页抓图保存
网站选择桌面壁纸网站的汽车主题: 下面的两个print在调试时打开 #print tag #print attrs #!/usr/bin/env python import re import urllib2 import HTMLParser base = "http://desk.zol.com.cn" path = '/home/mk/cars/' star = '' def get_...
分类:编程语言   时间:2014-11-16 23:07:13    阅读次数:387
Java中增强for循环在一维数组和二维数组中的使用
一维数组: int[] a={1,2,3}; for(int i:a) { System.out.print(i+" "); }输出:1 2 3 二维数组: import java.util.Scanner; public class tet { public static void main(String[] args) { //int[][] b={{1,2...
分类:编程语言   时间:2014-11-16 17:27:16    阅读次数:215
试试pypy
pypy是一个python的解释器和JIT编译器。可以在不修改任何代码的情况下大幅提升python代码的性能。 使用超级简单,在官网下载编译好的二进制包进行安装,然后然后运行代码的时候指定这个解释器就行了。 我们来试试下面这段代码。 import time t1 = time.time() i = 10000000 while i: i -= 1 print time.time() ...
分类:其他好文   时间:2014-11-16 10:45:54    阅读次数:147
POJ 1934 Trip(LCS+枚举+输出所有路径)
这道题一看就是LCS,直接写个裸的,硬搜。TLE void print(int r,int c,int n) { if(dp[r][c]==0) { string ss=tp; ans[ss]=1; //sprintf(ansstr[cnt++],"%s\n",tp); return; } if(ph...
分类:其他好文   时间:2014-11-16 10:44:36    阅读次数:186
测试网卡流量shell脚本
#!/bin/bashfunctionusage{echo"use./test_net.shethXtime"echo"$1isyounetworkinterface"echo"$2isthelasttime!"echo"forexample:./test_net.sheth02"exit100}if[$#-lt2-o$#-gt2];thenusagefieth=$1time=$2old_inbw=`cat/proc/net/dev|grep$eth|awk-F‘[:]+‘‘{print$3}‘`old_ou..
分类:系统相关   时间:2014-11-16 02:02:18    阅读次数:277
Python 目录操作
知道两个文件的绝对目录,怎样计算出两个文件的相对目录,例如:知道 a='/usr/share/pyshared/test/a.py' b='/usr/lib/dist/test/a.py'可以直接应用OS模块中的os.path.reppath得到结果: >>> print(os.path.re...
分类:编程语言   时间:2014-11-15 23:04:53    阅读次数:306
数据写入文件
//生成N个小于N的随机数,存入数组avoid RandToFile(int *a){ srand( (unsigned)time( NULL ) ); //初始化随机数 for(int i=0;i<N;i++) { a[i]=(int)rand()%N; } FILE *...
分类:其他好文   时间:2014-11-15 22:55:54    阅读次数:195
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!