<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" gd:etag="W/&quot;AkAGRHkzfyp7ImA9WhVSGE4.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923</id><updated>2012-03-15T15:12:05.787-04:00</updated><category term="VBScript" /><category term="C#" /><category term="PHP" /><category term="Visual Studio" /><category term="jQuery" /><category term="SQL" /><category term="CSS" /><category term="ASP Classic" /><category term="HTML" /><category term="Apache" /><category term="JavaScript" /><category term=".NET" /><category term="ASP.NET" /><title>Sebastien on Software</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/SebastienOnSoftware" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="sebastienonsoftware" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;CU8CR34yfyp7ImA9WhVTFU4.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-1769649462644926406</id><published>2012-02-29T11:44:00.000-05:00</published><updated>2012-02-29T11:44:26.097-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-29T11:44:26.097-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="CSS" /><category scheme="http://www.blogger.com/atom/ns#" term="HTML" /><title>CSS dropdown menu</title><content type="html">&lt;p&gt;
I was looking to make a CSS dropdown menu and I stumbled upon this &lt;a href="http://csswizardry.com/2011/02/creating-a-pure-css-dropdown-menu/"&gt;post&lt;/a&gt; at &lt;a href="http://csswizardry.com/"&gt;CSS Wizardry&lt;/a&gt;.
I tried his solution and it works well. Harry makes a good job at explaining every lines he puts in the CSS. I invite you to go read Harry's post for all the details.
&lt;/p&gt;
&lt;p&gt;
Here is a sample I gathered from Harry's post.
&lt;/p&gt;
&lt;h3&gt;HTML&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
&amp;lt;ul id=&amp;quot;menu&amp;quot;&amp;gt;
  &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Menu 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;
    &amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Menu 2&amp;lt;/a&amp;gt;
    &amp;lt;ul&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Item 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Item 2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Item 3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;/ul&amp;gt;
  &amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;
    &amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Menu 3&amp;lt;/a&amp;gt;
    &amp;lt;ul&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Item 1&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Item 2&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Item 3&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
    &amp;lt;/ul&amp;gt;
  &amp;lt;/li&amp;gt;
  &amp;lt;li&amp;gt;&amp;lt;a href=&amp;quot;#&amp;quot;&amp;gt;Menu 4&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&lt;/code&gt;
&lt;/pre&gt;
&lt;h3&gt;CSS&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
#menu {list-style:none;float:left;width:100%;margin-bottom:10px;}
#menu li {float:left;position:relative;margin-right:10px;}
#menu a {display:block;text-decoration:none;padding:5px;}
#menu a:hover {text-decoration:underline;}
#menu ul {
  background:white;list-style:none;position:absolute;left:-9999px;
}
#menu ul li {padding-top:1px;float:none;}
#menu ul a {white-space:nowrap;}
#menu li:hover ul {left:0;}
#menu li:hover a {text-decoration:underline;}
#menu li:hover ul a {text-decoration:none;}
#menu li:hover ul li a:hover {text-decoration:underline;}
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;
Cheers! :)
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-1769649462644926406?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dLoa1VV6db8lptkfY-9JyfWUfc8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dLoa1VV6db8lptkfY-9JyfWUfc8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/dLoa1VV6db8lptkfY-9JyfWUfc8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dLoa1VV6db8lptkfY-9JyfWUfc8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/1769649462644926406/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=1769649462644926406" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/1769649462644926406?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/1769649462644926406?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2012/02/css-dropdown-menu.html" title="CSS dropdown menu" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CEYFRXc9fSp7ImA9WhRaF0k.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-1210577679852865231</id><published>2012-02-20T07:48:00.000-05:00</published><updated>2012-02-20T07:48:34.965-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-20T07:48:34.965-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VBScript" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP Classic" /><title>How to write in a file in VBScript</title><content type="html">&lt;h3&gt;Scripting.FileSystemObject&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
dim objFileSystem
set objFileSystem = _
  server.createObject(&amp;quot;Scripting.FileSystemObject&amp;quot;)
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;This object is used to access the &lt;b&gt;file system&lt;/b&gt;.&lt;/p&gt;
&lt;h3&gt;Writing/Overwriting&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
CONST WRITING = 2

dim objTextStream
set objTextStream = _
  objFileSystem.openTextFile(_
  server.mapPath(&amp;quot;text-stream.output&amp;quot;), WRITING, true)
