« first day (698 days earlier)      last day (3322 days later) » 

12:00 AM
There are 1279 unanswered questions
 
1::sec => dur second; 60::second => dur minute; 60::minute => dur hour; 24::hour => dur day; 7::day => dur week;
 
Seems cool :D
 
12:15 AM
@Simon - See:
VM11076:38 Clicked button 3: 274 days have elapsed – your Site is fully graduated.
2015-04-01 20:13:48.638VM11076:8 Already played 274 days have elapsed – your Site is fully graduated.
2015-04-01 20:14:01.036VM11076:38 Clicked button 0: 275 days have elapsed – your Site has won the internet!
2015-04-01 20:14:13.431VM11076:24 Low on 0
2015-04-01 20:14:13.437VM11076:38 Clicked button 0: A new Site was born into private beta!
2015-04-01 20:14:25.825VM11076:8 Already played A new Site was born into private beta!
 
We're #5, woo.
 
@rolfl My patch worked?
 
Even wihtout the update, because the questions were low at the end, it workd.
 
which is why, in my earlier testing, it worked ;-)
 
12:16 AM
I applied update earlier today and think it worked. I didn't watched when we graduated.
 
should have added a log message ;-)
 
Pro-tip: Low-frequency code should have more logging.
 
If anyone has inside information on an internship in the USA, holla at me
Just putting that out there
 
This is a good April Fool's answer. — nhgrif 5 secs ago
 
12:33 AM
Not sure how I feel about April Fool's answers.
 
Bah I need to work with machine learning classifying algorithms like Logistic regression/SVM/Random Forest and never had any course on those. This is going to be a hell of a job. Google to the rescue :/
 
12:45 AM
@SimonAndréForsberg have you seen this? arstechnica.com/gadgets/2015/04/…
 
0
Q: Sparse Life Grid (Game of Life) Python

LindseyCan someone take a look at my code fully and let me know what is in line with what is being asked. My code does not contain comments, this a rough, rough draft but every bit of code is supposed to follow what needs to be done for each function. My professor is providing the test program in class ...

 
Google is terrible at naming things.
 
1:01 AM
y u say dis?
Also, says the guy named nhgrif :p
 
18
Q: Is there an alternative to Windows Server since it is being discontinued?

BigHomieSince Microsoft is discontinuing Windows server, is there a viable alternative for running Windows services? EOL for 2012 R2 isn't until Dec. 2020, but I still need to be ready. So far for my environment, I know that: We have 37 2012 R2 Servers 15 3rd Party Services That run on Windows Server ...

You guys heard about this??
 
Holy crap, got a FB working in ChucK ... Now I need to make it make sounds
 
@Legato Google created a programming language called "Go" which is very difficult to Google.
And now they're creating something called "ARC" when Apple has had something called "ARC" for four years now.
Asynchronous code doesn't run synchronously. — nhgrif 6 secs ago
 
@nhgrif Yeah you're right about that. Also, I heard Go is bad.
@sᴉɔuɐɹɥԀ Sounds exciting, I want to see what you mean. :O !
 
1:17 AM
wow
Nine Inch Nails released an album called "Broken", and then later released a remix album called "Fixed".
 
@Legato I'll make a YouTube or whatever to go with a question that I will post soonish. To "hear" the code, so-to-speak.
 
0
Q: select id based on href selected

JavaScriptHatesMeI have been attempting to select an ID based on the href selected this is my code so far <div class="eventsDisplay"> <a href="eventListing.php?=event<?php echo $minute['cityid']; ?>">Event name:&nbsp; <?php echo $minute['eventName']; ?></a> </div> <?ph...

 
That appears to be off-topic. Right?
 
1:32 AM
^ Yes
(most likely)
@Legato I have sound now. Just need to make it do something cool!
Hi, thanks, yes currently it shows the id based on 3, I'm trying to find a way to make it more dynamic, based on quires, the idea would be I could then have as many href's I wanted stored on the first page and the links would give a user all the details of the event. I wasn't sure is sessions or if there was a way to get the information required another way I haven't encountered yet. — JavaScriptHatesMe 1 min ago
@nhgrif ^ Thoughts?
 
