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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
/* | |
Hello World in Sass | |
(c) Donald Leung. All rights reserved. | |
*/ |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
/* | |
Sass Kata Codewars Style - Multiply (8kyu) | |
Reference Link: https://www.codewars.com/kata/multiply | |
(c) Donald Leung. All rights reserved. | |
*/ |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
/* | |
Sum of first n natural numbers | |
(c) Donald Leung. All rights reserved. | |
*/ |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
/* | |
Recursion in Sass #1 - Factorial | |
(c) Donald Leung. All rights reserved. | |
*/ |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
/* | |
Recursion in Sass #1 - Factorial | |
(c) Donald Leung. All rights reserved. | |
*/ |
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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
/* | |
Recursion in Sass #2 - Fibonacci | |
(c) Donald Leung. All rights reserved. | |
*/ |
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
function brainfuckToBoolfuck(brainfuck) { | |
return brainfuck.replace(/[^+\-.,<>\[\]]/g, "").split("").map(command => ({ | |
"+": ">[>]+<[+<]>>>>>>>>>[+]<<<<<<<<<", | |
"-": ">>>>>>>>>+<<<<<<<<+[>+]<[<]>>>>>>>>>[+]<<<<<<<<<", | |
"<": "<<<<<<<<<", | |
">": ">>>>>>>>>", | |
",": ">,>,>,>,>,>,>,>,<<<<<<<<", | |
".": ">;>;>;>;>;>;>;>;<<<<<<<<", | |
"[": ">>>>>>>>>+<<<<<<<<+[>+]<[<]>>>>>>>>>[+<<<<<<<<[>]+<[+<]", | |
"]": ">>>>>>>>>+<<<<<<<<+[>+]<[<]>>>>>>>>>]<[+<]" |
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
<?php | |
/* | |
function.sinc.php | |
A simple math function (with input validation) | |
that computes the cardinal sine of a real | |
number $x | |
Author: Donald Leung | |
NOTE: Comes with two user-defined constants | |
*/ |
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 <string.h> | |
#include "node.h" | |
int main(void) { | |
Node *binary_tree = new_node('A', | |
new_node('B', | |
new_node('D', NULL, NULL), | |
new_node('E', | |
new_node('G', NULL, 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
% Butch is a killer. | |
killer(butch). | |
% Mia and Marsellus are married. | |
married(mia, marsellus). | |
% Zed is dead. | |
dead(zed). | |
% Marsellus kills everyone who gives Mia a footmassage. |
OlderNewer