# 1、写一个函数,批量生成一些注册使用的账号:产生的账号是以@163.com结尾,长度由用户输入,产生多少条也由用户输入,用户名不能重复,用户名必须由大写字母、小写字母、数字组成 import random,stringdef Users(num,len): result = [] a = str ...
分类:
编程语言 时间:
2017-06-29 12:39:51
阅读次数:
130
#!/bin/bash #递归打印当前文件夹下的全部文件夹文件。 PRINTF() { ls $1 | while read line #一次读取每一行放到line变量中 do [ -d $1/$line ] && { DIR="$1/$line" echo $DIR } DIR1=`dirname ...
分类:
系统相关 时间:
2017-06-28 23:09:15
阅读次数:
240
$(function () { $('pre.prettyprint code').each(function () { var lines = $(this).text().split('\n').length; var $numbering = $('<ul/>').addClass('pre- ...
分类:
移动开发 时间:
2017-06-28 21:42:53
阅读次数:
177
一、两个字符串的对比1、两个字符串的对比输出#!/bin/envpythonimportdifflibtext1="""text1:Thismoduleprovidesclassesandfunctionsforcomparingsequencesv7.5"""text1_lines=text1.splitlines()text2="""text2:Thismoduleprovidesclassesandfunctionsforcomparingsequencesv7..
分类:
其他好文 时间:
2017-06-28 18:47:40
阅读次数:
141
# 1 编写 tail -f a.txt |grep 'error' |grep '404'命令,周一默写 # import time # def tail(filepath,encoding='utf-8'): # with open(filepath,encoding=encoding)as f... ...
分类:
其他好文 时间:
2017-06-27 20:47:23
阅读次数:
113
HighCharts使用心得前言:之前非常早的一个项目中使用过highcharts,感觉挺方便的。图表类型也比較丰富,并且还支持数据的下钻,可是假设投入商业使用的话还会有一些版权的问题,所以后来就使用了EChart,这是百度开发的一个开源的图表插件。图表类型也非常丰富,并且还有交互。对地图的支持也非 ...
分类:
其他好文 时间:
2017-06-27 09:50:57
阅读次数:
288
题目 输入两个递增排序的链表, 合并这两个链表并使新链表中的结点仍然是依照递增排序的. ListNode* Merge(ListNode* pHead1, ListNode* pHead2) { if (pHead1 == NULL) return pHead2; else if (pHead2 = ...
分类:
编程语言 时间:
2017-06-26 21:18:39
阅读次数:
168
注意rating_background图片做出来的图片最好和图片四周有一定的空隙。不然会造成图片底部被拉伸的情况。 <RatingBar android:layout_width="wrap_content" android:layout_height="wrap_content" android: ...
分类:
移动开发 时间:
2017-06-26 10:24:02
阅读次数:
224
导出例子: select *from testinto outfile 'D:test.csv'fields terminated by ',' optionally enclosed by '"' escaped by '"'lines terminated by '\r\n';导入例子:load ...
分类:
数据库 时间:
2017-06-26 10:17:33
阅读次数:
195
数据:StreamReader reader = new StreamReader(fileName, Encoding.UTF8), reader.ReadLine();//去掉第一行,这样就可以去掉第一行我们不需要的数据 stuId,stuName,stuSex,stuBirthdate,stu ...
分类:
其他好文 时间:
2017-06-26 00:34:11
阅读次数:
150