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 <stdio.h> | |
#include <stdlib.h> | |
#include <malloc.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <sys/mman.h> | |
#include <errno.h> | |
#include <unistd.h> | |
void do_something(void* param) { |
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
const sc = document.createElement('script'); | |
sc.src = 'https://cdnjs.cloudflare.com/ajax/libs/gl-matrix/3.4.2/gl-matrix-min.js'; | |
document.body.appendChild(sc); | |
sc.onload = () => { | |
const width = 512; | |
const height = 512; | |
const cvs = document.createElement('canvas'); | |
cvs.width = width; | |
cvs.height = height; | |
document.body.appendChild(cvs); |
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
make --always-make --dry-run \ | |
| grep -wE 'gcc|g\+\+' \ | |
| grep -w '\-c' \ | |
| jq -nR '[inputs|{directory:".", command:., file: match(" [^ ]+$").string[1:]}]' \ | |
> compile_commands.json |
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
#!/bin/sh | |
PRIVATE_KEY="ECDSA" | |
PUBLIC_KEY="ECDSA.pub" | |
BITCOIN_PRIVATE_KEY="bitcoin" | |
BITCOIN_PUBLIC_KEY="bitcoin.pub" | |
echo "Generating private key" | |
openssl ecparam -genkey -name secp256k1 -rand /dev/random -out $PRIVATE_KEY |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
typedef struct { | |
size_t size; | |
size_t capacity; | |
void **elements; | |
char (*compare)(const void *, const void *); |
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 Binary_to_BCD | |
#(parameter INPUT_WIDTH = 20, | |
parameter DECIMAL_DIGITS = 7) | |
( | |
input i_Clock, | |
input [INPUT_WIDTH-1:0] i_Binary, | |
input i_Start, | |
// | |
output [DECIMAL_DIGITS*4-1:0] o_BCD, | |
output o_DV |
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
export default class Queue { | |
constructor(size = 2000) { | |
this.size = size | |
this.buffer = new Uint8Array(this.size) | |
this.first = 0 | |
this.end = 0 | |
this.empty = true | |
} | |
/** |
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
uint8_t txBuffer[256]; | |
uint8_t txBufferPointer = 0; | |
uint8_t uartReady = 1; | |
/** | |
* @brief Sends an amount of data in asynchronous mode. | |
* @param huart: pointer to a UART_HandleTypeDef structure that contains | |
* the configuration information for the specified UART module. | |
* @param pData: Pointer to data buffer | |
* @param Size: Amount of data to be sent |
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
Array.prototype.slice.call(document.getElementsByTagName('input')).filter(v=>v.type=='radio').map(v=>v.click()) | |
Array.prototype.slice.call(document.getElementsByTagName('textarea')).map(v=>v.value = '很好') | |
document.getElementsByClassName('j-submitbtn')[0].click() | |
setTimeout(()=>{document.getElementsByClassName('j-gotonext')[0].click()}, 1000) |
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
/** | |
* API description | |
*/ | |
import request from './request.js' | |
const handler = { | |
get(target, property) { | |
/* | |
if (property in target) { |