Geoffrey Falk

Ranch Hand
+ Follow
since Aug 17, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Geoffrey Falk

The issue is garbage collection of the intermediate object A.multiply(B), which has size size(A) + size(B). If I am doing millions or billions of operations, this gets quite significant.

It would be much more convenient to have an algorithm to do the modular multiplication in place.

I suppose I will have to implement this myself.
11 years ago
I signed up for this Coursera course, watched many of the lectures, but did not finish it. The main reason I didn't finish it was because of other demands on my time, from my full-time job etc.

However, in the future I would like to re-take the course and finish it.

I think Scala looks like the language of the future. I insist on statically-typed languages for obvious reasons (it's much easier to write correct code in a statically-typed language).

I'm a Scala fan, but not yet a Scala expert.

Geoffrey
11 years ago
Suppose we had an existing RMI server that supported certain method calls.

Then, we upgrade the RMI server. The new interface still includes the same old method calls, but also additional ones.

**Will the old client still be able to communicate with the new RMI server?

Thanks
Geoffrey
I have BigInteger M (a modulus) and two BigIntegers A, B (that are between 0 and M-1) that I would like to multiply together modulo M.

One way to do it is



The problem is, this uses twice as much space as it should need. I want to use an algorithm to do the modular multiplication in the same space as M.

BigInteger doesn't provide such a method, however.

What can I use?

Thanks
Geoffrey
11 years ago
Hi,

I have written an application that transfers data across a network using Socket, getInputStream(), getOutputStream(). I have some concerns about how to optimize for performance.

Currently I am writing one byte at a time to the OutputStream. I am wondering if this results in a separate TCP packet being sent for each byte, which would obviously be very inefficient. Or does it buffer the data into a packet before sending?

If I need to wrap my OutputStream, what is the recommended way to do it?

Thanks
geoffrey
Are you sure? I think the probability depends on the word that I give you. For instance, "AAAA" has a different probability than "ABAB". (Hint: take account of double counting.)

Geoffrey
14 years ago
I wrote one that uses a recursive algorithm to solve Sudoku puzzles. If there are multiple solutions (or so solution), it will tell you that as well.
I tried to attach the source but I'm having trouble with attachments.

Geoffrey
14 years ago
Suppose I give you a 4-letter word with letters chosen from an alphabet of 26 letters. What is the probability that a random 13-letter string contains the word as a substring?

Alternatively, write a Java program to calculate the probability.

Geoffrey
14 years ago
... specifically,



Thanks!
Geoffrey
I have a java.sql.Connection object, and I need to determine the hostname of the database server. Is there any way to extract this information somehow? Even to retrieve the JDBC URL would be helpful.

Thanks
Geoffrey
The difference between Java 1.5 and 1.6 is:

in 1.5, @Override is accepted only in the case of extending a class. If you are implementing a method in an interface, then you cannot use this annotation.

In 1.6, @Override is acceptable when implementing a method from an interface.

If you need Ant to accept the 1.6 usage, then set the compiler source compliance to "1.6" in your build.xml: <javac source="1.6"..... />

Geoffrey
15 years ago
I solved the problem. My browser was set to block cookies from this site. After I enabled cookies from www.coderanch.com, I now have the edit button.

Thanks for your help.

Geoffrey
15 years ago
No, I do not see an "Edit" button in the upper right hand corner of my posts.

I reviewed the Changes FAQ and did not see anything related to this.

It could be a problem with the permissions on my account. I would like to know if anyone else is having the same problem.

Thanks
Geoffrey
15 years ago
Well, for starters I can't see a link under my post which says "edit."

Is it just me?
15 years ago
What, we can't edit our posts any more?
15 years ago