Noutați

Delphi University makes a year

A year ago, we launched the Delphi University project here in Brazil. And yesterday, 13/04/2021, it was a day to celebrate the success of the project. The idea of ​​live and the call The day started and at around 10 am I remembered that I was completing exactly one year since the launch of Delphi University . I talked with the team in the group of content producers and sent “let’s do a live class?” I wanted the live to be light, a chat without responsibility, without a technical part … So when making the call to live I thought to myself: “I want something that makes people laugh…” and the rest is what you saw in the editing I did, if you have not seen the video of the call is here below: Video call for Delphi University’s 1-year Live Guests In addition to the content producers, we opened space to interact with some special guests… who for example went to live was Prof. Tiago Souza , training coordinator at the Paula Souza Center. You can find the full post on my website (in Portuguese): And this year we intend to deliver even more content at Delphi University. Discover: universidadedelphi.com.br. See you at the next opportunity.

Read More

High performance multi-feature grid

Intro The multi-device, true native app platform The FireMonkey® framework is the app development and runtime platform behind RAD Studio, Delphi and C++Builder. FireMonkey is designed for teams building multi-device, true native apps for Windows, OS X, Android and iOS, and getting them to app stores and enterprises fast. source: https://www.embarcadero.com/products/rad-studio/fm-application-platform FMX (FireMonkey) released in 2011 and shortly after we delivered a first set of components. Today, we want to show you the TTMSFNCGrid component, a high performance multi-feature grid Features Below is a list of the most important features the TTMSFNCGrid has to offer. The features are not limited to this list, but this will give you a quick insight on what we offer to be able to create an application that visualizes your data in a grid structure in FireMonkey. Column Persistence Fixed cell single and range selection Autosizing columns / rows on double-click Highly configurable and flexible grid Various cell types available and built-in as well as support for custom cell types Fixed columns left and/or right, fixed rows at top and/or bottom. Column & row freezing High performance virtual mode Several selection modes: single & multi cell, column, row, distinct cell, row, column Cells with support for HTML formatted text, hyperlinks Editing with range of built-in editor types and capability of using custom cell inplace editors Cell merging and splitting Grouping support with summary rows, and group calculations such as average, sum, min, max, custom calculation… Filtering with optional auto filtering via dropdown Different cell layouts for different cell states Read-only and/or fixed state per cell configurable Single column sorting, indexed column sorting, grouped column & indexed column sorting Pixel and cell scrolling modes Keyboard and Mouse handling customization: tab, enter, insert, delete key handling Column and row dragging and sizing Cell controls such as checkbox, radiobutton, button, bitmap, progressbar etc… Configurable touch scrolling optimized for iOS / Android Banding Clipboard support HTML Export PDF Export Excel Import / Export via the TTMSFNCGridExcelIO Find and replace functionality Separate ToolBar Popup Learn More! Want to learn more about what the TTMSFNCGrid can do? Here is a video that highlights some of the above features through a demo application. Download & Explore! The TTMSFNCGrid component is part of the TMS FNC UI Pack, which, on top of FMX, also offers the ability to write your code once and target other frameworks (VCL, LCL and WEB). You can download a full featured trial version of the TMS FNC UI Pack and start exploring the capabilities of the TTMSFNCGrid component. Stay tuned! The TTMSFNCGrid is the fifth and last component of a series of components that is covered to empower your FMX (FireMonkey) developments. We started the series with a general overview of the most important components that we have to offer, followed by the TTMSFNCRichEditor, TTMSFNCPlanner, TTMSFNCTreeView and the TTMSFNCKanbanBoard. Keep an eye on our blog post for more exciting news coming up for the FMX framework and FNC in the form of a whole new platform!

Read More

Developer Stories: George Kirkwood Gives Insights On SiteZilla