objTextStream.writeLine &amp;quot;Hello World!&amp;quot;
objTextStream.close
&lt;/code&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;code&gt;
Hello World!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;We &lt;b&gt;wrote&lt;/b&gt; Hello World! in the &lt;b&gt;text-stream.output&lt;/b&gt; file.&lt;/p&gt;
&lt;h3&gt;Appending&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
CONST APPENDING = 8

set objTextStream = _
  objFileSystem.openTextFile(_
  server.mapPath(&amp;quot;text-stream.output&amp;quot;), APPENDING, true)
objTextStream.writeLine &amp;quot;Hello World!&amp;quot;
objTextStream.close
&lt;/code&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;code&gt;
Hello World!
Hello World!
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;We &lt;b&gt;appended&lt;/b&gt; Hello World! to the &lt;b&gt;text-stream.output&lt;/b&gt; file. Now we have &lt;b&gt;two lines&lt;/b&gt; in the file.&lt;/p&gt;
&lt;h3&gt;Reading&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
CONST READING = 1

set objTextStream = _
  objFileSystem.openTextFile(_
  server.mapPath(&amp;quot;text-stream.output&amp;quot;), READING, true)
do until objTextStream.atEndOfStream
  response.write objTextStream.readLine &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;
loop  
objTextStream.close
&lt;/code&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;samp&gt;
Hello World!
Hello World!
&lt;/samp&gt;
&lt;/pre&gt;
&lt;p&gt;We read &lt;b&gt;all the lines&lt;/b&gt; in the file. We used the &lt;b&gt;readLine&lt;/b&gt; function to read a line. The &lt;b&gt;atEndOfStream&lt;/b&gt; function told us that we are at the end of the file.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-1210577679852865231?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Udl5lMW6BPgZbjtKvnbvb0mJuck/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Udl5lMW6BPgZbjtKvnbvb0mJuck/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Udl5lMW6BPgZbjtKvnbvb0mJuck/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Udl5lMW6BPgZbjtKvnbvb0mJuck/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/1210577679852865231/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=1210577679852865231" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/1210577679852865231?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/1210577679852865231?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2012/02/how-to-write-in-file-in-vbscript.html" title="How to write in a file in VBScript" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DUAEQHo-fip7ImA9WhRaEU4.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-6051389139072213411</id><published>2012-02-13T07:55:00.000-05:00</published><updated>2012-02-13T07:55:01.456-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-13T07:55:01.456-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VBScript" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP Classic" /><title>ASP Classic Scripting.Dictionary</title><content type="html">&lt;p&gt;Sometimes you need more than an &lt;strong&gt;array&lt;/strong&gt; in your code because you want keys to indentify the items. Here are some of my notes about the &lt;strong&gt;Scripting.Dictionary&lt;/strong&gt; component.&lt;/p&gt;
&lt;h3&gt;Filling the Dictionary&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
dim col : set col = server.createObject(&amp;quot;Scripting.Dictionary&amp;quot;)
col.add 1, &amp;quot;Number 1&amp;quot;
col.add 4, &amp;quot;Number 4&amp;quot;
col.add 3, &amp;quot;Number 3&amp;quot;
col.add 2, &amp;quot;Number 2&amp;quot;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Note that a key must be &lt;strong&gt;unique&lt;/strong&gt; otherwise the &lt;strong&gt;add&lt;/strong&gt; method will throw an error.&lt;/p&gt;
&lt;h3&gt;Iterating through the Dictionary&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
dim intKey
for each intKey in col
  response.write &amp;quot;Key: &amp;quot; &amp;amp; intKey _
    &amp;amp; &amp;quot; Value: &amp;quot; &amp;amp; col.item(intKey) _
    &amp;amp; &amp;quot; &amp;lt;br /&amp;gt;&amp;quot;
next
&lt;/code&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;samp&gt;
Key: 1 Value: Number 1
Key: 4 Value: Number 4
Key: 3 Value: Number 3
Key: 2 Value: Number 2 
&lt;/samp&gt;
&lt;/pre&gt;
&lt;p&gt;You can get a value by is key with the &lt;strong&gt;item&lt;/strong&gt; method.&lt;/p&gt;
&lt;h3&gt;Iterating through the values&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
dim strValue
for each strValue in col.items
  response.write &amp;quot;Value: &amp;quot; &amp;amp; strValue _
    &amp;amp; &amp;quot; &amp;lt;br /&amp;gt;&amp;quot;
