This file contains hidden or 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> | |
| enum states { before, inside, after }; | |
| void step(enum states *state, int c) | |
| { | |
| if(c == '\n') { | |
| putchar('\n'); | |
| *state = before; | |
| } else |
This file contains hidden or 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
| import java.io.*; | |
| import java.util.*; | |
| public class FileWalker { | |
| public static void main(String[] args) { | |
| for( int i = 0; i < args.length; i++ ) { | |
| File f = new File(args[i]); | |
| if(f.exists()) { | |
| System.out.println("Name: " + f.getName()); |
This file contains hidden or 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/perl | |
| use strict; | |
| use warnings; | |
| use autodie ':all'; | |
| use File::Spec::Functions qw(catdir splitdir); | |
| # The starting directory will be passed on the command line | |
| # Otherwise, use the current directory. |
This file contains hidden or 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 <math.h> | |
| #include <stdio.h> | |
| typedef struct { | |
| double one_match; | |
| double none_match; | |
| } bday_struct; | |
| int upto = 40; |
This file contains hidden or 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 <assert.h> | |
| /* #include "New.h" | |
| #include "Object.h" | |
| #include "Set.h" */ | |
| #if ! defined MANY || MANY < 1 | |
| #define MANY 10 | |
| #endif |
This file contains hidden or 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
| /* libtools.cpp - library of C++ procedures */ | |
| #include <cstdio> | |
| #include <cstring> | |
| #include <cstdlib> | |
| #include <cctype> | |
| #define MAX_NAME 255 /* maximum length of program or file name */ | |
| static char prog_name[MAX_NAME+1]; /* used in error messages */ |
This file contains hidden or 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 <stdlib.h> | |
| #include <stdio.h> | |
| #ifndef __cplusplus | |
| typedef char bool; | |
| #define true 1 | |
| #define false 0 | |
| #endif | |
| struct list_element { |
This file contains hidden or 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
| import os | |
| import time | |
| import boto | |
| import boto.manage.cmdshell | |
| def launch_instance(ami='ami-7341831a', | |
| instance_type='t1.micro', | |
| key_name='us-west-key2', | |
| key_extention='.pem', | |
| key_dir='~/Documents/Keys', |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| type Ball struct { hits int } | |
This file contains hidden or 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
| /* | |
| Derived from Inferno include/kern.h and | |
| Plan 9 from User Space include/libc.h | |
| http://code.google.com/p/inferno-os/source/browse/include/kern.h | |
| http://code.swtch.com/plan9port/src/tip/include/libc.h | |
| Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. | |
| Revisions Copyright © 2000-2007 Vita Nuova Holdings Limited (www.vitanuova.com). All rights reserved. | |
| Portions Copyright © 2001-2007 Russ Cox. All rights reserved. |
OlderNewer