title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Upload files in Python
07 Oct, 2021 In this article, we will be looking into the process of file uploading in Python using cgi environment. One often comes across various web applications in which the client or the users is required to upload data in the form of a file(eg. image file, an audio file, text file, etc). There are two aspects to ...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Oct, 2021" }, { "code": null, "e": 1004, "s": 52, "text": "In this article, we will be looking into the process of file uploading in Python using cgi environment. One often comes across various web applications in which the client o...
How to create a To-Do list using Drag and Drop in Angular 7 ?
14 May, 2020 We can easily create a To-Do list using Drag-Drop module provided by angular Component Development Kit (CDK). First of all, create an angular component by using the following command- ng g c To-Do Now import CdkDragDrop, moveItemInArray, transferArrayItem from @angular/cdk/drag-drop to our to-Do componen...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 May, 2020" }, { "code": null, "e": 164, "s": 54, "text": "We can easily create a To-Do list using Drag-Drop module provided by angular Component Development Kit (CDK)." }, { "code": null, "e": 238, "s": 164, "tex...
Construct a Turing machine for L = {aibjck | i < j < k or i > j > k}
26 Aug, 2021 Prerequisite – Turing MachineThe language L = {aibjck | i < j < k or i > j > k} is same as the union of two languages L1={aibjck | i < j < k } and L2={aibjck | i > j > k }In this language, every string of ‘a’, ‘b’ and ‘c’ have certain number of a’s, then certain number of b’s and then certain number of c’s...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Aug, 2021" }, { "code": null, "e": 337, "s": 28, "text": "Prerequisite – Turing MachineThe language L = {aibjck | i < j < k or i > j > k} is same as the union of two languages L1={aibjck | i < j < k } and L2={aibjck | i > j > k }In t...
Kaprekar Constant
22 Jun, 2022 6174 is the Kaprekar Constant. This number is special as we always get this number when following steps are followed for any four digit number such that all digits of number are not same, i.e., all four digit numbers excluding (0000, 1111, ...) Sort four digits in ascending order and store result in a num...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Jun, 2022" }, { "code": null, "e": 300, "s": 54, "text": "6174 is the Kaprekar Constant. This number is special as we always get this number when following steps are followed for any four digit number such that all digits of number ...
Python – Subset DataFrame by Column Name
16 Mar, 2021 Using Pandas library, we can perform multiple operations on a DataFrame. We can even create and access the subset of a DataFrame in multiple formats. The task here is to create a subset DataFrame by column name. We can choose different methods to perform this task. Here are possible methods mentioned below...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Mar, 2021" }, { "code": null, "e": 338, "s": 28, "text": "Using Pandas library, we can perform multiple operations on a DataFrame. We can even create and access the subset of a DataFrame in multiple formats. The task here is to creat...
Count of Triplets
22 Jun, 2021 Given N points in a plane in the form of 2D array such that every row consist of two integer L and R where L belongs to x-ordinate and R belongs to y-ordinate. The task is to count the triplets of points(say a, b & c) such that distance between a & b is equals to the distance between a & c. Note: The order...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2021" }, { "code": null, "e": 381, "s": 52, "text": "Given N points in a plane in the form of 2D array such that every row consist of two integer L and R where L belongs to x-ordinate and R belongs to y-ordinate. The task is to...
Juspay Interview Experience for Internship | On-Campus 2020
21 Feb, 2022 Juspay is one of the largest firms in India in terms of providing Mobile payment solutions. Juspay visited our campus for hiring for an Internship. They have shortlisted around 600 students to give an online Coding Test at the Talscale Platform. Interview Round consists of 3 rounds on-campus and 2 rounds +...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Feb, 2022" }, { "code": null, "e": 298, "s": 52, "text": "Juspay is one of the largest firms in India in terms of providing Mobile payment solutions. Juspay visited our campus for hiring for an Internship. They have shortlisted arou...
Type Hints in Python
26 Aug, 2019 Python is a dynamically typed language, which means you never have to explicitly indicate what kind of types variable has. But in some cases, dynamic typing can lead to some bugs that are very difficult to debug and in those cases, Type Hints or Static Typing can be convenient. Type Hints has been introduc...
[ { "code": null, "e": 52, "s": 24, "text": "\n26 Aug, 2019" }, { "code": null, "e": 394, "s": 52, "text": "Python is a dynamically typed language, which means you never have to explicitly indicate what kind of types variable has. But in some cases, dynamic typing can lead to some ...
Set value of unsigned char array in C during runtime
31 Oct, 2019 This article explains how to set or change the value of unsigned char array during runtime in C. Given:Suppose we have an unsigned char array of size n unsigned char arr[n] = {}; // currently arr = {'', '', '', ...} To do:We want to set or change the values of this array during runtime. For example, we w...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Oct, 2019" }, { "code": null, "e": 125, "s": 28, "text": "This article explains how to set or change the value of unsigned char array during runtime in C." }, { "code": null, "e": 180, "s": 125, "text": "Given:Sup...
Minimum number of moves to make all elements equal
19 Apr, 2022 Given an array containing N elements and an integer K. It is allowed to perform the following operation any number of times on the given array: Insert the K-th element at the end of the array and delete the first element of the array. The task is to find the minimum number of moves needed to make all ele...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Apr, 2022" }, { "code": null, "e": 198, "s": 52, "text": "Given an array containing N elements and an integer K. It is allowed to perform the following operation any number of times on the given array: " }, { "code": null, ...
RESTfull routes on Node.js and MongoDB
30 Jun, 2020 REST stands for representational state transfer which basically provides a way of mapping HTTP verbs such as (GET, POST, PUT, DELETE) with CRUD actions such as (CREATE, READ, UPDATE, DELETE). Whenever we click on a link on the webpage we are basically making a state transfer from one page to another. For e...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2020" }, { "code": null, "e": 548, "s": 28, "text": "REST stands for representational state transfer which basically provides a way of mapping HTTP verbs such as (GET, POST, PUT, DELETE) with CRUD actions such as (CREATE, READ, ...
GATE-CS-2001 - GeeksforGeeks
22 Nov, 2021 S1: The sum of two singular n × n matrices may be non-singular S2: The sum of two n × n non-singular matrices may be singular. M1 and M2 are singular M1 = 1 1 1 1 M2 = 1 -1 -1 1 But M1+M2 is non-singular M1+M2 = 2 0 0 2 M1 and M2 are non-singular M1 = 1 0 ...
[ { "code": null, "e": 29577, "s": 29549, "text": "\n22 Nov, 2021" }, { "code": null, "e": 29705, "s": 29577, "text": "S1: The sum of two singular n × n matrices may be non-singular\nS2: The sum of two n × n non-singular matrices may be singular. " }, { "code": null, "e...
Find the winner in nim-game
14 Jun, 2022 You are given an array A[] of n-elements. There are two players Alice and Bob. A Player can choose any of element from array and remove it. If the bitwise XOR of all remaining elements equals 0 after removal of selected element, then that player loses. This problem is variation of nim-game. Note: Each pla...
[ { "code": null, "e": 52, "s": 24, "text": "\n14 Jun, 2022" }, { "code": null, "e": 345, "s": 52, "text": "You are given an array A[] of n-elements. There are two players Alice and Bob. A Player can choose any of element from array and remove it. If the bitwise XOR of all remainin...
Fabric.js | Rect moveCursor Property
25 May, 2020 In this article, we are going to see how to set the moveCursor property of a rectangle canvas using FabricJS. When we move the canvas object then the cursor will be changed. The canvas rectangle means rectangle is movable and can be stretched according to requirement. Further, the rectangle can be customiz...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 May, 2020" }, { "code": null, "e": 421, "s": 28, "text": "In this article, we are going to see how to set the moveCursor property of a rectangle canvas using FabricJS. When we move the canvas object then the cursor will be changed. T...
Maximise the number of toys that can be purchased with amount K
27 May, 2021 Given an array consisting of the cost of toys. Given an integer K depicting the amount of money available to purchase toys. Write a program to find the maximum number of toys one can buy with the amount K. Note: One can buy only 1 quantity of a particular toy. Examples: Input: N = 10, K = 50 co...
[ { "code": null, "e": 52, "s": 24, "text": "\n27 May, 2021" }, { "code": null, "e": 313, "s": 52, "text": "Given an array consisting of the cost of toys. Given an integer K depicting the amount of money available to purchase toys. Write a program to find the maximum number of toys...
C++ Program to convert Octal Number to Decimal and vice-versa
In a computer system, the octal number is expressed in the octal numeral system while the decimal number is in the decimal numeral system. The octal number is in base 8 while the decimal number is in base 10. Examples of decimal numbers and their corresponding octal numbers are as follows. A program that converts the o...
[ { "code": null, "e": 1271, "s": 1062, "text": "In a computer system, the octal number is expressed in the octal numeral system while the decimal number is in the decimal numeral system. The octal number is in base 8 while the decimal number is in base 10." }, { "code": null, "e": 1353, ...
Angular 4 - Routing
Routing basically means navigating between pages. You have seen many sites with links that direct you to a new page. This can be achieved using routing. Here the pages that we are referring to will be in the form of components. We have already seen how to create a component. Let us now create a component and see how to...
[ { "code": null, "e": 2334, "s": 1992, "text": "Routing basically means navigating between pages. You have seen many sites with links that direct you to a new page. This can be achieved using routing. Here the pages that we are referring to will be in the form of components. We have already seen how ...
Bootstrap Form select
A select is used when you want to allow the user to pick from multiple options, but by default, it only allows one. Use <select> for list options with which the user is familiar, such as states or numbers. Use multiple = "multiple" to allow the users to select more than one option. You can try to run the following code...
[ { "code": null, "e": 1178, "s": 1062, "text": "A select is used when you want to allow the user to pick from multiple options, but by default, it only allows one." }, { "code": null, "e": 1268, "s": 1178, "text": "Use <select> for list options with which the user is familiar, suc...
Java Math nextAfter() method with Example - GeeksforGeeks
15 Apr, 2018 The java.lang.Math.nextAfter() returns the floating-point number adjacent to the first argument in the direction of the second argument. If both arguments are equal then the second argument is returned. Syntax :// datatype can be float or double.public static dataType nextAfter(dataType st, dataType dir) P...
[ { "code": null, "e": 23557, "s": 23529, "text": "\n15 Apr, 2018" }, { "code": null, "e": 23760, "s": 23557, "text": "The java.lang.Math.nextAfter() returns the floating-point number adjacent to the first argument in the direction of the second argument. If both arguments are equa...
Difference between Work area, global structure and internal table in SAP ABAP
Internal tables let you read data from a fixed structure and stores it in-memory (working memory) in ABAP. The data is stored in a sequential manner in memory. They are basically equivalent to arrays but dynamic in nature. Since they are dynamic in nature, memory management is already taken care by ABAP. Usually, data ...
[ { "code": null, "e": 1484, "s": 1062, "text": "Internal tables let you read data from a fixed structure and stores it in-memory (working memory) in ABAP. The data is stored in a sequential manner in memory. They are basically equivalent to arrays but dynamic in nature. Since they are dynamic in natu...
PL/SQL - IF-THEN-ELSIF Statement
The IF-THEN-ELSIF statement allows you to choose between several alternatives. An IF-THEN statement can be followed by an optional ELSIF...ELSE statement. The ELSIF clause lets you add additional conditions. When using IF-THEN-ELSIF statements there are a few points to keep in mind. It's ELSIF, not ELSEIF. It's ELSIF, ...
[ { "code": null, "e": 2273, "s": 2065, "text": "The IF-THEN-ELSIF statement allows you to choose between several alternatives. An IF-THEN statement can be followed by an optional ELSIF...ELSE statement. The ELSIF clause lets you add additional conditions." }, { "code": null, "e": 2349, ...
How to use RatingBar in android?
Before getting into an example, we should know what is rating bar in android. Rating bar is a subclass of absSeekbar class in android. It is used to show the rating on view Group or window manager. This example demonstrates how to use the rating bar in android. Step 1 − Create a new project in Android Studio, go to Fil...
[ { "code": null, "e": 1260, "s": 1062, "text": "Before getting into an example, we should know what is rating bar in android. Rating bar is a subclass of absSeekbar class in android. It is used to show the rating on view Group or window manager." }, { "code": null, "e": 1324, "s": 126...
Tryit Editor v3.7
Tryit: HTML iframe
[]
How to combine lists in R?
When we have multiple lists but they have similar type of data then we might want to combine or merge those lists. This will be helpful to use because we can perform the calculations using one list name instead of applying them on multiple ones. We can combine multiple lists with the help of mapply function. Consider t...
[ { "code": null, "e": 1372, "s": 1062, "text": "When we have multiple lists but they have similar type of data then we might want to combine or merge those lists. This will be helpful to use because we can perform the calculations using one list name instead of applying them on multiple ones. We can ...
Second Minimum Node In a Binary Tree in C++
Suppose there is a non-empty special binary tree with some non-negative value, here each node in this tree has exactly two or zero children. If the node has two children, then this node's value is the smaller value among its two children. In other words, we can say that [root.val = minimum of root.left.val, root.right....
[ { "code": null, "e": 1570, "s": 1062, "text": "Suppose there is a non-empty special binary tree with some non-negative value, here each\nnode in this tree has exactly two or zero children. If the node has two children, then this node's value is the smaller value among its two children. In other word...
How React and ReactDOM works? - GeeksforGeeks
19 Nov, 2021 When you work with React, it is more than likely that you will build your apps with JSX. The JSX is a tag-based JavaScript syntax like looks familiar with HTML. React element is the atomic and most basic unit that you need to master before JSX and before moving forward with React. Note: In order to work wi...
[ { "code": null, "e": 24397, "s": 24369, "text": "\n19 Nov, 2021" }, { "code": null, "e": 24679, "s": 24397, "text": "When you work with React, it is more than likely that you will build your apps with JSX. The JSX is a tag-based JavaScript syntax like looks familiar with HTML. Re...
Apache Flink - Quick Guide
The advancement of data in the last 10 years has been enormous; this gave rise to a term 'Big Data'. There is no fixed size of data, which you can call as big data; any data that your traditional system (RDBMS) is not able to handle is Big Data. This Big Data can be in structured, semi-structured or un-structured forma...
[ { "code": null, "e": 2614, "s": 2069, "text": "The advancement of data in the last 10 years has been enormous; this gave rise to a term 'Big Data'. There is no fixed size of data, which you can call as big data; any data that your traditional system (RDBMS) is not able to handle is Big Data. This Bi...
java.util.zip.Inflater.read() Method Example
The java.util.zip.InflaterInputStream.read() method reads a byte of uncompressed data. This method will block until enough input is available for decompression. Following is the declaration for java.util.zip.InflaterInputStream.read() method. public int read() throws IOException the byte read, or -1 if end of compress...
[ { "code": null, "e": 2353, "s": 2192, "text": "The java.util.zip.InflaterInputStream.read() method reads a byte of uncompressed data. This method will block until enough input is available for decompression." }, { "code": null, "e": 2435, "s": 2353, "text": "Following is the decl...
Add Text Inside the Plot in Matplotlib - GeeksforGeeks
03 Jan, 2021 In this article, We are going to see how to add text inside the plot in Matplotlib. The matplotlib.pyplot.text() function is used to add text inside the plot. The syntax adds text at an arbitrary location of the axes. It also supports mathematical expressions. Syntax: matplotlib.pyplot.text(x, y, s, fontdi...
[ { "code": null, "e": 24238, "s": 24210, "text": "\n03 Jan, 2021" }, { "code": null, "e": 24499, "s": 24238, "text": "In this article, We are going to see how to add text inside the plot in Matplotlib. The matplotlib.pyplot.text() function is used to add text inside the plot. The ...
Types of Ensemble methods in Machine learning | by Anju Rajbangshi | Towards Data Science
In my previous article, we discussed about the different types of regression in machine learning. So, today I am going to focus on the various ensemble methods in data science. One thing I have experienced in the course of my career is that while learning any skill , things become easier when we try to relate concepts ...
[ { "code": null, "e": 348, "s": 171, "text": "In my previous article, we discussed about the different types of regression in machine learning. So, today I am going to focus on the various ensemble methods in data science." }, { "code": null, "e": 717, "s": 348, "text": "One thing...
Python | Find Mean of a List of Numpy Array - GeeksforGeeks
14 Mar, 2019 Given a list of Numpy array, the task is to find mean of every numpy array. Let’s see a few methods we can do the task. Method #1: Using np.mean() # Python code to find mean of every numpy array in list # Importing moduleimport numpy as np # List InitializationInput = [np.array([1, 2, 3]), np.arr...
[ { "code": null, "e": 24126, "s": 24098, "text": "\n14 Mar, 2019" }, { "code": null, "e": 24246, "s": 24126, "text": "Given a list of Numpy array, the task is to find mean of every numpy array. Let’s see a few methods we can do the task." }, { "code": null, "e": 24273,...
Modelling tabular data with Google’s TabNet | by Mikael Huss | Towards Data Science
Can a neural network beat classical methods? Released in 2019, Google Research’s TabNet is claimed in a preprint manuscript to outperform existing methods on tabular data. How does it work and how can one try it? Tabular data probably make up the majority of business data today. Think of things like retail transactions...
[ { "code": null, "e": 217, "s": 172, "text": "Can a neural network beat classical methods?" }, { "code": null, "e": 385, "s": 217, "text": "Released in 2019, Google Research’s TabNet is claimed in a preprint manuscript to outperform existing methods on tabular data. How does it wo...
Maximum length subarray with LCM equal to product - GeeksforGeeks
03 Jun, 2021 Given an arr[], the task is to find the maximum length of the sub-array such that the LCM of the sub-array is equal to the product of numbers in the sub-array. If no valid sub-array exists, then print -1. Note: The length of the sub-array must be ≥ 2. Examples: Input: arr[] = { 6, 10, 21} Output: 2 The ...
[ { "code": null, "e": 24612, "s": 24584, "text": "\n03 Jun, 2021" }, { "code": null, "e": 24818, "s": 24612, "text": "Given an arr[], the task is to find the maximum length of the sub-array such that the LCM of the sub-array is equal to the product of numbers in the sub-array. If ...
Count the characters in each word in a given sentence | Practice | GeeksforGeeks
Given a string containing multiple words, count the characters in each word and display them. Example 1: Input: S = "the quick brown fox" Output: 3 5 5 3 Explanation: "the" has 3 characters "quick" has 5 characters "brown" has 5 characters "fox" has 3 characters ​Example 2: Input: S = "geeks for geeks" Output: 5 3...
[ { "code": null, "e": 320, "s": 226, "text": "Given a string containing multiple words, count the characters in each word and display them." }, { "code": null, "e": 331, "s": 320, "text": "Example 1:" }, { "code": null, "e": 490, "s": 331, "text": "Input:\nS = ...
Addition & Product of 2 Graphs Rank and Nullity of a Graph - GeeksforGeeks
22 Jun, 2021 Introduction :A Graph G consists of vertices & edges. The edges are lines or arcs that connect any two nodes in the graph, and the nodes are also known as vertices. A simple Graph G = (V, E) consists of : V : Finite set of vertices E : Set of edges Example – In the diagram below, Graph G consists of :V = {...
[ { "code": null, "e": 24812, "s": 24784, "text": "\n22 Jun, 2021" }, { "code": null, "e": 24977, "s": 24812, "text": "Introduction :A Graph G consists of vertices & edges. The edges are lines or arcs that connect any two nodes in the graph, and the nodes are also known as vertices...
Why Protected access modifier used in Java?
The data members and methods of a class can be accessed from the same package or sub-classes in a different package if they are specified with the protected access modifier. The keyword protected is used to specify this modifier. A program that demonstrates the protected access modifier in Java is given as follows: Li...
[ { "code": null, "e": 1292, "s": 1062, "text": "The data members and methods of a class can be accessed from the same package or sub-classes in a different package if they are specified with the protected access modifier. The keyword protected is used to specify this modifier." }, { "code": n...
How to map a step definition to a feature file in Cucumber?
We can map a step definition file to a feature file in Cucumber. This can be done using the below steps − Step1− Create a feature file with .feature extension(say Login.feature) with the following − Feature − Login Module Scenario − Welcome Page Login verification Given User is on Welcome Page Then Welcome page should ...
[ { "code": null, "e": 1168, "s": 1062, "text": "We can map a step definition file to a feature file in Cucumber. This can be done using the below steps −" }, { "code": null, "e": 1261, "s": 1168, "text": "Step1− Create a feature file with .feature extension(say Login.feature) with...
How to Use Column Alias in SELECT Statement? - GeeksforGeeks
08 Oct, 2021 Alias is used to give a temporary name(only for the duration of the query) to the column or table in order to make the column name or table name more readable. It does not change the name of the column permanently. Alias can be performed using the ‘AS’ keyword or without any keyword. But it is recommended...
[ { "code": null, "e": 23877, "s": 23849, "text": "\n08 Oct, 2021" }, { "code": null, "e": 24093, "s": 23877, "text": "Alias is used to give a temporary name(only for the duration of the query) to the column or table in order to make the column name or table name more readable. It ...
JPA - ORM Components
Most contemporary applications use relational database to store data. Recently, many vendors switched to object database to reduce their burden on data maintenance. It means object database or object relational technologies are taking care of storing, retrieving, updating, and maintenance. The core part of this object ...
[ { "code": null, "e": 2224, "s": 1739, "text": "Most contemporary applications use relational database to store data. Recently, many vendors switched to object database to reduce their burden on data maintenance. It means object database or object relational technologies are taking care of storing, r...
Extract domain of Email from table in SQL Server - GeeksforGeeks
07 Dec, 2020 Introduction :As a DBA, you might come across a request where you need to extract the domain of the email address, the email address that is stored in the database table. In case you want to count the most used domain names from email addresses in any given table, you can count the number of extracted doma...
[ { "code": null, "e": 23913, "s": 23885, "text": "\n07 Dec, 2020" }, { "code": null, "e": 24265, "s": 23913, "text": "Introduction :As a DBA, you might come across a request where you need to extract the domain of the email address, the email address that is stored in the database...
Foundation - Slider Two Handles
To use two handles you need to use .slider-handle span and input field. It works for both horizontal and vertical sliders. The JavaScript will allocate ids for input fields, until you change it. If you do not change, then the handles and inputs match in the way they are in the DOM tree. The following example demonstrat...
[ { "code": null, "e": 2526, "s": 2238, "text": "To use two handles you need to use .slider-handle span and input field. It works for both horizontal and vertical sliders. The JavaScript will allocate ids for input fields, until you change it. If you do not change, then the handles and inputs match in...
How to count digits of given number? JavaScript
The requirements here are simple, we are required to write a JavaScript function that takes in a number and returns the number of digits in it. For example − The number of digits in 4567 is 4 The number of digits in 423467 is 6 The number of digits in 457 is 3 Let's write the code for this function − const num = 235345...
[ { "code": null, "e": 1206, "s": 1062, "text": "The requirements here are simple, we are required to write a JavaScript function that takes in a\nnumber and returns the number of digits in it." }, { "code": null, "e": 1220, "s": 1206, "text": "For example −" }, { "code": n...
AtomicInteger getAndAccumulate() method in Java with Examples - GeeksforGeeks
03 Jun, 2019 The Java.AtomicInteger.getAndAccumulate() method is an inbuilt method, which updates the current value of the object by applying the specified operation on the current value and value passed as a parameter. It takes an integer as its parameter and an object of IntBinaryOperator interface and applies the op...
[ { "code": null, "e": 24055, "s": 24027, "text": "\n03 Jun, 2019" }, { "code": null, "e": 24440, "s": 24055, "text": "The Java.AtomicInteger.getAndAccumulate() method is an inbuilt method, which updates the current value of the object by applying the specified operation on the cur...
Spring JDBC - SimpleJdbcInsert Class
The org.springframework.jdbc.core.SimpleJdbcInsert class is a multi-threaded, reusable object providing easy insert capabilities for a table. It provides meta data processing to simplify the code needed to construct a basic insert statement. The actual insert is being handled using Spring's JdbcTemplate Following is th...
[ { "code": null, "e": 2701, "s": 2396, "text": "The org.springframework.jdbc.core.SimpleJdbcInsert class is a multi-threaded, reusable object providing easy insert capabilities for a table. It provides meta data processing to simplify the code needed to construct a basic insert statement. The actual ...
Program to find number of solutions in Quadratic Equation in C++
In this problem, we are given a quadratic equation of type ax2 + bx + c, where a,b and c are constants. Our task is to create a program to find number of solutions in Quadratic Equation in C++. Problem Description − Here, we need to find the numbers of solutions for a quadratic equation that can have at max 2 solutions...
[ { "code": null, "e": 1256, "s": 1062, "text": "In this problem, we are given a quadratic equation of type ax2 + bx + c, where a,b and c are constants. Our task is to create a program to find number of solutions in Quadratic Equation in C++." }, { "code": null, "e": 1384, "s": 1256, ...
Next.js - Pages
In Next.js, we can create pages and navigate between them using file system routing feature. We'll use Link component to have a client side navigation between pages. In Next.js, a page is a React Component and are exported from pages directory. Each page is associated with a route based on its file name. For example pa...
[ { "code": null, "e": 2273, "s": 2107, "text": "In Next.js, we can create pages and navigate between them using file system routing feature. We'll use Link component to have a client side navigation between pages." }, { "code": null, "e": 2425, "s": 2273, "text": "In Next.js, a pa...
Extract Leaves of a Binary Tree in a Doubly Linked List - GeeksforGeeks
18 Jan, 2022 Given a Binary Tree, extract all leaves of it in a Doubly Linked List (DLL). Note that the DLL need to be created in-place. Assume that the node structure of DLL and Binary Tree is same, only the meaning of left and right pointers are different. In DLL, left means previous pointer, and right means next poi...
[ { "code": null, "e": 35848, "s": 35820, "text": "\n18 Jan, 2022" }, { "code": null, "e": 36163, "s": 35848, "text": "Given a Binary Tree, extract all leaves of it in a Doubly Linked List (DLL). Note that the DLL need to be created in-place. Assume that the node structure of DLL a...
How to use Push-Location and Pop-Location command in PowerShell?
Push-Location command in PowerShell is used to push (add) the current location to the location stack (Last In First Out (LIFO) - queue) while the Pop-Location is to retrieve the last location from the stack. When the PowerShell console opens there are no locations set to the stack. PS C:\> Get-Location -Stack PS C:\> W...
[ { "code": null, "e": 1270, "s": 1062, "text": "Push-Location command in PowerShell is used to push (add) the current location to the location stack (Last In First Out (LIFO) - queue) while the Pop-Location is to retrieve the last location from the stack." }, { "code": null, "e": 1345, ...
Beautiful Soup - Installation
As BeautifulSoup is not a standard python library, we need to install it first. We are going to install the BeautifulSoup 4 library (also known as BS4), which is the latest one. To isolate our working environment so as not to disturb the existing setup, let us first create a virtual environment. A virtual environment a...
[ { "code": null, "e": 2163, "s": 1985, "text": "As BeautifulSoup is not a standard python library, we need to install it first. We are going to install the BeautifulSoup 4 library (also known as BS4), which is the latest one." }, { "code": null, "e": 2282, "s": 2163, "text": "To i...
Get the powers of a NumPy array values element-wise - GeeksforGeeks
19 Dec, 2021 NumPy is a powerful N-dimensional array object and its use in linear algebra, Fourier transform, and random number capabilities. It provides an array object much faster than traditional Python lists. numpy.power() is used to calculate the power of elements. It treats first array elements raised to powers f...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n19 Dec, 2021" }, { "code": null, "e": 24245, "s": 23901, "text": "NumPy is a powerful N-dimensional array object and its use in linear algebra, Fourier transform, and random number capabilities. It provides an array object much f...
C function argument and return values
Here we will see what are the different types of C functions based on the return values and arguments. So a function either can take some arguments, or nothing is taken. Similarly, a function can return something, otherwise does not return anything. So we can categorize them into four types. Function with No argument a...
[ { "code": null, "e": 1165, "s": 1062, "text": "Here we will see what are the different types of C functions based on the return values and arguments." }, { "code": null, "e": 1355, "s": 1165, "text": "So a function either can take some arguments, or nothing is taken. Similarly, a...
C++ Program for Find k pairs with smallest sums in two arrays - GeeksforGeeks
25 Jan, 2022 Given two integer arrays arr1[] and arr2[] sorted in ascending order and an integer k. Find k pairs with smallest sums such that one element of a pair belongs to arr1[] and other element belongs to arr2[]Examples: Input : arr1[] = {1, 7, 11} arr2[] = {2, 4, 6} k = 3 Output : [1, 2], ...
[ { "code": null, "e": 24405, "s": 24377, "text": "\n25 Jan, 2022" }, { "code": null, "e": 24620, "s": 24405, "text": "Given two integer arrays arr1[] and arr2[] sorted in ascending order and an integer k. Find k pairs with smallest sums such that one element of a pair belongs to a...
How to display square root sign in base R plot?
To display square root sign in base R plot, we can follow the below steps − First of all, create a plot having square root values to display default visualisation. First of all, create a plot having square root values to display default visualisation. Then, create the plot with expression function to display square roo...
[ { "code": null, "e": 1138, "s": 1062, "text": "To display square root sign in base R plot, we can follow the below steps −" }, { "code": null, "e": 1226, "s": 1138, "text": "First of all, create a plot having square root values to display default visualisation." }, { "cod...
Zend Framework - Email Management
The Zend Framework provides a separate component called as zend-mail to send email messages. The zend-mail component also provides an option to read and write email messages with attachments both in text and html format. Sending an email in Zend is much easier and simple to configure. Let us go through the email concep...
[ { "code": null, "e": 2598, "s": 2312, "text": "The Zend Framework provides a separate component called as zend-mail to send email messages. The zend-mail component also provides an option to read and write email messages with attachments both in text and html format. Sending an email in Zend is much...
Creating a file using FileOutputStream - GeeksforGeeks
22 Dec, 2016 FileOutputStream class belongs to byte stream and stores the data in the form of individual bytes. It can be used to create text files. A file represents storage of data on a second storage media like a hard disk or CD. Whether or not a file is available or may be created depends upon the underlying platfo...
[ { "code": null, "e": 24916, "s": 24888, "text": "\n22 Dec, 2016" }, { "code": null, "e": 25467, "s": 24916, "text": "FileOutputStream class belongs to byte stream and stores the data in the form of individual bytes. It can be used to create text files. A file represents storage o...
Apple Silicon, run Scikit-Learn and TensorFlow on the new Macs M1 | by Fabrice Daniel | Towards Data Science
Update : explains how to fix issue on LSTM validation accuracy. — As everybody already knows the new Apple Silicon M1 Macs are incredibly powerful computers. By seeing the benchmarks and all the real-life test performed everywhere, as a machine learning engineer I’m really thinking that something great happened and a d...
[ { "code": null, "e": 235, "s": 171, "text": "Update : explains how to fix issue on LSTM validation accuracy." }, { "code": null, "e": 237, "s": 235, "text": "—" }, { "code": null, "e": 527, "s": 237, "text": "As everybody already knows the new Apple Silicon M1...
Node.js process.kill() Method - GeeksforGeeks
17 Jan, 2022 The process.kill( pid[,signal] ) is an inbuilt method of node.js which sends a signal to the process, pid (which is the process id) and signal is in the string format that is the signal to send. Syntax : process.kill(pid[, signal]) Parameters: This method accepts two parameters as mentioned above and descr...
[ { "code": null, "e": 24531, "s": 24503, "text": "\n17 Jan, 2022" }, { "code": null, "e": 24726, "s": 24531, "text": "The process.kill( pid[,signal] ) is an inbuilt method of node.js which sends a signal to the process, pid (which is the process id) and signal is in the string for...
How can we start MySQL event scheduler?
Actually, MySQL event scheduler is a process that runs in the background and constantly looks for the events to execute. But before we create or schedule an event we just have to start the scheduler. It can start with the help of the following statement − mysql> SET GLOBAL event_scheduler = ON; Query OK, 0 rows affecte...
[ { "code": null, "e": 1318, "s": 1062, "text": "Actually, MySQL event scheduler is a process that runs in the background and constantly looks for the events to execute. But before we create or schedule an event we just have to start the scheduler. It can start with the help of the following statement...
Splines in Python for Feature Selection and Data Smoothing | by Robbie Prior | Towards Data Science
So this week I ended up doing some work with Splines in Python and was shocked regarding the state of information and lack of support articles for new-comers to Splines with Python. There is plenty of information on the math already. The goal of this article is to break down the application of that theory for B-Splines...
[ { "code": null, "e": 391, "s": 47, "text": "So this week I ended up doing some work with Splines in Python and was shocked regarding the state of information and lack of support articles for new-comers to Splines with Python. There is plenty of information on the math already. The goal of this artic...
Solidity - Environment Setup
This chapter explains how we can setup Solidity compiler on CentOS machine. If you do not have a Linux machine then you can use our Online Compiler for small contracts and for quickly learning Solidity. This is the fastest way to install Solidity compiler on your CentoS Machine. We have following steps to install Solid...
[ { "code": null, "e": 2758, "s": 2555, "text": "This chapter explains how we can setup Solidity compiler on CentOS machine. If you do not have a Linux machine then you can use our Online Compiler for small contracts and for quickly learning Solidity." }, { "code": null, "e": 2890, "s"...
JavaScript Proxy() Object
The JavaScript proxy() object wraps an object or function and is used for custom actions for fundamental operations like accessing property , invoking function etc. Following is the code for proxy() object in JavaScript − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" ...
[ { "code": null, "e": 1227, "s": 1062, "text": "The JavaScript proxy() object wraps an object or function and is used for custom actions for fundamental operations like accessing property , invoking function etc." }, { "code": null, "e": 1284, "s": 1227, "text": "Following is the ...
C | String | Question 5 - GeeksforGeeks
05 Feb, 2013 What does the following fragment of C-program print? char c[] = "GATE2011"; char *p =c; printf("%s", p + p[3] - p[1]) ; (A) GATE2011(B) E2011(C) 2011(D) 011Answer: (C)Explanation: See comments for explanation. char c[] = "GATE2011"; // p now has the base address string "GATE2011" char *p = c; // ...
[ { "code": null, "e": 24051, "s": 24023, "text": "\n05 Feb, 2013" }, { "code": null, "e": 24104, "s": 24051, "text": "What does the following fragment of C-program print?" }, { "code": "char c[] = \"GATE2011\"; char *p =c; printf(\"%s\", p + p[3] - p[1]) ;", "e": 24171...
Minimize operations to make given binary string as all 1s by repeatedly converting K consecutive characters to 1 - GeeksforGeeks
20 Dec, 2021 Given a binary string str of N characters an integer K, the task is to find the minimum moves required to convert all characters of the string to 1’s where at each move, K consecutive characters can be converted to 1. Example: Input: str=”0010′′, K=3Output: 2Explanation:Move 1: Select the substring from 0 ...
[ { "code": null, "e": 26537, "s": 26509, "text": "\n20 Dec, 2021" }, { "code": null, "e": 26755, "s": 26537, "text": "Given a binary string str of N characters an integer K, the task is to find the minimum moves required to convert all characters of the string to 1’s where at each...
Maximum sum subarray of even length - GeeksforGeeks
22 Mar, 2022 Given an array arr[] of N elements, the task is to find the maximum sum of any subarray of length X such that X > 0 and X % 2 = 0.Examples: Input: arr[] = {1, 2, 3} Output: 5 {2, 3} is the required subarray.Input: arr[] = {8, 9, -8, 9, 10} Output: 20 {9, -8, 9, 10} is the required subarray. Even though {...
[ { "code": null, "e": 25943, "s": 25915, "text": "\n22 Mar, 2022" }, { "code": null, "e": 26085, "s": 25943, "text": "Given an array arr[] of N elements, the task is to find the maximum sum of any subarray of length X such that X > 0 and X % 2 = 0.Examples: " }, { "code":...
Find if an undirected graph contains an independent set of a given size - GeeksforGeeks
07 Apr, 2022 Given an undirected graph, check if it contains an independent set of size k. Print ‘Yes’ if there exists an independent set of size k. Print ‘No’ otherwise. Independent Set: An independent set in a graph is a set of vertices that are not directly connected to each other. Example 1: Input : K = 4, ...
[ { "code": null, "e": 26597, "s": 26569, "text": "\n07 Apr, 2022" }, { "code": null, "e": 26755, "s": 26597, "text": "Given an undirected graph, check if it contains an independent set of size k. Print ‘Yes’ if there exists an independent set of size k. Print ‘No’ otherwise." },...
Understanding ReDoS Attack - GeeksforGeeks
12 Jan, 2022 ReDoS stands for Regular Expression Denial of Service. The ReDoS is an algorithmic complexity attack that produces a denial of service by providing a regular expression that takes a very long time to evaluate. The attack exploits the fact that most regular expression implementations have exponential time w...
[ { "code": null, "e": 25653, "s": 25625, "text": "\n12 Jan, 2022" }, { "code": null, "e": 26104, "s": 25653, "text": "ReDoS stands for Regular Expression Denial of Service. The ReDoS is an algorithmic complexity attack that produces a denial of service by providing a regular expre...
Program to calculate area and volume of a Tetrahedron - GeeksforGeeks
01 May, 2021 A Tetrahedron is simply a pyramid with a triangular base. It is a solid object with four triangular faces, three on the sides or lateral faces, one on the bottom or the base and four vertices or corners. If the faces are all congruent equilateral triangles, then the tetrahedron is called regular. The area...
[ { "code": null, "e": 26734, "s": 26706, "text": "\n01 May, 2021" }, { "code": null, "e": 27033, "s": 26734, "text": "A Tetrahedron is simply a pyramid with a triangular base. It is a solid object with four triangular faces, three on the sides or lateral faces, one on the bottom o...
numpy.absolute() in Python - GeeksforGeeks
29 Nov, 2018 numpy.absolute(arr, out = None, ufunc ‘absolute’) : This mathematical function helps user to calculate absolute value of each element. For complex input, a + ib, the absolute value is . Parameters : arr : [array_like] Input array or object whose elements, we need to test. Return : An array with absolute ...
[ { "code": null, "e": 25295, "s": 25267, "text": "\n29 Nov, 2018" }, { "code": null, "e": 25481, "s": 25295, "text": "numpy.absolute(arr, out = None, ufunc ‘absolute’) : This mathematical function helps user to calculate absolute value of each element. For complex input, a + ib, t...
Eulerian path and circuit for undirected graph - GeeksforGeeks
18 Jan, 2022 Eulerian Path is a path in graph that visits every edge exactly once. Eulerian Circuit is an Eulerian Path which starts and ends on the same vertex. How to find whether a given graph is Eulerian or not? The problem is same as following question. “Is it possible to draw a given graph without lifting p...
[ { "code": null, "e": 26473, "s": 26445, "text": "\n18 Jan, 2022" }, { "code": null, "e": 26624, "s": 26473, "text": "Eulerian Path is a path in graph that visits every edge exactly once. Eulerian Circuit is an Eulerian Path which starts and ends on the same vertex. " }, { ...
Python | Arrange the files in directories according to extensions - GeeksforGeeks
09 Sep, 2019 In this article, we will learn how to arrange the files in different directories according to their extensions. When you have a lot of files with different extension than you can simply use the script for your help. Below is the Python implementation – import os # Using system functions import shutil # M...
[ { "code": null, "e": 25587, "s": 25559, "text": "\n09 Sep, 2019" }, { "code": null, "e": 25803, "s": 25587, "text": "In this article, we will learn how to arrange the files in different directories according to their extensions. When you have a lot of files with different extensi...
Local inner class in Java
In Java, just like methods, variables of a class too can have another class as its member. Writing a class within another is allowed in Java. The class written within is called the nested class, and the class that holds the inner class is called the outer class. Following is the syntax to write a nested class. Here, th...
[ { "code": null, "e": 1325, "s": 1062, "text": "In Java, just like methods, variables of a class too can have another class as its member. Writing a class within another is allowed in Java. The class written within is called the nested class, and the class that holds the inner class is called the out...
Spring Security - Quick Guide
Introduction and Overview Basic components of Spring Security AuthenticationFilter AuthenticationManager AuthenticationProvider UserDetailsService PasswordEncoder Spring Security Context Form Login Login with a Database Login Attempts Limit AuthenticationFilter AuthenticationManager AuthenticationProvider UserDetail...
[ { "code": null, "e": 1861, "s": 1835, "text": "Introduction and Overview" }, { "code": null, "e": 2079, "s": 1861, "text": "Basic components of Spring Security\n\nAuthenticationFilter\nAuthenticationManager\nAuthenticationProvider\nUserDetailsService\nPasswordEncoder\nSpring Secu...
C# | foreach Loop - GeeksforGeeks
06 Aug, 2019 Prerequisite: Loops in C# Looping in a programming language is a way to execute a statement or a set of statements multiple numbers of times depending on the result of a condition to be evaluated. The resulting condition should be true to execute statements within loops. The foreach loop is used to iterate...
[ { "code": null, "e": 24252, "s": 24224, "text": "\n06 Aug, 2019" }, { "code": null, "e": 24278, "s": 24252, "text": "Prerequisite: Loops in C#" }, { "code": null, "e": 24690, "s": 24278, "text": "Looping in a programming language is a way to execute a statemen...
How to set the Margin of the Buttons in C#? - GeeksforGeeks
26 Jun, 2019 A Button is an essential part of an application, or software, or webpage. It allows the user to interact with the application or software. In Button, you are allowed to set the space between two or more Button controls using Margin Property. You can use this property in two different methods: 1. Design-Tim...
[ { "code": null, "e": 24192, "s": 24164, "text": "\n26 Jun, 2019" }, { "code": null, "e": 24486, "s": 24192, "text": "A Button is an essential part of an application, or software, or webpage. It allows the user to interact with the application or software. In Button, you are allow...
How to Use Terminal in Sublime Text Editor ? - GeeksforGeeks
06 Jun, 2021 Well in Visual Studio Code we get a direct Option for opening Terminal, Unlike Sublime Text editor. Sublime is Simple and free to use, Light on memory, and can easily work with multiple projects. In this article, we will see how to use the terminal in a sublime text editor. Step 1: Open Sublime Text, Step ...
[ { "code": null, "e": 24976, "s": 24948, "text": "\n06 Jun, 2021" }, { "code": null, "e": 25251, "s": 24976, "text": "Well in Visual Studio Code we get a direct Option for opening Terminal, Unlike Sublime Text editor. Sublime is Simple and free to use, Light on memory, and can eas...
How to declare a constructor in Java?
While declaring the constructors you should keep the following points in mind. A constructor does not have a return type. The name of the constructor is same as the name of the class. A class can have more than one constructor. public class Sample { int num; public Sample() { num = 30; } public Sampl...
[ { "code": null, "e": 1141, "s": 1062, "text": "While declaring the constructors you should keep the following points in mind." }, { "code": null, "e": 1184, "s": 1141, "text": "A constructor does not have a return type." }, { "code": null, "e": 1246, "s": 1184, ...
Responsive grid with Bootstrap
To create a responsive grid in Bootstrap, use the .col-*-* class in Bootstrap. In the below example, we have 4 divs − Live Demo <!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script src = "/scripts/jquery.min.js"><...
[ { "code": null, "e": 1141, "s": 1062, "text": "To create a responsive grid in Bootstrap, use the .col-*-* class in Bootstrap." }, { "code": null, "e": 1180, "s": 1141, "text": "In the below example, we have 4 divs −" }, { "code": null, "e": 1190, "s": 1180, "t...
Java Concurrency - Condition Interface
A java.util.concurrent.locks.Condition interface provides a thread ability to suspend its execution, until the given condition is true. A Condition object is necessarily bound to a Lock and to be obtained using the newCondition() method. Following is the list of important methods available in the Condition class. publi...
[ { "code": null, "e": 2895, "s": 2657, "text": "A java.util.concurrent.locks.Condition interface provides a thread ability to suspend its execution, until the given condition is true. A Condition object is necessarily bound to a Lock and to be obtained using the newCondition() method." }, { "...
How to compare two DataFrames in Python Pandas with missing values
Pandas uses the NumPy NaN (np.nan) object to represent a missing value. This Numpy NaN value has some interesting mathematical properties. For example, it is not equal to itself. However, Python None object evaluates as True when compared to itself. Let us see some examples to understand how np.nan behaves. import pand...
[ { "code": null, "e": 1312, "s": 1062, "text": "Pandas uses the NumPy NaN (np.nan) object to represent a missing value. This Numpy NaN value has some interesting mathematical properties. For example, it is not equal to itself. However, Python None object evaluates as True when compared to itself." ...
Collections Class in Java - GeeksforGeeks
20 Apr, 2022 Collections class is a member of the Java Collections Framework. The java.util.Collections package is the package that contains the Collections class. Collections class is basically used with the static methods that operate on the collections or return the collection. All the methods of this class throw th...
[ { "code": null, "e": 28950, "s": 28922, "text": "\n20 Apr, 2022" }, { "code": null, "e": 29341, "s": 28950, "text": "Collections class is a member of the Java Collections Framework. The java.util.Collections package is the package that contains the Collections class. Collections ...
Remove Leading whitespaces from a String in R Language - trimws() Function - GeeksforGeeks
23 Dec, 2021 In this article, we are going to see how to remove whitespaces from a String in R Programming Language. trimws() function in R Language is used to trim the leading white spaces. It shrinks an object by removing outermost rows and columns with the same values. Syntax: trimws(x) Parameters: x: Object or cha...
[ { "code": null, "e": 24321, "s": 24293, "text": "\n23 Dec, 2021" }, { "code": null, "e": 24425, "s": 24321, "text": "In this article, we are going to see how to remove whitespaces from a String in R Programming Language." }, { "code": null, "e": 24581, "s": 24425,...
Getting first letter of each word in a String using regex in Java
A word is contiguous series of alphabetic characters. Using regex, we need to search the boundary character to be between A to Z or a to z. Consider the following cases − Input: Hello World Output: H W Input: Welcome to world of Regex Output: W t w o R We'll use the regex as "\\b[a-zA-Z]" where \\b signifies the bound...
[ { "code": null, "e": 1233, "s": 1062, "text": "A word is contiguous series of alphabetic characters. Using regex, we need to search the boundary character to be between A to Z or a to z. Consider the following cases −" }, { "code": null, "e": 1316, "s": 1233, "text": "Input: Hell...
Uploading files to Google Drive directly from the Terminal (using Curl) | by Daniel Ellis | Towards Data Science
In many cases, it may be difficult to send data from a new machine to another. Examples of this include HPC facilities which are hidden behind a login portal but do not allow ssh tunnelling or simple headless machines which only have a few core programs installed. In this article, we look at using cURL (a command-line ...
[ { "code": null, "e": 620, "s": 172, "text": "In many cases, it may be difficult to send data from a new machine to another. Examples of this include HPC facilities which are hidden behind a login portal but do not allow ssh tunnelling or simple headless machines which only have a few core programs i...
Java Program to wrap text in a JTextPane and show Scrollbar
Let’s say we have lots of content in our JTextPane component − textPane.setText("This is demo text1. This is demo text2. This is demo text3." + "This is demo text4.This is demo text5. This is demo text6. " + "This is demo text7. This is demo text8. This is demo text9. " + "This is demo text10. This is demo tex...
[ { "code": null, "e": 1125, "s": 1062, "text": "Let’s say we have lots of content in our JTextPane component −" }, { "code": null, "e": 1691, "s": 1125, "text": "textPane.setText(\"This is demo text1. This is demo text2. This is demo text3.\"\n + \"This is demo text4.This is dem...
String compareTo(String anotherString)
This method compares two strings lexicographically. Here is the syntax of this method − int compareTo(String anotherString) Here is the detail of parameters − anotherString − the String to be compared. anotherString − the String to be compared. The value 0 if the argument is a string lexicographically equal to this st...
[ { "code": null, "e": 2429, "s": 2377, "text": "This method compares two strings lexicographically." }, { "code": null, "e": 2465, "s": 2429, "text": "Here is the syntax of this method −" }, { "code": null, "e": 2502, "s": 2465, "text": "int compareTo(String an...
Early binding and Late binding in C++ - GeeksforGeeks
05 Feb, 2018 Binding refers to the process of converting identifiers (such as variable and performance names) into addresses. Binding is done for each variable and functions. For functions, it means that matching the call with the right function definition by the compiler. It takes place either at compile time or at ru...
[ { "code": null, "e": 23733, "s": 23705, "text": "\n05 Feb, 2018" }, { "code": null, "e": 24047, "s": 23733, "text": "Binding refers to the process of converting identifiers (such as variable and performance names) into addresses. Binding is done for each variable and functions. F...
Python dictionary str() Method
Python dictionary method str() produces a printable string representation of a dictionary. Following is the syntax for str() method − str(dict) dict − This is the dictionary. dict − This is the dictionary. This method returns string representation. The following example shows the usage of str() method. #!/usr/bin/pyt...
[ { "code": null, "e": 2336, "s": 2244, "text": "Python dictionary method str() produces a printable string representation of a dictionary." }, { "code": null, "e": 2379, "s": 2336, "text": "Following is the syntax for str() method −" }, { "code": null, "e": 2390, ...
17 Terminal Commands Every Programmer Should Know | by Mahbub Zaman | Towards Data Science
Most computer users interact via a graphical user interface because it’s an easy way to manipulate a machine. Even though GUI applications remain popular among vast users, a command-line interface gives users more control over their computer by running text commands. It’s a powerful way to interact with a computer. For...
[ { "code": null, "e": 638, "s": 171, "text": "Most computer users interact via a graphical user interface because it’s an easy way to manipulate a machine. Even though GUI applications remain popular among vast users, a command-line interface gives users more control over their computer by running te...
Explain the pointers to unions in C language
A union is a memory location that is shared by several variables of different data types. The syntax for the pointers to unions in C programming is as follows − union uniontag{ datatype member 1; datatype member 2; ---- ---- datatype member n; }; The following example shows the usage of union of structur...
[ { "code": null, "e": 1152, "s": 1062, "text": "A union is a memory location that is shared by several variables of different data types." }, { "code": null, "e": 1223, "s": 1152, "text": "The syntax for the pointers to unions in C programming is as follows −" }, { "code":...
Program for Celsius To Fahrenheit conversion in C++
Given with temperature ‘n’ in Celsius the challenge is to convert the given temperature to Fahrenheit and display it. Input 1-: 100.00 Output -: 212.00 Input 2-: -40 Output-: -40 For converting the temperature from Celsius to Fahrenheit there is a formula which is given below T(°F) = T(°C) × 9/5 + 32 Where, T(°C)...
[ { "code": null, "e": 1180, "s": 1062, "text": "Given with temperature ‘n’ in Celsius the challenge is to convert the given temperature to Fahrenheit and display it." }, { "code": null, "e": 1247, "s": 1180, "text": "Input 1-: 100.00\n Output -: 212.00\nInput 2-: -40\n Output-...
MomentJS - Days in Month
This method will give the numbers of days in the current month. moment().daysInMonth(); var a = moment().daysInMonth(); Let us check the days in a month for a given date using this method. Use the following code for this purpose − var a = moment([2016, 1]).daysInMonth(); For February in 2016, it displays days as 29. ...
[ { "code": null, "e": 2024, "s": 1960, "text": "This method will give the numbers of days in the current month." }, { "code": null, "e": 2049, "s": 2024, "text": "moment().daysInMonth();\n" }, { "code": null, "e": 2081, "s": 2049, "text": "var a = moment().days...
How can we return a tuple from a Python function?
We can return a tuple from a python function in many ways. For the given tuple, we define a function as shown below. def foo(): str = "tutorialspoint" x = 30 return (str, x); print foo() ('tutorialspoint', 30)
[ { "code": null, "e": 1180, "s": 1062, "text": "We can return a tuple from a python function in many ways. For the given tuple, we define a function as shown below." }, { "code": null, "e": 1276, "s": 1180, "text": "def foo():\n str = \"tutorialspoint\"\n x = 30\n retu...
3Sum Smaller in C++
Suppose we have an array of n integers called nums and we also have a target, we have to find the number of index triplets (i, j, k) here i, j, k all are in range 0 to n - 1 and that satisfy the condition nums[i] + nums[j] + nums[k] < target. So, if the input is like nums = [-2,0,1,3], and target = 2, then the output w...
[ { "code": null, "e": 1305, "s": 1062, "text": "Suppose we have an array of n integers called nums and we also have a target, we have to find the number of index triplets (i, j, k) here i, j, k all are in range 0 to n - 1 and that satisfy the condition nums[i] + nums[j] + nums[k] < target." }, { ...
System.exit() in Java
10 Jul, 2016 The java.lang.System.exit() method exits current program by terminating running Java virtual machine. This method takes a status code. A non-zero value of status code is generally used to indicate abnormal termination. This is similar exit in C/C++. Following is the declaration for java.lang.System.exit() ...
[ { "code": null, "e": 53, "s": 25, "text": "\n10 Jul, 2016" }, { "code": null, "e": 303, "s": 53, "text": "The java.lang.System.exit() method exits current program by terminating running Java virtual machine. This method takes a status code. A non-zero value of status code is gene...
SciPy - Linalg
SciPy is built using the optimized ATLAS LAPACK and BLAS libraries. It has very fast linear algebra capabilities. All of these linear algebra routines expect an object that can be converted into a two-dimensional array. The output of these routines is also a two-dimensional array. A scipy.linalg contains all the functi...
[ { "code": null, "e": 2303, "s": 2021, "text": "SciPy is built using the optimized ATLAS LAPACK and BLAS libraries. It has very fast linear algebra capabilities. All of these linear algebra routines expect an object that can be converted into a two-dimensional array. The output of these routines is a...
Python | Remove empty tuples from a list
04 Jul, 2022 In this article, we will see how can we remove an empty tuple from a given list of tuples. We will find various ways, in which we can perform this task of removing tuples using various methods and ways in Python. Examples: Input : tuples = [(), ('ram','15','8'), (), ('laxman', 'sita'), (...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Jul, 2022" }, { "code": null, "e": 275, "s": 52, "text": "In this article, we will see how can we remove an empty tuple from a given list of tuples. We will find various ways, in which we can perform this task of removing tuples usi...
Why React uses className over class attribute ?
26 Aug, 2021 To all the regular DOM and SVG elements like <button>, <li>, <a>, <div>, etc. , if we want to apply the CSS classes, we use className attribute instead of class in React. That’s why it warns you every time when you mistakenly write class instead of className. In fact, in earlier times before React 16, if ...
[ { "code": null, "e": 52, "s": 24, "text": "\n26 Aug, 2021" }, { "code": null, "e": 313, "s": 52, "text": "To all the regular DOM and SVG elements like <button>, <li>, <a>, <div>, etc. , if we want to apply the CSS classes, we use className attribute instead of class in React. Tha...
Java Program to Get the Size of a Directory
27 Apr, 2021 The size of files in Java can be obtained using the File class. The in-built function of ‘fileName.length()’ is used to find size of file in Bytes. The directory may contain ‘N’ number of files, for calculating the size of the directory summation of the size of all the files is required. length() Method: l...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Apr, 2021" }, { "code": null, "e": 317, "s": 28, "text": "The size of files in Java can be obtained using the File class. The in-built function of ‘fileName.length()’ is used to find size of file in Bytes. The directory may contain ‘...
JQuery | Change the text of a span element
23 May, 2019 Given an HTML document and the task is to change the text content of a <span> element. There are various methods used to change the span elements which are discussed below: jQuery text() Method: This method set/return the text content of specified elements. If this method is used to return content, it retu...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 May, 2019" }, { "code": null, "e": 201, "s": 28, "text": "Given an HTML document and the task is to change the text content of a <span> element. There are various methods used to change the span elements which are discussed below:" ...
JavaScript Project on Todo List
29 Jan, 2021 Introduction: TODO List are the lists that we generally use to maintain our day to day tasks or list of everything that we have to do, with the most important tasks at the top of the list, and the least important tasks at the bottom. It is helpful in planning our daily schedules. We can add more tasks any ...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 Jan, 2021" }, { "code": null, "e": 465, "s": 54, "text": "Introduction: TODO List are the lists that we generally use to maintain our day to day tasks or list of everything that we have to do, with the most important tasks at the to...