FMX

Looking back at 2021, an inspiration for what 2022 can be

The daily chore easily makes one forget the milestones reached and the goals ahead.  As such, it is good, with the start of the New Year, to look back of what has been achieved in the past year and set the goals for the new year. First of all, let me wish you a great new year 2022! I made a habit of wishing friends & relatives “to maximize the number of happy days in the new year“. Good health, success, good relationships, interesting work, achievements, luck, new experiences all contribute to happiness. So, when you can maximize the number of happy days in 2022, it is very likely you’ll be blessed with a mix of these things! At the same time, only in utopia, every day will be filled with happiness, so it also helps being prepared for some less successful days. 2021 Looking back at our milestones & achievements in 2021 actually positively surprised me. Even when we often get the impression that on a daily basis, we sometimes spend a lot of time fighting all kinds of little or big technical issues and have the impression we only move forward in baby steps, when looking at it in the scope of a full year, it appears a lot has been done. A summary Release of TMS Web Academy In the beginning of 2021, we launched our new platform TMS Web Academy, which is an online platform for bringing webinars to you where you can learn everything about our products. Since its launch, we already organized about 20 webinars that were free to attend. If you missed these, the replays are here. Of course, we continue along this path with new webinars for 2022 we’ll shortly present. TMS Web Academy proved to be a welcomed replacement for live events we could not hold due to covid-19 as well as a way to reach more developers world-wide. Launch of TMS Miletus  Miletus is our technology that enables you to create cross-platform desktop applications created with a single code-base and using web technology. Not only did we achieve to bring application generation for Windows, Linux and macOS from just your Delphi IDE running on Windows, we added to that also the Raspberry Pi OS target and we also added support in TMS WEB Core for Visual Studio Code. With Visual Studio Code, you can generate these types of applications directly from your favorite Windows, macOS or Linux machine.  Launch of TMS FNC WX Pack A completely new product saw the light in 2022, the TMS FNC WX Pack. TMS FNC WX Pack offers functionality that is hard to find or not existing for Delphi developers based on existing and proven web technology libraries. This includes so far a WYSIWYG HTML editor, an OCR tool, QR & barcode generation & detection, JSON data formatter,… and more is coming for 2022. High DPI to TMS FNC UI Pack With the release of Delphi 11 running in high DPI on Windows, it was critical to also bring full high DPI support in TMS FNC UI Pack. TMS FNC UI Pack is our universal (cross-platform/cross-framework) UI control bundle for VCL/FMX/LCL and TMS WEB Core. Our FNC UI controls were already looking crisp in FireMonkey apps, but now they also do in VCL high DPI […]

Read More

We kick of 2022 with ,How it works with Holger’: base64 data

We kick of the New Year with the first of “How it works with Holger” for 2022 and this first one this year is about using base64 encoded data.With REST APIs, JSON data, web client apps, string encoded binary data in URLs… ever more prominent in software developments, the use of base64 encoded data is everywhere. So, our colleague Dr. Holger Flick explains how you can use base64 encoded data with newer versions of Delphi out of the box and how the TMS FNC Utility library in TMS FNC Core goes a step beyond to make your life easier. Enjoy this first video of the year and watch for many more to come: Your idea could be on the next “How it works with Holger”! Submit your ideas here as comments or send us an email. Our list of subjects is growing. Your suggestion could be on it soon.

Read More

The best programming languages to learn in 2022

