« first day (2089 days earlier)      last day (1928 days later) » 

12:00 AM
RELOAD! There are 5843 unanswered questions (89.8370% answered)
 
12:13 AM
Questions about code that works but you'd like to work better should be asked at Code Review. Yes, I linked to the how to ask page. If you aren't familiar with Code Review, that's the best place to start. — user4581301 7 secs ago
 
12:41 AM
0
Q: Match Merge with Conditions

Celeste WilsonI want to merge two csv's. File1 has ID, Begin, End, Type, Value while File2 has ID, End, Col1, Col2. I want to merge them based upon not only matching but upon criteria (if End<=End, merge Col1 and Col2 onto File1; they don't have the same number of rows). I'm not a strong Python user but sta...

0
Q: Implementing a logging system in C++17

RiettySo, I've been programming for what is a probably a little bit and made a very simple logging system for my personal projects. While it works out fairly well so far, I would like advice on how to make it perform better and stuff I can do to make it more usable in general. Main questions include: ...

0
Q: Bin-packing-problem solution using recursion

booI needed to make a freight calculator and had to solve a bin packing problem. I utilized a github package https://github.com/skjolber/3d-bin-container-packing Basically with the help of my stack overflow question I made a class Method that Splits an array of packable items into the number of ...

 
1:07 AM
I'm voting to close this question as off-topic because it does not have a clear problem. This could possibly be better on codereview.stackexchange.comDijkgraaf just now
 
1:28 AM
0
Q: Authorization Code in Repository Violating SRP

onefootswillHaving just started a new job, I've been looking at the code base of the 2 big projects and am experiencing a combination of respect and forehead-slapping. One thing which has led to the latter is code in the various repositories which seemingly check for authorization. To elaborate, these appl...

 
@CaptainObvious Design Review?
What is the preferred flag for answers that contain no explanation? NAA or Custom?
 
 
1 hour later…
2:59 AM
By the way, I'm sorry your question was closed. I think you are allowed to ask questions like this on Code Review. — LuminousNutria 46 secs ago
 
 
1 hour later…
4:09 AM
-1
Q: SUPER BEGINNER: Check my code Printing Score is the issue

VisionsCreatesThis code doesn't allow me to do anything when I added a scoring method.If someone can show me how to use a class that'd be extra helpful. import random import pygame import time import os pygame.init() screenwd = 1200 screenht = 800 yellow = (255,255, 0) white = (255, 255, 255) black = (0,0...

 
4:41 AM
0
Q: Writing monadic Haskell to evaluate arithmetic expression

dhuI have been studying Haskell by myself for about a little over a year. And I have been stuck at monad/monad transformers for quite a while until recently some examples I read online enlightened me. So I decided to try on the following problem with writing monadic Haskell code. The problem is to...

 
5:03 AM
Monking
 
0
Q: CLI Utility Go - First Go Program

gtalaricoTLDR Python developer; first project in Go; looking for feedback :) Repo Overview I just started learning Go as I need to use it at work. As a fan of project-based learning, I put together a small program to practice writing it. I was hoping someone could review my code & project organization...

0
Q: Erroneous space at end of code between $ and output

ShayI have a code that I am losing out on getting points simply because the very last line for some odd reason is giving me a space between the $ and the output. I have checked for stupid fat finger mistakes but I am finding nothing. Can someone who is much more experienced help me out here? This is ...

 
5:44 AM
0
Q: reading xsd file in python

ragu<?xml version="1.0" encoding="utf-8" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name='Root'> <xs:complexType> <xs:sequence> <xs:element name='Customers'> <xs:complexType> <xs:sequence> <xs:elemen...

 
0
Q: Simple Serial Port Windows Interface

Eddie C.I implemented a very simple blocking uart interface. Most of the serial instruments I interface with are master/slave and I have to wait on data to proceed forward. I am contemplating add some template code to accept any container iterator, but for now I will probably use array or vector. Also, I...

 
possible answer invalidation by Sᴀᴍ Onᴇᴌᴀ on question by Bagseye: codereview.stackexchange.com/posts/211319/revisions
 
Monking
 
6:33 AM
For working code that you want a review on, then post on the Code Review Stack Exchange site. If you're not sure it's working then please do that first. And please read the help pages, take the SO tour, read about how to ask good questions, as well as this question checklist. — Some programmer dude just now
 
6:47 AM
0
Q: Python Inheritance and Class (Hackerank problem)

