How to interface with a Stream Deck device.
The device uses the HID protocol to communicate with its software.
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
/*\从PAWN虚拟机原码中提取的 KeeLoq 算法: | |
* Corrected KeeLoq Encryption and Decryption functions by Ruptor. | |
* Use at your own risk! This source is not copyrighted. | |
* Encoder encrypts an all-0 block, decoder decrypts it. | |
* KeeLoq cipher encrypts 32-bit blocks with 64-bit keys. | |
* Key is XORed with a 32-bit IV incremented on each use. | |
* See http://www.keeloq.boom.ru/decryption.pdf for more details. | |
* KeeLoq algorithm itself is not patented. | |
\*/ | |
#include "amx.h" |
-module(timetop). | |
-export([top/2]). | |
top(Duration, Count) -> | |
OldPrio = erlang:process_flag(priority, high), | |
Result = scheduled_time_top(Duration), | |
erlang:process_flag(priority, OldPrio), | |
lists:sublist(Result, Count). |
`default_nettype none // disable implicit definitions by Verilog | |
//----------------------------------------------------------------- | |
// minimalDVID_encoder.vhd : A quick and dirty DVI-D implementation | |
// | |
// Author: Mike Field <[email protected]> | |
// | |
// DVI-D uses TMDS as the 'on the wire' protocol, where each 8-bit | |
// value is mapped to one or two 10-bit symbols, depending on how | |
// many 1s or 0s have been sent. This makes it a DC balanced protocol, | |
// as a correctly implemented stream will have (almost) an equal |