Newest Questions

1 vote
0 answers
31 views

Identifies connected elements and faces in FE mesh

So I'm conscious that this is a weak appeal for best practices. I'm building a converter that moves generic FE meshes to an inhouse edge format in Fortran and at some point I made a truly diabolical ...
Subject303's user avatar
3 votes
1 answer
105 views

Flutter class extends StatefulWidget and Riverpod extends ConsumerStatefulWidget

I've noticed a difference between the auto-complete code from VS Code using Flutter and the code shown in the Riverpod documentation. Auto-complete code in VS Code using Flutter. If I do this and ...
DevQt's user avatar
  • 185
3 votes
1 answer
59 views

The Routh-Hurwitz criterion in Mathematica implementation

The Routh-Hurwitz criterion is a mathematical test that provides conditions for the stability of a system by analyzing the signs of the determinants of specific matrices derived from the system's ...
user avatar
9 votes
2 answers
954 views

A simple C++ function converting the environment variables in main() to an unordered_map

I had this program: ...
coderodde's user avatar
  • 30.2k
2 votes
2 answers
95 views

repllib.java - a tiny Java library for implementing simple REPL (Read, Evaluate, Print, Loop) programs

I have this GitHub repository - repllib.java. Basically, it's a simple class library for coding REPL functionality with simple format. A typical session may look like this: ...
coderodde's user avatar
  • 30.2k
2 votes
0 answers
72 views

compile time, but Not inlined function in C and C++

We have a graphics library for the Ti84CE, which uses the 24bit eZ80. It has a 16bit 1555 screen, so we have a gfx_Darken function that will darken a 16bit 1555 ...
Vortex 2728182818's user avatar
0 votes
0 answers
60 views

Seeking Suggestions for Improving My Program.cs File for a .NET Project

I use this code as reference for when I start working on a new project whether that be for personal or for work. It's worked fine so far, but I'm wondering if anyone can read it and provide any ...
sammy medawar's user avatar
5 votes
2 answers
768 views

Trying out templates in C++ to build a simple calculator

I just started some time ago with C++, and now I wanted to play around a bit with templates. I made a simple calculator that is decent working now. It was a bit of hard way for me to get there because ...
Cats's user avatar
  • 151
7 votes
2 answers
944 views

Desperately seeking a hashing function

A recent CR exchange led me to dust off and adapt some code I'd written a few years ago. Long, long ago, when core meant ferro-magnetic memory cells, I spent an hour formulating a "simple" ...
Fe2O3's user avatar
  • 4,686
3 votes
0 answers
45 views

React section toggle with single active panel

I’ve built a working animated panel menu in React using Framer Motion. Only one section expands at a time, making the animation smooth and visually clean. However, I’d like help improving or ...
MegaRapidz's user avatar
2 votes
0 answers
78 views

backward induction algorithm computation

Is there a way to significantly speed-up this code? I'm solving a dynamic programming model using a backward induction algorithm. A crucial step is to calculate the current-period value function (VF), ...
manifold's user avatar
  • 121
5 votes
3 answers
1k views

Arcane algorithm to find a keyword in a lookup table

This code is supposed to efficiently return the index+1 of a matching keyword from a lookup table of up to 31 keywords ...or 0 if the keyword is not found. The line ...
George Robinson's user avatar
3 votes
1 answer
90 views

Wait for results/failure of an unreliable async operation

Abstract Problem The basic problem is that of producer/consumer. Wait for an async Producer to [produce an item] or [fail], together with a timeout on the consumer side. Using Java's ...
JayC667's user avatar
  • 131
4 votes
1 answer
487 views

Find a keyword in a lookup table

This code is supposed to efficiently return the index of a matching keyword from a lookup table or 0xF if the keyword is not found. The line is a zero-terminated ...
George Robinson's user avatar
4 votes
1 answer
192 views

Implementing Dependency Injection into a JavaFX CRUD Application

As a learning exercise and potential portfolio piece, I decided to create a Java/JavaFX application with MySQL integration. I used dependency injection because it seemed like the cleanest way to pass ...
user3605767's user avatar

15 30 50 per page