Skip to content

Instantly share code, notes, and snippets.

View devils-ey3's full-sized avatar
🎯
Focusing

Yeahia Md Abid devils-ey3

🎯
Focusing
View GitHub Profile
@devils-ey3
devils-ey3 / stack.c
Created September 21, 2016 11:14
Stack by c without pointer
#include <stdio.h>
#define max 10
int i=0;
int array[max];
void printInstruction()
{
printf("Press 1 for push\nPress 2 for pop\nPress 3 for display full list\nPress 4 for display top\nPress ctrl+z for exit\n");
}
void push(int element)
@devils-ey3
devils-ey3 / tictactoe.c
Created September 21, 2016 11:16
This is my first year C project. TicTacToe game by c.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
#include <windows.h>
int password();
int pass_system();
void printBoard();
void change_player();
void input();
@devils-ey3
devils-ey3 / filter.c
Created September 21, 2016 11:17
String filter or password filter in c. In this code it will filter every single input so your code isn't crush by this filter code.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "conio.h"
int password();
int pass_system();
int main ()
{
if (!password())
{
count=0
def printMove(fr,to):
global count
count+=1
print('move from '+str(fr)+' to '+str(to))
def Tower(n,fr,to,spare):
if n==1:
printMove(fr,to)
else:
@devils-ey3
devils-ey3 / gcdIter.py
Created September 26, 2016 17:57
Write an iterative function, gcdIter(a, b), that implements this idea. One easy way to do this is to begin with a test value equal to the smaller of the two input arguments, and iteratively reduce this test value by 1 until you either reach a case where the test divides both a and b without remainder, or you reach 1.
def gcdIter(a,b):
"""
make a program thake return
largest integer divides of two number
without using reminder or % syntex"""
if b<a:
a,b = b,a
c = a
while c>0:
if (a/c==a//c) and (b/c==b//c):
@devils-ey3
devils-ey3 / gcdRecursive.py
Created September 26, 2016 19:58
The greatest common divisor of two positive integers is the largest integer that divides each of them without remainder
def gcdRecur(a,b):
if a>b:
a,b=b,a
if a==0:
return b
else:
return gcdRecur(b%a,a)
@devils-ey3
devils-ey3 / hangman.py
Created October 3, 2016 17:59
ITs a hangman. I try this with localhost with single word. You can try it by different word or a word list. Its a exam solution of MIT course
def isWordGuessed(secretWord, lettersGuessed):
'''
secretWord: string, the word the user is guessing
lettersGuessed: list, what letters have been guessed so far
returns: boolean, True if all the letters of secretWord are in lettersGuessed;
False otherwise
'''
# FILL IN YOUR CODE HERE...
return [False, True][lettersGuessed in secretWord]
@devils-ey3
devils-ey3 / index.html
Created May 19, 2018 09:36
Bootstrap Cheat Sheet
<!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">
<title>Bootstrap Cheat Sheet</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<style>
@devils-ey3
devils-ey3 / Redis.txt
Created June 28, 2018 01:08
Redis Cheat Sheet
রেডিস এ কিছু (স্ট্রিং) জমা রাখতে চাইলেঃ SET key value
যেমনঃ SET name Tarek
রেডিস এ জমা রাখা কিছু পেতে চাইলেঃ GET key
যেমনঃ GET name
জমা আছে কিনা তার সত্যতা নিশ্চিত করতে চাইলেঃ EXISTS key
@devils-ey3
devils-ey3 / webdev_online_resources.md
Created July 16, 2018 20:11 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)