off-topic
asking for code to be written
Wow... I just realized my sub has been turned off for several, several months now.
And I just turned it back on...
sounds much better now.
I'm exactly 75 rep away from stackoverflow.com/users/420015/adneal now.
 
1:58 AM
Man, I'm sometimes surprised how much space you have on a phone these days.
I remember having one of the very early mp3 players, and you could barely fit 1 full album on it.
I just made a play list consisting of about 10 albums, and I expected it to take up all the rest of my phone's space... but it barely touched it.
 
@nhgrif I have 8GB in-phone in the 520, and 15GB free one OneDrive because I have the phone.
That's not bad.
 
I think I had a 128mb mp3 player at one time?
 
2:16 AM
I've heard of phones with just MB's, and devices with just KB's.
Things move fast in the computer world sigh
 
My phone is 16gb. With a 64bit processor. ;)
 
Nice. The 520 is a low-end phone.
I believe it cost about $60
You can get phones that are over $1000 without a contract...
 
2:34 AM
From where?
The top end iPhone 6 Plus with all the bling is only $849
 
Microsoft, I believe.
 
And everyone always talks about how expensive and overpriced Apple is
 
The 1520 and the 1020 are really high-end phones.
 
So obviously, Apple's most expensive phone is the world's most expensive phone, right?
 
They were developed under Nokia.
I think some of that expensiveness is just hype.
 
2:35 AM
Mmm, $949 actually for the most expensive one.
 
But, their watch sure can be expensive.
It looks like they don't have the 1520 or 1020 anymore.
 
The watch is stupid, and a fashion accessory more than a piece of technology.
 
Pity.
 
There's nothing really that cool about the watch.
 
The 1020 is being used by scientists for taking their pictures on the microscope.
It had a 41MP camera, IIRC.
I think the MS Band could be cool in the later versions, I haven't scope the iWatch out yet.
MS Band is mostly a fitness band thing for now.
 
2:41 AM
Crappy manual...
<<< Math >>>;

440 => float frequency;

function float CalculateStep ( float frequency )
{
    ( Math.exp ( frequency, 1/12 ) ) => frequency;
    return frequency;
}
> [CalculateStep.ck]:line(7): arguments type(s) do not match:
[CalculateStep.ck]:line(7): ... for function 'Math.exp(...)' ...
[CalculateStep.ck]:line(7): ...(please check the argument types)
[CalculateStep.ck]: ...in function 'CalculateStep'
 
The most expensive phone at MS now is an unlocked Lumia 830 for $449.
@sᴉɔuɐɹɥԀ Nice new name.
Only trouble, the letters aren't lined up quite right.
 
Close enough :)
 
I think mods can change it.
Are you sure you are stuck? I changed mine 2-3 times during Winter Bash, and I was able to change it back.
 
Maybe I like it a little bit :)
 
I'm using my browser snapped next to PSP, and the P is gone.
The closest thing to an April Fools joke I did was the monthly announcement of saying there was a tornado when they tested the siren.
First time since winter, and there was a storm coming.
 
3:00 AM
Those stupid errors are some damn vague, might as well be writing VBA...
 
@sᴉɔuɐɹɥԀ The vaguest errors are the ones for rookie mistakes.
 
> [fizzbuzz.ck]:line(17): arguments type(s) do not match:
[fizzbuzz.ck]:line(17): ... for function 'Math.exp(...)' ...
[fizzbuzz.ck]:line(17): ...(please check the argument types)
 
I think it doesn't like the 1/12.
Try putting that in parenthesis.
If that fails, try putting it in a separate double variable and passing that.
 
Same thing
 
Hmm.
Try changing the float to double, but I doubt it is that.
What language are you using, anyway?
 
3:03 AM
ChucK
 
@MickyDuncan: And one that sounds just a bit closer to Code Review than SO. — Nathan Tuggy 57 secs ago
 
Never heard of it.
 
I'm sure I'll figure it out, the IDE kind of is not that user-friendly
 
I recommend you stick with Java for now.
 
