« first day (882 days earlier)      last day (1884 days later) » 

12:00 AM
RELOAD!
There are 1558 unanswered questions (94.3267% answered)
 
Hmm, this is unusual, but I actually found my answer... from a Code Review post!
4
 
1
Q: Filterable image grid

EricI'm building the user-interface for an academic website using JavaScript, jQuery, and Handlebars. I have just added a new feature, which shows the user a grid of objects and allows them to arbitrarily apply a number of filters. The grid is re-rendered dynamically from a Handlebars template. You ...

 
5
Q: Four-function calculator with roots and powers

RinslepI have some code for a calculator, and I was wondering what I could look at to make the code smaller, easier to read or better in any way. I'm particularly looking at my global variable x. Is there any way to change the code to completely remove that? Someone mentioned a getTwoInputs() function, ...

 
I would highly recommend that you get your code reviewed. Trying to instantiate an object like this seems highly suspicious. — nhgrif 11 secs ago
 
o hai
 
12:08 AM
@Zak My interpretation of that was, "I think my code works, but my implementation still may be wrong".
 
Hey @nhgrif
 
My company is still hiring.
Also, they're opening another office...
 
Where at?
 
Fayetteville, AR
 
How're things, besides that?
 
12:13 AM
Busy.
 
@nhgrif Mine is too. Approx $3000 bonus to anyone who finds a Java/Test person.
 
12:33 AM
I think this would be better on code review. — Evan Carslake 51 secs ago
 
0
Q: Multithreaded Mandelbrot

JustinSeeing as it's October, I thought I'd do the community challenge. Due to my inexperience coding in Groovy, I decided to give Groovy a go. I'm not sure how well I followed Groovy conventions, and the rendering is quite slow. Mandelbrot.groovy package mandelbrot import groovy.transform.CompileSt...

 
@SimonForsberg hey look a Groovy question!^
 
Oooh! I am not alone!
 
12:48 AM
Wow that math looks really complicated
 
1:04 AM
unfortunately I have very little mandelbrot experience
 
0
Q: Remove nodes from linked list with given value

Chris YatesI'd like to know what it the most standard/efficient/elegant solution for this simple operation. I handle the case where head is node to be removed in first if, the following if is the general case when it finds node with val and then the other if is for the case when val doesn't match, it update...

 
what do you mean by code review please — Dev just now
 
1:23 AM
@Phrancis Weekend here too - with viruses and midterms.
Not my idea of a nice weekend.
(I don't the virus yet...)
 
2:08 AM
God help me, I just posted an answer on PPCG
3
0
A: Shortest infinite loop producing no output

Mat's MugVBA (immediate pane), 7 characters This will freeze up the VBE and its host app: do:loop

 
There's a code review question on DBA with a +250 bounty, if anyone is interested.
9
Q: Access (Jet) SQL: DateTime stamps in TableB flanking each DateTime stamp in TableA

mpagFirst Words You can safely ignore the background on down if you just want to take a crack of the code. The background, quirks and next steps just serve as context. Questions is there a more efficient way to generate the closest before-and-after time stamps? Is there a more intuitive way that ...

I'll also pimp my meta post while I'm at it.
4
A: Should I have posted at CodeReview instead?

200_successYour question would be on-topic on Code Review. However, it is also on-topic for DBA. By Stack Exchange policy, being a better fit on another site does not make it eligible for migration; only questions that are off-topic on the original site may be migrated. (Many questions are asked every da...

 
@200_success Ew and it's Access too, no wonder nobody on DBA has really touched it
 
lol, earning that bounty would more than double my DBA score
 
Take a crack at it dude
Wait, Paul White put the bounty on there?? Now that surprises me
 
would suggesting to ditch the composite PK and use an int instead work?
I'd keep the unique key (and prefix it NK_ for natural key), and use an autonumber, single-column PK
 
2:20 AM
Would that have much of a performance impact?
 
IDK, but guts are telling me that joins would be easier to compute off a single Integer than off a composite key that uses a datetime field
 
Wait, the key uses a datetime field???
 
in both tables
 
wtf I didn't know you could do that
 
0
Q: Network chat in Perl

psychedelic_alexI have written a network chat program as my first major project in Perl. It makes simple use of REGEXP's, modules, sockets, command-line option parsing, and forking and uses these features to produce a fairly simple multi-client chat program with a basic nickname system. server.pl use strict; u...

 
3:25 AM
possible answer invalidation by Jamal on question by A.P.: codereview.stackexchange.com/posts/106400/revisions
 
3:47 AM
Mroinking
 
Hi.
 
How goes your evening?
Or, anyone who's <lurk/>ing, really.
 
So so.
Reading Dilbert and waiting for the queue to clear so I can get ready for bed.
 
Oh, lol?
I had an interesting evening.
Tiring, but interesting.
 
What?
 
3:55 AM
I went to see The Martian.
 
Hmm.
 
There was a huge amount of people.
Great movie though. Would highly recommend it.
 
possible answer invalidation by user1118321 on question by user85942: codereview.stackexchange.com/posts/106410/revisions
 
4:18 AM
0
Q: Asynchronous Object Destruction Service

5gon12ederInspired by the recent Stack Overflow question “Safely release a resource on a different thread”, I wrote the following destruction_service<T>. Please refer to the class template's DocString for more information (and let me know in your review if it is insufficient). destruction_service.hxx /*...

 
I took the challenge and implemented an asynchronous destruction service. If this is what you were looking for, I can post it as an answer as well. — 5gon12eder 25 secs ago
 
slow CO
 
0
Q: Optimizing Performance

rolflOver the past years(?) there's been a debate about the status of the optimization, performance, memory-optimization and code-size-optimization: January 2012: Tag synonyms (optimize -> optimization) Oct 2013: Tags for [optimization], [performance], [speed] Oct 2014: Should we just put an end to ...

 
Right.... perfect timing
 
Poof. +1
 
4:35 AM
0
Q: Print a "shebang" line, or append it to a file

ssdecontrolThis is a sort-of-useless "utility" I wrote to learn my way around shell programming better. It ended up being kind of long, so here's a link to a Gist containing the code: https://gist.github.com/gwerbin/71a67eb13baef89c33b1 My concerns are: Is the code readable? Could it be more efficient, ...

 
4:50 AM
possible answer invalidation by Jamal on question by Celeritas: codereview.stackexchange.com/posts/56481/revisions
 
0
Q: Add user and image upload script

JAVA_RMI//Controller <?php class Traveller extends CI_Controller { public function __construct(){ parent::__construct(); $this->load->helper('url'); $this->load->helper('form'); $this->load->library('form_validation'); $this->load->library('upload'); $this->load->database(); $this->load->model('Cou...

 
 
1 hour later…
6:26 AM
0
Q: Best Practice of Storing Option Value

overshadowCurrent I have a design that use to store user selected option in database but I am not sure what I am doing is good or not. I need some opinion, suggestion and criticise on the design. Pre-Condition: The option is not always going to change A lot of options is going to be used Database Desi...

0
Q: Implementing Mutex

user3337714I am new to C and I am trying to implement Mutex. The idea of the program is Main will create three threads. Each thread will read one character each from individual files in serial, i.e. thread 1 will read one character store in global and then wait for thread 2&3 to complete the same tasks. U...

0
Q: ***Python rock paper scissors game***

justsomenoob2020I'm new to programming and I'm trying to teach myself Python through some online books. One of the exercises has me making a rock paper scissors game..Now the one I have written works well enough I think but I was wondering if there were more efficient ways of writing the code. Something shorter...

 
Zak
6:59 AM
@StackExchange +1 for the pun alone :)
Also, morning @all
 
0
Q: Bottom up merge sort in C++ - follow-up

coderoddeSee the previous iteration. I have tweaked my bottom-up mergesort so that it accepts not just raw C-arrays but also std::vector. Did not test yet, but I am confident that it can sort std::arrays also. What comes to std::list, it won't qualify for my implementation, yet it does not seem to be the...

 
Morning
TTGTB ;)
 
7:58 AM
I think this kind of question may be a better fit for codereview.stackexchange.comMatt Gibson 10 secs ago
 
8:22 AM
posted on October 03, 2015 by Boring Loop

The purpose of the below program is to learn Mutex and Pthread library. The main() creates three thread. (thread 1, 2 & 3). Each thread one-by-one sequentially, reads one character per file (different file) and stores into the global constant. Example thread 1 reads character 'a' from file1, then wait for thread 2 & 3 to the same (i.e. read 'b' and 'c' fro

 
9:14 AM
@CaptainObvious It's removed, why is it designated as 'Recent Question'?
 
0
Q: T-SQL Pbdfk2 (SHA2_256) Implementation

Kittoes0124Using my previous function as a base I've come up the following: create function dbo.Pbkdf2 ( @password varbinary(max) , @salt varbinary(max) , @iterations int = 1000 , @derivedKeyLength int = 32 ) returns varbinary(max) as begin; declare @hmacLength int = 32; declare @i int = ...

 
Zak
9:27 AM
@Mast I think, occasionally, questions are removed after CO has caught them, but before it posts them.
or some similar phenomenon
 
Zak
9:55 AM
"I would much rather maintain code written like an essay, than code written like a tweet."
I rather like that line :)
 
