<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: JavaScript GUID Generator</title>
	<atom:link href="http://www.andrewsellick.com/92/javascript-guid-generator/feed" rel="self" type="application/rss+xml" />
	<link>http://www.andrewsellick.com/92/javascript-guid-generator</link>
	<description>andrewsellick.com</description>
	<lastBuildDate>Wed, 08 Sep 2010 21:38:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Ron Fredericks</title>
		<link>http://www.andrewsellick.com/92/javascript-guid-generator/comment-page-1#comment-57082</link>
		<dc:creator>Ron Fredericks</dc:creator>
		<pubDate>Thu, 11 Feb 2010 22:55:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrewsellick.com/92/javascript-guid-generator#comment-57082</guid>
		<description>I made a few more fixes...





Untitled Document

function S4() {
	// add a seed to randome number generator, RDF
	now = new Date();
	seed = now.getSeconds();
	// replace 0x10000 with this format: *parseInt(&#039;10000&#039;,16); RDF
	// replace substring(1) with a 4 digit hex string like this: substring(1,5); RDF
	return ((1+Math.random(seed))*parseInt(&#039;10000&#039;,16)).toString(16).substring(1,5);
}
function generateGuid(){
        return (S4()+S4()+&quot;-&quot;+S4()+&quot;-&quot;+S4()+&quot;-&quot;+S4()+&quot;-&quot;+S4()+S4()+S4()).toUpperCase();
}





// test the GUID generator
document.writeln(generateGuid());



</description>
		<content:encoded><![CDATA[<p>I made a few more fixes&#8230;</p>
<p>Untitled Document</p>
<p>function S4() {<br />
	// add a seed to randome number generator, RDF<br />
	now = new Date();<br />
	seed = now.getSeconds();<br />
	// replace 0&#215;10000 with this format: *parseInt(&#8217;10000&#8242;,16); RDF<br />
	// replace substring(1) with a 4 digit hex string like this: substring(1,5); RDF<br />
	return ((1+Math.random(seed))*parseInt(&#8217;10000&#8242;,16)).toString(16).substring(1,5);<br />
}<br />
function generateGuid(){<br />
        return (S4()+S4()+&#8221;-&#8221;+S4()+&#8221;-&#8221;+S4()+&#8221;-&#8221;+S4()+&#8221;-&#8221;+S4()+S4()+S4()).toUpperCase();<br />
}</p>
<p>// test the GUID generator<br />
document.writeln(generateGuid());</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron Fredericks</title>
		<link>http://www.andrewsellick.com/92/javascript-guid-generator/comment-page-1#comment-57081</link>
		<dc:creator>Ron Fredericks</dc:creator>
		<pubDate>Thu, 11 Feb 2010 22:52:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrewsellick.com/92/javascript-guid-generator#comment-57081</guid>
		<description>Oops, I have two more fixes to make the GUID a little more usable and a little more random...





Untitled Document

function S4() {
	// add a seed to randome number generator, RDF
	now = new Date();
	seed = now.getSeconds();
	// replace 0x10000 with this format: *parseInt(&#039;10000&#039;,16); RDF
	// replace substring(1) with a 4 digit hex string like this: substring(1,5); RDF
	return ((1+Math.random(seed))*parseInt(&#039;10000&#039;,16)).toString(16).substring(1,5);
}
function generateGuid(){
        return (S4()+S4()+&quot;-&quot;+S4()+&quot;-&quot;+S4()+&quot;-&quot;+S4()+&quot;-&quot;+S4()+S4()+S4()).toUpperCase();
}





// test the GUID generator
document.writeln(generateGuid());



</description>
		<content:encoded><![CDATA[<p>Oops, I have two more fixes to make the GUID a little more usable and a little more random&#8230;</p>
<p>Untitled Document</p>
<p>function S4() {<br />
	// add a seed to randome number generator, RDF<br />
	now = new Date();<br />
	seed = now.getSeconds();<br />
	// replace 0&#215;10000 with this format: *parseInt(&#8217;10000&#8242;,16); RDF<br />
	// replace substring(1) with a 4 digit hex string like this: substring(1,5); RDF<br />
	return ((1+Math.random(seed))*parseInt(&#8217;10000&#8242;,16)).toString(16).substring(1,5);<br />
}<br />
function generateGuid(){<br />
        return (S4()+S4()+&#8221;-&#8221;+S4()+&#8221;-&#8221;+S4()+&#8221;-&#8221;+S4()+&#8221;-&#8221;+S4()+S4()+S4()).toUpperCase();<br />
}</p>
<p>// test the GUID generator<br />
document.writeln(generateGuid());</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ton Fredericks</title>
		<link>http://www.andrewsellick.com/92/javascript-guid-generator/comment-page-1#comment-57080</link>
		<dc:creator>Ton Fredericks</dc:creator>
		<pubDate>Thu, 11 Feb 2010 22:23:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrewsellick.com/92/javascript-guid-generator#comment-57080</guid>
		<description>The term 0x10000 in function s4() seems to be the source of error in my use of the proposed javascript GUID creator. Here is my proposed solution:

 



Untitled Document

function S4() {
	// replace 0x10000 with this format: *parseInt(&#039;10000&#039;,16); RDF
	return ((1+Math.random())*parseInt(&#039;10000&#039;,16)).toString(16).substring(1);
}
function generateGuid(){
        return (S4()+S4()+&quot;-&quot;+S4()+&quot;-&quot;+S4()+&quot;-&quot;+S4()+&quot;-&quot;+S4()+S4()+S4()).toUpperCase();
}





// test the GUID generator
alert(generateGuid());



</description>
		<content:encoded><![CDATA[<p>The term 0&#215;10000 in function s4() seems to be the source of error in my use of the proposed javascript GUID creator. Here is my proposed solution:</p>
<p>Untitled Document</p>
<p>function S4() {<br />
	// replace 0&#215;10000 with this format: *parseInt(&#8217;10000&#8242;,16); RDF<br />
	return ((1+Math.random())*parseInt(&#8217;10000&#8242;,16)).toString(16).substring(1);<br />
}<br />
function generateGuid(){<br />
        return (S4()+S4()+&#8221;-&#8221;+S4()+&#8221;-&#8221;+S4()+&#8221;-&#8221;+S4()+&#8221;-&#8221;+S4()+S4()+S4()).toUpperCase();<br />
}</p>
<p>// test the GUID generator<br />
alert(generateGuid());</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.375 seconds -->
