Jump to content

rvk

Members
  • Content Count

    126
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by rvk


  1. 39 minutes ago, karl Jonson said:

    I would like to do this:

    ValidateStudentAnswers(100) => result : valid

    ValidateStudentAnswers(101) => result : not valid

    Something simple like this will at least check (2) and (3). It won't check (1) but that should be done at entry (only allow unique student/answer combinations).

    select student, if((count(*)>1) and (max(answer)>7), 'INVALID', 'Valid') as Result
    from data1
    group by student

    https://dbfiddle.uk/d-QSR_4l

     

    student Result
    100 Valid
    101 INVALID

     

    If you really want to check (1) you can do it with a sub-select with count on total number of answers and total number of unique answers.

     

    Something like:

    select student, if((sum(cnt)<>count(*)) or ((count(*)>1) and (max(answer)>7)), 'INVALID', 'Valid') as Result
    from
    (  
      select student, answer, count(*) as cnt
      from data1
      group by student, answer
    ) as sub
    group by student

    https://dbfiddle.uk/B3JmU1_S 

    student Result
    100 Valid
    101 INVALID
    102 INVALID
    103 Valid
    104 INVALID

     

     

     

    • Like 1
    • Thanks 1

  2. 48 minutes ago, Vandrovnik said:

    I believe PDF from SynPDF is PDFA-1A, too. In source, I have:

    
      lPdf.PDFA1 := true;

    Ah, yes, I missed that. There are several online validators and the ones I tried first said they were not PDFA. But others did.

     

    Included Color profile:

    TestSynPdf: ColorSync color profile 2.1, type ADBE, RGB/XYZ-mntr device by ADBE, 560 bytes, 11-8-2000 19:51:59 "Adobe RGB (1998)"

    TestFastReport: Microsoft color profile 2.1, type Lino, RGB/XYZ-mntr device, IEC/sRGB model by HP, 3144 bytes, 9-2-1998 6:49:00 "sRGB IEC61966-2.1"
     

    I think you would need to "hack" SynPDF to include a different profile (at least as I can see there is no property for it yet).

     

    On 10/30/2022 at 10:29 AM, Vandrovnik said:

    RGB of the left bottom square should be 191, 0, 255, but is 223, 0, 255 using SynPdf

    Is there a right and wrong in this?

    I found some source:

    large.icc:   ColorSync color profile 2.1, type APPL, RGB/Lab-prtr device by bICC, 1613600 bytes, 30-8-2007 17:29:41 "MOAB Anasazi Canvas IPF5000.icc"
    middle.icc:  Microsoft color profile 2.1, type Lino, RGB/XYZ-mntr device, IEC/sRGB model by HP, 3144 bytes, 9-2-1998 6:49:00 "sRGB IEC61966-2.1"
    small.icc:   ColorSync color profile 2.1, type ADBE, RGB/XYZ-mntr device by ADBE, 560 bytes, 3-6-1999, relative colorimetric "Adobe RGB (1998)"
     

    So SynPDF uses the small.icc (560 bytes) and FastReport uses middle.icc (3144 bytes).

     


  3. If it's just some values you need it might be easier to just extract the .xlsx and read the values from the sheet1.xml.

    Also changing them (and rezipping them to a new .xlsx) won't be a problem.

     

    Adding value might become somewhat more difficult and needs some understanding of the xml structures.

     

    • Like 1

  4. 1 minute ago, Fr0sT.Brutal said:

    No. Top-level procedures could have any folding level and there could be fragments of any folding level which I do not want to fold. And I obviously don't want to count which folding level I'm currently on (so this 1-9 hotkeys are absolutely useless feature IMHO).

    Which shortkey do you use for that in Delphi?

     

    Alt+Shift+- and Alt+Shift+= will fold and unfold at the cursor.

     


  5. 17 minutes ago, Fr0sT.Brutal said:

    Duh. Sorry for unclear phrase. I meant "Fold ALL procedures" hotkey which I use frequently in Delphi.

    Can't you find these in the options?

    Tools > Options > Editor > Key mappings

    (search for fold)

     

    Alt+Shift+1 / 9 and Alt+Shift+0

     

    Or does this not do what you want?

     

    fDVaw1I.png


  6. 38 minutes ago, Philip Ostle said:

    every time that you try to register (and presumably, every time you run delphi), it deletes these '.corrupted' files and re-makes them

    I was hoping it would only rename them on a succesful registration. Not on every failed registration. With a failed registration it would be useless to make a copy of an already non-working license-file.

     

    Bummer 😞

     

    (BTW it doesn't delete .corrupted on every run of Delphi. I suggested it here to someone and they got it working, probably also after trying several times.)

     


  7. On 9/17/2022 at 7:59 AM, Philip Ostle said:

    I've been through that with all the .slp files using both the new and old computer names (in upper and lower case). No joy.

    Like Lajos already mentioned... the license could also be bound to the username (on first run). Is your username also the same?

     

    (If not, try it with the correct username and hostname and rename the .corrupted again. The .corrupted could be the ones from before Delphi tried it with the new hostname.)

     

     


  8. On 9/16/2022 at 5:50 PM, Philip Ostle said:

    I only have these .slp Files (but have no idea what to do with them, or whether I should even try)

     

    C:\ProgramData\Embarcadero

        .2026_50.1661798390517.slp

        .2026_50.1661868971833.slp

        .2026_50.1662218526007.slp

        .cgb_license

        .cgb_license.corrupted

        /.Licenses

            .cg_license

            .cg_license.corrupted

            license-manager.ini

            /deleted

               .4024_17.1662424776925.slp

    Hey, you have the .corrupted files there.

    Have you tried copying the .corrupted files over the .cgb_license ones? (after securing the entire directory of course and after renaming the PC back to its original name)

     


  9. 40 minutes ago, Lajos Juhász said:

    I have to warn you that this is a bug in MS Richedit implementation. I've entered into Microsoft Word using Courier New 11 ──────────────────────────────. No problem there, then copied to the clipboard and pasted to Wordpad.exe the result wordpad changed the font to Segoe UI Symbol 11.

    Pff. It's one of the reasons I still ship a RICHED20.DLL with my program.

    Although not advised (and even not allowed), the many versions of riched20.dll all have their own problems.

    If it's not alignment issues (resetting back to left align-tab after a right alignment tab) then it's some font issue (and there are lots of other issues).

    I was so fed up with it (I never knew which one was shipped with Windows and which one was loaded at the client) that I took one for which I knew what issues there were and could program against that.

     


  10. Yikes. Mixing UTF8 (from direct source code) and Unicode is asking for trouble.

    And Alt+205... what is that? You need to work with exact correct encoding.

    Doing Alt+205 might insert a complete other character in the code editor.

    When I open your Unit1.pas, I get a square with a line through it for your "alt 205" character.

     

    Try this:

    add('DDD' + Widechar(#$2550) + Widechar(#$2550) + Widechar(#$2550) + Widechar(#$2550) + Widechar(#$2550) + 'DDD');

     


  11. On 8/24/2022 at 1:16 AM, Ralf7 said:

    Under C:\ProgramData\Embarcadero\.licenses I found the file --> .cgb_license.corrupted

    Yeah, that will do it. Rendering your version unlicensed.

     

    I found this:

    Quote

     

    I had a similar problem when renaming my Windows 10 computer. Apparently the license is bound to the computer name. I had to re-register Delphi after renaming my computer but failed because of the limit of my license key. Solution was renaming back my computer and renaming C:\ProgramData\Embarcadero\.cgb_license.corrupted and C:\ProgramData\Embarcadero\.licenses\.cg_license.corrupted to files without the .corrupted as suffix. My licence slip file was C:\ProgramData\Embarcadero\.2016_2.#############.slip.

    The License is tied to computername + username so if you keep these the same, then the copy of the slip files in “C:\ProgramData\Embarcadero” works just fine.

     

    So you can see if renaming them back (after making a copy) will work.

     

    • Like 1

  12. 4 minutes ago, Ralf7 said:

    Yes.

    I only see that it was registered in 2017.

    And what does License Expiration Date say when running C:\Program Files (x86)\Embarcadero\Studio\19.0\bin\LicenseManagerLauncher?

    I thought the Starter editions were unlimited too (should say License Expiration Date:  Unlimited in that case).

     

    Did you buy Starter or was this one of the free versions?

    Did something change on your computer (to make the license go bad)?

     


  13. 2 minutes ago, PawelPepe said:

    How can it be illegal when Delphi CE is free (I do not sell my programs - it is my hobby ) .   Btw, my dcc32270.dll library is 27.0.40680.4203

    Because, as far as I know, the installation of CE is done via a webinstaller and the exact (sub)version could have been changed. And one of these changes could be that the command line compiler isn't for CE anymore. Only way to know for sure is someone else freshly installs CE or Embarcadero gives clarity about this issue.

     

    Have you tried to ask this via support there?


  14. 13 minutes ago, hsauro said:

    Are you saying that it would be illegal to ask a friend to compile Delphi source code on their own copy and send me the exe?

    No, that wasn't the question.

    The question was if someone could send a working compuler dcc32.exe.

     

    4 minutes ago, dummzeuch said:

    That's what you wrote, but apparently you meant to write "the compiled exe". That would be perfectly legal.

    No, the question was really the compiler exe.

    (Question was not from hsauro but from pawel)

     


  15. Are you using TIdHttpServer? (In the other topic you showed some code with just TIdHTTP)

     

    How do you measure the leak? with just FastMM4 or MadExcept?

    The topic you linked to mentioned FastMM doesn't report the leak but MadExcept does.

    So how is this problem the same as mentioned in that topic?

     

    What exactly is your leak, how does it show and what (minimal) code can you provide which reproduces this?

     


  16. 8 minutes ago, limelect said:

    using IdHTTP := TIdHTTP.Create(nil) <<<< give me great amount of LEAKS,

    using  IdHTTP := TIdHTTP.Create(Form1); <<< it is OK

    Ver simple question

    The answer should also be very simple.

    Make sure to do IdHTTP.Free; within a finally block.

     

    Did you try that already??? And did you still have leaks ???

    If you did and you still have leaks, the must come from somewhere else.

     

×