« first day (784 days earlier)      last day (3234 days later) » 

12:00 AM
RELOAD!
 
INTERRUPT
 
There are 1411 unanswered questions (94.3356% answered)
 
Damn. It's going up.
 
Jun 1 at 0:01, by Simon André Forsberg
@Duga Killing 5 zombies a day would keep @Duga away.
2
 
@SimonAndréForsberg Aren't zombies protected as a minority?
 
12:08 AM
Home, at last
 
This question is off-topic for many reasons: it's not your own code, there's no code in the question, you're asking for code to be written, and you're not asking for a code review. — 200_success ♦ 17 secs ago
 
@200_success Thanks for that comment. I was considering using a custom close reason myself.
 
12:26 AM
How would you solve this particular problem in SQL? — 200_success ♦ 9 hours ago
@200_success the OP posted example input and output, so I will give this a try in SQL and see how it goes!
 
Is this correct?
0
A: Query the context or resulting list

Hosch250There are a few potential issues here, speed and accuracy in particular. Speed The cache is often faster than querying a value directly because of computation - you need to input, process, calculate, and output values. For example, when you search the web, the servers return results based on c...

Thanks, santa. I take it you agree with me.
 
You're welcome!
 
Oh boy. A user thought I had answered the question, but I had edited it.
 
Heh. Lol
 
Anyone notice the rainbow logo? :)
 
12:35 AM
@Jamal Replied to tweet
@Phrancis Yes, and I like it.
 
Makes me very happy this ordeal is finally over with :)
 
Watched that video, and it totally was awesome.
 
@EthanBierlein Literally LOL!!
 
Ikr. The part with the grandma was the best.
 
@Jamal a) That's when you ping @Lyle'sMug and say that it was his answer. b) Nice of a user to tweet you!
 
12:41 AM
Hello @RubberDuck
 
@SimonAndréForsberg Second time, actually. :-) Fortunately, I have not yet been scolded at for a moderator action.
 
can't wait for Monday nah, seriously... let it be weekend.
@SimonAndréForsberg user-to-be actually!
 
Schauen Sie! Es ist eine andere crappy Übersetzung von Englisch nach Deutsch! Um Sie von der Magie der Google Translate gebracht!
 
Englisch bitte :)
 
@Mat'sMug nein
 
12:53 AM
> Look! It is another crappy translation from English to German! To you brought the magic of Google Translate!
 
picks up eyeballs on the floor
 
@SimonAndréForsberg Das ist, warum ich mit Google Translate! Es bietet die ungenau, dumm, schrecklich Übersetzungen überhaupt!
 
Zombie down:
0
A: Kruskal algorithm implementation for adjacency list represented graph

Jamal Since Vertex just has public members, it can just be a struct. In addition, you don't need to set bVisited to false in two places. It just needs to be done in the constructor. You could also make it an initializer list instead, which is more proper when setting default values for data members...

 
Der Weihnachtsmann hat man belohnt @Jamal
 
12:59 AM
das ist fun and all, but please stick to English in The 2nd Monitor
 
I got my 13'th Revival badge.
Zombie down, too.
 
@Phrancis I'm skeptical. You have a hammer; everything looks like a nail.
 
How to: Log into a website when you only have your user name, the email isn't on file, you forgot your password, and you don't have security questions set up?
I have this issue with my U.
 
call support
or hack into it ;-)
 
1:14 AM
Lol, I'll call support tomorrow.
And, my personal email isn't on file either.
Oh, I guess I could chat tomorrow.
Oh, just went to the page, and you have to log in to do that too.
I bet you have to log in to get ahold of them on the phone.
 
lol that's kinda dumb
 
Actually, I've called them before, you don't have to log in.
It says call 24x7.
I guess I'll try now...
BBL.
 
Another zombie:
0
A: GOF Composite Design Pattern Implementation Using Modern C++

