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 <stdio.h> | |
main(void){puts("hi");} |
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
let rec fib = function | |
0 -> 0 | |
| 1 -> 1 | |
| x -> fib(x-1) + fib(x-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 <stdio.h> | |
#include <sys/epoll.h> | |
void start_epoll(int fd) | |
{ | |
int efd,ret; | |
struct epoll_event ev,events; | |
int buf; | |
efd = epoll_create(1); |
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
/** | |
* How to compile in linux : | |
* gcc -lrt posix_timer.c | |
* to link posix timer functions. | |
*/ | |
#include <stdio.h> | |
#include <time.h> | |
#include <signal.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
/** | |
* How to compile in linux : | |
* gcc -lrt posix_timer.c | |
* to link posix timer functions. | |
*/ | |
#include <stdio.h> | |
#include <time.h> | |
#include <signal.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
all: | |
gcc easy_alloc.c -o easy_alloc | |
./easy_alloc | |
clean: | |
rm -rf easy_alloc |
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
all: | |
g++ a.cpp -o a | |
./a | |
clean: | |
rm -rf a |
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
all: | |
g++ helloserver.cpp -o helloserver | |
clean: | |
server |
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 __DPRINTF_H__ | |
#define __DPRINTF_H__ | |
#ifdef __DEBUG__ | |
#define dprintf(fmt,...) \ | |
printf("[%s]%d:" fmt "\n",__FUNCTION__,__LINE__,__VA_ARGS__) | |
#define dputs(str) \ | |
printf("[%s]%d:" str "\n",__FUNCTION__,__LINE__) |
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
all: | |
make poll | |
make select | |
poll: poll.c | |
gcc poll.c -o poll | |
select:select.c | |
gcc select.c -o select |
OlderNewer