Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/16/21 in all areas

  1. As David wrote, mORMot has a 3 license - if you use MPL it is very commercial-project-friendly. TL&LR: Nothing to pay, just mention somewhere in your software that you used it, and publish any modification you may do to the source code. Another article worth looking at: https://www.delphitools.info/2015/03/17/long-strings-hash-vs-sorted-vs-unsorted/ It depends what you expect. Also note that for long strings, hashing may have a cost - this is why we implemented https://blog.synopse.info/?post/2021/02/12/New-AesNiHash-for-mORMot-2
  2. You can license mormot under MPL which is fine for use in a commercial product.
  3. When I saw the release notes on 10.4.2 and read that TEdgeBrowser now works with the GA Edge, I got excited. I thought it means you have Windows 10 installed with Edge and it works. Well, unfortunately it's not the case, What it means is that you no longer need the Canary edition, you simply can download the runtime from Microsoft's website. In all cases, you need WebView2.dll. It can come from GetIt, or you can download and extract the .NuGet package from Microsoft. You'll find the DLL under build\native folder. Next, download the WebView2 Runtime. Evergreen is the easiest, it downloads and keeps a system wide runtime up-to-date. If you choose this, you are set and ready, everything should work. If you choose the fixed version, things will be a bit different, as you have to tell TEdgeBrowser where to look for the files. Extract the fixed version, and simply add EdgeBrowser1.BrowserExecutableFolder := 'C:\Users\user\Downloads\Microsoft.WebView2.FixedVersionRuntime.89.0.774.54.x86'; before the .Navigate. All set, right? Nah. Embarcadero simply forgot about the TWebBrowser component, which can use Edge mode, but it does not publish this property - so normally it can only be used with Evergreen editions. Fortunately though, this can be fixed with the usual dirty hack: Type THackBrowser = Class(TWebBrowser); procedure TForm2.FormCreate(Sender: TObject); begin // EdgeBrowser1.BrowserExecutableFolder := 'C:\Users\user\Downloads\Microsoft.WebView2.FixedVersionRuntime.89.0.774.54.x86'; THackBrowser(WebBrowser1).GetEdgeInterface.BrowserExecutableFolder := 'C:\Users\user\Downloads\Microsoft.WebView2.FixedVersionRuntime.89.0.774.54.x86'; WebBrowser1.Navigate('https://www.whatismybrowser.com/'); end; Now, you can give your users the freedom. If they decide to download the Edge Runtime, your application will use Edge engine. If not, it still works in IE11 mode. Just don't forget to set FEATURE_BROWSER_EMULATION in the registry 🙂 Hope it helps others!
  4. Lajos Juhász

    Upgrade 10.3 to 10.4

    Yo can download it from the new portal: https://my.embarcadero.com/
  5. Dalija Prasnikar

    Upgrade 10.3 to 10.4

    You don't need to uninstall 10.3 or older versions. 10.4 can coexist with them. Installer will probably recognize your existing license. And ask you if you want to use it. If it does not recognize it, they it will ask you for serial number and you will need to go through online activation process.
  6. Vincent Parrett

    DPM Package Manager Progress - 15 March 2021

    Hi All As a follow up to the previous post, I have uploaded a new build : https://github.com/DelphiPackageManager/DPM/releases/tag/v0.1.64-alpha This build has a dramatic performance improvement when it comes to adding nodes to the Project Manager tree - it now has very little impact on project load times. Achieved by caching Rtti.
  7. Hi All Some changes with the IDE integration this week. I was unsatisfied with how the IDE plugin behaved when working with large project groups, because the Messages View doesn't show until the project group has loaded. When restoring the first time on a machine that didn't have the packages, this resulted in a potentially long period (depending on how many packages need to be installed/compiled) where no status info is available to what's going on, making it appear as though the IDE had hung. So I decided to use a window (not modal) to show the log view as the projects are loading and packages restoring. I created a custom LogMemo component to show this since I couldn't find one that suited - fortunately I already had some code to base it off (VSoft.VirtualListView). The log window will auto close after a few seconds if the restore/install/uninstall succeeds, you can configure that auto close time in the options. I also added options so you can control when the log view shows. Lastly, I added an option to not add DPM nodes to the project manager tree. On large project groups (the FinalBuilder project group has over 100 projects) it causes a long delay before the IDE is ready to use. This is because of how I had to hack into the IDE to add the nodes, the code is not at all efficient. When time permits I'll revisit this and see if I can find a better way. https://github.com/DelphiPackageManager/DPM/releases/tag/v0.1.63-alpha
  8. David Schwartz

    How to gracefully get rid of the use of dictionaries?

    Code is supposed to reflect your design goals. I get nervous whenever someone tries explaining their design with code. I still don't know what you're trying to accomplish here other than change your code somehow. Are you familiar with Einstein's famous quote: "You cannot solve a problem at the same level of logic used to create it"? You showed us some code, assert there's a problem, then ask how to rewrite the code to solve this supposed problem without explaining a larger context. Several people made guesses based on assumptions they all had to make, but none of us really know for sure what the problem really is. I mean ... I do not understand why the dictionaries are there in the first place either.
  9. Not entirely true. There is a property "SelectedEngine" and "ActiveEngine", but as usual, there is no documentation: SHDocVw.TWebBrowser.SelectedEngine - RAD Studio API Documentation (embarcadero.com) You can, however, read a bit about it here: Using TEdgeBrowser Component and Changes to the TWebBrowser Component - RAD Studio (embarcadero.com) PS: As far as I remember, if you chose to ship your own, fixed runtime, you can also set an environment variable in your process and the Edge runtime will pick it up: Globals | Microsoft Docs
  10. Doesn't work well on this project - feel free to analyse my code and tell me what I did wrong 😉 https://github.com/DelphiPackageManager/DPM If the code is too complex for the tooling, then the tooling needs improving, valid compiling code should not be a problem.
  11. CoMPi74

    ERD tool needed!

    Thank you very much! All of you! I did not even realize that there exists so many tools for that. I tried to use all suggested apps but most of them failed. More precisely, I failed because, as I suppose, I did not use it properly. Anyway, finally I used DBeaver and DbSchema (Free edition). Both works as expected and were able to prepare ER Diagrams for PostgreSQL schema with 500+ tables. It looks astonish, really. A small example, generated by DbSchema, can be seen below. 🙂 Thank a lot again. Piotr
  12. Markus Kinzler

    ERD tool needed!

    https://pgmodeler.io/ https://github.com/mirkosertic/MogwaiERDesignerNG https://sourceforge.net/projects/dbdesigner-fork/ https://www.datensen.com/er-diagram/free-er-diagram-tool-moon-modeler.html http://www.modelsphere.com/org/index.html
  13. We are glad to announce that StyleControls VCL v. 4.82 is released! http://www.almdev.com StyleControls VCL is a powerful, stable package of components, which uses Classic drawing, system Themes, GDI+ and VCL Styles. This package contains the unique solutions to extend standard VCL controls and also has many unique, advanced controls to create applications with UWP / Fluent UI design. In the new version, we have added the new features that our customers asked for. With StyleControls you can create really modern application with strandard or Fluent / UWP UI (100+ components). This library is the really cool to create UI core and then can be used with any third-party controls. Adjusting of Fluent form is really flexible. You can adjust controls on it as you want, you can define opacity areas with specific properties of parent controls and put any third-party control on it (TMS or DevEx). Unique solution in our controls allows you to create multi-level transparency, which works faster. It's really needed to use on Fluent UI Blur background. Demos show how you can enable / disable Fluent UI Blur background and adjust controls on the fly (you can run all our Fluent demos and on Windows XP). With StyleControls VCL you can combine using of themed and GDI+ (TscGP...) controls. All of them perfectly support VCL Styles, have High-DPI support and per-control styling. Themed controls, like TscListView, TscTreeView, TscListBox, TscComboBox, have full colors customization and have full support of VCL styles, including selection, lines, arrows and all other elements.
  14. Serge_G

    ERD tool needed!

    What about free DBeaver ? https://dbeaver.io/
  15. I re-ran with TSynDictionary to verify again, and it's much faster versus TDictionary for string searches, not so much for integers. But seems to be pretty much same performance in 32bit and 64 bit! 32bit: 64bit:
  16. You still have not said what your use case is. My own need for fast string lookup (and finding either an integer or a pointer), is principally to load once, lookup many times, and I am not too concerned about memory usage or load time. The task usually is to handle up to a couple of hundred strings of about 25 to 200 characters. For this I have long used a ternary search tree, which I first learnt about from Dr Dobbs Journal, April 1998. I adapted the C version for Delphi 1, I think, and by now the lookup supports Unicode strings I cannot post useful timings, because you cannot compare my environment to yours, but I just did a test load of quarter of a million random 64-character strings into the tree in 390ms. The speed of lookup is what matters to me and this is too fast to bother to benchmark it. But those 250k strings (far more than I need in practice) took a tree size of 116MB. Whether this search method would be useful to you depends on how you value load speed and memory against lookup time. Lookup time may not the only thing you should be considering.
  17. It does matter - if your ID values for example are in a certain range maybe even starting at 1 you could get O(1) access if you used them simply as index in the array itself. I don't know what that means - but talking about at most 10k records with strings up to 30 characters looking up one of those is certainly within the ms if not ns range.
  18. No surprise there - linear search is O(n), binary search is O(log n) and hash table is O(1), what you see with the differences for certain number of records are the different constant factors - building a hash has a certain cost which is why TDict is slower up to a certain point - this depends on the hash algorithm being used - indirections being caused by extra function calls like IEqualityComparer.GetHashCode and the memory layout of the hash table. You can even see that it's not strictly O(1) as it gets a little slower the more records you have which I would guess is due to memory layout within the hashtable where at a certain point memory access time kicks in because the data does not fit in the fast cache anymore (access pattern of the benchmarking code matters there as well). Without specifying the exact use cases it's hard to give any suggestions - is the data one time fill and then only lookup, is data being changed after - adding/removing records, is data within the records changing. Whats the typical lookup pattern - is data being looked up randomly or in certain patterns (such as ID or Name sequences in certain order). If you aim for maximum performance a custom data structure and algorithm will always win over some standard algorithm by a few percent - the question is if you want to do all that work including risking bugs for that negligible few percent or use some standard data structures and algorithms that are proven to work and easy to be applicable.
  19. UPDATE - I found a fix/workaround. It appears the order of the packages matter now in project options. I changed the order of the packages from vcl;rtl;vclx -> rtl;vcl;vclx and the problem is solved. This worked fine in 10.2 so some changes must have been made to how packages are loaded/found.
  20. @pyscripter Sometimes Im wondering what made Python so popular in the first place. Now I know, it was PyScripter IDE
  21. Hey, I just noted that my dzlib is missing from that list. 😉 Thanks for the hints.
  22. Arnaud Bouchez

    UltraCode64 for Delphi (aka 64-bit FastCode)

    First step may be to write faster code in pure pascal, with the associated tests. Then add some asm version, and see if it is actually faster. There is already a lot of code in http://mormot.net SynCommons.pas which has faster alternatives than the Delphi version. But two remarks: 1. I wouldn't stick to 64-bit - do why call it UltraCode64 ? 2. FPC compatibility could be very beneficial - as we did for mORMot.
  23. I have the same problem, finally I switched to "Delphi (Classic Code Insight)" and it works fine. But now it's a bit annoying that after doing a "Find Declaration" in the Code Editor, the cursor every two seconds shows the hourglass.
  24. It doesn't work if your search path only has the dcu's or dcp's - which if you use runtime packages is quite likely. I have turned LSP off, but sadly 10.4 cripples the old code insight somewhat and navigating my code has become a real chore.
×