10:09 AM
Stackoverflow is a Q&A site, not a code review site. flagged... — null 30 secs ago
 
11:03 AM
0
Q: Basic random password generator

boycyI'm trying to pick up some Haskell skills so thought I'd write a random password generator to get to grips with using IO. It was far trickier than I expected and I employed rather more trial and error than I'd have liked. What I've ended up with works, and while I'm happy with it generally I'd l...

 
11:16 AM
Monking
 
@null, that is not a constructive response to a new user who is unfamiliar with SO. codeboxes, This kind of question is best posted on Code Review. Please read the Help Centre on how to format your question first though. — Zak 5 secs ago
 
Zak
@Duga SO, where new users are met with downvotes and flags.
 
Monking
 
Zak
@skiwi Monking
 
"I published it under the MIT Licence" ... "But it is not open source!" ... uuum....? — Simon Forsberg 8 secs ago
 
11:30 AM
if that question comes over here with code, maybe Pimgd will show up in chat again ...
 
11:44 AM
@Vogel612 - was your comment directed at me about the Stream Router, or at the OP?
 
a little bit of both...
but you can safely ignore it :)
OP's usecase is something that doesn't seem really stream-usable anyways.
 
I think my question is a better fit for Code Review, since my code is already working and I'm just trying to improve it. But I don't know how to move this question there. Anyone who can help me with this? — Pradeep Kumar 28 secs ago
 
OK, from my code's perspective, if you use filter() it is match first, if you use peek() it is match all
 
I didn't even think of that.
 
You can also, if you want, combine match "first" and match "rest"....
 
12:02 PM
0
Q: An alarm application in Java

Hassan AlthafI have programmed this alarm application in Java using JavaFX for the GUI. I'd like these questions covered in the review: Is my code efficient? Can it be shortened? Are there any flaws in my code? Do I violate any OOP principles? If so, how, where and how do I rectify them? Alarm.java: /* ...

 
hey @rolfl can I bounce something container and equality related off of you?
hmm... brb overriding #hashCode
aaand that was the problem..
cool
thanks Rubbermonkey
 
You're welcome
 
12:20 PM
@SimonForsberg $3000 USD? Wow.
We're hiring like 50 people right now. Each referral is worth $500 on their first day and $500 if they're still here after 6 months.
And we've already given out like 10-20 of those referral bonuses (at least the first half... program hasn't even been going 6 months yet)
 
that's probably for a Senior position then.
 
$3000? Probably.
We're paying $500/$500 for any full-time position
 
It is standard in many companies to have these referral systems. Typically only for employees referring people, not for other people referring people.
Also, the bigger the company, the larger the referrals tend to be.
 
Right. Only current employees get the bonus for referring others.
 
In the scheme of things, $3000 is nothing when it comes to the actual costs of employing someone.
 
12:27 PM
Well, I say current employees... that does include people who have accepted an offer from us but who haven't actually started yet.
There are employees we have who have earned the $500 on their first paycheck.
 
@nhgrif correction: wolframalpha.com/input/?i=20000+SEK = 2400 USD
 
Additionally, it is a really good way to get employees, because it tends to shorten the hire process, since there is already a good reference that you can "trust" - you are likely to get a referral to someone your staff (will) want to work with already
 
Because typically what happens is we open an office in some area, we manage to snag one great employee out of some big corporate IT department... and then they'll identify the rest of the good devs out of that department.
 
A referral to a person who's crap will have a negative "mark" on botht he person who was employed, and the person who referred them
 
So, because of the kind of shop we are, we have lots of similar projects all going on at once. We'll have like 10 iOS projects, 10 Android projects, and 10 Rails projects.
We've got this cool utility we call "Lineup" which looks at a bunch of different things and gives a overall status of the project on various objective metrics.
 
12:32 PM
@Vogel612 Nope, 2400 USD is for a Java developer, senior or not-senior.
 
@Simon - neither Exibit a nor Exibit B are good examples of your cause.
2
Q: What do you think about this usage of for loop in JavaScript?

