Noutați

This Is The Blockchain And It May Rule The World

If you write apps, whether it be native Windows development, or perhaps targeting a broader market encompassing mobile devices, cryptocurrency is an area of incandescent growth and potential opportunity. Like the white-hot-topic of AI, cryptocurrency is a new frontier, and it seems everybody wants to stake their claim. Cryptocurrency has evolved into a global sensation in recent years, although much is yet to be learned about this evolving technology. Numerous concerns and worries are stirring around technology and its capacity to disrupt traditional financial systems. Cryptocurrency innovators wish to claim that these new forms of monetary exchange are all financial ‘trustless’ systems that are not directly tied to any government or nation-state. But some claim that cryptocurrency, non-fungible tokens – NFTs, the buzz word of the moment, and Blockchain, the technology underpinning these wispish intangibles, are an independent and reliable system. According to Joseph A. Grundfest, an American academic, regardless of whether you think that’s a good or bad thing, it is not entirely accurate. Cryptocurrencies are still reliant on the underlying infrastructure powering cryptocurrencies like Bitcoin, much of which is located in China. So, the Chinese government could theoretically push changes to cryptocurrencies at a fundamental level by setting its will on the data miners who keep them operating. What is the story of NFTs and art? Right now, NFTs are dominating the tech news. News media loves to gorge on stories of life-changing amounts of money being paid for an NFT associated with a piece of art, particularly focusing on facts like the buyer has, in effect, got nothing tangible to show for their hard-earned cash. Combine that with the use of AI to produce original and unique paintings and artworks and you have an almost impossible to resist temptation for a journalist looking to fill out a blank page with some exciting headlines: “anonymous author pays a million dollars for an NFT of an abstract painting by an AI artist”. As a tech person, this use of Blockchain, to secure the details of the sale, might look frivolous when compared to the many different companies solving complex problems with Blockchain and AI. While some others are generating similar non-human “art pieces” using AI or one of the many open-source projects that use layers of images which they combine to generate dozens of variations of images for you to sell online, in the NFT market. It’s less of Bob Ross and more Robot Ross. What is an NFT? NFT stands for “Non-Fungible Token”. This means that you can interchange one asset, here in our case images or animated NFT. This is a unique digital asset representing objects like digital artworks, tweets, pictures, videos, and music. The NFT acts a little like a digital checksum – except it’s a checksum of a moment in time combined with an object. So, the NFT refers to a very specific image or group of images in a way which is incontrovertibly that object or objects. A bit like having a postal code for a train which always meant that someone sending a letter to that postal code would always end up reaching the train no matter where it was or when you sent the letter. It’s a weird thing worthy of the best Wachowski sister movie plot. Hard to understand until someone explains […]

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

An Introduction To A High-Performance JS Grid

Nowadays, a large amount of data keep generating in businesses, and sometimes they need to display that information on websites for the consumers. The common way of displaying data on a website is using an HTML table. However, showing a large amount of data in an HTML table is cumbersome, especially if it slows down the entire page load. Therefore, if you want to show a large amount of data in a table on your web page, using a grid is the best way to do that.  A grid is similar to a table in HTML elements, but it allows you to easily fetch, scroll, sort, group, and filter a large number of data rows. When loading and processing large data sets, the performance is important because it should not hinder the user experience.  A high-performing js grid has a good initial page load time which is the amount of time the grid takes to load the initial data set. It is also efficient in dynamic filtering or the time it takes to filter one column. In addition, when considering a large amount of data in a grid, users often need to scroll through various sections of the grid to see the rest of the data. This scrolling speed is a good indicator of grid performance, and high-performing grids have a good scrolling speed that amounts to seconds.  Ext JS data grid is a high-performing grid that allows loading and manipulating a massive data set within milliseconds. In most benchmarking experiments, almost all the JS grid types from different vendors have shown good initial page load time and dynamic filtering speed. However, all those grids have shown a greater variation in scrolling speed, except when viewing the first few records of the grid. the Ext JS data grid has an outstanding scrolling speed which is 300x faster than other leading data grids, which can fetch and display massive sets of data in less than one second Ext JS grid consists of two parts which are Ext. data.Store and Ext.grid.The panel. The datastore represents the data and the set of columns in the grid to render.  The data stores give Ext Js grids the capability to load data inline and load them dynamically on-demand. It also allows loading nested data, sorting, and filtering. The following example shows a simple data store specified in JSON data structure which will be loaded to Ext Js Grid. Ext.create(‘Ext.data.Store’, { storeId: “myProductStore”, fields: [‘productid’, ‘title’], data: [{ ‘productid’: ‘1’, “title”: “LindtChocalate” }, { ‘productid’: ‘2’, “title”: “Milk” },] }); Ext.grid.The panel is the key component that allows displaying a massive amount of tabular data on the client side. For example, the below code generates a simple grid with two columns. The grid will load the data we specified in the above-specified data store. The grid generated will consist of the columns specified below and the header title ‘Products .’ Under the title will show the data directly below the header title.  var columns = [{ text: ‘productid’, dataIndex: ‘productid’, flex: 1 }, { text: ‘title’, dataIndex: ‘title’, flex: 1 }]; var grid = Ext.create(‘Ext.grid.Grid’, { title: ‘Products’, store: “myProductStore”, columns: columns, layout: ‘fit’, renderTo: document.body, width: ‘100%’, height: 300 }); Raw and Column operations, rendering, and scrolling Ext JS grid consists of a rich set […]

