« first day (263 days earlier)      last day (3763 days later) » 
00:00 - 20:0020:00 - 00:00

12:01 AM
Votes up!
 
@rolfl To be honest, not the pictures, I thought that codereview.stackexchange.com/questions/36438/… proved it was good question.
 
12:28 AM
Now I (hope I) have a better answer to the serial port question.
 
12:44 AM
0
Q: Abstract Factory + Strategy pattern for parsing log files in multiple formats — improvement suggestions?

NickI'm writing a service to parse machine log files as they are written to a central directory and push them to a web service. Each machine generates several log files at a time, with each file encapsulating a particular domain of operational information (e.g. user login sessions, errors, statistics...

 
^ This looks off-topic: a question about a design or design pattern.
 
1:15 AM
I've been on code review for a while but .... If I wanted to ask a "Is my code thread safe?" question is it on topic or off?
 
1:40 AM
Seems like it could be. It could be in the same realm as "is my code secure?", which is on-topic.
 
2:38 AM
0
Q: Next steps to refactor spaghetti code with possible memory leak

TedAt this point I've written a fair amount of code to deal with dynamic line items. I've slowly refactored most of the code into an Order object that's created at page load which contains the methods for various actions within the table. I'm hoping to get some feedback from another set of eyes as ...

0
Q: Simplefying CF-ORM

