« first day (441 days earlier)      last day (3875 days later) » 

00:14
Hm. Odd.
/* create function stuff here */
TRUNCATE TABLE Fizz;
INSERT INTO Fizz SELECT n FROM Number WHERE n % prmFizz = 0;
ERROR: division by zero
SQL state: 22012
Context: SQL statement "INSERT INTO Fizz SELECT n from Number WHERE n % prmFizz = 0"
PL/pgSQL function fncpopulatefizzbuzz(integer,integer,integer,integer,integer,integer) line 11 at SQL statement
Why does SQL throw this error while the parameter is not even defined...
Do I need to assign a variable that equals this parameter or will this throw the same error...??
00:26
What's prmFizz?
Oh, it's not defined. So that means it's null... which is sort of the same as 0 depending on what you're doing with it...
prmFizz has to be non-null...
00:38
Ugh...
@nhgrif know a workaround?
For what? I'm not sure what you're trying to do.
Create a function that calculates modulo based on user input, essentially
Oh I think I got it, I bet case would work
WHERE n % ISNULL(prmFizz,1) = 0; ??
How about this:
TRUNCATE TABLE Fizz; INSERT INTO Fizz SELECT
	CASE WHEN prmFizz = 0 OR prmFizz IS NULL THEN NULL
	ELSE (SELECT n FROM Number WHERE n % prmFizz = 0);
CASE ISNULL(prmFizz,0) WHEN 0 THEN NULL ELSE (SELECT n FROM Number WHERE n % prmFizz = 0);
No wait...
Why would you insert nulls?
INSERT INTO Fizz
SELECT n
FROM Number
WHERE ISNULL(prmFizz,0) <> 0 AND n % prmFizz = 0;
00:55
@nhgrif that worked, aside from ISNULL() is MS SQL specific shortcut but just change to COALESCE should work on most RDBMS
INSERT INTO Fizz
	SELECT n
	FROM Number
	WHERE COALESCE(prmFizz,0) <> 0 AND n % prmFizz = 0;
1;;""
2;;""
3;3;"Fizz"
4;;""
5;;""
6;6;"Fizz"
I'm having a hard time conceptualizing your DB.
I'm not sure why, from a DB normalization stand point, you'd want a Fizz table, a Buzz table, etc.
I mean, a Fizz table, or anything else, is just a small subset repeated over a particular range.
Is it useful to have a 100-row Fizz table when 3 would suffice? And why would we even create that when it can be calculated on the fly?
I got something a bit different in mind
You'll see
I want to make the most Fizz Buzz ever
I understand that.
I should have it all done sometime tonight, I'll let you know
Are you creating an individual table for each word? Or are you just doing this now to figure out syntax.
01:06
The former.
Do MySQL functions/storedprocedures support optional arguments?
As in optional parameters? If so, I think it does. But then again it may not because
I just found out doesn't which is fine
I'm pretty sure SQL Server does.
Hey guys
01:18
SQL Server does support optional parameters.
Easy way to upload an image into a q/a post?
0
Q: Proper usage of prototypical code structure with these Node.JS modules? + General Improvements

jt0ddPracticing Prototypical Code I am focusing on practicing a very prototypical structure with my code (non library oriented) to begin learning to reuse large portions of my application infrastructures where applicable in future projects. With this in mind, I do not have experience with prototypica...

New Java answer with my newfound Java knowledge. :-)
 
1 hour later…
02:26
crickets
02:37
Just had both dogs (big dogs) escape, fun chase
@Jamal Just you and me it seems, but do link your answer I'll UV
Better yet, napalm it.
@Jamal I edited your post to fix a typo, other than that looks great ;)
Lol, second edit today. :-) Hopefully I can get more sleep tonight.
2
HI
02:50
since when do we have a tag?
0
A: Do I need ninject when implementing DAL with generic repository and unit of work?

Mat's Mug Do I need ninject when implementing DAL with generic repository and unit of work? That's not the question. Inversion of control, repository and unit of work are patterns. Ninject is an IoC container - a tool that resolves dependencies and controls instantiation and object lifetime. You need...

