<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/favorites/shachi</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Mon, 01 Dec 2008 19:41:04 GMT</pubDate>
<item>
<title>(PHP) Test if a number is odd or even using bitwise operator - shachi</title>
<link>http://snipplr.com/view/2431/test-if-a-number-is-odd-or-even-using-bitwise-operator/</link>
<description><![CDATA[ <p>In PHP &amp; or AND is a bitwise operator. When used it performs bitwise operation between two numbers. In the following example, the operator will test if the last bit of $number is 1. Thus successfully tests if $number is even or odd.</p> ]]></description>
<pubDate>Wed, 04 Apr 2007 09:25:21 GMT</pubDate>
<guid>http://snipplr.com/view/2431/test-if-a-number-is-odd-or-even-using-bitwise-operator/</guid>
</item>
<item>
<title>(JavaScript) Use a regex on a multiline string - shachi</title>
<link>http://snipplr.com/view/2419/use-a-regex-on-a-multiline-string/</link>
<description><![CDATA[ <p>Apply string.replace() where string has line breaks, and .replace() only happens for the first line of the string!  The fix is to turn newlines into unicode characters, run the regex, then turn the unicode back into newlines.

From comp.lang.javascript (thanks, Evertjan):</p> ]]></description>
<pubDate>Fri, 30 Mar 2007 09:14:35 GMT</pubDate>
<guid>http://snipplr.com/view/2419/use-a-regex-on-a-multiline-string/</guid>
</item>
<item>
<title>(JavaScript) Comprobar fecha 2 - shachi</title>
<link>http://snipplr.com/view/2403/comprobar-fecha-2/</link>
<description><![CDATA[ <p>isDate(y: Integer, m: Integer, d: Integer): Integer

Checks a date and returns 0 if it's valid or one of the error codes bellow.
	
y year	
m month	
d day

Return codes
    * 	0 = Valid date
    * 	1 = Date format invalid (regular expression failed or amount of arguments != 3)
    * 	2 = Day isn't between 1 and 31
    * 	3 = Month isn't between 1 and 12
    * 	4 = On April, June, September and November there isn't the day 31
    * 	5 = On February the month has only 28 days
    * 	6 = Leap year, February has only 29 days</p> ]]></description>
