cxGrid支持使用like过滤时自动添加百分号 默认状态下, 不会添加 %% 到过滤串中, 修改源码如下 cxFilter.pas 在 \Library\Sources\cxFilter.pas 和 \ExpressDataController\Sources\cxFilter.pas 两个地方都有一个,一起修改掉 cxFilter.pas 的 TcxFilterCriteria.AddItem 改


找到 DataSnap.DBClient.pas文件, 拷贝到一个目录中, 例如 D:\DataSnap.DBClient.pas ,修改其中的 TCustomClientDataSet.AddFieldDesc 方法, //fix cds 字段长度限制问题 LName := TMarshal.ReadStringAsAnsi(CP_UTF8, TPtrWrapper.Create(@FieldDesc.szName[0])); //if LName.Length = SizeOf(MIDASNAME) - 1 then //begin


问: A和B轮流抛硬币决定谁穿女装, 抛中正面的人穿女装, 先抛的人穿女装的概率多大? 解: 不妨设A先抛, 并且A穿女装的概率为x, 那么B穿女装的概率

FireDAC DataSnap Connection Pool

First use these units as follows. Of course, also need some other units uses SysUtils, Classes, DB,Variants, Windows, Math, System.IniFiles, SynCommons, IPPeerClient, FireDAC.Comp.Client, FireDAC.Phys.DS, FireDAC.Comp.UI, FireDAC.Phys.Intf, FireDAC.Stan.Util, FireDAC.Stan.Def, FireDAC.Stan.Pool , FireDAC.Stan.Error, FireDAC.Stan.Intf, Datasnap.DSHTTPLayer; then we need a record to read configs, you can implement it as you like TDSPoolConfig = record CleanupTimeout: string; ExpireTimeout: string; MaximumItems: string; Server: string; Port: string; DSUserName, DSPassword: string; IsHttpClient:Boolean; procedure ReadConfig; end; ok, now come the pool

How to Use mORMot to Build Rest Services and Consume Them

如何使用mORMot构建Rest服务并使用 服务端 var FModel: TSQLModel; FDB: TSQLRestServer; FServer: TSQLHttpServer; //Create Server FModel := TSQLModel.Create([], 'api'); FDB := TSQLRestServerFullMemory.Create(FModel, 'test.json', false, false); //reg services FDB.ServiceRegister(TTestService, [TypeInfo(ITestService)], sicShared); //setting and start it FServer := TSQLHttpServer.Create(httpPort, [FDB], '+', useHttpApiRegisteringURI); FServer.AccessControlAllowOrigin := '*'; // allow cross-site AJAX queries 接口和D

Use webhook to deploy Hugo

First, make sure your hugo blog files are hosted on Github or any other git hosting server where you can access to through network. Github is suggested. in your server apt-get install hugo wget tar -zxvf webhook-linux-amd64.tar.gz mv webhook-linux-amd64 webhook && cd webhook chmod +x webhook vim hooks.json [ { "id": "redeploy-webhook", "execute-command": "/pathto/", "command-working-directory": "/directory/to/webhook" } ] cd ~/webhook ./webhook -hooks hooks.json -verbose -port 1234 -hotreload & or add