Skip to content

Instantly share code, notes, and snippets.

View henryscala's full-sized avatar

henryscala henryscala

  • China
View GitHub Profile
@henryscala
henryscala / mariadb_operation_example.c
Created March 16, 2018 02:30
mariadb or mysql prepared statements example using C API
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <mysql/mysql.h>
/*
The program is a demonstration of using prepared statements to perform operations on the below table in mariadb.
The statements include: insert, select, delete, etc.
CREATE TABLE person (
@henryscala
henryscala / pyautogui-play.py
Created January 19, 2022 09:44
play the contents in a md file inside Typora
# used to play in the typora application
import pyperclip as pc
import pyautogui as pa
# specify input file before running
srcFileName=r"C:\tmp\pyautogui-play\grok-determinant.md"
# srcFileName=r"C:\tmp\pyautogui-play\test.md"
srcFile = open(srcFileName,mode='r', encoding='utf-8')
allFileLines = srcFile.readlines() # note, the '\n' is kept in each line
allFileLines = [ line.strip() for line in allFileLines]
@henryscala
henryscala / uDrawScreen.pas
Created February 7, 2022 10:03
pascal draw on screen
unit uDrawScreen;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls,LCLIntf, LCLType;
type