From the blog

Perform Ultra-Fast Time Series Analysis To Empower Your Apps

Analyzing time series can be a heavy burden for your apps. The calculations involved can vary from reasonably simple to mind-numbingly complex and doing it the wrong way can bring even a desktop machine to its knees. We’re going to show you five different ways to perform high-performance analysis on a time series to truly add enterprise-grade power to your apps in a scalable, responsive way. What is Time Series Analysis? Time Series is an ordered sequence of data points which spread over a period of time. Thus it is a sequence of discrete-time data. The Time Series Data is monitored over constant temporal intervals. This data can be in any measurable and quantifiable parameter related to the field of business, science, finance, etc (for example: Heights of ocean tides, counts of sunspots, the daily closing value of the Dow Jones Industrial Average, etc.). Time Series Analysis refers to identification of the common patterns displayed by the data over a period of time. For these tasks, experts employ specific methods to study the data’s characteristics and extract meaningful statistics that eventually aid in forecasting. Time Series Analysis is beneficial and commonly used for Economic Forecasting, Yield Projection, Inventory Studies, Census Analysis, Sales Forecasting, Stock Market Analysis, Budgetary Analysis, etc. Why use Python for Time Series Analysis? Python is a general-purpose interpreted programming language (unlike R or Matlab). Easy to learn and use primarily because it focuses on readability. It is a popular language in general, consistently appearing in the top 10 programming languages in surveys on StackOverflow (for example, the 2015 survey results). Python is a dynamic language and very suited to interactive development and quick prototyping with the power to support the development of large applications. Python is also widely used for Machine Learning and Data Science because of the excellent library support (in this post, you will learn how to implement Machine Learning for Time Series tasks). It means that you can perform your research and development (figuring out what models to use) in the same programming language that you use in productions, greatly simplifying the transition from development to production. Read more here, for Why use Python for Scientific Computing: Delphi adds Powerful GUI Features and Functionalities to Python In this tutorial, we’ll build Windows Apps with extensive Time Series Analysis capabilities by integrating Python’s Computer Vision libraries with Embarcadero’s Delphi, using Python4Delphi (P4D). P4D empowers 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 Computer Vision applications. Python4Delphi also comes with an extensive range of demos, use cases, and tutorials. We’re going to cover the following… How to use PyDSE, statsmodels, sktime, Nitime, and tslearn Python libraries to perform Time Series Analysis All of them would be integrated with Python4Delphi to create Windows Apps with Time Series Analysis capabilities. What do I need to perform time series analysis? 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 the Getting Started With Python4Delphi video by Jim McKeeth. Time to get Started! First, open and run our […]

Read More

How To Use A REST AI API The Really Difficult Way

