Is it possibly to do things asynchronously in javascript (AJAX aside)? For example, to iterate multiple arrays at the same time. How is it done? A brief example would be nice. Searching for this was hard, due to all the ajax pollution, which is not what I am looking for.
Thanks in advance.
...
I've been trying to get basic async HTTP calls to work in my app.
I've tried using some code in my app from the Rails 3 async stack demo: http://github.com/igrigorik/async-rails, but I'm getting "can't yield from root fiber" and I have no idea where to go from here. Here's the top of my trace:
(eval):10:in `yield'
(eval):10:in `get'
a...
I have a receive callback from an async client method that is supposed to call socket.BeginReceive internally to check if data is done being sent. The code is as follows:
private void ReceiveCallback(IAsyncResult ar)
{
try
{
StateObject state = (StateObject)ar.AsyncState;
Socket client = s...
I usually try to encapsulate my web service calls in my client side apps.
Rather than doing this:
public Guid FindUserIDSelected(string userName)
{
MyWebServiceReference service = new MyWebServiceReference(GetEndpointBasedOnEnv(Env));
return service.GetUserIDFromName(userName);
}
I have a static class that encapsulates the co...
Hello
My code has a function (F1) to return YES/NO based on information read from server. So it uses async nsurlconnection to receive data.
So F1 starts connection and MUST wait for data to be loaded
The question is how can i implement it?
thanks
...
Not a framework or anything, which AFAICS always carries with it a shipload of extraneous, irrelevant (from my POV) support code. I'm just looking for a couple hundred lines of bulletproof JS that correctly implements multiple simultaneous AJAX requests; error handling; and callbacks into my code.
Thanks!
-- pete
...
This code should produce even and uneven output because there is no synchronized on any methods. Yet the output on my JVM is always even. I am really confused as this example comes straight out of Doug Lea.
public class TestMethod implements Runnable {
private int index = 0;
public void testThisMethod() {
index++;
...
I'm trying to wrap my head around asynchronous calling of methods.
public IDictionary<string, int> DoSomething(string startsWith)
{
return new Dictionary<string, int>();
}
public IAsyncResult BeginDoSomething(string startsWith, AsyncCallback callback,
object state)
{
return new Func<string, ...
I have a Silverlight 3 application which needs to call WCF service. The WCF service in turn calls an ASMX web service. When the WCF service call completes, the silverlight UI needs to be updated.
WCF is being called in async.
The thing is that the Silverlight app needs to call the WCF method(which later calls asmx internally) hundreds ...
When using asynchronous code to read from streams etc using the BeginXXX / EndXXX pattern, I believe that any exceptions that occur during the process will be thrown when the call to EndXXX is made.
Does this mean that the initial call to BeginXXX will never throw an exception, it will always be thrown by EndXXX?
Or to put it another w...
I found there are a lot of articles comparing Nginx and Apache in Internet. However, all these comparisons are based on stress test to web server running PHP code. I suppose this is mainly due to Apache is generally deployed with PHP as LAMP architecture.
In my understanding, Nginx is created to solve C10K problem with event-based arc...
Working with a listbox in windows phone 7 I am trying to make an async web service call then update the listbox on success.
The method that calls the webservice looks like this:
public void GetReadingList(Action<ObservableCollection<MiniStoryViewModel>> success, Action<string> failure)
I am calling the method with this code:
...
I have read about executing asynchronous operations and i found that it can be done at the SQL command executions side(that is handled during executing SQL command by adding wait handle that waits for AsynchResult) or from the UI execution side(which is done by using delegate that points to a method then begin invoke methods asynchronous...
hi all
anybody knows if its possible to retrieve some error info (like getsockopt SO_ERROR in C) if an async connect like the following fails
btw: im not using the socket extension cause streams provide an ssl wrapper
<?php
$ctx = stream_context_create();
stream_context_set_params($ctx, array("notification" => "stream_notification_call...
Hello,
I am working on an WPF application that uses a BusinessLogic layer (currently a single dll) in which I created my BL methods that will be called directly from the UI. Each BL manager is resolved with Unity (thinking on switching to MEF though...). BL classes implements a specific interface that have of course apropriate methods. ...
I have a question about hibernate. I use different controls in my application (treeview, combobox, ...). I get the content for these controls through nhibernate. The problem is, that it takes a lot of time to get the data. Drung this time the form is frozen.
I want to load the data in another thread. But i don't know where to put that t...
Hi there,
I have problem with Google Chrome or rather Androids (2.1) webbrowser.
My webapp calls restservices with each page shift. This takes some time and I need a feedback for the user like a little "working..." popup . The restservices are called with a sync ajax request. Here is an example:
$.ajax({
url: some URI,
async...
I've got an application set up with RIA Services, Entity Framework 4, and Silverlight 4. It is set up in the fashion prescribed on MSDN here: Walkthrough: Creating a RIA Services Solution
On the client side, this code loads the customer entities into a grid's ItemsSource:
public MainPage()
{
InitializeComponent();
...
We are writing a simple application:
build thousands of SQL select statements
run each select using BeginExecuteReader
put the results into another database
We've tried a few things that either leave connections in a SUSPENDED state (as verified by sp_who2), or take a much longer time to complete than just the SQL query itself (mayb...
I have a php script that sends SMS, the problem is that it takes some time before every SMS is sent. In my site the page will wait until this script has finished running. How can I give user a message that SMS will be sent and resume the site's normal operation.
...