Wednesday, November 1, 2017

vbox_clone_one_or_more_snapshots

have you ever wanna copy one or more snapshots of vbox into a new vm machine? following is an example of how-to.

experiment environment

considering following cases:

  • you have host1, logically or actually named MyWorkHost and having IP as 192.168.1.10
  • you have host2, logically or actually named MyNewWorkHost and having IP as 192.168.1.30
  • you have vbox installed in host1, and a linux guest installed in the box named UbuntuFromDengpan, and the snapshots looks like following:
  • you have vbox installed in host2, better with higher version.

select the snapshot you wanna copy and place mouse on the button tagged as "clone"

in my example, I selected a snapshot named "UpdatedV8":

specify new vm machine's name

in my example, I specified "Ubuntu14_64Bit":

specify clone type

in our example, we want the clone to be portable, so select full clone:

specify need snapshot tree or not

in my example, I don't need the tree view, that is, I don't need all previous nodes/states/snapshots, so select "Current machine state":

wait and check the result

at last, we have a new vm machine, in my example, it have no previous snapshots, only a "Current State" like following:

copy UbuntuUbuntu14_64Bit.vbox and UbuntuUbuntu14_64Bit.vdi to \\192.168.1.30\UbuntuUbuntu14_64Bit

on copied, edit shared folder settings to make the new machine can find the shared folder; after that, power on the new machine and it will be okay on host2.

Saturday, May 6, 2017

ASCII and Unicode quotation marks

No matter for text processing or for displaying/understanding purposes, we often need to know where a quotation of text begins and where it ends. Unicode LEFT SINGLE/DOUBLE QUOTATION MARK can serve as the left tag, while the right SINGLE/DOUBLE QUOTATION MARK serve as the right tag.
For ASCII, to quote a text, grave accent (0x60) serve as a left quotation mark together with apostrophe (0x27) served as the corresponding right quotation mark(as in `quote'), but https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html is not suggesting this way, as the author tells "Your text will otherwise appear rather strange with most modern fonts", so for ascii, we quote a text using ' or " pairs while we must try our best to tell a apostrophe is a start or end.

Saturday, February 25, 2017

AJAX Introduction

AJAX Introduction

AJAX IS Asynchronous JavaScript And XML. AJAX is a misleading name. AJAX applications might use XML to transport data, but it is equally common to transport data as plain text or JSON text.

AJAX just uses a combination of:

  • A browser built-in XMLHttpRequest object
  • JavaScript(to (pre)proecess data recved) and HTML DOM (to display updated data)

see AJAX_example for detail.

AJAX example

<!DOCTYPE html>
<html>
<head>

<meta name = "keywords" content = "ajax,example"/>

<script>
function loadDoc() {
  var xhttp = new XMLHttpRequest();
  xhttp.onreadystatechange = function() {
    if (this.readyState == 4 && this.status == 200) {
     document.getElementById("demo").innerHTML = this.responseText;
    }
  };
  xhttp.open("GET", "AJAX.htm", true);
  xhttp.send();
}</script>
</head>

<body>

<div id="demo">
  <h2>Let AJAX change this text</h2>
  <button type="button" onclick="loadDoc()">Change Content</button>
</div>

</body>
</html>

Sunday, October 30, 2016

UCCB

UCCB

Effective July 1, 2016, the universal child care benefit (UCCB) is replaced by the Canada child benefit(CCB);

Foreign worker can get his UCCB after 18 months. for me, I get $2220 one time and $160 per month:

  • $100 for [2014/10,2015/01)
  • as since 2015, the UCCB increased to $160 per month, I recv $1920 for 2015
  • after the one-time payment, I get $160 per month until my work permit finished.

Tuesday, September 20, 2016

KvmSwitch_issue

KvmSwitch_issue

problem:when you put your mouse into/out of the virtual machine, it 'kicks' your KVM switch out to the other computer.

solution: get yourself to be used to not using Num-Lock, disable both on VM and hosts.

Ubuntu_XWin_OpenTerms

Ubuntu_XWin_OpenTerms

use ctrl + alt + t to open terminal, at better we arrange at most 4 terms on desktop.