<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Edward Tanguay's Code Examples</title>
		<description>Code examples on PHP, AJAX, CSS, Flash, ASP.NET, etc.</description>
		<link>http://www.tanguay.info/web/codeExamples.php</link>
		<item>
			<title>PHP CODE: File that shows how all PHP 5.2 input_filters work.</title>
			<description>This file runs through the input filters codes and shows how e.g. filter_var($value, FILTER_SANITIZE_STRING) and filter_input($value, FILTER_SANITIZE_STRING) will alter strings. You can &lt;a href=&quot;http://tanguay.info/web/examples/filter_input.php&quot; target=&quot;_blank&quot;&gt;see an example this here.&lt;/a&gt;. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1079</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1079</guid>
			<pubDate>18 Nov 2008 21:18:21 GMT</pubDate>
		</item>
		<item>
			<title>PHP CODE: How to create a PHP Webservice with nusoap and consume it with nusoap and PHP5's SoapClient()</title>
			<description>Nusoap is convenient because you don't have to make any changes on the server, just download and copy the library files to a sub-directory. Nusoap also creates a WSDL file automatically for you. These examples show how to return an array of values so that you could, e.g. return 20 fields of information about a user, for instance. Not that on the nusoap examples I turn the cache off since when you have it on while you are developing and add a method to your soap server, your client doesn't recognize the changes.  First &lt;a href=&quot;http://sourceforge.net/projects/nusoap&quot; target=&quot;_blank&quot;&gt;download nusoap&lt;/a&gt;, then copy the files to a sub-directory on your web called &quot;nusoap&quot;. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1078</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1078</guid>
			<pubDate>18 Nov 2008 02:50:04 GMT</pubDate>
		</item>
		<item>
			<title>PHP CODE: Use define() for tedious-to-type constants</title>
			<description>Stumbled across this use of define() today, nice for HTML tag and newline shortcuts etc. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1077</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1077</guid>
			<pubDate>13 Nov 2008 00:35:44 GMT</pubDate>
		</item>
		<item>
			<title>FLEX CODE: Develop Flash Applications without Flash with free Flex SDK and free FlashDevelop editor</title>
			<description>The following instructions show you the exact steps to set up a free development environment on windows which allows you to develop Flex applications with ActionScript 3. You won't have the nice step-through debugging or the design view of Adobe's FlexBuilder but this code shows you how to create a two-line MXML file which allows you to do all your programming back in ActionScript 3 classes anyway so you just kind of use the MXML file as a tunnel to be able use the rich Flex libraries. FlashDevelop has very nice code-completion and other features, and with traces you can do decent debugging. The code helps you get up to speed with event handlers which are a bit different than web scripting if that is all you have been doing so far. You can &lt;a href=&quot;http://tanguay.info/web/examples/flextest&quot; target=&quot;_blank&quot;&gt;view a running example of this appliction here&lt;/a&gt;. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1076</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1076</guid>
			<pubDate>07 Nov 2008 23:39:26 GMT</pubDate>
		</item>
		<item>
			<title>ACTIONSCRIPT 3.0 CODE: How to set up a Flex application in FlashDevelop (with code completion)</title>
			<description>This works much better than my previous example since it enables FlashDevelop to do its nice code-completion on Flex objects such as &quot;button&quot;. In FlashDevelop, new project, Flex, Flex 3 Project, then replace MXML code, then create a class and put in the ActionScript3 code. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1075</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1075</guid>
			<pubDate>23 Oct 2008 10:24:32 GMT</pubDate>
		</item>
		<item>
			<title>ACTIONSCRIPT 3.0 CODE: How to set up a Flex application in FlashDevelop</title>
			<description>In FlashDevelop, new project, Flex, Flex 3 Project, then replace MXML code, then create a class and put in the ActionScript3 code. Unfortunately it doesn't seem to have the nice code complete completion for e.g. the button object. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1074</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1074</guid>
			<pubDate>23 Oct 2008 10:09:03 GMT</pubDate>
		</item>
		<item>
			<title>ACTIONSCRIPT 3.0 CODE: Text-Follow-Cursor example using simple sprite</title>
			<description>In &lt;a href=&quot;http://osflash.org/flashdevelop&quot; target=&quot;blank&quot;&gt;FlashDevelop&lt;/a&gt;, New Project, AS3 Project, (check Create directory for project), (Project/Properties/Text Movie/Play in popup), then open up Main.as and replace it with this code. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1072</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1072</guid>
			<pubDate>22 Oct 2008 20:19:53 GMT</pubDate>
		</item>
		<item>
			<title>PHP CODE: A quick MySQL data layer class that makes read/writes one-liners</title>
			<description>If you need to write a quick PHP script that accesses a MySQL database, just copy in or include this class and you can do all your reads and writes with one-line satements. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1071</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1071</guid>
			<pubDate>17 Sep 2008 23:01:21 GMT</pubDate>
		</item>
		<item>
			<title>PERL CODE: Four Simple Perl database functions for MySQL</title>
			<description>Was on a Perl project where the code had 5 lines of database connection code for each time it needed to get data from the database, so I wrote these functions which allow you to get records, record, value or execute a command with one-liners. Records are an array of hashes and included the code to call the functions since figuring out what syntax you need to access the objects through pointers/references can be time-consuming. End result is: if you just need to use Perl quick to read and write to a MySQL database, this code will get you up to speed fast. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1070</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1070</guid>
			<pubDate>10 Sep 2008 06:59:22 GMT</pubDate>
		</item>
		<item>
			<title>PERL CODE: Basic database read and text file read/write code in Perl</title>
			<description>If you need to do something quick and useful in Perl, this will get you reading and writing in databases and text files. If you are a PHP programmer getting into Perl then look up the &quot;eq&quot; operator first. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1069</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1069</guid>
			<pubDate>02 Sep 2008 22:12:27 GMT</pubDate>
		</item>
		<item>
			<title>CSS CODE: Large button links with A elements</title>
			<description>Many times you want to have a menu with A elements as the links instead of e.g. LI elements. Here is an example with large buttons. See &lt;a href=&quot;http://tanguay.info/web/examples/test11.php&quot; target=&quot;blank&quot;&gt;example here&lt;/a&gt;. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1068</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1068</guid>
			<pubDate>12 Aug 2008 03:26:23 GMT</pubDate>
		</item>
		<item>
			<title>PHP CODE: How to check if an IP-address is within the range of two IP-addresses</title>
			<description>This function checks if an IP address is between two others, not that ip2long has a problem by itself so you need the sprintf(&quot;%u&quot;) function as well. Also it returns false if any of the IP addresses are invalid as to avoid tampering. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1067</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1067</guid>
			<pubDate>17 Jul 2008 05:11:08 GMT</pubDate>
		</item>
		<item>
			<title>JAVASCRIPT CODE: Javascript photo-viewer that works in four browsers</title>
			<description>This was a little experiment to get a useful base of cross-browser code that does some interactive stuff in Javascript. It is simple but handles mouseover, button highlight, and just has a nice, basic feel. The only issue is in Opera the text is at top of the buttons, but didn't have any nerves left for that one. At first I tried using :hover and :focus which brought me to the conclusion that this really isn't standard between the browsers so used onmouseover and onmouseout to deal with it. Also worked out a number of quirks that various browsers had, e.g. I removed the ugly dotted focus line in Firefox on the buttons, they left it there in Firefox 3 as well I noticed, I replaced it with a gradient background for the focussed button. So this code looks decent in Firefox 2/3, Internet Explorer 7 (probably 6 too), Opera 9.5 (in fact only after I upgraded from 8 did it show the background on the buttons), and Safari. The bad boy of the group is Opera, but since opera gets embedded in quite a number of devices these days (e.g. Philips TVs), you don't want to leave it out completely. You can &lt;a href=&quot;http://tanguay.info/web/examples/codeExamples/javascriptPhotos/&quot; target=&quot;blank&quot;&gt;view this example online here&lt;/a&gt;. Of course next step when implementing this is to make it read from a database or XML file, I just wanted to get the browser-compatibility as accurate as possible first. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1066</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1066</guid>
			<pubDate>06 Jul 2008 13:44:09 GMT</pubDate>
		</item>
		<item>
			<title>JAVASCRIPT CODE: How to display random quotes with Javascript.</title>
			<description>This code uses the setInterval method to call a showQuote() function every 7 seconds, &lt;a href=&quot;http://tanguay.info/web/examples/codeExamples/randomQuotes&quot; target=&quot;blank&quot;&gt;check out the online example&lt;/a&gt;. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1065</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1065</guid>
			<pubDate>03 Jul 2008 02:27:25 GMT</pubDate>
		</item>
		<item>
			<title>JAVASCRIPT CODE: How to set simple cross-browser Javascript event handlers</title>
			<description>This code runs in Explorer, Firefox, Opera and Safari, simple code that enables you to attach Javascript functions to button clicks, etc. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1064</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1064</guid>
			<pubDate>30 Jun 2008 23:44:08 GMT</pubDate>
		</item>
		<item>
			<title>PHP CODE: How to use an .ini file with constants for e.g. translations</title>
			<description>If you have various translations of your website, a quick way to implement this is to have an .ini file with all the translations in it and read it out. This code shows you how to also use constants within the ini file. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1063</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1063</guid>
			<pubDate>30 Jun 2008 22:05:38 GMT</pubDate>
		</item>
		<item>
			<title>CSS CODE: How to position text in a div with left and right areas</title>
			<description>This CSS script give you absolute pixel-exact control of where to place text in a left and right area of a wide div, e.g. a header or footer. I was not able to get it to align automatically, e.g. left/center/right, so you have to know your font size and your text and position things exactly, but at least you have control, checked in Firefox and Explorer. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1062</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1062</guid>
			<pubDate>30 Jun 2008 22:04:33 GMT</pubDate>
		</item>
		<item>
			<title>FLEX CODE: How to apply a simple filter to a label</title>
			<description>You can do a lot more with filters, e.g. dynamically change them in ActionScript but here is the syntax for a basic shadow filter on a text. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1061</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1061</guid>
			<pubDate>13 Jun 2008 00:57:03 GMT</pubDate>
		</item>
		<item>
			<title>FLEX CODE: Example of using CSS styles in Flex Builder</title>
			<description>Check out this &lt;a href=&quot;http://tanguay.info/web/examples/styles102&quot;&gt;example here&lt;/a&gt;. This shows you the basics of using styles in flex, I did all of this with the FlexBuilder in design mode, very easy to use, when you are in a CSS file just click on design. The alpha transparency is wonderfully easy and the background picture leaves behind all the problems you have with page backgrounds in HTML/CSS, namely, it constantly resizes it, etc. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1060</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1060</guid>
			<pubDate>13 Jun 2008 00:29:54 GMT</pubDate>
		</item>
		<item>
			<title>FLEX CODE: How to use ActionScript to access file system in AIR</title>
			<description>This is another example of access filesystem this time with ActionScript. Did an expanding window in this example, but there are some scrolling issues on this window I need to work out, couldn't find a scrollable=false in the application element. To try this example, download &lt;a href=&quot;http://www.adobe.com/products/air/&quot;&gt;adobe air&lt;/a&gt; and then you can &lt;a href=&quot;http://tanguay.info/web/examples/showFilesInDirectory.air&quot;&gt;install this application&lt;/a&gt;. (visit site to comment, no login required)</description>
			<link>http://www.tanguay.info/web/codeExample.php?id=1059</link>
			<guid>http://www.tanguay.info/web/codeExample.php?id=1059</guid>
			<pubDate>10 Jun 2008 23:19:42 GMT</pubDate>
		</item>
	</channel>
</rss>


