<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet href="http://frost.de/lifetype-1.2.2//styles/rss.css" type="text/css"?>
<rss version="0.91">

 <channel>
  <title>coldtobi&#039;s blog</title>
  <link>http://blog.coldtobi.de/1_coldtobis_blog</link>
  <description> Life is more than binary. 
</description>
    <item>
   <title>N2M: parallel build dpkg-buildpackage and pdebuild</title>
   <description> Note-To-Myself: 
 Build on two CPUs: 
  pdebuild --debuildopts "-j2"   
  dpkg-buildpackage -j2  
 &nbsp; 
 When using dpkg-buildpackge (or debuild) you alos can export this env: 
 export DEB_BUILD_OPTIONS=parallel=2 
 to set the numbers of parallel builds. (eg. into .bashrc) </description>
   <link>http://blog.coldtobi.de/1_coldtobis_blog/archive/303_n2m_parallel_build_dpkg-buildpackage_and_pdebuild.html</link>
      <pubDate>Sat, 14 Jan 2012 13:38:45 +0100</pubDate>   
  </item>
    <item>
   <title>Windows CE: Assertion failed in wincore.cpp line 1034</title>
   <description> 
For home automation, I grabbed my old PDA and started coding for it, using the Microsoft embedded Visual C++ Studio 3.0 (was free at that time ;-))
 
 
As soon as you start debugging, you immediatly get an assert: &quot;Assertion failed in file wincore.cpp, line 1034&quot;. This only happens on the &quot;emulated&quot; PDA, but even with the wizard generated files. 
 
 
However, I solved this already on another project, but I needed to google it up again, so its time to document this:
 
 
 
 
 
	 In your project, open the Class Wizard (in the View menu) 
	 Select your App-Class 
	 Add the Message Handler &quot;PreTranslateMessage&quot; 
	 Double click on the now listed member function 
	 Make the member function look this like, adding the bold lines: 
 
 
	 BOOL &lt;your-app-name&gt;App::PreTranslateMessage(MSG* pMsg)  
	{ 
	 #ifdef _WIN32_WCE_EMULATION 
	&nbsp;&nbsp;&nbsp; if( ! ::IsWindow(pMsg-&gt;hwnd))  
	&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return TRUE;  
	#endif  
	 &nbsp;&nbsp;&nbsp;  
	&nbsp;&nbsp;&nbsp; return CWinApp::PreTranslateMessage(pMsg); 
	} 
	  
 
 
&nbsp;
 </description>
   <link>http://blog.coldtobi.de/1_coldtobis_blog/archive/302_windows_ce_assertion_failed_in_wincorecpp_line_1034.html</link>
      <pubDate>Sun, 19 Jun 2011 23:31:58 +0200</pubDate>   
  </item>
    <item>
   <title>CakePHP: Baking a Application in Minutes</title>
   <description> 
 On my last PHP project I spent too much time on basic tasks like form validation, generation and all the stuff behind. As this &quot;problems&quot; are quite common this is basically a reinvention of the wheel. So I started looking for a good, easy to understand PHP Framework to speed things up.&nbsp; 
 
 
What I found is  CakePHP , a MVC based framework. 
 
 
Ok, there are several frameworks available, so why to choose CakePHP? I
think this is up to personal taste which framework appeals you most. Of
course, there are comparisons in the blogosphere, so this can be a
starting point for the decision. ( for example )
 
 
Back to the cake. Well, IMPRESSIVE. This framework saves you lots of work -- most functions you need everyday are already there and the  documentation called &quot;Cookbook&quot;  is also quite complete and easy to understand. The API is not very complicated, so learning this framework is definitely faster  than writing your own framework.  (For the German readers: read  this article ).
 
 
Nevertheless, back to the topic again. &nbsp; 
 
 
To get an application up and running in minutes you can use a method they call  scaffolding . You setup a  scaffold * and your are ready. 
 
 
 (* Your scafold consists of a database and two files.... Of course, I assume you have your webserver and database server ready, and for the sake of easiness debian running to install all required packages. As an alternative to a webserver, you might want to check the package cakephp-instaweb and the docs  here . Also for the sake of easiness, this tutorial shows will not use mod_rewrite, to avoid the hassle involving proper mod_rewrite configuration)  
 
 