Read More

This Is The Blockchain: Expectations vs. Reality

We have discussed Blockchain technology in our “Everything You Need To Know About Blockchain” article. In that article we have learned about: Immutability Distribution How trust issues can be resolved with Blockchain Blockchain in the financial industry High integrity with Blockchain – and more You might find it useful to read that article first as a useful overview of what people mean by The Blockchain. We also talk about cryptocurrencies built with Object Pascal/Delphi programming language. What is the blockchain? Blockchain is simply a database containing a growing list of records named blocks, linked, and secured using cryptography. Each block holds a hash pointer that links to a previous block, timestamp, and transaction data. So, now we have a chain of blocks or just blockchain as many people call it. To point out that this chain of blocks or database is open, distributes system with every participating computer maintains a copy. What are the expectations of Blockchain? Market investigation indicates that blockchain technology will rule the future because of its many benefits like: Data transparency Immutability Decentralization Security A growing number of people think Blockchain is the future because it inspires a new generation of platforms that are easy to use, accessible, scalable, and interoperable. What is the reality of Blockchain? Despite the possibility that blockchain technology is not supported by many countries because of limits and control over blockchain projects. For instance, governments are fighting to not utilize Blockchain. Unless if blockchain technology matures through enough reforms to support the problems that we are having, it can be applied to every field of our society. Until now, blockchain technology has been a massive breakthrough in the financial industry: Cryptocurrency Decentralized Finance (DeFi) Art Collectibles – Non-fungible token (NFT) When companies started to accept cryptocurrencies, people started looking at the underlying technology that made cryptocurrencies possible. They are based on the basic concepts of cryptocurrencies applied to the deployment of general-purpose applications. These applications are called Smart Contracts, and this defines the business logic and after deployment to the network, it can be used to implement different use cases securely. Is it really worthwhile to integrate Blockchain technology? Technologies take time to be accepted by everyone. Blockchain technology can be a problem in some cases with specific people. But we can see that the financial industry is benefiting from this technology because it offers immutability, transparency, and reliability. For example, Blockchain has all the needed features in supply chains. Supply chain data is not always perceptible, available, or trusted. But blockchain technology helped them to create authenticity over these problems.  How to create decentralized applications with smart contracts in Delphi? You can utilize Delphereum which is an interface for the Ethereum blockchain that allows native development of decentralized applications using the Delphi programming language. In fact, the stability, security and blinding speed of Delphi native applications means it’s ideally suited to the task, Moreover, you can find samples of applications for starting your project with the Ethereum distributed computing platform. You can check out the post below to learn about using Ethereum with Delphi, smart contracts, and more helpful topics. Next-Generation Cryptocurrency – Pascal Pascal, also known as PascalCoin, is a fast, zero-fee, scalable, and decentralized multi-purpose blockchain designed for payments, data operations, and layer-2 applications. Enabled by the SafeBox technology to become the world’s first […]

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

How To Automate Large Numbers Of Delphi Project Builds

