My name is Edward Tanguay. I am a web developer in Berlin, Germany. I learn everything I can and record it on this site. Other things you might be looking for: My Ubuntu Tutorial My Datapod Project My Blog Feed:  | My Most Recently Watched Video Tutorials: I regularly watch video tutorials from video2brain (most German some French) and record notes on what I learn. Many of the lessons are available online for free (you just have to register quickly first with video2brain, 2 minutes). Videos I am currently learning from: Adobe AIR, Die Kunst des CSS-Designs, Fireworks CS3, FlashCS3/Flex, PHP 5.1, Photoshop CS3, Zeichnen lernen, Einstieg in VBA mit Excel, Flash Games, Flash 8, Adobe After Effects 7.0 Grundlagen, Ruby on Rails, Access VBA, Flex 2 Crashkurs, Java EE 5, Dreamweaver CS3, Joomla! 1.5 stable, ASP.NET 2.0, Visual C# 2005, Microsoft Silverlight 2, Einstieg in TYPO3 4.0, Visual C# 2008, SQL Server 2005 Programmierung, AJAX, CSS Design, Gimp, 3ds Max8, Little Boxes CSS, Flash CS3 and ActionScript 3 French, Ubuntu, Adobe CS3, Drupal 5, JavaFX, ActionScript 3.0, Eclipse, InDesign CS3 Grundlagen, Java 6, Python, Adobe Flex 3, Excel Profiwissen, MAC OS X Tiger, Flash CS3 French
My Most Recently Added Items: 
|
PHP CODE EXAMPLE
- added on November 18, 2008
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 see an example this here..
| post comment or questionpost comment or question |
|
|
|
PHP CODE EXAMPLE
- added on November 18, 2008
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 download nusoap, then copy the files to a sub-directory on your web called "nusoap".
post comment or questionpost comment or question |
|
|
PHP CODE EXAMPLE
- added on November 13, 2008
Stumbled across this use of define() today, nice for HTML tag and newline shortcuts etc.
post comment or questionpost comment or question |
|
|
FLEX CODE EXAMPLE
- added on November 8, 2008
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 view a running example of this appliction here.
post comment or questionpost comment or question |
|
|
This works much better than my previous example since it enables FlashDevelop to do its nice code-completion on Flex objects such as "button". In FlashDevelop, new project, Flex, Flex 3 Project, then replace MXML code, then create a class and put in the ActionScript3 code.
post comment or questionpost comment or question |
|
|
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.
post comment or questionpost comment or question |
|
|
In FlashDevelop, 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.
post comment or questionpost comment or question |
|
 tip
|
WINDOWS TIP - added on October 13, 2008
I wanted to install Visual C# 2008 Express but knew I wanted to try out the Visual Basic and Visual Web Developer as well, so instead of doing three downloads from the web, I downloaded the .ISO file with all four of them on it, then downloaded the free Virtual Clone Drive which after you install it looks like you added a DVD drive to your system, right-click it and select Virtual CloneDrive and Mount, then navigate to and select the .iso file and it is as if you are loading from a DVD, nice, much smoother solution then one I was using back in 2002 -- it just works.
| post comment or questionpost comment or question |
|
|
 tip
|
ECLIPSE TIP - added on October 9, 2008
Create hotkey macros in Eclipse
I've been using Eclipse for a long time and just found out that you can create a hotkey to perform all kinds of mundane tasks, e.g. if you find yourself committing a file every minute or so to check minute changes, go to Preferences | General | Keys and set up a e.g. CTRL-ALT-SHIFT-C to commit your file, explore this for awhile and save some time in the long run.
post comment or questionpost comment or question |
|
 tip
|
PHP TIP - added on September 19, 2008
Tired of editing long lines extending out to the right in Eclipse? This plugin solves the problem, install as any plugin in Eclipse, restart, then right click and word wrap, simple as that.
post comment or questionpost comment or question |
|
|
PHP CODE EXAMPLE
- added on September 18, 2008
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.
post comment or questionpost comment or question |
|
 tip
|
GENERAL TIP - added on September 15, 2008
Stackoverflow just launched publically today after being in beta for about two months. Last week I posted about 8 questions about vim and Perl and each question was answered by multiple people within 10 minutes. The site has a system of badges and reputation points you can earn for various things which turns people into hungry dogs waiting to answer your question first. You get to read the answers and mark them up and down based on their helpfulness and then select one that best answers your question. This site is truly unique, new, fresh, ajaxy in the right places, and very efficient, try it out.
post comment or questionpost comment or question |
|
 tip
|
PERL TIP - added on September 12, 2008
Always put "my" in front of variables inside functions
In Perl, if you define a variable inside a function without the word "my" (e.g. @record = ...), then that variable is treated as a global variable (wow!). Hence, always define function variables thusly: "my @records = ...." inside a function so that they do not change values outside the function, e.g. if you have too recordsets and you use the same variable name "@records" to loop through them.
post comment or questionpost comment or question |
|
|
PERL CODE EXAMPLE
- added on September 10, 2008
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.
post comment or questionpost comment or question |
|
|
PERL CODE EXAMPLE
- added on September 2, 2008
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 "eq" operator first.
post comment or questionpost comment or question |
|
|
CSS CODE EXAMPLE
- added on August 12, 2008
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 example here.
post comment or questionpost comment or question |
|
|
PHP CODE EXAMPLE
- added on July 17, 2008
This function checks if an IP address is between two others, not that ip2long has a problem by itself so you need the sprintf("%u") function as well. Also it returns false if any of the IP addresses are invalid as to avoid tampering.
patryksharks: shouldn't it be preg matches?
greetings replyreply post comment or questionpost comment or question |
|
|
 tip
|
FIREFOX TIP - added on July 6, 2008
I installed Firefox 3 today and instantly found the search-history-in-the-URL-bar to be indispensible. All the more to my horror did I realize that Firebug was no longer installed because it was not compatible with Firefox 3. Luckily there is a beta being built that IS compatible and it works just like the old one. The SQLite Manager and Web Developer bar still work in Firefox 3 and so with these three, no reason not to upgrade! Enjoy.
post comment or questionpost comment or question |
|
|
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 view this example online here. 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.
post comment or questionpost comment or question |
|
 tip
|
JAVASCRIPT TIP - added on July 3, 2008
If you are getting into AJAX and need a booster course on Javascript, this site has a nice concept/example format to get you up to speed fast without the make-the-background-color-blink examples you get on other sites. Note the "AJAX for N00bs" section as well.
post comment or questionpost comment or question |
|
| |