-
The services in Android
Read more: The services in AndroidA 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…
-
Passing an object from an Activity to another
Read more: Passing an object from an Activity to anotherThe 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…
-
Pandigital products
Read more: Pandigital productsFrom 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,…
-
Javadoc in Eclipse and Android
Read more: Javadoc in Eclipse and AndroidIn Eclipse launching javadoc from menu (Project -> generate javadoc…) if you get the errors: error: package android… does not exist error: cannot find symbol
-
The Navigator and Dynamic View Panel controls of the Extension Library
Read more: The Navigator and Dynamic View Panel controls of the Extension LibraryIn 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.
-
Coin sums
Read more: Coin sumsFrom 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…
-
Digit fifth powers
Read more: Digit fifth powersFrom 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 =…
-
Distinct powers
Read more: Distinct powersFrom 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…
-
Preference element in xml and the click event
Read more: Preference element in xml and the click eventIf 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>
-
Number spiral diagonals
Read more: Number spiral diagonalsFrom 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…