监控网卡流量python代码 代码段

def get_net_info(): flow1 = open('/proc/net/dev') lines = flow1.read() flow1.close() e = re.compile('(eth

y0657bys 2016-02-29   3156   0
Python  

基于html5 localStorage的购物车JS脚本 代码段

function(name){ return localStorage.getItem(name) } } product={ id:0, name:"", num:0, price:0.00, }; orderdetail={

fefef123 2014-12-31   4816   0
HTML5  

使用Python对json文件进行处理 代码段

j_file=open("1.json","r") lines="a" while 1: lines = j_file.readline().strip("\n") if not lines: break j_list =

cdfd 2015-08-08   4477   0
Python  

Python生成验证码实例 代码段

font_size=18, font_type=fontType, length=4, draw_lines=True, n_line=(1, 2), draw_points=True, point_chance

ybw8 2015-06-04   1693   0
Python  

文本文件操作的php类 代码段

(file_exists($this->file)) { $f =file($this->file); $lines = array(); foreach ($f as $rawline) { $tmpline =

cp5m 2015-04-23   686   0
PHP  

python文本比较库difflib使用示例 代码段

difflib lines1 = ''' dog cat bird buffalo gophers hound horse '''.strip().splitlines() lines2 = ''' cat

cgdf 2015-09-05   4354   0
Python  

java多线程示例 模拟生产者消费者 代码段

new Thread(con).start(); } } class Product{ int id; public Product(int id){ this.id=id; } public String

gbd8 2015-02-10   1368   0
Java  

Python sql server和postgresql的表结构转换 代码段

i=0 lines=[] for column in row: if(column is not None and types.StringType==type(column)): #lines.app

openocode 2015-01-08   2230   0

iOS支付宝支付主要代码 代码段

*/ Product*product = [[Product alloc] init]; product.subject=@"机票"; product.body=@"乘客机票"; product.price=0

ww24 2015-02-11   1807   0

获得进程内存使用量的Python脚本 代码段

have_pss mem_id = pid #unique Private_lines = [] Shared_lines = [] Pss_lines = [] Rss = (int(proc.open(pid,

cgdf 2015-09-05   1670   0
Python  

python性能测试脚本 代码段

open("E://card.txt") while 1: lines = file.readlines() if not lines: break for line in lines: line = line.strip('\n')

ybw8 2015-06-04   2271   1
Python  

一个简单的python读写文件脚本 代码段

%fname else: break # get file content lines all = [] print "\nEnter lines (input '.' to quit).\n" # loop until

jopen 2015-04-17   7203   0
Python  

PHP将cvs导入到MySql 代码段

@mysql_select_db($databasename) or die(mysql_error()); $lines = 0; $queries = ""; $linearray = array(); forea

wxx4 2015-01-03   1277   0
PHP  

101个LINQ示例,包含几乎全部操作 代码段

foreach (var product in soldOutProducts) { Console.WriteLine("{0} is sold out!", product.ProductName);

ggkwk 2015-07-09   1163   0
C#  

经典算法5:用分治法实现元素选择 代码段

ray[i])+";"; Memo1->Lines->Append(str);        //在Memo组件中显示数组 Memo1->Lines->SaveToFile("array_before

cwf8 2015-01-11   2577   0
算法  

可以获取任意 Web 页面HTML 代码的PHP函数 代码段

display_sourcecode($url) { $lines = file($url); $output = ""; foreach ($lines as $line_num => $line) { //

gw23e 2015-08-09   824   0
PHP  

python压缩javascript文件代码 代码段

compromises your script 1 - Strip comments and empty lines, don't change line breaks and indentation (code

pkiek23 2015-01-18   1888   0
Python  

利用MySQL备份工具mydumper备份代码 代码段

for lines in f.readlines(): if (not lines.startswith('#') and len(lines.strip()) > 0): str = lines.split()

f2xc 2015-09-30   2427   0
MySQL  

java3d生成简单的点线图 代码段

f); LineArray lines=new LineArray(500,LineArray.COORDINATES|LineArray.COLOR_3); lines.setCoordinates

oracle表空间操作 代码段

ALTER TABLESPACE app_data ADD DATAFILE 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\EDWTEST\APP03.DBF' SIZE 50M;  

wewopargt 2016-03-09   46871   3
Oracle  
1 2 3 4 5 6 7 8 9 10