Skip to content
Advertisement

Ultra-fast “Begins With” Query from Disk

I have a 40MB (too big for memory in this case) list of strings that I want to do “begins with” queries on to extract matches. Anyone know of a good data structure for this? Bonus points for an existing os java implementation. I would be willing to sacrifice “begins with” to just exact matching if something already exists. A

Should I do things like this?

I’m only started learning guava. So I don’t know best practices and etc. These is code (it binding some classes and put in Order by input collection): So, should I separate it in several operations? upd what does it do? It takes collection. Sorts it. Maps each object to other one. Creates new ImmutableList and return it. Answer I think

Print array without brackets and commas

I’m porting a Hangman game to Android and have met a few problems. The original Java program used the console, so now I have to somehow beautify the output so that it fits my Android layout. How do I print an array without the brackets and commas? The array contains slashes and gets replaced one-by-one when the correct letter is

“Uncompilable source code” RuntimeException in netbeans

I’m trying to help another developer who is using Netbeans. When he runs or debugs some code of his in Netbeans (6.9.1) he gets an “Uncompilable source code” RuntimeException. I’m pretty experienced in Java but am more used to IntelliJ, and haven’t used Netbeans at all. I’ve done it a bit of googling and it seems Netbeans will compile code

Advertisement