title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
Remove first X rows and columns from a matrix - GeeksforGeeks | 06 May, 2021
Given an integer X and a square matrix mat[][], the task is to remove the first X rows and columns from the given matrix and print the updated matrix.Examples:
Input: mat[][] = { {1, 2, 3, 4}, {5, 6, 7, 8}, {8, 9, 4, 2}, {4, 8, 9, 2} }, X = 2 Output: 4 2 9 2Input: mat[][] = { {1, 2, 3}, {4, 5, 6}, {7, 8,... | [
{
"code": null,
"e": 26649,
"s": 26621,
"text": "\n06 May, 2021"
},
{
"code": null,
"e": 26811,
"s": 26649,
"text": "Given an integer X and a square matrix mat[][], the task is to remove the first X rows and columns from the given matrix and print the updated matrix.Examples: "
... |
Minimum sum path between two leaves of a binary tree | 06 Aug, 2021
Given a binary tree in which each node element contains a number. The task is to find the minimum possible sum from one leaf node to another.If one side of root is empty, then function should return minus infinite.Examples:
Input :
4
/ \
5 -6
/ \ / \
2 -3 1 8
Output : 1
The minimum su... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Aug, 2021"
},
{
"code": null,
"e": 280,
"s": 54,
"text": "Given a binary tree in which each node element contains a number. The task is to find the minimum possible sum from one leaf node to another.If one side of root is empty, the... |
Boolean Matrix | Practice | GeeksforGeeks | Given a boolean matrix of size RxC where each cell contains either 0 or 1, modify it such that if a matrix cell matrix[i][j] is 1 then all the cells in its ith row and jth column will become 1.
Example 1:
Input:
R = 2, C = 2
matrix[][] = {{1, 0},
{0, 0}}
Output:
1 1
1 0
Explanation:
Only cell that has 1... | [
{
"code": null,
"e": 432,
"s": 238,
"text": "Given a boolean matrix of size RxC where each cell contains either 0 or 1, modify it such that if a matrix cell matrix[i][j] is 1 then all the cells in its ith row and jth column will become 1."
},
{
"code": null,
"e": 443,
"s": 432,
"... |
Why JavaScript is a single-thread language that can be non-blocking ? | 22 Jan, 2021
The JavaScript within a chrome browser is implemented by V8 engine.
The V8 engine has two parts:Memory HeapCall Stack
Memory Heap
Call Stack
Memory Heap: It is used to allocate the memory used by your JavaScript program. Remember memory heap is not the same as the heap data structures, they are totally dif... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Jan, 2021"
},
{
"code": null,
"e": 120,
"s": 52,
"text": "The JavaScript within a chrome browser is implemented by V8 engine."
},
{
"code": null,
"e": 170,
"s": 120,
"text": "The V8 engine has two parts:Memory He... |
Python 3 - Sending Email using SMTP | Simple Mail Transfer Protocol (SMTP) is a protocol, which handles sending an e-mail and routing e-mail between mail servers.
Python provides smtplib module, which defines an SMTP client session object that can be used to send mails to any Internet machine with an SMTP or ESMTP listener daemon.
Here is a simple syntax ... | [
{
"code": null,
"e": 2600,
"s": 2474,
"text": "Simple Mail Transfer Protocol (SMTP) is a protocol, which handles sending an e-mail and routing e-mail between mail servers. "
},
{
"code": null,
"e": 2770,
"s": 2600,
"text": "Python provides smtplib module, which defines an SMTP cl... |
pandas.concat() function in Python | 01 Oct, 2020
pandas.concat() function does all the heavy lifting of performing concatenation operations along with an axis od Pandas objects while performing optional set logic (union or intersection) of the indexes (if any) on the other axes.
Syntax: concat(objs, axis, join, ignore_index, keys, levels, names, verify_i... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Oct, 2020"
},
{
"code": null,
"e": 259,
"s": 28,
"text": "pandas.concat() function does all the heavy lifting of performing concatenation operations along with an axis od Pandas objects while performing optional set logic (union or i... |
Is it possible to call constructor and destructor explicitly in C++? | 26 May, 2022
A constructor is a special member function that is automatically called by the compiler when an object is created and the destructor is also a special member function that is also implicitly called by the compiler when the object goes out of scope. They are also called when a dynamically allocated object i... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 May, 2022"
},
{
"code": null,
"e": 519,
"s": 54,
"text": "A constructor is a special member function that is automatically called by the compiler when an object is created and the destructor is also a special member function that is... |
Check if a given string is a comment or not | 19 Apr, 2022
Given a string S, representing a line in a program, the task is to check if the given string is a comment or not.
Types of comments in programs:
Single Line Comment: Comments preceded by a Double Slash (‘//’)
Multi-line Comment: Comments starting with (‘/*’) and ending with (‘*/’).
Examples:
Input: line... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Apr, 2022"
},
{
"code": null,
"e": 143,
"s": 28,
"text": "Given a string S, representing a line in a program, the task is to check if the given string is a comment or not. "
},
{
"code": null,
"e": 174,
"s": 143,
... |
Python | Sort list containing alphanumeric values | 19 Jul, 2019
Given a list containing both alphanumeric values, write a Python program to sort the given list in such a way that the alphabetical values always comes after numeric values.
Examples:
Input : ['k', 5, 'e', 3, 'g', 7, 0, 't']
Output : [0, 3, 5, 7, 'e', 'g', 'k', 't']
Input : [1, 'c', 3, 2, 'a', 'b']
Output... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Jul, 2019"
},
{
"code": null,
"e": 202,
"s": 28,
"text": "Given a list containing both alphanumeric values, write a Python program to sort the given list in such a way that the alphabetical values always comes after numeric values."
... |
struct module in Python | In this tutorial, we are going to learn about the struct module. Let's dive into the tutorial.
The module struct is used to convert the native data types of Python into string of bytes and vice versa. We don't have to install it. It's a built-in module available in Python3.
The struct module is related to the C languag... | [
{
"code": null,
"e": 1282,
"s": 1187,
"text": "In this tutorial, we are going to learn about the struct module. Let's dive into the tutorial."
},
{
"code": null,
"e": 1462,
"s": 1282,
"text": "The module struct is used to convert the native data types of Python into string of byt... |
Difference between for and while loop in C, C++, Java | 13 Jun, 2022
for loop:
for loop provides a concise way of writing the loop structure. Unlike a while loop, a for statement consumes the initialization, condition and increment/decrement in one line thereby providing a shorter, easy to debug structure of looping. Syntax:
for (initialization condition; testing condition;... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 63,
"s": 53,
"text": "for loop:"
},
{
"code": null,
"e": 311,
"s": 63,
"text": "for loop provides a concise way of writing the loop structure. Unlike a while loop, a for stateme... |
Python Set Methods | 12 Nov, 2021
A Set in Python is a collection of unique elements which are unordered and mutable. Python provides various functions to work with Set. In this article, we will see a list of all the functions provided by Python to deal with Sets.
We can add and remove elements form the set with the help of the below funct... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Nov, 2021"
},
{
"code": null,
"e": 259,
"s": 28,
"text": "A Set in Python is a collection of unique elements which are unordered and mutable. Python provides various functions to work with Set. In this article, we will see a list of ... |
Longest Palindromic Subsequence | Practice | GeeksforGeeks | Given a String, find the longest palindromic subsequence.
Example 1:
Input:
S = "bbabcbcab"
Output: 7
Explanation: Subsequence "babcbab" is the
longest subsequence which is also a palindrome.
Example 2:
Input:
S = "abcd"
Output: 1
Explanation: "a", "b", "c" and "d" are
palindromic and all have a length 1.
Your Tas... | [
{
"code": null,
"e": 296,
"s": 238,
"text": "Given a String, find the longest palindromic subsequence."
},
{
"code": null,
"e": 308,
"s": 296,
"text": "\nExample 1:"
},
{
"code": null,
"e": 432,
"s": 308,
"text": "Input:\nS = \"bbabcbcab\"\nOutput: 7\nExplanat... |
An Easy Way to Replace Values in a Pandas DataFrame | by Byron Dolon | Towards Data Science | The Pandas library is widely used as a data processing and analysis tool for cleaning and extracting insights from data.
When working with data, you’ll often want to edit or remove certain pieces of data as a part of your pre-processing steps. This might involve creating new columns from existing ones, or modifying exi... | [
{
"code": null,
"e": 293,
"s": 172,
"text": "The Pandas library is widely used as a data processing and analysis tool for cleaning and extracting insights from data."
},
{
"code": null,
"e": 693,
"s": 293,
"text": "When working with data, you’ll often want to edit or remove certa... |
ReactJS - Higher Order Components | Higher order components are JavaScript functions used for adding additional functionalities to the existing component. These functions are pure, which means they are receiving data and returning values according to that data. If the data changes, higher order functions are re-run with different data input. If we want t... | [
{
"code": null,
"e": 2485,
"s": 2033,
"text": "Higher order components are JavaScript functions used for adding additional functionalities to the existing component. These functions are pure, which means they are receiving data and returning values according to that data. If the data changes, higher... |
DocumentDB - Sorting Records | Microsoft Azure DocumentDB supports querying documents using SQL over JSON documents. You can sort documents in the collection on numbers and strings using an ORDER BY clause in your query. The clause can include an optional ASC/DESC argument to specify the order in which results must be retrieved.
Let’s take a look at... | [
{
"code": null,
"e": 2580,
"s": 2280,
"text": "Microsoft Azure DocumentDB supports querying documents using SQL over JSON documents. You can sort documents in the collection on numbers and strings using an ORDER BY clause in your query. The clause can include an optional ASC/DESC argument to specify... |
Computational Fluid Dynamics using Python: Modeling Laminar Flow | by Gaurav Deshmukh | Towards Data Science | This is the first article in a series on Fluid Mechanics of a Crystallizer. The series will cover modeling of fluid dynamics, heat transfer, mass transfer and crystallization in a chemical reactor. To simplify the tutorial, the model building will be performed in stages, starting with the creation of a laminar fluid fl... | [
{
"code": null,
"e": 659,
"s": 172,
"text": "This is the first article in a series on Fluid Mechanics of a Crystallizer. The series will cover modeling of fluid dynamics, heat transfer, mass transfer and crystallization in a chemical reactor. To simplify the tutorial, the model building will be perf... |
Popovers in Bootstrap with examples | A popover is a simple tooltip plugin. A popover is a box of content that pops up when the user clicks on a specific element. This plugin relies on popover.js.
The attribute data-toggle = "popover" is used to create a popover in HTML. Adding this attribute to an element converts it to a popover.
<a href=”” data-toggle =... | [
{
"code": null,
"e": 1221,
"s": 1062,
"text": "A popover is a simple tooltip plugin. A popover is a box of content that pops up when the user clicks on a specific element. This plugin relies on popover.js."
},
{
"code": null,
"e": 1358,
"s": 1221,
"text": "The attribute data-togg... |
How to convert array into array of objects using map() and reduce() in JavaScript | Suppose we have an array of arrays like this −
const arr = [
[
['juice', 'apple'], ['maker', 'motts'], ['price', 12]
],
[
['juice', 'orange'], ['maker', 'sunkist'], ['price', 11]
]
];
We are required to write a JavaScript function that takes in one such array and returns a new
array of objects b... | [
{
"code": null,
"e": 1109,
"s": 1062,
"text": "Suppose we have an array of arrays like this −"
},
{
"code": null,
"e": 1270,
"s": 1109,
"text": "const arr = [\n [\n ['juice', 'apple'], ['maker', 'motts'], ['price', 12]\n ],\n [\n ['juice', 'orange'], ['maker', 'su... |
Flip String to Monotone Increasing in C++ | Suppose a string of '0's and '1's is given. That string will be monotonic increasing if it consists of some number of '0's (possibly 0), followed by some number of '1's (also possibly 0.). We have a string S of '0's and '1's, and we may flip any '0' to a '1' or a '1' to a '0'. Find the minimum number of flips to make S... | [
{
"code": null,
"e": 1510,
"s": 1062,
"text": "Suppose a string of '0's and '1's is given. That string will be monotonic increasing if it consists of some number of '0's (possibly 0), followed by some number of '1's (also possibly 0.). We have a string S of '0's and '1's, and we may flip any '0' to ... |
Advanced visualization techniques for time series analysis | by Michaël HOARAU | Towards Data Science | Markov transition fields (MTF) is a visualization technique to highlight behavior of time series. This blog post dives into how we build and interpret these fields. We will then further build on top of Markov transition fields by exploring network graphs interpretation. Feel free to follow along by browsing to GitHub t... | [
{
"code": null,
"e": 407,
"s": 47,
"text": "Markov transition fields (MTF) is a visualization technique to highlight behavior of time series. This blog post dives into how we build and interpret these fields. We will then further build on top of Markov transition fields by exploring network graphs i... |
Making Matplotlib Beautiful By Default | by Callum Ballard | Towards Data Science | If you’ve ever made a data visualisation in Python, chances are you’ve used Matplotlib. It’s a package that divides opinion. Some notionally simple visualisations take a baffling amount of code to produce. In this day and age, people expect to be able to interact with charts — something not offered with vanilla Matplot... | [
{
"code": null,
"e": 572,
"s": 172,
"text": "If you’ve ever made a data visualisation in Python, chances are you’ve used Matplotlib. It’s a package that divides opinion. Some notionally simple visualisations take a baffling amount of code to produce. In this day and age, people expect to be able to ... |
Python | Pandas Index.union() - GeeksforGeeks | 22 Sep, 2021
Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas Index.union() function form the union of two Index objects and sorts if possible. The ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n22 Sep, 2021"
},
{
"code": null,
"e": 24506,
"s": 24292,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages a... |
Sequential Functionality in Node.js - GeeksforGeeks | 14 Oct, 2021
It is basically executing Asynchronous Tasks in series or synchronously. Java is Asynchronous in nature and so is the Node. Node handles multiple requests at the same time by using Event loop and callback functions.There are 2 methods to perform different asynchronous functions synchronously or sequentiall... | [
{
"code": null,
"e": 24586,
"s": 24558,
"text": "\n14 Oct, 2021"
},
{
"code": null,
"e": 25343,
"s": 24586,
"text": "It is basically executing Asynchronous Tasks in series or synchronously. Java is Asynchronous in nature and so is the Node. Node handles multiple requests at the s... |
Coefficient of Range in a Binary Tree - GeeksforGeeks | 13 Sep, 2021
Given a Binary Tree, the task is to find the Coefficient of Range in it.Range is defined as the difference between the maximum and minimum value in a set of data and Coefficient of Range is the relative measure of the dispersion of the range. Suppose the maximum value in a data set is maxVal and minimum va... | [
{
"code": null,
"e": 25053,
"s": 25025,
"text": "\n13 Sep, 2021"
},
{
"code": null,
"e": 25425,
"s": 25053,
"text": "Given a Binary Tree, the task is to find the Coefficient of Range in it.Range is defined as the difference between the maximum and minimum value in a set of data a... |
Instruction type SUB R in 8085 Microprocessor | In 8085 Instruction, SUB is a mnemonic that stands for ‘SUBtract contents of R from Accumulator. Here R stands for any of the following registers, or memory location M pointed by HL pair.
R = A, B, C, D, E, H, L, or M
In this instruction content of the register R will get subtracted from the Accumulator and the result... | [
{
"code": null,
"e": 1250,
"s": 1062,
"text": "In 8085 Instruction, SUB is a mnemonic that stands for ‘SUBtract contents of R from Accumulator. Here R stands for any of the following registers, or memory location M pointed by HL pair."
},
{
"code": null,
"e": 1281,
"s": 1250,
"te... |
⚡️ Load the same CSV file 10X times faster and with 10X less memory⚡️ | by Prudhvi Vajja | Towards Data Science | Even when we have 1TB of Disk Storage, 8GB/16GB of RAM still pandas and much other data loading API struggles to load a 2GB file.
This is because when a process requests for memory, memory is allocated in two ways:
Contiguous Memory Allocation (consecutive blocks are assigned)Non Contiguous Memory Allocation(separate b... | [
{
"code": null,
"e": 301,
"s": 171,
"text": "Even when we have 1TB of Disk Storage, 8GB/16GB of RAM still pandas and much other data loading API struggles to load a 2GB file."
},
{
"code": null,
"e": 386,
"s": 301,
"text": "This is because when a process requests for memory, memo... |
How will GROUP BY clause perform without an aggregate function? | When we use GROUP BY clause in the SELECT statement without using aggregate functions then it would behave like DISTINCT clause. For example, we have the following table −
mysql> Select * from Student_info;
+------+---------+------------+------------+
| id | Name | Address | Subject |
+------+---------+-----... | [
{
"code": null,
"e": 1234,
"s": 1062,
"text": "When we use GROUP BY clause in the SELECT statement without using aggregate functions then it would behave like DISTINCT clause. For example, we have the following table −"
},
{
"code": null,
"e": 1789,
"s": 1234,
"text": "mysql> Sel... |
The dice problem | Practice | GeeksforGeeks | You are given a cubic dice with 6 faces. All the individual faces have a number printed on them. The numbers are in the range of 1 to 6, like any ordinary dice. You will be provided with a face of this cube, your task is to guess the number on the opposite face of the cube.
Example 1:
Input:
N = 6
Output:
1
Explanation... | [
{
"code": null,
"e": 501,
"s": 226,
"text": "You are given a cubic dice with 6 faces. All the individual faces have a number printed on them. The numbers are in the range of 1 to 6, like any ordinary dice. You will be provided with a face of this cube, your task is to guess the number on the opposit... |
Generalized Real-time Task Scheduler - GeeksforGeeks | 14 May, 2020
Generalized Real-time Task Scheduler :The scheduler used for handling or scheduling all the three types of real-time tasks i.e periodic, sporadic and aperiodic tasks, is known as Generalized task scheduler. It schedules periodic, sporadic and aperiodic tasks in most proficient way.
Why Generalized Task Sch... | [
{
"code": null,
"e": 24129,
"s": 24101,
"text": "\n14 May, 2020"
},
{
"code": null,
"e": 24412,
"s": 24129,
"text": "Generalized Real-time Task Scheduler :The scheduler used for handling or scheduling all the three types of real-time tasks i.e periodic, sporadic and aperiodic tas... |
Characteristic Based Similarity for New Products Forecasting | by Rafael Cordeiro | Towards Data Science | “How much I’m gonna sell of it?” is the question that every retailer has in mind when they are thinking about adding a new material into their stores and e-commerce.
We usually have a lot of techniques to help us with forecasting and prevision, but when we talk about new products we face a little big problem that is th... | [
{
"code": null,
"e": 338,
"s": 172,
"text": "“How much I’m gonna sell of it?” is the question that every retailer has in mind when they are thinking about adding a new material into their stores and e-commerce."
},
{
"code": null,
"e": 599,
"s": 338,
"text": "We usually have a lo... |
Arrays stream() method in Java | 04 Oct, 2018
The stream(T[] array) method of Arrays class in Java, is used to get a Sequential Stream from the array passed as the parameter with its elements. It returns a sequential Stream with the elements of the array, passed as parameter, as its source.
Syntax:
public static <T> Stream<T> stream(T[] array)
Paramet... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Oct, 2018"
},
{
"code": null,
"e": 300,
"s": 54,
"text": "The stream(T[] array) method of Arrays class in Java, is used to get a Sequential Stream from the array passed as the parameter with its elements. It returns a sequential Str... |
SQL Left Join | 09 Nov, 2021
The LEFT JOIN keyword in SQL returns the all matching records(or rows) and the records(or rows) that are present in the left table but not in the right table. That means that, if a certain row is present in the left table but not in the right, the result will include this row but with a NULL value in each ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n09 Nov, 2021"
},
{
"code": null,
"e": 450,
"s": 28,
"text": "The LEFT JOIN keyword in SQL returns the all matching records(or rows) and the records(or rows) that are present in the left table but not in the right table. That means that,... |
Python | Decimal shift() method | 05 Sep, 2019
Decimal#shift() : shift() is a Decimal class method which returns the shifted copy of x, y times
Syntax: Decimal.shift()
Parameter: Decimal values
Return: the shifted copy of x, y times
Code #1 : Example for shift() method
# Python Program explaining # shift() method # loading decimal libraryfrom decimal ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Sep, 2019"
},
{
"code": null,
"e": 125,
"s": 28,
"text": "Decimal#shift() : shift() is a Decimal class method which returns the shifted copy of x, y times"
},
{
"code": null,
"e": 149,
"s": 125,
"text": "Syntax: D... |
Python | Pandas DataFrame.tz_convert | 30 May, 2022
Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both row and column labels. It can be thought of as a dict-like container for Series objects. This is the primary data structure of the P... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 May, 2022"
},
{
"code": null,
"e": 432,
"s": 28,
"text": "Pandas DataFrame is a two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both ... |
Python VLC MediaPlayer – Setting Position | 11 Apr, 2022
In this article we will see how we can set position of the MediaPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform media player software and streaming media server developed by the VideoLAN project. MediaPlayer object is the basic object in vlc module... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n11 Apr, 2022"
},
{
"code": null,
"e": 611,
"s": 28,
"text": "In this article we will see how we can set position of the MediaPlayer object in the python vlc module. VLC media player is a free and open-source portable cross-platform medi... |
Instant atZone() method in Java with Examples | 19 Aug, 2019
The atZone(ZoneId zone) method of Instant class is used to combine this instant with a time-zone whose ZoneId is given as parameter to create an ZonedDateTime object. This method takes ZoneId as a parameter and combines the time-zone with this instant after operation returns a ZonedDateTime object. If the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n19 Aug, 2019"
},
{
"code": null,
"e": 488,
"s": 28,
"text": "The atZone(ZoneId zone) method of Instant class is used to combine this instant with a time-zone whose ZoneId is given as parameter to create an ZonedDateTime object. This met... |
Java Swing | JPasswordField | 14 Apr, 2021
PasswordField is a part of javax.swing package . The class JPasswordField is a component that allows editing of a single line of text where the view indicates that something was typed by does not show the actual characters. JPasswordField inherits the JTextField class in javax.swing package.Constructors of... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Apr, 2021"
},
{
"code": null,
"e": 378,
"s": 52,
"text": "PasswordField is a part of javax.swing package . The class JPasswordField is a component that allows editing of a single line of text where the view indicates that something ... |
Minimum number greater than the maximum of array which cannot be formed using the numbers in the array | 05 Aug, 2021
Given an array arr[] of integers, the task is to find the minimum number greater than the maximum element from the array which cannot be formed using the numbers in the array (adding elements to form some other number). If no such element exists then print -1.
Examples:
Input: arr[] = {2, 6, 9} Output: -1... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Aug, 2021"
},
{
"code": null,
"e": 289,
"s": 28,
"text": "Given an array arr[] of integers, the task is to find the minimum number greater than the maximum element from the array which cannot be formed using the numbers in the array ... |
JavaScript JSON parse() Method | 07 Jul, 2020
Below is the example of the JSON parse() Method.
Example:<script> var obj = JSON.parse('{"var1":"Geeks", "var2":"forGeeks!"}'); document.write(obj.var1 + "" + obj.var2);</script>
<script> var obj = JSON.parse('{"var1":"Geeks"... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n07 Jul, 2020"
},
{
"code": null,
"e": 101,
"s": 52,
"text": "Below is the example of the JSON parse() Method."
},
{
"code": null,
"e": 306,
"s": 101,
"text": "Example:<script> var obj = JSON.parse('{\"var1\":... |
Add the given digit to a number stored in a linked list using recursion - GeeksforGeeks | 09 Jun, 2021
Given a linked list which represents an integer number where each node is a digit of the represented integer. The task is to add a given digit N to the represented integer.Examples:
Input: LL = 9 -> 9 -> 3 -> NULL, N = 7 Output: 1 -> 0 -> 0 -> 0 -> NULL 993 + 7 = 1000Input: LL = 2 -> 9 -> 9 -> NULL, N = ... | [
{
"code": null,
"e": 25451,
"s": 25423,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 25635,
"s": 25451,
"text": "Given a linked list which represents an integer number where each node is a digit of the represented integer. The task is to add a given digit N to the represented... |
C# Nested Classes | A nested class is a class declared in another enclosing class. It is a member of its enclosing class and the members of an enclosing class have no access to members of a nested class.
Let us see an example code snippet of nested classes in C#.
class One {
public int num1;
public class Two {
public int num2;... | [
{
"code": null,
"e": 1246,
"s": 1062,
"text": "A nested class is a class declared in another enclosing class. It is a member of its enclosing class and the members of an enclosing class have no access to members of a nested class."
},
{
"code": null,
"e": 1306,
"s": 1246,
"text":... |
How to get the default Documents from the IIS site using PowerShell? | To get the default documents stored on the IIS default website page, you can use the below command.
Get-WebConfigurationProperty -Filter //defaultDocument/files/add
-PSPath 'IIS:\Sites\Default Web Site' -Name value `
| select value
Value
-----
Default.htm
Default.asp
index.htm
index.html
iisstart.htm
To check if ... | [
{
"code": null,
"e": 1162,
"s": 1062,
"text": "To get the default documents stored on the IIS default website page, you can use the below command."
},
{
"code": null,
"e": 1300,
"s": 1162,
"text": "Get-WebConfigurationProperty -Filter //defaultDocument/files/add\n -PSPath 'IIS:... |
Attributes that work differently between React and HTML - GeeksforGeeks | 28 May, 2021
There is a minor difference between React(JSX) and HTML attributes. Like for example, the HTML attribute like class and for are replaced with className and htmlFor in React. There are a number of attributes that work differently between React and HTML. Grammar in JSX is mostly the same as in HTML, but ther... | [
{
"code": null,
"e": 25410,
"s": 25382,
"text": "\n28 May, 2021"
},
{
"code": null,
"e": 25761,
"s": 25410,
"text": "There is a minor difference between React(JSX) and HTML attributes. Like for example, the HTML attribute like class and for are replaced with className and htmlFor... |
What's the typical flow of data like in a React with Redux app ? - GeeksforGeeks | 19 Jul, 2021
Redux is an open-source state management JavaScript library for managing the application state. It is popularly used ReactJS, but is not limited to it, and can also be used with other JavaScript libraries such as Angular. In a conventional React-Redux application, there is a single store along with a singl... | [
{
"code": null,
"e": 26205,
"s": 26177,
"text": "\n19 Jul, 2021"
},
{
"code": null,
"e": 26670,
"s": 26205,
"text": "Redux is an open-source state management JavaScript library for managing the application state. It is popularly used ReactJS, but is not limited to it, and can als... |
How to set src to the img tag in HTML from another domain? | To use an image on a webpage, use the <img> tag. The tag allows you to add image source, alt, width, height, etc. The src is to add the image URL. The alt is the alternate text attribute, which is text that is visible when the image fails to load. With HTML, add the image source as another domain URL. For that, add the... | [
{
"code": null,
"e": 1426,
"s": 1062,
"text": "To use an image on a webpage, use the <img> tag. The tag allows you to add image source, alt, width, height, etc. The src is to add the image URL. The alt is the alternate text attribute, which is text that is visible when the image fails to load. With ... |
Hello World Program : First program while learning Programming - GeeksforGeeks | 25 Feb, 2022
This article introduces us with how to write the first computer program of “Hello World”, across various languages. Along with the programs, the comments are provided for a better understanding of the terminologies and keywords used in the programLearning any programming can be simplified into:
Writing th... | [
{
"code": null,
"e": 25886,
"s": 25858,
"text": "\n25 Feb, 2022"
},
{
"code": null,
"e": 26183,
"s": 25886,
"text": "This article introduces us with how to write the first computer program of “Hello World”, across various languages. Along with the programs, the comments are provi... |
Python program to create a list centered on zero - GeeksforGeeks | 06 Apr, 2020
Given two integer variables, limit and diff, write a Python program to create a list that is centered on zero, using limit, which specifies limit of the list and diff that specifies the common difference between integers.
Examples:
Input : limit = 1, diff = 0.5
Output : [-1, -0.5, 0.0, 0.5, 1]
Input : lim... | [
{
"code": null,
"e": 25577,
"s": 25549,
"text": "\n06 Apr, 2020"
},
{
"code": null,
"e": 25799,
"s": 25577,
"text": "Given two integer variables, limit and diff, write a Python program to create a list that is centered on zero, using limit, which specifies limit of the list and d... |
How to increase the space between dotted border dots using CSS? - GeeksforGeeks | 29 Jul, 2020
The task is to increase space between the dotted border dots. you can just adjust the size with the background-size property, the proportion with the background-image property, and the proportion with the linear-gradient percentages. So, you can have several dotted borders using multiple backgrounds. In th... | [
{
"code": null,
"e": 25356,
"s": 25328,
"text": "\n29 Jul, 2020"
},
{
"code": null,
"e": 25726,
"s": 25356,
"text": "The task is to increase space between the dotted border dots. you can just adjust the size with the background-size property, the proportion with the background-im... |
Adding confidence intervals to maximum likelihood estimates using sympy | by Steven van Gemert | Towards Data Science | While working on a package called evt for extreme value theory in Python, it was necessary to add confidence intervals to a maximum likelihood estimate. Based on design considerations, the implementation that was considered to be optimal, is not the prettiest. Nevertheless, it will offer an interesting read for those i... | [
{
"code": null,
"e": 703,
"s": 171,
"text": "While working on a package called evt for extreme value theory in Python, it was necessary to add confidence intervals to a maximum likelihood estimate. Based on design considerations, the implementation that was considered to be optimal, is not the prett... |
How to Annotate PDFs and Scanned Images with UBIAI | by Walid Amamou | Towards Data Science | Whether it’s receipts, contracts, financial documents, or invoices etc., automating information retrieval will help you increase your business efficiency and productivity at a fraction of the cost. However, this amazing feat will not be possible without text annotation. While NLP tasks such as NER or relation extractio... | [
{
"code": null,
"e": 669,
"s": 172,
"text": "Whether it’s receipts, contracts, financial documents, or invoices etc., automating information retrieval will help you increase your business efficiency and productivity at a fraction of the cost. However, this amazing feat will not be possible without t... |
Check whether K times of a element is present in array - GeeksforGeeks | 24 May, 2021
Given an array arr[] and an integer K, the task is to check whether K times of any element are also present in the array.
Examples :
Input: arr[] = {10, 14, 8, 13, 5}, K = 2 Output: Yes Explanation: K times of 5 is also present in an array, i.e. 10.
Input: arr[] = {7, 8, 5, 9, 11}, K = 3 Output: No Explan... | [
{
"code": null,
"e": 26151,
"s": 26123,
"text": "\n24 May, 2021"
},
{
"code": null,
"e": 26273,
"s": 26151,
"text": "Given an array arr[] and an integer K, the task is to check whether K times of any element are also present in the array."
},
{
"code": null,
"e": 2628... |
Java Program to Display Lower Triangular Matrix - GeeksforGeeks | 12 Jun, 2021
Lower Triangular Matrix is a square matrix in which all the elements above the principal diagonal are 0. If the matrix is not a square matrix, it can never be called the lower triangular matrix.
Examples
Input 1: mat[][] = { {2, 1, 4},
{1, 2, 3},
{3, 6, 2}}
... | [
{
"code": null,
"e": 25315,
"s": 25287,
"text": "\n12 Jun, 2021"
},
{
"code": null,
"e": 25510,
"s": 25315,
"text": "Lower Triangular Matrix is a square matrix in which all the elements above the principal diagonal are 0. If the matrix is not a square matrix, it can never be call... |
PostgreSQL - FIRST_VALUE Function - GeeksforGeeks | 10 Feb, 2021
In PostgreSQL, the FIRST_VALUE() function is used to return the first value in a sorted partition of a result set.
Syntax:
FIRST_VALUE ( expression )
OVER (
[PARTITION BY partition_expression, ... ]
ORDER BY sort_expression [ASC | DESC], ...
)
Let’s analyze the above syntax:
The expression is r... | [
{
"code": null,
"e": 25479,
"s": 25451,
"text": "\n10 Feb, 2021"
},
{
"code": null,
"e": 25594,
"s": 25479,
"text": "In PostgreSQL, the FIRST_VALUE() function is used to return the first value in a sorted partition of a result set."
},
{
"code": null,
"e": 25735,
... |
How to make a balloon ToolTip window in C#? - GeeksforGeeks | 19 Jul, 2019
In Windows Forms, the ToolTip represents a tiny pop-up box which appears when you place your pointer or cursor on the control and the purpose of this control is it provides a brief description about the control present in the windows form. In ToolTip, you are allowed to change the shape of the ToolTip wind... | [
{
"code": null,
"e": 24222,
"s": 24194,
"text": "\n19 Jul, 2019"
},
{
"code": null,
"e": 24735,
"s": 24222,
"text": "In Windows Forms, the ToolTip represents a tiny pop-up box which appears when you place your pointer or cursor on the control and the purpose of this control is it... |
Apex - Constants | As in any other programming language, Constants are the variables which do not change their value once declared or assigned a value.
In Apex, Constants are used when we want to define variables which should have constant value throughout the program execution. Apex constants are declared with the keyword 'final'.
Consi... | [
{
"code": null,
"e": 2185,
"s": 2052,
"text": "As in any other programming language, Constants are the variables which do not change their value once declared or assigned a value."
},
{
"code": null,
"e": 2367,
"s": 2185,
"text": "In Apex, Constants are used when we want to defin... |
Create Analog Clock using PyQt5 in Python - GeeksforGeeks | 01 Aug, 2020
Prerequisite: Introduction to pyqt-5
A clock or watch is called “analog” when it has moving hands and (usually) hours marked from number 1 to 12 to show you the time. Some have Roman Numerals (I, II, III, etc) instead, or no numbers at all! In other words: not a digital clock.
PyQt5 is a cross-platform GUI... | [
{
"code": null,
"e": 24144,
"s": 24116,
"text": "\n01 Aug, 2020"
},
{
"code": null,
"e": 24181,
"s": 24144,
"text": "Prerequisite: Introduction to pyqt-5"
},
{
"code": null,
"e": 24422,
"s": 24181,
"text": "A clock or watch is called “analog” when it has movin... |
8 Commonly used Pandas display options you should know | by B. Chen | Towards Data Science | Pandas is one of the most important libraries for Data Manipulation and Analysis. It not only offers data structure & operations for manipulating data but also prints the result in a pretty tabular form with labeled rows and columns.
In most cases, the default settings of Pandas display should work well, but you may wa... | [
{
"code": null,
"e": 406,
"s": 172,
"text": "Pandas is one of the most important libraries for Data Manipulation and Analysis. It not only offers data structure & operations for manipulating data but also prints the result in a pretty tabular form with labeled rows and columns."
},
{
"code":... |
ByteArrayOutputStream writeTo() method in Java with Examples - GeeksforGeeks | 28 May, 2020
The writeTo() method of ByteArrayOutputStream class in Java is used to write the contents of this ByteArrayOutputStream to the specified OutputStream that is passed as the argument. In this method OutputStream is passed as a parameter and the ByteArrayOutputStream is copied to this OutputStream.
Syntax:
pu... | [
{
"code": null,
"e": 23868,
"s": 23840,
"text": "\n28 May, 2020"
},
{
"code": null,
"e": 24165,
"s": 23868,
"text": "The writeTo() method of ByteArrayOutputStream class in Java is used to write the contents of this ByteArrayOutputStream to the specified OutputStream that is passe... |
Tryit Editor v3.7 | HTML Input attributes
Tryit: The height and width attributes | [
{
"code": null,
"e": 32,
"s": 10,
"text": "HTML Input attributes"
}
] |
LocalTime now(clock) method in Java with Examples - GeeksforGeeks | 12 May, 2020
The now(Clock clock) method of the LocalTime class in Java is used to get the current time from the specified clock.
Syntax:
public static LocalTime now(
Clock clock)
Parameters: This method accepts clock as parameter which represents the clock to use.
Return value: This method returns the current time... | [
{
"code": null,
"e": 23557,
"s": 23529,
"text": "\n12 May, 2020"
},
{
"code": null,
"e": 23674,
"s": 23557,
"text": "The now(Clock clock) method of the LocalTime class in Java is used to get the current time from the specified clock."
},
{
"code": null,
"e": 23682,
... |
How can I check whether a field exists or not in MongoDB? | To check whether a field exists or not in MongoDB, you can use the $exists operator.
To understand the above concept, let us create a collection with the document. The query to create a collection with a document is as follows −
> db.checkFieldExistsOrNotDemo.insertOne({"StudentName":"Larry"});
{
"acknowledged" : tr... | [
{
"code": null,
"e": 1147,
"s": 1062,
"text": "To check whether a field exists or not in MongoDB, you can use the $exists operator."
},
{
"code": null,
"e": 1291,
"s": 1147,
"text": "To understand the above concept, let us create a collection with the document. The query to creat... |
Choropleth Maps in practice with Plotly and Python | by Thibaud Lamothe 🤠 | Towards Data Science | Choropleth maps are those maps where entire regions are covered by colors. It comes from ancient Greek: Choros meaning “area”, and Plethos meaning “multitude”. This post aims to demonstrate how easy it is to implement one from scratch using the Plotly Python library. We’ll do this with covid pandemic open data, with a ... | [
{
"code": null,
"e": 516,
"s": 171,
"text": "Choropleth maps are those maps where entire regions are covered by colors. It comes from ancient Greek: Choros meaning “area”, and Plethos meaning “multitude”. This post aims to demonstrate how easy it is to implement one from scratch using the Plotly Pyt... |
Lolcode - Statements and Flow Control | LOLCODE allows you to control the flow of program through various statements. This chapter explains different types of statements available in LOLCODE.
An expression without any assignment, i.e. simply calling a mathematical operation or any function, is a legal statement in LOLCODE. Once the expression is evaluated, i... | [
{
"code": null,
"e": 1992,
"s": 1840,
"text": "LOLCODE allows you to control the flow of program through various statements. This chapter explains different types of statements available in LOLCODE."
},
{
"code": null,
"e": 2325,
"s": 1992,
"text": "An expression without any assi... |
How to add stroke and color to text in JavaFX? | Since the javafx.scene.text.Text class in JavaFX inherits the Shape class it inherits all its members. You can modify the stroke and color of the text node by setting values to the stroke, stroke width and fill properties inherited by the Text class.
Stroke Width − The stroke width property specifies/defines the width ... | [
{
"code": null,
"e": 1313,
"s": 1062,
"text": "Since the javafx.scene.text.Text class in JavaFX inherits the Shape class it inherits all its members. You can modify the stroke and color of the text node by setting values to the stroke, stroke width and fill properties inherited by the Text class."
... |
Cordova - Geolocation | Geolocation is used for getting info about device's latitude and longitude.
We can install this plugin by typing the following code to command prompt window.
C:\Users\username\Desktop\CordovaProject>cordova plugin add cordova-plugin-geolocation
In this tutorial we will show you how to get current position and how to w... | [
{
"code": null,
"e": 2256,
"s": 2180,
"text": "Geolocation is used for getting info about device's latitude and longitude."
},
{
"code": null,
"e": 2338,
"s": 2256,
"text": "We can install this plugin by typing the following code to command prompt window."
},
{
"code": nu... |
Getting Started with PySpark on AWS EMR | by Brent Lemieux | Towards Data Science | Data Pipelines with PySpark and AWS EMR is a multi-part series. This is part 1 of 2. Check out part 2 if you’re looking for guidance on how to run a data pipeline as a product job.
Getting Started with PySpark on AWS EMR (this article)Production Data Processing with PySpark on AWS EMR (up next)
Getting Started with PyS... | [
{
"code": null,
"e": 353,
"s": 172,
"text": "Data Pipelines with PySpark and AWS EMR is a multi-part series. This is part 1 of 2. Check out part 2 if you’re looking for guidance on how to run a data pipeline as a product job."
},
{
"code": null,
"e": 468,
"s": 353,
"text": "Getti... |
ASP.NET Core - Log In and Log Out | In this chapter, we will discuss the login and logout feature. Logout is rather simple to implement as compared to login. Let us proceed with the Layout view because we want to build a UI that has some links. This will allow a signed in user to log out and also display the username.
<!DOCTYPE html>
<html>
<head> ... | [
{
"code": null,
"e": 2745,
"s": 2461,
"text": "In this chapter, we will discuss the login and logout feature. Logout is rather simple to implement as compared to login. Let us proceed with the Layout view because we want to build a UI that has some links. This will allow a signed in user to log out ... |
Find if an array contains a string with one mismatch - GeeksforGeeks | 28 May, 2021
Given a string and array of strings, find whether the array contains a string with one character difference from the given string. Array may contain strings of different lengths. Examples:
Input : str = "banana"
arr[] = {"bana", "apple", "banaba",
bonanzo", "banamf"}
Output :T... | [
{
"code": null,
"e": 24822,
"s": 24794,
"text": "\n28 May, 2021"
},
{
"code": null,
"e": 25013,
"s": 24822,
"text": "Given a string and array of strings, find whether the array contains a string with one character difference from the given string. Array may contain strings of dif... |
Visualize SQLite Data with Power BI | by Suraj Gurav | Towards Data Science | Power BI ⚡️Power BI Desktop supports a variety of data sources including Excel, SQL Server, IBM Db2 Database, and much more. Although the Power BI provides connectors to Azure SQL Database and SQL Data Warehouse, you will not find any connector for SQLite Database. But the good news is, you can still visualize this dat... | [
{
"code": null,
"e": 509,
"s": 172,
"text": "Power BI ⚡️Power BI Desktop supports a variety of data sources including Excel, SQL Server, IBM Db2 Database, and much more. Although the Power BI provides connectors to Azure SQL Database and SQL Data Warehouse, you will not find any connector for SQLite... |
Taming LSTMs: Variable-sized mini-batches and why PyTorch is good for your health | by William Falcon | Towards Data Science | If you’ve used PyTorch you have likely experienced euphoria, increased energy and may have even felt like walking in the sun for a bit. Your life feels complete again. That is, until you tried to have variable-sized mini-batches using RNNs.
All hope is not lost. After reading this, you’ll be back to fantasies of you + ... | [
{
"code": null,
"e": 287,
"s": 46,
"text": "If you’ve used PyTorch you have likely experienced euphoria, increased energy and may have even felt like walking in the sun for a bit. Your life feels complete again. That is, until you tried to have variable-sized mini-batches using RNNs."
},
{
"... |
sort() in Python | 24 May, 2022
Like C++ sort(), Java sort() and other languages, python also provides built in function to sort. The sort function can be used to sort the list in both ascending and descending order. To sort the list in ascending order. Its time complexity is O(NlogN).
Syntax
# This will sort the given list in ascending ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n24 May, 2022"
},
{
"code": null,
"e": 307,
"s": 52,
"text": "Like C++ sort(), Java sort() and other languages, python also provides built in function to sort. The sort function can be used to sort the list in both ascending and descend... |
Express.js req.originalUrl Property | 16 Jun, 2022
The req.originalUrl property is much like req.url however, it retains the original request URL thereby allowing you to rewrite req.url freely for internal routing purposes. Syntax:
req.originalUrl
Parameter: No parameters. Return Value: String Installation of express module:
You can visit the link to Insta... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n16 Jun, 2022"
},
{
"code": null,
"e": 209,
"s": 28,
"text": "The req.originalUrl property is much like req.url however, it retains the original request URL thereby allowing you to rewrite req.url freely for internal routing purposes. Sy... |
Reverse words in a given String in Java | 11 Dec, 2018
Let’s see an approach to reverse words of a given String in Java without using any of the String library function
Examples:
Input : "Welcome to geeksforgeeks"
Output : "geeksforgeeks to Welcome"
Input : "I love Java Programming"
Output :"Programming Java love I"
Prerequisite: Regular Expression in Java
/... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n11 Dec, 2018"
},
{
"code": null,
"e": 166,
"s": 52,
"text": "Let’s see an approach to reverse words of a given String in Java without using any of the String library function"
},
{
"code": null,
"e": 176,
"s": 166,
... |
How to Separate Cream from milk? | 02 Mar, 2022
As we look at our surroundings, we see many things with different shapes, sizes and textures. Everything in this universe is made up of material which scientists call matter. The air we breathe, the food we eat, stones, clouds, stars, plants and animals, even a small drop of water or a particle of sand – e... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n02 Mar, 2022"
},
{
"code": null,
"e": 576,
"s": 28,
"text": "As we look at our surroundings, we see many things with different shapes, sizes and textures. Everything in this universe is made up of material which scientists call matter. ... |
Tekion Interview Experience | On-Campus 2021 | 31 Aug, 2021
Tekion visited UVCE in August 2021. There were four rounds. Each round was an elimination round. Students who applied were shortlisted based on their CGPA. All the rounds were conducted Virtually.
Round 1: Online test and Coding Round
This round was hosted on the HackerEarth platform. It consisted of 18 MC... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n31 Aug, 2021"
},
{
"code": null,
"e": 225,
"s": 28,
"text": "Tekion visited UVCE in August 2021. There were four rounds. Each round was an elimination round. Students who applied were shortlisted based on their CGPA. All the rounds were... |
Python | Create a simple assistant using Wolfram Alpha API. | 18 Oct, 2019
The Wolfram|Alpha Webservice API provides a web-based API allowing the computational and presentation capabilities of Wolfram|Alpha to be integrated into web, mobile, desktop, and enterprise applications. Wolfram Alpha is an API which can compute expert-level answers using Wolfram’s algorithms, knowledgeba... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n18 Oct, 2019"
},
{
"code": null,
"e": 563,
"s": 53,
"text": "The Wolfram|Alpha Webservice API provides a web-based API allowing the computational and presentation capabilities of Wolfram|Alpha to be integrated into web, mobile, desktop... |
Node.js require Module | 15 Mar, 2021
Each JavaScript file is treated as a separate module in NodeJS. It uses commonJS module system : require(), exports and module.export.
The main object exported by require() module is a function. When Node invokes that require() function with a file path as the function’s only argument, Node goes through t... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n15 Mar, 2021"
},
{
"code": null,
"e": 189,
"s": 54,
"text": "Each JavaScript file is treated as a separate module in NodeJS. It uses commonJS module system : require(), exports and module.export."
},
{
"code": null,
"e": 39... |
Static Method in Java With Examples | 16 Nov, 2021
The static keyword is used to construct methods that will exist regardless of whether or not any instances of the class are generated. Any method that uses the static keyword is referred to as a static method.
Features of static method:
A static method in Java is a method that is part of a class rather tha... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Nov, 2021"
},
{
"code": null,
"e": 262,
"s": 52,
"text": "The static keyword is used to construct methods that will exist regardless of whether or not any instances of the class are generated. Any method that uses the static keyword... |
Java.util.concurrent.Exchanger class with Examples | 30 May, 2019
Exchanger is the most interesting synchronization class of Java. It facilitates the exchange of elements between a pair of threads by creating a synchronization point. It simplifies the exchange of data between two threads. Its operation is simple: it simply waits until two separate threads call its exchan... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 May, 2019"
},
{
"code": null,
"e": 521,
"s": 28,
"text": "Exchanger is the most interesting synchronization class of Java. It facilitates the exchange of elements between a pair of threads by creating a synchronization point. It simp... |
Sequential circuits - GeeksforGeeks | 19 Nov, 2018
A)
B)
C)
D)
Q0 Q1
0 0
1 1
0 1
1 0
0 0
. .
. .
. .
Writing code in comment? Please use ide.geeksforgeeks.org, generate link and share the link here.
Must Do Coding Questions for Companies like Amazon, Microsoft, Adobe, ...
Must Do Coding Questions for... | [
{
"code": null,
"e": 29577,
"s": 29549,
"text": "\n19 Nov, 2018"
},
{
"code": null,
"e": 29593,
"s": 29577,
"text": " A) \nB) \nC)\nD)"
},
{
"code": null,
"e": 29684,
"s": 29593,
"text": "Q0 Q1\n\n0 0\n\n1 1\n\n0 1\n\n1 0\n\n0 0\n... |
Number of solutions to Modular Equations | 26 May, 2022
Given A and B, the task is to find the number of possible values that X can take such that the given modular equation (A mod X) = B holds good. Here, X is also called a solution of the modular equation.
Examples:
Input : A = 26, B = 2
Output : 6
Explanation
X can be equal to any of {3, 4, 6, 8,
12, 24} as... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n26 May, 2022"
},
{
"code": null,
"e": 257,
"s": 54,
"text": "Given A and B, the task is to find the number of possible values that X can take such that the given modular equation (A mod X) = B holds good. Here, X is also called a solut... |
PHP | Determining Client IP Address | 30 Jul, 2021
What is an IP Address? The IP address stands for Internet Protocol Address. An IP address is used to provide an identity to a networked device.IP addresses allow the location of different digital devices that are connected to the Internet to be pinpointed and differentiated from other devices.
In this post... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Jul, 2021"
},
{
"code": null,
"e": 323,
"s": 28,
"text": "What is an IP Address? The IP address stands for Internet Protocol Address. An IP address is used to provide an identity to a networked device.IP addresses allow the location ... |
How to convert Int data type to Float in Golang? | 10 May, 2020
In Golang, the data types are bound to variables rather than the values, which means that, if you declare a variable as int, then you can store only integer type value in it, you cant assign character or string in it unless you convert the data type to required data type.
To convert an integer data type to... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 301,
"s": 28,
"text": "In Golang, the data types are bound to variables rather than the values, which means that, if you declare a variable as int, then you can store only integer type value in it, ... |
Python | Pandas Series.transform() | 05 Feb, 2019
Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index.
Pandas Series.transform() function Call func (the ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Feb, 2019"
},
{
"code": null,
"e": 285,
"s": 28,
"text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based index... |
Python Flask – ImmutableMultiDict | 23 Sep, 2021
MultiDict is a sub-class of Dictionary that can contain multiple values for the same key, unlike normal Dictionaries. It is used because some form elements have multiple values for the same key and it saves the multiple values of a key in form of a list.
Example:
Python3
from werkzeug.datastructures impor... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Sep, 2021"
},
{
"code": null,
"e": 284,
"s": 28,
"text": "MultiDict is a sub-class of Dictionary that can contain multiple values for the same key, unlike normal Dictionaries. It is used because some form elements have multiple valu... |
Sum of array object property values in new array of objects in JavaScript | Suppose we have an array of objects that contains the data about some students and their marks like this −
const arr = [
{ subject: 'Maths', marks: '40', noOfStudents: '5' },
{ subject: 'Science', marks: '50', noOfStudents: '16' },
{ subject: 'History', marks: '35', noOfStudents: '23' },
{ subject: 'Science... | [
{
"code": null,
"e": 1169,
"s": 1062,
"text": "Suppose we have an array of objects that contains the data about some students and their marks like this −"
},
{
"code": null,
"e": 1540,
"s": 1169,
"text": "const arr = [\n { subject: 'Maths', marks: '40', noOfStudents: '5' },\n ... |
How to create a duplicate file of an existing file using Python? | The shutil module provides functions for copying files, as well as entire folders.
Calling shutil.copy(source, destination) will copy the file at the path source to the folder at the path destination. (Both source and destination are strings.) If destination is a filename, it will be used as the new name of the copied ... | [
{
"code": null,
"e": 1145,
"s": 1062,
"text": "The shutil module provides functions for copying files, as well as entire folders."
},
{
"code": null,
"e": 1464,
"s": 1145,
"text": "Calling shutil.copy(source, destination) will copy the file at the path source to the folder at the... |
How to check if a given number is Fibonacci number? - GeeksforGeeks | 20 Jan, 2022
Given a number ‘n’, how to check if n is a Fibonacci number. First few Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, .. Examples :
Input : 8
Output : Yes
Input : 34
Output : Yes
Input : 41
Output : No
A simple way is to generate Fibonacci numbers until the generated number is gr... | [
{
"code": null,
"e": 24255,
"s": 24227,
"text": "\n20 Jan, 2022"
},
{
"code": null,
"e": 24410,
"s": 24255,
"text": "Given a number ‘n’, how to check if n is a Fibonacci number. First few Fibonacci numbers are 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, .. Examples : "
},
... |
Painlessly Speed Up Your Data Analysis in Python with Mito | by Eirik Berge | Towards Data Science | Setting the StageInstalling MitoBasics of MitosheetsCleaning Data with MitoFiltering Data with MitoVisualizing Data with MitoWrapping Up
Setting the Stage
Installing Mito
Basics of Mitosheets
Cleaning Data with Mito
Filtering Data with Mito
Visualizing Data with Mito
Wrapping Up
I’m constantly on the lookout for new to... | [
{
"code": null,
"e": 309,
"s": 172,
"text": "Setting the StageInstalling MitoBasics of MitosheetsCleaning Data with MitoFiltering Data with MitoVisualizing Data with MitoWrapping Up"
},
{
"code": null,
"e": 327,
"s": 309,
"text": "Setting the Stage"
},
{
"code": null,
... |
QlikView - Text Object | QlikView text Object is used to show some descriptive information about the QlikView report being displayed. It can also show calculations based on certain expressions. It is mainly used for displaying nicely formatted information using colors and different font types in a box separately from the other Sheet Objects.
L... | [
{
"code": null,
"e": 3239,
"s": 2920,
"text": "QlikView text Object is used to show some descriptive information about the QlikView report being displayed. It can also show calculations based on certain expressions. It is mainly used for displaying nicely formatted information using colors and diffe... |
How to find an element using the attribute “class name” in Selenium? | We can find an element using the attribute class name with Selenium webdriver using the locators - class name, css, or xpath. To identify the element with css, the expression should be tagname[class='value'] and the method to be used is By.cssSelector.
To identify the element with xpath, the expression should be //tagn... | [
{
"code": null,
"e": 1315,
"s": 1062,
"text": "We can find an element using the attribute class name with Selenium webdriver using the locators - class name, css, or xpath. To identify the element with css, the expression should be tagname[class='value'] and the method to be used is By.cssSelector."... |
Python Program to Print Hello world | Let us try to execute Python “Hello World” programs in different modes of Python programming.
Invoking the interpreter without passing a script file as a parameter brings up the following prompt −
$ python
Python 2.4.3 (#1, Nov 11 2010, 13:34:43)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright... | [
{
"code": null,
"e": 1156,
"s": 1062,
"text": "Let us try to execute Python “Hello World” programs in different modes of Python programming."
},
{
"code": null,
"e": 1259,
"s": 1156,
"text": "Invoking the interpreter without passing a script file as a parameter brings up the foll... |
Introduction to Sequence Alignments with Biopython | by Wyatt Sharber, PhD | Towards Data Science | Last week I started playing around with some bioinformatics tools in Python with the library Biopython. In my previous post, I introduced the field of bioinformatics and provided an example of downloading data from GenBank with Biopython’s API interface. Today, I want to move to a typical next step for analyzing DNA se... | [
{
"code": null,
"e": 676,
"s": 172,
"text": "Last week I started playing around with some bioinformatics tools in Python with the library Biopython. In my previous post, I introduced the field of bioinformatics and provided an example of downloading data from GenBank with Biopython’s API interface. ... |
C++ Program to Find GCD of Two Numbers Using Recursive Euclid Algorithm | The Greatest Common Divisor (GCD) of two numbers is the largest number that divides both of them.
For example: Let’s say we have two numbers that are 63 and 21.
63 = 7 * 3 * 3
21 = 7 * 3
So, the GCD of 63 and 21 is 21.
The recursive Euclid’s algorithm computes the GCD by using a pair of positive integers a and b and re... | [
{
"code": null,
"e": 1160,
"s": 1062,
"text": "The Greatest Common Divisor (GCD) of two numbers is the largest number that divides both of them."
},
{
"code": null,
"e": 1223,
"s": 1160,
"text": "For example: Let’s say we have two numbers that are 63 and 21."
},
{
"code":... |
Java Examples - Formatting Time | How to format time in AM-PM format?
This example formats the time by using SimpleDateFormat("HH-mm-ss a") constructor and sdf.format(date) method of SimpleDateFormat class.
import java.text.SimpleDateFormat;
import java.util.Date;
public class Main{
public static void main(String[] args){
Date date = new Dat... | [
{
"code": null,
"e": 2104,
"s": 2068,
"text": "How to format time in AM-PM format?"
},
{
"code": null,
"e": 2242,
"s": 2104,
"text": "This example formats the time by using SimpleDateFormat(\"HH-mm-ss a\") constructor and sdf.format(date) method of SimpleDateFormat class."
},
... |
Where and how to use static variables in Android using Kotlin? | This example demonstrates how to use static variables in Android 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-8"?>
<Relativ... | [
{
"code": null,
"e": 1141,
"s": 1062,
"text": "This example demonstrates how to use static variables in Android using Kotlin."
},
{
"code": null,
"e": 1270,
"s": 1141,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details... |
Program for EMI Calculator in C program | Given with certain values the program will develop an EMI calculator to generate the needed output. EMI stands for Equated Monthly Installment. So this calculator will generate monthly EMI amount for the user.
Input-: principal = 2000
rate = 5
time = 4
Output-: Monthly EMI is= 46.058037
The formula used in the be... | [
{
"code": null,
"e": 1272,
"s": 1062,
"text": "Given with certain values the program will develop an EMI calculator to generate the needed output. EMI stands for Equated Monthly Installment. So this calculator will generate monthly EMI amount for the user."
},
{
"code": null,
"e": 1356,
... |
Computer Storage Definitions and Notations | Computer storage contains many components that are used to store computer data. Some information about the various storage devices is given below.
The computer storage devices include Primary and Secondary Storage devices. These are explained in detail as follows −
Primary storage is also known as the main memory and i... | [
{
"code": null,
"e": 1209,
"s": 1062,
"text": "Computer storage contains many components that are used to store computer data. Some information about the various storage devices is given below."
},
{
"code": null,
"e": 1328,
"s": 1209,
"text": "The computer storage devices includ... |
Redis - String Set Command | Redis SET command is used to set some string value in Redis key.
Simple string reply. OK, if the value is set in the key. Null, if the value does not set.
Following is the basic syntax of Redis SET command.
redis 127.0.0.1:6379> SET KEY_NAME VALUE
redis 127.0.0.1:6379> SET tutorialspoint redis
OK
In SET command, th... | [
{
"code": null,
"e": 2110,
"s": 2045,
"text": "Redis SET command is used to set some string value in Redis key."
},
{
"code": null,
"e": 2200,
"s": 2110,
"text": "Simple string reply. OK, if the value is set in the key. Null, if the value does not set."
},
{
"code": null,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.