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 | |
/** | |
* @Author Anonymous | |
* @link http://www.redrokk.com | |
* @Package Wordpress | |
* @SubPackage RedRokk Library | |
* @copyright Copyright (C) 2011+ Redrokk Interactive Media | |
* | |
* @version 2.0 | |
*/ |
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
/** | |
* Code goes in functions.php or a custom plugin. Replace XX with the country code your changing. | |
*/ | |
add_filter( 'woocommerce_states', 'custom_woocommerce_states' ); | |
function custom_woocommerce_states( $states ) { | |
$states['CN'] = array( | |
'CN1' => 'Yunnan / 云南', | |
'CN2' => 'Beijing / 北京', |
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
<canvas id="myCanvas" width="578" height="500"></canvas> | |
<script type="text/javascript"> | |
var canvas = document.getElementById('myCanvas'); | |
var context = canvas.getContext('2d'); | |
context.lineWidth = 10; |
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
<canvas id="myCanvas" width="578" height="500"></canvas> | |
<script type="text/javascript"> | |
var canvas = document.getElementById('myCanvas'); | |
var context = canvas.getContext('2d'); | |
context.lineWidth = 10; |
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
add_filter('woocommerce_paypal_args', 'convert_rmb_to_usd'); | |
function convert_rmb_to_usd($paypal_args){ | |
if ( $paypal_args['currency_code'] == 'RMB'){ | |
$convert_rate = 6.2116; | |
$paypal_args['amount_1'] = round( $paypal_args['amount_1'] / $convert_rate, 2); | |
} | |
return $paypal_args; | |
} |
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
<script> | |
function loadImages(sources, callback) { | |
var images = {}; | |
var loadedImages = 0; | |
var numImages = 0; | |
// get num of sources | |
for(var src in sources) { | |
numImages++; | |
} | |
for(var src in sources) { |
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
var canvas = document.getElementById('tutorial'); | |
if (canvas.getContext){ | |
var ctx = canvas.getContext('2d'); | |
// drawing code here | |
} else { | |
// canvas-unsupported code here | |
} |
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
ctxRoot.rotate(Math.atan2(temp.vy, temp.vx)); |
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
var currentX, currentY; // set to last x,y sent to lineTo/moveTo/bezierCurveTo or quadraticCurveToFixed() | |
function quadraticCurveToFixed( cpx, cpy, x, y ) { | |
/* | |
For the equations below the following variable name prefixes are used: | |
qp0 is the quadratic curve starting point (you must keep this from your last point sent to moveTo(), lineTo(), or bezierCurveTo() ). | |
qp1 is the quadratic curve control point (this is the cpx,cpy you would have sent to quadraticCurveTo() ). | |
qp2 is the quadratic curve ending point (this is the x,y arguments you would have sent to quadraticCurveTo() ). | |
We will convert these points to compute the two needed cubic control points (the starting/ending points are the same for both | |
the quadratic and cubic curves. |
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
compass: { | |
options: { | |
sassDir: '<%= yeoman.app %>/css', | |
cssDir: '.tmp/css', | |
imagesDir: '<%= yeoman.app %>/images', | |
javascriptsDir: '<%= yeoman.app %>/scripts', | |
fontsDir: '<%= yeoman.app %>/fonts', | |
importPath: 'app/components', | |
relativeAssets: true, | |
require: 'zurb-foundation' |
OlderNewer