Posts

Showing posts from April, 2021

Find Google Sheets Linked to your Google Forms

When a user submits your Google Form, the response can be either saved in the Google Form itself or it can be written as a new row in a Google Spreadsheet. Multiple Google Forms can be associated with a single spreadsheet and their responses will be… source:https://ift.tt/3xwC10r

How to Print the Function Call Flow with Stack Trace in JavaScript

The printStackTrace method of Java is useful for handling exceptions and errors during development. It tells you the exact line number in your source code and the file name where the problem occurred. If you are working in the JavaScript / Google Apps Script world, you can use the console.trace() method to output the complete stack inside the web console ( or StackDriver logs for Google Scripts). A better alternative is that you parse the stack property of the Error object. This contains the entire stack trace along with line numbers, column position and the function names. function printStackTrace ( ) { const error = new Error ( ) ; const stack = error . stack . split ( "\n" ) . slice ( 2 ) . map ( ( line ) => line . replace ( / \s+at\s+ / , "" ) ) . join ( "\n" ) ; console . log ( stack ) ; } function three ( ) { console . log ( "Function Three!" ) ; printStackTrace ( ) ; } function...

How to Perform IP Address Lookup with Google Sheets

Image
Websites can determine the visitor’s geographic location using their IP address and serve more relevant content. For example, a weather website may use your IP address to estimate your approximate location and provide weather forecast for your current city automatically. A currency exchange website can determine your default currency based on your country which is detected from your IP address. There are free web IP lookup services, ip2c.org for example, that will reveal the country of your client’s IP address with a simple HTTP request. We internally use that service at Digital Inspiration to determine the payment service provider on the checkout page. Bulk IP Lookup with Google Sheets IP2Location is another good alternative that retrieves more detailed geolocation information for any IP address. The IP location lookup service can retrieve the client’s country, city name, region, the ISP name and more. If you have a bulk list of IP addresses, you can use Google Sheets to es...