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
#!/usr/bin/env python3 | |
import array | |
import argparse | |
import io | |
import struct | |
import sys | |
from binascii import crc32 | |
from datetime import datetime, timedelta, timezone | |
try: |
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
class MessageMixin(object): | |
def __getattr__(self, name): | |
field = self.__getnestedattr(name) | |
if field: | |
return getattr(field, name) | |
super(Message, self).__getattribute__(name) | |
def __setattr__(self, name, value): |
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
class Message(object): | |
def __init__(self, header, unprotected_payload, protected_payload): | |
self.header = header | |
self.unprotected_payload = unprotected_payload | |
self.protected_payload = protected_payload | |
class MessageHeader(CStruct): | |
cmd = CUShort() | |
unprotected_len = CShort() | |
protected_len = CShort() |
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
18/11 21:34 [6888] - warn: NodeBB Setup Aborted. | |
Error: [[user:change_password_error_length]] | |
at Object.User.isPasswordValid (E:\Development\Node\NodeBB\src\user\create.js:186:20) | |
at async.parallel.passwordValid (E:\Development\Node\NodeBB\src\user\create.js:158:11) | |
at E:\Development\Node\NodeBB\node_modules\async\lib\async.js:689:13 | |
at E:\Development\Node\NodeBB\node_modules\async\lib\async.js:239:13 | |
at E:\Development\Node\NodeBB\node_modules\async\lib\async.js:119:13 | |
at _arrayEach (E:\Development\Node\NodeBB\node_modules\async\lib\async.js:91:13) | |
at _forEachOf (E:\Development\Node\NodeBB\node_modules\async\lib\async.js:118:9) | |
at _each (E:\Development\Node\NodeBB\node_modules\async\lib\async.js:83:13) |
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
E:\Development\Node\NodeBB>node app.js setup | |
18/11 19:17 [12804] - info: NodeBB v0.9.0 Copyright (C) 2013-2014 NodeBB Inc. | |
18/11 19:17 [12804] - info: This program comes with ABSOLUTELY NO WARRANTY. | |
18/11 19:17 [12804] - info: This is free software, and you are welcome to redistribute it under certain conditions. | |
18/11 19:17 [12804] - info: | |
18/11 19:17 [12804] - info: Launching web installer on port 4567 | |
18/11 19:17 [12804] - info: Web installer listening on http://0.0.0.0:4567 | |
18/11 19:17 [10032] - info: NodeBB Setup Triggered via Command Line | |
Welcome to NodeBB! |
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
<?xml version="1.0" encoding="utf-8"?> | |
<menu | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto"> | |
<!-- Font icons are to be in the titleCondensed field --> | |
<!--<item--> | |
<!--android:id="@+id/action_search"--> | |
<!--android:title="@string/action_search"--> |
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
@Override | |
public boolean onCreateOptionsMenu(Menu menu) { | |
// We want custom views for our ActionButtons and this is probably the best method | |
// It requires a bunch of complicated undocumented stuff but it's compatible with menu xml files | |
// Create a new MenuBuilder for our custom menu | |
// The menu that the Toolbar gives us with mToolbar.getMenu() has additional presenters we don't want | |
// Same with the menu from the ActionMenuView | |
MenuBuilder mb = new MenuBuilder(this); |
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
// Automatically generated configuration file for 'Hyperion daemon' | |
// Generated by: HyperCon (The Hyperion deamon configuration file builder | |
{ | |
/// Device configuration contains the following fields: | |
/// * 'name' : The user friendly name of the device (only used for display purposes) | |
/// * 'type' : The type of the device or leds (known types for now are 'ws2801', 'ldp8806', | |
/// 'lpd6803', 'sedu', 'adalight', 'lightpack', 'test' and 'none') | |
/// * 'output' : The output specification depends on selected device. This can for example be the | |
/// device specifier, device serial number, or the output file name |
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
equalCount :: String -> String -> String | |
equalCount xs ys = map head [x | x <- group (quicksort xs), x `elem` group (quicksort ys)] | |
where | |
group [] = [] | |
group (z:zs) = | |
let (as, bs) = span (== z) zs | |
in (z:as) : group bs |
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
<input type="number" class="form-control" id="maxPollOptions" placeholder="10" min="1" max="100" data-key="limits.maxOptions"> |
NewerOlder