« first day (2355 days earlier)      last day (1647 days later) » 

12:00 AM
RELOAD! There are 6179 unanswered questions (90.1084% answered)
 
1
Q: program options from command line initialize [v2 - after CR]

KorelKAfter getting a CR from @pacmaninbw and @ALX23z here, I want to share my new code, and to ask for better ways (which always exist) to improve the code, even with new libraries. The only thing that important to me, is the way of receiving the parameters have to be the command line [I am using Linu...

 
12:40 AM
@CaptainObvious Serious improvement over the first version. Could use some other critical eyes on it. Borders on LCC but the user is currently only worried about command line processing.
I won't attempt an answer until at least 13 hours from now.
If the question is still open.
 
The answer to the people who are insisting that this is "a bad design" is that it had to be that way. The alternative was breaking changes to the Java language which would have required Sun/Oracle's existing (paying) customers to review billions of lines of source code. Not acceptable. (That was in 2004. The amount of code review in 2018 would be 2 or 3 orders of magnitude larger.) — Stephen C 19 secs ago
If your code works this is a questions for codereview.stackexchange.comDaniel Mesejo 28 secs ago
 
1:10 AM
0
Q: Rock Paper Scissors Beginner Python Game

sjdooI recently made this game for rock paper scissors in Python 3. Everything works as intended, but I am sure this is not an optimal way of accomplishing this task. Wondering if there is any beginner friendly advice on how to improve upon this. Thank you! def main(): import random game_active = Tru...

 
 
1 hour later…
2:11 AM
0
Q: SQL Injection Username and Account number to change password

ohgoodnessdudeI want the user to enter their account number and username in order to confirm their identity and change the password. The code works when i only put the username to be confirmed but i can't seem to get the extra injection in the sql to work. <?php // Initialize the session session_start(); ...

 
 
3 hours later…
4:42 AM
Monking
 
5:35 AM
possible answer invalidation by 200_success on question by YoKoGFX: codereview.stackexchange.com/posts/230699/revisions
 
5:56 AM
0
Q: C++ logging class

CortexI've created a simple C++ logging class. It outputs various loglevels, and adjusts output color accordingly. Im interested in some tips to improve my coding style. Any tips are appreciated. I am especially concerned with my use of #define's in the bottom of Logger.hpp. I was unable to find anoth...

 
JAD
6:15 AM
woop woop, got the bronze C# tag badge :)
7
 
6:38 AM
@JAD congrats
 
For working code a better place is CodeReview.stackexchange.com — Yksisarvinen 8 secs ago
 
7:36 AM
@JAD Congrats, keep up the good work!
 
7:47 AM
@ThomasWard Good, good, can't really complain. Personally & SE-wise. SE is a bit hectic these days, but CR is doing relatively well. We traded a moderator, but we'll survive and the stats don't look half bad currently.
Looks like the fires on MSE are calming down a bit, although a couple of ex-moderators are preaching some pretty hefty anti-SE sentiment. Can't blame them, but, you know.
Life goes on.
Life isn't fair.
 
 
2 hours later…
9:20 AM
0
Q: K_nearest_neighbors from scratch

Keagan McNewI wanted to create a script that will perform the k_nearest_neighbors algorithm on the well-known iris dataset. This was mainly for me to better understand the algorithm and process. I think it works, but it could definitely use some tuning up. One thing that has me worried was incorporating mult...

0
Q: Simple vanilla JavaScript Carousel with tabs and pause button

cedricjansenI currently got into coding and I am completely self taught. Since I know that my code is far from being perfect, I am asking for advice and tips on how to improve. Feel free to drop in any comments related to the topic - any helpful advice and food for thought is highly appreciated. It doesn't ...

 
9:33 AM
If you want mostly optimization and not solving an error or problem, I suggest going to Code ReviewCarl Binalla 19 secs ago
I'm voting to close this question as off-topic because belongs on Code Reviewphuzi 37 secs ago
 
10:21 AM
0
Q: Basic Palindrome check comparing chars

GemtasticI've seen variations of this assignment where you reverse a string to match it to the original to find out if it is a palindrome, but this version I made only iterates through half of the string comparing it in reverse and would terminate the loop as soon as it notices a difference between the mi...

 
Monking
 
StackOverflow is not the place to post this. Use Code Review Stack ExchangeErfan 9 secs ago
 
10:41 AM
0
Q: Sudoku validation

shreyasminochaProblem explanation I've written a function to validate sudoku. Given a two-dimensional 9×9 array of numbers: Each row should have each of the numbers 1–9 exactly once. Each column should have each of the numbers 1–9 exactly once. Each square should have each of the numbers 1–9 exactly once. ...

 
11:02 AM
1
Q: simple and extendable shop

lumimy task is to write a simple shop (requirements being that it can have multiple items, each item its own price and quantity, each customer basic identifier such as full name, each customer receives clear receipt, shop keeps the shopping history etc. it's meant to be flexible, easy to expand, high...

 
11:40 AM
possible answer invalidation by saran3h on question by saran3h: codereview.stackexchange.com/posts/230288/revisions
 
12:10 PM
possible answer invalidation by Manoj Banik on question by Manoj Banik: codereview.stackexchange.com/posts/230715/revisions
 
12:47 PM
codereview SE might be a better place for this type of question — depperm 50 secs ago
 
@Duga Both rolled back by Vogel
 
1:24 PM
1
Q: Is this the correct way to write Unit Tests code for a Java Class

Manoj BanikI'm trying to write unit tests code for a java class, the class tests an array for sorted (either way) or not. Here is the Unit Tests code: public class SortedOrNotTest { @Test public void test() { int[] A = { 32, 32, 32, 32, 32, 32, 32, 32, 34 }; assertEquals(true, Sorted...

0
Q: Simple password generator with 6 letters, 3 numbers and 4 symbols in C

e_noiceI have to make a password generator with 13 caracters, 6 of them are letters (3 cap), 3 numbers and 3 symbols. I tried make this way: #include <stdio.h> #include <stdlib.h> #include <time.h> int main(void) { srand((unsigned int)(time(NULL))); int i; char pass[14]; printf("Press enter to get a...

 
@Mast Welcome... to the real world. :p
well, if y'all need another moderator let me know :p
 
Think SO is the wrong place to ask such questions. You should ask this on codereview.stackexchange.com. — el solo lobo 37 secs ago
 
1:39 PM
@Mast how is our current closed question ratio above 90% or below 90%?
@JAD Good for you!
@ThomasWard You mean we can't always live in the virtual world of CR?
Monking
 
@pacmaninbw Not if you intend to live as anything other than a battery for the machine overlords
:P
 
@ThomasWard Is that better or worse than being a app in Tron?
:0
 
worse
because your brain is wired into the Matrix if you're a battery for the machine overlords :P
 
Neo, get me out of here.
 
@Duga lies, this is more a UX issue than an actual CR issue. (I actually read the question lol)
 
2:05 PM
0
Q: Display hexadecimal value stored at a register

eanmosI read a book about OS development and faced with a simple exercise: write a function that prints a hexadecimal value stored at a register. The program runs as a boot sector. I would really appreciate suggestions and help for optimization and functionality. Thanks a lot for your time! [BITS 16]...

 
2:17 PM
@pacmaninbw 90.1% says Duga
@ThomasWard Oh, if we ever need elections again I'm sure there'll be at least a couple of people stepping up.
 
@Mast Yes!!
 
0
Q: Parrallel computation of factorial-base left-truncatable primes

Noone AtAllFactorial base - representation of numbers not as sums of base_number^digit_number, but as sums of digit_number! (factorial) So 7 = 6+1 = 3! x 1 + 2! x 0 + 1! x 1 = 101_! - 7 in base 10 is 101 in factorial base Left-truncatable primes are primes that stay primes if you get rid of any left (most ...

 
Hello World!
 
Hi All, I'm voting to close this question because the code is broken. I can see at least 2 bugs in the code from visual inspection codereview.stackexchange.com/questions/230752/…
 
2:35 PM
A GitHub link isn't an answer. If you want suggestions then post on codereview.stackexchange.comBlastfurnace 57 secs ago
 
@pacmaninbw I would probably change, "we can't help anyone debug their code" to "we don't help people debug code on Code review". because I'm sure that we could, if we were given enough information/code to properly debug, but that is not what Code Review is all about. what do you think?
 
@Malachi Agreed.
 
0
Q: IF statement with multiple AND/OR conditions

RaskolnikovI have if statement with many checks. There must be a better way to implement this. Does someone have an idea on how to improve this method? I have many similar methods in production. I would like to do the refactoring. private void CheckWorkingHoursValidity(WorkingDayRequestDto workingDayDto) ...

 
@hey @MathieuGuindon
 
@Malachi I'm going to just delete my comment because Heslacher did a better job of it.
 
2:49 PM
sometimes canned responses come in handy
 
@MathieuGuindon is that supposed to be Oui or Oye?
@Malachi I do have some canned responses for my answers, DRY code, SRP, using namespace std;.
2
 
Isn't this better suited for codereview.stackexchange.com? — Tara 24 secs ago
 
@pacmaninbw yes
:)
 
@MathieuGuindon :)
 
3:00 PM
This is probably better suited for codereview.stackexchange.com. — Tara 40 secs ago
 
Greetings, Programs.
 
0
Q: Algorithm that converts array-like data into MathJax: Python

NelverI frequently use MathJax, and often I need to write matrices. Since writing matrices using mathjax is very tiresome task, I decided to automate it. Code: import numpy as np import pyperclip class Conversion(): def __init__(self, matrix, n = None, m = None): if matrix == None: ...

 
3:16 PM
@pacmaninbw being a Moderator I try to hand craft as many responses as I can.
 
@Malachi I generally have to modify them within an answer to make it specific to the code being reviewed, however, these parts of the answer contain links to SO, Wikipedia or c++ and C documentation.
 
Hello
 
Monking
 
OHAI @Gemtastic :)
nice to see you're still around!
 
