« first day (380 days earlier)      last day (3636 days later) » 

9:05 PM
@Vogel612 I've just finished all unit tests for the Hand class, check once you're pu to it, still need to do some work on the next class which gets events, tomorrow.
Man, 210 lines of implementation code, and 600 lines of unit testing code...
 
@CaptainObvious Any better title for this?
 
killed a Javascript Zombie this time. anyone want to check it out for me?
0
A: Nodejs broker between mongodb and rabbitmq

Malachiyou have some magic strings return amqp.connect('amqp://localhost') & this.mongo.db = mongo('mongodb://127.0.0.1:27017/test', ['test']); these Strings should be kept in a High Scope variable, so that you can easily maintain them by changing out the strings in one place, eventually you will...

 
@Jamal "Simplifying this jQuery code"?
 
@skiwi Anonymous got it just now, and with his new editing privilege.
 
9:22 PM
anyone want to fix my Javascript syntax on that answer I just posted?
pokes @konijn
0
A: Simplifying a repetitive event handler

Malachiwhat you should really do here is turn this part into a function with a parameter for your keyCode $(document).keyup(function (e) { if (e.which == 113) { $.ajax({ type: "POST", url: "/submit/role/", data: {}, ...

 
Hey @Malachi - this does not do what you think it does:
 if (isNodeWebkit) {
     function(113);
 } else {
     function(112);
 }
 
@rolfl that's why I left the little note about my Syntax. I know it's not right, I haven't ever written javascript
or am I way out in left field with the AJAX and JSON and the whole putting it into a function thing?
 
Except, it really does nothing... in fact, I don't believe it will parse, and, if it does parse, it does nothing
 
what if I wrote "Return function(113);"
 
function(...) expects a parameter name, not a value.
 
JvR
9:35 PM
function starts a function declaration. It's a keyword.
 
i.e. function(paramname) { .... code .... }
 
gotcha. my fault for using bad naming.....
what about "runMyCode(113);"
where "runMyCode" is the function that the OP should create?
 
then you need to declare the function runMyCode(varname) somewhere.
Probably store the function in a variable for performance reasons.
Also, you may as well throw in the isNodeWebkit as a parameter too, and do the conditional in the function.
 
I still want the code to be what it is there though..... I am revising my answer
hopefully I have the Declaration correct.
 
0
Q: How to copy in two different folders in a machine simultaneously?

WebbyI am trying to copy files from machineB and machineC into machineA as I am running my below shell script on machineA. If the files is not there in machineB then it should be there in machineC for sure so I will try copying the files from machineB first, if it is not there in machineB then I will...

 
9:45 PM
@rolfl, @JvR how does it look now? codereview.stackexchange.com/a/51167/18427
I feel embarrassed to tell people that I don't know JavaScript.....
 
JvR
Me? I used javascript last back when VBScript was still a serious contender.
 
lol.. it still is if you only use IE
or you have applications that depend on VBScript
 
TTGTB
 
night
 
Tomorrow, I will try to write math code that takes into account the Koenig lookup.
 
9:47 PM
what?
 
JvR
Night, @morwenn.
 
-4
Q: Visual Studio GONE BANANAS

LightWalker22Here i was happy coding c in visual studio professional 2013, when all of a sudden the characters in my console started acting weird! At first all was ok and i could print the file "partidas.txt", then it started getting weird characters like the image below. My code is bellow the image. http:/...

 
@Malachi A super-cool obscure feature of C++ that sometimes allows to write better code if you manage to understand how it works.
4
 
Visual Studio gone 🍌🍌🍌🍌🍌🍌🍌🍌🍌🍌🍌🍌? — Mysticial 23 mins ago
 
And thanks everyone for wishing me a good night :3
 
9:49 PM
Good night!
 
:)
 
Goodnight!
 
@Malachi - improved, but you will likely have people suggest a number of things, including:
  var $runMyCode = function(keyCode) {
and, then also using a ternary on the invocation.
$runMyCode(isWebKit ? 113 : 112)
 
that is some good stuff, you know I am going to steal it right?
 
but, I am not sure about that ... ;-)
 
9:52 PM
it looks right to me
 
So, if you get downvoted I will know if I was wrong.
 
@rolfl lol
 
@Malachi - for the record, I struggle with CR answers that contain 'disclaimers': My syntax is most likely wrong, I don't write much Javascript, actually I don't write any at the moment.
^^^ I see that, and I downvote
If you don't know the answer, then don't give an answer.
 
@rolfl I figured that was going to happen. but I can't be corrected if no one sees my mistakes. it was a good answer that I could have written in C#
 
If you want to have your code improved, then post it as a question ... that's exactly what they are for.
 
9:56 PM
but if I don't know the syntax it probably won't ... compile.... which means it's probably not a good answer....
I just gotta keep learning is all.
 
That's my perspective on things... There are things I know, and can answer, and there are things I know a bit, so I can post questions, and there are things I don't know yet, so I go to Stack Overflow.
 
I knew the answer I just didn't know how to write it
is that fair to say?
 
but, on code review, if there's a person asking a question with working code (assumption), then I hope that answers will improve that code, not guess at something that may not even work.
 
very true
 
It is a fuzzy area, and I am ranting a bit ....
 
10:00 PM
why I try to explain more what the logic than writing code I don't know the syntax to.
I hear what you are saying and agree with you.
I am really desperate for rep, and trying to learn a little and burn some work time.
which I have succeeded in doing, it is now time to go home
 
Ultimately if an answer helps the asker, then it is a good thing.
Time for me to back-pedal?
Cheers, travel safe.
 
Blasphemy ▼▼▼▼
JK LOL
and later
 
JvR
Cheers, @Malachi.
 
JvR
10:16 PM
I have this interesting bug where, if I pop a tab out into a new window, whenever I try to focus on the new window, the original one pops up and steals focus.
Achievement unlocked.
 
0
Q: Quicksort pseudo code implementation in C# ( random pivot choice)

MulderFollowing pseudo code QuickSort- in place version : / left is the index of the leftmost element of the subarray // right is the index of the rightmost element of the subarray (inclusive) // number of elements in subarray = right-left+1 function partition(array, left, right, pivotIndex) ...

 
11:05 PM
0
Q: What is the best way to brush up on Java to prepare for a job?

mikeI am starting a job as a TA at a university at the beginning of June, and want to make sure I know everything that I need to know, and if not, learn it. Would anyone know any way to review Java and make sure I am familiar with all the necessary concepts to be able to explain/know what I'm talking...

 
11:57 PM
well that's off-topic.
 

« first day (380 days earlier)      last day (3636 days later) »