473,883 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

rolling dice

Let's say I have m dice having n sides, such that n^m is not going to bust
int as a datatype. With m=4 and n=6, an outcome might be {2, 5, 1, 2}.
What is a good way to represent this in c so that I can check cases by brute
force? EC
Sep 30 '06
101 6441

"Richard Heathfield" <in*****@invali d.invalidwrote in message
news:LL******** ************@bt .com...
Bill Reid said:

<snip>
>>
Not only did he not call a halt to the proceedings, he seemed to
want to "egg them on".

Well, no. There is nothing between the lines here. I was simply impressed
by
the measured response Rod Pemberton was giving at that point. I don't know
or care enough about the stock market to know whether he was right or
wrong, but he was arguing, it seemed to me, rationally and sensibly.
I think that the interesting threads are the ones that get *a little* OT at
times. Continuing on a conversation that has become personal in a bad way
argues for keeping topicality in a straightjacket.

We pretend we're in a room together. If these words were said in a room,
they'd be fightin words, well before the posts reached 17k in length. This
means that the two persons would either fight, or others would say "pipe
down, ladies." Neither party displayed the nobility of walking away.

I love Dr. Charles Shirkey. When asked about the stock market he had only
one response: "buy low, sell high." EC

Oct 20 '06 #91

"Bill Reid" <ho********@hap pyhealthy.netwr ote in message
news:Fz******** *************@b gtnsc05-news.ops.worldn et.att.net...
>
Rod Pemberton <do*********@bi tfoad.cmmwrote in message
news:eh******** **@main.corriga .net...
"Bill Reid" <ho********@hap pyhealthy.netwr ote in message
news:Wt******** ***********@bgt nsc04-news.ops.worldn et.att.net...
Rod Pemberton <do*********@bi tfoad.cmmwrote in message
news:eh******** **@main.corriga .net...
"Bill Reid" <ho********@hap pyhealthy.netwr ote in message
news:Ly******** ***********@bgt nsc04-news.ops.worldn et.att.net...
>
Shorting
and the short interest you see could be simulated by other
executions
services.
>
Uh-oh, I don't like where this is going...man, do you have a hard
head.
Never say die, eh?
>
Of course, shorting is done by brokers, not by exchanges. This is
true of ALL short sales, not just NASDAQ. As far as the exchange
is concerned, it's just another transaction, aside from any member
broker restrictions or SEC rules governing how brokers may implement
short sales.
>
Like I said, I'll look it up someday... Or, you could point me
to the press release on one of NASDAQ websites.

