« first day (852 days earlier)      last day (3164 days later) » 

6:00 PM
@SimonForsberg Just for you. ;)
 
@rolfl You didn't...
 
@200_success Why did you close this question? The code isn't broken or not written.
2
Q: Efficiently concatenate substrings of long list of strings

JoshI am having performance problems with the following python function: def remove_comments(buffer): new_buffer = '' lines = buffer.split('\n') for line in lines: line_wo_comments = line.split('--')[0] + '\n' new_buffer = new_code + line_wo_comments return new_buffer...

 
I really want to post an answer, "Just go up and zip it for him. Maximum awkwardness achieved."
 
@EthanBierlein The reason is right under the question. You know that, right?
@EBrown What's stopping you?
 
The code isn't broken though.
 
6:02 PM
@Mast The influx of likely downvotes.
I don't know Lifehacks rules.
 
@EthanBierlein You could've mentioned that instead of asking why while the reason is given.
 
There
 
@EBrown Well, it's not really an answer since it would break one of the requirements.
But afar from that.
I've seen worse there.
 
@Mast I don't even know what the requirements are...lol
 
@EBrown The 3 points mentioned in the question.
 
6:04 PM
@Mast Well, in response to that: "Worry not, worry not, worry not."
 
@EBrown Good point. Make it an answer.
 
@Mast Nah. The influx of downvotes, remember?
 
@EBrown It's Lifehacks, you'll be fine.
 
@SimonForsberg Your comment got 2 likes now!
 
@IsmaelMiguel This ain't Facebook!
 
6:06 PM
 
@Mast It was on the comment on today's commitstrip, which uses the Facebook comment plugin
 
@EBrown You could make it an example question on etiquette.SE
 
@Mast Even better.
 
I think he needs 40 questions
And answers as well
 
6:11 PM
This didn't make it:
81
Social Conventions

Proposed Q&A site for people who need help with how to respond in certain situations as well as raising awareness amid people on how to communicate without any issues [Concerning talking to the deaf and blind etc.]

Closed before being launched.

We'll see if etiquette does.
 
I just followed Etiquette, to help out.
 
@rolfl part of the bro code: you tell a bro if his fly is down.
 
@ARedHerring That's what I said.
 
@ARedHerring Do you tell a fly you took his bro down as well?
 
that's assuming the code flies
@rolfl +5 now
 
6:15 PM
I think I might still post my crap answer to it.
 
@EthanBierlein It's broken
new_code is not defined.
 
@Mast yes, but you must maintain eye contact whilst doing so.
3
assert your dominance.
 
@ARedHerring Starred for (hopefully) out of context.
2
 
this works even better whilst telling a bro his fly is undone.
@EBrown TS (real star would give the context away)
 
@ARedHerring RSA'd anyway
There was nothing constructive on the starwall anyway.
 
6:19 PM
> nothing constructive
I disagree. World building is in the starwall. I would feel that building a wall involves construction.
 
I asked the guys at English Language & Usage what a group of elevators was called. They say it's a bank
 
0
Q: my game based on strategy

