Delphi

Enumerate registry subkeys in delphi

南楼画角 提交于 2021-01-22 04:26:13
问题 I'm attempting to install a driver on a client machine based on which version of MySQL is installed on the server and to do that I'd like to check the version on the server via registry key. That said, I need to enumerate the subkey(s) of HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB . There is usually just one key under this one and it is generally of the form: MySQL Server #.# , where # stands for a number. But because I don't know which value those are, is there a way to get the key and then I can

Can anyone use GetIt! to install any product in Delphi 10.4.1?

家住魔仙堡 提交于 2021-01-21 11:21:27
问题 I have been trying since Friday (Oct 16) for GetIt to install anything, like a component, or anything else for that matter. When I press the Install button for, say "Icons8 1.0", I get an error message: Loading EULAS... Cannot load data from the server: "RADSTUDIO.json" metadata file does not exist. Setup cannot continue due to corrupted installation file. This error occurs in Delphi 10.4 Update 1, and Delphi 10.3. Is GetIt working? 回答1: Solution should be : http://docwiki.embarcadero.com

Can anyone use GetIt! to install any product in Delphi 10.4.1?

做~自己de王妃 提交于 2021-01-21 11:21:17
问题 I have been trying since Friday (Oct 16) for GetIt to install anything, like a component, or anything else for that matter. When I press the Install button for, say "Icons8 1.0", I get an error message: Loading EULAS... Cannot load data from the server: "RADSTUDIO.json" metadata file does not exist. Setup cannot continue due to corrupted installation file. This error occurs in Delphi 10.4 Update 1, and Delphi 10.3. Is GetIt working? 回答1: Solution should be : http://docwiki.embarcadero.com

How to change the color of active TAB in a TabControl, in Delphi

旧巷老猫 提交于 2021-01-21 09:08:25
问题 How to change the color of active TAB in a TabControl (on FireMonkey) as shown below? 回答1: There are 2 ways to make this happen. 1) First option is you can create CustomStyle for TabControl from TStyleBook (Style Designer). Then you can add whatever you want to use in your custom design ( TRectangle is recommmended for many shape and colors). 2) I prefer to use second way for it. Set the TTabControl 's TabPosition to None , then add a TGridPanelLayout to where you want to add tabs in your

TMREWSync (TMultiReadExclusiveWriteSynchronizer) questions

筅森魡賤 提交于 2021-01-20 09:05:33
问题 I have questions about TMREWSync: Is it possible to upgrade Read lock to Write lock without unlocking? Don't understand what I should do if BeginWrite returns false? 回答1: Yes, TMREWSync supports lock upgrades. Use it like: BeginRead ... BeginWrite ... EndWrite ... EndRead . Source code in System.SysUtils states: The function result of BeginWrite indicates whether another thread got the write lock while the current thread was waiting for the write lock. Return value of True means that the

使用kbmMW#1轻松实现REST

北城以北 提交于 2021-01-16 04:57:34
使用kbmMW很容易创建REST服务器。 首先,我们制作服务器应用程序(或服务......取决于您)。 在这种情况下,我们将添加一个简单的Form,为我们的kbmMW组件提供GUI和位置。 在Delphi中,单击 文件 - 新建 - VCL Forms应用程序 拖放以下两个组件到Form上: TkbmMWServer TkbmMWTCPIPIndyServerTransport 将 kbmMWTCPIPIndyServerTransport1 的Server属性设置 为 kbmMWServer1 。 双击 kbmMWTCPIPIndyServerTransport1 的 Bindings 属性 以打开其编辑器。 为0.0.0.0端口80添加绑定,这是默认的HTTP服务器端口。 您可以选择所需的任何端口其他绑定,但让要REST用户知道。 设置 kbmMWTCPIPIndyTransport1 属性 Streamformat为 REST 。 (译者注:这是必须的一步,表明服务端可以接收REST请求) 现在保存项目,然后双击Form,写OnCreate事件: procedure TForm7.FormCreate(Sender: TObject); begin kbmMWServer1.AutoRegisterServices; // 注册Rest服务 kbmMWServer1

今年最值得期待的JavaScript传奇绿皮书登场!

跟風遠走 提交于 2021-01-07 10:57:43
文末送书!!! “能用 JavaScript 实现的东西, 迟早会用 JavaScript 实现” 这句“狂妄”的话,如今正在实现着 …… 今天,博文菌带来一本JavaScript领域的经典之作, 介绍之前,我不得不感叹: 这本书的份量,实在是太重了! 它的厚重不仅体现在, 当你首次读完时 , 能明显感觉到自己对JS的理解有了质的飞跃, 更是体现在, 在你日后的每次翻阅中 , 这本书仍然总能让你有所收获! 它就是有着 JavaScript 传奇绿皮书美名的 《JavaScript语言精髓与编程实践》 ! 在经过了 两个版本的积累和三年的全面重写 后,我们迎来了它的第三版的问世—— ▊《JavaScript语言精髓与编程实践(第3版)》 周爱民 著 本书基于 ES6,并涵盖最新的 ES2019 规范,全面讲述 JavaScript 在五个方面的语言特性,以及将这些特性融会如一的方法。书中不但完整解析了 JavaScript 语言,还逐一剖析了相关特性在多个开源项目中的编程实践与应用,是难得的语言学习参考书。 扫码获取详情 广深共铸 JavaScript宏篇巨著 很多人在工作中,很少会和团队讨论语言相关的问题,大家的话题总是围绕着流行的框架、工具及应用开发实践。而当你审核各种项目的代码时,时常会发现对语言理解不够造成的各种实现问题。 理解自己使用的语言是对每个程序员的基本要求

今年最值得期待的JavaScript传奇绿皮书登场!

故事扮演 提交于 2021-01-07 10:36:11
今天,刀哥带来一本JavaScript领域的经典之作, 介绍之前,我不得不感叹: 这本书的份量,实在是太重了! 它的厚重不仅体现在, 当你首次读完时 , 能明显感觉到自己对JS的理解有了质的飞跃, 更是体现在, 在你日后的每次翻阅中 , 这本书仍然总能让你有所收获! 它就是有着 JavaScript 传奇绿皮书美名的 《JavaScript语言精髓与编程实践》 ! 在经过了 两个版本的积累和三年的全面重写 后,我们迎来了它的第三版的问世—— ▊《JavaScript语言精髓与编程实践(第3版)》 周爱民 著 本书基于 ES6,并涵盖最新的 ES2019 规范,全面讲述 JavaScript 在五个方面的语言特性,以及将这些特性融会如一的方法。书中不但完整解析了 JavaScript 语言,还逐一剖析了相关特性在多个开源项目中的编程实践与应用,是难得的语言学习参考书。 广深共铸 JavaScript宏篇巨著 很多人在工作中,很少会和团队讨论语言相关的问题,大家的话题总是围绕着流行的框架、工具及应用开发实践。而当你审核各种项目的代码时,时常会发现对语言理解不够造成的各种实现问题。 理解自己使用的语言是对每个程序员的基本要求,是实现靠谱应用的基石。 这本书能够帮助你真正理解JavaScript。论深,本书深究JS之所以然,举世无可出其右;论广,本书遍历语义之细部,看罢再无机理之惑

Why does a commit trigger an access violation?

喜你入骨 提交于 2021-01-07 01:25:44
问题 The following code using the Community version of Delphi and Interbase 2020 running on a Windows 10 machine results in the following error when the Commit is executed. What am I doing wrong? Project FamilyTree.exe raised exception class $C0000005 with message ‘access violation at 0x00481a6f: read of address 0x8b57569f’. procedure writepreamble; var sqltext : string; basicaction : tbasicaction; begin sqltext := 'insert into preambleds(preambleseq,text) values('; sqltext := sqltext+inttostr

External Program running in different user desktop

烈酒焚心 提交于 2021-01-05 06:38:19
问题 I am trying to execute an external program under SYSTEM level and I applied this method (where I only changed the CreateProcessAsSystem('c:\windows\system32\cmd.exe'); to the path of the application I wanted to execute) and it works perfectly as expected only if there is one user logged into the pc. Eg. I have 2 users ( user1 and user2 ) and both users are logged in ( user1 first and then user2 ). Then, I run the program in user2 and my external program supposed to appear on user2 's desktop.