Skip to main content

All Questions

3 votes
1 answer
92 views

Simple C++ event loop - static vs dynamic dispatch performance

I have two extremely simple toy implementations of an event loop, and would like to understand the performance differences between them. First impl - events with a virtual 'handle' method - dynamic ...
Jnuk's user avatar
  • 33
5 votes
3 answers
2k views

C# Event Manager without allocations

I'm using my own Action-based Event Manager for a while and looking for ways to improve it. Mainly it's used in game development, where excessive garbage generation can lead to severe consequences. ...
Xamtos's user avatar
  • 370
12 votes
1 answer
468 views

Resizable containers with VueJS

A month ago I reviewed the code in Resizable split DIVs Vue.js, suggesting that the OP use computed properties and bound styles to simplify the code (at least reducing the need to use ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
5 votes
1 answer
320 views

Mouse control of a camera in an OpenGL program

Introduction I'm doing an OpenGL program in C. As of now I'm working on the 3D camera system and got the control right. Now I'm working on the mouse control. It works, but I have used two different ...
Cewein's user avatar
  • 153
4 votes
2 answers
26k views

onChange vs onKeyPress for input in React

I have an input form, and when you press enter I want it to call a function. I was wondering what "the right" way of doing this is. Right now I have an input looking like this: ...
MrJalapeno's user avatar
4 votes
1 answer
83 views

Which mouseover handler is better?

I'm currently learning some jQuery and I am stuck on something. On a small exercise I did, I was asked to perform an action when you mouseover a div class. I gave a different solution than the one ...
user3465843's user avatar
5 votes
1 answer
355 views

Two keyboard handlers for a video game character

The code below is equivalent. I can see pros and cons for both versions. Which is better: the short, clever way, or the long, ctrl+c way? Short version: ...
MaiaVictor's user avatar
  • 1,101