Favorite vs Favourite

Both ‘favorite‘ or ‘favourite‘ have the same meaning, but ‘favourite‘ is used in British English, Australian English, New Zealand English and Canadian English whereas ‘favorite‘ is used in American English.

Advertisements

Preinstalled .Net Framework Versions

Windows XP Home and Professional SP1 includes the MSI-based .NET Framework 1.0 + SP2 in the Additional Components folder on the installation CD. It is not an OS component on this OS.
Windows XP Home and Professional SP2 includes the MSI-based .NET Framework 1.1 + SP1 in the Additional Components folder on the installation CD. It is not an OS component on this OS.
Windows XP Home and Professional SP3 includes the MSI-based .NET Framework 1.1 + SP1 in the Additional Components folder on the installation CD. It is not an OS component on this OS.
Windows XP Media Center Edition (Windows XP SP1) includes the .NET Framework 1.0 + SP2 as an OS component
Windows XP Media Center Edition (Windows XP SP2 and higher) includes the .NET Framework 1.0 + SP3 as an OS component. On Windows XP Media Center Edition, the only way to get the .NET Framework 1.0 SP3 is to install Windows XP SP2 or higher. There is not a standalone 1.0 SP3 installer for this edition of Windows XP.
Windows XP Tablet PC Edition (Windows XP SP1) includes the .NET Framework 1.0 + SP2 as an OS component
Windows XP Tablet PC Edition (Windows XP SP2 and higher) includes the .NET Framework 1.0 + SP3 as an OS component. On Windows XP Tablet PC Edition, the only way to get the .NET Framework 1.0 SP3 is to install Windows XP SP2 or higher. There is not a standalone 1.0 SP3 installer for this edition of Windows XP.
Windows Server 2003 (all x86 editions) includes the .NET Framework 1.1 as an OS component; 64-bit versions of Windows Server 2003 do not include a version of the .NET Framework as an OS component
Windows Server 2003 R2 includes the MSI-based .NET Framework 2.0. It appears in Add/Remove Windows Components as an OS component, but selecting it simply invokes the MSI-based installer. The MSI can be repaired and removed using Add/Remove Programs regardless of whether it is installed via the standalone MSI or via the Add/Remove Windows Components UI.
Windows Vista (all editions) includes the .NET Framework 2.0 and 3.0 as OS components 3.0 can be added or removed via the Programs and Fatures control panel.
Windows Vista SP1 (all editions) includes the .NET Framework 2.0 SP1 and 3.0 SP1 as OS components. 3.0 SP1 can be added or removed via the Programs and Features control panel.
Windows Server 2008 and Windows Server 2008 SP1 (all editions) includes the .NET Framework 2.0 SP1 and 3.0 SP1 as OS components. The .NET Framework 3.0 SP1 is not installed by default and must be added via the Programs and Features control panel though.
Windows Server 2008 SP2 (all editions) includes the .NET Framework 2.0 SP2 and 3.0 SP2 as OS components. The .NET Framework 3.0 SP2 is not installed by default and must be added via the Programs and Features control panel though.
Windows Server 2008 R2 (all editions) includes the .NET Framework 3.5.1 as an OS component. This means you will get the .NET Framework 2.0 SP2, 3.0 SP2 and 3.5 SP1 plus a few post 3.5 SP1 bug fixes. 3.0 SP2 and 3.5 SP1 can be added or removed via the Programs and Features control panel.
Windows 7 (all editions) includes the .NET Framework 3.5.1 as an OS component. This means you will get the .NET Framework 2.0 SP2, 3.0 SP2 and 3.5 SP1 plus a few post 3.5 SP1 bug fixes. 3.0 SP2 and 3.5 SP1 can be added or removed via the Programs and Features control panel.
Windows 8 (all editions) includes the .NET Framework 4.5 as an OS component, and it is installed by default. It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default. The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.
Windows 8.1 (all editions) includes the .NET Framework 4.5.1 as an OS component, and it is installed by default. It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default. The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.
Windows Server 2012 (all editions) includes the .NET Framework 4.5 as an OS component, and it is installed by default except in the Server Core configuration. It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default. The .NET Framework 3.5 SP1 can be added or removed via the Server Manager.
Windows Server 2012 R2 (all editions) includes the .NET Framework 4.5.1 as an OS component, and it is installed by default except in the Server Core configuration. It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default. The .NET Framework 3.5 SP1 can be added or removed via the Server Manager.
Windows 10 (all editions) includes the .NET Framework 4.6 as an OS component, and it is installed by default. It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default. The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.
Windows 10 November 2015 Update (all editions) includes the .NET Framework 4.6.1 as an OS component, and it is installed by default. It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default. The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.
Windows 10 Anniversary Update (all editions) includes the .NET Framework 4.6.2 as an OS component, and it is installed by default. It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default. The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.
Windows Server 2016 (all editions) includes the .NET Framework 4.6.2 as an OS component, and it is installed by default except in the Server Core configuration. It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default. The .NET Framework 3.5 SP1 can be added or removed via the Server Manager.
Windows 10 Creators Update (all editions) includes the .NET Framework 4.7 as an OS component, and it is installed by default. It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default. The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.
Windows 10 Fall 2017 Creators Update (all editions) includes the .NET Framework 4.7.1 as an OS component, and it is installed by default. It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default. The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.
Windows 10 April 2018 Update (all editions) includes the .NET Framework 4.7.2 as an OS component, and it is installed by default. It also includes the .NET Framework 3.5 SP1 as an OS component that is not installed by default. The .NET Framework 3.5 SP1 can be added or removed via the Programs and Features control panel.

