title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
p5.js | keyPressed() Function
14 Jan, 2022 The keyPressed() function is invoked whenever a key is pressed. The most recently typed ASCII key is stored into the ‘key’ variable, however it does not distinguish between uppercase and lowercase characters. The non-ASCII character codes can be accessed in the ‘keyCode’ variable with their respective name...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Jan, 2022" }, { "code": null, "e": 653, "s": 28, "text": "The keyPressed() function is invoked whenever a key is pressed. The most recently typed ASCII key is stored into the ‘key’ variable, however it does not distinguish between up...
C# Program to Count Number of Vowels and Consonants in a Given String
07 Jan, 2022 C# is a general-purpose programming language it is used to create mobile apps, desktop apps, web sites, and games. As we know that a, e, i, o, u are vowels, and the remaining alphabet is known as a consonant in English so now using C# language we will create a program that will return us the total number o...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Jan, 2022" }, { "code": null, "e": 125, "s": 28, "text": "C# is a general-purpose programming language it is used to create mobile apps, desktop apps, web" }, { "code": null, "e": 388, "s": 125, "text": "sites, an...
C Language Introduction
31 May, 2022 C is a procedural programming language. It was initially developed by Dennis Ritchie in the year 1972. It was mainly developed as a system programming language to write an operating system. The main features of the C language include low-level memory access, a simple set of keywords, and a clean style, the...
[ { "code": null, "e": 52, "s": 24, "text": "\n31 May, 2022" }, { "code": null, "e": 784, "s": 52, "text": "C is a procedural programming language. It was initially developed by Dennis Ritchie in the year 1972. It was mainly developed as a system programming language to write an op...
8 Reasons to Start Using Pydantic to Improve Data Parsing and Validation | by Ahmed Besbes | Towards Data Science
In one of my previous posts, I looked at dataclasses as a way of writing python classes that act as data containers. I found the dataclasses project amazing: it implements a lot of nifty methods under the hood to prevent you from writing boilerplate code, it provides a concise and pythonic syntax and it enforces modern...
[ { "code": null, "e": 288, "s": 171, "text": "In one of my previous posts, I looked at dataclasses as a way of writing python classes that act as data containers." }, { "code": null, "e": 515, "s": 288, "text": "I found the dataclasses project amazing: it implements a lot of nifty...
How to configure samba on centos
This article will guide to configure samba server in CentOS 6.x with anonymous & secured samba folders. Samba is an Open Source/Free Software suite that provides seamless access to the file services to SMB/CIFS clients. Unlike other tools samba SMB/CIFS implementations will allow to share folders between Linux servers ...
[ { "code": null, "e": 1403, "s": 1062, "text": "This article will guide to configure samba server in CentOS 6.x with anonymous & secured samba folders. Samba is an Open Source/Free Software suite that provides seamless access to the file services to SMB/CIFS clients. Unlike other tools samba SMB/CIFS...
How to convert unix timestamp string to readable date in Python?
You can use the fromtimestamp function from the datetime module to get a date from a UNIX timestamp. This function takes the timestamp as input and returns the datetime object corresponding to the timestamp. import datetime timestamp = datetime.datetime.fromtimestamp(1500000000) print(timestamp.strftime('%Y-%m-%d %H:...
[ { "code": null, "e": 1272, "s": 1062, "text": "You can use the fromtimestamp function from the datetime module to get a date from a UNIX timestamp. This function takes the timestamp as input and returns the datetime object corresponding to the timestamp. " }, { "code": null, "e": 1391, ...
Minimum Increment to Make Array Unique in C++
Suppose we have an array of integers A, here a move consists of choosing any A[i], and incrementing it by 1. We have to find the least number of moves to make every value in A unique. So if the input is like [3,2,1,2,1,7], then the output will be 6, as after 6 moves, the array could be [3,4,1,2,5,7], it can be shown wi...
[ { "code": null, "e": 1466, "s": 1062, "text": "Suppose we have an array of integers A, here a move consists of choosing any A[i], and incrementing it by 1. We have to find the least number of moves to make every value in A unique. So if the input is like [3,2,1,2,1,7], then the output will be 6, as ...
Java SAX Parser - Query XML Document
Here is the input text file that we need to Query for rollno: 393 <?xml version = "1.0"?> <class> <student rollno = "393"> <firstname>dinkar</firstname> <lastname>kad</lastname> <nickname>dinkar</nickname> <marks>85</marks> </student> <student rollno = "493"> <firstname>Vaneet...
[ { "code": null, "e": 2389, "s": 2323, "text": "Here is the input text file that we need to Query for rollno: 393" }, { "code": null, "e": 2940, "s": 2389, "text": "<?xml version = \"1.0\"?>\n<class>\n <student rollno = \"393\">\n <firstname>dinkar</firstname>\n <lastn...
How to get available wifi networks and display them in a list in android
This example demonstrate about How to get available wifi networks and display them in a list 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" ...
[ { "code": null, "e": 1166, "s": 1062, "text": "This example demonstrate about How to get available wifi networks and display them in a list in android" }, { "code": null, "e": 1295, "s": 1166, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and ...
Sorting all array elements except one - GeeksforGeeks
CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data ScienceExplore MoreSelf-PacedDSA- Self PacedCIPJAVA / Python / C+...
[ { "code": null, "e": 407, "s": 0, "text": "CoursesFor Working ProfessionalsLIVEDSA Live ClassesSystem DesignJava Backend DevelopmentFull Stack LIVEExplore MoreSelf-PacedDSA- Self PacedSDE TheoryMust-Do Coding QuestionsExplore MoreFor StudentsLIVECompetitive ProgrammingData Structures with C++Data Sc...
C# Program to Check Whether the Entered Number is an Armstrong Number or Not
For an Armstrong number, let us say a number has 3 digits, then the sum of cube of its digits is equal to the number itself. For example, 153 is equal to − 13 + 33 + 53 To check for it using C#, check the value and find its remainder. Here “val” is the number you want to check for Armstrong − for (int i = val; i > 0; i...
[ { "code": null, "e": 1187, "s": 1062, "text": "For an Armstrong number, let us say a number has 3 digits, then the sum of cube of its digits is equal to the number itself." }, { "code": null, "e": 1218, "s": 1187, "text": "For example, 153 is equal to −" }, { "code": null...
CSS3 - Shadow
CSS3 supported to add shadow to text or elements.Shadow property has divided as follows − Text shadow Box Shadow CSS3 supported to add shadow effects to text. Following is the example to add shadow effects to text − <html> <head> <style> h1 { text-shadow: 2px 2px; } h2 { ...
[ { "code": null, "e": 2716, "s": 2626, "text": "CSS3 supported to add shadow to text or elements.Shadow property has divided as follows −" }, { "code": null, "e": 2728, "s": 2716, "text": "Text shadow" }, { "code": null, "e": 2739, "s": 2728, "text": "Box Shado...
Spring Boot CLI - Environment Setup
Spring is a Java-based framework; hence, we need to set up JDK first. Following are the steps needed to setup Spring Boot CLI along with JDK installation. You can download the latest version of SDK from Oracle's Java site − Java SE Downloads. You will find instructions for installing JDK in downloaded files, follow the...
[ { "code": null, "e": 2164, "s": 2009, "text": "Spring is a Java-based framework; hence, we need to set up JDK first. Following are the steps needed to setup Spring Boot CLI along with JDK installation." }, { "code": null, "e": 2560, "s": 2164, "text": "You can download the latest...
fsck - Unix, Linux Command
fsck - check and repair a Linux file system fsck [-sAVRTMNP] [-C [fd]] [-t fstype] [filesys...] [--] [fs-specific-options] Example-1: To Filesystem Check on a Disk Partition: # fsck /dev/sda6 output: fsck from util-linux 2.20.1 e2fsck 1.42.9 (4-Feb-2014) /dev/sda6: clean, 95/2240224 files, 3793506/4476416 blocks fsck f...
[ { "code": null, "e": 10621, "s": 10577, "text": "fsck - check and repair a Linux file system" }, { "code": null, "e": 10700, "s": 10621, "text": "fsck [-sAVRTMNP] [-C [fd]] [-t fstype] [filesys...] [--] [fs-specific-options]" }, { "code": null, "e": 10711, "s": 10...
5 Cool Alternatives To Django and Flask For Deploying Endpoints And FullStack | by Emmett Boudreau | Towards Data Science
If you’ve ever deployed an endpoint or created a website with Python, then it’s likely that you’ve heard of Flask and Django. Flask and Django are the industry standard in Python when it comes to doing nearly anything with the HTTP protocol in Python. Flask is typically used for more light-weight applications that don’...
[ { "code": null, "e": 755, "s": 172, "text": "If you’ve ever deployed an endpoint or created a website with Python, then it’s likely that you’ve heard of Flask and Django. Flask and Django are the industry standard in Python when it comes to doing nearly anything with the HTTP protocol in Python. Fla...
Python | Pandas Series.drop() - GeeksforGeeks
15 Feb, 2019 Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.drop() function return Series with s...
[ { "code": null, "e": 25537, "s": 25509, "text": "\n15 Feb, 2019" }, { "code": null, "e": 25794, "s": 25537, "text": "Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label...
Difference between std::set::lower_bound and std::lower_bound in C++ - GeeksforGeeks
07 May, 2020 Prerequisite: Random-access Iterators in C++, Bidirectional Iterators in C++. std::lower_bound in C++:The lower_bound() method in C++ is used to return an iterator pointing to the first element in the range [first, last) which has a value not less than the given value. This means that the function returns ...
[ { "code": null, "e": 25369, "s": 25341, "text": "\n07 May, 2020" }, { "code": null, "e": 25447, "s": 25369, "text": "Prerequisite: Random-access Iterators in C++, Bidirectional Iterators in C++." }, { "code": null, "e": 25745, "s": 25447, "text": "std::lower_b...
How to negate a predicate function in JavaScript ? - GeeksforGeeks
22 Apr, 2021 In this article, we will see how to negate a predicate function in JavaScript. Predicate functions are the ones that check the condition and return true and false based on argument. Our task is to get the opposite of the predicate function. We follow the following method to get the desired result. Method ...
[ { "code": null, "e": 39215, "s": 39187, "text": "\n22 Apr, 2021" }, { "code": null, "e": 39457, "s": 39215, "text": "In this article, we will see how to negate a predicate function in JavaScript. Predicate functions are the ones that check the condition and return true and false ...
Minimum number of adjacent swaps required to convert a permutation to another permutation by given condition - GeeksforGeeks
02 Mar, 2022 Given a permutation P of size N, having values from 1 to N. the task is to find the minimum number of adjacent swaps required such that for all i in the range [1, N], P[i] does not equal i.Examples: Input: P = [1, 4, 3, 5, 2] Output: 2 Explanation: Here P = [1, 4, 3, 5, 2] at index 1, 2, 3, 4, 5. As we c...
[ { "code": null, "e": 25941, "s": 25913, "text": "\n02 Mar, 2022" }, { "code": null, "e": 26142, "s": 25941, "text": "Given a permutation P of size N, having values from 1 to N. the task is to find the minimum number of adjacent swaps required such that for all i in the range [1, ...
Integer lowestOneBit() Method in Java - GeeksforGeeks
13 Dec, 2021 The Integer.lowestOneBit() method of java.lang is an inbuilt function that returns an int value with at most a single one-bit, in the position of the lowest-order (ie.rightmost) one-bit in the specified int value. This method will return zero if the specified value has no one-bits in its two’s complement b...
[ { "code": null, "e": 25225, "s": 25197, "text": "\n13 Dec, 2021" }, { "code": null, "e": 25627, "s": 25225, "text": "The Integer.lowestOneBit() method of java.lang is an inbuilt function that returns an int value with at most a single one-bit, in the position of the lowest-order ...
Difference between promise and async await in Node.js - GeeksforGeeks
18 Apr, 2022 There are different ways to handle operations in NodeJS or in JavaScript. For asynchronous execution, different processes run simultaneously and are handled once the result of each process is available. There are different ways to handle the asynchronous code in NodeJS or in JavaScript which are: Callbacks...
[ { "code": null, "e": 25818, "s": 25790, "text": "\n18 Apr, 2022" }, { "code": null, "e": 26116, "s": 25818, "text": "There are different ways to handle operations in NodeJS or in JavaScript. For asynchronous execution, different processes run simultaneously and are handled once t...
Maximize element at index K in an array with at most sum M and difference between adjacent elements at most 1 - GeeksforGeeks
28 Feb, 2022 Given a positive integer N, the task is to construct an array of length N and find the maximize the value at index K such that the sum of all the array elements is at most M and the absolute difference between any two consecutive array elements is at most 1. Examples: Input: N = 3, M = 7, K = 1Output: 3Exp...
[ { "code": null, "e": 26221, "s": 26193, "text": "\n28 Feb, 2022" }, { "code": null, "e": 26480, "s": 26221, "text": "Given a positive integer N, the task is to construct an array of length N and find the maximize the value at index K such that the sum of all the array elements is...
How to generate QR Codes with a custom logo using Python ? - GeeksforGeeks
23 Jan, 2022 In this article, we will discuss how to generate a QR code with an image at its center. We are going to generate a QR code of any text, link, etc., and put an image in the center of that QR code such that it represents a branded QR code Pillow: It is a lightweight image processing tool that aid in editing,...
[ { "code": null, "e": 25562, "s": 25534, "text": "\n23 Jan, 2022" }, { "code": null, "e": 25799, "s": 25562, "text": "In this article, we will discuss how to generate a QR code with an image at its center. We are going to generate a QR code of any text, link, etc., and put an imag...
Compressing a File in Golang - GeeksforGeeks
07 Apr, 2022 As per Wikipedia, data compression or file compression can be understood as a process of reducing the size of a particular file/folder/whatever data while still preserving the original data. Lesser file size has a lot of benefits as it will then occupy lesser storage area giving you more space for other da...
[ { "code": null, "e": 25729, "s": 25701, "text": "\n07 Apr, 2022" }, { "code": null, "e": 26434, "s": 25729, "text": "As per Wikipedia, data compression or file compression can be understood as a process of reducing the size of a particular file/folder/whatever data while still pr...
How to Calculate Correlation Between Two Columns in Pandas? - GeeksforGeeks
30 Nov, 2021 In this article, we will discuss how to calculate the correlation between two columns in pandas Correlation is used to summarize the strength and direction of the linear association between two quantitative variables. It is denoted by r and values between -1 and +1. A positive value for r indicates a posit...
[ { "code": null, "e": 25555, "s": 25527, "text": "\n30 Nov, 2021" }, { "code": null, "e": 25651, "s": 25555, "text": "In this article, we will discuss how to calculate the correlation between two columns in pandas" }, { "code": null, "e": 25940, "s": 25651, "te...
Sets in JavaScript - GeeksforGeeks
28 Apr, 2022 In this article, we would be discussing the Set object provided by ES6. A set is a collection of items which are unique i.e no element can be repeated. Set in ES6 are ordered: elements of the set can be iterated in the insertion order. Set can store any types of values whether primitive or objects.Syntax: ...
[ { "code": null, "e": 25691, "s": 25663, "text": "\n28 Apr, 2022" }, { "code": null, "e": 26000, "s": 25691, "text": "In this article, we would be discussing the Set object provided by ES6. A set is a collection of items which are unique i.e no element can be repeated. Set in ES6 ...
XOR of pairwise sum of every unordered pairs in an array - GeeksforGeeks
24 Nov, 2021 Given an array arr[] of length N, the task is to find the XOR of pairwise sum of every possible unordered pairs of the array. The unordered pairs sum is defined as follows – XOR of pairwise sum = (A[0] + A[1]) ^ (A[0] + A[2]) ^ ...(A[0] + A[N]) ^ (A[1] + A[2]) ^ ...(A[1] + A[N]) ^ ....... ...
[ { "code": null, "e": 25943, "s": 25915, "text": "\n24 Nov, 2021" }, { "code": null, "e": 26119, "s": 25943, "text": "Given an array arr[] of length N, the task is to find the XOR of pairwise sum of every possible unordered pairs of the array. The unordered pairs sum is defined as...
Express.js res.download() Function - GeeksforGeeks
07 Jul, 2020 The res.download() function transfers the file at path as an ‘attachment’. Typically, browsers will prompt the user to download. Syntax: res.download(path [, filename] [, options] [, fn]) Parameters: The filename is the name of the file which is to be downloaded as attachment and fn is a callback function....
[ { "code": null, "e": 30835, "s": 30807, "text": "\n07 Jul, 2020" }, { "code": null, "e": 30964, "s": 30835, "text": "The res.download() function transfers the file at path as an ‘attachment’. Typically, browsers will prompt the user to download." }, { "code": null, "e...
PHP | MySQL Select Query - GeeksforGeeks
03 Mar, 2018 The SQL SELECT statement is used to select the records from database tables. Syntax :The basic syntax of the select clause is – To select all columns from the table, the character is used. Implementation of the Select Query :Let us consider the following table ‘ Data ‘ with three columns ‘ FirstName ‘, ‘ ...
[ { "code": null, "e": 24320, "s": 24292, "text": "\n03 Mar, 2018" }, { "code": null, "e": 24397, "s": 24320, "text": "The SQL SELECT statement is used to select the records from database tables." }, { "code": null, "e": 24448, "s": 24397, "text": "Syntax :The b...
How to dynamically change color by percentage CSS ? - GeeksforGeeks
16 Apr, 2021 In this article, we will learn How to dynamically change color by percentage CSS. Approach: We can dynamically change the color of any element by percentage using the filter property in CSS. The brightness() function of the filter property is used to dynamically change color by percentage. The brightness f...
[ { "code": null, "e": 25026, "s": 24998, "text": "\n16 Apr, 2021" }, { "code": null, "e": 25108, "s": 25026, "text": "In this article, we will learn How to dynamically change color by percentage CSS." }, { "code": null, "e": 25406, "s": 25108, "text": "Approach...
Absolute Positioning Using CSS
We can define positioning of an element in CSS as absolute which renders the element relative to the first positioned (except static) parent. Elements with positioning method as absolute are positioned by CSS Positioning properties (left, right, top and bottom). Let’s see an example for CSS Absolute Positioning Method ...
[ { "code": null, "e": 1325, "s": 1062, "text": "We can define positioning of an element in CSS as absolute which renders the element relative to the first positioned (except static) parent. Elements with positioning method as absolute are positioned by CSS Positioning properties (left, right, top and...
How to Calculate the Mode of NumPy Array? - GeeksforGeeks
12 Jan, 2022 In this article, we will discuss how to calculate the mode of the Numpy Array. Mode refers to the most repeating element in the array. We can find the mode from the NumPy array by using the following methods. Let us see the syntax of the mode() function Syntax : variable = stats.mode(array_variable) Note ...
[ { "code": null, "e": 24292, "s": 24264, "text": "\n12 Jan, 2022" }, { "code": null, "e": 24371, "s": 24292, "text": "In this article, we will discuss how to calculate the mode of the Numpy Array." }, { "code": null, "e": 24501, "s": 24371, "text": "Mode refers...
Basic Python Programming Challenges
In this tutorial, we are going to write a solution for a challenge. We have to generate a random set of basic arithmetic operations. The user will give the number of questions, and we have to generate questions. After every question, the user will answer it. At the end of the program, we have to give the score. Let's t...
[ { "code": null, "e": 1130, "s": 1062, "text": "In this tutorial, we are going to write a solution for a challenge." }, { "code": null, "e": 1389, "s": 1130, "text": "We have to generate a random set of basic arithmetic operations. The user will give the number of questions, and w...
Java Program to illustrate the Usage of HexaDecimal
06 Jun, 2021 A decimal number is the sum of digits multiplied with a power of 10. Decimal numbers are represented with base 10 whereas hexadecimal Number is the sum of digits multiplied with the power of 16, somehow there are similar traits in the internal working of them just they are two different ways to present a n...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Jun, 2021" }, { "code": null, "e": 605, "s": 28, "text": "A decimal number is the sum of digits multiplied with a power of 10. Decimal numbers are represented with base 10 whereas hexadecimal Number is the sum of digits multiplied wi...
Understanding Python Dataclasses
06 Aug, 2021 DataClasses has been added in a recent addition in python 3.7 as a utility tool for storing data. DataClasses provides a decorator and functions for automatically adding generated special methods such as __init__() , __repr__() and __eq__() to user-defined classes. DataClasses are like normal classes in Py...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Aug, 2021" }, { "code": null, "e": 294, "s": 28, "text": "DataClasses has been added in a recent addition in python 3.7 as a utility tool for storing data. DataClasses provides a decorator and functions for automatically adding gener...
MySQL query to set values for NULL occurrence
Find NULL values using the IS NULL and update the new values using MySQL UPDATE and SET − update yourTableName set yourColumnName=yourValue where yourColumnName IS NULL; Let us first create a table − mysql> create table DemoTable768 ( Clientid int NOT NULL AUTO_INCREMENT PRIMARY KEY, ClientName varchar(100), C...
[ { "code": null, "e": 1277, "s": 1187, "text": "Find NULL values using the IS NULL and update the new values using MySQL UPDATE and SET −" }, { "code": null, "e": 1357, "s": 1277, "text": "update yourTableName\nset yourColumnName=yourValue\nwhere yourColumnName IS NULL;" }, { ...
White and black dot detection using OpenCV | Python
19 Jul, 2019 Image processing using Python is one of the hottest topics in today’s world. But image processing is a bit complex and beginners get bored in their first approach. So in this article, we have a very basic image processing python program to count black dots in white surface and white dots in the black surfa...
[ { "code": null, "e": 53, "s": 25, "text": "\n19 Jul, 2019" }, { "code": null, "e": 450, "s": 53, "text": "Image processing using Python is one of the hottest topics in today’s world. But image processing is a bit complex and beginners get bored in their first approach. So in this...
Partition the array into three equal sum segments
06 Jul, 2021 Given an array of n integers, we have to partition the array into three segments such that all the segments have an equal sum. Segment sum is the sum of all the elements in the segment. Examples: Input : 1, 3, 6, 2, 7, 1, 2, 8 Output : [1, 3, 6], [2, 7, 1], [2, 8] Input : 7, 6, 1, 7 Output : [7], [6,...
[ { "code": null, "e": 54, "s": 26, "text": "\n06 Jul, 2021" }, { "code": null, "e": 240, "s": 54, "text": "Given an array of n integers, we have to partition the array into three segments such that all the segments have an equal sum. Segment sum is the sum of all the elements in t...
Spring Security – In-Memory Authentication
30 Dec, 2021 Spring Security is a powerful and highly customizable authentication and access-control framework. It is the de-facto standard for securing Spring-based applications. Spring Security is a framework that focuses on providing both authentication and authorization to Java applications. Like all Spring project...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Dec, 2021" }, { "code": null, "e": 516, "s": 52, "text": "Spring Security is a powerful and highly customizable authentication and access-control framework. It is the de-facto standard for securing Spring-based applications. Spring ...
How to add metadata to your Azure Data Lake | by René Bremer | Towards Data Science
A lot of companies consider setting up an Enterprise Data Lake. The idea is to store data in a centralized repository. In this way, it becomes easier for teams to create business value with data. To prevent that a Data Lake becomes a Data Swamp with untrusted data, metadata is key. In this, the following types of metad...
[ { "code": null, "e": 515, "s": 172, "text": "A lot of companies consider setting up an Enterprise Data Lake. The idea is to store data in a centralized repository. In this way, it becomes easier for teams to create business value with data. To prevent that a Data Lake becomes a Data Swamp with untru...
SAP ABAP - User Exits
User exits are used in an extraction if the standard SAP extractors do not provide the expected data or the required functionality, for instance in authorizations or time checks. User exits are commonly used in Sales and Distribution (SD) modules. There are many exits provided by SAP in the areas of sales, transportati...
[ { "code": null, "e": 3358, "s": 2898, "text": "User exits are used in an extraction if the standard SAP extractors do not provide the expected data or the required functionality, for instance in authorizations or time checks. User exits are commonly used in Sales and Distribution (SD) modules. There...
How to move mouse pointer to a specific position using JavaScript ? - GeeksforGeeks
30 Nov, 2021 In this article, we will learn how to move a mouse pointer to any specific position in the web browser using JavaScript. Before we start, you need to know that it’s not actually possible to move the mouse pointer to a position using Javascript, such functionality can we easily misused but we can simulate s...
[ { "code": null, "e": 24245, "s": 24217, "text": "\n30 Nov, 2021" }, { "code": null, "e": 24570, "s": 24245, "text": "In this article, we will learn how to move a mouse pointer to any specific position in the web browser using JavaScript. Before we start, you need to know that it’...
Setting the limits on a colorbar of a contour plot in Matplotlib
To set the limits on a colorbar of a countour plot in Matplotlib, we can take the following steps − Set the figure size and adjust the padding between and around the subplots. Create x and y data points using numpy. Get the data using x and y. Get the coordinate matrices from the coordinate vectors. Initialize vmin and...
[ { "code": null, "e": 1162, "s": 1062, "text": "To set the limits on a colorbar of a countour plot in Matplotlib, we can take the following steps −" }, { "code": null, "e": 1238, "s": 1162, "text": "Set the figure size and adjust the padding between and around the subplots." }, ...
LESS - Extend
Extend is a LESS pseudo class which extends other selector styles in one selector by using :extend selector. The following example demonstrates the use of extend in the LESS file − <!doctype html> <head> <link rel = "stylesheet" href = "style.css" type = "text/css" /> </head> <body> <div class = "...
[ { "code": null, "e": 2659, "s": 2550, "text": "Extend is a LESS pseudo class which extends other selector styles in one selector by using :extend selector." }, { "code": null, "e": 2731, "s": 2659, "text": "The following example demonstrates the use of extend in the LESS file −" ...
Generating Regressions in the Automated Data Analysis Process | by Peter Grant | Towards Data Science
This is the sixth article in a four part series teaching you how to automate scientific data analysis. The first article introduced the concept, provided motivation, and described the general process. The second, third, and fourth articles described how to control data sets, identify the conditions in each test, proces...
[ { "code": null, "e": 783, "s": 171, "text": "This is the sixth article in a four part series teaching you how to automate scientific data analysis. The first article introduced the concept, provided motivation, and described the general process. The second, third, and fourth articles described how t...
How to Develop Optimization Models in Python | by Idil Ismiguzel | Towards Data Science
Determining how to design and operate a system in the best way, under the given circumstances such as allocation of scarce resources, usually requires leveraging on quantitative methods in decision making. Mathematical optimization is one of the main approaches for deciding the best action for a given situation. It con...
[ { "code": null, "e": 655, "s": 172, "text": "Determining how to design and operate a system in the best way, under the given circumstances such as allocation of scarce resources, usually requires leveraging on quantitative methods in decision making. Mathematical optimization is one of the main appr...
Bell Numbers | Practice | GeeksforGeeks
Given a set of n elements, find number of ways of partitioning it. Example 1: Input: N = 2 Output: 2 Explanation: Let the set be {1, 2}: { {1}, {2} } { {1, 2} } Example 2: Input: N = 3 Output: 5 Your Task: You don't need to read input or print anything. Your task is to complete the function bellNumber() which ...
[ { "code": null, "e": 293, "s": 226, "text": "Given a set of n elements, find number of ways of partitioning it." }, { "code": null, "e": 306, "s": 295, "text": "Example 1:" }, { "code": null, "e": 390, "s": 306, "text": "Input:\nN = 2\nOutput: 2\nExplanation:\...
Automate Entity Extraction of Reddit Subgroup using BERT Model | by Manmohan Singh | Towards Data Science
Stuck behind the paywall? Read this article with my Friend link here. Named-Entity recognition (NER) is a process to extract information from an Unstructured Text. Its also known as Entity Extraction. This method extracts information such as time, place, currency, organizations, medical codes, person names, etc. We can...
[ { "code": null, "e": 241, "s": 171, "text": "Stuck behind the paywall? Read this article with my Friend link here." }, { "code": null, "e": 553, "s": 241, "text": "Named-Entity recognition (NER) is a process to extract information from an Unstructured Text. Its also known as Enti...
Powershell - Set System Time
Set-Date cmdlet is used to set System Time. In this example, we're using Get-Date to get current date Type the following command in PowerShell ISE Console get-date -displayHint time You can see following output in PowerShell console. 10:04:18 AM In this example, we're using Set-Date to adjust to 60 minutes. Type the f...
[ { "code": null, "e": 2078, "s": 2034, "text": "Set-Date cmdlet is used to set System Time." }, { "code": null, "e": 2136, "s": 2078, "text": "In this example, we're using Get-Date to get current date" }, { "code": null, "e": 2189, "s": 2136, "text": "Type the ...
Java JDOM Parser - Create XML Document
Here is the XML file that we need to create − <?xml version = "1.0" encoding = "UTF-8"?> <cars> <supercars company = "Ferrari"> <carname type = "formula one">Ferrari 101</carname> <carname type = "sports">Ferrari 202</carname> </supercars> </cars> import java.io.IOException; import org.jdom2.Attribut...
[ { "code": null, "e": 2369, "s": 2323, "text": "Here is the XML file that we need to create −" }, { "code": null, "e": 2589, "s": 2369, "text": "<?xml version = \"1.0\" encoding = \"UTF-8\"?>\n<cars>\n <supercars company = \"Ferrari\">\n <carname type = \"formula one\">Ferr...
How to pick an image from image gallery in Android?
This example demonstrates how do I pick an image from image gallery in android app 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"?> <Line...
[ { "code": null, "e": 1145, "s": 1062, "text": "This example demonstrates how do I pick an image from image gallery in android app" }, { "code": null, "e": 1274, "s": 1145, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required det...
Change Fill and Border Color of ggplot2 Plot in R - GeeksforGeeks
17 Jun, 2021 In this article, we are going to see various methods to add color into a ggplot2 in the R programming language. We will select a bar plot as an example to see how we can change the color of the fill of the bar as well as the borders. First, you need to install the ggplot2 package if it is not previously in...
[ { "code": null, "e": 24783, "s": 24755, "text": "\n17 Jun, 2021" }, { "code": null, "e": 25017, "s": 24783, "text": "In this article, we are going to see various methods to add color into a ggplot2 in the R programming language. We will select a bar plot as an example to see how ...
Exploratory Data Analysis ...A topic that is neglected in Data Science Projects | by sunil kumar | Towards Data Science
Exploratory Data Analysis The topics that we are going to discuss as part of Exploratory Data Analysis are: What is Exploratory Data Analysis? Why do we do EDA? What are the steps in EDA? What are the tools used for EDA? What happens if we don’t do EDA? What is Exploratory Data Analysis? Exploratory Data Analysis (EDA)...
[ { "code": null, "e": 198, "s": 172, "text": "Exploratory Data Analysis" }, { "code": null, "e": 280, "s": 198, "text": "The topics that we are going to discuss as part of Exploratory Data Analysis are:" }, { "code": null, "e": 315, "s": 280, "text": "What is E...
SQLAlchemy ORM - Eager Loading
Eager load reduces the number of queries. SQLAlchemy offers eager loading functions invoked via query options which give additional instructions to the Query. These options determine how to load various attributes via the Query.options() method. We want that Customer.invoices should load eagerly. The orm.subqueryload()...
[ { "code": null, "e": 2586, "s": 2340, "text": "Eager load reduces the number of queries. SQLAlchemy offers eager loading functions invoked via query options which give additional instructions to the Query. These options determine how to load various attributes via the Query.options() method." }, ...
Handling Big Datasets for Machine Learning | by Matthew Stewart, PhD Researcher | Towards Data Science
More than 2.5 quintillion bytes of data are created each day. 90% of the data in the world was generated in the past two years. The prevalence of data will only increase, so we need to learn how to deal with such large data. “Big Data is like teenage sex: everyone talks about it, nobody really knows how to do it, every...
[ { "code": null, "e": 397, "s": 172, "text": "More than 2.5 quintillion bytes of data are created each day. 90% of the data in the world was generated in the past two years. The prevalence of data will only increase, so we need to learn how to deal with such large data." }, { "code": null, ...
var keyword in C#
22 Jun, 2020 Keywords are the words in a language that are used for some internal process or represent some predefined actions. var is a keyword, it is used to declare an implicit type variable, that specifies the type of a variable based on initial value. Syntax: var variable_name = value; Example: Input: a = 637 ...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Jun, 2020" }, { "code": null, "e": 272, "s": 28, "text": "Keywords are the words in a language that are used for some internal process or represent some predefined actions. var is a keyword, it is used to declare an implicit type var...
Python program to update a dictionary with the values from a dictionary list
03 Sep, 2021 Given a dictionary and dictionary list, update the dictionary with dictionary list values. Input : test_dict = {“Gfg” : 2, “is” : 1, “Best” : 3}, dict_list = [{‘for’ : 3, ‘all’ : 7}, {‘and’ : 1, ‘CS’ : 9}] Output : {‘Gfg’: 2, ‘is’: 1, ‘Best’: 3, ‘for’: 3, ‘all’: 7, ‘and’: 1, ‘CS’: 9} Explanation : All dict...
[ { "code": null, "e": 53, "s": 25, "text": "\n03 Sep, 2021" }, { "code": null, "e": 144, "s": 53, "text": "Given a dictionary and dictionary list, update the dictionary with dictionary list values." }, { "code": null, "e": 402, "s": 144, "text": "Input : test_d...
Explain Chosen and Select2 with examples
31 Jul, 2020 The two jQuery plugins, Chosen and Select2 are used to style the select boxes. It improves the look of select boxes, enhances its behavior, thus making them much more user-friendly. They can be used for both single select boxes and multiple select boxes. These jQuery libraries need to be added: select2.min...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Jul, 2020" }, { "code": null, "e": 283, "s": 28, "text": "The two jQuery plugins, Chosen and Select2 are used to style the select boxes. It improves the look of select boxes, enhances its behavior, thus making them much more user-fri...
TimeZone getDefault() Method in Java with Examples
02 Jan, 2019 The getDefault() method of TimeZone class in Java is used to know the default TimeZone for this system or host. This may vary in according to the implementation in different environment. Syntax: public static TimeZone getDefault() Parameters: The method does not take any parameters. Return Value: The metho...
[ { "code": null, "e": 28, "s": 0, "text": "\n02 Jan, 2019" }, { "code": null, "e": 215, "s": 28, "text": "The getDefault() method of TimeZone class in Java is used to know the default TimeZone for this system or host. This may vary in according to the implementation in different e...
How to get the current year using JavaScript ?
11 Nov, 2021 In this article, we will know how to get the current year using the build-in method in Javascript. The purpose is to get the current year by using JavaScript getFullYear() method that will return the full year in 4-digit format for some specified date. This method is used to fetch the year from a given Dat...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Nov, 2021" }, { "code": null, "e": 345, "s": 28, "text": "In this article, we will know how to get the current year using the build-in method in Javascript. The purpose is to get the current year by using JavaScript getFullYear() met...
Matplotlib.axes.Axes.axhline() in Python
13 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text, Polygon, etc., and sets the coordinate system. And the instances of Axes supports callbacks through a callbacks attribute. The Axe...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Apr, 2020" }, { "code": null, "e": 328, "s": 28, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The Axes Class contains most of the figure elements: Axis, Tick, Line2D, Text...
React Native FlatList Component
28 Apr, 2021 In this article, We are going to see how to create a FlatList in react-native. For this, we are going to use FlatList component. It is used to render the items in a scrollable list view. Syntax: <FlatList data={} renderItem={} /> Props in FlatList: renderItem: It is used to render the data into the ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Apr, 2021" }, { "code": null, "e": 215, "s": 28, "text": "In this article, We are going to see how to create a FlatList in react-native. For this, we are going to use FlatList component. It is used to render the items in a scrollable...
Count of total Heads and Tails after N flips in a coin
14 Jun, 2021 Given character C and an integer N representing N number of coins in C position where C can be either head or tail. We can flip the coins N times, wherein the ith round the player will flip the face of all the coins whose number is less than or equal to i. The task is to determine the total number of head ...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Jun, 2021" }, { "code": null, "e": 403, "s": 54, "text": "Given character C and an integer N representing N number of coins in C position where C can be either head or tail. We can flip the coins N times, wherein the ith round the p...
Robot Framework in Python
23 Sep, 2021 In this article, we will see the robot framework and we will cover standard libraries and underlying functions, and going forward we will also cover test cases, keywords, variables, and finally organizing the test cases. Robot Framework is a common open-source automation framework for Acceptance Testing, ...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Sep, 2021" }, { "code": null, "e": 276, "s": 54, "text": "In this article, we will see the robot framework and we will cover standard libraries and underlying functions, and going forward we will also cover test cases, keywords, var...
Data Structures and Algorithms | Set 27
11 Nov, 2021 Following questions have been asked in GATE CS 2011 exam. 1) An undirected graph G(V, E) contains n ( n > 2 ) nodes named v1 , v2 ,....vn. Two nodes vi , vj are connected if and only if 0 < |i – j| <= 2. Each edge (vi, vj ) is assigned a weight i + j. A sample graph with n = 4 is shown below. What will be ...
[ { "code": null, "e": 54, "s": 26, "text": "\n11 Nov, 2021" }, { "code": null, "e": 112, "s": 54, "text": "Following questions have been asked in GATE CS 2011 exam." }, { "code": null, "e": 348, "s": 112, "text": "1) An undirected graph G(V, E) contains n ( n >...
Regression with Categorical Variables in R Programming
12 Oct, 2020 Regression is a multi-step process for estimating the relationships between a dependent variable and one or more independent variables also known as predictors or covariates. Regression analysis is mainly used for two conceptually distinct purposes: for prediction and forecasting, where its use has substan...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Oct, 2020" }, { "code": null, "e": 491, "s": 28, "text": "Regression is a multi-step process for estimating the relationships between a dependent variable and one or more independent variables also known as predictors or covariates. ...
PHP | imagerotate() Function
25 Oct, 2019 The imagerotate() function is an inbuilt function in PHP which is used to rotate an image with a given angle in degrees. The rotation center of the image is center. Syntax: resource imagerotate( $image, $angle, $bgd_color, $ignore_transparent = 0 ) Parameters: This function accepts four parameters as ment...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Oct, 2019" }, { "code": null, "e": 193, "s": 28, "text": "The imagerotate() function is an inbuilt function in PHP which is used to rotate an image with a given angle in degrees. The rotation center of the image is center." }, { ...
GATE | GATE-CS-2014-(Set-1) | Question 65
17 Sep, 2021 Which one of the following is FALSE?(A) A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end.(B) Available expression analysis can be used for common subexpression elimination.(C) Live variable analysis can be used for dead code elimination.(D)...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Sep, 2021" }, { "code": null, "e": 583, "s": 52, "text": "Which one of the following is FALSE?(A) A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end.(B) Available expr...
Network Scanning using scapy module – Python
01 Mar, 2020 Scapy is a library supported by both Python2 and Python3. It is used for interacting with the packets on the network. It has several functionalities through which we can easily forge and manipulate the packet. Through scapy module we can create different network tools like ARP Spoofer, Network Scanner, pac...
[ { "code": null, "e": 54, "s": 26, "text": "\n01 Mar, 2020" }, { "code": null, "e": 478, "s": 54, "text": "Scapy is a library supported by both Python2 and Python3. It is used for interacting with the packets on the network. It has several functionalities through which we can easi...
How to get a Date from year, month and day in Java?
The of() method of the java.time.LocalDate class accepts the values of the year, month, and day of month as parameters, creates and returns an object of the LocalDate. Live Demo import java.time.LocalDate; public class Test { public static void main(String[] args) { LocalDate date = LocalDate.of(2014, 9, 11); ...
[ { "code": null, "e": 1230, "s": 1062, "text": "The of() method of the java.time.LocalDate class accepts the values of the year, month, and day of month as parameters, creates and returns an object of the LocalDate." }, { "code": null, "e": 1240, "s": 1230, "text": "Live Demo" }...
turtle.setpos() and turtle.goto() functions in Python - GeeksforGeeks
17 Jul, 2020 The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. This method is used to move the turtle to an absolute position. This method has Aliases: s...
[ { "code": null, "e": 25672, "s": 25644, "text": "\n17 Jul, 2020" }, { "code": null, "e": 25889, "s": 25672, "text": "The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it...
Combining Matrices in R - GeeksforGeeks
07 Sep, 2021 Combining matrices involves the concatenation of two or more smaller matrices, either row or column wise to form a larger matrix. It is basically a data manipulation operation where the involved matrices must be of compatible sizes to execute the operation. Matrices can be combined either horizontally or v...
[ { "code": null, "e": 24598, "s": 24570, "text": "\n07 Sep, 2021" }, { "code": null, "e": 24917, "s": 24598, "text": "Combining matrices involves the concatenation of two or more smaller matrices, either row or column wise to form a larger matrix. It is basically a data manipulati...
Insert Image in a Jupyter Notebook - GeeksforGeeks
28 Nov, 2021 In this article, we will discuss how to insert images in a Jupyter Notebook. There are a few ways to insert images. These are – Direct insertion using the edit menu. Embedding in a markdown cell By python code ( embedding an image in a code cell). Step 1: This method is the easiest. first, change the type...
[ { "code": null, "e": 24390, "s": 24362, "text": "\n28 Nov, 2021" }, { "code": null, "e": 24518, "s": 24390, "text": "In this article, we will discuss how to insert images in a Jupyter Notebook. There are a few ways to insert images. These are –" }, { "code": null, "e"...
Array of Objects in C++ with Examples - GeeksforGeeks
17 Nov, 2021 An array in C/C++ or be it in any programming language is a collection of similar data items stored at contiguous memory locations and elements can be accessed randomly using indices of an array. They can be used to store the collection of primitive data types such as int, float, double, char, etc of any ...
[ { "code": null, "e": 24220, "s": 24192, "text": "\n17 Nov, 2021" }, { "code": null, "e": 24695, "s": 24220, "text": "An array in C/C++ or be it in any programming language is a collection of similar data items stored at contiguous memory locations and elements can be accessed ran...
Nano Text Editor in Linux - GeeksforGeeks
23 Mar, 2020 Nano is a user-friendly, simple and WYSIWYG(What You See Is What You Get) text editor, which improves the features and user-friendliness of UW Pico text editor. Unlike vim editor or any other command-line editor, it doesn’t have any mode. It has an easy GUI(Graphical User Interface) which allows users to i...
[ { "code": null, "e": 25761, "s": 25733, "text": "\n23 Mar, 2020" }, { "code": null, "e": 26157, "s": 25761, "text": "Nano is a user-friendly, simple and WYSIWYG(What You See Is What You Get) text editor, which improves the features and user-friendliness of UW Pico text editor. Un...
A Full End-to-End Deployment of a Machine Learning Algorithm into a Live Production Environment | by Graham Harrison | Towards Data Science
In October 2021 I authored an article on “Deploying Machine Learning and Data Science Projects as Public Web Applications” (see https://towardsdatascience.com/deploying-machine-learning-and-data-science-projects-as-public-web-applications-3abc91088c11). In this article I explored how to deploy Jupyter Notebooks as publ...
[ { "code": null, "e": 426, "s": 172, "text": "In October 2021 I authored an article on “Deploying Machine Learning and Data Science Projects as Public Web Applications” (see https://towardsdatascience.com/deploying-machine-learning-and-data-science-projects-as-public-web-applications-3abc91088c11)." ...
is_displayed() element method - Selenium Python - GeeksforGeeks
27 Apr, 2020 Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests using Selenium WebDriver. To open a webpage using Selenium Python, checkout – Navigating links using get method – Selenium Python. Just being able ...
[ { "code": null, "e": 24540, "s": 24512, "text": "\n27 Apr, 2020" }, { "code": null, "e": 25097, "s": 24540, "text": "Selenium’s Python Module is built to perform automated testing with Python. Selenium Python bindings provides a simple API to write functional/acceptance tests usi...
How to add an element to a javascript object?
JavaScript object notation is like var car = {name:"Benz", "Brand": "Mercedes", model:"open roof"}; if we need to add the price of the Benz car then the code is as follows. Live Demo <html> <body> <p id="demo"></p> <script> var car = {name:"Benz", "Brand": "Mercedes", model:"open roof"}; car.price = "50,000$", ...
[ { "code": null, "e": 1097, "s": 1062, "text": "JavaScript object notation is like" }, { "code": null, "e": 1162, "s": 1097, "text": "var car = {name:\"Benz\", \"Brand\": \"Mercedes\", model:\"open roof\"};" }, { "code": null, "e": 1236, "s": 1162, "text": " if...
How to match a column in a data frame with a column in another data frame in R?
To match a column in a data frame with a column in another data frame, we can use match function. For example, if we have two data frames called df1 and df2 each having one similar column and the second having an extra column then the matching can be done for similar columns and a new column in the first data frame can...
[ { "code": null, "e": 1516, "s": 1062, "text": "To match a column in a data frame with a column in another data frame, we can use match function. For example, if we have two data frames called df1 and df2 each having one similar column and the second having an extra column then the matching can be do...
KnockoutJS - CSS Binding
This binding allows you to define CSS classes for the HTML DOM elements based on certain condition. This is useful in case you need to highlight some data depending on a situation. css: <binding-object> In case of static CSS binding, the parameter can be in the form of JavaScript Object, consisting of property and its...
[ { "code": null, "e": 2033, "s": 1852, "text": "This binding allows you to define CSS classes for the HTML DOM elements based on certain condition. This is useful in case you need to highlight some data depending on a situation." }, { "code": null, "e": 2056, "s": 2033, "text": "c...
TypeScript - Interfaces
An interface is a syntactical contract that an entity should conform to. In other words, an interface defines the syntax that any entity must adhere to. Interfaces define properties, methods, and events, which are the members of the interface. Interfaces contain only the declaration of the members. It is the responsibi...
[ { "code": null, "e": 2201, "s": 2048, "text": "An interface is a syntactical contract that an entity should conform to. In other words, an interface defines the syntax that any entity must adhere to." }, { "code": null, "e": 2507, "s": 2201, "text": "Interfaces define properties,...
How to read contents of a file using Scanner class?
From Java 1.5 Scanner class was introduced. This class accepts a File, InputStream, Path and, String objects, reads all the primitive data types and Strings (from the given source) token by token using regular expressions. By default, whitespace is considered as the delimiter (to break the data into tokens). To read va...
[ { "code": null, "e": 1372, "s": 1062, "text": "From Java 1.5 Scanner class was introduced. This class accepts a File, InputStream, Path and, String objects, reads all the primitive data types and Strings (from the given source) token by token using regular expressions. By default, whitespace is cons...
How to convert a datetime string to millisecond UNIX time stamp?
You can get the current time in milliseconds in Python using the time module. You can get the time in seconds using time.time function(as a floating point value). To convert it to milliseconds, you need to multiply it with 1000 and round it off. import time milliseconds = int(round(time.time() * 1000)) print(milliseco...
[ { "code": null, "e": 1309, "s": 1062, "text": "You can get the current time in milliseconds in Python using the time module. You can get the time in seconds using time.time function(as a floating point value). To convert it to milliseconds, you need to multiply it with 1000 and round it off. " }, ...
How to create a vector with repeated values in R?
There are two methods to create a vector with repeated values in R but both of them have different approaches, first one is by repeating each element of the vector and the second repeats the elements by a specified number of times. Both of these methods use rep function to create the vectors. Consider the below example...
[ { "code": null, "e": 1356, "s": 1062, "text": "There are two methods to create a vector with repeated values in R but both of them have different approaches, first one is by repeating each element of the vector and the second repeats the elements by a specified number of times. Both of these methods...
Python program to print a checkboard pattern of n*n using numpy.
Given the value of n, our task is to display the check board pattern for a n x n matrix. Different types of functions to create arrays with initial value are available in numpy . NumPy is the fundamental package for scientific computing in Python. Step 1: input order of the matrix. Step 2: create n*n matrix using zeros...
[ { "code": null, "e": 1151, "s": 1062, "text": "Given the value of n, our task is to display the check board pattern for a n x n matrix." }, { "code": null, "e": 1310, "s": 1151, "text": "Different types of functions to create arrays with initial value are available in numpy . Num...
How to set margins in an Android LinearLayout programmatically?
This example demonstrate about How to set margins in an Android LinearLayout programmatically. 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.java <? xml version= "1.0" encoding=...
[ { "code": null, "e": 1157, "s": 1062, "text": "This example demonstrate about How to set margins in an Android LinearLayout programmatically." }, { "code": null, "e": 1286, "s": 1157, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all ...
How to draw simple animation using p5.js ? - GeeksforGeeks
04 Oct, 2021 Animation is a method in which a collection of images is combined in a specific way and processed then they appear as moving images. Building animations make on-screen objects seem to be alive. In this article, we will learn to make a simple animation of the house in p5.js by using lines, rectangles and el...
[ { "code": null, "e": 24991, "s": 24963, "text": "\n04 Oct, 2021" }, { "code": null, "e": 25185, "s": 24991, "text": "Animation is a method in which a collection of images is combined in a specific way and processed then they appear as moving images. Building animations make on-sc...
Median of 2 Sorted Arrays of Different Sizes | Practice | GeeksforGeeks
Given two sorted arrays array1 and array2 of size m and n respectively. Find the median of the two sorted arrays. Example 1: Input: m = 3, n = 4 array1[] = {1,5,9} array2[] = {2,3,6,7} Output: 5 Explanation: The middle element for {1,2,3,5,6,7,9} is 5 Example 2: Input: m = 2, n = 4 array1[] = {4,6} array2[] = {1,2,3,5...
[ { "code": null, "e": 352, "s": 238, "text": "Given two sorted arrays array1 and array2 of size m and n respectively. Find the median of the two sorted arrays." }, { "code": null, "e": 363, "s": 352, "text": "Example 1:" }, { "code": null, "e": 491, "s": 363, "...
C++ Program to Implement Selection Sort
In the selection sort technique, the list is divided into two parts. In one part all elements are sorted and in another part the items are unsorted. At first we take the maximum or minimum data from the array. After getting the data (say minimum) we place it at the beginning of the list by replacing the data of first p...
[ { "code": null, "e": 1494, "s": 1062, "text": "In the selection sort technique, the list is divided into two parts. In one part all elements are sorted and in another part the items are unsorted. At first we take the maximum or minimum data from the array. After getting the data (say minimum) we pla...
How to specify the file path in a tkinter filedialog?
Tkinter offers several built-in functions and class library methods to build components and user-actionable items of an application. filedialog is one of the tkinter modules that provides classes and library functions to create file/directory selection windows. You can use filedialog where you need to ask the user to b...
[ { "code": null, "e": 1427, "s": 1062, "text": "Tkinter offers several built-in functions and class library methods to build components and user-actionable items of an application. filedialog is one of the tkinter modules that provides classes and library functions to create file/directory selection ...
How to Generate Music using a LSTM Neural Network in Keras | by Sigurður Skúli | Towards Data Science
Neural networks are being used to improve all aspects of our lives. They provide us with recommendations for items we want to purchase, generate text based on the style of an author and can even be used to change the art style of an image. In recent years, there have been a number of tutorials on how to generate text u...
[ { "code": null, "e": 683, "s": 171, "text": "Neural networks are being used to improve all aspects of our lives. They provide us with recommendations for items we want to purchase, generate text based on the style of an author and can even be used to change the art style of an image. In recent years...
Matplotlib - Cursor Widget - GeeksforGeeks
15 Mar, 2021 Matplotlib is a Data Visualization library in python. It consists of many widgets that are designed to work for any of the GUI backends. Some examples of widgets in matplotlib are Button, CheckButtons, RadioButtons, Cursor, and TextBox. In this article, the Cursor Widget of Matplotlib library has been disc...
[ { "code": null, "e": 23925, "s": 23897, "text": "\n15 Mar, 2021" }, { "code": null, "e": 24239, "s": 23925, "text": "Matplotlib is a Data Visualization library in python. It consists of many widgets that are designed to work for any of the GUI backends. Some examples of widgets i...
Configuration file parser in Python (configparser)
The configparser module from Python's standard library defines functionality for reading and writing configuration files as used by Microsoft Windows OS. Such files usually have .INI extension. The INI file consists of sections, each led by a [section] header. Between square brackets, we can put the section’s name. Sec...
[ { "code": null, "e": 1256, "s": 1062, "text": "The configparser module from Python's standard library defines functionality for reading and writing configuration files as used by Microsoft Windows OS. Such files usually have .INI extension." }, { "code": null, "e": 1538, "s": 1256, ...
How to convert an std::string to const char* or char* in C++?
You can use the c_str() method of the string class to get a const char* with the string contents. #include<iostream> using namespace std; int main() { string x("hello"); const char* ccx = x.c_str(); cout << ccx; } This will give the output − hello To get a char*, use the copy function. #include<iostream> usi...
[ { "code": null, "e": 1161, "s": 1062, "text": "You can use the c_str() method of the string class to get a const char* with the string contents. " }, { "code": null, "e": 1287, "s": 1161, "text": "#include<iostream>\nusing namespace std;\n\nint main() {\n string x(\"hello\");\n...
EVM - Cost Variance
Cost Variance (CV) is a very important factor to measure project performance. CV indicates how much over - or under-budget the project is. CV can be calculated using the following formula: Cost Variance (CV) = Earned Value (EV) − Actual Cost (AC) OR Cost Variance (CV) = BCWP − ACWP The formula mentioned above gives t...
[ { "code": null, "e": 1843, "s": 1704, "text": "Cost Variance (CV) is a very important factor to measure project performance. CV indicates how much over - or under-budget the project is." }, { "code": null, "e": 1893, "s": 1843, "text": "CV can be calculated using the following fo...
Bootstrap class input-group-xs
To make extra small input group, use the input-group-xs. You can try to run the following code to implement the input-group-xs class in Bootstrap − Live Demo <!DOCTYPE html> <html> <head> <title>Bootstrap Example</title> <link href = "/bootstrap/css/bootstrap.min.css" rel = "stylesheet"> <script sr...
[ { "code": null, "e": 1119, "s": 1062, "text": "To make extra small input group, use the input-group-xs." }, { "code": null, "e": 1210, "s": 1119, "text": "You can try to run the following code to implement the input-group-xs class in Bootstrap −" }, { "code": null, "e...
Detecting communities in social networks using Girvan Newman algorithm in Python - GeeksforGeeks
05 Sep, 2020 Prerequisite– Python Basics, NetworkX Basics We are going to divide the nodes of the graph into two or more communities using the Girvan Newman algorithm. The Girvan Newman Algorithm removes the edges with the highest betweenness until there are no edges remain. Betweenness is the number of the shortest pa...
[ { "code": null, "e": 24681, "s": 24653, "text": "\n05 Sep, 2020" }, { "code": null, "e": 24726, "s": 24681, "text": "Prerequisite– Python Basics, NetworkX Basics" }, { "code": null, "e": 25036, "s": 24726, "text": "We are going to divide the nodes of the graph...
Reverse bits of a positive integer number in Python - GeeksforGeeks
19 Nov, 2020 Given an positive integer and size of bits, reverse all bits of it and return the number with reversed bits. Examples: Input : n = 1, bitSize=32 Output : 2147483648 On a machine with size of bit as 32. Reverse of 0....001 is 100....0. Input : n = 2147483648, bitSize=32 Output : 1 We can solve this p...
[ { "code": null, "e": 23925, "s": 23897, "text": "\n19 Nov, 2020" }, { "code": null, "e": 24034, "s": 23925, "text": "Given an positive integer and size of bits, reverse all bits of it and return the number with reversed bits." }, { "code": null, "e": 24044, "s": 2...
Subscript and SuperScript a string in Android?
This example demonstrates how do I Subscript and SuperScript a string 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"?> <Rela...
[ { "code": null, "e": 1144, "s": 1062, "text": "This example demonstrates how do I Subscript and SuperScript a string in android." }, { "code": null, "e": 1273, "s": 1144, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required deta...
Creating and training a U-Net model with PyTorch for 2D & 3D semantic segmentation: Training [3/4] | by Johannes Schmidt | Towards Data Science
In the previous chapters we created our dataset and built the U-Net model. Now it is time to start training. For that we will write our own training loop within a simple Trainer class and save it in trainer.py. The Jupyter notebook can be found here. The idea is that we can instantiate a Trainer object with parameters ...
[ { "code": null, "e": 736, "s": 171, "text": "In the previous chapters we created our dataset and built the U-Net model. Now it is time to start training. For that we will write our own training loop within a simple Trainer class and save it in trainer.py. The Jupyter notebook can be found here. The ...