本教程不保证它的权威性和正确性,也不对任何实践中的错误、数据丢失等问题负责!
本教程平台为 macOS, 其他系统请酌情参考
@ 2020/8/29
- 添加"介绍"
- 更新 TWRP 信息
| // in a new folder be sure to run "npm init -y" and "npm install puppeteer" | |
| const puppeteer = require("puppeteer") | |
| const fs = require("fs/promises") | |
| async function start() { | |
| const browser = await puppeteer.launch() | |
| const page = await browser.newPage() | |
| await page.goto("https://learnwebcode.github.io/practice-requests/") | |
| const names = await page.evaluate(() => { |
| Text( | |
| 'YAY!', | |
| style: TextStyle( | |
| fontWeight: FontWeight.bold, | |
| fontSize: 60, | |
| shadows: [ | |
| Shadow( | |
| offset: Offset(3, 3), | |
| color: Colors.black38, | |
| blurRadius: 10), |
| # coding=utf-8 | |
| import csv | |
| import http.client | |
| import random | |
| import requests | |
| import socket | |
| import time | |
| import pymysql | |
| from bs4 import BeautifulSoup |
A quick cheatsheet of useful snippet for Flutter
A widget is the basic type of controller in Flutter Material.
There are two type of basic Widget we can extend our classes: StatefulWidget or StatelessWidget.
StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like:
The latest version of macOS 10.13.3 has Python 2.7.10 installed by default, yet Python has been available on macOS and previously OS X for quite a while now.
Consult the Apple's Open Source Reference Library, and browse through the various releases of the OS to find out which Python version was included). But what if you have a project which requires Python 3 ?
The following instructions will guide you through the process of:
| /** | |
| * Base contract that all upgradeable contracts should use. | |
| * | |
| * Contracts implementing this interface are all called using delegatecall from | |
| * a dispatcher. As a result, the _sizes and _dest variables are shared with the | |
| * dispatcher contract, which allows the called contract to update these at will. | |
| * | |
| * _sizes is a map of function signatures to return value sizes. Due to EVM | |
| * limitations, these need to be populated by the target contract, so the | |
| * dispatcher knows how many bytes of data to return from called functions. |
| #!/bin/bash | |
| brew install redis # Install Redis using Homebrew | |
| ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents # Enable Redis autostart | |
| launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist # Start Redis server via launchctl | |
| # homebrew.mxcl.redis.plist contains reference to redis.conf file location: /usr/local/etc/redis.conf | |
| redis-server /usr/local/etc/redis.conf # Start Redis server using configuration file, Ctrl+C to stop | |
| redis-cli ping # Check if the Redis server is running |
| import cv2.cv as cv | |
| import tesseract | |
| gray = cv.LoadImage('captcha.jpeg', cv.CV_LOAD_IMAGE_GRAYSCALE) | |
| cv.Threshold(gray, gray, 231, 255, cv.CV_THRESH_BINARY) | |
| api = tesseract.TessBaseAPI() | |
| api.Init(".","eng",tesseract.OEM_DEFAULT) | |
| api.SetVariable("tessedit_char_whitelist", "0123456789abcdefghijklmnopqrstuvwxyz") | |
| api.SetPageSegMode(tesseract.PSM_SINGLE_WORD) | |
| tesseract.SetCvImage(gray,api) | |
| print api.GetUTF8Text() |