implementation

How is CPython's set() implemented?

I've seen people say that set objects in python have O(1) membership-checking. How are they implemented internally to allow this? What sort of data structure does it use? What other implications does that implementation have? Every answer here was really enlightening, but I can only accept one, so I'll go with the closest answer to my o...

How to stop/restrict execution of some method (~when already some object is calling that).

Dear Experts, i am stuck in a situation, where i need to move balls in multi-user way, i m using RMI in a distributed animation of moving BALLS . My goal is to move multiple balls in a way, so that multiple clients observe the same movement/position of balls, i m using ball object which is remote object. My problem is: i am calling t...

Google Map implementation not working on Safari and Chrome

Hi everybody, I am implementing a google map on the contact page of this website: http://www.vqt.ch/dev/?lang=fr&amp;page=contact The map displays in the rectangle on the top of the page. Everything is working fine on Firefox, but nothing is displayed on Safari & Chrome... Here is the way I implement it: <script src="http://maps.g...

What exactly is @implementation NSArray (Find) and the Warning it gives?

A couple of questions regarding the following code: @implementation NSArray (Find) - (NSArray *)findAllWhereKeyPath:(NSString *)keyPath equals:(id)value { NSMutableArray *matches = [NSMutableArray array]; for (id object in self) { id objectValue = [object valueForKeyPath:keyPath]; if ([objectValue isEqual:value] || objec...

How can we create library from Application? (Deriving library/API from Applications)

Dear Experts, My intent is to create a library/API for small scale distributed multi-user game /simulation. i have created couple of applications using java RMI, i tried to keep them simple and to achieve decoupling and now i want to transform those or want to derive/extract from them a generic template. Can somebody please shed ligh...

implementation of ruby in different sets

Hi all, I am just confused with a concept. I have been hearing about Ruby as a programing language. Now, many companies/individuals have developed JRuby, which is Ruby implementaion for Java and Jython, which is Ruby implemtation for Python. Can anyone please explain me, how exactly one programming language can be implemented in another...

ObservableCollection for Web froms

I have not worked on WPF.I had that Observable collection works like events to LINQ.I also referred some libraries in codeplex (obtics) and MS Reactive Framework all are specific for WPF (I guess so). My intension is to work on same techniques on Web forms.Say I have declared List<Person> personList= new List<Person>() ...

How to find all implementations of a certain interface?

I want to make my program initialization a bit "smarter". I have several classes which represent commands. All these classes are immutable (i.e. creating only one instance of each should be enough for the whole application). All these classes implement Command interface. I think that the fact that some classes are placed in the same ...

Where can I find RefFSContext source (from fscontext.jar)

I've downloaded glassfish source code but it's not in there. People used to point at http://java.sun.com/products/jndi/index.html#download but it seems this link has disappeared. Any idea ? Thanks ...

List versus ArrayList

Ok so I know that Set, List and Map are interfaces but what makes the first line of code any better than the second line? List myArr = new ArrayList(); ArrayList myArr = new ArrayList(); Thanks. ...