This will be something that will knock your socks off!
Aptana has what is called Intellisense, this is nothing new. Many modern IDE’s have Intellisense for standard HTML, XML, CSS, JavaScript, and other languages like PHP, and Ruby.
This will be a place where you can store your various frameworks. I store the frameworks in their own folders separate from the production scripts for three reasons. One, I can keep versions of my library’s. And two so they are independent of the production application. And three I can update all the Frameworks with SVN.
I am using Aptana Studio, build: 1.5.0.025215 at the time of writing this tutorial but from the previous versions I have used the steps remain the same.
Open Aptana Studio (or Eclipse with your Aptana plug-in)
Open Aptana/Eclipse Preferences
Read on..
This is basically the exact same code I used in my Addressbook to export all of the contact information. Its good to note that a CSV is not a full backup, while you can restore the information in a Database you will not restore the structure.
A CSV file is commonly used to export information for manipulation, or importing into other applications.
You could export all of your contacts fro example and import them into Google contacts.
This is a quick and dirty little snippet. I had a case where I had to fill in a Subject Line and a message with only one multi line text box. It wasn’t practice to have a hard coded subject line as it would be the same for every message or in my base bug. Have a look at the code; I will explain what is going on below.
[sourcecode language='php']
<? // Get the message String
$rawString = $_POST['comments'];
// Split the string into pieces for processing
$pieces = explode("n", $rawString);
// First element is the subject line
$subject = $pieces[0];
// Take the array, delete the first entry, So we can pass it to $message
$messagePieces = array_slice($pieces, 1);
// Replace the n or add a <br /> if you like.
$message = implode("<br />", $messagePieces);
echo "Subject: ". $subject;
echo "<br />";
echo "Message: ". $message; ?>
<form action="<? echo $_SERVER['php_self'] ?>" method="post">
<textarea id="comments" name="comments">Your message</textarea>
<input name="send" type="submit" value="Send" />
</form>
[/sourcecode] Read on..
When you first start to learn about Graphic design from a technical point you learn about Format. In graphic design there are many different file formats created by even more graphic editors. They all have their Pros and there Cons.
When you are working for the web you really only have three options: GIF, JPEG and PNG. They all server their purpose and are great at their jobs. The trick is to learn how each format can best to its job and when.
Read on..
I had a heck of a time finding a Regular Expression to parse URLs in a body of text. The beauty with this expression is its flexibility, it will handle a http or https url with or without www. And it’s fine with tiny urls.
// $subject contains a body of text with non html URLs
$text = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\">\\0</a>", $subject);
This is posted more as a snippet because is spent so long trying to find one that would work.
$subject will be the body of text containing flat text urls. $text will now contain our information.
// Output New formatted content with links. echo $text;
Now our content is parsed with URLs.
Done!