Programming Fundamental
Category |
Description |
Examples
|
Static Type Checking |
the process of verifying the type safety of a program based on analysis of a program's text (source code).
|
C/C++, Java, Rust
|
Dynamic Type Checking |
the process of verifying the type safety of a program at runtime.
|
JavaScript, Python, Ruby
|
Type |
Paradigm |
Description |
Remarks
|
Imperative |
Imperative programming
|
uses statements that change a program's state
|
|
|
Procedural Programming
|
program is built from one or more procedures (also termed subroutines or functions)
|
Fortran, Pascal, C
|
|
Object-Oriented Programming
|
|
Java, C++, C#, Scala, Smalltalk
|
Declarative |
Declarative Programming
|
expresses the logic of a computation without describing its control flow - logic without control flow
|
SQL, XQuery, Regex
|
|
Functional Programming
|
treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data
|
Clojure, Erlang, Haskell
|
|
Reactive programming
|
concerned with data streams and the propagation of change
|
|
- Functional Programming Concepts
- Higher-order function : (mathematical) functions that can either take other functions as arguments or return them as results
- First-class function : (computer science) treats functions as first-class citizens
- First-class citizen : an entity which supports all the operations including being passed as an argument, returned from a function, and assigned to a variable.
- Lambda : a function definition that is not bound to an identifier (lambda abstraction, lambda expression, function literal, anonymous function)
- Closure : a record storing a function together with an environment
- Predicate : commonly understood to be a Boolean-valued function
- Parameter
- A parameter or a formal argument, is a special kind of variable, used in a subroutine to refer to one of the pieces of data provided as input to the subroutine.
- The argument in computer science is thus the actual input expression passed/supplied to a function, procedure, or routine in the invocation/call statement.
- The term parameter (sometimes called formal parameter) is often used to refer to the variable as found in the function definition, while argument (sometimes called actual parameter) refers to the actual input supplied at function call.
- Parameters appear in procedure definitions; arguments appear in procedure calls. Loosely, a parameter is a type, and an argument is an instance.
- An output parameter, also known as an out parameter or return parameter, is a parameter used for output, rather than the more usual use for input. Output parameters is an idiom in some languages, notably C and C++.
- Variable Shadowing
Data Structure and Algorithm
Higher-order Function
Function |
Description |
Sample |
Remark
|
Filter
|
processes a data structure (usually a list) in some order to produce a new data structure containing exactly those elements of the original data structure for which a given predicate returns the boolean value true.
|
stream.filter(pred), filter(func, list)
|
|
Map
|
applies a given function to each element of a functor, e.g. a list, returning a list of results in the same order.
|
stream.map(pred), map(func, list)
|
|
Fold
|
analyze a recursive data structure and through use of a given combining operation, recombine the results of recursively processing its constituent parts, building up a return value
|
stream.reduce(initval, func), reduce(func, list, initval)
|
Reduce, Aggregate, Inject
|
Container/Collection
Category |
Ordered |
Unique |
Mutable |
Java |
Python |
OCL
|
Ordered Mutable |
true |
false |
true |
List |
list |
Sequence
|
Ordered Immutable |
true |
false |
false |
|
turple |
|
Ordered Unique |
true |
true |
|
|
|
OrderedSet
|
Unordered Unique |
false |
true |
true |
Set |
set |
Set
|
Unordered Unique Immutable |
false |
true |
false |
|
frozenset |
|
Unordered Immutable |
false |
false |
true |
|
|
Bag
|
Tree
Metasyntax
- ASN.1 (Abstract Syntax Notation One)
- a standard and notation that describes rules and structures for representing, encoding, transmitting, and decoding data in telecommunications and computer networking
Extended BNF
Usage |
Notation
|
Definition |
=
|
Concatenation |
,
|
Termination |
;
|
Alternation |
|
|
Optional |
[ ... ]
|
Repetition |
{ ... }
|
Grouping |
( ... )
|
Comment |
(* ... *)
|
Special Sequence |
? ... ?
|
Exception |
-
|
Examples
(* syntax for event signature of Solidity *)
(* https://solidity.readthedocs.io/en/v0.5.15/abi-spec.html#events *)
event-signature = event-name, "(", [ parameter-type, { ",", parameter-type } ], ")"
Coding Convention
- What is Coding Convention
- Google Style Guide
- C++, Objective-C, Java, Python, R, Shell, HTML/CSS, JavaScript, AngularJS, Common, XML
- Firefox Coding Style
- C++, Java, JavaScript, Python
- FreeBSD kernel source file style guide
Style |
Description |
Sample |
Remarks
|
Camel Case |
Spaces and punctuation are removed and the first letter of each word is capitalised. |
accessToke, AccessToken |
Pascal Case
|
Snake Case |
Punctuation is removed and spaces are replaced by single underscores. |
access_token, ACCESS_TOKEN |
|
Kebab Case |
Punctuation is removed and spaces are replaced by single hyphens. |
access-token |
Spinal Case, Lisp Case, Dash Case
|
Language |
Public Variable/Field |
Non-public Variable/Field |
Local Variable |
Constant |
Public Method/Function |
Non-public Method/Function
|
Java |
productId |
productId
|
prdId |
MAX_COUNT_PER_DAY
|
makeOrder() |
beforeOrder()
|
JavaScript |
productId |
productId
|
prdId |
MAX_COUNT_PER_DAY
|
makeOrder() |
beforeOrder()
|
Python |
|
|
|
|
|
|
Solidity |
productId |
_tokenApprovals
|
tokenId |
|
transferFrom() |
_beforeTokenTransfer()
|
Object Oriented Programming
Concept |
Description |
Supported by |
Remarks
|
interface
|
definitions of methods and values which the objects agree upon, in order to co-operate, as part of an API.
|
|
define one or more behaviors via method signatures
|
trait
|
both provide a set of methods that implement behaviour to a class, and require that the class implement a set of methods that parameterize the provided behaviour.
|
Rust, Scala |
defines behaviors via full method definitions but not states
|
mix-in
|
a class that contains methods for use by other classes without having to be the parent class of those other classes.
|
|
described as being "included" rather than "inherited".
|
Glossary
Term |
Definition |
Description |
Remarks
|
TL;DR(TLDR) |
Too Long; Didn’t Read
|
Generally speaking, you should only use TLDR when summarizing a piece of text, whether you’re the author or commenter.
|
Foobar |
|
metasyntactic variables and placeholder names in computer programming or computer-related documentation.
|
foobar , foo , bar , baz
|
Alice and Bob |
|
Fictional characters commonly used as placeholders in discussions about cryptographic systems and protocols, and in other science and engineering literature where there are several participants in a thought experiment.
|
Alice , Bob , Carol , Dave , Eve , etc
|
Idempotence
|
the property of certain operations in mathematics and computer science whereby they can be applied multiple times without changing the result beyond the initial application.
|
idem + potence (same + power)
|
Turing completeness |
|
|
Turing machine |
|
|
Vanilla software
|
when not customized from their original form, meaning that they are used without any customizations or updates applied to them |
|
Programming Language
Language |
Appeared in |
Style |
Typing Systme |
Remarks
|
C |
1972 |
Imperative, Procedural |
Static, Weak |
|
|
C++ |
1985 |
Imperative, Object-oriented, Functional, Procedural |
Static |
|
Python |
1990 |
Imperative, Object-oriented, Functional, Procedural, Reflective |
Dynamic |
|
|
Java |
1995 |
Object-oriented, Imperative, Reflective |
Static, Strong |
|
JavaScript |
1995 |
Functional, Imperative |
Dynamic |
|
Ruby |
1995 |
Functional, Imperative, Object-oriented, Reflective |
Dynamic, Strong |
|
|
Go |
2009 |
Imperative, Functional, Object-oriented |
Static, Strong, Inferred |
|
Rust |
2010 |
Functional, Imperative |
Static, Strong, Inferred |
|
Kotlin |
2011 |
Object-oriented, Functional, Imperative |
Static, Strong, Inferred |
|
- Language Server Protocol (LSP)
- A Language Server is meant to provide the language-specific smarts and communicate with development tools over a protocol that enables inter-process communication.
Feature |
Java |
JavScript |
Python |
Rust
|
Type Checking |
Static Type Checking |
Dynamic Type Checking |
Dynamic Type Checking |
Static Type Checking
|
Primitive Types
|
boolean ,
char ,
short , int , long ,
float ,
double
|
|
int ,
float ,
complex ,
str
|
bool , char ,
i8 , i16 , i32 , i64 , isize ,
u8 , u16 , u32 , u64 , usize ,
f32 , f64
|
Variable Default Mutability |
mutable |
mutable(let )/immutable(const ) |
mutable |
immutable
|
Constant
|
static final MAX
|
const max
|
|
const MAX
|
Integer Literals
|
31, -31, 10_000_000_000, 0x33FE (hexadecimal), 0b101010 (binary) |
|
|
|
Floating Point Literals
|
0.5, -0.5, 10f, 89d, 3.1415e0, 1.0e-6d |
|
|
|
Boolean Literals |
|
true , false |
True , False |
|
Character Literals |
|
|
|
|
String Literals |
|
|
|
|
Formatted String Literals
|
N/A
|
`Hi, ${name}`
|
f'Hi, {name}'
|
|
Regex Support |
|
|
|
Arithmetic Operators
|
+ (addition) - (substraction) * (multiplication) / (division) % (modulus)
|
|
+ (addition) - (substraction) * (multiplication) / (division) % (modulus) ** (exponent) // (floor division)
|
+ (addition) - (substraction) * (multiplication) / (division) % (modulus)
|
Destructuring Assignment |
No |
|
Yes |
Yes
|
Variable Arguments
|
Logger.debug(Marker marker, String format, Object... args)
|
foo(a, b, ...args)
|
foo(a, b, *args)
|
|
Multiple Return |
No |
|
Yes |
Yes
|
If Expression
|
condition ? a : b
|
condition ? a : b
|
a if condition else b
|
|
Lamda Expression
|
(a, b) -> (a*a + b*b)
|
(a, b) => (a*a + b*b)
|
lamda a, b: a*a + b*b
|
|x| x * 2
|
Container Types
|
Array , Set , List , Map
|
|
set , list , tuple , dict
|
|
Array Literals |
|
|
|
|
List Literals |
|
|
['dot', 'cat', 'snake'] |
|
Map Literals |
N/A |
|
{'dog': 'bark', 'cat': 'meow', 'snake': 'hiss'} |
|
Set Literals |
N/A |
|
{'dog', 'cat', 'snake'} |
|
Ordered Container Slicing |
|
Array.slice(start[, end])
|
seq[start:end:step] |
|
Java
Python
JavaScript
Scala
Rust
References
Primitive Types
Category |
Type |
Definition |
Size |
Literals |
Remarks
|
Boolean |
bool |
1 Byte |
true, false |
|
Character |
char |
unicode scalar value |
4 Bytes |
'a', 'Z' |
|
Integer |
i8 |
8-bit signed integer type |
1 Byte |
|
[-128, 127]
|
|
i16 |
16-bit signed integer type |
2 Bytes |
|
|
|
i32 |
32-bit signed integer type |
4 Bytes |
|
|
|
i64 |
64-bit signed integer type |
8 Bytes |
|
|
|
isize |
|
|
|
|
|
u8 |
8-bit unsigned integer type |
1 Byte |
|
[0, 255]
|
|
u16 |
16-bit unsigned integer type |
2 Bytes |
|
|
|
u32 |
32-bit unsigned integer type |
4 Bytes |
|
|
|
u64 |
64-bit unsigned integer type |
8 Bytes |
|
|
|
usize |
|
|
|
|
Floating Point |
f32 |
32-bit floating point type |
4 Bytes |
|
|
|
f64 |
64-bit floating point type |
8 Bytes |
|
|
API Documentation
Crate |
Description |
Remarks
|
std |
the foundation of portable Rust software, a set of minimal and battle-tested shared abstractions for the broader Rust ecosystem. |
core types, primitives, standard macros, I/O, multithreading
|
test |
support code for rustc's built in unit-test and micro-benchmarking framework. |
|
rand |
utilities for random number generation. |
|
Cargo CLI
Command |
Description |
Remarks
|
cargo build |
Compile local packages and all of their dependencies. |
|
cargo update |
Update dependencies as recorded in the local lock file(Cargo.lock). |
|
Go
References
command |
description |
remarks
|
go build |
compile packages and dependencies |
|
go install |
compile and install packages and dependencies |
|
go get |
download and install packages and dependencies |
|
Category |
Package |
Description |
Remarks
|
standard |
fmt |
implements formatted I/O with functions analogous to C's printf and scanf. |
|
standard |
http |
provides HTTP client and server implementations. |
|
standard |
path/filepath
|
implements utility routines for manipulating filename paths in a way compatible with the target operating system-defined file paths. |
|
go-resiliency |
retrier
|
implements the "retriable" resiliency pattern for Go |
|
Readings
Fundamental
OOP
Documenting
Profiling
Networking
Frameworks
Libraries
Gorilla WebSocket
Viper
Cobra
- https://github.com/spf13/cobra
- Desc. : both a library for creating powerful modern CLI applications as well as a program to generate applications and command files.
- License : Apache License Version 2.0
Golang logging library
Tools
Gocode
Delve
Commands
command |
description |
remarks
|
dlv attach |
Attach to running process and begin debugging |
|
dlv exec |
Execute a precompiled binary, and begin a debug session |
|
Readings
pprof
C, C++
C#
Ruby
Readings
Metaprogramming
Design Pattern
misc
- SSL CERTIFICATE UPDATES
- to solve errors with SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
Libraries
Rouge
TypeScript
CoffeeScript
ActionScript
Erlang
- http://www.erlang.org/
- Desc. : a programming language used to build massively scalable soft real-time systems with requirements on high availability.
Haskell
Lua
- http://www.lua.org
- Desc. : a powerful, efficient, lightweight, embeddable scripting language
R
Code
- Unicode code point
- "U+" followed by its hexadecimal number.
- e.g. U+0058, U+E0001, U+10FFFD
- HTML numeric character reference
- "&#" + decimal number + ";" or "&#x" + hexadecimal number + ";"
- e.g. ¨, ¨, ♠, ♠
ISO |
Title |
Description |
Remarks
|
ISO 8601 |
Data elements and interchange formats
|
an international standard covering the exchange of date- and time-related data. |
|
Punctuation
- Punctuation(Wikipedia)
- the use of spacing, conventional signs, and certain typographical devices as aids to the understanding and correct reading of written text, whether read silently or aloud
Name |
Symbol |
HTML 4.0 Entity |
Remarks
|
parentheses |
( ) |
|
round brackets, curved brackets, oval brackets
|
square brakets |
[ ] |
|
brakets
|
braces |
{ } |
|
curly brackets, flower brackets
|
guillemets |
« » |
« » |
|
single quotation mark |
‘ ’ |
‘ ’ |
|
double quotation mark |
“ ” |
“ ” |
|
period |
. |
|
full stop, dot, point
|
ellipses |
… |
… |
|
question mark |
? |
|
|
|
exclamation mark |
! |
|
|
comma |
, |
|
|
colon |
: |
|
|
semicolon |
; |
|
|
dash |
– — |
– — |
|
hyphen |
‐ |
|
|
apostrophe |
' |
|
|
slash |
/ |
|
|
Typography
Name |
Symbol |
HTML 4.0 Entity |
Remarks
|
tilde |
~ |
˜ |
|
grave accent |
` |
|
backtick, backquote
|
at sign |
@ |
|
|
number sign |
# |
|
pound sign, hash mark
|
percent |
% |
|
|
caret |
^ |
|
|
circumflex |
ˆ |
ˆ |
|
ampersand |
& |
& |
|
asterisk |
∗ |
∗ |
star
|
underscore |
_ |
|
understroke
|
backslash |
\ |
|
|
vertical bar |
| |
|
pipe, stick, vertical slash, thick colon
|
pilcrow |
¶ |
¶ |
paragraph mark, paragraph sign
|
bullet |
• |
• |
|
section sign |
§ |
§ |
|
prime |
′ |
′ |
minutes, feet
|
double prime |
″ |
″ |
seconds, inches
|
therefore sign |
∴ |
∴ |
|
Unicode
- Unicode (more than 120,000 characters)
- Universal Coded Character Set (
ISO/IEC 10646
)
- positions 0 through 255 of ISO/IEC 10646 and Unicode are the same as in ISO-8859-1, alias ISO Latin 1.
- positions 0 through 127 of ISO/IEC 10646 and Unicode are the same as in ISO/IEC 646.
- the 128 ASCII and 256 ISO-8859-1 (Latin 1) characters are assigned Unicode/UCS code points that are the same as their codes in the earlier standards.
Term |
Description |
Remarks
|
Typography
|
the art and technique of arranging type to make written language legible, readable and appealing when displayed. |
|
Glyph
|
an elemental symbol within an agreed set of symbols, intended to represent a readable character for the purposes of writing |
Typography
|
Grapheme
|
the smallest functional unit of a writing system |
Linguistics
|
Date Time
Timezone
Locale
Currency
Unique Identifier
Scheme |
Literal Length |
Format |
Description |
Remarks
|
UUID |
36 characters (32 hexadecimal digits and 4 hyphens)
|
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
|
GUID
|
Snowflake ID |
64 bit
|
|
41 bits : timestamp (epoch), 10 bits : machine ID, 12 bits : sequence |
Twitter, Discord, Instagram
|
Color Space
Encoding
Encoding |
Efficiency |
Description |
Characters |
Remarks
|
Base64 |
75%
|
Represent binary data in an ASCII string format by translating it into a radix-64 representation.
|
[A-Za-z0-9], +, / |
padding: =
|
URL Encoding |
|
a mechanism for encoding information in a Uniform Resource Identifier (URI)
|
[A-Za-z0-9], -, _, ~, . |
Percent Encoding
|
Online Encoder/Decoder
Site |
Description |
Remarks
|
Hex decoder |
Online hexadecimal to text converter |
|
Codec
Category |
Format Name |
Full Name |
MIME Type |
File Extensions |
Appeared in |
Developed by |
Remarks
|
Image |
PNG |
Portable Network Graphics
|
image/png |
.png |
1996 |
|
|
|
JPEG |
Joint Photographic Expert Group
|
image/jpeg |
.jpg , .jpeg |
1992 |
|
|
|
GIF |
Graphics Interchange Format
|
image/gif |
.gif |
1987 |
|
|
|
SVG |
Scalable Vector Graphics
|
image/svg+xml |
.svg |
2001 |
W3C |
Vector graphics
|
|
WebP |
Web Picture
|
image/webp |
.webp |
2010 |
Google |
|
Video |
[1] |
|
video/webm , audio/webm |
.webm |
2010 |
Google |
|
JPEG
PNG
GIF
BMP
FLV and F4V
Font
- Serif
- a small line or stroke regularly attached to the end of a larger stroke in a letter or symbol within a particular font or family of fonts.
- Sans-serif
- French word sans, meaning "without" ...
Category |
Font |
Example |
Foundary |
Released At |
Remarks
|
Serif |
Times New Roman
|
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 || || 1932 ||
|
|
Georgia
|
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 || Microsoft || 1996 ||
|
|
Garamond
|
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 || || ||
|
|
Baskerville
|
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 || || ||
|
Sans Serif |
Arial
|
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 || || 1982 ||
|
|
Helvetica
|
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 || || 1957 ||
|
Misc
- The Swift Codes : Swift Codes or BIC Codes for all the Banks in the world.
- ISO 9362
- Defines a standard format of Business Identifier Codes (also known as SWIFT-BIC, BIC, SWIFT ID or SWIFT code) approved by the ISO.
Control Character
Name |
Abbreviation |
Hex Value |
Escape Sequence |
Description |
Remarks
|
Line Feed |
LF |
0x0A |
\n
|
moves the print head down one line, or to the left edge and down |
New Line
|
Carriage Return |
CR |
0x0D |
\r
|
moves the printing position to the start of the line, allowing overprinting |
|
Form Feed |
FF |
0x0C |
\f
|
o cause a printer to eject paper to the top of the next page, or a video terminal to clear the screen |
Page Break
|
OS |
Escape Sequence |
Abbreviation |
Remarks
|
UNIX, Linux, macOS |
\n |
LF |
|
Windows |
\r\n |
CR LF |
|
classic Mac OS |
\r |
CR |
|
Escape Sequence
- Escape Sequence
- a combination of characters that has a meaning other than the literal characters contained therein
- Escape Character
- a character that invokes an alternative interpretation on the following characters in a character sequence
Language |
Hex Escape |
Unicode Escape |
Octal Escape |
Special Sequences |
Remarks
|
Java
|
|
\uHHHH |
\O \OO \OOO
|
\\ \' \" \b \f \n \r \t \v |
|
JavaScript
|
\xHH |
\uHHHH |
\O \OO \OOO
|
\\ \' \" \b \f \n \r \t \v |
|
Solidity
|
\xHH |
\uHHHH |
|
\\ \' \" \b \f \n \r \t \v |
|
Data Format
JSON
JSON5
- a superset of JSON that aims to alleviate some of the limitations of JSON by expanding its syntax to include some productions from ECMAScript 5.1
- JSON5 : JSON for Humans
JSON Path
JSON Pointer
JSON-LD
JSON Schema
- Built-in Types and Facets
Type |
Description |
Facets |
Remarks
|
number |
|
enum , multipleOf , maximum , exclusiveMaximum , minimum , exclusiveMinimum |
|
string |
a sequence of zero or more Unicode characters, wrapped in double quotes, using backslash escapes
|
enum , maxLength , minLength , pattern |
|
array |
an ordered collection of values
|
maxItems , minItems , uniqueItems , maxContains , minContains |
[ ]
|
Name |
Type |
Format |
Description |
Remarks
|
Datetime |
string |
date-time |
date time
|
date-time in RFC-3339
|
Date |
string |
date |
yyyy-MM-dd
|
full-date in RFC-3339
|
Time |
string |
time |
HH:mm:ss[.S](Z|(+|-)m′m′:s′s′)
|
full-time in RFC-3339
|
Duration |
string |
duration |
|
ISO-8601
|
eMail Address |
string |
email |
|
RFC-5321
|
IDNA eMail Address |
string |
idn-email |
|
RFC-6531
|
Hostname |
string |
hostname |
|
RFC-1123
|
IDNA Hostname |
string |
idn-hostname |
|
RFC-5890
|
IP Version 4 Address |
string |
ipv4 |
|
RFC-2673
|
IP Version 6 Address |
string |
ipv6 |
|
RFC-4291
|
URI |
string |
uri |
|
RFC-3986
|
URI Reference |
string |
uri-reference |
|
RFC-3986
|
IRI |
string |
iri |
|
RFC-3987
|
IRI Reference |
string |
iri-reference |
|
RFC-3987
|
UUID |
string |
uuid |
|
RFC-4122
|
URI Template |
string |
uri-template |
|
RFC-6570
|
Regular Expression |
string |
regex |
|
JSON Schema/Regular Expression
|
JMESPath
References
Readings
YAML
References
Readings
Tips and Tricks
Abbreviated form of dictionaries and lists
martin: {name: Martin D'vloper, job: Developer, skill: Elite}
fruits: ['Apple', 'Orange', 'Strawberry', 'Mango']
Protocol Buffers
HOCON
TOML
HCL
Markup
- MediaWiki
- Markdown
- MultiMarkdown
- a tool to help turn minimally marked-up plain text into well formatted documents, including HTML, PDF (by way of LaTeX), OPML, or OpenDocument (specifically, Flat OpenDocument or ‘.fodt’, which can in turn be converted into RTF, Microsoft Word, or virtually any other word-processing format).
- AsciiDoc
- a text document format for writing notes, documentation, articles, books, ebooks, slideshows, web pages, man pages and blogs.
- CSV Converter
- allows you to enter a table in CSV-format and convert it to HTML or the WikiMedia format for tables.
MediaWiki Markup
- Diagrams
- Dia, Ditta, GraphViz, Mermaid, PlantUML
- Built-in classes for table
Magic Words
Behavior Switches |
Description |
Remarks
|
__TOC__ |
Places a table of contents at the word's current position |
|
Variable |
Description |
Remarks
|
{{CURRENTYEAR}} |
Current Year |
|
Function |
Description |
Remarks
|
{{formatnum:unformatted number}} |
Takes an unformatted number and outputs it in the localized digit script and formatted with decimal and decimal group separators, according to the wiki's default locale. |
|
Extensions
Extension |
Description |
Remarks
|
Extension:SyntaxHighlight
|
Provides rich formatting of source code using the <syntaxhighlight> tag. |
Powered by the Pygments library
|
Extension:Header Tabs
|
Transforms top-level MediaWiki headers into tabs using the jQuery UI JavaScript library. |
|
Extension:Math
|
Provides support for rendering mathematical formulae. |
|
Extension:SyntaxHighlight
Parameter |
Description |
Remark
|
lang |
defines what lexer should be used |
supported languages
|
line |
enables line numbers |
|
start |
defines the first line number of the code block |
|
highlight |
specifies one or more lines that should be marked |
|
inline |
indicates that the source code should be inline as part of a paragraph |
|
class |
|
|
style |
allows CSS attributes to be included directly |
|
Real-world Examples
Markdown
|  |
| ------ |
GitHub Flavored Markdown
kramdown
Readings
AsciiDoc
a lightweight and semantic markup language primarily designed for writing technical documentation.
reStructuredText
Textile
LaTeX
Element |
Description |
Syntax/Sample |
Remarks
|
environments |
|
\begin{environmentname}
text to be influenced
\end{environmentname}
|
document, math
|
commands |
|
\commandname[option1,option2,...]{argument1}{argument2}...
|
|
Commands
Category |
Command |
Description |
Remarks
|
Whitespaces |
\quad |
space equal to the current font size (= 18 mu) |
|
|
\, |
3/18 of \quad (= 3 mu) |
|
|
\: |
4/18 of \quad (= 4 mu) |
|
|
\; |
5/18 of \quad (= 5 mu) |
|
|
\! |
-3/18 of \quad (= -3 mu) |
|
|
\qquad |
twice of \quad (= 36 mu) |
|
|
\\ |
new line |
|
|
\\~\\ |
double new line |
|
Text |
\text{...} |
|
|
|
\textrm{...} |
roman font family |
|
|
\textsf{...} |
sans serif font family |
|
|
\texttt{...} |
teletypefont family |
fixed-width or monospace font
|
Letters |
\Alpha , \alpha |
Α, α |
Greek letter alpha
|
|
\Beta , \beta |
Β, β |
Greek letter beta
|
Operators |
\equiv |
≡ |
equivalent to
|
Sample LaTex Codes
Code |
Display |
Remarks
|
L_{s}(T) \equiv (T_{n}, T_{p}, T_{t}, T_{v}, p, \beta, (), ())
|
|
three line equivalent operator
|
p \equiv \begin{cases}T_{i} & \text{ } T_{t} = 0 \\ T_{d} & \text{ otherwise} \end{cases}
|
|
cases (\begin{cases} ... \end{cases})
|
(T_{w}, T_{r}, T_{s}) \equiv \texttt{ECDSASIGN}(h(T), p_{r})
|
|
teletype text (\texttt )
|
y^2 = x^3 + ax + b \; (\texttt{mod} \; p)
|
|
space (\;)
|
Simple equation with fraction
\begin{equation}
\\
difficulty = \frac{2^{256}}{target}
\\~\\
\frac{1}{difficulty} = \frac{target}{2^{256}} = mining \ probability
\\
\end{equation}
Multimedia
Name |
Width |
Height |
Aspect Ratio |
Remarks
|
VGA |
640 |
480 |
4:3 |
Video Graphics Array
|
SVGA |
800 |
600 |
4:3 |
Super VGA
|
HD |
1280 |
720 |
16:9 |
High-Definition
|
FHD |
1920 |
1080 |
16:9 |
Full HD
|
QHD |
2560 |
1440 |
16:9 |
Quad HD (22 x HD)
|
4K UHD |
3840 |
2160 |
16:9 |
Ultra HD (32 x HD, 22 x FHD), 4K
|
8K UHD |
7680 |
4320 |
16:9 |
8K
|
Video
Disk Image
Format |
Extension |
Description |
Supported By |
Remarsk
|
ISO |
.iso, udf
|
an archive file that contains everything that would be written to an optical disc, sector by sector, including the optical disc file system. |
|
|
Media Descriptor File |
.mdf, .mds
|
a proprietary disc image file format developed for Alcohol 120% |
Daemon Tools, CDemu, MagicISO, PowerDVD, WinCDEmu |
support Mixed Mode CD
|
IMG |
.img
|
store raw disk images of floppy disks, hard drives, and optical discs or a vector image. |
|
|
CUE Sheet |
.cue
|
a metadata file which describes how the tracks of a CD or DVD[citation needed] are laid out. |
|
support Mixed Mode CD
|
CloneCD Control File |
.ccd
|
a text descriptor with the extension .ccd used by CloneCD to mark the properties of a CD/DVD image. |
|
support Mixed Mode CD
|
Program |
Can Burn |
Can Mount |
Input Format |
Output Format |
OS
|
CDBurnerXP |
Yes |
No |
|
ISO, MDF |
Windows
|
ImgBurn |
Yes |
No |
|
ISO, IMG, CUE |
Windows
|
Virtual CloneDrive |
No |
Yes |
ISO, BIN, IMG, UDF, DVD, CCD |
|
Windows
|
WinCDEmu |
No |
Yes |
ISO, BIN, IMG, MDF, CCD, NRG |
|
Windows
|
Networking
Procotol |
Full Name |
Description |
Layer |
Remarks
|
ARP |
Address Resolution Protocol
|
a communication protocol used for discovering the link layer address, such as a MAC address, associated with a given internet layer address, typically an IPv4 address.
|
Link |
IPv4 over IEEE 802.3 and IEEE 802.11
|
ICMP |
Internet Control Message Protocol
|
used by network devices, including routers, to send error messages and operational information indicating, for example, that a requested service is not available or that a host or router could not be reached.
|
Internet |
|
BGP |
Border Gateway Protocol
|
a standardized exterior gateway protocol designed to exchange routing and reachability information among autonomous systems (AS) on the Internet
|
Application |
|
SNMP |
Simple Network Management Protocol
|
an Internet Standard protocol for collecting and organizing information about managed devices on IP networks and for modifying that information to change device behavior. |
Application |
|
MQTT |
Message Queuing Telemetry Transport
|
an ISO standard publish-subscribe-based messaging protocol. |
Application |
ISO/IEC PRF 20922
|
Name Pattern |
Description |
Remarks
|
eno1 |
On-board device with Firmware/BIOS provided index number |
|
ens1 |
Off-board device with Firmware/BIOS provided PCI Express hotplug slot index number |
|
enp2s0 |
Device with physical/geographical location of the connector of the hardware |
|
enx78e7d1ea46da |
Device with the interfaces's MAC address |
|
eth0 |
Classic, unpredictable kernel-native ethX naming |
|
Device |
Description |
Remarks
|
Router
|
a networking device that forwards data packets between computer networks. |
|
TCP/IP
Fundamentals
- Classless Inter-Domain Routing(CIDR)
- a method for allocating IP addresses and IP routing
- IP address = most significant bits + least significant set
- most significant bits : the network prefix, a whole network or subnet identifier
- least significant set : the host identifier
classful name |
IP address range |
# of addresses |
subnet mask |
host id size |
mask bits |
RFC1918 name
|
single class A network |
10.0.0.0 – 10.255.255.255 |
16,777,216 |
255.0.0.0 |
24 bits |
8 bits |
24-bit block
|
16 contiguous class B networks |
172.16.0.0 – 172.31.255.255 |
1,048,576 |
255.240.0.0 |
20 bits |
12 bits |
20-bit block
|
256 contiguous class C networks |
192.168.0.0 – 192.168.255.255 |
65,536 |
255.255.0.0 |
16 bits |
16 bits |
|
- Priviliged ports
- The TCP/IP port numbers below 1024 are special in that normal users are not allowed to run servers on them
- Ephemeral port
- a short-lived transport protocol port for Internet Protocol (IP) communications.
- IANA : 49152 to 65535
- Linux : 32768 to 61000 (/proc/sys/net/ipv4/ip_local_port_range)
TCP Socket Options
Option |
Description |
Remarks
|
TCP_USER_TIMEOUT
|
When the value is greater than 0, it specifies the maximum amount of time in milliseconds that transmitted data may remain unacknowledged before TCP will forcibly close the corresponding connection and return ETIMEDOUT to the application. If the option value is specified as 0, TCP will use the system default.
|
|
TCP States
CLOSED
| |
| |
LISTEN
| |
SYN RECEIVED ------+ +-------- SYN SENT
| |
+--------- ESTABLISHED ---------+
| |
+--------------+ +-------------+
| |
| |
FIN WAIT 1 ------ CLOSING CLOSE WAIT
| | |
| | |
FIN WAIT 2 ----- TIME WAIT LAST ACT
| |
| |
CLOSED ----------+
Readings
DNS
Type |
Description |
Remarks
|
A record |
maps a name to one or more IP addresses |
|
CNAME record |
maps a name to another name |
|
ALIAS record |
maps a name to another name, but can coexist with other records on that name |
|
URL record |
redirects the name to the target name using the HTTP 301 status code |
|
LAN
HTTP
Status Codes
Code |
Description |
Remarks
|
400 Bad Request
|
The server cannot or will not process the request due to an apparent client error |
|
401 Unauthorized
|
Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.
|
Unauthenticated
|
403 Forbidden
|
The request was valid, but the server is refusing action.
|
Unauthorized
|
404 Not Found
|
The requested resource could not be found but may be available in the future. |
|
407 Proxy Authentication Required
|
The client must first authenticate itself with the proxy. |
|
- Header fields which have general applicability for both request and response messages, but which do not apply to the entity being transferred.
Header |
Description |
Remarks
|
Connection: keep-alive|close
|
Controls whether or not the network connection stays open after the current transaction finishes. |
|
Header |
Description |
Remarks
|
Authorization: type credentials
|
Contains the credentials to authenticate a user agent with a server, usually after the server has responded with a 401 Unauthorized status and the WWW-Authenticate header. |
|
Proxy-Authorization: type credentials
|
Contains the credentials to authenticate a user agent to a proxy server, usually after the server has responded with a 407 Proxy Authentication Required status and the Proxy-Authenticate header. |
|
Origin: scheme://hostname:port
|
Initiates a request for cross-origin resource sharing (asks server for Access-Control-* response fields). |
CORS
|
Host: host:port
|
The domain name of the server (for virtual hosting), and (optionally) the TCP port number on which the server is listening. |
|
Forwarded: by=identifier;for=identifier;host=host;proto=http|https
|
Contains information from the client-facing side of proxy servers that is altered or lost when a proxy is involved in the path of the request.
|
X-Forwarded-For, X-Forwarded-Host
|
X-Forwarded-For: client, proxy1, proxy2
|
A de-facto standard header for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or a load balancer. |
XFF
|
X-Forwarded-Host: host
|
A de-facto standard header for identifying the original host requested by the client in the Host HTTP request header. |
XFH
|
X-Forwarded-Proto: protocol
|
a de-facto standard header for identifying the protocol (HTTP or HTTPS) that a client used to connect to your proxy or load balancer. |
XFP
|
X-Request-ID |
Correlates HTTP requests between a client and server. |
|
Mechanisms
Mechanism |
Description |
Related |
Remark
|
Authentication
|
HTTP provides a general framework for access control and authentication. |
Authorization, Proxy-Authorization |
|
Cross-Origin Resource Sharing (CORS)
|
a mechanism that uses additional HTTP headers to tell browsers to give a web application running at one origin, access to selected resources from a different origin. |
Origin, Access-Control-Allow-Origin |
|
Content Security Policy (CSP)
|
an added layer of security that helps to detect and mitigate certain types of attacks, including Cross Site Scripting (XSS) and data injection attacks.
|
Content-Security-Policy |
|
- MIME (Multipurpose Internet Mail Extensions)
- an Internet standard that extends the format of email messages to support text in character sets other than ASCII, as well as attachments of audio, video, images, and application programs.
HTTP/2
WebSocket
- WebSocket (on Wikipedia)
- a computer communications protocol, providing full-duplex communication channels over a single TCP connection
SMTP
- DomainKeys Identified Mail(DKIM)
- an email authentication method designed to detect forged sender addresses in emails (email spoofing), a technique often used in phishing and email spam.
- allows the receiver to check that an email claimed to have come from a specific domain was indeed authorized by the owner of that domain.
SNMP
- Simple Network Management Protocol: an Internet Standard protocol for collecting and organizing information about managed devices on IP networks and for modifying that information to change device behavior.
MQTT
- Message Queuing Telemetry Transport : an ISO standard (ISO/IEC PRF 20922) publish-subscribe-based messaging protocol.
RTSP
- Real Time Streaming Protocol
- RTSP (Wikipedia)
- RTSP (MultimediaWiki)
RTMP
JSON-RPC
gRPC
- an open source remote procedure call (RPC) system initially developed at Google.
- https://www.grpc.io/
Security
Glossary
Category |
Term |
Description |
Remarks
|
Attack |
Vulnerability
|
a weakness which can be exploited by a Threat Actor, such as an attacker, to perform unauthorised actions within a computer system
|
at Longman
|
|
Eavesdropping |
secretly or steathily listening to the private conversation of others without their consent |
at Longman
|
|
Session hijacking
|
the exploitation of a valid computer session—sometimes also called a session key—to gain unauthorized access to information or services in a computer system |
|
|
Man-in-the-middle attack
|
an attack where the attacker secretly relays and possibly alters the communication between two parties who believe they are directly communicating with each other |
|
|
Rainbow table
|
a precomputed table for reversing cryptographic hash functions, usually for cracking password hashes. |
|
|
Phishing
|
the fraudulent attempt to obtain sensitive information such as usernames, passwords and credit card details by disguising oneself as a trustworthy entity in an electronic communication. |
fake website, social engineering
|
|
Scam
|
an attempt to defraud a person or group after first gaining their confidence, used in the classical sense of trust. |
|
|
Sybil Attack
|
the attacker subverts the reputation system of a network service by creating a large number of pseudonymous identities and uses them to gain a disproportionately large influence. |
|
|
Attack Vector
|
a specific path, method, or scenario that can be exploited to break into an IT system, thus compromising its security.
|
often, a multi-step process
|
Defense |
Cipher
|
an algorithm for performing encryption or decryption |
|
|
Key stretching
|
techniques used to make a possibly weak key, typically a password or passphrase, more secure against a brute-force attack by increasing the resources (time and possibly space) it takes to test each possible key. |
PBKDF2, bcrypt, scrypt, Argon2
|
|
Credential
|
an attestation of qualification, competence, or authority issued to an individual by a third party with a relevant or de facto authority or assumed competence to do so.
|
diplomas, academic degrees, certifications, identification documents, badges, passwords, keys, ...
|
|
MAC(Message Authentication Code)
|
a short piece of information used to authenticate a message—in other words, to confirm that the message came from the stated sender (its authenticity) and has not been changed. |
MACs differ from digital signatures as MAC values are both generated and verified using the same secret key.
|
|
Tamperproofing
|
a methodology used to hinder, deter or detect unauthorised access to a device or circumvention of a security system. |
misnomer
|
Cryptography |
Homomorphic Encryption
|
a form of encryption that permits users to perform computations on its encrypted data without first decrypting it. |
|
|
White-Box Cryptography
|
combines methods of encryption and obfuscation to embed secret keys within application code. |
|
|
Multi-Party Computation (MPC)
|
a subfield of cryptography with the goal of creating methods for parties to jointly compute a function over their inputs while keeping those inputs private. |
|
Concepts
A digital signature is a mathematical scheme for verifying the authenticity of digital messages or documents. A valid digital signature, where the prerequisites are satisfied, gives a recipient very strong reason to believe that the message was created by a known sender (authentication), and that the message was not altered in transit (integrity)
A key generation algorithm that selects a private key uniformly at random from a set of possible private keys. The algorithm outputs the private key and a corresponding public key.
A signing algorithm that, given a message and a private key, produces a signature.
A signature verifying algorithm that, given the message, public key and signature, either accepts or rejects the message's claim to authenticity.
The DSA algorithm involves four operations: key generation (which creates the key pair), key distribution, signing and signature verification.
The Elliptic Curve Digital Signature Algorithm (ECDSA) offers a variant of the Digital Signature Algorithm (DSA) which uses elliptic curve cryptography.
A public key certificate, also known as a digital certificate or identity certificate, is an electronic document used to prove the ownership of a public key.
A public key infrastructure (PKI) is a set of roles, policies, hardware, software and procedures needed to create, manage, distribute, use, store and revoke digital certificates and manage public-key encryption.
Standards
standard |
description |
remarks
|
Rainbow Series
|
a series of computer security standards and guidelines published by the United States government in the 1980s and 1990s |
|
Trusted Computer System Evaluation Criteria (TCSEC)
|
a United States Government Department of Defense (DoD) standard that sets basic requirements for assessing the effectiveness of computer security controls built into a computer system |
Orange Book
|
Common Criteria(CC)
|
an international standard (ISO/IEC 15408) for computer security certification
|
Common Criteria for Information Technology Security Evaluation
|
FIPS 140-2 |
Security Requirements for Cryptographic Modules |
|
X.500 |
a series of computer networking standards covering electronic directory services |
|
X.509 |
a standard that defines the format of public key certificates |
|
Standard Algorithm Names
Cipher Algorithm |
Description |
Spec |
Remark
|
AES |
a 128-bit block cipher supporting keys of 128, 192, and 256 bits.
|
FIPS 197 |
AES_128, AES_192, AES_256
|
DES |
a symmetric-key algorithm for the encryption of digital data.
|
FIPS PUB 46-3 |
|
Blowfish |
a symmetric-key block cipher, designed in 1993 by Bruce Schneier |
|
|
- Cipher Algorithm Paddings
- Key Pair Generator Algorithm
Algorithm |
Description |
Remarks
|
DiffieHellman
|
Generates keypairs for the Diffie-Hellman KeyAgreement algorithm. |
|
DSA
|
Generates keypairs for the Digital Signature Algorithm. |
|
RSA
|
Generates keypairs for the RSA algorithm (Signature/Cipher). |
|
EC
|
Generates keypairs for the Elliptic Curve algorithm. |
|
- Message Digest Algorithms
Algorithms |
Description |
Spec |
Remarks
|
NONEwithRSA |
Does not use a digesting algorithm before performing the RSA operation |
PKCS #1 |
|
MD2withRSA |
Uses the MD2 digest algorithm and RSA to create and verify RSA digital signatures |
PKCS #1 |
|
MD5withRSA |
Uses the MD5 digest algorithm and RSA to create and verify RSA digital signatures |
PKCS #1 |
|
Fundamentals
Hashing
- Salt
- Random data that is used as an additional input to a one-way function that hashes data, a password or passphrase.
- How to store salt?
Access Control
Misc
- CAPTCHA (Completely Automated Public Turing Test to tell Computers and Humans Apart)
- a type of challenge–response test used in computing to determine whether or not the user is human.
Cryptography
Type |
Algorithm |
Description |
Published In |
Designers |
Remarks
|
Symmetric Key Cryptography |
DES
|
a symmetric-key algorithm for the encryption of digital data |
1975 |
IBM |
|
|
Triple DES
|
a symmetric-key block cipher, which applies the DES cipher algorithm three times to each data block. |
1995 |
|
|
|
Blowfish
|
a symmetric-key block cipher |
1993 |
Bruce Schneier |
|
|
AES
|
a specification for the encryption of electronic data established by the U.S. NIST in 2001
|
1998 |
|
|
Public Key Cryptogrpahy |
Diffie–Hellman Key Exchange
|
a method of securely exchanging cryptographic keys over a public channel and was one of the first public-key protocols as conceived by Ralph Merkle and named after Whitfield Diffie and Martin Hellman.
|
1976 |
Whitfield Diffie, Martin Hellman |
|
|
DSA
|
a Federal Information Processing Standard for digital signatures, based on the mathematical concept of modular exponentiation and the discrete logarithm problem.
|
1991 |
|
Key Generation, Signing, Verifying
|
|
RSA
|
a public-key cryptosystem that is widely used for secure data transmission.
|
1977 |
Ron Rivest, Adi Shamir, Leonard Adleman |
Key Generation, Encryption, Decryption, Signing Message
|
|
ECDSA (Elliptic Curve DSA)
|
offers a variant of the DSA which uses elliptic curve cryptography. |
|
|
|
|
EdDSA (Edwards-curve EdDSA)
|
a digital signature scheme using a variant of Schnorr signature based on twisted Edwards curves
|
2011 |
|
|
Fundamentals
- Cryptography
- about constructing and analyzing protocols that prevent third parties or the public from reading private messages
- Cryptosystem
- a suite of cryptographic algorithms needed to implement a particular security service, most commonly for achieving confidentiality (encryption)
- key generation algorithm + encryption algorithm + decryption algorithm
- Cipher(Cypher)
- an algorithm for performing encryption or decryption
- Block cipher mode of operation
- ECB, CBC, PCBC, CFB, OFB, ...
PKCS
- Public Key Cryptography Standards : a group of public-key cryptography standards devised and published by RSA Security Inc
- PKCS (on Wikipedia)
Standard |
Name |
Description |
Remarks
|
PKCS #3 |
Diffie–Hellman Key Agreement Standard
|
A cryptographic protocol that allows two parties that have no prior knowledge of each other to jointly establish a shared secret key over an insecure communications channel. |
|
PKCS #5 |
Password-based Encryption Standard |
|
RFC 8018, PBKDF2
|
PKCS #6 |
Extended-Certificate Syntax Standard |
defines extensions to the old v1 X.509 certificate specification. |
Obsoleted
|
PKCS #8 |
Private-Key Information Syntax Standard |
a standard syntax for storing private key information. |
|
PKCS #11 |
Cryptographic Token Interface
|
defining a generic interface to cryptographic tokens |
Cryptoki
|
PKCS #12 |
Personal Information Exchange Syntax Standard
|
defines an archive file format for storing many cryptography objects as a single file |
|
PKCS#11
SHA
Algorithm |
Output Size (bits) |
Born In |
Remarks
|
MD5 |
128 |
1992 |
|
SHA-0 |
160 |
1993 |
|
SHA-1 |
160 |
1995 |
|
SHA-256 |
256 |
2001 |
SHA-2
|
SHA-512 |
256 |
2001 |
SHA-2
|
SHA3-256 |
256 |
2015 |
|
SHA3-512 |
512 |
2015 |
|
- Announcing the first SHA1 collision (February 23, 2017)
- Today, more than 20 years after of SHA-1 was first introduced, we are announcing the first practical technique for generating a collision.
Implementations
Category |
Implementation |
Remarks
|
Java
|
java.security.MessageDigest class
|
JDK
|
|
org.apache.commons.codec.digest.Sha2Crypt class
|
Apache Commons static String sha256Crypt(byte[] keyBytes, String salt) static String sha512Crypt(byte[] keyBytes, String salt)
|
Python 2.x |
hashlib module
|
md5(), sha1(), sha224(), sha256(), sha384(), sha512()
|
Python 3.x |
hashlib module
|
md5(), sha1(), sha224(), sha256(), sha384(), sha512(), ...
|
Node.js
|
crypto.Hash class
|
sha256, sha512
|
MySQL
|
SHA1() function
SHA2() function
|
|
Code Snippet
>>> # Hash 'Hello, World!' with SHA-256 into hex representation
>>> import hashlib
>>> s = hashlib.sha256()
>>> s.update("Hello, World!")
>>> s.hexdigest()
> // Hash 'Hello, World!' with SHA-256 into hex representation
> crypto.createHash('sha256').update('Hello, World!').digest('hex');
PEM
Digital Signature
Element |
Description |
Remarks
|
Key Generation Algorithm |
generates a private key and a corresponding public key |
|
Signing Algorithm |
given a message and a private key, produces a signature |
|
Signature Verifying Algorithm |
given the message, public key and signature, either accepts or rejects the message's claim to authenticity |
|
Scheme |
Description |
Remarks
|
RSA
|
one of the first public-key cryptosystems based on the practical difficulty of the factorization of the product of two large prime numbers.
|
factoring problem
|
RSA-PSS
|
a cryptographic signature scheme designed by Mihir Bellare and Phillip Rogaway
|
PKCS#1 v2.1
|
DSA
|
a Federal Information Processing Standard for digital signatures, based on the mathematical concept of modular exponentiation and the discrete logarithm problem |
|
ECDSA
|
a variant of the DSA which uses elliptic curve cryptography |
|
ECDSA
Step |
Equation |
Remarks
|
calculate message hash  |
 |
|
calculate  |
 |
|
select secure random  |
 |
cryptographically secure random
|
calculate the curve point  |
 |
public key
|
calculate  |
 |
|
calculate  |
 |
|
Symbol |
Concept |
Remarks
|
 |
elliptic curve base point |
|
 |
integer order of  |
prime number
|
 |
private key |
randomly selected
|
 |
public key |
calculated by elliptic curve
|
 |
message |
|
 |
signature |
|
Digital Certificate
X.509 Certificate
- X.509
- an ITU(International Telecommunication Union) standard defining the format of public key certificates
Certificate ::= SEQUENCE {
tbsCertificate TBSCertificate,
signatureAlgorithm AlgorithmIdentifier,
signatureValue BIT STRING }
TBSCertificate ::= SEQUENCE {
version [0] EXPLICIT Version DEFAULT v1,
serialNumber CertificateSerialNumber,
signature AlgorithmIdentifier,
issuer Name,
validity Validity,
subject Name,
subjectPublicKeyInfo SubjectPublicKeyInfo,
issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
-- If present, version MUST be v2 or v3
subjectUniqueID [2] IMPLICIT UniqueIdentifier OPTIONAL,
-- If present, version MUST be v2 or v3
extensions [3] EXPLICIT Extensions OPTIONAL
-- If present, version MUST be v3
}
Version ::= INTEGER { v1(0), v2(1), v3(2) }
CertificateSerialNumber ::= INTEGER
Validity ::= SEQUENCE {
notBefore Time,
notAfter Time }
Time ::= CHOICE {
utcTime UTCTime,
generalTime GeneralizedTime }
UniqueIdentifier ::= BIT STRING
SubjectPublicKeyInfo ::= SEQUENCE {
algorithm AlgorithmIdentifier,
subjectPublicKey BIT STRING }
Extensions ::= SEQUENCE SIZE (1..MAX) OF Extension
Extension ::= SEQUENCE {
extnID OBJECT IDENTIFIER,
critical BOOLEAN DEFAULT FALSE,
extnValue OCTET STRING
-- contains the DER encoding of an ASN.1 value
-- corresponding to the extension type identified
-- by extnID
}
Certificate
Version
Serial Number
Signature Algorithm
Issuer
Validity
Not Before
Not After
Subject
Subject Public Key Info
Public Key Algorithm
Public Key
Issuer Unique Identifier
Subject Unique Identifier
Signature Algorithm
Signature
$ openssl x509 -in ~/Library/"Group Containers"/group.com.docker/pki/front-proxy-client.crt -inform PEM -text -noout
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 1198170262028128809 (0x10a0c181509f9229)
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=kubernetes
Validity
Not Before: Jul 16 00:14:06 2020 GMT
Not After : Jul 16 00:14:07 2021 GMT
Subject: CN=front-proxy-client
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
00:c5:a7:3e:ab:aa:cf:a0:77:64:c5:a1:f2:1f:9e:
d6:df:0e:53:55:ac:b5:6b:62:a5:46:28:70:92:d5:
b7:c5:3c:b2:4e:74:6b:15:bb:aa:26:f6:00:e3:bf:
be:da:de:62:61:04:4c:d1:10:d9:a4:23:34:c4:c1:
e5:95:ff:de:8e:24:35:7c:9d:f1:2b:bc:c5:3b:f6:
23:f8:88:b3:f4:23:d2:96:1e:d6:84:8c:01:7b:ab:
2f:a5:90:46:83:21:29:dd:82:b6:39:ac:a9:83:ce:
08:91:cd:8a:b5:80:7b:c1:1c:c0:6c:63:75:57:51:
19:24:ba:4a:7b:d1:1e:01:93:4f:67:f9:91:5c:34:
6e:40:7f:a4:56:a3:f2:63:06:76:0b:a0:72:8e:d0:
ef:ed:54:dc:ed:a6:31:00:09:3d:8b:6f:b9:0c:e2:
14:d5:9b:e5:3a:d0:a1:64:c9:28:87:04:c3:a3:d7:
b6:bf:0f:06:c1:ac:06:ca:6f:bf:97:5b:13:ea:37:
7e:09:e5:b8:00:75:2a:dc:cf:53:d4:6d:da:a3:93:
82:f8:3c:85:62:ee:4c:a4:e6:95:40:bc:b2:0b:26:
40:60:d4:2e:29:57:28:8c:22:62:ff:e2:46:7e:34:
34:80:9a:47:11:f2:91:e5:16:f4:9c:d2:db:c2:fc:
d9:87
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Key Usage: critical
Digital Signature, Key Encipherment
X509v3 Extended Key Usage:
TLS Web Client Authentication
Signature Algorithm: sha256WithRSAEncryption
91:76:cd:17:27:db:34:1c:5b:8b:cd:b8:d3:29:05:19:4d:aa:
58:9c:eb:8a:fb:d3:3a:63:18:39:e5:5c:9e:5e:fc:f5:4c:fc:
c8:5a:b0:ce:cd:87:cc:9c:98:7a:45:8c:35:9d:a8:4b:2f:32:
19:95:01:37:7b:fb:9e:b4:7c:37:0c:6f:07:46:18:ba:44:b5:
59:03:8d:4b:f1:b6:72:5c:79:a2:df:ad:59:c1:31:f2:29:84:
26:95:b8:69:ac:b7:ee:19:fd:13:41:74:f0:9d:99:50:d6:4c:
8a:05:93:b3:a9:19:db:c0:a0:b2:ca:17:15:1f:10:00:e1:bf:
5b:f9:a0:76:e1:8d:df:da:60:72:87:1c:d0:c9:28:6f:65:41:
4f:f6:9b:2a:7c:ab:64:fc:f4:1a:64:a6:43:3f:0b:30:a9:53:
0e:a1:61:df:aa:ce:17:cc:7f:cf:07:c8:31:c7:a0:c7:b6:21:
e0:d6:66:a0:0d:20:ee:d6:14:34:38:75:2f:6d:ae:3b:5d:fe:
ea:16:d8:a9:01:59:9e:1c:31:04:72:03:26:98:1f:ef:f4:60:
8c:ec:a9:c5:a3:41:13:0e:38:17:fa:7f:8d:36:fe:21:ca:41:
e7:11:48:27:11:48:79:7d:af:ef:32:97:7b:2d:dd:b5:1d:cb:
55:72:f7:df
Extension |
Description |
Remarks
|
.pem |
(Privacy-enhanced Electronic Mail) Base64 encoded DER certificate, enclosed between "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" |
|
.cer, .crt, .der |
usually in binary DER form, but Base64-encoded certificates are common too |
|
.p12 |
PKCS#12, may contain certificate(s) (public) and private keys (password protected) |
|
.pfx |
PFX, predecessor of PKCS#12 |
|
PKI
Concept |
Description |
Remarks
|
Authority Key Identifier
|
The authority key identifier extension provides a means of identifying the public key corresponding to the private key used to sign a certificate
|
|
Issuer
|
The issuer field identifies the entity that has signed and issued the certificate
|
|
HSM
Key Store
OAuth
HTTP Authentication
- HTTP Authentication Schemes
Name |
Full Name |
Description |
Remarks
|
Basic |
Basic HTTP Authentication
|
the client needs to authenticate itself with a user-id and a password for each protection space ("realm"). |
|
Digest |
HTTP Digest Access Authentication
|
A valid response contains an unkeyed digest of the username, the password, the given nonce value, the HTTP method, and the requested URI. |
|
OAuth |
OAuth 1.0 |
|
|
Bearer |
OAuth 2.0 Bearer Token
|
A security token with the property that any party in possession of the token (a "bearer") can use the token in any way that any other party in possession of it can. |
|
Header |
Type |
Description |
Remarks
|
Authorization |
Request |
allows a user agent to authenticate itself with an origin server |
|
Proxy-Authorization |
Request |
allows the client to identify itself (or its user) to a proxy that requires authentication. |
|
WWW-Authenticate |
Response |
indicates the authentication scheme(s) and parameters applicable to the target resource. |
|
Proxy-Authenticate |
Response |
indicates the authentication scheme(s) and parameters applicable to the proxy for this effective request URI |
|
Status Code |
Description |
Remarks
|
401 Unauthorized |
indicates that the request has not been applied because it lacks valid authentication credentials for the target resource. |
|
407 Proxy Authentication Required |
indicates that the client needs to authenticate itself in order to use a proxy. |
|
TLS
SSH
Elements
Element |
Description |
Remarks
|
passphrase |
password for the private key |
|
~/.ssh/authorized_keys
|
a list of public keys to allow to in-access into this account from outside |
used when accepting others
|
~/.ssh/known_hosts
|
a list of public keys to allow for current user to out-access |
used when accessing outer server
|
~/.ssh/id_dsa, ~/.ssh/id_rsa |
a private key of current account |
|
~/.ssh/id_dsa.pub, ~/.ssh/id_rsa.pub |
a public key of current account |
|
Commands
Readings
ssh
scp
Port Forwarding
- Port forwarding (on Wikipedia)
- Local port forwarding
- Remote port forwarding
- Dynamic port forwarding
Local port forwarding
Application --- Local Port ------- Bastion Host(Jump Server) ------- Destination Server
Client side Remote side
Remote port forwarding
@TODO
DID
JWT
- https://jwt.io/
- Desc. : an open, industry standard RFC 7519 method for representing claims securely between two parties.
UI, UX
- List of common generic widgets
- button, check box, radio, list box, drop-down list, combo box, spinner, slider, text box, tree, grid, menu, menu bar, toolbar, label, tooltip, balloon help, status bar, progress bar, inforbar
- Media controls
- Basic Timeline Elements
- Off-Canvas Top
a library or a collection of libraries containing a set of graphical control elements (called widgets) used to construct the graphical user interface (GUI) of programs.
Toolkit |
Description |
License |
Remarks
|
Qt
|
a widget toolkit for creating graphical user interfaces as well as cross-platform applications that run on various software and hardware platforms such as Linux, Windows, macOS, Android or embedded systems. |
GPL 2.0, GPL 3.0, LGPL 3.0 |
|
GTK
|
a free and open-source cross-platform widget toolkit for creating graphical user interfaces (GUIs). |
LGPL |
|
Tk
|
a free and open-source, cross-platform widget toolkit that provides a library of basic elements of GUI widgets for building a graphical user interface (GUI) in many programming languages. |
BSD-style
|
wxWidgets
|
a widget toolkit and tools library for creating graphical user interfaces (GUIs) for cross-platform applications. |
|
|
Real-time Graph
Architecture and Model
Architecture
- Twelve-factor App
- One codebase tracked in revision control, many deploys
- Explicitly declare and isolate dependencies
- Store config in the environment
- Treat backing services as attached resources
- Strictly separate build and run stages
- Execute the app as one or more stateless processes
- Export services via port binding
- Scale out via the process model
- Maximize robustness with fast startup and graceful shutdown
- Keep development, staging, and production as similar as possible
- Treat logs as event streams
- Run admin/management tasks as one-off processes
Event-Driven Architecture
Pattern
UML
Profile, Constraint
Standard Stereotypes
Applieds to |
Stereotype |
Description |
Remarks
|
Class |
Type |
Specifies the behavior of an object without stating how it is implemented. |
Interface ?
|
|
Metaclass |
Instances of this class are also classes. |
|
|
Utility |
A collection of static functions. The class has no instances |
|
Dependency |
Call |
The client class calls the operations of the supplier. |
|
|
Create |
The client class creates instances of the supplier. |
|
|
Instantiate |
The client creates instances of the supplier. |
|
|
Derive |
The client element is computed completely or partly from the supplier. |
|
|
Refine |
The client class, component, or package provides more information about the specification or design than the supplier. |
|
|
Trace |
The client element is part of the design that realizes the supplier. |
|
Operation |
Create |
This operation is a constructor. |
|
|
Destroy |
The operation destroys its instance. |
|
OCL
Type |
Operation |
Description |
Example |
Remarks
|
Collection |
any(expr)
|
Returns any element contained in self that validates the condition expr, null otherwise.
|
Sequence{1.2, 2.3, 5.2, 0.9}->any(self < 1) |
filter operation
|
|
collect(expr)
|
Returns a collection containing the result of applying expr on all elements contained in self.
|
Sequence{'first', 'second'}->collect(toUpper()) |
map operation
|
Class Diagram
Activity Diagram
Sequence Diagram
Type |
Description |
Line |
Arrow Head |
Remarks
|
synchCall |
The message was generated by a synchronous call to an operation. |
Solid |
Filled |
|
asynchCall |
The message was generated by an asynchronous call to an operation |
Solid |
Open |
|
asynchSignal |
The message was generated by an asynchronous send action. |
Solid |
Open |
|
createMessage |
The message designating the creation of another lifeline object. |
|
|
|
deleteMessage |
The message designating the termination of another lifeline. |
|
|
|
reply |
The message is a reply message to an operation call. |
Dashed |
Open |
|
Kind |
Description |
Notation |
Remarks
|
complete |
sendEvent and receiveEvent are present |
|
lost |
sendEvent present and receiveEvent absent |
|
found |
sendEvent absent and receiveEvent present |
|
unknown |
sendEvent and receiveEvent absent |
should not appear
|
Fragment |
Title |
Description |
Remarks
|
alt |
Alternatives |
represents a choice of behavior |
|
opt |
Option |
represents a choice of behavior where either the (sole) operand happens or nothing happens |
|
loop |
Loop |
represents a loop |
|
break |
Break |
represents a breaking scenario |
|
par |
Parallel |
represents a parallel merge between the behaviors of the operands |
|
seq |
Weak Sequencing |
represents a weak sequencing between the behaviors of the operands |
|
strict |
Strict Sequencing |
represents a strict sequencing between the behaviors of the operands |
|
neg |
Negative |
represents traces that are defined to be invalid |
|
critical |
Critical Region |
represents a critical region - the region is treated atomically |
|
ignore |
Ignore |
designates that there are some message types that are not shown |
|
assert |
Assertion |
represents an assertion |
|
Data Modeling
Common Data-types
Datatype |
Facet |
Standard/Guideline |
Remarks
|
Address |
|
BS7666 1994 |
|
Date |
Max 10 Characters in the format CCYY-MM-DD |
|
|
e-Mail Address |
len < 255 |
IETF RFC2822 |
|
Datatype |
Facet |
Standard/Guideline |
Remarks
|
Person Family Name |
Alphanumeric, len <= 100 |
|
|
Person Given Name |
Alphanumeric, len <= 100 |
|
|
Common Glossary
Glossary |
Description |
Remarks
|
state |
describe a stage in a process |
|
status |
describe an outcome of an operation |
HTTP Status Codes, Amazon Order Status, JIRA Ticket Status
|
Common Abbreviation
Full |
Abbreviation |
Description |
Remarks
|
account |
acct. |
|
|
approval |
apprv. |
|
|
authentication |
auth. |
|
|
authorization |
authz. |
|
|
bridge |
bdg |
|
|
business |
biz |
|
|
campaign |
cmpgn |
|
|
collection |
collectn |
|
|
construction |
constr |
|
|
contract |
contr. |
|
|
corporation |
corp. |
|
|
customer |
cust |
|
|
description |
descr |
|
desc is reserved word of Oracle and MySQL
|
document(s) |
doc. |
|
|
payment |
pymt. |
|
|
private |
pvt |
|
prv
|
public |
pub |
|
|
receipt |
recpt |
|
|
reference |
ref |
|
|
representative |
rep |
|
|
request |
req. |
|
|
response |
resp. |
|
|
special |
spcl. |
|
|
transfer |
transf |
|
|
value |
val. |
|
|
Data Analysis
CRISP-DM
- CRISP-DM (Cross-industry standard process for data mining)
- an open standard process model that describes common approaches used by data mining experts.
- Introduction to CRISP-DM
Process Modeling
BPMN
CORBA
REST
- Best Practices for Designing a Pragmatic RESTful API (4 Jun 2013)
- REST API Syntax (24 Oct 2014)
- GitHub API Overview
- Schema, Parameters, Client Errors, Authentication, Rate Limiting, User Agent Required, Conditional requests, Cross Origin Resource Sharing, Timezones
- Twitter API > Things Every Developer Should Know
- Twitter API > Security
- Twitter API > Error Codes Responses
- New v2 API: What’s Not There Is Just As Important As What Is
- Imgur API Version 3 > Error Handling
- API Design Guidance: File Upload (22 FEB, 2021)
- Direct file upload(
image/jpeg
), Multipart HTTP request(multipart/form-data
), Two-step metadata + upload
Examples
Common Patterns
Pattern |
Description |
Remarks
|
POST resources |
Add a new resource. |
|
PUT resources/{id}/state |
Update a resource into the state. |
|
POST resources/{id}/action |
Apply action to a resource. |
action : remove, disable, sell, buy, transfer, ...
|
GET resources/count
|
Get the number of resources. |
|
GET resources/mine/count
|
Get the number of resources owned by the current authenticated user. |
|
GET resources/state/count
|
Get the number of resources in a state. |
|
GET resources/state
|
List resources in a state within an interval. |
|
GET resources/valid |
|
|
GET resources/invalid |
|
|
GET resources/mine
|
List resources owned by the current authenticated user. |
|
GET resources/recent?limit={n}
|
List recent resources up to a specified number. |
|
GET resources/last |
|
|
PUT resources/{id}/state
and POST resources/{id}/state
are somewhat exchangeable.
Examples
POST bids
PUT bids/{id}/canceled
PUT bids/{id}/accepted
PUT bids/{id}/rejected
GET bids/count
GET bids/accepted?pageSize={m}&page={n}
GET bids/accepted/count?from={startDate}&to={endDate}
GET bids/accepted?from={startDate}&to={endDate}&pageSize={m}&page={n}
GET bids/recent?limit=10
Base/Common API
URL |
Title |
Remarks
|
GET /releasenotes |
List release notes |
|
GET /locales |
List all available locales |
|
GET /timezones |
List all available timezones |
|
OpenAPI
OpenAPI 3.x
- Runtime Expressions
- Runtime expressions allow defining values based on information that will only be available within the HTTP message in an actual API call. This mechanism is used by Link Objects and Callback Objects.
Datatypes
Type |
Format |
Remarks
|
integer |
|
|
integer |
int32 |
signed 32 bits
|
integer |
int64 |
signed 64 bits (a.k.a long )
|
number |
|
|
number |
float |
|
number |
double |
|
boolean |
|
|
string |
|
|
string |
byte |
base64 encoded characters
|
string |
binary |
any sequence of octets
|
string |
date
|
'yyyy-MM-dd ' format (full-date in RFC3339 or ISO8601)
|
string |
date-time
|
'yyyy-MM-ddTHH:mm:ss(+|-)hh:nn ' format (date-time in RRC3339 or ISO8601)
|
string |
password |
A hint to UIs to obscure input
|
File Upload/Download
POST /upload
Host: example.com
Content-Length: 808
Content-Type: image/png
[file content goes there]
POST /upload HTTP/1.1
Content-Length: 428
Content-Type: multipart/form-data; boundary=abcde12345
--abcde12345
Content-Disposition: form-data; name="id"
Content-Type: text/plain
123e4567-e89b-12d3-a456-426655440000
--abcde12345
Content-Disposition: form-data; name="address"
Content-Type: application/json
{
"street": "3, Garden St",
"city": "Hillsbery, UT"
}
--abcde12345
Content-Disposition: form-data; name="profileImage "; filename="image1.png"
Content-Type: application/octet-stream
{…file content…}
--abcde12345--
OpenAPI 2.0
Microservices
- MonolithFirst (Martin Fowler, 3 June 2015)
- Almost all the successful microservice stories have started with a monolith that got too big and was broken up
- Almost all the cases where I've heard of a system that was built as a microservice system from scratch, it has ended up in serious trouble.
- MicroservicePremium (Martin Fowler, 13 May 2015)
- The Death of Microservice Madness in 2018 (2018)
- Why microservices may not be for everybody (February 4, 2017)
- The Microservices Hype (Aug 25, 2017)
- Microservices give a lot of benefits, but with those benefits comes a lot of complexity, and this kind of complexity would drive you off the road of focusing on the business, which at the end is what really matters. Distribution, communication, discovery, isolation, health, are some of the topics that come hand in hand with this approach, and every each of them is its own monster to control.
Misc
CRISP-DM
Software Engineering
- Rational Unified Process
- RUP (Wikipedia)
- Four project life-cycle phases
- Inception phase
- Elaboration phase
- Construction phase
- Transition phase
- Six engineering disciplines
- Business modelling
- Requirements
- Analysis and design
- Implementation
- Test
- Deployment
- Three supporting disciplines
- Configuration and change management
- Project management
- Environment
Quality Assurance
Functionality ------+---- Suitability
+---- Accuracy
+---- Interoperability
+---- Security
+---- Functionality Compliance
Reliability --------+---- Maturity
+---- Fault Tolerance
+---- Recoverability
+---- Reliability Compliance
Usability ----------+---- Understandability
+---- Learnability
+---- Operability
+---- Attractiveness
+---- Usability Compliance
Efficiency ----------+---- Time Behaviour
+---- Resource Utilization
+---- Efficiency Compliance
Maintainability ----+---- Analysability
+---- Changeability
+---- Stability
+---- Testability
+---- Maintainability Compliance
Portability --------+---- Adaptability
+---- Installability
+---- Co-existence
+---- Replaceability
+---- Portability Compliance
Functional Suitability ----+---- Functional Completeness
+---- Functional Correctness
+---- Functional Appropriateness
Performance Efficiency ----+---- Time Behaviour
+---- Resource Utilization
+---- Capacity
Compatibility -------------+---- Co-existence
+---- Interoperability
Usability -----------------+---- Appropriateness Recognizability
+---- Learnability
+---- Operability
+---- User Error Protection
+---- User Interface Aesthetics
+---- Accessibility
Reliability ---------------+---- Maturity
+---- Availability
+---- Fault Tolerance
+---- Recoverability
Security ------------------+---- Confidentiality
+---- Integrity
+---- Non-repudiation
+---- Accountability
+---- Authenticity
Maintainability -----------+---- Modularity
+---- Reusability
+---- Analysability
+---- Modifiability
+---- Testability
Portability ---------------+---- Adaptability
+---- Installability
+---- Replaceability
Testing
- Unit Testing Guidelines
- Keep testing at unit level
- Keep tests independent
- Focus on execution coverage first
- Cover boundary cases
- Provide a random generator : a simple way to improve test coverage further is to generate random parameters so that the tests can be executed with different input every time.
- Test each feature once
Testing |
Description |
Remarks
|
Unit Testing
|
Tests that verify the functionality of a specific section of code, usually at the function level |
|
Integration Testing
|
Evaluate the compliance of a system or component with specified functional requirements |
|
System Testing
|
Evaluate the system's compliance with its specified requirements on a complete integrated system |
|
Acceptance Testing
|
A test conducted to determine if the requirements of a specification or contract are met |
|
Performance Testing
Type |
Description |
Remarks
|
Load Testing
|
Usually conducted to understand the behaviour of the system under a specific expected load. |
|
Stress Testing
|
Normally used to understand the upper limits of capacity within the system. |
|
Initially, as the number of users increases, throughput increases correspondingly. However, as the number of concurrent requests increases, server performance begins to saturate, and throughput begins to decline.
A user submits a request, the server receives and processes the request, and then returns a result, at which point the user spends some time before submitting a new request. The time between one request and the next is called think time.
Version Control
- APR's Version Numbering
Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.
Issue Tracking
Contents Management
misc
Books
Documentation
HP Notebook
Software Licenses
Examples
Hardware
- Open Compute Project
- to develop servers and data centers following the model traditionally associated with open source software projects.
Computer Bus
Bus |
Full Name |
Description |
Remarks
|
PATA |
Parallel ATA, Parallel AT Attachment, Parallel Advanced Technology Attachment
|
an interface standard for the connection of storage devices such as hard disk drives, floppy disk drives, and optical disc drives in computers.
|
ATA, IDE
|
SATA |
Serial ATA, Serial AT Attachment
|
a computer bus interface that connects host bus adapters to mass storage devices such as hard disk drives, optical drives, and solid-state drives |
|
PCIe |
PCI Express,Peripheral Component Interconnect Express
|
a high-speed serial computer expansion bus standard, designed to replace the older PCI, PCI-X and AGP bus standards. |
|
M.2 |
|
a specification for internally mounted computer expansion cards and associated connectors |
|
NVMe |
Non-Volatile Memory(NVM) Express
|
an open logical device interface specification for accessing non-volatile storage media attached via a PCI Express (PCIe) bus. |
|
USB |
Universal Serial Bus
|
an industry standard that establishes specifications for cables and connectors and protocols for connection, communication and power supply (interfacing) between computers, peripherals and other computers.
|
USB 1.0, USB 2.0, USB 3.0, USB 3.1, USB4
|
Thunderbolt |
|
the brand name of a hardware interface developed by Intel (in collaboration with Apple) that allows the connection of external peripherals to a computer.
|
Thunderbolt 1, Thunderbolt 2, Thunderbolt 3
|
Bus |
Speed |
Released in |
Remarks
|
SATA 3.0 |
6 Gbit/s, 600 MB/s |
2009 |
|
PCIe 3.0 |
1.0 GB/s ~ 15.8 GB/s |
2010 |
|
PCIe 4.0 |
2.0 GB/s ~ 31.5 GB/s |
2017 |
|
USB 2.0 |
1.5 Mbit/s (Low), 12 Mbit/s (Full), 480 Mbit/s (Hight) |
2001 |
|
USB 3.0 |
5 Gbit/s, 500 MB/s |
2011 |
|
USB 3.1 |
10 Gbit/s, 1.2 GB/s |
2014 |
|
USB 3.2 |
20 Gbit/s, 2.4 GB/s |
2017 |
|
Thunderbolt 2 |
20 Gbit/s |
2013 |
|
Thunderbolt 3 |
40 Gbit/s |
2015 |
USB 3.1, DP 1.2, PCIe 3
|
USB
Type |
USB 1.0 |
USB 1.1 |
USB 2.0 |
USB 2.0 Revised |
USB 3.0 |
USB 3.1 |
USB 3.2 |
USB 4.0
|
Max. Transfer Rate |
12 Mbps |
12 Mbps |
480 Mbps |
480 Mbps |
5 Gbps |
10 Gbps |
20 Gbps |
40 Gbps
|
Type A |
O |
O |
O |
O |
O |
O |
|
|
Type B |
O |
O |
O |
O |
O |
O |
|
|
Type C |
|
|
|
O |
O |
O |
O |
O
|
USB Power Delivery
Spec |
Voltabe |
Current |
Power |
Remark
|
Battery Charging (BC) 1.1 |
1.5 A |
5 V |
7.5 W |
|
Battery Charging (BC) 1.2 |
1.5 A |
5 V |
7.5 W |
|
USB-C |
1.5 A |
5 V |
7.5 W |
|
|
3 A |
5 V |
15 W |
|
Power Delivery 1.0/2.0/3.0 Type-C |
5 A |
20 V |
100 W |
|
Power Delivery 3.1 Type-C |
5 A |
48 V |
240 W |
|
- USB Power Delivery explained (April 25, 2022)
- USB Power Delivery is much more powerful, supporting up to 240W of power to charge up even the most demanding gadgets such as laptops.
- This handshaking approach supports voltage steps at 5V, 9V, 15V, 20V, and beyond for power outputs ranging from 0.5W to 240W.
- USB PD PPS(Programmable Power Supply)
- Allows granular control over VBUS power, allowing a range of 3.3 to 21 V in 20 mV steps to facilitate constant-current or constant-voltage charging.
- "Certified USB Fast Charger" logo
- For chargers that use "Programmable Power Supply" (PPS) protocol from the USB Power Delivery 3.0 specification
USB PD 1.0
- six fixed power profiles for different device categories
Voltage |
Current |
Power |
Remarks
|
5 V |
2 A |
10 W |
|
12 V |
1.5 A |
18 W |
|
12 V |
3 A |
36 W |
|
12 V |
5 A |
60 W |
|
20 V |
3 A |
60 W |
|
20 V |
5 A |
100 W |
|
USB PD 2.x/3.x
- Drop fixed profiles in favor of more flexible power rules.
- Keep fixed voltage brackets but allow for a wider range of negotiated current levels
Category |
Power Range |
Voltage |
Current |
Usage
|
Standard Power Range (SPR) |
0.5 ~ 15 W |
5 V |
0.1 ~ 3.0 A |
headphones, small USB accessories
|
|
15 ~ 27 W |
9 V |
1.67 ~ 3.0 A |
smartphones, cameras, drones
|
|
27 ~ 45 W |
15 V |
1.8 ~ 3.0 A |
tablets, small laptops
|
|
45 ~ 100 W |
20 V |
2.25 ~ 3.0 A, 3.0 ~ 5.0 A |
large laptops, displays
|
Extended Power Range (EPR) |
100 ~ 140 W |
28 V |
3.75 ~ 5.0 A |
|
|
140 ~ 180 W |
36 V |
3.89 ~ 5.0 A |
|
|
180 ~ 240 W |
48 V |
3.75 ~ 5.0 A |
|
SD Card
- SD card : a proprietary non-volatile memory card format developed by the SD Association (SDA) for use in portable devices.
- SD Association
Business Solutions
Process |
Description |
Remarks
|
Order Fulfillment
|
The complete process from point of sales inquiry to delivery of a product to the customer. |
|
SAP R/3