This file contains hidden or 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
import time | |
def nam_query(): | |
nam = input("Enter Your First Name: ") | |
if len(nam) == 0: | |
print("So, you're telling me you don't have a name?") | |
time.sleep(1) | |
nam_query() | |
elif len(nam) > 16: |
This file contains hidden or 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 random import randint as rnd | |
from time import sleep as sl | |
def diff(): | |
global diff_lvl | |
diff_lvl = "" | |
print("Select difficulty (E = Easy / N = Normal / H = Hard)") | |
diff_select = input("Type and Enter: ") | |
diff_select.lower() | |
if diff_select == 'e': |
This file contains hidden or 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
import tkinter as tk | |
def buttonpressed(i): | |
if i != '=': | |
entry.insert(tk.END, i) | |
else: | |
expression = entry.get() | |
try: | |
value = eval(expression) | |
new_string = f'{value: ,}' |
This file contains hidden or 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"> | |
<title>Ferris Wheel — Ali Almasi </title> | |
<link rel="stylesheet" href="./style.css"> | |
</head> | |
<body> | |
<div class="wheel"> | |
<span class="line"></span> |
This file contains hidden or 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
javascript: function keyDown(e) { | |
Podium = {}; | |
var n = document.createEvent("KeyboardEvent"); | |
Object.defineProperty(n, "keyCode", { | |
get: function () { | |
return this.keyCodeVal; | |
}, | |
}), | |
n.initKeyboardEvent | |
? n.initKeyboardEvent("keydown", !0, !0, document.defaultView, e, e, "", "", !1, "") |
This file contains hidden or 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
<html data-theme="light"> | |
<head> | |
<title>Dark Mode w/ JS</title> | |
<style> | |
[data-theme="light"] { | |
--color-bg: #e5e5e5; | |
--color-fg: #0f0f0f; | |
} | |
[data-theme="dark"] { |
This file contains hidden or 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"> | |
<title>Counter.Js</title> | |
<style> | |
*, | |
*::before, | |
*::after { |
This file contains hidden or 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
<link rel="preload" href="css/global.min.css" as="style" onload="this.rel='stylesheet'"> | |
<noscript><link rel="stylesheet" href="css/global.min.css"></noscript> | |
<script> | |
/*! loadCSS. [c]2017 Filament Group, Inc. MIT License */ | |
!function(a){"use strict";var b=function(b,c,d){function j(a){if(e.body)return a();setTimeout(function(){j(a)})}function l(){f.addEventListener&&f.removeEventListener("load",l),f.media=d||"all"}var g,e=a.document,f=e.createElement("link");if(c)g=c;else{var h=(e.body||e.getElementsByTagName("head")[0]).childNodes;g=h[h.length-1]}var i=e.styleSheets;f.rel="stylesheet",f.href=b,f.media="only x",j(function(){g.parentNode.insertBefore(f,c?g:g.nextSibling)});var k=function(a){for(var b=f.href,c=i.length;c--;)if(i[c].href===b)return a();setTimeout(function(){k(a)})};return f.addEventListener&&f.addEventListener("load",l),f.onloadcssdefined=k,k(l),f};"undefined"!=typeof exports?exports.loadCSS=b:a.loadCSS=b}("undefined"!=typeof global?global:this); | |
/*! loadCSS rel=preload po |
This file contains hidden or 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
class PersianDate extends Date { | |
constructor(...args) { | |
super(...args); | |
} | |
toLocaleDateString = () => super.toLocaleDateString("fa-IR-u-nu-latn"); | |
getParts = () => this.toLocaleDateString().split("/"); | |
getDay = () => (super.getDay() === 6 ? 0 : super.getDay() + 1); | |
getDate = () => this.getParts()[2]; | |
getMonth = () => this.getParts()[1] - 1; |
This file contains hidden or 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
function IrIdCheck(code) { | |
var L = code.length; | |
if (L < 8 || parseInt(code, 10) === 0) return false; | |
code = ('0000' + code).substr(L + 4 - 10); | |
if (parseInt(code.substr(3, 6), 10) === 0) return false; | |
int c = parseInt(code.substr(9, 1), 10); | |
int s = 0; | |
for (int i = 0; i < 9; i++) | |
s += parseInt(code.substr(i, 1), 10) * (10 - i); | |
s = s % 11; |
OlderNewer