Who is trying to use a flag in stackegg???
(or close)
 
3:06 AM
I don't know.
Just keep plugging away at Q/A/DV, and you'll get it.
 
(or anything that doesn't seem right)
 
Don't you hate it when you click just after it registers the update, and you choose the wrong option for the round?
 
@sᴉɔuɐɹɥԀ Math.exp takes one argument, not two chuck.cs.princeton.edu/doc/program/stdlib.html#exp
 
@Hosch250 Totally
 
maybe you wanted Math.pow?
 
3:10 AM
Ah I think I misunderstood the purpose of Math.exp it appears to be to get e mathematical constant, which is not what I want
I'll simplify it into a simple multiplication
 
@sᴉɔuɐɹɥԀ Try Math.pow.
 
Oh that looks perfect, thanks @Hosch250 good catch
 
Well, I thought of it on my own, but @mjolka posted it first.
 
> [function]: float pow ( float x, float y );
computes x taken to the y-th power
 
Give credit where it's due.
 
3:13 AM
@mjolka Thank you, I'm sure this will work better
Boom, bug is gone
 
@Hosch250 Grr... just did it again
 
@MannyMeng Not that big of a deal at this point.
@Marc-Andre What are you doing using Upvote?
 
I just watched Vanilla Sky. I'm having an existential crisis.
 
Didn't you know that the Users stat goes up with traffic?
 
Who did Close?
 
3:15 AM
Don't worry about that stat, give yourself the extra Answer or Ask point.
 
(stackegg)
 
@sᴉɔuɐɹɥԀ you should also change 1/12 to 1.0/12 (1/12 evaluates to 0)
3
 
That probably saved me some debugging!
 
Poor PPCG and Arqade.
They've only gotten 1/2 eggs respectively since the trolls latched on last night.
PPCG still has the best time.
 
3:34 AM
0
Q: Do-while loop issues

Greg MThe goal is to enter a String and print how many characters (including spaces) and uppercase letters there are. As you can see from the sample data at the bottom, the loop works fine the first time. However, after the user enters 1 to type another String, the program completely skips the nextLine...

 
4:05 AM
0
Q: Meta.codereview.stackexchange.com security certificate bad

SnowbodyWhen I browse to https://meta.codereview.stackexchange.com/ using Firefox, I get a message that the security certificate is bad because it's for *.stackexchange.com and *.meta.stackexchange.com (among others). I have to add an exception in order to view the meta site.

 
@sᴉɔuɐɹɥԀ Why are you upside down ?
 
nice try, @ƃƃopɐſ
 
4:20 AM
ɐɥɐɥɐʍnW
 
@JaDogg That
 
lol
How is chuck programming ?
 
It makes sounds, pretty epic
Something in my loop is f***ed up though. Need to troubleshoot...
 
0
Q: Webpage quiz, I'm completely stumped with JavaScript/jQuery functions

AtomI'm making a webpage quiz and this is how I'm wanting it to work: There is a series of questions written up in the HTML doc and hidden by CSS. I want to use jQuery to have the questions do a slide-fade-in effect. The first question (and multiple choice answers) will slide-in when opening the pag...

 
Do I need special hardware to run it ? like one with MIDI ports or something ?
 
4:29 AM
Nope
Just get miniAudicle and it should run fine
 
4:46 AM
As there's no precise problem and it looks like working code, it might be best suited for Code Review. Or not. Look if it's on topic before posting. Other than that, wow, redundant comments. Redundant comments everywhere... "//If not, returns false. return false;. — Pierre-Luc Pineault 35 secs ago
 
@Hosch250 is dog in the profile picture your dog ?
 
@JaDogg Yes.
She is much bigger now, that picture is a couple years old.
How's it going in Sri Lanka?
 
Agreed on suitability for codereview.stackexchange.com vs this site. As far as dead code goes, consider what is the likelihood of transactions managing to get to 100 by the time you read the if (transactions == 100) statement. You can synchronize threads with a lock statement, but it doesn't really make sense to talking about locking a thread per se. It's not the threads that get locked, it's the data shared between threads that does. — Peter Duniho 8 secs ago
 
@Hosch250 Nothing much,
Time to write some documentation comments
 
Ouch, the PPCG folks just can't win.
OK.
First, they were always being reset, then it was nothings.
Then, there were Upvote bots, which wasted turns on upvotes when they should have been boosting other stats.
 
4:54 AM
I'm voting to close this question as off-topic because it seems better suited to codereview.stackexchange.com — Peter Duniho 48 secs ago
 
Now, they are voting Answer to keep the Question stats at 0, which keeps the Answer stats at 0...
 
What's that green thing near the dog
Chewed out tennis ball ?
 
A chew tow.
She is laying on most of it.
CR is about to catch up with SO in the egg.
 
Ah
 
It always freaks me out when I see the Restart thing after we win the internet.
We got it, but so did SO :(
Good night, I need to go to bed.
 
5:03 AM
@Hosch250 I had to read the details before I make any assumptions :P
my mind is in the gutter
 
Meh, bugs bugs and bugs.
 
@sᴉɔuɐɹɥԀ want to paste the code?
 
Maybe... I think I'm just getting mixed up between var names
This IDE has nothing to offer as far as naming/renaming is concerned
 
yeah, i downloaded it. it's very... minimalist
 
5:21 AM
Holy crap, some progress is happening
Now I just need to figure out why the multiplication is all wong
 
5:32 AM
For some odd reason, it is doubling the frequency instead of doing what I intend to do. Might hit SO. Probably something stupid, as usual...
Well, doubling only on the first iteration, just now noticed.
Ah, I bet my pow() function is not working correctly, probably doing something like pow(x, y+x) instead of pow(x,y)
 
6:00 AM
0
Q: Need help writing clean JavaScript

CryoI'm a C++/Python developer attempting to learn JavaScript, but I'm struggling to write clean code. I've read that async.waterfall and Promises are two ways to flatten the code a bit, but my implementation seems far more inflated than what I've grown accustomed to using Python. Is there anything...

 
6:12 AM
TTGTB
@CaptainObvious Need help writing clean title
 
6:25 AM
@200_success I noticed some odd wording here specifically: you should not provide an answer suggesting advanced features when before the question answer is ready.
wording, not *weirding... edit is not reflecting here
 
6:44 AM
@sᴉɔuɐɹɥԀ That was @Hosch250's edit.
 
6:57 AM
Hey, I get to keep the moderator tools once we graduate :D
3
But @Edward beat me to it by a few days.
 
7:34 AM
0
Q: Is it bad practice to have executable code in my channel state object?

bot_botI have a CommunicationStateMachine object that's attached to my channels. It keeps track of who's turn it is to speak, how far along the conversation the server and client are, things like the client ID, all bytes read to date, the ByteBuffer etc. My previous version of this server did some ch...

 
8:22 AM
I'm voting to close this question as off-topic because it's about a code review. It is probably more suited to codereview. — Simon MᶜKenzie 1 min ago
 
8:51 AM
0
Q: Quantizing an array so that a subset of quantized values is still consistently quantized

Reed G. LawGiven an array of ints I want to quantize each value so that the sum of quantized values is 100. Each quantized value should also be an integer. This works when the whole array is quantized, but when a subset of quantized values is added up it doesn't remain quantized with respect to the rest of ...

0
Q: Swift - Converting JSON to entity object

Mathijs Segersit is with regret that I'm even posting here. I used to do mostly android development which is Java, which has a strong reflection API granting lots of feats to the developer. I'm working on a swift app now which has barely any reflection (for now). So no GSON like libs available, all our data ...

 
Monking
 
9:06 AM
upside down @sᴉɔuɐɹɥԀ still awake? :o
 
9:29 AM
Heya :)
 
I'm starting to see glitches on textures since today... Doesn't look good for my GPU
It should still have warranty... Not sure how broken it is yet though
Reboot and glitches yet... hopefully
 
10:41 AM
0
Q: How to test "verification flow" code? would you test this at all?

Elad BendaI want to write unit-test to my code however while writing it, it seems all I can verify is that one method or the other were called once. My class is a manager that execute verification flow. It calls many checkers\verifiers - so they have the real logic. How do you advise me to test such "v...

0
Q: c# socket server class

malovernI am trying to build a high perfomance socket server and this is what I have come up with so far, can anyone please review my code and see if I can make any improvements on it please? // State object for reading client data asynchronously public class StateObject { // Client socket. pub...

 
11:13 AM
Greetings, Programs.
 
Hi
 
Monking all
 
11:34 AM
For code that works Code Review may be a better place to ask such a question. — pnuts just now
 
Hey all
 
You might get more insight (and more eyes to look over it) if you post this to codereview.stackexchange.comCristi Diaconescu 1 min ago
 
@Hosch250 I'm a bit too late but I had no idea what I was doing ;). It was the first time that I looked at it and I was like : Ohh nice what is this, nice I can click things, let's try that option. Nothing more :P
 
Did you know about the great C languages merge which is about to happen?
 
9 minutes left on the StackEgg now, me thinks.
 
@Morwenn April fool hoax ?
 
0
Q: Matlab bins with two features: calculation and plotting

titus.andronicusI have the following code in Matlab, which is supposed to do what I asked in this SO question. The idea is to: Divide the temperature deadband of each agent (they are different between agents) into N_bin/2 bins. Then have N_bin total bins to represent both normalized temperature from deadband a...

 
> To unite their growing communities and better meet the challenges from newer languages, such as Java and MatLab
yeah, right....
 
11:55 AM
@Heslacher Probably the best one so far :D
 
;-)
 
