由买买提看人间百态

topics

全部话题 - 话题: random
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
b*****2
发帖数: 11103
1
【 以下文字转载自 pets 讨论区 】
发信人: wudoo (抵制鱼翅燕窝抵制熊胆抵制狗肉抵制皮草), 信区: pets
标 题: Re: 公司附近发生了random shooting
发信站: BBS 未名空间站 (Fri Jun 7 19:57:36 2013, 美东)
一分钟前杀手被毙了,一共杀了六个人,多人受伤。还烧了一所房子,房子里5具尸
体。有个路人探头探脑地去看燃烧的房子,被他一枪蹦了。
s********t
发帖数: 930
2
【 以下文字转载自 USANews 讨论区 】
发信人: starlightt (星光少女), 信区: USANews
标 题: 川普谈判的艺术相当的random:给钱!
发信站: BBS 未名空间站 (Sat Jan 28 00:50:17 2017, 美东)
不给。
川普:加你关税!
滚蛋。
川普:喔,那就算了吧。
e*******e
发帖数: 6165
3
来自主题: LES版 - Random Crap
for random crap呀
t**t
发帖数: 3
4
I have a STAT problem. Ask for help!! For sample size N=30,60,120,240;generate
m=4 sets of random standard normal deviates (z scores). Does that mean for
each sample size, generate 4 times. but what is deviates z scores? Thanks
alot!!
a*****l
发帖数: 27
5
来自主题: Shanghai版 - Random thoughts Re: cy
Proctoring an exam for MBA students now. The good thing about MBA exams is
that you can water while they are doing the exam. So I had the time to write
down some random thoughts.
This post reminds me to think what makes a great consultant. I had the exactly
same feeling when I was a junior consultant a few years ago. I listened to
what seniors said and figured that I could say it as well and even better.
It turns out things are not as simple. I have learned two critical lessons.
The first one is
l****i
发帖数: 20439
6
来自主题: Xibei版 - Re: random奔
【 以下文字转载自 LeisureTime 讨论区 】
发信人: snowsunny (坏蛋还是只吃100cc), 信区: LeisureTime
标 题: Re: random奔
发信站: BBS 未名空间站 (Wed Dec 28 11:08:05 2011, 美东)
诶,是啊,说起来我lp真是好啊,要好好珍惜
d*****n
发帖数: 760
7
来自主题: Apple版 - 有没有random wallpaper的app?
有没有random wallpaper的app? 老是看一个很无味
R*******i
发帖数: 99
8
刚看到新闻上的,觉得挺有意思。不知道贴过没有。
原始LINK在这里:
http://www.quora.com/Steve-Jobs/What-are-the-best-stories-about
===================================================================
Steve Jobs: What are the best stories about people randomly meeting Steve
Jobs?
If so, tell us about the situation and describe the experience?
I'm particularly curious to know what he was like outside of Apple Inc. He
had a reputation for being "difficult" to work with, or work for. I want to
know about what he was like as "the gu... 阅读全帖
q**1
发帖数: 193
9
来自主题: BuildingWeb版 - How to generate pictures from random number?
Just like many downloading/uploading websites such as
uploading.com.. Users have to enter the number shown on
a picture to be eligible to access the next page.
Generating a random number looks ok, but how to make a
fixed-size picture on the fly? Any API with PHP or other
tools??
http://www.uploading.com/en/showimgs.php?key=75609860
BTW, I found the above link to a picture, looks they
just extract a picture from the DB? so for a 5-digit system,
that means 99999 potential pictures saved in the HD?
a******n
发帖数: 100
10
I have the same random thought over many years.
The most fundamental question I think is "self-awareness". Even
mathematically, many fundamental theoretical results are based on
self-(but)-contradiction: e.g. Turing's proof of HALTing problem. Can one
really reason about himself?
It seems very hard to find 'self'. Do you really think human has
free-will-of-its-own ? Are you just a machine that God build? (just as
nowadays human build computers?) Even before the film "Matrix" is shot, I
have
a******n
发帖数: 100
11

