Author: Luca Zanini

  • 1000-digit Fibonacci number

    From the Project Euler Problem 25: The Fibonacci sequence is defined by the recurrence relation: Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1. Hence the first 12 terms will be: F1 = 1 F2 = 1 F3 = 2 F4 = 3 F5 = 5 F6 = 8 F7 =…

  • # vs $ in the computed expressions in the xpages

    In the xml code of the xpages the computed expressions begin with the character “#” or with the character “$”, ie they are one of the following types: value=”#{[language]:[expression]}” value=”${[language]:[expression]}” where [language] is the name of the language, for example javascript and [expression] is the expression to compute. The question is “what is the difference…

  • How to access to a control connected to a lotus field using javascript

    In this post I test how to access via javascript to the following controls connected to a lotus field: Edit Box: a control for entering a single line of data Hidden Input: a control for hiding data to the user A Hidden Input control is not such as an Edit Box control with “Visible” unchecked…

  • Lexicographic permutations

    From the Project Euler Problem 24: A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we call it lexicographic order. The lexicographic permutations of 0, 1 and 2 are: 012 021…

  • Script for creating Android Icons

    Just another tool to create Android icons, such as gimp-android-xdpi. You can find at Script for creating Android Icons or at GIMP script for creating Android icons at once.

  • The Form Layout Column control of the Extension Library

    The Form Layout Column control allow you to place the various controls (such as Form Layout Row) on multiple columns. In the post The Form Table and Form Layout Row controls of the Extension Library I built a xpage with two Form Layout Row controls at different lines, using two Column Layout Form controls you…

  • Non-abundant sums

    From the Project Euler Problem 23: A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a…

  • Updating frequently a TextView inside a loop

    The problem How to update a TextView inside a loop or, more generally, how to update frequently an UI element of an Activity.

  • ìNames scores

    From the Project Euler Problem 22: Using […] a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name score. For example, when the list is sorted…

  • The Form Table and Form Layout Row controls of the Extension Library

    The Form Table and Form Layout Row controls allow you to easily implement a form with the fields and their labels. In this post I use these two controls to convert the form “Document” to xpage in a database that inherits from the template Doc Library – Notes & web (8.5).