-
Power digit sum
Read more: Power digit sumFrom the Project Euler Problem 16: 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^1000? checked
-
Adding colors with OpenGL ES in Android
Read more: Adding colors with OpenGL ES in AndroidIn the post Drawing a triangle with OpenGL ES in Android I explained how to draw a triangle without setting the colors, indeed, the triangle is gray. In this post I add a few lines of code that allow you to change the color of the triangle starting from the code in Drawing a triangle…
-
Lattice paths
Read more: Lattice pathsFrom the Project Euler Problem 15: Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner. How many such routes are there through a 20×20 grid? checked In the first attempt I counted all…
-
How to fix a corrupted view of a lotus database
Read more: How to fix a corrupted view of a lotus databaseI found this command to use on the console of the domino server to rebuild a specific corrupted view in a lotus database without rebuilding all the views of the database: lo updall -R [database] -T [view] where [database] is the path to the database and [view] is the name of the view.
-
Drawing a triangle with OpenGL ES in Android
Read more: Drawing a triangle with OpenGL ES in AndroidThe scope of this post is drawing a triangle with OpenGL ES 1.x in Android focusing especially on the relationship between code and position of the triangle. The coordinate system has the origin where the observer is, with the x axis horizontal and rightward, the y-axis vertical and upward and the z axis points so…
-
Longest Collatz sequence
Read more: Longest Collatz sequenceFrom the Project Euler Problem 14: The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) Using the rule above and starting with 13, we generate the following sequence: 13 → 40 → 20 → 10 → 5 →…
-
Attaching shared javascript and css code in a lotus form
Read more: Attaching shared javascript and css code in a lotus formThe javascript and css code used in a lotus form can also be useful in other forms, and so it is best to save it only one time in a shared place. The pages works well for this purpose and in this post I explain how to create page containing JavaScript code and css and…
-
Varargs: passing a variable number of arguments to a method
Read more: Varargs: passing a variable number of arguments to a methodFrom version 5 of Java you can call a method passing a variable number of arguments. A variable of this type is called varargs, you can only use in a method signature and its syntax is the primitive type or object type followed by 3 dots (ellipsis).
-
Large sum
Read more: Large sumFrom the Project Euler Problem 13: Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.