« first day (220 days earlier)      last day (3961 days later) » 
00:00 - 18:0018:00 - 00:00

12:07 AM
Who is closing codereview.stackexchange.com/q/36978 as a duplicate? There is an element of OOP design in this question that is not in the other.
12:20 AM
I was hesitant on that dupe, too.
Well, lack of a dupe. I just like using the word dupe. :-)
hrmmm, you're right. upon closer rereading, i wish i could retract my close vote. i hope it doesn't get a fifth vote. it's a lot more focused and has a specific context compared to the other one. and some of the answers bring up really good points specific to a drawing system
That Jake King question has an answer with score 134.... That, in itself, is staggering (like there are that many people active on CR....), but, that single answer is 91.5% of the answerer's (cwan) rep.
@rolfl: As that is about example code, which is not entirely on-topic, I'm temped to historical lock it. Plus, I've heard somewhere that questions with lots of answers probably don't need additional ones (also why I've protected it in the meantime).
And, interestingly, the asker has almost all his rep from two questions and not from answers....
@Corbin - you can withdraw your vote.
wait... that's a thing? i can?
oh wow i can
12:31 AM
@Corbin Yep. But then you can't vote to close the question again.
yeah, so i saw. interesting
is that a new thing, or am i just oblivious?
@Corbin - you're oblivious.
ah. damn.
I believe it was implemented some time ago. I'm too lazy to find that MSO post.
@Corbin I had to go looking for it too the first time I wanted to retract my close vote.
12:32 AM
677
Q: Can we have the ability to retract a close vote before it closes?

cletusSometimes you vote to close something and the OP then changes it to fix the issue or issues. You can't take a close vote back though. It would be nice if you could. With the new Duplicate close changes and the review queues, it's even more important to be able to remove accidental or erroneous...

2009.
That sure is a lot of votes...
it was changed to status-completed in july 2013 though, so im not too oblivious... just 5 months. so i am kind of oblivious.... lol
lol
For once, the monkey was not entirely right (and certainly not lazy like I am).
@Jamal Historical lock seconded.
@200_success: Then it shall be done. Hopefully this may put some stop to future questions of a related nature.
And if any further edits are needed, they'll need to be flagged. Mods can still edit locked posts.
12:40 AM
@Jamal I also agree with the lock, if my vote counts for anything.
I'd say it counts! At least as long as you have a general idea of why it no longer belongs. The technicalities of locking are more mod-oriented, but a historical lock basically tells others that such questions are no longer on-topic but contain valuable contributions.
@Jamal The community saw it was valuable information because of the massive amounts of upvotes on the question. However, I would not consider it fully on-topic for this site.
If the community in the future disagrees, then they can say so on the meta site.
Right. The lock also puts the "debate" at an end. I'm also going back and locking other highly-received questions of this type.
I think that might need re-examining next. Maybe it should be abolished since everything we do here is about best practices. Alternatively, if it is a code-word for something ("this question has very little code"), then maybe the tag wiki should contain an admonition to include enough context in the question so that reviewers can give tailored advice.
That's 474 questions, though!
Not to mention we're still discussing . :/
@200_success I think if it was a code word, then the tag should be changed to reflect that. Otherwise we would need people constantly changing the improper tags to the correct tags due to inexperienced users not knowing better.
[help/on-topic] says: However, if your question is not about a particular piece of code and instead is a generally applicable question about …

