FBConfig 2.0.2.14 has been released and available for download for windows.
This release got a few bugs fixed and managing for default values.
Goto Project page
Download fbconfig 2.0.2 – 32-bit
View fbconfig project on GitHub
FBConfig 2.0.2.14 has been released and available for download for windows.
This release got a few bugs fixed and managing for default values.
Goto Project page
Download fbconfig 2.0.2 – 32-bit
View fbconfig project on GitHub
This is way cool, and has been there for a long time, and I completely missed it until recently (:
On the Stack Exchange Data Explorer, you can write your own queries for any of the StackExchange sites as they share a common database infrastructure.
The queries can even contain an execution plan, and given the large number of questions (the total of Questions (table Posts) is total over 10 million now: select count(*) as QuestionCount from Posts as Questions
).
There are many examples, for instance this one by sam.saffron and TLama that lists posts outside the Delphi area:
DECLARE @MyUserID INT = ##UserID:int## SELECT Answer.Id AS [Post Link], Answer.Score AS [Score], Question.Tags, Answer.CreationDate AS [Creation Date] FROM Posts Question LEFT JOIN Posts Answer ON Question.ID = Answer.ParentId WHERE Answer.PostTypeId = 2 AND Answer.OwnerUserId = @MyUserID AND Question.Tags NOT LIKE '%<delphi>%' ORDER BY Question.CreationDate ASC
–jeroen
via My answers with non Delphi tag – Stack Exchange Data Explorer.
A few weeks ago I started a new project called TSMBIOS, this is a library which allows access the SMBIOS using the Object Pascal language (Delphi or Free Pascal).
SMBIOS stands for System Management BIOS , this standard is tightly related and developed by the DMTF (Desktop Management Task Force).
The SMBIOS contains a description of the system’s hardware components, the information stored in the SMBIOS typically includes system manufacturer, model name, serial numbers, BIOS version, asset tag, processors, ports, device memory installed and so on.
Note : The amount and accuracy of the SMBIOS information depends on the computer manufacturer.
The BIOS typically populates the SMBIOS structures at system boot time, and is not in control when the OS is running. Therefore, dynamically changing data is rarely represented in SMBIOS tables.
The SMBIOS Entry Point is located somewhere between the addresses 0xF0000 and 0xFFFFF, in early Windows systems (Win95, Win98) it was possible access this space address directly, but after with the introduction of the NT Systems and the new security changes the BIOS was accessible through section \Device\PhysicalMemory, but this last method was disabled as well in Windows Server 2003 Service Pack 1, and replaced with 2 new WinApi functions the EnumSystemFirmwareTables and GetSystemFirmwareTable, Additionally the WMI supports reading the entire contents of SMBIOS data i using the MSSMBios_RawSMBiosTables class inside of the root\wmi namespace.
Note : you can find more information about the SMBIOS Support in Windows on this link.
The TSMBIOS can be compiled using a WinApi mode (uses the GetSystemFirmwareTable function) or using the WMI Mode (uses the MSSMBios_RawSMBiosTables class)
If you uses the WinApi Mode you don’t need use COM and the final size of the Application will be smaller, but the WinAPI functions was introduced in Windows Vista and Windows XP x64 (So in Windows Xp x86 will fail). Otherwise using the WMI mode you will need use COM (CoInitialize and CoUninitialize), but also you will get two additional advantages 1) The WMI will work even in Windows Xp x86 systems, 2) You can read then SMBIOS data of local and remote computers.
In order to use the TSMBIOS in your application only you must add the uSMBIOS unit to your uses clause, then create a instance for the TSMBios class using the proper constructor
// Default constructor, used for populate the TSMBIOS class using the current mode selected (WMI or WinApi) constructor Create; overload; // Use this constructor to load the SMBIOS data from a previously saved file. constructor Create(const FileName : string); overload; {$IFDEF USEWMI} // Use this constructor to read the SMBIOS from a remote machine. constructor Create(const RemoteMachine, UserName, Password : string); overload; {$ENDIF}
and finally use the property which expose the SMBIOS info which you need. In this case as is show in the sample code the BatteryInformation property is used to get all the info of the batteries installed on the system.
{$APPTYPE CONSOLE} uses Classes, SysUtils, uSMBIOS in '..\..\Common\uSMBIOS.pas'; procedure GetBatteryInfo; Var SMBios : TSMBios; LBatteryInfo : TBatteryInformation; begin SMBios:=TSMBios.Create; try WriteLn('Battery Information'); WriteLn('-------------------'); if SMBios.HasBatteryInfo then for LBatteryInfo in SMBios.BatteryInformation do begin WriteLn('Location '+LBatteryInfo.GetLocationStr); WriteLn('Manufacturer '+LBatteryInfo.GetManufacturerStr); WriteLn('Manufacturer Date '+LBatteryInfo.GetManufacturerDateStr); WriteLn('Serial Number '+LBatteryInfo.GetSerialNumberStr); WriteLn('Device Name '+LBatteryInfo.GetDeviceNameStr); WriteLn('Device Chemistry '+LBatteryInfo.GetDeviceChemistry); WriteLn(Format('Design Capacity %d mWatt/hours',[LBatteryInfo.RAWBatteryInfo.DesignCapacity*LBatteryInfo.RAWBatteryInfo.DesignCapacityMultiplier])); WriteLn(Format('Design Voltage %d mVolts',[LBatteryInfo.RAWBatteryInfo.DesignVoltage])); WriteLn('SBDS Version Number '+LBatteryInfo.GetSBDSVersionNumberStr); WriteLn(Format('Maximum Error in Battery Data %d%%',[LBatteryInfo.RAWBatteryInfo.MaximumErrorInBatteryData])); WriteLn(Format('SBDS Version Number %.4x',[LBatteryInfo.RAWBatteryInfo.SBDSSerialNumber])); WriteLn('SBDS Manufacture Date '+LBatteryInfo.GetSBDSManufactureDateStr); WriteLn('SBDS Device Chemistry '+LBatteryInfo.GetSBDSDeviceChemistryStr); WriteLn(Format('OEM Specific %.8x',[LBatteryInfo.RAWBatteryInfo.OEM_Specific])); WriteLn; end else Writeln('No Battery Info was found'); finally SMBios.Free; end; end; begin try GetBatteryInfo; except on E:Exception do Writeln(E.Classname, ':', E.Message); end; Writeln('Press Enter to exit'); Readln; end.
A couple of notes on NMQ_MQ_LIB and the WebSphere MQ aka MQSeries client libraries:
And a few links:
I needed this to get some apps talking to MQ on AS/400 aka iSeries aka System i working correctly by getting the DLLs right.
–jeroen
I'm glad to announce the creation of Planet Object Pascal.
I have created it in order to provide one place to have all known blog and knowledge of the Object Pascal developers (Virtual Pascal, Free Pascal, Delphi etc…)
If you have a blog that writes about Object Pascal, feel free to contact me, and I'll add you to the planet.
Having said that, I'm looking for a way to better design this, and at the long run, write something a newer system, then continue and using the unmaintained planetplanet system.
On February 14th Delphi will be 18. Looking back it sure came a long way from version 1. I remember when I first walked into a Compusa store and bought my first copy of Delphi. I was beside myself with excitement. Moving from Turbo Pascal to Delphi, moving from DOS to Windows development. That was a very challenging and interesting time indeed.
I am proud of have been a part (as a developer) of that journey. Being a Delphi developer wasn’t always easy. But I am very happy I stuck to my conviction that this is the best tool to develop in and didn’t stray away from it.
Exciting times are ahead, as exciting as picking up my very own copy of Delphi 1. I say that because the future looks very promising and exciting. Cross-platform is here and mobile development are just around the corner.
What better time to be a Delphi developer? I can proudly answer, now!
So raise your glasses and salute our dev tool! Happy Birthday and many more returns!
And thank you to all the people that made a positive difference in making Delphi what it is today!
18 years ago today Delphi 1 was launched as a revolutionary way of building native compiled, unmanaged, non-interpreted 16-bit Windows 3 applications using UI-driven RAD principles.
Today Delphi targets Win32, Win64, OS X and at some point soon will also target iOS and Android.
Happy birthday Delphi!
Delphi has come a long way in 18 years, but the basic principles of building Windows applications are just the same today as they were then. The VCL library has expanded and grown considerably, and the IDE has had countless useful features and options added to it over the years.
It’s easy to miss some of the IDE features or forget a useful keystroke. To help you remember some of the more useful ones, please refer to any of these resources:
Keep using Delphi for your native Windows applications and we’ll still be celebrating Delphi’s birthday for many years to come!
18 years ago, Delphi 1 was launched (still not sure if valentine’s day was a good idea for a product launch).
I wonder – when writing this long before valentine’s day – if the matureness of Delphi finally introduced real undo/redo in the form designer.
Probably still a dream, but still…
–jeroen
The current Delphi bindings for WebSphere MQ (formerly known as MQSeries) are very old.
The MA7Q: WebSphere MQ – MQI for Delphi formal binding from IBM is incomplete. Even though it is from 2005, it doesn’t contain the MQCD definition that was there at least since WebSphere MQ 5.2 (released in 2000). And by now it should be gone, since MQSeries 5.x is not supported any more.
A newer one by Dinko Miljak which is mentioned on Delphi 3000 and mentioned on MQSeries.net, has some errors and is from the WebSphere MQ 5.2 era.
It is available via this posting on MQSeries.net (direct download link), and this author reference on Torry.net (direct download link). Both files are identical.
Since it is much more extensive than the IBM version, I am using it to update it for newer WebSphere versions.
Great help while updating are the Gefira MQ bindings for Python: readable, indexed on nullege, and helpful (for instance on the usage of MQHO_UNUSABLE_HOBJ - which is assigned when calling MQCLOSE, I found out later that it is also explained here). The latest Gefira change was in 2008, but still way better than the Delphi bindings.
Also the Perl bindings for MQSeries together with their ASCII/EBCDIC client demo helped a lot.
A big issue when translating is that the i5/OS API in large part uses different names than the regular API.
For instance MQMD (i5/OS) contains MDENC, MDCSI and MDFMT fields where MQMD (regular) contains and Encoding, CodedCharSetId and Format fields.
As soon as I have done proper translation and upgrading to WebSphere MQ 7.x, I will upload source code.
Source code will be on the BeSharp.net CodePlex repository.
–jeroen
Object Pascal does allow binding a property to a field for direct read/writer, but we all have seen properties that required a slightly more complex getter or setter, and that usually meant a method for both. DWScript (svn trunk) & Smart Pascal (1.1) now support property expressions and statements, so the syntax is extended to allow:
property Name : Type read (expression) write (expression|statement)
Under the hood, the compiler will generate an unnamed getter or setter method when appropriate.
Let’s take f.i. a class that exposes an internal list, you can now use just
TMyClass = classprivate FList : array of TElement; publicproperty Items[i: Integer] : TElement read (FList[i]) write (FList[i]); default; property Count : Integer read (FList.Length); end;
Look Ma! No implementation and no constructor needed for trivial properties!
The astute reader will quickly notice how much shorter this is compared to doing it with a TList<T> and classic properties instead.
And for an hypothetical angle value types that accepts both radians and degrees you could have
TMyAngle = recordprivate FAngle : Float; publicproperty Radians : Float read FAngle write FAngle; property Degrees : Float read (RadToDeg(FAngle)) write (FAngle:=DegToRad(Value)); end;
In the setter statement, there is a special value creatively named… “Value” which holds the value assigned to the property.
In addition to expressions and statements, you can also if specify a property name as getter or setter, this will create an alias (no under-the-hood getter or setter method will be created):
TAncestor = classprivate FHidden : Integer; procedure SetSecret(v : Integer); protectedproperty Hidden : Integer read FHidden write FHidden; property Secret : Integer write SetSecret; end; TSubClass = class (TAncestor) publicproperty Revealed : Integer read Hidden write Secret; property OldReveal : Integer read Revealed write Revealed; deprecated; end;
Which can be of use when you want to make public a protected property under a different name in a subclass, and the underlying field or method being private wasn’t visible. It can also be helpful if you want to rename a property in a migration-friendly way, with the old name deprecated.
So to summarize:
As we weren’t sure of the potential ambiguity, the compiler currently requires the presence of brackets ( ) before the new expressions and statements are allowed, this requirement might be lifted in the future, or maybe not, as it makes such expressions stand out more.
This is an open question, Oxygen accepts read expressions without brackets (but doesn’t have write expressions or statements), so feedback on this aspect is welcome.
Thanks go to Primoz Gabrielcic for providing the unit tests for the above feature!