<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>

</description><title>Rixius' Blurbs</title><generator>Tumblr (3.0; @rixius)</generator><link>http://rixi.us/</link><item><title>Autumn Are you drawing again? (yes): Ch-Ch-Check it out! Art giveaway</title><description>&lt;a href="http://akitron.tumblr.com/post/6775578952"&gt;Autumn Are you drawing again? (yes): Ch-Ch-Check it out! Art giveaway&lt;/a&gt;: &lt;p&gt;&lt;a href="http://akitron.tumblr.com/post/6775165349/ch-ch-check-it-out-art-giveaway"&gt;akitron&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I am doing a tumblr giveaway!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What I am giving away:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A poster print of your choice, two little prints and a little personal message/doodle also of your choice!&lt;/p&gt;
&lt;p&gt;Here are your poster choices:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_ln63hr1YuW1qbwhvn.jpg"/&gt;&lt;img src="http://media.tumblr.com/tumblr_ln63hxsa8Z1qbwhvn.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;And the little prints:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://media.tumblr.com/tumblr_ln63j6WirI1qbwhvn.jpg"/&gt;&lt;img src="http://media.tumblr.com/tumblr_ln63jfpctV1qbwhvn.jpg"/&gt;&lt;img src="http://media.tumblr.com/tumblr_ln63kb5hUy1qbwhvn.jpg"/&gt;&lt;img src="http://media.tumblr.com/tumblr_ln63kkmvaB1qbwhvn.jpg"/&gt;&lt;img src="http://media.tumblr.com/tumblr_ln63kqwM9b1qbwhvn.jpg"/&gt;&lt;img src="http://media.tumblr.com/tumblr_ln63kwVmCo1qbwhvn.jpg"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;How to play:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;No need to follow me, I’m…&lt;/p&gt;&lt;/blockquote&gt;



This is some awesome art, that anyone should check out ._.</description><link>http://rixi.us/post/6814669487</link><guid>http://rixi.us/post/6814669487</guid><pubDate>Wed, 22 Jun 2011 22:28:10 -0500</pubDate></item><item><title>Pirates vs. Ninjas is a common Programmer Debate, so let’s...</title><description>&lt;img src="http://29.media.tumblr.com/tumblr_lbuc3fimYl1qbdksro1_500.gif"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;Pirates vs. Ninjas is a common Programmer Debate, so let’s bring in Video Games to settle the dispute.&lt;/p&gt;</description><link>http://rixi.us/post/1713702043</link><guid>http://rixi.us/post/1713702043</guid><pubDate>Sun, 28 Nov 2010 06:20:24 -0600</pubDate></item><item><title>My absence.</title><description>&lt;p&gt;I have been neglecting to post here as I told myself I would; yet I lost the muse that led me to make this blog.&lt;/p&gt;

&lt;p&gt;Chris Williams has a &lt;a href="http://voodootikigod.com/jsconf-eu-2010-speech"&gt;“State of the Union” address for the JS community&lt;/a&gt; from JSconf.eu that has re-invigorated me. He said “We are not JavaScripters, not pythonistas, not rubyists - we are programmers. We need to improve ourselves in as many programming languages as we can get our minds around, because every language forces you to view the world in a slightly different way. ” I need to look at the other programming languages not as how I’d rather be in JS, but the good benefits they have in themselves.&lt;/p&gt;

&lt;p&gt;That being said, I am not going to be posting only about JS, but I will still be posting the intermediate tricks I’ve found in whatever language I’m looking at.&lt;/p&gt;

&lt;p&gt;I am also going to be starting my one Server to host a couple of comic sites, and will post about that progress periodically. The project includes finding a “outdated” tower that is claimed to be useless and repurpose it into a nginx-PHP-node server for serving well-built sites.&lt;/p&gt;

&lt;p&gt;Please stick with me, as &lt;a href="http://rixi.us"&gt;Rixi.us&lt;/a&gt; will only become better and better.&lt;/p&gt;</description><link>http://rixi.us/post/1307422037</link><guid>http://rixi.us/post/1307422037</guid><pubDate>Wed, 13 Oct 2010 14:35:20 -0500</pubDate></item><item><title>Typecasting, and making sure you get what you want.</title><description>&lt;p&gt;
  Typecasting is something pervalent in PHP and other languages, 
  it allows you to pressure a variable into the type you want. 
&lt;script src="http://gist.github.com/487874.js?file=typecasting.js"&gt;&lt;/script&gt;&lt;/p&gt;&lt;noscript&gt;
&lt;pre&gt;&lt;code&gt;//Typecasting 101::
// .toString()
406+'';  //"406"
[100,42,"hello Dolly",86]+''; //"100,42,hello Dolly,86"

