« first day (3619 days earlier)      last day (391 days later) » 

2:03 AM
0
Q: C++ Thread Pool Implementation using Lock Free Queue

andylvuaTopic: C++ Implementation of Lock-Free Queue and ThreadPool classes In a project I'm currently working on, I need the implementation of ThreadPool along with a thread-safe queue. I've tried implementing the above structures and wonder about their safety and performance. Reason for asking I'm look...

0
Q: Promise queue Typescript

Lewis FarnworthAs an exercise, I wrote a promise queue in Typescript. The point of it is to parallelise a maximum number of promises, and not just Promise.all() to batter the event queue. Of course there are professional queuing solutions that exist like RabbitMQ, which would destroy this performance wise. I ge...

 
 
6 hours later…
8:01 AM
Monking
 
8:58 AM
0
Q: Creating multiple conditions in objects preventing nesting

Ricardo CastañedaMy class is a factory-method that allows to instantiate it only when the parameter $type (string) is "regular or premium" and when parameter $months (integer) is lower than 6. If $months is lower than 6, an error prompts and the subscription instance is not created. I've created an if condition i...

 
 
1 hour later…
10:16 AM
0
Q: Diamond printing code Kata

FelixGKthe code implements this code kata: https://codingdojo.org/kata/Diamond/ This is my very first ocaml program, looking for any kind of feedback, as I'm a total ocaml noob. It uses JaneStreet's Base and Stdio as well as cmdliner. open Base open Printf open Stdio open Cmdliner exception DiamondErro...

 
10:33 AM
Monking
 
11:21 AM
@BryanW: Glad to help. When you have working code and if you are interested in getting feedback on it, consider posting on Code Review Make sure to read the policy first. — toolic 54 secs ago
 
 
2 hours later…
 
2 hours later…
2:36 PM
0
Q: Generate html from input fiels

blogobI am building a small tool to generate a copy and paste HTML block, based on the user inputs. In the html file, I have all my inputs (select, checkboc, text inputs etc). I based myself on the JS of an existing tool on the web, which has the following form. Everything works, but I wonder if there ...

 
3:28 PM
0
Q: Code for Transfer a Request , Can anyone point out the issues here?

dev2023This has been asked in an interview to review , Can anyone help me to point out issues? Few issues that i have found out. Magic variables like ApiKey getClientId called twice instead of caching the response Transfer requests should be created via some creational pattern. HttpHeaders headers...

 
 
2 hours later…
5:11 PM
0
Q: Comparing dates in RPG

Theju112So I have to do a simple comparison of date field as below. if curDate >= ValFrDate and curDate <= ValToDate or ...

 
5:37 PM
0
Q: Is this emulation of inherited tables for microsoft sql-server fault-free?

QuandaryI use the bellow construct to emulate a child_table inheriting from parent_table. The parent table redundant-entries (name & display-name) should be updated if relevant fields in the child table entry change. But the parent table redundant-entries should not be changable without changing the ch...

 
6:33 PM
Hash functions lose information. Consequently, they are not reversible, and are bound to have collisions. Thus, as the prior comment says, what you want is not a hash. You are looking for some kind of encoding, which might or might not be a cipher. Now, the question you pose is edging on code review. It is not what we usually do here. Have you tested the code? Do you have reason to think it is not wrong? Or is this just speculation? - What I don't trust is the HASH_MASK which is not in the code. On a related note, know that GDScript has binary literals. — Theraot 55 secs ago
 
 
4 hours later…
10:49 PM
0
Q: More efficient way to generate Tkinter buttons in loops

Justin ChengI designed a game of Minesweeper where the board was displayed using text, and it worked fine. Using the same pseudocode, I tried to write the game with a GUI using Tkinter, and made a few modifications to account for having a GUI. Here is my code: import random import tkinter as tk from tkinter ...

 
11:07 PM
REFRESH! There are 7344 unanswered questions (90.4356 answered)
 

« first day (3619 days earlier)      last day (391 days later) »