One of the challenges for people pursuing a career in programming is deciding which languages to learn. With so many languages used for different purposes, choosing the ones you want to study will depend on the specialty that most interests you as well as on job demand. A report released on Tuesday by programming course site CodingNomads looks at the “best” programming languages for 2022. If you’re excited by the data and logic side of coding, you may wish to learn Python, Java, C, C++ or C#. If you’re jazzed about visual design and user interfaces, TypeScript might be up your alley. And if you’re looking to develop mobile apps, you’d want to check out Java for Android, and Swift or Objective-C for Apple’s iOS. Aside from satisfying your own professional interests, you naturally want to select a language that’s in demand among employers and promises a good salary. In this regard, CodingNomads examined the most popular languages based on job postings and on salary. Looking at the greatest number of job postings on LinkedIn across the U.S. and Europe, CodingNomads awarded the top spot to Python. In second place was Java, with JavaScript, C++, C#, C, TypeScript, PHP, Perl and Ruby rounding out the top 10. Analyzing the average salaries of the most in-demand languages according to data from Indeed and Glassdoor, CodingNomads put Ruby in first place with an average salary in the U.S. of $111,994. C++ came in second with a salary of $103,818. The other languages and their salaries were Python at $103,540, JavaScript/TypeScript at $100,492, Java at $96,786, C# at $89,203, PHP at $85,435, Perl at $83,159 and C at $82,924. TypeScript was not listed separately because it had limited salary data. But CodingNomads deemed its salary similar to that for JavaScript jobs. Also, these figures are considered average salaries and not what beginning programmers would earn. But successful coders can expect to meet or beat these salaries within a couple of years, according to the report. Python is the best programming languages 2022 As a general purpose, server-side language, Python is used for a variety of tasks from simple scripting to advanced web applications and artificial intelligence. For developers interested in data science or machine learning as well as overall software development and web development, Python is the best language to learn, according to CodingNomads. “While Python has been around for decades, the demand for Python skills in 2022 will continue growing exponentially thanks to its use in the booming industries of data science, machine learning and AI,” said Ryan Desmond, co-founder and lead instructor at CodingNomads. “In addition, Python is considered one of the easiest, most powerful, and most versatile languages to learn, making it popular amongst companies, developers, and aspiring developers.” Java A respected and time-tested language, Java is widely used by organizations around the world. Java is the main language behind Android, which owns an 85% share of the mobile market. It’s also the most popular language for Internet of Things (IoT) devices. Java is considered harder to learn than Python but easier than C or C++, according to CodingNomads. The main reason is that Java improved on C, and Python improved on Java. On the plus side, once you master Java, learning something like Python will be much easier. Anyone who wants […]

Read More

Decode barcodes or QR codes from any Delphi app

Just before the year closes, we’d like to share a new episode in the “How it works” series with Holger Flick. This series is created to show you how you can do more with Delphi and TMS components. First Holger introduces two new exciting components added to the TMS FNC WX Pack: the barcode and the QR code decoder components: and of course, the “How it works” video explains in detail how you can create a Delphi application that uses the QR code decoder component and use it to extract information from a QR code image file: TMS FNC WX Pack The TMS FNC WX Pack is all about leveraging existing, reliable, proven web technology in any type of Delphi app, be it a Windows VCL app, a cross-platform FireMonkey app or a TMS WEB Core web client application. It already comes with a HTML editor, a PDF viewer, an OCR component, a JSON formatter and a barcode or QR code generator. In our lab, the next series of breathtaking components are already in development that will join the TMS FNC WX Pack family in 2022!  Watch the TMS FNC WX Pack introduction video again for more info. Learn more! Like to learn more about Delphi and TMS components? Consider also the books our colleague Holger Flick wrote for you. Get all the in-depth content on how to get more out of Delphi with TMS components while reading at your own pace. We made a convenient list of the books here from where you can add it to your basket in one-click. Be in touch! 2022 is nearby. Our team is extremely motivated to surprise you once more in the New Year with many exciting new developments. Let us know your wishes for 2022. We are eager to learn what you would like to see us doing in the New Year! 

Read More

Curve Fitting with FNC Math Components

