Good documentation should include two distinct elements - a Guide and an API:
- The Guide builds concepts, providing examples, etc.
GitBook is well suited to
Good documentation should include two distinct elements - a Guide and an API:
GitBook is well suited to
/** | |
* Encrypts plaintext using AES-GCM with supplied password, for decryption with aesGcmDecrypt(). | |
* (c) Chris Veness MIT Licence | |
* | |
* @param {String} plaintext - Plaintext to be encrypted. | |
* @param {String} password - Password to use to encrypt plaintext. | |
* @returns {String} Encrypted ciphertext. | |
* | |
* @example | |
* const ciphertext = await aesGcmEncrypt('my secret text', 'pw'); |
import Foundation | |
public protocol AlmostEquatable { | |
@warn_unused_result | |
func ==~(lhs: Self, rhs: Self) -> Bool | |
} | |
public protocol EquatableWithinEpsilon: Strideable { | |
static var Epsilon: Self.Stride { get } | |
} |
# -*- coding: utf-8 -*- | |
import sys | |
import numpy | |
numpy.seterr(all='ignore') | |
''' |
var initalArray = [1, 2, 3] | |
let pointer: UnsafeMutablePointer<Int> = UnsafeMutablePointer(initalArray) | |
let arrary = Array(UnsafeBufferPointer(start: pointer, count: initalArray.count)) |
// Open-ended range operators | |
// | |
// 100... is equivalent to 100...Int.max | |
// ...-100 is equivalent to Int.min...-100 | |
// ..<3 is equivalent to Int.min..<3 | |
import Swift | |
/// Conforming types provide static `max` and `min` constants. | |
protocol MinMaxType { |
# -*- coding: utf-8 -*- | |
u""" | |
Beta regression for modeling rates and proportions. | |
References | |
---------- | |
Grün, Bettina, Ioannis Kosmidis, and Achim Zeileis. Extended beta regression | |
in R: Shaken, stirred, mixed, and partitioned. No. 2011-22. Working Papers in | |
Economics and Statistics, 2011. |
// Part of https://github.com/chris-rock/node-crypto-examples | |
// Nodejs encryption of buffers | |
var crypto = require('crypto'), | |
algorithm = 'aes-256-ctr', | |
password = 'd6F3Efeq'; | |
var fs = require('fs'); | |
var zlib = require('zlib'); |
// Depends on `through` | |
// | |
// $ npm install through | |
// | |
// Usage: | |
// | |
// $ echo 'hello' | node stdin-and-fs-stream.js | |
// $ echo 'hello' > tmp && node stdin-and-fs-stream.js tmp | |
// | |
var fs = require('fs'), |