<?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>Ex nihilo nihil fit &#187; Tips</title> <atom:link href="http://victorhurdugaci.com/category/tips/feed/" rel="self" type="application/rss+xml" /><link>http://victorhurdugaci.com</link> <description>Victor Hurdugaci&#039;s playground</description> <lastBuildDate>Wed, 18 Apr 2012 16:29:21 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <item><title>Expression evaluation</title><link>http://victorhurdugaci.com/expression-evaluation/</link> <comments>http://victorhurdugaci.com/expression-evaluation/#comments</comments> <pubDate>Thu, 27 May 2010 17:44:33 +0000</pubDate> <dc:creator>Victor</dc:creator> <category><![CDATA[C#]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[Bug]]></category> <category><![CDATA[Coding]]></category> <category><![CDATA[Evaluation]]></category> <category><![CDATA[Expression]]></category> <category><![CDATA[Java]]></category> <guid
isPermaLink="false">http://victorhurdugaci.com/?p=2035</guid> <description><![CDATA[Let&#8217;s start with a simple quiz: 7/2 = &#8230; . Of course is 3.5 but is this also true for code? If you somehow use a non-fractional data type for storing the result, you will always get the result 3. And that should not surprise you. However, if you choose to use a fractional data [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: justify;">Let&#8217;s start with a simple quiz: 7/2 = &#8230; . Of course is 3.5 but is this also true for code?</p><p
style="text-align: justify;">If you somehow use a non-fractional data type for storing the result, you will always get the result 3. And that should not surprise you.</p><pre class="brush: csharp; light: true; title: ; notranslate">
int result = 7/2; //expression is 3
</pre><p
style="text-align: justify;">However, if you choose to use a fractional data type, things will change &#8230;</p><pre class="brush: csharp; light: true; title: ; notranslate">
double result = 7/2;
</pre><p
style="text-align: justify;">&#8230; or not. The value stored in the variable <em>result</em> is still 3 (actually 3.0 or something really close to 3.0 &#8211; since floating point data types store the approximation of a number).</p><p
style="text-align: justify;">Why is this happening?<br
/> <span
id="more-2035"></span><br
/> Let&#8217;s take a look at the expression, <em>result = 7/2</em>. There are two operators: / and =. Based on their precedence, the first evaluated is the division operator; it is a binary operator so, it has two operands. The general definition of the / operator in C# is:</p><pre class="brush: csharp; light: true; title: ; notranslate">
public static TYPE1 operator /(TYPE2 op1, TYPE3 op2)
</pre><p
style="text-align: justify;">In our case 7 and 2 need to be matched to TYPE2 and TYPE3. In most languages, the operators for primitive types are defined only for the same type of operands (TYPE2 = TYPE3). In this way, for <em>n</em> types <em>n</em> operator overloads have to be defined, otherwise it could go up to <em>n<sup>2</sup></em> overloads.</p><p
style="text-align: justify;">The compiler will try to match the operands with one of the operator signatures. In our case, both operands are integer so, it will call <em>operator / (int, int)</em> which returns <em>int</em> (!!). The expression on the right hand side (RHS) of = is evaluated as an <em>int</em>.</p><p
style="text-align: justify;">After that, the = operator will be evaluated. Because its RHS operand is an <em>int</em>, a conversion will be performed to <em>double</em>, in order to match the type of the left hand side of the operator. At this point, is to late to get the fractional part because it was already disposed. The final result will be an integer represented as a double.</p><p
style="text-align: justify;">The following drawing shows the abstract syntax tree and its evaluation for the previously mentioned expression.</p><p
style="text-align: center;"><a
href="http://victorhurdugaci.com/wp-content/uploads/2010/05/AST1.jpg"><img
class="aligncenter size-large wp-image-2047" title="AST1" src="http://victorhurdugaci.com/wp-content/uploads/2010/05/AST1-1024x581.jpg" alt="" width="740" height="430" /></a></p><p
style="text-align: justify;">In order to fix the problem, you need to explicitly state that a certain part of the expression must be evaluated as double. The best way to do this is to make one of the operands double. For example:</p><pre class="brush: csharp; light: true; title: ; notranslate">
double r1 = 7.0/2;
double r2 = 7/2.0;
double r3 = 7.0/2.0;
double r4 = 7d/2d;
double r5 = ((double)5)/2; //This is not recommended but will work
</pre><p
style="text-align: justify;">In this above cases, the conversion node will be evaluated sooner, before any precision is lost, hence allowing you to get the expected result. The next image shows the AST for the expression <em>double result = 7 / 3.0</em>.</p><p><a
href="http://victorhurdugaci.com/wp-content/uploads/2010/05/AST2.jpg"><img
src="http://victorhurdugaci.com/wp-content/uploads/2010/05/AST2-1024x593.jpg" alt="" title="AST2" width="740" height="430" class="aligncenter size-large wp-image-2053" /></a></p><p
style="text-align: justify;">Understanding how an expression is evaluated is very important because non trivial statement can make your life harder. Take a look at the following examples and try to guess the results (r4 is similar to a bug we encountered).</p><pre class="brush: csharp; light: true; title: ; notranslate">
double r1 = 7 / 2;
double r2 = 6.0 + 7 / 2;
double r3 = 5 / 2 + 7 / 2;
double r4 = DateTime.Now.Millisecond * (1000 / 3600);
double r5 = 6.5 / (1 / 2);
double r6 = 10.0 * (1 / 2);
double r7 = 11.0 * 1 / 2;
</pre>]]></content:encoded> <wfw:commentRss>http://victorhurdugaci.com/expression-evaluation/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Tip #8: Make Firefox Better</title><link>http://victorhurdugaci.com/tip-8-make-firefox-better/</link> <comments>http://victorhurdugaci.com/tip-8-make-firefox-better/#comments</comments> <pubDate>Thu, 24 Dec 2009 10:21:45 +0000</pubDate> <dc:creator>Victor</dc:creator> <category><![CDATA[Intermediate]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[Tutorial]]></category> <category><![CDATA[extension]]></category> <category><![CDATA[Firefox]]></category> <category><![CDATA[Mozilla]]></category> <category><![CDATA[tweak]]></category> <guid
isPermaLink="false">http://victorhurdugaci.com/?p=1681</guid> <description><![CDATA[What I want from a browser To show the pages correctly To show as much as possible from a page (to remove the need of scrolling) To provide me with an easy way of accessing pages. What I don&#8217;t like at Firefox The search bar is superfluous. I really like what Chrome is doing (and [...]]]></description> <content:encoded><![CDATA[<h3 style="text-align: justify;">What I want from a browser</h3><ol
style="text-align: justify;"><li>To show the pages correctly</li><li>To show as much as possible from a page (to remove the need of scrolling)</li><li>To provide me with an easy way of accessing pages.</li></ol><h3 style="text-align: justify;">What I don&#8217;t like at Firefox</h3><ul
style="text-align: justify;"><li>The search bar is superfluous. I really like what Chrome is doing (and the latest version of Opera?): use the address bar as search bar.</li><li>There is no ad blocker</li><li>There is a lot of wasted space: bookmarks toolbar, menu bar (just think how often you use the top menu), big icons</li></ul><p
style="text-align: justify;">After a few tweaks I got a browser looking like the one in the picture below that satisfies almost all my needs.</p><p
style="text-align: center;"><a
href="http://victorhurdugaci.com/wp-content/uploads/2009/12/firefox-details.jpg"><img
class="aligncenter size-large wp-image-1688" title="firefox" src="http://victorhurdugaci.com/wp-content/uploads/2009/12/firefox-1024x574.jpg" alt="" width="717" height="402" /></a></p><h3 style="text-align: justify;">Tweaks applied and how/why to use them</h3><p><span
id="more-1681"></span></p><ol
style="text-align: justify;"><li><strong>Remove the bookmark toolbar. </strong>You just don&#8217;t need that bar! How often do you click a bookmark? If you need a page opened all the time you just don&#8217;t close it. Why do you minimize the working are just to see some buttons that you click them in an infinite small amount of the time you spend in browser? <strong>How to apply:</strong> right click the menu bar -&gt; Uncheck Bookmarks Toolbar.</li><li><strong>Remove the menu bar. </strong>Just like the bookmark toolbar, you don&#8217;t use it to often. If you want to see it just press Alt+F. <strong>How to apply: </strong>Install the <a
href="https://addons.mozilla.org/en-US/firefox/addon/4762" target="_blank">Hide Menubar extension</a>.</li><li><strong>Merge address bar and search bar. </strong>Is not practical to need to think if you want to search or you want to enter an a priori known address. There should be just on input field and the browser should be able to decide if you want to search or go to some specific place. <strong>How to apply: </strong>First remove the search bar by right clicking the menubar -&gt; Customize and drag the search bar out of the menu. Second navigate to &#8220;about:config&#8221; and search for &#8220;keywork.url&#8221;. Replace its value with &#8220;http://google.com/search?q=&#8221;. This will make Firefox search on Google when it cannot resolve a name.</li><li><strong>Remove ads.</strong> Most of the time you just don&#8217;t want to see &#8220;Super/Extra/Mega/Ultra discount for X&#8221;. Also you don&#8217;t want to see links that are on top of the search list just because they paid. <strong>How to apply: </strong>Install the <a
href="https://addons.mozilla.org/en-US/firefox/addon/1865" target="_blank">Adblock Plus extension</a>.</li><li><strong>Move icons and make them smaller. </strong>This is just a personal preference. I want the bookmarks button in the left corner. And in order to maximize working area I want small icons. <strong>How to apply: </strong>Right click a toolbar -&gt; Customize. Drag/drop the icons you want. For small icons check the appropriate box.</li><li><strong>Mouse gestures. </strong>I like the back button on the toolbar because of the drop down menu but usually I go back by holding the right mouse button and dragging left. The gesture functionality saves a lot of time and movement. <strong>How to apply: </strong>Install the <a
href="https://addons.mozilla.org/en-US/firefox/addon/6366" target="_blank">FireGesture extension</a>.</li><li
style="text-align: justify;"><strong>Protect/sync bookmarks. </strong>Sometimes one might accidentally delete an important bookmark or, even worse, the entire bookmark collection. Is a good idea to backup bookmarks online. This also gives you the possibility of synchronizing bookmarks across multiple machines. <strong>How to apply: </strong>Install the <a
href="https://addons.mozilla.org/en-US/firefox/addon/2410" target="_blank">Xmarks extension</a>.</li></ol><h3>Future work</h3><ol><li><strong>Remove the status bar. </strong>Currently this cannot be done because there is no other way of knowing where a link is sending. Any suggestion?</li><li><strong>Remove the tabs bar. </strong>The tabs bar should be removed in order to get more space but I have no idea where it could go&#8230;</li></ol> ]]></content:encoded> <wfw:commentRss>http://victorhurdugaci.com/tip-8-make-firefox-better/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Tip #7: VMWare Unity View</title><link>http://victorhurdugaci.com/tip-7-vmware-unity-view/</link> <comments>http://victorhurdugaci.com/tip-7-vmware-unity-view/#comments</comments> <pubDate>Sun, 25 Oct 2009 19:12:32 +0000</pubDate> <dc:creator>Victor</dc:creator> <category><![CDATA[Tips]]></category> <category><![CDATA[Fedora]]></category> <category><![CDATA[Virtualization]]></category> <category><![CDATA[VMWare]]></category> <category><![CDATA[Windows 7]]></category> <category><![CDATA[Windows Xp]]></category> <guid
isPermaLink="false">http://victorhurdugaci.com/?p=1493</guid> <description><![CDATA[I just found a really cool feature in VMWare Workstation 6.5.3. It is called &#8220;Unity View&#8221; and basically allows windows from a virtual machine to appear as windows in the host machine. In the example pictures you can see that I have a host running Windows 7, a unity windows from a Windows Xp guest [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: justify;">I just found a really cool feature in VMWare Workstation 6.5.3. It is called &#8220;Unity View&#8221; and basically allows windows from a virtual machine to appear as windows in the host machine.</p><p
style="text-align: justify;">In the example pictures you can see that I have a host running Windows 7, a unity windows from a Windows Xp guest and two windows from a Fedora guest (Picture 1). The best part is that you can actually see those windows in your taskbar and manipulate them as regular windows &#8211; you can use the Aero switch to switch between applications (Picture 2 &amp; 3). However I found a minor bug, the Aero Peek feature in Windows 7 is not working with the unity windows.</p><p
style="text-align: justify;">Least but not last you get access to the start menu of the guests (Picture 4).</p><p
style="text-align:center"><a
href="http://victorhurdugaci.com/wp-content/uploads/2009/10/Unity01.jpg"><img
class="alignnone size-thumbnail wp-image-1497" title="Unity01" src="http://victorhurdugaci.com/wp-content/uploads/2009/10/Unity01-150x93.jpg" alt="Unity01" width="150" height="93" /></a> <a
href="http://victorhurdugaci.com/wp-content/uploads/2009/10/Unity02.jpg"><img
class="alignnone size-thumbnail wp-image-1498" title="Unity02" src="http://victorhurdugaci.com/wp-content/uploads/2009/10/Unity02-150x93.jpg" alt="Unity02" width="150" height="93" /></a> <a
href="http://victorhurdugaci.com/wp-content/uploads/2009/10/Unity03.jpg"><img
class="alignnone size-thumbnail wp-image-1499" title="Unity03" src="http://victorhurdugaci.com/wp-content/uploads/2009/10/Unity03-150x93.jpg" alt="Unity03" width="150" height="93" /></a> <a
href="http://victorhurdugaci.com/wp-content/uploads/2009/10/Unity04.jpg"><img
class="alignnone size-thumbnail wp-image-1500" title="Unity04" src="http://victorhurdugaci.com/wp-content/uploads/2009/10/Unity04-150x93.jpg" alt="Unity04" width="150" height="93" /></a></p> ]]></content:encoded> <wfw:commentRss>http://victorhurdugaci.com/tip-7-vmware-unity-view/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Tip #6: The importance of the default case</title><link>http://victorhurdugaci.com/tip-6-the-importance-of-the-default-case/</link> <comments>http://victorhurdugaci.com/tip-6-the-importance-of-the-default-case/#comments</comments> <pubDate>Sun, 11 Oct 2009 21:12:31 +0000</pubDate> <dc:creator>Victor</dc:creator> <category><![CDATA[Best practices]]></category> <category><![CDATA[Tips]]></category> <guid
isPermaLink="false">http://victorhurdugaci.com/?p=1392</guid> <description><![CDATA[It is said that &#8220;is good to catch an exception as soon as possible&#8221;. This is the motto of the post. You never wrote perfect code! Neither do I and probably  no mortal will do this. You must accept it and try to make your code as best as possible. There are many ways to [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: justify;">It is said that &#8220;is good to catch an exception as soon as possible&#8221;. This is the motto of the post.</p><p
style="text-align: justify;">You never wrote perfect code! Neither do I and probably  no mortal will do this. You must accept it and try to make your code as best as possible. There are many ways to do this but today will focus the attention on the &#8216;default&#8217; case.</p><p
style="text-align: justify;">How many times you wrote?</p><div
class="wp_codebox"><table><tr
id="p13923"><td
class="code" id="p1392code3"><pre class="pascal" style="font-family:monospace;">select variable
    <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">:</span> ...
    <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">:</span> ...
    ...
    <span style="color: #000000; font-weight: bold;">case</span> n<span style="color: #339933;">:</span>
