« first day (912 days earlier)      last day (3105 days later) » 
00:00 - 18:0018:00 - 00:00

12:00 AM
RELOAD! There are 1544 unanswered questions (94.5584% answered)
 
Interrupt is officially dead.
6
Compliments of @SimonForsberg.
 
12:14 AM
Hola!
@Hosch250 Interrupt is dead? I assume that you mean that the tag is no more.
 
What's a semaphore? Or do I really want to know?
^^ Had been going on for a while. Was fun at first but it got old...
50% off Halloween candy at the store... 3 Musketeers <3
 
12:36 AM
Hey @Edward!
How're you?
 
@SirPython I'm just lovely. Crazy busy, but good.
 
@Phrancis Exactly.
 
@Phrancis Guess I haven't been around for a while and hadn't seen that.
 
Yay. I finally got my fanatic badge.
10
 
@Phrancis A semaphore is a locking technique used to enforce mutual exclusion.
See you later.
 
12:38 AM
@SirPython The first step is admitting you have a problem. :)
8
By contrast, I've been backing off of late due to limited time available for CodeReview fun and games.
 
@Hosch250 Locking of... threads? Memory?
 
@Phrancis Could be any resource that requires sequential access.
For instance, having two different programs print to a printer is useful. Having them interleave their output probably less so...
4
 
Ahh ok
Reminds me of locks, in databases... guess it's the same kind of concept
 
Yes, very similar concept.
 
Is a semaphore generally a type of... object?
 
12:53 AM
If this is working code that you think could be improved, see Code Review. If not, please clarify the issue. — jonrsharpe 1 min ago
 
The name is originally from railway semaphore signals. Google that and you'll quickly get the whole history.
 
OK
 
@jonrsharpe: The code as it stands does work, except for the name-based assignments in the construction. I could also remove the IndexAccessor class and replace the for loop as described under Question, which would break the code. Would that be preferable over moving the question to Code Review? — FriendFX 7 secs ago
 
Hey, did our percentage go back up a bit?
 
If you mean unanswered, yes, a bit.
 
1:04 AM
Just a bit, but now it rounds the other way. =)
 
One of these days, I'll have a weekend I can just spend sipping tea and destroying zombies...
 
I've been out of RD too long. I've forgotten how fun it was and I keep wishing I could build useful, like the Office apps are.
That would be an interesting team to work on, I think.
 
I like both research and design, but I'm tending more toward research lately.
The only problem is that there are too many interesting things to investigate. It's hard to focus on just a few at times.
 
And here's me, praying for a little bit of greenfield.
Or really just something that isn't untangling a decade of spaghetti.
 
@RubberDuck Are you doing too much code maintenance these days?
 
1:16 AM
You could say that @Edward.
I honestly can't decide if my predecessor was an idiot or a genius. There's just no way anybody can hold that much global state in their head.
 
Put me down for a vote for "idiot"
 
but it all works
And that amazes me.
 
Sure. And the Jenga tower still stands until...
4
 
That ^
 
And of course, YOU are the guy who broke it. :)
Been there; done that, but not for long.
 
1:19 AM
It is satisfying when I add a new feature and a whole section of legacy code has a bunch of green tests though.
 
That's a good way to approach it -- write tests that the current crappy code passes, toss the code and re-engineer new code that passes all tests.
 
I'm lucky in that dept. I don't get blamed for it when it breaks, and I'm given time to make it right.
Lol. Yeah. That's basically what I've been doing.
 
That's important. Take advantage of that by not becoming the guy your successor swears at!
 
I'm writing a recommendation report on security.
 
@Hosch250 Are we for it or against it?
 
1:21 AM
Oh, I'm sure my current predecessor curses me a good bit @Edward
 
1) This is no debugging service, nor a code review site. And pleaser take the tour, learn How to Ask and provide a Minimal, Complete, and Verifiable example. — Olaf just now
 
Against it!
 
I used a two-factor auth idea designed by two MS researchers and a college somebody from Asia.
 
Fun story: I found several SQL queries in configuration files.
 
1:23 AM
It is built as a wrapper over the old auth system so it doesn't affect any legacy code.
 
@Hosch250 You probably already thought of this, but make sure you don't fall victim to a backwards compatibility security vulnerability.
 
@RubberDuck You... what!?
 
The idea was to prevent data breaches.
They covered how the system could be more vulnerable as well as more expensive if it was built from scratch because some bugs could be introduced.
 