In this article, we’ll show how to implement curve fitting with FNC math components presented in version 3.2 of TMS Analytics & Physics library, most importantly, with little to no code! Curve fitting (approximation) is a mathematical method of finding a math expression (function) that fits best to some discrete data (series of points). Commonly, we need the following three ingredients to implement the curve fitting: Discrete data (a series of points) to fit. A set of functions (basis functions) to construct the curve. A method of solving the fitting problem (optimization algorithm). Let’s go through the FNC components for these three elements. The first component is TFNCDataSource1D. The component provides data for curve fitting and has the following published properties: Data (TDataCollection1D) – a collection of points. Each collection item has two properties of real type: ‘V’ – the value of the variable; ‘F’ – the value of the function. DataCount (integer) – the number of points in the collection (read-only). With standard Delphi IDE tools for collection editing, we can add and delete points, edit values of the points in design time. There is a binding component to show the data on an FNC chart – TFNCData1DPlotter. It has two primary published properties: Data (TFNCDataSource1D) – a data source to show on the chart. Chart – a chart to show the data. When assigning an FNC chart to the Chart property in design time, the plotter component creates a series for the chart. You can tune the series’ properties to get the appropriate data representation. In the picture below, we showed an example of data, drawn with the data plotter. The second ingredient for curve fitting is the set of basis functions. We’ll use the TFNCLinearConstructedBasis1D component. This component provides the easiest way to get a set of functions for constructing the fitted curve. The main published properties of the component are the following Variable (TVariableProperty) – provides the name of the variable for the basis functions. Coefficient (TVariableProperty) – provides the name of the coefficient for the fitting problem. Kind (TBasisKind) – the type of predefined basis functions. Order (integer) – number of basis functions for approximation. Expression (string) – read-only math expression of the constructed function. Parameter (TParameterCollection) – a set of parameter values for parametric basis functions. With the Kind property, you can select the appropriate basis functions for building the fitted curve: polynomials, Taylor series, exponents, Fourier series, exponential functions. The Order property sets up the number of basis functions to build the curve. Here is an example of the component’s properties, shown in the Object Inspector. The last component we need to complete curve fitting is TFNCApproxFunction1D. This component joins a data source with a basis and implements the least-squares approximation algorithm. It has the following published properties: DataSource (TFNCDataSource1D) – a data source for approximation. Basis (TFNCBasis1D) – a basis for approximation. Formula (TBaseFormulaProperty) – read-only formula of the curve. Expression (string) – read-only math expression of the fitted curve. When you assign the data source and the basis properties, the component runs the approximation algorithm and evaluates the formula and the expression properties, as shown in the picture below. The TFNCApproxFunction1D is a descendant of the TFNCBaseFunction1D component. So, you can draw the curve on an FNC chart as described in […]

Read More

FNC wishes the VCL Delphi community a merry Christmas!

