重建被PHP7废弃的函数

////////重建被PHP7废弃的函数。
function php7兼容php6(){
if(!function_exists(‘ereg’))
{ function ereg($pattern, $subject, &$matches = []) { return preg_match(‘/’.$pattern.’/’, $subject, $matches); } }
if(!function_exists(‘eregi’))
{ function eregi($pattern, $subject, &$matches = []) { return preg_match(‘/’.$pattern.’/i’, $subject, $matches); } }
if(!function_exists(‘ereg_replace’))
{ function ereg_replace($pattern, $replacement, $string) { return preg_replace(‘/’.$pattern.’/’, $replacement, $string); } }
if(!function_exists(‘eregi_replace’))
{ function eregi_replace($pattern, $replacement, $string) { return preg_replace(‘/’.$pattern.’/i’, $replacement, $string); } }
if(!function_exists(‘split’))
{ function split($pattern, $subject, $limit = -1) { return preg_split(‘/’.$pattern.’/’, $subject, $limit); } }
if(!function_exists(‘spliti’))
{ function spliti($pattern, $subject, $limit = -1) { return preg_split(‘/’.$pattern.’/i’, $subject, $limit); } }
}

////以便可以兼容PHP6

 

 

EXCEL身份证号校验公式

EXCEL身份证号校验公式

=IF(RIGHT(F3,18)=””,””,(IF(MID(“10X98765432″,MOD(SUMPRODUCT(MID(RIGHT(F3,18),ROW($1:$17),1)*2^(18-ROW($1:$17))),11)+1,1)=MID(RIGHT(F3,18),18,18),”正确”,”错误”)))

=IF(LOOKUP((LEFT(H2,1)*7+MID(H2,2,1)*9+MID(H2,3,1)*10+MID(H2,4,1)*5+MID(H2,5,1)*8+MID(H2,6,1)*4+MID(H2,7,1)*2+MID(H2,8,1)+MID(H2,9,1)*6+MID(H2,10,1)*3+MID(H2,11,1)*7+MID(H2,12,1)*9+MID(H2,13,1)*10+MID(H2,14,1)*5+MID(H2,15,1)*8+MID(H2,16,1)*4+MID(H2,17,1)*2)-ROUNDDOWN((LEFT(H2,1)*7+MID(H2,2,1)*9+MID(H2,3,1)*10+MID(H2,4,1)*5+MID(H2,5,1)*8+MID(H2,6,1)*4+MID(H2,7,1)*2+MID(H2,8,1)+MID(H2,9,1)*6+MID(H2,10,1)*3+MID(H2,11,1)*7+MID(H2,12,1)*9+MID(H2,13,1)*10+MID(H2,14,1)*5+MID(H2,15,1)*8+MID(H2,16,1)*4+MID(H2,17,1)*2)/11,0)*11,{0,1,2,3,4,5,6,7,8,9,10},{“1″,”0″,”x”,”9″,”8″,”7″,”6″,”5″,”4″,”3″,”2″})=RIGHT(H2,1),”OK”,”Wrong”)

=IF(LOOKUP((LEFT(right(F3,18),1)*7+MID(right(F3,18),2,1)*9+MID(right(F3,18),3,1)*10+MID(right(F3,18),4,1)*5+MID(right(F3,18),5,1)*8+MID(right(F3,18),6,1)*4+MID(right(F3,18),7,1)*2+MID(right(F3,18),8,1)+MID(right(F3,18),9,1)*6+MID(right(F3,18),10,1)*3+MID(right(F3,18),11,1)*7+MID(right(F3,18),12,1)*9+MID(right(F3,18),13,1)*10+MID(right(F3,18),14,1)*5+MID(right(F3,18),15,1)*8+MID(right(F3,18),16,1)*4+MID(right(F3,18),17,1)*2)-ROUNDDOWN((LEFT(right(F3,18),1)*7+MID(right(F3,18),2,1)*9+MID(right(F3,18),3,1)*10+MID(right(F3,18),4,1)*5+MID(right(F3,18),5,1)*8+MID(right(F3,18),6,1)*4+MID(right(F3,18),7,1)*2+MID(right(F3,18),8,1)+MID(right(F3,18),9,1)*6+MID(right(F3,18),10,1)*3+MID(right(F3,18),11,1)*7+MID(right(F3,18),12,1)*9+MID(right(F3,18),13,1)*10+MID(right(F3,18),14,1)*5+MID(right(F3,18),15,1)*8+MID(right(F3,18),16,1)*4+MID(right(F3,18),17,1)*2)/11,0)*11,{0,1,2,3,4,5,6,7,8,9,10},{“1″,”0″,”x”,”9″,”8″,”7″,”6″,”5″,”4″,”3″,”2″})=RIGHT(right(F3,18),1),”正确”,”错误”)

