There is nothing new about sending a request to a REST API and fetching a response. In this blog we will show how can we make an asynchronous call to a API, which means your node.js code will be able to perform other operations while it requests sent to an API fetched the response. What … Continue reading Asynchronous call to a REST API using Node.js and using the Promises.
Month: March 2018
Data Structures in Java: Two Sum Problem
Given an array of integers, return indices of the two numbers such that they add up to a specific target. Each input should have exactly one solution and you may not use the same element twice. Example, arr_nums = [7, 4, 2, 11, 20], target = 6 Here, arr_nums[1] + arr_nums[2] = 6 So, return … Continue reading Data Structures in Java: Two Sum Problem
Node.js: Callbacks v/s Events
Callback In the callback model you make a request and provide a function to be called when the request is completed. Which means one request and one reply. Also in the callback approach you won't receive any result until you receive all the results. Like shown in the example below, until it iterates over all … Continue reading Node.js: Callbacks v/s Events
Microsoft Bot Framework: How to validate user response to bot Prompts?
Microsoft Bot Framework has multiple prompts to get user response while having the conversation such as Prompts.text, Prompts.number, Prompts.Choice, Prompts.confirm But there is automatic validation for number, choice and confirm prompt. For example if the user responds with wrong choice then the chat bot will re-prompt the choices and ask yo to select again. Check documentation here. This post … Continue reading Microsoft Bot Framework: How to validate user response to bot Prompts?