最容易理解的CSS的position教程——十步图解CSS的position

CSS的positon,我想做为一个Web制作者来说都有碰到过,但至于对其是否真正的了解呢?那我就不也说了,至少我自己并不非常的了解其内核的运行。今天在Learn CSS Positioning in Ten Steps一文中分十步介绍了CSS的“position”中的“static、relative、absolute、float”使用,觉得蛮有意思的。整理了一下贴上来与大家一起分享。希望大家能喜欢。

继续阅读“最容易理解的CSS的position教程——十步图解CSS的position”

Http request header坑记录

在开发公共API时,在请求头中(http request header)加入key secret来认证用户。
类似阿里云AccessKey AccessSecret。
header的key为MERCHANT_KEY MERCHANT_SECRET,PHP后端接收不到这些key的header。
查阅nginx资料发现,nginx默认设置会把含有下划线的key给忽略掉。
修改这些设置有两个方法:

1、修改nginx设置,underscores_in_headers 设置为 on

2、使用减号代替下划线,推荐这个方法

php 处理高精度计算函数

PHP 为任意精度数学计算提供了二进制计算器(Binary Calculator),它支持任意大小和精度的数字,以字符串形式描述

bcadd — 加法
bccomp — 比较
bcdiv — 相除
bcmod — 求余数
bcmul — 乘法
bcpow — 次方
bcpowmod — 先次方然后求余数
bcscale — 给所有函数设置小数位精度
bcsqrt — 求平方根
bcsub — 减法

涉及到钱的计算,还是以int存储,不容易出问题

PHPStorm激活码

77751S0VBA-eyJsaWNlbnNlSWQiOiI3Nzc1MVMwVkJBIiwibGljZW5zZWVOYW1lIjoi5b285bK4IHNvZnR3YXJlMiIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDE5LTAxLTA1In0seyJjb2RlIjoiUlMwIiwicGFpZFVwVG8iOiIyMDE5LTAxLTA1In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMTktMDEtMDUifSx7ImNvZGUi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e82kjF4zwfadHk3bQVvbfdAwxcDy4xBjs3L4raPLU3yenSzr/OEur1+jfOxnQSmEcMXKXgrAQ9U55gwjcOFKrgOxEdek/Sk1VfOjvS+nuM4eyEruFMfaZHzoQiuw4IqgGc45ohFH0UUyjYcuFxxDSU9lMCv8qdHKm+wnPRb0l9l5vXsCBDuhAGYD6ss+Ga+aDY6f/qXZuUCEUOH3QUNbbCUlviSz6+GiRnt1kA9N2Qachl+2yBfaqUqr8h7Z2gsx5LcIf5kYNsqJ0GavXTVyWh7PYiKX4bs354ZQLUwwa/cG++2+wNWP+HtBhVxMRNTdVhSm38AknZlD+PTAsWGu9GyLmhti2EnVwGybSD2Dxmhxk3IPCkhKAK+pl0eWYGZWG3tJ9mZ7SowcXLWDFAk0lRJnKGFMTggrWjV8GYpw5bq23VmIqqDLgkNzuoog==

 

有效期至 2019-01-05

php 数组 类对象 值传递 引用传递 区别

php中,数组是当一个普通变量,值传递是要一个实参的一个拷贝副本,跟实参无关,引用传递后可以改变实参的值

而类的对象是无论值传递和引用传递都是引用传递,是对对象的引用,都会改变实参的值

结合clone函数就不难理解PHP对对象的传递是类似指针传递

对象的值传递和引用传递在特定场景下面是有区别的