This is probably when it was first created:
http://codereview.stackexchange.com/revisions/36578/5
I just created a tag wiki (copied SO's, added tag usage guidelines to excerpt)
and now following the tag :)
are ninjas involved?
Oh nice, there actually are ninjas
02:59
> Laugh in the face of change
I ♥
6
Q: DI Container Tags

Mat's MugA tag was recently created for autofac, which is an IoC container. The question that created this tag is also correctly tagged with dependency-injection. A long, long time ago I wanted to create a tag for ninject (another IoC container) but I didn't have enough rep back then, and dependency-inje...

I think this could use an edit:
3
Q: F# from C#, help clean it to more idiomatic F#

Maslownamespace Foo.App_Start open System open System.Web open Microsoft.Web.Infrastructure.DynamicModuleHelper open Ninject open Ninject.Web.Common type NinjectResolver(kernel:IKernel) = let _kernel = kernel interface System.Web.Http.Dependencies.IDependencyResolver with member th...

it could use a bit more context..
Yeah
03:17
meh
3
Q: C# to F# NinjectWebCommon implementation/translation

MaslowI've translated this code from c#, would like it to be more idiomatic f#: namespace Foo.App_Start open System open System.Web open Microsoft.Web.Infrastructure.DynamicModuleHelper open Ninject open Ninject.Web.Common type NinjectResolver(kernel:IKernel) = let _kernel = kernel interfa...

lol @ //was static - d'uh ;)
I've tweaked it a little.
saw that :)
I've fixed some other F# titles as well.
yeah they were all F#'d up :)
Hi @Mat'sMug. I think you pinged me last night while I was sleeping.
03:23
oh, sorry!
I didn't mind. :-)
hadn't seen you in The 2nd Monitor before, hi!
I'm usually quiet
I'm trying to decide whether to finish a review while I'm falling asleep, or wait until morning. I think morning is going to win.
Some folks seem to be able to crank out a detailed review in 10 minutes... not me
lol, I just spent about an hour writing one
it's better to take your time, there's not really a FGITW syndrome here
it makes higher quality posts, too :)
Geez, I must be tired! I can't figure out your XTLA. FGITW?
03:30
fastest gun in the west ;)
mostly seen on SO
XTLA?
XLTA?
Got it! SO is WAY too fast for me.
what's XLTA?
@nhgrif Pointers
03:30
@Mat'sMug I meant to ask what XTLA is. I transposed the TL :/.
@Phrancis US, Colorado
XTLA = eXtended Three-Letter Acronym. Basically anything bigger than a TLA.
Jargon must be improved constantly. ;-)
03:32
14
A: What's a Zombie? And what are the many other memes of Code Review?

Vogel612Name: Overly long acronyms Originator: Simon André Forsberg Cultural Height: The 2nd Monitor Background: IWNPFETTOLAI (I will not provide further explantion than this overly long acronym itself)

WUPOLAH :)
(we usually prefer overly long acronyms here)
hehe
you saw that meta post before?
@Malachi Congratulations!
lol
anyway TTGTB - later @all!
03:35
Later!
Me too... TTGTB. Catch you all later.
Bye!
this answer is wrong in many ways IMO.
@Mat'sMug I think you mean WUPOLAH
03:54
0
Q: How to efficiently parse HTML table using jsoup?