noob1992maybe the checkForWins public Form1() { InitializeComponent(); grid(); MessageBox.Show("Find the pattern"); } public void grid() { for (int i = 0; i < buttons.Length; i++) { buttons[i] = new Button(); } for (int i = 0; i

 
@Mast lol
 
Now I got banks all over my code.
7
Q: Group of elevators in a building

MastIf we assume a large building with multiple elevators, what would be the name of a group of elevators? Consider a group all those in close vicinity to each other, in the same hall but not necessary with the same amount of locations (stories). If a wide building is considered, it's perfectly poss...

 
@Mast Is there ever?
 
6:20 PM
@EBrown Sometimes.
 
Also, if you want maximum awkwardness for the zipper situation, lean in for a kiss too.
 
Although we tend to get philosophical on the wall.
 
@EBrown Don't forget a slight tap on the butt while doing so
 
That's just silly.
 
@IsmaelMiguel Yeah, just for good measure.
@rolfl Got an answer!
0
A: How to tell a person their fly is down

YayotrónJust grab his penis. Surely he'll notice.

 
6:25 PM
wow
 
Jesus
 
he has won the internet
 
It's a solution
Not the solution
 
I dunno - I guarantee after that, the guy will never have a fly down again
 
@DanLyons He has lost his dignity if you ask me...
 
6:28 PM
@DanLyons It would be quite effective.
 
0
Q: Recursive binary search in python

CodeYogiI have implemented a recursive binary search in python and tried to implement some verification to my code other than that is there any optimization I am missing? def isSorted(ary): for i in range(1, len(ary)): if (ary[i] < ary[i - 1]): return False return True def ...

 
My attempt:
0
A: How to tell a person their fly is down

EBrownYou can be discreet about it. Generally, the most effective, and discreet, way to tell him would be to place one hand on his shoulder, and whisper it in his ear so that the others can't hear. This gives him the opportunity to make the judgement call as to whether or not he should fix it. You do...

 
@CaptainObvious It's not often I hammer for unclearness, but this time I do.
@EBrown aaand flagged for being rude/offensive. (I'm quite sure that one is technically illegal as well)
 
@SimonForsberg In the U.S. it's definitely illegal.
But I got a free flag from it as well.
 
not hackish enough
3
 
6:33 PM
I registred on lifehacks just so that I could flag it
 
HI JAMAL!!
 
@Mat'sMug Neither is mine, but at least it's not illegal, or rude.
@SimonForsberg So did I, then I thought, "to hell with it, I'll post an answer."
 
@SimonForsberg I have an old and innactive account there
 
-1
Q: my game based on strategy

noob1992This is a game that is supposed to be based on strategy and guessing . The letters need to match in a abcd fashion on each button on buttons[0] - buttons[3] ... and buttons[n] - buttons[n] in each square kind of like a matrix ;though there is no matrix math involved . Each time a user clicks the ...

re-open worthy?
 
@IsmaelMiguel Accounts don't go inactive
@SimonForsberg No.
 
6:36 PM
@SimonForsberg He sounds like a help vampire.
 
It's still unclear what he wants.
 
@Mast Inactive -> Account that I haven't put use to after a while
 
not quite sure how he sounds like a help vampire
 
Is there a way of re-making it? — noob1992 2 mins ago
 
I think it's quite clear now, the question could use some editing though. But I'll let community possibly re-open
@EBrown that comment said something different a few seconds ago
it said "yes the code works" or something
 
6:38 PM
@SimonForsberg Well that to me sounds help-vampire-ish.
 
to me it sounds like someone asking for help
 
@EBrown did you get downvoted?
 
@Malachi On what?
 
lifehack answer
 
@SimonForsberg It may just be that. I may be wrong, which is why I'm not saying it is, just that it sounds to me like this is the beginning of a help-vampire.
@Malachi Not yet.
 
6:40 PM
thought you were up to 4 upvotes already
 
@Malachi No, the other guy was up to -4.
 
I may just put a bounty on that question of rolfl. That rep has been rotting away anyway.
 
I don't think that question is really on-topic for life hack....
 
@EBrown let's hope it's the end of the vampire and the beginning of a potential valuable user.
 
@SimonForsberg I hope so as well.
@Malachi It would really be on topic for [Etiquette.SE]. But that has yet to exist.
 
6:41 PM
@SimonForsberg Can I invite the used for our chat?
 
@IsmaelMiguel It's a bad idea.
 
Alright
 
If you want to chat with the user, invite him in a room with you, him and anyone interested.
But I see no point in bringing it here.
Unless the question gets a meta of-course, but I think that would be overkill.
 
Probably won't
 
Sort of a bit like some Simon Says game? I'm a bit confused with the description of how the game plays; I think a screenshot or two might help a lot - would it be possible to include the entire class? Also please tag with c# and game ;-) — Mat's Mug ♦ 45 secs ago
 
6:44 PM
Also: is not a language.
It looks like C++ or C#.
 
it's C#
 
C# people, I have a beginner question...
 
@Malachi sup
 
@Mat'sMug What would we do without you?
I completely agree with those parts
 
in an abstract class, can I create a method that actually does stuff, or do I have to make that a full class?
 
6:46 PM
You can make a method that really does stuff.
 
just reading through a book and making sure that I have all the basics down along with Terminology
 
Or wait, I think you can, but I might be muddled :(
 
@Malachi I stopped trying to understand C# terminology. It's too abstract for my taste.
 
I just want to be able to explain to people what I know...you know?
 
you can have non-abstract and non-virtual members in an abstract class, yes. But I'd recommend them be either protected or private
 
6:48 PM
okay
 
@Malachi yes you can.
 
public abstract class ApplicationSettingProvider<T>
{
    public abstract T GetCurrentSetting();
    public abstract void SetCurrentSetting(T setting);

    public event EventHandler<SettingChangedEventArgs<T>> SettingChanged;
    public void OnSettingChanged(T newSetting)
    {
        var handler = SettingChanged;
        if (handler != null)
        {
            handler(this, new SettingChangedEventArgs<T>(newSetting));
        }
    }
}
 
@Mat'sMug I see nothing wrong with public
 
So yes, you can.
 
@EthanBierlein Now it's working code:
 
6:48 PM
@Mast that edit wasn't there when I voted
 
@SimonForsberg public virtual is usually a better idea than just public, for an abstract class
so derived types can override them
 
WTF my computer is not liking SE this week at all
 
awaiting obsolete flags
 
lol
I still have like 200 flags until I reach 500
 
@Mat'sMug ah, okay. In Java you have to explicitly mark methods as final if you don't want them overridden. I'm not used to that virtual stuff.
 
6:51 PM
@Malachi Same here
 
@Malachi you missed a spot comment!
 
I'm at 330
 
C# virtual is Overridable in VB.NET
 
I am at like 286
@Mat'sMug ??? what?
 
isn't it?
 
6:53 PM
confusing? yes...lol
 
the VB.NET terminology was meant to make it easier for VB6 folks
 
...while making it more confusing for everyone else?
 
oh I see.
 
LOL +1 to rolfl for new title — Zanderwar Oct 23 '14 at 13:53
 
so, is it ready to reopen now?
1
Q: Pattern-finding game

noob1992This is a game that is supposed to be based on strategy and guessing . The letters need to match in a abcd fashion on each button on buttons[0] - buttons[3] ... and buttons[n] - buttons[n] in each square kind of like a matrix ;though there is no matrix math involved . Each time a user clicks the...

oh crap, I was editing at the same time as OP
 
6:57 PM
The images are broken
Also, we don't know if it is working or not
 
@Mat'sMug No.
 
Do you think that 2nd null check is redundant?: if (obj == null) return false; codereview.stackexchange.com/questions/102669/…Nenad Bulatovic 1 min ago
 
@Mast look again
 
@IsmaelMiguel I think we can assume that it works, really. They ask for help cleaning it up, after all. And a comment mentioned that it works (before the comment was edited)
 
I reopened it
 
7:05 PM
@Mat'sMug Yep, better. Much better.
 
@SimonForsberg That worries me: the comment isn't there anymore. It was edited out
 
@Duga that was an interesting find... @rolfl should see this!
 
@IsmaelMiguel I cleaned up the post when I edited and reopened it.
 
@Mat'sMug Why did you clean up his code as well?
 
@Mat'sMug I was saying before. Before you cleaned up. The O.P. edited his comment that said it worked
 
7:07 PM
it seems to be generated code
@IsmaelMiguel You think too much.
 
Jon Skeet is being directed to CR? Competetion for the C# guys ^^
4
 
@Mast look at the revisions. OP was using HTML to format their code. The last lone closing brace was clearly due to struggle with markdown-formatting.
 
@SimonForsberg I know. I should stop thinking sometimes.
 
@SimonForsberg is should be. unfortunately it isn't!
 
@Mat'sMug The last closing brace, yea. But this is more.
 
7:10 PM
@Mat'sMug how do you mean?
(note that I don't think @Duga's discovery affects the topicness of the question, I still think it's on-topic)
 
@Mast the original revision had the namespace scope closing brace; when he copied/pasted the missing top part of the class, he didn't Ctrl+K the entire block, making the indentation look broken. I've written enough C# to know that one can't possibly have their code looking like that in VS
@SimonForsberg I mean most of the code belongs in auto-generated InitializeComponents method in Form1.designer.cs
 
@Mat'sMug Fair enough.
I didn't know that.
 
So the power at my work just went all over the place.
 
@EBrown And now you're glad you're behind a laptop?
 
I have a UPS on my desk.
APC Back-UPS Pro 700. ;)
 
7:16 PM
:-)
Even better.
 
But, we had to go throw the main circuit breaker so that the generators would kick in.
 
Wut.
Who designed that moronic circuit.
Time for Circuit Review!
3
 
Well it's not their fault.
Our generators are designed to kick in when the power is out for more than 15 seconds.
 
And they didn't?
 
They have a 5-10 second boot time, so thirty seconds after the power is completely out they kick in.
Our power never went out for that long.
It was flickering on/off for 2-3 seconds at a time.
 
7:18 PM
Ah.
 
So the generators never kicked in.
So we went back and threw the outside power breaker on both buildings off.
 
What made it do that, hurricane?
 
Then the two generators kicked in.
@Mast Massive thunderstorm.
 
Lol, the electronics here don't care about thunder.
 
I am against that small lake with all the yellow stuff around it.
 
7:19 PM
@Mast bring it on
 
It has stopped raining, but it's still crappy outside.
 
someone should protect that question though....
 
I now have more Lifehacks rep than Programmers.
All from today.
All because @rolfl didn't know how to tell a man his fly is down.
2
 
@EBrown ...congrats?
 
@Mat'sMug Considering the question I gained it on, I'd say so. :)
 
7:23 PM
yeah, I had to ask that question then duck out..... I am amazed that question has survived on lifehacks.....
 
Life Hacks is a dead site, from what I have seen
 
Thanks for the answer, it's the logical answer, really, but not exactly hackish.... not sure I can accept it.... yet
 
fairly slow going
 
@rolfl Only has 1 close vote.
I scored some easy points there early in the beta. Was fun for a while, but it really has no point.
 
@rolfl I was going to make it really sarcastic and slightly inappropriate, but I kept it clean just for you. ;)
 
7:26 PM
@Malachi what question?
 
Why? If there's a user new to our site that has a decent contribution to make it would be a shame to prevent them.
 
I don't think questions should be proactively protected.
 
@Malachi you saw the dates, right?
 
@Malachi One answer? I see no reason to protect it.
 
I think protection (on questions) should be limited to those that have already been abused.
 
7:28 PM
@Malachi As long as one of the mods keeps an eye on it, there is no problem.
I agree it has an improved risk now.
 
@Mast s/one of the mods/any valuable regular in the Code Review community/
 
We like living on the edge.
@SimonForsberg Java question, not it.
 
Not it.
 
I'm sure someone will say something if they see something
 
4
A: Generated equals in Webservice Stub

Jon SkeetI suspect it's trying to stop recursion - if something has itself as its key, you don't want it to recurse forever. However, at that point it uses reference equality for the test, which is possibly not desirable. What's generating this code? Is it a home-grown system, or a public one? If it's h...

Dec. 15 '08
 
7:31 PM
5
Q: Null check in .equals implementation

Nenad BulatovicI have inherited some legacy code that I'm now trying to clean up. I feel like the 2nd null check is redundant, see comments: private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof ArrayOfColumn)) return false; /...

I still feel it's off-topic, but not enough to make it a problem. Grey question.
 
7:48 PM
WPF question:
Should I design the XAML first or the C# classes first?
 
I do XAML first.
I usually do view, then view-model/model.
Of course, designing the VM usually requires some tweaks to the V.
 
Apparently we lost all A/C in the server room...
 
@Hosch250 Of-course, but you got to start somewhere.
 
Do the XAML.
The VM will need to be designed around you XAML components, to a certain extent.
 
I'm not used to GUI. I usually start building the 'brains' and see how I get that to the screen later.
 
7:54 PM
The thing is, the VM is used to pass specific parameters from your model to your view, so I think it's better if you know what you need to pass
 
@EBrown that's not good
 
@TopinFrassi Seems valid.
 
Well, that's my experience until now, I might be wrong!
 
Your WPF experience is probably more than mine.
 
Eh eh, I've never used WPF before. I just got an internship that uses WPF and I need to learn it all. Though i got a little experience with the MVVM model
 
7:58 PM
FWIW, I like implementing the ViewModel first; then I get IntelliSense in the XAML (with R# at least) when I have a d:DataContext design-time binding to the viewmodel instance
 
@Mat'sMug That sounds like a quick method.
 
@TopinFrassi you gonna love it!
 
It looks really fun, plus well, it's always cool to learn new things!
 
2^10 times better
 
8:01 PM
@Mat'sMug Where can I see the tests that weren't executed?
 
Oh, yea, I probably need to write some tests between those 3
 
the best part is that there's 0 code involved in filling up the treeview
<TreeView Grid.Row="2" x:Name="TestMethodTree"
          MouseDoubleClick="TreeView_MouseDoubleClick"
          ItemsSource="{Binding Source={StaticResource OutcomeGroupViewSource}, Path=Groups}"
          ItemTemplate="{StaticResource OutcomeTemplate}">
    <i:Interaction.Behaviors>
        <local:BindableSelectedItemBehavior SelectedItem="{Binding SelectedItem, Mode=TwoWay}" />
    </i:Interaction.Behaviors>
</TreeView>
just a data template
@IsmaelMiguel last node, "Unknown (1)"
 
That's great. It's usually boring boilerplate code to fill grids or controls like that
 
@Mat'sMug And when the test is inconclusive? Or failed for some reason? (the execution of the test failed, instead of the test returning a failing result)
 
Apparently we have absolutely no power from our server room A/C getting to the panel.
 
8:04 PM
@IsmaelMiguel Tests shouldn't be inconclusive.
 
Which means something is seriously borken.
 
@IsmaelMiguel you're losing me there. do you see the screenshot or what?
 
@EBrown Struck by lightning?
Yea, it has a Inconclusive section
 
@Mast Maybe. Some of the personnel said they heard a large "pop" and "fizzle" from the roof.
 
8:06 PM
I'm voting to close this question as off-topic because it's a code review question, and is best suited for codereview.stackexchange.comrnevius 43 secs ago
 
Which is indicative of very bad things.
 
@EBrown Somebody should take a look ^^
 
@Mast We have the electric company for that.
 
@EBrown Takes too long IMHO.
 
@Mast 10:1 that they'll be here tomorrow.
I won't be here tomorrow afternoon, so not my problem. ;)
 
8:08 PM
 
0
Q: How many lines are there in each unique combination of values of two columns?

Remi.bLet's consider the mpg data.frame as an example. I would like to get the number of rows for each combination of values at the fl and class variables. The best solution I came up with was library(data.table) as.data.table(mpg)[,list(nbrows = sum(model == model)),list(fl, class)] or mpg$one=1...

0
Q: Is it best practice to structure conditional code blocks with if..elseif even when it's not really needed?

Gin-SanIn PHP, return will immediately stop a function's execution and return the specified value. So the following code blocks are basically similar: //version 1 $mysqli = new mysqli($host, $user, $pass, $database); if($mysqli->connect_errno) return $mysqli->connect_errno; if(!$mysqli->query($query)) ...

0
Q: Subset sum whose set contains only positive integers

AxlI was trying to write a dynamic programming algorithm using a bottom up approach that solves the subset sum problem's version where the solution can be either an empty set and the initial set can only contain positive integers. The following is my implementation, but I am not sure it is correct ...

0
Q: Major difficulties turning this into prepared statement

user3907211I have been wrapping my head around making this more secure by using prepare statements but my attempt has failed. Below is the original: // Converting the array into individual strings $formats = implode("','", $formatsArray); $topics = implode("','", $topicsArray); // Check to see if user i...

 
OH HAI!
4 posts walk into a SE site. One is a one-liner grayzoner, one is decent-ish, and the other two are off-topic.
4
 
8:26 PM
0
Q: How to speed up SQL SELECT query on big dataset

user3351652I have 3 Tables which look the following: Table couples consist of save_id, id_candidate_red, id_candidate_blue Table candidates_red consist of save_id, id_candidate, enter_match Table candidates_blue consist of save_id, id_candidate, enter_match And i am running the query...

 
@Mat'sMug Dark-grey
 
8:42 PM
@rnevius: Please don't use a custom close reason like that; stick to the normal off-topic close reasons like Too Broad or Unclear. Only questions that are actually off-topic can be migrated, for which you'd use a moderator attention flag. Also see A guide to Code Review for Stack Overflow usersMartijn Pieters ♦ 29 secs ago
 
0
A: I'm not the language you're looking for!

Ismael MiguelPHP/Javascript(ES6), 191 bytes This one is quite obvious for some people. And I think it is bigger than the existing PHP/JS answer. $e=($j="\0"=='\0')?[a=>console.log(a.join(''))][0]:function($a){echo(join('',$a));};$L=['PHP','Javascript'];$e(["This program wasn't written in ",$L[+$j],', it was...

If anyone is interested in BAD Javascript (ES6) and PHP
 
@IsmaelMiguel All JavaScript is bad.
 
Not as bad as that!
 
#IFeelLikeAProgrammer When I compare compare a timeshare network connection to programs running on a processor.
 
A what?
 
8:55 PM
Or when I compare multistreaming (SCTP protocol) to a multithreaded program.
 
That sounds interesting
 
A timeshare connection, where the link can only handle certain a limited number of users, so people have to take turns.
 
That sounds slow
 

« first day (852 days earlier)      last day (3164 days later) »