« first day (2859 days earlier)      last day (69 days later) » 

12:00 AM
RELOAD! There are 7349 unanswered questions (89.6049% answered)
 
12:42 AM
I’m voting to close this question because it is an unfinished and open-ended request for a code review. — Prune 16 secs ago
Please repeat on topic and how to ask from the intro tour. Please see all sites to choose an appropriate Stack Exchange site for this question. If you can tighten up the focus, Code Review should be a good landing place. — Prune 26 secs ago
If the code works and you're looking for advice on improving it, Code Review is the appropriate place. But see codereview.meta.stackexchange.com/questions/5777/… first. — Barmar 1 min ago
 
1:32 AM
-1
Q: How could this web crawler built with pure Python be better written

Rod DelaporteI just found a Web Crawler very well made and built using basic python modules and I would like to improve it so the code does a similar thing but with less code but also using best practices and conventions which leads to asking also: Is this well-written code? How can be improved? The code has ...

 
1:45 AM
possible answer invalidation by rolfl on question by KSJaay: codereview.stackexchange.com/posts/256580/revisions
 
2:34 AM
This might be a better fit for the site codereview.stackexchange.comDijkgraaf 22 secs ago
 
3:09 AM
0
Q: Embedded IoT: local data storage (Second Update)

Vinay DivakarI have made the review changes based on feedback I have got from here which was based on the feedback I got from this one. I am almost done and now looking for a final review with respect to any minor or obvious improvements/fixes that can be done quickly. In regard to supporting multiple instanc...

 
3:32 AM
0
Q: Which searching algorithm will be better?

Crypto26Count the number of iterations for both algorithms(binary search and linear search algorithm) on the same array using C language. #include <stdio.h> int main() { printf("solve"); }

 
3:57 AM
0
Q: JSON convert arbitrary struct to another struct

Tim ReddyI'm new to Go and here's some code that converts one struct to another using the json package. My inspiration for this code is I want to separate domain knowledge between the front-end and back-end. For example, a client hits a RESTful endpoint that will return a JSON-encoded Frontend response. ...

 
You can use this stackexchange site - codereview.stackexchange.com for code reviews. Stack Overflow can help when you are stuck at programming. But this site probably has better code reviewers. — anishsane just now
 
4:51 AM
Monking
 
5:10 AM
0
Q: Making This "Fancy" Sort Algorithm a Little Better

Jacob HornbeckThis is my code: def add_to_destination_array(destination_arr, src1, iSrc1, src2, iSrc2): temp_array_length = len(destination_arr) while len(destination_arr) - temp_array_length < len(src1) + len(src2): if iSrc1 < len(src1): if iSrc2 == len(src2): desti...

 
5:35 AM
0
Q: Improving speed of parsing XML file

adb12import pandas as pd import pandas_read_xml as pdx from lxml import etree url2='http:' url='http:' tree=etree.parse(url) st=etree.tostring(tree.getroot()) # The list "all_leaves" includes every node and leaf in the tree from io import StringIO, BytesIO #st above is encoded as binary all_leaves=...

 
6:00 AM
So what exactly is the problem you are getting? How can we help fix this code? Because if you are just trying for efficiency/best practice that isn't an SO question. That's a Code Review question. — The Grand J 47 secs ago
 
 
1 hour later…
7:15 AM
possible answer invalidation by Linny on question by Joji: codereview.stackexchange.com/posts/256060/revisions
 
7:59 AM
Well, i got a code review comment and being asked to add the 'if' to a using block. — Sandeep 38 secs ago
Off-Topic: Once you have your program running, I'd recommend to post it at Code Review, as there are a lot of aspects where you can improve your coding style. — Ralf Kleberhoff 47 secs ago
 
8:52 AM
I am not sure why you would want to combine the methods into one? Having them as method 1 and 2 is much neater and is what I would have required in a code review. — rmfeldt 25 secs ago
 
9:21 AM
If this is working code that you think could be improved, see Code Review. If not, please give a minimal reproducible example to illustrate the specific problem. — jonrsharpe 43 secs ago
 
 
1 hour later…
10:50 AM
0
Q: How do I use a ternary inside an object?

DamianThis is in Javascript. I would like to simplify my code so the ternary is only written once and modifies the values of the key: value pairs. My current code: { "key0": isTrue ? "x" : "y", "key1": isTrue ? "q" : "t", "key2": isTrue ? "v" : "z", } I think my code would be better if I could combine...