// parseInt(str, 10)
"406"*1; //406
"604"-0; //604
"1313"/1; //1313

// Math.floor**
~~1.59678; //1
~~6.954899; //6
~~-2.649875; //-2**

// Boolean()
!!0; //false
!![]; //true
!!""; //false
!!34; //true

/**
**:the only difference between ~~ and Math.floor is negative numbers,
   Math.floor drops everything to the lowest interger side while
   ~~ pulls to the closest to 0.
*/
  &lt;/code&gt;&lt;/pre&gt;
  &lt;/noscript&gt;</description><link>http://rixi.us/post/904852018</link><guid>http://rixi.us/post/904852018</guid><pubDate>Wed, 04 Aug 2010 18:00:00 -0500</pubDate><category>ecmascript</category></item><item><title> Short-Circuting, shortening your code</title><description>&lt;p&gt;
When I’m writing, I like to shorten things as much as I can. One thing I use are short-circuts. 
A short circut relies on how &amp;&amp; and || evaluate.
A &amp;&amp; operation evaluates the left side, and only evaluates the right side if the left side returns “truthy”(anything but false,0,”,null,undefined, and NaN).
|| is the oppisite, if the left is false, the right is evaluated.
You can also use || to establish defaults in a function.
examples::
&lt;script src="http://gist.github.com/487874.js?file=shortcircut.js"&gt;&lt;/script&gt;&lt;/p&gt;&lt;noscript&gt;
&lt;pre&gt;&lt;code&gt;var foo = "true";

foo; //outputs "true"

(true) &amp;&amp; (foo = "I'm done!!");

foo; //outputs "I'm done!!"

(true) || (foo = "fooBar");

foo; //outputs "I'm done!!"

