This was done for: https://www.hackerrank.com/challenges/anagram
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
[debug] Processing by Vanpool.PageController.index/2 | |
Parameters: %{"format" => "html"} | |
Pipelines: [:browser] | |
[debug] SELECT v0."id", v0."number", v0."capacity", v0."come_time", v0."go_time", v0."description", v0."inserted_at", v0."updated_at" FROM "vans" AS v0 [] OK query=0.6ms | |
[debug] SELECT r0."id", r0."dir", r0."userid", r0."vanid", r0."date", r0."keys", r0."inserted_at", r0."updated_at" FROM "riding" AS r0 WHERE (r0."userid" = $1) ["U051NJ6S6"] OK query=0.4ms | |
[info] Sent 500 in 23ms | |
[error] #PID<0.1837.0> running Vanpool.Endpoint terminated | |
Server: vanpool.dev:4000 (http) | |
Request: GET / | |
** (exit) an exception was raised: |
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 index(conn, _params) do | |
user = Plug.Conn.get_session(conn, :current_user) | |
token = Plug.Conn.get_session(conn, :access_token) | |
vans = Repo.all(Van) | |
# how to get today :P | |
{date, _} = :calendar.local_time | |
date = Ecto.Date.from_erl date | |
render(conn, "index.html", user: user, vans: vans, token: token, date: date) | |
end |
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
use std::io; | |
use std::io::Write; | |
fn prompt() -> String { | |
let input = io::stdin(); | |
println!("Welcome to Rock, Paper, and Sinners!"); |
step 1: do the normal setup with git adding a SSH key to git NOTE: the ssh test they have will FAIL! This is ok.
step 2: make a repo (or use one you already have)
step 3: go to the repo and find the clone link FOR HTTPS.
step 4: add this to your ~/.bashrc
(use emacs or vim to edit that file, add it if it doesn't exist) -> unset SSH_ASKPASS
step 5: Edit the link adding username@
to the in front of the github.com
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
package main.scala | |
object HelloWorld { | |
def hello(name: String = "World") = "Hello, " + name; | |
// sudo tests | |
def main(args: Array[String]):Unit = { | |
println(hello()) | |
println(hello("Gage")) | |
} |
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
... | |
type: 7 | |
player | |
Score: 0 | |
numLives: 3 | |
about to reset state | |
Program received signal SIGSEGV, Segmentation fault. | |
[Switching to Thread 0x7fffef95f700 (LWP 26178)] | |
0x0000000000403aad in std::__cxx11::list<GameObject*, std::allocator<GameObject*> >::begin (this=0x0) |
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
/*********************************************************************** | |
* Program: | |
* Lab 00, Practice Lab Submission | |
* Brother Jones, CS345 | |
* Author: | |
* Gage Peterson | |
* Summary: | |
* This is the first lab. It will count the number of lines the user | |
* enters that begin a capital letter | |
************************************************************************/ |
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
/*********************************************************************** | |
* Program: | |
* Lab UnixShell | |
* Brother Jones, CS 345 | |
* Author: | |
* Gage Peterson | |
* Summary: | |
* This is a tiny unix shell made for my operating systems class | |
************************************************************************/ |
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
# This class helps to captue possible errors as a value. While you could capture these conditions as | |
# `nil` it's easy to forget to check for it everywhere. | |
# | |
# ResultValue helps with this by making the only way to get at the value is with #case_of. | |
class ResultValue | |
# This will rescue any exceptions and return it as an "errored" ResultValue | |
# if there was none it will return it as an "ok" ResultValue with the value | |
# wrapped inside | |
def self.capture_result |