- Website: http://sass-lang.com/
- Docs: http://sass-lang.com/guide
- Tutorial: https://www.codecademy.com/learn/learn-sass
Install on OS X: sudo gem install sass
Version info: sass -v
| function mapValues(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| result[key] = fn(obj[key], key); | |
| return result; | |
| }, {}); | |
| } | |
| function pick(obj, fn) { | |
| return Object.keys(obj).reduce((result, key) => { | |
| if (fn(obj[key])) { |
Install on OS X: sudo gem install sass
Version info: sass -v
| import React, { useMemo, useState, useEffect } from "react"; | |
| import { render } from "react-dom"; | |
| function useAsync() { | |
| return useMemo(() => { | |
| let controller; | |
| const start = (url, options, update) => { | |
| // sử dụng AbortController để thông báo với fetch rằng chúng ta muốn cancel 1 request | |
| controller = new AbortController(); | |
| const signal = controller.signal; |
| /* http://meyerweb.com/eric/tools/css/reset/ | |
| v2.0-modified | 20110126 | |
| License: none (public domain) | |
| */ | |
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, |
To paginate a page, a general algorithm needs to be followed. Also, you should have the following variables in place:
(It can be a list of patients, books, etc coming from the database)Calculation:
| There is no way to store an empty object/array/null value. | |
| There are also no actual arrays. Array values get stored as objects with integer keys. | |
| (If all keys are integers, it will be returned as an array.) | |
| Basically, it's one giant tree of hashes with string keys. | |
| Simply write a value to any location, and the intermediary locations will automatically come into existance. | |
| ── Classes ── | |
| DataSnapshot : Container for a subtree of data at a particular location. |