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
SubmitMessage -> | |
( model | |
, getTime | |
) | |
GotTime time -> | |
( { model | timeSent = Time.posixToMillis time } | |
, generateRandomId | |
) |
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 Msg | |
= UrlRequested Browser.UrlRequest | |
| UrlChanged Url.Url | |
| NameEntered String | |
| NameSubmitted | |
| MessageEntered String | |
| MessageSubmitted | |
| GenerateRandomId String | |
generateRandomChatId : Cmd Msg |
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
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 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 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 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 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(); |
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
{-# LANGUAGE | |
OverloadedStrings | |
, DeriveGeneric | |
#-} | |
module Lib where | |
import Prelude as P | |
import Data.Aeson | |
import Data.Text |
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
<?php declare(strict_types = 1); | |
namespace CMS\Data; | |
include_once(__DIR__ . '/../helpers/array.php'); | |
/** | |
* Database class that handles all database connections and related actions. | |
* | |
* @param $user The connecting user | |
* @param $pass Password for the $user |
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
var adminRouter = require('../config/routers')().adminRouter; | |
var Book = require('../data/models/bookModel'); | |
var db = require('../data/db')(); | |
var adminController = function() { | |
var books = [ | |
{ | |
title: 'War and Peace', | |
author: 'Lev Nikolayevich Tolstoy', | |
genre: 'Historical Fiction', |