This file contains hidden or 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 SwiftUI | |
| struct Odometer: View { | |
| var value: Int | |
| @State private var displayed: OdometerDisplayState | |
| @State private var animationTask: Task<Void, Never>? | |
| init(value: Int) { | |
| self.value = value |
This file contains hidden or 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
| // Copyright (C) 2025 Gwendal Roué | |
| // | |
| // Permission is hereby granted, free of charge, to any person obtaining a | |
| // copy of this software and associated documentation files (the | |
| // "Software"), to deal in the Software without restriction, including | |
| // without limitation the rights to use, copy, modify, merge, publish, | |
| // distribute, sublicense, and/or sell copies of the Software, and to permit | |
| // persons to whom the Software is furnished to do so, subject to the | |
| // following conditions: | |
| // |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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; |