« first day (1058 days earlier)      last day (2962 days later) » 
00:00 - 06:0006:00 - 00:00

6:11 AM
1
Q: Print max no of recent duplicate words

psrag anveshI am new to C++, learning from the book primer C++ The exercise: Write a program to read strings from standard input looking for duplicated words. The program should find places in the input where one word is followed immediately by itself. Keep track of the largest number of times a single ...

 
 
2 hours later…
8:00 AM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: N-dimensional maze generation with octrees and pathfinding
 
8:19 AM
Is there any particular reason why you aren't using the explicit formula given in the wikipedia article? It seems like a simple job for memoisation, not the insanely complicated thing that you've built. Note: since your code seems to be working - if slowly - you may have more luck posting this on Code Review. There are bound to be people who will happily optimise your code as is, but if you're lucky then some people may look at the fundamentals (math/algorithmics). Just don't expect anyone to analyse this convoluted mess without a modicum of explanation. — DarthGizka 43 secs ago
 
9:00 AM
possible answer invalidation by maja on question by maja: codereview.stackexchange.com/posts/123932/revisions
 
9:30 AM
possible answer invalidation by wwr on question by wwr: codereview.stackexchange.com/posts/123981/revisions
 
10:06 AM
0
Q: Contest Scoreboard problem from uva

AbhisekThe problem statement is here. My code is running for given input but for the input: 42 7 1 U 68 1 7 C 35 8 7 U 1 5 11 R 70 9 14 I 25 4 21 E 79 9 29 E 42 3 36 R 59 8 37 R 63 9 44 R 65 2 51 I 6 7 51 R 46 8 52 U 70 5 56 E 82 3 57 I 28 4 62 I 62 6 67 U 92 8 74 R 96 9 79 C 43 2 88 I 37 3 95 R 5 2 1...

 
10:28 AM
@Duga not sure about that one.. answeer doesn't talk code directly feom a glimpse... second opinion?
@Duga adds a bunch of tests...
 
10:43 AM
@CaptainObvious broken... segfaults
 
11:10 AM
possible answer invalidation by maja on question by maja: codereview.stackexchange.com/posts/123932/revisions
possible answer invalidation by maja on question by maja: codereview.stackexchange.com/posts/123932/revisions
This question might belong to codereview.stackexchange.com — aschipfl 53 secs ago
 
11:38 AM
When you've fixed your code you might also want to take it to codereview.stackexchange.com as there are a few rookie mistakes and style issues. — Paul R 37 secs ago
do you mean that this question should belong to codereview.stackexchange not stackoverflow? Is it specifically meant for sharing code to help find mistakes? — Mahesha999 1 min ago
 
11:58 AM
No, like I said above, when you've fixed your code, you might want to take it to codereview.stackexchange.com - codereview is only for working code, but since you've just started learning C I thought you might find it helpful to get some feedback. — Paul R 31 secs ago
 
12:44 PM
@DanPantry @Quill Did I miss something in npm land? npm Package Hijacking
 
@Mast yeah, so, that's related to the left-pad incident that happened a few days ago
Essentially due to a stupid design decisions, authors of packages can unpublish them - which deletes them from the repo rather than unlisting them.
This means that anyone can then "claim" the deleted name.
with left-pad, an author who deleted that package also deleted another 200 or so of his other packages, which now have names up for grabs.
 
This must have been awful for companies relying on it.
 
It broke pretty much all of the ecosystem
Because left-pad was relied upon by line-numbers which was relied upon by babel.
and a lot of developers use babel.
 
lol
All transpiling went out the window.
 
Well, existing transpiling worked, but trying to npm i babel would cause all manner of issues
Npm re-published left-pad forcibly so that the ecosystem wouldn't fall apart
There are now discussions going on on how to prevent this from happening again
 
12:48 PM
Good. This smells like a major design flaw in the ecosystem.
 
"How do you eat an elephant" is a must-read for many beginners. I love referring to that post. — Simon Forsberg ♦ 5 hours ago
Nice. I like the idea that comments serve as a source of reviews on the blogs.
 
Your blog posts are referenced every once in a while in comments and answers alike.
 
Oh man. I just discovered how awesome IFTTT is
I have like 60 recipes now...
 
0
Q: Please what am I doing wrong with this node.js code