REST AI APIs are really easy to use with RAD Studio Look, we have been spoiling you a little too much on this site. We keep showing you how few lines of code it is to call APIs on public REST servers. We showed you comparison tests which proved that the skilled Delphi developers in the test were nearly 7 times faster than some competing technologies. We’ve published a total smorgasbord of articles about how totally easy it is to use RAD Studio Delphi to perform artificial intelligence, machine learning and deep learning along with some nifty demonstrations integrating image processing in your apps. We really mean it when we say RAD Studio Delphi makes difficult tasks easier. We know though, you might not believe us. So here’s how to include artificial intelligence into your apps by using a REST API the really difficult way. What can be done with DenseCap Artificial Intelligence? DenseCap detects objects in an image. It creates a JSON object containing coordinates of detected objects and readable captions for them. In the left side of title picture, you see the image processed. The middle part shows starting lines of the JSON object text representation. The DenseCap page contains the product description. The mathematical background is described in this PDF document. For demo purposes, we chose the simplest – draw the found objects on initial image. You see it in the right part of title picture. An important practical usage – process a large image library and store extracted data in DB. This DB can be used to search images or fragments by caption texts. How do I use the DenseCap AI API in my applications? A DenseCap wrapper is available as a C# Nuget package. Available also C# source and JavaScript source in GitHub, but they are a bit obsolete. The DenseCap C# Nuget package does not expose COM interface. Therefore, we should create a wrapper DLL in Visual Studio. C# usage for two tasks, image file and image UR, proposed by DenseCap developers, is following: Our aim is a CLR C++ exporting two functions: __declspec(dllexport) BSTR Densecap_ProcessFile(BSTR key, BSTR filename); __declspec(dllexport) BSTR Densecap_ProcessUrl(BSTR key, BSTR url); __declspec(dllexport) BSTR Densecap_ProcessFile(BSTR key, BSTR filename); __declspec(dllexport) BSTR Densecap_ProcessUrl(BSTR key, BSTR url); These functions return strings – JSON object textual representations. For further processing in Delphi, these strings can be converted in JSON again. Unfortunately, currently Visual Studio CLR C++ does not support Nuget import. So, two wrappers required, C# importing Nuget and CLR C++ exporting desired functions. A complete solution available at the following link: https://github.com/checkdigits/Embarcadero_DenseCap2 All binaries required for Delphi are placed in the “Release: folder.. To work with Delphi, you do not need Visual Studio, simply download files from this folder. And now, you can skip chapters about Visual Studio, and go directly to the Delphi part. C# wrapper – project DeepAICsWrapper Right click on the project, select “Manage Nuget Packages”: Type DeepAI. Press Install. Selected package appears together with packages it depends on. Press OK. Create two static functions, for file and URL. Build the project. C++ CLR wrapper – project DeepAIClrWrapper Add a new C++ project – CLR Class Library. Right click References, add a reference to the recently created DeepAICsWrapper Required functions are in DeepAIClrWrapper.h, leaving cpp empty. Build the project. Using the […]

Read More

Rapidly Build A Visually Stunning Login For Your Javascript Dashboards

