« first day (532 days earlier)      last day (3480 days later) » 
00:00 - 19:0019:00 - 00:00

12:01 AM
pointers are the same so much be the same thing ;)
 
Heading hime
home
 
How long will it run?
 
forever
 
The precision falls off and eventually doesnt add anything?
 
correct
at about 1.0E-1000
 
12:18 AM
Damn
 
 
2 hours later…
1:54 AM
0
Q: Method not running after mouseState change

Christian FrantzI have a main variable oldMouseState which is holding the state of my mouse in my main class. There are a couple methods that I want to run using this mouse state, and currently only the first one is working. private void SetTinderInPit() { MouseState currentMouseState = Mous...

-1
Q: Change the character length of single line strings

zebraI have extracted a sequence from a genbank file that consists of single lines of strings with 60 bases (with a \n at the end). How to modify the sequence using perl so that it prints 120 bases for each line using regex and not bioperl. I assume I would have to use s/\n// to get rid of the newline...

 
2:30 AM
0
Q: Android Global Variable Setup

Adam JohnsI am using the Android library Retrofit for networking in my app. The library calls for creating a RestAdapter for making service calls. I want to use this same instance of the RestAdapter for all of my service calls. How is my setup for this scenario? Extending Application: public class Custom...

 
 
1 hour later…
3:43 AM
True story.
 
4:08 AM
0
Q: Calculating the distance squared between all vertex-pairs of a number of polygons in two dimensions

user89I have implemented my code using Cython. It is the current bottleneck in my computations. There are two non-numpy functions involved: 1) calculate_2D_dist_squared which calculates the distance squared between two points, 2) calculate_2D_dist_squared_matrix which generates the distances squared b...

 
 
2 hours later…
5:42 AM
0
Q: Inheriting bootstrap in django

JhonnyI'm trying to inherit a bootstrap for my practice project, usually I do this process with a simple style.css but finally I decided include a big bootstrap to test some features of the beautiful dashboard in this template. In first instance I achieve the heritage of my bootstrap in my index but t...

 
6:10 AM
0
Q: Orange Tree simulator. Object-oriented best practices and refactoring

Dylan RichardsI'm practicing SOLID principles and the concept of making a clear distinction between an object's private and public interfaces. I made the conscious choice to extract complex logic into private methods to hide the implementation details from the public interface. I did this because I heard that...

 
Is anyone alive?
 
6:28 AM
not knowing how to start an answer
Lets stalk @rolfls answers
 
6:58 AM
0
Q: Correct way to refer a view in android

HelloWorld94What is the correct way of referring to a view (a) or (b).? (a). TextView textView = (TextView) rootView.findViewById(R.id.text); textView.setText("Some Text"); (b). ((TextView) rootView.findViewById(R.id.text)).setText("Some Text"); I sometimes use the combination of both in ...

 
7:12 AM
0
Q: How do I (beautifully) extract this part of code to a subclass?

LyxodiusI have thought a lot about this but can't come to a proper solution. Also, it's hard to google things like this. Note: The code itself is irrelevant, it's about how to do such a thing in general. I have a class named Creature which has the following method: private void move(int direction, Lyx...

0
Q: Mapping square objects to specific cells in a TableLayoutPanel in WindowsForms game

user3496101I have soled this problem but was am looking for a better way to do it, in fewer lines of code. The problem was this (from previous questions in stackoverflow): http://stackoverflow.com/questions/26417119/place-objects-in-tablelayoutpanel-cells-in-specific-order/26417223?noredirect=1#comment4...

 
7:28 AM
@janos Did you just mess up your regex?
 
thanks @200_success, I just copy-pasted from my IDE (where it is correct), I don't know how I lost the `\` ...
thanks for the fix!
 
You're welcome.
 
7:55 AM
But true, is linking this Ok for parsing the String without calling the function????? They just have to copy that
@Jamal
Well, using
 
