I hope this will help someone with my captured knowledge on the below subjects.
A boiler plate on how to do Application config the "Lazarus Way (tm)".
It includes:
- Setting up what properties to save on
TForm.SessionProperties
TINIPropStorage
forTForm.SessionProperties
property storageTFileExit
action with different shortcuts for Windows and Linux- The use of
GetAppConfigFile()
to get the app's default file customised for Linux/Windows - A way to have different short cuts for exit in Linux(CTRL+Q) and Windows(ALT+X)
Example of fphttpclient
with a progress bar.
A simple test using the libgdbm
library.
- Report the error generated when
gdbm_netkey
gets the last key - Compile
libgdbm
statically
Testing Google Translate with Lazarus/FPC.
Program to test HTML Viewers.
I'm using the latest version available on the GitHub repository of Bernd Gabriel and have it included in this repository.
But you can install the needed components from the Online Package Manager(OPM).
An attempt to do a graphical application to scan a range of IPs and some other tools.
This entry on the Test 🌟 list is inspired by this repository: IPAvailabilityScanner.
It implements:
- Retrieving the machine's Public IP address from one of these providers:
- Performing an IP scan on a range of IPs ( Not Implemented yet ).
- Performing a Ping ( Not Implemented yet ).
- Performing a Trace Route ( Not Implemented yet ).
This application is also using the Property Storage on an INI
file. It stores the size of the Window and some values like the last selected tab and the last inputs on several edits.
In order to perform a Ping the packet needs to be in raw mode. This implies it needs super user permissions.
If you want Ping and TraceRoute to work you must run the program with sudo
:
$ sudo bin/TestIPScanner
This has been tested under Windows 11 and it is working on both non and "Run as User".
Many thanks to ikel for doing the tests.
I'm unable to test under macOS so I'll need some help here.
- The IP Edit component needs to be focused in order to refresh internal fields right after starting up the application.
For some reason, when the
TINIPropStorage
fills in theTIPEdit.Text
property, the component does not refresh the internal fields.
Repository to test and learn how to use the many logging choices in Lazarus
Tested:
- LazLogger: https://wiki.freepascal.org/LazLogger (Comes with Lazarus)
- TEventLogger: https://wiki.lazarus.freepascal.org/TEventLog (Comes with
fcl-base
package)
Work in Progress:
- MultiLog: https://wiki.freepascal.org/MultiLog (OPM)
Next:
- QuickLogger: https://github.com/exilon/QuickLogger
- Depends on QuickLib: https://github.com/exilon/QuickLib
Maybe:
- ExceptionLogger: https://github.com/r3code/lazarus-exception-logger (OPM)
- Log4Delphi: https://wiki.freepascal.org/Log4Delphi
- Log4L: https://github.com/CynicRus/Log4L
- Renegade Logger: https://github.com/hiraethbbs/Renegade.Logger
- ooLog: https://github.com/VencejoSoftware/ooLog
- datalogger: https://github.com/dliocode/datalogger
pros:
- Part of the FCL
- Command line params
- User defined log groups
cons:
- Does not have multiple log providers
For more information on this option: LazLogger README
pros:
- Part of the LCL
- Windows: Uses the system log
cons:
- Does not have multiple log providers
todo:
- Linux: Need to see if there is some difference geared towards a Linux system log
For more information on this option: TEventLog README
Searches for the various methods to obtain information about the current installed distro.
Presents the options found and allows to query each one individually.
Program to test 2 Markdown libraries:
An application to demonstrate how to use TMemDataset
.
This particular component does not have a feature to sort the data.
It does, however, have a feature to filter the data.
Program to test two Lazarus QR Code generation libs, available on OPM:
- LazBarcodes
- QRCodeGenLib
The objective of this repository is to have a personal copy of the Random Generation functions from Prof. Marsaglia.
The code is taken from Thaddy de Koning's entry on the Free Pascal Wiki.
I'm using an MIT License for the time being. Need to have a talk with Thaddy to sort that out.
A simple example on how to load a file from the binary resources onto a TMemo
Program to test a cross platform way of doing application restarting itself.
An application to demonstrate how to use TRxMemoryData
.
This particular component does not have a feature to sort the data.
It does, however, have a feature to filter the data.
Also using the TRxDBGrid
for the visualization of the data, since I'm already using the RX package.
Example of how to use the Class TThread
with a pool manager.
Original Code: Andrew Thomas Brunner (http://www.aurawin.com)
Correcting Critical Section Lock: paweld (https://github.com/paweld)
Example of how to use the Class TThread
and all of the threading tools available with Free Pascal.
This exemplifies the most basic use of a thread.
It declares an event to hook into the main form.
This is a single shot use because we set the thread's FreeOnTerminate
property to True.
The example above isn't of much use if we just run a single instance.
In this example we create multiple instances of the same thread and we start them concurrently.
This is, also, a single shot use because we set the thread's FreeOnTerminate
property to True.