« first day (3794 days earlier)      last day (79 days later) » 

12:04 AM
REFRESH! There are 7070 unanswered questions (90.8539 answered)
12:39 AM
(Oops, wrong link for coding style, meant to link code-review Checking if a number is prime in NASM Win64 Assembly) — Peter Cordes 38 secs ago
7 hours later…
7:36 AM
Q: Can I lessen the use of boolean flag variables in this snippet?

Mukul KumarBelow snippet is part of a game application's logic and the Update function is called every frame (about 60 times a second). void Update() { handleInputEvents(); if (bShow == true) { if (bOnce) { button.show(true); bOnce = false; ...

8:01 AM
Q: Counting unfair semaphore implementation in Java

vvs14I am implementing Java's Counting Semaphore's acquire() and release() methods and using it in a multi-producer-consumer problem. Semaphore class public class SemaphoreWithLock { private int currentPermits; public SemaphoreWithLock(int initialPermits) { this.currentPermits = initi...

8:59 AM
@RMunroe Randall is secretly Dutch.
9:40 AM
10:28 AM
If your code works then this is not the correct site to ask for "neatification". Please check codereview.stackexchange.com/tourSteve 51 secs ago
"I don't think it's good enough" - why? What are the problems you have with your current (working?) code? If you simply want to improve the code quality, then you may want to look over at Code Review, but if there are problems with your code you need to share those with us so that we can offer practicable answers. — David Thomas just now
11:23 AM
Q: Rust implementation of fibers

RalenderI am still new to rust, so any comment about what is the rust way of doing things is welcome. this is a hand-rolled implementation of fibers or user-land context-switching. #![feature(allocator_api)] #![feature(lazy_cell)] use std::{ alloc::{Allocator, Global, Layout}, arch::global_asm, sy...

Q: Find basic logic/conceptual holes in this Matrix Decomposition

MinskyWithout reading other algorithms, I tried to implement a very basic LuDecomposition. This is the problem, thought process and steps: Given a matrix A, decompose it in the lower triangular L and the upper triangular U For now, the algorithm shouldn't care about $0$s in the pivot positions. The pi...

Q: Is there a way to shorten up this code to make it neater?

user22619516I plan to use a raycast for interacting with all things in my games but Im afraid itll be too laggy how can I shorten this code up? using System.Collections; using System.Collections.Generic; using UnityEngine; public class StoreClerkOpen : MonoBehaviour { // Start is called before the first...

11:48 AM
Q: Minimize payment algorithm

mascaiI was solving the following task: There is a vector of people's ratings. You have to distribute money between people, observing the following conditions: • Payment is a multiple of 500. • Min payments is 500 • Person with a higher rating should receive a larger bonus amount than his neighbors to ...

12:45 PM
Code Review is usually done on a different page. — cafce25 18 secs ago
1 hour later…
1:54 PM
Q: Executing a Method Twice Concurrently for the Same Object

ohxdMAGsDCiCJQ1: considering the code below: Is there something wrong with this approach where the protocol object is shared between peers, and each peer runs the object's run method and keep it running? Q2: Regarding the protocol list type, it's of type Arc, and the protocol inside the list is also of type A...

3 hours later…
4:50 PM
Q: Banking System in C++ [V2]

Guythis is the second version of my BankingSystem in C++ for the first one go here: Banking System console app in C++ I did quite a lot of changes since the last version mainly spliting the User class into Account, Customer and Transaction classes as suggested by @SimonLehman so lets get into the co...

5:16 PM
Questions of design and style are off-topic on StackOverflow. Please post your question to codereview.stackexchange.com instead. — kmdreko 36 secs ago
So again: does your current code achieve what you want? Because if so, Stack Overflow isn't really the right site for it. You might be better off on codereview.stackexchange.com, but I think you'll need a more concrete description of what you're trying to improve. — Jon Skeet 22 secs ago
2 hours later…
7:46 PM
Q: Find character at given index in a sorted sub strings

technotigrFor a given string say dbac the possible substrings are [d,db,dba,dbac,b,ba,bac,a,ac] . Sort them and concatenate to a string: aacbbabaccddbdbadbac. Find the character at index m=2 , so the answer is c Here is my code: public char solve(String s, int m) { int n = s.length(); List<String> ...

2 hours later…
10:17 PM
Q: Java : How to keep our Models(POJOs) flexible to introduce new members in future?

SRJI have this interface in Java Interface @FunctionalInterface public interface DataParser { Details parse(Request request, Storage storage, Metadata metadata); default List<String> page(Request request, Storage storage, Metadata metadata) { return ParserUtils.getNames.apply(getBlob...

Q: Defining hardware components structure

Dead1nsideI'm writing firmware for my Arduino project, and I'm struggling with a clean, scalable hardware mapping structure. Initially, I had the following namespace: namespace Motherboard { extern DRV8825 xAxisMotor; extern MP6500 yAxisMotor; extern DRV8876 zAxisMotor; extern ClickEncoder encoder; extern...

1 hour later…
11:32 PM
Q: Anchor Tag with Prevented Default Behavior Not Executing Ajax Call

Muhammad UshayI'm encountering a peculiar issue within Haml views where a clickable image is configured within an anchor tag. The desired behavior is to execute an Ajax call when the image "Button" is clicked. However, despite various attempts, including using javascript:void(0) and href='', to prevent the anc...


« first day (3794 days earlier)      last day (79 days later) »