NodeJS How To Have Unique Array of Objects

I want to have unique array of objects. So if I add an object, any objects which have same values won’t be added twice.
So I try use Set() data structure.

Adding Object directly to Set()

Output

Conclusion:

As you can see, the Set result is 3. It should be 2. So it doesn’t work

Adding a stringify Object to Set()

Output:

Conclusion:

The Set size is 2 with no duplicate values.

Overall Conclusion

So you can use Set but first stringifiy the objects than convert back the string to object by using JSON.parse() function

You can try thecoding yourself here:
Typescript Playground

Configure 16A Smart WIFI Plug Socket Power Switch APP Remote Control Timer UK Home Automation

I bought 2 WIFI sockets from Lazada and configured them accordingly. Last Friday my house’s electricity trip then suddenly I can’t connect anymore to the socket using Smart Life mobile application.

Lazada smart wifi plug
Lazada smart wifi plug

I have to reset back the WIFI connection of the WIFI sockets.

Add as If Want to Add New Device

smart life - add new device
smart life – add new device

Choose WIFI Socket

smart life - choose wifi socket
smart life – choose wifi socket

Power On the Device After It is Off for 10s

smart life - press and hold for 5s
smart life – press and hold for 5s

 

Press Hold The Power Off/On on the Device for 5s

smart life - press and hold for 5s
smart life – press and hold for 5s

LED will start blinking after press hold for 5s

If Blinking click Confirm and click Next

smart life - LED is blinking
smart life – LED is blinking

Key In Your WIFI Password

If you have multiple WIFI AP, the Smart Life mobile application will follow your current smart phone connected WIFI AP. If you want to choose different WIFI AP, change it via your smart phone.

smart life - key in wifi password
smart life – key in wifi password

 

Wait Until It Is Successfully Connected

smart life - finding the socket
smart life – finding the socket

After Successfully Connected, Smart Life will use back previous Device name and won’t create new

Panasonic Wifi Aircond Network Error using Panasonic Smart Wifi Control CZ-TACG1 Network Adaptor

Last Friday my house’s electricity trip then suddenly I coudn’t swith on my Panasonic wifi aircond. It shows Network Error.

My Panasonic wifi aircond is using Panasonic Smart Wifi Control CZ-TACG1 Network Adaptor to enable its WIFI.

When I open my aircond cover, the status and link LED are blinking.

So from there I know I have to reset back my aircond WIFI setting.

Add New Aircond

To reset the WIFI setting, click as if you want to add new aircond

panasonic aircond add new wifi aircond
panasonic aircond add new wifi aircond

Connect with AP Mode

panasonic aircond wifi adaptor connect via AP
panasonic aircond wifi adaptor connect via AP

Press Set Up Button until Status LED Change to Blinking Orange

In my case, my Status and Link LED are blinking green. So based on the Panasonic mobile application it asks me to press the reset button with sharp needle and then press set up button until Status link is blinking orange.

panasonic aircond wifi adaptor select link LED blinking
panasonic aircond wifi adaptor select link LED blinking
panasonic aircond wifi adaptor reset
panasonic aircond wifi adaptor reset
panasonic aircond wifi adaptor status orange blinking
panasonic aircond wifi adaptor status orange blinking

Click Next Then The App will Ask To Join the Panasonic AP

Join the Panasonic AP

panasonic aircond wifi adaptor connect to panasonic ap
panasonic aircond wifi adaptor connect to panasonic ap

Enter Your WIFI password

panasonic aircond wifi adaptor connect to your wifi AP
panasonic aircond wifi adaptor connect to your wifi AP

Then The App will ask to enter Device ID and Password

This step you just cancel it. After this you can control back your aircond without entering the device ID and password.

All LEDs will be green if everything is OK.

Ikan Bawal Masak Taucu

 

I was first introduced with Taucu by my sister in law. She always cooked roasted chicken with taucu which super dupper yummy. I never tried cooked it on my own personally. Since now she already moved to Sabah, tak dapat lah I merasa her dishes ni… okay nanti mintak resepi and will try cook it myself.

Since ada taucu dalam peti sejuk I decided to google and masak taucu ikan bawal, first time try but i loved it;

Bahan-bahan;

  1. minyak
  2. bawang besar (hiris)
  3. bawang putih (hiris)
  4. halia (hiris)
  5. cili padi & cili besar
  6. 3 sudu besar taucu
  7. gula & perasa
  8. air
  9. asam jawa
  10. ikan bawal
  11. garam
  12. kunyit

Cara penyediaan;

  1. lumur ikan dengan kunyit dan garam kemudian goreng, letak tepi
  2. tumis bawang besar, putih, halia sehingga kekuningan (pakai minyak baru)
  3. tambah taucu, gula dan perasa
  4. masukkan air dan asam jawa
  5. last masukkan ikan, biar mendidih sedikit dan boleh dihidangkan.
  6. siap.

 

ikan bawal taucu

Git Command For Initial Push

Useful Git commands for initial push.

In below example I use <https://gitlab.com/lvlaxpt/to-delete.git>. So change this to your Git URL.

Git global setup

Create a new repository

Push an existing folder

Push an existing Git repository

Pull From Existing Repository

Resipi Sambal Tempe Jawa

Sharing my mom recipe…tak pasti what is the exact name for this dishes, last makan masa bujang dulu sebab my parents pun jarang masak this menu.

Satu hari tiba-tiba terasa kat tekak makanan ni, i know my mom and dad memang pandai masak any food lah. Segala benda masakan diorang sedap, nasi goreng simple bapak i tu pun boleh buat mengidam. Sometimes i pelik dari mana bakat diorang ni dapat, sebab bukan diorang hardcore memasak pun.

Both parents dulu working, weekdays we all selalu makan nasi bungkus beli tapi bila weekend always the family day, gotong royong with all the sissy to help prepare the dishes.. missed that moments.

So bawah ni i share mom ingredients and recipe for Sambal Tempe Jawa;

Hiris bahan tumisan

Bahan tumisan (mayang halus)

  • bawang merah
  • bawang putih
  • bawang besar
  • serai
  • lengkuas
  • halia

Bahan gorengan (potong kecil/dadu + kunyit + sikit garam)

  • tauhu
  • tempe
  • hempedal + hati ayam
  • isi ayam
  • udang

Campuran lain (hiris nipis / ikut suka)

  • petai
  • cili besar
  • cili hijau
  • kacang boncis
  • cili api

Bahan lain/ perasa

  • kicap manis
  • air asam jawa
  • santan cair
  • gula¬† + garam
  • last santan pekat

Cara penyediaan

  • Goreng kesemua bahan gorengan
  • tumis bahan tumisan sehingga kekuningan dan naik bau
  • masukkan air asam jawa, kicap manis, dan santan cair dan perasa lain (garam dan gula)
  • apabila rasa sudah serasi dan menepati masam dan manis barulah masukkan campuran lain, biarkan seketika
  • barulah masukkan barang gorengan, sekiranya mahukan hidangan sedikit berkuah boleh tambah santain cair.
  • apabila mendidih¬† bolehlah ditambahkan santan pekat bagi memekatkan kuah dan tutup api.

  • sekian boleh makan.