<?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>Samuel Haddad</title> <atom:link href="http://samuelhaddad.com/feed/" rel="self" type="application/rss+xml" /><link>http://samuelhaddad.com</link> <description></description> <lastBuildDate>Thu, 03 Nov 2011 16:32:38 +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>Unhide VeryHidden Excel Worksheets</title><link>http://samuelhaddad.com/2011/11/03/unhide-veryhidden-excel-worksheets/</link> <comments>http://samuelhaddad.com/2011/11/03/unhide-veryhidden-excel-worksheets/#comments</comments> <pubDate>Thu, 03 Nov 2011 16:32:38 +0000</pubDate> <dc:creator>Samuel Haddad</dc:creator> <category><![CDATA[Excel]]></category> <category><![CDATA[Programming]]></category> <guid
isPermaLink="false">http://samuelhaddad.com/?p=653</guid> <description><![CDATA[Here is the macro I use to unhide very hidden worksheets. Sub Unhide() Dim ws As Worksheet For Each ws In Sheets ws.Visible = True Next End Sub]]></description> <content:encoded><![CDATA[<p>Here is the macro I use to unhide very hidden worksheets.</p><p><code>Sub Unhide()<br
/> Dim ws As Worksheet<br
/> For Each ws In Sheets<br
/> ws.Visible = True<br
/> Next<br
/> End Sub</code></p> ]]></content:encoded> <wfw:commentRss>http://samuelhaddad.com/2011/11/03/unhide-veryhidden-excel-worksheets/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>FIX: “The Application HTC Sense (process com.htc.launcher) has stopped unexpectedly”</title><link>http://samuelhaddad.com/2011/09/16/fix-the-application-htc-sense-process-com-htc-launcher-has-stopped-unexpectedly/</link> <comments>http://samuelhaddad.com/2011/09/16/fix-the-application-htc-sense-process-com-htc-launcher-has-stopped-unexpectedly/#comments</comments> <pubDate>Sat, 17 Sep 2011 02:16:57 +0000</pubDate> <dc:creator>Samuel Haddad</dc:creator> <category><![CDATA[Mobile]]></category> <category><![CDATA[Tech Support]]></category> <category><![CDATA[Android]]></category> <category><![CDATA[HTC]]></category> <category><![CDATA[My Touch 4G]]></category> <category><![CDATA[Sense]]></category> <category><![CDATA[T-Mobile]]></category> <guid
isPermaLink="false">http://samuelhaddad.com/?p=642</guid> <description><![CDATA[Today I did a factory reset on my T-Mobile My Touch 4G however on reboot I continued to get the following error: Sorry! The Application HTC Sense (process com.htc.launcher) has stopped unexpectedly. Please Try Again. The only option available was Force Close, and soon as that was pressed the message would appear again. I tried [...]]]></description> <content:encoded><![CDATA[<p>Today I did a factory reset on my T-Mobile My Touch 4G however on reboot I continued to get the following error:</p><blockquote><p><em>Sorry!</em></p><p>The Application HTC Sense (process com.htc.launcher) has stopped unexpectedly.<br
/> Please Try Again.</p></blockquote><p>The only option available was <strong>Force Close</strong>, and soon as that was pressed the message would appear again.</p><p>I tried the solutions listed at <a
href="http://myhtcdesire.com/tutorials/fix-the-application-htc-sense-process-com-htc-launcher-has-stopped-unexpectedly">http://myhtcdesire.com/tutorials/fix-the-application-htc-sense-process-com-htc-launcher-has-stopped-unexpectedly</a>, if the directions on that site work all the better, however if you are in the same boat as me those directions did not work.</p><h4><strong>My Problem:</strong></h4><p>On my phone I did have any way of getting to the search, nothing on screen, and no buttons would work.  Just hitting force close brought the force close option up instantly again and I had no time to do anything. So how did I get into the settings menu?</p><h4><strong>How I got into the settings menu:</strong></h4><p>The only way I was able to get was to do a factory reset though the boot menu.</p><p>You can perform a <a
href="http://www.youtube.com/watch?v=Ua46DfB19ow">factory reset by</a> (second half of this video) restarting the phone while holding the volume button down.  This will cause you to boot into your factory menu where you can select factory reset.</p><p>Once the factory reset gave me more time to react before the error popped up. Once the reset was done I was prompted with an introductory video all about my phone. I went through all the prompts until my home screen was loading. <span
style="color: #ff0000;"><strong>Right away before anything loaded </strong></span>I pushed and held on the home screen. This caused the option to add a shortcut to the home screen. I was able to add a shortcut to settings and get to it that way.</p><p>After that I was able to clear the data to go to <strong>Applications</strong> &gt; <strong>Manage Applications</strong> &gt; <strong>HTC Sense</strong> &gt; and <strong>Clear Data. </strong>However this did not fix it for me. Instead I had to clear data on all my<br
/> applications until I found the one that was causing the problem.</p><p><em>Did this post save your expensive phone from being a paper weight? Did it save you hours of fustration? Consider <a
href="https://www.paypal.com/us/cgi-bin/webscr?cmd=_flow&amp;SESSION=wrOJj4w_NLIMxF1R0dYlYTGEEML2h63gB75m3ZRpJzvOmSgaRV_1gahmhim&amp;dispatch=5885d80a13c0db1f8e263663d3faee8d35d0e363192f28ea2a5d17702da0dbf0" target="_blank">buying me a coffee</a>!</em></p> ]]></content:encoded> <wfw:commentRss>http://samuelhaddad.com/2011/09/16/fix-the-application-htc-sense-process-com-htc-launcher-has-stopped-unexpectedly/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Distributing XULRunner with ClickOnce</title><link>http://samuelhaddad.com/2011/09/01/distributing-xulrunner-with-clickonce/</link> <comments>http://samuelhaddad.com/2011/09/01/distributing-xulrunner-with-clickonce/#comments</comments> <pubDate>Fri, 02 Sep 2011 03:35:23 +0000</pubDate> <dc:creator>Samuel Haddad</dc:creator> <category><![CDATA[Uncategorized]]></category> <guid
isPermaLink="false">http://samuelhaddad.com/?p=639</guid> <description><![CDATA[Recently I was working on ClickOnce Application and I was trying to distribute XULRunner with my application. Unfortunately when deploying the application I realized that not all the files where included in the ClickOnce applications file, particularly text files such as files that ended in .ini or .manifest. The solution was to go into the [...]]]></description> <content:encoded><![CDATA[<p>Recently I was working on ClickOnce Application and I was trying to distribute <a
href="https://developer.mozilla.org/en/xulrunner">XULRunner</a> with my application. Unfortunately when deploying the application I realized that not all the files where included in the ClickOnce applications file, particularly text files such as files that ended in .ini or .manifest.</p><p>The solution was to go into the solution explorer in Visual Studio, select the files that there not being copied, and set the build action to content for those files.</p> ]]></content:encoded> <wfw:commentRss>http://samuelhaddad.com/2011/09/01/distributing-xulrunner-with-clickonce/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Cannot import the following key file fix</title><link>http://samuelhaddad.com/2011/07/27/cannot-import-the-following-key-file-fix/</link> <comments>http://samuelhaddad.com/2011/07/27/cannot-import-the-following-key-file-fix/#comments</comments> <pubDate>Thu, 28 Jul 2011 03:10:47 +0000</pubDate> <dc:creator>Samuel Haddad</dc:creator> <category><![CDATA[.NET]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[C#]]></category> <category><![CDATA[CSP]]></category> <category><![CDATA[PFX]]></category> <category><![CDATA[Strong Name]]></category> <category><![CDATA[Visual Studio]]></category> <guid
isPermaLink="false">http://samuelhaddad.com/?p=633</guid> <description><![CDATA[This one has caused me a few hours of pain….a couple of time.  It is about time I document how I fixed it. The Error: Cannot import the following key file: &#60;filename&#62;.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the [...]]]></description> <content:encoded><![CDATA[<p>This one has caused me a few hours of pain….a couple of time.  It is about time I document how I fixed it.</p><h2>The Error:</h2><p>Cannot import the following key file: &lt;filename&gt;.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_ E2AEBF22AB52DD08    &lt;Application Name&gt;</p><h2>The Fix:</h2><ol><li>Open Visual Studio Command Prompt (It can be found in the Windows Start menu)</li><li>Type sn -i &#8220;c:\Pathtofile\&lt;filename&gt;.pfx&#8221; TVS_KEY_ E2AEBF22AB52DD08</li><li>Reimport the pfx file into Visual Studio</li></ol><p>The <a
href="http://msdn.microsoft.com/en-us/library/k5b5tt23(v=vs.71).aspx">sn.exe</a> with the –i parameter, installs a key pair from &lt;infile&gt; into a key container named &lt;container&gt;.</p> ]]></content:encoded> <wfw:commentRss>http://samuelhaddad.com/2011/07/27/cannot-import-the-following-key-file-fix/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Display driver stopped responding &#8211; Flash Green Screen</title><link>http://samuelhaddad.com/2011/03/25/display-driver-stopped-responding-flash-green-screen/</link> <comments>http://samuelhaddad.com/2011/03/25/display-driver-stopped-responding-flash-green-screen/#comments</comments> <pubDate>Sat, 26 Mar 2011 03:20:05 +0000</pubDate> <dc:creator>Samuel Haddad</dc:creator> <category><![CDATA[Tech Support]]></category> <category><![CDATA[ATI mobility Radeon HD 5470]]></category> <category><![CDATA[Dell Inspiron n5010]]></category> <category><![CDATA[Display driver stopped responding and has recovered]]></category> <category><![CDATA[Flash Green Screen]]></category> <category><![CDATA[Hardware Acceleration]]></category> <category><![CDATA[Windows 7 x64bit.]]></category> <guid
isPermaLink="false">http://samuelhaddad.com/?p=620</guid> <description><![CDATA[The Problem: Recently I was working on a customers computer and when loading a page with a flash video on it, the video would crash.The following message was displayed in the system tray. Display driver stopped responding and has recovered. The machine I was working on was a Dell Inspiron n5010 with a ATI mobility [...]]]></description> <content:encoded><![CDATA[<h2>The Problem:</h2><p>Recently I was working on a customers computer and when loading a page with a flash video on it, the video would crash.The following message was displayed in the system tray.</p><p><strong>Display driver stopped responding and has recovered.</strong></p><p><img
class="alignnone size-full wp-image-621" title="Display driver stopped responding and has recovered." src="http://samuelhaddad.com/wp-content/uploads/2011/03/videodriverhascrashed.png" alt="Display driver stopped responding and has recovered." width="457" height="106" /></p><p>The machine I was working on was a Dell Inspiron n5010 with a ATI mobility Radeon HD 5470 video card running Windows 7 x64bit. After all the normal troubleshooting and making sure I had the most up -to-date drivers I still had the issue. I ended up coming up with the following solution.</p><h2><strong>The solution:</strong></h2><p>Disable Hardware acceleration by right clicking on any flash video, going to settings and <strong>unchecking </strong>enable hardware acceleration.</p><p><strong><img
class="alignnone size-full wp-image-622" title="Disable Flash Hardware Acceleration" src="http://samuelhaddad.com/wp-content/uploads/2011/03/disablehardwareacceleration.png" alt="" width="213" height="134" /></strong></p><p>I hope this saves someone a head ache.</p> ]]></content:encoded> <wfw:commentRss>http://samuelhaddad.com/2011/03/25/display-driver-stopped-responding-flash-green-screen/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> <item><title>.NET High Quality Thumbnail Generation</title><link>http://samuelhaddad.com/2011/01/26/net-high-quality-thumbnail-generation/</link> <comments>http://samuelhaddad.com/2011/01/26/net-high-quality-thumbnail-generation/#comments</comments> <pubDate>Wed, 26 Jan 2011 05:41:27 +0000</pubDate> <dc:creator>Samuel Haddad</dc:creator> <category><![CDATA[.NET]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[ASP.NET]]></category> <category><![CDATA[Bitmap]]></category> <category><![CDATA[Thumbnails]]></category> <guid
isPermaLink="false">http://samuelhaddad.com/?p=614</guid> <description><![CDATA[This method is a modified version of Mike Borozdin method which I happen to enjoy very much. The biggest changes I made where to add using statements around the disposable objects such as the Bitmap and the Graphics object to avoid memory leaks, as well as a few minor changes.]]></description> <content:encoded><![CDATA[<p>This method is a modified version of <a
href="http://www.mikeborozdin.com/post/High-Quality-Image-Resizing-with-NET.aspx">Mike Borozdin</a> method which I happen to enjoy very much. The biggest changes I made where to add using statements around the disposable objects such as the Bitmap and the Graphics object to avoid memory leaks, as well as a few minor changes.</p><pre class="brush: csharp; title: ; notranslate">
//Image Resize Helper Method
private static Bitmap ResizeImage(String filename, int maxWidth, int maxHeight)
{
    using (Image originalImage = Image.FromFile(filename))
    {
        //Caluate new Size
        int newWidth = originalImage.Width;
        int newHeight = originalImage.Height;
        double aspectRatio = (double)originalImage.Width / (double)originalImage.Height;
        if (aspectRatio &lt;= 1 &amp;&amp; originalImage.Width &gt; maxWidth)
        {
            newWidth = maxWidth;
            newHeight = (int)Math.Round(newWidth / aspectRatio);
        }
        else if (aspectRatio &gt; 1 &amp;&amp; originalImage.Height &gt; maxHeight)
        {
            newHeight = maxHeight;
            newWidth = (int)Math.Round(newHeight * aspectRatio);
        }
        Bitmap newImage = new Bitmap(newWidth, newHeight);
        using (Graphics g = Graphics.FromImage(newImage))
        {
            //--Quality Settings Adjust to fit your application
            g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBilinear;
            g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
            g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality;
            g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
            g.DrawImage(originalImage, 0, 0, newImage.Width, newImage.Height);
            return newImage;
        }
    }
}
</pre>]]></content:encoded> <wfw:commentRss>http://samuelhaddad.com/2011/01/26/net-high-quality-thumbnail-generation/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>System.BadImageFormatException on a 64-bit Machine</title><link>http://samuelhaddad.com/2011/01/20/system-badimageformatexception-on-a-64-bit-machine/</link> <comments>http://samuelhaddad.com/2011/01/20/system-badimageformatexception-on-a-64-bit-machine/#comments</comments> <pubDate>Fri, 21 Jan 2011 03:14:33 +0000</pubDate> <dc:creator>Samuel Haddad</dc:creator> <category><![CDATA[Uncategorized]]></category> <guid
isPermaLink="false">http://samuelhaddad.com/?p=603</guid> <description><![CDATA[The other day, one of our customers was switching over to 64-bit development machines, and encountered the following issue: System.BadImageFormatException: Could not load file or assembly'(assembly name)' or one of its dependencies. An attempt was made to load a program with an incorrect format. The likely reason is that you (or in this instance, our [...]]]></description> <content:encoded><![CDATA[<p>The other day, one of our customers was switching over to 64-bit development machines, and encountered the following issue:</p><blockquote><p><code>System.BadImageFormatException: Could not load file or assembly'(assembly name)' or one of its dependencies. An attempt was made to load a program with an incorrect format.</code></p></blockquote><p>The likely reason is that you (or in this instance, our customer) are trying to load a 32-bit assembly into a 64-bit application. This can happen when you have the Any CPU platform selected.</p><p>Solution:</p><p>If your scenario sounds like the one I described, try setting your application to run in x86 mode. In Visual Studio this can be done by going to Build -&gt; Configuration Manager&#8230;<br
/> <img
class="alignnone size-full wp-image-608" title="Visual Studio Configuration Manager" src="http://samuelhaddad.com/wp-content/uploads/2011/01/build.png" alt="Visual Studio Configuration Manager" width="395" height="262" /><br
/> &#8230;and setting the Platform to be x86.<br
/> <img
class="alignnone size-full wp-image-609" title="Visual Studio Configuration Manager" src="http://samuelhaddad.com/wp-content/uploads/2011/01/configmanager.png" alt="Visual Studio Configuration Manager" width="546" height="344" /></p><p>This article and many others like this can be found on my <a
href="http://wiki.softartisans.com/display/BLOGS/2011/01/18/System.BadImageFormatException+on+a+64-bit+Machine" target="_blank">SoftArtisans</a> blog.</p> ]]></content:encoded> <wfw:commentRss>http://samuelhaddad.com/2011/01/20/system-badimageformatexception-on-a-64-bit-machine/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>SharePoint 2010 Development: Getting Started</title><link>http://samuelhaddad.com/2011/01/20/sharepoint-2010-development-getting-started/</link> <comments>http://samuelhaddad.com/2011/01/20/sharepoint-2010-development-getting-started/#comments</comments> <pubDate>Fri, 21 Jan 2011 02:58:31 +0000</pubDate> <dc:creator>Samuel Haddad</dc:creator> <category><![CDATA[SharePoint]]></category> <guid
isPermaLink="false">http://samuelhaddad.com/?p=590</guid> <description><![CDATA[[Image via Tihomir Ignatov] Setting up a SharePoint Development Server Recently I wanted to start some SharePoint 2010 development, and taking Microsoft’s recommendation that developing for SharePoint be conducted on a machine that already has it installed, I set out to create development-optimized SharePoint environment. One of the greatest tools I came across was the SharePoint 2010 Easy Setup [...]]]></description> <content:encoded><![CDATA[<div><img
class="alignnone size-full wp-image-592" title="SharePoint 2010" src="http://samuelhaddad.com/wp-content/uploads/2011/01/spdev.png" alt="SharePoint 2010" width="534" height="325" /></div><div>[Image via <a
rel="nofollow" href="http://tihomirignatov.blogspot.com/2009/11/sharepoint-2010-developer-resources.html">Tihomir Ignatov</a>]</p><h3><a
name="SharePoint2010Development%E2%80%94GettingStarted-SettingupaSharePointDevelopmentServer"></a>Setting up a SharePoint Development Server</h3><p>Recently I wanted to start some <strong>SharePoint 2010 development</strong>, and taking <a
rel="nofollow" href="http://msdn.microsoft.com/en-us/library/ee554869.aspx">Microsoft’s recommendation</a> that developing for SharePoint be conducted on a machine that already has it installed, I set out to create development-optimized SharePoint environment.  One of the greatest tools I came across was the <a
rel="nofollow" href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=54dc2eef-e9ea-4c7b-9470-ec5cb58414de">SharePoint 2010 Easy Setup Script</a>. The script is a set of<strong>Windows PowerShell scripts</strong> that install and configure all the pre-requisites and products to get you developing for SharePoint in no time.  Running these scripts will install evaluation versions of:</p><ul><li>SharePoint Server 2010 + pre-requisites (Standalone)</li><li>Visual Studio 2010 Ultimate Edition</li><li>Silverlight 4 Tools for Visual Studio</li><li>Expression Studio 4 Ultimate</li><li>Open XML SDK</li><li>Visual Studio SDK</li><li>Visual Studio SharePoint Power Tools</li><li>Office 2010 Professional Plus</li><li>SharePoint Designer 2010</li><li>Visio 2010</li></ul><p>After downloading and extracting, the installation files will be installed to <strong>C:\SharePoint2010EasySetup</strong> by default. The next step is to configure the scripts:</p><h3><a
name="SharePoint2010Development%E2%80%94GettingStarted-ConfiguringtheInstallationScripts"></a>Configuring the Installation Scripts</h3><p>Navigate to <strong>C:\SharePoint2010EasySetup\Labs\EasySetup\Source</strong> and locate the <strong>config.xml</strong> file. This is the file you want to modify.  Here you can set up a virtual hard disk to install applications to and comment out any applications that you do <em>not</em>want installed. In my case I wanted to do a fresh install of a Windows 7 64bit operating system on my local operating system, rather than on a virtual disk (it’s recommended to do a fresh install when installing to your local os). After editing the configuration file you will want to save the configuration file and then execute the run.bat file.</p><h3><a
name="SharePoint2010Development%E2%80%94GettingStarted-Runningthescripts%3A"></a>Running the scripts:</h3><p>In the same directory running the <strong>Run.bat</strong> file will execute the Windows PowerShell scripts in the correct order.  The scripts will download the evaluation versions of the software, install them and configure them. During this process I was asked to reboot several times.</p><h3><a
name="SharePoint2010Development%E2%80%94GettingStarted-SharePoint2010DevelopmentResources%3A"></a>SharePoint 2010 Development Resources:</h3><p>If you are completely new to SharePoint development I found some of the following resources helpful:</p><ul><li><strong>SharePoint Server Virtual Labs:</strong> MSDN has some free <a
rel="nofollow" href="http://msdn.microsoft.com/en-us/cc707678">virtual labs</a>. You can use Hyper V to remote into the remote machine provided by Microsoft, which is preconfigured for you to follow the training labs. While these labs are ready to go and everything is set up for you, I did find the remote connection a little slow.</li><li><strong>Share Point 2010 Training Videos</strong>: Microsoft MSDN has some great <a
rel="nofollow" href="http://msdn.microsoft.com/en-us/sharepoint/ee513147.aspx">SharePoint videos</a> that I found very helpful. The videos also link to corresponding labs for you to try your new skills, as well as provide quizzes to make sure you really understand the material.</li><li><strong>SharePoint 2010 Books</strong>: I have been reading SharePoint master <a
rel="nofollow" href="http://blogs.msdn.com/b/thomriz/">Tom Rizzo</a>’s <a
rel="nofollow" href="http://www.amazon.com/Professional-SharePoint-2010-Development-Programmer/dp/0470529423/ref=sr_1_3?ie=UTF8&amp;qid=1294935772&amp;sr=8-3">Professional SharePoint 2010 Development</a></li><li>Also, for those interested in Team-Based SP development, MVP <a
rel="nofollow" href="http://www.andrewconnell.com/blog/">Andrew Connell</a> has written a very thorough and cohesive <a
rel="nofollow" href="http://msdn.microsoft.com/en-us/library/gg512102.aspx">article</a> for MSDN on the subject.<a
rel="nofollow" href="http://msdn.microsoft.com/en-us/library/gg512102.aspx">http://msdn.microsoft.com/en-us/library/gg512102.aspx</a></li><li></li></ul></div><p
style="text-align: left;">This article and many others like this can be found on my <a
href="http://wiki.softartisans.com/pages/viewpage.action?pageId=12812555" target="_blank">SoftArtisans</a> blog.</p> ]]></content:encoded> <wfw:commentRss>http://samuelhaddad.com/2011/01/20/sharepoint-2010-development-getting-started/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>FMyScript Disappearing Voting Links</title><link>http://samuelhaddad.com/2010/11/20/fmyscript-disappearing-voting-links/</link> <comments>http://samuelhaddad.com/2010/11/20/fmyscript-disappearing-voting-links/#comments</comments> <pubDate>Sat, 20 Nov 2010 06:14:46 +0000</pubDate> <dc:creator>Samuel Haddad</dc:creator> <category><![CDATA[Programming]]></category> <category><![CDATA[Web Design]]></category> <category><![CDATA[FML]]></category> <category><![CDATA[FMyScript]]></category> <category><![CDATA[Voting]]></category> <guid
isPermaLink="false">http://samuelhaddad.com/?p=580</guid> <description><![CDATA[I was recently asked to work on a site running FMyScript. The problem was this every time a voting link was clicked the link would just disappear and the votes were not updated. The solution was two fold: Part 1: The first problem was the voting links has a &#8216; in the string such as [...]]]></description> <content:encoded><![CDATA[<p>I was recently asked to work on a site running FMyScript. The problem was this every time a voting link was clicked the link would just disappear and the votes were not updated.</p><p>The solution was two fold:</p><p><strong>Part 1:<br
/> </strong>The first problem was the voting links has a &#8216; in the string such as &#8220;I&#8217;m really sad to hear that&#8221; So I just changed the string instead of finding all the places I might have to escape it. I figured I am is better grammar anyways.</p><p><strong>Part 2:<br
/> </strong>The domain must the config file. That means if you set up your site with the www in the url and someone goes to your site without the www in the url the voting system will not work.</p><p>I modified the .htaccess files to force www by adding the following lines:</p><p><code>RewriteEngine on<br
/> RewriteCond %{HTTP_HOST} !^www.your_domain.com$<br
/> RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]</code></p><p>I hope this helps someone.</p> ]]></content:encoded> <wfw:commentRss>http://samuelhaddad.com/2010/11/20/fmyscript-disappearing-voting-links/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>SoftArtisans OfficeWriter</title><link>http://samuelhaddad.com/2010/10/24/softartisans-officewriter/</link> <comments>http://samuelhaddad.com/2010/10/24/softartisans-officewriter/#comments</comments> <pubDate>Sun, 24 Oct 2010 23:15:35 +0000</pubDate> <dc:creator>Samuel Haddad</dc:creator> <category><![CDATA[Programming]]></category> <category><![CDATA[Office Writer]]></category> <category><![CDATA[SoftArtisans]]></category> <guid
isPermaLink="false">http://samuelhaddad.com/?p=560</guid> <description><![CDATA[Disclaimer: While this article was written before I started working at SoftArtisans, I do work at SoftArtisans now.  Support for SoftArtisans products can be found at http://support.softartisans.com/ So today I tried out a product from SoftArtisans called OfficeWriter specifically the WordWriter feature. You can find a Demo here. I set out to create an application [...]]]></description> <content:encoded><![CDATA[<p>Disclaimer: While this article was written before I started working at SoftArtisans, I do work at SoftArtisans now.  Support for SoftArtisans products can be found at <a
href="http://support.softartisans.com/">http://support.softartisans.com/</a></p><p>So today I tried out a product from SoftArtisans called OfficeWriter specifically the WordWriter feature. You can find a Demo <a
href="http://support.softartisans.com/Login.aspx?SiteReturnUrl=eval">here</a>. I set out to create an application that would allow me to fill in a form and generate mailing labels to be printed. I found out that with SoftArtisans product this was extremely easy.</p><p>First I created a Mail Merge template in Microsoft office. You can download a copy of my <a
href="http://samuelhaddad.com/wp-content/uploads/2010/10/labels.doc">Label Template</a> if you would like.</p><p>Then I wrote the following code:</p><pre class="brush: csharp; title: ; notranslate">
  protected void generateBtn_Click(object sender, EventArgs e)
        {
            // Variables
            object[] arrValues = { firstNameTxt.Text, lastNameTxt.Text, addressTxt.Text, cityTxt.Text, stateTxt.Text, zipCodeTxt.Text };
            generateLabels(arrValues);
        }
        private void generateLabels(object[] arrValues)
        {
            WordTemplate wt = new WordTemplate();
            wt.Open(&quot;C:/labels.doc&quot;);
            string[] arrNameFields = { &quot;First_Name&quot;, &quot;Last_Name&quot;, &quot;Address_Line_1&quot;, &quot;City&quot;, &quot;State&quot;, &quot;ZIP_Code&quot; };
            //Bind Mail Merge Fields with Data
            wt.SetDataSource(arrValues, arrNameFields);
            wt.Process();
            //Save to browser
            wt.Save(Page.Response, &quot;Labels.doc&quot;, false);
        }
</pre><p>with the following front end:<br
/> <img
class="size-full wp-image-566" title="Generate Labels" src="http://samuelhaddad.com/wp-content/uploads/2010/10/form2.jpg" alt="" width="481" height="644" /></p><p>When opening the generate document I had the following output:</p><p><a
href="http://samuelhaddad.com/wp-content/uploads/2010/10/output.doc"><img
class="size-full wp-image-568" title="Output" src="http://samuelhaddad.com/wp-content/uploads/2010/10/output.jpg" alt="" width="519" height="199" /></a></p><p>You can download my solution <a
href="http://samuelhaddad.com/wp-content/uploads/2010/10/LabelGenerator.zip">here</a>, but remember that you need an Office Writer license or you must be using the demo license.</p> ]]></content:encoded> <wfw:commentRss>http://samuelhaddad.com/2010/10/24/softartisans-officewriter/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