EXCEL宏实现自动分页的方法

Sub 自动分页()
Dim i%, k%
Application.ScreenUpdating = False
ActiveSheet.ResetAllPageBreaks ‘从论坛高手那学到:在设置之前应该重设所有分页符,避免表格分页符混乱
For i = 13 To 4398
If Cells(i, 7) <> Cells(i – 1, 7) Then
ActiveSheet.HPageBreaks.Add Before:=Cells(i, 1)
‘Cells(i + 1, 1).Select
‘ActiveCell = 1
End If
If Cells(i, 1) = 20 Then
ActiveSheet.HPageBreaks.Add Before:=Cells(i + 1, 1)
‘Cells(i + 1, 1).Select
‘ActiveCell = 1
End If

Next
Application.ScreenUpdating = True

End Sub

Windows Server 2019 简体中文版

Windows Server 2019 简体中文版

Windows Server 2019 (x64) – DVD (Chinese-Simplified)

文件名:cn_windows_server_2019_x64_dvd_2d80e042.iso
SHA1:CFBC1F9BFA00A08E601548A056C67AB732CF32F7
文件大小:4.47GB
发布时间:2018-10-03
磁力链接:cn_windows_server_2019_x64_dvd_2d80e042.iso
百度网盘: https://pan.baidu.com/s/1DODdsiuSbj7-G_1hWLbqBg 密码: 3xab

Microsoft Hyper-V Server 2019 (x64) – DVD (Chinese-Simplified)

文件名:cn_microsoft_hyper-v_server_2019_x64_dvd_55a748df.iso
语言:Chinese – Simplified
SHA1:0F1265772F83E5319F22AB60FD6CB61EDFEBCEE1
发布日期:2018/10/03
文件大小:2.42 GB
磁力链接:cn_microsoft_hyper-v_server_2019_x64_dvd_55a748df.iso

Windows Server 2019 Essentials (x64) – DVD (Chinese-Simplified)

文件名:cn_windows_server_2019_essentials_x64_dvd_54aab2fc.iso
语言:Chinese – Simplified
SHA1:7F852212E84B7A3E6B7B5E278EEC1F712529076A
发布日期:2018/10/03
文件大小:4.25 GB
磁力链接:cn_windows_server_2019_essentials_x64_dvd_54aab2fc.iso

Windows Server 2019 繁体中文版

Windows Server 2019 (x64) – DVD (Traditional_Chinese) 繁体中文版

文件名:ct_windows_server_2019_x64_dvd_af47f9fe.iso
SHA1:27C54E74548A8BDAE3611CF5202E24EF7ED86FE1
文件大小:4.41GB
发布时间:2018-10-03
磁力链接:ct_windows_server_2019_x64_dvd_af47f9fe.iso
百度网盘: https://pan.baidu.com/s/1OLxW-SUKBFFH6jR1peYnTw 密码: 67sr
解压密码:www.unyoo.com

Microsoft Hyper-V Server 2019 (x64) – DVD (Chinese-Traditional)

文件名:ct_microsoft_hyper-v_server_2019_x64_dvd_5d4b6791.iso
语言:Chinese-Traditional
SHA1:1DCD73DAF81219CEE1A7F706ADDF5868B8992EA2
发布日期:2018/10/03
文件大小:2.37 GB
磁力链接:ct_microsoft_hyper-v_server_2019_x64_dvd_5d4b6791.iso