InezAlgorithm that I had to write is a perfect case for while, or do..while loop, however I found out that if I will implement it with a for loop I will save few lines of code and also scope of variables will be more appropriate. Take a look at the following code: for ( var i = 1, offset = -...

That should be tagged with neither.
2
Q: How can i improve this code for better metrics?

cypronmayaimport java.util.ArrayList; import java.util.Scanner; /** * * @author cypronmaya */ class Point { int x; int y; Point(int x, int y) { this.x = x; this.y = y; } } public class Quad_query { private ArrayList<Point> arrayList; public Quad_query(int ca...

That should be tagged with performance/optimization
 
@rolfl that didn't seem to ask about performance to me.
 
> How can i improve this code for better metrics?
 
@rolfl My point was that it shouldn't be tagged with performance, so I think it is a good example.
 
@SimonForsberg It should not be tagged with optimization eitherr.
My point is that is just as broken with optimization as it is with performance, and the fix is to remove both
 
12:34 PM
@rolfl Didn't specify what metrics, I was thinking that it could be cyclomatic complexity metrics or something
@rolfl I never said that it should be tagged with optimization.
@rolfl And merging the tags wouldn't fix that.
I can say that I don't have any strong feelings about the subject though, I just wanted to find a reason for "No".
 
@SimonForsberg You sort of did.
> Not all questions that are about optimization is in fact about performance, there have been many other kinds of optimization questions as well. Merging these tags would make it appear that they asked about performance when in fact, they did not.
 
Things like "and so on" are signs of stub code. But with that said, your string backed enums won't compile, since you didn't get them any backing strings... — nhgrif 30 secs ago
This one is also broken:
0
Q: UITableView filtered data has incorrect index

MwcsMacThis my code to filter data from my CoreData and it provides the corrected data but if I go to details of the record it gives me the wrong data. Meaning I have detailed VC that shows a larger image of the camera. So if the index is lets say 1 with the filter data but the real index of the camer...

So anyway, our Lineup tool does things like check whether or not your program is using Crashlytics (a tool we use for collecting/aggregating crash reports). It checks whether or not your git is set up correctly. Checks whether or not your project has a Jenkins build plan. Checks whether or not your project is integrated with our Hipchat. Checks whether or not your automated tests are passing (and where we can, we're checking test coverage--we have it for Rails...
...Xcode 7 has added it, so we'll be adding that soon).
 
@rolfl "other kinds of optimization questions" may be things like "code optimization" (shortening code) and just any other things that can possibly be included in the way-too-broad "optimization" tag. And I should have said "not all questions that are tagged with optimization"...
 
I thought we agreed that shortening code is generally covered by the tag.
 
@SimonForsberg Hmm... while you are right, but I think you're missing the point that the merge won't make any existing mis-tagged posts any worse. If they are currently mistagged as optimization then they will still be mistagged as performance.
 
12:40 PM
Because a) blanket shortening uncompiled code doesn't generally help anything, and b) minimizing the size of your executable is something we generally only care about in embedded environments.
The exception to shortening uncompiled code was only in reference to asking about web languages, but when last we looked, no one was actually asking those sorts of questions, and if they were, we had suggested that something like would be the tag.
 
@rolfl Considering my opinion that the optimization tag is a bad tag, you could say that all questions about "optimization" are mistagged, or that all questions about "optimization" is correctly tagged (as optimization can include almost anything)
@nhgrif I don't think so, that tag is something entirely different and is not something I am trying to discuss right now.
 
Hmm... taking a step back, there are only three courses of action at this point:
1. do nothing, and have optimization hanging around like a bad fruit
2. un-synonymize it, and get the tag separation we started with
3. complete the merge, and remove a bunch of inconsistencies in searches, etc.
It irritates me that my profile keeps suggesting as a silver-badge candidate.
Here's a "funny" story.... was recommended for me, with a score of > 400 score and 79 of 80 answers.....
So, I dug through the history of the site, and found a question from back before the merge, and answered it.....
I waited till after the batch process awards tag badges.... and, no badge.....
I go check, and the activity on the post caused a question edit, which, in turn, caused the tag to be changed to performance.
 
@rolfl 4. go through the optimization questions and re-tag appropriately?
 
@SimonForsberg There are >1200 of them
 
Still an option.
 
12:54 PM
including hundreds (well 177) with both performance and optimization tags.
 
those can be easily SEDE queried and edited easily. I think there's a way to edit questions with SE API even.
 
Anyway, back to my story, conclusion: I have now answered 77 optimization questions.... my answer count is steadily going down.....
 
No badge for you!
2
 
@SimonForsberg The merge will do it without affecting the question activity, or bumping the front page.
It will clear up duplicate tags too (so, no double-tagged posts).
Also, every question you are now concerrned about re-tagging is already being reported by a search on .
(also, every performance-tagged question is reported in too.
 
true that.
 
1:07 PM
So, to continue the story above about our Lineup tool... we can apply regex to files in order to check for things people are doing but shouldn't be doing in code.
Like using the ! operator in Swift.
The optional force unwrap, not the Boolean inverse
 
Zak
It sounds pretty cool :)
Mind you, I say that about most tech that does thing I have no idea how to :)
My favourite is still ALADDIN though. (That's BlackRock's IT platform which holds, analyses and administrates about 5% of ALL the investment assets in the world).
It's got a development budget of £500 Million a year
plus, I find the acronym amusing
 
1:33 PM
ohmigawd the code I wrote is gruesome.
adding a node to a Trie: 90 LoC... wat?
 
Trie's are hard-ish. What language?
 
java
 
Using Collections? (a Map?)
 
I made it complicated on myself.
nope. nodes.
and not character-based, but string based...
so I don't have a node for each character, but a node for each prefix.
 
OK. Interesting. Sounds like you may be overengineering things.
 
1:40 PM
Good morning!
 
It is ;l)
 
@rolfl probably, but at least it's a good challenge for my unit-testing skills
and my thinking
 
Man, for going to bed at 12:30, I'm actually not tired.
 
12:30? that's cute.
that's when I left at my friend's after playing "Munchkin Quest" for 'bout 2.5 hours
 
lol
I was up until 5:30 in the morning on some group "retreat" thing playing GTAV once.
 
1:44 PM
yay: 91% coverage, tested 106 of 116 relevant lines
the only thing left is finding matches for prefixes.
 
-1
Q: Bootstrap modal popover not working

Arun karthi ManiI am new to bootstrap Since my modal is not working , It shows a black screen alone not popup This my html code in head tag <link rel="stylesheet" type="text/css" href="../public/css/dashboard.css"> <link rel="stylesheet" type="text/css" href="../public/css/animate.css"> <link rel="st...

 
I wonder... should I doubly link the nodes...
 
1
Q: 301 Redirecting

Kid DiamondIs there anything I could do to improve the following .htaccess code? Options +FollowSymLinks RewriteEngine On # Redirect non-www to www. # http://{domain}/ # http://www.{domain}/ (extern) RewriteCond %{HTTP_HOST} !^www\. RewriteCond %{HTTP_HOST} !=localhost RewriteCond %{HTTP_HOST} !=127.0.0....

 
Zak
@RubberDuck I feel like we're not getting through to him about the importance of making his code readable.
 
2:30 PM
Hi, this question is better suited for code review, where people could analyse your code and find where is it failing. SO is in general for more concrete programming/language related queries. As for your question, I didn't read the whole code, but if it is stoping after calling takenotes function, is because you have some errors. Maybe not syntax errors (so the code can run and finish), but you have some logic errors (like exiting the while loop when it shouldn't). — imaluengo 20 secs ago
actually @imaluengo that's wrong. Code Review is a site for working code, not for failing code. This means: Code must not only run, it must produce correct results, as such this question is off-ropic for Code Review. For more information, please see: meta.stackoverflow.com/questions/253975/…Vogel612 56 secs ago
@Vogel612 Ouch! Didn't know about that, sorry. Completely thought CodeReview actually was to review code and find bugs (as your linked question states, I'm one of those who didn't read CodeReview's help, but I just learnt a good lesson). Thanks! I will think twice before recommending codereview again! :P — imaluengo 41 secs ago
 
