« first day (2353 days earlier)      last day (614 days later) » 

12:00 AM
RELOAD! There are 6187 unanswered questions (90.0908% answered)
12:42 AM
codereview.stackexchange.com May be more suited for this — Jammy Dodger 58 secs ago
That is not the purpose of stackoverflow. You might want to post your code for review at codereview. — cronoik 30 secs ago
5 hours later…
5:40 AM
Q: Plot Histogram and QQ plots

ShoaibI am new to Python and have written a code for plotting the histogram of a dataframe as well as its QQ plot in order to check normality. However, I would like to know how to further optimize the code and maybe reduce it in order to discover the power of Python. plt.subplots(3,2) j=0 for i in ran...

6:12 AM
I tough this link give what you looking for :codereview.stackexchange.com/questions/134154/…Abderrahim 1 min ago
6:29 AM
I'm voting to close this question as off-topic because this question belongs to codereview.stackexchange.comemix 54 secs ago
6:41 AM
Q: TicTacToe Game Python design questions, marked with?

John SmithPlease explain the code lines I marked with triple question marks (???) for the TicTacToe Game So far I understand all lines, except for the lines marked with ???. I numbered the question mark (e.g. ???1), so they that it is easier to find them. There are 28 lines marked with ??? in total. Pleas...

@CaptainObvious Closed for lacking context, but a more appropriate reason would be broken code.
Do you realize that, contrary to your claim that the two code blocks do the same thing, they actually do exactly the opposite thing? I'd say that it's not obvious at a glance, and that's why readability does matter, even if you are the only one working on your code, because you will likely need to debug things later. — 200_success 2 mins ago
7:06 AM
Good catch.
7:52 AM
Please start with the tour and read How to Ask. Then, extract and provide a minimal reproducible example. Also consider codereview.stackexchange.com. Your code isn't even complete, so any comment is partial guessing. — Ulrich Eckhardt 42 secs ago
8:03 AM
Q: Please explain the code means for the TicTacToe Game

John SmithI would like to get an explanation in English, what this section of the code below means: def p1(): n = choose_number() if board[n] == "X" or board[n] == "O": print("\nYou can't place a mark there. Try again") p1() else: board[n] = "X" ...

8:23 AM
Q: Add a value to each of the array element between two given indices successively

SoumeeI am trying to solve the following problem using java. (Please click on the image and view it on the browser for a clear view). The problem that I am facing is that the program is running for half of the test cases, while for the other half it is showing "Execution couldn't be completed because ...

8:44 AM
Q: C# Cryptography Interface

Melbourne DeveloperC# lacks a common off-the-shelf encryption and decryption interface for dependency injection. Nearly every codebase I've ever opened has a couple of extension methods for hashing strings and so on. This is always frustrating because it makes it difficult to change the cryptography in one hit. It ...

9:15 AM
Such questions are considered off topic on Stack Overflow. You can ask what can be improved on codereview.stackexchange.com — Your Common Sense 33 secs ago
@V_head About the re-directing of std:cin/std::cout: ifstream in("input.txt"); if(in) { ofstream out("output.txt"); if(out) { /* now use in/out instead of std::cin/std::cout */ } } (or similar) would actually be the way to go. Automatic test tool pretty sure won't inspect the generated machine code, so it wouln't ever recognise. At best, prof might spot in code review, but if she/he complains, send her/him to here to let us discuss... — Aconcagua 58 secs ago
Q: Replacing each letter with the letter that is in the corresponding position from the end of the English alphabet

georgeliatsosI wrote a small program for hyperskill/jetbrains academy to encrypt the message "we found a treasure!" and print only the ciphertext (in lower case) by replacing each letter with the letter that is in the corresponding position from the end of the English alphabet (a→z, b→y, c→x, ... x→c, y →b, z...

@V_head About the re-directing of std:cin/std::cout: std::ifstream in("input.txt"); if(in) { std::ofstream out("output.txt"); if(out) { /* now use in/out instead of std::cin/std::cout */ } } (or similar) would actually be the way to go. Automatic test tool pretty sure won't inspect the generated machine code, so it wouln't ever recognise. At best, prof might spot in code review, but if she/he complains, send her/him to here to let us discuss... — Aconcagua 58 secs ago
10:03 AM
@MushifAliNawaz This is a general programming question, which is off-topic on Code Golf. To OP: It may be on-topic on Code Review, but make sure to read through their help center before asking. — Arnauld 21 secs ago
I think this is too broad here, may be better to post it on codereview.stackexchange.comValentino 30 secs ago
10:33 AM
@CaptainObvious Duplicate of off-topic question (and on its own off-topic)
possible answer invalidation by Martin R on question by Soumee: codereview.stackexchange.com/posts/230633/revisions
10:54 AM
@Duga I only improved the problem description. The code is unchanged, and no answer invalidated :)
11:05 AM
11:47 AM
Q: Minimum number of swaps needed to getting the queue to final state not exceeding 2 swaps per element

RamkumarSPScenario or Problem statement: It's New Year's Day and everyone's in line for the Wonderland rollercoaster ride! There are a number of people queued up, and each person wears a sticker indicating their initial position in the queue. Initial positions increment by 1 from 1 at the front of the line...

1 hour later…
12:48 PM
Q: Python numpy optimalization (state space search)

