title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
ReactJS Reactstrap Form Component
02 Sep, 2021 Reactstrap is a popular front-end library that is easy to use React Bootstrap 4 components. This library contains the stateless React components for Bootstrap 4. The Form component is used when the user needs to create an instance or collect information. We can use the following approach in ReactJS to use ...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Sep, 2021" }, { "code": null, "e": 374, "s": 28, "text": "Reactstrap is a popular front-end library that is easy to use React Bootstrap 4 components. This library contains the stateless React components for Bootstrap 4. The Form comp...
Node.js | package.json
21 Jan, 2022 The package.json file is the heart of Node.js system. It is the manifest file of any Node.js project and contains the metadata of the project. The package.json file is the essential part to understand, learn and work with the Node.js. It is the first step to learn about development in Node.js. What does p...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jan, 2022" }, { "code": null, "e": 324, "s": 28, "text": "The package.json file is the heart of Node.js system. It is the manifest file of any Node.js project and contains the metadata of the project. The package.json file is the ess...
strtol() function in C++ STL
01 Jun, 2022 The strtol() function is a builtin function in C++ STL which converts the contents of a string as an integral number of the specified base and return its value as a long int. Syntax: strtol(s, &end, b) Parameters: The function accepts three mandatory parameters which are described as below: s: specifies th...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Jun, 2022" }, { "code": null, "e": 211, "s": 28, "text": "The strtol() function is a builtin function in C++ STL which converts the contents of a string as an integral number of the specified base and return its value as a long int. ...
When to use an abstract class and when to use an interface in Java?
An interface can be used to define a contract behavior and it can also act as a contract between two systems to interact while an abstract class is mainly used to define default behavior for subclasses, it means that all child classes should have performed the same functionality. An abstract class is a good choice if w...
[ { "code": null, "e": 1468, "s": 1187, "text": "An interface can be used to define a contract behavior and it can also act as a contract between two systems to interact while an abstract class is mainly used to define default behavior for subclasses, it means that all child classes should have perfor...
Python program to convert Dict of list to CSV
28 Nov, 2021 Given a dictionary of list d, the task is to write a Python program to write a dictionary into a CSV file. The idea to solve this problem is to zip the dictionary and then write it into a CSV file. Python provides an in-built module called ‘csv’ for working with CSV files. csv.writer class is used to write...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Nov, 2021" }, { "code": null, "e": 135, "s": 28, "text": "Given a dictionary of list d, the task is to write a Python program to write a dictionary into a CSV file." }, { "code": null, "e": 415, "s": 135, "text": ...
How to Draw 3D Cube using Matplotlib in Python?
06 Jul, 2022 In this article, we will deal with the 3d plots of cubes using matplotlib and Numpy. Cubes are one of the most basic of 3D shapes. A cube is a 3-dimensional solid object bounded by 6 identical square faces. The cube has 6-faces, 12-edges, and 8-corners. All faces are squares of the same size. The total sur...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Jul, 2022" }, { "code": null, "e": 406, "s": 28, "text": "In this article, we will deal with the 3d plots of cubes using matplotlib and Numpy. Cubes are one of the most basic of 3D shapes. A cube is a 3-dimensional solid object bound...
Select into and temporary tables in MS SQL Server
23 Sep, 2020 1. Select into :Suppose a table has some particular rows that has to be transferred to another table of the same database. It can be done using select into statement as follows – select list into destination from source (where condition) Example :There are two tables named student and marks. The marks of ...
[ { "code": null, "e": 28, "s": 0, "text": "\n23 Sep, 2020" }, { "code": null, "e": 207, "s": 28, "text": "1. Select into :Suppose a table has some particular rows that has to be transferred to another table of the same database. It can be done using select into statement as follow...
Copy set bits in a range
16 Jun, 2022 Given two numbers x and y, and a range [l, r] where 1 <= l, r <= 32. The task is consider set bits of y in range [l, r] and set these bits in x also.Examples : Input : x = 10, y = 13, l = 2, r = 3 Output : x = 14 Binary representation of 10 is 1010 and that of y is 1101. There is one set bit in y at 3'r...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Jun, 2022" }, { "code": null, "e": 215, "s": 54, "text": "Given two numbers x and y, and a range [l, r] where 1 <= l, r <= 32. The task is consider set bits of y in range [l, r] and set these bits in x also.Examples : " }, { ...
When Does Compiler Create Default and Copy Constructors in C++?
24 May, 2022 A constructor is a special type of member function of a class that initializes objects of a class. In C++, Constructor is automatically called when an object(instance of a class) is created. There are 3 types of constructors in C++ Default Constructor Copy constructor Parameterized Constructor In C++, the ...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 May, 2022" }, { "code": null, "e": 286, "s": 54, "text": "A constructor is a special type of member function of a class that initializes objects of a class. In C++, Constructor is automatically called when an object(instance of a cl...
Check if a point is inside, outside or on the ellipse
29 Jun, 2022 Given an ellipse centered at (h, k), with semi-major axis a, semi-minor axis b, both aligned with the Cartesian plane. The task is to determine if the point (x, y) is within the area bounded by the ellipse.Examples: Input: h = 0, k = 0, x = 2, y = 1, a = 4, b = 5 Output: Inside Input: h = 1, k = 2, x =...
[ { "code": null, "e": 53, "s": 25, "text": "\n29 Jun, 2022" }, { "code": null, "e": 271, "s": 53, "text": "Given an ellipse centered at (h, k), with semi-major axis a, semi-minor axis b, both aligned with the Cartesian plane. The task is to determine if the point (x, y) is within ...
Introduction to Beam Search Algorithm
18 Jul, 2021 Introduction :A heuristic technique is a set of criteria for determining which of multiple options will be the most effective in achieving a particular goal. This strategy increases the efficiency of a search process by surrendering claims of systematic and completeness of the best.We can hope to achieve a...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jul, 2021" }, { "code": null, "e": 475, "s": 28, "text": "Introduction :A heuristic technique is a set of criteria for determining which of multiple options will be the most effective in achieving a particular goal. This strategy inc...
OS Path module in Python
29 Nov, 2020 This module contains some useful functions on pathnames. The path parameters are either strings or bytes . These functions here are used for different purposes such as for merging, normalizing and retrieving path names in python . All of these functions accept either only bytes or only string objects as th...
[ { "code": null, "e": 53, "s": 25, "text": "\n29 Nov, 2020" }, { "code": null, "e": 766, "s": 53, "text": "This module contains some useful functions on pathnames. The path parameters are either strings or bytes . These functions here are used for different purposes such as for me...
TestNG - Suite Test
A test suite is a collection of test cases intended to test a behavior or a set of behaviors of software program. In TestNG, we cannot define a suite in testing source code, but it is represented by one XML file, as suite is the feature of execution. It also allows flexible configuration of the tests to be run. A suite...
[ { "code": null, "e": 2580, "s": 2194, "text": "A test suite is a collection of test cases intended to test a behavior or a set of behaviors of software program. In TestNG, we cannot define a suite in testing source code, but it is represented by one XML file, as suite is the feature of execution. It...
How to check a key exists in an array in PHP ?
01 Jun, 2020 We have given an array arr and a Key key, the task is to check if a key exists in an array or not in PHP. Examples: Input : arr = ["Geek1", "Geek2", "1", "2","3"] key = "2" Output : Found the Key Input : arr = ["Geek1", "Geek2", "1", "2","3"] key = 9 Output : Key not Found The problem ...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Jun, 2020" }, { "code": null, "e": 134, "s": 28, "text": "We have given an array arr and a Key key, the task is to check if a key exists in an array or not in PHP." }, { "code": null, "e": 144, "s": 134, "text": "...
Reading an excel file using Python openpyxl module
08 Jun, 2021 Openpyxl is a Python library for reading and writing Excel (with extension xlsx/xlsm/xltx/xltm) files. The openpyxl module allows Python program to read and modify Excel files.For example, users might have to go through thousands of rows and pick out a few handful of information to make small changes based...
[ { "code": null, "e": 53, "s": 25, "text": "\n08 Jun, 2021" }, { "code": null, "e": 502, "s": 53, "text": "Openpyxl is a Python library for reading and writing Excel (with extension xlsx/xlsm/xltx/xltm) files. The openpyxl module allows Python program to read and modify Excel file...
numpy.extract() in Python
09 Mar, 2022 The numpy.extract() function returns elements of input_array if they satisfy some specified condition. Syntax: numpy.extract(condition, array) Parameters : array : Input array. User apply conditions on input_array elements condition : [array_like]Condition on the basis of which user extract elements...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Mar, 2022" }, { "code": null, "e": 132, "s": 28, "text": "The numpy.extract() function returns elements of input_array if they satisfy some specified condition. " }, { "code": null, "e": 172, "s": 132, "text": "Sy...
C Program to multiply two matrices
26 Dec, 2021 Given two matrices, the task to multiply them. Matrices can either be square or rectangular. Examples: Input : mat1[][] = {{1, 2}, {3, 4}} mat2[][] = {{1, 1}, {1, 1}} Output : {{3, 3}, {7, 7}} Input : mat1[][] = {{2, 4}, {3, ...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Dec, 2021" }, { "code": null, "e": 121, "s": 28, "text": "Given two matrices, the task to multiply them. Matrices can either be square or rectangular." }, { "code": null, "e": 132, "s": 121, "text": "Examples: " ...
How to Create Time-Table schedule using HTML ?
10 May, 2022 A Table is an arrangement of rows and columns. Anyone can create a table by knowing the basics of HTML(HyperText Markup Language). A table is defined by using <table> tag in HTML. Steps to Create a Table: Create a <html> tag.Create a table using the tags <table></table>.Create rows in the table using <tr>T...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 May, 2022" }, { "code": null, "e": 234, "s": 54, "text": "A Table is an arrangement of rows and columns. Anyone can create a table by knowing the basics of HTML(HyperText Markup Language). A table is defined by using <table> tag in ...
Operator Precedence and Associativity in C
24 Feb, 2022 Operator precedence determines which operator is performed first in an expression with more than one operators with different precedence.For example: Solve 10 + 20 * 30 10 + 20 * 30 is calculated as 10 + (20 * 30) and not as (10 + 20) * 30 Operators Associativity is used when two operators of same pr...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 Feb, 2022" }, { "code": null, "e": 210, "s": 52, "text": "Operator precedence determines which operator is performed first in an expression with more than one operators with different precedence.For example: Solve " }, { "c...
numpy.reshape() in Python
06 Jul, 2022 The numpy.reshape() function shapes an array without changing the data of the array. Syntax: numpy.reshape(array, shape, order = 'C') Parameters : array : [array_like]Input array shape : [int or tuples of int] e.g. if we are arranging an array with 10 elements then shaping it like numpy.reshape(4,...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Jul, 2022" }, { "code": null, "e": 139, "s": 54, "text": "The numpy.reshape() function shapes an array without changing the data of the array." }, { "code": null, "e": 147, "s": 139, "text": "Syntax:" }, { ...
What are non negative real numbers?
30 Nov, 2021 Algebra is a branch of mathematics that is concerned with the analysis of symbols which represent unknown quantities and constants which represent known quantities. The expressions of algebra are made up of terms and each term may consist of variables (an unknown value), coefficient, constants along with m...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Nov, 2021" }, { "code": null, "e": 377, "s": 28, "text": "Algebra is a branch of mathematics that is concerned with the analysis of symbols which represent unknown quantities and constants which represent known quantities. The expres...
How to View Data Stored in Shared Preferences in Android Studio?
24 May, 2021 Shared Preferences in Android is local storage where we can save our data using a key and value pair. It is generally used to store data in users’ devices. Shared Preferences is also used for session management in Android apps where we are using login functionality. In this article, we will take a look at ...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 May, 2021" }, { "code": null, "e": 408, "s": 28, "text": "Shared Preferences in Android is local storage where we can save our data using a key and value pair. It is generally used to store data in users’ devices. Shared Preferences ...
Does BERT Need Clean Data? Part 1: Data Cleaning. | by Alexander Bricken | Towards Data Science
If I describe Beyoncé’s Met Gala dress as a “hurricane”, does Hurricane Beyoncé become a thing? Not interested in cleaning data and just want to learn about the varying levels of data cleaning and how this affects BERT? Skip to Part 2. In this article, we use the Disaster Tweets Competition dataset on Kaggle to learn...
[ { "code": null, "e": 270, "s": 172, "text": "If I describe Beyoncé’s Met Gala dress as a “hurricane”, does Hurricane Beyoncé become a thing?" }, { "code": null, "e": 410, "s": 270, "text": "Not interested in cleaning data and just want to learn about the varying levels of data ...
How to remove certain characters from a string in C++?
In this section, we will see how to remove some characters from a string in C++. In C++ we can do this task very easily using erase() and remove() function. The remove function takes the starting and ending address of the string, and a character that will be removed. Input: A number string “ABAABACCABA” Output: “BBCCB”...
[ { "code": null, "e": 1330, "s": 1062, "text": "In this section, we will see how to remove some characters from a string in C++. In C++ we can do this task very easily using erase() and remove() function. The remove function takes the starting and ending address of the string, and a character that wi...
C++ Memory Library - dynamic_pointer_cast
It returns a copy of sp of the proper type with its stored pointer casted dynamically from U* to T*. Following is the declaration for std::dynamic_pointer_cast. template <class T, class U> shared_ptr<T> dynamic_pointer_cast (const shared_ptr<U>& sp) noexcept; template <class T, class U> shared_ptr<T> dynamic_pointe...
[ { "code": null, "e": 2704, "s": 2603, "text": "It returns a copy of sp of the proper type with its stored pointer casted dynamically from U* to T*." }, { "code": null, "e": 2764, "s": 2704, "text": "Following is the declaration for std::dynamic_pointer_cast." }, { "code":...
fmt.Fprintf() Function in Golang With Examples - GeeksforGeeks
26 Feb, 2021 In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.Fprintf() function in Go language formats according to a format specifier and writes to w. Moreover, this function is defined under the fmt package. Here, you need to import the “fmt”...
[ { "code": null, "e": 25703, "s": 25675, "text": "\n26 Feb, 2021" }, { "code": null, "e": 26053, "s": 25703, "text": "In Go language, fmt package implements formatted I/O with functions analogous to C’s printf() and scanf() function. The fmt.Fprintf() function in Go language forma...
Math.Truncate() Method in C#
The Math.Truncate() method in C# is used to compute an integral part of a number, which is Double or Decimal. public static decimal Truncate(decimal val1) public static double Truncate(double val2) Above, there are two syntaxes. The value val1 is the decimal number to truncate, whereas val2 is the double number to trun...
[ { "code": null, "e": 1172, "s": 1062, "text": "The Math.Truncate() method in C# is used to compute an integral part of a number, which is Double or Decimal." }, { "code": null, "e": 1260, "s": 1172, "text": "public static decimal Truncate(decimal val1)\npublic static double Trunc...
Count number of digits after decimal on dividing a number in C++
We are given two integer numbers let’s say num1 and num2 and the task is to divide the num1 with num2 and calculate the count of digits after decimal on dividing these given numbers. Input − num1 = 2, num2 = 5 Output − count is 1 Explanation − when we divide 2 with 5 i.e. ? = 0.4, so digits after decimal is 1 therefore...
[ { "code": null, "e": 1245, "s": 1062, "text": "We are given two integer numbers let’s say num1 and num2 and the task is to divide the num1 with num2 and calculate the count of digits after decimal on dividing these given numbers." }, { "code": null, "e": 1292, "s": 1245, "text": ...
Exploring the UN General Debates with Dynamic Topic Models | by Luke Lefebure | Towards Data Science
In this article, I introduce the intuition behind Dynamic Topic Models and demonstrate this method’s ability to discover evolving narratives in unstructured text through an application to a corpus of speeches. By reading, I hope you will pick up an understanding of Dynamic Topic Models, the problem that they try to sol...
[ { "code": null, "e": 382, "s": 172, "text": "In this article, I introduce the intuition behind Dynamic Topic Models and demonstrate this method’s ability to discover evolving narratives in unstructured text through an application to a corpus of speeches." }, { "code": null, "e": 676, ...
MySQL truncate text with ellipsis?
You can truncate the text with ellipsis using LENGTH() with CASE statement. If your length is greater than 7 then truncate the text and add some number otherwise print the number as it is. To understand the above syntax, let us create a table. The query to create a table is as follows: mysql> create table TruncateText ...
[ { "code": null, "e": 1251, "s": 1062, "text": "You can truncate the text with ellipsis using LENGTH() with CASE statement. If your length is greater than 7 then truncate the text and add some number otherwise print the number as it is." }, { "code": null, "e": 1349, "s": 1251, "t...
Divide array in two Subsets such that sum of square of sum of both subsets is maximum - GeeksforGeeks
21 Apr, 2021 Given an integer array arr[], the task is to divide this array into two non-empty subsets such that the sum of the square of the sum of both the subsets is maximum and sizes of both the subsets must not differ by more than 1.Examples: Input: arr[] = {1, 2, 3} Output: 26 Explanation: Sum of Subset Pairs a...
[ { "code": null, "e": 24796, "s": 24768, "text": "\n21 Apr, 2021" }, { "code": null, "e": 25033, "s": 24796, "text": "Given an integer array arr[], the task is to divide this array into two non-empty subsets such that the sum of the square of the sum of both the subsets is maximum...
BCD addition of given Decimal numbers - GeeksforGeeks
26 Mar, 2021 Given two numbers A and B, the task is to perform BCD Addition of the given numbers. Examples: Input: A = 12, B = 20 Output: 110010 Explanation: The summation of A and B is 12 + 20 = 32. The binary representation of 3 = 0011 The binary representation of 2 = 0010 Therefore, the BCD Addition is “0011” + “00...
[ { "code": null, "e": 25012, "s": 24984, "text": "\n26 Mar, 2021" }, { "code": null, "e": 25097, "s": 25012, "text": "Given two numbers A and B, the task is to perform BCD Addition of the given numbers." }, { "code": null, "e": 25108, "s": 25097, "text": "Examp...
How to remove arrows/spinners from input type number with CSS?
Following is the code to remove arrows/spinners from input type using CSS − Live Demo <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } input[type...
[ { "code": null, "e": 1138, "s": 1062, "text": "Following is the code to remove arrows/spinners from input type using CSS −" }, { "code": null, "e": 1149, "s": 1138, "text": " Live Demo" }, { "code": null, "e": 1592, "s": 1149, "text": "<!DOCTYPE html>\n<html>\...
What is the use of FileInputStream and FileOutputStream in classes in Java?
Java provides I/O Streams to read and write data where, a Stream represents an input source or an output destination which could be a file, i/o devise, other program etc. There are two types of streams available − InputStream − This is used to read (sequential) data from a source. OutputStream − This is used to write d...
[ { "code": null, "e": 1233, "s": 1062, "text": "Java provides I/O Streams to read and write data where, a Stream represents an input source or an output destination which could be a file, i/o devise, other program etc." }, { "code": null, "e": 1276, "s": 1233, "text": "There are t...
Why we can't initialize static final variable in try/catch block in java?
In Java you can declare three types of variables namely, instance variables, static variables and, local variables. Local variables − Variables defined inside methods, constructors or blocks are called local variables. The variable will be declared and initialized within the method and the variable will be destroyed wh...
[ { "code": null, "e": 1178, "s": 1062, "text": "In Java you can declare three types of variables namely, instance variables, static variables and, local variables." }, { "code": null, "e": 1411, "s": 1178, "text": "Local variables − Variables defined inside methods, constructors o...
Find the remainder when First digit of a number is divided by its Last digit - GeeksforGeeks
21 Apr, 2021 Given a number N, find the remainder when the first digit of N is divided by its last digit.Examples: Input: N = 1234 Output: 1 First digit = 1 Last digit = 4 Remainder = 1 % 4 = 1 Input: N = 5223 Output: 2 First digit = 5 Last digit = 3 Remainder = 5 % 3 = 2 Approach: Find the first digit and the last d...
[ { "code": null, "e": 24751, "s": 24723, "text": "\n21 Apr, 2021" }, { "code": null, "e": 24854, "s": 24751, "text": "Given a number N, find the remainder when the first digit of N is divided by its last digit.Examples: " }, { "code": null, "e": 25013, "s": 24854, ...
Spring Boot - Securing Web Applications
If a Spring Boot Security dependency is added on the classpath, Spring Boot application automatically requires the Basic Authentication for all HTTP Endpoints. The Endpoint “/” and “/home” does not require any authentication. All other Endpoints require authentication. For adding a Spring Boot Security to your Spring B...
[ { "code": null, "e": 3295, "s": 3025, "text": "If a Spring Boot Security dependency is added on the classpath, Spring Boot application automatically requires the Basic Authentication for all HTTP Endpoints. The Endpoint “/” and “/home” does not require any authentication. All other Endpoints require...
Convert an Object into a Vector in R Programming - as.vector() Function - GeeksforGeeks
17 Jun, 2020 as.vector() function in R Language is used to convert an object into a vector. Syntax: as.vector(x) Parameters:x: Object to be converted Example 1: # R program to convert an object to vector # Creating an arrayx <- array(c(2, 3, 4, 7, 2, 5), c(3, 2))x # Calling as.vector() Functionas.vector(x) Output: ...
[ { "code": null, "e": 24851, "s": 24823, "text": "\n17 Jun, 2020" }, { "code": null, "e": 24930, "s": 24851, "text": "as.vector() function in R Language is used to convert an object into a vector." }, { "code": null, "e": 24951, "s": 24930, "text": "Syntax: as....
SQLite - AND & OR Operators
SQLite AND & OR operators are used to compile multiple conditions to narrow down the selected data in an SQLite statement. These two operators are called conjunctive operators. These operators provide a means to make multiple comparisons with different operators in the same SQLite statement. The AND operator allows the...
[ { "code": null, "e": 2815, "s": 2638, "text": "SQLite AND & OR operators are used to compile multiple conditions to narrow down the selected data in an SQLite statement. These two operators are called conjunctive operators." }, { "code": null, "e": 2931, "s": 2815, "text": "These...
C# | How to create a Stack - GeeksforGeeks
18 Feb, 2019 Stack() constructor is used to initialize a new instance of the Stack class which will be empty and will have the default initial capacity. Stack represents a last-in, first out collection of object. It is used when you need last-in, first-out access to items. When you add an item in the list, it is called...
[ { "code": null, "e": 23208, "s": 23180, "text": "\n18 Feb, 2019" }, { "code": null, "e": 23641, "s": 23208, "text": "Stack() constructor is used to initialize a new instance of the Stack class which will be empty and will have the default initial capacity. Stack represents a last...
Program to calculate Area Of Octagon
An octagon is a polygon with eight sides. To calculate the area of octagon the following formula is used, Area of octagon = ((a2*2) / *tan (22.5°)) = ((2*a*a)(1+√2)) Code Logic, The area of a polygon with eight side is calculated by using the above formula. The expression uses sqrt function to find the square root of 2...
[ { "code": null, "e": 1168, "s": 1062, "text": "An octagon is a polygon with eight sides. To calculate the area of octagon the following formula is used," }, { "code": null, "e": 1228, "s": 1168, "text": "Area of octagon = ((a2*2) / *tan (22.5°)) = ((2*a*a)(1+√2))" }, { "c...
Features of Cassandra - GeeksforGeeks
15 Nov, 2021 Apache Cassandra is an open source, user-available, distributed, NoSQL DBMS which is designed to handle large amounts of data across many servers. It provides zero point of failure. Cassandra offers massive support for clusters spanning multiple datacentres. There are some massive features of Cassandra. H...
[ { "code": null, "e": 24329, "s": 24301, "text": "\n15 Nov, 2021" }, { "code": null, "e": 24589, "s": 24329, "text": "Apache Cassandra is an open source, user-available, distributed, NoSQL DBMS which is designed to handle large amounts of data across many servers. It provides zero...
bc command in Linux with examples - GeeksforGeeks
21 Aug, 2021 bc command is used for command line calculator. It is similar to basic calculator by using which we can do basic mathematical calculations. Arithmetic operations are the most basic in any kind of programming language. Linux or Unix operating system provides the bc command and expr command for doing arithme...
[ { "code": null, "e": 24438, "s": 24410, "text": "\n21 Aug, 2021" }, { "code": null, "e": 24859, "s": 24438, "text": "bc command is used for command line calculator. It is similar to basic calculator by using which we can do basic mathematical calculations. Arithmetic operations a...
Read last line from file in PHP
To read last line from file in PHP, the code is as follows − $line = ''; $f = fopen('data.txt', 'r'); $cursor = -1; fseek($f, $cursor, SEEK_END); $char = fgetc($f); //Trim trailing newline characters in the file while ($char === "\n" || $char === "\r") { fseek($f, $cursor--, SEEK_END); $char = fgetc($f); } //Read...
[ { "code": null, "e": 1123, "s": 1062, "text": "To read last line from file in PHP, the code is as follows −" }, { "code": null, "e": 1638, "s": 1123, "text": "$line = '';\n$f = fopen('data.txt', 'r');\n$cursor = -1;\nfseek($f, $cursor, SEEK_END);\n$char = fgetc($f);\n//Trim trail...
How to Convert Decimal to Binary Using Recursion in Python?
Binary equivalent of a decimal number is obtained by printing in reverse order the remainder of successive division by 2. The recursive solution to this conversion is as follows: def tobin(x): strbin='' if x>1: tobin(x//2) print (x%2, end='') num=int(input('enter a number')) tobin(num) To test the...
[ { "code": null, "e": 1241, "s": 1062, "text": "Binary equivalent of a decimal number is obtained by printing in reverse order the remainder of successive division by 2. The recursive solution to this conversion is as follows:" }, { "code": null, "e": 1406, "s": 1241, "text": "def...
Quickly convert Decimal to other bases in Python - GeeksforGeeks
05 Jul, 2017 Given a number in decimal number convert it into binary, octal and hexadecimal number. Here is function to convert decimal to binary, decimal to octal and decimal to hexadecimal. Examples: Input : 55 Output : 55 in Binary : 0b110111 55 in Octal : 0o67 55 in Hexadecimal : 0x37 Input ...
[ { "code": null, "e": 24504, "s": 24476, "text": "\n05 Jul, 2017" }, { "code": null, "e": 24683, "s": 24504, "text": "Given a number in decimal number convert it into binary, octal and hexadecimal number. Here is function to convert decimal to binary, decimal to octal and decimal ...
How to add drag behavior in kivy widget ? - GeeksforGeeks
30 Jun, 2021 In this article, we will develop a GUI window using kivy framework of python, and we will add a Label having drag behavior on this window Note: You can follow the same pattern for implementing drag events on other widgets also. Actually what we are doing is we are using are just using the concept of inheri...
[ { "code": null, "e": 23927, "s": 23899, "text": "\n30 Jun, 2021" }, { "code": null, "e": 24065, "s": 23927, "text": "In this article, we will develop a GUI window using kivy framework of python, and we will add a Label having drag behavior on this window" }, { "code": nul...
F# - Variables
A variable is a name given to a storage area that our programs can manipulate. Each variable has a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable. The let keyword is us...
[ { "code": null, "e": 2460, "s": 2161, "text": "A variable is a name given to a storage area that our programs can manipulate. Each variable has a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set of op...
JavaFX | SplitPane Class - GeeksforGeeks
26 Sep, 2018 SplitPane class is a part of JavaFX. SplitPane class is a control which contains two or more sides separated by a divider. Sides can be dragged by the user to give more space to one of the sides which cause the other side to shrink by an equal amount. SplitPane class inherits Control class. Constructor of ...
[ { "code": null, "e": 23974, "s": 23946, "text": "\n26 Sep, 2018" }, { "code": null, "e": 24266, "s": 23974, "text": "SplitPane class is a part of JavaFX. SplitPane class is a control which contains two or more sides separated by a divider. Sides can be dragged by the user to give...
How to check whether a data frame exists or not in R?
Sometimes we keep writing codes in the programming console and suddenly we need to use something that was used in the upper side of programming console then recalling it becomes a little ambiguous if we forget about it. In this case, we might want to check whether something exists or not and that something could be a d...
[ { "code": null, "e": 1458, "s": 1062, "text": "Sometimes we keep writing codes in the programming console and suddenly we need to use something that was used in the upper side of programming console then recalling it becomes a little ambiguous if we forget about it. In this case, we might want to ch...
How to set NULL values in a table column and insert the same
To set NULL values, set the type as NULL as in the below syntax − yourColumnName dataType NULL; Let us first create a table − mysql> create table DemoTable759 ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, FirstName varchar(100) NULL ); Query OK, 0 rows affected (0.72 sec) Insert some records in the table using in...
[ { "code": null, "e": 1128, "s": 1062, "text": "To set NULL values, set the type as NULL as in the below syntax −" }, { "code": null, "e": 1158, "s": 1128, "text": "yourColumnName dataType NULL;" }, { "code": null, "e": 1188, "s": 1158, "text": "Let us first cr...
Explore and get value out of your raw data: An Introduction to Splunk | by Bruno Amaro Almeida | Towards Data Science
You just got your hands into some raw data files (json, csv, etc). What happens now? How do you make sense of it? You open a console and start using less, grep, jq and other tools. It’s great at start but... complex and hard to do something more than just the basic. Does this sounds familiar? Great! Keep reading and le...
[ { "code": null, "e": 286, "s": 172, "text": "You just got your hands into some raw data files (json, csv, etc). What happens now? How do you make sense of it?" }, { "code": null, "e": 439, "s": 286, "text": "You open a console and start using less, grep, jq and other tools. It’s ...
Maximum distance between two occurrences of same element in array in C
We are given with an array of integers. The array has multiple occurrences of the same elements. The task here is to find the maximum distance between any two same elements of the array. We will pick each element from the array starting from the left. Then we will find the last occurrence of that same number and store ...
[ { "code": null, "e": 1464, "s": 1062, "text": "We are given with an array of integers. The array has multiple occurrences of the same elements. The task here is to find the maximum distance between any two same elements of the array. We will pick each element from the array starting from the left. T...
Python - Find the Levenshtein distance using Enchant - GeeksforGeeks
26 May, 2020 Levenshtein distance between two strings is defined as the minimum number of characters needed to insert, delete or replace in a given string string1 to transform it to another string string2. Examples : Input : string1 = “geek”, string2 = “gesek”Output : 1Explanation : We can convert string1 into str2 by ...
[ { "code": null, "e": 24389, "s": 24361, "text": "\n26 May, 2020" }, { "code": null, "e": 24582, "s": 24389, "text": "Levenshtein distance between two strings is defined as the minimum number of characters needed to insert, delete or replace in a given string string1 to transform ...
Search for partial value match in an Array in PHP
The array_filter function can be used to match a partial value in an array. A callback can be provided, that helps in deciding which elements would remain in the array and which would be removed. When the callback returns false, it means the given element needs to be removed. Below is a code example demonstrating the s...
[ { "code": null, "e": 1258, "s": 1062, "text": "The array_filter function can be used to match a partial value in an array. A callback can be provided, that helps in deciding which elements would remain in the array and which would be removed." }, { "code": null, "e": 1388, "s": 1258,...
How to where Clause in Android sqlite?
Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to access this database, you d...
[ { "code": null, "e": 1457, "s": 1062, "text": "Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the re...
Multiplication Table Generator using Python - GeeksforGeeks
25 Feb, 2021 Prerequisites: Python GUI- Tkinter We all know that Tkinter is the standard GUI library for Python. Python when combined with Tkinter provides a fast and easy way to create GUI applications. In this article, we will learn How to create a Times-table using Tkinter. Approach: Import Tkinter Library Create F...
[ { "code": null, "e": 24392, "s": 24361, "text": " \n25 Feb, 2021\n" }, { "code": null, "e": 24427, "s": 24392, "text": "Prerequisites: Python GUI- Tkinter" }, { "code": null, "e": 24657, "s": 24427, "text": "We all know that Tkinter is the standard GUI library...
DynamoDB - Query Table
Querying a table primarily requires selecting a table, specifying a partition key, and executing the query; with the options of using secondary indexes and performing deeper filtering through scan operations. Utilize the GUI Console, Java, or another option to perform the task. Perform some simple queries using the pre...
[ { "code": null, "e": 2600, "s": 2391, "text": "Querying a table primarily requires selecting a table, specifying a partition key, and executing the query; with the options of using secondary indexes and performing deeper filtering through scan operations." }, { "code": null, "e": 2670, ...
Calculate the Manhattan Distance between two cells of given 2D array - GeeksforGeeks
06 Jan, 2022 Given a 2D array of size M * N and two points in the form (X1, Y1) and (X2 , Y2) where X1 and X2 represents the rows and Y1 and Y2 represents the column. The task is to calculate the Manhattan distance between the given points. Examples: Input: M = 5, N = 5, X1 = 1, Y1 = 2, X2 = 3, Y2 = 3Output: 3Explanat...
[ { "code": null, "e": 24716, "s": 24688, "text": "\n06 Jan, 2022" }, { "code": null, "e": 24945, "s": 24716, "text": "Given a 2D array of size M * N and two points in the form (X1, Y1) and (X2 , Y2) where X1 and X2 represents the rows and Y1 and Y2 represents the column. The task ...
Properties of Asymptotic Notations - GeeksforGeeks
06 Sep, 2019 Prerequisite: Asymptotic NotationsAssuming f(n), g(n) and h(n) be asymptotic functions the mathematical definitions are: If f(n) = Θ(g(n)), then there exists positive constants c1, c2, n0 such that 0 ≤ c1.g(n) ≤ f(n) ≤ c2.g(n), for all n ≥ n0If f(n) = O(g(n)), then there exists positive constants c, n0 suc...
[ { "code": null, "e": 26401, "s": 26373, "text": "\n06 Sep, 2019" }, { "code": null, "e": 26522, "s": 26401, "text": "Prerequisite: Asymptotic NotationsAssuming f(n), g(n) and h(n) be asymptotic functions the mathematical definitions are:" }, { "code": null, "e": 27064...
How to sort a matrix based on one column in R?
Since a matrix contain only numeric values, sorting can be also done for matrices. There might be multiple reasons to sort a matrix such as we want to convert the matrix to a data frame, the data stored in matrix needs to be sorted prior to matrix calculations so that the view of the result after calculations becomes c...
[ { "code": null, "e": 1460, "s": 1062, "text": "Since a matrix contain only numeric values, sorting can be also done for matrices. There might be multiple reasons to sort a matrix such as we want to convert the matrix to a data frame, the data stored in matrix needs to be sorted prior to matrix calcu...
How to calculate elapsed/execution time in Java?
In general, the elapsed time or, execution is the time from the starting point to ending point of an event. Following are various ways to find elapsed time in Java − The currentTimeMillis() method returns the current time in milliseconds. To find the elapsed time for a method you can get the difference between time val...
[ { "code": null, "e": 1228, "s": 1062, "text": "In general, the elapsed time or, execution is the time from the starting point to ending point of an event. Following are various ways to find elapsed time in Java −" }, { "code": null, "e": 1440, "s": 1228, "text": "The currentTimeM...
How to Create an Animated Bar Chart in Jupyter | Towards Data Science
Table of ContentsIntroduction1. Data preparation2. Animated Bar Chart3. A line chartConclusion Every news outlet writes about economic hardships due to COVID-19. The fallout has disproportionally affected black communities. The Federal Reserve Bank of St. Louis (FRED) updated its unemployment rate data. The observation...
[ { "code": null, "e": 142, "s": 47, "text": "Table of ContentsIntroduction1. Data preparation2. Animated Bar Chart3. A line chartConclusion" }, { "code": null, "e": 271, "s": 142, "text": "Every news outlet writes about economic hardships due to COVID-19. The fallout has dispropor...
Pascal - Booleans
Pascal provides data type Boolean that enables the programmers to define, store and manipulate logical entities, such as constants, variables, functions and expressions, etc. Boolean values are basically integer type. Boolean type variables have two pre-defined possible values True and False. The expressions resolving ...
[ { "code": null, "e": 2258, "s": 2083, "text": "Pascal provides data type Boolean that enables the programmers to define, store and manipulate logical entities, such as constants, variables, functions and expressions, etc." }, { "code": null, "e": 2462, "s": 2258, "text": "Boolean...
Ace the System Interview— Design a Chat Application | by Zixuan Zhang | Towards Data Science
Designing chat applications like Slack or Messenger has always been among the top questions asked by system design interviewers. Personally, I’ve run into this problem a few times by now. As new grads/junior SDEa, we are good at implementation, yet designing whole systems is a challenge of its own kind. In this article...
[ { "code": null, "e": 644, "s": 172, "text": "Designing chat applications like Slack or Messenger has always been among the top questions asked by system design interviewers. Personally, I’ve run into this problem a few times by now. As new grads/junior SDEa, we are good at implementation, yet design...
How to convert XML file into array in PHP?
To convert the XML document into PHP array, we have to utilize some PHP functions. The procedure is explained underneath with an example. We have to create an XML file that needs to convert into the array. abc.xml <?xml version='1.0'?> <userdb> <firstname name='Alex'> <symbol>AL</symbol> <code>A</code> ...
[ { "code": null, "e": 1200, "s": 1062, "text": "To convert the XML document into PHP array, we have to utilize some PHP functions. The procedure is explained underneath with an example." }, { "code": null, "e": 1268, "s": 1200, "text": "We have to create an XML file that needs to ...
VB.Net - ProgressBar Control
It represents a Windows progress bar control. It is used to provide visual feedback to your users about the status of some task. It shows a bar that fills in from left to right as the operation progresses. Let's click on a ProgressBar control from the Toolbox and place it on the form. The main properties of a progress ...
[ { "code": null, "e": 2506, "s": 2300, "text": "It represents a Windows progress bar control. It is used to provide visual feedback to your users about the status of some task. It shows a bar that fills in from left to right as the operation progresses." }, { "code": null, "e": 2586, ...
Tryit Editor v3.7
Tryit: HTML attribute quotes
[]
Find the length of a set in Python - GeeksforGeeks
07 Jan, 2022 In Python, a Set is a collection data type that is unordered and mutable. A set cannot have duplicate elements. Here, the task is to find out the number of elements present in a set. See the below examples. Examples: Input: a = {1, 2, 3, 4, 5, 6} Output: 6 Input: a = {'Geeks', 'For'} Output: 2 The idea i...
[ { "code": null, "e": 24176, "s": 24148, "text": "\n07 Jan, 2022" }, { "code": null, "e": 24383, "s": 24176, "text": "In Python, a Set is a collection data type that is unordered and mutable. A set cannot have duplicate elements. Here, the task is to find out the number of element...
Limitations of ARIMA: Dealing with Outliers | by Michael Grogan | Towards Data Science
ARIMA models can be quite adept when it comes to modelling the overall trend of a series along with seasonal patterns. In a previous article titled SARIMA: Forecasting Seasonal Data with Python and R, the use of an ARIMA model for forecasting maximum air temperature values for Dublin, Ireland was used. The results show...
[ { "code": null, "e": 290, "s": 171, "text": "ARIMA models can be quite adept when it comes to modelling the overall trend of a series along with seasonal patterns." }, { "code": null, "e": 475, "s": 290, "text": "In a previous article titled SARIMA: Forecasting Seasonal Data with...
Largest lexicographical string with at most K consecutive elements - GeeksforGeeks
24 Feb, 2022 Given a string S, the task is to find the largest lexicographical string with no more than K consecutive occurrence of an element by either re-arranging or deleting the elements.Examples: Input: S = “baccc” K = 2 Output: Result = “ccbca” Explanation: Since K=2, a maximum of 2 same characters can be placed...
[ { "code": null, "e": 24299, "s": 24271, "text": "\n24 Feb, 2022" }, { "code": null, "e": 24488, "s": 24299, "text": "Given a string S, the task is to find the largest lexicographical string with no more than K consecutive occurrence of an element by either re-arranging or deletin...
Capturing JavaScript error in Selenium.
We can capture Javascript error in Selenium. This type of error appears at the Console Tab on opening the Developer tools in the browser. This can occur due to some functional issue in the page or due to extra logs which may cause performance issues. We can handle the Javascript errors with the driver object and manage...
[ { "code": null, "e": 1313, "s": 1062, "text": "We can capture Javascript error in Selenium. This type of error appears at the Console Tab on opening the Developer tools in the browser. This can occur due to some functional issue in the page or due to extra logs which may cause performance issues." ...
Bootstrap 4 | Panels - GeeksforGeeks
01 Sep, 2021 When we have to quote some content on a webpage, we can use a panel. We place the content inbox with some padding around it. A bootstrap panel is indicated with a “panel” class. Example: This example describes the basic code to make a panel. HTML <!DOCTYPE html><html lang="en"> <head> <meta charset="UTF...
[ { "code": null, "e": 28385, "s": 28357, "text": "\n01 Sep, 2021" }, { "code": null, "e": 28563, "s": 28385, "text": "When we have to quote some content on a webpage, we can use a panel. We place the content inbox with some padding around it. A bootstrap panel is indicated with a ...
Sequence Unpacking in Python. Understanding Python Sequence Unpacking | by Sadrach Pierre, Ph.D. | Towards Data Science
Sequence unpacking in python allows you to take objects in a collection and store them in variables for later use. This is particularly useful when a function or method returns a sequence of objects. In this post, we will discuss sequence unpacking in python. Let’s get started! A key feature of python is that any seque...
[ { "code": null, "e": 431, "s": 171, "text": "Sequence unpacking in python allows you to take objects in a collection and store them in variables for later use. This is particularly useful when a function or method returns a sequence of objects. In this post, we will discuss sequence unpacking in pyt...
Identify and mark unmatched parenthesis in an expression - GeeksforGeeks
31 Aug, 2021 Given an expression, find and mark matched and unmatched parenthesis in it. We need to replace all balanced opening parenthesis with 0, balanced closing parenthesis with 1, and all unbalanced with -1.Examples: Input : ((a) Output : -10a1 Input : (a)) Output : 0a1-1 Input : (((abc))((d))))) Output : 0...
[ { "code": null, "e": 24686, "s": 24658, "text": "\n31 Aug, 2021" }, { "code": null, "e": 24898, "s": 24686, "text": "Given an expression, find and mark matched and unmatched parenthesis in it. We need to replace all balanced opening parenthesis with 0, balanced closing parenthesi...
D3.js zoom() Function - GeeksforGeeks
09 Sep, 2020 The d3.zoom() Function in D3.js is used to create a new zoom behaviour. It is used to apply the zoom transformation on a selected element. Syntax: d3.zoom(); Parameters: This function does not accept any parameter. Return Value: This function returns the zoom behaviour. Below programs illustrate the d3.zoo...
[ { "code": null, "e": 26012, "s": 25984, "text": "\n09 Sep, 2020" }, { "code": null, "e": 26151, "s": 26012, "text": "The d3.zoom() Function in D3.js is used to create a new zoom behaviour. It is used to apply the zoom transformation on a selected element." }, { "code": nu...
Python – List product excluding duplicates
06 Oct, 2021 This article focuses on one of the operation of getting the unique list from a list that contains a possible duplicated and finding its product. This operations has large no. of applications and hence it’s knowledge is good to have.Method 1 : Naive method In naive method, we simply traverse the list and ap...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Oct, 2021" }, { "code": null, "e": 529, "s": 52, "text": "This article focuses on one of the operation of getting the unique list from a list that contains a possible duplicated and finding its product. This operations has large no....
Affinity Propagation in ML | To find the number of clusters - GeeksforGeeks
14 May, 2019 Affinity Propagation creates clusters by sending messages between data points until convergence. Unlike clustering algorithms such as k-means or k-medoids, affinity propagation does not require the number of clusters to be determined or estimated before running the algorithm, for this purpose the two impor...
[ { "code": null, "e": 24344, "s": 24316, "text": "\n14 May, 2019" }, { "code": null, "e": 24892, "s": 24344, "text": "Affinity Propagation creates clusters by sending messages between data points until convergence. Unlike clustering algorithms such as k-means or k-medoids, affinit...
Python - Convert a list of lists into tree-like dict
Given a nested list we want to convert it to a dictionary whose elements can be considered as part of a tree data structure. In this article we will see the two approaches to convert a nested list into to add dictionary whose elements represent a tree like data structure. We reverse the items in the list aby slicing an...
[ { "code": null, "e": 1335, "s": 1062, "text": "Given a nested list we want to convert it to a dictionary whose elements can be considered as part of a tree data structure. In this article we will see the two approaches to convert a nested list into to add dictionary whose elements represent a tree l...
GATE | GATE CS 2010 | Question 65 - GeeksforGeeks
28 Jun, 2021 A system has n resources R0,...,Rn-1,and k processes P0,....Pk-1.The implementation of the resource request logic of each process Pi is as follows: if (i % 2 == 0) { if (i < n) request Ri if (i+2 < n) request Ri+2 } else { if (i < n) request Rn-i if (i+2 < n) request Rn-i-2 } In w...
[ { "code": null, "e": 24540, "s": 24512, "text": "\n28 Jun, 2021" }, { "code": null, "e": 24689, "s": 24540, "text": "A system has n resources R0,...,Rn-1,and k processes P0,....Pk-1.The implementation of the resource request logic of each process Pi is as follows: " }, { ...
Find a triplet that sum to a given value in C++
In this tutorial, we are going to write a program that finds the triplet in the array whose sum is equal to the given number. Let's see the steps to solve the problem. Create the array with dummy data. Create the array with dummy data. Write three inner loops for three elements which iterate until the end of the array....
[ { "code": null, "e": 1188, "s": 1062, "text": "In this tutorial, we are going to write a program that finds the triplet in the array whose sum is equal to the given number." }, { "code": null, "e": 1230, "s": 1188, "text": "Let's see the steps to solve the problem." }, { ...
Getting the Cursor position in Tkinter Entry widget
We are already familiar with input forms where various single Entry fields are created to capture the user input. With Tkinter, we can also create a single input field using the Entry widget. Each character in the Entry field that the user enters is indexed. Thus, you can retrieve this index to get the current position...
[ { "code": null, "e": 1525, "s": 1062, "text": "We are already familiar with input forms where various single Entry fields are created to capture the user input. With Tkinter, we can also create a single input field using the Entry widget. Each character in the Entry field that the user enters is ind...
JavaScript JSON.stringify() with Example
The JavaScript JSON.stringify() is used for converting JavaScript object into a string. It is particularly useful when sending data to a web server. Following is the code for JSON stringify() method − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device...
[ { "code": null, "e": 1211, "s": 1062, "text": "The JavaScript JSON.stringify() is used for converting JavaScript object into a string. It is particularly useful when sending data to a web server." }, { "code": null, "e": 1263, "s": 1211, "text": "Following is the code for JSON st...
How to select last 10 rows from MySQL?
To select last 10 rows from MySQL, we can use a subquery with SELECT statement and Limit concept. The following is an example. Creating a table. mysql> create table Last10RecordsDemo -> ( -> id int, -> name varchar(100) -> ); Query OK, 0 rows affected (0.75 sec) Inserting records into the table. mysql> inse...
[ { "code": null, "e": 1189, "s": 1062, "text": "To select last 10 rows from MySQL, we can use a subquery with SELECT statement and Limit concept. The following is an example." }, { "code": null, "e": 1207, "s": 1189, "text": "Creating a table." }, { "code": null, "e": ...
What are the Selection Modes in a JTable with Java?
Selection modes sets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals. Let us see the selection modes one by one − The following is an example of Single Selection mode for a JTable. It allows you to select one cell at a time − package my; import java.awt.Co...
[ { "code": null, "e": 1240, "s": 1062, "text": "Selection modes sets the table's selection mode to allow only single selections, a single contiguous interval, or multiple intervals. Let us see the selection modes one by one −" }, { "code": null, "e": 1352, "s": 1240, "text": "The ...
A Keras-Based Autoencoder for Anomaly Detection in Sequences | by Alon Agmon | Towards Data Science
Suppose that you have a very long list of string sequences, such as a list of amino acid structures (‘PHE-SER-CYS’, ‘GLN-ARG-SER’,...), product serial numbers (‘AB121E’, ‘AB323’, ‘DN176’...), or users UIDs, and you are required to create a validation process of some kind that will detect anomalies in this sequence. An ...
[ { "code": null, "e": 812, "s": 172, "text": "Suppose that you have a very long list of string sequences, such as a list of amino acid structures (‘PHE-SER-CYS’, ‘GLN-ARG-SER’,...), product serial numbers (‘AB121E’, ‘AB323’, ‘DN176’...), or users UIDs, and you are required to create a validation proc...
Console.Clear Method in C#
The Console.Clear method in C# is used to clear the console buffer and corresponding console window of display information. Following is the syntax − public static void Clear (); Let us now see an example before implementing the Console.Clear method − using System; public class Demo { public static void Main(){ ...
[ { "code": null, "e": 1186, "s": 1062, "text": "The Console.Clear method in C# is used to clear the console buffer and corresponding console window of display information." }, { "code": null, "e": 1212, "s": 1186, "text": "Following is the syntax −" }, { "code": null, ...
How to multiply all values in a list by a number in R?
To multiply all values in a list by a number, we can use lapply function. Inside the lapply function we would need to supply multiplication sign that is * with the list name and the number by which we want to multiple all the list values. For example, if we have a list called LIST and we want to multiply each value in ...
[ { "code": null, "e": 1453, "s": 1062, "text": "To multiply all values in a list by a number, we can use lapply function. Inside the lapply function we would need to supply multiplication sign that is * with the list name and the number by which we want to multiple all the list values. For example, i...
NumPy Array Processing With Cython: 5000x Faster | by Ahmed Gad | Towards Data Science
This tutorial will show you how to speed up the processing of NumPy arrays using Cython. By explicitly specifying the data types of variables in Python, Cython can give drastic speed increases at runtime. The sections covered in this tutorial are as follows: Looping through NumPy arrays The Cython type for NumPy arrays...
[ { "code": null, "e": 377, "s": 172, "text": "This tutorial will show you how to speed up the processing of NumPy arrays using Cython. By explicitly specifying the data types of variables in Python, Cython can give drastic speed increases at runtime." }, { "code": null, "e": 431, "s":...
A guy with a mental problem | Practice | GeeksforGeeks
A guy has to reach his home and does not want to be late. He takes train to reach home. He has a mental illness, so he always switches train at every station. For eg: If he starts with train A then at station 2 he will switch his train to train B and so on. Similarly, if he starts with train B then he will switch to tr...
[ { "code": null, "e": 656, "s": 226, "text": "A guy has to reach his home and does not want to be late. He takes train to reach home. He has a mental illness, so he always switches train at every station.\nFor eg: If he starts with train A then at station 2 he will switch his train to train B and so ...
Creating WYSIWYG Document Editor | Natural Language Programming - GeeksforGeeks
01 Mar, 2018 When my elder son and I finished writing our Plain English compiler, we decided to test its usefulness by adding a what-you-see-is-what-you-get document editor that we could then use to document our system. Two birds with one stone! Document View We call this facility the Writer. This is what our instructi...
[ { "code": null, "e": 25136, "s": 25108, "text": "\n01 Mar, 2018" }, { "code": null, "e": 25369, "s": 25136, "text": "When my elder son and I finished writing our Plain English compiler, we decided to test its usefulness by adding a what-you-see-is-what-you-get document editor tha...
Multivariate outlier detection in Python | by Philip Wilkinson | Towards Data Science
In my previous medium article I introduced five different methods for Univariate outlier detection: Distribution plot, Z-score, Boxplot, Tukey fences and clustering. This highlighted the fact that several different methods can be used to detect outliers in your data, but that each of these can lead to different conclus...
[ { "code": null, "e": 669, "s": 172, "text": "In my previous medium article I introduced five different methods for Univariate outlier detection: Distribution plot, Z-score, Boxplot, Tukey fences and clustering. This highlighted the fact that several different methods can be used to detect outliers i...
Find the Number of Substrings of One String Present in Other using C++
In this article, we are given two strings, and we need to find out how many substrings of the 1st string can be found in the 2nd string(the exact substring can occur multiple times). For example Input : string1 = “fogl” string2 = “google” Output : 6 Explanation : substrings of string1 present in string2 are [ “o”, “...
[ { "code": null, "e": 1257, "s": 1062, "text": "In this article, we are given two strings, and we need to find out how many substrings of the 1st string can be found in the 2nd string(the exact substring can occur multiple times). For example" }, { "code": null, "e": 1558, "s": 1257, ...
Image Augmentation for Deep Learning | by Suki Lau | Towards Data Science
Deep networks need large amount of training data to achieve good performance. To build a powerful image classifier using very little training data, image augmentation is usually required to boost the performance of deep networks. Image augmentation artificially creates training images through different ways of processi...
[ { "code": null, "e": 464, "s": 47, "text": "Deep networks need large amount of training data to achieve good performance. To build a powerful image classifier using very little training data, image augmentation is usually required to boost the performance of deep networks. Image augmentation artific...
C++ | Virtual Functions | Question 6
28 Jun, 2021 Predict the output of following program. #include<iostream>using namespace std;class Base{public: virtual void show() = 0;}; class Derived : public Base { }; int main(void){ Derived q; return 0;} (A) Compiler Error: there cannot be an empty derived class(B) Compiler Error: Derived is abstract(C)...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Jun, 2021" }, { "code": null, "e": 93, "s": 52, "text": "Predict the output of following program." }, { "code": "#include<iostream>using namespace std;class Base{public: virtual void show() = 0;}; class Derived : public ...
Template Metaprogramming in C++
19 Aug, 2021 Predict the output of following C++ program. CPP #include <iostream>using namespace std; template<int n> struct funStruct{ enum { val = 2*funStruct<n-1>::val };}; template<> struct funStruct<0>{ enum { val = 1 };}; int main(){ cout << funStruct<8>::val << endl; return 0;} Output: 256 The prog...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Aug, 2021" }, { "code": null, "e": 98, "s": 52, "text": "Predict the output of following C++ program. " }, { "code": null, "e": 102, "s": 98, "text": "CPP" }, { "code": "#include <iostream>using namespace...
How to Pad an Integer Number With Leading Zeroes in C#?
26 May, 2020 Given a Number N, the task is to pad this number with P number of leading zeros in C#. Examples: Input: N = 123 , P = 4 Output: 0123 Input: N = -3 , P = 5 Output: -00003 Method 1: Using string Format() method : The Format() method is used to replace one or more format items in the specified string with...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 May, 2020" }, { "code": null, "e": 115, "s": 28, "text": "Given a Number N, the task is to pad this number with P number of leading zeros in C#." }, { "code": null, "e": 125, "s": 115, "text": "Examples:" }, {...
Postfix to Prefix Conversion
24 May, 2022 Postfix: An expression is called the postfix expression if the operator appears in the expression after the operands. Simply of the form (operand1 operand2 operator). Example : AB+CD-* (Infix : (A+B) * (C-D) ) Prefix : An expression is called the prefix expression if the operator appears in the expression ...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 May, 2022" }, { "code": null, "e": 262, "s": 52, "text": "Postfix: An expression is called the postfix expression if the operator appears in the expression after the operands. Simply of the form (operand1 operand2 operator). Example...
Python | Reverse each word in a sentence
29 Jun, 2022 Given a long sentence, reverse each word of the sentence individually in the sentence itself. Examples: Input : Geeks For Geeks is good to learn Output : skeeG roF skeeG si doog ot nrael Input : Split Reverse Join Output : tilpS esreveR nioJ We shall use Python’s built in library function to reverse each ...
[ { "code": null, "e": 54, "s": 26, "text": "\n29 Jun, 2022" }, { "code": null, "e": 158, "s": 54, "text": "Given a long sentence, reverse each word of the sentence individually in the sentence itself. Examples:" }, { "code": null, "e": 297, "s": 158, "text": "I...
Performing Database Operations in Java | SQL CREATE, INSERT, UPDATE, DELETE and SELECT
16 Jun, 2022 This article is going to help you in learning how to do basic database operations using JDBC (Java Database Connectivity) API. These basic operations are INSERT, SELECT, UPDATE and DELETE statements in SQL language. Although the target database system is Oracle Database, but the same techniques can be appl...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Jun, 2022" }, { "code": null, "e": 523, "s": 54, "text": "This article is going to help you in learning how to do basic database operations using JDBC (Java Database Connectivity) API. These basic operations are INSERT, SELECT, UPDA...