<span style="color: #000000; font-weight: bold;">end</span></pre></td></tr></table></div><p
style="text-align: justify;">I did this a lot of times. Why do we do it? Because we assume we are bullet proof and out code is perfect. One might say that the previous snippet is not wrong but take a closer look. What if <em>variable</em> is not <em>1</em> and not <em>2</em> and &#8230; and not <em>n</em>? What happens?</p><p><span
id="more-1392"></span></p><p
style="text-align: justify;">In most cases unexpected things happen. Let&#8217;s assume that the select statement decides which account to use or maybe something less important like the color of a background in a game. What happens if you skip that code? Probably when you were writing the code you were not expecting any other values :) But be as paranoiac as possible: what if, somehow, in the future the value of <em>variable</em> will not be in the expected set.</p><p
style="text-align: justify;">If no case executes and you don&#8217;t expect this then the error might not be immediately visible. Maybe it will take 2 weeks until someone will complain, maybe an exception will be raise 5.000 lines from select block, you never know when and how other statements are affected.</p><p
style="text-align: justify;">So the solution for this is trivial. Use to <em>default</em> case to treat any unexpected error. The previous statement will become:</p><div
class="wp_codebox"><table><tr
id="p13924"><td
class="code" id="p1392code4"><pre class="pascal" style="font-family:monospace;">select variable
    <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">:</span> ...
    <span style="color: #000000; font-weight: bold;">case</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">:</span> ...
    ...
    <span style="color: #000000; font-weight: bold;">case</span> n<span style="color: #339933;">:</span> ...
    <span style="color: #000000; font-weight: bold;">default</span><span style="color: #339933;">:</span> <span style="color: #000000; font-weight: bold;">CATCH</span> THE ERROR SOMEHOW
