<?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/operator</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 26 May 2013 11:52:59 GMT</pubDate>
<item>
<title>(Scala) create a postfix operator for any object - pligor</title>
<link>http://snipplr.com/view/67623/create-a-postfix-operator-for-any-object/</link>
<description><![CDATA[ <p>create a postfix operator for any object combining a class and an implicit</p> ]]></description>
<pubDate>Fri, 05 Oct 2012 19:35:05 GMT</pubDate>
<guid>http://snipplr.com/view/67623/create-a-postfix-operator-for-any-object/</guid>
</item>
<item>
<title>(JavaScript) Using "typeof" operator in Javascript - bharmalammargmailcom</title>
<link>http://snipplr.com/view/60930/using-typeof-operator-in-javascript/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 17 Nov 2011 21:41:15 GMT</pubDate>
<guid>http://snipplr.com/view/60930/using-typeof-operator-in-javascript/</guid>
</item>
<item>
<title>(C#) ?: conditional operator in c# - amos24c</title>
<link>http://snipplr.com/view/59446/-conditional-operator-in-c/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 06 Oct 2011 02:34:44 GMT</pubDate>
<guid>http://snipplr.com/view/59446/-conditional-operator-in-c/</guid>
</item>
<item>
<title>(Java) Java Ternary operator associativity demo - m1b</title>
<link>http://snipplr.com/view/58095/java-ternary-operator-associativity-demo/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 23 Aug 2011 06:56:01 GMT</pubDate>
<guid>http://snipplr.com/view/58095/java-ternary-operator-associativity-demo/</guid>
</item>
<item>
<title>(C#) LINQ COALESCE to provide conditional when value is null in Anonymous type - housecor</title>
<link>http://snipplr.com/view/43316/linq-coalesce-to-provide-conditional-when-value-is-null-in-anonymous-type/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 31 Oct 2010 05:10:57 GMT</pubDate>
<guid>http://snipplr.com/view/43316/linq-coalesce-to-provide-conditional-when-value-is-null-in-anonymous-type/</guid>
</item>
<item>
<title>(C#) Enum Limitation Fix Using a Generic Class and Implicit Casting - bryanlyman</title>
<link>http://snipplr.com/view/24778/enum-limitation-fix-using-a-generic-class-and-implicit-casting/</link>
<description><![CDATA[ <p>For .net 2.0+   The one limitation to enumerations is revealed when you try to reverse lookup an enumeration value using Enum.Parse(). The parse function will return an inconsistent enum object if ever there are two or more enumerations with the same numeric value. This class fixes that problem. Written as a system extension and using implicit casting, the process has been made extremely easy and made the syntax for the parse function even simpler. The process even allows enumeration names starting with a number or the name of a C# keyword as long as the name is preceded by an underscore. The implicit cast from an Enum object to a Enum.Cast object has been deliberately left out to account for single directional assignment, which forces the class to be used properly. An Enum to Cast object lookup would defeat the whole purpose of the class if the implicit operator is used during runtime; for this purpose a user assignment operator of type String is supplied. This simply forces the user to use Cast = Enum.ToString() to parse to a correct object. The ToString() overload for a Cast object returns a Friendly name which replaces all underscores with spaces and even allows double underscores for commas and triple underscores for periods; for this reason, the implicit \"from string\" caster also converts from a friendly name to the proper Enum object. This makes it very handy for enumerating through a list of items for a combo or list box and converting back to the proper object by simply supplying the name of the list item.</p> ]]></description>
<pubDate>Mon, 14 Dec 2009 18:03:38 GMT</pubDate>
<guid>http://snipplr.com/view/24778/enum-limitation-fix-using-a-generic-class-and-implicit-casting/</guid>
</item>
<item>
<title>(C#) Atomic chunks of code for reuse with the null-coalescing operator - jmcd</title>
<link>http://snipplr.com/view/20574/atomic-chunks-of-code-for-reuse-with-the-nullcoalescing-operator/</link>
<description><![CDATA[ <p>A style of code reuse.  Breaking methods (in this case MVC controller) into very small reusable atomic chunks that either perform an operation then return an ActionResult OR return null, then using with the null-coalescing operator.</p> ]]></description>
<pubDate>Fri, 02 Oct 2009 06:24:51 GMT</pubDate>
<guid>http://snipplr.com/view/20574/atomic-chunks-of-code-for-reuse-with-the-nullcoalescing-operator/</guid>
</item>
<item>
<title>(ActionScript 3) Color Spectrum (incomplete) - forchid</title>
<link>http://snipplr.com/view/19659/color-spectrum-incomplete/</link>
<description><![CDATA[ <p>This is an incomplete color spectrum because cos waves will not reach all the colors. For a proper graph refer to this wiki page http://en.wikipedia.org/wiki/HSL_color_space</p> ]]></description>
<pubDate>Sun, 13 Sep 2009 16:31:43 GMT</pubDate>
<guid>http://snipplr.com/view/19659/color-spectrum-incomplete/</guid>
</item>
<item>
<title>(SAS) Macro IN Operator - sarathannapareddy</title>
<link>http://snipplr.com/view/18372/macro-in-operator/</link>
<description><![CDATA[ <p>Have you ever come across a situation where you have to write a macro program where a macro variable has more than one value? Writing a macro program in this case involves so many different conditions and to connect each condition you generally use OR operator as below… 

%macro test; 
%if &amp;dsn=ae or %if &amp;dsn=ds or %if &amp;dsn=co or %if &amp;dsn=cm %then %do; 
Some---SAS—Statements; 
%end; 
%test;</p> ]]></description>
<pubDate>Sun, 16 Aug 2009 14:52:53 GMT</pubDate>
<guid>http://snipplr.com/view/18372/macro-in-operator/</guid>
</item>
<item>
<title>(XSLT) Determining if Two Node Sets Contain the Same Data - Meander365</title>
<link>http://snipplr.com/view/18245/determining-if-two-node-sets-contain-the-same-data/</link>
<description><![CDATA[ <p>Makes use of XPath's union operator | .</p> ]]></description>
<pubDate>Thu, 13 Aug 2009 03:10:20 GMT</pubDate>
<guid>http://snipplr.com/view/18245/determining-if-two-node-sets-contain-the-same-data/</guid>
</item>
<item>
<title>(C++) Array Splitter (random => odd &amp;amp; even) - woofeR</title>
<link>http://snipplr.com/view/13287/array-splitter-random--odd--even/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 19 Mar 2009 17:44:38 GMT</pubDate>
<guid>http://snipplr.com/view/13287/array-splitter-random--odd--even/</guid>
</item>
<item>
<title>(C) C  #define macro to generate a comment using concatenation operator in preprocessor - jimfred</title>
<link>http://snipplr.com/view/10247/c--define-macro-to-generate-a-comment-using-concatenation-operator-in-preprocessor/</link>
<description><![CDATA[ <p>This uses the concatenation operator "##" to insert a comment "//"</p> ]]></description>
<pubDate>Wed, 03 Dec 2008 12:36:30 GMT</pubDate>
<guid>http://snipplr.com/view/10247/c--define-macro-to-generate-a-comment-using-concatenation-operator-in-preprocessor/</guid>
</item>
<item>
<title>(C#) ?? operator - Elph</title>
<link>http://snipplr.com/view/8996/-operator/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 14 Oct 2008 10:11:54 GMT</pubDate>
<guid>http://snipplr.com/view/8996/-operator/</guid>
</item>
<item>
<title>(C#) Bitwise operations on Integers - rengber</title>
<link>http://snipplr.com/view/2400/bitwise-operations-on-integers/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 27 Mar 2007 19:18:38 GMT</pubDate>
<guid>http://snipplr.com/view/2400/bitwise-operations-on-integers/</guid>
</item>
<item>
<title>(Ruby) ruby add missing ++ operator - gdonald</title>
<link>http://snipplr.com/view/1218/ruby-add-missing--operator/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 27 Sep 2006 10:25:04 GMT</pubDate>
<guid>http://snipplr.com/view/1218/ruby-add-missing--operator/</guid>
</item>
<item>
<title>(PHP) Speed Test: strcmp vs === - mthorn</title>
<link>http://snipplr.com/view/758/speed-test-strcmp-vs-/</link>
<description><![CDATA[ <p>strcmp with matching strings took 0.207852 seconds
strcmp with non-matching strings took 0.215276 seconds
=== with matching strings took 0.067122 seconds
=== with non-matching strings took 0.057305 seconds

=== is the clear winner. Function calls are always slower than operators. This was with PHP5, may be different for earlier versions. Not sure about the memory impact but I assume it's less since the strings do not have to be copied for the function call.</p> ]]></description>
<pubDate>Wed, 09 Aug 2006 09:23:15 GMT</pubDate>
<guid>http://snipplr.com/view/758/speed-test-strcmp-vs-/</guid>
</item>
</channel>
</rss>