This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Get random charactor from a given charset | |
*/ | |
var getRandomChar = (function(str) { | |
var len = str.length; | |
return function() { | |
return str.charAt(Math.floor(Math.random() * len)); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(str){ | |
var maxPalin=''; | |
for(var i=0,len=str.length;i<len;++i){ | |
var letter=str[i],substr; | |
for(var j=i;j<len;++j){ | |
if(letter == str[j]){ | |
maxPalin=(function(substr){ | |
return (function(substr){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var imageList=(function(){ | |
var _list=[],_head; | |
$('#imageList li').each(function(){ | |
_list.push($(this)); | |
}); | |
_head=_list[0]; | |
return { |
NewerOlder