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
blueprint: | |
name: KNX - Light Actuator | |
description: Controll Home Assistant Light entities from KNX switches. | |
domain: automation | |
input: | |
target_light: | |
name: Light | |
description: The light that shall be controled. | |
selector: | |
target: |
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
def lock(idempotencyKey: String) = { | |
// Producing 64bit key which is required for postgres advisory lock | |
val key1 = MurmurHash3.productHash(idempotencyKey)) | |
val key2 = MurmurHash3.productHash(idempotencyKey, seed) | |
sql"""SELECT pg_advisory_xact_lock($key1, $key2)""".query[Unit].unique | |
} | |
def fetch[T](idempotencyKey: String) = | |
readonlyTransaction { | |
(sql"""SELECT result |
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
{ | |
"~'" = ("insertText:", "ʹ"); | |
} |
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
#include "../include/zmq.h" | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main (int argc, char *argv[]) | |
{ | |
const char *bind_to; | |
int roundtrip_count; | |
size_t message_size; |
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
void main() { | |
char* first = | |
match(char *, 1) { | |
when(1): | |
return "Drake"; | |
when(2): | |
return "Charles"; | |
otherwise: | |
return ""; | |
end |
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 ZData = Zen.Types.Data | |
module Cost = Zen.Cost.Realized | |
Zen.Dictionary.add "returnAddress"B (ZData.Lock (ZFStar.fsToFstLock returnAddress)) Zen.Dictionary.empty | |
|> Cost.__force | |
|> ZData.DataDict | |
|> ZData.Dict |
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
// as part of arrange windows | |
case C_VIEW: | |
{ | |
int x = container.x; | |
int y = container.y; | |
update_gap_geometry(&x,&y,&width,&height); | |
container->width = width; | |
container->height = height; |
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
open Zen.Types | |
open Zen.Vector | |
open Zen.Base | |
open Zen.Cost | |
open Zen.Asset | |
module E = Zen.Error | |
module ET = Zen.ErrorT | |
module Tx = Zen.TxSkeleton |
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
open Zen.Types | |
open Zen.Vector | |
open Zen.Base | |
open Zen.Cost | |
open Zen.Asset | |
module ET = Zen.ErrorT | |
module OT = Zen.OptionT | |
module Tx = Zen.TxSkeleton |
NewerOlder