« first day (619 days earlier)      last day (3415 days later) » 
00:00 - 18:0018:00 - 00:00

12:00 AM
RELOAD!
[Vogel612/JavaBot] 2 commits. 0 issues opened and 0 closed
[skiwi2/HearthMonitor-LogReader] 7 commits. 1 issues opened and 0 closed
[retailcoder/Rubberduck] 0 commits. 1 issues opened and 0 closed
[Cardshifter/cardshifter.github.io] 0 commits. 1 issues opened and 0 closed
[Cardshifter/Cardshifter] 5 commits. 0 issues opened and 0 closed
[Vogel612/testclient_javabot] 15 commits. 1 issues opened and 1 closed
 
@Duga Don't worry. There will be commits tomorrow. =;)-
3
 
0
Q: Scala: How can I "functionalize" this tree walking method and clean it up?

crockpotveggiesI have a MessageTree class that represents a binary tree of negative/positive. I'm looking to improve my walkTree method and make it more functional and succinct. Right now the try/catch is kind of ugly. The goal is to feed an array of "steps" (Array[Boolean]) that indicate whether to walk right...

 
@RubberDuck @Duga is very happy to see an issue opened at least :)
 
Yeah. My wife's back to school, so I have free time again.
2
 
yay :)
there's just too much to say to that Completed Town Generator question, I hope someone else will fill in where I left.
 
12:08 AM
=) Even better, it looks like someone's been working on Cardshifter.
Was it JAVA @SimonAndréForsberg?
 
@RubberDuck it definitely was!
@RubberDuck yup, that would be me. And @Phrancis is working a bit on the website area. I'm working a bit on making it a mobile app.
 
It seems my laptop doesn't want me writing code tonight....... It wants me to restart it.
OH! That's pretty cool.
 
@RubberDuck libGDX is pretty cool.
 
I'm constantly amazed at the level of talent around here. I feel like a joke most days. ;)
 
libGDX = Java framework for multi-platform game development
@RubberDuck trust me, I feel like a joke too.
 
12:11 AM
I think it's the hallmark of a good programmer. It means you're still looking to get better.
3
 
What I primarily need is spending less time deciding what to do, and more time doing it.
2
 
I have that problem sometimes too.
 
See ya buddy.
 
0
Q: Ajax result wont retrieve the result from the php file

user256009Hi guys this script was working fine when I add a console.log but as soon as I replaced the console.log with the $.ajax() function it wont give me the result back from the php file the ajax function I used was working from my other projects but I cant seem to find out why it wont work on this sni...

 
12:19 AM
@Jamal - if you don't get those auto-close flags fast, I'll steal them.
 
@rolfl I have a question for you, if I may, as a mod
Or, more like a request
 
Listening....
(or this need to be private?)
 
I've been looking into Google Code Prettify, because I'd really like if we could discuss as a community how the site "colors" look (as far as code blocks go)
And, I was wondering if you might be able to get the Prettify CSS template that's used on CR from SE
 
probably.... it's an open-source system...
 
I posted on Meta.SE but have not received any response at all
I can work with the Prettify template they have on Google Code, but I figured there are probably some quirks on the SE template that may be needed, since the code blocks on CR look way different than what the Prettify template does
 
12:31 AM
@Phrancis This question? :
23
Q: Code block Prettify for Code Review after graduation

PhrancisSome Code Review regulars have been discussing on Code Review Meta and in chat the possibility of redesigning the look of code blocks as part of eventual "graduated" site design. Would you please indicate if this can be done, and if that is the case, what steps we could take to start coming up ...

 
If there is a question that got closed for containing broken code, are we allowed to(in the comments) give hints to the OP about the problem in their code?
 
@rolfl Yep
 
That does not really look like a request for the css templates....
 
Well, not really. I was trying to even look if it were possible, before working on it
 
@SirPython Preferably not. Not to be mean, but because it will encourage people to ask bad questions hoping for answers in the comments anyway.
 
12:39 AM
Thanks
 
Think I should write a new question, or just find a way to contact SE a different way?
 