chau giangI just deep dived to Python and I came with this Hackerrank problem: Create two class, Person with firstName, lastName, idNumber as its attributes with method printPerson() simply print last name and first name and id, and the derived class Student. The Student class has additional attributes, ...

 
@Someprogrammerdude thanks for point that,I will not post code review problem in SO.What should I do?Delete this question? — J.Doe just now
 
7:02 AM
0
Q: tinyxml2 to support wchar,rewrite funtion Print

J.DoeMy colleague modify the tinyxml2 source code to deal with wchar(tinyxml2.2.0 version),Here is the code bellow,actually the code will only run in liunx,so the windows part should not concern. The code bellow whichi my colleague write,the comment between /**/ is the right way I think. void XMLPrin...

 
There is a site call CodeReviews for improvement in code. However, even that is specific to certain code. Just adding link to a site and asking for improvement is kinda wrong — Rajesh 43 secs ago
I think this question still suits here. I would suggest just editing it and making the questions more clear in text, not inside the code. That way it’s easier to see the exact questions, for example “why does this work when written like X instead of Y?” Then it’s not a code review, it’s about a specific thing in the code. — Sami Kuhmonen 59 secs ago
 
8:05 AM
0
Q: PropertyInfo GetValue and Expression Cache GetValue

IT WeiHanI have implemented PropertyInfo GetValue and Expression Cache GetValue by Logic from Reflection vs. compiled expressions vs. delegates - Performance comparison,but I'm sure that there are better ways to do every thing that I did. I would appreciate any feedback on this code, which does work accor...

 
8:21 AM
0
Q: Retaining contextual information with LXML

