生成激活码#!/usr/bin/envpython
#encoding:utf-8
#Author:sean
importstring
importrandom
#激活码中的字符和数字
field=string.letters+string.digits
#获得四个字母和数字的随机组合
defgetRandom():
return‘‘.join(random.sample(field,4))
#生成的每个激活码中有几组
..
分类:
编程语言 时间:
2017-02-21 19:55:34
阅读次数:
240
functiongenerateId(length){ length=length||10; varletters=‘abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789‘; vars=‘‘; for(vari=0;i<length;i++){ s+=letters.charAt(Math.floor(Math.random()*letters.length)); } returns;}
分类:
编程语言 时间:
2017-02-20 23:16:52
阅读次数:
163
Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Examp ...
分类:
其他好文 时间:
2017-02-20 22:31:57
阅读次数:
207
Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard ...
分类:
其他好文 时间:
2017-02-11 19:02:35
阅读次数:
208
Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telepho ...
分类:
其他好文 时间:
2017-02-11 15:51:24
阅读次数:
176
Letter games are popular at home and on television. In one version of the game, every letter has a value, and you collect letters to form one or more ...
分类:
其他好文 时间:
2017-02-02 12:15:33
阅读次数:
213
A DNA sequence consists of four letters, A, C, G, and T. The GC-ratio of a DNA sequence is the number of Cs and Gs of the sequence divided by the leng ...
分类:
其他好文 时间:
2017-01-26 23:07:31
阅读次数:
258
原题链接在这里:https://leetcode.com/problems/word-pattern-ii/ 题目: Given a pattern and a string str, find if str follows the same pattern. Here follow means a ...
分类:
其他好文 时间:
2017-01-26 08:31:37
阅读次数:
176
题目: Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter ...
分类:
其他好文 时间:
2017-01-25 14:25:48
阅读次数:
187
Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the ...
分类:
其他好文 时间:
2017-01-18 12:05:01
阅读次数:
225