@Phrancis I have asked about the prettify before, and the standard statement is that any changes to the prettify shouild be done from the source i.e. google's code.
There is no chance that we'll get a site-specific code formatter.
Given that background, does asking for more detail about the template make sense?
 
I can work with the Google source, then. Yes, it does
Think I ought to just close the question on Meta then?
 
OK, about the template, I don't know how it is used, and you know more than me about these things.
That part of the code does not appear to be open-source
 
I was going to come up with some ideas and post a question on our Meta and several style ideas as answers, and let the people here vote
 
12:46 AM
143
A: What is syntax highlighting and how does it work?

ben is uǝq backwardsWhat is syntax highlighting? Syntax highlighting allows code in posts to be highlighted based on the language it's written in, to make it easier to read. How does it work? Stack Exchange does not have its own syntax highlighting engine. It uses Google Code Prettify. Therefore, any bugs and fea...

You've read that... right?
 
@rolfl I have, that's how I found Prettify. May not hurt to go over it again, though
 
@rolfl Can you even handle flags on mobile? That's why mine stay sometimes.
 
Who says I am mobile?
 
I'm asking in case you know.
 
Also, when I am mobile, I use the desktop version in firefox.
flags == no problem.
 
12:51 AM
What does that evaluate to?
 
true
 
Just another reason close auto-flags suck.
 
1:18 AM
idk what we're talking about, but that looked like it needed a star @Jamal.
 
Haha. Just another perk of being a pro-tem.
 
@Rubber - part of the reason for the beta, in beta sites, is that the scope is not clear.
so, when questions are closed, they should have a comment and discussion about why the question is not on-topic.
 
I don't think that's a beta thing in particular, but perhaps it's more important in a younger site.
 
The PTB (powers that be) have set all beta-sites to community-flag when questions are closed and theres no comment explaining why
 
OH! I'm following now.
 
1:29 AM
Every time a post gets closed and there's no comment, there's a flag raised on Code Review.
 
Ugh, can't get prettify to work serving my own JS/CSS
 
Also, a flag is still auto-generated, even if there were comments that were purged.
 
the worst is migrations....
people comment "should be migrated to xxx" and flag it....
so you come along, remove all the comments saying "migrate", close it, and migrate it....
then have to process the closed-without-comment flag too.
 
hehehehe escaped HTML
 
1:31 AM
Anything jump at anyone? I think the problem is in the <head>, the resulting file is just not picking up the CSS and/or JS
Could also be that the problem is in my <head>.
 
Out of interest @Jamal - I think this is close to a record for our monthly stats:
> 595 flags, average handling time 0 days 0 hours 11 minutes 0 seconds
Hats, I think it was the hats.
 
We're slowly improving our numbers from the past moderators. :-)
 
I may end up hitting SO on this one, I can't figure out why it's not working...
 
Do you have an ssce I can try?
 
grumble grumble ducky's bad at UIs grumble grumble
Screw it. I'm gonna go watch some supernatural.
Y'all have a good night.
 
1:49 AM
user image
2
 
@rolfl ssce?
 
simple self contained example.
 
No, not really. Unless you want to hack into my machine and run it from there ;-)
 
Oh yeah, I forgot about these two one-aways (I'm checking the updated query now).
 
I'll screw around with it some more, to make sure my machine's not the problem; and if not, I'll ask the kind folk on SO.
 
2:03 AM
You guys feel like jokes? Legato.setState(Feeling.SHOCK); I'm horrified to think of what that would make me.
 
Shocked, I presume
 
2:50 AM
0
Q: Prettify not linking correctly locally

PhrancisI'm having issues getting the Google Code Prettify to work properly. This example is working, using the provided remote files: <html> <head> <title>Google Code Prettify testing</title> <script data-brackets-id='140' src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify...

 
@StackExchange Hi!
 
@Vogel612 Thanks, I somehow managed to miss that.
@RubberDuck Me too.
I usually feel like the court fool.
@Legato Electrical shock?
Anyone here know of the correct SE site to ask a question about xN bit systems?
@Phrancis Go ahead. I'm embarrassed to have that big bounty on that measly answer.
@Jamal WHAT???
Where was that?!
 
3:07 AM
An SO gem. :-)
 
