Luca Zanini
  • Home
    • Astronomy
    • Android
    • Java
    • Lotus
  • About me
  • Replacing a Fragment in a Tab Layout with an ActionBar

    Nov 17, 2013

    —

    by

    Luca Zanini
    in Android

    In the post Tab Layout in Android with ActionBar and Fragment the fragments can’t be replaced later, in this post I write the changes in order to replace the first fragment of the first tab with a third fragment using a button at runtime.

    Read more: Replacing a Fragment in a Tab Layout with an ActionBar

  • Digit canceling fractions

    Nov 16, 2013

    —

    by

    Luca Zanini
    in Uncategorized

    From the Project Euler Problem 33: The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that 49/98 = 4/8, which is correct, is obtained by cancelling the 9s. We shall consider fractions like, 30/50 = 3/5, to be trivial examples. There are exactly four non-trivial…

    Read more: Digit canceling fractions

  • The services in Android

    Nov 15, 2013

    —

    by

    Luca Zanini
    in Android

    A service is a task running in the background to perform actions without a user interface and they are used to perform long running operations with a significant use of resources by avoiding delays in the user experience. The services belong to one or both of the following categories: started: the service is launched using…

    Read more: The services in Android

  • 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

←Previous Page Next Page→