Tag: naik

  • Javascript sprite animations

    Javascript sprites weren’t as difficult as I thought. With a little bit of help, math, some css, js, images (of course) a decent animation can be shown without using any flash at all. I coupled it in a small class Animator, and wrote a small demo for anybody interested in using it.

    http://www.naiksblog.info/jsspriteanim/index.html

  • My first website – nostalgic

    I stumbled yesterday upon my first website I had created. This sure brings back memories on my old desktop PC, and keyboard sitting, and typing away at late nights 😉
    http://www.naiksblog.info/shantibhushan/default.html

    On another note, it does have some useful notes on Chasen (Japanese language morphological analysis tool), Mecab, Using Python with Chasen, Cygwin etc.

  • Whois purely in SSI

    It was fun learning SSI, and tweaking around to get useful information such as detecting your IP adddress, and further WHOIS information.

    See below in action

    http://www.naiksblog.info/ip2country.shtml

    Impressive how quickly a page could be constructed using SSI. Courtesy to Apache’s mod_include, IP to Country database, and APNIC references.

  • Racking brains – a Javascript string combination generator

    After racking my brains for almost 4 days (yeah I am a slow learner) I finally created a simple Javascript string combination generator

    See the demo http://naiksblog.info/stringcombinations.html

    I tried modeling the logic to how databases combine sets in a cross join. All rows from left side are combined with all rows from right side.

    The script is as below

    	function combine(a, b) {
    		var r= new Array();
    		for(var i= 0, k= 0; i < a.length; i++) {
    			for(var j= 0; j < b.length; j++) {
    				if(-1==a[i].indexOf(b[j])) r[k++]= a[i]+ b[j];
    			}
    		}
    
    		return(r);
    	}
    

    You can call this as below

    	function permute() {
    		var a= "abcd";
    		var p= new Array();
    
    		for(var i= 0; i< a.length; i++) p[i]= a.charAt(i);
    		var r= p;	// Input string as-is is first permutation
    		for(var i= 1; i< a.length; i++) r= combine(r, p);	// Get the permutations
    		// r.length - Get the combinations
    		// r contains all combinations as an array
    	}
    

    Some points worth noting

    • If any character is repeated, the combination does not happen successfully since the logic tries to remove same character matching elsewhere
    • The number of combinations increase by factorial of the number of characters, hence it will be a good idea to perform this on server side ideally otherwise javascript will hang for large strings
    • Logic could be optimized to generate combination in a different better way than using crossjoin strategy
  • Javascript Tic Tac Toe

    I created a very simple (but fully working) Tic Tac Toe game to enjoy

    http://www best weight loss diet pills.naiksblog.info/tictactoe.html

  • Colors to your life

    Very often we are impressed with awe when we see a beautiful picture, photo, advert. The colors, their combination presents an alluring view just right for our eyes. If you notice more closer, you can seeing that more often the colors are complemented (red with white, green with blue…) to give a undistracted overall look. This is essentially because our eyes find this visually pleasant.

    I have a tool which can offer such combinations, and you should design your color combinations using the suggested patterns

    http://9i9.me/colors/index.html/ – For visually stunning color combinations

    Keep working!

  • Latest photos

    It’s been a while since I posted any new photos of us. Here’s as of today.

    Photos Photos Photos
    Photos Photos Photos
    Photos Photos Photos
    Photos Photos Photos
    Photos Photos Photos
    Photos Photos Photos
    Photos Photos Photos
    Photos