Acess Deniedvar http = require('http'); var fs = require('fs'); http.createServer(function (req, res){ var url = req.url; switch (url){ case '/': getStaticPage(res, '/public/index.html', 'text/html'); break; case '/index': getStaticPage(res, '/pub...

0
Q: Change HTML content which way to go

Jhon DIm having program (client side only which cannot use npm modules) that are getting html as string and need to change to content of it and return HTML string back (with modified content) . For Example:----Input--- This is the html content which is coming via input to my method <!DOCTYPE HTML> <...

 
1:02 PM
@Quill IFTTT?
 
@CaptainObvious Borked.
@Quill You probably need a lot of hardware to get that all implemented?
 
It basically lets you link two IoT devices/apps together and create cause and effect events
While I don't have a Wi-Fi enabled coffeepot, it lets you link up stuff like GitHub issues and Slack, entering work and logging hours to GoogleCalendar
 
Reminds me of how Scrap Mechanic works.
 
log hours... heh
Amazing to see such high rep users with such bad questions: stackoverflow.com/q/36247480/2792531
 
1:07 PM
Flagged as no MVCE
 
@Quill Sounds like it can save a lot of time once you've set it up correctly.
 
Maybe, I suppose I'll see in future
I feel like I might be forcing some of its use, but I suppose that doesn't apply to most users (that have a justifiable reason to use the service)
 
Flagged as too broad, there is no code.
Failing to install something is a user error, not a code error.
 
hey @Mast heh, stackoverflow.com/q/36246817/2792531 It's tagged C++, Objective-C++, Objective-C, and Swift. Also Wrapper.
I don't understand what he's trying to do...
 
@Mast meh, deployment stuff is fine too for questions. It requires error messages and all that though -- which isn't here
 
1:17 PM
@JeroenVannevel At the very least it requires steps to reproduce the problem and the exact error message.
 
A podfile is code, by the way.
 
oh sure
 
So, this could very well be on topic. But it needs to include the podfile and the error message.
 
@nhgrif He's trying to wrap something, but afar from that...
 
@Mast that's what we have the MVCE close reason for
 
1:18 PM
but it'll still end up being off topic, because I just pulled that repo and pod install ran fine.
His error is definitely something else, that that's why it's important to include your steps and error message
 
And yes, high-rep users posting crap questions is staggering. We don't have that much on CR, do we?
> This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
Ugh, JavaScript...
 
perks of doing all development as open source
 
What feature @Mast?
There are plenty of features that are non-standard. That's not "ugh, javascript".. that's "ugh, browser vendors"
 
@DanPantry String.prototype.toSource()
 
Well, it makes sense why that is not on a standards track..
It returns a description of the object as the source code views it. That probably would not work for 99% of browsers
And doesn't seem to have any real benefit
 
1:26 PM
Perhaps it makes sense for an experienced JS developer, but for a beginner it doesn't.
 
Okay sure, but that's not an issue with Javascript
 
The article or the purpose?
 
That's an issue with web development
 
careful
@DanPantry in fanboy mode
everybody clear the room
 
Says you @JeroenVannevel
 
1:26 PM
I'm not really in fanboy mode.. lol
 
stand back everyone
the javascript boys are at it
 
But it seems pointless to complain about different implementations of javascript having different methods
Different implementations of the C++ compiler do different things
 
I was actually looking for something like isUpper() and isLower(), but I can't find those...
 
No I agree, I just like to watch the chatroom burn
 
toUpperCase/toLowerCase
 
1:28 PM
@DanPantry That's to change them, I want to see the original case.
 
...oh
you're probably going to have to use a regex for that
 
That's not a bad idea.
 
I'd hope that toUpperCase and isUpper do drastically different things.
 
/[a-z]+/.test(....) might do it
 
Although...
 
1:28 PM
Yeah sorry that was a brain fart
 
If there is no isUpper, you can always....
func isUpper() -> Bool {
return self.toUpperCase == self
}

func isLower() -> Bool {
return self.toLowerCase == self
}
 
I could look-up the value and see whether it's A-Z or a-z, but that's hacky.
 
lol, the bodge is real
 
@nhgrif Hey, that would work.
evil grin
 
@Mast /[\sa-z]*/.test(yourString) will return true if the string has 0 to many matches of whitespace character or any character between lowercase a to lowercase z
but yes that would probably be the "simplest" way :P
 
1:30 PM
I tried to solve my problem with regex. Now I have to problems.
 
let i = 0;
while(let ch = str[i]) {
    if !(ch >= 64 && ch <=90) { return false; }
    i++;
}
more performant
do it
 
0
Q: Strange answer solving Euler new #8

Steve FanI have written the following code public static void Main (string[] args) { string q = "73167176531330624919225119674426574742355349194934" + "96983520312774506326239578318016984801869478851843" + "85861560789112949495459501737958331952853...

 
uh
Why do you write that as a while loop?
 
1:33 PM
@nhgrif I think the joke was that it was intentionally unperformant
 
I don't think so.
 
why would it be unperformant?
it's legit code
 
It is.. I just don't like i dangling outside of the loop scope.
 
the while will let it return early if it encounters a non-upper character
 
because bad regex screws you over
 
1:33 PM
regex is expensive
 
while loops can be faster than shitty regexes
 
always doing toUpper is also expensive
 
@JeroenVannevel you could do the same with a for
 
Isn't the C# implementation of that a bit better @JeroenVannevel?
 
@nhgrif sure, in the end a for is translated into a while anyway. But it expresses the intent quite clearly
 
1:34 PM
@Quill that five.js thing is hilarious
 
I thought the culture invariant ToUpperCase wasn't too expensive
 
@Quill Obviously. C# is always better
 
@DanPantry yeah... It also has 91 pull requests
 
@Quill It's still going to make every character (possibly) uppercase in every scenario -- that's a cost you can't deny in a hot path
 
@Quill relative to the implementation @JeroenVannevel posted, toUpperCase approach I posted is really expensive
 
1:36 PM
It's not (just) about the fact you have to do the uppercase conversion
you're also allocating a new string every time
that's the real trouble (most likely)
 
No matter how efficient toUpperCase is, the approach I posted, while very simple, requires each character be passed over once for the toUpperCase implementation and then once until the first inequality when doing the comparison.
And yes, there's the trouble of allocating the space for the string.
Consider a string thousands of characters long.
 
It internally makes a new string for each character?
 
no
ugh... Quill, c'mon...
Let's consider a string one thousand characters long, which takes one thousands bytes (plus overhead) in memory.
 
hmm. it might be time for another coffee...
 
To do the approach I first posted, we need to allocate one thousand bytes of memory, then we need to push into that memory the upper case version of each character in the original string.
Then, and only then, we start comparing one character at a time to verify all characters are identical. == will be optimized to early return at the first difference, but nonetheless, this is the second pass over the characters.
@JeroenVannevel's approach doesn't require memory allocation or copying the string's upper case version into that memory. It just looks at each character one at a time, determines if it's a lower case character or not. If it's lower, it early returns, and if it's not, it continues on.
In a one thousand character string, my approach must pass over each character at least once just to do the copy (plus allocate that memory in the first place).
@JeroenVannevel's solution could stop after just comparing a single character
 
1:41 PM
yeah... I read the first few messages wrong
 
Now that we have established I'm a master in performance, let me share this interview question the London guys gave me
I found the solution in 3 seconds, give or take a second. No pressure
 
is it "what's your name?"
 
Given an int[] initialized with values 1 to 99 in order but one value is missing
how do you find out which value is missing?
 
for (index, value) in thatArray {
    if index+1 != value {
        return index
    }
}
 
That's O(n)
Doable, but can be a factor better
 
1:44 PM
It works though (or it'd be close... probably need to return index + 1)
 
I'll go brush my teeth and give the answer when I'm back
no takers, I see
The approach I went with is the same idea as a binary tree
 
0
Q: Creating tables for a DAO implementation in H2 database

salamanka44I want to start a project using the DAO pattern following this schema : All the ID here are string because I don't want to have incremental ID: but I want to generate strings to be ID for my objects. (For example, my first project will have an ID like this one "EUHDTG458AD", the second will ha...

 
Take the element at i / 2, in our case it's index 50 (or 49?) at first iteration
for simplicity reasons I won't bother with the .5 fraction
you have to do some rounding for that
once you have that, say index 49, we also know what value we expect: 49
if the value turns out to be 50, it means there is an element missing from the left-hand side
 
right
 
if not, the missing element is in the right-hand side
continue doing that until you're at the missing element
it's a binary tree traversion but slightly modified
 
1:57 PM
I give up.
JavaScript can go to hell.
 
Well, the difference though @JeroenVannevel ...
mine is probably good enough and takes no time to implement at all.
;)
 
I'm voting to close this question as off-topic because code review request — Martin James 50 secs ago
 
Oh man, IFTTT can dim your house lights to a blueish color if it rains
 
Anyone familiar with VB.NET enums?
Does VB.NET have anything related to C#'s using static?
 
2:02 PM
@nhgrif Not valid on an enum declaration.
And I already knew Shared == static.
C# has a thing like this:
using static System.IO.FileMode;
When you declare that, you don't have to state FileMode.Append, you can just use Append.
It is nasty, yes, but I need to account for it in my analyzer/code fix for Roslyn.
I'm trying to find potential edge cases for my VB.NET analyzer/code fix because I'm not familiar with VB.NET.
 
0
A: Should we have a Code Review Blog?

TersosaurosYes, let's have a blog. And here is why... Code Review is different to (most) other StackExchange sites, and the ones it is similar to are the ones with good blogs. My thoughts regarding naysayers on the point of content The big difference with Code Review is in the content, and the way we go...

 
downvote applied
 
@nhgrif fair enough
@Hosch250 according to stackoverflow.com/q/3895280/1864167 yes: just Imports System.IO.FileMode
 
@JeroenVannevel Thank you. Now I know about another bug.
 
You already had that bug.
 
2:09 PM
schrödingers bug
 
@JeroenVannevel didn't commit a bug into your codebase.
 
Yup, I phrased that wrong.
And I'm not being sarcastic either, I'd rather find it than have the Roslyn team find it.
 
I think I'll write some code on the way to Paris. Gotta love travelling first class: wifi and power outlets baby
 
Actually, it works.
The only thing that is broken is the Simplifier, and they have an issue for that being broken in VB.NET.
 
> Let your dishwasher communicate with you, no matter where you are.
Well that's a phrase I didn't think I'd ever hear
Monking @PinCrash
 
2:22 PM
Monking!
 
Sometimes technology is kind of stupid...
 
@DanPantry IoT magic. It's going to save ánd ruin the world at the same time.
 
What's the value of your dishwasher communicating with me?
Refrigerator, sure
 
Yeah, exactly. It can't load itself. Same thing for washing machines
 
I'd buy this if perhaps the dishwasher were designed to be preloaded with like a month's worth of detergent
and it needed to tell you when you needed to add more soap
 
2:23 PM
Now, a self loading dishwasher, that would be interesting.
 
Or if dishwashers had filters that needed changing
 
Note that by using the simple .hashValue property of the simple String representation of the properties in the struct, the hash values might not have a very good distribution, increasing the risk of hash collisions. It would probably be advisable to use e.g. the DJB hash function, as described in the answer to this Q&A. — dfri 9 secs ago
 
@internetofshit, In your stuff
Obviously the best thing to do is put a chip in it. Tips: internetofshit@gmail.com / Key: 6956F195
1.3k tweets, 79.8k followers, following 43 users
2
 
2:38 PM
@nhgrif I did, I said .
 
0
Q: C# Bitwise operator classes

denisI'm creating a console app that has the purpose to teach you how to use C# bitwise operators. I have several classes which contain info about the different operators and I instantiate/add them in the main class like this : var trainingDefinitions = new TrainingDefinitions(); var ...

 
and what did you want?
 
Well I am looking to get started on programming for , was wondering if you had any suggestions.
 
on OS X or Linux?
 
OS X, first.
I need to get into iOS development, so I'm going to pick up a 27" iMac tomorrow.
 
2:49 PM
You already know OOP, right?
So just start doing some iOS development.
Make a calculator app.
 
Alright
 
And.... when you get your OS X environment set up, let me know and I'll give you a few steps to get some extra set up that will really help with enforcing good Swift habits.
 
Alright, I'd appreciate it.
I'm going to the Apple Store on Monday to pick one up.
 
here, I'll give you some notes in case I'm unavailable tomorrow.
You'll want to install Homebrew in OS X. It's a tool that easily lets you manage adding other tools and such.
Then you'll want to use Homebrew to install the Metova fork of swiftlint:
$ brew tap metova/tap
$ brew install metova/tap/swiftlint
 
@nhgrif What would one do to setup a Swift environment on Linux?
 
2:58 PM
I've never done Swift on Linux. But I think that swiftlint & homebrew should also work on Linux too.
So, once you have swiftlint installed, you just cd into the root of your project directory and run the command:
$ swiftlint
it'll tell you where all the errors are. ;)
 
Alright, thanks.
 
but if you're using Xcode, you can set up a build phase that will generate warnings & errors in your project so you can more easily see & find these errors
plus swiftlint autocorrect will fix a lot of the things too
 
Yeah, I'll definitely be installing XCode when I get it all setup.
 
@EBrown That's one way to get into it :P
 
3:25 PM
possible answer invalidation by Jamal on question by Gyorgy Szekely: codereview.stackexchange.com/posts/123549/revisions
 
3:37 PM
Maybe this is better asked in CodeReview? — Mikko Viitala 1 min ago
 
0
Q: Bowling scoring kata

ydaetskcoRI've been writing basic Python scripts for a while now to help process data or automate some task but I've decided I should start picking up unit testing and objective orientated programming (the vast majority of my scripts so far have been procedural). As a starter I decided to follow along wit...

0
Q: Add fraction and integer using template class and overloading

UnbreakableQuestion: Need to create three classes. Number Fraction Integer Requirements 1. The first class should support “display”, “==”, and “+”. "Display" : This operation displays the Number itself in its original form. "+" : This operation adds the number itself with another number and returns a ...

0
Q: Command for inequality of char

Shinjinee MaitiI want to ask the user about whether he wants to continue playing or not. For this I have used, char choice; do { System.out.println("Would you like to continue?(y/n)"); choice=sc.nextLine().charAt(0); if (choice!='y' && choice!='n') { System.out.println("Inva...

 
 
1 hour later…
4:50 PM
the current state of JavaScript programming https://t.co/nVDGoHfj9B
 
If only Xcode would also run on Linux, it looks like a great IDE. I might even set-up a VM just to run it.
 
I think you will get better support here: codereview.stackexchange.comimoteb 43 secs ago
 
5:10 PM
Night
 
0
Q: Remove the objects sibling on click

Jbur43In my program below I am getting the parent node game 1 and then removing one of the two child nodes, depending on which one is clicked. I currently have two event listeners, with two separate functions for removing one child vs the other. It doesn't feel very dry to me, and I think I could benef...

 
Monking
 
5:33 PM
guess who's on his laptop on the TGV to Paris now, baby
I love USB tethering
Gotta use it while I'm still in Belgium
 
0
Q: Is it more proper to use gcc or g++ while compiling a question in the C Language tag?

pacmaninbwI answer a question with a C language tag and got down-voted for using #define rather than const or static for defining constants. One of the constants is defined in terms of the other constants. When using #define this compiles fine using gcc, when using const I get a compilation error. gcc forc...

 
@StackExchange .....
@JeroenVannevel Job interview?
 
@Mast nah, vacation
I'm going to Poland from Mon-Sat
 
@JeroenVannevel Paris is the wrong way if you're going to Poland.
 
But we're flying from Paris tomorrow so we want to get there in time
@Mast Don't worry, I consulted a map before booking everything
 
5:42 PM
Flights in Belgium are restricted?
 
Zaventem doesn't fly for several more days
 
Zaventem isn't the only airport though I hope?
I can imagine the rest is having a capacity problem at the moment, but still.
Ah well, have fun in Paris :-)
And Poland.
 
Looks OK to me.
 
@Hosch250 Wasn't me, but author admits he doesn't know much about the code. Looks bad. Could've caused it.
Writing good answers is hard.
 
5:57 PM
@Mast There sure isn't much code in the question, that is perfectly understandable.
 
6:19 PM
0
Q: Using custom aliases for physical units - downsides?

ThomasSince I use C++ mainly to do physical calculations, I often come across the problem that I forget which units a certain variable is in, e.g. radian or degree, or meter vs. millimeter. For this reason, I started using a custom header file defining my units, which is posted below. The basic idea i...

 
6:34 PM
-3
Q: Genetic algorithm, cannot find issue

Giancarlo Gattipublic class Individual { private static int geneLength = 5; private int[] genes = new int[geneLength]; private static int[] solution = {0, 0, 0, 0, 0}; private int fitnessScore = 0; public Individual() { for (int i = 0; i < genes.length; i++) { genes[i] ...

 
@CaptainObvious Your question definitely has an issue. Or two.
 
Don't forget to add to the original question's table of contents when adding answers:
5
Q: Code Review Blog Library

nhgrifI really enjoy reading some of the answers posted by Code Review users. Where can I go to get more helpful advice for improving my code from these users? 418 Status importBlogKit Journal of daily hacks Loki Astari To keep this organized, please post one blog per answer. Answers should inclu...

 
Is a question about best practices appropriate for Stack Overflow? It seems better suited to Programmers or Code Review. I'm inclined to say "is this a good or bad technique" is too broad here. — Waleed Khan 19 secs ago
@WaleedKhan This question would be closed as hypothetical on Code Review. — nhgrif 25 secs ago
 
1
Q: Issues with a Basic Neural Network in Julia

dsansI recently finished programming a feedforward multilayer artificial neural network in Julia. The network is trained by means of Stochastic Gradient Descent (the basic version; no regularization, no momentum, no decay, no anything), and the gradient is computed by means of backpropagation. I alrea...

 
It should be closed and re-asked on Code Review tbh. If you are worried about reputation, I will go ahead and like your post if you remove it from here and post it on the correct site :). — Floam 23 secs ago
@Floam Again, Code Review would absolutely not be the right site. And perhaps importantly, this question is getting a quite good response here on Stack Overflow. There are already 4 answers and 6 upvotes with 0 downvotes and 0 close votes. — nhgrif 14 secs ago
@Floam Completely disagree that it is for Code Review. Also, it's generating a desirable response with it... what is your issue with it here? — Donkey Kong 46 secs ago
 
6:46 PM
lul
WaleedKhan says it's not a good fit for SO... and then posts an answer.
 
Well, neither of those questions would be a good fit for Code Review, @WaleedKhan. They might be fits for Programmers... but you should definitely double check their help center (I'm not really an active Programmers user). — nhgrif 9 secs ago
To ask this question on Code Review, it'd need to be in the format of "Here is my fluent interface. Is it well-implemented?" — nhgrif 40 secs ago
 
@nhgrif That's something I've seen over the whole of SE, including CR.
It's frowned upon, but usually not acted on.
 
7:10 PM
0
Q: Script that retrieves trending topics from Twitter

DomStapletonThe following code fetches trending topics from Twitter's API using a WOEID. It caches the response, loading from this cache the next time if its relatively fresh (generated within the last 15 minutes) to avoid returning a "Rate limit exceeded" message from Twitter. A 'force-refresh' flag can be...

 
7:29 PM
0
Q: How to remove this processing bottleneck?

TumsI have some code that reads a file and then does some parallel processing of the data. There are millions of lines in the file and this section of the code is the bottleneck in my program. Any information on how to improve processing times or any other suggestions to improve the code (e.g. error ...

 
That code is migrating right for the spring.
Two questions posted within moments of each other... "halp my app is crushin" and it's just a breakpoint..
 
8:00 PM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Implementing a (small) full-text search in Ruby
 
8:14 PM
0
Q: Repository pattern EF6

infis99fellow devs. I am working on a generic repository. And I wondered if anyone could give some feedback on it. Interface for DbContext: public interface IDbContext { IDbSet<T> Set<T>() where T : class; DbEntityEntry Entry<T>(T entity) where T : class; void SaveChanges(); } Context c...

0
Q: A scalable lock-free channel

OneOfOneHere's my lock-free channel impl lfchan, I didn't want to copy/paste the code here since it is multiple files. I'm trying to get an idea of what can be improved or if there are any bugs in it.

 
This stupid question is amazingly still open.
 
8:33 PM
0
Q: crud operation in a file using servlet and jsp

razI'm gonna have a file that data for serialization in the crud that's been done in the field files (tested and had no problem with the console) were actually my database file (multi-layer architecture has been met) I want to jsp and servlet using the operation was to do was help guide how to do ??...

 
importblogkit.com/2015/07/does-not-work <-- this is the article I link people to most...
 
@nhgrif Think you could write an article about the most important CS concepts?
 
8:54 PM
what would that look like...?
 
I don't know.
Maybe a brief description of the skills most people you interview lack.
 
9:19 PM
Sometimes even moderators write crappy questions and still get away with it.
13
Q: How do I ensure a piece of code runs only once?

Byte56I have some code that I only want to run once, even though the circumstances that trigger that code could happen multiple times. For example, when the user clicks the mouse, I want to click the thing: void Update() { if(mousebuttonpressed) { ClickTheThing(); // I only want this to h...

@nhgrif I've linked to your elephant post when people were obviously doing too many things at the same time without having a clue how to actually tackle it.
 
0
Q: How to avoid duplicates in code caused by using different Types?

CheerfulCalfThe goal of following MVC controller code is to achieve following workflow: User exports catalog (either with items of type Spread or of type Consumables) to Excel; User makes changes in exported Excel file; User uploads catalog to web; User preview his changes before committing to database....

 
9:31 PM
Code Review is definitely not appropriate for this kind of question. That site requires working code. — TigerhawkT3 7 secs ago
 
> It's essentially a file that, when called, hides itself in a box and refuses to come out until you forcibly unpack it.
 
9:45 PM
> If a function fails to uphold what it has sworn to do, it is wrong and must be punished.
Who said programmers have no sense of humour?
 
9:55 PM
Hey @Mast
 
wave
> The only way to ensure your program meets its requirements to absolutely forbid code that fails to do so. With Vigil, it will do this for you automatically. After enough runs, Vigil promises that all remaining code meets its oaths.
All offending code gets eliminated. Shiny language.
 
Maybe your 10 line function code was all-right but it had a one-char typo to fail its swearing and now it's gone ;P
 
10:27 PM
6 hours of working on a problem, trying to find out why some test passed but trying the code for myself caused problems
Turns out the test was never actually called
Forgetting the [TestMethod] attribute is so treacherous
Time to escalate priority for github.com/Vannevelj/VSDiagnostics/issues/278
 
@Caridorc 10 line functions with a typo are not all-right :P
 
-3
Q: i could not find adb.exe on task manager in android studio widows 7

b.a.aI am using Android studio and I have Problem when I am running the application .To solve it I have to end process the adb.exe on task manager but I could not find adb.exe on task manager. So my question anybody know how to add adb.exe on task manager? thanks..

lmao
 
some interesting notes about optionals in Swift:
3
A: How do Generators whose Element is Optional know when they've reached the end?

nhgrifIt's important to note that whatever type a generator is generating, it wraps that type in an optional. The GeneratorType protocol declares an associated type which it calls Element and a method, next(), whose return type is of type Element?. Whatever Element is, next() wraps it in an optional ...

 
I messed up my Roslyn build horribly.
It was working yesterday, but I can't get it to build in some projects I didn't even touch now.
I didn't even do anything except try to add a couple tests. I think something happened when I merged branches yesterday, maybe.
 
10:45 PM
Please don't put ! in your code. You're not a Jedi. — nhgrif 6 secs ago
 
Even switching branches doesn't work.
Cleaning and rebuilding doesn't work.
 
11:00 PM
Hmm, it appears I'm referencing things multiple times.
 
11:37 PM
! <-- emoticon for "lightsaber"
 
Monking
 
11:52 PM
0
Q: not found: value Rotor (Upgrading 2.9.1 Scala Program)

Jeremy WrightI am upgrading a scala program as a way to learn scala, and I do not understand the error I am getting: import collection.mutable.ListBuffer class Rotor(var rotorMap: List[(Char, Char)], val notch: Char){ def this(alphabet: String, beginPos: Int, notch: Char) = this( Rotor.rotate((Alphabe...

0
Q: Rust, read from stdin and parse

sammkoI've recently started learning Rust, and I've managed to whip up this function, which reads and parses.. a thing from stdin. I don't like it though, I feel it could be further simplified. use std::io; use std::str; fn read_thing<T: str::FromStr>() -> Result<T, &'static str> { let mut buffer...

 
00:00 - 06:0006:00 - 00:00

« first day (1058 days earlier)      last day (2962 days later) »