Wednesday, July 17, 2019

A family trip to Genting Highlands

It has been quite some times since my family last visited to Genting Highlands, and during the last school holiday we have visited it again to escape the heat.

On the way to Genting Highlands, we stopped by Batu Caves Temple.

Something new about this temple since our last visit is its colourful staircases, which apparently successful to attract more tourists to it.


The monkeys in Batu Caves are still around. They are, as usual, got used to the people around.



Driving uphill to Genting Highlands, I felt that the road is wider than before, and it is safer and easier to drive there.

We stayed at a new apartment called Geo 38 Residence, which has nice facilities including swimming pool, jacuzzi pool, fitness centre, sauna room, children playground, etc. all located at the same floor. The sauna room is not too big, and located inside the gents and women washrooms respectively, beside the swimming pool.

The main problem of this apartment is its location. It is hiding behind a new small township at mid-hill, at a lower ground than the Awana, which is quite some distance away from Genting Highlands at the hilltop and most of the visitor attractions uphill. You will need to travel by car to go anywhere out of the apartment, despite there is some food at the shops around within walking distance. If you stay in one of the hotels uphill in Genting Highlands, it will save you time, effort, petrol and parking fee to just walk around without the need of using a car.

If you are looking for vegetarian restaurant, there is one in Chin Swee Caves Temple, but crowded with people. There was a long queue outside, and the food waiting time exceed hours.

Genting Premium Outlets is a new attraction on top of Genting Highlands. There was a big crowd there. It was raining when we visited the place, and its top floor area is outdoor open concept, which has very limited shelter to the rain.

There is a food court in Genting Premium Outlets, which still using the troublesome temporary prepaid card method. We need to buy a prepaid card and load it with value, then use the card to buy food and drinks in the food court. Then, we need to return the card to get back the deposit money in it.

We visited the Happy Bee Farm, which is located quite near to Geo 38 Residence. After the visit, we found out that the road is one way. To return to the apartment, we need to go all the way down until we reached a roundabout, then only can go back uphill. This has tremendously lengthen the distance of travel.

We've also visited the Genting Strawberry Leisure Farms.


The entrance fee is not cheap, but it is quite worth to go inside and take photos.

We discovered that the strawberry farm only forms a small portion of the entire area. Majority of the farm is planted with flowers - a lot of colourful, beautiful flowers.


Our stay in Genting Highlands this time is only for 2 days 1 night. Since it is a family trip, we didn't enter into the casino. Outside the casino, we found that the shopping mall is still familiar, and the indoor theme park is also quite familiar.

Friday, June 21, 2019

My Realme C2 budget phone with Color OS 6

Realme is a brand of OPPO. Realme C2 is a decent budget phone which you can get at the price of slightly below RM400.

Realme C2 is a successor of C1. I would say it is an alternative option of C1, which both of them are identical in terms of actual performance, which in some areas C2 is slightly better than C1 and some other C1 is slightly better than C2.

The 2 main differences are that C2 is using Mediatek MT6762 Helio P22 (12 nm) chipset and running on Android 9 OS, while C1 is using Qualcomm SDM450 Snapdragon 450 (14 nm) chipset and running on Android 8.1 OS.

Its size of 6.1" is big enough to have a screen suitable for elderly people to use after the font size is configured to be the largest.

Although it is a budget phone, it has pretty well performance with just a little bit of speed lagging compared with those flagship phones for normal applications. Its back cover is pretty nice and modern looking too. Therefore, it is also very suitable for kids and for people that just need a decent phone.


The Realme C2 comes with 2 options of specification: one with 2GB RAM & 16GB storage, and another more expensive one with 3GB RAM & 32GB storage. Bear in mind that the actual usable storage for the 2/16GB option is only around 6GB. The other 10GB was already used by the system and OS. It has a dedicated slot for microSD and supports external storage up to 256GB.


This phone only supports 2.4GHz WiFi and does not support 5GHz WiFi. However, it does support dual SIM 4G LTE.

It has a normal 13MP f/2.2 main camera working together with a 2MP f/2.4 camera for depth sensor. At its front is a 5MP f/2.0 camera, not a good option for people who loves selfie, but still usable.

Its Color OS 6 has a Control Center with big icons, provides convenient and easy access particularly to elderly people.


Color OS 6 also comes with  the Android App Drawer, which you have a choice to switch it on or off.


It's home screen has a handy smart sidebar for quick access to your favourite apps, which you can access by swiping from the side of the screen. The apps listing in the sidebar is configurable. You are also given the option to switch it off if you don't want to use it.


The phone has all the essential features in Android 9. It has quite a number of security related functions.


The anti-harassment/fraud function is actually the call and/or SMS blocking function. It has interesting features such as blocking of one-ring incoming calls, which you might not find in other phones.


The Realme C2 4,000 mAh Li-Po battery can last for more than 1 day for normal use.

One thing I dislike is its battery saving feature, which I think is too over. It always kill a lot of background running processes and apps, which might stop automation app and widgets from working after a while.

A lot of tweaking needs to be done to find the way to let the automation app and widgets continue working at normal even when the phone is in sleep. Smart Power Saver will always kill them off. You need to use Custom Power Consumption Protection option, and manually configure each of the apps for them to be able to continue running in background, and to automatically start when the phone starts.


All in all, this is a nice phone with high performance/cost ratio. Most apps (including the not so resource demanding games) can run pretty well on it, also I found Facebook is quite slow (takes a few seconds) in launching up in it.


Thursday, May 30, 2019

How to implement select all function for multiple sets of checkbox items on the same webpage using simple JavaScript

When designing a webpage with list of checkbox items, it is common and useful to implement a Select All/None function so that the user can easily select/unselect all items with a single mouse click.

This can be done with a simple JavaScript function, even without the need of using jQuery.

Now, the challenge is, when you have multiple sets of checkbox items on the same webpage, how to implement a shared JavaScript function to handle the Select All/None action to each set of the items respectively, so that when the user Select All in one of the sets, the other sets will remain unaffected by the action?

Let's say, we have 3 sets of item as below:


You can use separate FORM for each of the sets, and use FORM ID to distinguish each of the FORM. Each FORM will need to handle their own SUBMIT action separately.

If the different sets are within the same FORM and share the same SUBMIT action, you can make use of CLASS name in their CHECKBOX elements to distinguish and separate out the sets.

Here is the JavaScript codes to implement the Select All/None function (click the image to enlarge it):



and below is the HTML BODY part of the sample webpage (click the image to enlarge it):


Set 1 is in separate FORM from Set 2 and Set 3 with a different FORM ID. Note that even though Set 1 and Set 2 are both using the same CHECKBOX CLASS name, their checkboxes will can be selected all/none separately.

Set 2 and Set 3 are within the same FORM. We can still separate them by using different CHECKBOX CLASS names.

Our simple checkAll JavaScript function accepts both the FORM ID (as 1st parameter) and CLASS NAME (as 2nd parameter), and making use of its 3rd parameter as toggle. In this way, you can use this checkAll function to handle all the sets on the same webpage.

You can create a HTML file to try it out. Since this is just an ordinary HTML with simple JavaScript, it can run even without any web server. Just create the HTML, and open it with your web browser to test it out.


Hint: Click on the "Older Posts" link to continue reading, or click here for a listing of all my past 3 months articles.