~converts ++
 
2:52 PM
@Zak To be honest, it was a crappy question. Would've gone down on CR as well.
 
Zak
@Mast Depends if they read the help center first.
 
@Zak The question as-is.
 
Zak
Eh, I like to give new SE users some slack
 
Or easy to maintain @Zak...
You can lead a horse to water, but can't make it drink.
It's best to just let it go.
 
Zak
2:56 PM
@RubberDuck aye. I've given all the important advice I feel I can on his code.
 
"I didn't put any error handler, because depending on usage purposes, it can take different shapes." @SorinGFS, no offense meant, but that's nonsense. Utter nonsense. There are obvious cases and ranges this function is meant to work within. It should be validated that the call to it is valid. But hey... If you're ok with undefined behavior, it's your headache, not mine. — RubberDuck 1 hour ago
It's his headache, not ours.
 
0
Q: Is there a better way to implement a generic class and choose a collection based on a type

CeldorIn this topic here I have aksed for help to sort out an error while creating a generic class whose method can return a different collection given a type. I have got the answer and working solution but I have a feeling the problem is not sorted in proper way. That is why I came here for a review....

0
Q: A web crawler for scraping images from stock photo websites

davegriI created a web crawler that uses beautiful soup to crawl images from a website and scrape them to a database. in order to use it you have to create a class that inherits from Crawler and implements 4 simple methods. get_image_page_links() returns a list of the a tags that link to each images in...

 
Hi
 
