<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/templates/default/atom.css" type="text/css" ?>

<feed version="0.3" 
   xmlns="http://purl.org/atom/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://x-webservice.net/rss.php?version=atom0.3" rel="service.feed" title="Raimund Meyer's personal blog" type="application/x.atom+xml" />
    <link href="http://x-webservice.net/"                        rel="alternate"    title="Raimund Meyer's personal blog" type="text/html" />
    <link href="http://x-webservice.net/rss.php?version=2.0"     rel="alternate"    title="Raimund Meyer's personal blog" type="application/rss+xml" />
    <title mode="escaped" type="text/html">Raimund Meyer's personal blog</title>
    <tagline mode="escaped" type="text/html">var life = this.live();</tagline>
    <id>http://x-webservice.net/</id>
    <modified>2009-08-12T10:16:03Z</modified>
    <generator url="http://www.s9y.org/" version="1.4.1">Serendipity 1.4.1 - http://www.s9y.org/</generator>
    <dc:language>de</dc:language>
    <info mode="xml" type="text/html">
        <div xmlns="http://www.w3.org/1999/xhtml">You are viewing an ATOM formatted XML site feed. Usually this file is inteded to be viewed in an aggregator or syndication software. If you want to know more about ATOM, please visist <a href="http://atomenabled.org/">Atomenabled.org</a></div>
    </info>

    <entry>
        <link href="http://x-webservice.net/archives/6-JavaScript-clone-object" rel="alternate" title="JavaScript clone object" type="text/html" />
        <author>
            <name>Raimund Meyer</name>
                    </author>
    
        <issued>2009-08-12T09:38:14Z</issued>
        <created>2009-08-12T09:38:14Z</created>
        <modified>2009-08-12T10:16:03Z</modified>
        <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=atom0.3&amp;type=comments&amp;cid=6</wfw:commentRss>
    
        <id>http://x-webservice.net/archives/6-guid</id>
        <title mode="escaped" type="text/html">JavaScript clone object</title>
        <content type="application/xhtml+xml" xml:base="http://x-webservice.net/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Since I did not easily find a good all browser, all kinds of object cloning funtion on the net, here's my one</p> 
  <pre>function cloneObject (obj)
{
  if ( !obj )
  {
    return null;
  }

  // check for function, RegExp, and Date objects, and non-object types
  if ( typeof obj != 'object' || 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 == 'object' )
      {
        newObj[n] = cloneObject(node);
      }
      else
      {
        newObj[n] = node;
      }
    }
  }

  return newObj;
};

var x = {a: 1, b : "OK", c : /test$/, d: [1,2], e : {a:'OK'}, f: function(arg){alert(arg)}};
var y = cloneObject(x);

alert(typeof y.a +': '+y.a);
alert(typeof y.b +': '+y.b);
alert('RegExp: ' +'true: '+y.c.test("test") + ' false: '+y.c.test("testx"));
alert('Array: ' + y.d.join(' joinedWith '));
alert('Object: ' + y.e.a);

y.f('Function: OK');

function myClass(a, b)
{
  this.prop = 'Custom Class method call: OK';
}

myClass.prototype.func = function()
{
  alert(this.prop)
}

var t = new myClass();
tClone = cloneObject(t);

tClone.func();
alert('instanceof myClass: ' + (tClone instanceof myClass)); //unfortunately this does not work 
</pre> 
  <p><br /></p> 
            </div>
        </content>

        <dc:subject>javascript</dc:subject>

    </entry>
    <entry>
        <link href="http://x-webservice.net/archives/5-Javascript-class-inheritance" rel="alternate" title="Javascript class inheritance" type="text/html" />
        <author>
            <name>Raimund Meyer</name>
                    </author>
    
        <issued>2009-05-30T12:00:40Z</issued>
        <created>2009-05-30T12:00:40Z</created>
        <modified>2009-05-30T12:35:11Z</modified>
        <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=atom0.3&amp;type=comments&amp;cid=5</wfw:commentRss>
    
        <id>http://x-webservice.net/archives/5-guid</id>
        <title mode="escaped" type="text/html">Javascript class inheritance</title>
        <content type="application/xhtml+xml" xml:base="http://x-webservice.net/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I always believed there was no such thing as class inheritance in Javascript. As I'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.</p> 
  <pre>function a()
{
	
}

a.prototype.propA = 'Hello';

a.prototype.methodA = function()
{
	this.thisPropA = 'World';
}

function b()
{
	a.apply(this, arguments);
  this.methodA();
	this.thisPropB = 'works!'
}

b.prototype = new a();
b.prototype.propB = 'It';
b.prototype.method2 = function()
{
	alert(this.thisPropA + ' ' + this.propA + ' ' + this.propB + ' ' + this.thisPropB)
}


