Delphi

How Do I Add An Ultimate AI-Driven Chatbot To My App?

Chatbots are the unctuous umami flavoring to modern enterprise-grade apps. The AI in the chatbot is the secret sauce. What you need is the recipe. A chatbot adds that extra polish to your app, if it’s appropriate to your user base and the app’s purpose. At the most fundamental level the chatbot is simply a computer program which simulates human conversation and is used to engage with your users, taking your app’s human interaction to your user in a very personal way. Implemented correctly, we are able to automate repetitive and bureaucratic tasks which leaves we developers free to focus on – and hopefully solve – the more complex problems. Why add a chatbot to my app? Many companies are examining various processes, such as frequently asked questions and initial trouble-shooting or triaging of support inquiries which they then to put in a flow diagram and structure the requests and responses in the form of a written, or sometimes spoken, dialogue. When chatbots go rogue – “let’s eat Grandma” The hard part about chatting is understanding what is being meant, not what is actually being said. The best and most successful chatbots employ artificial intelligence to help us with the tricky job of understanding whether “let’s eat Grandma” or “let’s eat, Grandma” is an appropriate thing to say prior to a family meal, or an invitation to casual cannibalism. Poor Grandma. Adding scalable AI can help make your app make sense of the nonsense Joking aside, the AI still needs to work out what the intent of a sentence is. If I type “my internet is not working” the AI needs to understand that “the internet” is something that may or may not function and that the internet not working means it is not functioning but the phase “my dad does not work” means he is not currently employed rather than he is non-functional. In a conversation, there are many ways to ask the same thing and it is impossible to prepare your chatbot manually, to predict all of them. Here is where Artificial Intelligence takes our apps to the next level. With it, even asking in a way you did not predict, you get correct answers. You could create your own AI, but far better to use an external tool like Watson (IBM), Google Ai, or Wit.Ai (Facebook). Let’s summarize a menu of a few key ingredients (Grandma is not on the list) which, when combined, will allow you to add a fully-functioning chatbot, with Ai, using Delphi. AI Chatbot Ingredient Number 1: The RESTful API The first is step is to know how to consume and offer API endpoints in  Delphi. The majority of the platforms that you will use to talk with someone are external. This means that you need to send the message from your ChatBot to them. Usually, you will need a Rest API server. Also, you will probably need to consume their REST API endpoints. A great tool to offer API endpoints and create your REST API server is Delphi MVC Framework. It is simple, but robust at the same time. You can check the full implementation of the Delphi MVC Framework here. Consume REST API endpoints are easy with Delphi, you can use the Delphi REST Debugger. You can check a simple way […]

Read More

Exploring ARM on the Desktop

In the next TCoffeeAndCode session at noon CDT on June 30th, we are taking a look at Delphi 10.4.2 on the new desktop Arm based Apple M1 CPU with both MacOS and Windows 10, with a little look at the recently announced Windows 11. I’ll be updating this post with more details of working with the Apple M1 processor and ARM on the desktop. I have an M1 powered Mac Mini running the latest Mac OS and the Windows 10 for ARM in a virtual machine. If you are familiar with the RAD Studio Roadmap you know that the next major release of Delphi will include native support for the Arm based Apple M1 processor. We won’t be covering any of the unreleased versions of Delphi, but instead looking at the compatibility and interoperability of 10.4.2 today.

Read More

Powerful Business Management iOS & Android App

