<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- generator="FeedCreator 1.7.2-ppt (info@mypapit.net)" -->
<rss version="2.0">
    <channel>
        <title>Holyguard.net</title>
        <description>Web Design &amp; Development</description>
        <link>http://www.holyguard.net/rss</link>
        <lastBuildDate>Tue, 27 Jul 2010 22:03:52 +0100</lastBuildDate>
        <generator>FeedCreator 1.7.2-ppt (info@mypapit.net)</generator>
        <item>
            <title>Selective Tweets Application for Facebook</title>
            <link>http://www.holyguard.net/en/detail/social-networking/selective-tweets-application-for-facebook/2/75/379/</link>
            <description>holyguard.net - Selective Tweets is an application that allows you to control what tweets are  added to your Facebook account.&amp;nbsp; When you use Selective Tweets, add #fb  to your tweets, and then only these tweets are added to your Facebook  account.

&amp;nbsp;
You can use this application for your Fan Pages too.&amp;nbsp; However, if  your updates are Protected, this application will not work for you.
&amp;nbsp;
The upside to Selective Tweets is the control that this  application gives you.&amp;nbsp; The downside to this application is that it  takes up 3 of your 140 characters on Twitter.
&amp;nbsp;
For more information on this application, please go to this link&amp;nbsp;  http://www.facebook.com/selectivetwitter?v=infoThis  Facebook Page will provide you with all the information, the reviews,  and Support instructions for the Selective Tweets application.

&amp;nbsp;
There are more Twitter applications available for use on  Facebook.&amp;nbsp; I will write about these other applications in a series of  blog posts.</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>FBJS Quick Jump Menu for a FBML Facebook Platform App</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/fbjs-quick-jump-menu-for-a-fbml-facebook-platform-app/2/52/378/</link>
            <description>holyguard.net - In a FBML Facebook App, your quick jump menu will require a little tweak to work in FBJS properly.
Just change your standard js jump menu from:

 
&amp;lt;select onchange=&amp;quot;goto(this.options[this.selectedIndex].value)&amp;quot;&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;option value=&amp;quot;page.php?id=1&amp;quot;&amp;gt;Page1&amp;lt;/option&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;option value=&amp;quot;page.php?id=2&amp;quot;&amp;gt;Page2&amp;lt;/option&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;option value=&amp;quot;page.php?id=3&amp;quot;&amp;gt;Page3&amp;lt;/option&amp;gt;
&amp;lt;/select&amp;gt;
 
To this:

 
&amp;lt;select onchange=&amp;quot;document.setLocation(this.getValue());&amp;quot;&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;option value=&amp;quot;page.php?id=1&amp;quot;&amp;gt;Page1&amp;lt;/option&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;option value=&amp;quot;page.php?id=2&amp;quot;&amp;gt;Page2&amp;lt;/option&amp;gt;
&amp;nbsp;&amp;nbsp; &amp;lt;option value=&amp;quot;page.php?id=3&amp;quot;&amp;gt;Page3&amp;lt;/option&amp;gt;
&amp;lt;/select&amp;gt;
 
Cheers.
</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>How to manage your online reputation, free tools forcommunity managers</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/how-to-manage-your-online-reputation-free-tools-forcommunity-managers/2/52/377/</link>
            <description>holyguard.net - Every single day, someone, somewhere is discussing something  important to your business; your brand, your executives, your  competitors, your industry. Are they hyping-up your company, building  buzz for your products? Or, are they criticizing your service,  complaining to others about your new product launch?
A great brand can take months, if not years, and millions of dollars  to build. It should be the thing you hold most precious.
It can be destroyed in hours by a blogger upset with your  company.
A new product launch could take hundreds of TV commercials, dozens of  newspaper ads, and an expensive ad agency.
It can also spread like a virus with the praise of just one  customer, at one message board.
A company can dominate market share, throttle competition and hold  the #1 brand in the world.
It can also crash in months if it fails to listen to what its  customers want.

