18 Sep 2014

javascript array rotate

22:28 | javascript | 1153 views

Goal: to rotate a javascript array This is similar to the assembly shift operation with bites 01011 -> rotate left 2 -> 01101 The solution is simple: for (var i = 0; i < 2; i++) { array.push(array.shift()); } [/js] The shift() will cut/remove the first element from the array. The second step is to […]


13 Sep 2014

js array Cheet Sheet

19:26 | cheetsheet, javascript | 1339 views

Goal: Collect the array manipulation methods 1. add item to an array shift: The shift() method removes the first element from an array and returns that element. This method changes the length of the array. pop: The pop() method removes the last element from an array and returns that element. 3. insert item to an […]


3 Sep 2014

wordpress date format Cheet Sheet

21:23 | cheetsheet, wordpress | 1265 views

Goal: wordpress date formatting reference sample Day of Month Weekday Month Year Time Full Date/Time see also: http://codex.wordpress.org/Formatting_Date_and_Time


3 Sep 2014

edit in place

14:56 | javascript, web trick | 1105 views

Goal: To create a simple editable field on my page There is a simple way to create an editable DIV field. We can start the editing by click or simple on getting focus. So in this case the editor is the container itself. Forget to create input boxes or textarea-s and forget the additional event […]


26 Jul 2014

support oracle with an external application over tcp

11:23 | .net, oracle | 1547 views

Goal: integrate an external application data to my database I had a small desktop application which is asking a web page about information. The application itself is a simple web robot. Login with credentials, passing through some pages to get the correct information. Using GET, POST methods as well in the process and at the […]


21 Jul 2014

javascript remove comments safely and correctly

9:04 | .net, javascript | 1115 views

Goal: remove the code comments correctly One part of my javascript minimize process is to remove the comments from the code. As we know the there are two comment types in js: Here is a simple c# code to drop the comments. This code is seemingly correct but there are some special cases like the […]


17 Jul 2014

simple mdac test

11:59 | database | 1185 views

Goal: to show a simple way to test a data provider The base problem is to check quickly the data provider we need. In this case this is an old odbc driver for a dbf database. Seemingly the simpliest way is this following: First of all we need an installed excel, because we will use […]


10 Jul 2014

javascript float strange behavior

21:58 | javascript, tricky | 1319 views

Goal: to discover some black hole Javascript is perfect but… check this small piece of code for(var i = 0;i < 5; i+=.1){console.log(i);} [/js] This is a simple iteration but the result is terrible: (with other arguments like .2, .3 ... the result will be different but bad as well - try) [js] 0 0.1 […]


3 Jul 2014

setTimeout with parameters

18:26 | javascript, tricky | 1156 views

Goal: to find a compatible form of setTimeout calling with parameters The general form is easy, but not working under ie… The following form is ie compatible…


29 Jun 2014

detect the ie version on the client side

14:17 | web trick | 1301 views

Goal: feature specific ie version detection I’ve found somewhere a tricky solution for this problem. Here is a little bit modified version of that: The isIE variable will be the version number if we have an internet explorer in other cases this variable will be . The original method not working above ie9, that’s why […]


#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; }