Don't believe it?
 
 
Try it yourself.&nbsp;
 
 
 
 
 
OK Lets do a TODO-List? Start your stopwatch.... 
 
 
  1) Install cakephp
  
 
 
	 
	 aptitude install cakephp cakephp-scripts 
	 
 
 
 
 2)&nbsp; &quot;bake&quot; your application in /var/www as the webserver user   (just answer cake's questions as below. Most are default, so just press &quot;enter&quot;. I marked all where you indeed have to enter something  red. )   
 
 
	 #su   
	 Password:  
	 #su www-data  
	 #cake bake todo  
	 
	 Welcome to CakePHP v1.3.7 Console  
	 ---------------------------------------------------------------  
	 App : www  
	 Path: /var/www  
	 ---------------------------------------------------------------  
	 Bake Project  
	 Skel Directory: /usr/share/php/cake/console/templates/skel  
	 Will be copied to: /var/www/todo  
	 ---------------------------------------------------------------  
	 Look okay? (y/n/q)   
	 [y] &gt;   
	 Do you want verbose output? (y/n)   
	 [n] &gt;   
	 ---------------------------------------------------------------  
	 Created: todo in /var/www/todo  
	 ---------------------------------------------------------------  
	 
	 Creating file /var/www/todo/views/pages/home.ctp  
	 Wrote `/var/www/todo/views/pages/home.ctp`  
	 Welcome page created  
	 Random hash key created for 'Security.salt'  
	 Random seed created for 'Security.cipherSeed'  
	 CAKE_CORE_INCLUDE_PATH set to /usr/share/php in webroot/index.php  
	 CAKE_CORE_INCLUDE_PATH set to /usr/share/php in webroot/test.php  
	 Remember to check these value after moving to production server  
	 Your database configuration was not found. Take a moment to create one.  
	 ---------------------------------------------------------------  
	 Database Configuration:   
	 
	 ---------------------------------------------------------------   
	 Name:&nbsp;  
	[default] &gt;  
	Driver: (db2/firebird/mssql/mysql/mysqli/odbc/oracle/postgres/sqlite/sybase)  
	[mysql] &gt;   sqlite   
	Persistent Connection? (y/n)  
	[n] &gt;  
	Database Host:&nbsp;     
	 
	 [localhost] &gt;    
	 
	 Port?&nbsp;    
	 
	 [n] &gt;   
	 User:&nbsp;   
	 [root] &gt;   
	 Password:&nbsp;   
	 &gt;   
	 The password you supplied was empty. Use an empty password? (y/n)   
	 [n] &gt;   y    
	 Database Name:&nbsp;   
	 [cake] &gt;     /var/www/todo/db.sqlite    
	 Table Prefix?&nbsp;   
	 [n] &gt;   
	 Table encoding?&nbsp;   
	 [n] &gt;   
	 
	 ---------------------------------------------------------------  
	 The following database configuration will be created:  
	 ---------------------------------------------------------------  
	 Name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default  
	 Driver:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sqlite  
	 Persistent:&nbsp;&nbsp; false  
	 Host:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   /var/www/todo/db.sqlite  
	 User:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root  
	 Pass:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   
	 Database:&nbsp;&nbsp;&nbsp;&nbsp; todo  
	 Look okay? (y/n)   
	 [y] &gt;&nbsp;&nbsp;&nbsp;&nbsp;   
	 Do you wish to add another database configuration?&nbsp;   
	 [n] &gt;   
	 # 
 
 
  3) populate your database&nbsp;  
 
 
