Author: Luca Zanini
-
Copying an array in java
In this post I show some ways to copy arrays of primitive data and objects to another array.
-
Handling the multi-touch in a surface view
In the previous post Handling the multi-touch in a view I’ve used a class that extends a View to show the circles where the screen is touched, here I display the same example but using a SurfaceView.
-
Handling the multi-touch in a view
In this post you find a full example about how to extend a view to draw, in this case, a circle where you touch the screen implement a listener on a view to handle the multi-touch
-
How to change the look and feel of a view using css
A lotus view open in a browser is very ugly but you can greatly improve using stylesheets (css); here I explain how to use the css in a lotus view in order to improve the look and feel and to display rows in alternate colors.
-
Running a fortran program from java
In this post I write an example about how to launch a fortran executable form a java program passing some arguments and getting back a result. The chosen example uses code written in fortran to get primes, it is from Sieve of Eratosthenes.
-
Getting the variables of the outer class from an inner class
The inner classes, and then not static, can access even if with some limitation to the variables of the outer class.
-
Truncatable primes
Project Euler Problem 37: The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we can work from right to left: 3797, 379, 37, and 3. Find the sum of the only…
-
Double-base palindromes
From the Project Euler Problem 36: The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. (Please note that the palindromic number, in either base, may not include leading zeros.) checked
