browse by category or date

Alert on scams exploiting this crisis:

[Sent by Gov.sg – 22 Feb]

COVID-19: Be Alert to E-commerce scams

Items like masks and hand sanitisers have been in higher demand.

If you are looking to purchase online:
– Check the credibility of sellers
– Avoid making advance payments
– When in doubt, purchase only from reputable sellers

If you think you’ve been scammed, call the helpline: 1800-722-6688

More: https://www.scamalert.sg/

Update on number of confirmed and discharged cases:

[Sent by Gov.sg]

COVID-19: 22 Feb Update

As of 12pm:
New cases: 3
Total confirmed: 89
Discharged today: 2
Total discharged: 49
Total still in hospital: 40

Most in hospital are stable or improving. 5 are in the intensive care unit.

Of the 3 new cases, 1 is linked to a known cluster and 1 was an evacuee from Wuhan on 9 Feb. Contact tracing is underway for the remaining case.

More: Go.gov.sg/moh22feb

Stay safe everyone!

About Hardono

Hi, I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Yesterday, I happened to kaypoh and stared into my friend’s laptop screen. Seeing that he was tinkering with JSON file, I told him about JSON Table Editor and how easy to edit JSON in tabular mode.

So he copy-pasted some part of his JSON string and hit “Load to Grid” button. Voila, it embarrassingly stuck forever at the loading dialog :D.

I apologized for wasting his time, and promised to look into it, once I reached home. Sitting comfy in front of my desktop at home, I start thinking about this bug. I didn’t have the exact JSON string, but I remember that it was a single object with two properties, and both properties are array of string. Below is my first attempt on reconstructing the error-triggering JSON string:

{
    "A0" : ["A0", "B0", "C0"], 
    "A1" : ["A1", "B1", "C1"]
}

But above JSON actually load correctly into the grid:

Not wanting to waste anymore time, I called up my friend and asking for the exact JSON string that he copy-pasted earlier. He sent it to me, but sort of warn me that the string is potentially confidential. Because of that, I can’t share the exact string here. But its structure is more or less like below:

{
    "A0.100.3" : ["A0:A1:A2=TRUE", "B0", "C0"], 
    "A1.200.1" : ["A1:A2:A3=TRUE", "B1", "C1"]
}

At first, I suspected that the string is not a valid JSON. But this was proven to be false. I parse it using JSON.parse and it returns the correct object. So, I continue to debug the code executing it step by step. After a while, I found where that exception was thrown. It was during creation of data Store object:

store = Ext.create('Ext.data.Store', {
    storeId: 'modelStore',
    model: 'mdl'
});
store.add(obj);
grid.reconfigure(store, _cols);

if (grid.filters)
    grid.filters.createFilters();

For now, I just added try-catch to prevent uncaught-exception which causing the loading dialog shown forever.

try {
    store = Ext.create('Ext.data.Store', {
        storeId: 'modelStore',
        model: 'mdl'
    });
    store.add(obj);
    grid.reconfigure(store, _cols);

    if (grid.filters)
        grid.filters.createFilters();
}
catch (eParse) {
    Ext.Msg.hide();
    setTimeout(function(){
        Ext.Msg.alert('Error', eParse);		
    }, 100);
}

The try-catch will catch all exception during data store creation and prompt the error:

Now let’s return to the JSON string and let’s examine it. I did say that the string is a valid JSON. You can validate this by going to your browser’s Web Developer Console, as I shown it below:

As we can see, when calling the object property directly (e.g. o.A0.100.3), we received the same exact exception as when we tried to load this string to grid. Therefore, we can conclude that deep down inside data store creation, the input object property was called directly instead of using array interface (e.g. o[“A0.100.3”]).

I’ll update again once I manage to patch the bug. Till then, cheers!

About Hardono

Hi, I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.

Another reminder on what is Stay Home Notice (SHN):

[Sent by Gov.sg – 21 Feb]

COVID-19: What should I do if I stay with someone issued with a Stay-Home Notice (SHN)
👥 Avoid close and sustained contact, limit time spent together at common areas
🌬Ensure proper ventilation of room/apartment
🙅‍♀ Avoid having visitors
🍴 Avoid sharing food, crockery, utensils and other personal hygiene items
🧼 Maintain good personal hygiene at all times

SG United 🤝
A one-stop portal to contribute to community efforts, such as volunteering to help those affected by the virus
More: www.sgunited.gov.sg

Update on number of confirmed and discharged cases:

[Sent by Gov.sg]

COVID-19: 21 Feb Update

As of 12pm:
New cases: 1
Total confirmed: 86
Discharged today: 10
Total discharged: 47
Total still in hospital: 39

Most in hospital are stable or improving. 5 are in the intensive care unit.

Today’s new case, a 24 year-old male Singapore Citizen, is linked to a previous case.

More: Go.gov.sg/moh21feb

Stay safe everyone!

About Hardono

Hi, I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.