2016年9月9日 星期五


筆記』eclipse 專案所在位置+workspace 觀看查詢及修改

eclipse 開啟時會給用的人選擇要用哪個 workspace 



選擇不要再問,某天要知道workspace 的方法如下:



1.Preferences-> General -> Workspace





 



選擇不要再問,某天要換 workspace 的方法不只一種,這裡介紹的是設定下次開始的時候再次詢問:



1.Preferences-> General -> Startup and Shutdown -> Workspaces



將 Prompt for workspace on startup 打勾,打勾是要問





 



要看現在 project 的所在位置:



1. 專案右鍵 -> Properties -> Resource





 




2016年6月26日 星期日

筆記』nw.js 快速開始~執行+打包

環境:windows下快速開始



1.執行:如果是用資料夾裝起來的話,直接拖曳整個資料夾到nw.exe,放開後就會以nw.exe開啟。



或是開始nw.exe之後,拖曳html檔案到nw.exe開啟,也可以執行。



 



2.打包成.exe後執行,方法如下



 



1. 先至官網 http://nwjs.io/  下載



下載下來解壓縮後會是這樣:





 



2. 按照官方github( https://github.com/nwjs/nw.js )裡的快速開始



・創一個 index.html 跟 package.json





・檔案要寫的內容可以直接複製貼上





 



3. 把檔案選起來壓縮(package.json要在根目錄)



(創一個資料夾放的話,也要進到資料夾裡選起來壓縮!)





 



4. 壓縮格式要選ZIP,選RAR後面會失敗



將副檔名改為nw





 



5. 將剛才的.nw檔放在剛剛官網下載下來,解壓縮過後的資料夾裡





 



6. 開啟命令提示字元 -> 到達 nwjs 資料夾底下 -> 確認你的.nw 檔要跟 nw.exe 同層  -> 輸入 copy /b nw.exe+***.nw **.exe





 



7. 執行成功會就會多出一個執行擋





 



8. 點兩下就可以直接執行了:D!!






2016年6月11日 星期六


2016年4月24日 星期日


2016年3月14日 星期一

筆記 』在部落格放程式碼

想要在部落格裡放入程式碼



但是不想用一般(字有可能因為換行跑掉)的貼上



範例呈現方式:





 



實現方法:



 



先到  https://gist.github.com





複製script





 



在部落格打文章這裡:



按下原始碼,貼上剛剛複製來的





再按一下原始碼回到原本發表文章模式,會什麼都沒有看到,沒看到東西是正常的





寫好文章,發表在部落格上就會出現了



 



 




2016年3月9日 星期三

筆記 』OCA Java SE 8 考試範圍

Oracle Certified Associate, Java SE 8 Programmer



考試號碼:1Z0-808



考試網站:



https://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=5001&get_params=p_exam_id:1Z0-808



 



TOPICS



Java Basics 



  • Define the scope of variables 

  • Define the structure of a Java class

  • Create executable Java applications with a main method; run a Java program from the command line; including console output.

  • Import other Java packages to make them accessible in your code

  • Compare and contrast the features and components of Java such as: platform independence, object orientation, encapsulation, etc.



Working With Java Data Types 



  • Declare and initialize variables (including casting of primitive data types)

  • Differentiate between object reference variables and primitive variables

  • Know how to read or write to object fields

  • Explain an Object's Lifecycle (creation, "dereference by reassignment" and garbage collection)

  • Develop code that uses wrapper classes such as Boolean, Double, and Integer.  



Using Operators and Decision Constructs 



  • Use Java operators; including parentheses to override operator precedence

  • Test equality between Strings and other objects using == and equals ()

  • Create if and if/else and ternary constructs 

  • Use a switch statement 



Creating and Using Arrays 



  • Declare, instantiate, initialize and use a one-dimensional array

  • Declare, instantiate, initialize and use multi-dimensional array



Using Loop Constructs 



  • Create and use while loops

  • Create and use for loops including the enhanced for loop

  • Create and use do/while loops

  • Compare loop constructs

  • Use break and continue  



Working with Methods and Encapsulation 



  • Create methods with arguments and return values; including overloaded methods

  • Apply the static keyword  to methods and fields  

  • Create and overload constructors; including impact on default constructors

  • Apply access modifiers

  • Apply encapsulation principles to a class

  • Determine the effect upon object references and primitive values when they are passed  into methods that change the values



Working with Inheritance 



  • Describe inheritance and its benefits

  • Develop code that demonstrates the use of polymorphism; including overriding and object type versus reference type

  • Determine when casting is necessary

  • Use super and this to access objects and constructors

  • Use abstract classes and interfaces



Handling Exceptions 



  • Differentiate among checked exceptions, unchecked exceptions, and Errors

  • Create a try-catch block and determine how exceptions alter normal program flow

  • Describe the advantages of Exception handling 

  • Create and invoke a method that throws an exception

  • "Recognize common exception classes (such as NullPointerException, ArithmeticExcpetion, ArrayIndexOutOfBoundsException, ClassCastException)"



Working with Selected classes from the Java API (8新加的)



  • Manipulate data using the StringBuilder class and its methods

  • Creating and manipulating Strings

  • Create and manipulate calendar data using classes from java.time.LocalDateTime,  java.time.LocalDate, java.time.LocalTime, java.time.format.DateTimeFormatter, java.time.Period 

  • Declare and use an ArrayList of a given type 

  • Write a simple Lambda expression that consumes a Lambda Predicate expression