Intro FNC was born in 2016 and with it, a lot of great opportunities and ideas. We started with TMS FNC Chart, followed by TMS FNC UI Pack only 4 months later! The typical components such as a grid, treeview, planner and many more are included as you would expect in a UI component set. In April 2020, with TMS FNC Maps, we introduced a brand new way to add and work with mapping/routing services in your application. Today we have a wide variety of visual and non-visual components and libraries to enhance your application. The latest addition to the FNC family, named TMS FNC WX Pack, provides access to a whole new world of JavaScript/HTML based libraries and components to Delphi. All of this would not be possible without a solid foundation, a component structure that is reliable as well as extensible. Solid Structure The architecture needed to be solid, robust as well as extensible. Our initial idea was to create a base component for each product separately, but not long after, we abandoned the idea and immediately thought out of the box and created TMS FNC Core. TMS FNC Core was the foundation we created starting with a custom control class and some utility functions. Over the years TMS FNC Core grew into a versatile base foundation for creating cross-platform and cross-framework custom controls. This includes VCL, FMX, LCL and WEB frameworks. Today we focus on a showcasing TMS FNC Core for VCL.  Working on FNC components and the TMS FNC Core foundation on a daily basis and looking back at beginning made us realize that TMS FNC Core is much more than just a foundation. It’s actually capable of doing powerful things with little to no code. The following example demonstrates what TMS FNC Core alone is capable of. No need to install additional components, just download, install TMS FNC Core, plugin the code and experience the true power of FNC. Merry Christmas Out of all the features TMS FNC Core has to offer, we picked a couple of important ones: PDF export, SVG and asynchronous file download support. The code snippet below shows how to download an SVG, export it to PDF. Not more than 25 lines of code went into this sample, with a very nice and warm result, especially during this time of the year! uses VCL.TMSFNCCloudBase, VCL.TMSFNCTypes, VCL.TMSFNCPDFLib, VCL.TMSFNCGraphicsTypes; procedure TChristmasForm.GenerateChristmasWishes; begin TTMSFNCCloudBase.DownloadFileFromURL(‘https://tmssoftware.com/site/img/merry%20christmas.svg’, procedure(const ARequestResult: TTMSFNCCloudBaseRequestResult) var b: TTMSFNCBitmap; p: TTMSFNCPDFLib; begin p := TTMSFNCPDFLib.Create; b := TTMSFNCBitmap.CreateFromStream(ARequestResult.ResultStream); try p.HeaderSize := 100; p.HeaderFont.Size := 24; p.HeaderFont.Style := [TFontStyle.fsBold]; p.HeaderFont.Name := ‘Lucida Handwriting’; p.HeaderFont.Color := MakeGraphicsColor(156, 41, 41); p.Header := ‘tmssoftware.com wishes you a’; p.Footer := ”; p.BeginDocument(‘Christmas.pdf’); p.NewPage; p.Graphics.DrawImage(b, p.MediaBox); p.EndDocument(True); finally b.Free; p.Free; end; end); end; Download TMS FNC Core today, explore the capabilities!. Found something yourself that’s worth sharing? Please let us know, we are excited to find out what you have created, in which way you are using FNC. TMS and FNC wishes you all the best and a merry Christmas!

Read More

Advanced FNC Math Components

In version 3.2 of the TMS Analytics & Physics library, we’ve introduced new FNC Math components. The components allow easy development of math applications with all the advantages of the Delphi IDE. The base concepts of the math components have been described in the previous article. In this article, we’ll introduce several advanced components for designing more complicated math applications. With the base components TFNCFunction1D, TFNCDerivative1D, and TFNCIntegral1D we can evaluate functions, derivatives, and integrals of math expressions. Let’s consider the following component: TFNCFunctionDerivative1D – introduces a symbolic derivative of an FNC function; allows evaluating the derivative for the specified variable value. The component provides the following published properties: Variable (TVariableProperty) – a variable specifying the argument of the function. D (TVariableProperty) – a variable specifying the differential. Functional (TFNCBaseFunction1D) – a differentiable FNC function. Formula (TFormulaProperty) – read-only formula denoting the resulting math expression of the derivative. As one can see, this component is like the TFNCDerivative1D, but the Functional property now is of TFNCBaseFunction1D type. This means that we can assign any appropriate function to the property. The component will trace the functional’s change and re-evaluate the derivative automatically. Let’s start developing an advanced FNC math application. Put a TFNCProvider on the form and create three parameters ‘A’, ‘B’, and ‘L’. Add new TFNCFunction1D and TFNCFunctionDerivative1D components. Assign required properties to the function as described in this article. Add an FNC Chart and two plotters for both components (the function and the derivative). Then connect the derivative component with the function, assigning its Functional property. Finally, input a simple math expression, say ‘5*sin(x)’, into the Formula property of the function. Our math application at the design time is shown in the picture below: Then we can add a text box, allowing the user to input a math expression, and a button with the following simple event handler: procedure TForm1.Button1Click(Sender: TObject);var  f: string;begin  f:= Edit1.Text;   FNCFunction1D1.Formula.Formula:= f;end;   The developed application provides functionality for drawing a user-defined function and its derivative on one chart. An example of the running application is shown in the following picture:   Note that we created only one button with the event handler which assigns the formula to the function. When the formula is changed, the derivative is re-evaluated and the chart is updated automatically. Let’s move on and modify the application to evaluate also the second derivative of the function. It is possible due to the special structure of the FNC math components. As the TFNCFunctionDerivative1D class is a descendent of the TFNCBaseFunction1D, the derivative is considered to be an FNC function. Thus, we can just evaluate a derivative of any other derivative and get the second-order derivative of a function. Putting a new TFNCFunctionDerivative1D component (together with a plotter for the FNC chart) and assigning the functional property to the first derivative component, we get the fully functional application: Finally, let’s consider the TFNCFunctionIntegral1D component. It has the same properties as the TFNCFunctionDerivative1D class, but it evaluates the indefinite integral of a function. Now we can create a single application that provides the evaluation of a user-defined function, its derivatives of the first and the second order, and its integral.  The source code of the demo project for the article can be downloaded from here. To develop your own FNC math application […]

Read More

A Raspmerry Christmas with Miletus

Time flies and we are yet again at the end of the year. With the holidays coming up we thought it would be exciting to put our Miletus technology to the test and see what we can achieve in combination with a Raspberry Pi 4. Christmas is just around the corner so why not have a Christmas tree on a screen with some snowflakes and Jingle Bells playing in the background? Preparation With the plan set we need something to show the Christmas tree on. The screen of our choice is an Adafruit PiTFT Plus 320×240 2.8″ TFT. In theory any ILI9431 display should work with this project if it is correctly hooked up to the Raspberry Pi. We also need a Christmas tree. If we carefully examine the available specification, datasheet and a Python library provided by Adafruit, we can learn that the pixel format is set to 16 bit. This means each pixel’s color is stored in an RGB565 format. With our Christmas tree image converted and stored in a binary file we are ready to get started! With respect to software needed to create the project, all we need here is the latest TMS WEB Core v1.9.6.0 release. Let’s get coding First let’s make the SPI connection. Drop the TMiletusRaspberrySPI component onto the form and leave the default settings. In the form’s OnCreate event set the TMiletusRaspberrySPI.Frequency property (= SPI clock frequency) to 16 MHz. This determines how fast the data can be written, which is important if we want to show a 150 kB image at a reasonable speed. Then open the connection: procedure TForm1.MiletusFormCreate(Sender: TObject); begin   MiletusRaspberrySPI1.Frequency := 16000000;   MiletusRaspberrySPI1.Open; end; Next is screen initialization. We can do this as soon as the SPI connection is ready. By using the TMiletusRaspberrySPI.OnOpen event we can initialize the screen, load the image and after that draw the snowflakes. By using async methods and functions we can wait for each of step to finish before moving onto the next one. procedure TForm1.MiletusRaspberrySPI1Open(Sender: TObject); begin   Await(JSValue, InitScreen);   Await(JSValue, LoadChristmasTree);   StartSnowing; end; InitScreen is sending a number of command and data combinations through SPI to the screen so it can be set up with the correct settings. It is based on values from the datasheet and the example library. For further information on these values please study the linked sources. LoadChristmasTree is responsible for loading the Christmas tree onto the screen. While it is possible to embed the binary image as part of the executable, there are a few reasons against it: First of all, it doesn’t make sense to send the whole image to the web application and from there back to the native shell application. Sending 150 Kb of data between these 2 layers on a small device like a Raspberry Pi can be time consuming. Besides, by making it available as a file it gives the flexibility to change it to a different Christmas tree without modifying or recompiling the application! function TForm1.LoadChristmasTree: TJSPromise; begin   Await(Boolean, TMiletusRaspberryMemoryBuffer.LoadFromFile(‘./xmastree.bin’));   Await(JSValue, Block(0, 0, 239, 319, []));   Await(Integer, GPIOWrite(GPIO_DC_PIN, 1));   Await(Boolean, MiletusRaspberrySPI1.WriteMemBuffer);    Result := EmptyPromise; end; We added a new class called TMiletusRaspberryMemoryBuffer in TMS WEB Core v1.9.6.0. This makes it possible to load a file directly from the local file system (or […]

Read More

TMS Analytics joins TMS Academic family

Perhaps this is our product that suits and targets students & teachers best and finally it is available now as a free edition for students & teachers. TMS Analytics helps students by providing a library to easily evaluate mathematical expressions, calculate symbolic derivatives & integration, solving non linear equations, approximation function calculation and more… This library is fully cross-platform, so it can be used in VCL Windows applications as well as FireMonkey applications for Windows, macOS, Linux, Android & iOS. We encourage and hope that students will discover & learn to appreciate Delphi even more when having TMS Analytics in their arsenal of tools.  While you are visiting our academic offerings, check also following products available free for students & teachers: TMS VCL UI Pack: extensive UI controls library for VCL Windows applications TMS WEB Core: Object Pascal RAD component based web client development  TMS FNC UI Pack: extensive UI controls library for both VCL Windows applications & FireMonkey cross-platform applications TMS Aurelius: ORM framework for Delphi with full support for data manipulation, complex and advanced queries, inheritance, polymorphism, and more TMS Flexcel for VCL/FMX: Powerful, extensive & flexible component suite for native Excel report & file generation & manipulation  Also in the coming year 2022, we want to extend our academic offerings! Let us know what products you look forward to the most to join the TMS Academic family. Our team is listening!

Read More

‘How it works’ video series

With this blog we want to announce our new series of ‘How To” videos, presented by our colleague Holger Flick. In these video series you will learn how you can achieve basic interesting functionality with little to no code! Most of the time developers are blocked in a major project, just because of a little piece of information that is missing! This can be a common problem that keeps happening. That is why FlixEngineering and tmssoftware.com will work together to provide you hands-on solutions by explaining this step by step. Unlike other videos these series will not solve complex problems, here we will focus on simple “how to” questions! Subscribe to our YouTube channel and stay tuned for our first “How it works” video:   Happy Holidays!

Read More