0
Q: Python 3.9 : How to generate permutations of 30 shares, in groups of k, and calculate variance for each permutation

Giulio GuarnottaI'm using Python 3.9 and I need to calculate permutations of 30 shares. First of all I need to download all weekly prices from yahoo , then starting with permutations of 30 shares in groups of 2, in groups of 3, 4, etc..., in order to create different portfolios. For each permutation I need to ca...

 
11:14 AM
0
Q: Covid Tracker + Notify people = Ideal for small coffee place or similar

Alejandro TrincheroThis is my second project since I started with Python, this time I learned a little bit of SQL that is so useful and beautifully simple. Starting idea: Generate a program that will store information in DataBase(SQL). Goal: Learn SQL basics and expand my knowledge in Python. After project thoughts...

 
11:45 AM
can you add more details like what is el and what is the expected output. I would also recommend code review SE — depperm 1 min ago
When you have code that does so far work properly and you just would like to receive feedback if you could do something better, then you might want to post that on codereview.stackexchange.comPhilipp 44 secs ago
 
12:51 PM
0
Q: Filter functionality Project using C#

LV98I am simply implementing a filter function for one my forms. I'd like to hear some reviews where I can improve in my code or my functionality :) Summary I have 1 textbox and 2 comboboxes (See image below): Category options Status options Code public MainView() { InitializeComponent(); ...

 
1:19 PM
if the code works and you just want review/feedback look at code review SE — depperm 11 secs ago
 
1:36 PM
might this post be a better fit for codereview.stackexchange.com ? — Sam Mason 49 secs ago
 
0
Q: How to bind a Dictionary of a custom class type to WPF list view with multiple columns?

Joan VengeI am struggling to bind my Dictionary<string, Coin> to a WPF ListView. I want to bind Coin.Symbol, .Price, .Amount, etc to ListView as individual columns and if the underlying object changes, i.e. symbol, price, amount, to automatically update the ListView. Do I have to raise events on these prop...

 
1:56 PM
This question is better suited for codereview.stackexchange.com as the code works — evolutionxbox 32 secs ago
codereview.stackexchange.com requires me to have a correctly working code for a question @SamMason — Prometheus 15 secs ago
 
0
Q: use regex to separate a list of serial numbers into multiple lists with matched prefix

