發表文章

目前顯示的是 10月, 2015的文章

iOS App Transport Security has blocked a cleartext HTTP resource load since it is insecure

問題: App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file. Apple在iOS9之後新增App Transport Security(ATS)的機制,禁止訪問未加密的連線,如果沒有特別排除這個設定,會遇到這個錯誤。 解決方法: 1. 設定排除domain <key>NSAppTransportSecurity</key>     <dict>         <key>NSExceptionDomains</key>         <dict>             <key>www.domain.com</key>             <dict>                 <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>                 <true/>             </dict>         </dict>     </dict> 2. 關閉ATS機制,此方法允許訪問ip位址  <key>NSAppTransportSecurity</key>     <dict>         <key>NSAllowsArbitraryLoads</key>         <true/>     </dict> reference: https://forums.developer.apple.com/thread/6205 https://developer.apple.com/library/prerelease/ios/technotes/App-Transport-Securit

java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer

當用jersey 1.19建立RESTful服務時,遇到java.lang.ClassNotFoundException: com.sun.jersey.spi.container.servlet.ServletContainer的錯誤訊息。 解決方法: 1.將相關jar檔全複製到web-inf/lib/之內,就可以解決。(asm-3.3.1.jar, jersey-bundle-1.19.jar, jersey-core-1.19.jar, jersey-server-1.19.jar, son-20140107.jar, jsr311-api-1.1.1) 2. the server had no jars in the lib folder. Make sure it has access to all dependencies in: project -> properties -> development assembly -> add -> java build path entries. 正常啟動tomcat產生的訊息如下: 十月 20, 2015 4:35:02 下午 org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina 十月 20, 2015 4:35:02 下午 org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.52 十月 20, 2015 4:35:05 下午 com.sun.jersey.api.core.servlet.WebAppResourceConfig init INFO: Scanning for root resource and provider classes in the Web app resource paths:   /WEB-INF/lib   /WEB-INF/classes 十月 20, 2015 4:35:05 下午 com.sun.jersey.api.core.ScanningRe

iOS app

JSON Swift UITableView: Load data from JSON http://www.kaleidosblog.com/swift-uitableview-load-data-from-json iOS Tutorial: Loading data from an external database using JSON & Storyboards - VIDEO 3 https://www.youtube.com/watch?v=9R1ju28qFyE AFJSONOperation UTF-8 chars? http://www.raywenderlich.com/forums/viewtopic.php?f=2&t=3037 How To Fetch and Parse JSON Using iOS SDK http://www.appcoda.com/fetch-parse-json-ios-programming-tutorial/ Parsing JSON in Objective-C using NSJSONSerialization https://www.safaribooksonline.com/blog/2013/03/06/parsing-json-in-objective-c-using-nsjsonserialization/ Tutorial: Fetch and parse JSON in iOS6 http://www.touch-code-magazine.com/tutorial-fetch-and-parse-json-in-ios6/ IPhone, synchronous and asynchronous JSON Parse http://www.hbensalem.com/iphone-2/iphone-synchronous-and-asynchronous-json-parse/ Swift Swift resources https://developer.apple.com/swift/resources/ Start Developing iOS Apps (Swift) https://developer.a

修改ubuntu開機自動開啟或關閉X Window

關閉方法: 編輯/etc/default/grub 修改GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” 或”” 改成GRUB_CMDLINE_LINUX_DEFAULT=”text” 或”quiet splash text” 再執行update-grub 開啟方法: 與上步驟相反的設定 或startx 或sudo service gdm start referrence http://askubuntu.com/questions/16371/how-do-i-disable-x-at-boot-time-so-that-the-system-boots-in-text-mode http://askubuntu.com/questions/276937/how-to-efficiently-enable-disable-gui-in-ubuntu-server-12-04 http://askubuntu.com/questions/402083/enable-disable-ubuntu-desktop-environment-on-ubuntu-12-04-1-server-i386 http://askubuntu.com/questions/53822/how-do-you-run-ubuntu-server-with-a-gui

Raspberry Pi相關文獻

Raspberry Pi 2 Model B 使用心得 http://cheng-min-i-taiwan.blogspot.tw/2015/02/raspberry-pi-2-model-b.html Raspberry Pi 網路設定 http://cheng-min-i-taiwan.blogspot.tw/2013/02/raspberry-pi_23.html RPi VerifiedPeripherals http://elinux.org/RPi_VerifiedPeripherals Category Archives: Raspberry Pi Hobby computer http://www.wirelesshack.org/category/raspberry-pi-hobby-computer Raspberry Pi 2 - FAQ and collated answers https://www.raspberrypi.org/forums/viewtopic.php?p=683295 Measuring Internet Speed In Python Using Speedtest-cli http://www.raspberrypi-spy.co.uk/2015/03/measuring-internet-speed-in-python-using-speedtest-cli/ Raspberry Pi 安裝心得、教學、簡介 https://wwssllabcd.github.io/blog/2013/01/31/how-to-setup-raspberry-pi/ 掛載外部_usb_storage https://wwssllabcd.github.io/blog/2013/01/31/how-to-setup-raspberry-pi/#%E6%8E%9B%E8%BC%89%E5%A4%96%E9%83%A8_usb_storage 安裝_VNC_server https://wwssllabcd.github.io/blog/2013/01/31/how-to-setup-raspberry-pi/#%E5%AE%89%E8%A3%9D_VNC_server A tea

防止linux ssh被暴力攻擊defend Brute Force Attacks

方法: 1.用fail2ban 2.用DenyHosts 3.用iptables (可能鎖到自己) reference https://www.rackaid.com/blog/how-to-block-ssh-brute-force-attacks/ http://pulipuli.blogspot.tw/2011/07/centosfail2ban.html http://denyhosts.sourceforge.net http://www.lovelucy.info/vps-anti-ssh-login-attempts-attack.html http://blogger.gtwang.org/2014/05/linux-ssh-public-key-authentication.html http://blog.longwin.com.tw/2005/12/ssh_keygen_no_passwd/ https://help.ubuntu.com/community/SSH/OpenSSH/Keys http://xtony77.logdown.com/posts/209067-ubuntu-notes-using-ssh-key-login