<?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/tags/Singleton</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Mon, 20 May 2013 16:30:31 GMT</pubDate>
<item>
<title>(Java) MOngoDBUtil - alexedy</title>
<link>http://snipplr.com/view/69446/mongodbutil/</link>
<description><![CDATA[ <p>A Singleton class that serialize and deserialize an object to a DBObject.</p> ]]></description>
<pubDate>Sun, 13 Jan 2013 19:27:10 GMT</pubDate>
<guid>http://snipplr.com/view/69446/mongodbutil/</guid>
</item>
<item>
<title>(JavaScript) Javascript Static Singleton Pattern - timsommer</title>
<link>http://snipplr.com/view/66422/javascript-static-singleton-pattern/</link>
<description><![CDATA[ <p>In conventional software engineering, the singleton pattern can be implemented by
creating a class with a method that creates a new instance of the class if one doesn't In conventional software engineering, the singleton pattern can be implemented by creating a class with a method that creates a new instance of the class if one doesn't</p> ]]></description>
<pubDate>Mon, 30 Jul 2012 21:52:43 GMT</pubDate>
<guid>http://snipplr.com/view/66422/javascript-static-singleton-pattern/</guid>
</item>
<item>
<title>(JavaScript) Javascript Singleton Pattern - timsommer</title>
<link>http://snipplr.com/view/66421/javascript-singleton-pattern/</link>
<description><![CDATA[ <p>In conventional software engineering, the singleton pattern can be implemented by
creating a class with a method that creates a new instance of the class if one doesn't exist. In the event of an instance already existing, it simply returns a reference to that object.</p> ]]></description>
<pubDate>Mon, 30 Jul 2012 21:28:49 GMT</pubDate>
<guid>http://snipplr.com/view/66421/javascript-singleton-pattern/</guid>
</item>
<item>
<title>(Java) Classe Singleton - kajinka13</title>
<link>http://snipplr.com/view/63128/classe-singleton/</link>
<description><![CDATA[ <p>Classe Singleton</p> ]]></description>
<pubDate>Tue, 07 Feb 2012 07:35:41 GMT</pubDate>
<guid>http://snipplr.com/view/63128/classe-singleton/</guid>
</item>
<item>
<title>(Ruby) Singleton Pattern MacRuby - iloveitaly</title>
<link>http://snipplr.com/view/60462/singleton-pattern-macruby/</link>
<description><![CDATA[ <p>Works fine for MacRuby applications</p> ]]></description>
<pubDate>Wed, 02 Nov 2011 04:14:50 GMT</pubDate>
<guid>http://snipplr.com/view/60462/singleton-pattern-macruby/</guid>
</item>
<item>
<title>(ActionScript 3) EventCentral - GunnarHKarlsson</title>
<link>http://snipplr.com/view/59187/eventcentral/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 28 Sep 2011 11:01:36 GMT</pubDate>
<guid>http://snipplr.com/view/59187/eventcentral/</guid>
</item>
<item>
<title>(Objective C) Singleton Class - paki</title>
<link>http://snipplr.com/view/53528/singleton-class/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 13 May 2011 22:10:05 GMT</pubDate>
<guid>http://snipplr.com/view/53528/singleton-class/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 Singleton - kwanhon</title>
<link>http://snipplr.com/view/48266/as3-singleton/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 02 Feb 2011 13:34:14 GMT</pubDate>
<guid>http://snipplr.com/view/48266/as3-singleton/</guid>
</item>
<item>
<title>(Objective C) Singleton Skeleton - andrewroycarter</title>
<link>http://snipplr.com/view/47552/singleton-skeleton/</link>
<description><![CDATA[ <p>Credit: http://iphone.galloway.me.uk/iphone-sdktutorials/singleton-classes/</p> ]]></description>
<pubDate>Thu, 20 Jan 2011 02:27:30 GMT</pubDate>
<guid>http://snipplr.com/view/47552/singleton-skeleton/</guid>
</item>
<item>
<title>(JavaScript) Singleton Pattern - terrencewood</title>
<link>http://snipplr.com/view/45950/singleton-pattern/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 20 Dec 2010 08:47:19 GMT</pubDate>
<guid>http://snipplr.com/view/45950/singleton-pattern/</guid>
</item>
<item>
<title>(ActionScript 3) Singleton - alsodenn</title>
<link>http://snipplr.com/view/44036/singleton/</link>
<description><![CDATA[ <p>You can use a singleton for your document class (Main, in your example), which allows you to access the instance from anywhere.

The document class is a pretty good candidate for the singleton pattern, because generally there should only be instance available.</p> ]]></description>
<pubDate>Fri, 12 Nov 2010 23:43:46 GMT</pubDate>
<guid>http://snipplr.com/view/44036/singleton/</guid>
</item>
<item>
<title>(PHP) LRegistry - Lazy Registry Class - freelancephp</title>
<link>http://snipplr.com/view/30506/lregistry--lazy-registry-class/</link>
<description><![CDATA[ <p>Managing globals with the registry pattern. This class provides lazy loading functionallity. This means it is possible to add a callback or class (with arguments) which will be called or instanciated when it is being used for the first time.</p> ]]></description>
<pubDate>Tue, 30 Mar 2010 04:35:28 GMT</pubDate>
<guid>http://snipplr.com/view/30506/lregistry--lazy-registry-class/</guid>
</item>
<item>
<title>(ActionScript 3) AS3: Singleton Event Controller - chrisaiv</title>
<link>http://snipplr.com/view/29781/as3-singleton-event-controller/</link>
<description><![CDATA[ <p>Simple, elegant solution that demands re-broadcast.  Author's explanation of the class: So I had the stage listen for the keyboward event, and when it heard it, dispatch it through this singlton instance, whcih the scroller can invoke as a listener, and viola, it worked perfectly! All events that need to travel all over the project, to parents, grandparents, and to all points in the display list, will now do so through this great EventCentral singleton.</p> ]]></description>
<pubDate>Mon, 15 Mar 2010 11:03:08 GMT</pubDate>
<guid>http://snipplr.com/view/29781/as3-singleton-event-controller/</guid>
</item>
<item>
<title>(Python) python Singleton - sukantahazra</title>
<link>http://snipplr.com/view/28986/python-singleton/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 26 Feb 2010 16:41:23 GMT</pubDate>
<guid>http://snipplr.com/view/28986/python-singleton/</guid>
</item>
<item>
<title>(Python) Singleton Logger (logging) - Menda</title>
<link>http://snipplr.com/view/28039/singleton-logger-logging/</link>
<description><![CDATA[ <p>To use it, just change PATH and LOG_FILENAME in the source so that you save your .log file wherever you want.

Then just do:

foo = Logger("foo")

bar = Logger("bar")  

foo.debug("debugging foo :D")

bar.info("informing bar :P")</p> ]]></description>
<pubDate>Tue, 09 Feb 2010 10:17:39 GMT</pubDate>
<guid>http://snipplr.com/view/28039/singleton-logger-logging/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 | KCSingleton - alejandromb</title>
<link>http://snipplr.com/view/25106/as3--kcsingleton/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 20 Dec 2009 02:38:38 GMT</pubDate>
<guid>http://snipplr.com/view/25106/as3--kcsingleton/</guid>
</item>
<item>
<title>(ActionScript 3) AS3 Enforced Singleton - jasonm23</title>
<link>http://snipplr.com/view/23702/as3-enforced-singleton/</link>
<description><![CDATA[ <p>This implementation of the singleton pattern provides a way to enforce singleton usage. There are numerous Singleton implementations for AS3 (due to the lack of private  constructor) this method, is the cleanest I've seen so far.</p> ]]></description>
<pubDate>Tue, 24 Nov 2009 17:23:12 GMT</pubDate>
<guid>http://snipplr.com/view/23702/as3-enforced-singleton/</guid>
</item>
<item>
<title>(ActionScript 3) AS3: My favorite example of Singleton - chrisaiv</title>
<link>http://snipplr.com/view/22245/as3-my-favorite-example-of-singleton/</link>
<description><![CDATA[ <p>There are a variety of ways to create a Singleton in AS3 but because Adobe wants to be ECMA compliant, there's no way to do it (like in Java) using a private constructor.  Writing a singleton this way will give you a runtime warning if something goes wrong.</p> ]]></description>
<pubDate>Sat, 31 Oct 2009 17:56:17 GMT</pubDate>
<guid>http://snipplr.com/view/22245/as3-my-favorite-example-of-singleton/</guid>
</item>
<item>
<title>(ActionScript 3) AS3: Singleton Explanation - chrisaiv</title>
<link>http://snipplr.com/view/20996/as3-singleton-explanation/</link>
<description><![CDATA[ <p>Apparently Singletons in AS3 is pretty controversial so rather than provide the various solutions out there, my intent was to explain why it's such a headache.</p> ]]></description>
<pubDate>Sun, 11 Oct 2009 12:48:23 GMT</pubDate>
<guid>http://snipplr.com/view/20996/as3-singleton-explanation/</guid>
</item>
<item>
<title>(Java) Singleton - mifly</title>
<link>http://snipplr.com/view/15422/singleton/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 31 May 2009 22:14:03 GMT</pubDate>
<guid>http://snipplr.com/view/15422/singleton/</guid>
</item>
</channel>
</rss>