Skip to main content

Posts

JavaScript: Interactive Login form Using Cookie

Interactive Login form Using Cookie Good day guys,               Today I am here to have a discussion regarding a small program for Beginners with JavaScript and CSS. Even though it's a small program. I hope it will be pretty useful to everyone. First of all, let's have a look at what we are going to make: A screenshot from the latest version of Firefox. We can see that the page has a simple but beautiful user interface.I have accomplished this using simple HTML and CSS.Now , I would like describe the HTML in a few steps so that it can make this tutorial readable and easy to understand. Step 1 We have to make some containers to wrap the HTML elements(the text inputs , buttons etc.) so that it will be easy to manage.Here I use <div> tag to make the containers here.I have used three <div> elments which the first one contains the other two where the second one contains the username TextInput , Password the Heading and the Image.The third one ho
Recent posts

JavaScript:Magic Square

<html> <head> <title> Game:MagicalSquare. </title> </head> <style> table{ border-style: solid; border-color: white; border-width: 2px; width: 30%; height: 25%; text-align: center; padding-top: 20px; margin-top: 5px; padding-bottom: 20px; background-color:#00edff; } input[type=text]{ width:60px; height:60px; border: solid #063; border-radius:20px; font-size:16px; text-align:center; background-color:#55edff; color:white; } body{ border: solid #063; border-radius:20px; width=30%; height:70%; color:white; background-color:gray; } h2{ margin-top: 10px; border-color: white; border-width: 1px; border-style: solid; width: 30%; height: 40px; padding-top: 10px;; } div{ width:30%; height:12%; border-style:solid; border-color:white; border-width:2px; margin-top:5px; } input[type=button]:hover, input[type=button]:active { background-color: red; } input[type=button] {

Python Sales Management By Nishad TK

import re class shop: def __init__(self): self.stock=[] self.sales=0 self.purchase=0 def addStock(self): name=raw_input("Enter the product name") while not re.match(re.compile(r'[a-zA-Z]+'),name): name=raw_input("Invalid product name , Please try again") price=raw_input("Enter the product price") while not re.match(re.compile(r'[0-9]+'),price): price=raw_input("Invalid product price , Please try again") quantity=raw_input("Enter the product quantity") while not re.match(re.compile(r'[0-9]+'),quantity): quantity=raw_input("Invalid product quantity , Please try again") ele=[name,price,quantity] self.stock.append(ele) def sales(self,product): for i in range(0,len(self.stock)): if re.match(product[0

Python Game By Nishad TK

from random import randint import re class game: def __init__(self): self.no_of_guesses =0 self.rabbit=0 self.portuga=0 self.inp=0 self.secret_no=self.rand() def addRabbit(self): self.rabbit+=1 def addPortuga(self): self.portuga+=1 def addGuess(self): self.no_of_guesses+=1 def rand(self): unique=[] while not (len(unique)>3): ran=[] for i in range(0,9): no=(randint(0,9)) ran.append(no) for j in range(0,9): if ran[j] not in unique: unique.append(ran[j]) return str(unique[0])+str(unique[1])+str(unique[2])+str(unique[3]) def checkDupe(self,inc): flag=0 for i in range(0,4): x=inc[:i]+inc[i+1:] if inc[i] in x: flag+=1 if flag==0: return False else: return True def play(se