Lovely.
 
If you're the court jester, then I've a long way to go before I'm in the court at all.
How can you ask when it's invoked from Feeling?

Seeing how far ahead you guys are inspires and motivates.
 
Did I tell you about the PPCG gem we had once?
Someone asked about some short, meaningful code for a tattoo.
They didn't know how to program, they just wanted some code.
 
class StupidTattoo {
    public static void main(String[] args) {
        System.out.println("I'm getting this tattooed.");
    }
}
 
How about FizzBuzz in LOLCODE?
 
3:12 AM
 
13
Q: Cheese-Burger-Waffles (aka Rock-Paper-Scissors)

Mat's MugFizzBuzz was fun, and I got great feedback and learned a few things (which I hope I put in practice here), but only scratched the surface. I wanted to explore the LOLCODE language a bit more, so I implemented a little rock-paper-scissors, to play with functions, parameters, return values.. and us...

 
 
2 hours later…
4:43 AM
0
Q: Debug: Accesses local folder, iterates through files renaming them to lowercase

DanielHelp: What did I do wrong? Purpose: To rename files contained within directory to lowercase. What I know: Code using fts library, etc. was taken from this very helpful individual. https://keramida.wordpress.com/2009/07/05/fts3-or-avoiding-to-reinvent-the-wheel/. Using GDB, I can walk through th...

 
@CaptainObvious Good question, but off-topic.
 
@Hosch250 I really like your off-topic comment. I VTC as well.
 
@Phrancis I've been practicing.
rolfl talked to me a couple times.
 
Took me a bit too
Hope I get some good answer on SO, this Prettify stuff really annoys me
 
I'm killing a zombie here.
2
 
4:52 AM
Kill it real good
 
I'm trying.
 
5:08 AM
@Phrancis Is this killed real good? codereview.stackexchange.com/a/77370/34073
@Phrancis Why do you favorite your own questions?
 
@Hosch250 Because, they are my favorite ;p
 
I only use that for questions I don't want to lose.
 
@Hosch250 Pretty nice!
 
@Hosch250 Guess I should probably reconsider what "favoriting" is for
 
5:14 AM
HNQ
 
@Hosch250 I saw that, amazed at the amount of answers it attracted... also, what's HNQ?
 
Hot Network Question.
I've seen that a few times, otherwise I wouldn't use it.
Maybe I should stop.
I only like using those if I don't have to explain them. Otherwise, it doesn't save any typing - it only creates some.
 
UTLA
 
?
 
(Unnecessary Three Letter Acronym)
 
5:17 AM
:)
 
I'ma step out for some nicotine
 
0
Q: How to access list element efficiently in Haskell

LakshmanI am trying to solve this problem on SPOJ but I am facing performance issue with accessing elements of list. Also I am facing runtime error if I am trying to access the list element. In order to get the nth element I using [1,1,1,2]!!n this function and I was told that this run in O(n) which is v...

0
Q: How to check alert dialog validation

perfectionI have set alert dialog on textview's onclicklistener,and there I have added some items using array adapter,now what I want to check is if user select item from alert dialog and click on submit,it should submit otherwise not..but as per my if I select or not it displays message fill the details.....

 
5:36 AM
See you later.
 
5:49 AM
0
Q: Search through .xml files for text that exists anywhere in the file

MaheshVarmaI have about 1000 .xml files in different sub directories under one root folder. I am currently using the below code to search for text in the .xml file. <?xml version="1.0" encoding="UTF-8"?> <my_port xmlns="http://www.mytest.com/test" xmlns:a="http://www.mytest.com/" xmlns:xsi="http://ww...

 
6:23 AM
0
Q: Finding the shortest string containing keywords

David GrinbergCrossposted from Stack Overflow A friend of mine gave me the following challenge that I'm having some trouble solving- Problem: Write a function that takes a String document and a String[] keywords and returns the smallest substring of document that contains all of the strings in keywords. ...

 
@Phrancis , do you use Sublime?
I noticed you had it in your screen shot
 
