Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 02/21/20 in all areas

  1. Please no... 😄 Even at work we agreed that we'll not use inline variable declarations when we upgraded to 10.3.3. In my humble opinion this feature was utterly useless and will make Pascal code harder to read - at least for me, that is.
  2. Everybody seems to be blogging about Delphi having been around for 25 years, so I won’t stay back and tell some of my story. When I finished university and started a job, Delphi was just about being “born” and I was working with Turbo Pascal and later Visual Basic. VB was great in some aspects because it allowed to easily design user interfaces and write code only where you needed it. It wasn’t after several years later that I was introduced to Delphi when I took a job at fPrint UK Ltd. (Yes, that’s what web pages looked in 1997) and moved from Germany to the UK. The time I worked there was among the best of my life. I had some great coworkers there who were expert software developers ... read on in the blog post.
  3. The bitter-sweet memories are for the archived version of fPrint. I remember my first website I created (it was in the early 2000's though) but browser capabilities did not allow too much freedom (index.html, browserdetect.js, index_ie.html, index_ns.html; anyone? 🙂) and they were kinda similar. The (d)evolution of websites does not apply on it, nor yours. It's the mass: dynamic content loading causing browsers to eat up the memory of NASA's supercomputers, JavaScript attempting to behave like a real programming language, ads, consents, facebook integration with everything so you can't check an article without a profile (or registering), stuff like this. Things were much more simple in the early days.
  4. Angus Robertson

    FTP add virtual directory

    You can start reading at https://www.iis.net/overview/control/powerfuladmintools I'm just looking at WMI scripting for controlling IIS. Setting up a virtual directory through IIS admin is easy. Angus
  5. No need to export anything - JIRA has excellent charting - examples:
  6. Here is a variation I use - I like type safety. type Setting = record i: integer; s: string; d: double; constructor Create(const _i: integer; _s: string; _d:double); end; Option = record const One: Setting = (i:1; s:'First'; d:0.01); Two: Setting = (i:2; s:'Second'; d:0.02); Three: Setting = (i:3; s:'Third'; d:0.03); class function Add(const _i: integer; _s: string; _d:double): Setting; static; // Sugar end; constructor Setting.Create(const _i: integer; _s: string; _d: double); begin i := _i; s := _s; d := _d; end; class function Option.Add(const _i: integer; _s: string; _d: double): Setting; begin Result := Setting.Create(_i, _s, _d); end; procedure Foo(const Options: TArray<Setting>); begin for var Option: Setting in Options do if Option.i in [2, 4] then Writeln(Format('i:%d s:%s d:%f', [Option.i, Option.s, Option.d])); end; procedure TestFoo; begin Foo([Option.One, Option.Two, Option.Three, Option.Add(4,'Fourth',0.04)]); end;
  7. aehimself

    How to Code SQL IN Statement correctly

    Be careful with DB engine limitations. I can not count how many times my code failed, because Oracle can't handle more than 1000 entries in a single IN operator. I wrote a method to create the IN statement for me, which breaks the array up to chunks of 900: ( IDFIELD IN (:pVal1, :pVal2, [...], :pVal900) OR IDFIELD IN (:pVar901, :pVar902, ...) )
  8. Open array of record, using a function or record constructor to populate new instances of that record. Syntax support for initialization is a bit crappy in Delphi sadly.
  9. I don't like it either. Like everyone else I would love for every bug to be fixed yesterday, the compiler to produce better code, the VCL and RTL to support all the new shiny stuff and that my wife was 20 again. I'm assuming Embarcadero has the same wishes (Okay, maybe they don't care about my wife) but obviously their first priority is to make money. They're not in it for the Karma. I myself used to be very vocal in the field test newsgroups in my critique of the decisions made by the various owners of Delphi during the years, to the point that I was asked not to participate in the field tests. So it's not like I don't understand the frustration or the need to vent it. However I also know that I don't know all about why they make the decisions they do. If I were in their shoes I might make the exact same decisions. Of course they make mistakes. They make huge mistakes sometimes *cough* Delphi 8 *cough*. That is obvious to all. But it gets really tiresome to constantly read this whining about how bad Delphi is or how evil Embarcadero are. It's leading nowhere. Not a day goes by that I don't curse some part of Delphi to hell, but at the same time Delphi has payed for my house, my cars, my children's education and all my vacations. Anyway, this has nothing to do with hash tables. Sorry for hijacking the thread.
  10. Wloochacz

    How to Code SQL IN Statement correctly

    Use the macro! 😉 fQ.SQL.Text := 'SELECT * FROM tTableName WHERE Status IN (!InValues) ORDER BY EventDate'; fQ.MacroByName('InValues').AsRaw := '''S'', ''R'''; fQ.Open;
  11. And meanwhile we are sitting here, money just falling out of our *nus, which we gladly forward to emba just for being collective responsible for whatever
  12. It is a non stop optimizing and refactoring ... Never ending story 😉
  13. As a serious software developer you have to constantly refactor and improve your code.
×