« first day (638 days earlier)      last day (3362 days later) » 

10:00 PM
0
Q: Generate random records for table in sql

user3462189I'm doing a project in ms sql and I have to fill table with random records. Here is a definition of table create table invoice( id_invoice INT PRIMARY KEY IDENTITY(1,1), id_employee INT FOREIGN KEY REFERENCES Employee(id_employee), id_client INT FOREIGN KEY REFERENCES Client(id_clie...

 
I want to earn the first Stellar Question badge.
Any tips?
 
@Hosch250 Ask a brainf*ck question.
 
I don't know BF.
LOLCode, maybe.
 
Yeah - a question in an uncommon language often catches people's attention.
Also, a good title helps.
 
@rolfl is still a usable tag, or it's been replaced with ?
 
10:04 PM
Both, it's been made a synonym of programming-challenge.
 
ok
 
For the tag badges, when it says (for example) that you have to have earned at least 400 total score, does that mean 400 total votes, or 400 total rep from votes/accepts?
 
The latter, I'm pretty sure.
 
Thanks, Phrancis.
 
10:08 PM
> VISIBLE "HAI, PROJEK LOLLER ONE!!"
 
Otherwise I don't think I would have earned the badge... shame...
 
Are there any good cases where you would answer your own question on this site?
 
@Mat'sMug is a great person to ask about that!
 
@SirPython It means that you have to have a net of 400 upvotes on undeleted answers that are not community-wiki
 
@SirPython I did that more than once
 
10:10 PM
i.e. if you have 5 downvotes, then you need 405 upvotes.
 
Oh. Guess I reviewed more MySQL than I care to admit -_-
 
@Mat'sMug Could you point me to some examples?
 
one here, another one here, and one more here.. oh and this one, and on this one I even posted two! ...and there's a few more
 
Thanks
 
incoming
 
@Mat'sMug ORLY?
 
@khlr I explained better what the program does on code review, I'm sorry for the people on this question now. Here is and thank you for the help. codereview.stackexchange.com/questions/79297/…Miguel Ripoll 1 min ago
 
YA RLY ;)
 
By you?
 
I seem to be the only one to dare writing code in that language...
11 mins ago, by Mat's Mug
> VISIBLE "HAI, PROJEK LOLLER ONE!!"
ugh. spoiler markdown messed up the line breaks
 
10:22 PM
@Mat'sMug That brings a tear to me eye, so beautiful LOL.
 
the first Project-Euler I do... and it had to be ...
2
 
IM OUTTA YR MIND
 
Is there some Y U DO DIS?
 
I'm doing a Project Euler in LOLCode too.
 
@Legato Only as a warning before you start writing LOLCODE.
 
10:26 PM
CodeEval should start accepting LOLCode.
 
@Hosch250 which problem are you solving?
 
Wow. xD
 
#7
 
1
Q: Download file and connect: if one of them fails, go to step one

Miguel RipollMy program does this: Downloads a file Connects to a server If one of them fails, it waits a minute and it goes back to step one. So, I'd avoid recursion and the use of global variables. I think I did the first one right, but I need help to avoid the second one. What'd I do if I need to "rec...

2
Q: Down with Projek Loller One

Mat's MugIt's been a while since I last wrote some lolcode, so I felt like tackling Project Euler #1. If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. This is...

 
10:27 PM
Converting my C# solution.
 
There are 3 gold badges that have not been awarded to anyone.
 
How do I opt in for the newsletter?
 
go to your profile / preferences
 
Got it, thanks.
 
@Legato what is the newsletter about?
 
10:33 PM
I think it's mostly a weekly round-up, best questions of the week, featured unanswered questions, etc. I hope it improves though.
 
@CaptainObvious @Mat'sMug I hope it doesn't get as much attention as your first one.
 
it won't
 
(And in case you're wwowndering, I still haven't solved Sudoku in Brainfuck)
 
@Mat'sMug Do you know how to make an LOL array?
 