George Kirkwood has been working with the programming language ever since Delphi 1. His application (SiteZilla) showcase entry was an excellent addition to the Delphi 26th Showcase Challenge and we exclusively asked him about how he works with Delphi. Take a look at his SiteZilla website for further knowledge about his application. When did you start using RAD Studio/Delphi and have long have you been using it? I’ve been using Delphi since version 1. We previously created applications in Visual Basic, but as soon as Delphi came along we jumped ship and abandoned all VB code. What was it like building software before you had RAD Studio/Delphi? We had MS-DOS based character interfaces. Then VB came along and we could design more visual applications for Microsoft Windows. Connecting to databases with VB wasn’t exactly straightforward, and the choice of databases was limited. Delphi changed all of this. How did RAD Studio/Delphi help you create your showcase application? The app needed to work on multiple platforms, so as an existing Delphi developer it was a simple decision to make to go with Delphi and FireMonkey. Although there was still a lot to learn, we could re-use a lot of the existing code so this gave us an advantage in getting started. Our development time for this app from concept to delivery was achieved extremely quickly. What made RAD Studio/Delphi stand out from other options? The cross platform write once, run anywhere ability was a big plus for us. It also helped our customers in being able to provide the same app, with the same layouts and interfaces, on all devices. What made you happiest about working with RAD Studio/Delphi? Being able to utilise nearly 30 years of experience to create solutions quickly. The familiarity of the IDE, code etc., when developing for other platforms made life a lot easier. I didn’t have to learn Android Studio, Objective C or the myriad of ways in which you had to do certain tasks on each platform. What have you been able to achieve through using RAD Studio/Delphi to create your showcase application? We’ve utilised push messaging, GPS location and offline data storage. Some of this would have been difficult with the platform specific IDEs. The app was delivered from concept to production ready in less than 6 weeks. What are some future plans for your showcase application? We plan to add more features, utilize new technologies and device capabilities and ensure compatibility with every device our customers use. Thank you, George! Click the link below to view his showcase entry. Showcase

Read More

Do You Want To See How To Create A Showcase Mobile Game?

We love featuring our showcase applications – it’s great to see the versatility and skill Delphi developers put into them. There’s such a wide variety of offerings too from intelligent order-taking, machine-learning vision apps, powerful museum mobile experiences which enhance visits to exhibits with helpful information and three dimensional images. Wherever your imagination takes you RAD Studio Delphi can help make it a reality on Windows, macOS, Linux, iOS and Android. All work and no play? Not with Firemonkey! Games are also well represented by our community of wonderfully talented Delphi developers. This beautifully-designed game from French developer GBESort is a great example of what can be done. FMXPong is a version of the famous game “Pong”. The original Pong, from Atari, was very likely the first computer game ever released. FMXPong is a tribute to the original, but bringing things right up to date in 3D. FMXPong also contains some additional features enabled by the modern world of mobile devices. For example you can move the paddle by touching on the screen or by tilting the smartphone or tablet which the code then detects using the gyroscope of your device. What’s better than a great mobile game written with Delphi? How about a great game with full open source? All the code for FMXPong is fully open source and available at: https://github.com/gbegreg/FMXPong Website FMXPong Google Play FMXPong Screenshot Gallery Are you ready to write a mobile game?

Read More

This API Adds Machine Learning Computer Vision To Your App

