Skip to content

Instantly share code, notes, and snippets.

Avatar

Sayantan sayantanHack

View GitHub Profile
@sayantanHack
sayantanHack / index.html
Created Oct 10, 2019
Best Button animation
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Best Hover Button</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
View chatServer.py
import socket
import threading
import sys
# ================= This is Server ===============
class Server:
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connections = []
def __init__(self):
self.sock.bind(('0.0.0.0',10000))
View main.dart
// LIST RANKING
void main(){
var superHeroes = ['Hulk','Batman',"spiderman","flash"];
superHeroes.forEach((hero){
print("Position : ${superHeroes.indexOf(hero)+1} Next super Hero is $hero ");
});
}
View validatingEmail.py
import email.utils as eu
num = int(raw_input(""))
lst=[]
for i in range(num):
f = raw_input("")
li = eu.parseaddr(f)
unm = li[1].split("@")[0]
dom = li[1].split("@")[1].split(".")[0]
ext = li[1].split("@")[1].split(".")[1]
View star-inPython.py
n=4
m=1
for i in range(n):
for j in range(n):
print("*", end='')
print('*')
n=n-1
print('*')
View swap!=var.c
/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
***************************SWAP WITHOUT THIRD VARIABLE********************************/
#include <stdio.h>
@sayantanHack
sayantanHack / addArray.c
Created Jan 18, 2019
adding array elements & showing them
View addArray.c
#include<stdio.h>
int main(void){
int i, nums[50], n;
printf("Enter the number of the array, array size max is 50 : ");
scanf("%d",&n);
// addding numbers to the array
for(i=0;i<n;i++){
scanf("%d",&nums[i]);
}
@sayantanHack
sayantanHack / Reverse.c
Created Jan 18, 2019
This is the mirror programewhere user gives a number which is printed in a reverse order .
View Reverse.c
#include<stdio.h>
int main(void){
int n ,newNum, num4,num3,num2,num1;
printf("Enbter any Four digit number you wanna reverse : ");
scanf("%d",&n); // taking number from users
// finding the each digits of thr number.
num4 = n/1000;
num3 = (n%1000)/100;
num2 = (n%100)/10;
@sayantanHack
sayantanHack / Fibonacci.c
Created Jan 18, 2019
This is the fibonacci series program , which print the series upto 15 numbers , you can increase or decrease variable n upto how many you choose to print . Happy coding !
View Fibonacci.c
#include<stdio.h>
int main(void){
int n=15,i,f1=0,f2=1, nextItem=0; // initializing the variables
for(i=0;i<n;i++){
printf("%d ", f1); // printing variables
nextItem= f1+f2; // fibo algo
f1=f2; // exchanging the values
f2= nextItem;
View Calcutaor_cli _arg.c
#include<stdio.h>
#include<cs50.h>
#include<string.h>
int main(int argc, string argv[])
{
if(argc!=4){
return 1;
}
You can’t perform that action at this time.