title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
numpy.full() in Python | 09 Mar, 2022
numpy.full(shape, fill_value, dtype = None, order = ‘C’) : Return a new array with the same shape and type as a given array filled with a fill_value.Parameters :
shape : Number of rows
order : C_contiguous or F_contiguous
dtype : [optional, float(by Default)] Data type of returned array.
f... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n09 Mar, 2022"
},
{
"code": null,
"e": 215,
"s": 53,
"text": "numpy.full(shape, fill_value, dtype = None, order = ‘C’) : Return a new array with the same shape and type as a given array filled with a fill_value.Parameters :"
},
{
... |
Mutual exclusion in distributed system | 30 Apr, 2019
Mutual exclusion is a concurrency control property which is introduced to prevent race conditions. It is the requirement that a process can not enter its critical section while another concurrent process is currently present or executing in its critical section i.e only one process is allowed to execute th... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n30 Apr, 2019"
},
{
"code": null,
"e": 410,
"s": 53,
"text": "Mutual exclusion is a concurrency control property which is introduced to prevent race conditions. It is the requirement that a process can not enter its critical section whi... |
Python – Sort words separated by Delimiter | 22 Jul, 2021
Given string of words separated by some delimiter. The task is to sort all the words given in the string
Input : test_str = 'gfg:is:best:for:geeks', delim = "*"
Output : best*for*geeks*gfg*is
Explanation : Words sorted after separated by delim.
Input : test_str = 'gfg:is:best', delim = "*"
Output : bes... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n22 Jul, 2021"
},
{
"code": null,
"e": 133,
"s": 28,
"text": "Given string of words separated by some delimiter. The task is to sort all the words given in the string"
},
{
"code": null,
"e": 399,
"s": 133,
"text": "I... |
PyQt5 – Set color to a status bar | 26 Mar, 2020
In this article, we will see how to set a color to a status bar. By default, there is no color to a status bar but PyQt5 provides us a feature to edit the color of status bar. We can do this by using setStyleSheet() method.
self.statusBar().setStyleSheet(“background-color : yellow”)
Argument : It takes str... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Mar, 2020"
},
{
"code": null,
"e": 252,
"s": 28,
"text": "In this article, we will see how to set a color to a status bar. By default, there is no color to a status bar but PyQt5 provides us a feature to edit the color of status bar.... |
K-th lexicographical string of given length | 05 Aug, 2021
Given two integers N and K, the task is to find lexicographically Kth string of length N. If the number of possible strings of length N is less than K, print -1.Examples:
Input: N = 3, K = 10 Output: “aaj” Explanation: The 10th string in the lexicographical order starting from “aaa” is “aaj”.Input: N = 2... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 227,
"s": 54,
"text": "Given two integers N and K, the task is to find lexicographically Kth string of length N. If the number of possible strings of length N is less than K, print -1.Examples: "
... |
How to Show Mean on Boxplot using Seaborn in Python? | 16 Jun, 2021
A boxplot is a powerful data visualization tool used to understand the distribution of data. It splits the data into quartiles, and summarises it based on five numbers derived from these quartiles:
median: the middle value of data. marked as Q2, portrays the 50th percentile.
first quartile: the middle valu... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Jun, 2021"
},
{
"code": null,
"e": 250,
"s": 52,
"text": "A boxplot is a powerful data visualization tool used to understand the distribution of data. It splits the data into quartiles, and summarises it based on five numbers derive... |
Difference between “resetting” and “normalizing” in CSS | 01 Aug, 2021
CSS (Cascading Style Sheets) is a stylesheet language for describing the presentation of an HTML or XML document (including XML dialects such as SVG, MathML or XHTML). CSS specifies how elements should appear on a screen, on paper, in speech, or in other forms of media.
While using CSS the developer may en... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 Aug, 2021"
},
{
"code": null,
"e": 324,
"s": 53,
"text": "CSS (Cascading Style Sheets) is a stylesheet language for describing the presentation of an HTML or XML document (including XML dialects such as SVG, MathML or XHTML). CSS sp... |
Node.js console.log() Function | 14 Oct, 2021
The console.log() function from console class of Node.js is used to display the messages on the console. It prints to stdout with newline.
Syntax:
console.log( [data][, ...] )
Parameter: This function contains multiple parameters which are to be printed.
Return type: The function returns the passed parame... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n14 Oct, 2021"
},
{
"code": null,
"e": 167,
"s": 28,
"text": "The console.log() function from console class of Node.js is used to display the messages on the console. It prints to stdout with newline."
},
{
"code": null,
"e":... |
Friedman Test | 26 Nov, 2020
Friedman Test: It is a non-parametric test alternative to the one way ANOVA with repeated measures. It tries to determine if subjects changed significantly across occasions/conditions. For example:- Problem-solving ability of a set of people is the same or different in Morning, Afternoon, Evening. It is us... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n26 Nov, 2020"
},
{
"code": null,
"e": 486,
"s": 28,
"text": "Friedman Test: It is a non-parametric test alternative to the one way ANOVA with repeated measures. It tries to determine if subjects changed significantly across occasions/co... |
Python Program for Reversal algorithm for array rotation | 22 Jun, 2022
Write a function rotate(arr[], d, n) that rotates arr[] of size n by d elements.
Example :
Input : arr[] = [1, 2, 3, 4, 5, 6, 7]
d = 2
Output : arr[] = [3, 4, 5, 6, 7, 1, 2]
Rotation of the above array by 2 will make array
# Python program for reversal algorithm of array rotation # Function to ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n22 Jun, 2022"
},
{
"code": null,
"e": 135,
"s": 54,
"text": "Write a function rotate(arr[], d, n) that rotates arr[] of size n by d elements."
},
{
"code": null,
"e": 145,
"s": 135,
"text": "Example :"
},
{
... |
Python program to check if a string contains all unique characters | 23 May, 2022
To implement an algorithm to determine if a string contains all unique characters. Examples:
Input : s = “abcd” Output: True “abcd” doesn’t contain any duplicates. Hence the output is True.
Input : s = “abbd” Output: False “abbd” contains duplicates. Hence the output is False.
One solution is to create an... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n23 May, 2022"
},
{
"code": null,
"e": 146,
"s": 52,
"text": "To implement an algorithm to determine if a string contains all unique characters. Examples: "
},
{
"code": null,
"e": 243,
"s": 146,
"text": "Input : s =... |
Social Network Analysis Using R Programming | 01 Jun, 2020
Social Network Analysis (SNA) is the process of exploring or examining the social structure by using graph theory. It is used for measuring and analyzing the structural properties of the network. It helps to measure relationships and flows between groups, organizations, and other connected entities.
Before... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 Jun, 2020"
},
{
"code": null,
"e": 354,
"s": 53,
"text": "Social Network Analysis (SNA) is the process of exploring or examining the social structure by using graph theory. It is used for measuring and analyzing the structural prope... |
Lodash _.unzip() Method | 28 Aug, 2020
The _.unzip method is similar to _.zip (i.e.; it creates an array of grouped elements) except that it accepts an array of grouped elements and also creates an array regrouping the elements to their pre-zip configuration.
Syntax:
_.unzip(array)
Parameters: This method accepts a single parameters as mention... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Aug, 2020"
},
{
"code": null,
"e": 249,
"s": 28,
"text": "The _.unzip method is similar to _.zip (i.e.; it creates an array of grouped elements) except that it accepts an array of grouped elements and also creates an array regrouping... |
java.time.Duration.of() Method Example | The java.time.Duration.of(long amount, TemporalUnit unit) method obtains a Duration representing an amount in the specified unit.
Following is the declaration for java.time.Duration.of(long amount, TemporalUnit unit) method.
public static Duration of(long amount, TemporalUnit unit)
amount − the amount of the duration,... | [
{
"code": null,
"e": 2045,
"s": 1915,
"text": "The java.time.Duration.of(long amount, TemporalUnit unit) method obtains a Duration representing an amount in the specified unit."
},
{
"code": null,
"e": 2140,
"s": 2045,
"text": "Following is the declaration for java.time.Duration.... |
How to set the Size of the RichTextBox in C#? - GeeksforGeeks | 02 Aug, 2019
In C#, RichTextBox control is a textbox which gives you rich text editing controls and advanced formatting features also includes a loading rich text format (RTF) files. Or in other words, RichTextBox controls allows you to display or edit flow content, including paragraphs, images, tables, etc. In RichTex... | [
{
"code": null,
"e": 24137,
"s": 24109,
"text": "\n02 Aug, 2019"
},
{
"code": null,
"e": 24664,
"s": 24137,
"text": "In C#, RichTextBox control is a textbox which gives you rich text editing controls and advanced formatting features also includes a loading rich text format (RTF) ... |
Minimum distance between two numbers | Practice | GeeksforGeeks | You are given an array A, of N elements. Find minimum index based distance between two elements of the array, x and y.
Example 1:
Input:
N = 4
A[] = {1,2,3,2}
x = 1, y = 2
Output: 1
Explanation: x = 1 and y = 2. There are
two distances between x and y, which are
1 and 3 out of which the least is 1.
Example 2:
Input:
N... | [
{
"code": null,
"e": 357,
"s": 238,
"text": "You are given an array A, of N elements. Find minimum index based distance between two elements of the array, x and y."
},
{
"code": null,
"e": 368,
"s": 357,
"text": "Example 1:"
},
{
"code": null,
"e": 539,
"s": 368,
... |
Create Trending Animated Bar Charts using R | by AbdulMajedRaja RS | Towards Data Science | Recently, Animated Bar Plots have started going Viral on Social Media leaving a lot of Data Enthusiasts wondering how are these Animated Bar Plots made. The objective of this post is to explain how to build such an Animated Bar Plot using R — R with the power of versatile packages.
The packages that are required to bui... | [
{
"code": null,
"e": 454,
"s": 171,
"text": "Recently, Animated Bar Plots have started going Viral on Social Media leaving a lot of Data Enthusiasts wondering how are these Animated Bar Plots made. The objective of this post is to explain how to build such an Animated Bar Plot using R — R with the p... |
C# Program to Count trailing zeroes in factorial of a number - GeeksforGeeks | 02 Jan, 2019
Given an integer n, write a function that returns count of trailing zeroes in n!.
Examples :
Input: n = 5
Output: 1
Factorial of 5 is 120 which has one trailing 0.
Input: n = 20
Output: 4
Factorial of 20 is 2432902008176640000 which has
4 trailing zeroes.
Input: n = 100
Output: 24
Trailing 0s in n! = C... | [
{
"code": null,
"e": 25043,
"s": 25015,
"text": "\n02 Jan, 2019"
},
{
"code": null,
"e": 25125,
"s": 25043,
"text": "Given an integer n, write a function that returns count of trailing zeroes in n!."
},
{
"code": null,
"e": 25136,
"s": 25125,
"text": "Examples... |
turtle.addshape() function in Python - GeeksforGeeks | 28 Jul, 2020
The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support.
This function is used to Adds a turtle shape to TurtleScreen’s shapelist.
Syntax :
turtle.... | [
{
"code": null,
"e": 24450,
"s": 24422,
"text": "\n28 Jul, 2020"
},
{
"code": null,
"e": 24667,
"s": 24450,
"text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it... |
How to set the absolute position of a view in Android? | This example demonstrates how do I set the absolute position of a view 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="1.0" encoding="utf-8"?>
<Rel... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "This example demonstrates how do I set the absolute position of a view in android."
},
{
"code": null,
"e": 1274,
"s": 1145,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required det... |
C# | Methods - GeeksforGeeks | 16 Aug, 2021
Methods are generally the block of codes or statements in a program that gives the user the ability to reuse the same code which ultimately saves the excessive use of memory, acts as a time saver and more importantly, it provides a better readability of code. So basically, a method is a collection of state... | [
{
"code": null,
"e": 25226,
"s": 25198,
"text": "\n16 Aug, 2021"
},
{
"code": null,
"e": 25682,
"s": 25226,
"text": "Methods are generally the block of codes or statements in a program that gives the user the ability to reuse the same code which ultimately saves the excessive use... |
What is Effective Isotropic Radiated Power (EIRP)? | A wireless link budget, in general, estimates the possible losses that will be encountered by the signal being transmitted and adjustments are made on the design parameters to combat the effects of such losses. EIRP is commonly used in wireless link budget calculations to specify the power level required for transmissi... | [
{
"code": null,
"e": 1386,
"s": 1062,
"text": "A wireless link budget, in general, estimates the possible losses that will be encountered by the signal being transmitted and adjustments are made on the design parameters to combat the effects of such losses. EIRP is commonly used in wireless link bud... |
DSA using C - Doubly Linked List | Doubly Linked List is a variation of Linked list in which navigation is possible in both ways either forward and backward easily as compared to Single Linked List. Following are important terms to understand the concepts of doubly Linked List.
Link − Each Link of a linked list can store a data called an element.
Link −... | [
{
"code": null,
"e": 2335,
"s": 2091,
"text": "Doubly Linked List is a variation of Linked list in which navigation is possible in both ways either forward and backward easily as compared to Single Linked List. Following are important terms to understand the concepts of doubly Linked List."
},
{... |
How to catch StandardError Exception in Python?
| There is the Exception class, which is the base class for StopIteration, StandardError and Warning. All the standard errors are derived from StandardError. Some standard errors like ArithmeticErrror, AttributeError, AssertionError are derived from base class StandardError.
When an attribute reference or assignment fail... | [
{
"code": null,
"e": 1336,
"s": 1062,
"text": "There is the Exception class, which is the base class for StopIteration, StandardError and Warning. All the standard errors are derived from StandardError. Some standard errors like ArithmeticErrror, AttributeError, AssertionError are derived from base ... |
Exclude some ID records from a list and display rest in MySQL | To exclude records, use MySQL NOT IN(). Let us first create a table −
mysql> create table DemoTable
(
Id int
);
Query OK, 0 rows affected (0.64 sec)
Insert some records in the table using insert command −
mysql> insert into DemoTable values(1);
Query OK, 1 row affected (0.16 sec)
mysql> insert into DemoTable values(... | [
{
"code": null,
"e": 1132,
"s": 1062,
"text": "To exclude records, use MySQL NOT IN(). Let us first create a table −"
},
{
"code": null,
"e": 1214,
"s": 1132,
"text": "mysql> create table DemoTable\n(\n Id int\n);\nQuery OK, 0 rows affected (0.64 sec)"
},
{
"code": null... |
How to use ArrayBlockingQueue in android? | Before getting into example, we should know what arrayblockingqueue is, it travels FIFO manner and first element going to live longest period of time and last element of the queue going to live short period of the time.
This example demonstrate about How to use ArrayBlockingQueue in android
Step 1 − Create a new projec... | [
{
"code": null,
"e": 1282,
"s": 1062,
"text": "Before getting into example, we should know what arrayblockingqueue is, it travels FIFO manner and first element going to live longest period of time and last element of the queue going to live short period of the time."
},
{
"code": null,
"... |
How to convert rows in an R data frame to list? | Sometimes each row needs to be treated differently, therefore, we might want to convert those rows into list. This will help us to perform the operations on our row elements separately. To convert the rows into list, we can use split function by defining the number of rows in the data frame.
Consider the below data fra... | [
{
"code": null,
"e": 1355,
"s": 1062,
"text": "Sometimes each row needs to be treated differently, therefore, we might want to convert those rows into list. This will help us to perform the operations on our row elements separately. To convert the rows into list, we can use split function by definin... |
SWING - JColorChooser Class | The class JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color.
Following is the declaration for javax.swing.JColorChooser class −
public class JColorChooser
extends JComponent
implements Accessible
Following are the fields for javax.swing.JLabel class −
protecte... | [
{
"code": null,
"e": 1874,
"s": 1763,
"text": "The class JColorChooser provides a pane of controls designed to allow a user to manipulate and select a color."
},
{
"code": null,
"e": 1941,
"s": 1874,
"text": "Following is the declaration for javax.swing.JColorChooser class −"
}... |
Query data from S3 files using Amazon Athena | by Sunny Srinidhi | Towards Data Science | Amazon Athena is defined as “an interactive query service that makes it easy to analyse data directly in Amazon Simple Storage Service (Amazon S3) using standard SQL.” So, it’s another SQL query engine for large data sets stored in S3. This is very similar to other SQL query engines, such as Apache Drill. But unlike Ap... | [
{
"code": null,
"e": 688,
"s": 172,
"text": "Amazon Athena is defined as “an interactive query service that makes it easy to analyse data directly in Amazon Simple Storage Service (Amazon S3) using standard SQL.” So, it’s another SQL query engine for large data sets stored in S3. This is very simila... |
Image Object detection with Tensorflow-js 🤔 | by Deepak Gupta | Towards Data Science | This is the fourth post of the image processing series from zero to one.
Here is the list of other posts
Image Processing — OpenCV and Node.js (Part 3)Image Processing — Making Custom Filters — React.js — Part 2Image Processing Using Cloundinary (Part 1)
Image Processing — OpenCV and Node.js (Part 3)
Image Processing —... | [
{
"code": null,
"e": 245,
"s": 172,
"text": "This is the fourth post of the image processing series from zero to one."
},
{
"code": null,
"e": 277,
"s": 245,
"text": "Here is the list of other posts"
},
{
"code": null,
"e": 427,
"s": 277,
"text": "Image Proces... |
Java Examples - Display root directories | How to display root directories in the system ?
Following example shows how to find root directories in your system using listRoots() method of File class.
import java.io.*;
public class Main {
public static void main(String[] args) {
File[] roots = File.listRoots();
System.out.println("Root directori... | [
{
"code": null,
"e": 2116,
"s": 2068,
"text": "How to display root directories in the system ?"
},
{
"code": null,
"e": 2224,
"s": 2116,
"text": "Following example shows how to find root directories in your system using listRoots() method of File class."
},
{
"code": null... |
HTML style attribute | 21 Feb, 2022
In this article, we will see the HTML style attribute, along with understanding its implementation through the examples. Styles in HTML are basically rules that describe how a document will be presented in a browser. Style information can be either attached as a separate document or embedded in the HTML do... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n21 Feb, 2022"
},
{
"code": null,
"e": 416,
"s": 53,
"text": "In this article, we will see the HTML style attribute, along with understanding its implementation through the examples. Styles in HTML are basically rules that describe how ... |
GATE-CS-2015 (Set 2) - GeeksforGeeks | 10 Nov, 2021
Statements:
(I) One fourth of the weight of a pole is 5 kg
(II) The total weight of these poles is 160 kg more
than the total weight of two poles.
(I) is sufficient. We can determine total weight of 1o
poles as 10 * 4 * 5 = 200 Kg
(II) is also sufficient, we can determine the weight.
Let ... | [
{
"code": null,
"e": 29577,
"s": 29549,
"text": "\n10 Nov, 2021"
},
{
"code": null,
"e": 29736,
"s": 29577,
"text": "Statements: \n (I) One fourth of the weight of a pole is 5 kg\n (II) The total weight of these poles is 160 kg more\n than the total weight of two poles."
... |
How to create a rainbow using HTML5 ? | 14 Dec, 2020
In this, we will be talking about how can we create a rainbow using HTML5. To create the rainbow we have to know how the SVG tag works and its attributes.
Approach:
Firstly, we have to use the width and height attribute of the SVG tag to create the base for the structure of the rainbow.
Now we will use th... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Dec, 2020"
},
{
"code": null,
"e": 209,
"s": 54,
"text": "In this, we will be talking about how can we create a rainbow using HTML5. To create the rainbow we have to know how the SVG tag works and its attributes."
},
{
"code... |
Select data and set value to boolean based on timestamp column in MySQL | For this, use IF(). Let us first see the current date −
mysql> select curdate();
+------------+
| curdate() |
+------------+
| 2019-12-10 |
+------------+
1 row in set (0.00 sec)
Let us first create a table −
mysql> create table DemoTable1890
(
DueDate timestamp
);
Query OK, 0 rows affected (0.00 sec)
Insert ... | [
{
"code": null,
"e": 1243,
"s": 1187,
"text": "For this, use IF(). Let us first see the current date −"
},
{
"code": null,
"e": 1367,
"s": 1243,
"text": "mysql> select curdate();\n+------------+\n| curdate() |\n+------------+\n| 2019-12-10 |\n+------------+\n1 row in set (0.00 s... |
How to set horizontal header for a table? | Tables in HTML can have horizontal as well as the vertical header. For the horizontal header, you need to set all <th> inside a single <tr> tag i.e. row, that will be the topmost.
You can try to run the following code to set a horizontal header for a table
<!DOCTYPE html>
<html>
<head>
<style>
table, ... | [
{
"code": null,
"e": 1367,
"s": 1187,
"text": "Tables in HTML can have horizontal as well as the vertical header. For the horizontal header, you need to set all <th> inside a single <tr> tag i.e. row, that will be the topmost."
},
{
"code": null,
"e": 1444,
"s": 1367,
"text": "Yo... |
Shake a Button on Hover using HTML and CSS | 08 Jun, 2020
The shake button effect also known as the wiggle effect can be used to make the website look more responsive and dynamic. This is one of the best effects to understand the concept of @keyframes rule in CSS.
Approach: The shake button effect or animation can be created using HTML and CSS, First, we will cre... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jun, 2020"
},
{
"code": null,
"e": 235,
"s": 28,
"text": "The shake button effect also known as the wiggle effect can be used to make the website look more responsive and dynamic. This is one of the best effects to understand the con... |
PHP | Check if a number is Perfect number | 14 Oct, 2019
A perfect number is a number if it is equal to the sum of its factors,that is original number is equal to sum of all its factors excluding the number itself. We have already discuss how to check if a number is perfect or not in this article. In this article we will discuss about how to do the same in PHP.
... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Oct, 2019"
},
{
"code": null,
"e": 359,
"s": 52,
"text": "A perfect number is a number if it is equal to the sum of its factors,that is original number is equal to sum of all its factors excluding the number itself. We have already ... |
Shell Script to Convert a File Content to Lower Case or Upper Case | 13 Jul, 2021
Here we are going to see how to convert a file to lower case or upper sase as specified by the user. We are going to write a POSIX compatible shell script which is going to give us the desired output after input of files such as sample.txt, a text file with a combination of lowercase, uppercase, digits a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Jul, 2021"
},
{
"code": null,
"e": 356,
"s": 28,
"text": "Here we are going to see how to convert a file to lower case or upper sase as specified by the user. We are going to write a POSIX compatible shell script which is going to ... |
Implementing Backward and Forward buttons of Browser | 27 Aug, 2021
Design the forward and backward buttons of a Browser using Stack Data Structure. If at any instance, the URL does not exist after pressing any of the two buttons, then print “Not Available”. Otherwise, print the current URL.
Approach: The idea is to use two stacks backward and forward to keep track of visi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Aug, 2021"
},
{
"code": null,
"e": 279,
"s": 54,
"text": "Design the forward and backward buttons of a Browser using Stack Data Structure. If at any instance, the URL does not exist after pressing any of the two buttons, then print ... |
GATE | Gate IT 2008 | Question 59 | 28 Jun, 2021
Let R (A, B, C, D) be a relational schema with the following functional dependencies:
A → B, B → C,
C → D and D → B.
The decomposition of R into
(A, B), (B, C), (B, D)
(A) gives a lossless join, and is dependency preserving(B) gives a lossless join, but is not dependency preserving(C) does not give a l... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 138,
"s": 52,
"text": "Let R (A, B, C, D) be a relational schema with the following functional dependencies:"
},
{
"code": null,
"e": 224,
"s": 138,
"text": "A → B, B → C,\nC → ... |
How to check a radio button with jQuery? | 03 Aug, 2021
There are two methods by which one can dynamically change the currently selected radio button by changing the checked property of the input type.
Method 1: Using prop method: The input can be accessed and its property can be set by using the prop method. This method manipulates the ‘checked’ property and s... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Aug, 2021"
},
{
"code": null,
"e": 174,
"s": 28,
"text": "There are two methods by which one can dynamically change the currently selected radio button by changing the checked property of the input type."
},
{
"code": null,
... |
How to bind ‘touchstart’ and ‘click’ events but not respond to both ? | 13 Sep, 2021
The touchstart event occurs when the user touches an element. But a click event is fired when the user clicks an element. Usually, both the touchstart and click events are fired in the very same click in the touch and click enabled devices. So, in this case, if the browser fires both touch and mouse events... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 478,
"s": 28,
"text": "The touchstart event occurs when the user touches an element. But a click event is fired when the user clicks an element. Usually, both the touchstart and click events are fir... |
gunzip - Unix, Linux Command | gunzip, gzip - compress or expand files
gunzip [ -acfhlLnNrtvV ] [-S suffix] [ name ... ]
gzip [ -acdfhlLnNrtvV19 ] [-S suffix] [ name ... ]
gunzip takes a list of files on its command line and replaces each file whose name ends with .gz, -gz, .z, -z, _z or .Z and which begins with the correct magic number with an unco... | [
{
"code": null,
"e": 10751,
"s": 10711,
"text": "gunzip, gzip - compress or expand files"
},
{
"code": null,
"e": 10852,
"s": 10751,
"text": "gunzip [ -acfhlLnNrtvV ] [-S suffix] [ name ... ]\ngzip [ -acdfhlLnNrtvV19 ] [-S suffix] [ name ... ]"
},
{
"code": null,
"e":... |
Check if a String Contains only Alphabets in Java using Regex | 05 Apr, 2022
Regular Expressions or Regex is an API for defining String patterns that can be used for searching, manipulating, and editing a text. It is widely used to define a constraint on strings such as a password. Regular Expressions are provided under java.util.regex package.
For any string, here the task is to c... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Apr, 2022"
},
{
"code": null,
"e": 322,
"s": 52,
"text": "Regular Expressions or Regex is an API for defining String patterns that can be used for searching, manipulating, and editing a text. It is widely used to define a constraint... |
How to Fix “android.os.Network On Main Thread Exception error” in Android Studio? | 05 May, 2021
The main reason for Network On Main Thread Exception Error is because the newer versions of android are very strict against the UI thread abuse. Whenever we open an app, a new “main” thread is created which helps applications interact with the running components of an app’s UI and is responsible for dispat... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 May, 2021"
},
{
"code": null,
"e": 492,
"s": 54,
"text": "The main reason for Network On Main Thread Exception Error is because the newer versions of android are very strict against the UI thread abuse. Whenever we open an app, a ne... |
Scrape LinkedIn Using Selenium And Beautiful Soup in Python | 14 Sep, 2021
In this article, we are going to scrape Linkedln using Selenium and Beautiful Soup libraries in Python.
First of all, we need to install some libraries. Execute the following commands in the terminal.
pip install selenium
pip install beautifulsoup4
In order to use selenium, we also need a web driver. You ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n14 Sep, 2021"
},
{
"code": null,
"e": 158,
"s": 54,
"text": "In this article, we are going to scrape Linkedln using Selenium and Beautiful Soup libraries in Python."
},
{
"code": null,
"e": 255,
"s": 158,
"text": "F... |
How to move all files from one directory to another using Python ? | 08 Jul, 2022
In this article, we will see how to move all files from one directory to another directory using Python. In our day-to-day computer usage we generally copy or move files from one folder to other, now let’s see how to move a file in Python:
Using os module.
Using shutil module.
Source and Destination Folde... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n08 Jul, 2022"
},
{
"code": null,
"e": 269,
"s": 28,
"text": "In this article, we will see how to move all files from one directory to another directory using Python. In our day-to-day computer usage we generally copy or move files from... |
Long longValue() Method in Java | 13 Dec, 2021
The java.lang.Long.longValue() is an inbuilt method of the Long class in Java which returns the value of this Long object as a long after the conversion.Syntax:
public long longValue()
Parameters: This method do not take any parameters.Return Value: This method will return the numeric value represented by... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 190,
"s": 28,
"text": "The java.lang.Long.longValue() is an inbuilt method of the Long class in Java which returns the value of this Long object as a long after the conversion.Syntax: "
},
{
... |
Flip Bits | Practice | GeeksforGeeks | Given an array A[] consisting of 0’s and 1’s. A flip operation is one in which you turn 1 into 0 and a 0 into 1. You have to do at most one “Flip” operation of any subarray. Formally, select a range (l, r) in the array A[], such that (0 ≤ l ≤ r < n) holds and flip the elements in this range to get the maximum ones in t... | [
{
"code": null,
"e": 631,
"s": 238,
"text": "Given an array A[] consisting of 0’s and 1’s. A flip operation is one in which you turn 1 into 0 and a 0 into 1. You have to do at most one “Flip” operation of any subarray. Formally, select a range (l, r) in the array A[], such that (0 ≤ l ≤ r < n) holds... |
sciPy stats.signaltonoise() function | Python | 18 Feb, 2019
scipy.stats.signaltonoise(arr, axis=0, ddof=0) function computes the signal-to-noise ratio of the input data.
Its formula :
Parameters :arr : [array_like]Input array or object having the elements to calculate the signal-to-noise ratioaxis : Axis along which the mean is to be computed. By default axis = 0.d... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n18 Feb, 2019"
},
{
"code": null,
"e": 138,
"s": 28,
"text": "scipy.stats.signaltonoise(arr, axis=0, ddof=0) function computes the signal-to-noise ratio of the input data."
},
{
"code": null,
"e": 152,
"s": 138,
"text... |
QBColor() and RGB() Function in MS Access | 27 Sep, 2021
1. QBColor() Function : QBColor() Function in MS Access is used to get the RGB color code .It returns a Long number representing the RGB color code corresponding to the specified color number.
Syntax :
QBColor (color)
Parameter : This method accepts one parameter as mentioned above and described below :... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Sep, 2021"
},
{
"code": null,
"e": 222,
"s": 28,
"text": "1. QBColor() Function : QBColor() Function in MS Access is used to get the RGB color code .It returns a Long number representing the RGB color code corresponding to the specif... |
Python | Accessing nth element from tuples in list | 23 Dec, 2018
While working with tuples, we store different data as different tuple elements. Sometimes, there is a need to print a specific information from the tuple. For instance, a piece of code would want just names to be printed of all the student data. Lets discuss certain ways how one can achieve solutions to th... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n23 Dec, 2018"
},
{
"code": null,
"e": 372,
"s": 53,
"text": "While working with tuples, we store different data as different tuple elements. Sometimes, there is a need to print a specific information from the tuple. For instance, a pie... |
C# | Math.Log10() Method | 31 Jan, 2019
In C#, Math.Log10() is a Math class method. It is used to return the base 10 logarithm of a specified number.
Syntax:
public static double Log10(double val)
Parameter:
val: It is the specified number whose logarithm to be calculated and its type is System.Double.
Return Value: It returns the logarithm of v... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Jan, 2019"
},
{
"code": null,
"e": 138,
"s": 28,
"text": "In C#, Math.Log10() is a Math class method. It is used to return the base 10 logarithm of a specified number."
},
{
"code": null,
"e": 146,
"s": 138,
"text... |
Difference between substr() and substring() in JavaScript | 10 Apr, 2022
Both of the functions are used to get the specified part of the string, But there is a slight difference between them. str.substr() Function: The str.substr() function returns the specified number of characters from the specified index from the given string. Syntax:
str.substr(start, len)
Parameters:
start... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Apr, 2022"
},
{
"code": null,
"e": 295,
"s": 28,
"text": "Both of the functions are used to get the specified part of the string, But there is a slight difference between them. str.substr() Function: The str.substr() function returns... |
Using Google Sheets as Database in Python | 04 Dec, 2021
In this article we’ll be discussing how we can use Google Sheets to run like a database for any Python file.
Google Spreadsheets is free online web based application that resembles Microsoft Excel. You can use it to create and edit tables for various projects such as Contact List, Budget and almost everyt... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n04 Dec, 2021"
},
{
"code": null,
"e": 138,
"s": 28,
"text": "In this article we’ll be discussing how we can use Google Sheets to run like a database for any Python file. "
},
{
"code": null,
"e": 358,
"s": 138,
"text... |
How to Create Windows 11 Interface using HTML5 ? | 30 Sep, 2021
In this article, we will see how to create a windows 11 interface using HTML5.
Approach: To create Windows 11 interface we will use HTML, CSS, and JavaScript. If you want to change to design you can add more functionality to it. In this article, we will divide the whole thing into three different part crea... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 Sep, 2021"
},
{
"code": null,
"e": 133,
"s": 54,
"text": "In this article, we will see how to create a windows 11 interface using HTML5."
},
{
"code": null,
"e": 426,
"s": 133,
"text": "Approach: To create Window... |
Check whether the string S1 can be made equal to S2 with the given operation | 28 Jun, 2022
Given two string S1 and S2, the task is to check whether both the strings can be made equal by performing the given operation on string S1. In a single operation, any character at an odd index can be swapped with any other character at an odd index, the same goes for the characters at even indices.Examples... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jun, 2022"
},
{
"code": null,
"e": 339,
"s": 28,
"text": "Given two string S1 and S2, the task is to check whether both the strings can be made equal by performing the given operation on string S1. In a single operation, any characte... |
Docker – Search Image in Dockerhub through CLI | 05 Nov, 2020
There are tons of pre-built Docker Images that you can find on Docker’s official repository called DockerHub. In fact, you can also push your own customized Image on DockerHub. These Images can then be pulled using the Docker pull command and can be used as Base Images. In this article, we will discuss how... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Nov, 2020"
},
{
"code": null,
"e": 411,
"s": 28,
"text": "There are tons of pre-built Docker Images that you can find on Docker’s official repository called DockerHub. In fact, you can also push your own customized Image on DockerHub... |
Minimum gcd operations to make all array elements one | 16 Jun, 2022
Given an array A[] of size N. You can replace any number in the array with the gcd of that element with any of its adjacent elements. Find the minimum number of such operation to make the element of whole array equal to 1. If its not possible print -1.Examples:
Input : A[] = {4, 8, 9}
Output : 3
Explanat... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 318,
"s": 54,
"text": "Given an array A[] of size N. You can replace any number in the array with the gcd of that element with any of its adjacent elements. Find the minimum number of such operatio... |
Computer Networks | Set 10 | 01 Feb, 2022
Following questions have been asked in GATE CS 2007 exam.
1) The address of a class B host is to be split into subnets with a 6-bit subnet number. What is the maximum number of subnets and the maximum number of hosts in each subnet? (A) 62 subnets and 262142 hosts. (B) 64 subnets and 262142 hosts. (C) 62 ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n01 Feb, 2022"
},
{
"code": null,
"e": 111,
"s": 52,
"text": "Following questions have been asked in GATE CS 2007 exam. "
},
{
"code": null,
"e": 415,
"s": 111,
"text": "1) The address of a class B host is to be spli... |
Finding the index of the first repeating character in a string in JavaScript | We are required to write a JavaScript function that takes in a string and returns the index of the first character that appears twice in the string. If there is no such character then we should return -1.
Let’s say the following is our string −
const str = 'Hello world, how are you';
We need to find the index of the fi... | [
{
"code": null,
"e": 1267,
"s": 1062,
"text": "We are required to write a JavaScript function that takes in a string and returns the index of the first character that appears twice in the string. If there is no such character then we should return -1."
},
{
"code": null,
"e": 1307,
"... |
postconf - Unix, Linux Command | postconf [-aAmlv] [-c config_dir]
postconf [-ev] [-c config_dir]
[parameter=value ...]
postconf [-btv] [-c config_dir] [template_file]
Options:
This feature is available with Postfix 2.3 and later.
This feature is available with Postfix 2.3 and later.
The text below provides only a parameter summary. Se... | [
{
"code": null,
"e": 10613,
"s": 10577,
"text": "\npostconf [-aAmlv] [-c config_dir]\n"
},
{
"code": null,
"e": 10668,
"s": 10613,
"text": "\npostconf [-ev] [-c config_dir]\n[parameter=value ...]\n"
},
{
"code": null,
"e": 10718,
"s": 10668,
"text": "\npostcon... |
C# program to implement FizzBuzz | Implementation of FizzBuzz involves printing numbers from 1 to 100. If the numbers are multiples of 3 then Fizz is printed. If they are multiples of 5, then Buzz is printed and if they are multiples of both 3 and 5 then FizzBuzz is printed.
A program that demonstrates the implementation of FizzBuzz is given as follows.... | [
{
"code": null,
"e": 1303,
"s": 1062,
"text": "Implementation of FizzBuzz involves printing numbers from 1 to 100. If the numbers are multiples of 3 then Fizz is printed. If they are multiples of 5, then Buzz is printed and if they are multiples of both 3 and 5 then FizzBuzz is printed."
},
{
... |
Python Celsius to Fahrenheit | Theory of Computation
Suppose the Celsius lists are -
Celsius = [26.2, 33.2, 29.3, 32.4]
Such a type of program plays an important role in the most scientific applications, as it is the most widely used temperature scale throughout the world. The Fahrenheit scale is mostly used in the United States.
In the Celsius scal... | [
{
"code": null,
"e": 112,
"s": 90,
"text": "Theory of Computation"
},
{
"code": null,
"e": 144,
"s": 112,
"text": "Suppose the Celsius lists are -"
},
{
"code": null,
"e": 179,
"s": 144,
"text": "Celsius = [26.2, 33.2, 29.3, 32.4]"
},
{
"code": null,
... |
Python Pandas Interview Questions for Data Science | by Nathan Rosidi | Towards Data Science | In the previous article, Python Pandas Interview Questions for Data Science Part 1, we looked a how to get data into Pandas and perform basic calculations like
Sorting DataFrames
Handling Duplicates
Aggregations
Merging DataFrames
Calculated Fields
In this part, we will build on that knowledge and use it to solve more ... | [
{
"code": null,
"e": 331,
"s": 171,
"text": "In the previous article, Python Pandas Interview Questions for Data Science Part 1, we looked a how to get data into Pandas and perform basic calculations like"
},
{
"code": null,
"e": 350,
"s": 331,
"text": "Sorting DataFrames"
},
... |
Python - Check if all elements in a list are identical | There may be occasions when a list will contain all the values which are same. In this article we will see various way to verify that.
We use the all function to find the result of comparison of each element of the list with the first element. If each comparison gives a result of equality then the result is given as al... | [
{
"code": null,
"e": 1197,
"s": 1062,
"text": "There may be occasions when a list will contain all the values which are same. In this article we will see various way to verify that."
},
{
"code": null,
"e": 1436,
"s": 1197,
"text": "We use the all function to find the result of c... |
Insert data from one schema to another in MySQL? | To insert data from one scheme to another, the syntax is as follows. Here, we have two databases “yourDatabaseName1” and “yourDatabaseName2” −
insert into yourDatabaseName2.yourTableName2 select *from yourDatabaseName1.yourTableName1;
To understand the above syntax, let us create a table. We are creating a table in dat... | [
{
"code": null,
"e": 1205,
"s": 1062,
"text": "To insert data from one scheme to another, the syntax is as follows. Here, we have two databases “yourDatabaseName1” and “yourDatabaseName2” −"
},
{
"code": null,
"e": 1297,
"s": 1205,
"text": "insert into yourDatabaseName2.yourTable... |
Merge Sort on Doubly Linked List | Practice | GeeksforGeeks | Given Pointer/Reference to the head of a doubly linked list of N nodes, the task is to Sort the given doubly linked list using Merge Sort in both non-decreasing and non-increasing order.
Example 1:
Input:
N = 8
value[] = {7,3,5,2,6,4,1,8}
Output:
1 2 3 4 5 6 7 8
8 7 6 5 4 3 2 1
Explanation: After sorting the given
link... | [
{
"code": null,
"e": 425,
"s": 238,
"text": "Given Pointer/Reference to the head of a doubly linked list of N nodes, the task is to Sort the given doubly linked list using Merge Sort in both non-decreasing and non-increasing order."
},
{
"code": null,
"e": 436,
"s": 425,
"text": ... |
Batch Script - REN | Renames files and directories
ren [oldfile/dirname] [newfile/dirname]
Renames the file name from the old file/dir name to the new one.
@echo off
ren C:\lists.txt C:\newlists.txt
The file lists.txt will be renamed to newlists.txt.
Print
Add Notes
Bookmark this page | [
{
"code": null,
"e": 2199,
"s": 2169,
"text": "Renames files and directories"
},
{
"code": null,
"e": 2240,
"s": 2199,
"text": "ren [oldfile/dirname] [newfile/dirname]\n"
},
{
"code": null,
"e": 2305,
"s": 2240,
"text": "Renames the file name from the old file... |
CSS - Aural Media | A web document can be rendered by a speech synthesizer. CSS2 allows you to attach specific sound style features to specific document elements.
Aural rendering of documents is mainly used by the visually impaired. Some of the situations in which a document can be accessed by means of aural rendering rather than visual r... | [
{
"code": null,
"e": 2769,
"s": 2626,
"text": "A web document can be rendered by a speech synthesizer. CSS2 allows you to attach specific sound style features to specific document elements."
},
{
"code": null,
"e": 2974,
"s": 2769,
"text": "Aural rendering of documents is mainly ... |
Implicit conversion from Int32 to Decimal in C# | The int type represents a 32-bit signed integer i.e. Int32.
To implicitly convert an Int32 to a Decimal, firstly set a Int32 value.
int val = 392;
To convert Int32 to decimal, assign the value.
decimal d;
d = val;
Let us see another example.
using System;
public class Demo {
public static void Main() {
int val... | [
{
"code": null,
"e": 1122,
"s": 1062,
"text": "The int type represents a 32-bit signed integer i.e. Int32."
},
{
"code": null,
"e": 1194,
"s": 1122,
"text": "To implicitly convert an Int32 to a Decimal, firstly set a Int32 value."
},
{
"code": null,
"e": 1209,
"s"... |
Find MongoDB records where array field is not empty? | You can use $ne(Not Equal) operator for this. To understand the concept, let us create a collection with document. The query to create a collection with document is as follows −
> db.arrayFieldIsNotEmptyDemo.insertOne({"StudentName":"Larry","StudentTechnicalSubject":["Java","C"]});
{
"acknowledged" : true,
"inser... | [
{
"code": null,
"e": 1240,
"s": 1062,
"text": "You can use $ne(Not Equal) operator for this. To understand the concept, let us create a collection with document. The query to create a collection with document is as follows −"
},
{
"code": null,
"e": 2176,
"s": 1240,
"text": "> db... |
Count set bits in a range - GeeksforGeeks | 28 Apr, 2021
Given a non-negative number n and two values l and r. The problem is to count the number of set bits in the range l to r in the binary representation of n, i.e, to count set bits from the rightmost lth bit to the rightmost rth bit. Constraint: 1 <= l <= r <= number of bits in the binary representation of n... | [
{
"code": null,
"e": 24877,
"s": 24849,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 25197,
"s": 24877,
"text": "Given a non-negative number n and two values l and r. The problem is to count the number of set bits in the range l to r in the binary representation of n, i.e, to... |
Kotlin Ranges | With the for loop, you can also create
ranges of values with "..":
Print the whole alphabet:
for (chars in 'a'..'x') {
println(chars)
}
You can also create ranges of numbers:
for (nums in 5..15) {
println(nums)
}
Note: The first and last value is included in the range.
You can also use the in operator to check if... | [
{
"code": null,
"e": 68,
"s": 0,
"text": "With the for loop, you can also create \nranges of values with \"..\":"
},
{
"code": null,
"e": 94,
"s": 68,
"text": "Print the whole alphabet:"
},
{
"code": null,
"e": 139,
"s": 94,
"text": "for (chars in 'a'..'x') {\... |
transient keyword in Java - GeeksforGeeks | 28 Jun, 2021
transient is a variables modifier used in serialization. At the time of serialization, if we don’t want to save value of a particular variable in a file, then we use transient keyword. When JVM comes across transient keyword, it ignores original value of the variable and save default value of that variable... | [
{
"code": null,
"e": 24244,
"s": 24216,
"text": "\n28 Jun, 2021"
},
{
"code": null,
"e": 24563,
"s": 24244,
"text": "transient is a variables modifier used in serialization. At the time of serialization, if we don’t want to save value of a particular variable in a file, then we u... |
The biggest possible circle that can be inscribed in a rectangle - GeeksforGeeks | 31 Aug, 2021
Given a rectangle of length l & breadth b, we have to find the largest circle that can be inscribed in the rectangle. Examples:
Input : l = 4, b = 8
Output : 12.56
Input : l = 16 b = 6
Output : 28.26
From the figure, we can see, the biggest circle that could be inscribed in the rectangle will have... | [
{
"code": null,
"e": 25068,
"s": 25040,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 25198,
"s": 25068,
"text": "Given a rectangle of length l & breadth b, we have to find the largest circle that can be inscribed in the rectangle. Examples: "
},
{
"code": null,
"... |
C++ Program to Perform the Shaker Sort | Shaker sort is used to sort the given data. Shaker sort, unlike Bubble sort, orders the array in both directions. The worst complexity of this algorithm is O(n^2).
Begin
ShakerSort() function has ‘arr’ the array of data and ‘n’ the number of values, in the argument list.
// Implement Sorting algorithm using neste... | [
{
"code": null,
"e": 1226,
"s": 1062,
"text": "Shaker sort is used to sort the given data. Shaker sort, unlike Bubble sort, orders the array in both directions. The worst complexity of this algorithm is O(n^2)."
},
{
"code": null,
"e": 1678,
"s": 1226,
"text": "Begin\n ShakerSo... |
Underscore.js _.values() Function - GeeksforGeeks | 25 Nov, 2021
The _.values() function is used to return the list of all values of the object element.
Syntax:
_.values( object )
Parameters: This function accepts one parameter as mentioned above and described below:
object: It contains the object element that holds the elements of key and value pair.
Return Value: It r... | [
{
"code": null,
"e": 33602,
"s": 33574,
"text": "\n25 Nov, 2021"
},
{
"code": null,
"e": 33690,
"s": 33602,
"text": "The _.values() function is used to return the list of all values of the object element."
},
{
"code": null,
"e": 33698,
"s": 33690,
"text": "Sy... |
Initialization of a normal array with one default value in C++ | The entire array can be initialized to zero very simply. This is shown below.
int arr[10] = {0};
However, it is not possible to initialize the entire array to a non-zero value using the above method. This is shown below.
int arr[10] = {5};
In the above example, only the first element will be initialized to 5. All other... | [
{
"code": null,
"e": 1140,
"s": 1062,
"text": "The entire array can be initialized to zero very simply. This is shown below."
},
{
"code": null,
"e": 1159,
"s": 1140,
"text": "int arr[10] = {0};"
},
{
"code": null,
"e": 1283,
"s": 1159,
"text": "However, it is... |
numpy.shares_memory() function – Python - GeeksforGeeks | 08 Jul, 2020
numpy.shares_memory() function determine if two arrays share memory.
Syntax : numpy.shares_memory(arr1, arr2, max_work = None)Parameters :arr1, arr2 : [ndarray] Input arrays.max_work : [int, optional] Effort to spend on solving the overlap problem.Return : [bool] Checking if two arrays share memory.
Code #... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n08 Jul, 2020"
},
{
"code": null,
"e": 24361,
"s": 24292,
"text": "numpy.shares_memory() function determine if two arrays share memory."
},
{
"code": null,
"e": 24593,
"s": 24361,
"text": "Syntax : numpy.shares... |
Can we assign values to final arrays in Java? | The array is a container that can hold a fixed number of items and these items should be of the same type. Most of the data structures make use of arrays to implement their algorithms. The following are the important terms to understand the concept of Array.
Element − Each item stored in an array is called an element.
... | [
{
"code": null,
"e": 1321,
"s": 1062,
"text": "The array is a container that can hold a fixed number of items and these items should be of the same type. Most of the data structures make use of arrays to implement their algorithms. The following are the important terms to understand the concept of A... |
React Native - Styling | There are a couple of ways to style your elements in React Native.
You can use the style property to add the styles inline. However, this is not the best practice because it can be hard to read the code.
In this chapter, we will use the Stylesheet for styling.
In this section, we will simplify our container component f... | [
{
"code": null,
"e": 2411,
"s": 2344,
"text": "There are a couple of ways to style your elements in React Native."
},
{
"code": null,
"e": 2548,
"s": 2411,
"text": "You can use the style property to add the styles inline. However, this is not the best practice because it can be h... |
Set style for Labelframe in Python Tkinter | Tkinter LabelFrame is similar to Frames in Tkinter Library. It works like a container where widgets can be placed. LabelFrame initially creates a container with some rectangular border around it. In order to style the LabelFrame widget, we have several style options such as background, borderwidth, labelanchor, highlig... | [
{
"code": null,
"e": 1405,
"s": 1062,
"text": "Tkinter LabelFrame is similar to Frames in Tkinter Library. It works like a container where widgets can be placed. LabelFrame initially creates a container with some rectangular border around it. In order to style the LabelFrame widget, we have several ... |
Creating Python Virtual Environment in Windows and Linux - GeeksforGeeks | 09 Feb, 2018
A Virtual Environment is a python environment, that is an isolated working copy of Python which allows you to work on a specific project without affecting other projectsSo basically it is a tool that enables multiple side-by-side installations of Python, one for each project.
Creating virtual environment i... | [
{
"code": null,
"e": 24341,
"s": 24313,
"text": "\n09 Feb, 2018"
},
{
"code": null,
"e": 24618,
"s": 24341,
"text": "A Virtual Environment is a python environment, that is an isolated working copy of Python which allows you to work on a specific project without affecting other pr... |
Count the number of strings in an array whose distinct characters are less than equal to M - GeeksforGeeks | 25 May, 2021
Given an array of strings arr[] and an integer M, the task is to count the strings whose count of distinct characters is less than M.
Examples:
Input: arr[] = {“ADAM”, “JOHNSON”, “COOL”}, M = 3 Output: 2 Explanation: There are two such strings whose count of distinct characters is less than M. Count of Dis... | [
{
"code": null,
"e": 24405,
"s": 24377,
"text": "\n25 May, 2021"
},
{
"code": null,
"e": 24539,
"s": 24405,
"text": "Given an array of strings arr[] and an integer M, the task is to count the strings whose count of distinct characters is less than M."
},
{
"code": null,
... |
Java Program to parse a mathematical expression and operators | At first, we have set the mathematical expressions:
String one = "10+15*20-5/5";
String two = "3+5-6";
String three = "9+2*(6-3+7)";
To parse mathematical expression, use Nashorn JavaScript in Java i.e. scripting. Nashorn invoke
dynamics feature, introduced in Java 7 to improve performance.
For scripting, use the Scrip... | [
{
"code": null,
"e": 1114,
"s": 1062,
"text": "At first, we have set the mathematical expressions:"
},
{
"code": null,
"e": 1195,
"s": 1114,
"text": "String one = \"10+15*20-5/5\";\nString two = \"3+5-6\";\nString three = \"9+2*(6-3+7)\";"
},
{
"code": null,
"e": 1354... |
Find the starting indices of the substrings in string (S) which is made by concatenating all words from a list(L) - GeeksforGeeks | 12 Apr, 2022
You are given a string S, and a list of words L i.e array/vector of strings (Words in list L are all of the same length). Find the starting indices of the substrings in string S, which contains all the words present in list L. The order of words of list L appearing inside string S does not matter i.e if st... | [
{
"code": null,
"e": 25283,
"s": 25255,
"text": "\n12 Apr, 2022"
},
{
"code": null,
"e": 25782,
"s": 25283,
"text": "You are given a string S, and a list of words L i.e array/vector of strings (Words in list L are all of the same length). Find the starting indices of the substrin... |
How to new line string - JavaScript? | Use <br> tag for a new line.
Following is the code −
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script... | [
{
"code": null,
"e": 1091,
"s": 1062,
"text": "Use <br> tag for a new line."
},
{
"code": null,
"e": 1115,
"s": 1091,
"text": "Following is the code −"
},
{
"code": null,
"e": 1737,
"s": 1115,
"text": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta char... |
PL/SQL - Quick Guide | The PL/SQL programming language was developed by Oracle Corporation in the late 1980s as procedural extension language for SQL and the Oracle relational database. Following are certain notable facts about PL/SQL −
PL/SQL is a completely portable, high-performance transaction-processing language.
PL/SQL is a completely ... | [
{
"code": null,
"e": 2279,
"s": 2065,
"text": "The PL/SQL programming language was developed by Oracle Corporation in the late 1980s as procedural extension language for SQL and the Oracle relational database. Following are certain notable facts about PL/SQL −"
},
{
"code": null,
"e": 23... |
Break Numbers[Duplicate problem] | Practice | GeeksforGeeks | Given a large number N, write a program to count the ways to break it into three whole numbers such that they sum up to the original number.
Example 1:
Input: N = 3
Output: 10
Explaination: The ways are
0 + 0 + 3 = 3
0 + 3 + 0 = 3
3 + 0 + 0 = 3
0 + 1 + 2 = 3
0 + 2 + 1 = 3
1 + 0 + 2 = 3
1 + 2 + 0 = 3
2 + 0 + 1 = 3
2 + ... | [
{
"code": null,
"e": 379,
"s": 238,
"text": "Given a large number N, write a program to count the ways to break it into three whole numbers such that they sum up to the original number."
},
{
"code": null,
"e": 390,
"s": 379,
"text": "Example 1:"
},
{
"code": null,
"e... |
A simple understanding of Computer - GeeksforGeeks | 22 Mar, 2022
Computer is a device that makes our work easy. Computer is a device that helps us to complete our task easily and speedily. Computer doesn’t have a brain like human beings. We have to give them instructions to what to do when a particular situation arises. We have to tell them everything from what to expec... | [
{
"code": null,
"e": 26050,
"s": 26022,
"text": "\n22 Mar, 2022"
},
{
"code": null,
"e": 26855,
"s": 26050,
"text": "Computer is a device that makes our work easy. Computer is a device that helps us to complete our task easily and speedily. Computer doesn’t have a brain like huma... |
Setup Python for Machine Learning | Towards Data Science | An often overlooked part of machine learning is the fundamental setup of a functional, clean environment.
I’ve seen the question asked time and time again and was recently asked myself — how do we set up all of these things, from start to finish?
So this article will cover exactly that. We will go from installing Pytho... | [
{
"code": null,
"e": 278,
"s": 172,
"text": "An often overlooked part of machine learning is the fundamental setup of a functional, clean environment."
},
{
"code": null,
"e": 419,
"s": 278,
"text": "I’ve seen the question asked time and time again and was recently asked myself —... |
Batch Script - Empty String | An empty string can be created in DOS Scripting by assigning it no value during it’s initialization as shown in the following example.
Set a=
To check for an existence of an empty string, you need to encompass the variable name in square brackets and also compare it against a value in square brackets as shown in the f... | [
{
"code": null,
"e": 2304,
"s": 2169,
"text": "An empty string can be created in DOS Scripting by assigning it no value during it’s initialization as shown in the following example."
},
{
"code": null,
"e": 2312,
"s": 2304,
"text": "Set a=\n"
},
{
"code": null,
"e": 2... |
Change Primary Key Column in SQL Server - GeeksforGeeks | 23 Sep, 2021
Primary Key refers to the column of a table that uniquely identifies a row in a table. It contains unique values and can not contain NULL values. For the purpose of the demonstration, we will be creating geeks for geeks table in a database called “geeks“.
Step 1: Creating the database
The database is crea... | [
{
"code": null,
"e": 24421,
"s": 24393,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 24677,
"s": 24421,
"text": "Primary Key refers to the column of a table that uniquely identifies a row in a table. It contains unique values and can not contain NULL values. For the purpose o... |
Difference between Dependency Injection and Factory Pattern. | Factory and Dependency injection both are the design pattern which can be used to enhance loose coupling abilities between the software components.
Factory design pattern is used to create objects. But, injection and life cycle management of the object should be handled by programmer within the application. There is n... | [
{
"code": null,
"e": 1211,
"s": 1062,
"text": "Factory and Dependency injection both are the design pattern which can be used to enhance loose coupling abilities between the software components. "
},
{
"code": null,
"e": 1562,
"s": 1211,
"text": "Factory design pattern is used to... |
Impala - Select a Database | Once you get connected to Impala, it is required to select one among the available databases. The USE DATABASE Statement of Impala is used to switch the current session to another database.
Following is the syntax of USE Statement.
USE db_name;
Following is an example of USE statement. First of all, let us create a da... | [
{
"code": null,
"e": 2475,
"s": 2285,
"text": "Once you get connected to Impala, it is required to select one among the available databases. The USE DATABASE Statement of Impala is used to switch the current session to another database."
},
{
"code": null,
"e": 2517,
"s": 2475,
"... |
Pentaho - Data Sources & Queries | In this chapter, we will learn to use the Pentaho Reporting Designer by taking an example. We will create a report on the employee database to produce a quick overview of every employee. We will create our first report by adding a data source and passing queries to the Pentaho Designer.
Before using Pentaho Report Desi... | [
{
"code": null,
"e": 2110,
"s": 1822,
"text": "In this chapter, we will learn to use the Pentaho Reporting Designer by taking an example. We will create a report on the employee database to produce a quick overview of every employee. We will create our first report by adding a data source and passin... |
reflection in Python - GeeksforGeeks | 17 Nov, 2020
Reflection refers to the ability for code to be able to examine attributes about objects that might be passed as parameters to a function. For example, if we write type(obj) then Python will return an object which represents the type of obj.
Using reflection, we can write one recursive reverse function tha... | [
{
"code": null,
"e": 23777,
"s": 23749,
"text": "\n17 Nov, 2020"
},
{
"code": null,
"e": 24019,
"s": 23777,
"text": "Reflection refers to the ability for code to be able to examine attributes about objects that might be passed as parameters to a function. For example, if we write... |
Gradle - Quick Guide | In this chapter, we will understand why was there a need to develop Gradle, what are its features and why Groovy programming language was used to develop Gradle.
Ant and Maven shared considerable success in the JAVA marketplace. Ant was the first build tool released in 2000 and it was developed on procedural programmin... | [
{
"code": null,
"e": 2044,
"s": 1882,
"text": "In this chapter, we will understand why was there a need to develop Gradle, what are its features and why Groovy programming language was used to develop Gradle."
},
{
"code": null,
"e": 2341,
"s": 2044,
"text": "Ant and Maven shared... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.