Random Notes

Just a parking lot for some random notes.

count lines

https://github.com/github/linguist/

Kerberos

kinit: talk to KDCkey distribution center=> kerberos use Authentication Server(AS) and Ticket Granting Server(TGS) Ticket Granting Ticket (TGT)

Entropy

知道的信息越多,随机事件的不确定性越小

HATEOAS

HATEOAS: Hypermedia As The Engine Of Application State

REST

REST is not a protocol, a file format, or a development framework. It’s a set of design constraints: statelessness, hypermedia as the engine of application state, and so on.

HyperText

hypertext = text + hyperlinks + others

Hypertext Application Language: HAL

Progressive Disclosure

Progressive Disclosure is a concept in User Interface Design which advocates only presenting to the user the information they need when they need it.

IETF

Internet Engineering Task Force

Domain Names

FQDN: Fully Qualified Domain Name: sometimes also referred as an absolute domain name is a domain name that specifies its exact location in the tree hierarchy of the Domain Name System(DNS)

TLD: Top Level Domains

MO

MO: http://en.wikipedia.org/wiki/Modus_operandi

User Interfaces

  • service/API(REST)
  • SDK/DSL
  • CLI/GUI

probabilistically vs deterministically

data 16 bits example : RGB RGBA SHEER: xxxxxx33 OPAQUE xxxxxxFF

f"$color%06X"

Format

LIBSVM format: each line represents a labeled sparse feature vector where the indices are one-based and in ascending order. After loading, the feature indices are converted to zero-based.

label index1:value1 index2:value2 ...

Data System

  • Store data so that they, or another application, can find it again later (databases),
  • Remember the result of an expensive operation, to speed up reads (caches),
  • Allow users to search data by keyword or filter it in various ways (search indexes),
  • Send a message to another process, to be handled asynchronously (message queues),
  • Observe what is happening, and act on events as they occur (stream processing),
  • Periodically crunch a large amount of accumulated data (batch processing).

bootstrapping

bootstrapping usually refers to a self-starting process that is supposed to proceed without external input. get (oneself or something) into or out of a situation using existing resources.

Modal

A modal window is a child window that disables parent window

Byte

因为 byte 是一个有符号的类型,所以在将 byte 数值-1 转换成 char 时,会发生

符号扩展。作为结果的 char 数值的 16 个位就都被置位了,因此它等于 216-1,

即 65535。从 char 到 int 的转型也是一个拓宽原始类型转换,所以这条规则告

诉我们,它将执行零扩展而不是符号扩展。作为结果的 int 数值也就成了 65535,

其结果没有达到两个数值之间的一半。对于 float 类型,加 1 不会产生任何效果 25 54

的最小级数是 2 ,即 33,554,432;而对于 double 类型,最小级数是 2 ,大约 16

是 1.8 × 10 。

毗邻的浮点数值之间的距离被称为一个 ulp,它是“最小单位(unit in the last

place)”的首字母缩写词。在 5.0 版中,引入了 Math.ulp 方法来计算 float

或 double 数值的 ulp。

Java

Others

  • SOAP: evolved as a successor of XML-RPC
  • Rewrite over Maintain: Small enough that you can throw them away
  • idempotence: the property of certain operations in mathematics and computer science, that can be applied multiple times without changing the result beyond the initial application. e.g. HTTP GET
  • abstraction

    • location transparency:172.56.33.98
    • name transparency: Pricing Server
    • implementation transparency: JAVA/J2EE
    • access decoupling: RMI/IIOP
    • contract decoupling: (String, String)
  • ATB: Availability to business

C/C++: Null pointer is 0

Private git repo

bitbucket AWS CodeCommit

when things work fine, the less steps the better; when not, the granular the better

TO LEARN

  • perplexity

  • zip’s law

  • maximum entropy

  • Loglog Counter or Bloom filter

  • zipfian

  • Count-Min Sketch or Stream-Summary UPnP

  • regularization( does not depend on data)

  • lasso: set weight to 0

  • ridge: almost zero

  • elastic-net: combining lass/ridge

guideline for this site

  • use only h1 and h2
  • distinguish internal links and external links
  • only 2 colors

static vs dynamic

static linking to deploy, dynamic linking to iterate

clang for testing(quick to compile, slower to run) cpp for deploy(slow to compile, quick to run)

Quantum Computing

http://www.clerro.com/guide/580/quantum-computing-explained

data compression

LZ77,LZ78

Marker interface is an empty interface

DTO: https://en.wikipedia.org/wiki/Datatransferobject

http://nand2tetris.org/

http://frankdenneman.nl/2016/07/06/introduction-2016-numa-deep-dive-series/

Random

https://www.digitalocean.com/features/one-click-apps/ app logo

layout: http://blog.visual.ly/how-to-design-transit-map-style-graphics/

background grey: #E4E7EA;

personal finance for engineers https://cs007.blog/

Ads

DSP(Demand-Side Platform) -> Ad Exchange -> SSP(Supply-Side Platform)

Most bad actors are Ads Arbitrage Businesses (AABs), who live on the thin margin between the cost of user acquisition and the ads revenue per user. They are only profitable if user acquisition is very cheap, and that leads them to take drastic action.

ubuntu ppa

Personal Package Archives

AWS

restrict HTTP referrer https://docs.aws.amazon.com/AmazonS3/latest/dev/example-bucket-policies.html#example-bucket-policies-use-case-4

DevOps

https://www.safaribooksonline.com/library/view/the-site-reliability/9781492029496/ch01.html

Data Center

PUE: power utilization efficiency:

1.0: all power is used by servers 2.0: half of power is used by the building, half by servers

Auth

Danger Zone

Infinite Loop: https://en.wikipedia.org/wiki/Infinite_loop

Fork Bomb: https://en.wikipedia.org/wiki/Fork_bomb

Deadlock: https://en.wikipedia.org/wiki/Deadlock

Denial of Service: https://en.wikipedia.org/wiki/Denial-of-service_attack

Distributed denial-of-service (DDoS)

Classic Problems

Conway's Game of Life

https://en.wikipedia.org/wiki/Conway%27sGameof_Life

Caesar Cipher

https://en.wikipedia.org/wiki/Caesar_cipher

Run-length_encoding

https://en.wikipedia.org/wiki/Run-length_encoding

graycode

Catalan_number

https://en.wikipedia.org/wiki/Catalan_number

Metaphors

starbucks

docker plumbing and porcelain pipe

I often find myself when programming hesitating to create new types. Instead I'll just use string, int, or float properties and I tell myself just use them appropriately. Sure. This almost always leads to problems. The reason I think is illustrated in the differences between Go and Chess. Go is more complex because the rules are simpler, which means almost counter-intuitively complexity increases quickly. For Chess there are 20 possible opening moves. For Go the first player has 361 possible moves. This greater degree of choice continues throughout the game. Go maps to the scenario using base types everywhere. Using a string that can be anything instead of a Date that would be more specific and a Birthday that would be even more specific. Chess maps to the using types scenario. Types reduce the number of moves your program can make, which reduces complexity, which makes it easier your program easier understand. This is why Chess was solved long ago by computers and Go only recently. So Go create types and simplify your life.

Game Theory

People:

  • John Nash: A Beautiful Mind

Algorithms:

  • minimax search with alpha-beta pruning: discrete state space, perfect information, turn-based game like chess and checkers
  • expectimax optimization

Others:

纳什均衡: http://36kr.com/p/5061790.html

octet stream = bytestream