wowndering, damnit. wondering!
 
10:34 PM
@Hosch250 that's part of the language's limitations
 
You can't?
 
some implementations have a BUKKIT
 
^
 
Upvote this answer for being awesome.
 
I read something about a BUKKIT, but it didn't work.
 
10:35 PM
@Mat'sMug I think they ought to spell that BAKKIT
 
Bother.
 
@Hosch250 LOLCODE.NET has it implemented, but it's a different implementation of the language that doesn't seem to follow the official specs, so I prefer running it online... and dealing with the limitations.
 
@Hosch250 Bukkit is/was a big Minecraft modding API, for Minecraft servers. It got a DCMA request or something and had to shutdown because of it
 
Well, I don't think this will work.
 
@Legato I do not believe you are allowed to thank people for an answer in the comments
 
10:37 PM
@SirPython It's not seen as "constructive" but there's not really anything wrong with it
 
@SirPython if a comment strikes you as useless, feel free to flag it as "too chatty".. but there's nothing inheritently wrong with that one. "+1 Thanks!" is annoying though
 
Some rules are too broad. I think it's mostly meant to take out things like 'thx'
 
Wow... that was stupid.
 
rather ironic ;)
 
@SirPython - I really like it when people +1 an answer of mine, but the comments are sometimes much more meaningful too. I like getting "that was awesome" comments.
On the other hand, comments like that are technically unnecessary, and if they are flagged, as a moderator, my duty is to remove them ;-)
 
10:41 PM
So would it be best not to put those kinds of comments, since some people like them while others are annoyed by them?
 
best of both worlds: put that comment, then remove it yourself - the person that wrote the post you commented on will be notified anyway.
2
 
0
Q: Extending Exceptions with module-specific prefix, intended for parsing error reporting

ThorSummonerFor one of my [WIP] project, I extended the dictionary class a lot with specific handlers, as such I determined that I wanted KeyError and TypeError exceptions to be specific to my project's parser. I extended the exception class like this: Github Permalink: https://github.com/thorsummoner/crowb...

 
That's smart.
 
just don't write a novel, because the notification is of limited length ;)
 
Personally, if the 'thanks' comment is directed to me, I often delete the comment, because I can.
Otherwise, if it is directed to you, you could perhaps flag it 'obsolete'.
Just perfect! Thanks a lot. — lennert_h Jan 15 at 17:37
Things like that, I should probably delete.
 
10:45 PM
@rolfl Flagged! ;)
 
@Mat'sMug Does LOL have a random number generator?
 
nope
 
Boo.
OK.
 
I hit that limitation when I tried to write a Rock-Paper-Scissors
 
10:47 PM
I'm going to test if input is a fibonacci number.
We should write our own version some time.
55 to rep cap.
Try to post before the deadline.
Does LOLCODE have math functions?
 
@Mat's your code and output do not match on the LOLLER.
Spoler says:
> TEH ANSWER IZ 233168
Code says:
VISIBLE SMOOSH "PROJEK LOLLER ONE IZ " AN TOTAL MKAY
 
look again
(oops)
 
@Hosch250 That's a fibonnaci number!
@Mat'sMug and I don't even need any more helpful flags!
 
How should I review this C# code, which doesn't really look like C#?
The author claims to be a beginner and I think he/she is not experienced at all with object oriented programming. Should I review it as code that should be object oriented or as if it were some C code?
http://codereview.stackexchange.com/questions/79297/download-file-and-connect-if-one-of-them-fails-go-to-step-one
 
10:58 PM
@mariosangiorgio - my general perspective is that you should target the 'best next step" for the asker.
 
^^ that
 
If you think the asker's next step should be to introduce objects then go there.
 
public class Globals
{
    public static int sockConn = 0;
    public static bool sockRetry = false;
}
^^ KILL WITH FIRE
 
It's a judgement call as to what's appropriate, and you can get it wrong... (I did it wrong recently).
 