Our todo should have a datestamp when modified, a prioriy, a progress indicator, a checkbox if its done,&nbsp; some title and a description ....
 
 
	 
	&nbsp;
	  # (copy the following to a file name,&nbsp; for example to&nbsp; /tmp/db.txt)
	 
	 
	 
	 CREATE TABLE todos ( 
	&nbsp; id INTEGER AUTO_INCREMENT, 
	&nbsp; modified datetime , 
	&nbsp; title varchar(127) , 
	&nbsp; description text , 
	&nbsp; done tinyint(1) DEFAULT 0, 
	&nbsp; priority int(11) , 
	&nbsp; progress integer , 
	&nbsp; PRIMARY KEY (id) 
	); 
	 
 
 
&nbsp;
... and ask sqlite to initialize it by
 
 
	 
	 sqlite /var/www/todo/db.sqlite &lt;/tmp/db.txt  
	 
 
 
&nbsp;
 
 
  4) Disable mod_rewrite setting in&nbsp;   /var/www/todo/config/core.php  , by remove the comment in around line 69:   
 
 
	 &nbsp;/** 
	&nbsp;* To configure CakePHP *not* to use mod_rewrite and to 
	&nbsp;* use CakePHP pretty URLs, remove these .htaccess 
	&nbsp;* files: 
	&nbsp;* 
	&nbsp;* /.htaccess 
	&nbsp;* /app/.htaccess 
	&nbsp;* /app/webroot/.htaccess 
	&nbsp;* 
	&nbsp;* And uncomment the App.baseUrl below: 
	&nbsp;*/ 
	&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;&nbsp; Configure::write('App.baseUrl', env('SCRIPT_NAME'));  
 
 
&nbsp;
 
 
  5)&nbsp; Create the Controller for your todo list: (create the file&nbsp;   /var/www/todo/controllers/todos_controller.php  )  
 
 
Containing just those few lines:
 
 
	 
	 &lt;?php 
	 
	class TodosController extends AppController { 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var $scaffold; 
	} 
	?&gt; 
	 
 
 
  6) Create the Model for your todo list   ( create the file    /var/www/todo/models/todo.php  )  
 
 
&nbsp;
With this:
 
 
	 
	 &lt;?php 
	 
	class Todo extends AppModel { 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var $name = 'Todo'; 
	 
	?&gt; 
	 
 
 
  7) Enjoy  
 
 
Point your browser to&nbsp;  http://localhost/todo/index.php/todos  for your todo list, a nice scarford    CRUD application 
 
 
&nbsp;
 
 
  A) Bonus points:  
 
 
For bonus points and to demonstrate the power of CakePHP, lets add validation and some basic sorts to the ToDo List. I want to sort it regarding priority and put the &quot;dones&quot; at the end of the list: Just Change&nbsp; 
 /var/www/todo/models/todo.php  to the following:
 
 
	 
	&nbsp; &lt;?php 
	 
	class Todo extends AppModel { 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var $name = 'Todo'; 
	 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var $validate = array( 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'title' =&gt; array( 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'rule' =&gt; 'notEmpty', 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'message' =&gt; &quot;Bitte ausf&uuml;llen&quot;), 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'priority' =&gt; array( 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'rule' =&gt; 'notEmpty', 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'message' =&gt; &quot;Bitte ausf&uuml;llen&quot;), 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'description' =&gt; array( 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'rule' =&gt; 'notEmpty', 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'message' =&gt; &quot;Bitte ausf&uuml;llen&quot;), 
	 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ); 
	 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function beforeFind($query) { 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $query['order'][]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 'done'; 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $query['order'][]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = 'priority DESC';  
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return $query; 
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } 
	 
	} 
	?&gt; 
	 
 
 