The login functionality of an application is the first thing most people see when they go to use a product. It is the most essential, inevitable, and foundational part of any software system out there. A developer who is working on an application often looks for quick and easy ways in which they can build the login part of an application, and focus most of the energy on implementing the actual business logic. In this blog post, we’ll see a quick overview of how we can rapidly build a login system for your JavaScript dashboards using Sencha Ext JS. For a more in-depth version of this guide see the documentation. How can I generate an app using Sencha CMD? Sencha allows you to generate an application boilerplate using the Sencha CMD. Run the following command in your terminal or CLI to generate a LoginApp boilerplate code. sencha -sdk /path/to/ExtSDK generate app LoginApp ./LoginApp Once you have generated the app, navigate to {appRoot}/app.js and remove the mainView config from the application config. We are doing this because we want to perform some validations and evaluations before deciding the initial view when the application loads. For example, there is no need to instantiate the Main view if the user is logged out of the system. At this point, when we have removed the mainView config, the browser shows a blank page upon refreshing the page. This is because the app does not know which view to instantiate yet. We handle this by adding plugins: ‘viewport’ line to {appRoot}/app/view/main/Main.js file. How can I create the login view components? After handling all the configurations and setup prerequisites, navigate to app/view folder inside the LoginApp folder and create a new directory called login. Inside this new directory, create two files Login.js and LoginController.js. Your directory structure should look somewhat like this now. How to generate the login window in my application? To create the login window, open the {appRoot}/app/view/login/Login.js file and define the Login class as follows. Ext.define(‘LoginApp.view.login.Login’, { extend: ‘Ext.window.Window’, xtype: ‘login’ }); In the above code, we essentially extended the Ext.window.Window class to create our own Login class to be further in the application. Let’s add some basic dependencies and properties that our Login class should rely on. requires: [ ‘LoginApp.view.login.LoginController’, ‘Ext.form.Panel’ ], controller: ‘login’, bodyPadding: 10, title: ‘Login Window’, closable: false, autoShow: true Now comes the actual UI part. We need to create a form containing at least three entities in total; username text field, password text field, and login button itself. items: { xtype: ‘form’, reference: ‘form’, items: [{ xtype: ‘textfield’, name: ‘username’, fieldLabel: ‘Username’, allowBlank: false }, { xtype: ‘textfield’, name: ‘password’, inputType: ‘password’, fieldLabel: ‘Password’, allowBlank: false }, { xtype: ‘displayfield’, hideEmptyLabel: false, value: ‘Enter any non-blank password’ }], buttons: [{ text: ‘Login’, formBind: true, listeners: { click: ‘onLoginClick’ } }] } All in all, the final code for in Login.js file should look like below. Ext.define(‘LoginApp.view.login.Login’, { extend: ‘Ext.window.Window’, xtype: ‘login’, requires: [ ‘LoginApp.view.login.LoginController’, ‘Ext.form.Panel’ ], controller: ‘login’, bodyPadding: 10, title: ‘Login Window’, closable: false, autoShow: true, items: { xtype: ‘form’, reference: ‘form’, items: [{ xtype: ‘textfield’, name: ‘username’, fieldLabel: ‘Username’, allowBlank: false }, { xtype: ‘textfield’, name: ‘password’, inputType: ‘password’, fieldLabel: ‘Password’, allowBlank: false }, { xtype: ‘displayfield’, hideEmptyLabel: false, value: ‘Enter any non-blank password’ }], buttons: [{ […]

Read More

The Future of Startups Demands Massive Productivity

Productivity means that you achieve as much as possible within a given time frame. It is a top priority for startups. You don’t want to see your software developers getting involved with time-consuming designing and coding to get the job done. Your team needs a massive productivity boost to solidify the future of your startup. But how can you enhance it? In this post, you will find all the details. Why do startups demand productivity? The start-ups around the world are obsessed with boosting productivity. But why do they need it? Here are the reasons: Desire for Growth Like every startup owner, you want your business to grow. And to achieve growth, your team needs to be very productive. It will enable you to deliver the best software service for your customers timely. It will help you to earn trust and draw the attention of large clients, which leads to the massive growth of your business. That’s why startups around the world demand massive productivity. Save Time and Money Every start-up wants to reduce overhead costs while maximizing profit. To achieve it, your business needs to be very productive. You don’t want your team to spend days on a task that can be completed within a few hours with an alternate framework. You want them to utilize the right tool to get the job done quickly and efficiently. It can save you a lot of time and money. How can Delphi provide a massive productivity boost? Delphi enables your team to develop software significantly faster than the other popular frameworks, including WPF.NET and Electron. A group of developers participated in a benchmarking test where they used all of these frameworks to build a clone of the Windows 10 calculator. The results were pretty interesting. Three Delphi developers managed to build the calculator in an average of 4.66 hours using RAD Studio. Also, there was one Delphi developer who re-used Delphi calculator code he had written to produce other Windows desktop versions of the calculator in the same productivity time trial and, using a readily-available 3rd party library, he went on to create an Electron calculator in just 7 minutes and then a progressive web app (PWA) in around the same time. It demonstrates the impressive code-reusability of Delphi. On the other hand, 16 developers completed the calculator using WPF.NET with a mean average time of 53 hours. To design the same thing, eight Electron developers took a mean average of 47 hours.  The test proves that Delphi is significantly superior to its competitor in terms of boosting the productivity of the development teams. Also, Delphi makes it very easy for you to create an appealing user interface visually. It provides you with the What-You-See-Is-What-You-Get (WYSIWYG) design experience. You can place components onto the Graphical User Interface (GUI) by simply performing the drag-and-drop functionality. You can resize them without touching a code. Also, the codes are significantly short. As a result, Delphi can boost productivity 5 times higher than both WPF and Electron. Should you really use Delphi? Delphi can boost the productivity of your software development team massively. It is faster, lighter, and more powerful than both WPF.NET and Electron. So, you should seriously consider using Delphi. It can meet the future demand of massive productivity of your startup effectively.

Read More

RAD Server CRUD Procedures – Part 3

In this RAD Server CRUD Procedures – Part 3 post we will show how to implement a FireMonkey (FMX) Client to call the RAD Server CRUD procedures and interact with the Employee Table. In the part 2 post, we discussed modifying the default generated CRUD procedure implementations from the RAD Server Package Wizard, to show one possible way to implement Get, GetItem, Post, Put and Delete. In the part 1 post, we discussed the the default generated CRUD procedure implementations from the RAD Server Package Wizard. The Embarcadero RAD Server (also known as EMS – Enterprise Mobility Server) uses the industry standards of REST, and to transfer data to and from the RAD Server REST Service, JSON – JavaScript Object Notation, is typically used as the transfer encoding. Due to the Embarcadero RAD Server supporting industry standard REST and JSON, we will use Delphi’s, C++ Builder and/or RAD Studio’s REST Client Library components (TRESTClient, TRESTRequest, and TRESTResponse ) to implement our EMS REST Client. And recall from Post 2, we used the System.JSON Classes (TJSONArray and TJSONObject) on the back-end RAD Server to implement our CRUD procedures. Employees REST Client For our main REST Client UI form, we have all of the ten (10) columns (fields) from our Employee Table, mostly as TEdit controls for First Name, Last Name, etc., and TSpinBox for the Employee Number, Department Number, and Salary, and one TDateEdit for the HireDate: The bottom panel has 10 TButtons. These buttons will perform the following functions from our RAD Server CRUD procedures:READ: performs the REST HTTP GET, to return all records from the Employee table.PREV: Displays the previous record.NEXT: Displays the next record.FIRST: Displays the first record.LAST: Displays the last record.CREATE: Starts the create mode, to allow the user to use the form to enter a new record.COMMIT: The commit button gets enabled by the CREATE button, and this COMMIT button makes the REST HTTP POST call to the RAD Server to INSERT a new record into the Employee table.EDIT: Starts the Edit mode for the UI form, similar to how Create enter a create mode, allow the user to edit a record.UPDATE: The update button gets enabled by the EDIT button, and after we have made edits to the record, this Update button makes the REST HTTP PUT call to the RAD Server to UPDATE this existing record in the Employee table.DELETE: This Delete button, let’s us delete the current EMP_NO from the Employee table, by making the REST HTTP DELETE call to the RAD Server to DELETE this EMP_NO from the Employee table. With the COMMIT and UPDATE buttons, we do perform their REST calls, and then we perform another GET (READ) call, to get all of the records again. This was just done just for simplicity reasons. This REST Client application also uses the REST Client Library components; RESTClient, RESTRequest and RESTResponse: The Embarcadero REST Client Library is a framework for accessing REST-based web services, like the Embarcadero RAD (EMS) Server. The library is available for all platforms that are supported by Delphi and/or C++ Builder The REST Client Library framework focuses on JSON as the representation format. Let’s now take a look at the implementation code for this Employees REST Client. READ (GET) The source code for the READ (Get) button is this: […]

Read More

Understanding the Colonial Pipeline Ransomware Attack

Published June 17, 2021 WRITTEN BY ED TITTEL. Ed Tittel is a long-time IT industry writer and consultant who specializes in matters of networking, security, and Web technologies. For a copy of his resume, a list of publications, his personal blog, and more, please visit www.edtittel.com or follow @EdTittel On or about May 7, 2021, Colonial Pipeline had to shut its pipelines down because of a ransomware attack. Colonial is a major fuel pipeline operator in the southern and eastern US. Its pipelines stretch from Texas to New Jersey, and reach into Louisiana, Mississippi, Alabama, Georgia, both Carolinas, Tennessee, Virginia, Maryland and Pennsylvania. After a week of downtime that saw gas shortages in many of the more eastern states just mentioned, the company announced on May 12 it was restarting pipeline operations. By May 15, those operations had more or less returned to normal. One burning question remains: What happened? Understanding The Colonial Pipeline Ransomware Attack A Word from Joseph Blount, Colonial Pipeline’s CEO In an interview with the Wall Street Journal, Blount recounted he authorized a ransom payment of $4.4 million. He did so because company executives, in the words of the WSJ story, “were unsure how badly the cyberattack had breached its systems or how long it would take to bring the pipeline back.” According to the WSJ, “Colonial Pipeline provides roughly 45% of the fuel for the East Coast…” Essentially Colonial Pipeline chose to disregard long-standing advice from the FBI and other law enforcement agencies not to pay ransom demands in such situations. Blount demurred and is quoted as saying he authorized payment because “…it was the right thing to do for the country.” More About the Attack Security experts are in agreement with US government officials who attribute the attack to a criminal gang based in eastern Europe named DarkSide. This shadowy organization builds malware to attack systems for extortion, and shares the proceeds obtained from its ransomware with affiliates who actually foist the attacks that see its ransomware take over business and government systems all over the world. As reported in the WSJ story, Colonial worked with experts who had prior experience dealing with the organization behind the attack. That said, the company declined to share details on the negotiations involved in making the payment, or how much of its losses might (or might not) be covered by its cyber insurance coverage. Once the attackers received payment, they provided a decryption tool to unlock affected systems. To underscore law enforcement advice, Colonial also disclosed that the decryption key did not provide everything needed to restore its systems to normal operation. According to CNN, and contrary to many other reports, the sponsoring Darkside organization is not “believed to be state-backed.” Instead Lior Div, CEO of cybersecurity firm Cybereason, describes DarkSide as a “private group that was established in 2020.” That said, consensus is emerging that DarkSide operates in Russia for two compelling reasons. According to CNN, “its online communications are in Russian, and it preys on non-Russian speaking countries.” Div is further quoted as saying “Russian law enforcement typically leaves groups operating within the county alone, if their targets are elsewhere.” DarkSide runs what CNN and other call a “ransomware-as-service” business. That it, it builds tools that it makes available to other criminals, who then use […]

Read More

Build A Modern, Scalable AI Chatbot Into Your Apps in Under 5 Minutes!

User interaction now has a new set of tools: Chatbots and they have many advantages. Chatbots have become almost ubiquitous in recent times. Not only that but many of the bots have added power by the inclusion of basic artificial intelligence and machine-learning to make them much smarter and with that added smarts they can become much more useful than a simple “hi how are you” interaction, often carrying out tasks such as automated order tracking, support inquiries and appointment management. Chatbots have come a long way from the days of Joseph Weizenbaum’s Eliza. Is it hard to add a chatbot to my app? No! Things have come along in leaps and bounds in recent years. Modern chatbots are easier to install, often distributed across robust, scalable cloud platforms, and are extremely portable across different operating systems and device targets. Despite this the time involved in implementing them in your code is extremely fast. What makes up a modern chatbot? The construction of a chatbot basically goes through two major challenges: Natural Language Processing (NLP) and natural language understanding (NLU). In this article we’re going to meet those challenges in an easy to understand and rapid-to-implement way using Wit.ai as the foundation for our AI Chatbot. Wit.ai is an open NLP engine for developers. It allows you to build human-like conversational applications. Wit.ai provides an easy interface and API allowing our apps to understand human conversation from interactions, parsing the message into data we can then act on. Wit.ai is one of the most powerful APIs used to understand natural language and it’s free. Wit.ai works with NLP and NLU. NLU is the process of understanding what a sentence means. This kind of extracted meanings are called “intents”. A typical intent might be that the user wants to view a weather forecast or they want to see or hear a collection of tasks on a todo list. What does natural language processing (NLP) actually do? NLP breaks a sentence into pieces called entities. They are variables that contain details of the user’s task. For example, for a weather forecast, you should be able to identify which place the user wants the forecast for. Wit.ai offers an API that takes text or voice input and returns intents and entities. When NLP is combined with NLU – the input from the user – your application may take actions or even interact with and ask the user new questions. How do I create an AI chatbot in my application? Go to https://wit.ai/ create an account and a new app. You should see something like the following screen: In the “Utterance” section, you can enter a message that a user would type. Wit.ai may not understand the intent and the entities at first, you need to train it. Choose the intent and highlight the entity manually, as my example: Then click on the button to train your bot. Also, check  ‘See how it works’ to get more information and, the API documentation here. Add some more Utterances to train your bot, until, at least, it can get the intents and entities automatically. Now, we are ready to implement AI on a chatbot application. How do I implement Wit.ai in my own chatbot application? First, you will need a chatbot application. This post will not […]

Read More

From Bindings List to Visual LiveBindings

Having looked into Delphi’s expression engine, component bindings, and the bindings list component, we can now look at the easy and intuitive way to configure an application with dynamic bindings, the Visual LiveBindings design surface. Over the past few weeks, I blogged about Delphi’s expression engine, binding expressions and component, and the bindings list component. Now it is time to put it all together by looking at the visual tools Delphi makes available to easily configure bindings. This is called LiveBindings Designer (available under the View | Tool Windows menu) and it’s an additional pane you can display alongside a design time form or data module. Here is how the demo from the last blog post looks in the LiveBindings Designer: Now if you want to create some of the bindings directly in the designer, you can do the following sample steps: Open a new form Drop a NumberBox controls and a Progressbar controls In the LiveBindings designer drag from the Value property of the NumberBox to the Progress property of the Progressbar, like below: Now, enable the inline arrows to change the value and it will work with no code. Alternatively, if you type in the NumberBox, the value gets refreshed when you leave the control (so you need at least another control that can receive the input focus. Now this is a very simple scenario, there are many properties of controls you can connect, but you might need to expand the “bindable” properties from the default ones, by selecting the three dots at the bottom of the elements in the LiveBindings designer. Now it is important to notice that this designer and the related wizards are primarily focused on database data binding scenarios, which is why associating UI controls doesn’t always work easily. We’ll look into data bindings in a future blog post.

Read More

One subscription for all current VCL components!

TMS VCL Subscription is our two year subscription to all our current & future VCL products for Windows application development. With this bundle you will save over 60% now and even more with new free VCL component releases! This bundle includes many unique products like TMS VCL UI Pack with over 600 VCL  components, grids, flexcel, charts, … All products come with perpetual licenses and 2 years of FREE updates & support. After 2 years the subscription can be extended at 50% discount! Products included in the bundle: TMS Logging TMS VCL UI Pack TMS VCL Cloud Pack TMS VCL Chart TMS VCL WebGMaps TMS PassKit TMS FlexCel Component Suite for VCL TMS Scripter TMS Query Studio TMS Unicode Component Pack TMS GUIMotions TMS Async TMS VCL Plugin Framework TMS VCL Security System TMS VCL Instrumentation Workshop TMS Workflow Studio TMS Diagram Studio TMS MultiTouch SDK Get full access to VCL components: Best bundle for Delphi / C++Builder VCL Win32 or Win64 application developer.  2 years free updates & free support.  Renewal after 2 years at 50% discount instead of regular 795 EUR*. Always current with latest Delphi & C++Builder releases. All products accessible via TMS Subscription Manager tool. Full online support through TMS Support Center. *The price is valid for this moment & depends on the price of the pack at the moment of renewal. Act now: Find out more about our products included in TMS VCL Subscription and get your license today! NOTE: Contact sales for special upgrading pricing for existing customers of other products.

Read More

This Native High-Accuracy Walking Profiler Can Measure Reality

Whenever we try to represent The Earth we tend to use globes. The planet we live on is spherical, right? A flat stretch of sidewalk is… flat, isn’t it? Well, no, actually, it’s very far from flat. If you get down to the nitty gritty (literally, gritty) ground level it is, in fact, a rolling landscape of microscopic hills and mountains with sweeping gullies. The Walking Profiler from ARRB Systems is a specialized device which measures those tiny ups and downs and captures that information. Flexibility and high-performance in the palm of your hand The app which performs this high-performance and super-accurate integration of micro reality with the digital world is written with RAD Studio Delphi and the cross-platform FireMonkey framework. ARRB Systems Website The Walking Profiler G3 is the third generation Walking Profiler since its initial inception, and continues to be the ‘gold standard’ unit for high accuracy pavement reference profiling. As stated by the developer, “Differing from the previous generations, the unit utilises a tri-axial accelerometer mounted on a rolling platform to enable measurement of longitudinal profile. This platform is separate to the carriage, which means it is less susceptible to operator input ie. lean and change of angle.” Walking Profiler in action. Source: ARRB Systems Website Website Walking Profiler G3 – ARRB Systems Google Play Walking Profiler Screenshot Gallery Integrating with physical hardware devices is made much easier by the power of RAD Studio Delphi. Why not download a trial copy today?

Read More