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 <stdint.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <signal.h> | |
unsigned long long int numLaughs = 0; | |
void normalExit(void){ | |
printf("\nI laughed %llu times、\n\n", numLaughs); |
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 <iostream> | |
#include <stdint.h> | |
#include <string.h> | |
// this solution is dependent on endianess, and is thus not cross-platform | |
struct RGB_t { |
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 <iostream> | |
#pragma pack(0) | |
// a 4-bit bitfield | |
struct word_t { | |
unsigned int val : 4; | |
}; | |
// 8-bits |
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 <inttypes.h> | |
#include <stdarg.h> | |
#define COLOR_RESET "\x1B[0m" | |
inline void textColor() |
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 tkinter as tk; | |
import random; | |
class Application(tk.Frame): | |
def __init__(self, master = None): | |
tk.Frame.__init__(self, master); | |
self.grid(); | |
self.createWidgets(); |
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
#version 3.7 | |
global_settings{ assumed_gamma 1.0 } | |
#default{ finish{ ambient 0.1 diffuse 0.9 }} | |
#include "colors.inc" | |
#include "glass.inc" | |
/* | |
light_source { | |
<50, 20, 10> | |
color White |
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 tkinter as tk; | |
import random; | |
import time; | |
WIDTH = HEIGHT = 800; | |
POPULATION = 200; | |
# returns a hex color between #000 and #FFF in the form of a string |
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 "Arduino.h" | |
#include <inttypes.h> | |
#define BUTTON_PIN 4 | |
#define BUZZ_PIN 5 | |
#define RED_LED_PIN 8 | |
#define GREEN_LED_PIN 9 | |
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
#version 3.7 | |
global_settings{ assumed_gamma 1.0 } | |
#default{ finish{ ambient 0.1 diffuse 0.9 }} | |
#include "colors.inc" | |
light_source { | |
<50, 20, 10> | |
color White |
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 Node(object): | |
def __init__(self): | |
self.data = None; | |
self.next = None; | |
self.prev = None; | |
def __init__(self): | |
self.data = None; | |
self.next = None; | |
self.prev = None; |