« first day (2588 days earlier)      last day (1423 days later) » 

12:00 AM
RELOAD! There are 6703 unanswered questions (89.9360% answered)
 
-1
Q: Dependency Injection of repositories in Generic Repository Pattern with base class inheritance (tips for architecture improvements)

NikolaiINTRODUCTION: (You can skip the introduction, it's a little explanation of my technical skills and the problem I have) As you can see in the title, the problem is really complex (I think?). It's hard for me to explain the problem with my poor English skills. So I will start with a simplificatio...

0
Q: Sorting squares of an integer array

FrankI had this question in an interview recently. Given a sorted array of integers, return a list of those integers squared, with the squares sorted. So given an array of these numbers: -5, -3, 1, 2, 4 the result should be this: 1 4 9 16 25 I came up with this solution using Java 8 streams, b...

 
12:56 AM
0
Q: command-line demo app & design-pattern usage examples

fidgetyphiI started learning from the book: head first design patterns. As I am trying out different programs in the book, I am compiling them in this one demo app. Below is the code for its driver function. Can anyone guide me with any improvements to the program (related to style, programming, formatting...

 
Code Review is the appropriate place to ask coding style questions. — Barmar 12 secs ago
 
1:44 AM
1
Q: A simple git_status to prompt

artu-hnrq The following bash script was made to retrieve some local repository information in order to be used to display a condensed git status in terminal PS1 prompt. It does some simple grep's string manipulation over (git status) --short version text to display 6 repository status: Commits ahead, ...

 
2:32 AM
0
Q: Steam whitelist checker for CS 1.6

Ronak SharmaI wrote a code that accepts the output of rcon users command on the CS 1.6 console and notifies me if players other than the ones mentioned in the whitelist.csv are playing and the names of the blacklisted players that are currently playing. The program requires 3 files as inputs: 1) A text fil...

 
2:56 AM
0
Q: Generic Graph Traverser

KarthikI have built this Generic Graph traverser, I have this implemented with DFS, I feel it will work equally fine with BFS too. What do you think of this implementation? I want help in reviewing the Visitor interface. Should I have Generics in it or just use the base Object? public abstract cla...

 
3:19 AM
0
Q: Code runs perfectly but turning in the assignment won't accept my answer

Caleb Kennedythis is my first post here so please excuse any errors made in my post since I am new to this. For one of my assignments in school, I have the following prompt: Acme Parts runs a small factory and employs workers who are paid one of three hourly rates depending on their shift: first shift, $...

0
Q: Best method to further execute the DRY principle and/or raise performance in my script? (client login/signup system)

DanielP533Just for practice purposes, I written a basic client sided login/signup system that allows you to make an account, and then log into the account from my webpage. What it does is append to an object known as database for every new account made, and when you sign in, it loops through the database a...

 
4:10 AM
There's JSON Schema. And if you use JSON RPC its kinda self documenting. Potentially developers could be responsible for maintaining both sides of a channel and updating them in unison (deployment would be a challenge). But likely the API should be defined in an external doc that must be updated. You really need a version control / codereview / build system that blocks checkins without proper collateral like docs. — tdelaney 30 secs ago
 
4:23 AM
@CaptainObvious If the judge says it doesn't work, it doesn't work.
@Peilonrayz @SᴀᴍOnᴇᴌᴀ The Blog could go.
 
Welcome to Stack Overflow! If your code works basically, you should ask for improvements on Code Review but it’s off-topic here. — Melebius 20 secs ago
 
4:52 AM
I think, Code Review would be a better place for this question... — dan1st 18 secs ago
 
5:08 AM
Once you get through the error you may consider reviewing your code in the CodeReview site — Cedric Zoppolo 27 secs ago
 
5:26 AM
Monking.
 
5:57 AM
@SᴀᴍOnᴇᴌᴀ Experiment: take a look at meta.SE for a few days, see how much crap gets posted there and what information is provided while asking a question there. Then ask yourself: do people even read?
 
6:28 AM
0
Q: count number of previous elements greater than its element at present index

sukeshsuppose i have a vector containing n elements. I want to find out the number of previous elements greater than its element at present index i . I mean i want to find A[i]>A[j] && i constraints : 1<=t <=1000 , 1<=n <=10^5 , 1<=A[i]<=10^5 My code: #include<bits/stdc++.h> using namespace std;...

 
6:52 AM
0
Q: MYSQLi Error In Login Code

IzumiIm working on a login script verification code using the password_verify function. But somehow the code shows an error on ELSE statement. My code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title>Login</title> <link rel="stylesheet" href="css/style.css"/> </head> <body> <...

 
7:35 AM
Welp, conditions having with fun race.
 
1.2. Pure javascript never gets deprecated or shut down and I'm very curious to understand how things work. 4. I think I'll give up on that idea, the file separation. Yesterday I started with my own approach which you can see here: codereview.stackexchange.com/questions/243325/… The setup at the top is a mess but the example below it looks fine to me. It starts to look like a Vue component even if that was not my goal. — Jens Törnell 32 secs ago
 
8:03 AM
0
Q: Wrap functions which run in two threads in one class

JohnMy application consist of two threads. One - is running http server with aiohttp Second thread is asking another web resource about current currency. So there are two threads with asyncronous requests. But I was struggling to run my http-server in another thread, I found solution here I nee...

 
8:46 AM
For this purpose there is the Code Review site. — mkrieger1 29 secs ago
 
9:37 AM
0
Q: Calculation Correlation Time

Kartik ChhajedI want to calculate the correlation time. First I calculate the auto-correlation function: $$ \chi(t) = \frac{1}{t_{max}-t}\sum\limits_{t'=0}^{t_{max}-t}m(t')m(t'+t) -\frac{1}{t_{max}-t}\sum\limits_{t'=0}^{t_{max}-t}m(t')\frac{1}{t_{max}-t}\sum\limits_{t'=0}^{t_{max}-t}m(t'+t)\sim e^{-t/\tau} $$...

 
I’m voting to close this question because this question belongs to another site, i.e.: Codereview StackexchangenilsK 33 secs ago
 
 
1 hour later…
10:48 AM
0
Q: MVVM-C Swift with Dependency injection

WishIHadThreeGunsI want to create a MVVM-C project, but also adequately test it. Naturally I want to create such a project that can access a Network Service. Any comments or thoughts on this approach? DependencyFactory: protocol Factory { var networkManager: HTTPManagerProtocol { get } func makeInitial...

 
You should probably ask this on code review codereview.stackexchange.comNathan 1 min ago
@Nathan Only working code should go on codereview. — Johnny Mopp 9 secs ago
 
@Mast (Strange I got no ping for that) That's in a different block "The Overflow Blog" where the "Featured on Meta" block is full. Like we could try to move one of our questions to the 'hot on meta' block. (by unfeaturing it) But I want no part in that.
@Mast Strange, and ofc the OPs decision always goes through... :/ Thank you SE
 
11:15 AM
Huh, looks like it's fixed now. Blame caching? 🤔
 
11:37 AM
@Peilonrayz When in doubt, blame caching.
 
This question appears to be off-topic because it is a code review request. This might be better suited to the Code Review Stack Exchange site. Before posting there be sure to read their FAQ to ensure that your question meets their guidelines. — John Conde 33 secs ago
 
12:22 PM
0
Q: How to make the filtering queries more efficient using flask sqlalchemy?

reinhardtI have a following table in a flask app class Price(db.Model): __tablename__ = "prices" id = db.Column(db.Integer, primary_key=True) country_code = db.Column(db.String(2), nullable=False) value = db.Column(db.Float(precision=2), nullable=False) start = db.Column(db.DateTime(t...

 
12:37 PM
This MSE question made me realise I have over 3k reviews in the CV queue.
 
12:47 PM
@Mast Strange. Also , albeit with only a babby sized negative.
 
12:58 PM
Honestly, I have the suspicion that when this hits code review that'll be exactly the feedback I get. Still, like you said, it's interesting. — Doug Hughes 54 secs ago
 
1:10 PM
0
Q: Is there a better design of nested IOC dependencies which reduces marker interfaces?

BaseI was building some library code and i ended up with a design and involved some marker / marker:ish interfaces. Wanted to get input if there might be better way of doing this (or if my current design is acceptable due to circumstances). Below is an illustration of the current design, simplified ....

 
1:30 PM
@Mast Status-reproduced on at least 3 queues.
Does anyone know what happened to @TobySpeight? He hasn't been active since 3/19/20.
I trust him to edit my answers and correct language errors.
 
@pacmaninbw Maybe Toby needed to take a break. They've been seen on SO last month.
 
@Peilonrayz That's March, not May.
 
Hang on I swear I saw May somewhere
Ah U&L
 
1:52 PM
As you haven't got an issue with your code, this is probably not the place to post this. Try Code Review. Saying that, I suspect one of your issues is that you are making a lot of calls to DB. Try importing the data (either to memory or to a sheet) and then performing the updates — Zac 30 secs ago
 
2:08 PM
@Peilonrayz Aha!
 
2:20 PM
0
Q: Seat Booking Program - Beginner

snow_razerI am a beginner in Python, as you will see looking at my notes. This is a program that simulates seat booking in a cinema for example. The program stores the users name as a key and the seat(s) they have chosen in a dictionary as key-value pairs. How can I improve this program. I have used one fu...

 
2:44 PM
-1
Q: new to java hackerrank Balance with draw from account

smile Create a class Account with the attributes: accountId int accountType String balance int The method public boolean withdraw(int) used to calculate the current balance of the respective account. Before that it should enough balance. If there is enough balance, deduct the amount ...

 
3:30 PM
possible answer invalidation by Syed Mohammad Sannan on question by Syed Mohammad Sannan: codereview.stackexchange.com/posts/243287/revisions
 
-1
Q: How to rotate words in a sentence to right according to their indexes starting from 1?

CoderI am trying to read an input file containing two sentences on new line. I have to write a code to rotate every word in a sentence to the right side and write to output.txt file. For example, input.txt file contains following: Hello World. Welcome to java programming. Let's say "Hello" has inde...

0
Q: find out all the neighbor nodes of each node in a list and add edge if those neighbors have distance greater than a certain value

user13476360I have a graph G=(V,E). A list of nodes NODE subset of V. I want to find out all the neighbor nodes of each node in NODE and add edge if those neighbors have distance greater than 2. Is there any other efficient way of writing those loops to reduce the time complexity of this code so that complex...

 
@Duga rolled back
 
Greetings, Programs.
 
possible answer invalidation by Trond Kristiansen on question by Trond Kristiansen: codereview.stackexchange.com/posts/243224/revisions
 
@Peilonrayz Perhaps "they've" been exploring "holes in the ground"... perhaps the May activity was just checking various sites where the Yearling badge was awarded or reputation earned
darnit I did a double ping to Peilonrayz :/
I'm too used to Slack where I edit messages with ease
 
3:47 PM
@SᴀᴍOnᴇᴌᴀ That doesn't add up
No problem ^^
 
(-‸ლ)
Welcome to Code Review! Please see What to do when someone answers. I have rolled back Rev 3 → 2 — Sᴀᴍ Onᴇᴌᴀ 14 mins ago
@SᴀᴍOnᴇᴌᴀ Thank you for the review did you saw anything that could be improved and what caused you to make you rollback. — Syed Mohammad Sannan 1 min ago
 
4:07 PM
@SᴀᴍOnᴇᴌᴀ Hmm, I think if you put the second sentence after the third it'd be easier to understand. You can read it as 1&2 are 'connected' or 2&3 are 'connected', where the other sentance is independent.
 
okay - thanks for the advice!
 
Monking
 
4:29 PM
Monking
 
Monking
 
 
1 hour later…
5:44 PM
If it works and your main concern is performance, I would recommend moving this question to codereview.stackexchange.comchazsolo 56 secs ago
This looks like a question for the Code Review site. — Dennis Sparrow 42 secs ago
 
0
Q: Fleissner-Grille / Turning-Grille

vulpini99Background About the Fleissner-Grille The Fleissner-Grille is a really easy possibility to encrypt text. You just have to take a grid of size n*n with (n*n)/4 holes (example). You then just write one letter in one hole. After you've filled every hole with a letter, you just turn the grille by 9...

 
You can't say "no ones answering" since there is one answerSᴀᴍ Onᴇᴌᴀ 16 secs ago
 
6:42 PM
0
Q: Nesting "for of" inside of a "forEach"

NickI am new to javascript so I am not sure if it's bad practice to nest a for loops inside of each other. This script simply takes a poorly organised menu and rebuilds it. Should I make a separate function for the nested for of loop or is it okay to nest it like I have done below? Everything works...

 
6:56 PM
Answers that do not contain a review should be flagged VLQ, not NAA. Yet, sometimes I can't flag an answer VLQ because it's upvoted too far. Is a moderator flag my only option here?
Specifically, this answer by a user that should know better.
 
You have a better chance asking this on Code Review. — M-- 11 secs ago
 
7:33 PM
@SᴀᴍOnᴇᴌᴀ what does it mean ? morning ?
 
7:51 PM
@Mast I think I'm naughty, and abuse mod flags. Do you know if NAA puts it in a different queue?
 
@Peilonrayz I remember getting called out for using the wrong flag. I'm not sure about the details.
I knew once.
@SᴀᴍOnᴇᴌᴀ Already had mine, any takers?
@ankii Yes and no, but it's definitely used timezone-independant.
 
@Mast I think it comes down to the lesser of two evils. Mod flag + no queue or NAA + queue. I'd just go with mod flag, cause I think I abuse that one.
 
@Peilonrayz Regardless, it has attracted enough downvotes that I can now flag it VLQ. So :-)
 
<- Anti-Santa
 
lol
First result for an Anti-Santa gives me Krampus.
TIL
 
8:10 PM
Hmm, that sounds quite fitting. TIL too
@Duga I was meaning to deal with this. It's got AI, a bounty and more context. Seems a little messy. Anyone have any ideas?
 
Thanks @peilonrayz for this comment - I considered reviewing it but would rather focus on unanswered questions, including a potential follow-up question as I was alluding to
@SyedMohammadSannan Please understand not all contributors you meet on a question are going to review the code. Incessantly asking for a review when that's not the topic of the comments is, to me, very distasteful. — Peilonrayz 4 hours ago
 
@Peilonrayz If there's invalidation going on, rollback with a modflag requesting the bounty be returned.
New user making an effort, should anyone have spare upvotes.
 
8:26 PM
No problem. That seems like a good game plan. (Aside, I didn't know you could ping people with lower case instead of an uppercase letter. Making me wonder if @SamOnela works...)
@Mast Sounds like a good idea, I'll do that in a bit.
 
@Peilonrayz I was not pung though my name doesn't have regular latin characters
 
@peilon Test 1 2
There.
 
I was wondering if it had some NFTK or whatever it's called normalization.
Yeah, that worked Mast
 
@Peilonrayz I know, when I hover over it it links to your last message.
As expected.
 
I doubt you meant "Netherland's new financial assessment framework" for NFTK...
 
8:29 PM
@Peilonrayz EKNF? ETNF? DKNF?
 
@Mast I was wondering how you knew 🤦
 
@SᴀᴍOnᴇᴌᴀ That's a myth, our financials are still on COBOL.
@Peilonrayz Higher magic.
 
I think NFKC
 
@Peilonrayz New Kentucky Fried Chicken
@Peilonrayz Oddly that's not listed as a form of normalization on the relevant Wiki
 
I also thought of KFC
 
8:32 PM
Oh, it's Unicode optimization.
I didn't know people optimized Unicode.
Why does this bring back memories of the awful UTF-7?
Which is still used in places...
Welcome @user324783
I don't know what brought you here, but this is the main chat for Code Review.
 
@Mast It's worse than that. θ = 1; ϑ is valid Python and results in 1.
 
@user324783 I'd give you write access, but the site doesn't want to. Sorry :-(
Like, I know, I thought I was making an exception here which was totally the way to do it given the description. Apparently not.
 
Read some good advice about implementing singletons. But personally, I believe singletons should be avoided as strenuously as global variables (which singletons are). — Fred Larson 43 secs ago
 
@Mast Huh, that's so strange.
 
@Peilonrayz Did you mean θ == 1?
 
8:38 PM
Nah, think of it as a = 1; a
 
Why would you possibly want a variable named θ?
 
I don't know why, but I've seen many a math student do it.
 
@Peilonrayz If you completely forget about readability for a moment, it makes sense.
 
I was going to post a question about finding them. But I, er, got distracted and no longer know where it is. IIRC it had quite a few features...
 
Say you want a sine wave. 2 pi f. If πisn't defined yet, why not define it on the fly?
Put in a little cos(phi).
 
8:42 PM
0
Q: Error handling best practices using a custom error handling module

John SmithI am trying to learn how to effectively use error handling in my code. To do this, I have created a class called 'main.py' which reads the value of a specified curve at a specified date. The code in this module is the following: from data_reader import read_curve from datetime import datetime, t...

 
cos(φ)
Bloody unreadable, but mathematically it makes sense.
 
Yeah, I can only imagine what some math professors code looks like. It would be a thing of b̶e̶a̶u̶t̶y̶ nightmares.
 
I do power electronics nowadays, and we deal with cos(phi) regularly. I can imagine wanting that phi to be in a variable that's actually φ. θ isn't much different.
Except we do a lot in Excel so everything is referenced by cell anyway.
Wait, we could use named cells. The amount of carnage that would cause is limitless.
3
Holy carp that actually works.
 
I should have kept my mouth shut. I've created a monster.
3
 
It's alive!
 
8:52 PM
That's so grim. Also seeing a , for . is rather disorientating.
 
@Peilonrayz On my work PC I'm actually using UK interpunction because it allows me to use the Del/. key on the numeric pad to put in whats-it-called-again...
doubles?
Non-whole numbers.
But in the Netherlands the default is to use a comma there.
We use a . (full-stop) as thousands delimiter.
Like you use a comma, I guess.
 
@Mast You mean 123.456 or 123,456 European? They're called decimals
I actually haven't used the word decimals is ages I kinda forgot what it was...
 
You lot do 123,456.78 where we do 123.456,78.
When somebody says decimals, I think of any number really. Since it uses the decimal system.
But my brain is slowly shutting down. Sleep deprivation or something, who knows. Insomnia does strange things to a man.
 
Yeah, it's really strange that there's a divide over decimal points and thousands. I used to get German Pepsi bottles and the 0,5l was always strange to read. More so than seeing German.
 
9:01 PM
As long as the Brits think a slug∙ft² makes sense as a measuring unit, who knows what does and doesn't make sense...
@Peilonrayz German is a surprisingly easy language.
That thing that flies in the air? Flugzeug. Car? Kraftfahrzeug. Watercraft? Wasserfahrzeug.
 
@Mast I Googled "decimal" and got that as a result and the doubt really started seeping in.
 
Ein Boot, das unter dem Meer fährt? U-Boot.
There's even such a thing as a Decimal Struct.
/// <summary>
/// Keeping my fortune in Decimals to avoid the round-off errors.
/// </summary>
class PiggyBank {
    protected decimal MyFortune;

    public void AddPenny() {
        MyFortune = Decimal.Add(MyFortune, .01m);
    }
Like a BigDecimal class, I guess.
If a decimal is a value with a separator in it, is a hexadecimal a value with 6 separators?
That's a rhetoric question.
 
@Mast Wow. I'm bad at German. I'm not really sure how that's a question.
 
@Peilonrayz Roughly: A ship, that goes under the sea?
A submarine.
 
9:12 PM
Oh, I missed the message above it... Ok that makes more sense
 
Unterseeboot.
 
@Mast Reminds me of fractions.Fractions, but C# has named it aptly.
 
Or, in Dutch, equally logical: een onderzeeër.
 
onder = under and zeeer = sea?
 
zee = sea
zeeër = sea goer.
 
9:15 PM
Yeah, that makes sense
 
Hi Rebecca, welcome to StackOverflow. I'll note that this question may not be the best fit for this site which aims more to have questions with concrete answers and this one is more soliciting a range of opinions. A good place for it might be on the code review stackexchangeGeorge Mauer 32 secs ago
 
@Peilonrayz It's one of the few words in Dutch that makes sense though.
War is translated as Oorlog. Oor = ear, log = cumbersome. Yet Oorlog = war.
 
I remember you saying it's a hard language. And was a bit confused with how nice that example is. But war looks not so nice :(
 
@DerKommissar Where did we put that conversation about a brown fox jumping over laxy dogs again?
That translation machine you built in either F# or Haskell, I don't remember which.
Did you know chat is French for cat?
Chat domestique (Felis silvestris catus)
@Peilonrayz I only just realized theta could be misconstrued as 0 here...
That took way too long.
 
@Mast Oh, I didn't notice that either. It was more the change in the theta symbol. Like for phi (φ := 1, ϕ) == (1, 1)
 
9:28 PM
@Mast it was in this room or the Nth depending on how busy this was
 
-1
Q: How does python view letters?

CRman1I am currently doing the MIT beginners course for python coding. I have a question (already kindly answered on this site) about the longest string in alphabetical order. Take the answer below (by dingalapadum): prevChar = "" currentString = "" longestString = "" for char in inputString: ...

-1
Q: PYTHON CODE NOT PRINTING

usmanoutput is not printing can you spot error please I tried to create linked list and insert and view the data but there is not output being printed class node: def __init__(self,data): self.data=data self.next=None; class linkedlist: def __init__(self): self.start=None; def...

 
@Mast yes my wife majored in French in college (as well as English and Education)
@CaptainObvious please stop yelling
 
@SᴀᴍOnᴇᴌᴀ A tri-major?
 
Wow
 
9:33 PM
@Mast did you see the comment on this edit and the fact that it is an answer, not a question?
I understand it can be seen as an attempt to reply but otherwise those variables are undefined (without self.) on the subsequent lines
 
Asking for code review is off topic, but you may be interested in codereview.stackexchange.comJimB 53 secs ago
I’m voting to close this question because it's asking for code review, which should go on codereview.stackexchange.com. — Peter 42 secs ago
 
@Peilonrayz Multiple majors aren't that hard if they have overlapping requirements. That's part of why I have a double major in math and computer science.
 
9:48 PM
Yes - my wife studied in France for a term and had a lot of overlap between English and French courses
 
The language theory class I took satisfied major requirements for both majors, and I think combinatorics did as well.
 
@Donald.McLean Understandable, I guess I'm just showing my level of education.
 
@CaptainObvious 3 more VTC needed... apparently not in queue yet
otherwise I can't see it since I reviewed it in the first posts queue
 
10:18 PM
0
Q: Basic functional programming understanding in GO

Hasan A YousefI'm new GO coder (stared this Sunday) coming from different backgrounds, I wrote the below code based on my understanding of Go within these couple of days, and impacted of my experience in other languages, I like to share for Go experts review/comments and feedback. package main import ( "...

 
10:40 PM
possible answer invalidation by Peilonrayz on question by Trond Kristiansen: codereview.stackexchange.com/posts/243224/revisions
 
@Peilonrayz Handled previous AI ^
I'm pretty sure just that as an edit is the least destructive fix
 
yeah, I'm presuming you saw the end of Reinderien's answer which mentions the missing call to calculate_spectral_and_broadband_OSA and the OP confirming that the call was skipped when posted on CR, so adding the call led to AI
seems like the LDF to me
 
Yeah exactly that
 
I see. It seems there's some discussion regarding this subject here, including a reasonable explanation why it's not supported. Then I suggest you post a working version into the Code Review Stack Exchange using the CancellationToken and the CancellationTokenSource as explained above, even if it's not the most efficient version, it's a better place to be guided in that kind of review. — rph 5 secs ago
 
I just noticed µ and σ are in their code.
Also the code is broken af. You can't have a newline between = and the rhs expression.
Duga should complain in a minute. I fixed the issues with a partial rollback.
 
11:00 PM
possible answer invalidation by Peilonrayz on question by Trond Kristiansen: codereview.stackexchange.com/posts/243224/revisions
 
11:18 PM
while it doesn't seem like an elegant phase as it is, I hardly see anybody capitalize the acronym "AF"
 
11:32 PM
I've only seen AF now and when people are double emphasising, like an afaf if you will.
 
zoinks!...
 

« first day (2588 days earlier)      last day (1423 days later) »