5/1 勞動節在台灣的朋友放假的同時, 我終於迎來人生最重要的考驗之一 (是嗎?) - DMV 路考 (behine-the-wheel drive test). 話說本來在考完 筆試 (written test) 之後, 一直想找時間把所有的路考的東西整理一下. 本來我是不打算約 5/1 這麼近的時間, 剛考完筆試想要休息一下, 加上工作繁忙 … blah blah (我是不會承認我拖延症復發的). 原本的路考時間是 7/2, 後來因為保險問題, 就決定還是早早去考比較好, 拿到正式駕照後也好跟他們 nego 一下 保費不是? (後來還是因為太懶沒有打電話去 nego)
Japan Town - The Northern California Cherry Blossom Festival
日本城櫻花節 (Japan Town - The Northern California Cherry Blossom Festival)
每年四月第三個週末很熱鬧, 正好是美國的復活節 Easter週末, 在這周前的一兩週各地的活動很多, 我們也趁熱鬧跑去 Golden Gate Park 參加了撿彩蛋的活動, 不過兒子不太買單, 覺得撿彩蛋頗無聊, 倒是我撿到快累死了.
美國汽車保險
Android Hopping Animation
How to precisely jump to a specific time in AVPlayer
What’s the issue?
When using AVPlayer method - SeekToTime, I found there’s an issue that I don’t understand: the position of pointed time is not correct. In other word, the return time slot is not exactly what you want.
Android StrictMode for Debugging
Android StrictMode for debugging
Introduction
Android provides a handy tool for developers to see what happened to their Apps. Sometimes, you just forgot to keep massive loading job off the main UI thread, e.g., network access, database query, or something you need much time to handle, in these cases, you usually got ANR dialogs to notify you: Your App is going to spend too much time on something in UI thread.
UIAlertViewController Text Alignment
Small tip
You might wanna change the text alignment of the alert controller. Let’s say, change the alignment from center to right. Then the following is for you.
Just simply open a playground and run these code
1 | import UIKit |
The most important thing is the key attributedMessage
. An alert controller can change its text alignment value by using this key.
[References]
MySQL - Error 1045 (28000)
What happened?
Alright, I don’t know what happened when trying to log in to MySQL. And it shows that message: MySQL - Error 1045 (28000) using password: YES. I am pretty sure that user/pwd pair is correct. After searching and studying some articles and forum discussions. I found it might be caused by broken SQL or reinstall SQL. The interesting is I can’t remember I had done that before.
DP-Pixel conversion on Android
Introduction
This is just a note for myself to remind me how to do dp-to-pixel translation and vice versa. Let’s see how to do it.
1 | public static float convertDpToPixel(float dp, Context context) { |
It’s pretty simple, enjoy.
Happy Coding.