Saturday, July 16, 2016

How to transfer Video (mp4 etc) to IPhone 6/6s/6 plus

Download the latest ITune (mine 12.4.16). Plugin your IPhone, select the phone icon as follows

1. On Summary Page, manually manage music and video

2. On Movies Page (under On My Device), just drag and drop will do.

Thursday, June 30, 2016

Gmail Cannot Retrieve Hotmail via POP3

If you cannot retrieve Your Hotmail Account in Your Gmail Account via POP3, and got the following information in gmail
「Authentication failure: unknown user name or bad password. [Error="ProxyNotA...」
that is because All Hotmail accounts are being moved to Office 365 Servers, and that turns off the POP3 service, to reenable it, do the following in Hotmail:

Settings -> Options -> POP and IMAP -> Yes -> SAVE
Viola! You are able to access your Hotmail in Gmail again. 
Btw, Hotmail now allows forwarding email to Gmail too, you can try it in Settings -> Options -> Forwarding. I try it, it works, just that those email is marked by Gmail with "This message may not have been sent by:".

Friday, February 12, 2016

How to embed all fonts in WinEdt for PDF

1. How to include all fonts

If you are using Adobe Acrobat Pro X and above:

Go to Tools>Preflight

Type in Embed in the keyword, you will get Embed fonts under PDF fixups, click Analyse and fix to fix it.

2. How to remove bookmarks

  • Remove the \hyperref pacakge in latex
  • Print the PDF into another PDF will do.
To check whether all fonts are really embedded, See how to check all fonts are embedded using adobe reader.

Sunday, January 31, 2016

How to Run in Cgywin from C#

Use the following code:

public  string runCygwin()

            using (Process p = new Process())

                /*Use the bash shell in cygwin folder*/
                ProcessStartInfo info = new ProcessStartInfo(@"D:\cygwin64\bin\bash");

                /*Put the command to be run in test.bsh*/
                info.Arguments = @"--login ""/cygdrive/D/C_Drive/Desktop/z3-str/tests.bsh""";

                /**Side Info:Content in test.bsh file**/
                string bshContent =
                    "/cygdrive/D/C_Drive/Desktop/z3-str/ -f " +

                info.RedirectStandardInput = true;
                info.RedirectStandardOutput = true;
                info.UseShellExecute = false;
                p.StartInfo = info;
                string output = p.StandardOutput.ReadToEnd();
                // process output
                return output;

Monday, January 11, 2016

Some JavaScript Special Scenarios

for (i = 0,j=0; i < 3, j < 2; i++,j++) {
    console.log(i+" "+j)
The answer is 0,0 and 1,1 only j<2 applies
function f(a) {
  var a;

The answer is 4, since variable in javascript only has local and global scope

Original source
    for (i = 0,j=0; i < 3, j < 2; i++,j++) {
        console.log(i+" "+j)

The answer is 0,0 and 1,1
only `j<2` applies

    function f(a) {
      var a;


The answer is 4, since variable in javascript only has local and global scope

Saturday, January 9, 2016

How to Point GoDaddy Domain to Amazon EC2

You bought a domain from GoDaddy, and you have a server on Amazon EC2, perfect, follow the following easy steps to point Godaddy domain to Amazon EC2 server.

Get Elastic IP from Amazon
On EC2 Management console, click on “Elastic IPs”, click on Allocate New Address

Click Yes, Allocate

You got the New Address assigned.

Right click the elastic IP, click Associate Address.

Choose the instance you are running

Use the default values for all textboxes, Click Associate

Configuration for GoDaddy
Login into your godaddy account, Under the upper menu click “Domains” and then click “Manage my Domains”, Select the domain you would like to change by clicking the link to the domain on the table under “Domain Name” column.
When you see the following screen select DNS Zone File

Click on Edit Record under A(Host), Edit the record to point to the Elastic IP address you have set just now

After that click on Save Changes

 That's it, have fun!

Thursday, January 7, 2016

How to Enable FTP on Amazon EC2 (using FileZilla here)

Are you having problems in configuration Amazon EC2 with FTP? No problem, here are the step by step guides.

Configurations on Amazon EC2 console
1.       Click on instance in EC2 console, locate your EC2 instance, and scroll it to the right

2.       Click on the link under Security Groups

3.       Under the Security Group, right click on the item there, and select Edit inbound rules

4.       Add the two rules as follows, and click on save, that’s it.

Configurations on Windows Instance
1.       Login to the Windows instance, click on the Windows button, and key in Windows Firewall

2.       Turn off the Windows Firewall (only for public network settings). Amazon has the configurations to protect you (like those you set in Amazon EC2 console previously).

Configuration of Filezilla Server
1.       Install FileZilla Server
2.       Connect it, retain the orginal setting, and click OK.

3.       Got to Edit > Settings >Passive Mode Settings, set the following. For Use the following IP, key in your Amazon instance IP like, and Click OK.

That’s it, you can connect it with your File Zilla Client, using port 21.