« first day (956 days earlier)      last day (3076 days later) » 

10:00 PM
0
A: Submitting form using dynamic variable with query

LeighA few things you could do to simplify the code: Rather than examining every form field to determine if the form was submitted, a single check of say - the submit button - should suffice for most purposes. Avoid using strings like "ALL" or "Choose:" for the form field values. Those are fine for...

 
@200_success thanks for posting this
 
^^ditto
 
I've come to the conclusion that it's a bad idea for Stack Overflow, and completely bad news for Code Review.
 
Stargreed.
 
I like how you put it. and I agree. and I hate licenses.
 
@Mat'sMug I didn't notice.
 
^updated link to MSE
 
Get used to writing 2016.
 
Whoops
 
lol
 
10:07 PM
@Phrancis Can you un-pin something else to make room on the starwall? I see 4 pinned comments now, that can't be a good thing.
 
There
 
:-)
 
Hey, why take the WB Leaderboards down?
 
Anyone who cares knows where to find it.
 
OK fair enough
 
10:10 PM
because SE changing licensing stuff could spell D.O.O.M. for this site
3
at least that's how I read it
 
What's the devil's advocate's opinion on this? I mean, surely it can't be all bad...right?
 
somewhere within that 36MB of markdown text on MSE
 
monking!
 
@Mat'sMug the what? That's a lot of text
 
Zak
10:16 PM
@Phrancis Devil's advocate: In theory, this is just a minor change removing the automatic need for attribution unless the O.P. say otherwise.
 
Unrelated, I'm guessing there is not an official style guide on where to put all those closing parentheses, is there?
 
huh?
 
(defmacro powerOf2 (n)
    "Given input n, return n to the power of 2"
    (setq n (* n n)))
(print (powerOf2 5))
I was tempted to put a line break before the last paren in the macro def, but it might look weird
 
why is there an opening one before defmacro anyway?
 
@Phrancis Oh, there probably is.
 
10:24 PM
@Mat'sMug because: a macro returns a LISP form which is then evaluated
(I think)
 
possible answer invalidation by Quill - HAT MANIAC on question by Quill - HAT MANIAC: codereview.stackexchange.com/posts/113931/revisions
 
I'd need one vote for the speedy delivery hat :D
2
A: Input validation for a user

TopinFrassiYou could merge your two foreach loops using SelectMany in LINQ. So instead of : foreach (DbEntityValidationResult result in results) foreach (DbValidationError error in result.ValidationErrors) You'd have foreach (DbValidationError error in results.SelectMany(r => r.ValidationErrors))...

 
This one is pretty popular as well IIRC.
 
@Duga 'Fixing' an SE bug that gave me downvotes, not invalidating content though, check the markdown if you don't believe me
 
Thanks Santa!
 
10:26 PM
@TopinFrassi After reload.
 
I'm in no hurry, I know I'll get it. :p
 
0
Q: Proper way of handling exceptions in DAO layer?

cookiemonster00I'm a bit clueless on how to handle exceptions. What i've think so far is to use a custom error page for the users so they can't see the full exception for security reasons and log the exception in a txt file. So this is how my dao methods structure is: try { //stuff } catch (S...

 
I need 25 to cap within half an hour.
 
Thanks much, @Mast
 
@Hosch250 How's that?
 
10:29 PM
@Hosch250 I'm out, sorry dude
 
No need.
@HATMAN Very good. Now I just need 5.
I really should post an answer, though.
 
  Unacceptable:

    (define (factorial x)
      (if (< x 2)
          1
          (* x (factorial (- x 1
                          )
               )
          )
      )
    )

  Acceptable:

    (define (factorial x)
      (if (< x 2)
          1
          (* x (factorial (- x 1)))))
There's my answer :)
 
@Phrancis Hey, I like the curve in the top one better :(
 
@Hosch250 fixed
 
Thank you.
 
10:31 PM
@Hosch250 I don't think LISP is so concerned with curves. Except those at the beginning and end of every single expression.
 
@Phrancis I agree the second one is better.
 
as long as the IDE highlights the opening brace when you're on a closing one...
 
@Mat'sMug Well, all decent IDEs for all languages (even SQL) already do that, AFAIK
 
IKR
Excel does it
 
yo @danpantry you still alive here?
 
10:34 PM
I don't know that there's an IDE per-se for LISP, maybe IDEA has some plugin for it
 
@Mat'sMug You consider Excel an IDE?
 
Oh, NVM.
 
Not sure how deep I want to go into it, but it's kind of unique language
 
@Mast only if Notepad is
 
an IDE for your spreadsheets yes
 
Zak
10:36 PM
@Mat'sMug Can I get a review of my review?
0
A: Module for implementation in multiple version-controlled spreadsheets

ZakJust things that jump out at me: call is redundant. SubName arg, arg, arg5:=arg var = FunctionName(arg, arg, arg5:=arg) Is clearer and less cluttered. This: If bListed = True And bDirectory = True And bRevision = True And bUpdate = True And bProtected = True Then Call SetStatus(True...

 
If Excel is an IDE there are an awful lot of IDE out there.
 
Zak
@Mast Excel *has* an IDE. Big difference.
 
@Zak I can agree with that.
 
for some values of "IDE"
 
Questions on improving working code are better suited for Code Review Stack Exchange. — Jordan just now
 
Zak
10:38 PM
Managed to get my review in with 4 minutes to spare :)
 
@Zak You'll have a vote after Reload.
 
@Zak I'll comment when I vote on it tonight :)
TTQW
 
Zak
@Mat'sMug Cool, I wrote it in a *bit* of a hurry so just wanted to check I hadn't put anything completely stupid in there.
 
Hey, let's get it to +3 first.
He can get 007 and FGITW hat both at the same time.
Help, no more votes!
I'm maxed out without a buffer!
 
I cast one for a great answer
 
10:46 PM
On What? I wanna vote too
 
On Frodo &c?
 
10 mins ago, by Zak
0
A: Module for implementation in multiple version-controlled spreadsheets

ZakJust things that jump out at me: call is redundant. SubName arg, arg, arg5:=arg var = FunctionName(arg, arg, arg5:=arg) Is clearer and less cluttered. This: If bListed = True And bDirectory = True And bRevision = True And bUpdate = True And bProtected = True Then Call SetStatus(True...

 
Oh okay, I'll wait. :p
BRB after supper. ahah
 
Oh, it is on Zak.
@TopinFrassi Vote then.
That is good, and Zak needs to cap.
 
Zak
I was going to leave a comment asking the OP to upvote as well as leave the checkmark, but then I'd have ruined my 007 chances.
 
10:48 PM
@Zak I'll vote in 15 min.
 
Does VS support Markdown?
 
@Quill-HATMANIAC NAFAIK.
 
I swear, the Mac IDE Visual Studio Code has more language support than Visual Studio
(Which includes Markdown)
 
Why would you use markdown in C# code?
Or any code, for that matter.
 
no... markdown in your IDE
not necessarily in your code
 
10:53 PM
What is an IDE for except for writing code?
 
I have Word for writing documents?
 
@Hosch250 Visual Studio Code is an IDE
 
Why would I ever want to use markdown in an IDE?
 
@Hosch250 running tests, connecting to servers, managing version control, issue control, ...
 
10:53 PM
@Quill-HATMANIAC Yeah, I know what Code is...
 
IDE != editor with code-helpers
 
@Vogel612 Huh? I have Git for that.
And Moq.
 
the idea of an IDE is that you have one single program where the "threads" connect and that's the only thing you need
 
Code does those things
 
Isn't markdown for editing text?
 
10:55 PM
yes
For writing SE posts...
 
I'm for the single responsibility principle. My IDE should edit code, and my browser should support markdown.
 
for SE posts I got stackedit.io if I don't write them into the SE box directly
 
@Vogel612 Yea, VS is wonderfully good at screwing them all up at once.
 
@Hosch250 your IDE can (and should by name) do so much more than edit code
@Mast VS is a worse IDE than eclipse ... just saying
 
Some IDEs support viewing markdown files as a markdown HTML (as preview) to make it easy to edit
 
10:56 PM
@Hosch250 if you want something to edit code, use notepad
 
The usual problem with a IDE is they lack focus. They try to do as much as possible in one program, breaking a heck of a lot of stuff.
 
Notepad doesn't have the fancy code-editing features.
 
Notepad++ or Atom.
 
yea. plugin-based IDEs are better...
@Hosch250 editing code is just editing a text-file
what you're talking about is refactorings
 
I think Atom can compile C and C++ with the right plug-ins.
 
10:57 PM
working on AST
 
Welcome @MattMathis
 
Hi, @MattMathis.
@Zak I have a feeling you have two new hats.
 
emacs is a damn IDE, and a better one than VS :D
how was that joke I read on some lecture notes...
 
TTQW!
 
Zak
@Hosch250 Don't have 007 yet though
 
10:58 PM
I still don't get why an IDE should have markdown. I've never been in a situation to need it.
 
> Vim: a superior text-editor
Emacs: a superior OS
@Hosch250 consider having to blindly write markdown for something like a readme...
 
I edit those in my browser.
 
but do you get versioning history for them in your browser?
 
@Hosch250 To someone who writes documentation, it could be useful. I used that a bunch writing the modding guide for Cardshifter, so I could have the game code on one side and the markdown documentation on the other
 
But yeah, I guess I can see it now.
@Vogel612 On GitHub?
 
11:00 PM
for example.
 
@Phrancis Makes sense.
 
bitbucket uses markdown, too (slightly different flavor, but eh)
 
@SirPython: Is my latest edit on the SimonSays question correct?
 
Oh, it is still an hour to reload!
 
yeah, I'm still ages off capping on CR
 
11:07 PM
0
Q: Python GUI by QtWebkit and Flask

Mr-MoqadamI'm new to Python.For learning purposes, I want to create desktop application by using QtWebKit and Flask. Main idea is : create a form including a QWebview widget create a Flask app run Flask app on QWebview it works correctly but I want to know : How can I improve my code ? is this ...

 
I capped. I bet you I start losing rep.
 
@Quill-HATMANIAC Yup! Thanks.
 
wtf, I just posted that message and it won't let me edit it
 
I capped just days before WinterBash, and twice in Winter Bash.
 
my computer's onboard clock is screwed
 
11:11 PM
Hello.
 
Hey @TheCoffeeCup
 
How's it going?
 
If I were doing the code review, my suggestion would be to replace the = with ==. — dave 54 secs ago
2
 
Greetings
 
Hey @IsmaelMiguel.
@TheCoffeeCup Pretty good, thanks. How're you?
 
11:16 PM
How's it going?
 
Good. You?
 
@SirPython Good, but bad on hats.
 
Honest answer or standard BS?
 
@TheCoffeeCup Welcome to the club.
 
@SirPython #8.
 
11:16 PM
@IsmaelMiguel If it's not going to cause drama, you can be honest.
 
It's not drama. I just hate this season. Most specifically, from December all the way to Easter.
The BS answer: I'm alright
 
@TheCoffeeCup Are you a fan of DJ Okawari? :p
 
My first SO answer in absolute ages: stackoverflow.com/a/34323989/2509848
(I could get the FGITW hat if it is accepted too!)
 
@Morwenn #8 on CR.
 
It looks like a good duplicate for Programmers.
 
11:19 PM
Wat.
 
@Morwenn Hatwise.
 
It doesn't answer my question :o
Well, I guess it's a no then :/
 
hey @IsmaelMiguel, do you have a minute to help me with something:
 
0
Q: Minimizing database overhead by storing additional information to the users authentication-object (Spring Security)

Stefan FalkI am using Spring Security in order to check if a logged in user is authenticated. However, after authentication, as some actual requests come in, I would like to minimize the number of database calls as much as possible. Hence my question: From the SecurityContextHolder I can get my hands on th...

 
@Quill-HATMANIAC Sure
Javascript?
 
11:25 PM
yeah
 
Zak
Yeah! Made it on to page 5 of users now.
Just 3 more to go.
 
@Zak Good luck!
 
Guys I'm two upvotes away from capping for the second day consecutive!
And there' 25 minutes left.. lol
 
Haha, I'm always dropping lower and lower in the top users ranking ^^"
 
@TopinFrassi I'm 14 answer upvotes. I don't think I'm gonna make it.
Unless Santa duplicates himself 5-10 times.
 
11:27 PM
I only got rep for the graduation swag, and I still haven't got any swag :(
 
@Morwenn Because they haven't prepared it yet.
 
@Morwenn I'm slowly climbing the second page, but i'm not sure that's gonna happen. I've had loads of time here during fall, but it won't be the same during winter
 
I'm on top 2 pages...
 
I'm on top 1 page.
 
@TheCoffeeCup I fear I'll drop too low by the time they get the swag ready.
@Hosch250 You'll be above me in days.
 
11:28 PM
I'm on page 2
 
I'm #18 on our site
Should get something
When we graduate
Who knows when that is
 
and 8 upvotes off getting the Hat Trick hat for CR
 
Zak
@Morwenn I think you'll be fine :)
 
@Morwenn I asked Pops and he said first like three pages IIRC
 
@Quill-HATMANIAC Wat. It's one more page than expected :o
@Zak Not if I keep getting 0 upvotes for my answers x)
 
11:31 PM
@HATMAN I can help out with a site design if you guys like: see this
@Morwenn I'll try and find the message
 
:)
 
