Jump to content

PaPaNi

Members
  • Content Count

    31
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by PaPaNi


  1. Hey, Community!

    Given:

    - Delphi 2007

    - One Unit, where should be showed one warning, because one variable is deprecated

    - Project options -> Compiler messages: Show warnings and show hints is ON

    - All warnings in the list except platform symbol, platform unit, unsafe type, unsafe code and unsafe typecast is ON

    Problem:

    1. I do Build and get no warnings. DCU file date/time is changed. Then I do Compile - no warnings again.

    2. I change this unit (one space symbol is added). I do Build again - no warnings. Date/time of DCU file is changed.

    3. I change this unit again and now Compile (without Build). This changes the DCU file date/time again, but in this case I see one warning!

    I figured, that Build does exactly the same as Compile, but with all units regardless of whether they have changed. I.e. I expect to see the same warning after Build too.

    Im wrong/its a bug/its a future/one option must be changed? I want to see this warning after Build too.

    Any ideas are welcom! Thanks!


  2. The simplest solution that came to my mind.

    procedure Tf_TesterMain.DeleteStringsWithoutDigits;
    var
      List: TStringList;
    begin
      List := TStringList.Create;
      try
        List.Add('abc');
        List.Add('def23');
        List.Add('fgr65');
        List.Add('kbt');
        List.Add('idopt87');
        doWithList(List);
      finally
        FreeAndNil(List);
      end;
    end;
    
    ...
    
    procedure doWithList(_List: TStringList);
    var
      i: Integer;
    begin
      for i := _List.Count - 1 downto 0 do begin
        if not ContainsDigit(_List[i]) then begin
          _List.Delete(i);
        end;
      end;
    end;
    
    ...
    
    function ContainsDigit(const _Text: string): Boolean;
    var
      i: Integer;
    begin
      Result := False;
      for i := 1 to Length(_Text) do begin
        if _Text[i] in ['0'..'9'] then begin
          Result := True;
          Break;
        end;
      end;
    end;

     

    • Like 1

  3. 2 minutes ago, Uwe Raabe said:

    Let me guess. Your code looks something like this: 

    
    if TryStrToDate(Edit1, theDate) then

    But it should be

    
    if TryStrToDate(Edit1.Text, theDate) then

     

    I had exactly the same guess.  :classic_cool:


  4. 1 hour ago, dummzeuch said:

    Hm, that's the median salary not the arithmetic average. Not sure what the effect of that would be. Usually I tend to see the median to be the better figure for comparison.

     

    Edit: Salaries also vary greatly depending on the country and the tax/benefits. E.g. a salary of 60000 Euros in Germany means that on top of that the employer mandatorily pays half of several social security contributions (that's health insurance, pension, unemployment insurance, care insurance) which amounts to roughly 10%  extra (60000 Euros -> become about 66000) so when you compare that to say 60000 US$ you not only have to consider the current exchange rate but also these factors. In the US most "benefits" are not mandatory, no idea if they are part of the salary somebody will fill into such a questionnaire.

    1. I totally agree. In addition, in Germany "13" salary is often paid. The question is whether this was properly taken into account. Only 12 months are used in the methodology.
    2. It would be interesting to know which countries the developers interviewed. And also what the numbers look like by region (e.g. Asia, Europe, etc.). E.g. in USA the developer gets 80000 USD a year and in  Kyrgyzstan only 10000. "The valuess indicate the average fever values of patients in the hospital". 


  5. 14 minutes ago, dummzeuch said:

    To be fair: David also tends to be - lets say "terse" - in his answers. That can also be interpreted as rude, in particular by people for whom English is a foreign language.

    Perhaps "terse" can be understood as rudeness. But for me personally, the words "keep your advice to yourself" mean unambiguously rudeness. I don't know, maybe I was brought up wrong.

    • Like 7

  6. On 3/21/2022 at 5:35 PM, Darian Miller said:

    taskkill /f /im explorer.exe cd /d %userprofile%\AppData\Local del IconCache.db /a start explorer.exe

    Its works. But there is one thing what i don't like - all Explorer-windows will be closed.

     

    So i took the solution from @0x8000FFFF and modified for me -  I created one Link on the desktop:

     

    C:\Windows\System32\cmd.exe /k ie4uinit.exe -show

     

    and im almost happy. Almost becose the cmd-Window will be not automatic closed after work. I must find, how i can make that.

    Thank you!


  7. 21 hours ago, Uwe Raabe said:

    I use them to distinguish all the Delphi icons in the taskbar. For that I Shift-Right-Click on the icon and select Eigenschaften (Settings?), switch to Verknüpfungen (Links?) and change the icon with Anderes Symbol (Change Icon?). This only affects the taskbar icon.

     

    For desktop icons there is always the caption, while taskbar icons only reveal the inner soul when hovering over it.

     

    Sorry for the German captions and the possibly wrong translations. I just have no English Windows at hand to check. 

    Should this have an effect immediately or after restarting the computer?

    I just tried for one of our tool. But unfortunately that doesn't work for me.  The icon in the taskbar looks the same, but when I open the form of Settings-Shortcuts again, I see the new icon at the top. Even if I click the button Change Icon again, I see the new icon here and the path to the ico file is correct.

    I have 64-bit Win 10 Pro (21H1) and i work via RDP (in case it should have important).


  8. 1 hour ago, dummzeuch said:

    I still think that the "A" prefix looks bad. I prefer to use "_", which luckily I can get away with, because I'm the lead developer in our company.

    I'm also with some others here who think that the upper case prefixes, "F" in particular, reduce readability so a lower case "f" should be used instead (but I don't put that into practice).

     

    But somehow this feels like an age old discussion, that has been abandoned without a result many times only to start again when an opportunity comes up. And I'm really tired of discussing these non-problems. 

    I'm so used to using a prefix "_", that I need many time now to read code with other prefixes (for example "a"). In this situation, i don't need to analyze whether the "a" prefix is part of the variable, i.e. I recognize the variables faster. IMHO.

    I find the "_" prefix to be an excellent solution! 👍 

     

    • Like 1

  9. 50 minutes ago, PeterBelow said:

    I had a similar problem with Delphi Alexandria, McAfee would detect a freshly build Win32 debug EXE as virus and quarantine it before I could debug it under the IDE, but it would not flag the 32 bit release version of the same program and neither 64 bit debug or release versions.

    By the way: to send an EXE through a mail server put it into a ZIP file and password-protect that. The encryption done will make a virus scanner ignore it since it cannot identify the zipped file as executable. Some particularly paranoid mail servers will reject password-protected zip files for this reason, though. 

    I tried right now to put Exe into Zip and to send with gmail. Its dont work on me.

    How i understood, its a not allowed to send zip files with password-protect. I cant to show screenshot, becose text of hint is not on english language.


  10. 5 hours ago, dummzeuch said:

    I'm surprised that GMail actually lets you transfer any executable (or even zip file containing an executable). Last time I tried it simply refused to accept that attachment.

     

    As for virus scanners flagging Delphi executables as viruses: That happens to me regularly and I got tired of trying to get these false positives to be removed. Good thing I'm not making my living from selling software.

    I just tried a few options right now. As an example, i tried to send the file ss.exe ( this is a installation file of one program CodeStuff Starter, but it is not important. Important here is filename and extention)

    1. sending ss.exe - dont work. Its not allowed to send: ADE, ADP, .APK, APPX, APPXBUNDLE, BAT, CAB, CHM, CMD, COM, CPL, DLL, DMG, EX, EX_, EXE, HTA, INS, ISP, ISO, JAR, JS, JSE, LIB, LNK, MDE, MSC, MSI, MSIX, MSIXBUNDLE, MSP, MST, NSH, PIF, PS1, SCR, SCT, SHB, SYS, VB, VBE, VBS, VXD, WSC, WSF, WSH.

    2. renaming executable into ss.dat - dont work

    3. "zipping" executable - ss.zip - dont work

    4. renaming into ss.dat and "zipping" - dont work

    5. "zipping" and splitting executable - we have 4 files now: ss.z01, ss.z02, ss.z03 and ss.zip - dont work

    6. renaming into ss.dat, "zipping" and splitting - again 4 files: ss.z01, ss.z02, ss.z03 and ss.zip -  dont work

    6.1. i tried also using format RAR for archiving (with all modifications like before - renaming, splitting etc.) - dont work

    6.2 i tried to set archiv into archiv - dont work - "nested" archives are not allowed

    7. open StarterSetup.exe with HxD and replace first "M" => "N" - dont work

    8. open StarterSetup.exe with HxD and replace first "M" => "N" and now rename file into ss.dat - ITS WORKS!!!

    later received file again open and replace "N" => "M" => we have our executable again.

     

     


  11. I would first make sure that the WMIADAP.EXE is not a virus.  This file is mentioned on your link to Virustotal.com (tab Behavior):

    \\?\C:\Windows\system32\wbem\WMIADAP.EXE

     

    But as written here:

    https://www.howto-connect.com/fix-wmiadap-exe-windows-10/

     

    "If you find that it is located in the following directory then it is not a malware and the system is safe."
    C:\Windows\System32\wbem\files
     
    And on other sites often write:
    " Some malware camouflages itself as WMIADAP.exe, particularly when located in the C:\Windows or C:\Windows\System32 folder. Therefore, you should check the WMIADAP.exe process on your PC to see if it is a threat"
     
     
×