« first day (3505 days earlier)      last day (516 days later) » 

12:05 AM
I don't think this code works at all, so we can't help with a better way to do it. And if it does work as you intend, Code Review is the place to ask for help improving it. — Barmar 28 secs ago
REFRESH! There are 7614 unanswered questions (90.0314 answered)
 
1:03 AM
0
Q: Is this good for my first final project for my intro to programming class in college? (JAVA)

La'kee FranksMy assignment was to make a short text-based adventure game package The_Chosen_One; import java.util.Scanner; public class The_Chosen_One_Origins { public static void main(String args[]) { Scanner scan = new Scanner(System.in); //Introduction System.out.println("We will embark on a jo...

 
1:46 AM
Having someone review your code is a really good idea, but this site is not the place for that. Take a look at the Code Review site. — Warren Weckesser 45 secs ago
 
2:36 AM
possible answer invalidation by James on question by James: codereview.stackexchange.com/posts/281708/revisions
possible answer invalidation by James on question by James: codereview.stackexchange.com/posts/281708/revisions
 
 
5 hours later…
7:51 AM
@Duga Looks okay - just adding sample input.
 
Welcome to Stack Overflow! Before you post at Code Review, make sure to read A guide to Code Review for Stack Overflow users, as some things are done differently over there - e.g. question titles should simply say what the code does, as the question is always, "How can I improve this?". Be sure that the code works correctly; include your unit tests if possible. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. — Toby Speight 38 secs ago
 
8:38 AM
there are better platforms for code reviews — Stultuske 47 secs ago
 
9:12 AM
0
Q: Python decorator function inside class

Rahul Patelimport functools from typing import Callable Implemented from :https://www.scaler.com/topics/python/python-decorators/ Decorators with Arguments I don't understand why we need 3 levels of functions nesting here. Any better way? class Number: def prevalidate(cc: str, valid_lens: list[int]): #...

1
Q: Cat clone in C++

Abhilekh GautamI wrote this cat clone in C++. It does two things prints the content of file if only one file is given. concatenate and print contents of file if more than one file are provided. I am especially concerned with the overloading of << for the class CLI. I mainly wanted to gain some abstraction wit...

0
Q: Initialization of one Java field dependent on another