OK, here it is:
>
10/16/2006 (Rootyrs) - In a surprise move, NASDAQ today
announced that brokers may now continue to provide short sale
transactions to customers just as they have since the inception of
NASDAQ in the '70s. There was widespread doubt that they
would continue to allow the popular practice because some
Usenet kook claimed that NASDAQ didn't allow short sales
in a goofy post. In related news, God is considering switching
the period in which the sun shines to nighttime...
>
Amazing, you declare it to be true, me to be false, and yet, the
_simple_
task of posting something proving your truth eludes you... I see why
they
called you "Reidiot": no basis in fact.
OK, you want a "press release", here it is. I got this "press release"
from NASDAQ by typing "NASDAQ short sales" into the "Search"
box of http://www.google.com, and it was the second unsponsered
link (note that all the top links are from the http://www.nasdaq.com
web site which provide the current and historical NASDAQ "short
interest" that you claim doesn't exist). This is something that an
eight-year-old girl could and would do in a matter of seconds to
ascertain a "fact", but seems to completely elude you, you "profession al
programmer", you:
WRONG! It doesn't elude me. As I told you, I wasn't interested in looking
it up at the current time. I clarified the timeframe for you at your
request, and I told you I'd look it up at my leisure, but you ruthlessly
continued to pursue this aspect of the conversation. In which case, it's
completely up to you to PROVE your case to me.
http://www.nasdaq.com/newsroom/news/...tion06_113.stm
For more information on NASDAQ Short-Interest positions, including
publication dates, visit www.nasdaqtrader.com/asp/short_interest.asp.
Ten posts later, it appears you finally _may_ have managed to do so. I
still look it up and read it at my leisure.
I've asked you to take this discussion somewhere else more
appropriate...
What discussion? I've tried discussing things with you but, until this last
post, there has only been _insults_ on your part. No discussion. If you
_actually_ want to discuss stocks or companies with me, which you haven't
been interested in so far, you can tell me so here.
Although your "profession al programmer" colleagues
<snip>

If you had chosen to discuss stocks or companies, instead of insulting me,
you could've steered the conversation to any number of topics that might've
interested you: Buffet, Trump, Munger, DeBeers, Yukos, etc... I *left*
*the* *door* *open* by not insulting you to the same degree as you did to
me. Normally I would've ripped someone as verbally abusive as you to
shreds. Don't even try to blame me for your alcoholic behavior.
Rod Pemberton
PS. If I wanted to post to misc.invest.sto cks, I'd have already subscribed.
Oct 20 '06 #92
"Rod Pemberton" <do*********@bi tfoad.cmmwrites :
[snip]
PS. If I wanted to post to misc.invest.sto cks, I'd have already subscribed.
If you wanted to post to comp.lang.c, you'd talk about the C
programming language.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Oct 20 '06 #93

"Keith Thompson" <ks***@mib.orgw rote in message
news:ln******** ****@nuthaus.mi b.org...
"Rod Pemberton" <do*********@bi tfoad.cmmwrites :
[snip]
PS. If I wanted to post to misc.invest.sto cks, I'd have already
subscribed.
>
If you wanted to post to comp.lang.c, you'd talk about the C
programming language.
I do post to comp.lang.c. I do post about the C language. And, don't even
try to tell me you haven't been involved in any "Off-Topic" posts lately.
I've seen at least four in you joined in on the past month.
Rod Pemberton
Oct 21 '06 #94

Keith Thompson <ks***@mib.orgw rote in message
news:ln******** ****@nuthaus.mi b.org...
"Rod Pemberton" <do*********@bi tfoad.cmmwrites :
[snip]
PS. If I wanted to post to misc.invest.sto cks, I'd have already
subscribed.
>
One of the surest signs of applied intelligence is the ability to "predict"
the future. I set the "followup to" header of the post to which he
responded
to misc.invest.sto cks, but as I surely and correctly predicted, his reply
post never showed up there.

This simple prediction of human behavior made me no money. My
predictions of human FINANCIAL INSTRUMENT TRADING behavior,
on the other hand...
If you wanted to post to comp.lang.c, you'd talk about the C
programming language.
There you go. Mr. Thompson, you are a scholar and a gentleman.
As for this thread, it was ridiculous from the start and degenerated
from there to a point where it isn't even funny anymore, which is the
REAL deal-killer for me...

---
William Ernest Reid

Oct 23 '06 #95

Richard Heathfield <in*****@invali d.invalidwrote in message
news:LL******** ************@bt .com...
Bill Reid said:

<snip>

Not only did he not call a halt to the proceedings, he seemed to
want to "egg them on".

Well, no. There is nothing between the lines here. I was simply impressed
by
the measured response Rod Pemberton was giving at that point. I don't know
or care enough about the stock market to know whether he was right or
wrong, but he was arguing, it seemed to me, rationally and sensibly.
Hmmmm...maybe. Maybe at the time of that post. BIG maybe...

Problem is, even if there might have been "reasonable doubt" at
that point, no "rational" person could conclude anything other than
he is a "classic" Usenet whack job from his later posts. When
confronted with links that disprove what he says, he claims "that
doesn't prove anything", then he goes on a "stalking" expedition to
"prove" he's right by personally slandering his "enemy". He
makes misstatements of fact that can be verified by just by
reading the thread, no "stock market knowledge" needed.
Then when confronted even more links, he claims he will
"check them out at his leisure" after investing a substantial
amount of time stalking, slandering, and presenting yet even
more outrageously incorrect "facts", and outright refuses
to post in the correct group for the topic.

I correctly identified him as a whack job from the get-go,
but I did have the advantage of "stock market knowledge"
that allowed me to realize that he made several misstatements
of fact within the space of a mere paragraph. I know from
long experience that doesn't happen by mere accident or
inadvertance, but as a result of life-long mental pathology.
TRULY rational and reasonable people have either innate
or ingrained "epistomologica l control" and don't speak
wildly "out of school" on matters of easily verifiable fact...

You seem to think that "special knowledge" is required
to separate the "men from the loons", and that may actually
be true in your case. In my case, since I am much more of
a "people person", I can spot them very quickly just based
on a few generalized behavioral cues...

---
William Ernest Reid

Oct 25 '06 #96
Bill Reid said:

<snip>
>
You seem to think that "special knowledge" is required
to separate the "men from the loons", and that may actually
be true in your case. In my case, since I am much more of
a "people person", I can spot them very quickly just based
on a few generalized behavioral cues...
I just prefer to give people the benefit of the doubt. Sometimes, it reaps
dividends (pun not intended, btw). Sadly, this doesn't happen as often as
I'd like.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Oct 25 '06 #97
"Bill Reid" <ho********@hap pyhealthy.netwr ites:
[...]
You seem to think that "special knowledge" is required
to separate the "men from the loons", and that may actually
be true in your case. In my case, since I am much more of
a "people person", I can spot them very quickly just based
on a few generalized behavioral cues...
Good for you. Congratulations . Whoop-de-doo. I am in awe of your
loondar.

Now can you *please* go separate the men from the loons somewhere
else? We discuss C here.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Oct 25 '06 #98

"Bill Reid" <ho********@hap pyhealthy.netwr ote in message
news:Pa******** *************@b gtnsc04-news.ops.worldn et.att.net...
>
Richard Heathfield <in*****@invali d.invalidwrote in message
news:LL******** ************@bt .com...
Bill Reid said:

<snip>
>
Not only did he not call a halt to the proceedings, he seemed to
want to "egg them on".
Well, no. There is nothing between the lines here. I was simply
impressed
by
the measured response Rod Pemberton was giving at that point. I don't
know
or care enough about the stock market to know whether he was right or
wrong, but he was arguing, it seemed to me, rationally and sensibly.
Hmmmm...maybe. Maybe at the time of that post. BIG maybe...
Healthfield's statements were correct. My response to your delusions and
self-aggrandizement were controlled and measured.
he is a "classic" Usenet whack job
You can read many informative posts from me on C, assembly, OS development,
MS-DOS, code porting, parsing/lexing, etc. by just searching for them.
I did have the advantage of "stock market knowledge"
Feel free to school us on "stock market knowledge," if you think you have
some. (Try fitting that statement into your MBTI wordlist.) Why are you
afraid to reveal financially useful information to us? Buffett and Trump
both do so. Wouldn't you be happy if you enriched others by helping them to
make money off your ideas? Do you believe your ideas will be devalued and
become worthless if you reveal them?

As I stated, you could've easily shifted the conversation to almost
anything: nature, politics, religion, sex, cars, computers, weapons, C,
engineering, psychology, Buffet, Gates, Machiavelli, Sun Tzu, etc., or
perhaps a topic you'd prefer: stocks, business, finance. But, you chose to
forgo the opportunity and continue to do so. Why? Pick one: 1) alcoholic
2) mid-life crisis 3) under-educated 4) under-employed 5) cheap house 6) bad
marriage 7) a life you hate 8) lost money in the stock market 9) scared 10)
just like arguing for the sake of it
TRULY rational and reasonable people have either innate
or ingrained "epistomologica l control"
BTW, it's epistemological . Perhaps, you rhymed epistemological with
"apostolic" or "pistol"... Was that a "Freudian slip?" Unfortunately, you
aren't interested in epistemology either, or you'd post something I'd be
interested in, just to study my response. Responses to topics of
programming, C, or maybe religion, might provide you with the clarification
you seek. I can't believe you're just checking my correct spellings and
misspellings. If so, there's an abundance of both for you to peruse.

