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
use std::io::Write; | |
use std::thread::{self, sleep, JoinHandle}; | |
use std::time::Duration; | |
fn flush() { | |
std::io::stdout().flush().unwrap(); | |
} | |
fn main() { | |
let mut threads: Vec<JoinHandle<()>> = Vec::new(); |
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
% https://swish.swi-prolog.org/p/KDyjHEJd.pl | |
fizzbuzz(_, 0, 0, 'fizzbuzz'). | |
fizzbuzz(_, 0, _, 'fizz'). | |
fizzbuzz(_, _, 0, 'buzz'). | |
fizzbuzz(X, _, _, X). % yuno what it is | |
buzzmyfizz(N) :- | |
FIZZ is N mod 3, | |
BUZZ is N mod 5, |
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
use std::io::stdio::flush; | |
use std::io::timer::sleep; | |
use std::thread::{Thread, JoinGuard}; | |
use std::time::duration::Duration; | |
fn main() { | |
let mut threads: Vec<JoinGuard<()>> = Vec::new(); | |
threads.push(Thread::spawn(|| { | |
let mut i = 0u; |
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 <unistd.h> | |
#include <sys/wait.h> | |
#include <errno.h> | |
void handle_error(void); | |
int main(int argc, char **argv) | |
{ |
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
/* | |
Based off http://bookofhook.com/mousepick.pdf | |
OpenGL matrix order | |
m0 m4 m8 m12 | |
m1 m5 m9 m13 | |
m2 m6 m10 m14 | |
m3 m7 m11 m15 | |
Projection matrix |
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
#define begin <% | |
#define End %> | |
#define as while | |
#define and , | |
#define COUNTDOWN 10 | |
#define Sub int | |
#define Dim int | |
#define cfoutput printf("%d ", | |
#define cfoutputted ); |
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
class Avatar < ActiveRecord::Base | |
attr_accessor :content_type, :original_filename, :image_data | |
before_save :decode_base64_image | |
has_attached_file :image, | |
PAPERCLIP_CONFIG.merge( | |
:styles => { | |
:thumb => '32x32#', | |
:medium => '64x64#', |