text stringlengths 14 6.51M |
|---|
unit uFrmVehicle;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uFrmModal, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, Menus,
ActnList, StdCtrls, cxButtons, ExtCtrls, cxControls, cxContainer, cxEdit,
dxSkinsCore, dxSkinsDefaultPainters, cxDropDownEdi... |
UNIT SSYSTEM2;
INTERFACE
USES
CRT,GRAPH,SSYSTEM1;
FUNCTION ReadNewKey:BYTE;
PROCEDURE WriteXY(X,Y:INTEGER;Text:STRING);
PROCEDURE FillArea(X1,Y1,X2,Y2,Color:INTEGER;Mold:WORD);
PROCEDURE Terminate;
PROCEDURE InitTable;
function RKey: char; { Indica o valor em char da tecla pressionada }
proced... |
unit HybridBinarizer;
{
* Copyright 2009 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... |
unit orm.objects.utils;
interface
uses System.SysUtils, System.Classes, System.Generics.Collections,
System.Rtti, System.TypInfo;
Type
TThreadCopy = Class(TThread)
Private
FDataA : TObject;
FDataB : TObject;
Protected
procedure Execute; Override;
Public
Constructor... |
unit telaprincipal;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls, Vcl.Grids;
type
TForm1 = class(TForm)
edtplacar: TEdit;
edtMinTemp: TEdit;
edtMaxTemp: TE... |
{3. Realizar un programa modularizado que lea información de 200 productos de un supermercado. De cada
producto se lee código y precio (cada código es un número entre 1 y 200). Informar en pantalla:
? Los códigos de los dos productos más baratos.
? La cantidad de productos de más de 16 pesos con código par.}
{program e... |
{*******************************************************}
{ }
{ NTS Aero UI Library }
{ Created by GooD-NTS ( good.nts@gmail.com ) }
{ http://ntscorp.ru/ Copyright(c) 2011 }
{ License: Mozilla Pu... |
Program Stars2; { Testing 2D/3D Demo --
Stars II (Parallax/Multi-Layered) }
{ The Original Code was made by Bernie Pallek }
{ I just modified and optimized it to work in all Vesa modes. The final use }
{ of this code is just to demonstra... |
unit dmGetRequest;
interface
uses
System.SysUtils,
System.Classes,
System.Generics.Collections,
System.JSON,
REST.Types,
REST.Client,
Data.Bind.Components,
Data.Bind.ObjectScope;
type
TGetRequestDataModule = class(TDataModule)
RESTClient1: TRESTClient;
RESTRequest1: TRESTRequest;
REST... |
unit Config.Server;
interface
uses
System.IniFiles;
type
TConfigServer = class(TIniFile)
const
S_DATABASE = 'DATABASE';
private
FBDType: String;
FBDConectionName: String;
FBDServer: String;
FBDPort: Integer;
FBDSchema: String;
FBDDatabaseName: String;
FBDUserName: String;
... |
unit GUIAnnotationLoaderXML;
interface
uses
SysUtils, Classes, Contnrs, InfraCommon, GUIAnnotationLoaderIntf, ExtCtrls,
InfraGUIBuilderIntf, ComObj, XMLIntf, XMLDoc, Forms, msxml, Variants,
GUIAnnotationIntf;
type
TGUIAnnotationLoaderXML = class(TBaseElement, IGUIAnnotationLoader)
private
... |
unit uOPCSeriesTypes;
interface
uses
//Vcl.Graphics,
aCustomOPCSource;
//const
// cErrorSerieColor = clGray;
type
TXY = record
x: double;
y: double;
end;
TXYS = record
x: double;
y: double;
s: double;
procedure Clear;
end;
TXYArray = array of TXY;
TTransRec = record
I... |
{*******************************************************************************
Title: T2Ti ERP
Description: Unit criada pelo DataSnap - Servidor de Aplicações
The MIT License
Copyright: Copyright (C) 2014 T2Ti.COM
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and ass... |
{
Author: Ali Mashatan
E-mail: ali.mashatan@gmail.com
website: https://github.com/Mashatan
Date: 2008-02-28
License: GNU Public License ( GPL3 ) [http://www.gnu.org/licenses/gpl-3.0.txt]
}
unit MSHints;
{.$define OldVersion}
interface
uses Windows, classes, Graphics, Controls, ImgList... |
{$include kode.inc}
unit kode_window_Linux;
{
* we open a separate display connection for every window..
}
//----------
//----------------------------------------------------------------------
interface
//----------------------------------------------------------------------
uses
X,
Xlib,
Xutil,
kode_wi... |
unit UxlWinControl;
interface
uses Windows, Messages, UxlClasses, UxlList;
type
TxlWinControl = class;
TxlWinContainer = class;
TMsgHandler = function (AMessage, WParam, LParam: DWORD; var b_processed: boolean): DWORD of Object;
IMessageObserver = interface
function ProcessMessage (ASender: TxlW... |
unit GameTutorial2;
{$mode objfpc}{$H+}
//step2:
//2 targets, that shoot at the player as well.
//targets and player share the same health decreasing code
interface
uses
windows, Classes, SysUtils, gamepanel, guitextobject, staticguiobject, gamebase,
target, bullet,Dialogs, Graphics, playerwithhealt... |
{ Free Pascal library for communicating with a parent Node.js process
through IPC. Licensed under MIT.
@link https://github.com/megahertz/pascal-nodejs-ipc
@version 1.0.0 }
unit nodeipc;
{$mode objfpc}
interface
uses
classes,
pipes,
syncobjs,
sysutils;
type
TOnMessage = procedure(Message: Variant) ... |
{$MODE OBJFPC} { -*- delphi -*- }
{$INCLUDE settings.inc}
unit autostorable;
interface
uses
storable, typinfo;
type
{$TYPEINFO ON}
TAutoStorable = class abstract (TStorable)
private
procedure FixupReferenceProperty(const PropInfo: Pointer; const Value: Pointer);
procedure FixupMethodProperty... |
unit MainDataModuleUnit;
interface
uses System.SysUtils,
System.Classes,
Data.DBXFirebird,
Data.DB,
Data.SqlExpr,
Data.DBXJSON;
type
TWineCellarDataModule = class(TDataModule)
wines: TSQLConnection;
procedure DataModuleCreate(Sender: TObject);
public
function GetWineById(id: Integer): TJSO... |
unit VisibleDSA.MineSweeperData;
{$mode objfpc}{$H+}
interface
uses
Classes,
SysUtils,
DeepStar.Utils.UString;
type
TArr2D_int = array of array of integer;
TArr2D_chr = array of array of UChar;
TArr2D_bool = array of array of boolean;
TMineSweeperData = class(TObject)
public const
PNG_0: UStri... |
unit Aurelius.Schema.Commands;
{$I Aurelius.Inc}
interface
uses
Aurelius.Sql.Metadata,
Aurelius.Sql.Interfaces;
type
TDDLCommand = class abstract
public
function BuildSQL(Generator: ISQLGenerator): string; virtual; abstract;
end;
TCreateTableCommand = class(TDDLCommand)
strict pr... |
Program cholesky_decomposition;
type
matrix = array[1..256,1..256] of real;
vector = array[1..256] of real;
var
//our main matrix & vector
main_matrix: matrix;
main_vector: vector;
//decomposed matrix
decomposed_matrix: matrix;
//array of solutions
solution: vector;
//amount of equesions in our linear syste... |
program LookFoe;
uses
crt;
type
enemydata = record
name : string[16];
strength : byte;
mentality : byte;
endurance : byte;
resistance : byte;
agility : byte;
accuracy : array[1..2] of byte... |
unit BancoDTO;
interface
uses
SynCommons,
mORMot, Classes,
Atributos;
type
TBanco = class(TSQLRecord)
private
FPK: Integer;
FCODIGO: RawUTF8;
FNOME: RawUTF8;
FURL: RawUTF8;
published
[TPK('ID', [ldGrid, ldLookup, ldComboBox])]
property PK: Integer read FPK write FPK;
[TCo... |
var
width:integer;
length:integer;
height:integer;
floor:integer;
walls:integer;
whole_house:integer;
begin
write('Width: ');
readln(width);
write('Length: ');
readln(length);
write('Height: ');
readln(height);
floor:= width*length;
walls:= 2*(length*height) + 2*(width*height);
whole_house:= 2*floor+ wal... |
unit TextEditor.Search.InSelection;
interface
uses
System.Classes, System.UITypes, TextEditor.Consts, TextEditor.Types;
type
TTextEditorSearchInSelection = class(TPersistent)
strict private
FActive: Boolean;
FBackground: TColor;
FOnChange: TTextEditorSearchChangeEvent;
FSelectionBeginPosition:... |
unit classes.ScriptDDL;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants;
type
TScriptDDL = class(TObject)
private
class var aInstance : TScriptDDL;
const
TABLE_VERSAO = 'tbl_versao';
TABLE_USUARIO = 'app_usuar... |
unit TelaAberturaCaixa_p;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, FMTBcd, DB, Provider, DBClient, SqlExpr, StdCtrls, Buttons, ExtCtrls,
Mask, DBCtrls, Grids, DBGrids, JvExButtons, JvBitBtn;
type
TTelaAberturaCaixa = class(TForm)
qAbertura: TSQLQu... |
unit UItem;
interface
uses System.Generics.Collections, System.SysUtils, System.JSON;
type
TItem = class
private
{ private declaractions }
FID: Integer;
FSequencia: Integer;
FGrupo: Integer;
FDescricao: String;
FCodigoInterno: String;
FValor1: Extended;
FQuantidade: Extended;
... |
unit Grijjy.TextToSpeech.iOS;
{< Text To Speech engine implementation for iOS }
interface
uses
Macapi.ObjectiveC,
iOSapi.Foundation,
iOSapi.CocoaTypes,
iOSapi.AVFoundation,
Grijjy.TextToSpeech.Base;
{ These declarations are missing from iOSapi.AVFoundation }
type
AVSpeechBoundary = NSInteger;
const
AV... |
PROGRAM Ancient_Egyptian_Multiplier (input, output);
{Algoritmo de multiplicación entre dos números naturales que sólo requiere la capacidad de multiplicar y dividir por 2, y la de sumar.}
{Para un producto A x B, este algoritmo se basa en la multiplicación de B por la descomposición de A en factores binarios.
Por e... |
unit uDependencyMeetsExpectations;
interface
uses
Classes
;
type
IEmailSender = interface(IInvokable)
procedure SendMail(aEmailAddress: string; aMessage: string);
procedure SendBulkEmail;
end;
TEMailSender = class(TInterfacedObject, IEmailSender)
procedure SendMail(aEmailAddress: string;... |
{
ID: a_zaky01
PROG: milk3
LANG: PASCAL
}
var
i,count:integer;
max:array[1..3] of integer;
used:array[0..20] of boolean;
stopper:array[0..20,0..20,0..20] of boolean;
fin,fout:text;
procedure milking(a,b,c:integer);
var
i,j:integer;
milk:array[1..3] of integer;
procedure setup;... |
(*В 17-й главе нами создан экзаменатор, проверяющий знания таблицы
умножения. Переработайте программу P_17_1 так, чтобы оценка выставлялась в
процедуре, принимающей один параметр - количество допущенных ошибок.*)
var A, B, C : integer; { сомножители и произведение }
Q, E : integer; { счетчик вопросов и счетчик оши... |
unit Aurelius.Types.DynamicProperties;
{$I Aurelius.Inc}
interface
uses
Rtti,
Generics.Collections;
type
TDynamicProperties = class
private
FProps: TDictionary<string, TValue>;
function GetItem(const PropName: string): TValue;
procedure SetItem(const PropName: string; const Value: T... |
// Graphics palette usage demo
program Palette;
const
VideoBufOrigin = $A0000000;
Width = 320;
Height = 200;
type
TVideoBuf = array [0..Height - 1, 0..Width - 1] of ShortInt;
PVideoBuf = ^TVideoBuf;
procedure SetPalette;
var
i: Integer;
begin
for i := 0 to 255 do
begin
OutP($3C... |
unit uProcessExecute;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Process, uStrUtils, uLog
{$IFDEF WINDOWS}
,windows
{$ENDIF};
type
TBatchToExecute = record
exec_param: string;
exec_wait_finish: boolean;
exec_timeout: string;
exec_write_log: boolean;
end;
... |
//=================================================================================
//如果使用该模块请保留该注释,如果被修改或编辑请将修改后的代码发送一份给我
//编写:戴琪英
//E_Mail:qiyingdai@163.com
//2000-09-01
//=================================================================================
unit R232Comm;
interface
uses
Windows,SysUtils;
const
... |
unit Atm.Services.Machine;
interface
uses
Atm.Services.CardReader,
Atm.Services.Communicator;
type
TAtmMachine = class
private
FCardReader: IAtmCardReader;
FCommunicator: IAtmCommunicator;
FWithdrawalEnabled: Boolean;
public
constructor Create(ACardReader: IAtmCardReader;
... |
unit xe_JON011;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, cxGraphics, cxControls, cxLookAndFeels, IniFiles,
cxLookAndFeelPainters, cxContainer, cxEdit, Vcl.Menus, cxGroupBox,
Vcl.StdCtrls, cxButtons, cxTextEdit, cxMemo, Vcl.ExtCtrls, cxLabel, cxCheckBox... |
unit DES_OO_common;
interface
uses
SysUtils, Classes, Dialogs, Variants, ComObj;
type
TdmDES_OO_Common = class(TDataModule)
private
{ Private declarations }
public
ServiceManager,
Desktop,
LoadParams: variant;
// funkce pro práci s OpenOffice (LibreOffice)
function IsNullEmpty(aVariant: v... |
unit RTF_ListaKursowTaksowki;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Grids, StdCtrls, ExtCtrls, JvUIB, JvUIBLib;
type
TFrmListaKursowTaksowki = class(TForm)
PnlButtons: TPanel;
Button1: TButton;
GrdKursy: TStringGrid;
procedure Form... |
Unit HighScr;
Interface
Procedure HS_Init(iNum: byte; ifn: string; icode: byte);
{Initializes the highscore manager}
{ iNum: byte - The number of scores to keep track of. Setting iNum to 0}
{ makes the program use however many scores it finds in the}
{ list file}
{ ifn: string - The fi... |
unit RKAPI;
interface
uses SysUtils, Classes, IdHTTP;
function HTTPGetImage(const AImageURL: string; AResponse: TStream): Boolean;
function HTTPRequestRKRegisterAccount(const AUser, APass, AEMail: string): string;
function RKRegisterAccount(const AUser, APass, AEMail: string;
var AResultText: string): B... |
// ----------------------------------------------------------------------------
// Unit : PxUtils.pas - a part of PxLib
// Author : Matthias Hryniszak
// Date : 2004-12-03
// Version : 1.0
// Description : Routines that cannot be qualified elswhere.
// Changes log : 2004-12-03 - initial ver... |
unit Marvin.Utils.VCL.StyleManager;
{
MIT License
Copyright (c) 2018-2019 Marcus Vinicius D. B. Braga
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including wit... |
{$include kode.inc}
unit kode_widget;
{
* on_paint:
we intersect with ARect (original redraw rectangle) for every
widgets.. we should intersect with 'current visible rect' instead :-/
perhaps:
assume we're always clipping, but only call canvas.clip if widget has
clip-flag on.. sothat we keep trac... |
unit Main;
interface
uses
Winapi.Windows,
Winapi.Messages,
System.SysUtils,
System.Variants,
System.Classes,
Vcl.Graphics,
Vcl.Controls,
Vcl.Forms,
Vcl.Dialogs,
Vcl.ExtCtrls,
Vcl.StdCtrls,
REST.Json,
Redis.Commons,
Redis.Client,
Redis.NetLib.INDY,
Redis.Values
;
type
TExemplo... |
{
Copyright (C) 2013-2018 Tim Sinaeve tim.sinaeve@gmail.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable... |
{
ORM Brasil é um ORM simples e descomplicado para quem utiliza Delphi
Copyright (c) 2016, Isaque Pinheiro
All rights reserved.
GNU Lesser General Public License
Versão 3, 29 de junho de 2007
Copyright (C) 2007 Free S... |
unit EditVideo;
interface
uses
Generics.Collections, System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.Layouts, FMX.Objects,
FMX.Edit, FMX.ListBox,
EditVideoController,
Video;
type
TfrmEditVideo = class(TForm)
... |
unit ormbr.container.objectset;
interface
uses
Rtti,
Generics.Collections,
/// ormbr
ormbr.container.objectset.interfaces,
dbebr.factory.interfaces,
ormbr.objectset.adapter;
type
TContainerObjectSet<M: class, constructor> = class(TInterfacedObject, IContainerObjectSet<M>)
protected
FOb... |
{
wzsTools components
(c) Protasov Serg
wzonnet.blogspot.com
wzff.livejournal.com
wzonnet@kemcity.ru
}
unit u_wzsMonthDBEdit;
interface
uses
SysUtils, Classes, Controls, StdCtrls, Mask, DBCtrlsEh, ToolCtrlsEh, Dialogs,
{$ifdef ver150} Variants, {$endif}
Windows, u_wzsToolsCommon;
resourcest... |
unit PageMangerFolderForm;
interface
uses
Forms, PageMangerLib, cxLookAndFeelPainters, Classes, ActnList,
cxMaskEdit, cxDropDownEdit, cxCheckBox, cxMemo, cxControls, cxContainer,
cxEdit, cxTextEdit, StdCtrls, cxButtons, Controls, ExtCtrls;
type
TFolderForm = class(TForm)
Panel2: TPanel;
P... |
{ -------------------------------------------------------------------------------------}
{ An "Export Query" component for Delphi32. }
{ Copyright 1996, Jean-Fabien Connault. All Rights Reserved. }
{ This component can be freely used and distributed i... |
{ //************************************************************// }
{ // Projeto MVCBr // }
{ // tireideletra.com.br / amarildo lacerda // }
{ //************************************************************// }
{ // Data: 03/03/2017 ... |
{*******************************************************}
{ }
{ NTS Aero UI Library }
{ Created by GooD-NTS ( good.nts@gmail.com ) }
{ http://ntscorp.ru/ Copyright(c) 2011 }
{ License: Mozilla Pu... |
unit Guide;
{*******************************************************}
{ }
{ On screen rulers }
{ Window for each guide }
{ }
{ Co... |
procedure intercambio (x,y:rango_vec; var v: vectorNumeros); //pensando como los modulos intercambiar de practicas anteriores pero aplicando vectores
var
aux:integer;
begin
aux:= v[x]; //guarda el num de la pos x
v[x] := v[y]; //guarda en la pos x lo que esta en la pos y
v[y]... |
unit LuaDiagram;
{$mode delphi}
interface
uses
Classes, SysUtils, lua, lualib, lauxlib,LuaHandler, diagram, diagramblock,
diagramlink, diagramtypes, typinfo, betterControls;
procedure initializeLuaDiagram;
function lua_toDiagramBlockSideDescriptor(L: PLua_state; index: integer): TDiagramBlockSideDe... |
{----------------------------------------------------------------------
DEVIUM Content Management System
Copyright (C) 2004 by DEIV Development Team.
http://www.deiv.com/
$Header: /devium/Devium\040CMS\0402/Source/PhotoGallery/pgImageForm.pas,v 1.3 2004/04/10 07:12:11 paladin Exp $
--------------... |
{
ORM Brasil é um ORM simples e descomplicado para quem utiliza Delphi
Copyright (c) 2016, Isaque Pinheiro
All rights reserved.
GNU Lesser General Public License
Versão 3, 29 de junho de 2007
Copyright (C) 2007 Free S... |
unit UMyBackupDataInfo;
interface
uses UFileBaseInfo, Generics.Collections, UDataSetInfo, UMyUtil, DateUtils;
type
{$Region ' 数据结构 ' }
// 备份 Item 信息
TBackupItemInfo = class
public // 路径信息
BackupPath : string;
IsFile : Boolean;
public // 可选状态
IsDisable, IsBackupNow : Boolean;
public // 自动... |
unit uSysConfig;
interface
uses
Classes, SysUtils, IniFiles, Forms, Windows;
const
csSystemSection = 'system';
csSkinSection = 'skin';
{Section: system}
csSystemName = 'sys_name';
csSystemTime = 'sys_time';
{Section: skin}
csSkinName = 'skin_name';
type
TSysConfig = class(TObject)
private
... |
unit Model.ExtraviosMultas;
interface
type
TExtraviosMultas = class
private
var
FID: Integer;
FDescricao: String;
FNN: String;
FAgente: Integer;
FValorProduto: Double;
FData: TDate;
FMulta: Double;
FVerba: Double;
FTotal: Double;
FRestricao: ... |
unit teste.dao.cliente;
interface
uses
Winapi.Windows,
Winapi.Messages,
System.SysUtils,
System.Variants,
teste.classes.cliente,
teste.dao.objects,
Datasnap.Provider,
Datasnap.DBClient
;
type
TdaoCliente = class
private
public
class procedure getCliente(var oclass: TClienteClass);
... |
unit Topolist;
interface
uses BaseObjects, Registrator;
type
// топографический лист
TTopographicalList = class(TRegisteredIDObject)
public
constructor Create(ACollection: TIDObjects); override;
end;
TTopographicalLists = class(TRegisteredIDObjects)
private
function GetItems(Index: Integer): TT... |
{ Copyright (C) <2005> <Andrew Haines> chmfilewriter.pas
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
... |
unit UMyRestoreFileInfo;
interface
uses UModelUtil, Generics.Collections, UChangeInfo, UMyUtil, Classes, SysUtils, UDataSetInfo;
type
{$Region ' 数据结构 ' }
// Restore Item 信息
TRestoreItemInfo = class
public
RestorePath, RestorePcID : string;
SavePath : string;
public
IsEncrypted : Boolean;
... |
unit uTheme;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Buttons, ExtCtrls, uTopicModel, Menus, ActnList;
type
TfrmTopics = class(TForm)
pnlLinks: TPanel;
pnlTopic: TPanel;
ScrollBox: TScrollBox;
img: TImage;
Panel4: TPanel;
btPrev... |
unit Test1ExceptionUnit;
interface
uses
System.Generics.Collections,SysUtils,Dialogs,
TestsUnit,Test1Unit;
type
Test1Exception = class(TInterfacedObject, Tests)
private
/// <link>aggregation</link>
TestSource: Test1;
public
procedure setTest(caption:string);
function getQuest:TList<String... |
unit frm1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls
, httpsend, ssl_openssl;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
proc... |
uses math;
type
point = record
x,y: extended; //(x,y)
end;
segment = record
p1,p2: point; //segment with p1 and p2 as endpoints
end;
function distance(a,b:point):extended;
begin
exit(sqrt(sqr(a.x-b.x)+sqr(a.y-b.y)));
end;
function length(s:segment):extended;
begin
exit(... |
unit utCns_cadastro;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, uTBaseDados;
Type
{ TCns_Cadastro }
TCns_Cadastro = class (TBasePesquisa)
private
FID : Integer;
FRazaoSocial : String;
FCNPJ : String;
protected
procedure RetornaFiltro;... |
(******************************************************************************
* PasVulkan *
******************************************************************************
* Version see PasVulkan.Framework.pas ... |
unit rcArrayManager;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, ArrayManager, rcObject;
type
{ TRCArrayManager }
TRCArrayManager = class(TArrayManager)
protected
function GetItem(index: Integer): TRCObject;
public
property Item[index: Integer]: TRCObject read GetItem;
function Get... |
uses Objects;
type
TDirName = Pstring;
PDirTree = ^TDirTree;
TDirTree = record
name: TDirName;
nextdir: PDirTree;
firstsubdir: PDirTree;
end;
var
stop : boolean;
procedure NoMem;
begin
writeln ('Error: Cannot allocate memory!');
stop := true;
end;
function C... |
unit DAO.Usuarios;
interface
uses DAO.Base, Model.Usuarios, Generics.Collections, System.Classes;
type
TUsuariosDAO = class(TDAO)
public
function Insert(aUsuarios: Model.Usuarios.TUsuarios): Boolean;
function Update(aUsuarios: Model.Usuarios.TUsuarios): Boolean;
function Delete(iID: System... |
unit ConfigsController;
interface
uses
Configs, Generics.Collections, Aurelius.Engine.ObjectManager,
ControllerInterfaces;
type
TConfigsController = class(TInterfacedObject, IController<TConfigs>)
private
class var FConfigsCtr: TConfigsController;
FManager: TObjectManager;
public
... |
unit uScheduler;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, DateUtils, strutils;
type
TSchedulerEvent = record
ev_days_of_month: string; // 1,2,5,10,24,31
ev_days_of_week: string; // 1,2,5
ev_repeat_type: integer; // 1-once per day, 2-every X seconds
ev_repeat_interval:... |
unit SoundManager;
interface
uses
System.Generics.Collections,
Bass;
type
eSound = (sBackground, sClick, sAward, sWrong);
TSoundManager = class
private
lts: array[0..3] of TList<HSTREAM>;
mst, bgst: HSTREAM;
bgSync: HSYNC;
fail: boolean;
Vol:single;
procedure setVol(v:single); over... |
procedure Reduce(var c:Trational);
var
n, d: integer;
begin
n:= abs(c.num);
d:= c.den;
if (n*d)<>0 then begin
repeat
if n > d then n := n mod d
else d := d mod n;
until (n = 0) or (d = 0);
c.num:= c.num div (n+d);
c.den:= c.den div (n+d)
end
end; |
unit HostsForm;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
RootProp, ComCtrls, StdCtrls, ExtCtrls, Mask;
type
TformHosts = class(TformRootProp)
tshtGeneral: TTabSheet;
Label1: TLabel;
Bevel1: TBevel;
Label2: TLabel;
editHostDesc: T... |
// Copyright 2018 by John Kouraklis and Contributors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unle... |
unit AsmInstruction;
{$SCOPEDENUMS ON}
interface
uses
stdlib,
Generics.Collections;
const
ASM_MAXBUFSIZE = 256;
type
TAsmBuffer = array[0..ASM_MAXBUFSIZE-1] of AnsiChar;
TAsmPrefix = (
NONE, // NO PREFIX
LOCK, // LOCK F0
REP, // REP/REPE/REPZ F3
REPNEZ /... |
PROGRAM TestOfReadNumber(INPUT, OUTPUT);
VAR
N: INTEGER;
PROCEDURE ReadDigitOrMinus(VAR F: TEXT; VAR D: INTEGER; VAR Minus: BOOLEAN);
VAR
Ch: CHAR;
BEGIN {ReadDigitOrMinus}
D := -1;
IF (NOT EOLN(F))
THEN
BEGIN
Minus := FALSE;
READ(F, Ch);
IF (Ch = '0') THEN D := 0 ELSE
IF (Ch = '1... |
unit uSmiley;
interface
uses
Classes
, Graphics
, Controls
, uSmileyConsts
, System.SysUtils
;
type
/// <summary>
/// The enumeration that defines the different moods (faces) that a <c>TSmiley</c> has.
/// </summary>
TMood = (smHappy, smSad, smShades, smTongue, smIndifferent, smOoh, smFrazzle... |
unit HashLib;
interface
uses Queue,Dialogs,SysUtils;
const SizeHashTable=10;
type
TElement=record
Info : TMYQueue;
empty : boolean;
end;
THashTable=class
public
constructor Create;
destructor Destroy;
procedure Add(Newinfo:TInfo);
function Find(FindInfo:TInfo):Integer;
procedure ... |
{
ORM Brasil é um ORM simples e descomplicado para quem utiliza Delphi
Copyright (c) 2016, Isaque Pinheiro
All rights reserved.
GNU Lesser General Public License
Versão 3, 29 de junho de 2007
Copyright (C) 20... |
unit TNT_Entity;
// Gestion des entites
// -------------------
// Tous les elements du moteur sont des entites: objets, particules, landscape,
// skybox, lights, camera. Les entites sont controlees par le moteur physique,
// sauf si Mass=0. Une entite peut etre liee à une autre entitee (utile pour
// la cam... |
unit SynEditMarkupFoldColors;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils,Graphics, SynEditMarkup, SynEditMiscClasses, Controls,
LCLProc, SynEditHighlighter, SynEditHighlighterFoldBase;
type
PMarkupFoldColorInfo = ^TMarkupFoldColorInfo;
TMarkupFoldColorInfo = record
Y, X, X2: Int... |
(*
Copyright 2016 Michael Justin
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... |
// ----------------------------------------------------------------------------
// Warning: this unit requires DUnit to compile
// ----------------------------------------------------------------------------
unit PxTestRunner;
interface
uses
Classes, SysUtils, TestFramework;
type
TPxTestRunnerBehavi... |
{*******************************************************************************
作者: dmzn@163.com 2008-08-07
描述: 系统数据库常量定义
备注:
*.自动创建SQL语句,支持变量:$Inc,自增;$Float,浮点;$Integer=sFlag_Integer;
$Decimal=sFlag_Decimal;$Image,二进制流
*******************************************************************************... |
{-------------------------------------------------------------------------------
Unit: UAlphaVantageAPI
Purpose: Wrapper for the Alpha Vantage API
Author: Andre Penedo
Date: 2020-May-21
Version: 1.0
-------------------------------------------------------------------------------}
unit UAlphaVantageAPI;
... |
unit Atm.Services.CardReader;
interface
type
{$M+}
IAtmCardReader = interface
['{B035A619-4D37-4EC1-AE1C-8AC8F1AFD0E7}']
function CheckForValidPin(const APin: string): Boolean;
end;
{$M-}
function CreateCardReader: IAtmCardReader;
implementation
uses
System.SysUtils,
System.Blue... |
unit Server.Functions.Diversas;
interface
uses //Winapi.Windows, Winapi.Messages,
System.SysUtils,
System.Classes;
type
TFunctionsDiversos = class
public
class function SomenteNumeros(const pDados: String): String;
class procedure ShowMessageDesenv(msg: string);
class procedure addLog(Erro: strin... |
unit RepositoryContato;
interface
uses
DB, Classes, Repository, classContato, RepositoryBase,
InterfaceRepositoryContato,
InterfaceRepository, Context, EF.Mapping.Base,EF.Core.Types, EF.Engine.DataContext,
System.Generics.Collections;
type
TRepositoryContato = class(TRepositoryBase ,IRepositoryContato)
... |
program Project1;
{$MODE Delphi}
{$APPTYPE CONSOLE}
uses
SysUtils, Classes, StrUtils;
type
PTreeElement = ^TTreeElement;
TTReeElement = record
ID : cardinal;
Question,Answear : string;
PYes,PNo : PTreeElement;
FirstChild,NextSibling,Parent : PTreeElement;
end;
function Yes():boolean;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.