But, until you do post something I'm interested in, you have no power. The
usual definition for power is: the ability to control or influence the
actions of others. But, there is a flaw in that definition. The definition
is exclusively extroverted. But, power is bidirectional. So, it fails to
cover introversion. So, how would one write an introverted definition of
power? An introverted definition of power might be: the ability to prevent
others from influencing or controlling oneself. You've grasped the first.
Now, try the second. Of course, this assumes that you're not already
influencing or controlling yourself by accepting the truth as truth. Given
your self-aggrandizement and total lack of a super-ego, I could see why you
could have a problem with it.
and don't speak
wildly "out of school" on matters of easily verifiable fact...
My statements were fact for the stated time period, clarified at your
request (See how nice I am? Or, at least, how measured and controlled I'm
being when being called lair by an ignoramus.).
since I am much more of
a "people person",
Considering that most of what you posted would qualify as verbal abuse, I'll
declare that to be patently false.
Rod Pemberton

Oct 26 '06 #99

Warning: Follow-ups set to "alt.usenet.koo ks", where the whole
"discussion " belonged in the first place...

Elijah Cardon <in*****@invali d.netwrote in message
news:12******** ****@corp.super news.com...
"Richard Heathfield" <in*****@invali d.invalidwrote in message
news:LL******** ************@bt .com...
Bill Reid said:

