This file contains 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
#include<X11/Xlib.h> | |
#include<X11/Xutil.h> | |
#include<X11/keysym.h> | |
#include<unistd.h> | |
#define DURATION 100 | |
int main() | |
{ | |
Display *display = NULL; |
This file contains 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
#ifndef _POLL_H | |
#define _POLL_H | |
#include "hash_table/hashtable.h" | |
#include <sys/epoll.h> | |
#define MAX_EVENTS 100 | |
#define CALLBACK(x) void (*x) (poll_event_t *, poll_event_element_t *, struct epoll_event) | |
#define ACCEPT_CB 0x01 |
This file contains 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
CC = gcc -fPIC | |
LDFLAGS = -lm | |
# set DEBUG options | |
ifdef DEBUG | |
CFLAGS = -Wall -Wextra -ggdb -pg -DDEBUG | |
else | |
CFLAGS = -Wall -O2 | |
endif |
This file contains 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
\documentclass[11pt]{book} | |
\usepackage{graphicx} | |
\usepackage[empty]{fullpage} | |
\author{Ankur Shrivastava} | |
\begin{document} | |
\frontmatter | |
\begin{center} | |
\textbf{\LARGE RING}\\ | |
\vspace{40ex} | |
A mini project report submitted to\\ |
This file contains 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
/** | |
* @file fsm.c | |
* @brief an implementation for a FSM in C, this file contains | |
* implementation of definations. | |
* License GPLv3+ | |
* @author Ankur Shrivastava | |
*/ | |
#include "fsm.h" | |
#include<stdlib.h> |
This file contains 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
/* | |
* Initial implementation of a HTTP server, this is just a test which | |
* only manages GET request for file names | |
* Author: Ankur Shrivastava | |
* Licence: GPLv3+ | |
*/ | |
#include<unistd.h> | |
#include<stdio.h> | |
#include<stdlib.h> | |
#include<string.h> |
This file contains 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
/* Initial implementation for a folder lock | |
* Author: Ankur Shrivastava | |
* License: GPLv3 | |
*/ | |
import java.io.*; | |
import java.util.Enumeration; | |
import java.util.zip.*; | |
import javax.crypto.Cipher; | |
import javax.crypto.CipherOutputStream; |
This file contains 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
; lcd test code for JHD 162a | |
; Author :- Ankur Shrivastava | |
; License : GPLv3 | |
; RS - > set it to port pin connected to RS pin of LCD | |
; R/W -> set it to port pin connected to R/W pin of LCD | |
; E -> set it to port pin connected to E pin of LCD | |
; DAT -> set it to port connected to Data pins of LCD | |
RS EQU P1.2 |
This file contains 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
#include<pthread.h> | |
#include<stdio.h> | |
// a simple pthread example | |
// compile with -lpthreads | |
// create the function to be executed as a thread | |
void *thread(void *ptr) | |
{ | |
int type = (int) ptr; | |
fprintf(stderr,"Thread - %d\n",type); |
This file contains 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
## python socket chat example | |
## author: Ankur Shrivastava | |
## licence: GPL v3 | |
#server | |
import socket | |
import threading | |
import time | |
SIZE = 4 |
NewerOlder