Skip to content

Instantly share code, notes, and snippets.

View Athira2199's full-sized avatar
🎯
Focusing

Athira.V.Ajit Athira2199

🎯
Focusing
View GitHub Profile
#handler for deleting todos.
def delete_handler():
return
#handler for updating todos
def update_handler():
updatedToDo = dict()
print('Enter to do id')
toDoId = input()
print('Enter name, leave as blank if update not required ')
name = input()
if(name != ""):
updatedToDo["name"] = name
print('Enter description, leave as blank if update not required ')
#handler for display operations
def show_handler():
todos = todo.find({})
flag = False
print("------------------------TODO----------------------------")
for item in todos:
print('name : ',item["name"],'| description : ',item["description"],'| status',item["status"])
flag = True
if(not flag):
print('You have not added any todo yet !!!!')
#handler to handle the insert operation
def insert_handler():
print('--------ADDING A NEW TO DO--------')
print('Insert name of to-do')
name = input()
print('Insert description of todo')
description = input()
insertStatus = insert_todo({
"name" : name,
"description" : description,
if(!await User.emailIdAlreadyTaken(email)){
console.log("Email id already taken")
}
else{
console.log("Eligible for account creation")
}
const user = new User({
name,
password
})
await user.generatePassword()
/* we can write as many method functions in between as well*/
await user.save()
const mongoose = require('mongoose')
var bcrypt= require('bcrypt')
const UserSchema=mongoose.Schema({
name : {
type : String
},
password : : {
type : String
}
})
.line{
animation: line-length 3s ease-in-out infinite;
}
#hand-boy,#hand-note-boy{
animation: rotate 3s ease-in-out infinite;
}
@keyframes line-length{
0%{
transform : translate(-90.21711px,-178.25098px);
opacity: 0.1;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.