« first day (269 days earlier)      last day (3734 days later) » 

12:01 AM
I randomly got a silver badge one day on CR meta, and was surprised that I had visited it 30 days in a row.
 
RELOAD!!
 
WOOHOO!
 
Yeah, it irks me that some silvers are so much easier than others.....
 
Now that you all have rep...
5
A: Macro that interchanges 2 arguments

syb0rgIf you are using GCC, we can use the typeof()(C99) keyword to get rid of one of the arguments. Also, add a do-while so the macro to be used in contexts where it would otherwise be problematic. #define SWAP(a, b) do { typeof(a) t; t = a; a = b; b = t; } while(0) You could also use an exclusi...

 
0
Q: Unity3d loop through JSON and create prefab

Ronny vdbI am creating an app in Unity3D and it is my first time coding in c#. I use the following code to parse a JSON file hosted on my server and use the information to render prefabs within my scene: // Parses the json Object JSONParser parser = new JSONParser(); AssetData assetData = parser.Par...

 
12:10 AM
My profile says I have voted on 603 questions. Now I just have to wait...
 
My experience was it was not much of a wait.
 
You've earned the "Electorate" badge. See your profile.
2
Yay!
 
@syb0rg : Got 600 -> 01:07
Got badge: 01:28
Zulu times.
Well, aren't I behind the times ....
CONGRATULATIONS, @syb0rg
2
 
@200 also earned that badge, 8 hours ago!
hello!
 
As did @rolfl, not too long ago.
 
12:21 AM
Hey @200_success, did I just ping you?
 
Chat notified me. (I'm logged into another room.)
 
I mean, you weren't in the chatroom..
oh
 
Hey, @200 - were you actively pursuing that badge?
(or just a pleasant surprise?)
 
I just hit 4K, I wondered if you showing up here right after I mentioned you had to do with it. Haven't read the readme yet.
(reads the readme)
 
@200_success was competing with us and we didn't even know it.
 
12:24 AM
crap, now we have a 'trusted user' called 'lol.upvote'.... like that's going to help graduation!
4
 
...nope, no power-ping for trusted users!
 
@lol, you lose +2 for wiki edits ;-)
 
How do I lose +2?
oh
nevermind
 
Well, now, when you wiki edit, you don't get anything.... before, you got +2
 
yeah. sad, I know.
 
12:26 AM
@rolfl Just doing my part as a good CR citizen.
 
Now our individual rep "next level" is measured on the graduated sites' scale :)
 
Good, good. I checked your stats, and realized you had not been keeping the same vote pace as syborg and I.
But, don't slow down....
 
^^ who?
 
