« first day (502 days earlier)      last day (1890 days later) » 

8:01 PM
@skiwi Me too.
 
0
Q: Password validation in Java

pt18cherI just wrote this password validation code function that checks to see if a password will be accepted in AD or not. I'm not sure this is the best way to do it, but for now it works fine. I would love some suggestions on how to make it better. Thanks!! public String validateNewPass(String pass1, ...

 
@CaptainObvious nice question, no need to Jamalize
 
"thanks!!"
missing [tag:validation] tag
 
0
Q: Worst case running time

CodeWriterWhat would be the order of growth of the worst case running time of the following code fragment as a function of N? int sum = 0; for (int i = 1; i <= N; i++) for (int j = 1; j <= N; j++) for (int k = 1; k <= N; k = k*2) for (int h = 1; h <= k; h++) sum++;...

 
@CaptainObvious And... ?
 
8:13 PM
@skiwi et tu?
 
@CaptainObvious Not asking for a review
 
@Phrancis you're from Quebec too ?
 
Now starting to pick up on my C++ reviews:
0
A: Lemonade Stand Menu Program

syb0rgHere's a few things I noted: Don't have using namespace std; in your code. It's almost universally considered a bad practice. The C++ standard states that you should use int main() and not void main(). Bjarne Stroustrup (a creator of C++) stated that this isn't even C++ (or even C!). I'm sur...

 
Yep @Marc-Andre - Although I live in the USA now
cout << "\n\n\n \t\t YOU HAVE EXCEEDED THE MAXIMUM MENU ENETERIES FOR THIS ITEM "
 
0
Q: F# BinarySearch return position

TobberothI'm trying to implement a simple binary search in F# as a way of learning functional programming. I've already implemented it in an imperative way in C# which is my main language, but I thought it would be a nice challenge and a good way to learn functional concepts by implementing it in a recurs...

 
@200_success / @Jamal - that meta close-flag question just got interesting:
Oh, interesting, as a CR mod, that's why I am intetrested in this discussion.... we have that many? I know that I just click the helful-option on the flag simply because it is 1-less click than decline. Using that as an indicator of whether the flag is helpful or not is.... meaningless, @Gilles — rolfl 49 secs ago
 
@CaptainObvious is that off topic? He seeks for advice on how to fix its program, not a code review
 
@mariosangiorgio Good call, I agree.
found the vote-to-close button?
 
@rolfl yes, just voted
 
@mariosangiorgio it's a good idea to DV also when you VTC. I forget why. I think posts with a certain number of DV get deleted automagically after a certain time.
 
8:35 PM
@Phrancis Nice thing to know!
 
@Phrancis thanks for telling me
 
And votes on questions do not cost you reputation loss.
 
Much obliged :)
 
oh, I also added a comment. I didn't know the auto-generated one would have appeared. I'm such a noob
 
@Mat'sMug does not have a CONVERT() function? I found CAST() ... but not convert.
@mariosangiorgio we've all done worse. Yesterday I edited my updated answer into the OP's question.
 
8:39 PM
LOL
4
 
yesterday, by Phrancis
Oh shit
ensued shortly thereafter :D
 
That was a good one :P
 
I answered a Java Question.....
or was it a JAVA question?
0
A: Password validation in Java

MalachiI took your code and added some returns to it. you were running through all the if statements even when an entire field was missing. I also added a return "success" if I hit that (which is probably checking all the expressions twice now if one isn't true) it dumps out as a success and will sav...

The other answer looked good as well
 
@Malachi dude, pass1 = null or pass2 = null ?
 
@janos what is the proper string checking method.....I don't write Java, I am all C#. give me a second and I will google fu it
 
8:47 PM
pass1 == null || pass2 == null
yeah I was surprised to see you review java
 
the Logic was horrible, I had to
friggin VB and "Or" lol mixing 3 languages.....
was there anything else weird syntactically?
I did all those "&&" right
 
the logic is still horrible. if pass1 or pass2 were null, there would be an NPE already in pass1.length, pass2.length ....
 
the null checks should be first, right out of the gate huh?
 
yup
it's very poor code
 
lot's of magic strings
@janos fixed that one too...
 
8:58 PM
Whenever you guys use "magic" to describe a number, string, etc. what does that mean?
 
when you use a given value instead of putting it in a variable (or in a constant), give to the variable a meaningful name and use it
http://en.wikipedia.org/wiki/Magic_number_(programming)
 
What he said ▲▲▲
 
9:21 PM
Just got this marketing gem from the CEO of my employer:
> While we have capitalized on strong forward momentum, driven by the winning spirit of our people and solid performance in our core business, we need to better position ourselves for stronger performance, balancing growth, profit, and risk.
Guy probably makes 7-figures if not 8... and writes that.
Thanks @mariosangiorgio that makes sense
Wait... that guy is concatenating HTML into Java... is this standard??
 
in strings it's perfectly legal
 
9:38 PM
I see, ok.
I'm not used to seeing multiple types of code together (other than )
 
html, javascript, css .... or how about html/php ?
 
True. I don't really look at HTML questions though. Because... It's HTML.
 
Java can be used like VB.NET and C#.NET only instead of ASP it's JSP
IIRC
 
I haven't seen DaggNabbit or nhgrif in a while; did they fall off the map?
Well, looks like Dagg has been posting questions recently, just hasn't been here much.
 
10:04 PM
napalmd
 
And then, occasionally, someone is brilliant:
Scotland: DON'T OPEN THE BOXES! Encase them in concrete, uncounted & uncountable. BE THE ONLY QUANTUM-STATE STATE ON EARTH! #VoteSchrodinger
 
That. Is. Comedic. Gold. Especially #VoteSchrodinger
GTG
 
-1
Q: Gaussian blur shader optimization

rraallvvI have this GLSL snippet of code that is used for a one-pass gaussian blur effect. Vertex shader attribute vec4 position; attribute vec4 inputTextureCoordinate; uniform float texelWidthOffset; uniform float texelHeightOffset; varying vec2 blurCoordinates[5]; void main() { gl_Position = p...

 
10:24 PM
I need a vote to reach the cap
can somebody please throw me a bone?
thanks Santa!
ttgtb
see ya all tomorrow
 
11:22 PM
0
Q: Horridly Inefficient Project Euler #14 in Python - Collatz Sequences

Jose MaganaI created this solution awhile ago, and have been going back over my problems to try to make them all more efficient. I have been stuck on this one, and have tried a few different ideas. So far, my original code has still been the "quickest" at over 2 minutes. Here is the problem and original so...

0
Q: Storing data and matching new data with stored data

user4047248I am trying to make a 'diner food suggestion' program in Java, that relies on earlier user input. I have at the moment created a basic structure, but i am running into difficuties in terms of storing and inputting data. I would really appreciate some suggestions in terms of ways to input data and...

 
Monkevening
> I am trying to make a 'what to eat for dinner suggestion' program in Java, that relies on earlier user input.
 
11:46 PM
@Phrancis that question seems off-topic...
 
OK it's been approved. Does the above code actually work? You mentioned you are running into difficulties. — Phrancis 11 secs ago
@mug ^^
 
We have now been 1338 days in beta.
3
 
Hi thanks for the feedback. @SimonAndréForsberg, yes i know that i got a long way to go. The problem is that i need some pointers/suggestions to what road i should follow to accomplish this. E.g. is it possible to store and get the data with arrays etc.. — user4047248 4 mins ago
I'm split on whether this is CR or SO... or
 

« first day (502 days earlier)      last day (1890 days later) »