PHP 介绍

Manual

Basic

Interactive shell php -a
Starting the web server php -S 0.0.0.0:8000 -t foo/

Debugging

1
2
3
4
5
zend_extension="php_xdebug-2.9.8-7.3-vc15-x86_64.dll"
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
;xdebug.remote_port=9000
xdebug.remote_autostart=1

remote_autostart会有一定的性能损耗,禁用此选项后可通过XDEBUG_SESSION_START=session_name启动调试会话。

Step Debugging
DBGP - A common debugger protocol specification

FPM + Nginx

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
server {
listen 80;
server_name xiongjiaxuan.com;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

root /www/public;

location / {
index index.html;
}

location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
if (!-f $document_root$fastcgi_script_name) {
return 404;
}

fastcgi_param HTTP_PROXY "";

fastcgi_pass unix:/run/php-fpm/www.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;

include fastcgi_params;
}
}

Web

Tool

Composer

composer -V 查看版本
composer update 自动升级

Physics

State of matter

  • solid
  • liquid
  • gas
  • plasma

Metastability

Melting point

Supercooling

Superheating

boiling retardation

Classical mechanics

Power (功率)

power is the amount of energy transferred or converted per unit time. In the International System of Units, the unit of power is the watt, equal to one joule per second.

  • Formula of Power: P = E/t

Electromagnetism

Electromagnetic radiation (电磁波)

In physics, electromagnetic radiation (EMR) consists of waves of the electromagnetic (EM) field, which propagate through space and carry momentum and electromagnetic radiant energy. It includes radio waves, microwaves, infrared, (visible) light, ultraviolet, X-rays, and gamma rays. All of these waves form part of the electromagnetic spectrum.

Radio wave (无线电波)

Radio waves are a type of electromagnetic radiation with the longest wavelengths in the electromagnetic spectrum, typically with frequencies of 300 gigahertz (GHz) and below.

Radio waves were first predicted by the theory of electromagnetism proposed in 1867 by Scottish mathematical physicist James Clerk Maxwell.

Equivalently, the distance a radio wave travels in a vacuum, in one second, is 299,792,458 meters (983,571,056 ft), which is the wavelength of a 1 hertz radio signal.

Attenuation (衰减)

In physics, attenuation (in some contexts, extinction) is the gradual loss of flux intensity through a medium. For instance, dark glasses attenuate sunlight, lead attenuates X-rays, and water and air attenuate both light and sound at variable attenuation rates.

Hearing protectors help reduce acoustic flux from flowing into the ears. This phenomenon is called acoustic attenuation and is measured in decibels (dBs).

Attenuation decreases the intensity of electromagnetic radiation due to absorption or scattering of photons. Attenuation does not include the decrease in intensity due to inverse-square law geometric spreading. Therefore, calculation of the total change in intensity involves both the inverse-square law and an estimation of attenuation over the path.

The primary causes of attenuation in matter are the photoelectric effect, compton scattering, and, for photon energies of above 1.022 MeV, pair production.

Inverse-square law

Beer–Lambert law

Maxwell’s equations

Coulomb’s law

Ohm’s law

  • current-voltage relationship: V=IR
  • units of Resistance: ohms (Ω)

Ohm’s law formula relates only to substances that are able to induce power. such as metals and ceramic. However, there are many other materials for which the Ohm’s law formula cannot be used, such as semiconductors and insulators.

Joule heating

the power of heating generated by an electrical conductor equals the product of its resistance and the square of the current.

Electric power (电功率)

  • DC Electric Power: P = VI
  • E = V × I × T

Battery Capacity

Battery capacity (AH) is defined as a product of the current that is drawn from the battery while the battery is able to supply the load until its voltage is dropped to lower than a certain value for each cell.

参考

Physicist

Albert Einstein (1879-1955)

1933年回到美国后,爱因斯坦成为普林斯顿高等研究院的常驻教授,他此后有生之年,几乎都在这里度过,他再也没有踏上欧洲一步

Spice

Coriander

芫荽

Anise

Black pepper

Cardamom

Carob

Cinnamon

肉桂

Chili pepper

In 2020, 36 million tonnes of green chili peppers were produced worldwide, with China producing 46% of the total.

Capsicum cultivars

  • C. annuum
  • C. chinense
  • C. baccatum
  • C. frutescens
  • C. pubescens

