Search
Results 141 to 160 for string formatting.
- PascalMagick
ThrowWandException(wand: PMagickWand); var description: PChar; severity: ExceptionType; begin description : MagickGetException(wand, @severity); WriteLn(Format('An error ocurred. Description: %s', description )); description : MagickRelinquishMemory(description); Abort; end; var status: MagickBooleanType; wand ... pascal unit magicklcl; $mode objfpc $H+ interface uses Classes, SysUtils, Graphics; procedure LoadMagickBitmap(FileName: string; Bmp: TBitmap); overload; procedure LoadMagickBitmap(Strm: TMemoryStream; Bmp: TBitmap); overload; implementation uses magick_wand, ImageMagick
- The code above each line explained and heavily commented
compiler to use the Free Pascal "Object Pascal" mode. // $H+ means "use long strings" by default (AnsiString instead of ShortString). interface // Start of the INTERFACE section: declarations visible to other ... Classes, // Basic component and streaming support (TComponent, etc.) SysUtils, // Common system utilities (file ops, formatting, exceptions) Controls, // Base visual control classes (TControl, TCustomControl, etc.) Graphics, // Drawing classes/types (TCanvas, TColor
- How to write in-memory database applications in Lazarus/FPC/ru
pascal procedure SaveToCsv(DataSet:TDataSet); var myFileName:string; myTextFile: TextFile; i: integer; s: string; begin myFileName: DataSet.Name+'.txt'; //создаем новый файл AssignFile(myTextFile, myFileName); Rewrite(myTextFile); s : ''; //инициализируем пустую строку ... полей (как заголовки столбцов) for i : 0 to DataSet.Fields.Count - 1 do begin s : s + Format('%s,', DataSet.Fields i .FieldName ); end; Writeln(myTextFile, s); DataSet.First; //записываем значения полей while not DataSet.Eof
- MacOS property list files
deserialization. Data types Property lists consist only of certain types of data: dictionaries, arrays, strings, numbers (integer and float), dates, binary data, and Boolean values. Dictionaries and arrays are special ... classes, Core Foundation types, and XML elements for collection objects and value objects. Data formats You can write property lists out in XML, JSON and binary formats. The binary format
- JVCL Components
TStrings properties and event handlers in form designer and hold a number of strings in your forms. - TJvSpellChecker : a spell-checker class with sample dictionaries for English and Dutch ... from Jan Verhoeven's own repository). - ! (/_files/Tjvmarkupviewer.png) JvMarkupViewer and ! (/_files/Tjvmarkuplabel.png) JvMarkupLabel : display simple HTML-formatted text (font-related tags only). Similar to JvHTControls. - ! (/_files/Tjvgridfilter.png) TvGridFilter : a component for filtering rows
- CudaText
plugins are not affected. plugintranslation : Translation of plugin strings to different languages. This includes translation of strings from Python code, and strings from "install.inf" files. themes : UI/syntax themes ... name" in PHP and Bash. - IdBad: Incorrect/misslepped id. - String: String literals. - String2: String literals, used e.g. for RegEx constants. - String3: String literals, one more kind, rarely used. - Symbol: Non-word
- TShellListView
OnGetCellText event: pascal procedure TForm1.ShellListViewCellTextHandler(Sender: TObject; AItem: TShellListItem; AColumn: TShellListColumn; var AText: String); var sz: TPoint; slv: TShellListView; begin slv : Sender as TShellListView; if (AColumn.ColumnID cidCustom) and (AColumn.CustomID ... SameText(ExtractFileExt(AItem.FileInfo.Name), '.jpg') then begin if GetImageSize(slv.GetPathFromItem(AItem), sz) then AText : Format('%d x %d', sz.X, sz.Y ); end; end; Sorting Basically, the items in the ShellListView
- Everything else about translations
translated the old translation may not match the new meaning. Indeed, for the new string probably 'Colores' may be a better translation. The automatic update tool notices this situation ... msgid "Syntax highlight" msgctxt "lazarusidestrconsts.dlgedcolor" msgid "Colors" msgstr "Color" In terms of .po file format, the " ," prefix means the entry has a flag (fuzzy) and translator programs may present
- FPReport FAQ
Lazarus trunk repo too. Expression and Variables If you use float variables and string values on a non-English configured system you will have problems with the comma ... computer). All results will have a dot instead of the the configured value in format setting. This is by design (see Bug report 0036545 and 0036525)! Explanation: The Value property
- Dialog Examples
const ACaption, APrompt: string; var Value: string): Boolean; - function PasswordBox(const ACaption, APrompt : String) : String; Each of these components causes a small popup box to be displayed, which contains some ... press or some text entry or both. The programmer has little control over the format, size or position of these popup boxes, but can influence their textual content.\ The reason
- TSQLExporter
implementation procedure myForm.btnExportClick(Sender: TObject); begin ExportTable( 'mytable' ); end; procedure myForm.ExportTable( const tblnam: string ); var ts: TStringStream; begin try ts : TStringStream.Create( '' ); myTransaction.Database : myConnector; myQuery.Database : myConnector; myExporter.DataSet : myQuery; myQuery.SQL.Text : 'SELECT FROM ... TableName : tblnam; // exporter uses tablename in insert statements DateFormat : 'YYYY-MM-DD'; // SQL date format DateTimeFormat : 'YYYY-MM-DD hh:mm:ss'; // end; myExporter.ExportToStream( ts ); myScriptText.Text : ts.DataString; //show formatted script
- Lazarus 0.9.30 release plan
should be visible in taskbar all the time. - r28823 - Gtk2, fixed crash when printf() formatting chars passed into message dlg text eg. %.Fixes bug 18313. - r28824 - carbon: fix font selection ... r28826 - win32: fix TStaticText bugs - r28828 - Translations: French, Lithuanian - removed a couple of incorrect string translations, bug 18186. - r28830 - Fixes bug 17174 (http://bugs.freepascal.org/view.php?id 17174). - r28833 - IDE: improved project
- Lazarus 1.2.0 release notes
colors IDE_Window:_Editor_User_Defined_Words See here - Auto-continue for comments and strings - Inactive code in $IFDEF can be "low-lighted" (greyed out) - Markup/Highlight colors can be merged ... file type before the image data. This allows seamless use of various file formats (.jpg, .bmp,...). Delphi does not save information about the file type. To allow programmers
- Logging exceptions
generate debug information using switches: - \-g - generate debug information (in the default output format for the platform concerned, which is dwarf2 on a lot of platforms) - \-gl - generate line numbers ... contains some stack related routines: pascal function SysBackTraceStr(Addr:Pointer): ShortString; // Default address to string converter assigned to BackTraceStrFunc procedure Dump_Stack(var f : text;bp:pointer); // Dump stack
- LazMapViewer-Plugins
implementation TMeasureDistPlugin procedure TMeasureDistPlugin.AfterPaint(AMapView: TMapView; var Handled: Boolean); var ptAnchorScreen, ptCurrentScreen : TPoint; s : String; r : Integer; begin if FMeasureActive then begin MapView.Canvas.Pen.Style: psSolid; MapView.Canvas.Pen.Width: 3; ptAnchorScreen : MapView.LatLonToScreen(FAnchorCoord); ptCurrentScreen ... ptAnchorScreen.X+r,ptAnchorScreen.Y+r); MapView.Canvas.Pen.Color: clRed; MapView.Canvas.Ellipse(ptCurrentScreen.X-r,ptCurrentScreen.Y-r, ptCurrentScreen.X+r,ptCurrentScreen.Y+r); s : Format('%1.1f Km', FDistance ); MapView.Canvas.TextOut(ptCurrentScreen.X+10, ptCurrentScreen.Y+10, s); end; end; procedure TMeasureDistPlugin.MouseMove(AMapView
- LazPaint LZP directory structure
LazPaint LZP directory structure directory structure contains additional information about the LazPaint LZP Format layered image , in particular originals used to render the layers. It can be discarded by raster ... layers from vector originals. Global header Offset Size Content ------ ---- ------------------------------------------------------- 0 16 Contains the string 'TMemDirectory' followed by the bytes 1A 00 00 16 8 Root 64-bit offset
- Creating bindings for C libraries
pasbody pasbody:gsub("(%b )", function(m1) return 'begin' .. trimChars(m1, ' ', ' ') .. 'end;' end) --strings and escaped characters tblEscapedCahrs '\\"', '"' , '\\\\', '\\' , '\\t', "' 9" , '\\n', "' 10'" , '\\f', "' 12'" , pasbody pasbody:gsub('%b""', function(m1) return ... tblEscapedCahrs) do pasbody pasbody:gsub(v 1 , v 2 ) end --common functions/procedure tblOrigFuncNewFunc 'printf', 'format' , 'malloc', 'GetMem' , 'free', 'Dispose' , 'memcpy', 'Move' , for k,v in pairs(tblOrigFuncNewFunc) do pasbody pasbody
- Creating bindings for C libraries/ru
pasbody pasbody:gsub("(%b )", function(m1) return 'begin' .. trimChars(m1, ' ', ' ') .. 'end;' end) --strings and escaped characters tblEscapedCahrs '\\"', '"' , '\\\\', '\\' , '\\t', "' 9" , '\\n', "' 10'" , '\\f', "' 12'" , pasbody pasbody:gsub('%b""', function(m1) return ... tblEscapedCahrs) do pasbody pasbody:gsub(v 1 , v 2 ) end --common functions/procedure tblOrigFuncNewFunc 'printf', 'format' , 'malloc', 'GetMem' , 'free', 'Dispose' , 'memcpy', 'Move' , for k,v in pairs(tblOrigFuncNewFunc) do pasbody pasbody
- LazPaint LZP Format
Content ------ -------------------- 0 File header ? Thumbnail (optional) ? Flat image ? Layer structure (optional) Note: some old formats do not have a header and start directly with the flat image. Image readers ... flat image. File header Offset Size Name Content ------ ---- ------------------ ------------------------ 0 8 magic Always contains the string 'LazPaint' 8 4 zero1 Contains the number 0 12 4 headerSize Size of this header
- FPC and Apache Modules
parms; struct_ptr: Pointer; const arg: PChar): PChar; cdecl; external LibHTTPD name 'ap_set_string_slot'; This is the same as AP_DECLARE, but the calling convention is cdecl ... combinations APR_DECLARE_NONSTD(int) apr_file_printf(apr_file_t fptr, const char format, ...) function apr_file_printf(fptr: Papr_file_t; const format: PChar; others: array of const