WebbyI am trying to parse HTML using jsoup. This is my first time working with jsoup and I read some tutorial on it as well. Below is my HTML table which I am trying to parse - If you see my below table, it has three tr as of now (I have shorten it down to have three table rows just for understanding...

^^ Better than using regex I guess.
The <center> cannot hold it is too late.
04:46
I actually didn't find too much to edit there, at first glance.
-1
Q: Issue in getting diameter of a tree

NoobEditorI have declared a variable diameter which stores the diameter of a Binary Tree.Program is below : public class DiameterOfTree { public int diameter; public static void main(String[] args) { BinaryTree bt = new BinaryTree(); bt.createBT(); //create th...

1
Q: Game inventory system

DurracaI've been trying to figure out the best way to create a inventory system in Python. I like the way this one works but what I was wondering was if there was a better way to write it and what would be the best way to implement a search system. inv = ['Sword','Armor'] item_values = {'Sword':['Sword...

05:07
@Jamal horrible grammar mostly.
Yeah, I didn't look too close, though I could've. I still don't want to be the only one making edits.
 
1 hour later…
06:25
0
Q: Should I use an abstract repository, or abstract gateway when I have multiple implementations of a single interface?

Johnathon SullingerI have a single interface called ITask, which several other interfaces inherit from. One being IGTask and another being IGtdTask. They inherit from ITask so that I can place instances of concrete types implementing these, into a single collection for databinding in Windows Phone. The code For b...

06:36
@Jamal I'll pitch in on edits as I can (though mostly English language edits)
06:59
0
Q: Good practice for client code to MVC WebApi service

PEKI have written a very simple web service with MVC and WebApi. Now I'm working the client code that will be an WPF application. What I have done works, but I'm not sure I'm doing it the "right" way. The purpose of the service is to check if there are any new software updates to the client. My ser...

 
2 hours later…
08:52
0
Q: what is the problem with this code?

user49111using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int x,color; int opt; Console.WriteLine(" input "); Sys...

09:27
Monking
Good morning everyone. :)
Morning @kleinfreund
0
Q: First attempt at Java MVC for website how can i make this site navigation less verbose?

crmI have this one controller that serves up all the webpages and any dynamic content. Is this the most efficient way of doing this? Can it be improved? package uk.co.morleys; import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.servlet.RequestDispatcher; im...

0
Q: Infix to postfix conversion - improvement requested

Rakesh KI have written a C++ program to convert an infix expression to postfix expression using recursion. I would like to know if it can be improved if possible. Can we improve it by not using stack? I am using a vector as a stack here. The following is my code: #include <iostream> #include <vector> s...

09:51
Does anyone know a good utility for controlling the fan speed on nVidia cards?
10:02
Monking @all
Monking @Nobody
Lol, no comment on this > hashcomment.blogspot.in/2014/07/…
10:21
Ah, so that is why I was missing all new CR questions... I accidentally opened a question on the frontpage tab
10:44
@skiwi That is like index.html being a 404 page and then wondering why the webserver can't find your index.html ^^
Oh Russia...
@Nobody Then you've also messed up :p
I just was raging here for 20 minutes why my JavaFX/FXML was not working, then I figured out I was expecting a Button in a method, whereas it was in reality an ActionEvent...
I had the code right in front of me, and it kept complaining, the method is not there!
 
1 hour later…
11:51
The last message was posted 1 hour ago.
@skiwi: Man, you are a slow typer :P
12:52
0
Q: Binary addition with strings

Leopold AspergerThe following method will add two strings of any length as binary numbers assuming the characters 1 and 0. I made this for fun in my spare time, improvements are not critical but I would like to hear them. I would also like to know if there is a more efficient algorithm to simulate a ALU. static...

0
Q: count words in a string c++

user3834119I am new to c++, i am learning c++ on my own. I have written this program to count the number of words in a string. I know it's not the best way to do this, but this was what i could think of. And please if you are going to criticize, don't comment. If you are going to help, then go ahead. I am...

13:13
Sigh. SO user asks an unclear question. Receives comments indicating the question is unclear. Rather than responding to the comments or improving his question, he posts a different unclear question about something else. :/
13:23
Some users seem to ask for a Q-ban...
This guy has gone back and edited/improved the first question.
I don't really understand how you can post multiple questions so close together like that though.
If you are failing fast during work?
How do you "fail fast"?
And why is failing fast worse than failing slow?
You are not proficient in the language/problem domain
and are to lazy to solve the problem on your own
And that makes it inexcusable.
13:29
I never said, that failing fast is worse than failing slow
Failing slow is definitely worse, right?
Btw the above @StackExchange post is an off-topic meta question
I mean, when I'm working, if something is wrong, the faster I know, the better.
@nhgrif: I meant another form of fast failing: Failing fast at finding the solution to a problem (instead of being more proficient and therefore taking longer to get stuck)
Oh, I see.
I probably misunderstood what you meant because I think fail is a strong term for getting stuck, but now I see what you mean.
13:32
@nhgrif: Yeah, it was probably not the right word but I also wanted to be polemic.
I think it's probably something that beginner programmers struggle with--this idea that you don't just type, type, type all day and then everything just works.
It's not like building a house where the carpenter knows at the beginning of the day where to put all the nails/boards so his task is to put all the nails/boards where they belong. And at the end of the day, you can look back and count all his nails and boards to see how efficient he is.
1
Q: count words in a string c++

user3834119I am new to c++, i am learning c++ on my own. I have written this program to count the number of words in a string. I know it's not the best way to do this, but this was what i could think of. And please if you are going to criticize, don't comment. If you are going to help, then go ahead. I am...

> And please if you are going to criticize, don't comment.
So the OP does only want positive feedback?
I just edited it a little bit, including taking that comment out.
And added
@Nobody Why? :p
@skiwi Because it took you one hour to write that message?
13:42
@Nobody Yeah I know, I'm slow :)
@nhgrif: Actually, this question is OT because of incorrect code. However, simply doing a code review might lead the OP to the correct solution.
Does his code not produce the desired results?
> I am using spaces to count the number of words. Here is the problem.

countWords(""); // ok, x.empty() identifies it as an empty string.
countWords(" "); // x.empty() fails, function returns 1.
Oh, I see.
I voted to close
what is that program you get when you click 'Open in native browser'?!
Task manager calls it 'WinDoc'
13:52
is there a trim method in c++?
It has documentation about all kinds of libraries
0
Q: fscanf and array assignment

ArashWhy the following code does not assign any value to the 2D array elements? It reads the data from file; x, y, and z are all assigned with the correct values, but X, Y, and Z are zero which is the value when they initialized. The array allocated by malloc and I am using gcc (GNU). Here is part of ...

Even has the C# language spec
@JeroenVannevel Are you talking to me?
@Vogel612: Not in stdlib I am afraid, boost will have one, I believe.
13:54
Half to myself, half to the world
ah, it's located in the Xamarin Studio folders
must be their offline doc viewer
14:12
Hey @JeroenVannevel
not much :o
Figuring out how I can make an Options-like window inside my JavaFX application
I've did most important part of my application already...
"Clicking on the quit button now quits the application."
It's an important place to start!
I made an options-like window once
back in the days
I think it shouldn't be too hard, I'll first focus on the sole window
Later on focus about actually opening it when you go to the options
Well, considering I have apparently removed it from my github, I'd say that maybe it's not a good thing to look at from the start
I just opened a new window, used a tabbedpane for the different categories and then used a gridlayout of sorts
It didn't look too bad considering my UI skills
I'm working on my Xamarin app right now; I'm really glad they have lots of examples WITH pictures of it online
14:17
hehe
What is Xamarin exactly?
The future
It's app development in C#
but it works on every platform
Android, iOS & WP
Xamarin.Forms, that is
Can you use the native UI elements for each platform in Xamarin?
around 40 controls or so that are fully platform independent
So it focuses on apps... Those are always tricky to make I think, though haven't done much
14:18
Will an app built in Xamarin for iOS look like an iOS app built in Xcode?
Yeah, you basically have 4 projects in your solution
1 shared one and then one for each platform
but they all work with C# as well so you can write iOS-specific stuff in C#
yes, the common controls (and platform-specific ones) all translate to native controls
Do you have to develop it on Windows (since it's C#)?
Did Xamarin have that as one of their goals themselves? Or did it happen by people porting the application
I'm just developing for Android right now but as soon as I buy an iOS license it should be available there as well from the get-go
It's available for Mac and Windows
I think the company behind Xamarin are the maintainers of Mono
Yes, Xamarin is meant to create apps for all platforms with one codebase
I love it
I've actually managed to get something decent so far with a minimal amount of code, time and knowledge about app development
@JeroenVannevel Sounds good!
Hmm, I thought the planned and beta JavaFX ports to Android and iOS (and WP?) were only usermade
But just found an article that Oracle is officially going to support it once released.
JavaFX is also awesome!
14:25
holy.. I just wrote 5 lines of code and I've got a sweet loading icon popup and dissapear as soon as the next page is ready
It's incredible how easy this is
Do you write code for the UI or design it?
Code
you can design it ofcourse, or use XAML
but that's not my thing
There are designers for the platform-specific apps but not (yet) for the universal one as far as I know
I personally think designing is way easier than coding here
here?
Where is here?
Using JavaFX
14:29
Oh.
And JavaFX SceneBuilder 2.0 is also being a great help
I think, in general, if the interface builder is half-decent, building your interface in the builder can typically make life easier (but not always).
You do need to split up every interface into subparts... else prepare for hell.
There's room for cleanliness in the interface builder aspect of projects as well, yes.
Now I just need to make this button extend the whole parent pane... And I'm happy
14:32
But it could be 10-20 lines of code just to set up a single view, depending on what you want it to do, how you want it to behave when the app rotates, etc. Or, you could just do all of that in interface builder. And now, not only is your codebase cleaner, but it's also easier to simply look at the interface builder and SEE what it's supposed to look like.
Unfortunately, the button does not agree.
Which for someone who didn't write the code to set up that view, can be difficult to imagine just by looking at the code rather than compiling and seeing it.
Moreover, it can be hard to get a feel for how big 100px is on screen. Dragging edges in interface builder let you determine the size based on what looks right, rather than based on some calculation or guesstimation.
I love the guesstimation ^^
Thanks SO...
3
A: Vertical menu for configuration panel

Reeganpackage verticalmenubar; import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Scene; import javafx.scene.control.Accordion; import javafx.scene.control.Button; import javafx.scene.control.TabPane; import javafx.scene.contro...

How is that even an answer?!
d'not give native mark..... already my ask questions options are blocked..... — Reegan Aug 20 '13 at 5:39
@Nobody I don't even know how that is possibly related.
You know what is also frustrating...
My button has some insets for some reason, I don't want those.
In the right bottom you see the Insets properties... But you cannot modify them!
14:43
@skiwi: I don't even understand what he wants to say with this comment
GUI design can make people go crazy.
15:03
0
A: Rot47 an NSString Category

nhgrifThe question title suggested that this would be a Rot47 category on NSString, but it's not. It's an r47 category (which tells me nothing... what's "r47"?). This is Objective-C, not C or C++ or any other language where cryptic terseness is favored. We prefer verboseness. The category should be...

I find it really interesting that that user abbreviated rot47 to r47...
What does that accomplish?
15:18
This project homepage... aquafx-project.com
15:28
@skiwi: Fontsize 1000px?
@Nobody Kind of
I am off, getting some sunburn. See you later.
Cya later
15:57
0
Q: Program to insert,search and delete an element from an array

Arun PrakashI'd like this code to be improved package com.array.demo; import java.util.Arrays; public class ArraysDemo { public static void main(String[] args) { // TODO Auto-generated method stub // array initialization int[] arr = { 5, 10, 12, 22, 4 }; int size = arr.length; i...

Thanks, Santa! Only two more votes until my first Good Answer on here.
http://codereview.stackexchange.com/questions/41596/is-this-a-proper-doubly-linked-list/41598#41598
@Jamal You have been... Good Answered!
And I got the badge in an instant! That's the fastest I've ever seen it happen.
@skiwi good answered it is.
@Vogel612 Fixed ;)
16:06
@CaptainObvious This one could use some work. It looks like he's trying to "delete" from an array, and everything is crammed into main().
Bye!
16:35
0
Q: Is this a good approach to loading JavaScript files asynchronously?

NateI want to load JS files asynchronously to speed up page loading, but also need to execute JS code only once the scripts finish loading (so I need a way to implement callbacks). I based this off of some example code on the Google Pagespeed website: // Add script elements as a children of the bod...

16:45
0
Q: Perl script to check disk usage

Gregg LeventhalLooking for input on the code itself and formatting/style please. This script parses the output of df -h on a Linux server and emails the user if the usage percentage is above the threshold (90% in this case). #!/usr/bin/perl use warnings; use strict; use Mail::Sendmail; my $svr = `hostname`...

0
Q: PHP: file system read/write often

php_nub_qqI am building a game based on PHP and MySQL. Basically there is a player-vs-player mode but I figured I should add a player-vs-computer mode as well, since players may not be online at all times, especially in the beginning. Basically it is a combat type of game where players have up to 2 charac...

@kleinfreund Can you help me with something real quick?
@syb0rg Heya. Sure.
Btw, nope, I use Sublime Text 3 as a code editor.
@kleinfreund Ahh, I should take a look at that, I haven't heard of it yet.
It's somewhat similar to PHPStorm. Atleast that's what I've heard.
@kleinfreund So I've been working on this project website of mine offline, and everything worked out great, so I made a Github repo for the site and created a Github pages out of it.
16:47
It's a mature product. Lots of shortcuts etc.
But now it seems to not be linking to stuff correctly, and I don't know why.
For reference, this is what the top of the site should look like:
What is not linking? The download button?
@kleinfreund That's one thing. I think it's some problem with the stylesheets, but it also isn't linking to the font-awesome stuff.
The value of the href attribute is http://comingsoon, so that's not going to work. Accidentely omitted a slash?
0
Q: Is this the proper way of using the MVC-Concept?

Hassan AlthafI've just completed coding my template engine. I'm willing to have a review on how to increase the quality, efficiency, elegance and performance of the code, perhaps by shortening the code, etc. I'm also open for suggestions on other ways of doing this. It would be really appreciated if you point...

16:50
@kleinfreund Well it's a bogus URL ;)
Thank you, your help will be much appreciated!
The font-awesome reference in the head is fine. What is not looking right?
1
Q: Is this the proper way of using the MVC-Concept?

Hassan AlthafI've just completed coding my template engine. I'm willing to have a review on how to increase the quality, efficiency, elegance and performance of the code, perhaps by shortening the code, etc. I'm also open for suggestions on other ways of doing this. It would be really appreciated if you point...

Screenshot?
@MadaraUchiha
16:52
@kleinfreund Can you see the icons at the bottom of the page?
@CaptainObvious I posted it and already shared it. :)
Indeed, yes, I can.
Oh wait.
I'm taking a guess and ask you if you access your website with https://?
Yes, you do.^^
So, you remember last time we talked about that? :~)
@kleinfreund Kinda, why does that one little "s" make such a difference?
16:54
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" type="text/css">
-->
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" type="text/css">
You can omitt the protocol.
@Hassan Captain Obvious automatically feeds new questions in this chatroom... with a little delay ;)
That way the browser figures out how to serve these external assets.
Can I do that for all href sections?
Same goes for the Google Webfonts.
No. Do it for external assets like webfonts, font awesome, jquery.
@Mat'sMug Haha. Nah, he's actually helpful to the people who do not know about this chat room. Agree?
16:56
If you want to know more, google "same origin policy".
You're accessing your site with http__s__, so the browser doesn't allow external assets that aren't served via http__s__ as well.
By the way, the site looks really good. ;)
@kleinfreund Thanks! It still needs a bit of work, but then I'm going to do a cross post between CR and graphic design.
For instance, I still want to add this guy's idea:
13
A: Critique: Tritium software logo design

YiselaMi opinion: Use the atom as a secondary asset only. Your last sample, the website with the type alone, is great. The colors are interesting, the word and its shape as well. The straight lines work, especially if you try for example with the atom in the background -see image below-. I see it an...

@kleinfreund Unfortunately, the <sections> are making that a bit hard to do

« first day (441 days earlier)      last day (3875 days later) »