Friday, December 15, 2017

SQL - update column with sequence number starting from 1


DECLARE @id INT;
SET @id = 0
UPDATE x SET @id = [ItemNo] = @id + 1

Thursday, October 12, 2017

Find position of object in the screen

Tested it, it works pretty nice in FF, Chrome, IE, Safari too.
function resetPosition(object, args) {
/* find the textbox object */
var tb = object._element;
/* measure textbox height */
var tbheight = tb.offsetHeight;
/* find textbox in the page */
var rect = tb.getBoundingClientRect();
var divleft = Math.floor(rect.left);
var divtop = Math.floor(rect.top + tbheight);
/* find the auto complete extender div in the page */
var ex = object._completionListElement;
/* move the ace to the right position */
if (ex)
$common.setLocation(ex, new Sys.UI.Point(divleft, divtop));
}

Monday, May 15, 2017

Whatsapp issues

Android connection issues for whatsapp, gmail, or whatever.
Go to settings - connection - more networks - mobile networks - access point names
I had to swith it from wap to net to make it work.