-
Content Count
597 -
Joined
-
Last visited
-
Days Won
7
Everything posted by Tommi Prami
-
Delphi Daily WTF / Antipattern / Stupid code thread
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
IntToStr(LDataSet.AsInteger); Could use AsString directly. -
Delphi Daily WTF / Antipattern / Stupid code thread
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
try ... finally end; Empty finally blocks, maybe .free call is missing or after refactoring it has become obsolete but left behind. Not sure can the compiler optimize that out, that seems to me unneeded code that should be removed or fixed other way. -
Delphi Daily WTF / Antipattern / Stupid code thread
Tommi Prami replied to Tommi Prami's topic in RTL and Delphi Object Pascal
if A > B then; ... if A > B then A := B else; Semicolon right after the then or else is legal syntax, and can be used rightly, but I think those are possible point of errors and not easy to spot -
StrToFloat () all combinations of decimal separator and lang. settings
Tommi Prami replied to bernhard_LA's topic in Algorithms, Data Structures and Class Design
Has to be handled anyways. -Tee- -
StrToFloat () all combinations of decimal separator and lang. settings
Tommi Prami replied to bernhard_LA's topic in Algorithms, Data Structures and Class Design
When Thousand separators come into play, it starts to get almost impossible, (At least in here). 1,006.66 or 1 006,66 or 1 006.66 etc... And if sometimes there are no decimals. How to fix US version without decimals 1,006 and Finnish ones with them 6,66. As far as I know there can't be universal routine to rule them all. US I think thousand separator is Comma, here it is decimal separator. THis is one of the places there would have been nice to have global standard, and only one π -Tee- -
Seems that "Parnassus" plugins are not available for it on GetIt, Bookmarks make IDE so much better, would love to have it on home computer also, but I manage, if David Millington happens to read this, try to get those in GetIt for Community edition also. -Tee-
-
This happens sometimes
-
Fastest Way to Read / Parse a large JSON File?
Tommi Prami replied to Steve Maughan's topic in Algorithms, Data Structures and Class Design
Has anyone done any benchmarking lately on JSON libs? Ones I have seen are bit old I think. (I am not needing one right now, but would be good for the community if someone woulΓΆd do something like that) .Tee. -
TFDQuery (Master/Detail) with CachedUpdates Too Slow on Delphi 10.4.2
Tommi Prami replied to dataol's topic in Databases
Please Update Ticket: https://quality.embarcadero.com/browse/RSP-34302 And/Or make new one, if you can pinpoint the exact cause of the slowdown. (If it is actually true performance regression between those Delphi versions) -tee- -
I bet that using JPEGImg.Scale:=js* Is really fast but not sure how good visual quality will it have. Bitmap32 library has good quality Resamplers but for sure it'll take way longer than that. -Tee-
-
Same person.
-
File Copy implementation with Progress Callback
Tommi Prami posted a topic in Algorithms, Data Structures and Class Design
I know it is quite simple thing to do, but still would preferably use some already tested implementation. Does any Delphi Lib have such a routine? -Tee- -
File Copy implementation with Progress Callback
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Using CopyFileEx with quick and dirty simplem,entation, fixed my problem, more than less.. I bet dzlib one is not as crude as mine, have to check that out... -Tee- -
File Copy implementation with Progress Callback
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
Nice... Have to check out that... -Tee- -
File Copy implementation with Progress Callback
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
That raise : if not DoCopy(SourceFileName, DestFileName, Overwrite) then raise EInOutError.Create(SysErrorMessage(GetLastError)); -
File Copy implementation with Progress Callback
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
What is the point of this Exception? And how to handle it π IT sems that Actually file is not copied π This is so weird π -Tee- -
File Copy implementation with Progress Callback
Tommi Prami replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
I need to have one in the Command Line APP. Most likely it'll be OK for me to use TFile.Copy, as this small utility will run in one single machine. But had got interesting errors while testing it just now over Slow 4G connection and VPN. Did not take screenshots but one was something like "Operation failed successfully" or something similar weirdness. And network path disappeared underneath and so on. Now that Schools are out my Internet bandwidth in here in rural areas of Finland plummeted totally. All house wifes watching PiornHUB and kids YouTube, I think. -
Introducing Spring.Benchmark - a port of Google benchmark
Tommi Prami replied to Stefan Glienke's topic in Tips / Blogs / Tutorials / Videos
To make results easier to read, could the numbers have thousand separators? At least for me it is hard to compare two numbers if they aren't next to each other: 23432422 .... .... .... .... .... .... ... .... ... 4343241 Are they even at same ballpark. Some people have very good eye on are things on same line, for me it is almost impossible π -Tee- -
Out parameter is read before set
Tommi Prami replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
Very glad to everyone that brought this in my attention. Did not know all this. Now just have to remember this. -Tee- -
Is anyone using it or planning on migration? Don't know personally nothing about those (basically), but if anyone has info about that project and using would be nice to know. "Tools" we use now on our internal Infra are: SVN Jenkins Mantis And most likely result would be Azure DevOps GIT (Possibly Jenkins if makes sense, but maybe not) -Tee-
-
Stumbled upon this. https://github.com/WilliCommer/ArrayHelper This really should be part of RTL already. Good job from author, If in RTL would not need add unit to the uses. (OR paste unit of one's own but...) -Tee-
-
Overloocked Format( ) options
Tommi Prami replied to Rollo62's topic in RTL and Delphi Object Pascal
FixInsight tries to check Format strings and parameter count, which is nice. Not checking types I think. Have found couple of bugs with it. -Tee- -
Dang π My Bad.
-
I've got the same problem
-
Good quality Random number generator implementation
Tommi Prami posted a topic in Algorithms, Data Structures and Class Design
Could someone point into nice implementation? Would be nice (but not 100% necessary) that would have similar functionality than RTL version have. More than less drop in replacement (Easy to port) -Tee-