//function defaults::
function fooBar(aab, baa){
  aab = aab || "foo";
  baa = baa || "Bar";
  return aab + baa;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/noscript&gt;</description><link>http://rixi.us/post/838424861</link><guid>http://rixi.us/post/838424861</guid><pubDate>Tue, 20 Jul 2010 19:20:00 -0500</pubDate><category>ecmascript</category></item><item><title>Object.create, straight from ES5.</title><description>&lt;p&gt;
In ECMAscript version 5, ratified as the standard last December, a handfull of properties were standerdized onto the Object constructer.
I’m going to cover the Object.create method; This is not cross browser compatible yet, as only webkit and gecko support it(so just about everything but IE).
However, it is fully compatible with server side Javascript engines, such as &lt;a href="http://www.nodejs.org"&gt;Node JS&lt;/a&gt;.
&lt;br/&gt;
Here’s the syntax and a use example:
&lt;script src="http://gist.github.com/487874.js?file=Object.create.js"&gt;&lt;/script&gt;&lt;/p&gt;&lt;noscript&gt;
&lt;pre&gt;&lt;code&gt;//syntax
Object.create(Object prototype, Object objectDescriptors);
//Property descriptors
{
  value: '', //value to be set initially, any type
  writable: true, //whether or not it may be modified
  //or
  get: function(){}, //return value is what will be returned when accessed
  set: function(inp){}, //function called when property is set.
  
  enumerable: true, //shows up on a for ... in loop if true
  configurable: true //if false, is set to read-only(property is unwritable, and cannot be deleted, and this cannot be modified)
}
//use
var asd = Object.create(Object.prototype, {
  'foo': {
    value: "Bar",
    writable: true,
    enumerable: false
  },
  'rix': {
    get: function(){
      return this.foo+this.foo;
    },
    set: function(inp){
      this.foo = inp;
    },
    enumerable: true,
    configurable: false
  }
});

asd.foo; //outputs "Bar",
asd.rix; //outputs "BarBar",

asd.rix = "Baz";

asd.foo; //outputs "Baz",
asd.rix; //outputs "BazBaz",

for (var i in asd){
  console.log(i);
} //outputs only "rix", does not go over "foo"
&lt;/code&gt;&lt;/pre&gt;
&lt;/noscript&gt;</description><link>http://rixi.us/post/833900203</link><guid>http://rixi.us/post/833900203</guid><pubDate>Mon, 19 Jul 2010 18:30:00 -0500</pubDate><category>ecmascript</category><category>nodeJS</category></item><item><title>__GET and changing page content based on GET variables, without a server</title><description>&lt;p&gt;I actually began my programming career from PHP, and slowly migrated into finding Javascript so attractive. That said, I earned a particular attractment to $_GET[] and the ease it made for fetching and displaying specifically what’s wanted. If you’re in a situation where server-side programming is unavailable, such as an &lt;a href="http://www.adobe.com/products/air/"&gt;adobe air&lt;/a&gt; application, it would be advantagous to have a simple manner to take advantage of this neat feature. Cue Javascript:&lt;/p&gt;
&lt;script src="http://gist.github.com/487874.js?file=_get.js"&gt;&lt;/script&gt;&lt;noscript&gt;
&lt;pre&gt;&lt;code&gt;(function(loc){
  var _get = (function reload(){
      //If theres no GET Key Values, just return an empty Object;
      if (!loc.search){ return {}; }
      //remove the '?'
      var list = loc.search.substr(1),
      //Make an array of ['Key=Value',]
      keyVals = keyvals.split('&amp;'),
      //build the hash object
      baz = (function(){
        var x=-1, y=keyVals.length, oput = {}, key;
        //loop through each KeyValue
        while(++x&lt;y) {
          //split out key and value
          key = keyVals[x].split('=');
          //set key = value, or true if there's no value I.E. :: /i.html?simple&amp;this=NotSimple
         oput[key[0].toLowerCase()] = key[1] || true;
        }
        //in case you change the url without forcing a reset, you can reload the Hash Object
        oput.Re = reload;
        return oput;
      }());
    return baz;
  }());
//Set the Global refrence to the Hash Object
window._GET = _get;
}(location));
&lt;/code&gt;&lt;/pre&gt;
&lt;/noscript&gt;</description><link>http://rixi.us/post/791257125</link><guid>http://rixi.us/post/791257125</guid><pubDate>Fri, 09 Jul 2010 18:19:00 -0500</pubDate><category>ecmascript</category></item><item><title>advanced $().append()</title><description>&lt;p&gt;I’m a huge &lt;a title="jQuery, the write less, do more library." target="_blank" href="http://www.jquery.com"&gt;jQuery&lt;/a&gt; fan, and most of my projects will use it, if theres any need for a library.&lt;/p&gt;
&lt;p&gt;One of the great feature of Javascript I found while learning advanced techniques are &lt;a title="JSPatterns.com" href="http://www.jspatterns.com/self-executing-functions/"&gt;self-executing functions&lt;/a&gt; combining that with jQuery chaining has some really cool effects, here’s an example I’ve used:&lt;/p&gt;
&lt;script src="http://gist.github.com/487874.js?file=%24.append.js"&gt;&lt;/script&gt;&lt;noscript&gt;
&lt;pre&gt;&lt;code&gt;$.get('url', function(data){
  //data is a JSON Array ['0','1','2']
  var end = $('&lt;div&gt;');
  end.append('&lt;ul&gt;')
    //add the &lt;ul&gt; and traverse into it
    .children(':last')
      .append(
        //make the anonymous function
        (function(){
          var x = -1, 
              //data is accessible due to functional scoping
              y=data.length,
              // make a jquery &lt;div&gt; just to hold the appended Objects
              oput=$('&lt;div&gt;');
          while(++x&lt;y) {
            oput.append('&lt;li&gt;'+data[x]+'&lt;/li&gt;')
              .children(':last')
                .method1().method2();
          }
          //return everything under the output &lt;/code&gt;&lt;code class="javascript"&gt; container
          return oput.children();
        }())
      )//continue chaining;
},'json');&lt;/code&gt;&lt;/pre&gt;
&lt;/noscript&gt;
&lt;p&gt;
The deeper your chaining the more useful this pattern starts to feel, as you don’t have to break out of your chain to do a more in-depth append(). This patter can definantly be used for more than just .append().
&lt;/p&gt;</description><link>http://rixi.us/post/781608245</link><guid>http://rixi.us/post/781608245</guid><pubDate>Wed, 07 Jul 2010 12:01:00 -0500</pubDate><category>jQuery</category><category>Patterns</category></item><item><title>Hello World Post</title><description>&lt;p&gt;Starting this mini-blog. My name is Stephen “Rixius” Middleton, on Twitter as &lt;a title="@Rixius" target="_blank" href="http://www.twitter.com/rixius"&gt;@Rixius&lt;/a&gt; I am an avid lover of ECMA-script and pretty much anything related. I will be documenting interesting things I find, specifically pertaining to Javascript(ECMA v5), &lt;a href="http://jquery.com" title="The Write Less, Do More Library."&gt;jQuery&lt;/a&gt;, and &lt;a href="http://nodejs.org" title="Evented I/O for V8 JavaScript."&gt;Node-js&lt;/a&gt;.&lt;/p&gt;</description><link>http://rixi.us/post/781490165</link><guid>http://rixi.us/post/781490165</guid><pubDate>Wed, 07 Jul 2010 11:19:00 -0500</pubDate><category>meta</category></item></channel></rss>

