Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
| # WSL2 network port forwarding script v1 | |
| # for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell, | |
| # for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter. | |
| # written by Daehyuk Ahn, Aug-1-2020 | |
| # Display all portproxy information | |
| If ($Args[0] -eq "list") { | |
| netsh interface portproxy show v4tov4; | |
| exit; | |
| } |
| # Put this function to your .bashrc file. | |
| # Usage: mv oldfilename | |
| # If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
| # Original mv is called when it's called with more than one argument. | |
| # It's useful when you want to change just a few letters in a long name. | |
| # | |
| # Also see: | |
| # - imv from renameutils | |
| # - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
| // Tracking cursor position in real-time without JavaScript | |
| // Demo: https://twitter.com/davywtf/status/1124146339259002881 | |
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "strings" | |
| ) |
As the number of different possible states and transitions between states in a user interface grows, managing styles and animations can quickly become complicated. Even a simple login form has many different "user flows":
https://codepen.io/davidkpiano/pen/WKvPBP
State machines are an excellent pattern for managing state transitions in user interfaces in an intuitive, declarative way. We've been using them a lot on the Keyframers as a way to simplify otherwise complex animations and user flows, like the one above.
So, what is a state machine? Sounds technical, right? It’s actually more simple and intuitive than you might think. (Don’t look at Wikipedia just yet… trust me.)
Let’s approach this from an animation perspective. Suppose you’re creating a loading animation, which can be in only one of four states at any given time:
https://ipfs.io/ipfs/{hash}
user@ubuntu:~/Downloads/心理学$ ipfs add -r .
added QmerE4f5kabqmMunMwGu5UsUS347bcr7wDEhF1wHANh3ck 心理学/(其它)/丹·艾瑞里:怪诞行为学 (扫描版).pdf
added QmRbvAnZ6qAhDozFjc9wxmMhK1Gv4QecUXhtbd5K3Dxw1r 心理学/(其它)/丹·艾瑞里:怪诞行为学.epub
added Qmeq2MfRYrRDrXiwfFtjcz1kGC2gVPY7sqoxQLonJuTCcS 心理学/(其它)/丹·艾瑞里:怪诞行为学2.epub
added QmfQc7G8pLbBtzkNk5gNhCrkaYVd2tGioNrZJTXFxviwQP 心理学/(其它)/基思·斯坦诺维奇:与众不同的心理学——如何正视心理学 (第7版 扫描版).pdf
added QmVoSP6JmrGTP3KWE9onL6ygqhenHFjbeyFTzDVe1GumfP 心理学/(其它)/基思·斯坦诺维奇:对伪心理学说不 (第8版 扫描版).pdf
added QmP6pcyNv4eFdfitk6H8krde6RBAFyteCHfHZYhsDpAWjK 心理学/(其它)/基思·斯坦诺维奇:对伪心理学说不 (第8版).epub
本文譯自 Julio Merino 2018 年七月撰寫的 Rust vs. Go 一文。Julio Merino 是 G 社僱員,在 G 社工作超過 8 年,無論工作內外,都接觸開發不少 Go 語言,並撰寫 [Rust 點評][rust-review]系列文,來聽聽他對 Rust 與 Go 的想法吧。
Thanks Julio Merino for this awesome article!
There exist several DI frameworks / libraries in the Scala ecosystem. But the more functional code you write the more you'll realize there's no need to use any of them.
A few of the most claimed benefits are the following:
- Dependency Injection.
- Life cycle management.
- Dependency graph rewriting.
Libuv and libev, two I/O libraries with similar names, recently had the privilege to use both libraries to write something. Now let's talk about my own subjective expression of common and different points.
The topic of high-performance network programming has been discussed. Asynchronous, asynchronous, or asynchronous. Whether it is epoll or kqueue, it is always indispensable to the asynchronous topic.
Libuv is asynchronous, and libev is synchronous multiplexing IO multiplexing.
Libev is a simple encapsulation of system I/O reuse. Basically, it solves the problem of different APIs between epoll and kqueuq. Ensure that programs written using livev's API can run on most *nix platforms. However, the disadvantages of libev are also obvious. Because it basically just encapsulates the Event Library, it is inconvenient to use. For example, accept(3) requires manual setnonblocking after connection. EAGAIN, EWOULDBLOCK, and EINTER need to be detected when reading from a socket. This is a
Author: Chris Lattner