« first day (1018 days earlier)      last day (2992 days later) » 
00:00 - 19:0019:00 - 00:00

12:00 AM
RELOAD! There are 1852 unanswered questions (94.1182% answered)
 
I wonder how long it would take to do 1852 reviews
 
Well, I tried but feel like more could be said about the code itself... the approach though gives me shivers, if I was a DBA I would definitely not want this executing against a production server, especially from a potentially unsecured connection...
 
good review
 
@Quill If I'm not mistaken it's taken almost 2 years to get up to that number of unanswered reviews, so maybe 2 years? :-)
 
say there's 45 regulars, and we each do 5 reviews in one day
9 days
 
12:09 AM
So sad quite a few of these needs a lot of insight into not so common libraries... That calls for dedication and a lot of time...
 
@Quill thanks
 
array.forEach(function(_, index, array){ doSomething(array[index]) })
 
12:25 AM
@Quill wat
 
;-)
I found it in some legacy code earlier
 
12:41 AM
Is that... JavaScript?
 
yeah
 
I'll admit I have not seen _ used before as an argument
That's still a valid name, isn't it? Or does JS do something magical with _?
 
It's showing that the parameter is unused, I think.
 
^^
 
What... but... why? (i.e. what's the point of an unused param)
 
12:46 AM
the thing is that the value of _ is equal to array[index], meaning the two proceeding parameters are effectively redundant
 
@Phrancis In this case with the callback function, it is showing that the function body is not going to be using that parameter to the reader; sometimes not all parameters are needed.
 
@Phrancis sometimes you need the second or third parameter but not the first in a callback
 
Ah, ok
(I don't know what a callback is, but I can just Google it)
 
@Phrancis like a lambda function, or passing around functions
 
A callback usually is a parameter passed into a function that will later be called by that function.
function a(func) {
    ... do stuff...
    func(); // <-- callback
}

a(function(){...});
 
12:53 AM
That looks evil lol
 
0
Q: create varies string vectors, and using iterator to change those strings to uppercase

dzjustinliI'm new to C++. I'm trying to solve a problem which goes something like this: Q: create varies string vectors, and using iterator to change those strings to uppercase. Below is the code I came up with. However, the IDE always output error and I have no idea where I made mistake. It would be gr...

 
Quite useful actually to have callbacks.
Often used if you want to split into asynchronous operations, and get different responses back depending on some strange criteria. Or you want something done after something else is done...
 
In Java, there are no explicit "callbacks". Instead, there are these.
These are interfaces that have a method that is called after the class is passed into a method.
 
and in C#, you can use Actions or Delegates
 
Ahh ok
 
12:58 AM
Another good use of callbacks are for event subscription, where you call your subscription function with a callback function to be used whenever the event is triggered.
 
When I got back into C#, I found it really hard not to code for callbacks
 
@CaptainObvious looks broken
 
What should I do about an answer that says almost exactly the same thing as another answer? (it's not copied)
Another answer says the same exact thing.
The OP even commented saying that he already knew about that option on that other answer.
 
I've never really been 100% on that either
It's pretty much already stated, which is kinda a point steal
and seeing as it's the only point in the review
 
Comment upon it that this has already been covered in full by another answer, and suggest for answerer to contribute new stuff
In other words recommend deletion as this was the only point...
 
1:13 AM
Note that, if the poster is asking for code to be reviewed, offering alternative solutions is acceptable if paired with a review of the code. Also, reinventing the wheel is a perfectly valid way to learn a programming language. Telling someone attempting to do that to "use this builtin" -- which it's entirely possible that the poster knew about anyway -- is not helpful. — QPaysTaxes 41 secs ago
 
@SirPython I was wondering the same thing
 
In addition to what QPaysTaxes said, this is identical to a point already made by Joe Wallis and 200_success. Reiterating what others have already said (in a worse fashion) is not a good thing to do. — Quill 6 secs ago
Time to pimp something!
There's a bounty going at the moment!
 
/**
 * An interface for (unordered) dictionary ADTs.
 *
 * DO NOT CHANGE THIS FILE.
 **/
 
 
1:28 AM
Classical Microsoft joke...
 
3
Q: An OEIS Lookup tool in Python

DowngoatI'm from PPCG so I was making an esolang and I decided to write it in Python. Eventually it went from an esolang to an OEIS (Online Encyclopedia of Integer Sequences) lookup tool. I'm very new to Python. Essentially this program takes an OEIS sequence number (e.g. 55 for sequence A000055) and t...

 
@CaptainObvious another soul to the list
 
> # >:D I'm sorry but I have to use RegEx to parse HTML
 
lol
 
match("problem");
-> 9001 results. :D
Greetings awesome folk.
 
1:44 AM
@Legato Greetings!
 
There is a valid reason to use string.format instead of % string in Python, yeah?
 
Monking
 
2:00 AM
pimp
5
A: An OEIS Lookup tool in Python

Quillimport*: Please avoid importing all modules at all costs. Import each module you use separately Regex ಠ_ಠ Regex is evil, the worst. seriously. stop it. right now. kill python.exe right now and change it. You use beautifulsoup, a dom parsing library, literally a few lines later, but you choo...

 
+1 for "Regex ಠ_ಠ"
in the end, all PPCG folks will be converted. all of 'em.
 
@Mat'sMug I'm merely infiltrating your ranks... ;)
 
haha
that's how the conversion begins :)
 
Hey @Mat'sMug, what's your take on this:
 
Indeed - though not in the way you might expect... we'll getcha eventually
 
2:05 AM
57 mins ago, by SirPython
What should I do about an answer that says almost exactly the same thing as another answer? (it's not copied)
 
oops, gone
totally a "me too!" answer
 
IMO none of those deletion reasons are related to content copying
 
hmm there's a deletion reason dialog?
 
Yeah..., the VLQ queue
 
If you are in the queue.
@Mat'sMug Is there such a thing as a reverse command in WPF?
 
2:11 AM
define reverse command?
 
in Tavern on the Meta on Meta Stack Exchange Chat, 2 mins ago, by Telkitty
Java and C# are like rivaling siblings, they both think they are better than the other. But from outsider's point of view, they are very similar.
in Tavern on the Meta on Meta Stack Exchange Chat, 2 mins ago, by JamesENL
@Quill The brain damaged kid brother who didn't get enough oxygen at birth
 
I used a command to make it go to the VM because binding wouldn't work, but I can't make it go from the VM back to the UI.
 
bwahahaha
 
in Tavern on the Meta on Meta Stack Exchange Chat, 2 mins ago, by JamesENL
He's just over in the corner eating his shoes
 
@Hosch250 I'm not sure what you're trying to accomplish there
 
2:12 AM
Then go read the VBA chat log.
It's about those three-state checkboxes you wanted.
 
2:35 AM
in The Nineteenth Byte, 3 mins ago, by Sp3000
There's also from __future__ import braces, for programmers just switching over from C
in The Nineteenth Byte, 2 mins ago, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
Python 3.4.2 (v3.4.2:ab2c023a9432, Oct  6 2014, 22:15:05) [MSC v.1600 32 bit (In
tel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import braces
  File "<stdin>", line 1
SyntaxError: not a chance
>>>
 
3:02 AM
Would probably be a better fit at Code Review. — ivan_pozdeev 42 secs ago
 
0
Q: Weather App - Better options for updating data on page

brndngI have been working on a simplistic weather application that utilizes the openweathermap.com API. I have an ajax call to make an HTTP request to get a JSON object that contains the data which is returned in the success callback from the HTTP request. I use JQuery to display the response object's ...

 
3:16 AM
0
Q: More pythonic / efficient way to loop over this list of objects?

Public Display NameI have a list of Comment objects comments. Each Comment has several properties, one of which is the date the comment was posted. I've sorted this list by date and there is at least 1 comment per date in a range. I would like to loop over comments and for every date, create a new list of comments...

1
Q: C++ linked list class

René GI have a lot of experience in Python and Haskell but am new to C++, so I'm wondering if my code is idiomatic. For one of the first assignments in my class, I wrote a linked list class (the "cities" are nodes in the linked list, the teacher wanted to make things interesting, I guess). Here's the h...

 
@ivan_pozdeev thanks for the suggestion. I've posted a question in code review (does that mean I should take this one down?). And yes, comment_arrays is an array of arrays. day_comments contains all the comments on a given day, and comment_arrays is an array of all the day_comments — PDN 1 min ago
 
        private string name;
        public new string Name   // Notice the use of the new modifier
        {
           get
           {
              return name;
           }
           set
           {
              name = value;
           }
        }

I keep seeing private / public properties that differ in case where the lowercase is the private property and the TitleCase is the public one. I used to prefix private with `m` for that distinction. Is the case difference a common practice in c#?
 
Press Ctrl+K to format code in chat
 
@Quill Im working on it. :)
 
3:24 AM
m is a bit unclear, I suppose, lowercase is how it's usually done
for readonly properties, you have underscore + lowercase
 
@Matt different people have different conventions
 
@Quill I honestly don't remember where I picked up the m practice.
 
I like my private fields _underscoreCamelCase and readonly
 
@Mat'sMug Do you have your private (non-readonly) fields like that too?
 
yes
fields have an underscore
not because they're readonly, but because they're not locals or parameters
and more importantly, because I can't stand to use this as a qualifier. ever.
and any other prefix than _ looks awkward
 
3:29 AM
fair enough
 
I also use var like peperoni on a pizza
SomeTypeWithAnAnnoyingName<AnotherTypeWithAnAnnoyingName> foo = new SomeTypeWithAnAnnoyingName<AnotherTypeWithAnAnnoyingName>(); // Y U NO VAR?!
 
@ivan_pozdeev I see. I will ask a moderator to move it next time. In the meantime I'll delete it on Code Review since that one hasn't had any activity yet. Thanks! — PDN 15 secs ago
 
@Mat'sMug yeah... I use var only when making new objects
otherwise I have types
 
when I'm not sure, I hover :)
and that's not very often - the return type is totally unimportant most of the time
 
3:45 AM
possible answer invalidation by René G on question by René G: codereview.stackexchange.com/posts/120109/revisions
 
4:06 AM
I was doing stats for PPCG, thought I might do some for here
 
0
Q: Converting an octal string to a byte array with LINQ in C#

EhrykI'm taking in a string of input from the command line, and when prefixed by 0o or 8# interpreting it as an octal string. I'd like to convert it to a byte array more directly, but I'm not sure how to perform the bit carrying in LINQ. Here's how I'm doing it for Hexadecimal: public static byte[] ...

 
5:08 AM
0
Q: Elixir: Converting Chess FEN Notation to a Tuple and Back

Ryan LynchThis module is going to be part of a larger ElixirChess library for validating chess positions and moves, but I started with the core of it which is parsing a position from FEN notation into a more consumable format and back again. I'm basing this somewhat on Chess.js, so I decided to convert the...

 
5:46 AM
0
Q: Markov chain text generation in Python

James JohnsonI'm willing to listen to any advice you have for improving it. from collections import defaultdict import nltk import numpy as np seq, freq, sample = [t for ts in [[None] + nltk.casual_tokenize(line) + [None] for line in open("file.txt").readlines()] for t in ts], defaultdict(lambda: defaultdi...

0
Q: Make binary search tree from sorted array

Mosbius8Here is my code for converting a sorted array to a binary search tree. Please review and let me know the improvements or some better way of solving this. /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode...

 
6:09 AM
0
Q: Creating a list of list after traversing binary search tree in level order

Mosbius8Here is my code. /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ public class Solution { public List<List<Integer>> levelOrder(TreeNode root) { List<List<Integer>

 
6:34 AM
Tied for 93rd. I guess it could be worse.
 
Monking
 
I'm heading back to bed. Goodnight.
 
'night!
TTGTB2
 
night
 
possible answer invalidation by seveves on question by seveves: codereview.stackexchange.com/posts/120031/revisions
 
6:41 AM
@Duga don't know
 
0
Q: Protecting SQL Statements From SQL Injection

wunoI just finished writing a program which working with a database. Throughout the process when working with people to get past some of the hurdles I faced I was ridiculed for my SQL statements. I have never fully understand what to do to protect myself and I know there is a lot of information out t...

0
Q: Displaying inspection results, grouped per user selection

Mat's MugThe Rubberduck 2.0 Code Inspections UI was recently redesigned (again!), this time featuring a GroupingGrid control (thanks @BrunoCosta!), and what appears to be a dynamic grouping: Resources The UserControl's resources include two CollectionViewSource definitions, which determine the sorting...

0
Q: Spring Web MVC where to put logic

Harshit ShrivastavaI am trying to create an application where I need to know where to put the logic. Here is the code HomeController.java @Controller public class HomeController { private EmployeeService employeeService; @Autowired(required=true) @Qualifier(value="employeeService") public void s...

 
Awesome, I did misread it then! Thanks! If you're interested, I have the actual control's markup up for review hereMat's Mug 22 secs ago
 
0
Q: Easier way to merge several columns of an array into one

John HassI have a 1996 * 9 array: array([[ 0., 1., 1., ..., 1., 1., 0.], [ 1., 1., 0., ..., 1., 0., 1.], [ 0., 1., 1., ..., 1., 1., 0.], ..., [ 0., 0., 0., ..., 0., 0., 1.], [ 0., 1., 1., ..., 1., 1., 0.], [ 0., 1., 1., ..., 1., 1., ...

 
7:15 AM
Hey guys, haven't ever been here before, but I've been bouncing around IRC's on FreeNode and was wondering if anyone here could shed some insight as to the best way to get Code Review on a javascript library I've developed/developing.
I don't really have specifics where I would just "ask/post a question", it's more just like a general library code review.
 
7:36 AM
0
Q: RFC 4180-compliant CSV parser in Java

200_successWhile looking at a recent question, I realized that there is no CSV parser in the standard Java library. I decided to write one that complies with RFC 4180. Highlights of the standard include: Whitespace is significant. Strings may be double-quoted. Inside a double-quoted string, newlines ar...

 
@ChrisHennighan You could try this site, Code Review, but we require the code to be present in the question. If you have a large library it may not fit in one question. If your code is split-up into modules, you could post each module separately and link between your questions.
 
@Mast It's like ~300 lines in a single file, do you know how large is too large?
 
Monking @all
 
@ChrisHennighan 65k characters per post.
That's including the required context for you to tell us what it's doing and what the issues are.
 
@Mast that's where I'm iffy though, it's not really that I have any issues or anything, I just want someone to see if they can peer review and give some advice or something lol. Does that fall into this context still?
 
7:50 AM
0
Q: problems on N-Tier application and repository pattern

ArashdnIt's my first time creating a N-tier application. It's a WPF Application. I Also use repository design pattern and unit of work beside using EntityFramework in my Data Access Layer. Here is my structure: And Here is some of my classes: Unit of Work Interface: public interface IUnitOfWork : I...

 
@ChrisHennighan Let me throw you some links.
43
Q: How to get the best value out of Code Review - Asking Questions

rolfl I have a project I am working on, and I would like some, or all of it reviewed, how can I ask for this review on Code Review in a way that produces the best possible value? This is not about a question being on-topic, or off topic. Rather, this is about making on-topic questions great qu...

 
@Mast Thanks a lot, I appreciate it.
 
And of-course there's the on-topic help page.
@ChrisHennighan If there's anything else we can help you with, just ask. I prefer helping people post quality questions over closing off-topic ones because users didn't understand the scope of the site.
 
@Mast Definitely, that's another reason why I wanted to come here and see what people thought before I even composed something that may not be useful for anyone including myself lol. Thanks again.
 
8:28 AM
Monking
 
monking @DanPantry
 
Monking @DanPantry @chillworld
 
Monking @DanPantry @chillworld @Mast
 
Monking @Quill
 
c-c-c-c-combobreaker
4
 
8:41 AM
[insert bastardised Inigo quote here]
 
9:00 AM
Naruto answer; accepted non-selfie answer with 0 score: Making a grid of videos
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Using commands as deferred behaviour
 
Zak
Monking @all
 
monking @zak
 
Monking @Zak
 
0
Q: Rotate a string of integers to match index

Jxlqk t is number of tests; each test contains two lines: n and sequence n is number of integers sequence is a sequence of integers from 1..n (e.g. '4 1 2 3' if n is 4) Rotate sequence until you maximize the number of integers that match their position in the string. (e.g. '4 1 2 3' s...

 
-10
Q: Did you stop contributing to Stack Overflow or Stack Exchange?

Justin LeeWere you an active user in the past that no longer contribute to Stack Overflow? Hi, my name is Justin. Currently, we're seeking participants from Stack Overflow to participate in a question survey. The survey is composed of 10 questions and there is an incentive for participating in the resear...

 
9:12 AM
monking @Mast @Quill
 
9:34 AM
ty for the comment and update @SuperBiasedMan
@Downgoat string.format has many more formatting options and allows you to do more with it than % formatting. string.format also coerces types to strings, so it often doesn't need stuff to be explicitly converted to strings. — SuperBiasedMan 57 secs ago
 
0
Q: ImprSimple chat bot written in python

AlexI'd like to know if I can improve the performance of my recent bot / and maybe some design patterns. So far, it's warning a user if it's using some bad words ( which are parsed from bad_words.txt) and it's entertaining the users by posting jokes from jokes.txt. from selenium import webdriver imp...

0
Q: Spring MVC where to check sessions

Harshit ShrivastavaSuppose I have a controller in which whenever I want to perform any action, I need to check if the user is logged in or is the session exist. Here is the sample. @Controller public class MultiActionController { @RequestMapping("/listUsers") public ModelAndView listUsers() { } ...

1
Q: Perimeter of a polygon given its vertices

spookyI recently completed this code challenge so just looking for some feedback on my code. The task is to read polygon coordinates from a file and calculate the perimeter, I was provided with a script containing bugs and asked to fix and improve the code. Example input data.csv x,y -16,-18 -18,-10...

 
9:57 AM
0
Q: Check string having unique character or not without additional data structure

Mosbius8Here is my code without using additional data structure. Assuming all the characters are alphabets and character checks are case-insensitive. public static boolean isRepeated(String s) { if (s == null) { return true; } int length = s.length(); for (int i = 0; i < length; ...

 
This question has 2 answers by the same author. He may have ran into the character limit by being so extensive, don't see that often.
 
10:11 AM
grrrrrrrr
 
Zak
@Mast There's no way those answers are big enough to go over the character limit.
 
DBA hasn't kept mine and my colleague's DB in-step or scripted his changes when he makes them
it's all come crashing down
2
Yeah, those aren't hitting char limit.
I've written more extensive answers than that
 
0
Q: Reducing memory footprint when manipulating big csv file

JureI have CSV file which has structure like this (separated by tabulators): VariableName DateAdded ValueNumeric VariableName DateAdded ValueNumeric VariableName DateAdded ValueNumeric ... and I am changing it to form where there are all variables with same date in same line: DateA...

 
Today feels like it is going to be a stressful day
2
 
10:30 AM
0
Q: SCI - Python Framework for Android Code Injection

AlexandreI codded a python framework to automatically inject arbitrary codes inside of Android apps (insert backdoors inside of legit Android apps). The injection is done on the assembly level (smali). I codded two payloads so far: a logger to get in real time the code execution flow (with the return ...

 
@Quill No problem, often it seems like people think the string.formatsuggestion is arbitrary when they get reviews so I like to make it clear.
Also hello all, not been on in a while.
 
0
Q: JavaScript-function for to create HTML select option-elements

st88I made this function for to get rid of writing numerical option values in a HTML-select manually. From what I have seen so far it works as expected. But hints and suggestions are welcome anyway. // Trying it out. var selects = document.querySelectorAll('.drop-down'); selects = Array.prototy...

-1
Q: Updating the value in column in SQLite

abdulkarimI want to pass a column2 to a function and update column3 with output of function. I have made func function to calculae the output. When i run the program it only takes last value as input and outputs all columns with same value.What am i doing wrong? cmd.ExecuteNonQuery(); ...

 
10:49 AM
@CaptainObvious broken code
 
hey
 
ho
 
My colleague isn't putting commit messages in his, well, commits because the changes are "obvious" by looking at them
or patience
please send help
because i need both
 
@skiwi god bless
 
10:58 AM
0
Q: Refactor else-if structure to check values in form fields

Erik StoryScenario description: This is a customer information data entry form. First name and Last name are required. In addition phone number, e-mail and birth date are used to check the database for existing customers with the same information. Either of these fields (phone, e-mail or birth date) can ...

 
@CaptainObvious ew
If it didn't say I would have thought it was enterprisey C#
 
@Zak @DanPantry Should they be merged in your opinions?
 
@Mast Yes.
 
@CaptainObvious Wow, that's the first layer of maintainability hell.
 
I gave it an upvote because he needs a review
 
11:06 AM
@Mast I'm going to bet all my money on there being no unit tests
 
I'm betting all my money too. All 3 money.
 
@DanPantry That ^^
Things I learn: there are websites dedicated to pirating research papers.
Now nothing is going to stop Skynet.
 
@Mast Some people don't feel studies should be behind paywalls
(Myself included)
I'm not saying I'd pirate them, just that I don't look that bad with a hook for a hand ;-)
 
11:33 AM
@CaptainObvious two more votes
 
consider posting this question in codereview.stackexchange.comgurvinder372 51 secs ago
possible answer invalidation by Jure on question by Jure: codereview.stackexchange.com/posts/120146/revisions
 
@Duga seems ok
 
12:00 PM
heya fellas
 
possible answer invalidation by Jure on question by Jure: codereview.stackexchange.com/posts/120146/revisions
 
@Mast suggested that this answer should be merged into the other one by the same author
but I think it's legit as it is
as the answerer explained, it's a review from a different perspective
which is acceptable
too bad Mast left
 
This is not a code review/how can I do this better site? Please use Code Review to get a review on your code. — Max 21 secs ago
 
/back to work
 
@janos Hi
 
12:14 PM
hi Mast
 
hey @janos
 
Yea, travel makes me leave my keyboard every once in a while.
 
hey Dan!
 
@DanPantry Agreed.
 
Mast: I answered in a comment:
This is a review from a different perspective, and as such it's legit. There's also plenty of precedent. Thanks for bringing to our attention, but I think this is fine. Feel free to raise on Meta — janos ♦ 8 mins ago
 
12:16 PM
Yea, I noticed.
I don't think there's a meta about it yet, so I think I'll take it to meta for posterity's sake.
 
0
Q: PHP - Create and loop array. Format/display data based on array values

Billy HoyleI have accomplished what I need to do, but the code is very messy and I know there is a better way to do this. I am pulling some 'products' from a database based on a term ('product type'). I am checking if the 'product' is a 'featured product', then checking if the 'product' is 'text based' or ...

 
Thanks for the heads-up @janos, much appreciated.
 
great, thanks Mast!
@DanPantry you asked a few days ago about a missed Naruto answer post of RoboSanta
that's a glitch, it happens sometimes
 
Ah right @Janos
 
@Mast there is a meta
20
Q: Should one person have multiple answers?

Jeremy HeilerThis question came up in regards to my comment on this post. If somebody has two different approaches for reviewing a piece of code, should they combine them into one answer, or have separate answers?

 
12:23 PM
when submitting multiple messages at the same time, sometimes some of them get dropped :(
 
Turns out it has been taken to meta here and here...
Now I'm feeling incredibly stupid.
 
it's nice to find ancient meta posts from 2011 we can still agree with
just don't tell Eric Lippert
 
^^
 
Question needs some reopen votes
http://codereview.stackexchange.com/questions/120136/rotate-a-string-of-integers-to-match-index
It works, just was confusing what the point of it was at girst.
 
reopened
 
12:30 PM
Thanks janos!
 
do you guys have fun posters on the wall at work?
I'm thinking of printing these: doolwind.com/images/blog/solid
 
Not at my current job, but in the past, sometimes.
 
12:44 PM
0
Q: Faster way to iterate and update 35000 dictionaries?

tim56could I get a could review on the function below please, also can anyone tell me how could I make this function process the api response in a more efficient and faster way. products_list its the api response in the form of list of dictionaries which returns all products for one supermarket only ...

 
12:58 PM
@janos We have posters mentioning how stable, secure and scalable our solution is for our customers
I suppose their funny as someone who develops the "scalable" solutions :-)
wow, I said "their" instead of "they're".
 
I'm glad that you got it to work. Perhaps you could post it on Code Review to get more feedback. I think that one improvement would be to get rid of exceptions in favor of options. Returning NONE replaces raising an exception and pattern matching against NONE replaces handle. I read that in O'CAML at least using options is much quicker than raising exceptions since it doesn't involve unwinding the call stack. See this question: stackoverflow.com/q/7952625/4996248John Coleman 5 secs ago
codereview.stackexchange.com -- better place to ask that — Yam Marcovic 19 secs ago
 
1:18 PM
@CaptainObvious The best way to iterate 35000 dictionaries is make a spelling mistake on the internet in a complex word and watch as at least one person rushes to correct your spelling
 
@YamMarcovic It's necessary to note that SE Codereview requires a fully working code posted in the question. — πάντα ῥεῖ 35 secs ago
 
0
Q: CLRS implementation of BFS and DFS in Java

Adi KumarThis is the implementation of BFS and DFS i have tried to follow from CLRS.Please suggest what can be improved in this code. import java.io.File; import java.io.FileNotFoundException; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Graph { VertexL...

0
Q: How to speed up several hundred raster multiplication in R?

user3624251I have several hundred rasters "A" (numbered from 001_A.tif to 100_A.tif). I have several hundred rasters "B" (numbered from 001_B.tif to 100_B.tif). I want to multiply them like this: 001_A * 001_B = 001_result 002_A * 002_B = 002_result 003_A * 003_B = 003_result . . . I have a loop in R, ...

0
Q: Convert R script to Matlab

nkrI have a small R script (below) to generate a nonlinear correlation coefficient and I want a direct conversion to Matlab format. I could convert the functions like cbind or rnorm of R to matlab but can't gather all pieces together, so if anybody could help ? Many thanks in advance. rdc <- funct...

-1
Q: Program execution output

Omkar PatilWhy does the below given program prints -128 #include<studio.h> main() { char i=0; for(;i>=0;i++); printf("%d",i); } Also can I assign int value to char without type-casting it. And if I used a print statement in for loop it prints till 127 which is correct but this program current prints -128...

 
That's not the JavaFX API documentation: it is found at docs.oracle.com/javase/8/javafx/api/index.html What you are looking at there (I think) is a repository for code review for forks of JavaFX (i.e. code for consideration in future releases). — James_D 8 secs ago
I'm voting to close this question as off-topic because it is about code review and belongs on codereview.stackexchange.com — Daij-Djan 11 secs ago
 
1:40 PM
downvote on an old question. nice.
 
Zak
@Quill That's no Santa, it's a Grinch :p
4
 
Monking
 
-2
Q: Where should I start in making a text based game using Python 3.?

CodingSchLONGI'm new to programming, I've learnt most of the basics in school and was wondering if I could practise over my holiday, I've installed Python 3.5.1 and have began programming all sorts of things to improve my capabilities, recently I've been thinking about programming a text-based adventure game ...

0
Q: Check correctness of brackets in file with stack + error detection

Eugene ShymkoTask: My implementation: public class Main { public static void main(String[] args) { String fileName = "Brackets.txt"; Path filein = Paths.get(fileName); ParentStack s = new ParentStack(); if (!Files.exists(filein) || !Files.isReadable(f...

 
2:00 PM
0
Q: Check directed graph is tree or not

Mosbius8Here is my approach. 1. Checking there is no cycle.(Using BFS) 2. All nodes are connected. (visited) public static boolean isTree(int[][] adjMat) { int numVertex = adjMat.length; State[] isVisited = new State[numVertex]; for (int i = 0; i < numVertex; i++) { isVisited[i] = St...

 
2:15 PM
0
Q: An AVL-tree based order statistic tree in Java

coderoddeI have this java.util.Set implementation that is based on AVL-trees, which implies that the set is sorted. However, it provides two additional operations: get(int i)returns the ith smallest element in the set, and indexOf(Object o) returns the rank of the object o (the rank of the smallest elem...

 
Yes Matt. Not in your way, but during code review I cam e to know error about Label which I wrongly done — Solas 19 secs ago
 
Greetings, Programs.
 
Greetings, Stargazer.
 
@Quill Hey there
 
2:34 PM
0
Q: C++ multiple inheritance of stl container

Ludovic Zenohate LagouardetteI wanted to know if using a pattern like the one used for the second class is a good idea or not. Is the usage clear enough ? class gedcom_relationships_row : Manageable{ public: long long int chd; long long int mth; long long int fth; }; class gedcom_relationships : std::vector<ge...

 
I'm voting to close this question as off-topic because this question belongs on code review. — Styphon 47 secs ago
If your code is working and you are just looking for ways to improve it, you might get better answers on Code Review. — Hexaholic 30 secs ago
 
today I learned that IE9 has a maximum number of possible style tags.
And that number is not very high.
 
2:53 PM
0
Q: Crank-Nicolson scheme for heat equation

AbolfazlI'm going to convert a code from Octave to FORTRAN. every thing looks ordinary but I get different results. I tried (about 2 complete days) different matrix solver and again different answers. I know here is not for code debugging, but I don't know where make the difference. Do you have any ide...

0
Q: Check if the undirected graph is cyclic

Mosbius8Here is my approach. Do DFS and check in stack whether the new node is already in the Stack or not. public static boolean isCyclicDFS(int[][] adjMat) { int len = adjMat.length; boolean[] isVisited = new boolean[len]; for(int i =0; i<len; i++) { isVisited[i] = ...

0
Q: Performance of a Foreach inside a Foreach iterating through a million records

HappyCodingForum. I have two DataTables: dt: is populated from a csv file with over 1.7 million rows dataStructure.Tables["AccountData"]: is populated from a database query also roughly a million rows I use the following code to iterate through and compare the data from each set of rows. The code takes...

0
Q: More efficient/clean piece of javascript code requested

Kaithis.action = function(value){ var deleted=false; for (var row in binaryObj) { if(value == 3){ for(var i = 0 ; i < binaryObj[row].length; i++){ binaryObj[row].sort(); if(binaryObj[row][i]+binaryObj[row][i+1] === v...

 
Zak
3:10 PM
@Jaywalker the correct term for "pedanticism" is pedantry. (Normally I wouldn't point this out, but in this case I couldn't resist the irony.) — Nathaniel 2 hours ago
 
@Zak pedantry is awfully close to "pantry".
if i lose my 'ed ;-)
3
 
lol
 
I'm hilarious, I know
 
0
Q: Nonlinear Nonparametric Regression

Fred VioleI explain the nonlinear correlation coefficients in this paper and provided the code in this post. The nonlinear nonparametric regression is an extension of this work and its description can be found in the linked paper. In short, the subset means are the regression points and we can achieve a ...

 
@CaptainObvious I know some of these words
 
3:29 PM
Hi guys...
 
0
Q: mod_rewrite code not passing parameters in the URL

Denver Prophit Jr.The purpose of this rewrite code is to change the URL to include www on the URI request and pass everything else to it. I'm finding that the URL parameters are not being passed on. <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^ https://www.%{H...

 
hi!
 
In the following question, I'm unsure regarding how much typos and/or omissions one should accept before closing as broken code (or similar). The edit a few hours ago changed variable naming, clearly indicating rewrite before posting. In addition there are omissions related to instantiating the panda data frames.
3
Q: Backing up files to remote servers

LinI have code that backup files to remote servers. There are 2 pandas data frames: storedfiles: that points to the files already stored in previous runs filelist: a list of candidates to be stored in one of the depots (comes from a config file). Filelist structure has the following columns: ...

 
hello @holroy
 
yet again, the question is kind of sensible (although I don't know Panda that well), so it seems reasonable. What do you think?
 
3:32 PM
@holroy the variable name you speak of looks like just one typo
 
Yes, one typo, but that is indicative of not copy-pasting the question, and rather rewriting before asking the question. And such rewriting could be OK, but raises the question on how "correct" is the code in the question?
I may just be to pedantic, but in cases like this I find it hard to decide whether to VTC or not as the code is not runnable as is, and clearly is not the code the actual OP is using in their "production" environment.
 
3:48 PM
0
Q: closure, anonymous functions or binds on delayed functions

Joe WallisI'm calling an expensive function that dynamical changes as the end user types in a textbox. To reduce the amount of calls to the function I've used setTimeout to delay calling the function, and if the function is called again whilst waiting to run, it'll also remove the last function request via...

0
Q: Python module gzip somewhat slow in 'rt' mode

tommy.carstensenI wrote this script for adding information to a compressed file and compressing the output: #!/bin/env python3 import argparse from Bio.bgzf import BgzfWriter import gzip import sys def main(): args = parse_args() # with BgzfWriter(args.out, 'wb') as fd_out: with gzip.open(args.ou...

 
Hi 200_success, could you please look at my question(s) regarding VTC just listed (before the two questions just reported)?
 
@CaptainObvious The three options look hypothetical... would this post be off-topic?
 
by Joe Wallis? hmm
no, looks right.
as "right" as a gets
hmm wait, the 3 options are clearly "example code", the "up-for-review" part would be the function itself.. ....welcome to grayland
 
I think more context is needed.
Maybe using a timeout as he is would not be the best solution.
 
So... the code that's actually up for review is the 3 hypothetical example code snippets? — Mat's Mug ♦ 6 secs ago
 
4:26 PM
If code is working then question would be better suited for codereview.stackexchange.comcharlietfl 34 secs ago
 
-2
Q: How can i put this code into a function to make it efficient?python

stackoverflowI have written some code and would like to put it into functions to make it more efficient however am struggling any help is very much appreciated also I have been told to use parameters and not globals your help is very much appreciated: sorted_list = [] for i in range(len(headers_list)...

 
> "deleted by stackoverflow"
lol
 
4:55 PM
Just got this comment in my project management course on one of my written assignments:
> You were the only one to highlight the "lack of familiarity" and I'm glad you did. That may seem like a small thing, but it plays such a large role in a group of people forming a team or just remaining a group of strangers.
It seems interesting that no one else got that.
It was even discussed in the article we were supposed to be commenting on.
 
const isCrapBrowser = angular.element(document.rootElement).hasClass('ie9');
if (!isCrapBrowser) {
  $locationProvider.html5Mode(true);
  return;
}
$locationProvider.hashPrefix("!");
^^^ actual code in my project. isCrapBrowser lol
4
 
0
Q: A function that displays a countdown in C

ProtinoI just want to output something like this in the terminal : Executing in 10s.. I've tried coding it in this way : #include<stdlib.h> #include<stdio.h> #include<unistd.h> void printTimer(int delay){ while(delay--){ printf("Executing in %ds...\r",delay); fflush(stdout); ...

 
-13
Q: Why aren't singular answers/questions capped?

Radu IonescuI wanted to put the title "How the false Gods of Stackoverflow are created". This started with me asking a question, simple in nature, but that you see being used wrongly so many times, that even at an intermediate level you start to wonder what is the correct answer. Bang ... comes [duplicate...

wut ^^
 
Also, this kind of question is a better fit for codereview.stackexchange.comAndrea Casaccia just now
Thanks for taking the time to do the tutorial. Stackoverflow is more a Q&A site, so I'd suggest making a blog post for your tutorial. And, if you'd like your code reviewed you can visit SO's sister site: CodeReview. Again, thanks for your efforts. :-) — markE 12 secs ago
 
@Duga lol, thanks for your efforts, here, have a downvote
 
5:09 PM
0
Q: Compile-time plugin system (2)

CilyanBackground This is a follow-up of this CR: Compile-time plugin system. The code exposed below can also be browsed on this gist, which shows the differences between both questions (original is version 1, this one is version 3). This is a simple factory which is able to serve the requested specif...

 
I'm voting to close this question as off-topic because it belongs on code review. — 2501 5 secs ago
 
5:35 PM
possible answer invalidation by Lin on question by Lin: codereview.stackexchange.com/posts/120076/revisions
 
0
Q: Most efficient multi-find/replace solution in Excel VBA

CaffeinatedCoderI'm looking to improve the runtime and efficiency of my VBA code that performs multiple Replace operations on an Excel Spreadsheet. I started out with the following (please forgive me for this horrendous mess): Private Sub symbolCheck() Range("A2").Select 'Selects only to the end of all the data...

1
Q: Efficient image padding in C

hbrezakI am currently implementing pyramids in Lucas Kanade algorithm for optical flow. To be able to build pyramids, I need to pad the images (mirror edge matrix elements) for the required amount of rows/cols determined by parameter half_window. I have written the code below which works but I am new ...

 
5:53 PM
I think your question is better suited for codereview.stackexchange.comAndrea Corbellini 33 secs ago
 
0
Q: 4chan Tripcode Explorer in Python

空间.Background information for those of you who don't know what 4chan tripcodes are: A tripcode is the hashed result of a password that allows one's identity to be recognized without storing any data about users. Entering a particular password will let one "sign" one's posts with the tripcode g...

0
Q: string similarity calculation for advice

Lin MaMy code works and I am looking for smarter ideas to be more efficient? For string similarity, it is defined as longest common prefix length, for example, "abc" and "abd" is 2, and "aaa" and "aaab" is 3. The problem is calculate the similarity of string S and all its suffixes, including itself a...

0
Q: Email a notification when detecting changes on a website (improved)

questionanswerI read through other questions here and improved the code and added a new feature. The old question can be found at: Email a notification when detecting changes on a website The improvments that are done until now: using a difflib.SequenceMatcher added a logger using format for strings excepti...

 
6:15 PM
@SimonForsberg just read this post here on the airport arstechnica.co.uk/security/2016/02/… pretty interesting and crazy. Not sure if you've read it before though.
 
Welp, my laptop hard drive is finally failing. I'm still trying to figure out the best recovery method.
 
6:27 PM
@DJanssens Haven't read that, but I have seen the TV-series Person of Interest which seems related :)
 
http://www.commitstrip.com/en/2016/02/16/better-than-a-guy-who-codes-a-gal-who-codes/
CommitStrip
Better than a guy who codes, a gal who codes!
CommitStrip
1455646911
 
-1
Q: I am getting javal.lang.nullpointer exception while saving jtextfield numeric value to mysql table

prabodh ashtikarConnection con = prepareconnection(); Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); String Qry = "select * from schooldetails where school_code = '"+s_code+"'"; ResultSet updt = stmt.executeQuery(Qry); ...

 
6:43 PM
@SimonForsberg aha true. Thought it could interest you :)
 
Welcome to SO. Please check the help pages about asking the questions: stackoverflow.com/help. As for now, your question is completely unclear. You did not ask anything. Please note that this is not a code reviewing site. You have to ask a meaningful question. — nolexa 15 secs ago
possible answer invalidation by Protino on question by Protino: codereview.stackexchange.com/posts/120197/revisions
 
00:00 - 19:0019:00 - 00:00

« first day (1018 days earlier)      last day (2992 days later) »