advertisement

2019年6月12日

安裝 Nvidia 顯示卡驅動

下載驅動
https://www.nvidia.com/object/unix.html

# bash -c "echo blacklist nouveau > /etc/modprobe.d/blacklist-nvidia-nouveau.conf"
# /sbin/shutdown -r now
# service lightdm stop
# chmod +x NVIDIA-Linux-x86_64-390.116.run
# ./NVIDIA-Linux-x86_64-390.116.run

-----Testing-----
$ nvidia-settings

2019年6月3日

Linux 方便簡單的截圖軟體 Imagemagick

安裝
# apt-get install imagemagick

執行
$ import sc1.png
$ import -window root image1.png

若出現
import: unable to open X server `' @ error/import.c/ImportImageCommand/366.
錯誤訊息

請重新開機即可

2019年6月2日

No common CD-ROM drive was detected 解決方式

安裝debian netinst  時出現 "No common CD-ROM drive was detected"

請使用https://rufus.ie/ rufus燒入軟體,將ISO燒製USB,並且選擇 DD Image mode


DD Image mode VS ISO Image mode

https://askubuntu.com/questions/896911/is-dd-image-disk-writing-permanent

2018年7月11日

真誠的讚美 帶給雙方美好的感受

如何真誠讚美一個人?

真誠讚美一個人要先有顆真誠的心,願意花時間仔細努力的觀察一個人的優點,找出優點甚至是跟別人不一樣突出的優點,給予讚美真誠的欣賞他


什麼叫不一樣突出的點

簡單舉
在禮堂台上演講者發問問題,讓台下的聽眾來舉手回答,等了一會兒有位人舉了手回答這沒人回答的問題,並且答案完全正確!!在休息時間裝水的時候,我剛好遇到他,我就說:嗨~你怎麼知道剛剛那題的答案呀OAO!! 他跟你說明之後原來他很熱愛看戰爭片所以他很熟這問題,我就覺得:哇賽! 現場那麼多人只有你答得出來耶 好猛喔OAO! 


任何人都一定有優點!!

當你學會觀察別人的優點後,其實會發現任何人都有優點~
簡單舉
身邊的同學有什麼優點? 成績好、很會聊、很會打球、願意無私分享知識。
在更小的事情~
我發現你不但不會隨手丟垃圾,只要你路過看到地上有垃圾都會主動撿起來。
玩遊戲的時候~我仔細觀察發現他玩遊戲滑鼠移動看起來好可愛哦O口O!! 看起來像撲撲車的感覺!!

那那如果是剛出生的小寶寶有什麼優點?  
.
.
.
.
.

2018年7月7日

嫉妒 可以誹謗一個人 也可以讓自己成長

嫉妒?

人類有多達27種情緒,簡單分喜、怒、哀、樂,細分還有渴望、嫉妒、同情等,嫉妒是怎麼樣的一種情緒~

只要是正常人都會有嫉妒之心,嫉妒主要對象是人,我們會嫉妒一個人的好,一個人的優點或快樂,卻不會嫉妒一個人的缺點或不快樂,嫉妒屬於七宗罪對人類惡行的之一,在嫉妒心的作用之下,人可能會透過謠言、搬弄是非、誹謗和其他間接的行為以貶損被嫉妒的人,而無意之間造口業。



不好的行為

口業不論是在道教、佛教、一貫道或基督教各宗教都共同指出一個方向(Google很多),不能口出惡言、散布謠言或搬弄是非詆毀他人,應該說好話,如果是無神論者,我可以跟你說有因就會有果,做了惡劣行為會不會有報應我沒見證過我不知道,也許有些人所說的報應只是人給予加害人的另一種回報,但我可以確定的是有因就會有果,有原因才會有結果,這也是在自然界科學都很常見的。

簡單舉如果一個人一天到晚都在想要怎麼陷害那個人要怎麼到處詆毀那個人,可能你會花很多心思在策劃如何陷害他,而當你一開口到處散佈不實謠言詆毀他人,別人對你的第一印象就是你很愛說說別人的壞話或毀謗他人,而這樣的結果不僅浪費時間在思考怎麼陷害一個人,一個經常到處口出惡言,會有多少人喜歡他呢?
相反的一個人仔細觀察一個人看出一個人的好,用真誠的心來讚美他,到處讚美別人說好話,別人想到你的第一瞬間不會是惡事,而是你的好話!
真誠的讚美

被害人的影響

這些惡事會帶給受害者很深的影響,一個被嫉妒的人常常會因為擔心「嫉妒」給自己帶來的人際關係的負面影響而感到不安,也因為害怕自己成為眾矢而感到惶恐,這種擔憂和顧慮造成他們巨大的心理折磨。


好的行為

嫉妒是複雜的情緒,我們要如何利用嫉妒的心來讓自己成長、讓自己進步~
仔細觀察他人找出他的優點向他學習或模仿來提升自我,讓自己成長、讓自己進步,嘗試讓自己接近或達到被嫉妒的人的成就,或者在其他方面能夠更勝於他,來緩和嫉妒的情緒。 簡單舉例如果有個英文很好的同學每次段考英文總是拿第一,而你是位很努力很拼命的人,不管再怎麼努力英文還是無法贏過他,仔細觀察為什麼他的英文總是這麼好,他的優點是什麼,向他學習他的優點或請教他,或許他從小在國外受教育所以英文對他來說易如反掌,那先天的優勢我們可以反過來思考我們自身的優勢,加強自身的強項來戰勝他人,達到自我成長也是可以的。




正向思考

當別人嫉妒你表示你實力很強,當別人抹黑搬弄是非表示他們不願意承認你的好,他們不願意承認他們自己錯了,他們是在幫你消業障,即使全世界沒人相信你,只要有個好朋友願意相信你就足夠,不管有多少人想要惡意扭曲抹黑一個人,問心無愧永遠堅持做一個正直的人不去傷害人堅持到底!


自我的影響

好的嫉妒會讓人有一種被他人的優勢或成功所激勵的感覺,可以讓自己成長許多,邁向成功的一步。

兩舌

兩舌則是利用機會在兩人之間道長話短並搬弄是非,最終目的在於挑撥離間,破壞當事人的處事和諧。

在日常生活中,犯了這四項口業,其惡口傷害了對方感情,妄言破壞了當事人人格,而搬弄是非及綺語亦使彼此相處無法真誠對待。 ref: https://zh.wikipedia.org/wiki/%E5%8F%A3%E6%A5%AD

2017年4月10日

How to choose right PWM frequency

The PWM switching frequency has to be much higher than what would affect the load (the device that uses the power), which is to say that the resultant waveform perceived by the load must be as smooth as possible. The rate (or frequency) at which the power supply must switch can vary greatly depending on load and application, for example
Switching has to be done several times a minute in an electric stove; 120 Hz in a lamp dimmer; between a few kilohertz (kHz), to tens of kHz for a motor drive; and well into the tens or hundreds of kHz in audio amplifiers and computer power supplies.


For a question like this, you will probably get as many answers as there are people interested in answering. Here is my answer: It depends.
Here are some of the limiting factors, first the lower limits:
  • Persistence of vision:
    • Different people are differently sensitive to flicker in a light source. Some would notice flicker even at 100 Hertz, others perhaps not even at as low as 10 Hz.
    • Motion of light source relative to the eye makes flicker more discernible, scaling up with speed of the motion.
    • Human vision sensitivity at low intensity of light - both ambient and source intensity. At very low intensity, the eye is much more sensitive to any change in intensity. So an LED operated at low duty cycle / low current and in a dark environment would require a higher minimum PWM frequency.
Now the upper limits:
  • LED turn-on characteristics: An LED cannot be toggled at arbitrarily high frequency, once the pulse duration approaches the turn-on time, the LED never really turns on fully, hence linearity of PWM control is lost to begin with, and at higher frequency / shorter pulses, eventually the LED just stays dim or off.
  • PWM provider capabilities: Your microcontroller would have its own maximum PWM rate, which sets a hard limit.
  • Switching losses: Any switching system, MOSFET based, BJT based, or other, suffers switching losses of power as switching rate increases. At one point this become significant both in terms of heating of switching device, and efficiency of illumination.
Thus, depending on these parameters, and any others affecting your specific requirement, the correct answer could be anywhere in the 50 Hz to few dozen KHz range.

motor frequency 可以測試不同頻率下輸出電流來決定

Ref:

2016年12月21日

Docker 安裝在 Windows 快速建置Linux Debian 環境

Host(PC)端安裝先前條件:

  1. Windows 7 64-bit OS 或 Windows 8 / Windows8.1
  2. Virtualization (虛擬化)已開啟
*如果你的作業系統是 Windows 10 請不要參照底下步驟
請參考這裡


OS作業系統請自行確認。

Virtualization 確認方式如下

Windows 8 / Windows8.1:
開啟工作管理員點選 CPU 如下圖

2016年12月11日

Compiler Wpasupplicant Source Code

# apt-get install openssl-dev libssl-dev libnl-3-dev libnl-genl-3-dev pkg-config

Then open the .config file:
vi .config
and uncomment the line:
CONFIG_LIBNL32=y
# make

https://w1.fi/wpa_supplicant/