Skip to content

Instantly share code, notes, and snippets.

View matt-allan's full-sized avatar

Matt A matt-allan

  • Destructure
  • Marshall, NC
View GitHub Profile
import { Connection, PublicKey, clusterApiUrl } from '@solana/web3.js';
(async () => {
const conn = new Connection(
process.env.RPC_URL ?? clusterApiUrl('mainnet-beta'),
'confirmed'
);
// From https://orca-so.gitbook.io/orca-developer-portal/whirlpools/interacting-with-the-protocol/orca-whirlpools-parameters
const whirlpoolProgramId = new PublicKey('whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc');
/* eslint-disable @typescript-eslint/ban-ts-comment */
// @ts-nocheck
import duckdb from "duckdb";
import assert from "node:assert";
import { tableFromIPC, RecordBatchReader, Table, Int32, makeData, Vector } from "apache-arrow";
const RANGE_SIZE = 1_000;
const SQL = `select * from range(0,${RANGE_SIZE}) tbl(i)`;
const expectedTable = new Table({
diff --git a/comport.cpp b/comport.cpp
index c30eae6..2d27e21 100644
--- a/comport.cpp
+++ b/comport.cpp
@@ -30,81 +30,74 @@ void CComPort::OpenComPort(QString &comPort, unsigned int baud)
{
CloseComPort();
- serialPort = new SerialPort(comPort.toStdString());
-