Yesterday I found some people on my [favorite reddit][lolphp] wonder about the output of the following code:
<?php
$a = 1;
$c = $a + $a++;
<?php | |
// minimal routing | |
function web_app($routes, $req_verb, $req_path) { | |
$req_verb = strtoupper($req_verb); | |
$req_path = trim(parse_url($req_path, PHP_URL_PATH), '/'); | |
$found = false; | |
if (isset($routes[$req_verb])) { |
git tag -d TagName && git push origin :refs/tags/TagName |
(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.
Disclaimer: This is an unofficial post by a random person from the community. I am not an official representative of io.js. Want to ask a question? open an issue on the node-forward
discussions repo
While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.
Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.
function wash(socks) { | |
var socksYouHave = []; | |
var sockSizes = ['small', 'medium', 'large']; | |
socks.forEach(function(sock) { | |
// Weird socks never survive | |
if(sockSizes.indexOf(sock) === -1) return; | |
// One in ten socks never make it out alive | |
if(Math.floor(Math.random() * 10) === 0) return; | |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
// ==UserScript== | |
// @name UCEUSA NY IPIRP DMV Defensive Driving Course Clicker | |
// @namespace http://nickbar.one | |
// @version 0.3 | |
// @author nbar1 | |
// @match https://*.uceusa.com/course-players/courses/* | |
// ==/UserScript== | |
(function() { | |
'use strict'; |