<span style="color: #000000; font-weight: bold;">end</span></pre></td></tr></table></div><p
style="text-align: justify;">The way you treat the exceptional case is up to you: abort the operation, crash the application, add a line to a log file, start the fire alarm, &#8230;</p><p
style="text-align: justify;">Just remember: <strong>your code is not perfect and other is even less so! </strong>Don&#8217;t expect correctness if you request it.</p> ]]></content:encoded> <wfw:commentRss>http://victorhurdugaci.com/tip-6-the-importance-of-the-default-case/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Tip #5: Get 25GB Online Free Storage</title><link>http://victorhurdugaci.com/tip-5-get-25gb-online-free-storage/</link> <comments>http://victorhurdugaci.com/tip-5-get-25gb-online-free-storage/#comments</comments> <pubDate>Sat, 03 Oct 2009 09:00:15 +0000</pubDate> <dc:creator>Victor</dc:creator> <category><![CDATA[Microsoft]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[Map Drive]]></category> <category><![CDATA[SkyDrive]]></category> <category><![CDATA[Windows Live]]></category> <guid
isPermaLink="false">http://victorhurdugaci.com/?p=1376</guid> <description><![CDATA[Do you want 25 GB of free storage that can be accessed from anywhere you have Internet connection? Microsoft is offering 25 GB free online storage through SkyDrive. The drawback of this service is that you can only access files through a browser and if you want drag/drop facilities you must use Internet Explorer. Gladinet [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: justify;">Do you want 25 GB of free storage that can be accessed from anywhere you have Internet connection?</p><p
style="text-align: justify;"><img
class="alignleft size-thumbnail wp-image-1380" title="skydrive" src="http://victorhurdugaci.com/wp-content/uploads/2009/10/skydrive-150x150.png" alt="skydrive" width="32" height="32" />Microsoft is offering 25 GB free online storage through SkyDrive. The drawback of this service is that you can only access files through a browser and if you want drag/drop facilities you must use Internet Explorer.</p><p
style="text-align: justify;"><img
class="alignright size-thumbnail wp-image-1379" title="Gladinet" src="http://victorhurdugaci.com/wp-content/uploads/2009/10/Gladinet-150x50.jpg" alt="Gladinet" width="120" height="40" />Gladinet is developing a tool for mapping online drives as network drives. Using it you can map SkyDrive (and other services like GoogleDocs, Amazon S3, etc) in Windows Explorer. It is not the fastest or easy most solution but there is no other to map SkyDrive.</p><p
style="text-align: justify;">After you install Gladinet Cloud Desktop and configure it (it has an easy to use wizard) you get one more drive in My Computer that will contain subfolders for each online service you use. You can move files there just like they were local. Must mention that the sync is not instant. There is a tasks queue so each file is put in this queue and uploaded only after the previous has finished. Each operation works like this so you might no see online changes immediately.</p><p
style="text-align: justify;">Gladinet Cloud Desktop is available in two versions: free and pro. The free version has a file limit of 1000 files/batch which, I think, should be enough for most users.</p><p
style="text-align: center;"><a
href="http://victorhurdugaci.com/wp-content/uploads/2009/10/CloudDrive.jpg"><img
class="alignnone size-thumbnail wp-image-1377" title="CloudDrive" src="http://victorhurdugaci.com/wp-content/uploads/2009/10/CloudDrive-150x95.jpg" alt="CloudDrive" width="150" height="95" /></a> <a
href="http://victorhurdugaci.com/wp-content/uploads/2009/10/CloudDrive_Content.jpg"><img
class="alignnone size-thumbnail wp-image-1378" title="CloudDrive_Content" src="http://victorhurdugaci.com/wp-content/uploads/2009/10/CloudDrive_Content-150x95.jpg" alt="CloudDrive_Content" width="150" height="95" /></a></p><p
style="text-align: justify;">Register for <a
href="http://skydrive.live.com" target="_blank">SkyDrive</a> and download <a
href="http://www.gladinet.com/p/download_starter_direct.htm" target="_blank">Gladinet Cloud Desktop</a>.</p> ]]></content:encoded> <wfw:commentRss>http://victorhurdugaci.com/tip-5-get-25gb-online-free-storage/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Tip #4: Recursion</title><link>http://victorhurdugaci.com/tip-4-recursion/</link> <comments>http://victorhurdugaci.com/tip-4-recursion/#comments</comments> <pubDate>Sun, 09 Aug 2009 18:22:43 +0000</pubDate> <dc:creator>Victor</dc:creator> <category><![CDATA[Funny]]></category> <category><![CDATA[Tips]]></category> <guid
isPermaLink="false">http://victorhurdugaci.com/?p=1305</guid> <description><![CDATA[To understand what is recursion click this link.]]></description> <content:encoded><![CDATA[<p>To understand what is recursion click <a
href="http://victorhurdugaci.com/tip-4-recursion/" target="_self">this link</a>.</p> ]]></content:encoded> <wfw:commentRss>http://victorhurdugaci.com/tip-4-recursion/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Tip #3: Shared OneNote notebooks with Live Mesh</title><link>http://victorhurdugaci.com/tip-3-shared-onenote-notebooks-with-live-mesh/</link> <comments>http://victorhurdugaci.com/tip-3-shared-onenote-notebooks-with-live-mesh/#comments</comments> <pubDate>Tue, 04 Aug 2009 12:06:47 +0000</pubDate> <dc:creator>Victor</dc:creator> <category><![CDATA[Beginner]]></category> <category><![CDATA[Microsoft]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[Tutorial]]></category> <category><![CDATA[Live Mesh]]></category> <category><![CDATA[OneNote]]></category> <category><![CDATA[Sync]]></category> <guid
isPermaLink="false">http://victorhurdugaci.com/?p=1292</guid> <description><![CDATA[OneNote allows users to create shared notebooks by using a shared folder or a SharePoint repository. When two persons who want to share a notebook are in different countries then a shared folder is not a too feasible solution. A SharePoint repository can be created for free on Office Small Business but you have only [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: justify;">OneNote allows users to create shared notebooks by using a shared folder or a SharePoint repository. When two persons who want to share a notebook are in different countries then a shared folder is not a too feasible solution. A SharePoint repository can be created for free on Office Small Business but you have only 50 MB for storage and you need at least basic SharePoint knowledge.</p><p
style="text-align: justify;">As you might already know, Live Mesh allows one to sync files across multiple computers. A big advantage is the Live Desktop -  a 5000 MB online storage location that can be used for storage. When computers involved in the sync are not simultaneously online, the files are synced with the Live Desktop and, when the computers are back online, the files will be synced.</p><p
style="text-align: justify;">The sharing with Live Mesh works like this: add notebooks&#8217; files on Mesh and they can sync across computers. When a notebook is updated, if you are online the change will be sent/received to/from the Live Desktop.</p><p
style="text-align: justify;"><span
id="more-1292"></span></p><p
style="text-align: justify;">Advantages of this method:<a
href="http://victorhurdugaci.com/wp-content/uploads/2009/08/AddToLiveMesh.jpg"><img
class="alignright size-medium wp-image-1294" title="AddToLiveMesh" src="http://victorhurdugaci.com/wp-content/uploads/2009/08/AddToLiveMesh-281x300.jpg" alt="AddToLiveMesh" width="281" height="300" /></a></p><ul
style="text-align: justify;"><li>No SharePoint knowledge are necessarily.</li><li>Works on Windows Mobile because Live Mesh has a mobile version.</li><li>Instant sync if you are online.</li><li>More storage space.</li><li>Full control over permissions directly from Explorer.</li><li
style="text-align: justify;">No user interaction for sync.</li><li
style="text-align: justify;">Files are kept offline and can be accessed even with no Internet connection.</li><li
style="text-align: justify;">You can store notebooks wherever you want.</li></ul><p
style="text-align: justify;">Disadvantages:</p><ul
style="text-align: justify;"><li>Need to install Live Mesh (requires administrative rights).</li><li>You can set sharing permissions only on the top folder (depending on how you sync you can share also individual notebooks).</li><li>Live Mesh has many other functionalities that you might not need if you only want to sync notebooks.</li><li>While online you cannot control when to sync.</li><li>All persons involved must have Live Mesh installed.</li></ul><p
style="text-align: justify;">To put your notebooks on Mesh (assuming that you have OneNote installed):</p><ol
style="text-align: justify;"><li>Register for Mesh.</li><li>Install the mesh client by adding your PC to the mesh.</li><li>Select the folder(s) that contain(s):<ol><li>All your notebooks if you want to just backup or share all notebooks.</li><li>Individual notebooks if you want to be able to share selected notebooks.</li></ol></li><li>Right click it/them select &#8220;Add folder to Live Mesh&#8221; (see the image on right). The folder is added to the Live Desktop and you can check it by opening the mesh in a browser.</li><li>That&#8217;s it. The folder is also online and you can share it with whoever you want.</li></ol><p><a
href="http://victorhurdugaci.com/wp-content/uploads/2009/08/Invite.jpg"><img
class="size-medium wp-image-1298 alignright" title="Invite" src="http://victorhurdugaci.com/wp-content/uploads/2009/08/Invite-300x170.jpg" alt="Invite" width="300" height="170" /></a>To share notebooks:</p><ol><li>Select on your local disk a folder that is shared with Mesh.</li><li>In the right sidebar select &#8220;Members&#8221;</li><li>Click &#8220;Invite&#8221;.</li><li>Enter the e-mail addresses of the ones you want to share with and choose their permission level (Owner = full control; Contributor = can read/write but cannot perform special tasks; reader = can get files from Mesh but their updates are not synced).</li><li>Click OK.</li></ol><p
style="text-align: center"><a
href="http://victorhurdugaci.com/wp-content/uploads/2009/08/Permission.jpg"><img
class="aligncenter size-medium wp-image-1299" title="Permission" src="http://victorhurdugaci.com/wp-content/uploads/2009/08/Permission-300x173.jpg" alt="Permission" width="300" height="173" /></a></p><p
style="text-align: justify;">Even if you are the only user of a notebook you can use the Live Desktop for backup &#8211; this is how I use it.</p> ]]></content:encoded> <wfw:commentRss>http://victorhurdugaci.com/tip-3-shared-onenote-notebooks-with-live-mesh/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Tip 2: #if</title><link>http://victorhurdugaci.com/tip-2-if/</link> <comments>http://victorhurdugaci.com/tip-2-if/#comments</comments> <pubDate>Thu, 23 Jul 2009 19:34:59 +0000</pubDate> <dc:creator>Victor</dc:creator> <category><![CDATA[C#]]></category> <category><![CDATA[Intermediate]]></category> <category><![CDATA[Microsoft]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[Tutorial]]></category> <category><![CDATA[#if]]></category> <guid
isPermaLink="false">http://victorhurdugaci.com/?p=1262</guid> <description><![CDATA[This is a C# tip When the C# compiler encounters an #if directive, followed eventually by an #endif directive, it will compile the code between the directives only if the specified symbol is defined. Unlike C and C++, you cannot assign a numeric value to a symbol; the #if statement in C# is Boolean and [...]]]></description> <content:encoded><![CDATA[<h2>This is a C# tip</h2><p
style="text-align: justify;">When the C# compiler encounters an<span><span> #if</span></span> directive, followed eventually by an #endif directive, it will compile the code between the directives only if the specified symbol is defined. Unlike C and C++, you cannot assign a numeric value to a symbol; the #if statement in C# is Boolean and only tests whether the symbol has been defined or not.</p><p
style="text-align: justify;">A predefined (by default) symbol on the &#8220;Debug&#8221; build configuration is <em>DEBUG</em>. Using this symbol you can define code that will be compiled only in Debug; for example, a debug window will be shown only when needed.</p><div
class="wp_codebox"><table><tr
id="p12626"><td
class="code" id="p1262code6"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Text</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">namespace</span> ConsoleApplication1
<span style="color: #008000;">&#123;</span>
    <span style="color: #6666cc; font-weight: bold;">class</span> Program
    <span style="color: #008000;">&#123;</span>
        <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> Main<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">string</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> args<span style="color: #008000;">&#41;</span>
        <span style="color: #008000;">&#123;</span>
