博文

OnReceivedSslError Webview Android

public override void OnReceivedSslError(WebView view, SslErrorHandler handler, SslError error) { AlertDialog.Builder builder = new AlertDialog.Builder(this.activity); AlertDialog ad = builder.Create(); string message = "Certificate error."; switch (error.PrimaryError) { case SslErrorType.Untrusted: message = "Certificate is untrusted."; break; case SslErrorType.Expired: message = "Certificate has expired."; break; case SslErrorType.Idmismatch: message = "Certificate ID is mismatched."; break; case SslErrorType.Notyetvalid: message = "Certificate is not yet valid."; break; } message += " Do you want to continue anyway?"; ...

A Small JS DOM Selector Lib

https://github.com/jquery/sizzle/wiki

Linux System Backup Script

#!/bin/bash uploaddir= "/var/www/xxx/"       #要备份的文件夹 bkdir= "/var/xxx_bk/$(date +%F)" #备份文件存放地址 以日期作为文件夹名字 mkdir $bkdir tar -cf $bkdir /upload . tar $uploaddir  #文件太多的话压缩太费时间 就直接打包比较方便 mysqldump -h127.0.0.1 -uuser1 -ppasswd database0 |  gzip > $bkdir /database0 .sql.gz  #保存数据库并压缩 find /var/www/is_uestc_edu_cn -ctime 1 > $bkdir /changed .log  #保存24小时内修改过的文件地址

Programming for Kids

MIT创建了 Scratch ,对于8岁大的孩子来说,它是一个很好的激发编程兴趣的工具。10岁的小孩就可以更进一步,通过 Greenfoot 开始学习真正地使用Java来编程。 但是我认为,任何12岁以上的孩子,只要对编程有兴趣,就可以一本正经地去学习Java编程了,并且可以使用专业的工具来学。在之前为孩子写的那本书里,我使用Eclipse作为IDE,但在现在这本新书里,我选择了IntelliJ IDEA社区版,它也是免费的。

zepto.js browser compatability

just found something new to me. Zepto.js is a jquery.js compatible JS lib.

Cordova android SSL issue

http://ivancevich.me/articles/ignoring-invalid-ssl-certificates-on-cordova-android-ios/ Ignoring invalid SSL certificates on Cordova for Android and iOS written by  jc ivancevich When developing  mobile apps , it’s very common that we have to connect to web services or APIs which may be secure (https) but are still under development, so its  SSL  certificate is not valid  or self-signed. This would happen unless you want to spend a hundred bucks on a wildcard certificate for development environments. For cases like the mentioned above it’s useful to be able to  ignore errors generated by invalid certificates,  so we can test the app, install it on any device , etc. In order to get rid of this problem, the process changes depending on the platform we’re targeting. iOS (Objective-C / Swift / Cordova) iOS will  always complain  about invalid certificates, either in debug or release mode. To avoid thi...

SVN with Xcode

转自这里: http://blog.csdn.net/brokge/article/details/16807167 http://www.cnblogs.com/gloolo/archive/2011/12/20/2295232.html 首先:xcode目录下的xcode-》preferences-》accounts删除左边栏所有的检出的操作数据 其次:重新打开xcode开始重新checkout 最后:我的成功了Y(^_^)Y http://stackoverflow.com/questions/19177699/using-svn-1-8-3-with-xcode-5 Writing to 'defaults' won't work for Xcode 5. Newer version of Xcode ship with it's own SVN binary located in: /Applications/ Xcode . app / Contents / Developer / usr / bin / You need to replace this binary to upgrade Xcode's SVN client to 1.8. Assuming your new SVN client is located in /usr/local/bin/ (default brew install path) type the following in a terminal: cd / Applications / Xcode . app / Contents / Developer / usr / bin / sudo mv ./ svn ./ svn . org sudo mv ./ svnadmin ./ svnadmin . org sudo mv ./ svndumpfilter ./ svndumpfilter . org sudo mv ./ svnlook ./ svnlook . org sudo mv ./ svnrdump ./ svnrdump . org sudo mv ./ svnserve ./ svnserve . org sudo...