I have thought about a slightly different toy many many years ago, which can
be trivially built with today's technology:
Basically it's a toy car, with rechargable battery, and a monitor to indicate
the battery level, plus a sensor to find the charger in the room.
Precondition: there is always a charger can be found within distance
(battery.level > 0.10)
while(true) {
if (battery.level > 0.50) then { randomly travel in the room; }
else { find the neareast charger; and charge itself; }
}
Do
c******n
发帖数: 4965
12
I think human intelligence has a large part to do with
random exploration,
that's probably the difference between a human and a TM
a******n
发帖数: 100
13

That's also an interesting topic I discussed with people near me.
It fits nicely with how human (or creature in general) evolve, according to
Darwin's theory.
But intelligence ?= genetic algorithm + a *true* random number generator +
natural (or God) selection
Something we still not feel very comfortable with. Even in physics, Einstein
said "I don't believe God play dice".
Well, the good thing about this theory is that, different things (physics,
biology, computer science) start to converge to
h*******y
发帖数: 864
14
Actually, you said an interesting piont that intelligence was due to
random exploration. In fact, there are many different views.
Some think that intelligence is inherited from ancestors. Some think that
intelligence is shaped by culture and society you live in. Some think that
intelligence evolved as human evolved.Some think that intelligence is
developed because children are actively explorate the world around them.
Moreover, their genes set them up to explorate the world.
You know, many exper
h*******y
发帖数: 864
15

