<?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>NGPixel</title>
	<atom:link href="http://www.ngpixel.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ngpixel.com</link>
	<description>The Development Blog</description>
	<lastBuildDate>Fri, 30 Mar 2012 20:30:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Sharepoint 2010 &#8211; How to launch the new/upload file dialog from Javascript</title>
		<link>http://www.ngpixel.com/2012/02/02/sharepoint-2010-how-to-launch-the-newupload-file-dialog-from-javascript/</link>
		<comments>http://www.ngpixel.com/2012/02/02/sharepoint-2010-how-to-launch-the-newupload-file-dialog-from-javascript/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 18:55:45 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[modal]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://www.ngpixel.com/?p=285</guid>
		<description><![CDATA[If you need to brand Sharepoint to the point of hiding the ribbon, you might want to still have some functions available via custom buttons in your interface. For example, if you have a document library/list and want to create a new folder or upload a document, you would need to have a custom  [...]]]></description>
			<content:encoded><![CDATA[<p>If you need to brand Sharepoint to the point of hiding the ribbon, you might want to still have some functions available via custom buttons in your interface. For example, if you have a document library/list and want to create a new folder or upload a document, you would need to have a custom button in your interface to do so.</p>
<p>The problem is how to actually launch the Sharepoint modal dialog to use these functions from Javascript. Fortunalty, Microsoft provides the <strong>Sharepoint Object Model for Javascript</strong> which exposes most of Sharepoint functions to the client side (as long as the logged in user has access obviously).</p>
<p><u>Important:</u> In the code below, the <strong>ctx.listUrlDir </strong>variable is used to determine the relative path to the <strong>NewForm.aspx</strong> file. The variable is actually declared automatically as long as you have the list/document library webpart displayed on the page. Otherwise, you need to replace that variable with the <strong>relative path</strong> to the <strong>NewForm.aspx</strong> file.</p>
<p><strong><u>List &#8211; Create New Item</u></strong></p>
<pre class="brush:js">
SP.UI.ModalDialog.showModalDialog({
	url: ctx.listUrlDir + "/NewForm.aspx?IsDlg=1",
	title: "Create New Item"
	dialogReturnValueCallback: function() {
		window.location = window.location.href;
	}
});
</pre>
<p><strong><u>Document Library &#8211; Upload New Document</u></strong></p>
<pre class="brush:js">
var exppath = getQSParameterByName('RootFolder');
SP.UI.ModalDialog.showModalDialog({
	url: ctx.listUrlDir + "/Forms/Upload.aspx?IsDlg=1" + ((exppath != null &#038;&#038; exppath.length > 2) ? '&#038;RootFolder=' + exppath : ''),
	title: "Upload a document",
	dialogReturnValueCallback: function() {
		window.location = window.location.href;
	}
});
</pre>
<p>The <strong>getQSParameterByName</strong> function code is provided at the end of this post.</p>
<p><strong><u>Document Library &#8211; Create New Item of Custom Type</u></strong></p>
<pre class="brush:js">
var exppath = getQSParameterByName('RootFolder');
SP.UI.ModalDialog.showModalDialog({
	url: ctx.listUrlDir + "/Forms/Upload.aspx?ContentTypeId=0x012000bd2db3db2b004dda815269e70974b696&#038;IsDlg=1" + ((exppath != null &#038;&#038; exppath.length > 2) ? '&#038;RootFolder=' + exppath : ''),
	title: "Create New Custom Type Document",
	dialogReturnValueCallback: function() {
		window.location = window.location.href;
	}
 });
</pre>
<p>You must replace the value of the <strong>ContentTypeId</strong> parameter with your own!</p>
<p>The <strong>getQSParameterByName</strong> function code is provided at the end of this post.</p>
<p><strong><u>Open in Windows Explorer (IE only)</u></strong></p>
<pre class="brush:js">CoreInvoke('NavigateHttpFolder', exppath, '_blank');</pre>
<p>In most cases where a Sharepoint modal is involved, you can replicate any built-in function of the ribbon by looking at the URL called (via Firebug) and adapting the scripts above.</p>
<p><strong><u>The getQSParameterByName function:</u></strong></p>
<pre class="brush:js">
function getQSParameterByName(name) {
    var match = RegExp('[?&#038;]' + name + '=([^&#038;]*)').exec(window.location.search);
    return match &#038;&#038; decodeURIComponent(match[1].replace(/\+/g, ' '));
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ngpixel.com/2012/02/02/sharepoint-2010-how-to-launch-the-newupload-file-dialog-from-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CSS/jQuery Selector &#8211; ID with a dot</title>
		<link>http://www.ngpixel.com/2012/01/27/cssjquery-selector-id-with-a-dot/</link>
		<comments>http://www.ngpixel.com/2012/01/27/cssjquery-selector-id-with-a-dot/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 23:14:05 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[CSS/Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[dot]]></category>
		<category><![CDATA[ID]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[selector]]></category>

		<guid isPermaLink="false">http://www.ngpixel.com/?p=278</guid>
		<description><![CDATA[I had an issue today while trying to use a jQuery selector on simple div with ID &#8220;Ribbon.Read-Title&#8221;. This specific selector (#Ribbon.Read-Title) usually means that we are matching the ID &#8220;Ribbon&#8221; have the class &#8220;Read-Title&#8221;. But trying to match the ID &#8220;Ribbon.Read-Title&#8221; will simply not work with  [...]]]></description>
			<content:encoded><![CDATA[<p>I had an issue today while trying to use a jQuery selector on simple div with ID &#8220;Ribbon.Read-Title&#8221;. This specific selector (#Ribbon.Read-Title) usually means that we are matching the ID &#8220;Ribbon&#8221; have the class &#8220;Read-Title&#8221;. But trying to match the ID &#8220;Ribbon.Read-Title&#8221; will simply not work with this selector. This is also true for a CSS selector.</p>
<p>The workaround is to <strong>escape the dot with a backslash</strong>. So in the above example, you would use selector #Ribbon\.Read-Title to match the specific ID &#8220;Ribbon.Read-Title&#8221;.</p>
<p><em>Note: Contrary to what some people believe, using a dot in an ID or Name attribute is totally valid and accepted, as specified by the W3C. However, it&#8217;s easy to confuse the default selector behavior for dots.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngpixel.com/2012/01/27/cssjquery-selector-id-with-a-dot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guide to Early Cancellation Fees (ECF) in Quebec</title>
		<link>http://www.ngpixel.com/2011/10/11/guide-to-early-cancellation-fees-ecf-in-quebec/</link>
		<comments>http://www.ngpixel.com/2011/10/11/guide-to-early-cancellation-fees-ecf-in-quebec/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 23:13:27 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.ngpixel.com/?p=240</guid>
		<description><![CDATA[Note: All the info found on this page should be accurate as of October 11th 2011. However, you should ALWAYS confirm with your service provider for any fees or processes involved in getting out of a contract / early upgrade. Also, this guide only apply to contracts made AFTER June 30th 2010 in  [...]]]></description>
			<content:encoded><![CDATA[<p><em>Note: All the info found on this page should be accurate as of October 11th 2011. However, you should <strong>ALWAYS</strong> confirm with your service provider for any fees or processes involved in getting out of a contract / early upgrade. Also, this guide only apply to contracts made <strong>AFTER June 30th 2010 in Quebec ONLY</strong>. If you are in another province or your contract was signed BEFORE July 1st 2010, the rules are different and you should have a look the their terms &amp; conditions found on your service provider&#8217;s website.</em></p>
<p>So you got in a 2/3 years contract with a cellphone service provider (Fido/Rogers/Bell/Telus/Virgin) and you&#8217;re now looking to cancel your contract or upgrade to a new phone early in your contract. In the past, you usually had to pay astronomical fees in order to cancel your contract. Fortunately, since <strong>July 1st 2010</strong>, in Quebec <strong>ONLY</strong>, a new bill (Bill 60) changes the rules of early cancellation fees (known as <strong>ECF</strong> or <strong>DECF</strong>). For some reasons, it seems to be a complete mystery as to how these new rules work. It&#8217;s not explained anywhere on any service providers. So I did some research and talked to a few representives to get the details right. So here&#8217;s how it works:</p>
<p>The formula is: <strong>[rebate] &#8211; ( [rebate] * [complete months elapsed] / [contract length] )</strong></p>
<p><span style="text-decoration: underline;">Example</span></p>
<p style="padding-left: 30px;">So let&#8217;s say you bought an <strong>iPhone 4 16GB</strong> on <strong>July 30th 2010</strong> on <strong>Fido</strong>.</p>
<p style="padding-left: 30px;">The unsubsidized price of the iPhone 4 16GB is <strong>649$</strong>. But you only paid <strong>159$</strong> for it because of the <strong>3 year contract</strong>.<br />
So <strong>649$ &#8211; 159$ = 490$</strong>. This is the rebate Fido gave you (490 $). In the event you would cancel your contract right away, the <strong>maximum fee</strong> you could pay is <strong>490$</strong>. Service providers <strong>cannot</strong> charge you more than the rebate they gave you in the event you cancel your contract at any time.</p>
<p style="padding-left: 30px;">The whole formula is based on this number. Now divide the rebate by the length of your contract (in months).<br />
For a 3 year contract (36 months), you should do <strong>490$ / 36 = 13.61$</strong>. This is the amount that is withdrawn from the rebate for every month you complete.<br />
So if you cancel after 2 complete months in your contract, the maximum fee you will have to pay is <strong>462.78$</strong> (= 490$ &#8211; ( 2 x 13.61$ ) ).<br />
The longer you stay in the contract, the lower the maximum fee will be. Obviously, after 36 months, the amount reaches <strong>0$</strong>.</p>
<p style="padding-left: 30px;">So to get back to the formula I wrote earlier, if you cancel after 12 completed months in your 3 years contract, the ECF you will need to pay is:</p>
<p style="padding-left: 30px;"><strong>490 &#8211; (490 * 12 / 36) = 326.67$</strong></p>
<p><span style="text-decoration: underline;">What is ECF and DECF?</span></p>
<p style="padding-left: 30px;"><strong>ECF</strong> (Early Cancellation Fee) and <strong>DECF</strong> (Data Early Cancellation Fee) are usually both present if you have Voice + Data plan. The rebate explained earlier is usually split in 2. For the iPhone 4 16GB on Fido, the <strong>ECF is 200$</strong> while the <strong>DECF is 290$</strong> (for a <strong>total of 490$</strong>, the maximum fee a service provider can charge you!). If you cancel your contract completely or ugprade to a new phone early, simply follow the formula outlined above as the ECF and DECF is combined.</p>
<p style="padding-left: 30px;">However, should you want to <strong>cancel only the Data plan</strong> while keeping your Voice plan, you will need to pay the <strong>DECF only</strong>. You will need to confirm with your service provider for the exact amount as the ratio is different for every phone and provider. For example, if you want to cancel your Data plan after 12 completed months (of your 3 years contract) and the DECF is 290$, the maximum fee you can pay is:</p>
<p style="padding-left: 30px;"><strong>290 &#8211; (290 * 12 / 36) = 193.33$</strong></p>
<p style="padding-left: 30px;">The same formula applies to Voice plans (ECF).</p>
<p><span style="text-decoration: underline;">What if I didn&#8217;t get a rebate on the phone/equipment?</span></p>
<p style="padding-left: 30px;">In the event you want to cancel a contract but you didn&#8217;t get any rebate for the cell phone equipment, the maximum fee you can pay is the <strong>lesser of 50$ or 10% of the total amount yet to be paid for the services</strong>. For example, let&#8217;s say you have a monthly plan of 30$ and you want to cancel after 12 months:</p>
<p style="padding-left: 30px;"><strong>10% of (24 months remaining * 30$ plan) = 72$</strong></p>
<p style="padding-left: 30px;">But wait! 72$ is <strong>exceeding</strong> the maximum fee of 50$. Therefor, <strong>50$ is the maximum</strong> to paid during a cancellation.</p>
<p><span style="text-decoration: underline;">Conclusion</span></p>
<p>Hopefully, this makes it easier for Quebec residents to understand the new bill concerning early cancellation fees.<br />
Like I said earlier, make sure you contact your service provider to confirm the fees to be paid if you cancel / early upgrade.<br />
As we all know, these companies are experts at hiding fees in every corner&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngpixel.com/2011/10/11/guide-to-early-cancellation-fees-ecf-in-quebec/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How to install Windows 8 on a VHD (or Windows 7/2008 R2)</title>
		<link>http://www.ngpixel.com/2011/09/16/how-to-install-windows-8-on-a-vhd-or-windows-72008-r2/</link>
		<comments>http://www.ngpixel.com/2011/09/16/how-to-install-windows-8-on-a-vhd-or-windows-72008-r2/#comments</comments>
		<pubDate>Sat, 17 Sep 2011 02:44:05 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[vhd]]></category>
		<category><![CDATA[windows 8]]></category>

		<guid isPermaLink="false">http://www.ngpixel.com/?p=236</guid>
		<description><![CDATA[In this guide, I will explain how to install Windows 8 on a VHD (Virtual Hard Disk). This methods lets you have a second (or many more) bootable operating systems without having to dedicate a complete partition for every OS installed (and without affecting your current Windows installation!). A VHD  [...]]]></description>
			<content:encoded><![CDATA[<p>In this guide, I will explain how to install Windows 8 on a VHD (Virtual Hard Disk). This methods lets you have a second (or many more) bootable operating systems without having to dedicate a complete partition for every OS installed (and without affecting your current Windows installation!). A VHD is essentially a complete partition contained within a single file on the disk. Don&#8217;t want that OS anymore? Simply delete the .VHD file and you&#8217;re done. Quick and simple.</p>
<p>Now where VHD becomes handy is in testing the new developer preview builds of Windows 8. Note that this method will work on future builds of Windows 8 (Beta, RC and final) as well as Windows 7 and Windows Server 2008 R2. For the purposes of this guide, I&#8217;ll assume you currently have Windows 7 installed natively on your machine and want to install the Windows 8 Developer Preview on a VHD. Before we start, you should have already burned the installation ISO of Windows 8 to a DVD or made a bootable USB installation media.</p>
<p><strong><span style="text-decoration: underline;">A) Create a new empty VHD</span></strong></p>
<p>A.1) Launch the <strong>Computer Management</strong> console (found in Control Panel &gt; Administrative Tools).<br />
A.2) Right-click on <strong>Disk Management</strong> (under Storage) and choose <strong>Create VHD</strong>. <em>(Note: You might need to click on Disk Management first, then wait for it to load before you can have the contextual menu with the Create VHD option.)</em><br />
A.3) Enter the <strong>location</strong> of the .VHD file. I <strong>HIGHLY</strong> recommend to place this file on the <strong>root</strong> of any disk. Note that you will need to <strong>remember the path</strong> of this file for use later in this guide.<br />
A.4) Enter the <strong>disk space</strong> (80GB is usually good for most uses) and choose the <strong>Fixed</strong> size format.<br />
A.5) Click <strong>OK</strong> and <strong>wait</strong> for the VHD creation to complete (displayed in the window footer). It usually takes about 5-15 minutes to complete.</p>
<p><strong><span style="text-decoration: underline;">B) Install Windows 8 on the VHD</span></strong></p>
<p>B.1) Reboot the computer with the installation disk (or USB drive) inserted and boot from it.<br />
B.2) On the first installation screen, choose the language options, then click <strong>Install Now</strong>.<br />
B.3) Accept the license agreement and then choose <strong>Custom Installation</strong>.<br />
B.4) On this screen, a list of available partitions/disks are displayed. But it&#8217;s missing the VHD we created earlier. This is because we need to attach it first.<br />
B.5) Press <strong>SHIFT + F10</strong>, a command prompt window will appear.<br />
B.6) Type the following command: <strong>diskpart</strong><br />
B.7) Then type the command (replace win8.vhd with the name of your VHD): <strong>select vdisk file=C:\win8.vhd</strong><br />
<em>&#8212;&gt; Got an error? This is because the drive letters may not be assigned in the same order as in Windows. Fortunately, the setup lists them starting from letter C and going up. So try the command again but this time using D:\win8.vhd, then E:\win8.vhd, etc. until it works.</em><br />
B.8) Once you get a successful message, type the command: <strong>attach vdisk</strong><br />
B.9) Once your VHD is attached, type <strong>exit</strong>, then again <strong>exit</strong> to close the command prompt.<br />
B.10) On the screen, click the <strong>Refresh</strong> button. After a few seconds, your VHD should now appear in the list.<br />
B.11) <strong>Select</strong> the VHD and click <strong>Next</strong>. (<em>Note: A warning might be displayed at the bottom saying Windows can&#8217;t install to this drive. Ignore it!</em>)<br />
B.12) Continue to install Windows 8 as usual, following the on-screen instructions.</p>
<p>And you&#8217;re done! The whole Windows 8 OS is now contained within a single isolated file on your disk.<br />
During the boot process, you will have the option to choose between your Windows 7 or Windows 8 installation. Simply select the OS you want to use!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngpixel.com/2011/09/16/how-to-install-windows-8-on-a-vhd-or-windows-72008-r2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hyper-V &#8211; Remote desktop to your own host limitations</title>
		<link>http://www.ngpixel.com/2011/08/29/hyper-v-remote-desktop-to-your-own-host-limitations/</link>
		<comments>http://www.ngpixel.com/2011/08/29/hyper-v-remote-desktop-to-your-own-host-limitations/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 02:04:34 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[hyper-v]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[network adapters]]></category>

		<guid isPermaLink="false">http://www.ngpixel.com/?p=225</guid>
		<description><![CDATA[In order to boost our development capabilities at work, we recently moved an Hyper-V solution on a VHD host. The host system is a standard Windows Server 2008 R2 system (running from a bootable VHD). We then use Hyper-V to create virtual machines with various configurations for development  [...]]]></description>
			<content:encoded><![CDATA[<p>In order to boost our development capabilities at work, we recently moved an <strong>Hyper-V</strong> solution on a VHD host. The host system is a standard Windows Server 2008 R2 system (running from a bootable VHD). We then use Hyper-V to create virtual machines with various configurations for development purposes.</p>
<p><strong><span style="text-decoration: underline;">Hyper-V and its basic virtual VGA adapter</span></strong></p>
<p>The great thing about Hyper-V is that you can boot your VMs and let them run in the background. Should you need to see what&#8217;s going on (like a real monitor attached to a physical PC), you can use the built-in &#8220;<strong>Connect&#8230;</strong>&#8221; feature to see the VM screen. Hyper-V is using a <strong>basic VGA adapter</strong> to achieve that, which results in a <strong>4:3 low resolution</strong> display of the VM. If you&#8217;re using that remote screen for development purposes, it&#8217;s quite counter-productive and annoying. Which is where the standard Remote Desktop (mstsc.exe) comes handy.</p>
<p><strong><span style="text-decoration: underline;">Isn&#8217;t that great when your host and VM can&#8217;t talk to each other?</span></strong></p>
<p>The first thing I get while trying to connect to a VM running on my host is a &#8220;<strong>Not found</strong>&#8221; error. Sure enough, my VM has network access and so has my host. My colleagues can ping my VMs (and vice-versa) just fine, but impossible to ping the host from the VM or the VM from the host.</p>
<p><strong><span style="text-decoration: underline;">Don&#8217;t put your VMs on the same network adapter as your host&#8230;</span></strong></p>
<p>Turns out it&#8217;s not a good idea to use the <strong>same network adapter</strong> for Hyper-V and your host. Even though your VMs have completely different and unique MAC and IP address, the packets are still trying to get in and out of the same physical interface which is a no-go. The solution was to use a <strong>second PCI-Express gigabit card</strong> (or a PCI) to add a second physical network adapter. The host is using the main network adapter while Hyper-V uses the second adapter. Now it all works perfectly.</p>
<p>I&#8217;ve seen some complex tutorials about creating <strong>local loopbacks adapters</strong> with NAT translation in order to use only 1 adapter and frankly, it doesn&#8217;t seem work the effort and it might affect performance in the end. So there you go, use <strong>2 physical adapters</strong> for Hyper-V.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngpixel.com/2011/08/29/hyper-v-remote-desktop-to-your-own-host-limitations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac App Store &#8211; &#8220;You have updates available for other accounts&#8221; bug</title>
		<link>http://www.ngpixel.com/2011/06/25/mac-app-store-you-have-updates-available-for-the-other-accounts-bug/</link>
		<comments>http://www.ngpixel.com/2011/06/25/mac-app-store-you-have-updates-available-for-the-other-accounts-bug/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 23:39:49 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[mac app store]]></category>
		<category><![CDATA[spotlight]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://www.ngpixel.com/?p=215</guid>
		<description><![CDATA[I had a rather major issue with the Mac App Store concerning the updates. In the Purchases tab, I could see the apps I had previously downloaded but when I clicked the Update button for each of them, I would get the error message &#8220;You have updates available for other accounts&#8230;&#8221; inviting me to sign  [...]]]></description>
			<content:encoded><![CDATA[<p>I had a rather major issue with the Mac App Store concerning the updates. In the Purchases tab, I could see the apps I had previously downloaded but when I clicked the <strong>Update</strong> button for each of them, I would get the error message &#8220;<strong>You have updates available for other accounts&#8230;</strong>&#8221; inviting me to sign in into the &#8220;other&#8221; account. The problem is that I only have 1 Apple ID and always used this ID.</p>
<p>After contacting the Apple Support, all I got was a <strong>totally useless</strong> response about re-installing iTunes and that might fix the problem. Even though I knew iTunes had absolutely nothing to do with the Mac App Store, I still followed their instructions and re-installed iTunes. Guess what, it didn&#8217;t fix the issue at all. Thanks for your support Apple&#8230;not. A few posts in Apple support forums have suggested deleting the apps and re-install them. While it works, it&#8217;s not really convenient.</p>
<p>It turns out the issue is related to <strong>Spotlight</strong>. Apparently, the Mac App Store use the Spotlight index to find which applications are installed on your Mac. So if for some reasons the spotlight index is empty, corrupted or disabled, the Updates tab will always be empty and you&#8217;ll get the error message discussed above every single time you try to update your apps. Depending on what makes your spotlight index buggy, there&#8217;s various fixes:</p>
<p><strong><u>Solution 1 &#8211; Spotlight works but the index is incomplete or empty:</u></strong></p>
<p>1) Open <strong>System Preferences</strong> > <strong>Spotlight</strong><br />
2) Under the <strong>Privacy</strong> tab. Add your <strong>Macintosh HD</strong> (or whatever your main hard disk is called) to the list.<br />
3) Close the window. <strong>Wait</strong> a few seconds. Then go back to <strong>Spotlight settings</strong> and <strong>remove the entry</strong> you just added.<br />
4) The spotlight index should now begin to <strong>re-index</strong> completely. (A dot will fade-in/out inside the Spotlight icon in the taskbar)<br />
5) <strong>Wait</strong> for it to finish and then launch the Mac App Store. You should now see updates in the <strong>Updates</strong> tab.</p>
<p><strong><u>Solution 2 &#8211; Spotlight indexing is disabled (frequent on Mac OS X Server)</u></strong></p>
<p>1) Open a <strong>Terminal</strong> window.<br />
2) Type the following command: <strong>sudo mdutil -i on /</strong><br />
3) A message saying &#8220;Indexing enabled.&#8221; should appear after a few seconds.<br />
4) <strong>Close</strong> the Terminal window and the <strong>Spotlight indexing</strong> should now start automatically. (Again, a dot will appear inside the Spotlight icon during the indexing process)<br />
5) <strong>Wait</strong> for it to finish and then launch the Mac App Store. You should now see updates in the <strong>Updates</strong> tab.</p>
<p>It would be a good thing for Apple developers to check if the spotlight index is OK before displaying a completely useless error message to the user&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngpixel.com/2011/06/25/mac-app-store-you-have-updates-available-for-the-other-accounts-bug/feed/</wfw:commentRss>
		<slash:comments>49</slash:comments>
		</item>
		<item>
		<title>Sharepoint 2010 &#8211; Tableless webparts guide</title>
		<link>http://www.ngpixel.com/2011/05/30/sharepoint-2010-tableless-webparts-guide/</link>
		<comments>http://www.ngpixel.com/2011/05/30/sharepoint-2010-tableless-webparts-guide/#comments</comments>
		<pubDate>Mon, 30 May 2011 12:11:32 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[tableless]]></category>
		<category><![CDATA[webparts]]></category>

		<guid isPermaLink="false">http://www.ngpixel.com/?p=202</guid>
		<description><![CDATA[Learn how to remove tables around WebParts and WebPartZones in Sharepoint 2010...]]></description>
			<content:encoded><![CDATA[<p>If you tried to create even simple page layouts, you probably noticed the mess Sharepoint creates with tables when placing webpartzones and webparts in the page. While searching about a way to remove completely these tables, I found an interesting <a href="http://blog.sharepoint.ch/2007/12/webpartzone-adapter.html">solution</a> by David Schneider, which removes tables completely <strong>but creates a new whole set of issues with Sharepoint</strong>. While the tables are removed around webparts and webpartzones, it breaks functionality of the ribbon in lists and some ajax functionnality on default Sharepoint controls. Not really convenient.</p>
<p>Fortunately, with the help of a colleague, we found a way to remove the tables only on defined webpartzones. Zones marked with a property called <strong>tableless=&#8221;true&#8221;</strong> will be stripped from their tables while all other Sharepoint controls won&#8217;t be affected at all.</p>
<p>So what needs to be done in order to get this functionnality? Follow these steps:</p>
<p>1) Copy the following modified C# code (notice the <strong>tableless</strong> property that was added to David Schneider&#8217;s <a href="http://blog.sharepoint.ch/2007/12/webpartzone-adapter.html">solution</a>) in a file called <strong>AKS_WebPartZone_Adapter.cs</strong> and place it in the <strong>AppCode</strong> directory  under your server root directory   (like <em>C:\Inetpub\wwwroot</em> or  <em>C:\Inetpub\wwwroot\wss\VirtualDirectories\80</em>).</p>
<pre class="brush:csharp">using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using System.IO;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebPartPages;

/// WebPartZone Adapter
/// Created by David Schneider
/// http://blog.sharepoint.ch
/// Based on AKS

namespace AKSAdapters
{
  public class AKS_WebPartZone_Adapter : System.Web.UI.Adapters.ControlAdapter
  {
      protected override void Render(HtmlTextWriter writer)
      {
          bool inEditMode = false;
          System.Web.UI.WebControls.WebParts.WebPartZone wpz = Control as System.Web.UI.WebControls.WebParts.WebPartZone;
          if (wpz != null &amp;&amp; wpz.Attributes["tableless"] != null)
          {
              SPWebPartManager swpm = (SPWebPartManager)SPWebPartManager.GetCurrentWebPartManager(wpz.Page);
              inEditMode = !swpm.GetDisplayMode().AllowPageDesign;
          }
          if (inEditMode)
          {
              // Render the WebPartZone
              writer.Indent++;
              writer.AddAttribute(HtmlTextWriterAttribute.Id, wpz.ID);
              if (!String.IsNullOrEmpty(wpz.CssClass))
              {
                  writer.AddAttribute(HtmlTextWriterAttribute.Class, wpz.CssClass);
              }
              if (wpz.LayoutOrientation == System.Web.UI.WebControls.Orientation.Horizontal)
              {
                  writer.AddAttribute(HtmlTextWriterAttribute.Class, "AspNet-WebPartZone-Horizontal");
              }
              else if (wpz.LayoutOrientation == System.Web.UI.WebControls.Orientation.Vertical)
              {
                  writer.AddAttribute(HtmlTextWriterAttribute.Class, "AspNet-WebPartZone-Vertical");
              }
              writer.RenderBeginTag(HtmlTextWriterTag.Div);
              writer.Indent++;

              // Render the web parts
              if (wpz.WebParts.Count &gt; 0)
              {
                  WebPartCollection wpColl = new WebPartCollection(wpz.WebParts);

                  foreach (System.Web.UI.WebControls.WebParts.WebPart wp in wpColl)
                  {
                      writer.WriteLine();
                      writer.AddAttribute(HtmlTextWriterAttribute.Class, "AspNet-WebPart");
                      writer.RenderBeginTag(HtmlTextWriterTag.Div);

                      wp.RenderControl(writer);
                      writer.RenderEndTag(); // Div
                      writer.Indent++;
                  }
              }
              writer.RenderEndTag(); // Div

              writer.Indent--;
              writer.WriteLine();
          }
          else
          {
              // If we are editing the page --&gt; render the web part as usual.
              base.Render(writer);
          }
      }
  }
}</pre>
<p>2) Edit the <strong>compat.browser</strong> file which in the <strong>AppBrowser</strong> directory located in your server directory and add the following piece of code after the opening tag:</p>
<pre class="brush:xml"><browser refID="Default">
<controlAdapters>
<adapter controlType="System.Web.UI.WebControls.WebParts.WebPartZone"
adapterType="AKSAdapters.AKS_WebPartZone_Adapter" />
</controlAdapters>
</browser></pre>
<p>3) In your page layouts, add the property <strong>tableless=&#8221;true&#8221;</strong> to all your <strong>WebPartZones</strong>.</p>
<p>Your pages will then be free of tables without affecting core Sharepoint functionality such as the ribbon and other editing functions. Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngpixel.com/2011/05/30/sharepoint-2010-tableless-webparts-guide/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Windows 7 &#8211; Fix the explorer not auto-refreshing bug</title>
		<link>http://www.ngpixel.com/2011/05/29/windows-7-fix-the-explorer-not-auto-refreshing-bug/</link>
		<comments>http://www.ngpixel.com/2011/05/29/windows-7-fix-the-explorer-not-auto-refreshing-bug/#comments</comments>
		<pubDate>Sun, 29 May 2011 05:59:05 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[auto-refresh]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[windows 7]]></category>

		<guid isPermaLink="false">http://www.ngpixel.com/?p=204</guid>
		<description><![CDATA[One of the most irritating bug still present in Windows 7 is explorer not auto-refreshing when creating a new folder or copying/moving/renaming a file. The apparent cause to this problem is when you map network drives in My Computer. Turns out the fix is quite simple (or at least it worked for  [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most irritating bug still present in Windows 7 is explorer not auto-refreshing when creating a new folder or copying/moving/renaming a file. The apparent cause to this problem is when you map network drives in My Computer. Turns out the fix is quite simple (or at least it worked for me):</p>
<p>1) Open <strong>My Computer</strong> and click <strong>Organize &gt; Folder and Search Options</strong></p>
<p>2) Under the <strong>View</strong> tab, uncheck the <strong>Hide protected operating system files (recommended)</strong> option.</p>
<p>3) On your desktop, you should now see 1 or more <strong>Desktop.ini</strong> files. <strong>Delete</strong> all of them (no, it won&#8217;t break your system, they are auto-generated).</p>
<p>4) <strong>Reboot</strong> your computer. Problem solved!</p>
<p><em>Note:</em> I still get the bug when copying or moving files from a network drive but anything done locally on the computer seems to work again.<br />
You might want to re-check that setting in Folder and Search Options once you&#8217;re done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngpixel.com/2011/05/29/windows-7-fix-the-explorer-not-auto-refreshing-bug/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>C# &#8211; Keep user settings between versions</title>
		<link>http://www.ngpixel.com/2011/05/05/c-keep-user-settings-between-versions/</link>
		<comments>http://www.ngpixel.com/2011/05/05/c-keep-user-settings-between-versions/#comments</comments>
		<pubDate>Thu, 05 May 2011 17:00:27 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[csharp]]></category>
		<category><![CDATA[user settings]]></category>

		<guid isPermaLink="false">http://www.ngpixel.com/?p=197</guid>
		<description><![CDATA[Unless you&#8217;re using the ClickOnce deployment method for your applications, user settings are usually not transferred when updating to a new version of a C# desktop application. There&#8217;s in fact a quick and simple way to always keep the settings between versions.
The trick is to call the .upgrade()  [...]]]></description>
			<content:encoded><![CDATA[<p>Unless you&#8217;re using the ClickOnce deployment method for your applications, user settings are usually not transferred when updating to a new version of a C# desktop application. There&#8217;s in fact a quick and simple way to always keep the settings between versions.</p>
<p>The trick is to call the <strong>.upgrade()</strong> method your app settings object. The system will look for previous versions of your application in the App Data directory and copy the user settings to the new version automatically.</p>
<pre class="brush:csharp">Properties.Settings.Default.Upgrade();</pre>
<p>But now we have a problem. How do you know when the upgrade method should be called? As we don&#8217;t want to upgrade everytime the application is started, but only the first time after an upgrade. The solution is to create a new user settings variable that will be used to determine whether an upgrade is required. You can either make it a <strong>string</strong> and save the <strong>current application version</strong>, or make it a <strong>boolean</strong> and set it to <strong>True</strong> by default. I personally find the boolean method easier to use and this is the one I will explain below:</p>
<p>In your application load function (private void Window_Loaded in WPF), simply use this code:</p>
<pre class="brush:csharp">if (Properties.Settings.Default.UpdateSettings)
{
   Properties.Settings.Default.Upgrade();
   Properties.Settings.Default.UpdateSettings = false;
   Properties.Settings.Default.Save();
}</pre>
<p>It is important to place this code <strong>before</strong> anything else that use the user settings in the load method. In the above example, <strong>UpdateSettings</strong> is the user setting variable I created and set to <strong>True</strong> by default. When the application launch, it will check whether the <strong>UpdateSettings</strong> variable is set to <strong>True</strong>. If it&#8217;s the case, it will perform an upgrade. We then set the variable to <strong>False</strong> so that it doesn&#8217;t perform an upgrade the next time. Finally, we save the new settings. Why does it work? Because we set the user setting to <strong>True by default</strong> which will only occur after a new installation of the application.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngpixel.com/2011/05/05/c-keep-user-settings-between-versions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Sharepoint &#8211; Masterpage User Controls Limit</title>
		<link>http://www.ngpixel.com/2011/03/15/sharepoint-masterpage-user-controls-limit/</link>
		<comments>http://www.ngpixel.com/2011/03/15/sharepoint-masterpage-user-controls-limit/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 18:01:17 +0000</pubDate>
		<dc:creator>Nick</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[masterpage]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[user control]]></category>

		<guid isPermaLink="false">http://www.ngpixel.com/?p=188</guid>
		<description><![CDATA[If you insert more than 10 user controls in a masterpage, you might get an error similar to this:
The page &#8216;/path/somefile.master&#8217; allows a limit of 11 direct dependencies, and that limit has been exceeded.
You can easily increase that limit as it is actually set in your sharepoint web.config:
1)  [...]]]></description>
			<content:encoded><![CDATA[<p>If you insert more than 10 user controls in a masterpage, you might get an error similar to this:</p>
<p><span style="color: #800000;"><strong>The page &#8216;/path/somefile.master&#8217; allows a limit of 11 direct dependencies, and that limit has been exceeded.</strong></span></p>
<p>You can easily increase that limit as it is actually set in your sharepoint <strong>web.config</strong>:</p>
<p>1) Browse to <strong>C:\inetpub\wwwroot\wss\VirtualDirectories\</strong></p>
<p>2) Open the folder corresponding to your Sharepoint website.</p>
<p>3) Edit the file <strong>web.config</strong></p>
<p>4) Do a search for &#8220;<strong>safemode</strong>&#8220;.</p>
<p>5) Change the property <strong>DirectFileDependencies</strong> from <strong>10</strong> to a value your choice.</p>
<p>6) Do an <strong>iisreset</strong> command and you&#8217;re done!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ngpixel.com/2011/03/15/sharepoint-masterpage-user-controls-limit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