next
&lt;/code&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;samp&gt;
Value: Number 1
Value: Number 4
Value: Number 3
Value: Number 2 
&lt;/samp&gt;
&lt;/pre&gt;
&lt;p&gt;By calling the &lt;strong&gt;items&lt;/strong&gt; method you can iterate through the values.&lt;/p&gt;
&lt;h3&gt;Checking if a key exists&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
response.write &amp;quot;The number 4 exists: &amp;quot; &amp;amp; col.exists(4) &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;
response.write &amp;quot;The number 25 exists: &amp;quot; &amp;amp; col.exists(25) &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;
&lt;/code&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;samp&gt;
The number 4 exists: True
The number 25 exists: False
&lt;/samp&gt;
&lt;/pre&gt;
&lt;p&gt;By calling the &lt;strong&gt;exists&lt;/strong&gt; method you can find if the key already exists in the Dictionary.&lt;/p&gt;
&lt;h3&gt;Counting&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
response.write &amp;quot;Count: &amp;quot; &amp;amp; col.count &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;
&lt;/code&gt;
&lt;/pre&gt;
&lt;pre&gt;
&lt;samp&gt;
Count: 4
&lt;/samp&gt;
&lt;/pre&gt;
&lt;p&gt;By calling the &lt;strong&gt;count&lt;/strong&gt; method you can find how many items the Dictionary contains.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Arrays are useful, but I think Dictionaries work better than arrays on accessing random elements. Don't you think?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-6051389139072213411?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9GI-4dz6ITxwataj2tS2qrfNMRg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9GI-4dz6ITxwataj2tS2qrfNMRg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/9GI-4dz6ITxwataj2tS2qrfNMRg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9GI-4dz6ITxwataj2tS2qrfNMRg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/6051389139072213411/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=6051389139072213411" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/6051389139072213411?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/6051389139072213411?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2012/02/asp-classic-scriptingdictionary.html" title="ASP Classic Scripting.Dictionary" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DU8FSXo4eCp7ImA9WhRbFkw.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-3060101588216187136</id><published>2012-02-07T07:30:00.000-05:00</published><updated>2012-02-07T07:30:18.430-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-07T07:30:18.430-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VBScript" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP Classic" /><title>Using System.Collections.ArrayList in ASP Classic</title><content type="html">&lt;h3&gt;Introduction&lt;/h3&gt;
&lt;p&gt;In a &lt;a href="http://sebastienonsoftware.blogspot.com/2012/01/using-systemcollectionssortedlist-in.html"&gt;previous&lt;/a&gt; post I wrote about System.Collections.SortedList. I made a list of some other classes we could try. Here is an example on how we could use System.Collections.ArrayList class.&lt;/p&gt;
&lt;h3&gt;Sample&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;
dim col : set col = _
  server.createObject(&amp;quot;System.Collections.ArrayList&amp;quot;)
col.add &amp;quot;D&amp;quot;
col.add &amp;quot;C&amp;quot;
col.add &amp;quot;B&amp;quot;
col.add &amp;quot;A&amp;quot;
dim str
for each str in col
  response.write str &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;
next
response.write col.contains(&amp;quot;A&amp;quot;) &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;
response.write col.contains(&amp;quot;V&amp;quot;) &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;
&lt;/code&gt;
&lt;/pre&gt;
&lt;h3&gt;Output&lt;/h3&gt;
&lt;pre&gt;
&lt;samp&gt;
D
C
B
A
True
False
&lt;/samp&gt;
&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-3060101588216187136?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/z5UOu4fVKnxscuyG6RUpgLRuKC0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/z5UOu4fVKnxscuyG6RUpgLRuKC0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/z5UOu4fVKnxscuyG6RUpgLRuKC0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/z5UOu4fVKnxscuyG6RUpgLRuKC0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/3060101588216187136/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=3060101588216187136" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/3060101588216187136?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/3060101588216187136?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2012/02/using-systemcollectionsarraylist-in-asp.html" title="Using System.Collections.ArrayList in ASP Classic" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0IHRng5eyp7ImA9WhRbEkQ.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-2439522845541917648</id><published>2012-01-30T11:06:00.002-05:00</published><updated>2012-02-03T13:58:57.623-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-03T13:58:57.623-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VBScript" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP Classic" /><title>Using System.Collections.SortedList in ASP Classic</title><content type="html">&lt;h3&gt;Introduction&lt;/h3&gt;
&lt;p&gt;Here is a quick example on how you could use .NET System.Collections.SortedList class in ASP Classic.&lt;/p&gt;
&lt;h3&gt;Sample&lt;/h3&gt;
&lt;pre&gt;
&lt;code&gt;dim col
set col = server.createObject(&amp;quot;System.Collections.SortedList&amp;quot;)
col.add &amp;quot;C&amp;quot;, &amp;quot;CC&amp;quot;
col.add &amp;quot;B&amp;quot;, &amp;quot;BB&amp;quot;
col.add &amp;quot;A&amp;quot;, &amp;quot;AA&amp;quot;
dim i
for i = 0 to col.count - 1
  response.write col.getKey(i) &amp;amp; &amp;quot; = &amp;quot;_ 
    &amp;amp; col.getByIndex(i) &amp;amp; &amp;quot;&amp;lt;br /&amp;gt;&amp;quot;
next&lt;/code&gt;
&lt;/pre&gt;
&lt;h3&gt;Output&lt;/h3&gt;
&lt;pre&gt;
&lt;samp&gt;A = AA
B = BB
C = CC&lt;/samp&gt;
&lt;/pre&gt;
&lt;h3&gt;There's more&lt;/h3&gt;
&lt;p&gt;It seems that we can use other .NET classes. You could also try some of those:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;System.Collections.Queue&lt;/li&gt;
&lt;li&gt;System.Collections.Stack&lt;/li&gt;
&lt;li&gt;System.Collections.ArrayList&lt;/li&gt;
&lt;li&gt;System.Collections.Hashtable&lt;/li&gt;
&lt;li&gt;System.IO.StringWriter&lt;/li&gt;
&lt;li&gt;System.IO.MemoryStream&lt;/li&gt;
&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-2439522845541917648?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/4UUo4PU55_m1NzHxC40fFV5FaAM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4UUo4PU55_m1NzHxC40fFV5FaAM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/4UUo4PU55_m1NzHxC40fFV5FaAM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/4UUo4PU55_m1NzHxC40fFV5FaAM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/2439522845541917648/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=2439522845541917648" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/2439522845541917648?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/2439522845541917648?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2012/01/using-systemcollectionssortedlist-in.html" title="Using System.Collections.SortedList in ASP Classic" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0IBRnc7fSp7ImA9WhRbEkQ.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-9022012273797138407</id><published>2012-01-23T11:43:00.000-05:00</published><updated>2012-02-03T13:59:17.905-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-03T13:59:17.905-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VBScript" /><category scheme="http://www.blogger.com/atom/ns#" term="ASP Classic" /><title>Measuring execution time in VBScript</title><content type="html">&lt;h3&gt;Introduction&lt;/h3&gt;
&lt;p&gt;There is multiple techniques to measure the execution time of your code. Here is an example with the &lt;a href="http://en.wikipedia.org/wiki/VBScript"&gt;VBScript&lt;/a&gt; &lt;a href="http://www.w3schools.com/vbscript/func_timer.asp"&gt;Timer&lt;/a&gt; function.&lt;/p&gt;
&lt;h3&gt;Sample&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
dim dblTimeStarted : dblTimeStarted = timer
dim i
for i = 0 to 100000000
next
dim dblTimeEnded : dblTimeEnded = timer
response.write "Time: " _
  &amp; formatNumber(dblTimeEnded - dblTimeStarted, 0)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;Output&lt;/h3&gt;
&lt;pre&gt;&lt;samp&gt;
Time: 3
&lt;/samp&gt;&lt;/pre&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;A profiler could probably help you achieve the same result. But if you need to do a quick check I think this technique is fine.&lt;/p&gt;
&lt;p&gt;Cheers :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-9022012273797138407?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/RAusTv7GIAg6JHNnkod4kKfAAA8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RAusTv7GIAg6JHNnkod4kKfAAA8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/RAusTv7GIAg6JHNnkod4kKfAAA8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/RAusTv7GIAg6JHNnkod4kKfAAA8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/9022012273797138407/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=9022012273797138407" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/9022012273797138407?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/9022012273797138407?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2012/01/measuring-execution-time-in-vbscript.html" title="Measuring execution time in VBScript" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D04MR3g-fip7ImA9WhRVGE8.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-3505800494996156559</id><published>2012-01-17T13:46:00.000-05:00</published><updated>2012-01-17T13:46:26.656-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-17T13:46:26.656-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="C#" /><title>How to send an email in .NET</title><content type="html">&lt;p&gt;Here's a quick post on how to send an email in .NET.&lt;/p&gt;
&lt;h3&gt;
We need&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
using System.Net;
using System.Net.Mail;
&lt;/code&gt;
&lt;/pre&gt;
&lt;h3&gt;
The hard coded way&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
MailMessage message = new MailMessage();
message.From = new MailAddress("from@email.com");
message.To.Add(new MailAddress("to@email.com"));
message.Subject = "Email subject";
message.Body = "Email body";
SmtpClient smtp = new SmtpClient();
smtp.Host = "your.smtp.com";
smtp.Port = 25;
smtp.Credentials = 
  new NetworkCredential("username", "password");
