<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
	<channel>
		<title>Wizarth Technologies</title>
		<link>http://www.wizarth.com.au/index.php</link>
		<description><![CDATA[Articles copyright Peter Newman. Comments copyright their authors.]]></description>
		<copyright>Copyright 2012, Peter Newman</copyright>
		<managingEditor>Peter Newman</managingEditor>
		<language>en-US</language>
		<generator>SPHPBLOG 0.5.1</generator>
		<item>
			<title>MythTV not scheduling</title>
			<link>http://www.wizarth.com.au/index.php?entry=entry120506-125838</link>
			<description><![CDATA[If MythTV is not scheduling recordings, <code>tail -f /var/log/mythtv/mythbackend.log</code> while running <code>mythfilldatabase</code>. At the end of it&#039;s run, mythfilldatabase will trigger a re-scan of upcoming recordings. If an SQL error occurs, it will be shown in the log.<br /><br /><code>&quot;Prepared statement needs to be re-prepared&quot;</code> appears to be a MySQL error. This was fixed with <code>mysqlcheck -u mythtv -p --repair mythconverg</code> (using the password from /etc/mythtv/mysql.txt ). Rescheduling appears to happen immediately, without running mythfilldatabase again.]]></description>
			<category>Misc</category>
			<guid isPermaLink="true">http://www.wizarth.com.au/index.php?entry=entry120506-125838</guid>
			<author>Peter Newman</author>
			<pubDate>Sun, 06 May 2012 12:58:38 GMT</pubDate>
			<comments>http://www.wizarth.com.au/comments.php?y=12&amp;m=05&amp;entry=entry120506-125838</comments>
		</item>
		<item>
			<title>MFC auto-resizing</title>
			<link>http://www.wizarth.com.au/index.php?entry=entry120330-000504</link>
			<description><![CDATA[<a href="http://www.codeproject.com/Articles/9434/Automatic-resizing-controls" target="_blank" >Automatic resizing controls</a>.<br /><br />Useful header that gives you a MFC-compatible method of doing basic automatic resizing for window/dialog controls. Useful when you have a dialog that is already designed and resizing is added as a late request.]]></description>
			<category>Misc</category>
			<guid isPermaLink="true">http://www.wizarth.com.au/index.php?entry=entry120330-000504</guid>
			<author>Peter Newman</author>
			<pubDate>Fri, 30 Mar 2012 00:05:04 GMT</pubDate>
			<comments>http://www.wizarth.com.au/comments.php?y=12&amp;m=03&amp;entry=entry120330-000504</comments>
		</item>
		<item>
			<title>Symvol Community Edition Released</title>
			<link>http://www.wizarth.com.au/index.php?entry=entry120206-112325</link>
			<description><![CDATA[<a href="http://uformia.com/index.php/purchase" target="_blank" >Symvol Community Edition</a> has been released.]]></description>
			<category>Uformia</category>
			<guid isPermaLink="true">http://www.wizarth.com.au/index.php?entry=entry120206-112325</guid>
			<author>Peter Newman</author>
			<pubDate>Mon, 06 Feb 2012 11:23:25 GMT</pubDate>
			<comments>http://www.wizarth.com.au/comments.php?y=12&amp;m=02&amp;entry=entry120206-112325</comments>
		</item>
		<item>
			<title>DVD Backups</title>
			<link>http://www.wizarth.com.au/index.php?entry=entry111220-134047</link>
			<description><![CDATA[<a href="http://www.dvdfab.com/dvd-copy.htm" target="_blank" >DVDFab</a> is a suitable replacement to the old faithful DVD Shrink.]]></description>
			<category>Misc</category>
			<guid isPermaLink="true">http://www.wizarth.com.au/index.php?entry=entry111220-134047</guid>
			<author>Peter Newman</author>
			<pubDate>Tue, 20 Dec 2011 13:40:47 GMT</pubDate>
			<comments>http://www.wizarth.com.au/comments.php?y=11&amp;m=12&amp;entry=entry111220-134047</comments>
		</item>
		<item>
			<title>MFC Tooltips</title>
			<link>http://www.wizarth.com.au/index.php?entry=entry111216-102119</link>
			<description><![CDATA[Today I worked on adding custom tooltips for a CSliderCtrl. The CSliderCtrl was an alternative interface to using a drop-down combo box, and the tooltips had to show what option was currently associated. Attempting to do this from the parent window via WM_NOTIFY didn&#039;t work, but the following example did:<br /><br /><code>Add a class (like CMySliderCtrl), derived from CSliderCtrl.<br /><br />Add and implement the following:<br /><br />BEGIN_MESSAGE_MAP(CMySliderCtrl, CSliderCtrl)<br />ON_NOTIFY_EX(TTN_NEEDTEXTW, 0, OnToolTipNotify)<br />ON_NOTIFY_EX(TTN_NEEDTEXTA, 0, OnToolTipNotify)<br />END_MESSAGE_MAP()<br /><br />BOOL CMySliderCtrl::OnToolTipNotify(UINT id, NMHDR *pNMHDR, LRESULT *pResult)<br />{<br />BOOL bResult = TRUE;<br />// need to handle both ANSI and UNICODE versions of the message<br />TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR;<br />TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR;<br /><br />// CString m_strTipText = _T(&quot;anything you like!&quot;);<br />// in this case m_strTipText is a member filled by the window that owns the slider<br /><br /><br />if (pNMHDR-&gt;code == TTN_NEEDTEXTA)<br />{<br />lstrcpyn(pTTTA-&gt;szText, m_strTipText, sizeof(pTTTA-&gt;szText));<br />pTTTA-&gt;hinst = NULL;<br />}<br />else if (pNMHDR-&gt;code == TTN_NEEDTEXTW)<br />{<br />_mbstowcsz(pTTTW-&gt;szText, m_strTipText, sizeof(pTTTW-&gt;szText));<br />pTTTW-&gt;hinst = NULL;<br />}<br />*pResult = 0;<br /><br />return bResult;<br />}</code>]]></description>
			<category>Uformia</category>
			<guid isPermaLink="true">http://www.wizarth.com.au/index.php?entry=entry111216-102119</guid>
			<author>Peter Newman</author>
			<pubDate>Fri, 16 Dec 2011 10:21:19 GMT</pubDate>
			<comments>http://www.wizarth.com.au/comments.php?y=11&amp;m=12&amp;entry=entry111216-102119</comments>
		</item>
		<item>
			<title>JSON over HTTP POST</title>
			<link>http://www.wizarth.com.au/index.php?entry=entry111006-041850</link>
			<description><![CDATA[<a href="http://urldecode.org" target="_blank" >http://urldecode.org</a> converts the URL-Encoded POST data to readable text.<br /><a href="http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/gfx/demos/beautify.html" target="_blank" >http://archive.dojotoolkit.org/nightly/ ... utify.html</a> prettyfies the JSON into tabbed layout.]]></description>
			<category>Misc</category>
			<guid isPermaLink="true">http://www.wizarth.com.au/index.php?entry=entry111006-041850</guid>
			<author>Peter Newman</author>
			<pubDate>Thu, 06 Oct 2011 04:18:50 GMT</pubDate>
			<comments>http://www.wizarth.com.au/comments.php?y=11&amp;m=10&amp;entry=entry111006-041850</comments>
		</item>
		<item>
			<title>Résumés</title>
			<link>http://www.wizarth.com.au/index.php?entry=entry110912-083417</link>
			<description><![CDATA[I&#039;ve updated my résumés to be current.]]></description>
			<category>Misc</category>
			<guid isPermaLink="true">http://www.wizarth.com.au/index.php?entry=entry110912-083417</guid>
			<author>Peter Newman</author>
			<pubDate>Mon, 12 Sep 2011 08:34:17 GMT</pubDate>
			<comments>http://www.wizarth.com.au/comments.php?y=11&amp;m=09&amp;entry=entry110912-083417</comments>
		</item>
		<item>
			<title>MUD Project</title>
			<link>http://www.wizarth.com.au/index.php?entry=entry110905-004633</link>
			<description><![CDATA[Created a Launchpad project at <a href="https://launchpad.net/protomud" target="_blank" >https://launchpad.net/protomud</a> to publicly host the sources for my concept testing MUD.]]></description>
			<category>Game</category>
			<guid isPermaLink="true">http://www.wizarth.com.au/index.php?entry=entry110905-004633</guid>
			<author>Peter Newman</author>
			<pubDate>Mon, 05 Sep 2011 00:46:33 GMT</pubDate>
			<comments>http://www.wizarth.com.au/comments.php?y=11&amp;m=09&amp;entry=entry110905-004633</comments>
		</item>
		<item>
			<title>Game Rooms</title>
			<link>http://www.wizarth.com.au/index.php?entry=entry110904-072848</link>
			<description><![CDATA[Did some more developing on my concept testing game server. Rooms now have connectivity (Portals). The current testing map creates 4 rooms and links them to the starting lobby, users can move between rooms. This is in preparation for event propagation - sounds/actions/etc will be events that pass from location to connected locations, changing as they go.<br /><br />The plan is that a clear sound in one room will be muffled if passing through a closed door, and become muffled after passing through multiple open doors. Visual events will become less detailed as they pass through (open) portals. Also line-of-sight will affect the events, so that sound becomes muffled faster going around corners, and visual events won&#039;t go around corners.]]></description>
			<category>Game</category>
			<guid isPermaLink="true">http://www.wizarth.com.au/index.php?entry=entry110904-072848</guid>
			<author>Peter Newman</author>
			<pubDate>Sun, 04 Sep 2011 07:28:48 GMT</pubDate>
			<comments>http://www.wizarth.com.au/comments.php?y=11&amp;m=09&amp;entry=entry110904-072848</comments>
		</item>
		<item>
			<title>nagios, check_memory</title>
			<link>http://www.wizarth.com.au/index.php?entry=entry110730-083032</link>
			<description><![CDATA[Did some small modifications to the check_memory command I&#039;ve been using to monitor servers memory use. The existing command included chache/buffers in the memory use - which was making a server look like it was in an error condition, when it was actually working normally. (Buffers/Cache SHOULD be using up free memory!)<br /><br />Here is the modified check_memory. It uses bc, so make sure this is installed.<br /><br /><pre>#!/bin/sh<br /><br />#   This program is free software; you can redistribute it and/or modify<br />#   it under the terms of the GNU General Public License as published by<br />#   the Free Software Foundation; version 2 of the License only.<br />#<br />#   This program is distributed in the hope that it will be useful,<br />#   but WITHOUT ANY WARRANTY; without even the implied warranty of<br />#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br />#   GNU General Public License for more details.<br />#<br />#   You should have received a copy of the GNU General Public License<br />#   along with this program; if not, write to the Free Software<br />#   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA<br /><br />ST_OK=0<br />ST_WR=1<br />ST_CR=2<br />ST_UK=3<br />wcdiff=0<br />wclvls=0<br /><br />PROGNAME=`basename $0`<br />VERSION=&quot;Version 1.1,&quot;<br />AUTHOR=&quot;2009, Mike Adolphs (http://www.matejunkie.com/) - 2011, Peter Newman (http://wizarth.com.au/)&quot;<br /><br />print_version() {<br />    echo &quot;$VERSION $AUTHOR&quot;<br />}<br /><br />print_help() {<br />    print_version $PROGNAME $VERSION<br />    echo &quot;&quot;<br />    echo &quot;$PROGNAME is a Nagios plugin to check the current memory usage via&quot;<br />    echo &quot;/proc/meminfo. It should work on almost every system where you&#039;re&quot;<br />    echo &quot;able to cat /proc/meminfo. The script itself is written sh-compliant&quot;<br />    echo &quot;and free software under the terms of the GPLv2.&quot;<br />    echo &quot;&quot;<br />    echo &quot;$PROGNAME -s/--style kb/perc [-w/--warning] [-c/--critical]&quot;<br />    echo &quot;Options:&quot;<br />    echo &quot;  -s/--style)&quot;<br />    echo &quot;     You&#039;re able to set the output to kilobyte (kb) or percentage&quot;<br />    echo &quot;     (perc) values. Please note that other values will result in&quot;<br />    echo &quot;     termination. Default is: kb&quot;<br />    echo &quot;  -w/--warning)&quot;<br />    echo &quot;     Warning level in kb or percent for the amount of used memory.&quot;<br />    echo &quot;     Note that when the style is set to percentage, only values&quot;<br />    echo &quot;     betweeen 0 and 100 are allowed. Default is: Off.&quot;<br />    echo &quot;  -c/--critical)&quot;<br />    echo &quot;     Critical level in kb or percent for the amount of used memory.&quot;<br />    echo &quot;     Note that when the style is set to percentage, only values&quot;<br />    echo &quot;     between 0 and 100 are allowed. Default is: Off.&quot;<br />    exit $ST_UK<br />}<br /><br />val_wcdiff() {<br />    if [ ${lv_wr} -gt ${lv_cr} ]<br />    then<br />        wcdiff=1<br />    fi<br /><br />    fi<br />}<br /><br />style=&quot;kb&quot;<br /><br />while test -n &quot;$1&quot;; do<br />    case &quot;$1&quot; in<br />        --help|-h)<br />            print_help<br />            exit $ST_UK<br />            ;;<br />        --version|-v)<br />            print_version $PROGNAME $VERSION<br />            exit $ST_UK<br />            ;;<br />        --style|-s)<br />            style=$2<br />            shift<br />            ;;<br />        --warning|-w)<br />            lv_wr=$2<br />            shift<br />            ;;<br />        --critical|-c)<br />            lv_cr=$2<br />            shift<br />            ;;<br />        *)<br />            echo &quot;Unknown argument: $1&quot;<br />            print_help<br />            exit $ST_UK<br />            ;;<br />    esac<br />    shift<br />done<br /><br />if [ ! -z &quot;$lv_wr&quot; -a ! -z &quot;$lv_cr&quot; ]<br />then<br />    val_wcdiff<br />    val_wclvls<br />fi<br /><br />if [ $wcdiff = 1 ]<br />then<br />    echo &quot;Please adjust levels. The critical level must be higher than the warning level!&quot;<br />    if [ $wclvls = 1 ]<br />    then<br />        echo &quot;Warning and critical level values must be between 0 and 100.&quot;<br /><br />    fi<br />    exit $ST_UK<br />fi<br /><br />if [ $wclvls = 1 ]<br />then<br />    echo &quot;Warning and critical level values must be between 0 and 100.&quot;<br />    exit $ST_UK<br />fi<br /><br />MEM_TOTAL=`grep &quot;^MemTotal&quot; /proc/meminfo|awk &#039;{print $2}&#039;`<br />BUFFERS=`grep &quot;^Buffers&quot; /proc/meminfo|awk &#039;{print $2}&#039;`<br />CACHED=`grep &quot;^Cached&quot; /proc/meminfo|awk &#039;{print $2}&#039;`<br />TMP_MEM_FREE=`grep &quot;^MemFree&quot; /proc/meminfo|awk &#039;{print $2}&#039;`<br />TMP_MEM_FREE=`expr $TMP_MEM_FREE + $BUFFERS + $CACHED`<br />TMP_MEM_USED=`expr $MEM_TOTAL - $TMP_MEM_FREE`<br /><br />P_MEM_FREE=`echo &quot;scale=2; $TMP_MEM_FREE / $MEM_TOTAL * 100&quot; | bc -l | sed &#039;s/.[0-9][0-9]//&#039;`<br />P_MEM_USED=`echo &quot;scale=0; 100 - $P_MEM_FREE&quot; | bc -l`<br /><br />if [ $style = &quot;kb&quot; ]<br />then<br />    if [ ! -z &quot;$lv_wr&quot; -a ! -z &quot;$lv_cr&quot; ]<br />    then<br />        if [ ${TMP_MEM_USED} -ge ${lv_wr} -a ${TMP_MEM_USED} -lt ${lv_cr} ]<br />        then<br />            echo &quot;WARNING - Total: $MEM_TOTAL kb, Used: $TMP_MEM_USED kb, Free: $TMP_MEM_FREE kb | &#039;mem_total&#039;=$MEM_TOTAL &#039;mem_used&#039;=$TMP_MEM_USED;$lv_wr;$lv_cr &#039;mem_free&#039;=$TMP_MEM_FREE&quot;<br />            exit $ST_WR<br />        elif [ ${TMP_MEM_USED} -ge ${lv_cr} ]<br />        then<br />            echo &quot;CRITICAL - Total: $MEM_TOTAL kb, Used: $TMP_MEM_USED kb, Free: $TMP_MEM_FREE kb | &#039;mem_total&#039;=$MEM_TOTAL &#039;mem_used&#039;=$TMP_MEM_USED;$lv_wr;$lv_cr &#039;mem_free&#039;=$TMP_MEM_FREE&quot;<br />            exit $ST_CR<br />        else<br />            echo &quot;OK - Total: $MEM_TOTAL kb, Used: $TMP_MEM_USED kb, Free: $TMP_MEM_FREE kb | &#039;mem_total&#039;=$MEM_TOTAL &#039;mem_used&#039;=$TMP_MEM_USED;$lv_wr;$lv_cr &#039;mem_free&#039;=$TMP_MEM_FREE&quot;<br />            exit $ST_OK<br />        fi<br />    else<br />        echo &quot;OK - Total: $MEM_TOTAL kb, Used: $TMP_MEM_USED kb, Free: $TMP_MEM_FREE kb | &#039;mem_total&#039;=$MEM_TOTAL &#039;mem_used&#039;=$TMP_MEM_USED &#039;mem_free&#039;=$TMP_MEM_FREE&quot;<br />        exit $ST_OK<br />    fi<br />elif [ $style = &quot;perc&quot; ]<br />then<br />    if [ ! -z &quot;$lv_wr&quot; -a ! -z &quot;$lv_cr&quot; ]<br />    then<br />        if [ ${P_MEM_USED} -ge ${lv_wr} -a ${P_MEM_USED} -lt ${lv_cr} ]<br />        then<br />            echo &quot;WARNING - Used: $P_MEM_USED%, Free: $P_MEM_FREE% | &#039;mem_used&#039;=$P_MEM_USED;$lv_wr;$lv_cr &#039;mem_free&#039;=$P_MEM_FREE&quot;<br />            exit $ST_WR<br />        elif [ ${P_MEM_USED} -ge ${lv_cr} ]<br />        then<br />            echo &quot;CRITICAL - Used: $P_MEM_USED%, Free: $P_MEM_FREE% | &#039;mem_used&#039;=$P_MEM_USED;$lv_wr;$lv_cr &#039;mem_free&#039;=$P_MEM_FREE&quot;<br />            exit $ST_CR<br />        else<br />            echo &quot;OK - Used: $P_MEM_USED%, Free: $P_MEM_FREE% | &#039;mem_used&#039;=$P_MEM_USED;$lv_wr;$lv_cr &#039;mem_free&#039;=$P_MEM_FREE&quot;<br />            exit $ST_OK<br />        fi<br />    else<br />            echo &quot;OK - Used: $P_MEM_USED%, Free: $P_MEM_FREE% | &#039;mem_used&#039;=$P_MEM_USED &#039;mem_free&#039;=$P_MEM_FREE&quot;<br /><br />            exit $ST_OK<br />    fi<br />else<br />    echo &quot;Style (-s) must be either kb (kilobyte) or perc (for percent). kb is&quot;<br />    echo &quot;being used as the default behavior when you don&#039;t provide the -s option.&quot;<br />    echo &quot;&quot;<br />    echo &quot;For more information try -h or --help!&quot;<br />    exit $ST_UK<br />fi<br /></pre><br /><br />Modified from 1.0 version at <a href="http://www.matejunkie.com/memory-check-plugin-for-nagios/" target="_blank" >Matejunky</a>]]></description>
			<category>Misc</category>
			<guid isPermaLink="true">http://www.wizarth.com.au/index.php?entry=entry110730-083032</guid>
			<author>Peter Newman</author>
			<pubDate>Sat, 30 Jul 2011 08:30:32 GMT</pubDate>
			<comments>http://www.wizarth.com.au/comments.php?y=11&amp;m=07&amp;entry=entry110730-083032</comments>
		</item>
	</channel>
</rss>