<snip>
>
Not only did he not call a halt to the proceedings, he seemed to
want to "egg them on".
Well, no. There is nothing between the lines here. I was simply
impressed
by
the measured response Rod Pemberton was giving at that point. I don't
know
or care enough about the stock market to know whether he was right or
wrong, but he was arguing, it seemed to me, rationally and sensibly.
I think that the interesting threads are the ones that get *a little* OT
at
times.
A LITTLE is the acceptable amount of OT for Usenet discussion groups,
and the "interest" level is inversely proportional to the amount of OT.
Think
what the whole point is of having thousands of separate groups divided
by topics; that imputed purpose CAN'T be served by allowing rampant
OT discussions to occur.

But you can't stop them, so whaddya gonna do? Just accept that
the unmoderated Usenet is far different in current incarnation than
what was envisioned by "altnet" in the 1980s (far lower percentage
of people here with top-secret security clearances, filtered out
at least a few of the kooks?).
Continuing on a conversation that has become personal in a bad way
argues for keeping topicality in a straightjacket.
Ad hominen is always a poor rhetorical device in any event, right
up there with every other logical fallacy...
We pretend we're in a room together. If these words were said in a room,
they'd be fightin words, well before the posts reached 17k in length.
If I called Charles Manson a murderer, he'd probably get "agitated" (he
usually does when called a "murderer", but he's always "agitated" so who
can tell?). Problem is: he's been convicted of first-degree murder, so
he has no "right" to be angry about it. Same with convicted child
molestors,
theives, drunk drivers, et. al.

By the same token, calling a classic Usenet kook a "Usenet kook" is
bound to get a reaction...but said kook gains not one ounce of RATIONAL
dignity by being correctly so labeled, just as the judge who sentenced
Charlie Manson isn't a "dirty dog" for doing so (though Charlie physically
attacked him once in court, that doesn't constitute a "fight").
This
means that the two persons would either fight, or others would say "pipe
down, ladies."
In the case of Charlie Manson, there would never be a "fight", because
the prison guards would jump on him even if he was behind bullet-proof
glass from his "enemy". It's a one-person "fight", maybe it's with God
in the final analysis...
Neither party displayed the nobility of walking away.
Hey, TV reporter needs some good quick cheap ratings, go interview
Charlie Manson. Charlie does his part doing his "crazy act", everybody
is entertained, the people he killed are still dead. Truth is, I LOVE
all the whacky nonsense that comes out of Charlie...but really, it's a
crying shame he got out of the death penalty on a technicality. He
really should just be dead and be done with it, despite his amusing
shenanigans...
I love Dr. Charles Shirkey. When asked about the stock market he had only
one response: "buy low, sell high." EC
Sorry, the discussion was about SHORT SALES, so it should
be "sell high, buy low"...try to stay on topic, please...

---
William Ernest Reid

Oct 27 '06 #100

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1965
by: lawentzel | last post by:
I am new to PHP and am an avid RPG gamer. I am looking to use PhpMyChat to be able to game with friends all over the US. With that having been said, PhpMyChat seems to offer a lot of what I am looking for. It allows you to send a message to individual players (chatters). It allows for actions using "/me". The only thing it really needs is the capability to do a dice roll. Can someone point me to a site which might have some examples...
4
6387
by: dpp4669 | last post by:
I need help with writing a program to use randmax and the standard deviation when u roll the dice 10000 times I know you will need the standard dev. and the average where do i put the randmax and do i use 1+6 after it ? LOST!
17
9621
by: Jose Durazo | last post by:
Hello, I'm doing an exercise to simulate rolling a pair of dice 36,000 times, then count and display how many times the simulation rolls each possible sum. For some reason each time I run my simulation, one or more of my sums is zero, which is highly unlikely. So I'm sure there's a bug in my code. But I can't tell what it is, even after re-reading it several times. Can someone give me a hint? Here is my code:
4
4136
by: vegtard | last post by:
simple question. is it possible to write a script that rolls a six sided dice? if this is possible, is it possible to tell it to roll the six sided dice 4 times and ignore the dice that rolled the lowest score? if you want to know, i am working on a script to create a dungeons and dragons character :)
2
3402
by: sunnydude | last post by:
Anybody know how to write a 3 dice rolling program like this Sample output Welcome to the dice roller! First of all, please enter a seed for the random number generator. This should be a positive integer: 3 How many times would you like me to roll the 3 dice?
2
6492
by: cowboyjeff05 | last post by:
the question is 1) build a Die class (6 sided). Then create a driver that tests your class. Start with one die in your driver then add a second die and notify the user and count when he or she rolls 7, 11, or a double. When the user is done rolling, output the results of the session. Create a child class from the Die class called MultisidedDie. This die should allow the programmer using the class to decide how many sides the die has. ...
0
9933
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9786
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11125
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10836
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9568
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7962
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7114
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
4211
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3230
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.