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
if ("GET".equals(method)) { | |
response = (ClientResponse) builder.get(ClientResponse.class); | |
} else if ("POST".equals(method)) { | |
response = builder.type(contentType).post(ClientResponse.class, serialize(body, contentType, formParams)); | |
} else if ("PUT".equals(method)) { | |
response = builder.type(contentType).put(ClientResponse.class, serialize(body, contentType, formParams)); | |
} else if ("DELETE".equals(method)) { | |
response = builder.type(contentType).delete(ClientResponse.class, serialize(body, contentType, formParams)); | |
} else if ("PATCH".equals(method)) { | |
response = builder.type(contentType).header("X-HTTP-Method-Override", "PATCH").post(ClientResponse.class, serialize(body, contentType, formParams)); |
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
if ("GET".equals(method)) { | |
response = (ClientResponse) builder.get(ClientResponse.class); | |
} else if ("POST".equals(method)) { | |
response = builder.type(contentType).post(ClientResponse.class, serialize(body, contentType, formParams)); | |
} else if ("PUT".equals(method)) { | |
response = builder.type(contentType).put(ClientResponse.class, serialize(body, contentType, formParams)); | |
} else if ("DELETE".equals(method)) { | |
response = builder.type(contentType).delete(ClientResponse.class, serialize(body, contentType, formParams)); | |
} else if ("PATCH".equals(method)) { | |
response = builder.type(contentType).header("X-HTTP-Method-Override", "PATCH").post(ClientResponse.class, serialize(body, contentType, formParams)); |
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
if ("GET".equals(method)) { | |
response = (ClientResponse) builder.get(ClientResponse.class); | |
} else if ("POST".equals(method)) { | |
response = builder.type(contentType).post(ClientResponse.class, serialize(body, contentType, formParams)); | |
} else if ("PUT".equals(method)) { | |
response = builder.type(contentType).put(ClientResponse.class, serialize(body, contentType, formParams)); | |
} else if ("DELETE".equals(method)) { | |
response = builder.type(contentType).delete(ClientResponse.class, serialize(body, contentType, formParams)); | |
} else if ("PATCH".equals(method)) { | |
response = builder.type(contentType).header("X-HTTP-Method-Override", "PATCH").post(ClientResponse.class, serialize(body, contentType, formParams)); |
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<stdlib.h> | |
#include<string.h> | |
// AUTHOR : Paul Davies C; Email : pauldaviesc@gmail.com | |
//Specify the file name at the command line itself EG:- ./a.out FILENAME | |
void main(int argc,char *argv[]) | |
{ | |
int BUFFER,sum=0,c=0,i=0,sumtemp=0,k; | |
FILE *fp=fopen(argv[1],"r"); | |
while(fscanf(fp,"%d",&BUFFER)>0){ |
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<stdlib.h> | |
#include<string.h> | |
// AUTHOR : Paul Davies C; Email : pauldaviesc@gmail.com | |
//Specify the file name at the command line itself EG:- ./a.out FILENAME | |
void main(int argc,char *argv[]) | |
{ | |
int BUFFER,sum=0; | |
FILE *fp=fopen(argv[1],"r"); | |
while(fscanf(fp,"%d",&BUFFER)>0 && (sum+=BUFFER)); |
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
/*Title : Recursive descent parser for the grammar | |
E->T E1 | |
E1->+ T E1 | ^ | |
T-> F T1 | |
T1-> * F T1 | ^ | |
F-> a| (E) | |
Author: Paul Davies C Email :pauldaviesc@gmail.com | |
Date : 8 Feb 2013 | |
*/ | |
#include<stdio.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
#include<linux/kernel.h> | |
#include<linux/module.h> | |
#include<linux/unistd.h> | |
#include<linux/semaphore.h> | |
#include<asm/cacheflush.h> | |
#include<asm/tlbflush.h> | |
MODULE_LICENSE("GPL"); | |
void **sys_call_table; | |
struct page *pg; | |
asmlinkage int (*original_call)(struct pt_regs); |
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<unistd.h> | |
#include<string.h> | |
#include<stdio.h> | |
#include<stdlib.h> | |
void main() | |
{ | |
char path[]="/bin/%s",*arg=(char *)malloc(15*sizeof(char)),*cmd=(char *)malloc(15*sizeof(char)),*cmdarg=(char *)malloc(15*sizeof(char)),*cwd=(char *)malloc(70*sizeof(char)); | |
while(1){ | |
printf("paul@linux:~%s$ ",getcwd(cwd,70)); | |
cmdarg=gets(cmdarg); |
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> | |
#define INFINITY 9999 /*INFINITY should be larger than the largest cost edge.Instead of blank space in the algo we use infinity here*/ | |
struct coord | |
{ | |
int x,y; | |
}; | |
typedef struct coord coord; | |
int noPath(int i,int j,int prev,int n,int MST[10][10]) | |
{ | |
int k,r=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
#!/usr/bin/python | |
import time | |
import tweepy | |
import os | |
#Collecting necessary information for login by reading from various files | |
fp=open("/home/paul/Python/key","r") | |
a=fp.read() | |
key=a.strip() | |
fp.close() | |
fp=open("/home/paul/Python/secret","r") |
NewerOlder