Skip to main content

Posts

Showing posts from January, 2022

Create a hover button using css - Creation Code

 HTML: <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta http-equiv="X-UA-Compatible" content="IE=edge">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>Hover button</title>     <link rel="stylesheet" href="style.css"> </head> <body>     <button>Creation code</button> </body> </html> CSS: body{     margin: 0;     height: 100vh;     display: flex;     align-items: center;     justify-content: center;     background-color: navy; } p{     font-size: 3rem;     font-family: Verdana, Geneva, Tahoma, sans-serif;     position: relative;     right: 50px; } button{     position: relative;     border: none;     outline: none;     width: 170px;     height: 55px;     background-color: red;     font-size: 1.4rem;     color: #fff;     border-radius: 7px;     cursor: poi

How to Make an Animation RGB Color Using CSS || rgb animation in css and html - Creation Code

 Introduction: In this project, we will create a button which is covered by an animation that creates RGB effect HTML: <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta http-equiv="X-UA-Compatible" content="IE=edge">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <title>RGB button by creation code</title>     <link rel="stylesheet" href="style.css"> </head> <body>     <a href="#" class="button">         <span>CREATION CODE</span>     </a> </body> </html> CSS: html, body{     height: 100%;     overflow: hidden; } body{     background: #191919;     display: flex;     align-items: center;     justify-content: center; } .button{     background-image: linear-gradient(90deg, #00C0FF 0%, #FFCF00 49%, #FC4F4F 100%);     position: relativ

Volume Control With Hand Using Python || How do you controll gestures in Python - Creation Code

Introduction: Gesture recognition helps computers to understand human body language. This helps to build a more potent link between humans and machines, rather than just the basic text user interface or graphical user interfaces(GUIs). In this project for gesture recognition, the human body's motions are read by a computer camera. The computer then makes use of this data as input to handle applications. The objective of this project is to develop an interface that will capture human hand gestures dynamically and will control the volume level Code: import cv2 import mediapipe as mp from math import hypot from ctypes import cast , POINTER from comtypes import CLSCTX_ALL from pycaw . pycaw import AudioUtilities , IAudioEndpointVolume import numpy as np cap = cv2 . VideoCapture ( 0 ) mpHands = mp . solutions .hands hands = mpHands .Hands() mpDraw = mp . solutions .drawing_utils devices = AudioUtilities . GetSpeakers () interface = devices .Activate( IAudioEnd

How do You Code a Digital Clock? || How do you code a clock in javascript - Creation Code

How do you code a digital clock using HTML, CSS, and Javascript? Digital Clock: A digital clock is a type of clock that displays the time digitally(i.e in numerals or other symbols), as opposed to an analog clock. Digital clocks are often associated with electronics drives, but the 'digital' description refers only to the display, not to the drive mechanism. (Both analog and digital clocks can be driven either mechanically or electronically, but "clockwork" mechanisms with digital displays are rare In this post we will create a simple digital clock using javascript HTML: <!DOCTYPE html> <html lang="en"> <head>     <meta charset="UTF-8">     <meta http-equiv="X-UA-Compatible" content="IE=edge">     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <link rel="stylesheet" href="style.css">     <title>Creation code</ti

Write a Python program to count all the line having a as first character || Count number of lines in Python - Creation Code

Why counting the number of lines is important? Counting the number of characters is important because almost all the text boxes that rely on user input have a certain limit on the number of characters that can be inserted. For example, the character limit on a Facebook post is 63,206 characters. Whereas, for a tweet on Twitter the character limit is 140 characters and the character limit is 80 per post for Snapchat. We will make a change on this process we will just count the number of lines that have 'a' as the first character. Approach: Open the file in reading mode and assign a file object named 'file' Assign 0 to the counter variable Read the content of the file using the read function and assign it to a variable named 'content' Create a list of the content where the elements is split wherever they encounter an '\n' Implement: Suppose here we create a file called creationcode.txt and we need to read this file Code: #opening the file in read mode file

HTML Interview Question || What are the Basic Interview Questions in HTML? ||HTML Interview Question and Answer - Creation Code

  Top 4 HTML interview questions for your coming interview 1. What are attributes? Each tag can take in additional attributes that change the way the tag behaves. For example, an input tag has a type attribute, which allows you to specify whether the input field is a text field, checkbox, or radio button among other options. 2. What are entities in HTML? HTML character entities are used to replace reserved characters in HTML. You can also replace characters that are not present on your keyboard by using entities. 3. Explain HTML5? HTML5 is the most recent version of the Hypertext Markup Language. HTML5 introduces several new features: Adding new attributes Allow offline editing Adding new parsing rules to enhance flexibility Support (Web SQL) Support Protocol and MIME handler registration, allowing you to change the way of user interaction with documents. 4. What is an API for HTML5? An API, which stands for Application Programming Interfaces, is a way to build various web applications

How to Make DNA in Python || Program to print DNA Pattern in Python - Creation Code

 This will be a short program but it will be enjoyable for you so let's enjoy the coding  Code: c=input() if len(c)>1:    c=c[0] if len(c)<1:    c="#" Turns=4 s=" " def bids(a,b,c="",d=""):     return(a+b+c+d) def strand():     print(bids(s*19,c))     print(bids(s*17,c*4))     print(bids(s*16,c*6))     print(bids(s*14,c*2,s*6,c*2))     print(bids(s*12,c*14))     print(bids(s*11,c*2,s*12,c*2))     print(bids(s*11,c*16))     print(bids(s*12,c*2,s*10,c*2))     print(bids(s*14,c*10))     print(bids(s*16,c*2,s*2,c*2))     print(bids(s*17,c*4))     print(bids(s*18,c*2)) for i in range(Turns):          strand() Follow my socials: Youtube: https://www.youtube.com/channel/UCU1qNFntn7dCi9uqyvrGKOg Instagram:  https://www.instagram.com/python.math/ Twitter: https://twitter.com/Pritish369 For any question or coding discussion, you can join my discord or telegram: Discord: https://discord.gg/be7MmSuV Telegram: https://t.me/Python_Math_Community

Print Your Name Using Python || write a program to print your name in pattern - Creation Code

 Printing Your Name Using a Python Programm In this post, we will write a program where we will take the user's name as input and in output, we will show them the pattern of their name. It will be really fun so let's jump into the code without wasting any time from random import randrange #Function print_text_in_symbol def print_text_in_symbol(text_input, symbol_char = 'X', symbol_bg = '-', inline = False):          #Lists for the formation of the letters     a = ['000000000000',          '000111111000',          '011000000110',          '011000000110',          '011111111110',          '011000000110',          '011000000110',          '011000000110']          b = ['000000000000',          '011111111000',          '011000000110',          '011000000110',          '011111111000',          '011000000110',          '011000000110',          '01

How to Make a Social Distancing Detector || social distancing detector using python || social distancing-detection using python github - Creation Code

Social Distancing: In public health, social distancing, also called physical distancing, is a set of non-pharmaceutical interventions or measures intended to prevent the spread of a contagious disease by maintaining a physical distance between people and reducing the number of times people come into close contact with each other. It usually involves keeping a certain distance from others(the distance specified differs from country to country and can change with time) and avoiding gathering together in large groups. Now let's build this system in python Approach: First we will create utils for the project Second we will plot the points also known as birds view Now we will create the main program utills.py import cv2 import numpy as np # Function to calculate bottom center for all bounding boxes and transform prespective for all points. def get_transformed_points ( boxes , prespective_transform ):         bottom_points = []     for box in boxes :         pnts = np . array