A Brief Introduction to Multi-Threading in PHP
- Foreword
- Execution
- Sharing
- Synchronization
- Pitfalls
| // Example 1 | |
| mediator.name = 'Doug'; | |
| mediator.subscribe('nameChange', function(arg){ | |
| console.log(this.name); | |
| this.name = arg; | |
| console.log(this.name); | |
| }); | |
| mediator.publish('nameChange', 'Jorn'); |
| <?php | |
| /* | |
| Plugin Name: WP_Rewrite endpoints demo | |
| Description: A plugin giving example usage of the WP_Rewrite endpoint API | |
| Plugin URI: http://make.wordpress.org/plugins/2012/06/07/rewrite-endpoints-api/ | |
| Author: Jon Cave | |
| Author URI: http://joncave.co.uk/ | |
| */ | |
| function makeplugins_endpoints_add_endpoint() { |
| * { | |
| box-sizing: border-box; | |
| margin: 0; | |
| padding: 20px; | |
| transition: background 800ms; | |
| } | |
| html { | |
| height: 100%; | |
| background: hsl(193, 66%, 55%); |
| <?php | |
| // "!defined('determinator') == "include_once" for sneaky people. | |
| if (!defined("determinator")){ | |
| function determinator_feof($file_pointer, &$now = NULL) { | |
| // Assigning a value to $now in this function changes | |
| // the value of whatever variable the calling function | |
| // passed in. Functions with side effects... huzzah! | |
| $now = microtime(true); | |
| // Have we reached the end of the file? |
| <?php | |
| const SPACING_X = 1; | |
| const SPACING_Y = 0; | |
| const JOINT_CHAR = '+'; | |
| const LINE_X_CHAR = '-'; | |
| const LINE_Y_CHAR = '|'; | |
| $table = array( | |
| array( |
An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.
Everything is broken up by tag, but within each the selectors aren't particularly ordered.
I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A
A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:
-webkit-appearance:none;
A list of amazingly awesome PHP libraries, resources and shiny things.
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |