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
| <template> | |
| <div> | |
| <span class="visually-hidden" :aria-hidden="!readonly">{{ starLabel(value) }}</span> | |
| <span v-for="i in [1, 2, 3, 4, 5]" :key="i" :aria-hidden="readonly"> | |
| <label class="visually-hidden"> | |
| {{ starLabel(i) }} | |
| <input | |
| type="radio" |
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
| defmodule Stuff do | |
| use Combine | |
| defmodule ContentRangeRequest do | |
| @moduledoc """ | |
| Represents the Range header sent by the client | |
| """ | |
| defstruct key: :id, id: nil, offset: 0, limit: 0, order: :asc | |
| end |
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
| def parse_range(range, max_limit \\ 500) do | |
| range_p = | |
| either( | |
| many1(alphanumeric()) |> ignore(space()) |> string() |> ignore(char(";")), | |
| many1(alphanumeric()) |> ignore(char(";")) | |
| ) | |
| limit_p = fn a -> a |> ignore(string("limit ")) |> integer() |> ignore(char(";")) end | |
| offset_p = fn a -> a |> ignore(string("offset ")) |> integer() |> ignore(char(";")) end |
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
| defmodule Elescore.Projection.Downtimes do | |
| use GenServer | |
| def start_link() do | |
| GenServer.start_link(__MODULE__, nil, name: __MODULE__) | |
| end | |
| def init(_arg) do | |
| # We wait a bit for the disruption projection | |
| Process.send_after(self(), :calculate_downtimes, 30_000) |
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
| executeForm :: FormV2 -> Bool -> PageM [TagTree LBS.ByteString] | |
| executeForm FormV2 {..} doSubmit = do | |
| initRequest | |
| personalPage personal | |
| disabilitiesPage disabilities | |
| outwardMeetingPoints <- executeOutwardConnection outwardTrainRide (isJust returnTrainRide) | |
| returnMeetingPoints <- executeReturnConnection returnTrainRide | |
| meetingPointsPage outwardMeetingPoints returnMeetingPoints |
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 qualified Data.ByteString.Lazy as LBS | |
| import Text.HTML.TagSoup | |
| import Text.HTML.TagSoup.Tree | |
| addBaseTag :: LBS.ByteString -> [TagTree LBS.ByteString] -> [TagTree LBS.ByteString] | |
| addBaseTag href = transformTree f | |
| where | |
| f (TagBranch "head" attrs subTrees) = [TagBranch "head" attrs (baseTag : subTrees)] | |
| f x = [x] |
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
| -- The goal was to parse a text describing the connection which is used by screen readers: | |
| -- Strecke von Karlsruhe Hbf, Abfahrtszeit 11:59 von Gleis 3 nach Berlin Hauptbahnhof, Ankunftszeit 18:03 auf Gleis 2, mit ICE 370 | |
| -- Translated: | |
| -- Connection from Karlsruhe Hbf, Departuretime 11:59 from track 3 to Berlin Hauptbahnhof, Arrivaltime 18:03 on track 2, with ICE 370 | |
| data Connection | |
| = Departure | |
| { departStation :: Text | |
| , departAt :: Text |
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
| document.addEventListener("DOMContentLoaded", function() { | |
| let hiddenChannels = ['general'] | |
| let blockedUsers = ['Slackbot'] | |
| let customCss = ` | |
| .p-channel_sidebar__static_list div[role="listitem"]:empty { display: none; } | |
| ` | |
| hiddenChannels.concat(blockedUsers).forEach(it => { | |
| customCss += `a[aria-label~="${it}"] { display: none; }\n` |
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
| IBNR | Name Übersicht Bahnhöfe | Name Haltestellendaten | dist | f=wrong | |
|---|---|---|---|---|---|
| 8000491 | Ahlten (Han) | Altenglan | 3 | f | |
| 8007821 | Aldingen | Üdingen | 2 | f | |
| 8003331 | Alheim-Heinebach | Kleinsteinbach | 6 | f | |
| 8013471 | Allee-Center Leipzig | Böhlen(Leipzig) | 9 | f | |
| 8070185 | Allermöhe | Alveslohe | 4 | f | |
| 8011017 | Alte Wöhr | Altefähr | 2 | f | |
| 8000446 | Anderten-Misburg | Ahrensburg | 6 | f | |
| 8012996 | Attilastraße | Silberstraße | 5 | f | |
| 8010011 | Auerbach (b Mosbach) | Auerbach(V) ob Bf | 5 | f |
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
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE TypeFamilies #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE UndecidableInstances #-} | |
| {-# LANGUAGE ViewPatterns #-} |
NewerOlder