The cake may be a lie but I'm still alive
...for now
I actually even feel a bit nice atm
 
3:30 PM
For code reviews there is www.codereview.stackexchange.com, but I'm not sure if filesystem reviews are acceptable there. — Yksisarvinen just now
 
Nice to see that little Duga is around
Duktig liten bot
3
 
This is not the right place for code review requests. — Jesper Juhl 30 secs ago
I'm voting to close this question as off-topic because This is not the right place for code review requests. — Jesper Juhl 57 secs ago
 
Simon will be happy to hear you like his little bot :)
 
Send him a "Bra jobbat!"
 
@Gemtastic "good little cure"?
 
4:05 PM
Monking
 
0
Q: Dependency Injection approach pass just one IServiceProvider or one parameter for each interface?

Christophe DeboveI am not sure of what is the best approach between pass a IServiceProvider or to pass directly the interfaces I will need. public class MyClass { public MyClass (IServiceProvider provider) { _myPlopable = provider.GetRequiredService<IPlopable>(); _myLolable = provider...

-1
Q: Is this sudoku answer correct?

Vinícius Magalhães HortaI have been trying to submit my answer to https://www.urionlinejudge.com.br/judge/en/questions/index/1383 My outputs are correct according to the problem. (Code with inputs here:) http://ideone.com/7HNyrc But, when submitting I get 100% wrong. If I remove the row/col sum (commented below) I get...

 
Looking for a better way suggests you would benefit from the Code Review section of Stackoverflow. — Michael Litchard 13 secs ago
 
4:28 PM
0
Q: Using CMake and googletest: Structuring file systems

Jake DysonThis is my first time moving out of Microsoft and into Linux. As such I now no longer work in Visual Studio and have had to learn the ropes of building projects myself. I use Sublime Text as an editor and CMake to generate the make files. I have been working on building a genetic optimization li...

 
4:39 PM
@Gemtastic Bobba Fett?
 
@Mast As of yesterday, there is now also Python 3.8 ;-)
 
Is it working? Then you can get this reviewed on codereview.stackexchange.comMartin York 18 secs ago
 
5:29 PM
0
Q: Creating a stack class in C++

Usama Fayyaz Create a class called Stack for storing integers. The data members are an integer array for storing the integers and an integer for storing the top of stack (tos). Include member functions for initializing tos to 0, pushing an element to the stack and for popping an element from the st...

 
I don't see any other reason that habits and standards in your company. In code review you can (or should) always ask your mates "why?" — Mateusz 33 secs ago
 
5:50 PM
-1
Q: Knapsack problem. Code efficiency(Python)

DY92My goal is to code knapsack problem algorithm(https://en.wikipedia.org/wiki/Knapsack_problem): import numpy as np #reading the data: values = [] weights = [] test = [] with open("test.txt") as file: for line in file: value, weight = line.split(" ") values.append(int(value)) weights...

 
6:00 PM
possible answer invalidation by DylanSp on question by DylanSp: codereview.stackexchange.com/posts/230774/revisions
 
0
Q: Small service for hashing and validating passwords, using PBKDF2

DylanSpAs part of a larger authentication/authorization system, I've developed a small .NET Core 3.0 service for hashing passwords using PBKDF2 (with a salt) and validating passwords against a stored hash/salt, for use as part of a larger authentication/authorization system. Code organization: IPass...

 
6:30 PM
0
Q: LeetCode: Greatest Common Divisor of Strings C#

Giladhttps://leetcode.com/problems/greatest-common-divisor-of-strings/ For strings S and T, we say "T divides S" if and only if S = T + ... + T (T concatenated with itself 1 or more times) Return the largest string X such that X divides str1 and X divides str2. Example 1: Input: str1 =...

0
Q: Namespace sorting algorithm

GrasheeI am building a new application which also generates some code. The user can set inside the application namespaces, at the end I want to show each namespace in a treeview. To do that I must sort them into a correct order. I´ve build the following algorithm (which is at this moment not correct, b...

0
Q: MediaWiki website with one external addon, upgrade script

JohnDoeaI have a MediaWiki 1.33.0 website with only one external addon installed (external extension) which is [ContactPage][1]. I wrote the following script which either upgrades both MediaWiki core and Contact Page to new versions (if there are any respectively); else, the script keeps original versio...

 
6:51 PM
-1
Q: ReentrantLock.signal() not working as expected but ReentrantLock.signalAll() works. Why?

GlideIn my simple code below, if I replace condition1.signal()/condition2.signal() with condition2.signalAll()/condition2.signalAll(), the code never finishes. It will get stuck at first(). I have three separate threads in main() calling each of the three methods. The idea is to have first() called f...

 
I'm voting to close this question as off-topic because better suited for Code ReviewScott Holtzman 12 secs ago
 
7:20 PM
@AlexV I was just getting used to 3.7...
 
These are not Functions (but Subs) as @ScottHoltzman mentioned. Also, what you have written is not a UDF - which is a function that is written intended to return a value and place it in a cell when called from that cell. You might get some efficiencies by converting the Subs to Functions. To post in CodeReview you must show all of the real working code with an explanation of the real intent of the code. — AJD 36 secs ago
 
@410_Gone Bloody hell
 
@Mast /shrug It be like that sometimes.
 
7:49 PM
It sounds like this code is fully functional. If it is, I'd instead advise posting over at Code Review.SE. They deal with questions about style and technique, while StackOverflow is more focused on getting you to a place where you have working code. — scohe001 46 secs ago
 
-2
Q: Potential errors and selecting backend

Lukasz Bhttps://codesandbox.io/s/github/lukaszbrk/Umowy2/tree/post-4p Helo, The app is used to search for clauses by their name and the keywords they contain. When a clause is selected, the columns with the text of the clause and its translation are displayed; when a keyword is selected, the examples t...

 
8:33 PM
0
Q: Searching for Duplicates in SQL Table with Confidence Score

Dizzy49Sometimes I'm not sure if my questions should be here or StackOverflow, so I appologize if this is the wrong place. I have a SQL (MS SQL 2016) stored procedure that is evaluating data looking for duplicates. Since not all data is present missing fields are blank ('') not NULL. I compare the da...

 
8:46 PM
I made an edit to the answer but 2 people rejected it and a third approved it. While I appreciate them code reviewing I think the rejection was wrong. The string column and table should have brackets in the above code: Line 43 around @IxName, 43 after the opening bracket, 64 around the column variable, and 73 left of the closing parentheses. — Sam 38 secs ago
 
0
Q: c++ performing slower than matlab

Ste RoseFor an econometrics assignment I was considering using c++ rather than Matlab to try and cut down on time (on a previous assignment it took an hour or so for a certain piece of what I thought was fairly innocuous code to run). This obviously entails a lot of arrays/vectors being used, and I fig...

0
Q: Split array into chunks (JavaScript, Python, PHP)

EmmaProblem Given a list and an integer chunk size, divide the list into sublists, where each sublist is of chunk size. Codes Just for practicing, I've coded to solve the problem using JavaScript and Python. There is also a built-in PHP function for that. If you'd like to review the codes and pro...

 
9:20 PM
I am gonna post it at code review. (Dont know answer to a specific person...) — Guillem Costa 47 secs ago
 
9:34 PM
-1
Q: new to python, longest collatz sequence

python_newi am new to python and struggling with an assignment. "Consider the following operation applied to positive integer values: if the number is even, then halve it, but if the number is odd, then multiply it by three and add one. Write complete Python functions as decribed below. All functions must...

 
This may be a better fit for Code Reviewdevlin carnate 20 secs ago
 
10:15 PM
0
Q: Modifying a legacy enum - adding a none value

Anthony RussellConsider the following block of code public enum MyLegacyEnum { ValueOne = 0, ValueTwo = 1, ValueOneAndTwo = 2 } Assuming that this enum is used by other projects and changing this enum around will break these other projects that we don't control. What is ...

 

« first day (2355 days earlier)      last day (1647 days later) »