Wood and timber has been a flourishing industry for thousands of years. Some of the oldest traces of early mankind include evidence that we were using wood to make our lives easier; as tables, for leverage on the slabs of Stonehenge, bridge pillars in ancient muddy causeways. Even arrows to helps us obtain meat and food bowls in which to prepare and consume it. The dragon-headed Viking long ships and the more curlicue Mayflower which braved towering seas, the vast beams of old English Tudor houses, and even the great William Shakespeare’s original Globe theater were all made from this versatile material which, quite literally, grows on trees. It’s a relationship which has stood the test of time with very little change while the world around it began to buzz with the sound of electricity and engines. Into this dominion of wood and its products there is room for some modernity. The business of wood, like any, has bills to pay and inventory to manage and what better way to do that down in the wilds of a lumber yard than to have a handheld mobile device which can go where more clunky desktops and laptops might be a hinderance rather than a help. 3LOG LIMS integrates the LIMS System into easy, powerful mobile access LIMS is powerful business management software for the timber and wood products industries. As stated by the developer, “It combines the features of a log or timber accounting system with support for silviculture, wood procurement, contractor payables, vendor and contract management, log and wood products inventory, sales and consumption, business planning, querying, reporting, and accounting. LIMS has proven its capabilities at over 500 sites in North America. Companies from single mills to big names in the forestry industry are using 3LOG software every day. With LIMS, you can configure the system to work the way your company works, and then easily add new business activities without additional programming. For example, if you decide to start trading logs or fiber from a mill that previously only consumed wood, you simply add the customer and your contract and accounting rules, and start entering transactions. The features are already in the system, without additional programming.” Of course, it’s written using RAD Studio Delphi with the flexible yet powerful FireMonkey FMX framework. The 3Log Website Website 3LOG LIMS Apple App Store 3LOG LIMS Google Play 3LOG LIMS Screenshot Gallery RAD Studio Delphi makes writing cross-platform apps much easier and allows you maximum code-reuse to harness the full native power of your user’s devices. Why not download a trial today?

Read More

Powerful Enterprise-Grade Real-Time Streaming For IoT

Did you know how easy it is with RAD Studio Delphi to add powerful, enterprise-grade real-time streaming to and from IoT devices? We’re going to show you how to get your apps to talk to IoT devices securely and in a robust fashion in just a few easy steps. IoT and Delphi – linking the “internet of things” IoT is very popular these days and the number of connected devices are growing at unprecedented rate. We can find “things” connected to the internet and used for all sorts of applications in our homes, offices, industry and commerce. In fact, they’re so ubiquitous we sometimes don’t even notice them and the form factor they take can be non-obvious too, taking such ephemera as ‘smart’ dog collars, luggage tags, or even automated egg monitors in chicken farms. These physical devices usually have integrated software to allow them to communicate with each other and of course to provide useful information to humans. Many are designed to do that with little to no human intervention. I took a look at a small internet search for “connected devices” to see what would come up: Google Home Voice Controller Amazon Echo Plus Voice Controller Amazon Dash Button August Doorbell Cam August Smart Lock Kuri Mobile Robot Belkin WeMo Smart Light Switch Footbot Air Quality Monitor Flow by Plume Labs Air Pollution Monitor Nest Smoke Alarm IoT devices have a common theme IoT devices have two things in common: Capability to connect to the internet. After all, it’s the “I” in “IoT”. Having some inbuilt technology to provide their functionality such as sensors, functional software and the connectivity. The market for IoT devices is increasing surprisingly. We have now reached the stage where there are more IoT devices than humans. What is IPWorks IoT? IPWorks IoT is a light-weight library which you can use in your Delphi and C++ builder applications to easily integrate IoT communication protocols. It supports all of the common protocols. IPWorks has a long history and has been a very reliable framework for over 25 years now. These IoT components are based on those IPWorks framework so you don’t have to worry about their security and reliability. Another great feature is the components do not depend on any external libraries or similar dependencies. Also the components are thread safe which is an added bonus when dealing with multiple devices with potentially simultaneous flows of real-time data. The icing on the cake is that IPWorks has a great active online knowledge base. Where can I get IoT components for Delphi? You can get IPWorkis IoT from Getit libraries: https://getitnow.embarcadero.com/trial-ipworks-iot-2020-delphi-edition/ How do I implement MQTT with IPWorks IoT? MQTT stands for MQ Telemetry Transport. MQTT is the OASIS standard for IoT messaging. MQTT is basically designed for low resources scenarios such as microcontrollers. MQTT use less bandwidth than other protocols such as HTTP. Message headers are smaller and the overhead in sending/receiving them is correspondingly lightweight too. MQTT is bidirectional. Also it allows message broadcasting. Messaging is very reliable. There are three levels of QoS. At most once (0) At least once (1) Exactly once (2) MQTT is very useful in unreliable networks. With MQTT persistent sessions, you can reduce the bandwidth and response time. Also you can setup TLS and transfer data securely. IPWorks […]

Read More

[Webinar] Deciphering the Enigma of Project Upgrades

