<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>Brock Angelo &#187; Code</title>
	<atom:link href="http://brockangelo.com/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://brockangelo.com</link>
	<description>@gmail.com</description>
	<lastBuildDate>Fri, 22 Jul 2011 14:00:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to Install your Android APK with One Click</title>
		<link>http://brockangelo.com/2011/06/28/how-to-install-your-android-apk-with-one-click/</link>
		<comments>http://brockangelo.com/2011/06/28/how-to-install-your-android-apk-with-one-click/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 01:51:11 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1405</guid>
		<description><![CDATA[How to install Android APK files to your Android device in one click.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been learning <a href="http://www.anscamobile.com/">Corona</a> lately, a tool for building mobile apps. Overall there is a lot of good stuff, though rough around some of the edges especially if you are building &#8220;business apps&#8221; &#8211; you know, anything that isn&#8217;t a game. <img src='http://brockangelo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  But one thing that I really miss from building Android in Eclipse is the auto-install to my Android phone. Here is a way to get 1-click install to your Android device, in Windows.</p>
<ol>
<li>You&#8217;ll need to have the Android SDK installed on your PC. More about that <a href="http://developer.android.com/sdk/installing.html">here</a>.</li>
<li>You&#8217;ll need to have your Android device plugged in.</li>
<li>You&#8217;ll also need to install a freeware app called <a href="http://www.lopesoft.com/en/fmtools/info.html">FileMenuTools</a> &#8211; a fabulous tool that I&#8217;ve used for years.</li>
<li>Open FileMenuTools and in the top left, click &#8220;Add Command&#8221;.</li>
<li>In the Properties pane on the lower left, select &#8220;<strong>Run Program</strong>&#8221; for your action, for Menu Text I chose &#8220;<strong>Install on Android</strong>&#8220;, for icon browse to the <strong>SDK Manager.exe</strong> because it is an easy Android icon, for Element Types I chose &#8220;<strong>Only Files</strong>&#8220;, for Folders I chose &#8220;<strong>No</strong>&#8220;, for Files I chose <strong>Yes</strong>, and for Extensions I typed <strong>apk</strong>, then for Program you need to browse and find <strong>adb.exe</strong> in your SDK\program-tools\ directory, and for arguments enter <strong>install %FILENAMES%</strong>.</li>
</ol>
<p>Now, if you right click on an APK file that the Corona SDK provides after a build, this should briefly pop up a command window while it copies and installs it to your device.</p>
<p>It will bypass the Install prompts and should show up directly in your Applications folder.</p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2011/06/28/how-to-install-your-android-apk-with-one-click/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Android Lessons Learned</title>
		<link>http://brockangelo.com/2011/06/16/android-lessons-learned/</link>
		<comments>http://brockangelo.com/2011/06/16/android-lessons-learned/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 00:28:09 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[lessons]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1400</guid>
		<description><![CDATA[A Google Doc I keep updating called "Things That Fixed Major Errors in Android"]]></description>
			<content:encoded><![CDATA[<blockquote><p>In the development justice system, the people are represented by two separate yet equally important groups: the staffers who write Android code and the developers who convert this code into apps. These are their stories.</p></blockquote>
<p>Here is a link to a Google Doc I&#8217;m keeping called &#8220;<a href="https://docs.google.com/document/pub?id=1pge4qQlh1P-AKQ_JIzaL24B6iET7Kg1SIinbrFGeEFE">Things That Fixed Major Errors in Android</a>&#8220;. Its my attempt to stay organized and not make the same mistake twice. </p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2011/06/16/android-lessons-learned/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Best Use for iPhone Folders &#8211; EVER!</title>
		<link>http://brockangelo.com/2010/09/27/the-best-use-for-iphone-folders-ever/</link>
		<comments>http://brockangelo.com/2010/09/27/the-best-use-for-iphone-folders-ever/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 00:42:18 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[folders]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ios 4.1]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[ipod touch]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1363</guid>
		<description><![CDATA[Here is a killer tip that I ignored for a long time - and now I'm kicking myself for it!]]></description>
			<content:encoded><![CDATA[<p>I know that title is a bit over the top, but I have to say that since I&#8217;ve started using a folder this way, I have found that the universe is so much more peaceful. All things flow happily in harmony. <img src='http://brockangelo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  What&#8217;s this killer tip? Its very simple: <strong>Stick a folder on the dock!</strong></p>
<p>WAIT! You&#8217;re probably thinking, &#8220;pfff! I have no use for a folder on the dock!&#8221; </p>
<p>Try this method first before you throw it out &#8211; I call the folder &#8220;Swiss Army&#8221; (aka. Swiss Army Knife). Throw in the folder all those handy little utilities that you hunt and peck for &#8211; most people leave them on the home screen. But this way, they are tucked neatly out of the way, but are always accessible anywhere on the device. See the screen shots for samples, and give it a try!</p>
<p><center><br />
<img src="http://media.brockangelo.com.s3.amazonaws.com/swiss_dock.png" class="s3-img" border="0" alt="swiss_dock.png" width="300px" /><br />
<br />
<img src="http://media.brockangelo.com.s3.amazonaws.com/swiss_contents.png" class="s3-img" border="0" alt="swiss_contents.png" width="300px" /><br />
</center></p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2010/09/27/the-best-use-for-iphone-folders-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>April Fool&#8217;s Batch File</title>
		<link>http://brockangelo.com/2010/02/03/april-fools-batch-file/</link>
		<comments>http://brockangelo.com/2010/02/03/april-fools-batch-file/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 16:25:18 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Batch]]></category>
		<category><![CDATA[april fools day]]></category>
		<category><![CDATA[batch files]]></category>
		<category><![CDATA[fake format]]></category>
		<category><![CDATA[format hard drive]]></category>
		<category><![CDATA[gags]]></category>
		<category><![CDATA[jokes]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1328</guid>
		<description><![CDATA[The ultimate April Fool's Day joke for any geek: a tool that appears to format the hard drive.]]></description>
			<content:encoded><![CDATA[<p>It is early February, which means time to start planning for April Fool&#8217;s Day. Here is one I&#8217;ve had up my sleeve for some time. A simple batch file that gives the appearance of formatting the Windows hard drive. Rough enough to make even a seasoned administrator do a double take.</p>
<p>Here is the breakdown of what it does.</p>
<ol>
<li>Show a pleasant, matter of fact message: Windows will now format your hard drive</li>
<li>Wait for three seconds</li>
<li>Enlarge the DOS window</li>
<li>Display the contents of the entire drive.</li>
</ol>
<p>It simply lists the name of every file on the entire hard drive, but it happens so fast and moves so quickly that it is sure to get a couple of knee jerks here and there.</p>
<p>If you want to be really devious, place this on someone&#8217;s hard drive, then create a shortcut to the batch file and change the default icon to something that isn&#8217;t as obvious as the batch icon. To be reeeeally devious, rename the shortcut to something like &#8220;Internet Explorer&#8221;. <img src='http://brockangelo.com/wp-includes/images/smilies/icon_surprised.gif' alt=':-o' class='wp-smiley' /> </p>
<p>Here is the batch file in plain text. To use this, copy the text below and save it to your computer as &#8220;format.bat&#8221;.</p>
<pre class="brush: plain; title: ; notranslate">@echo off
REM Fake Format - A perfect April Fool's Day gift
REM Rename to your liking (something like &quot;Free.bat&quot; is suitably devious)
REM Then make sure you are there to watch their response
REM http://brockangelo.com/2010/02/03/april-fools-batch-file/

@echo off
echo.
echo.
echo.
echo            Windows will now format your hard drive
echo.
echo.
echo.
echo.
ping -n 3 127.0.0.1 &gt; nul
cd c:\
mode con: cols=140 lines=60
dir /w /s
</pre>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2010/02/03/april-fools-batch-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirect Users Back to Page They Were On</title>
		<link>http://brockangelo.com/2009/12/17/redirect-users-back-to-page-they-were-on/</link>
		<comments>http://brockangelo.com/2009/12/17/redirect-users-back-to-page-they-were-on/#comments</comments>
		<pubDate>Thu, 17 Dec 2009 14:09:59 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[back]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[intranet]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1312</guid>
		<description><![CDATA[How to redirect users back to the page they were on when they clicked "login".]]></description>
			<content:encoded><![CDATA[<p>I am a fan of most things WordPress, but one thing I am not a fan of is the way that everyone gets sent to the Dashboard whenever they log in. Not everyone who logs into your site will write posts or administer the site. And for an intranet, this is a drag.</p>
<p>What I&#8217;ve always wanted was a way to reload the current page after I have logged in. So if I&#8217;m on the &#8220;Search&#8221; page, I just want to go to the login page, then go back to the page I was on when I clicked the &#8220;Login&#8221; link. Finally &#8211; a solution!</p>
<p>Thanks to <a href="http://davidchambersdesign.com/wordpress-login-redirect/">David Chambers</a> &#8211; it is as easy as changing the url that the &#8220;login&#8221; link points to. </p>
<pre class="brush: php; title: ; notranslate">&lt;a href=&quot;&lt;?php echo get_option('siteurl'); ?&gt;/wp-login.php?redirect_to=&lt;?php echo urlencode($_SERVER['REQUEST_URI']); ?&gt;&quot;&gt;log in&lt;/a&gt;</pre>
<p>He calls it WordPress Login Redirect. I would imagine that this would be a handy plugin for a lot of people. On an intranet, you may want to provide a link to the dashboard if they are an admin, or a link to logout if they are not. I have been using a very simple conditional statement that determines what to put in place of the login link after you are logged in.</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
	global $current_user;
	get_currentuserinfo();

	if (!(is_user_logged_in())) { ?&gt;
		&lt;a href=&quot;&lt;?php echo get_option('siteurl'); ?&gt;/wp-login.php?redirect_to=&lt;?php echo urlencode($_SERVER['REQUEST_URI']); ?&gt;&quot;&gt;Log in&lt;/a&gt;
	&lt;?php } elseif
		(
		(($current_user-&gt;user_login) == &quot;brock&quot;) 	||
		(($current_user-&gt;user_login) == &quot;admin&quot;)
		)
		{
			echo &quot;&lt;a href=\&quot;&quot;;
			echo get_option('siteurl');
			echo &quot;/wp-admin/\&quot;&gt;Dashboard&lt;/a&gt;&quot;;
			} else { ?&gt;
			&lt;a href=&quot;&lt;?php echo wp_logout_url( get_permalink() ); ?&gt;&quot; title=&quot;Logout&quot;&gt;Logout&lt;/a&gt;
			&lt;?php
		}
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/12/17/redirect-users-back-to-page-they-were-on/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to Start a Virtual Machine at Startup Using VirtualBox</title>
		<link>http://brockangelo.com/2009/12/15/how-to-start-a-virtual-machine-at-startup-using-virtualbox/</link>
		<comments>http://brockangelo.com/2009/12/15/how-to-start-a-virtual-machine-at-startup-using-virtualbox/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 22:25:22 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Batch]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[startup]]></category>
		<category><![CDATA[tweakui]]></category>
		<category><![CDATA[virtualbox]]></category>
		<category><![CDATA[vm]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1309</guid>
		<description><![CDATA[How to start a Virtual Machine at startup, (aka: start at VM at boot) if you are using VirtualBox.]]></description>
			<content:encoded><![CDATA[<p>This did not seem obvious to me, so I hope it is valuable to someone else. If you are using VirtualBox to host your newly created Virtual Servers, one of the questions you will find yourself asking is: &#8220;What if my machine reboots?&#8221; VirtualBox does not (yet) have a built in way to indicate that you want to start a VM when your Host machine boots, so you need to add this to your startup.</p>
<p>If you are on Windows, create a batch file with the following content:</p>
<p><code lang="batch"><br />
@echo off<br />
cls<br />
"C:\Program Files\Sun\VirtualBox\VBoxManage.exe" startvm vm-name<br />
@exit<br />
</code></p>
<p>You should replace &#8220;vm-name&#8221; with the name of the Virtual Machine you want to start. If you are on XP, make sure you are using TweakUI to auto-login to XP.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/12/15/how-to-start-a-virtual-machine-at-startup-using-virtualbox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Run a Batch File Invisibly</title>
		<link>http://brockangelo.com/2009/07/14/run-a-batch-file-invisibly/</link>
		<comments>http://brockangelo.com/2009/07/14/run-a-batch-file-invisibly/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 13:55:40 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Batch]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[invisible]]></category>
		<category><![CDATA[visual basic]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1279</guid>
		<description><![CDATA[Run a Batch File invisibly. Users won't know a thing.]]></description>
			<content:encoded><![CDATA[<p>Running a batch file invisibly can come in handy, especially if you manage computers for other users. It allows you to perform a task without the user knowing anything about it.</p>
<p>Its very simple. Instead of telling the batch file to run, you tell a Visual Basic script to launch the batch file; and Visual Basic has the ability to launch things invisibly.</p>
<blockquote><p>Follow this demo and you’ll be up and running in just a few seconds</p>
<p>You’ll create two files: the vbs script and a sample batch file</p>
<p>&#160;</p>
</blockquote>
<p>Open Notepad, and paste this content, then save the file as <strong>invisible.vbs </strong>to the Desktop</p>
<blockquote><p>Set WshShell = CreateObject(&quot;WScript.Shell&quot;)     <br />WshShell.Run chr(34) &amp; &quot;C:\Documents and Settings\%username%\Desktop\1.bat&quot; &amp; Chr(34), 0      <br />Set WshShell = Nothing</p>
</blockquote>
<p><a href="http://media.brockangelo.com/all_files_txt.jpg" alt="click to enlarge"><img style="display: block; float: none; margin-left: auto; margin-right: auto" height="284" src="http://media.brockangelo.com/all_files_txt.jpg" width="413" /></a></p>
<p>&#160;</p>
<p>Open Notepad again, and paste this content, then save the file as <strong>1.bat </strong>to the Desktop:</p>
<blockquote><p>echo hello &gt; &quot;C:\Documents and Settings\%username%\Desktop\1.txt&quot;</p>
</blockquote>
<p>&#160;</p>
<p>Now double click on <strong>invisible.vbs</strong>. You should see a <strong>1.txt</strong> file get magically (<em>invisibly</em>) created on the Desktop.</p>
<p>That’s it! Modify to your liking!</p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/07/14/run-a-batch-file-invisibly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatically Upload Photos to Flickr</title>
		<link>http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/</link>
		<comments>http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 02:06:07 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Batch]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[automatically upload to flickr]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[Digital Photography]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[lifehacker]]></category>
		<category><![CDATA[photos]]></category>
		<category><![CDATA[uploadr]]></category>
		<category><![CDATA[xmltramp]]></category>
		<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=1158</guid>
		<description><![CDATA[Automatically upload photos &#038; videos to Flickr - you plug in your camera, and in just 10 seconds you are walking away with your camera in hand.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s how this will work: you&#8217;ll plug in your card reader or digital camera and all your photos &#038; videos are automatically copied to the folders of your choice in about 3 to 5 seconds. Once the photos are copied to the PC, they are automatically removed from the card (this is optional, but recommended). After they have been deleted from the card, they are automatically uploaded to your <a href="http://flickr.com/photos/brockangelo">Flickr</a> account (as private, public, tagged, not tagged, whatever). All in the background without you having to do a thing.</p>
<p>I set this up because my photography workflow had turned into something horrid: I have two digital cameras that we use. One of the two has video, but I don&#8217;t use Flickr for my videos, I use <a href="http://motionbox.com" target="_blank">Motionbox</a>. So to get photos or videos off the cameras involved the following:</p>
<ol>
<li>Plug in each card</li>
<li>Copy the pics from the card to the PC, name the folders, etc</li>
<li>Copy the videos to the My Videos folder</li>
<li>Delete the photos &#038; videos from the card</li>
<li>Use the Flickr Uploadr and hope it successfully uploads all the pics</li>
<li>Upload videos to <a href="http://motionbox.com" target="_blank">Motionbox</a>.</li>
<li>Come back later and delete the photos &#038; videos off the PC after they got uploaded</li>
</ol>
<p>I decided to put a little thought into it and get a better setup. I now do the following:</p>
<ol>
<li>Insert flash card into card reader right after taking pictures &#8211; <strong>pictures &#038; videos download automatically in less than 10 seconds</strong> &#8211; card automatically formats (<i>optional, but recommended</i>)</li>
<li>(<i>photos are now uploading to Flickr in the background &#8211; so I leave <img src='http://brockangelo.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </i>)</li>
</ol>
<p>I&#8217;ve completely eliminated my involvement with the computer. I simply plug in the card reader (or camera) and the computer takes care of the entire process of copying the photos over to the computer, then deleting them from the card. It then automatically uploads the photos to Flickr as private. All in the background without any of my involvement. </p>
<blockquote><p>You can modify the batch file to upload all photos and videos to Flickr.</p></blockquote>
<p>There are several steps you&#8217;ll need to take in order for the process to be completely automatic. Here is an outline of what all is involved. Start to finish the process takes about 15 minutes.</p>
<ol>
<li>Give Digital Cameras persistent drive letters (E:, F:, G:)</li>
<li>Download Python</li>
<li>Download the &#8220;Uploadr&#8221; python scripts</li>
<li>Download the batch file for your camera</li>
<li>Install TweakUI and add Batch file to the AutoPlay menus</li>
<li>Configure AutoPlay for your digital camera</li>
<li>Test it out</li>
</ol>
<h2>First Step</h2>
<h3>Give Memory Cards and Digital Cameras persistent drive letters (E:, F:, G:)</h3>
<p>In order for you to be able to reliably copy images from a particular card or device, you should set it up so that every time you plug in the device it uses the same drive letter. With your memory card or device plugged in, right click <strong>My Computer</strong> and select <strong>Manage</strong>: </p>
<blockquote><p> <center><img src="http://media.brockangelo.com/wp-content/uploads/2009/07/my_computer_manage.jpg" alt="my_computer_manage" title="my_computer_manage" width="203" height="132" class="aligncenter size-full wp-image-1162" /></center></p></blockquote>
<p>Select <strong>Storage &#8658; Disk Management</strong> (<a href="http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/disk_management/" rel="attachment wp-att-1163">see picture</a>)</p>
<p>In the right panel, your devices will be listed, probably with letters like E, F or G. Do not change the drive letter of the C: drive, and you probably shouldn&#8217;t change a D: drive if you have one either. Right click on the flash drive that you need to change and select <strong>Change Drive Letter and Paths</strong>: (<a href="http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/change_drive_letter/" rel="attachment wp-att-1164">see picture</a>)</p>
<p>The next box shows you the letter that is already assigned. Just click <strong>Change</strong>:<br />
<img src="http://media.brockangelo.com/wp-content/uploads/2009/07/change_drive_letter_box-300x194.jpg" alt="change_drive_letter_box" title="change_drive_letter_box" width="300" height="194" class="aligncenter size-medium wp-image-1165" /></p>
<p>This box will ask you what letter you want to assign to it. I start from the bottom, in this case, Z: (<a href="http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/select_drive_letter/" rel="attachment wp-att-1166">see picture</a>)</p>
<p>It will ask you to confirm this. Click <strong>Yes</strong>. (<a href="http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/are_you_sure/" rel="attachment wp-att-1167">see picture</a>)</p>
<p>Repeat this for each card or camera that you would like to setup for this.</p>
<p>Now if you go to My Computer, your drive letters should be updated to the new letters.</p>
<h2>Next Step</h2>
<h3>Download Python</h3>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/07/08/automatically-upload-photos-to-flickr/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Replace Text on Click Using JavaScript</title>
		<link>http://brockangelo.com/2009/06/19/replace-text-on-click-using-javascript/</link>
		<comments>http://brockangelo.com/2009/06/19/replace-text-on-click-using-javascript/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 18:12:19 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=955</guid>
		<description><![CDATA[Did you know that you can replace text using Javascript? I wrote this script for our company intranet. In our staff phone directory I show the internal 5-digit phone number by default. Clicking the number reveals a 7-digit external phone number. Try the demo.]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript" src="/wp-content/themes/downtown-java-3column.js"></script><br />
<script type="text/javascript">
function toggle_text(shown, hidden) {
       var e = document.getElementById(shown);
       var f = document.getElementById(hidden);
    if(e.style.display == 'inline') {
			e.style.display = 'none';
			f.style.display = 'inline';
	}
	else {
			e.style.display = 'inline';
			f.style.display = 'none';
	}
}
</script><br />
This tutorial will show you how to replace text with text by using JavaScript. The text that you click will be replaced with new text. Specifically, we will use JavaScript to hide one div and show another in it&#8217;s place. Here is a demo:</p>
<blockquote><p><center><br />
<h2>
<div id="shown_first" style="display:inline"><a style="cursor:pointer" onclick="toggle_text('shown_first', 'hidden_first')">Click me	</a></div>
<div id="hidden_first" style="display:none"><a style="cursor:pointer" onclick="toggle_text('shown_first', 'hidden_first')">I used to be hidden!</a></div>
</h2>
<p></center></p></blockquote>
<p>JavaScript does the magic behind the scenes. The way you accomplish this is by putting your two text fields into divs. I&#8217;ll set the first one to be visible, then when you click on it, I will hide the first and show the second in its place. I use the <code>style.display</code> feature of JavaScript to change whether or not it is visible or shown. Let&#8217;s take a look at the JavaScript:</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;

function toggle_text(shown, hidden) {
       var e = document.getElementById(shown);
       var f = document.getElementById(hidden);
    if(e.style.display == 'inline') {
			e.style.display = 'none';
			f.style.display = 'inline';
	}
	else {
			e.style.display = 'inline';
			f.style.display = 'none';
	}
}
&lt;/script&gt;
</pre>
<p>I&#8217;m simply passing in the two divs to the JavaScript function, then JavaScript checks whether or not the first div (the <code>shown</code> div) is visible or not. If it is visible, it hides it and shows the hidden one. The opposite happens if it isn&#8217;t visible. Note that using <code>inline</code> will display your text on the same line. If we wanted it to be on its own line, we could just use <code>block</code> instead.</p>
<p>Now you just need to insert the divs into the body of the page. Here is the code used from the sample above:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;shown_first&quot; style=&quot;display:inline&quot;&gt;
	&lt;a style=&quot;cursor:pointer&quot; onclick=&quot;toggle_text('shown_first', 'hidden_first')&quot;&gt;
	Click me
	&lt;/a&gt;
&lt;/div&gt;
&lt;div id=&quot;hidden_first&quot; style=&quot;display:none&quot;&gt;
	&lt;a style=&quot;cursor:pointer&quot; onclick=&quot;toggle_text('shown_first', 'hidden_first')&quot;&gt;
	I used to be hidden!
	&lt;/a&gt;
&lt;/div&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/06/19/replace-text-on-click-using-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Display the Contents of a File Using PHP</title>
		<link>http://brockangelo.com/2009/06/07/display-the-contents-of-a-file-using-php/</link>
		<comments>http://brockangelo.com/2009/06/07/display-the-contents-of-a-file-using-php/#comments</comments>
		<pubDate>Sun, 07 Jun 2009 12:00:00 +0000</pubDate>
		<dc:creator>brockangelo</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[echo]]></category>
		<category><![CDATA[file contents]]></category>
		<category><![CDATA[file_get_contents]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[text file]]></category>

		<guid isPermaLink="false">http://brockangelo.com/?p=873</guid>
		<description><![CDATA[<p>How to Display the Contents of a File Using PHP</p> <p>PHP has a built in function to display the contents of a file. This is helpful if you want to update a webpage to reflect some data that is regularly updated or output to a file. It is also helpful if you have access to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How to Display the Contents of a File Using PHP</strong></p>
<p>PHP has a built in function to display the <em>contents</em> of a file. This is helpful if you want to update a webpage to reflect some data that is regularly updated or output to a file. It is also helpful if you have access to the web server and it is easier for you to update a text file than it is to edit html. Simply point your webpage to the text file and the contents of the webpage get updated automatically.</p>
<p>Here&#8217;s how it works:</p>
<pre class="brush: php; title: ; notranslate">&lt;?php
echo file_get_contents('http://brockangelo.com/uptime.txt');
?&gt;</pre>
<p>Easy enough. I used to have a message in the footer of this webpage that said &#8220;This server has been up for 14 days, 7 hours, 22 minutes.&#8221; All that was doing was reading the contents of the text file that got updated every hour.</p>
]]></content:encoded>
			<wfw:commentRss>http://brockangelo.com/2009/06/07/display-the-contents-of-a-file-using-php/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