That may be sound if the upgraded version only uses the more secure protocol.
If it can negotiate to do either V1 (not secure) or V2 (secure), it's a potential problem.
 
It didn't know any implementation details about the old version, it just passed any data needed by the old system through.
It is supposed to be a complete wrapper, so the old version can only be accessed through the new version, and the system can only be accessed through them both.
 
1:31 AM
Sounds like the right general approach to me.
... if the old interface is no longer accessible.
(Otherwise, guess which interface the Bad Guys will try to exploit...)
You probably know all of that, but it's a common design flaw.
 
Actually, no, I didn't.
I've never really studied this before, and I still don't know enough to really implement one.
The thing is, my professor is just a writing professor, and I had to write a recommendation report on something I found in a news paper within the past year.
In my state.
So, I just have to make it sound realistic.
 
Ah, then you're probably OK.
I was thinking this might be a real world implementation rather than a paper on a recommendation.
Both useful, but the paper's easier to secure. :)
 
Oh no, I would much rather be doing a real world implementation.
 
I'm sure that's true.
Cybersecurity is notoriously easy to get wrong in catastrophic ways.
But it's interesting to work on.
 
I know.
That is about the only thing I really know about it.
 
1:37 AM
That puts you ahead of 50% of the pack!
 
LOL.
 
Gotta go. Good luck on the paper!
 
See you later.
 
Good night!
 
2:09 AM
@Phrancis... Yeah. You heard that right.
SQL queries, stored in configure files, being executed as raw text at runtime.
 
2:28 AM
0
Q: Are there any Haskell IO gotchas I'm overlooking in this snippet?

syrionI am implementing the Bishops problem from Kattis in Haskell. I have verified that my (very simple) formula is correct, and it seems to work in manual testing. It passes the first test case, then the second test case fails with "wrong answer." As is the tendency of online judges, that's all the i...

 
@RubberDuck That's a shame...
@CaptainObvious Fails...
 
I guess the one and only site-meme I started has died
 
Memes come and go
 
2:50 AM
Hello people
 
Hello
 
I was wondering, can I ask more general questions on code review, as long as they pertain to actual code I have written?
 
As long as it's your code, and it's not hypothetical.
 
Cool!
 
And assuming it works as well.
 
2:53 AM
Also, I was wondering, when asking a question, the tips say to indent code by 4 spaces. This is a pain. Why are there no code tags?
 
There is a button above the editing box that looks like a {}, highlight your code section and press that button
 
@EthanBierlein, thanks man!
 
No problem! Welcoem to Code Review! :)
 
Thanks :)
@EthanBierlein, so what do you do?
For work
 
I actually don't have a job yet.
 
2:56 AM
Still in school?
 
I'm still in high school.
 
Nice!
 
I do intend to get a programming job once I finish high school, or college though
 
That's awesome. Do you know what subfield?
 
Oh gosh, I was thinking game design, but I'm starting to think programming language design is more what I might be interested in.
 
3:00 AM
Cool!
@EthanBierlein, I saw a really cool sandbox game, where the players can make their own spells via programming
It's still in dev stage right now, but it might be something you'd be interested in
 
What's it called?
 
I downloaded / bought the demo on steam
It's pretty fun, even though it's not done yet
 
Dang, it looks pretty awesome
I take it that it uses a scratch-like system
 
yes
 
I wonder if they'll add a text-based system
 
3:04 AM
I hope so!
I might cry if it never gets done
 
I like the quote at the beginning of the trailer:
> "The programmers of tomorrow are the wizards of the future." - Gabe Newell
 
Hahah, yes
I made a spell that derives from a water parting spell.
The original version shoots an orb, that part water away
My version, shoots an orb that orbits the player, so you can walk around, and water just parts for you
 
That's pretty cool
 
#moses
 
3:09 AM
0
Q: Takes a list of tuples and makes a new list without the repeated tuples

YGarciaSo I made a function that goes through a list of tuples that contains the maker of a car, city mpg, and highway mpg. def maker(mileage_list): maker_list = [] for line in mileage_list: if line[2] not in maker_list: maker_tuple = (line[2],int(line[0]),int(line[1])) ...

 
So, are you planning on asking a question?
 
3:27 AM
@EthanBierlein, are you talking to me?
 
