WordPress国内无法访问解决办法

由于WordPress内置很多主题都采用了Google公共库或字体等导致国内无法访问该网站。
解决办法如下:

利用WordPress插件

安装以下插件即可:
搜关键词 [Useso take over Google]

如果只想替换字体部分,使用以下插件即可:
搜关键词 [Disable Google Fonts]

手动替换

Google公共库替换
1、首先在程序源代码中找到调用Google前端公共库的地址,比如:
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js?ver=3.4.2'></script>

2、将Google前端库的域名 ajax.googleapis.com 修改为:ajax.useso.com 即可,如下所示:
<script type='text/javascript' src='http://ajax.useso.com/ajax/libs/jquery/1.7.2/jquery.min.js?ver=3.4.2'></script>

3、我们会自动将Google前端公共库的JS资源缓存在360网站卫士全国的CDN节点上。

Google字体替换
这个同上,只要把调用Google库中的域名googleapis替换成useso就可以了!

Transfer certificates and the kind to your new computer

When you get a new macbook pro, as the apple developer, we need to prepare the things below in order to keep on coding in this new computer.

1> Download all provisioning files

In your new computer > open Xcode > Preferences > Accounts > login your Apple ID for your projects > once logged in click “View Details” on the bottom right side > once loaded all the info click “Download All” on the bottom left side > 50% done.

Lastly, we need to transfer all corresponding certificates with “Keychain Access”

2> Export keychain items from your old computer (“Keychain Access”)

  1. Select “My Certificates” from the left side panel

  2. Select the items you want to export in the Keychain Access window.

  3. Choose File > Export Items.

    If the Export Items menu is dimmed, then at least one of the selected items can’t be exported.

  4. Select a location to save your keychain items, click the File Format pop-up menu, then choose a file type.

  5. Click Save.

  6. Enter a password.

    The password is required to access the exported keychain items when you import them on another computer. Some exported items, such as public keys, don’t require a password.

3> Import keychain items into your new computer (“Keychain Access”)

  1. Choose File from Menu > Import Items.

  2. Navigate to the keychain items file you want to import and select it.

  3. In the Destination Keychain pop-up menu, choose the keychain you want to import to, then click Open.

And there you go! Remember to reopen your Xcode.

Huffman Coding 霍夫曼编码

霍夫曼编码主要是利用当前出现的不同字符重新创建对应键值,且字符出现频率越高,采用越短键值映射,降低大小。

比如对“Life is beautiful.”进行霍夫曼编码的话,只要创建[L|i|f|e|s|b|a|u|t|l| |.]12个不同键值代替即可,而不是如UTF8编码,每个字符都需要占用不变的大小(大小由该编码总共可表示的字符数决定):1~4字节。

霍夫曼编码后大小约为:65bits
原大小:18symbols * 8bits 约为144bits
效果:大小降低一倍多

huffman