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
Paper Manor | |
Build State | |
MouseUpBuild | |
press -> MouseDown | |
MouseDownBuild | |
release -> MouseUp | |
move -> Dragging | |
DraggingBuild | |
release -> MouseUp | |
Furniture State |
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
<div class="flex-grid"> | |
{% for c in (0..2) %} | |
<div class="column"> | |
{% for r in (0..(page.categories.blog.length / 3 - 1) ) %} | |
<div class="post-box"> | |
{{assign post = page.categories.blog[(3*c + r)]}} | |
<img src="{{ post.image }}"" | |
<p> {{ post.content }} </p> | |
</div> | |
{% endfor %} |
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
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.App as Html | |
import Html.Events exposing (onMouseDown, onMouseUp) | |
import Mouse exposing (..) | |
main = | |
Html.program | |
{ init = init |
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
def answer(names): | |
names_with_sums = [] | |
for name in names: | |
names_with_sums.append([word_to_sum(name), name]) | |
names_with_sums.sort(reverse=True) | |
sorted_names = [] | |
for item in names_with_sums: | |
sorted_names.append(item[1]) |
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
def answer(meetings): | |
available_time = 0; | |
num_meetings = 0; | |
while meetings: | |
mdx = meeting_with_earliest_end_time(meetings) | |
m = meetings[mdx] | |
if m[0] >= available_time: | |
available_time = m[1] |
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
def answer(str): | |
stack = [] | |
out = "" | |
for c in str: | |
if c == "*": | |
stack.append(c) | |
elif c == "+": | |
while (peek(stack) == "*"): | |
out = out + stack.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
function [num_frames, folder_name] = video_to_frames( file_name ) | |
% Author: Seth Brown 9/27/2012 | |
% License: MIT License | |
% Store each frame of the video as a numbered jpeg image | |
% Use: [numFrames, folderName] = video_to_frames('sample.mp4'); | |
% TODO Error handling--specifically on grabbing frames and file write | |
video = VideoReader(file_name); | |
num_frames = video.NumberOfFrames; |
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
require 'yaml' | |
class Store | |
attr_accessor :name, :address, :city, :state, :zip, :phone_number | |
end | |
def list_of_stores | |
files = Dir.glob('*.yml') | |
stores = [] |