Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 09/13/22 in all areas

  1. David Heffernan

    Hiring-related question: Delphi + javascript ?

    Why Delphi? Why not use something else?
  2. mvanrijnen

    any body can write this code by delphi?

    ..... or you ask Remy 🙂
  3. David Heffernan

    32bit vs 64bit

    Well, because a/b is not necessarily equal to (1/b)*a. This is because a/b is defined by IEEE754 to be the closest representable value to the true value of a/b. Then (1/b) is the closest representable value to the true value. And then (1/b)*a is closest representable etc etc. So (1/b)*a has two roundings a/b has just one. In many applications these fastmath approximations are perfectly acceptable, but of course there are applications where this is a problem.
  4. gkobler

    wuppdi Welcome Page for Delphi 11 Alexandria?

    Now i have released a new version of the WP-Plugin. Go to https://dwp.gksoft.ch to download them. Also look at the known issues! The drag and drop does not yet work as I would like it to, because it still has errors in the TControlList
  5. KenR

    Hiring-related question: Delphi + javascript ?

    Please be aware that the FNC components do not have the ElementID property.
  6. SwiftExpat

    Hiring-related question: Delphi + javascript ?

    The question is how long are you willing to wait for that learning to happen? Most projects bring in a large team for startup then thin down, that is why you are getting the stack of resumes which seem to be bad fits. The term "full stack" developer is around a lot, but for the last 15+ years the stack has been larger than most can learn, myself included. Try thinking of it in phases, start with a larger team then thin it down. Be warned, your dev's are going to want to jump ship as soon as the job does not fit the current market trend.
  7. David Heffernan

    Hiring-related question: Delphi + javascript ?

    When I look to recruit people, I don't really care what technologies they've used. I am interested in how smart they are. But then I tend to be hiring for long term positions. So I don't even recognise a term like "Delphi dev".
  8. David Heffernan

    Hiring-related question: Delphi + javascript ?

    Consider me confused
  9. Remy Lebeau

    any body can write this code by delphi?

    If you are using Indy, the code would look something like this: uses ..., System.Classes, IdCoderMIME, IdHTTP, System.IOUtils; procedure Main(const filename, MassegeTxt, mobileNo: String); var WebRequest: TIdHTTP; SSL: TIdSSLIOHandlerSocketOpenSSL; bytes: TBytes; file: String; instance_id: String; token: String; mobile_number: String; postdata: TStringList; begin // send image as base64 bytes := TFile.ReadAllBytes(filename); file := TIdEncoderMIME.EncodeBytes(bytes); instance_id := 'instance xxxxx'; token := 'xxxxxxx'; mobile_number := mobileNo; WebRequest := TIdHTTP.Create; try SSL := TIdSSLIOHandlerSocketOpenSSL.Create(WebRequest); SSL.SSLOptions.SSLVersions := [sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2]; WebRequest.IOHandler := SSL; WebRequest.Request.ContentType := 'application/x-www-form-urlencoded'; postdata := TStringList.Create; try postdata.Add('token=' + token); postdata.Add('to=' + mobileNo); postdata.Add('image=' + file); postdata.Add('caption=' + MassegeTxt); Writeln(WebRequest.Post('https://api.ultramsg.com/' + instance_id + '/messages/image', postdata)); finally postdata.Free; end; finally WebRequest.Free; end; end; If you want to use Embarcadero's TNetHTTPClient, the code would look something like this instead: uses ..., System.Classes, System.SysUtils, System.NetEncoding, System.Net.HTTPClientComponent, System.IOUtils; procedure Main(const filename, MassegeTxt, mobileNo: String); var WebClient: TNetHTTPClient; bytes: TBytes; file: String; instance_id: String; token: String; mobile_number: String; postdata: TStringList; begin // send image as base64 bytes := TFile.ReadAllBytes(filename); file := TNetEncoding.Base64.EncodeBytesToString(bytes); instance_id := 'instance xxxxx'; token := 'xxxxxxx'; mobile_number := mobileNo; WebClient := TNetHTTPClient.Create(nil); try WebClient.ContentType := 'application/x-www-form-urlencoded'; postdata := TStringList.Create; try postdata.Add('token=' + token); postdata.Add('to=' + mobileNo); postdata.Add('image=' + file); postdata.Add('caption=' + MassegeTxt); Writeln(WebClient.Post('https://api.ultramsg.com/' + instance_id + '/messages/image', postdata, nil, TEncoding.UTF8, nil).ContentAsString()); finally postdata.Free; end; finally WebClient.Free; end; end; Or, using Embarcadero's THTTPClient instead: uses ..., System.Classes, System.SysUtils, System.IOUtils, System.NetEncoding, System.Net.HttpClient; procedure Main(const filename, MassegeTxt, mobileNo: String); var WebClient: THTTPClient; bytes: TBytes; file: String; instance_id: String; token: String; mobile_number: String; postdata: TStringList; begin // send image as base64 bytes := TFile.ReadAllBytes(filename); file := TNetEncoding.Base64.EncodeBytesToString(bytes); instance_id := 'instance xxxxx'; token := 'xxxxxxx'; mobile_number := mobileNo; WebClient := THTTPClient.Create; try WebClient.ContentType := 'application/x-www-form-urlencoded'; postdata := TStringList.Create; try postdata.Add('token=' + token); postdata.Add('to=' + mobileNo); postdata.Add('image=' + file); postdata.Add('caption=' + MassegeTxt); Writeln(WebClient.Post('https://api.ultramsg.com/' + instance_id + '/messages/image', postdata, nil, TEncoding.UTF8, nil).ContentAsString()); finally postdata.Free; end; finally WebClient.Free; end; end;
  10. David Heffernan

    32bit vs 64bit

    It's true that the 64 bit Windows debugger is a disaster zone. But I just debug with the 32 bit debugger. You can have a project with both 32 and 64 bit targets. You can then ship just the 64 bit if you prefer. But you can still use the 32 bit debugger during development, because it's the one that is actually useful.
  11. David P

    code completion?

    They say that you need to save the project first before it works. I'm running 11.2 and code completion is still poor. For our large project it's indexing 300+ files, taking min 10% CPU, hundreds of MB of disk space. I just end up switching it off.
  12. SwiftExpat

    Anyone using an open-source ORM?

    I used this a few months ago, was simple enough for SQLite https://github.com/davidlastrucci/Trysil
×