Welcome to the Lounge

For lazing about and discussing anything in a software developer's life that takes your fancy.
The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct and please don't post ads.

Technical discussions are welcome, but if you need specific help please use the programming forums.

You must Sign In to use this message board.
 Search this forum Profile popups    Spacing RelaxedCompactTight   Noise Very HighHighMediumLowVery Low   Layout Open AllThread ViewNo JavascriptPreview   Per page 102550   Show Last VisitLast DayLast WeekLast MonthLast 3 MthsLast 6 MthsLast YearAll
 Re: My Lucky Day Richard Deeming 27 Feb '13 - 5:42
 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 Sign In·View Thread·Permalink
 Re: My Lucky Day Rage 27 Feb '13 - 5:51
 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 Sign In·View Thread·Permalink
 Re: My Lucky Day Colin Mullikin 27 Feb '13 - 8:18
 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 Sign In·View Thread·Permalink
 Re: My Lucky Day bVagadishnu 27 Feb '13 - 10:17
 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? Sign In·View Thread·Permalink
 Re: My Lucky Day S Houghtelin 27 Feb '13 - 4:23
 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. Sign In·View Thread·Permalink
 Re: My Lucky Day wizardzz 27 Feb '13 - 5:38
 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.) Sign In·View Thread·Permalink
 Windows Explorer and the Slow Server [modified] Dave Calkins 27 Feb '13 - 3:11
 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. Sign In·View Thread·Permalink
 Re: Windows Explorer and the Slow Server Brisingr Aerowing 27 Feb '13 - 3:40
 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 DoleThe internet is a great way to get on the net. 2.0.82.7292 SP6a Sign In·View Thread·Permalink
 Re: Windows Explorer and the Slow Server Dave Calkins 27 Feb '13 - 4:18
 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. Sign In·View Thread·Permalink
 Re: Windows Explorer and the Slow Server Dave Calkins 27 Feb '13 - 4:21
 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. Sign In·View Thread·Permalink
 Re: Windows Explorer and the Slow Server Dave Calkins 27 Feb '13 - 4:24
 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. Sign In·View Thread·Permalink
 Re: Windows Explorer and the Slow Server Brisingr Aerowing 27 Feb '13 - 4:35
 Teracopy[^]? Bob DoleThe internet is a great way to get on the net. 2.0.82.7292 SP6a Sign In·View Thread·Permalink
 Re: Windows Explorer and the Slow Server Dave Calkins 27 Feb '13 - 5:28
 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. Sign In·View Thread·Permalink
 Re: Windows Explorer and the Slow Server Brisingr Aerowing 27 Feb '13 - 6:12
 Teracopy can actually be configured as the default copy handler for shell copy operations. Bob DoleThe internet is a great way to get on the net. 2.0.82.7292 SP6a Sign In·View Thread·Permalink
 Re: Windows Explorer and the Slow Server Dave Calkins 27 Feb '13 - 7:07
 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. Sign In·View Thread·Permalink
 Re: Windows Explorer and the Slow Server Brisingr Aerowing 27 Feb '13 - 7:20
 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 DoleThe internet is a great way to get on the net. 2.0.82.7292 SP6a Sign In·View Thread·Permalink
 Re: Windows Explorer and the Slow Server Roger Wright 27 Feb '13 - 5:47
 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. Sign In·View Thread·Permalink
 Re: Windows Explorer and the Slow Server Brisingr Aerowing 27 Feb '13 - 6:13
 Windows Explorer != Internet Explorer   Windows Explorer == File Manager   Internet Explorer == Buggy HTML Renderer used only to download an actual Web Browser, like Chrome. Bob DoleThe internet is a great way to get on the net. 2.0.82.7292 SP6a Sign In·View Thread·Permalink
 Re: Windows Explorer and the Slow Server AspDotNetDev 27 Feb '13 - 6:10
 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. Thou mewling ill-breeding pignut! Sign In·View Thread·Permalink
 Anybody this nerdy out there? Johnny J. 27 Feb '13 - 2:13
 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 Sign In·View Thread·Permalink
 Re: Anybody this nerdy out there? Pete O'Hanlon 27 Feb '13 - 2:14
 My wife is smarter than me in all ways, but one. She agreed to marry me. I was brought up to respect my elders. I don't respect many people nowadays. CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier Sign In·View Thread·Permalink
 Re: Anybody this nerdy out there? Nagy Vilmos 27 Feb '13 - 2:45
 ---"--- Reality is an illusion caused by a lack of alcohol Sign In·View Thread·Permalink
 Re: Anybody this nerdy out there? Marcus Kramer 27 Feb '13 - 2:50
 Funny thing. That's what she said... I wasn't, now I am, then I won't be anymore. Sign In·View Thread·Permalink
 Re: Anybody this nerdy out there? Tobi the Terrible 27 Feb '13 - 3:21