title stringlengths 3 221 | text stringlengths 17 477k | parsed listlengths 0 3.17k |
|---|---|---|
How does Duff’s Device work? | 09 Feb, 2018
Duff’s device is a trick to express loop unrolling directly in C or C++ without extra code to treat the leftover partial loop.The trick is to use a switch statement where all but one of the cases labels are in the middle of a while loop. Further, all cases fall through to the end of the while loop. Despite... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Feb, 2018"
},
{
"code": null,
"e": 461,
"s": 54,
"text": "Duff’s device is a trick to express loop unrolling directly in C or C++ without extra code to treat the leftover partial loop.The trick is to use a switch statement where all... |
GATE | GATE CS Mock 2018 | Question 59 | 10 Jan, 2018
Consider a database with the following schema:
Person ( name, age, gender )
name is a key
Frequents ( name, pizzeria )
(name, pizzeria) is a key
Eats ( name, pizza )
(name, pizza) is a key
Serves ( pizzeria, pizza, price )
(pizzeria, pizza) is a key
Relational algebra expression for query “Names of all pe... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 Jan, 2018"
},
{
"code": null,
"e": 75,
"s": 28,
"text": "Consider a database with the following schema:"
},
{
"code": null,
"e": 279,
"s": 75,
"text": "Person ( name, age, gender )\nname is a key\nFrequents ( name... |
Find a number x such that sum of x and its digits is equal to given n. | 28 Apr, 2021
Given a positive number n. We need to find a number x such that sum of digits of x to itself is equal to n. If no such x is possible print -1.Examples:
Input : n = 21
Output : x = 15
Explanation : x + its digit sum = 15 + 1 + 5 = 21
Input : n = 5
Output : -1
We iterate from 1 to n and for each interm... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n28 Apr, 2021"
},
{
"code": null,
"e": 206,
"s": 52,
"text": "Given a positive number n. We need to find a number x such that sum of digits of x to itself is equal to n. If no such x is possible print -1.Examples: "
},
{
"code"... |
How to define multiline String Literal in C#? | Let’s say the string is −
Welcome User, Kindly wait for the image to load
For multiline String Literal, firstly set it like the following statement using@ prefix −
string str = @"Welcome User,
Kindly wait for the image to
load";
Now let us display the result. The string is a multi-line string now −
Live Demo
using Sys... | [
{
"code": null,
"e": 1088,
"s": 1062,
"text": "Let’s say the string is −"
},
{
"code": null,
"e": 1136,
"s": 1088,
"text": "Welcome User, Kindly wait for the image to load"
},
{
"code": null,
"e": 1226,
"s": 1136,
"text": "For multiline String Literal, firstly... |
The Perils of Palette Transfer. Explore the depths of algorithmic... | by Syafiq Kamarul Azman | Towards Data Science | A few weekends ago, I wanted to brush up on my clustering techniques. I recall —from an image processing class back in college — that you can reduce the number of unique colors in an image down to a few colors while keeping the important ones. This is achieved by doing k-means clustering on the RGB values of the pixels... | [
{
"code": null,
"e": 685,
"s": 171,
"text": "A few weekends ago, I wanted to brush up on my clustering techniques. I recall —from an image processing class back in college — that you can reduce the number of unique colors in an image down to a few colors while keeping the important ones. This is ach... |
Access Control Lists(ACL) in Linux - GeeksforGeeks | 02 May, 2018
What is ACL ?Access control list (ACL) provides an additional, more flexible permission mechanism for file systems. It is designed to assist with UNIX file permissions. ACL allows you to give permissions for any user or group to any disc resource.
Use of ACL :Think of a scenario in which a particular user ... | [
{
"code": null,
"e": 24029,
"s": 24001,
"text": "\n02 May, 2018"
},
{
"code": null,
"e": 24277,
"s": 24029,
"text": "What is ACL ?Access control list (ACL) provides an additional, more flexible permission mechanism for file systems. It is designed to assist with UNIX file permiss... |
Next Optimal Move in Tic Tac Toe | Practice | GeeksforGeeks | You are given a middle game situation of the game Tic Tac Toe. It is given that it is player "X's" turn and you need to give to most optimal position for the turn. The situation is given as a 3 x 3 character matrix board. '_' refers to the place is empty. 'o' refers that player O marked it in his turn at some time and ... | [
{
"code": null,
"e": 710,
"s": 238,
"text": "You are given a middle game situation of the game Tic Tac Toe. It is given that it is player \"X's\" turn and you need to give to most optimal position for the turn. The situation is given as a 3 x 3 character matrix board. '_' refers to the place is empt... |
Materialize - DatePicker | The following example demonstrates Materialize DatePicker control.
materialize_datepicker.htm
<html>
<head>
<title>The Materialize Range Example</title>
<meta name = "viewport" content = "width = device-width, initial-scale = 1">
<link rel = "stylesheet"
href = "https://fonts.googlea... | [
{
"code": null,
"e": 2254,
"s": 2187,
"text": "The following example demonstrates Materialize DatePicker control."
},
{
"code": null,
"e": 2281,
"s": 2254,
"text": "materialize_datepicker.htm"
},
{
"code": null,
"e": 3271,
"s": 2281,
"text": "<html>\n <head>... |
How to use TypeScript to build Node.js API with Express ? - GeeksforGeeks | 23 Jan, 2022
In this article, we will discuss how to create an Express Route and API in TypeScript and help us with the default type checking mechanism. And we will create some Fake API endpoints with the help of TypeScript with ExpressJS configuration and understand how to use TypeScript in our ExpressJS project.
Type... | [
{
"code": null,
"e": 24557,
"s": 24529,
"text": "\n23 Jan, 2022"
},
{
"code": null,
"e": 24860,
"s": 24557,
"text": "In this article, we will discuss how to create an Express Route and API in TypeScript and help us with the default type checking mechanism. And we will create some... |
Java program to check palindrome | Palindrome number is a number which remains the same when reversed, for example, 121, 313, 525, etc.
Let us now see an example to check palindrome −
public class Palindrome {
public static void main(String[] args) {
int a = 525, revVal = 0, remainder, val;
val = a;
System.out.println("Number to be ... | [
{
"code": null,
"e": 1163,
"s": 1062,
"text": "Palindrome number is a number which remains the same when reversed, for example, 121, 313, 525, etc."
},
{
"code": null,
"e": 1211,
"s": 1163,
"text": "Let us now see an example to check palindrome −"
},
{
"code": null,
"... |
How to create Message Pop-Ups with Java? | To create Message Pop-ups, use the following JOptionPane −
JOptionPane.showMessageDialog
We are displaying a tree inside the message pop-ups. The following is an example to create Message Pop-Ups with Java −
package my;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import ja... | [
{
"code": null,
"e": 1121,
"s": 1062,
"text": "To create Message Pop-ups, use the following JOptionPane −"
},
{
"code": null,
"e": 1151,
"s": 1121,
"text": "JOptionPane.showMessageDialog"
},
{
"code": null,
"e": 1270,
"s": 1151,
"text": "We are displaying a tr... |
How to open an Excel file with PHPExcel for both reading and writing? | There is no concept of opening a file for read and write in PHPExcel since it is not aware of the source of the PHPExcel object. Irrespective of the source from where the file was loaded or the type of file, the file can be read based on its named and saved with the same name. This way, the file will be overwritten, an... | [
{
"code": null,
"e": 1427,
"s": 1062,
"text": "There is no concept of opening a file for read and write in PHPExcel since it is not aware of the source of the PHPExcel object. Irrespective of the source from where the file was loaded or the type of file, the file can be read based on its named and s... |
Count the number of possible triangles - GeeksforGeeks | 19 Apr, 2022
Given an unsorted array of positive integers, find the number of triangles that can be formed with three different array elements as three sides of triangles. For a triangle to be possible from 3 values, the sum of any of the two values (or sides) must be greater than the third value (or third side). Examp... | [
{
"code": null,
"e": 41276,
"s": 41248,
"text": "\n19 Apr, 2022"
},
{
"code": null,
"e": 41590,
"s": 41276,
"text": "Given an unsorted array of positive integers, find the number of triangles that can be formed with three different array elements as three sides of triangles. For ... |
Feature Reduction using Genetic Algorithm with Python | by Ahmed Gad | Towards Data Science | Using the raw data for training a machine learning algorithm might not be the suitable choice in some situations. The algorithm, when trained by raw data, has to do feature mining by itself for detecting the different groups from each other. But this requires large amounts of data for doing feature mining automatically... | [
{
"code": null,
"e": 662,
"s": 171,
"text": "Using the raw data for training a machine learning algorithm might not be the suitable choice in some situations. The algorithm, when trained by raw data, has to do feature mining by itself for detecting the different groups from each other. But this requ... |
What is the cause of NoSuchElementException and how can we fix it in java? | What is the cause of NoSuchElementException and how can we fix it in java?
An exception is an issue (run time error) occurred during the execution of a program. When an exception occurred the program gets terminated abruptly and, the code past the line that generated the exception never gets executed. Each exception is... | [
{
"code": null,
"e": 1137,
"s": 1062,
"text": "What is the cause of NoSuchElementException and how can we fix it in java?"
},
{
"code": null,
"e": 1420,
"s": 1137,
"text": "An exception is an issue (run time error) occurred during the execution of a program. When an exception occ... |
Version Control With Jupyter Notebook | by Shinichi Okada | Towards Data Science | Table of ContentsIntroduction1. Creating a demo repo2. Jupytext setup3. Converting to a python file4. Converting multiple files5. Converted file6. Adding ipynb to .gitignore7. Converting to ipynb files8. Other commands9. Paired notebooksConclusion
Jupyter notebook generates files that contain metadata, source code, for... | [
{
"code": null,
"e": 420,
"s": 172,
"text": "Table of ContentsIntroduction1. Creating a demo repo2. Jupytext setup3. Converting to a python file4. Converting multiple files5. Converted file6. Adding ipynb to .gitignore7. Converting to ipynb files8. Other commands9. Paired notebooksConclusion"
},
... |
SQLSERVER Tryit Editor v1.0 | Edit the SQL Statement, and click "Run SQL" to see the result.
This SQL-Statement is not supported in the WebSQL Database.
The example still works, because it uses a modified version of SQL.
Your browser does not support WebSQL.
Your are now using a light-version of the Try-SQL Editor, with a read-only Database.
If you... | [
{
"code": null,
"e": 98,
"s": 35,
"text": "Edit the SQL Statement, and click \"Run SQL\" to see the result."
},
{
"code": null,
"e": 158,
"s": 98,
"text": "This SQL-Statement is not supported in the WebSQL Database."
},
{
"code": null,
"e": 226,
"s": 158,
"tex... |
Length of Longest Subarray with same elements in atmost K increments - GeeksforGeeks | 10 Jun, 2021
Given an integer array arr and a number K, the task is to find the length of the longest subarray such that all the elements in this subarray can be made the same in atmost K increments.
Examples:
Input: arr[] = {2, 0, 4, 6, 7}, K = 6 Output: 3 The longest subarray is {2, 0, 4} which can be made as {4, 4,... | [
{
"code": null,
"e": 24952,
"s": 24924,
"text": "\n10 Jun, 2021"
},
{
"code": null,
"e": 25139,
"s": 24952,
"text": "Given an integer array arr and a number K, the task is to find the length of the longest subarray such that all the elements in this subarray can be made the same ... |
Missing SAP Java Connector libraries JCo- librfc32.dll, com.sap.utils and com.sap.mw | Please note that all these library files - librfc32.dll, com.sap.utils and com.sap.mw come under JCo 2.1. With release of JCo 3.0, it’s classes were also relocated from packages com.sap.mw.jco.* to com.sap.conn.jco.*
For running with SAP JCo 3.0, you need these files at runtime - sapjco3.jar and sapjco3.dll (on Windows... | [
{
"code": null,
"e": 1279,
"s": 1062,
"text": "Please note that all these library files - librfc32.dll, com.sap.utils and com.sap.mw come under JCo 2.1. With release of JCo 3.0, it’s classes were also relocated from packages com.sap.mw.jco.* to com.sap.conn.jco.*"
},
{
"code": null,
"e":... |
JavaFX | Tooltip - GeeksforGeeks | 24 Oct, 2019
Tooltip is a part of JavaFx package. Tooltip is used to show additional information to the user when the mouse is hovered over the component. All the components can be associated with a tooltip and it can be also associated with a part of screen.
Constructors of the Tooltip class:
Tooltip(): Creates a tool... | [
{
"code": null,
"e": 23948,
"s": 23920,
"text": "\n24 Oct, 2019"
},
{
"code": null,
"e": 24195,
"s": 23948,
"text": "Tooltip is a part of JavaFx package. Tooltip is used to show additional information to the user when the mouse is hovered over the component. All the components ca... |
Pascal - Arrays | Pascal programming language provides a data structure called the array, which can store a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.
Instead of declaring in... | [
{
"code": null,
"e": 2380,
"s": 2083,
"text": "Pascal programming language provides a data structure called the array, which can store a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as ... |
Physical Computing using Jupyter Notebook | by Marcelo Rovai | Towards Data Science | Learn how to install Jupyter Notebook on a Raspberry Pi, and directly on it, read sensors and act on actuators.
We all know that Jupyter Notebook is a fantastic tool, or better, an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative t... | [
{
"code": null,
"e": 283,
"s": 171,
"text": "Learn how to install Jupyter Notebook on a Raspberry Pi, and directly on it, read sensors and act on actuators."
},
{
"code": null,
"e": 496,
"s": 283,
"text": "We all know that Jupyter Notebook is a fantastic tool, or better, an open-... |
Send keys without specifying element in Python Selenium webdriver | We can send keys without specifying elements in Python with Selenium webdriver. The tagname input is used for all the edit boxes. We shall use the find_element_by_tag_name method and pass input as a parameter to that method.
Thus we need not mention element attributes explicitly. Let us investigate the html code of an ... | [
{
"code": null,
"e": 1287,
"s": 1062,
"text": "We can send keys without specifying elements in Python with Selenium webdriver. The tagname input is used for all the edit boxes. We shall use the find_element_by_tag_name method and pass input as a parameter to that method."
},
{
"code": null,
... |
Program to loop on every character in string in C++ | Here in this program we will see how to iterate through each characters of a string in C++. To loop on each character, we can use loops starting from 0 to (string length – 1). For accessing the character we can either use subscript operator "[ ]" or at() function of string object.
Input: A string “Hello World”
Output: ... | [
{
"code": null,
"e": 1344,
"s": 1062,
"text": "Here in this program we will see how to iterate through each characters of a string in C++. To loop on each character, we can use loops starting from 0 to (string length – 1). For accessing the character we can either use subscript operator \"[ ]\" or a... |
jQuery - serialize( ) Method | The serialize( ) method serializes a set of input elements into a string of data.
Here is the simple syntax to use this method −
$.serialize( )
Here is the description of all the parameters used by this method −
NA
NA
Assuming we have following PHP content in serialize.php file −
<?php
if( $_REQUEST["name"] ) {
$n... | [
{
"code": null,
"e": 2404,
"s": 2322,
"text": "The serialize( ) method serializes a set of input elements into a string of data."
},
{
"code": null,
"e": 2451,
"s": 2404,
"text": "Here is the simple syntax to use this method −"
},
{
"code": null,
"e": 2467,
"s": 2... |
3D Line Plots using Plotly in Python - GeeksforGeeks | 10 Jul, 2020
Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, spreadplot and many more. It is mainly used in data analysis as well as financial analysis. plotly is an interactive visualization library
Line pl... | [
{
"code": null,
"e": 23723,
"s": 23695,
"text": "\n10 Jul, 2020"
},
{
"code": null,
"e": 24023,
"s": 23723,
"text": "Plotly is a Python library that is used to design graphs, especially interactive graphs. It can plot various graphs and charts like histogram, barplot, boxplot, sp... |
StringBuffer replace() Method in Java with Examples | 13 Dec, 2021
The StringBuffer.replace() is the inbuilt method which is used to replace the characters in a substring of this sequence with the characters in the specified String. Here simply the characters in the substring are removed and other char is inserted at the start.Syntax :
public StringBuffer replace(int fir... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n13 Dec, 2021"
},
{
"code": null,
"e": 325,
"s": 53,
"text": "The StringBuffer.replace() is the inbuilt method which is used to replace the characters in a substring of this sequence with the characters in the specified String. Here sim... |
Python Pillow – Creating a Watermark | 05 Apr, 2021
In this article, we will see how the creation of a watermark is done using the Pillow library in Python. Pillow is a Python Image Library(PIL) that is used for manipulating images and working on the different formats of images like (‘jpeg’, ‘png’, ‘gif’, ‘tiff’ etc.). There are various image processing you... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n05 Apr, 2021"
},
{
"code": null,
"e": 539,
"s": 53,
"text": "In this article, we will see how the creation of a watermark is done using the Pillow library in Python. Pillow is a Python Image Library(PIL) that is used for manipulating i... |
Find maximum difference between nearest left and right smaller elements | 06 Jul, 2022
Given an array of integers, the task is to find the maximum absolute difference between the nearest left and the right smaller element of every element in the array.
Note: If there is no smaller element on right side or left side of any element then we take zero as the smaller element. For example for the... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jul, 2022"
},
{
"code": null,
"e": 221,
"s": 54,
"text": "Given an array of integers, the task is to find the maximum absolute difference between the nearest left and the right smaller element of every element in the array. "
},
... |
ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'localhost'? | In the system, the root is defined by another name as well as password. Then the user is
created as a root with the help of the create command. This will result in the ERROR 1396.
The query for this is given as follows −
mysql> create user 'root'@'localhost' identified by 'root123';
After executing the above query, th... | [
{
"code": null,
"e": 1242,
"s": 1062,
"text": "In the system, the root is defined by another name as well as password. Then the user is\ncreated as a root with the help of the create command. This will result in the ERROR 1396."
},
{
"code": null,
"e": 1283,
"s": 1242,
"text": "T... |
Mirror Reflection in C++ | Suppose there is a special square room with mirrors on each of the four walls. In each corner except the southwest corner, there are receptors. These are numbered as 0, 1, and 2. Now the square room has walls of length p, and a laser ray from the southwest corner first meets the east wall at a distance q from the 0th r... | [
{
"code": null,
"e": 1460,
"s": 1062,
"text": "Suppose there is a special square room with mirrors on each of the four walls. In each corner except the southwest corner, there are receptors. These are numbered as 0, 1, and 2. Now the square room has walls of length p, and a laser ray from the southw... |
Pandas Groupby: Summarising, Aggregating, and Grouping data in Python | 03 Mar, 2021
GroupBy is a pretty simple concept. We can create a grouping of categories and apply a function to the categories. It’s a simple concept, but it’s an extremely valuable technique that’s widely used in data science. In real data science projects, you’ll be dealing with large amounts of data and trying thing... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n03 Mar, 2021"
},
{
"code": null,
"e": 507,
"s": 28,
"text": "GroupBy is a pretty simple concept. We can create a grouping of categories and apply a function to the categories. It’s a simple concept, but it’s an extremely valuable techni... |
SVG Element.innerHTML Property | 30 Mar, 2022
The SVG Element.innerHTML property returns innerHTML of the given element.
Syntax:
const content = element.innerHTML
Return value: This property returns innerHTML of the element.
Example 1:
<!DOCTYPE html><html> <body> <svg width="350" height="100" xmlns="http://www.w3.org/2000/svg"> ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Mar, 2022"
},
{
"code": null,
"e": 103,
"s": 28,
"text": "The SVG Element.innerHTML property returns innerHTML of the given element."
},
{
"code": null,
"e": 111,
"s": 103,
"text": "Syntax:"
},
{
"code": n... |
YAML - Syntax Characters | Various types of characters are used for various functionalities. This chapter talks in detail about syntax used in YAML and focuses on character manipulation.
Indicator characters include a special semantics used to describe the content of YAML document. The following table shows this in detail.
_
It denotes a block s... | [
{
"code": null,
"e": 2342,
"s": 2182,
"text": "Various types of characters are used for various functionalities. This chapter talks in detail about syntax used in YAML and focuses on character manipulation."
},
{
"code": null,
"e": 2480,
"s": 2342,
"text": "Indicator characters i... |
What are Python dictionary view objects? | Dictionary methods items(), keys() and values() return view objects. The items() method returns a dict_items object containing list of key-value pairs in the dictionary
>>> D1={"pen":25, "pencil":10, "book":100, "sharpner":5, "eraser":5}
>>> i=D1.items()
>>> i
dict_items([('pen', 25), ('pencil', 10), ('book', 100), ('s... | [
{
"code": null,
"e": 1356,
"s": 1187,
"text": "Dictionary methods items(), keys() and values() return view objects. The items() method returns a dict_items object containing list of key-value pairs in the dictionary"
},
{
"code": null,
"e": 1537,
"s": 1356,
"text": ">>> D1={\"pen... |
Create a real time voice translator using Python | 05 Nov, 2021
In this article, we are going to create a real-time voice translator in Python.
playsound: This module is used to play sound in Python
pip install playsound
Speech Recognition Module: It is a library with the help of which Python can recognize the command given. We have to use pip for Speech Recognition.
p... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n05 Nov, 2021"
},
{
"code": null,
"e": 134,
"s": 54,
"text": "In this article, we are going to create a real-time voice translator in Python."
},
{
"code": null,
"e": 189,
"s": 134,
"text": "playsound: This module is... |
numpy.empty() in Python | 29 Nov, 2018
numpy.empty(shape, dtype = float, order = ‘C’) : Return a new array of given shape and type, with random values.Parameters :
-> shape : Number of rows
-> order : C_contiguous or F_contiguous
-> dtype : [optional, float(by Default)] Data type of returned array.
# Python Programming illustrating# numpy.em... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n29 Nov, 2018"
},
{
"code": null,
"e": 153,
"s": 28,
"text": "numpy.empty(shape, dtype = float, order = ‘C’) : Return a new array of given shape and type, with random values.Parameters :"
},
{
"code": null,
"e": 292,
"s":... |
Python PIL | ImageOps.grayscale() method | 27 Oct, 2021
PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageOps module contains a number of ‘ready-made’ image processing operations. This module is somewhat experimental, and most operators only work on L and RGB images.ImageOps.grayscale() Convert the... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n27 Oct, 2021"
},
{
"code": null,
"e": 420,
"s": 28,
"text": "PIL is the Python Imaging Library which provides the python interpreter with image editing capabilities. The ImageOps module contains a number of ‘ready-made’ image processing... |
Composite Number | 08 Mar, 2021
A composite number is a positive integer that is not prime. In other words, it has a positive divisor other than one or itself. First few composite numbers are 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, .........
Every integer greater than one is either a prime number or a composite number.
The number one i... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Mar, 2021"
},
{
"code": null,
"e": 264,
"s": 52,
"text": "A composite number is a positive integer that is not prime. In other words, it has a positive divisor other than one or itself. First few composite numbers are 4, 6, 8, 9, 10... |
Java.lang.Enum Class in Java | 24 Nov, 2021
Enum class is present in java.lang package. It is the common base class of all Java language enumeration types. For information about enums, refer enum in java
Class Declaration
public abstract class Enum<E extends Enum>
extends Object
implements Comparable, Serializable
As we can see, that Enum is an abs... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n24 Nov, 2021"
},
{
"code": null,
"e": 213,
"s": 53,
"text": "Enum class is present in java.lang package. It is the common base class of all Java language enumeration types. For information about enums, refer enum in java"
},
{
... |
std::allocator() in C++ with Examples | 04 Jun, 2022
Allocators are objects responsible for encapsulating memory management. std::allocator is used when you want to separate allocation and do construction in two steps. It is also used when separate destruction and deallocation is done in two steps. All the STL containers in C++ have a type parameter Allocato... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n04 Jun, 2022"
},
{
"code": null,
"e": 505,
"s": 54,
"text": "Allocators are objects responsible for encapsulating memory management. std::allocator is used when you want to separate allocation and do construction in two steps. It is al... |
Python | Extract words from given string | 28 Jul, 2021
We sometimes come through situations where we require to get all the words present in the string, this can be a tedious task done using the native method. Hence having shorthands to perform this task is always useful. Additionally, this article also includes the cases in which punctuation marks have to be ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n28 Jul, 2021"
},
{
"code": null,
"e": 625,
"s": 28,
"text": "We sometimes come through situations where we require to get all the words present in the string, this can be a tedious task done using the native method. Hence having shortha... |
How to Load SVG from URL in Android ImageView? | 08 Jun, 2022
It is seen that many Android apps require to use of high-quality images that will not get blur while zooming. So we have to use high-quality images. But if we are using PNG images then they will get blur after zooming because PNG images are made up of pixels and they will reduce their quality after zooming... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n08 Jun, 2022"
},
{
"code": null,
"e": 568,
"s": 52,
"text": "It is seen that many Android apps require to use of high-quality images that will not get blur while zooming. So we have to use high-quality images. But if we are using PNG i... |
Strace command in Linux with Examples | 10 May, 2020
Strace is one of the most powerful process monitoring, diagnostic, instructional tool of Linux. It also acts as a debugging tool that helps in troubleshooting issues. It is majorly used for the following purposes:
Debugging Programs
Troubleshooting Programs
Intercept System calls by a process
Record system... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n10 May, 2020"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Strace is one of the most powerful process monitoring, diagnostic, instructional tool of Linux. It also acts as a debugging tool that helps in troubleshooting issues. It is ma... |
BabelJS - Quick Guide | BabelJS is a JavaScript transpiler which transpiles new features into old standard. With this, the features can be run on both old and new browsers, hassle-free. An Australian developer, Sebastian McKenzie started BabelJS.
JavaScript is the language that the browser understands. We use different browsers to run our app... | [
{
"code": null,
"e": 2452,
"s": 2229,
"text": "BabelJS is a JavaScript transpiler which transpiles new features into old standard. With this, the features can be run on both old and new browsers, hassle-free. An Australian developer, Sebastian McKenzie started BabelJS."
},
{
"code": null,
... |
Copy Elements of One ArrayList to Another ArrayList in Java | 10 Jun, 2022
It is the implementation class of List Interface. It allows duplicated objects/elements and as well as maintains the insertion order. You can get the element present inside the ArrayList by the index of it now you need to pass it into the getting (index) method. You can add the elements into ArrayList usin... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n10 Jun, 2022"
},
{
"code": null,
"e": 380,
"s": 53,
"text": "It is the implementation class of List Interface. It allows duplicated objects/elements and as well as maintains the insertion order. You can get the element present inside t... |
SQL | Checking Existing Constraints on a Table using Data Dictionaries | 05 Sep, 2018
Prerequisite: SQL-Constraints
In SQL Server the data dictionary is a set of database tables used to store information about a database’s definition. One can use these data dictionaries to check the constraints on an already existing table and to change them(if possible).
USER_CONSTRAINTS Data Dictionary: T... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Sep, 2018"
},
{
"code": null,
"e": 58,
"s": 28,
"text": "Prerequisite: SQL-Constraints"
},
{
"code": null,
"e": 300,
"s": 58,
"text": "In SQL Server the data dictionary is a set of database tables used to store in... |
How are Java objects stored in memory? | 24 May, 2022
In Java, all objects are dynamically allocated on Heap. This is different from C++ where objects can be allocated memory either on Stack or on Heap. In C++, when we allocate the object using new(), the object is allocated on Heap, otherwise on Stack if not global or static.In Java, when we only declare a v... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n24 May, 2022"
},
{
"code": null,
"e": 589,
"s": 53,
"text": "In Java, all objects are dynamically allocated on Heap. This is different from C++ where objects can be allocated memory either on Stack or on Heap. In C++, when we allocate ... |
Set of Tuples in C++ with Examples | 15 Dec, 2021
What is a tuple?A tuple is an object that can hold a number of elements. The elements can be of different data types. The elements of tuples are initialized as arguments in the order in which they will be accessed.
Operations on tuple:1. get(): get() is used to access the tuple values and modify them, it a... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n15 Dec, 2021"
},
{
"code": null,
"e": 267,
"s": 52,
"text": "What is a tuple?A tuple is an object that can hold a number of elements. The elements can be of different data types. The elements of tuples are initialized as arguments in t... |
How to Calculate Rolling Correlation in R? | 20 Jun, 2022
In this article, we will discuss Rolling Correlation in R Programming Language.
Correlation is used to get the relationship between two variables.
It will result in 1 if the correlation is positive.
It will result in -1 if the correlation is negative.
it will result in 0 if there is no correlation.
Rolling... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 Jun, 2022"
},
{
"code": null,
"e": 108,
"s": 28,
"text": "In this article, we will discuss Rolling Correlation in R Programming Language."
},
{
"code": null,
"e": 175,
"s": 108,
"text": "Correlation is used to get... |
Student’s t-distribution in Statistics | 19 Jan, 2022
Student’s t-distribution or t-distribution is a probability distribution that is used to calculate population parameters when the sample size is small and when the population variance is unknown. Theoretical work on t-distribution was done by W.S. Gosset; he has published his findings under the pen name “S... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 Jan, 2022"
},
{
"code": null,
"e": 416,
"s": 54,
"text": "Student’s t-distribution or t-distribution is a probability distribution that is used to calculate population parameters when the sample size is small and when the population... |
Tensorflow.js tf.sum() Function | 12 May, 2021
Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment.
The tf.sum() function is used to calculate sum of the elements of a specified Tensor across its dimension. It reduces the given input element... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 May, 2021"
},
{
"code": null,
"e": 194,
"s": 28,
"text": "Tensorflow.js is an open-source library developed by Google for running machine learning models and deep learning neural networks in the browser or node environment."
},
{... |
Mongoose | findByIdAndRemove() Function | 20 May, 2020
The findByIdAndRemove() function is used to find a matching document, remove it, passing the found document (if any) to the callback.
Installation of mongoose module:
You can visit the link to Install mongoose module. You can install this package by using this command.npm install mongooseAfter installing m... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n20 May, 2020"
},
{
"code": null,
"e": 162,
"s": 28,
"text": "The findByIdAndRemove() function is used to find a matching document, remove it, passing the found document (if any) to the callback."
},
{
"code": null,
"e": 195,... |
Depth wise Separable Convolutional Neural Networks | 28 Aug, 2019
Convolution is a very important mathematical operation in artificial neural networks(ANN’s). Convolutional neural networks (CNN’s) can be used to learn features as well as classify data with the help of image frames. There are many types of CNN’s. One class of CNN’s are depth wise separable convolutional n... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Aug, 2019"
},
{
"code": null,
"e": 377,
"s": 54,
"text": "Convolution is a very important mathematical operation in artificial neural networks(ANN’s). Convolutional neural networks (CNN’s) can be used to learn features as well as cl... |
How to trigger click on select box on hover using jQuery ? | 01 Dec, 2021
In this article, we are going to learn, how we can trigger a click event on the select box or drop-down menu while hovering the mouse using jQuery.
For creating such behavior for a select box, we will use the jQuery attr() method. This method is used to set or return the attributes and values of the select... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Dec, 2021"
},
{
"code": null,
"e": 176,
"s": 28,
"text": "In this article, we are going to learn, how we can trigger a click event on the select box or drop-down menu while hovering the mouse using jQuery."
},
{
"code": null,... |
Modulo 10^9+7 (1000000007) | 23 Jun, 2022
In most programming competitions, we are required to answer the result in 10^9+7 modulo. The reason behind this is, if problem constraints are large integers, only efficient algorithms can solve them in an allowed limited time.What is modulo operation: The remainder obtained after the division operation on... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n23 Jun, 2022"
},
{
"code": null,
"e": 577,
"s": 54,
"text": "In most programming competitions, we are required to answer the result in 10^9+7 modulo. The reason behind this is, if problem constraints are large integers, only efficient ... |
Length of longest subarray with positive product | 16 Nov, 2021
Given an array arr[] consisting of N integers, the task is to print the length of the longest subarray with a positive product.
Examples:
Input: arr[] ={0, 1, -2, -3, -4}Output: 3Explanation:The longest subarray with positive products is: {1, -2, -3}. Therefore, the required length is 3.
Input: arr[]={-1, ... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n16 Nov, 2021"
},
{
"code": null,
"e": 180,
"s": 52,
"text": "Given an array arr[] consisting of N integers, the task is to print the length of the longest subarray with a positive product."
},
{
"code": null,
"e": 190,
... |
Reverse array elements in Julia – reverse(), reverse!() and reverseind() Methods | 01 Apr, 2020
The reverse() is an inbuilt function in julia which is used to reverse the specified vector v from start to stop.
Syntax:reverse(v, start, stop)orreverse(A; dims::Integer)
Parameters:
v: Specified vector.
start: Specified starting value.
stop: Specified stopping value.
A: Specified array.
dims::Integer: Sp... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Apr, 2020"
},
{
"code": null,
"e": 142,
"s": 28,
"text": "The reverse() is an inbuilt function in julia which is used to reverse the specified vector v from start to stop."
},
{
"code": null,
"e": 200,
"s": 142,
"... |
Implementation of ls | wc command | 30 Apr, 2018
ls | wc command : Using ls|wc, we can count new lines, words and letters of all files of current directory. We can see from the following after execution of the code we get same results.
Prerequisites :ls command | wc command | piping in linux
Approach : First, we have to use pipe for inter process communi... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n30 Apr, 2018"
},
{
"code": null,
"e": 241,
"s": 54,
"text": "ls | wc command : Using ls|wc, we can count new lines, words and letters of all files of current directory. We can see from the following after execution of the code we get s... |
Reverse words in a given string | 29 Jun, 2022
Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”
Examples:
Input: s = “geeks quiz practice code” Output: s = “code practice quiz geeks”
Input: s = “getting good at coding needs a lot of practice” Output: s = “practice of lot ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n29 Jun, 2022"
},
{
"code": null,
"e": 184,
"s": 54,
"text": "Let the input string be “i like this program very much”. The function should change the string to “much very program this like i”"
},
{
"code": null,
"e": 195,
... |
Python | Select random value from a list | 05 Jul, 2022
In this article, we will cover how to Randomly Select Elements From a List in Python.
Generating random numbers has always been a useful utility in day-day programming for games or various types of gambling etc. Hence knowledge and shorthands of it in any programming language is always a plus to have. Let... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n05 Jul, 2022"
},
{
"code": null,
"e": 139,
"s": 52,
"text": "In this article, we will cover how to Randomly Select Elements From a List in Python. "
},
{
"code": null,
"e": 431,
"s": 139,
"text": "Generating random ... |
Job Sequencing Problem | Practice | GeeksforGeeks | Given a set of N jobs where each jobi has a deadline and profit associated with it.
Each job takes 1 unit of time to complete and only one job can be scheduled at a time. We earn the profit associated with job if and only if the job is completed by its deadline.
Find the number of jobs done and the maximum profit.
No... | [
{
"code": null,
"e": 323,
"s": 238,
"text": "Given a set of N jobs where each jobi has a deadline and profit associated with it. "
},
{
"code": null,
"e": 503,
"s": 323,
"text": "Each job takes 1 unit of time to complete and only one job can be scheduled at a time. We earn the pr... |
SQL | Constraints | 09 Jun, 2021
Constraints are the rules that we can apply on the type of data in a table. That is, we can specify the limit on the type of data that can be stored in a particular column in a table using constraints.
The available constraints in SQL are:
NOT NULL: This constraint tells that we cannot store a null valu... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 255,
"s": 52,
"text": "Constraints are the rules that we can apply on the type of data in a table. That is, we can specify the limit on the type of data that can be stored in a particular column in... |
Given a linked list of line segments, remove middle points | 24 Jun, 2022
Given a linked list of coordinates where adjacent points either form a vertical line or a horizontal line. Delete points from the linked list which are in the middle of a horizontal or vertical line.
Examples:
Input: (0,10)->(1,10)->(5,10)->(7,10)
|
... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n24 Jun, 2022"
},
{
"code": null,
"e": 254,
"s": 54,
"text": "Given a linked list of coordinates where adjacent points either form a vertical line or a horizontal line. Delete points from the linked list which are in the middle of a hor... |
React native SectionList Component | 01 Aug, 2021
The SectionList Component is an inbuilt React Native list view component that renders sectioned lists. As the name suggests, it is used to display lists of data in different sections. It is a Pure Component supporting most of the features like pull-to-refresh, scroll loading, separators, headers, and foote... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n01 Aug, 2021"
},
{
"code": null,
"e": 511,
"s": 28,
"text": "The SectionList Component is an inbuilt React Native list view component that renders sectioned lists. As the name suggests, it is used to display lists of data in different s... |
Draw Colorful Spiral Web Using Turtle Graphics in Python - GeeksforGeeks | 20 Oct, 2020
Prerequisite: Turtle Basics
“Turtle” is a Python feature like a drawing board, which lets us command a turtle to draw all over it. This comes packed with the standard Python package and need not be installed externally.
Methods used:
forward(value): moves the turtle in the forward direction.
turtle.Pen(): ... | [
{
"code": null,
"e": 24292,
"s": 24264,
"text": "\n20 Oct, 2020"
},
{
"code": null,
"e": 24320,
"s": 24292,
"text": "Prerequisite: Turtle Basics"
},
{
"code": null,
"e": 24512,
"s": 24320,
"text": "“Turtle” is a Python feature like a drawing board, which lets ... |
Angle Between Hands of a Clock in C++ | Suppose we have two numbers, hour and minutes. We have to find a smaller angle (in sexagesimal units) formed between the hour and the minute hand. So if the input is like hour = 12 and min := 30, then the result will be 165°.
To solve this, we will follow these steps −
if h = 12, then set h := 0
if h = 12, then set h :... | [
{
"code": null,
"e": 1288,
"s": 1062,
"text": "Suppose we have two numbers, hour and minutes. We have to find a smaller angle (in sexagesimal units) formed between the hour and the minute hand. So if the input is like hour = 12 and min := 30, then the result will be 165°."
},
{
"code": null,... |
SQL Overview | SQL is a programming language for Relational Databases. It is designed over relational algebra and tuple relational calculus. SQL comes as a package with all major distributions of RDBMS.
SQL comprises both data definition and data manipulation languages. Using the data definition properties of SQL, one can design and ... | [
{
"code": null,
"e": 2470,
"s": 2282,
"text": "SQL is a programming language for Relational Databases. It is designed over relational algebra and tuple relational calculus. SQL comes as a package with all major distributions of RDBMS."
},
{
"code": null,
"e": 2716,
"s": 2470,
"te... |
Run Linux Natively on Windows 10 | Microsoft has introduced the WSL Subsystem for Linux, which lets users run their favorite Linux distributions directly from Windows 10 without dual-booting or using a virtual machine.
While this is a step in the right direction for Microsoft, it's not quite there yet in terms of full functionality. Specifically, WSL do... | [
{
"code": null,
"e": 1246,
"s": 1062,
"text": "Microsoft has introduced the WSL Subsystem for Linux, which lets users run their favorite Linux distributions directly from Windows 10 without dual-booting or using a virtual machine."
},
{
"code": null,
"e": 1612,
"s": 1246,
"text":... |
Count number of binary strings of length N having only 0's and 1's - GeeksforGeeks | 22 Apr, 2021
Given an integer N, the task is to count the number of binary strings of length N having only 0’s and 1’s. Note: Since the count can be very large, return the answer modulo 10^9+7.
Examples:
Input: 2 Output: 4 Explanation: The numbers are 00, 01, 11, 10. Hence the count is 4.
Input: 3 Output: 8 Explanati... | [
{
"code": null,
"e": 25476,
"s": 25448,
"text": "\n22 Apr, 2021"
},
{
"code": null,
"e": 25657,
"s": 25476,
"text": "Given an integer N, the task is to count the number of binary strings of length N having only 0’s and 1’s. Note: Since the count can be very large, return the answ... |
WebRTC - MediaStream APIs | The MediaStream API was designed to easy access the media streams from local cameras and microphones. The getUserMedia() method is the primary way to access local input devices.
The API has a few key points −
A real-time media stream is represented by a stream object in the form of video or audio
A real-time media stre... | [
{
"code": null,
"e": 2199,
"s": 2021,
"text": "The MediaStream API was designed to easy access the media streams from local cameras and microphones. The getUserMedia() method is the primary way to access local input devices."
},
{
"code": null,
"e": 2230,
"s": 2199,
"text": "The ... |
Ruby | Module | 10 Oct, 2018
A Module is a collection of methods, constants, and class variables. Modules are defined as a class, but with the module keyword not with class keyword.
Important Points about Modules:
You cannot inherit modules or you can’t create a subclass of a module.
Objects cannot be created from a module.
Modules ar... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n10 Oct, 2018"
},
{
"code": null,
"e": 205,
"s": 52,
"text": "A Module is a collection of methods, constants, and class variables. Modules are defined as a class, but with the module keyword not with class keyword."
},
{
"code":... |
Python – API.get_status() in Tweepy | 05 Jun, 2020
Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data will be tweets extracted from the user. The first thing to do is get the consumer key, consumer secret, access key and access secret from twitte... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n05 Jun, 2020"
},
{
"code": null,
"e": 428,
"s": 28,
"text": "Twitter is a popular social network where users share messages called tweets. Twitter allows us to mine the data of any user using Twitter API or Tweepy. The data will be twee... |
Find the farthest smaller number in the right side | 13 Jun, 2022
Given an array arr[] of size N. For every element in the array, the task is to find the index of the farthest element in the array to the right which is smaller than the current element. If no such number exists then print -1.
Examples:
Input: arr[] = {3, 1, 5, 2, 4} Output: 3 -1 4 -1 -1 arr[3] is the fa... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n13 Jun, 2022"
},
{
"code": null,
"e": 282,
"s": 54,
"text": "Given an array arr[] of size N. For every element in the array, the task is to find the index of the farthest element in the array to the right which is smaller than the curr... |
Using Single-Row Functions | Oracle SQL supplies a rich library of in-built functions which can be employed for various tasks. The essential capabilities of a functions can be the case conversion of strings, in-string or substring operations, mathematical computations on numeric data, and date operations on date type values. SQL Functions optional... | [
{
"code": null,
"e": 2981,
"s": 2597,
"text": "Oracle SQL supplies a rich library of in-built functions which can be employed for various tasks. The essential capabilities of a functions can be the case conversion of strings, in-string or substring operations, mathematical computations on numeric da... |
How to Upload File using formidable module in Node.js ? | 27 Apr, 2020
Formidable module is used for parsing form data, especially file uploads. It is easy to use and integrate into your project for handling incoming form data and file uploads.
Installation of formidable module:
You can visit the link Install formidable module. You can install this package by using this comma... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n27 Apr, 2020"
},
{
"code": null,
"e": 228,
"s": 54,
"text": "Formidable module is used for parsing form data, especially file uploads. It is easy to use and integrate into your project for handling incoming form data and file uploads."... |
How to Sum Diagonal Cells in a range in Excel? | 06 Sep, 2021
The calculation of matrices is one of the most difficult numerical computation tasks. You may need to add values diagonally in a table when performing mathematical computations. Excel allows you to sum diagonal numbers without having to add the values one by one. We’ll go through how to sum cells diagonal... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n06 Sep, 2021"
},
{
"code": null,
"e": 385,
"s": 52,
"text": "The calculation of matrices is one of the most difficult numerical computation tasks. You may need to add values diagonally in a table when performing mathematical computatio... |
How to find the percentage of missing values in a dataframe in R? | 07 Apr, 2021
In this article, let’s discuss how to find the percentage of missing values (NAs) in R Programming Language. Percentage of NAs denote the fraction of data cells that are not defined by a definite cell value. The percentage of NA values can be calculated using the following formula :
Percentage of NAs = (Nu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Apr, 2021"
},
{
"code": null,
"e": 312,
"s": 28,
"text": "In this article, let’s discuss how to find the percentage of missing values (NAs) in R Programming Language. Percentage of NAs denote the fraction of data cells that are not d... |
PHP | mysqli_connect() Function | 06 Jul, 2021
The mysqli_connect() function in PHP is used to connect you to the database. In the previous version of the connection mysql_connect() was used for connection and then there comes mysqli_connect() where i means improved version of connection and is more secure than mysql_connect().Syntax:
mysqli_connect ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n06 Jul, 2021"
},
{
"code": null,
"e": 346,
"s": 54,
"text": "The mysqli_connect() function in PHP is used to connect you to the database. In the previous version of the connection mysql_connect() was used for connection and then there ... |
while loop in Perl | 21 Nov, 2019
A while loop in Perl generally takes an expression in parenthesis. If the expression is True then the code within the body of while loop is executed. A while loop is used when we don’t know the number of times we want the loop to be executed however we know the termination condition of the loop. It is also... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n21 Nov, 2019"
},
{
"code": null,
"e": 487,
"s": 28,
"text": "A while loop in Perl generally takes an expression in parenthesis. If the expression is True then the code within the body of while loop is executed. A while loop is used when... |
Print Patterns in PL/SQL | 26 Feb, 2021
You have given a number n then you have to print number a right-angled pyramid of * Examples:
Input : 3
Output :
*
**
***
Input : 7
Output :
*
**
***
****
*****
******
*******
C
DECLARE -- declare variable n, --I AND J of datatype number N NUMBER := 7; I NUMBER; J NUMBER;BEGIN -- loop from 1 to ... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n26 Feb, 2021"
},
{
"code": null,
"e": 149,
"s": 53,
"text": "You have given a number n then you have to print number a right-angled pyramid of * Examples: "
},
{
"code": null,
"e": 232,
"s": 149,
"text": "Input : 3... |
Python – distort() method in Wand | 23 Dec, 2021
ImageMagick provides several ways to distort an image by applying various transformations against user-supplied arguments. In Wand, the method distort() is used, and follows a basic function.
Syntax :
wand.image.distort(method, arguments, best_fit)
Parameters :
Following are the Distortion Methods : ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n23 Dec, 2021"
},
{
"code": null,
"e": 221,
"s": 28,
"text": "ImageMagick provides several ways to distort an image by applying various transformations against user-supplied arguments. In Wand, the method distort() is used, and follows a... |
Java sqrt() method with Examples | 09 Apr, 2018
The java.lang.Math.sqrt() returns the square root of a value of type double passed to it as argument. If the argument is NaN or negative, then the result is NaN. If the argument is positive infinity, then the result is positive infinity. If the argument passed is positive zero or negative zero then the res... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n09 Apr, 2018"
},
{
"code": null,
"e": 402,
"s": 53,
"text": "The java.lang.Math.sqrt() returns the square root of a value of type double passed to it as argument. If the argument is NaN or negative, then the result is NaN. If the argum... |
Warning control in Python Programs | Warning is different from error in a program. If error is encountered, Python program terminates instantly. Warning on the other hand is not fatal. It displays certain message but program continues. Warnings are issued to alert the user of certain conditions which aren't exactly exceptions. Typically warning appears if... | [
{
"code": null,
"e": 1604,
"s": 1187,
"text": "Warning is different from error in a program. If error is encountered, Python program terminates instantly. Warning on the other hand is not fatal. It displays certain message but program continues. Warnings are issued to alert the user of certain condi... |
How to enable webview java script in android? | This example demonstrate about How to enable webview java script 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"?>
<Linea... | [
{
"code": null,
"e": 1264,
"s": 1187,
"text": "This example demonstrate about How to enable webview java script in android."
},
{
"code": null,
"e": 1393,
"s": 1264,
"text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details t... |
Python def Keyword | 29 Sep, 2021
Python def keyword is used to define a function, it is placed before a function name that is provided by the user to create a user-defined function. In python, a function is a logical unit of code containing a sequence of statements indented under a name given using the “def” keyword. In python def keyword... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n29 Sep, 2021"
},
{
"code": null,
"e": 387,
"s": 53,
"text": "Python def keyword is used to define a function, it is placed before a function name that is provided by the user to create a user-defined function. In python, a function is ... |
Smallest string which not a subsequence of the given string | 09 Jun, 2021
Given a string str, consisting of lowercase alphabets, the task is to find the shortest string which is not a subsequence of the given string. If multiple strings exist, then print any one of them.
Examples:
Input: str = “abaabcc” Output: d Explanation: One of the possible shortest string which is not a su... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n09 Jun, 2021"
},
{
"code": null,
"e": 252,
"s": 54,
"text": "Given a string str, consisting of lowercase alphabets, the task is to find the shortest string which is not a subsequence of the given string. If multiple strings exist, then... |
Python – Convert Tuple String to Integer Tuple | 01 Mar, 2020
Interconversion of data is a popular problem developers generally deal with. One can face a problem to convert tuple string to integer tuple. Let’s discuss certain ways in which this task can be performed.
Method #1 : Using tuple() + int() + replace() + split()The combination of above methods can be used t... | [
{
"code": null,
"e": 53,
"s": 25,
"text": "\n01 Mar, 2020"
},
{
"code": null,
"e": 259,
"s": 53,
"text": "Interconversion of data is a popular problem developers generally deal with. One can face a problem to convert tuple string to integer tuple. Let’s discuss certain ways in wh... |
What is API? How it is useful in Web Development ? | 20 Sep, 2019
API stands for Application Programming Interface (main participant of all the interactivity)It is like a messenger that takes our requests to a system and returns a response back to us via seamless connectivity.We use APIs in many cases like to get data for a web application or to connect to a remote serve... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n20 Sep, 2019"
},
{
"code": null,
"e": 652,
"s": 54,
"text": "API stands for Application Programming Interface (main participant of all the interactivity)It is like a messenger that takes our requests to a system and returns a response ... |
Selecting Multiple Columns Based On Condition in SQL | 30 Nov, 2021
In the real world scenario where we have to select the only columns from a given table, now that columns selected can be single or multiple as per requirement. For Example: Write a query that gave the names of EMPLOYEE in an organization, so here we have to pick out only the name column from that particula... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n30 Nov, 2021"
},
{
"code": null,
"e": 555,
"s": 28,
"text": "In the real world scenario where we have to select the only columns from a given table, now that columns selected can be single or multiple as per requirement. For Example: Wr... |
PHP | Magic Constants | 17 Aug, 2021
Magic constants: Magic constants are the predefined constants in PHP which is used on the basis of their use. These constants are created by various extensions. There are nine magic constant in the PHP and all of the constant resolved at the compile-time, not like the regular constant which is resolved at ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n17 Aug, 2021"
},
{
"code": null,
"e": 485,
"s": 28,
"text": "Magic constants: Magic constants are the predefined constants in PHP which is used on the basis of their use. These constants are created by various extensions. There are nine... |
NPDA for accepting the language L = {aibjckdl | i==k or j==l,i>=1,j>=1} | 28 Aug, 2019
Prerequisite – Pushdown automata, Pushdown automata acceptance by final stateProblem – Design a non deterministic PDA for accepting the language L = { : i==k or j==l, i>=1, j>=1}, i.e.,
L = {abcd, aabccd, aaabcccd, abbcdd, aabbccdd, aabbbccddd, ......}
In each string, the number of a’s are followed by ... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n28 Aug, 2019"
},
{
"code": null,
"e": 243,
"s": 54,
"text": "Prerequisite – Pushdown automata, Pushdown automata acceptance by final stateProblem – Design a non deterministic PDA for accepting the language L = { : i==k or j==l, i>=1... |
Java Program For Inserting A Node In A Linked List | 22 Dec, 2021
We have introduced Linked Lists in the previous post. We also created a simple linked list with 3 nodes and discussed linked list traversal.All programs discussed in this post consider the following representations of the linked list.
Java
// Linked List Classclass LinkedList{ // Head of list Node h... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n22 Dec, 2021"
},
{
"code": null,
"e": 288,
"s": 52,
"text": "We have introduced Linked Lists in the previous post. We also created a simple linked list with 3 nodes and discussed linked list traversal.All programs discussed in this pos... |
What is Memory-Mapped File in Java? | 06 Apr, 2022
Memory-mapped files are casual special files in Java that help to access content directly from memory. Java Programming supports memory-mapped files with java.nio package. Memory-mapped I/O uses the filesystem to establish a virtual memory mapping from the user directly to the filesystem pages. It can be ... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Apr, 2022"
},
{
"code": null,
"e": 439,
"s": 28,
"text": "Memory-mapped files are casual special files in Java that help to access content directly from memory. Java Programming supports memory-mapped files with java.nio package. Me... |
Python | Pandas Period.month | 06 Jan, 2019
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 Period.month attribute return an integer value. The returned value represents the valu... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Jan, 2019"
},
{
"code": null,
"e": 242,
"s": 28,
"text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes imp... |
Output of Java program | Set 16 (Threads) | 19 May, 2017
Prerequisites: multi-threading in java , Life cycle and states of a thread , Joining threads in java , start() method in java1) What could be the output of the following program?
public class Test implements Runnable{ public void run() { System.out.printf("GFG "); System.out.printf("Gee... | [
{
"code": null,
"e": 54,
"s": 26,
"text": "\n19 May, 2017"
},
{
"code": null,
"e": 233,
"s": 54,
"text": "Prerequisites: multi-threading in java , Life cycle and states of a thread , Joining threads in java , start() method in java1) What could be the output of the following prog... |
React Native Top Tab Navigator | 12 Nov, 2021
To create a Top Tab Navigator, we need to use the createMaterialTopTabNavigator function available in the react-navigation library. It is designed with the material theme tab bar on the top of the screen. It allows switching between various tabs by tapping them or swiping horizontally. Default transition a... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n12 Nov, 2021"
},
{
"code": null,
"e": 360,
"s": 28,
"text": "To create a Top Tab Navigator, we need to use the createMaterialTopTabNavigator function available in the react-navigation library. It is designed with the material theme tab ... |
Perl | Writing to a File | 07 Mar, 2019
A filehandle is a variable that is used to read and write to a file. This filehandle gets associated with the file.
In order to write to the file, it is opened in write mode as shown below:
open (FH, ‘>’, “filename.txt”);
If the file is existing then it truncates the old content of file with the new conten... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n07 Mar, 2019"
},
{
"code": null,
"e": 144,
"s": 28,
"text": "A filehandle is a variable that is used to read and write to a file. This filehandle gets associated with the file."
},
{
"code": null,
"e": 218,
"s": 144,
... |
HTML | DOM Anchor Object | 06 Feb, 2019
The Anchor Object in HTML DOM is used to represent the <a> element . The anchor element can be accessed by using getElementById() method.
Syntax:
document.getElementById("ID");
Where ID is assigned to the anchor tag.
Property Values:
charset: It is used to set or return the character-set. It is not suppor... | [
{
"code": null,
"e": 28,
"s": 0,
"text": "\n06 Feb, 2019"
},
{
"code": null,
"e": 166,
"s": 28,
"text": "The Anchor Object in HTML DOM is used to represent the <a> element . The anchor element can be accessed by using getElementById() method."
},
{
"code": null,
"e": ... |
SHA in Python | 14 Feb, 2018
SHA, ( Secure Hash Algorithms ) are set of cryptographic hash functions defined by the language to be used for various applications such as password security etc. Some variants of it are supported by Python in the “hashlib” library. These can be found using “algorithms_guaranteed” function of hashlib.
# Py... | [
{
"code": null,
"e": 52,
"s": 24,
"text": "\n14 Feb, 2018"
},
{
"code": null,
"e": 355,
"s": 52,
"text": "SHA, ( Secure Hash Algorithms ) are set of cryptographic hash functions defined by the language to be used for various applications such as password security etc. Some varian... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.