Bye bye, Eggy!
2
 
That's all, folks ;-)
 
VM11076:38 Clicked button 0: 52 days have elapsed – your Site is in public beta.
2015-04-02 08:00:06.871VM11076:36 Uncaught TypeError: Cannot read property 'click' of undefined
2015-04-02 08:00:19.869VM11076:8 Already played
2015-04-02 08:00:32.868VM11076:8 Already played
2015-04-02 08:00:45.264VM11076:8 Already played
2015-04-02 08:00:57.659VM11076:8 Already played
 
12:01 PM
Good
 
 
Monkey beat me to it...
 
Well, thank goodness for that.... now, 8 months to hats
 
@Duga interesting case of "is generated code on topic?"
 
I think we need to focus on the mission II, and add some more weekend challenges.
11
 
12:04 PM
If it's recorded with the macro recorder, is it on topic?
 
It's real code. You own and maintain it.
hmmm
 
(Oh, FTR, Javascript, HTML, CSS is growing on me.... - now that there's chrome to debug it...).
 
> The remaining two members of WG4 (COBOL) decided that this offered a golden opportunity to renew COBOL: “By joining this new language, we can increase our appeal to the advertising-friendly demographic of programmers under the age of 70, and enlarge the COBOL presence in the mainframe market and beyond. We will be pleased to contribute from our vast intellectual property store of uppercase names to this exciting new effort.”
17 mins ago, by Morwenn
Did you know about the great C languages merge which is about to happen?
 
18 hours ago, by Simon André Forsberg
God, I hope they release the source for this game.
@Simon ^^^
 
12:10 PM
 
hehehee ... that ^^^
 
@rolfl pingreed
@rolfl Awesoooome!
@rolfl Nice. But the n^4 shouldn't be considered valid there. Is it really considered valid by my code?
 
I believe so, and it sorts it first.
Also, I use the presence of NaN in the parameters to test for validness... was not sure what else to use.
 
Wait. When did this happen?
 
@RubberDuck Next year maybe the B-languages will merge? BASIC and Brainfuck!
 
12:14 PM
Martian rain/hail storm here.
 
@SimonAndréForsberg The perfect storm of awful.....
 
@SimonAndréForsberg Just a BasicFuck?
 
It's raining/hailing, plus the sky is all red.
 
@rolfl I added a .isValid method to MathEquation. That takes into consideration the size of the first parameter, if it is around 0, it's not valid.
 
Around 0?
 
12:15 PM
OK, I will have to export that to the JSON, and then add it to the sort orders.
-0.000000*n^4 + 0.000021*n^3 + 1.362444*n^2 + -2217.038302*n + 366349.766628
0.000001*n^3 + 1.558710*n^2 + -2783.727452*n + 463040.804575
Compare those with:
1.583603*n^2 + -2918.391185*n + 502927.007551
 
@SimonAndréForsberg Add B and BCPL.
 
The problem is, simon, that even that cubic one, if n is around.... 1,000,000, the 0.000001*n^3 is probably the most significant component anyway....
 
@nhgrif @rolfl github.com/rolfl/MicroBench/blob/newton/src/main/java/net/tuis/… - I can't see how that classifies the N^4 as valid.
Math.abs(parameters[0]) >= 0.001
i.e. 0.0009999.... and less is not considered valid
 
Does the isValid flag influence the sort order?
(and my HTML/JS page does not yet know about isValid....).
 
Anyone seen janos around :P ?
 
12:20 PM
Not for a while.
 
That 1%!
@RubberDuck There you go.
Hope he's alright.
 
@rolfl ah, that explains it. I thought it did.
 
OK, I can fix this later.
(or you can do it sooner ;-) )
But, the isValid needs to be exportedd to the JSON anyway
 
