23 Jul 2016

date manipulation

12:18 | android | 615 views

Goal: sometimes we need to modify a date… Like in this simple case. Let’s add 5 minutes to the actual time. Easy with the java.util.Calendar class. Nota bene: this class can use years, hours, minutes… as well


21 Jul 2016

scrollable TextView in android

11:09 | android | 634 views

Goal: making a TextView scrollable put two lines to the layout file: plus to the activity:


21 Jul 2016

add horizontal line to the activity

11:00 | android | 582 views

Goal: create an easy visual separator element Use only one line to create a line… where the dialogFragment_horizontal_line style is like this: nota bene: the color coming from style as well


21 Jul 2016

freeze portrait orientation

10:51 | android | 595 views

Goal: avoid the screen rotation If you want to ignore the rotation of the device you can freeze the orientation like this. Put the following line into the manifest file (AndroidManifest.xml) under the activity section:


23 Oct 2015

Reset the scroll position on the page

15:27 | javascript | 734 views

Goal: reset the scroll position If the page content is dinamically loaded sometimes we need to reset the scroll position of the page. Like this:


15 Sep 2015

store object in the SessionStorage

10:27 | javascript | 768 views

Goal: to store object on the client side The following code is simple not working: the result is: We need to stringify the object before the store like this: now the result is: and we are happy…


7 Aug 2015

kill oracle session without gui

13:59 | oracle | 772 views

Goal: a simple way to kill a session in Oracle If we know the SID of the session to be killed, then use the following select to create the immediate command:


26 Jul 2015

Class with optional new keyword

20:49 | javascript | 781 views

Goal: create class allow creation without the new keyword The pattern is simple: The creation itself is the following:


24 May 2015

list of chrome resources

17:42 | javascript | 1030 views

Goal: there was no reason There is a simple mode to list some resources from the Chrome. I have digged the following resource ids from the chrome.dll file. This code running on an empty page! Paste the following code to the developer consol and see the result.


23 May 2015

get chrome version number

9:44 | javascript | 804 views

Goal: simple and quick way to find the version of the browser Be careful this is only for Chrome and based on the user agent string. the user agent string is: and the extracted result is:


#sidebar a { color:#fff; } #sidebar ul ul li { color: #DEF585; } #sidebar h2 { color: #fff; } #sidebar ul p, #sidebar ul select { color: #BEDDBE; } #backfly { background: url(images/golfBallWallPaper.jpg) left bottom fixed repeat-x #65a51d; }