This file contains 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
Country | CountryCode | Currency | Code | |
---|---|---|---|---|
New Zealand | NZ | New Zealand Dollars | NZD | |
Cook Islands | CK | New Zealand Dollars | NZD | |
Niue | NU | New Zealand Dollars | NZD | |
Pitcairn | PN | New Zealand Dollars | NZD | |
Tokelau | TK | New Zealand Dollars | NZD | |
Australian | AU | Australian Dollars | AUD | |
Christmas Island | CX | Australian Dollars | AUD | |
Cocos (Keeling) Islands | CC | Australian Dollars | AUD | |
Heard and Mc Donald Islands | HM | Australian Dollars | AUD |
This file contains 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
[ | |
{"name":"Alabama","iso_code":"US-AL"}, | |
{"name":"Alaska","iso_code":"US-AK"}, | |
{"name":"Arizona","iso_code":"US-AZ"}, | |
{"name":"Arkansas","iso_code":"US-AR"}, | |
{"name":"California","iso_code":"US-CA"}, | |
{"name":"Colorado","iso_code":"US-CO"}, | |
{"name":"Connecticut","iso_code":"US-CT"}, | |
{"name":"Delaware","iso_code":"US-DE"}, | |
{"name":"District of Columbia","iso_code":"US-DC"}, |
This file contains 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 | |
add_action('admin_init', 'foo_duplicate_posts', 99999); | |
function foo_duplicate_posts(){ | |
// Only allow admins to run the script | |
if(!current_user_can('manage_options')) | |
return; | |
// Check if keyword is set | |
if(!isset($_GET['duplicate-posts'])) |
This file contains 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 foo_duplicate_posts(){ | |
# Only allow admins to run the script | |
if(!current_user_can('manage_options')) | |
return; | |
# Check if keyword is set | |
if(!isset($_GET['duplicate-posts'])) |
This file contains 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
/** | |
* Form Validation | |
* | |
* @since 11/04/2014 | |
* @author Harish | |
*/ | |
function enformValidation() { | |
var i = 0; | |
// Validate |
This file contains 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 | |
// Add custom validation for CF7 form fields | |
function custom_text_validation_filter($result,$tag){ | |
$type = $tag['type']; | |
$name = $tag['name']; | |
$the_value = $_POST[$name]; | |
if($name == 'firstname'){ | |
if( empty($the_value) ) { | |
$result['valid'] = false; |
This file contains 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
/* This may not work with default browser shortcuts. Need to give it a try though. */ | |
/* Create function */ | |
$.ctrl = function(key, callback, args) { | |
$(document).keydown(function(e) { | |
if(!args) args=[]; // IE barks when args is null | |
if(e.keyCode == key.charCodeAt(0) && e.ctrlKey) { | |
callback.apply(this, args); | |
return false; | |
} |
This file contains 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 polishcalculator { | |
/** | |
* Variables | |
*/ | |
private $expected; | |
private $polishexprestion; | |
private $token; |
This file contains 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 | |
/** | |
* First, download phpunit.phar from www.phpunit.de | |
* Navigate to PHP bin folder and enter following command to execute tests: | |
* | |
* php.exe phpunit.phar --bootstrap c:\wamp\www\unit\src\polishcal\polishcalculator.php c:\wamp\www\unit\tests\polishcal_test\polishcalculator_test.php | |
* | |
*/ | |
class polishcalculatorTest extends PHPunit_Framework_Testcase { |
OlderNewer