$(function(){var tags = $(".tag");tags.each(function(){ var r = Math.floor(Math.random()*255); var g = Math.floor(Math.random()*255); var b =...
分类:
其他好文 时间:
2015-04-02 13:14:35
阅读次数:
99
1 '; //123,45739 echo number_format($number,null,null,' ').''; //123 45740 echo number_format($number,2,'.','').''; //123456.7941 ...
分类:
Web程序 时间:
2015-04-02 13:13:35
阅读次数:
136
data _null_;x=15.63;y=15.13;xx=ceil(x);yy=ceil(y);put xx= yy=;xx=floor(x);yy=floor(y);put xx= yy=;xx=int(x);yy=int(y);put xx= yy=;xx=round(x,0.1);yy=round(y,0.1);put xx= yy=;z=trunc(1/3,3);*按3个字节存储;pu...
分类:
其他好文 时间:
2015-04-01 15:23:37
阅读次数:
105
lua实现的大数运算,代码超短,目前只实现的加减乘运算
local mod = 10000
function add(a, b)
t, c = 0, {}
for i = 1, math.max(#a,#b) do
t = t + (a[i] or 0) + (b[i] or 0)
c[i], t = t%mod, math.floor(t/mod)
end
while t ~...
分类:
其他好文 时间:
2015-04-01 07:05:35
阅读次数:
215
题目链接:点击打开链接
Network Mess
Gilbert is the network admin of Ginkgo company. His boss is mad about the messy network cables on the floor. He finally walked up to Gilbert and asked the lazy netwo...
分类:
Web程序 时间:
2015-03-31 14:41:10
阅读次数:
208
clc;clear;D=500;N=10000;thre=10e-8;zeroRatio=0.6;X = randn(N,D);r=rand(1,D);r=sign(1-2*r).*(2+2*r);perm=randperm(D);r(perm(1:floor(D*zeroRatio)))=0;Y ...
分类:
其他好文 时间:
2015-03-30 22:51:27
阅读次数:
290
题目如下:You are given two eggs, and access to a 100-storey building. Both eggs are identical. The aim is to find out the highest floor from which an egg will not break when dropped out of a window from th...
分类:
其他好文 时间:
2015-03-30 16:31:05
阅读次数:
160
Matlab取整函数有:fix,floor,ceil,round.取整函数在编程时有很大用处。一、取整函数1.向零取整(截尾取整)fix-向零取整(Roundtowardszero);>>fix(3.6)ans=32.向负无穷取整(不超过x的最大整数-高斯取整)floor-向负无穷取整(Roundt...
分类:
其他好文 时间:
2015-03-30 14:38:34
阅读次数:
214
Problem Description
There is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: up and down.When you at floor i,if you press the button "UP" , you will go u...
分类:
编程语言 时间:
2015-03-28 15:47:08
阅读次数:
262
1.函数传值&探测对象window.onload=initAll;
/*
functioninitAll(){
for(i=0;i<24;i++){
varnewNum=Math.floor(Math.random()*75)+1;
document.getElementById("square"+i).innerHTML=newNum;
}
}
*/
functioninitAll(){
if(document.getElementById){//通过此属性检测..
分类:
编程语言 时间:
2015-03-20 01:34:47
阅读次数:
224