Jamal These #includes: #include<iostream> #include<vector> #include<string> #include<memory> #include<algorithm> look nicer with a space after each #include directive: #include <iostream> #include <vector> #include <string> #include <memory> #include <algorithm> This may also be nit-picky, but ...

 
was it @maaartinus telling me about the trailing comma in list initializers?
        _moduleTypes = new List<DeclarationType>
        {
            DeclarationType.Module,
            DeclarationType.Class,
            DeclarationType.Project,
        };
legal in C# as well!
what an awesome little feature
 
monking
 
1:22 AM
monking!
 
@200_success I can appreciate that sentiment, but I'll do it for fun. I think I'll use MySQL this one time, because creating functions in postgres is such a PITA
I've never used SQLite but I have a feeling it's not really much different from other flavors. Postgres is just very esoteric
 
Monking @Quill
 
Got in.
 
Say, how do I provide parameters to functions stored within dictionaries in Python?
commands = { "new" : self.new_item(data, filename) }
 
@Mat'sMug Right, it was me.
 
1:31 AM
@Quill commands["new"](data, filename)?
(IDK, I don't python)
 
@Mat'sMug Right on
 
yippie!
 
For example:
def f(x):
	return x * x

d = {
	"f": f
}

print d["f"](10)
 
@maaartinus I need to tell R# that this "redundant comma" is there on purpose though :)
@EthanBierlein pretty instinctive
 
@Mat'sMug Instinctive?
 
1:33 AM
2 mins ago, by Mat's Mug
(IDK, I don't python)
 
More faceplam
After all, I am a Python natural. :)
 
except for a terminating semicolon, syntax is identical in C#
well for the retrieval and actual invocation, that is
 
Hmm, sorta.
 
0
Q: Linear Cryptanalysis of a substitution permutation network--performance issues

robertkinI was translating a script I had that would automate linear cryptanalysis of SP networks from python to C++. For those who aren't familiar with crypto, linear cryptanalysis involves finding relationships between certain input and output bits of a 1 -> 1 array. What I'm doing is looping over all ...

 
@200_success Are you going to be around for a bit? Of all people here I know of, you know the most about PostgreSQL, and I just can't wrap my mind around returns from functions... the documentation is not very good IMO
 
1:38 AM
Palmface ^^
 
@Mat'sMug Yup. Mostly the same, except for the type declarations, and syntax of dictionary elements.
Dictionary<string, Func<int, int>> d = new Dictionary<string, Func<int, int>>() {
	{"f", (x) => x * x}
};

Console.WriteLine(d["f"](10));
 
    var d = new Dictionary<string, Func<int, int>>()
    {
	{"f", (x) => x * x}
    };
...and braces :)
 
You darn kids! Back in my day, we had to be explicit, and we didn't have var!
 
how is (x) => x * x explicit?
delegate(int x) { return x*x; };
:p
 
I'm talking about using var over typing out the full type, Dictionary<string, Func<int, int>>
Not about the lambda itself.
 
1:48 AM
yes, and I'm saying if you have anonymous methods and lambdas, you do have var ;-)
 
Ah, okay. Thank you master C# guru.
 
lol
 
@Mat'sMug Although, I thought that you couldn't do this: var f = (x) => x * x; Am I right?
 
right, because you can't assign a lambda expression to an implicitly-typed variable
 
Okay, so why can you use var in place of Dictionary<string, Func<int, int>> then?
 
1:52 AM
because the type is right there: new Dictionary<string, Func<int, int>>
 
Wow... I'm so freakin brain-dead right now. xD
 
zombifying?
you're in Europe, right?
oh nm.. Minneapolis
 
@Phrancis PostgreSQL documentation is some of the best documentation ever.
 
@Mat'sMug Yup. It's only 8:58 and I feel like I'm gonna fall over and fall asleep.
 
2 words: coffee, coffee
 
2:00 AM
4 Words: Coffee, Large Caffeinated Soda
Oh dear. Stuff is happening that I don't want to happen.
The code is returning results, but it's returning the opposite results.
There we go, now it works.
 
lol.. I'm totally in the right-hand box right now
 
ikr
I was. But now I'm not.
 
@RubberDuck repro on this?
in VBA Rubberducking, 12 mins ago, by Mat's Mug
copy inspection results to clipboard, crashes with a NRE in Rubberduck.UI.CodeInspections.CodeInspectionsDockablePresenter.FormatResultForC‌​lipboard
 