smtp.Send(message);
&lt;/code&gt;
&lt;/pre&gt;
&lt;h3&gt;
The configured way&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt; 
MailMessage message = new MailMessage();
message.From = new MailAddress("from@email.com");
message.To.Add(new MailAddress("to@email.com"));
message.Subject = "Email subject";
message.Body = "Email body";
SmtpClient smtp = new SmtpClient();
smtp.Send(message);
&lt;/code&gt;
&lt;/pre&gt;
&lt;h3&gt;
In the config file&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;system.net&amp;gt;
  &amp;lt;mailSettings&amp;gt;
    &amp;lt;smtp&amp;gt;
      &amp;lt;network 
        host="your.smtp.com" 
        port="25" 
        userName="username" 
        password="password" /&amp;gt;
    &amp;lt;/smtp&amp;gt;
  &amp;lt;/mailSettings&amp;gt;
&amp;lt;/system.net&amp;gt;
&lt;/code&gt;
&lt;/pre&gt;
&lt;p&gt;Cheers! :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-3505800494996156559?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/yDM3mIiJwF-DeAn1IDMn-tr5hL8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yDM3mIiJwF-DeAn1IDMn-tr5hL8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/yDM3mIiJwF-DeAn1IDMn-tr5hL8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/yDM3mIiJwF-DeAn1IDMn-tr5hL8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/3505800494996156559/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=3505800494996156559" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/3505800494996156559?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/3505800494996156559?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2012/01/how-to-send-email-in-net.html" title="How to send an email in .NET" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total></entry><entry gd:etag="W/&quot;D0EARX8_fip7ImA9WhRSGUU.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-7174116954433121298</id><published>2011-11-22T13:14:00.000-05:00</published><updated>2011-11-22T13:14:04.146-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-22T13:14:04.146-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><title>Submit is not a function</title><content type="html">&lt;span class="Apple-style-span" style="font-size: large;"&gt;Prologue&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
How do you submit a form in JavaScript? It's simple. You get the form object and you use the submit method on it. But wait! Why do I get an error saying &lt;b&gt;Submit is not a function&lt;/b&gt;?&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;What happened?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Let's say you have this form on your page:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
&amp;lt;form name="myForm" method="post"&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;nbsp; &amp;nbsp; action="javascript-submit-demo.asp"&amp;gt;&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;lt;div&amp;gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;input type="button" &lt;b&gt;name="submit"&lt;/b&gt;&amp;nbsp;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; value="Submit" onclick="submitMyForm();" /&amp;gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/div&amp;gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;lt;/form&amp;gt;&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
You want to submit this form using JavaScript:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
function submitMyForm() { document.myForm.submit(); }
&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
If you try this code you'll get an error saying &lt;b&gt;document.myForm.submit is not a function&lt;/b&gt;. The problem is &lt;b&gt;our form has an input named submit&lt;/b&gt;. We have overwritten the submit method of the form object. We have now a reference to the input element. It should be obvious by now that you should rename the input.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;Epilogue&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
When creating your HTML form choose the name of your inputs fields with care. If you can avoid overwriting the methods and the properties of the JavaScript Form Object your code should be less error-prone.&lt;br /&gt;
&lt;br /&gt;
It's the first time I stumble upon this kind of behavior. Is it JavaScript general knowledge?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-7174116954433121298?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5cai848cGMyHf_AqS5WDDMgu28c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5cai848cGMyHf_AqS5WDDMgu28c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/5cai848cGMyHf_AqS5WDDMgu28c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5cai848cGMyHf_AqS5WDDMgu28c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/7174116954433121298/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=7174116954433121298" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/7174116954433121298?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/7174116954433121298?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2011/11/submit-is-not-function.html" title="Submit is not a function" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEcNQ345cSp7ImA9WhRSFEk.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-156778400800951256</id><published>2011-11-16T07:21:00.000-05:00</published><updated>2011-11-16T07:21:32.029-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-16T07:21:32.029-05:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET" /><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio" /><title>How to exclude a folder from Visual Studio</title><content type="html">&lt;span class="Apple-style-span" style="font-size: large;"&gt;Introduction&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
When you have a project where the sources are controlled by &lt;a href="http://mercurial.selenic.com/"&gt;Mercurial&lt;/a&gt;, you have a .hg folder in your project folder. In Visual Studio, the .hg folder is visible in the Solution Explorer. It means that the .hg folder is part of the project. If you have a web site project and you're using the Visual Studio Publish Web Site tool, it means the .hg folder will be published with your web application.&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;Set the .hg hidden property&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
A simple way to avoid publishing your .hg folder is by setting the hidden property in the Windows Explorer.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-SYOHoYD9Hkc/TsFNnf_nEbI/AAAAAAAAABs/Gzw9c7kDFQk/s1600/hide-from-visual-studio.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-SYOHoYD9Hkc/TsFNnf_nEbI/AAAAAAAAABs/Gzw9c7kDFQk/s320/hide-from-visual-studio.png" width="248" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
There are a lot of ways to avoid publishing a folder with Visual Studio. I think this tip is simple enough to keep you going. Is there someone out there that resolved the same issue with another trick?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-156778400800951256?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NgEYshEQc4Qp-UXSKUpnmCmrgPY/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NgEYshEQc4Qp-UXSKUpnmCmrgPY/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NgEYshEQc4Qp-UXSKUpnmCmrgPY/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NgEYshEQc4Qp-UXSKUpnmCmrgPY/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/156778400800951256/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=156778400800951256" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/156778400800951256?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/156778400800951256?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2011/11/how-to-exclude-folder-from-visual.html" title="How to exclude a folder from Visual Studio" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-SYOHoYD9Hkc/TsFNnf_nEbI/AAAAAAAAABs/Gzw9c7kDFQk/s72-c/hide-from-visual-studio.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;CUUDQ30-fip7ImA9WhdWFk0.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-8197058735215608487</id><published>2011-09-09T17:21:00.000-04:00</published><updated>2011-09-09T17:21:12.356-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-09T17:21:12.356-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PHP" /><category scheme="http://www.blogger.com/atom/ns#" term="Apache" /><title>How did I installed Apache HTTP Server and PHP on my Windows XP box</title><content type="html">It's not funny when your computer crashes and you have to reinstall everything from scratch. Last night I was installing &lt;a href="http://projects.apache.org/projects/http_server.html"&gt;Apache HTTP Server&lt;/a&gt; on my Windows XP box because I'm currently making some websites with &lt;a href="http://www.php.net/"&gt;PHP&lt;/a&gt;. The process was a little bit bumpy so I decided to write this post to keep some notes about it.&lt;br /&gt;
&lt;h5&gt;




