<?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-6890875472506953541</id><updated>2012-02-16T06:25:23.655-08:00</updated><category term='mobile'/><category term='flash'/><category term='mail'/><category term='processing'/><category term='tricks'/><category term='tools'/><category term='AS 2.0'/><category term='cv'/><category term='project playground'/><category term='JMyron'/><category term='java'/><category term='php'/><category term='programming'/><category term='actionscript 2.0'/><category term='system admin'/><category term='the cell'/><category term='skype'/><category term='screen capture'/><category term='printing'/><category term='sourcecode'/><category term='application'/><category term='blog'/><category term='literature reference'/><category term='electronics'/><category term='Arduino'/><category term='sound'/><category term='maxmsp'/><category term='resources'/><category term='browser'/><category term='html'/><category term='mac'/><category term='IE'/><category term='symfony'/><category term='ubuntu'/><category term='proftpd'/><category term='opera'/><category term='ftp'/><category term='teaching'/><title type='text'>Organized Chaotic Space</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Hamlet Lin</name><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>34</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6890875472506953541.post-8837640744034279580</id><published>2011-07-31T00:19:00.001-07:00</published><updated>2011-07-31T00:19:31.915-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Advance form-&gt; Write to multiple tables in one form</title><content type='html'>http://www.symfony-project.org/more-with-symfony/1_4/en/06-Advanced-Forms&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-8837640744034279580?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/8837640744034279580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=8837640744034279580' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/8837640744034279580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/8837640744034279580'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2011/07/advance-form-write-to-multiple-tables.html' title='Advance form-&gt; Write to multiple tables in one form'/><author><name>hamletbonbon</name><uri>http://www.blogger.com/profile/17052262155511258574</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-6890875472506953541.post-6751473408428219437</id><published>2011-07-28T17:25:00.000-07:00</published><updated>2011-07-28T17:38:58.984-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>xdebug for symfony testing</title><content type='html'>&lt;div&gt;Update: The latest version of mamp already comes with xdebug so all we need to do is just to uncomment that xdebug line in php.ini.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/*&lt;/div&gt;http://oldforum.symfony-project.org/index.php/t/18326/&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Download revised version of xdebug from Komodo&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Replace the xdebug.so from MAMP php lib folder (e.g. /Applications/MAMP/bin/php5/lib/)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;uncomment the xdebug line from the php.ini file.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Restart apache and the test should run~&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;*/&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-6751473408428219437?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/6751473408428219437/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=6751473408428219437' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6751473408428219437'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6751473408428219437'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2011/07/xdebug-for-symfony-testing.html' title='xdebug for symfony testing'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-5214613340503944705</id><published>2011-07-20T21:30:00.000-07:00</published><updated>2011-07-20T21:48:19.137-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Layout and template system in Symfony</title><content type='html'>&lt;div&gt;CSS&lt;/div&gt;&lt;div&gt;view.yml (under apps/frontend/config/) defines which css file to be used as default.&lt;/div&gt;&lt;div&gt;Multiple default css files could be included in view.yml.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To customize a specific css file for a specific module and action, we can create a view.yml file under apps/frontend/modules/"module name"/config/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For instance, we have a job module, to specify which css to be used, we can create the following view.yml in apps/frontend/modules/job/config/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How does the final html actually being generated and presented to the user? Here's the flow.&lt;/div&gt;&lt;div&gt;Request from user-&amp;gt;routing based on the requested URL-&amp;gt;action.class.php analyze which action to be taken-&amp;gt;select the appropriate template-&amp;gt; combine the content through actiona nd template-&amp;gt;page back to user.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If we take a look at the file actions.class.php, there are different functions like&lt;/div&gt;&lt;div&gt;executeIndex, executeShow, executeNew&lt;/div&gt;&lt;div&gt;The string after "execute" are the actual action, which usually refer to the URL sent by the user.&lt;/div&gt;&lt;div&gt;For instance, if you type http://localhost:8080/job/new&lt;/div&gt;&lt;div&gt;the executeNew function will be triggered, and the "newSuccess.php" template will be loaded.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-5214613340503944705?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/5214613340503944705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=5214613340503944705' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/5214613340503944705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/5214613340503944705'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2011/07/layout-and-template-system-in-symfony.html' title='Layout and template system in Symfony'/><author><name>hamletbonbon</name><uri>http://www.blogger.com/profile/17052262155511258574</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-6890875472506953541.post-4529780422594975234</id><published>2011-07-20T21:07:00.001-07:00</published><updated>2011-07-20T21:28:57.386-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Data model in Symfony using Doctrine (ORM)</title><content type='html'>In day 3 of the book (Practical Symfony), a data model was created using an Doctrine, a kind of &lt;a href="http://en.wikipedia.org/wiki/Object-relational_mapping"&gt;ORM&lt;/a&gt;, It looks pretty complicate at the first sight, but prove to be very handy after a while.&lt;div&gt;In fact Doctrine make use of another language (YAML) to deal with schema definition. The relationship between Doctrine and YAML could be found &lt;a href="http://en.wikipedia.org/wiki/Object-relational_mapping"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In Symfony, in order to define your data model (which is fundamentally the relational database schema), the first file you need to hack in is the schema.yml which is placed under (config/doctrine/)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I followed the instruction in Practical Symfony book, which define the whole database and its relation in YAML format. But you can do a reverse Doctrine generate through &lt;span class="Apple-style-span"&gt;symfony doctrine:build-schema&lt;/span&gt;, which essentially build the YAML file based on your existing mysql structure. Mind you you have to define the right foreign key and define the database info in databases.yml (in config/) first.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's the really cool thing about Symfony, php database objects generation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;symfony doctrine:build --model&lt;/span&gt; (generate models files)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;symfony doctrine:build --sql&lt;/span&gt; (generate sql for inserting data models to SQL)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;symfony doctrine:insert-sql&lt;/span&gt; (quite obvious, isn't it?)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Alternatively, all these steps could be compress to a simple&lt;/div&gt;&lt;div&gt;symfony doctrine:build --all command&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So the database tables has been built, but we still need to load some data into the DB to get it to work. You're right, we need another  YAML file. These files are put in /data/fixtures&lt;/div&gt;&lt;div&gt;For instance if we're going to put some data in the obeetCategory table, we can create a file like the following:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 14px; line-height: 19px; "&gt;&lt;pre style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0.5em; padding-right: 0px; padding-bottom: 0.5em; padding-left: 1em; font-family: 'Bitstream Vera Sans Mono', monospace; background-color: rgb(34, 34, 34); overflow-x: auto; overflow-y: auto; line-height: 17px; font-size: 13px; color: rgb(255, 255, 255); "&gt;JobeetCategory:   actAs: { Timestampable: ~ }   columns:     name: { type: string(255), notnull: true, unique: true }&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We can do the same for creating other yml files for other tables, and put it in the folder (data/fixture/)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After all the yml files are created, we can now run the following command and load the initial data in the database&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;symfony doctrine:data-load&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Before we see the miracle of symfony, we need to run one more command to generate the nessceary php files in the module folder.&lt;/div&gt;&lt;div&gt;symfony doctrine:generate-module --with-show --non-verbose-templates frontend job JobeetJob&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now if we check the module folder (apps/frontend/modules/), a new folder (job/) is created with actions and templates in it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Visit the following URL to have a taste of Symfony&lt;/div&gt;&lt;div&gt;http://localhost/frontend_dev.php/job&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Viola, it's already working!&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-4529780422594975234?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/4529780422594975234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=4529780422594975234' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/4529780422594975234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/4529780422594975234'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2011/07/data-model-in-symfony-using-doctrine.html' title='Data model in Symfony using Doctrine (ORM)'/><author><name>hamletbonbon</name><uri>http://www.blogger.com/profile/17052262155511258574</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-6890875472506953541.post-2692024434846686873</id><published>2011-07-20T20:26:00.000-07:00</published><updated>2011-07-20T20:33:16.941-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>Symfony note (Basic project setup)</title><content type='html'>Some basic setup of symfony projects&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Download and install symfony&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create a project directory (e.g. /project/symfony/projectx)&lt;/div&gt;&lt;div&gt;in the project path (/project/symfony/projectx), run the following command&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" &gt;symfony generate:project "name of your project"&lt;/span&gt;, in this case&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; "&gt;symfony generate:project projectx&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Change the permission of cache and log to 777 (Make sure they are not in your web root)&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'courier new'; "&gt;chmod 777 log/ cache/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Download the symfony framework and unzip it in the lib/vendor (need to be created) folder of your project&lt;/div&gt;&lt;div&gt;in this case /project/symfony/projectx/lib/vendor/symfony&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Define the new site in httpd.conf (refer to Practical Symfony 1.4 Doctrine version Day 2 exercise)&lt;/div&gt;&lt;div&gt;Link the image folder through adding a Location directive in httpd&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You should now be able to access your site through http://localhost:8080/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-2692024434846686873?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/2692024434846686873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=2692024434846686873' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/2692024434846686873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/2692024434846686873'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2011/07/symfony-note-basic-project-setup.html' title='Symfony note (Basic project setup)'/><author><name>hamletbonbon</name><uri>http://www.blogger.com/profile/17052262155511258574</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-6890875472506953541.post-3411768747664663693</id><published>2011-07-08T22:23:00.001-07:00</published><updated>2011-07-08T22:23:41.198-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='symfony'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>Install Symfony framework in OSX with MAMP</title><content type='html'>http://www.tech-recipes.com/rx/2884/os_x_how_to_install_symfony_into_mamp/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-3411768747664663693?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/3411768747664663693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=3411768747664663693' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/3411768747664663693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/3411768747664663693'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2011/07/install-symfony-framework-in-osx-with.html' title='Install Symfony framework in OSX with MAMP'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-8679470073958408215</id><published>2011-07-08T22:22:00.001-07:00</published><updated>2011-07-08T22:23:01.323-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='php'/><title type='text'>PEAR configuration</title><content type='html'>To configure pear (PHP related framework)&lt;div&gt;&lt;a href="http://pear.php.net/manual/en/guide.users.commandline.config.php"&gt;http://pear.php.net/manual/en/guide.users.commandline.config.php&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-8679470073958408215?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/8679470073958408215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=8679470073958408215' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/8679470073958408215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/8679470073958408215'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2011/07/pear-configuration.html' title='PEAR configuration'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-6814240657594097384</id><published>2010-08-02T19:14:00.001-07:00</published><updated>2010-08-02T19:15:37.690-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mail'/><category scheme='http://www.blogger.com/atom/ns#' term='mac'/><title type='text'>Disable preview in mac mail</title><content type='html'>from http://micahgilman.com/play/disable-mac-mailapp-inline-image-attachments/&lt;br /&gt;&lt;br /&gt;In terminal, enter the following command and restart mail app.&lt;br /&gt;&lt;code&gt;defaults write com.apple.mail DisableInlineAttachmentViewing -bool no&lt;/code&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-6814240657594097384?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/6814240657594097384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=6814240657594097384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6814240657594097384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6814240657594097384'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2010/08/disable-preview-in-mac-mail.html' title='Disable preview in mac mail'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-387957965746104240</id><published>2010-02-08T20:55:00.001-08:00</published><updated>2010-02-08T20:55:46.974-08:00</updated><title type='text'>Change Thunderbird attachment pane position</title><content type='html'>http://forums.mozillazine.org/viewtopic.php?f=39&amp;amp;t=397534&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-387957965746104240?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/387957965746104240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=387957965746104240' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/387957965746104240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/387957965746104240'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2010/02/change-thunderbird-attachment-pane.html' title='Change Thunderbird attachment pane position'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-2296586670027306154</id><published>2009-11-09T04:30:00.000-08:00</published><updated>2009-11-09T04:31:17.062-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='literature reference'/><title type='text'>Game and interactivity, an essay</title><content type='html'>&lt;a href="http://www.electronicbookreview.com/thread/firstperson/ludican-do"&gt;http://www.electronicbookreview.com/thread/firstperson/ludican-do&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-2296586670027306154?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/2296586670027306154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=2296586670027306154' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/2296586670027306154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/2296586670027306154'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2009/11/game-and-interactivity-essay.html' title='Game and interactivity, an essay'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-7826332563541504379</id><published>2009-11-05T17:39:00.000-08:00</published><updated>2009-12-06T16:45:17.379-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sourcecode'/><title type='text'>Regular expression in Dreamweaver (highslide javascript)</title><content type='html'>Using the following script in Dreamweaver to add highslide javascript to picture for slide show effects.&lt;br /&gt;&lt;br /&gt;Find&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;(&amp;lt;img src=[^&amp;gt;]*)("[^&amp;gt;]*")([^&amp;gt;]width=*[^&amp;gt;]*")([^&amp;gt;]*" height=*[^&amp;gt;]*")( /&amp;gt;)&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Replace with (remember to remove all &lt;code&gt;alt=""&lt;/code&gt; tag before running in order to retrieve all image path correctly.&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&amp;lt;a href=$2 class="highslide" onclick="return hs.expand(this)"&amp;gt;$1$2$3$4$5&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-7826332563541504379?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/7826332563541504379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=7826332563541504379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/7826332563541504379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/7826332563541504379'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2009/11/regular-expression-in-dreamweaver.html' title='Regular expression in Dreamweaver (highslide javascript)'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-4398855314696505944</id><published>2009-08-24T00:45:00.000-07:00</published><updated>2009-08-24T00:46:02.265-07:00</updated><title type='text'>Adobe AIR (Webcam Capture)</title><content type='html'>http://imm.sheridanc.on.ca/air/info.php?year=2008&amp;creator=irfan&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-4398855314696505944?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/4398855314696505944/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=4398855314696505944' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/4398855314696505944'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/4398855314696505944'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2009/08/adobe-air-webcam-capture.html' title='Adobe AIR (Webcam Capture)'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-5833845901700432090</id><published>2009-02-20T19:06:00.000-08:00</published><updated>2009-02-20T19:09:01.188-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='printing'/><category scheme='http://www.blogger.com/atom/ns#' term='processing'/><category scheme='http://www.blogger.com/atom/ns#' term='sourcecode'/><category scheme='http://www.blogger.com/atom/ns#' term='screen capture'/><title type='text'>Java screen capture + print service</title><content type='html'>Screen capture using Java (also work in processing) &lt;div&gt;[&lt;a href="http://www.roseindia.net/java/example/java/swing/Screenshot.shtml"&gt;link&lt;/a&gt;]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Printing image without using dialog box (in processing)&lt;/div&gt;&lt;div&gt;[&lt;a href="http://www.java2s.com/Code/Java/2D-Graphics-GUI/PrintanImagetoprintdirectly.htm"&gt;link&lt;/a&gt;]&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-5833845901700432090?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/5833845901700432090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=5833845901700432090' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/5833845901700432090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/5833845901700432090'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2009/02/java-screen-capture-print-service.html' title='Java screen capture + print service'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-5620853771317436751</id><published>2009-02-12T09:45:00.001-08:00</published><updated>2009-02-12T09:46:02.800-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sound'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='maxmsp'/><category scheme='http://www.blogger.com/atom/ns#' term='sourcecode'/><title type='text'>Spectrum analysis (Max/MSP)</title><content type='html'>&lt;a href="http://web.arch.usyd.edu.au/~alom9080/DECO2012_files/Analysis%20Introduction.pdf"&gt;http://web.arch.usyd.edu.au/~alom9080/DECO2012_files/Analysis%20Introduction.pdf&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-5620853771317436751?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/5620853771317436751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=5620853771317436751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/5620853771317436751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/5620853771317436751'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2009/02/spectrum-analysis-maxmsp.html' title='Spectrum analysis (Max/MSP)'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-8040691707955390113</id><published>2009-02-03T02:10:00.000-08:00</published><updated>2009-02-03T02:19:18.320-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='electronics'/><category scheme='http://www.blogger.com/atom/ns#' term='teaching'/><title type='text'>LM386 amplifier</title><content type='html'>&lt;a href="http://josepino.com/circuits/?mini_amplifier_lm386.jpc"&gt; Simple LM386 amplifier&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-8040691707955390113?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/8040691707955390113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=8040691707955390113' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/8040691707955390113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/8040691707955390113'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2009/02/lm386-amplifier.html' title='LM386 amplifier'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-1997847449060201340</id><published>2009-01-14T08:01:00.000-08:00</published><updated>2009-01-14T08:02:50.721-08:00</updated><title type='text'>How to build a theremin- final project from someone</title><content type='html'>A really nice article for theremin introduction&lt;br /&gt;&lt;a href="http://www.theremin.rwi.org.uk/dload/REPORT.PDF"&gt;http://www.theremin.rwi.org.uk/dload/REPORT.PDF&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-1997847449060201340?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/1997847449060201340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=1997847449060201340' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/1997847449060201340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/1997847449060201340'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2009/01/how-to-build-theremin-final-project.html' title='How to build a theremin- final project from someone'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-6335210785594246857</id><published>2009-01-13T04:37:00.001-08:00</published><updated>2009-01-16T00:36:01.482-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='resources'/><category scheme='http://www.blogger.com/atom/ns#' term='electronics'/><category scheme='http://www.blogger.com/atom/ns#' term='teaching'/><title type='text'>Physics and electronics teaching resources</title><content type='html'>&lt;a href="http://www.phy.cuhk.edu.hk/phyworld/resources/index.html"&gt;http://www.phy.cuhk.edu.hk/phyworld/resources/index.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-6335210785594246857?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/6335210785594246857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=6335210785594246857' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6335210785594246857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6335210785594246857'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2009/01/physics-and-electronics-teaching.html' title='Physics and electronics teaching resources'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-5762420003206451031</id><published>2009-01-11T18:33:00.000-08:00</published><updated>2009-01-11T18:34:35.155-08:00</updated><title type='text'>DVD to Final Cut Pro</title><content type='html'>Original Thread&lt;br /&gt;http://forum.videohelp.com/topic292626.html&lt;br /&gt;&lt;br /&gt;PgcDemux (For PC)&lt;br /&gt;http://www.videohelp.com/tools/PgcDemux&lt;br /&gt;&lt;br /&gt;MPEG_StreamClip (For Mac)&lt;br /&gt;http://www.videohelp.com/tools/MPEG_StreamClip&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-5762420003206451031?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/5762420003206451031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=5762420003206451031' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/5762420003206451031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/5762420003206451031'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2009/01/dvd-to-final-cut-pro.html' title='DVD to Final Cut Pro'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-8552743083225221460</id><published>2009-01-07T02:23:00.000-08:00</published><updated>2009-01-07T02:38:37.252-08:00</updated><title type='text'>DTMF + radio frequency remote control</title><content type='html'>OK, question time, what are you going to do if you're not allowed to use digital wireless network for remote control?&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Answer, use an analog one.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here's the best I got so far..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;A simple 4-ways switch using DTMF-&gt;BCD convertor&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;a lass="post-label" href="http://www.electronic-circuits-diagrams.com/remotecontrolsimages/remotecontrolsckt5.shtml"&gt;http://www.electronic-circuits-diagrams.com/remotecontrolsimages/remotecontrolsckt5.shtml&lt;/a&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Another blog with a lot of information about RF DTMF control&lt;div&gt;&lt;br /&gt;&lt;div &gt;&lt;a class="post-label" href="http://radio-control-schematics.blogspot.com"&gt;http://radio-control-schematics.blogspot.com&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-8552743083225221460?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/8552743083225221460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=8552743083225221460' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/8552743083225221460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/8552743083225221460'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2009/01/dtmf-radio-frequency-remote-control.html' title='DTMF + radio frequency remote control'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-9116878219765435916</id><published>2008-12-11T01:51:00.000-08:00</published><updated>2008-12-11T02:20:42.029-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='skype'/><category scheme='http://www.blogger.com/atom/ns#' term='processing'/><category scheme='http://www.blogger.com/atom/ns#' term='sourcecode'/><title type='text'>Using SkypeAPI in Processing</title><content type='html'>When helping a friend (my previous student) on her final project, I tried to use the SkypeAPI for Java in Processing, and finally got it work in windows XP using Processing 1.0 (Finally ... well I didn't know they released the 1.0 version until last week).&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Platform and system specifics:&lt;/div&gt;&lt;div&gt;OS- Windows XP&lt;/div&gt;&lt;div&gt;Processing version- Processing 1.0 (Without Java)&lt;/div&gt;&lt;div&gt;Sun JDK  (NOT JRE!) version- 1.6 rev 11&lt;/div&gt;&lt;div&gt;Skype API for Java- Latest code in tar ball [&lt;a href="http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/skype.tar.gz?view=tar"&gt;link&lt;/a&gt;]&lt;/div&gt;&lt;div&gt;Skype ver 2.0 or above&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Installation steps:&lt;/div&gt;&lt;div&gt;1) Do the usual setup for Processing and JDK, expand the tarball to a new folder.&lt;/div&gt;&lt;div&gt;2) In the sketch folder (in Processing version 1.0 only!), create the following file structure&lt;/div&gt;&lt;div&gt;&lt;br /&gt;-- libraries&lt;br /&gt;    -- skype&lt;br /&gt;        -- library&lt;br /&gt;            |-- skype.jar (copy from folder Skype-&gt;release)&lt;br /&gt;            |-- swt.jar (copy from Skype-&gt;lib-&gt;window)&lt;br /&gt;            |-- winp.jar (copy from Skype-&gt;lib-&gt;window)&lt;br /&gt;            |--libskype.jnilib (copy from Skype-&gt;res&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;  &lt;br /&gt;&lt;/div&gt;&lt;div&gt;3) Copy the file skype.dll to c:/windows/system32&lt;/div&gt;&lt;div&gt;4) Start Processing, now you should see an option  for importing skype library in import-&gt;libraries&lt;/div&gt;&lt;div&gt;5) Start Skype, test the following code in skype&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;import com.skype.connector.windows.*;&lt;br /&gt;import com.skype.connector.test.*;&lt;br /&gt;import com.skype.connector.*;&lt;br /&gt;import com.skype.connector.linux.*;&lt;br /&gt;import com.skype.*;&lt;br /&gt;import com.skype.connector.osx.*;&lt;br /&gt;import com.skype.connector.win32.*;&lt;br /&gt;&lt;br /&gt;void setup(){&lt;br /&gt;  try{&lt;br /&gt;  Skype.call(&amp;quot;+8521878200&amp;quot;);&lt;br /&gt;  }catch (Exception e){&lt;br /&gt;    e.printStackTrace();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void draw(){&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-9116878219765435916?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/9116878219765435916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=9116878219765435916' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/9116878219765435916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/9116878219765435916'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/12/using-skypeapi-in-processing.html' title='Using SkypeAPI in Processing'/><author><name>hamletbon</name><uri>http://www.blogger.com/profile/12301046125634408561</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6890875472506953541.post-1410089149213518490</id><published>2008-12-04T19:42:00.000-08:00</published><updated>2008-12-04T19:46:14.831-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='processing'/><category scheme='http://www.blogger.com/atom/ns#' term='sourcecode'/><title type='text'>Using AT commands + serial port to control mobile phone from processing</title><content type='html'>&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;import processing.serial.*;&lt;br /&gt;&lt;br /&gt;Serial mobilePort;&lt;br /&gt;&lt;br /&gt;void setup(){&lt;br /&gt;println(Serial.list());&lt;br /&gt; mobilePort=new Serial(this, Serial.list()[9], 9600);  &lt;br /&gt; size(400, 400);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void draw(){&lt;br /&gt;  // Expand array size to the number of bytes you expect&lt;br /&gt;  byte[] inBuffer = new byte[7];&lt;br /&gt;  while (mobilePort.available() &amp;gt; 0) {&lt;br /&gt;    inBuffer = mobilePort.readBytes();&lt;br /&gt;    mobilePort.readBytes(inBuffer);&lt;br /&gt;    if (inBuffer != null) {&lt;br /&gt;      String myString = new String(inBuffer);&lt;br /&gt;      println(myString);&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void mousePressed(){&lt;br /&gt;  //make phone calls&lt;br /&gt;  //mobilePort.write(&amp;quot;ATD+1878200;&amp;quot;);&lt;br /&gt; // mobilePort.write(&amp;quot;\n\r&amp;quot;);&lt;br /&gt;&lt;br /&gt; //Anser phone call&lt;br /&gt; mobilePort.write(&amp;quot;ATA;&amp;quot;);&lt;br /&gt; mobilePort.write(&amp;quot;\n\r&amp;quot;);&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-1410089149213518490?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/1410089149213518490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=1410089149213518490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/1410089149213518490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/1410089149213518490'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/12/using-at-commands-serial-port-to.html' title='Using AT commands + serial port to control mobile phone from processing'/><author><name>hamletbon</name><uri>http://www.blogger.com/profile/12301046125634408561</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-6890875472506953541.post-2378615249306550075</id><published>2008-12-04T04:22:00.000-08:00</published><updated>2008-12-05T20:47:02.570-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='electronics'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='processing'/><title type='text'>Hacked serproxy</title><content type='html'>There's a problem with the serproxy program for connecting ports number over 10. Based on the instructions in the &lt;a href="http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1140282379/5"&gt;arduino forum&lt;/a&gt;, I've recompiled the serproxy that overcome this problem.&lt;br /&gt;&lt;br /&gt;You can download it from &lt;a href="http://www.hamletbon.net/hkas/iinstallation/sampleCode/serproxy_bin.zip"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-2378615249306550075?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/2378615249306550075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=2378615249306550075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/2378615249306550075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/2378615249306550075'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/12/hacked-serproxy.html' title='Hacked serproxy'/><author><name>hamletbon</name><uri>http://www.blogger.com/profile/12301046125634408561</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-6890875472506953541.post-2847610553310427183</id><published>2008-12-03T19:16:00.001-08:00</published><updated>2008-12-03T19:16:59.802-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mobile'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='processing'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Asterisk + GSM phone as modem</title><content type='html'>http://ubuntuforums.org/showthread.php?t=166617&amp;highlight=nokia+modem&lt;br /&gt;&lt;br /&gt;Using ubuntu + wvdial + asterisk for sms!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-2847610553310427183?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/2847610553310427183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=2847610553310427183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/2847610553310427183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/2847610553310427183'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/12/asterisk-gsm-phone-as-modem.html' title='Asterisk + GSM phone as modem'/><author><name>hamletbon</name><uri>http://www.blogger.com/profile/12301046125634408561</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-6890875472506953541.post-6741596691019018983</id><published>2008-12-01T02:27:00.000-08:00</published><updated>2008-12-01T02:37:39.712-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='project playground'/><category scheme='http://www.blogger.com/atom/ns#' term='the cell'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='processing'/><title type='text'>Calibration for Sharp GP2Y0A700K IR range finder</title><content type='html'>A simple applet showing data for calibrating the Sharp GP2Y0A700K&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Base on some calibration data, I wrote this applet to show the relationship between voltage reading and range of the GP2Y0A700K IR sensor [&lt;a href="http://sweb.cityu.edu.hk/theblackbox/playground/demo/GP2Y0A700KCalibration/"&gt;link&lt;/a&gt;]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A simple screenCap&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_gEW5st9HMAc/STO-CNKOWnI/AAAAAAAAAAM/u-Ce-8IUB7A/s1600-h/calibration.gif"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 500px; height: 230px;" src="http://4.bp.blogspot.com/_gEW5st9HMAc/STO-CNKOWnI/AAAAAAAAAAM/u-Ce-8IUB7A/s320/calibration.gif" border="0" alt="" id="BLOGGER_PHOTO_ID_5274768533682543218" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-6741596691019018983?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/6741596691019018983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=6741596691019018983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6741596691019018983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6741596691019018983'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/12/calibration-for-sharp-gp2y0a700k-ir.html' title='Calibration for Sharp GP2Y0A700K IR range finder'/><author><name>hamletbon</name><uri>http://www.blogger.com/profile/12301046125634408561</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><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_gEW5st9HMAc/STO-CNKOWnI/AAAAAAAAAAM/u-Ce-8IUB7A/s72-c/calibration.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6890875472506953541.post-6494802513797395106</id><published>2008-11-30T19:49:00.000-08:00</published><updated>2008-11-30T19:57:42.025-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JMyron'/><category scheme='http://www.blogger.com/atom/ns#' term='processing'/><category scheme='http://www.blogger.com/atom/ns#' term='cv'/><category scheme='http://www.blogger.com/atom/ns#' term='sourcecode'/><title type='text'>Calculate activity level base on differenceImage() in JMyron</title><content type='html'>The code below use the function differenceImage in JMyron to calculate activity level.&lt;div&gt;(Skeleton based on Rijk's contriubution)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;pre class="code"&gt;&lt;br /&gt;import JMyron.*;&lt;br /&gt;&lt;br /&gt;JMyron m;//a camera object&lt;br /&gt;&lt;br /&gt;int numPixels;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void setup(){&lt;br /&gt;  size(320,240);&lt;br /&gt;  m = new JMyron();//make a new instance of the object&lt;br /&gt;  m.start(width,height);//start a capture at 320x240&lt;br /&gt;&lt;br /&gt;//  m.findGlobs(0);//disable the intelligence to speed up frame rate&lt;br /&gt;  println(&amp;quot;Myron &amp;quot; + m.version()); &lt;br /&gt;  numPixels = width * height;&lt;br /&gt;  // Create an array to store the previously captured frame&lt;br /&gt;  previousFrame = new int[numPixels];&lt;br /&gt;  currentFrame=new int[numPixels];&lt;br /&gt;//  m.adaptivity(0.5);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void draw(){&lt;br /&gt;  //count of non-black image (base on the differenceImage array)&lt;br /&gt;    int nonBlackCount=0;&lt;br /&gt;  m.update();//update the camera view&lt;br /&gt;  loadPixels();&lt;br /&gt;  int[] diffFrame = m.differenceImage(); //get the current image of the camera&lt;br /&gt;  for (int i=0; i&amp;lt;diffFrame.length; i++){&lt;br /&gt;    pixels[i]=diffFrame[i];&lt;br /&gt;    if((red(diffFrame[i])!=0)&amp;&amp;(green(diffFrame[i])!=0)&amp;&amp;(blue(diffFrame[i]))!=0){&lt;br /&gt;      nonBlackCount++;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;void mousePressed(){&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void stop(){&lt;br /&gt;  m.stop();//stop the object&lt;br /&gt;  super.stop();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-6494802513797395106?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/6494802513797395106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=6494802513797395106' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6494802513797395106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6494802513797395106'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/11/calculate-activity-level-base-on.html' title='Calculate activity level base on differenceImage() in JMyron'/><author><name>hamletbon</name><uri>http://www.blogger.com/profile/12301046125634408561</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-6890875472506953541.post-5314902575923621531</id><published>2008-11-30T08:14:00.001-08:00</published><updated>2008-11-30T08:17:14.376-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AS 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='actionscript 2.0'/><title type='text'>Change color of movieclip (Actionscipt 2.0)</title><content type='html'>Here's the Code for changing color of a movieclip (given the movieclip is in white color)&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;changeMCColor=function (_mcName:String, _red:Number, _green:Number, _blue:Number, _newAlpha:Number){&lt;br /&gt; &lt;br /&gt;//  trace("_xmouse/Stage.width: "+_xmouse/Stage.width);&lt;br /&gt;//    var xPercent:Number = 1 - (_xmouse/Stage.width);&lt;br /&gt;//    var yPercent:Number = 1 - (_ymouse/Stage.height);&lt;br /&gt;    var matrix:Array = new Array();&lt;br /&gt; if((_red&gt;1)||(_green&gt;1)||(_blue&gt;1)||(_newAlpha&gt;1)){//for 255 case&lt;br /&gt;    matrix = matrix.concat([_red/255, 0, 0, 0, 0]); // red&lt;br /&gt;    matrix = matrix.concat([0, _green/255, 0, 0, 0]); // green&lt;br /&gt;    matrix = matrix.concat([0, 0, _blue/255, 0, 0]); // blue&lt;br /&gt;    matrix = matrix.concat([0, 0, 0, _newAlpha/255, 0]); // alpha &lt;br /&gt; }else{   &lt;br /&gt;    matrix = matrix.concat([_red, 0, 0, 0, 0]); // red&lt;br /&gt;    matrix = matrix.concat([0, _green, 0, 0, 0]); // green&lt;br /&gt;    matrix = matrix.concat([0, 0, _blue, 0, 0]); // blue&lt;br /&gt;    matrix = matrix.concat([0, 0, 0, _newAlpha, 0]); // alpha &lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;    var filter:BitmapFilter = new ColorMatrixFilter(matrix);&lt;br /&gt;    eval("_root."+_mcName).filters = new Array(filter); &lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-5314902575923621531?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/5314902575923621531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=5314902575923621531' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/5314902575923621531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/5314902575923621531'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/11/change-color-of-movieclip-actionscipt.html' title='Change color of movieclip (Actionscipt 2.0)'/><author><name>hamletbon</name><uri>http://www.blogger.com/profile/12301046125634408561</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-6890875472506953541.post-6608257684140755612</id><published>2008-11-29T02:13:00.000-08:00</published><updated>2008-11-29T02:15:39.431-08:00</updated><title type='text'>Serial message from Arduino to Processing</title><content type='html'>In the previous post the example only demonstrate message being sent from Processing to Arduino, in thie example it is the other way around, sending message from Arduino to Processing. This require a little bit formatting from the Arduino side since the serial message could be very complex.&lt;br /&gt;The code here use "===" as separator and ";" as message termination.&lt;br /&gt;&lt;br /&gt;Arduino Code&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;/*&lt;br /&gt; * Button&lt;br /&gt; * by DojoDave &amp;lt;http://www.0j0.org&amp;gt;&lt;br /&gt; *&lt;br /&gt; * Turns on and off a light emitting diode(LED) connected to digital  &lt;br /&gt; * pin 13, when pressing a pushbutton attached to pin 7. &lt;br /&gt; *&lt;br /&gt; * http://www.arduino.cc/en/Tutorial/Button&lt;br /&gt; */&lt;br /&gt; &lt;br /&gt;int ledPin = 13;                // choose the pin for the LED&lt;br /&gt;int inputPin = 2;               // choose the input pin (for a pushbutton)&lt;br /&gt;int inputPin2 =3;&lt;br /&gt;int val = 0;                    // variable for reading the pin status&lt;br /&gt;int val2 = 0;                    // variable for reading the pin status&lt;br /&gt;&lt;br /&gt;void setup() {&lt;br /&gt;  pinMode(ledPin, OUTPUT);      // declare LED as output&lt;br /&gt;  pinMode(inputPin, INPUT);     // declare pushbutton as input&lt;br /&gt;  pinMode(inputPin2, INPUT);     // declare pushbutton as input  &lt;br /&gt;  digitalWrite(inputPin, HIGH);&lt;br /&gt;  digitalWrite(inputPin2, HIGH);  &lt;br /&gt;  Serial.begin(9600);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop(){&lt;br /&gt;  val = digitalRead(inputPin);  // read input value&lt;br /&gt;  val2 = digitalRead(inputPin2);  // read input value  &lt;br /&gt;  &lt;br /&gt;  if (val == LOW) {            // check if the input is HIGH&lt;br /&gt;    Serial.print(&amp;quot;===1&amp;quot;);&lt;br /&gt;    digitalWrite(ledPin, LOW);  // turn LED OFF&lt;br /&gt;  } else {&lt;br /&gt;    Serial.print(&amp;quot;===0&amp;quot;);    &lt;br /&gt;    digitalWrite(ledPin, HIGH); // turn LED ON&lt;br /&gt;  }&lt;br /&gt;  if (val2 == LOW) {            // check if the input is HIGH&lt;br /&gt;    Serial.print(&amp;quot;===1;&amp;quot;);&lt;br /&gt;    digitalWrite(ledPin, LOW);  // turn LED OFF&lt;br /&gt;  } else {&lt;br /&gt;    Serial.print(&amp;quot;===0;&amp;quot;);    &lt;br /&gt;    digitalWrite(ledPin, HIGH); // turn LED ON&lt;br /&gt;  }  &lt;br /&gt;  Serial.flush();&lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Processing Code&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;/**&lt;br /&gt; * Simple Read&lt;br /&gt; * &lt;br /&gt; * Read data from the serial port and change the color of a rectangle&lt;br /&gt; * when a switch connected to a Wiring or Arduino board is pressed and released.&lt;br /&gt; * This example works with the Wiring / Arduino program that follows below.&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;import processing.serial.*;&lt;br /&gt;&lt;br /&gt;Serial port;  // Create object from Serial class&lt;br /&gt;int val;      // Data received from the serial port&lt;br /&gt;&lt;br /&gt;void setup() &lt;br /&gt;{&lt;br /&gt;  size(200, 200);&lt;br /&gt;  frameRate(10);&lt;br /&gt;  // Open the port that the board is connected to and use the same speed (9600 bps)&lt;br /&gt;  port = new Serial(this,&amp;quot;COM16&amp;quot;, 9600);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;int buttonStatus=0;&lt;br /&gt;void draw()&lt;br /&gt;{&lt;br /&gt;  String serialMsg=&amp;quot;&amp;quot;;&lt;br /&gt;  if (0 &amp;lt; port.available()) {  // If data is available,&lt;br /&gt;    serialMsg = port.readStringUntil(char(';'));         // read it and store it in val&lt;br /&gt;//    println(&amp;quot;serialMsg: &amp;quot;+serialMsg);&lt;br /&gt;  }&lt;br /&gt;  if (serialMsg.split(&amp;quot;===&amp;quot;).length&amp;gt;2){&lt;br /&gt;    println(&amp;quot;serialMsg: &amp;quot;+serialMsg);&lt;br /&gt;//    println(&amp;quot;parsedMsg: &amp;quot;+serialMsg.split(&amp;quot;===&amp;quot;)[1].charAt(0));&lt;br /&gt;    println(&amp;quot;status 1: &amp;quot;+int(serialMsg.split(&amp;quot;===&amp;quot;)[1].charAt(0)-48));&lt;br /&gt;//    println(&amp;quot;parsedMsg: &amp;quot;+serialMsg.split(&amp;quot;===&amp;quot;)[1].charAt(0));&lt;br /&gt;    println(&amp;quot;status2: &amp;quot;+int(serialMsg.split(&amp;quot;===&amp;quot;)[2].charAt(0)-48));    &lt;br /&gt;    buttonStatus=int(serialMsg.split(&amp;quot;===&amp;quot;)[1].charAt(0)-48);&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;    port.clear();  &lt;br /&gt;  &lt;br /&gt;  background(255);             // Set background to white&lt;br /&gt;  if (buttonStatus == 0) {              // If the serial value is 0,&lt;br /&gt;    fill(0);                   // set fill to black&lt;br /&gt;  } &lt;br /&gt;  else {                       // If the serial value is not 0,&lt;br /&gt;    fill(204);                 // set fill to light gray&lt;br /&gt;  }&lt;br /&gt;  rect(50, 50, 100, 100);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;&lt;br /&gt;// Wiring / Arduino Code&lt;br /&gt;// Code for sensing a switch status and writing the value to the serial port.&lt;br /&gt;&lt;br /&gt;int switchPin = 4;                       // Switch connected to pin 4&lt;br /&gt;&lt;br /&gt;void setup() {&lt;br /&gt;  pinMode(switchPin, INPUT);             // Set pin 0 as an input&lt;br /&gt;  Serial.begin(9600);                    // Start serial communication at 9600 bps&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void loop() {&lt;br /&gt;  if (digitalRead(switchPin) == HIGH) {  // If switch is ON,&lt;br /&gt;    Serial.print(1, BYTE);               // send 1 to Processing&lt;br /&gt;  } else {                               // If the switch is not ON,&lt;br /&gt;    Serial.print(0, BYTE);               // send 0 to Processing&lt;br /&gt;  }&lt;br /&gt;  delay(100);                            // Wait 100 milliseconds&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-6608257684140755612?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/6608257684140755612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=6608257684140755612' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6608257684140755612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6608257684140755612'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/11/serial-message-from-arduino-to.html' title='Serial message from Arduino to Processing'/><author><name>hamletbon</name><uri>http://www.blogger.com/profile/12301046125634408561</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-6890875472506953541.post-6309195202078498965</id><published>2008-11-27T22:23:00.000-08:00</published><updated>2008-11-27T22:28:18.141-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tricks'/><category scheme='http://www.blogger.com/atom/ns#' term='IE'/><category scheme='http://www.blogger.com/atom/ns#' term='opera'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Using Opera for browsing IE only webpage</title><content type='html'>&lt;div&gt;Opera-&gt;Quick Reference-&gt;Edit Sites Preferences -&gt; Network -&gt; Browser Identification -&gt; Identify as IE&lt;span class="Apple-tab-span" style="white-space:pre"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-6309195202078498965?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/6309195202078498965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=6309195202078498965' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6309195202078498965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6309195202078498965'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/11/using-opera-for-browsing-ie-only.html' title='Using Opera for browsing IE only webpage'/><author><name>hamletbon</name><uri>http://www.blogger.com/profile/12301046125634408561</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-6890875472506953541.post-2273345091283676267</id><published>2008-11-27T08:29:00.000-08:00</published><updated>2008-11-27T08:51:14.509-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='project playground'/><category scheme='http://www.blogger.com/atom/ns#' term='electronics'/><category scheme='http://www.blogger.com/atom/ns#' term='the cell'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='processing'/><title type='text'>Wifi Arduino using Lantronix wiport</title><content type='html'>&lt;p&gt;So, what if you want to monitor and control 100 different arduinos at the same time? Don't tell me you're going to create 100 serial ports, a &lt;a href="www.lantronix.com/device-networking/embedded-device-servers/wiport.html"&gt;Lantronix Wiport&lt;/a&gt; could be a good idea since it allows arduino to be reached by wifi without heavy modding.&lt;/p&gt;&lt;p&gt;Just connect the TX port (Digital pin 1) to the RX pin on the Wiport, then you can use UDP to recieve data sent by the arduino through the wifi network.&lt;/p&gt;&lt;p&gt;For the data sending part, it is a little bit complicated since the output level for the Lantronix Wiport is 3.3 V leveled. It is fine for it to recieved the 5V signal from Arduino since it has a certain tolerance, but to send serial command from Wiport to Arduino, a 74HCT541D is used for pulling the 3.3V signal to 5V.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-2273345091283676267?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/2273345091283676267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=2273345091283676267' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/2273345091283676267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/2273345091283676267'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/11/wifi-arduino-using-lantronix-wiport.html' title='Wifi Arduino using Lantronix wiport'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-3342716136297900509</id><published>2008-11-27T08:26:00.000-08:00</published><updated>2008-11-27T08:28:41.473-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='project playground'/><category scheme='http://www.blogger.com/atom/ns#' term='electronics'/><category scheme='http://www.blogger.com/atom/ns#' term='the cell'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><title type='text'>Sharp IR sensor</title><content type='html'>&lt;p&gt;About Sharp IR sensors&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.acroname.com/robotics/info/articles/sharp/sharp.html#e8"&gt;http://www.acroname.com/robotics/info/articles/sharp/sharp.html#e8&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The output voltage for the sharp IR sensor has to be linearized for useable sensing, an article about linearization could be found here&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.acroname.com/robotics/info/articles/irlinear/irlinear.html"&gt;http://www.acroname.com/robotics/info/articles/irlinear/irlinear.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;To avoid the double sensitive zone (when moving too close to the sensor), one method COULD be combing 2 IR sensors that cover different ranges (To be implemented)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-3342716136297900509?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/3342716136297900509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=3342716136297900509' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/3342716136297900509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/3342716136297900509'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/11/sharp-ir-sensor.html' title='Sharp IR sensor'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-6581845958022079008</id><published>2008-11-27T08:20:00.000-08:00</published><updated>2008-11-27T08:26:13.672-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ftp'/><category scheme='http://www.blogger.com/atom/ns#' term='system admin'/><category scheme='http://www.blogger.com/atom/ns#' term='proftpd'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Managing quota on proftpd</title><content type='html'>&lt;p&gt;To manage quotas on proftpd using a file based monitoring system, the mod_quotatab and mod_quotatab_file has to be included during compile time.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;After that a very useful contributed admin tool for compiling the "limit" and "tally" table could be found here&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.castaglia.org/proftpd/contrib/ftpquota"&gt;http://www.castaglia.org/proftpd/contrib/ftpquota&lt;/a&gt;&lt;/p&gt;&lt;p&gt;All you need to do is to copy and paste the file and save it in one of the folder for generating the limit and tally table file. The instruction for using the ftpquota tool could be found here&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.castaglia.org/proftpd/contrib/ftpquota.html"&gt;http://www.castaglia.org/proftpd/contrib/ftpquota.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;And then just modify the /etc/proftpd/proftpd.conf following the instruction here (just change the location where you put the generated ftpquota files.&lt;/p&gt;&lt;p&gt;&lt;a href="http://castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-Quotas.html"&gt;http://castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-Quotas.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;And you're done~&lt;/p&gt;&lt;p&gt;Cool, nice ftp server~&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-6581845958022079008?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/6581845958022079008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=6581845958022079008' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6581845958022079008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/6581845958022079008'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/11/managing-quota-on-proftpd.html' title='Managing quota on proftpd'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-2071205572214654901</id><published>2008-11-26T19:49:00.001-08:00</published><updated>2008-11-30T20:03:41.153-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='application'/><category scheme='http://www.blogger.com/atom/ns#' term='blog'/><category scheme='http://www.blogger.com/atom/ns#' term='tools'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Posting program code on blog space</title><content type='html'>Convertor&lt;br /&gt;http://formatmysourcecode.blogspot.com/&lt;br /&gt;&lt;br /&gt;Java based convertor&lt;br /&gt;(Article)&lt;br /&gt;http://blog.js-development.com/2008/03/posting-source-code-on-blogger.html&lt;br /&gt;(application)&lt;br /&gt;http://juri-strumpflohner-projects.googlecode.com/files/WebCodeFormatter1.0.jar&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-2071205572214654901?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/2071205572214654901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=2071205572214654901' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/2071205572214654901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/2071205572214654901'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/11/posting-program-code-on-blog-space.html' title='Posting program code on blog space'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-22525261059455492</id><published>2008-11-26T19:48:00.001-08:00</published><updated>2008-11-26T19:51:06.979-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='electronics'/><category scheme='http://www.blogger.com/atom/ns#' term='Arduino'/><category scheme='http://www.blogger.com/atom/ns#' term='processing'/><category scheme='http://www.blogger.com/atom/ns#' term='sourcecode'/><title type='text'>UDP test Code</title><content type='html'>&lt;div&gt;&lt;br /&gt;Processing code for communication between Arduino and Processing via Lantronix&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;/**&lt;br /&gt;* (./) udp.pde - how to use UDP library as unicast connection&lt;br /&gt;* (cc) 2006, Cousot stephane for The Atelier Hypermedia&lt;br /&gt;* (-&amp;gt;) http://hypermedia.loeil.org/processing/&lt;br /&gt;*&lt;br /&gt;* Create a communication between Processing&amp;lt;-&amp;gt;Pure Data @ http://puredata.info/&lt;br /&gt;* This program also requires to run a small program on Pd to exchange data &lt;br /&gt;* (hum!!! for a complete experimentation), you can find the related Pd patch&lt;br /&gt;* at http://hypermedia.loeil.org/processing/udp.pd&lt;br /&gt;*&lt;br /&gt;* -- note that all Pd input/output messages are completed with the characters&lt;br /&gt;* ";\n". Don't refer to this notation for a normal use. --&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;// import UDP library&lt;br /&gt;import hypermedia.net.*;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;UDP udp;  // define the UDP object&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* init&lt;br /&gt;*/&lt;br /&gt;void setup() {&lt;br /&gt;&lt;br /&gt; // create a new datagram connection on port 6000&lt;br /&gt; // and wait for incomming message&lt;br /&gt; udp = new UDP( this, 6002);&lt;br /&gt; //udp.log( true );         // &amp;lt;-- printout the connection activity&lt;br /&gt; udp.listen( true );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//process events&lt;br /&gt;void draw() {;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* on key pressed event:&lt;br /&gt;* send the current key value over the network&lt;br /&gt;*/&lt;br /&gt;void keyPressed() {&lt;br /&gt;  &lt;br /&gt;   String message  = str( key );    // the message to send&lt;br /&gt;   String ip       = "localhost";    // the remote IP address&lt;br /&gt;   int port        = 10002;        // the destination port&lt;br /&gt;  &lt;br /&gt;   // formats the message for Pd&lt;br /&gt;   //message = message+";\n";&lt;br /&gt;   // send the message&lt;br /&gt;   udp.send( message, ip, port );&lt;br /&gt;  &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* To perform any action on datagram reception, you need to implement this&lt;br /&gt;* handler in your code. This method will be automatically called by the UDP&lt;br /&gt;* object each time he receive a nonnull message.&lt;br /&gt;* By default, this method have just one argument (the received message as&lt;br /&gt;* byte[] array), but in addition, two arguments (representing in order the&lt;br /&gt;* sender IP address and his port) can be set like below.&lt;br /&gt;*/&lt;br /&gt;// void receive( byte[] data ) {             // &amp;lt;-- default handler&lt;br /&gt;void receive( byte[] data, String ip, int port ) {    // &amp;lt;-- extended handler&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; // get the "real" message =&lt;br /&gt; // forget the ";\n" at the end &amp;lt;-- !!! only for a communication with Pd !!!&lt;br /&gt; data = subset(data, 0, data.length-2);&lt;br /&gt; String message = new String( data );&lt;br /&gt;&lt;br /&gt; // print the result&lt;br /&gt; println( "receive: \""+message+"\" from "+ip+" on port "+port );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-22525261059455492?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/22525261059455492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=22525261059455492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/22525261059455492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/22525261059455492'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/11/udp-test-code.html' title='UDP test Code'/><author><name>Hamlet Lin</name><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-6890875472506953541.post-8201876774488411631</id><published>2008-11-26T07:32:00.000-08:00</published><updated>2008-11-26T08:17:05.657-08:00</updated><title type='text'>Arduino Processing communication</title><content type='html'>&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Communication between Arduino and Processing&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;This post is aimed at giving an example for communication between Arduino and Processing using the bundled Serial Library for both packages.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;In this example, LEDs are connected to pins 2-9 of the Arduino board, and Processing control it through sending ASCII code of number 2-9 (Relative ASCII code 50 to 57).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;Arduino Code&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;[&lt;a href="http://hkas.hamletbon.net/iinstallation/sampleCode/ardProcessingCommunication/ardCode.txt" target="_blank"&gt;link&lt;/a&gt;]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Processing Code&lt;/div&gt;&lt;div&gt;[&lt;a href="http://hkas.hamletbon.net/iinstallation/sampleCode/ardProcessingCommunication/processingCode.txt" target="_blank"&gt;link&lt;/a&gt;]&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6890875472506953541-8201876774488411631?l=organizedchaoticspace.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://organizedchaoticspace.blogspot.com/feeds/8201876774488411631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6890875472506953541&amp;postID=8201876774488411631' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/8201876774488411631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6890875472506953541/posts/default/8201876774488411631'/><link rel='alternate' type='text/html' href='http://organizedchaoticspace.blogspot.com/2008/11/arduino-processing-communication.html' title='Arduino Processing communication'/><author><name>Hamlet Lin</name><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>
