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 (product los1 los2) | |
(define (product-elem los e) | |
(if (eq? los `()) | |
`() | |
(cons (list (car los) e) | |
(product-elem (cdr los) e)))) | |
(if (eq? los1 `()) | |
`() | |
(append (product-elem los2 (car los1)) | |
(product (cdr los1) los2)))) |
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 (join-list lst1 lst2) #! Wrote my own append just because I could | |
(define (append-item lst item) | |
(if (eq? lst `()) | |
(list item) | |
(cons (car lst) (append-item (cdr lst) item)))) | |
(if (eq? lst2 `()) | |
lst1 | |
(if (list? lst2) | |
(join-list (append-item lst1 (car lst2)) (cdr lst2)) | |
(append-item lst1 lst2)))) |
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
#lang racket | |
; stream stuff | |
(define (make-stream proc init) | |
(cons proc init)) | |
(define (eval-stream s) | |
(cdr s)) | |
(define (next-stream s) |
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
What happened that you started to play with you jojo? | |
In elementary school I started to spend with me jojo I had | |
been give n and then I went online and saw videos of people | |
do disgusting fl Ott tricks. I wanted to immediately learn that trick | |
so I ordered me a good jojo online and started training me | |
in full. After two years I was a good single on it and then | |
way has been upward. | |
What do you have to be able with jojo? | |
You have to have ngrafi fi mi and so this is all muscle memory. | |
Patience is also important because some tricks are very annoying |
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
unsigned int djb2(const char *text, int len) | |
{ | |
unsigned int hash = 5381; | |
int c; | |
while(c = *text++) | |
hash = ((hash << 5) + hash) + c; | |
return hash; | |
} |
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
var obj = { | |
val: 0, | |
double: function() { | |
function helper() { | |
this.val += this.val; //this refers to global scope | |
} | |
helper(); | |
} | |
}; |
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
int mask = (1 << __popcnt(v)) - 1; | |
return (~n) & mask; |
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
HTTP/1.1 200 OK | |
X-Transaction: | |
a09713e0086a75d9 | |
X-RateLimit-Remaining: | |
19997 | |
Content-Length: | |
1807 | |
X-RateLimit-Limit: | |
20000 |
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
void fizzbuzz(int n) | |
{ | |
static bool firstRun = true; | |
if(firstRun) | |
{ | |
std::sort(table); | |
firstRun = false; | |
} | |
char buffer[MAX_CHAR]; | |
buffer[0] = '\0'; |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
void printMatrix3x3(float *mat) | |
{ | |
printf("%0.3f\t%0.3f\t%0.3f\n", mat[0], mat[1], mat[2]); | |
printf("%0.3f\t%0.3f\t%0.3f\n", mat[3], mat[4], mat[5]); | |
printf("%0.3f\t%0.3f\t%0.3f\n", mat[6], mat[7], mat[8]); | |
printf("\n"); |
OlderNewer