« first day (987 days earlier)      last day (3045 days later) » 
00:00 - 16:0016:00 - 00:00

4:10 PM
This question looks Hypothetical:
2
Q: Injecting required functions by synchronous script loading

AmadeusDrZaiusI have a file HintBox.js containing a JS prototype of the same name which requires our internal JS library (call it $lib) in order to work. One way to solve this problem would be to remember to make sure that the lib.js file is included every time in the PHP, but this is easy to mess up, especial...

 
0
Q: Thread synchronization. Mutex

Mr. Hello_worldI'm trying to synchronize my thread via mutex. I have the following code, but It not the way I want, It has undefined behavior. Can someone tell me what is the problem? #include <windows.h> #include <conio.h> #include <iostream> HANDLE Mutex; DWORD WINAPI ThreadFunc( LPVOID lpParam ) { ch...

1
Q: Converting long list of if/else

JimIn order to convert a code such as: Company company = new Company(); if(currentToken.equals("employee_list")) { company.setEmployees((ArrayList<Employee> parseEmployees(reader)); } else if(currentToken.equals("contractor_list")) { company.setEmployees((ArrayList<Contractor> p...

 
1
Q: Should we put [scope] down our scope?

QuillCurrently, the scope tag is used to tag questions seeking specific advice about scope, however, as this is a language-agnostic feature, it should be assumed to be a potential part of a review and thus unnecessary. Should we put scope down our burnination scope?

 
I edited the question to be a little clearer so people realise I'm talking about main-site [scope], not meta-tag scope
 
possible answer invalidation by Quill on question by Rich: codereview.stackexchange.com/posts/70515/revisions
 
@Duga it's fine, only an example use case
 
4:50 PM
1
Q: Java Program Simple Weight Calculator

Sartaj SinghI have been using this site for a couple of years for great answers and a ton of help. I wrote this program for my class project due 1/23. I am just wondering what you would recommend me changing or improving. I think I have some repetitive code, but I have not learned about defs in Java yet. p...

 
Monking
 
monking
 
5:07 PM
2
Q: Angular callback scope.apply

laggingreflexUsually the socket.io's on method is like this: socket.on('/msg', function(data){}); But in Angular that callback has to be wrapped inside its $rootScope.$apply() method otherwise anything that happens in the callback (like changing $scope properties) doesn't update in Angular. Here's a simpl...

alright, it's 3am, TTGTB
 
> I have been using this site for a couple of years for great answers and a ton of help.
But you still don't know how to define a method?
 
oh hey, I'm 40 edits behind 4th place overall
 
@Quill It's not a contest.
 
Are you sure? Anything can be a contest!
 
I'm not competing. I'm just stating
I'm literally doing the most mundane cleanup work, adding and to incompletely tagged questions
 
5:13 PM
Just make sure the edits actually add something of value.
 
I'm adding a relevant library or language tag, that's relevant. and yes, I have done this before.
 
I'm not saying you don't know what you're doing, but I've seen you do things before which IMO are gaming the system instead of striving for quality. You're walking a fine line and I'm simply trying to subtly make you aware of that. You're not the only one though, so you may just have picked the wrong examples for this.
Don't go all defensive on it.
 
5:38 PM
0
Q: How can I format an hhmmAM/PM OR hmmAM/PM (no space) to time hh:mm AM/PM in excel?

PulseI'm working on a way to make enter timesheets for payroll. I want the time entered in a format with hhmmAM/PM, no spaces or colons and just typing a/p instead of AM/PM and have that convert to standard time format with colons and spaces. I searched and found a StackOverflow answer that gets me m...

 
5:56 PM
0
Q: Am I at least on the right track with C++ for this assignment, looking for someone to look it over

ASlack91 I recently started my CIS program and am taking C++, I have not coded much before to this extent. The work was to create an application that creates a loop to increment the input (if n>50) by 1, 8 times and the input (if n<50) by modulo 2 through 9. Im not looking for someone to do the work fo...

 
6:13 PM
0
Q: Rust RNG slower with multiple instances running? Why?

electrometroI am doing some random number generation for my Lotto Simulation and was wondering why would it be MUCH slower when running multiple instances? Here is my script I am using to start multiple instances at the same time. #!/usr/bin/env bash pkill lotto_sim for _ in `seq 1 14`; do ./lotto_s...

 
6:30 PM
Perhaps this questions should be asked on codereview.stackexchange.comAlex 11 secs ago
 
Seemed like a bug or an issue I needed to resolve instead of a code review when I posted it.
 
-1
Q: how to get the file

kloeint main(int argc, char **argv) { FILE *realpw_file = fopen("code.txt", "r"); char real_password[1000]; char passwd[1000]; getresuid(&ruid, &euid, &suid); setresuid(euid, euid, ruid); banner(); printf("\n Security question: What is the code ?\n Your answer: "); if ...

 
6:45 PM
possible answer invalidation by Paras D Pain on question by Paras D Pain: codereview.stackexchange.com/posts/115876/revisions
 
7:28 PM
Incoming iffy question
 
Quick poll
Say you have the following code:
object o = "Jimmy";
if(o is string)
{
    string name = o as string;
}
Would you prefer to refactor it to this:
object o = "Jimmy";
string nameAsString = o as string;
if(nameAsString != null)
{
}
or this:
object o = "Jimmy";
var nameAsString = o as string;
if(nameAsString != null)
{
}
 
0
Q: Messy Login - if/else needs cleaning

samiCan someone give me advice on cleaning this code. It's more messy then I expected. I got like 10-15 more ifs to be added. I've thought of adding the error messsages in methods and then just check if method returns true, or false it'd throw error.. if( isset($_SESSION["access_token"], $_SESS...

 
Difference being var or explicit
 
@JeroenVannevel I assume string o = "Jimmy"; is not an option?
 
It's one of those two options I presented
 
7:41 PM
No it isn't. I mean having the original object defined as string already ;)
 
I mean you have to choose between my options
 
I'm voting to close your poll as example code :)
I'd probably go with var, mentioning string once per line should be enough.
 
Yeah but the idea behind that is that the user already defined it "double" as string explicitly originally
using var would make my code fix much easier to implement though
 
8:02 PM
If I get one more downvote on my JavaScript question I'm going to nuke it.
I'll find a way.
Stupid language...
 
0
Q: Object-Oriented Chess Game in Ruby

scoboI wrote a chess game in Ruby using object-oriented principles. One of the challenges was deciding which particular methods/actions belonged to a particular class, as there were some that felt as if they could go in any class. General rationale for OOP choices: Pieces should be as dumb as po...

 
@Mast What question?
 
@SimonForsberg This one
At risk of sounding arrogant, but I can't remember my questions getting downvotes. I got two already. Must have done something wrong.
 
I'll just kindly refer you here. — dhke 34 secs ago
 
Sure, I messed up a Brainfuck question once, but that one is gone.
 
8:12 PM
And how exactly did you plan on nuking that question?
 
9 mins ago, by Mast
I'll find a way.
A forkbomb on the SE server for all I care.
Try a bobbytable...
 
I'm quite tempted, you know?
 
I figured somebody would be ^^
Don't mind me.
 
I'll admit that I won't upvote it, but I also see no reason to down-vote it.
 
I get cranky when I can't explain something.
 
8:15 PM
I'm not sure why your question has received downvotes
 
I'll never say nice things about JavaScript again, that's the only thing I did different.
 
It's probably best to leave any arguments about if the language is good or bad outside of Code Review posts.
If people don't like it, they don't have to review it, or even read the post.
 
0
Q: Create a folder and perform a SaveAs

Iron ManI have this code that is working as intended. Since I am still learning VBA and coding, I was wondering if anyone could look at this at let me know if there is another way to write this. This is part of an Add-In I created and is used by several other people (meaning that I installed the Add-In o...

0
Q: Validating user access to a function

user1786107I was reviewing the following code block and noticed there was validation check at the top. The 3rd line in the function checks if the invoice belongs to the logged in customer. I am wondering what the correct way of doing this might be. Some options that come to me head are: GetInvoice sh...

 
We don't really want arguments about "Language X rules/sucks" on the main site, do we?
 
@CaptainObvious isn't it a security issue to give the user that much information about why a login might have failed?
 
8:20 PM
@Mat'sMug depends on how you define security issue
see also:
 
@SimonForsberg It was never my intention to do so, I was just making similarities.
Bad idea I guess.
Let's go for less context next time.
 
@CaptainObvious I think that is one of our most common "concrete" questions. "Reducing too many nested if statements"
@Mast Yeah. Context tends to be appreciated more, I believe.
 
That's what I thought. So I wrote context.
Simplified the question, perhaps this helps.
 
Oh, didn't notice you wrote less
 
Code should be about code.
 
8:27 PM
Kids are watching netflix, my desktop browser is crawling. Gosh that's annoying. Even more than 5 consecutive Paw Patrol episodes
 
I did find "While definitely not as modern as JavaScript" quite funny though :)
 
Yea, as said, I don't understand it. It should've improved the question, not worsened it.
Perhaps there's no point in explaining voting behaviour. Perhaps I'm going all wrong about this.
I'm just trying to write awesome questions. So far not working :-)
 
@Mast well it did went hot
 
possible answer invalidation by Martin F on question by Martin F: codereview.stackexchange.com/posts/116926/revisions
 
@Mast You might just as well have been downvoted because you got the value for 6 wrong, according to a (now-deleted) answer
@Duga I think that one's ok
a comment said:
> Your function name is "get_assignments", but you're not returning an object to it because your last line uses the incorrect (and undeclared) name: Set get_assign_projects = qd.OpenRecordset
as it was a comment, editing is allowed
 
8:33 PM
Invalidating comments isn't a problem, invalidating answers is.
Comments are expandable.
 
exactly
 
@SimonForsberg Which I explained at the bottom of the question.
 
Don't over-think it
6 mins ago, by Mast
Perhaps there's no point in explaining voting behaviour. Perhaps I'm going all wrong about this.
 
I'm Dutch, of-course I over-think it ^^
 
8:57 PM
0
Q: Basic calculator in Java

SvanteI'm new to programming and just made a basic calculator on my own. Can anyone see if there is any room for improvement in the code, like stuff i should do different. package calculator; import java.util.Scanner; public class Main { static Scanner userInput = new Scanner(System.in); public...

 
Naruto answer; accepted non-selfie answer with 0 score: Regex to find addresses and phone numbers
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Mapping a file system to a tree structure
 
@CaptainObvious Oh yay, a calculator! How come we haven't seen that on CR before?
2
 
You don't have to review it if you don't want to ;)
 
Oh Hi @Svante.
 
Hi @SimonForsberg
 
9:04 PM
I'm quite surprised, I thought you were "new to programming" one year ago. What happened during the last 6 months or so?
 
haha i was, then i started school and stuff and felt i wanted to put more time into school
Now, in the next year I will start learning programming in school so i thought i would try to see if i rememberd some stuff i knew before ^^
 
You actually remember me haha? :P
 
I remembered your username, noticed that you had > 101 reputation, saw your old questions.
And besides, you're Swedish.
 
ah okey, yeah
 
9:08 PM
A "problem" if I would answer your question is that I don't know how advanced I should make my answer. In a way, there's plenty of techniques you could use to make your calculator much more flexible. In another way, you're just starting out and should perhaps learn things step-by-step.
 
I'm in the gymnasium now and going the "teknik linje" and in that there is a programming course
 
Welcome back :-)
 
yeah maybe, do what you think is best
Thanks :D
 
@Svante Honestly don't know what is best.
 
@SimonForsberg go for the advanced answer, or maybe like medium advanced
 
9:18 PM
@Svante If I answer, sure.
 
@SimonForsberg (y)
 
0
Q: Stewardesses serving passengers (book exercise)

AlexanderI did an exercise (open-ended - without an answer) from JavaScript book (chapter about functions). Given array of passengers of a flight with their names and ticket types and one need to emulate stewardesses asking passengers for service during the flight depending on their ticket type (first...

0
Q: Returning imaginary roots as lists with real and imaginary component with python

in0ruThe exercise I was given wanted a quadratic solver written in python. a=1 b=0 c=-1 d=(b**2)-(4*a*c) sol1=(-b-d**0.5)/(2*a) sol2=(-b+d**0.5)/(2*a) if sol1 == sol2: print(sol1) elif sol1 != sol2: print('[',sol1,sol2,']') I have the finished with the distinct real roots and...

 
9:33 PM
@Phrancis, sorry to ask here but I don't have any other way to contact you: My reflection shield arrived but it doesn't have the four bolts required to secure it in place. Any ideas where I could buy some?
 
9:48 PM
@DanPantry did you see the question on SO that we discussed? I edited it...is it better? How else can I improve it?
 
@DanPantry The Wales version of Home Depot?
 
10:04 PM
@Mast I think this is a bit too specific to be bought from your average store to be honest
@TanMath I haven't seen it, no
 
@DanPantry It's where I get my bolts when I need them. Feel free to ping me in whatever room you see fit. Do you happen to have a picture of what the bolts should look like?
Perhaps a car-materials store, those usually have a broad assortment of metal parts like bolts.
 
0
Q: Python | Efficient Dictionary printing, beginner problems

TwilightKillerXI'd really love some feedback and guidance on this task I have at the moment. Here's what my task is: Dependant on the "Logged In" user, they'll have different access rights and will see different menus. I have tried using the .get() function. choices = {1: "| Student Details", 2: "| Stud...

 
10:36 PM
1
Q: Glue Shredded Pieces (CodeEval)

Emily L.I have solved problem 185 on CodeEval, Glue Shredded Pieces. The solution got a 100% score on all tests, within the allotted time and memory constraints. I'm looking mostly looking for tips to reduce memory usage (and improving speed) but all comments are welcome. Description Imagine th...

 
Emily does that ^^
 
yup
wondering why she has started doing codeeval challenges though...
 
If you have a working code, and you're looking for advice on how to improve the style, codereview.stackexchange.com is a better site. — Barmar 14 secs ago
 
I'm suspecting that she might be looking for a new job...
 
10:52 PM
The point is that you should not upload your code or post too many lines. Stack overflow is not a code review service, this is why here we request a MCVE. — terence hill 55 secs ago
 
0
Q: CAST/CONVERT a SUM to either "yes" or "no"

JoshuaBThe code is currently: Select AN_EPISODE_ID,SUM(MedCount) as Total_Admin_Count from ( select AN_EPISODE_ID,COUNT(ord.ORDER_MED_ID) as MedCount from F_AN_RECORD_SUMMARY An inner join MAR_ADMIN_INFO Mar on An.AN_52_ENC_CSN_ID = Mar.MAR_ENC_CSN inner join ORDER_MED Ord on Mar.ORDER_MED_ID = Ord.ORD...

 
@SimonForsberg Reason #1 to practice challenges, reason #2 being learning a new language of-course.
@CaptainObvious I'd remove the , but that would put it back in the queue...
 
0
Q: Reference a total of line above

Isaac BrekkeI am in my first week of learning java at university and I have this problem. "Write a program that prints the balance of an account after the first, second, and third year. The account has an initial balance of $1,000 and earns 5 percent interest per year." The code i have currently is...

-1
Q: Just got hooked any ideas on what to do now?

user94942I just recently got hooked on coding and want a paint and canvas, or a tool to work with and a tool to work on to begin my adventure. I know some terminology on the coding languages such as Java, Javascript, c+, c++, and am even capable to write a few lines of code as I did finish The Introductio...

 
@CaptainObvious Most hilarious code-not-yet-written closure ever.
2
 
11:08 PM
I can't see deleted questions anymore :-(
 
@DanPantry maybe hardware store? I'm not sure what kind of bolts they are that it needs
 
in The Nth Monitor, 58 mins ago, by Dan Pantry
Hey @Mast, here's the product I bought: http://www.amazon.co.uk/gp/product/B004UKTJ1M?ref_=cfb_at_prodpg
 
@CaptainObvious Oh boy...
 
-1
Q: Multi-level menu for an FAQ

Merin RVI am making a FAQ that ask you 3 question to give you the correct answer. It works in the same way as this website: Nokia Lumia FAQ. The code works. You have 3 level of content to see depending on the button you press. When a button is pressed on level 1, level 2 and level 3 it will change color...

 
@CaptainObvious And it isn't even September.
4
 
11:19 PM
0
Q: Infix to postfix implementation using a stack

nbroI have implemented a "infix-to-postfix" function that takes as input a list representing the parsed expression, resulted from applying a certain regular expression to an expression, and I would like to have your opinion regarding its correctness and efficiency. Good suggestions are of course more...

> Please, don't tell me anything about the docstrings, because I actually removed them from my code to make it clearer.
 
ugh
wat
"I removed documentation to make my code clearer"
 
First weekend of the semester, I guess.
 
You know what would make that code clearer? less arbitrary whitespace
 
Consistency.
A PEP8 verifier would tell him exactly what's wrong with it.
 
Here's a good question, for a change:
1
Q: Object-Oriented Chess Game in Ruby

scoboI wrote a chess game in Ruby using object-oriented principles. One of the challenges was deciding which particular methods/actions belonged to a particular class, as there were some that felt as if they could go in any class. General rationale for OOP choices: Pieces should be as dumb as po...

 
11:36 PM
W
T
F...
I... I want to write an answer, but it's likely to be a rant, so I'll limit it to a comment. Razor is a view engine. It's completely abusive to try to use it as a "controller" as you've done here. If you want a code behind, aspx is the correct architecture to use. But that suffers from the same issues as the abuse of razor you've done here. Tightly coupled view/business logic. It's evil. Evil. Don't do this. — RubberDuck 35 secs ago
That code makes me angry. So terribly angry. Just. No. No.
 
It's more than a year and a half old. Just let it go. =)
Actually, that could just be an answer.
 
It could be, but didn't feel like a good one.
I feel better. I just needed to vent it out.
 
It is a good one, just as it is.
 
This is off-topic for SO. Post it on codereview.stackexchange.comDavid Brossard 13 secs ago
 
Thanks. But I'll just let it go.
Or. Okay...
 
11:43 PM
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comDavid Brossard 56 secs ago
@200_success you are right. SO is more about figuring out how to do something in code or to troubleshoot an issue with code. It is not aimed at optimizing code that works or discussing pros and cons of different approaches in code. That's exactly what codereview is for. The people there will help enhance and clean up your code. — David Brossard just now
 
11:56 PM
1
Q: Basic voice recognition?

VoiceRecognitionHelpThanks so much for your time! I have read this: http://stackoverflow.com/questions/14940657/android-speech-recognition-as-a-service-on-android-4-1-4-2/14950616#14950616 The code that the answer suggests is the following: public class MyService extends Service { protected AudioManager mAudi...

 
@CaptainObvious Who upvoted that?
 
00:00 - 16:0016:00 - 00:00

« first day (987 days earlier)      last day (3045 days later) »