Jump to content

programmerdelphi2k

Members
  • Content Count

    1406
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by programmerdelphi2k

  1. programmerdelphi2k

    Using firedac to generate table script

    you can use "https://docwiki.embarcadero.com/RADStudio/Sydney/en/Querying_Metadata_(FireDAC)" functions to create yourself if necessary! try some like this: using: FDConn + FDPhysXXX + FDWaitxxxxx + FDMetaInfoQuery to scan your database -- FDScript to execute yourself script!!! procedure TForm1.Button1Click(Sender: TObject); begin FDConnection1.Open; FDMetaInfoQuery1.MetaInfoKind := mkResultSetFields; // any other kind existent FDMetaInfoQuery1.Open; end;
  2. programmerdelphi2k

    Multiple Simultaneous Connections with TidFTP

    each FTP session, needs: user, password, a file to upload; then, you need use a way to send this data, like using a "thread", or in your case "n" threads. Each one for a FTP send! then, each thread will be independent and autonomous each others! needs controls like all works, mainly when any exception occurs!
  3. if you dont have RAD 11 installed, YES! if "this" is any residual from old-Uninstall, then, just delete it!
  4. programmerdelphi2k

    Delphi RAD 10.4 IDE: How do I make the shapes appear smaller.

    try this: just drag your "mini-windows" (tools) by title and drop it in your screen, or same, close it. now,you can use all "ClientAREA" from your IDE! note: left margin will be always = "0"
  5. var // MyVar:string; // or MyVar:array of byte; begin SetLength( MyVar, 100) ; // if byte // READ( myVar[0], 100); // first var pos // READ( myVar, 100); // pointer pos try this gihub https://github.com/CWBudde/ComPort-Library https://github.com/CWBudde/ComPort-Library/blob/master/Source/CPort.pas = TCustomComPort SAMPLES: https://github.com/CWBudde/ComPort-Library/tree/master/Examples/ComExample
  6. programmerdelphi2k

    Possible changes to string/char handling in Delphi 11(.2)?

    no bad-WORds here ass = AnsiStringS
  7. programmerdelphi2k

    Clean cache memory after generete fast report

    of course, there are many object on memory in this moment! (many FastReports object or any other that you use) my tip: try start with max 100 on loop... use the MS TaskManager to see the memory consume go on until your "2000" to see the chaos! look, while you dont "re-factor" your code, this situation always will be your rotine! keep in mind that if you put all the tasks inside the Query.EOF "loop"... you will be replaying all the same occurrences until you reach the last record in the query! So if you access 100 objects in the life of your loop, then you will have 100x the memory used by the first one, plus the amount of memory used by FastReport to generate the PDFs on disk, etc...
  8. programmerdelphi2k

    Possible changes to string/char handling in Delphi 11(.2)?

    about translitation: AnsiString = char(1120) ... HELP (my fault dont read all content... // When a literal is assigned to an AnsiString, the compiler will convert that literal to Unicode using the code page of the // AnsiString and then convert that back to literal. This ensures that the AnsiString contains characters valid for its codepage. // If an invalid character is specified, it will be converted to byte "$3F" (question mark) to signal that an invalid byte sequence(s) // was encountered. var ass: AnsiString; begin ass := 'back-door'; <=> ass := AnsiString( Unicode( AnsiString( 'back-door', code-page) ) ) = if same codeS then ass = 'back-door', else = '?'
  9. programmerdelphi2k

    Audio to Text Components

    ok! if I know some I let you know!
  10. programmerdelphi2k

    Clean cache memory after generete fast report

    reflection: Imagine multiplying 500x all objects generated in just one report, and you'll have an idea of how much memory your app needs to run! Note: it doesn't matter if your computer has a lot more memory than that! Your app will only use a limited amount of memory to keep track of the objects it creates or uses!
  11. programmerdelphi2k

    Clean cache memory after generete fast report

    just for my curiosity: --- your original code , works in real world? (of course... no talking about your out-of-memory)
  12. programmerdelphi2k

    Audio to Text Components

    https://blogs.embarcadero.com/this-google-api-easily-adds-powerful-speech-recognition-to-apps/ https://github.com/halilhanbadem/delphi-google-speech-to-text now, if you want just "read the text", you can use the "ISpeechVoice" from MS, just importing it in your IDE, nothing more: Component -> Import component... type library sapi
  13. programmerdelphi2k

    Clean cache memory after generete fast report

    @Zazhir first: YOUR CODE IS, at least: CONFUSED! .. bad! let's start: divide it in "small parts": each part, do some!!! "single responsability" create a procedure for each phase, then, you can work it separately Do not mix Query responsibilities with decision-making responsibilities on data to be used! :< you use: Query; gisOBJECTxxxx ... Exporting to file.... etc... Files procedure .. FInd, Close, etc.... etc... a complete Chaos! if you need "get" some info before generate your "QUERY", AND after this, gerenate your FASTREPORT, then, do it: first "get the info necessary to create your SQL text" do all avaliations necessary here dont put all in a "loop" like your, because if any part needs a long time to process, the report will go wait it for always.... now, create your SQL Text, as expected if all ok above, then you can use your file *.FR3 FastReport to feed it. IF YOU BE USING FireDAC components or not, you can use "PARAMS" from this components to feed it, and many others tasks... then, many code can be "take out" --------- try implement this idea... im using "IF" just for show how would be ... ok? procedure MyDeselectAllInFrmSIG; begin for i := 0 to frmSIG.SIG.Items.Count - 1 do begin if not (TGIS_LayerAbstract(frmSIG.SIG.Items[i]) is TGIS_LayerPixel) then TGIS_LAYERVECTOR(frmSIG.SIG.Items[i]).DeselectAll; end; end; function MyComponentPropertyItsOK( AComp:TGIS_LayerVector; AYourMsgError:string; const AFrmSig: TYourFrmSigType; const ALegtFileName:string; out AErrMsg:string ):boolean; begin result := false; // if not(AComp is TGIS_LayerVector) or (AComp = nil) then begin AErrMsg := 'AComp is not "TGIS_LayerVector" or is nil'); // exit; end; // if not(AFrmSig is TYourFrmSigType) or (AFrmSig = nil) then begin AErrMsg := 'AFrmSig is not "TYourFrmSigType" or is nil'); // exit; end; // if (ALegtFileName='') then AErrMsg := 'ALegtFileName is empty'); // exit; end; // try AComp:= TGIS_LayerVector( AFrmSig.SIG.Get(ALegtFileName) ) then // if Assinged(AComp) then result := true; else AErrMsg := AYourMsgError; except on E:Exception do AErrMsg := E.Message; end; end; procedure YourProcedureXXXXX; var MyErrMsg:string; MyGeoLayerVectorScope:string; LCompOkForUsage:boolean; MyQueryUID:TADOQuery; begin ... // MyDeselectAllInFrmSIG; // MyQueryUID:= TADOQuery.Create(nil); // create just one time!!!! OUT OF LOOPING... MyQueryUID.Connection := xxxxx; // // THIS would can be "into" your looping, but I think that is wrong... because your looping is very big (2000 iterations...) try MyErrMsg:=''; MyGeoLayerVectorScope:=''; // // using this way for show how would be... of course, you can use another approach (right way) if MyComponentPropertyItsOK( geo_layer_vector,'Imove not for use', AFrmSig, 'Imovel.legt', MyErrMsg) then MyGeoLayerVectorScope := 'IMOV_ID_CODPREF = ' +#39+ qryPesq.FieldByName('IMOV_ID_CODPREF').asString+#39; else if MyComponentPropertyItsOK( geo_layer_vector,'Piscine not for use', AFrmSig, 'Piscina.legt', MyErrMsg) then MyGeoLayerVectorScope := 'PISC_ID_CODPREF = ' +#39+ qryPesq.FieldByName('IMOV_ID_CODPREF').asString+#39 else if MyComponentPropertyItsOK( geo_layer_vector,'Lote not for use', AFrmSig, 'Lote.legt', MyErrMsg) then MyGeoLayerVectorScope := 'LOTE_ID_INSCRICAO = ' +#39+ qryPesq.FieldByName('IMOV_ID_CODPREF').asString+#39; // if (MyGeoLayerVectorScope='') then begin ShowYourErrorMessage( MyErrMsg OR AYourMsgError ); // showing Dialog into your "Looping" will go stop all flow... // exit; end; // geo_layer_vector.Scope := MyGeoLayerVectorScope; ... MyQueryUID.Close; // close to reusage! // MyQueryUID.SQL.Text := Format('Select GID from TableX where %s',[MyGeoLayerVectorScope]); ... // now, you FastReport here... then you need to know that any problem in this task will can crash the rest of "loop" query... // ... what to do from forward /// /// finally MyQueryUID.Free; end; end;
  14. programmerdelphi2k

    MSBuild error when switching platforms and try to compile

    BRCC32 is to resource compiling, then, can some resource (*.res, *.ico, etc..) be corrupted or read-only when trying recreate it? if you are using a "git/svn/mercury/etc..." this file can be in use in moment of compilation, by other process, or some like this! then the "res" files cannot be created!
  15. programmerdelphi2k

    Possible changes to string/char handling in Delphi 11(.2)?

    @omnibrain what was the problem, in fact?
  16. programmerdelphi2k

    Clean cache memory after generete fast report

    Well, memory consumption is closely linked to the content of each report, ie the amount of components used and the when of information generated by them. So if you carry or generate a lot of information on each report, say 1 page, 100 pages, etc ... This will be decisive for your final size in memory (RAM or disc). Another factor is the number of consecutive executions and also present in memory while previous reports have not yet been discharged from memory. It would be necessary, perhaps, to determine the maximum memory volume egixide by the highest consumption report, for example. And take this level as a midpoint in the execution of the other reports. But, of course, sharing the 2000 reports into smaller portions of execution could also help. How do you perform this batch of executions? What is your code in the software?
  17. programmerdelphi2k

    FireMonkey designer does not implement Shift-F10 for context menu

    just use the keyboard "Context Menu key"
  18. programmerdelphi2k

    OAuth Authentication Embedded or Standard Browser?

    when "WebView2Loader.dll" is executed, it create a folder in your "Temp" folder with all files necessary to run Edge! like a zip-file uncompressed! for that, you need just this file!
  19. programmerdelphi2k

    Clean cache memory after generete fast report

    First of all, I think you must be adopting the wrong way to generate your batch reports! Of course, if the FastReport component acts as a command that can be executed without needing to wait for its return, then it might mistakenly give you the impression that you can run multiple FastReports in sequence! As if you a "multi-thread" software! I'm not discussing here whether FastReport is multi-threading or not! OK! Just to try to make a comparison with the report above! (run multiple (2000) batch report); On the other hand, running 2000 tasks in an unsecured and uncontrolled manner is, to say the least, a wrong thing to do! But anyway, you're already doing it. So, try to check the component properties to work with the memory in use, because FastReport provides some options! A report and its data can be cached both in memory (to increase speed) and in a file on disk (to reduce RAM usage). There are several types of caching in Fast Report: “TfrxReport.EngineOptions.UseFileCache” - when True the whole text and objects of a built report are saved in a temporary file on disk; “TfrxReport.EngineOptions.MaxMemoSize” sets how many MB are reserved for the report in RAM “TfrxReport.PreviewOptions.PagesInCache” - the number of pages which can be kept in cached memory, which greatly increases preview speed, but uses a lot of memory (especially if there are pictures in the report) “TfrxReport.PreviewOptions.PictureCacheInFile” - when True all pictures in a built report are saved in a temporary file on disk, which greatly reduces memory use in reports that have a large number of pictures; but it reduces the speed
  20. any way, in Registry we have it: He done reference to ...
  21. Nome: designide280.bpl Tamanho: 1894304 bytes (1849 KiB) SHA256: 0fc933dde785368de661ec031580b2ae10d316532fd2c8c1ec2b831dc2605dc8 - 7zip 256 hash
  22. programmerdelphi2k

    What the Delphi 11 version number after november patch ?

    here, Embarcadero® Delphi 11 Version 28.0.46481.1287 in fact, the "loader" is a "BDS.exe"! using or not only Delphi personality, just indicate that the bpl/dll loaded is for this personality! using "RAD Studio", the BDS.exe load all for all personalities! In my case, I always use "only Delphi": C:\RADStudio\RX112\bin\bds.exe "-pDelphi" -np
  23. programmerdelphi2k

    TEdgeBrowser - Problem on destroy

    I don't know if I understood your proposal correctly! Does a VirtualTree start navigation? A VirtualTree is edit URL params (or any other info) for navigation? If so, then you have a conflict of interest here!!! Perhaps, it would be better for you to determine "exactly" when navigation starts. For example, using a boolean flag! TVbrowser: if ICanStartNavegation then begin ICanStartNavegation := false; // again not, please!!! // BrowerXXXX.navegate(...); end; TVEdits: if not ICanStartNavegation then begin editXXX := zzzz; etc... //.... ICanStartNavegation := true; //ok, you navegate now! end;
×