This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * PHP function to image-watermark an image | |
| * http://salman-w.blogspot.com/2008/11/watermark-your-images-with-another.html | |
| * | |
| * Writes the given watermark image on the specified image | |
| * and saves the result as another image | |
| */ | |
| define('WATERMARK_OVERLAY_IMAGE', 'watermark.png'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class WebContentReader{ | |
| public $global_url; | |
| function __construct(){ | |
| $this->global_url = array(); | |
| // Create connection | |
| $con=mysqli_connect("localhost","root","","dbname"); | |
| if (mysqli_connect_errno($con)) | |
| { | |
| echo "Failed to connect to MySQL: " . mysqli_connect_error(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function compare_array($no_of_incidents, $no_of_incidents) { | |
| $incident_count_first = intval($no_of_incidents['1']); | |
| $incident_count_next = intval($no_of_incidents['1']); | |
| if ($incident_count_first == $incident_count_next) { | |
| return 0; | |
| } | |
| return ($incident_count_first > $incident_count_next) ? -1 : 1; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Installation of composer | |
| refer the URL (http://getcomposer.org/doc/00-intro.md) | |
| Installation - Windows# | |
| Using the Installer# | |
| This is the easiest way to get Composer set up on your machine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Installation of PHPUnit. | |
| Open a command prompt and go to C:\xampp\php | |
| Type "php go-pear.phar" (Installs new PEAR) | |
| Type "pear update-channels" (updates channel definitions) | |
| Type "pear upgrade --alldeps" (upgrades all existing packages and pear) | |
| Type "pear channel-discover components.ez.no" (this is needed for PHPUnit) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @file | |
| * Javascript functions for getdirections module | |
| * | |
| * @author Bob Hutchinson http://drupal.org/user/52366 | |
| * code derived from gmap_direx module | |
| * this is for googlemaps API version 3 | |
| * with adaptations from econym.org.uk | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| calcRoute : function (batches, directionsService, directionsDisplay) { | |
| var combinedResults; | |
| var unsortedResults = [{}]; // to hold the counter and the results themselves as they come back, to later sort | |
| var directionsResultsReturned = 0; | |
| for (var k = 0; k < batches.length; k++) { | |
| var lastIndex = batches[k].length - 1; | |
| var start = batches[k][0].location; | |
| var end = batches[k][lastIndex].location; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Implementation of hook_menu(). | |
| * Registers a form-based page that you can access at "http://localhost/mypage" | |
| */ | |
| function mymodule_menu(){ | |
| return array( | |
| 'mypage' => array( | |
| 'title' => 'A page to test ajax', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Install ABT Bundle | |
| 2. Download android latest files(android versions) using SDK Manager. | |
| 3. Download JDK and set environment variable | |
| 4. Download Apache ant and set environment variable | |
| 5. Download Phone gap | |
| Create android phone gap apps using command prompt. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| First off I'm assuming xampp is installed to C:\xampp | |
| 1. Open a command prompt and go to C:\xampp\php | |
| 2. Type "pear update-channels" (updates channel definitions) | |
| 3. Type "pear upgrade" (upgrades all existing packages and pear) | |
| 4. Type "pear channel-discover components.ez.no" (this is needed for PHPUnit) | |
| 5. Type "pear channel-discover pear.symfony-project.com" (also needed by PHPUnit) | |
| 6. Type "pear channel-discover pear.phpunit.de" (This IS phpunit) | |
| 7. Type "pear install --alldeps phpunit/PHPUnit" (installs PHPUnit and all dependencies) |
NewerOlder