2:16 AM
Never had that happen and I'm away from my laptop.
 
That, is the longest looking namespace, ..., I've ever seen.
 
Rubberduck.UI.CodeInspections is the namespace...
 
Oh, oops
That's still really long
 
@200_success I guess I just suck at reading it lol ;)
 
perhaps... descriptive though
 
2:18 AM
@200_success has obviously never seen the amazing documentation Microsoft has for the VBIDE library. Truly breathtaking stuff.
 
Oops. Did I say breathtaking? I meant utterly frustrating.
 
Ooh, I've heard that VB documentation is horrid.
 
yeah, well.. you google up VBA stuff, VB.NET docs come up.
 
I just submitted this on some VB.NET docs pages as feedback: VB docs suck, like usual.
 
2:22 AM
...
 
Or, ya know, They just neglect to document out params. christopherjmcclellan.wordpress.com/2014/11/06/…
 
@RubberDuck I remember that "discovery". Yay C# IntelliSense!
 
Saved my mind.
 
At least they got that right.
2
Q: Differences between 'plead' and 'beg'

munmunxuxu Fearing for his life, he pleaded/begged the mugger for mercy. Which verb is correct here and why? As I looked up in the dictionary, I found both 'plead for mercy' and 'beg for mercy'. Therefore, I think both words have similar meaning.

That's not what you do, you say "You call that a knife? That's no knife, THAT'S a knife!" (while casually pulling a knife from your boot and slitting their shirt open).
 
0
Q: List querying capabilities in Python 3.x

Ethan BierleinEither out of boredom, or my odd fascination with LINQ and SQL, this, thing, was created. Essentially, it provides list querying capabilities. At the moment, you can only query lists based on conditions, and sort them. Here's the source. py_listq.py import operator as oper class QueryableList...

 
2:30 AM
Ever saw Crocodile Dundee? My parents showed us that scene during the Boston riots after we read about the guy chasing those thugs off with a machete.
@EthanBierlein PyLinq, eh?
 
1
Q: List querying capabilities in Python 3.x

Ethan BierleinEither out of boredom, or my odd fascination with LINQ and SQL, this, thing, was created. Essentially, it provides list querying capabilities. At the moment, you can only query lists based on conditions, and sort them. Here's the source. py_listq.py import operator as oper class QueryableList...

 
@CaptainObvious I'm on TV!
 
@EthanBierlein What'd you do this time?
 
@Hosch250 I blew up a tree I posted that question here, and then @CaptainObvious posted.
 
2:33 AM
Oh, I wasn't sure if you meant for real.
 
Ah. lol. xD
Look at my awesome swag rep gain.
 
woah
 
Ikr
I've been going completely berserk with my activity on CR in the past month.
I actually have a new goal now. 7.5K-10K by summer's end.
 
Just a bit over 100 more, and I'm on the first page.
Got to write a couple answers.
 
@Hosch250 Of ...?
Hello @JeroenVannevel
 
2:38 AM
First page when sorted by rep.
 
For all time?
 
Yes.
 
0
Q: I created a Tic-Tac-Toe program in about 250 lines. How can I shorten this code?

SuperGoAI'm new to C programming and I recently challenged myself to writing a tic-tac-toe program. I found that my code becomes lengthy very quickly with so many if statements. This code works as is (and I still wish to add more features), I just think there's probably a more neat/efficient way to progr...

0
Q: Implementing Powerset

Kevin MeredithI implemented the powerset function: powerset({abc}) = { {}, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, {a, b, c} } import Data.Set (fromList, toList) import Data.List (sort) powerset :: (Ord a, Eq a) => [a] -> [[a]] powerset xs = toList . fromList . (map sort) $ xs : [] : f xs ++ map return x...

 
@Hosch250 you need to get past @JeroenVannevel before that can happen though ;-)
 
2:40 AM
I'm gonna kill a zombie now
 
@JeroenVannevel is going on vacation.
 
@CaptainObvious FGITW answered
 