3:40 AM
Welcome to Stack Overflow! Actually, your question is off-topic on this site. Stack Overflow is for questions like "My code isn't working, can you help me figure out what I'm doing wrong?" Questions of the type "Is this code correct, or could it be better?" actually belong on codereview.stackexchange.com, rather than here. You'll get much better answers over there. — rmunn 13 secs ago
 
@EthanBierlein, yes, I'm writing it right now
It's a c# game interface problem
 
Cool
Ping me with the link when it's posted.
I'm off to bed. Night @all!
 
@EthanBierlein
0
Q: Organizing interfaces for player movement

NathviSo, I'm trying to figure out how to use interfaces in my game to make my code more modular and easy to reuse for other things. So far I have a person class that looks like this: public class Person : IPlayer { public void Jump() { } public void MoveLeft(int distanceToMove)...

@EthanBierlein, night
 
4:05 AM
0
Q: Organizing interfaces for player movement

NathviI'm trying to figure out how to organize interfaces in my game to make future development easier, by making my code more modular. So far I have a person class that looks like this: public class Person : IPlayer { public void Jump() { } public void MoveLeft(int distanceToMo...

 
4:16 AM
@EBrown If you look at "top users" for the Scala tag, I am not the top user in either total votes or questions answered. I am but an egg.
@Nathvi That's stub code, which is off topic.
 
5:10 AM
@BigBoss There's a number of other issues in your code, including a couple of copy-paste errors. Once you get things working, might be a good idea to submit your code to StackExchange Code Review. — Robby Cornelissen 35 secs ago
Wrong Section. Try going to code review codereview.stackexchange.com3kings 35 secs ago
 
1
Q: my laravel php code

asd<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Http\Requests; use App\Http\Controllers\Controller; use App\StaticModel; use App\PageGet; use App\ReviewPageGet; use App\ReviewMainPage; use App\OwlComent; class MainController extends Controller { // Главная стран...

 
Monking
 
0
Q: Java Lottery Improvement

user5514478Hi everyone if anyone has the time can they look over my code and how I can make it better I would really appreciate the help. Any input is helpful, especially how I can avoid repetition without the need to replace the user guesses. Thank you!!! import java.util.Scanner; public class Lottery { ...

0
Q: Clojure word count

Ray ToalI'm fairly new to Clojure and looking to improve my use of the proper idioms, and make my code more readable. Here's the problem: Read from standard input and produce the count of each word to standard output, sorted by word, with a single space between the word and the count. Sort the output...

 
6:30 AM
Probably this question should then be asked in Code Review — Charlie H 10 secs ago
Why would it be asked in code review? — Spencer Wieczorek 55 secs ago
@CharlieH on Code Review the code in question needs to work. Broken code is off topic. — Heslacher 53 secs ago
 
7:08 AM
What's that you ask? When my birthday is?
Why lucky you, it just so happens to be today!
 
Happy birthday @JeroenVannevel !
 
7:43 AM
Happy birthday @JeroenVannevel
5
I was about to wish you a happy birthday and tehn I got an email which told me it was your birthday. Thanks FB.
 
codereview.stackexchange.com would be more appropriate for this. — Kitler 50 secs ago
 
0
Q: Simple functions class

Josh HallowSo I wrote this code a while back and recently I have been re-writting most of my code, I just wanted to drop a quick question to whever these methods can be improoved? any of them.. must mainly the ones that pop out to be are listed below, others don't matter 100% methods that need improving: ...

 
8:06 AM
0
Q: How to post updates/implementation of changes afer code review?

Bartosz I have asked for a code review in a post, and I have received a nice feedback. I would now like to implement the suggestions, and possibly get a new feedback ("Yes, that was the problem, good fix" or "No, dude, you got it all wrong because..."). Can you please tell me what should I do, so that ...

 
happy birthday @JeroenVannevel
5
Also, monking
 
8:22 AM
@JeroenVannevel Congratulations!
 
8:52 AM
Gracias chicos
 
9:12 AM
0
Q: Calculate ETA and then Find shortest route swift iOS

riddhi1991993I have referred this link to find the Shortest path covering all the points once. Recursive function to show directions for multiple locations This is the output and this is working perfectly. Now I want that if I have to reach at Saint Gothard road which is shown in image at 10 a.m. and at Duk...

 
0
Q: Edit dispute - Indentation on questions

PimgdThis suggested edit was rejected, https://codereview.stackexchange.com/review/suggested-edits/47333 As it should be - rolfl here has the correct reason, "Whitespace "fixes" should be part of an answer, not an edit. Please do not fix code problems in the question." Example: public boolean newCo...

 
9:24 AM
when you post this question on codereview, delete it here. crossposting is frowned upon. :) — Will Ness 47 secs ago
Well isn't this here offtopic? Stackoverflow ontopic rules say you need a specific problem you can specify. But the request for reviewing code would better fit to CodeReview exchange, wouldn't it? — Zaibis 24 secs ago
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com — e4c5 42 secs ago
 
Zak
Monking @all
 
Monking @Zak
 
9:39 AM
hey @Zak
 
possible answer invalidation by Popey Gilbert on question by Popey Gilbert: codereview.stackexchange.com/posts/66830/revisions
 
Zak
10:04 AM
@Duga I think should be rolled back as was mentioned (in passing) in an answer. but would love a second opinion on that.
 
I also think it should be rolled back
it makes @Vogel612's answer look silly when he points out the name
 
metaaaa
0
Q: Edit dispute - Indentation on questions

PimgdThis suggested edit was rejected, https://codereview.stackexchange.com/review/suggested-edits/47333 As it should be - rolfl here has the correct reason, "Whitespace "fixes" should be part of an answer, not an edit. Please do not fix code problems in the question." Example: public boolean newCo...

I edited it
because in this case
There's nicely indented code on the guy's github!
 
hello @Pimgd its been a while :)
 
