« first day (842 days earlier)      last day (3474 days later) » 

00:00
RELOAD!
There are 1489 unanswered questions (94.3571% answered)
Zak
Zak
@Mast awesome, thanks
00:12
So... how do we feel about a question about preprocessor macros?
Dunno. As usual, it depends on the code and how it's asked.
@nhgrif wanna loop me in? I saw some BF question and we're talking about compilers/interpreters & tags. What's up?
The question I just asked is unrelated.
Mast has a question with C++ code that takes a string and turns it into brainfuck.
It has the brainfuck tag, and I've argued that it shouldn't.
We're reviewing the code, not the generated code.
The tag attracts people with expertise or interest in Brainfuck. It's justified.
Meh, I'm not really interested in the debate. I was just catching up the duck.
00:22
I've just suggested that should be a synonym of .
That ^, but if it didn't have 5 tags already, I'd consider a tag to indicate that it's generating code.
To the OP: if you want your question answered here, it needs to include a specific problem statement, along with a good, minimal, complete code example that reliably reproduces the problem. If you are concerned about performance, then a problem statement might be along the lines of "this code executes in X ms, but I expect it to be able to finish in Y ms". Something really actionable. If you can't present the question in that format, it probably is better suited for codereview.stackexchange.com. See also stackoverflow.com/help/how-to-ask. — Peter Duniho 39 secs ago
01:25
Hmmm... did I miss the calm fest?
@rolfl WHY DID YOU POKE THE BEAR
Everybody just calmed down
tranquilizing darts all around
Hey, I just completed a 13 hour drive... I am calm.
We have blamed the monkey. All is good now.
That's a tough commute
@rolfl How do being calm and driving at all relate?
01:27
Don't do one without the other....
I found 15 bugs in VSDiagnostics so my brain is entirely fried at this point
A sweet sense of surrender
Zak
Zak
01:45
cons of a messed up sleep pattern: I'm sitting in the office at 3am. Pros of a messed up sleep pattern: I can watch pirates of the caribbean while I code :)
0
Q: C# Help optimize my code with 2d array for loop

BDot17This code is about manipulating each value in a 2d array. My method below is called based on how I want the values in the array to be manipulated (process). For the first method in the switch statement - as an example, I am calling AllCaps() method to manipulate the value. What I am trying to a...

0
Q: java sample problems

Arnel RomeraWrite a guessing game, the program is to write "cold" when the guess is 3 or more away from the correct answer, "warm" when the guess is 2 away, and "hot" when the guess is 1 away. As soon as the user enters the correct number the program writes a winning message and exits.

0
Q: Scissors: A fluent API for manipulating lists using the familiar copy-cut-and-paste

Emmanuel RosaWhat I’ve hastily named the Scissors API brings the cut-copy-paste paradigm made popular by word processors to the realm of list processing. The Scissors API is fluent, provides methods to manipulate a list, and maintains context through the use of a customizable clipboard. An example: Fixing Yo...

