Per usual we're going to create restful routes for the following objects.
School, Course, Student, Teacher
Schools have courses courses have students
require 'socket' | |
require 'debugger' | |
load 'parser.rb' | |
puts 'starting up server' | |
server = TCPServer.new("0.0.0.0",8080) | |
puts "Parent process is #{Process.pid}" | |
$PROGRAM_NAME = "Parent Server" | |
loop do |
#include "list.h" | |
#include "dbg.h" | |
List *List_create() | |
{ | |
return calloc(1, sizeof(List)); | |
} | |
void List_destroy(List *list) | |
{ |
#include "bstrlib.h" | |
#include <stdio.h> | |
#include <stdint.h> | |
int main(int argc, char const *argv[]) | |
{ | |
char *string = "blake johnson"; | |
bstring my_bstring = (bstring)string; | |
int length = blength(my_bstring); | |
char *new_string = bdata(my_bstring); |
The goal of the second part of this lab is to create a command line interface got for the playlister application. (The third part of the excercise will be evolving the CLI to be a web interface) | |
Write a ruby script that parses the data within the data directory | |
and uses the classes defined above to instantiate Song, Artist, and Genres | |
for each file. These instances should be correctly associated to each other | |
so that artist.genre will return a Genre object, etc. | |
The data directory is filled with a bunch of songs in this format | |
Artist Name - Song Name [genre_name].mp3 | |
So for example A$AP Rocky - Peso [dance].mp3 |
<form action='/pirate' method="POST"> | |
<input ... name="pirate[name]" /> | |
<input ... name="pirate[weight]" /> | |
<input ... name="pirate[height]" /> | |
<input ... name="pirate[ships][0][name]" /> | |
<input ... name="pirate[ships][0][type]" /> | |
<input ... name="pirate[ships][0][booty]" /> | |
</form> |
## Build the Flatiron School | |
# Goal - To reinforce controllers, models, and forms and the interaction between them. | |
Per usual we're going to create restful routes for the following objects. | |
School, Course, Student, Teacher | |
Schools have courses | |
courses have students |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" \ | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<dict> | |
<key>Label</key> | |
<string>readinglisttoinstapaper</string> | |
<key>LowPriorityIO</key> | |
<true/> | |
<key>ProgramArguments</key> | |
<array> |
#!/bin/bash --login | |
# usage: _rvmruby <ruby version> [ruby arguments] | |
[ -s "$HOME/.rvm/scripts/rvm" ] && . "$HOME/.rvm/scripts/rvm" | |
ruby_version=$1; shift | |
rvm $ruby_version | |
exec ruby "$@" |
def add_one(new_result) | |
new_result + 1 | |
end | |
def arithmetic(number,another_number) | |
result = number+another_number | |
add_one(result) | |
end | |
arithmetic(5,6) |