Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/08/22 in all areas

  1. only in the form "(import some-library-that-will-do-all-the-work).run()"
  2. You forgot the "...which in turn import a ton of more libraries all of which may or may not contain some serious security issues" part 😉
  3. TheDelphiCoder

    Feature Request #93

    Hi @dummzeuch, in case you missed it, I submitted a patch file for FR #93 on the SF repository. Best regards, Thomas
  4. Hi all, I had some trouble in the last days after updating from D11 to D11.1 and I want to share if could help some one (maybe someone already wrote about this). In a 64bit VCL program I'm using legacy code that before 11.1 worked without errors. In D11.1 Emb introduces new Windows PE security flags in linker options and in particular a couple of them related to ASLR (https://blog.marcocantu.com/blog/rad111_pe_security.html). These flags are enabled by default and in my case, on legacy code (bad written), leads to random access violations. For "bad" code I mean do hard cast on pointers for instance something like this: "pointer(integer(PrinterInfo) + SizeOf(TPrinterInfo4));". Disabling the new ASLR linker flags the win64 app works but I guess that should be better to refactor that kind of code.
  5. Uwe Raabe

    opendialog.initaldir

    This is expected and even documented (see Windows7 item 1):
  6. :))) Hugo : I like photography, but I don't have too much time too, but the project looks interesting !! Note: on the website you provided, the sources are not downloadable (Broken link) I also allow myself to try to "translate the joke" of Frost to help you, Hugo (As I understand, your are not developer) : - Python is a language that mainly calls libraries, written in languages like c, c++, pascal (or any other archetypal language) - Python therefore allows easy access to an underlying complexity. *But*, this complexity is hidden in libraries. No magic. - So, in your case, rewriting in python what your program does is total nonsense : It would it be 1000 times slower, it wouldn't be necessarily simpler, and it would be as verbose as it is now. And many times more weak, technically/support speaking. Ultimately, you would have to make a library of the "business" points of your program, then, it'll allow an "easy" access with python. That would make sense. But that's up for discussion, and it more a strategic question. That said, in your case, I would rather advise to begin to put your project on github (or other), in order to potentially interest other devs? cheers, and good luck for this nice project.
  7. Renate Schaaf

    Parallel Resampling of (VCL-) Bitmaps

    I'm too stupid to create a pull-request on GitHub, if I read the help for it, I don't understand the first thing about it. Somehow I can post changes to my own repository using GitHub-Desktop, but I don't really understand what it's doing :). So here is the changed GR32_Resamplers.pas. I personally think the quality is good enough, on Ultra-High DPI I can hardly see the difference between a low-quality and high-quality filter for "normal" images, glyphs are another story. For me the filters kick in when animating pictures by zooms and pans, the artifacts then really show up. Theoretically the quality could be improved by a higher precision of the weights, which currently run from -256 to 256. Up to $800 should be possible, which I have done for the none-premultiply-modes. But again, I have a hard time seeing a difference. Also, again theoretically, the algorithm using antiderivates of filters should yield better results (except there isn't any in closed form for the Lanczos). But though I can see less artifacts, they decrease details, as you have seen. I've probably made some mistake in the implementation. It could be the same kind of mistake you can make by computing numerical derivatives, Small divided by Small. Time to hit the sack. Renate GR32_Resamplers.zip
  8. Remy Lebeau

    Delphi JSON data to listbox

    You did not show the complete JSON, so the below example is incomplete, but it should give you an idea of what you need: uses ..., System.JSON; ... var Root, Value: TJSONValue; Obj: TJSONObject; Arr: TJSONArray; I: Integer; begin ListBox1.Items.Clear; Root := TJSONObject.ParseJSONValue(...); try Obj := ...; // get a pointer to the parent object first as needed, then... Arr := Obj.GetValue('line_items') as TJSONArray; for Value in Arr do begin Obj := Value as TJSONObject; ListBox1.Items.Add(Obj.Get('name').Value); end; finally Root.Free; end; end;
  9. aehimself

    TThreadedTimer

    In some occasions the inaccuracy of Delphi's TTimer cased serious headaches so I did some digging and found an old post on how to turn a thread into a much more accurate timer. While I analyzed the code to find out how it works I made some comments and also took the liberty to change it here and there... and wrapped the whole thing in a TComponent which easily can be installed in the IDE and dropped on almost anything. The TThreadedTimer's OnTimer event runs in the VCL thread so any UI element can be manipulated from there. It is also a drop-in replacement for TTimer, meaning you change your DFM and PAS and it should work exactly the same way. My version delays enabling the thread so it won't spin freely until it has an event handler, properly resets the timing sequence if the Timer is set to Disabled and then Enabled again and also - in theory - the OnTimer event will no longer fire during destruction. Being a Windows-only guy it relies on WinApi, but I guess it can be made cross-platform by using Delphi's own TEvent class... as it yields zero benefits I didn't care to look into it. As the original idea wasn't mine the right thing to do is to release this version under the do-whatever-you-want license. Feel free to use, point out possible issues or modify it to fit your needs. God bless open source 🙂 uThreadedTimer.7z
×