« first day (713 days earlier)      last day (2022 days later) » 

11:16 AM
It's French fries day.
mumble Belgian fries mumble
Come on, that's not even proper food anyway.Let's not start a war over the wording.
I think there was a memo years ago that we were to call them Freedom Fries now.
Okay, so I had this post on the main site (http://codereview.stackexchange.com/questions/87085/simple-comparison-of-sorting-algorithms-in-c)
and I got some great responses. @LokiAstari is the top answer and so I'll start with those. Anyone who knows C++ I'm grateful for your help.

Loki said it is better to use `std::cout` everywhere than to put a `using` command at the top. Why is that? Is the danger that I or some other person might name another function `cout`?

Why are some functions automatically placed in the global namespace and others aren't? When I put #include <math.h> in the p
Whoa whoa whoa
I don't know C++ but people always get their panties in a bunch over it
Q: Using std Namespace

paoloricardoThere seem to be different views on using 'using' with respect to the std namespace. Some say use ' using namespace std', other say don't but rather prefix std functions that are to be used with ' std::' whilst others say use something like this: using std::string; using std::cout; using std::c...

11:23 AM
C functions are in the global namespace for compatibility reasons. Including <cmath> instead of <math.h> should put them in the correct namespace.
To answer your first question, yes, it's about namespace collisions... I, myself, find it a little silly and if I found a library with namespace collisions to the standard lib, I probably wouldn't use it.
Q: DRY Kleisli wrappers with lens

Danny NavarroThis currently does what I intend: nested :: Request -> Maybe Response nested = runKleisli . unwrapArrow $ WrapArrow (Kleisli (preview (prefixed "/name") >=> app1)) <|> WrapArrow (Kleisli (preview (prefixed "/surname") >=> app2)) where prefixed :: Text -> Prism' Request Reques...

@Morwenn, so if I used <cmath> instead, how would that change things? Would I still be able to call the functions without a cmath:: or something like that?
But that's not the gospel according to C++
If you did using cmath (or whatever the namespace actually is), the namespace qualifier can be omitted.
I don't understand the disallowance of using std myself.
This is confusing to me still, sorry (I did my graduate work in Mathematica, but now think I need to learn a real language to leave academia lol)

I just changed the preamble of my C++ code (is it called the preamble like it is in LaTeX?) from `#include <math.h>` to `#include <cmath>`, and it compiles just like before.

Why can I call `floor`or any other function on this page http://www.cplusplus.com/reference/cmath/ , without prepending the namespace? But I can't do that with `cout`?
11:30 AM
If you can't use using std, then why does the using keyword exist? What's it for?
from reading responses on stackoverflow, it seems the world would be better if there were no using
I can understand preaching against not using it for obscure libraries.
I'm voting to close this question as off-topic because needs migrating to CodeReview codereview.stackexchange.comTony Hopkinson 21 secs ago
This question might be better suited for codereview.stackexchange.comManu 31 secs ago
This question is more suitable for codereviewgp_sflover 1 min ago
11:47 AM
@JasonB Generally speaking, it's more "don't use using in header files".
The reason in that a header file can be included by anyone who might have defined a function/class with the same name.
You can generally use the functions imported from the C standard library without std::, but you can't for the ones that only exist in the C++ standard library and not in the C one.
It's fine to use using namespace std; in source files (not headers), provided you know that it won't cause name clashes.
@nhgrif using has many uses: using declarations, using directives, type aliases and template aliases.
And constructor inheritance too.
Or more generally importing functions from a base class.
I can avoid it, I want to go from what I do now, which is writing a program for the purpose of doing a calculations, to (hopefully) programming for a living. So I've been lazy in the past, and would rather just do what is easiest for every calculations. But I want to get to know good programming practice.

So what is the reason I can use `floor` or `exp` without prepending a `math::`?
I told you: floor, exp, etc... are actually from the C standard library. C++ must compile C, so it must support using these functions without prepending the namespace std::.
@Morwenn you say don't use it in headers, yet I always see people bitch about it in the .cpp file.
@nhgrif That's "double problem": actually, it's generally safe to use it in the .cpp file, but example files tend to be entirely .cpp files, so people got accustomed to using namespace std; everywhere, so other people started to ban it from everywhere.
Somebody who uses using namespace std; in an example .cpp file may not know that it's bad practice to use it in a header file, hence an overall warning in answers on CR.
But some people tend to get passionate about banning it from everywhere.
Then our C++ answerers should write better answers.
11:58 AM
It's hard to teach teachers.
A few months ago, I used to put warnings about using namespace std; everywhere too.
There is an equivalent problem with people teaching that names beginning with a single underscore are bad.
And I'm here just worrying abou thow my GUI should look
@skiwi Thinking about UI and actual users is also a real concern :)
Especially when the users will be CR people ;)
Q: How to list all strings of length 12 in C++?

