对于简单的函数,也存在一种简便的表示方式,即:lambda表达式#普通函数1 def func(a):2 return a+13 print 'test1_func0:',func(1000)4#lambda表达式 5 func0 = lambda a:a+16 print 'test2_f...
分类:
编程语言 时间:
2015-11-21 11:42:43
阅读次数:
139
1.$3匹配到fangdd.com,打印改行所有内容awk‘{if($3==fangdd.com)print$0}’filename2.匹配到fangdd.com后打印改行的$1awk‘/fangdd.com/{print$1}‘filename3.匹配到$3为404后打印改行的$1awk‘$3==404{print$1}‘filename4.打印出Nignx的时间,域名,URL,IP,并以IP排序,取唯一awk‘{p..
分类:
其他好文 时间:
2015-11-21 07:14:47
阅读次数:
249
题目传送门题意:中文题面分析:直接排完序后DFS.这样的题以后不应该再写题解的.#include using namespace std;vector G[21];int ans[21];int v[3];bool vis[21];int cnt;void print() { printf ("%d...
分类:
其他好文 时间:
2015-11-20 23:01:48
阅读次数:
215
#!/bin/bashwhile [ "1" ]doeth=$1RXpre=$(cat /proc/net/dev | grep $eth | tr : " " | awk '{print $2}')TXpre=$(cat /proc/net/dev | grep $eth | tr : " " |...
分类:
其他好文 时间:
2015-11-20 21:31:33
阅读次数:
192
判断和检查的部分可自行设置或不执行checkNginxRoot,以免受制于权限问题#!/bin/bash#byLCIP=`ifconfigeth0|awk-F‘[:]+‘‘NR==2{print$4}‘`CURL=`curl-I$IP|egrep"403|200|404"|head-1|wc-l`ZHANDIAN=/data01/static/shareEXTRA=haixiang.confSERVERNAME=lc.lc.orgTOOLSDIR=/app..
分类:
系统相关 时间:
2015-11-20 20:09:00
阅读次数:
157
cd: change directory 切换目录命令ls: list 显示当前目录的内容pwd: Print Working Directory 该命令显示当前路径名touch: 更新文件创建时间或创建一个新文件find: 查找locate: locate命令其实是"find -n...
分类:
系统相关 时间:
2015-11-20 18:59:18
阅读次数:
154
python打印变量:1.在Eclipse中输入:print "Hello world!"myString = "Hello world!"print myString运行结果:Hello world!Hello world!2.格式化字符串print "%s is in the left of r...
分类:
编程语言 时间:
2015-11-20 15:37:52
阅读次数:
169
如果在地址栏挂载参数,特别是包含中文,往往要进行编码,取值时再解码,以下是java和js中编码、解码的各自方法。java:@Test public void test3() throws UnsupportedEncodingException{ System.out.print...
分类:
编程语言 时间:
2015-11-20 06:59:37
阅读次数:
152
# -*- coding:utf-8 -*-from collections import deque__author__ = 'hunterhug'mylist = [2, 3, 4, 5]print(mylist)mylist.append(3) # 添加元素到链尾print(mylist)my...
分类:
编程语言 时间:
2015-11-19 22:16:34
阅读次数:
285
// Create a report instance, assigned to a Print Tool. ReportPrintTool pt = new ReportPrintTool(new XtraReport1()); // Invoke the Print dialog. pt...
分类:
其他好文 时间:
2015-11-19 22:13:58
阅读次数:
205