CizoxWhat is the appropriate way in Java (in terms of professionalism and best practice) to handle a situation where the initialization of one field is dependent on another field? For example: public class SomeClass { private AnotherClass obj1 = AnotherClass.staticField; private String obj2 = ...

 
9:38 AM
0
Q: Genetic algorithm in rust

taciturnoI'm pretty a beginner with rust, used python/pytorch before mainly for some visualizations and simple tasks (DS/ML). Now I want to improve/optimize some code to write it in more idiomatic way. use conv::prelude::*; use derivative::Derivative; use rand::{distributions::Uniform, Rng}; use serde::{D...

 
10:03 AM
0
Q: Data scraping in Python- Reddit Community List

mszI am trying to scrap the Reddit Data using Python. The result I got is only for a single subreddit information not for the complete list. My Code: import requests import time from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.common.keys import Keys import pandas...

 
 
3 hours later…
1:03 PM
0
Q: Database and query, please suggest how to fix it with regards to: - Correctness ,Improvements, Performance ,Code Style ,Maintainability

charan vlogsI am new to SQL Database the below View file I need to fix the regards below Correctness the code Any improvements need to fix the Performances issues Code Structure design High code Maintainability file - DDL.postgress.sql create table record ( id text, start_loc text, end_loc text...

 
1:24 PM
I'll toot my own horn a little here, but if you want some commentary on a quicksort implementation you can compare comments here: codereview.stackexchange.com/questions/226467/…markspace 54 secs ago
 
 
1 hour later…
2:44 PM
It seems to me this question is more suited to be asked in the Code Review Forum. Code Review is a question and answer site for peer programmer code reviews. Please read the relevant guidance related to how to properly ask questions on this site before posting your question. — itprorh66 46 secs ago
 
0
Q: Number Plate Generation Program, improvements?

kmvfkmfvI wrote a number plate generation program. The program generates number plates for a car registered with a specific Memory Tag and on a specific date. Number plates use the following format: (2 letter Memory Tag)(2 digit Age Identifier)(space)(3 Random Letters) The Memory Tag is already given. Ag...

 
3:06 PM
If askers want to get immedieately defensive, as OP did before I commented, that's their right. It's not against the rules or anything. But I'm going to be completely wrong for pushing back a bit? That's fine. @SteveSummit has infinitely more patience than me. I'm not a patient person. When someone comes here to ask volunteers for help, the minimum that I expect is some respect. Which OP didn't give with their knee-jerk comment. My typical first reaction is to double check myself. I've been on both sides of enough code reviews that things slip through. — sweenish 48 secs ago
 
3:17 PM
Ryan Donovan on December 08, 2022
Everybody wants to learn more. But then sprints happen and you don’t make time for it.
 
3:37 PM
0
Q: Detecting Retina picture to create a half sized image

Cyril N.When a user using a Retina display makes a screenshot and pastes it into the browser, the size of the image is twice the selected area. This is expected as a Retina display, but the pasted image should have the proper size (the same as the selection) and not double the size. When doing a screensh...

 
4:25 PM
Monking
 
4:41 PM
possible answer invalidation by Ruchika on question by Ruchika: codereview.stackexchange.com/posts/281741/revisions
 
4:54 PM
0
Q: Maximum Stock Price

AvvBelow we are given a list of prices for shares of a stock, e.g., prices=[1, 3, 1, 2]. Each day I have 3 options: buy a share, sell a share, or do nothing to a share. Naive Approach: takes O(n^2) time complexity: public static long stockmax(List<Integer> prices) { long profit = 0; //total s...

 
5:20 PM
Do you have a specific question about the code? Remember that Stack Overflow is a place for a specific question about behavior of a piece of code, not "how can I make my code better". If the code works and you're just trying to make it better, look at [Code Review]. If the code doesn't work, add an example of what it's doing wrong (error, unexpected output, etc), along with what you want to happen. — blackbrandt 40 secs ago
 
5:30 PM
Monking
 
@Duga Rolled back and commented by @TobySpeight.
 
@pacmaninbw Thanks for inserting the comment here. I usually remember, but it's been a tough day today!
That said, I still found time to answer a few zombies (I think I'm dominating New Answers to Old Questions this week). If readers like them, that might help me in the zombie-slaying leaderboard...
2
 
5:54 PM
@TobySpeight Obviously I need to work on my Zombie killing skills. I've not even close to the leadership.
@TobySpeight unit test is in place for wconsteroids.
 
@pacmaninbw Sorry I haven't found any time to look at it. I never finished the argparse I was writing, and next week is my last working week of the year....
 
6:10 PM
0
Q: Ajax to load data for company products without refreshing the page

RuchikaAm using AJAX script to have data fetched from database. For example has Motorola Samsung Apple as company and using AJAX to fetch models of it. Like when apple is selected then it shows apple iPhone 12, iPhone 13, iPhone 14, 14 pro max Basis improvements as suggested AJAX script to load data...

 
@TobySpeight Are you going anywhere on holiday(maybe somewhere warm)?
 
At this time of year in this location, it's warmer underground. So I'll be spending at least some time exploring subterranean worlds.
 
@TobySpeight I was think a tropical island.
 
6:33 PM
No, I'll be happy here on this temperate island. :)
 
possible answer invalidation by aloisdg on question by aloisdg: codereview.stackexchange.com/posts/199869/revisions
 
@Duga Corrected spelling, which none of the answers mention. Let this one through.
 
possible answer invalidation by aloisdg on question by aloisdg: codereview.stackexchange.com/posts/199869/revisions
 
7:02 PM
0
Q: Simple blackjack program in Python

H. WalkerI created this blackjack program which I'm looking for feedback, both with the code and how the program itself works. I'm also looking to see if my code could be faster or cleaner before I compile it using Cython. Any and all criticism is appreciated! The project has 3 files, I can't really just ...

 
7:27 PM
0
Q: ForTran Calculator tips

HPC program calculator implicit none real :: value_1, value_2, sol_key character :: operation, opr_key, symbol print *,'What operation would you like to do?' read(*,*)operation print *,'Input first value:' read(*,*)value_1 print *,'Input second value:' read(*,*)value_2 ...

 
 
1 hour later…
8:49 PM
Once you've tested the program and are pretty sure it's working, you can ask for improvement suggestions at Code Review. I linked to the asking help pages because you'll want to read them to make sure you meet their question expectations. — user4581301 9 secs ago
 
 
2 hours later…
10:26 PM
0
Q: Would my approach of making a <list>, ordering data by most recent, and pulling the last 10 datapoints to compare them work in place of recursion?

villasenorbrittHere is my code. It tells an operator whether they are meeting spec or not. I am specifically interested in the section where it is making the "take10" and then starting the foreach loop with the counterVar variable. The goal is that if all 10 are over a condition, which in this case is AverageT...

 
11:02 PM
StackOverflow is for specific questions about code that doesn't work correctly. This question is more appropriate for CodeReviewMichael Ruth 14 secs ago
 

« first day (3505 days earlier)      last day (516 days later) »