Apache HTTP Server Installation&lt;/h5&gt;
First of all I installed the Apache HTTP Server. It was pretty straightfoward. I downloaded the installer for the &lt;a href="http://httpd.apache.org/download.cgi"&gt;latest stable release&lt;/a&gt;&amp;nbsp;and I launched it. A little test on 127.1.1.1 told me that everything was fine.&lt;br /&gt;
&lt;h5&gt;




PHP Installation&lt;/h5&gt;
Next I went to the PHP website to &lt;a href="http://windows.php.net/download/"&gt;download the installer&lt;/a&gt; for Windows. I read the "Which version do I choose?" column to be able to get the right version. So far so good. For Apache HTTP Server I needed to get the VC6 x86 version. After that it got a little bit foggy but &lt;a href="http://www.websiteadministrator.com.au/articles/install_guides/installing_php535_pg2.html#Non_Thread_Safe"&gt;I found that if your running Apache on a Windows box you should install the "Thread Safe" version&lt;/a&gt;. I chose to let the installer integrate PHP with my Apache HTTP Server installation.&lt;br /&gt;
&lt;h5&gt;




Can't load PHP module&lt;/h5&gt;
Again I did a test to see if PHP was installed properly but it seems that something went wrong. I restarted the Apache service and at my grand surprise, Apache refused to start. To be able to track the problem I opened the error log. It seems that my PHP integration with Apache was wrong. I found that Apache was unable to load the "php5apache2_2.dll" cause the path to the file was wrong.&lt;br /&gt;
&lt;h5&gt;




