« first day (2878 days earlier)      last day (1138 days later) » 

12:00 AM
RELOAD! There are 7429 unanswered questions (89.5347% answered)
 
 
2 hours later…
1:44 AM
Welcome to SO! Please take the tour and read How to Ask. This question is too broad. If your code is working and you would like tips on improving it, please ask on Code Review instead, but first read their How to Ask. If it's actually not working properly, please provide a minimal reproducible example. You can edit if needed. — wjandrea 41 secs ago
Oh, please ... In 50 years, I've passed many code reviews, including mission critical code for satellite uplinks. It is a fallacy to assume that you can do "recovery" after running out of memory for mission critical apps. If you design the program so that you can run out of memory, it's a misdesign to begin with (realtime safe programs don't allow allocation except during initialization). So, what [specific] meaningful recovery would you do for this program here? — Craig Estey 24 secs ago
@RonSkinner - Please review the Code of Conduct and Expected Behavior before commenting again. Your question is off-topic here, and fits on the Code Review site, as linked by Daniel. There's absolutely nothing wrong with such feedback. — David Makogon 45 secs ago
possible answer invalidation by Dahiben Kumar on question by Dahiben Kumar: codereview.stackexchange.com/posts/257301/revisions
 
 
2 hours later…
3:36 AM
0
Q: RandomForestRegressor application to predict Soccer goals. Am I doing it correctly?

PyNoobI am using RandomForestRegressor to predict a set of soccer matches to predict the number of goals scored for a given match/set of matches is as below: dte.head() HomeTeam AwayTeam B365H B365D B365A FTHG FTAG -- -------------- ---------- ------- ------- -...

 
 
2 hours later…
5:42 AM
0
Q: C ArrayList implementation criticism

DagarI have written a ArrayList class in C and I just wanted some criticism on what I can improve on. Any criticism helps, and I was wondering If there is any better way of doing error handling other than returning a enum. #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> ...

 
 
1 hour later…
6:53 AM
The closer I read your question, the more it seems off-topic for SO, and a better candidate for codereview.stackexchange.comMichael Ruth 33 secs ago
 
7:23 AM
0
Q: Can I optimize two for loops that look for the closest zip code based on lat/lon?

Random598345702I am new to python and I had the task to find the US zip code based on latitude and longitude. After messing with arcgis I realized that this was giving me empty values for certain locations. I ended up coding something that accomplishes my task by taking a dataset containing all US codes and usi...

 
8:13 AM
0
Q: Command Line Utility to Delete Files/Directories

sg7610del-files Delete files and directories from the command line. https://github.com/sarthakgaur/del-files Installation git clone https://github.com/sarthakgaur/del-files node main.mjs Command Line Arguments -d: Specify the directory to search in. If no directory is specified, the home directory i...

 
 
1 hour later…
9:19 AM
define "right", and i can answer your question. but i don't know your use case. i don't know your constraints.. does it work? is it, in your eyes, maintainable and understandable? does it follow existing, applicable standards? then yes. maybe code review-stackexchange is a better fit for this question — Franz Gleichmann 57 secs ago
This may be better on Code Review or algorithms. — Peter Wood 20 secs ago
 
9:54 AM
-1
Q: I'm trying to find the largest value in a set of integers

JamieI'm a beginner programmer and am writing a program to move up a set of stairs. Each step has a different length and I'm first trying to calculate the distance of each step and then return the value of the longest step. I have produced the below code, but am struggling to work out how to produce t...

 
10:19 AM
0
Q: Asking for a yes/no user input

HTML402So I have encountered a problem with asking user for input to be exact what is the best way to ask yes/no, for example accepting y / n and why is if i == no or i == c_n: not working? What are other mistakes or bad practices that I'm doing here? i = input('yes/no: ') success = "Success" exit = "EXIT

 
 
1 hour later…
11:34 AM
0
Q: How can I have jQuery code further optimized?

CodeForGoodI would like to see if my code below can still be optimized, resulting in lesser lines of code. My code retrieves the values from a multiselect field and assign them to hidden fields that will be passed to an integrated googlesheet. Thanks jQuery(".ff-btn-submit").click(function() { if(j...

 
12:25 PM
0
Q: Just Made My First Game Which is Rock Paper Scissors After Watching 4 hours tutorial on C++ And Wanted Some Feedback

xJashun#include <stdio.h> #include <stdlib.h> #include <time.h> #include <iostream> #include "main.h" using namespace std; int rng() { srand(time(NULL)); int randomNum = rand() % 3 + 1; return randomNum; } int userInput(int playerChoice) { if (playerChoice != 1 && pla...

 
12:55 PM
possible answer invalidation by HTML402 on question by HTML402: codereview.stackexchange.com/posts/257469/revisions
 
1:40 PM
0
Q: Basic TicTacToe implementation in C++

Dan TangJust created my first C++ project, and wondering if I could get some feedback on where to improve? I might swap from arrays to vectors and add alpha beta pruning later, but wanted to first see where I can improve on the base code. #include <iostream> #include <cmath> const char PLAYER_ONE_MARKER...

 
2:30 PM
0
Q: Flask blueprints and context_processor - Best approch?

Pierre-AlexandreI am working on a Flask application (side-project) to send text-messages to customers using Twilio. There is two different list of customers, 1 for testing and for production (stored in MongoDB). Current functionalities: user login/ logout Add, remove or search a user in both test and productio...

 
 
1 hour later…
3:49 PM
You are looking for Code Review. Please do read their help page before posting there — Tomerikoo 48 secs ago
 
4:36 PM
0
Q: How can I make this code for a password generator better?

morloqI am pretty new to programming but want to get into it. The password generator here takes user input and checks whether the password that was entered is valid or not. Based on that, a reply is printed. This is the code: print("Create a password! Your password must have 8 to 12 digits. Numbers and...

 
<mzonking
 
5:01 PM
0
Q: Newsletter subscribers management system in CodeIgniter 3

Razvan ZamfirI am working on a online newspaper/blogging application with CodeIgniter 3.1.8 and Twig. The application is meant to offer developers and designers the possibility to very easily turn their HTML templates into database-powered websites. To achieve this, I used the Twig template engine, for the fr...

 
5:12 PM
@Duga No, the only answer at that time was rubbish and is now deleted.
 
5:46 PM
Why not ask this question on Code Review as well, where the original appeared? — Jeroen Mostert 10 secs ago
 
0
Q: Making a generic web API controller when using multiple tables with similar fields

Youssef AshrafI have been trying to refactor my code since I found I've been doing a lot of copying and pasting to implement the logic of the web API controllers. Here's how the controllers looked like before refactoring Controller for EducationalGroups table: public class EducationalGroupsController : ApiCont...

 
6:30 PM
possible answer invalidation by Martin Boros on question by Martin Boros: codereview.stackexchange.com/posts/257413/revisions
 
6:43 PM
1
Q: "Guess the Number" in C, beginner

sophieeHello this is my first program in C. Do you have any improvements to this program? The program allows you to guess a number and also returns the attempts. (Sorry for my bad english, I am not fluent.) #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <time.h> /* * Sophie * 21.03...

0
Q: How do i get the user to enter another responce if the data he has typed in is incorrect using Python

James OhearneI am a beginner, and I am learning how to use Python. I am writing a code to do with sales commission. The sales manager needs to calculate the amount of commission paid to the employees and which employees will receive the bonus. The commission is based on the number of properties they sell. The...

 
7:15 PM
I think this is better suited for Code Reviewburan 50 secs ago
Should I just copy my question and post it on Code Review too? — Sola Sky 16 secs ago
I’m voting to close this question because this belongs on code review! — rfkortekaas 24 secs ago
Yes, just post it to Code Review. It will be closed here anyway — buran 40 secs ago
 
7:49 PM
@Duga Yes, rolled back
 
8:24 PM
0
Q: (Python 3) Can I make my sorting algorithm faster?

Sola SkyI have made a sorting algorithm in python 3. This sorting algorithm is a modified optimized median of 3 quicksort, with network sorting for lists of size less than 16 and for finding the median. I have tried using the O(N) approach to finding the median, but sorting normally was faster. The code ...

0
Q: C - Generic vector library

xilpexI'm quite new to C, and I decided to create a generic vector library. Here is the code: #ifndef VECTOR_H #define VECTOR_H #define DEFAULT_CAPACITY 10 #define EXPAND_RATIO 1.5 #include <stdlib.h> #include <string.h> enum error { NO_ERROR, INDEX_ERROR, KEY_ERROR, NULL_POINTER_ERR...

 
8:59 PM
@paulsm4 it's quite helpful, as it makes it so I can handle INT_MIN without having to negative the value: codereview.stackexchange.com/questions/257428/…. — carl.hiass just now
 
9:39 PM
I’m voting to close this question because it basically asks for a code review — bolov 39 secs ago
possible answer invalidation by HTML402 on question by HTML402: codereview.stackexchange.com/posts/257469/revisions
 
10:04 PM
0
Q: A JavaScript graph plotter for schoolchildren using paper.js

GeddesI have begun coding a simple graph plotter for my schoolchildren using JavaScript. I have used the paper.js library as I would like to be able to export the graphs as svg files. I am only a beginner to all this (just a humble maths teacher) so I would hugely welcome any thoughts you may have. The...

0
Q: whats best/better way to apply those constraints?

zowhairSolved this problem: return how many of them contain an even number of digits (in given array/vector). Constraints: 1 <= nums.length <= 500 1 <= nums[i] <= 10^5 Review the code also impl Solution { pub fn find_numbers(nums: Vec<i32>) -> i32 { let mut count = 0; let mut len = 0; if ...

 
 
1 hour later…
11:21 PM
0
Q: Extracting integers from arbitrary text and storing them in a dynamic array

NeilMinimal vector-like dynamic arrays, min_array.h. This is not new at all, but since I use a lot of functions similar to this in larger projects, I was hoping for comments about the documentation, especially the names, and interface. /** Macro for a type-specific minimal dynamic array: `MIN_ARRAY(n...

 

« first day (2878 days earlier)      last day (1138 days later) »