Skip to content

Instantly share code, notes, and snippets.

View melwinjose1991's full-sized avatar

Melwin Jose melwinjose1991

View GitHub Profile
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
public class LearningHashSet {
private static class Element {
int roll_no;
public Element(int r){
roll_no=r;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
public class LearningHashSet {
private static class Element {
int roll_no;
public Element(int r){
roll_no=r;
#include <stdio.h>
#include <stdlib.h>
#include <uv.h>
int main() {
uv_loop_t *loop;
loop = malloc(sizeof(uv_loop_t));
//Initializes the given uv_loop_t structure
uv_loop_init(loop);
#include <uv.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_DATA_SIZE 512
void sigint_handler(uv_signal_t *handle, int signum) {
printf("sigint_handler() : recvd CTRL+C shutting down\n");
uv_stop(uv_default_loop()); //stops the event loop
default: build
build:
gcc -g -Wl,--wrap=redisAsyncHandleWrite,--wrap=redisAsyncHandleRead \
../nginx-1.8.0/objs/src/core/nginx_without_main.o \
../nginx-1.8.0/objs/src/core/ngx_log.o \
.
.
.
../nginx-1.8.0/objs/ngx_modules.o \
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <ngx_event.h>
#include <ngx_core.h>
#include <hiredis/hiredis.h>
#include <hiredis/async.h>
void __wrap_redisAsyncHandleWrite(redisAsyncContext *ac);
void __wrap_redisAsyncHandleRead(redisAsyncContext *ac);
#include <ngx_event.h>
#include <ngx_core.h>
#include <hiredis/hiredis.h>
#include <hiredis/async.h>
redisAsyncContext *redis_async_context;
typedef struct ngx_redis_event_s ngx_redis_event_t;
struct ngx_redis_event_s {