title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Python – Add custom values key in List of dictionaries | 01 Aug, 2020
Given a list of dictionaries, custom list and Key, add the key to each dictionary with list values in order.
Input : test_list = [{“Gfg” : 6, “is” : 9, “best” : 10}, {“Gfg” : 8, “is” : 11, “best” : 19}, {“Gfg” : 2, “is” : 16, “best” : 10}], K = “Geeks”, append_list = [6, 7, 4]Output : [{“Gfg” : 6, “is” : 9... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 137,
"s": 28,
"text": "Given a list of dictionaries, custom list and Key, add the key to each dictionary with list values in order."
},
{
"code": null,
"e": 515,
"s": 137,
"text"... |
How to use Filtering in DataGrid Component in ReactJS ? | 23 Apr, 2021
Filtering in DataGrid Component helps to view particular or related records in the data grid. DataGrid Component helps in displaying the information in a grid-like format of rows and columns. We can use the following approach in ReactJS to use Filtering in DataGrid Component.
Approach: With the help of fil... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Apr, 2021"
},
{
"code": null,
"e": 305,
"s": 28,
"text": "Filtering in DataGrid Component helps to view particular or related records in the data grid. DataGrid Component helps in displaying the information in a grid-like format of r... |
Context Manager Using @contextmanager Decorator | 11 Aug, 2021
Decorators are very powerful and useful tool in Python since it allows programmers to modify the behavior of function or class. Decorators allow us to wrap another function in order to extend the behavior of wrapped function, without permanently modifying it.
Syntax:
@decorator
def function(args):
st... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Aug, 2021"
},
{
"code": null,
"e": 289,
"s": 28,
"text": "Decorators are very powerful and useful tool in Python since it allows programmers to modify the behavior of function or class. Decorators allow us to wrap another function in... |
Perl - Variables | Variables are the reserved memory locations to store values. This means that when you create a variable you reserve some space in memory.
Based on the data type of a variable, the interpreter allocates memory and decides what can be stored in the reserved memory. Therefore, by assigning different data types to variable... | [
{
"code": null,
"e": 2492,
"s": 2354,
"text": "Variables are the reserved memory locations to store values. This means that when you create a variable you reserve some space in memory."
},
{
"code": null,
"e": 2742,
"s": 2492,
"text": "Based on the data type of a variable, the in... |
Python – Binding and Listening with Sockets | 01 Jun, 2022
Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket(node) listens on a particular port at an IP, while other socket reaches out to the other to form a connection. The server forms the listener socket while the client reaches out to the server. Note: F... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Jun, 2022"
},
{
"code": null,
"e": 391,
"s": 28,
"text": "Socket programming is a way of connecting two nodes on a network to communicate with each other. One socket(node) listens on a particular port at an IP, while other socket rea... |
Using Matplotlib with Jupyter Notebook | 04 Jul, 2022
The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and muc... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Jul, 2022"
},
{
"code": null,
"e": 934,
"s": 28,
"text": "The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses... |
Difference between JavaScript and JSP | 16 Jun, 2022
JavaScript is a lightweight and object-oriented scripting language used to create dynamic HTML pages with interactive effects within a webpage. It is an interpreted scripting language and its code is run in a web browser. It is also called a browser’s language and can be used for client-side developments a... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 543,
"s": 53,
"text": "JavaScript is a lightweight and object-oriented scripting language used to create dynamic HTML pages with interactive effects within a webpage. It is an interpreted scripting... |
Closest greater or same value on left side for every element in array | 21 Feb, 2022
Given an array of integers, find the closest (not considering the distance, but value) greater or the same value on the left of every element. If an element has no greater or same value on the left side, print -1.
Examples:
Input : arr[] = {10, 5, 11, 6, 20, 12} Output : -1, 10, -1, 10, -1, 20 The first ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Feb, 2022"
},
{
"code": null,
"e": 266,
"s": 52,
"text": "Given an array of integers, find the closest (not considering the distance, but value) greater or the same value on the left of every element. If an element has no greater or... |
Data Science | Solving Linear Equations | 01 Jun, 2022
You can go through Introduction to Data Science : Skills Required article to have some basic understanding of what Data Science is.Linear Algebra is a very fundamental part of Data Science. When one talks about Data Science, data representation becomes an important aspect of Data Science. Data is represent... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 Jun, 2022"
},
{
"code": null,
"e": 1020,
"s": 53,
"text": "You can go through Introduction to Data Science : Skills Required article to have some basic understanding of what Data Science is.Linear Algebra is a very fundamental part ... |
Flood Fill Algorithm | 01 Nov, 2021
Given a 2D screen arr[][] where each arr[i][j] is an integer representing the color of that pixel, also given the location of a pixel (X, Y) and a color C, the task is to replace the color of the given pixel and all the adjacent same-colored pixels with the given color.Example:
Input: arr[][] = { {1, 1, ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n01 Nov, 2021"
},
{
"code": null,
"e": 335,
"s": 54,
"text": "Given a 2D screen arr[][] where each arr[i][j] is an integer representing the color of that pixel, also given the location of a pixel (X, Y) and a color C, the task is to rep... |
Material Design Date Picker in Android | 23 Oct, 2020
Material Design Components (MDC Android) offers designers and developers a way to implement Material Design in their Android application. Developed by a core team of engineers and UX designers at Google, these components enable a reliable development workflow to build beautiful and functional Android appli... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Oct, 2020"
},
{
"code": null,
"e": 1130,
"s": 28,
"text": "Material Design Components (MDC Android) offers designers and developers a way to implement Material Design in their Android application. Developed by a core team of engineer... |
Wand oil_paint() function – Python | 08 Jul, 2021
The oil_paint() function is an inbuilt function in the Python Wand ImageMagick library which is used to simulate an oil painting by replace each pixel with most frequent surrounding color.
Syntax:
oil_paint(radius, sigma)
Parameters: This function accepts three parameters as mentioned above and defined ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jul, 2021"
},
{
"code": null,
"e": 218,
"s": 28,
"text": "The oil_paint() function is an inbuilt function in the Python Wand ImageMagick library which is used to simulate an oil painting by replace each pixel with most frequent surro... |
Python – Interconvert Horizontal and Vertical String | 02 Sep, 2020
Given a String, convert to vertical if horizontal and vice-versa.
Input : test_str = ‘geeksforgeeks’Output : geeksExplanation : Horizontal String converted to Vertical.
Input : test_str = geeksOutput : ‘geeks’Explanation : Vertical String converted to Horizontal.
Method #1 : [Horizontal to Vertical] using ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 118,
"s": 52,
"text": "Given a String, convert to vertical if horizontal and vice-versa."
},
{
"code": null,
"e": 221,
"s": 118,
"text": "Input : test_str = ‘geeksforgeeks’Outpu... |
Loading Data From Amazon S3 To Amazon Redshift | by Shafiqa Iqbal | Towards Data Science | In this tutorial, you walk through the process of loading data into your Amazon Redshift database tables from data files in an Amazon S3 bucket from beginning to end.
In this tutorial, you’ll do the following:
Connect to Amazon Redshift using SQL Workbench/J.
Launch an Amazon Redshift cluster and create a database tabl... | [
{
"code": null,
"e": 339,
"s": 172,
"text": "In this tutorial, you walk through the process of loading data into your Amazon Redshift database tables from data files in an Amazon S3 bucket from beginning to end."
},
{
"code": null,
"e": 382,
"s": 339,
"text": "In this tutorial, y... |
Tryit Editor v3.7 | Tryit: The traditional way - no use of variables | [] |
Kubernetes - Autoscaling | Autoscaling is one of the key features in Kubernetes cluster. It is a feature in which the cluster is capable of increasing the number of nodes as the demand for service response increases and decrease the number of nodes as the requirement decreases. This feature of auto scaling is currently supported in Google Cloud ... | [
{
"code": null,
"e": 2599,
"s": 2195,
"text": "Autoscaling is one of the key features in Kubernetes cluster. It is a feature in which the cluster is capable of increasing the number of nodes as the demand for service response increases and decrease the number of nodes as the requirement decreases. T... |
A Complete Beginners Guide to Matrix Multiplication for Data Science with Python Numpy | by GreekDataGuy | Towards Data Science | Linear algebra is the basis of machine learning from logistic regressions to deep neural networks.
If you’ve been doing data science for a while but don’t understand the math behind it, matrix multiplication is the best place to start. It’s approachable, practical, and familiarizes you with the mathematical objects of ... | [
{
"code": null,
"e": 270,
"s": 171,
"text": "Linear algebra is the basis of machine learning from logistic regressions to deep neural networks."
},
{
"code": null,
"e": 540,
"s": 270,
"text": "If you’ve been doing data science for a while but don’t understand the math behind it, ... |
Working With Command Line | In this chapter, we will learn how to make use of the command line to run test cases.
To begin with, let us open the command prompt and go to the folder where your test cases are saved. We have created test cases and saved in the folder robotframework in C Drive.
Test cases created so far are available in the folder C:... | [
{
"code": null,
"e": 2255,
"s": 2169,
"text": "In this chapter, we will learn how to make use of the command line to run test cases."
},
{
"code": null,
"e": 2433,
"s": 2255,
"text": "To begin with, let us open the command prompt and go to the folder where your test cases are sav... |
Python - Sum of Cubes in List - GeeksforGeeks | 29 Dec, 2019
Python being the language of magicians can be used to perform many tedious and repetitive tasks in a easy and concise manner and having the knowledge to utilize this tool to the fullest is always useful. One such small application can be finding sum of cubes of list in just one line. Let’s discuss certain ... | [
{
"code": null,
"e": 25058,
"s": 25030,
"text": "\n29 Dec, 2019"
},
{
"code": null,
"e": 25402,
"s": 25058,
"text": "Python being the language of magicians can be used to perform many tedious and repetitive tasks in a easy and concise manner and having the knowledge to utilize th... |
C++ Program to Implement Circular Queue | A queue is an abstract data structure that contains a collection of elements. Queue implements the FIFO mechanism i.e the element that is inserted first is also deleted first.
A circular queue is a type of queue in which the last position is connected to the first position to make a circle.
A program to implement circu... | [
{
"code": null,
"e": 1238,
"s": 1062,
"text": "A queue is an abstract data structure that contains a collection of elements. Queue implements the FIFO mechanism i.e the element that is inserted first is also deleted first."
},
{
"code": null,
"e": 1354,
"s": 1238,
"text": "A circ... |
Python File read() Method | Python file method read() reads at most size bytes from the file. If the read hits EOF before obtaining size bytes, then it reads only available bytes.
Following is the syntax for read() method −
fileObject.read( size );
size − This is the number of bytes to be read from the file.
size − This is the number of bytes to... | [
{
"code": null,
"e": 2396,
"s": 2244,
"text": "Python file method read() reads at most size bytes from the file. If the read hits EOF before obtaining size bytes, then it reads only available bytes."
},
{
"code": null,
"e": 2440,
"s": 2396,
"text": "Following is the syntax for re... |
How to use the ConvertFrom-StringData command in PowerShell?
| The ConvertFrom-String command converts the String to the Hashtable format as shown below.
PS C:\> "This is string" | ConvertFrom-String
P1 P2 P3
-- -- --
This is string
In the above example, We haven’t specified any header so that the output is separated the delimiter by space P1, P2 and continuous. By default, this c... | [
{
"code": null,
"e": 1153,
"s": 1062,
"text": "The ConvertFrom-String command converts the String to the Hashtable format as shown below."
},
{
"code": null,
"e": 1199,
"s": 1153,
"text": "PS C:\\> \"This is string\" | ConvertFrom-String"
},
{
"code": null,
"e": 1232,... |
ArrayList clone() method in Java with Examples - GeeksforGeeks | 18 Dec, 2018
The Java.util.ArrayList.clone() method is used to create a shallow copy of the mentioned array list. It just creates a copy of the list.
Syntax:
ArrayList.clone()
Parameters: This method does not take any parameters.
Return Value: This function returns a copy of the instance of Linked list.
Below program i... | [
{
"code": null,
"e": 24658,
"s": 24630,
"text": "\n18 Dec, 2018"
},
{
"code": null,
"e": 24795,
"s": 24658,
"text": "The Java.util.ArrayList.clone() method is used to create a shallow copy of the mentioned array list. It just creates a copy of the list."
},
{
"code": null... |
Bulma Background Color - GeeksforGeeks | 01 Dec, 2021
Bulma is a free and open-source CSS framework based on Flexbox. It is component-rich, compatible, and well documented. It is highly responsive in nature. It uses classes to implement its design. Background class accepts lots of value in Bulma which all the properties are covered in class form. By using thi... | [
{
"code": null,
"e": 25400,
"s": 25372,
"text": "\n01 Dec, 2021"
},
{
"code": null,
"e": 25796,
"s": 25400,
"text": "Bulma is a free and open-source CSS framework based on Flexbox. It is component-rich, compatible, and well documented. It is highly responsive in nature. It uses c... |
How to use Tooltip component in ReactJS? - GeeksforGeeks | 05 Mar, 2021
Tooltips display informative text when users hover over, focus on, or tap an element. Material UI for React has this component available for us, and it is very easy to integrate. We can use the Tooltip Component in ReactJS using the following approach.
Creating React Application And Installing Module:
Step... | [
{
"code": null,
"e": 24826,
"s": 24798,
"text": "\n05 Mar, 2021"
},
{
"code": null,
"e": 25079,
"s": 24826,
"text": "Tooltips display informative text when users hover over, focus on, or tap an element. Material UI for React has this component available for us, and it is very eas... |
How to use length () in Android sqlite? | Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you d... | [
{
"code": null,
"e": 1457,
"s": 1062,
"text": "Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the re... |
Collection vs Collections in Java with Example - GeeksforGeeks | 02 Sep, 2020
Collection: Collection is a interface present in java.util.package. It is used to represent a group of individual objects as a single unit. It is similar to the container in the C++ language. The collection is considered as the root interface of the collection framework. It provides several classes and int... | [
{
"code": null,
"e": 27876,
"s": 27848,
"text": "\n02 Sep, 2020"
},
{
"code": null,
"e": 28253,
"s": 27876,
"text": "Collection: Collection is a interface present in java.util.package. It is used to represent a group of individual objects as a single unit. It is similar to the co... |
\begin - Tex Command | \begin - is used in begin/end environment.
{ \begin }
\begin command is used in begin/end environment.
\begin{gather}a\\a+b\\a+b+c\end{gather}
aa+ba+b+c
\begin{gather}a\\a+b\\a+b+c\end{gather}
aa+ba+b+c
\begin{gather}a\\a+b\\a+b+c\end{gather}
14 Lectures
52 mins
Ashraf Said
11 Lectures
1... | [
{
"code": null,
"e": 8029,
"s": 7986,
"text": "\\begin - is used in begin/end environment."
},
{
"code": null,
"e": 8040,
"s": 8029,
"text": "{ \\begin }"
},
{
"code": null,
"e": 8089,
"s": 8040,
"text": "\\begin command is used in begin/end environment."
},... |
How to add months to a date in JavaScript? | To add months to a JavaScript Date, use the setMonth() method. JavaScript date setMonth() method sets the months for a specified date according to local time.
You can try to run the following code to add 2 months.
<html>
<head>
<title>JavaScript setMonth Method</title>
</head>
<body>
<script>
... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "To add months to a JavaScript Date, use the setMonth() method. JavaScript date setMonth() method sets the months for a specified date according to local time."
},
{
"code": null,
"e": 1276,
"s": 1221,
"text": "You can try to run the ... |
What are the Rules of Regular Expressions in Compiler Design? | The language accepted by finite automata can be simply defined by simple expressions known as Regular Expressions. It is an effective approach to describe any language. A regular expression can also be represented as a sequence of patterns that represent a string. Regular expressions are used to connect character seque... | [
{
"code": null,
"e": 1487,
"s": 1062,
"text": "The language accepted by finite automata can be simply defined by simple expressions known as Regular Expressions. It is an effective approach to describe any language. A regular expression can also be represented as a sequence of patterns that represen... |
MultiClass Classification Using K-Nearest Neighbours | by Vatsal Sheth | Towards Data Science | INTRODUCTION:
Classification is a classic machine learning application. Classification basically categorises your output in two classes i.e. your output can be one of two things. For example, a bank wants to know whether a customer will be able pay his/her monthly investments or not? We can use machine learning algorit... | [
{
"code": null,
"e": 185,
"s": 171,
"text": "INTRODUCTION:"
},
{
"code": null,
"e": 697,
"s": 185,
"text": "Classification is a classic machine learning application. Classification basically categorises your output in two classes i.e. your output can be one of two things. For exa... |
ASP.NET MVC - Data Annotations | DataAnnotations is used to configure your model classes, which will highlight the most commonly needed configurations. DataAnnotations are also understood by a number of .NET applications, such as ASP.NET MVC, which allows these applications to leverage the same annotations for client-side validations. DataAnnotation a... | [
{
"code": null,
"e": 2640,
"s": 2269,
"text": "DataAnnotations is used to configure your model classes, which will highlight the most commonly needed configurations. DataAnnotations are also understood by a number of .NET applications, such as ASP.NET MVC, which allows these applications to leverage... |
Go - Functions | A function is a group of statements that together perform a task. Every Go program has at least one function, which is main(). You can divide your code into separate functions. How you divide your code among different functions is up to you, but logically, the division should be such that each function performs a speci... | [
{
"code": null,
"e": 2267,
"s": 1937,
"text": "A function is a group of statements that together perform a task. Every Go program has at least one function, which is main(). You can divide your code into separate functions. How you divide your code among different functions is up to you, but logical... |
How to multiply each element of a numerical vector in R? | Sometimes we want to determine the multiplication of all the elements of a vector just like the sum. This might be required to test the changes in the mathematical operations that can be applied to a numerical vector. In base R, we have prod function which works same as sum but give us the multiplication of all the ele... | [
{
"code": null,
"e": 1401,
"s": 1062,
"text": "Sometimes we want to determine the multiplication of all the elements of a vector just like the sum. This might be required to test the changes in the mathematical operations that can be applied to a numerical vector. In base R, we have prod function wh... |
Network Analysis with R | Manipulating Network Data | by Jinhang Jiang | Towards Data Science | Network analysis is a technique that uses graph theory to study complex real-world problems, such as computational biology, engineering, finance, marketing, neuroscience, political science, and public health (Kolaczyk et al., 2014). In my previous works, I have done quite a lot of network analysis in the python environ... | [
{
"code": null,
"e": 915,
"s": 172,
"text": "Network analysis is a technique that uses graph theory to study complex real-world problems, such as computational biology, engineering, finance, marketing, neuroscience, political science, and public health (Kolaczyk et al., 2014). In my previous works, ... |
Basics of CountVectorizer | by Pratyaksh Jain | Towards Data Science | Machines cannot understand characters and words. So when dealing with text data we need to represent it in numbers to be understood by the machine. Countvectorizer is a method to convert text to numerical data. To show you how it works let’s take an example:
text = [‘Hello my name is james, this is my python notebook’]... | [
{
"code": null,
"e": 431,
"s": 172,
"text": "Machines cannot understand characters and words. So when dealing with text data we need to represent it in numbers to be understood by the machine. Countvectorizer is a method to convert text to numerical data. To show you how it works let’s take an examp... |
Distributed Logging using ELK and Sleuth | In a distributed environment or in a monolithic environment, application logs are very critical for debugging whenever something goes wrong. In this section, we will look at how to effectively log and improve traceability so that we can easily look at the logs.
Two major reasons why logging patterns become critical for... | [
{
"code": null,
"e": 2140,
"s": 1878,
"text": "In a distributed environment or in a monolithic environment, application logs are very critical for debugging whenever something goes wrong. In this section, we will look at how to effectively log and improve traceability so that we can easily look at t... |
XML - Encoding | Encoding is the process of converting unicode characters into their equivalent binary representation. When the XML processor reads an XML document, it encodes the document depending on the type of encoding. Hence, we need to specify the type of encoding in the XML declaration.
There are mainly two types of encoding −
U... | [
{
"code": null,
"e": 2239,
"s": 1961,
"text": "Encoding is the process of converting unicode characters into their equivalent binary representation. When the XML processor reads an XML document, it encodes the document depending on the type of encoding. Hence, we need to specify the type of encoding... |
C - Quick Guide | C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC PDP-11 computer in 1972.
In 1978, Brian Kernighan and Dennis Ritchie produced the first publicly available description of C, now... | [
{
"code": null,
"e": 2301,
"s": 2084,
"text": "C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC PDP-11 computer in 1972."
},
{
"code": null,
"e":... |
Objective-C Environment Setup | If you are still willing to set up your own environment for Objective-C programming language, then you need to install Text Editor and The GCC Compiler on your computer.
This will be used to type your program. Examples of few editors include Windows Notepad, OS Edit command, Brief, Epsilon, EMACS, and vim or vi.
Name a... | [
{
"code": null,
"e": 2730,
"s": 2560,
"text": "If you are still willing to set up your own environment for Objective-C programming language, then you need to install Text Editor and The GCC Compiler on your computer."
},
{
"code": null,
"e": 2874,
"s": 2730,
"text": "This will be... |
How to remove notification from notification bar programmatically in android? | This example demonstrate about How to remove notification from notification bar programmatically in android
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 = "... | [
{
"code": null,
"e": 1170,
"s": 1062,
"text": "This example demonstrate about How to remove notification from notification bar programmatically in android"
},
{
"code": null,
"e": 1299,
"s": 1170,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project ... |
Image Similarity: Theory and Code | by Adam Mehdi | Towards Data Science | How could we compute how similar one image is to another? For similarity among data in a vectorized form, we can find the sum of the squared differences between two examples, or use similar methods like cosine similarity. However, performing such techniques on images — summing the squared difference between each pixel ... | [
{
"code": null,
"e": 1214,
"s": 172,
"text": "How could we compute how similar one image is to another? For similarity among data in a vectorized form, we can find the sum of the squared differences between two examples, or use similar methods like cosine similarity. However, performing such techniq... |
Python String isspace() Method | Python string method isspace() checks whether the string consists of whitespace.
Following is the syntax for isspace() method −
str.isspace()
NA
NA
This method returns true if there are only whitespace characters in the string and there is at least one character, false otherwise.
The following example shows the usage... | [
{
"code": null,
"e": 2326,
"s": 2244,
"text": "Python string method isspace() checks whether the string consists of whitespace."
},
{
"code": null,
"e": 2373,
"s": 2326,
"text": "Following is the syntax for isspace() method −"
},
{
"code": null,
"e": 2388,
"s": 2... |
How do I do a case insensitive string comparison in Python? | The following code is an example of case insensitive string comparison in Python.
string1 = 'Star Wars'
string2 = 'star wars'
if string1.lower() == string2.lower():
print "The strings are case insensitive"
else:
print "The strings are not case insensitive"
This code gives the following output
The strings are ca... | [
{
"code": null,
"e": 1144,
"s": 1062,
"text": "The following code is an example of case insensitive string comparison in Python."
},
{
"code": null,
"e": 1327,
"s": 1144,
"text": "string1 = 'Star Wars'\nstring2 = 'star wars'\nif string1.lower() == string2.lower():\n print \"Th... |
Matplotlib - Lasso Selector Widget - GeeksforGeeks | 23 Feb, 2021
Matplotlib provides us with a variety of widgets. In this article, we will be learning about Lasso Selector Widget Demo. A Lasso Selector Widget is a tool that helps us to make a selection curve of arbitrary space.
We will be adding the axes manually to our plot and then use the lasso-selector-widget tool.... | [
{
"code": null,
"e": 23901,
"s": 23873,
"text": "\n23 Feb, 2021"
},
{
"code": null,
"e": 24116,
"s": 23901,
"text": "Matplotlib provides us with a variety of widgets. In this article, we will be learning about Lasso Selector Widget Demo. A Lasso Selector Widget is a tool that hel... |
Can we call Superclass’s static method from subclass in Java? | A static method is the one which you can call without instantiating the class. If you want to call a static method of the superclass, you can call it directly using the class name.
Live Demo
public class Sample{
public static void display(){
System.out.println("This is the static method........");
}
pub... | [
{
"code": null,
"e": 1243,
"s": 1062,
"text": "A static method is the one which you can call without instantiating the class. If you want to call a static method of the superclass, you can call it directly using the class name."
},
{
"code": null,
"e": 1254,
"s": 1243,
"text": " ... |
Implementing Part of Speech Tagging for English Words Using Viterbi Algorithm from Scratch | by Cleopatra Douglas | Towards Data Science | The complete code for this article can be found HERE
Part of speech tagging is the process of assigning a part of speech to each word in a text, this is a disambiguation task and words can have more than one possible part of speech and our goal is to find the correct tag for the situation.
We will use a classic sequenc... | [
{
"code": null,
"e": 225,
"s": 172,
"text": "The complete code for this article can be found HERE"
},
{
"code": null,
"e": 463,
"s": 225,
"text": "Part of speech tagging is the process of assigning a part of speech to each word in a text, this is a disambiguation task and words c... |
How to make a div span two rows in a grid using CSS ? - GeeksforGeeks | 15 Oct, 2020
Suppose we have 5 elements in a row and the task to put a bigger element in the middle of a row. How to make a DIV span the 2 rows of the grid with the help of CSS.
Approach 1: First get the height of the outer DIV of ID(‘outer’). We know the height of the outer element now design can be achieved using CSS... | [
{
"code": null,
"e": 23779,
"s": 23751,
"text": "\n15 Oct, 2020"
},
{
"code": null,
"e": 23944,
"s": 23779,
"text": "Suppose we have 5 elements in a row and the task to put a bigger element in the middle of a row. How to make a DIV span the 2 rows of the grid with the help of CSS... |
Data Visualization using Plotnine and ggplot2 in Python - GeeksforGeeks | 29 Dec, 2021
Data Visualization is the technique of presenting data in the form of graphs, charts, or plots. Visualizing data makes it easier for the data analysts to analyze the trends or patterns that may be present in the data as it summarizes the huge amount of data in a simple and easy-to-understand format.
In th... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 24594,
"s": 24292,
"text": "Data Visualization is the technique of presenting data in the form of graphs, charts, or plots. Visualizing data makes it easier for the data analysts to analyze t... |
Creating a new table in SAP HANA | New tables can be created using the two methods given below −
Using SQL editor
Using GUI option
The new table can be created using SQL Create Table statement –
Create column Table Test1 (
ID INTEGER,
NAME VARCHAR(10),
PRIMARY KEY (ID)
);
When you run this SQL query, you get a message like this:
The statement '... | [
{
"code": null,
"e": 1124,
"s": 1062,
"text": "New tables can be created using the two methods given below −"
},
{
"code": null,
"e": 1141,
"s": 1124,
"text": "Using SQL editor"
},
{
"code": null,
"e": 1158,
"s": 1141,
"text": "Using GUI option"
},
{
"... |
Check for balanced parentheses in an expression in C++ | Suppose we have an expression. The expression has some parentheses; we have to check the parentheses are balanced or not. The order of the parentheses are (), {} and []. Suppose there are two strings. “()[(){()}]” this is valid, but “{[}]” is invalid.
The task is simple; we will use stack to do this. We should follow t... | [
{
"code": null,
"e": 1314,
"s": 1062,
"text": "Suppose we have an expression. The expression has some parentheses; we have to check the parentheses are balanced or not. The order of the parentheses are (), {} and []. Suppose there are two strings. “()[(){()}]” this is valid, but “{[}]” is invalid."
... |
How to generate multiple insert queries via java? | JDBC provides a mechanism known as batch processing, in which you can group a set of INSERT or, UPDATE or, DELETE commands (those produce update count value) and execute them at once. You can insert multiple records in to a table using this.
Statement, PreparedStatement and CallableStatement objects hold a list (of com... | [
{
"code": null,
"e": 1304,
"s": 1062,
"text": "JDBC provides a mechanism known as batch processing, in which you can group a set of INSERT or, UPDATE or, DELETE commands (those produce update count value) and execute them at once. You can insert multiple records in to a table using this."
},
{
... |
JavaScript | Namespace - GeeksforGeeks | 21 Mar, 2020
Namespace refers to the programming paradigm of providing scope to the identifiers (names of types, functions, variables, etc) to prevent collisions between them. For instance, the same variable name might be required in a program in different contexts. Using namespaces in such a scenario will isolate thes... | [
{
"code": null,
"e": 24587,
"s": 24559,
"text": "\n21 Mar, 2020"
},
{
"code": null,
"e": 25231,
"s": 24587,
"text": "Namespace refers to the programming paradigm of providing scope to the identifiers (names of types, functions, variables, etc) to prevent collisions between them. ... |
How to use REPLACE() function with column’s data of MySQL table? | For using it with column’s data we need to provide column name as the argument of REPLACE() function. It can be demonstrated by using ‘Student’ table data as follows −
mysql> Select Id, Name, Subject, REPLACE(Subject, 's', ' Science') from Student WHERE Subject = 'Computers';
+------+--------+-----------+--------------... | [
{
"code": null,
"e": 1230,
"s": 1062,
"text": "For using it with column’s data we need to provide column name as the argument of REPLACE() function. It can be demonstrated by using ‘Student’ table data as follows −"
},
{
"code": null,
"e": 1760,
"s": 1230,
"text": "mysql> Select ... |
Apply a function to each row or column in Dataframe using pandas.apply() - GeeksforGeeks | 19 Jul, 2021
There are different ways to apply a function to each row or column in DataFrame. We will learn about various ways in this post. Let’s create a small dataframe first and see that.
Python3
# import pandas and numpy libraryimport pandas as pdimport numpy as np # list of tuplesmatrix = [(1,2,3,4), (... | [
{
"code": null,
"e": 25036,
"s": 25008,
"text": "\n19 Jul, 2021"
},
{
"code": null,
"e": 25216,
"s": 25036,
"text": "There are different ways to apply a function to each row or column in DataFrame. We will learn about various ways in this post. Let’s create a small dataframe firs... |
Adding Text with a Float number Using String.Format() Method in C# - GeeksforGeeks | 26 May, 2020
Here the task is to add the text T with a float number F using String.Format() method.
Example :
Input : F = 12.3, T = “abc”Output : 12abc.abc3
Input : F = 0.0, T = “Geeks”Output : Geeks0.0Geeks
The text T can be add to a float number F using String.Format() method in a following way:
Add text T only to le... | [
{
"code": null,
"e": 25547,
"s": 25519,
"text": "\n26 May, 2020"
},
{
"code": null,
"e": 25634,
"s": 25547,
"text": "Here the task is to add the text T with a float number F using String.Format() method."
},
{
"code": null,
"e": 25644,
"s": 25634,
"text": "Exa... |
Node.js fs.exists() Method - GeeksforGeeks | 12 Oct, 2021
The fs.exists() method is an inbuilt application programming interface of fs module which provides an API for interacting with the file system in a manner closely modeled around standard POSIX functions. The fs.exists() method is used to test whether the given path exists or not in the file system.
Syntax:... | [
{
"code": null,
"e": 37176,
"s": 37148,
"text": "\n12 Oct, 2021"
},
{
"code": null,
"e": 37476,
"s": 37176,
"text": "The fs.exists() method is an inbuilt application programming interface of fs module which provides an API for interacting with the file system in a manner closely ... |
Console.MoveBufferArea Method in C# - GeeksforGeeks | 08 Mar, 2019
Console.MoveBufferArea Method is used to move the specified screen area to destination area.
Syntax: public static void MoveBufferArea (int sourceLeft, int sourceTop, int sourceWidth, int sourceHeight, int targetLeft, int targetTop);
Parameters:sourceLeft: The leftmost column of the source area.sourceTop: ... | [
{
"code": null,
"e": 26429,
"s": 26401,
"text": "\n08 Mar, 2019"
},
{
"code": null,
"e": 26522,
"s": 26429,
"text": "Console.MoveBufferArea Method is used to move the specified screen area to destination area."
},
{
"code": null,
"e": 26663,
"s": 26522,
"text"... |
C++ Program to Implement Dijkstra’s Algorithm Using Set | This is a C++ Program to Implement Dijkstra’s Algorithm using Set. Here we need to have two sets. We generate a shortest path tree with given source node as root. One set contains vertices included in shortest path tree and other set includes vertices not yet included in shortest path tree. At every step, we find a ver... | [
{
"code": null,
"e": 1476,
"s": 1062,
"text": "This is a C++ Program to Implement Dijkstra’s Algorithm using Set. Here we need to have two sets. We generate a shortest path tree with given source node as root. One set contains vertices included in shortest path tree and other set includes vertices n... |
Calculate extra cost to be paid for luggage based on weight for Air travel - GeeksforGeeks | 11 Jan, 2022
Given an array weight[] of size N containing weights of luggage. If the weights are within a threshold of W then it does not require any extra cost. But after the weights cross the threshold they need to pay extra cost according to the following table. The task is to calculate the extra cost of the luggage... | [
{
"code": null,
"e": 26328,
"s": 26300,
"text": "\n11 Jan, 2022"
},
{
"code": null,
"e": 26646,
"s": 26328,
"text": "Given an array weight[] of size N containing weights of luggage. If the weights are within a threshold of W then it does not require any extra cost. But after the ... |
Code to generate the map of India (with explanation) - GeeksforGeeks | 02 Sep, 2021
Given an obfuscated code that generates the map of India, explain its working.The following code when executed generates the map of India –
The above code is a typical example of obfuscated code i.e. code that is difficult for humans to understand.How does it work?Basically, the string is a run-length ... | [
{
"code": null,
"e": 26321,
"s": 26293,
"text": "\n02 Sep, 2021"
},
{
"code": null,
"e": 26463,
"s": 26321,
"text": "Given an obfuscated code that generates the map of India, explain its working.The following code when executed generates the map of India – "
},
{
"code":... |
Alternating split of a given Singly Linked List | Set 1 - GeeksforGeeks | 04 Apr, 2022
Write a function AlternatingSplit() that takes one list and divides up its nodes to make two smaller lists ‘a’ and ‘b’. The sublists should be made from alternating elements in the original list. So if the original list is 0->1->0->1->0->1 then one sublist should be 0->0->0 and the other should be 1->1->1.... | [
{
"code": null,
"e": 25977,
"s": 25949,
"text": "\n04 Apr, 2022"
},
{
"code": null,
"e": 26287,
"s": 25977,
"text": "Write a function AlternatingSplit() that takes one list and divides up its nodes to make two smaller lists ‘a’ and ‘b’. The sublists should be made from alternatin... |
Algorithms | Recursion | Question 6 - GeeksforGeeks | 01 Jun, 2021
Output of following program?
#include<stdio.h>void print(int n){ if (n > 4000) return; printf("%d ", n); print(2*n); printf("%d ", n);} int main(){ print(1000); getchar(); return 0;}
(A) 1000 2000 4000(B) 1000 2000 4000 4000 2000 1000(C) 1000 2000 4000 2000 1000(D) 1000 2000 20... | [
{
"code": null,
"e": 26235,
"s": 26207,
"text": "\n01 Jun, 2021"
},
{
"code": null,
"e": 26264,
"s": 26235,
"text": "Output of following program?"
},
{
"code": "#include<stdio.h>void print(int n){ if (n > 4000) return; printf(\"%d \", n); print(2*n); pr... |
Program to get next integer permutation of a number in C++ | Suppose we have a number n, we have to find the next bigger permutation of its digits. When n is already in its largest permutation, then rotate it down to the smallest permutation.
So, if the input is like n = 319, then the output will be 391.
To solve this, we will follow these steps −
Define a function makeArray(), ... | [
{
"code": null,
"e": 1244,
"s": 1062,
"text": "Suppose we have a number n, we have to find the next bigger permutation of its digits. When n is already in its largest permutation, then rotate it down to the smallest permutation."
},
{
"code": null,
"e": 1307,
"s": 1244,
"text": "... |
Program to calculate Resistance using given color code in circuits | 08 Jun, 2020
There are many different types of Resistor available which can be used in both electrical and electronic circuits. The resistance value, tolerance, and wattage rating are generally printed onto the body of the resistor as color bands. The task is to find the resistance of 4-band resistor and 5-band resisto... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 338,
"s": 28,
"text": "There are many different types of Resistor available which can be used in both electrical and electronic circuits. The resistance value, tolerance, and wattage rating are gene... |
Change button Color in Kivy | 27 Feb, 2020
Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, Linux and Windows, etc. It is basically used to develop the Android application, but it does not mean that it can not be used on Desktops applications.
In this article, we will learn about how to change the button color in... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Feb, 2020"
},
{
"code": null,
"e": 265,
"s": 28,
"text": "Kivy is a platform independent GUI tool in Python. As it can be run on Android, IOS, Linux and Windows, etc. It is basically used to develop the Android application, but it do... |
Ruby | String concat Method | 07 Jan, 2020
concat is a String class method in Ruby which is used to Concatenates two objects of String. If the given object is an Integer, then it is considered a codepoint and converted to a character before concatenation.
Syntax:String_Object.concat(String_Object)
Parameters: This method can take the string object ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Jan, 2020"
},
{
"code": null,
"e": 241,
"s": 28,
"text": "concat is a String class method in Ruby which is used to Concatenates two objects of String. If the given object is an Integer, then it is considered a codepoint and converted... |
Node.js Buffer.compare() Method | 13 Oct, 2021
Buffer is a temporary memory storage which stores the data when it is being moved from one place to another. It is like an array of integers. Buffer.compare() method compares the two given buffers.
Syntax:
buffer1.compare( targetBuffer, targetStart,
targetEnd, sourceStart, sourceEnd )
Parameter... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Oct, 2021"
},
{
"code": null,
"e": 226,
"s": 28,
"text": "Buffer is a temporary memory storage which stores the data when it is being moved from one place to another. It is like an array of integers. Buffer.compare() method compares ... |
Groovy - Data Types | In any programming language, you need to use various variables to store various types of information. Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory to store the value associated with the variable.
You may like to store in... | [
{
"code": null,
"e": 2668,
"s": 2372,
"text": "In any programming language, you need to use various variables to store various types of information. Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory to sto... |
Python | math.fabs() function | 11 Mar, 2019
In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.fabs() function returns the absolute value of the number.
Syntax: math.fabs(x)
Parameter:
x: This is a numeric expression.
Returns: the absolute value of the number.
Code #1:
# Pyt... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Mar, 2019"
},
{
"code": null,
"e": 211,
"s": 28,
"text": "In Python, math module contains a number of mathematical operations, which can be performed with ease using the module. math.fabs() function returns the absolute value of the ... |
Python - Tkinter Bitmaps | This attribute to displays a bitmap. There are following type of bitmaps available −
"error"
"gray75"
"gray50"
"gray25"
"gray12"
"hourglass"
"info"
"questhead"
"question"
"warning"
from Tkinter import *
import Tkinter
top = Tkinter.Tk()
B1 = Tkinter.Button(top, text ="error", relief=RAISED,\
... | [
{
"code": null,
"e": 2464,
"s": 2378,
"text": "This attribute to displays a bitmap. There are following type of bitmaps available −"
},
{
"code": null,
"e": 2472,
"s": 2464,
"text": "\"error\""
},
{
"code": null,
"e": 2481,
"s": 2472,
"text": "\"gray75\""
}... |
DataFrame.read_pickle() method in Pandas | 16 Jul, 2020
Prerequisite : pd.to_pickle method()
The read_pickle() method is used to pickle (serialize) the given object into the file. This method uses the syntax as given below :
Syntax:
pd.read_pickle(path, compression='infer')
Parameters:
Below is the implementation of the above method with some examples :
Python... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jul, 2020"
},
{
"code": null,
"e": 65,
"s": 28,
"text": "Prerequisite : pd.to_pickle method()"
},
{
"code": null,
"e": 197,
"s": 65,
"text": "The read_pickle() method is used to pickle (serialize) the given object... |
Load Balancing on Servers (Randomized Algorithm) | 15 Nov, 2015
Consider a high traffic website that receives millions of requests (of different types) per five minutes, the site has k (for example n = 1000) servers to process the requests. How should the load be balanced among servers?
The solutions that we generally think of area) Round Robinb) Assign new request to ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Nov, 2015"
},
{
"code": null,
"e": 276,
"s": 52,
"text": "Consider a high traffic website that receives millions of requests (of different types) per five minutes, the site has k (for example n = 1000) servers to process the request... |
Flutter – Ripple Effect | 16 Oct, 2020
In Flutter, the InkWell widget is used to perform ripple animation when tapped. This effect is common for all the app components that follow the material design guideline. A ripple animation in its simplest term can be understood as a black (default) bar at the bottom of an app that displays some data whe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Oct, 2020"
},
{
"code": null,
"e": 399,
"s": 28,
"text": "In Flutter, the InkWell widget is used to perform ripple animation when tapped. This effect is common for all the app components that follow the material design guideline. A ... |
PHP & MySQL - Connect Database Example | PHP provides mysqli contruct or mysqli_connect() function to open a database connection. This function takes six parameters and returns a MySQL link identifier on success or FALSE on failure.
$mysqli = new mysqli($host, $username, $passwd, $dbName, $port, $socket);
$host
Optional − The host name running the database s... | [
{
"code": null,
"e": 2458,
"s": 2266,
"text": "PHP provides mysqli contruct or mysqli_connect() function to open a database connection. This function takes six parameters and returns a MySQL link identifier on success or FALSE on failure."
},
{
"code": null,
"e": 2533,
"s": 2458,
... |
Iterating over Arrays in Java | 11 Dec, 2018
Iterating over an array means accessing each element of array one by one. There may be many ways of iterating over an array in Java, below are some simple ways.
Method 1: Using for loop:This is the simplest of all where we just have to use a for loop where a counter variable accesses each element one by on... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 213,
"s": 52,
"text": "Iterating over an array means accessing each element of array one by one. There may be many ways of iterating over an array in Java, below are some simple ways."
},
{
... |
Python program to remove K length words in String | 24 Dec, 2021
Given a String, write a Python program to remove all the words with K length.
Examples:
Input : test_str = ‘Gfg is best for all geeks’, K = 3 Output : is best geeks Explanation : Gfg, for and all are of length 3, hence removed.
Input : test_str = ‘Gfg is best for all geeks’, K = 2 Output : Gfg best for al... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n24 Dec, 2021"
},
{
"code": null,
"e": 107,
"s": 28,
"text": "Given a String, write a Python program to remove all the words with K length. "
},
{
"code": null,
"e": 117,
"s": 107,
"text": "Examples:"
},
{
"co... |
How to declare variables in C#? | Each variable in C# has a specific type, which determines the size and layout of the variable's memory the range of values that can be stored within that memory and the set of operations that can be applied to the variable.
To declare variables −
<data_type> <variable_list>;
Let us see an example to declare two integer... | [
{
"code": null,
"e": 1411,
"s": 1187,
"text": "Each variable in C# has a specific type, which determines the size and layout of the variable's memory the range of values that can be stored within that memory and the set of operations that can be applied to the variable."
},
{
"code": null,
... |
Scan conversion of Line and Line Drawing algorithms | 08 Jun, 2021
SCAN Conversion of Line :
A line connects two points.
It is a basic element in graphics.
You’ll need two spots between which to draw a line to draw a line .
A line, or line segment, can be uniquely described by two points, according to geometry. We also know from algebra that a line can be defined by a sl... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jun, 2021"
},
{
"code": null,
"e": 55,
"s": 28,
"text": " SCAN Conversion of Line :"
},
{
"code": null,
"e": 83,
"s": 55,
"text": "A line connects two points."
},
{
"code": null,
"e": 118,
"s": 83,... |
How to compare date part only without comparing time in JavaScript? | 30 Jan, 2020
To obtain date and time in javascript, we have the Date() class. We access Date() class by creating its objects. Date() class returns date and time both combined.
There are four ways of instantiating a date:Syntax:
var d = new Date();
//returns the present date and time
or
var d = new Date(milliseconds);
/... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jan, 2020"
},
{
"code": null,
"e": 191,
"s": 28,
"text": "To obtain date and time in javascript, we have the Date() class. We access Date() class by creating its objects. Date() class returns date and time both combined."
},
{
... |
What are props in React Native ? | 14 Jul, 2021
Props are used to provide properties to the components using which they can be modified and customized. These properties are passed to the components when the component is created. Props are used in both user-defined and default components to extend their functionality. These props are immutable and cannot... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Jul, 2021"
},
{
"code": null,
"e": 384,
"s": 28,
"text": "Props are used to provide properties to the components using which they can be modified and customized. These properties are passed to the components when the component is cre... |
How to Create a Cutout Text using HTML and CSS ? | 09 Feb, 2022
Cutout text is used as a background header of the webpage. The cutout text creates an attractive look on the webpage. To create a cutout text we will use only HTML and CSS. We display the cutout text and then we make the text blending of an element’s background with the element’s parent. The CSS mix-blend-... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Feb, 2022"
},
{
"code": null,
"e": 476,
"s": 28,
"text": "Cutout text is used as a background header of the webpage. The cutout text creates an attractive look on the webpage. To create a cutout text we will use only HTML and CSS. We... |
How to delete registry Key using PowerShell? | To delete the registry key using PowerShell, we can use the Remove-Item command. Remove-Item command removes the registry key from the path specified. For example, we have the registry key name NodeSoftware stored at the path HKLM, under the Software key.
To delete the key we will use the below command.
Remove-Item -Pa... | [
{
"code": null,
"e": 1318,
"s": 1062,
"text": "To delete the registry key using PowerShell, we can use the Remove-Item command. Remove-Item command removes the registry key from the path specified. For example, we have the registry key name NodeSoftware stored at the path HKLM, under the Software ke... |
fill() and fill_n() functions in C++ STL - GeeksforGeeks | 11 Oct, 2019
A vector, once declared, has all its values initialized to zero. Following is an example code to demonstrate the same.
// C++ program for displaying the default initialization// of the vector vect[]#include<bits/stdc++.h>using namespace std; int main() { // Creating a vector of size 8 vector<int> ve... | [
{
"code": null,
"e": 24495,
"s": 24467,
"text": "\n11 Oct, 2019"
},
{
"code": null,
"e": 24614,
"s": 24495,
"text": "A vector, once declared, has all its values initialized to zero. Following is an example code to demonstrate the same."
},
{
"code": "// C++ program for di... |
AngularJS | ng-show Directive - GeeksforGeeks | 28 Mar, 2019
The ng-show Directive in AngluarJS is used to show or hide the specified HTML element. If given expression in ng-show attribute is true then the HTML element will display otherwise it hide the HTML element. It is supported by all HTML elements.
Syntax:
<element ng-show="expression"> Contents... </element> ... | [
{
"code": null,
"e": 23860,
"s": 23832,
"text": "\n28 Mar, 2019"
},
{
"code": null,
"e": 24105,
"s": 23860,
"text": "The ng-show Directive in AngluarJS is used to show or hide the specified HTML element. If given expression in ng-show attribute is true then the HTML element will ... |
C Program for Lower Case to Uppercase and vice-versa in a file - GeeksforGeeks | 10 May, 2018
Lower Case To Upper Case
Given a text file(gfg.txt), our task is to convert all the lower case characters of file into upper case.
Examples:
Input: (content inside file (gfg.txt)
Geeks Classes:
An extensive classroom programme
by GeeksforGeeks to build and enhance
Data Structures and Algorithm concepts
Ou... | [
{
"code": null,
"e": 24208,
"s": 24180,
"text": "\n10 May, 2018"
},
{
"code": null,
"e": 24233,
"s": 24208,
"text": "Lower Case To Upper Case"
},
{
"code": null,
"e": 24339,
"s": 24233,
"text": "Given a text file(gfg.txt), our task is to convert all the lower ... |
D3.js | d3.keys() Function - GeeksforGeeks | 28 Jun, 2019
The d3.keys() function in D3.js is used to return an array containing the property names or keys of the specified object or an associative array.
Syntax:
d3.keys(object)
Parameters: This function accepts single parameter object containing key and value in pairs.
Return Value: It returns the keys of the giv... | [
{
"code": null,
"e": 24222,
"s": 24194,
"text": "\n28 Jun, 2019"
},
{
"code": null,
"e": 24368,
"s": 24222,
"text": "The d3.keys() function in D3.js is used to return an array containing the property names or keys of the specified object or an associative array."
},
{
"co... |
What is an identifier and its rules in C language? | Identifier is one of the tokens which are used in C programming language. It is a name which is used to identify the variables, constants, functions, arrays, and also user-defined data.
We cannot use keywords as identifiers because keywords are reserved for special use. Once declared, we can use the identifier in later... | [
{
"code": null,
"e": 1248,
"s": 1062,
"text": "Identifier is one of the tokens which are used in C programming language. It is a name which is used to identify the variables, constants, functions, arrays, and also user-defined data."
},
{
"code": null,
"e": 1440,
"s": 1248,
"text... |
Gradient-Free Reinforcement Learning: Neuroevolution using Numpy! | by Jacob Gursky | Towards Data Science | What if I told you that you can train neural networks without ever calculating a gradient, and only using the forward pass? Such is the magic of neuroevolution! Also, I am going to show that all this can easily be done using only Numpy! Studying statistics you learn so much about gradient-based methods, but a while bac... | [
{
"code": null,
"e": 833,
"s": 171,
"text": "What if I told you that you can train neural networks without ever calculating a gradient, and only using the forward pass? Such is the magic of neuroevolution! Also, I am going to show that all this can easily be done using only Numpy! Studying statistic... |
How to Fix Cassandra Consistency Issues using Read Repair | by Andriy Zabavskyy | Towards Data Science | As many of you probably know, Cassandra is an AP big data storage. In other words, when a network partition happens, Cassandra remains available and relaxes the Consistency property. It is always said that it is eventually consistent or, in other words, it will be consistent at some point in time in future.
The importa... | [
{
"code": null,
"e": 481,
"s": 172,
"text": "As many of you probably know, Cassandra is an AP big data storage. In other words, when a network partition happens, Cassandra remains available and relaxes the Consistency property. It is always said that it is eventually consistent or, in other words, i... |
GalleryView in Android with Example - GeeksforGeeks | 13 Jul, 2021
In Android, Gallery is a view that can show items in a center locked, horizontal scrolling list, and hence the user can able to select a view, and then the user selected view will be shown in the center of the Horizontal list. “N” number of items can be added by using the Adapter. The adapter is a bridging... | [
{
"code": null,
"e": 25036,
"s": 25008,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 25537,
"s": 25036,
"text": "In Android, Gallery is a view that can show items in a center locked, horizontal scrolling list, and hence the user can able to select a view, and then the user se... |
cPanel - Cron Jobs | If you want to run a command or a php program on a specified time interval like once a day or once a week, you can setup cron jobs in this interface. Cron jobs allow you to run a specific command or program automatically. This is often required, if you are using a software like CRM or Billing Software. Setting up cron ... | [
{
"code": null,
"e": 3432,
"s": 3057,
"text": "If you want to run a command or a php program on a specified time interval like once a day or once a week, you can setup cron jobs in this interface. Cron jobs allow you to run a specific command or program automatically. This is often required, if you ... |
Set Up Postfix MTA and IMAP/POP3 | In order to send an email from our CentOS 7 server, we will need the setup to configure a modern Mail Transfer Agent (MTA). Mail Transfer Agent is the daemon responsible for sending outbound mail for system users or corporate Internet Domains via SMTP.
It is worth noting, this tutorial only teaches the process of setti... | [
{
"code": null,
"e": 2510,
"s": 2257,
"text": "In order to send an email from our CentOS 7 server, we will need the setup to configure a modern Mail Transfer Agent (MTA). Mail Transfer Agent is the daemon responsible for sending outbound mail for system users or corporate Internet Domains via SMTP."... |
SQL Query to Delete Duplicate Rows - GeeksforGeeks | 23 Sep, 2021
Through this article, we will learn how to delete duplicate rows from a database table. As we know that duplicity in our database tends to be a waste of memory space. It records inaccurate data and is also unable to fetch out the correct data from the database.
One or more rows that have identical or the s... | [
{
"code": null,
"e": 26090,
"s": 26062,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 26352,
"s": 26090,
"text": "Through this article, we will learn how to delete duplicate rows from a database table. As we know that duplicity in our database tends to be a waste of memory spa... |
SQL INSERT INTO Statement | The INSERT INTO statement is used to insert new records in a table.
It is possible to write the INSERT INTO
statement in two ways:
1. Specify both the column names and the values to be inserted:
2. If you are adding values for all the columns of the table, you do not need to
specify the column names in the SQL query.... | [
{
"code": null,
"e": 68,
"s": 0,
"text": "The INSERT INTO statement is used to insert new records in a table."
},
{
"code": null,
"e": 132,
"s": 68,
"text": "It is possible to write the INSERT INTO \nstatement in two ways:"
},
{
"code": null,
"e": 196,
"s": 132,
... |
GATE | Gate IT 2008 | Question 79 - GeeksforGeeks | 28 Jun, 2021
Consider the code fragment written in C below :
void f (int n){ if (n <=1) { printf ("%d", n); } else { f (n/2); printf ("%d", n%2); }}
What does f(173) print?
(A) 010110101(B) 010101101(C) 10110101(D) 10101101Answer: (D)Explanation: (173)2 = 10101101Quiz of this Question
Gate IT 2008
GATE-Gate... | [
{
"code": null,
"e": 24320,
"s": 24292,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24368,
"s": 24320,
"text": "Consider the code fragment written in C below :"
},
{
"code": "void f (int n){ if (n <=1) { printf (\"%d\", n); } else { f (n/2); printf (\"%d\"... |
Tryit Editor v3.7 | Tryit: HTML strong text | [] |
Tail events, why they matter and how to model them | by Conor Mc. | Towards Data Science | How to model the unexpected and unlikely the Bayesian way.
Rare events are by definition, well, rare. But, inevitably they do happen and when they do they have outsized consequences. 9/11 was a tail event. The financial crisis of 2007/08 was a tail event. Coronavirus was a tail event. Many of the every day products you... | [
{
"code": null,
"e": 231,
"s": 172,
"text": "How to model the unexpected and unlikely the Bayesian way."
},
{
"code": null,
"e": 640,
"s": 231,
"text": "Rare events are by definition, well, rare. But, inevitably they do happen and when they do they have outsized consequences. 9/1... |
How to remove all instances of a specific character from a column in MySQL? | Let us first create a table −
mysql> create table DemoTable
-> (
-> FirstName varchar(100)
-> );
Query OK, 0 rows affected (0.41 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values('Adam^^^');
Query OK, 1 row affected (0.14 sec)
mysql> insert into DemoTable values(... | [
{
"code": null,
"e": 1092,
"s": 1062,
"text": "Let us first create a table −"
},
{
"code": null,
"e": 1205,
"s": 1092,
"text": "mysql> create table DemoTable\n -> (\n -> FirstName varchar(100)\n -> );\nQuery OK, 0 rows affected (0.41 sec)"
},
{
"code": null,
"e"... |
Count the Number of matching characters in a pair of Java string | In order to find the count of matching characters in two Java strings the approach is to first create character arrays of both the strings which make comparison simple.After this put each unique character into a Hash map.
Compare each character of other string with created hash map whether it is present or not in case ... | [
{
"code": null,
"e": 1284,
"s": 1062,
"text": "In order to find the count of matching characters in two Java strings the approach is to first create character arrays of both the strings which make comparison simple.After this put each unique character into a Hash map."
},
{
"code": null,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.