Microsoft’s Azure has a broad collection of services you can access with an easy-to-use API. Azure is Microsoft’s cloud hosting and computing platform with a catalog of more than 200 different products. It also includes products which allow you to implement Machine Learning services. Those services all have an API which can you can access using client access libraries or a REST client. Delphi takes this ease of use one step further by providing a TAzureConnectionInfo to implement some of those services quickly and with a minimal amount of code. Also, we can access the services using Delphi’s built-in REST client. Is Azure Read Client Free? No, the Azure Read Client is not free, but the good news is when you first register you will get some free 12 months services and an free-tier allowance for services so you can try things out as you develop, test and launch your app. Some Azure services have very generous ‘always free’ levels. The service we going to use in our OCR application is  “Cognitive Search” which is one of those which is always free. It has a permanent limit of 10,000 documents, but that’s more than enough for our testing purposes. How do we get API credentials for the “Computer Vision” service resources? For our OCR application, we going to use the “Cognitive Services->Computer Vision” resource. First you must have an “Azure subscription”. Go to the link below and create an “Azure subscription” if you don’t have one. It’s free to start! https://azure.microsoft.com/en-us/free/cognitive-services/ Once you have the subscription, you can create the required service links. Go to this link to create a “Computer Vision” resource. https://portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision Make sure you select the correct region because you can’t go back and change it later. Now go to the resource you created and choose “Keys and Endpoint” from the left-hand menu. Now, copy one of the keys and and the location. We need those in our application. How to connect to the Cognitive Services REST API? We need TRESTClient, TRESTRequest and a TRESTResponse components to connect to the cognitive services REST Api. Lets drag and drop TRESTClient in to the forum and do some basic property changes. Make sure the “Accept” property has “application/json” type. Set the content type to “application/json“. Then drop a TRESTRequest component into the forum and set client property to the client we created earlier. Set the method to “rmPOST“. Place a TRESTResponse component and set the response property in the request component to this response object. Add some edit boxes, buttons and a memo box to complete our interface. How do we use the API to post the image for processing? We cannot post the image to cognitive services and get the result in one call. The image processing takes time, although usually this is less than five seconds. So, first we need to submit our image to the cognitive service and get the “Operation-Location” and check the status until it’s “succeeded”. If the server is still processing the image, status will be “running” instead. For each and every call to cognitive service API, we need to provide our subscription key through the HTTP Header. It’s the key we copied earlier from the resource we created. To do that, add a new parameter to TRESTRequest component, set the ‘kind’ to […]

Read More

Firestore async dataset methods in TMS WEB Core v1.7

In this last blog article of 4 blog posts, we introduce a last major new feature in the Google Firestore dataset, i.e. new async features. Before providing details about these new features, let’s first look at the classic VCL TClientDataSet, how it can work how it works and what the implications are of inherently asynchronous implementations for use with a REST API based communication between a client dataset and the Google Firestore backend. Classic VCL TClientDataSet operations The editing and navigation interface for a TClientDataSet is best provided by using data-aware controls such as TDBGrid, TDBNavigator and more. Still, many times you need to process some records in code according to specific business logic. When it comes to populating and modifying a TClientDataSet in classic VCL code, you would use code similar to the following code snippets. Inserting a record in the dataset ClientDataSet1.Insert; ClientDataSet1.FieldByName(‘Description’).AsString := ‘Call up a meeting with Sales group.’; ClientDataSet1.FieldByName(‘Status’).AsString := ‘New’; ClientDataSet1.Post; Modifying a record in the dataset ClientDataSet1.Edit; ClientDataSet1.FieldByName(‘Status’).AsString := ‘Done’; ClientDataSet1.Post; Deleting a record in the dataset  Processing all the records in the dataset ClientDataSet1.First; while not ClientDataSet1.EOF do begin //do some processing based on one or more fields of the record ClientDataSet1.Next; end; Equivalents with Firestore? Question is, will the above code work in Firestore ClientDataSet too? Yes the above code will work as standalone. But the code that follows the above code will fail if it depends on the success of the database operation in the previous code. This is important to understand so let’s look at 2 examples of how the code that follows can fail in Firestore TClientDataSet. Failing code example 1 Consider the following variation of the last example: if not ClientDataSet1.Active then ClientDataSet1.Open; ClientDataSet1.First; while not ClientDataSet1.EOF do begin // do some processing based on one or more fields of the record .. ClientDataSet1.Next; end; This will fail on TClientDataSet1.First. Why? Because an open is an asynchronous operation that takes time to open the cloud database. There is no guarantee that the open will be complete by the time you reach the next statement. What will happen is unpredictable. In fact, this is true of all the ClientDataSets in TMS Web Core dealing with cloud databases. Failing code example 2 Consider another example where we want to first insert a record in a Firestore collection, then get the record’s id that Firestore generates and stuff it as a foreign key value in another dataset’s new record. // adding a new customer’s record Customers.Insert; Customers.FieldByName(‘FirstName’).AsString := ‘John’; … more data for the customer record as needed … Customers.Post; // getting the generated id from Firestore newid := Customers.FieldByName(‘id’).AsString; // adding the invoice for the customer Invoices.Insert; … more data for the invoice record as needed … // setting the foreign key value as the id generated earlier Invoices.FieldByName(‘customer_id’).AsString := newid; Invoices.Post; Do you see what will cause a problem here? Customers.Post is an async operation as it will add a new record in the Firestore collection. There is no guarantee that it will finish by the time you reacth the next statement that remembers the generated id in newid.  To rescue with async Fortunately, we have a solution for the above coding problems in the new version of TWebFirestoreClientDataSet. They consist of the following methods that allow you […]