user02814I am having problems using lxml (with .xpath) to scrape web pages that contain ratings of student satisfaction with university teaching in multiple different courses and units. (See https://www.monash.edu/ups/setu/about/setu-results/unit-evaluation-reports .To produce a page of the kind I describ...

 
9:00 AM
possible answer invalidation by Daniel Bailey on question by Bagseye: codereview.stackexchange.com/posts/211319/revisions
 
9:24 AM
0
Q: Pass IEnumerable<T> as an argument of method and repository pattern

StepUpI've seen tutorials of Unit Testing and I've never seen that IEnumerable<T> used as an argument of method. All authors use Repository pattern and Service layers to interact with data, that is, authors of tutorials get data in Service layer by Repository and there is no need to pass collections be...

 
9:44 AM
This seems more of a code review question with optimisation aspect. "opinion-based" seems the closest close-vote reason. — Yunnosch 1 min ago
 
9:55 AM
0
Q: cumulative profiler for a function

mosheviI have created a cumulative profiler, meaning it runs a function several times in a row and prints the cumulative profiler results. it's python >= 3.6 specific, but you can remove nonlocal and the type hints for it work on older versions. import cProfile, pstats from typing import Union, List, ...

 
10:42 AM
0
Q: Python: get all node descendants in a tree

Giora SimchoniI have a CSV holding a "flat" table of a tree's edges (NOT binary, but a node cannot have two parents), ~1M edges: node_id parent_id 1 0 2 1 3 1 4 2 ... The nodes are sorted in a way that a parent_id must always come before any of its children, so a parent_id will alway...

 
11:27 AM
Try posting this on the codereview site. — Stephen C 49 secs ago
Since your code snippets are already working, you should consider asking on Code Review. — meowgoesthedog 28 secs ago
Keep in mind that your question needs a lot more detail added to the code description if you move it to Code Review. It's not obvious what your program does from first glance. — Zeta 32 secs ago
Keep in mind that your question needs the code included in the question itself if you move it to Code Review. Also, it's not obvious what your program is supposed to do, so better add an example. — Zeta 45 secs ago
 
12:01 PM
0
Q: what is the good way to write this code?

Ahmed Al Khteebthis is a login in code it work with me good but i want to make it more safe if you can help me with this code if any one have time i need to know how to solve SQL injection i have 3 select in my code help me with any one from thim and i will try to solve the author SqlDataAdapter sda = new Sq...

0
Q: Python 'Cashflow' object

M SmithIn the code shown below, I have created 3 classes. The first of these are an 'Payment' class and a 'Annuity' class, which allow the user to create objects representing individual or recurring payments respectively. The third of these classes is a 'Cashflow' class, which takes a combination of Pa...

 
possible answer invalidation by flodel on question by user190888: codereview.stackexchange.com/posts/211926/revisions
 
12:17 PM
0
Q: Is there any ideas to make my Python code more simple (Hour Glass Pattern)?

AdjiSorry for my bad English. So I want to know, is there any simple code for making an Hour Glass pattern with odd or even input using Java or Python? Because my code is not simple (I'm using Python). Here's the output example: And then, here is my code: def evenGlassHour(target): jsp=1 jtop=...

 
Maybe you should ask here: codereview.stackexchange.comPijotrek 20 secs ago
 
12:32 PM
0
Q: SyntaxError: unexpected EOF while parsing

guestFORWARD NEURAL NETWORK. SyntaxError: unexpected EOF while parsing . this is the error i am getting if i am including last statement 'err' in loop. how to rectify it for i in range(len(data)): nsum_hid_layer = np.dot(W1, X.loc[i,:]) nout_hid_layer = np.maximum(0, nsum_hid_layer) nsum_o...

 
 
1 hour later…
1:36 PM
This is probably better suited for codereview.stackexchange.com than SO — helb 9 secs ago
 
1:52 PM
0
Q: Largest binary gap

xueshengI took a task from Codility to find longest sequence of zeros in binary representation of an integer. For example, number 9 has binary representation 1001 and contains a binary gap of length 2. The number 529 has binary representation 1000010001 and contains two binary gaps: one of length 4 ...

 
2:04 PM
@Vogel612 @skiwi Remember this? ^^^
 
dimly, yeah
 
Need to start working on that again, the proof-of-concept went really well.
 
-3
Q: cant find first FrontEnd Junior job

Roman Avadiaevi have been looking for my first front end job lately, the problem is that i never received a call by now. i assume my skills are not enough to land that first front end job? i have a couple projects on github, i used vanilla js and all the latest css technologies... flexbox, media queries, css a...

 
@SᴀᴍOnᴇᴌᴀ Yes, unfortunately.
@CaptainObvious ...
 
@Ludisposed Since I can't comment back on the post: the format line might be more readable as f'{"@" * length:^{size}}'
 
2:13 PM
@202_accepted The Haskell fox jumping, right?
 
F#, actually
 
Right, of-course.
 
But I’m somewhat stuck with Python 3.5 at the moment, so used to using .format
 
@Mast Yeah F#.
 
2:25 PM
possible answer invalidation by Sᴀᴍ Onᴇᴌᴀ on question by Bagseye: codereview.stackexchange.com/posts/211319/revisions
 
@Duga @SᴀᴍOnᴇᴌᴀ You know you're allowed to make all those edits at once, right?
 
@MathiasEttinger Yes I've come to the same conclusion, but if I were to rewrite it now... Iit would pretty similar to your answer and you've already explained it quite well. :)
The for else was used to have a variable for the starting point of the next for loop which doesn't make sense at all
 
2:51 PM
Start a new question instead of like this, also this question should be on CodeReview I guess, I'm not sure, or maybe on SuperUser. @Rohit — Tiw 54 secs ago
 
3:08 PM
Greetings, Programs.
 
0
Q: Thread-safe sensor interface with observer and strategy patterns

PhilippeI would like to implement a thread-safe API for an observable Sensor. The concrete type of the Sensor is chosen in the configure method. I ended up with this code, which has a deadlock. The deadlock occurs when the stop method is called. The mutex is locked in the stop method, waiting for the pro...

 
3:27 PM
If you ask something like "would a switch-case work?", then the best line of action is to just try it yourself. Code Review is a more appropriate place to ask for advice and to check working code. — C Perkins 44 secs ago
 
3:42 PM
1
Q: Redux: button click potentially fires 3 action for different reducers

AskaNor_29I’m using Redux and thunk, I have a list component class List extends Component { render() { //code } return( <Aux> <Button type="button" click={() => this.props.addNew(data)} btnType="add" > Add </Button> <Button type="bu...

0
Q: Json of MAP consisting of key refrenced to Json of Objects using Jackson libs

N.S.KarthikI need to create a Map payload of Json as follows with objects { "english" : {"student":"alpha","Id":100,"presence":false}, "maths" : {"aggregrate":75,"total":100,"report":"yearly} } How can i create a Map of 2 keys with values refrence to a Json ?

 
3:58 PM
0
Q: Simple Word Trie

LudisposedThe start of a simple scrabble solver What I have so far: Add a word to the trie Return a sorted list with the all possible combinations, based on the letters input Some basic tests Just wondering if my Trie seems correct before continuing from queue import Queue import unittest class Nod...

 
4:09 PM
Monking
@Mast yeah, was just re-reading the post several times and noticed things that could be updated
@CaptainObvious hehe answered by multiple users with avatars from the spongebob series
Maybe Renas was inspired by t3chb0t's avatar
 
4:29 PM
0
Q: Simple Password Vault

BlakeI made a simple password vault in Java and I was wondering if anyone had any input on it. The code works fine, I just wanted to know if there are any improvements that could be made. import javax.swing.*; import javax.swing.table.*; import java.awt.event.*; public class PasswordVault implement...

 
You might have better luck getting feedback @ codereview.stackexchange.comTerrance 31 secs ago
 
4:45 PM
0
Q: SQL - Get local datetime from UTC time

Ashish GuptaOne of the app is inserting date in UTC format (column "CreateDate"). When reporting from this table, I used a difference in hours between the inbuilt GetUTCDate() and GetDate() and added the same to the CreateDate column. I was hoping to not worry about the daylight time. Is this approach OK? S...

 
5:11 PM
Monking
 
0
Q: Excel to CSV converter

Sandro4912To check out the cssv module i wrote a small programm which takes all xlsx files in a folder and converts them into csv files. Let me know what you would improve on this program. xlsx_tp_csv """ All xlsx files in the folder of the script get converted into csv files (One for each sheet). The n...

 
Try codereview.stackexchange.com this site deals with broken code — zer00ne 39 secs ago
@bruno Code has numerous short comings. I see about at least 5. If OP wants a general review code review is a good spot for that. — chux 25 secs ago
 
5:48 PM
0
Q: Yet Another Dijkstra [with real data and drawing]

I. S.I've been assigned to use Dijkstra's algorithm in order to find the shortest path on real data, more specifically on Luxembourg's map. The map is an .xml file with the following structure. <nodes> <node id="0" longitude="4963454" latitude="621476"/> <node id="1" longitude="4959...

 
6:00 PM
possible answer invalidation by Jamal on question by Giora Simchoni: codereview.stackexchange.com/posts/211989/revisions
 
@Duga nah, just taking down fences and using standard markdown code block formatting
 
0
Q: I have 2 problems with a script

AntonArch007I'm new in stack exchange i have 2 majors problems with a script. Firstly, snake length does not change even i eat the apple(actually i have to pass over the apple many times to increase length) and secondly, snake crosses the boundaries without game over.(I've programmed the boundaries). Also ho...

 
@CaptainObvious then this isn't the site you are looking for...
Thankfully Jamal closed it so we don't have to waste our time
 
he is fast
you know it is a slow day on CR when Malachi's lol is the top starred message....I can't star my own stuff you know.
2
 
6:15 PM
@CaptainObvious maybe if the OP fixes the problems, he/she will update his/her avatar...
 
6:33 PM
Is it a new rule of codereview? Where can I read about this type workflow? — Roman 46 secs ago
 
@SᴀᴍOnᴇᴌᴀ Jamal is quite fast.
 
@Mast No doubt
 
Dec 6 '13 at 2:02, by Jamal
I don't even pay attention to dates. I just edit like Dr. House takes Vicodin.
There are times when you take a look at a new post, just seconds after it's posted, and it's already edited by Jamal.
3
@Malachi Meh, we've had days where the entire starwall was one big lol.
 
@CaptainObvious I wonder if anyone emailed OP
 
Better way? So your code works, and you're looking to make it more efficient? Seems more suitable for codereview.stackexchange.com. — Gendarme 9 secs ago
 
6:38 PM
@Mast reminds me of the Meme post ... which makes me think of the movie Minority Report, which I actually haven't watched yet
@bruglesco you could email the OP to ask... >.<
 
@SᴀᴍOnᴇᴌᴀ @bruglesco I've flagged the comment for removal and to be purged from history.
Personal information like that shouldn't be shared in posts & comments.
 
@Mast valid point.
 
6:55 PM
Tell your professor to stop it and start using std::vector. The code would never pass code review in a modern code base. — NathanOliver 42 secs ago
 
7:38 PM
0
Q: Message in window overlaps when updating HELP()

VisionsCreatesThe question is how do I get the text that prints not to overlap def msgwintexts(text, font): msgwinsurfs = font.render(text, True, black) return msgwinsurfs, msgwinsurfs.get_rect() def displayscore(text): Bigmsgs = pygame.font.Font('freesansbold.ttf', 18) msgwinsurfs, msgwinrect...

 
Are you looking for code review or are you experiencing a bug or having trouble implementing something? If code review, this is not the right forum. If having trouble, please be specific what trouble you are experiencing. stackoverflow.com/help/how-to-askwlh 25 secs ago
 
7:54 PM
0
Q: Debouncing function, ES6 version

RomanPlease, review the code: const callback = (...args) => { console.count('callback throttled with arguments:', args); } const debounce = (callback, delay) => { let timeoutHandler = null return (...args) => { if (timeoutHandler) { clearTimeout(timeoutHandler) } timeoutHandl...

0
Q: A D wrapper around C library librdf

portonI have created a D wrapper (static and dynamic library) around the C library librdf. The version for review: https://github.com/vporton/redland-bindings/tree/5d942dab18eeb66508fdffeb328bd190a3cd9c41/dlang There are some issues: I use types like URIHandle* where URIHandle is declared as a stru...

0
Q: Making function print everything on the same line in Java

Evan KimI made a function that prints out letters in large block letters with each large letter corresponding that same letter. Sample output: EEEEEE E ...

 
If you have fully working code, and you simply want critical feedback, this question probably belongs on codereview.stackexchange.com. Generally speaking, Stack Overflow is for helping fix code that doesn't work, while Code Review is for fixing code that does work. :)apsillers 20 secs ago
 
8:15 PM
As said above, this belongs more to Code Review. I still think this might be useful here too, so two vulnerabilities apparent at the first glance: (1) Information leak, sensitive info (username, and especially password) should not be sent in the url. (2) User enumeration, response is different for valid and invalid users. — Gabor Lengyel 50 secs ago
Hi @Haestya, and welcome to SO! Questions like this are probably a better fit for https://codereview.stackexchange.com, since you're not actually looking for a solution, but rather ways to improve code that already works. — s3cur3 13 secs ago
If you're simply looking for alternative implementations, I'd recommend against getting this reviewed and instead look at how other people have done it before you. Get some inspiration, write something new and get that reviewed afterward. — Mast 10 secs ago
 
@Duga RBA, possibly incoming. If so, watch the indentation, good chance it's off.
 
8:41 PM
0
Q: Python/Django Class based saving - worried about security

Myzel394I'm creating multiple django apps with vote possibilities. So I made an app vote to handle all this votes. In my templates I'm including an ajax-function named vote. To know on which model I'm liking I add app_name and model_name to the vote function (I made some templatetags to get these values)...

 
Questions that do not ask for a solution to a concrete programming problem are off-topic on Stack Overflow. However, our sister site Code Review, was specifically created for questions like this. But please, do make sure that you read their tour, FAQ, on-topic, and off-topic pages (linked on the bottom of the page) before you post. Also, just like on Stack Overflow and any other site in the Stack Exchange network, all relevant information (in this case your code) must be part of the question, not hidden behind external links. — Jörg W Mittag 1 min ago
 
9:10 PM
@CaptainObvious (-‸ლ)
 
0
Q: Long cache refresh with guaranteed response

Matt WI am trying to ensure that (once a cache item is populated) even if it's refresh object takes a long time to retrieve, the original cache item can be requested. using System; using System.Runtime.Caching; namespace LongCacheTest { class Program { static void Main(string[] args) ...

 
9:44 PM
0
Q: Basic static html page with applied accessibility

Tommy KI'm following the project found here: https://learn.freecodecamp.org/responsive-web-design/responsive-web-design-projects/build-a-tribute-page I'm sure I forced some flexboxes where they didn't need to be. Tried to apply some accessibility topics that were discussed in earlier lessons. Overall i...

 
10:16 PM
0
Q: Leetcode Longest Common Prefix

Rez88I just recently finished the following problem on Leetcode problem. I know it's not the cleanest or fastest solution. I would appreciate if I can get some feedback on how to optimize the code. The idea is too add all possible prefixes into an array and return the longest possible prefix. I beli...

0
Q: PowerShell script slows down during for loop

JfireI'm rather new to PowerShell so I could use some help with why my script is running so slow. It starts off just fine, and even the first 30 or so iterations of the for loop are zippy. But by the time my for loop gets to around 75 iterations, it has slowed down to ~20 seconds per iteration. Do I n...

 
10:40 PM
I'm pretty sure your question would be on-topic at Code Review. Please ask there: codereview.stackexchange.com. Also, make sure to include the code in your question and a brief summary of what the program is supposed to do. — Kodos Johnson 21 secs ago
In its current form, the post would be off-topic on CR because "It is fine to post supplementary code on a third-party site, but the most important parts of the code must be embedded directly in the question." from - the on-topic for CR pageSᴀᴍ Onᴇᴌᴀ 45 secs ago
 
11:10 PM
In that case don't modify it. Your modifications could break the designer, or even in the best case the designer will just undo any modifications you make. Code reviewing generated code seems like unnecessary effort. Best to set your code review tools to ignore those. — David 38 secs ago
 

« first day (2089 days earlier)      last day (1928 days later) »