I have a set of custom PHP scripts. They load a main PHP file (to include other files, set settings, etc.) From this script I'd like to insert a callback function that is called by the scripts that included the main file just before ending.
What I intend to do is make a simple custom output cache with ob_get_contents(). I want to do ob_...
For example,
http://www.php.net/manual/en/function.preg-replace-callback.php
<?php
// this text was used in 2002
// we want to get this up to date for 2003
$text = "April fools day is 04/01/2002\n";
$text.= "Last christmas was 12/24/2001\n";
// the callback function
function next_year($matches)
{
// as usual: $matches[0] is the complet...
Hello,
We have a windows service in C++/ MFC which has to carry out a number of tasks on the host workstation some of which may be long running and may fail a few times before they are completed. Each task will only need to be completed once and sequentially.
I was of thinking of some form of callback initially to retry the failed ...
Hello, I can't call callback after animation ends. Here is my animation function:
function animate( parentElement, callback )
{
parentElement.animate({
"height" : "hide", "opacity" : 0.0
}, { duration : "slow"}, "linear", callback);
}
And here is calling it:
animate( $(this).parent(), function() { alert('...
Well, it looks like IE8 in native mode doesn't like ASP.NET event wiring. I have few heavy pages developed in ASP.NET 2.0. By heavy I mean having lots of server controls and callback controls. The final actions are Apply and Cancel but user sets data of controls through Callback calls.
I have seen that when Apply button is clicked it ca...
I have a plugin for a c++ MFC app. I'm working with the developer of another plugin for the same app, that's trying to get notifications of events in my code. Both plugins are in the form of c++ dlls.
How can I pass messages from my plugin to his plugin? The solution needs to be robust to mismatched versions of our two plugins, as we...
Hello.
I am trying to do a very simple command line library for interactive Java programs. You start the Java program and it prompts you for commands. The syntax is:
> action [object_1, [object_2, [... object_n] ... ]]
for example:
> addUser name "John Doe" age 42
Here action = "addUser", object_1 = "name", object_2 = "John Doe", ...
Hey,
i thought about using observers or callbacks.
What and when you should use an observer?
F.e. you could do following:
# User-model
class User << AR
after_create :send_greeting!
def send_greeting!
UserNotifier.deliver_greeting_message(self)
end
end
#observer
class UserNotifier << AR
def greeting_message(user)
...
...
Guys...! I'm a complete newbie to this area of audio/video formats/codecs, their players, their exposed APIs, etc. Would greatly appreciate your patience as well as advice on this question of mine.
Question: Almost all audio/video players show time-passage information in hh:mm:ss format. I want to be able to register a callback of mine ...
ok, so what i'm trying to do is a plugin that returns a jquery array to be used in a callback function.
let's say that i have this code``
(function($){
$.fn.extend({
//plugin name
myPlugin : function(needed){
var defaults = {
path : 'action.php',
source : ''
}
var needed = $.extend(defaults,needed);
//return
return...
Hi there,
thank you for taking the time to read my question.
I have significantly rephrased my question after some new findings.
My problem is that in my ajax callback, when I set the context of my query to be the returned html of my ajax call, it cannot find any elements.
Some findings:
The problem never occurs in Firefox
The pro...
Hello,
I have a problem within this code.
I want to choose whether I will submit the
form or not based on the outcome off the ajaxcall.
If I hardcode it with return false; It stops going to the paypal site.
That's why I want it to depend on a variable set in the ajax succes function.
It is probably lost in the callback, so that's wh...
Hi,
I'm trying to implement a reconnect logic for a wcf client. I'm aware that you have to create a new channel after the current channel entered the faulted state. I did this in a channel faulted event handler:
internal class ServiceClient : DuplexClientBase, IServiceClient
{
public ServiceClient(ICallback callback, EndpointAddress...
I'm using this plugin: http://www.fyneworks.com/jquery/star-rating/
Is it possible to put a click function inside a callback function like this?
$('.auto-submit-star').rating({
callback: function(value, link){
$('.myclass').click(function(){
alert($(this).attr('id'));
});
alert($(this).attr('id'));
}
});
The ...
I'm writing an Http Request without the use of a library (another script was having conflits...)
But Im having trouble with the scope of my object. Below is the calling script, then the Ajax_Request object follows.
function loadCard(e) {
var element = e.target;
if($('overlay')) {
return false; //something is already over the layout
}
...
for(var i=0; i<barValues.length; i++) {
actualBarHeight = Math.floor((barValues[i]/chartMaxY)*barchartHeight);
var barChartID = "#barChart" + (i+1)
$(barChartID + " .value span").css('background-color','transparent');
$(barChartID + " img").animate({
height: actualBarHeight
}, 500, function(){$(barChartID + " .value span...
I need to write a class that allows a subclass to set an attribute with the name of a function. That function must then be callable from instances of the class.
For example, I say I need to write a Fruit class where the subclass can pass in a welcome message. The Fruit class must expose an attribute print_callback that can be set.
cla...
Hi
I used Spring's HibernateTemplate to save entity, I also add call back method like this
@PrePersist
public void prePersist() {
setCreateDate(new Date());
}
but I found this callback annotation was not called when I called saveOrUpdate() method.
public void persist(Object entity) {
hibernateDaoSupport.getHibernateTemp...
Is it possible to transmit a callback via remoting? I'd like to do something along the lines of myRemoteObject.PerformStuff( x => Console.WriteLine(x) );
If not, how would I implement a equivalent functionality?
Edit: I'm aware Remoting got superseded by WCF, but I'm still interested in this specific case. (Out of curiosity though, how...
The following example works, but how can I change it so that instead of executing the anonymous method, it executes my existing callback method OnCreateOfferComplete()?
using System;
namespace TestCallBack89393
{
class Program
{
static void Main(string[] args)
{
OfferManager offerManager = new OfferM...