Hello
 
I was thinking about a program for RoLlErCoAsTeR casing in Haskell
*A function to be more precise
A simple problem like this already uses infinite lists and higher order functions
rollerCoaster = zipWith ($) (cycle [toUpper, toLower])
 
3:28 PM
0
Q: Basic Container class and KeyParser class

Jon LamerI have written a basic Container class, which is able to hold data by key-value-pairs. The keys can be notated as an array (e. g. ['database', 'host']) or a string, which consists of individual keys concatenated by dots (e. g. 'database.host'). Container class class Container { /** * Data...

 
Any SQL guys around?
 
@Hosch250 Phrancis was here not too long ago
 
So was rolfl.
 
Yo
SQL guy here @Hosch250.
 
"Select [Field] from inserted" should do it.
Yo back, @RubberDuck.
 
3:31 PM
Ahh. I love the smell of triggers in the morning.
 
Yep, working.
Now I just have to see if it really works.
Ugh, it isn't working.
Well, it is working - it is working too well and always throwing.
 
3:56 PM
0
Q: Find order to install dependencies using javascript

Daniel KobeGiven a Javascript map object of dependencies and their dependencies, determine order to install them Example => Input = {     p1: [p2, p3],     p2: [p3],     p3: [] } Output = [p3, p2, p1] I really feel like theres a dynamic or recursive solution to this that I cant fig...

 
4:19 PM
Ah, I hadn't build my If right.
 
4:49 PM
@JohnBollinger it would be good for Code Review SE if it was fully working, or at least mostly working, passing most test cases. That's not the case (yet). The corrected version (using my answer below, for example), will be good indeed on Code Review, for further improvements, optimization — janos 35 secs ago
 
5:01 PM
If this code works it is probably better placed under codereview.stackexchange.com. — Andy 17 secs ago
 
5:23 PM
Asking for a general review of your code (to rewrite it in a shorter form, as you asked for here) is too broad for Stack Overflow. As such I've migrated your question to the Code Review Stack Exchange site, where this questions like these are on topic and welcomed. — Martijn Pieters ♦ just now
 
0
Q: While loop efficiency in Python

s.zainI have created a quiz in Python that will generate a series of 10 questions to test the basic arithmetic skills of primary school children. To do this, I have used a while loop and random functions to generate random numbers and operations. This is my code that I have completed: name = input("Wh...

 
5:45 PM
0
Q: Is there a way to reduce the execution time of the following code

Kenil FadiaI am a beginner trying to learn javascript at Hackerearth. There was this problem: Marut is great warrior. Marut loves his girlfriend Shizuka very much. Being jealous from Marut's love, the Devil kidnaps his girlfriend. Hence, Marut declares a war against the Devil. The devil decides to send his...

 
@CaptainObvious Run it on a faster PC
2
 
5:58 PM
@skiwi Why should put a huge red IN CAPITAL LETTERS pop-up saying to new users. "Title must explain what the code does"
 
Zak
@Caridorc I feel like that's not the biggest problem. Maybe IS YOUR CODE ALREADY WORKING AS INTENDED?
2
 
@Zak ^ That is even better
 
6:17 PM
It seems that your code currently works, and you are looking to improve it. Generally these questions are too opinionated for this site but you might find better luck at CodeReview.SE. Remember to read their question requirements as they are more strict than this site. — Kyll 24 secs ago
 
user image
7
 
Love it ^
 
Zak
I want one :)
 
0
Q: A more optimized way of finding prime factors

Pournima BedarkarI've solved Project Euler #2, but solving the same in Hacker Rank which has time constraint of < 4 seconds doesn't work. I've tried using the square root solution for speeding up but it fails. Example: The prime factors of 10000001 are 11 and 909091, we have sqrt(10000001) = 3162, if we check ...

 
Zak
6:33 PM
It's the season for all my favourite TV shows to start up again :)
 
0
Q: Dependency injection with Factory pattern sample code

Uporabnik003I'm trying to understand and learn about the SOLID principle and especially Dependency Injection (DI) and Factory pattern. Some background: I have a production application that uses some "helpers" classes but those are all-in-one classes that I just copy into each new project. One of the (most ...

0
Q: Find common "characters" in 2 given strings

Maroloccioimport java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; class CommonCharacters { @SuppressWarnings("boxing") private static String commonCharactersOf(St...

 
7:19 PM
-1
Q: Design pattern to create / load / save a file in object-oriented ways?

Ray KoopaEver since I loaded files into an object-oriented class hierarchy, I always had issues picking the programming style of how to load the data from the files (or streams), save it back to files, and how to allow the user to create a completely new instance of the class, and I wonder what is a good ...

-1
Q: This could be more efficient

Chris_topherI'm still pretty new to JavaScript. I'm making a game to get a better understanding. Although it's working exactly how I want it to right now, the code could definitely be less repetitive and more organized. I'm just not sure how to go about that. I'm hoping someone can take a look and simply giv...

 
Why all the downvotes? For those of you who don't like numerical or scientific programming, go look at other questions. This is a good question that is well suited to this site. The scicomp site is still beta; migration there is not a good option. The code review site doesn't get enough sciomp eyes. What the OP did happens quite often in scientific computing: Construct a problem in a symbolic math program, ask the program to generate code, and don't touch the result because the generated code is such a mess. — David Hammen 9 secs ago
 
What should you do to a post if the OP has not tested their code, but they say that they think it works. Does that go under "The code works to the best of their knowledge"?
 
Zak
@SirPython I think, in that situation, they don't get benefit-of-the-doubt if their code appears not to work.
But assume that it does unless there is evidence otherwise
 
thanks. I'm pretty sure it's not broken; does it violate community norms to just ask about structural and conceptual issues and assume it's working? (I ask while slipping off to give it a quick test :-) ) — Paul Gowder 57 secs ago
 
0
Q: OO structure for holding and scoring exam data (Baby's First Objects)

Paul GowderSo my mind more naturally works in imperative & functional styles, not so much object-oriented. But I'm writing some code to administer and grade multiple choice exams. I'd like this to be easily reusable, and I don't really want to have to do things like lay out quizzes and score them, with a ...

 
 
1 hour later…
8:32 PM
 
0
Q: Converting partial XML (Node List) to a String

PM 77-1I have a need to extract a part of XML tree (everything under root) and convert it to a string. (The result string will be later pasted inside XSL-FO XSLT file.) The above functionality is a part of Java 6 application. I use org.w3c.dom, javax.xml.transform, and javax.xml.xpath. Still in the d...

 
possible answer invalidation by fervic on question by fervic: codereview.stackexchange.com/posts/106285/revisions
If you want a code review rather than have a question, post to codereview.stackexchange.comDan Guzman 28 secs ago
Your code is very un-Ruby-like. I'm guessing you've come from a language that makes heavy use of indices. Ruby doesn't. Instead, it mainly uses enumerators and blocks. You'll have to break that habit to use Ruby effectively. Once you've fixed you code I suggest you post it at Code Review. There you will get good advice on how to improve it. — Cary Swoveland 13 secs ago
@Andy: If he posts the code at codereview, it will be closed as off topic, as the code doesn't work at all. — Guffa 16 secs ago
 
9:00 PM
0
A: Plugin system for calling methods

iavrFirst, you are not storing &&, but rather &. Why? because plugin1 etc. are lvalue references, and because of the reference collapsing rules. Second, you can use a tuple of references as you would use a reference itself. That is, everything is fine unless you return a tuple of references to local...

 
@RoboSanta Pretty cool bot @janos ;)
 
hey @skiwi
you like it?
nice first JavaScript answer by new user:
1
A: A game of nodes and pixels

SpikeI will only address the repetition in your collision detection code in this answer. The following lines of code are repeated several times: var x1 = $el.offset().left; var y1 = $el.offset().top; var h1 = $el.outerHeight(true); var w1 = $el.outerWidth(true); var b1 = y1 + h1; var r1 = x1 + w1; ...

 
9:16 PM
@CaptainObvious Wow, that's an awful lot of bloat for a challenge.
 
team Santa... you know what to do ;-)
 
9:33 PM
It magically went from 1 to 5
TTGTB
 
9:48 PM
The scope of this SO question has widened considerably.
 
Monking
 
Monking @Mat'sMug.
I believe it's time to broaden the capabilities of my IRC bot.
 
@DavidHammen the Code Review site doesn't get enough sciomp eyes - sounds like a chicken-and-egg problem, and a mindset that isn't helping CR to get any more of such eyes. Same applies to the idea of turning down the scicomp beta site because it's beta - if everyone thought like that, the only site to grow would be Stack Overflow. — Mat's Mug 55 secs ago
 
Afternoon
 
10:02 PM
If only cleaning viruses out of us was as easy as cleaning viruses out of computers.
 
@Hosch250 You and I have very different viewpoints of the difficulty of cleaning viruses out of computers.
 
@EBrown Huh?
Just reinstall Windows.
 
@Hosch250 Not always an option.
In fact, it's less often an option than clearing the virus out is.
 
@Hosch250 what was that magic "100% American" antivirus/malware the other day? It's like homeopathy for PC ;-)
4
 
@Mat'sMug PCMatic
 
10:04 PM
Well, IRC bot time.
Catch you all later, I'm going to add some responsiveness to my IRC bot.
 
possible answer invalidation by psychedelic_alex on question by psychedelic_alex: codereview.stackexchange.com/posts/106421/revisions
 
Oh carp... I made more rep on PPCG than CR today :/
 
@Mat'sMug I refuse to join that site out of principle.
 
10:30 PM
-1
Q: Trouble with mod_rewrite in PHP

Sylvester HilaryI am developing a small website with PHP which has a backend for admin and i want to use mod_rewrite to change the links from localhost/site/adminpanel/index.php?page=sample to localhost/site/adminpanel/index/sample/ but i am having a tough time with it. i ve used the following code <IfMo...

 
@Mat'sMug Where was it that you are at in Canada?
 
0
Q: HangPerson in Haskell

Michael ChavI created a HangPerson game in Haskell and I must admit it feels very imperative. How can I make it more "functional Are there more elegant ways of breaking up the task? The getUserLines function seems to be doing a lot of work. Any additional feedback on efficiency or anything of the sort is als...

 
10:48 PM
@EBrown Québec! :-)
 
11:16 PM
0
Q: Writing the "Camel Game" with Python

justsomenoob2020Hey guys what's going on? I'm currently on Ch 4 Lab 4 in "Programming Arcade Games with Python and Pygame."( http://programarcadegames.com/index.php?lang=en ) In this lab I'm supposed to write the game "camel." After doing a little research on google I still can't find really what I'm looking f...

 
@RubberDuck are you around?
 
possible answer invalidation by Alex_adl04 on question by Alex_adl04: codereview.stackexchange.com/posts/106080/revisions
 
11:33 PM
0
Q: Happy Birthday Program

user1411571I'm trying to teach myself C. I've managed to make this program I call HappyToYou.c (inspired by this video): #include <stdio.h> //#include <stdlib.h> //malloc would need this. #include <string.h> #include <err.h> void sing(char *start, char *end){ printf("%s%s.\n", start, end); } int main...

0
Q: Project Euler #48: Self Powers

mburke05Optimization question here. The Euler problem is here and the description is here: The series, \$1^1 + 2^2 + 3^3 + ... + 10^{10} = 10405071317\$. Find the last ten digits of the series, \$1^1 + 2^2 + 3^3 + ... + 1000^{1000}\$. My solution was uncomplicated, nothing really special: #...

 
11:48 PM
-1
Q: Linked List Automatically sets Head Pointer to Null

cbraunsI am trying to create a program that makes a linked list for a homework assignment. Part of the problem is that I am supposed to be able to add an element with a constructor that receives an int parameter. This constructor is supposed to create a head node with a value (key) of -1 and a pointer t...

0
Q: OO structure for holding and scoring exam data

Paul GowderI'm writing some code to administer and grade multiple choice exams. I'd like this to be easily reusable, and I don't really want to have to do things like lay out quizzes and score them with a bunch of list and dict indexing for things like answers, prompts, etc. I've tried to implement some cl...

 
Can anybody shed light on what the second solution is doing and why it is written this way - on this site, it's the asker's job to tell us what the code is doing and why. I suggest you edit out the bottom part, if you're interested in getting your own solution peer reviewed. — Mat's Mug ♦ 3 mins ago
edit or close?
hold
 
If this code runs fine, it might be better off posted in code review. — wflynny 30 secs ago
 
@Mat'sMug i'd be tempted to close. they say, "I didn't really understand the third argument of the pow function it took here, and I still don't." -- a quick google gives this page "pow(x, y[, z]) Return x to the power y; if z is present, return x to the power y, modulo z (computed more efficiently than pow(x, y) % z)"
 

« first day (882 days earlier)      last day (1884 days later) »