<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Misty thoughts &#187; programming</title>
	<atom:link href="http://blog.kfirbreger.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.kfirbreger.com</link>
	<description></description>
	<lastBuildDate>Tue, 13 Jul 2010 07:44:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Setting up Solr for Drupal under tomcat</title>
		<link>http://blog.kfirbreger.com/2010/07/13/setting-up-solr-for-drupal-under-tomcat/</link>
		<comments>http://blog.kfirbreger.com/2010/07/13/setting-up-solr-for-drupal-under-tomcat/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 06:37:56 +0000</pubDate>
		<dc:creator>Kfir</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[work]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[solr]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://blog.kfirbreger.com/?p=263</guid>
		<description><![CDATA[Disclaimer: This method will probably not work for all servers running tomcat, it is more a personal guide then a general one. Solr is a "popular, blazing fast open source enterprise search platform from the Apache Lucene project". Drupal search has traditionally been less then adequate. Using Solr to index and search you Drupal site [...]]]></description>
			<content:encoded><![CDATA[<p>Disclaimer: This method will probably not work for all servers running tomcat, it is more a personal guide then a general one.</p>
<p>Solr is a "popular, blazing fast open source enterprise search platform from the Apache Lucene project". Drupal search has traditionally been less then adequate. Using Solr to index and search you Drupal site is therefore quite helpful.</p>
<p>To start, download the Solr package (<a href="http://www.apache.org/dyn/closer.cgi/lucene/solr/">link</a>) and the Solr drupal module (<a href="http://drupal.org/project/apachesolr">link</a>). the current standard distribution is Solr 1.4 and Drupal 6.<br />
Unarchive the tar files in a location that is reachable from your server.</p>
<p>We will assume that tomcat is installed in <code>/opt/tomcat</code></p>
<p>In the Solr package there is an example application. That is the Solr application we are going to use. If you can write your own, you probably don't need this tutorial.</p>
<p><strong>Step 1:</strong><br />
Copy the example application, found in the solr package under <code>example/webapps</code> to the tomecat webapps folder which should be <code>/opt/tomcat/webapps</code>. when copying the file rename it to something other the solr. this will enable you to have multiplie solr installations running under one Tomcat container. We will assume the app is renamed <code>new_solr_inst</code>. If you are in the tomcat root folder the command should like like this:<br />
<code>cp /path/to/solr/package/apache-solr-1.4.0/apache-solr-1.4.0/example/webapps/solr.war webapps/new_solr_inst.war</code></p>
<p>Tomcat will pick up the war file and open it automatically after a restart.</p>
<p><strong>Step 2:</strong><br />
In the tomcat root folder create a folder to hold your Solr configuration and data.<br />
<code>mkdir new_solr_inst</code><br />
Copy the example app configuration into that folder<br />
<code>cp -R /path/to/solr/package/apache-solr-1.4.0/apache-solr-1.4.0/example/solr/* new_solr_inst</code></p>
<p><strong>Step 3:</strong><br />
You need to replace the original <code>schema.xml</code> and <code>solrconfig.xml</code> with the ones provided by the drupal module. Copy these two files to your Solr configuration folder. Assuming you are currently at the tomcat root folder<br />
<code>cp /path/to/solr/module/schema.xml new_solr_inst/conf</code><br />
<code>cp /path/to/solr/module/solrconfig.xml new_solr_inst/conf</code><br />
The Solr app is now ready for use.</p>
<p><strong>Step 4:</strong><br />
The last step is needed to inform Tomcat about the app and its settings. Go to <code>conf/Catalina/localhost</code> and create the file <code>new_solr_inst.xml</code>. In that file fill the following content:</p>
<div id="_mcePaste"><code>&lt;Context docBase="/opt/tomcat/webapps/new_solr_inst.war" debug="0" privileged="true" allowLinking="true" crossContext="true"&gt;</code></div>
<div id="_mcePaste"><code>&lt;Environment name="solr/home" type="java.lang.String" value="/opt/tomcat/new_solr_inst" override="true" /&gt;</code></div>
<div id="_mcePaste"><code>&lt;/Context&gt;</code></div>
<p><strong>Step 5:</strong><br />
You need to restart tomcat<br />
<code>/opt/tomcat/bin/shutdown.sh</code><br />
<code>/opt/tomcat/bin/startup.sh</code><br />
And your Solr should be running. There are three tests we can use to check everything went well.</p>
<ul>
<li>Tomcat has opened the war file. There is now a folder <code>new_solr_inst</code> in the <code>webapps</code> folder of Tomcat.</li>
<li>Solr has made a <code>data</code> directory in the Solr home folder (that is <code>/opt/tomcat/new_solr_inst</code>)</li>
<li>In your browser go to the Solr app <code>http://domain:tomcat_port/new_solr_inst</code> and you should see a welcome screen</li>
</ul>
<p>If all is well you are ready to combine this Solr installation with your Drupal</p>
<p><strong>Step 6:</strong><br />
Activate the Apache-Solr module and go to the Solr module settings page <code>admin/settings/apachesolr</code><br />
Assuming tomcat and drupal are running on the same server fill in <code>localhost</code> as the host name, fill in the port tomcat is running on and solr path should be your app name in the tomcat webapps folder. In our case is it <code>new_solr_inst</code>.</p>
<p>Save the settings. Drupal should inform you that a connection is made with Solr</p>
<p>Notes</p>
<ul>
<li>It is not nessecary to put the app configuration in the Tomcat root folder. you can probably (though I have not tested this) place it anywhere you want. you do need to make sure that the environment tag in the Tomact configuration file (the one in the <code>conf/Catalina/localhost</code> folder) is pointing to the right place.</li>
<li>If you make changes to the schema you may need to dump all the indices Solr has made. you can do this via the Drupal admin interface for the Solr module.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.kfirbreger.com/2010/07/13/setting-up-solr-for-drupal-under-tomcat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery animation problem in ie7</title>
		<link>http://blog.kfirbreger.com/2010/05/28/jquery-animation-problem-in-ie7/</link>
		<comments>http://blog.kfirbreger.com/2010/05/28/jquery-animation-problem-in-ie7/#comments</comments>
		<pubDate>Fri, 28 May 2010 11:24:30 +0000</pubDate>
		<dc:creator>Kfir</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[ie problems]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.kfirbreger.com/2010/05/28/jquery-animation-problem-in-ie7/</guid>
		<description><![CDATA[For one of our projects, I was creating a photo bar. When the mouse was over one of the photos it was ment to increase in size and decrease back to original size when the mouse left. Unfortunately the client for which this was developed uses ie7 exclusively. This has brought two problems: 1. ie7 [...]]]></description>
			<content:encoded><![CDATA[<p>For one of our projects, I was creating a photo bar. When the mouse was over one of the photos it was ment to increase in size and decrease back to original size when the mouse left. Unfortunately the client for which this was developed uses ie7 exclusively. This has brought two  problems:<br />
1. ie7 does not support the mouseleave event. I needed to replace it with mouseout event.<br />
2. ie7 does not accept the position property in the jQuery animate function. Giving the position as a parameter will cause an error.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kfirbreger.com/2010/05/28/jquery-animation-problem-in-ie7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting session ID in Drupal 6</title>
		<link>http://blog.kfirbreger.com/2010/02/25/getting-session-id-in-drupal-6/</link>
		<comments>http://blog.kfirbreger.com/2010/02/25/getting-session-id-in-drupal-6/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 20:49:22 +0000</pubDate>
		<dc:creator>Kfir</dc:creator>
				<category><![CDATA[guide]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.kfirbreger.com/?p=257</guid>
		<description><![CDATA[Drupal saves its sessions in the sessions table. One can always query they table to get the session ID. There is however a faster way. If the user is logged it, the session id can be found with the following code: global $user; $user->sid; In any case the session id can also be read from [...]]]></description>
			<content:encoded><![CDATA[<p>
Drupal saves its sessions in the sessions table. One can always query they table to get the session ID. There is however a faster way.<br />
If the user is logged it, the session id can be found with the following code:</p>
<pre>
global $user;
$user->sid;
</pre>
<p><span>In any case the session id can also be read from the cookie:</span></p>
<pre>
$_COOKIE[session_name()];
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.kfirbreger.com/2010/02/25/getting-session-id-in-drupal-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to truly disable drupal cache</title>
		<link>http://blog.kfirbreger.com/2009/05/29/how-to-truly-disable-drupal-cache/</link>
		<comments>http://blog.kfirbreger.com/2009/05/29/how-to-truly-disable-drupal-cache/#comments</comments>
		<pubDate>Fri, 29 May 2009 10:26:05 +0000</pubDate>
		<dc:creator>Kfir</dc:creator>
				<category><![CDATA[guide]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.kfirbreger.com/?p=168</guid>
		<description><![CDATA[Drupal, like most CMSes uses cache intensively to speed things up. In a production site that is exactly what you what. However when developing, cache can cause you much pain. If your an expert in drupal you probably already realized when you need to clear the cache in order to see changes and when not [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>
Drupal, like most CMSes uses cache intensively to speed things up. In a production site that is exactly what you what. However when developing, cache can cause you much pain.</p>
</div>
<div>
<p>
If your an expert in drupal you probably already realized when you need to clear the cache in order to see changes and when not too. the developer module even makes it quite easy to do. However for me, and I am quite sure to quite a lot of other people it is not that clear.
</p>
</div>
<div>
<p>"Wait", you might say. "Drupal has a disable cache setting". You would be right to say that. Only it doesn't completely disable the cache, only part of the cache, namely the page caching. To truly disable cache you need to do a bit of a hacking to the cache code. Yes I know they say to never hack core (cache is part of the core drupal release). for me this was worth it. I figure as long as you remember its there and don't use it in production you should be fine. The following piece of code needs to be added in <code>include/cache.inc</code>. There are two functions there that you need to edit:</p>
<ul>
<li><code>cache_get</code></li>
<li><code>cache_set</code></li>
</ul>
<p>In <code>cache_get</code> place the code right after the <code>global $user</code>. In <code>cache_set</code>  place it at the start of the function. Here is the code that you need to add.<br />
<code><br />
if(variable_get('cache', CACHE_DISABLED) == CACHE_DISABLED) {<br />
    return 0;<br />
}<br />
</code><br />
Kudos for this hack goes to Rolf van der Krol. Cheers mate.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.kfirbreger.com/2009/05/29/how-to-truly-disable-drupal-cache/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Django and static files</title>
		<link>http://blog.kfirbreger.com/2008/09/26/django-and-static-files/</link>
		<comments>http://blog.kfirbreger.com/2008/09/26/django-and-static-files/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 18:18:18 +0000</pubDate>
		<dc:creator>Kfir</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://blog.kfirbreger.com/?p=90</guid>
		<description><![CDATA[After a long break I have resumed my side project in django. Last night I came upon a problem. When testing a page outside django, the page was rendered correctly. When it was rendered through django the javascript files were not located. At this point I have to admit I was a bit fullish and [...]]]></description>
			<content:encoded><![CDATA[<div>
<p>After a long break I have resumed my side project in django. Last night I came upon a problem. When testing a page outside django, the page was rendered correctly. When it was rendered through django the javascript files were not located.</p>
</div>
<div>
<p>At this point I have to admit I was a bit fullish and forgot to look at the web server's log to see if the files were correctly served. that was an hour and a half of trying to figure out why the javascript functions were not found. So after smartening up I found out that the javascript files were not found. It seemed that django kept looking for them in the wrong location. Using the example <a href="http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs">here</a> I eventually got it all to working.</p>
</div>
<div>
<p>It comes down to this. in the settings.py file there is a reference to the media URL and to the file system path to the media directory. Adding the following code to the urls.py<br />
<code><br />
if settings.DEBUG:<br />
urlpatterns += patterns('',<br />
(r'^tripcalc/media/(?P<br />
.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),<br />
)<br />
</code><br />
Will make sure that while django is in debug mode, serving of the static files will be done via django. for production sites it is better to let a dedicated web server (such as Apache) serve these static files.<br />
And that took care of it. I can now continue with the development. And it also enabled me to call the CSS file, so style is also shown. hurray.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.kfirbreger.com/2008/09/26/django-and-static-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secret software</title>
		<link>http://blog.kfirbreger.com/2008/08/07/secret-software/</link>
		<comments>http://blog.kfirbreger.com/2008/08/07/secret-software/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 11:17:40 +0000</pubDate>
		<dc:creator>Kfir</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[it]]></category>
		<category><![CDATA[spyware]]></category>
		<category><![CDATA[thinking]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.kfirbreger.com/?p=76</guid>
		<description><![CDATA[An interesting talk about secret software and why it should not be allowed in the public sector]]></description>
			<content:encoded><![CDATA[<div>
<p>
An interesting talk about secret software and why it should not be allowed in the public sector
</p>
</div>
<p>
<embed src="http://blip.tv/play/AcSDRIT3Pg" type="application/x-shockwave-flash" width="240" height="200" allowscriptaccess="always" allowfullscreen="true"></embed> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kfirbreger.com/2008/08/07/secret-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Django on Dreamhost</title>
		<link>http://blog.kfirbreger.com/2008/05/19/installing-django-on-dreamhost/</link>
		<comments>http://blog.kfirbreger.com/2008/05/19/installing-django-on-dreamhost/#comments</comments>
		<pubDate>Mon, 19 May 2008 10:29:44 +0000</pubDate>
		<dc:creator>Kfir</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[dreamhost]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://blog.kfirbreger.com/?p=73</guid>
		<description><![CDATA[Dreamhost appears on the django site as one of the django friendly hosting services. Unfortunately, dreamhost does not officially support django. It does not have mod_python installed. Django is instead deployed using FastCGI. Hopefully sometime in the future mod_python will be added. There are a few good guides I have found, that explain how to [...]]]></description>
			<content:encoded><![CDATA[<p>Dreamhost appears on the django site as one of the django friendly hosting services. Unfortunately, dreamhost does not officially support django. It does not have mod_python installed. Django is instead deployed using FastCGI. Hopefully sometime in the future mod_python will be added. There are a few good guides I have found, that explain how to setup django on a dreamhost account:</p>
<li>Jeff Croft has a good guide on his <a href="http://jeffcroft.com/blog/2006/may/11/django-dreamhost/">blog</a></li>
<li>Gordon Tillman also has a good informative <a href="http://www.gordontillman.info/Development/DjangoDreamhost">page</a></li>
<li>The dreamhost wiki also has a <a href="http://wiki.dreamhost.com/index.php/Django">guide</a></li>
<p>Between the three of them you can probably find all the information needed for installing django for use on a dreamhost account. I will not repeat what they explain but instead add some from my own experience.</p>
<h2>Python</h2>
<p>Dreamhost, at the moment of writing, is running python 2.4. Luckily it is possible for you to locally install python. I highly recommend it as it will enable you to setup the python environment exactly the way you want it, and it will make it easier to upgrade to future versions of python.</p>
<p><code><br />
cd ~/soft<br />
wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz<br />
tar xvfz Python-2.5.2.tgz<br />
cd Python-2.5.2<br />
./configure --prefix ~/install/dir --enable-shared<br />
make<br />
make install<br />
</code></p>
<p>Where <code>~/install/dir</code> is the directory you want python installed in. I followed dreamhost's <a href="http://wiki.dreamhost.com/Unix_account_setup">Unix account setup guide</a> and installed it under run. I recommend you do to, as it is easier to have full control over you <code>/usr/local</code>.<br />
Also adding setuptools makes future installs easier</p>
<p><code><br />
cd ~/soft<br />
wget http://peak.telecommunity.com/dist/ez_setup.py<br />
~/path/to/yourpython/python ez_setup.py<br />
</code></p>
<p>This will add the <code>easy_install</code> script which will simplify adding packages to your own python install. The final step is adding the new MySQLdb package</p>
<p><code><br />
cd ~/soft<br />
svn co https://mysql-python.svn.sourceforge.net/svnroot/mysql-python/trunk/MySQLdb MySQLdb<br />
easy_install MySQLdb<br />
</code></p>
<p>This is assuming easy_install is in your PATH. If it is not it needs to be added.</p>
<p>Your now ready to install django using your very own Python installation. That is detailed enough so I will move to two problems I met after the installation.</p>
<h2>Post Installation Problems</h2>
<p>I met with two problems that had frustrated me for a few hours. To save you the future installer some pain here they are in case you experience something similar</p>
<p><strong>syncdb after admin activation:</strong> This should have been very obvious to me but for some reason it escaped me. After enabling the admin page you must run <code>django-admin.py syncdb</code> in your project home page. What happened was that I ran it before I enabled the admin application. This lead to the creation of the needed tables in the MySQL database, but no tables for the admin application. After enabling the admin application, more tables need to be created to accommodate the new application data. The errors I got gave me the impression that there was an error in the MySQLdb egg, so I reinstalled it, then tried to find some workaround. Eventually I realized that I'm just missing the admin tables.</p>
<p><strong>.htacess:</strong> This was the real mind bender. I kept getting an internal server error saying that it reached maximum internal allowed redirects. It was obviously a configuration error so I compared my .htaccess with that of the guides and it looked the same. So I looked else, but I kept coming back to the conclusion it has to be in the .htaccess. Yet no matter how often I looked at it I couldn't find what was wrong. I need to point out that I am no expret when it comes to apache and that maybe if I knew more about it this would have been simple, but I didn't so I got some gray hairs before I realized I'm missing a space between the - and the [L]. A bloody white space! I was feeling furious and incredibly stupid at the same time.</p>
<p>Django is now up and running, and I like it so far. I sure is a lot nicer to work with then with JSP and servlets. Enjoy your python</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kfirbreger.com/2008/05/19/installing-django-on-dreamhost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Cascade delete in MySQL</title>
		<link>http://blog.kfirbreger.com/2008/04/25/cascade-delete-in-mysql/</link>
		<comments>http://blog.kfirbreger.com/2008/04/25/cascade-delete-in-mysql/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 18:03:00 +0000</pubDate>
		<dc:creator>Kfir</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://blog.kfirbreger.com/2008/04/25/cascade-delete-in-mysql/</guid>
		<description><![CDATA[Now that I am actually getting payed to program instead of paying to program, I find myself in greater need of practical information. Putting some of it on my blog will help me keep all the knowledge in one place. To start off, I'll mention Cascading delete in SQL. In the database schema there are [...]]]></description>
			<content:encoded><![CDATA[<p>
Now that I am actually getting payed to program instead of paying to program, I find myself in greater need of practical information. Putting some of it on my blog will help me keep all the knowledge in one place. To start off, I'll mention Cascading delete in SQL.<br />
In the database schema there are 3 tables used to store different objects. As there is a many to many relationship between the the objects, there are relation tables.
</p>
<p><img src="http://blog.kfirbreger.com/wp-content/uploads/2008/04/db-layout.png" alt="Basic database layout" /> </p>
<p>
Using cascading delete I can define that if an object is removed from its table, all relation tables entries with that object id are also removed. Quite handy. the way this achieves is MySQL is through the use of foreign keys. If I define in the table members the unique id of a user as a foreign key I can also define tell the RDMS to delete the entries in members where that foreign key exist. Here is an example of the definitions:
</p>
<p></p>
<p><code><br />
CREATE TABLE members (<br />
					usr_id VARCHAR(30) NOT NULL,<br />
					grp_id VARCHAR(30) NOT NULL,<br />
					FOREIGN KEY usr_id REFERENCE user (usr_id) ON DELETE CASCADE,<br />
					FOREIGN KEY grp_id REFERENCE group (grp_id) ON DELETE CASCADE);<br />
</code></p>
<p></p>
<p>
As you can see the table is created normally by defining the fields, then the foreign keys are named. The REFERENCE shows to which column in what table they refer to.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kfirbreger.com/2008/04/25/cascade-delete-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Long day</title>
		<link>http://blog.kfirbreger.com/2007/08/18/a-long-day/</link>
		<comments>http://blog.kfirbreger.com/2007/08/18/a-long-day/#comments</comments>
		<pubDate>Fri, 17 Aug 2007 22:39:09 +0000</pubDate>
		<dc:creator>Kfir</dc:creator>
				<category><![CDATA[Me]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.kfirbreger.com/?p=17</guid>
		<description><![CDATA[This has been one long, and interesting day I finally got the code part of my project done. Though I still need to finish testing it, it looks like its all good. I had spent all yesterday developing the equations in Maple. I wont bore you with the math but there sure was a lot [...]]]></description>
			<content:encoded><![CDATA[<p>This has been one long, and interesting day</p>
<p>I finally got the code part of my project done. Though I still need to finish testing it, it looks like its all good. I had spent all yesterday developing the equations in Maple. I wont bore you with the math but there sure was  a lot of it. I ended up with 3 full pages of math Luckily with some export and text replacement I could incorporate it into my python code. Then came the real hard part</p>
<p>I end up with an equation with my variable to the power of 8. Apparently there is no closed form solution for equations with a power greater then 4. Which leaves me with numerical technique. If your thinking what the? well your where I was this morning. Luckly google saved the day. What on earth did I do before google. There are ways to solve this given a range of numbers to look at, or a starting estimate. Both of which I could give. Scipy has some implementation to do that. So that was finally done. Now that I can find in focal length Y value, I finally could complete the whole calibration on the fly.</p>
<p>Amazing how two days of head scratching and math can be summed up by a few lines.</p>
<p>Then Paula got home, we had diner and I got IMed to come play some wow, which I just started doing again. It was fun, as it usually is.</p>
<p>Somewhere in there I also managed to learn how to fix the boot record for windows. I was removing linux from Paula's computer and while removing grub things went wrong and the windows partition just wouldn't boot. In come Are, which is one of the best IT guys I know. I really think there is very little he doesn't know about anything tech.</p>
<p>I wanted to make a longer post, but its late, and I'm a bit, eh, tipsy, so this will have to do.</p>
<p>Good night</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kfirbreger.com/2007/08/18/a-long-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good Spirit</title>
		<link>http://blog.kfirbreger.com/2007/08/01/good-spirit/</link>
		<comments>http://blog.kfirbreger.com/2007/08/01/good-spirit/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 15:28:55 +0000</pubDate>
		<dc:creator>Kfir</dc:creator>
				<category><![CDATA[Me]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://blog.kfirbreger.com/?p=14</guid>
		<description><![CDATA[The last few days I have been making great progress on my thesis. Things are finally starting to fall into their place and the pace is great. I managed to solve some weird problems and I am now at the point where the difference between the calculated and the measured matrix is practically zero. that [...]]]></description>
			<content:encoded><![CDATA[<p>The last few days I have been making great progress on my thesis. Things are finally starting to fall into their place and the pace is great. I managed to solve some weird problems and I am now at the point where the difference between the calculated and the measured matrix is practically zero. that is, when projecting using the both matrices, the relation between both projections is 1.00008, which is great. Also while projecting i get a max of 2.3 pixel error and an average of 0.8 which is totally acceptable for such an early stage. All this advancement sure makes me feel good. Not that I intend to keep going with the University. It's been enough for now, I really am looking forward to doing some more projects.</p>
<p>Which brings me to Joost. Still no word from them. I guess its normal, I should expect a week or two, but I really would like to know if i get a shot at working for them. the more i think of it, the more I like the idea. I guess Ill just have to wait and see.</p>
<p>And now its time for me to get back into my Kruppa's equation explicit form development. which is the last thing I still need to program.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.kfirbreger.com/2007/08/01/good-spirit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
