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
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
网站选择桌面壁纸网站的汽车主题:
下面的两个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
一维数组:
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是一个python的解释器和JIT编译器。可以在不修改任何代码的情况下大幅提升python代码的性能。
使用超级简单,在官网下载编译好的二进制包进行安装,然后然后运行代码的时候指定这个解释器就行了。
我们来试试下面这段代码。
import time
t1 = time.time()
i = 10000000
while i:
i -= 1
print time.time() ...
分类:
其他好文 时间:
2014-11-16 10:45:54
阅读次数:
147
这道题一看就是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
#!/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
知道两个文件的绝对目录,怎样计算出两个文件的相对目录,例如:知道 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