Skip to content

Instantly share code, notes, and snippets.

View yolayne's full-sized avatar

Layne yolayne

  • Data Engineer at Graphiq, Inc.
  • Santa Barbara, CA, USA
View GitHub Profile
@yolayne
yolayne / index.xml
Created September 25, 2015 22:40
craftml
<craft>
<info>
<title>Untitled</title>
</info>
<param name="h" type="int" default="20"
label="height of the cylinder"/>
<param name="n" type="int" default="3"
label="number of spheres"/>
@yolayne
yolayne / index.xml
Last active September 26, 2015 17:50
craftml
<craft>
<info>
<title>Shining Snowman</title>
</info>
<stack>
<sphere radius="6"></sphere>
<circle></circle>
<sphere radius="10"></sphere>
<sphere radius="16"></sphere>
<polygon points="50,9 60.5,39.5 92.7,40.1 67,59.5 76.4,90.3 50,71.9 23.6,90.3 32.9,59.5 7.2,40.1 39.4,39.5"
@yolayne
yolayne / Btree Insert1
Created March 1, 2013 04:53
Btree Insert1. It's passing on the unit test, but not on Retrograde :(
void insert(btree* &root, int key)
{
if (root == NULL)
{
cout << "This tree does not yet exist." << endl;
btree* new_tree = new btree;
new_tree->num_keys = 1;
new_tree->keys[0] = key;
new_tree->is_leaf = true;
root = new_tree;
@yolayne
yolayne / Sorting with a BST
Created February 8, 2013 23:10
Using insert_data and to_array functions from my Binary Search Tree project as my mystery sort on my Sorting Algorithms project.
// This mystery_sort is going to use my insert_data and to_array function from BST project!
void mystery_sort(vector<int> &data)
{
bt_node* top = init_node(data[0]);
// Looping through the data and adding it to my BST.
// ...Using my insert_data function which calls my insert function.
for (unsigned int i = 1; i < data.size(); i++)