Tag Archives: java

Fixing tootlip background color in Eclipse

The problem Under Ubuntu the Eclipse tooltip (the one that shows up when you hover over a function or variables) has an anoying black background color. This is due to the fact that Eclipse takes the default background color from … Continue reading

Posted in Programming, System Administration | Tagged , , , , , | Leave a comment

Facebook Hacking Cup – Round 2 – Scott’s New Trick – Solution

Preparation This problem needs some module arithmetic concepts before we can give a solution.

Posted in Programming | Tagged , , , , | 2 Comments

Facebook Hacking Cup – Round 1B – Slot Machine Hacker – Solution

The problem is actually so simple that a brute force approach is possible:

Posted in Programming | Tagged , , , | Leave a comment

Facebook Hacking Cup – Round 1A – Turn on the Lights – Solution 1

The problem can be solved using linear algebra. However there’s also a brute force method which is usable for a board with a maximum of 18 columns. Here I’ll describe the brute force approach.

Posted in Programming | Tagged , , , | 1 Comment

Facebook Hacking Cup – Round 1A – Wine Tasting – Solution

Acknowledgements So this problem seems suite simple. After some thinking I came up with the idea that C(n,k)*(n-k-1)! would give me the number of combinations with exactly k correct wines out of n glasses. Infact C(n,k) is the number of … Continue reading

Posted in Programming | Tagged , , , , | Leave a comment

Facebook Hacker Cup – Qualification Round – Studious Student – Solution

This problem seems simple. Just store the words in an array of strings and sort them:

Posted in Programming | Tagged , , , , | 1 Comment

Facebook Hacker Cup – Qualification Round – Peg Game – Solution

At first this problem puzzled me because the example: x.x.x.x.x x…x.x x…x.x.x x.x…x x.x.x.x.x G ‘x’ indicates a peg, ‘.’ indicates empty space.   For me gave a solution of 0.63.

Posted in Programming | Tagged , , , , | Leave a comment

Facebook Hacker Cup – Qualification Round – Double Squares – Solution

This problem seems to have an obvious solution:

Posted in Programming | Tagged , , , | 6 Comments

Importing openSSH keys into a Java keystore

As Agent Bob points out in this post importing an SSH key in to a Java keystore isn’t as painless as it should be. So just download ImportKey.java.

Posted in Programming, System Administration | Tagged , , , , , , , , | Leave a comment

Installing an external JAR into Maven

Sometimes you have to use a library that isn’t available in Maven  repository. In this case you must take the JAR and install it in the local repository using the install plugin: for example to install an hipotetical jar foo-1.0.2.jar … Continue reading

Posted in Programming | Tagged , , , , | Leave a comment