Wednesday, December 22, 2021

How to setup Starhub Broadband with 3rd-party Mesh WIFI

 22 Dec 2021


I subscribed to Starhub 500Mbps broadband without getting the bundled Nokia Mesh WIFI router, which cost an additional $4 per month per unit over a 24 month contract.

Instead I decided to purchase my own set of TP-Link Deco M4 Mesh WIFI at only $89 (bought from Challenger) for a pair of units.

The setup is straight forward. First of all, you have to download the TPLink DECO app and then sign up for a free account.


Each M4 unit has 2 Ports

Next, connect the Starhub ONT (Huawei Echolife HG8040H5) Port 1* to one of the network port of the M4 unit (herein after main M4).

Power on the M4 and follow the instruction on the App to create your home network.

#You do need any router between the ONT and the main M4

*The ONT only has Port1 configured for internet, Port2 is for IPTV while Port3-4 reserved for other purposes, according to Starhub Helpdesk.

With that said, if you have more than 1 WIRED devices, you have to connect the other device to the remaining port of the main M4 (each M4 has 2 ports).







To setup additional M4, just place the unit at another place (eg. your bedroom), power on and then follow the App instruction to add the extra unit(s).



Friday, December 6, 2013

How to Prevent Gmail from Styling href:mailto and telephone in your email

By default, if you compose a HTML email with email address and telephone number, Gmail will  auto convert it to mailto and tel link respectively with Google own CSS.

I have tried using inline CSS to change it but it does not work.

So far, the following solution is one that found to be working:

use <input type="text" style="border:0pt;background-color:transparent" value="example@a.com" readOnly/>

Use input and style it by removing the background and border

Monday, January 14, 2013

How to mount smb share directory with space and ampersand

<CentOS>
How to mount smb share directory with space and ampersand


Tested on Centos 5.7, the following command works by escaping the special character using \ (backslash)

space  -> \(space)
ampersand (&) -> \&

E.g. For a smb share with the name "My Documents & Musics"

\\<Server IP>\My\ Documents\ \&\ Musics

*Take note that there is a space after the backlashes after "My", "..nts" and before "Music.."


There a some posts states that the space should be escaped with ascii code (\040) and ampersand with (\046)

I have tested but it does not work on my CentOS 5.7 instance.

Tuesday, December 11, 2012

How to enable manager app for Tomcat with Virtual Host

Make a copy of the file
       ${tomcat-home}/webapps/host-manager/manager.xml

and copy to the folder (the same name with your virtual host folder under webapps)
       ${tomcat-home}/conf/Catalina/<your virtual host folder name>

Access via browser with the link http://<your virtual host name>/manager/html



Wednesday, June 13, 2012

Table header is not fixed with Jquery fixheadertable plugin

If you load the table result into a div like the following, where you try to fix the height with css with overflow, the header will not be fixed after scrolling

     <div id="divA21InvResult" style="height:300px;overflow:auto"></div>  



Instead you should add the option "height" when you call the fixheadertable function and pair with a simple div without any height declaration in css

       <div id="divA21InvResult"></div>  

        $('#tblA21InvPrint').fixheadertable({
                    caption     : '',
                    height      : '300',                   
                    colratio    : [30, 50, 100, 100, 50, 515, 80, 400, 400],                  
                    sortable    : true,
                    sortedColId : 1,
                    dateFormat  : 'd-M-Y',
                    resizeCol   : true, 
                    sortType    : ['string1','integer', 'date', 'string', 'string', 'string', 'float', 'string', 'string'],
                    textAlign   : ['center','right','center','center','center','left','right','left','left']
                });


Tuesday, June 12, 2012

Error Placement Issue with Jquery Validation Plugin










I encountered the above problem with jquery validation plugin where the error message spans into multiple lines, eventhough there is more than enough span after the input element.

To solve this problem, you may add in the following css

label.error{
    color:red;   
    width:auto; /*Add this line*/
}


Saturday, January 28, 2012

How to embed fonts into PDF generated by JasperReport (iReport)

Setup:
» Tomcat 7.0 + JSP
» iReport 4.1.1

Reference:
http://javaskeleton.blogspot.com/2010/12/embedding-fonts-into-pdf-generated-by.html

Steps:
1. Launch iReport, choose Tools->Options->Fonts

2. Click "Install Font" and follow the wizard to install your desired font.



*Remember to tick the option "Embed this font in the PDF document"








3. Select the newly installed font and click the button "Export as extension"




4. Save the export file as JAR file

5. Copy the JAR file to the folder within your application classpath
*I choose to put all the JAR files into $(JRE_HOME}/lib/ext