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
// based on: https://stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect | |
import test from 'ava'; | |
export interface Point2D { | |
readonly x: number; | |
readonly y: number; | |
} | |
export class LineSegment { |
Loading
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
// This is a bigger error exercise than the previous ones! | |
// You can do it! | |
// | |
// Edit the `read_and_validate` function so that it compiles and | |
// passes the tests... so many things could go wrong! | |
// | |
// - Reading from stdin could produce an io::Error | |
// - Parsing the input could produce a num::ParseIntError | |
// - Validating the input could produce a CreationError (defined below) | |
// |
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 | |
import ( | |
"fmt" | |
"time" | |
"appengine" | |
"appengine/datastore" | |
) |
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 | |
import ( | |
"encoding/base64" | |
"github.com/gorilla/mux" | |
"net/http" | |
"strings" | |
) | |
func main() { |
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
/// <summary> | |
/// A right aligned MonoTouch.Dialog EntryElement to use and build upon | |
/// | |
/// @tp on github, 2012 | |
/// </summary> | |
using System.Drawing; | |
using MonoTouch.Dialog; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; |