selfstudyingI tried to make a program that lists all strings of length 12 such as its characters are from a-z. However, there seems to be a bug I could find. Could anyone spot it? Is there some easier way to do the program? #include <iostream> #include <string> int main(int argc, char *argv[]) { using ...

Q: Use less battery with GPS location every 15 minutes

user1209154I'm implementing an application which need to send a location to GCM every 15 minutes. I implemented an AlarmManager which will be called every 15 minute. Here is my class of my alarmmanager public class LocationAlarmManager { Context mContext = null; public LocationAlarmManager (Cont...

Q: openCV 2.4.10 /C++ displaying image

GiladPlease comment about speed and memory optimization for my code. converting and 10 bit raw image (bayer pattern) from int** and displaying some lines. void AutomaticMacbethDetection::DrawMacbethROI(ColorCheckerBatchRGB ColorCheckerBatchRGB, int ** raw_frame,int _width, int _height) { //Mat(i...

If I have a list of users that belong to a specific object, does it make sense to need to go into 'edit-mode' to add/remove users?
12:06 PM
With no context... Maybe?
Alternatively you'd have Add and Remove buttons in the 'normal mode', just by viewing the object
Maybe that would be better though
You are asking about UI without screenshots... So... I guess we can just ignore you and be rubber ducks.
That would be a possibility, yep ^
Might even be a smart one
@Morwenn why are names beginning with _ bad? I use them regularly (not in C++ though)
@nhgrif Names beginning with a double underscore are reserved to the implementation, as well as names beginning by an underscore followed by an uppercase letter, as well as names beginning with a single underscore in the global namespace.
Complicated rules, so people tend to turn them into "don't use names that begin with an underscore".
12:15 PM
... Welp, guess I'm glad I don't write C++...
Who needs so many weird complicated rules...
No wonder the C++ chat on SO is full of such terrible people.
C++ rules merely follow the C ones.
@nhgrif what language do you use that is free of weird rules?
And POSIX likes to reserve some additional names too, but people tend to violate POSIX restrictions.
@JasonB Brainfuck is free of weird rules.
I mean rules that the compiler doesn't enforce.
One of the major problem is that compilers can't enforce rules that major libraries have been violating for more than 30 years.
12:20 PM
@Morwenn, that is fantastic - thank you for bringing that to my attention
Objective-C, to my knowledge, has none of these rules like this, despite being built on top of C.
I wouldn't put my head on it.
Experienced Objective-C programmers certainly don't treat Objective-C novices in the same way C++ novices get treated in SO's C++ chat room anyway.
Well, the C++ chatroom on SO is subjectively one of the worst places to be on the SE network if you're not an old regular :)
Yup, this looks like oen of those errors I get on Mondays...
> HTTP Status 500 - javax.servlet.ServletException: File &quot;/WEB-INF/views/dwi/repository_link_fragment_users.jsp&quot; not found
12:27 PM
Which would be fine if it were called "Ye Olde Regulars" or more accurately, "Ye Olde Assholes"
Last minute renames can cause errors ;)
Q: Prime numbers generator in clojure