Read More

Announcing beta support for FMXLinux!

Intro We have been working on this for quite some time now and today we can proudly announce beta support for FMXLinux in ALL FNC products. Download the latest update today to get started! Below is a list of FNC products that have been tested in FMXLinux. With FMXLinux, we add a new platform to the wide variety of already supported platforms in FNC. TMS FNC Components can be used simultaneously on these frameworks TMS FNC Components can be used simultaneously on these operating systems/browsers TMS FNC Controls can be used simultaneously on these IDEs Getting Started Beta support means that the components have been tested and deployed on a Linux environment (Ubuntu 20.04) after properly setting up FMXLinux and other dependencies required for various parts of FNC. Support for FMXLinux is limited to RAD Studio 10.4 Sydney and the path to the source files has to be manually configured in the library path (the automated installer currently does not pick up FMXLinux). Please follow the instructions below to add FMXLinux support to RAD Studio. Please note that adding the SDK is an essential part of the configuration process and it is important to add the SDK to RAD Studio when all the necessary libraries are added to your Linux environment. After following the above instructions, please execute the following commands sudo apt install joe wget p7zip-full curl openssh-server build-essential zlib1g-dev libcurl4-gnutls-dev libncurses5 sudo apt-get install zlib1g-dev sudo apt install libgl1-mesa-glx libglu1-mesa libgtk-3-common libgstreamer1.0-0 libgstreamer-plugins-base1.0-0 sudo apt install libwebkit2gtk-4.0-dev Add each path that contains FNC source files of the products you have installed to the Linux 64 bit library path. Start a new multi-device FMX project and select the Linux 64 bit profile. When the PAServer is running correctly, you can connect to Linux environment and start deploying your application.  Preview We have created a short video to give you an idea on what you can expect when deploying new or existing FNC applications. Feedback! With this beta support for FMXLinux announcement we start a journey on a new and exciting road. Feedback during the beta period is highly appreciated. After a couple of updates, we’ll announce full support and further fine-tune the installation process as well as provide more videos, documentation and demos.

Read More

Easily Build Real-Time Stock Market Charts Using Javascript

