C++ Builder

Learn To Build A Python GUI For Working with 2D Graphics And The Matplotlib Library In A Delphi Windows App

Drawing graphics programmatically is a very popular task these days. You can easily solve it using Matplotlib library with Python4Delphi (P4D). P4D is a free set of instruments that allows you to work with Python scripts, modules and types in Delphi. In this post, we will look at how to run Matplotlib library using Python for Delphi. With Delphi and C++Builder and Python4Delphi, you can build Python GUI apps for Windows using various Python libraries. Open project Demo1 to run the Python script in Python for Delphi. Use Memo1 for Python script and Memo2 for results. Click Execute button for running the script. Download Demo1 source from GitHub. If you run into a floating point division error when executing the code run MaskFPUExceptions(True); before you call ExecStrings. procedure TForm1.Button1Click(Sender: TObject); begin PythonEngine1.ExecStrings( Memo1.Lines ); end; procedure TForm1.Button1Click(Sender: TObject); begin PythonEngine1.ExecStrings( Memo1.Lines ); end; Python Matplotlib library provides various tools for working with 2D graphics. With this library, you can create graphics, customize legends, style sheets, color schemes, and manipulate images. There are examples of code from the Matplotlib below. Draw a plot You can draw very simple plots with Mathplotlib. Or, if you want, you can change the shape and color of the points in the graphic in different ways. In the following example, we will draw the green triangular points using the argument ‘g^’  in function plot(). import matplotlib.pyplot as plt import numpy as np t = np.arange(0., 5., 0.2) plt.plot(t, ‘g^’) plt.show() import matplotlib.pyplot as plt import numpy as np t = np.arange(0., 5., 0.2) plt.plot(t, ‘g^’) plt.show() Stacked bar chart In this example, we show how to draw a stacked bar plot. We will use the function bar() twice. We need to pass to this function such parameters as labels, values of various categories that need to be displayed, names of labels. Finally, we will set such graphic parameters as title, y-label. import matplotlib.pyplot as plt labels = [1, 2, 3, 4, 5] cat1_means = [14, 39, 30, 19, 54] cat2_means = [43, 62, 52, 51, 29] width = 0.35 fig, ax = plt.subplots() ax.bar(labels, cat1_means, width, label=’Cat1′) ax.bar(labels, cat2_means, width, bottom=cat1_means, label=’Cat2′) ax.set_ylabel(‘Scores’) ax.set_title(‘Scores by product cutegories’) ax.legend() plt.show() import matplotlib.pyplot as plt labels = [1, 2, 3, 4, 5] cat1_means = [14, 39, 30, 19, 54] cat2_means = [43, 62, 52, 51, 29] width = 0.35 fig, ax = plt.subplots() ax.bar(labels, cat1_means, width, label=‘Cat1’) ax.bar(labels, cat2_means, width, bottom=cat1_means, label=‘Cat2’) ax.set_ylabel(‘Scores’) ax.set_title(‘Scores by product cutegories’) ax.legend() plt.show() Draw curves and fill the area In this example, we use the function plot() again to build a graphic of cos(x). Then we fill the area in green color between two curves using function fill_between(). Pass parameters x, y1 and y2 to determine the curve and exclude some horizontal regions from being filled using parameter where. import matplotlib.pyplot as plt import numpy as np fig, ax = plt.subplots() x = np.arange(0, 7 * np.pi, 0.1) y = np.cos(x) ax.plot(x, y, color=’black’) ax.fill_between(x, 0, 1, where=y > 0.75, color=’green’, alpha=0.5, transform=ax.get_xaxis_transform()) plt.show() import matplotlib.pyplot as plt import numpy as np fig, ax = plt.subplots() x = np.arange(0, 7 * np.pi, 0.1) y = np.cos(x) ax.plot(x, y, color=‘black’)   ax.fill_between(x, 0, 1, where=y > 0.75,                 color=‘green’, alpha=0.5, transform=ax.get_xaxis_transform()) plt.show() We got acquainted with some of the Matplotlib library’s features. Go here, […]

Read More

Learn To Build A Python GUI For Processing Images With Pillow Library In A Delphi Windows App