my
I think the answer is that monkeys eventually think about the world, him or
his family and so forth. You toy do not think. In addition, your toy can not
even remember the place for recharging, and it do not have a goal for finding
the place recharging while traveling randomly.
o***a
发帖数: 724
16
【 以下文字转载自 Mathematics 讨论区 】
发信人: olama (Obama), 信区: Mathematics
标 题: 有啥好的normal distribution random variable的C代码?
发信站: BBS 未名空间站 (Sun May 17 02:19:12 2009), 站内
大家能推荐一个好的么
3x
a*******t
发帖数: 891
17
来自主题: Database版 - M$ SQL Random number
I am using RAND() in a loop and it is giving the same numbers
Is it because the loop executes too fast and RAND() uses system time as seed?
I've tried to use the loop counter as seed but that doesn't help
if I use "waitfor delay 00:00:01" than I get different random numbers....
but it's not pratical because it'll take days to run what I want to do...
How do I get RAND() to work correctly in a loop?
B*****g
发帖数: 34098
18
来自主题: Database版 - random sampling with replacement, how?
1. write a procedure store random N pk values of original table to temp
table,
2.select join temp table and original table.
B*********L
发帖数: 700
19
SQL 2008 已经有decision tree了,是不是可以通过什么方法实现,至少实现random
forest。
谁能指点一下,谢谢了。
j*****n
发帖数: 1781
20
来自主题: Database版 - random error for CAST( MONEY AS VARCHAR)
MSSQL 2k5
Here is a table with about 400 columns, billions of rows; we have a view
does this:
SELECT .....,
CAST (col_n AS VARCHAR(11)) AS col_n, -- col_n is MONEY data type in the
table
...
FROM tbl
We have an SSIS ETL runs every day that pulling millions of rows based on
this view; it has been ran for couple years without problem.
Recently (started few weeks ago), we discovered that randomly this converted
col_n returns few 0's, no matter whatever the actual value is. say 20.12,
or -128.33... 阅读全帖
S*M
发帖数: 10832
21
1月份从microsoft store买的T400s,给LD写论文用
结果有random shutdown的问题
本来想忍忍,现在不能忍了
不知道有没有人送修过?
turn around时间长不?
谢谢!
i*****e
发帖数: 5233
22
怎么个random法? OS的还是直接掉电?
x****c
发帖数: 25662
23
一般从送走到收回来,3到4个工作日
时间是很快的,但这种random的问题,能不能修好是另外一回事。
S*M
发帖数: 10832
24
thanks
这个问题好像是出在最早的一批T400s上,
不少人都有
搜t400s random shutdown能搜出一堆hits
g******c
发帖数: 503
c********n
发帖数: 1577
26
来自主题: Hardware版 - win7 random hangs
我系统win7 64bit pro
amd 960t
8gb 内存
6850显卡
asus evo 主板
SSD硬盘
最近random hangs越来越多
我之前以为我没开 windows error report
现在开了
可是现在开个outlook会hang
有flash的东西会hang...
是我CPU问题么,
除了CPU我所有配件都换过了。。。烦死了
p*****1
发帖数: 200
27
听说 M4 很Stable, 就买了一个装到PC上,可是发现有 random auto reboot。 谁
碰到过这种情况?有什么办法解决?
g**********y
发帖数: 14569
28
来自主题: Java版 - Random thoughts on Javascript
I haven't touched javascript for quite a few years. In my last memory, it is
an ugly language -- limited capability, hard to debug.
In the tide of AJAX, I take a look at current Javascript. "AJAX in action"
is my reference. Following are some random thoughts:
* I am surprised at javascript's support of functional programming. Java
plan to add it in SDK 7, falling behind. And it's interesting to know that
javascript has nothing to do with java.
* I really hate to see statement like:
Function.prot
s******d
发帖数: 901
29
来自主题: Java版 - 关于Random怎么用?
如果我有N个list (比如说list of Date, String, int 等等), 每个的list的长度也完全不同(有的很短,有的很长),我的程序要从不同的list里面随机取值,做一个新的object,我的问题是应该用一个Random instance, 还是用N个, 用一个的话当然work,但是我比较担心产生的sequence相对于每个list来说不even.不太明白其中的原理,有人给我解答一下吗?谢谢了。
c*******e
发帖数: 290
30
来自主题: Java版 - Random split of a file
一个文件包含多行文本,如果要按一定比例,比如 3:7 随机分割,分割后输出到另两
个文件,什么方法最好?
这样做,好像不是最好的?
1. 第一次,逐行读取整个文件,统计行数 n
2. 按 3:7 的比例,计算随机分割后两部分的行数,a, b
3. 第二次,逐行读取整个文件,使用一个 random sampling 的算法,得到随机分割的
行,并存入一个 listA. 行数为 a;
4. 第三次逐行读取整个文件,将不存在 listA 中的每行存入 listB, 行数为 b.
真的需要扫描文件三次吗?
m******t
发帖数: 635
31
来自主题: Java版 - Random split of a file
似乎读两次就够了:
1. 第一次也是读一遍文件,得到总行数n
2. 对于数组A = [1..n],random shuffle一下,得到新数组B(用C++的话,STL里就有
random_shuffle,Java估计有类似的method),这样B数组的前30% B1,和后70%数组B2
就是要分的行
3. 第二次顺序文件,对每一行a,如果a在B1中,就存入listA, 否则存入listB
这个是没优化过的,否则A用hashset更好
c*****t
发帖数: 421
32
来自主题: Programming版 - help understanding code (random number)
Hi, this is copy&paste from a piece of code I am reading, but
can't understand:
int nc[5], extObt = 0;
set freeNumbers;
......
set::iterator si;
for (si = freeNumbers.begin(); si != freeNumbers.end() && extObt < 5;
++si)
{
if ((*si) % 200 == (rand() % 82))
{
nc[extObt] = (*si);
extObt++;
}
}
The funciton of the code is to randomly pick up 5 numbers from the set
of freeNumbers, but I can't understand how it i
s*******e
发帖数: 1269
33
来自主题: Programming版 - ask a C question about random number
I used
srand((unsigned) time(NULL));
for ( int i=0;i<5;i++)
{
rand();
}
I produce the same number at the same time period such as 5 second or 3 second
.
How can I produce a random number?
n******s
发帖数: 7
34
来自主题: Programming版 - ask a C question about random number
If you invoke this program repeatedly in a short period of time, you are going
to get the same random number sequence because you are calling srand() with
the same seed, namely the integer that is the number of seconds since midnight
1970/01/01. If you must repeatedly invoke the program, you will need to find
a way to hash up the seed value. You could try putting the program to sleep
for a second or two before calling srand().

