2018年11月19日 星期一

Python notes: Calculate delay time by WinDBG log

用WinDBG開Event Timestamps可以產生下面格式的log:
Fri Sep 21 18:43:50.946 2018 (UTC + 8:00): @#$#^$@#$^
以下python code用來找出兩個指定log中的時間差

2018年11月4日 星期日

Python notes: LeetCode第一題: Two Sum

為了挑戰Python程度,開始了LeetCode人森阿

題目:
https://leetcode.com/problems/two-sum/

Given an array of integers, return indices of the two numbers such that they add up to a specific target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
Example:
Given nums = [2, 7, 11, 15], target = 9,

Because nums[0] + nums[1] = 2 + 7 = 9,
return [0, 1].

Python notes: 字母找字串

隨機抽選個題目來做,結果花了我超久的時間哈哈哈哈
題目: 请输入星期几的第一个字母来判断一下是星期几,如果第一个字母一样,则继续判断第二个字母。
http://www.runoob.com/python/python-exercise-example31.html

2018年11月2日 星期五

Linux tips

Linux真的是個不常用就很容易忘掉要怎麼用的東西..


  • Unload module
rmmod nouveau

  • Change file attribute
sudo chmod 777 filename

Python notes: Calculate delay time by WinDBG log

用WinDBG開Event Timestamps可以產生下面格式的log: Fri Sep 21 18:43:50.946 2018 (UTC + 8:00): @#$#^$@#$^ 以下python code用來找出兩個指定log中的時間差