Jump to content

Vandrovnik

Members
  • Content Count

    583
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by Vandrovnik


  1. 6 minutes ago, ertank said:

    BTW, if you check the error message in my second post above, it is trying to load a DLL file in another directory (which is EXE directory) and saying file does not exists. Indeed there is no such file with EXE file and I am trying to figure an INI parameter to provide location of that file. If I copy just fbclient.dll file from C:\Program Files\Firebird\Firebird_2_5\WOW64 next to EXE and it works just fine.

    Sorry, I did not see it.


  2. 45 minutes ago, Anders Melander said:

    RAM disks... Didn't we stop using those along with DOS and Windows 95?

    Of course a dedicated physical RAM disk device will always be faster than an SSD but if you're allocating main system memory for use as a virtual RAM disk device then I think it would be better to let the OS manage the memory. It will use the memory to cache files when the memory isn't needed elsewhere.

    From 18 GB RAM, 0,5 GB is dedicated to RAM disk, so this is negligible... I prefer to write .dcus there, so that it does not write again and again to SSD, it is faster and .dcus are always fresh.

    • Like 1

  3. 2 hours ago, FPiette said:

    To remove that warning, go to menu, project, options, building, Delphi compiler, hints and warnings and expand output warnings and set platform symbol to false.

     

    There are also directives for these warnings:

    {$WARN UNIT_PLATFORM OFF}
    {$WARN SYMBOL_PLATFORM OFF}

     

    • Like 1

  4. You can create a method (of that record) for reading data from a stream, for example. In that method, you use Stream.Read(flags, sizeof(flags))...

    To read the string, you probably have to read byte by byte and check, whether it is zero. Do not forget that size of the char is 2 bytes (in Unicode Delphi).


  5. May be instead of

    SELECT SUM(IM.TRS)TRS, SUM(IM.INCOME)INCOME, SUM(IM.OUTGO)OUTGO

    should be just

    SELECT SUM(IM.TRS), SUM(IM.INCOME), SUM(IM.OUTGO)

    ?

     

    The JOIN - I alway specify what kind of join I want, such as LEFT OUTER JOIN, because I am never sure, what is the default 🙂


  6. 24 minutes ago, David Heffernan said:

    This seems like choosing a library, and then trying to work out how to fit that library to the problem. That's the wrong way round. One should first understand the problem space, its requirements and constraints, and then find the best solution. 

     

    Problem first, then solution. Not the other way round. 

    I did not suggest OpenGL, I just wrote that it works fine for raster graphics ("It's for a mapping project so it involves tiling, overlaying grids and bitmaps.").


  7. 47 minutes ago, Anders Melander said:

    I do not think that it can compete when it comes to raster graphics which I think is what Mike is asking for.

    In OpenGL, he can work with raster graphics really fast and easy - he just loads them as textures.

    But writing text and printing will not be so easy, if they are needed.

    • Like 1

  8. 22 minutes ago, Serge_G said:

    How did you manage that ?

     

    Well, it was not a clean work... I am using IBX components. I took IBX.IBIntf.pas, created AndroidIBIntf.pas from it.

    From TIBServerLibrary I have created my TAndroidIBServerLibrary and made a few modifications:

    • In .LoadIBLibrary, I copy Firebird's files from IncludeTrailingPathDelimiter(tPath.GetDocumentsPath)+FbDynClientAssetsDirectory to IncludeTrailingPathDelimiter(tPath.GetHomePath)+FbDynClientRunDirectory, because I did not manage it to work from original path.
    • In initialization, I set environment variables FIREBIRD_TMP and FIREBIRD_LOCK to a folder inside of tPath.GetTempPath
    • In .LibraryName, I return path to libfbclient.so

     

     


  9. 38 minutes ago, Kas Ob. said:

    Exactly, RDX:RAX is 128 bit, so if he is doing mod "value <= 2^64" then there is no point doing the division using 128 instead of 64bit.

    But when divisor is 64bit, he has to use the "128 bits divide by 64 bits", because, as far as I know, there is no instruction for "64 bits divide by 64 bits", or is there?


  10. 24 minutes ago, Lars Fosdal said:

    A pitfall with Enums is that they are so easy to change.  Add another member in the middle of the list, and you have changed the ordinal value of the rest.

    This is fine if you only use the enumerated reference inside your application, but if you use the ordinal - f.x. when saving to/retrieving from a database, or when transmitting to another system - you get into trouble.

     

     

    You can use:

    type tTestEnum = (None=0, One=1, Eight=8);

     


  11. 3 minutes ago, Fr0sT.Brutal said:

    +1. The most useful and powerful Delphi feature which I miss in other languages. These bunches of constants are just ugly and - what's more important - they do not allow type checking.

    Exactly - my most stupid and most difficult to find mistakes in OpenGL came from using wrong constant (with similar name to the correct one).

×