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
Filter by
Sorted by
Tagged with
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: ...
JayTee's user avatar
  • 141
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'...
Quuxplusone's user avatar
  • 19.3k
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 ...
Martin York's user avatar
  • 94.3k
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 ...
rsjaffe's user avatar
  • 253
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 ...
shane's user avatar
  • 171
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, ...
HugoRune's user avatar
  • 339
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 ...
Icepickle's user avatar
  • 825
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) ...
Shelby115's user avatar
  • 1,961
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. ...
Vistor's user avatar
  • 43
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 ...
user137717's user avatar
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 ...
TomasLife's user avatar
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 ...
FJTAIL's user avatar
  • 11
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 ...
Al G Johnston's user avatar
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 ...
ngr's user avatar
  • 125
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 ...
darcher's user avatar
  • 714
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 ...
sfanjoy's user avatar
  • 233
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 ...
user1032531's user avatar