qedCode here: (defn least-prime-divisor-from-primes "Find the least prime divisor of an integer n. Instead of checking every integer less than n, use the pool of known primes instead." [[p & ps] n] (cond (= 0 (mod n p)) p (> (Math/pow p 2) n) n :else (least-prime-divisor-from-pr...

Q: Please fully comment your assignement

CaridorcI assigned myself a programming challenge, the storyline is as follows: Let's say you were assigned a simple programming task for homework. The teacher is lazy and so good at reading code, he therefore states: code must be fully commented. He requires comments on even the dumbest of...

But no helpful C++ chat on SO can gain any traction because of that one's existence.
I don't know how bad it is... really, nor am I sure if I want to know it
@nhgrif Lounge<C
Lounge<C++> is more "the lounge" than "the C++ chatroom". Nothing new.
12:36 PM
Yes, but it's the most popular chat with C++ in the title... Yet talking about C++ there is forbidden... And not other C++ chats make it to first page.
It's not forbidden, you only have to know to get to the point. It's like posting a question on SO, but pushed to another level x)
I change exactly nothing and now my code works, this is suspicious.
It also decided to ignore console.log statements
And the Mozilla Developer Console doesn't seem to be logging get/post requests anymore, wtf
Q: sortArray implementation

theUserI created this program called sortArray, (pretty self evident what it should do). And, I got rid of all the syntactic errors, but, I know there some semantic errors, that I have tried to find, but ultimately failed (I'm new to programming). I think one of the semantic errors I have, is that the `...

Oh... I was calling the wron gmethod
12:59 PM
Q: Steganography - Images within Images

FlypheG'day, Currently learning about steganography at UNI, so I decided to try it. Was looking for some feedback on the way I decided to do it. Normally, you would change the LSB of the RGB channels in a pixel, they would represent the bits you are storing in the image. My method differs in that I ...

1:14 PM
Q: Simplifing validation

ashurI have the following code which is responsible for the validation in our app (just an example). Based on the particular tab where user can add person to the database we need to perform additional validation (more fields in each tab). Fields that always should be validated are name and surname ...

1:26 PM
@200_success I updated my Opinionated answer with a real answer. I knew there had to be an easier way to do what he was doing
A: Is there a better way to convert Converting a MongoDB BsonDocument to XML using C#?

Lyle's MugYour bracing style confused me a little bit at first, from my experiences and from gossip around the "water cooler", the most accepted bracing style for C# is next line and not Egyptian style (that's for Java and JavaScript). You can also streamline more than one using in a row so that you don't...

I flagged the comments, they may need to be cleaned up a little bit
Time to play this game I bought on Steam July 2013!
thanks @rolfl should we mention chat? or give chat a break, it did seem broken a couple of days ago...
I am always happy for people to find chat, but see no particular need to introduce it right now....
mostly because I am in a bearish mood, and bickering about brace style is not friday-friendly
I am going to get downvoted some more, it looks like he is already doing exactly what I said, except he is jumping through hoops around his guids
I honestly didn't think you could even USE emoji in variable names. Or that there were so many different crying ones.
1:39 PM
but he doesn't have the using statement for the BSON Extension class
@rolfl does that mean my answer is crap?....
No, that means that I was notthinking abou your answer at all, and was instead thinking about this:
@rolfl okay I was worried there for a second....lol
time to get some coffee and then read through 10 year old code and see if a change to a county name is going to crash the application that is still being used to this day!
I have a fun Friday ahead of me, and then I get to document my site some more! yay!
1:54 PM
Stack Overflow's not the place to share without being asked. I've flagged it to move it to codereview.stackexchange.com (or close it if they feel like it) — bradlis7 45 secs ago
Duga isn't Duga anymore?
@Lyle'sMug She's taking a nap until Simon gets back from the Ukraine.
God. They pass the name of an image through their API but they never return the full URL
Then when you find out the url, it appears that it is version-sensitive. E.g. /1.2/img.png works but /1.3/img.png doesn't
and each version has different images
No wonder they want people to help with the api
it's ugly as frollickels
@RubberDuck who's bot is that?
@Lyle'sMug Monkey's =;)-
2:06 PM
Well, it is simon's bot running on my sock.
Q: Would a reference implementation for a made-up programming language be a good Code Review question?

Joshua SniderSuppose I made up a programming language and was working on an interpreter for it. Would that interpreter make a good code review question? It would probably be largish at a couple hundred lines. It could definitely be reviewed for performance and best practices, but otherwise any review seems li...

Q: draggable and droppable when parent rotated

sarathI am simulating similar task https://phet.colorado.edu/sims/html/balancing-act/latest/balancing-act_en.html using javascript jQuery almost, Archived functionality still remains few bugs. when I dropped element removing from one area and appending into another area. appended area parent is rotated...

bots running socks, make me think about Howard Wallowitz and the robotic arm...
Fox in socks?
2:20 PM
Q: nth root of a number - Newton raphson

overexchangeBelow is the solution: def approx_deriv(fn, x, dx=0.00001): return (fn(x + dx) - fn(x))/dx def improve(update, isdone, guess=1, max_iterations=100): def recur_improve(guess, i): if i > max_iterations and isdone(guess): return guess else: return recu...

If this is working code you think could be improved, it might be a better fit for codereview.stackexchange.comjonrsharpe 26 secs ago
Q: Terminal program engine

Xis88I wanted to create an example of developer-friendly, maintainable, expandable, reusable understandable module that could be used by other programmers even though it won't. Thus, I started developing a simple terminal program engine. At first try, I chose a recursive design, and that was a terribl...

Hey Carebear
If you're wondering if your current solution is a good one, you can bring your fully functional, real code over to Code Review. Please take a minute to read about what's on topic there before posting though. — RubberDuck 56 secs ago
This is not a code review, this is a code dump. If you are providing alternative solutions you need to specify why your code is better. — JaDogg 37 secs ago
2:35 PM
What happens if one of the names you're trying to validate is "Fu Li" (completely possible name)? I'm not sure what advantage checking for length of name brings. — sᴉɔuɐɹɥԀ 9 secs ago
@sᴉɔuɐɹɥԀ I would think to make this an answer really!
def name(self)
    Get name
    :return: Name
    return self._name
I take it that StackMonkey is the new name of the bot?
If above code is in a class. a) Do I really need the comment ?, b) if a non validating setter is provided -> wouldn't it be easier to expose name instead ?
2:40 PM
@JaDogg If the code is self documenting, then documenting it again is redundant IMO
@Marc-Andre OK I just might do that!
@Rainbolt what do you think of question b) ?
@JaDogg Yes?
Sorry, I got sidetracked. @property reminds me of the popular practice of using region blocks in C# like #region Properties #endregion and I was trying to find the name of the popular .net coding guy who gave a very convincing reason not to use them (so I don't look like I am talking out of my ass)
2:45 PM
@Donald.McLean it's @SimonAndréForsberg's bot run on @rolfl's Sock Puppet
Brb and I'll look at question b
@Vogel612 I think it is very relevant. It's a vivid description of what we don't want to be as a community. How many CRers are happy with the state of StackOverflow these days? Let this stand as a warning and reminder as we grow. — RubberDuck 13 secs ago
Q: Nuts and bolts algorithm

