Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
Beginners / Re: how to get class and method name from inside the method
« Last post by Joanna on Today at 03:53:05 pm »
Thanks cdbc. It seems like autocomplete doesn’t work well inside a twincontrol helper  but it compiles ok.
2
Networking and Web Programming / Re: Who is Indy mattias?
« Last post by jollytall on Today at 03:34:56 pm »
Thanks, that is clear.
But I have another problem. I compiled and got the large executable I mentioned above, but now it does not run on the server where I want to run it, because a file /lib/x86_64-linux-gnu/libc.so.6: version GLIB_2.34 not found.
Again, this program did compile and run before. I changed one cosmetic line, and now without uses Interfaces it does not compile and with it, it is huge and does not run.
What can be wrong?
3
Thank you, Seenkao.

It seems the general consensus so far that the presentation of the landing page is a major problem.

This is valuable feedback. It identified a blind spot I was not aware of.
4
Networking and Web Programming / Re: Who is Indy mattias?
« Last post by Martin_fr on Today at 03:10:11 pm »
However, I still do not understand:
- How mattias is hardcoded in so many places?

I don't know why ld (the linker) gives source (pp/pas) filenames. Linkers work with .o files only. But I guess the linker just looks up the source name for the user convenience. If so, the linker may actually get that from debug info.

I do know that fpc puts source filenames into debug info. (Maybe it also puts them in other places for the linker).
In the debug info fpc stores:
- the full/absolute path to the source file
- the relative path (relative to either package or project)

When you debug later, then the IDE falls back to the relative path (unless you have files in the location given by the absolute path / e.g. source from your own project).


Mattias builds the installers for Linux.  He needs to build/compile the files for it, and that needs to be somewhere on his disk.... And that ends up in debug info. (The windows builds also have the path where the files were compiled for the installer).

And well, couldn't those files be build in the location they are most likely going to be installed?
Better, not. Apart from this may differ by Linux distro, if a user has more than one installation, one in the default location, and another some place else, then the latter would also point to the default location... not good.
5
The proper way to initialize a record is to name each field:
Code: Pascal  [Select][+][-]
  1. const efi_loaded_image_protocol_guid:efi_guid=(data1: $5B1B31A1; data2:$9562; data3: $11D2; data4: ($8E,$3F,$00,$A0,$C9,$69,$72,$3B));

A nice shortcut if you use instead the inbuilt TGuid is that you can write:
Code: Pascal  [Select][+][-]
  1. const efi_loaded_image_protocol_guid: TGuid = '{5B1B31A1-9562-11D2-8E3F-00A0C969723B}';
6
Networking and Web Programming / Re: Who is Indy mattias?
« Last post by jollytall on Today at 02:54:16 pm »
I have just checked the executable (under Linux I am). It was 3.5MB, now it is 13.2MB and I changed nothing. Can it be because of the Interfaces added?
7
Databases / Re: Database standards OR Am I doing this right?
« Last post by gidesa on Today at 02:37:56 pm »
Hello, Ms Sql Server, as many dbms, has different types of lock: at row level, at page level, at table level, etc.
The isolation level defines the extension of lock.
For example, with "Serializable" level the db engine locks entirely all tables involved in the logic transaction, so that a second user cannot never change data managed by the first user, until the end of first transaction.
See detailed (and long) description: https://learn.microsoft.com/en-us/sql/relational-databases/sql-server-transaction-locking-and-row-versioning-guide?view=sql-server-ver16
And you have to understand the concept of logic transaction. Simplifying, a transaction contains all db (Zeos) instructions comprised between the  Begin transaction and Commiy (or Rollback if you want to cancel all updates).
In short, the TZConnection component has a property TransactionIsolationLevel that you can set to the 4 possible values, as descripted in previous link.
From another discussion: https://zeoslib.sourceforge.io/viewtopic.php?t=2644 a possible sequence of Zeos instructions:
//At connection:
TransactionIsolationLevel := tiNone;

//At StartTransaction:
TransactionIsolationLevel := tiReadCommited;

// do all select, update, delete, .... on various tables

//At Commit, that is when confirming the updates
Commit;
TransactionIsolationLevel := tiNone;

//Or, at Rollback, that is when you want to cancel the updates,
// for example in case of exception
RollBack;
TransactionIsolationLevel := tiNone;

8
Beginners / Does anyone know why these code cannot be compiled by the fpc?
« Last post by TYDQ on Today at 02:36:08 pm »
Code: Pascal  [Select][+][-]
  1. type efi_guid=record
  2.               data1:dword;
  3.               data2:word;
  4.               data3:word;
  5.               data4:array[1..8] of byte;
  6.               end;
  7. const efi_loaded_image_protocol_guid:efi_guid=($5B1B31A1,$9562,$11D2,($8E,$3F,$00,$A0,$C9,$69,$72,$3B));
It seems have no problem in pascal,why these pascal code cannot be compiled and show the error that Syntax error, "identifier" expected but "ordinal const" found?
9
Networking and Web Programming / Re: Who is Indy mattias?
« Last post by jollytall on Today at 02:27:19 pm »
Thanks, it is like magic. It works.

However, I still do not understand:
- How mattias is hardcoded in so many places?
- How could it work in the past with - I guess the same - Indy10 without adding Interfaces?
What is Interfaces, anyway? Why I never met it before?

Thanks.

10
General / Re: How to: create DLL file for Windows 10 64-Bit Pro
« Last post by TRon on Today at 02:26:53 pm »
Is the point the "definition" ?
Yes.

And as a consequence how your code calls that routine (e.g. what parameters (types) you pass it).
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018