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



 




2016年2月25日 星期四

手作 』化妝刷具桶

去了藥妝店之後看到刷具桶



想到我的刷具們還散落在格子裡,就想買一個桶子來裝



但是!刷具桶賣完了!!



回家之後心血來潮地上網查一下大家都怎麼收納刷具



有看到普通的桶子、公仔盒、筷子桶...



 



公仔展示盒有蓋子,可防塵!



我又剛好有公仔展示盒!立刻動手做!



成品:



DSC_2432



材料:



公仔盒為大創最高的公仔盒,印象中高16cm ,我之前為了要裝玩具,找了很久都沒有找到20cm的



(大創現在也有網路購物了!!!)



抽屜隔板:



200134



DSC_2435



圖中黃色像口香糖的就是 萬用貼土 



萬用貼土還滿好用的,像黏土一樣~還不怎麼留痕跡!!



我是很久之前買的,現在應該有很多不同的顏色了~



DSC_2436



DSC_2437



這是我刷具桶的格局



中間多加一條,雖然會讓空間比較小,但是刷具們比較不容易東倒西歪的太遠



刷具太歪的話,蓋蓋子的時候容易用到刷子的毛



DSC_2434



 



抽屜隔板還多一些,我就拿來模擬碗盤架,



在改良之後睫毛膏眼線筆也可以一起放~



好拿取~不用一邊想說我記得我有什麼什麼,一邊在盒子裡面翻來翻去




筆記 』Mac 檔案加密

電腦裡面要讓檔案開啟之前先輸入密碼的方法有兩種



1.創一個有密碼映像檔



2.在文件輸出的時候加密碼



 



方法1



開啟 磁碟工具程式 ->點選 新增映像檔





跳出下面的框之後,記得要選加密保護





輸入密碼的時,不要將紀錄密碼打勾,否則在你的電腦裡會記住密碼,將可以直接開啟你的檔案



如果儲存的話,可以在 鑰匙圈存取 刪除已記住的密碼





 



方法2



假如是文字、表格或簡報檔,Pages、Number跟Keynote輸出檔案時就可以加密了





要將 需要密碼才能開啟 打勾






2016年1月25日 星期一

GA 』Google Analytics 客層、興趣 設定

用好 Google Analytics 幾天之後發現:


客層、興趣


都是 0,要另外加程式碼才會開始搜集


 


1.加在原本側欄的 Script 裡


紅色框是 客層、興趣:ga('require','displayfeatures');


螢幕快照 2016-01-08 14.46.35.png   


 


2.確認 廣告功能 狀態


啟用客層和興趣報表 選擇 啟用  


螢幕快照 2016-01-08 15.17.13.png )


 


3.進入 目標對象->客層/興趣


螢幕快照 2016-01-08 14.50.39.png 


 


 


結果:


資料太少的話 Google Analytics 會出現下面的提示


螢幕快照 2016-01-08 14.54.26.png


 


參考:


客層/興趣:https://support.google.com/analytics/answer/244487...


 



2016年1月21日 星期四

筆記 』Eclipse、MyEclipse 修改字體大小

Eclipse、MyEclipse 預設的字體大小只有10,



對我來說字太小,而且中文更是擠在一起



修改字體大小方法:



 



(Windows)Windows -> Preferences



(Mac)Eclipse -> 偏好設定...





 



General -> Appearance -> Colors and Font -> Text Font



字體_1



選 Edit... 會跳出下面的視窗



字體_2  



選好按下確定就確定修改了~



 



PS.這裏的修改是整個字體大小都會改



 



 




2016年1月17日 星期日