Noutați

What’s new in TMS FNC Maps v2.0

Introducing the TTMSFNCRouteCalculator component, OpenLayers polyline labels and Google Maps geodesic polylines with the release of TMS FNC Maps v2.0. Route calculator with map interaction The new TTMSFNCRouteCalculator component lets you create and edit routes based on existing directions and geocoding services. Routes can also be imported from GPX and exported to GPX. The TTMSFNCRouteCalculator allows you to create a new route, add, update and remove waypoints or segments. This standalone component can be used to manage routes programmatically, then save or export your routes for later use. The following directions & geocoding services are supported: Azure, Bing, Google, Here, MapBox In combination with TTMSFNCMaps routes can be created, edited and displayed by interacting with the map.Simply assigning a TTMSFNCRouteCalculator to the TTMSFNCMaps component will enable the map interaction as well as extra methods and events. TMSFNCRouteCalculator1.Active := True; TMSFNCMaps1.RouteCalculator := TMSFNCRouteCalculator1; The following mapping services are supported: Google Maps, Here, OpenLayers    The steps below require no additional code at all, this is done by interacting with the map only. Now the first step is to pick a start location with a single click on the map. The second click will set the first waypoint for your route Then every subsequent click will add a new waypoint Drag and drop an existing segment to insert a new waypoint Drag and drop an existing waypoint to a new location Waypoints and segments can also be selected and optionally removed from the route OpenLayers polyline & polygon labels It’s now possible to associate a label text with a polyline or polygon in TTMSFNCOpenLayers. This feature is currently only available for: OpenLayers This sample demonstrates how to add a label text to an existing polyline, configure the label’s appearance and position, then make sure the polyline is updated on the map. TMSFNCOpenLayers1.BeginUpdate; TMSFNCOpenLayers1.Polylines[0].&Label.Text := ‘Route from New York to Washington’; TMSFNCOpenLayers1.Polylines[0].&Label.FontColor := gcRed; TMSFNCOpenLayers1.Polylines[0].&Label.FontSize := 18; TMSFNCOpenLayers1.Polylines[0].&Label.OffsetX := 170; TMSFNCOpenLayers1.Polylines[0].Recreate := True; TMSFNCOpenLayers1.EndUpdate; Google Maps geodesic polylines Another new features is the possibility to display geodesic polylines with Google Maps. This feature is currently only available for : Google Maps Just set the polyline’s Geodesic property to True to make it display as a geodesic line. TMSFNCGoogleMaps1.Polylines[0].Geodesic := True; That’s it for this TMS FNC Maps v2.0 update. I hope you’ll enjoy all these exciting new features!

Read More

Rapidly Build Testing Automation To Supercharge Javascript App Quality

The need to find and fix quality issues early in the development cycle has always been baked into the core philosophy of every serious development team, even in the face of intense delivery pressure. The evolution of web technology introduced a new urgency for software quality. Sencha Test is the most comprehensive unit and end-to-end testing solution for Ext JS, including support for end-to-end testing of ExtAngular, Angular, ExtReact and React apps. Deliver higher quality apps and reduce testing time & cost with powerful automation through Sencha Test. What are the benefits of a testing framework? Reduces barriers to testing by providing a professionally designed, documented and supported testing framework for Ext JS and ExtReact apps Shortens testing startup time by delivering pre-authored tests for complex Ext JS and ExtReact example apps Automates testing by allowing scheduled, unattended test runs that leverage CI Empowers users to develop a large number of tests with an easy-to-use JavaScript built-in editor Improves code quality, accelerates time to market, and ensures a consistent end-user experience In this article we will learn more about Sencha Test and how you can use it to increase the quality if your software output. With Sencha Test, you can create end-to-end tests quickly, and execute them on multiple browsers simultaneously. Cross-browser testing is critical to ensuring quality for organizations, and test automation is a requirement to meet delivery timelines. Sencha Test helps you build an end-to-end testing plan without having to cobble together testing tools. Is there an IDE I can use to write Javascript tests? Sencha Test Studio is the graphical user interface that allows you to write Jasmine tests in a built-in Sencha Test editor. You can write tests using JavaScript and store them in your team’s preferred source control system. Test Studio allows you to create tests directly in Sencha Test, or code in a separate IDE, and execute the test immediately. The iterative unit testing process helps you create more robust code by constantly testing it along the way. What tools can I use to automate Javascript tests? Using Test Runner, you can run selected unit and functional tests on any or all of the browsers on a local machine, a connected mobile device, or on a browser farm. The local Test Runner can be used for test creation and debugging. An external browser farm or a Selenium grid is used by the Sencha Test Command Line Interface (CLI) to run the same tests on a Continuous Integration (CI) system – allowing you to schedule automated test runs nightly or at a convenient time, with minimal configuration. Sencha Test Command Line Interface (CLI) helps you achieve the full power of automated test runs. Once tests are authored and checked into the source control repository, you can launch them from your Continuous Integration (CI) system. The CI system can invoke the CLI automatically, once it senses a change to the application code or the test files in the source control repository. How can I access historical Javascript test results easily? The Test Archiver enables you to track historical testing trends in your projects as well as compare results between runs. Automated visual analysis allows you to identify runs where screens do not render correctly or visual glitches are present. The archiver leverages the full power of […]

Read More

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