ProblemFind the non-repeating element in an array by using the two loops. One is for the current element and the other is to check, if an element is already present in an array or not.SolutionConsider an example given below −15, 15, 16, 15, 13, 15Here, the non-repeated elements in an array are 16 and 13.AlgorithmRefer an algorithm given below for finding the unique or the non-repeated elements in an array.Step 1 − Declare an array and input the array elements at run time.Step 2 − Start traversing the array and check, if the current element is already present in an ... Read More
Suppose we have four numbers a, b, c, and d. We shall have to find maximum among them by making our own function. So we shall create one max() function that takes two numbers as input and finds the maximum, then using them we shall find maximum of all four numbers.So, if the input is like a = 5, b = 8, c = 2, d = 3, then the output will be 8To solve this, we will follow these steps −define a function max(), this will take x and yreturn maximum of x and ytake four numbers a, b, ... Read More
Have you ever attempted to include an average line or grand total line in an Excel pivot chart? It appears difficult to show or add an average/grand total line like you would in a typical chart. Create Pivot table Let’s understand step by step with an example. Step 1 In the first, we must create a sample data for creating pivot table as shown in the below screenshot. Step 2 Now, select the data range from A1:B15. Click on the Insert tab on the toolbar ribbon and then select pivot table option to insert pivot table for the selected ... Read More
The datetime input type is used in HTML using the . Using this, allow the users to select date and time. A date time picker popup is visible whenever input field is clicked.Note − The input type datetime is not supported in Firefox and Internet Explorer. It works on Google Chrome.ExampleYou can try to run the following code to learn how to use datetime input type in HTML. HTML input datetime Details: Student Name Exam Date and Time
Let us suppose that we have created an Entry widget and we want to get the value of it. In this case, we can use the .get() method. It maps the input object into a variable which can be used further to print or display the entered value.ExampleIn this example, we will create an application that will display the input text thorough a label widget.#Import tkinter library from tkinter import * from tkinter import ttk #Create an instance of tkinter frame or window win= Tk() #Set the geometry of tkinter frame win.geometry("750x250") def get_value(): e_text=entry.get() Label(win, text=e_text, font= ... Read More
Once data is stored or filled it requires manipulation like insertion, deletion, updating, and modification of data. For these operations a set of languages are provided by the database management system (DBMS). So, the database languages are used to read, update and store data in the database.The different types of DBMS languages are as follows −Data Definition Language (DDL) − Create, Drop, Truncate, Rename.Data Manipulation language (DML) − Select, Insert, Delete, Update.Data Control Language (DCL) − Revoke, Grant.Transaction Control Language (TCL) − Rollback, Commit.The DBMS languages are pictorially represented as follows −Data Definition Language (DDL)It is a language that allows ... Read More
In this article, we are going to see how to handle the strings with RegEx handling in a React application.A RegEx or Regular Expression is a sequence of characters that forms a search pattern and is used to check if a string contains a specified search pattern or not. It is also used to validate strings which consist of email, passwords etc.Syntaxnew RegExp(pattern[, flags])ExampleIn this example, we will build an authentication React application that takes an email and password from the user and checks if they are validated or not.We have Regex.js which contains all the regular expressions to validate ... Read More
On the internet, we will find very few websites that don’t contain the form. Most websites contain the contact form, some contain the job application form, and some contain the product order form. The form allows us to take input from users and manipulate it at the front end or backend side of the application. Also, to provide a good user experience to the application user, we need to reset all the form data once the user submits the form. In this tutorial, we will learn various approaches to clear the form's input fields once the user presses the submit ... Read More
An instruction is a set of codes that the computer processor can understand. The code is usually in 1s and 0s, or machine language. It contains instructions or tasks that control the movement of bits and bytes within the processor.Example of some instruction sets −ADD − Add two numbers together.JUMP − Jump to designated RAM address.LOAD − Load information from RAM to the CPU.Types of Instruction SetGenerally, there are two types of instruction set used in computers.Reduced Instruction set Computer (RISC)A number of computer designers recommended that computers use fewer instructions with simple constructs so that they can be executed ... Read More
A Postman PUT request is used to pass data to the server for the creation or modification of a resource. The difference between POST and PUT is that POST request is not idempotent. This means invoking the same PUT request numerous times will always yield the same output. But invoking the same POST request numerous times will create a similar resource more than one time. Before creating a PUT request, we shall first send a GET request to the server on an endpoint:http://dummy.restapiexample.com/api/v1/employees. On applying the GET method, the Response body obtained is − Now, let us update the ... Read More