<?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>Powertips</title>
	<atom:link href="http://scripting.chaindb.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://scripting.chaindb.com</link>
	<description>Programmer tips</description>
	<lastBuildDate>Tue, 15 May 2012 23:56:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Error:There is a duplicate &#8216;system.web.extensions/scripting/scriptResourceHandler&#8217; section defined</title>
		<link>http://scripting.chaindb.com/2012/05/16/errorthere-is-a-duplicate-system-web-extensionsscriptingscriptresourcehandler-section-defined/</link>
		<comments>http://scripting.chaindb.com/2012/05/16/errorthere-is-a-duplicate-system-web-extensionsscriptingscriptresourcehandler-section-defined/#comments</comments>
		<pubDate>Tue, 15 May 2012 23:51:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[IIS 7.0]]></category>

		<guid isPermaLink="false">http://scripting.chaindb.com/?p=1230</guid>
		<description><![CDATA[Error like this is usually occurs in IIS after deploying a working website (local). In my case, this error usually comes in when I use a .Net Framework higher version in IIS than the .Net Framework I use in my website application. One of the solutions that I applied was to upgrade the .Net Framework [...]]]></description>
			<content:encoded><![CDATA[<p><br />
Error like this is usually occurs in IIS after deploying a working website (local).<br />
In my case, this error usually comes in when I use a .Net Framework higher version in IIS than the .Net Framework I use in my website application. One of the solutions that I applied was to upgrade the .Net Framework in my apps to make the same as IIS.</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://scripting.chaindb.com/2012/05/16/errorthere-is-a-duplicate-system-web-extensionsscriptingscriptresourcehandler-section-defined/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error:provided as the Service attribute value in the ServiceHost directive could not be found.</title>
		<link>http://scripting.chaindb.com/2012/05/15/errorprovided-as-the-service-attribute-value-in-the-servicehost-directive-could-not-be-found/</link>
		<comments>http://scripting.chaindb.com/2012/05/15/errorprovided-as-the-service-attribute-value-in-the-servicehost-directive-could-not-be-found/#comments</comments>
		<pubDate>Tue, 15 May 2012 10:23:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Errors]]></category>
		<category><![CDATA[WCF]]></category>

		<guid isPermaLink="false">http://scripting.chaindb.com/?p=1227</guid>
		<description><![CDATA[You will encounter this type of error when running the wcf service in local machine, one of the reasons this error occurs is when you rename the .svc file. In order to solve this issue you also have to update its configuration in the web.config file in section, there you will see following sub elements [...]]]></description>
			<content:encoded><![CDATA[<p><br />
You will encounter this type of error when running the wcf service in local machine, one of the reasons this error occurs is when you rename the .svc file. In order to solve this issue you also have to update its configuration in the web.config file in section, there you will see following sub elements that needs to update</p>
<p>&lt;service name=&#8221;<strong>WCFStudy.Products.ProductsServiceImpl</strong>&#8221; behaviorConfiguration=&#8221;<strong>WCFStudy.Products.ProductsServiceImplBehavior</strong>&#8220;&gt;</p>
<p>&lt;endpoint address=&#8221;" binding=&#8221;wsHttpBinding&#8221; contract=&#8221;<strong>WCFStudy.Products.IProductService</strong>&#8220;&gt;</p>
<p>&lt;behavior name=&#8221;<strong>WCFStudy.Products.ProductsServiceImplBehavior</strong>&#8220;&gt;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://scripting.chaindb.com/2012/05/15/errorprovided-as-the-service-attribute-value-in-the-servicehost-directive-could-not-be-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error:Windows Azure Tools: Failed to initialize Windows Azure storage emulator. Unable to start Development Storage. Failed to start Storage Emulator: the SQL Server instance ‘localhost\SQLExpress’ could not be found.   Please configure the SQL Server instance for Storage Emulator using the ‘DSInit’ utility in the Windows Azure SDK.</title>
		<link>http://scripting.chaindb.com/2012/05/01/errorwindows-azure-tools-failed-to-initialize-windows-azure-storage-emulator-unable-to-start-development-storage-failed-to-start-storage-emulator-the-sql-server-instance-%e2%80%98localhostsqlex/</link>
		<comments>http://scripting.chaindb.com/2012/05/01/errorwindows-azure-tools-failed-to-initialize-windows-azure-storage-emulator-unable-to-start-development-storage-failed-to-start-storage-emulator-the-sql-server-instance-%e2%80%98localhostsqlex/#comments</comments>
		<pubDate>Tue, 01 May 2012 03:07:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Azure]]></category>

		<guid isPermaLink="false">http://scripting.chaindb.com/?p=1223</guid>
		<description><![CDATA[To use SQL Server instead of SQL Server Express for Windows Azure storage: Click Start, point to All Programs, and then click Windows Azure SDK v1.4 Right-click Windows Azure SDK Command Prompt, then click Run as Administrator In the Windows Azure SDK Command Prompt window, type the following command: DSInit /sqlInstance:&#60;SQLServerInstance&#62; Note: &#62;SQLServerInstance&#60; is the name of the SQL Server instance without the (&#60; &#62;)’s [...]]]></description>
			<content:encoded><![CDATA[<p><br />
To use <strong>SQL Server</strong> instead of <em>SQL Server Express</em> for Windows Azure storage:</p>
<ol>
<ol>
<li>Click <strong>Start</strong>, point to <strong>All Programs</strong>, and then click <strong>Windows Azure SDK v1.4</strong></li>
<li>Right-click <strong>Windows Azure SDK Command Prompt</strong>, then click <strong>Run as Administrator</strong></li>
<li>In the Windows Azure SDK Command Prompt window, type the following command: <em>DSInit /sqlInstance:&lt;SQLServerInstance&gt;</em></li>
</ol>
</ol>
<p><strong>Note</strong>: &gt;SQLServerInstance&lt; is the name of the SQL Server instance without the (&lt; &gt;)’s<br />
<strong>Note</strong>: You can also use the following command, which uses the default instance of SQL Server: <em>DSInit /sqlInstance:.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://scripting.chaindb.com/2012/05/01/errorwindows-azure-tools-failed-to-initialize-windows-azure-storage-emulator-unable-to-start-development-storage-failed-to-start-storage-emulator-the-sql-server-instance-%e2%80%98localhostsqlex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to maintain aspx page position</title>
		<link>http://scripting.chaindb.com/2012/04/12/how-to-maintain-aspx-page-position/</link>
		<comments>http://scripting.chaindb.com/2012/04/12/how-to-maintain-aspx-page-position/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 06:27:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[scroll]]></category>

		<guid isPermaLink="false">http://scripting.chaindb.com/?p=1220</guid>
		<description><![CDATA[When working with multiple forms in one page, sometimes you want to stay in the current position after submitting the form. To do this you have options; MaintainScrollPositionOnPostback set to true &#8211; you can set this in web.config to make all pages behave as you want it or you can plug it in the page [...]]]></description>
			<content:encoded><![CDATA[<p><br />
When working with multiple forms in one page, sometimes you want to stay in the current position after submitting the form. To do this you have options;</p>
<ol>
<li>MaintainScrollPositionOnPostback set to true &#8211; you can set this in web.config to make all pages behave as you want it or you can plug it in the page level.</li>
<li>You can use a javascript
<pre>    &lt;script type="text/javascript"&gt;
        window.scrollTo = function( x,y ) {
            return true;
        }
    &lt;/script&gt;</pre>
</li>
</ol>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://scripting.chaindb.com/2012/04/12/how-to-maintain-aspx-page-position/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get new image size in UIImageView</title>
		<link>http://scripting.chaindb.com/2012/04/09/how-to-get-new-image-size-in-uiimageview/</link>
		<comments>http://scripting.chaindb.com/2012/04/09/how-to-get-new-image-size-in-uiimageview/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 14:59:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[iOS]]></category>
		<category><![CDATA[UIImage]]></category>
		<category><![CDATA[UIImageView]]></category>

		<guid isPermaLink="false">http://scripting.chaindb.com/?p=1215</guid>
		<description><![CDATA[Sometime we need to know the new size of the image that’s being rendered in UIImageView with auto scaled applied. Here’s the computation -(CGRect)frameForImage:(UIImage*)image inImageViewAspectFit:(UIImageView*)imageView { float imageRatio = image.size.width / image.size.height; float viewRatio = imageView.frame.size.width / imageView.frame.size.height; if(imageRatio < viewRatio) { float scale = imageView.frame.size.height / image.size.height; float width = scale * image.size.width; float [...]]]></description>
			<content:encoded><![CDATA[<p><br />
Sometime we need to know the new size of the image that’s being rendered in UIImageView with auto scaled applied. Here’s the computation</p>
<p>-(CGRect)frameForImage:(UIImage*)image inImageViewAspectFit:(UIImageView*)imageView<br />
{<br />
    float imageRatio = image.size.width / image.size.height;</p>
<p>    float viewRatio = imageView.frame.size.width / imageView.frame.size.height;</p>
<p>    if(imageRatio < viewRatio)<br />
    {<br />
        float scale = imageView.frame.size.height / image.size.height;</p>
<p>        float width = scale * image.size.width;</p>
<p>        float topLeftX = (imageView.frame.size.width - width) * 0.5;</p>
<p>        return CGRectMake(topLeftX, 0, width, imageView.frame.size.height);<br />
    }<br />
    else<br />
    {<br />
        float scale = imageView.frame.size.width / image.size.width;</p>
<p>        float height = scale * image.size.height;</p>
<p>        float topLeftY = (imageView.frame.size.height - height) * 0.5;</p>
<p>        return CGRectMake(0, topLeftY, imageView.frame.size.width, height);<br />
    }</p>
<p>}</p>
<p><a href="http://stackoverflow.com/questions/389342/how-to-get-the-size-of-a-scaled-uiimage-in-uiimageview" title="Source" target="_blank">Source</a><br />
</p>
]]></content:encoded>
			<wfw:commentRss>http://scripting.chaindb.com/2012/04/09/how-to-get-new-image-size-in-uiimageview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xcode Installation Failed</title>
		<link>http://scripting.chaindb.com/2012/04/07/xcode-installation-failed/</link>
		<comments>http://scripting.chaindb.com/2012/04/07/xcode-installation-failed/#comments</comments>
		<pubDate>Sat, 07 Apr 2012 14:37:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[XCode]]></category>
		<category><![CDATA[xcode 4]]></category>

		<guid isPermaLink="false">http://scripting.chaindb.com/?p=1212</guid>
		<description><![CDATA[Installing xcode4 on Mac OS X 10.6.7 or 10.6.8 would sometimes failed To resolve this issue, just set your system time to January 1, 2011 or earlier, as the certificate that signed the package has expired. Xcode Installation Failed.]]></description>
			<content:encoded><![CDATA[<p><br />
Installing xcode4 on Mac OS X 10.6.7 or 10.6.8 would sometimes failed<br />
<img alt="" src="http://i.stack.imgur.com/c4ktJ.png" title="Xcode Installation Failed" class="alignnone" width="622" height="441" /></p>
<p>To resolve this issue, just set your system time to January 1, 2011 or earlier, as the certificate that signed the package has expired.</p>
<p><a href="http://stackoverflow.com/questions/9964528/xcode-installation-failed" title="Reference" target="_blank">Xcode Installation Failed.</a></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://scripting.chaindb.com/2012/04/07/xcode-installation-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Warning: The serializable class does not declare a static final serialVersionUID field</title>
		<link>http://scripting.chaindb.com/2012/03/30/warning-the-serializable-class-does-not-declare-a-static-final-serialversionuid-field/</link>
		<comments>http://scripting.chaindb.com/2012/03/30/warning-the-serializable-class-does-not-declare-a-static-final-serialversionuid-field/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 03:10:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Warning]]></category>

		<guid isPermaLink="false">http://scripting.chaindb.com/?p=1205</guid>
		<description><![CDATA[When developing java application in eclipse you will probably see this warning. To remove this warning you have to add static variable inside your class. Here&#8217;s an example; private static final long serialVersionUID = 100L; Reference 1 Reference 2]]></description>
			<content:encoded><![CDATA[<p><br />
When developing java application in eclipse you will probably see this warning. To remove this warning you have to add static variable inside your class.</p>
<p>Here&#8217;s an example;</p>
<p>private static final long serialVersionUID = 100L;</p>
<p><a href="http://stackoverflow.com/questions/285793/why-should-i-bother-about-serialversionuid" title="Reference" target="_blank">Reference 1<br />
</a><br />
<a href="http://stackoverflow.com/questions/2288937/what-does-it-mean-the-serializable-class-does-not-declare-a-static-final-serial" title="more" target="_blank">Reference 2</a><br />
</p>
]]></content:encoded>
			<wfw:commentRss>http://scripting.chaindb.com/2012/03/30/warning-the-serializable-class-does-not-declare-a-static-final-serialversionuid-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to debug windows service remotely in vb.net</title>
		<link>http://scripting.chaindb.com/2012/03/19/how-to-debug-windows-service-remotely-in-vb-net/</link>
		<comments>http://scripting.chaindb.com/2012/03/19/how-to-debug-windows-service-remotely-in-vb-net/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 04:44:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Window Services]]></category>

		<guid isPermaLink="false">http://scripting.chaindb.com/?p=1194</guid>
		<description><![CDATA[To debug windows service application that was already installed on the server, you only have to run the VISUAL STUDIO REMOTE DEBUGGING MONITOR.]]></description>
			<content:encoded><![CDATA[<p><br />
To debug windows service application that was already installed on the server, you only have to run the VISUAL STUDIO REMOTE DEBUGGING MONITOR.<br />
</p>
]]></content:encoded>
			<wfw:commentRss>http://scripting.chaindb.com/2012/03/19/how-to-debug-windows-service-remotely-in-vb-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to restrict database access and terminate all active transactions and connection in SQL Server</title>
		<link>http://scripting.chaindb.com/2012/03/19/how-to-restrict-database-access-and-terminate-all-active-transactions-and-connection-in-sql-server/</link>
		<comments>http://scripting.chaindb.com/2012/03/19/how-to-restrict-database-access-and-terminate-all-active-transactions-and-connection-in-sql-server/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 23:43:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[MS SQL Server]]></category>
		<category><![CDATA[SQL Server 2008]]></category>
		<category><![CDATA[restrict_user]]></category>
		<category><![CDATA[Sql server 2008]]></category>

		<guid isPermaLink="false">http://scripting.chaindb.com/?p=1191</guid>
		<description><![CDATA[You would apply the following command in order to restrict database access and terminate all active transaction and connection at the same time. ALTER DATABASE [DatabaeName] SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE]]></description>
			<content:encoded><![CDATA[<p><br />
You would apply the following command in order to restrict database access and terminate all active transaction and connection at the same time.</p>
<p><strong>ALTER DATABASE [DatabaeName] SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE</strong></p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://scripting.chaindb.com/2012/03/19/how-to-restrict-database-access-and-terminate-all-active-transactions-and-connection-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Warning: Multiple build commands for output file /Users/</title>
		<link>http://scripting.chaindb.com/2012/03/13/warning-multiple-build-commands-for-output-file-users/</link>
		<comments>http://scripting.chaindb.com/2012/03/13/warning-multiple-build-commands-for-output-file-users/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 15:16:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Objective C]]></category>
		<category><![CDATA[XCode]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[Warning]]></category>

		<guid isPermaLink="false">http://scripting.chaindb.com/?p=1187</guid>
		<description><![CDATA[To solve this problem the following procedures will do it; Goto View-&#62;Navigators-&#62;Project Select the root node in the left treeview, then select the Project Name under TARGETS . see image below. Select Build Phases Delete the files in red under &#8220;Copy Bundle Resources&#8221;]]></description>
			<content:encoded><![CDATA[<p><br />
To solve this problem the following procedures will do it;</p>
<ol>
<li>Goto View-&gt;Navigators-&gt;Project</li>
<li>Select the root node in the left treeview, then select the Project Name under TARGETS . see image below.</li>
<li>Select Build Phases</li>
<li>Delete the files in red under &#8220;Copy Bundle Resources&#8221;</li>
</ol>
<p></p>
<div style="padding-left: 90px;"><a href="http://scripting.chaindb.com/wp-content/uploads/2012/03/XCode-project.png" class="floatbox" rel="floatbox.1187" rev="caption:`XCode-project`"><img class="size-medium wp-image-1188 alignnone" title="XCode-project" src="http://scripting.chaindb.com/wp-content/uploads/2012/03/XCode-project-300x91.png" alt="XCode project tree" width="300" height="91" /></a></div>
<div style="padding-left: 90px;"></div>
<div style="padding-left: 90px;"></div>
<div style="padding-left: 90px;"><a href="http://scripting.chaindb.com/wp-content/uploads/2012/03/XCode-Copy-Bundle-Resources.png" class="floatbox" rel="floatbox.1187" rev="caption:`XCode-Copy-Bundle-Resources`"><img class="alignnone size-medium wp-image-1189" title="XCode-Copy-Bundle-Resources" src="http://scripting.chaindb.com/wp-content/uploads/2012/03/XCode-Copy-Bundle-Resources-300x116.png" alt="" width="300" height="116" /></a></div>
<div style="padding-left: 90px;"></div>
<div style="padding-left: 90px;"></div>
<div style="padding-left: 90px;"></div>
<div style="padding-left: 90px;"></div>
<div style="padding-left: 90px;"></div>
<div style="padding-left: 90px;"></div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://scripting.chaindb.com/2012/03/13/warning-multiple-build-commands-for-output-file-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

