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

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   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://www.ailis.de/~k/feeds/atom.xml" rel="self" title="K's cluttered loft" type="application/atom+xml" />
    <link href="http://www.ailis.de/~k/"                        rel="alternate"    title="K's cluttered loft" type="text/html" />
    <link href="http://www.ailis.de/~k/rss.php?version=2.0"     rel="alternate"    title="K's cluttered loft" type="application/rss+xml" />
    <title type="html">K's cluttered loft</title>
    <subtitle type="html"></subtitle>
    <icon>http://www.ailis.de/~k/images/logos/favicon64.png</icon>
    <id>http://www.ailis.de/~k/</id>
    <updated>2012-01-28T18:08:16Z</updated>
    <generator uri="http://www.s9y.org/" version="1.6">Serendipity 1.6 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://www.ailis.de/~k/archives/63-How-to-use-Java-applets-in-modern-browsers.html" rel="alternate" title="How to use Java applets in modern browsers" />
        <author>
            <name>Klaus Reimer</name>
                    </author>
    
        <published>2012-01-28T16:15:10Z</published>
        <updated>2012-01-28T18:08:16Z</updated>
        <wfw:comment>http://www.ailis.de/~k/wfwcomment.php?cid=63</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.ailis.de/~k/rss.php?version=atom1.0&amp;type=comments&amp;cid=63</wfw:commentRss>
    
    
        <id>http://www.ailis.de/~k/archives/63-guid.html</id>
        <title type="html">How to use Java applets in modern browsers</title>
        <content type="xhtml" xml:base="http://www.ailis.de/~k/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
Finding out how to embed a Java applet in current major browsers is quite a task. Lots of pages still suggest using the <code>&lt;applet&gt;</code> tag and describe how to use the <code>mayscript</code> attribute to allow communication between Java and JavaScript. Other pages recommend using this mysterious <code>mayscript</code> attribute even in <code>&lt;embed&gt;</code> and <code>&lt;object&gt;</code> tags. I think there is a lot of voodoo out there, attributes which sound important but are not necessary at all...
</p>
<p>
So I started studying this stuff by myself. My goal was embedding a Java applet on a page which must work in Internet Explorer 7+, Google Chrome, Firefox, Opera and Safari. The applet must receive an applet parameter and must communicate with JavaScript in both directions.
</p> <br /><a href="http://www.ailis.de/~k/archives/63-How-to-use-Java-applets-in-modern-browsers.html#extended">Continue reading "How to use Java applets in modern browsers"</a>
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.ailis.de/~k/archives/61-Move-to-Github-complete.html" rel="alternate" title="Move to Github complete" />
        <author>
            <name>Klaus Reimer</name>
                    </author>
    
        <published>2012-01-08T17:49:17Z</published>
        <updated>2012-01-08T17:49:17Z</updated>
        <wfw:comment>http://www.ailis.de/~k/wfwcomment.php?cid=61</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.ailis.de/~k/rss.php?version=atom1.0&amp;type=comments&amp;cid=61</wfw:commentRss>
    
    
        <id>http://www.ailis.de/~k/archives/61-guid.html</id>
        <title type="html">Move to Github complete</title>
        <content type="xhtml" xml:base="http://www.ailis.de/~k/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  Today I finished moving the main batch of old projects from my own server to <a href="https://github.com/kayahr/">Github</a>:
  <a href="http://kayahr.github.com/threedee-js/">ThreeDee (JavaScript)</a>,
  <a href="http://github.com/kayahr/threedee/">ThreeDee (Java)</a>,
  <a href="http://github.com/kayahr/jollada/">Jollada</a>,
  <a href="http://github.com/kayahr/gramath/">GraMath</a>,
  <a href="http://github.com/kayahr/scilter/">Scilter</a>,
  <a href="http://github.com/kayahr/crypt4j/">crypt4j</a>,
  <a href="http://github.com/kayahr/pherialize/">Pherialize</a>,
  <a href="http://github.com/kayahr/math-taglib/">JSP Math Taglib</a>,
  <a href="http://github.com/kayahr/svtools/">Supervise Tools</a>,
  <a href="http://kayahr.github.com/wlandsuite/">Wasteland Suite</a>,
  <a href="http://github.com/kayahr/wludata/">wludata</a>
</p>
<p>
  Some of these projects are pretty old but I think they are still worth keeping. Some other projects went to /dev/null instead because I couldn't find any reason why they should waste space on any server. For the projects which had web pages here on Ailis I configured permanent redirects so old external links may still work for some time.
</p>
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.ailis.de/~k/archives/60-TwoDee.html" rel="alternate" title="TwoDee" />
        <author>
            <name>Klaus Reimer</name>
                    </author>
    
        <published>2011-12-27T23:01:36Z</published>
        <updated>2012-01-01T14:56:35Z</updated>
        <wfw:comment>http://www.ailis.de/~k/wfwcomment.php?cid=60</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.ailis.de/~k/rss.php?version=atom1.0&amp;type=comments&amp;cid=60</wfw:commentRss>
    
    
        <id>http://www.ailis.de/~k/archives/60-guid.html</id>
        <title type="html">TwoDee</title>
        <content type="xhtml" xml:base="http://www.ailis.de/~k/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  I just finished publishing <a href="http://kayahr.github.com/twodee">TwoDee</a>, a small, fast and simple 2D scene graph vector engine for JavaScript based on the HTML 5 canvas technology. This is the library used in my WebOS game <a href="https://developer.palm.com/webChannel/index.php?packageid=de.ailis.destroids">Destroids</a> which earned me $10,000 in one of the <a href="http://www.ailis.de/~k/archives/55-Palm-Hot-Apps-Contest-is-over.html">Palm Hot Apps Contests</a> last year.