Embarcadero’s users understand the scalability and stability of C++ and Delphi programming, and depend on the decades of innovation those languages bring to development. Ninety of the Fortune 100 and an active community of more than three million users worldwide have relied on Embarcadero’s award-winning products over the past 30 years. Icons by Icons8.com. © 2020 EMBARCADERO INC. ALL RIGHTS RESERVED

Read More

Add The Powerful Angular Web Framework To Your Delphi Apps

Angular is an extremely popular and powerful web application design framework. It’s a development platform for creating highly efficient and sophisticated single-page apps. Angular is built on TypeScript which is a strongly-typed super-set of JavaScript. The TypeScript framework shares a parentage with Delphi since the project is headed by Microsoft’s Anders Hejlsberg who we all know better as the original creator of Delphi. Anders is still very active in the TypeScript project. TypeScript was designed to overcome some of the shortcomings of JavaScript and in particular to try and use the lessons learned with Delphi’s superb type system to help prevent very common and subtle errors which crop up frequently in JavaScript when developers accidentally misuse an object. What sort of features does Angular include? It’s a component-based framework for building scalable web applications. TypeScript has a collection of well-integrated libraries that cover a wide variety of features, including routing, forms management, client-server communication, and more TypeScript has a suite of developer tools to help you develop, build, test, and update your code With Angular, you’re taking advantage of a platform that can scale from single-developer projects to enterprise-level applications. Angular is designed to make updating as easy as possible, so you can take advantage of the latest developments with a minimum of effort. Best of all, the Angular ecosystem consists of a diverse group of over 1.7 million developers, library authors, and content creators. What can we do with Angular and Delphi? Of course many things we can do using Delphi, one of them is by serving Angular application using it, so let’s create simple web application using Angular. Here are the steps: Running Angular with Delphi Run application and point your browser to http://localhost:8080/index.html , you should see something like the image below: Easy isn’t it ? Please check updated code here https://github.com/checkdigits/horse-API-Demo

Read More

Visualize Our Astounding Planet’s Journey Around The Sun

No matter how big, successful or important we may, or may not, become in our lives we are all just tiny ants in a vast Cosmos. It’s humbling and useful to remember when you’re having a bad Monday or a terrific Tuesday that we’re each just one of 7.5 billion people hurtling around the Sun. That circuit of the Sun, of course, has fascinated humankind for thousands of years, provoking ancient British Iron Age people to build Stonehenge and Egyptian pharaohs to worship it as the deity Ra. In the English language we even have a day of the week named after it. Our whole wide world in the palm of your hand So with this solar preoccupation it’s perhaps no surprise that there is a striking mobile app from Belgian developer MICRI Consult based in Oostende which helps us to visualize the Earth, its position in space relative to the Sun and how the shadow of night glides across our globe’s surface. It’s at once both a terrific teaching aid for children and adults alike, a useful reference for the physics and astronomical data involved and a beguilingly addictive game too. That’s a pretty clever trick to pull off in a mobile app! How is this native Android app produced? Written in the richly powerful cross-platform FireMonkey FMX framework using RAD Studio Delphi, the Earth Positions app really helps us picture anything we could ever want or need to know about the relationship between the Sun and our blue planet home. Learning is made more fun through clever use of educational games and smooth, rich video animations to engage little learners and the bigger ones too! Great stuff by MICRI Consult What does the Earth Positions app do? The app has three main feature animations The Geographical game, where you have to guess a location on a 3D-earth, which rotates and tumbles to display that location in the middle. This game contains 4 levels (beginner, skillful, advanced and expert), 5 continents (Africa, America, Asia, Europe and Oceania) and 5 groups (capitals, large cities, airports, towns and other). Users can get up to 3 hints and depending on the level, you may have to choose between 3, 6, 9 or 12 possibilities. It contains more than 3000 locations, of which 243 capitals and 108 large cities. Day and night, showing the shape of the night over the earth for any given date and time. It also shows the time at different earth positions and the city lights of the capitals and large cities at night. At the start, the animation shows the current day, but you can select any date to observe how shape of the night changes during the seasons, e.g. March 21, June 21, September 21 and December 21. The earth orbiting around the sun, showing the actual date for each position, the seasons and the special orbit positions of the earth. You can also select any date to indicate it on the orbit. Google Play Earth Positions Screenshot Gallery Do you want to produce a beautiful app with high-performance, native power – RAD Studio can help you do it. Why not download a trial today?

Read More

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

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