MichalI am working on state space search (8 Puzzle) in Python and when I run my program with python3 -m profile, I find out that most of time program performs a few functions. I would like to optimize functions bellow (if it's possible). I am using dictionary node, which structure is: { 'id': str...

1:13 PM
Hi there, your question as it stands isn't a very good fit for stackoverflow (which may be why you are attracting down votes) but you may get some help at codereview.stackexchange.com. You could perhaps make a reduced question on refining your code (i.e. for chunk eight) suitable for this site by including all details; a small sample of data, what you are trying to do, and show your attempt — user20650 40 secs ago
1:41 PM
Ok, I will delete this one and move it to code review. Thank you all this is my first time using this website. — Vinny Tran 5 secs ago
1 hour later…
2:51 PM
Q: Kattis Problem: Speed Limit: Python Solution

Convex LeopardI am working through the following problem on Kattis: problem My attempted solution is as follows: # Speed Limit import sys # for each line in the input for line in sys.stdin: l = len(line.strip()) # if we have a n line if l == 1: n = int(line.strip()) if n == -1: ...

3:06 PM
@CaptainObvious Broken code.
@Koen You just seem to be using the solution in the linked answer, which is fine. However, I would not put calculateFoo in the protocol because it sounds like an implementation detail. You can post this on code review to get more feedback. — Sweeper 48 secs ago
Q: java.lang.NoClassDefFoundError JEE with Maven

Amine JonahiI have create two project as maven project in eclipse(Jee Version: 2019-09 R (4.13.0)): frontoffice and core . I want to add a dependency between the two project so i did like follow : core : pom.xml <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version>...

3:39 PM
@Marco13 Absolutely not! Code that does not work as intended is absolutely off-topic at Code Review. Always. — Mast 52 secs ago
@skiwi Didn't Floor used to sing for Nightwish?
3:52 PM
Q: File and folder filter for a "last-updated explorer"

JoeliusSometimes I save a file somewhere but can't find it after or I install something and want to see what files were added. For this reason, I created a winforms app which only displayes files created/changed/accessed in a certain timespan. Since the windows timestamps aren't reliable when it comes t...

4:12 PM
Q: Length of longest substring

Mandric Mihai-Alexandru#Given a string, find the length of the longest substring without repeating characters. class Solution: def lengthOfLongestSubstring(self, string): substring = "" max_result = 0 for character in string: if character in substring: if len(substring) > max_result: ...

Q: Checking if a file has changed on disk? (Bash)

ErikI'm writing a bash script for my tablet laptop to flip the screen depending on a file in Manjaro Linux. My current script is the following: while true do state=$(cat /sys/devices/platform/thinkpad_acpi/hotkey_tablet_mode) #This file indicates if it's in tablet mode or not if [[ $state == 0

@Mast She is the leadsinger
Would be more suitable question for CodeReview. — trincot 44 secs ago
4:33 PM
Q: Swift protocol with lazy property requirement

KoenFirst question here on CodeReview. I was directed here from a question I asked on SO, here: https://stackoverflow.com/questions/58364613/swift-protocol-with-lazy-property-cannot-use-mutating-getter-on-immutable-valu/58364648 Goal: Create a protocol that allows lazy computation of a property for ...

@Vogel612 Yeah
Since 2013
oh dear, I'm really out of sync.
5:14 PM
Q: Passing around context.Context in Golang

BentCoderI am currently "gracefully" handling HTTP server net/http shutdown which works perfectly fine (I am not asking you to review server shutdown). As seen in the code below the context is created first time directly in server package when I run the application. What I've done afterwards is (this is t...

5:54 PM
Q: Implementation of Astar algorithm in C++

Nothing_8484I have implemented astar path finding algorithm for a 2D grid. Function returns list of positions of an acceptable path. main.cpp : #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <set> #include <unordered_set> #include <boost/circular_buffe...

@Vogel612 Just a few years
6:15 PM
Q: Wrapper for object to avoid ambigous boolean in method

PlajerI recently thought if wrapping an object in a method that returns that object only when a method inside it is called is a good idea. I have a User object with fields like username, email, avatar etc. and I want to convert it to DTO object for my REST API. This is the first way I wanted to do: p...

1 hour later…
7:37 PM
Q: Truth table generator for an arbitrary function

F. RostySummary: This function generates a truth table for a boolean function of variable number of arguments. The name of the function passed and its arguments are deduced outside of the computable function scope. The returned value is a logical matrix with columns corresponding to function arguments an...

Q: Finding the Area of an Irregularly Shaped Room

Javesike1262I'm having trouble figuring out how to solve this. Remember the formula for finding the area of a rectangle is length * width and the area of a right triangle is 0.5 * the base * height. Sample run side A: 11 side B: 2 side C: 4 side D: 7 side E: 1 Output: Room Area: 53.5. I have this due on M...

7:55 PM
possible answer invalidation by Alexandre on question by Alexandre: codereview.stackexchange.com/posts/230602/revisions
8:38 PM
Q: having errors with makin g a palindrome program with methods?

Techgeekgal19So I'm trying to make a palindrome program that uses the methods reverse(int number) and isPalindrone(int number) and the program rather prints out palindrome or not palindrome, but I'm getting the following errors: Error CS0246: The type or namespace name 'StringBuilder' could not be found (ar...

1 hour later…
9:39 PM
Q: Simplified Blackjack in python

Digvijay Rawatclass Bank(): def __init__(self,bet,balance): self.bet = bet self.balance = balance def transaction_win(self): self.balance+=self.bet*2 return self.balance def transaction_loss(self): self.balance-=self.bet return self.balance def in...

2 hours later…
11:21 PM
Q: Log Text Messages In Google Sheets

RyGuyThis script sends and receives text messages and logs responses in a google sheet. Demo Gif here: https://github.com/RyGuy96/HealthTracker. I'm a self-taught beginner coder just starting my formal education in college. I've never had an experienced programmer look over my work; it was suggested ...

Q: program options from command line initialize

KorelKI'd like to receive a CR for the following command-line program options' initializing using boost::program_options. I'd like to know if there is a better way of doing this using boost::program_options or using another available library/code: #include <iostream> #include <boost/program_options.hpp>...


« first day (2353 days earlier)      last day (614 days later) »