Home

FLutter 配置

FLutter 配置 IPHONEOS_DEPLOYMENT_TARGET Set MinimumOSVersion to 9.0 in ios/Flutter/AppFrameworkInfo.plist Ensure that you uncomment platform :ios, ‘9.0’ in ios/Podfile Ensure that ios/Podfile contains the following post install script: post_install do |installer| installer.pods_project.targets.each do |target| flutter_ad...

Read more

Security AES

Security AES Dart AES import 'package:encrypt/encrypt.dart'; final aesKey = Key.fromUtf8('wWKK335SKLDFJ146'); final iv = IV.fromLength(16); final encrypter = Encrypter(AES(aesKey, mode: AESMode.cbc, padding: 'PKCS7')); final encrypted = encrypter.encrypt(content, iv: iv); final decrypted = encrypter.decrypt(encrypted, iv: iv); print(d...

Read more

编译原理

编译原理 阶段 1. 词法分析阶段 2. 语法分析阶段 3. 语义分析阶段 4. 中间代码生成阶段 5. 代码优化阶段 6. 目标代码生成阶段 7. 符号表管理 8. 出错处理 文法和有限自动机 0型文法 1型文法 2型文法 3型文法, 也叫正规式 自动机 FSA: Finite state automaton, 有限状态自动机 DFA: Deterministic Finite Automaton, 确定有限自动机, 但不同于不确定的有限自动机,DFA中不会有从同一状态出发的两条边标志有相同的符号 NFA: Non-deterministic Finite Automaton, 不确定有限自动机 状态为一个有向图 DFA的一个状态是NFA的一...

Read more

Node HTTP

Node HTTP http: 为http协议的库 https: 为https协议的库 http2: 为http2协议的库 添加超时时间 options中: timeout: 5000 request.on('timeout', () => {}) req.on('socket', function (socket) { socket.setTimeout(myTimeout); socket.on('timeout', function() { req.abort(); }); }); setTimeout(req.abort.bind(req), 3000); 问题 Uncaught Exception: Error: sock...

Read more

Node

Node 修改源 默认源: https://registry.npmjs.org/ npm config get registry npm config set registry https://registry.npm.taobao.org 包管理器 npm yarn Reference node.js npm.js npm.js nvm An Absolute Beginner’s Guide to Using npm 11 Simple npm Tricks That Will Knock Your Wombat Socks Off

Read more

Electron

Electron npm install -g npm npm install -g npm@6 "electronDownload":{ "mirror":"https://npm.taobao.org/mirrors/electron/" }, 源 npm config set registry https://npm.taobao.org/mirrors/node npm config set disturl https://npm.taobao.org/mirrors/node npm config set ELECTRON_MIRROR http://npm.taobao.org/mirrors/electron/ API使用 Webview ...

Read more

Regular Expression

Regular Expression \b 单词边界, 单词就是\w组成的 Flag i: With this flag the search is case-insensitive: no difference between A and a (see the example below). g: With this flag the search looks for all matches, without it – only the first match is returned. m: Multiline mode (covered in the chapter Multiline mode of anchors ^ $, flag “m”). s: Enables “do...

Read more