title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Scala String charAt() method with example
15 Oct, 2019 The charAt() method is utilized to return the character of the index passed in the argument. Method Definition: char charAt(int index)Return Type: It returns char for the index given in the argument. Example #1: // Scala program of charAt()// method // Creating objectobject GfG{ // Main method de...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Oct, 2019" }, { "code": null, "e": 121, "s": 28, "text": "The charAt() method is utilized to return the character of the index passed in the argument." }, { "code": null, "e": 228, "s": 121, "text": "Method Defini...
Mouse Programming in C/C++
19 Jul, 2021 Till now we have seen only static output on the black window in C/C++ without any peripheral device interaction(like mouse). Here static means that interaction with the output screen through the mouse to run a dynamic event or task. The goal will be to make the pointer of the mouse visible on our output sc...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Jul, 2021" }, { "code": null, "e": 459, "s": 54, "text": "Till now we have seen only static output on the black window in C/C++ without any peripheral device interaction(like mouse). Here static means that interaction with the outpu...
Search a node in BST | Practice | GeeksforGeeks
Given a Binary Search Tree and a node value X, find if the node with value X is present in the BST or not. Example 1: Input: 2 \ 81 / \ 42 87 \ \ 66 90 / 45 X = 87 Output...
[ { "code": null, "e": 345, "s": 238, "text": "Given a Binary Search Tree and a node value X, find if the node with value X is present in the BST or not." }, { "code": null, "e": 357, "s": 345, "text": "\nExample 1:" }, { "code": null, "e": 638, "s": 357, "text"...
Logistic regression: the basics. Understanding the foundations of... | by Arthur Mello | Towards Data Science
Logistic regression is a technique for modelling the probability of an event. Just like linear regression, it helps you understand the relationship between one or more variables and a target variable, except that, in this case, our target variable is binary: its value is either 0 or 1. For example, it can allow us to s...
[ { "code": null, "e": 905, "s": 172, "text": "Logistic regression is a technique for modelling the probability of an event. Just like linear regression, it helps you understand the relationship between one or more variables and a target variable, except that, in this case, our target variable is bina...
Java program to find the largest number in an array
To find the largest element of the given array, first of all, sort the array. Compare the first two elements of the array If the first element is greater than the second swap them. Then, compare 2nd and 3rd elements if the second element is greater than the 3rd swap them. Repeat this till the end of the array. After so...
[ { "code": null, "e": 1140, "s": 1062, "text": "To find the largest element of the given array, first of all, sort the array." }, { "code": null, "e": 1184, "s": 1140, "text": "Compare the first two elements of the array" }, { "code": null, "e": 1243, "s": 1184, ...
5 Powerful Scikit-Learn Examples. Herein lies just enough information to... | by Posey | Towards Data Science
Below are 5 models. For each model we observe the model’s prediction that an Iris is/isn’t a Virginica. We then perform classification. It’s fascinating to observe how these models differ. We will not spend much time going into detailed math for each example. Our whole goal is to highlight some useful models you can ad...
[ { "code": null, "e": 648, "s": 172, "text": "Below are 5 models. For each model we observe the model’s prediction that an Iris is/isn’t a Virginica. We then perform classification. It’s fascinating to observe how these models differ. We will not spend much time going into detailed math for each exam...
How to make a Python program wait? - GeeksforGeeks
02 Dec, 2020 Prerequisites: time module keyboard module os module Some requirements require a Python program to wait before it goes on. We might need another function to complete or a file to load to give the user a better experience. Discussed below are some ways by which this can be achieved. 1(A) General sleep fun...
[ { "code": null, "e": 24237, "s": 24209, "text": "\n02 Dec, 2020" }, { "code": null, "e": 24254, "s": 24237, "text": "Prerequisites: " }, { "code": null, "e": 24266, "s": 24254, "text": "time module" }, { "code": null, "e": 24282, "s": 24266, ...
Machine Learning Explainability using Permutation Importance - GeeksforGeeks
18 Jul, 2021 Machine learning models often act as black boxes, meaning that they can make good predictions but it is difficult to fully comprehend the decisions that drive those predictions. Gaining insights from a model is not an easy task, despite the fact that they can help with debugging, feature engineering, direc...
[ { "code": null, "e": 24264, "s": 24236, "text": "\n18 Jul, 2021" }, { "code": null, "e": 24687, "s": 24264, "text": "Machine learning models often act as black boxes, meaning that they can make good predictions but it is difficult to fully comprehend the decisions that drive thos...
Dart Programming - truncate Method
Returns an integer after discarding any fractional digits. Number.truncate() Returns an int without decimal points. void main() { double n1 = 2.123; var value = n1.truncate(); print("The truncated value of 2.123 = ${value}"); } It will produce the following output −. The truncated value of 2.123 = 2 ...
[ { "code": null, "e": 2584, "s": 2525, "text": "Returns an integer after discarding any fractional digits." }, { "code": null, "e": 2603, "s": 2584, "text": "Number.truncate()\n" }, { "code": null, "e": 2642, "s": 2603, "text": "Returns an int without decimal p...
How to append some text to all paragraphs using jQuery ? - GeeksforGeeks
31 Dec, 2020 In this article, we will append some text to all paragraph elements using jQuery. To append some text to all paragraph elements, we use append() and document.createTextNode() methods. jQuery append() method is used to insert some content at the end of the selected elements. Syntax: $(selector).append( cont...
[ { "code": null, "e": 25381, "s": 25353, "text": "\n31 Dec, 2020" }, { "code": null, "e": 25565, "s": 25381, "text": "In this article, we will append some text to all paragraph elements using jQuery. To append some text to all paragraph elements, we use append() and document.creat...
Dictionary Operations in Data Structure
A dictionary is defined as a general-purpose data structure for storing a group of objects. A dictionary is associated with a set of keys and each key has a single associated value. When presented with a key, the dictionary will simply return the associated value. For example, the results of a classroom test could be r...
[ { "code": null, "e": 1327, "s": 1062, "text": "A dictionary is defined as a general-purpose data structure for storing a group of objects. A dictionary is associated with a set of keys and each key has a single associated value. When\npresented with a key, the dictionary will simply return the assoc...
MATLAB - Colon Notation
The colon(:) is one of the most useful operator in MATLAB. It is used to create vectors, subscript arrays, and specify for iterations. If you want to create a row vector, containing integers from 1 to 10, you write − 1:10 MATLAB executes the statement and returns a row vector containing the integers from 1 to 10 − ans ...
[ { "code": null, "e": 2276, "s": 2141, "text": "The colon(:) is one of the most useful operator in MATLAB. It is used to create vectors, subscript arrays, and specify for iterations." }, { "code": null, "e": 2358, "s": 2276, "text": "If you want to create a row vector, containing ...
Julia’s Package Manager Is AWESOME | by Emmett Boudreau | Towards Data Science
In the past, I’ve gone beyond praise for the amazing multi-paradigm statistical language, Julia. This is for good reason because Julia is an incredibly high-level language that stretches the limits of what we thought could come from such high-level syntax. Additionally, in terms of being ideal for machine-learning, fro...
[ { "code": null, "e": 733, "s": 171, "text": "In the past, I’ve gone beyond praise for the amazing multi-paradigm statistical language, Julia. This is for good reason because Julia is an incredibly high-level language that stretches the limits of what we thought could come from such high-level syntax...
Initialization vs Instantiation in C#
When you assign a value to a variable when it is declared, it is called Initialization. Here is an example − int val = 50; For array initialization, you may need a new keyword, whereas to initialize a variable, you do not need it. When you create a new object in C# for a class using the new keyword, then it is called ...
[ { "code": null, "e": 1150, "s": 1062, "text": "When you assign a value to a variable when it is declared, it is called Initialization." }, { "code": null, "e": 1171, "s": 1150, "text": "Here is an example −" }, { "code": null, "e": 1186, "s": 1171, "text": "in...
Check whether the String contains only digit characters in Java
The following is our string. String str = "4434"; To check whether the above string has only digit characters, try the following if condition that uses matches() method and checks for every character. if(str.matches("[0-9]+") && str.length() > 2) { System.out.println("String contains only digits!"); } Live Demo public...
[ { "code": null, "e": 1091, "s": 1062, "text": "The following is our string." }, { "code": null, "e": 1112, "s": 1091, "text": "String str = \"4434\";" }, { "code": null, "e": 1263, "s": 1112, "text": "To check whether the above string has only digit characters...
Formatted string literals (f-strings) in Python?
Python now provides new way to format strings, called f-strings. This features is available from Python 3.6 under PEP-498. They are so called (f-string) because of the letter ‘f’ prefix with a string. The letter ‘f’ also indicates that these f-strings can be used for formatting. Below are some of the examples to demons...
[ { "code": null, "e": 1342, "s": 1062, "text": "Python now provides new way to format strings, called f-strings. This features is available from Python 3.6 under PEP-498. They are so called (f-string) because of the letter ‘f’ prefix with a string. The letter ‘f’ also indicates that these f-strings c...
Print Single and Multiple variables in Java
To print single and multiple variables in Java, the code is as follows − Live Demo public class Demo { public static void main(String args[]){ String name_1 = "Hello"; String name_2 = "World"; System.out.println("Printing single variable"); System.out.printf("%s", name_1); System.out.p...
[ { "code": null, "e": 1135, "s": 1062, "text": "To print single and multiple variables in Java, the code is as follows −" }, { "code": null, "e": 1146, "s": 1135, "text": " Live Demo" }, { "code": null, "e": 1503, "s": 1146, "text": "public class Demo {\n pub...
ArrayList set() method in Java with Examples - GeeksforGeeks
26 Nov, 2018 The set() method of java.util.ArrayList class is used to replace the element at the specified position in this list with the specified element. Syntax: public E set(int index, E element) Parameters: This method takes the following argument as a parameter. index- index of the element to replace element- ele...
[ { "code": null, "e": 24524, "s": 24496, "text": "\n26 Nov, 2018" }, { "code": null, "e": 24668, "s": 24524, "text": "The set() method of java.util.ArrayList class is used to replace the element at the specified position in this list with the specified element." }, { "code...
MySQL - JSON_OBJECTAGG() Function
In general, aggregation is a consideration of a collection of objects that are bound together as a single entity. MySQL provides a set of aggregate functions that perform operations on all the entities of the column of a table considering them as a single unit. The MySQL JSON_OBJECTAGG() function accepts the names of t...
[ { "code": null, "e": 2447, "s": 2333, "text": "In general, aggregation is a consideration of a collection of objects that are bound together as a single entity." }, { "code": null, "e": 2595, "s": 2447, "text": "MySQL provides a set of aggregate functions that perform operations ...
atomic.AddUint32() Function in Golang With Examples - GeeksforGeeks
01 Apr, 2020 In Go language, atomic packages supply lower-level atomic memory that is helpful is implementing synchronization algorithms. The AddUint32() function in Go language is used to automically add delta to the *addr.This function is defined under the atomic package. Here, you need to import “sync/atomic” packag...
[ { "code": null, "e": 24460, "s": 24432, "text": "\n01 Apr, 2020" }, { "code": null, "e": 24801, "s": 24460, "text": "In Go language, atomic packages supply lower-level atomic memory that is helpful is implementing synchronization algorithms. The AddUint32() function in Go languag...
Bound methods python - GeeksforGeeks
11 Dec, 2019 A bound method is the one which is dependent on the instance of the class as the first argument. It passes the instance as the first argument which is used to access the variables and functions. In Python 3 and newer versions of python, all functions in the class are by default bound methods. Let’s underst...
[ { "code": null, "e": 24102, "s": 24074, "text": "\n11 Dec, 2019" }, { "code": null, "e": 24396, "s": 24102, "text": "A bound method is the one which is dependent on the instance of the class as the first argument. It passes the instance as the first argument which is used to acce...
SimpleDateFormat('E, dd MMM yyyy HH:mm:ss Z') in Java
Using the SimpleDateFormat(“E, dd MMM yyyy HH:mm:ss Z”), wherein E is for Day of Week − // displaying current date and time Calendar cal = Calendar.getInstance(); SimpleDateFormat simpleformat = new SimpleDateFormat("E, dd MMM yyyy HH:mm:ss Z"); System.out.println("Today's date and time = "+simpleformat.format(cal.getT...
[ { "code": null, "e": 1150, "s": 1062, "text": "Using the SimpleDateFormat(“E, dd MMM yyyy HH:mm:ss Z”), wherein E is for Day of Week −" }, { "code": null, "e": 1391, "s": 1150, "text": "// displaying current date and time\nCalendar cal = Calendar.getInstance();\nSimpleDateFormat ...
Check if two BSTs contain same set of elements - GeeksforGeeks
01 Jul, 2021 Given two Binary Search Trees consisting of unique positive elements, we have to check whether the two BSTs contains same set or elements or not. Note: The structure of the two given BSTs can be different. For example, The above two BSTs contains same set of elements {5, 10, 12, 15, 20, 25} Method 1: Th...
[ { "code": null, "e": 25092, "s": 25064, "text": "\n01 Jul, 2021" }, { "code": null, "e": 25313, "s": 25092, "text": "Given two Binary Search Trees consisting of unique positive elements, we have to check whether the two BSTs contains same set or elements or not. Note: The structu...
Tough Competitors | Practice | GeeksforGeeks
There are n competitors in an exam. Each competitor has his own skill value which is given by the array arr where arr1 is the skill of the first competitor, arr2 is the skill of second competitor and so on. Two competitors are said to be tough competitors if their skill difference is least i.e. they are very close in t...
[ { "code": null, "e": 715, "s": 226, "text": "There are n competitors in an exam. Each competitor has his own skill value which is given by the array arr where arr1 is the skill of the first competitor, arr2 is the skill of second competitor and so on. Two competitors are said to be tough competitors...
Amazon RDS - MySQL DB Export Import
Amazon RDS MySQL provides easy ways of importing data into the DB and exporting data from the DB. After we are able to successfully connect to the MySQL database we can use CLI tools to run the import and export commands to get the data from other sources in and out of the RDS database. Below are the scenarios to consi...
[ { "code": null, "e": 3000, "s": 2585, "text": "Amazon RDS MySQL provides easy ways of importing data into the DB and exporting data from the DB. After we are able to successfully connect to the MySQL database we can use CLI tools to run the import and export commands to get the data from other sourc...
C++ if statement
An if statement consists of a boolean expression followed by one or more statements. The syntax of an if statement in C++ is − if(boolean_expression) { // statement(s) will execute if the boolean expression is true } If the boolean expression evaluates to true, then the block of code inside the if statement will be...
[ { "code": null, "e": 2403, "s": 2318, "text": "An if statement consists of a boolean expression followed by one or more statements." }, { "code": null, "e": 2445, "s": 2403, "text": "The syntax of an if statement in C++ is −" }, { "code": null, "e": 2539, "s": 244...
Maximum Sequence Length | Collatz Conjecture - GeeksforGeeks
26 Apr, 2022 Given an integer N. The task is to find the number in the range from 1 to N-1 which is having the maximum number of terms in its Collatz Sequence and the number of terms in the sequence.The collatz sequence of a number N is defined as: If N is Odd then change N to 3*N + 1. If N is Even then change N to N...
[ { "code": null, "e": 24502, "s": 24474, "text": "\n26 Apr, 2022" }, { "code": null, "e": 24740, "s": 24502, "text": "Given an integer N. The task is to find the number in the range from 1 to N-1 which is having the maximum number of terms in its Collatz Sequence and the number of...
PHP mysqli_stmt_fetch() Function
You can create a prepared statement, which has parameter markers ("?") in case of values using the mysqli_prepare() function. Once you prepare a statement, you need to bind values to the parameters of the created statement using the mysqli_stmt_bind_param() function. In the same way you can bound the columns of the res...
[ { "code": null, "e": 3025, "s": 2757, "text": "You can create a prepared statement, which has parameter markers (\"?\") in case of values using the mysqli_prepare() function. Once you prepare a statement, you need to bind values to the parameters of the created statement using the mysqli_stmt_bind_p...
Instruction type ANI d8 in 8085 Microprocessor
In 8085 Instruction set, ANI is a mnemonic, which stands for “ANd Immediate with Accumulator” and “d8” stands for any 8-bit or 1-Bytedata. This instruction is used to AND 8-bit immediate data with the Accumulator’s content. The result of this ANDingoperation will be stored in the Accumulator itself over writing its pre...
[ { "code": null, "e": 1558, "s": 1062, "text": "In 8085 Instruction set, ANI is a mnemonic, which stands for “ANd Immediate with Accumulator” and “d8” stands for any 8-bit or 1-Bytedata. This instruction is used to AND 8-bit immediate data with the Accumulator’s content. The result of this ANDingoper...
Customize loss function to make LSTM model more applicable in stock price prediction | by Zedric Cheung | Towards Data Science
There are many tutorials or articles online teaching you how to build a LSTM model to predict stock price. Either it is simple or sophisticated, we can somehow obtain a “desirable” result, something similar to the below graph (Exhibit 1). Yes, it is desirable if we simply judge the model by looking at mean squared erro...
[ { "code": null, "e": 501, "s": 172, "text": "There are many tutorials or articles online teaching you how to build a LSTM model to predict stock price. Either it is simple or sophisticated, we can somehow obtain a “desirable” result, something similar to the below graph (Exhibit 1). Yes, it is desir...
How do I change the background color of the ActionBar of an ActionBarActivity?
This example demonstrates how to change the background color of the ActionBar of an ActionBarActivity 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" enco...
[ { "code": null, "e": 1164, "s": 1062, "text": "This example demonstrates how to change the background color of the ActionBar of an ActionBarActivity" }, { "code": null, "e": 1293, "s": 1164, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fi...
C library function - strncmp()
The C library function int strncmp(const char *str1, const char *str2, size_t n) compares at most the first n bytes of str1 and str2. Following is the declaration for strncmp() function. int strncmp(const char *str1, const char *str2, size_t n) str1 − This is the first string to be compared. str1 − This is the first st...
[ { "code": null, "e": 2141, "s": 2007, "text": "The C library function int strncmp(const char *str1, const char *str2, size_t n) compares at most the first n bytes of str1 and str2." }, { "code": null, "e": 2194, "s": 2141, "text": "Following is the declaration for strncmp() funct...
DocumentDB - Update Document
In this chapter, we will learn how to update the documents. Using Azure portal, you can easily update document by opening the document in Document explorer and updating it in editor like a text file. Click ‘Save’ button. Now when you need to change a document using .Net SDK you can just replace it. You don't need to de...
[ { "code": null, "e": 2480, "s": 2280, "text": "In this chapter, we will learn how to update the documents. Using Azure portal, you can easily update document by opening the document in Document explorer and updating it in editor like a text file." }, { "code": null, "e": 2823, "s": 2...
Python Scope of Variables - GeeksforGeeks
20 Oct, 2021 In Python, variables are the containers for storing data values. They are reference, or pointers, to an object in memory which means that whenever a variable is assigned to an instance, it gets mapped to that instance. Unlike other languages like C/C++/JAVA, Python is not “statically typed”. We do not need...
[ { "code": null, "e": 23988, "s": 23960, "text": "\n20 Oct, 2021" }, { "code": null, "e": 24432, "s": 23988, "text": "In Python, variables are the containers for storing data values. They are reference, or pointers, to an object in memory which means that whenever a variable is as...
Flask – URL Building
The url_for() function is very useful for dynamically building a URL for a specific function. The function accepts the name of a function as first argument, and one or more keyword arguments, each corresponding to the variable part of URL. The following script demonstrates use of url_for() function. from flask import F...
[ { "code": null, "e": 2273, "s": 2033, "text": "The url_for() function is very useful for dynamically building a URL for a specific function. The function accepts the name of a function as first argument, and one or more keyword arguments, each corresponding to the variable part of URL." }, { ...
TensorFlow - Recurrent Neural Networks
Recurrent neural networks is a type of deep learning-oriented algorithm, which follows a sequential approach. In neural networks, we always assume that each input and output is independent of all other layers. These type of neural networks are called recurrent because they perform mathematical computations in sequentia...
[ { "code": null, "e": 2645, "s": 2315, "text": "Recurrent neural networks is a type of deep learning-oriented algorithm, which follows a sequential approach. In neural networks, we always assume that each input and output is independent of all other layers. These type of neural networks are called re...
Program to find length of longest palindromic substring in Python
Suppose we have a string S. We have to find the length of longest palindromic substring in S. We are assuming that the length of the string S is 1000. So if the string is “BABAC”, then the longest palindromic substring is “BAB” and length is 3. To solve this, we will follow these steps − Define one square matrix of ord...
[ { "code": null, "e": 1307, "s": 1062, "text": "Suppose we have a string S. We have to find the length of longest palindromic substring in S.\nWe are assuming that the length of the string S is 1000. So if the string is “BABAC”, then the\nlongest palindromic substring is “BAB” and length is 3." }, ...
Java Deprecated API Scanner tool (jdepscan) in Java 9 with Examples - GeeksforGeeks
30 Jan, 2020 Java Deprecated API Scanner tool: Java Deprecated API Scanner tool i.e. jdeprscan is a static analyzing command-line tool which is introduced in JDK 9 for find out the uses of deprecated API in the given input. Here the input can be .class file name, directory or JAR file. Whenever we provide any input to ...
[ { "code": null, "e": 23557, "s": 23529, "text": "\n30 Jan, 2020" }, { "code": null, "e": 24254, "s": 23557, "text": "Java Deprecated API Scanner tool: Java Deprecated API Scanner tool i.e. jdeprscan is a static analyzing command-line tool which is introduced in JDK 9 for find out...
React Native - Router
In this chapter, we will understand navigation in React Native. To begin with, we need to install the Router. We will use the React Native Router Flux in this chapter. You can run the following command in terminal, from the project folder. npm i react-native-router-flux --save Since we want our router to handle the en...
[ { "code": null, "e": 2408, "s": 2344, "text": "In this chapter, we will understand navigation in React Native." }, { "code": null, "e": 2584, "s": 2408, "text": "To begin with, we need to install the Router. We will use the React Native Router Flux in this chapter. You can run th...
Do You Read Excel Files with Python? There is a 1000x Faster Way. | by Nicolas Vandeput | Towards Data Science
As a Python user, I use excel files to load/store data as business people like to share data in excel or csv format. Unfortunately, Python is especially slow with Excel files. In this article, I’ll show you five ways to load data in Python. In the end, we’ll achieve a speedup of 3 orders of magnitude. It’ll be lightnin...
[ { "code": null, "e": 347, "s": 171, "text": "As a Python user, I use excel files to load/store data as business people like to share data in excel or csv format. Unfortunately, Python is especially slow with Excel files." }, { "code": null, "e": 499, "s": 347, "text": "In this ar...
Python: Key Value pair using argparse
03 Dec, 2021 The argparse module in Python helps create a program in a command-line-environment in a way that appears not only easy to code but also improves interaction. It also automatically generates help and usage messages and issues errors when users give the program invalid arguments. Creating a Parser: Importing...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Dec, 2021" }, { "code": null, "e": 307, "s": 28, "text": "The argparse module in Python helps create a program in a command-line-environment in a way that appears not only easy to code but also improves interaction. It also automatic...
Difference between Entity constraints, Referential constraints and Semantic constraints
11 Oct, 2021 The data in a relational database is stored in form of a table. A table makes the data look organized. Yet in some cases we might face issues while working with the data like repetition. We might want enforce rules on the data to avoid such technical problems. Theses rules are called constraints. A constra...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Oct, 2021" }, { "code": null, "e": 565, "s": 28, "text": "The data in a relational database is stored in form of a table. A table makes the data look organized. Yet in some cases we might face issues while working with the data like ...
Node.js MySQL-Create Table Using Sequelize
18 Nov, 2021 Introduction to Sequelize: Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. Its features are solid transaction support, relations, eager and lazy loading, read replication and many more. Connect to MySql Database using Sequelize: To establish connecti...
[ { "code": null, "e": 54, "s": 26, "text": "\n18 Nov, 2021" }, { "code": null, "e": 296, "s": 54, "text": "Introduction to Sequelize: Sequelize is a promise-based Node.js ORM for Postgres, MySQL, MariaDB, SQLite and Microsoft SQL Server. Its features are solid transaction support,...
Command Method – Python Design Patterns
07 Oct, 2021 Command Method is Behavioral Design Pattern that encapsulates a request as an object, thereby allowing for the parameterization of clients with different requests and the queuing or logging of requests. Parameterizing other objects with different requests in our analogy means that the button used to turn o...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Oct, 2021" }, { "code": null, "e": 598, "s": 28, "text": "Command Method is Behavioral Design Pattern that encapsulates a request as an object, thereby allowing for the parameterization of clients with different requests and the queu...
Foreach in C++ and Java
09 Jun, 2022 Foreach loop is used to iterate over the elements of a containers (array, vectors etc) quickly without performing initialization, testing and increment/decrement. The working of foreach loops is to do something for every element rather than doing something n times. There is no foreach loop in C, but both C...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 Jun, 2022" }, { "code": null, "e": 535, "s": 52, "text": "Foreach loop is used to iterate over the elements of a containers (array, vectors etc) quickly without performing initialization, testing and increment/decrement. The working...
Hypercube Graph
13 May, 2022 You are given input as order of graph n (highest number of edges connected to a node), you have to find the number of vertices in a Hypercube graph of order n. Examples: Input : n = 3 Output : 8 Input : n = 2 Output : 4 In hypercube graph Q(n), n represents the degree of the graph. Hypercube graph rep...
[ { "code": null, "e": 53, "s": 25, "text": "\n13 May, 2022" }, { "code": null, "e": 225, "s": 53, "text": "You are given input as order of graph n (highest number of edges connected to a node), you have to find the number of vertices in a Hypercube graph of order n. Examples: " ...
How to get the image size (height & width) using JavaScript ?
15 Apr, 2019 For getting size of an image (height and width), Element.clientHeight and Element.clientWidth properties is used. Element.clientHeight: We can access the inner height of an element with this property. This height include the padding but not the margin and border. Element.clientWidth: We can access the inne...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Apr, 2019" }, { "code": null, "e": 142, "s": 28, "text": "For getting size of an image (height and width), Element.clientHeight and Element.clientWidth properties is used." }, { "code": null, "e": 292, "s": 142, "...
How to Execute Character Count Program in MapReduce Hadoop?
10 Sep, 2020 Prerequisites: Hadoop and MapReduce Required setup for completing the below task. Java InstallationHadoop installation Java Installation Hadoop installation Our task is to count the frequency of each character present in our input file. We are using Java for implementing this particular scenario. However...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Sep, 2020" }, { "code": null, "e": 64, "s": 28, "text": "Prerequisites: Hadoop and MapReduce" }, { "code": null, "e": 110, "s": 64, "text": "Required setup for completing the below task." }, { "code": null...
How to create an Editable Table with add delete and search filter using ReactJS ?
01 Jul, 2021 Tables is used to display a set of data. In some projects, you need to implement the dynamic table with editable/non-editable modes where a user can add or delete any row. Also, Material UI for React has a customizable Table Component available, and it is very easy to integrate, but there is no such functi...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Jul, 2021" }, { "code": null, "e": 498, "s": 52, "text": "Tables is used to display a set of data. In some projects, you need to implement the dynamic table with editable/non-editable modes where a user can add or delete any row. Al...
MySQL | PASSWORD Function
08 Nov, 2019 The MySQL PASSWORD function is used for the generation of a hashed password using a plain-text password string It uses hashing techniques to generate the hashed password. This function is carried out by the authentication system. MySQL server uses the PASSWORD function to encrypt MySQL passwords for storag...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Nov, 2019" }, { "code": null, "e": 258, "s": 28, "text": "The MySQL PASSWORD function is used for the generation of a hashed password using a plain-text password string It uses hashing techniques to generate the hashed password. This...
What is Smart Contract in Solidity?
11 May, 2022 Solidity’s code is encapsulated in contracts which means a contract in Solidity is a collection of code (its functions) and data (its state) that resides at a specific address on the Ethereum blockchain. A contract is a fundamental block of building an application on the Ethereum. Example: Solidity // Sol...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 May, 2022" }, { "code": null, "e": 311, "s": 28, "text": "Solidity’s code is encapsulated in contracts which means a contract in Solidity is a collection of code (its functions) and data (its state) that resides at a specific address...
Python | Removing newline character from string
05 Jul, 2022 Many times, while working with Python strings, we can have a problem in which we have a huge amount of data and we need to perform preprocessing of a certain kind. This can also be removing stray newline characters in strings. Let’s discuss certain ways in which this task can be performed. Here, we will co...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Jul, 2022" }, { "code": null, "e": 319, "s": 28, "text": "Many times, while working with Python strings, we can have a problem in which we have a huge amount of data and we need to perform preprocessing of a certain kind. This can al...
SymPy - Integration
The SymPy package contains integrals module. It implements methods to calculate definite and indefinite integrals of expressions. The integrate() method is used to compute both definite and indefinite integrals. To compute an indefinite or primitive integral, just pass the variable after the expression. For example − i...
[ { "code": null, "e": 2458, "s": 2153, "text": "The SymPy package contains integrals module. It implements methods to calculate definite and indefinite integrals of expressions. The integrate() method is used to compute both definite and indefinite integrals. To compute an indefinite or primitive int...
SQL | Date Functions (Set-2)
19 Jul, 2018 In SQL, dates are complicated for newbies, since while working with a database, the format of the date in the table must be matched with the input date in order to insert. In various scenarios instead of date, datetime (time is also involved with date) is used. Some of the date functions have been already ...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Jul, 2018" }, { "code": null, "e": 314, "s": 52, "text": "In SQL, dates are complicated for newbies, since while working with a database, the format of the date in the table must be matched with the input date in order to insert. In...
Program to print number pattern
04 Jun, 2022 We have to print a pattern where in middle column contains only 1, right side columns contain constant digit which is greater than 1 and left side columns contains constant digit which is greater than 1. Every row should look like a Palindrome. Examples : Input : 3 Output : 1 2 1 2 1 Input : 5...
[ { "code": null, "e": 54, "s": 26, "text": "\n04 Jun, 2022" }, { "code": null, "e": 299, "s": 54, "text": "We have to print a pattern where in middle column contains only 1, right side columns contain constant digit which is greater than 1 and left side columns contains constant d...
Searching in a NumPy array
01 Oct, 2020 Numpy provides various methods for searching different kinds of numerical values, in this article, we will cover two important ones. numpy.where() numpy.searchsorted() 1. numpy.where:() It returns the indices of elements in an input array where the given condition is satisfied. Syntax: numpy.where(conditio...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Oct, 2020" }, { "code": null, "e": 161, "s": 28, "text": "Numpy provides various methods for searching different kinds of numerical values, in this article, we will cover two important ones." }, { "code": null, "e": 175, ...
Matplotlib.pyplot.sca() in Python
03 May, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, etc. Th...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 May, 2020" }, { "code": null, "e": 333, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MAT...
Maximum profit by buying and selling a stock at most twice | Set 2
06 May, 2021 Given an array prices[] which denotes the prices of the stocks on different days, the task is to find the maximum profit possible after buying and selling the stocks on different days using transaction where at most two transactions are allowed.Note: You cannot engage in multiple transactions at the same t...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 May, 2021" }, { "code": null, "e": 419, "s": 54, "text": "Given an array prices[] which denotes the prices of the stocks on different days, the task is to find the maximum profit possible after buying and selling the stocks on diffe...
Node.js URL.fileURLToPath API
14 Oct, 2021 This URL.fileURLToPath function decodes the file URL to a path string and ensures that the URL control characters (/, %) are correctly appended/adjusted when converting the given file URL into a path. Syntax: url.fileURLToPath( url ) Parameters: This function accepts single parameter url which holds the fi...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Oct, 2021" }, { "code": null, "e": 229, "s": 28, "text": "This URL.fileURLToPath function decodes the file URL to a path string and ensures that the URL control characters (/, %) are correctly appended/adjusted when converting the gi...
Reader-Writer problem using Monitors (pthreads)
07 Feb, 2022 Prerequisite – Monitors, Readers-Writers Problem There is a shared resource that is accessed by multiple processes i.e. readers and writers. Any number of readers can read from the shared resource simultaneously, but only one writer can write to the shared resource at a time. When a writer is writing data ...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Feb, 2022" }, { "code": null, "e": 858, "s": 52, "text": "Prerequisite – Monitors, Readers-Writers Problem There is a shared resource that is accessed by multiple processes i.e. readers and writers. Any number of readers can read fr...
Python program to print the dictionary in table format
31 Aug, 2021 Given a Dictionary. The task is to print the dictionary in the table format.Examples: Input: {1: [“Samuel”, 21, ‘Data Structures’], 2: [“Richie”, 20, ‘Machine Learning’], 3: [“Lauren”, 21, ‘OOPS with java’], }Output: NAME AGE COURSE Samuel 21 Data Structures Richie 20 Machine Learning Lauren 21 OOPS with ...
[ { "code": null, "e": 52, "s": 24, "text": "\n31 Aug, 2021" }, { "code": null, "e": 139, "s": 52, "text": "Given a Dictionary. The task is to print the dictionary in the table format.Examples: " }, { "code": null, "e": 366, "s": 139, "text": "Input: {1: [“Samue...
Python MongoDB – Update_many Query
26 May, 2020 MongoDB is a NoSQL database management system. Unlike MySQL the data in MongoDB is not stored as relations or tables. Data in mongoDB is stored as documents. Documents are Javascript/JSON like objects. More formally documents in MongoDB use BSON. PyMongo is a MongoDB API for python. It allows to read and ...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 May, 2020" }, { "code": null, "e": 457, "s": 28, "text": "MongoDB is a NoSQL database management system. Unlike MySQL the data in MongoDB is not stored as relations or tables. Data in mongoDB is stored as documents. Documents are Ja...
Node.js console.warn() Function
14 Oct, 2021 The console.warn() function from console class of Node.js is used to display the warning messages on the console. It prints to stderr with newline. Note: This function is an alias of console.error() function. Syntax: console.warn( [data][, ...args] ) Parameter: This function can contains multiple parameter...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Oct, 2021" }, { "code": null, "e": 176, "s": 28, "text": "The console.warn() function from console class of Node.js is used to display the warning messages on the console. It prints to stderr with newline." }, { "code": null,...
minimize_window driver method – Selenium Python
15 May, 2020 Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 May, 2020" }, { "code": null, "e": 767, "s": 28, "text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium ...
Computer Organization | Instruction Formats (Zero, One, Two and Three Address Instruction)
04 Oct, 2021 A computer performs a task based on the instruction provided. Instruction in computers comprises groups called fields. These fields contain different information as for computers everything is in 0 and 1 so each field has different significance based on which a CPU decides what to perform. The most common ...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Oct, 2021" }, { "code": null, "e": 371, "s": 52, "text": "A computer performs a task based on the instruction provided. Instruction in computers comprises groups called fields. These fields contain different information as for compu...
Matplotlib.axis.Axis.set_minor_locator() function in Python
03 Jun, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. The Axis.set_minor_locator() function in axis module of matplotlib library is used to...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Jun, 2020" }, { "code": null, "e": 250, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and u...
Comprehension Passages | English
04 May, 2022 Comprehension passages are sure shot scoring questions. We are given a passage and some questions that follow the passage. The questions are to be answered by using the data given in the passage, even if it differs from real life facts. Example : Read the passage and answer the questions that follow : Mike...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 May, 2022" }, { "code": null, "e": 5104, "s": 52, "text": "Comprehension passages are sure shot scoring questions. We are given a passage and some questions that follow the passage. The questions are to be answered by using the data...
Write an JDBC example for inserting value for Clob data type into a table?
Assume we already have a table named MyData in the database with the following description. +---------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------+--------------+------+-----+---------+-------+ | Name | varchar(255) | YES | | NULL | ...
[ { "code": null, "e": 1154, "s": 1062, "text": "Assume we already have a table named MyData in the database with the following description." }, { "code": null, "e": 1502, "s": 1154, "text": "+---------+--------------+------+-----+---------+-------+\n| Field | Type | Null...
Explain the conversions of expressions of stacks in C language
Stack is a linear data structure, where data is inserted and removed only at one end. Given below is an algorithm for Push ( ) − Check for stack overflow. if (top = = n-1) printf("stack over flow"); Otherwise, insert an element into the stack. top ++ a[top] = item Given below is an algorithm for Pop ( ) − Check for sta...
[ { "code": null, "e": 1148, "s": 1062, "text": "Stack is a linear data structure, where data is inserted and removed only at one end." }, { "code": null, "e": 1191, "s": 1148, "text": "Given below is an algorithm for Push ( ) −" }, { "code": null, "e": 1217, "s": 1...
jQuery | ready() with Examples
26 Sep, 2018 The ready() method is an inbuilt method in jQuery which helps to load the whole page then execute the rest code. This method specify the function to execute when the DOM is fully loaded. Syntax: $(document).ready(function) Parameters: This method accepts single parameter function which is mandatory. It is ...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Sep, 2018" }, { "code": null, "e": 215, "s": 28, "text": "The ready() method is an inbuilt method in jQuery which helps to load the whole page then execute the rest code. This method specify the function to execute when the DOM is fu...
How can I create custom button in Android using XML Styles?
This example demonstrates how do I create custom button in Android using XML Styles. 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"?> <R...
[ { "code": null, "e": 1272, "s": 1187, "text": "This example demonstrates how do I create custom button in Android using XML Styles." }, { "code": null, "e": 1401, "s": 1272, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required d...
Java Program for Anagram Substring Search (Or Search for all permutations)
07 Jul, 2021 Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] and its permutations (or anagrams) in txt[]. You may assume that n > m.Expected time complexity is O(n) Examples: 1) Input: txt[] = "BACDGABCDA" pat[] = "ABCD" Outpu...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Jul, 2021" }, { "code": null, "e": 295, "s": 54, "text": "Given a text txt[0..n-1] and a pattern pat[0..m-1], write a function search(char pat[], char txt[]) that prints all occurrences of pat[] and its permutations (or anagrams) in...
Find the smallest missing number
09 Jun, 2022 Given a sorted array of n distinct integers where each integer is in the range from 0 to m-1 and m > n. Find the smallest number that is missing from the array. Examples Input: {0, 1, 2, 6, 9}, n = 5, m = 10 Output: 3 Input: {4, 5, 10, 11}, n = 4, m = 12 Output: 0 Input: {0, 1, 2, 3}, n = 4, m = 5 O...
[ { "code": null, "e": 54, "s": 26, "text": "\n09 Jun, 2022" }, { "code": null, "e": 216, "s": 54, "text": "Given a sorted array of n distinct integers where each integer is in the range from 0 to m-1 and m > n. Find the smallest number that is missing from the array. " }, { ...
Node.js Readline() Module
08 Oct, 2021 Readline Module in Node.js allows the reading of input stream line by line. This module wraps up the process standard output and process standard input objects. Readline module makes it easier for input and reading the output given by the user. To use this module, create a new JavaScript file and write the...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Oct, 2021" }, { "code": null, "e": 390, "s": 28, "text": "Readline Module in Node.js allows the reading of input stream line by line. This module wraps up the process standard output and process standard input objects. Readline modul...
Maximum profit from sale of wines
27 May, 2021 Given n wines in a row, with integers denoting the cost of each wine respectively. Each year you can sale the first or the last wine in the row. However, the price of wines increases over time. Let the initial profits from the wines be P1, P2, P3...Pn. On the Yth year, the profit from the ith wine will be ...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 May, 2021" }, { "code": null, "e": 538, "s": 54, "text": "Given n wines in a row, with integers denoting the cost of each wine respectively. Each year you can sale the first or the last wine in the row. However, the price of wines i...
MOD() Function in MySQL
01 Oct, 2020 The MOD() function in MySQL is used to find the remainder of one number divided by another. The MOD() function returns the remainder of dividend divided by divisor. if the divisor is zero, it returns NULL. Syntax : MOD(N, M) or N % M or N MOD M Parameter :MOD() function accepts two parameter as mentioned ...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Oct, 2020" }, { "code": null, "e": 234, "s": 28, "text": "The MOD() function in MySQL is used to find the remainder of one number divided by another. The MOD() function returns the remainder of dividend divided by divisor. if the div...
Python | Fast Walsh Hadamard Transform
31 Jan, 2022 Fast Walsh Hadamard Transform, is an Hadamard ordered efficient algorithm to compute the Walsh Hadamard transform (WHT). Normal WHT computation has N = 2m complexity but using FWHT reduces the computation to O(n2). The FWHT requires O(n logn) additions and subtraction operations. It is a divide and conquer...
[ { "code": null, "e": 53, "s": 25, "text": "\n31 Jan, 2022" }, { "code": null, "e": 412, "s": 53, "text": "Fast Walsh Hadamard Transform, is an Hadamard ordered efficient algorithm to compute the Walsh Hadamard transform (WHT). Normal WHT computation has N = 2m complexity but usin...
How to choose background color through color picker?
05 Mar, 2021 In this project, we are going to change the background color with the help of the Color Picker. Glimpse of the Project: Approach: Create an HTML file in which we are going to add the text and a color picker which helps to change the background color of our web-page. Create a CSS style to give some animatio...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Mar, 2021" }, { "code": null, "e": 150, "s": 54, "text": "In this project, we are going to change the background color with the help of the Color Picker." }, { "code": null, "e": 174, "s": 150, "text": "Glimpse o...
HTML | Flip a card
22 Aug, 2019 Flip cards are the cards in your website that will flip when you hover your mouse over them. There will be information, links or images in the back face of the card which will be visible when you hover over the cards. In this article, you’re going to learn how to make Flip cards on your website using only ...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Aug, 2019" }, { "code": null, "e": 246, "s": 28, "text": "Flip cards are the cards in your website that will flip when you hover your mouse over them. There will be information, links or images in the back face of the card which will...
How to add text to Matplotlib?
16 Feb, 2022 Matplotlib is a plotting library in Python to visualize data, inspired by MATLAB, meaning that the terms used (Axis, Figure, Plots) will be similar to those used in MATLAB. Pyplot is a module within the Matplotlib library which is a shell-like interface to Matplotlib module. It provides almost any kind of...
[ { "code": null, "e": 28, "s": 0, "text": "\n16 Feb, 2022" }, { "code": null, "e": 304, "s": 28, "text": "Matplotlib is a plotting library in Python to visualize data, inspired by MATLAB, meaning that the terms used (Axis, Figure, Plots) will be similar to those used in MATLAB. Py...
Difference between string and StringBuffer in Java.
Strings, which are widely used in Java programming, are a sequence of characters. In Java programming language, strings are treated as objects. The Java platform provides the String class to create and manipulate strings. Whereas, StringBuffer class is a thread-safe, mutable sequence of characters. A string buffer is l...
[ { "code": null, "e": 1409, "s": 1187, "text": "Strings, which are widely used in Java programming, are a sequence of characters. In Java programming language, strings are treated as objects. The Java platform provides the String class to create and manipulate strings." }, { "code": null, ...
HTML | placeholder Attribute
08 Dec, 2021 The placeholder attribute specifies a short hint that describes the expected value of an input field/text area. The short hint is displayed in the field before the user enters a value.Syntax: <element placeholder=""> Elements: This method can have following attributes: <input> placeholder Attribute <te...
[ { "code": null, "e": 53, "s": 25, "text": "\n08 Dec, 2021" }, { "code": null, "e": 247, "s": 53, "text": "The placeholder attribute specifies a short hint that describes the expected value of an input field/text area. The short hint is displayed in the field before the user enter...
GATE | GATE CS 2019 | Question 30
15 Feb, 2019 An array of 25 distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that the pivot element gets placed in the worst possible location in the first round of partitioning (rounded off to 2 decimal places) is _________. Note: This was ...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Feb, 2019" }, { "code": null, "e": 320, "s": 28, "text": "An array of 25 distinct elements is to be sorted using quicksort. Assume that the pivot element is chosen uniformly at random. The probability that the pivot element gets plac...
Largest number having both positive and negative values present in the array - GeeksforGeeks
28 Jul, 2021 Given an array arr[] consisting of N integers, the task is to find the largest number K (> 0) such that both the values K and -K are present in the given array arr[]. If no such number exists, then print -1. Examples: Input: arr[] = {3, 2, -2, 5, -3}Output: 3 Input: arr[] = {1, 2, 3, -4}Output: -1 Naive Ap...
[ { "code": null, "e": 26041, "s": 26013, "text": "\n28 Jul, 2021" }, { "code": null, "e": 26249, "s": 26041, "text": "Given an array arr[] consisting of N integers, the task is to find the largest number K (> 0) such that both the values K and -K are present in the given array arr...
Python | Find depth of a dictionary - GeeksforGeeks
27 Nov, 2018 Prerequisite: Nested dictionary The task is to find the depth of given dictionary in Python. Let’s discuss all different methods to do this task. Examples: Input : {1:'a', 2: {3: {4: {}}}} Output : 4 Input : {'a':1, 'b': {'c':'geek'}} Output : 3 Approach #1 : Naive Alpproach A naive approach in order to ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n27 Nov, 2018" }, { "code": null, "e": 25569, "s": 25537, "text": "Prerequisite: Nested dictionary" }, { "code": null, "e": 25683, "s": 25569, "text": "The task is to find the depth of given dictionary in Pytho...
Remove Multiple Columns from data.table in R - GeeksforGeeks
31 Aug, 2021 In this article, we are going to see how to remove multiple columns from data.table in the R Programming language. Create data.table for demonstration: R # load the data.table packagelibrary("data.table") # create a data.table with 4 columns# they are id,name,age and address data = data.table(id = c(1,2,...
[ { "code": null, "e": 26487, "s": 26459, "text": "\n31 Aug, 2021" }, { "code": null, "e": 26602, "s": 26487, "text": "In this article, we are going to see how to remove multiple columns from data.table in the R Programming language." }, { "code": null, "e": 26639, ...
Python | Langton's Ant - GeeksforGeeks
16 Oct, 2018 Langton’s Ant is a 4-state two-dimensional universal Turing machine. It was invented by Chris Langton in 1986. It is basically an ant, sitting on a square lattice of cells, which are initially white. The ant moves on the plane and changes the color of cells creating patterns on it. But the movement of the ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n16 Oct, 2018" }, { "code": null, "e": 25903, "s": 25537, "text": "Langton’s Ant is a 4-state two-dimensional universal Turing machine. It was invented by Chris Langton in 1986. It is basically an ant, sitting on a square lattice ...
Different ways to fetch data using API in React - GeeksforGeeks
23 Nov, 2021 ReactJS: ReactJS is a declarative, efficient, and flexible JavaScript library for building user interfaces. It’s ‘V’ in MVC. ReactJS is an open-source, component-based front-end library responsible only for the view layer of the application. It is maintained by Facebook. API: API is an abbreviation for App...
[ { "code": null, "e": 26071, "s": 26043, "text": "\n23 Nov, 2021" }, { "code": null, "e": 26343, "s": 26071, "text": "ReactJS: ReactJS is a declarative, efficient, and flexible JavaScript library for building user interfaces. It’s ‘V’ in MVC. ReactJS is an open-source, component-b...
Difference between Relative and Absolute Deadline of Real-time Task - GeeksforGeeks
28 Jan, 2022 1. Relative Deadline :The time interval between the start of the task and the completion of the real-time task is known as Relative deadline. It is basically the time interval between arrival and corresponding deadline of the real-time task.If the arrival time of task is ‘t’ and corresponding deadline of t...
[ { "code": null, "e": 26103, "s": 26075, "text": "\n28 Jan, 2022" }, { "code": null, "e": 26429, "s": 26103, "text": "1. Relative Deadline :The time interval between the start of the task and the completion of the real-time task is known as Relative deadline. It is basically the t...
Python | Pandas dataframe.at_time() - GeeksforGeeks
06 Aug, 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.Pandasdataframe.at_time() function is used to select all the values in a row corresponding to ...
[ { "code": null, "e": 25701, "s": 25673, "text": "\n06 Aug, 2021" }, { "code": null, "e": 26123, "s": 25701, "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...
restore command in Linux with Examples - GeeksforGeeks
24 May, 2019 restore command in Linux system is used for restoring files from a backup created using dump. The restore command performs the exact inverse function of dump. A full backup of a file system is being restored and subsequent incremental backups layered is being kept on top of it. Single files and directory s...
[ { "code": null, "e": 25293, "s": 25265, "text": "\n24 May, 2019" }, { "code": null, "e": 25828, "s": 25293, "text": "restore command in Linux system is used for restoring files from a backup created using dump. The restore command performs the exact inverse function of dump. A fu...
Numpy | Iterating Over Array - GeeksforGeeks
15 Nov, 2018 NumPy package contains an iterator object numpy.nditer. It is an efficient multidimensional iterator object using which it is possible to iterate over an array. Each element of an array is visited using Python’s standard Iterator interface. Output: Original array is: [[ 0 1 2 3] [ 4 5 6 7] [ 8 9 10 11]] ...
[ { "code": null, "e": 42651, "s": 42623, "text": "\n15 Nov, 2018" }, { "code": null, "e": 42892, "s": 42651, "text": "NumPy package contains an iterator object numpy.nditer. It is an efficient multidimensional iterator object using which it is possible to iterate over an array. Ea...
How to Install Numpy on Linux? - GeeksforGeeks
30 Sep, 2021 Python NumPy is a general-purpose array processing package that provides tools for handling n-dimensional arrays. It provides various computing tools such as comprehensive mathematical functions, linear algebra routines. NumPy provides both the flexibility of Python and the speed of well-optimized compiled...
[ { "code": null, "e": 26197, "s": 26169, "text": "\n30 Sep, 2021" }, { "code": null, "e": 26615, "s": 26197, "text": "Python NumPy is a general-purpose array processing package that provides tools for handling n-dimensional arrays. It provides various computing tools such as compr...
Python | Using 2D arrays/lists the right way - GeeksforGeeks
15 Mar, 2021 Python provides many ways to create 2-dimensional lists/arrays. However one must know the differences between these ways because they can create complications in code that can be very difficult to trace out. Lets start by looking at common ways of creating 1d array of size N initialized with 0s. Method 1a ...
[ { "code": null, "e": 25625, "s": 25597, "text": "\n15 Mar, 2021" }, { "code": null, "e": 25934, "s": 25625, "text": "Python provides many ways to create 2-dimensional lists/arrays. However one must know the differences between these ways because they can create complications in c...
Lambda Function - Ruby - GeeksforGeeks
16 Aug, 2021 In Computer Programming, Lambda functions are anonymous functions. Lambda functions in Ruby are no different. Since everything in Ruby is treated as an object, lambdas are also objects in Ruby. Lambdas in Ruby allow us to wrap data and logic in a portable package. Syntax to create Lambda function in Ruby...
[ { "code": null, "e": 24873, "s": 24845, "text": "\n16 Aug, 2021" }, { "code": null, "e": 25140, "s": 24873, "text": "In Computer Programming, Lambda functions are anonymous functions. Lambda functions in Ruby are no different. Since everything in Ruby is treated as an object, lam...
User Registration in Android using Back4App - GeeksforGeeks
06 Nov, 2021 Prerequisite: How to Connect Android App with Back4App? We have seen adding Back4App in our Android App. In this article, we will take a look at adding a User Registration form in Android App so that users can register themselves in the app. We will be building a simple application in which we will be add...
[ { "code": null, "e": 25729, "s": 25701, "text": "\n06 Nov, 2021" }, { "code": null, "e": 25785, "s": 25729, "text": "Prerequisite: How to Connect Android App with Back4App?" }, { "code": null, "e": 25972, "s": 25785, "text": "We have seen adding Back4App in ou...
Any All in Python - GeeksforGeeks
25 Nov, 2020 Any and All are two built ins provided in python used for successive And/Or. AnyReturns true if any of the items is True. It returns False if empty or all are false. Any can be thought of as a sequence of OR operations on the provided iterables.It short circuit the execution i.e. stop the execution as soon...
[ { "code": null, "e": 42713, "s": 42685, "text": "\n25 Nov, 2020" }, { "code": null, "e": 42790, "s": 42713, "text": "Any and All are two built ins provided in python used for successive And/Or." }, { "code": null, "e": 43045, "s": 42790, "text": "AnyReturns tr...
NFA machines accepting all strings that ends or not ends with substring 'ab' - GeeksforGeeks
24 Jun, 2019 Prerequisite: Finite Automata Introduction Problem-1:Construction of a minimal NFA accepting a set of strings over {a, b} in which each string of the language ends with ‘ab’. Explanation:The desired language will be like: L1 = {ab, abbab, abaab, ...........} Here as we can see that each string of the above...
[ { "code": null, "e": 25652, "s": 25624, "text": "\n24 Jun, 2019" }, { "code": null, "e": 25695, "s": 25652, "text": "Prerequisite: Finite Automata Introduction" }, { "code": null, "e": 25827, "s": 25695, "text": "Problem-1:Construction of a minimal NFA accepti...
How to Right-align flex item? - GeeksforGeeks
01 Dec, 2020 CSS | flex-box Flex-box is simply a web layout method that allows developers to align the elements easily and much more. The whole concept of flex-box depends on two major pillars: main-axis and cross-axis. Representation of flex-box To align the flex items left/right, We need to deal with the main-axis, w...
[ { "code": null, "e": 26621, "s": 26593, "text": "\n01 Dec, 2020" }, { "code": null, "e": 26636, "s": 26621, "text": "CSS | flex-box" }, { "code": null, "e": 26828, "s": 26636, "text": "Flex-box is simply a web layout method that allows developers to align the ...
How to convert timestamp string to datetime object in Python? - GeeksforGeeks
29 Aug, 2020 Python has a module named DateTime to work with dates and times. We did not need to install it separately. It is pre-installed with the python package itself. A UNIX timestamp is several seconds between a particular date and January 1, 1970, at UTC. You can simply use the fromtimestamp function from the Da...
[ { "code": null, "e": 26191, "s": 26163, "text": "\n29 Aug, 2020" }, { "code": null, "e": 26441, "s": 26191, "text": "Python has a module named DateTime to work with dates and times. We did not need to install it separately. It is pre-installed with the python package itself. A UN...