Cloves

丁香

Cumin

孜然

Fennel

茴香

Mustard

芥末

Sesame seed

Star Anise

Szechuan Pepper

Tamarind

酸豆、罗望子、酸角

Vanilla

香草

阅读记录

想看

  • Unsavory Truth: How Food Companies Skew the Science of What We Eat (2018) by Marion Nestle
  • Making the Modern World: Materials and Dematerialization (2013) by Vaclav Smil
  • On Death and Dying (1969) by Elisabeth Kubler-Ross
  • The Human Predicament: A Candid Guide to Life’s Biggest Questions (2017) by David Benatar
  • Generation X: Tales for an Accelerated Culture (1991) by Douglas Coupland
  • The Revenge of Analog: Real Things and Why They Matter (2016) by David Sax
  • Antisocial: Online Extremists, Techno-Utopians, and the Hijacking of the American Conversation (2019) by Andrew Marantz
  • The Filter Bubble: What the Internet is Hiding From You (2011) by Eli Pariser
  • An American Sickness: How Healthcare Became Big Business and How You Can Take It Back (2017) by Elisabeth Rosenthal
  • Red-Handed: How American Elites Get Rich Helping China Win (2022) by Peter Schweizer
  • 100 Things We’ve Lost to the Internet (2021) by Pamela Paul
  • The Evolution of Useful Things: How Everyday Artifacts-From Forks and Pins to Paper Clips and Zippers-Came to be as They are. (1994) by Henry Petroski

2023

  • 7月16日 东方快车谋杀案
  • 6月27日 黑暗的左手
  • 5月27日 李鸿章回忆录
  • 5月2日 雾都孤儿
  • 3月12日 儿子与情人
  • 2月27日 窄门
  • 2月26日 爱玛
  • 2月18日 第三种黑猩猩
  • 2月13日 候鸟
  • 2月9日 罗密欧与朱丽叶
  • 2月6日 癌症传:众病之王
  • 1月19日 玩偶之家
  • 1月16日 老人与海
  • 1月15日 疾病的隐喻
  • 1月10日 蝇王
  • 1月7日 鲁宾孙历险记
  • 1月1日 野性的呼唤

2022

  • 12月31日 城堡
  • 12月28日 马丁·伊登
  • 12月12日 百年孤独
  • 12月4日 霍乱时期的爱情
  • 11月28日 过于喧嚣的孤独
  • 11月18日 忏悔录(卢梭)
  • 11月13日 解说疾病的人
  • 11月1日 小王子
  • 10月29日 小东西
  • 10月28日 红与黑
  • 10月21日 鼠疫
  • 10月19日 漂亮朋友
  • 10月15日 巴黎圣母院
  • 10月2日 高老头
  • 9月30日 包法利夫人
  • 9月20日 李碧华作品集饺子
  • 9月17日 茶花女
  • 9月15日 金粉世家
  • 9月5日 茶馆
  • 8月31日 黑冰
  • 8月17日 遥远的救世主
  • 8月12日 房思琪的初戀樂園
  • 7月31日 丹凤街
  • 7月25日 1984
  • 7月20日 不能承受的生命之轻
  • 7月14日 霸王别姬
  • 6月27日 变形记
  • 6月1日 为人民服务
  • 5月22日 芳华
  • 5月10日 金陵十三钗

2021

  • 2月4日 药物简史:鸦片、奎宁、阿司匹林与我们的抗病故事
  • 2月4日 清醒思考的策略
  • 2月13日 人类简史:从动物到上帝
  • 3月19日 重来:更为简单有效的商业思维
  • 7月11日 明智行动的艺术

2020年

  • 1月17日 当我谈跑步时我谈些什么
  • 1月19日 被讨厌的勇气
  • 1月22日 米
  • 1月30日 塑造世界经济的50项伟大发明
  • 2月8日 妻妾成群

2019年

  • 1月11日 人生

2018年

  • 7月25日 活着
  • 8月9日 了不起的盖茨比
  • 8月13日 俗世奇人
  • 8月15日 许三观卖血记
  • 8月27日 俗世奇人·贰
  • 8月27日 边城
  • 9月4日 在细雨中呼喊
  • 9月14日 现实一种
  • 9月24日 兄弟
  • 10月2日 黄昏里的男孩
  • 10月14日 变
  • 11月6日 动物农场