6:48 AM
problem solved
 
0
Q: Group arrays by second value

ironsandI have a Array like this: a = [["foo1", 3], ["foo2", 4], ["foo3", 1], ["foo4", 2], ["foo5", 3], ["foo6", 4], ["foo7", 1], ["foo8", 2], ["foo9", 3]] The second values are circling number 1 to 4, it is uncertain from which number starts. I want to group t...

 
7:26 AM
0
Q: Joining models to get records

AjayIs this the best way to refactor the join and fetch the required attributes or is there any better option here? #student.rb class Student < ActiveRecord::Base has_many :subjects end #subject.rb Class Subject < ActiveRecord::Base belongs_to :student def self.get_all_subjects_and_stud...

 
vnp
7:38 AM
@janos @200_success Thank you all. Sorry it took that long to respond. Tough day at the office, got into a fight.
 
7:50 AM
Monking
@vnp That doesn't sound too good :/
 
8:01 AM
Physical fight?
 
vnp
Oh, don't even worry about that. And please stop me from quoting Pulp Fiction.
 
OK =)
 
8:20 AM
0
Q: Is there a better way to do what I'm doing in Flask, Pyhon? I'm a beginner

user3620828I have the following function def dnd_return(number,my_timeout): try: r =requests.get("https://dndcheck.p.mashape.com/index.php?mobilenos= {}".format(number), timeout =my_timeout) except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as err: return "Er...

 
8:36 AM
0
Q: Handling error conditions

CodeYogiSuppose I have this small piece of code: function capMe(names) { if (!Array.isArray(names)) { return; } return names.map(function(name) { return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase(); }); } /=> capMe(['foo', 'BAR']) === ['Foo', 'Bar'] My questions are: ...

 
 
1 hour later…
9:52 AM
lol
@RubberDuck Your comment should be edited into the answer and after that both our comments should be marked as obsolete and removed. Great case study. MetaMetaMeta. — nwp 21 hours ago
 
10:04 AM
Who is the secret starrer?
3
 
@Nobody. definitely
 
Speaking of... where is nobody?
 
Nobody knows.
3
 
