« first day (1557 days earlier)      last day (2755 days later) » 

00:00
RELOAD! There are 4237 unanswered questions (90.8500% answered)
00:48
@EAbrowm I know you don't like DocPropDef. A long name made for cluttered code. — Paparazzi 1 hour ago
Was that meant to be directed at me?
 
1 hour later…
02:15
StackOverflow exists to build a Q&A knowledgebase with answers to specific questions. Code review is outside our scope -- there's a separate SE site for that. — Charles Duffy 45 secs ago
02:32
0
Q: Rock, Paper, Scissors Game in Python

thesolidmooseThis is the biggest program I have ever made. I created a Rock Paper Scissors game. It asks you if you want to play, takes your input, compares it with the random computer input, gives you the outcome, and then asks if you want to play again. I am POSITIVE that I could have done this in fewer li...

03:03
0
Q: Beginner java Minesweeper Game

ym123I made a Minesweeper game in Java, but I am not sure if the code is any good. Comments and questions are in the code. Here's the code on Github (not commented though). Game.java: Main Class of the game, handles input and output and a number of other things (I am not sure if this class should ex...

03:32
0
Q: python - Temperature Interpolation

Cidny RamirezI am currently trying to use the code provided on this website (https://unidata.github.io/MetPy/latest/examples/gridding/Point_Interpolation.html#sphx-glr-examples-gridding-point-interpolation-py) to create a map of taiwan with the linear interpolation of data on a Jupyter notebook. My data is i...

04:25
Monking
04:46
Thanks a lot for the suggestions. I'm learning Python (obviously I suppose) and was just trying to get this working, then will be going back through to make it tighter, and perhaps even head to CodeReview. Also, thanks for the note on return, I'll put those on the same line. — BruceWayne 40 secs ago
I'm voting to close this question as off-topic because it's a question about working code. It probably belongs on code review. — Simon MᶜKenzie 15 secs ago
05:12
0
Q: fasten select joins and select union to get result faster mssql with php pdo

guradioI have select with UNION and LIKE in my project and I have this code : SELECT TOP 10 pcchrgcod FROM ( SELECT TOP 10 acctno AS pcchrgcod FROM hdocord WHERE acctno LIKE '2007-000%' GROUP BY acctno UNION SELECT TOP 10 acctno AS pcchrgcod FROM hpatchrg WHERE acctno LIKE '2007-000%' GROUP BY a...

05:40
@SimonMᶜKenzie I think it's not really substantial enough for CR. Read codereview.meta.stackexchange.com/questions/5777/…Barmar 58 secs ago
it makes me sad that i can't ask a code review :(( — Paul Kevin Macandili 49 secs ago
0
Q: Lessen an if else code

Paulis there any more way how to lessen this line of my if else code. var url = window.location.href.split("?"); if(url[1].toLowerCase().includes("chk=webdes-check")){ $('#website-design').attr('checked', true); } else if(url[1].toLowerCase().includes("chk=webdev-check")){ $('#website-de...

possible answer invalidation by 200_success on question by Soha Farhin Pine: codereview.stackexchange.com/posts/172274/revisions
06:33
@EBrown Probably.
Monking all
possible answer invalidation by Paul Kevin Macandili on question by Paul: codereview.stackexchange.com/posts/172348/revisions
code review with competent programmer — Jacek Cz just now
@Mast Monking
@Duga It's ok.
07:04
0
Q: Snake Game in JavaFX

VinagyI've made a simple snake game on which I want to expand with some properties and settings to allow the user to change the speed increments of the snake and the game field size. Before expanding on it though I'd love some feedback on the current code. Main: public class Main extends Applicati...

07:27
These kind of questions are more suited for codereview.stackexchange.com — Luuklag 5 secs ago
07:38
I want to scan java code in order to check for security aspects for that we need secure code review tool. Here i m using HP fortify tool. After uploading the projects to the Fortify im unable to Scan the project . if anyone knows how to scan the project in Hp fortify tool. Give procedural expalnation. — Pallavi 35 secs ago
07:50
Stack Overflow is not for code reviews. — Jer 48 secs ago
Monking
0
Q: Performance while using list.index() in Python

MasaguaroThe following function sum_pairs(ints, s) takes two inputs: ints is a list with integer values and s is a integer number. The function sum_pairs returns the values (x, y) in ints such that s = x + y and the index of y is the lowest for the (x,y) in ints such that s = x + y. This is a problem take...

08:21
posted on August 08, 2017 by CommitStrip

08:55
possible answer invalidation by lifebalance on question by lifebalance: codereview.stackexchange.com/posts/172293/revisions
09:39
09:54
I'm voting to close this question as off-topic because it should be posted on codereview.stackexchange.comMarcin Orlowski 45 secs ago
Ooops sorry I forget codereview ! — Damosse31 11 secs ago
10:05
possible answer invalidation by lifebalance on question by lifebalance: codereview.stackexchange.com/posts/172293/revisions
0
Q: Increase Matplotlib performance of redrawing

Andrey MazurI have written an error analyzer in Python for the product of our company. I want to read the log from our device and parse it, On Y axis there are different components of the device, and on X axis there is time scale, there is a condition that two errors cannot appear at the same time. As the d...

10:58
Monking
11:15
0
Q: Edit and print file

pekiraI built a program in c# that prints a file throw the following steeps: 1-Makes a copy of a base file Test Rest ---------------------------------- Test Street N 123 TaxPayer: 123123123 Bill [BillType] ---------------------------------- Client [ClientTaxpayer] Date: [Date] ...

11:36
@Kaz Cancelled by OP.
Kaz
Kaz
11:51
@SimonForsberg klkl
klkl?
Probably 'cool cool'
Kaz
Kaz
@Peilonrayz See, now it just looks weird when you expand it out ^^
12:09
Greetings, Programs.
@Kaz Would you prefer 'kewl kewl' ;P
codereviews.stackexchange.com requires valid code. Since the OP's code contains bugs (values are missing), it is off-topic over there. I'm therefore voting to reopen the question here. — Stefan 8 secs ago
Greetings, @Donald.McLean
@Donald.McLean Greetings, User
@Kaz It's weird anyway :P
12:25
possible answer invalidation by pekira on question by pekira: codereview.stackexchange.com/posts/172370/revisions
0
Q: Valid Parentheses Algorithm Effeciency

MicrosmsmWhat do you think of my Algorithm? I start to eliminate the nearest valid parentheses and if string.length == 0 so it's valid /** * @param {string} s * @return {boolean} */ var isValid = function(s) { while (s.length != 0 && s.includes("[]") || s.includes("()") || s.includes("{}"))...

@Duga Lots of changes made - suspicious, but I can't really tell what their purpose is.
12:41
That edit had been made just a few seconds after malachi's answer.
which it doesn't invalidate yet.
0
Q: How to add dependant objects in import script

David CWe have a Console application, which imports register records, expected attendees. They arrive in a flat file (exported from a different system), so we wrote some code to import it into the table structure we want, for use in a Register UI. The data is similar to this: +-----------+----------+-...

-2
Q: Bored Programmer

GMANThis isn't a code related question. And I don't know where I need to make this question. So, I'll write right here. I'm programing a text-based game in C++ and I don't have enough time to get to the part of the game I am searching for bugs. So, How do I jump some parts of the game. (Note: I'm u...

Kaz
Kaz
@CaptainObvious Please kill.
possible answer invalidation by pekira on question by pekira: codereview.stackexchange.com/posts/172370/revisions
2 more answers and 235 more upvotes for a C# Gold!
@Heslacher thank you
I am sure that I could find more in his code, but I need to get back to work
lol
I just upvoted a Jon Skeet answer....
3
13:05
0
Q: Months Needed to Save for a Downpayment (MIT OCW) in Python

BlogsoThe code below should take information from the user about their finances to calculate the number of months it will take them to save up enough money for the downpayment on their dream home. I believe the code is fine up until the While Loop. For the following Test Case: Enter your starting an...

13:21
0
Q: Refactored code for updating user password, email and other info

PremI have to update user email and password if they are present in the params, I have other user information also which can be updated. this is the method I have written, but it doesn't seem like a good method def update if user_params[:current_email].present? if @current_user.has_valid_...

13:36
0
Q: how to write a variable in CSV file using python

user146174I have a variable that contain 26 column and more than 1000 rows. i want to write this variable in CSV file. Note the Variable is mfcc_feat i used this code : open('text.csv','w',newline='')as fp: a = csv.writer(fp,dialect='excel') data1=mfcc_feat a.writerows(data1) the problem is that ou...

14:20
Monking!
Hey @Phrancis :)
0
Q: Use of return in defining a function returning a list

Julian LeeBelow are the codes in Python for writing a function called make_great() that modifies the list of magicians by adding the phrase "the Great" to each magician's name. The second code calls the function make_great() with a copy of the list of magicians' names. I am confused by the use of return ...

0
Q: Calculate g.c.d and l.c.m. in C

It_bumpI wrote a simple program to perform g.c.d and l.c.m., trying to follow the Linux kernel coding style. I know C for about one year, but I'm still a beginner. Example: user@compuer:~/projects/tmp$ ./tmp 21 45 G.C.D: 3 l.c.m: 315 Code: #include <stdlib.h> #include <stdio.h> /* * It returns th...

possible answer invalidation by David C on question by David C: codereview.stackexchange.com/posts/172375/revisions
Kaz
Kaz
14:36
@Duga Seems fine.
0
Q: Correctness of a multi-language book collection SQL design

Olivier GrégoireI'm currently designing my book collection software, because I couldn't find any that suits my particular needs, especially when it comes to translations. Here are my particular needs: Books, authors and publishers must be sortable. This can be derived by the name, but shouldn't. A book can ha...

I'm asking due to a code review, I wanted to check if there was something wrong with the way someone was doing this. Seemed off to me but wanted to get the opinion of SO — Rob 38 secs ago
If you are looking for people who are able and willing to give a general look over your code, I might recommend code review, but this would be once you finish your project. However they can critique your code and such. — Professor_Joykill 50 secs ago
15:36
for fix1b, you can create a new branch from dev, merge released into this branch (no manual changes), fix in a new commit and then merge new branch into dev => that last merge will trigger CI tests that pass + code reviewers will see what was done by git and what were manual updates :) — Aprillion 36 secs ago
0
Q: Variadic template class that stores a vector of each type given

daniI'm exploring the possibility to generalise a class of mine that stores some entities. I like it to be able to keep entities of several type, given as template arguments. To explore the possibilities I wrote the following class, that does exactly that. I'm however unsure if anything that I do her...

16:00
1
Q: Python Batch File Renamer

SometowngeekI'm working on creating a batch file-renaming application that renames specifically the way I coded it. Essentially, these files should be renamed from Root ThisFolder ThisItem ThatItem ThatFolder ThisThatItem ThatOneSillyItem to RootFolder ThisFolder [ThisFolder] ThisItem [Th...

16:55
There are many things going not in an ideal way. The code reads very procedural, with lot of global variables and side effects. Also, you should wonder if you actually need all these variable or if you couldn't group them in an array or object. On that front, the question reads borderline off topic and may be more fit on code review, — k0pernikus 20 secs ago
17:14
posted on August 08, 2017 by CommitStrip

Based on a true story

2
0
Q: Reading from a file into a dictionary

DorianTI'm trying to read a webserver log file into a dictionary, file is passed as an argument: import os import sys def readfile(filename): log_dict = {} with open(filename, 'r') as file: for line in file: log = line.split() # read this into a dictionary...

17:43
0
Q: Initializing some resources

Martijn BurgerMy code style is capped 128 characters, not 80 characters. This abstract base class constructor initializes some resources which are injected in the implementations. However, I cannot assume that will be always the case, so I used some try catching to and Apache Commons Lang3 Validate to validate...

18:03
still no official support for a dark theme in SSMS 17.2 :(
@DanLyons No? :(
I finally got it installed last night on my home system.
there's a hack to enable it, but it's incomplete
you can open C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio\ssms.pkgundef in notepad and comment-out the lines under "Remove Dark Theme"
the text editor part, menu bar, and properties go dark, but the object explorer and results are still light
18:24
@DanLyons Ah, so it's not fully implemented.
1
Q: Structure of React typeahead components

FripoIn order to get a better grasp of React i decided to create a typeahead component. I'd really love some feedback on this in order to improve, learn or avoid mistakes regarding my code. I'm a but unsure if i should split up my components even more than i already did. import React from 'react'; i...

18:42
As much as I like this question, could asking for the most "pythonic" way to do something be asked on codereview? This seems opinionated — Ryan 6 secs ago
19:25
@CommitStrip ugh....
20th? What have I done been doing?
@Phrancis @EBrown Urgent SQL question.
@Hosch250 What's happening
Do SQL where early-exit?
@Hosch250 Define 'early-exit'
So, where foo = '' and bar = '', where bar = '' doesn't run when foo = '' is false.
19:30
@Hosch250 Not guaranteed, SQL Server is free to reorder conditions as it sees fit.
Because I'm having a bit of a performance issue that is completely resolved when I split the condition and use a temp table.
It may evaluate all of them, none of them, or choose it's own arbitrary order when it runs the query.
Oooh, hmm.
@Hosch250 Yeah, it sounds like SQL isn't creating an optimal execution plan in that case.
I bet it knows that the inner join is expensive.
So I wonder if it is going that one last.
19:31
You could try a CASE statement, which might maintain the order.
@Hosch250 Likely. What does the Execution Plan look like?
Do you have permission to view the actual execution plan?
I think that would make it more complicated.
Yeah, but I don't know if I can post it.
@Hosch250 It would, and there's still no guarantee that SQL didn't reorder it.
In the slow one:
@Hosch250 It's safer to not do so, but examine all the points.
Check what the "Estimated Row Counts" are.
Only returning 50.
19:32
Also, depending on the type of join it may be faster to join on a subquery instead of the table itself.
@Hosch250 That doesn't matter, it depends on what statistics have stored. You want to see what it estimates the row counts to be to determine where to go from there.
Hmm, I'm just seeing percents.
Oh, I need to hover.
Yeah.
19:47
So, my latest version of the query with an empty search string is faster than just a plain select * from the table...
I'm voting to close this question as off-topic because I think it belongs to Code Reviewochi 5 secs ago
@Hosch250 Not surprising, SQL can probably use the appropriate indexes in that case to narrow what it collects.
@EBrown Nope, returns the same DB set.
Oh, hmm.
@Hosch250 And it's faster? Huh, weird.
Yeah, by almost a second.
Oh wait, it filters out two rows.
But two rows out of 242k shouldn't make a difference.
Of course, this isn't repeated runs.
19:54
Is it the same query but with and without the WHERE?
Yep.
Huh. How doe the execution plans look?
I assume the SELECT * FROM ... is just a table spool?
Probably.
We got it down to 200 ms.
What ended up being the issue?
We aren't too sure.
The last version execution plan uses more joins than loops, while the first one used a lot of loops.
20:06
Joins are usually faster.
So that's reasonable.
if your code works post it here for code review. — alex 16 secs ago
@Duga No, thank you.
Not looking to get fired just before I get hired.
arguably, @Mat'sMug, but it could just as easily be renamed currentRow which would be quite applicable for both loops. Yes, refactoring would be a better bet in the long run, though. As would eliminating all the implicit ActiveSheet references, uses of Range.Copy/Range.Paste, etc. But, this is Stack Overflow, not Code Review... — FreeMan 36 secs ago
20:26
1
Q: Draw a directory tree

Coal_My goal was to create a simple-to-use CLI program for drawing directory trees (what tree does on most platforms, basically). I'm submitting my 'backend' program for review because I think it makes more sense to review the actual algorithm, rather than reviewing an interface on top of it. import ...

0
Q: Associating a string with a derived class

oddRavenI am using the following code to get a string that is associated with the class of an instance: std::string gate = dynamic_cast<AND*>(pComponent) != nullptr ? "AND" : dynamic_cast<NAND*>(pComponent) != nullptr ? "NAND" : dynamic_cast<NOR*>(pComponent) != nullptr ? "NOR" : dynami...

If you want a code review you can post your question on Code Review - SE. Asking what the code does though is probably not appropriate for that se. — Igor 6 secs ago
20:48
@Omnifarious great code review. he said it's an OpenSSL-only solution though, not a C++ one. I found this useful as a starting point years ago, and though I had to clean it up much as you suggested, it is still an OpenSSL-only solution that fits on one page. If you're taking the effort to critique the answer, why not do the SO thing & suggest an edit to the code? — nevelis 55 secs ago
@maccettura Code review feedback implemented and typos fixed! :-) — James Poulose 16 secs ago
@MarcinKlima Monking.
Sorry bout that, though it is a regular chat :P
i'm not in darknet anymore XD
what music do u listen while programming, huh?
21:26
@MarcinKlima Usually this playlist on Spotify.
@MarcinKlima Slim Dusty!
Check out the hash combine function here: codereview.stackexchange.com/a/148777/73433JAL 53 secs ago
@Hosch250 get rekt!
21:45
@MarcinKlima careful with the tone ...
this is intended to be at least semi-professional :)
@Hosch250 8/10
22:14
@Hosch250 You want to pre-alpha test an ASP.NET application for me? If so I'll email you about it (gotta keep it a secret for now).
0
Q: Small IRC library w/ message loop

kourbouSo I felt like creating a small library to make IRC bots. It's separated in two classes. TelClient is a class that handles the low-level socket programming and message splitting for Telnet connections. IRC is a class built on top of TelClient which provides an abstraction layer for IRC bot develo...


« first day (1557 days earlier)      last day (2755 days later) »