code-translation

Allowing a method to lock its parent Object in Java

Is there a way in Java to get a method to lock (mutex) the object which it is in? I know this sounds confusing but basically I wan't an equivelent to this snippet of C# but in Java. lock(this) { // Some code here... } I've been tasked with reimplementing an API written in .Net into Java, and I've been asked to keep the Java versi...

how does http://imo.im do their translation?

Hello, I'm a http://imo.im user and recently noticed that they implemented a translate system so that their users could help them translate their website to all other languages. I know about gettext and I was wondering if they use that or do they use arrays like here: http://www.weberdev.com/get%5Fexample-3844.html . And also, I was won...

Advice on translating code from very unrelated languages (in this case Scheme to Python)?

Reasoning: I'm trying to convert a large library from Scheme to Python Are there any good strategies for doing this kind of conversion? Specifically cross-paradigm in this case since Python is more OO and Scheme is Functional. Totally subjective so I'm making it community wiki ...

U combinator on a fibonacci : how would you translate this code to python?

Hi, I am trying to learn about combinators and I am having trouble understand the example given at (Y overriding self-application). I think I am beginning to grasp the concept but I am still far from understanding. I would like to translate the following code to Python: (define (U f) (f f)) (define (fib-nr f) (lambda...