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

<channel>
	<title>Nicholas Kwan</title>
	<atom:link href="http://nicholaskwan.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nicholaskwan.com</link>
	<description>Technology, Hobbies, Life</description>
	<lastBuildDate>Sat, 10 Apr 2010 17:50:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PhoneGap</title>
		<link>http://nicholaskwan.com/2010/04/08/phonegap/</link>
		<comments>http://nicholaskwan.com/2010/04/08/phonegap/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 05:47:17 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[phonegap]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=610</guid>
		<description><![CDATA[I saw a posting yesterday on my engineering coop website and it was a small company called Nitobi, who made software to make it easier for people to program web apps and mobile apps.  I got so excited I tried adding PhoneGap to my Eclipse right away, their software which aims to make web designers more [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I saw a posting yesterday on my engineering coop website and it was a small company called <a href="http://www.nitobi.com/">Nitobi</a>, who made software to make it easier for people to program web apps and mobile apps.  I got so excited I tried adding PhoneGap to my Eclipse right away, their software which aims to make web designers more comfortable with programming mobile apps.  Having developed several websites and been exposed to various technologies, I went ahead and integrated it.  This article will go over the steps I took to get PhoneGap to compile on my machine.</p>
<p>Like many people who have had exposure to programming for Android, I am using Eclipse with the Android SDK/ADT&#8217;s.  Therefore, I already had the environment setup (for how to do this, visit <a href="http://developer.android.com/sdk/index.html">Android website</a>).  I first tried downloading the EDGE version for PhoneGap and synced it with GIT, but the make file was missing and no matter what I tried, I could not get it to create the necessary files!  Therefore, I decided to go with 0.8.0, where I went to the android directory and just typed make in terminal.  I then followed <a href="http://digitaldandelion.net/blog/getting_started_with_phonegap/">Jeremiah&#8217;s</a> advice and copied some file over to my asset folder using</p>
<p><code>mv lib/android/phonegap-min.js android/assets/www </code></p>
<p>After that, I imported my Eclipse project from phoneGap, changed by Java Project name by clicking on the project then going to Refractor &#8211;&gt; Rename.</p>
<p><a href="http://nicholaskwan.com/wp-content/uploads/2010/04/rename_phonegap.png" rel="lightbox[610]"><img class="alignnone size-medium wp-image-613" title="Renaming PhoneGap" src="http://nicholaskwan.com/wp-content/uploads/2010/04/rename_phonegap-300x240.png" alt="" width="300" height="240" /></a></p>
<p>And then after that I added the Android Source to the project by going to the project&#8217;s properties.  I know, I know, I&#8217;m still on 2.0.1 and should go to 2.1, but I&#8217;ll do that later.</p>
<p><a href="http://nicholaskwan.com/wp-content/uploads/2010/04/properties_phonegap.png" rel="lightbox[610]"><img class="alignnone size-medium wp-image-614" title="Properties PhoneGap" src="http://nicholaskwan.com/wp-content/uploads/2010/04/properties_phonegap-300x240.png" alt="" width="300" height="240" /></a></p>
<p>Alright, almost there, now to make it unique, I&#8217;m going to quickly go into the index.html file and add a little bit extra.</p>
<p><a href="http://nicholaskwan.com/wp-content/uploads/2010/04/signature_phonegap.png" rel="lightbox[610]"><img class="alignnone size-medium wp-image-615" title="signature_phonegap" src="http://nicholaskwan.com/wp-content/uploads/2010/04/signature_phonegap-300x196.png" alt="" width="300" height="196" /></a></p>
<p>And finally, after its built, let&#8217;s run it on the emulator.</p>
<p><a href="http://nicholaskwan.com/wp-content/uploads/2010/04/emun_phonegap.png" rel="lightbox[610]"><img class="alignnone size-medium wp-image-616" title="Emulator Phonegap" src="http://nicholaskwan.com/wp-content/uploads/2010/04/emun_phonegap-300x210.png" alt="" width="300" height="210" /></a></p>
<p>The next step is obviously do go do something useful and new, and I will make another post when I&#8217;ve done just that!</p>
<p>Well, drop me a message if you need help!</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2010/04/08/phonegap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 in a row</title>
		<link>http://nicholaskwan.com/2009/08/01/5-in-a-row/</link>
		<comments>http://nicholaskwan.com/2009/08/01/5-in-a-row/#comments</comments>
		<pubDate>Sat, 01 Aug 2009 21:07:57 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[5 in a row]]></category>
		<category><![CDATA[eece320]]></category>
		<category><![CDATA[gomoku]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=601</guid>
		<description><![CDATA[In my discrete mathematics course, our last project was to write a program that would play the game Gomoku, or more commonly known as 5 in a row; tic-tac-toe style.
The requirements are as follows:
1. Written in Java.
2. A move must be made by the program within 60 seconds.
3. The program has to draw a board [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>In my discrete mathematics course, our last project was to write a program that would play the game Gomoku, or more commonly known as 5 in a row; tic-tac-toe style.<br />
The requirements are as follows:</p>
<p>1. Written in Java.<br />
2. A move must be made by the program within 60 seconds.<br />
3. The program has to draw a board after each turn.<br />
4. The program stops running after it loses or wins and displays the result.</p>
<p>After a long discussion, my group decided to use an algorithm that would calculate the &#8220;beneficial&#8221; and &#8220;danger&#8221; level of each square after every human turn.  It would then choose the appropriate square to place its move.</p>
<p>For more information about our algorithm, read our report <a href="http://nicholaskwan.com/downloads/Gomoku_Report.doc" target="_blank">here</a>.</p>
<p>For our program, download it <a href="http://nicholaskwan.com/downloads/Gomoku.zip" target="_blank">here</a>.  Run the java file in command prompt.</p>
<p>This program cannot be sold or modified without the consent of the programmers; intended for educational purposes only.</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/08/01/5-in-a-row/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to embed a flash Video in Feature Box with Thesis Theme</title>
		<link>http://nicholaskwan.com/2009/07/02/how-to-embed-a-flash-video-in-feature-box-with-thesis-theme/</link>
		<comments>http://nicholaskwan.com/2009/07/02/how-to-embed-a-flash-video-in-feature-box-with-thesis-theme/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 22:43:20 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[feature box]]></category>
		<category><![CDATA[thesis]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=593</guid>
		<description><![CDATA[For all you Thesis fans out there (myself included), I have written a (really) short tutorial on how to include a flash video in your feature box.  First I tried the most logical and easiest method of putting an object in the feature but that didn&#8217;t seem to work.  So, I decided to try the [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>For all you Thesis fans out there (myself included), I have written a (really) short tutorial on how to include a flash video in your feature box.  First I tried the most logical and easiest method of putting an object in the feature but that didn&#8217;t seem to work.  So, I decided to try the next step up which is putting in a separate frame.</p>
<p>So, let&#8217;s get into it and see if this works*</p>
<p>Open you custom_functions.php file,<br />
So we initiate the feature box with the following:</p>
<pre class="brush: php;">
add_action('thesis_hook_feature_box', 'my_thesis_feature_box');
</pre>
<p>And then we incorporate the frame within the feature box:</p>
<pre class="brush: php;">
function my_thesis_feature_box() {
echo '&lt;p&gt;&lt;iframe src=&quot;wp-content/themes/thesis/custom/images/test.swf&quot; width=&quot;100%&quot; height=380 &gt;&lt;/iframe&gt;&lt;/p&gt;';
}
</pre>
<p>Obviously, the src is wherever you have your flash file and width and height are self-explanatory.</p>
<p>And if you want some text above or below the graphics</p>
<pre class="brush: php;">
function my_thesis_feature_box() {
echo '&lt;div&gt;thesis_hook_feature_box&lt;p&gt;Within &lt;code&gt;div#feature_box&lt;/code&gt;; the feature box must be enabled in the Thesis Options for this hook to have any effect.&lt;/p&gt;&lt;/div&gt;
&lt;p&gt;&lt;iframe src=&quot;wp-content/themes/thesis/custom/images/test.swf&quot; width=&quot;100%&quot; height=380 &gt;&lt;/iframe&gt;&lt;/p&gt;';
}
</pre>
<p>Remember to activate the Feature Box in Design Options and pick where you want it!</p>
<p>After some testing, this method seemed to work in IE, Chrome, Safari, and Firefox for Windows.  There seems to be some caching issue with Firefox 3 in Mac.  If your graphic isn&#8217;t showing, clear the cache and reload the page and it should come up.</p>
<p>Leave me a comment if it doesn&#8217;t work!<br />
[edit: I have temporarily taken down my own feature box for editing]</p>
<p>*This article doesn&#8217;t cover the basics (such as hooks, css, and custom files) of the Thesis theme</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/07/02/how-to-embed-a-flash-video-in-feature-box-with-thesis-theme/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Wacom Tablet not working in Photoshop</title>
		<link>http://nicholaskwan.com/2009/06/27/wacom-tablet-not-working-in-photoshop/</link>
		<comments>http://nicholaskwan.com/2009/06/27/wacom-tablet-not-working-in-photoshop/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 00:04:47 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Computer Problems]]></category>
		<category><![CDATA[CS3]]></category>
		<category><![CDATA[CS4]]></category>
		<category><![CDATA[lag]]></category>
		<category><![CDATA[Photoshop]]></category>
		<category><![CDATA[Tablet]]></category>
		<category><![CDATA[Wacom]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=584</guid>
		<description><![CDATA[After I formatted my computer in May, I couldn&#8217;t get my tablet to work in Adobe Photoshop for a while, I tried both Adobe Photoshop CS3 and CS4.  I have a Wacom Intuos3 4&#215;6.  My Logitech mouse would move around just fine but when I moved my pen across the tablet, the cursor [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>After I formatted my computer in May, I couldn&#8217;t get my tablet to work in Adobe Photoshop for a while, I tried both Adobe Photoshop CS3 and CS4.  I have a Wacom Intuos3 4&#215;6.  My Logitech mouse would move around just fine but when I moved my pen across the tablet, the cursor would move move after several seconds.  This was obviously unbearable for Photoshop.  I tried all the solutions I found online but none of them seemed to work, I tried disabling all the graphic intensive plugins and options but it still lagged across the screen.  </p>
<p>If this is happening to you, I might have the solution for you.</p>
<p>The problem was because of an issue with the default preference files.  I had not made any specific preferences and this was already happening.  Go to your start menu &#8211;> Programs &#8211;> Wacom Tablet &#8211;> Tablet Preference File Utility.  Then press Remove All Preferences Files (you have to be admin to do this) and your Photoshop should work fine.  </p>
<p>Leave me a comment if this worked for you!</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/06/27/wacom-tablet-not-working-in-photoshop/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>EECE310 Project at UBC: WarGame</title>
		<link>http://nicholaskwan.com/2009/06/27/eece310-project-at-ubc-wargame/</link>
		<comments>http://nicholaskwan.com/2009/06/27/eece310-project-at-ubc-wargame/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 21:31:13 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[eece310]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[wargame]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=397</guid>
		<description><![CDATA[In my first term of 3rd Year, (Jan &#8211; Apr 2009) I was involved in a group project for EECE310, a course teaching software programming techniques and conventions such as procedural abstractions, exceptions, data abstractions, iteration abstractions, type hierarchies, polymorphic abstractions in Java.  Our professor often stressed that these skills were transferable to other object [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>In my first term of 3rd Year, (Jan &#8211; Apr 2009) I was involved in a group project for EECE310, a course teaching software programming techniques and conventions such as procedural abstractions, exceptions, data abstractions, iteration abstractions, type hierarchies, polymorphic abstractions in Java.  Our professor often stressed that these skills were transferable to other object oriented programming languages.</p>
<p>We chose to create a modified version of the popular Risk Board Game, but the main thing is that we are going to make it free, open-source, and multiplayer.  The version that we submitted was multiplayer and can be launched on the same computer.  Here is a video to showcase how it works and how to run it on your machine (and you get to hear the sound of my voice and remember to watch in HD at the youtube site).</p>
<p><object width="853" height="505"><param name="movie" value="http://www.youtube.com/v/qORkGzciSbM&#038;hl=en&#038;fs=1&#038;color1=0x2b405b&#038;color2=0x6b8ab6&#038;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/qORkGzciSbM&#038;hl=en&#038;fs=1&#038;color1=0x2b405b&#038;color2=0x6b8ab6&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="426" height="252"></embed></object></p>
<p>The three of us are still developing the game and improving it, I will keep you updated!</p>
<p>Files can be found <a href="http://nicholaskwan.com/wp-content/uploads/WarGame.7z">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/06/27/eece310-project-at-ubc-wargame/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compact Tube Hybrid (CTH) Headphone Amplifier</title>
		<link>http://nicholaskwan.com/2009/06/27/compact-tube-hybrid-cth-headphone-amplifier/</link>
		<comments>http://nicholaskwan.com/2009/06/27/compact-tube-hybrid-cth-headphone-amplifier/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 21:13:26 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[Compact Tube Hybrid]]></category>
		<category><![CDATA[CTH]]></category>
		<category><![CDATA[k702]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=380</guid>
		<description><![CDATA[I recently finished my Compact Tube Hybrid (CTH) amp for my K702 and it turned out great.  This project improved my skills troubleshoot a complex circuit on a small board, there were some mistakes while building this amp but for the most part it turned out great.  So, when I placed everything on [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>I recently finished my Compact Tube Hybrid (CTH) amp for my K702 and it turned out great.  This project improved my skills troubleshoot a complex circuit on a small board, there were some mistakes while building this amp but for the most part it turned out great.  So, when I placed everything on the table, I had the following:<br />
<div class='lg_image' style='width:206px;'><div style='text-align:center'><a href='http://nicholaskwan.com/wp-content/lg-gallery/amp/setup.JPG' rel='lightbox[amp/]'><img class='thumb' src='http://nicholaskwan.com/wp-content/plugins/lazyest-gallery/lazyest-img.php?file=amp%2Fsetup.JPG&amp;thumb=1' alt='setup.JPG'  /></a></div><div class='thumb_caption'><a href='http://nicholaskwan.com/wp-content/lg-gallery/amp/setup.JPG' rel='lightbox[amp/]'>Parts and Board</a></div></div></p>
<p>And a close up of the board.<br />
<div class='lg_image' style='width:206px;'><div style='text-align:center'><a href='http://nicholaskwan.com/wp-content/lg-gallery/amp/board.JPG' rel='lightbox[amp/]'><img class='thumb' src='http://nicholaskwan.com/wp-content/plugins/lazyest-gallery/lazyest-img.php?file=amp%2Fboard.JPG&amp;thumb=1' alt='board.JPG'  /></a></div><div class='thumb_caption'><a href='http://nicholaskwan.com/wp-content/lg-gallery/amp/board.JPG' rel='lightbox[amp/]'>The Unpopulated Board</a></div></div></p>
<p>The <a href="http://cavalliaudio.com/cth/main.php?page=overview">webpage</a> for the amp covers the building and testing process very carefully, but on top of what was on the website, I found a few things to look out for.  Reading the resistors that came with the kit was a little challenging at first because it wasn&#8217;t the conventional color bands, the most important thing to realize is that the first three numbers of the resistor is the value and the forth digit is how many zeros are behind the value.  Ie 1003 is 100 x 10^3 which is 100,000.  You have to be especially careful with resistors with less than 100 because you have the R in the value.  For example, 22R1F is 22.1 Ohms, not 220&#8230; that was one of the things that messed me up and it&#8217;s hard to unsolder components on this tight board.</p>
<p>Check all the components before you solder, Bill left out my 1k resistor but being in EECE, I had tons of 1k resistors in my kit; you might not be so lucky.</p>
<p>Follow the build order listed on Alex&#8217;s website, as in solder each component in the order he specified.  If you solder a couple of capacitors and then some heat sticks in random order you will most likely get to a component that will be extremely difficult to solder.</p>
<p>Double check each resistor in tombstone placement to make sure that they are in the right place.  Because you have so few resistors left when you do the tombstone placements, you might get too jumpy and that&#8217;s how I switched by R8 and R9 and got the LED to go from Green to Green instead of Red to Green (ie. e12 not working).  </p>
<div class='lg_image' style='width:206px;'><div style='text-align:center'><a href='http://nicholaskwan.com/wp-content/lg-gallery/amp/parts.JPG' rel='lightbox[amp/]'><img class='thumb' src='http://nicholaskwan.com/wp-content/plugins/lazyest-gallery/lazyest-img.php?file=amp%2Fparts.JPG&amp;thumb=1' alt='parts.JPG'  /></a></div><div class='thumb_caption'><a href='http://nicholaskwan.com/wp-content/lg-gallery/amp/parts.JPG' rel='lightbox[amp/]'>About Halfway Done</a></div></div>
<p>The number of capacitors did create doubts if I soldered things in the right place, but I hope my picture will help you out and remember to use your WIMA caps if you purchased them (edit: I think they come standard now)!  Often times, if the components fits the white outline, it most likely is in the right place.<br />
<div class='lg_image' style='width:206px;'><div style='text-align:center'><a href='http://nicholaskwan.com/wp-content/lg-gallery/amp/done.JPG' rel='lightbox[amp/]'><img class='thumb' src='http://nicholaskwan.com/wp-content/plugins/lazyest-gallery/lazyest-img.php?file=amp%2Fdone.JPG&amp;thumb=1' alt='done.JPG'  /></a></div><div class='thumb_caption'><a href='http://nicholaskwan.com/wp-content/lg-gallery/amp/done.JPG' rel='lightbox[amp/]'>Complete!</a></div></div></p>
<p>I will clean up the wires in the near future and put the top casing on, will upload more pictures when I finish that.</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/06/27/compact-tube-hybrid-cth-headphone-amplifier/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Common Multiple Import Plugin errors</title>
		<link>http://nicholaskwan.com/2009/06/27/common-multiple-import-plugin-errors/</link>
		<comments>http://nicholaskwan.com/2009/06/27/common-multiple-import-plugin-errors/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 20:57:02 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[multiple import]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=393</guid>
		<description><![CDATA[
Multiple Import is a plugin written by Michael Ha, who is a colleague of mine.  This plugin allows the admin to import multiple blogs from the same server to one specific blog.  Because this plugin can import all the blogs linked to the server, it is important to limit the permission to use this plugin [...]]]></description>
			<content:encoded><![CDATA[<p></p><div style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: #ffffff; font: normal normal normal 13px/19px Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; background-position: initial initial; padding: 0.6em; margin: 0px;">
<p>Multiple Import is a plugin written by Michael Ha, who is a colleague of mine.  This plugin allows the admin to import multiple blogs from the same server to one specific blog.  Because this plugin can import all the blogs linked to the server, it is important to limit the permission to use this plugin to specific blogs.</p>
<p>The plugin does the following:</p>
<ol>
<li>Takes the file that you uploaded.</li>
<li>Reads through all the url&#8217;s in the file and compares to all the url&#8217;s in the server.</li>
<li>Requests confirmation on the blogs it is about to upload.</li>
<li>Goes through each option and import only the posts/pages with specific tags.</li>
<li>Uploads all the files attached as well if selected.</li>
</ol>
<p>There were many problems with privacy issues while uploading the file, because of the nature of this problem, it is difficult to pin down one solution, most solutions can be found easily online.</p>
<p>After the file can be uploaded, there might be errors about cookie sessions such as:</p>
<p><strong style="font-weight: bold;">Warning</strong>: session_start() [<a href="../../aggregate2009/wp-admin/function.session-start">function.session-start</a>]: Cannot send session cache limiter &#8211; headers already sent (output started at /home/portfolio/wordpress/wp-admin/admin-header.php:103) in <strong style="font-weight: bold;">/home/portfolio/wordpress/wp-content/plugins/multipleimport/multipleimportform.php</strong> on line <strong style="font-weight: bold;">66</strong></p>
<p>Many solutions online suggest to take out the white spaces and white lines in the files it complains about and the wp-admin.php file.  However, this didn&#8217;t solve the problem because the problem resides in the cookie session not starting soon enough.  (However, the white spaces and white lines have to be taken care of also if there exist any in specified files, refer to online resources for more details).  The session has to start before any of the objects are displayed on the webpage; therefore, the line &#8220;session_start();&#8221; has to be placed right after &lt;?php on line 2 in the file &#8216;wordpress/wp-admin/includes/template.php&#8217; .  This will start a cookie session before any of the objects are displayed and will solve the &#8220;headers already sent&#8221; problems.</p>
<p>I am not sure if there are side effects in keeping the &#8220;session_start();&#8221; in the template.php but I have not had any problems related to it.  I assume there will be a lot of cookie&#8217;s added to the visitor&#8217;s browsers but no lethal side effects.</p>
<p>There are still warnings when importing the blog and it seems to happen only with new blogs:</p>
<p><strong style="font-weight: bold;">Warning:</strong> Invalid argument supplied for foreach() in <strong style="font-weight: bold;">/home/portfolio/wordpress/wp-content/plugins/multipleimport/beginimport.php </strong>on line <strong style="font-weight: bold;">58</strong><br />
Checking page <em style="font-style: italic;">About</em></p>
<p>This warning seem to only affect empty blogs or blogs that have no new content in them, I am still currently trying to troubleshoot this problem.</p>
<p>I know Michael didn&#8217;t leave any methods to reach him or contact him on the official Wordpress site, but if you leave me a comment here, I can try my best to help you out.</p>
<p>This article was written for the Faculty of Education at the University of British Columbia and cannot be copied, modified, or published without the consent of the University.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/06/27/common-multiple-import-plugin-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modifying mxc-ldap plugin to create a new blog for new user</title>
		<link>http://nicholaskwan.com/2009/06/27/modifying-mxc-ldap-plugin-to-create-a-new-blog-for-new-user/</link>
		<comments>http://nicholaskwan.com/2009/06/27/modifying-mxc-ldap-plugin-to-create-a-new-blog-for-new-user/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 20:48:10 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[mxc]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=389</guid>
		<description><![CDATA[The mxc-ldap plugin has a simplified layout because it does not have any graphic interface to input the LDAP server information.  To enter the information, open the mxc-ldap.php file andfill in LDAP_HOST, LDAP_PORT (389), LDAP_VERSION, BASE_DN, ADMIN_DN, ADMIN_PW.  The plugin seems to work without the ADMIN_DN and the ADMIN_PW.  The plugin as default will create [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>The mxc-ldap plugin has a simplified layout because it does not have any graphic interface to input the LDAP server information.  To enter the information, open the mxc-ldap.php file andfill in LDAP_HOST, LDAP_PORT (389), LDAP_VERSION, BASE_DN, ADMIN_DN, ADMIN_PW.  The plugin seems to work without the ADMIN_DN and the ADMIN_PW.  The plugin as default will create a Wordpress user upon signing in with their LDAP id&#8217;s.</p>
<p>To create a blog for the ldap user that signs in for the first time, we have to add several lines after creating the user (line 60).</p>
<p><span style="font-family: 'Courier New'; line-height: 18px; font-size: 12px; white-space: pre;"> </span></p>
<pre class="brush: php;">
$userID = wp_insert_user($userData);  //gets the userID from the userData that was just inserted and puts it into $userID
$user = get_userdatabylogin($username);		//gets the username
$sitename = 'vfolio.educ.ubc.ca';	//the site where the blog is held, 'efolio.educ.ubc.ca' for production server
$blogdir = &quot;/&quot;.$ldapuser[0][LOGIN][0]; //  the directory of where the blog will be; the url that comes after the sitename
$blogtitle = $ldapuser[0][LOGIN][0];	// title of the blog (can be changed)
$meta = &quot;&quot;;
wpmu_create_blog($sitename,$blogdir,$blogtitle,$userID,$meta,'1');  //creates the blog with above information&lt;/code&gt;
</pre>
<p>The plugin webpage doesn&#8217;t exist anymore and the author webpage is in French, so help for this plugin is very limited.  Feel free to leave me comments if you get stuck with this plugin and I will try to help you best to my ability.  However, make sure you read Clifton&#8217;s <a href="http://clifgriffin.com/2009/05/13/simple-ldap-login-13-for-wordpress/">post</a> on his plugin first, which is what the mxc-ldap plugin is based on (but you already know that).</p>
<p>This article was written for the Faculty of Education at the University of British Columbia and cannot be copied, modified, or published without the consent of the University.</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/06/27/modifying-mxc-ldap-plugin-to-create-a-new-blog-for-new-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modifying Mike Smullin&#8217;s List Author plugin to work with Wordpress 2.7 and 2.8</title>
		<link>http://nicholaskwan.com/2009/06/27/modifying-mike-smullins-list-author-plugin-to-work-with-wordpress-2-7-and-2-8/</link>
		<comments>http://nicholaskwan.com/2009/06/27/modifying-mike-smullins-list-author-plugin-to-work-with-wordpress-2-7-and-2-8/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 20:35:24 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[Web Application Development]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[List Authors]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=386</guid>
		<description><![CDATA[The list authors plugin by Mike Smullin listed the authors of all the posts in the blog in the sidebar; when the user presses on the name, all the posts by the user will be filters.  however, this plugin only worked up until 2.6.3.  At 2.7.1, the plugin simply didn&#8217;t show up on the Dashboard.
The [...]]]></description>
			<content:encoded><![CDATA[<p></p><p style="text-align: left;">The list authors plugin by Mike Smullin listed the authors of all the posts in the blog in the sidebar; when the user presses on the name, all the posts by the user will be filters.  however, this plugin only worked up until 2.6.3.  At 2.7.1, the plugin simply didn&#8217;t show up on the Dashboard.</p>
<p style="text-align: left;">The list authors plugin by Matthew Toso worked in 2.7+ but the plugin didn&#8217;t list all the authors of the posts in the blog, only the ones that were linked to the blog, whether a subscriber, editor, etc.</p>
<p style="text-align: left;">The code that was changed in Matthew&#8217;s plugin was in the section where the author was pulled from the database and blog, while Mike pulled from both, Matthew only cared about the ones that were linked to the blog, so the fix was to replace Matthew&#8217;s Code with Mike&#8217;s code that were between the author tags:</p>
<p style="text-align: left;">Remove:</p>
<p><code>
<pre class="brush: php;">
&lt;!-- Authors --&gt;
&lt;ul&gt;
&lt;?php wp_list_authors('optioncount='.$options['Option Count'].'&amp;exclude_admin='.$options['Exclude Administrator'].'&amp;show_fullname='.$options['Show Full Name'].'&amp;hide_empty='.$options['Hide Empty'].$feed_image); ?&gt;
&lt;/ul&gt;
&lt;!-- /Authors --&gt;
&lt;span style=&quot;font-family: Georgia;&quot;&gt;</pre>
<p></span></code></p>
<p style="text-align: left;">And replace with:<br />
<span style="font-family: -webkit-monospace;"> </span></p>
<p style="text-align: left;">
<p style="text-align: left;"><span style="font-family: -webkit-monospace;">
<pre class="brush: php;">
&lt;!-- Authors --&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: left;&quot;&gt;&lt;code&gt;&lt;ul&gt;
&lt;?php
require_once(ABSPATH.'wp-load.php');
global $wpdb;
global $blog_id;
$authors = $wpdb-&gt;get_col(&quot;SELECT DISTINCT post_author FROM wp_&quot;.$blog_id.&quot;_posts&quot;);
foreach( $authors as &amp;$author) {
$author_names = $wpdb-&gt;get_row(&quot;SELECT ID, display_name, user_nicename FROM wp_users WHERE ID=&quot;.$author);
echo '&lt;li&gt;&lt;a href=&quot;'.get_bloginfo('url').'/author/'.$author_names-&gt;user_nicename.'&quot;&gt;'.$author_names-&gt;display_name.'&lt;/a&gt;&lt;/li&gt;';
}
unset($author);
wp_list_authors('optioncount='.$options['Option Count'].'&amp;exclude_admin='.$options['Exclude Administrator'].'&amp;show_fullname='.$options['Show Full Name'].'&amp;hide_empty='.$options['Hide Empty']); ?&gt;
&lt;/ul&gt;
&lt;!-- /Authors --&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p style=&quot;text-align: left;&quot;&gt;</pre>
</p>
<p style="text-align: left;">
<p style="text-align: left;">This article was written for the Faculty of Education at the University of British Columbia and cannot be copied, modified, or published without the consent of the University.</p>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/06/27/modifying-mike-smullins-list-author-plugin-to-work-with-wordpress-2-7-and-2-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Electromagnetic Rover</title>
		<link>http://nicholaskwan.com/2009/06/08/electromagnetic-rover/</link>
		<comments>http://nicholaskwan.com/2009/06/08/electromagnetic-rover/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 05:59:11 +0000</pubDate>
		<dc:creator>Nicholas</dc:creator>
				<category><![CDATA[hardware]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[281]]></category>
		<category><![CDATA[eece]]></category>
		<category><![CDATA[electromagnetic]]></category>
		<category><![CDATA[rover]]></category>

		<guid isPermaLink="false">http://nicholaskwan.com/?p=378</guid>
		<description><![CDATA[In second year, two friends and I created a rover for a project.  We designed a rover that will follow a wire with a certain signal going through it.  Our rover is programmed by an 8052 microcontroller and runs on two motors; one for turning and one for running.  The inductors at [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>In second year, two friends and I created a rover for a project.  We designed a rover that will follow a wire with a certain signal going through it.  Our rover is programmed by an 8052 microcontroller and runs on two motors; one for turning and one for running.  The inductors at the front of the rover will detect the location of the wire and after running the signal through a LC circuit, an op amp, a half wave rectifier, a microcontroller, a optical isolator, a series of MOSFETS, part of which create an H bridge, the rover will follow the signal accordingly.  The LC circuit first creates a wave that gets amplified in the op amp.  Then the wave is put through a half wave rectifier that feeds an analog signal into the microcontroller.  Then the ADC converted gives off a pulse width modulation into the optical isolator.  The run motor is stopped and started by using an on or off from the microcontroller through a MOSFET.  The turn motor is turned accordingly through an H bridge which allows the motor to run both ways.   The future prospects include automated cars that will follow a certain path in the ground without physically being attached to an object.  Since the rover will go if there is a signal and stop when there isn’t, this will be a good control on the movement of vehicles.  The electromagnetic rover can also be used in a household environment used as courier bot.   </p>
]]></content:encoded>
			<wfw:commentRss>http://nicholaskwan.com/2009/06/08/electromagnetic-rover/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
