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\Commands; | |
use CodeIgniter\CLI\BaseCommand; | |
use CodeIgniter\CLI\CLI; | |
use Config\Services; | |
/** | |
With the help of this command you can create a resource controller in CodeIgniter 4. | |
1) just create a folder named Commands in app folder | |
2) then create a php file with name CreateResourceController.php |
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 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget{ | |
@override | |
Widget build(BuildContext context){ | |
return MaterialApp( | |
title: "Welcome to Flutter", | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text("Welcome to Flutter App"), |
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
<template> | |
<v-data-table | |
item-key="name" | |
class="elevation-1" | |
:loading ="loading" | |
loading-text="Loading... Please wait" | |
:headers="headers" | |
:items="roles" | |
sort-by="calories" | |
> |
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') |
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
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
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
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"); |
NewerOlder