<?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>Dwight DeGroff's Blog</title>
	<atom:link href="http://dwightdegroff.com/techblog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://dwightdegroff.com/techblog</link>
	<description>Dwight DeGroff</description>
	<lastBuildDate>Sun, 16 Nov 2008 02:00:47 +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>How To: PHP Ternary Conditional</title>
		<link>http://dwightdegroff.com/techblog/?p=12</link>
		<comments>http://dwightdegroff.com/techblog/?p=12#comments</comments>
		<pubDate>Sun, 16 Nov 2008 02:00:47 +0000</pubDate>
		<dc:creator>Dwight</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[conditional]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[ternary]]></category>

		<guid isPermaLink="false">http://dwightdegroff.com/techblog/?p=12</guid>
		<description><![CDATA[Since I can never remember the PHP ternary conditional syntax for some reason:
variable = (condition) ? value-if-true : value-if-false;
which is equivalent to:
if (condition) {
variable = value-if-true;
} else {
variable = value-if-false;
}
]]></description>
			<content:encoded><![CDATA[<p>Since I can never remember the PHP ternary conditional syntax for some reason:</p>
<p><code>variable = (condition) ? value-if-true : value-if-false;</code></p>
<p>which is equivalent to:<code></code></p>
<pre><code>if (condition) {</code><code></code></pre>
<pre><code>variable = value-if-true;</code><code></code></pre>
<pre><code>} else {</code><code></code></pre>
<pre><code>variable = value-if-false;</code><code></code></pre>
<pre><code>}</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://dwightdegroff.com/techblog/?feed=rss2&amp;p=12</wfw:commentRss>
		<slash:comments>861</slash:comments>
		</item>
		<item>
		<title>How To: Align DIV tags to center using CSS</title>
		<link>http://dwightdegroff.com/techblog/?p=11</link>
		<comments>http://dwightdegroff.com/techblog/?p=11#comments</comments>
		<pubDate>Wed, 08 Oct 2008 20:05:01 +0000</pubDate>
		<dc:creator>Dwight</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[align]]></category>
		<category><![CDATA[center]]></category>
		<category><![CDATA[DIV]]></category>
		<category><![CDATA[horizontal]]></category>
		<category><![CDATA[margin]]></category>
		<category><![CDATA[position]]></category>

		<guid isPermaLink="false">http://dwightdegroff.com/techblog/?p=11</guid>
		<description><![CDATA[Looking for a simple way to align DIV tags to center horizontally using CSS?

div {
position:       relative;
margin-left:    auto;
margin-right:   auto;
}
]]></description>
			<content:encoded><![CDATA[<p>Looking for a simple way to align DIV tags to center horizontally using CSS?<br />
<code><br />
div {<br />
position:       relative;<br />
margin-left:    auto;<br />
margin-right:   auto;<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://dwightdegroff.com/techblog/?feed=rss2&amp;p=11</wfw:commentRss>
		<slash:comments>128</slash:comments>
		</item>
		<item>
		<title>How To: Setup a VNC connection to Mac OS X from Windows</title>
		<link>http://dwightdegroff.com/techblog/?p=10</link>
		<comments>http://dwightdegroff.com/techblog/?p=10#comments</comments>
		<pubDate>Wed, 11 Jun 2008 14:43:36 +0000</pubDate>
		<dc:creator>Dwight</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[DeGroff]]></category>
		<category><![CDATA[Dwight]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[VNC]]></category>

		<guid isPermaLink="false">http://dwightdegroff.com/techblog/?p=10</guid>
		<description><![CDATA[This site had some decent information that I will read through and post the highlights of in my quest to get Gwen setup with a VNC to her Apple from our PC at home.
I may consider using the &#8220;default&#8221; Mac VNC server, but I&#8217;ve heard it&#8217;s sluggish when connecting with a Windows client.
I&#8217;ll probably use [...]]]></description>
			<content:encoded><![CDATA[<p>This <a href="http://macapper.com/2007/03/19/vnc-remote-desktop-for-free/" title="VNC Remote Desktop for Free" target="_blank">site</a> had some decent information that I will read through and post the highlights of in my quest to get Gwen setup with a VNC to her Apple from our PC at home.</p>
<p>I may consider using the &#8220;default&#8221; Mac VNC server, but I&#8217;ve heard it&#8217;s sluggish when connecting with a Windows client.</p>
<p>I&#8217;ll probably use <a href="http://www.redstonesoftware.com/products/vine_server" target="_blank">Vine Server</a> instead!</p>
<p>I&#8217;ll be using <a href="http://www.tightvnc.com/download.html" title="TightVNC client" target="_blank">TightVNC</a> for my windows VNC client</p>
]]></content:encoded>
			<wfw:commentRss>http://dwightdegroff.com/techblog/?feed=rss2&amp;p=10</wfw:commentRss>
		<slash:comments>29</slash:comments>
		</item>
		<item>
		<title>How To: Disable Wordpress Comment Moderation</title>
		<link>http://dwightdegroff.com/techblog/?p=9</link>
		<comments>http://dwightdegroff.com/techblog/?p=9#comments</comments>
		<pubDate>Thu, 28 Feb 2008 19:58:54 +0000</pubDate>
		<dc:creator>Dwight</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Comment]]></category>
		<category><![CDATA[DeGroff]]></category>
		<category><![CDATA[Disable]]></category>
		<category><![CDATA[Dwight]]></category>
		<category><![CDATA[Moderation]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://dwightdegroff.com/techblog/?p=9</guid>
		<description><![CDATA[I posted an article on my &#8220;personal&#8221; blog regarding Disabling WordPress Comment Moderation. I figured that I should post it here as well to maintain consistent themes.
Unfortunately, I couldn&#8217;t locate the WordPress moderation controls, a guide by &#8220;Geekycoder&#8221; got me there. For future reference:
How to disable comment moderation in Wordpress
Login to wordpress account. Go to [...]]]></description>
			<content:encoded><![CDATA[<p>I posted an article on my &#8220;personal&#8221; blog regarding <a href="http://dwightdegroff.com/2008/02/28/disabling-wordpress-comment-moderation/" title="Disabling Wordpress Comment Moderation" target="_blank">Disabling WordPress Comment Moderation</a>. I figured that I should post it here as well to maintain consistent themes.</p>
<p>Unfortunately, I couldn&#8217;t locate the WordPress moderation controls, a guide by &#8220;Geekycoder&#8221; got me there. For future reference:</p>
<blockquote><p><u><strong>How to disable comment moderation in Wordpress</strong></u></p>
<p>Login to wordpress account. Go to <strong>Option </strong>main tab, then select <strong>Discussion </strong>sub-tab.<br />
<strong>Uncheck </strong>(no tick) the following two options:</p>
<ul>
<li><em><strong>An administrator must always approve the comment</strong></em></li>
<li><em><strong>Comment author must have a previously approved comment</strong></em></li>
</ul>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dwightdegroff.com/techblog/?feed=rss2&amp;p=9</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>&#8220;Secure&#8221;, anonymous file upload via PHP</title>
		<link>http://dwightdegroff.com/techblog/?p=8</link>
		<comments>http://dwightdegroff.com/techblog/?p=8#comments</comments>
		<pubDate>Mon, 11 Feb 2008 21:04:19 +0000</pubDate>
		<dc:creator>Dwight</dc:creator>
				<category><![CDATA[ajax]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[DeGroff]]></category>
		<category><![CDATA[Dwight]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://dwightdegroff.com/blog/?p=8</guid>
		<description><![CDATA[Let&#8217;s say I need to allow my clients to upload image/graphic design-related files for my review and/or action. Let&#8217;s also say that due to the nature of my clients the upload should be allowed without supplying credentials, but not anonymously. My clients expect prompt attention to files that they upload, therefore I would like to [...]]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say I need to allow my clients to upload image/graphic design-related files for my review and/or action. Let&#8217;s also say that due to the nature of my clients the upload should be allowed without supplying credentials, but not anonymously. My clients expect prompt attention to files that they upload, therefore I would like to be notified immediately, via e-mail, when files are uploaded as well as some details about the uploaded files as well as who they are reportedly from.<br />
If I create this &#8220;secure&#8221;, anonymous file upload form in <a href="http://www.php.net" title="PHP Scripting Language" target="_blank">PHP</a>, what security issues need to be addressed to have relative peace-of-mind before putting this functionality in place?</p>
<p>1. Ensure that only the expected types are files (.jpg, .gif, .psd, .pdf to name a few) allowed.</p>
<p>How can this be achieved? Checking file extensions? Checking mime-encoding?<a href="http://www.php.net/function.imagecreatefromjpeg" title="PHP imagecreatefromjpeg()" target="_blank"> imagecreatefromjpeg()</a> (to validate jpgs)</p>
<p>2. Prevent malicious code from being uploaded and executed</p>
<p>Set default permissions to deny execute privileges on files. Deny extensions commonly associated with malicious code (exe, php, asp, js, no extension?, &#8230;?)</p>
<p>3. Prevent server disk space from completely completed exhausted in a short period of time (less than 24 hours)</p>
<p>&#8220;Captcha&#8221; prompt? Random question? IP logging? Minimum free space checks?</p>
<p>x. ?? What else? I would appreciate <em>your</em> input.</p>
]]></content:encoded>
			<wfw:commentRss>http://dwightdegroff.com/techblog/?feed=rss2&amp;p=8</wfw:commentRss>
		<slash:comments>105</slash:comments>
		</item>
		<item>
		<title>&#8220;My Internet is down&#8221; &#8211; seriously though</title>
		<link>http://dwightdegroff.com/techblog/?p=7</link>
		<comments>http://dwightdegroff.com/techblog/?p=7#comments</comments>
		<pubDate>Thu, 31 Jan 2008 18:18:08 +0000</pubDate>
		<dc:creator>Dwight</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[africa]]></category>
		<category><![CDATA[asia]]></category>
		<category><![CDATA[DeGroff]]></category>
		<category><![CDATA[down]]></category>
		<category><![CDATA[Dwight]]></category>
		<category><![CDATA[failure]]></category>
		<category><![CDATA[middle east]]></category>

		<guid isPermaLink="false">http://dwightdegroff.com/blog/?p=7</guid>
		<description><![CDATA[As CNN reported, the internet has truly suffered a major failure across &#8220;large tracts of Asia, the Middle East and North Africa&#8221;. It is suspected that a pipeline underneath the Mediterranean Sea has suffered some kind of physical damage. There is currently no estimate of how long it will take to repair.
As a self-proclaimed nerd, [...]]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://www.cnn.com/2008/WORLD/meast/01/31/dubai.outage/index.html" title="Internet failure hits two continents" target="_blank">CNN reported</a>, the internet has truly suffered a major failure across &#8220;large tracts of Asia, the Middle East and North Africa&#8221;. It is suspected that a pipeline underneath the Mediterranean Sea has suffered some kind of physical damage. There is currently no estimate of how long it will take to repair.</p>
<p>As a self-proclaimed nerd, I cringe everytime I hear someone complaining that their &#8220;internet is down&#8221;. In some sick, twisted way it brings me pleasure to talk about the internet being down, without feeling like I&#8217;m betraying my kind.</p>
<p>My condolences to those affected by this internet failure.</p>
]]></content:encoded>
			<wfw:commentRss>http://dwightdegroff.com/techblog/?feed=rss2&amp;p=7</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>PHP How To: Test for an Empty Directory</title>
		<link>http://dwightdegroff.com/techblog/?p=5</link>
		<comments>http://dwightdegroff.com/techblog/?p=5#comments</comments>
		<pubDate>Wed, 23 Jan 2008 16:39:56 +0000</pubDate>
		<dc:creator>Dwight</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[DeGroff]]></category>
		<category><![CDATA[Directory]]></category>
		<category><![CDATA[Dwight]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://dwightdegroff.com/blog/?p=5</guid>
		<description><![CDATA[I was writing a PHP script to traverse my development directory and make links to any project folders that weren&#8217;t empty (i.e., projects I had actually done some work on) to display in a navigation menu.
Since I needed to perform this check a number of times I made up a quick function to check if [...]]]></description>
			<content:encoded><![CDATA[<p>I was writing a <a href="http://www.php.net" title="PHP scripting language" target="_blank">PHP</a> script to traverse my development directory and make links to any project folders that weren&#8217;t empty (i.e., projects I had actually done some work on) to display in a navigation menu.</p>
<p>Since I needed to perform this check a number of times I made up a quick function to check if a directory was empty:</p>
<pre>
function dirIsEmpty($dir) {
   return (count(glob("$dir/*")) === 0) ? true : false;
}</pre>
<p>What I failed to consider was that my webserver (which uses a linux OS) will always have parent (&#8216;..&#8217;) and self (&#8216;.&#8217;) references in each directory. I thought about using array_slice() to strip out the first 2 array elements, but then I would have run into issues with <a href="http://www.windows.com" title="Read: Windows">other</a> operating systems.</p>
<p>Follow the jump to see the PHP function I ended up using.<br />
<span id="more-5"></span></p>
<p>This is the final version of the PHP function I use to check if a directory is empty:</p>
<pre>
function dirIsEmpty($dir) {
   $d = dir($dir);

   while (false !== ($entry = $d-&gt;read()))
      if ($entry != '.' &amp;&amp; $entry != '..')
         return false;

   $d-&gt;close();
   return true;
}</pre>
<pre></pre>
<pre></pre>
<pre>Enjoy,</pre>
<pre></pre>
<pre>--<a href="http://dwightdegroff.com">Dwight</a></pre>
]]></content:encoded>
			<wfw:commentRss>http://dwightdegroff.com/techblog/?feed=rss2&amp;p=5</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To: disable wordpress 2.0 &#8220;visual&#8221; WYSIWYG editor</title>
		<link>http://dwightdegroff.com/techblog/?p=6</link>
		<comments>http://dwightdegroff.com/techblog/?p=6#comments</comments>
		<pubDate>Wed, 23 Jan 2008 16:27:07 +0000</pubDate>
		<dc:creator>Dwight</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[DeGroff]]></category>
		<category><![CDATA[Disable]]></category>
		<category><![CDATA[Dwight]]></category>
		<category><![CDATA[Editor]]></category>
		<category><![CDATA[Visual]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://dwightdegroff.com/blog/?p=6</guid>
		<description><![CDATA[Need to turn off the visual, WYSIWYG editor in Wordpress 2.0+? ExplodingBoy provided a very quick, &#8220;How To:&#8221; reference for doing just that.
 &#8230;Click the “Users” menu in the WP admin area to access your profile. Once you are on the “Users” page scroll to the bottom of the page, and uncheck the “Use the [...]]]></description>
			<content:encoded><![CDATA[<p>Need to turn off the visual, WYSIWYG editor in Wordpress 2.0+? <a href="http://www.exploding-boy.com/">ExplodingBoy</a> provided a very quick, &#8220;How To:&#8221; reference for <a href="http://www.exploding-boy.com/2006/01/29/quicktip-turn-off-wordpress-2-visual-editor/">doing just that</a>.</p>
<blockquote><p> &#8230;Click the “Users” menu in the WP admin area to access your profile. Once you are on the “Users” page scroll to the bottom of the page, and uncheck the “Use the visual editor” option&#8230;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dwightdegroff.com/techblog/?feed=rss2&amp;p=6</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>More Leadership Training please!</title>
		<link>http://dwightdegroff.com/techblog/?p=4</link>
		<comments>http://dwightdegroff.com/techblog/?p=4#comments</comments>
		<pubDate>Wed, 23 Jan 2008 14:32:21 +0000</pubDate>
		<dc:creator>Dwight</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[DeGroff]]></category>
		<category><![CDATA[developer]]></category>
		<category><![CDATA[Dwight]]></category>
		<category><![CDATA[leadership]]></category>
		<category><![CDATA[office]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[training]]></category>

		<guid isPermaLink="false">http://dwightdegroff.com/blog/?p=4</guid>
		<description><![CDATA[ This is not just another party. This is a leadership training exercise. I like to find ways to combine fun, motivation, and education into a single mind-blowing, once-in-a-lifetime experience and I do this every January&#8230;. We&#8217;re going on a booze cruise on Lake Wallenpaupack. &#8212; Michael, The Office
I am a strong advocate of leadership [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p> This is not just another party. This is a leadership training exercise. I like to find ways to combine fun, motivation, and education into a single mind-blowing, once-in-a-lifetime experience and I do this every January&#8230;. We&#8217;re going on a booze cruise on Lake Wallenpaupack. &#8212; Michael, The Office</p></blockquote>
<p>I am a strong advocate of leadership training, especially for software developers. I find that it makes them more <em>innovative</em>&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://dwightdegroff.com/techblog/?feed=rss2&amp;p=4</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How To: Unlock an Oracle User Account</title>
		<link>http://dwightdegroff.com/techblog/?p=3</link>
		<comments>http://dwightdegroff.com/techblog/?p=3#comments</comments>
		<pubDate>Tue, 22 Jan 2008 15:39:45 +0000</pubDate>
		<dc:creator>Dwight</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Account]]></category>
		<category><![CDATA[DeGroff]]></category>
		<category><![CDATA[Dwight]]></category>
		<category><![CDATA[Password]]></category>
		<category><![CDATA[Unlock]]></category>

		<guid isPermaLink="false">http://dwightdegroff.com/blog/?p=3</guid>
		<description><![CDATA[Going about my day I ran into a situation where I (or someone else using the same database) had locked out one of the application user accounts. I thought I&#8217;d share the commands to unlock the account, and also make a quick reference for myself for the future.
To Unlock an Oracle User Account:

ALTER USER &#60;username&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Going about my day I ran into a situation where I (or someone else using the same database) had locked out one of the application user accounts. I thought I&#8217;d share the commands to unlock the account, and also make a quick reference for myself for the future.</p>
<p>To Unlock an Oracle User Account:<br />
<code><br />
ALTER USER &lt;username&gt; ACCOUNT UNLOCK;<br />
</code></p>
<p>You may also want to Change an Oracle User&#8217;s Password:<br />
<code><br />
ALTER USER &lt;username&gt;    IDENTIFIED BY &lt;newpassword&gt;;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://dwightdegroff.com/techblog/?feed=rss2&amp;p=3</wfw:commentRss>
		<slash:comments>59</slash:comments>
		</item>
	</channel>
</rss>
