void main() {
//make instance from class, to make object
Animal animal = Animal(name: "Ayam", age: 5);
//call object method
print(animal.getFullStory());
//make instance from class inheritance, to make object
Cat cat1 = Cat(name: "Blacky", fur: "soft");- Make Component
//use react v16 or avove, to avoid import React Class
import { Breadcrumb, Typography } from 'antd';
import style from "../assets/style/custom/custom.module.css";
const Breadcrumbs = ({ bg, children, ...props }) => { /* restparameter (...) the last parameter use it,Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.
To learn more about migrations, check out this article on the different types of database migrations!
- create transaction_types table CREATE TABLE transaction_types(id serial primary key, code varchar(20), name varchar(100));
- create transactions table to relation with transaction_type table CREATE TABLE transactions(id serial primary key, type_id int, trans_code varchar(20), trans_date date, FOREIGN KEY(type_id) REFERENCES transaction_types(id));
- create transaction_types table CREATE TABLE transaction_types(id serial primary key, code varchar(20), name varchar(100));
- create transactions table to relation with transaction_type table
example conditions:
Now, we need to define the associations between our user and book model. As a user, I should be able to have as many books as possible while a book should belong to a particular user. So our user model is going to have a One-to-many relationship with the book model while our book model would have a many-to-one relationship with the user model.
with example above we know:
- 1 user can have many books ==> in relationalship model or table is one to many
- many/particular books belong to 1 user ==> in relationalship model or table is many to one
- Avoid memory leaks, if the browser is not handled it properly. Modern browsers will garbage collect event handlers of removed DOM elements but it is not true in cases of legacy browses like IE which will create memory leaks.
- Avoid collisions of events of components.
- Remove the side effects when the reference of event listeners are stored in some persistence such as local storage or some thing like this