#!/bin/bash
[-fuser.log]&&rm-fuser.log
foriin`seq-w10`
do
pass=$(echo$RANDOM`opensslrand-base648`|cut-c1-10)
useraddguest$i&&echo"$pass"|passwd--stdinguest$i
echo-e"user:guest$i\tpass:$pass">>user.log
done
分类:
系统相关 时间:
2014-09-25 02:34:18
阅读次数:
261
UIImage *image = [UIImage imageNamed:@"back2.jpg"]; //创建一个图片对象,这个方法如果图片名称相同,不管我们调用多少次,得到的都是同一个图片对象。 self.view.backgroundColor = [UIColor colorWithPat....
分类:
其他好文 时间:
2014-09-24 16:23:57
阅读次数:
174
自己写的jsonp函数封装getJsonp:function(url,fn){ var callback='c_brand_jsonp'+String(Math.random()).replace('.',''); url=url+'&callback='+callback; var s...
分类:
Web程序 时间:
2014-09-24 16:00:07
阅读次数:
191
一、window对象Wondow.navigate(url); 跳转页面(与超链接的区别:可以加逻辑条件)Vara=Math.random(); 0-1之间随机数Vara=paramInt(Math.random()*10000)%3随机0,1,2Document.write(a);Window.m...
Python:面向对象的编程语言,多态,封装,继承三个主要特性
多态:来自希腊语,意味着有多种形式。
>>> from random import choice
>>> x = choice(['Hello,World!',[1,2,'e','e',4]])
>>> x.count('e')
1
任何不知道对象到底是什么类型,但又要对对象做的什么的时候,就要用到多态
>>> 1+2
3
>>> 'hot'+'dog'
'hotdog'
#和下面的形式是一样的
>>> def add(x,y): return...
分类:
编程语言 时间:
2014-09-23 23:54:05
阅读次数:
366
InputInput contains a single line with all labels of the requested goods (in random order). Each kind of goods is represented by the starting letter o...
分类:
其他好文 时间:
2014-09-23 22:46:45
阅读次数:
161
数字类型的相关模块:decimal:十进制浮点运算类array:高效数值数组(字符,整形,浮点型)match:常规数学运算operator:数字操作符的函数实现random:多种伪随机数生成器字符串类型相关的模块:re:正则表达式struct:字符串和二进制之间转换StringIO:字符串缓冲对象,...
分类:
编程语言 时间:
2014-09-23 22:14:55
阅读次数:
254
关于IE下页面不刷新(手动有OK的问题)//解决IE下有缓存需手动刷新页面问题start
if(src.indexOf(‘?‘)!=-1){
src=src+"&random="+Math.floor(Math.random()*100000);
}else{
src=src+"?random="+Math.floor(Math.random()*100000);
}
//解决IE下有缓存需手动刷新页面问题..
分类:
其他好文 时间:
2014-09-23 20:38:05
阅读次数:
213
要求: 随机生成50个数字(整数),每个数字的范围是[10, 50],统计每个数字出现的次数以及出现次数最多的数字与它的个数,最后将每个数字及其出现次数打印出来,如果某个数字出现次数为0,则不要打印它。打印时按照数字的升序排列。版本一:(使用数组实现)import java.util.Random....
分类:
其他好文 时间:
2014-09-23 19:06:15
阅读次数:
204
randomPython中的random模块用于生成随机数。1. random.random random.random()用于生成一个0到1的随机符点数: 0 >> random.random()0.16426290091758478>>> 2.random.uniform random.uni....
分类:
其他好文 时间:
2014-09-23 15:42:34
阅读次数:
216