Luca Zanini
  • Home
    • Astronomy
    • Android
    • Java
    • Lotus
  • About me
  • How to restore the state of a WebView in a layout “Tabs + Swipe” with ViewPager and FragmentPagerAdapter

    Apr 29, 2013

    —

    by

    Luca Zanini
    in Android

    In the post Tabs and swipe views Szymon asks how to implement a WebView in order to preserve its state moving from one tab to another in a similar way as explained in How to save the state of a WebView inside a Fragment of an Action Bar.

    Read more: How to restore the state of a WebView in a layout “Tabs + Swipe” with ViewPager and FragmentPagerAdapter

  • Power digit sum

    Apr 25, 2013

    —

    by

    Luca Zanini
    in Uncategorized

    From the Project Euler Problem 16: 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^1000? checked

    Read more: Power digit sum

  • Adding colors with OpenGL ES in Android

    Apr 23, 2013

    —

    by

    Luca Zanini
    in Android

    In the post Drawing a triangle with OpenGL ES in Android I explained how to draw a triangle without setting the colors, indeed, the triangle is gray. In this post I add a few lines of code that allow you to change the color of the triangle starting from the code in Drawing a triangle…

    Read more: Adding colors with OpenGL ES in Android

  • Lattice paths

    Apr 21, 2013

    —

    by

    Luca Zanini
    in Uncategorized

    From the Project Euler Problem 15: Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner. How many such routes are there through a 20×20 grid? checked In the first attempt I counted all…

    Read more: Lattice paths

  • How to fix a corrupted view of a lotus database

    Apr 2, 2013

    —

    by

    Luca Zanini
    in Lotus

    I found this command to use on the console of the domino server to rebuild a specific corrupted view in a lotus database without rebuilding all the views of the database: lo updall -R [database] -T [view] where [database] is the path to the database and [view] is the name of the view.

    Read more: How to fix a corrupted view of a lotus database

  • Drawing a triangle with OpenGL ES in Android

    Mar 26, 2013

    —

    by

    Luca Zanini
    in Android

    The scope of this post is drawing a triangle with OpenGL ES 1.x in Android focusing especially on the relationship between code and position of the triangle. The coordinate system has the origin where the observer is, with the x axis horizontal and rightward, the y-axis vertical and upward and the z axis points so…

    Read more: Drawing a triangle with OpenGL ES in Android

  • Longest Collatz sequence

    Mar 25, 2013

    —

    by

    Luca Zanini
    in Uncategorized

    From the Project Euler Problem 14: The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) Using the rule above and starting with 13, we generate the following sequence: 13 → 40 → 20 → 10 → 5 →…

    Read more: Longest Collatz sequence

  • Attaching shared javascript and css code in a lotus form

    Mar 24, 2013

    —

    by

    Luca Zanini
    in Lotus

    The javascript and css code used in a lotus form can also be useful in other forms, and so it is best to save it only one time in a shared place. The pages works well for this purpose and in this post I explain how to create page containing JavaScript code and css and…

    Read more: Attaching shared javascript and css code in a lotus form

  • Getting the current document from a button in an embedded editor

    Mar 20, 2013

    —

    by

    Luca Zanini
    in Lotus

    Consider the following scenario: a lotus form containing an embedded view and an embedded editor, the 2 embedded controls are linked together according to targeting by linking an embedded editor to an embedded view. The embedded editor contains a button that tries to get the current document (often called uidoc) with the code: Sub Click(Source…

    Read more: Getting the current document from a button in an embedded editor

  • Varargs: passing a variable number of arguments to a method

    Mar 17, 2013

    —

    by

    Luca Zanini
    in Java

    From version 5 of Java you can call a method passing a variable number of arguments. A variable of this type is called varargs, you can only use in a method signature and its syntax is the primitive type or object type followed by 3 dots (ellipsis).

    Read more: Varargs: passing a variable number of arguments to a method

←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.