[English] - Comparison

February 23, 2018 |
I. Equality
Positive: S + V + as  adj/adv  as +  N/pronoun
Negative: S + V + not as adj/adv as + N/pronoun

II. Comparative
Short Adj: S + V + adj/adv_er + than + N
Long Adj: S + V + more adj/adv  + than + N

III. Superlative
Short Adj: S + V + the adj/adv _est + N
Long Adj: S + V + the most adj/adv + N

IV. Other
 * Cặp tính từ giống nhau
  s + v + adj + 'er' and adj + 'er'.
  s + v + more and more + adj.
Ex: 
My wife is more and more beatiful.
My work is harder and harder.

* Cặp tính tường khác nhau
- Chỉ khi hai sự vật hoặc sự việc thay đổi cùng cấp độ.
The + comparative + S1 + V1, the + comparative +  S1 +V1

Ex:  
The more difficult the task is, the sweeter it is to succeed.

* All the better : Càng tốt hơn
Ex: My wife is beautiful. I love her all the better when she feed the dog.

* Not.. any the comparative: chẳng hơn tí nào
Ex: He didn't any the more smart for hard examines.

* Not the comparative: chả khá hơn chút nào
Ex: He explained that but I was still none the more understand.

Note:
AdjSo sánh hơnSo sánh nhất
good/wellbetterbest
bad worseworst
little (amount)lessleast
little (size)smallersmallest
much / manymoremost
far (place + time)furtherfurthest
far (place)fartherfarthest
late (time)laterlatest
near (place)nearernearest
old (people and things)older/elderoldest/eldest

References:
https://www.dolenglish.vn/ielts-library/blogs/cau-truc-cang-cang
https://tienganhtflat.com/tatrunghoc/ngu-phap-so-sanh-kep
Read more…

[Tips] - Clean Up PC

February 21, 2018 |
Purpose: When your PC overload disk space, we need to increase disk space. Some tips below help we increase disk space.

I. Disk Cleanup
You can use Disk Cleanup to reduce the number of unnecessary files on your drives, which can help your PC run faster. It can delete temporary files and system files, empty the Recycle Bin, and remove a variety of other items that you might no longer need. The option to cleanup updates helps reduce the size of the component store.

Step by steps:
1. Go to Disk CleanUp tool
2. Choose system driver (C) at Disk CleanUp : Drive Selection 
3. Choose all files to delete
4. Click OK to clean disk
5. Go to Disk CleanUp Tool again
6. Choose Clean up to system files
7. Click OK to clean disk.

Disk Cleanup tool helps your PC save about 5-6GB.

II. Task Scheduler
The StartComponentCleanup task was created in Windows 8 to regularly clean up components automatically when the system is not in use. This task is set to run automatically when triggered by the operating system. When run automatically, the task will wait at least 30 days after an updated component has been installed before uninstalling the previous versions of the component.

Step by step:
1. Go to Task Scheduler (Window + R > type "Taskschd.msc" OR Control Panel > Administrative Tool > Task Scheduler)
2. Expand Task Scheduler Library > Microsoft > Window > Servicing
3. Under Start Component Cleanup and click Run

Start Component Cleanup
III. Dism.exe
The /Cleanup-Image parameter of Dism.exe provides advanced users more options to further reduce the size of the WinSxS folder.

From an elevated command prompt, type the following:
Dism.exe /online /Cleanup-Image /StartComponentCleanup

IV. Hibernate Files
We will remove Hibernate file in system. It usually occupied about >= 1GB.
From an elevated command prompt, type the following:
powercfg -h  off

V. Turn Off Virtual Memory
If PC's physical memory enough large and you don't need Virtual Memory, you can turn off Virtual Memory so that save disk space.

Step by steps:
1. Go to Advantage System Setting.
2. Advanced tab > choose Setting... button at Performance.
3. Choose Advanced tab at  Performance Options window.
4. Click Change... button at Virtual Memory.
5. Choose system drive (C) > Choose No Paging File > OK.
6. The system requires restarting> Restart Now.

Read more…

[Java] - The Nashorn Engine

February 19, 2018 |
Oracle Nashorn Engine is used interpreter JavaScript language. The scenario for Oracle Nashorn Engine as a command-line tool and embedded interpreter in Java Applications.
Note: Oracle Nashorn Engine be able to SE 9.

I. It's just javascript.
Example 1:

------------helloWorld.js------------
//start
var hello = function() {
      print("Hello Oracle Nashorn Engine");
};
helloworld();
//end
------------helloWorld.js------------

Evaluating it as simple as this:
$jjs helloWorld.js
Hello Oracle Nashorn Engine

Example 2:
------------helloWorld.js------------
//start
var sum = function (a, b) {
    return a + b;
};
print("Sum = " +  sum(3,4));
//end
------------helloWorld.js------------

Evaluating it as simple as this:
$jjs helloWorld.js
Sum = 7

II. Embedding Oracle Nashorn
Oracle Nashorn from a Java application to define javascript statements, call it as we write code in a javascript file. It helps when we want to load a javascript code to Oracle Nashorn and work on that.

Example:
package learning.javacore.oraclenashsorn.samples;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;

public class Sample1 {

private static final String NASHORN_ENGINE = "nashorn";

public static void main(String[] args) {

//declared ScriptEngineManager and ScriptEngine
ScriptEngineManager engineMrg = new ScriptEngineManager();
ScriptEngine engine = engineMrg.getEngineByName(NASHORN_ENGINE);

//declared a js codes.
String js = "var sum = function(a,b) { return a + b;};";

try {
engine.eval(js);
System.out.println(engine.eval("sum(3,4);"));
} catch (ScriptException e) {
}
}
}

We can do more with Oracle Nashorn. Please see details: http://www.oracle.com/technetwork/articles/java/jf14-nashorn-2126515.html




Read more…