« first day (1203 days earlier)      last day (2813 days later) » 

7:02 PM
@Mat'sMug GenericExtensions.MatchWhen(...)?
No, still not right.
 
Note to self: avoid refactoring over lunch. That ref input is superfluous
 
GRAH
 
@EBrown it needs to convey that it's returnimg a key, somehow
 
Yeah.
 
FindKey?
 
7:03 PM
GenericExtensions.KeyWhen()
@Mat'sMug That might work.
Need to post it up for review, maybe I'll get suggestions then. :P
Gah, time for work.
@Mat'sMug Question posted.
Feel free to edit it as appropriate.
 
1
Q: Return a key when a function returns true

EBrownI've no idea what to call this, so I called it Classify since that's how I use it. Basically, the idea is to pass a Dictionary<TResult, Func<TValue, bool>> which is evaluated for an input, and the first Func<TValue, bool> returning true will return the TResult key. public TResult Classify<TValu...

 
7:22 PM
@Hosch250 Yeah, I like the one I accepted the answer on. Thanks!
 
7:34 PM
I've got an answer from SO on my code ... The world is kidding. Only my compiler is wrong. Not even the compilers with the same version. It seems like my luck has no bounds
 
@EBrown you've been mugged
return classifications.FirstOrDefault(item => item.Value.Invoke(input)).Key;
 
@Mat'sMug That works for that method. :)
 
Is this something for you, @Mat'sMug?
 
oh FML
man, some people have LOTS of time to waste
 
0
Q: Swing Game EyeHandCoordination

LegateQuestion copied from the book: (Game: eye-hand coordination) Write a program that displays a circle of radius 10 pixels filled with a random color at a random location on a panel, as shown in Figure 16.28c. When you click the circle, it disappears and a new randomcolor circle is displayed at ano...

 
7:50 PM
You're right - I think that should be OK for this field, but I'm under policy restrictions and that won't pass code review. If performance limitations persist though, then I might pursue an exemption. — Jeff Puckett II 24 secs ago
 
@Mat'sMug they do indeed.
 
Edited my question in order to better explain my problem / request. As for the reason I am doing this is solely because I need an extension that will be able to execute a webrequest and retrieve the response asynchronously with support for cancellation and time out. — Gregory 48 mins ago
^^ question improved, I think UWYA votes can be retracted
Oh wow that Mario thing in Excel
 
8:10 PM
Naruto answer; accepted non-selfie answer with 0 score: Currency converter using angular.js
 
> About 1000 pictures and some hours of work
 
@RoboSanta, strange indeed
 
0
Q: C# Random unique numbers from a list and count number of occasions

S1ackerthis is my first post here and I'm new to coding so please be gentle with me :) I am currently writing a prototype for my work but I got stock. We are currently broadcasting programs that run in slings of 40 minutes. These slings usually include four ad blocks. An ad block in turn contains four l...

 
@Mat'sMug I guess if someone has that kind of free time, that's about as good a use as another hobby...
 
@CaptainObvious off-topic
@Phrancis I suppose...
talk about misusing Excel though!
Excel is not a database 14-inch monitor!
Within five minutes of the Singularity appearing, somebody will suggest defragging it.
5
 
8:20 PM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Dynamic reports to Laravel view into HTML table
 
Good for code review — innoSPG 25 secs ago
If the OP doubts the code is correct, it is off topic for Code Review. Despite that, if he presents full code and asks for improvement of already working code, it is welcome. — Olzhas Zhumabek just now
 
8:43 PM
@SimonForsberg I'm not sure whether i should be amazed or disappointed in the time that the person spent doing that
 
@DanPantry, I wrote array dimmension appender, although I didn't spend much time.
 
This question appears to be off-topic because it is a code review request. This is better suited to the Code Review Stack Exchange site. Before posting there be sure to read their FAQ to ensure that your question meets their guidelines. — John Conde 23 secs ago
 
Casablanca is a movie
 
.....Fido is a dog?
 
