title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How to set background images in ReactJS ? | 31 Oct, 2021
Sometimes, users need to set background images while developing the react app. In this article, we are going to discuss all methods to set background images in react app.
We will discuss how to set the background image using inline CSS and external CSS. We will also discuss several methods to add the URL o... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n31 Oct, 2021"
},
{
"code": null,
"e": 223,
"s": 52,
"text": "Sometimes, users need to set background images while developing the react app. In this article, we are going to discuss all methods to set background images in react app."
... |
Minimum number of increment-other operations to make all array elements equal. | 23 May, 2022
We are given an array consisting of n elements. At each operation you can select any one element and increase rest of n-1 elements by 1. You have to make all elements equal performing such operation as many times you wish. Find the minimum number of operations needed for this.Examples:
Input : arr[] = {1... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 May, 2022"
},
{
"code": null,
"e": 343,
"s": 54,
"text": "We are given an array consisting of n elements. At each operation you can select any one element and increase rest of n-1 elements by 1. You have to make all elements equal p... |
Python PIL | Image.merge() method | 19 Jul, 2019
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The Image module provides a class with the same name which is used to represent a PIL image. The module also provides a number of factory functions, including functions to load images from files, and to... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jul, 2019"
},
{
"code": null,
"e": 355,
"s": 28,
"text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The Image module provides a class with the same name which is used to ... |
C Program for Merge Sort for Linked Lists | 17 Dec, 2021
Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes some other algorithms (such as quicksort) perform poorly, and others (such as heapsort) completely impossible.
Let the head be the first node of the linked list to be sorted and headRef be the... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n17 Dec, 2021"
},
{
"code": null,
"e": 278,
"s": 52,
"text": "Merge sort is often preferred for sorting a linked list. The slow random-access performance of a linked list makes some other algorithms (such as quicksort) perform poorly, a... |
C# | Arrays | 26 Oct, 2021
An array is a group of like-typed variables that are referred to by a common name. And each data item is called an element of the array. The data types of the elements may be any valid data type like char, int, float, etc. and the elements are stored in a contiguous location. Length of the array specifies ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n26 Oct, 2021"
},
{
"code": null,
"e": 708,
"s": 52,
"text": "An array is a group of like-typed variables that are referred to by a common name. And each data item is called an element of the array. The data types of the elements may be... |
Searching in an array where adjacent differ by at most k | Difficulty Level :
Easy
A step array is an array of integers where each element has a difference of at most k with its neighbor. Given a key x, we need to find the index value of x if multiple-element exist to return the first occurrence of the key.Examples:
Input : arr[] = {4, 5, 6, 7, 6}
k = 1
... | [
{
"code": null,
"e": 24,
"s": 0,
"text": "Difficulty Level :\nEasy"
},
{
"code": null,
"e": 261,
"s": 24,
"text": "A step array is an array of integers where each element has a difference of at most k with its neighbor. Given a key x, we need to find the index value of x if multi... |
Sort 3 Integers without using if condition or using only max() function | 23 Jun, 2022
Given three integers, print them in sorted order without using if condition.Examples :
Input : a = 3, b = 2, c = 9
Output : 2 3 9
Input : a = 4, b = 1, c = 9
Output : 1 4 9
Approach : 1. Find the maximum of a, b, c using max() function. 3. Multiply all integers by –1. Again find Minimum of ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 143,
"s": 52,
"text": "Given three integers, print them in sorted order without using if condition.Examples : "
},
{
"code": null,
"e": 232,
"s": 143,
"text": "Input : a = 3... |
Python | Add new keys to a dictionary | 05 Jul, 2022
In this article, we will cover how to add a new Key to a Dictionary in Python. We will use 7 different methods to append new keys to a dictionary.
Dictionary in Python is an unordered collection of data values, used to store data values like a map, unlike other Data Types that hold only a single value as a... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 200,
"s": 53,
"text": "In this article, we will cover how to add a new Key to a Dictionary in Python. We will use 7 different methods to append new keys to a dictionary."
},
{
"code": null,... |
Express.js app.router() Method | 02 Nov, 2021
Express.js is a Node.js web flexible framework that provides a set of features for mobile and web applications. Express has various methods provide by many developers and one of the methods in the express is Router which is used to divert the user to different pages of the website base on request.
Syntax :... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n02 Nov, 2021"
},
{
"code": null,
"e": 351,
"s": 52,
"text": "Express.js is a Node.js web flexible framework that provides a set of features for mobile and web applications. Express has various methods provide by many developers and one... |
Basic DateTime Operations in Python | 20 Oct, 2021
Python has an in-built module named DateTime to deal with dates and times in numerous ways. In this article, we are going to see basic DateTime operations in Python.
There are six main object classes with their respective components in the datetime module mentioned below:
datetime.datedatetime.timedatetime... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Oct, 2021"
},
{
"code": null,
"e": 218,
"s": 52,
"text": "Python has an in-built module named DateTime to deal with dates and times in numerous ways. In this article, we are going to see basic DateTime operations in Python."
},
... |
Identifying patterns in DataFrames using Data-Pattern Module | 26 Oct, 2021
Prerequisites: Pandas Module, Pandas Data frame
Pandas is an open-source library that is built on top of NumPy library. It is a Python package that offers various data structures and operations for manipulating numerical data and time series. It is mainly popular for importing and analyzing data much easie... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Oct, 2021"
},
{
"code": null,
"e": 76,
"s": 28,
"text": "Prerequisites: Pandas Module, Pandas Data frame"
},
{
"code": null,
"e": 408,
"s": 76,
"text": "Pandas is an open-source library that is built on top of Num... |
Reading and Writing CSV Files in Python | 22 Jun, 2020
CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases. It is one of the most common methods for exchanging data between applications and popular data format used in Data Science. It is supported by a wide range of applications. A CSV file stores tabu... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Jun, 2020"
},
{
"code": null,
"e": 517,
"s": 54,
"text": "CSV (Comma Separated Values) format is the most common import and export format for spreadsheets and databases. It is one of the most common methods for exchanging data betwe... |
Real-Time Edge Detection using OpenCV in Python | Canny edge detection method | 18 Apr, 2022
The objective of the program given is to perform edge detection of images in real-time. In this article, the popular canny edge detection algorithm is used to detect a wide range of edges in images. OpenCV has in-built function cv2.Canny() which takes our input image as first argument and its aperture size... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n18 Apr, 2022"
},
{
"code": null,
"e": 511,
"s": 54,
"text": "The objective of the program given is to perform edge detection of images in real-time. In this article, the popular canny edge detection algorithm is used to detect a wide r... |
Key press in (Ctrl+A) Selenium WebDriver. | We can perform key press of (CTRL+A) with Selenium Webdriver. There are multiple ways to do this. We can use the Keys.chord() method to simulate this keyboard action.
The Keys.chord() method helps to press multiple keys simultaneously. It accepts the sequence of keys or strings as a parameter to the method. To press CT... | [
{
"code": null,
"e": 1354,
"s": 1187,
"text": "We can perform key press of (CTRL+A) with Selenium Webdriver. There are multiple ways to do this. We can use the Keys.chord() method to simulate this keyboard action."
},
{
"code": null,
"e": 1556,
"s": 1354,
"text": "The Keys.chord(... |
Remove All Adjacent Duplicates In String in Python | Suppose we have a string S of lowercase letters; a duplicate removal operation will be performed. This will be done by choosing two adjacent and equal letters, and removing them.
We will repeatedly remove duplicates from S until no duplicates are remaining.
Return the string after all such duplicate removals have been ... | [
{
"code": null,
"e": 1366,
"s": 1187,
"text": "Suppose we have a string S of lowercase letters; a duplicate removal operation will be performed. This will be done by choosing two adjacent and equal letters, and removing them."
},
{
"code": null,
"e": 1445,
"s": 1366,
"text": "We ... |
Synopsys Interview Experience for R&D Senior Engineer 1 | 20 Aug, 2021
Recently I had gone through four rounds of Synopsys Interviews for R&D Senior Engineer 1
Round 1:
Output-based questions:
C++C++int j = 0; for(int i = n; i > 1; i = i/2) j++; int add(int &a, int &b) { int c = a + b; return c; } int main() { int int1, int2, sum; sum = add(int1, int2); }C++C+... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Aug, 2021"
},
{
"code": null,
"e": 141,
"s": 52,
"text": "Recently I had gone through four rounds of Synopsys Interviews for R&D Senior Engineer 1"
},
{
"code": null,
"e": 151,
"s": 141,
"text": "Round 1: "
},
... |
iostat command in Linux with examples | 22 Dec, 2021
The iostat command in Linux is used for monitoring system input/output statistics for devices and partitions. It monitors system input/output by observing the time the devices are active in relation to their average transfer rates. The iostat produce reports may be used to change the system configuration t... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Dec, 2021"
},
{
"code": null,
"e": 492,
"s": 28,
"text": "The iostat command in Linux is used for monitoring system input/output statistics for devices and partitions. It monitors system input/output by observing the time the devices... |
Check if an array is sorted and rotated | 16 May, 2022
Given an array of N distinct integers. The task is to write a program to check if this array is sorted and rotated counter-clockwise. A sorted array is not considered as sorted and rotated, i.e., there should at least one rotation.Examples:
Input : arr[] = { 3, 4, 5, 1, 2 }
Output : YES
The above array i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 May, 2022"
},
{
"code": null,
"e": 295,
"s": 52,
"text": "Given an array of N distinct integers. The task is to write a program to check if this array is sorted and rotated counter-clockwise. A sorted array is not considered as sort... |
Difference Between StringBuffer and StringBuilder in Java - GeeksforGeeks | 02 Jul, 2020
Strings in Java are the objects that are backed internally by a char array. Since arrays are immutable(cannot grow), Strings are immutable as well. Whenever a change to a String is made, an entirely new String is created. However, java provides multiple classes through which strings can be used. Two such c... | [
{
"code": null,
"e": 24882,
"s": 24854,
"text": "\n02 Jul, 2020"
},
{
"code": null,
"e": 25302,
"s": 24882,
"text": "Strings in Java are the objects that are backed internally by a char array. Since arrays are immutable(cannot grow), Strings are immutable as well. Whenever a chan... |
Probability Learning I : Bayes’ Theorem | by z_ai | Towards Data Science | This post assumes you have some basic knowledge of probability and statistics. If you don’t, do not be afraid, I have gathered a list of the best resources I could find to introduce you to these subjects, so that you can read this post, understand it, and enjoy it to its fullest.
In it, we will talk about one of the mo... | [
{
"code": null,
"e": 452,
"s": 171,
"text": "This post assumes you have some basic knowledge of probability and statistics. If you don’t, do not be afraid, I have gathered a list of the best resources I could find to introduce you to these subjects, so that you can read this post, understand it, and... |
log4j - PatternLayout | If you want to generate your logging information in a particular format based on a pattern, then you can use org.apache.log4j.PatternLayout to format your logging information.
The PatternLayout class extends the abstract org.apache.log4j.Layout class and overrides the format() method to structure the logging informatio... | [
{
"code": null,
"e": 2002,
"s": 1826,
"text": "If you want to generate your logging information in a particular format based on a pattern, then you can use org.apache.log4j.PatternLayout to format your logging information."
},
{
"code": null,
"e": 2181,
"s": 2002,
"text": "The Pa... |
How to create and write JSON array to a file in java? | Java provides javax.json.Json package which contains classes to read a JSON array:
import java.io.FileOutputStream;
import javax.json.Json;
import javax.json.JsonArray;
import javax.json.JsonWriter;
public class JSONArrayToFile {
public static void main(String args[]) throws Exception {
JsonArray value = Json... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "Java provides javax.json.Json package which contains classes to read a JSON array:"
},
{
"code": null,
"e": 1814,
"s": 1145,
"text": "import java.io.FileOutputStream;\nimport javax.json.Json;\nimport javax.json.JsonArray;\nimport jav... |
Collator compare(String, String) method in Java with Example - GeeksforGeeks | 14 Aug, 2021
The compare() method of java.text.Collator class is used to compare the strength of two string and it will return 0, positive and negative values as an output according to the result.
Syntax:
public abstract int compare(String source,
String target)
Parameter: This method take... | [
{
"code": null,
"e": 24663,
"s": 24635,
"text": "\n14 Aug, 2021"
},
{
"code": null,
"e": 24847,
"s": 24663,
"text": "The compare() method of java.text.Collator class is used to compare the strength of two string and it will return 0, positive and negative values as an output acco... |
How to Delete Multiple RecyclerView Items in Android? - GeeksforGeeks | 20 Dec, 2021
RecyclerView is an advanced version of ListView with improved performance. When you have a long list of items to show you can use RecyclerView. It has the ability to reuse its views. In RecyclerView when the View goes out of the screen or is not visible to the user it won’t destroy it, it will reuse these ... | [
{
"code": null,
"e": 25036,
"s": 25008,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 25623,
"s": 25036,
"text": "RecyclerView is an advanced version of ListView with improved performance. When you have a long list of items to show you can use RecyclerView. It has the ability ... |
Count the number of items in an array in MongoDB? | To count the number of items in an array, you can use $size operator. The syntax is as follows:
db.yourCollectionName.aggregate({$project:{anyFieldName:{$size:"$yourArrayName"}}}).prett
y();
To understand the above syntax, let us create a collection with document. The query to create a collection with document is as fo... | [
{
"code": null,
"e": 1158,
"s": 1062,
"text": "To count the number of items in an array, you can use $size operator. The syntax is as follows:"
},
{
"code": null,
"e": 1253,
"s": 1158,
"text": "db.yourCollectionName.aggregate({$project:{anyFieldName:{$size:\"$yourArrayName\"}}}).... |
Java char Keyword | ❮ Java Keywords
char myGrade = 'B';
System.out.println(myGrade);
Try it Yourself »
The char keyword is a data type that is used to store a single character.
A char value must be surrounded by single quotes, like 'A' or 'c'.
Read more about data types in our Java Data Types Tutorial.
❮ Java Keywords
We just launch... | [
{
"code": null,
"e": 18,
"s": 0,
"text": "\n❮ Java Keywords\n"
},
{
"code": null,
"e": 68,
"s": 18,
"text": "char myGrade = 'B';\nSystem.out.println(myGrade);\n"
},
{
"code": null,
"e": 88,
"s": 68,
"text": "\nTry it Yourself »\n"
},
{
"code": null,
... |
Overloading unary operator in C++? | The operator keyword declares a function specifying what operator-symbol means when applied to instances of a class. This gives the operator more than one meaning, or "overloads" it. The compiler distinguishes between the different meanings of an operator by examining the types of its operands.
The unary operators oper... | [
{
"code": null,
"e": 1358,
"s": 1062,
"text": "The operator keyword declares a function specifying what operator-symbol means when applied to instances of a class. This gives the operator more than one meaning, or \"overloads\" it. The compiler distinguishes between the different meanings of an oper... |
Count frequencies of all elements in array in O(1) extra space and O(n) time - GeeksforGeeks | 13 Sep, 2021
Given an unsorted array of n integers that can contain integers from 1 to n. Some elements can be repeated multiple times and some other elements can be absent from the array. Count the frequency of all elements that are present and print the missing elements.
Examples:
Input: arr[] = {2, 3, 3, 2, 5}
Outp... | [
{
"code": null,
"e": 25180,
"s": 25152,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 25441,
"s": 25180,
"text": "Given an unsorted array of n integers that can contain integers from 1 to n. Some elements can be repeated multiple times and some other elements can be absent fro... |
Average with the Reduce Method in JavaScript | We are required to write a JavaScript function that takes in array of Numbers. The function should calculate the average of all the numbers in the array.
The only condition for us is that we have to do this using Array.prototype.reduce() method.
const arr = [129, 139, 155, 176];
const calculateAverage = (arr = []) => {... | [
{
"code": null,
"e": 1216,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in array of Numbers. The function should calculate the average of all the numbers in the array."
},
{
"code": null,
"e": 1308,
"s": 1216,
"text": "The only condition for us is... |
Bootstrap 4 - Forms | The form element is used to collect input from user by using fields such as checkboxes, radio buttons, or text fields etc.
You can wrap labels and controls in a <div> element with class .form-group and add a class of .form-control to all textual <input>, <textarea>, and <select> elements.
<html lang = "en">
<head>
... | [
{
"code": null,
"e": 1939,
"s": 1816,
"text": "The form element is used to collect input from user by using fields such as checkboxes, radio buttons, or text fields etc."
},
{
"code": null,
"e": 2106,
"s": 1939,
"text": "You can wrap labels and controls in a <div> element with cl... |
Java Program to add year to current date using Calendar.add method | Firstly, you need to import the following package for Calendar class in Java
import java.util.Calendar;
Create a Calendar object and display the current date and time
Calendar calendar = Calendar.getInstance();
System.out.println("Current Date and Time = " + calendar.getTime());
Now, let us add year using the calendar.... | [
{
"code": null,
"e": 1139,
"s": 1062,
"text": "Firstly, you need to import the following package for Calendar class in Java"
},
{
"code": null,
"e": 1166,
"s": 1139,
"text": "import java.util.Calendar;"
},
{
"code": null,
"e": 1229,
"s": 1166,
"text": "Create ... |
How to connect to an SQLite database using a JDBC program? | A. SQLite is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. It is a database, which is zero-configured, which means like other databases you do not need to configure it in your system.
SQLite engine is not a standalone process like other databa... | [
{
"code": null,
"e": 1323,
"s": 1062,
"text": "A. SQLite is an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. It is a database, which is zero-configured, which means like other databases you do not need to configure it in your ... |
How to Add Text Labels to Scatterplot in Python (Matplotlib/Seaborn) | by Abhijith Chandradas | Towards Data Science | Python is great for data visualization! Matplotlib is very fast and robust but lacks the aesthetic appeal. Seaborn library built over matplotlib has greatly improved the aesthetics and provides very sophisticated plots. However when it comes to scatter plots, these python libraries do not have any straight forward opti... | [
{
"code": null,
"e": 684,
"s": 172,
"text": "Python is great for data visualization! Matplotlib is very fast and robust but lacks the aesthetic appeal. Seaborn library built over matplotlib has greatly improved the aesthetics and provides very sophisticated plots. However when it comes to scatter pl... |
Advanced SQL Templates In Python with JinjaSql | by Sergei Izrailev | Towards Data Science | In A Simple Approach To Templated SQL Queries In Python, I introduced the basics of SQL templates in Python using JinjaSql. This post further demonstrates the power of Jinja2 within JinjaSql templates using presets, loops, and custom functions. Let’s consider an everyday use case when we have a table with some dimensio... | [
{
"code": null,
"e": 940,
"s": 172,
"text": "In A Simple Approach To Templated SQL Queries In Python, I introduced the basics of SQL templates in Python using JinjaSql. This post further demonstrates the power of Jinja2 within JinjaSql templates using presets, loops, and custom functions. Let’s cons... |
Twitter Text Analysis in R. Helping communication practitioners get... | by Kieran Tan Kah Wang | Towards Data Science | Open data sources are one of the best gifts for data scientists or analysts as they allow them to draw valuable insights for free, without having to worry about the data licenses. Twitter is one of the most popular social media application in the world as it’s free, and also allow users to tweet on any topics that come... | [
{
"code": null,
"e": 684,
"s": 172,
"text": "Open data sources are one of the best gifts for data scientists or analysts as they allow them to draw valuable insights for free, without having to worry about the data licenses. Twitter is one of the most popular social media application in the world as... |
MongoDB query select and display only a specific field from the document? | Let us first create a collection with documents −
> db.querySelectDemo.insertOne({UserId:100,UserName:"Chris",UserAge:25});
{
"acknowledged" : true,
"insertedId" : ObjectId("5ce90eb478f00858fb12e90e")
}
> db.querySelectDemo.insertOne({UserId:101,UserName:"Robert",UserAge:26});
{
"acknowledged" : true,
"inse... | [
{
"code": null,
"e": 1112,
"s": 1062,
"text": "Let us first create a collection with documents −"
},
{
"code": null,
"e": 1590,
"s": 1112,
"text": "> db.querySelectDemo.insertOne({UserId:100,UserName:\"Chris\",UserAge:25});\n{\n \"acknowledged\" : true,\n \"insertedId\" : Obj... |
Add CSS to the Jupyter Notebook using Pandas - GeeksforGeeks | 06 Dec, 2019
In Jupyter Notebook, when we print the output table of our data, it shows a very basic table containing the data. But what if we want to customize this default style? In this article, we will see how we can add styles to our output data table.
This is how a default data table looks like in Jupyter Notebook... | [
{
"code": null,
"e": 24212,
"s": 24184,
"text": "\n06 Dec, 2019"
},
{
"code": null,
"e": 24456,
"s": 24212,
"text": "In Jupyter Notebook, when we print the output table of our data, it shows a very basic table containing the data. But what if we want to customize this default sty... |
How to make text italic in HTML? | To make text italic in HTML, use the <i>...</i> tag or <em>...</em> tag. Both the tags have the same functioning, but <em> tag is a phrase tag, which renders as emphasized text.
Just keep in mind that you can get the same result in HTML with CSS font-style property.
You can try to run the following code to make text it... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "To make text italic in HTML, use the <i>...</i> tag or <em>...</em> tag. Both the tags have the same functioning, but <em> tag is a phrase tag, which renders as emphasized text."
},
{
"code": null,
"e": 1329,
"s": 1240,
"text": "Just... |
Tryit Editor v3.7 | CSS Color Keywords
Tryit: Using the currentcolor keyword | [
{
"code": null,
"e": 28,
"s": 9,
"text": "CSS Color Keywords"
}
] |
Build SMS Spam Classification Model using Naive Bayes & Random Forest | by Dhaval Thakur | Towards Data Science | If you are into data science and looking for starter projects then the SMS Spam classification Project is one of those you should work upon! In this tutorial, we would go step by step from importing libraries to full model prediction and lately measuring the accuracy of the model.
A good text classifier is a classifier... | [
{
"code": null,
"e": 453,
"s": 171,
"text": "If you are into data science and looking for starter projects then the SMS Spam classification Project is one of those you should work upon! In this tutorial, we would go step by step from importing libraries to full model prediction and lately measuring ... |
Time Series Analysis for Machine Learning | by Mauro Di Pietro | Towards Data Science | In descriptive statistics, a time series is defined as a set of random variables ordered with respect to time. Time series are studied both to interpret a phenomenon, identifying the components of a trend, cyclicity, seasonality and to predict its future values. I think they are the best example of conjunction between ... | [
{
"code": null,
"e": 593,
"s": 171,
"text": "In descriptive statistics, a time series is defined as a set of random variables ordered with respect to time. Time series are studied both to interpret a phenomenon, identifying the components of a trend, cyclicity, seasonality and to predict its future ... |
How to specify border colors in Bootstrap ? - GeeksforGeeks | 29 Dec, 2021
Bootstrap provides us with different classes that can be used with different HTML tags such as <button>, <a>, <input>, and <label> to apply custom button borders.These classes are as follows.
border
border-top
border-bottom
border-left
border-right
In this article, we will learn to implement border colors ... | [
{
"code": null,
"e": 25229,
"s": 25201,
"text": "\n29 Dec, 2021"
},
{
"code": null,
"e": 25421,
"s": 25229,
"text": "Bootstrap provides us with different classes that can be used with different HTML tags such as <button>, <a>, <input>, and <label> to apply custom button borders.T... |
How to set cursor style to pointer for links without href ? - GeeksforGeeks | 25 Sep, 2019
Method 1: Using a CSS class for the linksA CSS class is created that changes the cursor property. The cursor property is used to specify the mouse cursor to be displayed when the mouse is pointed over an element. Using the ‘pointer’ value in this property will change the cursor to a ‘pointer’ indicating a ... | [
{
"code": null,
"e": 25546,
"s": 25518,
"text": "\n25 Sep, 2019"
},
{
"code": null,
"e": 25859,
"s": 25546,
"text": "Method 1: Using a CSS class for the linksA CSS class is created that changes the cursor property. The cursor property is used to specify the mouse cursor to be dis... |
Audio processing in TensorFlow. An implementation of the Short Time... | by Dario Cazzani | Towards Data Science | There are countless ways to perform audio processing. The usual flow for running experiments with Artificial Neural Networks in TensorFlow with audio inputs is to first preprocess the audio, then feed it to the Neural Net.
What happens though when one wants to perform audio processing somewhere in the middle of the com... | [
{
"code": null,
"e": 395,
"s": 172,
"text": "There are countless ways to perform audio processing. The usual flow for running experiments with Artificial Neural Networks in TensorFlow with audio inputs is to first preprocess the audio, then feed it to the Neural Net."
},
{
"code": null,
... |
C# program to find the length of the Longest Consecutive 1’s in Binary Representation of a given integer | To fetch the consecutive 1’s, use the Bitwise Left Shift Operator. Here is our decimal number.
i = (i & (i << 1));
Loop the above until the value of I is 0 and fetch the length using a variable; count here.
while (i != 0) {
i = (i & (i << 1));
count++;
}
The example we have taken here is 150.
The binary for 150 i... | [
{
"code": null,
"e": 1157,
"s": 1062,
"text": "To fetch the consecutive 1’s, use the Bitwise Left Shift Operator. Here is our decimal number."
},
{
"code": null,
"e": 1177,
"s": 1157,
"text": "i = (i & (i << 1));"
},
{
"code": null,
"e": 1269,
"s": 1177,
"text... |
Schlumberger Interview Experience for Summer Internship - GeeksforGeeks | 16 Dec, 2020
Schlumberger an oil – field, and drilling company visited our campus for Summer Internship in December – 2020 for 3rd Year B.Tech students for different roles. They took 4 rounds of interview.
Round 1 (Coding and Aptitude): This round was taken in firstnaukri.com and consisted of 3 sections:-
This section ... | [
{
"code": null,
"e": 25134,
"s": 25106,
"text": "\n16 Dec, 2020"
},
{
"code": null,
"e": 25327,
"s": 25134,
"text": "Schlumberger an oil – field, and drilling company visited our campus for Summer Internship in December – 2020 for 3rd Year B.Tech students for different roles. The... |
Happy Numbers | 21 Jun, 2022
A Happy Number n is defined by the following process. Starting with n, replace it with the sum of the squares of its digits, and repeat the process until n equals 1, or it loops endlessly in a cycle which does not include 1. Those numbers for which this process ends in 1 are Happy Numbers, while those that... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n21 Jun, 2022"
},
{
"code": null,
"e": 513,
"s": 52,
"text": "A Happy Number n is defined by the following process. Starting with n, replace it with the sum of the squares of its digits, and repeat the process until n equals 1, or it lo... |
Types of Exception in Java with Examples | 16 Jun, 2022
Java defines several types of exceptions that relate to its various class libraries. Java also allows users to define their own exceptions.
Built-in exceptions are the exceptions that are available in Java libraries. These exceptions are suitable to explain certain error situations. Below is the list of i... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 195,
"s": 54,
"text": "Java defines several types of exceptions that relate to its various class libraries. Java also allows users to define their own exceptions. "
},
{
"code": null,
"... |
abs() function for complex number in c++ ? | The abs function in C++ is used to find the absolute value of a complex number. The absolute value of a complex number (also known as modulus) is the distance of that number from the origin in the complex plane. This can be found using the formula −
For complex number a+bi:
mod|a+bi| = √(a2+b2)
The abs() function retur... | [
{
"code": null,
"e": 1312,
"s": 1062,
"text": "The abs function in C++ is used to find the absolute value of a complex number. The absolute value of a complex number (also known as modulus) is the distance of that number from the origin in the complex plane. This can be found using the formula −"
... |
MySQL - SHOW CREATE PROCEDURE STATEMENT | Stored procedures are sub routines, segment of SQL statements which are stored in SQL catalog. All the applications that can access Relational databases (Java, Python, PHP etc.), can access stored procedures.
Stored procedures contain IN and OUT parameters or both. They may return result sets in case you use SELECT sta... | [
{
"code": null,
"e": 2542,
"s": 2333,
"text": "Stored procedures are sub routines, segment of SQL statements which are stored in SQL catalog. All the applications that can access Relational databases (Java, Python, PHP etc.), can access stored procedures."
},
{
"code": null,
"e": 2713,
... |
Batch Script - Remove | The string substitution feature can also be used to remove a substring from another string.
@echo off
set str = Batch scripts is easy. It is really easy.
echo %str%
set str = %str:is = %
echo %str%
The key thing to note about the above program is, the ‘is’ word is being removed from the string using the :’stringto... | [
{
"code": null,
"e": 2261,
"s": 2169,
"text": "The string substitution feature can also be used to remove a substring from another string."
},
{
"code": null,
"e": 2372,
"s": 2261,
"text": "@echo off \nset str = Batch scripts is easy. It is really easy. \necho %str% \n\nset str =... |
Are You Still Using Virtualenv for Managing Dependencies in Python Projects? | by Thuwarakesh Murallie | Towards Data Science | I was daunted by the complexities of projects when I started my data science career. We were using Virutalenv in all our python projects.
I’m impressed by the Node Package Manager (npm) and always wondered why we don’t have one like that in Python.
I was yearning for a single tool to maintain isolated environments, man... | [
{
"code": null,
"e": 310,
"s": 172,
"text": "I was daunted by the complexities of projects when I started my data science career. We were using Virutalenv in all our python projects."
},
{
"code": null,
"e": 421,
"s": 310,
"text": "I’m impressed by the Node Package Manager (npm) ... |
How to Deploy a Machine Learning UI on Heroku in 5 Steps | by Abubakar Abid | Towards Data Science | In this tutorial, I’m going to show you, step by step, how to create and deploy your machine learning model and UI on Heroku. I’ll use this drag-and-drop image interface that I created for the Inception Net model as an example:
You can try out the GUI at: https://arcane-tundra-83748.herokuapp.com/ (might take a minute ... | [
{
"code": null,
"e": 400,
"s": 172,
"text": "In this tutorial, I’m going to show you, step by step, how to create and deploy your machine learning model and UI on Heroku. I’ll use this drag-and-drop image interface that I created for the Inception Net model as an example:"
},
{
"code": null,... |
Selecting a single row in MySQL? | If you want to select a single row on the basis of primary key, use the WHERE clause. The syntax is as follows −
SELECT * FROM yourTableName WHERE yourPrimaryKeyColumnName = someValue;
To understand the above syntax, let us create a table. The query to create a table is as follows −
mysql> create table selectWithPrimar... | [
{
"code": null,
"e": 1175,
"s": 1062,
"text": "If you want to select a single row on the basis of primary key, use the WHERE clause. The syntax is as follows −"
},
{
"code": null,
"e": 1247,
"s": 1175,
"text": "SELECT * FROM yourTableName WHERE yourPrimaryKeyColumnName = someValu... |
Compressing and Decompressing files in C# | Use the System.IO.Compression Namespace in C# to compress and decompress files in C#.
To zip a file, use the GZipStream class with the FileStream class. Set the following parameters: File to be zipped and the name of the output zip file.
Here, outputFile is the output file and the file is read into the FileStream.
usin... | [
{
"code": null,
"e": 1148,
"s": 1062,
"text": "Use the System.IO.Compression Namespace in C# to compress and decompress files in C#."
},
{
"code": null,
"e": 1300,
"s": 1148,
"text": "To zip a file, use the GZipStream class with the FileStream class. Set the following parameters:... |
DAX Date & Time - CALENDAR function | Returns a table with a single column named “Date” that contains a contiguous set of dates. The range of dates is from the specified start date to the specified end date, inclusive of those two dates.
DAX CALENDAR function is new in Excel 2016.
CALENDAR (<start_date>, <end_date>)
start_date
Any DAX expression that ret... | [
{
"code": null,
"e": 2201,
"s": 2001,
"text": "Returns a table with a single column named “Date” that contains a contiguous set of dates. The range of dates is from the specified start date to the specified end date, inclusive of those two dates."
},
{
"code": null,
"e": 2245,
"s": 2... |
GANshare: Creating and Curating Art with AI | Towards Data Science | I first wrote about using Generative Adversarial Networks (GANs) to create visual art in August of 2020. For that project, MachineRay, I trained NVidia’s StyleGAN2 [1] with abstract paintings in the public domain to create new works. Since then, I have written a few more articles on using GANs to produce fine art. From... | [
{
"code": null,
"e": 659,
"s": 171,
"text": "I first wrote about using Generative Adversarial Networks (GANs) to create visual art in August of 2020. For that project, MachineRay, I trained NVidia’s StyleGAN2 [1] with abstract paintings in the public domain to create new works. Since then, I have wr... |
Callback function in C | The callback is basically any executable code that is passed as an argument to other code, that is expected to call back or execute the argument at a given time. We can define it in other words like this: If the reference of a function is passed to another function argument for calling, then it is called the callback f... | [
{
"code": null,
"e": 1391,
"s": 1062,
"text": "The callback is basically any executable code that is passed as an argument to other code, that is expected to call back or execute the argument at a given time. We can define it in other words like this: If the reference of a function is passed to anot... |
PHP SimpleXMLElement::asXML() Function | XML is a mark-up language to share the data across the web, XML is for both human read-able and machine read-able. The SimpleXMLElement class represents an XML document in PHP.
The SimpleXMLElement::asXML() function forms an XML string of the current SimpleXMLElement object and returns it. If you pass a string value re... | [
{
"code": null,
"e": 2934,
"s": 2757,
"text": "XML is a mark-up language to share the data across the web, XML is for both human read-able and machine read-able. The SimpleXMLElement class represents an XML document in PHP."
},
{
"code": null,
"e": 3173,
"s": 2934,
"text": "The S... |
Aggregation and Grouping. GSoC: Implementing DataFrame in Pharo | by Oleksandr Zaitsev | Towards Data Science | This is the first implementation of aggregation and grouping in a Pharo DataFrame. It covers only the basic functionality, such as grouping a data frame or a series by the values of another series of the corresponding size, and then applying the aggregation functions to the grouped data structures.
In the next iteratio... | [
{
"code": null,
"e": 472,
"s": 172,
"text": "This is the first implementation of aggregation and grouping in a Pharo DataFrame. It covers only the basic functionality, such as grouping a data frame or a series by the values of another series of the corresponding size, and then applying the aggregati... |
How to save a csv and read using fread in R? | To save a csv file, we can use write.csv function in R and if we want to read it using fread then fread function will be used with the name of the csv file. The benefit of reading the csv file with fread function is that there will be a variable added to the original csv file which contains the id as integers starting ... | [
{
"code": null,
"e": 1421,
"s": 1062,
"text": "To save a csv file, we can use write.csv function in R and if we want to read it using fread then fread function will be used with the name of the csv file. The benefit of reading the csv file with fread function is that there will be a variable added t... |
How to handle invalid arguments with argparse in Python? | We rewrite the given code as follows
#foo.py
import argparse
class InvalidArgError(Exception):pass
parser = argparse.ArgumentParser()
parser.add_argument("echo")
args = parser.parse_args()
try:
print (args.echo)
raise InvalidArgError
except InvalidArgError as e:
print e
When this script is run at the terminal as follow... | [
{
"code": null,
"e": 1099,
"s": 1062,
"text": "We rewrite the given code as follows"
},
{
"code": null,
"e": 1333,
"s": 1099,
"text": "#foo.py\nimport argparse\nclass InvalidArgError(Exception):pass\nparser = argparse.ArgumentParser()\nparser.add_argument(\"echo\")\nargs = parser... |
Kotlin | Class Properties and Custom Accessors - GeeksforGeeks | 18 Aug, 2021
The basic and most important idea of a class is Encapsulation. It is a property to encapsulate code and data, into a single entity. In Java, the data are stored in the fields and these are mostly private. So, accessor methods – a getter and a setter are provided to let the clients of the given class access... | [
{
"code": null,
"e": 23601,
"s": 23573,
"text": "\n18 Aug, 2021"
},
{
"code": null,
"e": 24044,
"s": 23601,
"text": "The basic and most important idea of a class is Encapsulation. It is a property to encapsulate code and data, into a single entity. In Java, the data are stored in... |
Calculate Median from given values of Mean and Mode - GeeksforGeeks | 18 Aug, 2021
Given two integers mean and mode, representing the Mean and Mode of a random group of data, the task is to calculate the median of that group of data.
Input: mean = 3, mode = 6Output: 4
Input: mean = 1, mode = 1Output : 1
Approach: The given problem can be solved by using the mathematical relationship betw... | [
{
"code": null,
"e": 24301,
"s": 24273,
"text": "\n18 Aug, 2021"
},
{
"code": null,
"e": 24452,
"s": 24301,
"text": "Given two integers mean and mode, representing the Mean and Mode of a random group of data, the task is to calculate the median of that group of data."
},
{
... |
ps command in Linux with Examples - GeeksforGeeks | 10 Jan, 2022
As we all know Linux is a multitasking and multi-user systems. So, it allows multiple processes to operate simultaneously without interfering with each other. Process is one of the important fundamental concept of the Linux OS. A process is an executing instance of a program and carry out different tasks w... | [
{
"code": null,
"e": 24163,
"s": 24135,
"text": "\n10 Jan, 2022"
},
{
"code": null,
"e": 24499,
"s": 24163,
"text": "As we all know Linux is a multitasking and multi-user systems. So, it allows multiple processes to operate simultaneously without interfering with each other. Proc... |
Count sub-matrices having sum divisible 'k' - GeeksforGeeks | 20 May, 2021
Given a n x n matrix of integers and a positive integer k. The problem is to count all sub-matrices having sum divisible by the given value k.Examples:
Input : mat[][] = { {5, -1, 6},
{-2, 3, 8},
{7, 4, -9} }
k = 4
Output : 6
The index range for the sub-matrices are:
(0,... | [
{
"code": null,
"e": 24313,
"s": 24285,
"text": "\n20 May, 2021"
},
{
"code": null,
"e": 24467,
"s": 24313,
"text": "Given a n x n matrix of integers and a positive integer k. The problem is to count all sub-matrices having sum divisible by the given value k.Examples: "
},
{... |
C++ Array Library - fill() Function | The C++ function std::array::fill() sets given value to all elements of array.
Following is the declaration for std::array::fill() function form std::array header.
void fill(const value_type &val);
val − value to be set
None
None
Linear i.e. O(n)
The following example shows the usage of std::array::fill() function.
#in... | [
{
"code": null,
"e": 2682,
"s": 2603,
"text": "The C++ function std::array::fill() sets given value to all elements of array."
},
{
"code": null,
"e": 2767,
"s": 2682,
"text": "Following is the declaration for std::array::fill() function form std::array header."
},
{
"cod... |
Building Multiple Indexes at once in MongoDB? | In order to build multiple indexes at once, you need to use createIndexes() and pass multiple keys into an array. Following is the query for building multiple indexes at once.
>db.multipleIndexesDemo.createIndexes([{"First":1},{"Second":1},{"Third":1},{"Fourth":1},{"Fifth":1}]);
This will produce the following output
{... | [
{
"code": null,
"e": 1238,
"s": 1062,
"text": "In order to build multiple indexes at once, you need to use createIndexes() and pass multiple keys into an array. Following is the query for building multiple indexes at once."
},
{
"code": null,
"e": 1342,
"s": 1238,
"text": ">db.mu... |
Scala | Exception Handling - GeeksforGeeks | 15 Nov, 2019
What is an Exception?
An exception is an unwanted or unexpected event, which occurs during the execution of a program i.e at run time. These events change the flow control of the program in execution. These are situations that are not too dangerous and can be handled by the program.
Exception Hierarchy
All... | [
{
"code": null,
"e": 25233,
"s": 25205,
"text": "\n15 Nov, 2019"
},
{
"code": null,
"e": 25255,
"s": 25233,
"text": "What is an Exception?"
},
{
"code": null,
"e": 25517,
"s": 25255,
"text": "An exception is an unwanted or unexpected event, which occurs during... |
Firebase RealTime Database with Operations in Android with Examples - GeeksforGeeks | 28 Jun, 2019
Firebase Realtime Database is a Cloud hosted database, i.e. it runs on a cloud and access to the user is provided as a service. It stores data in JSON (Javascript Object Notation) format, a format to store or transport data. All the users connected to it can get access to the data at Real Time.
Real Time: ... | [
{
"code": null,
"e": 26535,
"s": 26507,
"text": "\n28 Jun, 2019"
},
{
"code": null,
"e": 26831,
"s": 26535,
"text": "Firebase Realtime Database is a Cloud hosted database, i.e. it runs on a cloud and access to the user is provided as a service. It stores data in JSON (Javascript ... |
Time Difference between given times in HH:MM:SS format - GeeksforGeeks | 20 Dec, 2021
Given 2 times ‘st‘ and ‘et‘ in HH: MM: SS format. The task is to print the time difference between st and et in HH:MM: SS format
Examples:
Input: st = 13:50:45, et = 14:55:50Output: 01:05:05Explanation: The time gap is 1 hour 5 minutes and 5 seconds.
Input: st = 12:00:00, et = 24:00:00Output: 12:00:00Expl... | [
{
"code": null,
"e": 25937,
"s": 25909,
"text": "\n20 Dec, 2021"
},
{
"code": null,
"e": 26067,
"s": 25937,
"text": "Given 2 times ‘st‘ and ‘et‘ in HH: MM: SS format. The task is to print the time difference between st and et in HH:MM: SS format "
},
{
"code": null,
"... |
return statement in C/C++ with Examples - GeeksforGeeks | 23 Feb, 2022
Pre-requisite: Functions in C/C++
The return statement returns the flow of the execution to the function from where it is called. This statement does not mandatorily need any conditional statements. As soon as the statement is executed, the flow of the program stops immediately and returns the control from... | [
{
"code": null,
"e": 25854,
"s": 25826,
"text": "\n23 Feb, 2022"
},
{
"code": null,
"e": 25888,
"s": 25854,
"text": "Pre-requisite: Functions in C/C++"
},
{
"code": null,
"e": 26318,
"s": 25888,
"text": "The return statement returns the flow of the execution t... |
Get Level of a node in a Binary Tree - GeeksforGeeks | 02 May, 2022
Given a Binary Tree and a key, write a function that returns level of the key. For example, consider the following tree. If the input key is 3, then your function should return 1. If the input key is 4, then your function should return 3. And for key which is not present in key, then your function should r... | [
{
"code": null,
"e": 26515,
"s": 26487,
"text": "\n02 May, 2022"
},
{
"code": null,
"e": 26832,
"s": 26515,
"text": "Given a Binary Tree and a key, write a function that returns level of the key. For example, consider the following tree. If the input key is 3, then your function ... |
Correct the Random Pointer in Doubly Linked List - GeeksforGeeks | 23 Sep, 2020
Given a doubly linked list having exactly one of the node pointing to a random node in the list, the task is to correct this random pointer in the doubly linked list, such that it points to the expected node.Examples:
Input:
Output:
Explanation: 2’s next pointer has been corrected to point to 3. Earlie... | [
{
"code": null,
"e": 26204,
"s": 26176,
"text": "\n23 Sep, 2020"
},
{
"code": null,
"e": 26424,
"s": 26204,
"text": "Given a doubly linked list having exactly one of the node pointing to a random node in the list, the task is to correct this random pointer in the doubly linked li... |
AngularJS | angular.isString() Function - GeeksforGeeks | 12 Apr, 2019
The angular.isString() function in AngularJS is used to determine the parameter inside isString function is a string or not. It returns true if the reference is a string otherwise returns false.
Syntax:
angular.isString( value )
Return Value: It returns true if the value passed is a string otherwise return... | [
{
"code": null,
"e": 29516,
"s": 29488,
"text": "\n12 Apr, 2019"
},
{
"code": null,
"e": 29711,
"s": 29516,
"text": "The angular.isString() function in AngularJS is used to determine the parameter inside isString function is a string or not. It returns true if the reference is a ... |
Deep Learning in R Programming - GeeksforGeeks | 20 Aug, 2020
Deep Learning is a type of Artificial Intelligence or AI function that tries to imitate or mimic the working principle of a human brain for data processing and pattern creation for decision-making purposes. It is a subset of ML or machine learning in an AI that owns or have networks that are capable of uns... | [
{
"code": null,
"e": 30289,
"s": 30261,
"text": "\n20 Aug, 2020"
},
{
"code": null,
"e": 31197,
"s": 30289,
"text": "Deep Learning is a type of Artificial Intelligence or AI function that tries to imitate or mimic the working principle of a human brain for data processing and pat... |
How to Update Data in Firebase Firestore in Android? - GeeksforGeeks | 17 Jan, 2021
In the previous article, we have seen on How to Add Data to Firebase Firestore in Android, How to Read the data from Firebase Firestore in Android. Now we will see How to Update this added data inside our Firebase Firestore. Now we will move towards the implementation of this updating data in Android Fireb... | [
{
"code": null,
"e": 26901,
"s": 26873,
"text": "\n17 Jan, 2021"
},
{
"code": null,
"e": 27215,
"s": 26901,
"text": "In the previous article, we have seen on How to Add Data to Firebase Firestore in Android, How to Read the data from Firebase Firestore in Android. Now we will see... |
StringJoiner Class vs String.join() Method to Join String in Java with Examples - GeeksforGeeks | 05 Feb, 2021
Prior to Java 8 when we need to concatenate a group of strings we need to write that code manually in addition to this we needed to repeatedly use delimiter and sometimes it leads to several mistakes but after Java 8 we can concatenate the strings using StringJoiner class and String.join() method then we c... | [
{
"code": null,
"e": 26103,
"s": 26075,
"text": "\n05 Feb, 2021"
},
{
"code": null,
"e": 26438,
"s": 26103,
"text": "Prior to Java 8 when we need to concatenate a group of strings we need to write that code manually in addition to this we needed to repeatedly use delimiter and so... |
Does overloading work with Inheritance? - GeeksforGeeks | 21 Sep, 2021
If we have a function in base class and a function with same name in derived class, can the base class function be called from derived class object? This is an interesting question and as an experiment predict the output of the following C++ program.
C++
#include <iostream>using namespace std;class Base{p... | [
{
"code": null,
"e": 26281,
"s": 26253,
"text": "\n21 Sep, 2021"
},
{
"code": null,
"e": 26533,
"s": 26281,
"text": "If we have a function in base class and a function with same name in derived class, can the base class function be called from derived class object? This is an int... |
Adding new enum column to an existing MySQL table? | To add a new enum column to an existing MySQL table, you can use ALTER command. Following is the syntax:
ALTER TABLE yourTableName ADD yourColumnName ENUM('yourValue1','yourValue2’....N) NOT NULL;
Let us first create a table:
mysql> create table DemoTable
(
StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
Stude... | [
{
"code": null,
"e": 1167,
"s": 1062,
"text": "To add a new enum column to an existing MySQL table, you can use ALTER command. Following is the syntax:"
},
{
"code": null,
"e": 1259,
"s": 1167,
"text": "ALTER TABLE yourTableName ADD yourColumnName ENUM('yourValue1','yourValue2’..... |
Tableau-like Drag and Drop GUI Visualization in R | by AbdulMajedRaja RS | Towards Data Science | One of the the few things that Self-service Data Visualization tools like Tableau and Qlik offer that sophisticated Data Science Languages like R and Python do not offer is — The Drag and Drop GUI to create Visualizations. The flexibility with which you can simply drag and drop your Dimensions and Metrics is so intuiti... | [
{
"code": null,
"e": 580,
"s": 171,
"text": "One of the the few things that Self-service Data Visualization tools like Tableau and Qlik offer that sophisticated Data Science Languages like R and Python do not offer is — The Drag and Drop GUI to create Visualizations. The flexibility with which you c... |
How to find the highest number in a column? | You can find the highest number in a column with the help of aggregate function MAX. The syntax is as follows −
select max(yourColumnName) as anyVariableName from yourTableName;
To understand the above concept, let us create a table with an int column. The following is the query to create a table.
mysql> create table H... | [
{
"code": null,
"e": 1174,
"s": 1062,
"text": "You can find the highest number in a column with the help of aggregate function MAX. The syntax is as follows −"
},
{
"code": null,
"e": 1240,
"s": 1174,
"text": "select max(yourColumnName) as anyVariableName from yourTableName;"
}... |
How to create custom Alert Dialogs in an Android App using Kotlin? | This example demonstrates how to create custom Alert Dialogs in an Android App 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": 1155,
"s": 1062,
"text": "This example demonstrates how to create custom Alert Dialogs in an Android App using Kotlin."
},
{
"code": null,
"e": 1284,
"s": 1155,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all re... |
How to extract column from data frame as vector in R ? | 07 Apr, 2021
In this article, we are going to convert dataframe column into a vector in R Programming Language.
Create vectors
Create a dataframe by passing these vectors
Convert dataframe column using“[[]]” operator (indexing). [[]] is used to access the dataframe column.It is used to index the dataframe.
Syntax:
data... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 127,
"s": 28,
"text": "In this article, we are going to convert dataframe column into a vector in R Programming Language."
},
{
"code": null,
"e": 142,
"s": 127,
"text": "Create ... |
Sort an array with swapping only with a special element is allowed | 15 Jun, 2022
Given an array of length n + 1, containing elements 1 through n and a space, Requires the use of a given swap (index i, index j) function to sort the array, You can only swap the gap and a number, in the end, put the gap at the end. There will be a number 999 in the array as a gap or space.
Examples:
Inp... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Jun, 2022"
},
{
"code": null,
"e": 345,
"s": 52,
"text": "Given an array of length n + 1, containing elements 1 through n and a space, Requires the use of a given swap (index i, index j) function to sort the array, You can only swap... |
How to Load a Massive File as small chunks in Pandas? | 01 Oct, 2020
Pandas in flexible and easy to use open-source data analysis tool build on top of python which makes importing and visualizing data of different formats like .csv, .tsv, .txt and even .db files.
For the below examples we will be considering only .csv file but the process is similar for other file types. Th... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 223,
"s": 28,
"text": "Pandas in flexible and easy to use open-source data analysis tool build on top of python which makes importing and visualizing data of different formats like .csv, .tsv, .txt ... |
Python - Graph Algorithms | Graphs are very useful data structures in solving many important mathematical challenges. For example computer network topology or analysing molecular structures of chemical compounds. They are also used in city traffic or route planning and even in human languages and their grammar. All these applications have a commo... | [
{
"code": null,
"e": 2978,
"s": 2461,
"text": "Graphs are very useful data structures in solving many important mathematical challenges. For example computer network topology or analysing molecular structures of chemical compounds. They are also used in city traffic or route planning and even in hum... |
putpixel() function in C | 23 Jan, 2018
The header file graphics.h contains putpixel() function which plots a pixel at location (x, y) of specified color.Syntax :
void putpixel(int x, int y, int color);
where,
(x, y) is the location at which pixel
is to be put , and color specifies
the color of the pixel.
Explanation : A RED color pixel at (... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jan, 2018"
},
{
"code": null,
"e": 177,
"s": 54,
"text": "The header file graphics.h contains putpixel() function which plots a pixel at location (x, y) of specified color.Syntax :"
},
{
"code": null,
"e": 325,
"s": ... |
MongoDB – db.collection.findOneAndUpdate() Method | 17 Feb, 2021
The findOneAndUpdate() method updates the first matched document in the collection that matches the selection criteria. If more than one document matched the selection criteria then it updates only the first matched document. When we update the document, the value of the _id field remains unchanged. This m... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Feb, 2021"
},
{
"code": null,
"e": 761,
"s": 28,
"text": "The findOneAndUpdate() method updates the first matched document in the collection that matches the selection criteria. If more than one document matched the selection criteri... |
How to Change Legend Font Size in Matplotlib? | 22 Nov, 2021
Matplotlib is a library for creating interactive visualizations in Python. The functions in matplotlib make it work like MATLAB software. The legend() method in matplotlib describes the elements in the plot. In this article, we are going to Change Legend Font Size in Matplotlib.
Syntax:
matplotlib.pyplot.l... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Nov, 2021"
},
{
"code": null,
"e": 334,
"s": 54,
"text": "Matplotlib is a library for creating interactive visualizations in Python. The functions in matplotlib make it work like MATLAB software. The legend() method in matplotlib de... |
Python Pandas - Iteration | The behavior of basic iteration over Pandas objects depends on the type. When iterating over a Series, it is regarded as array-like, and basic iteration produces the values. Other data structures, like DataFrame and Panel, follow the dict-like convention of iterating over the keys of the objects.
In short, basic iterat... | [
{
"code": null,
"e": 2875,
"s": 2577,
"text": "The behavior of basic iteration over Pandas objects depends on the type. When iterating over a Series, it is regarded as array-like, and basic iteration produces the values. Other data structures, like DataFrame and Panel, follow the dict-like conventio... |
Sort an array according to absolute difference with given value | 28 Jun, 2021
Given an array of n distinct elements and a number x, arrange array elements according to the absolute difference with x, i. e., an element having minimum difference comes first, and so on. Note: If two or more elements are at equal distance arrange them in the same sequence as in the given array.Examples ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 364,
"s": 54,
"text": "Given an array of n distinct elements and a number x, arrange array elements according to the absolute difference with x, i. e., an element having minimum difference comes fi... |
Genetic Algorithms | 27 Apr, 2022
Genetic Algorithms(GAs) are adaptive heuristic search algorithms that belong to the larger part of evolutionary algorithms. Genetic algorithms are based on the ideas of natural selection and genetics. These are intelligent exploitation of random search provided with historical data to direct the search int... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Apr, 2022"
},
{
"code": null,
"e": 520,
"s": 54,
"text": "Genetic Algorithms(GAs) are adaptive heuristic search algorithms that belong to the larger part of evolutionary algorithms. Genetic algorithms are based on the ideas of natur... |
Given an n x n square matrix, find sum of all sub-squares of size k x k | 23 Jun, 2022
Given an n x n square matrix, find sum of all sub-squares of size k x k where k is smaller than or equal to n.
Examples :
Input:
n = 5, k = 3
arr[][] = { {1, 1, 1, 1, 1},
{2, 2, 2, 2, 2},
{3, 3, 3, 3, 3},
{4, 4, 4, 4, 4},
{5, 5, 5, 5, 5},
};
Output... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 164,
"s": 52,
"text": "Given an n x n square matrix, find sum of all sub-squares of size k x k where k is smaller than or equal to n. "
},
{
"code": null,
"e": 176,
"s": 164,
"t... |
ES6 | Array filter() Method | 28 May, 2022
The Array filter() is an inbuilt method, this method creates a new array with elements that follow or pass the given criteria and condition. Few Examples have been implemented below for a better understanding of the concept Syntax:
var newArray = arr.filter(callback(element[, index[, array]])
[, thisArg])
... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 May, 2022"
},
{
"code": null,
"e": 260,
"s": 28,
"text": "The Array filter() is an inbuilt method, this method creates a new array with elements that follow or pass the given criteria and condition. Few Examples have been implemented... |
Python | Numpy numpy.matrix.any() | 08 Apr, 2019
With the help of Numpy numpy.matrix.any() method, we are able to compare each and every element of one matrix with another or we can provide the axis on the we want to apply comparison if any of the element matches it return true.
Syntax : numpy.matrix.any()
Return : Return true if any match found else fal... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Apr, 2019"
},
{
"code": null,
"e": 259,
"s": 28,
"text": "With the help of Numpy numpy.matrix.any() method, we are able to compare each and every element of one matrix with another or we can provide the axis on the we want to apply c... |
How to use SQLite database with an Android application? | This example demonstrates how do I use the SQLite database with an android application.
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-8"?>... | [
{
"code": null,
"e": 1275,
"s": 1187,
"text": "This example demonstrates how do I use the SQLite database with an android application."
},
{
"code": null,
"e": 1404,
"s": 1275,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all require... |
FilePathField – Django Models | 12 Feb, 2020
FilePathField is a CharField whose choices are limited to the filenames in a certain directory on the filesystem. FilePathField instances are created in your database as varchar columns with a default max length of 100 characters.
Syntax:
field_name = models.FilePathField(path=None, match=None, recursive=F... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Feb, 2020"
},
{
"code": null,
"e": 259,
"s": 28,
"text": "FilePathField is a CharField whose choices are limited to the filenames in a certain directory on the filesystem. FilePathField instances are created in your database as varch... |
How to align content of a div to the bottom using CSS ? | 30 Jun, 2022
Basic property of CSS:
position: The position property specifies the type of positioning method used for an elements. For example static, relative, absolute and fixed.
bottom: The bottom property affects the vertical position of a positioned element. This property has no effect on non-positioned elements.
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n30 Jun, 2022"
},
{
"code": null,
"e": 75,
"s": 52,
"text": "Basic property of CSS:"
},
{
"code": null,
"e": 220,
"s": 75,
"text": "position: The position property specifies the type of positioning method used for an... |
Expression must have class type error in C++ | 20 Jun, 2022
The expression must have class type is an error that is thrown when the dot(.) operator is used to access an object’s properties, is used on pointers to objects.
Dot(‘.’) Operator is basically used for accessing the fields and methods of an object, but when a dot operator is used on the pointer to object i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 214,
"s": 52,
"text": "The expression must have class type is an error that is thrown when the dot(.) operator is used to access an object’s properties, is used on pointers to objects."
},
{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.