@TheKittyKat I think you mean more like this one: grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/…
 
The previous method links to that
But yeah
not calling a parse function?
And supports Hex values
 
you have a point
 
Valid answer if I paste that code?
 
a good answer would be: reviewing the OP's code, pointing out his mistakes, and linking to grepcode
copy-pasting from grepcode is not a valid answer
 
8:01 AM
People have already pointed out the mistakes
Damn!
 
oh well, better find another question to review then ;)
 
I have done 2 more
"Note: The code itself is irrelevant, it's about how to do such a thing in general."
 
I like this one:
1
A: Trying to catch and throw exceptions if error message window is found

TheKittyKatThe code that you submitted is not complete as it was missing the driver variable (Had to look up the type as I have not used Selenium). private WebDriver driver; First off move everything out of the main method even if you are going to only use one instance, whilst doing this you should also ...

 
How so?
 
you pointed out many good things: single responsibility principle, method decomposition, moving string literals to constants, ...
 
8:07 AM
Anything else I should have added?
And the login method still seems a bit long
 
I hope you'll get more votes, that's why I shared it here ;)
 
I feel loved!
:)
 
I'm kinda busy looking for something to answer myself ;)
 
Grrrr!
 
you seem to like kittens
 
8:09 AM
Its the internet ;)
@janos Should I be doing a full review for
0
Q: How do I (beautifully) extract this part of code to a subclass?

LyxodiusI have thought a lot about this but can't come to a proper solution. Also, it's hard to google things like this. Note: The code itself is irrelevant, it's about how to do such a thing in general. I have a class named Creature which has the following method: private void move(int direction, Lyx...

?
When he only wants one thing
 
definitely more work is needed here
 
But only one things is asked about the code block
 
it looks like he wants to use the template method pattern en.wikipedia.org/wiki/Template_method_pattern
that does seem a good idea, and better than what you suggested
 