How to fix it&lt;/h5&gt;
To fix this problem I opened the httpd.conf file. It's the configuration for the Apache HTTP Server. At the bottom of the file the PHP installer wrote two lines.&lt;br /&gt;
&lt;br /&gt;
First I changed the first line that indicated the path to the PHP installation:&lt;br /&gt;
&lt;br /&gt;
PHPIniDir "C:/Program Files/PHP"&lt;br /&gt;
&lt;br /&gt;
Second I changed the second line that loads the PHP module:&lt;br /&gt;
&lt;br /&gt;
LoadModule php5_module "C:/Program Files/PHP/php5apache2_2.dll"&lt;br /&gt;
&lt;br /&gt;
Finally I restarted the Apache service and it worked!&lt;br /&gt;
&lt;h5&gt;



Serving index.php&lt;/h5&gt;
I had to configure Apache to serve the index.php when someone tries to access a directory on the&amp;nbsp;web server. Also in the httpd.conf file I changed the instructions to dir_module:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;IfModule dir_module&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; DirectoryIndex index.php index.html&lt;br /&gt;
&amp;lt;/IfModule&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example if a call is made to "127.1.1.1/test" the web server will try to serve index.php first and index.html in second.&lt;br /&gt;
&lt;h5&gt;


Dynamic DNS&lt;/h5&gt;
I configured my router to forward the HTTP requests from the web to my server because I wanted to use my dynamic DNS to access the sites hosted on it. Everything was fine with the router but I needed to add the apache.exe file to the Windows Firewall to make it work.&lt;br /&gt;
&lt;h5&gt;