Windows Server 2019 Essentials (x64) – DVD (Chinese-Traditional)

文件名:ct_windows_server_2019_essentials_x64_dvd_60b61901.iso
语言:Chinese-Traditional
SHA1:F079227B3D642E4ED4659D3080597F8E83BF2037
发布日期:2018/10/03
文件大小:4.19 GB
磁力链接:ct_windows_server_2019_essentials_x64_dvd_60b61901.iso

Windows Server 2019 英文版

Windows Server 2019 (x64) – DVD (English) 英文版

文件名:en_windows_server_2019_x64_dvd_3c2cf1202.iso
SHA1:24F7C459F3612DF82205A45FDB68CA9F96BC5D80
文件大小:4.25GB
发布时间:2018-10-03
磁力链接:en_windows_server_2019_x64_dvd_3c2cf1202.iso
百度网盘: https://pan.baidu.com/s/1PROzT-5IVx34_g8yIvkNpA 密码: r6u2

Microsoft Hyper-V Server 2019 (x64) – DVD (English)

文件名:en_microsoft_hyper-v_server_2019_x64_dvd_1804cc67.iso
语言:English
SHA1:04B40E7E2FD14C964086C214D6409795908F6887
发布日期:2018/10/03
文件大小:2.21 GB
磁力链接:en_microsoft_hyper-v_server_2019_x64_dvd_1804cc67.iso

Windows Server 2019 Essentials (x64) – DVD (English)

文件名:en_windows_server_2019_essentials_x64_dvd_70296902.iso
语言:English
SHA1:66706C2FC927066C90DF294E8B67D4A70E564986
发布日期:2018/10/03
文件大小:4.03 GB
磁力链接:en_windows_server_2019_essentials_x64_dvd_70296902.iso

Windows Server 2019 Language Pack (x64) – DVD (Multiple Languages)

文件名:mu_windows_server_2019_language_pack_x64_dvd_679192ff.iso
SHA1:21E3695D86D67F49C7237F2CBDB8B2B42B24D06D
文件大小:2.64GB
发布时间:2018-10-03
磁力链接:mu_windows_server_2019_language_pack_x64_dvd_679192ff.iso
百度网盘: https://pan.baidu.com/s/1lzErXBBN5kYp1rNe2z2-EA 密码: bcme

Operating system edition KMS Client Setup Key
Windows Server 2019 Datacenter
WMDGN-G9PQG-XVVXX-R3X43-63DFG

Windows Server 2019 Standard
N69G4-B89J2-4G8F4-WWYCC-J464C

Windows Server 2019 Essentials
WVDHN-86M7X-466P6-VHXV7-YY726

Windows Server 2019 release 官网ISO下载地址:

Standard & Datacenter (Should be able to convert to RTM)

Chinese (Simplified) 简体中文版:

https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVER_EVAL_X64FRE_ZH-CN.ISO

Chinese (Traditional) 繁体中文版:

https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVER_EVAL_X64FRE_ZH-TW.ISO

English (US) 英文版:

https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVER_EVAL_X64FRE_EN-US.ISO

Essentials (Equals the RTM)

Chinese (Simplified) 简体中文版:

https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVERESSENTIALS_OEM_X64FRE_ZH-CN.ISO

Chinese (Traditional) 繁体中文版:

https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVERESSENTIALS_OEM_X64FRE_ZH-TW.ISO

English (US) 英文版:

https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVERESSENTIALS_OEM_X64FRE_EN-US.ISO

Hyper-V RTM

Chinese (Simplified) 简体中文版:

https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVERHYPERCORE_OEM_X64FRE_ZH-CN.ISO

Chinese (Traditional) 繁体中文版:

https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVERHYPERCORE_OEM_X64FRE_ZH-TW.ISO

English (US) 英文版:

https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_release_SERVERHYPERCORE_OEM_X64FRE_EN-US.ISO

 

CENTOS7 DNS 代理设置