Filesize function for Delphi

Erroneous filesize function: (Files bigger than 2GB are shown 2GB)

function FileSize(const aFilename: String): Int64;
var
 info: TWin32FileAttributeData;
begin
 result := -1;

if NOT GetFileAttributesEx(PWideChar(aFileName), GetFileExInfoStandard, @info) then
 EXIT;

result := Int64(info.nFileSizeLow) or Int64(info.nFileSizeHigh shl 32);
end;

Better filesize function: (sr.FindData is Platform specific warning)

function FileSize(const aFilename: String): Int64;
var
 sr : TSearchRec;
begin
 if FindFirst(aFilename, faAnyFile, sr ) = 0 then
 begin
 result := Int64(sr.FindData.nFileSizeHigh) shl Int64(32) + Int64(sr.FindData.nFileSizeLow);
 end else
 begin
 result := -1;
 end;
 FindClose(sr);
end;

Best way:

function FileSize(const aFilename: String): Int64;
var
 sr : TSearchRec;
begin
 if FindFirst(aFilename, faAnyFile, sr ) = 0 then
 begin
 Result:=Sr.Size;
 end else
 begin
 result := -1;
 end;
 FindClose(sr);
end;

Panel Type: TN vs IPS, PLS, VA

TN: (Twisted Nematic) panels were the first LCD panel type.
IPS: (In-Plane Switching) was created to address the shortcomings of TN panels. IPS panels seek to solve TN panels’ issues of poor color reproduction and viewing angles.
PLS: (Plane to Line Switching) are quite similar to IPS panels, so much so that they have the same advantages and disadvantages, with a couple extra minor advantages. PLS is produced by Samsung, who claims that compared to IPS panels, PLS panels have better viewing angles, a 10% increase in brightness, 15% decrease in production costs, increased image quality, and allow for flexible panels.
VA: (Vertical Alignment) panels offer a solid medium between TN and IPS panels. VA was created to combine the advantages of IPS and TN panels, and largely did, although they did so with some compromise.

Localization of MessageDlg in Delphi

Built-in MessageDlg function shows texts such as Yes, No, Confirmation only in English.

function MyMessageDlg(CONST Msg: string; DlgTypt: TmsgDlgType; button: TMsgDlgButtons;
 Caption: ARRAY OF string; dlgcaption: string): Integer;
var
 aMsgdlg: TForm;
 i: Integer;
 Dlgbutton: Tbutton;
 Captionindex: Integer;
begin
 aMsgdlg := createMessageDialog(Msg, DlgTypt, button);
 aMsgdlg.Caption := dlgcaption;
//aMsgdlg.BiDiMode := bdRightToLeft;
 Captionindex := 0;
 for i := 0 to aMsgdlg.componentcount - 1 Do
 begin
 if (aMsgdlg.components[i] is Tbutton) then
 Begin
 Dlgbutton := Tbutton(aMsgdlg.components[i]);
 if Captionindex <= High(Caption) then
 Dlgbutton.Caption := Caption[Captionindex];
 inc(Captionindex);
 end;
 end;
 Result := aMsgdlg.Showmodal;
end;