"Your time is limited, so don't waste it living someone else's life"

Category Archives: Others

What is Hypervisor ?

What is Hypervisor?
Hypervisor (visor: còn gọi là tấm bảo vệ) là một software, firmware hay hardware giúp tạo và điều hành các máy ảo. PC mà trên đó hypervisor đang kiểm soát hoạt động của một hoặc nhiều máy ảo gọi là host machine. Mỗi máy ảo gọi là guest machine. Hypervisor kiểm soát các guest OS trên một nền tảng điều hành ảo (Virtual Operating Platform) và quản lý hoạt động của các hệ điều hành này. Các guest machine chia sẽ các hardware resource ảo.

Read more of this post


What you should do when the arrow keys is locked in eclipse on Linux platform

When I use Eclipse IDE on a Linux machine, I usually encounter some problems when the arrow keys suddenly loose their effect. The enter and backspace key also is stuck by this way. It makes me angry and I often press these key many times to try to get out of this obstacle.
After many attempts, I can reproduce the case when this problem occur by these steps: Hover your mouse on a function to make eclipse show up its java doc popup window. Then you move your mouse and click inside that window to focus on that one. After that, you move the mouse out the java doc window and click on anywhere in the editor. By this way, the problem happens.

As my opinion, this is simply caused by the loosing of focus on your editor. The focus is still on the popup window.

With that cause, I find out the way to make the focus back on the editor. You can do something like: show up any more popup window (by right click on editor and select Quick Outline for instance) and then press Esc, the focus will back immediately and you can use your arrow keys as usual.

For conclusion: Right Click (on editor) -> Quick Outline -> press Esc key.

How to face with cannot load hard drive error of VirtualBox

Oracle Virtual Box is a very famous visualizer application with user and programmer in particular. As you know, one virtual machine has its own at least one virtual hard disk named with extension VDI located wherever on your real hard disk, supposed /home/thminh/tools/VirtualMachines as my case. One day, you start Virtual Box application as usual, you are taken notice with a pop-up like
Read more of this post

How to indicate the remote host’s os

This post introduce how to find the remote machine(s) is Window or Linux in the system UI – Data Server – Equipment Service. In this case, if remote DS is Windows, you have to install Cygwin which simulate Linux environment on Windows, so you can execute the same command for both platform. After that, you will use plink application to get the output of command uname into a file, we check the file out and there is some key word for every operation system like: Linux (Linux) or Cygwin (Windows)
Read more of this post

Get size on disk of package in nsis

In case you want to deploy package to remote host. That means the installer can install on remote machine. You should pack the installation component into package may be tar.gz. So, in the component page the Space required control will show the wrong required space for hard disk. In this case, you should calculate the size of the package yourself and display in the control. Since, we get two things to do here: Get the actual size on disk of package, and display it on the Space required control which is instructed in the next post.

Get the space
One of the solution is to use another application named 7za.exe.
+ From nsis we will execute the application and write out the output contains the size on disk of the package.
+ Read the content of text file and get the size on disk you need.
Read more of this post

Detect default browser and launch in NSIS

Window supports us with a function to get any default executable application of a file. So we will get the default browser by create a empty *.htm file then get it’s default executable program, and that is also the default browser

    FileOpen $0 "$PLUGINSDIR\dummy.htm" "w"
    FileClose $0
    System::Call "Shell32::FindExecutable(t '$PLUGINSDIR\dummy.htm', i 0, t .r1)"
    Exec '"$1" http://google.com'

Check for available disk space and required disk space in NSIS

Get available disk space:
We use the macro DriveSpace

    ${DriveSpace} "C:\" "/D=F /S=M" $R0
    ; $R0="2530"

Get the required disk space of your program
To do this, you will in turn get the required disk space of every section in your script, then we will plus all of the results. We use the SectionGetSize instruction to get the required disk space

Section "plink" secPlink
    File "plink.exe"
SectionGetSize ${secPlink} $R1
%d bloggers like this: