« first day (3182 days earlier)      last day (818 days later) » 

12:00 AM
REFRESH! There are 8013 unanswered questions (89.2316 answered)
REFRESH! There are 8013 unanswered questions (89.2316 answered)
 
12:20 AM
t3chb0t did a re-review of my code after forcing to do a rewrite (it was justified). You might want to up vote his answer to welcome him back. AlanT also wrote a good review. I appreciate anyone who will wade through all the code I write/post.
Only 3 more accepted flags until I get a Marshall badge.
 
 
2 hours later…
1:57 AM
0
Q: Accessing multiple dynamic libraries with the same extern C methods

GregI have multiple pre-compiled dynamic libraries that use the same extern "C" methods names. The methods can behave differently for each dynamic libraries. Ultimately these methods will be accessed in a SystemVerilog simulation via DPI (Direct Program Interface). When trying to link all the librari...

 
 
2 hours later…
3:43 AM
SO is for those with non-working code. For review of working code, try Code Review. — user9938 32 secs ago
 
4:29 AM
0
Q: Is there a faster way to read bytes with a FileStream?

RileyDanSo I'm trying to read data and store it in an array as fast as possible and the fastest method I found of doing so was this. var filePath = "data.dat"; FileStream fs = new FileStream(filePath, FileMode.Open); bool[] buffer = new bool[fs.Length]; TimeSpan[] times = new TimeSpan[500000]; Stopwatch...

 
 
2 hours later…
6:16 AM
Monking
 
6:49 AM
If you are asking for this specific problem: We cannot really say anything about this without an minimal reproducible example for both Julia and Python. If you have a working program and want it optimised, then this appears to be more appropriate for CodeReview – be sure to check their question guide first, though. — MisterMiyagi 48 secs ago
 
7:01 AM
1
Q: Variable Grid Size Tic Tac Toe

unconnectednameTic-Tac-Toe from scratch. Code Ugliness check before I implement the win-condition and maybe get set in to bad habits. Questions: As implemented: Better to pass board between functions or set as a global variable? OK to use same variable name within different functions? OOP: Would you recommend u...

 
7:35 AM
possible answer invalidation by Toby Speight on question by xyf: codereview.stackexchange.com/posts/273123/revisions
possible answer invalidation by Toby Speight on question by xyf: codereview.stackexchange.com/posts/273123/revisions
 
 
1 hour later…
8:54 AM
Monking
 
9:07 AM
0
Q: Implementing a proper tables inheritance with PostgreSQL

Claude BrissonContexte Postgresql has an INHERITS keyword which lets you inherit one table from another, but it is known to have several caveats, mainly because it is not a true column-based inheritance. I implemented a working solution using views and rules, detailed below, and I'd be glad to get some feedba...

 
@Duga Code fence (and now we get a double-notify from @Duga, just after I claimed we weren't!)
 
 
2 hours later…
11:28 AM
@TobySpeight Duga has the best timings ;)
2
 
12:04 PM
0
Q: Unit tests coverage of functools extension library

Richard NeumannA few days ago I requested a review of my functools extension library. Since I did not have any unit tests for it, I started writing some for the revised version of this library. I'd like some feedback on whether these tests are sensible and how they may be improved upon. Revised library (test su...

 
possible answer invalidation by saQuist on question by saQuist: codereview.stackexchange.com/posts/272900/revisions
 
@Duga @SᴀᴍOnᴇᴌᴀ Do you know if @Duga went down?
 
@Duga Added missing import - answer is unaffected
 
 
1 hour later…
1:20 PM
0
Q: Rails 6 - How to listen webhook

RubioliIn my application (rails 6.1.4), I'm using pay gem. Everything is set up fine, but only thing remaining is to listen to the webhook on when a charge has been successful to update the order/table. In their docs, they already have webhooks ready and I just need to listen to them. This is what they ...

 
A poor question has picked up a couple of answers. Can we get the question improved or closed?
 
1:46 PM
0
Q: Permuting BitSet in Java

coderoddeI have this tool for permuting bits in BitSets: com.stackexchange.codereview.util.BitPermutation.java: package com.stackexchange.codereview.util; import java.util.BitSet; import java.util.Objects; /** * This class is responsible for representing the bit permutations of * {@code long} values....

 
2:06 PM
@TobySpeight Closed.
 
3:02 PM
0
Q: updlock, readpast` with UPDATE and XACT_STATE() with rollback tranasaction

vivek nunaCould someone please review my stored procedure? I have two questions. Is it correct to use updlock, readpast with UPDATE query? In my past I have not used any hint with UPDATE, I have used nolock only with SELECT. Is this correct to use IF XACT_STATE() <> 0 to rollback? I have also not used th...

 
You are not going to get an answer to this question here. This site is for focused well defined programming problems. Try codereview.stackexchange.comc0der 23 secs ago
@r2d2 agreed! By default I think most people code review PRs as a whole, and look at the file diffs one by one. To avoid this question's scenario, sometimes I purposefully do PR's with a largish number of commits because they need to all land together, and in those cases I instruct the reviewers to review each commit in order, rather than all the files separately for the entire PR. This enables the reviewer to keep some mental context for each change and is less daunting of a review. That said, when necessary I'll still branch off of a teammate's incomplete branch knowing it's gonna change... — TTT 6 secs ago
 
3:27 PM
0
Q: A more transparent way to get the Windows API current text cursor position using Python

not2qubitI've got this code, to display the current text cursor position of the last printed character on the terminal screen. It's using ctypes to get the (old non VT) Windows API, for this. However, I feel the code is a bit too long and not very transparent regarding what is going on. #!/usr/bin/env pyt...

 
3:52 PM
0
Q: How can I optimize my chess game?

KeganI'm relatively new to programming, as in my second semester of college. To practice C, I started work on a chess game. I'm wondering if there are ways I could improve my code, make it look more professional, or reduce some blocks of inefficient code. I have more ideas on things to add to the game...

 
4:12 PM
Monking
@Peilonrayz my monitor saw a timeout error checking duga.zomis.net ~90 minutes ago i.e. 14:46 UTC but then it had a 200 response the next minute, and you asked me earlier than that
 
0
Q: My TicTacToe AI doesn't work properly, minimax algorithm messed up

R0BestThe minimax algorithm isn't working, it always picks the last move, I've been trying to figure it out but I just don't understand it. I expect the problem to be in any of the following functions: game_loop(), best_move(), minimax(). import time import pathlib import pygame pygame.font.init() # -...

 
Don't worry they kept TODO in the code so they won't forget to change it later. — Dharman 8 mins ago
 
4:34 PM
@c0der CodeReview is for working code. As the OP states that they get an error message and are asking for help on fixing it, this would not be suitable for CodeReview. — user673679 44 secs ago
 
4:56 PM
Going to miss the Developer Story, such a good place to brag.
 
5:18 PM
Nibjubg
 
6:05 PM
Since your code is working and you just want subjective advice about how to clean it up, your question is not a good fit for this site. But you could ask on codereview.stackexchange.comDavid Grayson 17 secs ago
There's a dedicated codereview sister site, which was both mentioned and linked to. It's a better fit for this question. — Useless 47 secs ago
You are just on the wrong site. Stack Overflow is about fixing code wheras Code Review is about improving code. — Johnny Mopp 17 secs ago
 
6:50 PM
0
Q: HackerRank: Sam and substrings | How can dynamic programming be used in my code?

Mysterious ShadowGiven a number as a string, no leading zeros, determine the sum of all integer values of substrings of the string. Given an integer as a string, sum all of its substrings cast as integers. As the number may become large, return the value modulo 10**9+7. Example: n='42' ans=4+2+42=48 Full problem:...

 
7:02 PM
@Mast picky picky :D
 
7:15 PM
I can't spell either.
 
7:50 PM
@pacmaninbw
 
8:19 PM
LOL
You should see what @TobySpeight has to deal with on some of my posts. I consider him the clean up crew. :D
Where is Jamal when you need him?
 
I sometimes wish I was less sensitive to grammar and spelling. Would save me a lot of time!
 
9:05 PM
David Gibson on January 19, 2022
When the Log4j security issue was disclosed, developers came looking for answers. We took a look at our site data around it.
 
9:40 PM
 
10:05 PM
possible answer invalidation by ParthS007 on question by ParthS007: codereview.stackexchange.com/posts/273084/revisions
 
@Duga RB'd
 
0
Q: Event Dispatcher C++

ScrappyHaxorfirst post ever on a stackexchange website. Pardon any mistakes. I've tried to write an event dispatcher for a GLFW/Glad library however I am not very used to writing efficient code (Spent the majority of my life writing in C# and performance was never really the focus of what i learnt in univers...

0
Q: Script to fix linkage done with #pragma comment(lib, "a.lib) for Visual Studio project

Sergey KolesnikI have a legacy project that has a lot of linkage done using #pragma comment(lib, "libname.lib"). Moreover, some projects define linker directives in mixed ways - this is very frustrating and inconsistent. There are over 100 projects in the solution, so I don't want to even try to fix them by han...

 
10:22 PM
@TobySpeight But you do lots of good work, and I really appreciate it.
2
 
11:14 PM
@GSerg when suggesting users post on CR it would be great if there was also a suggestion like "Please read the relevant help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?". In the current form the question above might be considered off-topic because there is little description about how the game works/flows. — Sᴀᴍ Onᴇᴌᴀ 24 secs ago
 
11:54 PM
0
Q: Is this optimization valid? It's a more subtle version of unused variable optimization where the variable is used, but it's inconsequential

josevilleI have an interesting optimization I want to get some confirmation on whether it's valid: I was solving Leetcode #452: Minimum Number of Arrows to Burst Balloons (description in footnote [1]) and came up with the following solution: class Solution: def findMinArrowShots(self, points: List[Lis...

 

« first day (3182 days earlier)      last day (818 days later) »