do/diod what wrong?
 
11:00 PM
WOW thank you rolfl this is great.... probably a little over my head in parts but I'm sure going to enjoy dissecting it and taking all I can from it for future endeavours :) I understand that the horizontal axis was the way to go but I trying to figure out a decent way of doing so with the vertical bar style just in case I need it in a future exam :) Thanks again for all this effort you have gone to, I greatly appreciate it :) — kfcobrien Jan 16 at 22:17
" probably a little over my head in parts " <--- getting it wrong
 
WWell... you can't get it right every time, can you?
 
This is insightful, however the knowledge you have provided is way above what I have known and I guess I will have to do a bit of reading on reads and writes again. I am implementing all of your suggestions. — User3 Jan 16 at 4:15
^^^ getting it very wrong
 
(Just look at my WW's)
 
I think I also have some answers like that, if I were to look
 
11:02 PM
@Mat'sMug I agree :)
 
> So, I would avoid recursion and the use of global variables. I think I did the first one right, but I need help to avoid the second one.
OP doesn't need to be told to avoid globals, but how to pass parameters around.
 
DINNER TIME!
 
Tell, don't ask!
 
-1
Q: When using both try and if in python

Boyang Baifollowing function is part of my code: def calEntropy(p): """ given a list of probabilities whose sum is equal to 1, calculate the entropy of it. """ try: if 0.99<=sum(p)<=1.0: E = sum([-x*np.log2(x) for x in p]) else: raise ValueError("sum of probabilities must equal to ...

 
someone posted a while ago a flow-chart for what programming language to learn, anyone knows where I can find that one?
Welcome! Please include your code in the question, otherwwise this wiwll be closed. — Simon André Forsberg 10 secs ago
damnit
 
11:20 PM
lol
 
0
Q: Python: Reading and Writing in same script

R2DPoopI just finished working through Ex.16 of 'Learn Python The Hard Way'. To further study, I wanted to create a script that will read and display a file's contents on screen, and then have the user re-write the file with three lines. My question is: Can my code be written in a much cleaner pythoni...

 
What @Maarten said. Also, even if you clean it, questions like "Is my implementation of CBC correct?" are often a poor fit for SO, because the answer is likely to be "It looks OK, why do you think it's not?" If you have a reason why you believe your code is wrong (e.g. it fails some tests), ask specifically about that. If you think it's correct, but want feedback on coding style and/or possible edge cases, try posting it on Code Review. ... — Ilmari Karonen 47 secs ago
 
^^ nice! there's hope!!
 
> Ive built a fiestel chiper algorithm and Im using CBC for blocks. I think my implementation of CBC is wrong.
I'm not so sure about this one, @Mat'sMug
sounds like this code should be tested some more
but Ilmari's comment is definitely correct bty itsefl.
... If you're not sure if your CBC implementation is correct or not, and don't know how to test it, consider asking a general "how to fish?" question like "How do I verify that my implementation of CBC mode is correct?" (for which the basic answer is "Test it with a standard cipher like AES, and compare the output to published test vectors, or to the output of a standard reference implementation.") That would be on topic either here on SO, or possibly over at Cryptography SE. — Ilmari Karonen 1 min ago
I am impressed ^^
code has been added, but not sure about the on-topicness:
1
Q: Extending Exceptions with module-specific prefix, intended for parsing error reporting

ThorSummonerFor one of my [WIP] project, I extended the dictionary class a lot with specific handlers, as such I determined that I wanted KeyError and TypeError exceptions to be specific to my project's parser. I extended the exception class like this: Github Permalink: https://github.com/thorsummoner/crowb...

 
@SimonAndréForsberg Your "W" key seems to be malfunctioning today!
2
 
11:36 PM
Well, exception classes all by themselves don't mean much. Where do you throw them? Under what circumstances? Please add enough context for reviewers to actually be able to review your code - as for the permalink, please see this meta post. — Mat's Mug 1 min ago
 
@Phrancis it has been for a while, but today I am not correcting the errors
 
or, as Simon would put it: "WWell, exceptions classes all by themselves don't mean much. WWhere do you throww them? Under wwhat circumstances? Please add enough context for reviewwers to actually be able to revieww your code..."
 
> Well, exceptions classes all by themselves don't mean much. WWhere do you throw them? Under what circumstances? Please add enough context for reviewwwers to actionally be able to review your code...
 
0
Q: I HAZ A FIBO - O RLY? YA RLY NO WAI

Hosch250First LOLCODE program, run here. What do you think? HAI 1.2 HOW IZ I GetNum VISIBLE "Entr yr numbr, lez then 50: " I HAS A WatzNum GIMMEH WatzNum FOUND YR WatzNum IF U SAY SO HOW IZ I ProovFibo YR Num BOTH SAEM Num AN SMALLR OF Num AN 5...

 
reviewwwers?
 
11:38 PM
yup
 
Out of votes.
Still 55 away from rep capping.
 
@SimonAndréForsberg BOTH SAEM Num AN SMALLR OF Num AN 50
less than 50
 
WWWhy add that restriction?
Just to be able to take the simpler approach?
 
Because it doesn't have an array.
But, I could loop until it the fibo num is bigger than the input.
That would be better anyway.
I don't know what I was thinking, hold on.
2
 
What are some good challenges/resources to learn/practice java 8 features?
 
11:43 PM
@Legato Post Java 7 code, say that you have access to Java 8, read the answwers.
 
@SimonAndréForsberg that "ww" is cracking me up everytime
 
I personally found solving a Sudoku wwas a nice wway of learning Java 8 (although I still haven't posted a CR post for that one)
@Mat'sMug this one is making me crack up every time I think about it:
3 hours ago, by Mat's Mug
that might be on-topic on WorldBuilding
 
@samyismyhero well... it's textbook example code, Code Review is for posting your own working code. If OP implements their own decorator in an actual application, then yes, it would be on-topic to ask whether the decorator pattern is overkill on CR. — Mat's Mug 11 secs ago
 
11:52 PM
I wonder howw long it takes before the Stack Overflowww users starts to suspect something
2
 
@MannyMeng Duga is now finding and reporting all new comments on Stack Overflow that are referring users to Code Review, so we can educate the average StackOverflowan :)
 
Oh...
 
I was so happy when I got through the first single 'w', then I got two of them, and then three!!
 
I'm not seeing a question here. If you're looking for general advice on the code you've written, consider posting this at codereview.stackexchange.comJonathon Reinhart 1 min ago
@samyismyhero well... it's textbook example code, Code Review is for posting your own working code. If OP implements their own decorator in an actual application, then yes, it would be on-topic to ask whether the decorator pattern is overkill on CR. — Mat's Mug 2 mins ago
 
11:54 PM
@Mat'sMug retracting close vote
 
ok. ditto.
 
4 minutes until RELOAD! ... STAR ALL THE THINGS
 
@JonathonReinhart Judging by the very vague description, it sounds like the OP wants to change the behavior of the program in some way, which makes this not a good question for Code Revieww. — Simon André Forsberg 54 secs ago
 
I have to say that I am glad we are able to shoot them down in the way that we do, good wwork @Mat'sMug / @all SO commentors! CR commentators that responds to SO users!
 
Good wwork too, Simon :)
 
11:58 PM
@SimonAndréForsberg I've used it a bit, and I do get some answers here but that's not really helping me get it long term. Feel like I have to re-teach myself every time. The difference between continuously using something vs just seeing or reading it.
 
@Legato the most important part I think is understanding what specifies a functional interface and how to wwrite lambdas.
and then the Streaming API
 
RELOAD!
 
and then checking out the java.time package
 
and then... what else is there?
 
11:59 PM
 
ha!
 
[Vogel612/JavaBot] 1 commit.
 

« first day (638 days earlier)      last day (3362 days later) »