GFW with wordpress avatar

from this year,i found my avatar in blog was not shown,and the link of image return 404,so in china,the most possible reason is GFW.

luckly,there is some ways to break through.

1、use ssl

you can add these words in your function.php

2、use local cache

create a dir in your root dir,and put a image name “default.png” in this folder.

3、use other platform

like duoshuo


check app is installed on ios device

we can use ios provate api,but your app may be refused by appstore.

= ios6.0


use getSystemService in static method

Cannot make a static reference to the non-static method getSystemService(String) from the type

so when you want getSystemService in a static method,look at this:

php covert base64 to image

wish these code can help you..

js extend method

in jquery ,we can use extend method like this to copy object

in javascript ,we should complete it through my own code:

set gradle utf-8 encode

“xxx” is translated here but not found in default locale

 I got is Lint errors like (Even I changed MissingTranslation erros in Lint from fatal to warning) when i export apk files from my android project

“menu_setting” is translated here but not found in default locale

I got the temporary solution.

          add the missing line ” <string name=”menu_settings”>Setting</string>”” in default values folder,then clean and build project,it’ll be correct.

No Content-Security-Policy meta tag found.

when  i run my app on android device ,i found some msg from console log:

le:///android_asset/www/plugins/cordova-plugin-whitelist/whitelist.js: Line 25 : No Content-Security-Policy meta tag found. Please add one when using the cordova-plugin-whitelist plugin.

i’ve added whitelist pulugins in my project,but it still give this tips?

in the end , i found answer in officel site:


Content Security Policy

Controls which network requests (images, XHRs, etc) are allowed to be made (via webview directly).

On Android and iOS, the network request whitelist (see above) is not able to filter all types of requests (e.g. <video> & WebSockets are not blocked). So, in addition to the whitelist, you should use aContent Security Policy <meta> tag on all of your pages.

On Android, support for CSP within the system webview starts with KitKat (but is available on all versions using Crosswalk WebView).

Here are some example CSP declarations for your .html pages:


so ,add meta tag in your html files,you’ll solved this problem!


Angular Js Replace Links In Strings By Regex Filter

define your custom filter

then ,use like this: