tagged [callback]

Determine what attributes were changed in Rails after_save callback?

Determine what attributes were changed in Rails after_save callback? I'm setting up an after_save callback in my model observer to send a notification only if the model's attribute was changed from fa...

Observable for a callback in Rx

Observable for a callback in Rx I'm looking for an elegant way to create an `Observable` from a plain callback delegate with Rx, something similar to [Observable.FromEventPattern](http://msdn.microsof...

WCF Callback Channel gets disposed prematurely?

WCF Callback Channel gets disposed prematurely? My application is using the net.tcp WCF service with a callback channel. For some reason I'm not able to send callbacks on event. Here's what I'm doing ...

15 May at 00:0

How to Define Callbacks in Android?

How to Define Callbacks in Android? During the most recent Google IO, there was a presentation about implementing restful client applications. Unfortunately, it was only a high level discussion with n...

31 May at 01:11

nodejs - first argument must be a string or Buffer - when using response.write with http.request

nodejs - first argument must be a string or Buffer - when using response.write with http.request I'm simply trying to create a node server that outputs the HTTP status of a given URL. When I try to fl...

12 Feb at 15:9

Defining TypeScript callback type

Defining TypeScript callback type I've got the following class in TypeScript: I am using the class like this: The code works, so it

30 Oct at 10:46

How should I call 3 functions in order to execute them one after the other?

How should I call 3 functions in order to execute them one after the other? If I need call this functions one after other, I know in jQuery I could do something like: ``` $('#art1').animate({'width':'...

(How) is it possible to bind/rebind a method to work with a delegate of a different signature?

(How) is it possible to bind/rebind a method to work with a delegate of a different signature? I'm a c++ developer having used signals & slots in c++ which to me seems to be analogous to delegates in ...

Rails: #update_attribute vs #update_attributes

Rails: #update_attribute vs #update_attributes Both of these will update an object without having to explicitly tell ActiveRecord to update. Rails API says: > update_attributeUpdates a single attribut...

What steps do I need to take to use WCF Callbacks?

What steps do I need to take to use WCF Callbacks? I am trying to learn WCF. I have a simple client and server application setup and upon pressing a button on the client, it gets an updated value from...

10 Feb at 05:47

Stopping timer in its callback method

Stopping timer in its callback method I have a System.Threading.Timer that calls its appropriate event handler (callback) every . The method itself is and can sometimes take . Thus, I want to stop the...

9 Nov at 07:31

WCF Windows Service - Long operations/Callback to calling module

WCF Windows Service - Long operations/Callback to calling module I have a Windows Service that takes the name of a bunch of files and do operations on them (zip/unzip, updating db etc). The operations...

8 Mar at 09:16

How to refactor Node.js code that uses fs.readFileSync() into using fs.readFile()?

How to refactor Node.js code that uses fs.readFileSync() into using fs.readFile()? I'm trying to get my head around synchronous versus asynchronous in Node.js, in particular for reading an HTML file. ...

22 Jul at 04:47

Passing a C# callback function through Interop/pinvoke

Passing a C# callback function through Interop/pinvoke I am writing a C# application which uses Interop services to access functions in a native C++ DLL. I am already using about 10 different function...

1 Nov at 17:11

Java executors: how to be notified, without blocking, when a task completes?

Java executors: how to be notified, without blocking, when a task completes? Say I have a queue full of tasks which I need to submit to an executor service. I want them processed one at a time. The si...

5 May at 18:18

Bypass popup blocker on window.open when JQuery event.preventDefault() is set

Bypass popup blocker on window.open when JQuery event.preventDefault() is set I want to show a JQuery dialog conditionally on click event of an hyperlink . I have a requirement like on condition1 open...

Multithreading for callback function in C++

Multithreading for callback function in C++ Im implementing a chat application using Jabber/XMPP and gloox framework which should send and receive messages concurrently in Ubuntu Linux. My current cod...

4 Jan at 14:55

Where to define callback for Task based asynchronous method

Where to define callback for Task based asynchronous method Following [this question](https://stackoverflow.com/questions/8240316/advantages-of-using-standard-net-async-patterns), I am trying to imple...

How to force Sequential Javascript Execution?

How to force Sequential Javascript Execution? I've only found rather complicated answers involving classes, event handlers and callbacks (which seem to me to be a somewhat sledgehammer approach). I th...

Callback to update GUI after asynchronous ServiceStack web service call

Callback to update GUI after asynchronous ServiceStack web service call I need to refresh a `ListBox` in my GUI once the asynchronous call to a web service has successfully returned. It is not so simp...

15 Nov at 21:44

C++ callback using class member

C++ callback using class member I know this has been asked so many times, and because of that it's difficult to dig through the cruft and find a simple example of what works. I've got this, it's simpl...

9 Dec at 04:28

C# delegate for C++ callback

C# delegate for C++ callback I think I have basically understood how to write c# delegates for callbacks, but this one is confusing me. The c++ definition is as follows: and my c# approach would be: A...

30 Nov at 12:33

Executing async code on update of state with react-hooks

Executing async code on update of state with react-hooks I have something like: ``` const [loading, setLoading] = useState(false); ... setLoading(true); doSomething(); //

How to reference an event in C#

How to reference an event in C# I have the following class, which has one public event called `LengthChanged`: ``` class Dimension { public int Length { get { return this.length; ...

Pass variable to function in jquery AJAX success callback

Pass variable to function in jquery AJAX success callback I am trying to preload some images with a jQuery AJAX call, but am having real problems passing a (url) string into a function within the succ...

14 Apr at 02:4