o = new b();
o.method2();
&#160;</pre> 
  <p>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. <br /></p> 
            </div>
        </content>

        <dc:subject>JavaScript</dc:subject>

    </entry>
    <entry>
        <link href="http://x-webservice.net/archives/4-JavaScript-Array-sort-function-for-umlauts-and-numbers" rel="alternate" title="JavaScript Array sort function for umlauts and numbers" type="text/html" />
        <author>
            <name>Raimund Meyer</name>
                    </author>
    
        <issued>2008-09-17T16:01:16Z</issued>
        <created>2008-09-17T16:01:16Z</created>
        <modified>2008-09-17T16:01:16Z</modified>
        <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=atom0.3&amp;type=comments&amp;cid=4</wfw:commentRss>
    
        <id>http://x-webservice.net/archives/4-guid</id>
        <title mode="escaped" type="text/html">JavaScript Array sort function for umlauts and numbers</title>
        <content type="application/xhtml+xml" xml:base="http://x-webservice.net/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <pre>Array.prototype.jsCoreSort = Array.prototype.sort;
Array.prototype.sort = function(comparisonFunction)
{
	if(typeof comparisonFunction != 'function')
	{
		comparisonFunction = function(a, b){
			if (typeof parseInt(a,10) == 'number' &amp;&amp; typeof parseInt(b,10) == 'number')
			{
				return parseInt(a,10)-parseInt(b,10);
			}
			else 
			{
				if (typeof a != 'string') a = a.toString();
				var r = function (str){
					str = str.toLowerCase();
					str = str.replstrce(/ä/g,"a");
					str = str.replstrce(/ö/g,"o");
					str = str.replstrce(/ü/g,"u");
					str = str.replstrce(/ß/g,"s");
					
					return str;
				}
				a = r(a);
			
				if (typeof b != 'string') b = b.toString();
				b = r(b);
			
				return(a==b)?0:(a&gt;b)?1:-1;
			}
		}
	}
	this.jsCoreSort(comparisonFunction);
}
</pre> 
  <p>Thanks to <a href="http://www.brain4.de/programmierecke/js/arraySort.php">http://www.brain4.de/programmierecke/js/arraySort.php</a> for the comparison function </p> 
            </div>
        </content>

        <dc:subject>JavaScript</dc:subject>

    </entry>
    <entry>
        <link href="http://x-webservice.net/archives/3-Compiz-Fusion-and-two-monitors" rel="alternate" title="Compiz Fusion and two monitors" type="text/html" />
        <author>
            <name>Raimund Meyer</name>
                    </author>
    
        <issued>2008-07-25T08:22:16Z</issued>
        <created>2008-07-25T08:22:16Z</created>
        <modified>2008-07-25T08:22:16Z</modified>
        <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=atom0.3&amp;type=comments&amp;cid=3</wfw:commentRss>
    
        <id>http://x-webservice.net/archives/3-guid</id>
        <title mode="escaped" type="text/html">Compiz Fusion and two monitors</title>
        <content type="application/xhtml+xml" xml:base="http://x-webservice.net/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                If you have two monitors on a nvidia card and want to enable desktop effects, use TwinView and not Xinerama! 
            </div>
        </content>

        <dc:subject>compiz fusion</dc:subject>
<dc:subject>linux</dc:subject>

    </entry>
    <entry>
        <link href="http://x-webservice.net/archives/2-Open-images-in-Photoshop-in-Linux-with-wine" rel="alternate" title="Open images in Photoshop in Linux with wine" type="text/html" />
        <author>
            <name>Raimund Meyer</name>
                    </author>
    
        <issued>2008-05-29T19:59:34Z</issued>
        <created>2008-05-29T19:59:34Z</created>
        <modified>2008-06-02T10:38:34Z</modified>
        <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=atom0.3&amp;type=comments&amp;cid=2</wfw:commentRss>
    
        <id>http://x-webservice.net/archives/2-guid</id>
        <title mode="escaped" type="text/html">Open images in Photoshop in Linux with wine</title>
        <content type="application/xhtml+xml" xml:base="http://x-webservice.net/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I'm&#160; glad that it'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<br /></p> 
  <pre>#!/bin/sh
wine "C:\Programme\Adobe\Photoshop CS\Photoshop.exe"  "`winepath -w $*`"
 </pre>
  <p>
And don't forget to make it executable:</p>
  <pre>chmod +x /usr/bin/photoshop
</pre> 
            </div>
        </content>

        <dc:subject>linux</dc:subject>
<dc:subject>wine</dc:subject>

    </entry>
    <entry>
        <link href="http://x-webservice.net/archives/1-Use-Xinha-instead-of-HTMLArea-in-Serendipity" rel="alternate" title="Use Xinha instead of HTMLArea in Serendipity" type="text/html" />
        <author>
            <name>Raimund Meyer</name>
                    </author>
    
        <issued>2008-05-29T17:03:12Z</issued>
        <created>2008-05-29T17:03:12Z</created>
        <modified>2008-05-29T20:12:48Z</modified>
        <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=atom0.3&amp;type=comments&amp;cid=1</wfw:commentRss>
    
        <id>http://x-webservice.net/archives/1-guid</id>
        <title mode="escaped" type="text/html">Use Xinha instead of HTMLArea in Serendipity</title>
        <content type="application/xhtml+xml" xml:base="http://x-webservice.net/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                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 
            </div>
        </content>

        <dc:subject>s9y</dc:subject>
<dc:subject>xinha</dc:subject>

    </entry>
</feed>