This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.mysql', | |
'NAME': 'managerpro', | |
'USER': 'root', | |
'PASSWORD': '', | |
'HOST': 'localhost', | |
'PORT': '3325', | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//packages used | |
var session = require('express-session'); | |
var MySQLStore = require('express-mysql-session')(session); | |
var passport = require('passport'); | |
var LocalStrategy = require('passport-local').Strategy; | |
// express session setup and passport initialization | |
var options = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// package used | |
var bcrypt = require('bcrypt-nodejs'); | |
bcrypt.hash(password, null, null, function(err, hash) { | |
// password -> raw password ( req.body.password) | |
// hash -> hashed password | |
// connect and insert to database | |
var db = require('../db'); // open connection to database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Download & Install XAMPP Server From https://www.apachefriends.org/download.html & Run Apache and MYSQL from XAMPP Control Panel | |
# 2. Open Browser and Check http://localhost/phpmyadmin link is working ? | |
# Database | |
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases | |
# DATABASES = { | |
# 'default': { | |
# 'ENGINE': 'django.db.backends.sqlite3', | |
# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ns [new Simulator] | |
set nf [open lab1.nam w] | |
$ns namtrace-all $nf | |
set tf [open lab1.tr w] | |
$ns trace-all $tf | |
proc finish { } { | |
global ns nf tf | |
$ns flush-trace |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ns [new Simulator] | |
set n0 [$ns node] | |
set n1 [$ns node] | |
set n2 [$ns node] | |
set f [open lab1a.tr w] | |
$ns trace-all $f | |
set nf [open lab1a.nam w] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ns [new Simulator] | |
set nf [open lab3.nam w] | |
$ns namtrace-all $nf | |
set tf [open lab3.tr w] | |
$ns trace-all $tf | |
$ns color 1 Blue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ns [new Simulator] | |
set nf [open lab2.nam w] | |
set tf [open lab2.tr w] | |
$ns namtrace-all $nf | |
$ns trace-all $tf | |
set n0 [$ns node] | |
set n1 [$ns node] | |
set n2 [$ns node] | |
set n3 [$ns node] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = int(input("Enter No Of Students: ")) | |
studentData = {} | |
for x in range(n): | |
usn = input(f"Enter Usn of {x} student: ") | |
marks = int(input("Enter Marks: ")) | |
studentData[usn] = marks | |
# creating list from dictonary |
OlderNewer