- 博客(174)
- 资源 (29)
- 收藏
- 关注

原创 delphi调用LUA函数来处理一些逻辑
替同事做了个洛奇英雄传自动染色程序,关于屏幕取色的.因为里面他对颜色的要求比较复杂,改动也比较大,于是我让他把逻辑写在 lua 脚本里面.uses LUA, LUALIB;function lua_CheckColor(r,g,b:Integer):Boolean;varLua : TLua;begin Lua := TLua.Create; luaopen_debug(Lua.L
2012-05-04 11:31:32
8120
3
原创 golang泛型: 简单例子
golang 1.18 支持了泛型,虽然看起来好像不是很好用的样子。官方给的例子太不直观了, 先从一个直观的例子来看看package mainimport "fmt"func main() { fmt.Println(myfunc(3)) // 1 fmt.Println(myfunc(3.0)) // 1.5}func myfunc[V int | float64](a V) V { return a / 2}如果设置值的话, 是可以得到正确的返回值的pac
2022-04-25 18:07:39
606
原创 mariaDB添加新用户
需要新添加用户是 wary密码是 123456数据库是 dbauthCREATE USER wary@'%' IDENTIFIED BY '123456';grant all privileges on dbauth.* to wary@'%' identified by '123456';经常要用, 备份一下
2022-01-24 09:36:09
1802
原创 golang 编译ETCD报错
更新了下go mod 结果发现有个报错 go.etcd.io/etcd/clientv3 tested by go.etcd.io/etcd/clientv3.test imports github.com/coreos/etcd/auth imports github.com/coreos/etcd/mvcc/backend imports github.com/coreos/bbolt: github.com/coreos/bbo
2021-12-03 12:12:27
818
2
转载 ssh进入mac中文???的解决方法
转自ssh登陆mac终端乱码解决方法_155363959_新浪博客LANG=zh_CN.UTF-8export LANG
2021-10-26 15:57:25
237
原创 ubuntu安装jenkins报错?
root@iZbp154eiulph2b78ifsp7Z:/etc/apt/sources.list.d# apt updateHit:1 http://mirrors.cloud.aliyuncs.com/ubuntu focal InReleaseHit:2 http://mirrors.cloud.aliyuncs.com/ubuntu focal-updates InRelease ...
2021-10-18 23:28:26
1004
4
原创 mac 安装 brew, 解决一部分各种疑难杂症
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
2021-10-08 11:53:45
120
原创 golang missing dot in first path element
[root@127 MiddleServer]# go mod tidyMiddleServer/application/admin/mergeEverdayGameUserLog imports github.com/yangtizi/log/zaplog imports gopkg.in/natefinch/lumberjack.v2 tested by gopkg.in/natefinch/lumberjack.v2.test imports github.com/BurntSushi/t.
2021-08-18 21:08:00
6967
原创 缺氧修改-名词翻译
AluminumGas = 铝气 CarbonDioxide = 二氧化碳 CarbonGas = 碳气 ChlorineGas = 氯气 ContaminatedOxygen = 被污染的氧气 CopperGas = 铜气 GoldGas = 黄金气体 Helium = 氦 Hydrogen = 氢 IronGas = 铁气 CobaltGas = 钴气 LeadGas = 铅气 ...
2021-08-02 13:22:12
959
原创 缺氧-食物压制器
MircobeMusherConfigprivate void ConfigureRecipes() { ComplexRecipe.RecipeElement[] array = new ComplexRecipe.RecipeElement[] {// 修改配方 new ComplexRecipe.RecipeElement("Dirt".ToTag(), 75f) }; ComplexRecipe.RecipeElement[] array2
2021-07-20 13:05:47
911
1
原创 缺氧--小人初始属性
MinionStartStats// Token: 0x0600358D RID: 13709 RVA: 0x0012420C File Offset: 0x0012240C private void GenerateAttributes(int pointsDelta, List<ChoreGroup> disabled_chore_groups) { List<string> list = new List<string>(DUPLICANTSTAT
2021-07-16 10:58:23
1179
原创 缺氧-人力发电
ManualGeneratorConfig public override BuildingDef CreateBuildingDef() { string id = "ManualGenerator"; int width = 2; int height = 2; string anim = "generatormanual_kanim"; int hitpoints = 30; float construction_time = 30f; float[] tie.
2021-07-16 10:24:34
416
原创 缺氧-窑炉-配方
// Token: 0x060005DC RID: 1500 RVA: 0x00022660 File Offset: 0x00020860 private void ConfgiureRecipes() { Tag tag = SimHashes.Ceramic.CreateTag(); // 陶瓷 Tag material = SimHashes.Clay.CreateTag(); // 黏土 Tag material2 = SimHashes.Carbon.CreateTag(); .
2021-07-15 18:05:34
645
原创 缺氧-修改堆肥产出
堆肥修改CompostConfigpublic override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag) { Storage storage = go.AddOrGet<Storage>(); storage.capacityKg = 2000f; // 储存容量 go.AddOrGet<Compost>().simulatedInternalTemperature = 34.
2021-07-15 17:18:08
831
原创 make入门教程[4]: 变量
生成的 .o文件有点多. 有点乱. 需要删除他, 加一个 clean功能, 打开makefile 在最后加入一段......main9.o: main9.cpp main9.h g++ -c main9.cppclean: rm -rf *.o执行命令 make clean$ make cleanMAKE Version 5.41 Copyright (c) 1987, 2014 Embarcadero Technologies, Inc. rm -rf *.
2021-04-19 14:34:30
132
原创 make入门教程[3] 很多文件
修改 main1.cpp 重新编译得到下面的$ makeMAKE Version 5.41 Copyright (c) 1987, 2014 Embarcadero Technologies, Inc. g++ -c main1.cpp g++ -o test.exe main.o main1.o修改 main.cpp 重新编译得到下面的$ makeMAKE Version 5.41 Copyright (c) 1987, 2014 Embar
2021-04-19 14:25:04
257
原创 make入门教程[2]:make
新建一个shell脚本就叫 buildall.shg++ -c main.cppg++ -c main1.cppg++ -o test.exe main.o main1.o然后运行这个脚本$ sh buildall.sh;./test.exehello worldfun1一切正常, 到现在为止基本上简单的g++就已经讲完了接下来要开始make了直接执行make命令, 得到下面报错(上面是windows, 下面是centos)$ makeMAKE Versi.
2021-04-19 14:01:09
339
原创 make入门教程[1]:Hello world
新建一个main.cpp, 里面写上这样一段代码#include <stdio.h>int main(){ printf("hello world\n"); return 0;}然后在控制台编译$ g++ -o test.exe main.cpp;./test.exehello world改成先输出 .o 文件再变成可执行文件$ g++ -c main.cpp;g++ -o test.exe main.o;./test.exehell.
2021-04-19 13:40:23
196
原创 make入门教程[0]
windows下安装 git for windows.centos 下运行yum install -y gccyum install -y gcc-c++yum install -y gityum install -y makeyum install -y libtool
2021-04-19 13:29:50
94
原创 websocketapp 报错 Server handshake response error: websocketpp.processor:20 (Invalid HTTP status.)
这个大垃圾库,浪费我时间。。问题:Server handshake response error: websocketpp.processor:20 (Invalid HTTP status.)template <typename config>void connection<config>::send_http_request() { m_alog->write(log::alevel::devel,"connection send_htt...
2021-04-09 14:09:29
1788
10
原创 govcl 添加ICON错误
编译时,报错内容 too many .rsrc sections ,原因: govcl 默认使用了syso,删除掉 github.com/ying32/govcl/pkgs/winappres/uac 即可
2021-02-02 13:22:13
501
原创 lazarus 下载地址
lazarus-2.0.10-fpc-3.2.0-win64.exe链接:https://pan.baidu.com/s/1RrAJOxtCw74RFS4270JurA提取码:jcrf
2021-01-25 14:54:31
530
原创 Delphi 制作的服务的调用顺序
安装服务Service.exe /install ServiceCreate ServiceBeforeInstall ServiceAfterInstall ServiceDestroy 卸载服务Service.exe /uninstall ServiceCreate ServiceBeforeUninstall ServiceAfterUninstall ServiceDestroy 启动服务 S...
2021-01-09 17:54:46
136
原创 golang 麻将胡牌快速算法,非常快
package mainimport ( "fmt" "io/ioutil" "math" "sort" "time" "github.com/yangtizi/go/sysutils")var mp map[int]boolfunc main() { mp = make(map[int]bool) dt := time.Now() for i := 1; i <= 9; i++ { jiangtou([]int{i, i}) } fmt.Println.
2020-12-04 16:07:28
740
原创 ubuntu 安装最新版本的 golang
sudo add-apt-repository ppa:longsleep/golang-backportssudo apt updatesudo apt install golang-go目前是1.15正在读取软件包列表... 完成正在分析软件包的依赖关系树 正在读取状态信息... 完成 将会同时安装下列软件: g++ g++-9 golang-1.15-go golang-1.15-src golang-src libstdc++-9-dev建议安...
2020-11-23 17:30:23
8542
1
原创 nginx 做gotty (websocket) 的反向代理配置
worker_processes 1;events { worker_connections 1024;}http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65;upstream game1_server { server 8.8.8.8:1234;} ...
2020-10-15 14:31:22
605
原创 golang 根据IP获取真实地址(不联网,单机版)
package mainimport ( "fmt" "github.com/yangtizi/cz88")func main() { fmt.Println(cz88.GetAddress("47.56.100.100"))}$go mod init cz88$go build -o cz88.exe$./cz88.exe香港 阿里云...
2020-05-05 18:06:02
1030
原创 双点医院治疗成功率修改
//Token:0x06001984RID:6532publicstaticTreatmentCalculationBreakdownCalculateEstimatedTreatmentOutcome(Patientpatient,Staffstaff,Roomroom){floatdiag...
2020-01-30 00:14:05
686
2
转载 WinAPI: SetLayeredWindowAttributes - 设置窗口的透明
WinAPI: SetLayeredWindowAttributes - 设置窗口的透明这是来宾 Dolby 在http://www.cnblogs.com/del/archive/2008/03/08/1081295.html#1096814询问的问题.//声明: SetLayeredWindowAttributes( Hwnd: THandle; {窗口句柄...
2019-11-30 19:12:11
983
原创 从100个男人里面挑选37个, 问这里面存在最优秀的男人的概率是多少?
-- 随机种子. 根据当前时间来获取随机math.randomseed(os.time())-- 男人数量local nManCount = 100;-- 挑选数量local nPick = 37; -- 随机次数local nTotalCount = 1000000-- 男人列表local manList = {};-- 先随机100个男人for i=1,...
2019-11-30 13:58:49
583
转载 纯LUA的Json库
---- json.lua---- Copyright (c) 2019 rxi---- Permission is hereby granted, free of charge, to any person obtaining a copy of-- this software and associated documentation files (the "Software"),...
2019-11-19 17:31:29
1230
原创 Delphi Base32 的加密和解密
const ValidChars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';// Base32解码function Base32Decode(const source: string): string;var UpperSource: string; p, i, l, n, j: Integer;begin UpperSource :=...
2019-11-19 17:04:35
565
原创 Delphi 启动程序
program Project1;uses Winapi.Windows, System.IOUtils;{$R *.res}procedure myCreateProcess();var StartupInfo: Winapi.Windows.TStartupInfo; ProcessInfo: Winapi.Windows.TProcessInformation;...
2019-11-08 16:11:07
559
原创 设置环境变量批处理
@echo offrem 获取当前路径set CurrentPath=%~dp0echo %CurrentPath%rem cd /d %CurrentPath%rem ========================================================rem 设置用户环境变量setx JAVA_HOME "%CurrentPath%jdk1.8.0_1...
2019-11-05 17:21:09
585
1
原创 LUA 生成随机字符串
math.randomseed(os.time())function getRandom(n) local t = { "0","1","2","3","4","5","6","7","8","9", "a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s"...
2019-10-18 15:55:31
5482
3
转载 从MySQL到MongoDB(添加MongoDB循环插入数据方法)
转载自NoSQLFan,查看原文本文描述了MySQL中的常用SQL语句在MongoDB中的写法,如果你长期使用MySQL而对MongoDB跃跃欲试,这篇简单的文章可以帮助你更快的进入角色。查询:MySQL:SELECT * FROM userMongo:db.user.find()MySQL:SELECT * FROM user WHERE name = ’starlee’...
2019-10-14 19:33:49
568
Lua 版 Excel 工具
2018-01-24
Sublime插件--- C++代码自动格式化
2016-09-21
Raknet for Delphi 简单封装2
2013-11-11
Raknet 4.0
2013-10-15
GDI+相关应用例子源代码
2009-07-14
税率计算delphi代码
2009-06-27
乒乓台技术教程chm 日文版part3
2009-06-10
乒乓台技术教程chm 日文版part2
2009-06-10
乒乓台技术教程日文版chmpart1
2009-06-10
PHOTOVIEWER
2009-06-01
GIFImage22
2009-06-01
TRegware 4.02
2009-05-31
AviWriter 带demo
2009-05-31
FlashSDK230
2009-05-31
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人