Noutați

This AI API Makes Your App A “Fast Style” Artistic Genius

The AI API “Fast Style” is a form of graphical style transfer which uses a neural network to combine the artistic styles of one image with another to render a new unique image. You can think if it like taking a photograph and combining it with a Manet painting to produce a unique photo after the style of Manet. To make art, we will use the help of DeepAi.org a platform that you can use to make a lot of artificial intelligence projects. One of them is “fast style transfer”. We will connect with their API using Delphi. REST and Delphi makes the API easy to use Delphi has a tool called REST Debugger that makes it easy to connect with a REST API. After using it and successfully make the connection, you can copy the components into your Delphi application. Let’s dive into the DeepAi API and see how to build a desktop application to make art. How to connect with DeepAi API? DeepAi has good documentation around their API, which you can check here. First of all, you will need to make an account on DeepAi.org and take your API key. You are gonna need it later. From the Fast Style documentation, you can see that you will need to send three parameters to the API endpoint. Two links or files with images (where one is the image to render and the other, the style you want to apply), and your API key. How do I use Delphi to Connect with DeepAi API REST endpoints ? First of all, let’s use the REST Debugger found in RAD Studio Delphi. The REST Debugger is a visual tool to connect with any API, make a call, and get a response. In your Delphi IDE,. To use it, in the IDE menu, go to Tools > REST Debugger. Change the Method to POST and insert the API Endpoint ( https://api.deepai.org/api/fast-style ) in the URL field. Then, go to the Parameters Tab. To add the image links, click on the Add button. If you want to send a link directly from a web link, on Kind, select BODY. If you want to send a file of your hard drive, select FILE instead. In the name, write ‘content’ and put the link of the image in the value. For your style image, just change the name to ‘style’. Lastly, click on add again e now, select HEADER on Kind and, on name, write api-key and on value, put your API key value. Sending a REST request to the DeepAI API Now, click on Send Request and after some time, you should receive a 200 response and, on Tabular Data Tab, you will see the output_url, with the link of the image that the artificial intelligence created: Congrats, now you can send and get data from an Artificial Intelligence API and use it as you want. How do I build a Windows desktop application to send and get images from the DeepAi API? The application we are gonna build here will get the images from your computer, show and send them to the deepAi API. Also, it will show the image that the API returns and save it into the application folder. So, with a form already created, paste the components copied from the […]

Read More

TMS WEB Core for Visual Studio Code v1.3 released

Today is an exciting day as we reached yet another milestone, this time the release of TMS WEB Core for Visual Studio Code v1.3. You are an Object Pascal expert, your customers look out to access your applications everywhere via the web and without any install hassle, you love the RAD component based development methodology, you can do this software development from the operating system you love … then having a look at TMS WEB Core for Visual Studio Code v1.3 will open a whole new world!  What brings TMS WEB Core for Visual Studio Code Fully Object Pascal based web development RAD component methodology driven fast & productive development  Hosted in a free hugely popular IDE for web developers Running on Windows, macOS and Linux Using a WYSIWYG form designer A framework that has a similarities with the familiar VCL framework where possible  What is on the table in v1.3 This major update is packed with significant new features: Support for packages Yes, from now on, it is easy to create your own custom components and compile & install these for use at design-time. The package system is similar to how you can use packages to install components in the Delphi IDE or Lazarus Support for workspaces With workspaces, now you can have multiple projects in a folder and activate and select which project to compile/run/debug. Support for using the entire FNC component suite As our entire set of FNC components is ready for use in web client applications, the new package support in TMS WEB Core for Visual Studio Code enables to install all TMS FNC components in the TMS WEB Core for Visual Studio Code IDE. The latest FNC registered version updates released last week contain all the required packages for this. Brings the framework up-to-date with latest version as available in TMS WEB Core for Delphi/Lazarus v1.7 The TMS WEB Core framework that comes with TMS WEB Core for Visual Studio Code is now in sync and up-to-date with the latest release of TMS WEB Core for Delphi. This means that all new components and component improvements are now also available for Visual Studio Code users. This includes the new USB components, local file access components, new Firestore dataset capabilities, extensions to grids, web socket connection improvements and much more…  One important note though, the Miletus application type is not yet in our release for Visual Studio Code release but scheduled for the next release.  Get started! There are several ways to get started with TMS WEB Core for Visual Studio Code TMS ALL-ACCESS users have immediate & free access to TMS WEB Core for Visual Studio Code TMS WEB Core for Visual Studio Code registered users will find the new release now on your “My Products” page A fully functional trial version for Windows, macOS or Linux is available We have a webinar coming up that will guide you around the IDE, the framework, the possibilities Check more details about FNC and using FNC components from Visual Studio code in this blog  Learn how to use packages, write your own components or use FNC components We have already two videos for you and more are coming. Chief architect José Leon Serna explains how to start using packages: José Leon Serna and Bruno Fierens host a […]

Read More

Powered by Delphi: The Ultimate App For Tinnitus Sufferers

It’s often overlooked that writing a Delphi application can make a real difference to people’s lives in a very meaningful and profound way. Tinnitus Help by US Developer Mango Chutney may just be one of those game-changing Delphi mobile apps. According to the US Center For Disease control and the American Tinnitus Association, around 15% of all Americans, around fifty MILLION people, suffer from some level of tinnitus. Those percentages are dwarfed by the numbers of people worldwide who also suffer what can be a debilitating condition. It’s a subject brought to light recently by the hit Amazon movie “The Sound Of Metal” which documents the journey into hearing loss of a rock drummer – played by actor Riz Ahmed. Your Delphi programs could make a positive difference to people’s lives Given the numbers of people who live every day with the difficulties brought about by tinnitus German developer IND (Ingenieurbüro für Nachrichten und Datentechnik) are well-placed to really touch user’s lives in a positive and possibly transformative way. ‘Tinnitus Help’ is eight programs in one. As stated by the developer, “The ultimate application for tinnitus sufferers. Only naturally produced sounds of musical instruments and sounds of Mother Nature – no synthesizers! Developed by an expert software engineer in the field of frequency analysis and a leading music psychologist, music therapist and hearing therapist with more than 20 years’ experience in the treatment of tinnitus sufferers. Used very successfully in the treatment of tinnitus.” Google Play Tinnitus Help Screenshot Gallery Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder. Design. Code. Compile. Deploy.Start Free Trial   Upgrade Today    Free Delphi Community Edition   Free C++Builder Community Edition

Read More

Working Example Code of Using STOMP In Your Application

object frmMain: TfrmMain   Left = 0   Top = 0   BorderIcons = [biSystemMenu]   BorderStyle = Single   Caption = #144’Delphi STOMP Client’   ClientHeight = 495   ClientWidth = 384   FormFactor.Width = 320   FormFactor.Height = 480   FormFactor.Devices = [Desktop]   OnCreate = FormCreate   DesignerMasterStyle = 0   object btnSubscribe: TButton     Position.X = 32.000000000000000000     Position.Y = 32.000000000000000000     TabOrder = 0     Text = ‘Subscribe’     OnClick = btnSubscribeClick   end   object edtTopic: TEdit     Touch.InteractiveGestures = [LongTap, DoubleTap]     TabOrder = 1     Position.X = 120.000000000000000000     Position.Y = 32.000000000000000000     Size.Width = 233.000000000000000000     Size.Height = 22.000000000000000000     Size.PlatformDefault = False   end   object Label1: TLabel     Position.X = 120.000000000000000000     Position.Y = 16.000000000000000000     Text = ‘Topic’     TabOrder = 2   end   object btnPublish: TButton     Position.X = 32.000000000000000000     Position.Y = 80.000000000000000000     TabOrder = 3     Text = ‘Publish’     OnClick = btnPublishClick   end   object edtMessage: TEdit     Touch.InteractiveGestures = [LongTap, DoubleTap]     TabOrder = 4     Position.X = 120.000000000000000000     Position.Y = 80.000000000000000000     Size.Width = 233.000000000000000000     Size.Height = 22.000000000000000000     Size.PlatformDefault = False   end   object Label2: TLabel     Position.X = 120.000000000000000000     Position.Y = 64.000000000000000000     Text = ‘Message’     TabOrder = 5   end   object Memo1: TMemo     Touch.InteractiveGestures = [Pan, LongTap, DoubleTap]     DataDetectorTypes = []     Position.X = 32.000000000000000000     Position.Y = 120.000000000000000000     Size.Width = 321.000000000000000000     Size.Height = 345.000000000000000000     Size.PlatformDefault = False     TabOrder = 6     Viewport.Width = 317.000000000000000000     Viewport.Height = 341.000000000000000000   end end

Read More

Developer Stories: Aldo Victoria Talks About Uworktify

Aldo Victoria started using Delphi in 2001. His application (Uworktify: A Fun Online Print Service Provider App Is Built In Delphi) was one of the submitted showcase entries over at the Delphi 26th Showcase Challenge. Aldo took some time out of his busy schedule to give us some background about how he acquired Delphi skills and knowledge. Head over to the Uworktify website for further information on Aldo’s showcase entry app. When did you start using RAD Studio Delphi and have long have you been using it? I started using Delphi 5 back in 2001. I used Delphi as the main programming language of a telecom company that I worked for from 2001 to 2007. In 2014, I started to experiment with using Delphi for mobile development. Then, in 2019, I started the development of a mobile bond trading app, that was acquired by the second biggest bank in the Dominican Republic. Unfortunately, the bank uses IONIC as their main development language, so we are migrating the mobile bond trading app to Ionic for this customer. We will continue the development of the mobile app for Delphi and Ionic. In 2020, I funded a startup called Uworktify. Uworktify is a Tech Startup incorporated in Delaware, US. We are developing a mobile app and platform to help people aged 25-50 years and small sized businesses that want additional money and those who have underused assets by sharing the asset with the community through our high tech platform, which takes automatic management of all aspects of asset-sharing such as ordering, payment, delivery, CRM, Insurance tech, and AI to manage asset usage/promotion. What was it like building software before you had RAD Studio Delphi? I used C before Delphi. Development using C was very hard and slow! How did RAD Studio Delphi help you create your showcase application? I was able to develop the app in just a couple of months mostly completely by myself. I really think that I was able to do it this way because Delphi is a great tool. What made RAD Studio Delphi stand out from other options? I am not sure about the answer to this question. I think that they are really good free tools for developing mobile apps out there. For me, the biggest stand out is that I had good programming skills already with Delphi and I was able to re-use them to create a mobile app. What made you happiest about working with RAD Studio/Delphi? The graphical IDE and the language is very friendly. Delphi is updated all the way! I haven’t found anything that I can’t do with Delphi, no matter how complex the task is. What have you been able to achieve through using RAD Studio Delphi to create your showcase application? Developed mobile applications for Android/iOS Integrated the following platforms: AWS Amazon S3 Stripe Twillio SendGrid Use other REST API Application What are some future plans for your showcase application? We plan to move the operation from the Dominican Republic to USA and start looking for funding. In 2021, we plan to have the application available in the USA and in other countries by 2022. On the technical part, we are developing the integration of the application with Hubspot and Uber. Thank you, Aldo! Check out Aldo’s showcase entry below […]

Read More

Detecting Logos On Images Using Google Cloud Vision API

It’s a cliché that Developers are known for their taste to work long hours while drinking coffee… so, if you are into programming you most probably know the logo in the image below as it stands for the American multinational and world’s largest coffeehouse chain, Starbucks! The power of logos The point is that there is no name written in the coffee mug, just a logo. Let’s imagine for a moment that I don’t know which brand the logo represents; wouldn’t it be nice to have a way to find out what the logo stands for and to whom it belongs? Even more than that – wouldn’t it be even better if we would incorporate that ability to recognize the logos in our own Windows, desktop and mobile applications? The good news is that’s exactly what we can do with the Google Cloud Vision API. Google Cloud Vision API Logo Detection API The option for “Logo Detection” is a part of the Google Cloud Vision API that we can use to detect and extract information about multiple logos in an image. For each logo detected Google provides a textual description of the entity identified, a confidence score – how certain the machine learning AI is that the detection is accurate – and a bounding polygon for the logo in the file so we know where it is located within the area of the image. We can easily use machine-learning AI in our Delphi applications Google Cloud’s Vision API offers powerful pre-trained machine learning models that you can easily use on your desktop and mobile applications through REST or RPC API methods calls. Lets say you want your application to detect objects, locations, activities, animal species, products, or maybe you want not only to detect faces but also their emotions, or you may have the need to read printed or handwritten text, this and much more is possible to be done for free (up to first 1000 units/month per feature) or at very affordable prices and scalable to the use you make with no upfront commitments. We can use RAD Studio and Delphi to easily setup its REST client library to take advantage of Google Cloud’s Vision API to empower our desktop and mobile applications and if the request is successful, the server returns a 200 OK HTTP status code and the response in JSON format. Our RAD Studio and Delphi applications will be able to either call the API and perform the detection on a local image file by sending the contents of the image file as a base64 encoded string in the body of the request or rather use an image file located in Google Cloud Storage or on the Web without the need to send the contents of the image file in the body of your request. How do I set up the Google Cloud Vision Logo Detection API? Make sure you refer to Google Cloud Vision API documentation in the Detect Logo section – https://cloud.google.com/vision/docs/detecting-logos – but in general terms this is what you need to do on Google’s side: Visit https://cloud.google.com/vision and login with your Gmail account Create or select a Google Cloud Platform (GCP) project Enable the Vision API for that project Enable the Billing for that project Create a API Key credential How do […]

Read More

MindGlow Is A Powerful Mindful Meditation App

According to the US CDC, the social and interpersonal restrictions which arose during the COVID-19 world pandemic was accompanied by a substantial uptick in stress and anxiety levels. People were apparently finding that the isolation brought about social distancing measures along with a corresponding impact on work and financial insecurity was unsettling and many seem to have found it difficult to deal with. One growth area for developers was in producing apps which helped mitigate those stress levels by encouraging techniques like mindfulness. MindGlow Mindfulness Android mobile app is powered by Delphi For anyone that wishes to resolve emotional issues, enter relaxed states, creative states, and highly functioning learning at the touch of a button, then MindGlow is for you. MindGlow makes use of “binaural beats” sound technology. Binaural beats is the use of specific different synchronized tones to each ear. This kind of use of acoustic waves is believed to be able to promote mindfulness, a calming effect and with that a reduction in stress. What does the MindGlow developer say about their mindfulness app? Written by Canadian developers ProjectOne Solutions based in Ontario, Quebec, the app uses Embarcadero’s RAD Studio Delphi and the cross-platform FireMonkey FMX framework to target Android mobile devices. ProjectOne says: “Some of the benefits of MindGlow are stress relief, relaxation, clarity, new ideas, new insights and emotional resilience. It even increases your HeartRateVariability for better physical health. Overall you’ll become more of your potential.“ They also say “MindGlow includes audio sequences for all the beneficial brain states – Alpha, Theta, Delta and Gamma. It also includes 9 levels of intensity – deepening your meditation for years to come“. ProjectOne also say that you need to be wearing headphones or ear-buds to use the app due to the way different audio needs to be delivered to each ear independtly. Website MindGlow Google Play MindGlow Screenshot Gallery

Read More

Extract, Transform, Load – The Magic Behind HeidiSQL

HeidiSQL is a wildly successful open source database management tool. Apart from being extremely useful in the management of MySQL, SQL Server, PostgreSQL and SQLite databases it is also open source – and that source code is written in Delphi. We’ve taken a brief overview of it before but that time we only scratched the surface of this wonderfully artful example of Delphi programming at its best. The code itself is packed with really great techniques. Let’s take a closer look at it. Things you will need to compile the HeidiSQL code You need RAD Studio Delphi 10.4 or higher.  I used Delphi 10.42. It’s easier if you have some form of Git source code control client installed.  I used my favorite GitHub Desktop client. The HeidiSQL source relies on two custom components – the source for them is included in the HeidiSQL source download. You should also download and install madExcept. Installing madExcept If you haven’t come across madExcept before you’re missing out! It’s a really great tool for intercepting and reporting on program exceptions which occur while your program is running. The website explains in more detail but I thoroughly recommend it. Go to http://www.madshi.net/madExceptDescription.htm Download and run the installer Make sure you check madExcept v5. The installer is a little bit confusing – click on version 5 and it will select it to be installed (the default is not to install version 4 or 5 which has confused me in the past!) When it’s properly installed there will be an extra menu item added to your RAD Studio tools menu Getting the HeidiSQL source code Head on over to the HeidiSQL site and click on the “download source” button. This will take you to the following link: https://github.com/HeidiSQL/HeidiSQL Installing the required third-party components HeidiSQL relies on two additional components. Note that both components are very popular so make sure you don’t already have them installed. If you don’t have them installed follow the instructions below. The required items are: SynEdit to provide a syntax-highlighted query editor area. VirtualTreeView to implement a number of very fast tree and listview style UI views. Installing SynEdit Navigate to the .HeidiSQLcomponentssyneditPackagesDelphi10.4SynEdit.groupproj project and load it. Right click and compile the SynEdit_R project and then right click and select “install” for the SynEdit_D design-time package. Installing VirtualTreeView Navigate to the .HeidiSQLcomponentsvirtualtreeviewpackagesDelphi10.4VirtualTrees.groupproj and load it. Right click and compile the VirtualTreesR runtime package.  Now right-click and select “install” for the VirtualTreesD design-time package. Compiling required resource (.res) files There’s a little bit of a gap in the steps I saw about compiling HeidiSQL from source code. There are a few .rc resource files for things like icons and fonts and there didn’t appear to be anywhere saying that they needed to be compiled. I may have missed them (I did try compiling the various group projects) in which case let me know in the comments and I’ll update this post with the correction – but until then do the following: Navigate to the .HeidiSQL root source folder. In there is a batch file called “build-res.bat” – run that file. It should complete without errors. Now navigate to the .HeidiSQLsourcevcl-styles-utils folder. In there is a file called “CompileResources.bat” Edit that file with a text editor and remove the paths at the start of the […]

Read More

#WEBINARS #WEBINARS #WEBINARS

Ever since we introduced our TMS WEB Academy platform (entirely built using our own TMS WEB Core product by the way) in February this year, it has been popular and much appreciated. Accelerated by the COVID19 pandemic, it is here to stay as a (free) way to learn about software development and directly communicate and interact with our experts during focused webinars.  So, today, we announce 3 new free webinars coming up in June! Introduction to TMS WEB Core for Visual Studio Code June 3, 15h00 UTC You want to use your favorite Object Pascal language. You want to develop web client applications. You want to use an IDE directly on Windows or macOS or a Linux machine. You want to use RAD component based development methodology. Then we have this webinar for you where we introduce TMS WEB Core for Visual Studio Code. No prior knowledge or experience required, we will take you through the steps to create your first web client applications with this hugely popular free IDE and TMS WEB Core. Miletus : Using web technology to create cross-platform desktop applications June 10, 15h00 UTC You have customers who prefer a web application? You have customers who prefer a desktop application? You want to take advantage of web technology to create stunning user interfaces? You want an easy way to use local databases? With Miletus coming with TMS WEB Core, you can do it all. In this webinar, we show you what Miletus is, what you can use it for, how you can use it. Learn in just one hour webinar how to build a database powered, cross-platform desktop app with a good looking web front-end running on Windows, macOS or Linux.    Sign up for the webinar here  What is FNC : Introduction to the growing family of FNC technology based components June 17, 15h00 UTC You heard about this yet another TLA (Three-Letter-Acronym) FNC but are unsure what it stands for and why and how you can benefit from it? In this webinar, we explain the basics of what FNC is, how it is created, what FNC components and products exist meanwhile. Whether you are a Delphi VCL classic Windows application developer, a Delphi FMX cross-platform developer, a developer wanting to create web applications or a developer preferring free IDEs like Lazarus or Visual Studio Code, FNC will empower you in any scenario. Learn all about this in this webinar and never forget anymore what the TLA FNC stands for. Sign up for the webinar here  More webinars? If you have ideas, let us know what you want to see covered in upcoming webinars! We are eager to learn where we can add value with content offered via a webinar. Or, if you created a great application or have an original or creative use case for any of our products and you feel like presenting this to your fellow Delphi developers, don’t hesitate to reach out and you could be next offering a webinar on our TMS Web Academy.Or meanwhile you can have a look at the previous webinars we offered and for which the recorded sessions are available.

Read More

Upscale Images With DeepAI’s Super Resolution API

DeepAI is very popular platform for artificial intelligence. They provide researches, guides, news and several AI APIs. You can learn more about their APIs from this link: https://deepai.org/apis The range and depth of the APIs offered by DeepAI is quite astounding. They include APIs which allow for image colorization, facial recognition, nudity detection, sentiment and emotion detection, text summarization, pose detection, text/caption generation, OCR, text to image, signature verification, toonify (to turn images into cartoon-like drawings), content moderation, anonymization and MANY more – the complete list is pretty staggering! Chances are DeepAI has something to satisfy your needs for addining and using artificial intelligence to your Windows, desktop and mobile apps. We’re going to focus on one API in particular – the Super Resolution API. What is Super Resolution API? In this article, we are going to implement the “Super Resolution API” using Delphi. This API uses machine learning to clean, sharp and upscale photos with out losing the original content. It can correct blurry images to some accepted level. This is not a simple mathematical algorithm to upscale image, but a machine learning which identify the content and make it better without losing original content. So it’s always better than an image processing application in your PC. How to get DeepAI API key? It’s easy to get the API key. You don’t need an Credit card. You will get $5 USD API credits free at registration which equivalent to 10,000 API requests. After that you can pay by $0.50 USD per 1000 requests. You can signup with google account or a regular signup. Then go to Dashboard and you can find the API key. You can use that key for any API. How to send a request to Super Resolution API from Delphi? There are two types of requests depending on, Send image as URL Send image as file Parameters are the same for both requests. api-key: API key as header parameter image: Image to process Code to send the API request using REST components are like this: RESTRequest.Params.Clear; RESTResponse.RootElement := ”; lparam := RESTRequest.Params.AddItem; lparam.name := ‘api-key’; lparam.Value := [YOUR API KEY]; lparam.ContentType := ctNone; lparam.Kind := pkHTTPHEADER; lparam.Options := [poDoNotEncode]; lparam := RESTRequest.Params.AddItem; lparam.name := ‘image’; lparam.Value := [PATH TO IMAGE]; lparam.ContentType := ctNone; lparam.Kind := pkFile; lparam.Options := [poDoNotEncode]; RESTRequest.Execute; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 RESTRequest.Params.Clear; RESTResponse.RootElement := ”; lparam := RESTRequest.Params.AddItem; lparam.name := ‘api-key’; lparam.Value := [YOUR API KEY]; lparam.ContentType := ctNone; lparam.Kind := pkHTTPHEADER; lparam.Options := [poDoNotEncode];   lparam := RESTRequest.Params.AddItem; lparam.name := ‘image’; lparam.Value := [PATH TO IMAGE]; lparam.ContentType := ctNone; lparam.Kind := pkFile; lparam.Options := [poDoNotEncode];   RESTRequest.Execute; You can send images in most of image file types, but the response always will be a JPG file. How to process the response from the Super Resolution API? If the request is success, you will get a response in JSON like this: { “id”: “XXXXXXXXXXXXXXXXXXXXXXXXXXXX”, “output_url”: “https://api.deepai.org/job-view-file/XXXXXXXXXXXXXXXXXXXXXXXXXXXX/outputs/output.jpg” } { “id”: “XXXXXXXXXXXXXXXXXXXXXXXXXXXX”, “output_url”: “https://api.deepai.org/job-view-file/XXXXXXXXXXXXXXXXXXXXXXXXXXXX/outputs/output.jpg” } ID is the unique id of your processed resource. “output_url” is the URL of your processed image. We can parse this JSON in Delphi like this and get the image as TPicture: jsonObj := RESTResponse.JSONValue as TJSONObject; MS := TMemoryStream.Create; http.Get(jsonObj.Values[‘output_url’].Value, MS); MS.Position := 0; Picture := […]

Read More