<?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>leinadium &#187; code</title>
	<atom:link href="http://www.leinadium.com/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.leinadium.com</link>
	<description>Techhead. Codewarrior. Legalnerd.</description>
	<lastBuildDate>Fri, 02 Sep 2011 20:09:28 +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>Remove MS Word Smart Quotes in Vbscript</title>
		<link>http://www.leinadium.com/code/remove-ms-word-smart-quotes-in-vbscript/</link>
		<comments>http://www.leinadium.com/code/remove-ms-word-smart-quotes-in-vbscript/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 20:09:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.leinadium.com/?p=821</guid>
		<description><![CDATA[just a little tidbit that was driving me crazy. Haven&#8217;t used ASCW and CHRW much, but here it goes: strtitle = Replace(strTitle,ChrW(8211),&#8221;&#8211;&#8221;) strtitle = Replace(strTitle,ChrW(8212),&#8221;&#8211;&#8221;) strtitle = Replace(strTitle,ChrW(8216),&#8221;&#8216;&#8221;) strtitle = Replace(strTitle,ChrW(8217),&#8221;&#8216;&#8221;) strtitle = Replace(strTitle,ChrW(8220),&#8221;"&#8221;") strtitle = Replace(strTitle,ChrW(8221),&#8221;"&#8221;") strtitle = Replace(strTitle,ChrW(8226),&#8221;*&#8221;) strtitle = Replace(strTitle,ChrW(8482),&#8221;") strtitle = Replace(strTitle,ChrW(8230),&#8221;.&#8221;)]]></description>
			<content:encoded><![CDATA[<p>just a little tidbit that was driving me crazy.</p>
<p>Haven&#8217;t used ASCW and CHRW much, but here it goes:</p>
<p>	strtitle = Replace(strTitle,ChrW(8211),&#8221;&#8211;&#8221;)<br />
	strtitle = Replace(strTitle,ChrW(8212),&#8221;&#8211;&#8221;)<br />
	strtitle = Replace(strTitle,ChrW(8216),&#8221;&#8216;&#8221;)<br />
	strtitle = Replace(strTitle,ChrW(8217),&#8221;&#8216;&#8221;)<br />
	strtitle = Replace(strTitle,ChrW(8220),&#8221;"&#8221;")<br />
	strtitle = Replace(strTitle,ChrW(8221),&#8221;"&#8221;")<br />
	strtitle = Replace(strTitle,ChrW(8226),&#8221;*&#8221;)<br />
	strtitle = Replace(strTitle,ChrW(8482),&#8221;")<br />
	strtitle = Replace(strTitle,ChrW(8230),&#8221;.&#8221;)	</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/remove-ms-word-smart-quotes-in-vbscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSXML Object ASP</title>
		<link>http://www.leinadium.com/code/msxml-object-asp/</link>
		<comments>http://www.leinadium.com/code/msxml-object-asp/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 23:24:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.leinadium.com/?p=741</guid>
		<description><![CDATA[2 errors today: msxml6.dll threw The host name in the certificate is invalid or does not match -2147012858 which can be fixed by using the following code: http.open &#8220;GET&#8221;, url, True Const SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS = 13056 http.setOption 2, SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS then msxml6.dll threw The connection with the server was terminated abnormally -2147012866 In the code I found [...]]]></description>
			<content:encoded><![CDATA[<p>2 errors today:<br />
msxml6.dll threw<br />
The host name in the certificate is invalid or does not match<br />
-2147012858</p>
<p>which can be fixed by using the following code:</p>
<p>http.open &#8220;GET&#8221;, url, True<br />
Const SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS = 13056<br />
http.setOption 2, SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS</p>
<p>then msxml6.dll threw<br />
The connection with the server was terminated abnormally<br />
-2147012866</p>
<p>In the code I found the following line which caused the trouble:<br />
http.setRequestHeader &#8220;Connection&#8221;, &#8220;Close&#8221;<br />
Why oh Why?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/msxml-object-asp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook connect blocked by company internet / firewall</title>
		<link>http://www.leinadium.com/code/facebook-connect-blocked-by-company-internet-firewall/</link>
		<comments>http://www.leinadium.com/code/facebook-connect-blocked-by-company-internet-firewall/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 13:37:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[blocked]]></category>
		<category><![CDATA[facebook connect]]></category>
		<category><![CDATA[firewall]]></category>

		<guid isPermaLink="false">http://www.leinadium.com/?p=711</guid>
		<description><![CDATA[We recently had the problem that our site was loading very slowly for some users because their firewall blocked any access to facebook (company guidelines). After a quick search I found a great solution by the guys at tripadvisor. http://tech.tripadvisor.com/]]></description>
			<content:encoded><![CDATA[<p>We recently had the problem that our site was loading very slowly for some users because their firewall blocked any access to facebook (company guidelines). After a quick search I found a great solution by the guys at tripadvisor.<br />
<a href="http://tech.tripadvisor.com/" target="_blank"> http://tech.tripadvisor.com/ </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/facebook-connect-blocked-by-company-internet-firewall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>great example of facebook integration on classic asp</title>
		<link>http://www.leinadium.com/code/great-example-of-facebook-integration-on-classic-asp/</link>
		<comments>http://www.leinadium.com/code/great-example-of-facebook-integration-on-classic-asp/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 20:22:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.leinadium.com/?p=421</guid>
		<description><![CDATA[Here&#8217;s an excellent example of facebook integration using classic ASP by Larry Boeldt. http://www.codeproject.com/KB/asp/classic-asp-facebookweb.aspx]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s an excellent example of facebook integration using classic ASP by Larry Boeldt.<br />
<a title="classic asp facebook" href="http://www.codeproject.com/KB/asp/classic-asp-facebookweb.aspx"> http://www.codeproject.com/KB/asp/classic-asp-facebookweb.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/great-example-of-facebook-integration-on-classic-asp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>classic asp memory leaks in IIS</title>
		<link>http://www.leinadium.com/code/classic-asp-memory-leaks-in-iis/</link>
		<comments>http://www.leinadium.com/code/classic-asp-memory-leaks-in-iis/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 19:55:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[memory leak]]></category>

		<guid isPermaLink="false">http://www.leinadium.com/?p=102</guid>
		<description><![CDATA[Here&#8217;s a nice link to tools that will help you figure out where the memory leak is happening: http://community.sgdotnet.org/blogs/darenhan/archive/2007/10/29/How-to-solve-memory-leak-in-IIS-w3p.exe.aspx Remember the following: 1. close your database recordsets 2. close your database connections 3. close any other objects you&#8217;ve created 4. in case you come across a response.redirect do all of the above before calling it. [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a nice link to tools that will help you figure out where the memory leak is happening:</p>
<p><a href="http://community.sgdotnet.org/blogs/darenhan/archive/2007/10/29/How-to-solve-memory-leak-in-IIS-w3p.exe.aspx">http://community.sgdotnet.org/blogs/darenhan/archive/2007/10/29/How-to-solve-memory-leak-in-IIS-w3p.exe.aspx</a></p>
<p>Remember the following:</p>
<p>1. close your database recordsets</p>
<p>2. close your database connections</p>
<p>3. close any other objects you&#8217;ve created</p>
<p>4. in case you come across a response.redirect do all of the above before calling it.</p>
<p>5. read 4.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/classic-asp-memory-leaks-in-iis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php header() not working in opera on mac</title>
		<link>http://www.leinadium.com/code/php-header-not-working-in-opera-on-mac/</link>
		<comments>http://www.leinadium.com/code/php-header-not-working-in-opera-on-mac/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 16:29:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://www.leinadium.com/misc/php-header-not-working-in-opera-on-mac/</guid>
		<description><![CDATA[Came across this strange behaviour in Opera on Mac. The php header command was simply ignored and the rest of the page executed normally. Finally found a solution that calls a javascript redirect if nothing else works. //==== Redirect&#8230; Try PHP header redirect, then Java redirect, then try http redirect.: function redir($url) { if (!headers_sent()) [...]]]></description>
			<content:encoded><![CDATA[<p>Came across this strange behaviour in Opera on Mac.<br />
The php header command was simply ignored and the rest of the page executed normally.<br />
Finally found a solution that calls a javascript redirect if nothing else works.</p>
<p>//==== Redirect&#8230; Try PHP header redirect, then Java redirect, then try http redirect.:<br />
function redir($url) {<br />
if (!headers_sent()) {    //If headers not sent yet&#8230; then do php redirect<br />
header(&#8216;Location: &#8216;.$url);</p>
<p>exit;<br />
} else {<br />
//If headers are sent&#8230; do java redirect&#8230; if java disabled, do html redirect.<br />
echo &#8216;&lt;script type=&#8221;text/javascript&#8221;&gt;&#8217;;<br />
echo &#8216;window.location.href=&#8221;&#8216;.$url.&#8217;&#8221;;&#8217;;<br />
echo &#8216;&lt;/script&gt;&#8217;;<br />
echo &#8216;&lt;noscript&gt;&#8217;;<br />
echo &#8216;&lt;meta http-equiv=&#8221;refresh&#8221; content=&#8221;0;url=&#8217;.$url.&#8217;&#8221; /&gt;&#8217;;<br />
echo &#8216;&lt;/noscript&gt;&#8217;;<br />
exit;<br />
}<br />
return 1;<br />
}</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=dd7be906-a839-8e38-98cb-91e4b8f86ef4" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/php-header-not-working-in-opera-on-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why custom errors were not firing in IIS6</title>
		<link>http://www.leinadium.com/code/why-custom-errors-were-not-firing-in-iis6/</link>
		<comments>http://www.leinadium.com/code/why-custom-errors-were-not-firing-in-iis6/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 16:28:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[custom errors]]></category>
		<category><![CDATA[iis]]></category>

		<guid isPermaLink="false">http://www.leinadium.com/?p=92</guid>
		<description><![CDATA[Strangely I noticed an error in one of our scripts by surfing onto the page and noticing that ugly vbscript error in script.asp line 151.. This was deeply troubling, as I was wondering how many errors went undetected by our custom error scripts. It turns out that this was the only page this happened on [...]]]></description>
			<content:encoded><![CDATA[<p>Strangely I noticed an error in one of our scripts by surfing onto the page and noticing that ugly vbscript error in script.asp line 151..<br />
This was deeply troubling, as I was wondering how many errors went undetected by our custom error scripts.<br />
It turns out that this was the only page this happened on because we had left some old REsponse.Flush commands in a particular function.<br />
Here&#8217;s the link that explains it <a href="http://forums.iis.net/p/993221/1313916.aspx">http://forums.iis.net/p/993221/1313916.aspx</a></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=ce839e85-a26f-8d6e-80bf-077ea5b1c448" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/why-custom-errors-were-not-firing-in-iis6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ipayment addresscheck</title>
		<link>http://www.leinadium.com/code/ipayment-addresscheck/</link>
		<comments>http://www.leinadium.com/code/ipayment-addresscheck/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 03:39:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[ipayment]]></category>

		<guid isPermaLink="false">http://www.leinadium.com/?p=75</guid>
		<description><![CDATA[Today we had some trouble with the automatic address check provided by our payment provider ipayment. For some reason, german street names were no longer accepted if they contained special german characters such as ß or ö,ä,ü. We countered by replacing them with their &#8220;manual&#8221; counterparts ss, oe, ae, ue.  The problem seems to have [...]]]></description>
			<content:encoded><![CDATA[<p>Today we had some trouble with the automatic address check provided by our payment provider ipayment.</p>
<p>For some reason, german street names were no longer accepted if they contained special german characters such as ß or ö,ä,ü. We countered by replacing them with their &#8220;manual&#8221; counterparts ss, oe, ae, ue. </p>
<p>The problem seems to have disappeared a few hours later but my email to ipayment has been unanswered so far.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/ipayment-addresscheck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>new canonical tag by google, yahoo, etc..</title>
		<link>http://www.leinadium.com/code/new-canonical-tag-by-google-yahoo-etc/</link>
		<comments>http://www.leinadium.com/code/new-canonical-tag-by-google-yahoo-etc/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 23:15:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[canonical]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.leinadium.com/?p=71</guid>
		<description><![CDATA[After reading up on the new canonical tag by google I immediately looked at implementing it on our home-grown cms. It turns out that we&#8217;re already 301ing where we can, and the canonical tag would have little relevance at first glance.  http://www.mattcutts.com/blog/canonical-link-tag/ However, we use our own session management and sometimes a url like verynice.html [...]]]></description>
			<content:encoded><![CDATA[<p>After reading up on the new canonical tag by google I immediately looked at implementing it on our home-grown cms. It turns out that we&#8217;re already 301ing where we can, and the canonical tag would have little relevance at first glance. </p>
<p><a href="http://www.mattcutts.com/blog/canonical-link-tag/" target="_blank">http://www.mattcutts.com/blog/canonical-link-tag/</a></p>
<p>However, we use our own session management and sometimes a url like verynice.html gets turned into notsonice.asp?id=verynice when certain session functions kick in.</p>
<p>A quick hack into our header and now we use the canonical tag in order to tell google and yahoo about our content. As I&#8217;ve seen thousands of duplicate content issues in google webmaster tools, I hope this will have some effect.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/new-canonical-tag-by-google-yahoo-etc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>strip html tags in vbscript</title>
		<link>http://www.leinadium.com/code/strip-html-tags-in-vbscript/</link>
		<comments>http://www.leinadium.com/code/strip-html-tags-in-vbscript/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 11:59:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[asp]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[regex]]></category>

		<guid isPermaLink="false">http://217.11.59.22/leinadium/?p=60</guid>
		<description><![CDATA[Function stripHTMLtags(HTMLstring) Set RegularExpressionObject = New RegExp With RegularExpressionObject .Pattern = &#8220;&#60;[^&#62;]+&#62;&#8221; .IgnoreCase = True .Global = True End With stripHTMLtags = RegularExpressionObject.Replace(HTMLstring, &#8220;&#8221;) Set RegularExpressionObject = nothing End Function]]></description>
			<content:encoded><![CDATA[<p><span style="color: #808080;">Function stripHTMLtags(HTMLstring)</span></p>
<p>Set RegularExpressionObject = New RegExp</p>
<p>With RegularExpressionObject<br />
.Pattern = &#8220;&lt;[^&gt;]+&gt;&#8221;<br />
.IgnoreCase = True<br />
.Global = True<br />
End With</p>
<p>stripHTMLtags = RegularExpressionObject.Replace(HTMLstring, &#8220;&#8221;)<br />
Set RegularExpressionObject = nothing</p>
<p>End Function</p>
]]></content:encoded>
			<wfw:commentRss>http://www.leinadium.com/code/strip-html-tags-in-vbscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