NgmI am trying to learn golang. This is a problem from Robert Sedgewick's Algorithm's book: You have a mixed pile of N nuts and N bolts and need to quickly find the corresponding pairs of nuts and bolts. Each nut matches exactly one bolt, and each bolt matches exactly one nut. By fittin...

@JaDogg I'm not the best person to answer b) because I don't understand the question :(
Does anyone know the name of that guy who doesn't like switches and region blocks on pluralsight? He's also a blogger and a big .NET guy.
2:50 PM
@Rainbolt I will see if I can catch a python guy
@Rainbolt Switches should be buried in a Factory ?
I can think of a few uses for them
@JaDogg If your member variable has a getter and a setter that both do nothing (which I think is what you were asking about), then maybe the variable doesn't need to be in that class at all. It obviously isn't responsible for that variable.
@Rainbolt Right, thanks :)
Gah I want to remember that guy's name!
Hey, @sᴉɔuɐɹɥԀ I just used the same SQL trick from yesterday's query at work
@nhgrif Which one?
(just asking because we talked about several different ones)
3:08 PM
@sᴉɔuɐɹɥԀ nice :D
custom objects have to be passed through intents by implementing Parcelable which gives you writeInt, writeList, writeString, etc
It's all very ugly and backwards but so be it
Worst of all? There is no writeBoolean
They decided to just omit that one
The workaround is to use dest.writeByte((byte) (myBoolean ? 1 : 0));
Q: Query only once in MySQLI to make a While Echo $Row work

coderminatorI have this script on top of all pages to check if user is admin otherwise we kick him. The problem is that I dont know if I am using double resources with a double query and results. Can I make this code to be only 1 query and 1 result? Please read the comments in code to understand: <?php sess...

@CaptainObvious Yikes! That's ugly!
Q: How can I refactor this if statement?

xaisoftI am doing the following about 10 times with other strings, so the code is duplicated. I was wondering how I can refactor this? string account = string.Empty; if (queryWhere.ContainsKey("account") && queryWhere["account"] != null && !string.IsNullOrEmpty(queryWhere["account"].ToString())) ...

3:40 PM
Hi, @nhgrif
I'm not sure why, but mine returns more results.
I also know that mine returns some valid results yours misses somehow, but I'm not sure why.
Does yours miss ones where it is the only post as well, maybe?
No, that is not the problem.
Mine gets the single question for user id 6, and yours doesn't.
Q: Extracts marks of all students in class from website