&nbsp;
 
 
Ok, there we are.  Pencils down.  
 
 
So, what does your stop watch show?&nbsp; IMPRESSIVE, right?
 
 
&nbsp;
 
 
	 
	  A Word of WARNING:   
	 
	 
	Note that this is fine for private purposes, but never put this online. For example, the scafolding code will not care about XSS!
	 
	 
	For example, enter a todo with this text:  &lt;script type=&quot;text/javascript&quot;&gt;alert(&quot; XSS &quot;);&lt;/script&gt;
	 
	 
	 REPEAT: IT IS NOT SAFE TO USE A SCAFOLDED APPLICATION. CAKE EXPLICITLY TELLS THAT YOU MUST SANIZITE ALL DATA BY YOURSELF!&nbsp;  
 
 
&nbsp;
 </description>
   <link>http://blog.coldtobi.de/1_coldtobis_blog/archive/301_cakephp_baking_a_application_in_minutes.html</link>
      <pubDate>Sun, 20 Mar 2011 12:17:49 +0100</pubDate>   
  </item>
    <item>
   <title>Enabling InnoDB support in debian (MySQL)</title>
   <description> 
InnoDB as storage engine has some advantages: Just one example: it is the backend to use when foreign keys are required.
 
 
For a complete picute, read the documenation:&nbsp; http://dev.mysql.com/doc/refman/5.1/en/innodb-storage-engine.html
 
 
&nbsp;However, on Debian InnoDB is disabled by default: (take a look at /etc/mysql/my.cnf)
 
 
	 
	&nbsp;skip-innodb
	 
 
 
However, it's not just uncommeting to enable it: Your mysqldaemon will fail.&nbsp; This article will explain how you can enable it with Debian 
 
 
Of course, this assumes that you already setup mysql on your Debian server. 
 

 
1.) To check which storage engines are available, so to determine if you have it already enabled, you can execute the following SQL statement (for example, from a shell using the command &quot;mysql -u root -p&quot;):
 
 
	 
	 thecus:/home/tobi# mysql -u root -p 
	Enter password:  
	Welcome to the MySQL monitor.&nbsp; Commands end with ; or \g. 
	 
	 
	 mysql&gt; SHOW ENGINES; 
	+------------+---------+--------------------------------------------------------------+--------------+------+------------+ 
	| Engine&nbsp; &nbsp;&nbsp; | Support | Comment&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Transactions | XA&nbsp;&nbsp; | Savepoints | 
	+------------+---------+--------------------------------------------------------------+--------------+------+------------+ 
	| MRG_MYISAM | YES&nbsp;&nbsp;&nbsp;&nbsp; | Collection of identical MyISAM tables&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	| BLACKHOLE&nbsp; | YES&nbsp;&nbsp;&nbsp;&nbsp; | /dev/null storage engine (anything you write to it disappear | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	| CSV&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | YES&nbsp;&nbsp;&nbsp;&nbsp; | CSV storage engine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	| MEMORY&nbsp;&nbsp;&nbsp;&nbsp; | YES&nbsp;&nbsp;&nbsp;&nbsp; | Hash based, stored in memory, useful for temporary tables&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	| FEDERATED&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Federated MySQL storage engine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NULL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NULL | NULL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	| ARCHIVE&nbsp;&nbsp;&nbsp; | YES&nbsp;&nbsp;&nbsp;&nbsp; | Archive storage engine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	| MyISAM&nbsp;&nbsp;&nbsp;&nbsp; | DEFAULT | Default engine as of MySQL 3.23 with great performance&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	+------------+---------+--------------------------------------------------------------+--------------+------+------------+ 
	7 rows in set (0.00 sec)  
 
 
 In this example, InnoDB is missing ;-) But how to enable it?
 
 
Here are the three steps required:
 
 
1) Edit /etc/mysql/my.cnf and comment out the skip-inno-db line. Add the following lines 
 
 
	 #skip-innodb   
	  innodb_data_home_dir =   
	  innodb_data_file_path = /var/lib/mysql/ibdata/ibdata1:100M:autoextend  
 
 
This will create a initally 100MByte big database file at the given location -- which does not exist yet:&nbsp;
 
 
2) Create the database location and set ownership -- of course you need to do that as root. 
 
 
	 
	 mkdir&nbsp; /var/lib/mysql/ibdata/  
	chown -R mysql:mysql /var/lib/mysql/ibdata 
	 
 
 
