Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home3/intimida/public_html/intimidatingbits/index.php:7) in /home3/intimida/public_html/intimidatingbits/wp-content/plugins/si-captcha-for-wordpress/si-captcha.php on line 431

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home3/intimida/public_html/intimidatingbits/index.php:7) in /home3/intimida/public_html/intimidatingbits/wp-content/plugins/si-captcha-for-wordpress/si-captcha.php on line 431

Warning: Cannot modify header information - headers already sent by (output started at /home3/intimida/public_html/intimidatingbits/index.php:7) in /home3/intimida/public_html/intimidatingbits/wp-includes/feed-rss2.php on line 8
My Blog http://www.intimidatingbits.com Just another WordPress weblog Mon, 10 Aug 2009 02:22:16 +0000 en hourly 1 http://wordpress.org/?v=3.0.1 Hello world! http://www.intimidatingbits.com/?p=1 http://www.intimidatingbits.com/?p=1#comments Mon, 03 Aug 2009 18:38:02 +0000 admin http://www.intimidatingbits.com/?p=1 Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

var palindrome = "a man a plan a canal panama";
 
function detectPalindrome(inThisString){
    // first we remove all the white space, because we're going on the premise that it's
    // non significant
    var testString = inThisString.replace(/\W/g, "");
    // then we just compare the letter at a given offset from the front to the letter of
    // the same offset from the back, any difference no palindrome
    for (var x=0;x< testString.length;x++){
        if (testString[x] != testString[testString.length - (x + 1)]){
            return false;
        }
    }
    return true;
}
 
var palindromeIsPalindrome = detectPalindrome(palindrome);
var nonPalindromeIsPalindrome = detectPalindrome("rooster");
 
alert("Palindrome: " + palindromeIsPalindrome + "\nNon: " + nonPalindromeIsPalindrome);
]]>
http://www.intimidatingbits.com/?feed=rss2&p=1 11