:(
Ill remove it
 
or improve it
and his direction variable screams to be an enum
 
8:16 AM
"Note: The code itself is irrelevant, it's about how to do such a thing in general."
I thought he only wanted that one things answered
 
if you point out to him that probably he's looking for the template method pattern, explain it briefly in his specific context, and write up a simple example, and as an added bonus tell him to change direction to enum (ideally with an example too), now that could be a pretty nice review
 
And you are letting me do that instead of answering that and getting the rep?
 
Hello critters.
 
morning Morwenn
 
8:58 AM
Crap. Now I have to learn about monads, monoids, applicative, functors, arrows, and categories in the next five days so that I can judge how to award a bounty.
 
9:41 AM
@200_success wow, someone actually answered the thing. I put a bounty on that question a couple of months ago, but that didn't help at all.
 
0
Q: Unit testing annotation processors in Java

janosI'm working on a micro-brenchmarking framework in Java. To give you some context, this is how it will work: Given multiple implementations of some algorithm, and you want to compare which one performs better by measuring the processing time. Create a brand new empty class, annotate with @Benchm...

0
Q: Reduce complexity of method

user1472672I would like to reduce the complexity of this calculate method, it is too long in my opinion. Already a number of helper methods exist which are called throughout the method. I can't really see any other alternative than adding more helper methods. Or perhaps there could be a way to split the fo...

 
10:19 AM
Monking
Had an unpleasant greeting with 1024x768 this morning
 
10:45 AM
Not happy :(
 
New username! Nice :)
 
From a friend "It's just that the code review stuff isn't really that riveting."
 
0
Q: pygame to exe conversion

Ami RuksharThis is simple pygame script MyApps.py which i want to convert to .exe using py2exe script(setup.py). http://pastebin.com/vCMevNtB (MyApps.py) http://pastebin.com/VX5aDsbL (Setup.py) but the follwing errors occur.. HOw can I remove these errors? C:\Documents and Settings\alma\set\dist\MyApps....

 
How hard can it be to find the executable to start Visual Studio 2013...
First time I had to use the Metro interface from Windows 8.1
 
@TheKittyKat they don't know what they're talking about, apparently
 
10:54 AM
:( lonely
 
0
Q: Project Euler #1 efficiency

Arun PrakashI've started solving project euler problems. Is the code completely optimized? Question : If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below N. My solution : impor...

 
drat. you copied my answer? — rolfl ♦ 12 secs ago
not just yours, @rolfl
 
@CaptainObvious off topic
 
Monking all.
Hey @Simon.
 
Monking @rolfl and others
 
11:06 AM
Monking
@TheKittyKat hello
 
@JaDogg Hi.
 
^^ that's a picture of my cat
 
I should change my name.....
 
:p
 
@TheKittyKat You can't, not for another 27 days or so.
 
11:08 AM
When that time comes I will
 
I wonder when @Mat'sMug is going to change his name next time
 
5
Q: Unable to change display name

mindvirusI tried to change my display name just moments ago, and I got the error: Display name may only be changed once every 30 days; you may change again on Apr 11 at 3:54 I have never changed my account display name. Looking back, I did start an account on the UX StackExchange 3 days ago (with ...

 
Well, My other account has a unique name
 
Hmmm?
 
@Funkydiddykong hello
 
11:11 AM
unique?
 
Why have multiple accounts, @Funkydiddykong / @TheKittyKat ?
 
Wanted a fresh start?
 
Fair enough, just as long as you keep the accounts independent. No voting on each other's stuff, no answering things from the other account, etc.
It gets uncomfortable when there's inter-account activity making mods have to suspend them both/destroy (one of) them.
 
I don't even go on the other account so don't worry
 
OK, won't worry then.
 
11:55 AM
@TheKitKat is the kitten formerly known as @TheFailure, right?
Monking!
@Simon I like @MatsMug :)
 
@Mat'sMug Yep
 
@Mat'sMug and you didn't like retailcoder and lol.upvote?
 
@TheKittyKat can you really say that StrawberryC is a Chocolate ?
 
What would you suggest I edit it to
There are chocolates with strawberry flakes on top
 
@lol.upvote was a joke...
 
11:58 AM
the first thing that comes to mind is of course the overused Person -> Employee example...
 
I was doing something different
Do you want me to do that example?
 
the strawberry flakes are kind of decorative
 
.....
What other kind of chocolate is made differently?
 
your answer will be better, as the relationship of StrawberryC / CaramelC / Chocolate is disputable
there's milk chocolate, dark chocolate, but I don't know how they are made :p
 
Ok, sorry for the bad example
 
12:02 PM
My wife makes chocolates :)
 
it's not terrible, and it's a good improvement over the previous one, keep it up
there, you already have my vote ;-)
 
@janos oh chocolate.... mmm.... I better go to the kitchen and grab some.
 
haha
 
Found a good example online to use
 
If I would knew BASIC good enough, then I could make a post with as title "BASIC calculator"
And nobody could blame me for using all caps in the title.
 
12:10 PM
@janos better?
 
@skiwi but for having a bad title.. and a tag in it ;)
 
much better. To make it easier to read, I would make the example as minimal as possible, for example no need for all the build* methods, buildWalls should be enough to illustrate the concept
we're talking about this btw:
1
A: How do I (beautifully) extract this part of code to a subclass?

TheKittyKatThe design pattern you are looking for is called a Template method pattern and this is what you were trying to do. The definition implies the creation of an abstract or template method and overriding inside sub-classes to specialize behavior. Consider the following example for making a house: p...

 
Ummmmm, ok ill cut it down a bit more
@janos better?
 
I think it's fine
one more thing:
I don't see the point of value in Direction
 
@janos mmmm, Dutch white chocolate. Tasty.
 
12:21 PM
@SimonAndréForsberg Those are awesome!
 
@SimonAndréForsberg unfortunately I'm still before lunch :-/
never heard of Dutch white choco
 
