This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
program HandlerException; | |
uses | |
Vcl.Forms, | |
Handler.Exception.Main in 'src\Handler.Exception.Main.pas' {FrmMain}, | |
Handler.Exception in 'src\Handler.Exception.pas'; | |
{$R *.res} | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unit Handler.Exception; | |
interface | |
uses System.SysUtils; | |
type | |
TMyHandlerException = class | |
private | |
class procedure GerarLog(E: Exception); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure TFrmMain.btnGerarExceptionClick(Sender: TObject); | |
var | |
LValor: Integer; | |
begin | |
LValor := StrToInt('X'); | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CompareStr(const S1, S2: string): Integer; | |
procedure Exemplo(var Value: Double); | |
begin | |
Value := 10; | |
end; | |
function Somar(const valor1, valor2: Double): Double; | |
begin | |
Result := valor1 + valor2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure GetInfo(out Info: SomeRecordType); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure AddOne(var X, Y: Integer); | |
begin | |
X := X + 1; | |
Y := Y + 1; | |
end; | |
// depois que este código for executado, o valor de I será 3. | |
var | |
I: Integer; | |
begin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Somar(valor1, valor2: Double): Double; | |
begin | |
Result := valor1 + valor2; | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docwiki | |
# https://docwiki.embarcadero.com/RADStudio/Sydney/en/Linux_Application_Development | |
FROM ubuntu:18.04 | |
RUN apt update -y && apt upgrade -y && apt dist-upgrade -y | |
RUN apt install -y joe wget p7zip-full curl openssh-server build-essential zlib1g-dev libcurl4-gnutls-dev libncurses5 | |
COPY ./LinuxPAServer20.0.tar.gz ./ | |
RUN tar -xvf ./LinuxPAServer20.0.tar.gz | |
ENTRYPOINT ./PAServer-20.0/paserver -password= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
procedure TServiceLogin.Example; | |
var | |
LResponse: IHTTPResponse; | |
LFormUrlencoded: TStringList; | |
LRequest: THTTPClient; | |
begin | |
LRequest := THTTPClient.Create; | |
LFormUrlencoded := TStringList.Create; | |
try | |
LFormUrlencoded.Add('grant_type=my-grant-type'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
qryUsuarios.SQL.Clear; | |
qryUsuarios.SQL.Add('select *'); | |
qryUsuarios.SQL.Add(' from user'); | |
qryUsuarios.SQL.Add(' where login = :login'); | |
qryUsuarios.SQL.Add(' and password = :senha'); | |
qryUsuarios.ParamByName('login').AsString := edtUsuario.Text; | |
qryUsuarios.ParamByName('senha').AsString := edtSenha.Text; | |
qryUsuarios.Open(); | |
if qryUsuarios.IsEmpty then |
NewerOlder