Categories
JavaScript React

[Warning] A component is changing an uncontrolled input of type text to be controlled.

https://stackoverflow.com/questions/47012169/a-component-is-changing-an-uncontrolled-input-of-type-text-to-be-controlled-erro Cause: An input field will become uncontrolled when the initial value is undefined Solution:

Categories
JavaScript Programming

Object

Use variable for key in Object https://stackoverflow.com/questions/11508463/javascript-set-object-key-by-variable Comparison https://stackoverflow.com/questions/1068834/object-comparison-in-javascript

Categories
JavaScript

Date

Copy / clone a Date object getTime() method, which returns the number of milliseconds since 1 January 1970 00:00:00 UTC + sign is unaray operator here. It means new Date(Number(orig)) https://stackoverflow.com/questions/1090815/how-to-clone-a-date-object Update a state object with Date type in React Return a different object in setMyDate so that React can tell it has been modified https://stackoverflow.com/questions/72388233/adding-a-day-to-react-state-date-object-created-using-usestate

Categories
css HTML

Table

Table overflows div container Fixed (source)With this (fast) algorithm, the horizontal layout of the table does not depend on the contents of the cells; it only depends on the table’s width, the width of the columns, and borders or cell spacing. Automatic (source)In this algorithm (which generally requires no more than two passes), the table’s width is […]

Categories
JavaScript

Get the Monday of the Current week

https://bobbyhadz.com/blog/javascript-get-monday-of-current-week The getDate method returns an integer between 1 and 31 that represents the day of the month for the given date The getDay method returns an integer between 0 (Sunday) and 6 (Saturday) that represents the day of the week for the date The return value of setDate() is the number of milliseconds between 1 January 1970 00:00:00 […]

Categories
Cloud GCP

Google ACE – A Cloud Guru

Introduction to GCP & the Cloud Common personal uses of Cloud Services Backups & Sharing Between Mobile Device, Home computer and Work Computer Key Feature: Fault Tolerant & High Availability Common Enterprise Uses of Cloud Services Key Feature: Scalability & Elasticity Compute Engine – Application hosting on Virtual Server/Computer – “Instance“ Computer / Server (Application […]

Categories
Cloud GCP

GCP Associate Cloud Engineer (Week 6)

Containers in the Cloud Infrastructure as a Service allows you to share compute resources with other developers by virtualizing the hardware using virtual machines The smallest unit of compute is an app with its VM App Engine

Categories
Cloud GCP

GCP Associate Cloud Engineer (Week 5)

Getting Started with Google Kubernetes Engine Kubernetes: a software layer that sits between applications and hardware infrastructure Introduction to Google Cloud Cloud computing has five fundamental attributes On-demand & self-service: No human intervention needed to get resources Broad network access: resources are accessible over a network from any location Resource pooling: Provider shares resources to […]

Categories
Cloud GCP

GCP Associate Cloud Engineer (Week 4)

Interconnecting Networks Cloud VPN Securely connects on-premises network to GCP VPC network using an IPSec VPN tunnel IPSec: IPsec is commonly used to secure VPNs. While a VPN creates a private network between a user’s computer and the VPN server, IPsec protocols implement a secure network that protects VPN data from outside access Useful for low-volume […]

Categories
Cloud GCP

GCP Associate Cloud Engineer (Week 3)

Identity and Access Management (IAM) IAM (Identity Access Management) Authentication & Authorisation Who? Can do what? On which resource? IAM resource hierarchy Organization -> Folders -> Projects -> Resources Organization Root node for GC resources Roles: Organization Admin: Control over all cloud resources; useful for auditing Project Creator: Controls project creation; control over who can […]