<?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>Steve&#039;s Journal &#187; Geek Stuff</title>
	<atom:link href="http://www.kf8ki.com/category/geek-stuff/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kf8ki.com</link>
	<description>Just another day in paradise...</description>
	<lastBuildDate>Fri, 30 Jul 2010 15:38:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Thought for the Day &#8211; July 21, 2009</title>
		<link>http://www.kf8ki.com/humor/thought-for-the-day-july-21-2009/</link>
		<comments>http://www.kf8ki.com/humor/thought-for-the-day-july-21-2009/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 17:12:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>
		<category><![CDATA[Humor]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sum]]></category>
		<category><![CDATA[thought for the day]]></category>
		<category><![CDATA[time]]></category>

		<guid isPermaLink="false">http://www.kf8ki.com/?p=559</guid>
		<description><![CDATA[Computers never do what you want them to do, only what you tell them to do. Unless there&#8217;s a bug. Then you&#8217;re just screwed&#8230;
Grrrr&#8230; nothing like a MySql bug to really make your day.
I had need to generate a sum for a column of duration values with the type of TIME.Â  Orginally I used this [...]]]></description>
			<content:encoded><![CDATA[<h3 class="UIIntentionalStory_Message">Computers never do what you want them to do, only what you tell them to do. Unless there&#8217;s a bug. Then you&#8217;re just screwed&#8230;</h3>
<p>Grrrr&#8230; nothing like a MySql bug to really make your day.</p>
<p>I had need to generate a sum for a column of duration values with the type of TIME.Â  Orginally I used this as part of my query:</p>
<p>sum(call_duration) as totalhours</p>
<p>Turns out this does not work properly and has apparently been a problem since 2005!</p>
<p><a href="http://bugs.mysql.com/bug.php?id=12108" target="_blank">http://bugs.mysql.com/bug.php?id=12108</a></p>
<p>From reading the comments, there appears to be some argument as to the validity of the bug.Â  For what it&#8217;s worth, I found that the problem is more pronounced with more results.Â  I found that it was non-existant (that is that the sum returned the correct value) with result sets with only a few rows.Â Â  The problem seemed to get more severe based on more rows in the results.Â  In my case, a result set with about 2000 rows in it had an error of on the order of three hours.</p>
<p>The work around is to modify the query slightly:</p>
<p>sum(TIME_TO_SEC(crf_call_duration)) as totalhours</p>
<p>This converts the time to essentially an integer which is then properly handled by the sum.Â  You can then either work with the result as a count of seconds, or use the function SEC_TO_TIME to convert it back to a TIME value.</p>
<p>I hope this helps someone else.Â  It cost me a number of hours&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kf8ki.com/humor/thought-for-the-day-july-21-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geek Marketing Slogan of the Year</title>
		<link>http://www.kf8ki.com/humor/geek-marketing-slogan-of-the-year/</link>
		<comments>http://www.kf8ki.com/humor/geek-marketing-slogan-of-the-year/#comments</comments>
		<pubDate>Wed, 20 May 2009 21:06:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Amateur Radio]]></category>
		<category><![CDATA[Geek Stuff]]></category>
		<category><![CDATA[Humor]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[Dayton Hamvention]]></category>
		<category><![CDATA[Geek]]></category>

		<guid isPermaLink="false">http://www.kf8ki.com/?p=523</guid>
		<description><![CDATA[The Michigan Privately Owned Repeater Network (P.O.R.N) was offering (wire) strippers at the Dayton Hamvention this year!
 
]]></description>
			<content:encoded><![CDATA[<p>The Michigan Privately Owned Repeater Network (P.O.R.N) was offering (wire) strippers at the Dayton Hamvention this year!</p>

<a href="http://www.kf8ki.com/wp-content/gallery/20090515-hamfest/dscf6353.jpg" title="Yeap.... I gotta join this organization" class="thickbox" rel="singlepic1681" >
	<img class="ngg-singlepic" src="http://www.kf8ki.com/wp-content/plugins/nextgen-gallery/nggshow.php?pid=1681&amp;width=320&amp;height=240&amp;mode=" alt="dscf6353.jpg" title="dscf6353.jpg" />
</a>
Â  
<a href="http://www.kf8ki.com/wp-content/gallery/20090515-hamfest/dscf6354.jpg" title="Here we have it: Geek Marketing Slogan of the Year.  Wire strippers folks... I had to look twice too!" class="thickbox" rel="singlepic1682" >
	<img class="ngg-singlepic" src="http://www.kf8ki.com/wp-content/plugins/nextgen-gallery/nggshow.php?pid=1682&amp;width=320&amp;height=240&amp;mode=" alt="dscf6354.jpg" title="dscf6354.jpg" />
</a>

]]></content:encoded>
			<wfw:commentRss>http://www.kf8ki.com/humor/geek-marketing-slogan-of-the-year/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tech Note for Today &#8211; March 9, 2009</title>
		<link>http://www.kf8ki.com/geek-stuff/tech-note-for-today-march-9-2009/</link>
		<comments>http://www.kf8ki.com/geek-stuff/tech-note-for-today-march-9-2009/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 11:08:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>
		<category><![CDATA[a TS-7200]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[missing]]></category>
		<category><![CDATA[missing log]]></category>
		<category><![CDATA[Proftpd]]></category>
		<category><![CDATA[Technologic Systems]]></category>
		<category><![CDATA[TS-7x00]]></category>

		<guid isPermaLink="false">http://www.kf8ki.com/?p=448</guid>
		<description><![CDATA[Well, I hope this helps out someone else.Â  I&#8217;ve been beating my head against the wall on and off for several days on it.Â  I&#8217;m working on an embedded ARM platform from Technologic Systems, a TS-7200.Â  I have it set up to boot a Debian build from a compact flash card.Â  This is my first [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I hope this helps out someone else.Â  I&#8217;ve been beating my head against the wall on and off for several days on it.Â  I&#8217;m working on an embedded ARM platform from Technologic Systems, a TS-7200.Â  I have it set up to boot a Debian build from a compact flash card.Â  This is my first experience with both embedded ARM and Debian.Â  So far, both ROCK.. but I digress.</p>
<p>One of the things I needed to do was get an FTP installation working so I could send stuff to the board.Â  Apt-get did a fantastic job of getting and installing <a href="http://www.proftpd.org/" target="_blank">Proftpd</a> and I had the daemon up and running in like five minutes.Â  So far so good.Â  Until I tried to log in.</p>
<p>Nada.Â  Damn.</p>
<p>Endless searches and configuration changes and log checks did me no good.Â  For a while in fact, I wasn&#8217;t even getting a log at all.Â  Turns out the default setup doesn&#8217;t include logging.Â  They don&#8217;t do a good job of telling you that either.Â  My log setup is:</p>
<p><span style="color: #0000ff;"># Logging formats<br />
LogFormat default &#8220;%h %l %u %t \&#8221;%r\&#8221; %s %b&#8221;<br />
LogFormat auth &#8220;%v [%P] %h %t \&#8221;%r\&#8221; %s&#8221;<br />
LogFormat write &#8220;%h %l %u %t \&#8221;%r\&#8221; %s %b&#8221;</span><br />
<span style="color: #0000ff;"><br />
# activate logging</span></p>
<p><span style="color: #0000ff;"># every login<br />
ExtendedLog /var/log/ftp_auth.log AUTH auth</span></p>
<p><span style="color: #0000ff;"># file/dir access<br />
ExtendedLog /var/log/ftp_access.log WRITE,READ write</span></p>
<p><span style="color: #0000ff;"># forr paranoid (big logfiles!)<br />
ExtendedLog /var/log/ftp_paranoid.log ALL default</span></p>
<p>Yes I know it&#8217;s probably overkill, but this will be for low volume use, so I don&#8217;t care if the logs have big entries.Â  There won&#8217;t be many.Â  That fixed my logging problem.Â  It didn&#8217;t get me logged in though.Â  After what was probably endless hours of searching, I found this post:</p>
<p><a href="http://raetsel.wordpress.com/2007/03/28/proftpd-shells-and-nobody/" target="_blank">http://raetsel.wordpress.com/2007/03/28/proftpd-shells-and-nobody/</a></p>
<p>Turns out that my problem was the &#8220;gotcha&#8221; he mentions first.Â  If you are using actual system users for FTP (as opposed to virtual users) you need to be sure the shell is set properly.Â  Apparently when you adduser it isn&#8217;t.Â  It requires use of chsh to set to a valid shell in order to log in.Â  I set my user to /bin/bash and voila!Â  If you&#8217;re not sure what the shell is for the user you want to use, check out /etc/passwd.Â  Its the last field in the entry.Â  If there is a setting there (unlike mine which was blank) and it still doesn&#8217;t work, make sure that the shell that is assigned is actually a valid one (my first attempt was bin/bash not /bin/bash which didn&#8217;t work either).</p>
<p>If you have assigned a shell that is proper then you can next check /etc/shells to make sure that the one you&#8217;ve assigned is a valid login shell.Â  I didn&#8217;t need to.Â  Your mileage may vary (YMMV).Â  If this helps you, please feel free to leave a comment to that effect.</p>
<p>I hate computers.Â  Never do what you want them to do, only what you tell them to do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kf8ki.com/geek-stuff/tech-note-for-today-march-9-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nextgen Gallery Image Navigation</title>
		<link>http://www.kf8ki.com/geek-stuff/nextgen-gallery-image-navigation/</link>
		<comments>http://www.kf8ki.com/geek-stuff/nextgen-gallery-image-navigation/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 19:39:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>
		<category><![CDATA[1.0.2]]></category>
		<category><![CDATA[2.7]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[Nextgen]]></category>
		<category><![CDATA[Thickbox]]></category>
		<category><![CDATA[Thumbnails]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.kf8ki.com/blog/?p=328</guid>
		<description><![CDATA[Hi Everyone!
I&#8217;ve decided I&#8217;m going to start adding some other geeky stuff here too.Â  I&#8217;ve been using WordPress lately as a content management system (CMS) for several of my websites, and all I can say is, I&#8217;m in love!Â  I&#8217;ve also found a fabulous plugin for images for WordPress called Nextgen Gallery.Â  I&#8217;ve been using [...]]]></description>
			<content:encoded><![CDATA[<p>Hi Everyone!</p>
<p>I&#8217;ve decided I&#8217;m going to start adding some other geeky stuff here too.Â  I&#8217;ve been using WordPress lately as a content management system (CMS) for several of my websites, and all I can say is, I&#8217;m in love!Â  I&#8217;ve also found a fabulous plugin for images for WordPress called Nextgen Gallery.Â  I&#8217;ve been using both through several versions now and am currently on WordPress 2.7 and Nexten Gallery 1.0.2.</p>
<p>In case you&#8217;re interested in WordPress, you can find it<a href="http://wordpress.org/" target="_blank"> here</a>, and Nextgen Gallery is <a href="http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/" target="_blank">here</a>.Â  Lots of examples at the Nextgen site as well.</p>
<p>One of the small changes I&#8217;d like made in Nextgen Gallery is the way the navigation through images is done if you use pagination.Â  Currently if you set max images to something other than 0, it limits the number of thumbnails displayed to that number.Â  I happen to like 4 because it doesn&#8217;t crowd the posts with a million thumbnails.Â  When you click on a thumbnail, it opens a Thickbox with the image.Â  The problem is, the Thickbox includes previous and next links to move through the images, but they only navigate through the limited number of images on that page and not the whole gallery.</p>
<p>I want them to navigate through the whole gallery so you don&#8217;t have to switch back and forth and navigate through both the pages AND the images.Â  Unfortunately this isn&#8217;t a feature that&#8217;s included.Â  In a previous version of Nextgen, 0.99, I followed some online instructions to modify the plugin to get it to do what I wanted.Â  If you&#8217;re using that version, you can find those instructions <a href="http://www.liveworkdream.com/2007/12/02/edit-nextgen-gallery-plugin/" target="_blank">here</a>.Â  Unfortuantely, they don&#8217;t work for the newest version (1.0.2) because of significant changes to the applicable routines.Â  So&#8230; I got to work.Â  To make a long story a bit shorter, here are the modification instructions:</p>
<div class="threadpost col-7">
<div class="post">
<p>#1 &#8211; In nggfunctions.php</p>
<p>Find the lines that look like:</p>
<pre><span style="color: #0000ff;"><code>// remove the element if we didn't start at the beginning
if ($start &gt; 0 ) array_splice($picturelist, 0, $start);

// return the list of images we need
array_splice($picturelist, $maxElement);</code></span></pre>
<p>Comment them out or delete them.  Just below where they are (or were) add:</p>
<pre><span style="color: #0000ff;"><code>//Don't modify the array.  We now want to pass all of the picture list
//to the output... but not all are visible as thumbnails.
//TODO:  make a configuration option to select or deselect this
//behavior

foreach ($picturelist as $index =&gt; $value)
{
if (($index &lt; $start) || ($index &gt;= ($start + $maxElement)))
  $picturelist[$index]-&gt;imageHidden = 1;  //if out of range,
                                          //hide image
else
  $picturelist[$index]-&gt;imageHidden = 0;  //otherwise, show it
		}</code></span></pre>
<p>#2 &#8211; in /lib/image.php find the the following about line 18:</p>
<pre><span style="color: #0000ff;"><code>var $href = '';		// A href link code</code></span></pre>
<p>Below it, add:</p>
<pre><span style="color: #0000ff;"><code>var $imageHidden = 0;  	// show or not show thumbnail</code></span></pre>
<p>#3 &#8211; lastly, in /view/gallery.php find these lines, starting about line 37:</p>
<pre><span style="color: #0000ff;"><code>&lt;!-- Thumbnails --&gt;
&lt;?php foreach ($images as $image) : ?&gt;

&lt;div id="ngg-image-&lt;?php echo $image-&gt;pid ?&gt;"
class="ngg-gallery-thumbnail-box"&gt;</code></span></pre>
<p>Delete the &lt;div.. tag.  In it&#8217;s place, paste this:</p>
<pre><span style="color: #0000ff;"><code>&lt;div id="ngg-image-&lt;?php echo $image-&gt;pid ?&gt;"
class="ngg-gallery-thumbnail-box"
&lt;?php
  if ( $image-&gt;imageHidden == 1 )
  {
    echo " style='display: none' ";
  }
?&gt;
&gt;</code></span></pre>
<p>Be careful about the closing bracket on the replacement tag!</p>
<p>That should do it.Â  It&#8217;s working on this site anyway!Â  If you want to make the changes but are afraid of doing so, I&#8217;d be happy to email you the necessary files if you say please <img src='http://www.kf8ki.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>You can also follow the discussion on this subject on the Wordpress forums <a href="http://wordpress.org/support/topic/228743" target="_blank">here</a>.Â Â  Enjoy!</p>
<p>Update 12/29 &#8211; another Wordpress user reports the mod is working fine with Lightbox as well.</p>
<p>Steve</p></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.kf8ki.com/geek-stuff/nextgen-gallery-image-navigation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
