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
| use std::{ | |
| fs::File, | |
| io::{prelude::*, BufReader}, | |
| }; | |
| mod pig_latin; | |
| fn main() { | |
| let file = File::open("text.txt").expect("Can't open file."); | |
| let file_size = file.metadata().unwrap().len(); |
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
| global _main | |
| extern _printf | |
| section .text | |
| _main: | |
| push rbx ; We have to save this since we use it | |
| mov ecx, 90 ; ecx will countdown to 0 | |
| xor rax, rax ; rax will hold the current number | |
| xor rbx, rbx ; rbx will hold the next number |
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
| global start | |
| section .text | |
| start: | |
| mov rdx, output ; rdx holds address of next byte to write | |
| mov r8, 1 ; initial line length | |
| mov r9, 0 ; number of stars written on line so far | |
| line: | |
| mov byte [rdx], '*' ; write single star |
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
| SubmitMessage -> | |
| ( model | |
| , getTime | |
| ) | |
| GotTime time -> | |
| ( { model | timeSent = Time.posixToMillis time } | |
| , generateRandomId | |
| ) |
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
| type Msg | |
| = UrlRequested Browser.UrlRequest | |
| | UrlChanged Url.Url | |
| | NameEntered String | |
| | NameSubmitted | |
| | MessageEntered String | |
| | MessageSubmitted | |
| | GenerateRandomId String | |
| generateRandomChatId : Cmd Msg |
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
| gridItem : | |
| GridItem | |
| -> (List (Attribute msg) -> List (Html msg) -> Html msg) | |
| -> List (Attribute msg) | |
| -> List (Html msg) | |
| -> Html msg | |
| gridItem item html attributes children = | |
| html (gridItemAttributes item ++ attributes) children |
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
| type alias Grid = | |
| { gridTemplateColumns : Maybe GridTemplateColumns | |
| , gridTemplateRows : Maybe GridTemplateRows | |
| , gridTemplateArea : Maybe GridTemplateArea | |
| , gridTemplate : Maybe GridTemplate | |
| } | |
| type Grid | |
| = GridTemplateColumn (Maybe String) |
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
| module Main exposing (main) | |
| import Browser | |
| import Html exposing (Html, button, div, text) | |
| import Html.Events exposing (onClick) | |
| type alias Model = | |
| String |
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
| // Classes included for clarity | |
| public class MovieList | |
| { | |
| IEnumerable<IMovie> Movies { get; set; } | |
| } | |
| public class Api<T> where T : IMovie | |
| { | |
| public IEnumerable<T> GetMovies() |
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 very basic HTTP Controller for the Aqueduct Dart web framework | |
| /// [https://aqueduct.io/] | |
| import 'dart:async'; | |
| import 'dart:io'; | |
| import 'package:aqueduct/aqueduct.dart'; | |
| import 'package:faker/faker.dart'; | |
| const Faker faker = Faker(); |