Questions tagged [callback]
Callback is facility to save a piece of code so that it may be invoked later in the current environment (Typically in response to an event)
17
questions with no upvoted or accepted answers
4
votes
0
answers
935
views
Aysnc call back to UI Thread
My main DLL is a .Net one that has an async running method and fires an event when it's done:
...
3
votes
0
answers
570
views
C++ regex_replace with arbitrary function
This is a version of C++17 regex_replace that handles arbitrary functions to do the replacement, instead of using regex_replace'...
3
votes
0
answers
58
views
Nisse Server: Part 5 Handler
Getting close to a release of generic server.
Nisse Server: Part 1 Helper Functions
Nisse Server: Part 2 Socket Layer
Nisse Server: Part 3 Stream Layer
Nisse Server: Part 4 Server
As I mentioned ...
3
votes
0
answers
279
views
Simple C++11 Subject-Observer
Building on the answer in C++ class member callback simple examples, I've tried to put together a simple subject-observer pattern without needing to inherit a virtual Observer class. I also wanted to ...
3
votes
0
answers
1k
views
C++ UDP server for a game
I broke my server into two classes, a general server class and a client session class.
I know the code isn't documented in the header, but I am more interested in the design of the server/session ...
3
votes
1
answer
180
views
TimeoutManager: check whether a task has been finished within a given time
I want to make a helper class, which raises an event whenever something is not finished in a certain time.
Example: my program sends out multiple network messages concurrently. After a random delay, ...
2
votes
0
answers
29
views
Customizable unidirectional questionaire in javascript
I wrote the below answer for the following question on SO a couple of days ago, and I was curious if the usage of the generator function is an acceptable one.
I choose the generator function, because ...
2
votes
0
answers
25
views
UI Event Flow class
Purpose:
I wanted a way to improve event clarity and event code organization. I
observed that every single event flow went through the following
steps:
Trigger -> UI Change -> (Async) ...
2
votes
0
answers
60
views
Controller to execute AJAX requests for a client
I have been developing this structure or pattern (I don't really know how to call it). It's my first time doing something like this, and I'm a bit worried about the future, if it becomes unmanageable.
...
2
votes
0
answers
601
views
Saving parsed CSV data to MongoDB
I wrote a script for reading a CSV, parsing it and saving data to MongoDB. I would love some input on how I'm handling errors and dealing with callbacks. I wrote it with nested without using async and ...
2
votes
1
answer
225
views
HMAC Middleware
I have been programming a middleware for my small application that verifies if an authentication header is present and verifies the HMAC present in it. I would like to know what I could optimize in ...
1
vote
0
answers
1k
views
Add to Favourite List example - working but with performance issues
I am building a small framework for e-commerce or blog app using React.
One of the features of this framework is an "Add to Favourite List" function.
The ...
1
vote
0
answers
71
views
AIPlaylist: Adaptive media player using VLCJ and Swing
I created a project using VLCJ and a probability function to create a media player that plays your favorite media more often than the others, because I wanted to hear my favorite music and videos more ...
1
vote
0
answers
75
views
React.js hook to validate a form on submission
I am fooling around with hooks in React and I'm stumbling against decisions that I need to make regarding implementation. Below is the code for the custom useForm hook which can be used to hook up ...
1
vote
0
answers
25
views
Creating a reusable plugin (Dialog/Notifier as example)
I started working on a notification system that is pluggable into any project. I have not made any "plugin" type javascript libraries, usually just functions very specific to the project at hand. That ...
1
vote
0
answers
71
views
C# asynchronous notification vector v2
As a result of my previous post, I have implemented / refactored my code and have started making successful use of my class. However I have come across a couple of new questions:
The observer must ...
1
vote
0
answers
1k
views
TinyMCE plugin to save with cancel button
Please provide constructive criticism for this TinyMCE plugin which allows the user to save the content, or cancel and go back to the original.
JS Bin
...