Leaderboard
Popular Content
Showing content with the highest reputation on 02/02/23 in Posts
-
IsValidDate fails after the Year 9999
Stefan Glienke replied to Nigel Thomas's topic in RTL and Delphi Object Pascal
Planet of the Firemonkeys? -
IsValidDate fails after the Year 9999
Ian Branch replied to Nigel Thomas's topic in RTL and Delphi Object Pascal
I was there for Y2K. Not sure I will be around for Y10K... 😉 -
https://github.com/EtheaDev/SVGIconImageList
-
IsValidDate fails after the Year 9999
Attila Kovacs replied to Nigel Thomas's topic in RTL and Delphi Object Pascal
That's why I'm using stardate.pas -
Can the packages setup be updated for ICS in new versions?
Angus Robertson replied to Geoffrey Smith's topic in ICS - Internet Component Suite
It was the MQTT protocol I was proposing to add to ICS, WebSockets is done and dusted. Angus -
This issue happens on all LLVM backed compilers because LLVM is not capable of catching hardware exceptions unless exception happens within another function. You find more information on my blog post https://dalijap.blogspot.com/2018/10/catch-me-if-you-can.html I never got around to write the sequel, but the implications is that literally anything that all exception handling implicit or explicit is broken in such situations. The solution is that you either wrap your code in separate function that will not have any exception handling within, and then the caller will be able to catch and handle raised exceptions. Another way of solving issues is to avoid code that can trigger such hardware exception and raise Delphi exception if code does not satisfy some requirement as explained in https://docwiki.embarcadero.com/RADStudio/en/Migrating_Delphi_Code_to_Mobile_from_Desktop#Use_a_Function_Call_in_a_try-except_Block_to_Prevent_Uncaught_Hardware_Exceptions So in the context of your example, you should either check whether object is nil before trying to use it (this would actually be general advice, as accessing nil object, depending on the code, on Windows does not guarantee that you will get AV). Note. I don't know what exactly following quote from documentation about macOS means: "structured exception handling (__try/__except) is not available". Linked page talks about hardware exceptions, but I am not sure whether there are some other implications here besides what I said in context of LLVM. At the moment I don't have my development environment set up in a way that would allow me to verify behavior on Mac. While bugs are always possibility, RTL appropriately handles hardware exceptions in cross-platform code. I removed wrong duplicates and added appropriate one.
-
ok. you just made my day.
-
Vonoroi / Fortunes algorithm
cwangdk replied to cwangdk's topic in Algorithms, Data Structures and Class Design
Admire this web-app: https://voronoi-editor.web.app/ 🙂 /cwang -
IsValidDate fails after the Year 9999
Alexander Elagin replied to Nigel Thomas's topic in RTL and Delphi Object Pascal
There is a nice RFC 2550 dealing with dates up to year 10E30 and beyond (dated 1 April 1999 ) -
Windows Service, gmail, and OAuth2 blues
Angus Robertson replied to Clément's topic in ICS - Internet Component Suite
Yes, as I said yesterday the Refresh Token will often stay valid for months or even years and can be treated like a password and kept securely, but unlike a password it can be revoked at any time if compromised forcing a new interactive login to get a new Refresh Token. Note you have no idea about the life of the Refresh Token, so you must allow for it to be rejected. Angus -
IsValidDate fails after the Year 9999
David Heffernan replied to Nigel Thomas's topic in RTL and Delphi Object Pascal
No. -
Thanks Dave worked perfectly
-
IsValidDate fails after the Year 9999
programmerdelphi2k replied to Nigel Thomas's topic in RTL and Delphi Object Pascal
Independent of the System.DateUtils functions, I have tested the minimum and maximum value accepted by Delphi to inform a valid date and time, being: Delphi: of course, all should knows it Min: 30/12/1899 12:00 AM Max: 31/12/9999 23:59:59.999 TDateTime var using a "double" value directly Min: 01/01/0001 00:00:00.001 = -693593.00000001 = 693,593 days = 1900 years Max: 12/31/65535 23:59:59.990 = +669528949.999999940 = 23,920,275 days = 65,535 years Total: 24,613,868 days = 67,435 years then, the limitation is just from Delphi procedure! using TDatePicker (MSWin10 component) = Min: 01/01/0001 Max: 12/31/9999 = 64bits using TDateTimePicker = Min: 01/01/1601 Max: 12/31/9999 = 32bits NOTE: in function to Date/time, Delphi use "look" just first 4 digits for "years", then, the year "65535" stay as "6553"! here is the limitation! -
You need jdk-11.0.14.101-hotspot. You could use Tools | Manage Platforms, and select Additional Options in the IDE to install it, then configure your Android SDKs in the SDK Manager in Delphi to modify the settings on the Java tab. Once you have that right, see: https://github.com/DelphiWorlds/HowTo/tree/main/Solutions/AndroidServiceDelphi111
-
Windows Service, gmail, and OAuth2 blues
Angus Robertson replied to Clément's topic in ICS - Internet Component Suite
The OAuth2 Access Token has a short life, for Google it is usually one hour, little point in saving it in a database, unless you are using that to share information between applications. That is why you instead store the Refresh Token and use OAuth2 without interaction to get a new Access Token each time you send an email. Angus -
Windows Service, gmail, and OAuth2 blues
Angus Robertson replied to Clément's topic in ICS - Internet Component Suite
Should clarify my last message about the long lived refresh token, this is for a specific admin email account used by the server to call for help when it's unhappy. If the service application needs to send from multiple email accounts, you'll need to be more creative. Angus -
Also, a rant: I feel like a trailblazing pioneer on the frontier of some unexplored land. Searching this issue out has led me to one and only one thread where someone brought this up on Stack Overflow, and that thread was incorrectly marked as a duplicate (neither of the linked answers are relevant to the question in the slightest). The comments on the SO post are a bunch of people piling on about the cause of the exception and not addressing the question that was asked. Am I the only one actually trying to use Delphi to build a non-trivial MacOS application based on an existing code base?
-
Some more fun with ChatGPT and Delphi
Brandon Staggs replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
I think "Artificial Intelligence" is a misnomer, especially when it is applied to complex language models or classification algorithms that use neural networks. The word "intelligence" implies a level of active consideration that simply does not exist. While these systems have their uses and will continue to get better at them, they will never do more, and expecting intelligence out of these systems is not reasonable. People are impressed when Google's AI is able to identify objects and people in their photos, but no matter how long you train those models on pictures, they will never learn to play chess. And a chess model will never take what it is "learning" about chess and make intuitive leaps and apply the general game strategy to unrelated things like humans do. Once again I recommend this book: https://amzn.to/3HPwpFQ -
Windows Service, gmail, and OAuth2 blues
Angus Robertson replied to Clément's topic in ICS - Internet Component Suite
Technically, you can use the event you posted to get a new token from the desktop through interaction, ICS V8.71 now uses an internal browser window that makes it seamless. But it's not really necessary, using the same secrets in service and desktop applications, get a refresh token using the desktop and manually paste that to the configuration file for the service, use the IcsLoadRestEmailFromIni function to load it from an INI file per the ICS server samples. The refresh token rarely expires so only needs to be updated if you change the secrets or deliberately invalidate it online. I've been doing this with the IcsMailQueue in my web, rest and FTP servers on all my different servers, all with the same refresh token, for two or three years. Angus -
Some more fun with ChatGPT and Delphi
PaPaNi replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
Maybe a little offtopic, but ... -
Some more fun with ChatGPT and Delphi
Sherlock replied to dummzeuch's topic in Tips / Blogs / Tutorials / Videos
It would probably use "old norse". -
Need a "Delphi programming guideline"
Patrick PREMARTIN replied to TheOnlyOne's topic in General Help
using books pages with a quiz as a captcha on Windows login screen should be a good feature -
Do not waste your time, find a new job and leave them in the past. Got reprimanded once for replacing 2000+ lines of code looking for values by doing 'if Edit1.Value = x' on about 200 edit boxes basically named Edit1, Edit2, Edit3..Edit200 on a form (don't ask), just a huge cut-paste, change the component name procedure. I reduced it to about 10 lines using FindComponent in a loop producing the same results. I walked out of that job in less than 1 month after I figured out they (staff and management) refused to learn anything new. Do not suffer fools.