(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.
var identityCodeValid = function (code) { | |
var city = { | |
11: "北京", | |
12: "天津", | |
13: "河北", | |
14: "山西", | |
15: "内蒙古", | |
21: "辽宁", | |
22: "吉林", |
# Other ts_library rules will use this custom compiler, which calls the | |
# TypeScript APIs to act like tsc, but adds capabilities like Bazel workers. | |
nodejs_binary( | |
name = "tsc_wrapped_bin", | |
data = [ | |
":tsc_wrapped", | |
"@//:node_modules", | |
"@bytebuffer//:pkg", | |
"@protobufjs//:pkg", | |
"@long//:pkg", |
# Generate a BaseSystem.dmg with 10.13 Install Packages | |
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra | |
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase | |
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation | |
hdiutil detach /Volumes/OS\ X\ Base\ System/ | |
hdiutil detach /Volumes/highsierra/ | |
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg |
/* | |
Client wishes to emit a number of actions | |
Actions are identical RSAAs, with varying meta properties (usually the ID to request) | |
Ideal scenario | |
* Numerous actions are taken in within a timeout/debounce window | |
* After the timeout has expired, the actions are aggregated into a single API call | |
dispatch({ | |
type: "SOME_FETCH_REQUEST", |
#!/bin/bash | |
# | |
# Credits to fuckbecauseican5 from https://www.reddit.com/r/hackintosh/comments/4s561a/macos_sierra_16a238m_install_success_and_guide/ | |
# Adapted to work with the official image available into Mac App Store | |
# | |
# Enjoy! | |
hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build |
// 验证身份证号码 | |
function verify_id_card(value) { | |
// 转换字母为大写,增加大小写X的容错能力 | |
var id_card = value.toUpperCase(); | |
//检查号码是否符合规范,包括长度,类型 | |
var isCardNo = function(obj) { | |
//身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X | |
var reg = /(^\d{15}$)|(^\d{17}(\d|X)$)/; | |
if (reg.test(obj) === false) { |
(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.