Newest Questions
77,604 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 ...
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 ...
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 ...
9
votes
2
answers
954
views
A simple C++ function converting the environment variables in main() to an unordered_map
I had this program:
...
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:
...
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 ...
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 ...
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 ...
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" ...
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 ...
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), ...
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 ...
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 ...
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 ...
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 ...