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>Document</title> | |
<style type="text/css"> | |
#wrapper{ | |
width: 600px; | |
height: 600px; | |
margin: auto; |
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
<?php | |
namespace App\SocialMedia; | |
class Facebook{ | |
protected $client_id; | |
private $client_secret; | |
public $redirect_url; | |
public function __construct($facebook){ | |
$this->client_id = $facebook['client_id']; |
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
<?php | |
# File: app\Http\Middleware\CORS.php | |
# Create file with below code in above location. And at the end of the file there are other instructions also. | |
# Please check. | |
namespace App\Http\Middleware; | |
use Closure; | |
class CORS { |
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
<?php | |
add_action( 'add_meta_boxes', 'my_meta_box_add' ); | |
add_action( 'save_post', 'save' ); | |
function my_meta_box_add() { | |
add_meta_box( 'my-meta-box-id', 'Select The Chef for Food', 'my_meta_box', 'product', 'normal', 'high' ); | |
} | |
function save( $post_id ) { | |
/* | |
* We need to verify this came from the our screen and with proper authorization, |
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 random | |
win = 0 | |
tries = 0 | |
count = 0 | |
print("Let's Play 'GUESS THE NUMBER' Game!") | |
ans = input("Are You Ready To Play? [yes/no]: ") | |
while ans.lower() != 'no': | |
print("I'm Thinking a Number from 1 to 10, Guess It In 3 Tries") | |
guess = random.randint(1, 10) | |
for count in range(3, 0, -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
chance = "" | |
while (chance!="no"): | |
try: | |
num = int(input("Please enter a number\n")) | |
if (num%5==0 and num%3==0): | |
print("FizzBuzz") | |
elif (num%5 == 0): | |
print("BUZZ") | |
elif (num%3 == 0): | |
print("FIZZ"); |
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 random | |
win = 0 | |
tries =0 | |
count = 3 | |
print ("Let's Play 'GUESS THE NUMBER' Game!") | |
ans = input("Are you ready to play? [yes/no] ") | |
while ans.lower() != "no": | |
print("I'm thinking number from 1 to 10, Guess It in 3 tries ") | |
guess = random.randint(1,10) | |
for count in range (3,0,-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
num = int(input("Enter the number of rows ")) | |
for i in range(1, num+1): | |
for j in range(num-i, num): | |
print("*", end="") | |
print() |
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 turtle import Turtle, Screen | |
screen = Screen() | |
screen.setup(400, 400) | |
screen.screensize(380, 380) | |
screen.tracer(0) | |
t = Turtle() | |
t_right = 0.0 | |
t.up = 90.0 | |
t.down = 270.0 | |
t.lef = 180.0 |
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 turtle import Turtle, Screen, Pen | |
s = Screen() | |
s.setup(800, 600) | |
s.screensize(780, 580) | |
s.bgcolor('black') | |
s.title("Pong Game by Perfect Web Solutions") | |
s.tracer(0) | |
# ball | |
ball = Turtle('circle', visible=False) | |
ball.color('white') |
OlderNewer