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
import Graphics.Collage exposing (..) | |
import Graphics.Element exposing (..) | |
import Random | |
import Color exposing (Color) | |
import Time exposing (fps) | |
type alias Vector = (Float, Float) | |
type alias Circle = | |
{ center : Vector |
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
import Graphics.Element exposing (show) | |
import List exposing (map, map2, length, repeat, concat, sum, foldl, filterMap, isEmpty, member, head, tail, indexedMap, filter) | |
import Maybe exposing (andThen) | |
import Color | |
import Graphics.Element exposing (..) | |
--main = show <| constrainLine [1, 1] [Nothing, Just False, Nothing, Nothing] | |
--main = show <| tile [1, 1] [Nothing, Just False, Nothing, Nothing] | |
main = showGrid <| Maybe.withDefault grid0 <| constrainGrid rows cols grid0 `andThen` | |
constrainGrid rows cols `andThen` |
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
String file contents |
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
import vibe.vibe; | |
class SimpleService { | |
@path("/sendSms") void SendSms(string phone, string text) { | |
logInfo("Sending sms to [%s] with text [%s]", phone, text); | |
requestHTTP("http://api.prostor-sms.ru/messages/v2/send.json", | |
(scope req) { | |
req.method = HTTPMethod.POST; | |
req.writeJsonBody([ | |
"name": "My Name", |