Expression | How to Read This |
---|---|
a plus b | |
a minus b | |
a times b | |
a over b | |
a is greater than b | |
a is less than b |
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
/** | |
* Creates a read/writable property which returns a function set for write/set (assignment) | |
* and read/get access on a variable | |
* | |
* @param {Any} value initial value of the property | |
*/ | |
function createProperty(value) { | |
var _value = value; | |
/** |
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 mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
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
// Render Multiple URLs to image | |
var RenderUrlsToImage, arrayOfUrls, system; | |
system = require("system"); | |
var fs = require('fs'); | |
/* | |
Render given urls | |
@param array of URLs to render |
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
/** | |
* Fix login loop. | |
* | |
* When WordPress is installed in a subdirectory, wp-admin/ links don't work correctly. We fix this with an nginx rewrite. | |
* But... it appends reauth=1 to the url which forces a reauthentication when submitted... and you have to log in again! | |
*/ | |
add_filter( 'login_url', function( $url ) { | |
if ( '/wp-admin/' === add_query_arg( array() ) ) { |
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 | |
/* add to functions.php of the theme */ | |
add_filter('user_contactmethods','my_user_contactmethods'); | |
function my_user_contactmethods($user_contactmethods ){ | |
unset($user_contactmethods['aim']); | |
unset($user_contactmethods['yim']); | |
unset($user_contactmethods['jabber']); | |
$user_contactmethods ['weibo'] = '微博URL'; | |
return $user_contactmethods ; | |
} |