Sean HsiehThe question comes from this thread. Input: sn = ['bike-001', 'bike-002', 'car/001', 'bus/for/001', 'car/002', 'bus/for/002'] Target output: string with same prefix will be in the same list, e.g.: sn1 = ['bike-001', 'bike-002'] sn2 = ['car/001', 'car/002'] sn3 = ['bus/for/001', 'bus/for/002'...

 
2:13 PM
 
2:33 PM
This question is a lot better suited for codereview.stackexchange.comDschoni 12 secs ago
Code review: why save connection details in Hub itself ? Hub won't maintain its state and All clients info can be pulled from context within hub. Being said that with your code I don't see any reason where it should throw null reference exception, does log mentions any line number or type info ? — mbshambharkar 13 secs ago
 
3:18 PM
1
Q: Object orianted programing in a game

MrLowBotRight now i have a snake game that is working but i need a way to make my code look better and work better. A method i named "GameSense" is very long and i need a way to make it more object oriented. I want to use Enums. This is what my teacher sent back to me: The game is very nice and nicely wo...

 
3:59 PM
@Steven There's not even working code which is one requirement for codereview.stackexchange.comAndreas 57 secs ago
 
4:46 PM
Monking
 
 
1 hour later…
6:08 PM
0
Q: c - memcopy for embedded system

anishkumarI just implemented my memcpy function without any previous lookup. #include <stdio.h> #include <stdlib.h> #include <string.h> void * copy ( void * destination, const void * source, size_t num ) { if ((destination != NULL) && (source != NULL)) { unsigned int *dst = destination; ...

 
Well done for starting to code! As @Dschoni said, you should repost this to codereview — Jmorvan 28 secs ago
 
6:29 PM
While I wasn't the one who closed it, this question is definitely an opinionated question and was rightfully closed. This question should have been 1. This is what I have - 2. How can I improve - in addition to being posted in the Code Review StackExchange. Bluntly, this isn't Google. — impression7vx just now
 
0
Q: Reviewing forming a dynamic dictionary based on searched key and values pair using RAW logic and not modules of python

AhmFMI am trying to create a dictionary with a file containing text based on a matched pattern. Lines containing key_str should become keys and subsequent lines not matching key_str should become values and get associated with keys in the dictionary. so i have below code working: But I need help and g...

 
6:57 PM
This is probably a question better suited for the code review exchange than stack overflow — mhodges 47 secs ago
 
7:21 PM
0
Q: Speed up a function that checks for a sequence

mr.TI created a function yes.seq that takes two arguments, a pattern pat and data dat, the function looks for the presence of a pattern in the data and in the same sequence for example dat <- letters[1:10] dat [1] "a" "b" "c" "d" "e" "f" "g" "h" "i" "j" pat <- c('a',"c","g") yes.seq(pat = pat,dat...

 
7:46 PM
0
Q: Weather App - is my code efficient?

Michael YoungI have been building a weather app that changes the background colour depending on the weather temperature and description. This is the code I have to get it to work. const body = document.querySelector('body'); const colorList = [ {weather: 'Clear', color1: '#7AE7C7', color2: '#72C1E1'}, {w...

 
@CaptainObvious Every time I see a request for review for a weather app, I'm reminded by this odd post.
 
Looks like you should rather post this on codereview.stackexchange.commkrieger1 22 secs ago
 
@CaptainObvious ah yes... that one
> "Stand back kiddies, this is how a real programmer does things."
I've reviewed two JS weather app posts - sometimes I think back to those
 
8:10 PM
1
Q: command-line binary/hex conversion program in python

t.y.lerI'm just learning the ropes to programming, so bear with me here. I wanted a simple command-line program to quickly convert decimal numbers into either binary or hexadecimal. This is what I came up with, but I know it can be improved. while True: while True: conv_type = input("Hexadec...

 
Ben Popper on March 02, 2021
While many introductory statistics classes teach the CLT, very few actually attempt to prove it because that requires some complex math. In this session, we’ll bypass all that math by using Python loops to simulate the CLT.
 
8:34 PM
0
Q: How to break a while loop when break is supposed to be used in defining a function?

Karthik Nambiaru=input('enter your sql password ') import mysql.connector as s mycon=s.connect(host='localhost',user='root',passwd='{}'.format(u)) cursor=mycon.cursor() cursor.execute('create database if not exists Reservation') cursor.execute('use reservation') cursor.execute("create table if not exists USER(u...

 
8:51 PM
If this were code review, I'd hit you with a rolled-up newspaper for that awful ternary chain. Just use a switch! — Niet the Dark Absol 31 secs ago
 
0
Q: C++ Fast Fourier transform attempt 2

Pel de PindaThis is a follow up for C++ Fast Fourier transform . I did end up changing the algorithm slightly to reduce the memory usage. However the new program gives a memory error by 2^14, while the old one handled 2^20 just fine. How is this possible? I only assign 3 arrays of length N, and also on the s...

 
9:13 PM
@Feeds Might be time to start condensing it some, because part 1 was already hard to follow just by how it was presented.
 
0
Q: Python beginner looking for feedback on simple dice game

MonoxideDice "Game" So, just started python a weeks time ago, so I'm looking for feedback/critique on things i can do to improve my code. I wrote a little user/pc dice rolling game. Any feedback at all is appreciated! def dice(n: int) -> tuple: """ Simple function to roll 'n' number of dices. ...

 
10:03 PM
Welcome! You may want to check out the codereview stackexchange. While the intent there is not to ask people to rewrite / shorten / optimize your code, it is the place to ask specific questions around code you've written, and to have folks provide feedback. — David Makogon 56 secs ago
 
0
Q: Making a Dhond't system in C# by reading from a data file

Mj _I wanted to know if i have used abstraction and encapsulation effectively here, and if not where can i improve thank you. MAIN using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace Voting_System { class ...

0
Q: Is there a cleaner way to write this window function?

ScottI have a query that returns a list of parts - some parts are required and some are substitutes for required parts. In some cases either the required part or the substitute is an assembly, so 2x required parts might be equivalent to 10 substitute parts, for example. My goal is to get a single perc...

0
Q: Selenium Webscraper for Odd data analyses

BlackElefantI have written the following code to achieve the following: Regularly scrape all live matches on the betting site oddsportal.com Pull odds data into data frame Evaluate data frame for two odd providers (Asianodds, Pinnacle) and compare actual data against pre-defined patterns Send a telegram mes...

 

« first day (2859 days earlier)      last day (69 days later) »