IntelliJ IDEA, y u no show compiler errors?! My main project has Java 8, but this module is on Java 6, it refuses to show :(
Finally found it
 
10:20 AM
0
Q: What are your opinions on my javascript function?

MercerI wanted your opinion and know if my code below can be refactored my js function: var updatePrice = function () { var goPrice; var returnPrice; if (typeof scope.selectedGo !== 'undefined' && typeof scope.selectedReturn !== 'undefined') { for (var go in scope.gooffers) { ...

 
@CaptainObvious What are your opinions on my title?
 
10:48 AM
0
Q: Game Of Life Random Seed Generator

SingularityThank you for your interest! I am trying to create Conway's Game Of Life on Java with a random seed generator function. Basically, the user should be able to specify the number of cells (e.g. 3x4) and then the randomise method will make the cell either alive or dead (1 or 0). Then, the rules of ...

 
If anyone is... bored? :)
0
Q: HearthStone CreateGame log entry

skiwiI am working on an application that is able to parse the HearthStone logs, and for this case I am trying to parse the following log entry: [Power] GameState.DebugPrintPower() - CREATE_GAME [Power] GameState.DebugPrintPower() - GameEntity EntityID=1 [Power] GameState.DebugPrintPower() - ...

These are short questions by my standards.
 
why java 6???
why, why, why????
 
@Vogel612 Android compatibility...
 
why that?
 
So the API part can be used on Android
I intend the reading to be done on a PC, so that would be Java 8
 
10:56 AM
1
Q: HearthStone CreateGame log entry

skiwiI am working on an application that is able to parse the HearthStone logs, and for this case I am trying to parse the following log entry: [Power] GameState.DebugPrintPower() - CREATE_GAME [Power] GameState.DebugPrintPower() - GameEntity EntityID=1 [Power] GameState.DebugPrintPower() - ...

0
Q: python return inside a while loop

Oz123I am wondering which method code is more "Pythonic": def load_job(self, identifier, job_name): i = 5 while i: try: for ep in iter_entry_points(group='core.account', name=identifier): self.modules[identifier] = ep loaded = ep.load() ...

 
11:11 AM
Huh... reading lecture slides
They say the following in a bulleted list..
> Use coding standards: In case of law suits, you are in a better position to defend yourself
I can't seem to find that relation
Is anyone here familiar with killing mutants?
Mutation testing (or Mutation analysis or Program mutation) is used to design new software tests and evaluate the quality of existing software tests. Mutation testing involves modifying a program in small ways. Each mutated version is called a mutant and tests detect and reject mutants by causing the behavior of the original version to differ from the mutant. This is called killing the mutant. Test suites are measured by the percentage of mutants that they kill. New tests can be designed to kill additional mutants. Mutants are based on well-defined mutation operators that either mimic typic...
 
11:31 AM
Gamurnin'
@skiwi I guess the assumption would be that code standards have been vetted by some sort of someone who knows what is going on
And standards make it easier to hold all of your programmers accountable to... The standard.
 
@nhgrif Exactly how would you be able to better defend yourself though?
 
And a standard in use at your shop shows that you are trying to pay attention to everything that everyone writes.
Which is better than "no your honor, we assume the intern programmers we hire are writing sound code"
 
Ah, this is from the perspective of project managers, not from individual programmers?
 
I don't know. You read it, but that's my assumption.
As an employee, I would never be sued for code my company released.
 
Yeah, that probably explains my confusion then
 
11:37 AM
The company would. So code standards help the company defend themselves from lawsuits over code I wrote.
 
Right, ok
 
@nhgrif - go tell skeet he's wrong:
2
A: Weird generics error

Jon SkeetI'm not a Swift developer, but having seen similar problems in Java, I suspect the problem is that at the moment you're declaring a type parameter called String because you're declaring class FooTranslator<String> - so the type argument in Translator<String> is just that type parameter, which has...

 
@rolfl That will be quite difficult, in general!
 
11:57 AM
0
Q: Grabbing the talking stick - aka acquiring an exclusive lease

RobHA little bit of explanation on what I need this for: In a project that is deployed as an Azure Cloud service, I have a number of servers - some web front ends which service web requests and some worker instances which are responsible for all sorts of background work. The web servers communicate ...

 
If I post an answer telling Skeet his answer is wrong, and my answer is right, I win SO, right?
3
 
correct
 
I have literally nothing to do at work today...
 
@nhgrif If you prove that an answer of someone else is wrong, you shall inherit all his/her rep and his/her rep shall be initialized to 0.
Invalidating answers is too easy... :)
 
We have a release this week. My stuff is way done, and the others still seem to be stuck.
 
12:03 PM
@nhgrif You could... help them? ;)
 
I probably will... After I look at skeet's answer...
My annual review is this week...
 
0
Q: Groovy: remove list of files from another list of files by their name

valenterryIn groovy I have a list of files A and also another list of files B. I want to remove all the files from A that have a filename that also occurs in the list of files B. I wrote the following code: List<File> removeByName(final List<File> files, final List<File> removalFiles) { final Set<String>

 
12:21 PM
0
Q: Make file paths relative to the configuration file path

halloeiI have an configuration file which holds several file paths. If these paths are relative, I want them to be relative to the path of the configuration file (and not to the path of the JVM process). Since it's not possible to change the working directory with Java, I've written this method: publ...

 
12:31 PM
I actually posted an answer.
0
A: Weird generics error

nhgrifFor starters, let's explain the error: Given: class Foo<T:Hashable> { } class SubFoo<String> : Foo<String> { } The confusing part here is that we expect "String" to mean the Swift defined structure which holds a collection of characters. But it's not. Here, "String" is the name of the gene...

Upvote me beyond Skeet?
 
@nhgrif Imo that's really ugly from Swift, not sure what a language-wise fix would be though
That it takes String and it's just a type name ^
 
1
Q: Yet another FizzBuzz implementation

chosenbreed37I got this requirement recently: Write some code that prints out the following for a contiguous range of numbers: * the number * 'fizz' for numbers that are multiples of 3 * 'buzz' for numbers that are multiples of 5 * 'fizzbuzz' for numbers that are multiples of 15 e.g. if I run the program over...

 
@CaptainObvious Noooooooooooooooooooooooooooooooooooo!
Go away FizzBuzz, go home, you're drunk!
 
Lol
 
@skiwi you can name a variable string.
You can name a method string.
It's not a good idea, but you can.
And you can name a generic type placeholder name string.
 
12:41 PM
Would it be very evil of a language to mandate that type variables are max of length 2?
 
Because everything is allowed descriptive names except your generics placeholders?
Should we also require everything else be a min length of 3?
 
Yeah... it would probably be evil
 
;)
Now, hot network question?
 
Aww man. I went to go downvote the fizzbuzz then realized it brought something new to the table.
+1 for being the first linq fizzbuzz I've seen. — RubberDuck 7 mins ago
 
12:48 PM
Did I get +1 for first AppleScript FizzBuzzard?
 
1:02 PM
I don't know. I think you might have.
 
You've earned the "Nice Question" badge (Question score of 10 or more) for "Min triangle path - bottom-up".
seems like someone has been running "one vote short"
 
If there are any holy wars in FizzBuzz, this would be it. — Simon André Forsberg 1 min ago
Truth there @SimonAndréForsberg ^
 
@RubberDuck seems like when writing a FizzBuzz implementation, that question is the first one you have to ask yourself.
 
It does seem to be (at least once you understand how to solve it to begin with).
 
Cool people add the ability to inject multiple fizzers
 
1:14 PM
@nhgrif I wouldn't be in Skeet his place, and I don't think you want to take it over. All his answers are view with a microscope just to find that one small mistake ;)
 
