« first day (1108 days earlier)      last day (1134 days later) » 

12:09 AM
0
Q: How can i refactor this php mysqli query?

LatheesanI normally develop php/mysql application using framework like Laravel and use Eloquent ORM. But now, I am working on a simple project in vanilla PHP and I have to use mysqli. I looked up the documentation and put together this monstrosity (that works). // Proceed if there is valid request data i...

0
Q: Finding the highest product of adjacent numbers out of a string of X numbers

user3166785Code I wrote for project euler #8. It doesn't seem to work, however. I would like to know why. Thanks! #include "stdafx.h" using std::cout; using std::endl; std::string thousandDigitNumber = "7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858...

 
12:41 AM
0
Q: Program that teaches kids Chinese characters

Dave LinI wrote code that chooses a random set of Chinese characters, asks the user what the characters are, and if they meet a certain criteria they level up (ex. get more than 50% correct). I want to know if there is a better way to have fewer lists, better organization, etc. # -*- coding: utf-8 -*- i...

 
1:38 AM
0
Q: Objective C: Method to check if TicTacToe board has a winner

Smart HomeI have a class called TicTacToeBoard that has a [3][3] array of TicTacToeBoardCells. Doc neck if board has a winner, I check if any of the 8 possible combinations have 3 of these are type. Tech ode is below. Is there any way to make the check of the 8 states more elegant (I am not looking for ...

 
2:36 AM
0
Q: Completed my Custom Countdown Timer class to replace the Android CountdownTimer

p1g1nThis project was made to replace the stock Android CountdownTimer class. It is more responsive when completing the timer and adds additional functionality such as lap counting and start, pause, resume, and stop methods. However, I am not so familiar with threads and was wondering if I am doing...

 
3:14 AM
0
Q: PDO update method

Rob HI am in my first object-oriented project and wrote this method for updating the database. The PDO include is just for convenience, so I could work on a single file temporarily. I'm not entirely clear on how or why to use the __constructor for this particular situation. <?php include 'pdo.php'; ...

 
3:34 AM
-2
Q: excel code,Attachment,Email

user3360134I need to do the following I need to fetch the data from the site and save it into an excel sheet. Attach that excel sheet to an email,write some contents in the email and then send it to the receiver. Can anybody help me to write the above code Please? Thanks,

 
3:52 AM
0
Q: Speed up loop (java) through CSV with no external libraries

Steve RailerSo I'm scanning a CSV file to see which values fit inside of a given box. The CSV file has X and Y coordinates, and the arguments to the function are the perimeters of a box(i.e, top, bottom, left side, right side). I don't want to use any external libraries, part of the purpose of this is to le...

 
 
2 hours later…
6:13 AM
0
Q: How to display treeview selected nodes in a datagridview using c# winform application

Santosh KokatnurI have treeview of logical drivers with checkboxes, now i want to select any folders or subfolders, it should display in datagridview with treeview's full path. please let me know!

 
6:26 AM
user image
2
 
 
1 hour later…
7:36 AM
0
Q: Computer Programming and Fundamentals

MargefieWhat are the procedures for temperature conversion between Celsius, Fahrenheit and Kelvin?

 
oh boy oh boy oh boy. not good
just realised that not only are two db calls next to each other not atomic because they aren't in a transaction (generic repo pattern) but also have different underlying DB contexts because the DI is configured to make each service have a transient db context
leaky abstractions <3
also, everything I said above would have been Greek to me 2 years ago. Wow I've come a long way.
 
@skiwi It's the question answer rate, so not really. :P
Yesterday, we got 6 more accepted answers, 20 more questions were answered, 19 more answers were posted, 67 badges were earned, 65 comments were left, 16 more questions were asked, 4 fewer questions were unanswered, 46 users were created, and 182 votes were created.
Our question answer accept rate went down by 0.0101%.
Our question answer rate went up by 0.0149%, and our answer accept rate went down by 0.0011%.
 
8:00 AM
Naruto answer; accepted non-selfie answer with 0 score: Very Simple UNO Game
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Changing a user status flag, with validation
 
Zak
Monking @all
 
monking @Zak
 
Whattup yo's
@skiwi ^^^ Is that better? "Zombie Rate"
 
7
Q: Do you lose any friendship points if somebody sees you digging in a garbage bin?

user1306322When villagers are too close to you while you're "using" a trash can, they are usually disgusted and say something about it. But does it have any negative effect on friendship?

gaming.SE at it again. *shakes fist*
 
0
Q: Recurrent merge sort (without recursion)

NatFor educational purpose I implement recurrent merge sort without recursion. The algorithm idea seems absolutely clear but my implementation appears to be really slow: 5 seconds to sort 10,000 values; 6 minutes to sort 100,000 values; it was not able to finish 10,000,000 in several hours (while ...

0
Q: OpenGLES doesn't render a thing

AntiMoronHere is my project's url: https://github.com/AntiMoron/AMEngine-iOS I was trying to render a simple triangle with VAO & VBO. But failed. The shader is really simple. It seems the vertices are not rendered at all. I've checked many demo projects still not have a clue. Really need your help! Gre...

 
Zak
8:14 AM
> Malicious Obedience is one of the most satisfying forms of passive aggression.
Made me laugh.
 
@DanPantry I need you
3
Nevermind
I fixed it.
 
@EBrown everyone needs me.
(Now that @JeroenVannevel is not here so often I need to step up and fill in his shoes).
work are looking at getting macbooks
they just asked our team for some people to trial run them for a few hours
I just replied with the scene from Hunger Games where Katniss volunteers in place of her sister
"I volunteer as tribute"
 
0
Q: Node module exports diff approch

Jhon DI've working node app with the following code( I put sample of the code structure) This code in the server.js which is the entry point to my nodeModule function run() { app.listen(3001, function () { console.log("App is listenting on port 3000"); }) } function addPath(args) { ...

 
@CaptainObvious "listenting" sounds like something my ex would say
she used to add "ting" to the end of words. she was also a chav.
i made bad decisions in the past.
 
@EBrown That looks awesome
 
8:44 AM
SO zombie rate.
 
@EBrown zombie leak
6
 
Zak
9:00 AM
@EBrown For a second I thought that'd been smoothed, but I guess 8,000 questions a day will already smooth things out pretty well.
 
9:45 AM
0
Q: Simple ORM architecture

Deniss KozlovsI'm practicing with some structural design and would like to know where this code can be improved. I can't imagine a structure where primary key is defined only once (now it passed in Table constructor as well as Entity interface) since both storage engine and entity need them. The second is,...

 
@DanPantry Upcoming:
 
10:24 AM
Awww, crap: visited 928 days, 1 consecutive
9
 
@rolfl Noooo!
How could you? :(
 
Apparently by playing Factorio. Blame @SimonForsberg
 
Haha :P
 
1
Q: Can this this VBA be streamlined even more with regard to processing speed?

Wayne LouwrensI would like to know from you guys (the experts), if the below VBA can be streamlined even more to process faster, at the moment I am running on average 9hrs to complete a sheet (800 000 lines), and I have quite a few to get through. Running on 3 computers already to get ahead of the work. Any he...

0
Q: how Reverse function of linked list works?

ParvezHi I am new to programming, i have written below function for reversing a Linkedlist I want to know what happens behind the scene when we execute following program. class LinkedList{ static class Node{ int data; Node next; Node(){ data=0; next=null; } Node(i...

 
Even monkeys play games? :)
In honor of yesterday's Formula 1 race I might actually buy a racing seat + steer + pedals + etc. Oculus Rift would be cool, but kind of expensive still
 
10:29 AM
There was a scheduled maintenance in our work lab over the weekend (like demolition and remodelling type of maintenance), including the intentional downtime of our entire power network, so they shut down all computers (there are a lot). That included the VPN servers I use to get to work, so I did not work at all over the weekend..... I guess that means that I did not Code Review on Saturday either ;-)
 
Pretty much maintenance ^^
Hmm... that didn't make any sense, what was I trying to say?
Pretty big maintenance?
 
Zak
@rolfl By logical extension, you should probably blame me too ^^
 
I saw Simon had some mods in his github account, figured the game had to be half-decent.
It is ;-)
 
Man, they should make a game where you review code for points or something, that would be awesome
4
 
Zak
Awkward: "A fake bomb left behind during a security exercise led police to evacuate Manchester United's home stadium on Sunday, disrupting the final day of the English Premier League season"
 
11:03 AM
0
Q: Give the variable length permutations (combinations) of a set of strings

StewartThis code is a proof-of-concept which I intend to convert into a static utility / helper class. I'm looking at this review from a structure or performance viewpoint. Small detail such as whether it prints or returns something, or whether the output is well-formatted, don't concern me too much. T...

 
@DanPantry I mean
You can try..
2
 
Zak
@DanPantry Not just the past :p
 
11:24 AM
0
Q: Tell complexity of my code

funwithlinxint arr[11] = {1, 0, 1, -1, 0, 0, 1, 1,0, 1, 1}; int sequence_count = 0; int loop_count; bool continuity = true; for(loop_count = 0; loop_count<size; loop_count++) { if((arr[loop_count]&ONE) == ONE) { if(continuity) sequence_count++...

 
11:50 AM
@JeroenVannevel How's London?
 
Very British
I'm waiting in bed for the M&S people to arrive with my duvet and pillows
it's a tough day
 
@skiwi I believe that's called CodeReview.SE
@JeroenVannevel Haha, thatl'l be me in a few months. I may very well be moving into an executive apartment in the center of Cardiff, but it won't be furnished.
 
better plan that stuff ahead
the nights are cold when you just have a duvet cover
 
I know, I had that when I first moved in to this place
 
good thing I also had two towels to wrap myself into
 
11:52 AM
0
Q: If Else block optimization for Angularjs Validation

NeelSo I have following piece of code which basically validates five date fields in angular service. But the catch is that there may be one to five field(s) visible on the screen based on some other criteria.So the code checks if one datepicker is shown it will only validate one input.If three datep...

 
I do actually have bedding though, I just won't have a bed (ouch)
@CaptainObvious ouch
 
well you can't want everything in life
 
if I wasn't myopic before, I am now.
Hey @JeroenVannevel I'm trying to procrastinate. What are interesting things I can use in C# 6.0?
I've already incorporated template strings, shorthand property syntax (awesome) and the null conditional operator or whatever it is called (?.)
 
12:07 PM
nameof() is funky
readonly properties are okay
dictionary initializers nobody uses
property initializers are pretty interesting
 
I'm using nameof too
Would you mind putting it as an answer rather than an edit on your question? — Jeroen Vannevel Nov 4 '15 at 10:53
I was looking for an answer. and then I found you.
 
that's me baby
I think it shouldn't be necessary anymore though
I follow the VSCode release notes every now and then and I think ES6 is made default
 
Seems that way
I didn't have too many errors when I opened our work project in vscode
Wish Micro$$ would do the same with VS, though, I get so many damn errors in VS
 
VS only gets an update every 6 months or so
VSCode every month
 
yea but we just had an update
 
1:08 PM
monking
 
0
Q: Graph and minimum spanning tree in Python

Gabriel B S MHere is my Graph class that implements a graph and has nice a method to generate its spanning tree using Kruskal's algorithm. I want to: Make it pythonic Improve readability Improve the abstraction (but not changing the use of outer and inner dicts to represent the graph) Performance is not ...

0
Q: How to calculate and apply realistic velocities when animating sprites

Daveh0I am brand new at Scratch (and animation in general) and have been playing around with various techniques I feel will probably come in handy. My project in question can be viewed at https://scratch.mit.edu/projects/109818118/#editor. It started as a basic, infinitely scrolling background and a s...

 
1:26 PM
Greetings, Programs.
 
Greetings
 
greetings
 
0
Q: Python Performance: How can I make it run faster

yguwI am trying to find matches between two tables by downsampling so that they fit into memory and we are able to find a good number of matches. For one of the tables, I have created an inverted index on one table and I am trying to probe the other table - so that down sampled tables have matches fo...

 
Hello world
 
Hello @Smarticles101
 
1:40 PM
monking!
@Phrancis lol, beat me by a split second
 
Yeah, yours is better though
 
1:57 PM
Monk
 
@Zak Wow, that's plain stupid.
@Malachi *ing
 
@Malachi Monk
 
@Wildcard fits right in with the data leakage tag — user1886419 21 hours ago
 
0
Q: Long Macro for re-arranging data is crashing with large datasets. Looking for suggestions to increase efficiency, if possible

user1996971The following script works to take a large dataset from this form in the Worksheet "List" 1 David Eve Freya Sam Yarra 2 Brian David Eva Harry Paul 3 Charlie David 4 Eva Harry Paul And paste it into another worksheet, "Library," like this: 1 2 3 4 David ...

-1
Q: sherlock and planes challenge

xyzWatson gives four 3-dimensional points to Sherlock and asks him if they all lie in the same plane. Your task here is to help Sherlock. Input Format First line contains T, the number of testcases. Each test case consists of four lines. Each line contains three integers, denoting xi yi zi. Outp...

0
Q: Dynamic Colour Binning: Grouping Similar Colours in Images

Marco TompitakThis is a piece of code that implements an image-processing algorithm I came up with. I call it Dynamic Colour Binning. It's a fairly academic exercise that was more about providing a learning experience than about producing something useful, but here is what it does: Input: A set of images with...

 
2:13 PM
@CaptainObvious wow, very nice first question
 
2:24 PM
0
Q: Stored procedure not working over odbc/oledb connection

Chris JThis stored procedure is working fine when running in SSMS, however when I try to execute this via ODBC/OLEDB in microsoft excel/Qlikview it's returning no results Alter Proc [Report].[UspResults_SalesOrderKPI] ( @Company Varchar(Max) , @RedTagType Char(1) , @RedTagUse Varchar(...

0
Q: Managing reference-like members with shared pointers

Lasse KliemannIt is a well-known fact that there is no built-in mechanism that prevents member fields that are references from being invalidated, even if they are const. (For more background see: https://herbsutter.com/2008/01/01/gotw-88-a-candidate-for-the-most-important-const/) The easiest solution is to on...

 
@CaptainObvious not sure if I'd vote as code not written yet, I tested the code at the link and it appears to be working... I voted as UWYA and left a comment though
Case-sensitivity of file paths/file names in a Windows environment is implementation-specific right?
 
2:45 PM
AFAIK yes
well
I mean, AFAIK C:\FOO is the same as C:\Foo
 
Strange, I have a client using our desktop application to export a certain file to save a copy locally, when they type the path by hand or browse to it it works fine, but the application seems to save an ALLCAPS version in a certain setting and that one doesn't work when it auto-populates
 
if you try to name one file "File" and another "file" it won't let you they are the same.
NMI
 
The client will enter/browse to S:\FINANCE\claims which will work fine, but the setting saves S:\FINANCE\CLAIMS and for some reason that won't work... could also be Citrix though or some other thing in the application
 
is CLAIMS a folder?
 
Yes
 
2:58 PM
have you checked what permissions are being given to the folder?
 
Yeah it's not permissions, already checked that
The one on the left is the saved setting that's purportedly not working
Oh well I'm just triaging and saw that, was hoping there'd be an easy fix, but I'll let a specialist look into it
 
what if the user creates the directory ahead of time?
@Phrancis oh gotcha
 
@Malachi The directory already exists, it's trying to save a file into it
 
The application isn't accessing the foldeR?
 
Maybe
The one on the right is supposed to auto-populate based on the setting on the left
 
3:03 PM
if that is the case then it has to do with the matching of path.
change the folder name to caps, and I bet it works. on the user machine
the regex for finding the directory should be case insensitive, but seems that it is case sensitive..... REGEX FTW
 
Regex for finding directories? What kind of sorcery is that ;p
 
if I saw the code I could probably fix it.
probably not regex
but string matching
there is probably an option on something to make it case insensitive somewhere.
 
0
Q: Game State Machine and Game States

danielFor the last few days i have been working on one of my first large game not done in a game engine and i have been struggling to create a acceptable Game State Machine / Game Mode machine call it what you want all it does is switch a Games State / Mode, i have been looking at a few different examp...

 
3:30 PM
0
Q: Is this the best way to expose methods with parameters using the Revealing Module Pattern?

Mike MDoing a basic revealing module pattern, for the internal methods writeName and writeAge, they both take a parameter (ie. name and age respectively). From my understanding, the nature of the revealing pattern is utilizing pointers. However the pointer obviously doesn't show what parameters are...

0
Q: Luhn Algoritm for social security numbers in C# asp.net

QuestionMarksI just got some negative feedback on some code I wrote and I was not able to know exactly what was wrong with it (I tried). It is a program that verifies to see if a social security number is valid or not. The program is working fine.So I would really appreciate it if somebody could take a look a...

 
@CaptainObvious oh boy
 
@CaptainObvious looks like example code...
 
0
Q: Improving design of basic async logger

DSFAs a little exercise I'm trying to create a very basic async logger. The idea is that some other project calls my AsyncLogger's Write method whenever something needs to be written to the logger. My logger then places this in a list which is subsequently processed by the thread which is running in...

 
3:53 PM
o/
 
\o
 
I just want to get home, eat Chinese takeaway and shoot some cleaners in their flame tank
the amount of stuff going on atm makes my head explode. devops, switch to git, and full stack dev all at the same time ;-;
 
Isn't it about TTGH for you? Or working late?
 
in a few minutes, yes
 
@DanPantry What's that a reference to, TF2?
@CaptainObvious One more VTC for example code. It's awful.
 
4:06 PM
Tom Clancy's The Division
 
/**
 * Copyright (c) 20xx - 2016, Example Person, All Rights Reserved.
 **/
I like how even the copyright notice is examplified
 
lol saw that
 
0
Q: Code Review Binary Tree

Vaibhav FatkalCan someone please check if the code i have written for Binary Tree is ok ? PS: I am a newbie in this world of DS and algorithms. (Well not exactly newbie but returning to these topics after 5 long years.) It does work and create a tree, what i am trying to ask here is the correctness of the t...

0
Q: Simple Pub-Sub Event Emitter

Jack WilsdonI have written a basic event emitter in JavaScript and I'd like some feedback on my design. I tried to make it as simple and minimalist as possible, as I'd like it to be understandable by anyone. I have wrapped the code itself in a top-level "module" that adds it to the global namespace under th...

0
Q: Given an index return item from opposite end of list

Mord ZuberGiven the following code: namespace AtBash { class Program { static List<string> letters = new List<string> { "Aleph", "Beis", "Gimmel", "Daled", "Hei", "Vav", "Zayin", "Chies", "Teis", "Yud", "Chof", "Lamed", "Mem", "Nun", "Samech", "Ayin", "Pei", "Tzadik", "Kuf",...

 
@DanPantry The Division is pretty cool
 
@CaptainObvious Migrated from Programmers eh...
 
4:14 PM
@CaptainObvious Random thought: "Binary Tree" has the same initials as "Better Title"
 
4:26 PM
@rolfl Haven't I warned you? That game is hugely addictive.
When did I recommend that game to you btw?
Also, Monking!
 
Zak
6 hours ago, by rolfl
I saw Simon had some mods in his github account, figured the game had to be half-decent.
 
@Vogel612 Looks like it, but not anymore. I'm back now, which means that @Duga is also back.
 
If you are looking for a code review, there's another site for that: codereview.stackexchange.com. These questions tend to be a little too opinion-based for SO. — Laurel 27 secs ago
I understand both the suggestion to move to Code Review, as well as the reason why it would probably not fly there either. I had considered code review first, but was sure I would get nothing but comments on how to make the code more readable, self-documenting, etc, which is the opposite of what I was trying to achieve. This is a personal interest question and frankly I can't think of any community better equipped to answer this question than this one! — Tom Auger 29 secs ago
 
Zak
@Duga Lives!
 
@SimonForsberg Are you going to be watched twice on Wednesday?
 
4:41 PM
0
Q: Makes a part of Angular code better

ILIASHere is a part of my code inside the controller: self.initialize=function(){ self.searchResults().then(function() { self.current_index=0; //as not to load temporarily the first image of the previous set self.current_page=1; var total=GalleryServi...

 
4:53 PM
@rolfl As @SimonForsberg said, that game is super addictive.
 
I think it could be smaller because it turns around function self.searchResults and not repetitive. It does not matter what it does. — ILIAS 3 mins ago
wat
 
1
Q: Solution for the BankORC kata

JanuxNext Saturday I'd like to conduct a TDD demo in our local developer user group. For this purpose I want to implement the first user story of the BankORC kata from the Coding Dojo Wiki. Here is the solution I came up with. Any feedback is appreciated. AccountNumberParser.java package com.demo.b...

 
@Donald.McLean Probably so, yes. I've been in South Africa (home country for a certain @rolfl) during Thursday until today, so I have some other TV series to catch up with tomorrow.
 
What your code does is central to a peer review. Walk reviewers through your code, tell us what it's doing - put some effort into your post, be it only because reviewers are going to be spending anywhere between 30 minutes and two hours of their lives improving your code. Yes, what your code does matters. Very much. See How to Ask and Simon's guide for posting a good Code Review question for more information. — Mat's Mug ♦ 9 secs ago
a bit brutal, perhaps
 
5:11 PM
@Mat'sMug To be fair, I think it's unrealistic to expect someone to review code with no context at all besides "Here is a part of my code inside the controller"
Certainly, a controller is not just a generic thing, all controllers do something specific don't they?
 
a controller is an architecture/pattern artifact. might as well say "here is part of my code inside the repository"
 
@Mat'sMug "Here's a function I wrote."
You have to review it note for note.
Gah, algorithm design time.
 
Woohoo, just got my 2nd Yearling badge :D
 
congrats!
 
Gah, this is gonna suck.
 
5:22 PM
-1
Q: Possibility to decrease processing time somehow?

Florian Schrammcurrently I am working with this code to parse through HTML files stored on my computer and extract HTML text by defining a certain tag that should be found: from bs4 import BeautifulSoup import glob import os import re import contextlib @contextlib.contextmanager def stdout2file(fname): i...

0
Q: minimal send mail php

MorganI was recently working freelance for some coders and they wrote this mail script off the cuff... which works great, but I was wondering if this code is perhaps dirty, unethical or not recommended from a security point of view?! Also, it would be interesting to know why this works without login, ...

0
Q: Performance optimization using a std::priority queue

DoubleTroubleI'm trying to accomplish the following: Start out with 1 interval on the real line. This interval is processed in some function and out comes an array of errors (size < 10 usually). The maximum element of this array is also stored and the interval is put onto a queue sorted by this maximum error...

 
Is it just me or is there a problem with i.stack.imgur.com ?
 
there's always a problem with something
 
5:43 PM
Well. My brand new @Honda had its infotainment system lock up completely 5 hours in. Had to park and reboot it. https://twitter.com/ieko1224/status/731617783436345344
haha
that reminds me of when the CEO had his BMW bricked when the dealer tried to update its computer systems so its bluetooth would work with his iPhone
 
Think I tracked down the problem with my infotainment system. @honda, turns out, is not an experienced Android OEM. https://t.co/nuvdVGLQwO
 
picture this: 7AM, any highway, any large city. Everyone using Google cars, electric, self-driven. Google pushes a firmware update, every car stops to reboot.
5
 
imagine if it was an optional update
only some cars stop to reboot
 
My old bosses Tesla would do updates during the night, but just imagine getting in your car in the morning and the update isn't done.
 
I would like to think you could have it install the update the next time it parks
 
5:47 PM
"I'm sorry, but you cannot start the vehicle until this update is complete."
And just imagine we put an AI in the vehicle with voice recognition, and AI's are developed to the point where they are actually AI's. It gets increasingly frustrated as you continue to start the car mid-update.
 
@EBrown HAL9000: I'm afraid I can't do that, Dave
 
^^ only @Phrancis will get that reference I think, but that's totally reminding me of that scene with Elvis Gratton fighting with his car's "AI".
> Portière ouverte
rips door apart
> Portière ouverte
 
Anyone want to review some JavaScript for me?
 
@Mat'sMug LOL
 
if I had a car with an AI, I would really want the ability to choose between HAL9000, GlaDOS or SHODAN voices
 
5:55 PM
I want the Jarvis voice.
 
oooh yeah
 
GlaDOS <3
Though Marvin would be another good choice
 
0
Q: Plank Tiling Problem TopCoder

Aman GuptaPlease refer to this topcoder problem on Plank Tiling. I have spent a good amount of time solving myself using DP and here is the approach I have been following: Let O(W,2H-1) is the required value. Then, (Assume width is x-axis and height is y-axis) When we place all tiles horizontally at the...

 
need the ability to fast switch voices/personalities, though
I imagine SHODAN's "rotting bag of meat" comments would not go over well when driving grandparents around
 
0
Q: O(n^3) solution to Manhattan Distance

AntithesisThis is a variant of the Manhattan Distance problem. The input is a 2D matrix of boolean with the true cells representing location of an ATMs(or anything for that matter). The output has to be a 2D int matrix giving the distance of each cell from the location of the closest ATMS. Here's my code,...

0
Q: Simple spinlock for C using ASM

user1235831This is for learning purposes so I am not trying to "reinventing the wheel". I am just trying to learn how to make a primitive one :) This is my second attempt to make simple lock using extended assembly. See http://stackoverflow.com/questions/37241553/locks-around-memory-manipulation-via-inline...

 
6:15 PM
I'm pretty sure "you shouldn't write this code to begin with" is a lousy review.
0
A: Rate limiter utility class

Kevin WrightI'm going to go, maybe, slightly off topic for the site and review the need for this code to be written in the first place... before you go too far down this particular rabbit hole :) Given your use-case of sending messages to other systems, have you first considered existing solutions? In part...

 
@Donald.McLean "I'm going to review your code by not reviewing your code and suggesting a library instead"
 
@DanPantry I just wrote some nasty JS code. ;)
 
6:42 PM
since your code is actually working, this looks like it might be a better candidate to move to codereview.stackexchange.comJeff Puckett II 58 secs ago
 
seen today May 16, 2016
> An order request has been sent to purchasing for new floppies
 
LOL
 
That UNION in the nested subquery can't be good for performance... but agreed with @JuanCarlosOropeza either here or on Code Review we would want to see the execution plan and such. — Phrancis 50 secs ago
 
I thought these things weren't even produced anymore
 
My left join is not working...
declare @BranchesToAdd table (branchcode char(3));
insert into @BranchesToAdd values
('HPA'),
('HME'),
('HRU'),
('GCU'),
('HAT'),
('HOC'),
('HCM');
select shp.branchcode, v.v_name, vsb.*
from @BranchesToAdd as shp
left join VENDORS_SERVICELINES_BRANCHES as vsb on shp.branchcode = vsb_branchcode
left join VENDORS as v on vsb_vid = v_id
where v_name like '%shp%'
order by shp.branchcode
 
6:54 PM
you should try this question on CodeReviewJonesopolis 39 secs ago
 
The value 'HCM' is not included in the result set (it's missing from the VENDORS_SERVICELINES_BRANCHES table)
._.
 
0
Q: Server connection handler in python

user103318I am working on a project of a server for a smart house. This part of code is responsible for communication with client (separate application), sending requested data and ensuring everything is safe. I've decided to use multithreaded version of python socketserver in order to avoid bottlenecks (I...

 
I'd recommend posting your actual code in its full glorious context over at Code Review, with a title that tells reviewers what your code is doing (i.e. not "shorten nested ifs"), and then walking readers through your code and the problem it's solving. I bet you'll like the answers you get. — Mat's Mug 43 secs ago
Yes, making code better, more readable and maintainable is exactly what the scope of Code Review is about. — Mat's Mug 9 secs ago
 
@Mats Mug. This is not a competition. I do not want to show other people how smart I am. This is an honest endeavor by a programmer who continuously wants to write better, readable, maintainable code. And in that endeavor it seeks the help of much smarter minds on this forum. Please try to understand that. — PeterJ 2 mins ago
wtf, a "competition"???
 
uh
That's a strange way to look at it
 
7:07 PM
> I'm not posting on CR because I don't want people to think I'm showing off
eh, whatever
 
okie...
Seems like more often than not it's more of a walk of shame than "showing off" ;D
 
@Mat'sMug So post it on Stack Overflow which is clearly the site with lower traffic.
 
(at least, in my case)
 
I need to find my C# In Depth book.
 
7:39 PM
So whats your question? This isn't a code review site — redFIVE 38 secs ago
 
If you're using any half-decent IDE your compiler should help you answer your own question. Look at your build output. — Mat's Mug 8 secs ago
 
To be honest, this question would be better suited on codereview.stackexchange.com - answers are going to be subjective and therefore this question is not a good fit for this site. — Matthew Watson 8 secs ago
 
8:00 PM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Script to redo a rails migration easily
 
8:11 PM
@MatthewWatson not even. It's just a poor question, phrased in an opinion-seeking way that's off-topic just about everywhere on the network. It would be on-topic on Code Review if OP included their actual, real code, some surrounding context, and explanation of what problem the code is solving, and interest in feedback on any & all facets of the code rather than merely being focused on gotophobia (although gotophobia is a valid concern to express in a good CR post). — Mat's Mug 38 secs ago
 
0
Q: Python script to identify audio using Gracenote

Thomas BarrettThis script records audio from the computer's output and passes it to a C program that fingerprints it and queries the Gracenote database. If it identifies the audio then it offers options to look it up on Discogs. I made this because I wanted a way to identify tracks in DJ mixes that didn't invo...

 
8:46 PM
@CaptainObvious pretty cool question/code IMO
Of course me being a sucker for anything audio has me biased
 
Wait... is it OOP?! There's only like one class?
 
I removed it. They probably used it because the question asks if it would be better to be more OOP
 
Should probably have read the text. No wonder I was missing something
 
Certainly not all things call for OOP, but that there is a lot of code for Python, IMO
That main method is huge
 
Yeah, it could definitely do with more functions. Kinda reminds me of a question I saw that had a 200/300 line main, :/
 
8:52 PM
Yikes
 
Oh, no it was ~360 lines!
 
Of Python?
 
I don't know why you'd let it get that long.
 
HOLY CARP
(nice answer btw)
 
oh look, a nukee!
 
9:02 PM
Thanks! It was a long day.
 
9:22 PM
0
Q: VB.Net unit testing and code design with a third party library

McAngusI am new to unit testing and I am unsure how to design classes that use third party libraries, so that I can easily test them. The example I'll use is with EPPlus-OfficeOpenXml (an excel document manipulator). Let's say I have a class to import excel documents, validate then add data to a databas...

 
TTQW
 
10:13 PM
WebKit is now 100% ES6 complete according to @kangax‚Äôs handy table. 💯 https://kangax.github.io/compat-table/es6/ https://t.co/yyASsXanG4
CC @Phrancis
 
10:26 PM
@Quill That's pretty creative.
 
0
Q: Rubyist Way of Alternately Taking Elements from an Array

MichaelGiven the task of having to return an array that alternately takes elements from two arrays, what would be most Ruby way of completing the task? As of now, I have this code, but it doesn't feel very elegant. def alternateTake (a, b) raise ArgumentError, "Unequal length" if a.length != b.length...

 
10:47 PM
@Quill interesting
 
I know ri8ght
 
@Quill Good news, and about time! Interesting that WebKit is now the only browser to do tail call optimization.
 
huh. that is interesting
WebKit's open source community is amazing though
 
possible answer invalidation by Michael on question by Michael: codereview.stackexchange.com/posts/128535/revisions
Belongs to codereview.stackexchange.com — Anmol Singh Jaggi 13 secs ago
It looks mostly fine to me. You should probably only take in a single starting node instead of a list. And in Python don't use camelCase, write add_child. Also ask this kind of question on codereview.stackexchange.comAlex Hall 7 secs ago
 
0
Q: Customized streambuffer for C++ istream

JesBasically I implement a traditional file-descriptor-based streambuffer for istream operations. The implementation overrides the sync and underflow functions, while in sync the buffer will be automatically enlarged if necessary (just like vector). class InputStreamBuffer : public std::basic_stre...

 
11:24 PM
> Last Test Run Passed (Total Run Time: 0:00:07) 71 Tests Passed
 
11:35 PM
Well, I wrote the most abstracted CSV serializer out there, I think.
You can literally serialize any List<T> to a CSV/TSV/_SV file with anything as the row and column delimiters.
 
0
Q: Serializing properties to delimited files

EBrownFor a new project I'm going to need to be able to serialize random types to TSV or CSV files, so I write a class which can be used to serialize any object to a TSV, CSV or any other _SV file you can think of. (You could literally serialize objects to files with the letter "B" or the word "Rawr" a...

 

« first day (1108 days earlier)      last day (1134 days later) »