Ok, that's not true. I still managed to get two revival badges today.
 
I had 5 0-up answers recently
 
We have a proposal from the design team, but it is still in mockup land
 
@HATMAN How long has that been?
Once it started here, we were done inside of a week.
 
11:32 PM
I want a Code Review mug. It would be the best swag ever :D
 
in David's hat store, 2 days ago, by Quill
is it just the mods, or page ones or what?
 
Thanks, Santa! (though I'm not sure if it is someone here)
 
in David's hat store, 2 days ago, by Pops
Pro tems and top couple pages of users.
in David's hat store, 2 days ago, by David
@Quill you want a list? (depends on the site comes down to about any user with <1500 rep gets free stuff)
@Morwenn see ^
 
On Academia, it was the first two pages
 
If I'd find the following during a review, I'd shoot the developer in his foot.
788
A: Printing 1 to 1000 without loop or conditionals

Prasoon SauravCompile time recursion! :P #include <iostream> template<int N> struct NumberGeneration{ static void out(std::ostream& os) { NumberGeneration<N-1>::out(os); os << N << std::endl; } }; template<> struct NumberGeneration<1>{ static void out(std::ostream& os) { os << 1 << std::...

 
11:35 PM
Google is amazing today :D
 
@Quill-HATMANIAC :o
 
+1. Of course, implementing a compiler that doesn't use loops or conditionals is left as an exercise for the reader. :P — Matthew Flaschen Dec 31 '10 at 7:03
 
#include <iostream>
template<int N>
struct NumberGeneration{
  static void out(std::ostream& os)
  {
    NumberGeneration<N-1>::out(os);
    os << N << std::endl;
  }
};
template<>
struct NumberGeneration<1>{
  static void out(std::ostream& os)
  {
    os << 1 << std::endl;
  }
};
int main(){
   NumberGeneration<1000>::out(std::cout);
}
 
@Mast I'd probably hire them straight off. No fool could do that.
They would be smart enough to do it properly in real life, I would think, and if they weren't they could be trained easily enough.
 
@Mast Ugly, but kind of cool, also...
 
11:38 PM
wtf happened to my lowercase "i"s??
 
@Vogel612 It's all your "I"s
 
check the markdown...
it's "i"s
 
@holroy It's cool like Brainfuck and related esolangs are cool. It's a good exercise to learn why we do some things one way and don't do other things. Just don't create anything that should be useful with it.
 
@Vogel612 I saw, but your message looks like "... is"
 
hmm... monospace isn't that prominent, eh?
fixed
 
11:40 PM
> during a review
 
@Mast THAT is so true! The coolness is in a kind of sick way...
 
Interview questions are a totally different thing.
I'm not too fond of interview questions to be honest. Any fool can learn the basic answers by heart.
 
invert a binary tree
optional requirement: iteratively
 
@Hosch250 wow, been a few weeks
We had a lot of critiques though being artists and all
 
Ping your designer.
LOL, scared them off?
 
11:42 PM
ok
@Hosch250 lol, maybe
 
On interview questions I once had one calculating the degrees between the hands of an analog clock. The point was not getting the correct answer, which most failed on, but rather how you derived at the answer and how you responded when being told it was incorrect. That was an interesting question and approach.
 
Remonking
 
I just got impatient and made us one
it was only like a few weeks after that we got the design anyway
@Phrancis hi
 
15 'til reload guys
 
No cap today, then.
Not for me.
 
11:46 PM
Me either, I'm 80 off
maybe StackTomorrow will be kinder
2
 
I'm worse: 130 off.
 
I'm worse: 190 off. :)
 
@SirPython lol
 
You are making me feel bad about capping :(
 
Now 112 off, it seems.
@Hosch250 I capped yesterday, so...
 
11:48 PM
@TheCoffeeCup So did I.
 
@holroy from hours to minutes or from minutes to hours?
 
I just need one more cap to get the hat.
 
can I assume that the hours are displayed in discrete steps?
 
@Hosch250 I feel jealous.
 
@TheCoffeeCup Vote your new question tomorrow.
 
11:49 PM
@Vogel612 The time changed from 03:15 to 03:45 or something, so both hands moved. Most guys only calculated the minute hand, and forgot that the hour hand moved also...
 
@TheCoffeeCup My question yesterday went hot, and I answered it myself.
 
so the hour hand doesn't move discretely...
 
@Hosch250 thanks.
 
Then, I answered a couple today, and asked for the last couple at the end. Turns out I lost 20 rep as the result.
Oh well, 20 isn't that bad.
 
(may Santa be extremely generous for the next 9 minutes)
 
11:51 PM
Nope... That was part of trick of it... So someone argued that the premises was flawed, some recalculated and starting thinking of the hour hand... Actually quite interesting
 
No, stay away from me, Santa!
 
^^Not gonna happen...
 
Zak
This worked great, but I did run into a few interesting errors. I created a ApplyStatusText subroutine, with arguments ws as Worksheet and isOnline as boolean. I've run into this problem before, here's a link to the solution that was found. The second issue is that Excel has a maximum character count in the footer, so if ErrorMessage got too long, it would crash when setting the left footer. I shortened the error messages to solve the problem. — Taylor Ostberg 4 mins ago
noooooooooooooooooooooooooooooooooo
 
@Hosch250 lol
 
@holroy so the point is that the question is formulated ambiguously from the start...
 
11:51 PM
0
Q: Pythons Around the Rose

TheCoffeeCupBased off my Java Petals Around the Rose, I thought it would be good practice to write something again in a different language. Because the language is Python, I named is "Pythons Around the Rose", and everywhere in my code, the word "rose" would be replaced with "python". Also, "Potentate" is ...

0
Q: Prime factorization in f#

Luke CummingsIn the pursuit of learning f#, I have been working through some Project Euler problems. This is my solution for problem 3: open System open System.Collections.Generic let number = 600851475143L let limit = Convert.ToInt32(sqrt (float number)) let sieve = Array.create (limit+1) true sieve.SetV...

 
what did you do with candidates that tried to clear out the ambiguities?
 
Hey, who's the person that learned F# recently?
 
EBrown...
 
Ethan knows it too.
 
@EBrown @EthanBierlein Take a look ^^ and vv
 
11:52 PM
Just take a look at recently posted questions.
 
@Vogel612 I was partly part of it as the object, and got references later on in the interview. It was an entertaining exercise to be in, and learn about. People do behave very differently when being caught doing it wrongly. Some go into defense mode immediately, some needs to rethink to understand what went wrong, some don't care, some just kind of skips the whole and tries to ignore it or make it mean nothing... Loads of responses
 
It doesn't seem that hard if you know math with radians.
 
@Mast Are you talking about EBrown? Or me (how learned enough to do some minimal responses)?
 
4 minutes. Gonna try tomorrow.
Any idea why the close vote here:
1
Q: Add many objects to a collection in a JavaScript object

sigilI'm trying to add a lot of objects manually into a collection. The best I can figure out is to define an object, create an add method, and call that add method a bunch of times in the object's constructor. function FieldMap(){ FieldMap.prototype.add=function(listField,formField,fieldType){ ...

 

« first day (956 days earlier)      last day (3076 days later) »