<?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>Knowledge is Power</title>
	<atom:link href="http://www.ericmartel.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ericmartel.com</link>
	<description></description>
	<lastBuildDate>Mon, 16 Jan 2012 15:11:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Sublime Text 2 Stack Overflow Plugin</title>
		<link>http://www.ericmartel.com/2012/01/12/sublime-text-2-stack-overflow-plugin/</link>
		<comments>http://www.ericmartel.com/2012/01/12/sublime-text-2-stack-overflow-plugin/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 18:14:17 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.ericmartel.com/?p=212</guid>
		<description><![CDATA[Since I was finding myself doing quite a lot of searches on Stack Overflow recently, I decided to write a real simple plugin for Sublime Text 2 that would allow me to do queries using the current word/selection or user input. It is available on GitHub and will be shortly available through Package Control. The [...]]]></description>
			<content:encoded><![CDATA[<p>Since I was finding myself doing quite a lot of searches on <a title="Stack Overflow" href="http://www.stackoverflow.com">Stack Overflow</a> recently, I decided to write a real simple plugin for <a title="Sublime Text 2" href="http://www.sublimetext.com/2">Sublime Text 2</a> that would allow me to do queries using the current word/selection or user input. It is available on <a title="Stack Overflow Plugin" href="https://github.com/ericmartel/Sublime-Text-2-Stackoverflow-Plugin">GitHub</a> and will be shortly available through <a title="Package Control" href="http://wbond.net/sublime_packages/package_control">Package Control</a>.</p>
<p>The available commands are stackoverflow_search_selection and stackoverflow_search_from_input which are self-explanatory.</p>
<p>You can trigger them from the Command Palette:</p>
<p><a href="http://www.ericmartel.com/wp-content/uploads/2012/01/stackoverflowcommandpalette.png"><img class="alignnone size-full wp-image-213" title="Stack Overflow Command Palette" src="http://www.ericmartel.com/wp-content/uploads/2012/01/stackoverflowcommandpalette.png" alt="" width="437" height="104" /></a></p>
<p>Or through the Tools menu</p>
<p><a href="http://www.ericmartel.com/wp-content/uploads/2012/01/stackoverflowmenu.png"><img class="alignnone size-full wp-image-214" title="Stack Overflow Menu" src="http://www.ericmartel.com/wp-content/uploads/2012/01/stackoverflowmenu.png" alt="" width="476" height="67" /></a></p>
<p>This is definitely not the most complex plugin ever, but it does save me some time!</p>
<p>Hope this helps someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmartel.com/2012/01/12/sublime-text-2-stack-overflow-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sublime Text 2 + Perforce</title>
		<link>http://www.ericmartel.com/2012/01/07/sublime-text-2-perforce/</link>
		<comments>http://www.ericmartel.com/2012/01/07/sublime-text-2-perforce/#comments</comments>
		<pubDate>Sat, 07 Jan 2012 21:01:46 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.ericmartel.com/?p=196</guid>
		<description><![CDATA[After shopping around for a new text editor, I decided to stick with Sublime Text 2. While the editor is still in Beta, it is very fast and stable. See this video review at HeyBigName.com for a more detailed review. Even for home projects, I tend to use Perforce (the licence is free if you [...]]]></description>
			<content:encoded><![CDATA[<p>After shopping around for a new text editor, I decided to stick with <a title="Sublime Text 2" href="http://www.sublimetext.com/2">Sublime Text 2</a>. While the editor is still in Beta, it is very fast and stable. See <a title="video review" href="http://heybigname.com/2011/11/03/sublime-text-2-review/">this video review</a> at <a title="Hey Big Name" href="http://www.heybigname.com">HeyBigName.com</a> for a more detailed review.</p>
<p>Even for home projects, I tend to use <a title="Perforce" href="http://www.perforce.com">Perforce</a> (the licence is free if you have 2 users max). While Sublime Text 2 didn&#8217;t support a perforce integration, it was pretty easy to add a small python plugin to allow</p>
<ul>
<li>User command to be bound on a menu item or keyboard shortcut</li>
<li>Call to p4 edit when a file is read only and about to be saved</li>
</ul>
<p>I think the longest part was understanding that to call my PerforceCheckoutCommand I had to write perforce_checkout (no caps, _ added and command removed) in the config file.</p>
<p>For those of you who would be interested in using it, it&#8217;s available on <a title="GitHub" href="http://github.com">GitHub</a></p>
<p><a title="Sublime Text 2 Perforce Plugin" href="https://github.com/ericmartel/Sublime-Text-2-Perforce-Plugin">https://github.com/ericmartel/Sublime-Text-2-Perforce-Plugin</a></p>
<p>Edit: The plugin now supports auto checkout, auto add, checkout command and add command. I&#8217;m waiting for Sublime Text 2 to support delete and rename callback to add those. The plugin was also submitted to be part of <a title="Package Control" href="http://wbond.net/sublime_packages/package_control">Package Control</a> (another useful plugin for Sublime Text 2) to ease its integration.</p>
<p>Edit: It is now part of Package Control, just use Package Control: Install Package and type Perforce and you&#8217;re all set!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmartel.com/2012/01/07/sublime-text-2-perforce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working NumberPicker and Android</title>
		<link>http://www.ericmartel.com/2010/07/01/working-numberpicker-and-android/</link>
		<comments>http://www.ericmartel.com/2010/07/01/working-numberpicker-and-android/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 17:18:28 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Progress]]></category>

		<guid isPermaLink="false">http://www.ericmartel.com/?p=140</guid>
		<description><![CDATA[For the last few weeks, I&#8217;ve been working on and off on a small android project. For number selection, I wanted to use something similar to what&#8217;s in the Alarm Clock that ships with most Android phones&#8230; a simple control made out of 3 elements, a text field, an &#8220;increase&#8221; button and a &#8220;decrease&#8221; button. [...]]]></description>
			<content:encoded><![CDATA[<p>For the last few weeks, I&#8217;ve been working on and off on a small android project. For number selection, I wanted to use something similar to what&#8217;s in the Alarm Clock that ships with most Android phones&#8230; a simple control made out of 3 elements, a text field, an &#8220;increase&#8221; button and a &#8220;decrease&#8221; button. I was really surprised to see that this is not part of the SDK. After checking on the net, I found this site:</p>
<p><a href="http://www.quietlycoding.com/?p=5">http://www.quietlycoding.com/?p=5</a></p>
<p>It seemed to work well most of the time, but I had a strange behavior that I thought was coming from my side&#8230; After displaying the NumberPicker in a Dialog, I was using an OnClick on some button in this dialog, and sometimes the number I was getting from the picker didn&#8217;t correspond to what was on screen. Also, after seeing the application running on my phone, I decided to show it to my fiancée, and her first try at it broke the NumberPicker! If you hold one of the buttons, the picker will loop infinitely increasing or decreasing the value.</p>
<p>There might be other issues but here&#8217;s my fix to the two of them:</p>
<p>First, the infinitely increasing value problem, it appears that the code that&#8217;s constantly run does not have exit conditions, here&#8217;s how I fixed it:</p>
<pre class="brush: java; title: ; notranslate">

private final Runnable mRunnable = new Runnable() {
	public void run() {
		boolean repost = false;
		if (mIncrement) {
			changeCurrent(mCurrent + 1);
			if(mIncrementButton.isPressed())
			{
				repost = true;
			}
		} else if (mDecrement) {
			changeCurrent(mCurrent - 1);
			if(mDecrementButton.isPressed())
			{
				repost = true;
			}
		}
		if(repost)
		{
			mHandler.postDelayed(this, mSpeed);
		}
	}
};
</pre>
<p>I simply check if the button is still pressed before reposting the &#8220;increase&#8221; callback.</p>
<p>As for the value, if the text edit was currently being edited and the value was fetched before it lost focus, it was still returning the old value&#8230; the fix is quite simple:</p>
<pre class="brush: java; title: ; notranslate">

public int getCurrent() {
	validateInput(mText);
	return mCurrent;
}
</pre>
<p>Here&#8217;s the modified <a href="http://ericmartel.com/code/NumberPicker.java">NumberPicker.java</a> to be used with QuietlyCoding&#8217;s package, feel free to comment if you have any questions!</p>
<p>Thanks</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmartel.com/2010/07/01/working-numberpicker-and-android/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>There is no source code available for the current location</title>
		<link>http://www.ericmartel.com/2010/04/08/there-is-no-source-code-available-for-the-current-locatio/</link>
		<comments>http://www.ericmartel.com/2010/04/08/there-is-no-source-code-available-for-the-current-locatio/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 03:12:10 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.ericmartel.com/?p=129</guid>
		<description><![CDATA[If you&#8217;ve happened to use a lib with debug information, chances are that you&#8217;ve tried to step into a function and was greeted with a pop up similar to (I&#8217;ve compiled real quick FreeImage, which is an awesome library available here, to have a lib with debug information, then moved the source elsewhere because the [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve happened to use a lib with debug information, chances are that you&#8217;ve tried to step into a function and was greeted with a pop up similar to (I&#8217;ve compiled real quick FreeImage, which is an awesome library available <a href="http://freeimage.sourceforge.net/index.html">here</a>, to have a lib with debug information, then moved the source elsewhere because the pdb contains the original path the source was built from):</p>
<p><a href="http://www.ericmartel.com/wp-content/uploads/2010/04/findsource.jpg"><img class="alignnone size-full wp-image-130" title="findsource" src="http://www.ericmartel.com/wp-content/uploads/2010/04/findsource.jpg" alt="" width="571" height="456" /></a></p>
<p>If at this point, you press &#8220;Cancel&#8221;, you&#8217;ll be prompted with a pop up saying:</p>
<p><a href="http://www.ericmartel.com/wp-content/uploads/2010/04/nosource.jpg"><img class="alignnone size-full wp-image-131" title="nosource" src="http://www.ericmartel.com/wp-content/uploads/2010/04/nosource.jpg" alt="" width="503" height="199" /></a></p>
<p>Sure, no problem.</p>
<p>The thing is that once this is done, anytime you&#8217;ll try to step into a function coming from the same cpp file you just canceled the look up, you&#8217;ll be prompted with the message without being able to select the file.</p>
<p>This is really easy to fix actually.  This setting is stored in the Solution, under the Debug Source Files panel:</p>
<p><a href="http://www.ericmartel.com/wp-content/uploads/2010/04/donotlook.jpg"><img class="alignnone size-full wp-image-132" title="donotlook" src="http://www.ericmartel.com/wp-content/uploads/2010/04/donotlook.jpg" alt="" width="782" height="491" /></a></p>
<p>Simply removing the file from the &#8220;Do not look for these source files&#8221; will re enable the file selection dialog.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmartel.com/2010/04/08/there-is-no-source-code-available-for-the-current-locatio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio Commands and Aliases</title>
		<link>http://www.ericmartel.com/2010/04/08/visual-studio-commands-and-aliase/</link>
		<comments>http://www.ericmartel.com/2010/04/08/visual-studio-commands-and-aliase/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 01:56:28 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.ericmartel.com/?p=119</guid>
		<description><![CDATA[A while ago I received the visit of two programmers from a middleware company at work.  They were showing me how to properly use their software, so they had to integrate it in our solution.  The more senior one was typing while the junior was learning from him.  I saw him use something I&#8217;ve never [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I received the visit of two programmers from a middleware company at work.  They were showing me how to properly use their software, so they had to integrate it in our solution.  The more senior one was typing while the junior was learning from him.  I saw him use something I&#8217;ve never seen before so I guess I learned something too!</p>
<p>He used &#8220;&gt;&#8221; followed by &#8220;of&#8221; in the search tab, and as he typed, the drop down menu was populated by files matching his filter&#8230; hum!  I didn&#8217;t know Visual Studio had this built in, I thought you had to use Workspace Whiz or Visual Assist!</p>
<p>Here&#8217;s an example:</p>
<p><a href="http://www.ericmartel.com/wp-content/uploads/2010/04/findcommand.jpg"><img class="alignnone size-full wp-image-121" title="findcommand" src="http://www.ericmartel.com/wp-content/uploads/2010/04/findcommand.jpg" alt="" width="260" height="340" /></a></p>
<p>(screenshot taken using the BWAPI solution)</p>
<p>The prefix &gt; tells Visual Studio to interpret the rest as a command.  The actual Command Window is accessible using Ctrl-Alt-A (default binding) for those who don&#8217;t want to use the mouse  to select the &#8220;Quick Find&#8221; text box.  You can either use an Alias (such as of for Open File) or the actual command (such as File.Open).</p>
<p>Microsoft lists some commands and aliases available here but using &gt;Alias will list all the set aliases.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/c3a0kd3x.aspx">http://msdn.microsoft.com/en-us/library/c3a0kd3x.aspx</a></p>
<p>You can create aliases and remove aliases using the alias command:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/xasxzd71.aspx">http://msdn.microsoft.com/en-us/library/xasxzd71.aspx</a></p>
<p>Given that most people don&#8217;t use them at all, it is pretty standard across all PCs, so if you have to work on other people&#8217;s PCs, you should be able to use aliases instead of relying on an installed plug in!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmartel.com/2010/04/08/visual-studio-commands-and-aliase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio Plugins</title>
		<link>http://www.ericmartel.com/2009/11/05/visual-studio-plugins/</link>
		<comments>http://www.ericmartel.com/2009/11/05/visual-studio-plugins/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 00:18:55 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.ericmartel.com/?p=104</guid>
		<description><![CDATA[There&#8217;s a new programmer on my team and today I was reviewing his code.  He had this weird scrollbar in Visual Studio which displayed a preview of the code with an highlighted &#8220;window&#8221; of what was on the screen. For those who&#8217;d be interested in checking it out: RockScroll Also, the only other plugin I [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s a new programmer on my team and today I was reviewing his code.  He had this weird scrollbar in Visual Studio which displayed a preview of the code with an highlighted &#8220;window&#8221; of what was on the screen.</p>
<p>For those who&#8217;d be interested in checking it out:</p>
<p><a href="http://www.hanselman.com/blog/IntroducingRockScroll.aspx">RockScroll</a></p>
<p>Also, the only other plugin I use is Visual Assist X, you can get it here (not free though, but totally worth it!):</p>
<p><a href="http://www.wholetomato.com/">Visual Assist X</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ericmartel.com/2009/11/05/visual-studio-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

