void print_help()
{
printf("usage:\n") ;
...
C Using getopt() to parse inp...
by rickross.myopenid.com,
January 24, 2009 21:13,
No refactoring, tagged with input, parse, arguments, getopt
This is a simple bit of cod...
int max = rand(); // or any init value int min = rand(); // or any init value int tmp = rand(); // or any init value ...
C How to find max, min of thr...
by Tien Dung,
November 18, 2008 12:33,
19 refactorings
I tried to use as less vari...
#include <math.h> #include <stdio.h> #include <stdlib.h> ...
-(IBAction)countCharacters:(id)sender {
NSString *inputString = [[NSString alloc] initWithFormat:[input stringValue]];
...
C Counting characters
by halbtuerke,
October 21, 2008 17:16,
1 refactoring, tagged with count, character, objectivec, cocoa
This is actually Objective-...
char **split (char *string, char sep, char escape) {
char **ret = NULL;
...
C A Java-like function split
This function splits a stri...
#include <math.h> #include <stdio.h> ...
C Fastest way to get value of pi
by Chris Jester-Young,
July 30, 2008 03:50,
5 refactorings, tagged with speed, pi, language agnostic
Solutions welcome in any la...
#include <stdio.h> #include <math.h> int main () ...
C Quanti bit per rappresentar...
Dato un intero,determinare ...
#ifndef _LINKED_LIST_H_ #define _LINKED_LIST_H_ #include "common.h" ...
C Linked lists implementation
Hello, im not sure whether ...
int socket_read_line_alloc(int sock, char** out) {
/* current buffer size */
unsigned int size = 128;
...
C Socket read line in C
I don't like the char** out...
#define kSpace 032
char buf[] = {0x42, 0x73, 0x75, 0x27, 0x13, 0x1C, 0x68, 0x1B, 0x64};
...
C Character buffer manipulati...
by Mike,
October 14, 2007 02:17,
10 refactorings
Hi All,
I was given this...
/* Linked list that emulates a hash map */ # include <stdlib.h> # include <stdio.h> ...
C Misbehaving global pointer
by getopenid.com/ptn,
October 13, 2007 17:55,
2 refactorings
I was in the middle of this...
vector<Service*> services; .... .... ...
C pointor of vector problem
by guzi5618.myopenid.com,
October 09, 2007 12:46,
1 refactoring
Here is my code. I would li...
/* Transforms a number to a string * e.g 1234 => "1234" * ...
C simplest of mallocs examples
by getopenid.com/ptn,
October 02, 2007 20:24,
5 refactorings
Practising for my test tomo...
_=0;c(q){q<0?putchar("`',)( \n-\\_/"[q+11]):c(("#"
"CB#_,ab:@BbBXb\\bG]N_2JNH4`X:.MRLA,aA(J`)BFRTBRL"
"'####_SJ[0RJbb\\R]N=5,64XMMR976Hb\\QLARZ[O-TZ[RT"
...
C C simple loop
by Andy Sloane,
September 27, 2007 17:52,
16 refactorings
How to make this shorter ?
Hi I'm trying to make a pro...