DelphiUdIT
Members-
Content Count
822 -
Joined
-
Last visited
-
Days Won
18
Everything posted by DelphiUdIT
-
Millisecond Counter
DelphiUdIT replied to Paul H's topic in Algorithms, Data Structures and Class Design
Like I wrote, there is also Elapsed, that is based on TTimeSpawn: https://docwiki.embarcadero.com/Libraries/Sydney/en/System.TimeSpan.TTimeSpan You can use that advanced record ... -
(P.S.: I refer to Windows OS). First of all, take care that what you write in Delphi IDE may be in Ansi or UTF and depend on this your characters my be misunderstanding after read from files (in the laste release of Delphi those things work better). Second, string type in Delphi is equivalent to Unicode string (UTF-16). Normally the compiler does all the conversions needed, but in same cases it cannot. Look this for you convenience: https://docwiki.embarcadero.com/RADStudio/Athens/en/String_Types_(Delphi) Look better at you characters encoding: c3 8d may not be the exact character did you exepect:
-
Millisecond Counter
DelphiUdIT replied to Paul H's topic in Algorithms, Data Structures and Class Design
You can use from unit System.DIagnostics the TStopWatch "record": Uses System.Diagnostics; var a:TStopWatch; begin a := TStopWatch.StartNew; .... .... a.Stop; ShowMessage(a.ElapsedMilliseconds.toString); end; For better info: https://docwiki.embarcadero.com/Libraries/Athens/en/System.Diagnostics.TStopwatch P.S.: you have also the "Elapsed" property that maintain the features you required (but you can simple calculate them from "milliseconds". -
Instaead to use getit from IDE, you can try this from cmdline: getitcmd -c=useonline getitcmd --list= -f=all If you find it in the list you can install it from the cmdline: getitcmd -i=WindowsAPIfromWinMD-1.0
-
Uhmm strange, WINMD was released before the release of 12.1 and doesn't require a subscription.
-
No vertical space for all toolbars - hidden
DelphiUdIT replied to Fabrizio The Cat's topic in General Help
Uhmm, I don't understand very well the issue, but you can move and resize the component toolbar how and where you want .... and not only the component ... -
How much RAM for Macbook Pro M4 to Run RAD Studio 12?
DelphiUdIT replied to amit's topic in General Help
OT: I normally do it during summer days on a beach but with a Windows PC (and not for a small scripts) .... drinking beer and looking at the sea. I can't wait for summer to finally arrive. Sorry for the OT but reading the post made me feel nostalgic for summer. -
Why i haven't Android SDK after intall RAD Studio 12?
DelphiUdIT replied to Anna Blanca's topic in Cross-platform
Start looking this: -
Why i haven't Android SDK after intall RAD Studio 12?
DelphiUdIT replied to Anna Blanca's topic in Cross-platform
The links point to a russian forum with a topic like this. Is not a spam ... it's just a clumsy reference. -
It should be for 64 bit Modern C++ (bcc64x): https://docwiki.embarcadero.com/RADStudio/Athens/en/BCC64X
-
These things will happen more and more often in the future, as Let's encrypt will no longer send certificate expiration notices.
-
Absolute directive with record and array
DelphiUdIT posted a topic in Algorithms, Data Structures and Class Design
Hello everyone. From a post in the international Lazarus forum ( https://forum.lazarus.freepascal.org/index.php/topic,71183.msg555336.html#msg555336 ) I noticed the use of the "absolute" directive to actually initialize an array of records. By defining an initialized array of strings, these are then fully matched to an array of records. I knew about the "absolute" directive, but honestly I have never seen it applied (or at least I have never noticed it, I vaguely remember seeing it in Indy). Apart from other ways to obtain the same results, does the definition as it was made have any contraindications other than the pure reading of an element of the record (I think of its writing or passing as a "var" to some processing method)? Sample: const TABLE_SIZE = 118; //118*3 -1 = array size TABLE_DATA: array[0..pred(TABLE_SIZE * 3)] of string = ( 'H', 'Hydrogen', '1.00794', 'He', 'Helium', '4.002602', 'Li', 'Lithium', '6.941', 'Be', 'Beryllium', '9.012182', 'B', 'Boron', '10.811', 'C', 'Carbon', '12.0107', 'N', 'Nitrogen', '14.0067', 'O', 'Oxygen', '15.9994', 'F', 'Fluorine', '18.9984032', 'Ne', 'Neon', '20.1797', 'Na', 'Sodium', '22.98976...', 'Mg', 'Magnesium', '24.305', 'Al', 'Aluminium', '26.9815386', 'Si', 'Silicon', '28.0855', 'P', 'Phosphorus', '30.973762', 'S', 'Sulfur', '32.065', 'Cl', 'Chlorine', '35.453', 'Ar', 'Argon', '39.948', 'K', 'Potassium', '39.948', 'Ca', 'Calcium', '40.078', 'Sc', 'Scandium', '44.955912', 'Ti', 'Titanium', '47.867', 'V', 'Vanadium', '50.9415', 'Cr', 'Chromium', '51.9961', 'Mn', 'Manganese', '54.938045', 'Fe', 'Iron', '55.845', 'Co', 'Cobalt', '58.933195', 'Ni', 'Nickel', '58.6934', 'Cu', 'Copper', '63.546', 'Zn', 'Zinc', '65.38', 'Ga', 'Gallium', '69.723', 'Ge', 'Germanium', '72.63', 'As', 'Arsenic', '74.9216', 'Se', 'Selenium', '78.96', 'Br', 'Bromine', '79.904', 'Kr', 'Krypton', '83.798', 'Rb', 'Rubidium', '85.4678', 'Sr', 'Strontium', '87.62', 'Y', 'Yttrium', '88.90585', 'Zr', 'Zirconium', '91.224', 'Nb', 'Niobium', '92.90628', 'Mo', 'Molybdenum', '95.96', 'Tc', 'Technetium', '(98)', 'Ru', 'Ruthenium', '101.07', 'Rh', 'Rhodium', '102.9055', 'Pd', 'Palladium', '106.42', 'Ag', 'Silver', '107.8682', 'Cd', 'Cadmium', '112.411', 'In', 'Indium', '114.818', 'Sn', 'Tin', '118.71', 'Sb', 'Antimony', '121.76', 'Te', 'Tellurium', '127.6', 'I', 'Iodine', '126.90447', 'Xe', 'Xenon', '131.293', 'Cs', 'Caesium', '132.9054', 'Ba', 'Barium', '132.9054', 'La', 'Lanthanum', '138.90547', 'Ce', 'Cerium', '140.116', 'Pr', 'Praseodymium', '140.90765', 'Nd', 'Neodymium', '144.242', 'Pm', 'Promethium', '(145)', 'Sm', 'Samarium', '150.36', 'Eu', 'Europium', '151.964', 'Gd', 'Gadolinium', '157.25', 'Tb', 'Terbium', '158.92535', 'Dy', 'Dysprosium', '162.5', 'Ho', 'Holmium', '164.93032', 'Er', 'Erbium', '167.259', 'Tm', 'Thulium', '168.93421', 'Yb', 'Ytterbium', '173.054', 'Lu', 'Lutetium', '174.9668', 'Hf', 'Hafnium', '178.49', 'Ta', 'Tantalum', '180.94788', 'W', 'Tungsten', '183.84', 'Re', 'Rhenium', '186.207', 'Os', 'Osmium', '190.23', 'Ir', 'Iridium', '192.217', 'Pt', 'Platinum', '195.084', 'Au', 'Gold', '196.966569', 'Hg', 'Mercury', '200.59', 'Tl', 'Thallium', '204.3833', 'Pb', 'Lead', '207.2', 'Bi', 'Bismuth', '208.9804', 'Po', 'Polonium', '(209)', 'At', 'Astatine', '(210)', 'Rn', 'Radon', '(222)', 'Fr', 'Francium', '(223)', 'Ra', 'Radium', '(226)', 'Ac', 'Actinium', '(227)', 'Th', 'Thorium', '232.03806', 'Pa', 'Protactinium', '231.0588', 'U', 'Uranium', '238.02891', 'Np', 'Neptunium', '(237)', 'Pu', 'Plutonium', '(244)', 'Am', 'Americium', '(243)', 'Cm', 'Curium', '(247)', 'Bk', 'Berkelium', '(247)', 'Cf', 'Californium', '(251)', 'Es', 'Einstenium', '(252)', 'Fm', 'Fermium', '(257)', 'Md', 'Mendelevium', '(258)', 'No', 'Nobelium', '(259)', 'Lr', 'Lawrencium', '(262)', 'Rf', 'Rutherfordium', '(267)', 'Db', 'Dubnium', '(268)', 'Sg', 'Seaborgium', '(271)', 'Bh', 'Bohrium', '(272)', 'Hs', 'Hassium', '(270)', 'Mt', 'Meitnerium', '(276)', 'Ds', 'Darmstadium', '(281)', 'Rg', 'Roentgenium', '(280)', 'Cn', 'Copernicium', '(285)', 'Nh', 'Nihonium', '(286)', 'Fl', 'Flerovium', '(289)', 'Mc', 'Moscovium', '(290)', 'Lv', 'Livermorium', '(293)', 'Ts', 'Tennessine', '(294)', 'Og', 'Oganesson', '(294)'); var Elements : array[0..pred(TABLE_SIZE)] of record Symbol : string; Name : string; Mass : string; end absolute TABLE_DATA; { absolute, don't program without it !! } procedure XXXXX begin for var i in Elements do begin ShowMessage(i.Symbol+' / '+i.Name+' / '+i.Mass); end; end; Thanks EDIT: the question is for TABLE_DATA defined as "var" of course, not as "const" ... -
12.3 April Patch 1.0 Personality Error / Incomplete
DelphiUdIT replied to dwb's topic in General Help
Look this for the patch: https://blogs.embarcadero.com/rad-studio-12-3-april-patch-available/ ONLY if you install the patch from IDE GUI the update will appear in the "About" box. The PAServer should be copied manually to the destination target (from the Repository path that you have indicated). About the personality, I don't know about it but may be is some issue about license ? -
Absolute directive with record and array
DelphiUdIT replied to DelphiUdIT's topic in Algorithms, Data Structures and Class Design
Lool, I always use Assigned(...) hoping that one day or another it will solve all the situations (either nil or an invalid pointer) 🙂 -
Absolute directive with record and array
DelphiUdIT replied to DelphiUdIT's topic in Algorithms, Data Structures and Class Design
You are right, those were my fear. -
Absolute directive with record and array
DelphiUdIT replied to DelphiUdIT's topic in Algorithms, Data Structures and Class Design
The use of pred here is only the result of copy / paste operation. But I use pred sometimes, especially when there is a dimension of an array in play. In a for / to cycle instead I use normally "-1". -
Absolute directive with record and array
DelphiUdIT replied to DelphiUdIT's topic in Algorithms, Data Structures and Class Design
It is not mine, I'm not a chemical tech. I only see the use of the "absolute" directive and ask if there is any issue (in assignement for example). By the way I have tested some uses case and i don't found any issue, it's like a normal array of records. Like I wrote, I had know that there are other methods, I was only curious about "absolute" used in array of records. Thank you all for your interest. -
?????
-
But you can click "Ignore Patch", this only take away the advertise from Welcome Screen, you can always choose to install selecting the patch form the list.
-
I don't know about your issue (I have not any solution). I don't know if you have installed the patch or not, 'cause the note about the patch is present in the about box only if you install it form GETIT.
-
No, this is the note about the April Patch. Take care that this is showed ONLY IF YOU INSTALL the patch with GETIT.
-
Delphi version 12.3 with patch. I used the TaurusTLS from https://github.com/JPeterMugaas/TaurusTLS with bundle version of Embarcadero to activate the use of TLSv1.3. Inside a web server project that I use for testing, I substitute the old PR299 (openSSL 1.x and 3.x wrapper) with TaurusTLS and all is perfect working with really less change. I don't use the component at design time, so with some $IFDEF I adapt the code that can work with old PR299 (TLSv1.3), only a bundle distro (TLSv1.2) and the new TaurusTLS (TLSv1.3 with all the new OpenSSL 3.x DLLs) with only a recompile action. I have more server place with some certificates from Let's encrypt and redirection function (http port 80 -> https port 443) and is all good. Thanks to @Remy Lebeau and @J. Peter Mugaas
-
- indy
- taurusltls
-
(and 2 more)
Tagged with:
-
Use of information icon is deprecated in Windows, see this topic: https://en.delphipraxis.net/topic/11232-delphi-12-messagedlg-doesnt-show-icons/?do=findComment&comment=89141
-
Winapi.Windows.PROCESS_QUERY_LIMITED_INFORMATION not found
DelphiUdIT replied to PeterPanettone's topic in Windows API
That's fine with me, because then I copy all the units used as "uses" (NOT COMPONENTS) into the $BDSUSERDIR\Imports folder (in this case the WINMD folder) And in the library paths I add that path (which is specific to the platform). In this way I have a single point (I repeat only for the uses, i.e. those units that represent a stand-alone functionality) under which there are all the "utilities" and that will be copied and maintained for each version of RAD STUDIO. I still have some files from almost twenty years ago that I still use (rarely, only for maintenance of old code ... with the new RAD). "It's an ill wind that blows nobody any good" ... Bye
![Delphi-PRAXiS [en]](https://en.delphipraxis.net/uploads/monthly_2018_12/logo.png.be76d93fcd709295cb24de51900e5888.png)