Here are some strategies for learning that scientists and psychologists have found to be effective.
Try to do more active learning than passive learning as it is more effective.
Passive | Active |
---|
/******/ (function(modules) { // webpackBootstrap | |
/******/ // The module cache | |
/******/ var installedModules = {}; | |
/******/ | |
/******/ // The require function | |
/******/ function __webpack_require__(moduleId) { | |
/******/ | |
/******/ // Check if module is in cache | |
/******/ if(installedModules[moduleId]) { | |
/******/ return installedModules[moduleId].exports; |
// node_modules/5to6-codemod/transforms/amd.js | |
/** | |
* amd - Replace define([]) calls with es6 import/exports | |
*/ | |
var util = require('../utils/main'); | |
export default function transform(file, api, options) { | |
var j = api.jscodeshift; |
let viewport = document.body.getBoundingClientRect() | |
let maxWidth = viewport.width | |
let maxHeight = viewport.height | |
let outer = document.createElement('div') | |
outer.style = "position: absolute; top: 0; left: 0; right: 0;" | |
for (let i = 0; i <= 40; i++) { | |
outer.append(makeImg()) | |
} |
module.exports = function (file, api, options) { | |
const useDouble = options.useDouble || false; | |
const noSemi = options.noSemi || false; | |
const useRequire = options.useRequire || false; | |
const j = api.jscodeshift; | |
const isContainsLodashImport = | |
file.source.match(/(const|let|var)\s+_\s+=\s+require\(["']lodash["']\)/g) || | |
file.source.match(/import\s+_\s+from\s+["']lodash["']/g); |
/* | |
* Catches this footgun: | |
* | |
* {myArray.length && ( | |
* <div>Foo</div> | |
* )} | |
* | |
* which renders "0" if myArray is empty | |
* | |
* It should instead be: |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Script loading</title> | |
</head> | |
<body> | |
Hello world |
const chatMachine = Machine({ | |
id: "chat", | |
initial: "idle", | |
context: { | |
messages: [] | |
}, | |
states: { | |
idle: { | |
on: { | |
fetch: "fetching", |
const chatMachine = Machine({ | |
id: "chat", | |
initial: "idle", | |
context: { | |
messages: [] | |
}, | |
states: { | |
idle: { | |
on: { | |
fetch: "fetching", |
const chatMachine = Machine({ | |
id: "chat", | |
type: "parallel", | |
context: { | |
messages: [] | |
}, | |
states: { | |
http: { | |
initial: "idle", | |
states: { |