lazarus

Is there a GetMouseMovePointsEx function in Lazarus?

我的未来我决定 提交于 2019-12-08 06:40:54
问题 In this other question I asked: Drawing on a paintbox - How to keep up with mouse movements without delay?. The function GetMouseMovePointsEx was brought to my attention by Sebastian Z, however in Lazarus I am unable to find this function. He mentioned that in Delphi XE6 it is in Winapi.Windows.pas , in Lazarus though it is not in Windows.pas . I understand Lazarus is by no means an exact copy of Delphi but this function sounds like it could be the answer I am looking for in that other

Get a list of all used tables in a Postgresql SELECT query

删除回忆录丶 提交于 2019-12-07 16:59:35
问题 Is there a way to get all the tables used in complex SELECT query in Postgesql without using an actual SQL parser? ver. 9.5 and above will be used. 回答1: Try: create or replace function get_query_tables(p_query text) returns text[] language plpgsql as $$ declare x xml; begin execute 'explain (format xml) ' || p_query into x; return xpath('//explain:Relation-Name/text()', x, array[array['explain', 'http://www.postgresql.org/2009/explain']])::text[]; end $$; select get_query_tables('your query

consuming C dlls with Delphi

走远了吗. 提交于 2019-12-07 09:18:14
问题 I have a Dll function with this signature: UInt32 Authenticate(uint8 *Key); I'm doing this on Delphi: function Authenticate(Key:string) : UInt32; external 'mylib.dll' name 'Authenticate'; But always, the function return 10 (error code) and the application brakes :\ There is a way to do this right? UPDATE: thanks guys! you're the best! 回答1: There are some problems with your code. 1) uint8 is the equivilent of Byte in Delphi, not String . 2) the C code is using the compiler's default calling

GUI Only By Using FPC

我们两清 提交于 2019-12-07 06:28:45
问题 I want to know how I can develop GUI applications(32 Bits) without using Delphi language(Object Pascsl), only by using FPC with Lazarus installed(Pascal). Thanks. 回答1: Use a widget set directly. Look at e.g. the examples in packages/gtk2 for unix, or the windows win32api usage demo. (demo\win32 in the FPC win32 installation) But not using lazarus makes you lose platform independance, and a lot of ease. Looking how lazarus does it, is still a possibility. A second option is https://github.com

Best way for read and write a text file

孤街醉人 提交于 2019-12-07 05:43:50
问题 I am using the latest version of Lazarus IDE and I have a Memo1 on my TForm1. I have to load a text file in Memo1 and then edit every line of the Memo (I use Memo1.Lines.Strings[i] := ... ). At the end I must save the edited memo at a particular path. Question : I am looking for the faster way between: Load the whole text inside the memo, edit its content and save into a new file (load all -> edit all -> write all) Do a while loop (until the end of my *.txt file) that reads the file line by

How can I compile a Lazarus Apache module to Apache 1.3, 2.0 and 2.2 selectively?

℡╲_俬逩灬. 提交于 2019-12-07 00:31:31
I've had a look at /etc/fpc.cfg and there is mention to some defines: FPCAPACHE_1_3 FPCAPACHE_2_0 Then in the fcl-web examples there is mention to: Apache1_3 The only one I've found is on the apr.pas on both these files: /usr/share/fpcsrc/2.4.0/packages/httpd20/src/apr/apr.pas /usr/share/fpcsrc/2.4.0/packages/httpd22/src/apr/apr.pas So how does the compiler decide what version of APR to compile? If you enable the right one of those conditionals/directives afaik, the rest of the fpc.cfg should put the corresponding httpd dir first in the compilers search path, so that that version gets taken.

Is there a GetMouseMovePointsEx function in Lazarus?

喜你入骨 提交于 2019-12-06 14:48:08
In this other question I asked: Drawing on a paintbox - How to keep up with mouse movements without delay? . The function GetMouseMovePointsEx was brought to my attention by Sebastian Z , however in Lazarus I am unable to find this function. He mentioned that in Delphi XE6 it is in Winapi.Windows.pas , in Lazarus though it is not in Windows.pas . I understand Lazarus is by no means an exact copy of Delphi but this function sounds like it could be the answer I am looking for in that other question. Im just having a hard time finding where it is and even getting any Delphi documentation on it. I

linux lazarus 连接mssqlserver

江枫思渺然 提交于 2019-12-06 02:32:14
1 . 从https://www.freetds.org/ 下载驱动源文件 2. 参照 https://www.freetds.org/userguide/config.htm 内容编译 3. 启动lazarus后,放入相应的控件。代码加上 self.SQLDBLibraryLoader1.LibraryName:= '/usr/local/lib/libsybdb.so'; // 可以用whereis 命令找位置。 self.SQLDBLibraryLoader1.Enabled:=true; self.SQLDBLibraryLoader1.LoadLibrary; 来源: https://www.cnblogs.com/Jiaojiawang/p/11957230.html

Linux下lazarus交叉编译 win32[win64]

丶灬走出姿态 提交于 2019-12-06 02:28:22
环境 vmvare + deepin Linux64 + lazarus2.0.6 参考:https://wiki.freepascal.org/Cross_compiling_for_Win32_under_Linux文档下的 An example under Bunsen Labs (Debian 8)章节 在 ctr+shfit+f11 设置指定 TARGET_CPU, TARGET_OS后, 点test测试的时候,会提示 xxxx.ppu 与xxx.pp不一致,忽略即可。 来源: https://www.cnblogs.com/Jiaojiawang/p/11957044.html

Get a list of all used tables in a Postgresql SELECT query

不想你离开。 提交于 2019-12-05 18:25:35
Is there a way to get all the tables used in complex SELECT query in Postgesql without using an actual SQL parser? ver. 9.5 and above will be used. Try: create or replace function get_query_tables(p_query text) returns text[] language plpgsql as $$ declare x xml; begin execute 'explain (format xml) ' || p_query into x; return xpath('//explain:Relation-Name/text()', x, array[array['explain', 'http://www.postgresql.org/2009/explain']])::text[]; end $$; select get_query_tables('your query here'); dbfiddle becsystems TableList:=TStringList.Create; pgConnection1.GetTableNames(TableList,False); 来源: