« first day (2522 days earlier)      last day (60 days later) » 

12:00 AM
RELOAD! There are 6438 unanswered questions (90.1463% answered)
12:41 AM
Q: Grocking the basics of BlockChain with Python

Aaron HallAs I was streaming I had a brilliant visitor suggest we write a blockchain in Python. So we did. Note that there is no validation or voting simulated here. Here's the results, in package/blockchain.py: from __future__ import annotations # https://mypy.readthedocs.io/en/latest/running_mypy.htm...

1:18 AM
Q: Improvement on data normalization

BladeI have a part of code that is loading a dataset and normalizing property values to [0, 1]. My implementation is: import pickle import numpy as np with open(dataset_name, 'rb') as f: prop_1 = pickle.load(f) prop_2 = pickle.load(f) prop_3 = pickle.load(f) l_bound = [] l_boun...

2:04 AM
If the code review is closed by the requestor, users are not able to add overall comments or file comment, as they are disabled. You need to check whether the code review has been closed. — Cece Dong - MSFT 47 secs ago
1 hour later…
3:30 AM
Q: Getting time since Unix epoch on both Windows NT and *NIX systems

JoshuaS3The following snippet of C includes implementations for both Windows NT and POSIX-compliant systems to get the time (with microsecond resolution) since the Unix epoch. In the case of Windows NT, the time is registered as 100-nanosecond ticks since the NT epoch (1/1/1601), so it requires a bit of ...

4:06 AM
@Peilonrayz Or both.
@Peilonrayz Doing anything, including chat, on mobile is still a pain in the rear. Limited input options, autocorrect, limited visibility so the autocorrect-mistakes are often enough hidden...
4:57 AM
5:13 AM
SO is not the appropriate place to ask for code reviews of working code — Stultuske 15 secs ago
5:40 AM
possible answer invalidation by Vivian Mascarenhas on question by Vivian Mascarenhas: codereview.stackexchange.com/posts/239321/revisions
6:06 AM
@Feeds His previous meta went over so well too.
6:36 AM
@Mast Strangely their profile's about me looks about the same
@Peilonrayz Ugh. That's not a pretty text.
1 hour later…
8:01 AM
@Duga Ouch. Rolled back.
@Duga Rolled back.
1 hour later…
9:09 AM
Q: Handling disconnected entity scenario in Entity Framework Core

Javier García ManzanoAs some you you may know, handling disconnected entities in EF can be a bit of a headache. After a really long weekend, I managed to make it work for my use case and refactor the code to the best of my knowledge. However, I'm still not happy with it since every time I have to add a new entity to ...

10:05 AM
Q: Nested Lists from HackerRank

coderI am a beginner in python. This is the Nested Lists problem from HaackerRank. Given the names and grades for each student in a Physics class of N students, store them in a nested list and print the name(s) of any student(s) having the second lowest grade. Note: If there are multiple ...

11:01 AM
Q: wrote a blackjack game in python , would like you get notes on it

amitI started learning python online and I wrote a blackjack game as my first little project. I would like to get some review on it if possible. (how to make it better , simpler , etc) from random import choice cards = ['A', 2, 3, 4, 5, 6, 7, 8 , 9,'J','Q','K']*4 def get_card(name): card = choi...

Q: Yet another Fahrenheit and Celsius converter

L. F.Introduction I am recently learning Rust by reading The Rust Programming Language (a.k.a. the book). I have finished the first three chapters so far, and this is my attempt for the first exercise listed at the end of Chapter 3, which has a simple description: Convert temperatures between Fa...

11:20 AM
Q: Passing argument to a constructor and using it only in some class methods

Szymon CzemborI've created some controller for handling clicked links statistics. Does this class meet Single Responsibility Principle? class StatisticsController { protected $statisticsQuery; public function __construct(StatisticsQuery $statisticsQuery) { $this->statisticsQuery = $statis...

