Jump to content

toufik

Members
  • Content Count

    75
  • Joined

  • Last visited

Posts posted by toufik


  1. Just now, Lajos Juhász said:

    Why are you using WrieString / ReadString. It would be better:

    Myinifile.WriteInteger('LastDiskSkin', SkinFile, lst1.ItemIndex.ToString);

     

    lst1.ItemIndex :=Myinifile.ReadInteger('LastDiskSkin',SkinFile, -1); // or some default index.

    i about two days now trying to fix this and yes i did try with ReadInteger and WriteInteger the problem persist 


  2. help need please .............I'm using Delphi 10.4
    I'm having a very silly problem restoring i'm trying to store or save tlistbox index that select by the user (ItemIndex) and restore it later on create event 
    the save work just fine i think the problem with restore .
    save :
    var Myinifile := TIniFile; SkinFile := string 

       Myinifile := TIniFile.Create(ExtractFilePath (application.ExeName)+'my.ini');
       Myinifile.WriteString('LastDiskSkin', SkinFile, lst1.ItemIndex.ToString);
    restore :

     

      if lst1.ItemIndex < 0 then EXIT;
    //     Myinifile := TIniFile.Create('tabibi.ini');
      try
     

     lst1.ItemIndex :=Myinifile.ReadString('LastDiskSkin',SkinFile,'').ToInteger;
     ShowMessage(SkinFile);
      finally
        Myinifile.Free;
      end;


  3. thank you all for help this worked for me 
    var
       Year, Month, Day, Hour, Min, Sec, MSec: Word;
      StartTime:           ElapsedTime:    TDateTime;
      EndTime:= Time;
      ElapsedTime:= EndTime-StartTime; Day:= trunc(ElapsedTime);
      DecodeTime(ElapsedTime, Hour, Min, Sec, MSec);


  4. 7 minutes ago, FPiette said:

    Is it your homework?

    It would be better that you show the code you already wrote so that we can help you with it.

    If we give you the solution - which is quite trivial - you won't learn anything.

    its not my homework LOL i'm very old for that , I'm Delphi Beginner that all 
    and this my code 
    procedure TForm1.Timer1Timer(Sender: TObject);
    var  StartTime:      TDateTime;
      EndTime:        TDateTime;
      ElapsedTime:    TDateTime;
      Year, Month, Day, Hour, Min, Sec, MSec: Word;
    begin
    begin
      StartTime:= Time;  {get the process start time}
      {.......do processing..........}
      EndTime:= Time;    {get the process end time}
      ElapsedTime:= EndTime-StartTime;  {Total elapsed time}b.Caption :=TimeToStr(ElapsedTime)
      {DecodeTime will return total time down to the milliseconds}
      DecodeTime(ElapsedTime, Hour, Min, Sec, MSec);


  5. 3 minutes ago, David Heffernan said:

    It doesn't much matter what the thing is that you encrypt. What matters is who encrypts it, and who has knowledge of the key or keys used to encrypt and decrypt. That's what I mean by usage. 

     

    As for how you do it, convert the text to binary using a well defined encoding, e.g. UTF8, and encrypt that. Encryption algorithms work with binary data not text. 

    thanks for  replay i will try to get into it thank  s again 


  6. hello every one ,,

    i'm trying to extract  a string g lets say i have this long string :


    2090Lj32J5Y6Ni6Q2Rt8c538u1X227L340Q8N1....ce4A3z6l96S5v7LZ3OhSVoB538k7wPTn13E2w2D0h104fJ7HP09x

    o7W71J1o02c088922A3t420697F5431XP91C6JF9w1Ss0Tuk5S669207816gp57pW193BPWL27AZ052nr2S714...30

    ps  : i added the point(....) to show the palaces i want  to split the string.

    i want tto be able  to get start from 3 string and put it  in variable to use it later 

    2090Lj32J5Y6Ni6Q2Rt8c538u1X227L340Q8N1 
    and .......

    ce4A3z6l96S5v7LZ3OhSVoB538k7wPTn13E2w2D0h104fJ7HP09x

    o7W71J1o02c088922A3t420697F5431XP91C6JF9w1Ss0Tuk5S669207816gp57pW193BPWL27AZ052nr2S714v
    and ......

    30

    ..
    i  did  tried to play with this ;  Registration_number :=(length(str)).ToString; 
    no luck yet .


  7. Hello every one , and thank you all for taking a  time to try to understand what i have asked ,,,, 
    this is a video show exactly what i need and sorry for not replying sooner ,, i have a bit problem in my windows i lost all files and did have try to fix ,, all fine now .
    @Serge_G yes I'm working with SQLite db and firedac 
    like i said before this video show  what i need to do ,, its paid Component called Rubicon.


  8. hello every one how you all doing ,,,i'm looking for advanced search method

    wait what ?!!!! ^^^

    so i need to search a long text word by word and move to the next one in onther long text in a table field and come back with a result of any match ,,,

    is that all .....no ,,, we want to highlight that word ,,,easy right and move to the next one

    i found a paid composant called Rubicon

    the picture show more detail about it please take a look thanks

    Untitled.png

×