We can add a Google Translate button on our webpage by using the Google Translate API. We need to create a script that calls the API and adds the button to our webpage. Once added, users will be able to translate our webpage to their preferred language. Here's an example of how to add a Google Translate button to your webpage using the Google Translate API − Go to the Google Cloud Console (https://console.cloud.google.com/) − To create a new project, click Select Project and the following section will be visible − Once the ... Read More
Marketing has evolved significantly in recent years, and what worked even just a few years ago may be completely irrelevant today. If you want to continue to realize success, remain competitive, and deliver more value, you must be willing to adapt to change as it occurs. To have a successful marketing plan, you need strategic thinking, alignment between departments, willingness to test new approaches and close monitoring of key performance indicators (KPIs) which will tell you how to be more proficient and achieve better outcomes. That being said, here are 8 ways to make an impactful digital marketing strategy. ... Read More
In this tutorial, we will see to write a go language program to find distinct elements in two arrays. In this article we will write two programs. In the first program we will use the array of strings while in the second one we will use the array of integers. Algorithm STEP 1 − import the fmt package. STEP 2 − Define three functions named intersection(), uniquearr1 and uniquearr2. STEP 3 − The intersection() finds the common array elements from the two arrays while the other two functions remove that common elements from given arrays. STEP 4 − All these ... Read More
In this article we will write a go language program to find the index of the first occurrence of the specified item in an array. we will use for loops and inbuilt go library functions to achieve the result. Method 1: Using SearchInts() Library Function Syntax func Sort(data Interface) The sort() function is present in sort package. this function is used to sort an array in ascending order. The array to be sorted is passed as an argument to the function. The time complexity of this function is O(n * logn). type IntSlice []int The IntSlice() function is ... Read More
In this tutorial, we will write a go language program to insert multiple elements into an array at the specified index. There are many methods to add elements into an array. it can be done by either using indexing or by using for loops. There are some inbuilt functions too using which we can add elements at specified index. Syntax func make ([] type, size, capacity) The make function in go language is used to create an array/map it accepts the type of variable to be created, its size and capacity as arguments. func append(slice, element_1, element_2…, element_N) []T ... Read More
In this tutorial, we will write a go language program to insert an element into an array at the specified index. There are many methods to add elements to an array. it can be done by either using indexing or by using for loops. There are some inbuilt functions too using which we can add elements at the specified indexes. Syntax func make ([] type, size, capacity) The make function in go language is used to create an array/map it accepts the type of variable to be created, its size and capacity as arguments func append(slice, element_1, element_2…, element_N) ... Read More
In this tutorial, we will see to write a go language program to find uncommon elements in two arrays. In this article we will write two programs. In the first program we will use the array of strings while in the second one we will use the array of integers. Algorithm STEP 1 − import the fmt package. STEP 2 − Define three functions named intersection(), uniquearr1 and uniquearr2. STEP 3 − The intersection() finds the common array elements from the two arrays while the other two functions remove that common elements from given arrays. STEP 4 − All these ... Read More
In this tutorial, we will write a go language program to reverse the elements of the array using inbuilt functions. in this program we will see how we can reverse an array of strings and integers using internal go functions. Method 1: Using Append() and Make() Function Syntax func make ([] type, size, capacity) The make function in go language is used to create an array/map it accepts the type of variable to be created, its size and capacity as arguments func append(slice, element_1, element_2…, element_N) []T The append function is used to add values to an array ... Read More
In this article you will learn the go language code to convert binary number to octal number. Binary numbers are the numbers that have base 2, i.e., each digit can have only 2 possibilities 0 and 1. Octal numbers are the numbers that have base 8, i.e., each digit can have only 8 possibilities from 0 to 7. Algorithm STEP 1 − Import the fmt package. STEP 2 − Start the main function and initialize the required variables of type int naming binary, octal, remainder and j. store initial values to them. STEP 3 − Store the binary number chosen ... Read More
In this tutorial, we will see to write a go language program to find common elements in two arrays. In this article we will write two programs. in the first program we will use the array of strings while in the second one we will use the array of integers. Method 1: Using Append() Function The following code illustrates how we can find the common elements in two different arrays of strings using an external function in go programming language. The function which we will create takes the two arrays as an argument to it and returns the final array ... Read More
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP