Luca Zanini
  • Home
    • Astronomy
    • Android
    • Java
    • Lotus
  • About me
  • Passing an object from an Activity to another

    Nov 13, 2013

    —

    by

    Luca Zanini
    in Android

    The method startActivity(Intent intent) of the class Activity allows you to call a second activity specified using the argument Intent. You can associate primitive data or primitive data array to the argument Intent and then the second Activity can access them, you can also pass objects of type String using methods of the class Bundle…

    Read more: Passing an object from an Activity to another

  • Pandigital products

    Nov 10, 2013

    —

    by

    Luca Zanini
    in Uncategorized

    From the Project Euler Problem 32: We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example, the 5-digit number, 15234, is 1 through 5 pandigital. The product 7254 is unusual, as the identity, 39 × 186 = 7254, containing multiplicand, multiplier,…

    Read more: Pandigital products

  • Javadoc in Eclipse and Android

    Nov 6, 2013

    —

    by

    Luca Zanini
    in Android

    In Eclipse launching javadoc from menu (Project -> generate javadoc…) if you get the errors: error: package android… does not exist error: cannot find symbol

    Read more: Javadoc in Eclipse and Android

  • The Navigator and Dynamic View Panel controls of the Extension Library

    Nov 4, 2013

    —

    by

    Luca Zanini
    in Lotus

    In this article I implement the Navigator and Dynamic View Panel controls of the XPages Extension Library in a similar way to the navigator and views in a frameset of a lotus database open using the lotus client.

    Read more: The Navigator and Dynamic View Panel controls of the Extension Library

  • Coin sums

    Nov 3, 2013

    —

    by

    Luca Zanini
    in Uncategorized

    From the Project Euler Problem 31: In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation: 1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p). It is possible to make £2 in the following way: 1×£1 + 1×50p + 2×20p + 1×5p…

    Read more: Coin sums

  • Digit fifth powers

    Oct 27, 2013

    —

    by

    Luca Zanini
    in Uncategorized

    From the Project Euler Problem 30: Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits: 1634 = 14 + 64 + 34 + 44 8208 = 84 + 24 + 04 + 84 9474 = 94 + 44 + 74 + 44 As 1 =…

    Read more: Digit fifth powers

  • Distinct powers

    Oct 20, 2013

    —

    by

    Luca Zanini
    in Uncategorized

    From the Project Euler Problem 29: Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5: 22=4, 23=8, 24=16, 25=32 32=9, 33=27, 34=81, 35=243 42=16, 43=64, 44=256, 45=1024 52=25, 53=125, 54=625, 55=3125 If they are then placed in numerical order, with any repeats removed, we get the…

    Read more: Distinct powers

  • Preference element in xml and the click event

    Oct 14, 2013

    —

    by

    Luca Zanini
    in Uncategorized

    If you have an EditTextPreference tag in a xml file you can catch the click event implementing OnSharedPreferenceChangeListener but it doesn’t work if you have a Preference tag in the xml file. Consider the following code inside a xml file for the preferences: <Preference android:key=”my_key” android:summary=”my_summary” android:title=”my_title” > </Preference>

    Read more: Preference element in xml and the click event

  • Number spiral diagonals

    Oct 13, 2013

    —

    by

    Luca Zanini
    in Uncategorized

    From the Project Euler Problem 28: Starting with the number 1 and moving to the right in a clockwise direction a 5 by 5 spiral is formed as follows: 21 22 23 24 25 20  7  8  9 10 19  6  1  2 11 18  5  4  3 12 17 16 15 14 13 It…

    Read more: Number spiral diagonals

  • Quadratic primes

    Oct 5, 2013

    —

    by

    Luca Zanini
    in Uncategorized

    From the Project Euler Problem 27: Euler discovered the remarkable quadratic formula: n² + n + 41 It turns out that the formula will produce 40 primes for the consecutive values n = 0 to 39. However, when n = 40, 40² + 40 + 41 = 40(40 + 1) + 41 is divisible by…

    Read more: Quadratic primes

←Previous Page Next Page→
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.