By now, you should have an understanding of just how powerful  consumer generated media (CGM) is. Your next action could be the  difference between your company&amp;rsquo;s success or failure. Do you click the  &amp;ldquo;back&amp;rdquo; button and ignore the conversation, or; do you read the&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>Genuitec MobiOne Enables Developers to Create Web Apps for the iPhone</title>
            <link>http://www.holyguard.net/en/detail/free-software/genuitec-mobione-enables-developers-to-create-web-apps-for-the-iphone/2/51/375/</link>
            <description>holyguard.net - 
Although some IT  managers are coming around to the idea of supporting iPhones, most  aren&amp;rsquo;t convinced that any smartphone app will ever be safe and rich  enough for mission-critical applications.
As an alternative, enterprise developers are leaning toward creating  Web apps that reside on the Internet, yet, are optimized to run on  iPhones and other smartphones and with better security than native apps.
IBM, for example, just released iNotes  Ultralite, a Web App that connects the iPhone and Lotus Domino  server and encrypts data between the two. Data does not reside on the  iPhone in case it gets lost or stolen.
Web app development company, Genuitec, is touting MobiOne, a new kit  for enterprise developers so they can build and test Web apps for the  iPhone without having to learn a whole new bag of tech tricks such as  Apple&amp;rsquo;s Objective-C language.
&amp;ldquo;MobiOne allows software developers to design, write and deploy  iPhone applications from the desktop without the time-consuming task of  checking code against the device itself to see if it&amp;rsquo;s workable &amp;mdash; this  is accomplished using the built-in TruView technology,&amp;rdquo; according to  Jason O&amp;rsquo;Keefe, a Genuitec spokesperson.
MobiOne uses&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>How to configure MX records for incoming SMTP e-mail traffic</title>
            <link>http://www.holyguard.net/en/detail/apache-htaccess/how-to-configure-mx-records-for-incoming-smtp-e-mail-traffic/2/65/374/</link>
            <description>holyguard.net - When you want to run your own mail server, and it does not matter  what version and make of mail server you're using - as long as the mail  server is using SMTP as the e-mail transfer mechanism - you'll need to  configure the MX Records for your domain.
MX is an acronym for Mail eXchange. MX is defined in  RFC 1035. It specifies  the name and relative preference of mail servers for the zone. MX is a  DNS record used to define the host(s) willing to accept mail for a given  domain. I.e. an MX record indicates which computer is responsible for  handling the mail for a particular domain.
Without proper MX Records for your domain, only internal e-mail will  be delivered to your users. External e-mail from other mail servers in  the world will not be able to reach your server simply because these  foreign servers cannot tell to which server they need to &amp;quot;talk&amp;quot; (or open  a connection to) in order to send the mail destined for that domain.
You can have multiple MX records for a single domain name, ranked in  preference order. If a host&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>Complete guide for Jquery Developers</title>
            <link>http://www.holyguard.net/en/detail/jquery/complete-guide-for-jquery-developers/2/66/370/</link>
            <description>holyguard.net - Have you ever had to develop something yourself only to find out that  there had already been a plugin developed?
Don&amp;rsquo;t you enjoy dreaming about what you could have on your site and  finding the right plugin right away?
Then you should find this list of jQuery resources useful to do  whatever you want and become a better jQuery developer. In this guide  you will find the following materials:


    Getting  Started:  introductions to jQuery from a very basic level
    Tutorials:  learn how to do simple and advanced things to your websites
    Most  Useful Plugins: use existing solutions to your problems with UI,  images, forms, etc
    Lists:  mine other lists for overlooked items
    For  Designers: find just what a designer needs from jQuery
    Cheatsheets:  download jQuery cheatsheets to code easily
    Blogs:  subscribe to people, writing about jQuery
    Books:  read the books to become a jQuery guru
    Notable  Links: check out interesting links about jQuery

Getting Started
If you are new to jQuery, you&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>Display an image from a MySQL database in a web page via PHP</title>
            <link>http://www.holyguard.net/en/detail/php-scripts/display-an-image-from-a-mysql-database-in-a-web-page-via-php/2/60/367/</link>
            <description>holyguard.net - There's lots of clever scripts around to tell you how to get images in  and out of databases, but nothing simple to show you the principles of  including such an image via (say) PHP in a web page. So here goes.