James MohlerThe criteria section of the code is very similar. Is there a way to do this without having a separate if statement <cfscript> array function getSnapshotStatusType(string mode="Complete") output="false" { if (arguments.mode == "Partial") { return EntityLoad("SnapshotStatustType", {Partia...

 
@JamesKhoury from just was you said it sounds like it would be on-topic.
 
3:22 AM
1
Q: C Code Looks Like Is Could Be Shortened

Dr.PepperI have written some code for one of my assignments. However, i feel that i am repeating myself slightly in a few places and i have that niggling feeling that there is a better way to do things. Here is the code in full: #include <stdio.h> #include <string.h> #define ARR_SIZE 256 int main(void...

 
3:36 AM
Thanks, @rolfl. I'm glad someone else is noticing these invalidating edits. :-) We really should keep educating new users on this. There's no automatic process of detecting such edits.
 
I just happened to be in the right place at the right time.
Probably freaked him out .... I reverted the edit bedfore he placed that comment ;-)
Also, I threw around some of that trusted-user power ;-)
Me ... Monkey, Big Muscles!
 
Trusted users aren't the only ones who can roll back posts. ;-)
 
( ..... beats chest ... )
 
rolls eyes
gives banana
Hey, @Corbin! Looks like you still got a lot of votes on that temperature question. I think it was momentarily a hot question, too.
 
3:52 AM
@Jamal must have been. It surprised me how many votes it got. Still getting them every now and then.
 
If people voted like this more often, we would surely graduate in no time.
And you're almost at 4K! :D
 
4:11 AM
Indeed.... I need to write one more answer at some point today or tomorrow to get 4k :(
Hrmmm, I wonder if there's any new permissions at 4k
 
4:38 AM
0
Q: My constructors not returning "girlName" and "girlAge", instead printing out text?

Shazp public class ConstructorsTest1 { private String girlName; // Private instance variable for objects. private int girlAge; /* Constructor */ public ConstructorsTest1(int age) { } public void setAge(int age) { girlAge = age; } public int getAge(int age){ return girlAge; } ...

 
4:51 AM
Oooooo fun
 
It would be nice to have another answer-deleter here.
 
5:06 AM
@StackExchange Off topic, non-working code.
 
KillCam .....
0
A: Is this an efficient merge sort implementation with regards to average time complexity in Big-O notation?

rolfl Is my below merge sort implementation in O(n log n)? No, while your merge sort appears to be a good implementation of the in-place merge sort, that sort has a complexity of O(n log2n ). While the complexity may look reasonably scalable, the actual surt is quite slow compared to others. Speci...

 
 
2 hours later…
7:37 AM
0
Q: Search an element/item in an n-ary tree

JavaDeveloperSearch an element in a n-ary tree. Looking for good code practices, optimizations etc. If question is ambiguous, let me know and I will reply ASAP. Note - SearchInANAryTree name of class is for personal maintenance reason, so please ignore feedback as that name does not sound good. Also, help m...

0
Q: C code to process student scores from the stdin

sc_rayAs part of learning more C, I wrote this extremely trivial C program that takes Student scores from stdin and upon termination, it prints out the minimum score/maximum score and the average score. Can somebody review my code and tell me how I might be able to improve my code? - Thanks #include <...

 
7:50 AM
0
Q: Need to choose proper name for this class

leonideveloperSorry for my English In my android application I have two types of filters: search filters and sorting filters. I need to read filters from view, display filter on view, save them into and from memory. Also I need to divide filters by their type. Filters in my app represented via: Comparator ...

0
Q: Multi-language website - PHP Class - What is the correct approach?

mattiaI have just starter to use PHP OOP and I would like to write a class to make a multi-language website. I started from this but I wanted to use OOP so I came up with this: Language.php <?php class Language { private $UserLng; private $langSelected; public $lang = array(); pub...

 
 
1 hour later…
9:10 AM
0
Q: How to reduce this RadioGroup Code?

Sharifur RahmanI have 18 RadioGroup. I am declaring the RadioGroup like this way private RadioGroup kn1RadioGroup, kn2RadioGroup, kn4aRadioGroup, kn4bRadioGroup, kn4cRadioGroup, kn4dRadioGroup, kn4eRadioGroup, kn4fRadioGroup, kn4gRadioGroup, kn4hRadioGroup, kn4iRadioGroup,kn4jRadioGroup,ap2aRadioGroup,ap2bRad...

 
Hey, @QuentinPradet!
 
9:47 AM
0
Q: Code Review of xlsx_writer

user765443We have multiple script which write into xlsx with same format in different format or slide variation. I am trying to write api which save time to other program But need input for restructure the file. import openpyxl from xlsxwriter.workbook import Workbook class xlsx_extend(object): """Th...

 
@Jamal Hello! Thought I was alone in my timezone :)
 
10:29 AM
^ This xlsx_writer question is off-topic too: "How to modify existing API+code to implement new functionality?" Although, it's simple enough that someone who knows python might be willing to answer it.
@QuentinPradet I'm in France also: in sunny Normandy. Jamal is supposed to be in Texas (probably 4:30 in morning?). If people sleep for 8 4 hours a night then most of the world is in our timezone.
 
10:49 AM
0
Q: Separate class for Factory versus static method in same class?

Kshitiz SharmaWhen creating a factory what are the advantages and disadvantages of providing a separate class versus static methods in same class? The standard API seems to support both. XMLGregorianCalendar: DatatypeFactory.newInstance().newXMLGregorianCalendar(...) Calendar: Calendar.getInstance(...)

1
Q: I have been assigned to create a little project in C (Library)

Hagbart CelineThe assignment is very open and we have only 4 things it needs to cover: File write and read Use a Struct Export into HTML format use a common sorting algorithm so I've decided to create a little "Library" with following features: read the input file "Library.dat" List the books on the cons...

0
Q: A good way for simplify my jQuery-json method

GilbertOOli'm newbies in jQuery/json and i've build an dynamic toggle system. It work fine but i'm not sure to my code and i wanna a better way to build this ! Could you see my code and give a comments/solution/explanations for an better structure this system please? NOTE : All json files are the same bu...

 
 
1 hour later…
11:59 AM
Anyone knows ColdFusion?
0
A: Simplefying CF-ORM

Simon André ForsbergI have to admit: I don't know ColdFusion. But I do know that there is a "ternary operator" in most languages. According to my google result, this might work: array function getSnapshotStatusType(string mode="Complete") output="false" { return EntityLoad("SnapshotStatustType", (arguments.mode...

 
12:48 PM
Nobody seems to know ColfFusion, maybe it's because there's a lack of questions codereview.stackexchange.com/tags/coldfusion/topusers
 
@ChrisWue is on the list of people who have answered ColdFusion before ... maybe he can step up ;-)
 
@rolfl You just need 7 more up-votes on your Java answers and you will be top Java answerer for all time.
 
Really? I thought there was someone with a gold Java badge?
Oh, that's C++
Palacsint has more Java answers than I have everything answers ;-) although I am only 6 upvotes behind, yes.
@Sim - nice CFusion kill.
@SimonAndréForsberg - nearly a trusted user I see.
 
1:12 PM
yeah, palacsint answered a lot of questions back when nobody voted.
 
0
Q: General Code Review Checklist?

Arun ShanmugamCan anybody provide General Code Review Checklist.. Like Set of Standards, Guidelines, Best Practices etc

 
he stayed motivated and is still the top user for votes!
 
@QuentinPradet - got an obscure question for you (your name came up recently).
 
@rolfl Don't miss this one also:
1
A: How to reduce this RadioGroup Code?

Simon André ForsbergThe easiest way would be to define a constant integer array holding the ids: private static final int[] ids = { R.id.kn1_radio_group, R.id.kn2_radio_group, R.id.pr1_radio_group, /* and so on... */}; And then using the same method as in my answer to your previous question. However, your naming...

 
@QuentinPradet : Your Bounty: codereview.stackexchange.com/users/11227/…
Did you award it and it never got registered as awarded, or did you never award it?
@SimonAndréForsberg - that is my upvote on that answer ;-)
FWIW, I don't believe I can assist your progress to trusted any more than I have ;-)
Answer some more questions!
 
1:17 PM
@rolfl If I recall correctly, the answer came up after the bounty
 
OK, that makes sense.... There is an interesting question/answer set that came up recently, you were inadvertently part of it....
 
@rolfl Bah, that's typical. I have one vote on an answer and that vote is from a monkey...
 
7
Q: SEDE Top Sponsors

lol.upvoteI wanted to see the site's top sponsors - users that have paid bounties on questions that they didn't own. I started off with a bounty-related existing query, selected the details into a subquery, and then grouped by sponsor and ended up with this query, which no longer has anything in common wi...

 
@rolfl do you have a link to that discussion?
thanks :)
 
@rolfl I would love to answer more (and also ask more), but I do have a lot of work to do. And once I get time to answer questions, they are already answered :)
 
1:20 PM
(I actively looked for answerers (on the clojure IRC channel for example), maybe too late for that person to get the bounty)
 
@rolfl Also, I get so sick of looking at the code crap I have to deal with at work, I think there's a limit to how much bad code I can handle :)
 
@Simon, did you see the 'main method' recursive question a few days ago ;-) ?
 
@rolfl I don't think I did, link please!
 
7
Q: Digit to words converter

lukeb28This is one of the longest programs I have made with methods and I think I must be doing this rather inefficiently. Any comments to improve would be appreciated. package numberwords2; import java.awt.Component; import javax.swing.JOptionPane; public class NumberWords2 { static String rawInpu...

 
@SimonAndréForsberg This is why when I have some time I look at the unanswered questions of the Python tag and answer one randomly
 
1:26 PM
^ main(args)
 
Yeah, I hope to have time to answer some random Java/Android questions at some point in time. :)
 
1:50 PM
I think smelly code might be contaigious, when I look at this code at work and see how awful it is I'm starting to write smelly code myself in the project...
 
2:04 PM
Morning!
check this out!
59
A: Draw the Olympic Games logo

Danko DurbićCommodore 64 BASIC Writing directly in the screen and color memory. Output:

 
Goo dmorning
 
Goo morning? lol
 
that can't be good.
 
2:26 PM
0
Q: Configuring Constructor Parameters and Unit Testing

DavidAndroidDevCurrently working on writing out some test for an iOS enterprise application. My concern is in this set up of my overloaded constructor. - (id)init { CRMHttpClient *client = [CRMHttpClient sharedClient]; NSOperationQueue *queue = [NSOperationQueue new]; UIApplication *application = ...

 
@lol.upvote , @Malachi . morning!
@lol.upvote - I figured out your plans ... you vote on everything.... then run out, then you are immune to vote-up requests ... ;-)
2
Oh, and I'll be a fanatic before you're not lol.upvote ;-)
 
@rolfl Oh. My great master plan is unveiled! ..but you did get a rep bump when I spent all these votes!
and 3K in 30 days, shouldn't that be 10K in 100 days? (looks at monkey's profile) ...and wow you're going to do it!!
got 24 unread RSS CR Answers Feed, should I post them here?
0
A: A good way for simplify my jQuery-json method

konijnYou are definitely repeating a ton of code, as far as I can tell the following is true You always set the html $('ul.elements-list') to show either an .A or .B list The amount of elements varies, but it seems to be never more than 3 Optionally if the .A is shown, you might also show a .B list T...

1
A: Multi-language website - PHP Class - What is the correct approach?

MrLoreYou've made a good start, but the switch statement in userLanguage() just doesn't feel right from an Object orientated perspective: A class called Language should represent a single language which is generic enough to fit all cases: however at the moment, whatever language it represents, it has ...

1
A: Reading from a serial port

user2018761So final version, in case someone was interested Thanks for help! main.c int local_socket; int serial_fd; int max_fd; fd_set input; fd_set tmp_input; char *serial_output_buffer; serial_output_buffer=malloc(11 * sizeof(char)); se...

0
A: Class for file creation and directory validation

Quentin PradetIn your specific case, the second snippet shows the best way to go as your code is simplified and makes more sense. Make sure to seperate two if blocks when they're not the same, otherwise they might look like if/else and confuse anyone reading that code (including you in a few days!). if not os...

1
A: Pig Latin Code Kata

JonahExpanding on part of Wayne's post, but taking a more declarative approach which avoids the case statement and makes the high level logic more visible, I came up with this: VOWEL = "[aeiou]" def translate_word(word) restore_capitalization = (word =~ /^[A-Z]/) ? :capitalize : :to_s word.downca...

 
1h 20min until I am finished at work for the day and you say "Morning"? Pfft!
 
1
A: Proper naming for filter classes

rolflYou have presented similar code to this before, and while some of the recommendations I had have been implemented, others have not... ;-) This is fine, presumably you have your reasons, but the one that sticks out is the public void includeInIfNeed(Filters filters) method, which is redundant.... ...

@SimonAndréForsberg you're weird. Not my fault you work on a night shift :p
2
1
A: How to reduce this RadioGroup Code?

Simon André ForsbergThe easiest way would be to define a constant integer array holding the ids: private static final int[] ids = { R.id.kn1_radio_group, R.id.kn2_radio_group, R.id.pr1_radio_group, /* and so on... */}; And then using the same method as in my answer to your previous question. However, your naming...

 
^^ VOTE!
2
 
2:39 PM
4
A: Make it easier with color changing

David HeffernanDeclare a local variable to hold the color: var Color: TColor; Then decide what the color should be: if Temperatura<=15 then Color:=clBlue; else if Temperatura<=18 then Color:=clAqua; else ... Then assign the color to the controls: Form1.Label1.Font.Color:=Color; Form1.Label2.Font.Co...

1
A: Abstract Factory + Strategy pattern for parsing log files in multiple formats — improvement suggestions?

Konrad KokosaFew thoughts about your code: your case resembles more Abstract Factory pattern more than Strategy pattern. ILogFactory is your Abstract Factory while SmithsLogFactory, VividFactory etc are yours Concrete Factories. ISessionLog, ITipLog and IStatisticsLog are Abstract Products and, for example,...

0
A: Searching a 2D matrix for a consecutive sequence

theodoxCombining @rolfls windowing with generators is fairly simple: import itertools def consecutive(group): first, second = itertools.tee(group) second.next() for first, second in itertools.izip(first, second): if second != first + 1: return False return True def iterate_su...

0
A: infix_iterator code

dalleKeep the const char pointers I agree with Lokis proposed changes, except that I would leave delimiter and real_delim as charT const * and change the constructor to: infix_ostream_iterator(ostream_type &s, charT const *d = 0) : os(&s) , delimiter("") , real_delim(d ? d : "") { } That way we...

2
A: Processing student scores from the stdin

YuushiYou should get into the habit of initialising variables whenever possible. It's a little more difficult here, since currentMax, currentMin, and currentEntry may seem not to have a sensible default value. However, all arithmetic values have an upper and a lower bound (these can be found in limits....

3
A: Reading a list of file paths and adding them to a map

CorbinLooks good overall (though I'm by no means a C++ expert). In coming brain-dump though: void argument lists are rare in C++. Yes, in C, int c() and int c(void) are different, but in C++, that's not the case. In C++, int c() is implicitly the same declaration as int c(void). The no-op statem...

3
A: Inputting and displaying strings

200_successWhenever you have a self-contained chunk of code that serves an identifiable purpose, it's a good idea to package it in a function. That's true even if you aren't repeating yourself four times. The fact that all the code appears in quadruplicate makes it even more urgent to define some function...

1
A: Is this an efficient merge sort implementation with regards to average time complexity in Big-O notation?

rolfl Is my below merge sort implementation in O(n log n)? No, while your merge sort appears to be a good implementation of the in-place merge sort, that sort has a complexity of O(n log2n ). While the complexity may look reasonably scalable, the actual surt is quite slow compared to others. Speci...

the rest is from yesterday, that'll be enough for now :)
^^ @rolfl that's my vote here!
(so much for anonymous voting)
 
@rolfl @lol.upvote is a mean mean non-voting voter
0
A: Plain CSS buttons in different sizes

MalachiI took the liberty of adding your code to a Fiddle Here so that we could see what it being displayed and test it in different browsers. I tried to set my Browser to IE 8 and less and apparently it doesn't play nice with JSFiddle. but in IE 9 mode it showed up very nicely, exactly the same as ...

Kill Cam and possible Headshot ^^^^
 
Isn't headshot promoting someone else's answer?
 
0
Q: One-line initialisation for a constant list with all entries except one from another list

JonikI'm looking to simplify the initialisation of the second constant, preferably to just one line. Any ideas? Anything from Guava or JDK (up to 1.6) is ok to use. enum Box { PROMO_HEADER, FREEMIUM, EXTRA_STORIES, TOP_STORIES, TOP_CHARACTERS, TOP_THEMES, TOP_ARTISTS, ...

 
@lol.upvote that would be an assist
@lol.upvote Headshot should be the accepted answer, right?
 
@Malachi you may be right about lol being mean... but his voting far outpaces yours ... ;-) ... you have not even voted today !!! Shocking!
 
2:45 PM
@rolfl what?
I have voted on SO lol
 
Not on CodeReview: See summary at bottom right ....:
Malachi, South Dakota
2.9k 1 7 32
 
and here on an iOS post that came through the First posts Queue
 
Compare with lol.....
 
@Malachi's voting is more balanced. He's got >2x my downvotes, and < 100 votes difference between Q&A's.
But yeah, 40 vs 3 :)
 
this isn't really an answer, but Google will Translate your site into many common languages, you shouldn't waste your time reinventing this. I mean that anyone can navigate to a site in Italian and have Google Translate it for them. if you use Chrome it asks you if you want to translate the site if it detects the site in a language it is able to translate. — Malachi 18 secs ago
 
2:50 PM
.... ahhh .... inspired him to vote now .... when I checked it was empty for 'Day' (Day was not there...').
 
so
when the highlighting fails completely due to an unknown language
 
actually when you posted that I hadn't voted, I had just voted on something right before that. remember i am just waking up, and I was working on an answer the first 30 minutes of my day that I wasn't doing actual work at work
 
@Malachi that works, unless you want to control your translations. Google's are slightly off sometimes.
 
@konijn what do you mean the highlighting?
 
is there a way to give a hint to try a different approach or to stop syntax highlighting ?
 
2:52 PM
try <!-- language: java -->
 
0
Q: ABAP Excel data analyzer

konijnI wrote this code years ago to analyze Excel data coming in from the clipboard. Please review for performance concerns and maintainability concerns. One minor note, from an OO perspective, a class level property is pretty much a global as every method has access, so these are prefixed with G_ ...

@lol.upvote Is there a list with the supported languages ?
 
ok then try <!-- language: abap -->? I believe it's burried somewhere in the markup help.
 
if it is similar to cobol. use the Cobol in the Comment tag
 
2
A: Temperature conversion in C

William MorrisAnother choice is not to write an interactive program but to put the arguments on the command line. Many UNIX utilities take this simpler approach. Here is your program written that way: #include <stdio.h> #include <stdlib.h> static double f_to_c(double fah) { return (fah - 32) * 5 / 9; }...

 
<!-- language: cobol -->
 
2:54 PM
0
A: Recolour a shape

M4rtininumpy and skimage can do this quite fast. Without plotting the intermediate results in there, this runs in about 120ms. Using some random stopsign image found from google: http://www.ecovelo.info/images/stop-sign.jpg Using a formula from wikipedia to calculate color difference: http://en.wikipedi...

0
A: Plain CSS buttons in different sizes

MalachiI took the liberty of adding your code to a Fiddle Here so that we could see what it being displayed and test it in different browsers. I tried to set my Browser to IE 8 and less and apparently it doesn't play nice with JSFiddle. but in IE 9 mode it showed up very nicely, exactly the same as ...

 
cobol does not do it either
 
what does <!-- language: none --> do?
 
you have to wait a little bit sometimes after you make a change for it to show up.
 
even none still colors it wrong
It really does not like comments with single quotes ;)
 
put it in a block quote?
 
2:56 PM
Then I loose the indenting right ? Loss of monospace font etc.
 
hmm. Right.
 
ah! it's <!-- language: lang-none -->
 
nice, thanks
I completed my New Year resolution
an ABAP question on CR
 
0
Q: ABAP Excel data analyzer

konijnI wrote this code years ago to analyze Excel data coming in from the clipboard. Please review for performance concerns and maintainability concerns. One minor note, from an OO perspective, a class level property is pretty much a global as every method has access, so these are prefixed with G_ ...

 
3:08 PM
@konijn nice! I wonder who will review it though.... isn't ABAP some sort of closed-circle?
 
closed circle ;)
I guess, maybe a bit
 
How did you learn ABAP?
 
I took a 3 week course and then lots of cursing and yelling at the clouds
 
0
Q: A better looking 'treeview' - dealing with lots of checkboxes

bozI'm working on the ui for an application which uses a custom ui control that is loosly related to a treeview. This treeview has two levels: Top level which has a number of different geographical regions as well as a 'select all' item Second level which has a number of countries in those geogra...

0
Q: Easy way to handle AcceptMessageSessionAsync and ReceiveAsync - Windows Server ServiceBus

user3220325Attempting to jump into the Windows Server ServiceBus 1.1 code-base along with adopting the new TPL async methods. But I could not find an easy way to just spin up N number of handlers for message sessions (might have 100 or so concurrent sessions). So it would be great to get some feedback on th...

 
The clouds helped?
 
3:10 PM
excuse the ignorance ABAP is what?
 
@apieceoffruit the only way you can tweak SAP :)
(a massive ERP)
(how many more acronyms?)
 
Yah, consider it COBOL++ for ERP's
It has an SDL for SQL which is nice and is very list(table) centric
it runs in a byte code VM since the 80's
 
it appeared very transaction-centric to me when I was trained on SAP some 5 years ago (never actually got to use it)
 
that as well
 
enough so that they name screens "transactions"
 
3:14 PM
Hmm, I work in a bank you'd think I would have heard that acronym before....
 
@konijn an ABAP Question on Code Review was your New Year's Resolution?
 
for CR, yes
I had to find something generic enough to be reviewable
 
I would say that an Abstract Factory pattern also is a Strategy pattern (AbstractFactoryPattern extends StrategyPattern) — Simon André Forsberg 3 hours ago
you would say that wouldn't you @SimonAndréForsberg
 
@apieceoffruit SAP is more for industries, what I've seen of it had concepts of a Plant (/factory), and we had a bunch of ABAP consultants working out a retailer-centric extension, with point-of-sale and distribution channels.
 
a pattern is a pattern is a pattern. they are all the same pattern tweaked a little bit. the "make it work the way I want it to" pattern
I am just Jesting now. not being serious for the moment
 
3:17 PM
oooh, pattern discussion * grabs popcorn *
 
@SimonAndréForsberg can you expand on that comment @Malachi just posted? I don't get it.
 
back to SQL ugh. I will post when I am finished...lol
 
Yeah, I've done ABAP for automatic, aerospace, chemical, pharmaceutical, consumer goods and heavy industry
 
@konijn that explains the trip to Montreal - Bombardier Aeronautics?
 
Actually Pratt & Whitney
they make engine for Bombardier
*engines
 
3:20 PM
I have always thought that the patterns show up when you are half way finished writing the application, that's when you can see the patterns show up. if they were meant to be used to build the structure itself, they would be called templates and not patterns. imo
but I rattle on about something that I know only a little about.
 
@Malachi depends. Sometimes it's anti-patterns that emerge. Want to look at the shit code I'm dealing with?
 
no one likes my HTML/CSS answer????
@lol.upvote maybe later. I really need to work on this SQL
 
@Malachi I'm kidding!
 
I have to replace all the different Felony codes with "F" so they get grouped together
I can't get my replace to work right....
 
I know! Use a regex!
(kidding)
 
3:22 PM
now you've got two problems
2
:)
 
@lol.upvote the way this is looking I am seriously thinking about it. except for I don't know how I would do it in SQL
 
DON'T!!
 
I think I figured it out I was missing a '('
 
Actually, you could compile a C# assembly that you import into SQL Server and perform your regex through CLR/SQL.
 
this report is a big PITA, I haven't been sitting right for better part of a year at least
 
3:25 PM
I'll +1 tonight, I like how you say Terminate every tag.
 
I might make an addition to my name. "Malachi.The.Terminator" JK!!!
 
I'd prefer @lol.starred...
then I wonder who @lol would ping...
 
@lol.upvote wait until you see this SQL Query
we could be the "lol" gang
 
Yay! Let's make t-shirts!
 
we will do this by star
lol.star
lol.starred
 
3:28 PM
lol
FYI, I'm reverting to @retailcoder as soon as I can
 
oh no I removed too many comments it triggered lol.edit
 
Hi @Jamal
 
Hey!
 
everybody behave now
 
why would you go back. let's be the lol.Gang
 
3:30 PM
Someone may inform this new user on how we review code here:
0
A: Fade in and fade out in pure javascript

taztodgmailI used OPACITY to make it show/hide. See this Example, Full code (without jQuery): <a href="javascript:ShowDiv('MyMesage');"> Click here</a> <div id="MyMesage" style="display:none;opacity:0; background-color:pink; margin:0 0 0 100px;width:200px;"> blablabla </div> <script> function ShowDiv(nam...

 
Oh. I need another coffee before I can write a comment that says that, without sounding like I eat noobs for breakfast.
brb
@Jamal you're so diplomatic :)
 
Eh, I figure it's better than just deleting it right away.
@lol.upvote: That question may also be protected.
 
3:46 PM
done
 
Now let's see if that answer will get improved.
 
I am not sure how much more comment can be given
he used opacity, what more do you want
( kidding )
 
0
A: Educational "Library" project

JacksonYou don't need the two definitions of book: typedef struct {..} book ; struct book {..} ; What I would normally do is: typedef struct Book { ... } Book ; This allows you to write either: struct Book b1 ; Book b1 ; and in both cases get a Book structure. it also means i can refer to a Boo...

0
A: Temperature conversion in C

snetchAlong with what everyone else said, I also notice you have added .0 to the numbers in one function but not in the other. Should probably add it to both.

^^ NAA
2
A: One-line initialisation for a constant list with all entries except one from another list

XaerxessUse EnumSet for that. From docs: A specialized Set implementation for use with enum types. (...) The iterator returned by the iterator method traverses the elements in their natural order (the order in which the enum constants are declared). It's also very efficent: Implementation note:...

1
A: Fade in and fade out in pure javascript

taztodgmailI used OPACITY to make it show/hide. See this example, full code (without jQuery): <a href="javascript:ShowDiv('MyMesage');"> Click here</a> <div id="MyMesage" style="display:none; background-color:pink; margin:0 0 0 100px;width:200px;"> blablabla </div> <script> function ShowDiv(name){ //...

0
A: Helper function to solve Project Euler question 26

Gareth ReesI'm just going to comment on your gcd function. The docstring mixes up the function's interface ("computes gcd of a, b") with its implementation ("using Euclidean algorithm"). It's best to restrict the docstring to the interface (which is what the user needs to know); if you also need to docume...

 
so no one is in for the lol.gang?
that makes Malachi a Sad Panda lol
 
0
A: Temperature conversion in C

snetchAlong with what everyone else said, I also notice you have added .0 to the numbers in one function but not in the other. Should probably add it to both.

 
3:56 PM
^^ flagged NAA
 
Should be a comment right ?
 
IMO, yeah
 
dont you have superpowser to convert this to a comment ?
 
me? nope.
my flagged was deemed invalid? why?
 
@lol.upvote I flagged it as not an answer too.
I saw the invalid flags but i was like "what?"
 
4:00 PM
it's still showing as "active" in my flagging history though
no harm done.. yet :|
 
the invalid flag might be for the VLQ flag that was automagically generated, and someone said no, and flagged it as something else
 
on my way to [badge:deputy]
 
how many you have left? it's to 100 right?
 
got 61/80
 
70/82 if I think the same way you do
 
4:03 PM
/82?
 
82 moderator attention flags
1 waiting for review
70 deemed helpful
3 declined
8 disputed

2 posts marked spam
2 deemed helpful

3 comments flagged
3 deemed helpful
 
60 moderator attention flags
1 waiting for review
53 deemed helpful
1 declined
5 disputed

2 posts marked spam
2 deemed helpful

6 comments flagged
6 deemed helpful
@Malachi takes 80 helpful flags for [badge:deputy] - you're almost there!
 
@lol.upvote so I have 5 more to go then?
check this one out
Get size of Google Maps searched area [closed]
asked Oct 1 '13 at 12:16 by Juann Strauss
maybe Migrate to StackOverflow, they are asking how do I find the Area of a location. not really a Review type question. – Malachi Oct 1 '13 at 14:09 declined - please vote on questions, don't just flag them.
 
interesting. did you downvote the post?
 
i think I did after that. I figured what is the use. I didn't have close votes at that time
it's a deleted post now btw
 
4:07 PM
yeah, saw that
 
4:18 PM
0
Q: Turn-based game setting properties for playcards

deLunaI am programming with Java (server side) and JavaScript a card game and I do not know how to give properties (on server side) to every card that I create. For a match I need 20 different cards from a complete set of cards (52). Now I want that these 20 cards get a value (Ace, 2, 3, 4, 5, 6, 7, 8,...

0
Q: Ruby - Is there any ways to improve my code and syntax?

CoconutDundeeNew to ruby here. I just made a script that print some metrics from a windows machine about its disk. The script works fine and as I wanted it to. Now, since I'm new to the ruby and programming world, I'd like to ask you if anyone could help me to make to code look better or if there's other more...

 
4:42 PM
0
Q: k&r exercise 4-12

Ionut Grt."Adapt the ideas of printd to write recursive version of itoa; that is, convert integer into a string by calling a recursive routine" Here is the implementation of printd: void printd(int n) { if(n < 0) putchar('-'); if(n / 10) printd(n / 10); putchar(n % 10 + '0')l ...

 
5:33 PM
0
Q: Review of a state machine alike method

Bruno CostaI am concerned about readability of the method GetContent as well of the whole class HtmlViewResult, so I am submitting those to review. This was the first approach that occurred in my head and it turned out to be alike a state machine algorithm. public interface IViewContext { object GetCon...

 
@rolfl I haven't forgotten about your answer to my last question. I just haven't gotten back to it yet.
0
Q: Can you replace a REPLACE statement, or 9?

MalachiI would really like something to replace all of these REPLACE Statements. SELECT DISTINCT CAH.CaseNbr , REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( (SELECT table1.Degree FROM SDUJS.dbo.fnWorstDegreeCharge(CB.CaseID) AS table1), 'F1', 'F')...

 
0
Q: Can you replace a REPLACE statement, or 9?

MalachiI would really like something to replace all of these REPLACE Statements. SELECT DISTINCT CAH.CaseNbr , REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( (SELECT table1.Degree FROM SDUJS.dbo.fnWorstDegreeCharge(CB.CaseID) AS table1), 'F1', 'F')...

0
Q: Flow control with try catch to reduce redundancy

user2759427I've seen a similar question to this but mine's a little more specific. I have the below File f = new File("./data.txt"); if(f.isFile()) { try { FileChannel fc = new RandomAccessFile(f,"r").getChannel(); //Get information and return it } catch(FileNotFoundExceptio...

 
6:01 PM
0
A: Turn-based game setting properties for playcards

rolflCan't help but think that a trick with integer division and clever Card enum setup would help a lot: this.symbol = Card.values()[(id - 1) / 13]; Replace all your code with the above 1-liner ;-)

@rolfl I can't help but be tempted to flag as NAA ^^
 
Sure, be tempted.... ;-)
 
0
A: Turn-based game setting properties for playcards

Simon André ForsbergAre you aware that in your current code, you will have the values 1 2 3 4 5 6 7 8 9 10 11 12 0? This feels weird. If Ace is 1 then 0 is king I assume? But using 0 as king does not make sense. Even though @rolfl provides a way to do this, I just want to object to one thing: The use of the id para...

 
I completed that answer, and only afterwards realized that the code was Javascript, not Java....).
 
@lol.upvote I've updated that answer a bit. Please feel free to vote :)
 
when I have ammo, sure! nice answer BTW
 
6:08 PM
@lol.upvote Thank you thank you :)
 
0
Q: Creating game cards

EltonI want to DRY these two functions as the code seems very similar. function createCards() { chancecards = { chance1: { title: "Advance to go", type: "move", newposition: 40 }, chance2: { title: "Advance to London", ...

 
I'm almost out of votes again. Figures.
 
It seems like it's more and more time for me to share my super-flexible-Card-classes in Java... There's been a lot of card-related questions on CodeReview lately.
 
0
Q: Which of these two functions is more idiomatic?

Domenico De FeliceI am new to Clojure and functional programming. I am writing a function to filter a "dictionary" by the "subject" of its definitions. The dictionary data structure is a hash-map of this kind: { "word1" {:foo :bar :definitions [{:definition "def1" :subject ["Subject1" "Subject2"]} ...

 
@SimonAndréForsberg yeah, post that for review!
 
6:24 PM
@lol.upvote Planning on doing so... sometime... :) The most important package contains currently 8 classes and 623 lines of code.
@lol.upvote By the way, I've realized that the project at work doesn't even use singleton-pattern. I believe the code breaks every - single - principle - there - is
 
I have public mutable fields, you beat that?
 
@Jamal : Did votes get rolled back, did you get the mortarboard ?
 
Or, perhaps the code tries to invent new principles such as "Ask, don't tell", "Several Responsibility Principle", "Liskov Spaghetti Principle"...
@lol.upvote Pfft. Easily. I think. I'll have to get back to you tomorrow. I'll see what I can find.
 
@konijn: Fortunately enough, it didn't trigger the script, and I did get the badge.
 
I like the Spaghetti Principle.
@Jamal the badge wouldn't have been reversed anyway ...I think
 
6:31 PM
Right. But even then, a reversal could've been suspected. Either way, I don't intend on doing that much answer-pimping again. Plus, as a moderator, I should be looking for suspicious voting patterns, along with the script.
 
0
Q: Strip all non-printable ASCII characters

TimtechYour challenge, should you be coded to accept it, runs as follows: You may choose one of the following two challenges to implement: Challenge #1 Read from a file a.txt Write only printable ASCII characters (values 32-126) to a file b.txt Challenge #2 With a file a.txt, delete all characte...

 
@lol.upvote I think "Ask, don't tell" is my favorite.
 
@Timtech hey this is CR not CG
 
@Malachi But CG chat is dead :(
I finished my BF interpreter in TI-BASIC btw
 
@Timtech: Won't that question self-destruct in 5 seconds?
2
 
6:33 PM
@Malachi The question was posted on CG :)
 
@Jamal Hm?
 
Wasn't that a Mission: Impossible reference?
 
Uh. Nyes
 
not even mission impossible. inspector gadget
 
@Jamal could be Inspector Gadget, too.
@Malachi jinx!!
 
6:35 PM
or any other spy movie since the beginning of Television special effects
 
So Gimme-Dah-codez
I'd rather ask questions on CG than So
Because I'm more likely to get a response :)
 
Go go gadget getfreecodez?
3
 
Or 100 responses
Yeah I need to get-da-free-codez
So I gtg get-me-some-codez
Bye
 
Bye!
 
bye!
I think this is an answer but not a very good one. It does point out something that can be improved in the code. Good quality answers tend to be a bit longer than just a couple of lines though. This could have been a comment as well. — Simon André Forsberg 53 mins ago
@SimonAndréForsberg so you're the one invalidating my flags!
 
6:38 PM
@lol.upvote This time, yes. Normally? No.
Besides, two others had already flagged as invalid
 
I have the flag history in front of me, and Simon is correct (two others flagged as invalid). Moreover, I may let another mod make a decision.
 
I think it's a comment.
0
A: Turn-based game setting properties for playcards

Simon André ForsbergSlight improvements of your current code Get rid of the comments and read three lines below which symbol you are currently declaring the conditions for. Your code is very self-documenting, no need to add comments. You should know that there is a more than or equal to operator, which can be used...

 
Hm. Malachi does have a good point. Okay, I may make a decision.
 
it's not an answer, doesn't explain why should do both. maybe they don't want that Decimal place in the second function. seems more like pointing out a typo than an answer — Malachi 1 min ago
for reference
 
Thanks Zombie! I appreciate the moral support :)
 
6:43 PM
it's 6 to 4 that it's not an answer right now
 
Those Java people get all mixed up with Javadoc and inline comments, they can't always tell an answer from a comment... </poke>
2
 
I have to say I was on the fence on that one
 
Ah, so you all can see those flags. Apparently I haven't been using the 2K mod tools long enough...
 
so really 5.5 to 4
 
more substantial "answers" have been converted to comments before, I don't see the big deal with that one.
 
6:45 PM
you have to read between the lines
 
Oh... I only see whitespace between the lines o.O
 
Okay, I'll delete it and leave a comment. This can always be reversed anyway.
 
0
Q: Partial octree implementation

user54037I am just now learning Scala a bit on my own time. I wrote some code that works, but was wondering if you could eyeball it to see if its structure can be improved. It is a partial octree implementation. class octree(min_x:Double, min_y:Double, min_z:Double, ...

 
@lol.upvote I see the matrix. but half the time it is in Brainfuck
 
Done.
 
6:49 PM
@Malachi oh... and the other half?
 
@lol.upvote Drunken British English, or Drunken Irish-accented English, or Python
2
 
@Jamal see? The other comment is even longer!
 
True. I also hadn't noticed it before.
 
0
Q: permutation with BigInteger

kruthikaPermutation with BigInteger works fine upto 4 digits (3456 P 1234) when i give 5 digit input to n and r, it is not working. ` public class cvic { public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.print("Enter n and r: "); BigIntege...

 
@lol.upvote what are you talking about now?
 
6:54 PM
And the above is off-topic.
(but at least the title is decent)
 
@Malachi there's another comment on the question, it's longer than the answer that was just converted :)
Welcome to CR! Unfortunately Code Review isn't for fixing issues with your code. That would be Stack Overflow's job :) Please see our help center. If you do post to SO, please do define "not working" better; they like their bugs clear! — lol.upvote 9 secs ago
@Jamal ^^ can you tell I haven't had my 2nd coffee?
 
I think so, because you "implied" that they like bugs (everyone hates bugs). Or did that go over my head? I think I may need the monkey's help with this one.
 
Isn't SO about fixing code issues? AKA "bugs"
 
Yes, I know. Just over-evaluating it I guess. :-P
 
7:27 PM
More monkey-we-know -like answer:
0
A: Flow control with try catch to reduce redundancy

rolflIn cases like this, I like taking a default-unless-better approach... Consider this re-working of your code to do the same thing in a different order. The basic premise is: set up a default value (or null if it is a complicated thing to do). do the hard work which may be missing dependencies o...

0
A: Flow control with try catch to reduce redundancy

VoiceOfUnreasonMy usual pattern here is to set the default values first, then replace the defaults with the expected values in the happy path. int resultA = DEFAULT_FOR_A; String resultB = DEFAULT_FOR_B; File f = new File("./data.txt"); if(f.isFile()) { try { FileChannel fc = new RandomAcce...

 
Would love to hear your thoughts on this one:
0
Q: What does it take to make code your own?

Simon André ForsbergThis question is meant as a general question, but it is also specifically about this specific question: Original factorial method in Java It is known that only your own written code are on-topic on this site. However, as programming sometimes is to take some pieces of code from different places ...

 
7:49 PM
3
Q: What does it take to make code your own?

Simon André ForsbergThis question is meant as a general question, but it is also specifically about this specific question: Original factorial method in Java It is known that only your own written code are on-topic on this site. However, as programming sometimes is to take some pieces of code from different places ...

 
@StackExchange Duuuh. But thanks for telling me that there's 3 up-votes on it.
 
StackExchange: "I just want to fit in!!! D:"
 
0
A: Filtering a dictionary by subject of definitions

ShlomiHere is another way of implementing your subject filter: (defn subject-filter [p m] (filter (fn[[k {v :definitions}]] (some (fn [{x :subject}] ((into #{} x) p)) v)) m)) This implementation makes use of two important features: Destructuring - an idio...

1
A: Dynamic toggle system

konijnYou are definitely repeating a ton of code, as far as I can tell the following is true You always set the html $('ul.elements-list') to show either an .A or .B list The amount of elements varies, but it seems to be never more than 3 Optionally if the .A is shown, you might also show a .B list T...

@StackExchange if you did your job, I wouldn't have to be doing this...
2
 
00:00 - 20:0020:00 - 00:00

« first day (263 days earlier)      last day (3763 days later) »