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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
| <title>Horizontal drop menu</title> | |
| <style type="text/css"> | |
| .menu { | |
| padding: 0; |
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
| var i=0; | |
| function timedCount() | |
| { | |
| i=i+1; | |
| postMessage(i); //posts a message back to the HTML page. | |
| setTimeout("timedCount()",500); | |
| } | |
| timedCount(); |
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
| <?xml version="1.0"?> | |
| <users> | |
| <user> | |
| <firstname>John</firstname> | |
| <surname>Brady</surname> | |
| <address>1 Bunch St</address> | |
| <city>Downtown</city> | |
| <country>America</country> | |
| <contact> | |
| <phone type="mobile">4444 4444</phone> |
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
| <script src="http://code.jquery.com/jquery-latest.js"></script> | |
| <script> | |
| $(document).ready(function () | |
| { | |
| $.getJSON("http://twitter.com/statuses/user_timeline/USERNAME.json?callback=?", function(data) { | |
| $(".show_tweet").html(data[0].text); | |
| }); | |
| }); | |
| </script> | |
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
| //path to directory to scan | |
| $directory = "../images/team/harry/"; | |
| //get all image files with a .jpg extension. | |
| $images = glob($directory . "*.jpg"); | |
| //print each file name | |
| foreach($images as $image) | |
| { | |
| echo $image; |
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 | |
| $url = 'http://twitter.com/statuses/update.xml'; | |
| $curl_handle = curl_init(); | |
| curl_setopt($curl_handle, CURLOPT_URL, "$url"); | |
| curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2); | |
| curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($curl_handle, CURLOPT_POST, 1); | |
| curl_setopt($curl_handle, CURLOPT_POSTFIELDS, "status=$message"); | |
| curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$password"); |
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
| //Use the code as following: | |
| <?php | |
| include 'unzip.php'; | |
| if(unzip('zipedfiles/test.zip','unziped/myNewZip')) | |
| echo 'Success!'; | |
| else | |
| echo '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
| <?php | |
| //How to use it | |
| //Just call timthumb.php with appropriate arguments, For example: | |
| <img src="/script/timthumb.php?src=/some/path/myimage.png&w=100&h=80" alt="resized image" /> | |
| /* http://viralpatel.net/blogs/resize-image-dynamically-php/ */ | |
| ?> |
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
| $('#slide1').cycle({ | |
| fx: 'scrollDown', | |
| speed: 300, | |
| timeout: 2000 | |
| }); | |
| /*Effect you can Choose and apply | |
| * blindX | |
| * blindY |
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 function distance($lat1, $lon1, $lat2, $lon2) { | |
| $pi80 = M_PI / 180; | |
| $lat1 *= $pi80; | |
| $lon1 *= $pi80; | |
| $lat2 *= $pi80; | |
| $lon2 *= $pi80; | |
| $r = 6372.797; // mean radius of Earth in km | |
| $dlat = $lat2 - $lat1; |