Noutați

How To Add IP Address Intelligence Services To Your Apps

Have you ever wanted your apps to have the power to examine an IP address and then find out everything you possibly could about it such as what time zone is local to the IP, what currency they use or what internet service provider is used? This capability is called IP address intelligence and it can add a powerfully rich package of knowledge to your applications allowing you to customize how you present information to your users. In this post you will be learn how to quickly and easily integrate IP address Intelligence into your Delphi desktop and mobile applications. We are going to use a service called IPApi, which is one of the market-leading solutions for all your IP Intelligence requirements in one place. Why would we want to find out information about an IP Address? The IP address is often tied to an individual user. If you know information about that IP address you can customize some of the information, services or even the user interface to better meet the needs of your users. For example, if you find out that the current time for the IP address is night time then you might want to offer different services to those you offer during their daytime hours. Knowing the local currency in use where the IP address is hosted allows you can offer that as a default for purchases. Lastly, you may want or need to restrict some of app’s features if an IP address is located in a different country, possibly for security reasons or to comply with local laws or copyright compliance. With proper IP address intelligence information all of this should be possible. What is the IPApi service? The IPApi service is a powerful IP lookup RESTful web service that helps to find a different set of information using only the IP address. You can do more fascinating things with IP addresses. For instance: Content Personalization based on location Time Zone Lookup Language Redirection based on geolocation Currency and Fraud detection and more The IPApi platform is platform agnostic and offers accurate information. IPApi say their RESTful web service is “trusted by 30,000+ businesses worldwide”. How do I start getting information about an IP address in my application? Head over to the IPApi official website to sign up. There is a Free plan to test it out. IPApi Example Plan Details How do I use IPApi to get information about an IP address? After you sign up, you will have an API access key. And you can utilize that API access key to send requests to the endpoint.  Here is an example of calling to the endpoint: And depending on your subscription plan, you get different sets of data in your response: { “ip”: “161.185.160.93”, “type”: “ipv4”, “continent_code”: “NA”, “continent_name”: “North America”, “country_code”: “US”, “country_name”: “United States”, “region_code”: “NY”, “region_name”: “New York”, “city”: “Brooklyn”, “zip”: “11238”, “latitude”: 40.676, “longitude”: -73.9629, “location”: { “geoname_id”: 5110302, “capital”: “Washington D.C.”, “languages”: [ { “code”: “en”, “name”: “English”, “native”: “English” } ], “country_flag”: “http://assets.ipapi.com/flags/us.svg”, “country_flag_emoji”: “🇺🇸”, “country_flag_emoji_unicode”: “U+1F1FA U+1F1F8”, “calling_code”: “1”, “is_eu”: false }, “time_zone”: { “id”: “America/New_York”, “current_time”: “2018-09-24T05:07:10-04:00”, “gmt_offset”: -14400, “code”: “EDT”, “is_daylight_saving”: true }, “currency”: { “code”: “USD”, “name”: “US Dollar”, “plural”: “US dollars”, “symbol”: “$”, “symbol_native”: “$” }, “connection”: { “asn”: 22252, “isp”: “The City of New York” […]

Read More

How to use Azure Cognitive Services?

It’s been around 6 years since I last wrote about the Azure Translator Services. Since 2015, the API has been updated from XML to JSON and re-organised under the Cognitive Services branding. Additionally, functionality has been broken down into different resources to help control access and provide increased flexibility around service delivery and billing. This week, I’ve updated the original blog content and shared new classes that work with the latest API’s. The security configuration has been updated to reflect the latest regions and the code released onto Github Download the code The readme.md provides details about the prerequisites for using the Azure Services, including the steps to follow to find the access keys when you set up your subscriptions and resources on the Azure portal. You can see the updated blog entry covering the services in more detail at https://delphiaball.co.uk/2021/07/30/how-to-use-azure-cloud-cognitive-services/ Azure Cloud – Translator Services Azure Cloud – Text to Voice Azure Cloud – Voice to Text

Read More

This Is How To Make A Geocoding App in 5 Minutes

In our super-connected world, looking up physical addresses and getting accurate geographic locations is becoming an almost must-have skill for our apps. Would you like to enhance your application with accurate forward and reverse batch geocoding? Wouldn’t it be nice to have a free, lightweight and easy-to-use geocoding REST API to geocode any global address or set of coordinates in real-time? Well you’re in luck, we’re going to show you how to do that and, furthermore, we’re going to do it with a really tiny amount of code. What exactly do we mean by “geocoding”? Before we dive into how we’re going to do things, we should perhaps spend a minute or two going over some of the technical terms we’re going to cover. Forward geocoding is the process of looking up a plain-text address or place name (e.g. Eiffel Tower), whereas reverse geocoding is performed by passing latitude and longitude values of a desired location to the API. If successful, both types of geocoding return an extensive array of location-related data as well as multiple potential results along with confidence scores. In this article we will see how fast and easy it is to use RAD Studio and Delphi to create a FireMonkey multidevice application using the LowCode Wizard in addition to a REST client library to take advantage of PositionStack API and retrieve a JSON format response for worldwide news, headlines and blog articles in real-time. What is the PositionStack API? PositionStack API offers instant access to live geocoding for global places and coordinates around the world. This is possible to be done for free (up to first 25,000 calls/month; no credit card required) and much more is available at very affordable prices and scalable to the use you make with no upfront commitments. The PositionStack API covers 2+ billion addresses sourced from multiple, highly reliable sources, such as Nominatim, GeoNames, Pelias and OpenStreetMap. Updates to our dataset are made multiple times per day and smart filters and algorithms ensure the highest possible level of consistency across API requests and accuracy in geo data responses. Our RAD Studio and Delphi applications will be able to call the API and request information based on the name of parameters you provide. How do I set up the PositionStack API? Make sure you refer to PositionStack API website (https://PositionStack.com/) and and SignUp for the free Plan providing only your email and some basic information (no credit card required). Once you are in the website will redirect you to a Quickstart guide dashboard and your API Access Key will be provided. The Access Key unique, personal and is required to authenticate with the API. Keep it safe! How do I call PositionStack API endpoints? Now all we need to do is to call the API base URL (http://api.positionStack.com/) via a HTTP POST method with no JSON request body needed and some few requested parameters added to the URL address depending on the ednpoint we choose to call. One can do that using REST Client libraries available on several programming languages. PositionStack offers two API endpoints to choose from Forward Geocoding: Geocoding by free-text place name or address. Reverse Geocoding: Geocoding by coordinates or IP address. Our demo will focus on the Forward Geocoding Endpoint but all the others follow similar logic but […]

Read More

Day 4 – Learn to Code Summer Camp 2021 – All About Python

In keeping with our  theme, today we are focusing on Python, PyScripter, and the Python4Delphi bridge. The 11 AM CDT session covers Python and PyScripter basics The 1 PM CDT Session covers Python 4 Delphi and Delphi 4 Python Be sure to register if you haven’t already. For more articles about Python and Python GUII development visit PythonGUI.org

Read More

Code completion on steroids for Object Pascal

At the end of June, Microsoft revealed its GitHub Copilot project. The Microsoft GitHub Copilot project is a sort of AI driven code completion on steroids. It’s both amazing and controversial at the same time and for sure generates a lot of debate among software developers.  Regardless of the opinions, it is for sure an interesting enough technology for us to investigate and José Leon Serna, our chief architect of the TMS WEB Core for Visual Studio Code project, investigated if the Microsoft GitHub Copilot could have any meaning for us, Object Pascal developers.  And surprisingly, it is already feasible to use the Copilot AI for Object Pascal developers from TMS WEB Core for Visual Studio Code as you can see and enjoy in this video from José:  as well as this video, exploring next steps in AI assisted code completion: If you signup for getting Copilot access, you could already experiment yourself with this new technology from TMS WEB Core for Visual Studio Code. We are for sure living in interesting times with possible changes having an impact on our lives all the time on the horizon! We’re curious to hear what is your take on AI starting to play a role in the software development process?

Read More

TMS FNC Core update: Printing and Design-time Editors

Included in the version 2.6 release of the TMS FNC Core package is a print library that is capable of creating files and send them to the printer. And two design-time editors to make it easier to customize the TTMSFNCGraphicsFill and TTMSFNCGraphicsStroke in your FNC products. The print library supports creating documents, adding pages and page content such as HTML formatted text, plain text, drawing primitives and images, with practically the same code on all different frameworks. This has been implemented on three different levels. The lowest level of implementation for the print library is the use of TMSFNCPrinter, this is done in a similar way as TPrinter is used on VCL, Lazarus, FMX Windows and MacOS. With TMSFNCPrinter there is now support for FMX Android and iOS and for TMS WEB Core. The difference with TPrinter is that the drawing should be defined in the OnDrawContent procedure.  uses …, FMX.TMSFNCPrinters, FMX.TMSFNCGraphicsTypes; procedure Click(Sender:TObject); begin TMSFNCPrinter.OnDrawContent := procedure begin TMSFNCPrinter.Graphics.Font.Color := gcBlue; TMSFNCPrinter.Graphics.Font.Size := 40; TMSFNCPrinter.Graphics.DrawText(0, 20, TMSFNCPrinter.PageWidth, 100, ‘Hello’, False, gtaCenter, gtaCenter); TMSFNCPrinter.Graphics.Fill.Color := gcRed; TMSFNCPrinter.Graphics.DrawEllipse(100,200, TMSFNCPrinter.PageWidth – 100, 300); TMSFNCPrinter.Graphics.DrawBitmap(50,400,TMSFNCPrinter.PageWidth – 50, TMSFNCPrinter.PageHeight – 50, Image1.Bitmap, True, True); TMSFNCPrinter.EndDoc; end; TMSFNCPrinter.BeginDoc; end; On top of the TMSFNCPrinter, there is the TMSFNCGraphicsPrintIO component, which gives the ability to further define the layout of the document with a header, footer and page number and to add certain FNC components. The TTMSFNCRichEditorPrintIO and TTMSFNCGridPrintIO are added In the TMS FNC UI Pack. These components have some additional properties to make the export of the TTMSFNCRichEditor or TTMSFNCGrid even more customizable. Working with FNC controls should be fast and simple. And for that reason we’re adding two new design-time editors in TMS FNC Core. These help with setting the properties for the TTMSFNCGraphicsFill and TTMSFNCGraphicsStroke.

Read More

How To Make An Immensely Powerful Search Engine Results App

A search engine results page, or SERP, is the page you see after entering a query into Google, Yahoo, or any other search engine. In addition to organic search results, search engine results pages usually include paid search and pay-per-click (PPC) ads plus additional generated information not directly related to the search. Wouldn’t it be nice to have a free, lightweight, easy-to-use SERP API built into your own app to give your users the ability to harness the immense power of the search engines? How to add superb power to your apps with the absolute minimum of coding effort Low code is where RAD Studio Delphi really shines compared to nearly all other programming languages. In many ways it was one of the very first ground-breaking systems to embrace low code as a philosophy right from the very first day it was released. In this article we will see how fast and easy it is to use RAD Studio and Delphi to create a Firemonkey multidevice application using the LowCode Wizard in addition to a REST client library to take advantage of SerpStack API and retrieve a JSON format response for Google SERP in real-time. Using SerpStack API with RAD Studio’s low code capabilities is a smart way to produce applications in the modern world SerpStack API offers instant access to live geocoding for global places and coordinates around the world. This is possible to be done for free (up to first 100 calls/month; no credit card required) and much more is available at very affordable prices and scalable to the use you make with no upfront commitments. Our RAD Studio and Delphi applications will be able to call the API and request information based on the name of parameters you provide How do I set up the SerpStack API? Make sure you refer to SerpStack API website (https://SerpStack.com/) and and SignUp for the free Plan providing only your email and some basic information (no credit card required). Once you are in the website will redirect you to a Quickstart guide dashboard and your API Access Key will be provided. The Access Key unique, personal and is required to authenticate with the API. Keep it safe! How do I call SerpStack API endpoints? Now all we need to do is to call the API base URL (http://api.serpStack.com/) via a HTTP POST method with no JSON request body needed and some few requested parameters added to the URL address depending on the endpoint we choose to call. One can do that using REST Client libraries available on several programming languages. SerpStack offers two API endpoints to choose from Search: Get SERP data for your search query Locations: Search locations supported by the API Our demo will focus on the Search Endpoint but all the others follow similar logic but with different parameters passed. For a complete and detailed list of endpoints and its parameters make sure you refer to SerpStack Quickstart guide (https://serpStack.com/quickstart) // Search API Endpoint http://api.serpstack.com/search ? access_key = YOUR_ACCESS_KEY & query = mcdonalds // optional parameters: & engine = google & type = web & device = desktop & location = new york & google_domain = google.com & gl = us & hl = en & page = 1 & num = 10 & output = json // […]

Read More

Quickly Build And Test Javascript Apps In The Browser With This IDE

Web-based IDEs reside entirely on a remote server and are accessible through the browsers. Unlike the typical IDEs on your PC, you don’t have to go through any installation process. Also, they enable you to collaborate with other developers conveniently. You can share code examples with your colleagues easily. They can play with your code and make necessary adjustments. You can enjoy all of these benefits using Sencha Fiddle. It is a web-based IDE for running and sharing your Ext JS code examples. In this post, you will find a step-by-step guide for using the editor. What is Sencha Fiddle? Sencha Fiddle is an online IDE for creating, running, and sharing code examples using the Ext JS framework easily. It mimics the local development environment in the cloud. You can use it to test and prototype applications conveniently. Why should you use Sencha Fiddle? Easy to use Run, edit and share Ext JS codes online Super-fast performance What can you do with the Sencha Fiddle? Fork and Share Fiddles Sencha Fiddle enables you to change all the aspects of the fiddle, including the code and folder structure. It gives you flexibility. You can save your code to the Fiddle Server and share your work with your colleagues and community. The process of sharing the fiddle is very simple. Simply click on the share button. A new window will open up. It will contain a few lines of code, which you can use to display your work through an IFrame. Protect Fiddles with Passwords You can protect the fiddle with a password to prevent unauthorized access. No one can play with your codes without your permission. The process of securing the fiddle with a password is very simple. Here are the steps: Hit the Admin button. Then Details. A new window will open up. Scroll down to find and expand Advanced Options. Insert your preferred password. Finally, hit the Set button. That’s it! Now, no one can edit your fiddle without entering the specified password. Lock Fiddles for Confirmation Prompt Another thing you can do is locking fiddles to prevent others from editing them unless a confirmation prompt is acknowledged. It is a great way to control access to your codes effectively. To lock the fiddle, simply check the box of the Locked field. Assign Fiddles to Team You can assign the fiddles to different teams. Each of the users will have custom-defined edit privileges. So, you can enjoy granular control over the fiddles and the persons who are interacting with them. To assign a fiddle to a team, simply follow these steps: Navigate to Admin > Teams. A new window will open up. Click Add To Team button. Select the team from the dropdown. Then hit Choose Team button. That’s how you assign a fiddle to a specific team. Add Fiddles to Groups In Sencha Fiddle, Groups are “albums” of fiddles. They provide additional user-defined organization for your fiddles. Besides, Sencha Fiddle offers support for Dynamic groups. They automatically curate the fiddles based on pre-defined search criteria. To add a fiddle to a group, simply follow these steps: Head to Admin > Groups. A new window will appear. Click Add To Group button. Choose your preferred group from the dropdown. Then click the Choose Group button. That’s it! Now, you […]

Read More

How To Validate And Lookup Global Phone Numbers In Your Apps

NumVerify is a full-fledged and powerful RESTful web service that allows global number validation and lookup service in more than 230 countries around the globe. It offers a simple RESTful JSON API endpoint that you can send and receive correct information about a phone number. NumVerify API sends handy JSON formatted data about the carrier, geographical location, line type, and more in seconds. NumVerify API is easy to integrate. NumVerify API is platform agnostic and offers a simple connection in any platform. Moreover, with the power of Delphi, you can send and receive phone number validation information without coding because of low-code app development features. How to integrate NumVerify API into Delphi FireMonkey application? In this post, we will create a fully functional cross-platform application using FireMonkey App Low Code Wizard. the FireMonkey Low Code Wizard fully integrates with NumVerify API. What exactly is the NumVerify API? NumVerify API is a product built and maintained by apilayer and helping millions of developers to automate complex processes using solid RESTful web services.  Number Validation – Keep your user database clean and fight fraud by validating. Swift & Secure API – Easy to integrate URL structure Advanced Tools – Configure lookup options with a set of parameters Cost-effective API How do I set up the NumVerify API? Just head over to the NumVerify API website (https://numverify.com/) and sign up for the free subscription by providing basic information. After signing up, you can open Dashboard, and there will be your API Access Key with documentation. How to send a request to the NumVerify API endpoint? Well, now you can send requests to the endpoint using your API access key. Just need to give the required parameters to the URL.  Here is a sample API request with a sample JSON response. After the request is successfully sent, you receive a clear JSON response. Each API response consists of 10 different response objects. You learn more about the response structure here (https://numverify.com/documentation) How do I connect my applications to the NumVerify API? In this demonstration, I utilize Delphi and FireMonkey to create a client app. REST Client components can work with any RESTful web service easily.  The lightning-fast way of connecting to APIs is the RAD Studio Delphi REST Debugger REST Debugger is a specialized tool for Delphi and C++ Builder developers. You can play with any kind of REST-based web service. Besides, after connecting and receiving the JSON response, you can quickly copy and paste components from the REST Debugger to your Delphi or C++ Builder project. And you are good to go! How to build an app which runs on Windows, macOS, Android, and iOS and works with the NumVerify API I pointed out to the FireMonkey App Low Code Wizard. Low Code Wizard helps us to initialize a fully functional cross-platform FireMonkey application. The wizard gives you different options and database functionalities. And then, you select the required features which, then generate a complete app. How do I start using Low-Code development in RAD Studio? Run your copy of RAD Studio. Open the GetIt Package Manager from the Tools menu. There you can search for a “low code” keyword. Now install the FireMonkey App Low Code Wizard. Now you can utilize Low Code App Wizard and generate a fully functional app within seconds. For this, you should go on the menu: File->New->Other and select Multi-Device […]

Read More

New hands-on book for Delphi Devs

We’re very happy, proud and relieved that we can inform that the newest book in the series “Hands on with Delphi” is available for purchase now via Amazon. It’s the newest seminal work from our colleague and evangelist Dr. Holger Flick for Delphi developers. It has been over 9 months in the works and it is the biggest book so far in the “Hands on” series, counting 467 pages!  The past months have been extremely hard and focused work for Holger assisted by our developer team to help Holger understand and uncover every little detail in the many controls, components, libraries that are handled in the book. Book theme The central theme in the book is data access & visualization, something all Delphi developers deal with on a daily basis when creating applications. There is a large section on grids as this is a commonly used control for visualizing & manipulating data. There is of course also a lot of attention on multi-tier and REST based access to databases as this is typically where the data comes from in the first place. And there are some lesser-known and newer areas in connection to creating data visualization apps like using vector graphics (SVG) in Delphi apps or use brand new Miletus web technology for creating desktop data visualization apps! In a nutshell, there is enough content to learn many new techniques to create better Delphi applications during this summer period.     First test hard-copy edition of the book                                      Official book cover How to order The book is internationally available in all international Amazon stores: Book recognition Last week, we also got the heartwarming news that the first book about TMS WEB Core from Dr. Holger Flick was recognized in the list of “Best web application books of all time“. It is not only nice that the book from Holger appeared in the list but it is even more remarkable that a web application book for Delphi developers is in this list as most books are on JavaScript, TypeScript, Java, PHP, ASP.NET, etc….  In fact, it is the only book that relates to Delphi in the list. Quite a noteworthy feat from Holger we think! Fwiw, this book is of course also still for sale internationally via Amazon: Amazon USA Amazon UK Amazon Germany

Read More