« first day (2395 days earlier)      last day (1608 days later) » 

12:00 AM
RELOAD! There are 6291 unanswered questions (90.0391% answered)
 
12:37 AM
Looks more like a code review than a coding question. — JaMiT 34 secs ago
 
0
Q: Check the tool running tcp server using systemd service for logic, implementation and correctness

Ciasto piekarzI have written this TCP server in python that runs on specific port and listens for only one client connection from a microcontroller. The job of TCP server is to continuously listen to the client connection and receive data which the tcp server handler uploads to mysql on the same localhost. ...

 
 
1 hour later…
1:47 AM
0
Q: Recursive component JSON configuration builder

JohanMy goal here is to make data driven nested forms in React. I've created a function that points to a form configuration JSON, which can contain both components and references to other configuration files, with their own components. I'm splitting it to separate files to keep things DRY and to get a...

 
2:07 AM
0
Q: A farming tool rental service

Huvinesh Rajendranrent.java package farming.rental.service; import java.io.IOException; import java.text.NumberFormat; import java.time.Period; import java.time.format.DateTimeParseException; public final class rent { private String clientname; private farming_tools tools; private int hours; private double ren...

0
Q: Creating a C++ class for complex fractions, given a defined class for fractions

Ruben AazamiBelow I have a header and source file for each class: Fractions and complex fractions. Currently there is a declaration of a class called ComplexFrac in the .hpp file. It has two private member variables: real and imag. It has one public constructor with no parameters which creates an instance of...

 
 
2 hours later…
3:38 AM
A bit more code review: I don't think it makes any sense to write answers to Python 2 at this point - I'd consider removing Python 2 as I would expect you to use 64 bit Python 3.7 or 3.8. You could set the cleanup to go at the end with atexit and a partial application. Typo: "veriify". I see no sense in the duplication of the test strings - are they at all different? I imagine if you use super(). instead of tuple. in your __new__ you could use the namedtuple attribute names instead of indexes. — Aaron Hall ♦ 18 secs ago
 
3:51 AM
0
Q: Creating a maze game where the game resets if you hit traps/walls and finishes when you hit a different color

Nicocav6Here’s my code, the traps are the slightly visible squares. The user controls a red square (with arrow keys) and cannot touch the walls or traps or else the game resets. Additionally, if the user touches the green line, the game ends. Code: <!doctype html> <html> <head> <meta charset="UTF...

 
4:14 AM
0
Q: Bingo Game that needs someone to look over because of repetitive coding

Joshua SaikaliI am a beginner Java programmer and am in need of someone to read over it and help me condense my repetitive coding. I wrote code for a Bingo game and feel like I repeat code too often. If anyone could help me with my over obsessive use of repetitive code it would be greatly appreciated package...

 
4:55 AM
0
Q: Code that someone can have look over

Vivian Mascarenhasclass NewEnpc{ public static String encryptThis(String text) { StringBuilder sb=new StringBuilder(); String[] arry=text.split(" "); if(text!=""){ for(int j=0;j<arry.length;j++){ char[] sd=arry[j].toCharArray(); int number=(int)sd[0]; if(sd.l...

 
 
1 hour later…
5:56 AM
I'm voting to close this question as off-topic because it is about improviing working code, and therefore belongs on Code Review instead, which was created for that specific purpose. — Ken White 42 secs ago
 
 
2 hours later…
7:30 AM
possible answer invalidation by HotDogCannon on question by HotDogCannon: codereview.stackexchange.com/posts/232878/revisions
 
 
1 hour later…
8:35 AM
possible answer invalidation by HotDogCannon on question by HotDogCannon: codereview.stackexchange.com/posts/232878/revisions
 
 
2 hours later…
10:54 AM
@Pynchia Code that does not work is off topic for the code review site. — snakecharmerb 24 secs ago
@miken a good code review. — mickmackusa 49 secs ago
 
11:09 AM
1
Q: Python Dice Game

Nicholas Wing Hei HoHow would I clean this code/shorten it (most of it is login) What the program does: Only authorized players are allowed to play. Input from user should be validated where possible. 5 rounds. Score cannot go below 0. 2 players roll 2 6-sided dice. Points rolled on each player's dice are add...

 
 
2 hours later…
12:54 PM
scanf() returns when there is a newline buffered, but format specifiers such as %d to not "consume" the newline, so the next scanf() call returns immediately without accepting new input. That is the cause of the problem you describe - the code has other issues, such as the flawed retry code, magic numbers, and the use of the meaningless variable name temp1, and the fact that it is used for more than one purpose within the code, where separate usefully named variables would be appropriate. But this is not the place for code review. — Clifford just now
 
1:35 PM
-1
Q: Efficient box filtering of a pointcloud

ezekielThis is my Double Box filter, it filters out points from a pointcloud that are beyond X, Y, Z maximim and minimum thresholds OR within X, Y minimum thresholds. The idea is that we aren't interested in points that are part of the floor, above a certain height, beyond certain X,Y limits or very cl...

 
MOnking
 
2:14 PM
Monking
 
possible answer invalidation by sanoj lawrence on question by sanoj lawrence: codereview.stackexchange.com/posts/232702/revisions
 
2:34 PM
Unfortunately, stackoverflow.com is for specific and technical questions on programming topics. "Would X be an acceptable way" is mostly an opinionated, non-technical subject matter that's off-topic here. Perhaps codereview.stackexchange.com might be appropriate for this kind of a question. — Sam Varshavchik 24 secs ago
 
2:58 PM
0
Q: Fisher-Yates shuffle in Haskell

ReduThis is the Haskell version of my recursive Fisher-Yates shuffle in JS. import System.Random pick :: Int -> [a] -> ([a],[a]) pick _ [] = ([],[]) pick 0 (x:xs) = ([x],xs) pick i (x:xs) = (,) <$> fst <*> ((x:) . snd) $ pick (i-1) xs shuffle :: [a] -> IO [a] shuffle = runner =<< length ...

 
3:08 PM
I'm voting to close this question as off-topic because it's not appropriate for Stack Overflow and belongs on codereview.stackexchange.comScott Marcus 51 secs ago
 
3:39 PM
0
Q: Lifetime errors in c++14

davidbearI am a hobbyist programmer trying to learn modern C++. My son had an assignment in his C++ class to fill in some functions that populate draw the cave in the "hunt for the wumpus" game. When I viewed the instructors skeleton code I found it to be very C-like rather than C++-like. So, I decided to...

 
4:21 PM
0
Q: Password generator in python

SrivathsHere's a password generator I created. import string from enum import Enum from random import randint, shuffle, choice class PasswordError(Exception): __module__ = Exception.__module__ # Types of characters possible class Types(Enum): CAP = 'CAP' # Capital SMA = 'SMA' # Small D...

 
4:45 PM
@Duga Rolled back.
 
 
1 hour later…
6:04 PM
-1
Q: How to validate an input string for calculator using while and/or bool?

sumoI am having some issues figuring out how I can validate the operation input for a calculator program I am building for class. I cannot use a switch yet or else it would be far simpler. I have to use a while and/or bool. However, I don't understand how to apply it because my integer validation Con...

0
Q: Write an abstract methods

RamaDevelop an abstract class, Animal, with data variables, name, age, sleepHours. Write an abstract methods, makeNoise() and Sleep(int hours). Make a constructor to initialize data variables. Write a child class, Elephant, with no data variables. Write a constructor to initialize all data variables ...

 
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comkaya3 32 secs ago
 
Monking!
 
What's good
 
6:22 PM
me finally having a deadline for my bachelor's thesis so my sorry ass can't procrastinate on it until infinity?
or alternatively my finding the damned bug I've been looking for for ~5-7hrs and which was fixed with a 10 character change?
 
@Vogel612 Very good!
 
6:45 PM
possible answer invalidation by Nishant on question by Nishant: codereview.stackexchange.com/posts/232840/revisions
 
0
Q: Return probability (Javascript)

ArieelI've been working on a personal project. There's this game called TFT which is an autochess game. Each match is played by 8 players and there's a shared pool of champions, each champion have their cost and how many of each there are, below is the table: 12 Champs that cost 1 gold, 39 of each cha...

 
7:07 PM
-1
Q: Randomizing words, archive them so on

SimoneI've made a kind of dirty script that help me to print a random list from a set of words. Also, cos the list will be longer than my print space (52 lines equal to a double side A4 page), a set of formulae around the google sheet help me, counting if the words are in the printed area or not. Basic...

-1
Q: How to set values of HashMap in the custom Java object?

user10677223Hi I have a hashMap below. I want to convert hashMap below to a custom Object. Here i am not sure how to set the value of map (80, 190 , 900, 95) in the Response object and I would also like to improve parsing code in Response object. class Converter{ public static void main(String[] args...

0
Q: I have created a simple music playlist application, which provide add/remove Songs to Playlist. Feedback needed for refactoring

Kulwant SinghIt is a simple Java application, which adds songs to a playlist, removes songs from playlist based on indexes. Database is not used in this, I am creating dummy data through Utility class. I want to get feedback on design and code, so that I can refactor it. Thanks in advance. MusicApp main clas...

 
7:48 PM
0
Q: Adding play again/quit option in hangman python code

Amber Marie-Dawn SimpsonI'm new to programming. I've made a simple hangman game using python 3. I want to be able to allow the user to play again when the game is finished whether they win or lose, but I don't know how. I would also like to be able to allow the user to end the game at anytime without having to shut the ...

 
8:09 PM
0
Q: I'm trying to rotate a photo 90 degrees in Java, but my code isn't rotating it

StormCloudArmyThe way it's supposed to work is an empty pixel array is made where the height of the original photo is the width of the new one, and the width of the original is the height of the new one. Using a nested for loop, it goes through the original array and as it moves through the original array it ...

 
8:41 PM
@410_Gone Not much in particular; just working on an assignment for my CS130 webdev class, getting mildly annoyed at CSS et al.
 
 
1 hour later…
9:53 PM
0
Q: Creating a class for Complex Fractions using C++ coding

Ruben AazamiBelow I have a header and source file for each class: Fractions and complex fractions. Currently there is a declaration of a class called ComplexFrac in the .hpp file. It has two private member variables: real and imag. It has one public constructor with no parameters which creates an instance of...

 
10:14 PM
0
Q: Network IP packet tracker

Anvethis is my code for watching IP packets. I am doing project for my self because I want to learn how this things works. This is my IP Packet class: public class IPPacket { private IPHeader _ipHeader; private TCPHeader _tcpHeader; private UDPHeader _udpHeader; public IPPacket(IP...

 
10:34 PM
0
Q: Hangman play again option not working

Amber Marie-Dawn SimpsonI am new to programming. I am trying to add a play again option to a hangman game written with python code. It's not exactly working the way that I want it to. When the game is won the program automatically finishes. Only when the game is lost does it start over, but it doesn't actually give the ...

 
10:55 PM
0
Q: Move all zeros to the left with TDD approach

thadeuszlayThe task Given an integer array, move all elements that are equal to 0 to the left while maintaining the order of other elements in the array. Let's look at the following integer array. After moving all zero elements to the left, the array should look like this. We need to maintain...

0
Q: Improving a JSON parser for C++

Jake Denham-DysonI wrote a JSON parser for C++. It is not particularly fast, efficient or elegant. I'd like to change that and primarily I'd like the code to be more elegant. How do I improve it and get rid of all the code smell? Aside: I have never taken a computer science course in my life and I'm not sure how...

 
11:19 PM
Since this code is already running, it should be moved to codereview.stackexchange.comsleepToken 15 secs ago
 
11:31 PM
@sleepToken I edited the question so it didn't look like I was trying to get my code reviewed. I wanted to check my code is correct. — Brandon Li 53 secs ago
 

« first day (2395 days earlier)      last day (1608 days later) »