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 Bench do | |
| def orig(payload, mask) do | |
| maskstream = <<mask::32>> |> :binary.bin_to_list() |> Stream.cycle() | |
| payload | |
| |> :binary.bin_to_list() | |
| |> Enum.zip(maskstream) | |
| |> Enum.map(fn {x, y} -> Bitwise.bxor(x, y) end) | |
| |> :binary.list_to_bin() | |
| 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
| from( | |
| v in Fnord, | |
| select: [:id], | |
| where: v.id in [9026, 9025, 9024, 9021, 9020, 9019], | |
| join: t in fragment("select * from unnest('{9026, 9025, 9024, 9021, 9020, 9019}'::int[]) WITH ORDINALITY t(id, ord)"), | |
| on: t.id == v.id, | |
| order_by: t.ord | |
| ) |> Repo.all |
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
| alert("Hello World"); |
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
| <?xml version="1.0"?> | |
| <root> | |
| <item> | |
| <name>Map F19 to insert</name> | |
| <identifier>private.map_f12_to_insert</identifier> | |
| <autogen>__KeyToKey__ KeyCode::F12, KeyCode::PC_INSERT</autogen> | |
| </item> | |
| </root> |
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
| From 6108281171db83394a0a814b5f272c5afb9c4f51 Mon Sep 17 00:00:00 2001 | |
| From: Andrew Bartlett <[email protected]> | |
| Date: Tue, 22 Sep 2015 15:25:30 +1200 | |
| Subject: [PATCH 1/3] pydsdb: Also accept ldb.MessageElement values to dsdb | |
| routines | |
| This shows the correct way to accept a value that may be a list of strings | |
| or a proper ldb.MessageElement. | |
| Andrew Bartlett |