(and I have a bunch of +10's for @200 on answers that I never voted before)
@lol.upvote No-one---- no-one can slow down on voting.
 
12:29 AM
Looking at what's coming into the answers feed, indeed, no one can slow down on voting.
30 "unread" since I left the office.
1
A: Servlet for querying database on some high-loaded system

palacsintSome minor random notes: Instead of commenting, like this: //If session_id is not null, we need to check if it is valid for mac provided if (!(device.getSessionId().equals(session.getId()))) { makeXml (request,response,session_id, RESPONSE_STATUS.HACK_ATTEMPT); return; ...

 
I take my voting seriously, and vote critically. That does take time.
4
 
1
A: Servlet for querying database on some high-loaded system

200_successIt doesn't make much sense to have a connection pool to be used by just one servlet. Usually, the connection pool is shared by the entire webapp. Furthermore, much of the setup can be accomplished by configuration rather than with code. It is certainly bad practice to hard-code connection stri...

2
A: Java GUI code with Swing Timer

palacsint+1 to @unholysampler and some other notes: I'd avoid abbreviations like redBtn and cntd. They make the code harder to read and could undermine autocomplete. For example, if you type redBu autocomplete won't find anything. It's often annoying. (See also: nikie's answer on Using single characters...

4
A: How do I make this duplicate sort algorithm run faster?

ChrisWueThe algorithm as you describe it is O(n^2) worst case. Assuming that there are n images and no two images are equal then the first one gets compared against n-1, the second one against n-2, ... etc. so you have 1/2 * n * (n + 1) comparisons. A way around this is by calculating a checksum with lo...

5
A: Correctness of calculations with struct timespec

William MorrisI can see nothing wrong, but I think it is not optimal. My compiler warns me about floating point conversions of those '1E9' constants. If I rewrite your timeAdd as follows, the code is easier to read and the generated code is significantly smaller: #define BILLION 1000000000 Time timeAdd(Time...

3
A: Review of my CSS for aligning the navigation icons and text in a footer menu

kleinfreundHTML: Since the the navigation is the only thing inside your <div class="footer">, how about moving the class to the ul? Instead of using span's there, you can add the &raquo; to a pseudo-element (see the CSS part) CSS: For your arrows, you should use pseudo-elements: .footer a:after { ...

4
A: Model cars as classes

200_successWhen chaining constructors, it's customary to call the parent class constructor first, then perform the subclass-specific initialization. Here, it makes little difference since you're just setting a bunch of variables, but in more complex situations you could run into problems doing things in th...

6
A: Simplifying conditional statements for transaction code

lol.upvoteWell the first condition could be reversed, immediately reducing the nesting level: if (string.IsNullOrEmpty(customerpay) || string.IsNullOrEmpty(warrantypay) || string.IsNullOrEmpty(maintanceplan)) { return; } // rest of conditions This code looks like sample code, but I'll say it anyway:...

7
A: Simplifying conditional statements for transaction code

pokeYou could do it like this: public void func() { if (string.IsNullOrEmpty(customerpay) || string.IsNullOrEmpty(warrantypay) || string.IsNullOrEmpty(maintanceplan)) return; if (customerpay != "Include" && warrantypay != "Include" && maintanceplan != "Include") return; ...

1
A: Ext JS: Avoid duplication

konijnThe trouble with your question is that the code resembles more config than coding and there is nothing wrong with it except that it is not DRY between those 2 files. It seems that Ext JS supports require as of version 4, so you simply need to extract the common logic/config into a file that you ...

18
A: Nesting versus GOTO: which is better to avoid?

BobbyA different way is to let these pairs be represented by a class, which itself has a static factory method that will return null on failure. public final class Pair { private String key; private String value; public Pair(key, value) { this.key = key; this.value = valu...

4
A: Model cars as classes

Michael UrmanThis is a fine place to start learning about OOP class hierarchies. It helps you understand how methods and data are shared amongst various members of the hierarchy. However I would never model a data-hierarchy in this fashion. In fact, especially in python, I would probably make just one class w...

4
A: Nesting versus GOTO: which is better to avoid?

AJMansfieldHere is a far and away superior solution: use java.util.Properties to handle your configuration file. Properties supports a key=value syntax that is very similar to the one you are trying to parse. It's up to you to decide whether that syntax is close enough to handle any existing configuration...

4
A: Removing unnecessary floats, height, widths

kleinfreundHTML: For prototyping, you should include the # for links to actually trigger link behavior in browsers: <a href="#">Link</a> Instead of placing <span>&gt;&gt;</span> in your HTML, you should use… If you page is not dynamically generated, you may consider using the CSS properties width and heig...

2
A: Slide out CSS menu

kleinfreundHTML: In addition to your existing viewport meta tag, I suggest adding the width value: <meta name="viewport" content="width=device-width, initial-scale=1.0"> Also moving the tag before you load your stylesheets and the title code help your performance. MDN on using the viewport meta tag. A ...

7
A: Macro that interchanges 2 arguments

syb0rgIf you are using GCC, we can use the typeof()(C99) keyword to get rid of one of the arguments. Also, add a do-while so the macro to be used in contexts where it would otherwise be problematic. #define SWAP(a, b) do { typeof(a) t; t = a; a = b; b = t; } while(0) You could also use an exclusi...

2
A: Nesting versus GOTO: which is better to avoid?

palacsintI agree with others that the first one is better because it's easier to read but @AJMansfield also has a really good point. It's worth mentioning that you can also use Guava's Splitter and MapSplitter classes or write something similar.

1
A: Component-based system for JavaScript game

konijnYour code requires a ton of domain knowledge to properly review. I went to your Github repository to try and be more familiar with what you have. Entity support for components You asked specifically for this one, and I did find some things to ponder upon. addComponent existingVersionOfCompon...

2
A: Rolling Average class sanity check

Jesse C. SlicerCouple of small bits: The arguments to your ArgumentOutOfRangeException exception are in the wrong order. I eliminated the padLock member variable, because the counts member variable is perfectly convenient to use as a lock argument for the usage under consideration. I agree with what Dan Lyo...

2
A: 99 Haskell problems, problem 9: Code Review and simplification of pack function

Petr PudlákLet's improve the function step by step, focusin on readability as well as on the algorithm itself. I believe the type of the function is not what it should be. We get a list of characters, and we should produce a list of lists: pack1 :: [Char] -> [[Char]] pack1 xs = foldl (\acc x -> if not(nu...

ok I'm tired.
Do I look like a chatroom spammer?
I think I just killed a whole chatroom.
hello?
 
@lol.upvote You forgot one
0
A: Self-mutating C (x86_64)

syb0rgIt looks pretty good to me. I can see that a lot of research has gone into this. There are a few things I would fix though. You print "Calling foo" right before you call it, which I don't really see a need for since you are printing something that looks like a counter within foo(). I would r...

 
I forgot 10
11
 
@lol.upvote I'm was kidding. I just posted that one.
 
12:41 AM
oh
then I'll get it when the feed updates :)
3
A: Model cars as classes

theodoxA couple of things to consider 1) As a style thing, I'd prefer **kwargs to *args in your constructors. This makes things clearer since there's no chance that a change to a base class initializer will invalidate other code in subclasses. Something like @MichaelUrman's example: class Vehicle(obj...

1
A: Is this nesting of partial views poor design?

CaseyFirst of all, I don't see anything you have done here as bad practice or poor design, that being said, I would probably not opt to nest as deeply. In my thinking, breaking up the the view into sub views should be done for 2 possible reasons. Organization Reusibility I am assuming that you do...

Seriously though, it's annoying isn't it?
0
A: Converting List to Array when list has quotes and embedded comma

Bruno CostaI could get rid of your startQuote variable, I reduced the number of i CONTAINS '"' comparasions by 1. array function convertRow(required string lstRow) { var arResult = []; var arTemp = ListToArray(arguments.lstRow, ',', true); var quoteMode = false; for (var i in arTemp) { ...

^^ headshot?
 
It would be nice if the answers were posted here as soon as they were answered.
 
2
A: A parametrized Config singleton

ChrisW Does the instance() method need to be synchronized? Theoretically, yes: because unique_ptr isn't thread-safe: therefore you should not call get while another thread is calling reset. It may be safe in practice. Alternatively you don't need all the functionality of a unique_ptr. Instead you...

A live feed? During the day I was posting them as they came in, in batches of 5-6.
1
A: Can I reduce the bloat in my Google Spreadsheet form script?

konijnThe only thing I can suggest is to turn your array-lookups in to object-property lookups. function createAgentLookupTable( agents ) { var table = {}; for (var i = 0 , length = agents.length; i < agents.length; i++) { agents[i].index = i; table[agents[i].toLowerCase()] = age...

1
A: Nesting versus GOTO: which is better to avoid?

OldCurmudgeonYour problem is not with the loop construct - nor is it with GOTOs. Your problem is you are avoiding some tools that can make your code better. Here's an example. enum Validator { IsNotComment("Skipping commented line in file.") { @Override boolean isValid(String s) { ...

 
@lol.upvote I know. I meant that SE should implement that thing @SimonAndréForsberg requested on Meta.
 
Still, 5-6 of those actually floods the screen with answer links. Do we really want that?
Oh look, a new answer!
2
A: Self-mutating C (x86_64)

syb0rgIt looks pretty good to me. I can see that a lot of research has gone into this. There are a few things I would fix though. You print "Calling foo" right before you call it, which I don't really see a need for since you are printing something that looks like a counter within foo(). I would r...

 
12:53 AM
And already accepted!
2
A: Self-mutating C (x86_64)

syb0rgIt looks pretty good to me. I can see that a lot of research has gone into this. There are a few things I would fix though. You print "Calling foo" right before you call it, which I don't really see a need for since you are printing something that looks like a counter within foo(). I would r...

 
@200_success the mighty [badge:pundit]!! congrats!
 
@200_success that may have been me ..... not intentionally, though....?
Mayb not..... this was your most recent +5 comment, I think:
I would either call it StringPair or Pair<String,String>. — 200_success 8 hours ago
 
1
A: Nesting versus GOTO: which is better to avoid?

rolflI find it strange that the zero-length line problem has not yet been pointed out: for(String line : lines) { if(line.charAt(0) == '#') { .... The code above assumes a non-empty line in all cases, otherwise you get IndexOutOfBoundsException. This is the sort of issue that should...

 
I wish we could vote +2 for answers which find a bug.
5
I propose a new meme-tag, like 'headshot': "raid".
 
@ChrisW I'm apparently hitting enter too soon.
 
1:07 AM
1
A: Minimal Game of Life in C#

Jesse C. SlicerHere's a take on it, that merely does some cleanup of the existing code. Beyond the changes shown below, I would also highly recommend separating the UI logic from the game logic. One error I found: cell.Margin.All.Equals(0); // Margins doesn't do anything at all. What I think you mean is: ...

^ raid
 
@ChrisW I'm rep-mongering.... that question is currently top of the SE HotQ list.
 
I liked the wingman one
 
This one detected a -1 fencepost error at the start of the loop.
 
Thanks for re-upvoting it.
 
1:11 AM
oh. "raid" just clicked. damn I'm slow.
 
@lol.upvote You have to be North American, maybe.
 
yeah the idea of "head shot" was more to give it at least a single vote, so as to lower the "questions with no upvoted answers" counter.
 
A "raid" is a request for at least two votes.
What's "wingman"? Not listed in the CoD memes.
 
like putting a zombie up against a wall and saying "Fire at will!"
 
@ChrisW, In South Africa we had (using past tense because I sued to live there):
DOOM!!!
 
1:14 AM
OMG! So brutal!
(removed)
 
@lol.upvote for 24 years.... then 3 yrs in the UK, and now 13 yrs in Canada
 
0
Q: Make this Ruby array pivot more efficient?

Steven GarciaA puzzle I was given. Apparently my solution is not efficient enough: def pivot(arr) results = [] arr.each_with_index do |n,index| last = arr.size - 1 sum_left = arr[0..index].inject(:+) sum_right = arr[index..last].inject(:+) results << index if sum_left == sum_right ...

 
@lol.upvote The slogan was: Kills them Dead!
 
0
A: Self-mutating C (x86_64)

beerboyThere's one small bug in your code here: memcpy(foo_addr, shellcode, sizeof(shellcode)); This copies the contents of shellcode, but being a string literal, shellcode includes a null terminator and sizeof(shellcode) is equal to 30, not 29. You should replace this line with: memcpy(foo_addr, sh...

^^ I'm not qualified to validate this statement
 
1:21 AM
@rolfl "Kills bugs dead" was Raid's slogan too.
 
I like the French slogan they have in Quebec - "tue les insectes raide"
@ChrisW same in France?
 
I don't want TV or see many French advertisements.
 
0
A: Better ways of making a scroller

konijnTo your questions: More options; sure you could provide a wait time to setInterval to control the speed of the scrolling down, you could also increase the scrollTop increment to make it scroll down faster. Less code; I think this is pretty much the bare minimum, a little too bare really. I th...

 
scjohnson.fr/nqcontent.cfm?a_id=788 says, « Quand Raid® passe, les insectes trépassent! »
Mmm, catchy!
 
@ChrisW hmm me neither. I just happen to remember that slogan from a couple of years ago, in this forever gone time of my life when I could get up at noon on a Saturday, and I could watch TV like 40 hours /week...
:)
 
1:30 AM
The computer seems a bit less « nul » than TV.
Right. Bye! Work tomorrow...
 
See ya!
 
Hello @JamesKhoury
 
@syb0rg waves Hi!
 
@JamesKhoury Hmm, just beating you on CR rep ;)
 
hey
 
1:44 AM
@Jamal Urg, you beat me to that edit. :)
I was about to do the same thing you were.
 
Sorry about that. There may be another post I've missed. I was gone for a while.
 
2
A: Loop through JSON and create prefab in Unity3D

Jeff VanzellaI would split the asset loading into 3 different classes: TextAsssetLoader, ImageAssetLoader, VideoAssetLoader. This will allow you to separate the loading of each type. Additionally, I would create an interface so you can eliminate the if statement in your current code. public interface IAsse...

1
A: Component-based system for JavaScript game

konijnYour code requires a ton of domain knowledge to properly review. I went to your Github repository to try and be more familiar with what you have. Entity support for components You asked specifically for this one, and I did find some things to ponder upon. addComponent existingVersionOfCompon...

 
1
A: Better ways of making a scroller

konijnTo your questions: More options; sure you could provide a wait time to setInterval to control the speed of the scrolling down, you could also increase the scrollTop increment to make it scroll down faster. Less code; I think this is pretty much the bare minimum, a little too bare really. I th...

^ 1 away from Revival.
 
^^ 0 away from Revival
 
You have 5 votes left for today
Noooo
 
1:47 AM
You have 1 vote left for today I feel your pain @syb0rg
 
The zombies are going to overpower us soon!
 
I think it's the answers coming in. We're getting more traffic, there's more and more active users. We need to make sure they vote, too!
14,333 visitors/day. First time I see it this high
 
@JamesKhoury Have you voted recently?
We could really use your ammo.
7
 
@konijn sure is killing those JS questions. If there were a Zombie Hunter badge, he would have it by now.
2
 
@syb0rg Lunch first. Votes Second.
 
1:50 AM
I'm giving @konijn as many votes as I can, he's doing a great job!
 
He should be "Zombie Hunter of the Month"!
2
 
;)
Today not so much , 2 mistakes
bless 200_success for finding one
 
Of course we'd also have our "Monkey of the Month"
3
 
He'd be "Monkey of the Month" every month!
 
1:55 AM
Yay!!! No more JavaScript questions from 2011
3
 
@Jamal you've seen 14k visits before?
 
open
 
@lol.upvote: You mean for another user?
0
A: Modification of javascript inheritance framework

konijnEasy question first : Is it written correctly? Class.prototype.set = function(attrs) { for (var attr in attrs) { //if exist setter function this.on_change{key of wrap: function(key of wrap, new value) if(this.on_change[attr])this.on_change[attr].call(this,attr,attrs[attr]); else th...

 
@konijn - 9 answers in the past 12 hours.... impressive...!
 
@Jamal I mean on the site stats
 
1:59 AM
Oh. I might have seen higher, but I can't remember. I may have to look at some previous stats.
 
Next week we'll hit 1,111 days in beta
 
Hey, also, 32,651 users
 
and rising
 
We should celebrate when we overflow to -32768
5
@lol.upvote - you need to start un-pinning some of the older pinned chats.
 
better?
 
2:02 AM
I was thinking the I ♥ CR self-promotions ;-)
2
Damn, my typing is bad today
 
at least you notice
there
:p
 
You noticed one sued from earlier it took me 5 minutes to catch what you were saying.
 
@lol.upvote Who are the room owners?
 
it's ok, it'll make up for all the things you said it took me 5 minutes to catch
 
By the way..... much better!
 
^^^ RCVA ^^^
 
I threw him a bone.
Hmm, the old assignment in an if statement problem ;) — syb0rg 16 secs ago
@Jamal If I answer it, could you move it over to SO?
Or should you migrate it anyways?
 
0
Q: Code is skipping if statement

user3089453Below is the code for the whole program. I can't figure out why the code skips the if statement. The if statement in question has been bolded. #include <iostream> #include <string> struct salesData { std::string isbn; unsigned numSold = 0; double revenue = 0.0; }; int main() { salesData data1...

 
I see no research effort, plus the whole code has been posted instead of the problematic code.
Well, at least the "bolded part" is something.
 
See if you can get yourself a rubber duck for these moments ;) — lol.upvote 20 secs ago
DVA
Out of ammo.
2
A: Modification of javascript inheritance framework

konijnEasy question first : Is it written correctly? Class.prototype.set = function(attrs) { for (var attr in attrs) { //if exist setter function this.on_change{key of wrap: function(key of wrap, new value) if(this.on_change[attr])this.on_change[attr].call(this,attr,attrs[attr]); else th...

 
2:14 AM
Typographical error, huh? If so, it would've been closed on SO.
 
indeed
such a rubberduck moment!
 
Question: why's it called a "Yoda Condition" when "Yoda Code" sounds much better, especially when the person who wrote it would be a "Yoda Coder" ?
 
reversed, the condition operands are
gimme "yoda code" that's not in a condition?
yoda codez is too generic
 
Perhaps, but catchy phrases are all about being catchy, not accurate.
like 'retailcoder', or 'lol.upvote'.
 
which is accurate?
 
2:24 AM
neither.... that's the point, but they are catchy!
 
I could argue that one matches the associated email address...
 
^^ oh shoot! thanks @rolfl I was going to fetch that link and completely forgot! Sorry @syb0rg!
 
Who is the Quentin guy?
I've never seen him on here.
 
He's been here
 
2:26 AM
@lol.upvote you could, but no-one can see that address.... except you.
 
@lol.upvote No worries.
 
and mods
@syb0rg he's one of the Ghosts from the Dark Age of Code Review.
 
I wonder why he doesn't come on anymore.
 
Our GOTO question is #1 on the hot list! :O
 
@syb0rg 22 votes this month, he's still active
 
2:29 AM
@lol.upvote On chat I meant.
 
hmm dunno. You can ask him when he comes over?
 
^^ his recent activity ^^^ <--- scary stalking, etc.
 
ret
2
 
Is the correct meme kill-cam?
0
A: Very simple priority queue

syb0rgLike @Corbin said, there is little that can be done to improve the efficiency of your code. But there are a few things I can do to improve the code quality. You list define a lot of priorities in your header file. #define VERY_HIGH_PRIORITY 4 #define HIGH_PRIORITY 3 #define NORMAL_PRIORITY 2 ...

 
AFAIK, yes :) but I'm out of ammo!
 
2:37 AM
Onto killing some more zombies.
 
@rolfl you starred the "lol" in disguise, have you!?
 
Of course!
Isn't that the instruction in your name... lol.upvoter
 
2
A: Very simple priority queue

syb0rgLike @Corbin said, there is little that can be done to improve the efficiency of your code. But there are a few things I can do to improve the code quality. You list define a lot of priorities in your header file. #define VERY_HIGH_PRIORITY 4 #define HIGH_PRIORITY 3 #define NORMAL_PRIORITY 2 ...

^^ proof that I blindly paste links from RSS feed here
 
@syb0rg: I was sort of eyeing that question, but I wasn't quite sure what to address. I didn't want to mix in some C++-ness anyway.
 
1
Q: Efficiently counting '1' bits in the first n bits

AlecI have two functions to count the number of set '1' bits in the first offset bits of either a 64 bit number, or a bitmap struct. After some profiling, particularly the latter is quite a bottleneck in our system. What can we do to make it faster? #define POPCOUNT16(x) __builtin_popcount(x) #def...

 
2:41 AM
@Jamal For that question I was kinda waiting for someone with more expertise to answer it. Since it's been there for a while, I thought I would put a few ideas of mine on how to improve it into an answer.
 
Perhaps William Morris will chip in.
 
Perhaps. Right after I gave that answer of mine of the self-mutating C, someone else chimed in.
 
So much of this code seems above my level. I barely have time to catch up on what school does not teach me.
 
@StackExchange He wants this to be faster? It looks pretty alienish fast to me.
 
This older question kinda looks off-topic. It's asking about design, and there's very little implementation code (if any):
 
2:46 AM
where's your robot half?
 
4
Q: Building a good C++11 template library - compile-time checked enum array

Mike MThe task is to add data or values to members of a given enum class. The compiler should check, if a value for each enum member is available, and not just default construct empty values. It is a tool to verify that during a change no values are forgotten. The interface is modeled after the array ...

 
@lol.upvote I still have some tricks up my sleeve.
Well, one trick.
Here goes nothing:
0
A: Efficiently counting '1' bits in the first n bits

syb0rgI'm not sure on how much more efficient this will make your code, but you can add the register keyword to your code to indicate that a variable will be heavily used and that you recommend it be kept in a processor register if possible. register int32 count;

 
I'm attempting one C++ zombie now. Hopefully it's gonna be a good shot.
 
bad answer anyway. Flagged as spam.
quacks like a spam
 
Out of votes again. Dang it.
If anyone here has an Arqade account, I could use an upvote or two so I can vote in the moderator elections:
3
A: Setup operators on Minecraft server

syb0rgYou need to configure your Minecraft server. From the Minecraft wiki: Configuring the Minecraft server Configure the server by editing the server.properties file, the format for which is explained here. Be certain to edit the file with a text editor that does not add formatting (...

 
Sorry no account there. How much is needed for voting?
 
@lol.upvote 150
 
0
A: BFS for creating a queue without repetitions and with loops in the graph

Jamal Since you haven't provided a queue implementation, I assume you're using std::queue. If so, make sure you're not using using namespace std and are using std:: where necessary. For this line: for(BaseFilterMap::const_iterator it = m_Filters.begin(); it != m_Filters.end(); it++) It may be more...

 
Oh yeah, now he's spamming. I'll handle this.
 
'Yeah, I am working for a client and decided to learn writing plugins, it has some bugs , I cant make it work on fiddle, but hey, check out my github..
 
Yay! a real smapper!
 
@Jamal I would up-vote that, but I ran out of votes :(
Also, where is the spamming?
 
I've nuked them now. Without mod tools, you won't be able to see them.
 
3:22 AM
@konijn I don't think that's spam.
 
@200_success he's posted the same identical link-only answer on different questions..
 
You could try harvests, simpler syntax compared with promises and flow libraries.github.com/salboaie/harvests
sounds like spam to me
 
now that's a review!
 
@200_success: He also did the same on SO. Same exact answer. It also raised the duplicate answer autoflag.
 
For some reason my answer quoting an official source got downvoted...
-1
A: How do I obtain the Nightingale armor

syb0rgFrom the Skyrim wiki: Acquisition The full set is given to the Dragonborn by Karliah before performing the initiation ritual of the Nightingales during the quest "Trinity Restored" for the Thieves Guild. All pieces are obtained when activating the Armor Stone, emblazoned with the N...

 
3:24 AM
I'm not talking about the answer. I'm talking about the question that @konijn linked to.
1
Q: jQuery Plugin for Detailed images

bittersweetryanI'm working on a jQuery plugin for a client. Instead of finding one that was already out there I wanted to practice writing plugins since I hadn't in awhile. This plugin grabs all the images in a UL, creates a overlay for the page, and puts them in a image zoomer that gets opened when a user cl...

 
Then another answer saying the same exact freaking thing I said was posted a few seconds later.
 
ah, I I never said this question was spam
I just dont like the questiobn
'Yeah, I am working for a client and decided to learn writing plugins, it has some bugs , I cant make it work on fiddle, but hey, check out my github..
the funny part is that the code is not bad at all
 
@syb0rg both answers got -1'd.. wtf?
 
@lol.upvote Idk...
They are both right...
 
@syb0rg no idea, but you got an upvote from me .... napalmed it, in fact.
 
3:26 AM
The tone may be a bit insincere, but it has enough content to pass as ham.
 
to pass as a ham?
 
New meme.
 
Should I nuke ham as well?
 
like a hot knife in butter?
 
I wonder if the other person downvoted you ? Just so you both get votes from people now ?
 
3:28 AM
I didn't coin that term.
 
@konijn I'm not sure. Maybe.
 
interesting :)
Snow. Record. Breaking. Cold. More snow. Freezing rain. This. Winter. Sucks.
^^ just heard on radio, felt like sharing :)
 
That's it, with that, I am going to bed
 
0
A: BFS for creating a queue without repetitions and with loops in the graph

Jamal Since you haven't provided a queue implementation, I assume you're using std::queue. If so, make sure you're not using using namespace std and are using std:: where necessary. For this line: for(BaseFilterMap::const_iterator it = m_Filters.begin(); it != m_Filters.end(); it++) It may be more...

2
A: Very simple priority queue

syb0rgLike @Corbin said, there is little that can be done to improve the efficiency of your code. But there are a few things I can do to improve the code quality. You list define a lot of priorities in your header file. #define VERY_HIGH_PRIORITY 4 #define HIGH_PRIORITY 3 #define NORMAL_PRIORITY 2 ...

0
A: Creating a webtrend function to remove duplication using js apply and call

konijnThere is not much you can do, the only thing I would suggest is to use concat instead of push, this way you can keep re-using commonLogs, and maybe have 1 commonLogs per group. So var commonLogs = [ [] ]; commonLogs[1] = ["DCSext.common1","common1"]; commonLogs[2] = commonLogs[1].concat...

'night!
0
A: Handling access to database connection both inside and outside of classes

CeradUse the global keyword to make globals accessible from inside of methods and functions: class KD_sql { public static function get_recipes() { global $dbh; // *** ADD THIS *** $qry = $dbh->query('SELECT * FROM recipes'); $get = $qry->fetchAll(); return $g...

 
Night!
 
3:32 AM
0
A: Efficiently counting '1' bits in the first n bits

syb0rgI'm not sure on how much more efficient this will make your code, but you can add the register keyword to your code to indicate that a variable will be heavily used and that you recommend it be kept in a processor register if possible. register int32 count;

5
A: Model cars as classes

theodoxA couple of things to consider 1) As a style thing, I'd prefer **kwargs to *args in your constructors. This makes things clearer since there's no chance that a change to a base class initializer will invalidate other code in subclasses. Something like @MichaelUrman's example: class Vehicle(obj...

 
Where does @konijn live? stalks profile
 
in the rabbit's hole
 
NYC!
also
 
@lol.upvote Come to Vancouver. Prepare to pay dearly for the privilege of living here, though.
 
-21 overnight here, wind-chill to -33
 
3:33 AM
@200_success : I am planning a trip there early March
weekend trip
what are like the top 3 things to do in March
?
 
Do you ski?
 
Ah, no
but Ms Konijn does
We could do a day of me drinking and her skiing
;)
 
@rolfl -24 C right now.
 
Not much special here in March, then. April would be cherry blossom season. March is just rainy, mostly.
 
@konijn I guess he did downvote me.
Official? The Elder Scrolls Wikia is as far from official as it comes. — Billy Mailman 3 mins ago
Really? Why do you say that? It was more concise than your answer was, and I can verify it is correct from gameplay. — syb0rg 35 secs ago
Some people make the stupidest comments sometimes...
 
3:44 AM
irony is that the OP accepted your answer. lesson learned: don't downvote competing answers for the heck of it.
and now you can vote on the election!
 
@lol.upvote I already did. And I got a nice bronze badge for it!
I can get a silver one later if I go back for the final election.
 
4:41 AM
0
A: Review on PHP Weather class needed

bumperboxThe bulk of your code looks fine, I have made what are (In my opinion) a few usability enhancements, but take it or leave it as you see fit. I don't think you can really make the xml processing any less ugly. Comments are inline <?php /** * Weather class */ class Weather { // lets defi...

 
4:54 AM
good night!
 
Night!
 
 
1 hour later…
6:08 AM
0
Q: How do you use golang's ProbablyPrime?

ShaunMy attempts always return false :( package main import ( "fmt" "math/big" ) func main() { i := new(big.Int) j := i.ProbablyPrime(2) fmt.Println(j) } Can anyone let me know what I am doing wrong?

 
6:39 AM
0
Q: Is this the best way to print dynamic percent value?

MaheshVarmaIs there any better way of printing it? public class PercentPrinter { /** * @param args */ public static void main(String[] args) { for (int i = 0; i < 100; i++) { if (i == 0) System.out.print("percent completed: " + i + " %"); try { Thread.sleep(5...

0
Q: Web Turtle Spiral

cojomojoFor my college prorgamming class I am having to use Web Turtle. I am trying to draw a spiral like this I know you must start with drawing a 36 sided polygon like this SHOWTURTLE REPEAT 36 DRAW 10 RIGHT 10 NEXT But after that I am lost, I tried this: SHOWTURTLE REPEAT 36 DRAW 10 RIGH...

0
Q: Convert looping statement to linq mode

AthulI have a model object class like this public class EventInterestsResponse { public string id { get; set; } public int sortOrder { get; set; } public string name { get; set; } public string categoryName { get; set; } public string categoryId { get; set; } } And I am using i...

 
7:33 AM
0
Q: Given N*N matrix, rotate it by 90 degree to left and right without extra memory

JavaDeveloperLooking for code review, clever optimizations, good coding practices. If question is unclear drop by a comment, I will clarify asap. Unit testing has been a visual inspection and concluded expectations match. public final class RotateNinetyInPlace { private RotateNinetyInPlace() {} pri...

 
7:49 AM
@200_success Nope, I'm innocent. I didn't cause your Pundit. I probably have up-voted some of those comments, but a long time ago :)
 
 
1 hour later…
9:13 AM
A user came back from the dead!
2
A: Streaming pages of a different size than a cache's pages

Simon André ForsbergI like your usage of Guava, and overall your code seems really good. I might actually use it myself somewhere. The code could use some more Javadoc though, especially on the class itself and the constructor. Explaining those callerPageSize and sourcePageSize parameters is very important. Possib...

It finally got accepted!
 
0
Q: Opening JQuery Dialog box onclick of dynamically created linkbuttons

Alwyn MirandaI have created a blog. A specific group member can chat in that blog. Each comment has a dynamically created linkbutton ("edit"->text) Upon clicking on the edit linkbutton, I want a dialog box to pop up. I tried a lot but unable to proceed. Please help. Following is the piece of code on how I a...

 
9:32 AM
Heya :)
It's a pain browsing the web with Safari 4. :X
What are you referring to as a "monkey"?
2
 
@kleinfreund @rolfl is the monkey :)
 
Okay. ;)
 
@200_success It's nice that you vote seriously and critically. I have been wondering myself if maybe it's possible to vote too much?
 
Could be to a certain degree, I guess.
 
9:57 AM
If you guys have some suggestions what may be improved on the Code Review Coomunity site, let me know. Setting up some basics locally (using SASS, minifying CSS and so on)
 
10:12 AM
0
Q: Has A relation ship improvements in the code?

user755806I have below classes. One.java public class One implements Serializable{ private static final long serialVersionUID = 6761261711393553478L; private String name; private String id; //public getters and setters } Two.java public class Two implements Serializable{ private st...

0
Q: Query optimization PHP for string concatination

apfzI have an entity 'RegistrationForm' which has a OneToMany-relationship with 'SurveyAnswer'. An answer can either have a collection of 'FormOptions' (when the answer is of type 'MULTIPLE_CHOICE') or a 'content' represented by a string (type TEXT-FIELD, TEXTAREA etc.). Below is a function insi...

 
 
1 hour later…
11:36 AM
@sim no reversal! :D
 
Cool. :)
If I'm the only chat user starting with a k being online, would @k work?
 
0
Q: C code review: Pi Benchmarking

noobprohackerI wrote the following program to calculate n digits of PI (where n could be anything, like 10M) in order to benchmark the CPU and it works perfectly (without OpenMP): /* * * Simple PI Benchmarking tool * Author: Suyash Srijan * Email: suyashsrijan@outlook.com * * This program calculates how much...

 
11:55 AM
@kleinfreund nope, it always has to be at least three letters
@lol So once again it worked :)
Welcome @VedranŠego
 
Thank you.
 
@lol.upvote You remember that huge interface I had in my code at work where all the methods throws Exception? I don't remember if I told you, but four of the implementations of that interface implements those methods exactly the same!! Abstract class, anyone?
@VedranŠego I see you have a profile on mathematics, I asked a question there a little while ago. Earned me the Tumbleweed badge... (One of my first badges on the site!)
That question still hasn't been answered :/
 
12:51 PM
Heya. :)
 
@SimonAndréForsberg I wrote you a long comment (had to use the answer for that). It's not a definite answer, but a pointer in which way to look. I have to go now. I hope this helps you.
 

« first day (269 days earlier)      last day (3734 days later) »