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
interface A { | |
val a: Int // abstract | |
val b: Int // abstract | |
fun foo() // abstract | |
fun bar() { | |
// optional body | |
} | |
} | |
interface B { ... } |
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
/* | |
============================================================================ | |
Name : thread_test.c | |
Author : Tennessee Carmel-Veilleux | |
Version : | |
Copyright : Public domain | |
Description : Simple args-passing example with pthreads | |
============================================================================ | |
*/ |
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 ihex_csum(hex_data): | |
""" | |
Compute Intel Hex checksum of all bytes of a line of hex. The hex_data is a | |
hex string of data, without checksum. | |
>>> ihex_csum("0C00000000020B11129B12000B66EAE7") | |
213 | |
""" | |
hex_bytes = [ord(b) for b in hex_data.decode("hex")] |
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 arrayify(name, buf): | |
return "uint8_t %s[] = { %s };" % (name, ", ".join(["0x%02X" % ord(c) for c in buf.decode('hex')])) |