0
Q: How to detect which property has been changed from two object

GibboKI have the following code, which provided two objects cmd and this.xxx.properties, detect the only property changed. I would like to know if I could optimized or improve my code for speed. _deltaProperties: function (cmd) { var dataBefore = this.xxx.properties, newData ...

 
Decided to pimp my question!
3
Q: Parsing log files of HearthStone: The API

skiwiI am working on a parser that can parse log entries from a game called HearthStone, the overall idea is that it will read the log file live when the game is running, parses the log file and show interesting and useful data in real time. For this question I focus on the module that provides an AP...

(Don't look at the edit history, please)
((Yes, I know now everyone will look at the edit history))
 
@SimonAndréForsberg Who would that have been (yours had a +1 from me previously though).
 
Oh... if you edit within the grace period, then you overwrite the old edit message
 
1:21 PM
Why did nobody ever tell me that?
 
@rolfl then I assume it was @Nobody
(I miss @Nobody!)
 
Ditto
For those paying attention to the Linq FizzBuzz, and with enough rep: codereview.stackexchange.com/a/77387/31503
I like when people take constructive criticism well, and respond positively.
3
 
Oh hey! look at that!
Nice.
 
0
Q: How to change colour of seterror message in edittext?

JohnsonIn my application I used edit text with validations,by default when validation is not match it shows red border as given in following image,now if validation is success,then border color should be change into green...

 
burn it ^^
 
1:25 PM
@rolfl Heh, I was searching for my own questions to see which ones I could upvote.
I think I'm going to create a chatbot called Captain Nobvious that posts SO questions at the same rate that off-topic CR questions appear here...
Yes, I'm evil.
3
 
@chillworld you mean you don't want people making an extra effort to make you a better programmer?
 
1:39 PM
hiyaa~
 
Hey Alex.
 
2:01 PM
1
Q: From object to array with revert and regroup

TouPyeBasically, I need to regroup keys by values from an object to an array An example worth a thousand words in my case, as I don't know how to clearly explain my problem Here is my input object : { "Data 1": 0, "Data 2": 1, "Data 3": 3, "Data 4": 0 } And there what I should outp...

 
@skiwi are you sure he shouldn't be named Cpt. Noobvious?
4
 
2:20 PM
My first answer and Accept on SciFi --> scifi.stackexchange.com/a/79022/25784
Monking
 
I just got an Accept from SO too!
@Vogel612 one of yours? nice!
 
first answer, quoting tvtropes and stating a kinda remotely related fact...
but hey, 430 rep..
and a gold badge, too
 
0
Q: Better way to rewrite this class for User interaction

Ryan Hipkiss class UserController extends BaseController { /* User Controller - Everything a user can do */ private $username; private $email; private $password; public function __construct() { } /* Register */ public function setUsername() { r...

 
2:34 PM
@Vogel612 that seems like a very popular question, and all the answers seem like good answers.
 
@Mehrad I'm not using sublime, that editor is called Brackets. It's made for writing web code. It does look pretty similar though
Also, Monking!
 
Monking!
 
2:53 PM
0
Q: What could I do to make my android activity design more like this app screenshot image?

HotChocolateMugWhat could I do to make my android activity design more like this app screenshot image? Basically I've seen this login screen I liked the look of, and I've attempted to make my design match it as closely as possible. But although my design does look similar, it doesn't look anywhere near as good...

 
@nhgrif no, I do like improve myself, but people watching mine code and getting comments for micro optimalisations isn't what I like.
@nhgrif At that level, I just would be to scared to post any other answer
 
@Vogel612 Good one
@Phrancis Also late monking!
 
3:09 PM
CaptainObv, based on title, that sounds like a UX question...?
 
and asking for code to be written
judging from title that is.
 
And it's gone.
 
3:25 PM
0
Q: Is it a bad style to return inside a loop?

Oz123I have the following method def load_job(self, identifier, job_name): ex = None for i in range(5): try: for ep in iter_entry_points(group='core.account', name=identifier): self.modules[identifier] = ep # load_entry_point(ep.dist, 'core.acc...

 
Saw a JavaScript answer from pretty new user that I don't feel is very good, but not sure how to word it... anyone care to have a look and perhaps comment?
 
There isn't really more. I'm just starting to setup everything. This is using Laravel (if that helps). Input::get('username'); gets the value from the input in the form with name 'username'. — Ryan Hipkiss 32 secs ago
 
hmmm spam / offensive flags...
yummy
 
@Vogel612 I'm missing something?
 
@Vogel612 I would argue that although it's real code, it's so imcomplete that it might as well be hypothetical code.
 
3:37 PM
@rolfl chat-flag -> no
 
Ahh, I did miss it.
 
@RubberDuck accepted, VTC'd accordingly
 
You did make a good point though. It was a welcome reminder. Thank you.
 
> put on hold as off-topic by glampert, RubberDuck, Vogel612, janos, Simon André Forsberg 21 secs ago
> rolfl♦ 19 secs ago
I'm going with the unclear question close reason. The text references "register" methods, there's an inherited 'BaseController" class, and a lot of other missing details. It is not clear that this code is ready for a review. It is more "ready for someone to help complete", and that would be off-topic here. While I appreciate that this code may run, and do something, it does not do what the code should be doing when it's complete. While there may be grey areas in our site Scope, this question is on the wrong side of the grey zone. — rolfl ♦ 54 secs ago
 
@rolfl yeah, I noticed that I got there first :)
 
3:45 PM
IIUC register (and possibly also BaseController) are provided by the used framework (Laravel)
 
both unclear and hypothetical felt like valid close reasons
 
@Jamal - I prefer my title.... overwrote you.
 
Hummm... somethign feels dirty here
 
3:54 PM
        try {
            CreateGameLogEntry.Builder builder = new CreateGameLogEntry.Builder();

            GameEntityLogEntry gameEntityLogEntry = (GameEntityLogEntry)logReader.readEntry();
            builder.gameEntityLogEntry(gameEntityLogEntry);

            try {
                while (true) {
                    PlayerLogEntry playerLogEntry = (PlayerLogEntry) logReader.readEntry();
                    builder.addPlayerLogEntry(playerLogEntry);
                }
            } finally {
Is this dirty enough?
2
 
There you go. :) — Fleshgrinder 14 mins ago
 
@skiwi How about bool logReader.hasNextEntry() ?
 
@SimonAndréForsberg That's something I've been thinking about, yes
 
I am getting an Error on my custom Error page.
3
 
I believe it would un-dirty your code a lot.
 
4:05 PM
@SimonAndréForsberg First trying to get it working and committed, then I'll start a cleanup round I guess
 
Resources weren't being published with the site.
 
0
Q: Abstract methods vs constructor parameters

GodsmithI have a class that takes a lot of parameters, and to simplify things I created a child class that calls some static methods to retrieve those parameters (file names and the like): class BaseClassVersion1 { private int a; private int b; private int c; public BaseClassVersion1(int a, int...

 
@CaptainObvious Java + C# = hypothetical
 
4:21 PM
Good Evening all :)
 
@Mat'sMug And BaseclassVersion1 wasn't a hint either...
@DJanssens Monking
 
:)
 
monking!
 
@skiwi ?
 
@RubberDuck What? :)
 
4:28 PM
1
Q: FizzBuzz-type program that reads/writes to Excel

robertgfthomasI'm new to Groovy, and coming from PHP it's been a rough transition. The code below works. However, I would appreciate feedback on how better to write it and follow good practice with Groovy. I anticipate doing a lot of Excel work in the future, and so tried to make this program reusable for mo...

1
Q: Practical way to refactor following code

AlistairHow can I refactor the following code? I have a method that receives a storeName parameter, and based on the store we parse a CSV file, an XML file or a CSV and an XML file together in order to retrieve the products and product details. The present code structure seems pretty impractical to me....

 
4:44 PM
0
Q: Matlab vectorization tips

Jaume GasiaI'm new at Matlab and I would like to know tips in order to make short the following program since it consumes a lot of time. The scheme of the actual code is very similar to a typical c++ code Thank you! close all %Tanca totes les finestres obertes clear all %Removes va...

 
@CaptainObvious What? Another FIZZBUZZ?
 
This user needs more appreciation :)
1
A: Extensible Abstract Log Reader

Eric SteinNoMoreInputException "No more input" shouldn't be an exception, as it's part of the normal flow and not an unexpected condition. Use the same paradigm as Iterator and add hasNext() to LineReader and LogReader. LineReader I don't see any compelling reason not to prefer the Iterator<String> inte...

> I run Fulminatus Consulting, a small shop specializing in the analysis, design, and implementation of APIs for our clients
API reviewers are useful ;-)
 
first line of a Google+ Post
> Java 8: No More Loops! "
 
5:00 PM
@Malachi Right... :p
 
sounds weird to me......
 
I can assure you, I'm still using loops!
 
5:13 PM
9
A: Weird generics error

nhgrifFor starters, let's explain the error: Given: class Foo<T:Hashable> { } class SubFoo<String> : Foo<String> { } The confusing part here is that we expect "String" to mean the Swift defined structure which holds a collection of characters. But it's not. Here, "String" is the name of the gene...

 
5:27 PM
> I'm not a Swift developer, but
Skeet should have stopped right there!
3
 
His answer isn't actually that bad.
 
Ugh. What have I done? 35 more questions and I'll have a frickin' badge for it.
3
 
5:42 PM
I wrote an entire inventory audit system in a month. My coworker has been working on expanding the return system for about 3 months...
 
I blame it on @Mat'sMug.
Not everyone can be a god @nhgrif. =;)-
 
Hello @px1mp
 
@nhgrif Your productivity seems to be higher :)
How does the code quality compare?
 
Welcome to the 2nd Monitor @px1mp!
 
0
Q: C# approach to prevent null references in strings

danMy insight here is that it's usually not useful to distinguish between null and empty strings. Sometimes it is, but usually not. Usually I like to assign my strings as empty if they would have been null. var lastName = Request.Params["lastName"] ?? "" Thus I had the idea of a struct which would...

 
00:00 - 18:0018:00 - 00:00

« first day (619 days earlier)      last day (3415 days later) »