Are you looking for a simple way to process images programmatically? You can do it with Python for Delphi using Pillow library. Python for Delphi (P4D) is a free tool that allows you to execute Python scripts, create new Python modules and types in Delphi. This post will guide you on how to run Pillow library code using Python for Delphi. You can easily build Python GUI apps using your favorite Python libraries for Windows using Delphi and C++Builder and Python4Delphi. In order to run the Python script in Python for Delphi, open and run project Demo1. Then insert the script into lower Memo, click Execute button, and get the result in upper Memo. You can find the Demo1 source on GitHub. procedure TForm1.Button1Click(Sender: TObject); begin PythonEngine1.ExecStrings( Memo1.Lines ); end; procedure TForm1.Button1Click(Sender: TObject); begin   PythonEngine1.ExecStrings( Memo1.Lines ); end; With Pillow library, you can perform geometric and color transformations. It also allows to cut, copy part of the image and merge several images into one. Let’s take a look at some examples. Open, show, and get image properties First, open the image using function open(). You can get image properties such as format, size, type. from __future__ import print_function from PIL import Image im = Image.open(“test.jpg”) print(im.format, im.size, im.mode) im.show() from __future__ import print_function from PIL import Image im = Image.open(“test.jpg”) print(im.format, im.size, im.mode) im.show() Create thumbnails thumbnail() function allows you to create an image thumbnail. The input parameters of this function are the size of the image that you want to get in pixels. Use save() function to save the image in a specified directory. from __future__ import print_function from PIL import Image import os path = “test.JPG” im = Image.open(path) size = (250, 250) outfile = os.path.splitext(path)[0] + “.thumbnail” im.thumbnail(size) im.save(outfile, “JPG”) from __future__ import print_function from PIL import Image import os   path = “test.JPG” im = Image.open(path) size = (250, 250) outfile = os.path.splitext(path)[0] + “.thumbnail”   im.thumbnail(size) im.save(outfile, “JPG”) Geometrical transformations Function transpose() allows you to perform different geometrical transformations with the image. For example, you can rotate the image by a given angle or flip it horizontally and vertically. from __future__ import print_function from PIL import Image im = Image.open(“test.jpg”) box = (0, 0, 320, 426) region = im.crop(box) region = region.transpose(Image.ROTATE_180) region = region.transpose(Image.FLIP_LEFT_RIGHT) im.paste(region, box) im = im.rotate(45) im.save(“test2.jpg”) from __future__ import print_function from PIL import Image im = Image.open(“test.jpg”) box = (0, 0, 320, 426) region = im.crop(box) region = region.transpose(Image.ROTATE_180) region = region.transpose(Image.FLIP_LEFT_RIGHT) im.paste(region, box) im = im.rotate(45) im.save(“test2.jpg”) Change images colors Now let’s look at how to change image color. Function split() allows you to decompose the image into separate colors and work with each color separately. In the following example first, we split the image into separate parts by color. Then select the area where the green value is less than 150. At the next step, we increase the blue value by 0.5. In the end, we merge everything into a new image. source = im.split() R, G, B = 0, 1, 2 mask = source[G].point(lambda i: i source = im.split() R, G, B = 0, 1, 2 mask = source[G].point(lambda i: i 150 and 255) out = source[B].point(lambda i: i * 0.5) source[R].paste(out, None, mask) source[B].paste(out, None, mask) im = Image.merge(im.mode, source) Now you can make various modifications […]

Read More

Quickly Migrate and Modernize Your Delphi/C++ Apps Using FastReport With Windows High DPI Setup

Display panel manufacturers have packed an increasing number of pixels into each unit of physical space on their panels resulted in the dots per inch (DPI) of modern display panels. In the past, most displays had 96 pixels per linear inch of physical space (96 DPI); in 2017, displays with nearly 300 DPI or higher are readily available. Variety of monitors like SD, Full HD, 4K Ultra HD, 8K Ultra HD in the market. We have laptops, desktops with small screens, and without display scale factor/DPI changes it’s very hard to use it and this can be even more complicated when talking about Full HD, 4K Ultra HD, 8K Ultra HD. Our application should be able to handle them. You cannot be sure what every user prefers. Some common scenarios where the display scale factor/DPI changes are: Multiple-monitor setups where each display has a different scale factor and the application is moved from one display to another (such as a 4K and a 1080p display) Docking and undocking a high DPI laptop with a low-DPI external display (or vice versa) Connecting via Remote Desktop from a high DPI laptop/tablet to a low-DPI device (or vice versa) Making display-scale-factor settings change while applications are running Desktop applications must tell Windows if they support DPI scaling. By default, the system considers desktop applications DPI unaware and bitmap-stretches their windows. By setting one of the Unaware, System, Per-Monitor, and Per-MonitorV2. available DPI awareness modes, applications can explicitly tell Windows how they wish to handle DPI scaling. When updating a System DPI-aware application to become Per-MonitorV2 aware, the code which handles UI layout needs to be updated such that it is performed not only during application initialization but also whenever a DPI change notification (WM_DPICHANGED in the case of Win32) is received. Things to know on migrating your Delphi Application to High DPI ? Set the DPI awareness Mode in Project->Options->Application->Manifest-DPI Awareness and Select Per-MonitorV2. Use Sceen.PixelsPerInch-primaryDispaly DPI Use TVirtualImageList instead of TImageList. Check all custom draw for absolute positions Use Control.CurrentPPI to get Current PPI of Control Mixed Mode for dialogs(SetThreadDPIAwarenesscontext) Use Form events OnBeforeMonitorDPIChanged/OnAfterMonitorDPIChanged. Note: Ensure backward compatibility for your platform and Delphi version of your application. Some of the Delphi And FastReport High DPI Controls: TControl: procedure such as ScaleforPPI, ChangScale, ScaleControlsForPPI helps for High DPI change. TFrxBAseForm: procedure such as UpdateResources, UpdateFormPPI, ProcessPreferences, and Message WM_DPICHANGED helps for FastReport form DPI change. TFrxDPIAwareCustomControl: procedure such as DoPPIChanged, GetScale, and Message WM_DPICHANGED_AFTERPARENT helps for FastReport custom control DPI change. Check out the Video Fast Migration to Windows 10 High DPI, below for Demonstration. Check the latest RAD Studio 10.4.1 Features which includes VCL Style Changes for High DPI.

Read More

Learn How To Use Auto-Typed Variables In C++ For Windows Development

auto-typed variables is a C++11 feature that allows the programmer to declare a variable of type auto, the type itself being deduced from the variable’s initializer expression. The auto keyword is treated as a simple type specifier (that can be used with * and &), and its semantics are deduced from the initializer expression. auto-typed Variables Examples int IntFnc() {} bool BoolFunc() {} char* CharSFunc() {} int _tmain(int argc, _TCHAR* argv[]) { // x is int auto x = IntFunc(); // y is const bool const auto y = BoolFunc(); // w is char* auto w = CharSFunc(); return 0; } int IntFnc() {} bool BoolFunc() {} char* CharSFunc() {}      int _tmain(int argc, _TCHAR* argv[]) {     // x is int     auto x = IntFunc();     // y is const bool     const auto y = BoolFunc();     // w is char*     auto w = CharSFunc();       return 0; } Multi-declarator auto The C++11 standard includes the multi-variable form of auto declarations, such as: int* func(){} int _tmain(int argc, _TCHAR* argv[]) { auto x = 3, * y = func(), z = 4; return 0; } int* func(){}   int _tmain(int argc, _TCHAR* argv[]) {         auto x = 3, * y = func(), z = 4;         return 0; } The restriction with multi-declarator auto expressions is that the variables must have the same base type. For example, the following line of code is well-formed: auto x = 3, y = *(new int); auto x = 3, y = *(new int); because x and y have the same base type : int, while the following code: will generate the error: [bcc64 Error] File1.cpp(11): ‘auto’ deduced as ‘int’ in declaration of ‘x’ and deduced as ‘double’ in declaration of ‘y’. This feature is supported by the Clang-enhanced C++ compilers. Check out all of the modern C++ language features supported in the latest C++Builder for Windows development.

Read More

Learn Useful Hints For Working With Styles To Build Visually Stunning Windows Applications

Want to style your Delphi/C++Builder applications with few steps? Want to view and choose your style before applying to your application? Don’t know how to do? This post will guide you. A style is a set of graphical details that define the look and feel of a VCL/FMX application. Similar to a theme in Windows. A style permits you to change the appearance of every part and state of a control.   Where are the styles on your computer? C:UsersPublicDocumentsEmbarcaderoStudio21.0Styles. Plenty of styles available under this folder, you can choose from here. Where can you get other styles from? Use Tools -> Get it Manager -> Styles -> Select one among them and install. After installing these styles can be found under this folder C:UsersPublicDocumentsEmbarcaderoStudio21.0Styles With folder names per platform like -> Android, iOS, macOS, Linux, and Win. Other these styles, we can get some third party Styles from DelphiStyles How to view your styles? Navigate to his folder, C:Program Files (x86)EmbarcaderoStudio21.0binVCLStyleViewer.exe and pass the parameter with the Style name with path. Similarly for FMX Styles use FMXStyleViewer.exe. Alternatively, you can open the style files, by right click-> open with ->Navigate to VCLStyleViewer.exe or FMXStyeViewer Accordingly. How to convert VCL-Styles to FMX- Styles? Open IDE->Tools->Bitmap Style Designer and open the existing VCL styles and then Save the file as FMX style with Option Save as type value “FireMonkey Style” How do I assign a style to the program? Place a TStyleBook component to the form. Double Click and open the style file from the location mentioned above. Save and close the Style Designer. Assign the Stylebook reference to Form StyleBook Property. Use TStyleBook.UseStyleManager property checked when more than one form created from the main form where StyleBook property is assigned. Note: For Dialogs in FMX the styles are not applied, we need to create custom dialogs. How do I assign a style per platform? On Double-clicking the TStyleBook -> Style designer contains the option Platform where you can choose your platforms. How to set styles for multi-platform in a single application? You can use style manager to set the styles at runtime, but we need to take care of checking the platform, and deployment as well. A Simple solution is to use different data modules for each platform and place TStyleBook in each platform, instantiate according to the platform. Check this full video of useful hints for working with styles. Check out the High DPI Styles and VCL Styling Per Control feature introduced in Latest RAD studio 10.4.1

Read More

Installing Component Packages Manually

Sometimes you need to install components manually. Maybe the installer wasn’t updated for your version of Delphi, or it is an open-source library without an installer. Whatever the reason, here is a short guide in addition to what is found in the DocWiki on the topic. I’m going to write this guide around installing the Radiant Shapes Pack available via GetIt. I’m guessing it wasn’t updated to install in 10.4 yet, and while R&D is working on that this is a great opportunity to learn how to install it manually. After installing from GetIt, you will not find it in the IDE, and it is missing from the packages list, which you access from Component 🡆 Install Packages while no project is open This is where all the BPL Packages are listed. Click the Add button and browse to find the BPL C:Program Files (x86)RaizeRadiantShapes1.4BinRadiantShapesFmx_Design270.bpl (If you don’t have that BPL or path for Radiant Shapes, then make sure you installed from GetIt and you can run the installer manually from C:UsersPublicDocumentsEmbarcaderoStudio21.0CatalogRepositoryRadiantShapes-270-1.2InstallerRadiantShapes.exe ) or whatever design-time package you need. This will install the components into the IDE. Many projects have both design time and runtime packages. A design-time package contains the information necessary to install in the IDE, and any special designers, while RunTime packages only contain the code necessary for use during RunTime. You can optionally even ship these packages with your binary to link them at runtime. Next, you need to tell the IDE where to find the DCUs and optionally source files. What if you only have source files? No problem, open and build all the packages at least in Release Mode on each platform the library suports. Then head to Tools 🡆 Options then Language 🡆 Delphi 🡆 Library. Then complete the details for each platform you built and want to support: Selected Platform – Specifies which platform you are providing details for below: Linux 64-bit, iOS 64-bit, Win 32-bit, Win 64-bit, macOS 64-bit, Android 32-bit, Android 64-bit, and/or iOS Simulator. Library Path – This is the path to the Release DCUs. Some people point to their PAS files here, which works, but then you end up recompiling the library more than necessary. Radiant Shapes includes all the DCUs in subfolders off the path C:Program Files (x86)RaizeRadiantShapes1.4Lib Tip: Paste the new path into the edit box before clicking the browse button if you need to browse to a subfolder. Then be sure to click [Add] when you are done. Library Paths Dialog Location of platform specific DCU folders for Radiant ShapesC:Program Files (x86)RaizeRadiantShapes1.4Lib Browsing Path is where you optionally add a path to the source PAS files. This lets you browse out to those source files from the IDE with the Find Declaration context menu item. For Radiant Shapes, the source is found in C:Program Files (x86)RaizeRadiantShapes1.4Source Debug DCU Path allows you to optionally point to the debug version of the DCUs. This is useful if the debug version has additional information or different behaviors. Radiant Shapes doesn’t have special debug DCUs so we don’t need to add anything here. Once you’ve completed these settings for each platform you are good to go! Happy installing!

Read More

Powerful PyDelphiWrapper To Wrap Your Delphi Objects To Python Objects Instantly With FireDAC Sample App

How about wrapping your Delphi Objects to Python Objects with a single line of code? Sounds Interesting? Yes, Python4Delphi has the flexibility to do that using a TPyDelphiWrapper component. This benefits Delphi Developers easily to wrap the existing or new Delphi Objects into Python Objects. This post will guide you on how to wrap a FireDAC TFDTable to a python Object and Manipulates with table data using python scripts. You can also use Python4Delphi with C++Builder. Python4Delphi Demo10_FireDAC Sample App shows how to wrap a Delphi Object(TFDTable, TFDQuery) to Python Object with some Examples as listed. You can find the Demo10_FireDAC source on GitHub. Prerequisites: Download and install the latest Python for your platform. Follow the Python4Delphi installation instructions mentioned here. Alternatively, you can check out this video Getting started with Python4Delphi. Components used in Python4Delphi Demo10_FireDAC App: TPythonEngine: A collection of relatively low-level routines for communicating with Python, creating Python types in Delphi, etc. It’s a singleton class. TPythonGUIInputOutput: Inherited from TPythonInputOutput (which works as a console for python outputs) Using this component Output property you can associate the Memo component to show the Output. TPythonModule: It’s inherited from TMethodsContainer class allows creating modules by providing a name. You can use routines AddMethod, AddMethodWithKW to add a method of type PyCFunction. You can create events using the Events property. TPyDelphiWrapper: Component that wraps the Delphi Object to Python Object inherited from TEngineClient. It has the capability to store Delphi class registration information, registration for Helper Types(not correspond to Delphi Classes), register python module functions, created event handlers. Wrap, WrapRecord, WrapInterface are the key methods to wrap Delphi Object, Record, and Interface respectively. TSynEdit: Syntax highlighting edit control, not based on the Windows common controls and supported on Windows. For some history check here. How to get and use SynEdit check here. TMemo: A multiline text editing control, providing text scrolling. The text in the memo control can be edited as a whole or line by line. Along with these components TFDConnection,TFDTable,TFDQuery, TDataSource were used. You can find the Python4Delphi Demo10_FireDAC sample project from the extracted GitHub repository ..Python4DelphiDemosDemo10_FireDAC.dproj. Open this project in RAD Studio 10.4.1 and run the application.- Implementation Details: PythonEngine component provides the connection to Python or rather the Python API. This project uses Python3.9 which can be seen in TPythonEngine DllName property. PythonGUIInputOutput component provides a conduit for routing input and output between the Graphical User Interface (GUI) and the currentlyexecuting Python script. PyDelphiWrapper component contains Module and Engine Property which is associated with PythonEngine and modDBFireDAC respectively. In Example 1, SynEditScript1 load the Python script file Example1.py and clicking Execute Button, connected to the database selected in the Combobox, and the script is executed. Example1.py imports the module modDBFireDAC, create an own TFDTable object, and manipulates the table values mentioned in the script. procedure TMain.btnExecuteExample1Click(Sender: TObject); var l_sConnName: String; begin l_sConnName := cobxConnSQLServer.Items[cobxConnSQLServer.ItemIndex]; if self.DBConnectionClosedCheck(l_sConnName) then begin with GetPythonEngine do begin ExecStrings( SynEditScript1.Lines ); end; end; end; procedure TMain.btnExecuteExample1Click(Sender: TObject); var l_sConnName: String; begin l_sConnName := cobxConnSQLServer.Items[cobxConnSQLServer.ItemIndex]; if self.DBConnectionClosedCheck(l_sConnName) then begin    with GetPythonEngine do begin      ExecStrings( SynEditScript1.Lines );    end; end; end; In Example 2, SynEditScript2 loads the Python script file Example2.py and clicking Execute Button, the script is executed. Example2.py imports the module modDBFireDAC shows you how to create a TFDTable object connected to an already created Delphi TFDTable (which may include calculated fields and the like). procedure TMain.btnExecuteExample2Click(Sender: TObject); […]

Read More

Quick Introduction To FireDAC And Its Features For Building Robust Delphi/C++ Builder Database Applications.

FireDAC is a powerful, yet easy-to-use access layer that supports, abstracts, and simplifies data access, providing all the features needed to build real-world high-load applications. FireDAC provides a common API for accessing different database back-ends, without giving up access to unique database-specific features and without compromising on performance. Use FireDAC in Android, iOS, Windows, and Mac OS X applications you are developing for PCs, tablets and smartphones. FireDAC Design Objectives and Architecture : FireDAC enables native high-speed direct access from Delphi and C++Builder.  Provides Universal Data Access i.e) Application built for a single data base can be used for other databases with very minimal changes at configuration. Highly configurable, using this you can fine tune your data access and it is important how your Software access with databases. Simple to deploy as no specific driver required, along with executable it is built. FireDAC local/embedded connectivity to certain local databases, including Microsoft Access database, SQLite database, InterBase ToGo / IBLite, InterBase on localhost, MySQL Embedded, MySQL Server on localhost, Advantage Database local engine, PostgreSQL on localhost, Firebird Embedded, and Firebird on localhost. Full source code provided, Developers can understand the underlying design and source code. Compatibility with the BDE means easy migration of legacy applications with reFind Utility. FireDAC Architecture Supported Database : InterBase, SQLite, MySQL, SQL Server, Oracle, PostgreSQL, IBM DB2, SQL Anywhere, Access, Firebird, Informix and more. Working With Database connections : Option 1: You can connect with any of the above listed Databases either from a Local Machine or Remote DBMS machine using the Data Explorer in the IDE. It is a tabbed pane that is located, along with the Projects Window and the Model View tabs, in the upper-right corner of the IDE window. Can use this, to create new connections, modifies, deletes, or renames your database connections.  The Data Explorer works for databases that use dbExpress or FireDAC connection types. The Data Explorer lets you browse database server-specific schema objects, including tables, fields, stored procedure definitions, stored functions, triggers, and indexes. FireDAC databases also display primary keys, foreign keys and generators. The Data Explorer presents a list of available database types (such as DATASNAP and MYSQL) that you can access and perform various actions on, using the context menus. With Data Explorer, you can easily create and manage database connections. Additionally, you can drag and drop data from a data source to a project to build your database application quickly. The commands available in the Data Explorer depend upon the object selected in the tree view. To display the associated context menu commands, right-click the following node types: You can also use Data Explorer to Obtain connection information, Check here. Option 2 : Create/Modify the connection via TFDconnection component by double clicking which will shows the editor same as Data explorer, where you can provide the DriverId, Username, Database name, Password etc. The connection string is stored in the TFDConnectionDefsparams and it is binded with application as hard-coded values. What if the database path changes after deployment of the application, you need to rebuild to avoid error in connection. To avoid such hard coded connection information, we can select the Connection Definition name in the TFDConnection editor, where Connection definition name need to be predefined and stored in the FDConnectiondefs.Ini file. The connection definitions for different databases are stored in the following fpath. C:UsersPublicDocumentsEmbarcaderoStudioFireDACFDConnectionDefs.ini To create TFDconnection with connection information, a clever way […]

Read More

Robust Way to Find Leaks With Deleaker In Delphi and C++Builder Applications

It’s quite normal for a developer to forget to destroy or free the objects while developing, these small memory leaks over a period of time lead the application to crash with, out of memory error. Finding that memory leaks in small projects it is easy. How about finding the leaks in large enterprise applications? Tired of finding the leaks? Don’t worry. The Deleaker solves the problem for you in a robust way. Find all the memory leaks, It doesn’t matter what type of leaks are occurring, Deleaker will find them all: memory leaks (produced by the heap, virtual memory, or OLE allocators, etc.), GDI leaks, leaks of Windows USER objects, and handles. Deleaker detects leaks in Delphi and C++ Builder. It can work either as a standalone application or as a RAD Studio extension. Standalone is convenient, for example, if RAD Studio is not installed. If Deleaker works as an extension, a developer can search for leaks without leaving RAD Studio, which lets him move to the source of possible errors quicker. After installation, a new Deleaker item is added to the RAD Studio main menu: How to use the Deleaker : Install the Deleaker setup check here. While installing choose the options as standalone or integration with RAD studio. Create a sample windows VCL application and write a piece of code with some memory leaks in it. Run the application, perform the action to create memory leaks, and close the application. Deleaker will create a snapshot of memory leaks where you can navigate to the line of code from the snapshot window directly to IDE. It’s that simple identify the memory leaks. Check the samples and resources available here. Check this below video demonstration of Deleaker for Delphi and C++ builder.

Read More

The Fastest And Easiest Way To Build Data-Driven Delphi And C++Builder Apps Using Enterprise Connectors

Enterprise connectors – Make Connecting to any application is easy as connecting to a database. Move, integrate, and analyze data with ease utilizing the FireDAC Enterprise Connectors, powered by CData. These unparalleled components allow you to integrate 180+ Enterprise applications, simplifying connectivity into a standard model using SQL. It allows you to integrate application services, like QuickBooks Desktop, MailChimp, Salesforce, YouTube, SugarCRM, Jira, SurveyMonkey, Amazon DynamoDB, Couchbase, PayPal, eBay, Google Sheets, Facebook, Twitter, Slack, and Dropbox. Features : Replication and Caching: Easily copy data to local and cloud data stores such as Oracle, SQL Server, Google Cloud SQL, etc. The replication commands allow for intelligent incremental updates to cached data. Functions Library: A library of over 50 string, date, and numeric SQL functions that can manipulate column values into the desired result. Popular examples include Regex, JSON, and XML processing functions. Client-Side Processing: Enhance the data source’s capabilities with additional client-side query processing to enable analytic summaries of data such as SUM, AVG, MAX, MIN, etc. Customizable: Customize the data model to add or remove tables/columns, change data types, etc. without requiring a new build. These customizations are supported at runtime using editable human-readable schema files. Secure Connectivity: Includes standard Enterprise-class security features such as TLS/ SSL data encryption for all client-server communications. Developer Friendly: Full Design-time support for data operations directly from RAD Studio. How to connect with Google Spread Sheet : Create a new VCL Forms Application. Drop a TFDPhysGoogleSheetsDriverLink and TFDConnection object onto the form. Double-click the TFDConnection object. The FireDAC Connection Editor is displayed. Select “CData.GoogleSheets” in the DriverId menu and configure the connection properties. You can connect to a spreadsheet by providing authentication to Google and then setting the Spreadsheet connection property to the name or feed link of the spreadsheet. If you want to view a list of information about the spreadsheets in your Google Drive, execute a query to the Spreadsheets view after you authenticate. Use the OAuth 2.0 authentication standard. To access Google APIs on behalf on individual users, you can use the embedded credentials or you can register your own OAuth app. OAuth also enables you to use a service account to connect on behalf of users in a Google Apps domain. To authenticate with a service account, you will need to register an application to obtain the OAuth JWT values. See the Getting Started chapter in the help documentation to connect to Google Sheets from different types of accounts: Google accounts, Google Apps accounts, and accounts using two-step verification. Watch this Video, how to connect to Google Spread sheet with powerful FireDAC enterprise connector components. Enterprise Connectors. Check out the full list of Applications supported and components available for Delphi/C++ Builder. Integrate faster with your applications using enterprise connectors.

Read More