Jump to content

mofareh

Members
  • Content Count

    20
  • Joined

  • Last visited

Community Reputation

2 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. mofareh

    order by string same integer

    thank you for all it is done by ORDER BY Cast ('/' + acc_numb + '/' AS HIERARCHYID)
  2. mofareh

    order by string same integer

    try it by this data it is not done , the data is ready no insert or update data procedure TForm2.Button1Click(Sender: TObject); var LArr: TArray<string>; begin LArr := ['1','1.1','1.1.1','1.1.1.1','1.1.1.2','1.1.1.3','1.1.1.4','1.1.1.5','1.1.1.6','1.1.1.7','1.1.2' ,'1.1.2.1','1.1.2.2','1.1.3','1.1.3.1','1.1.4','1.1.4.1','1.1.4.2','1.1.5','1.1.5.1','1.1.6','1.1.6.1' ,'1.1.6.2 ','1.2','1.2.1','1.2.1.1','1.2.1.10','1.2.1.11','1.2.1.2','1.2.1.3','1.2.1.4','1.2.1.5' ,'1.2.1.6','1.2.1.7','1.2.1.8','1.2.1.9' ]; TArray.Sort<string>(LArr); Memo1.Lines.AddStrings(LArr); // // normalized Memo1.Lines.Add('---- Normalized ----'); LArr := ['1','1.1','1.1.1','1.1.1.1','1.1.1.2','1.1.1.3','1.1.1.4','1.1.1.5','1.1.1.6','1.1.1.7','1.1.2' ,'1.1.2.1','1.1.2.2','1.1.3','1.1.3.1','1.1.4','1.1.4.1','1.1.4.2','1.1.5','1.1.5.1','1.1.6','1.1.6.1' ,'1.1.6.2 ','1.2','1.2.1','1.2.1.1','1.2.1.10','1.2.1.11','1.2.1.2','1.2.1.3','1.2.1.4','1.2.1.5' ,'1.2.1.6','1.2.1.7','1.2.1.8','1.2.1.9']; TArray.Sort<string>(LArr); Memo1.Lines.AddStrings(LArr); end;
  3. mofareh

    order by string same integer

    i have error in TArray.Sort<string>(LArr);
  4. mofareh

    order by string same integer

    tank you for reply, but there is anather data has only one dot same : 1.1 1.2 i want to sort all data
  5. mofareh

    order by string same integer

    hello frendes , can i sort data same the attachment photo ? by order by in sql server
  6. mofareh

    any one work in TMS Web core ?

    than you for replay the problem is still
  7. hi , i have triel version of TMS Web Core for delphi , i want to buy it after trying if i try to show data in webdbgride the data not showing , i use MiletusMSSQLDBDriver , MiletusClientDataSet to do that , and i but all properties
  8. How can I thank you?? The code is post correctly Thank you very much
  9. I am delphi developer but i want helping Help me or stop question
  10. i dont know the vb.net i need any devlober write code by vb.net and delphi we dont have team we small busnse
  11. mofareh

    post image base64 to whatsapp api

    this code by c# but i want it by delphi pascal using System; using RestSharp; using System.Threading.Tasks; namespace test { class Program { static async Task Main(string[] args) { string instanceId = "instance950"; // your instanceId string token = "yourtoken"; //instance Token string mobile = "14155552671"; var url = "https://api.ultramsg.com/" + instanceId + "/messages/image"; var client = new RestClient(url); var request = new RestRequest(url, Method.Post); request.AddHeader("content-type", "application/x-www-form-urlencoded"); request.AddParameter("token", token); request.AddParameter("to", mobile); request.AddParameter("image", "https://file-example.s3-accelerate.amazonaws.com/images/test.jpg"); request.AddParameter("caption", "caption text"); RestResponse response = await client.ExecuteAsync(request); var output = response.Content; Console.WriteLine(output); } } }
  12. mofareh

    post image base64 to whatsapp api

    the response is : 414 Request-URI Too Large the API supoort sayd the paramerter post with QuireyString and he want to post parameter to Form values
  13. mofareh

    post image base64 to whatsapp api

    can i sent with Form values? the code sent QuireyString i want Form values method
  14. the code is vb.net ... i want to write it by delphi Sub Main(filename As String, MassegeTxt As String, mobileNo As String) ''''' send image as base64 Dim WebRequest As HttpWebRequest Dim bytes As Byte() = IO.File.ReadAllBytes(filename) Dim file As String = Convert.ToBase64String(bytes) 'Dim mof As String = HttpUtility.UrlEncode(file) Dim instance_id As String = "instance xxxxx" Dim token As String = "xxxxxxx" Dim mobile_number As String = mobileNo WebRequest = HttpWebRequest.Create("https://api.ultramsg.com/" + instance_id + "/messages/image") Dim postdata As String = "token=" + token + "&to=" + mobileNo + "&image=" & HttpUtility.UrlEncode(file) & "&caption=" + MassegeTxt Dim enc As UTF8Encoding = New System.Text.UTF8Encoding() Dim postdatabytes As Byte() = enc.GetBytes(postdata) WebRequest.Method = "POST" WebRequest.ContentType = "application/x-www-form-urlencoded" WebRequest.GetRequestStream().Write(postdatabytes) Dim ret As New System.IO.StreamReader(WebRequest.GetResponse().GetResponseStream()) Console.WriteLine(ret.ReadToEnd()) End Sub
  15. mofareh

    post image base64 to whatsapp api

    than you for remark , the code done : procedure Tmain_frm.Button6Click(Sender: TObject); var byte1: TBytes; file2: string; LJSONObject: TJSONObject; base64: TBase64Encoding; begin if OpenDialog1.Execute then begin /// / begin encodein base64 byte1 := System.iOUtils.TFile.ReadAllBytes(OpenDialog1.FileName); base64 := TBase64Encoding.Create(0); // CharsPerLine = 0 means no line breaks try file2 := base64.EncodeBytesToString(byte1); finally base64.Free; end; var Client := TRESTClient.Create('https://api.ultramsg.com/instance16802/messages/image'); var request := TRESTRequest.Create(nil); var esponse := TRESTResponse.Create(nil); request.Client := Client; request.Response := esponse; Client.ContentType := 'application/x-www-form-urlencoded'; request.Method := TRESTRequestMethod.rmPOST; LJSONObject := TJSONObject.Create(); try LJSONObject.AddPair('token', token_txt.text); LJSONObject.AddPair('to', send_to_txt.text); LJSONObject.AddPair('image', file2); request.AddBody(LJSONObject); request.Execute; Memo1.Text := request.Response.Content; finally LJSONObject.Free; end; end; end;
×