So telling people their code is badly indented is like saying "you suck at copy pasting", which isn't really gonna help their coding skills
@DanPantry Hello =)
 
@Pimgd I think there's a grey area between whitespace errors that are clearly due to a copy paste and errors that are due to crappy code practice
 
10:14 AM
what do you mean?
 
for example, if you paste code and an entire section of it is clearly indented the same way, but differently from everything else, I would say that's probably a copy/paste error. Whereas if indentation is all over the place it is probably just bad code practice (and should be an answer)
And that has happened to me before - when I paste code into the edit box and then highlight it to click the 'code' button but I miss a line or two
 
@Pimgd That changes quite a bit.
 
To me, that edit looks a lot like answer quality than "oops, you made an error" quality
And yeah, there's a lot of whitespace editing that isn't just fixing copy/paste errors.
For example, there's the removal of superfluous lines.
 
Yep, looks to me like someone put it in their own IDE and hit autoformat there,
 
3
Q: C# Remove unwanted characters from a string

LirenFrom what I've seen in other posts, if I actually know the unwanted characters, then I can do string.replace(). But in my case, any characters can appear in my input string, and I only want to keep the characters that I want. (Without messing up the order of course). My code is way too messy: p...

0
Q: Get Querystring values

omtechguyIs there an option to make the code more efficient in terms of performance? int integrationId; int.TryParse(Request.QueryString["integrationId"], out integrationId); if (integrationId> 0) { Response.Write("test: " + integrationId); } Btw, ...

 
10:16 AM
You could argue that saying "your indentation sucks" is not conducive to a good review, but silently editing the code to fit the expected indentation isn't very conducive to a good review either, the difference between the two is at least in the first place there is room for elaboration and the OP actually learns why his indentation sucks.
 
I'm saying "your indentation sucks" is a meh review
 
@Pimgd There are two different problems here.
In your specific case, that's true. However, we don't review code behind a link for a reason.
We simply don't care how it looks on GitHub.
Because if we start caring, the end is lost.
 
I have a weak counter argument to that
but it might be unrelated
in that that we require code to not be example code and ideally from a project you own or maintain
so the origin of the code is somewhat cared about
 
I'd say that only strengthens my point.
The code as OP posts it should be as OP intends it. No MCVE'ing, no indentation fixes by others.
 
... are you saying that for this specific case, you'd decline a fix of indentation only?
 
10:21 AM
I'd say we shouldn't look at specific cases here because it forces us to read links. We don't do that.
 
I personally think that if I had seen this edit, I would have rejected it as well
 
Zak
IMO, it's fine to format a code block as a code block (if it's been missed / mis-formatted). Everything beyond that should be by the OP's hand only.
 
Also, we have plenty of higher-rep users which could take care of that. No point in letting low-rep users do that, only gives extra work.
 
Okay, so I have over 10k rep here, would you object if I fixed it?
 
@Pimgd If you have experience with the language, no, go ahead.
 
