« first day (2656 days earlier)      last day (1364 days later) » 

12:00 AM
RELOAD! There are 6891 unanswered questions (89.8277% answered)
 
12:23 AM
-1
Q: Implementations and analysis of my python login system (~80 lines)

filip augustoI wrote this login system in the evening and i would like to know what should I fix / change, if should I use classes and, about readability, if this code is OK. I'm a begginer in coding so made this small project only for exercising, but good to know wether if i'm things doing right or wrong. im...

0
Q: Guess the Number In C++

unkn0wn.devMind that this is my first actual program in C++ and I tried to prepare for any possible input. Also the reason I included static_cast<void>(generator(range)) is to throw away the first random value because I read on LearnCpp.com that throwing away the first is a common practice to produce more ...

 
this is not a place for code reviews, try hereBerto99 17 secs ago
If your code works, and you just want help improving it, hit up codereview.stackexchange.comMike 'Pomax' Kamermans 50 secs ago
There isn't an issue of "simplification". The only difference is the amount of information displayed to the user after they enter a number. CodeReview is the place to have working code reviewed. — David C. Rankin 41 secs ago
 
12:47 AM
If the code works and you're looking for advice on improving it, Code Review is the appropriate place. But see codereview.meta.stackexchange.com/questions/5777/… first. — Barmar 14 secs ago
 
1:04 AM
 
2:03 AM
0
Q: How can I apply the DRY principle to this exercise, while sticking to the progression of the assignments?

James KempI solved this exercise on jshero.com but I know the solution can be written more cleanly, I just don't know how. Here are the directions: Write a function addWithSurcharge that adds two amounts with surcharge. For each amount less than or equal to 10, the surcharge is 1. For each amount greater t...

 
2:28 AM
1
Q: Is there any way to simplify this code? & would it be better to insert a bool like the example code I show?

Nella CrystalThis is my code, which chooses a random number from 0 to 10 for the user to guess. //guess the number game //my code #include <iostream> #include <string> #include <cstdlib> #include <ctime> using namespace std; int main() { unsigned int secretNumber; int guess; int maxNumber = 10; int...

 
2:39 AM
I’m voting to close this question because it belongs on Code Review. Code Review is a question and answer site for seeking peer review of your code. — Trenton McKinney 29 secs ago
 
 
1 hour later…
3:52 AM
Monking
 
4:12 AM
Monking
 
4:23 AM
Monking
 
4:34 AM
0
Q: Buffered and unbuffered cat(1) implementation

ZetaI reimplemented cat(1) for fun. I followed the Open Group Base Specifications (Issue 7, 2018 edition), not the GNU variant and its command line arguments. Buffered and -unbuffered behaviour While the specification defines the behaviour for -u, it doesn't define how the arguments should be concate...

0
Q: SQL SAS. Can I use a prompt value as a column name?

ConfusedcoderI want to reference a prompt input in the column name in the code. I’m unsure if The syntax is wrong or it’s just not possible. Here’s what doesn’t work: CREATE TABLE new AS SELECT columnname1, &promptinputvalue FROM sourcetable Instead of printing the column with the p...

 
@CaptainObvious Thanks captain.
@CaptainObvious Broken code.
 
5:04 AM
Ben Popper on August 11, 2020
From a manga punk Drupal site to herding the cats of the React community.
 
@CaptainObvious broken
 
5:24 AM
0
Q: Double LinkedList Deep Copy in Kotlin with Generics and Thread Safety