@Mat'sMug Me too.
Only not FGITW.
 
@Hosch250 As an Australian, you really can't escape it. Most Non-Australians just refer to that film whenever they talk about the country
 
Not me.
 
2:55 AM
I moved the post to codereview.stackexchange.com, how do I delete this post? — SuperGoA 38 secs ago
 
I talk about the Rescuers Down Under.
 
Although if you wish to watch a movie that greater reflects Australian culture, watch The Castle
 
> Sit down and enjoy the view. Nothing but abandoned opal mines, far as the eye can see. And dead ahead, is home, sweet home.
Sure. I bet you anything these modern Americans would just pack up and leave when they were told.
 
Huh?
 
Does the code code work? If so, Code Review would be a better place for this. — jme 56 secs ago
 
2:58 AM
Fighting city hall?
Nobody has the guts to do that around here.
 
Something like that, just has bogan aussie settings and language
 
I think this is a good answer:
0
A: Scraping efficiently with mechanize and bs4

Ethan Bierlein Remove nasty comments. For example, your "block separator comments", ###...### are completely, and utterly useless. Remove them. Another thing would be to not create "title comments", #----...----. Comments should be helpful, many of yours are not. Again, another tip on comments. Many of your c...

Thnaxs snarnta!
 
Pretty basic, but not had any action:
0
A: User can choose to add one of two node types to a treeView, both of which have almost identical settings

