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 lightbox_fullscreen = document.getElementById('lightbox-fullscreen'); | |
| document.addEventListener('fullscreenchange', function() { | |
| lightbox_fullscreen.innerHTML = (document.fullscreen) ? 'Exit Fullscreen': 'Fullscreen'; | |
| }, false); |
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
| """ | |
| MIT License | |
| Copyright 2012 Okal Otieno | |
| A (very rough) port of the Pesapal PHP IFrame integration code to Python. | |
| PHP source at https://www.pesapal.com/Content/downloads/pesapal-iframe.php.txt | |
| Uses Leah Culver's python-oauth library for Oauth 1.0 integration. https://github.com/leah/python-oauth | |
| """ |
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
| #Newbie programmer | |
| def factorial(x): | |
| if x == 0: | |
| return 1 | |
| else: | |
| return x * factorial(x - 1) | |
| print factorial(6) | |
| #First year programmer, studied Pascal |
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
| <html> | |
| <head> | |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> | |
| <script src="http://yandex.st/raphael/1.5.2/raphael.min.js"></script> | |
| <script> | |
| /** | |
| * A Simple Vector Shape Drawing App with RaphaelJS and jQuery | |
| * copyright 2010 Kayla Rose Martin - Licensed under the MIT license | |
| * Inspired by http://stackoverflow.com/questions/3582344/draw-a-connection-line-in-raphaeljs | |
| **/ |
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
| #!/usr/bin/env php | |
| <?php | |
| $ticks = array('▁','▂','▃','▄','▅','▆','▇'); | |
| $args = explode(',', (($argv[1] == '--stdin') ? fgets(fopen('php://stdin', 'r'), 1024) : $argv[1])); | |
| $range = (max($args) - min($args)) + 1; | |
| array_map(function($val) use ($ticks, $args, $range) { | |
| print $ticks[round((($val - min($args)) / $range) * (count($ticks) - 1))]; | |
| }, $args); | |
| print "\n"; |
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
| from word_counter import word_counter | |
| print word_counter("The quick brown fox jumped over the lazy dog.") |
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
| #Inspired by http://www.daniweb.com/software-development/python/code/216495 | |
| def word_counter(text): | |
| return len(text.split(None)) |
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 | |
| header("Location:https://erp.acimarketing.org"); |
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
| $ alias gaes='/path/to/sdk/dev_appserver.py' |
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://api.tropo.com/1.0/sessions?action=create&token=YOUR_TOKEN_HERE";//You can pass more parameters just as shown in the Quickstart guide. | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_URL, $url); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($ch, CURLOPT_USERPWD, "username:password"); | |
| $xmlResponse = curl_exec($ch); | |
| curl_close ($ch); | |
| echo $xmlResponse; //So you can see the results from your browser when you access this script | |
| ?> |
NewerOlder