02:14
4/5 classes up.
Evening.
evening
Zak
Zak
02:35
I think my answer's useful but I'm not familiar enough with C# to be sure. would anyone mind taking a look and telling me what they think? codereview.stackexchange.com/questions/101757/…
02:48
It looks alright, just remember you need to add types to your variables
Zak
Zak
how does that work in C#?
String str = "";
FizzBuzz fizzybuzzy = new FizzBuzz();
SelectedRange probably needs a type.
SelectedRange = GetSelectedRange()
Don't forget, there's always var. (It's a debated topic, though)
Unfortunately, here on Code Review, despite talking often on best practices, we're about reviewing actual code. Asking hypothetical questions are strictly off-topic. — Quill 54 secs ago
However, feel free to post a working code example and ask whether vanilla JavaScript would have been better. — Quill 15 secs ago
03:03
-1
Q: JavaScript/jQuery best practice?

Johan GudmundssonI have heard/read that you should not always use jQuery. Instead in first hand use plain JavaScript when ever possible and in second hand jQuery. Is this true? If so, why is this best practice? Best regards from a guy who loves jQuery more then plain JavaScript.

9 mins ago, by Quill
Unfortunately, here on Code Review, despite talking often on best practices, we're about reviewing actual code. Asking hypothetical questions are strictly off-topic. — Quill 54 secs ago
04:02
Zak
Zak
04:19
Is that an auto-xkcd bot?
Yep.
feed actually
The class wasn't included because it's merely a trivial placeholder encapsulating 2 strings; the class listing can be found here on Code Review Stack Exchange, along with a more performant (because it doesn't re-create the escapes collection every time it's used) and object-oriented (and completely overkill... yet easier to read and maintain) version involving an IFormatSpecifier interface and lots of fun thoroughly implementing. — Mat's Mug 29 secs ago
free NAA flags on Stack Overflow BTW ^^
*brr*
I don't want to sleep anymore
There was a huge spider crawling around on the floor, and it creeped me out.
04:28
@Mat'sMug Isn't that the definition of SO (kids).
evil laugh
@EthanBierlein Just kill it like the rest of the bugs and go back to sleep.
@Hosch250 Yeah no
Either that, or preserve it in a program.
See, I have a fairly extreme fear of spiders
04:29
Bad pun of the night
Programmer's rulebook. Rule#1 - Thou shalt fear no bug.
5
Spiders or not, I'm off to bed.
'night
@Mat'sMug Spiders aren't bugs
They're arachnids.
science...
Programmer's rulebook. Rule#2 - Thy code shalt not be covered in cobwebs.
3
04:34
But not all spiders make webs
Some dig holes
And others roll up leaves
Anyways...
Why has nobody mentioned LINQ here:
3
Q: Manipulating each value in a 2D array

BDot17This code is about manipulating each value in a 2D array. My method below is called based on how I want the values in the array to be manipulated (process). For the first method in the switch statement - as an example, I am calling AllCaps() method to manipulate the value. What I am trying to a...

Seems like the perfect thing to do with LINQ
@EthanBierlein this may make you sleep better:
43
Q: Do you eat a certain number of spiders whilst you sleep?

billynomates Over the course of your life time, the average person eats X spider/insects/whatever whilst they are sleeping. X tends to vary according to who you ask. Is this just an urban legend?

I'm pondering whether or not I'm going to just sleep on the couch tonight
04:50
Monking
Zak
Zak
what's LINQ?
@Zak you're ready for this?
it's a short for Language-INtegrated Query
in VBA you have Collection objects right?
Zak
Zak
yep
in the .net world a collection implements an interface, IEnumerable
LINQ is a set of extension methods that extend that interface
so you can do things like, say, soldItems = items.Where(item => item.Quantity > 0)
which is really just a shorter notation for a foreach loop and an if block
@Zak Read
https://msdn.microsoft.com/en-us/library/Bb397926.aspx
04:57
^^ yeah
Zak
Zak
cool
@Zak you may find this interesting:
26
Q: Wait, is this... LINQ?

Mat's MugContext I'm working on a little project that consists in a series of Microsoft Excel add-ins (.xlam). The code being submitted for review here, is located in the Reflection project: Feel free to comment on the project architecture, but I'm mostly interested in the Reflection.LinqEnumerable cl...

it builds on this:
8
Q: Generating and calling code on the fly

Mat's MugDelegate This class module defines what I'm calling, in this context, a Delegate - here a function that can take a number of parameters, evaluate a result, and return a value. Close enough to the actual "delegate" thing I find. Example usage Set x = Delegate.Create("(x) => MsgBox(""Hello, "" & x

05:26
TTGTB
@JeroenVannevel bugs in your app or bugs in ms classes ?
hey @Vogel612 night @Mat'sMug
4 hrs of sleep is really getting to me..
Monking
Zak
Zak
monking
06:02
0
Q: An attempt at implementing Maybe in C++11

Vite FalconI gave a shot at implementing Maybe for C++ and a slight twist in my implementation is that it uses thread_local static instance of Just and Nothing + placement new operator to minimize the number of (de)allocations. This is the first time I'm using thread_local and placement new operator, so I ...

06:19
0
Q: Java constructor initialization practices

CodeYogiThis code is just a simple idea which takes a query parameter and requests n number of third party services for the given query: public class SearchInteractor { private List<Service> services; private String query; private List<String> result; public SearchInteractor(String query, List<...

06:56
You can try implementing code review practice. Another way is to set up a build environment with reports such as TeamCity and/or SonarQube. But I agree with statement above it is more a disciplinary issue not a coding one — nomail 13 secs ago
07:23
0
Q: Unit testing private constructors and getter setters

Sandeep ChatterjeeI have a class Address, a class AddressTest and I am trying to write unit tests for its constructors and getter setters. Address: /** * The bean Address. * * @author Sandeep Chatterjee * @since 24/8/2015 */ class Address { private BigInteger addressId; private String name; p...

07:49
0
Q: Remote DNS with Python requesocks

user81888Consider: import requesocks session=requesocks.session() session.proxies={"http":"socks5://127.0.0.1:9150", "https":"socks5://127.0.0.1:9150"} print session.get("https://stackexchange.com").text How do I make requesocks use remote dns? I find totally no documentation on the ...

08:14
@CaptainObvious can we have some CVs on that one?
asking about code not yet written
Greetings
I've read it and placed my close-vote as well
@Mat'sMug Remember this question: codereview.stackexchange.com/questions/66593/… ?
You linked it yesterday to Zak
And I would like to ask if "\(([a-zA-Z][\w\d]*)\)\s*\=\>(.*)" would work as a decent regex.
The \w is the same as a-zA-Z_ but I'm not sure if it also has 0-9
The \d matches digits
\w doesn't usually include 0-9
Thank God I'm not wrong
But one thing that I don't know is if there should be non-capture groups
08:32
nope no non-capture groups, but that only allows a single param and no spaces inside the parens
welcome @HenryHeikkinen
I just followed the syntax rules imposed there
08:49
Moooooooooooooonnnnnkingking
0
Q: Percentage calculation Method with many ifs

user3290117What would be the best way to refactor following methods private string CalcualtePercentageDifference(string temp1, string temp2) { double number1 = ParseDouble(temp1); double number2 = ParseDouble(temp2); double percentageDifference = 0; if (number1 == 0 ...

This would be better asked on [CodeReview]. — IKavanagh 36 secs ago
thank you, but how can i access code review?@IKavanagh — nabodo17 28 secs ago
@skiwi Greetings
hrmph..
@Duga mostly a crappy question...
Clicking the link in my comment will take you there. Then access it the exact same as you would here. Stack Overflow and Code Review are sister sites and linked via the StackExchange network. — IKavanagh 53 secs ago
08:58
missing context, bad plain english...
Just a note, if you do post to Code Review (which I recommend), amend the title to describe what the code does, and then describe what you want reviewed in the qustion. — Zak 36 secs ago
@IKavanagh This question is off-topic on Code Review. If you read, the O.P. says "I tried to put the contents of the first for loop into a procedure/method/function, but it then does something different.", which means it has broken code. Code Review is meant for fully working code. — Ismael Miguel 38 secs ago
@Vogel612 Broken
Off-topic
@IsmaelMiguel no not actually broken...
that's just a description of the failed attempt
The O.P. says "I tried to put the contents of the first for loop into a procedure/method/function, but it then does something different."
Oh
You sure about it?
not 100%, but yea for the most part...
09:01
Alright
I will delete the comment
If the O.P. states that the code works fine
the question is still mostly crap, though..
0
Q: How can i make my program more compact?

nabodo17I am an amateur programmer and I need help compacting this actionlistener in my java program. It is meant to remove some JLabels from (JLabel []pileone) off a JFrame when a button in JButton[]bpile1 (array of JButtons) is pressed and then disable the buttons that are larger than the amount of JL...

Zak
Zak
hmm. Yes, on a close reading, it does seem like the failed attempt is something not in the question.
If the current code is working as intended, please, fell free to post it on Code Review. We will gladly look at it. — Ismael Miguel 36 secs ago
Zak
Zak
09:03
@Vogel612 yes, but didn't we all start out as naive programmers asking crappy questions?
I know I certainly did :)
@Duga That was after I saw the question being asked
well I did too, but still: Don't migrate crap
@IsmaelMiguel No its not. The current code works as intended. It broke when he tried to make it more compact which is what he needs help with and is perfect for Code Review. — IKavanagh 29 secs ago
Zak
Zak
Isn't that the purpose of this site? To take what people currently know about writing code and teach them how to do it better?
Obviously, it's nicer when you're teaching people how to go from good code to great code, but everyone's gotta start somewhere
@Zak check my edit... compare and tell me which question you'd like to review more
this is not about the code
it's about being apt at asking answerable questions
getting to the point or somesuch
on a related matter my latest question is still completely unanswered..
09:15
@IKavanagh its on Code Review — nabodo17 33 secs ago
@Zak its in code review — nabodo17 27 secs ago
T.T
sometimes...
@Vogel612 Which one?
@Duga One of the questions should be removed, either the SO or CR one.
@skiwi the one you found so confusing, because I used complicated words to describe a simple problem.
3
Q: Multithreading readied Median Filtering

Vogel612So I've been confronted with a rather simple problem in the Java chat on Stack Overflow. It's about doing a median filter with a sliding reference window. For the purpose of the task we can assume the window used for filtering is always an odd integer between 3 and 21. The sliding window does no...

@Vogel612 Ah, right
Maybe more people found it complifusing?
09:23
but it's dead simple, you know?
Perhaps you could rewrite it a bit
> So I've been confronted with a rather simple problem in the Java chat on Stack Overflow. It's about doing a median filter with a sliding reference window.
I know what a median is, I can imagine something about a filter, I can imagine something about sliding, I have no clue what you mean by reference and I know what a window is
So I can (personally) not qualify it as "a rather simple program"
you run a median filter on an array
but instead of running it on the whole array, you run it for small windows
that's the reference window
I have no clue what a "median filter" is though
and since it moves it's sliding
mathjax
As I see it now, you either have that an expert comes by, or you give more context such that it makes other people more interested
09:26
what exactly is missing?
I'd say an example of how the algorithm works would be helpful
Then calculating the median is something I would call trivial, but that may not be the case for everyone
take array -> sort it -> choose the middle element or the arithmetic mean of the two middle elements
Excuse me
It's a digital filter.
I had to leave without any notice
09:34
Sorry, was distracted by something that appereantly happened yesterday evening
@Vogel612 Okay, sure, in hindsight that is extremely easy, but how does it interact with the sliding reference window?
the reference window is the part of the array you're currently running that on
I'll add something more to the description later today
0
Q: Logical operators on int

Paolo MSuppose I have the following class: struct C{ C():i{0}{} int i; }; Do you consider bad C-ish style to deal with the i member as it was a bool to select between zero and non-zero cases? C c1, c2; // do you consider this bad style? if( !c1.i && c2.i){}

Good morning, everyone :)
hey @Morwenn
@Vogel612 Okay, nice
@Morwenn Greetings
09:38
The fact that it's multi-threaded-ready doesn't make writing up an answer easier either :P
But there's no way around that, it's what you want reviewed ;)
The weather today is lovely
All gray and ready to rain
grr... trolls are a royal PITA
I feel unconfortable everytime I read "PITA"
why that?
09:46
But who's trolling you?
Well
some user in the Java room on SO chat..
second kick handed out, but I fare they'll just come back to insult some more
then I have to kick them again and then there'll be moderators
it's just so much of a hassle
The word "pita" is usually used to point out a girl (usually younger) in a very negative and insulting way
@IsmaelMiguel That's puta, not pita, right?
isn't that s/i/u?
PITA stands for "Pain in the ass"
@Mast "puta" is a whore
"pita" is what I described
But, now-a-days, "pitas" are also "putas", so, not much of a difference there
09:49
So one is slang for the other now?
Not exactly
You can say "Aquela pita é estupida" (That girl is stupid)
why are we even discussing that?? /me confused
And "Aquela puta é estupida" (That whore is stupid)
So, no, they aren't slang of eachother
But those "pitas" decided to be "putas" too.
@IsmaelMiguel quick interjection here... can you also use chica here?
in place of pita, that is....
@Vogel612 That's Spanish
Zak
Zak
09:52
@Vogel612 sorry for the misunderstanding, I thought you were suggesting the question itself was a stupid one, as opposed to how it was asked
That would have to be "Esa chica es una estúpida" (Thank you Google)
right, back to topic?
Yes
1
Q: Removing JLabels by pressing JButtons which disable if in excess

nabodo17The goal of this code is to remove some JLabels from (JLabel[] pileone) off a JFrame when a button in JButton[] bpile1 (array of JButtons) is pressed and then disable the buttons that are at an index larger than the amount of JLabels on the screen, so that each clickable JButton has a Label it re...

This question has a serious case of bad text
I even removed 3/4 of the plain english already
It has enough text
But the text doesn't say anything
09:56
hmm.. I figure it's some study exercise
maybe is appropriate
I read the whole text and I don't get why 3 blocks of code
@Vogel612 Probably
Reads like one.
@IsmaelMiguel different listeners..
Also, it's a variant of what he posted on SO. Different text same code IIRC.
-2
Q: How can i make my program more compact?

nabodo17I am an amateur programmer and I need help compacting this actionlistener in my java program. It is meant to remove some JLabels from (JLabel []pileone) off a JFrame when a button in JButton[]bpile1 (array of JButtons) is pressed and then disable the buttons that are larger than the amount of J...

@IsmaelMiguel No.
He wants to write both listeners into one more generic listener.
09:58
Oh
it's 3 listeners actually
That may make sense
And someone downvoted it
It's still a very context-free question
I'd say this is more applicable to codereview.stackexchange.comYannick Meeus 47 secs ago
how is the code used, is there a reason to even do three different "piles"
and so on
-1
A: Linq: For the below array I want to print all words having length more than 2 after removing letter “O”

Tim Schmeltervar query = numbers.Where(w => w.Count(c => c != 'O') > 2).ToList();

222k user answering with a single line of code
what the **** is wrong with Stackoverflow?
3
10:01
Nice!
Can I take a "fool-language" guess?
He changed it
aaand question was RBA.
wat?
@Vogel612 I don't see the problem
it's really just a single line of code. nothing else
if that ain't low quality I don't know
His explanation seems sufficient
>

You don't need to replace the words, you can count chars with a predicate:

List<string> result = numbers.Where(w => w.Count(c => c != 'O') > 2).ToList();
@skiwi after he got a downvote he edited
10:04
At the time, it was just the code
Appereantly he deleted it though
question author deleted
Just code, I can understnad low quality then yes
inb4 repost to CR
Yes, I can understnad
3
10:09
For some reason unknown to science, I find your statement quite amusing
Damn, why is English so weird? How do you call it when the opposing club scores a goal in football?
Google translate gives "goal against", but that can't be it
Same for German it translates to "Tor gegen", doesn't really sound valid either
scored against
Dutch has "tegengoal", which literally translates to a goal scored by the opponent
@skiwi The amount of 'tegengoal' are 'goals against'
So you got it.
@skiwi German has "Gegentor"
10:19
This question didn't get enough views yet. The answers are starting to roll in, but more are welcome.
13
Q: Convert Bitmap Font to Texture Atlas

bazolaI wanted to render the textures that comprise a bitmap font glyph onto the screen directly as an Image in libGDX. When you make a bitmap font using a program (such as Hiero), it generates a text readable .fnt file along with a .png file that is the sprite sheet for the font. The only thing missi...

@Heslacher Ok, I just feel there should be a single word in English aswell :P
@skiwi I feel english should just be german making my life easier ;-)
There is losing which kinda applies
@Heslacher Nah, join the Dutch :P
10:23
@Heslacher Portuguese would be better. Easier to understand, everything had a gender. You know what you are talking about. It's really easier.
But still, it's hard to learn
Most English people come here and can't understand that "o mesa" (the table) is wrong and "a mesa" (the table) is right
Dutch words also have a gender, but we have no rules for it
That one time I had been there (14 years ago) I couldn't understand one word. It had been a torture to get something for breakfast ;-)
Yet there is on most occasions just one correct gender ;)
@Heslacher You could try the "point and gesture" way
I did, otherwise I would have died ;-)
10:26
You could have tried English
We (fairly reasonably) speak English
Or you could try Spanish
(I don't recommend that!)
@IsmaelMiguel another lanuage I can't speak ;-)
Good thing. People would hate you if you spoke Spanish here.
We're already speaking English. Problem solved.
I don't like Spanishes and French
I've been almost ran over by more Spanishes and French than by Portuguese drivers
Even Brazillian tried to run over me more often
10:30
Windows 95 was an acceptable Operating System
I liked it
And I liked Windows 98 and 98SE
Windows NT4.0
Windows XP
Windows 7
@IsmaelMiguel Nobody liked 98, only SE was acceptable.
I liked it
I has this old computer with an Intel R
And it ran Windows 98 REALLY WELL
It would take less than some recent computers to boot up
And yes, it was stable
98% of the time
@Vogel612 I found this little gem: stackoverflow.com/questions/32180133/…
//TODO need to refactor this to use the temp replacement workaround hack?
A user with 1.6k reputation should know how to ask a question
@IsmaelMiguel yea.. that's one of the better ones, you know?
Is it just me, or are hard-rock covers of old songs just.. waaaay more musically sophisticated?
10:41
@skiwi Sounds bad.
@Vogel612 Yes, I know. But saying "I click and does nothing" is worst than not saying it at all.
@Mast Trust me, I know what I'm doing :P
Can you link one of those covers?
Bindings in Qt/QML are so dumb they don't fire an event when an array cell gets updated
@IsmaelMiguel here you go and original
10:44
It seems like this user is just doing code dumps
@Vogel612 I have to write those down somewhere
@Quill Can you link one? I can't find any
^ that
I just clicked the first 5 answers, and they all look fine..
-1
A: Binding data to a TreeView

drezaMaybe something along these lines: private void BindTreeView( IEnumerable<Opcion> OptionList, TreeNode parentNode, bool isBoView) { var nodes = OptionList.Where(x => parentNode == null ? x.ParentID == 0 : x.ParentID == int.Parse(...

But, they kind of just make a few points and then do a code dump of a revised solution, I don't know, it doesn't feel right to me
10:49
@Quill NAA'd.
@Quill that's from '13 and it's got a downvote
@Quill why? making a few points and presenting the changed code is IMO just fine...
Hey! The silent majority is getting involved in !
5
Q: Racetrack game with reading the track from a file

BrunoFor this community challenge I made the racetrack game. I'm reading the race data from a text file, which is available here. This is only playable by entering the velocity at the console. I've got two modules. I'm open for any comments. Racetrack.hs import Data.Serialize import qualified Data....

@RubberDuck Yea, I noticed.
That's great :-)
@Quill is it different from this answer of mine?
and if yes, why and how?
@Vogel612 Yes, you got way more text. More explanation.
10:52
@RubberDuck I'm not sure whether I should be more astonished at the involvement of silent majority, or the haskell answer..
@Mast not really.
@Vogel612 It reads a helluvalot better though.
The user seems to make a few points on style, and a few redundancies, and then provides a code block with a different unexplained method
I regularly got feedback here in my early days..
0
Q: WPF MVVM Navigation

YoavFollowing a lot of research and mainly based on this tutorial I came up with the following structure in my application: ObjectBase - all view models inherit it: public abstract class ObjectBase : INotifyPropertyChanged { #region INotifyPropertyChanged public event PropertyChangedEventHa...

sorry i can't understand.. can you please in brief? thanks... — saina 27 secs ago
Help?
Zak
Zak
10:56
is there a way to hyperlink users in a question?
Manually, yes
@CaptainObvious Added ...
@Zak Yea..
Advised? No
Zak
Zak
okay, but what do I actually need to write?
10:57
@Zak [Mast](http://codereview.stackexchange.com/users/52915/mast)
Zak
Zak
okay, thanks
-1
A: NodeJS logging module

Chandra Kant PaliwalNodeJs winston is logging module and transport modules for winston library also available for like mongodb, elsticsearch etc.

naa

« first day (842 days earlier)      last day (3474 days later) »