Hosch250Early returns Early returns are your friend: private void UpdateRelayWordPagesAndContextMenu() { if (NavigationControlRelayWord.SelectedNode != null) { // Really long block here.... } } VS: private void UpdateRelayWordPagesAndContextMenu() { if (NavigationControlRelayWord.Selecte...

And, I hit 50 for today.
 
Man, I should learn LINQ
And C# for that matter.
3
I already know a little C#, but I could definitely learn more.
Killed another.
0
A: Python deploy function using Fabric

Ethan Bierlein Using % for string formatting is deprecated. You should be using str.format() instead. Here's how one would use str.format(): print "Hello {0}.".format("world"). str.format() also supports using keyword arguments. Here's an example of that: print "Hello {word}.".format(word="world"). Near the en...

 
3:16 AM
 
Yay! 50 bronze badges!
 
@Phrancis Is that delete an accident?
 
@Phrancis That's my question, too.
 
1
Q: Conditionals for time specific data (SQL style)

PhrancisI was inspired by this question from @AndyRoid to try and come up with some fast and accurate datetime calculations that didn't involve complex if/else statements. My hammer tool of choice was MySQL, because of its simple syntax and very common use on the web. This could easily be adapted to ot...

 
wow, I'm having a major WTF moment
should this assertion fail?
 
3:23 AM
Not sure, what is it?
 
Ahm, err, umm, no. yes. no. I don't know.
 
What is callSiteContext?
 
@Hosch250 I noticed a little error, tried to delete so I could edit, but wouldn't let me. The question is OK now, error has been fixed
 
the ...context of the call site
 
I mean, it is the ICS_S_Whatever?
 
3:24 AM
yes. it's a ICS_S_MembersCallContext
aka not a AmbiguousIdentifierContext and not a CertainIdentifierContext
how the Hell does the assertion pass?
 
Does it?
 
yes
 
Let's see.
Where's the definition?
 
of what?
 
I just realized that I don't have all the required badges needed to run for mod. :(
 
3:26 AM
> Suddenly realizing I'm > 1005866346 seconds old...
 
I probably don't either, what are they, @EthanBierlein?
 
Civic Duty, Strunk and White, Deputy, and Convention
 
Oh, I do.
 
That was for the SO elections though, but still..
 
I never get the easy way out of things, do I?
Lol, making decisions is hard, living with the consequences is easy.
Letting others make decisions for you is easy, but living with the consequences is hard.
 
3:29 AM
Screw it. I think I'll have most, if not all of those badges by election time.
 
3 days?
 
@EthanBierlein that's the spirit!
 
@Hosch250 Oh wow, it's in three days?
 
Should be easy, except the meta one.
 
starts Monday
 
3:30 AM
I CAN DO THIS
TIME TO BEAT THE JAMALIZER
2
AND FLAG ALL THE POSTS (that are bad)
 
The meta one could be a little tricky, because meta questions get good answers posted fast.
 
@EthanBierlein They'll be close votes
 
@EthanBierlein Let's see, I think @rolfl has an obsolete comments query.
 
Hmm, I wonder if they'd be okay with close votes over flags.
 
3:33 AM
WTH
            var identifierTypes = new[]
            {
                typeof (VBAParser.AmbiguousIdentifierContext),
                typeof (VBAParser.CertainIdentifierContext)
            };

            Debug.Assert(identifierTypes.Contains(callSiteContext.GetType()));
I can't seem to get a frakkin assertion to ...fail.
Debug.Assert(callSiteContext.GetType() != typeof(VBAParser.ICS_S_MembersCallContext));
ok something's not right
Debug.Assert(false);
^^ passes
ok screw it
 
LOL.
 
Why is it that the weather is beautiful all day, until you clock out on Friday and it starts storming...
 
I love storms.
 
Me too ^^
 
            var identifierTypes = new[]
            {
                typeof (VBAParser.AmbiguousIdentifierContext),
                typeof (VBAParser.CertainIdentifierContext)
            };

            if (identifierTypes.Contains(callSiteContext.GetType()))
            {
                throw new ArgumentException("'" + callSiteContext.GetType().Name + "' is not an identifier context.", "callSiteContext");
            }
 
3:39 AM
Do you love areal floods too? And tornadoes?
 
^^ that'll work.
uh
 
Yeah.
I'd love to become a SkyWarn spotter, but not now...
 
@Phrancis IIRC there's a scientific explanation for this.
 
Murphy's Law?
Well past dishes time, BBL.
Just 50 more points to the first page!
Just don't serial upvote me, anyone!
 
If I had votes, I'd help.
Unfortunately, I'm already out of votes.
 
3:43 AM
Whoa.
BBL.
 
A few miles from where I live at ^^ in 2013
 
Hello
 
Hey @Malachi @Lyle'sMug
 
I have been on vacation, fishing and stuff. Still technically on vacation
Where did that come from @Phrancis
 
Catch anything good?
 
3:46 AM
Aaargh. I'm five votes away from getting [badge:electorate]
 
Elizabethtown, IN
 
Caught a bunch of walleye and some white bass
Lol, reminiscing about the old days when my name was Malachi I see
 
Well, old days being < April's Fool's 2015
 
hey @Lyle, will you be running for moderator?
 
I can answer stuff while on vacation. It's not as easy with a tablet but I'll be damned if someone throws me back
 
3:50 AM
SELECT DATEDIFF(DAY, '2015-04-01', CURRENT_TIMESTAMP); -- 87 days
 
ah-ha!
   at Rubberduck.Parsing.Symbols.IdentifierReferenceResolver.ResolveInternal(ParserRuleContext callSiteContext, Declaration localScope, ContextAccessorType accessorType, DictionaryCallStmtContext fieldCall, Boolean hasExplicitLetStatement, Boolean isAssignmentTarget) in c:\Users\Mathieu\Source\Repos\Rubberduck\Rubberduck.Parsing\Symbols\IdentifierReferenceResolver.cs:line 247
   at Rubberduck.Parsing.Symbols.IdentifierReferenceResolver.TryResolve[TContext](TContext context) in c:\Users\Mathieu\Source\Repos\Rubberduck\Rubberduck.Parsing\Symbols\IdentifierReferenceResolver.cs:line 517
now... how do I fix this....
 
Do you guys remember my first question?
15
Q: Basic Terrain Generator - KhanAcademy

Ethan BierleinI'm new to JavaScript, and I've been learning off Khanacademy. I wrote the following basic terrain generator and I'm wondering if it could use any improvements. Here's the code: var res = 7; var area = []; var camP = [random(500,1000), random(500,1000)]; var setArea = function() { area ...

I was such an awful programmer back then.
 

« first day (784 days earlier)      last day (3234 days later) »