Posted on August 27th, 2010 by egiles
For prepared statements in PHP / mySQL check out:
http://mattbango.com/notebook/web-development/prepared-statements-in-php-and-mysqli/
Combine that with:
<?php
class MySqlDriver {
private $_Link;
public function __construct( <…> ) {
$this->_Link = mysql_connect( <…> );
}
// this will be called automatically at the end of scope
public function __destruct() {
mysql_close( $this->_Link );
}
}
$_gLink = new MySqlDriver( <…> );
// and you don’t need [...]
Filed under: Technology | No Comments »
Posted on August 27th, 2010 by egiles
Here’s the best reference I could find on vendor branching.
http://svnbook.red-bean.com/en/1.1/ch07s05.html
The main idea is if you are updating or modifying another group’s source project and you want your updates to be applied to updates from the group’s next release. This is called vendor branching. Basically, create a vendor repository and import the vendor’s code to that [...]
Filed under: Technology | 43 Comments »
Posted on August 27th, 2010 by egiles
I got this error when in Flex Builder / Eclipse and using SVN.
I had done a commit, then SVN thought it needed to commit the base directory which had no revisions. I committed it, then came back and added log comment later on. When I went to view the revision tree, SVN gave the message [...]
Filed under: Technology | 23 Comments »
Posted on August 27th, 2010 by egiles
If you just had a commit error on the repository or just committed something by accident, an easy way to remove the revision from the repository is to reload the repository up until the previous revision. Say the latest commit 603 just had an error or mistake.
First backup the repository up until the previous revision:
svnadmin [...]
Filed under: Technology | 34 Comments »
Posted on August 23rd, 2010 by egiles
Create an ActionScript function to reload a page that can be called from Adobe Flex / Flash. This uses javascript to call a page reload.
private function reloadPage(event:Event):void
{
var ref:URLRequest = new URLRequest(”javascript:location.reload(true)”);
navigateToURL(ref, “_self”);
}
Filed under: Technology | 23 Comments »
Posted on August 23rd, 2010 by egiles
You might be thinking that getting Ant errors of a file not found on Windows is due to spaces in file names.
Actually, Ant and Eclipse are probably handling spaces on Windows fine, it’s the backslashes on Windows directories that are causing the problems.
Because Eclipse and Ant are Sun Java based, backslashes are interpreted as string [...]
Filed under: Technology | No Comments »
Posted on August 23rd, 2010 by egiles
In saving to an Excel (xls) file from Adobe Flex / Flash using ActionScript code, make sure to include
import com.as3xls.xls.ExcelFile;
import com.as3xls.xls.Sheet;
Then, make sure to require Flash Player 10.0.0 or higher or the application will not build in Flex Builder 4. Project->Properties->Flex Compiler -> Check Require Flash Player version: 10 0 0.
Wire your event listener appropriately.
var [...]
Filed under: Technology | 32 Comments »
Posted on August 23rd, 2010 by egiles
This is a great example of a file uploader for Adobe Flex. It’s in com.everythingflex.components.Uploader.mxml.
<?xml version=”1.0″ encoding=”utf-8″?>
<!– Authored by Rich Tretola (rich@richtretola.com) EverythingFlex.com
Feel free to use within your appplications. Track changes at EverythingFlex.com
Sample Syntax:
<eFlexComponents:Uploader uploadButtonLabel=”Browse for New Image”
uploadToURL=”http://www.yourdomain.com/uploads/uploader.cfm”
imagesFilter=”*.jpg;*.gif;*.png”
displayNewImage=”true”
displayImagePath=”http://www.yourdomain.coms/uploads”
maxUploadSize=”100000″/>
–>
<mx:Canvas xmlns:mx=”http://www.adobe.com/2006/mxml” width=”100%” height=”100%”>
<mx:Script>
<![CDATA[
import mx.controls.Label;
import mx.controls.Alert;
import flash.net.FileFilter;
import flash.net.FileReference;
import flash.net.URLRequest;
private var uploadURL:URLRequest;
private var file:FileReference;
[Bindable]
public var uploadButtonLabel:String = “Browse for [...]
Filed under: Technology | 18 Comments »
Posted on August 23rd, 2010 by egiles
If you’re getting an error like “Security error accessing url” from Flex, try editing the crossdomain.xml file in ColdFusion. For a non-production, global access quick test to see if this solves your problem try the following.
Adobe ColdFusion Cross-Domain File for Global Access
This cross domain file allows any connection to CFC’s.
crossdomain.xml
<?xml version=”1.0″ ?>
<!DOCTYPE cross-domain-policy SYSTEM “http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd”>
<cross-domain-policy>
<allow-access-from [...]
Filed under: Technology | 28 Comments »
Posted on August 23rd, 2010 by egiles
Image to Ascii:
http://livedocs.adobe.com/flex/3/html/help.html?content=09_Working_with_Strings_11.html
Cool Adobe Flash / Flex 3D Graphics Effects
http://blog.flexexamples.com/2008/10/25/incrementally-3d-rotating-objects-in-flex-using-the-fxrotate3d-in-flex/
http://help.adobe.com/en_US/flex/using/WSF0D55C84-17E0-456a-A977-04BFE1E23BA8.html
http://www.selikoff.net/2010/03/17/solution-to-flex-image-rotation-and-flipping-around-center/
http://www.joelconnett.com/flex-rotation-around-a-point.html
http://lucamezzalira.com/2008/02/07/little-tricks-to-rotate-images-in-flex/
Matrix based image manipulation:
http://insideria.com/2008/03/image-manipulation-in-flex.html
http://blog.flexexamples.com/2007/09/14/rotating-images-using-the-matrix-class/
Other:
http://www.bjw.co.nz/developer/flex/86-flex-3-rotating-image-script
Filed under: Technology | 29 Comments »