<?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/object</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 19 Jun 2013 12:41:13 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) Template for a Javascript function with optional and mandatory arguments passed as an object collection - davidwaterston</title>
<link>http://snipplr.com/view/68920/template-for-a-javascript-function-with-optional-and-mandatory-arguments-passed-as-an-object-collection/</link>
<description><![CDATA[ <p>A simple template for a JavaScript function which allows for an arbitrary number of named arguments to be passed in. This is achieved by passing a single object as an argument with each of the 'real' arguments being a key/value pair. In this way arguments can be passed in any order and we can easily add in new arguments.

To call, simply pass in an object with the required arguments:
    myFunction ({opt1: 'cat', opt4: 'dog', opt2: 'monkey'})

Validates clean in jsLint.</p> ]]></description>
<pubDate>Mon, 03 Dec 2012 07:48:27 GMT</pubDate>
<guid>http://snipplr.com/view/68920/template-for-a-javascript-function-with-optional-and-mandatory-arguments-passed-as-an-object-collection/</guid>
</item>
<item>
<title>(Objective C) xcode Objective C - build class / objects - kutyadog</title>
<link>http://snipplr.com/view/67791/xcode-objective-c--build-class--objects/</link>
<description><![CDATA[ <p>Example of how to build and call a class or object</p> ]]></description>
<pubDate>Thu, 18 Oct 2012 07:40:34 GMT</pubDate>
<guid>http://snipplr.com/view/67791/xcode-objective-c--build-class--objects/</guid>
</item>
<item>
<title>(JavaScript) JSON Tree(1 function 15 lines)Nested Ul from single or multidimensional json object - halk</title>
<link>http://snipplr.com/view/67767/json-tree1-function-15-linesnested-ul-from-single-or-multidimensional-json-object/</link>
<description><![CDATA[ <p>Any valid json object will be recursively traversed building a nested unordered list of its properties and their values.  This example parses the json entered in the text area into an object that is passed to the json_tree() function.  I use the twitter bootstrap to make collapsible trees.  That is the purpose of thee css and the random string i generate.  I left it in as an example of how you might style the returned list.  This is very much a work in progress so if you have any suggestions please post a comment.  I have posted the entire html for a working example page just create the file and open it in your browser.(make sure your json validates - http://jsonlint.com - only valid json will produce a tree)</p> ]]></description>
<pubDate>Wed, 17 Oct 2012 04:48:13 GMT</pubDate>
<guid>http://snipplr.com/view/67767/json-tree1-function-15-linesnested-ul-from-single-or-multidimensional-json-object/</guid>
</item>
<item>
<title>(PHP) BaseObject - ryantxr</title>
<link>http://snipplr.com/view/67667/baseobject/</link>
<description><![CDATA[ <p>I use this as a parent for all classes to add logger methods and some other functions as needed.</p> ]]></description>
<pubDate>Wed, 10 Oct 2012 00:28:30 GMT</pubDate>
<guid>http://snipplr.com/view/67667/baseobject/</guid>
</item>
<item>
<title>(HTML) flash movie - paul0078</title>
<link>http://snipplr.com/view/64566/flash-movie/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 15 Apr 2012 20:11:07 GMT</pubDate>
<guid>http://snipplr.com/view/64566/flash-movie/</guid>
</item>
<item>
<title>(PHP) objectToArray Part 2 - jgomez</title>
<link>http://snipplr.com/view/64196/objecttoarray-part-2/</link>
<description><![CDATA[ <p>If you want to use this in a class, change the last line to:

` return array_map(array($this, __FUNCTION__), $object ); `</p> ]]></description>
<pubDate>Wed, 28 Mar 2012 20:02:52 GMT</pubDate>
<guid>http://snipplr.com/view/64196/objecttoarray-part-2/</guid>
</item>
<item>
<title>(PHP) objectToArray - jgomez</title>
<link>http://snipplr.com/view/64195/objecttoarray/</link>
<description><![CDATA[ <p>From this URL : http://www.phpro.org/examples/Convert-Object-To-Array-With-PHP.html</p> ]]></description>
<pubDate>Wed, 28 Mar 2012 19:10:36 GMT</pubDate>
<guid>http://snipplr.com/view/64195/objecttoarray/</guid>
</item>
<item>
<title>(PHP) PHP - Convert an object to an associative array - satie83</title>
<link>http://snipplr.com/view/64104/php--convert-an-object-to-an-associative-array/</link>
<description><![CDATA[ <p>Converts a php object to an associative array</p> ]]></description>
<pubDate>Thu, 22 Mar 2012 22:25:56 GMT</pubDate>
<guid>http://snipplr.com/view/64104/php--convert-an-object-to-an-associative-array/</guid>
</item>
<item>
<title>(JavaScript) Make an empty object in JavaScript - EvanHahn</title>
<link>http://snipplr.com/view/63892/make-an-empty-object-in-javascript/</link>
<description><![CDATA[ <p>`Object.create(null)` is a more memory-efficient way to make objects, but it's not supported in all versions of JavaScript, so you can do the "old-fashioned" `{}` if that function isn't available.</p> ]]></description>
<pubDate>Mon, 12 Mar 2012 09:59:34 GMT</pubDate>
<guid>http://snipplr.com/view/63892/make-an-empty-object-in-javascript/</guid>
</item>
<item>
<title>(ActionScript 3) Sort a object array - Narayon</title>
<link>http://snipplr.com/view/63712/sort-a-object-array/</link>
<description><![CDATA[ <p>Sorts an array of objects using the native sortOn method</p> ]]></description>
<pubDate>Mon, 05 Mar 2012 13:23:33 GMT</pubDate>
<guid>http://snipplr.com/view/63712/sort-a-object-array/</guid>
</item>
<item>
<title>(JavaScript) Get Object Size in JS - reverend</title>
<link>http://snipplr.com/view/63681/get-object-size-in-js/</link>
<description><![CDATA[ <p>Function to validate the existence of each key in the object to get the number of valid key/value pairs.</p> ]]></description>
<pubDate>Fri, 02 Mar 2012 10:45:09 GMT</pubDate>
<guid>http://snipplr.com/view/63681/get-object-size-in-js/</guid>
</item>
<item>
<title>(ActionScript 3) Object Builder - unkiwii</title>
<link>http://snipplr.com/view/63052/object-builder/</link>
<description><![CDATA[ <p>This is a helper class to create objects like if you were calling "apply" on the constructor object. An example:


class MyObject {
    public function MyObject(a, b, c) { ... }
}

// normal object creation
var a:MyObject = new MyObject('a', 'b', 'c');

// using ObjectBuilder
var p:Array = ['a', 'b', 'c'];
var b:MyOBject = ObjectBuilder.buildFromArray(MyObject, p);
</p> ]]></description>
<pubDate>Sat, 04 Feb 2012 04:41:11 GMT</pubDate>
<guid>http://snipplr.com/view/63052/object-builder/</guid>
</item>
<item>
<title>(PHP) concept: php multidimentional methods - Knarf</title>
<link>http://snipplr.com/view/62598/concept-php-multidimentional-methods/</link>
<description><![CDATA[ <p>A class i started to implement, which ended up in a working concept
However I'm not sure if it's a legal way of programming since I unnessesery
changes the structure of php without some real value except nicer structure

For now it remain a concept

Usage:

	concept::create()->create1();
	concept::create()->create2();
	concept::test()->test1();
	concept::test()->test2();</p> ]]></description>
<pubDate>Tue, 17 Jan 2012 19:55:11 GMT</pubDate>
<guid>http://snipplr.com/view/62598/concept-php-multidimentional-methods/</guid>
</item>
<item>
<title>(JavaScript) Optional function arguments/parameters by using associative array - coprolit</title>
<link>http://snipplr.com/view/62307/optional-function-argumentsparameters-by-using-associative-array/</link>
<description><![CDATA[ <p>By not being limited to provide certain arguments/parameters in right order when calling a function, makes the function more versatile and easier to extend without breaking old code (e.g. calls to the function). 
One solution is to pass an associative array holding the parameters. 
Advantage: argument order is unnecessary, each argument have a label - easier to remember.</p> ]]></description>
<pubDate>Thu, 05 Jan 2012 00:13:08 GMT</pubDate>
<guid>http://snipplr.com/view/62307/optional-function-argumentsparameters-by-using-associative-array/</guid>
</item>
<item>
<title>(ActionScript 3) Trial period - burnandbass</title>
<link>http://snipplr.com/view/62217/trial-period/</link>
<description><![CDATA[ <p>Use this if you need to make "trial period" to your app with Shared Objects. It is veri simple to use:

if(Validator.isActive(0,0,1)){
				trace("ENTER");
			} else {
				trace("YOUR DEMO IS OVER");
			}

this demo will be active only 1 minute. Pass the validor Validator.isActive(days,hours,minutes) number of days, hours and minutes and it will return boolean.</p> ]]></description>
<pubDate>Mon, 02 Jan 2012 04:45:15 GMT</pubDate>
<guid>http://snipplr.com/view/62217/trial-period/</guid>
</item>
<item>
<title>(JavaScript) JavaScript Object Prototypal inheritance - luizlopes</title>
<link>http://snipplr.com/view/60905/javascript-object-prototypal-inheritance/</link>
<description><![CDATA[ <p>an operator that implements true prototypal Object inheritance in JavaScript</p> ]]></description>
<pubDate>Thu, 17 Nov 2011 05:10:33 GMT</pubDate>
<guid>http://snipplr.com/view/60905/javascript-object-prototypal-inheritance/</guid>
</item>
<item>
<title>(JavaScript) get RGBA values as an object - claudiowebdesign</title>
<link>http://snipplr.com/view/60570/get-rgba-values-as-an-object/</link>
<description><![CDATA[ <p>this function gets a parameter like an hex color (es: "#ffffff"), an abbreviated hex color (es: "#fff"), an rgb color (es: "rgb(255,255,255)") or an rgba color (es: "rgba(255,255,255,1)"), and returns an object containing the rgba values, like { red:x, green:y, blue:z, alpha:k  }.</p> ]]></description>
<pubDate>Sun, 06 Nov 2011 05:13:03 GMT</pubDate>
<guid>http://snipplr.com/view/60570/get-rgba-values-as-an-object/</guid>
</item>
<item>
<title>(PHP) Sort array of objects by object\'s property - Rain</title>
<link>http://snipplr.com/view/60321/sort-array-of-objects-by-objects-property/</link>
<description><![CDATA[ <p>Used to sort array of objects by it's property

Note: Anonymous functions are available since PHP 5.3.0.</p> ]]></description>
<pubDate>Sat, 29 Oct 2011 00:34:46 GMT</pubDate>
<guid>http://snipplr.com/view/60321/sort-array-of-objects-by-objects-property/</guid>
</item>
<item>
<title>(PHP) [WordPress] Get Posts By Term and Sort Them - kingkool68</title>
<link>http://snipplr.com/view/59755/wordpress-get-posts-by-term-and-sort-them/</link>
<description><![CDATA[ <p>1. Get Posts however you see fit
2. Loop through the posts getting the terms from taxonomies and add them to the Post object
3. Sort the Array of Post Objects by the property you want them sorted by using sort_on_field()</p> ]]></description>
<pubDate>Fri, 14 Oct 2011 11:47:44 GMT</pubDate>
<guid>http://snipplr.com/view/59755/wordpress-get-posts-by-term-and-sort-them/</guid>
</item>
</channel>
</rss>