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> | |
int main(void) { | |
unsigned int length = 0; | |
enum { empty = 0, | |
lower_alpha = 1, | |
upper_alpha = 2, | |
decim_digit = 4, | |
punctuation = 8 } criteria = empty; | |
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 <assert.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
int ack_recursive(int m, int n) { | |
if (m == 0) { | |
return n + 1; | |
} |
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
class FileStream | |
: System.IO.FileStream | |
{ | |
protected long this[string key] | |
{ | |
get { | |
this.Position = 0; | |
int c, p = 0; | |
for (; ; ) |
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 <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
#define DICE_COUNT 3 | |
#define SIDE_COUNT 6 | |
unsigned int roll(unsigned int side_count) { | |
int n; |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
class MessageHandlerDictionary | |
: Dictionary<Regex, IRC_Socket.MessageHandler> |
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
typedef struct | |
{ | |
size_t size; | |
void** list; | |
} List; | |
int add(List** li, void* obj) | |
{ | |
List* list = *li ? *li : malloc(sizeof *list); | |
if (list == NULL) { |
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
/* I hearby do solemnly declare this to be the most beautiful abuse of preprocessor macros and structs I've ever committed. */ | |
#define ARRAY_CAT(type, array, ...) (*(type (*)[sizeof (array) / sizeof (type) + sizeof ((type[]) { __VA_ARGS__ }) / sizeof (type)]) &(struct { type foo[sizeof (array) / sizeof (*array)]; type bar[sizeof ((type[]) { __VA_ARGS__ }) / sizeof (type)]; }) { .foo = array, .bar = { __VA_ARGS__ } }) | |
#include <stdio.h> | |
int main(void) { | |
const int array_1[] = { 0, 1, 2, 3 }; | |
const int array_2[] = ARRAY_CAT(int, array_1, 4, 5, 6, 7, 8); | |
const int array_3[] = ARRAY_CAT(int, array_1, 10, 11, 12); |
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
/***************** | |
* bossFight.js * | |
***************** | |
* | |
* NO FARTHER, DR. EVAL!!!! | |
* YOU WILL NOT GET OUT OF HERE ALIVE!!!! | |
* IT'S TIME YOU SEE MY TRUE FORM!!!! | |
* FACE MY ROBOT WRATH!!!!! | |
*/ |
NewerOlder