Best practices in general (that is, it's okay to ask "Does this code follow common best practices?", but not "What is the best practice regarding X?")
… then your question is off-topic for this site.
@200_success: If the community at large decides to do away with this, then we will need to contact SE. First, this would have to be approved by the other mods. I cannot make such a big decision on my own. Once the burnination takes place, it cannot be reversed.
For now, I suppose we can make it a "trap tag" like on SO.
@Jamal "Trap tag"?
12:54 AM
@syb0rg: Example:
16
Q: burninate request: [engineering]

ShaiStackoverflow engineering seems to be un-informative. Not too many questions are tagged with this tag and it does not seem to convey any information about the question itself. Moreover, its usage alongside reverse for reverse engineering is an abuse of reverse tag. I'm a bit new to this burni...

Basically, such tags are considered off-topic, and any question that fits with such tag are also off-topic.
Here's an even better one:
14
Q: The [guidance] tag needs to be guided to destruction

Charlesguidance has 47 questions. They are almost universally opinion-based and thus off-topic and closable. Some can be saved through editing, but those are the minority. Your task, should you choose to accept it: Vote to close questions that should be closed. Improve questions that don't need to ...

@Jamal During the cooling-off period for meta.codereview.stackexchange.com/q/1048/9357 we have had at least one refactoring answer: codereview.stackexchange.com/a/36659/9357.
But you could still argue that it's up to the reviewer to decide whether to refactor, and that it's not the asker's right to request it via a tag.
True.
@200_success I was about to suggest that.... on the other hand, there could also be questions like: This is my code, it worked, and then I refactored it, and it now looks like this... is this a good result?
@rolfl Good point. But does that necessarily need a tag?
I tend to give the benefit of the doubt... and, if the tag description said it was appropriate for a set of conditions, I would say 'yes'.
1:01 AM
In retailcoder's post, it appears that things such as readability and performance are states. Refactoring just leads to those things. You can as a question like Does this code perform well?, but not Was this code refactored well?
Currently the refactoring wiki saus:
> Use this tag when you're looking for ways to rewrite parts of your code into better, cleaner code
If, instead it says:
> Use this tag if you have refactored your code and you want the results reviewed.
That's a good point. The wiki can ways be revised to not suggest a request for new code to be written. Instead, it can be done if the code just needs major cleaning.
I agree that requesting refactoring is almost as bad as requesting code.... but, requesting that some refactored code is reviewed is fine
Right. So before we take this to SE, we first need to determine if the wiki can be edited. If that can be done, then we can go back and close any questions that no longer fit the new wiki.
A lot of requests are actually better as .
Could a synonym be in order?
1:13 AM
Tough to say. Although this isn't done on SO, it could still be different here. We would have to really determine that these two are very much similar.
potentially... I have looked through and of the dozen or so questions I looked at, they all were asking for code refactoring advice, not requests for review. Essentially off-topic.
For now, we can clean up the latter tag.
Given that I think there is one good reason for a refactor-like tag, I don't think it should disappear..... but some tidy-up would be helpful.
@rolfl Can you point to specific examples? Asking for refactoring advice is on-topic, as long as there is existing working code.
2
Q: Ruby: check if email address contains one of many domains from a table, ignoring the subdomain

christianI'm trying to validate email addresses as being from certain universities. I have a table, 'University', which is full of university domains. University email addresses often have different subdomains, and I want to be able to tolerate any subdomain under the domains in my table. I think the fol...

So, that's an interesting one because it is basically asking - my code sucks, make it better.
1:17 AM
Yup, look at the answers...
He does not want a review, he wants code
Even though his code is working ....
Wanting code is still off-topic, though.
I am not suggesting this is a black/white issue, it is very grey, a fuzzy grey.
I still don't like the answers, though. Those are the kind one would expect on SO.
codereview.stackexchange.com/q/25814/9357 may be bad code, but there is no particular code smell. Therefore, it's just using "refactor" carelessly as a buzz-word.
1:22 AM
I'm also tempted to improve to ask for a review instead of a refactor. That would, however, invalidate the accepted answer (and go figure that that is the one that got accepted).
@Jamal That's a good argument for encouraging askers to identify the code smell that concerns them, and discouraging requests to refactor.
So, what should we do now? Revise the tag wiki and gradually review the tag?
@Jamal I think there are higher priority things to work on at the moment.
I'm leaning towards a synonym to , but I'm not sure what transition plan there should be, if any. I think I'll propose that on @retailcoder's Meta question. Not now, though — I gotta go.
@rolfl: I know. This can be done passively.
1:33 AM
@Jamal - and then you get this:
0
A: Is it better to put more logic in a for loop condition, or to use a while loop?

user33239All things aside, I believe that these two pieces of code function differently. The first is predecrement, the second is post. I would agree that for loops make this specific application more obfuscated (not by much, but it is certainly less clear). I recommend using for loops primarily for iter...

I think that question should be protected .... perhaps i can wield my new powers.
It's your call. :-)
No, this is a side-effect of your 'cleanup' habits....
you go through, edit some tags, fix a title, suddently the question is active...
200_Success picks up an answer on it (also edits the question), and then 2 additional answes come through from 'noobs'.
Suddenly a 'dead' question is very much alove.
s/alove/alive/
The risk of doing 'clean-up' is that it attracts flies to the stirred up sh1t .... (not calling 200_Success a fly...).
2
True, and that's why I've protected/locked the bigger ones. At least that answer is not a non-answer, but yeah, protection is still good.
It could still be a bad answer (I haven't fully read it yet), in which case it can be voted on.
It was a crappy question, but all of the previous answers were crappy too. That's why I wrote an answer.
@rolfl Please protect the question. Congrats on your 3.5k.
@200_success as it happens, I am seeing bugs in the best answers too..
1:43 AM
What's a good way to whore 2 points? 5998 is such a dissatisfying number.
2
@rolfl: I do see your point about the cleaning thing. If we do it enough for the refactoring questions, then it may attract more answers like these. But that doesn't mean protection is needed for each one.
@200_success Get me to read your top answer and upvote it.
Oh wait. Just did that.
@200_success: Give me a good C++ answer that I haven't seen before.
@200_success I do prefer your answer on that question ... welcome to 6K
(heh, I say that as if I am there already).
In that question that was just protected, should that deleted 9-vote answer be undeleted? The other is a dupe, however.
1:48 AM
Do you guys ever have something that you are programming that should work, but doesn't for some strange reason (despite walking through the code line by line)?
Cause that's happening to me right now.
Kinda random haha sorry.
@Jamal why was it deleted in the first place ... what did 'community' do 5 hours ago?
@rolfl: I think that was a result of migration, when Community locks an answer.
Accordingly, only a mod can reverse that.
I am so confused by people's activity. That person with the deleted post... here's his activity:
So, he does not visit since June.
He comes back 8 hours ago, edits a post.
3 hours later the 'community' mysteriously deletes a +9 answer he gave 8 months ago.
2 hours after that he visits the site (wondering where his rep went all of a sudden, I guess).
Something is fishy here.
2
my guess is that his answer was in one of the language-agnostic questions deleted earlier. that guess is based on 0 effort to look into it though.....
I'm tempted to undelete the 9-vote answer since it was deleted by Community.
2:03 AM
I would agree.
Done.
i would love to know what triggered automatic deletion. strange
Funny story: People on my work systems have asked me why I am putting asterisks around my words.
2
@Corbin: It looks like it's a result of migration, but I'm not entirely sure what else happened. That's usually done with a rejected migration.
0
Q: Linear Peano multiplication in Scheme?

ricardoI've been running through The Little Schemer, and have hit the example of Peano multiplication. The solution is given in TLS (reproduced below) -- however what interests me is the order of the algorithm. (define mX (lambda (n m) (cond ((zero? m) 0) (else (+ n (mX n (1...

2:08 AM
ah :)
@Jamal - migration was done in march, delete happened 5 hours ago.
Oh yeah. Not sure, then. I'd ask Community if I could speak in binary.
3:05 AM
@Jamal - I just had this come up on my Review First Posts
4
Q: Review of "Menu program"

RNI2013Can anyone review my program and state where I could improve it, even in terms of comments, validation, etc? package assessed_practical_2; //Importing Resources (Random) import java.util.Random; //Importing Resources (Scanner) import java.util.Scanner; public class Assignment2 { /** ...

Odd, that was asked last month.
Weird...
Sorry, did not mean to drag you away from your stats... go back and learn your heads and tails.
The chance of getting heads is 1/3... right?
Three sides: heads, tails, and Jon Skeet.
3:23 AM
heads I win, tails you lose?
And Jon Skeet always wins.
But seriously, many of the later topics make little sense to me. And too many homework questions just make me tense up with intimidation.
Jamal, have a look at: ekisto.sq.ro and then type in userid: 22656
That comes from:
Hey, mine is not the shortest! :D
2
That's what she said!
I was just about to say that...
Oh how I wish I could star my own messages.
3:32 AM
There, done for you.
Haha. Let's see how that's received without context.
lol
hi guys
How long were you listening?!? :-P
Hi!
well I started at the top of the page (it's a trap) and starred funnies as I got to the bottom
10 minutes?
@Jamal I can pin it if you want :p
(vacuum cleaner engine revving)
If it brings in laughs, then so be it. Let's not fill the room with d*** jokes, though.
3:43 AM
Aww, now my pinned statement isn't at the top...
@syb0rg that one's going to stay there for a while ;)
@retailcoder Well, I am visiting more frequently now.
@syb0rg it's an inspiration!
0
A: Proposals for Weekly Challenge topics

retailcoderweekend-challenge #3 Sink a Ship Everyone has played Battleship. Let's implement the logic that sinks one. Ship has multiple "hit points" located at contiguous (x,y) coordinates, horizontally or vertically. Ship is sunken when all "hit points" are hit.

Hi @JamesKhoury!
(check out the starred posts - don't spill your coffee!)
@JamesKhoury If you really want to, you could click the star next to my statement. Then you can dance in glee as the number changes from 6 to 7!
3:56 AM
user image
5
I think I need more coffee
6
either that or you've all cracked ;)
^^ (read that too fast, thought you said "either that or you're all on crack")
2
@JamesKhoury So, I starred one of your messages. The way it is around here, that means you have to star one of mine. :P
Star mine, I'll star yours
That's a possibility too but I went for the more likely thought
3:58 AM
(not really, I just want you to star that pinned message of mine)
(dancing in glee)
YAY!!!
(gone to get more coffee)
@retailcoder Do you have a Raspberry Pi?
@syb0rg I like apple pi more. With a blimpse of cinnamon.
2
(nope)
4:04 AM
@retailcoder Haha
Dang it.
@syb0rg What's that anyway? (clueless .net coder)
@retailcoder now you are in for it!
www.lmgtfy.com/?q=raspberry+pi
@rolfl Lol
4:07 AM
@JamesKhoury Do you have one?
(yeah, got two!)
Nah I haven't had the time for these kind of hobbies :(
@retailcoder - that is a full Linux computer.
@retailcoder It's amazing.
That's what it is.
4:08 AM
I was looking at getting a few ninja blocks to play with
@Jamal - see, great things come in small packages.
ninjablocks.com
@rolfl: Takes one to know one. Wait...
@JamesKhoury I avoid sites that have flashy home-pages.
@JamesKhoury There is a Raspberry Pi in the Kickstarter video.
4:13 AM
Eww... they changed their homepage. Dosen't even load through my work filter.
3
@rolfl: You don't like being the millionth visitor and the winner of a cash prize? Your loss.
^^ refactoring in progress.
4:32 AM
Can anyone suggest CR challenges? I was thinking Towers of Hanoi or Conway's Game of life (or some other such logic puzzle ... thingy)
Sure, just add your suggestion as an answer to the Meta question:
12
Q: CR Weekend Challenge

retailcoderThose of you that weren't following what's going on in the chat room might have been taken by surprise by a recent avalanche of Rock Paper Scissors Lizard Spock posts. This is how it started: OK, weekend challenge.... we all solve the Rock Paper Scissors Lizzard Spock problem with our 'favou...

@JamesKhoury Actually, add them HERE:
4
Q: Proposals for Weekly Challenge topics

Simon André ForsbergTo decide which subjects we should cover in the Code Review Weekend Challenges I am creating this meta-question. Propose one challenge per answer. The answer with the most up-votes each week gets chosen as the weekend challenge. (Answers containing already finished challenges is disregarded in c...

@JamesKhoury start your post with [tag:weekend-challenge] #3
0
A: Proposals for Weekly Challenge topics

James Khouryweekend-challenge #3 I was hoping to see a Math/Logic Puzzle of some sort. Towers of Hanoi: Towers Of Hanoi is fairly simple and there are many solutions out there. But it seems we all have our own way of solving it. Conway's Game of Life: aka Life is much more complex and might take too long ...

Yay! 2nd post proposal for #3 :)
should the sudoku proposal be re-proposed for week 3?
4:44 AM
@JamesKhoury I would actually have separated those ideas you had in your posts into two different answers.
So one answer was the game of life, and the other would be the towers
That way, people can more easily vote on what they want to do for the weekend challenge
@syb0rg good point ... and fixed!
@All , I rolled the sudoku to week 3.
What are we going to do with the old past challenges?
@JamesKhoury that's exactly the reason why I suggested @Simon to make one meta-post per challenge. The re-submission of an idea would require another post, otherwise @rolfl's idea has a headstart.
Delete them?
Or keep them in an archive of past challenges?
4:47 AM
Has anyone ever written Conways Game of Life before? I have never done it myself and that surprises me.
I have, but that was last century ... do it again?
@JamesKhoury I haven't. Not even sure I know the game.
@retailcoder Thats ok because an edit will let people change their mind
pascal ftw
@JamesKhoury right. Un-voted the sudoku solver :)
4:48 AM
@retailcoder Really!? I thought it was a common.
The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. The "game" is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves. Rules The universe of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, alive or dead. Every cell interacts with its eight neighbours, which are the c...
2
OMG, bonus points to anyone who can produce the breeder....:
2
Yeah that is awesome. Which makes me think its too big a challenge for one weekend
Its like programming with pictures.
game of life is simple, getting the right seed is a bonus.
Me no comprehend.
4
Finally got out of that programmer's block I had before:
0
A: Relative dates in words

syb0rgC - 370 First CodeGolf post, so I figured that I would have fun with it. #include <time.h> main (int a, char *v[]) { a--; struct tm t = {0}; char* n = strtok(v[1],"/"); while (n != 0) { switch(a++) { case 1: t.tm_mon=atoi(n)-1; case 2: t.tm_mday=atoi(n); ...

5:03 AM
google: Conway's Game of Life ... there is one running in the browser to the right.
5
heh, neat trick.
0
Q: Python urllib proxy access function - Coverage of possible proxy scenarios

RoyHBSeveral of my Python 2.7 programs need to access server tasks via our server apache instance. The 'client' programs will run on Windows in various environments. They may be run on systems that do not use a proxy, or on systems that use a proxy with no authentication, or enterprise systems that u...

5:27 AM
2
Q: Straight Poker Hand

retailcoderThis is yet another follow-up of Poker Hand Evaluation from the last weekend-challenge. This method works for both 5 and 7 card hands - it doesn't fill the gaps with jokers, but I'm happy with the passing tests: public PokerHandEvaluationResult IsStraight(IEnumerable<PokerCard> cards) { ...

0
Q: Pushing instantiated class in an array

DimitriI just stumbled upon something today that seemed "unethical" in PHP. What originally thought as malpractice, turns out to work just fine. Basically what I was wondering if pushing an instantiated class in an array was considered proper? Example: $array = array(); array_push($array, new myClass...

6:22 AM
0
Q: Add query string to a URL

blunderboyI have written this code which adds a querystring to a URL: exports.addQueryString = function(url, queryString) { var isQuestionMarkPresent = url && url.indexOf('?') !== -1, separator = ''; if (queryString) { separator = isQuestionMarkPresent ? '&' : '?'; url += separator + quer...

6:58 AM
0
Q: Extract code that makes class shared_ptr construct-able only

nishantjrI've tried using CRTP, but the forces the class to befriend CRTP Base. template <typename T> class SharedConstructable : public std::enable_shared_from_this<T> { typedef std::shared_ptr<T> ptr_type; public: struct Ptr : ptr_type { template<typename... Args> ...

7:16 AM
0
Q: Spell check interview problem in Bash

Roger LamThanks for taking the time to read this. I submitted a code screening for a company I really wanted to work for and spent a decent amount of time on their programming assignment. Pretty bummed when they just said thanks but no thanks. Could you guys take a look and see why that might be? I was ...

 
1 hour later…
8:22 AM
0
Q: Can someone check my 2-3 tree program ? It compiles succesfully but it does not run as expected

Hoang MinhThe problem lies most in the add_helper function, and I still can't figure out how to debug and fix the error. Thank you. #include <algorithm> #include <cassert> #include <ctime> #include <fstream> #include <iostream> #include <vector> #include <string> using namespace std; // Filename to read...

8:46 AM
0
Q: lexical scope v let in scheme functions

ricardoI've been chewing through a bit of The Little Schemer and the Peano examples got me thinking about operation size and time. I got some help on making Peano Multiplication linear -- however (time ...) didn't show much difference between a lexically scoped version and the let-loop version. I do...

8:58 AM
0
Q: Optimising Lucky Number Program

user2369284In this, we are given an array of numbers, say 1 2 3 4. We start from a given position, let's say the 1st position. We cancel that number and move forward that many non-cancelled numbers. The number on which we stop again has the same procedure.This is repeated until only one number is left. Tha...

9:16 AM
0
Q: My Max Heap sort is not working..?

Behind D Wallsimport java.util.Arrays; public class Heap { private int arr[] = null; private int heapSize = 0; boolean isMin = true; public Heap(int heapSize, boolean isMin) { arr = new int[heapSize]; this.heapSize = heapSize; this.isMin = isMin; } void buildH...

9:29 AM
0
Q: Optimize this code to use NIO2

Peter PenzovI have this basic example which generates list of processes from /proc file system and gets data for each process. import java.io.*; import java.util.*; public class Processes { private static final StatusLineParser statusLineParser = new StatusLineParser( new NameParser(), ...

 
1 hour later…
10:41 AM
0
Q: does this query affect perfomance

user2907171i have this query SELECT * FROM (SELECT u.id,u.email,u.verified,u.verified_on,u.created_on,ca.html AS age,cg.html AS gender,cs.html AS state FROM users u LEFT JOIN combo ca ON ca.combo_group='age' AND ca.value =u.age LEFT JOIN combo cg ON cg.combo_group='gender' AND cg.value =u.gender LEFT JOIN ...

11:05 AM
0
Q: String Matching and Clustering

Woody PrideI have a pretty simple problem. A large set of unique strings that are to various degrees not clean, and in reality they in fact represent the same underlying reality. They are not person names, but they could be. So for example Dr. John Holmes and Dr. Jon Holms are more than likely the same pers...

11:41 AM
0
Q: Add HTML to the page using a PHP Class

ForebaI was trying to make my life easier making a class or something that would create HTML tags in a faster way. I ended up with something that I wouldn't consider the best practice. Take a look: /** * Add HTML to the page * * Add HTML to the page based on arrays with the tag names. It's gonna op...

0
Q: javascript group elements in array by multiple properties

SaikeDuring work, I met with the task: to group elements with similar properties in the array. In general, the problem is as follows: var list = [ {name: "1", lastname: "foo1", age: "16"}, {name: "2", lastname: "foo", age: "13"}, {name: "3", lastname: "foo1", age: "11"}, {name: "4", l...

12:05 PM
0
Q: How to integrate HSQLDB to a java application using netbeans

user33263I have a desktop application writing in java and using mysql as a database, now i need to embed hsqldb instead of mysql, how can i go about that using hibernate.

12:23 PM
0
Q: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

user2350469when I execute the following code CREATE TEMPORARY TABLE IF NOT EXISTS ETL.TempReallocation AS ( SELECT reallocation.offices_realloue_id AS offices_alloue_id , reallocation.offices_id AS offices_id , reallocation.specialism_id AS specialism_id , reallocation.businessline_id AS...

Off-Topic Zombies!!!
12:50 PM
@SimonAndréForsberg - at least the one offtopic zombie is an attempt to improve some code... I called the asker of this question 'a waste of my time', and he's actually read what I wrote, then came back and asked us/me for 'how'....:
0
Q: Optimize this code to use NIO2

Peter PenzovI have this basic example which generates list of processes from /proc file system and gets data for each process. import java.io.*; import java.util.*; public class Processes { private static final StatusLineParser statusLineParser = new StatusLineParser( new NameParser(), ...

@rolfl Ding! Morning!
Maybe that's what happens when we answer off-topic questions :)
Well, we'll shoot down his response-question.
I would love someone to tell me if I am wrong (or right...):
@rolfl? Huh? No it doesn't? length / 2 only reverses half of the string. Perhaps you are confused because I mention the return new string( s.Reverse().ToArray() ); in the end? This is a separate solution from the one above, reusing already built-in framework code. — Steven Jeuris 1 hour ago
This is on:
5
A: Is it better to put more logic in a for loop condition, or to use a while loop?

Steven JeurisThat code looks pretty complex for the trivial task it does. No need to convert the string to a char array. By not calling ToCharArray() you get rid of an extra copy of data. Poorly named variables IMHO. (The convention for index is i.) No need to substract from the end index. (which I prefer t...

1:12 PM
0
Q: python jumble solver algorithm

user1162512I need to write a code for the given problem. I'm provided with a word and I need to find all the possible combination of it that matches with a given list of words in a file. Here's my code. Can I make it much better. I'm sure it can be. Please suggest. dict = {} ...

@rolfl I'm very happy to tell you this: You're wrong! :)
Excellent, there's a crow outside I have to eat .....
0
Q: Using a variable in a for loop: is it proper practice or is there a better approach

MarieThe goal of this code was to create a table from an associative array. I need to create horizontal rows where the keys need to be used as "headers" while the values are posted below each header. I need to be able to reuse the code with associative arrays of unknown lengths and varying number...

 
1 hour later…
2:24 PM
0
Q: Simple object pool on Android

curtisLoewAssume the server is sending data to our app at regular intervals, at least once per second. The received data is parsed and stored in memory as a POJO. A blocking queue is processing data in a worker thread. Suppose I want to use a very simple object pool, so I don’t have to create a new POJO f...

2:54 PM
0
Q: Finally got a fully working countdown timer working but looks horrendous!

crmBeing new to raw javascript, intervals and times this was not the easiest script to come up with, and thus, although it seems to be working as I want it too the code looks very clunky. The timer counts down to one of 4 times of day: 8am, 2pm, 8pm or 2am depending on which is the closest. Because...

3:18 PM
^^ Holy mother of JavaScript
@SimonAndréForsberg it's still better than the .js I write ... ;-)
Oh no, I think even monkeys can write better than that
@SimonAndréForsberg - did you see that time me and my cousins got together and wrote shakespeare? ...
The infinite monkey theorem states that a monkey hitting keys at random on a typewriter keyboard for an infinite amount of time will almost surely type a given text, such as the complete works of William Shakespeare. In this context, "almost surely" is a mathematical term with a precise meaning, and the "monkey" is not an actual monkey, but a metaphor for an abstract device that produces an endless random sequence of letters and symbols. One of the first instances of the monkey metaphor being used comes from French mathematician Émile Borel in 1913 but it may go back further than that....
That's it, I should change my name to 'the infinite monkey'
2
Yup, I love the story you managed to put together. That was my favorite Shakespeare story.
Oh dear God, this JavaScript code is really a mess...
3:54 PM
I just had to add an answer to that JavaScript zombie. I really hope he learns from his mistakes.
4:07 PM
0
Q: Converting a 32bit number in a proprietary timestamp with PHP

Darren Beale(this is a copy of a posting I made on SO, it was suggested I post it here) all I've changed from that post is I'm now doing the bitwise AND using a decimal number rather than using bindec("111") to create the mask. The output is identical. I have a 32 bit number represented as a HEX string that...

3
Q: How to get this form in a better way?

IgaoI have the following form in my jsFiddle. I wonder if this is the best way to achieve this result. I believe I am using many divs. Being that it must have width 100% full window. I thank the dedicated time. FIDDLE HTML <div id="hexagon"></div> **x25** CSS #hexagon { width: 30px; ...

should I be asking this question? or should I review what the person has here? it doesn't seem right
@Malachi ifyour instinct is that he's doing it wrong by not using an image, then rite an answer saying: What you're doing is wrong, use an image, and this is why....
Holy crap, typo's like mad today.
@rolfl the thing is, he said he was using an image before and now he isn't.
So, wait to see if he responds to your question, and then go from there.... there is no harm in asking the questions you have asked.
And if he struggles to figure out an answer, then you have helped him too.
@Malachi I agree with you. I definitely would use an image there. Unless there's some issue regarding browser size settings / zoom level / platform / device / this-is-why-I-hate-web-design
2
4:18 PM
@SimonAndréForsberg and why I love web design, (but more hate than love)
I think it's way too hard way too often to get things "right". And once they suddenly are right in Firefox, you start Chrome and notice that there's something odd there. Not to mention that web-browser-that-must-not-be-named (yes, I'm talking about IE)
2
But perhaps that's a sign that I simply don't know enough about it.
^^^ and this is why I don't do raw page programming, and I only play with tools the 'big boys' use (GWT ...).
IE is the issue, not Firefox or Chrome. both the latter browsers are consistent 95% of the time, so you know how they will behave. and if you write enough for all the browsers it will become second-nature type knowledge. I don't have that second-nature thing going for me either. but IE is like English and has too many exceptions
2
Let them worry about the mundane stuff.
@rolfl yes I starred but what do you mean by GWT?
4:26 PM
Google Web Toolkit (GWT ) is an open source set of tools that allows web developers to create and maintain complex JavaScript front-end applications in Java. Other than a few native libraries, everything is Java source that can be built on any supported platform with the included GWT Ant build files. It is licensed under the Apache License version 2.0. GWT emphasizes reusable, efficient approaches to common web development tasks, namely asynchronous remote procedure calls, history management, bookmarking, UI abstraction, internationalization, and cross-browser portability. History GWT ...
If it works for Google, it will work for me.
@Malachi basically Google have a Java API that lets you build 'graphical interfaces' in Java, and then, if you use what's available in that API, then Google 'compiles' the client side from Java down to javascript, and you're good. The javascript is cross-browser compatible.
3
@rolfl I am going to look into that for sure! that sounds way easier than trying to work through ASP.NET, is this a similar type of thing?
0
A: How to get this form in a better way?

MalachiI don't think that what you are doing is going to give you the intended results easily. 25 of those divs won't stretch across my screen. I would create one Graphic and then have a 'background-repeat:repeat-x;` set on the Header (or whatever element you are using) to achieve what you want. doi...

I have heard a lot about GWT, but haven't looked into what it actually means that much. If it does what you say, @rolfl, then perhaps web design can be fun again.
@SimonAndréForsberg it actually does what it says 'on the box'.
In essence, it is no more complicated to learn than Swing, or JavaFX, or AWT, whatever.
@rolfl It does "G" then? Considering this image: upload.wikimedia.org/wikipedia/en/f/f6/Gwt-logo.png
There is a learning curve, but you should never need to worry about browser compatibility.
4:47 PM
Nice! Next time I'm going to make something for the web, GWT sounds like a good option.
0
Q: Find common preamble of a list of strings

FoziThink of a set of text lines starting with a common string, e.g. indented code. my $preamble = reduce { my $len = min(length $a, length $b); --$len while substr($a, 0, $len) ne substr($b, 0, $len); return substr($a, 0, $len); } @lines; Note that after the first invocation chances a...

0
Q: Am I doing this in a silly way?

3lliotI'm new to java and am trying to solve a scenario, even though I've succeeded and it works, I just wondered if there was a more practical way of doing this task? Is there a quicker more efficient way of solving the task or is this fine? Task: Given a string, return a version without the first 2...

Two seconds after I answered I got an upvote, my up-voter sure is a quick reader.
Yahoo! 150 reputation so far today. Perhaps I will get another day of 200 rep!
Must've been retailcoder. :-)
Yup, apparently it was :) At least he was the first to comment on the answer
5:02 PM
I wish I could be that lucky. But my brain is already dead today, so I can't even think through such a problem.
@Jamal I'm having an algorithmic/computational problem about combinatorics. I have written a recursive Java method that does the computation I want but I believe it could be done faster/simpler by using mathematics better, should I post my question on CodeReview.SE or Math.SE ?
If it contains code, then I think it would be best for here. I'd have to check if Math.SE even accepts code.
5:25 PM
0
Q: Very basic Context Free Grammar in Java

JohnZI wrote this program for an assignment, thus I had some requirements as far as the format of the cfg.txt file and some basic other classes that we had to use. Other than that, I am curious if there is a way to drastically simplify this code. Although the program runs fine and produces the desired...

5:38 PM
@rolfl that doesn't help making car and carpet two very different things...
@Jamal yeah, was me :)
@SimonAndréForsberg did you edit or I just read too fast?
@retailcoder I edited :)
I read your comment just as fast as you read my answer :P
@SimonAndréForsberg I gave up on the straight eval at like 2am, still not working. I need to get it to work, it's personal!
Looks like we're solving a Sudoku next week huh?
@retailcoder I feel your pain! I hope you manage to fix it. Slight suggestion: Remove your entire method and start from scratch. That's what I did. Someone will probably suggest a more efficient approach later anyway :)
@Jamal Math.SE does take code I think, if the question is about the mathematics involved and not the code itself. at least that is my assumption
@SimonAndréForsberg remove your entire method - is that the "Take2" method or the one from the deleted question?
5:48 PM
@retailcoder Whichever one you can't get working.
well the deleted question's code is a heavily refactored version of the "Take2" one - turns out neither are working as they should. FML.
Now I just need 10 more rep for today and then I can close that tab :)
@SimonAndréForsberg congrats on your shiny new [badge:nice-answer] :)
@retailcoder That up-vote couldn't possibly be yours. StackExchange time is 6 p.m. and you still have votes left? Impossible.
Thanks anyway :)
5:55 PM
Ugh. You have fully used your vote allowance for today. Can't star that. (ironic?)
2
0
Q: How do I get this result in this simple Java code?

Razor1692How do I get the result as 71 in this code? If 67 is the ASCII value of C, should I get 69 as the result? Can someone clear this out? public static void main(String args[]){ int num1=1,num2=2,num3=3;char c='C'; float x=0.5f,y=2.5f; System.out.println(c+1|num3);}

Sometimes I wish mods could forgo the super-vote at times. Since this is a small site, I don't like voting to close as I used to since that would prevent others from voting.
Perfect timing.
^^ close-vote in
@Jamal What's the harm in preventing others from voting? The way I see it is that the sooner an off-topic question gets closed, the better.
5:58 PM
@SimonAndréForsberg If SE sees that @Jamal closes 90% of the off-topic questions on the site, they'll probably think the community isn't mature enough. Or that Jamal has an OCD.
@SimonAndréForsberg: I like to make an exception when it's late and I see no one else around. Then, voting right away could prevent the OP waiting for feedback. Other than that, I would vote right away if the question contains no code. Overall, I mentioned in my pro-tem nomination that I would let the community do more.
@retailcoder Or they would see "Hey, this moderator is excellent in closing off-topic question quickly. We should really keep him."
@Jamal how's your stats?
00:00 - 18:0018:00 - 00:00

« first day (220 days earlier)      last day (3961 days later) »