Sorry, can't travel back in time to do it sooner ;)
 
I will use it to disable/grey out the plot.
 
12:22 PM
Good plan.
 
Additionally, I want to get 'shorter' names for the functions.
 
Such as O(n^4) ?
 
I am using:
                "%f*n^4 + %f*n^3 + %f*n^2 + %f*n + %f": function(x, parameters) {return parameters[0] * x * x * x * x + parameters[1] * x * x * x + parameters[2] * x * x + parameters[3] * x + parameters[4];},
 
And what do you want to use?
 
Well, I was thinking of using the basic O like you have O(n^4)
But, that will need to be an additional parameter.
that's OK. Adding an isvalid will help, and a name will help, and so on.
then all we need to do is coerce someone to help me with the graphic design component.
 
12:26 PM
Who is good at CSS, HTML and JS around here?
Where's @kleinfreund?
Where's @janos?
We don't even have @Nobody!
 
Agreed. But, I think a checkpoint for me is:
1. enabled models with correct best fit and fastest only showing
2. better format of 'legend'
3. .... that's it.
at that point, it goes up for ridicule review
 
tabs and newlines.... DB guy's worst nightmare.
shoooooottttt
 
Anyone is welcome to look at the source for git.tuis.net/ubench/BubbleSort.html and prepare a FGITW... I think it will be later tonight.
 
Char(13)+char(10)
And... Char(7)
 
heya :)
@SimonAndréForsberg didn't think of me? PFFF
 
@rolfl I'll add a "name" to the MathModel. I haven't unfortunately read much of your JS-generating code
@DanPantry Sorry :) I just realized how many people are not here. If you're up for it, I think @rolfl might have use for your skills.
 
@nhgrif What's Char(7)? Char(9) is a tab.
 
@SimonAndréForsberg - there is no JS generating code... it's all static except for two variables substituted at run-rime: ${DATA} and ${TITLE}
 
how can i help? @rolfl
 
Make this look pretty: git.tuis.net/ubench/BubbleSort.html
 
12:33 PM
I dunno.
 
I'm actually working on a project in JS now and came here to share the rather amusing screenshot I ended up with.. prntscr.com/6ok20r
@rolfl lol
2
@rolfl do you have an idea in mind or do you just want it to look more 'modern'?
 
So... Listening to NIN can be pretty calming surprisingly.
2
The albums have the right mix of being really loud so I don't have to hear people followed by calm/melodic sections
(I've been a NIN fan for like 20yrs... Just listening today for the first time in a long time)
 
@Dan - basic premise is that I have this template html/css/js/d3 document here: https://github.com/rolfl/MicroBench/blob/newton/src/main/resources/net/tuis/ubench/scale/UScale.html
At run time, the ${TITLE} and ${DATA} values are "replaced" and the result is: http://git.tuis.net/ubench/BubbleSort.html
I have poor Graphic-design skills, and no sense of what's 'cool', so I am looking for pointers on how to arrange those three basic components: chart, legend, raw-data
The raw data should probably have a "drop down" or "expand" option.
 
I also have terrible graphics design skills
but I can use bootstrap/zurb foundation lol
throw me a PM or something and I'll see what I can do once I get home, I have a 4 day weekend so if I'm not working on the Twitch bot I can do that
 
@rolfl What I like when I'm at data on a big table (the raw data one) is that row alternate in colors so that I can more easily detect which one I;m looking at
 
12:41 PM
(any ideas like what @Marc-Andre said include in the PM)
 
No problem ;-) and thanks.
 
