 |

|
Rage wrote: You mean (7 - n)/6.
Sorry, I was thinking in zero-based steps but writing in one-based steps.
Rage wrote: I am still not convinced, though.
OK, you'd need a bag of 3420 M&Ms for the probability to round to 1.5%; a bag of 12 would give you 6.9%:
void Main()
{
for (int i = 6; i <= 3996; i += 6)
{
Console.WriteLine("Bag of {0}: {1:###0.0%}", i, NomNomNom(i));
}
}
static double NomNomNom(int bagSize)
{
int remainder = bagSize % 6;
if (remainder != 0) bagSize += 6 - remainder;
int numberOfEachColor = bagSize / 6;
double otherColorsRemaining = bagSize;
double remaining = bagSize;
double result = 1D;
for (int step = 0; step < 6; step++)
{
result *= otherColorsRemaining / remaining;
otherColorsRemaining -= numberOfEachColor;
remaining -= 1;
}
return result;
}
I'm not sure how big the American bags get, so that might be a totally normal bag size!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|

|
Mmmhh... I think you are right.
Moreover, the number of M&Ms you need to pick to get all colors would be in average 14.7
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|

|
Richard Deeming wrote: ...a bag of 3420 M&Ms ... I'm not sure how big the American bags get, so that might be a totally normal bag size! That's actually one serving size. A bag contains about 3.5 servings.
The United States invariably does the right thing, after having exhausted every other alternative. -Winston Churchill
America is the only country that went from barbarism to decadence without civilization in between. -Oscar Wilde
Wow, even the French showed a little more spine than that before they got their sh*t pushed in.[^] -Colin Mullikin
|
|
|
|

|
Richard Deeming wrote: with an even distribution of colours,
This is definitely not the case. I bought two bags in a row with no red ones.
M&M color distribution [^]
Schenectady? What am I doing in Schenectady?
|
|
|
|

|
Don’t buy the ticket, your luck is already been used up for the M&Ms. You should have bought the lotto ticket instead of the M&Ms.
Story of most peoples lives, when you do get lucky, it's not the kind that benefits you significantly… aw shoot, buy the ticket!
It was broke, so I fixed it.
|
|
|
|

|
Just be happy you didn't pull out any Skittles, which is a good prank btw (combining m&m&s's in a bowl for unsuspecting snackers.)
|
|
|
|

|
I think every version of Windows has had this issue going back as far as I can remember. When trying to copy a file from a remote file server and the connection is less than stellar Explorer will hang. This happens often enough that you have to scratch your head and wonder why.
This even applies to Windows 8. Just tried copying a file from a work server over VPN on the laptop and, sure enough, Explorer hangs and becomes unresponsive. its like the connection isn't great and/or the server isn't responding, which happens, but explorer will just hang in these situations. Then, it'll also hang when you attempt to cancel it. Not sure what's going on, maybe the remote server isn't sending back the response Explorer (or the SMB subsystem) is waiting for.
Its enough to make you want to write your own SMB client or something Seems like this issue persists through every new version of Windows as well. Is there some magic setting I'm missing? I wonder if Samba experiences this same sort of behavior?
modified 27 Feb '13 - 9:30.
|
|
|
|

|
Try Explorer++[^]. I am not sure if it will work (I have never had a bad connection to a server), but it has a lot of super cool features.
There is also a Portable Version[^].
Bob Dole The internet is a great way to get on the net.
 2.0.82.7292 SP6a
|
|
|
|

|
Just tried it -- same thing as Windows Explorer. I typed \\servername in the top field and the app just hung and became completely unresponsive. I think the server isn't responding promptly, but just as with Windows Explorer the app completely hangs as a result for some reason. Thanks for the suggestion though, it still looks like a nice utility to have.
|
|
|
|

|
Also, after waiting for the list of files to show, I tried copying a file to my local machine (same one I was trying to get to before). I noticed the standard Win8 progress window pop up and the app behave the same way as Explorer. App completely hung and the copy was sort of stalled or something. I tried cancelling and the cancel request hung too.
I think Explorer++ just uses the regular windows file copy which is whats having the problem so using Explorer++ doesn't really help.
|
|
|
|

|
Also, when you open a new tab and type in \\servername the rest of the app is unusable while its talking to the server. You can't switch to another tab and work with local files while its attempting to get the file list from the server. All these replies to simply say, its the same issue as with Windows explorer.
|
|
|
|

|
Teracopy[^]?
Bob Dole The internet is a great way to get on the net.
 2.0.82.7292 SP6a
|
|
|
|

|
Nice! Thanks for the link. Just tried it and it looks like it'll be a nice tool to have in the tookit. Granted, by the time I tried it the network issue was resolved and the copying is fine now. But I'll definitely pull it out if I run into this again and see how it handles it.
|
|
|
|

|
Teracopy can actually be configured as the default copy handler for shell copy operations.
Bob Dole The internet is a great way to get on the net.
 2.0.82.7292 SP6a
|
|
|
|

|
Looks like that happens automatically when you install it. After installing I tried copying another file from the server via copy/paste and TeraCopy jumped in and did it.
|
|
|
|

|
You had to enable that in an older version, it wasn't enabled by default. Haven't used it in a while, so I did not know that.
Bob Dole The internet is a great way to get on the net.
 2.0.82.7292 SP6a
|
|
|
|

|
Dave Calkins wrote: like the connection isn't great and/or the server isn't responding, which happens, but explorer will just hang in these situations
It's well known that Internet Explorer sucks; apparently it doesn't suck hard enough to complete the file transfer, though.
Will Rogers never met me.
|
|
|
|

|
Windows Explorer != Internet Explorer
Windows Explorer == File Manager
Internet Explorer == Buggy HTML Renderer used only to download an actual Web Browser, like Chrome.
Bob Dole The internet is a great way to get on the net.
 2.0.82.7292 SP6a
|
|
|
|

|
It's even worse on Macs. Whenever my coworkers encounter network issues (which happens a lot), crazy things happen. They have to force quit things, and sometimes restart.
Seriously, you'd think they could build in a little fault tolerance and maybe background processing so a network issue doesn't block the UI.
|
|
|
|

|
Nerdy proposal or????[^]
I'm glad I don't have the problem with my spouse being way smarter than me...
Why can't I be applicable like John? - Me, April 2011 ----- Beidh ceol, caint agus craic againn - Seán Bán Breathnach ----- Da mihi sis crustum Etruscum cum omnibus in eo! ----- Just because a thing is new don’t mean that it’s better - Will Rogers, September 4, 1932
|
|
|
|

|
My wife is smarter than me in all ways, but one. She agreed to marry me.
|
|
|
|

|
---"---
Reality is an illusion caused by a lack of alcohol
|
|
|
|

|
Funny thing. That's what she said...
I wasn't, now I am, then I won't be anymore.
|
|
|
|

|
You made my day with this!!
|
|
|
|
|
 |