</p>
 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.ailis.de/~k/archives/56-Generic-Jabber-XMPP-with-webOS.html" rel="alternate" title="Generic Jabber (XMPP) with webOS" />
        <author>
            <name>Klaus Reimer</name>
                    </author>
    
        <published>2011-12-20T18:25:00Z</published>
        <updated>2011-12-21T05:14:14Z</updated>
        <wfw:comment>http://www.ailis.de/~k/wfwcomment.php?cid=56</wfw:comment>
    
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://www.ailis.de/~k/rss.php?version=atom1.0&amp;type=comments&amp;cid=56</wfw:commentRss>
    
    
        <id>http://www.ailis.de/~k/archives/56-guid.html</id>
        <title type="html">Generic Jabber (XMPP) with webOS</title>
        <content type="xhtml" xml:base="http://www.ailis.de/~k/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  WebOS (The operating system of the Palm Pre and Palm Pixi phones) has a built-in messaging application but unfortunately it only supports Google Talk and AIM out of the box. It's a shame that Palm has not enabled more protocols and especially generic XMPP support. The used library (libpurple) supports everything so it's only missing in the GUI.
</p>
<p>
  Google Talk uses XMPP so in theory it should work with any other XMPP server but unfortunately Palm has put this nasty code in the LibpurpleAdapter (which is used as a connector between the GUI and the low-level libpurple):
</p>
<pre>
if (strcmp(prplProtocolId, "prpl-jabber") == 0
    &amp;&amp; g_str_has_suffix(transportFriendlyUserName, "@gmail.com") == FALSE
    &amp;&amp; g_str_has_suffix(transportFriendlyUserName, "@googlemail.com") == FALSE)
{
    // Special case for gmail... don't try to connect to mydomain.com if the
    // username is me@mydomain.com. They might not have
    // setup the SRV record. Always connect to gmail. 
    purple_account_set_string(account, "connect_server", "talk.google.com");
}
</pre>
<p>
  This code means: If the protocol is Jabber (XMPP) and the entered username does NOT end with @gmail.com or @googlemail.com then the XMPP server is hardcoded to talk.google.com. So if you enter a username like <code>johndoe@jabber.org</code> then the Messaging app does not connect to <code>jabber.org</code> but instead it connects to <code>talk.google.com</code> because of the above code. So we must get rid of this code somehow.
</p>
<p>
  With some knowledge about assembler you might be able to toggle some logic in the binary so the above if statement always evaluates to false but there is a much easier solution. You just need to replace the string "connect_server" with some invalid string. I use "nonnect_server". The result is that the line simply sets some unused property and therefore simply does nothing.
</p>
<p>
  Since WebOS 2 the <em>LibpurpleAdapter</em> program is renamed to <em>imlibpurpletransport</em>. In the following step-by-step instructions I will mention both variants for WebOS 1 and WebOS 2.
</p>
 <br /><a href="http://www.ailis.de/~k/archives/56-Generic-Jabber-XMPP-with-webOS.html#extended">Continue reading "Generic Jabber (XMPP) with webOS"</a>
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://www.ailis.de/~k/archives/58-Return-a-PHP-array-by-reference.html" rel="alternate" title="Return a PHP array by reference" />
        <author>
            <name>Klaus Reimer</name>
                    </author>
    
        <published>2011-07-28T11:39:37Z</published>
        <updated>2011-07-28T12:15:06Z</updated>
        <wfw:comment>http://www.ailis.de/~k/wfwcomment.php?cid=58</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://www.ailis.de/~k/rss.php?version=atom1.0&amp;type=comments&amp;cid=58</wfw:commentRss>
    
    
        <id>http://www.ailis.de/~k/archives/58-guid.html</id>
        <title type="html">Return a PHP array by reference</title>
        <content type="xhtml" xml:base="http://www.ailis.de/~k/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>
  Looks like I'm using way to much Java in these days... I'm starting to forget PHP knowledge. Today I was searching for a function to clone an array but haven't found one. I was curious why PHP doesn't have an <em>array_clone</em> or <em>array_copy</em> function. But then I was nudged into the right direction: Arrays are always assigned by value, not by reference, so it simply doesn't need a clone function because a simple assignment already performs a clone (It's even some sort of deep clone (At least all values inside the array (Arrays are also values, not objects) are copied)). To assign it by reference you have to add an ampersand character:
</p>
<pre>
$arr = array();
$arrClone = $arr; // A clone is created
$arrRef = &amp;$arr; // A reference is created
</pre>
<p>
I really forgot this basic PHP knowledge...
</p>
 <br /><a href="http://www.ailis.de/~k/archives/58-Return-a-PHP-array-by-reference.html#extended">Continue reading "Return a PHP array by reference"</a>
            </div>
        </content>
        
    </entry>

</feed>