you need TWO URLs - you need the HTML  page that's going to contain the image, AND you need a second URL - PHP  in my example - that's going to retrieve the image and feed it out as  part of the page.  You CANNOT feed out both the HTML and the image from  the same http request.

Here's a sample HTML page we're going to include an image in:


&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;title&amp;gt;Demo of Database Image in a page&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
Here is your picture:&amp;lt;br&amp;gt;
&amp;lt;img src=picscript.php?imname=potwoods&amp;gt;&amp;lt;br&amp;gt;
Example by Well House Consultants
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

Then you need the PHP script - called picscript.php in the same  directory in my example:


&amp;lt;?php
mysql_connect(&amp;quot;localhost&amp;quot;,&amp;quot;wellho&amp;quot;,&amp;quot;xxxxxxx&amp;quot;);
mysql_select_db(&amp;quot;wellho&amp;quot;);
$image = stripslashes($_REQUEST[imname]);
$rs = mysql_query(&amp;quot;select * from im_library where filename=\&amp;quot;&amp;quot;.
addslashes($image).&amp;quot;.jpg\&amp;quot;&amp;quot;);
$row = mysql_fetch_assoc($rs);
$imagebytes = $row[imgdata];
header(&amp;quot;Content-type: image/jpeg&amp;quot;);
print $imagebytes;
?&amp;gt;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>12 undocumented tricks for Google Buzz</title>
            <link>http://www.holyguard.net/en/detail/blog/12-undocumented-tricks-for-google-buzz/2/56/366/</link>
            <description>holyguard.net - So.  Google just  recently announced Google Buzz.   I&amp;rsquo;m not sure about you, but I didn&amp;rsquo;t see this coming.  Sure, Google  was bound to start a social network of some sort at some time; but, I  didn&amp;rsquo;t think it&amp;rsquo;d be this soon!
After spending a few hours on Google Buzz, we&amp;rsquo;re proud to present you  with 12 simple tricks to help give you a better Buzz.  Before you start  drinking the Google juice, though, make sure you choose a designated driver!  (Ya, I know. Bad joke.)
&amp;nbsp;
Enough talk.  Here are your tricks:
1. Formatting


