Hi guys,
I am creating a FlippingBook Silverlight application and I have run into a snag that I cannot seem to solve.
The problem is with Asyncrously loaded Images. I have written a class that loads an image from a webaddress and stores it in a BitmapImage object.
I bind to this image object to the Image Source on the silverlight imag...
Here's the gist:
I have a call I want to make in asp, and I do not care about the response. I just want to fire the call and I do not want the page to wait for the response. According to the documentation, it should look something like this:
dim xmlhttp : set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST", ur...
I'm unsure as to what is the best approach for passing events down the line to parent classes and in need of some feedback.
The example code below tries to illustrate what I want to achieve.
namespace test {
public delegate void TestCompletedEventHandler(object sender,
TestCompletedEventArgs e);
public class Manager {
...
This code only works when async is set to false, why?
var contact =
{
XMLHttp : null,
XMLDoc : null,
TXTDoc : null,
getData : function(dataSource)
{
contact.XMLHttp = new XMLHttpRequest();
contact.XMLHttp.open("GET", dataSource, false);
contact.XMLHttp.onreadystatechange = contact.storeData;
contact.XMLHttp.send(null);
}...
I have a bunch of unit tests that work on a class which executes some tasks asynchronously. Currently I set up the class, then execute the function in question. I then go into a blocking wait until the execution is completed, then test the data I need to. Is there a better way that I can do this?
So far my tests look similar to this:
...
Hello,
it seems to me that ever since a recent upgrade to the latest XCode, some behavior changed.
What Used to Be:
Whenever I did a "Build and Run", XCode would ask me to save changes to the opened and changed documents in Interface Builder that belong to that project.
Now:
No questions asked, open IB docs are not saved, and the new...
How can you block until an asynchronous event completes?
Here is a way to block until the event is called by setting a flag in the event handler and polling the flag:
private object DoAsynchronousCallSynchronously()
{
int completed = 0;
AsynchronousObject obj = new AsynchronousObject();
obj.OnCompletedCallback += delegate {...
One of library I am working on, requires support of asynchronous operations. This library communicates with external devices using serial port (RS232) which can be quiet slow.
I went through many MSDN articles but I am not feeling confident. I think if you are 100% sure that your multi-threaded application is thread-safe, then it might ...
I am instantiating/using the gridview only programmatically ie code behind only.
Also, the grid is bound to a datasource, and I am only showing select columns from it by hooking rowdatabound event of the gridview.
Please suggest a way for doing it WITHOUT design view(aspx).
EDIT: Is there any way to do this using UpdatePanels?
...
I have a WindowsForms application wich has SynchronizationContext.Current not null
But from that WindowsForms app I create a new Thread called thread1
From thread1 I create another Thread called thread2
When I try to POST methods from thread2 in thread1 using SynchronizationContext.Current, will fail because SynchronizationContext.Curren...
I have just started working on a reusable library. This library is going to be pretty big and since it involves communicating with external devices over various communication media (such as RS232, TCP/IP, Radio etc), I am thinking about providing support of performing operations that involves communication, asynchronously.
I have read t...
I need to make n number of async web service calls from an async ASPX page.
Each WS call retrieves a portion of a binary file. The code then outputs the file block to the page's response stream.
offset = 0;
blocksize = 1024;
output = getFileBlock(path, offset, blocksize);
//BinaryWrite output to Response
offset += blocksize;
output =...
I am learning threading.My intension is to pass some values to a method for calculation,if the result will not be returned within 20 ms,i will report "Operation timeout".Based on my understading i have implemented the code as follows:
public delegate long CalcHandler(int a, int b, int c);
public static void ReportTimeout()
{
...
Hi, folks. I would really appreciate to have your help on the following issue:
I have been trying to solve this "Concurrent Programming" exam exercise (in C#):
Knowing that Stream class contains int Read(byte[] buffer, int offset, int size) and void Write(byte[] buffer, int offset, int size) methods, implement in C# the NetToFile me...
I've create a regular old ASMX web service in ASP.NET and added SoapDocumentMethod(OneWay = true)] to the function call as I've read this is supposed to make the call Asynchronous. However I call this in my code and it definitely does not make the call asynchronous, my page just sits there waiting for the function to finish working. What...
Part of a C# application I'm writing requires collecting data from a service provider's database for each account associated to a user. When the user logs into the app a call is made to start updating the accounts from the service provider's database. Since lots operations are performed on the third party's end the process of getting the...
Hi
I have an activity that starts with an AsyncTask to check the connection to my servers api.
Since this should not run in the UI thread i have made a AsyncTask for this.
The problem is that is get an runtime exception when i start the background process of the Asynctask.
How can i avoid this?
From log:
10-12 14:18:56.476: ERROR/An...
How do I use F#'s built-in support for async operations classes exposing the Event-based Asynchronous Pattern such as WebClient class?
let Download(url : Uri) =
let client = new WebClient()
let html = client.DownloadString(url)
html
When I try to change this to use "let!" in an async block (say as described in Soma's recen...
We have a service to update customer information to server. One service call takes around few seconds, which is normal.
Now we have a new page where at one instance around 35-50 Costumers information can be updated. Changing service interface to accept all customers together is out of question at this point.
I need to call a method (sa...
I got a AsyncTask that is supposed to check the network access to a host name. But the doInBackground is never timed out. Anyone have a clue?
public class HostAvailabilityTask extends AsyncTask<String, Void, Boolean>{
private Main main;
public HostAvailabilityTask(Main main){
this.main = main;
}
protected Boolean doInBackground(S...