Bedtime&lt;/h5&gt;
It took me an evening to setup everything. It's not too bad because I had to do a lot of reading to configure everything properly. But now that I have those notes I hope that my next installation will go more smoothly.&lt;br /&gt;
&lt;br /&gt;
Has anyone out there had a similar experience (or better) at installing Apache and PHP on a Windows box?&lt;br /&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-8197058735215608487?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mOyJjSTXd85p23Mufe_6jg6K6ck/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mOyJjSTXd85p23Mufe_6jg6K6ck/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mOyJjSTXd85p23Mufe_6jg6K6ck/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mOyJjSTXd85p23Mufe_6jg6K6ck/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/8197058735215608487/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=8197058735215608487" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/8197058735215608487?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/8197058735215608487?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2011/09/how-did-i-installed-apache-http-server.html" title="How did I installed Apache HTTP Server and PHP on my Windows XP box" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;D0cHQHg-eCp7ImA9WhdWE04.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-5095798466671335027</id><published>2011-09-06T14:50:00.000-04:00</published><updated>2011-09-06T14:50:31.650-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-06T14:50:31.650-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript" /><title>How to pass a parameter to a function called by setTimeout</title><content type="html">&lt;p&gt;Let's say that you have this function:&lt;/p&gt;
&lt;pre&gt;
function say(p_message) {
    alert(p_message);
}
&lt;/pre&gt;
&lt;p&gt;To use this function you need to pass a message in parameter. So if you wish to say hello to your visitors, you could use this function like this:&lt;/p&gt;
&lt;pre&gt;
say("Hello World!");
&lt;/pre&gt;
&lt;p&gt;It can be tempting to use setTimeout like this:&lt;/p&gt;
&lt;pre&gt;
setTimeout(say("Hello World"), 10000);
&lt;/pre&gt;
&lt;p&gt;But it's not going to work the way you think. You just made an invalid call to setTimeout. Here's a simple way to do it:&lt;/p&gt;
&lt;pre&gt;
setTimeout(function() {say("Hello World!")}, 10000);
&lt;/pre&gt;
&lt;p&gt;Now, "Hello World!" will appear to the screen after 10 secondes.&lt;/p&gt;
&lt;p&gt;Cheers :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-5095798466671335027?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/bSZSsgJnLfkK8WTgmQlOpJPT3No/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bSZSsgJnLfkK8WTgmQlOpJPT3No/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/bSZSsgJnLfkK8WTgmQlOpJPT3No/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/bSZSsgJnLfkK8WTgmQlOpJPT3No/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/5095798466671335027/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=5095798466671335027" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/5095798466671335027?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/5095798466671335027?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2011/09/how-to-pass-parameter-to-function.html" title="How to pass a parameter to a function called by setTimeout" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0IAQns_fip7ImA9WhdRFEo.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-1524123462322319765</id><published>2011-08-04T13:37:00.001-04:00</published><updated>2011-08-04T13:39:03.546-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-04T13:39:03.546-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jQuery" /><title>How to disable an element with jQuery</title><content type="html">Here's a quick post that shows how to disable and enable an element with &lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt;.&lt;br /&gt;&lt;h5&gt;Disable an element&lt;/h5&gt;&lt;pre&gt;$("#save").attr("disabled", "disabled");&lt;/pre&gt;&lt;h5&gt;Enable an element&lt;/h5&gt;&lt;pre&gt;$("#save").removeAttr("disabled");&lt;/pre&gt;&lt;br /&gt;For example, I'm using this when I want to disable a submit button upon a form submission.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cheers :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-1524123462322319765?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1iTxKDVCD-1BjYlRGyT8-l7DTRc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1iTxKDVCD-1BjYlRGyT8-l7DTRc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1iTxKDVCD-1BjYlRGyT8-l7DTRc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1iTxKDVCD-1BjYlRGyT8-l7DTRc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/1524123462322319765/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=1524123462322319765" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/1524123462322319765?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/1524123462322319765?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2011/08/how-to-disable-element-with-jquery.html" title="How to disable an element with jQuery" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;DEUNSHo5fip7ImA9WhdSF00.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-6454049402168751774</id><published>2011-07-26T11:06:00.000-04:00</published><updated>2011-07-26T14:51:39.426-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-26T14:51:39.426-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL" /><title>How to get the first day of the month in SQL</title><content type="html">&lt;p&gt;Let's say that you have a table that keeps all the purchases made by some clients. In that table you have a field that indicates the date of a given purchase. I'll call it purchase_date. Now, someone need a report on the purchases by month. You should be able to provide this report with a SQL query similar to:&lt;br /&gt;&lt;/p&gt;&lt;pre&gt;select dateadd(month, datediff(month, 0, purchase_date), 0), count(purchase_number)&lt;br /&gt;from purchase group by dateadd(month, datediff(month, 0, purchase_date), 0)&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;I'm using the SQL &lt;b&gt;dateadd&lt;/b&gt; and &lt;b&gt;datediff&lt;/b&gt; functions to bring the purchase_date to the first of the month. Basically, with the datediff function, I calculate the number of months from purchase_date to date zero. Then, with the dateadd function, I add the calculated number of months to date zero to get the first of the month.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Cheers :)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-6454049402168751774?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/s_bNb8GviXEoD7skwFRpN3Bss8U/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/s_bNb8GviXEoD7skwFRpN3Bss8U/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/s_bNb8GviXEoD7skwFRpN3Bss8U/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/s_bNb8GviXEoD7skwFRpN3Bss8U/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/6454049402168751774/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=6454049402168751774" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/6454049402168751774?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/6454049402168751774?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2011/07/how-to-get-first-day-of-month-in-sql.html" title="How to get the first day of the month in SQL" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry><entry gd:etag="W/&quot;A0MGRnk6cCp7ImA9WhdTEEk.&quot;"><id>tag:blogger.com,1999:blog-2729019757594577923.post-5398866984015118626</id><published>2011-07-07T08:01:00.009-04:00</published><updated>2011-07-07T10:37:07.718-04:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-07T10:37:07.718-04:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="SQL" /><title>How to round up in SQL</title><content type="html">&lt;div&gt;I was looking around to find how to round up a number in one of my SQL query.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The thing is that it depends on your SQL engine. For exemple on &lt;a href="http://www.pervasive.com/"&gt;PSQL&lt;/a&gt; you can use the &lt;b&gt;ceiling&lt;/b&gt; function like this:&lt;/div&gt;&lt;pre&gt;select ceiling(1.3)&lt;/pre&gt;Check out your database vendor documentation to find a similar function. I'll bet that there is one.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Cheers :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2729019757594577923-5398866984015118626?l=sebastienonsoftware.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mzXPW8Of99gr8Y3d23nIPIZ1Fwg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mzXPW8Of99gr8Y3d23nIPIZ1Fwg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mzXPW8Of99gr8Y3d23nIPIZ1Fwg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mzXPW8Of99gr8Y3d23nIPIZ1Fwg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;</content><link rel="replies" type="application/atom+xml" href="http://sebastienonsoftware.blogspot.com/feeds/5398866984015118626/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=2729019757594577923&amp;postID=5398866984015118626" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/5398866984015118626?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2729019757594577923/posts/default/5398866984015118626?v=2" /><link rel="alternate" type="text/html" href="http://sebastienonsoftware.blogspot.com/2011/07/how-to-round-up-in-sql.html" title="How to round up in SQL" /><author><name>Sébastien Ayotte</name><uri>http://www.blogger.com/profile/07347037758393355196</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total></entry></feed>

