My Profile Photo

Hao's Keeper


A blog to place memos


  1. JSP Access Enum

    ```java public enum TheEnum { LOCALE_BASENAME(“value1”); …


  2. Detail in Xcode SwiftUI Core Data Sample

    ```swift @main struct SampleCoreDataApp: App { let persistenceController = PersistenceController.shared …


  3. querySelector hidden or not hidden

    Vanilla javascript: …


  4. Git Commit Your Changes Or Stash Them Before You Merge

    Commit the changes git commit -m "updating message" …


  5. D3js Update Donut Chart

    ```javascript function getDonutChart(chartDiv) { let innerRadius = 30; let outerRadius = 44; …


  6. Get Number Of Days In A Specifice Month

    If day is 0, it will return the last day of last month. …


  7. Slice To Get Last Characters Of String

    Syntax slice() slice(start) slice(start, end) …


  8. Count Number of Option Tag In Select

    document.querySelector('#selectTag').length …


  9. Misuse of Java8 Optional

    The intent of Java when releasing Optional was to use it as a return type The practice of using Optional as a method parameter is even discouraged by some code inspectors. …


  10. Spread Syntax

    Function argument list (myFunction(a, ...iterableObj, b)) Array literals ([1, ...iterableObj, '4', 'five', 6]) Object literals ({...obj, key: 'value'}) …