Jump to content

Halil Han Badem

Members
  • Content Count

    10
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Halil Han Badem


  1. 3 hours ago, Javier Tarí said:

    The installer is failing for me.

    These are some details for my subscription;

     1dff4e56-15c6-43c1-b176-8a0b96a505bc.png.11d5eef87f97854ec925735bf8347fc9.png

     

    This is what happens when I try to install from the web installer or the ISO installer:

     11fbb227-ee9b-4909-953e-a764158c4bc4.png.8fdcb5ec9417117bbdd95dfea3ff98fe.png

     

    Just in case, I downloaded the activation file from the licensing page:

     ba6344e3-f00b-4c89-bf60-c4bcadf5f28f.thumb.png.64c416dee790ec35b41476cddff5d3fd.png

     

    and tried removing the license from licensing manager, and leting the installer use the new one

      

    Result: Delphi 10.3 and 10.4 keep running with the license, but Delphi 11 won't install

      

     

     

    I have that same problem. I guess it is not activated for all licenses. Delphi 11 appears on the client page, but not in the License manager application. Although I have a subscription until 2023. I will wait for tomorrow.

  2. Locate


    27 minutes ago, haentschman said:

    :classic_tongue: Gladly...but the most important thing is not to resolve the variable in debugging mode.

    
    FieldByName(Column).Value

    ...at the breakpoint...the debugger says:  Value = ??? :classic_sad:

    Yes, here the compiler may not give correct information to the developer. For this, when adding a value to the Watch list, we need to prefix the value defined in with...do. And of course the field value.

     

    7 minutes ago, Lajos Juhász said:

    This is a bad idea for two reasons:

      

    1.) What will happen when the value is null? It will fail with message that Delphi cannot convert the null to string.
     2.) Why would you like to find the field for every record. You should find it before wile and store it in a local variable and use that instead.
      

     

     

    you need to re-read my reply. I stated that it was a bad idea, BUT I CREATED THE FUNCTION THAT HE WANTED, BECAUSE IT AGAINST SOLUTIONS IN THE QUESTION THAT ASKED. Before copy-pasting, you need to make your own edits.

  3. Locate


    9 hours ago, Dany Marmur said:

    Any, any solution with that call. No. Just do not.

    It will bite back. It goes against.... everything.

    If you have to put that in your code... you have a much bigger problem.

     

    Anyone who thinks they have a solution when putting Application.ProcessCrap into app-code are WRONG.

    Just having to type that is a bell telling you you are going in the wrong direction.

    "Application.ProccessMessages" yes WRONG in terms of usage but...For some reason, it was hard to quit using this command in the past when I found out what it actually did. I was seeing this command when I looked at the examples with while loops. Sometimes, even if we see it on the internet i realized that we had to investigate. I understood the issue with the first person who warned us that we should research that code.  Thank you for the information.

  4. Locate


    On 8/30/2021 at 2:36 PM, Henry Olive said:

    I wish everyone a healthy day.

    My Table

    AAAA-01X

    BBBB-02X

    CCCC-03X

     

    Is there a way to Search & Locate a record like with just '02' searchtext ( that is i want to locate BBBB-02X )

     I tried below code but no success

     SearchText:='02';

    if not Dataset.Locate(SERIALNO, SearchText, [LoCaseInsensitive,LoPartialKey]) then

     ShowMessage ('...........')

    I need something like Sql's  CONTAINING 
     ( I dont want to Filter or SQL, just i need is Locate )
    
    Thank You
     

     

    You don't want to do what you have to do because you don't want filter and sql. With Locate, you can refer to a specific value in a specific field.

    If you want to be a crazy developer you can try the code below.

     

    However, this code will affect you very badly in terms of performance and it is a method that I do not recommend at all. I pity the user if there are too many records... 😞

     

    I created such a function by blending it with your request. There may be times when it does not give accurate results. It's a context dependent situation.

    Here's an example from UniDAC:

     

     

     

    function SearchAndLocate(DataTable: TUniTable; Column, Value: String): Boolean;
    begin
     with DataTable do
     begin
       Result := False;
       if not DataTable.Active then DataTable.Active := True;
       if DataTable.RecordCount <= 0 then raise exception.Create('record not found lmao');
       First;
       while not Eof do
       begin
         if ContainsStr(FieldByName(Column).Value, Value) then
         begin
          Result := True;
          break;
         end;
         Next;
       end;
     end;
    end;

     

    Usage:

     

    SearchAndLocate(UniTable1, 'value', '04')

    MY ADVICE: USE SQL OR FILTER!


  5. On 6/6/2021 at 11:50 PM, ertank said:

    Hello,

     

    I am using Delphi 10.3.3, targeting Win32 executable.

     

    There is a SOAP web service that I have build a class for it. That class runs just fine on a test project. However, when I put it in my main project, I get below error

    
    DocumentElement http://schemas.xmlsoap.org/soap/envelope/:Envelope expected, :Envelope found

    I checked, there is only one single unit for this web service in my whole computer and both projects are using that unit.

      

    I have used different SOAP web services in the past. Some of them rarely raise "HTML found" kind of error messages, but never got ":Envelope found" until now. None of my web searches lead me to same error message that I receive.

      

    I have all requests and responses saved in text files. Comparing them I can see no difference. It is only number of records returned changes due to filter parameters. I also used Fiddler Telerik and captured whole response using both test project and main project. They are identical as far as I can tell.

      

    Test project response starts as:

    
    HTTP/1.1 200 OK
    Content-Type: text/xml;charset=UTF-8
    Connection: keep-alive
    Set-Cookie: JSESSIONIDSSO=529DA436282217EF9D8D9F21515121D3; Path=/; Secure
    Set-Cookie: JSESSIONID=82E5260FE1737AA7C77DCE37D71B7132; Path=/listingapi/ws; Secure
    Server-Timing: intid;desc=d2369e80a9274e5b
    Date: Sun, 06 Jun 2021 19:41:44 GMT
    Vary: Accept-Encoding
    Content-Length: 15213
    <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
      <env:Header/>
      <env:Body>
        <ns1:getSalesByDateRangeResponse xmlns:ns1='http://sale.individual.ws.listingapi.gg.com'>
          <return>
            <ackCode>success</ackCode>
            <responseTime>06/06/2021 22:41:44</responseTime>
            <timeElapsed>1 ms</timeElapsed>
            <saleCount>11</saleCount>
            <sales>
              <sale>

     

    Main project response starts as:

    
    HTTP/1.1 200 OK
    Content-Type: text/xml;charset=UTF-8
    Connection: keep-alive
    Set-Cookie: JSESSIONIDSSO=7A2E4B6940B5E0E44F86FF95BBCD6C3D; Path=/; Secure
    Set-Cookie: JSESSIONID=0ED54949FAC10990F8F24B27B9174216; Path=/listingapi/ws; Secure
    Server-Timing: intid;desc=1a968daea7e9c9d9
    Date: Sun, 06 Jun 2021 19:41:17 GMT
    Vary: Accept-Encoding
    Content-Length: 9877
    <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
      <env:Header/>
      <env:Body>
        <ns1:getSalesByDateRangeResponse xmlns:ns1='http://sale.individual.ws.listingapi.gg.com'>
          <return>
            <ackCode>success</ackCode>
            <responseTime>06/06/2021 22:41:17</responseTime>
            <timeElapsed>225 ms</timeElapsed>
            <saleCount>7</saleCount>
            <sales>
              <sale>

    Web service WSDL can be reached from: https://dev.gittigidiyor.com:8443/listingapi/ws/IndividualSaleService?wsdl

     

    I appreciate any help, please.

     

    Thanks & Regards,

    Ertan

    Hi,

     

    If you had sent the entire request, I could have responded more accurately. Fiddler etc. Compare an application with the requests in the test and production version. If there is a difference and there is a problem with Envelope, you can interfere with the XML request with the help of the code below;

     

    procedure OnBeforeExecute(const MethodName: string; SOAPRequest: TStream);
    var
      G: TStringList;
    begin
      SOAPRequest.Position := 0;
      G := TStringList.Create;
      try
        G.LoadFromStream(SOAPRequest);
        ///You have to do the operations here.
        SOAPRequest.Size := 0;
        SOAPRequest.Position := 0;
        G.SaveToStream(SOAPRequest);
      finally
        G.Free;
      end;
    end;

    This is a code snippet for the HTTPRio OnBeforeExecute event. I'm assuming you are using WSDL imports. If you add healthy requests in the subject, I may have the opportunity to examine it.

     

    Best regards.


  6. 2 minutes ago, Kas Ob. said:

    Nice !, and i like how you combined all the padding in one place, but i have to point a thing about this padding function at https://github.com/halilhanbadem/AES-256-CBCEncryptionDelphi_PHP/blob/master/delphiAESDemo/lib/AESEncDec.pas

      

    Zero padding and Random padding should not be here, i mean for encryption, as they can and most likely will cause data corruption, zero padding is essential for hashing calculation but very dangerous or even wrong with encryption/decryption, and as you designed it for only encryption then they both should not be here or at least warn the user about there dangerous when decryption, there is no way to check length of the data, unless you include the data length within the data itself, in this case you are better with the other padding methods as they handle this right.

     

    Thank you for your feedback. I will make corrections on the subject as soon as possible.


  7. 2 hours ago, Lars Fosdal said:

    OAuth 1.0 only?

    Yes, I wrote that class for Wordpress plugin Woocommerce API validation. I haven't reviewed the OAuth 2.0 documentation yet. If I need it in the future, I will include it in the set. In the future, I will add the component that performs encryption and decryption with AES256-CBC to the set. A very common situation; For example, I have seen many questions such as AES output with PHP is not the same as Delphi. I have solved this problem in the past. I'm thinking of turning it into a component and including it in the set again. I'm thinking of working in OAuth 2.0 in the future.

     

    I had developed a project for AES 256 encryption where one part encrypts and the other part reads. I just completed the project that does two-sided encryption/decryption. I'll add it when my workload is less.

    Sorry for my bad english 😞

     

    https://github.com/halilhanbadem/AES-256-CBCEncryptionDelphi_PHP


  8. Greetings to everyone!

     

    My first post on this forum. Please forgive me if I'm posting in the wrong place.

     

    I turned some of the classes I had developed for the problems I encountered in daily life into a component set. I'm thinking of making additions in the future. I just wanted to add in case it helps. You can find detailed information on readme.md. I'll keep it short so I don't make it too long.

     

    Github: https://github.com/halilhanbadem/delphi-hb-components

     

    Thanks.

    • Like 3
×