Also, your current and new question would be a better fit on the codereview SE site if it works (that's a hard requirement). — Some programmer dude 17 secs ago
11:39 AM
Q: Beginner Python needs reviewing

khanghongGood morning/ evening/ afternoon/ night everyone, I do not have an intention to ask for an answer, but I want to know if my answer is good for a two-week Python beginner? Thanks in advance. Question:( Automate the Boring Stuff with Python/ page 102) Comma Code Say you have a list value like t...

12:02 PM
Guys, what advice can you give about learning JS if it's your first language, with preference towards reading rather then video materials?
@Denis What's the context? Is "don't" an acceptable answer?
What's the goal? Growing towards front-end or back-end JavaScript?
If you're simply looking for an endless repository of JS books, begin here.
If the goal is to become an all-round developer eventually, I'd start with a sane language.
I'd say he'd like to get his hands on just a more constructed path to learning it
Or a book only learning you sane practices.
Oh, of course! It's not for me tho
Obviously, you already know how to program :-)
If combining it with HTML/CSS isn't a problem, I'd recommend FreeCodeCamp
With GitHub integration.
Structured, starts ludicrously easy, saves the actual programming tasks for when you've wetted your appetite already.
Pure JS will only result in madness for a beginner.
12:11 PM
I'll try to convince him, that it'd be better if he starts with a sane language haha
But if he's set on JS, FCC is the way to go I think.
Thanks a lot for the response @Mast, will talk with him a little bit more and see if he changes sides
No problem @Denis
Remember, the goal is just as important as the journey when starting out.
Otherwise there will be no motivation.
@Mast /beginner/everyone/s ;P
@Denis You should find out what they want to do, and pick the language from that. A drive to do something you want is better than being shafted into a language that can't do what you want.
And learning JS definitely feels like getting shafted at times.
Or wasn't that what you meant?
12:27 PM
If I want to make a pretty front end website then I think learning JS first is the best idea. Last I checked you can't really web dev with anything else, except WASM.
Ammm then set up a helpful edit suggestion (I certainly hope you don't say Ammm in your code reviews). — Tim Consolazio 27 secs ago
@Peilonrayz In that case you should probably start with HTML and not with JS though.
@Mast Thought we were talking about programming languages
@Peilonrayz That's why you tackle them both at the same time.
Unless you're doing server side JS, I'd teach JSON way before HTML if that were the case
12:47 PM
@Peilonrayz I would've liked to know the difference between JSON and an ordinary JS-file before I started with JS.
I have always failed to understand why people mistake those.
I didn't have a problem with thinking repr was json
I saved my mangled JSON as a JS file and everything worked.
That's JS. It accepts bull!@#
You can do the same with Python, save a mangled JSON as a .py
I did that yesterday cause I cba to flesh out a proper cache
You can load a JSON file as .py and Python automagically turns it into a butchered object?
You can load json as a .py not sure where the butchering is coming from tho
1:13 PM
Q: Java's AtomicInteger equivalent in c#

Olivier MATROTI'm trying to replicate Android's GenerateViewId() to assign a unique Tag to dynamically created UIViews in Xamarin.iOS. internal static class LayoutExtensions { // A tentative to mimmic Java's AtomicInteger used by GenerateViewId() // https://android.googlesource.com/platform/frameworks...

Q: SSH Port Forwarding - golang

KingindanordI developed this small code to make my life easier when I work with remote machines over ssh tunnel crossing a bastion host. I would like to publich it so others could benefit/learn from it. So I would appreciate your opinions for improvement or maybe I foreseen some issues in this approach. G...

Q: Humble request; help a newbie being more efficient (XML and VBA)

Peder CFirst post here. I sincerely hope that I am doing everything by the book. Also, I want to thank you in advance for any help and assistance that you may be able to provide me. I have been coding VBA for 2 weeks and I realise that my code may suck. Problem; what can I do to make my code faster? I ...

1 hour later…
2:29 PM
Q: ConcurrentDictionary with LazyLoading - Multi-Threading

Jurgen CuschieriLet's say I have this ConcurrentDictionary defined statically at a Global level (Global is called 'WebApiApplication'. Any reference to WebApiApplication within the following snippets refer to globally defined static variables). Public Shared Property ssMWMultiTenant As New ConcurrentDictionary...

2:47 PM
Q: Constructive criticism on Unity3d objectpool

formatc2013I would like some review on my objectpool scripts in Unity3d/C#. Adding Objects is very easy: GameObject newObject = yourPool.AddObjectAtPosition(yourNewPosition); newObject.transform.position=new Vector3(); Get rid of one: yourPool.HideObject(); I use 2 Stacks as pools, a primary and a se...

3:23 PM
This is why code reviews exist — Chrispresso 19 secs ago
3:46 PM
If you want help improving working code, you should post this on CodeReview.SE. If you do decide to do so, please delete the question here. — NathanOliver 16 secs ago
@ajsp I've added the error message and I'll check out codereview site, thanks — dizzee16 54 secs ago
@NathanOliver Wow the linked solution is really crazy! I'll try it and if unsatisfactory I'll move this question to CodeReview. Thanks. — Costantino Grana 40 secs ago
4:03 PM
Q: Angular Jukebox streaming music to a player as a subject. Subject is undefined

dizzee16Basically I'm implementing an Audio Player in Angular. I based the audio player off of this tutorial. The only thing is I'm implementing a Jukebox, so the audio cannot be hard-coded in as it will change based on what the users queue. I researched my problem and most solutions involved using a Sub...

Q: AWS: qsub does not run Hello World job in cfn-cluster

NXG LogicI am using c4.4xlarge and c4.8xlarge for cfn-cluster. Sometimes I use my own templates, other times I have used AWS default for VPC US-West(Calif), specifying e.g. c4.4xlarge. After the cloud is formed, I can never seem to run the simple hello world shell using qsub, and even this small job ...

@ajsp Code Review is for code that works as intended. This clearly does not. Please don't make crap recommendations due to ignorance, just makes everyone except you have a harder time. — Peilonrayz 54 secs ago
4:22 PM
Q: Quadtree in C++ : Exception Thrown Read Access Violation

jasbindra00I am attempting to implement a quadtree in C++, however I have a read access violation that I have been spending hours trying to figure out. Note that I have put all the member variables in public, just for debugging efforts. Whenever I attempt to subdivide a quadrant, ie the root quadrant, I ge...

Q: Beginner CSS needs reviewing (Header and Nav)

joelI am beginner in HTML/CSS, I realized the header part, here is an image below. I would like to know if my code is correct ? I have another problem. I don't know how to rename class names correctly? Is there a convention? I thank you in advance for your help. body{ margin: 0; padding:...

4:41 PM
Q: How can I optimize my Google Apps Script so that it doesn't exceed the maximum timeout?

SPQRGuyMontagI'm trying to keep my script from exceeding the maximum execution time, but I'm not sure how to optimize my code. The part that really hangs is when the file is an APR. It has to unzip 69 files, convert them to Google docs format, and then overwrite the existing tabs on a Google Sheet. Thank you!...

5:04 PM
Ben Popper on March 30, 2020
Our most requested feature is finally coming to life. You can try out Dark Mode in beta across Stack Overflow and help us make it great.
2 hours later…
6:51 PM
This might be more appropriate for codereview.stackexchange.com. — AMC 39 secs ago
7:49 PM
for starters dont pass by value unless you need a copy anyhow (you dont). For reviews of working(!) code there is codereview.stackexchange.comidclev 463035818 27 secs ago
8:08 PM
Q: A function for batch backpropagation of weight errors in a dense neural network layer

Jonathan Woollett-lightI'm switching my neural network library over to using ArrayFire for performance. One of the features I am losing moving from ndarray is ndarray_einsum_beta, as such I need to write my own function to carry out what I was using einsum for. This function needs to be as fast as possible. This is ...

possible answer invalidation by Klaas van Aarsen on question by Klaas van Aarsen: codereview.stackexchange.com/posts/239613/revisions
9:00 PM
possible answer invalidation by gwg on question by gwg: codereview.stackexchange.com/posts/239204/revisions
Q: Conway's game of life in c++ using SDL2

NadpherI recently finished writing a conway's game of life implementation in c++, using sdl2. Please tell me what needs to be improved. Github Repo

9:24 PM
Q: System generated Social Network

Bagesh SharmaIn a particular social network friends are automatically allocated to users by the system and users cannot add friends of their choice on their own. There are currently N users on the social network, labeled from 2 to N+1. For every ith user (where i ranges from 2 to N+1), the system allocated a...

10:23 PM
@Duga Someone else might want to rollback that (@Mast @Vogel612 ?). I did add a comment to the relevant meta. He asked it in a really nice way I think which made me think about how we could maybe make the canned comment friendlier.
as it is, it would be an answer-invalidation (in a way) because it directly references your answer...
@Vogel612 I know it's an answer invalidation, but I don't want to be the one rollbacking as I posted the answer
I don't quite understand why, but sure..
Can seem a bit power-trippy imo, "I am the law"
happy to play the "bad guy" then :)
10:35 PM
I would have, but you were too quick :)
@Vogel612 For the same reason as I wouldn't handle a flag as a mod on a question or answer that's mine.
as an answerer you're uniquely qualified to judge whether an edit is in fact an invalidation.
flags are significantly less traceable in comparison to a rollback on a public question
10:51 PM
@Vogel612 well yeah, ok, that's a good point
1 hour later…
11:55 PM
Q: How can i solve this using C language?

Kristina PlazonjaThe user inputs digits, character by character, separated by spaces. Function from digits constructs and returns a number (int). If no digit is entered, the entry continues. Entering ends when the user enters the 'q' character.##I solved like this but it needs to be used function, as it says in q...

Q: C# random maths questions test

crazydanyal1414I made a C# console maths test where the user answers addition, subtraction, multiplication, division, power, square-root questions based on the difficulty they choose! However, I am struggling to refactor one part of my code. Here is my code: using System; using System.Collections.Generic; n...


« first day (2522 days earlier)      last day (60 days later) »