<?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>Windows CE Programming &#187; CodeProject</title>
	<atom:link href="http://www.hjgode.de/wp/tag/codeproject/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hjgode.de/wp</link>
	<description>Windows Mobile Development and usage</description>
	<lastBuildDate>Fri, 03 Feb 2012 08:53:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<!--CodeProjectFeeder channel--><category>CodeProject</category><generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>KeyToggleStart: Yet another usage for keyboard hook</title>
		<link>http://www.hjgode.de/wp/2011/09/08/keytogglestart-yet-another-usage-for-keyboard-hook/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=keytogglestart-yet-another-usage-for-keyboard-hook</link>
		<comments>http://www.hjgode.de/wp/2011/09/08/keytogglestart-yet-another-usage-for-keyboard-hook/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 10:56:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Keyboard]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[function keys]]></category>
		<category><![CDATA[hook]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[windows mobile]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=1204</guid>
		<description><![CDATA[Hello Windows Mobile Users recently the following was requested: How can I start an application by just hitting some keys in sequence? The answer: Just use a keyboard hook. So I started to code this hook tool based on my KeyToggleBoot2 code. There was not too much to change. The new tool is called KeyToggleStart [...]]]></description>
			<content:encoded><![CDATA[<p>Hello Windows Mobile Users</p>
<p>recently the following was requested:</p>
<p>How can I start an application by just hitting some keys in sequence?</p>
<p>The answer: Just use a keyboard hook.</p>
<p>So I started to code this hook tool based on my KeyToggleBoot2 code. There was not too much to change. The new tool is called KeyToggleStart and it is configured by the registry:</p>
<pre>            REGEDIT4

            [HKEY_LOCAL_MACHINE\Software\Intermec\KeyToggleStart]
            "ForbiddenKeys"=hex:\
                  72 73 00
            ;max 10 keys!
            "KeySeq"="123"
            "Timeout"=dword:00000003
            "LEDid"=dword:00000001
            "Exe"="\\Windows\\iexplore.exe"
            "Arg"=""</pre>
<h2>Reg keys meaning:</h2>
<p><strong>Forbiddenkeys</strong> is just an addon feature: key codes entered in this list will not be processed any more by your Windows Mobile device. For example, to disable the use of the F3(VK_TTALK) and F4 (VK_TEND) keys you have to enter a binary list of 0&#215;72,0&#215;73,0&#215;00 (the zero is needed to terminate the list).</p>
<p><strong>KeySeq</strong> list the char sequence you want to use to start an application. For example if this is the string &#8220;123&#8243;, everytime you enter 123 in sequence within the given time, the application defined will be started.</p>
<p><strong>TimeOut</strong> is the time in seconds you have to enter the sequence. So do not use a long key sequence as &#8220;starteiexplorenow&#8221; and a short timeout (except you are a very fast type writer). The timeout is started with the first char matching and ends after the time or when you enter a non-matching char of the sequence.</p>
<p>With <strong>LEDid</strong> you can specify a LED index number. LED&#8217;s on Windows Mobile are controlled by an index number, each LED has one or more ID assigned to it. So, with LEDid you can control, which LED will lit, when the matching process is running. You can even find an ID to control a vibration motor, if your Windows Mobile device is equipped with one.</p>
<p>The <strong>Exe</strong> registry string value is used to specify which application will be started when the key sequence is matched.</p>
<p>If the application you want have to be started needs some arguments, you can enter these using the <strong>Arg</strong> registry value.</p>
<p>When you start the KeyToggleStart tool, you will not see any window except for a notification symbol on your Start/Home screen of the device.</p>
<p><a href="http://www.hjgode.de/wp/2011/09/08/keytogglestart-yet-another-usage-for-keyboard-hook/keytogglestart/" rel="attachment wp-att-1205"><img class="alignnone size-medium wp-image-1205" title="KeyToggleStart" src="http://www.hjgode.de/wp/wp-content/uploads/2011/09/KeyToggleStart-225x300.png" alt="" width="225" height="300" /></a></p>
<p>If you tap this icon (redirection sign) you have the chance to end the hook tool.</p>
<p><span id="more-1204"></span>The code itself is nothing special. Only the sequence matching code is a little bit special. As the chars in the sequence do not match keystrokes in a ont-to-one manner, I have to check the shift state of the keyboard and if the current char of the seqeunce is a char needing a shift. For example: the asterisk char (&#8220;*&#8221;) is a combination of the &#8220;8&#8243; key plus the Shift key. So, if you have the &#8220;*&#8221; in the char sequence, the code has to check for the &#8220;8&#8243; key and if the keyboard is in shift state:</p>
<pre lang="cpp">// The command below tells the OS that this EXE has an export function so we can use the global hook without a DLL
__declspec(dllexport) LRESULT CALLBACK g_LLKeyboardHookCallback(
   int nCode,      // The hook code
   WPARAM wParam,  // The window message (WM_KEYUP, WM_KEYDOWN, etc.)
   LPARAM lParam   // A pointer to a struct with information about the pressed key
)
{
    /*    typedef struct {
        DWORD vkCode;
        DWORD scanCode;
        DWORD flags;
        DWORD time;
        ULONG_PTR dwExtraInfo;
    } KBDLLHOOKSTRUCT, *PKBDLLHOOKSTRUCT;*/

    // Get out of hooks ASAP; no modal dialogs or CPU-intensive processes!
    // UI code really should be elsewhere, but this is just a test/prototype app
    // In my limited testing, HC_ACTION is the only value nCode is ever set to in CE
    static int iActOn = HC_ACTION;
    static bool isShifted=false;

#ifdef DEBUG
    static TCHAR str[MAX_PATH];
#endif

    PKBDLLHOOKSTRUCT pkbhData = (PKBDLLHOOKSTRUCT)lParam;
    //DWORD vKey;
    if (nCode == iActOn)
    {
        //only process unflagged keys
        if (pkbhData-&gt;flags != 0x00)
            return CallNextHookEx(g_hInstalledLLKBDhook, nCode, wParam, lParam);
        //check vkCode against forbidden key list
        if(pForbiddenKeyList!=NULL)
        {
            BOOL bForbidden=false;
            int j=0;
            do{
                if(pForbiddenKeyList[j]==(BYTE)pkbhData-&gt;vkCode)
                {
                    bForbidden=true;
                    DEBUGMSG(1, (L"suppressing forbidden key: 0x%0x\n",pkbhData-&gt;vkCode));
                    continue;
                }
                j++;
            }while(!bForbidden &amp;&amp; pForbiddenKeyList[j]!=0x00);
            if(bForbidden){
                return true;
            }
        }

        SHORT sShifted = GetAsyncKeyState(VK_SHIFT);
        if((sShifted &amp; 0x800) == 0x800)
            isShifted = true;
        else
            isShifted = false;

        //check and toggle for Shft Key
        //do not process shift key
        if (pkbhData-&gt;vkCode == VK_SHIFT){
            DEBUGMSG(1, (L"Ignoring VK_SHIFT\n"));
            return CallNextHookEx(g_hInstalledLLKBDhook, nCode, wParam, lParam);
        }

        //################################################################
        //check if the actual key is a match key including the shift state
        if ((byte)pkbhData-&gt;vkCode == (byte)szVKeySeq[iMatched]){
            DEBUGMSG(1 , (L"==== char match\n"));
            if (bCharShiftSeq[iMatched] == isShifted){
                DEBUGMSG(1 , (L"==== shift match\n"));
            }
            else{
                DEBUGMSG(1 , (L"==== shift not match\n"));
            }
        }

        if( wParam == WM_KEYUP ){
            DEBUGMSG(1, (L"---&gt; szVKeySeq[iMatched] = 0x%02x\n", (byte)szVKeySeq[iMatched]));

            if ( ((byte)pkbhData-&gt;vkCode == (byte)szVKeySeq[iMatched]) &amp;&amp; (isShifted == bCharShiftSeq[iMatched]) ) {

                //the first match?
                if(iMatched==0){
                    //start the timer and lit the LED
                    LedOn(LEDid,1);
                    tID=SetTimer(NULL, 0, matchTimeout, (TIMERPROC)Timer2Proc);
                }
                iMatched++;

                DEBUGMSG(1, (L"iMatched is now=%i\n", iMatched));
                //are all keys matched
                if (iMatched == iKeyCount){
                    //show modeless dialog
                    DEBUGMSG(1, (L"FULL MATCH, starting ...\n"));
                    PostMessage(g_hWnd, WM_SHOWMYDIALOG, 0, 0);
                    //reset match pos and stop timer
                    DEBUGMSG(1, (L"FULL MATCH: Reset matching\n"));
                    LedOn(LEDid,0);
                    iMatched=0; //reset match pos
                    KillTimer(NULL, tID);
                    //return CallNextHookEx(g_hInstalledLLKBDhook, nCode, wParam, lParam);
                }
                //return -1; //do not forward key?
            }
            else
            {
                KillTimer(NULL, tID);
                LedOn(LEDid,0);
                iMatched=0; //reset match pos
                DEBUGMSG(1, (L"FULL MATCH missed. Reseting matching\n"));
            }
        } //if wParam == WM_KEY..
    }
    return CallNextHookEx(g_hInstalledLLKBDhook, nCode, wParam, lParam);
}</pre>
<p>Enjoy the code</p>
<p>Download VS2008 Source code for Windows Mobile 6.5.3 SDK<br />
<b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=143" title="Downloaded 92 times">KeyToggleStart</a> -  (Hits: 92, size: 30.06 kB)</p>
<p>Download KeyToggleStart executable (Windows Mobile 6)<br />
<b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=144" title="Downloaded 78 times">KeyToggleStart WM6 Executable</a> -  (Hits: 78, size: 12.38 kB)</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F08%2Fkeytogglestart-yet-another-usage-for-keyboard-hook%2F&amp;title=KeyToggleStart%3A+Yet+another+usage+for+keyboard+hook" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F08%2Fkeytogglestart-yet-another-usage-for-keyboard-hook%2F&amp;title=KeyToggleStart%3A+Yet+another+usage+for+keyboard+hook" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F08%2Fkeytogglestart-yet-another-usage-for-keyboard-hook%2F&amp;title=KeyToggleStart%3A+Yet+another+usage+for+keyboard+hook" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F08%2Fkeytogglestart-yet-another-usage-for-keyboard-hook%2F&amp;T=KeyToggleStart%3A+Yet+another+usage+for+keyboard+hook" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F08%2Fkeytogglestart-yet-another-usage-for-keyboard-hook%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F08%2Fkeytogglestart-yet-another-usage-for-keyboard-hook%2F&amp;t=KeyToggleStart%3A+Yet+another+usage+for+keyboard+hook" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2011/09/08/keytogglestart-yet-another-usage-for-keyboard-hook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress CodeprojectFeeder Plugin updated</title>
		<link>http://www.hjgode.de/wp/2011/09/03/worpress-codeprojectfeeder-plugin-updated/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=worpress-codeprojectfeeder-plugin-updated</link>
		<comments>http://www.hjgode.de/wp/2011/09/03/worpress-codeprojectfeeder-plugin-updated/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 06:03:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[codeprojectfeeder]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=1180</guid>
		<description><![CDATA[Hi I just updated my CodeProjectFeeder WordPress plugin. I did the code change requested by WebBiscuit at the Technical Blog mirror at CodeProject have fun josef Bookmark It]]></description>
			<content:encoded><![CDATA[<p>Hi</p>
<p>I just updated my <a title="CodeProjectFeeder plugin 1.11 released" href="http://www.hjgode.de/wp/2010/03/01/wordpress-plugin-to-feed-codeproject-technical-blogs/" target="_blank">CodeProjectFeeder WordPress plugin</a>.</p>
<p>I did the code change requested by WebBiscuit at the Technical Blog mirror at <a title="CodeprojectFeeder WordPress Plugin Technical Blog" href="http://www.codeproject.com/Articles/62235/Wordpress-Plugin-to-feed-CodeProject-Technical-Blo" target="_blank">CodeProject </a></p>
<p>have fun</p>
<p>josef</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F03%2Fworpress-codeprojectfeeder-plugin-updated%2F&amp;title=WordPress+CodeprojectFeeder+Plugin+updated" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F03%2Fworpress-codeprojectfeeder-plugin-updated%2F&amp;title=WordPress+CodeprojectFeeder+Plugin+updated" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F03%2Fworpress-codeprojectfeeder-plugin-updated%2F&amp;title=WordPress+CodeprojectFeeder+Plugin+updated" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F03%2Fworpress-codeprojectfeeder-plugin-updated%2F&amp;T=WordPress+CodeprojectFeeder+Plugin+updated" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F03%2Fworpress-codeprojectfeeder-plugin-updated%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F09%2F03%2Fworpress-codeprojectfeeder-plugin-updated%2F&amp;t=WordPress+CodeprojectFeeder+Plugin+updated" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2011/09/03/worpress-codeprojectfeeder-plugin-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mobile Development &#8211; Shake that thing</title>
		<link>http://www.hjgode.de/wp/2011/02/13/mobile-development-shake-that-thing/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mobile-development-shake-that-thing</link>
		<comments>http://www.hjgode.de/wp/2011/02/13/mobile-development-shake-that-thing/#comments</comments>
		<pubDate>Sun, 13 Feb 2011 15:52:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Int*rm*c]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[accelerometer]]></category>
		<category><![CDATA[Background Thread]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[DotNet]]></category>
		<category><![CDATA[g-sensor]]></category>
		<category><![CDATA[Intermec]]></category>
		<category><![CDATA[sensors]]></category>
		<category><![CDATA[Smart Device]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=921</guid>
		<description><![CDATA[Talking with G-sensors and vector algebra. Shake and Orientation detection.]]></description>
			<content:encoded><![CDATA[<p>Hello Readers</p>
<p>it has been a long time since my last post, I was a little bit busy.</p>
<p>This time I want to present some <strong><em>experimental</em></strong> code to visualize and analyze G-Sensor data. The goal was to achieve a shake detection algorithm. Unfortunately the device under test only provided 1 sample per second and that is not enough for a good shake detection. Beside that the code and classes developed may help you to find your way and they help you at last to determine the current orientation of the device.</p>
<p>left shows general information taken from vector, right shows a log with last vector data<br />
 <a rel="attachment wp-att-922" href="http://www.hjgode.de/wp/2011/02/13/mobile-development-shake-that-thing/sensorscan5_0102/"><img class="alignnone size-medium wp-image-922" title="SensorScan5_0102" src="http://www.hjgode.de/wp/wp-content/uploads/2011/02/SensorScan5_0102-300x199.gif" alt="" width="300" height="199" /></a><br />
 [image SensorScan5_0102.gif]</p>
<p><a rel="attachment wp-att-924" href="http://www.hjgode.de/wp/2011/02/13/mobile-development-shake-that-thing/sensorscan5_0304/"><img class="alignnone size-medium wp-image-924" title="SensorScan5_0304" src="http://www.hjgode.de/wp/wp-content/uploads/2011/02/SensorScan5_0304-300x199.gif" alt="" width="300" height="199" /></a><br />
 [image SensorScan5_0304.gif]<br />
 left shows graphical of vector and force (length), right shows indicators for detected events</p>
<p>A g-sensor or accelerometer sensor normally gives you the x, y and z-values of a vector. A vector is an imaginary arrow with a direction and length starting from the three dimensional point 0,0,0. The vector direction points to the acceleration of the device. The normal acceleration on earth is 9,81m/s^2. If the device is on the desk, the y-acceleration is about minus 9.81m/s^2. The absolute value of the sensor may vary on the sensor and maybe defined as 1.0 for -9.81m/s^2 or -0.981. If you through the device up to the air, the x,y and z-values will reach 0,0,0 as if the device is weightless. Keep in mind that the acceleration towards the middle of the earth is always there and the device will come back to you.</p>
<p>Here is another visualization of the vector and a device (done with visual python, <b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=130" title="Downloaded 173 times">vectors.py</a> -  (Hits: 173, size: 570 bytes)):</p>
<p><a rel="attachment wp-att-925" href="http://www.hjgode.de/wp/2011/02/13/mobile-development-shake-that-thing/vectors/"><img class="alignnone size-medium wp-image-925" title="vectors" src="http://www.hjgode.de/wp/wp-content/uploads/2011/02/vectors-286x300.gif" alt="" width="286" height="300" /></a><br />
 [image vectors.gif]</p>
<p>The device is facing upwards (see y arrow) with the top facing to you (the z arrow). The left side of the device is pointing to the right (the x arrow).</p>
<p>The light green/blue and the yellow arrows demonstrate two different vectors which show the direction (the xyz angles) and the force (the vector lengths) to the device.</p>
<p><span id="more-921"></span>and here is an image about how the vector and the device is aligned:</p>
<pre>#region CN50 XYZ vectors
/*
              (N)
              +Y
               |           -Z
               |          /
               |         /
               |       .'
         +-----------+/
         | +-------+ |
         | |       | |
         | |       | |
         | |       | |
(E)''''''| |  /    | |''''''  (W)
+X       | |.'     | |     -X
         | /-------+ |
         |/          |
        .'           |
       / +-----------+
     .'        |
    /          |
  +Z           |
              -Y
              (S)

    //calc the acceleration or the longest vector
    double accel = Math.Sqrt(x * x + y * y + z * z);
    //calc the X angle, should be about 180 if device is upright
    double degrees = Math.Acos(x / b) * 360.0 / Math.PI;

 * when device is faceup on table:          x=0     y=0     z=1
 * when device is faceup on table:          x=0     y=0     z=-1
 * when device is upright scan to roof:     x=0     y=-1    z=0
 * when device is upright scanner to down:  x=0     y=1     z=0
 * when scanner lays on left side:          x=-1    y=0     z=0
 * when scanner lays on right side:         x=1     y=0     z=0
*/
</pre>
<p>The development device was an Int*rm*c CN50. To be able to get the sensor data into a .NET app, first install the sensor wrapper DLLs (sensor.cab) of the Int*rm*c Device Resource Kit. For other devices you just have to change the code that is used to register for sensor data changes.</p>
<pre lang="csharp">		mySensor.AccelerationEvent += new AccelerationEventHandler(mySensor_AccelerationEvent);
...
        void mySensor_AccelerationEvent(object sender, Sensor.AccelerationArgs AccelerationArgs)
        {
            ShakeDetection.GVector gv = new ShakeDetection.GVector(AccelerationArgs.GForceX,
                AccelerationArgs.GForceY,
                AccelerationArgs.GForceZ);

            processData(gv);
        }
</pre>
<p>The class GVector implements some analysis on the vector data. The vector data is built of three acceleration values, the X, Y, and Z part of the acceleration. If the device is layed on a desk, the Z vector is about -9.81 m/s and the X and Y vector will be at 0.0 m/s. If you move the device or turn it, the xyz values will change and you can calculate an orientation and if you collect and evaluate the data over time, you can get the acceleration of the device. If it is falling, the xyz values will all be zero.</p>
<p>The processData() call updates the GUI and feeds the vector data to the shake and movement detection classes:</p>
<pre lang="csharp" escaped="true">        private void processData(ShakeDetection.GVector gv)
        {
            if (starting)
                return;
            labelGFX.Text = gv.X.ToString("0.00000");
            labelGFY.Text = gv.Y.ToString("0.00000");
            labelGFZ.Text = gv.Z.ToString("0.00000");

            lblOrientation.Text = gv.ToScreenOrientation().ToString();
            lblDirection.Text = gv.direction.ToString();

            lblTilt.Text = gv.Tilt.ToString("0");
            lblRoll.Text = gv.Roll.ToString("0");
            lblPitch.Text = gv.Pitch.ToString("0");

            lblAcceleration.Text = gv.Length.ToString("0.0");

            addLog(gv.ToString());

            shaker1.addValues(gv);

            shaker2.addValues(gv);
...
</pre>
<p>The movement classes use an extended version of the GVector class called GMVector. The movement classes are implemented with the basic GMVector interface:</p>
<pre lang="csharp" escaped="true">namespace Movedetection
{
        public struct GMVector
        {
            public GMVector(double x, double y, double z)
            {
                myX = x;
                myY = y;
                myZ = z;
                myTicks = (ulong)(DateTime.Now.Ticks / 10000); //there are 10000 ticks in a millisecond
                // http://msdn.microsoft.com/en-us/library/system.datetime.ticks.aspx

                myDirection = GetDirection(myX, myY, myZ);
                myScreenOrientation = GetScreenorientation(myX, myY, myZ);
                moveState = MoveState.idle;
            }
...
</pre>
<p>The idea was to implement a movement analysis and compare the movement of the device with a given pattern. For example if the last movement sequence matches the given pattern UP-LEFT-DOWN an event will be generated. BUT this is not yet implemented!</p>
<p>The shake and movement classes are all derived from a base class that defines a common interface:</p>
<pre lang="csharp" escaped="true">using System;

namespace ShakeDetection
{
	public interface IShake
	{
        		void OnShakeDetected(GVector gv);
		void addValues(GVector gv);
	}

}
</pre>
<p>Inside the derived classes the vector data is processed and the shake or movement &#8216;calculation&#8217; is implemented. All shake classes are derived from a basic class called &#8220;ShakeClass&#8221; (or &#8220;Movement&#8221; class):</p>
<pre lang="csharp" escaped="true">namespace ShakeDetection
{
    ///

    /// Main abstract class to implement various Shake detector classes
    /// 

	public abstract class ShakeClass:IShake,IDisposable
    {
        #region Properties
        private string _name = "ShakeClass";
        ///
<summary>
        /// used to identify multiple classes that inherited this class
        /// 

		public string name{
            get{return _name;}
            set { _name = value; }
        }
...
</pre>
<p>One analysis done by GVector class itself is the segmented direction, which shows in which direction the top of the device is pointing expressed in compass like directions.</p>
<pre lang="csharp" escaped="true">		#region segmented direction
			// http://en.wikipedia.org/wiki/Boxing_the_compass" href="http://en.wikipedia.org/wiki/Boxing_the_compass"
            //attention: this here is based on +Y/+X (-1/0) equal 0 degree equal North
			public enum Direction:int{
                None=-1,
			W=0,
				WSW,
				SW,
				SSW,
			S,
				SSE,
				SE,
				ESE,
			E,
				ENE,
				NE,
				NNE,
			N,
				NNW,
				NW,
				WNW,
			}
            public Direction direction
            { // http://stackoverflow.com/questions/1437790/how-to-snap-a-directional-2d-vector-to-a-compass-n-ne-e-se-s-sw-w-nw
				get{
					GVector gv=this;
					int segmentCount=16;
					int compassSegment = (((int) Math.Round(Math.Atan2(gv.Y, gv.X) / (2 * Math.PI / segmentCount))) + segmentCount) % segmentCount;
                    return (Direction)compassSegment;
				}
			}
		#endregion
</pre>
<p>Another simply analysis gives you the orientation of the device, that means where the display is facing to.</p>
<pre lang="csharp" escaped="true">            //changed to match CN50 XYZ directions
            public ScreenOrientation ToScreenOrientation()
            {
                if (Math.Abs(X) > Math.Abs(Y))
                {
                    if (Math.Abs(X) > Math.Abs(Z))
                    {
                        if (X > 0)
                            return ScreenOrientation.ReverseLandscape;     //changed from Landscape
                        return ScreenOrientation.Landscape;                //changed from ReverseLandscape
                    }
                }
                else if (Math.Abs(Y) > Math.Abs(Z))
                {
                    if (Y > 0)
                        return ScreenOrientation.ReversePortrait;       //changed from Portrait
                    return ScreenOrientation.Portrait;                  // changed from ReversePortrait
                }

                if (Z > 0)
                    return ScreenOrientation.FaceUp;    //this is different to HTC
                return ScreenOrientation.FaceDown;      //this is different to HTC
            }
        }
</pre>
<p>When you take a look at the vectors when you move the device slow and fast, you will see the xyz values changing and if you add the absolute length over the time, you will get a cumulated &#8216;force&#8217;.</p>
<p><a rel="attachment wp-att-923" href="http://www.hjgode.de/wp/2011/02/13/mobile-development-shake-that-thing/vectors-analysis/"><img class="alignnone size-medium wp-image-923" title="vectors-analysis" src="http://www.hjgode.de/wp/wp-content/uploads/2011/02/vectors-analysis-300x170.gif" alt="" width="300" height="170" /></a><br />
 [image vectors-analysis.gif]<br />
 the upper graphics shows the x,y,z values of the sensor and the lower graphic shows the accumulated force over the time</p>
<p>The shaker classes implement different &#8216;shake&#8217; detection algorithms. The simplest one is to add current force value to a cache and compare the average values with a defined threshold, see ShakeClass1.cs:</p>
<pre lang="csharp" escaped="true">...
        ///
        /// this function uses every direction for its own shake detection
        /// 

        public override void addValues(GVector gv){
            //code is from android where 9.8m/s^² is normal
            //cn50 gives 0.98m/s^² so we multiply the CN50 values with 10
            gv = gv.Scale(10);

            addToSensorCache(_X_Cache, gv.X);
            addToSensorCache(_Y_Cache, gv.Y);
            addToSensorCache(_Z_Cache, gv.Z);

            this.Logger(gv.ToString());
            if(isShaking(_X_Cache, gv.X) ||
                isShaking(_Y_Cache, gv.Y) ||
                isShaking(_Z_Cache, gv.Z) )
            {
                this.OnShakeDetected(gv);
            }
        }
...
        private bool isShaking(Queue cache, double currentValue)
        {
            double average = 0;
            foreach (double d in cache)
            {
                average += d;
            }
            average = average / cache.Count;
            this.Logger(String.Format("ShakeClass1: isShaking: average: {0} current: {1} treshold:{2} diff:{3}", average, currentValue, _shakeTreshold, Math.Abs(average - currentValue)));
            return Math.Abs(average - Math.Abs(currentValue)) > _shakeTreshold;
        }
...
</pre>
<p>The most extended algorithm is inside Movement1.cs (see also <a href="http://www.google.co.uk/url?sa=t&amp;source=web&amp;cd=6&amp;ved=0CDwQFjAF&amp;url=http%3A%2F%2Fciteseerx.ist.psu.edu%2Fviewdoc%2Fdownload%3Fdoi%3D10.1.1.120.296%26rep%3Drep1%26type%3Dpdf&amp;ei=wTMHTf_NL8e3hQf-oZXtBw&amp;usg=AFQjCNGgZnlYRvBzKg4uJRveSwVHhxIa-g&amp;sig2=URThwmeDoZF2JdCMj2Babg" target="_blank">Accelerometer_WBSN.pdf</a>):</p>
<pre lang="csharp" escaped="true">using System;
using System.Collections.Generic;
using System.Text;

namespace Movedetection
{
    /// challenge: recognize a gesture pattern
    /// Detect movement (Accelerometer_WBSN.pdf)
    /// 1. calc the actual acceleration: Length=sqrt(x*x+y*y+z*z)
    /// 2. get the diff to the previous DeltaAcceleration: LengthNow - LengthPrevious
    /// 3. get the average of deltas for about 1 sec (should be 20 measurements): SUM(DeltaAccelerations)/sps; //sps=samples per second
    /// 

    class MovementClass1:MovementClass
    {

        public MovementClass1(string s)
        {
            base.name = s;
            this.setTreshold(.2d, 0.5d);
            myQueue = new LimitedQueue(_queueLength);

            myAverages = new LimitedQueue(_queueLength);

            //need at least 3 seconds recording size, but only record crossing values
            myCrossUPs = new LimitedQueue(_queueLength);
            myCrossDOWNs = new LimitedQueue(_queueLength);

            myGmin = 0.2d; //was 0.9d but we get a deltaAverage of about around 0.14
            myTmin = 10; // 15 is equal to 0.75 seconds if samples per seconds is 20

            _treshCountRMS = 2000;  //should be 3000 for 60 samples in 3 seconds at 20 samples/second,
                                 //BUT we only see ~2 samples per second

            basicLogger("Movement1 Class\r\nx\ty\tz\ttick\tdeltaG");
        }

        public override void setTreshold(double high, double low)
        {
            myGmin = high;
            myRMSmin = low;
        }

        public override void addValues(GMVector gv)
        {
            GMVector gvOld;
            if (myQueue.Count>0)// !_firstCall)
            {
                //_samplesPerSecond=
                //calc samples per second
                if (!_samplesPerSecondsCalulated)
                {
                    if (myQueue.Count > 10)
                    {
                        GMVector[] myQueueArray = myQueue.ToArray();
                        ulong iSamplesCount = 0;
                        ulong iTickSum = 0;
                        ulong tickDiff = 0;
                        for (int c = myQueueArray.Length - 1; c > 1; c--)
                        {
                            iSamplesCount++;
                            tickDiff = myQueueArray[c].Ticks - myQueueArray[c - 1].Ticks;
                            iTickSum += tickDiff;
                        }
                        _samplesPerSecond = (uint)(1000 / (iTickSum / iSamplesCount)); // number of samples per second, ticks stored as milliseconds
                        _samplesPerSecondsCalulated = true;
                    }
                }
                //get and store delta
                gvOld = myQueue.Peek();
                //calculate deltaG for current and last sample
                double deltaG = Math.Abs(gv.Length-gvOld.Length);

                //save for later use
                gRMSAverage currentRMS=new gRMSAverage(deltaG, gv.Ticks);
                myAverages.Enqueue(currentRMS);

                basicLogger(string.Format("{0}\t{1}\t{2}\t{3}\t{4}",
                    gv.X, gv.Y, gv.Z,
                    gv.Ticks,
                    deltaG));

                /* Theory:
                 * RSD: Rapid Shake Detection
                 * acceleration change is the sum of the delta G between consecutive samples divided
                 * by the number of samples per second
                 * Drastic Movement
                 *  average acceleration change exceeds about 0.9G per sample (50ms period)
                 *  calculated over the last .75 seconds
                 * Sustained Movement
                 *  more fequently exceed an acceleration of about 0.5G (0.5G acceleration change per sample)
                 *  exceed 0.5G value within time frame for non-consecutive samples (cross counter)
                 *  time frame is set to reset after 60 non-consecutive (about 3 seconds at 50ms per sample) samples below 0.5G
                */

                //test for condition1
                bool bCondition1=false;
                if (myAverages.Count > 1)
                {
                    bCondition1 = condition1(currentRMS);
                }

                //test for condition2
                bool bCondition2=false;
                if (myAverages.Count > 1)
                {
                    gRMSAverage lastRMS = myAverages.Peek();
                    bCondition2 = condition2(currentRMS, lastRMS);
                }

                //===============================================================================================
                //start when queue is filled
                if (myQueue.Count >= 20)
                {
                    //rapid shake detection (RSD)
                    //Condition1: have at least an average of 0.9G for at least .75 second
                    if(bCondition1 &amp; bCondition2)
                        OnMoveDetected(gv);
                }//start with filled queue
            }
            //else
            //    _firstCall = false;

            myQueue.Enqueue(gv);

            gvOld = gv;
        }

        /* Theory:
         * RSD: Rapid Shake Detection
         * acceleration change is the sum of the delta G between consecutive samples divided
         * by the number of samples per second
         * Drastic Movement (condition1)
         *  average acceleration change exceeds about 0.9G per sample (50ms period)
         *  calculated over the last .75 seconds
         */
        /// deltaG above 0.9G for at least .75 seconds
        ///
        private bool condition1(gRMSAverage currentRMS)
        {
            if (!_samplesPerSecondsCalulated)
                return false;

            bool bRet1 = false;
            //get average of values of last .75 seconds, tick diff is about 10ms between samples
            double sum = 0;
            int iSamples = 0;

            foreach (gRMSAverage gRMS in myAverages)
            {
                if (currentRMS.tick - gRMS.tick < 75 * 1000) //the ticks saved are milliseconds, .75seconds=75000 milliseconds
                {
                    sum += gRMS.deltaG;
                    iSamples++;
                }
            }
            //sum of deltas divided by samples per second
            double DeltaAverage = sum / _samplesPerSecond;// (iSamples * 4 / 3);

            Avg_deltaG_rms = DeltaAverage;

            //call back for information, the caller reads _Avg_deltaG_rms
            OnIdleDetected(new GMVector(0, 0, 0));

            //how many samples exceed the Gmin treshold
            int iCountG = 0;
            foreach (GMVector g in myQueue)
            {
                if (g.Length > DeltaAverage)
                    iCountG++;
            }
            //Condition1: have at least an average of 0.9G for at least .75 second
            if (DeltaAverage > myGmin){
                if (iCountG > myTmin)
                {
                    //delete all entries, RESET
                    myQueue.Clear();
                    //_firstCall = true;

                    //OnMoveDetected(gv);
                    bRet1 = true;
                }
            }
            return bRet1;
        }

        /// deltaG above .5G for more than 3 seconds and
        /// without deltaG below .5G within last 3 seconds
        private bool condition2(gRMSAverage currentRMS, gRMSAverage lastRMS){

            if (!_samplesPerSecondsCalulated)
                return false;

            bool bRet = false;
            crossDirection crossDir = crossDirection.unknown;
            if (currentRMS.deltaG > myRMSmin &amp;&amp; lastRMS.deltaG < myRMSmin)
            {
                //crossUp
                crossDir = crossDirection.crossUP;
            }
            else if (currentRMS.deltaG < myRMSmin &amp;&amp; lastRMS.deltaG > myRMSmin)
            {
                //crossDown
                crossDir = crossDirection.crossDown;
            }

            if (myCrossDOWNs.Count > 0)
            {
                gRMSAverage lastRMSup = myCrossDOWNs.Peek();
                if (crossDir == crossDirection.crossUP &amp;&amp; (currentRMS.tick - lastRMSup.tick) >= _treshCountRMS)
                {
                    if (myCrossUPs.Count > 0)
                    {
                        gRMSAverage lastRMSdown = myCrossDOWNs.Peek();
                        if ((currentRMS.tick - lastRMSdown.tick) > _treshCountRMS)
                            bRet = true;
                    }
                }
            }
            //enqueue current values
            if (crossDir == crossDirection.crossUP)
                myCrossUPs.Enqueue(currentRMS);
            if (crossDir == crossDirection.crossDown)
                myCrossDOWNs.Enqueue(currentRMS);
            return bRet;
        }
#region fields
        private uint _samplesPerSecond = 20;
        private bool _samplesPerSecondsCalulated = false;

        private enum crossDirection : int
        {
            unknown = 0,
            crossUP = 1,
            crossDown = -1,
        }

        private class gRMSAverage
        {
            private double _deltaG;
            public double deltaG
            {
                get { return _deltaG; }
            }
            private ulong _tick;
            public ulong tick
            {
                get { return _tick; }
            }
            public gRMSAverage(double delta, ulong tick)
            {
                _deltaG = delta;
                _tick = tick;
            }
        }

        /// store a list of acceleration data
        ///
        private LimitedQueue myQueue;

        ///
        /// store a list of relevant delta acceleration data and ticks
        ///
        private LimitedQueue myAverages;

        ///
        /// queue to record deltaG averages crossing from deltaG from <.5G to >.5G
        ///
        private LimitedQueue myCrossUPs;

        ///
        /// queue to record deltaG averages crossing from deltaG from >.5G to <.5G
        ///
        private LimitedQueue myCrossDOWNs;

        private int _queueLength = 20; //20 samples per second will be great
        ///
        /// how long should the 0.5 treshold be met
        /// 

        private uint _treshCountRMS = 3000; //should be normally 3 seconds
        public uint treshCountRMS
        {
            get { return _treshCountRMS; }
        }

        ///
        /// minimum G to exceed for shake detection
        ///
        private double myGmin=0.9;
        public double _Gmin
        {
            set { myGmin = value; }
        }

        ///
        /// minimum G to exceed for sustained movement detection
        /// 

        private double myRMSmin = 0.5;
        public double _RMSmin
        {
            get { return myRMSmin; }
            set { myRMSmin = value; }
        }

        private double myTmin;
        public double _Tmin
        {
            set { myTmin = value; }
        }

        private double Avg_deltaG_rms;
        public double _Avg_deltaG_rms
        {
            get { return Avg_deltaG_rms; }
        }
#endregion
        public static void basicLogger(string s)
        {
            string sFileName = @"\basicxyz.log.txt";
            System.IO.TextWriter tw = new System.IO.StreamWriter(sFileName, true);
            //tw.WriteLine(X.ToString() + "," + Y.ToString() + "," + Z.ToString() + "," + AngleX.ToString() + "," + AngleY.ToString());
            tw.WriteLine(s);
            tw.Flush();
            tw.Close();
        }

    }
}
</pre>
<p>So, now you can start to play with the code. I tried to include the sources of the shake detection "ideas" if you would like to see the original code or the information the code is based on.</p>
<b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=129" title="Downloaded 237 times">SnesorScan5 VS2005 SmartDevice Source Code</a> -  (Hits: 237, size: 97.24 kB)
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 5497px; width: 1px; height: 1px; overflow: hidden;">
<pre lang="csharp">Accelerometer_WBSN.pdf</pre>
</div>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F02%2F13%2Fmobile-development-shake-that-thing%2F&amp;title=Mobile+Development+%26%238211%3B+Shake+that+thing" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F02%2F13%2Fmobile-development-shake-that-thing%2F&amp;title=Mobile+Development+%26%238211%3B+Shake+that+thing" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F02%2F13%2Fmobile-development-shake-that-thing%2F&amp;title=Mobile+Development+%26%238211%3B+Shake+that+thing" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F02%2F13%2Fmobile-development-shake-that-thing%2F&amp;T=Mobile+Development+%26%238211%3B+Shake+that+thing" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F02%2F13%2Fmobile-development-shake-that-thing%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2011%2F02%2F13%2Fmobile-development-shake-that-thing%2F&amp;t=Mobile+Development+%26%238211%3B+Shake+that+thing" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2011/02/13/mobile-development-shake-that-thing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BarcodeLib &#8211; ported to Compact Framework</title>
		<link>http://www.hjgode.de/wp/2010/04/27/barcodelib-ported-to-compact-framework/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=barcodelib-ported-to-compact-framework</link>
		<comments>http://www.hjgode.de/wp/2010/04/27/barcodelib-ported-to-compact-framework/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 08:31:32 +0000</pubDate>
		<dc:creator>josef</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[barcode]]></category>
		<category><![CDATA[encode]]></category>
		<category><![CDATA[imaging]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[windows mobile]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=516</guid>
		<description><![CDATA[CodeProject: Barcode Image Generation Library ported to Compact Framework]]></description>
			<content:encoded><![CDATA[<p>I got a request for a barcode image generator for Windows Mobile. Fortunately there are some libs out there including source code and a decided to test to port barcodelib by Brad Barnhill hosted at the famous CodeProject site (http://www.codeproject.com/KB/graphics/BarcodeLibrary.aspx).</p>
<p><a rel="attachment wp-att-517" href="http://www.hjgode.de/wp/2010/04/27/barcodelib-ported-to-compact-framework/barcodelib/"><img class="alignnone size-full wp-image-517" title="barcodelib" src="http://www.hjgode.de/wp/wp-content/uploads/2010/04/barcodelib.gif" alt="" width="240" height="320" /></a></p>
<p><span id="more-516"></span></p>
<p><strong>How was it done</strong></p>
<p>I downloaded the code, started a new SmartDevice Class Library project in VS2005 and copied the source files into the project dir and started add the existing code files. I did not start with the original project files, as they were created with VS2008 and uses full framework in version 3.5.</p>
<p>After some builds, code changes, adding conditional compiles and one cfhelper class, the class compiled fine for Compact Framework 2. I had to remove (conditional compile options) most of the BarcodeXML stuff, as these are not? portable that easy to CF2.</p>
<pre>                            using (Pen pen = new Pen(ForeColor, iBarWidth))
                            {
#if !WindowsCE
                                pen.Alignment = PenAlignment.Right;
#endif
                                while (pos &lt; Encoded_Value.Length)
                                {
                                    if (Encoded_Value[pos] == '1')
#if !WindowsCE
                                        g.DrawLine(pen, new Point(pos * iBarWidth + shiftAdjustment, 0), new Point(pos * iBarWidth + shiftAdjustment, Height));
#else
                                        cfHelper.myDrawLine(g, pen, new Point(pos * iBarWidth + shiftAdjustment, 0), new Point(pos * iBarWidth + shiftAdjustment, Height));
#endif
</pre>
<p>and here is my helper:</p>
<pre language="csharp">using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace BarcodeLib
{
    static class cfHelper
    {
        public static void myDrawLine(Graphics g, Pen p, Point p1, Point p2)
        {
            g.DrawLine(p, p1.X, p1.Y, p2.X, p2.Y);
        }
    }
}</pre>
<p>Then I added a BarcodeLibTest smart device Windows Application project using the new BarcodeLib and was able to get barcodes printed on screen and save the images to files.</p>
<p>Download Source: <b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=91" title="Downloaded 921 times">BarcodeLibCF2</a> -  (Hits: 921, size: 304.48 KB)</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2010%2F04%2F27%2Fbarcodelib-ported-to-compact-framework%2F&amp;title=BarcodeLib+%26%238211%3B+ported+to+Compact+Framework" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2010%2F04%2F27%2Fbarcodelib-ported-to-compact-framework%2F&amp;title=BarcodeLib+%26%238211%3B+ported+to+Compact+Framework" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2010%2F04%2F27%2Fbarcodelib-ported-to-compact-framework%2F&amp;title=BarcodeLib+%26%238211%3B+ported+to+Compact+Framework" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2010%2F04%2F27%2Fbarcodelib-ported-to-compact-framework%2F&amp;T=BarcodeLib+%26%238211%3B+ported+to+Compact+Framework" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2010%2F04%2F27%2Fbarcodelib-ported-to-compact-framework%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2010%2F04%2F27%2Fbarcodelib-ported-to-compact-framework%2F&amp;t=BarcodeLib+%26%238211%3B+ported+to+Compact+Framework" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2010/04/27/barcodelib-ported-to-compact-framework/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress Plugin to feed CodeProject Technical Blogs</title>
		<link>http://www.hjgode.de/wp/2010/03/01/wordpress-plugin-to-feed-codeproject-technical-blogs/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-plugin-to-feed-codeproject-technical-blogs</link>
		<comments>http://www.hjgode.de/wp/2010/03/01/wordpress-plugin-to-feed-codeproject-technical-blogs/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 14:01:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[CodeProject Technical Blogs]]></category>
		<category><![CDATA[codeprojectfeeder]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.hjgode.de/wp/?p=366</guid>
		<description><![CDATA[A WordPress plugin for CodeProject Technical Blogs feeding.]]></description>
			<content:encoded><![CDATA[<h1><strong>CodeProjectFeeder</strong></h1>
<p>Update 3. sept. 2011:<br />
Fixed a bug according to WeBiscuit&#8217;s post at the <a title="Codeproject CodeprojectFeederPlugin" href="http://www.codeproject.com/Articles/62235/Wordpress-Plugin-to-feed-CodeProject-Technical-Blo" target="_blank">CodeProject Technical Blog Article</a>. See download of version 1.11.</p>
<p>In the beginning, <a href="http://www.codeproject.com/Messages/3326349/Re-Any-HowTo-for-Add-your-technical-blog-from-Word.aspx" target="_blank">everything was done manually</a>.</p>
<p>After the third time I had to edit feed-rss2.php of wordpress to fulfill CodeProjects Technical Blogs requirements I now wrote my first (and last?) wordpress plugin.</p>
<p>As you may know, CodeProject allows you to publish articles through your current blog. See here for the <a href="http://www.codeproject.com/script/Articles/BlogFAQ.aspx" target="_blank">FAQ</a>.</p>
<p>As I am using wordpress, I started some time ago to submit blog entries into CodeProject. I had to find out myself, where to change which file.</p>
<h3>Limit published articles</h3>
<p>To limit the range of blog entries that are published at CodeProject Technical Blogs I use a <a href="http://wordpress-as-cms.com/permalinks/hidden-feeds-categories-tags-authors-search-terms-links/" target="_blank">&#8216;hidden&#8217; feature</a> and created a category named &#8216;CodeProject&#8217; in my WordPress blog. On <a href="http://www.codeproject.com/script/Articles/BlogFeedList.aspx?amid=1522794" target="_blank">my Technical Blogs</a> site in CodeProject I then used <a class="linkification-ext" title="Linkification: http://www.hjgode.de/wp/category/codeproject/feed/" href="http://www.hjgode.de/wp/category/codeproject/feed/">http://www.hjgode.de/wp/category/codeproject/feed/</a> for the feed input. Now only the articles marked with WordPress category &#8216;codepoject&#8217; are feed to CodeProject.</p>
<h3>Manually changes required in WordPress for CodeProject Technical Blogs</h3>
<p>In feed-rss2.php I always had to add a &lt;category&gt;CodeProject&lt;/category&gt; line below &lt;channel&gt;. Further I had to change the footer.php of the wordpress theme Win7blog that I use. There I added a rel=&#8221;tag&#8221; line as recommended by CodeProject.</p>
<h3>The pain of doing it again and again</h3>
<p>Now, the first manual change has to be done everytime you update your wordpress release. I had to to this at least three times before I start now with a plugin to I avoid changing the file again manually.</p>
<h3>The idea of a WordPress plugin</h3>
<p>I never wrote a WordPress plugin before, but I did some html, php and mysql coding before (ie the calendar on <a href="http://fewo-britta.de/kalender/index.php" target="_blank">www.fewo-britta.de</a> or the static pages at <a href="www.derbiedermann.de" target="_blank">www.derbiedermann.de</a>, which are generated from a db). But the learning curve was hard and it took me several hours to get the plugin working. I started with the plugin described at DevLounge in there &#8220;<a href="http://www.devlounge.net/extras/how-to-write-a-wordpress-plugin" target="_blank">How to write a WordPress plugin</a>&#8221; series. The article was the <strong>only </strong>one I could find that describes wordpress plugin development from scratch with a <strong>working</strong> example.</p>
<p>As I had problems adopting the code to my needs, especially the AdminPage, I had to rewrite the code a little bit.</p>
<p><span id="more-366"></span></p>
<h3>My first WordPress plugin</h3>
<p>OK, what does the plugin do?</p>
<p><a href="http://www.hjgode.de/wp/2010/03/01/wordpress-plugin-to-feed-codeproject-technical-blogs/codeprojectfeeder_02/" rel="attachment wp-att-367"><img class="alignnone size-full wp-image-367" title="codeprojectfeeder_02" src="http://www.hjgode.de/wp/wp-content/uploads/2010/03/codeprojectfeeder_02.gif" alt="" width="692" height="406" /></a></p>
<p>The plugin inserts a rel=&#8221;tag&#8221; in your blogs page footer. This may look more or less good, depending on the theme you use. The footer always appears outside the themes footer. I could not find a way to let it appear inside the themes footer, if the theme uses the action hook wp_footer() ouside there footer block (here after the &lt;/div&gt;:</p>
<pre>&lt;div id="footer"&gt;
 &lt;p&gt;&lt;?php bloginfo('name'); ?&gt;@&lt;?php echo date('Y'); ?&gt;
 &lt;br&gt;
 &lt;a href="&lt;?php bloginfo('home') ?&gt;/"&gt;&lt;?php bloginfo('home'); ?&gt;&lt;/a&gt;
 &lt;br&gt;
 Designed by &lt;a href="<a class="linkification-ext" title="Linkification: http://www.kamiyeye.com/" href="http://www.kamiyeye.com/">http://www.kamiyeye.com/</a>"&gt;kamiyeye&lt;/a&gt;
 &lt;br&gt;
 &lt;?php StatPress_Print("%totalvisits% Hits."); ?&gt;
 &lt;/p&gt;
&lt;/div&gt;

&lt;/div&gt;&lt;!-- #wrapper .hfeed --&gt;

&lt;?php wp_footer(); ?&gt;

&lt;/body&gt;
&lt;/html&gt;</pre>
<p>The plugin provides some checkbox options, so you can a) hide the rel=&#8221;tag&#8221; or b) dont use it at all.<br />
To feed your publications to CodeProject technical blogs, you are recommended to add a category tag with the contents CodeProject in your RSS2 feed. To get this done by the plugin it installs two action hooks: the channel one: rss2_head and the &#8216;item&#8217; one called rss2_item.</p>
<p>Here are the hooks I use in the plugin:</p>
<pre>//Actions and Filters
if (isset($hgo_codeprojectfeeder)) {
 //Actions
 add_action('admin_menu', 'CodeProjectFeeder_ap');
 add_action('wp_footer', array(&amp;$hgo_codeprojectfeeder, 'addFooterCode'), 1);
 add_action('activate_codeprojectfeeder/codeprojectfeeder.php', array(&amp;$hgo_codeprojectfeeder, 'init'));
 add_action('rss2_head', array(&amp;$hgo_codeprojectfeeder, 'addChannelCode'), 1);
 add_action('rss2_item', array(&amp;$hgo_codeprojectfeeder, 'addItemCode'), 1);
 //Filters
}</pre>
<p>The first hook is for the &#8216;Admin&#8217; settings page.<br />
The second one for the blog footer page.<br />
The &#8216;activate_&#8230;&#8217; hook is for initializing the plugin.<br />
The rss2_head and rss2_item hooks are used to insert &lt;category&gt;codeproject&lt;/category&gt; into the RSS2 header (&lt;channel&gt;) or &lt;item&gt; code.</p>
<h3>Formatting of the rel=&#8221;tag&#8221; link</h3>
<p>If you dont like the formatting of the rel=&#8221;tag&#8221; link, you can edit the plugin file codeprojectfeeder.php from inside WordPress, just click &#8220;Edit&#8221; below the &#8220;CodeProject Feeder Plugin&#8221; on the Manage Plugins page in your WordPress installation:</p>
<p><a href="http://www.hjgode.de/wp/2010/03/01/wordpress-plugin-to-feed-codeproject-technical-blogs/codeprojectfeeder_01/" rel="attachment wp-att-368"><img class="alignnone size-full wp-image-368" title="codeprojectfeeder_01" src="http://www.hjgode.de/wp/wp-content/uploads/2010/03/codeprojectfeeder_01.gif" alt="" width="727" height="423" /></a></p>
<p><a href="http://www.hjgode.de/wp/2010/03/01/wordpress-plugin-to-feed-codeproject-technical-blogs/codeprojectfeeder_04/" rel="attachment wp-att-371"><img class="alignnone size-full wp-image-371" title="codeprojectfeeder_04" src="http://www.hjgode.de/wp/wp-content/uploads/2010/03/codeprojectfeeder_04.gif" alt="" width="723" height="478" /></a></p>
<pre>/*
 Adds the rel TAG to the footer
 */
 function addFooterCode() {
   $content = '';
   //debug
   //echo '&lt;!-- addFooterCode was called --&gt;';
   $devOptions = $this-&gt;getAdminOptions();
   if ($devOptions['use_reltag'] == "true") {
     if($devOptions['hide_reltag'] == "true"){
       //using the style option you can adjust the link appearance
       $content = '&lt;a <strong>style="display:none; text-align:center; font-size:x-small; "</strong> href="'.stripslashes($devOptions['reltag_content']).'" rel="tag"&gt;CodeProject&lt;/a&gt;';
       echo $content;
     }
     else{
       $content = '&lt;a <strong>style=" text-align:center; font-size:x-small; "</strong> href="'.stripslashes($devOptions['reltag_content']).'" rel="tag"&gt;CodeProject&lt;/a&gt;';
       echo $content;
     }
   }
 }</pre>
<p>You can change the appearance of the footer text with the css inline style statements, as there are already &#8220;text-align:center; font-size:x-small;&#8221;</p>
<p>With the other options of the plugins admin settings page you specify, if you like to have the category tag within channel for all pubilcations or inside every item. You should not use both, it does not make sense.</p>
<h3>Plugin uses checkboxes instead of options</h3>
<p>As you can see from the codeprojectfeeder.php code, I have changed the way yes/no options are used in the settings admin form. Instead of the very long, hard to manage lines, I use the shorter form and checkboxes:</p>
<pre>&lt;p&gt;&lt;INPUT TYPE="CHECKBOX" id="codeprojectfeederUseRelTag" name="codeprojectfeederUseRelTag" value="true" &lt;?php if ($devOptions['use_reltag'] == "true") { echo 'CHECKED'; }?&gt;&gt;Use rel tag in footer&lt;/p&gt;</pre>
<p>instead of</p>
<pre>&lt;p&gt;&lt;label for="devloungeHeader_yes"&gt;&lt;input type="radio" id="devloungeHeader_yes" name="devloungeHeader" value="true" &lt;?php if ($devOptions['show_header'] == "true") { _e('checked="checked"', "DevloungePluginSeries"); }?&gt; /&gt; Yes&lt;/label&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;label for="devloungeHeader_no"&gt;&lt;input type="radio" id="devloungeHeader_no" name="devloungeHeader" value="false" &lt;?php if ($devOptions['show_header'] == "false") { _e('checked="checked"', "DevloungePluginSeries"); }?&gt;/&gt; No&lt;/label&gt;&lt;/p&gt;</pre>
<p>You can download the codeprojectfeeder plugin as zip: <b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=81" title="Downloaded 195 times">CodeProjectFeeder</a> - A Wordpress plugin (Hits: 195, size: 3.38 kB)</p>
<p>Version 1.11: <b>DOWNLOAD:</b><a href="http://www.hjgode.de/wp/wp-content/plugins/download-monitor/download.php?id=141" title="Downloaded 19 times">CodeprojectFeeder 1.11</a> - A wordpress plugin (Hits: 19, size: 3.53 kB)</p>
<h3>Development and debugging</h3>
<p>As you can see in codeprojectfeeder.php, there are some comment lines with a //debug line before. I used these during development to find my typos and bugs.</p>
<p>The plugin was tested on a lampp system (an Acer Aspire One A150 netbook), a windows xampp system and finally in my blog. Just be warned that due to caches or whatever of the testing lampp/xampp systems, sometimes the output was not altered and nothing changed, although source code was changed. I had to restart apache/mysql to get correct results. The RSS2 feed was sometimes cached by firefox/ie and was hard to debug, as the contents did not change although the source code was changed.</p>
<h2>Installation</h2>
<p>Just unzip the files into a dir called codeprojectfeeder below your wordpress wp-content/plugins dir or unzip the directory codeprojectfeeder into your wordpress plugins dir. Then Activate the plugin and select the CodeProjectFeeder settings you like.</p>
<h3>Finally</h3>
<p>Now, you and me dont need to change the feed-rss2.php file manually any more for CodeProject Technical Blogs.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2010%2F03%2F01%2Fwordpress-plugin-to-feed-codeproject-technical-blogs%2F&amp;title=WordPress+Plugin+to+feed+CodeProject+Technical+Blogs" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2010%2F03%2F01%2Fwordpress-plugin-to-feed-codeproject-technical-blogs%2F&amp;title=WordPress+Plugin+to+feed+CodeProject+Technical+Blogs" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2010%2F03%2F01%2Fwordpress-plugin-to-feed-codeproject-technical-blogs%2F&amp;title=WordPress+Plugin+to+feed+CodeProject+Technical+Blogs" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2010%2F03%2F01%2Fwordpress-plugin-to-feed-codeproject-technical-blogs%2F&amp;T=WordPress+Plugin+to+feed+CodeProject+Technical+Blogs" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2010%2F03%2F01%2Fwordpress-plugin-to-feed-codeproject-technical-blogs%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.hjgode.de%2Fwp%2F2010%2F03%2F01%2Fwordpress-plugin-to-feed-codeproject-technical-blogs%2F&amp;t=WordPress+Plugin+to+feed+CodeProject+Technical+Blogs" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.hjgode.de/wp/wp-content/plugins/social-bookmarks0/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.hjgode.de/wp/2010/03/01/wordpress-plugin-to-feed-codeproject-technical-blogs/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

