day 2: javascript: addeventlisterner, fetchapi, validation mongodb: crud on terminal nodejs: core, custom module, http module expressjs: routeing with get,post, put, delete methods routing with route methods read query params using res.query read form data using res.body parser read raw json using res.body parser mongodb crud using nodejs (mongoose)
Day 1: JavaScript Introduction console.log() console.error() console.warning() alert() confirm()
variables, datatypes and scope var x | let x | x
concatenation template literals hello ${name}
Conditional Statement if..else
Loops for
String and String methods
Array and Array methods
Math methods
Functions
callback function
lambda expression/fatarrow function
Classes and Objects
Array of Objects
Inheritance
Interface
JSON
Array of JSON
AJAX using fetch API and json-placeholder dummy API
UI read data from input box put data in input box put data in html
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'DB_NAME',
'USER': 'DB_USER',
'PASSWORD': 'DB_PASSWORD',
'HOST': 'localhost', # Or an IP Address that your DB is hosted on
'PORT': '3306',
}
}
open db shell with default connection
python manage.py dbshell
MySql Database Connection Troubleshoot in Windows OS Download whl package which is compatible with your python version https://www.lfd.uci.edu/~gohlke/pythonlibs/ Find: mysqlclient
To check whether python is 32 or 64 bit just run following command
queryset = ModelName.objects.filter(column=value)
queryset = ModelName.objects.get(column=value) #this will give you single record
queryset = ModelName.objects.filter(column__iexact=value, column2__exact=value2)
queryset = ModelName.objects.filter(col__subcol=value) #for relationship
interest_rate
NOTE: interest_rate must be shared by all objects and its default value 10.25
member function:
interest(no_of_years)
Design a class Student
data members:
roll_number
name
member functions / methods:
setData()
getData()
NOTE: roll_number must be automatically generated.It also keep track of total number of Students.
Design a class Student
data members:
roll_number
name
member functions / methods:
getData()
showData()
Create Array of 5 Student objects
Create array of Student Objects
data members:
roll_no
name
college
member functions / methods:
readData()
showData()
Create a class RBI
data members:
account_number
balance
member functions / methods:
deposit(int amt)
withdraw(int amt)
showBalance()
Fun with JS CSS and HTML
Create radio button red blue yellow green on change of radio button change background color of body
Create 2 select box and move items from left to right and vice versa
Create 3 select box country state city a) on change of country load states b) on change of state load cities NOTE: Use AJAX call and fetch country states and cities from mysql database
Following links contains sample json data for your APIs. You don’t need to worry about creating new data for your development. These sites provide you api which you can easily use to call via ajax and response can be shown in your webpages or mobile app.