2018年12月25日 星期二

failed to send WATCHDOG=1 notification message: Transport endpoint is not connected

Update ubuntu properly. Write following commands in terminal:
sudo apt-get update
update-manager
After completion update, Write following command in terminal:
reboot
Hopefully, Problem will be solved.
If the problem is still exits:
  • Press and Hold Power button and let the PC to turn off forcibly.
  • Turn on PC now, it will on perfectly.
  • if it throws fsck error, write command:
    fsck -yf /dev/sdaX 
    Done

2018年12月6日 星期四

How to open a .txt file and display it in a text box using VB.Net

Imports System.IO

Public Class MyForm

    ' ... Whatever code you have for your form

    Public Sub OpenFile()

        Dim oReader As StreamReader

        OpenFileDialog1.CheckFileExists = True
        OpenFileDialog1.CheckPathExists = True
        OpenFileDialog1.DefaultExt = "txt"
        OpenFileDialog1.FileName = ""
        OpenFileDialog1.Filter = "Text Files (*.txt)|*.txt|All Files (*.*)|*.*"
        OpenFileDialog1.Multiselect = False

        If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
            oReader = New StreamReader(OpenFileDialog1.FileName, True)
            RichTextBox1.Text = oReader.ReadToEnd
        End If

    End Sub

End Class

2018年12月4日 星期二

BIOS中Power/APM Configuration

在電源管理(Power Management)功能選單中,選項『Restore on AC Power Loss』決定當電源不足或損壞時系統的處置方式,這個選項有「Power  On」、「Power  Off」、「Last State」三種選擇種,做為電源中斷或不小心意外而關機的應變方式。

「Power  Off」:系統持續在關機的狀態。
「Power  On」:系統會自動重新啟動。
「Last   State」:設定為斷電前的狀態。(我建議)

2018年12月3日 星期一

ubuntu change color of top menu bar in Unity and top menu bar in any window

How to install Ubuntu Tweak?
  • Hit Alt+Ctrl+T to open terminal and run following commands:
    1. For Ubuntu 14.04 onwards, it's available in softxare sources, just type:
      sudo apt-get install unity-tweak-tool
      
    2. For older Ubntu releases:
      sudo add-apt-repository ppa:tualatrix/ppa
      sudo apt-get update
      sudo apt-get install ubuntu-tweak