一、window对象Wondow.navigate(url); 跳转页面(与超链接的区别:可以加逻辑条件)Vara=Math.random(); 0-1之间随机数Vara=paramInt(Math.random()*10000)%3随机0,1,2Document.write(a);Window.m...
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
题意:n个点(1~n),m条边,走k次,双向边,每次随机走一条路,起点也随机,问不走到各个点的概率是多少。
思路:
概率dp[i][j][k] 前i步 走到j 走不到k的概率。
那么状态转移就是 j能走到的点,传递所有dp[i][j][k]的值乘上概率。
代码:
#include"cstdlib"
#include"cstdio"
#include"cstring"
#include"c...
分类:
其他好文 时间:
2014-09-23 10:10:22
阅读次数:
202
#include #include #include /** * Create random UUID * * @param buf - buffer to be filled with the uuid string */char *random_uuid( char buf[37] ){ con...
分类:
系统相关 时间:
2014-09-23 02:16:13
阅读次数:
408
在一个已出现的poupwindow中,点击页面上的某个按钮,页面将进行跳转到另一个Activity中。popupwindow代码如下: 1 package com.cn.gordon.exhibition.walk.popup; 2 3 import com.cn.gordon.exhibitio....
分类:
移动开发 时间:
2014-09-22 18:57:23
阅读次数:
292
网上有个ColorPicker开源项目,选择颜色值。而在这里我想实现的是动态修改一个view的背景色。
开一个线程,每隔1s修改一次view的背景色。
我们知道在android里设置一个view的背景色有
framelayout.setBackgroundColor(Color.parseColor("#"+arg0.obj));就是用android的Color类去解析一个带#号的十六进制色...
分类:
移动开发 时间:
2014-09-21 15:00:20
阅读次数:
282