Adam HurwitzGoal Return a deep copy of a double LinkedList. Each node also contains an additional random pointer, potentially to any node or null. Code to start data class Node<T>( var data: T?, var previous: Node<T>? = null, var next: Node<T>? = null, var random: Node<T>? = null class Lin...

 
5:49 AM
0
Q: Navigation strategies for a SwiftUI-based app using MVVM pattern

rustproofFishI'm finding it difficult to decide on the best architectural pattern for a SwiftUI app but, for the moment, I'm sticking with MVVM as I found this a good fit conceptually. I'm trying to avoid the SwiftUI layer knowing too much about the business logic and navigation structure but am struggling to...

 
 
1 hour later…
7:29 AM
0
Q: Parse bed file with pandas

PIFASTEI have a bed file : chr start stop strand count chr1 0 13320 - 1 chr1 13320 13321 - 2 chr1 13321 13328 - 1 chr1 13328 13342 - 2 chr1 13342 13343 - 18 chr1 13343 13344 - 36 chr1 ...

0
Q: Get all data from an external and paginated Swagger API using Java / Feign / Spring

PittoI have written the following method that allows me to import from another API all the items stored there using Feign. The only issue is that the external API provides a size limit of 2000 and therefore I need to take pagination into account to get all the records. I think that my solution is not ...

 
@CaptainObvious One more VTC.
 
7:54 AM
0
Q: Finding the closest triplet from 3 vectors

K_MThis code uses CERN's ROOT Data Analysis framework, however the bit I'm most interested in simplifying, and hopefully speeding up, is the algorithm for finding the closest triplet from three vectors. The code produces three sorted vectors, passes them to the algorithm which finds the closest trip...

 
8:40 AM
If your code works and you are asking for improvements, please consider using Code Review instead. Stack Overflow specializes on fixing non-working code. — Melebius 13 secs ago
 
9:35 AM
0
Q: Reduce one for loop to increase time complexity

Oronno AkashI'm using NumPy to find out langrage polynomial interpolation. I'm using 2 for loop to find out langrage polynomial, but I want to reduce 2nd for loop so that my code time complexity can be less. Can you guys please suggest me how I can cut a for loop to increase my time complexity. import numpy ...

0
Q: Downloading a list of images from a bucket java

Plaatjie SNCan some help me am trying to retrieve a list of images from s3 bucket below is my code but it's not compiling. images = imageResults.toArray(images); am getting compilation error: Cannot resolve method 'toArray(byte[])', @Override public byte[] downloadUserGalleryImages(String email) { User...

0
Q: Dijkstra's implementation in rust

ZskdanI would like to get any feedback about my implementation of Dijkstra algorithm in Rust following this youtube video. Please be aware that this my first code in Rust as well as my first Dijkstra implementation in any language. type Vertex = char; #[derive(Debug)] struct Connection { peers :...

 
9:48 AM
Perhaps better asked on Code Review. — usr2564301 10 secs ago
 
10:25 AM
0
Q: Log writing PowerShell function

Zoran JankovI am still learning PowerShell and I would like your opinion on my log writing function. It creates a log entry with timestamp and message passed thru a parameter Message or thru pipeline, and saves the log entry to log file, to report log file, and writes the same entry to console. In Configurat...

 
10:45 AM
possible answer invalidation by Dan on question by Dan: codereview.stackexchange.com/posts/247698/revisions
 
0
Q: Microservice for scraping images with celery

Grzegorz KrugI made a project, that scrapes images asynchronously and saves them in container. I have access to them through volume. Scrapy finds images on given web page. Any tips will be good. But first I would like to focus on docker-compose I would appreciate tips on how to improve it. files tree My proje...

 
11:12 AM
Monking
 
@Duga Rolled back.
 
11:35 AM
Mast are you sure about this one?
What I would like to see is actual output, not expected output.
 
@pacmaninbw I think you're technically correct. But to me they're have the same meaning
 
This is a typical case on something I'd remark on during code review. "Why did you write 0 here? If you can give a sensible rationale, you may keep the code as it is." They can't. Same category as similar dumb stuff like return (0); or int x = {0};. Writing superfluous stuff like that is almost always an indication of an insecure programmer who aren't quite certain how the language works. — Lundin 42 secs ago
 
12:30 PM
0
Q: Best practices - How should I lift the state here?

Tom687I am doing a hangman game with React and wanted to separate the Keyboard component (which itself returns KeyboardLetter components) with the rest of the game logic (just so you know I only use functional components, no classes). What I want to do is to get the clicked button inner text (= the let...

 
1:09 PM
@Peilonrayz If the code works, I (ahum) expect they'd be the same.
@pacmaninbw I didn't VTC, simply having trouble understanding what he's doing.
I can make a spec based on his output, but his spec doesn't seem to match his output.
Honestly I'm having a little trouble parsing their spec, hence the request for clarification.
I think it's a case of either bad English or bad interpretation (50/50), can't currently test it.
 
I think I got it I'll try rewrite it :)
 
1:22 PM
@Mast Turns out my edit was just a rewrite. But rather than "filter" they mean itertools.groupby. But the rest of the description is about what I'd expect.
 
@Peilonrayz Definitely easier to understand now.
 
1:41 PM
ofc Pandas groupby has to not work the same way as Python's :/
 
0
Q: What is a good design for accumulating data stemming from several processing runs?

Benjamin BihlerI would like to compute cycle times for some manipulator movements. These movements consist of different phases. I have a class that models these phases and this is its constructor to give an idea: /** * \brief Creates a new instance. * * \param name phase name * \param startIndex phase start...

 
2:27 PM
Codereview. I am more fine with child knows its parent and calling Parent.Delete(this) rather than this.Delete(), though commonly events are preferable approach, where child doesn't know parent, but simply rise event. — Sinatr 45 secs ago
 
0
Q: Get the value of the precedent day in a pivot table

TmSmthI have a pivot table of approximately 2 millions lines coming from a dataframe with the same structure as below : raw = pd.DataFrame([[123456,datetime(2020,7,1),'A',10 ], [123456,datetime(2020,7,1),'B',25 ], [123456,datetime(2020,7,1),'C',0 ], ...

 
3:21 PM
Monking
 
Monking
 
3:51 PM
0
Q: C# and unity. Moving an object to a target and destroy target once we're close

Mitchell van ZuylenThis is my first ever c# script. I have played around a little and I think this is some proper c# code. Since it's my very first c# ever, I'm assuming there's a few mistakes, things that could be better, bad conventions and such. If you see any, please let me know so I can improve! using System.C...

 
4:04 PM
@EmanuelVintilă If I saw that code in a code review I would question the programmer's ability to continue on my project. Using reflection to set a private property just to display something different? No. — Heretic Monkey just now
 
@Peilonrayz ofc -> of course, right? my initial thought is to try to find an acronym that has three words, not two...
I see that acronym has been used here more than 100 times in the past 6.75 years
 
@SᴀᴍOnᴇᴌᴀ Of-course
 
@SᴀᴍOnᴇᴌᴀ Yes that's right. You have a point it's kinda strange that course is the only one to change
 
maybe it should be of fricking course...
 
That would make more sense
 
4:10 PM
I just may think of that whenever I see it in the future
 
0
Q: check the quality of a code for envato

sodeI come to this forum to ask for your help and your knowledge to help me review a code that I made in PHP and JavaScript. I need you to help me review the code, and help me find errors, since in my opinion it is well written. Anyone interested in helping me with this task, write me a comment to se...

 
does this answer really deserve an upvote??
hmmm I have a hypothesis about the user that voted on it, based on review queue logs...
 
@SᴀᴍOnᴇᴌᴀ No, NAA.
@SᴀᴍOnᴇᴌᴀ Worth a mod flag?
 
@Mast that's how I flagged it
@Mast possibly...
 
@SᴀᴍOnᴇᴌᴀ If it's one of our known suspects, I wouldn't hesitate.
 
4:23 PM
okay
 
Let me look at the logs...
Ah.
Yea.
 
I know we can do this
5
A: Can we suggest a review of a reviewer, or an evaluation of a person using the review queue heavily?

JamalIf you've noticed something from a specific user, and they have at least one post, you can flag any of their posts and explain the situation. It's not a big deal on a low-activity site like this, but doing so anyway can keep you anonymous and also give moderators a better starting point.

but what should the note/custom flag be?
just that it appears that the user upvoted a NAA post?
it appears the NAA post is now deleted
I see two mods deleted it
 
If I were to flag the user, I'm not cause I'd prefer more than one datapoint. Then I'd say "Reporting robo-reviewer. I have noticed user has had some reviewing abnormalities, here is one such case."
With actual links ;)
 
4:38 PM
@CaptainObvious AOC - no code embedded to review
@Peilonrayz okay- yes I almost always aim to use actual links for supporting evidence where possible
 
@SᴀᴍOnᴇᴌᴀ Could you change the following part of your auto-comment? To me it sounds quite impolite. "Maybe you missed the text on the right side when asking"
Suggestion: "The right side when asking your question said"
 
okay - yeah I have considered that... will update it
sometimes I have removed that sentence
 
Thanks :)
 
4:58 PM
@SᴀᴍOnᴇᴌᴀ 1 mod, 1 ex-mod.
 
that's what I meant
 
@Peilonrayz Ambiguous.
 
@Mast I'd normally say "in the aside", but I don't think that's a common term.
 
Recursion is a perfectly reasonable way to handle possible nested dictionaries that require the same treatment as the original dict. Maybe ask on CodeReview.SE for a more detailed review of your code? — Pranav Hosangadi 42 secs ago
 
5:14 PM
Greetings, Programs.
 
Greetings
 
5:30 PM
@SᴀᴍOnᴇᴌᴀ Did you know that the user that was suspect at the time is now a moderator?
Not here, different site, but still. Things can really change in a couple of years.
 
I see that now
 
6:32 PM
If this code runs correctly then it might be better suited as a posting over at Code Review. — jwvh 10 secs ago
 
Sigh.... Tests are randomly hanging... good test suite is good, I guess
3
 
6:58 PM
@Peilonrayz Lacking more input I've accepted your answer on the Salesforce meta, but we still lack the manpower to get it actually implemented.
 
 
2 hours later…
9:19 PM
@Sᴀᴍ If you think this needs more context, please leave a comment.
 
> You voted to close this question yesterday
You retracted your vote 5 hours ago
I had left a comment and the OP updated the post
then I flagged the post for mod intervention, indicating that outdated comments could be removed, since I know some people don't like a wall of comments, but perhaps I should have waited until the close review was completed
 
possible answer invalidation by Gilad on question by Gilad: codereview.stackexchange.com/posts/247706/revisions
 
@SᴀᴍOnᴇᴌᴀ Ok
 
@Mast Makes sense I have ~50% votes, with no downvotes so it seems 'ok enough' I guess
Not really sure how to go from here. I'll think about it more tomorrow
 
@Duga Rolled back.
@Peilonrayz I think we need a couple of regulars to write some Salesforce questions answers so we can do the actual voting, or cheat.
 
9:34 PM
Do you need 5 votes for it to become a synonym? If so I think we may have a little challenge with that
 
This question is 1 vote away from being closed. I think it's a bit iffy whether they actually want a review or a request, but haven't voted on it. Feel free to do so if you have an opinion.
@Peilonrayz I vaguely recall 3 to desynonymize, but I honestly can't recall where I got that number from.
It's either 3 or 5.
 
I've been on the fence about that one... saw it in the 10k tools
 
@SᴀᴍOnᴇᴌᴀ Join the club :-)
 
inb4 they've thrown a wobbly in the tagging scene and it needs 6 ;)
 
@Peilonrayz They wat?
We're never going to hit 6.
 
9:36 PM
Oh inb4 means it's like a humorous guess - in before
Ah I thought it was a funny one, turns out it's 4 not 6. "When a tag synonym reaches a vote score of 4,"
 
So I was right on average.
Right, the required score is 5, not the amount of votes.
> If a tag synonym reaches a vote score of -2 it is deleted.
So we need to kick it from 4 to -2?
That's 6 again.
 
I think it works like up and downvotes? I'd assume it starts at 1, but the wording may indicate it starts at 0
 
Actually I can't see the current scores I think.
Oh, wait.
I think -2 means the synonym suggestion is removed.
We're looking for a different system altogether, the 'remove the synonym' system is apparently a different one.
We can only vote for synonymization, the other way doesn't happen with votes.
 
Oh do we need to desynomize too?
 
Well, that makes it easy. We'll start annoying asking moderators in a day or two.
@Peilonrayz Do you want to remain the parent tag?
 
9:43 PM
Oh yeah we do. Yeah I don't think we can do anything but that here :/
 
That's where it starts. We need to crack open the current situation before we can remap.
 
I'll have a reread as it's been a little while that I've forgot the exact links. One sec
 
After that we could simply boost a couple of answers to +5, but that would reek like gaming the system. I'd much prefer to get a mod aboard and get it over with.
 
In my suggestion the only one that'd need work is which should be desynomized and blacklisted (because it's unclear what it'd mean)
Then it's just making fresh tags and synonyms
We could probably ignore the synonyms for now
 
Hmmm.
I may have been thinking too complicated. I'll take another look at it tomorrow and/or the day after.
 
9:52 PM
Yeah that sounds fine
 
 
1 hour later…
10:58 PM
0
Q: Any way to better this program and is this project too simple to be working on(first project in python)?

drakebakincakeThis program will ask for user to insert summoner and base from the last 20 games of said summoner, it will give avg stats and see if good or not by wins in last 20 games(a simple grading system). import requests from getId import idcollect from games import GAME from wins import win_calc #Key f...

 

« first day (2656 days earlier)      last day (1364 days later) »