In this global economic turmoil, it has become very important for investors to make the right financial decision based on accurate and up-to-date market data. With Sencha Ext JS and Marketstack API, you can build a stock market web application that provides real-time data and helps the investors uncover valuable insights. In this article, you will find all the details. What is Marketstack API? Marketstack is a REST API that provides real-time stock market data. It supports 25,000 stock tickers across the globe from 72 stock exchanges, including NYSE, Nasdaq, and ENX. Also, it offers accurate historical market data of more than 30 years. With an uptime of nearly 100%, it has become one of the most reliable stock market APIs that you can find online. Why should you use Marketstack API? Offers real-time, intraday, and historical stock market data in JSON format, which is very easy to integrate with web applications Supports integration with multiple languages and frameworks, including JavaScript, Python, Node, and Go Handles traffic spike efficiently Offers bank-grade security using the industry-standard 256-bit HTTPS encryption Provides easy-to-follow documentation How to Build a Real-Time Stock Market Web Application with Sencha Ext JS and Marketstack API Sencha Ext JS is a feature-rich JavaScript framework for building business-grade web applications. By integrating Marketstack API, you can create a real-time stock market application easily. Take a look at it: To create the stock market application shown above, you have to follow these steps: 1. First, you have to create the model. Go to app > model folder, create HomeModel.js file and add these codes: Ext.define(‘Demo.model.HomeModel’, {     extend: ‘Ext.data.Model’,       alternateClassName: [         ‘home’     ],     requires: [         ‘Ext.data.field.Number’,         ‘Ext.data.proxy.Rest’     ],       fields: [         {             type: ‘float’,             name: ‘low’         },         {             type: ‘float’,             name: ‘high’         },         {             type: ‘int’,             name: ‘date’         },         {             type: ‘float’,             name: ‘close’         },         {             type: ‘float’,             name: ‘open’         }     ],       proxy: {         type: ‘rest’     } }); Here, you are adding different fields, including open, close, data, high and low. Also, you are defining their types. 2. Then you have to create the view. Go inside view folder and create OHLCCharts.js file. Insert these codes: Ext.define(‘Demo.view.OHLCCharts’, { extend: ‘Ext.panel.Panel’, alias: ‘widget.OHLCCharts’,   alternateClassName: [ ‘OHLCCharts’ ], requires: [ ‘Demo.view.OHLCChartsViewModel’, ‘Demo.view.OHLCChartsViewController’, ‘Ext.toolbar.Toolbar’, ‘Ext.toolbar.Fill’, ‘Ext.form.field.Date’, ‘Ext.button.Button’, ‘Ext.chart.CartesianChart’, ‘Ext.chart.axis.Time’, ‘Ext.chart.series.CandleStick’, ‘Ext.chart.interactions.PanZoom’, ‘Ext.chart.interactions.Crosshair’ ],   controller: ‘ohlccharts’, viewModel: { type: ‘ohlccharts’ }, dock: ‘top’, height: ‘100vh’, padding: 0, style: { background: ‘#ffffff’ }, width: ‘100wh’, layout: ‘fit’, bodyPadding: 0, frameHeader: false, manageHeight: false,   dockedItems: [ { xtype: ‘toolbar’, alignTarget: ”, border: 2, dock: ‘top’, style: { background: ‘#c6e4aa’ }, layout: { type: ‘hbox’, padding: ‘0 10 0 0’ }, items: [ { xtype: ‘tbfill’ }, { xtype: ‘textfield’, id: ‘tickerInput’, width: 100, fieldLabel: ‘Ticker’, labelWidth: 40, value: ‘AAPL’ }, { xtype: ‘datefield’, id: ‘fromDatePicker’, width: 250, fieldLabel: ‘From’, labelWidth: 50, value: ’01/01/2020′ }, { xtype: ‘datefield’, id: ‘toDatePicker’, resizable: false, width: 250, fieldLabel: ‘To’, labelWidth: 50, value: ’12/31/2020′ }, { xtype: ‘button’, id: ‘refreshBtn’, text: ‘Refresh’, listeners: { click: ‘onRefreshBtnClick’ } } ] }, { xtype: ‘cartesian’, dock: ‘top’, height: ’85vh’, id: ‘mycandlestickchart’, itemId: ‘mycandlestickchart’, margin: ‘0 0 0 […]

Read More

Developer Stories: Michał Bąkowski Exclusively Elaborates On TonCut

Michał Bąkowski first worked with Delphi many years ago. He participated in the Delphi 26th Showcase Challenge with his cutting optimization (TonCut) showcase entry. Learn more about his software over at the TonCut website. When did you start using RAD Studio/Delphi and have long have you been using it? I’ve started with Delphi 1 ages ago. Before I was working with Borland Pascal for Windows and when Delphi came out, it was like a revolution. What was it like building software before you had RAD Studio/Delphi? It was much more time consuming, difficult and harder to control. With Delphi, creating UI is very fast and simple. How did RAD Studio/Delphi help you create your showcase application? Most of all it allows creating own components and easily using it. Besides that, when I started working on TonCut, there was no other option actually.  All other tools were far behind Delphi. What made RAD Studio/Delphi stand out from other options? It allows fast creation and modification of UI. This is the main advantage of Delphi. What made you happiest about working with RAD Studio/Delphi? Hard to tell. I think, again option to create own components. What have you been able to achieve through using RAD Studio/Delphi to create your showcase application? Well, I created the app that my customers like. This is all I need. What are some future plans for your showcase application? We will be working on adding more AI to the app. Also we plan to add new optimization algorithms (1D with slants, 2D nesting of any shapes and maybe even 3D). Some functional changes are also on their way.   Thank you so much Michał! Head on over to the TonCut showcase to read more about Michał’s work

Read More

Machine Learning: 5 Ways To Use ML in your Windows Apps

How do I start using Machine Learning in Windows? Machine learning isn’t only for the cloud, or run locally in a web browser or command prompt, Microsoft is bringing it to PCs in the latest Windows 10 release. For example, Microsoft provides Python’s WinRT to create Windows Machine Learning applications, and ONNX (Open Neural Network Exchange) format, an open standard for sharing trained deep learning models between platforms and services. The latest release of Windows 10 provides plenty of new APIs for your applications. This includes the support for running trained Machine Learning models as part of Windows applications, taking advantage of local GPUs to accelerate Machine Learning applications. On the other hand, Embarcadero created Python4Delphi (P4D) to empower Python users with Delphi’s award-winning VCL functionalities for Windows which enables us to build native Windows apps 5x faster. This integration enables us to create a modern GUI with Windows 10 looks and responsive controls for our Python Machine Learning applications. Python4Delphi makes it very easy to use Python as a scripting language for Delphi applications. It also comes with an extensive range of demos and tutorials. With Python4Delphi, you can integrate any Python features, functionalities, and libraries with Delphi to create a nice GUI for your Machine Learning applications in Windows. In this tutorial, we will discuss the following: How to use these 5 Python libraries with different Machine Learning capabilities to perform Machine Learning in Windows Apps: Matplotlib, NLTK, Pillow, OpenCV, and Keras. All of them would be integrated with Python4Delphi to create Windows Apps with Machine Learning capabilities. Prerequisites: Before we begin to work, download and install the latest Python for your platform. Follow the Python4Delphi installation instructions mentioned here. Alternatively, you can check out the easy instructions found in Getting Started With Python4Delphi video by Jim McKeeth. Time to get started! First, open and run our Python GUI using project Demo1 from Python4Delphi with RAD Studio. Then insert the script into the lower Memo, click the Execute button, and get the result in the upper Memo. You can find the Demo1 source on GitHub. The behind the scene details of how Delphi manages to run your Python code in this amazing Python GUI can be found at this link. Open Demo01.dproj. 1. How do I enable Matplotlib inside Python4Delphi in Windows? Matplotlib is one of the most popular and oldest plotting libraries in Python which is used in Machine Learning. In Machine Learning, Matplotlib helps to gain insights from a huge amount of data through different data visualization techniques. With the high demand for Data Science and Analytics skill sets, drawing graphics programmatically is a very popular task these days. You can easily solve these tasks by combining the Matplotlib library with Python4Delphi (P4D). Matplotlib can be used in Python scripts, the Python and IPython shell, web application servers, and various graphical user interface toolkits (in this post, Python GUI by Delphi’s VCL using P4D)! After installing Python4Delphi properly, you can get Matplotlib using pip or easy install to your command prompt: and don’t forget to put the path where your Matplotlib installed, to the System Environment Variables, here are the example: C:/Users/YOUR_USERNAME/AppData/Local/Programs/Python/Python38/Lib/site-packages C:/Users/YOUR_USERNAME/AppData/Local/Programs/Python/Python38/Scripts C:/Users/YOUR_USERNAME/AppData/Local/Programs/Python/Python38 C:/Users/YOUR_USERNAME/AppData/Local/Programs/Python/Python38/Lib/site–packages C:/Users/YOUR_USERNAME/AppData/Local/Programs/Python/Python38/Scripts C:/Users/YOUR_USERNAME/AppData/Local/Programs/Python/Python38 The following is a code example of Matplotlib to create Stacked Horizontal Bar Chart to Visualize Discrete Distribution (run […]

Read More