All posts by stackoverflow

How can I find the Square Root of a Java BigInteger?

Is there a library that will find the square root of a BigInteger? I want it computed offline – only once, and not inside any loop. So even computationally expensive solution is okay.

I don’t want to find some algorithm and implement. A readily available solution will be perfect.

How can I find the Square Root of a Java BigInteger?

Vector graphics in Android

I’m working on an application that displays someone else’s database of images. The images they have are all vector graphics and can be converted to any format, however keeping them in a vector format is good because users will probably want to zoom in closely.

The question is, is there a built-in way to display a vector graphic in Android? The format doesn’t matter – we can convert. The current format we’re considering is PDF, but given that there’s no native PDF support, I’d have to do something pretty complex just to get it working (for example, integrating poppler into my app via the NDK). The alternative is to just convert the vector graphics into a simpler format (JPG, GIF) but I’d rather avoid that.

read more

Android SSO (Single sign-on) for app

Is there any free single-signon mechanism for Android that gracefully works with non-webapps? Say, something along the lines of…

You launch my app and use it until it makes a request from the app server that requires authentication. It responds to that request with a random token that the server will associate with you for a short time.

The app presents you with a username field, a password field, and a submit button.

You enter your username and password. The app then forwards your username and hashed password, along with the token generated by the app server, to the login service.

read more

Fix msysGit Portable $HOME location

I have successfully installed and configured msysGit Portable on my flash drive, and have used it to pull and push GitHub repos. However, I seem to always have to kludge the SSH support.

Specifically, in order for SSH to find my key files, I have to follow these instructions to start a second instance of ssh-agent and then ssh-add my key every time I run git-bash.bat.

Using the output of ssh -v git@github.com to debug I see that msysGit defaults to my Windows user directory to look for keys. It can’t do that; I need it to look in its own directory on the portable drive.

read more