No problem :) No guarantees but if it's just styling that one page I can probably get around to it
 
Otherwise I think you may just be able to get some +1's on a CR question.
 
Yesterday, I got to use std::back_inserter and std::lower_bound in answers while I actually never used them myself.
It's like "do what I say, not what I do".
 
0
Q: Improving the code Efficiency

PatelHi all I wrote a code for the below question Problem Statement :- You are given N sticks, where each stick has the length of a positive integer. A cut operation is performed on the sticks such that all of them are reduced by the length of the smallest stick. Suppose we have six sticks of the fo...

 
1:02 PM
First answer in two weeks just posted!
1
A: Cutting The Sticks

Simon André ForsbergVariable names You seem to enjoy short variable names such as a, n, f. These names don't really explain much, especially not the f. a can be named array or data, and n can be named length or similar. Potential bug The constraint is 1 ≤ ai ≤ 1000 but you initialize small to 99, which means that...

Damn, that felt good.
FAITW - Fastest Accept In The West.
 
0
Q: Is there a cleaner way to write this code?

SMWI have written the below code to generate a chart based on SQL database output: <script> <?php unset($data0); unset($data1); unset($data2); $sth = $dbh->prepare(" SELECT a, b, c FROM t "); $sth->execute(); ?> Morris.Line({ element: 'morris-line-chart', data: [ <?php while ($row = $sth->

0
Q: Date validation in Java - take two

Nilzone-I read through and implemented the advice I received yesterday. I would, once again, really like some input on how this can be improved. e.g. encapsulation, interfaces, abstract classes etc.. Right now, it's one class. import java.util.Map; import java.util.HashMap; class DateValidator { ...

 
1:20 PM
Martian hail storm has appeared to kill our email and other cross-town network connections.
 
0
Q: How to link Gui class to another class in Jva

user3360335I am making a simple Tic tac toe game with two classes 'Gui' and 'TicTacToe'. The Gui class contains the the interface of the game and the Tic tac toe class contains the logic of the game. The buttons in the gui class are supposed to be linked to the tictactoe class. The problem I have is that th...

0
Q: C# Beginner exercise public static int method issue

cozeim trying to do an exercise but i have done few mistakes. Im getting two errors. the first is in the main method where it say: No overload for method 'DoubleSum' takes 0 arguments. The other is at public static int DoubleSum(int a, int b) It says that SumDoubleEx.Program.DoubleSum(int, ...

 
1:39 PM
@CaptainObvious Dang @Jamal's fast.
 
You should try "codereview" on stackexchange for this kind of questions — Stefan 25 secs ago
As suggested, you should try "CodeReview" on StackExchange. codereview.stackexchange.comJitendra Pancholi 1 min ago
@Stefan This would likely be considered "example code" on Code Review, as it has been stripped of a lot of context. Example code is off topic for Code Review. — Simon André Forsberg 1 min ago
@JitendraPancholi This would likely be considered "example code" on Code Review, as it has been stripped of a lot of context. Example code is off topic for Code Review. — Simon André Forsberg 1 min ago
 
0
Q: Best practice for callbacks in AngularJS directives?

burzumThe Problem I've written a TaskForm directive that is used to display a complete task form widget that handles the adding and editing of tasks in many places. We use it on a few pages that display different things but have related tasks. One thing that bothers me now because it took me some tim...

 
1:54 PM
Monking
 

« first day (698 days earlier)      last day (3322 days later) »