Buzz doesn&amp;rsquo;t have any WYSIWYG editor built in, but it does  allow some basic formatting.  Currently, we&amp;rsquo;ve discovered three  different formatting options: bold, italic, and strike-through.  If you  find any more, please place them in the comments.
To make something bold, simply enclosing it with asterisks (*)  Ex:  &amp;ldquo;This is *bold*!&amp;rdquo; will become &amp;ldquo;This is bold!&amp;rdquo;  In the same way,  if you&amp;rsquo;d like to italicize something use the underscore (_).  Ex: &amp;ldquo;This  is _very important_&amp;rdquo; becomes &amp;ldquo;This is very important.&amp;rdquo;  (Be  careful, though, because on IRC chats,&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>How can i insert HTML code in my posts?</title>
            <link>http://www.holyguard.net/en/detail/the-holy-faqs/how-can-i-insert-html-code-in-my-posts/2/73/365/</link>
            <description>holyguard.net - The situation begins with your blog or website and you need to post some code on a particular webpage. In this tutorial, we will assume you want to post some basic HTML sample code (though this method will work with any programming or scripting language) that contains a hierarchy code structure.

Step 1: The Actual Code
You probably already have the first step, and that is obtaining the code you want to display on your website or blog. For this example, we will use the below:

&amp;lt;html&amp;gt;
&amp;nbsp; &amp;lt;head&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;my code&amp;lt;/title&amp;gt;
&amp;nbsp; &amp;lt;/head&amp;gt;
&amp;nbsp; &amp;lt;body&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;p&amp;gt;This is a test&amp;lt;/p&amp;gt;
&amp;nbsp; &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

Step 2: Code Manipulation
The next important step is to convert special characters to their associated HTML representations. Common examples of this are the greater than (&amp;gt;) and less than (&amp;lt;) symbols often used to distinguish tags. A &amp;lsquo;&amp;gt;&amp;rsquo; symbol should be represented as &amp;lsquo;&amp;amp;gt;&amp;rsquo; and a &amp;lsquo;&amp;lt;&amp;rsquo; symbol is represented as &amp;lsquo;&amp;amp;lt;&amp;rsquo;. If you code with the actual symbol, the tags will be evaluated and therefore not display properly. The example below is what our example looks like with special symbols replaced with their associated html names.

&amp;amp;lt;html&amp;amp;gt;
&amp;nbsp; &amp;amp;lt;head&amp;amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;lt;title&amp;amp;gt;my code&amp;amp;lt;/title&amp;amp;gt;
&amp;nbsp; &amp;amp;lt;/head&amp;amp;gt;
&amp;nbsp; &amp;amp;lt;body&amp;amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;amp;lt;p&amp;amp;gt;This is a test&amp;amp;lt;/p&amp;amp;gt;
&amp;nbsp; &amp;amp;lt;/body&amp;amp;gt;
&amp;amp;lt;/html&amp;amp;gt;

Step 3: Code Formatting
However, if you just post the above code&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>MySQL - Find Locations Nearest Known Coordinates</title>
            <link>http://www.holyguard.net/en/detail/mysql/mysql-find-locations-nearest-known-coordinates/2/70/363/</link>
            <description>holyguard.net - Spherical Law of Cosines
Suppose that we want to find the five nearest places to (47.470779, -87.890699) using Spherical Law of Cosines, the following MySQL syntax would easily accomplish it:
&amp;nbsp;

SELECT * AS place, 
  (DEGREES(
    ACOS(
      SIN(RADIANS(47.470779)) * SIN(RADIANS(geo_latitude)) + 
      COS(RADIANS(47.470779)) * COS(RADIANS(geo_latitude)) * 
      COS(RADIANS(-87.890699 - geo_longitude))
    ) 
  ) * 60 * 1.1515) 
AS distance FROM `MyDatabase`.`allplaces` ORDER BY distance ASC LIMIT 20 ;


Haversine Formula
Suppose that we want to find the five nearest places to (47.470779, -87.890699) using Haversine Formula, the following MySQL syntax would easily accomplish it [please refer here to read about the motivation/reasoning behind using atan2() function instead of sin(min()).

SELECT * , 
      ((2 * 3960 * 
        ATAN2(
          SQRT(
            POWER(SIN((RADIANS(47.470779 - geo_latitude))/2), 2) +
            COS(RADIANS(geo_latitude)) *
            COS(RADIANS(47.470779&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>The 7 free best CSS editors</title>
            <link>http://www.holyguard.net/en/detail/free-software/the-7-free-best-css-editors/2/51/361/</link>
            <description>holyguard.net - I have always used Dreamweaver, and love it. But, I have been thinking, what are the FREE CSS editors like? So I went looking , first one I found was TopStyle Lite, it was OK, nothing special, and then tried some others.
It did get me thinking, Which is the best FREE CSS Editor available? So, over to you, what do you think?
I have listed 7 Free CSS Editors to help with your choice. If I have missed any, write a comment and I&amp;rsquo;ll add it to the list.
&amp;nbsp;
Simple CSS
Features :Simple CSS allows you to easily create Cascading Style Sheets from scratch, and/or modify existing ones, using a familiar point-and-click interface. Compatabile with Mac, Windows and Linux.
Download: Simple CSS Download Page.
TS Webeditor (tswebeditor)
Features :tsWebEditor is an editor for HTML, PHP, Perl, JavaScript, CSS and many other languages. It displays the source code colored (syntax highlight), code hint for functions, code completion (PHP, JavaScript, ASP, HTML), code browser, PHP debugger and syntax validation, help, CSS wizard, HTML tag editor, HTML syntax validation, and an easy to use SQL Designer. To view all features click here.
Download: TS Webeditor Download Page.
A Style CSS Editor
Features :Visual easy-to-use interface ; Graphic tree-type view of attachment files&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>Upgrade to Alsa 1.0.20 on Ubuntu Jaunty 9.04</title>
            <link>http://www.holyguard.net/en/detail/blog/upgrade-to-alsa-1020-on-ubuntu-jaunty-904/2/56/356/</link>
            <description>holyguard.net - Advanced Linux Sound Architecture (known by the acronym ALSA) is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards.

ALSA has the following significant features:

* Efficient support for all types of audio interfaces, from consumer sound cards to professional multichannel audio interfaces.
* Fully modularized sound drivers.
* SMP and thread-safe design.
* User space library (alsa-lib) to simplify application programming and provide higher level functionality.
* Support for the older Open Sound System (OSS) API, providing binary compatibility for most OSS programs.

If you are experiencing sound issues on Ubuntu Jaunty 9.04 or just want the latest version, you may want to upgrade to ALSA 1.0.20 (Ubuntu Jaunty comes with Alsa version 1.0.18rc3 - you can check this by typing this in a terminal: cat /proc/asound/version). Read on!
&amp;nbsp;
How to Upgrade to ALSA 1.0.20


1. Upgrading ALSA needs compiling so the first thing we need to do is install the necessary tools to compile along with the kernel headers. Open a terminal and paste the following 2 commands:
sudo apt-get -y install build-essential ncurses-dev gettext xmltosudo apt-get -y install linux-headers-`uname -r`

2. Use the terminal to navigate to your home folder and download the ALSA files:
cd ~wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.20.tar.bz2wget&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>PHP - The Singleton Pattern</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/php-the-singleton-pattern/2/52/350/</link>
            <description>holyguard.net - The Singleton Pattern is one of the GoF (Gang of Four) Patterns. This  particular pattern provides a method for limiting the number of  instances of an object to just one. It's an easy pattern to grasp once  you get past the strange syntax used. 

Consider the following class:


PHP Code:
classÂ Database { 
    
publicÂ functionÂ __construct()Â {Â ...Â }     
publicÂ functionÂ connect()Â {Â ...Â }    
publicÂ functionÂ query()Â {Â ...Â }  
Â Â Â Â 
...     
} 

This class creates a connection to our database.  Any time we need a connection we create an instance of the class, such as:


  PHP Code:
  $pDatabaseÂ =Â newÂ Database(); 
$aResultÂ =Â $pDatabase-&amp;gt;query('...');Â  


Lets say we use the above method many times during a script's  lifetime, each time we create an instance we're creating a new Database  object (we're also creating a new database connection, but that's  irrelevant in this example) and thus using more memory. Sometimes you  may intentionally want to have multiple instances of a class but in  this case we don't. 

The Singleton method is a solution to this common problem. To make the  Database class a Singleton we first need to add a new property to the  class,&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>PHP - calculating distance between two points </title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/php-calculating-distance-between-two-points-/2/52/346/</link>
            <description>holyguard.net - Because of the near-spherical shape of the Earth, calculating an accurate distance between two points requires the use of spherical geometry [1], and trigonometric math functions. For many applications, an approximate distance calculation provides sufficient accuracy with much less complexity.

To calculate an approximate distance in miles, we could do:
v  sqrt(x * x + y * y)  

where:

x = 69.1 * (lat2 - lat1) and y = 53.0 * (lon2 - lon1)

We can improve the accuracy, by adding the cosine math function:

sqrt(x * x + y * y)

where:

x = 69.1 * (lat2 - lat1) and y = 69.1 * (lon2 - lon1) * cos(lat1/57.3)

If you need greater accuracy, you can use the Great Circle Distance Formula [2]. This formula requires use of spherical geometry, and a high level of floating point mathematical accuracy - about 15 digits of accuracy (double-precision).

To convert latitude or longitude from decimal degrees to radians, we can divide the latitude and longitude values by 180/pi, or approximately 57.29577951. The radius of the earth is assumed to be 6,378.8 kilometers, or 3,963.0 miles.

Since we are using PHP, it&amp;rsquo;s much simpler, because the deg2rad() function does this calculation for us.

If you convert all latitude and longitude values&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>PHP - Download file with speed limit</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/php-download-file-with-speed-limit/2/52/344/</link>
            <description>holyguard.net - With this script we can limit the download speed
&amp;nbsp;

// local file that should be send to the client
$local_file = 'test-file.zip';
// filename that the user gets as default
$download_file = 'your-download-name.zip';

// set the download rate limit (=&amp;gt; 20,5 kb/s)
$download_rate = 20.5; 
if(file_exists($local_file) &amp;amp;&amp;amp; is_file($local_file)) {
    // send headers
    header('Cache-control: private');
    header('Content-Type: application/octet-stream'); 
    header('Content-Length: '.filesize($local_file));
    header('Content-Disposition: filename='.$download_file);
 
    // flush content
    flush();    
    // open file stream
    $file = fopen($local_file, &amp;quot;r&amp;quot;);    
    while(!feof($file)) {
 
        // send the current file part to the browser
        print fread($file, round($download_rate * 1024));    
 
        // flush the content to the browser
        flush();
 
        // sleep one second
        sleep(1);    
    }    

    //&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>PHP - Save remote images on our server using CURL</title>
            <link>http://www.holyguard.net/en/detail/scripts-and-tutorials/php-save-remote-images-on-our-server-using-curl/2/52/343/</link>
            <description>holyguard.net - Some hosts disabled the ini setting allow_url_fopen. This also means  that the ability to easily grab images by calling  imagecreatefromjpeg($img) where $img is a url for an external image  does not work.
This is a shame as this technique is pretty easy..


$remote_img = 'http://www.somwhere.com/images/image.jpg';
$img = imagecreatefromjpeg($remote_img);
$path = 'images/';
imagejpeg($img, $path);

However I was goin crazy  trying to get a product feed  integration system to work on a host that has disabled the  allow_url_fopen mechanism which meant the above wouldnt work.
Thankfully cURL was still working. So here is the function I made for grabbing and saving an image using cURL instead:

//Alternative Image Saving Using cURL seeing as allow_url_fopen is disabled - bummer
function save_image($img,$fullpath){
$ch = curl_init ($img);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);
$rawdata=curl_exec($ch);
curl_close ($ch);
if(file_exists($fullpath)){
	unlink($fullpath);
}
$fp = fopen($fullpath,'x');
fwrite($fp, $rawdata);
fclose($fp);
}
</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>Shorthand If/Else using Ternary Operators</title>
            <link>http://www.holyguard.net/en/detail/php-scripts/shorthand-ifelse-using-ternary-operators/2/60/342/</link>
            <description>holyguard.net - An essential part of programming is evaluating conditions using if/else and switch/case statements. If / Else statements are easy to code and global to all languages. If / Else statements are great but they can be too long.
Ternary operator logic is the process of using â€œ(condition) ? (true return value) : (false return value)â€ statements to shorten your if/else structures.
What Does Ternary Logic Look Like?


/* most basic usage */
$var = 5;
$var_is_greater_than_two = ($var &amp;gt; 2 ? true : false); // returns true



  /* most basic usage */
  $var = 5;
  $var_is_greater_than_two = ($var &amp;gt; 2 ? true : false); // returns true
  
What Are The Advantages of Ternary Logic?
There are some valuable advantages to using this type of logic:
 * Makes coding simple if/else logic quicker
  * You can do your if/else logic inline with output instead of breaking your output building for if/else statements
  * Makes code shorter
  * Makes maintaining code quicker, easier
  * Job security?
Tips for Using Ternary Operators
Here are a few tips for when using â€œ?:â€ logic:
 * Donâ€™t go more levels deep than what you feel comfortable with maintaining.
  * If you work in a team&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>10 Tips For Creating an Optimized Landing Page</title>
            <link>http://www.holyguard.net/en/detail/blog/10-tips-for-creating-an-optimized-landing-page/2/56/335/</link>
            <description>holyguard.net - Building a great landing page should be on top of your priority list if you want your website visitors transformed into customers.

While a great looking website can grab the attention of your visitors, a strong landing page will keep them involved and get them to buy your products/services.

Wikipedia defines a landing page as:

The page that appears when a potential customer clicks on an advertisement or a search-engine result link. The page will usually display content that is a logical extension of the advertisement or link, and that is optimized to feature specific keywords or phrases for indexing by search engines.
Maximize Revenue with YieldBuild!

Wikipedia's definition sums it up nicely but there is certainly more to a great landing page then relevant and keyword rich content. Here are 10 things that you should be looking at when optimizing a landing page:

- Relevant Content

A landing page's content should be directly related to organic search results, PPC campaign, anchor text in inbound links and any other targeted inbound advertising, online and offline. If people don't get what they expect, they will be more likely to leave.

- Multiple Landing Pages

A landing page shouldn't necessarily be your homepage. In many instances a homepage is a good&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>Encoding / decoding UTF8 in javascript</title>
            <link>http://www.holyguard.net/en/detail/javascript/encoding--decoding-utf8-in-javascript/2/63/334/</link>
            <description>holyguard.net - From time to time it has somewhat annoyed me that UTF8 (today's most common Unicode transport encoding, recommended by the IETF) conversion is not readily available in browser javascript. It really is, though, I realized today:

function encode_utf8( s )
{
  return unescape( encodeURIComponent( s ) );
}

function decode_utf8( s )
{
  return decodeURIComponent( escape( s ) );
}



Tested and working like a charm in these browsers:

Win32

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Firefox 1.5.0.6
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Firefox 1.5.0.4
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Internet Explorer 6.0.2900.2180
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Opera 9.0.8502

MacOS

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Camino 2006061318 (1.0.2)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Firefox 1.5.0.4
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Safari 2.0.4 (419.3)

Any modern standards compliant browser should handle this code, though, so don't worry that it's a rather sparse test matrix.</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>Caching arrays on filesystem disk with php</title>
            <link>http://www.holyguard.net/en/detail/php-scripts/caching-arrays-on-filesystem-disk-with-php/2/60/330/</link>
            <description>holyguard.net - I discovered the var_export function in PHP. It is able to return a string that represents the passed variable. The returned string is parsable by PHP.

One way to use this function would be to cache an array to a file.

In example:

export.php
 
 
 
//will write the array to disk
$ar = array('test','testing');
$content = var_export($ar,true);
file_put_contents('cache.php',&quot;

 
import.php
 
 
 
//will output the cached array
include 'cache.php';
var_dump( $cache );


or you can return $cache in a function</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>Enabling mod_rewrite in xampp and windows</title>
            <link>http://www.holyguard.net/en/detail/apache-htaccess/enabling-modrewrite-in-xampp-and-windows/2/65/329/</link>
            <description>holyguard.net - Below I will quickly and easily show you how to enable Apache's mod_rewrite in XAMPP Windows. If you are unclear on what mod_rewrite is, it basically takes a long query string url and shortens it to be SEO and user friendly. Now if you are also a CakePHP user, having mod_rewrite enabled is the best course of action. But it seems that mod_rewrite is not enabled with the initial install of XAMPP. Do not worry, it's extremely easy to enable the module, and here's how it's done.

I'm assuming you have installed the xampp directory into the root or C:/ drive. The first thing to do is to open the httpd.conf file located at C:/xampp/apache/conf/httpd.conf. Locate the text below and remove the # from the beginning of it (# acts as a comment and negates the module from loading).


#LoadModule rewrite_module modules/mod_rewrite.so


The final step is to find all instances of
AllowOverride None
and replace them with
AllowOverride All
. Now to get mod_rewrite working, you will need to restart your Apache server. You can simply do this by clicking &amp;quot;Stop/Start&amp;quot; next to the Apache module of your XAMPP Control Panel.</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>Website development processes</title>
            <link>http://www.holyguard.net/en/detail/blog/website-development-processes/2/56/327/</link>
            <description>holyguard.net - Web Site Development Process - The life-cycle steps

Like the traditional software development, the process of web site development can also be divided into different life cycle steps. This can help to format the team effectively, and the standards and procedures can be adopted to achieve maximum quality. This article explains the steps of development which can be possibly arranged as a process of web engineering. This is just a guideline to help you, to know, how a process can be done. The steps may vary from application to application.

Note:Throughout this text, The words web sites, web applications, web based applications and Intranet/extranets are interchangeable.

A system development process can follow a number of standard or company specific frameworks, methodologies, modeling tools and languages. Software development life cycle normally comes with some standards which can fulfill the needs of any development team. Like software, web sites can also be developed with certain methods with some changes and additions with the existing software development process. Let us see the steps involve in any web site development.

1. Analysis:

Once a customer is started discussing his requirements, the team gets into it, towards the preliminary requirement analysis. As the web site is going to be a&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>RubyWeaver : Dreamweaver Extension IDE for Ruby and Rails</title>
            <link>http://www.holyguard.net/en/detail/web-development-applications/rubyweaver--dreamweaver-extension-ide-for-ruby-and-rails/2/62/325/</link>
            <description>holyguard.net - RubyWeaver
is a Dreamweaver Extension IDE for Ruby and Rails.


Latest version now compatible with Ruby on Rails 2.0 erb files


Features


Gives full Ruby and Rails functionality to Dreamweaver, including the following:


&amp;nbsp;&amp;nbsp; 1. Inserts a &amp;ldquo;Rails&amp;rdquo; object with tools to automatically insert VTL code into your document (appears in &amp;ldquo;Insert&amp;rdquo; toolbar in MX 2004 and up).

&amp;nbsp;&amp;nbsp; 2. Adds .rb, .rhtml, .rxml, .yml, and .sql extensions in Dreamweaver and associates those files with Dreamweaver for editing.

&amp;nbsp;&amp;nbsp; 3. Adds Rails, Ruby, YML, and SQL as a new document types in Dreamweaver. Also adds default pages which will open as the new document when these types are selected.

&amp;nbsp;&amp;nbsp; 4. Supports color coding, tag hints, etc</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>MySql - The MySql Query Cache - Part II</title>
            <link>http://www.holyguard.net/en/detail/mysql/mysql-the-mysql-query-cache-part-ii/2/70/323/</link>
            <description>holyguard.net - 
MySQL  â€œQuery Cacheâ€ is quite helpful for MySQL Performance optimization tasks but there are number of things you need to know.
  
First let me clarify what MySQL Query Cache is - Iâ€™ve seen number of people being confused, thinking MySQL Query Cache is the same as Oracle Query Cache - meaning cache where execution plans are cached. MySQL Query Cache is not. It does not cache the plan but full result sets. This means it is much more efficient as query which required processing millions of rows now can be instantly summoned from query cache. It also means query has to be exactly the same and deterministic, so hit rate would generally be less. In any case it is completely different.

Query cache is great for certain applications, typically simple applications deployed on limited scale or applications dealing with small data sets. For example Iâ€™m using Query Cache on server which runs this blog. Updates are rather rare so per-table granularity is not the problem, I have only one server and number of queries is small so cache duplication is not the problem. Finally I do not want to hack wordpress to support eaccelerator cache or memcached. Well honestly&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
        <item>
            <title>MySql - The MySql Query Cache</title>
            <link>http://www.holyguard.net/en/detail/mysql/mysql-the-mysql-query-cache/2/70/322/</link>
            <description>holyguard.net - I have been reading about MySQL's Query Caching features on the web. I have also been playing around with it on my own. I have concluded that it is a pretty cool feature! You will need MySQL 4.0.1 or higher to play...
  
  I think what I like best about it is that the cache expires automatically when the table is modified (inserts, updates, delete's, etc). So it may not be terribly harmful to just enable the cache, and see what happens.
  
  The High Performance MySQL book states that the Query Cache identifies cacheable (is that a word?) queries by looking for SEL in the first three characters of the SQL statement. However in my testing I found that whitespace or comments before the SELECT statement did not have any effect on caching. Perhaps the JDBC driver trims whitespace and comments before sending the SQL to the server.
  
  Enabling MySQL Query Cache
  
  Edit your my.cnf and set query_cache_type equal to 1, and set the query_cache_size to some value (here we have set it to 25mb)
 
 
query_cache_type = 1
query_cache_size = 26214400
  
  If either query_cache_type or query_cache_size&amp;hellip;</description>
            <author>Luigi Nori</author>
            <pubDate>Tue, 27 Jul 2010 08:03:52 +0100</pubDate>
        </item>
    </channel>
</rss>