10:22 AM
Thing is the linked review didn't just fix whitespace errors
It changed the meaning of the code
 
I've seen @Mat'sMug do it in C# couple of times where he was absolutely certain it was a copy-paste error.
 
@DanPantry that's why...
> As it should be - rolfl here has the correct reason, "Whitespace "fixes" should be part of an answer, not an edit. Please do not fix code problems in the question."
ehh how do quotes work again
 
>
 
Yeees
well that pretty much killed the discussion
 
@Zak @DanPantryn Agreed, rolled back.
 
10:36 AM
... the software crapped its pants when making the diff
I added indents, I didn't rewrite everything >_<
0
A: Edit dispute - Indentation on questions

PimgdI have fixed the indentation for this specific question for the following reasons: Without proper indentation, the code is hard to review OP is new, and has only posted 1 question on StackOverflow before this one, which also had bad indentation and required editing by other users. OP had issues...

And there we go, documented my reasons
 
11:01 AM
@SimonForsberg RE: your comment, unfortunately it comes into the favourite realm of It Depends (tm). :(
 
11:15 AM
Monking
 
This type of material is for [codereview.stackexchange.com](codereview.stackexchange.com/) — Waqar Ahmed 25 secs ago
well, there is of course no helping some people :-) at least this way a code reviewer can grep the code for .get() or .release() as you have mentioned in your answer. This leads to the ideas that explicit syntax constructs allow tools to automatically detect dangerous practices. This has to be a good thing right? After all, fixing a memory bug takes several orders of magnitude more time than typing the word 'get'. So preventing the bug is much cheaper than giving developers an easy ride while writing code. — Richard Hodges 22 secs ago
 
Afternoon all :)
 
@Pimgd Use "Side By Side Markdown" option in the diff. It's more reliable for these types of diffs.
 
0
Q: Adding column to table in a for loop

BasI'm running the following code on quite large data frames. I've rewritten it for the iris dataset to make it reproducable. I'm quite unexperienced with the apply functions and I find them a pain in the bum to apply them. Is there any ways to drastically improve the performance of what I'm doing...

0
Q: Some strange algorithm

A191919Help me to improve readability of this code. Somebody asked me to programm this algorithm. But currently i do not know what it is for. 1) it takes string "test_app X Y" where X is number of threads 1<=X<=64, Y some kind of limit number. 2) Creates X threads, each threads adding some element in...

 
11:59 AM
@CaptainObvious Smells like asking for code explanation.
 
@Mast Is it that or is it that they were told to make a script that does X, which they've done but they don't know why it's necessary to do X?
It smells dubious and unclear for sure, I just don't get what their situation is.
 
@SuperBiasedMan I don't think so, but there's a chance you're right. Would make it off-topic anyway.
 
Yeah it definitely doesn't fit, I just can't tell whats going on.
 
Zak
@Mast AFAICT, OP was given a list of requirements and told to code it.
And now wants feedback on it.
I'd say it's a grey one
 
> Somebody asked me to programm this algorithm. But currently i do not know what it is for.
Reads like he either doesn't know what it's doing (which means he didn't program it), or he has no idea what it's going to be used for, in which case he should clear up the question.
 
12:13 PM
just 5 more upvotes to the golden badge... i can almost smell it...
4
 
Yeah it's at least unclear what you're asking, which is close worthy.
 
@CaptainObvious One more VTC.
Title: Some strange algorithm
That kind of says it all.
 
Woot golden badge! Thanks for all the upvotes! :D
12
 
@h.j.k. congrats
 
12:36 PM
Monking
@h.j.k. Gold Java badge, that's big! Congrats!
 
12:56 PM
My hobby: Taking advantage of the rice myth by posting articles on "how to save your wet phone" which are actually just elaborate recipes for rice pilaf.
2
 
@Heslacher @Phrancis thanks! :D
With great powers come great responsibility I guess
 
^^^that
 
0
Q: Some suggestions or reviews to jQuery.filer?

user88528I found a new plugin - jQuery.filer, but it is just by version 1.0.4 so I don't know if I shall use it. What do you think about it?

 
@CaptainObvious No code.
 
Should be easy to review...
 
1:25 PM
If the code actually works as intended, it may be a better fit for Code Review. — Jongware 9 secs ago
 
git just really, really impressed me.
so I'm working on a VS project with files in folder A
on my separate branch, I've moved some files from folder A to folder B.
Bug just came in from live which I had to hotfix, so I fixed it on the main branch and it's in folder A.
I then did a git rebase on my development branch and git immediately knew that the file I had changed in folder A actually now belonged in folder B and updated teh file in folder B accordingly.
I am super impressed lol
 
It knows
 
I guess it knew when I last diverged from the upstream?
 
0
Q: Is there a better, more preferred, way to protect against printing attributes from nil classes in Rails?

daveomcdCurrently, when I'm wanting to print a value for my class I do the following... <%= @person.team.name if @person.team.present? %> This seems really redundant to me. I've also have done... <%= @person.team.name_display %> where I've created a function for each attribute to kind of hide the fi...

 
@DanPantry That's what it's all about.
Keeping track of what you do.
 
1:38 PM
Yeah. It's still really quite impressive it knew that it needed to merge into a file before moving it.
much more than tfs could do, grumble grumble
 
Git is more program than TFS will ever be.
2
 
funny enough, I'm using teh git-tfs bridge to work on the tfs project using git
I am making TFS sing its own siren song, and it sounds gooooood.
 
I have a weird issue with my keyboard... a few select key combinations are not working at all, while everything else works fine... LeftShift+w doesn't work (doesn't type anything), but RightShift+W works fine. Ctrl+X doesn't work, but all other Ctrl shortcuts work... wtf
 
