A Brief Introduction to Multi-Threading in PHP
- Foreword
- Execution
- Sharing
- Synchronization
- Pitfalls
| $scope.$on('$viewContentLoaded', function() { | |
| $scope._style = document.createElement('link'); | |
| $scope._style.type = 'text/css'; | |
| $scope._style.href = 'application/Invoice/Resource/single.css'; | |
| $scope._style.rel = 'stylesheet'; | |
| $scope._style = document.head.appendChild($scope._style); | |
| }); | |
| $scope.$on('$destroy', function() { |
| <?php | |
| /** | |
| * Benchmark: Reflection Performance | |
| * | |
| * Conclusion: there is no performance-gain from caching reflection-objects. | |
| */ | |
| define('NUM_TESTS', 10); |
| <?php | |
| /** | |
| * Calculate a precise time difference. | |
| * @param string $start result of microtime() | |
| * @param string $end result of microtime(); if NULL/FALSE/0/'' then it's now | |
| * @return flat difference in seconds, calculated with minimum precision loss | |
| */ | |
| function microtime_diff($start, $end = null) { | |
| if (!$end) $end = microtime(); |
| <?php | |
| // Assuming a POST to this script in form of: | |
| // request_forwarder?url=url_name | |
| // | |
| // This will convert a client side AJAX request to a server side PHP curl, | |
| // thus eleminating worries of cross-site scripting and having to abide by | |
| // cross-origin-request-sharing (CORS) settings on the end server. | |
| $url = $_GET['url']; | |
| $fields_string = ''; |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| $(".positive-integer").numeric({ decimal: false, negative: false }, function () { alert("Positive integers only"); this.value = ""; this.focus(); }); |