« first day (1329 days earlier)      last day (2681 days later) » 

12:00 AM
RELOAD! There are 3238 unanswered questions (91.9746% answered)
 
12:28 AM
@skiwi lol
 
1:01 AM
If you are looking to improve working code, you might want to look at codereview.stackexchange.comBlorgbeard 25 secs ago
 
0
Q: Custom Sorting Algorithm

PythonMasterI made a simple Python program which takes a list of unique numbers and orders them from smallest to greatest. The algorithm works like this: Take the first number If it is larger than the next number, switch them If it is smaller than the next number, do nothing Continue to next number unti...

0
Q: How can I get better performance of given algorithm (Dijkstra's algorithm)?

leonzI tried implementing Dijkstra's algorithm according to this wikipedia page: Dijkstra's algorithm. However, this code is of complexity O(V^2), and I need it to improve, at least a little bit. What improvements can be made, not necessarily in code, just point into what I need to look at? Also, ple...

 
1:12 AM
1
Q: Vanilla Markov chain in 18 lines

NMOI am looking for advice on how I can improve this code. The objective is to make a vanilla Markov Chain text generator in the most concise way. I'm looking for advice on style, naming, 'elegance', and correctness. import random, re with open("corpus.txt") as file: text = file.read().replace...

 
Greetings to thee!
 
Anyone else getting really bad performance when editing questions?
Monking
 
1:49 AM
@Peilonrayz Always
but it's the spammers being evil
and the sites getting hammered hard
probably
 
Hmm, maybe. Would explain why most of the time was spent downloading things, :/
 
2:01 AM
Posted a question!
My Facade goes up tomorrow UTC.
 
0
Q: American Checkers with AI

Hosch250This is the third question in the series. Number 1 had most of the official two-player rules implemented, and Number 2 was the basic UI. This one has the complete two-player rules implemented, an AI using minimax with alpha-beta pruning. All suggestions welcome, especially those that help me p...

 
@CaptainObvious That was fast.
 
2:20 AM
Unless you have a specific question about the code, you should ask this on Code Review. — 4castle 8 secs ago
 
2:32 AM
Isn't this question off-topic: codereview.stackexchange.com/questions/150608/… ?
It's getting a ton of attention.
 
StackExchange Code Review is more suitable place for this kind of question — AimanB 21 secs ago
 
0
Q: Is a method chain an ugly practice?

Daniel OliveiraIs writing java code in chain like this: _hud.getStage().getCamera().combined an ugly practice? @Override public void render(float delta) { Gdx.gl.glClearColor(1,0,0,1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); _batch.setProjectionMatrix(_hud.getStage().getCamera().combined); _h...

 
possible answer invalidation by PythonMaster on question by PythonMaster: codereview.stackexchange.com/posts/150647/revisions
 
 
1 hour later…
3:46 AM
@Jamal / @Hosch250 - this is off-topic? How? codereview.stackexchange.com/questions/150654/…
I was part way through an answer to it.
 
"How do I improve my code?" These kinds of questions are better suited for the Code Review Stack Exchange. StackOverflow is more for problems in getting the code to work. — Abion47 45 secs ago
 
4:20 AM
possible answer invalidation by Jamal on question by Jason Bristol: codereview.stackexchange.com/posts/27852/revisions
 
4:40 AM
@rolfl Seemed unclear to me...
 
5:05 AM
Whoops, that was the other won I was thinking of.
That one seemed awful stubby.
 
5:28 AM
My minimax doesn't seem to get any smarter as I make it go deeper.
Although, that might be my playing style--blocking until something gives.
Maybe it will play better as black.
Or maybe it is the weighting system I'm using.
 
5:53 AM
@Hosch250 Sorry I never got to your code last night.
I forgot about it until I saw it just now.
 
6:07 AM
thoughts?
 
0
Q: Get nth node from end in a linked list

CodeYogiDescription: You’re given the pointer to the head node of a linked list and a specific position. Counting backwards from the tail node of the linked list, get the value of the node at the given position. A position of 0 corresponds to the tail, 1 corresponds to the node before the tail ...

0
Q: How can i test an ajax call using jasmine

GeekyI am learning jasmine. Stuck with understanding of how can i test a ajax call with and without jQuery using jasmine In the following code.I am getting the initial contacts using ajax call .I want to test this using jasmine.I tried spyon but could not get a complete understanding of it. I have s...

 
6:20 AM
0
Q: Perl module validate quoted string literal, test with Test::LectroTest

Gregory NisbetI guess for some motivation: I ripped this out of a larger library I'm half-working on to parse S-expressions and cleaned it up a bit. I'm trying to write a simple function that tests whether a string is a valid quoted string literal. Using Test::LectroTest to compare a fast version of a functio...

 
@FyodorSoikin "In summary, while I can help you with your specific syntax error, the rest of the code seems off as well." If the OP fixes the syntax error, we would be happy to help them on Code Review. :) — EBrown 47 secs ago
Craig - Close and Open does not work. It has to do with OleDB keeping the Connection in the Connection pool (still in error). So Destroy - Create is one way. Did not know about CodeReview Stackexchange. — Jan Blomqvist 22 secs ago
 
-1
Q: Linear Regression with Gradient Descent in Java

nooberI have written the following Java program to implement Linear Regression with Gradient Descent. class LinReg { double theta0, theta1; void buildModel(double[] x, double[] y) { double x_avg, y_avg, x_sum = 0.0, y_sum = 0.0; double xy_sum = 0.0, xx_sum = 0.0; int ...

0
Q: How to properly terminate threads?

tamraj_kilvishThe following code works fine for inserting and removing an element from a deque using two threads. However, I am not able to finish the thread execution successfully i.e. it does not go to the line "std::cout << "Thread Function Executed Successfully" << std::endl;" I would appreciate any help ...

 
7:10 AM
Better late than never @Hosch250 ^ :)
@CaptainObvious Looks like the Perl code prettify is slightly broken
question is fine though
 
@Phrancis Syntax highlight right. It's the regex. Not specific to Perl
 
@Tushar Yup. The Prettify regexes seem to need a bit of a fix once in a while for some lanaguages
I've actually read the source code for Prettify... talk about a regex nightmare
 
7:32 AM
0
Q: Is there any way to make the method that create points in specific size to be faster?

Ronen BenzurThe method is in a new class and i use it from form1: In the top of the new class: public int numberOfPoints = 100; The class Init method: public void Init() { if (IsEmpty(bmpWithPoints) == true) { bmpWithPoints = GetBitmapWithEllipses(1.0f); } ...

 
8:04 AM
@skiwi Forcing Windows to use a specific timezone might work.
 
0
Q: Improving thread handling for playing videos

anta40This is a simple motion detection using webcam written in Java, based on this example. Basically, what this code does is: while no motion is detected, play a 'blank video' in loop every time a motion is detected, play an 'advertisement video'. once done, go back playing that blank video in loop...

0
Q: Can I write assert a short in Java?

sun-solar-arrowI want my program to input error message if failed assert. So I write: try{ assert value == 0; }catch(AssertionError e){ System.out.println("Failed!"); } but this is so long... Can I write assert a short in Java?

 
@skiwi Judge ruled it wasn't allowed though. Good guy judge.
Striking the Friday before Christmas just because you're bored is a stupid idea.
Also, monking all!
 
I'm voting to close this question as off-topic because question is looking for improvements/optimisations and it belongs to Code Reviews. — Rajesh 54 secs ago
 
9:03 AM
0
Q: Calculate area and perimeter for shapes: polygon, circle, rectangle and triangle follow up

benzThis is the new code after the changes suggested by @Cody Gray in the last question : Calculate area and perimeter for shapes: polygon, circle, rectangle and triangle This is my project on inheritance and polymorphism , I got the main file from my teacher and built the project base on it .My ba...

 
@kobik Question says: "code below seems to be working fine, but can a skilled ADO person look deeper into the code and see any errors/problems or improvements needed" - this is the raison d'etre for CodeReview. You also say: "does not mean it's the correct approach for the problem" - again the very point of CodeReview. You're welcome to go over to CR meta and argue for the domain to be put to rest. I won't stop you, but please don't argue that "the Q is on topic for CR", and so doesn't belong there. — Craig Young 7 secs ago
 
Kaz
9:21 AM
Monking @all
 
This would probably better fit codereview.stackexchange.com than SO. — mpf82 7 secs ago
 
9:45 AM
possible answer invalidation by Cliff Burton on question by Cliff Burton: codereview.stackexchange.com/posts/150592/revisions
@chrki It's only 2 seconds, but that's long enough to wonder if my click worked or if there's something wrong. I also just realized that the problem doesn't occur on Codepen in debug view, but it does occur in full page view. It's definitely a problem with Codepen also highlights an inefficiency in my code that I would be better off asking about in CodeReview as has already been recommended. — Vince 23 secs ago
 
10:10 AM
0
Q: Knapsack greedy algorithm in Python - Simplification

MichaelI implemented the well-known knapsack problem and now I would like to improve it using list comprehension or lambda. I don't want to use NumPy. Could you help me? def get_optimal_value(capacity, weights, values): value = 0. numItems = len(values) valuePerWeight = sorted([[values[i] /...

0
Q: How to optimize the following the code in order to reduce the space?

Rajesh Mpublic JsonResult GetRepairIssues() { JsonResult result = null; try { var repairIssues = from repairIssue in RelationshipManagementService.GetRepairIssues<RepairIssue>().ToList() select new RepairIssueViewModel { ...

0
Q: Creating a list of things by looking up multiple sources

theTuxRacerI am trying to write a rspec webmock test for a rails PORO model. What this model does is, query bugzilla with a set of filters for a list of bugs and iterate over it such that: The bug ids are used to make an xmlprc call to an internal service to get an id This id is used to call another inter...

 
Monking
 
10:28 AM
Once you have a working function, take it over to codereview.SE. There are a number of issues beyond the code not functioning. — outis 41 secs ago
 
@DanPantry Npoljoh
 
Kaz
10:44 AM
@DanPantry Monking
 
10:55 AM
0
Q: Insert node in doubly linked list

CodeYogiDescription: Given a reference to the head of a doubly-linked list and an integer, , create a new Node object having data value and insert it into a sorted linked list. Code: Node SortedInsert(Node head, int data) { Node current = head; Node previous = null; while (curre...

 
As a small code review for you, you should always use interfaces when passing data and not classes. Classes have a constructor, a prototype a bunch of other things that you just don't need. An interface can represent a simple {} object — misha130 7 secs ago
 
11:35 AM
@chillworld You might want to remove this. Question is closed and won't be re-opened.
 
Kaz
12:05 PM
Cleaning data is trying, but also occasionally amusing.
Case in point: 2 "clients". One called "O'Malley" and the other called "0'Malley"
 
Point 1 you can learn through research, point 2 by doing it and finding out. 3 is unanswerable without some objective definition of "better", and should probably be covered on Code Review once you have a working implementation you think could be improved. Please read How to Ask. — jonrsharpe 1 min ago
 
0
Q: craete a data base using structures in c++`

user126504#include<iostream> #include<cstring> using namespace std; struct data { long double id[50] ; char name[50]; int age[50]; int score[50]; }; int main() { struct data database; int i,j,age,score;a char name; int number; long double id; cout<<"enter the number of the students"; cin>>number; for(i=0;i<...

 
@DamienRoche As per your suggestion, I've posted the code in codereview. Here is the link: codereview.stackexchange.com/questions/150684/…Mahesh Mesta 54 secs ago
 
12:22 PM
Monking
Running Linux in sort-of dual-boot with Windows installed is fun buggy
Well, for Windows that is, my icon cache seems to be having troubles
 
@Kaz OCR mistake?
@skiwi Who needs icons anyway.
 
@Mast I do :(
 
0
Q: Rails API for communication between two Rails app where the former app posts data to the latter and the latter return a response

Mahesh MestaThe Controller code for the first app to post data to another app module Api module V1 class OrderApiController < ApiController def send_invoice_data response = Hash.new result = Hash.new debugger order = Order.includes(:status, :user, payment: [:s...

0
Q: Dijkstra's algorithm using priority queue running slower than without PQ

leonzI need to implement dijkstra's algorithm and I've done so using this Wikipedia page. I've done it both with priority queue and without. Both versions work 100% correct, however I need the faster one (priority queue one). The problem is that it isn't faster. My tests show "faster" one runs in mo...

 
12:35 PM
1
Q: Which definition of power is better?

JNevensI needed to write a simple function that could raise a value x to the n'th power. I found out I could write this function in 2 different ways: (defun power1 (x n) "Raise x to the n'th power" (cond ((zerop n) 1.0) ((< n 0.0) (/ 1.0 (reduce #'* (loop for i below (-...

 
Kaz
12:47 PM
@Mast Nope. Just data entered by end users.
 
1:11 PM
Since your code seems to work, and you just want to confirm best practice etc, you should post it in Code Review instead. — Magnus Eriksson 23 secs ago
@MayankGupta Maybe this link will be of help to you. The accepted answer should give you a good idea on how to realize your task in a modern way — Jan Nils Ferner 35 secs ago
 
@Kaz For all you know his name really starts with a zero
5
 
2:00 PM
this should probably be moved to codereview.stackexchange.com - and maybe you should check out insert_multiple()mpf82 32 secs ago
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Using Rails concerns for validation in models
 
2:23 PM
If this is working code that you think could be improved, see Code Review. If there's a specific issue with your current code, give a Minimal, Complete, and Verifiable example. If you simply want help writing your code, that's not on-topic for Stack Exchange; this is neither a code-writing nor tutorial service. — jonrsharpe 25 secs ago
 
2:34 PM
0
Q: produce all multiples of a set of primes up to a certain limit

Vincent MI have some python code that generates all possible multiples and combinations of a given set of primes up to a certain limit. The code runs and does exactly what I intend it to do, now I am trying to optimize it in order to improve run-time. Here's the code: import math from collections import...

 
Give me my hat!
is there a hat that you get for starred chat posts?
 
@Malachi yes, but only at +-12 hours of GMT newyear.
 
figures
I thought there might be another one, Duga was hollering about wanting a hat and he got starred.....
 
3:38 PM
0
Q: yet another piece of chess software

tom1989I've written a piece of chess software which does some validation checks (check, checkmate etc). I've not implemented some of the more exotic chess moves (e.g. rooking, en passant, promotion). I've written the code for a platform where the STL is not available. Thus, std::vector has been deliber...

 
If you are looking for a code review you should move this question to codereview.stackexchange.comDekel 46 secs ago
While you're going to get some concrete answers about your specific problem, the problem itself actually stems from a deficiency in your design so solving the symptom is not going to help you much. There are, though, other stack exchanges that deal with stuff like that - software engineering and code review. Worth taking a look there — pvg 25 secs ago
 
I get Fanatic on meta.CR tomorrow.
 
4:30 PM
-1
Q: Batch command to zip on data base

EdwinI want to create a batch command that will automatically zip a files/logs from the previous day - The batch command should be running on the background - Once the time reach 01:00 am, it should create a zip file of the log created from the previous day. - Then it will loop back again

0
Q: PHP Authentication API

Super Mario's Yoshii created small simple PHP Authentication API, i have couple of scripts that i use for for session, authentication and registration. Since i'm not experienced backed and PHP developer i wanted someone more experienced to review my scripts and tell me what i did wrong and what actually i can impro...

 
CR isn't doing that hot for hats. Heslacher is winning at 14.
I could get on the first page within a couple hours if I tried, but I won't.
@CaptainObvious One more.
 
@Hosch250 First page of what ?
 
The CR leaderboard.
 
@Dex'ter Learn your darn shortcuts.
 
4:36 PM
I hit 15.1k. Just 4.9k until 20k.
 
@CaptainObvious Title == keywords
 
Back in the day, it would have taken me about a month to get there.
 
@Hosch250 You need 163 rep a day to do it in 30, doable but not easy.
 
I used to do that.
 
My goal was to be at 10k by the end of the year.
 
4:39 PM
Harder now, during the holidays, though.
 
Didn't quite make it.
I guess I could if I mortar each and every day.
 
@EBrown You're past 10k.
Way past.
 
Not on CR
That's all my SE rep you're looking at.
 
Oh, right, confusing UI.
 
Damn right it is
 
4:41 PM
That definitely looks like 13.4k on CR with an awful lot of badges.
 
UI bug.
That shows the primary account.
 
I have very few badges compared to you lol
 
EBrown, Toledo, OH, United States
8.5k 1 22 75
 
@Hosch250 It shows the chat account.
Which is SE-wide.
Everything combined.
 
I have way more badges than you guys.
And my tags are all bronze-badged.
 
4:45 PM
I'm at 103/100 13/20 for I think.
 
I'm getting close-ish to a silver C# badge. I need to buckle down and get it sometime.
 
I just need 18 answers for a silver C# badge.
 
This question doesn't belong here. Consider moving it to Code Review. — 31piy 16 secs ago
 
I need 3 answers.
And that will be bronze.
 
@EBrown 22 for me.
 
4:49 PM
This question should be asked on [Code Review][1] [1]: codereview.stackexchange.comSaumya Rastogi 6 secs ago
 
I wrote a C++ answer today, though.
 
I'm 29 rep over the C# silver tag badge requirement.
 
I'm just 61 rep under.
So, I could post 10 unvoted answers before it became an issue.
Anyone have Jeroen's blogpost about getting C# working on OSX?
One of my siblings is interested in programming, but they'll have to do it on OSX.
Although, I should probably have them start with C++ and Stroustrup's book just so they learn the importance of error checking. He's the best teacher of that.
 
@Hosch250 vannevel.net
 
I suppose I could have them do Java or Python, too; I just won't be able to help them as much.
Ah, he setup Node.JS.
 
4:58 PM
As a first language?
Have fun.
Node.JS can be bloody confusing at times.
 
I could probably get it working, but it isn't as simple as plain VS. That will be out, though, by the time they are ready to move beyond Stroustrup's book.
@Mast No, I'm not teaching them JS.
He had an article on doing NodeJS on Linux.
I'll probably have them install Eclipse or G++ and have them start with C++.
 
VIM + G++ = Victory
 
I've never liked Vim, but Atom is pretty decent.
 
No it's the new name of the GPP compiler.
 
brainfart
Nevermind.
 
5:00 PM
GNU's.
 
It's not new either.
 
Steam is down :(
 
@skiwi What? I haven't bought Worms yet and it's on sale today. 80% off or so.
 
@Mast The sales should be exactly the same for the whole duration
Steam is actually down for an hour already
 
Can't be good.
 
5:03 PM
I suppose it's pretty serious
 
0
Q: Function with jquery.alphanumeric

Abu Ayyubi wanto implement jquery.alphanumeric in html pattern, so i use jquery plugin from here, this is my code <input type="text" char-allow="$#*" class="alpha"> <input type="text" char-allow="+-" class="numeric"> <input type="text" char-allow="&" class="alphanumeric"> <script> function setAlph...

 
@skiwi Hit me when it's back :-)
I guess that makes this a good time for some PlanetSide2
I'll save my equipment programming for tomorrow.
 
What does make it a good time For PlanetSide2? ^^
 
Friday nights and Saturday from 12.00 till way past midnight.
Servertime.
But I have both a EU and NA character, so I'm fine most of the time. Lag to AU is not funny.
 
Ah okay
 
5:25 PM
possible answer invalidation by Jamal on question by Super Mario's Yoshi: codereview.stackexchange.com/posts/150696/revisions
 
5:37 PM
I have edited and cleaned up the code as per moopet's suggestions....and outis, I will def try the codereview SE — user3526204 10 secs ago
 
Monking
 
 
I could not understand the meaning of below statement from this answer
List is incomplete

Your list advertises 'createList', 'insertItem', 'deleteItem' and 'deleteLastItem'. There's no way to actually access the items in the list. This seems like a critical bit of functionality. The only way to access the items is by calling 'deleteLastItem'.
 
Where is getItem?
 
oh ok
 
5:57 PM
@skiwi The postmortem of a challenge to implement a ML AI. Not all of it is useful, but there are some tactics you might be interested in.
 
Could someone press the edit button on this question, and tell me if your browser freezes, and the script becomes unresponsive?
 
@Peilonrayz confirmed, it freezes for a few seconds
 
Thanks! Time to go to Meta, :)
 
when I hit the edit button or when I resize the editor
 
6:07 PM
Yeah, I wanted to check it wasn't just me, my system seems to give worse performance however, :/
 
@Mast I don't know what it is, but I'll open a tab for it
3
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Base activity for handling network state changes in Android
 
Sorry for the confusion. There are duplicate persons in column A. So it does not create that many new worksheets; the unique values for persons is ~ ten so it creates ~ ten new worksheets. I can move this to the code review community. — Andes2016 20 secs ago
 
possible "They Live" hat in the making ----> codereview.stackexchange.com/a/150699/18427
 
6:31 PM
@Peilonrayz notice how you can't scroll to the far right of the example output
 
@Vogel612 Yeah I think it's down to the 1000 numbers too
 
SE historically had problems with extremely long lines
in this case it's the prettifier I think
the live-update for it borks. Try changing the language-declaration of the codeblock. That also results in a freeze
 
But Jamal, changed it to language: none
 
that doesn't mean it doesn't do anything
 
@Vogel612 Wait you can't scroll to the end of the code line?
 
6:37 PM
yeap
and as surmised it's a regex making problems:
 
Oh, I can...
 
loading the edit-view with a profiler
dat regex tho... trying to parse HTML with regex...
 
Do you know if there is a Meta question for this, I done a search, but it didn't come up with anything
 
I don't think so ...
not on CR meta at least.
not sure about MSE
 
@Mast It'sowrking omg
 
6:54 PM
@skiwi Still not working for me.
Now even steamstat.us is down. Horray.
 
@SimonForsberg Maybe steamstat.us was sort of DDOS'ing the Steam servers via the API :D
 
7:21 PM
Don't think so.
In fact, from what it looks like, not even everything is using the API either.
 
Seems fixed now?
 
Yup. Now everything is back
@Mast It's back.
 
Lol I queued for a game in Rocket League, get message: "Server is playing a different playlist"
There's 1v1, 2v2, 3v3, 4v4, etc. playlists
 
someone want to upvote all my comments I have made to questions in the last couple of days?
I will give you unicorn money...
 
7:40 PM
possible answer invalidation by Tim Stone on question by PythonMaster: codereview.stackexchange.com/posts/150647/revisions
 
1
Q: Memory test in windows forms

denisI've made a memory test game in windows forms, where you need to find and match 2 cards with the same images. It has 3 difficulties : Easy - 4 different pairs of cards, no time limit, no mistakes limit. Medium - 8 different pairs of cards, no time limit, 8 mistakes limit. Hard - 16 different p...

 
8:06 PM
Please format this and you want to put it on code review: codereview.stackexchange.comJared Burrows 44 secs ago
 
8:39 PM
@Malachi Why?
 
@SimonForsberg I want to get the Blue in the Face Hat....lol I do need a couple more Comments thouugh.
 
@Malachi Focus on writing good comments, not just writing comments for comments sake.
I will upvote the ones I find upworthy.
 
I have.
I haven't been writing willy nilly comments, otherwise I would have plenty by now
lol
anyway, I am going to go and have fun with my Chainsaw! AFK
 
You're... a strange one, sometimes, lol
2
 
9:43 PM
Nothing wrong with chainsaws.
@SimonForsberg Ty :-)
 
10:05 PM
0
Q: Huffman encoding implementation for Unicode

MAGIm looking for a general review with some entasis in idiomaticity and error handling. extern crate byteorder; extern crate rand; use std::collections::hash_map::HashMap; use std::collections::BinaryHeap; use byteorder::{ReadBytesExt, WriteBytesExt, NativeEndian}; use std::{fmt, error, result, ...

 
11:01 PM
0
Q: Worksheet that lists a person's name

Andes2016I have a worksheet that lists a person's name (column A; many duplicate names are in this column) with associated data (columns B through G). I have code below that takes this list of a ~ 1000 rows and then: Copies and pastes each row three times (to create four identical rows for each entry). ...

 
11:15 PM
possible answer invalidation by denis on question by Manioth Shijith: codereview.stackexchange.com/posts/150278/revisions
 
11:57 PM
I killed the minimax in my AI.
I broke a bunch of stuff.
 

« first day (1329 days earlier)      last day (2681 days later) »