Skip to content

Instantly share code, notes, and snippets.

View TheBadZhang's full-sized avatar
未来尚可期,加油吧!

贱人张 TheBadZhang

未来尚可期,加油吧!
View GitHub Profile
@TheBadZhang
TheBadZhang / libsqlite.lua
Last active August 23, 2020 13:54
一个用 lua 调用 外部 sqlite 的 lua 脚本
sqlite = {}
-- 仅支持 读 和 写 操作 flag,数据库不存在时自动创建
sqlite.READONLY = 0x001
sqlite.WRIETONLY = 0x010
sqlite.open = function (fileName)
assert (fileName, "傻*么你,文件名都不给")
#include <cstdio>
#include <cmath>
struct OBJ {
long long m;
double s;
double v;
}B1 {1, 10.0, 0.0}, B2 {100000000000000, 30.0, -10.0};
inline double calc (OBJ a, OBJ b) {
html {
height: 100%;
width: 100%;
margin: 0 auto;
word-break: break-all;
word-wrap: break-word;
}
body {
font-family: "Consolas", "Ubuntu Mono", "monospace"," 等线 ", " 等线 Light", " 思源黑体 CN ExtraLight", " 思源黑体 CN Light", " 方正兰亭超细黑简体 ", "Geometria Light", " 汉仪特细等线简 ", "Microsoft YAHEI";
width: 60%;
@TheBadZhang
TheBadZhang / transPic2Text.cpp
Created July 22, 2018 08:25
图片转文本,不是识别文字。
// #include <graphics.h>
#include <iostream>
#include <fstream>
int main (int argc, char ** argv) {
if (argc > 2) {
std::cerr << "You cann't enter more than one arguement" << std::endl;
exit (-1);
}
@TheBadZhang
TheBadZhang / books.md
Last active July 23, 2023 06:50
一些我想要买的书

编程书籍

C/C++ Lua Nginx C# 算法 汇编 计算机原理 网络 完成率 32/260

购入时间 书名 出版商 语言 作者 译者 版本 价格 实际购入价格 ISBN 评分 备注
初中 C 语言入门经典 清华大学出版社
初中 C 语言程序设计现代方法 人民邮电出版社 [美]K.N.King 吕秀锋、黄倩
高中 C++ Primer 电子工业出版社 Stanley B.Lippman
Josee Lajoie
Barbara E.Moo
王刚、杨巨峰 ¥128.00 ¥128.00 978-7-121-15535-2
高中 信息学奥赛一本通 科学技术文献出版社 ¥50.00
<html style="text-align: center">
<head>
<style src="./style.css"></style>
<script>var hiddenProperty = 'hidden' in document ? 'hidden' : 'webkitHidden' in document ? 'webkitHidden' : 'mozHidden' in document ? 'mozHidden' : null; var visibilityChangeEvent = hiddenProperty.replace(/hidden/i, 'visibilitychange'); var onVisibilityChange = function(){ if (!document[hiddenProperty]) { document.title='被发现啦(*´∇`*)'; }else{ document.title='藏好啦(つд⊂) '; }}; document.addEventListener(visibilityChangeEvent, onVisibilityChange);</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.6.1/p5.min.js"></script>
<script src="./sketch.js"></script>
<!-- <script src="./sketch_box.js"></script> -->
<title>我是一只小页面,你抓呀抓不住我</title>
</head>
<body>
@TheBadZhang
TheBadZhang / Table_H2B.cpp
Last active July 14, 2018 14:25
A easy way to transform Hex to Bin by two string.
#include <cstdio>
char H [16] = {};
// 存储结果
bool Ht [16] = {};
// 检查数字是否用过的辅助数组
char H2C (int a) {
// 将内存的数字转成字符
if (a >= 10)