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
| { | |
| oldPkgs ? import (fetchGit { | |
| url = https://github.com/NixOS/nixpkgs; | |
| ref = "3b9b8726bdbb5405919c40920d9693c5eae246b5"; | |
| }) {}, | |
| newPkgs ? import (fetchGit { | |
| url = https://github.com/NixOS/nixpkgs; | |
| ref = "nixos-19.03"; | |
| }) {} | |
| }: |
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
| const onlineTestMachine = Machine({ | |
| id: 'Online-Test', | |
| initial: 'daten_laden', | |
| context: { | |
| beispielaufgaben: [1, 2, 3], | |
| testteile: [ | |
| [4, 5, 6, 7], | |
| [8, 9], | |
| [10, 11, 12], | |
| ], |
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
| const Soll = Machine({ | |
| id: 'Soll Stand', | |
| initial: 'AngeforderterPosten', | |
| states: { | |
| AngeforderterPosten: { | |
| on: { | |
| stellen: 'GestellterPosten', | |
| abbrechen: 'AbgebrochenerPosten', | |
| } | |
| }, |
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
| const Soll = Machine({ | |
| id: 'Soll Stand', | |
| initial: 'Leer', | |
| states: { | |
| Leer: { | |
| on: { | |
| anfrageErhalten: 'Anfrage', | |
| angebotAngefragt: 'AngefordertesAngebot' | |
| }, | |
| }, |
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
| const Ist = Machine({ | |
| id: 'Ist Stand', | |
| initial: 'Leer', | |
| states: { | |
| Leer: { | |
| on: { | |
| anfrageErhalten: 'Anfrage', | |
| angebotAngefragt: 'AngefordertesAngebot' | |
| }, | |
| }, |
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
| const { Machine } = XState; | |
| export default Machine({ | |
| id: 'child', | |
| initial: 'present', | |
| context: { | |
| name: undefined | |
| }, | |
| states: { | |
| present: { |
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
| Pre-Match* | |
| start match -> Match | |
| Match | |
| Starting Order* | |
| play -> Game | |
| Game | |
| Running?* | |
| another dart can be thrown? -> During | |
| no dart can be thrown? -> After | |
| During |
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
| class Web < Roda | |
| def initialize(database_url:) | |
| @database_url = database_url | |
| end | |
| route do |r| | |
| r.root do | |
| "Configured database URL: #{@database_url}" | |
| end | |
| 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
| require "rubygems" | |
| require "bundler/setup" | |
| require "concurrent" | |
| tasks = 10.times.map do |s| | |
| Concurrent::TimerTask.new(execution_interval: 1) do | |
| sleep s | |
| puts "s: #{s}\n" | |
| end | |
| 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
| require "socket" | |
| server_ip = "192.168.1.14" | |
| client_ip = "192.168.1.5" | |
| server_port = 22040 | |
| server_socket = UDPSocket.new | |
| server_socket.connect(server_ip, server_port) | |
| name = "Schorsch-Klaus-David-#{rand}" |
NewerOlder