« first day (2926 days earlier)      last day (44 days later) » 

12:02 AM
RELOAD! There are 7559 unanswered questions (89.4472% answered)
1:01 AM
Q: C++20 Ndim matrix, computing eigenvalues and eigenvectors

frozencaMy C++20 N-dimensional matrix project now supports basic linear algebra operations: https://github.com/frozenca/Ndim-Matrix Today I want to get some reviews on computing eigenvalues and eigenvectors. In particular, I don't like so much duplicate codes. I think other parts is okay.. (hope?) There ...

3 hours later…
3:33 AM
Q: implementing insertion sort on a Circular doubly linked list

lkilgoretroutI have been working on getting insertion sort to work on a Circular Doubly Linked List that uses a sentinel node. I got it to work pretty well but I just can't get it to work properly. There is a bug in there and I just can't find it. class DLNode: def __init__(self, value: object) -> None: ...

3:58 AM
Q: Simple RESTful counting API in Golang

FromTheStackAndBackDescription This is a simple (and hopefully) RESTful API in Golang that uses Redis. I have next to no prior experience in Golang and absolutely no prior experience with Redis. The API is a simple counter service with the feature of disabling "public" updates (cannot create new counter, and cannot...

4:23 AM
Q: Filter a Linked List in Place in C

Dean MenezesI have created the following function which filters a linked list in place (here it removes all instances of the element k), but it could easily be modified to take a function pointer as an argument and filter on something else. Any ideas on how to improve the code? typedef struct list_integer { ...

2 hours later…
6:41 AM
7:09 AM
7:45 AM
Q: Why is multithreading not giving me the speed-up I expected?

Tirthankar MazumderI recently decided to learn how to multithread Java programs, so I made a small program to compare the performance of serial and multithreaded programs that perform the same task. I created a serial program that calculates the number of primes from 1 to 10 million, and timed it 50 times using a t...

3 hours later…
10:16 AM
Q: How do I make this Python function run faster?

cyrusgbI have this function called error, which estimates value based on previous value and rewards in trials. The difference between the estimated value and true value is then calculated, giving the error. I need to run this code 1000 times with different lists of trials, but currently it runs too slow...

10:42 AM
Q: Displaying digital clock with no lag in seconds

aepotThe problem There's several ways to generate an event in app once per second. Various Timer class or loop with await Task.Delay(1000) can be used. But all the solutions make a visible lag when displaying seconds. That's because the intervals which was set to delay interval doesn't include the del...

11:33 AM
Q: Multi-site backup utility with basic sanity checks

MastWe have a large set of projects at work. It's very important we keep track of those and every so often we need to run a full back-up that's unrelated to the 'normal' back-ups IT is running (snapshots every day, week, month, etc.). Recently we had a big migration on all of the older projects. To m...

11:59 AM
Q: How can i perform a transformer autoencoder with adding the decoder part in the vision transformer [1]

user241927How can i add the decoder layers after the encoder layers part of the Vision Transformer ? import tensorflow as tf class Transformer(tf.keras.Model): def __init__(self, dim, depth, heads, mlp_dim): super().__init__() layers = [] for _ in range(depth): laye...

@CaptainObvious That looks familiar.
I guess this question is better suited for Code Review Stack Exchange. — Evg 15 secs ago
@Evg afaik codereview is for working code only. OP is asking "is this correct?". Last time I refered someone to codereview in a case I considered completely appropriate, an angry reviewer informed me that codereview has super high standards, not like SO, since then I am not sure anymore what actually is ontopic over there. — largest_prime_is_463035818 26 secs ago
@Evg not a good fit for code review. Only refer users to code review how got complete and working code already. That exchange is solely about iteratively improving skills, not about any form of debugging. Only in rare cases, you will be pointed out actual, not yet realized issues by reviewers, but generally it's just about honing best practices, which would be a bad fit for this site in return. — Ext3h 57 secs ago
12:24 PM
12:51 PM
Q: OOP ATM Implementation

ScorpioI have tried to embody some basic ATM operations in a Object Oriented manner for practice. Would love some review pointers from structure, Object Oriented principles point of view. Also what should be my next steps in order to get good at OO design(I would like to read more code not books/videos,...

1:17 PM
Q: Check if point is inside a bitmap shape

user673679Inspired by this question, here's some C code to check if a point is "inside" of a shape on a simple black and white bitmap. For this exercise: Set bits form the "outlines" of a shape (and are never inside). Unset bits may be inside or outside of a shape. Unset bits with a path to the edge of th...

1:38 PM
@CaptainObvious @Peilonrayz The title of the question could be improved. Nice answer.
2:00 PM
@pacmaninbw Thanks, looks like the title's good now :)
2:16 PM
Ryan Donovan on May 08, 2021
In our last session, we will learn how to create audio visualizations with the p5.sound.js library. We will start by learning how to upload and play a sound file in the p5.js web editor. We will first talk about what amplitude is and how we can program a p5.js sketch to react to the amplitude…
2:39 PM
@CaptainObvious @Mast Any chance you're using tar to compress and un-compress the files before and after. I might speed things up.
At least the network file transfer.
@pacmaninbw On Windows?
Might work.
Some form of compression will help.
It's Python, so there are probably multiple methods of compression available somehow.
Worth a try, since the CPU is barely doing anything anyway.
I honestly have no idea, whether it will make a difference.
Q: What makes a CSS question opinion based or not?

EnlicoSince CSS is about the aesthetical layout of a web page, I guess it's easy to ask opinion based questions. I guess that asking about reusability of some CSS code would not be opinion-based. On the opposite side of the spectrum a question along the lines of is this layout nice? would be opinion ba...

3:00 PM
Q: Hackerrank - Practice > Interview Preparation Kit > Warm-up Challenges > Sales by Match

lamp bottlehttps://www.hackerrank.com/challenges/sock-merchant/problem?h_l=interview&playlist_slugs%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D=warmup (defn sockMerchant [n ar] (reduce + (map (fn [[_ v]] (if (>= v 2) (quot v 2) 0)) (frequencies ar))) #_(->> (map (fn [[k v]] (if (>= v 2) ...

3:22 PM
possible answer invalidation by Valex on question by Valex: codereview.stackexchange.com/posts/259703/revisions
@Duga Clearly identified as an edit and explains usage.
It does not invalidate the answer.
3:47 PM
possible answer invalidation by Deduplicator on question by Dean Menezes: codereview.stackexchange.com/posts/260481/revisions
@Duga Formatting fix.
4:17 PM
Q: Tell me how to display an OpenGL form window?

AndynvkzI run and get a black screen Form1->BorderStyle=bsNone; Form1->WindowState=wsMaximized; glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH); glutGameModeString("800x600:16@60"); glutEnterGameMode();

1 hour later…
5:34 PM
Q: Rock, Paper, Scissors - Improving Separation of Concerns & Reducing Repetition

ImNotThatCSharpI would be grateful for a code review of my first "significant" C# project (https://github.com/michaeljsiena/RockPaperScissors). It's a basic rock, paper, scissors console game. I tried to apply some of the OOP principles I've been learning but feel there's a lot more I could do better. I would e...

Q: Pandas merge a "%Y%M%D" date column with a "%H:%M:%S" time column

Andrea CiufoI have a dataframe with a column composed by date object and a column composed by time object. I have to merge the two columns. Personally, I think it is so ugly the following solution. Why I have to cast to str? I crafted my solution based on this answer #importing all the necessary libraries i...

Can you sum consecutive lines in a loop in C++ Yes. (At least, I believe I can.) Any suggestions? Is it a code review? if (word != "stop") seems not necessary. There is already a check in while (inFile >> word && word != "stop"). However, do you have any problem with your code? — Scheff 39 secs ago
5:56 PM
"It's not a real question" - so don't ask it. If this is working code that you think could be improved, see Code Review. — jonrsharpe just now
6:49 PM
@Pierre Don't forget the included code review and a two-hour phone consultation if you're talking about the current FireGiant Professional Service offering. Most of our FireGiant customers choose the Enterprise Support Program to build a long term relationship with us and help support the WiX Toolset's continued development. — Rob Mensching 43 secs ago
Q: "Python AutoClicker" Part 2

Syed Mohammad SannanI previously posted a question for codereview: Python Autoclicker And I received some great feedback and changes to do in the code. I have done many of the changes mentioned in the answers and here is the final code: from pynput.keyboard import Controller from time import sleep def auto_click(k...

2 hours later…
8:33 PM
@CaptainObvious IMO look quite a bit like AoC. Defo not enough to hammer. Please can someone look to see if I'm just being trigger happy :)
Q: Structuring the program that demonstrates collision detection within a field of view

Apple_BananaI recently needed to detect agents within a certain-field of view and came across this question in gamedev stack exchange. To learn how it works, I followed the first answer's guidance and decided to make a program that demonstrates how a "a field of view like collision detection" is done. But th...

Q: Monte Carlo Tree Search Optimization and Loss Prevention

emehexI'm working on a implementation of Monte Carlo Tree Search in Swift. It's not bad, but it could be better! I'm principally interested in making my algorithm: faster (more iterations/second) prioritize moves that prevent instant losses (you'll see...) Here is the main driver: final class MonteCa...

Q: What is the right use of CMP?

cassepipeI am confused... Here is the working loop of my strlen function : .loop: inc rax inc rbx cmp [rbx], byte 0 ...


« first day (2926 days earlier)      last day (44 days later) »