Category Archives: Programming
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
Suppose you have removed a file from SVN and want to restore it. Should be easy, and it actually is as CRG points out here. I rewrite his method in case it disappears.
The problem At work I was confronted with a “simple” problem: I have a slider to select values from 0 to 5000 (actually the slider is used to set the the diameter of a circle in meters). If I use … Continue reading
Preparation This problem needs some module arithmetic concepts before we can give a solution.
Description Little Scott recently learned how to perform arithmetic operations modulo some prime number P. As a training set he picked two sequences a of length N and b of length M, generated in the following way:
The problem is actually so simple that a brute force approach is possible:
Description You recently befriended a guy who writes software for slot machines. After hanging out with him a bit, you notice that he has a penchant for showing off his knowledge of how the slot machines work. Eventually you get … Continue reading
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.
(for the solution see here) Description A simple game consists of a grid of RxC buttons. Each button will be either lighted, or unlighted. Whenever you push a button, the state of that button, and its (up to) four neighbors will … Continue reading
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