@skiwi Verkade Chocolade wit
 
I don't know if I've had that one, but I like the white ones a lot
 
@TheKittyKat when you do a switch on an enum, you can use the enum values in case statements directly, the .getValue() there are all pointless
 
@SimonAndréForsberg Where did you buy that?
 
12:23 PM
Thanks
 
@skiwi in France two months ago
 
Ah well I think the Dutch have partly invaded France, so no wonder
 
if you remove the value from Direction completely, it will be shorter and clearer
 
I did
 
much better!
 
12:25 PM
Because I am an idiot ;)
 
we all do idiotic things sometimes. that's why iteration is very important in what we do
 
Someone got a little excited using Java 8...
IntStream.range(0, width).forEach(x1 -> {
    IntStream.range(0, height).forEach(y1 -> {
        IntStream.rangeClosed(x1-1, x1+1).forEach(x2 -> {
            IntStream.rangeClosed(y1-1, y1+1).forEach(y2 -> {
                if ((x1 != x2 || y1 != y2) && getNode(x2, y2) != null){
                    getNode(x1, y1).registerObserverAtNeighbor(getNode(x2, y2));
                }
            });
        });
    });
});
2
Q: Java 8 forEach over multiple IntStreams

XirdusI have the following code: IntStream.range(0, width).forEach(x1 -> { IntStream.range(0, height).forEach(y1 -> { IntStream.rangeClosed(x1-1, x1+1).forEach(x2 -> { IntStream.rangeClosed(y1-1, y1+1).forEach(y2 -> { if ((x1 != x2 || y1 != y2)

 
@skiwi with a little improvement (context), that would be a good CR question
 
@SimonAndréForsberg Yeah... too bad it's posted on SO
 
12:43 PM
0
Q: Java API initialization

ZzokkI am developing an Android Library which involves both Network and Bluetooth communication. In order to start using the library it must be configured. In other words a request to the backend must be made in order to get configuration for this exact user of my API. I doubt about which approach I ...

 
// afk lunchtime
 
Is my answer acceptable?
0
A: Project Euler #1 efficiency

TheKittyKatA more efficient algorithm can be found when you look at the mathematics of the problem. The sum of all multiples of 3 and 5 below n is equal to: The sum of all multiples of 3 below n Plus the sum of all multiples of 5 below n Subtract the sum of all multiples of 15 below n Therefore we can ...

and I didnt copy your answer @rolfl
 
any comments about this comment?
Welcome to Code Review! It appears that you have not yet decided on which approach to go with, so you don't have any real code for your project. Code Review is supposed to be the last step in the programming chain: Where you go to get your code reviewed. It appears that this question is more about Code Preview. — Simon André Forsberg 18 secs ago
@TheKittyKat @rolfl still hasn't even posted an answer there :)
 
He still complained in the comments ;)
"drat. you copied my answer?"
I realized my loops can just 1 itteration each by starting at their value
 
1:00 PM
@TheKittyKat Your loops can be entirely removed if using pure mathematics (see the links in my answer)
 
@TheKittyKat I don't think your answer is bad though.
 
1:14 PM
nice name @TheKittyKat :)
 
Thanks.
 
1:24 PM
@SimonAndréForsberg OK, if you insist.
 
@rolfl I don't insist. I more insist that you vote on the answers. (But I bet you've already done that, huh?)
 
1:46 PM
0
A: Project Euler #1 efficiency

rolflI had a general review primed up for this question, but other answers beaat me to those more general aspects. @TheKittyKat provided a good starting point on the most efficient means of calculating the sum of each sequence, and then subtracting the double-count Now, the solution @TheKittyKat pro...

 
@rolfl even though I've already linked to description of that algorithm, that is a good way of describing it. +1
also +1 for editing your monkey-typo before I got the chance to
 
Wondering if you could make a bot to review Project Euler #1 questions
 
@skiwi probably not reviewing the actual code, but probably writing an answer explaining the fastest approach
Apparently, I might not have been working where I thought I had been working... at least not according to Bing..
 
@SimonAndréForsberg I read your answer when you fist complained about the 'drat' tim thing earlier (and +1'd it then).
 
1:50 PM
how did I miss that you had the links there too.
 
LOL
Göteburg -> New York, seems legit.
 
Right, who's a Python person here?
 
Apparently I've become an American. I wonder if I'll bump into @Marc-Andre not that he's there...
 
@SimonAndréForsberg Did you retract that post? I cannot find it, wanted to let it translate itself to Dutch
@rolfl I know it uses spaces for indentation
 
@skiwi nope, but I'm only showing it to friends, so you'll have to send me a friend request
@rolfl I know it a little bit, but I believe @200_success is the expert around here.
 
1:53 PM
Yeah, what I want to know is whether I was completely off the mark, or whether I just need more eyes on this: codereview.stackexchange.com/questions/66967/…
 
@SimonAndréForsberg Sent it :)
Somehow I think @rolfl's Facebook profile is not used that much
 
It's stupid for me to feel bad having a +0 answer.... but my ego is apparently in need of attention.
3
@skiwi The elephant's watering hole.
I am a lurker all the time, not a poster.
 
@skiwi considering your profile picture, you look dangerous...
 
I also mainly lurk
@SimonAndréForsberg Yes, it's in need of an upgrade...
 
Gah, 5 rep off 500
 
1:55 PM
I'm not too scared of using my own picture online (like on SE), if only I had a decent one
 
I dont have any
 
> De nieuwste ik heb gewerkt sommige bij een reclamebureau in New York, waar ik betrokken bij de ontwikkeling van deze pagina geweest. Pret wanneer één krijgt een kans om te worden met en ontwikkelen van een Web-pagina die ladingen mensen hopelijk kijken.
In Dutch Göteburg is also New York.
@SimonAndréForsberg Google translate is not that silly
> The past, I have worked part in an advertising agency in Gothenburg, where among other things I have been involved in the development of this resource. Fun when you get a chance to be involved in developing a web page that loads out hopefully people watching.
 
Can you paste the source text here as well?
translate se: The past, I have worked part in an advertising agency in Gothenburg, where among other things I have been involved in the development of this resource. Fun when you get a chance to be involved in developing a web page that loads out hopefully people watching.
 
Ah, I get it, you are testing IBM's new secret translator.
@rolfl Meaning you already got the Swedish source?
 
translate sv: The past, I have worked part in an advertising agency in Gothenburg, where among other things I have been involved in the development of this resource. Fun when you get a chance to be involved in developing a web page that loads out hopefully people watching.
(from English) Tidigare har jag arbetat del på en reklambyrå i Göteborg, där bland annat jag har deltagit i utvecklingen av denna resurs. Kul när du får en chans att delta i utvecklingen av en webbsida som laddar ut förhoppningsvis titta på folk.
 
1:59 PM
@rolfl Det senaste har jag jobbat en del på en reklambyrå i Göteborg, där jag bland annat varit med i utvecklingen av den här sidan. Kul när man får chans att vara med och utveckla en webbsida som massvis utav folk förhoppningsvis tittar på.
 
translate: Det senaste har jag jobbat en del på en reklambyrå i Göteborg, där jag bland annat varit med i utvecklingen av den här sidan. Kul när man får chans att vara med och utveckla en webbsida som massvis utav folk förhoppningsvis tittar på.
(from Swedish) The latest I've been working some at an advertising agency in New York, where I've been involved in the development of this page. Fun when one gets a chance to be with and develop a Web page that loads of people are hopefully looking at.
uses bing....
 
Why on earth would a translation service mix up Gothenburg with New York?
 
@rolfl I feel bad about them too, and I don't think that's stupid at all. Did I take the time to review and write something constructive about it to not get even a single upvote? I don't think so.
 
Yeah, that's my thinking too, and also, it's a validation of my experience and knowledge. If I wrote a bad answer, I need to know it, otherwise I can't learn.
Thanks Santa.
 
@rolfl I'm not sure what you are trying to say with your answer... that the OP's code is broken? Or that your rewritten code is not working?
 
hm, my 0-vote accepted answer (how rare btw!) just got an upvote!
Thanks Santa :)
must be a miracle
 
Christmas it seems.
@SimonAndréForsberg Neither? Both of our codes are working.
mine does it using a boolean XOR instead of if-statements.
(but I am trying to say that even though the boolean logic XOR is what the exercise probably wants, I would still write it with an if-statement)
@All .... I'm not particularly happy with that ^^^^
 
not happy with what exactly?
 
almost half first-post reviews go through 'no action needed'.....
 
@rolfl What's that? mod flags?
 
2:15 PM
@rolfl I think you should add this sentence to the answer
 
Hahahahahaha. I just saw this.
I think that the top 50 users on Code Review should be given an unlimited amount of stars for chat everyday, we have earned it! — Malachi Oct 1 at 19:03
 
@rolfl when users have 101 reputation, I sometimes click 'No action needed'. When they have 1 rep, I more often try to comment, vote, or something.
 
That ^
Not always, but I do try.
/runs off to check his history
 
btw I @rolfl I hope you don't mind I edited your answer, because it seems you forgot to do it in the end: codereview.stackexchange.com/a/66955/12390
 
2:22 PM
@syb0rg / @EngieOP / @SimonAndréForsberg / @Morwenn - (people with 'no action needed' on front page of first-post review queue history): First Post Review Queue - what is it?
No action needed is occasionally useful, not saying it isn't, but it is being used in places where it should not be.
 
I'd like the front page to look more like that ^ myself.
 
Wait... Does that link direct everyone to their page?
 
(do those links work for you all?)
 
all these links seem to point to my own history, despite the different userId param
nope
 
2:25 PM
@rolfl for some reason those links don... yeah, exactly...
 
OK, works for mods only.....
(and your own profile.
 
Lol. Yeah. That.
 
Mine looks like:
 
@rolfl In your project euler answer couldn't you shave off two /2 by doing that at the end instead of each term?
 
trusted users can see all the history though, so wouldn't be too hard to filter it... heck, I bet I could even make a Python script for it... I'd just need to give Python access to my user profile, hmm.... crap.
 
2:27 PM
(yes, there's a no-action-needed).
Jamal is just 'Reviewed' all the way through.
(one no-action needed, actually).
@TheKittyKat premature optimization:
This question has "efficiency" in its title? — TheKittyKat 1 min ago
 
I'll admit, I hit the skip button more than I like, but I'm always iffy about saying it looks good or not (broken or not) for questions about Python, Haskell, etc.
 
Sorry then....
 
In reality, @TheKittyKat, the code performance sucks until the optimizer kicks in, and compiles the method. When it does, it will likely do the shift anyway. Further, when the outer function gets optimized, the sumOfSequence will be inlined, and then re-optimized anyway. It will do things much faster than you expect.
 
I really need to learn this. codereview.stackexchange.com/a/67111/41243
Mostly so I can post answers like Monkey.
 
So I shouldn't worry about learning optimisation methods because the compiler will do it for me?
 
2:38 PM
@rolfl If absolutely necessary, you could even force the JVM to compile it when starting up
@TheKittyKat What you want to learn to optimize is asymptotic performance, going from O(n^2) to O(n log n) for example
 
Hmmmmm, sorry
 
nothing wrong at all about Skip, right? @rolfl -> @RubberDuck
 
Nothing wrong with Skip. If you don't have something to say, then leave it for someone who does have something to contribute.
This answer... am I missing something? : codereview.stackexchange.com/questions/67103/…
 
@rolfl I'm also missing something there... I don't really understand the explanation and it seems like using Java meant to him that he could answer it using any JVM-based l anguage?
If it even is a JVM based language
 
Not something that I recognize.
 
2:46 PM
I recognize the language, but I don't know what it is
I was thinking Scala (used in a bad way), but now I doubt that
Unless it has := assignments
 
I think it's psuedo code.
 
1
Q: Simple resizable array

Vittorio RomeoIn some (lower-level) parts of my codebase I often have the need to allocate resizable array storage for certain objects, that usually are not default-constructible. I created a simple class using std::aligned_storage and I was wondering if it's safe and if it can be improved. The user of the c...

 
3:11 PM
@RubberDuck yup, that's what I would call it
 
0
Q: Formatting database like table

user56371The goal of my program is take some headers and fields and display a nicely formatted table like this: +----------+----------+----------+ |First name|Last name |Middle | | | |initial | +----------+----------+----------+ |This is a |This is a |This is an| |line. |longer...

 
3:41 PM
0
Q: how can I make my dp solution to mintriangle path better?

Mark IsenbergI am studying for interviews for various companies, I wrote a solution to this problem, but if an experience programmer looks at it I am sure there are certain areas the code can be made in to a more beautiful code, any suggestions and recommendation would be appreciated to make me a better softw...

 
3:55 PM
0
Q: Guard statement extension methods for common object guards

Nick UdellI wrote a couple of extension methods for common guard statements I write a lot. These are extension methods for Object, and allow me to quickly guard against common scenarios. I'm using .Net 3.5 (Unity3D) so sadly I don't have access to Code Contracts in this project. My main concern with this...

 
4:08 PM
@skiwi @janos I can highly recommend watching this video next time you eat chocolate: wimp.com/cocoafarmers
 
bookmarked
 
4:45 PM
what am I missing there @SimonAndréForsberg ?
I don't see wasted steps, and opportunities to optimize
you have to traverse all the elements, and I traverse each precisely once
am I missing something?
 
0
Q: Custom Linked List implementing Iterable used as stack

Ishan SoniI have created a custom linked list that implements the iterable interface. I am then using this linked list to implement my custom stack.I have also thrown custom exception while removing elements.Below is the code : 1)Linked List class: package collections.customCollections.linkedList; impor...

 
@janos I'm debugging the OP's original code now, it does indeed look like the OP is using pretty much the same algorithm, in which case your version is of course better.
 
@syb0rg -Santa rewards the efforts, nice. I still want to try one more thing there, but I'm not sure I'll have time to finish today.
 
@janos Does it involve writing a faster strstr() implementation? Cause I think that would cause a minor speedup, and I was thinking of writing an answer on that.
 
@CaptainObvious while (!me.finishedWithLastQuestion()) { Thread.sleep(60000); }
2
 
4:51 PM
@syb0rg no, it's about eliminating some unnecessary copying
 
Ah, got it
 
I don't want to divulge too much before typing into my answer :p
 
I'm wondering what delving into assembly would do for speed
To bad I don't know it well enough
Context for everyone else btw: codereview.stackexchange.com/q/67055/27623
 
0
Q: I am recieving 'user_max_connections' often and it says this code is the problem, I am not knowledgeable enough to know why?

MattI have been receiving lots of 'user_max_connections' errors because of this code. Please help. I do not understand why really. I am hosting with iPage and only have about 100 active users or less on site. Most I have at any given time is 20. Here is the code : (I am trying to count unique vie...

 
5:09 PM
@janos I think I have found a better algorithm for the triangle:
0
A: how can I make my dp solution to mintriangle path better?

Simon André ForsbergCode Style Although not the most important aspect of programming, I'd recommend using a bit more spaces in your code. Just a few random example lines: dp[level][index]=tri.get(level).get(index); if(dp[level+1][index+1]!=0){ right=dp[level+1][index+1]; dp[level][index]=tri.get(level).get(in...

 
nice try, but I don't think it makes any difference in this problem. I think you'll see when you actually code it
anyway, I'm going to the movies now
really hoping I will have capped by the time I'm back
 
-1
Q: Latex in HTML/CSS - How to make mathematics on the same line as text

SextonEconomicsI'm wondering how to write Latex code on the same line as text in HTML? Currently I'm using src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" in the script tags, which allows me to include Latex in my HTML code. I use the standard double dollar sign, which wi...

 
5:27 PM
@janos I also was considering that it might not be that easy. I think that it will be worth it though, and that it is a better approach in many cases.
@Mat'sMug I've missed you, Santa!
 
Only 50 away from 10K... maybe someone will ask a question for me to answer?
 
@syb0rg Or maybe some Santa will look through some of your previous answers.
 
oh look, we have a new 10K user!
 
@Mat'sMug Good, then my Santa's job is done.
Welcome to 10K, @syb0rg
4
You've actually taught me something, didn't know about the empty-parameter methods in C and 'function lists' until now.
 
5:47 PM
Congrats, syb0rg! Now we continue towards 20K. ;-) get back to work
2
 
6:10 PM
@SimonAndréForsberg You should use interrupts, busy waiting is bad
And you might miss out on questions like this ;)
@syb0rg I've got one which I need to have done tomorrow evening...
Except, that I'm still yet to get started
 
What's this project on?
 
Still from university, and I frankly have no clue
Maybe I should look it up or read the assignment
"Condition variables", still sounds abstract
1
A: Bounties do not seem to achieve the desired effect

Nick UdellAnecdote time! I've personally found that for the 2 bounties I've applied, I've either gotten at least one answer (typically when the bounty first goes up, or as the bounty approaches expiry), and in the cases when I haven't received an answer (and often when I have), people have upvoted my ques...

 
0
Q: How do I decrease compile time and execution time of following program?

Aditya Vermahow do I decrease the running time and compile time of the following code ? public static void main(String[] args) { Scanner in = new Scanner(System.in); int cases = in.nextInt(); long A,B,K; int caseNum =0; while(caseNum < cases) { A = in.nextLong(); B =...

 
Can you please add a description of what your code does? You'll get better reviews if you can explain in a plain English what your code is supposed to accomplish. — RubberDuck 2 mins ago
thanks, @RubberDuck
I'm afraid we soon have to go on an offensive on these low-quality no-description-whatsoever questions.
 
6:28 PM
0
Q: Effeciency Project Euler #1

yadav_viSeeing everyone else code for Project Euler's Efficiency problem. If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000. This is my solution. Can someone poin...

 
Today Project Euler #1, tomorrow Project Euler #2, in the future Project Galaxy.
 
@CaptainObvious how can I increase goodtitleness of this post?
 
@CaptainObvious If you have seen everyone else code for that problem, why haven't you read some of the answers and just implemented the fastest O(1) algorithm?
@skiwi And every day: fizzbuzz and linked-list.
 
6:40 PM
Np @Sim. I've been wondering if I shouldn't be downvoting them too.
 
@RubberDuck especially when they are old users, I down-vote these days. I am a bit more hesitant to down-vote new users. But perhaps I should down-vote even those more often.
 
-1
Q: C Programming..

Johni have this practice question that i have an answer to; printf("\nStage 3\n========\n"); /* count points with sound levels above danger limit */ danger = total = 0; for(i = 0; i <= SIZE; i++) /* over length */ { target.y = i; for(j = 0; j <= SIZE; j++) /* o...

 
Speaking of downvoting @CaptainObvious... I think that qualifies as unclear.
 
6:57 PM
Such title, much wow. What is LIMIT, target, danger? What does spl_total() return? This is incomplete code. — EngieOP 10 mins ago
closed
> Such title, much wow.
 
00:00 - 19:0019:00 - 00:00

« first day (532 days earlier)      last day (3480 days later) »