Creating a new PHPExcel Object.
$this->PHPExcel = new PHPExcel();
Creating a new sheet:
| <Files .htaccess> | |
| order allow,deny | |
| deny from all | |
| </Files> | |
| ErrorDocument 403 /errors/error.php | |
| ErrorDocument 404 /errors/error.php | |
| ErrorDocument 405 /errors/error.php | |
| ErrorDocument 408 /errors/error.php | |
| ErrorDocument 500 /errors/error.php |
| <?php | |
| $config["full_tag_open"] = '<ul class="pagination">'; | |
| $config["full_tag_close"] = '</ul>'; | |
| $config["first_link"] = "«"; | |
| $config["first_tag_open"] = "<li>"; | |
| $config["first_tag_close"] = "</li>"; | |
| $config["last_link"] = "»"; | |
| $config["last_tag_open"] = "<li>"; |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <configuration> | |
| <system.webServer> | |
| <rewrite> | |
| <rules> |
| var uniqUrls = []; | |
| var urlsToBrowse = []; | |
| var browsedUrls = []; | |
| function open(url, callback) { | |
| var page = require('webpage').create(); | |
| page.settings.loadImages = true; | |
| page.onResourceReceived = function (response) { | |
| if (response.stage == "start" && response.url.substr(0, 4) === "http" && uniqUrls.indexOf(response.url) === -1) { |
| I use the first | |
| —– BEGIN LICENSE —– | |
| Michael Barnes | |
| Single User License | |
| EA7E-821385 | |
| 8A353C41 872A0D5C DF9B2950 AFF6F667 | |
| C458EA6D 8EA3C286 98D1D650 131A97AB | |
| AA919AEC EF20E143 B361B1E7 4C8B7F04 |
| <?php | |
| /** | |
| * Convert a multi-dimensional array into a single-dimensional array. | |
| * @author Sean Cannon, LitmusBox.com | [email protected] | |
| * @param array $array The multi-dimensional array. | |
| * @return array | |
| */ | |
| function array_flatten($array) { | |
| if (!is_array($array)) { |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
| <?php | |
| function convertCurrency($amount, $from, $to){ | |
| $data = file_get_contents("https://www.google.com/finance/converter?a=$amount&from=$from&to=$to"); | |
| preg_match("/<span class=bld>(.*)<\/span>/",$data, $converted); | |
| $converted = preg_replace("/[^0-9.]/", "", $converted[1]); | |
| return number_format(round($converted, 3),2); | |
| } | |
| echo convertCurrency("10.00", "GBP", "USD"); |
| <?php | |
| /** | |
| * Simple excel writer class with no external dependencies, drop it in and have fun | |
| * @author Matt Nowack | |
| * @link https://gist.github.com/ihumanable/929039/edit | |
| * @license Unlicensed | |
| * @version 1.0 | |
| */ | |
| class Excel { |