3) Let mysql initialize the database files.
 
 
On my (slow) database server I figured out that a /etc/init.d/mysql restart did not wait long enough for mysql until it gets ready. So I suggest to manually start the first time.&nbsp;
 
 
Note the &quot;&amp;&quot; at the end -- I start mysql in the background.&nbsp; &nbsp; The reason for starting mysqld in the background is, that I want to conveniently stop the daemon after it initalized the database -- if run in the foreground, Ctrl+C and Ctrl+Z seems to be trapped. 
 
 
	&nbsp; /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --port=3306 --socket=/var/run/mysqld/mysqld.sock &amp;   
	 
	 [1] 9724   
	 
	 thecus:/var/lib/mysql#    
	 
	 InnoDB: The first specified data file /var/lib/mysql/ibdata/ibdata1 did not exist:   
	 
	 InnoDB: a new database to be created!   
	 
	 110317 10:58:52&nbsp; InnoDB: Setting file /var/lib/mysql/ibdata/ibdata1 size to 100 MB   
	 
	 InnoDB: Database physically writes the file full: wait...   
	 
	 InnoDB: Progress in MB: 100   
	 
	 110317 10:58:57&nbsp; InnoDB: Log file ./ib_logfile0 did not exist: new to be created   
	 
	 InnoDB: Setting log file ./ib_logfile0 size to 5 MB   
	 
	 InnoDB: Database physically writes the file full: wait...   
	 
	 110317 10:58:58&nbsp; InnoDB: Log file ./ib_logfile1 did not exist: new to be created   
	 
	 InnoDB: Setting log file ./ib_logfile1 size to 5 MB   
	 
	 InnoDB: Database physically writes the file full: wait...   
	 
	 InnoDB: Doublewrite buffer not found: creating new   
	 
	 InnoDB: Doublewrite buffer created   
	 
	 InnoDB: Creating foreign key constraint system tables   
	 
	 InnoDB: Foreign key constraint system tables created   
	 
	 110317 10:59:00&nbsp; InnoDB: Started; log sequence number 0 0   
	 
	 110317 10:59:00 [Note] Event Scheduler: Loaded 0 events   
	 
	 110317 10:59:00 [Note] /usr/sbin/mysqld: ready for connections.   
	 
	 Version: '5.1.49-3'&nbsp; socket: '/var/run/mysqld/mysqld.sock'&nbsp; port: 3306&nbsp; (Debian)  
 
 
After that, the files are created -- you can check it with  ls /var/lib/mysql/ibdata/  
 
 
To stop mysql after it did create the database file, get its pid with jobs -p and ask it to terminate. (Note: Make sure to use your pid.... below ) 
 
 
	 thecus:/var/lib/mysql# jobs -p 
	9724 
	thecus:/var/lib/mysql# kill  &lt;your pid&gt;  # in my example it would be 9724 
	thecus:/var/lib/mysql# 110317 11:03:50 [Note] /usr/sbin/mysqld: Normal shutdown 
	 
	110317 11:03:50 [Note] Event Scheduler: Purging the queue. 0 events 
	110317 11:03:50&nbsp; InnoDB: Starting shutdown... 
	110317 11:03:51&nbsp; InnoDB: Shutdown completed; log sequence number 0 44233 
	110317 11:03:51 [Note] /usr/sbin/mysqld: Shutdown complete 
	 
 
 