rick112358This code extracts marks of all students in class and stores the result in a file results.txt. It uses BeautifulSoup. Looking for code review and suggestions. Thank you. from bs4 import BeautifulSoup import requests file = open("results.txt","w") for roll in range(1,60): if roll in range(1...

BTW @Ngm, thanks for wasting my time with codereview.stackexchange.com/questions/87198/… by deleting it while I was doing a full review including Go idiomatic changes as you had requested. :( — Dave C 32 secs ago
@Hosch250 @nhgrif has two copies of the query in the SEDE input... SEDE does funny things when there are multiple result sets.
Hmm, mine has a bug somewhere.
nhgrif is in it twice with the same question.
Oh ho, he self answered it.
I wonder why this didn't filter it out:
The way you've formatted this question is more suited for codereview.stackexchange.com . For stackoverflow try to narrow down your problem to where it's failing or give us an error message, etc. — Paul S. 32 secs ago
3:55 PM
OK, fixed that problem.
Android doesn't support nested resource folders. 150 images? Put them all at the top level!
@dchapes - about the Go question... got a second?
OK, so I'm not sure if my query is wrong, but I know @nhgrif has a bug in his where it isn't selecting all first posts.
I just removed a bug in mine where there were self answers on the first question coming up.
@PaulS. - while the code is formatted in a way that is common on Code Review, the actual question here is about broken code, so this question, in it's current non-working state, would be off-topic there (I am guessing you did know that, but I am just ensuring that curvetide understands that a cross-post to Code Review would get closed as off-topic). — rolfl 34 secs ago
@Paul This question is not at all suitable for Code Review, since it asks for assistance with fixing broken code. — 200_success 58 secs ago
Q: Swift extension: Dictionary<String, AnyObject> to JSON string for URL parameter

Andrew RobinsonHere's a quick extenstion for [String: AnyObject] dictionaries in Swift. The output needs to be in the following format (order and spacing don't matter): {"key": "val", "keywdict": {"anotherKey": 100, "Key2": "Val2"}, "strings": ["string", "another"]} I am wondering if there's a better way, or...

Q: implementation interface concept for making a simple calculator in c#

rahulhow to implement interface concept for making a simple calculator in c#. using System.Linq; using System.Text; namespace MultipleInheritApplication { interface calc1 { int add(int a, int b); } interface calc2 { int sub(int x, int y); } interface calc3...

4:06 PM
@StackMonkey Why would formatting matter the most?
Images in the drawable folder cannot have an uppercase character in them
Android is written with Windows 3.1 in mind
So many arbitrary limitations
I think your question belongs to Code ReviewAlik 37 secs ago
4:27 PM
It's F R I D A Y !!!!!!
This would make a great question on the Code Review site, since the code works and there is detailed context. — Phrancis 14 secs ago
4:38 PM
For this particular case, this code might be of interest to you — MikeMB 8 secs ago
@sᴉɔuɐɹɥԀ sub query to find row with specific date.
Ah ok nice
Short-ish, but entertaining story.....
I created the user StackMonkey yesterday, but it needed chat privileges...
but, I could not cheat, etc... because, as a mod, I can't do those things for a sock.
So I took the hard-route.... answered some questions on stack overflow.
The one question got me a +1 which was cool, and the other one did too. So I had 20 rep in total. Great.
But then the one quesiton got migrated to super user.
Wow, SEDE is super slow right now
now I had < 15 rep on each site... .which was not enough to chat, it seems (despite the apparent logic).
and the bot broke because nt enough rep.
Then, the Super-user question gotupvoted, and accepted... so, now StackMonkey is on the front page... or it was.
So much for keeping a low profile with it.
4:51 PM
Should I blame IE or SE?
the first problem is that it's internet explorer :)
@sᴉɔuɐɹɥԀ Haha, it's probably checking on a stackexchange site
Works for me.
OK, it just unlocked now. WTF. IE11 is not too bad, but it's still IE.
Q: How to use writerow or append to print iterable to CSV column?

AF2k15I'm struggling with an easy question. I would like to be able to print 'value' to a column as many times as there are integers in 'count'. I can print the correct result, but not write to a list in a csv. Does anyone know why I would get the following: writer.writerow(i) _csv.Error: sequence ex...

4:54 PM
I don't know why this particular query is taking so damn long though. Seems basic enough, 1 CTE, 1 JOIN, all from 1 table
Ah, now I do.
"Text-only results" in a *SELECT * FROM Posts ...`
Actually formatted the entire question (including code blocks) into the output
@JasonB There are good times to use using (I am writing a blog article on that in the future). But like all tools they can be misused. And using is one of those tools that has been heavily misused. Its worst in books because they misuse it to save space.
But people learn from books and take this misuse as normal.
When using other peoples libraries use the prefix. When writing your own libraries you can use the using clause to simplify your own source files. So if you are writing a library MyComp::MyNameSpace then using becomes very useful to simplify the code.
now I want a misusing keyword
misusing using namespace std; or misusing namespace std;?
What would it do?
I just thought of the perfect response to an internet death threat (taken from Bolt):
> Yeah, I'm really scared now.
5:12 PM
@Hosch250 Threat where?
On SE somewhere?
@rolfl ^^ ;D
@Donald.McLean I just can't get into this song, it doesn't have the same effect as ▼▼▼
I don't listen to either...
@Lyle'sMug - you do know you are the reason that no-one else is allowed to post that .... right?
5:14 PM
@rolfl what? I just thought it was a funny meme that I didn't like this... I used to be a fan of Hate the spice girls too
it grew on me..... and I can't get rid of it, it's like a cancer .... that I would name Marla Rebecca Black
Hey, I posted that a while ago... you find it independently?
Dec 5 '13 at 14:31, by rolfl
@Donald.McLean ever heard of the story of Mel?
last one, since no one is supposed to post Rebecca,
Nothing is new on the net anymore.
5:20 PM
@rolfl Yeah. I did. Absolutely amazing story.
> In modern parlance,
every single instruction was followed by a GO TO!
Put *that* in Pascal's pipe and smoke it.
You actually have to see/understand rotating drum memory to understand it properly
It sounds crazy.
@rolfl I have. Videos at least.
Amazing. It truly is. One sec @Hosch250 let me see if I can find it.
Consider posting this to codereview.stackexchange.com instead — AnotherDev 35 secs ago
5:24 PM
Q: Javascript Dropdown Selector

Reyer SwengelI am just getting into front-end web development and to practice, I made a dropdown selector that allows for more styling than the regular <selector> element. Please let me know what I can improve on (Examples are appreciated, but not necessarily needed). I am mainly looking at the javascript, ...

Gagh why can't I find it?
I have to go and add more stuff to an SSRS Report that I sincerely Hate with a Passion like Jesus Christ himself....so maybe I exaggerate a little....but not much.
alright I finally finished listening to it. maybe I will listen to it again....
Q: (newbie)Piping Design Guide

Kohdy NicholsonSo far I have not had any issues until trying to figure out spacing required between the centerline of one pipe, and the centerline of another pipe. In order to do this, the user needs to input the size of both pipes. I then want the program to retrieve the outside diameter of the flange of the l...

Q: Sieve of Eratosthenes in Clojure

qedI am mainly interested in how to make the sieve lazy so that it will receive something like (iterate inc 2) and generate an infinite sequence of primes, but any suggestion for improvement is welcome. ;; Helper function for marking mutiples of a number as 0 (defn mark ([xs k m] (mark xs k m [...

5:47 PM
Hi, @nhgrif.
I found a bug in your SEDE query, but I'm not sure what causes it.
I am at work.
Q: is it appropriate to have else condition only for the purpose of logging?

k4vinconsider the following code if self.secondary_manifest is None: do_something else: logger.debug("secondary manifest already present") In the above python code there is no practical usage for the else condition other than logging. Is it appropriate to do logging like this ? or am ...

I just froze up SSRS! time for a sword fight!
Could you show us your php scripts to do this? Only then can we actually give you an answer. Additionally, you'll likely have to open the question on codereview stackexchange. codereview.stackexchange.comDigits 31 secs ago
5:53 PM
I don't show anyone my PHP scripts, those are private...
it's been a long week.
I wonder what a duscission is.
Or rather, what it would be if it was.
Q: My Users Controller

user3732216I was hoping someone could take a look at my users controller and give their feedback based one their opinions of what they think of my user's controller. As well as maybe give some ideas if any for some of the current TODO's in my function phpdocs. <?php namespace App\Http\Controllers; use App...

Q: Word Counting from Array onto Output File

pocketasianFor this problem, I have to have two text files: one for list of words that need to be found and other containing the document that needs to be search. The results would placed in a output "results" file later on. What I've Done: I've already figured out a way to store all of the word list onto ...

Writing documentation...
6:11 PM
I am writing to MS for a potential internship.
What should I describe my C# skills as, beginner, intermediate, something else?
@rolfl Who is this for?
Me, or nhgrif?
@Hosch250 You,,,,
What should I describe my C# skills as: reluctant!
Oh, you were being serious about the MS Internship?
6:15 PM
Because I am not being serious about anything... it's Friday
I am contacting the recruiter.
Q: Create an associative array with values as an array from an another associative array

BarFooBarI have a query that returns an array or associative arrays of ids and years. It looks like this: [{"id":8,"year":1950},{"id":9,"year":1950},{"id":8,"year":1951},{"id":9,"year":1951},{"id":8,"year":1952}] There is a fixed number of ids, but they each have many years associated. I wrote the foll...

Q: Word Counting from Array onto Output File

pocketasianFor this problem, I have to have two text files: one for list of words that need to be found and other containing the document that needs to be search. The results would placed in a output "results" file later on. What I've Done: I've already figured out a way to store all of the word list onto ...

Needs closing for now.
Well, maybe I should describe my C# skills as an enthusiast?
I'm leaving for a while, be back later.
Q: Resistor Program Using Functional Decomposition

MaryThe purpose of this program is to write a code that will give a user a list or menu of choices that show colors and their values according to some data and prompt them to enter input to determine the value of a resistor. I have completed my source code for this program and it runs perfectly, but ...

6:27 PM
@rolfl Speaking of, you may enjoy The Story of Robin Hood and Friar Tuck.
6:39 PM
You probably want this site: codereview.stackexchange.comRick S 6 secs ago
6:56 PM
Q: I am trying to pass some RSPEC Tests and not sure how

ScottI am new to Ruby and trying to pass some RSPEC tests to write a tic tac toe game. Can anyone help with this? Here are the following tests: describe Computer do it "take a winning cell in a row if available" do board = ["X"," "," ", "O","O"," ", " ","X"," "] ...

> Now the only operation they had figured out how to do on the 750 was
reboot it. This was their universal cure for any and all problems. After
all it works on a PC, why not a VAX? Was there a difference? Sigh.

But I smiled and said, "No sweat, I'll train you. The first command you
learn is HELP" and proceeded to type it in on the console terminal. So
the data center manager, the shift supervisor and the eight day operators
watched the LA100 buzz out the usual introductory text. When it finished
> Several hours later, the gnome was whispering his way into a demonstration
of how to flick a trillion dollars from country 2 to country 5. He was
just coming to the tricky part, where the money had been withdrawn from
Switzerland but not yet deposited in the Bahamas. He was proceeding very
slowly and the directors were spellbound. I decided I had better check up
on the data center.
> Most of the floor tiles were back in place. IBM had resurrected one of
the 3090's and was running tests. What looked like a bucket brigade was
working on the other one. The communication rack was still naked and a
fireman was standing guard over the immortal power corpse. Life was
returning to normal, but the Big Blue Country crew was still pretty shaky.

Smiling proudly, I headed back toward the triumphant VAX behind the tape
racks where one of the operators was eating a plump jelly bun on the 750
You should move the question to: codereview.stackexchange.comKuba 35 secs ago
Writing documentation...
7:17 PM
Q: How to add an invert-color function to the paint brush app?

B-Macpublic class PaintBrush extends Applet implements ActionListener, AdjustmentListener, MouseListener, MouseMotionListener { private final int MAX_X = 800; private final int MAX_Y = 600; private final int NO_OP = 0; private final int PEN_OP = 1; private...

Q: Can someone help me reduce the speed of this code to O(logn)

LawlMy code is too slow, it does the desired, but not in O(logn) or faster. Can anyone help? Its supposed to be a simple program that takes orders per line and sells or buys. Your program must read from the standard input a list of buy and sell orders in the format given in the samples below, with on...

Can you give some more details about what you're looking for? Are you having a problem with this code? If so, what is it? If you don't have a problem with the code and are just looking for feedback then this question belongs on CodeReview.StackExchange rather than here on Stack Overflow. — Oblivious Sage 40 secs ago
@RubberDuck did that really happen? is that what caused the Black Monday Crash?
7:33 PM
@Lyle'sMug No idea.
@RubberDuck doesn't look like it
It is folklore after all..... Internet folklore at that.
In finance, Black Monday refers to Monday, October 19, 1987, when stock markets around the world crashed, shedding a huge value in a very short time. The crash began in Hong Kong and spread west to Europe, hitting the United States after other markets had already declined by a significant margin. The Dow Jones Industrial Average (DJIA) dropped by 508 points to 1738.74 (22.61%). In Australia and New Zealand the 1987 crash is also referred to as Black Tuesday because of the timezone difference. The terms Black Monday and Black Tuesday are also applied to October 28 and 29, 1929, which occurred after...
I don't think I've ever had this many issues with a framework in the first 24 hours of using it
Just now I had to add some 20-liner because Android can't correctly calculate the height of a ListView when it's placed inside a ScrollView
You'd think it's a very basic scenario
just call me Zombie Killer --> codereview.stackexchange.com/a/87230/18427
7:39 PM
Q: Project Euler #2: sum of even Fibonacci numbers, using generators

Dominik SchmidtI am currently working on Project Euler problem #2 which requires you to print the sum of all even fibonacci numbers below 4 million. I just recently learned about generators and from my understanding they are used to decrease memory consumption by generating values on the fly (and not storing t...

Q: Building JSON array containing HTML

JoshuaSo, One of my companies developers wrote this. Not me. Alright, it was me. How can improve this puke? $return = array(); $i=0; foreach ( $prospects AS $key => $p ) { $name = htmlentities(str_replace("'", "", $p->name)); $name = "<a href=\"/LAND/prospect/" . $p->id ...

@Rory McCrossan - It is all that I have to work with. And trust me, I am using them for much more than two requests. This is not a code review, I am asking a specific question that does not have to do with the efficiency of my code. — derekmx271 49 secs ago
8:13 PM
Still writing documentation...
@JeroenVannevel I'm no android expert, but I'm just going to assume you're taking a C# approach to a Java problem and complaining because it's not C#.
A: Android list view inside a scroll view

ArshuThe shortest & easiest solution for the ListView inside a ScrollView problem. You do not have to do anything special in layout.xml file nor handle anything on the parent ScrollView. You only have to handle the child ListView. You can also use this code to use any type of child view inside a Scro...

It is a real problem
If the C# way to solving a problem is by using logic well then lock me up and sue me
Also... Android UI setup is terrible.
iOS... Not so much.
8:45 PM
This might be better suited for code-review codereview.stackexchange.comThat1Guy 48 secs ago
Q: Merging multiple JSON files using Python

Alagappan RamuI have multiple (1000+) JSON files each of which contain a JSON array. I want to merge all these files into a single file. I came up with the following, which reads each of those files and creates a new object with all the contents. I then write this new object into a new file. Is this approach...

9:02 PM
praise you, self answer from 2.5 years ago with 1 answer and 0 upvotes
You did it
You mean one upvote, right?
Because that is the reason Stack Exchange exists right there.
So, what level would you think my C# is at?
thank you everyone▼▼▼
> You've earned the "Necromancer" badge (Answered a question more than 60 days later with score of 5 or more) for "Supporting Enum in EF 5 with .Net 4.0".
Supporting Enum in EF 5 with .Net 4.0

You've earned the "Revival" badge (Answered more than 30 days later as first answer scoring 2 or more) for "Supporting Enum in EF 5 with .Net 4.0 (Visual Studio 2010)".
I don't know. Compared to some, I'd say beginner, but I think I might be past that level now...
@Lyle'sMug Get 5 more, and you will have Enlightened.
it's up to CR Community for that! :)
9:10 PM
@RubberDuck 0 upvotes prior to mine ;)
A: Calculator Snippet CC

Hosch250Beyond not having the basic framework for the HTML, you have one error according to the W3C validator: <input id="display" value="0" size="15" readonly="true" > readonly="true" is not valid, the correct attribute is readonly="readonly" There is a pretty bad UI problem here. When you click th...

@Hosch250 Well.... I consider myself an intermediate. This course I'm taking is supposed to be for intermediate C# devs.
They're all n00bs and idiots......
So, beyond beginner, at least.
I'm not sure that I'm as good as you.
twitch.tv/speedzor Live demonstration of what I made in the past 24 hours!
9:14 PM
@JeroenVannevel What do you think?
I'd say advanced beginner
between beginner and intermediate
OK, thanks.
Zombie down.
@AlagappanRamu usually, yes. But as mentioned, it's keeping everything organized. If you think it's annoying that codereview is much less frequented than SO, then put yourself in their position and ask yourself this: do you really want to invest much time into optimizing someone else's code when all you (might) get is virtual reputation? Just show some patience and understanding and it'll all work out. — Oliver W. just now
Anyone else having a problem with the display on the Activity page?
Q: Send Ajax Request Function v2

Kid DiamondI would like to get a full on review on my sendAjaxRequest function. Suggestions for any improvement are always welcome! sendAjaxRequest.js var sendAjaxRequest = (function () { 'use strict'; return function (settings) { var url = settings.url, method = settings && ...

Q: Filtering multiple large (>2gb) csv files line by line, can I make it faster?

MVersteegI have a set of pretty large files (>2 GB, over 30m rows) containing intraday data in the following format: TIC, Date, Time, Bid, Offer AAPL, 20090901, 09:45, 145, 145.5 AAPL, 20090902, 09:45, 145, 145.5 AAPL, 20090903, 09:45, 145, 145.5 I also have a file that contains exactly those dates th...

9:27 PM
This SSRS Report wasn't so bad
we will see what the client says on Tuesday in the meeting. they always want something changed. give me the right specs to begin with! lol
Q: Registering a plist to NSUserDefaults

Dan BeaulieuI've been struggling with registering a plist into NSUserDefaults and I've finally got it working, though I'm not sure that its written properly. I'm hoping someone here can shine some light on this process. My intention with this code: I want to be able to set all of my values in a plist and ...

that helped, I got the code running but I still have a lot of questions, I wound up posting my code on Code Review. codereview.stackexchange.com/questions/87260/…Dan Beaulieu just now
Monking all ;-)
@rolfl You got an answer.
^^^ and you got a +1 ;p
9:37 PM
It's a lightweight answer, but it is positive ... and right. It does not address the items I was hoping for coverage on, but that's the way things go.
I know, it isn't my best answer.
Maybe it will get more attention from others now that I bumped it.
> Lastly, the readonly attribute doesn't need to have a value; it just needs to be "mentioned", so to speak. It's presence is its value. Giving it a value is fine too, of course. Just thought I'd mention it.
A: Scaling the last column in a table (with input) to match the container

FlambinoThe 7px padding issue can be solved by adding box-sizing: border-box to the input. That'll make the input's 100% width include the input's border and padding. As for using a read-only input, I'd say that's a fine solution - at least for the data. Besides scrolling without requiring a scrollbar, ...

I just signed an offer for new job... I am not answering any questions tonight.
Yeah, I saw that in the thing.
9:39 PM
IE just broke SEDE
That doesn't sound good for your current company.
Congrats @nhgrif
Hope you like your new job.
Not sure I want to see your boss's face on Monday.... or was it today (that's not a question you have to answer, @nhgrif ) :-)
9:52 PM
@nhgrif Congratulations!
@rolfl not sure if you wanted to multi line your text in that table but just in case I gave you a short answer
@nhgrif Congratulations

« first day (713 days earlier)      last day (2022 days later) »