A collection of tech notes, personal reflections, and evolving thoughts about whatever’s caught my curiosity.

notes

Material UI and Emotion

14 December 2022

Material UI uses Emotion as its default styling engine.

Run the following commands to add Material UI to your project:

npm install @mui/material @emotion/react @emotion/styled

Emotion Emotion is a library designed for writing css styles with JavaScript. It provides powerful and predictable style composition in addition to a great developer experience with features such as source maps, labels, and testing utilities. Both string and object styles are supported.

There are two primary methods of using Emotion. The first is framework agnostic and the second is for use with React.

Styled Components

styled is a way to create React components that have styles attached to them. It’s available from @emotion/styled. styled was heavily inspired by styled-components and glamorous.

import styled from '@emotion/styled'

const Button = styled.button`
  padding: 32px;
  background-color: hotpink;
  font-size: 24px;
  border-radius: 4px;
  color: black;
  font-weight: bold;
  &:hover {
    color: white;
  }
`

render(<Button>This my button component.</Button>)
References

Emotion website

notes

Differenet types of errors in JS

13 December 2022

Syntax error
The error occurs when you use a predefined syntax incorrectly.

Reference Error
In a case where a variable reference can’t be found or hasn’t been declared, then a Reference error occurs.

Type Error
An error occurs when a value is used outside the scope of its data type.

RangeError
There is an error when a range of expected values is required

URI Error
When the wrong character(s) are used in a URI function, the error is called.

InternalError
This error occurs internally in the JS engine, especially when it has too much data to handle and the stack grows way over its critical limit.

Evaluation Error
Current JavaScript engines and EcmaScript specifications do not throw this error. However, it is still available for backward compatibility. The error is called when the eval() backward function is used.

References

scaler

essay

let and const Keywords Hoisting

5 December 2022
JavaScript declarations are hoisted Variables defined with `let` and `const` are hoisted to the top of the block, but not initialized...
essay

Scope, Scope chain and Lexical Environment in JS

2 December 2022
Scope is the place where you can access the values of your variables or functions in our code.
essay

ക്രിസ്തുമസ് കരോള്‍ ഗാനങ്ങള്‍

1 December 2022
വിവിധ കാലങ്ങളിൽ ഞങ്ങളുടെ പള്ളിയിൽ പാടിയിരുന്ന ക്രിസ്തുമസ് കരോൾ ഗാനങ്ങൾ വരും തലമുറയ്ക്ക് പകർന്ന് നൽകുവാനായി ഇവിടെ സമാഹരിച്ചിരിക്കുന്നു...
notes

Peace - that was the other name for home.

25 November 2022

Botteled life.

notes
15 November 2022

I deeply admire the beauty of nature, and there’s such joy in capturing it through photos.

notes
4 November 2022

Peace - that was the other name for home.
— Kathleen Norris

notes

Drop table in PL SQL

25 October 2022

To move a table to the recycle bin or remove it entirely from the database, you use the DROP TABLE statement:

DROP TABLE schema_name.table_name
[CASCADE CONSTRAINTS | PURGE];
  • First, indicate the table and its schema that you want to drop after the DROP TABLE clause. If you don’t specify the schema name explicitly, the statement assumes that you are removing the table from your own schema.

  • Second, specify CASCADE CONSTRAINTS clause to remove all referential integrity constraints which refer to primary and unique keys in the table. In case such referential integrity constraints exist and you don’t use this clause, Oracle returns an error and stops removing the table.

  • Third, specify PURGE clause if you want to drop the table and release the space associated with it at once. By using the PURGE clause, Oracle will not place the table and its dependent objects into the recycle bin.

Refernces

oracle tutorial