I am downloading files through IFRAME method described here:
http://encosia.com/2007/02/23/ajax-file-downloads-and-iframes/
And am showing progress in a div and hiding this div on load completion:
$(objIframe).load(function() {
$("#spinner").hide();
});
The trouble is, this callback function is never called in Internet Explorer ...
I called takePicture() and pass it a PictureCallback as a JpegPictureCallback. I'm seeing byte[] data input varies in size within onPictureTaken(). Can someone explain why this byte[]'s content size varies? I'm already setting picture size to a constant size with Camera.Parameters.setPictureSize();
Thanks!
...
I have a few functions like this:
$(this).find('.subnav').fadeIn(200, buttonHide );
Now, buttonHide, in this case, is a function I've declared elsewhere. Once the 200ms fadeIn is complete, I want to call that function.
Great. Works in FF and Safari. In IE, though, it returns an error as undefined. In fact, I experienced the SAME prob...
I have some models all linked together in memory (parent:child:child:child) and saved at the same time by saving the top-most parent. This works fine.
I'd like to tap into the after_create callback of one of the children to populate a changelog table. One of the attributes I need to copy/push into the changelog table is the child's f...
Hey guys,
I have the following classes:
class Vigil < ActiveRecord::Base
after_update :do_something_cool
private
def do_something_cool
# Sweet code here
end
end
class NewsFeedObserver < ActionController::Caching::Sweeper
observe Vigil
def after_update
# Create a news feed entry
end
end
Everything works ...
I'm trying to use the following code to make an image fadeOut and, only when it's faded out, change its source, and then make it fadeIn again:
$('.liitem').click(function() {
$('#imagen').fadeOut('slow', function() {
var rutaimagen = $(this).find('a').attr("href");
$('#imagen').attr("src",rutaimagen).load(function(){
$('#im...
I send GET data with AJAX to another file.And on the another file I have echo "<script>alert('Something');</script>";.This is displayed dynamicly with AJAX ,i.e
var ajaxDisplay = document.getElementById('edit');
ajaxDisplay.innerHTML = ajaxRequest.responseText;
puts the <script>alert('Something');</script> to div with name edit.
But ...
Hi,
I am using a c++ library using callback to inform about the progress of an operation.
Everything is working fine except this:
I need to have a function in my controller to be use as a c++ callback function.
I've tried a lot of things but none of them are working.
Do you know how we can manage this kind of thing?
Thanks :)
...
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 can take time depending on size and number of files sent to the service.
(1) The module that is sending a request to this service waits until the files are processed. I want to know if there is a way to...
I was trying to declare a callback function in class and then somewhere i read the function needs to be static but It didn't explain why?
#include <iostream>
using std::cout;
using std::endl;
class Test
{
public:
Test() {}
void my_func(void (*f)())
{
cout << "In My Function" << endl;
f(); //Invoke callback ...
Hello all,
This is a question about generic c++ event driven applications design.
Lets assume that we have two threads, a "Dispatcher" (or "Engine"...) and a "Listener" (or "Client"...).
Let's assume that I write the Dispatcher code, and release it as a library. I also write the Listener interface, of course.
When the Dispatcher execut...
Hi guys i have a bit of a problem with a few classes, and i would be very grateful if someone can help me out. So i have:
Already compiled executable (for
whom i don't have the source)
A class in that program that i want to call
The program doesn't have export for the class, and that's my problem i don't have definition for this clas...
I am using the jQuery $.ajax() function. I have put this into a parent function, which passes some values into the ajax function. What I would like to do, is have a user defined callback function, which gets the data param passed in from the ajax success function.
Here is what I was thinking would work, but it is not:
testFunc = func...
I have a process where a user puts in a comma delimited list that is then processed one item at a time. I want to be able to indicate to the user that it is processing and let them know when it is done. So I used the curtain idea from Borgar's replay to ... Div Over Page.
This worked but the curtain disappears well before the process is ...
Hello
Is it possible to use salted password along with standard HTTP authentication schemes ( FORM or DIGEST ) ?
I am using GlassFish, and when I request a protected page, the form or the answer with the nonce are sent back directly by the server. I can't see any obvious way to hook into the server mechanism to insert the salt in the 3...
I'm in the process of writing a C# wrapper for Dallmeier Common API light (Camera & Surviellance systems) and I've never written a wrapper before, but I have used the Canon EDSDK C# wrapper. So I'm using the Canon wrapper as a guide to writing the Dallmeier wrapper.
I'm currently having issues with wrapping a callback. In the API manual...
Here is the code in C++ dll:
extern "C" _declspec(dllexport) int testDelegate(int (*addFunction)(int, int), int a, int b)
{
int res = addFunction(a, b);
return res;
}
and here is the code in C#:
public delegate int AddIntegersDelegate(int number1, int number2);
public static int AddIntegers(int a, int b)
{
return a + b;
}
...
Hello
I have a loop created with each, check this example:
$('.foo').each(function(i){
//do stuff
});
Is there any possibility to run a functions when this loop has ended? Couldn't find it on docs or Google.
I can make it work without this kind of solution, but it's always good to search for and use the simpliest methods.
Martti ...
Hello,
Not sure if I am doing this correctly or not.
Here is my JS:
var currentIMG;
$( '.leftMenuProductButton' ).hover (
function () {
currentIMG = $("#swapImg").attr("src");
var swapIMG = $(this).next(".menuPopup").attr("id");
$("#swapImg").css("opacity", 0).attr...
I'm trying to write a macro to make a specific usage of callbacks in C++ easier. All my callbacks are member functions and will take this as first argument and a second one whose type inherits from a common base class.
The usual way to go is:
register_callback(boost::bind(&my_class::member_function, this, _1));
I'd love to write:
re...