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
// access the root div in index.html | |
const app = document.getElementById('root'); | |
// create a container as a div in the html | |
const container = document.createElement('div'); | |
container.setAttribute('class', 'container'); | |
// place the container on the website | |
app.appendChild(container); |
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
* { | |
box-sizing: border-box | |
} | |
body, | |
html { | |
height: 100%; | |
} | |
.bg { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Dad Jokes Daily</title> | |
<link href="https://fonts.googleapis.com/css?family=Dosis:400,700" rel="stylesheet"> |
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
-- Performs the following date calculations: | |
-- What is the date [input days] ago? | |
-- What is the date [input days] later? | |
-- How many days ago is the [input date]? | |
-- How many days until the [input date]? | |
repeat | |
-- main switchboard | |
display dialog "Welcome to DAYS COUNTER! Choose the calculation:" buttons {"The date x days ago/later", "How many days to/since", "Exit"} | |
set btn to button returned of result |
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
-- Send a quick e-mail from your desktop without having to be distracted by all the other e-mails in your inbox! | |
-- by Athiya Deviyani | |
-- Recipient name | |
display dialog "Recipient name" default answer "" | |
set theName to text returned of result | |
-- Recipient e-mail address | |
display dialog "Recipient e-mail address" default answer "[email protected]" |
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
from tkinter import * | |
from tkinter import scrolledtext | |
from tkinter import messagebox | |
from tkinter.ttk import Progressbar | |
from tkinter import filedialog | |
from tkinter import Menu | |
window = Tk() | |
window.title("Magic Trick") |
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
from tkinter import * | |
from PIL import Image, ImageTk | |
window = Tk() | |
window.title("BMI Calculator") | |
window.geometry('720x1000') | |
lbl = Label(window, text = "Welcome to the BMI Calculator!", font = ("System", 20)) | |
lbl.grid(column = 0, row = 0, columnspan = 2) |
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
# BASIC TKINTER CHEATSHEET | |
# Build basic GUIs with Python | |
from tkinter import * | |
from tkinter import scrolledtext | |
from tkinter import messagebox | |
from tkinter.ttk import Progressbar | |
from tkinter import filedialog | |
from tkinter import Menu |