Why does java.lang.Object have two notify methods - notify and notifyAll? It seems that notifyAll does at least everything notify does, so why not just use notifyAll all the time? If notifyAll is used instead of notify, is the program still correct, and vice versa? What influences the choice between these two methods?
...
I have a Java Thread which exposes a property which other threads want to access:
class MyThread extends Thread {
private Foo foo;
...
Foo getFoo() {
return foo;
}
...
public void run() {
...
foo = makeTheFoo();
...
}
}
The problem is that it takes some short time from the time this runs until...
I notice that with MS Sync, going through the wizard to create the WCF service that will do the sync, you can only choose which table to sync.
Is it possible to only sync a few columns of the table and not the entire table? It will also create the local sdf file with the whole table structure. I only need a few columns of the table to ...
Hello Stackers,
Imagine that you want to design a tennis booking system.
You have 5 tennis clubs as partners with no online api allowing you to check on their side if a court is booked or not: You have to build this part as well.
Every time a booking is done on their side you want it to be known by our system. Probably using a POST req...
java.util.Collections currently provide the following utility methods for creating synchronized wrapper for various collection interfaces:
synchronizedCollection(Collection<T> c)
synchronizedList(List<T> list)
synchronizedMap(Map<K,V> m)
synchronizedSet(Set<T> s)
synchronizedSortedMap(SortedMap<K,V> m)
synchronizedSortedSet(SortedSet<T...
Hi all,
Is there any proper method to play synchronously video and external audio, other than simply having two MediaElement (one for video source and one for audio) started simultaneously? I need to play video with different soundtracks, but I belive that just two separated MediaElements will be out of sync at some point of time. Maybe...
Hi everyone, I have a general question about DB synchronisation.
So, I'm developing a website locally (PHP + MySQL) and I would like to be able to synchronise at least the structure (and maybe the contents) of the two DB when one of the two is changed (normally I would change the local copy).
Right now what I'm doing is to use mysqldu...
I am working on address book synchronization algorithm. I would like to reuse some code if there exists, but couldn't find one yet.
Does someone know about an algorithm that will tell me in numbers/float/procent how much two names are identical. Levenstein distance is not good in this approach, as names and our adddress books are matchi...
I've written many iPhone Applications that have pulled data from web services and I've worked on synchronizing data between an iPhone App and a Web Application, but I've always felt that there is probably a better way to handle the synchronization.
I'd like to know what strategies you have used to synchronize data between your iPhone(re...
I'm looking for a solution that can probably be best implemented at FileSystem level as a Network based Synchronized Filesystem:
I want to one-way synchronize files between two machines. However instead of pro-actively syncing everything, I want to do it "on-demand" i.e. whenever a program on the replicated machine accesses a file of th...
I use Dreamweaver on my laptop and Desktop PC and frequently change between them. I keep all my sites synced using Syncplicity (similar to Dropbox, which indecently I also use)
I want my site definitions to be synced across the two computers. If I add a new site on one computer I want it to appear on the other one. I know I can export a...
I trying to do a snapshot between SQLCE 3.5 SP1 and SQL Server 2008 by using the sync framework.
I received a inner exception stated that "{"Unable to enumerate changes at the DbServerSyncProvider for table 'ArInvoice' in synchronization group 'ArInvoiceSyncTableSyncGroup'."}".
The inner text for the inner exception stated that "Timeou...
I'm using some 3rd party AWT components in a desktop application. The component's layout is changed within the paint() method, and this causes some very strange behaviour. This appears to be fixed by adding the synchronized keyword to the paint() method, but is this a safe thing to do?
...
Hello,
I have to use Sync Framework 2.0 in our WPF app that will contain SQL Compact 3.5 and will synchronize with SQL Server 2008.
I followed this video : http://download.microsoft.com/download/6/7/3/6730f0e7-a649-4656-96ab-150c7501a583/IntroToSyncServicesADODetNet_HighQuality.wmv.
But instead DataSet I've used EntityFramework 4...
This is a pretty basic question, and I imagine that it is, but I can't find any definitive answer. Is SynchronizationContext.Post() threadsafe?
I have a member variable which holds the main thread's context, and _context.Post() is being called from multiple threads. I imagine that Post() could be called simultaneously on the object. Sho...
Hi,
Lets say I have two shared variables - a and b - that are related to each other. When multiple applications share these shared variables, access to them needs to be an atomic operation, otherwise the relation may break. So to ensure mutual exclusion, I'll put their modification under a critical section protected by lock.
critical_c...
Is there any way to synchronize the capturing and playback of audio data in Android?
I need to do some signal processing (echo cancellation, etc.) that needs synchronization at sample level.
I.e. everey time the hardware captures an audio frame, I need the corresponding frame that was played through the speaker with high accuracy.
Any...
Hi,
Every time when I change some values in form controls, I need to set a property of an object or vice versa. Instead of writing some methods for each control, I want a general solution for GUI elements. I do not use WPF but only C# 3.0.
Any suggestions?
Thanks.
...
I've got a winforms application that is set up in the following manner: 2 buttons, a textbox, an class object MX with a collection K as its member, function X and another function, Y.
Function X parses a large database and enumerates some of its data in collection K.
Button 1 calls function X.
Function Y walks through the above collect...
I'm working on an iphone app but this is probably a general question.
I have a singleton Model class and there would be scenarios where multiple NSOperations (threads) would exist and work with the singleton object. If they all call the same method in this object, do i need to have some locking mechanism?
Or can this method be executed...