title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Tensorflow tf.add() Function - GeeksforGeeks
04 Mar, 2021 The tf.add() function returns the addition of two tf.Tensor objects element wise. The tf.Tensor object represents the multidimensional array of numbers. Syntax: tf.add( a, b ) Parameters: a: It contains the first tf.Tensor object that is to be added. The value of this parameter can be tf.TensorTypedArray|...
[ { "code": null, "e": 26545, "s": 26517, "text": "\n04 Mar, 2021" }, { "code": null, "e": 26698, "s": 26545, "text": "The tf.add() function returns the addition of two tf.Tensor objects element wise. The tf.Tensor object represents the multidimensional array of numbers." }, { ...
Python - Interconvert Tuple to Byte Integer - GeeksforGeeks
03 Jul, 2020 Sometimes, while working with Python data, we can have a problem in which we need to perform conversion of tuple values, into combined byte and then to integer and vice-versa. This kind of problem can have application in data domains. Let’s discuss certain ways in which this task can be performed. Input : ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n03 Jul, 2020" }, { "code": null, "e": 25836, "s": 25537, "text": "Sometimes, while working with Python data, we can have a problem in which we need to perform conversion of tuple values, into combined byte and then to integer and...
DXC Technology Interview Experience - GeeksforGeeks
27 Jul, 2021 DXC Technology Campus Drive was held in the month of July 21 (For the batch of 2022 i.e final year students) for the full-time employees as Associate Professional-Software Engineering. All rounds were held online. ROUND 1: This was an Aptitude based exam with the following sections- Logical Reasoning, Quan...
[ { "code": null, "e": 26261, "s": 26233, "text": "\n27 Jul, 2021" }, { "code": null, "e": 26446, "s": 26261, "text": "DXC Technology Campus Drive was held in the month of July 21 (For the batch of 2022 i.e final year students) for the full-time employees as Associate Professional-...
Shuffle Elements of ArrayList in Java - GeeksforGeeks
07 Jan, 2021 Shuffling means changing the positions of ArrayList elements randomly. After shuffling, they will be in different order. Following is the example of Shuffling ArrayList elements. Ways to shuffle elements of ArrayList: Using Random classUsing Collections.shuffle() Using Random class Using Collections.shuff...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n07 Jan, 2021" }, { "code": null, "e": 25347, "s": 25225, "text": "Shuffling means changing the positions of ArrayList elements randomly. After shuffling, they will be in different order. " }, { "code": null, "e": 2540...
Multiple Inheritance in Python - GeeksforGeeks
22 Feb, 2022 Inheritance is the mechanism to achieve the re-usability of code as one class(child class) can derive the properties of another class(parent class). It also provides transitivity ie. if class C inherits from P then all the sub-classes of C would also inherit from P. Multiple Inheritance When a class is de...
[ { "code": null, "e": 25375, "s": 25347, "text": "\n22 Feb, 2022" }, { "code": null, "e": 25643, "s": 25375, "text": "Inheritance is the mechanism to achieve the re-usability of code as one class(child class) can derive the properties of another class(parent class). It also provid...
Print BST elements in given range | Practice | GeeksforGeeks
Given a Binary Search Tree and a range [low, high]. Find all the numbers in the BST that lie in the given range. Note: Element greater than or equal to root go to the right side. Example 1: Input: 17 / \ 4 18 / \ 2 9 l = 4, h = 24 Output: 4 9 17 18 Example 2: Input: 16 / ...
[ { "code": null, "e": 417, "s": 238, "text": "Given a Binary Search Tree and a range [low, high]. Find all the numbers in the BST that lie in the given range.\nNote: Element greater than or equal to root go to the right side." }, { "code": null, "e": 428, "s": 417, "text": "Exampl...
Recursive function to check if a string is palindrome - GeeksforGeeks
05 Jan, 2022 Given a string, write a recursive function that checks if the given string is a palindrome, else, not a palindrome. Examples: Input : malayalam Output : Yes Reverse of malayalam is also malayalam. Input : max Output : No Reverse of max is not max. We have discussed an iterative function here. The idea ...
[ { "code": null, "e": 26161, "s": 26133, "text": "\n05 Jan, 2022" }, { "code": null, "e": 26278, "s": 26161, "text": "Given a string, write a recursive function that checks if the given string is a palindrome, else, not a palindrome. " }, { "code": null, "e": 26289, ...
Divisibility by 64 with removal of bits allowed - GeeksforGeeks
27 Apr, 2021 Given a binary string, we need to check whether that number is divisible by 64 or not after removing of some bits. If yes then print “possible” else “not possible”. We cannot make number 0 to make it divisible.Example : Input: 100010001 Output: Possible Explanation: We can get string 1 000 000 after re...
[ { "code": null, "e": 26279, "s": 26251, "text": "\n27 Apr, 2021" }, { "code": null, "e": 26501, "s": 26279, "text": "Given a binary string, we need to check whether that number is divisible by 64 or not after removing of some bits. If yes then print “possible” else “not possible”...
Python | Ways to create a dictionary of Lists - GeeksforGeeks
11 Mar, 2019 Till now, we have seen the ways to creating dictionary in multiple ways and different operations on the key and values in dictionary. Now, let’s see different ways of creating a dictionary of list. Note that the restriction with keys in Python dictionary is only immutable data types can be used as keys, wh...
[ { "code": null, "e": 25488, "s": 25460, "text": "\n11 Mar, 2019" }, { "code": null, "e": 25686, "s": 25488, "text": "Till now, we have seen the ways to creating dictionary in multiple ways and different operations on the key and values in dictionary. Now, let’s see different ways...
Lagrange Multipliers - GeeksforGeeks
01 Oct, 2019 One of the major problems that engineers face is the problem of optimization of a certain function. Mathematics provides us with a beautiful way to solve such problems. This method is known as the Method of Lagrange Multipliers. So how and when to apply? There are certain conditions.Suppose you have the fo...
[ { "code": null, "e": 26163, "s": 26135, "text": "\n01 Oct, 2019" }, { "code": null, "e": 26392, "s": 26163, "text": "One of the major problems that engineers face is the problem of optimization of a certain function. Mathematics provides us with a beautiful way to solve such prob...
How does rem differ from em in CSS ? - GeeksforGeeks
08 Nov, 2021 In this article, we will learn about rem & em in CSS, how they differs from each other. The em and rem are the relative length CSS font-size units that can be used in CSS documents to make a specific element’s font size relative to its parents. The em is a CSS font-size unit relative to its directly linked...
[ { "code": null, "e": 26621, "s": 26593, "text": "\n08 Nov, 2021" }, { "code": null, "e": 26866, "s": 26621, "text": "In this article, we will learn about rem & em in CSS, how they differs from each other. The em and rem are the relative length CSS font-size units that can be used...
Solidity - Inheritance - GeeksforGeeks
11 May, 2022 Inheritance is one of the most important features of the object-oriented programming language. It is a way of extending the functionality of a program, used to separate the code, reduces the dependency, and increases the re-usability of the existing code. Solidity supports inheritance between smart contrac...
[ { "code": null, "e": 25625, "s": 25597, "text": "\n11 May, 2022" }, { "code": null, "e": 26353, "s": 25625, "text": "Inheritance is one of the most important features of the object-oriented programming language. It is a way of extending the functionality of a program, used to sep...
Multidimensional Arrays in C / C++ - GeeksforGeeks
20 Oct, 2021 Array- Basics In C/C++, we can define multidimensional arrays in simple words as an array of arrays. Data in multidimensional arrays are stored in tabular form (in row-major order). The general form of declaring N-dimensional arrays: data_type array_name[size1][size2]....[sizeN]; data_type: Type of dat...
[ { "code": null, "e": 28205, "s": 28177, "text": "\n20 Oct, 2021" }, { "code": null, "e": 28441, "s": 28205, "text": "Array- Basics In C/C++, we can define multidimensional arrays in simple words as an array of arrays. Data in multidimensional arrays are stored in tabular form (in...
java.rmi.RMISecurityManager Class in Java - GeeksforGeeks
16 Sep, 2021 The RMISecurityManager enforces the security policy for classes that are loaded as stubs for remote objects, by overriding all of the relevant access-check methods from the SecurityManager. By default, stub objects are only allowed to perform class definition and class access operations. Note: If the loc...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n16 Sep, 2021" }, { "code": null, "e": 25515, "s": 25225, "text": "The RMISecurityManager enforces the security policy for classes that are loaded as stubs for remote objects, by overriding all of the relevant access-check methods...
Python - Validate String date format - GeeksforGeeks
11 Aug, 2021 Given a date format and a string date, the task is to write a python program to check if the date is valid and matches the format. Examples: Input : test_str = ’04-01-1997′, format = “%d-%m-%Y” Output : True Explanation : Formats match with date. Input : test_str = ’04-14-1997′, format = “%d-%m-%Y” Output ...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n11 Aug, 2021" }, { "code": null, "e": 25668, "s": 25537, "text": "Given a date format and a string date, the task is to write a python program to check if the date is valid and matches the format." }, { "code": null, ...
Find the integer points (x, y) with Manhattan distance atleast N - GeeksforGeeks
03 Mar, 2022 Given a number N, the task is to find the integer points (x, y) such that 0 <= x, y <= N and Manhattan distance between any two points will be atleast N.Examples: Input: N = 3 Output: (0, 0) (0, 3) (3, 0) (3, 3) Input: N = 4 Output: (0, 0) (0, 4) (4, 0) (4, 4) (2, 2) Approach: Manhattan Distance bet...
[ { "code": null, "e": 27059, "s": 27031, "text": "\n03 Mar, 2022" }, { "code": null, "e": 27224, "s": 27059, "text": "Given a number N, the task is to find the integer points (x, y) such that 0 <= x, y <= N and Manhattan distance between any two points will be atleast N.Examples: ...
HTML | DOM Input FileUpload value Property - GeeksforGeeks
11 Oct, 2019 The Input FileUpload value Property is used to returns the path or the name of the file selected with the element.This property is used to return the name of the selected file with a fake path in IE, Google Chrome, and Opera, and return the name of the selected file in Firefox and Safari. This property is ...
[ { "code": null, "e": 26088, "s": 26060, "text": "\n11 Oct, 2019" }, { "code": null, "e": 26435, "s": 26088, "text": "The Input FileUpload value Property is used to returns the path or the name of the file selected with the element.This property is used to return the name of the s...
Implement Secure Hashing Algorithm - 512 ( SHA-512 ) as Functional Programming Paradigm - GeeksforGeeks
24 Mar, 2022 Given a string S of length N, the task is to find the SHA-512 Hash Value of the given string S. Examples: Input: S = “GeeksforGeeks”Output: acc10c4e0b38617f59e88e49215e2e894afaee5ec948c2af6f44039f03c9fe47a9210e01d5cd926c142bdc9179c2ad30f927a8faf69421ff60a5eaddcf8cb9c Input: S = “hello world”Output:309ecc48...
[ { "code": null, "e": 25942, "s": 25914, "text": "\n24 Mar, 2022" }, { "code": null, "e": 26038, "s": 25942, "text": "Given a string S of length N, the task is to find the SHA-512 Hash Value of the given string S." }, { "code": null, "e": 26048, "s": 26038, "te...
Difference between var keyword and short declaration operator in Golang - GeeksforGeeks
11 Jun, 2020 A variable is a storage location or place holder used for holding the value. It allows us to manipulate and retrieve the stored information. There are two ways to declare the variables in Golan which are as follows: Using var keyword Using a short declaration operator (:=) Example 1: In this program you ca...
[ { "code": null, "e": 25663, "s": 25635, "text": "\n11 Jun, 2020" }, { "code": null, "e": 25879, "s": 25663, "text": "A variable is a storage location or place holder used for holding the value. It allows us to manipulate and retrieve the stored information. There are two ways to ...
Kotlin mutableListOf() - GeeksforGeeks
04 Jul, 2020 In Kotlin, mutableListOf() method is used to instantiate MutableList Interface. MutableList class is used to create mutable lists in which the elements can be added or removed. The method mutableListOf() returns an instance of MutableList Interface and takes the array of a particular type or mixed (depends...
[ { "code": null, "e": 24518, "s": 24490, "text": "\n04 Jul, 2020" }, { "code": null, "e": 24896, "s": 24518, "text": "In Kotlin, mutableListOf() method is used to instantiate MutableList Interface. MutableList class is used to create mutable lists in which the elements can be adde...
Highest Rated ML Projects on Github | by Rishi Sidhu | Towards Data Science
Machine learning, as a field, is growing at a breakneck speed. Github is that whiteboard which the whole world is watching. Top quality code is being regularly posted on that infinite board of wisdom. It is obviously impossible to track all things that go on in the world of machine learning but Github has a star-rating...
[ { "code": null, "e": 373, "s": 172, "text": "Machine learning, as a field, is growing at a breakneck speed. Github is that whiteboard which the whole world is watching. Top quality code is being regularly posted on that infinite board of wisdom." }, { "code": null, "e": 656, "s": 373...
C# | Dictionary.Remove Method - GeeksforGeeks
01 Feb, 2019 This method is used to remove the value with the specified key from the Dictionary<TKey,TValue>. Syntax: public bool Remove (TKey key); Return Value: This method returns true if the element is successfully found and removed; otherwise it returns false. This method returns false if key is not found in the ...
[ { "code": null, "e": 24717, "s": 24689, "text": "\n01 Feb, 2019" }, { "code": null, "e": 24814, "s": 24717, "text": "This method is used to remove the value with the specified key from the Dictionary<TKey,TValue>." }, { "code": null, "e": 24822, "s": 24814, "t...
Running Chi-Square Tests with Die Roll Data in Python | by Jake Huneycutt | Towards Data Science
Sometime in the early part of this decade, I caught onto the board gaming craze. Every month or so, I’d scour through BoardGameGeek’s (“BGG”) highest rated games for new board games to buy. There are literally tens of thousands of board games listed BGG, many with reviews and critiques. My favorite strategy game is not...
[ { "code": null, "e": 618, "s": 171, "text": "Sometime in the early part of this decade, I caught onto the board gaming craze. Every month or so, I’d scour through BoardGameGeek’s (“BGG”) highest rated games for new board games to buy. There are literally tens of thousands of board games listed BGG, ...
How to Show all the previously connected WiFi Networks using CMD in Windows? - GeeksforGeeks
12 Jun, 2020 Wi-Fi(Wireless Fidelity) Launched in September 1997 is affiliated with WLAN (Wireless Local Area Network).It is a wireless communication technology that uses radio waves to provide a high-speed network and Internet connection.Sometimes there is a need to know the previously connected WiFi networks to get d...
[ { "code": null, "e": 24593, "s": 24565, "text": "\n12 Jun, 2020" }, { "code": null, "e": 25063, "s": 24593, "text": "Wi-Fi(Wireless Fidelity) Launched in September 1997 is affiliated with WLAN (Wireless Local Area Network).It is a wireless communication technology that uses radio...
How to set the margin of ImageView programmatically in Android using Kotlin ?
This example demonstrates how to set the margin of ImageView programmatically in Android using Kotlin. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" enc...
[ { "code": null, "e": 1165, "s": 1062, "text": "This example demonstrates how to set the margin of ImageView programmatically in Android using Kotlin." }, { "code": null, "e": 1294, "s": 1165, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and f...
Align Widget in Flutter - GeeksforGeeks
03 Jun, 2021 Align Widget is the widget that is used to align its child within itself and optionally sizes itself based on the child’s size. Align Widget is quite flexible and can change its size according to the size of its child. Constructor of Align class: Syntax: Align({Key key, AlignmentGeometry alignment: Alignm...
[ { "code": null, "e": 23930, "s": 23902, "text": "\n03 Jun, 2021" }, { "code": null, "e": 24149, "s": 23930, "text": "Align Widget is the widget that is used to align its child within itself and optionally sizes itself based on the child’s size. Align Widget is quite flexible and ...
How to copy files to a new directory using Python?
The shutil module provides functions for copying files, as well as entire folders. For copying multiple files at once, you'll have to have a list of all files you want to copy and loop over them to copy them. Calling shutil.copy(source, destination) will copy the file at the path source to the folder at the path destin...
[ { "code": null, "e": 1271, "s": 1062, "text": "The shutil module provides functions for copying files, as well as entire folders. For copying multiple files at once, you'll have to have a list of all files you want to copy and loop over them to copy them." }, { "code": null, "e": 1590, ...
How to identify elements based on text visible on page in Selenium?
To identify elements based on text visible on page, text() method is used in xpath. Syntax − driver.findElement(By.xpath("//tagname[text()=’value’]")) import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.c...
[ { "code": null, "e": 1146, "s": 1062, "text": "To identify elements based on text visible on page, text() method is used in xpath." }, { "code": null, "e": 1155, "s": 1146, "text": "Syntax −" }, { "code": null, "e": 1213, "s": 1155, "text": "driver.findElement...
How to convert a Date value to string in JDBC?
The toString() method of the java.sql.Date class returns the escape format: yyyy-mm-dd of the date represented by the current date object. Using this method you can convert a Date object to a String. Date date = rs.getDate("Dispatch_Date"); date.toString()); Assume we have a table named dispatch_data 3 records as shown...
[ { "code": null, "e": 1262, "s": 1062, "text": "The toString() method of the java.sql.Date class returns the escape format: yyyy-mm-dd of the date represented by the current date object. Using this method you can convert a Date object to a String." }, { "code": null, "e": 1321, "s": 1...
Maven - External Dependencies
As you know, Maven does the dependency management using the concept of Repositories. But what happens if dependency is not available in any of remote repositories and central repository? Maven provides answer for such scenario using concept of External Dependency. For example, let us do the following changes to the pro...
[ { "code": null, "e": 2325, "s": 2060, "text": "As you know, Maven does the dependency management using the concept of Repositories. But what happens if dependency is not available in any of remote repositories and central repository? Maven provides answer for such scenario using concept of External ...
SQL INNER JOIN Keyword
The INNER JOIN keyword selects records that have matching values in both tables. In this tutorial we will use the well-known Northwind sample database. Below is a selection from the "Orders" table: And a selection from the "Customers" table: The following SQL statement selects all orders with customer information: Not...
[ { "code": null, "e": 82, "s": 0, "text": "The INNER JOIN keyword selects records that have matching values in \nboth tables." }, { "code": null, "e": 153, "s": 82, "text": "In this tutorial we will use the well-known Northwind sample database." }, { "code": null, "e":...
Implement Text search in MongoDB
For text search, you need to use textalongwithsearch. Let us create a collection with documents − > db.demo156.createIndex({"StudentName":"text"}); { "createdCollectionAutomatically" : true, "numIndexesBefore" : 1, "numIndexesAfter" : 2, "ok" : 1 } > db.demo156.insertOne({"StudentName":"Chris Brown"}); { ...
[ { "code": null, "e": 1160, "s": 1062, "text": "For text search, you need to use textalongwithsearch. Let us create a collection with documents −" }, { "code": null, "e": 1739, "s": 1160, "text": "> db.demo156.createIndex({\"StudentName\":\"text\"});\n{\n \"createdCollectionAuto...
LocalDateTime parse() method in Java
The LocalDateTime instance can be obtained from a string value using the parse() method in the LocalDateTime class in Java. This method requires a single parameter i.e. the string which is to be parsed. This string cannot be null. Also, it returns the LocalDateTime instance obtained from the string value that was passe...
[ { "code": null, "e": 1400, "s": 1062, "text": "The LocalDateTime instance can be obtained from a string value using the parse() method in the LocalDateTime class in Java. This method requires a single parameter i.e. the string which is to be parsed. This string cannot be null. Also, it returns the L...
Find square root of number upto given precision using binary search in C++
Suppose we have a positive number n, and precision p. We have to find square root of the number n up to p decimal places using binary search technique. So if the number is n = 50, and p = 3, then output is 7.071. So solve this, we have to follow some steps − Initialize start := 0 and end := n Compare the square of mid ...
[ { "code": null, "e": 1275, "s": 1062, "text": "Suppose we have a positive number n, and precision p. We have to find square root of the number n up to p decimal places using binary search technique. So if the number is n = 50, and p = 3, then output is 7.071." }, { "code": null, "e": 132...
JavaFX - Scatter Chart
A scatterplot is a type of graph which uses values from two variables plotted in a Cartesian plane. It is usually used to find out the relationship between two variables. Following is a Scatter chart plotted between area and weight. In JavaFX, a Scatter chart is represented by a class named ScatterChart. This class bel...
[ { "code": null, "e": 2071, "s": 1900, "text": "A scatterplot is a type of graph which uses values from two variables plotted in a Cartesian plane. It is usually used to find out the relationship between two variables." }, { "code": null, "e": 2133, "s": 2071, "text": "Following i...
Reverse Geocoding in Python. How to Convert Raw Latitude/Longitude... | by Abdishakur | Towards Data Science
Many datasets have only coordinates — latitude and longitude — and do not have any association with identifiable features like addresses, street names, building names or postcodes that we humans recognise. Reverse Geocoding is an essential component in many location data science applications. The process of converting ...
[ { "code": null, "e": 578, "s": 172, "text": "Many datasets have only coordinates — latitude and longitude — and do not have any association with identifiable features like addresses, street names, building names or postcodes that we humans recognise. Reverse Geocoding is an essential component in ma...
tracepath - Unix, Linux Command
tracepath [-nc] <destination>[/<port>] It traces path to destination discovering MTU along this path. It uses UDP port port or some random port. It is similar to traceroute, only does not not require superuser privileges. Option -c causes tracepath to use the return address instead of the reply type (connection ref...
[ { "code": null, "e": 10618, "s": 10577, "text": "\ntracepath [-nc] <destination>[/<port>]\n" }, { "code": null, "e": 10932, "s": 10620, "text": "\nIt traces path to destination discovering MTU along this path.\nIt uses UDP port port or some random port.\nIt is similar to tracerou...
Unix Socket - Network Byte Orders
Unfortunately, not all computers store the bytes that comprise a multibyte value in the same order. Consider a 16-bit internet that is made up of 2 bytes. There are two ways to store this value. Little Endian − In this scheme, low-order byte is stored on the starting address (A) and high-order byte is stored on the nex...
[ { "code": null, "e": 2198, "s": 2003, "text": "Unfortunately, not all computers store the bytes that comprise a multibyte value in the same order. Consider a 16-bit internet that is made up of 2 bytes. There are two ways to store this value." }, { "code": null, "e": 2342, "s": 2198, ...
How to pause in Node.js for a specific time ? - GeeksforGeeks
07 Oct, 2021 Sometimes we need to execute some function after some amount of time like you asked for something from the user and the details are required for the next function from the server end. That time we will require a pause in our server. So to pause for a specific time we use the setTimeout() function. It has a...
[ { "code": null, "e": 24105, "s": 24077, "text": "\n07 Oct, 2021" }, { "code": null, "e": 24583, "s": 24105, "text": "Sometimes we need to execute some function after some amount of time like you asked for something from the user and the details are required for the next function ...
How to use jQuery.getScript() method to load external js files?
The jQuery.getScript( url, [callback] ) method loads and executes a JavaScript file using an HTTP GET request. Here is the description of all the parameters used by this method − url − A string containing the URL to which the request is sent callback − This optional parameter represents a function to be executed whenev...
[ { "code": null, "e": 1173, "s": 1062, "text": "The jQuery.getScript( url, [callback] ) method loads and executes a JavaScript file using an HTTP GET request." }, { "code": null, "e": 1241, "s": 1173, "text": "Here is the description of all the parameters used by this method −" ...
Delete Database in MS SQL Server - GeeksforGeeks
02 Sep, 2020 Prerequisite – Introduction of MS SQL Server and Create Database in MS SQL Server System databases can’t be deleted, only user databases could be deleted. Data and log files will automatically be deleted from disk with database deletion. To delete a database, the below methods could be used – SQL Server Ma...
[ { "code": null, "e": 23483, "s": 23455, "text": "\n02 Sep, 2020" }, { "code": null, "e": 23565, "s": 23483, "text": "Prerequisite – Introduction of MS SQL Server and Create Database in MS SQL Server" }, { "code": null, "e": 23721, "s": 23565, "text": "System d...
How to use POSIX semaphores in C language
The semaphore is a concept of process or thread synchronization. Here we will see how to use the semaphores in real programs. In Linux system, we can get the POSIX semaphore library. To use it, we have to include semaphores.h library. We have to compile the code using the following options. gcc program_name.c –lpthread...
[ { "code": null, "e": 1188, "s": 1062, "text": "The semaphore is a concept of process or thread synchronization. Here we will see how to use the semaphores in real programs." }, { "code": null, "e": 1354, "s": 1188, "text": "In Linux system, we can get the POSIX semaphore library....
Class Keyword in JavaScript
JavaScript classes, introduced in ES6, are syntactical sugar over JavaScript prototype-based inheritance. Classes are in fact "special functions". You can define classes in JavaScript using the class keyword using the following syntax − class Person { // Constructor for this class constructor(name) { this.n...
[ { "code": null, "e": 1299, "s": 1062, "text": "JavaScript classes, introduced in ES6, are syntactical sugar over JavaScript prototype-based inheritance. Classes are in fact \"special functions\". You can define classes in JavaScript using the class keyword using the following syntax −" }, { ...
What is BLOB data type in MySQL?
A BLOB is binary large object that can hold a variable amount of data. Followings are some points about BLOB data type − BLOB is the family of column type intended as high-capacity binary storage. The actual BLOB column type is of four types-TINYBLOB, BLOB, MEDIUMBLOB and LONGBLOB. The four BLOB types are very similar ...
[ { "code": null, "e": 1184, "s": 1062, "text": " A BLOB is binary large object that can hold a variable amount of data. Followings are some points about BLOB data type −" }, { "code": null, "e": 1260, "s": 1184, "text": "BLOB is the family of column type intended as high-capacity ...
MS SQL Server - Login Database
A login is a simple credential for accessing SQL Server. For example, you provide your username and password when logging on to Windows or even your e-mail account. This username and password builds up the credentials. Therefore, credentials are simply a username and a password. SQL Server allows four types of logins −...
[ { "code": null, "e": 2515, "s": 2235, "text": "A login is a simple credential for accessing SQL Server. For example, you provide your username and password when logging on to Windows or even your e-mail account. This username and password builds up the credentials. Therefore, credentials are simply ...
How to get the Windows certificate details using PowerShell?
We know that the Windows Certificates are resided in the Certificate store but finding the certificate with its name or getting particular certificate details might be cumbersome sometimes. You can access the certificate store using MMC or using CertMgr.msc command. There are certificates stored for CurrentUser, Servic...
[ { "code": null, "e": 1252, "s": 1062, "text": "We know that the Windows Certificates are resided in the Certificate store but finding the certificate with its name or getting particular certificate details might be cumbersome sometimes." }, { "code": null, "e": 1569, "s": 1252, "...
Why You Need to Close the Java Streams in Finally Block? - GeeksforGeeks
27 Oct, 2021 In Java finally block is a block used to execute important and common code. The finally block is mostly used during exception handling with try and catch to close streams and files. The code in finally block is executed irrespective of whether there is an exception or not. This ensures that all the opened ...
[ { "code": null, "e": 23868, "s": 23840, "text": "\n27 Oct, 2021" }, { "code": null, "e": 24336, "s": 23868, "text": "In Java finally block is a block used to execute important and common code. The finally block is mostly used during exception handling with try and catch to close ...
Zone-based firewall Configuration
10 Jun, 2022 Prerequisite – Zone-based firewall Zone-based firewall is an advanced method of stateful firewall. In stateful firewall, an entry containing source IP address, destination IP address, source Port number and destination Port number, is maintained for the traffic generated by the trusted (private) network in...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Jun, 2022" }, { "code": null, "e": 502, "s": 28, "text": "Prerequisite – Zone-based firewall Zone-based firewall is an advanced method of stateful firewall. In stateful firewall, an entry containing source IP address, destination IP ...
Perl – Difference between Functions and Subroutines
28 Jul, 2020 In Perl, when a code-script gets bigger in size i.e. contains hundreds of lines of code, it becomes difficult to manage such a code-script. To avoid this difficulty, Perl provides its users with the concept of Functions and subroutines. Functions and subroutines break up complex/large amounts of code into ...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Jul, 2020" }, { "code": null, "e": 423, "s": 54, "text": "In Perl, when a code-script gets bigger in size i.e. contains hundreds of lines of code, it becomes difficult to manage such a code-script. To avoid this difficulty, Perl pro...
Python time.daylight() Function
19 Dec, 2021 Time.daylight() function which returns a non zero integer value when Daylight Saving Time (DST) is defined, else it returns 0. Daylight Saving Time, in short, is called DST which is a best practice of setting a clock time one hour forward from standard time during months of summer and back again in fall. T...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Dec, 2021" }, { "code": null, "e": 384, "s": 28, "text": "Time.daylight() function which returns a non zero integer value when Daylight Saving Time (DST) is defined, else it returns 0. Daylight Saving Time, in short, is called DST wh...
Creating Phishing page of a website
13 Aug, 2020 Prerequisite – Phishing Phishing is a type of social engineering attack of tricking an individual to enter the sensitive information like usernames, passwords and credit card details. It can be done by any individual with a mere basic requirement of Kali Linux (or any other Linux Distribution). Steps to cr...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Aug, 2020" }, { "code": null, "e": 76, "s": 52, "text": "Prerequisite – Phishing" }, { "code": null, "e": 348, "s": 76, "text": "Phishing is a type of social engineering attack of tricking an individual to enter ...
Requesting in http vs Requesting in Express.js
09 Feb, 2021 Node.js: Node.js is an open-source and cross-platform runtime environment for executing JavaScript code outside a browser. You need to remember that Node.js is not a framework and it’s not a programming language. Most of the people are confused and understand it’s a framework or a programming language. We ...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Feb, 2021" }, { "code": null, "e": 422, "s": 28, "text": "Node.js: Node.js is an open-source and cross-platform runtime environment for executing JavaScript code outside a browser. You need to remember that Node.js is not a framework...
Trapping Rain Water | Practice | GeeksforGeeks
Given an array arr[] of N non-negative integers representing the height of blocks. If width of each block is 1, compute how much water can be trapped between the blocks during the rainy season. Example 1: Input: N = 6 arr[] = {3,0,0,2,0,4} Output: 10 Explanation: Example 2: Input: N = 4 arr[] = {7,4,0,9} Output: ...
[ { "code": null, "e": 435, "s": 238, "text": "Given an array arr[] of N non-negative integers representing the height of blocks. If width of each block is 1, compute how much water can be trapped between the blocks during the rainy season. \n " }, { "code": null, "e": 446, "s": 435, ...
Data Conversion in C++
06 Oct, 2021 A user-defined data types are designed by the user to suit their requirements, the compiler does not support automatic type conversions for such data types therefore, the user needs to design the conversion routines by themselves if required. There can be 3 types of situations that may come in the data con...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Oct, 2021" }, { "code": null, "e": 297, "s": 54, "text": "A user-defined data types are designed by the user to suit their requirements, the compiler does not support automatic type conversions for such data types therefore, the use...
How to validate time in 24-hour format using Regular Expression
10 Feb, 2021 Given a string str, the task is to check whether the string is valid time in 24-hour format or not by using Regular Expression. The valid time in the 24-hour format must satisfy the following conditions. It should start from 0-23 or 00-23.It should be followed by a ‘:'(colon).It should be followed by t...
[ { "code": null, "e": 28, "s": 0, "text": "\n10 Feb, 2021" }, { "code": null, "e": 158, "s": 28, "text": "Given a string str, the task is to check whether the string is valid time in 24-hour format or not by using Regular Expression. " }, { "code": null, "e": 236, ...
p5.js | loadStrings() Function
13 Mar, 2020 The loadStrings() function is used to read the contents of a file and create an array of strings with each of the lines of the file. The file to be read must be located at the sketch directory if the file name is used, otherwise, a URL to the file can be specified. This function is recommended to be called...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Mar, 2020" }, { "code": null, "e": 294, "s": 28, "text": "The loadStrings() function is used to read the contents of a file and create an array of strings with each of the lines of the file. The file to be read must be located at the...
Memento design pattern
01 Sep, 2021 Memento pattern is a behavioral design pattern. Memento pattern is used to restore state of an object to a previous state. As your application is progressing, you may want to save checkpoints in your application and restore back to those checkpoints later. UML Diagram Memento design pattern Design componen...
[ { "code": null, "e": 52, "s": 24, "text": "\n01 Sep, 2021" }, { "code": null, "e": 309, "s": 52, "text": "Memento pattern is a behavioral design pattern. Memento pattern is used to restore state of an object to a previous state. As your application is progressing, you may want to...
HTML | <li> value Attribute
30 Apr, 2019 The <li> value attribute in HTML is used to specify the initial value of the list item. It is only applicable on the ordered list. Syntax: <li value="number">list items </li> Attribute Value: This attribute contains single value number which is used to specify the value of the list items. Example 1: This e...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Apr, 2019" }, { "code": null, "e": 159, "s": 28, "text": "The <li> value attribute in HTML is used to specify the initial value of the list item. It is only applicable on the ordered list." }, { "code": null, "e": 167, ...
CSS | grid-template-columns Property
07 Jun, 2022 The grid-template-columns property in CSS is used to set the number of columns and size of the columns of the grid. This property accepts more than one values. The number of columns is set by the number of values given to this property. Syntax: grid-template-columns: none|auto|max-content|min-content|leng...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jun, 2022" }, { "code": null, "e": 266, "s": 28, "text": "The grid-template-columns property in CSS is used to set the number of columns and size of the columns of the grid. This property accepts more than one values. The number of c...
HTML | DOM Input Number placeholder Property
11 Mar, 2019 The DOM Input Number placeholder Property in HTML DOM is used to set or return the value of the placeholder attribute of a number field. The placeholder attribute specifies the short hint that describes the expected value of an input field. The short hint is displayed in the field before the user enters a ...
[ { "code": null, "e": 53, "s": 25, "text": "\n11 Mar, 2019" }, { "code": null, "e": 367, "s": 53, "text": "The DOM Input Number placeholder Property in HTML DOM is used to set or return the value of the placeholder attribute of a number field. The placeholder attribute specifies t...
C++ Program to Implement Set_Difference in STL
The difference of two sets is formed only by the elements that are present in the first set, not in the second set. The elements copied by the function come always from the first set in the same order. The elements in both the sets shall already be ordered. Common set operations are − Set Union Set Intersection Symmetr...
[ { "code": null, "e": 1320, "s": 1062, "text": "The difference of two sets is formed only by the elements that are present in the first set, not in the second set. The elements copied by the function come always from the first set in the same order. The elements in both the sets shall already be orde...
Find the first non-repeating character from a stream of characters in Python
Suppose we have a stream of characters, or we can consider a string and we have to find the first non-repeating character in the string. So, if the string is like “people”, the first letter whose occurrence is one is ‘o’. So, the index will be returned, that is 2 here. If there is no such character, then return -1. To ...
[ { "code": null, "e": 1379, "s": 1062, "text": "Suppose we have a stream of characters, or we can consider a string and we have to find the first non-repeating character in the string. So, if the string is like “people”, the first letter whose occurrence is one is ‘o’. So, the index will be returned,...
Does main() method accept arguments other than string array, in java?
The public static void main() method accepts an array of values of the type String Java from the user. public class{ public static void main(String[] args){ } } You can pass them at the time of execution right after the class name separated with spaces as − java ClassName 10 20 30 And, in the program (from the ma...
[ { "code": null, "e": 1165, "s": 1062, "text": "The public static void main() method accepts an array of values of the type String Java from the user." }, { "code": null, "e": 1229, "s": 1165, "text": "public class{\n public static void main(String[] args){\n }\n}" }, { ...
Apache Flink - Libraries
In this chapter, we will learn about the different libraries of Apache Flink. FlinkCEP is an API in Apache Flink, which analyses event patterns on continuous streaming data. These events are near real time, which have high throughput and low latency. This API is used mostly on Sensor data, which come in real-time and a...
[ { "code": null, "e": 2147, "s": 2069, "text": "In this chapter, we will learn about the different libraries of Apache Flink." }, { "code": null, "e": 2417, "s": 2147, "text": "FlinkCEP is an API in Apache Flink, which analyses event patterns on continuous streaming data. These ev...
The Secret Guide To Human-Like Text Summarization | by Louis Teo | Medium | Towards Data Science
Summarization has become a very helpful way of tackling the issue of data overburden. In my earlier story, I shared how you can create your personal text summarizer using extractive method — if you have tried that, you may have noticed that, because no new sentences were generated from the original content, at times yo...
[ { "code": null, "e": 439, "s": 47, "text": "Summarization has become a very helpful way of tackling the issue of data overburden. In my earlier story, I shared how you can create your personal text summarizer using extractive method — if you have tried that, you may have noticed that, because no new...
Objective-C - switch statement
A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each switch case. The syntax for a switch statement in Objective-C programming language is as follows − switch(expression){ case constant-expression ...
[ { "code": null, "e": 2746, "s": 2560, "text": "A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each switch case." }, { "code": null, "e": 2832, "s": 2746, "text...
Estimating Time until Contract Termination — Survival Analysis with Lifelines | by Cornellius Yudha Wijaya | Towards Data Science
I am sure everyone at some point of their data career would meet a case when you want to estimate a specific event to happen, e.g., “When someone would churn?” or “When the death claim of insurance would happen?”. We would commonly use a time-series approach to solve this problem, but Survival Analysis is the typical a...
[ { "code": null, "e": 500, "s": 171, "text": "I am sure everyone at some point of their data career would meet a case when you want to estimate a specific event to happen, e.g., “When someone would churn?” or “When the death claim of insurance would happen?”. We would commonly use a time-series appro...
reStructuredText | .rst file to HTML file using Python for Documentations - GeeksforGeeks
21 Jan, 2019 Introduction to .rst file (reStructuredText): reStructuredText is a file format for Textual data majorly used by Python based communities to develop documentation in an easy way similar to other tools like Javadoc for Java. Most of the docs of Python-based software and libraries are written using reStructu...
[ { "code": null, "e": 24212, "s": 24184, "text": "\n21 Jan, 2019" }, { "code": null, "e": 24258, "s": 24212, "text": "Introduction to .rst file (reStructuredText):" }, { "code": null, "e": 24603, "s": 24258, "text": "reStructuredText is a file format for Textua...
Toeplitz matrix | Practice | GeeksforGeeks
A Toeplitz (or diagonal-constant) matrix is a matrix in which each descending diagonal from left to right is constant, i.e., all elements in a diagonal are same. Given a matrix A of order N X M your task is to complete the function isToeplitz which returns true if the matrix is Toeplitz otherwise returns false. Example...
[ { "code": null, "e": 551, "s": 238, "text": "A Toeplitz (or diagonal-constant) matrix is a matrix in which each descending diagonal from left to right is constant, i.e., all elements in a diagonal are same.\nGiven a matrix A of order N X M your task is to complete the function isToeplitz which retur...
How to get current state of activity in android?
This example demonstrates How to get current state of activity in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version = "1.0" encoding = "utf-8"?> <LinearL...
[ { "code": null, "e": 1137, "s": 1062, "text": "This example demonstrates How to get current state of activity in android." }, { "code": null, "e": 1266, "s": 1137, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to ...
How to Use Nano Text Editor
Are you confused by all of the other text editors? then, this article is for you! Linux amateurs are often put off by other advanced text editors such as Vim and Emacs. While they are decent programs, they does require a bit of learning curve. Nano offers a perfect solution if you are looking for a small and friendly t...
[ { "code": null, "e": 1441, "s": 1062, "text": "Are you confused by all of the other text editors? then, this article is for you! Linux amateurs are often put off by other advanced text editors such as Vim and Emacs. While they are decent programs, they does require a bit of learning curve. Nano offe...
How to Make A.I. That Looks into Trade Charts (And Use It for Trading) | by Ceyhun Derinbogaz | Towards Data Science
We are living in a world most of the things are increasingly depending on computer vision and deep learning. From tagging your summer photos automatically to facial detection by security cameras, it feels like we are living in a dystopian future. While AI revolution is still happening around us, spring of 2019 was inte...
[ { "code": null, "e": 419, "s": 172, "text": "We are living in a world most of the things are increasingly depending on computer vision and deep learning. From tagging your summer photos automatically to facial detection by security cameras, it feels like we are living in a dystopian future." }, ...
How to remove a particular character from a String.
Following example shows how to remove a character from a particular position from a string with the help of removeCharAt(string, position) method. Live Demo public class Sample { public static void main(String args[]) { String str = "this is Java"; System.out.println(removeCharAt(str, 3)); } public...
[ { "code": null, "e": 1209, "s": 1062, "text": "Following example shows how to remove a character from a particular position from a string with the help of removeCharAt(string, position) method." }, { "code": null, "e": 1219, "s": 1209, "text": "Live Demo" }, { "code": nul...
Train Your Own Chess AI. Watch your creation defeat you | by Logan Spears | Towards Data Science
TLDR: Colab Link Deep Learning has taken over the computer chess world. In 2017 AlphaZero, an iteration of AlphaGo targeting chess, mesmerized the chess fans by handlely defeating Stockfish. New developments in the space such as Leela Zero (an open source AlphaZero implementation that happens to use my chess lib) and S...
[ { "code": null, "e": 189, "s": 172, "text": "TLDR: Colab Link" }, { "code": null, "e": 627, "s": 189, "text": "Deep Learning has taken over the computer chess world. In 2017 AlphaZero, an iteration of AlphaGo targeting chess, mesmerized the chess fans by handlely defeating Stockf...
How to successfully add large data sets to Google Drive | by Magdalena Konkiewicz | Towards Data Science
Introduction In this post, I will explain how to add large data sets to Google Drive so they can be accessed from Google Colab for processing and modeling. Whereas uploading a single file can be done with the drag and drop interface of Google Drive, it becomes more difficult with a large number of files. Dragging the w...
[ { "code": null, "e": 185, "s": 172, "text": "Introduction" }, { "code": null, "e": 328, "s": 185, "text": "In this post, I will explain how to add large data sets to Google Drive so they can be accessed from Google Colab for processing and modeling." }, { "code": null, ...
Correlating Branch Prediction - GeeksforGeeks
04 Jun, 2020 Conditional Branches present in the programs significantly affect the performance of the system. So we need to come up with efficient branch prediction mechanism so as to get the branch target address with high accuracy and thus minimizing the stalls associated with control hazards. In case if failure in c...
[ { "code": null, "e": 24389, "s": 24361, "text": "\n04 Jun, 2020" }, { "code": null, "e": 24673, "s": 24389, "text": "Conditional Branches present in the programs significantly affect the performance of the system. So we need to come up with efficient branch prediction mechanism s...
PHP | Merging two or more arrays using array_merge()
18 Apr, 2019 The array_merge() is a builtin function in PHP and is used to merge two or more arrays into a single array. This function is used to merge the elements or values of two or more arrays together into a single array. The merging occurs in such a manner that the values of one array are appended at the end of t...
[ { "code": null, "e": 52, "s": 24, "text": "\n18 Apr, 2019" }, { "code": null, "e": 554, "s": 52, "text": "The array_merge() is a builtin function in PHP and is used to merge two or more arrays into a single array. This function is used to merge the elements or values of two or mo...
How to tag a commit in git?
The git commit is a 40-digit hexadecimal SHA1 hash. Quite often we need to bookmark a as the commit hash is difficult to memorize. This is where one can use tags. Tags can be used to name a commit. In other words, tags are labels that can be used to identify a specific commit. For e.g., “v1.0, RC1.0” are some ways to n...
[ { "code": null, "e": 1521, "s": 1187, "text": "The git commit is a 40-digit hexadecimal SHA1 hash. Quite often we need to bookmark a as the commit hash is difficult to memorize. This is where one can use tags. Tags can be used to name a commit. In other words, tags are labels that can be used to ide...
How to Update Data in API using Volley in Android?
26 Feb, 2021 Prerequisite: JSON Parsing in Android using Volley Library How to Post Data to API using Volley in Android? We have seen reading data from API as well as posting data to our database with the help of the API. In this article, we will take a look at updating our data in our API. We will be using the Volley ...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Feb, 2021" }, { "code": null, "e": 42, "s": 28, "text": "Prerequisite:" }, { "code": null, "e": 87, "s": 42, "text": "JSON Parsing in Android using Volley Library" }, { "code": null, "e": 136, "s":...
Teradata - Logical and Conditional Operators
Teradata supports the following logical and conditional operators. These operators are used to perform comparison and combine multiple conditions. BETWEEN command is used to check if a value is within a range of values. Consider the following employee table. The following example fetches records with employee numbers i...
[ { "code": null, "e": 2911, "s": 2764, "text": "Teradata supports the following logical and conditional operators. These operators are used to perform comparison and combine multiple conditions." }, { "code": null, "e": 2984, "s": 2911, "text": "BETWEEN command is used to check if...
Multi-Messenger : A python project, messaging via Terminal
30 May, 2018 The aim of this program is to let users mail/message on FB/SMS anyone using Terminal. The full project can be found here. So, first of all, why Multi-Messenger ? This is the first question which anyone will think about. The answer is simple, Terminal! Many of our work, now a days, lies in Terminal, talking...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 May, 2018" }, { "code": null, "e": 176, "s": 54, "text": "The aim of this program is to let users mail/message on FB/SMS anyone using Terminal. The full project can be found here." }, { "code": null, "e": 216, "s": 1...
Working of ISO-OSI Model
04 Jul, 2022 The ISO-OSI (International organization of Standardization – Open System Interconnection) says to group together the functions which are related to each other. The Functions in OSI Model that are needed for proper communication can be divided into 2 types :- 1. Mandatory Functions: Here the implementatio...
[ { "code": null, "e": 53, "s": 25, "text": "\n04 Jul, 2022" }, { "code": null, "e": 214, "s": 53, "text": "The ISO-OSI (International organization of Standardization – Open System Interconnection) says to group together the functions which are related to each other. " }, { ...
Python | Create an empty text file with current date as its name
02 Aug, 2019 In this article, we will learn how to create a text file names as the current date in it. For this, we can use now() method of datetime module. The datetime module supplies classes for manipulating dates and times in both simple and complex ways. While date and time arithmetic is supported, the focus of th...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Aug, 2019" }, { "code": null, "e": 172, "s": 28, "text": "In this article, we will learn how to create a text file names as the current date in it. For this, we can use now() method of datetime module." }, { "code": null, ...
Templates in C++ with Examples
13 May, 2022 A template is a simple and yet very powerful tool in C++. The simple idea is to pass data type as a parameter so that we don’t need to write the same code for different data types. For example, a software company may need sort() for different data types. Rather than writing and maintaining the multiple cod...
[ { "code": null, "e": 54, "s": 26, "text": "\n13 May, 2022" }, { "code": null, "e": 561, "s": 54, "text": "A template is a simple and yet very powerful tool in C++. The simple idea is to pass data type as a parameter so that we don’t need to write the same code for different data ...
Extract specific column from a DataFrame using column name in R
15 Feb, 2022 In this article, we are going to see how to extract a specific column from a dataframe using the column name in R Programming Language. In the data.frame() we have to pass dataframe_name followed by $ symbol followed by column name. The reason to pass dataframe_name$ column name to data.frame() is, after e...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Feb, 2022" }, { "code": null, "e": 164, "s": 28, "text": "In this article, we are going to see how to extract a specific column from a dataframe using the column name in R Programming Language." }, { "code": null, "e": 48...
Shuffle a given array using Fisher–Yates shuffle Algorithm
27 Jun, 2022 Given an array, write a program to generate a random permutation of array elements. This question is also asked as “shuffle a deck of cards” or “randomize a given array”. Here shuffle means that every permutation of array element should be equally likely. Let the given array be arr[]. A simple solution is...
[ { "code": null, "e": 54, "s": 26, "text": "\n27 Jun, 2022" }, { "code": null, "e": 311, "s": 54, "text": "Given an array, write a program to generate a random permutation of array elements. This question is also asked as “shuffle a deck of cards” or “randomize a given array”. Her...
VB.Net - While... End While Loop
It executes a series of statements as long as a given condition is True. The syntax for this loop construct is − While condition [ statements ] [ Continue While ] [ statements ] [ Exit While ] [ statements ] End While Here, statement(s) may be a single statement or a block of statements. The condition m...
[ { "code": null, "e": 2507, "s": 2434, "text": "It executes a series of statements as long as a given condition is True." }, { "code": null, "e": 2547, "s": 2507, "text": "The syntax for this loop construct is −" }, { "code": null, "e": 2668, "s": 2547, "text":...
Spring Boot | How to publish JSON messages on Apache Kafka
21 Jun, 2020 Apache Kafka is a publish-subscribe messaging system. A messaging queue lets you send messages between processes, applications, and servers. In this article, we will see how to send JSON messages to Apache Kafka in a spring boot application. In order to learn how to create a spring boot project, refer to t...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jun, 2020" }, { "code": null, "e": 270, "s": 28, "text": "Apache Kafka is a publish-subscribe messaging system. A messaging queue lets you send messages between processes, applications, and servers. In this article, we will see how t...
Classes in TypeScript
14 Nov, 2019 Class in term of OOPs is a blueprint for creating objects. TypeScript supports object-oriented programming features like classes, Interfaces, Polymorphism, data-binding etc. Object means this a real world entity. JavaScript ES5 or earlier didn’t support classes. Typescript inherits this feature from ES6. I...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Nov, 2019" }, { "code": null, "e": 334, "s": 28, "text": "Class in term of OOPs is a blueprint for creating objects. TypeScript supports object-oriented programming features like classes, Interfaces, Polymorphism, data-binding etc. O...
Solving Cryptarithmetic Puzzles | Backtracking-8
10 May, 2019 Newspapers and magazines often have crypt-arithmetic puzzles of the form: SEND + MORE -------- MONEY -------- The goal here is to assign each letter a digit from 0 to 9 so that the arithmetic works out correctly. The rules are that all occurrences of a letter must be assigned the same digit, and no dig...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 May, 2019" }, { "code": null, "e": 126, "s": 52, "text": "Newspapers and magazines often have crypt-arithmetic puzzles of the form:" }, { "code": null, "e": 166, "s": 126, "text": " SEND\n+ MORE\n--------\n MONE...
Heighway’s Dragon Curve using Python
26 Apr, 2022 Introduction | Dragon Curve A Dragon curve is a recursive non-intersecting curve also known as the Harter–Heighway dragon or the Jurassic Park dragon curve. It is a mathematical curve which can be approximated by recursive methods such as Lindenmayer systems. Lindenmayer systems: A Lindenmayer system, also...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Apr, 2022" }, { "code": null, "e": 56, "s": 28, "text": "Introduction | Dragon Curve" }, { "code": null, "e": 802, "s": 56, "text": "A Dragon curve is a recursive non-intersecting curve also known as the Harter–He...
How to Remove HTML element from DOM using AngularJS ?
15 Oct, 2020 Here the task is to remove a particular element from the DOM with the help of AngularJS. Approach: Here first we select the element that we want to remove. Then we use remove() method to remove that particular element. Example 1: Here the element of class(‘p’) has been removed. <!DOCTYPE HTML><html> <head...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 Oct, 2020" }, { "code": null, "e": 117, "s": 28, "text": "Here the task is to remove a particular element from the DOM with the help of AngularJS." }, { "code": null, "e": 247, "s": 117, "text": "Approach: Here fi...
Python Tricks for Competitive Coding
03 Jun, 2022 Python is one such programming language that makes everything easier and straight forward. Anyone who has dabbled in python for Competitive Coding gets somewhat addicted to its many features. Here is a list of some of its cool features that I’ve found most useful in a competitive coding environment. The m...
[ { "code": null, "e": 52, "s": 24, "text": "\n03 Jun, 2022" }, { "code": null, "e": 354, "s": 52, "text": "Python is one such programming language that makes everything easier and straight forward. Anyone who has dabbled in python for Competitive Coding gets somewhat addicted to i...
Time complexities of different data structures
13 Jun, 2022 Time Complexity is a concept in computer science that deals with the quantification of the amount of time taken by a set of code or algorithm to process or run as a function of the amount of input. In other words, the time complexity is how long a program takes to process a given input. The efficiency of a...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Jun, 2022" }, { "code": null, "e": 398, "s": 52, "text": "Time Complexity is a concept in computer science that deals with the quantification of the amount of time taken by a set of code or algorithm to process or run as a function ...
Reorder the position of the words in alphabetical order
07 Jun, 2022 Given an array arr[] of strings, the task is to reorder the strings lexicographically and print their positions in the original list. Examples: Input: arr[] = {“zxc”, “efg”, “jkl”} Output: 2 3 1 The sorted list will be {“efg”, “jkl”, “zxc”} and their original positions were 2, 3 and 1 respectively. Inpu...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jun, 2022" }, { "code": null, "e": 163, "s": 28, "text": "Given an array arr[] of strings, the task is to reorder the strings lexicographically and print their positions in the original list. " }, { "code": null, "e": 174...
SQL Query to Update All Columns in a Table
14 Nov, 2021 In SQL, sometimes we need to write a single query to update the values of all columns in a table. We will use the UPDATE keyword to achieve this. For this, we use a specific kind of query shown in the below demonstration. For this article, we will be using the Microsoft SQL Server as our database and Selec...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Nov, 2021" }, { "code": null, "e": 373, "s": 54, "text": "In SQL, sometimes we need to write a single query to update the values of all columns in a table. We will use the UPDATE keyword to achieve this. For this, we use a specific ...
How to create a DataFrame from given vectors in R ?
24 Mar, 2022 In this article we will see how to create a Dataframe from four given vectors in R. To create a data frame in R using the vector, we must first have a series of vectors containing data. The data.frame() function is used to create a data frame from vector in R. Syntax: data.frame(vectors) Example 1. Creatin...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Mar, 2022" }, { "code": null, "e": 289, "s": 28, "text": "In this article we will see how to create a Dataframe from four given vectors in R. To create a data frame in R using the vector, we must first have a series of vectors contai...
Create a Scatter Plot with Multiple Groups using ggplot2 in R - GeeksforGeeks
24 Oct, 2021 In this article, we will discuss how to create a scatter plot with multiple groups in R Programming Language. Geoms can be added to the plot to compute various graphical representations of the data in the plot (points, lines, bars). The geom_point() method is used to create scatter plots in R. The geoms ma...
[ { "code": null, "e": 25242, "s": 25214, "text": "\n24 Oct, 2021" }, { "code": null, "e": 25352, "s": 25242, "text": "In this article, we will discuss how to create a scatter plot with multiple groups in R Programming Language." }, { "code": null, "e": 25675, "s": ...
Find maximum element of each row in a matrix in C++
Consider we have a matrix, our task is to find the maximum element of each row of that matrix and print them. This task is simple. For each row, reset the max, and find the max element, and print it. Let us see the code for better understanding. #include<iostream> #define MAX 10 using namespace std; void largestInEachR...
[ { "code": null, "e": 1308, "s": 1062, "text": "Consider we have a matrix, our task is to find the maximum element of each row of that matrix and print them. This task is simple. For each row, reset the max, and find the max element, and print it. Let us see the code for better understanding." }, ...
Bootstrap Event when the modal is fully shown
The shown.bs.modal event in Bootstrap fires when the modal is completely displayed. The modal is displayed using the modal(show) method − $("#button1").click(function(){ $("#newModal").modal("show"); }); Fire shown.bs.modal event and generate the alert as shown below − $("#newModal").on('shown.bs.modal', function () ...
[ { "code": null, "e": 1146, "s": 1062, "text": "The shown.bs.modal event in Bootstrap fires when the modal is completely displayed." }, { "code": null, "e": 1200, "s": 1146, "text": "The modal is displayed using the modal(show) method −" }, { "code": null, "e": 1268, ...