-
Content Count
1167 -
Joined
-
Last visited
-
Days Won
16
Everything posted by FPiette
-
The component is not ready because it is still busy with previous request. Maybe an event which triggers email send is right after the previous, before the first email is already sent. Coul be several reasons: 1) the previous email takes long time because the recipient server do not respond fast 2) when sending an email, it don't finishes because of some error You should probably log (ICS has logging facility or you can write log lines to a text file, easy) all events and steps that occurs in your application and see if it is correct. Waiting for readiness in a wait loop is not the best idea. It is much better to use events. The event which triggers the email sending should push that info into a queue, check if the smtp component is done with previous email and fetch the next email from the queue. If not ready, just do nothing. When the component event tells it has finished sending an email, it checks the queue for the next mail to be sent and do it if there is one or just do nothing. Using vent everywhere is the key to success!
-
Are you doing backups now? Are you using RAID? Most today's mainboards have a basic RAID controller and if yours don't have one, buy one: it is not expensive at least for a basic version. High end version have a battery backup as well so that in case of power loss, the current duplication will continue and cache will be written to disk. Here we speak about source code, but today, almost everyone save his photos on hard disk as well. And many lost everything because they don't have a backup. Personally, I don't reuse SD card: I keep them as backup.
-
Please read what I said again. If you move 3rd party component it is likely you have to update their path, depends on the components and how you add it to your projects. Think about taking a backup on a regularly schedule. All disk will fail one day! Also think about using disk mirroring (RAID1) or other kind of RAID. With RAID (except RAID0), all you data is duplicated so even when a disk fails, you still have your data. Just replace the failed disk and go.
-
If you have constructed your projects correctly, that is with relative paths, then you can simply copy your "projects" directory elsewhere.
-
I wonder why you need xRDP. Didn't you install the GUI for Ubuntu? I have a full Ubuntu desktop that I can see as a window on my Windows 10 and I can do anything in the Linux OS. I also have network shares between Windows and Linux, both directions to easy access to files. On the attached screen dump, you see VMWare workstation running Ubuntu and showing Ubuntu GUI. You can also see part of Delphi IDE.
-
Try this: http://svn.code.sf.net/p/radstudiodemos/code/branches/RadStudio_XE6/Object Pascal/VCL/RichEdit/ For unknown reason, Embarcadero removed that demo for later Delphi versions.
-
I have no experience with Hyper-V: I am using VMWare Workstation on top of Win10 to run Overbyte webserver and wiki under Ubuntu 18.04. I use that version because it is the most recent LTS (Long Term Support) for Ubuntu. I have not tried to install PAServer on that version. If you don't want to invest in VMWare Workstation, you can use VMWare Player which is a free version lacking snapshot. You can replace snapshot by copying the vmdk file.
-
I think since TWSocket exists for 24 years, if this bug exists, we should have already seen it. I think is is likely the code you wrote which is wrong. But I can tell... 1) Could you please show relevant code 2) How do you know that it is no a sever issue 3) Before writing you own code, check with one of the samples
-
Generic circular buffer library released
FPiette replied to TurboMagic's topic in Algorithms, Data Structures and Class Design
Would be nice if you translate all your comments in English. -
There are plenty of Delphi sample program using TRichEdit which is an RTF editor.
-
In the past, I have used a lib from michael@grizzlymotion.com. The units are VFrames.pas and VSamples.pas. I don't remember where I found it but a little search show those two links of interest. https://github.com/MakeMagazinDE/GRBLize https://stackoverflow.com/questions/19726643/how-to-get-a-snapshot-from-a-webcam-with-delphi7-using-vframestvideoimage Using this code, I get raw frames from the camera, then I use FFMpeg tool to compress rawframes with the required codec to produce anyone of the ffmpeg video format. I invoke FFMpeg command line, feeding it with a pipe. My Delphi program write to the pipe and FFMpeg read the pipe. FFMpeg is available from https://ffmpeg.org/download.html You do need the source code. Prebuild executable is enough since you'll pipe the frames into the utility. To pipe data, I use my own code. I wrote a blog article: http://francois-piette.blogspot.com/2013/04/inter-process-communication-using-pipes.html
-
OK, it should work. How to configure the IDE so that it calls RC.EXE instead of BRCC32.EXE?
-
BRCC32 cannot handle ico files with 24 bits RGB.
-
Maybe you should tell us more about the intended application.
-
Delphi implementation of Aberth–Ehrlich method and precision problem
FPiette replied to at3s's topic in Algorithms, Data Structures and Class Design
I have not seen algorithm implementation, but one possible cause is that in your implementation, you accumulate very small floating point value and at some point the accumulated value becomes very large (or the initial value is that large). At that moment, accumulation doesn't work anymore. What very small and very large means depends on the floating point precision you used. This means that how you implement the algorithm matters! Compiler will not change anything, the issue comes only from the floating point precision you use (The number of significant digits). -
Batch / bulk email program that reads a database for addresses.
FPiette replied to Plainer's topic in ICS - Internet Component Suite
That was good in your previous run but you called "Mail" instead of "MailFrom". -
Batch / bulk email program that reads a database for addresses.
FPiette replied to Plainer's topic in ICS - Internet Component Suite
You should start the next mail at MailFrom stage. -
Batch / bulk email program that reads a database for addresses.
FPiette replied to Plainer's topic in ICS - Internet Component Suite
Are you sure you test all possible error everywhere and don't ignore any exception? The code you gave yesterday is flawed. Your addition in RequestDone handler to start a new mail do not depend on the RqType but is always executed. -
Is interposer class really best to customize TPanel.Paint?
FPiette replied to Mike Torrettinni's topic in VCL
I never use IDE global path, nor library folder. All my project have explicit paths (always relative) to everything, except components delivered with Delphi. All my components and all 3rd party components I use are all explicitly added to all projects they are used in. And I always recompile everything, never use a prebuilt dcu, obj or package. This way I'm always sure to have everything required to build an application. On the computer I use, it takes only a few seconds to compile hundreds of thousands code line. I use Delphi since version 1 (25 years ago) for almost full time. I wrote hundreds of applications, some of which are very large. I have always had great success. I will not change the way I work. -
Is interposer class really best to customize TPanel.Paint?
FPiette replied to Mike Torrettinni's topic in VCL
What do you mean? No, the same .groupproj file is usable with any IDE. And the dpk file are compatible between IDE version as well. I works really nicely and easily. You should try... Yes, indeed. I frequently use a project group with more than 100 projects. -
Is interposer class really best to customize TPanel.Paint?
FPiette replied to Mike Torrettinni's topic in VCL
I don't think so. I made a lot of components, split into a number of packages. I have a project group with all packages. I do a "right click" / "From here" / "build all" in the project manager and then select all design time packages in project manager and right click and select "install". It takes at most 2 minutes for everything. I don't call that a pain. And you only do it once when a new IDE is here. I also use 3rd party components and I add their packages in the same project group as my own components for easy installation in any new IDE. This is quick and easy. With a component installed in the IDE, you don't even have a single unit to include. The IDE do it for you when you drop the component on the form. Much easier and cleaner than an interposer class IMO. No code to add manually to any of your application. -
Batch / bulk email program that reads a database for addresses.
FPiette replied to Plainer's topic in ICS - Internet Component Suite
This is because the component is asynchronous: start some operation which is executed in the background while you own code continue. When operation is finished in the background, you receive an event. Your program should use the async way of programming. That is no loop but events and messages. Code outline: 1) procedure to do your SQL request then PostMessage a custom message 2) from the handler of this custom message, take current record and start sending a mail. If EOF then you are done. 3) handle all SMTP component events, chaining commands for OnRequestDone until the mail is fully sent 4) when mail fully sent, use PostMessage to post the custom message. Those 4 step are NOT in line in a single procedure ! They are "chained" thru events or custom message, just like "All-in-one" button does -
Is interposer class really best to customize TPanel.Paint?
FPiette replied to Mike Torrettinni's topic in VCL
I really don't agree with this sentence! Creating a separate package helps having clean code which is reused easily. Registration is just one procedure call in the design time package. You write it one and forget it. You don't replace an existing panel: you use your specialized one when needed instead of the standard. You have both the standard panel and your specialized available in the component toolbar. You can even use both in the same form without worrying. There is no bundling with app required. Simply don't add that package in the run time package list. The component code will automatically bundled in the application. Nothing to deploy. Building component is the best solution. You do it once and them you use it. If you have an existing application and want to use your specialized panel, it is easy to edit the .dfm and .pas files using an external editor (NotePad or NotePad++) to do a simple search and replace to change TPanel by TMyPanel where is is needed. It is always easier to do that edit than opening the form, deleting the standard panel, dropping the specialized panel and reassigning properties and events! -
Is interposer class really best to customize TPanel.Paint?
FPiette replied to Mike Torrettinni's topic in VCL
Instead of an interposer class, I would simply create a new component inheriting from TPanel. The component code is what @DaveNottage shown except for the class name. Then this component is added to a package (Actually two: a run time and a design time package) so that it can be installed in the IDE and available where you need: you drop your specialized component on the form/frame instead of the standard panel. If you don't know how to create your component, there are a lot of tutorials on the Internet showing how to create your own TMyButton. It's the same process with a panel Google is your friend. -
Calling an "application" from windows service
FPiette replied to Clément's topic in RTL and Delphi Object Pascal
Be aware that running an executable is a slow process. If you put the same code in a DLL, this can stay loaded as long as you decide to. You may unload the DLL for example when the last request occured 5 minutes ago. If you prefer the EXE, then you may manage to let it run as long as you need, avoiding a new start for each request. The only difference is that you'll pass the arguments not thru the command line but thru some IPC (named pipe is quite fast). And why not a secondary HTTP server?