In [1]: import string In [2]: string.lowercase # lowercase用于打印所有小写字母,注意这是string模块的一个属性 Out[2]: 'abcdefghijklmnopqrstuvwxyz' In [3]: string.uppercase #... ...
分类:
编程语言 时间:
2019-01-14 10:50:41
阅读次数:
170
Math.random()//随机数生成器parseInt()//装换为整数 日期时间函数(需要用变量调用):var b = new Date(); //获取当前时间b.getTime() //获取时间戳b.getFullYear() //获取年份b.getMonth()+1; //获取月份b.ge ...
分类:
其他好文 时间:
2019-01-12 12:10:38
阅读次数:
206
#习题2:定义一个类:实现功能可以返回随机的10个数字,随机的10个字母, #随机的10个字母和数字的组合;字母和数字的范围可以指定 class RandomString(): #随机数选择的范围作为参数,如(1~100)字母 ('A'~'z'),大写字母在前 按ascii值排列先后 def __i... ...
分类:
其他好文 时间:
2019-01-10 19:29:06
阅读次数:
165
1.获取元素方法二可以使用内置对象document上的getElementsByTagName方法来获取页面上的某一种标签,获取的是一个选择集,不是数组,但是可以用下标的方式操作选择集里面的标签元素<!doctypehtml><html><head><metacharset="utf-8"><title>obtain&
分类:
编程语言 时间:
2019-01-05 13:37:53
阅读次数:
201
以前生成测试字符时,用random模块拼来拼去来生成随机串,如姓名,手机,身份证等,还是费一些功夫,不过有了faker模块,一切变得简单起来 基本使用: 自定义faker,用add_provider方法: 其它Provider参考: https://faker.readthedocs.io/en/l ...
分类:
编程语言 时间:
2019-01-02 20:44:54
阅读次数:
582
//短信发送测试 import java.io.UnsupportedEncodingException; import org.apache.commons.codec.binary.Base64;import com.huazi.projects.entity.SubmitReq;public ...
分类:
移动开发 时间:
2018-12-29 13:42:29
阅读次数:
1577
Math 常见属性,参考网址: 数组的高级应用 没有副本,直接修改原始引用 表的高级运用 字符串高级运用 ...
分类:
编程语言 时间:
2018-12-28 10:49:44
阅读次数:
165
A sentence S is given, composed of words separated by spaces. Each word consists of lowercase and uppercase letters only. We would like to convert the ...
分类:
其他好文 时间:
2018-12-18 11:07:44
阅读次数:
128
function ajax(opt) { opt = opt || {}; // 对实参处理 var xmlhttp, method, url, async, dataType, data; method = opt.method || 'GET'; //... ...
分类:
编程语言 时间:
2018-12-08 20:19:59
阅读次数:
212
Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This ...
分类:
编程语言 时间:
2018-12-06 10:19:11
阅读次数:
242