Combine default parameters and destructuring for a compact version of the defaults / overrides pattern.
function foo ({
bar = 'no',
baz = 'works!'
} = {}) {| import { Component } from "React"; | |
| export var Enhance = ComposedComponent => class extends Component { | |
| constructor() { | |
| this.state = { data: null }; | |
| } | |
| componentDidMount() { | |
| this.setState({ data: 'Hello' }); | |
| } | |
| render() { |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
| // Refer to https://gist.github.com/remy/350433 | |
| try { | |
| // Test webstorage existence. | |
| if (!window.localStorage || !window.sessionStorage) throw "exception"; | |
| // Test webstorage accessibility - Needed for Safari private browsing. | |
| localStorage.setItem('storage_test', 1); | |
| localStorage.removeItem('storage_test'); | |
| } catch(e) { | |
| (function () { | |
| var Storage = function (type) { |
Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.
The following steps assume you've got a set-up like mine, where:
| class A(models.Model): | |
| things = models.ManyToManyField("B", through=ThroughModel) | |
| class B(models.Model): | |
| text = models.TextField() | |
| class ThroughModel(models.Model): | |
| a = models.ForeignKey(A) | |
| b = models.ForeignKey(B) | |
| extra = models.BooleanField() |
| section .text | |
| global _start | |
| _start: | |
| xor eax, eax | |
| xor ebx, ebx | |
| xor esi, esi | |
| jmp _socket | |
| _socket_call: |