@Phrancis It's haunted.
 
I know it's the KB (or maybe a driver, or the dock for my laptop) because the laptop's direct keyboard those work fine
 
1:54 PM
I know I need a domain name. but if you do the free websites you don't, you just use DomainName.AzureWebsites.net or something like that
but I need to know if I need a Virtual Machine or whatever to host a site for a client that may not want a subdomain.
 
Greetings, Programs.
 
@Mast Azure is different. you need a specific plan/setup to attach a Domain Name
@Donald.McLean Greetings, User
 
Loving the version numbers of the Scala plugin.
 
Monking
 
First they had 1.9.9, then 1.9.99, then 1.9.999, and now 1.9.9999
I'm thinking 2.0 is in the cards here. But maybe that's the optimist in me. There's lots of digits left before they run out.
 
2:00 PM
@Donald.McLean That's awful.
 
lol
 
lol
 
lol
 
@Donald.McLean Next: 1.9.9999a
 
0
Q: How to abstract away implementation details of my rethinkdb Model class?

bigblindI have a module called db, which looks like this (shortened): # A dictionary that maps type names (as returned by Model._get_type()) to classes. TYPE_REGISTRY = {} class Model(object): """A superclass to be used for database models. To specify which attributes should be savied add a...

 
2:10 PM
@SuperBiasedMan Probably
However, that would indicate a hotfix.
They keep adding 9, not 1
So they must keep thinking it's the pre-last fix.
 
0
Q: War Game- Python 3 problems

flintdroeThe code runs until the deck reaches a low number. I tried to make it so a new deck inserts itself into the deck when the card count gets low but it still says the index is out of range. Any suggestions? import random import time deck = [2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, ...

 
2:25 PM
possible answer invalidation by spike on question by spike: codereview.stackexchange.com/posts/109461/revisions
 
-4
Q: In Haskell, I have tried to do formPalindrome, but says errors

thepilotthese are QS palindrome xs: checks if xs forms a palindrome. e) palindrome2 xs: same as the function palindrome, but using the functions head and last (plus other functions you might need). f) formPalindrome xs: forms the smallest palindrome from the list xs Examples: formPalindrome “sun” ...

1
Q: Best way to handle file open in Python?

Rey LibutanI currently have this code to read lines from a file def getLinesFromFile(filename): content = [] # with open(filename, "r+") as file: # for line in file: # line = line.rstrip() # if line: # content.append(line) file = None try: f...

 
2:55 PM
0
Q: English Translator

Lost BamAwhile ago I posted a Translator app that I have been in the process of making, I edited some features in it and I've decided to post it again. My questions being this: Is there anything I should add to this? Is there any better (more easily readable) syntax for what I'm trying to do? Say I wan...

 
3:39 PM
Looks like a question for codereview.stackexchange.com, assuming the code works. — vaultah 55 secs ago
 
Y U ALL SILENT???
the room is being taken over by bots?
 
Yes
 
all obey the hypnotoad
 
Say I have a player with an id, and a list of names consisting of (name, startDate, endDate)...
How would I call entries in that list?
 
former aliases
 
3:49 PM
(\_/)
(O.o)
(> <)
3
 
But it also contains the current one :P
 
@skiwi then user_aliases?
 
Does alias imply that it stores a name, begin and end time? I agree that alias sounds way better than name for this purpose
 
aliases doesn't imply that, no, but its a better fit than past_aliases because these obviously aren't in the past
 
just aliases/nicknames/any other synonym
 
4:07 PM
I can't believe myself. I'm actually starting to participate on SO again.
 
@EthanBierlein Nothing wrong with that!
 
0
Q: Asynchronous JavaScript code

D4IVT3good morning, I have the following code: for (var i = 0; i < 8; i++) { async.each([5,6,7,8,9,19,11,12],main, function(err){ console.log("end"); }); }; where main is a function that connects to the bade of mondobd data. I have two doubts. 1) why is that when i run the code it does every...

 
My contributions to SO are mostly just occasional review queues stuff since I don't have useful specialised knowledge.
 
4:37 PM
either I suck at maths, or (1 + i) * (1- i) / 2 == i ...
 
It's not, because that's a multiplication sign, not a plus sign between the bracketed parts.
 
 
This might be a better question for Code ReviewJasonAizkalns just now
 
I wish VB.NET supported ?. token.
 
@skiwi @Vogel612 Wolfram is right, it's 1 not i.
 
4:53 PM
If this is working code that you think could be improved, consider Code Reviewjonrsharpe 24 secs ago
 
0
Q: Setting up Jenkins + Gerrit

NoEscapeI need to setup an environment where jenkins builds the project right after I submited code for a review on gerrit. If it builds successfully jenkins gives +1 on gerrit review. For gerrit integration I have used this manual: http://www.infoq.com/articles/Gerrit-jenkins-hudson But I got staked a...

 
Great.. I suck at maths.
 
Don't sweat it, I felt the same way in my first year of college.
After a while, you'll start using tricks on such formulae instead of calculating it.
 
@EBrown I got my copy of C# in depth today
 
Assignment: find an x so that 1+i times x = i ... I should work on that :/
Also my train got cancelled...
 
5:01 PM
(1 + i) * (1- i) / 2
1 + i - i - i^2 / 2
1 - i^2 / 2
1 - -1 / 2
1 + 1 / 2
1
 
0
Q: Wrote a "Day-of-the-week-finder"

deezI'm new to Python/Programming and wrote this simple "Day of the week/Holiday finder" script. Ideally I'd use something so I can have a little widget on my desktop, but right now I'm looking for any and all suggestions to improve my code? import datetime import holidays today = datetime.date.tod...

 
I suck at algorithms :P
That's why we have unit tests
 
@skiwi I still suck at those.
 
@Heslacher Awesome!
 
Now I only need to have some time to read it ;-)
 
5:14 PM
...so, as it is, this isn't a great question. You have some code that works (even though all that's included in your question is broken pseudocode) and want to know if it's a best practice, but you aren't willing to use the tools that are best practice and aren't very clear on why. Frankly, this is somewhat out-of-scope as it is: Questions about whether working code follows best practice belong on Code Review SE, not StackOverflow. See codereview.stackexchange.comCharles Duffy 13 secs ago
 
> CltBillID | int | Foreign Key field which references the auth_id field in the AUTHORIZATIONS table.
^ORLY - Totally intuitive
 
0
Q: Alberi puzzle creator part 1

N74This is a follw-up to this question. I must thank @GarethRees for its wonderful Algorithm X tutorial and solver. Using his ExactCover Class I slightly modified his Alberi class to cope with regionless schemes and forced void cells: """Solver for an Alberi puzzle using exact cover """ from coll...

 
5:29 PM
Yay for accidental cross-joins :D
 
If your code works and you look for improvements, then you may ask this on codereviewLuiggi Mendoza 31 secs ago
 
5:43 PM
0
Q: Performance of this method to get relative path from to/from path?

fneronInputs : fromPath -> "/a/b/c" toPath -> "a/b/d/f" Output : relativePath -> "/../../d/f public static String getRelativePath(String from, String to) { String relative = ""; String regexPath = "/"; String regexLow = ".."; List<String> toList = Arrays.asList(to.split(regexPath))...

 
It's very calm here today
 
Let's hope no storm will come
 
00:00 - 18:0018:00 - 00:00

« first day (912 days earlier)      last day (3105 days later) »