Thursday, May 22, 2014

Tips for JS

Instagram
Seacrh a value exists in string or array  (indexOf()
 
var str = "Hello world";
var n = str.indexOf("world")

This will return 2 for n. (Position of search key "world").
For not existing values this function will return -1.  ;)

* When delete an item in array always use splice instead of delete. Coz delete will replace the deleted item from undefined but splice not.

============================================================================
Disable Backspace and delete key

Insert following code in JS file

function disableBackspace(evt, obj) {
    var charCode = (evt.which) ? evt.which : evt.keyCode
    if ((charCode == 8 || charCode == 46) && clientMaskcurr.length >=   obj.selectionEnd ) return false;
    return true;
}


Insert following code in HTML related input

<input disableBackspace(event,this) .... >

Monday, April 28, 2014

Gedit For Erlang (Syntax Highlighting) And Edit Remote files from Gedit

        


Instagram
Download this language definition file for Erlang. (Written by Martin Ankerl) This will support to Gnome standard editor Gedit

As I'm a Ubuntu user this will explain how to configure the language highlighting component only to Gnome's Gedit tool..... :) :D [Btw there are many tools and tips for windows users always ;) ]


Wednesday, April 16, 2014

Turbo C compiling environment for windows 8

Instagram

You can download the all in one solution of C IDE for windows 7,8 32 and 64 bits from here.


After that set the environment variable if you wish to compile your source from anywhere then do the coding. ;)


If need any help about setting environment variable or any other matters just ask. I ll reply or put further more posts..... ;) Happy Hacking..... ;)