What is build automation? Despite the ever-increasing rise of mobile devices, desktop applications are still the backbone of enterprise environments. Typically, these enterprise solutions are made up from multiple discrete modules which are harnessed together to create an application suite. But even applications which are themselves monolithic there may exist multiple versions at any one time either to target specific use cases and operating systems or to provide for trialing versions of new functionality. It’s often quite complicated to keep on top of situations like this. It can really become overwhelming once you start to factor in things like cross-platform multi-device targets and functionality which includes localization into different languages such as a user interface which supports English, French, German, Spanish and so on Automating the builds of applications can be a huge improvement for developers who need to make various build scenarios and make repeated actions automatic. Automation can also help prevent mistakes which can creep in during repetitive and tedious tasks as our minds start to wonder or we lose focus. When we think about building web or mobile applications, we can think about techniques such as continuous integration and development pipelines or CI/CD as it’s more commonly referred to. Despite the benefits, developers are still often slow to utilize CI/CD for building and automating the builds and tests on desktop applications. Here’s a few suggestions on things to consider incorporating into your development and release processes which might help. How can I automate Delphi project builds? There are dozens of different solutions available to automate the process of building Delphi projects, but in this spotlight, we’re going to talk about MiTeC Project Maker and with a bonus solution at the end. What is MiTeC Project Maker? MiTeC Project Maker is a tool for automated batch Delphi projects building. With the Project Maker, you can set compiler configurations, define actions processed before and after building, patch version information of built binary, sign that binary with a specified code-signing certificate, apply for 3rd-party software protection, and many more. How does Project Maker work? Project Maker offers a clear powerful interface for project building task definition. Each project can contain an unlimited number of tasks. A ‘task’ represents a Delphi project as defined in a dpr or dproj file. Moreover, Project Maker features Profiles, where you can specify common properties for a project. The project can have an infinite number of profiles. By utilizing profiles, you can simply switch between a variety of build configurations.  Compiler Directives & Options Build options Signing tool Form Cleaner Versioning and more How can we use GitHub Actions to supercharge our GitHub workflow? With GitHub Actions, you can automate, customize, and execute your software development workflows right in your repository.  GitHub Actions are event-driven, meaning that you can run a series of commands after the specified event occurred. For instance, you can set a trigger to pull request event, and when there is a new change GitHub Actions starts code testing. Without any CI/CD integration, you can have everything with GitHub Actions. It gives end-to-end CI and CD capabilities. Additionally, it is in your GitHub repository. How do I use GitHub Actions on Delphi projects? One of the Delphi MVPs, Darian Miller, has written a number of useful articles and tutorials on Delphi. On his RADAuthenticator blog series, he shared his experience on configuring GitHub Actions with […]

Read More

The Pros And Cons Of Artificial Intelligence

Artificial Intelligence, or AI as we have come to refer to it, is a broad-ranging branch of computer science that focuses on automatic ‘thinking’ programs or machines that aim to imitate humans’ problem-solving and decision-making capabilities. Contrary to popular belief, artificial intelligence is built for humans, not to replace us but to make our jobs easier and augment our own abilities.  According to a recent article in Statistica in 2020, “the global total corporate investment in artificial intelligence (AI) reached almost 68 billion U.S. dollars, a significant increase from the previous year”. Also, another report titled “Global Artificial Intelligence in Retail Market Facts & Factors” projects the AI retail market will reach 20.5 billion U.S. dollars by the end of 2026, expanding at CAGR by 39% between 2020 and 2026. However, this parabolic growth in the artificial intelligence industry has led many to ponder what kind of impact AI has already had and will have in the future, with some doubting if AI’s effect will ultimately be for the benefit of society as a whole. What are the Pros of artificial intelligence? Over the years, artificial intelligence has found use cases in various industries, some of which constitute its pros. This article goes through a few of the views of either side of the arguments. Can AI really be useful to make ‘smart’ apps? In our daily life, artificial intelligence has numerous applications. For example, AI, and more specifically, machine learning, is used in face detection when taking pictures with smart devices. It helps in recognition of our live voice chat in smart devices such as Alexa, Apple’s Siri and even Cortana. In Google, the AI provides the facility of typing and responding purely by voice. This is one of the best uses of artificial intelligence. AI also provides direction and mapping in our navigation devices to assist with driving navigations to exact locations. The early navigation solutions were purely algorithmic, using mathematical techniques such as path analysis and optimization and the wonderfully named “simulated annealing” to pluck a good route from the myriad possibilities. Now those navigational instructions are enhanced with AI and machine learning to adapt to traffic conditions it has ‘learned’ have a negative impact on an otherwise good choice of route. Apple devices, for example, will suggest a good time to leave for your regular commute. In common with others it will also pick the nearest restaurants it ‘knows’ you like and apply filters to avoid ones it has learned you dislike. It’s not true AI as such but it’s as close as we have in many ways right now and, overall, I think we’d collectively see it as a great use of ‘smart’ apps. Until the navigation instructions try to get us to make a sea crossing in our car without a ferry – and we’re all surely ‘benefitted’ from the satellite navigation trying to get us to “drive a stupid route five miles out of the way” when our local knowledge knows that there is a shortcut which works better. Are they useful? Yes – anyone who remembers navigating with paper roadmaps or hastily sketched notes definitely appreciates the instant turn by turn instructions spoken by the friendly AI-backed GPS navigation. Is it an Analogue Helper? When we say ‘analogue helper’ we mean can […]