<pubDate>Wed, 28 Mar 2007 01:18:06 GMT</pubDate>
<guid>http://snipplr.com/view/2403/comprobar-fecha-2/</guid>
</item>
<item>
<title>(JavaScript) delete it - shachi</title>
<link>http://snipplr.com/view/2393/delete-it/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 27 Mar 2007 01:27:08 GMT</pubDate>
<guid>http://snipplr.com/view/2393/delete-it/</guid>
</item>
<item>
<title>(JavaScript) Javascript - Play Sound (IE &amp;amp; FF) - shachi</title>
<link>http://snipplr.com/view/2384/javascript--play-sound-ie--ff/</link>
<description><![CDATA[ <p>Full example play sound and off&amp;On sound play (Cookie engine).
Only copy one wav file in root, and the file of rename "_sonido.wav". 
Create icons images/ico_on.gif, images/ico_off.gif.</p> ]]></description>
<pubDate>Sat, 24 Mar 2007 12:36:58 GMT</pubDate>
<guid>http://snipplr.com/view/2384/javascript--play-sound-ie--ff/</guid>
</item>
<item>
<title>(JavaScript) copy selected text - shachi</title>
<link>http://snipplr.com/view/2383/copy-selected-text/</link>
<description><![CDATA[ <p>This function returns the text that the user currently has selected.</p> ]]></description>
<pubDate>Fri, 23 Mar 2007 14:28:37 GMT</pubDate>
<guid>http://snipplr.com/view/2383/copy-selected-text/</guid>
</item>
<item>
<title>(JavaScript) addClass Function - shachi</title>
<link>http://snipplr.com/view/2181/addclass-function/</link>
<description><![CDATA[ <p>Function to look if an element has a class, if it doesn't simply add it to the element. If it does have a class add it to the class that is already there. Function expects 2 values, the element to add the class to, and the new class name (value).</p> ]]></description>
<pubDate>Mon, 19 Feb 2007 06:43:37 GMT</pubDate>
<guid>http://snipplr.com/view/2181/addclass-function/</guid>
</item>
<item>
<title>(JavaScript) Stripe Table Rows DOM JS Function - shachi</title>
<link>http://snipplr.com/view/2167/stripe-table-rows-dom-js-function/</link>
<description><![CDATA[ <p>This function looks for tables in a web page, then loops through the rows and sets the backgroundColor for ever other row.This creates a striped table which is easier to read.</p> ]]></description>
<pubDate>Tue, 13 Feb 2007 06:29:15 GMT</pubDate>
<guid>http://snipplr.com/view/2167/stripe-table-rows-dom-js-function/</guid>
</item>
<item>
<title>(JavaScript) Usage of getNextElement Function - shachi</title>
<link>http://snipplr.com/view/2165/usage-of-getnextelement-function/</link>
<description><![CDATA[ <p>Usage of the getNextElement function. Very basic usage to pick out the h1 tags, then change the properties of the next element(not node).</p> ]]></description>
<pubDate>Tue, 13 Feb 2007 05:40:55 GMT</pubDate>
<guid>http://snipplr.com/view/2165/usage-of-getnextelement-function/</guid>
</item>
<item>
<title>(JavaScript) getNextElement DOM function - shachi</title>
<link>http://snipplr.com/view/2164/getnextelement-dom-function/</link>
<description><![CDATA[ <p>Useful function for CSS DOM, returns the next element after the selected node. So you could style the element directly after a h1 element for example.</p> ]]></description>
<pubDate>Tue, 13 Feb 2007 04:48:15 GMT</pubDate>
<guid>http://snipplr.com/view/2164/getnextelement-dom-function/</guid>
</item>
<item>
<title>(JavaScript) Dom enhancing content - shachi</title>
<link>http://snipplr.com/view/2115/dom-enhancing-content/</link>
<description><![CDATA[ <p>This is another script from the DOM scripting book. Not really relevant to anybody else. Useful for reminding myself about the DOM.</p> ]]></description>
<pubDate>Sun, 04 Feb 2007 14:22:54 GMT</pubDate>
<guid>http://snipplr.com/view/2115/dom-enhancing-content/</guid>
</item>
<item>
<title>(JavaScript) Full Gallery JS Tutorial - shachi</title>
<link>http://snipplr.com/view/2108/full-gallery-js-tutorial/</link>
<description><![CDATA[ <p>Not really relevant to anybody else. Full unobtrusive js file for a simple gallery. From DOM Scripting by Jeremy Keith (superb book, highly recommend it for anyone looking to move into DOM scripting)</p> ]]></description>
<pubDate>Sat, 03 Feb 2007 15:33:50 GMT</pubDate>
<guid>http://snipplr.com/view/2108/full-gallery-js-tutorial/</guid>
</item>
<item>
<title>(JavaScript) insertAfter function for the DOM - shachi</title>
<link>http://snipplr.com/view/2107/insertafter-function-for-the-dom/</link>
<description><![CDATA[ <p>Vert useful function since there isn't an insertAfter function in the DOM. Call it inside scripts, it expects
insertAfter(*the new element to be inserted*, *the element you want it to be inserted after*);</p> ]]></description>
<pubDate>Sat, 03 Feb 2007 15:03:16 GMT</pubDate>
<guid>http://snipplr.com/view/2107/insertafter-function-for-the-dom/</guid>
</item>
<item>
<title>(JavaScript) timestamp now - shachi</title>
<link>http://snipplr.com/view/2101/timestamp-now/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 03 Feb 2007 02:51:23 GMT</pubDate>
<guid>http://snipplr.com/view/2101/timestamp-now/</guid>
</item>
<item>
<title>(JavaScript) Javascript DOM - shachi</title>
<link>http://snipplr.com/view/1994/javascript-dom/</link>
<description><![CDATA[ <p>A few functions to handle DOM events (firstChild, nextSibling, firstSibling, lastSibling)

Accounts for firefox treating /n as a node.</p> ]]></description>
<pubDate>Wed, 17 Jan 2007 09:42:20 GMT</pubDate>
<guid>http://snipplr.com/view/1994/javascript-dom/</guid>
</item>
<item>
<title>(JavaScript) hightlight-list.js - shachi</title>
<link>http://snipplr.com/view/1975/hightlightlistjs/</link>
<description><![CDATA[ <p>交互に背景色を変えるスクリプト.
XHTML basic templateと合わせて参考にどうぞ.
本当はCSSクラスを振って, スタイルはCSSで付けたほうがいいけど取り急ぎ.</p> ]]></description>
<pubDate>Sun, 14 Jan 2007 04:04:07 GMT</pubDate>
<guid>http://snipplr.com/view/1975/hightlightlistjs/</guid>
</item>
<item>
<title>(JavaScript) Graph JavaScript framework, version 0.0.1 - shachi</title>
<link>http://snipplr.com/view/1950/graph-javascript-framework-version-001/</link>
<description><![CDATA[ <p>Mirror of library</p> ]]></description>
<pubDate>Mon, 08 Jan 2007 16:29:34 GMT</pubDate>
<guid>http://snipplr.com/view/1950/graph-javascript-framework-version-001/</guid>
</item>
<item>
<title>(JavaScript) Smiley Script - shachi</title>
<link>http://snipplr.com/view/1903/smiley-script/</link>
<description><![CDATA[ <p>Adds custom smileys to xanga</p> ]]></description>
<pubDate>Sat, 30 Dec 2006 09:57:46 GMT</pubDate>
<guid>http://snipplr.com/view/1903/smiley-script/</guid>
</item>
<item>
<title>(JavaScript) Replace Words - shachi</title>
<link>http://snipplr.com/view/1900/replace-words/</link>
<description><![CDATA[ <p>Replaces certain words in a xanga with others</p> ]]></description>
<pubDate>Sat, 30 Dec 2006 09:46:41 GMT</pubDate>
<guid>http://snipplr.com/view/1900/replace-words/</guid>
</item>
<item>
<title>(JavaScript) Custom Module - shachi</title>
<link>http://snipplr.com/view/1899/custom-module/</link>
<description><![CDATA[ <p>Adds custom module in a xanga. Paste in webstats.</p> ]]></description>
<pubDate>Sat, 30 Dec 2006 09:45:13 GMT</pubDate>
<guid>http://snipplr.com/view/1899/custom-module/</guid>
</item>
</channel>
</rss>