<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1742753672617176246</id><updated>2011-04-21T21:35:22.630+02:00</updated><title type='text'>Johannes' blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://johannes-martin.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1742753672617176246/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://johannes-martin.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>jmartin</name><uri>http://www.blogger.com/profile/02541873904167726970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1742753672617176246.post-7292981021810518038</id><published>2008-06-26T11:02:00.001+02:00</published><updated>2008-06-26T11:29:08.918+02:00</updated><title type='text'>Problems setting up a NIS Slave Server</title><content type='html'>When I first trying to start a NIS slave server in my network, it complained:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Can't enumerate maps from server.example.com. Please check that it is running.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Appearantly, ypinit failed to enumerate maps using yphelper. The source of the problem turned out to be the DNS configuration. server.example.com had several DNS entries. I had to specify the name that the reverse lookup of its IP returned and then ypinit worked.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1742753672617176246-7292981021810518038?l=johannes-martin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-martin.blogspot.com/feeds/7292981021810518038/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1742753672617176246&amp;postID=7292981021810518038' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1742753672617176246/posts/default/7292981021810518038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1742753672617176246/posts/default/7292981021810518038'/><link rel='alternate' type='text/html' href='http://johannes-martin.blogspot.com/2008/06/problems-setting-up-nis-slave-server.html' title='Problems setting up a NIS Slave Server'/><author><name>jmartin</name><uri>http://www.blogger.com/profile/02541873904167726970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1742753672617176246.post-780886204034352722</id><published>2008-06-18T07:35:00.003+02:00</published><updated>2008-06-18T07:40:40.698+02:00</updated><title type='text'>Cleaning up animated swing controls</title><content type='html'>In its swing library, Java provides a timer class that can be used to animate controls. For example, one could create a blinking label as follows:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class BlinkLabel extends JLabel {&lt;br /&gt;    private static final int BLINK_INTERVAL = 500;&lt;br /&gt;&lt;br /&gt;    public BlinkLabel(String text) {&lt;br /&gt;        super(text);&lt;br /&gt; ActionListener listener = &lt;br /&gt;     new ActionListener() {&lt;br /&gt;  public void actionPerformed(ActionEvent e) {&lt;br /&gt;      setVisible(!isVisible());&lt;br /&gt;  }&lt;br /&gt;     };&lt;br /&gt; Timer timer = new Timer(BLINK_INTERVAL, listener);&lt;br /&gt;        timer.start();&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The problem with this approach is that the label will continue blinking even after its parent window has been disposed. Also, the label will never be garbage collected, since the timer still maintains a reference to it.&lt;br /&gt;&lt;br /&gt;Here's the proper way to do it.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;class BlinkLabel extends JLabel {&lt;br /&gt;    private static final int BLINK_INTERVAL = 500;&lt;br /&gt;&lt;br /&gt;    private Timer timer;&lt;br /&gt;    private ActionListener listener;&lt;br /&gt;    &lt;br /&gt;    public BlinkLabel(String text) {&lt;br /&gt;        super(text);&lt;br /&gt; listener = &lt;br /&gt;     new ActionListener() {&lt;br /&gt;  public void actionPerformed(ActionEvent e) {&lt;br /&gt;      setVisible(!isVisible());&lt;br /&gt;  }&lt;br /&gt;     };&lt;br /&gt; &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void addNotify() {&lt;br /&gt; super.addNotify();&lt;br /&gt;        timer = new Timer(BLINK_INTERVAL, listener);&lt;br /&gt;        timer.start();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removeNotify() {&lt;br /&gt; super.removeNotify();&lt;br /&gt;        timer.stop();&lt;br /&gt; timer.removeActionListener(listener);&lt;br /&gt; timer = null;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1742753672617176246-780886204034352722?l=johannes-martin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-martin.blogspot.com/feeds/780886204034352722/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1742753672617176246&amp;postID=780886204034352722' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1742753672617176246/posts/default/780886204034352722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1742753672617176246/posts/default/780886204034352722'/><link rel='alternate' type='text/html' href='http://johannes-martin.blogspot.com/2008/06/cleaning-up-animated-swing-controls.html' title='Cleaning up animated swing controls'/><author><name>jmartin</name><uri>http://www.blogger.com/profile/02541873904167726970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1742753672617176246.post-4246887308614699365</id><published>2008-05-22T00:53:00.003+02:00</published><updated>2008-05-22T00:57:21.124+02:00</updated><title type='text'>openvz VE slow to terminate</title><content type='html'>Sometimes openvz VEs take very long to terminate. The process can be shortened:&lt;br /&gt;&lt;br /&gt;"ps ax | grep -w init" shows all the init processes. One of them belongs to the VE to be terminated. Use "vzpid &lt;process id&gt;" to find out which one. Then kill -9 that process.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1742753672617176246-4246887308614699365?l=johannes-martin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-martin.blogspot.com/feeds/4246887308614699365/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1742753672617176246&amp;postID=4246887308614699365' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1742753672617176246/posts/default/4246887308614699365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1742753672617176246/posts/default/4246887308614699365'/><link rel='alternate' type='text/html' href='http://johannes-martin.blogspot.com/2008/05/openvz-ve-slow-to-terminate.html' title='openvz VE slow to terminate'/><author><name>jmartin</name><uri>http://www.blogger.com/profile/02541873904167726970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1742753672617176246.post-6992938945275441911</id><published>2008-05-22T00:37:00.004+02:00</published><updated>2008-06-18T07:43:12.832+02:00</updated><title type='text'>get openvz to consent to checkpointing VEs with aufs, cifs and nfs file systems</title><content type='html'>openvz currently checks all file systems mounted under the VEs root against a static list of file system types. If one of the mounted file systems is not in that list, vzctl checkpoint complains about "unsupported fs type".&lt;br /&gt;&lt;br /&gt;This can be fixed by extending the list of file systems and recompiling the vzcpt kernel module.&lt;br /&gt;&lt;br /&gt;Here's how to do it under Ubuntu hardy:&lt;br /&gt;&lt;pre&gt;cd /usr/local/src&lt;br /&gt;apt-get -b source linux-image-2.6.24-17-openvz&lt;br /&gt;cd linux-2.6.24&lt;br /&gt;for a in debian/binary-custom.d/openvz/patchset/*.patch; do patch -p1 &lt; $a; done&lt;br /&gt;cd kernel/cpt&lt;br /&gt;patch &lt;&lt; EOF&lt;br /&gt;--- cpt_files.h~        2008-05-21 23:58:48.000000000 +0200&lt;br /&gt;+++ cpt_files.h 2008-05-22 00:04:00.000000000 +0200&lt;br /&gt;@@ -63,6 +63,9 @@&lt;br /&gt;         strcmp(mnt-&gt;mnt_sb-&gt;s_type-&gt;name, "ext2") != 0 &amp;&amp; \&lt;br /&gt;         strcmp(mnt-&gt;mnt_sb-&gt;s_type-&gt;name, "simfs") != 0 &amp;&amp; \&lt;br /&gt;         strcmp(mnt-&gt;mnt_sb-&gt;s_type-&gt;name, "unionfs") != 0 &amp;&amp; \&lt;br /&gt;+        strcmp(mnt-&gt;mnt_sb-&gt;s_type-&gt;name, "aufs") != 0 &amp;&amp; \&lt;br /&gt;+        strcmp(mnt-&gt;mnt_sb-&gt;s_type-&gt;name, "nfs") != 0 &amp;&amp; \&lt;br /&gt;+        strcmp(mnt-&gt;mnt_sb-&gt;s_type-&gt;name, "cifs") != 0 &amp;&amp; \&lt;br /&gt;         strcmp(mnt-&gt;mnt_sb-&gt;s_type-&gt;name, "tmpfs") != 0 &amp;&amp; \&lt;br /&gt;         strcmp(mnt-&gt;mnt_sb-&gt;s_type-&gt;name, "devpts") != 0 &amp;&amp; \&lt;br /&gt;         strcmp(mnt-&gt;mnt_sb-&gt;s_type-&gt;name, "proc") != 0 &amp;&amp; \&lt;br /&gt;EOF&lt;br /&gt;make -C /usr/src/linux M=/usr/local/src/linux-2.6.24/kernel/cpt modules modules_install&lt;br /&gt;/lib/modules/2.6.24-17-openvz/extra&lt;br /&gt;mv vz* ../kernel/kernel/cpt&lt;br /&gt;depmod -a&lt;br /&gt;/etc/init.d/vz stop&lt;br /&gt;/etc/init.d/vz start&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1742753672617176246-6992938945275441911?l=johannes-martin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-martin.blogspot.com/feeds/6992938945275441911/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1742753672617176246&amp;postID=6992938945275441911' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1742753672617176246/posts/default/6992938945275441911'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1742753672617176246/posts/default/6992938945275441911'/><link rel='alternate' type='text/html' href='http://johannes-martin.blogspot.com/2008/05/get-openvz-to-consent-to-checkpointing.html' title='get openvz to consent to checkpointing VEs with aufs, cifs and nfs file systems'/><author><name>jmartin</name><uri>http://www.blogger.com/profile/02541873904167726970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1742753672617176246.post-2729377057805731069</id><published>2008-05-19T08:49:00.001+02:00</published><updated>2008-06-18T07:44:16.755+02:00</updated><title type='text'>aufs with openvz and ubuntu</title><content type='html'>openvz on ubuntu currently only works with linux-image-2.6.24-17-openvz and linux-ubuntu-modules-2.6.24-17-openvz available through "deb http://ppa.launchpad.net/compbrain/ubuntu hardy main".&lt;br /&gt;&lt;br /&gt;Thes packages don't contain the aufs module, so it has to be compiled seperately:&lt;br /&gt;&lt;pre&gt;apt-get install aufs-source&lt;br /&gt;cd /usr/src&lt;br /&gt;tar xjf aufs.tar.bz2&lt;br /&gt;cd modules/aufs&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Apply the following patch:&lt;br /&gt;&lt;pre&gt;*** vfsub.h~    2008-02-05 04:44:50.000000000 +0100&lt;br /&gt;--- vfsub.h     2008-05-19 01:45:01.000000000 +0200&lt;br /&gt;***************&lt;br /&gt;*** 33,38 ****&lt;br /&gt;--- 33,39 ----&lt;br /&gt; #include &lt;linux h=""&gt;&lt;br /&gt; #endif&lt;br /&gt;&lt;br /&gt;+ #define CONFIG_SECURITY_APPARMOR&lt;br /&gt; /* ---------------------------------------------------------------------- */&lt;br /&gt;&lt;br /&gt; struct aufs_hin_ignore;&lt;br /&gt;&lt;/linux&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Then compile:&lt;br /&gt;&lt;pre&gt;/usr/bin/make -C /usr/src/linux M=/usr/src/modules/aufs modules modules_install&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1742753672617176246-2729377057805731069?l=johannes-martin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-martin.blogspot.com/feeds/2729377057805731069/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1742753672617176246&amp;postID=2729377057805731069' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1742753672617176246/posts/default/2729377057805731069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1742753672617176246/posts/default/2729377057805731069'/><link rel='alternate' type='text/html' href='http://johannes-martin.blogspot.com/2008/05/aufs-with-openvz-and-ubuntu.html' title='aufs with openvz and ubuntu'/><author><name>jmartin</name><uri>http://www.blogger.com/profile/02541873904167726970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1742753672617176246.post-6940361681988348331</id><published>2008-05-19T08:41:00.000+02:00</published><updated>2008-05-19T08:48:03.730+02:00</updated><title type='text'>NX under Ubuntu Hardy</title><content type='html'>After upgrading to Ubuntu Hardy, NX reported the following error: "Cannot find KDE environment."&lt;br /&gt;&lt;br /&gt;Here's how to fix it: &lt;a href="http://chem-bla-ics.blogspot.com/2007/08/nxclient-on-ubuntu-gutsy.html"&gt;http://chem-bla-ics.blogspot.com/2007/08/nxclient-on-ubuntu-gutsy.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1742753672617176246-6940361681988348331?l=johannes-martin.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-martin.blogspot.com/feeds/6940361681988348331/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1742753672617176246&amp;postID=6940361681988348331' title='0 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1742753672617176246/posts/default/6940361681988348331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1742753672617176246/posts/default/6940361681988348331'/><link rel='alternate' type='text/html' href='http://johannes-martin.blogspot.com/2008/05/nx-under-ubuntu-hardy.html' title='NX under Ubuntu Hardy'/><author><name>jmartin</name><uri>http://www.blogger.com/profile/02541873904167726970</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