Mat's mug is a mug that belongs to Mat.
 
8:59 PM
This question could be suitable for Code Review, as long as (a) your code works as intended, (b) your code is real code, rather than example code, and (c) your code is included in the body of the question. If you wish for a peer review to improve all aspects of your code, please post it on Code Review. — Mike McCaughan 42 secs ago
 
9:22 PM
@N3buchadnezzar is it pretty rare for a propositional function to take 3 arguments? e.g., \$\exists y \exists x \forall z F(x,y,z)\$ ?
Would something like this more often be broken down in 2 (or more) functions?
 
@Phrancis No idea. I do not see any problems with a function with more arguments. It would just be a line in 3d space.
Never encountered it though.
 
I guess it would really depends on the context/environment eh
 
@jsuth Bounty awarded.
 
9:49 PM
@Mat'sMug I left a comment on your answer.
 
10:05 PM
0
Q: WAKE UP! Python readability on CodingBat alarm clock

BrainFRZI'm brand new at Python, but I've been working in general at granulating my functions and being as self-readable as possible without suffering readability. This CodingBat question is a little interesting because it demands a function with a lot of repetitive case checks. I decided, rather than ha...

 
10:26 PM
@CaptainObvious No, time for ZZZ. I need to use the sleep, please let me use the sleep.
 
Woot! I won!
 
@Mat'sMug Won what?
That sure isn't a very good image, BTW.
 
@Hosch250 Best photography of the year.
lol
 
Aye, from some MSE contest about a year ago - I had given up all hope of being one of the 30 winners of Spolsky's book =)
 
that's right, JNat updated the progress question saying he finished shipping the books
 
10:37 PM
Witch contest?
 
10M questions meta IIRC
 
That is quite an impressive numbers of questions to post / answer on meta indeed.
Congratulations!
 
it was later than that one, it was just an end-of-year thing: meta.stackexchange.com/questions/271359/…
 
@N3buchadnezzar lol no, it was when SO reached 10M questions last year, remember #SOReadyToHelp?
Oh
 
Yeah! I remember that.
 
10:46 PM
@Hosch250 smartypants :-)
Oh, OK. Would you like me to try that? Set classifications to null for starters. — Hosch250 20 mins ago
 
11:02 PM
0
Q: Spawning nodes with random time interval in SpriteKit

RankoRI want to spawn objects with random time interval (from 1 to 3 seconds). I've wrote this function: func scheduleAddingLiquid() { let wait = SKAction.waitForDuration(NSTimeInterval(getRandomNumber(1, end: 3))) let block = SKAction.runBlock({ [unowned self] in ...

 
Do any of you folks know if there's an implementation of fast NMS for C++?
I don't want to have to transcribe that code myself
I got olympic games to watch and myself to feed
 
@Mat'sMug is the iteration order of a Dictionary even guaranteed???
 
@Vogel612 I don't think so.
On the other hand, I'm pretty sure it won't change now.
Too many people rely on it as being guaranteed.
 
that's ... dangerous
In java I know there's some implementations that guarantee iteration order..
 
Yup, that's right.
 
11:14 PM
@Vogel612 nope. But OP didn't care either. But yeah it's a good point, I just added it to my answer - thanks for the reminder! :-)
 
Jon Skeet explicitly mentions to not rely on it in Appendix B.
 
There's the interface SortedMap ... I like where this is going
 
Well, .NET has SortedList and SortedDictionary, both of which are dictionaries.
Mosquitos are bad enough, but they don't need to play dirty and come to bed with me.
I reserve that privilege for my dog.
 
0
Q: Batch file to upgrade and patch SQL Server DBs

carlossierraThis is my first windows batch file. The script basically goes through this basic flow of tasks, in order to update some specific SQL Server DBs to a new DB version: Backup all SQL server DBs that will be upgraded. Upgrade to the latest version and apply any last-minute patches to those DBs. ...

 

« first day (1203 days earlier)      last day (2813 days later) »