<?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>Bayes Blog</title>
	<atom:link href="http://blog.bayestech.com/Index.php?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.bayestech.com</link>
	<description>A blog about IT and life</description>
	<lastBuildDate>Wed, 25 May 2011 15:58:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Remote Debug</title>
		<link>http://blog.bayestech.com/?p=155</link>
		<comments>http://blog.bayestech.com/?p=155#comments</comments>
		<pubDate>Wed, 25 May 2011 15:58:37 +0000</pubDate>
		<dc:creator>kevinb</dc:creator>
				<category><![CDATA[Java Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Remote Debug]]></category>

		<guid isPermaLink="false">http://blog.bayestech.com/?p=155</guid>
		<description><![CDATA[Inorder to keep my sanity I am proposing to myself to write a blog that reminds myself how to remote debug. I can&#8217;t believe that this is the one things I always forget how to do. So here it is&#8230; For the love of all things good please remember that if you want to remote [...]]]></description>
			<content:encoded><![CDATA[<p>
Inorder to keep my sanity I am proposing to myself to write a blog that reminds myself how to remote debug. I can&#8217;t believe that this is the one things I always forget how to do. So here it is&#8230; For the love of all things good please remember that if you want to remote debug an application server just simply add the below line to the start up java options:
</p>
</p>
<p>set JAVA_OPTIONS_DEBUG=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=5005,suspend=n,server=y</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bayestech.com/?feed=rss2&amp;p=155</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Friend of Eclipse Foundation</title>
		<link>http://blog.bayestech.com/?p=152</link>
		<comments>http://blog.bayestech.com/?p=152#comments</comments>
		<pubDate>Tue, 24 May 2011 06:19:01 +0000</pubDate>
		<dc:creator>kevinb</dc:creator>
				<category><![CDATA[Java Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[ide]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://blog.bayestech.com/?p=152</guid>
		<description><![CDATA[I just became a friend of eclipse. If you use it please donate to the project. While open source is good, the only projects worth supporting are the projects with financial backing. I think this greatly increases the quality of the opensource product.]]></description>
			<content:encoded><![CDATA[<p>I just became a friend of eclipse. If you use it please donate to the project. While open source is good, the only projects worth supporting are the projects with financial backing. I think this greatly increases the quality of the opensource product.
</p>
<p><img src="http://www.eclipse.org/donate/images/friendslogo.jpg"/></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bayestech.com/?feed=rss2&amp;p=152</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Venture Part 1</title>
		<link>http://blog.bayestech.com/?p=144</link>
		<comments>http://blog.bayestech.com/?p=144#comments</comments>
		<pubDate>Sat, 02 Apr 2011 08:16:39 +0000</pubDate>
		<dc:creator>kevinb</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[challenge]]></category>
		<category><![CDATA[starting up]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://blog.bayestech.com/?p=144</guid>
		<description><![CDATA[My challenge to myself is to create a social website that is useful to others. Now I have this theory that people don&#8217;t come up with brilliant ideas they actually just persevere and keep at an idea until it is complete. This is my thought on the matter as you hear people speak  about great [...]]]></description>
			<content:encoded><![CDATA[<p>My challenge to myself is to create a social website that is useful to others. Now I have this theory that people don&#8217;t come up with brilliant ideas they actually just persevere and keep at an idea until it is complete. This is my thought on the matter as you hear people speak  about great ideas, but these ideas come from people who just think about them and do not actually implement them. This is a sad tragedy of human behaviour. If everyone had to follow through on their ideas imagine the possibilities. So this is why I have set up this challenge, its not to show off my programming or lack of programming skills <img src='http://blog.bayestech.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . But rather to show that if you stick at an idea you can finish and publish a website. Enough of doing this may lead to rewards down the line but for now it is just to prove that I can finish a site.</p>
<p>So in order to accomplish this I need a few parameters:</p>
<p>1. Budget: R5000-00.</p>
<p>Well that is actually all the parameters, as I already have the skills (I hope), tools and idea I need to develop this social site.</p>
<p>Now to create the site I need a few things to be done:</p>
<p>1. Register a domain name: I have registered turus.me, which apparently is Scottish Gaelic for journey. This is fitting as this is a jouney I am taking inorder to show that development is not the hard part, sticking to one idea and following through is the hard part.</p>
<p>2. Get a server: I am going to use GoDaddy.com windows virtual server basic. There is no reason for this other than the price is within my budget. R5000-00 for all those who don&#8217;t know, can&#8217;t buy much. This is less than the amount that was given to facebook initially in the dorm room used to purchase the first server (well according to the movie).</p>
<p>3. Create the site: I am going to create the site in java using a toolset as follows. The spring framework, hibernate, tomcat 7 and mysql. These are the technologies I am comfortable with at the moment and will result in a rapidly developed site. I am not saying they are the absolute best choices, but the are all well supported in the community and the documentation is not bad.</p>
<p>4. Create mobile apps: I will only create mobile applications for the blackberry, android and windows phone 7 environments purely because I do not want to buy a mac just to develop an application for the iphone. But I think the coverage of smart phone devices is decent even though the iphone users are the most likely to download an application.  </p>
<p>Well this is the challenge I am setting myself. I hope it works out, otherwise I just spent a few hours wasting my time writing this blog. If any developers are willing to help please let me know. I can turn over a percentage of the site for development time. Who knows it might actually make some money. But moving along I think this can be up and running in the next 3 months, 3 months is a long time as I have a full time job, another new venture, masters and gym to do in between. Now that I put it on paper it sounds a bit to ambitious. I will try anyway, hope it goes well.</p>
<p>My word, I can&#8217;t believe wordpress actually saved this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bayestech.com/?feed=rss2&amp;p=144</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Its not that hard</title>
		<link>http://blog.bayestech.com/?p=141</link>
		<comments>http://blog.bayestech.com/?p=141#comments</comments>
		<pubDate>Wed, 23 Mar 2011 06:49:31 +0000</pubDate>
		<dc:creator>kevinb</dc:creator>
				<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://blog.bayestech.com/?p=141</guid>
		<description><![CDATA[This post is a bit of a rant. A release valve of sorts that will allow me to express my dissappointment in the human civilization to admit that what they do in general is not that hard. To set the context, I am talking about corporate South Africa, but I am sure there similarities in [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a bit of a rant. A release valve of sorts that will allow me to express my dissappointment in the human civilization to admit that what they do in general is not that hard. To set the context, I am talking about corporate South Africa, but I am sure there similarities in other civilizations though!</p>
<p>I am a software engineer by profession or &#8220;programmer&#8221;, well software engineering is not an official profession. Now I know that the average programmer is confident and arrogant and we all think we can change the world. Yes some of us can, but it is not due to the skill of programming it is due to the idea that we can change the world, programming is just a trivial task that is a tool we use in our attempt at changing the world. Now that may hurt a few egos or not, I am not going to say that people actually read this blog, but then again it is a personal venture of mine and in all I feel better just putting some things out there. So anyway lets face it, programming is not hard! In this day and age the hard work is done for us. Now enough about programming, why are there so many professionals from doctors to engineers that think what they do is so hard? Is it really or is it that they are the people in the position at the time. I think the idea of original though is hard, learning is not, original thought is.</p>
<p>So this makes me ask, what leads to a person being perceived as smart? I have a feeling its a matter of learning capacity and patience, nothing else&#8230;&#8230; These are not all my thoughts just a rant in a frustrated mood. And sorry for the spelling mistakes if any&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bayestech.com/?feed=rss2&amp;p=141</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Blackberry UiApplication Phase 1</title>
		<link>http://blog.bayestech.com/?p=135</link>
		<comments>http://blog.bayestech.com/?p=135#comments</comments>
		<pubDate>Thu, 10 Mar 2011 05:28:24 +0000</pubDate>
		<dc:creator>kevinb</dc:creator>
				<category><![CDATA[Blackberry Development]]></category>
		<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[ant build]]></category>
		<category><![CDATA[bb-ant-tools]]></category>
		<category><![CDATA[Blackberry]]></category>
		<category><![CDATA[preprocessor]]></category>
		<category><![CDATA[project shell]]></category>
		<category><![CDATA[splash screen]]></category>

		<guid isPermaLink="false">http://blog.bayestech.com/?p=135</guid>
		<description><![CDATA[I have been playing around with blackberry development for a while now. During this time I have noticed a common pattern of how a gui project should look. This is my attempt on creating a shell for all gui projects, called skeleton. Just keep in mind that this will change over time as this was done in about [...]]]></description>
			<content:encoded><![CDATA[<p>I have been playing around with blackberry development for a while now. During this time I have noticed a common pattern of how a gui project should look. This is my attempt on creating a shell for all gui projects, called skeleton. Just keep in mind that this will change over time as this was done in about an hour, so it does not contain every component that would constitute a complete shell yet. But it is a start.</p>
<p>Before I start I am developing on windows using the eclipse development environment for eclipse.</p>
<p>Firstly, I created a standard project using the eclipse ide with 3classes and a few added folders (models, img and icon all in the root folder):</p>
<p>1. MainEntry.java</p>
<pre><code class="java">
package me.bayes.skeleton;

import me.bayes.skeleton.gui.FrontScreen;
import me.bayes.skeleton.gui.SplashScreen;
import net.rim.device.api.ui.UiApplication;

/**
 * This is the mail entry point of the application.
 *
 * @author Kevin Bayes
 *
 */
public final class MainEntry extends UiApplication {

	public MainEntry() {
		FrontScreen frontScreen = new FrontScreen();
		new SplashScreen(this, frontScreen);
	}

	public static void main(String[] args) {
		MainEntry entry = new MainEntry();
		entry.enterEventDispatcher();
	}

}

</code></pre>
<p>2. FrontScreen.java &#8211; The front screen will be the landing page once you have exited the splash screen. As part of this and I have added a sample of using preprocessing to cater for multiple devices.</p>
<pre><code class="java">
//#preprocess

package me.bayes.skeleton.gui;

import net.rim.device.api.ui.component.TextField;
import net.rim.device.api.ui.container.MainScreen;

/**</code></pre>
<pre><code class="java"> * Currently this is empty, but it does show the usefulness of preprocess
 * @author Kevin Bayes
 *
 */
public final class FrontScreen extends MainScreen {

	public FrontScreen() {
		super();

		TextField text = new TextField();
		//#ifdef RIM_6.0.0
		text.setText("It's 6.0.0");
		//#else
		text.setText("Not 6.0.0");
		//#endif
		add(text);
	}

}
</code></pre>
<p>3. SplashScreen.java &#8211; The splash screen is the introduction to your application and can be used to mask the booting up of your application. Here preprocessing has not been used as the image that will be loaded will be decided at compile time using an ant build.</p>
<pre><code class="java">
package me.bayes.skeleton.gui;

import java.util.Timer;
import java.util.TimerTask;

import net.rim.device.api.system.Bitmap;
import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.BitmapField;
import net.rim.device.api.ui.container.MainScreen;

/**
 * @author Kevin Bayes
 *
 */
final public class SplashScreen extends MainScreen {
	private MainScreen next;
	private Timer timer = new Timer();
	private UiApplication application;
	//This splash screen is an image read from the root folder of the application
	private static final Bitmap _bitmap = Bitmap.getBitmapResource("skeleton.png");       

	public SplashScreen(UiApplication ui, MainScreen next) {
		super (Field.USE_ALL_HEIGHT|Field.FIELD_LEFT);
		this.application = ui;
		this.next = next;
		this.add(new BitmapField(_bitmap));
		/*
		 * create a listener to allow the user to exit the splash screen
		 * manually or override the navigation events as done below.
		 *
		 * the splash screen listener should implement net.rim.device.api.system.KeyListener.
		 **/
		//SplashScreenListener listener = new SplashScreenListener(this);
		//this.addKeyListener(listener);
		//create a timer to count down to the splash screens exit
		timer.schedule(new ExitSplashCountDown(), 5000L);
		application.pushScreen (this);
	}
	/**
	 *

When the splash screen exits three things happen

	 *
<ol>
	 *
<li>The timer is canceled.

	 *</li>
<li>You pop the splash screen off the stack.

	 *</li>
<li>You push the main screen onto the stack.

	 *</li>
</ol>

*/
	public void dismiss() {
		timer.cancel();
		application.popScreen (this);
		application.pushScreen (next);
	}               

	/**
	 * *

This {@link TimerTask} is used to make sure the splash screen exits and
	 * *  <strong>does not display forever</strong>.

	 * *
	 * * @author Kevin Bayes
	 * *
	 */
	private final class ExitSplashCountDown extends TimerTask
	{
		public void run() {
			ExitSplashThread dThread = new ExitSplashThread();
			application.invokeLater (dThread);
		}
	}                

	/**
	 * *

Used by the {@link ExitSplashCountDown} to exit the splash screen.

	 * *
	 * * @author Kevin Bayes
	 * *
	 */
	private final class ExitSplashThread implements Runnable {
		public void run() {
			dismiss();
         }
		/*
		 * * When you click the navigation then the screen should exit and go to your applications main screen
		 * *
		 * * (non-Javadoc)
		 * * @see net.rim.device.api.ui.Screen#navigationClick(int, int)
		 * */
		protected boolean navigationClick(int status, int time) {
			dismiss();
			return true;
		}          

		/*
		 * * Make sure nothing happens when the navigation senses movement
		 * *
		 * * (non-Javadoc)
		 * * @see net.rim.device.api.ui.Screen#navigationMovement(int, int, int, int)
		 */
		protected boolean navigationMovement(int dx, int dy, int status, int time) {
			return false;
		}          

		/*
		 * * Make sure nothing happens when unclick occurs
		 * *
		 * * (non-Javadoc)
		 * @see net.rim.device.api.ui.Screen#navigationUnclick(int, int)
		 */         

		protected boolean navigationUnclick(int status, int time) {
			return false;
		}
	}
}
</code></pre>
<p>If you would like for the sake of development you should fill in the BlackBerry_App_Descriptor.xml and a preprocessing tag of RIM_6.0.0 to test the preprocessing during development. Now once you have completed your development and want to build the application for multiple platforms. To do this I have used the <a title="bb-ant-tools" href="http://bb-ant-tools.sourceforge.net/" target="_blank">bb-ant-tool</a>. Mu script only includes preprocessing tags and compiling, I will add features like the signing tool at a later stage. Now to buid the skeleton project I created the following ant script:</p>
<pre><code class="xml">
&lt;project name="Skeleton Project" basedir="." default="build"&gt;

	&lt;!-- Default phone is torch --&gt;
	&lt;property file="${basedir}/models/9800.properties" /&gt;

	&lt;!-- Give your project title and version (Same as blackberry app descriptor) --&gt;
	&lt;property name="project.title" value="Skeleton"/&gt;
	&lt;property name="project.version" value="1.0.0"/&gt;
	&lt;property name="blackberry.ant.library.location" value="D:/Programming/bb-ant-tools-1.2.11-bin"&gt;&lt;/property&gt;
	&lt;!-- cdlc means Rimlet --&gt;
	&lt;property name="application.type" value="cldc"&gt;&lt;/property&gt;
	&lt;!-- set the jde home --&gt;
	&lt;property name="jde.home" value="D:/Programming/ide/eclipse-blackberry/plugins/net.rim.ejde.componentpack6.0.0_6.0.0.29/components" /&gt;
	&lt;!-- set the build directory --&gt;
	&lt;property name="build.directory" value="${basedir}/build"&gt;&lt;/property&gt;

	&lt;!-- create an ant task for blackberry --&gt;
	&lt;taskdef resource="bb-ant-defs.xml" classpath="${blackberry.ant.library.location}/bb-ant-tools.jar"/&gt;

	&lt;target name="clean"&gt;
		&lt;description&gt;
			Delete all the previous built projects.
		&lt;/description&gt;
		&lt;delete dir="${build.directory}" failonerror="no"&gt;&lt;/delete&gt;
		&lt;delete file="${jde.home}/simulator/${project.title}_${model}.cod" failonerror="no"/&gt;
	&lt;/target&gt;

    &lt;target name="clean-simulator"&gt;
    	&lt;description&gt;
    		1. Run the simulators clean file.
    		2. Delete the application from the simulator
    	&lt;/description&gt;

        &lt;exec executable="${jde.home}\simulator\clean.bat" dir="${jde.home}\simulator"/&gt;

    	&lt;exec executable="${jde.home}\simulator\fledge.exe" dir="${basedir}\simulator-data"&gt;
            &lt;arg value="/app=${jde.home}\simulator\Jvm.dll"/&gt;
            &lt;arg value="/handheld=${model}"/&gt;
            &lt;arg value="/clear-flash"/&gt;
            &lt;arg value="/shutdown-after-startup"/&gt;
        &lt;/exec&gt;
   &lt;/target&gt;

    &lt;target name="setup"&gt;
    	&lt;description&gt;
    		Create a build directory to hold exactly the source
    		and resource files for the selected device model.

    		Then copy all the necesary files.
    	&lt;/description&gt;

        &lt;mkdir dir="${build.directory}\img"/&gt;
        &lt;mkdir dir="${build.directory}\res"/&gt;
        &lt;mkdir dir="${build.directory}\src"/&gt;
        &lt;mkdir dir="${build.directory}\${project.title}"/&gt;
        &lt;copy todir="${build.directory}\src"&gt;
            &lt;fileset dir="${basedir}\src"/&gt;
        &lt;/copy&gt;
        &lt;copy file="${basedir}\icon\${size.icon}\${project.title}_icon.png"
              tofile="${build.directory}\img\${project.title}_icon.png"
        /&gt;
        &lt;copy todir="${build.directory}\img"&gt;
            &lt;fileset dir="${basedir}\img\${size.screen}"/&gt;
        &lt;/copy&gt;
        &lt;copy todir="${build.directory}\res"&gt;
            &lt;fileset dir="${basedir}\res"/&gt;
        &lt;/copy&gt;
    &lt;/target&gt;

	&lt;target name="build" depends="setup"&gt;
		&lt;description&gt;
				We are going to compile the project and use the tags for preprocessing.
		&lt;/description&gt;
		&lt;rapc destdir="${build.directory}\${project.title}" output="${project.title}"
			              srcdir="${build.directory}"&gt;
			&lt;jdp type="${application.type}" title="${project.title}"
			                 icon="../img/${project.title}_icon.png" /&gt;
			&lt;define tag="RIM_${rim.version}"/&gt;
			&lt;define tag="SCREEN_${size.screen}"/&gt;
		&lt;/rapc&gt;
	&lt;/target&gt;

	&lt;target name="deliver" depends="clean, build"&gt;
	        &lt;copy file="${build.directory}\${project.title}\${project.title}.cod"
	            tofile="${jde.home}\simulator\${project.title}_${model}.cod"
	        /&gt;
	        &lt;copy file="${build.directory}\${project.title}\${project.title}.cod"
	            tofile="${basedir}\delivery\${project.title}_${model}.cod"
	        /&gt;

	        &lt;delete dir="${build.directory}"/&gt;
	 &lt;/target&gt;

&lt;/project&gt;
</code></pre>
<p>Now all you need to do is to create multiple property files in the models directory and there you go build away anywhere&#8230;. I will complete a more detailed description as I go along but for now I believe this will suffice.</p>
<h3>Please comment about anything you would like me to include in the skeleton project.</h3>
<p><a href="http://blog.bayestech.com/wp-content/uploads/2011/03/Skeleton-0.0.1.zip">Skeleton Project Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bayestech.com/?feed=rss2&amp;p=135</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Understanding Through Models</title>
		<link>http://blog.bayestech.com/?p=131</link>
		<comments>http://blog.bayestech.com/?p=131#comments</comments>
		<pubDate>Fri, 18 Feb 2011 05:03:09 +0000</pubDate>
		<dc:creator>kevinb</dc:creator>
				<category><![CDATA[studies]]></category>
		<category><![CDATA[Dubberly]]></category>
		<category><![CDATA[Model]]></category>

		<guid isPermaLink="false">http://blog.bayestech.com/?p=131</guid>
		<description><![CDATA[While doing a report towards my degree I came across an extremely interesting modelling champion, Dubberly. While Dubberly does not model for the catwalks of Milan, London or New York (I am told fashion is big in those places), he is a champion modeller with a gift of explaining concepts through the use of models. The [...]]]></description>
			<content:encoded><![CDATA[<p>While doing a report towards my degree I came across an extremely interesting modelling champion, Dubberly. While Dubberly does not model for the catwalks of Milan, London or New York (I am told fashion is big in those places), he is a champion modeller with a gift of explaining concepts through the use of models. The article that initially introduced me to Dubberly&#8217;s work was &#8220;Models of Models&#8221; which can be found among all his articles posted on his website <a href="http://www.dubberly.com/articles">http://www.dubberly.com/articles</a>.</p>
<p>Now that I have introduced you to Dubberly I urge you to visit his website. I personally think that using concept maps in the way he does will certainly help organizations to be more transparent allowing internal staff and external clients better understand the organization inner working and services, respectively.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bayestech.com/?feed=rss2&amp;p=131</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome Kevin Bruce Bayes to the world of Microsoft TAG</title>
		<link>http://blog.bayestech.com/?p=122</link>
		<comments>http://blog.bayestech.com/?p=122#comments</comments>
		<pubDate>Sat, 05 Feb 2011 08:44:47 +0000</pubDate>
		<dc:creator>kevinb</dc:creator>
				<category><![CDATA[Blackberry Development]]></category>
		<category><![CDATA[Interesting]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Microsoft Tag]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Tag]]></category>

		<guid isPermaLink="false">http://blog.bayestech.com/?p=122</guid>
		<description><![CDATA[I suspect in the future I will have alot of ideas around this product. Well I do have currently but will wait to reveal them. But here is my very first Microsoft TAG. And here it is: I have tested this and so far only have one major suggestion. In the free reader microsoft should give [...]]]></description>
			<content:encoded><![CDATA[<p>I suspect in the future I will have alot of ideas around this product. Well I do have currently but will wait to reveal them. But here is my very first Microsoft TAG. And here it is:</p>
<div id="attachment_125" class="wp-caption alignnone" style="width: 310px"><a href="http://blog.bayestech.com/wp-content/uploads/2011/02/mstag.png"><img class="size-medium wp-image-125" title="mstag" src="http://blog.bayestech.com/wp-content/uploads/2011/02/mstag-300x274.png" alt="Kevin Bayes MS Tag" width="300" height="274" /></a><p class="wp-caption-text">MS Tag with vCard information.</p></div>
<p>I have tested this and so far only have one major suggestion. In the free reader microsoft should give the user the option of selecting where the tag is as on some occasions the blackberry application does not recognize the full tag.</p>
<p>Besides that I am happy with my new tag and will be happily creating them for all my friends and partners. This I believe is my first step in getting rid of the much outdated contact us page on websites. Well until my idea is up and running I will be keeping it to myself, but anyone wanting to help please contact me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bayestech.com/?feed=rss2&amp;p=122</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decimal to Hex to Decimal in Powershell</title>
		<link>http://blog.bayestech.com/?p=111</link>
		<comments>http://blog.bayestech.com/?p=111#comments</comments>
		<pubDate>Wed, 05 Jan 2011 16:36:50 +0000</pubDate>
		<dc:creator>kevinb</dc:creator>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Conversion]]></category>
		<category><![CDATA[Decimal]]></category>
		<category><![CDATA[Hex]]></category>

		<guid isPermaLink="false">http://blog.bayestech.com/?p=111</guid>
		<description><![CDATA[I keep forgetting how to convert from decimal to hex and back, so in the interest of keeping my sanity I have created 2 powershell scripts to do it for me. In both scripts I have done the conversion the manual way and then also included the short way. First from decimal to hex: param ($integerValue [...]]]></description>
			<content:encoded><![CDATA[<p>I keep forgetting how to convert from decimal to hex and back, so in the interest of keeping my sanity I have created 2 powershell scripts to do it for me. In both scripts I have done the conversion the manual way and then also included the short way.</p>
<p>First from decimal to hex:<br />
<code><br />
param ($integerValue = $(throw "Must specify an integer"))</p>
<p>function manualConversion($value) {</p>
<p>    $remainder = 0<br />
    $hexValue = ""</p>
<p>    do {<br />
        $remainder = $value % 16<br />
        $value = $value - $remainder<br />
        $value = $value / 16</p>
<p>        if($remainder -gt 9) {<br />
            switch($remainder) {<br />
            15 { $hexValue = "F$hexValue"; break;}<br />
            14 { $hexValue = "E$hexValue"; break;}<br />
            13 { $hexValue = "D$hexValue"; break;}<br />
            12 { $hexValue = "C$hexValue"; break;}<br />
            11 { $hexValue = "B$hexValue"; break;}<br />
            10 { $hexValue = "A$hexValue"; break;}<br />
            }<br />
        } else {<br />
            $hexValue = "$remainder$hexValue"<br />
        }</p>
<p>    } while($value -ne 0)</p>
<p>    return "0x$hexValue"<br />
}</p>
<p>function dotNetConversion($value) {</p>
<p>    $stringValue = ("{0:x}" -f [Int]$value)</p>
<p>    return "0x$stringValue"</p>
<p>}</p>
<p>$hexValue1 = manualConversion($integerValue);<br />
echo $hexValue1<br />
$hexValue2 = dotNetConversion($integerValue);<br />
echo $hexValue2</p>
<p></code></p>
<p>Secondly from Hex to Decimal:<br />
<code><br />
param ($hexString = $(throw "Must specify a hex string"))</p>
<p>function manualConversion($value) {</p>
<p>    $position = $value.length - 1</p>
<p>    $total = 0;<br />
    $multiplier = 0;</p>
<p>    for(; $position -gt -1; $position--) {<br />
        if($value[$position] -eq "x") {<br />
            break;<br />
        }</p>
<p>        $hexMultiplier = [System.Math]::Pow(16,$multiplier++)<br />
        $number = 0</p>
<p>        if($value[$position] -eq 'A') {<br />
            $number = 10<br />
        } elseif($value[$position] -eq "B") {<br />
            $number = 11<br />
        } elseif($value[$position] -eq "C") {<br />
            $number = 12<br />
        } elseif($value[$position] -eq "D") {<br />
            $number = 13<br />
        } elseif($value[$position] -eq "E") {<br />
            $number = 14<br />
        } elseif($value[$position] -eq "F") {<br />
            $number = 15<br />
        } else {<br />
            $number = [Convert]::ToInt32($value[$position], 10)<br />
        }</p>
<p>        $total += ($hexMultiplier * $number);<br />
    }</p>
<p>    return $total<br />
}</p>
<p>function dotNetConversion($value) {</p>
<p>    $decimalValue = [Convert]::ToInt32($value, 16)</p>
<p>    return "$decimalValue"<br />
}</p>
<p>$decimalValue = dotNetConversion($hexString)<br />
echo $decimalValue<br />
$decimalValue = manualConversion($hexString)<br />
echo $decimalValue<br />
</code> </p>
<p>And that is how simple it is. Also you could always use the scientific calculator that comes with windows, but then how fun could that possibly be!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bayestech.com/?feed=rss2&amp;p=111</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Calling a webservice using jQuery and Javascript</title>
		<link>http://blog.bayestech.com/?p=104</link>
		<comments>http://blog.bayestech.com/?p=104#comments</comments>
		<pubDate>Thu, 23 Dec 2010 09:16:19 +0000</pubDate>
		<dc:creator>kevinb</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://blog.bayestech.com/?p=104</guid>
		<description><![CDATA[Every now and then you need to call a web service using java script. Here are two examples of calling a SOAP webservice using jQuery and straight java script. First here is the sample using javascript: var url = '[Webservice URL]'; function callWebservice() /*Add parameters and what not*/ { //Example of a xml request probably [...]]]></description>
			<content:encoded><![CDATA[<p>
Every now and then you need to call a web service using java script. Here are two examples of calling a SOAP webservice using<br />
jQuery and straight java script.
</p>
<p>
First here is the sample using javascript:
</p>
<pre>
	<code class="js">
var url = '[Webservice URL]';

function callWebservice() /*Add parameters and what not*/ {

    //Example of a xml request probably put this is the parameter
    var soapMessage = "&lt;?xml version='1.0' encoding='utf-8'?&gt;";
    soapMessage += "&lt;soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' ";
    soapMessage += "xmlns:xsd='http://www.w3.org/2001/XMLSchema' ";
    soapMessage += "xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'&gt;";
    soapMessage += "&lt;soap:Body&gt;";
	//[Add your xml here]
	soapMessage += "&lt;/soap:Body&gt;";
	soapMessage += "&lt;/soap:Envelope&gt;";

    $.ajax({
        type: 'POST',
        url: url,
        cache: false,
        success: function(data){
            var xml = data.xml;
			//[do something with the xml]
        },
        error: function(data){
            var xml = data.xml;
			//[do something with the xml]
        },
        contentType: 'text/xml',
        data: soapMessage
    });
}
	</code>
</pre>
<p></p>
<p>
Second is the sample using straight javascript:
</p>
<pre>
	<code class="js">
var xmlhttp = createXMLHttpRequest();
var url = '[Webservice URL]';

function createXMLHttpRequest() /*Add parameters and what not*/ {
   try { return new XMLHttpRequest(); } catch(e) {}
   try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
   try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
   alert("XMLHttpRequest not supported");
   return null;
}

function callWebservice() { 

	//Example of a xml request probably put this is the parameter
	var soapMessage = "&lt;?xml version='1.0' encoding='utf-8'?&gt;";
	soapMessage += "&lt;soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' ";
	soapMessage += "xmlns:xsd='http://www.w3.org/2001/XMLSchema' ";
	soapMessage += "xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'&gt;";
	soapMessage += "&lt;soap:Body&gt;";
             //[Add your xml here]
	soapMessage += "&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;";

	var xmldoc = new ActiveXObject("Microsoft.XMLDOM");
	xmldoc.loadXML(soapMessage);
	xmlhttp.onreadystatechange = stateChange;
	xmlhttp.open("POST", url, false);
	xmlhttp.setRequestHeader ("SOAPAction", "[Your SOAPAction]");
	xmlhttp.setRequestHeader ("Content-Type", "text/xml");
	xmlhttp.send(xmldoc);
} 

function stateChange() {
	if (xmlhttp.readyState==4)
	{
		// if "OK"
		if (xmlhttp.status==200)
		{
			//[Get xmlhttp.responseXML.xml and do something with it]

		}
		else
		{
			//[Get xmlhttp.responseXML.xml and do something with it in the case of an error]
		}
	}
}
	</code>
</pre>
<p></p>
<p>
	Trivial I know but there is not a simpler way to do this. Maybe I should think of making a library out of this&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bayestech.com/?feed=rss2&amp;p=104</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Understanding JMS Acknowledgment</title>
		<link>http://blog.bayestech.com/?p=98</link>
		<comments>http://blog.bayestech.com/?p=98#comments</comments>
		<pubDate>Mon, 06 Dec 2010 06:13:00 +0000</pubDate>
		<dc:creator>kevinb</dc:creator>
				<category><![CDATA[Java Development]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[jms]]></category>
		<category><![CDATA[Messaging]]></category>

		<guid isPermaLink="false">http://blog.bayestech.com/?p=98</guid>
		<description><![CDATA[What is JMS JMS or Java Messaging Service, is the java api for accessing MOM or Message-Oriented-Middleware, in a vendor neutral way. The JMS Api defines a common set of interfaces and semantics for java developers to communicate with messaging systems. Users of JMS are known as clients while products that implement the JMS interfaces are known [...]]]></description>
			<content:encoded><![CDATA[<h3>What is JMS</h3>
<p>JMS or Java Messaging Service, is the java api for accessing MOM or Message-Oriented-Middleware, in a vendor neutral way. The JMS Api defines a common set of interfaces and semantics for java developers to communicate with messaging systems.</p>
<p>Users of JMS are known as clients while products that implement the JMS interfaces are known as providers.</p>
<h3>What is an acknowledgment</h3>
<p>If a client specifies that the consumer of the message should be explicitly acknowledged, in otherwords the client doesnt use auto acknowledge, the consumer will need to acknowledge a message at some point while consuming the message. This acknowledgement indicates that the message has been recieved by the consumer.</p>
<p>Acknowledgement does not mean that the message was handled correctly/successfully by the consumer. This is an important point as you want to avoid processing the same message twice. The JMSRedelivered flag can help with this but is out of scope for this post.</p>
<h3>Methods of acknowledgment</h3>
<p>It is important to make 2 things explicit here:</p>
<p>1. If a session is transacted the acknowledgement is handled by the transaction (ie when the transaction commits the message is acknowledged and on transaction rollback the message is recovered).</p>
<p>2. If a session is not transacted, there are three acknowledgment  options, and recovery is handled manually. The thress options are DUPS_OK_ACKNOWLEDGE, AUTO_ACKNOWLEDGE and CLIENT_ACKNOWLEDGE.</p>
<h4>DUPS_OK_ACKNOWLEDGE</h4>
<p>A lazy way of acknowledging messages and can cause messages being delivered to more that one consumer. Duplicate delivery of mesages. This means this should only be used when you are tolerant to duplicate messages. </p>
<p>Benefit: reduces overhead as the session does not need to prevent duplicates.</p>
<h4>AUTO_ACKNOWLEDGE</h4>
<p>The session auto acknowledges when either the consumer successfully calls to recieve a message or the MessageListener successfully returns after processing the message.</p>
<h4>CLIENT_ACKNOWLEDGE</h4>
<p>A client calls the acknowledge method associated with the session to aknowledge all messages consumed within the session.</p>
<h3>Final note</h3>
<p>This post is independent of any vendor specific implementations. So please read up on the specific vendor if experiencing any problems.</p>
<h3>References</h3>
<p>1. <a href="http://download.oracle.com/javaee/6/tutorial/doc/bncdq.html">http://download.oracle.com/javaee/6/tutorial/doc/bncdq.html</a></p>
<p>2. Java Message Service &#8211; The JMS API is an API for accessing enterprise messaging systems for Java Programs (2002), <a href="http://www.oracle.com/technetwork/java/docs-136352.html">http://www.oracle.com/technetwork/java/docs-136352.html</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bayestech.com/?feed=rss2&amp;p=98</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