second
N*********y
发帖数: 105
35
Then use a random number generated as the new seed.
s****l
发帖数: 137
36
来自主题: Programming版 - help: generate random IP address
Any one has a code to generate a random IP address using C?
Thanks!
a*****n
发帖数: 5158
37
来自主题: Programming版 - random number generator in C++
也不行,
必须要将srand与rand都入在main()里才行,真是见鬼
难道没调用一次random(),不要再运行srand?
o******r
发帖数: 259
38
来自主题: Programming版 - random number generator in C++

不用浮点运算
random = lowest + rand()%range;
(suppose lowest, highest都是 整数)
O******e
发帖数: 734
39
来自主题: Programming版 - random number generator in C++
The earlier example was inclusive at both ends.
If you want to exclude both ends, then just use lowest++ and highest--.
I think it is more natural than an integer random() return values that
are inclusive of the end points. When you roll a die, you always
say that the die will show "1 to 6 dots", not "0 to 7 dots exclusive
of the lower and upper bounds", right?
g***p
发帖数: 139
40
来自主题: Programming版 - random number generator in C++
ft,一样的seed,你的random将产生一组一样的随机数。
每一次你call func,就得到一组一样的随机数的第一个。
J*y
发帖数: 271
41
来自主题: Programming版 - java random set seed question
java 有经验的,帮忙看看这个问题:
if (Math.random()>.5)
setid=2;
else
setid=1;
怎样set seed, 使setid 值固定,便于检验结果?
3x
g*****g
发帖数: 34805
42
You first read all the lines into memory, 1000 is nothing.
Then you generate random numbers, you can keep all generated
numbers in a hashtable, and make sure you get enough distinct.

of
h*******e
发帖数: 225
43
that's a different problem. there's a well-known technique to generate say
600 numbers from 1 to 1000 uniformly. for simplicity, you can just use stl's
random_shuffle to get a random permutation of 1 to 1000, and use the first
600 numbers.

of
r****t
发帖数: 10904
44
U use python for such problems?
lines = open("file","r").read()
mylines = random.sample(lines, int(len(lines)*0.6))
...(do whatever u want to mylines)

sampling
,
r****t
发帖数: 10904
45
另外一个办法 (不用知道一共有几行,magicfat 的启发) 是,
如果行数比较多,根据大树定理
你从头读到尾,对每一行以 60% 的机会选出应该也是可以的,只是最终你得到的行数
接近 60%, 可能不能完全等于某个指定的行数,这时候你甩掉多余的行,或者回头找
几行也行(这个最终处理比较麻烦,但是你可能更本不需要拿出精确的行数?
def select(line):
.... if randome()<= 0.6:
........ return line
....lese:
........ return False
mylines = ifilter(select, open("myfile"))
这样 mylines 是个 iterator, 这个code 不会把整个文件读入内存,所以可能 memory 上
面节省一些。缺点是不能得到精确的行数,要求 60% 基本上得到 60%, 但是多几行少几行都可能。

sampling
,
r****t
发帖数: 10904
46
stupid me. 这么写比较傻, 不喜欢搞 one-liner。但是下面足够了(python >=2.5):
mylines = ifilter(lambda x: x if random()<=.6 else False,
....................open("myfile"))
t****t
发帖数: 6806
47
STL algorithm is ... algorithm only. randomness is not a part of the shuffle
algorithm.
r**3
发帖数: 222
48
来自主题: Programming版 - multiple random number generator
请问怎么用C++实现多个相互独立的random number generator?
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)