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 Stack: | |
def __init__(self): | |
self.data = [] | |
def push(self, item): | |
self.data.append(item) | |
def pop(self): | |
return self.data.pop() |
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
#!/usr/bin/python | |
import sys | |
sys.path.append('./pystack.py') | |
from pystack import Stack | |
# initialize Stack class object | |
myStack = Stack() | |
print "Initial stack (empty): ", myStack.show() |
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
#!/bin/bash | |
# source https://en.wikipedia.org/wiki/Fibonacci_number | |
# assuming F_1 = 1 and F_2 = 1 for seed values | |
read -p "Enter Count of Fibonacci Terms: " F_count | |
# input checking | |
re='^[0-9]+$' | |
if ! [[ $F_count =~ $re ]] ; then |
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
#!/bin/bash | |
# source https://en.wikipedia.org/wiki/Fibonacci_number | |
# assuming F_1 = 1 and F_2 = 1 for seed values | |
# recursion function | |
function fib_recur_func(){ | |
local F_n F_1 F_2 # Avoid leaking to main scope | |
F_n=$1 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 contacts = [ | |
{ | |
"firstName": "Akira", | |
"lastName": "Laine", | |
"number": "0543236543", | |
"likes": ["Pizza", "Coding", "Brownie Points"] | |
}, | |
{ | |
"firstName": "Harry", | |
"lastName": "Potter", |
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
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'> | |
<h2>Greg-Powered</h2> | |
<h1>Reveal.js</h1> | |
<h2>Slideshow Presentations</h2> | |
<br/> | |
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1> | |
</section> | |
<section data-background-transition='zoom' data-transition='linear' id='try-it'> | |
<h2>Try it out!</h2> | |
<p>Create your own deck by forking a copy of <a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>this github gist</a>: <br /><a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>https://gist.github.com/ryanj/af84d40e58c5c2a908dd</a></p> |
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
/* All product subcategory IDs | |
* for non bicycle frame items | |
* mySQL example using WHERE / NOT IN | |
*/ | |
SELECT p.Name, p.Color, p.ProductSubcategoryID | |
FROM Product p | |
LEFT JOIN ProductSubcategory ps on ps.ProductSubcategoryID = p.ProductSubcategoryID | |
WHERE ps.ProductSubcategoryID NOT IN | |
(SELECT ProductSubcategoryID FROM ProductSubcategory WHERE Name LIKE '%Frame%') | |
OlderNewer