<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Raimund Meyer's personal blog</title>
    <link>http://x-webservice.net/</link>
    <description>var life = this.live();</description>
    <dc:language>de</dc:language>
    <generator>Serendipity 1.4.1 - http://www.s9y.org/</generator>
    <pubDate>Wed, 12 Aug 2009 10:16:03 GMT</pubDate>

    <image>
        <url>http://x-webservice.net/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Raimund Meyer's personal blog - var life = this.live();</title>
        <link>http://x-webservice.net/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>JavaScript clone object</title>
    <link>http://x-webservice.net/archives/6-JavaScript-clone-object</link>
    
    <comments>http://x-webservice.net/archives/6-JavaScript-clone-object#comments</comments>
    <wfw:comment>http://x-webservice.net/wfwcomment.php?cid=6</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://x-webservice.net/rss.php?version=2.0&amp;type=comments&amp;cid=6</wfw:commentRss>
    

    <author>nospam@example.com (Raimund Meyer)</author>
    <content:encoded>
    &lt;p&gt;Since I did not easily find a good all browser, all kinds of object cloning funtion on the net, here&#039;s my one&lt;/p&gt; 
  &lt;pre&gt;function cloneObject (obj)
{
  if ( !obj )
  {
    return null;
  }

  // check for function, RegExp, and Date objects, and non-object types
  if ( typeof obj != &#039;object&#039; || obj instanceof Function || obj instanceof RegExp || obj instanceof Date)
  {
    newObj = obj; // just copy reference to it
  }
  else
  {
    var newObj = (obj instanceof Array) ? [] : {};
    for ( var n in obj )
    {
      var node = obj[n];
      if ( typeof node == &#039;object&#039; )
      {
        newObj[n] = cloneObject(node);
      }
      else
      {
        newObj[n] = node;
      }
    }
  }

  return newObj;
};

var x = {a: 1, b : &quot;OK&quot;, c : /test$/, d: [1,2], e : {a:&#039;OK&#039;}, f: function(arg){alert(arg)}};
var y = cloneObject(x);

alert(typeof y.a +&#039;: &#039;+y.a);
alert(typeof y.b +&#039;: &#039;+y.b);
alert(&#039;RegExp: &#039; +&#039;true: &#039;+y.c.test(&quot;test&quot;) + &#039; false: &#039;+y.c.test(&quot;testx&quot;));
alert(&#039;Array: &#039; + y.d.join(&#039; joinedWith &#039;));
alert(&#039;Object: &#039; + y.e.a);

y.f(&#039;Function: OK&#039;);

function myClass(a, b)
{
  this.prop = &#039;Custom Class method call: OK&#039;;
}

myClass.prototype.func = function()
{
  alert(this.prop)
}

var t = new myClass();
tClone = cloneObject(t);

tClone.func();
alert(&#039;instanceof myClass: &#039; + (tClone instanceof myClass)); //unfortunately this does not work 
&lt;/pre&gt; 
  &lt;p&gt;&lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 12 Aug 2009 11:38:14 +0200</pubDate>
    <guid isPermaLink="false">http://x-webservice.net/archives/6-guid</guid>
    <category>javascript</category>

</item>
<item>
    <title>Javascript class inheritance</title>
    <link>http://x-webservice.net/archives/5-Javascript-class-inheritance</link>
    
    <comments>http://x-webservice.net/archives/5-Javascript-class-inheritance#comments</comments>
    <wfw:comment>http://x-webservice.net/wfwcomment.php?cid=5</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://x-webservice.net/rss.php?version=2.0&amp;type=comments&amp;cid=5</wfw:commentRss>
    

    <author>nospam@example.com (Raimund Meyer)</author>
    <content:encoded>
    &lt;p&gt;I always believed there was no such thing as class inheritance in Javascript. As I&#039;m just working on a rather large Javascript application I thought I might well use a derived class an discovered that there is really a way to do it.&lt;/p&gt; 
  &lt;pre&gt;function a()
{
	
}

a.prototype.propA = &#039;Hello&#039;;

a.prototype.methodA = function()
{
	this.thisPropA = &#039;World&#039;;
}

function b()
{
	a.apply(this, arguments);
  this.methodA();
	this.thisPropB = &#039;works!&#039;
}

b.prototype = new a();
b.prototype.propB = &#039;It&#039;;
b.prototype.method2 = function()
{
	alert(this.thisPropA + &#039; &#039; + this.propA + &#039; &#039; + this.propB + &#039; &#039; + this.thisPropB)
}


o = new b();
o.method2();
&amp;#160;&lt;/pre&gt; 
  &lt;p&gt;To inherit from one class, you have to assign an instance of it to the protopype of the derived class. It seems not very explicit, but it works as expected. To call the parent constructor you have to use its apply() method to execute it in the this-context of the derived class. &lt;br /&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Sat, 30 May 2009 14:00:40 +0200</pubDate>
    <guid isPermaLink="false">http://x-webservice.net/archives/5-guid</guid>
    <category>JavaScript</category>

</item>
<item>
    <title>JavaScript Array sort function for umlauts and numbers</title>
    <link>http://x-webservice.net/archives/4-JavaScript-Array-sort-function-for-umlauts-and-numbers</link>
    
    <comments>http://x-webservice.net/archives/4-JavaScript-Array-sort-function-for-umlauts-and-numbers#comments</comments>
    <wfw:comment>http://x-webservice.net/wfwcomment.php?cid=4</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://x-webservice.net/rss.php?version=2.0&amp;type=comments&amp;cid=4</wfw:commentRss>
    

    <author>nospam@example.com (Raimund Meyer)</author>
    <content:encoded>
    &lt;pre&gt;Array.prototype.jsCoreSort = Array.prototype.sort;
Array.prototype.sort = function(comparisonFunction)
{
	if(typeof comparisonFunction != &#039;function&#039;)
	{
		comparisonFunction = function(a, b){
			if (typeof parseInt(a,10) == &#039;number&#039; &amp;amp;&amp;amp; typeof parseInt(b,10) == &#039;number&#039;)
			{
				return parseInt(a,10)-parseInt(b,10);
			}
			else 
			{
				if (typeof a != &#039;string&#039;) a = a.toString();
				var r = function (str){
					str = str.toLowerCase();
					str = str.replstrce(/ä/g,&quot;a&quot;);
					str = str.replstrce(/ö/g,&quot;o&quot;);
					str = str.replstrce(/ü/g,&quot;u&quot;);
					str = str.replstrce(/ß/g,&quot;s&quot;);
					
					return str;
				}
				a = r(a);
			
				if (typeof b != &#039;string&#039;) b = b.toString();
				b = r(b);
			
				return(a==b)?0:(a&amp;gt;b)?1:-1;
			}
		}
	}
	this.jsCoreSort(comparisonFunction);
}
&lt;/pre&gt; 
  &lt;p&gt;Thanks to &lt;a href=&quot;http://www.brain4.de/programmierecke/js/arraySort.php&quot;&gt;http://www.brain4.de/programmierecke/js/arraySort.php&lt;/a&gt; for the comparison function &lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 17 Sep 2008 18:01:16 +0200</pubDate>
    <guid isPermaLink="false">http://x-webservice.net/archives/4-guid</guid>
    <category>JavaScript</category>

</item>
<item>
    <title>Compiz Fusion and two monitors</title>
    <link>http://x-webservice.net/archives/3-Compiz-Fusion-and-two-monitors</link>
    
    <comments>http://x-webservice.net/archives/3-Compiz-Fusion-and-two-monitors#comments</comments>
    <wfw:comment>http://x-webservice.net/wfwcomment.php?cid=3</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://x-webservice.net/rss.php?version=2.0&amp;type=comments&amp;cid=3</wfw:commentRss>
    

    <author>nospam@example.com (Raimund Meyer)</author>
    <content:encoded>
    If you have two monitors on a nvidia card and want to enable desktop effects, use TwinView and not Xinerama! 
    </content:encoded>

    <pubDate>Fri, 25 Jul 2008 10:22:16 +0200</pubDate>
    <guid isPermaLink="false">http://x-webservice.net/archives/3-guid</guid>
    <category>compiz fusion</category>
<category>linux</category>

</item>
<item>
    <title>Open images in Photoshop in Linux with wine</title>
    <link>http://x-webservice.net/archives/2-Open-images-in-Photoshop-in-Linux-with-wine</link>
    
    <comments>http://x-webservice.net/archives/2-Open-images-in-Photoshop-in-Linux-with-wine#comments</comments>
    <wfw:comment>http://x-webservice.net/wfwcomment.php?cid=2</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://x-webservice.net/rss.php?version=2.0&amp;type=comments&amp;cid=2</wfw:commentRss>
    

    <author>nospam@example.com (Raimund Meyer)</author>
    <content:encoded>
    &lt;p&gt;I&#039;m&amp;#160; glad that it&#039;s possible using Photoshop in Linux, but the lack of desktop integration is so irritating. Placing this script in /usr/bin as photoshop makes it possible to open images with double click or context menu&lt;br /&gt;&lt;/p&gt; 
  &lt;pre&gt;#!/bin/sh
wine &quot;C:\Programme\Adobe\Photoshop CS\Photoshop.exe&quot;  &quot;`winepath -w $*`&quot;
 &lt;/pre&gt;
  &lt;p&gt;
And don&#039;t forget to make it executable:&lt;/p&gt;
  &lt;pre&gt;chmod +x /usr/bin/photoshop
&lt;/pre&gt; 
    </content:encoded>

    <pubDate>Thu, 29 May 2008 21:59:34 +0200</pubDate>
    <guid isPermaLink="false">http://x-webservice.net/archives/2-guid</guid>
    <category>linux</category>
<category>wine</category>

</item>
<item>
    <title>Use Xinha instead of HTMLArea in Serendipity</title>
    <link>http://x-webservice.net/archives/1-Use-Xinha-instead-of-HTMLArea-in-Serendipity</link>
    
    <comments>http://x-webservice.net/archives/1-Use-Xinha-instead-of-HTMLArea-in-Serendipity#comments</comments>
    <wfw:comment>http://x-webservice.net/wfwcomment.php?cid=1</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://x-webservice.net/rss.php?version=2.0&amp;type=comments&amp;cid=1</wfw:commentRss>
    

    <author>nospam@example.com (Raimund Meyer)</author>
    <content:encoded>
    Just installed Serendipity and saw, omg, they use HTMLArea. Of course I
instantly uploaded Xinha in the very htmlarea folder and voilà, works
like a charm. Very content with backward compatibility 
    </content:encoded>

    <pubDate>Thu, 29 May 2008 19:03:12 +0200</pubDate>
    <guid isPermaLink="false">http://x-webservice.net/archives/1-guid</guid>
    <category>s9y</category>
<category>xinha</category>

</item>

</channel>
</rss>