發表文章

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

facebook: Bad Response Code: URL returned a bad HTTP response code.

因為facebook的爬蟲cache了舊的狀態,不會立即更新,所以一直顯示抓不到網頁。 解決方法: 進入https://developers.facebook.com/tools/debug/ 輸入網址debug,再按Fetch new scrape information

java 2D swing

http://myleslittlewolf.pixnet.net/blog/post/2836595 http://pydoing.blogspot.tw/2011/05/java-basic-concept-of-gui.html it-easy.tw/java-linedraw/ http://stackoverflow.com/questions/5801734/how-to-draw-lines-in-java https://www.youtube.com/watch?v=MqwSKoWTuZE https://www.youtube.com/watch?v=y7YbQrrcpAQ https://docs.oracle.com/javase/7/docs/api/javax/swing/JFrame.html http://docs.oracle.com/javase/7/docs/api/javax/swing/JComponent.html#method_summary http://www.java2s.com/Tutorial/Java/0261__2D-Graphics/Drawaline.htm http://www.java2s.com/Tutorial/Java/0240__Swing/ExtendsJComponenttocreatedrawingpad.htm http://codex.wiki/question/1992591-2967/ http://www.javaworld.com.tw/jute/post/view?bid=5&id=312003

java read json

http://stackoverflow.com/questions/6511880/how-to-parse-a-json-input-stream http://stackoverflow.com/questions/4308554/simplest-way-to-read-json-from-a-url-in-java http://stackoverflow.com/questions/7467568/parsing-json-from-url

java filter

public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {         // TODO Auto-generated method stub         // place your code here                 //System.out.println("testfilter");         System.out.println(request.getCharacterEncoding());         System.out.println(request.getContentLength());         System.out.println(request.getContentType());         System.out.println(request.getLocalAddr());         System.out.println(request.getLocalName());         System.out.println(request.getLocalPort());         System.out.println(request.getProtocol());         System.out.println(request.getRemoteAddr());         System.out.println(request.getRemoteHost());         System.out.println(request.getRemotePort());         System.out.println(request.getScheme());         System.out.println(request.getServerName());         System.out.println(request.getServerPort());         System.out.println(request.getAsync

restfb publish

restfb publish message FacebookType publishMessageResponse = facebookClient.publish("me/feed",                         FacebookType.class, Parameter.with("message", "hello test")); System.out.println("Published message ID: " + publishMessageResponse.getId()); photo from local FacebookType publishPhotoResponse = facebookClient.publish("me/photos", FacebookType.class,                         BinaryAttachment.with("icon.jpg", new FileInputStream("c:\\icon.jpg")),                         Parameter.with("message", "photo post")); photo from url InputStream inputpic = new URL("http://www.url.com/jpg.jpg").openStream();                 FacebookType publishPhotoResponse = facebookClient.publish("me/photos", FacebookType.class,                         BinaryAttachment.with("icon.jpg", inputpic), Parameter.with("message", "photo post"));

*** /dev/xvda1 should be checked for errors ***

解決*** /dev/xvda1 should be checked for errors *** Edit rcS file: sudo vi /etc/default/rcS add: FSCKFIX=yes run touch /forcefsck then reboot reference http://serverfault.com/questions/627371/how-can-i-check-dev-xvda1