Now you can resume &quot;normal&quot; operation by /etc/init.d/mysql start, and it should work:
 
 
	 
	 thecus:/var/lib/mysql# /etc/init.d/mysql start 
	Starting MySQL database server: mysqld . .. 
	Checking for corrupt, not cleanly closed and upgrade needing tables.. 
	thecus:/var/lib/mysql# mysql -u root -p 
	Enter password:  
	 
	 
	 
	 mysql&gt; SHOW ENGINES; 
	+------------+---------+--------------------------------------------------------------+--------------+------+------------+ 
	| Engine&nbsp;&nbsp;&nbsp;&nbsp; | Support | Comment&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Transactions | XA&nbsp;&nbsp; | Savepoints | 
	+------------+---------+--------------------------------------------------------------+--------------+------+------------+ 
	| InnoDB&nbsp;&nbsp;&nbsp;&nbsp; | YES&nbsp;&nbsp;&nbsp;&nbsp; | Supports transactions, row-level locking, and foreign keys&nbsp;&nbsp; | YES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | YES&nbsp; | YES&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	| MRG_MYISAM | YES&nbsp;&nbsp;&nbsp;&nbsp; | Collection of identical MyISAM tables&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	| BLACKHOLE&nbsp; | YES&nbsp;&nbsp;&nbsp;&nbsp; | /dev/null storage engine (anything you write to it disappea) | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	| CSV&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | YES&nbsp;&nbsp;&nbsp;&nbsp; | CSV storage engine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	| MEMORY&nbsp;&nbsp;&nbsp;&nbsp; | YES&nbsp;&nbsp;&nbsp;&nbsp; | Hash based, stored in memory, useful for temporary tables&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	| FEDERATED&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Federated MySQL storage engine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NULL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NULL | NULL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	| ARCHIVE&nbsp;&nbsp;&nbsp; | YES&nbsp;&nbsp;&nbsp;&nbsp; | Archive storage engine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	| MyISAM&nbsp;&nbsp;&nbsp;&nbsp; | DEFAULT | Default engine as of MySQL 3.23 with great performance&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | NO&nbsp;&nbsp; | NO&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
	+------------+---------+--------------------------------------------------------------+--------------+------+------------+ 
	8 rows in set (0.00 sec) 
	 
 
 
&nbsp;
 
</description>
   <link>http://blog.coldtobi.de/1_coldtobis_blog/archive/300_enabling_innodb_support_in_debian_mysql.html</link>
      <pubDate>Thu, 17 Mar 2011 10:17:37 +0100</pubDate>   
  </item>
    <item>
   <title>Flattr.</title>
   <description> 
&nbsp;
 
 
 
 
 
&nbsp;Flattr is a social micropayment plattform. But is is best to let them describe their idea:
 
 
	 
	Flattr was founded to help people share money, not just content.
	Before Flattr, the only reasonable way to donate has been to use Paypal
	or other systems to send money to people. The threshold for this is
	quite high. People would just ignore the option to send donations
	if it wasn't for a really important cause. Sending just a small sum has
	always been a pain in the ass. Who would ever even login to a payment
	system just to donate &euro;0.01? And &euro;10 was just too high for just one
	blog entry we liked...
	 
	 
	Flattr solves this issue. When you're registered to flattr, you
	pay a small monthly fee. You set the amount yourself. At the end of the
	month, that fee is divided between all the things you flattered. You're
	always logged in to the account. That means that giving someone some
	flattr-love is just a button away. And you should! Clicking one more
	button doesn't add to your fee, it just divides the fee between more
	people! Flattr tries to encourage people to share. Not only pieces of
	content, but also some money to support the people who created them.
	With love!
	 
 
 
&nbsp;
Yes, this is flattr about. Showing someone that you appreciate the content he/she created. And as I like the idea, I subscribed to it today and enabled the blog to show this little tiny flattr buttons.&nbsp; 
 
 
 Button showing ERROR?  
 
 
Maybe this is the reason why you are reading this post: You were on another post, where a link was placed next to a button showing &quot;ERROR&quot;... Well, for lifetype it is a manual process to submit all posts to flattr, so I did only for some hand-selected articles. For the others &quot;ERROR&quot; will show up, but you until I add this post, you can click on the button of this article instead. 
 
 
BTW: Thank you very much for your appreciation! 
 </description>
   <link>http://blog.coldtobi.de/1_coldtobis_blog/archive/299_flattr.html</link>
      <pubDate>Sun, 27 Feb 2011 23:14:21 +0100</pubDate>   
  </item>
    <item>
   <title>Pollin Net-IO PHP Library</title>
   <description> 
Currently I work on a small private home-automation project. The purpose to &quot;control&quot; the heating system at home (heat-pump system) via the Internet.&nbsp;
 
 
Okay, &quot;control&quot; is a too big word for the heat-pump as it has only 3 controlable modes, at least without reverse-engineering effort: &quot;normal&quot;, &quot;off&quot; and &quot;night reduction&quot; by an external analog input. The goal is to shift energy consumption to the lower priced off-peak times. 
 
 
For this project, I'm using a  Ethernet Board with an Atmel AVR microcontroller , my  Thecus N2100  as control server and  PHP .
 
 
 
 
 
So it makes sense to build a small PHP library, and maybe someone else has also use of this library.
 
 
The library is compatible with the original firmware and supportsthe following main functions:
 
 
	 Connecting to the network  
	 Setting the digital outputs and reading back the status (with the possiblity to cache the results)  
	 Reading the digital inputs (with the possiblity to cache the results)  
	 Reading the analog (ADC) inputs .  
 
 
&nbsp;
 
 
  Download the code   
 
 
Here's the library:&nbsp;  http://frost.de/files/net_io.txt  (make sure to change the extension to .php) 
 
 
And here are some testcases, also illustrating the usage:&nbsp;  http://frost.de/files/net_io_testcases.txt  (make sure to change the extension to .php)
 
 
  Usage snippets 
  
 
 
Instanciating  (NB: 10.243.48.250 is the IP I use on my network. You might need to change this. Factory-Default is 192.168.0.90):
 
 
 
	 $p = new pollin_netio(&quot;10.243.48.250&quot;);  
 
 
Setting an Output (example: Port 0 to high, 5V) - note Port 0 is Port 1 as on the hardware schematic.
 
 
	 
	 if ( false == $p-&gt;setport(0,1)) { 
	&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;echo &quot;ERROR on setting port 1\r\n&quot;; 
	&nbsp;&nbsp; &nbsp;} else&nbsp; { 
	&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;echo &quot; OK setting port 0\r\n&quot;; 
	&nbsp;&nbsp; &nbsp;} 
	} 
	 
 
 
&nbsp;Reading the input IO (eg. input 1) 
 
 
	 
	 $port = $p-&gt;query(8, false); 
	 
 
 
Reading analog values
 
 
	 
	 for ( $i=0; $i&lt;4; $i++) { 
	&nbsp;&nbsp;&nbsp; $result = $p-&gt;queryad($i,0); 
	&nbsp;&nbsp;&nbsp; if ( false == $result) { 
	&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo &quot;ERROR reading port $i\r\n&quot;; 
	&nbsp;&nbsp;&nbsp; } else&nbsp; { 
	&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; echo &quot;OK reading port $i (value $result)\r\n&quot;; 
	&nbsp;&nbsp;&nbsp; } 
	}  
	 
 
 
&nbsp;
 </description>
   <link>http://blog.coldtobi.de/1_coldtobis_blog/archive/298_pollin_net-io_php_library.html</link>
      <pubDate>Wed, 09 Feb 2011 19:37:08 +0100</pubDate>   
  </item>
    <item>
   <title>Link to safe</title>
   <description> 
Custom Firmware for a seagat FreeAgent Theater+ 
 
 
http://forums.seagate.com/t5/FreeAgent-Theater/Mod-Firmware-For-FreeAgent-Theater-Plus-Testers-Needed/m-p/40993/highlight/true#M667
 
 
Could be the next hacking project.
 </description>
   <link>http://blog.coldtobi.de/1_coldtobis_blog/archive/297_link_to_safe.html</link>
      <pubDate>Sun, 23 Jan 2011 10:01:07 +0100</pubDate>   
  </item>
   </channel>
</rss>