// This settings is only for forwarding DNS Server
options {
pid-file “/var/run/named/named.pid”;
//我这里设定 pid-file !这个时候,
//请特别留意该路径的所有人 ( owner )
//一定是要 named 这个人才行!
forward first;
//只允许 forward!
forwarders {
211.142.236.87;
114.114.114.114;
};
max-cache-size 8M;
};

CENTOS7.4 DHCP服务设置

option domain-name-servers 114.114.114.114;
ddns-update-style interim;
default-lease-time 3600;
max-lease-time 7200;
log-facility local7;

subnet 10.12.77.0 netmask 255.255.255.0 {
range 10.12.77.2 10.12.77.254;
option routers 10.12.77.1;
option domain-name-servers 180.76.76.76;
default-lease-time 7200;
max-lease-time 7200;
}

CENTOS7.4 squid网关代理设置

acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow localhost manager
http_access deny manager
http_access allow localnet
http_access allow localhost
http_port 3128 transparent
cache_dir ufs /home/cache 1024 16 256
coredump_dir /var/spool/squid
refresh_pattern -i .css$ 3600 90% 48800 reload-into-ims
refresh_pattern -i .js$ 1440 90% 28800 reload-into-ims
refresh_pattern -i .html$ 1440 90% 14400 reload-into-ims
refresh_pattern -i .jpg$ 1440 90% 28800 ignore-reload
refresh_pattern -i .gif$ 1440 90% 28800 ignore-reload
refresh_pattern -i .swf$ 1440 90% 28800 ignore-reload
refresh_pattern -i .jpg$ 1440 90% 28800 ignore-reload
refresh_pattern -i .png$ 1440 90% 28800 ignore-reload
refresh_pattern -i .bmp$ 1440 90% 28800 ignore-reload
refresh_pattern -i .doc$ 1440 90% 28800 ignore-reload
refresh_pattern -i .ppt$ 1440 90% 28800 ignore-reload
refresh_pattern -i .xls$ 1440 90% 28800 ignore-reload
refresh_pattern -i .pdf$ 1440 90% 28800 ignore-reload
refresh_pattern -i .rar$ 1440 90% 28800 ignore-reload
refresh_pattern -i .zip$ 1440 90% 28800 ignore-reload
refresh_pattern -i .txt$ 1440 90% 28800 ignore-reload
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 14400
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 14400 90% 4880
cache_mem 1024 MB #设置squid可以使用的内存大小
cache_swap_low 90 #缓存内部对象的替换的衡量基线
cache_swap_high 95 #缓存内部对象替换的最高程度
maximum_object_size 32768 KB #设置squid磁盘缓存最大文件
maximum_object_size_in_memory 1024 KB #设置squid内存缓存最大文件
cache_replacement_policy lru #设置squid磁盘替换策略:最少近来使用(LRU),贪婪对偶大小次数(GDSF),和动态衰老最少经常使用(LFUDA)
memory_replacement_policy lru #设置squid内存替换策略:最少近来使用(LRU),贪婪对偶大小次数(GDSF),和动态衰老最少经常使用(LFUDA)
acl QUERY urlpath_regex -i cgi-bin \? \.asp \.php \.jsp \.cgi
acl denyssl urlpath_regex -i ^https:\\
access_log /home/cache/access.log squid
cache_log /home/cache/cache.log
cache_store_log /home/cache/store.log
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
dns_nameservers 180.76.76.76 8.8.8.8
cache_effective_user squid squid
acl allow_lan src 10.12.77.0/24
#acl badurl url_regex “/usr/local/squid/sexurl.txt”
acl all src all
http_access allow allow_lan
http_access allow all
visible_hostname siyuan

你好,我的朋友

您访问的是我博客的第一篇文章。不知道写些什么,只能发表类似的文章作为纪念。

以前搞过很多站点,都因为访问量太小,或者技术不够熟练,被黑了许多。

这次希望不要这样了。

我只想在这里展示学习经验与工作成果,或许能够帮到您。

请您不要再攻击我的站点了。OK ?