(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.
| /* Our own header, to be included before all standard system headers */ | |
| #ifndef _APUE_H | |
| #define _APUE_H | |
| #if defined(SOLARIS) | |
| #define _XOPEN_SOURCE 500 /* Single UNIX Specification, Version 2 for Solaris 9 */ | |
| #define CMSG_LEN(x) _CMSG_DATA_ALIGN(sizeof(struct cmsghdr)+(x)) | |
| #elif !defined(BSD) | |
| #define _XOPEN_SOURCE 600 /* Single UNIX Specification, Version 3 */ |
| #!/usr/bin/env python | |
| import os | |
| import re | |
| import subprocess | |
| import sys | |
| modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)') | |
| CHECKS = [ |
| function StartTagToken(){ | |
| } | |
| function EndTagToken(){ | |
| } | |
| function Attribute(){ | |
| } |
(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.
| #!/bin/sh | |
| STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$") | |
| if [[ "$STAGED_FILES" = "" ]]; then | |
| exit 0 | |
| fi | |
| PASS=true |
| /** | |
| * Produces a function which uses template strings to do simple interpolation from objects. | |
| * | |
| * Usage: | |
| * var makeMeKing = generateTemplateString('${name} is now the king of ${country}!'); | |
| * | |
| * console.log(makeMeKing({ name: 'Bryan', country: 'Scotland'})); | |
| * // Logs 'Bryan is now the king of Scotland!' | |
| */ | |
| var generateTemplateString = (function(){ |
| // Backbone.js 0.9.2 | |
| // (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. | |
| // Backbone may be freely distributed under the MIT license. | |
| // For all details and documentation: | |
| // http://backbonejs.org | |
| (function() { | |
| // 创建一个全局对象, 在浏览器中表示为window对象, 在Node.js中表示global对象 | |
| var root = this; |
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.await import(…) from CommonJS instead of require(…).