title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to subset one or more sub-elements of a list in R? | A list contains different type of elements and each of the them can have varying elements. To subset these sub-elements we can use sapply function and use c to subset the number of corresponding sub-elements. For example, if we have a list that contains five elements and each of those elements have ten sub-elements the... | [
{
"code": null,
"e": 1439,
"s": 1062,
"text": "A list contains different type of elements and each of the them can have varying elements. To subset these sub-elements we can use sapply function and use c to subset the number of corresponding sub-elements. For example, if we have a list that contains... |
How to add a text editor field in Django? | Many online exam taking websites use text editors for text entries. image uploading, etc. Quill text editor is very popular and it also provides a model field to directly store in database. So, you don't need to configure anything extra to save its data in database.
In this article, we will see how to make a text edito... | [
{
"code": null,
"e": 1329,
"s": 1062,
"text": "Many online exam taking websites use text editors for text entries. image uploading, etc. Quill text editor is very popular and it also provides a model field to directly store in database. So, you don't need to configure anything extra to save its data... |
WebGL - Drawing a Model | After associating the buffers with the shaders, the final step is to draw the required primitives. WebGL provides two methods namely, drawArrays() and drawElements() to draw models.
drawArrays() is the method which is used to draw models using vertices. Here is its syntax −
void drawArrays(enum mode, int first, long co... | [
{
"code": null,
"e": 2229,
"s": 2047,
"text": "After associating the buffers with the shaders, the final step is to draw the required primitives. WebGL provides two methods namely, drawArrays() and drawElements() to draw models."
},
{
"code": null,
"e": 2322,
"s": 2229,
"text": "... |
How to Increase Heap Size in Java Virtual Machine? - GeeksforGeeks | 09 Mar, 2021
There are two types of memory stack memory and heap memory. All the dynamic allocations go into heap memory and the rest of the static allocations and variables allocations go into stack memory. Whenever a java program is executed in the java virtual machine it uses the heap memory to manage the data. Task... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n09 Mar, 2021"
},
{
"code": null,
"e": 23946,
"s": 23557,
"text": "There are two types of memory stack memory and heap memory. All the dynamic allocations go into heap memory and the rest of the static allocations and variables al... |
SQL JOINs. Bringing data together one join at a... | by Randy Macaraeg | Towards Data Science | Thanks to Jeremy Chow for the clever subtitle!
The code I used for this blog can be found on my GitHub.
There are a lot of things to learn in SQL, especially for me. One of the things that took the longest time for me to understand are JOIN statements. It’s intimidating at first, but after reading and lots of practice ... | [
{
"code": null,
"e": 219,
"s": 172,
"text": "Thanks to Jeremy Chow for the clever subtitle!"
},
{
"code": null,
"e": 276,
"s": 219,
"text": "The code I used for this blog can be found on my GitHub."
},
{
"code": null,
"e": 574,
"s": 276,
"text": "There are a l... |
Angular Highcharts - 3D Pie Chart | Following is an example of a 3D Pie Chart.
We have already seen the configuration used to draw a chart in Highcharts Configuration Syntax chapter.
An example of a 3D Pie Chart is given below.
Let us now see the additional configurations/steps taken.
Configure the pie chart type to be 3D based. Options3D sets the 3D opt... | [
{
"code": null,
"e": 2078,
"s": 2035,
"text": "Following is an example of a 3D Pie Chart."
},
{
"code": null,
"e": 2182,
"s": 2078,
"text": "We have already seen the configuration used to draw a chart in Highcharts Configuration Syntax chapter."
},
{
"code": null,
"e"... |
How to select only one Radiobutton in Tkinter? | To implement the selection for one or more options, we can use the Radiobutton widget. The Radiobutton widget in Tkinter allows the user to make a selection for only one option from a set of given choices. The Radiobutton has only two Boolean values: True or False.
If we want to get the output to check which option the... | [
{
"code": null,
"e": 1328,
"s": 1062,
"text": "To implement the selection for one or more options, we can use the Radiobutton widget. The Radiobutton widget in Tkinter allows the user to make a selection for only one option from a set of given choices. The Radiobutton has only two Boolean values: Tr... |
Bootstrap - Alert Plugin | Alert messages are mostly used to display information such as warning or confirmation messages to the end users. Using alert message plugin you can add dismiss functionality to all alert messages.
You can enable dismissal of an alert in the following two ways −
Via data attributes − To dismiss via Data API just add dat... | [
{
"code": null,
"e": 3528,
"s": 3331,
"text": "Alert messages are mostly used to display information such as warning or confirmation messages to the end users. Using alert message plugin you can add dismiss functionality to all alert messages."
},
{
"code": null,
"e": 3593,
"s": 3528... |
Python Numpy and Matrices Questions for Data Scientists | by Leihua Ye, PhD | Towards Data Science | The complete Python code is available on my Github.
I’ve been preparing for Data Science interviews for a while, and there is one thing that struck me the most is the lack of preparation for Numpy and Matrices questions.
Often, Data Scientists are asked to perform simple matrix operations in Python, which should be str... | [
{
"code": null,
"e": 224,
"s": 172,
"text": "The complete Python code is available on my Github."
},
{
"code": null,
"e": 393,
"s": 224,
"text": "I’ve been preparing for Data Science interviews for a while, and there is one thing that struck me the most is the lack of preparation... |
Implementing a custom function like Array.prototype.filter() function in JavaScript | We are required to write a JavaScript function that lives on the prototype Object of the Array class.
Our function should take in a callback function as the only argument. This callback function should be called for each element of the array.
And that callback function should take in two arguments the corresponding ele... | [
{
"code": null,
"e": 1164,
"s": 1062,
"text": "We are required to write a JavaScript function that lives on the prototype Object of the Array class."
},
{
"code": null,
"e": 1305,
"s": 1164,
"text": "Our function should take in a callback function as the only argument. This callb... |
Redis - Connection Auth Command | Redis AUTH command is used to authenticate to the server with the given password. If the password matches the password in the configuration file, the server replies with the OK status code and starts accepting commands. Otherwise, an error is returned and the clients needs to try a new password.
String reply.
Following... | [
{
"code": null,
"e": 2342,
"s": 2045,
"text": "Redis AUTH command is used to authenticate to the server with the given password. If the password matches the password in the configuration file, the server replies with the OK status code and starts accepting commands. Otherwise, an error is returned a... |
Operations Research — what, when and how | by Aerin Kim | Towards Data Science | The (somewhat vague) term “Operations Research” was coined during World War I. The British military brought together a group of scientists to allocate insufficient resources — for example, food, medics, weapons, troops, etc. — in the most effective way possible to different military operations. So the term “operations”... | [
{
"code": null,
"e": 676,
"s": 172,
"text": "The (somewhat vague) term “Operations Research” was coined during World War I. The British military brought together a group of scientists to allocate insufficient resources — for example, food, medics, weapons, troops, etc. — in the most effective way po... |
How to use BERT from the Hugging Face transformer library | by Saketh Kotamraju | Towards Data Science | In this article, I will demonstrate how to use BERT using the Hugging Face Transformer library for four important tasks. I will also show you how you can configure BERT for any task that you may want to use it for, besides just the standard tasks that it was designed to solve.
Note that this article was written in Janu... | [
{
"code": null,
"e": 450,
"s": 172,
"text": "In this article, I will demonstrate how to use BERT using the Hugging Face Transformer library for four important tasks. I will also show you how you can configure BERT for any task that you may want to use it for, besides just the standard tasks that it ... |
JavaScript Array toSource() Method | Javascript array toSource() method returns a string representing the source code of the array. This method is supported by Mozilla.
Its syntax is as follows −
array.toSource();
Here is the detail of parameters −
NA
NA
Returns a string representing the source code of the array.
<html>
<head>
<title>JavaScript... | [
{
"code": null,
"e": 2599,
"s": 2466,
"text": "Javascript array toSource() method returns a string representing the source code of the array. This method is supported by Mozilla."
},
{
"code": null,
"e": 2626,
"s": 2599,
"text": "Its syntax is as follows −"
},
{
"code": ... |
Check if a given graph is tree or not | In this problem, one undirected graph is given, we have to check the graph is tree or not. We can simply find it by checking the criteria of a tree. A tree will not contain a cycle, so if there is any cycle in the graph, it is not a tree.
We can check it using another approach, if the graph is connected and it has V-1 ... | [
{
"code": null,
"e": 1301,
"s": 1062,
"text": "In this problem, one undirected graph is given, we have to check the graph is tree or not. We can simply find it by checking the criteria of a tree. A tree will not contain a cycle, so if there is any cycle in the graph, it is not a tree."
},
{
... |
Finding a particular value in internal table itab in ABAP | you can use a READ statement in combination with TRANSPORTING NO FIELDS. This will skip the values to be transferred to the work area and avoid the loop. Here is an example:
READ TABLE itab WITH KEY FIELD = 'ABC' TRANSPORTING NO FIELDS.
IF SY-SUBRC = 0.
"Field Match.”
ENDIF. | [
{
"code": null,
"e": 1236,
"s": 1062,
"text": "you can use a READ statement in combination with TRANSPORTING NO FIELDS. This will skip the values to be transferred to the work area and avoid the loop. Here is an example:"
},
{
"code": null,
"e": 1338,
"s": 1236,
"text": "READ TAB... |
Construct an array whose Prefix XOR array starting from X is an N-length increasing sequence - GeeksforGeeks | 09 Dec, 2021
Given two integers N and X, the task is to generate an array of size N, such that the prefix xor array of X with the generated array will be permutations of 1st N natural numbers.
Examples:
Input: N = 4, X = 3Output: [2, 3, 1, 7]Explanation: Prefix XOR array for the array {2, 3, 1, 7} is as follows:
X ⊕ 2... | [
{
"code": null,
"e": 24429,
"s": 24401,
"text": "\n09 Dec, 2021"
},
{
"code": null,
"e": 24609,
"s": 24429,
"text": "Given two integers N and X, the task is to generate an array of size N, such that the prefix xor array of X with the generated array will be permutations of 1st N ... |
Instruction type MOV r1, r2 in 8085 Microprocessor | In 8085 Instruction set, MOV is a mnemonic, which stands for “MOVe”. In this instruction 8-bit data value in register r2 will be moved to the 8-bit register r1. Note that in 8085 instructions, as the first operand specifies the destination, and the second one the source, so here also r1 is destination register and r2 i... | [
{
"code": null,
"e": 1534,
"s": 1062,
"text": "In 8085 Instruction set, MOV is a mnemonic, which stands for “MOVe”. In this instruction 8-bit data value in register r2 will be moved to the 8-bit register r1. Note that in 8085 instructions, as the first operand specifies the destination, and the seco... |
How to create a new Azure resource group using PowerShell? | Azure Resource Group is a container that stores the resources like Virtual Machines, Storage, IP addresses, etc. To create a new Azure Resource group, we need to use the New-AZResourceGroup command.
To use this cmdlet, you first need to connect to the Azure account, and then if you want to create a resource group for t... | [
{
"code": null,
"e": 1261,
"s": 1062,
"text": "Azure Resource Group is a container that stores the resources like Virtual Machines, Storage, IP addresses, etc. To create a new Azure Resource group, we need to use the New-AZResourceGroup command."
},
{
"code": null,
"e": 1447,
"s": 12... |
8 Effective Tips to Increase Productivity as a Developer - GeeksforGeeks | 04 Jul, 2020
Being productive at something we all struggle with at some point in our career. As a developer when we start working for a company or a client, most of us get obsessed with coding. We spend a lot of time in front of the computer screen writing the code, fixing the bug, reading about the technical stuff, an... | [
{
"code": null,
"e": 25952,
"s": 25924,
"text": "\n04 Jul, 2020"
},
{
"code": null,
"e": 26489,
"s": 25952,
"text": "Being productive at something we all struggle with at some point in our career. As a developer when we start working for a company or a client, most of us get obse... |
Find permutation of [1, N] such that (arr[i] != i+1) and sum of absolute difference between arr[i] and (i+1) is minimum - GeeksforGeeks | 17 Jul, 2021
Given a positive integer N, the task is to find the permutation of the first N natural numbers, say arr[] such that (arr[i] != i + 1) and the sum of the absolute difference between arr[i] and (i + 1) is minimum.
Examples:
Input: N = 4Output: 2 1 4 3Explanation:Consider the permutation {2, 1, 4, 3}, Now, th... | [
{
"code": null,
"e": 26537,
"s": 26509,
"text": "\n17 Jul, 2021"
},
{
"code": null,
"e": 26749,
"s": 26537,
"text": "Given a positive integer N, the task is to find the permutation of the first N natural numbers, say arr[] such that (arr[i] != i + 1) and the sum of the absolute d... |
Convert String to Long in Python - GeeksforGeeks | 28 Jul, 2020
Python defines type conversion functions to directly convert one data type to another. This article is aimed at providing information about converting a string to long.
A long is an integer type value that has unlimited length. By converting a string into long we are translating the value of string type to... | [
{
"code": null,
"e": 25665,
"s": 25637,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 25834,
"s": 25665,
"text": "Python defines type conversion functions to directly convert one data type to another. This article is aimed at providing information about converting a string to ... |
Multi Label Intent Classification | by Priyanka Jain | Towards Data Science | There are a lot of applications that require text classification or we can say intent classification. Nowadays, everything is required to be categorized like contents, products are often tagged by category.
However, the vast majority of text classification articles and tutorials on the internet are binary text classifi... | [
{
"code": null,
"e": 378,
"s": 171,
"text": "There are a lot of applications that require text classification or we can say intent classification. Nowadays, everything is required to be categorized like contents, products are often tagged by category."
},
{
"code": null,
"e": 753,
"s... |
How to append an text message when an input field is modified in jQuery ? - GeeksforGeeks | 25 Mar, 2021
In this article, we will see how to append an element with a text message when an input field is changed in jQuery. To append an element with a text message when the input field is changed, change() and appendTo() methods are used. The change() method is used to detect the change in the value of input fiel... | [
{
"code": null,
"e": 27064,
"s": 27036,
"text": "\n25 Mar, 2021"
},
{
"code": null,
"e": 27504,
"s": 27064,
"text": "In this article, we will see how to append an element with a text message when an input field is changed in jQuery. To append an element with a text message when t... |
Basic DateTime Operations in Python | by Munia Humaira | Towards Data Science | Sometimes dealing with data containing date and time can be tedious job to do, thankfully there is this built in way to help us with the work. Python provides a datetime module that enables us to manipulate date and time in many ways.
We need to look at five main object classes in this module, which we will eventually ... | [
{
"code": null,
"e": 406,
"s": 171,
"text": "Sometimes dealing with data containing date and time can be tedious job to do, thankfully there is this built in way to help us with the work. Python provides a datetime module that enables us to manipulate date and time in many ways."
},
{
"code"... |
pandas.crosstab() function in Python - GeeksforGeeks | 14 Aug, 2020
This method is used to compute a simple cross-tabulation of two (or more) factors. By default, computes a frequency table of the factors unless an array of values and an aggregation function are passed.
Syntax: pandas.crosstab(index, columns, values=None, rownames=None, colnames=None, aggfunc=None, margins... | [
{
"code": null,
"e": 24415,
"s": 24387,
"text": "\n14 Aug, 2020"
},
{
"code": null,
"e": 24618,
"s": 24415,
"text": "This method is used to compute a simple cross-tabulation of two (or more) factors. By default, computes a frequency table of the factors unless an array of values ... |
Colors and gradients in bootstrap with examples - GeeksforGeeks | 27 Apr, 2022
Bootstrap provides various classes to apply color properties to various elements. Create an HTML file with the CDN links to Jquery and Bootstrap.
HTML
<!doctype html><html lang="en"><head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, ... | [
{
"code": null,
"e": 28538,
"s": 28510,
"text": "\n27 Apr, 2022"
},
{
"code": null,
"e": 28684,
"s": 28538,
"text": "Bootstrap provides various classes to apply color properties to various elements. Create an HTML file with the CDN links to Jquery and Bootstrap."
},
{
"co... |
bin() in Python | The bin() function converts a decimal to binary. You can use a positive or negative integer as the parameter to be converted.
Below is the syntax of the function.
bin(n)
Parameters : an integer to convert
Return Value : A binary string of an integer or int object.
Exceptions : Raises TypeError when a float value is sen... | [
{
"code": null,
"e": 1188,
"s": 1062,
"text": "The bin() function converts a decimal to binary. You can use a positive or negative integer as the parameter to be converted."
},
{
"code": null,
"e": 1225,
"s": 1188,
"text": "Below is the syntax of the function."
},
{
"code... |
p5.js | noStroke() Function | 24 Oct, 2018
The noStroke() function is an inbuilt function in p5.js which is used to remove the outline which is used to draw lines and borders around shapes. By default, black color stroke is set to shapes.
Syntax:
noStroke()
Parameters: This function does not accepts any parameter.
Below program illustrates the noSt... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Oct, 2018"
},
{
"code": null,
"e": 248,
"s": 52,
"text": "The noStroke() function is an inbuilt function in p5.js which is used to remove the outline which is used to draw lines and borders around shapes. By default, black color str... |
C# | Thread Priority in Multithreading | 24 Jan, 2019
In a Multithreading environment, each thread has their own priority. A thread’s priority shows how frequently a thread gains the access to CPU resources. Whenever we create a thread in C#, it always has some priority assigned to it.
Important Points:
A programmer can explicitly assign priority to a thread.... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 Jan, 2019"
},
{
"code": null,
"e": 285,
"s": 52,
"text": "In a Multithreading environment, each thread has their own priority. A thread’s priority shows how frequently a thread gains the access to CPU resources. Whenever we create a... |
How to Create Dynamic PDF Viewer in Android with Firebase? | 15 Jan, 2021
If you are creating apps for students or for educational purposes then you need to add some PDF files for displaying some data inside our app. These PDF files are updated on regular basis. For loading this PDF from the server we prefer to use PDF Viewer which will load the PDF from the URL in Android. Insi... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n15 Jan, 2021"
},
{
"code": null,
"e": 814,
"s": 28,
"text": "If you are creating apps for students or for educational purposes then you need to add some PDF files for displaying some data inside our app. These PDF files are updated on r... |
Scala | Annotation | 08 Apr, 2019
Scala Annotations are metadata added to the program source code. Annotations are allowed on any kind of definition or declaration including vals, vars, classes, objects, traits, defs and types. Annotations are used to associate meta-information with definitions.Syntax:
@annot(exp_{1}, exp_{2}, ...) {val na... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Apr, 2019"
},
{
"code": null,
"e": 298,
"s": 28,
"text": "Scala Annotations are metadata added to the program source code. Annotations are allowed on any kind of definition or declaration including vals, vars, classes, objects, trait... |
Lexical Scoping vs Dynamic Scoping in R Programming | 03 Sep, 2021
R is an open-source programming language that is widely used as a statistical software and data analysis tool. R generally comes with the Command-line interface. R is available across widely used platforms like Windows, Linux, and macOS. Also, the R programming language is the latest cutting-edge tool. Sco... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Sep, 2021"
},
{
"code": null,
"e": 478,
"s": 28,
"text": "R is an open-source programming language that is widely used as a statistical software and data analysis tool. R generally comes with the Command-line interface. R is availabl... |
TCS Placement Paper | Email Writing Question 6 | 21 May, 2019
Pre-requisite: Procedure to E-mail WritingThis is a TCS model placement email-writing question. It covers the important directions along with a sample solution to the question.
Directions:
Use all the phrases given.Minimum words should be 50 otherwise your email cannot be validated.Addressing and signing s... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 May, 2019"
},
{
"code": null,
"e": 229,
"s": 52,
"text": "Pre-requisite: Procedure to E-mail WritingThis is a TCS model placement email-writing question. It covers the important directions along with a sample solution to the questio... |
Number of ways to arrange N items under given constraints | 29 Apr, 2021
We are given N items which are of total K different colors. Items of the same color are indistinguishable and colors can be numbered from 1 to K and count of items of each color is also given as k1, k2 and so on. Now we need to arrange these items one by one under a constraint that the last item of color i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n29 Apr, 2021"
},
{
"code": null,
"e": 500,
"s": 52,
"text": "We are given N items which are of total K different colors. Items of the same color are indistinguishable and colors can be numbered from 1 to K and count of items of each co... |
SimpleScriptContext setAttribute() method in Java with Examples | 29 Jan, 2020
The setAttribute() method of a SimpleScriptContext class is used to set the value of an attribute in a given scope where the name of the attribute, the value of attribute and scope of the attribute is passed as parameters. If the scope is GLOBAL_SCOPE and there are no Bindings is set for GLOBAL_SCOPE, then... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Jan, 2020"
},
{
"code": null,
"e": 366,
"s": 28,
"text": "The setAttribute() method of a SimpleScriptContext class is used to set the value of an attribute in a given scope where the name of the attribute, the value of attribute and ... |
Web scraping from Wikipedia using Python – A Complete Guide | 30 Nov, 2021
In this article, you will learn various concepts of web scraping and get comfortable with scraping various types of websites and their data. The goal is to scrape data from the Wikipedia Home page and parse it through various web scraping techniques. You will be getting familiar with various web scraping t... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 670,
"s": 52,
"text": "In this article, you will learn various concepts of web scraping and get comfortable with scraping various types of websites and their data. The goal is to scrape data from t... |
Draw Multiple Function Curves to Same Plot in R | 30 May, 2021
In this article, we will discuss how to plot multiple function curves to the same plot in the R programming language.
Base R supports a function curve() which can be used to visualize a required function curve. It supports various parameters to edit the curve according to requirements.
Syntax: curve(expres... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 May, 2021"
},
{
"code": null,
"e": 146,
"s": 28,
"text": "In this article, we will discuss how to plot multiple function curves to the same plot in the R programming language."
},
{
"code": null,
"e": 315,
"s": 146,
... |
Python | Pandas Series.astype() to convert Data type of series | 01 Oct, 2018
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas astype() is the one of the most important methods. It is used to change data type of a... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Oct, 2018"
},
{
"code": null,
"e": 268,
"s": 54,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes im... |
Problem in comparing Floating point numbers and how to compare them correctly? | 28 Jan, 2022
In this article, we will see what is the problem in comparing floating-point numbers and we will discuss the correct way to compare two floating-point numbers. What is the problem in comparing Floating-Point Numbers usually?Let us first compare two floating-point numbers with the help of relational operato... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jan, 2022"
},
{
"code": null,
"e": 402,
"s": 52,
"text": "In this article, we will see what is the problem in comparing floating-point numbers and we will discuss the correct way to compare two floating-point numbers. What is the pr... |
Python | os.getppid() method | 22 May, 2019
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system dependent functionality.
os.getppid() method in Python is used to get the parent process ID of the current proces... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 May, 2019"
},
{
"code": null,
"e": 247,
"s": 28,
"text": "OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of usin... |
How to Title Case a sentence in JavaScript? | It is nothing but converting first element of all the words in a sentence in to uppercase while the other elements remain in lowercase. The provided string(sentence) may contains a bunch of lowercase and uppercase elements. So we need an algorithm to Title Case the provided string.
Divide all the words in the sentence ... | [
{
"code": null,
"e": 1470,
"s": 1187,
"text": "It is nothing but converting first element of all the words in a sentence in to uppercase while the other elements remain in lowercase. The provided string(sentence) may contains a bunch of lowercase and uppercase elements. So we need an algorithm to Ti... |
Python Program to find transpose of a matrix | 23 Jun, 2022
Transpose of a matrix is obtained by changing rows to columns and columns to rows. In other words, transpose of A[][] is obtained by changing A[i][j] to A[j][i].
For Square Matrix: The below program finds transpose of A[][] and stores the result in B[][], we can change N for different dimension.
Python3
... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 216,
"s": 53,
"text": "Transpose of a matrix is obtained by changing rows to columns and columns to rows. In other words, transpose of A[][] is obtained by changing A[i][j] to A[j][i]. "
},
{
... |
numpy.triu() in Python | 09 Mar, 2022
numpy.triu(a, k = 0) : Returns copy of array with upper part of the triangle w.r.t kParameters :
a : input array
k : [int, optional, 0 by default]
Diagonal we require; k>0 means diagonal above main diagonal or vice versa.
Returns :
Upper triangle of a, having same shape and data-type as a.
# Pyt... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Mar, 2022"
},
{
"code": null,
"e": 125,
"s": 28,
"text": "numpy.triu(a, k = 0) : Returns copy of array with upper part of the triangle w.r.t kParameters :"
},
{
"code": null,
"e": 261,
"s": 125,
"text": "a : input... |
Python | Sum values for each key in nested dictionary | 14 May, 2020
Given a nested dictionary and we have to find sum of particular value in that nested dictionary. This is basically useful in cases where we are given a JSON object or we have scraped a particular page and we want to sum the value of a particular attribute in objects.
Code #1: Find sum of sharpness values u... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 May, 2020"
},
{
"code": null,
"e": 296,
"s": 28,
"text": "Given a nested dictionary and we have to find sum of particular value in that nested dictionary. This is basically useful in cases where we are given a JSON object or we have ... |
Python program to find uncommon words from two Strings | 21 Aug, 2020
Given two sentences as strings A and B. The task is to return a list of all uncommon words. A word is uncommon if it appears exactly once in any one of the sentences, and does not appear in the other sentence.
Note: A sentence is a string of space-separated words. Each word consists only of lowercase lette... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Aug, 2020"
},
{
"code": null,
"e": 262,
"s": 52,
"text": "Given two sentences as strings A and B. The task is to return a list of all uncommon words. A word is uncommon if it appears exactly once in any one of the sentences, and doe... |
Optimal Storage on Tapes | 21 May, 2021
Given programs stored on a computer tape and length of each program is where , find the order in which the programs should be stored in the tape for which the Mean Retrieval Time (MRT given as ) is minimized.Example:
Input : n = 3
L[] = { 5, 3, 10 }
Output : Order should be { 3, 5, 10 } with MRT ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 May, 2021"
},
{
"code": null,
"e": 271,
"s": 52,
"text": "Given programs stored on a computer tape and length of each program is where , find the order in which the programs should be stored in the tape for which the Mean Retrieval ... |
What is Zed Attack Proxy? | 14 Jun, 2022
Zed Attack Proxy is an open-source security software written in Java programming language and released in 2010. It is used to scan web applications and find vulnerabilities in it. It was started as a small project by the Open Web Application Security Project (OWASP) and now it is the most active project ma... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 664,
"s": 52,
"text": "Zed Attack Proxy is an open-source security software written in Java programming language and released in 2010. It is used to scan web applications and find vulnerabilities i... |
ReactJS | Introduction to JSX | 14 Jan, 2021
We had already stated in our article on Introduction to ReactJS that React is a declarative, efficient, and flexible JavaScript library for building user interfaces. But instead of using regular JavaScript, React code should be written in something called JSX. Let us see a sample JSX code:
const ele = <h1... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n14 Jan, 2021"
},
{
"code": null,
"e": 345,
"s": 53,
"text": "We had already stated in our article on Introduction to ReactJS that React is a declarative, efficient, and flexible JavaScript library for building user interfaces. But inst... |
Python Plotly – How to customize legend? | 04 Jan, 2022
In plotly, we can customize the legend by changing order, changing orientation, we can either hide or show the legend and other modifications like increasing size, changing font and colour of the legend. In this article let’s see the different ways in which we can customise the legend.
To customize legend ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Jan, 2022"
},
{
"code": null,
"e": 315,
"s": 28,
"text": "In plotly, we can customize the legend by changing order, changing orientation, we can either hide or show the legend and other modifications like increasing size, changing fo... |
Recursive sum of digits of a number is prime or not | 28 Apr, 2021
Given a number n, we need to find the sum of each digits of the number till the number becomes a single digit. We need to print “yes” if the sum is a prime or “no” if it is not prime.
Examples:
Input : 5602
Output: No
Explanation:
Step 1- 5+6+0+2 = 13
Step 2- 1+3 = 4
4 is not prime
Input : 56
Output : ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 237,
"s": 52,
"text": "Given a number n, we need to find the sum of each digits of the number till the number becomes a single digit. We need to print “yes” if the sum is a prime or “no” if it is n... |
Types of URL | 27 Nov, 2020
URL stands for Uniform Resource Locator. Any internet location available on server is called a web URL, web address or website. Each website or webpage has a unique address called URL. e.g., the website of geeksforgeeks website has an address or URL called https://www.geeksforgeeks.org/
type: It specifies ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n27 Nov, 2020"
},
{
"code": null,
"e": 341,
"s": 53,
"text": "URL stands for Uniform Resource Locator. Any internet location available on server is called a web URL, web address or website. Each website or webpage has a unique address c... |
GATE | GATE-CS-2000 | Question 47 | 28 Jun, 2021
Given the following relation instance.
x y z
1 4 2
1 5 3
1 6 3
3 2 2
Which of the following functional dependencies are satisfied by the instance? (GATE CS 2000)(A) XY -> Z and Z -> Y(B) YZ -> X and Y -> Z(C) YZ -> X and X -> Z(D) XZ -> Y and Y -> XAnswer: (B)Explanation: See question 2 of http... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 67,
"s": 28,
"text": "Given the following relation instance."
},
{
"code": null,
"e": 109,
"s": 67,
"text": "x y z\n1 4 2\n1 5 3\n1 6 3\n3 2 2 "
},
{
"code": n... |
What is an event loop in JavaScript ? | 06 Oct, 2021
JavaScript is a single-threaded synchronous programming language. But what does it actually mean? What is this event loop in JavaScript that we all keep talking about?
What does it actually mean when we say JavaScript is single threaded?
It means that the main thread where JavaScript code is run, runs in ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Oct, 2021"
},
{
"code": null,
"e": 221,
"s": 52,
"text": "JavaScript is a single-threaded synchronous programming language. But what does it actually mean? What is this event loop in JavaScript that we all keep talking about? "
},... |
Number of jumps for a thief to cross walls | Difficulty Level :
Easy
A thief trying to escape from a jail. He has to cross N walls each with varying heights (every height is greater than 0). He climbs X feet every time. But, due to the slippery nature of those walls, every time he slips back by Y feet. Now the task is to calculate the total number of jumps requir... | [
{
"code": null,
"e": 24,
"s": 0,
"text": "Difficulty Level :\nEasy"
},
{
"code": null,
"e": 380,
"s": 24,
"text": "A thief trying to escape from a jail. He has to cross N walls each with varying heights (every height is greater than 0). He climbs X feet every time. But, due to th... |
Find Missing And Repeating | Practice | GeeksforGeeks | Given an unsorted array Arr of size N of positive integers. One number 'A' from set {1, 2, ...N} is missing and one number 'B' occurs twice in array. Find these two numbers.
Example 1:
Input:
N = 2
Arr[] = {2, 2}
Output: 2 1
Explanation: Repeating number is 2 and
smallest positive missing number is 1.
Example 2:
Inpu... | [
{
"code": null,
"e": 412,
"s": 238,
"text": "Given an unsorted array Arr of size N of positive integers. One number 'A' from set {1, 2, ...N} is missing and one number 'B' occurs twice in array. Find these two numbers."
},
{
"code": null,
"e": 423,
"s": 412,
"text": "Example 1:"
... |
How to play YouTube videos in my Android application using Kotlin? | This example demonstrates how to play YouTube videos in my Android application using Kotlin.
Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.
Step 2 − Add the following code to res/layout/activity_main.xml.
<?xml version="1.0" encoding="utf... | [
{
"code": null,
"e": 1280,
"s": 1187,
"text": "This example demonstrates how to play YouTube videos in my Android application using Kotlin."
},
{
"code": null,
"e": 1409,
"s": 1280,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all re... |
What is the difference between echo, print, and print_r in PHP? | 12 Dec, 2018
echo: echo is not a function rather it is described as a language construct. It accepts an list of argument (multiple arguments can be passed) and returns no value or returns void. It cannot be used as a variable function in PHP. It is used to display the output of parameters that is passed to it. It displ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n12 Dec, 2018"
},
{
"code": null,
"e": 416,
"s": 53,
"text": "echo: echo is not a function rather it is described as a language construct. It accepts an list of argument (multiple arguments can be passed) and returns no value or returns... |
Difference Between Object And Class | 31 May, 2022
Class is a detailed description, the definition, and the template of what an object will be. But it is not the object itself. Also, what we call, a class is the building block that leads to Object-Oriented Programming. It is a user-defined data type, that holds its own data members and member functions, wh... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 May, 2022"
},
{
"code": null,
"e": 921,
"s": 52,
"text": "Class is a detailed description, the definition, and the template of what an object will be. But it is not the object itself. Also, what we call, a class is the building bloc... |
Maximum number of tiles required to cover the floor of given size using 2x1 size tiles - GeeksforGeeks | 28 Feb, 2022
Given a floor of size MxN size and tiles of size 2×1, the task is to find the maximum number of tiles required to cover the floor as much as possible of size MxN size.Note: A tile can either be placed horizontally or vertically and no two tiles should overlap.
Examples:
Input: M = 2, N = 4Output: 4Explanat... | [
{
"code": null,
"e": 24963,
"s": 24935,
"text": "\n28 Feb, 2022"
},
{
"code": null,
"e": 25224,
"s": 24963,
"text": "Given a floor of size MxN size and tiles of size 2×1, the task is to find the maximum number of tiles required to cover the floor as much as possible of size MxN s... |
How do I center the text in a Tkinter Text widget? | Tkinter text widget is a multiline text input widget. It is used to insert, delete, and add textual data in the input field. It provides many built-in functions and attributes in its widget class.
To configure and align the text at the CENTER of a Tkinter Text widget, we can use justify=CENTER property.
# Import the re... | [
{
"code": null,
"e": 1259,
"s": 1062,
"text": "Tkinter text widget is a multiline text input widget. It is used to insert, delete, and add textual data in the input field. It provides many built-in functions and attributes in its widget class."
},
{
"code": null,
"e": 1367,
"s": 1259... |
How to control the border of a bar patch in matplotlib? | To control the border of a bar patch in matplotlib, we can take the following steps
Set the figure size and adjust the padding between and around the subplots.
Set the figure size and adjust the padding between and around the subplots.
Create a list of heights and a tuple for labels.
Create a list of heights and a tupl... | [
{
"code": null,
"e": 1146,
"s": 1062,
"text": "To control the border of a bar patch in matplotlib, we can take the following steps"
},
{
"code": null,
"e": 1222,
"s": 1146,
"text": "Set the figure size and adjust the padding between and around the subplots."
},
{
"code": ... |
What is the importance of a Cursor class in Java? | A Cursor is a subclass of Object class and it can be defined as point or indicator on the screen. A Cursor is used to select the input from the system that the user operates with the mouse. Different types of cursors available in the Cursor class are DEFAULT_CURSOR, CROSSHAIR_CURSOR, HAND_CURSOR, TEXT_CURSOR, WAIT_CURS... | [
{
"code": null,
"e": 1529,
"s": 1062,
"text": "A Cursor is a subclass of Object class and it can be defined as point or indicator on the screen. A Cursor is used to select the input from the system that the user operates with the mouse. Different types of cursors available in the Cursor class are DE... |
Tryit Editor v3.7 | Tryit: HTML empty canvas | [] |
Find XOR sum of Bitwise AND of all pairs from given two Arrays - GeeksforGeeks | 16 Sep, 2021
Given two arrays A and B of sizes N and M respectively, the task is to calculate the XOR sum of bitwise ANDs of all pairs of A and B
Examples:
Input: A={3, 5}, B={2, 3}, N=2, M=2Output:0Explanation:The answer is (3&2)^(3&3)^(5&2)^(5&3)=1^3^0^2=0.
Input: A={1, 2, 3}, B={5, 6}, N=3, M=2Output:0
Naive Approac... | [
{
"code": null,
"e": 24431,
"s": 24403,
"text": "\n16 Sep, 2021"
},
{
"code": null,
"e": 24564,
"s": 24431,
"text": "Given two arrays A and B of sizes N and M respectively, the task is to calculate the XOR sum of bitwise ANDs of all pairs of A and B"
},
{
"code": null,
... |
gRPC - Send/Receive Metadata | gRPC supports sending metadata. The metadata is basically a set of data we want to send that is not part of the business logic, while making gRPC calls.
Let us look at the following two cases −
The Client sends Metadata and the Server reads it.
The Server sends Metadata and Client reads it.
We will go through both thes... | [
{
"code": null,
"e": 1990,
"s": 1837,
"text": "gRPC supports sending metadata. The metadata is basically a set of data we want to send that is not part of the business logic, while making gRPC calls."
},
{
"code": null,
"e": 2031,
"s": 1990,
"text": "Let us look at the following ... |
How to create a thread by using anonymous class in Java? | A Thread is a functionality which can be executed simultaneously with the other part of the program. All Java programs have at least one thread, known as the main thread, which is created by the Java Virtual Machine (JVM) at the program start when the main() method is invoked with the main thread.
In Java, we can creat... | [
{
"code": null,
"e": 1361,
"s": 1062,
"text": "A Thread is a functionality which can be executed simultaneously with the other part of the program. All Java programs have at least one thread, known as the main thread, which is created by the Java Virtual Machine (JVM) at the program start when the m... |
Guava - Optional Class | Optional is an immutable object used to contain a not-null object. Optional object is used to represent null with absent value. This class has various utility methods to facilitate the code to handle values as available or not available instead of checking null values.
Following is the declaration for com.google.common... | [
{
"code": null,
"e": 2155,
"s": 1885,
"text": "Optional is an immutable object used to contain a not-null object. Optional object is used to represent null with absent value. This class has various utility methods to facilitate the code to handle values as available or not available instead of check... |
Tcl - Namespaces | Namespace is a container for set of identifiers that is used to group variables and procedures. Namespaces are available from Tcl version 8.0. Before the introduction of the namespaces, there was single global scope. Now with namespaces, we have additional partitions of global scope.
Namespaces are created using the na... | [
{
"code": null,
"e": 2486,
"s": 2201,
"text": "Namespace is a container for set of identifiers that is used to group variables and procedures. Namespaces are available from Tcl version 8.0. Before the introduction of the namespaces, there was single global scope. Now with namespaces, we have additio... |
5 Lesser-Known Python Libraries for Your Next NLP Project | by Michael Markin | Towards Data Science | When I first began reading on Medium, my favorite types of articles were ones that introduced me to new Python libraries. Several of the libraries I’ve learned about are now part of my everyday projects.
To pass it forward, I wanted to share a collection of 5 awesome Python libraries that I’ve discovered over the past ... | [
{
"code": null,
"e": 376,
"s": 172,
"text": "When I first began reading on Medium, my favorite types of articles were ones that introduced me to new Python libraries. Several of the libraries I’ve learned about are now part of my everyday projects."
},
{
"code": null,
"e": 565,
"s": ... |
Why strcpy and strncpy are not safe to use? | 15 Jun, 2022
strcpy() function
The strcpy() function is used to copy the source string to destination string. If the buffer size of dest string is more than src string, then copy the src string to dest string with terminating NULL character. But if dest buffer is less than src then it will copy the content without term... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 72,
"s": 54,
"text": "strcpy() function"
},
{
"code": null,
"e": 484,
"s": 72,
"text": "The strcpy() function is used to copy the source string to destination string. If the buf... |
Python program to convert a byte string to a list of integers | 31 Aug, 2021
Given a byte string. The task is to write a Python program to convert this byte of string to a list of integers.
The list() function is used to create a list from the specified iterable taken as its parameter.
Syntax:
list([iterable])
Parameters: This function accepts a single parameter that is illustrate... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 168,
"s": 54,
"text": "Given a byte string. The task is to write a Python program to convert this byte of string to a list of integers. "
},
{
"code": null,
"e": 265,
"s": 168,
... |
Optum Global Solutions (United Health Group) Interview Experience for Internship | 25 Dec, 2020
Optum (United Health Group) visited the IIT Jammu campus virtually in September 2020 for hiring students for summer internship 2021. Only Computer Science Engineering students were eligible with a CGPA of 7.0 and above. Around 32 students were shortlisted for Round 1.
Round 1 (Coding Test): This test was c... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n25 Dec, 2020"
},
{
"code": null,
"e": 321,
"s": 52,
"text": "Optum (United Health Group) visited the IIT Jammu campus virtually in September 2020 for hiring students for summer internship 2021. Only Computer Science Engineering student... |
Tailwind CSS Visibility | 23 Mar, 2022
This class accepts two values in tailwind CSS. It is the alternative to the CSS visibility property. This class is used to specify whether an element is visible or not in a web document but the hidden elements take up space in the web document. Use the display property to remove or hide and delete an eleme... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Mar, 2022"
},
{
"code": null,
"e": 356,
"s": 28,
"text": "This class accepts two values in tailwind CSS. It is the alternative to the CSS visibility property. This class is used to specify whether an element is visible or not in a we... |
HTML | <hr> align Attribute | 17 Dec, 2021
The HTML <hr> align Attribute is used to specify the alignment of the horizontal line. If the width attribute is not set to 100% then the align attribute will not create any effect.Syntax:
<hr align="left | center | right">
Attribute Values:
left: It sets the left-align to horizontal line.
center: It se... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 218,
"s": 28,
"text": "The HTML <hr> align Attribute is used to specify the alignment of the horizontal line. If the width attribute is not set to 100% then the align attribute will not create any e... |
JavaScript | Strings | 07 Jun, 2022
JavaScript strings are used for storing and manipulating text. It can contain zero or more characters within quotes.
Example:
javascript
<!DOCTYPE html><html> <head> <title> JavaScript Strings </title></head> <body> <h1>GeeksforGeeks</h1> <h2>JavaScript Strings</h2> ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n07 Jun, 2022"
},
{
"code": null,
"e": 171,
"s": 53,
"text": "JavaScript strings are used for storing and manipulating text. It can contain zero or more characters within quotes. "
},
{
"code": null,
"e": 181,
"s": 171,
... |
GATE | GATE CS 2021 | Set 1 | Question 56 | 24 May, 2021
Consider the following pseudocode, where S is a semaphore initialized to 5 in line #2 and counter is a shared variable initialized to 0 in line #1. Assume that the increment operation in line #7 is not atomic.
1. int counter =0;
2. Semaphore S= init(5);
3. void parop(void)
4. {
5. wait(S);
6. ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 262,
"s": 52,
"text": "Consider the following pseudocode, where S is a semaphore initialized to 5 in line #2 and counter is a shared variable initialized to 0 in line #1. Assume that the increment ... |
How to check empty/undefined/null string in JavaScript? | 13 Aug, 2021
If we want to check any string either it is filled or empty we can use Javascript for such purpose for example : form validation. Example :
html
<!DOCTYPE HTML><html> <head> <!--function to check that name can not be empty--> <script> function checkempty(form) { if (form.name.valu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Aug, 2021"
},
{
"code": null,
"e": 170,
"s": 28,
"text": "If we want to check any string either it is filled or empty we can use Javascript for such purpose for example : form validation. Example : "
},
{
"code": null,
"... |
Level Ordering of Factors in R Programming - GeeksforGeeks | 27 Oct, 2021
In this article, we are going to see the level ordering of factors in R Programming Language.
Factors are data objects used to categorize data and store it as levels. They can store a string as well as an integer. They represent columns as they have a limited number of unique values. Factors in R can be cr... | [
{
"code": null,
"e": 24851,
"s": 24823,
"text": "\n27 Oct, 2021"
},
{
"code": null,
"e": 24945,
"s": 24851,
"text": "In this article, we are going to see the level ordering of factors in R Programming Language."
},
{
"code": null,
"e": 25291,
"s": 24945,
"text... |
How to open a binary file in append mode with Python? | "Binary" files are any files where the format isn't made up of readable characters. Binary files can range from image files like GIFs, audio files like MP3s or binary document formats like Word or PDF. To open files in binary append mode, when specifying a mode, add 'ab' to it.
f = open('my_file.mp3', 'ab')
file_conte... | [
{
"code": null,
"e": 1341,
"s": 1062,
"text": "\"Binary\" files are any files where the format isn't made up of readable characters. Binary files can range from image files like GIFs, audio files like MP3s or binary document formats like Word or PDF. To open files in binary append mode, when specify... |
Auto Logout in Linux Shell Using TMOUT Shell Variable - GeeksforGeeks | 07 Mar, 2021
TMOUT is a Linux-Unix shell variable that provides the user security for their login session in the system. It provides the “Auto Logout Functionality” for the login shell in case of no activity for a specified time.
Generally when the user leaves the Linux system idle (situation when a user doesn’t perfor... | [
{
"code": null,
"e": 24350,
"s": 24322,
"text": "\n07 Mar, 2021"
},
{
"code": null,
"e": 24567,
"s": 24350,
"text": "TMOUT is a Linux-Unix shell variable that provides the user security for their login session in the system. It provides the “Auto Logout Functionality” for the log... |
How to check first number is divisible by second one in JavaScript ? - GeeksforGeeks | 08 Dec, 2021
Given two numbers and the task is to check the first number is divisible by the second number or not with the help of JavaScript.
Before getting into the coding part, first let us know about the modulo operator and triple equals. To find a number is divisible by another or not, we simply use the reminder o... | [
{
"code": null,
"e": 24909,
"s": 24881,
"text": "\n08 Dec, 2021"
},
{
"code": null,
"e": 25039,
"s": 24909,
"text": "Given two numbers and the task is to check the first number is divisible by the second number or not with the help of JavaScript."
},
{
"code": null,
"... |
Building a Speech Translator in Python | by Behic Guven | Towards Data Science | In this post, I will show you how to translate your speech into a different language using Python. Speech translator will record your speech then understand what you are saying, and translate it to the language you prefer. After the translation process is completed you can customize your code so that it says the transl... | [
{
"code": null,
"e": 605,
"s": 171,
"text": "In this post, I will show you how to translate your speech into a different language using Python. Speech translator will record your speech then understand what you are saying, and translate it to the language you prefer. After the translation process is... |
page_source driver method – Selenium Python | 03 Dec, 2020
Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Dec, 2020"
},
{
"code": null,
"e": 768,
"s": 28,
"text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium ... |
SQL Query to Match Any Part of String | 10 Sep, 2021
SQL Pattern Matching :
It is used for searching a string or a sub-string to find certain character or group of characters from a string. We can use LIKE Operator of SQL to search sub-string. The LIKE operator is used with the WHERE Clause to search a pattern in string of column. The LIKE operator is used i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Sep, 2021"
},
{
"code": null,
"e": 51,
"s": 28,
"text": "SQL Pattern Matching :"
},
{
"code": null,
"e": 386,
"s": 51,
"text": "It is used for searching a string or a sub-string to find certain character or group ... |
Sleep Sort – The King of Laziness / Sorting while Sleeping | 14 Jun, 2022
In this algorithm we create different threads for each of the elements in the input array and then each thread sleeps for an amount of time which is proportional to the value of corresponding array element.
Hence, the thread having the least amount of sleeping time wakes up first and the number gets printe... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Jun, 2022"
},
{
"code": null,
"e": 261,
"s": 54,
"text": "In this algorithm we create different threads for each of the elements in the input array and then each thread sleeps for an amount of time which is proportional to the value... |
Consul - Quick Guide | Consul is a Hashicorp based tool for discovering and configuring a variety of different services in your infrastructure. It is based and built on Golang. One of the core reasons to build Consul was to maintain the services present in the distributed systems. Some of the significant features that Consul provides are as ... | [
{
"code": null,
"e": 2131,
"s": 1802,
"text": "Consul is a Hashicorp based tool for discovering and configuring a variety of different services in your infrastructure. It is based and built on Golang. One of the core reasons to build Consul was to maintain the services present in the distributed sys... |
Matlab M-Files - Import Data | In this chapter, we will understand how to import data from an existing m-file in MATLAB.
Consider the m-file firstmfile.m. The contents of the file are as follows −
a = 5; b = 7;
c = a + b
d = c + sin(b)
e = 5 * d
f = exp(-d)
When you execute the file, the data variables are available in the workspace, as shown below... | [
{
"code": null,
"e": 1851,
"s": 1761,
"text": "In this chapter, we will understand how to import data from an existing m-file in MATLAB."
},
{
"code": null,
"e": 1927,
"s": 1851,
"text": "Consider the m-file firstmfile.m. The contents of the file are as follows −"
},
{
"c... |
Bootstrap 4 - Modal | Modal is a child window that is layered over its parent window. It displays the content from a separate source that can have some interaction without leaving the parent window.
Create a modal by using the .modal class and attribute data-toggle = "modal" on a element, like a button or link, along with a data-target = "#... | [
{
"code": null,
"e": 1993,
"s": 1816,
"text": "Modal is a child window that is layered over its parent window. It displays the content from a separate source that can have some interaction without leaving the parent window."
},
{
"code": null,
"e": 2210,
"s": 1993,
"text": "Creat... |
How to add/merge two hash tables in PowerShell? | Adding values of the hash table is simple as the adding string. We just need to use the addition operator (+) to merge two hash table values.
Here, we have two hash tables: htableandhtable1.
$htable = [Ordered]@{EmpName="Charlie";City="New York";EmpID="001"}
$htable1 = [Ordered]@{Fruit='Apple';Color='Red'}
We will now ... | [
{
"code": null,
"e": 1204,
"s": 1062,
"text": "Adding values of the hash table is simple as the adding string. We just need to use the addition operator (+) to merge two hash table values."
},
{
"code": null,
"e": 1253,
"s": 1204,
"text": "Here, we have two hash tables: htableand... |
Tryit Editor v3.7 | CSS Grid Container
Tryit: Grid container | [
{
"code": null,
"e": 28,
"s": 9,
"text": "CSS Grid Container"
}
] |
MySQL query to select date from timestamp? | Let us first create a table. One of the column is a timestamp −
mysql> create table DemoTable
-> (
-> CustomerName varchar(100),
-> CustomerShippingDate timestamp
-> );
Query OK, 0 rows affected (0.52 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('Chris','2... | [
{
"code": null,
"e": 1126,
"s": 1062,
"text": "Let us first create a table. One of the column is a timestamp −"
},
{
"code": null,
"e": 1280,
"s": 1126,
"text": "mysql> create table DemoTable\n -> (\n -> CustomerName varchar(100),\n -> CustomerShippingDate timestamp\n -> ... |
Batch Script - TREE | This batch command displays a tree of all subdirectories of the current directory to any level of recursion or depth.
Tree
@echo off
tree
The above command will display the tree structure of the current directory. Following is an example of the output.
Folder PATH listing for volume Windows8_OS
Volume serial number i... | [
{
"code": null,
"e": 2287,
"s": 2169,
"text": "This batch command displays a tree of all subdirectories of the current directory to any level of recursion or depth."
},
{
"code": null,
"e": 2293,
"s": 2287,
"text": "Tree\n"
},
{
"code": null,
"e": 2309,
"s": 2293,... |
Can we write any code after throw statement in Java? | No, we can not place any code after throw statement, it leads to compile time error Unreachable Statement.
The throw keyword is used to throw an exception manually.
Whenever it is required to suspend the execution of the functionality based on the user-defined logical error condition, we will use this throw keyword to ... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "No, we can not place any code after throw statement, it leads to compile time error Unreachable Statement."
},
{
"code": null,
"e": 1227,
"s": 1169,
"text": "The throw keyword is used to throw an exception manually."
},
{
"co... |
Why Did Google Buy DoubleClick?. How This $3.1 Billion Acquisition... | by Tony Yiu | Towards Data Science | What gives a great company that extra oomph or spark? I’ve always been interested in exploring this. In this series of blog posts, I hope to analyze and dissect interesting tech topics from a strategic angle. And hopefully in the process we all can learn a thing or 2 about what it takes to be a great business.
Google a... | [
{
"code": null,
"e": 483,
"s": 171,
"text": "What gives a great company that extra oomph or spark? I’ve always been interested in exploring this. In this series of blog posts, I hope to analyze and dissect interesting tech topics from a strategic angle. And hopefully in the process we all can learn ... |
How to send keyboard input to a textbox on a webpage using Python Selenium webdriver? | We can send keyboard input to a textbox on a webpage in Selenium webdriver in Python using the method send_keys. The text to be entered is passed as a parameter to that method.
To perform keyboard actions, we can also use the send_keys method and then pass the class Keys.<key to be pressed> as a parameter to that metho... | [
{
"code": null,
"e": 1239,
"s": 1062,
"text": "We can send keyboard input to a textbox on a webpage in Selenium webdriver in Python using the method send_keys. The text to be entered is passed as a parameter to that method."
},
{
"code": null,
"e": 1494,
"s": 1239,
"text": "To pe... |
Strobogrammatic Number II in C++ | Suppose we have a length n. We have to find all strobogrammatic numbers that are of length n.
As we know that a strobogrammatic number is a number that looks the same when rotated 180 degrees.
So, if the input is like n = 2, then the output will be ["11","69","88","96"]
To solve this, we will follow these steps −
Defin... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "Suppose we have a length n. We have to find all strobogrammatic numbers that are of length n."
},
{
"code": null,
"e": 1255,
"s": 1156,
"text": "As we know that a strobogrammatic number is a number that looks the same when rotated 18... |
Bootstrap Button Groups | Bootstrap allows you to group a series of buttons together (on a single line) in a button group:
Use a <div> element with class .btn-group to create a button group:
Tip: Instead of applying button sizes to every button in a
group, use class .btn-group-lg|sm|xs to size all buttons in the group:
Bootstrap also support... | [
{
"code": null,
"e": 97,
"s": 0,
"text": "Bootstrap allows you to group a series of buttons together (on a single line) in a button group:"
},
{
"code": null,
"e": 167,
"s": 99,
"text": "Use a <div> element with class .btn-group to create a button group:"
},
{
"code": nul... |
How to repeat a column of a data frame and join it with another data frame in R by rows? | Suppose we have a data frame df1 that contains 5 columns and another data frame df2 that contains only column but the data type of the columns in both the data frames is same. Now we might want to add the column of the second data frame starting at the end of the rows of the first data frame by creating the same number... | [
{
"code": null,
"e": 1588,
"s": 1062,
"text": "Suppose we have a data frame df1 that contains 5 columns and another data frame df2 that contains only column but the data type of the columns in both the data frames is same. Now we might want to add the column of the second data frame starting at the ... |
How to convert an MySQL database characterset and collation to UTF-8? | Firstly, we will check which MySQL version is currently being used with the help of version()
function −
The query is as follows −
mysql> SELECT version();
The following is the output
+-----------+
| version() |
+-----------+
| 8.0.12 |
+-----------+
1 row in set (0.00 sec)
As you can see in the above output, versio... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "Firstly, we will check which MySQL version is currently being used with the help of version()\nfunction −"
},
{
"code": null,
"e": 1193,
"s": 1167,
"text": "The query is as follows −"
},
{
"code": null,
"e": 1218,
"s"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.