synchronization

Silverlight async api's cause hangs and none-responsiveness

this code causes silverlight to hang. If I remove the ManualResetEvent code, nothing happens private ManualResetEvent mre = new ManualResetEvent(false); ... WebClient sender = new WebClient(); sender. += new OpenReadCompletedEventHandler(this.ReadComplete); sender.OpenReadAsync(new ...

Silverlight image Uploader -- help!!

The following is the main body of code for an image resizer/compressor/uploader. This is my first silverlight project, and I am having trouble with the threading and gui updating as well as the webclient part, which does not function.The resizing and resampling seem to perform to my knowledge. The problem is the gui updating and uploadin...

How to keep testing and production e-commerce db in sync when you have "sales" updates in production?

I've read the following thread in SO, Keeping testing and production server environments clean, in sync, and consistent, and I still have some doubts in what is the best way to do it. "You should do modifications to your test environment and replicate it to your production server". Problem is I'm using Magento installation: I have diffe...

How do I syncronise API responses in JavaScript?

Hi there, In JavaScript, have a need to retreive data from two API calls and use both to process data for the display. For example; one call returns tasks with a user id, the other returns a list of user id's and names. Before I display onscreen I want to process the user ids so that the user name is shown against the task data. (The ...

iPad / iPhone Sync (WLAN or Inet)

I have actually one app with a SQLite DB and i port this at the moment to the ipad. My idea is a sync between iPad and iPhone for one table... But the Problem is "Person A" edit/change, create or delete a data record on iphone and "Person B" make the same or delete the edited record from Person A on the same time. Has anybody a idea for...

MongoDB for C# and iPhone app

I'm in the initial phase of designing an application that will have a backend implemented in C# that will provide data for other platforms using WCF web services hosted on IIS. One of the platforms will the the iPhone. Since it's a personal project, I want to use it to learn MongoDB. I already know that there are community developed dri...

Asynchronous programming in JavaScript without messy callbacks

I want to turn an asynchronous function to the synchronous. function fetch() { var result = 'snap!'; $.getJSON("http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?", function messyCallback(data){ result = data; }); return result; } document.write(fetch());​ See in action ...

Need a Syncroot for a LinkedList(of T)

Hi I am using VB.Net and would like to use a LinkedList. Only problem is that it is a multithreaded application. I saw from MSDN that Syncroot is an explicit implementation of the ICollection Interface. I found people wanting to do similar things with List(Of T). It seems that the solution there is to cast the list to the interface. I ...

Can I test an iPhone app on a device synced with another computer?

Is it possible to test an iPhone app on an iPhone/iPod touch which is synced to a computer other than the host computer? If so, will this also work for testing a device which is synced to a Windows machine? ...

Conflict comes when sync Sqlce -- Sql2008 database using sync framework

Whenever a record is inserted in client database UploadChangesFailed count is greater than 0. And when we saw the conflict type(ConflictType.ClientInsertServerInsert). Which shows the client and server both insert a record but i have only uploadonly direction and client only insert the record. Can any body guide me what i am missing. ...

Google App Engine - Deadlocking?

Every few times I run my app on the development server it seems to deadlock. I'm not sure if it also deadlocks on the production server. I pause the threads and see that one of them is stuck at Permissions.implies:162 which is the start of a synchronized block. What my code does is: on the home page, it sends 5 jquery requests at the ...

confused about threads in java

I understand threads in theory, but I have no idea how to implement them in Java. The circles are supposed to be threads and the rectangles are supposed to be buffers. I have this all coded but it doesn't work, so I am starting new. My source of confusion comes from the fact that I need this cycle to repeat many times and in this or...

Queue<T>.Dequeue returns null

I have a scenario where multiple threads are pushing data on a Queue only ONE thread is processing data using code below code - while ( Continue ) { while ( queue.Count > 0 ) { MyObj o = queue.Dequeue(); someProcess(o); } myAutoResetEvent.WaitOne(); } But sometimes,...

Keeping iPhone application in sync with GWT application.

Hi, I'm working on an iPhone application that should work in offline and online modes. In it's online mode it's supposed to feed all the information the user enters to a webservice backed by GWT/GAE. In it's offline mode it's supposed to store the information locally, and when connection is available sync it up to the web service. Curre...

Thread Synchronization - How to execute threads alternatively

I have been trying to solve a problem involving thread communication using wait() and notify(). Basically i have 2 threads T1 and T2 and i want them to be executed in the following order T1 , T2, T1, T2 ..... How can i achieve that? Actual Problem: There are 2 threads T1 - which prints odd numbers (say 1 - 100) and T2 - which prints ev...

java threads synchronization

In the class below, is method getIt() thread safe and why? public class X { private long myVar; public void setIt(long var){ myVar = var; } public long getIt() { return myVar; } } ...

Using for each syntax with Collections.synchronizedSet

The problem is this. I have made a set Set<User> users = Collections.synchronizedSet(new HashSet<User>()) ... for(User u : users){ //do something with u } Now, according to Java documentation. It is imperative that the user manually synchronize on the returned sorted set when iterating over it or any of its subSet, head...

Local Data Cache Sync Framework table loses ability to use Default values

Hi, I have a clinet sdf file (sql compact) that is created by the LocalDataCache.sync in Visual Studio 2008. The server is SQL Server 2008. On the server if I do the following: CREATE TABLE test ( [firstfield] float NOT NULL DEFAULT 1, [secondfield] float NOT NULL DEFAULT 2) GO INSER...

Is there a way of synchronizing changes made in a html file only in some areas in Vim? (leaving the other elements intact.)

Is there a way of synchronizing changes made in a html file only in some areas? leaving the other elements intact. Lets say I have these 2 files: hello-world-english.html: <div> <p>Hello World</p> </div> hello-world-spanish.html: <div> <p>Hola Mundo</p> </div> And I make the following change to the first one (hello-world-english....

Java folder synchronisation class/library?

Is there a library or a class in JAVA that synchronizes one folder to another one, changing only the "target" folder? I need something really fast (ant sync task is way too slow, for 4 GIG it took 10 minutes, compared to 3 seconds for Allway Sync - a desktop software). Thanks! UPDATE : Should be open source too :) I found http://syncd...