-
Content Count
1200 -
Joined
-
Last visited
-
Days Won
16
Everything posted by FPiette
-
Try using THandle data type for all handles.
-
function: how to return nil
FPiette replied to jesu's topic in Algorithms, Data Structures and Class Design
NaN Anders, I'm not sure that NaN is a good choice because this special value is generated in other cases. Something like 2.12345e-308is a better choice and collision risk is much lower. -
function: how to return nil
FPiette replied to jesu's topic in Algorithms, Data Structures and Class Design
It depends on what your function does, but just like a function returning an integer returns a special value (often -1 or 0) in case of error, your function could return a special value as a double number. Carefully select the value so that it doesn't collide with expected values in your application. I'm think about a value like 2.12345e-308. Just define a constant to give that value a nice name easy to use and remember. -
Yes it can! That's why high-end PC, workstation and server have "ECC Memory" (Error correction code memory, see this Wikipedia article). When an error occurs, it is corrected and you are notified. You can continue to work while ordering a new memory item. Think about it when you'll buy your next computer.
-
Best way to store and compare PC configuration data
FPiette replied to Shrinavat's topic in Algorithms, Data Structures and Class Design
Sorted CSV is an easy way to handle comparison you need. And if more advanced comparison is required, you may load the CSV in a SQL database (maybe SQLite) or even use a spreadsheet like Excel if you are comfortable with VBA. Excel can directly load CSV files. Of course you can write your analysis in pure Delphi. You'll easily find a library to load a CSV file in an array in memory. What you shall use depends on your preferences and skills. -
Best way to store and compare PC configuration data
FPiette replied to Shrinavat's topic in Algorithms, Data Structures and Class Design
Plain text CSV is my prefered format. I would make each line with details specific to an item. Order of cells in a line would be in the importance to compare them. Sort the whole file alpabétically at the end. Use WinMerge utility to quickly compare the files. Write a dedicated software to read the CSV and make more complex comparison if needed. Example of a line syntax: Storage, HardDisk, SerialNumber, BrandAndModel, Capacity Example of an actual line: Storage, HardDisk, 22RKKA0, WDC WD10EZEX, 953667MB -
Delphi takes 9 seconds to start/shutdown an empty application
FPiette replied to FreeDelphiPascal's topic in General Help
Check if you have invalid path in Delphi options and in project options. Any invalid path, specially network path takes a lot of time. -
Then contact your sales representative, preferably the one which sold you the license and explain why you need more licenses.
-
Which kind of license do you own ?
-
Your list is long and are just title. For each item in your list, please explain a little bit your own opinion, at least with 600 words each.
-
I suggest you start the discussion by exposing what is your own opinion. Then we can comment on it.
-
Pointer casting with NativeUint
FPiette replied to duzzell's topic in Algorithms, Data Structures and Class Design
It is advised to use UIntPtr to cast a pointer to an unsigned integer. Note that System.pas make UIntPtr an alias for NativeUInt. This means it is not your problem. I suggest you build a very small (preferably console mode) sample program which reproduce the issue so that we can reproduce your error, understand what is wrong and tell you what to do. -
To send the "binary" information to the server, you must call TypeSet or TypeSetAsync.
-
ICS Export Control Classification Number (ECCN)
FPiette replied to MickeM's topic in ICS - Internet Component Suite
I'm the original author of ICS software. I live in Belgium. There are a lot of contributors from a lot of countries. It is free software available only in source form. There is no company behind it. There is no ECCN nor ECN nor anything equivalent. -
If we know the driver editor, we could search for you the correct SDK, documentation, header files and so on. I asked the hardware because I thought you were using a terminal like Zeller EFTPOS terminal.
-
For using with Delphi, you should ask for C SDK, not a C++. C and C++ are two very different beasts. By the way, what is your target hardware? And where the Header files you showed extract are coming from?
-
TIcsMQTTClient.Publish does nothing for me.
FPiette replied to APAPE's topic in ICS - Internet Component Suite
Latest Mosquito update is dated 2023-09-18. -
It is likely that the SDK you are using has some sample programs. To compile the samples, you can download Microsoft Visual C++ Community Edition which is free: https://visualstudio.microsoft.com/fr/vs/community/
-
Are you able to compile a working test program in VC++? If yes, the you'll be able to see the size of every field member and offset from start of structure. Then you can define Delphi record with same member names and offset from start or record. The offset is very important: compiler have rules to align field/record and in Delphi you'll probably end up using "packed record" and add dummy data to reproduce VC++ field alignment. For the char pointer, debugging your test application, you'll see if data is ascii or unicode and use the proper Delphi pointer type.
-
Add onClick event on TCanvas
FPiette replied to direktor05's topic in Algorithms, Data Structures and Class Design
TCanvas is a kind of API for a drawing surface. It encapsulate drawing primitives like line or text. A TCanvas is a property of some other graphics component, for example an image component. This is at that component level that you must handle onClick. This being said, you should better explain what you need and what you already have, preferable with some code sample. If you explain correctly, chaces are that you get a helpful answers. -
Access violation errors while running without the debugger
FPiette replied to christos papapostolou's topic in Algorithms, Data Structures and Class Design
I strongly recommend to use madExcept during development. It will catch - among other things - access to already freed object or memory which can cause what you see. -
At runtime, I need to discover the structure of a MySQL table (Field names, types, sizes and more]. FireDAC TFDMetaInfoQuery component is supposed to do that but it doesn't work as expected. I got this error message: [FireDAC][Phys][MySQL]-339. A meta data argument [table type name] value must be specified. Don't tell me to use the auto-created fields.
-
That was it. Thanks.
-
Just a single line: FDMetaInfoQuery1.Open; TFDMetaInfoQuery is connected at design time to a TFDConnection. The same connection is used for several TFDQuery and every request works file. Extract from the DFM: object FDMetaInfoQuery1: TFDMetaInfoQuery Connection = FDConnection1 MataInfoKind = mkTableTypeFields TableKinds = [tkTable] SchemaName = 'MySchema' Left = 328 Top = 64 end
-
OK, you are tempted. But IMO that is a non-sense.