<span style="color: #008080;">#if DEBUG</span>
            Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Debugging information&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008080;">#endif</span>
            Console<span style="color: #008000;">.</span><span style="color: #0000FF;">WriteLine</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Code that always executes&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
        <span style="color: #008000;">&#125;</span>
    <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div><p
style="text-align: justify;">The code above will print<em> &#8220;Debugging information&#8221;</em> and <em>&#8220;Code that always executes&#8221;</em> when build on Debug and will display only <em>&#8220;Code that always executes&#8221;</em> when build on another configuration.</p><p
style="text-align: justify;">You can suppress the definition of the <em>DEBUG</em> symbol from the project properties or by removing the DEBUG from the build argument <em>&#8220;/define:DEBUG&#8221;. </em>Also, you can define your own symbols in order to accommodate your needs.</p><p
style="text-align: justify;">Define as many build configurations and symbols you need but don&#8217;t abuse this feature!</p> ]]></content:encoded> <wfw:commentRss>http://victorhurdugaci.com/tip-2-if/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Tip #1: Backup Outlook 2007 Accounts&#8217; Information</title><link>http://victorhurdugaci.com/tip-1-backup-outlook-2007-accounts-information/</link> <comments>http://victorhurdugaci.com/tip-1-backup-outlook-2007-accounts-information/#comments</comments> <pubDate>Mon, 20 Jul 2009 17:47:28 +0000</pubDate> <dc:creator>Victor</dc:creator> <category><![CDATA[Beginner]]></category> <category><![CDATA[Tips]]></category> <category><![CDATA[Tutorial]]></category> <category><![CDATA[Backup]]></category> <category><![CDATA[Export]]></category> <category><![CDATA[Outlook]]></category> <guid
isPermaLink="false">http://victorhurdugaci.com/?p=1235</guid> <description><![CDATA[This is a series of different tips and tricks for computer users. It will include: software usage tip, hacks, development tips, hardware tips, etc. I will try to post tips every day but I don&#8217;t know if my schedule will allow me. &#8212; When you need to reinstall Windows and/or Outlook you might backup the [...]]]></description> <content:encoded><![CDATA[<p
style="text-align: justify;">This is a series of different tips and tricks for computer users. It will include: software usage tip, hacks, development tips, hardware tips, etc.</p><p
style="text-align: justify;">I will try to post tips every day but I don&#8217;t know if my schedule will allow me.</p><p
style="text-align: justify;">&#8212;</p><p
style="text-align: justify;">When you need to reinstall Windows and/or Outlook you might backup the .pst files (Outlook data files). Unfortunately these files do not contain account information. After reinstall and restore of backup files you need to reenter all information about each account which is a boring process &#8211; at least for me because I have 5 e-mail accounts.</p><p
style="text-align: justify;">If you want to backup accounts information you have to export the<em> &#8220;HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook&#8221; </em>key from Registry.</p><p
style="text-align: justify;"><strong>Export accounts&#8217; information:</strong></p><ol
style="text-align: justify;"><li><strong><a
href="http://victorhurdugaci.com/wp-content/uploads/2009/07/Tip_01_01.jpg"><img
class="size-medium wp-image-1239 alignright" title="Tip_01_01" src="http://victorhurdugaci.com/wp-content/uploads/2009/07/Tip_01_01-300x185.jpg" alt="Tip_01_01" width="219" height="135" /></a></strong>Start the Registry Editor (Start -&gt; Run -&gt; &#8220;regedit&#8221;) &#8211; in Windows Vista/7 you need administrative rights to start it.</li><li>Navigate to the previously mentioned branch (HKEY_CURRENT_USER\Software\ &#8230; ).</li><li>Right click the &#8220;Outlook&#8221; tree node.</li><li>Choose export.</li><li>Name the file accordingly.</li><li>Click &#8220;Save&#8221;</li></ol><p
style="text-align: justify;">After reinstalling Outlook, you have to import the accounts. Follow the steps below for this:</p><p
style="text-align: justify;"><strong>Import accounts&#8217; information:</strong></p><ol
style="text-align: justify;"><li>Double click the exported file.</li><li>Choose &#8220;Yes&#8221; when asked if you really want to import.</li></ol> ]]></content:encoded> <wfw:commentRss>http://victorhurdugaci.com/tip-1-backup-outlook-2007-accounts-information/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
