使用 [BEM][1] 命名规范,理论上讲,每行 css
代码都只有一个选择器。
BEM代表 “块(block),元素(element),修饰符(modifier)”,我们常用这三个实体开发组件。
在选择器中,由以下三种符号来表示扩展的关系:
──────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
modified: pkg/proxy/transport.go | |
──────────────────────────────────────────────────────────────────────────────────────────────────────────────── | |
@ transport.go:46 @ func (p *proxy) RoundTrip(httpReq *http.Request) (resp *http.Response, err error | |
return nil, err | |
} | |
var result *rpc.JSONRPCResult | |
result := rpc.NewJSONRPCResult() | |
if err = json.Unmarshal(body, &result); err != nil { |
'use strict'; | |
exports.handler = (event, context, callback) => { | |
// Get request and request headers | |
const request = event.Records[0].cf.request; | |
const headers = request.headers; | |
// Configure authentication | |
const authUser = 'user'; | |
const authPass = 'pass'; |
package main | |
import ( | |
"fmt" | |
"github.com/ethereum/go-ethereum/accounts" | |
"github.com/ethereum/go-ethereum/common/hexutil" | |
"github.com/ethereum/go-ethereum/crypto" | |
) |
func ethGetLogs(contractAddress string, hexOfEvent string) { | |
generateZeros := func() string { | |
str := "" | |
for i := 0; i < 24; i++ { | |
str += "0" | |
} | |
return str | |
} | |
ethAddress = fmt.Sprintf("0x%s%s", generateZeros(), ethAddress[2:]) |
<!-- | |
HTML5. Use tags like <article>, <section>, etc. | |
See: http://www.sitepoint.com/web-foundations/doctypes/ | |
--> | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> |
package main | |
import ( | |
"encoding/hex" | |
"fmt" | |
"io/ioutil" | |
"github.com/ethereum/go-ethereum/accounts/keystore" | |
"github.com/ethereum/go-ethereum/crypto" | |
) |
Reference: RFC 2616 - HTTP Status Code Definitions
(define (square x) (* x x)) | |
(define (double x) (+ x x)) | |
(define (athird x) (/ x 3)) | |
(define (cube x) (* x x x)) | |
(define (abs x) (if (< x 0) (- 0 x) x)) | |
(define (good-enough? guess x) | |
(< (abs (- (cube guess) x)) 0.0000001)) | |
(define (improve guess x) |
(define (average x) (/ x 2)) | |
(define (square x) (* x x)) | |
(define (abs x) (if (< x 0) (- 0 x) x)) | |
; (define (good-enough? guess x) | |
; (if (< (abs (- (square guess) x)) 0.00000000001) | |
; #t | |
; #f)) | |
(define (good-enough? guess x) |