Read More

5 Apps To Help You Manage Your Automation

Advances in control system technology and robotic process automation software are changing how enterprises view and manage business processes and workflows. From improved asset utilization, faster process completion, to real-time data access, automation opportunities are limitless. However, many companies find automation projects challenging to execute as it takes more than “just technical skills” to successfully manage one. You need to ensure you’re leveraging tools that will improve operational efficiency and performance.  Here are five apps you can leverage for successful, rock-solid automation at maximum speed: Did you know Delphi is the fastest and most efficient way to manage automation projects? RAD Studio Delphi is the most powerful Object Pascal IDE and component library for single-source multi-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides modernized VCL controls for Windows 11 and enables FMX development for Windows, Mac, and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development. Enhancements include support for high-DPI and 4K+ screens, extended multi-monitor support, improved Object Inspector, and much more. Delphi is 5x faster for development and deployment across multiple desktops, mobile, cloud, and database platforms, including Windows 11. Successful automation projects require communication and organizational skills. With Delphi’s enhanced Remote Desktop support (for VCL and IDE), you easily collaborate remotely with your team. Is C++ Builder the ultimate answer to robust, lightning-speed automation projects? C++ Builder is a rapid C++ application development toolset for native Windows, Mac, and Mobile development, with broad Cloud and IoT support. It features updated CLANG 3.3 and C++11 support with the fastest Windows 11 and multi-device development tools. It also allows you to connect natively to over 20 databases like Oracle, SQL Server, MySQL, and more with FireDAC’s high-speed direct access. C++Builder comes with hundreds of components for every task, from creating user interfaces to database connectivity, enabling easy and fast builds for connected business applications on desktop and mobile platforms. In addition to the included VCL and FireMonkey components, a broad range of tools and components are available from the Delphi and C++Builder communities. How can PyScripter leverage Python and Delphi’s winning team for automation? PyScripter is a free and open-source IDE that supports writing, editing, and running python scripts. It has all the features expected in a modern Python IDE in a lightweight package. It’s also natively compiled for Windows to use minimal memory with maximum performance. Although it’s a simple and easy-to-use IDE, it contains more than enough features for professional users. PyScripter is fully developed in Delphi with huge extensibility via Python scripts. Some of its features include: Syntax Highlighting Editor Integrated Python Interpreter Full Python debugging with support for remote debugging Integrated Unit testing Integration with Python tools like PyLint, TabNanny, Profile, etc. Full support for encoded Python source Remote Python Debugger Run or debug files from memory Code Explorer To-Do List Find and Replace in Files Integrated regular expression testing Choice of Python version to run via command line parameters Run Python Script externally (highly configurable) Modern GUI with docked forms Persistent configurable IDE options Have you looked at Embarcadero Dev-C++, the ultra-light C++ power tool? Embarcadero Dev-C++ is a new and improved fork of Bloodshed Dev-C++ and Orwell Dev-C++. It is a full-featured Integrated Development Environment (IDE) and code editor for the C/C++ programming language. It uses […]

Read More