title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Object Oriented Programming in Python | Set 2 (Data Hiding and Object Printing)
07 Jun, 2022 Prerequisite: Object-Oriented Programming in Python | Set 1 (Class, Object and Members) Data hiding In Python, we use double underscore (Or __) before the attributes name and those attributes will not be directly visible outside. Python class MyClass: # Hidden member of MyClass __hiddenVariable ...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Jun, 2022" }, { "code": null, "e": 140, "s": 52, "text": "Prerequisite: Object-Oriented Programming in Python | Set 1 (Class, Object and Members)" }, { "code": null, "e": 154, "s": 140, "text": " Data hiding " ...
turtle.clone() function in Python
21 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. The turtle.clone() method is used to create and return a clone of the turtle with the same...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jul, 2020" }, { "code": null, "e": 245, "s": 28, "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 needs a ver...
Vector remove() Method in Java
26 Nov, 2018 remove(int index)The java.util.vector.remove(int index) method is used to remove an element from a Vector from a specific position or index.Syntax:Vector.remove(int index)Parameters: This method accepts a mandatory parameter index is of integer data type and specifies the position of the element to be remo...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Nov, 2018" }, { "code": null, "e": 1442, "s": 28, "text": "remove(int index)The java.util.vector.remove(int index) method is used to remove an element from a Vector from a specific position or index.Syntax:Vector.remove(int index)Par...
Underscore.js _.pluck Function
24 Nov, 2021 The Underscore.js is a JavaScript library that provides a lot of useful functions that helps in the programming in a big way like the map, filter, invoke, etc even without using any built-in objects. The _.pluck() function is used when we need to extract a list of a given property. Like we have to find out...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Nov, 2021" }, { "code": null, "e": 228, "s": 28, "text": "The Underscore.js is a JavaScript library that provides a lot of useful functions that helps in the programming in a big way like the map, filter, invoke, etc even without usi...
How to add an image as background image of a web page ?
20 Aug, 2021 In this article, we will be adding an image as the background image of a web page. Background images are used to make a website more interactive and attractive. It can be applied in many stylings. Approach: In the body tag, specify a background image in the background attribute by passing the URL of the im...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Aug, 2021" }, { "code": null, "e": 225, "s": 28, "text": "In this article, we will be adding an image as the background image of a web page. Background images are used to make a website more interactive and attractive. It can be appl...
Check if a larger number divisible by 36
04 Jul, 2022 Given a number, check whether a given number is divisible by 36 or not. The number may be very large and may not fit in any numeric(int, long int, float, etc.) data type.Examples: Input : 72 Output : Yes Input : 244 Output : No Input : 11322134 Output : No Input : 92567812197966231384 Output : Yes A...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Jul, 2022" }, { "code": null, "e": 234, "s": 52, "text": "Given a number, check whether a given number is divisible by 36 or not. The number may be very large and may not fit in any numeric(int, long int, float, etc.) data type.Exam...
How to get weighted random choice in Python?
05 Sep, 2020 Weighted random choices mean selecting random elements from a list or an array by the probability of that element. We can assign a probability to each element and according to that element(s) will be selected. By this, we can select one or more than one element from the list, And it can be achieved in two ...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Sep, 2020" }, { "code": null, "e": 341, "s": 28, "text": "Weighted random choices mean selecting random elements from a list or an array by the probability of that element. We can assign a probability to each element and according to...
Coordinator TabLayout in Android
13 Jan, 2022 Many applications use TabLayout in which we have to show an image above the TabLayout. This type of UI design is mainly seen in Restaurant apps and many more. In this article, we will take a look at implementing the same type of view using Coordinator TabLayout in our Android App using Android Studio. We ...
[ { "code": null, "e": 28, "s": 0, "text": "\n13 Jan, 2022" }, { "code": null, "e": 332, "s": 28, "text": "Many applications use TabLayout in which we have to show an image above the TabLayout. This type of UI design is mainly seen in Restaurant apps and many more. In this article,...
Create a Pandas Series from array
07 Feb, 2019 Pandas Series is a one-dimensional labelled array capable of holding any data type (integers, strings, floating point numbers, Python objects, etc.). It has to be remembered that unlike Python lists, a Series will always contain data of the same type. Let’s see how to create a Pandas Series from the array....
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Feb, 2019" }, { "code": null, "e": 304, "s": 52, "text": "Pandas Series is a one-dimensional labelled array capable of holding any data type (integers, strings, floating point numbers, Python objects, etc.). It has to be remembered ...
How to read request parameters passed in URL using JSP?
The following URL will pass two values to HelloForm program using the GET method. href="http://localhost:8080/main.jsp?first_name=ZARA&last_name=ALI" Below is the main.jsp JSP program to handle input given by web browser. We are going to use the getParameter() method which makes it very easy to access the passed infor...
[ { "code": null, "e": 1269, "s": 1187, "text": "The following URL will pass two values to HelloForm program using the GET method." }, { "code": null, "e": 1338, "s": 1269, "text": "href=\"http://localhost:8080/main.jsp?first_name=ZARA&last_name=ALI\" " }, { "code": null, ...
Numpy | Mathematical Function - GeeksforGeeks
15 Nov, 2018 NumPy contains a large number of various mathematical operations. NumPy provides standard trigonometric functions, functions for arithmetic operations, handling complex numbers, etc. Trigonometric Functions –NumPy has standard trigonometric functions which return trigonometric ratios for a given angle in r...
[ { "code": null, "e": 43366, "s": 43338, "text": "\n15 Nov, 2018" }, { "code": null, "e": 43549, "s": 43366, "text": "NumPy contains a large number of various mathematical operations. NumPy provides standard trigonometric functions, functions for arithmetic operations, handling co...
What is the difference between MySQL DATETIME and TIMESTAMP data type?
Both the data types store data in “YYYY-MM-DD HH:MM:SS” format and include date as well as time. In spite of these similarities they are having the following differences − Range − Datetime data type supports a date along with time in the range between 1000-01-01 00:00:00 and 9999-12-31 23:59:59. But timestamp data type...
[ { "code": null, "e": 1359, "s": 1187, "text": "Both the data types store data in “YYYY-MM-DD HH:MM:SS” format and include date as well as time. In spite of these similarities they are having the following differences −" }, { "code": null, "e": 1609, "s": 1359, "text": "Range − Da...
Sharing a queue among three threads
25 Aug, 2021 Share a queue among three threads A, B, C as per given norms : Thread A generates random integers and pushes them into a shared queue. Threads B and C compete with each other to grab an integer from the queue. The threads B and C compute the sum of integers that they have grabbed from the queue. Compare t...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Aug, 2021" }, { "code": null, "e": 92, "s": 28, "text": "Share a queue among three threads A, B, C as per given norms : " }, { "code": null, "e": 164, "s": 92, "text": "Thread A generates random integers and pushe...
How to remove a specific element from Queue
29 Sep, 2021 Given a queue q[] and an integer K, the task is to define a method to remove a specific element from the queue q[]. If there are multiple occurrences of element K, then, remove the first one from the queue q[]. Examples: Input: q[] = {10, 20, 30, 40, 50, 60}, K = 30Output: {10, 20, 40, 50, 60}Explanation: ...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Sep, 2021" }, { "code": null, "e": 239, "s": 28, "text": "Given a queue q[] and an integer K, the task is to define a method to remove a specific element from the queue q[]. If there are multiple occurrences of element K, then, remov...
How to start any program using PowerShell?
If you have noticed, you can start notepad and calculator or other standard system utilities with the Windows Run or through the PowerShell console directly by typing just their names, but not the wordpad.exe, word, excel or any other application. It will throw an exception. For example, just type notepad.exe in PowerS...
[ { "code": null, "e": 1338, "s": 1062, "text": "If you have noticed, you can start notepad and calculator or other standard system utilities with the Windows Run or through the PowerShell console directly by typing just their names, but not the wordpad.exe, word, excel or any other application. It wi...
C++ Programs To Create Pyramid and Pattern
There are many different pyramid patterns that can be created in C++. These are mostly created using nested for loops. Some of the pyramids that can be created are as follows. The code to create a basic pyramid is given as follows. Live Demo #include <iostream> using namespace std; int main() { int n = 6, i, j; ...
[ { "code": null, "e": 1238, "s": 1062, "text": "There are many different pyramid patterns that can be created in C++. These are mostly created using nested for loops. Some of the pyramids that can be created are as follows." }, { "code": null, "e": 1294, "s": 1238, "text": "The co...
CICS - Aid Keys
As we have discussed in earlier modules, AID keys are known as Attention Identifier Keys. CICS can detect only AID keys. After typing all the input, only when the user presses one of the AID keys, the CICS takes control. AID Keys include ENTER, PF1 to PF24, PA1 to PA3, and CLEAR. The key pressed by the user is checked ...
[ { "code": null, "e": 2207, "s": 1926, "text": "As we have discussed in earlier modules, AID keys are known as Attention Identifier Keys. CICS can detect only AID keys. After typing all the input, only when the user presses one of the AID keys, the CICS takes control. AID Keys include ENTER, PF1 to P...
Build a Gender Classifier in Google Colab using TensorFlow and Keras | by Nachi Muthu | Towards Data Science
Hola amigos!, in this article, we are going to build a CNN based gender classifier using APIs provided by TensorFlow and Keras. We will be writing and execution the code on Google Colab. Colab provides free GPU services. We will be using those to train our model quickly. I will be using Wikipedia images from the IMDB-W...
[ { "code": null, "e": 444, "s": 172, "text": "Hola amigos!, in this article, we are going to build a CNN based gender classifier using APIs provided by TensorFlow and Keras. We will be writing and execution the code on Google Colab. Colab provides free GPU services. We will be using those to train ou...
Implementing Neural Machine Translation with Attention mechanism using Tensorflow | by Renu Khandelwal | Towards Data Science
In this article, you will learn how to implement sequence to sequence(seq2seq) neural machine translation(NMT) using Bahdanau’s Attention mechanism. We will implement the code in Tensorflow 2.0 using Gated Recurrent Unit(GRU). Prerequisites Sequence to Sequence Model using Attention Mechanism An Intuitive explanation o...
[ { "code": null, "e": 399, "s": 172, "text": "In this article, you will learn how to implement sequence to sequence(seq2seq) neural machine translation(NMT) using Bahdanau’s Attention mechanism. We will implement the code in Tensorflow 2.0 using Gated Recurrent Unit(GRU)." }, { "code": null, ...
How To Set Up A Public Minecraft Server | by Sam Starkman | Towards Data Science
Today, I will be showing you the easiest way to set up a public vanilla Minecraft server for you and your friends, without spending a single dollar. Without further ado, let’s begin! In whatever directory you choose, create a new folder — this is where all of the server files will be downloaded and run from. You can do...
[ { "code": null, "e": 354, "s": 171, "text": "Today, I will be showing you the easiest way to set up a public vanilla Minecraft server for you and your friends, without spending a single dollar. Without further ado, let’s begin!" }, { "code": null, "e": 481, "s": 354, "text": "In ...
How do I insert multiple values in a column with a single MySQL query?
To insert multiple values in a column, the syntax is as follows − insert into yourTableName values(yourValue1),(yourValue2),..........N; To understand the above syntax, let us create a table − mysql> create table DemoTable2022 -> ( -> Department varchar(100) -> ); Query OK, 0 rows affected (0.49 sec) Insert so...
[ { "code": null, "e": 1128, "s": 1062, "text": "To insert multiple values in a column, the syntax is as follows −" }, { "code": null, "e": 1199, "s": 1128, "text": "insert into yourTableName values(yourValue1),(yourValue2),..........N;" }, { "code": null, "e": 1255, ...
What are signed and unsigned keywords in C++?
All number types in C++ can either have a sign or not. For example, you can declare an int to only represent positive integers. Unless otherwise specified, all integer data types are signed data types, i.e. they have values which can be positive or negative. The unsigned keyword can be used to declare variables without...
[ { "code": null, "e": 1390, "s": 1062, "text": "All number types in C++ can either have a sign or not. For example, you can declare an int to only represent positive integers. Unless otherwise specified, all integer data types are signed data types, i.e. they have values which can be positive or nega...
C++ program to print values of different data types provided as input
Suppose we are given an integer value, a long value, a character value, a float value, and a double value as inputs. We have to print the values that are given to us as input maintaining their precision. So, if the input is like integer value = 15, long value = 59523256297252, character value = 'y', float value = 367.1...
[ { "code": null, "e": 1266, "s": 1062, "text": "Suppose we are given an integer value, a long value, a character value, a float value, and a double value as inputs. We have to print the values that are given to us as input maintaining their precision." }, { "code": null, "e": 1441, "s...
Java Program to Convert Character to String
The toString() method of the Character class converts the character to string. You can use this method to convert the given character to String. import java.util.Scanner; public class CharToString { public static void main(String args[]){ System.out.println("Enter a character ::"); Scanner sc = new Scann...
[ { "code": null, "e": 1207, "s": 1062, "text": "The toString() method of the Character class converts the character to string. You can use this method to convert the given character to String." }, { "code": null, "e": 1515, "s": 1207, "text": "import java.util.Scanner;\npublic cla...
Google Colab - Adding Forms
Colab provides a very useful utility called Forms that allows you to accept inputs from the user at runtime. Let us now move on to see how to add forms to your notebook. In an earlier lesson, you used the following code to create a time delay − import time print(time.ctime()) time.sleep(5) print (time.ctime()) Suppose...
[ { "code": null, "e": 2211, "s": 2041, "text": "Colab provides a very useful utility called Forms that allows you to accept inputs from the user at runtime. Let us now move on to see how to add forms to your notebook." }, { "code": null, "e": 2286, "s": 2211, "text": "In an earlie...
Ruby on Rails - Framework
A framework is a program, set of programs, and/or code library that writes most of your application for you. When you use a framework, your job is to write the parts of the application that make it do the specific things you want. When you set out to write a Rails application, leaving aside the configuration and other ...
[ { "code": null, "e": 2334, "s": 2103, "text": "A framework is a program, set of programs, and/or code library that writes most of your application for you. When you use a framework, your job is to write the parts of the application that make it do the specific things you want." }, { "code": ...
Life Cycle of a Servlet
19 Oct, 2021 The entire life cycle of a Servlet is managed by the Servlet container which uses the javax.servlet.Servlet interface to understand the Servlet object and manage it. So, before creating a Servlet object, let’s first understand the life cycle of the Servlet object which is actually understanding how the Ser...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Oct, 2021" }, { "code": null, "e": 402, "s": 52, "text": "The entire life cycle of a Servlet is managed by the Servlet container which uses the javax.servlet.Servlet interface to understand the Servlet object and manage it. So, befo...
Java Program to Remove a Given Word From a String
04 Jan, 2022 Given a string and a word that task to remove the word from the string if it exists otherwise return -1 as an output. For more clarity go through the illustration given below as follows. Illustration: Input : This is the Geeks For Geeks word="the" Output : This is Geeks For Geeks Input ...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Jan, 2022" }, { "code": null, "e": 215, "s": 28, "text": "Given a string and a word that task to remove the word from the string if it exists otherwise return -1 as an output. For more clarity go through the illustration given below ...
How to convert categorical string data into numeric in Python?
10 Jan, 2022 The datasets have both numerical and categorical features. Categorical features refer to string data types and can be easily understood by human beings. However, machines cannot interpret the categorical data directly. Therefore, the categorical data must be converted into numerical data for further proces...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Jan, 2022" }, { "code": null, "e": 365, "s": 52, "text": "The datasets have both numerical and categorical features. Categorical features refer to string data types and can be easily understood by human beings. However, machines can...
StringBuilder Class in Java with Examples
10 Jun, 2022 StringBuilder in Java represents a mutable sequence of characters. Since the String Class in Java creates an immutable sequence of characters, the StringBuilder class provides an alternative to String Class, as it creates a mutable sequence of characters. The function of StringBuilder is very much similar ...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Jun, 2022" }, { "code": null, "e": 1244, "s": 52, "text": "StringBuilder in Java represents a mutable sequence of characters. Since the String Class in Java creates an immutable sequence of characters, the StringBuilder class provid...
Perl | grep() Function
20 Jun, 2022 The grep() function in Perl used to extract any element from the given array which evaluates the true value for the given regular expression. Syntax: grep(Expression, @Array) Parameters: Expression : It is the regular expression which is used to run on each elements of the given array. @Array : It is the ...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Jun, 2022" }, { "code": null, "e": 170, "s": 28, "text": "The grep() function in Perl used to extract any element from the given array which evaluates the true value for the given regular expression." }, { "code": null, "...
Merge Sort using Multi-threading
05 Jan, 2022 Merge Sort is a popular sorting technique which divides an array or list into two halves and then start merging them when sufficient depth is reached. Time complexity of merge sort is O(nlogn).Threads are lightweight processes and threads shares with other threads their code section, data section and OS re...
[ { "code": null, "e": 54, "s": 26, "text": "\n05 Jan, 2022" }, { "code": null, "e": 739, "s": 54, "text": "Merge Sort is a popular sorting technique which divides an array or list into two halves and then start merging them when sufficient depth is reached. Time complexity of merg...
Java Interoperability – Calling Java from Kotlin
09 Sep, 2021 Since Kotlin was developed keeping in mind the interoperability with Java. It makes it easier to use Java code from within itself. A Kotlin class or a function can refer to the Java classes and their methods in a simple way. The getters and setters of all the types defined within the Java class are repres...
[ { "code": null, "e": 28, "s": 0, "text": "\n09 Sep, 2021" }, { "code": null, "e": 254, "s": 28, "text": "Since Kotlin was developed keeping in mind the interoperability with Java. It makes it easier to use Java code from within itself. A Kotlin class or a function can refer to th...
Kotlin list : Arraylist
07 Aug, 2019 ArrayList class is used to create a dynamic array in Kotlin. Dynamic array states that we can increase or decrease the size of an array as per requisites. It also provide read and write functionalities. ArrayList may contain duplicates and is non-synchronized in nature. We use ArrayList to access the index...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Aug, 2019" }, { "code": null, "e": 443, "s": 28, "text": "ArrayList class is used to create a dynamic array in Kotlin. Dynamic array states that we can increase or decrease the size of an array as per requisites. It also provide read...
Node.js fs.close() Method
08 Oct, 2021 The fs.close() method is used to asynchronously close the given file descriptor thereby clearing the file that is associated with it. This will allow the file descriptor to be reused for other files. Calling fs.close() on a file descriptor while some other operation is being performed on it may lead to und...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Oct, 2021" }, { "code": null, "e": 352, "s": 28, "text": "The fs.close() method is used to asynchronously close the given file descriptor thereby clearing the file that is associated with it. This will allow the file descriptor to be...
Matplotlib.pyplot.ion() in Python
24 Jan, 2022 Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed to work with the broader SciPy stack. One of the greatest benefits of visualization is that it allows us visual access to huge amount...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Jan, 2022" }, { "code": null, "e": 590, "s": 28, "text": "Matplotlib is an amazing visualization library in Python for 2D plots of arrays. Matplotlib is a multi-platform data visualization library built on NumPy arrays and designed t...
Front Office Management - Night Audit
Auditing is nothing but conducting financial inspection of the organization. For a hotel business, the finance management starts at the front office. Accurate posting of transactions on the guest folios start at the front office, which is further carried to the back-office accounting department. The guest accounts are ...
[ { "code": null, "e": 2493, "s": 2124, "text": "Auditing is nothing but conducting financial inspection of the organization. For a hotel business, the finance management starts at the front office. Accurate posting of transactions on the guest folios start at the front office, which is further carrie...
Essential Linux/Unix Commands
06 Jun, 2022 Unix is now one of the most commonly used Operating systems used for various purposes such as Personal use, Servers, Smartphones, and many more. It was developed in the 1970’s at AT& T Labs by two famous personalities Dennis M. Ritchie and Ken Thompson. You’ll be surprised to know that the most popular p...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jun, 2022" }, { "code": null, "e": 308, "s": 52, "text": "Unix is now one of the most commonly used Operating systems used for various purposes such as Personal use, Servers, Smartphones, and many more. It was developed in the 1970’...
Output of C++ Program | Set 14
28 Sep, 2018 Predict the output of following C++ program. Difficulty Level: Rookie Question 1 #include <iostream>using namespace std; class A{ int id;public: A (int i) { id = i; } void print () { cout << id << endl; }}; int main(){ A a[2]; a[0].print(); a[1].print(); return 0;} There is a compila...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Sep, 2018" }, { "code": null, "e": 99, "s": 54, "text": "Predict the output of following C++ program." }, { "code": null, "e": 124, "s": 99, "text": "Difficulty Level: Rookie" }, { "code": null, "e": ...
MongoDB query to find matching documents given an array with values?
For specific documents, use MongoDB $in. Let us create a collection with documents − > db.demo511.insertOne({"ListOfProject":["Library Management System","Hospital Management System"]}); { "acknowledged" : true, "insertedId" : ObjectId("5e88473a987b6e0e9d18f585") } > db.demo511.insertOne({"ListOfProject":["Online...
[ { "code": null, "e": 1272, "s": 1187, "text": "For specific documents, use MongoDB $in. Let us create a collection with documents −" }, { "code": null, "e": 1821, "s": 1272, "text": "> db.demo511.insertOne({\"ListOfProject\":[\"Library Management System\",\"Hospital\nManagement S...
SQL | CREATE DOMAIN
07 Sep, 2018 Used in : Postgre sqlCREATE DOMAIN creates a new domain. A domain is essentially a data type with optional constraints (restrictions on the allowed set of values). The user who defines a domain becomes its owner. Domains are useful for abstracting common constraints on fields into a single location for mai...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Sep, 2018" }, { "code": null, "e": 265, "s": 52, "text": "Used in : Postgre sqlCREATE DOMAIN creates a new domain. A domain is essentially a data type with optional constraints (restrictions on the allowed set of values). The user w...
Output of C programs | Set 29
28 Jun, 2021 Question 1 #include<stdio.h>int main(){ int i; for (i = 0; i<5; i++) { int i; i = 10; printf("%d ", i) ; } return 0;} 10 10 10 10 10 Explanation:Here, it would seem that, as ‘i’ got assigned a value 10, so the loop will run only one time because the loop condition will ...
[ { "code": null, "e": 54, "s": 26, "text": "\n28 Jun, 2021" }, { "code": null, "e": 65, "s": 54, "text": "Question 1" }, { "code": "#include<stdio.h>int main(){ int i; for (i = 0; i<5; i++) { int i; i = 10; printf(\"%d \", i) ; } return ...
errno constant in C++
14 Aug, 2021 errno is a preprocessor macro used for error indication. The value of errno is set to zero at program startup, and any function of the standard C++ library are allowed to write positive integers to errno whether or not an error occurred. Once the value of errno is changed from zero to non zero then no oth...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Aug, 2021" }, { "code": null, "e": 86, "s": 28, "text": "errno is a preprocessor macro used for error indication. " }, { "code": null, "e": 267, "s": 86, "text": "The value of errno is set to zero at program start...
Java Program to get the prime numbers with BigInteger type
A prime number is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers. Here, we have the BigInteger type, which has operations for modular arithmetic, GCD calculation, primality testing, prime generation, etc. At first, we have set the value to 0 and then considered a while ...
[ { "code": null, "e": 1317, "s": 1062, "text": "A prime number is a natural number greater than 1 that cannot be formed by multiplying two smaller\nnatural numbers. Here, we have the BigInteger type, which has operations for modular arithmetic, GCD\ncalculation, primality testing, prime generation, e...
C++ Program to Implement String Matching Using Vectors
This is another string matching method. In this approach, we are searching for a substring using vectors. In C++ we can create vectors easily using the standard library. We are taking the main string and the string that will be searched as a vector, then searching it into the main string. When one match is found the fu...
[ { "code": null, "e": 1168, "s": 1062, "text": "This is another string matching method. In this approach, we are searching for a substring using vectors." }, { "code": null, "e": 1519, "s": 1168, "text": "In C++ we can create vectors easily using the standard library. We are takin...
How to Get Market Data from the NYSE in Less than 3 Lines (Python). | by Sajid Lhessani | Towards Data Science
Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking professional advice. See our Reader Terms for details. In this article, you...
[ { "code": null, "e": 472, "s": 172, "text": "Note from Towards Data Science’s editors: While we allow independent authors to publish articles in accordance with our rules and guidelines, we do not endorse each author’s contribution. You should not rely on an author’s works without seeking profession...
Create a GUI to convert CSV file into excel file using Python - GeeksforGeeks
20 Jan, 2022 Prerequisites: Python GUI – tkinter, Read csv using pandas CSV file is a Comma Separated Value file that uses a comma to separate values. It is basically used for exchanging data between different applications. In this, individual rows are separated by a newline. Fields of data in each row are delimited wi...
[ { "code": null, "e": 24543, "s": 24515, "text": "\n20 Jan, 2022" }, { "code": null, "e": 24602, "s": 24543, "text": "Prerequisites: Python GUI – tkinter, Read csv using pandas" }, { "code": null, "e": 24862, "s": 24602, "text": "CSV file is a Comma Separated V...
Lua - repeat...until Loop
Unlike the for and while loops, which test the loop condition at the top of the loop, the repeat...until loop in Lua programming language checks its condition at the bottom of the loop. A repeat...until loop is similar to a while loop, except that a do...while loop is guaranteed to execute at least one time. The syntax...
[ { "code": null, "e": 2289, "s": 2103, "text": "Unlike the for and while loops, which test the loop condition at the top of the loop, the repeat...until loop in Lua programming language checks its condition at the bottom of the loop." }, { "code": null, "e": 2413, "s": 2289, "text...
Check if list is strictly increasing in Python
Given a list, we may need to check for the sequence of its elements. In this article we will find out if the elements present in the list are in a strictly increasing order. Below programs achieve that objective. In this approach we first slice each element compare its value to the next element that is sliced. If all s...
[ { "code": null, "e": 1275, "s": 1062, "text": "Given a list, we may need to check for the sequence of its elements. In this article we will find out if the elements present in the list are in a strictly increasing order. Below programs achieve that objective." }, { "code": null, "e": 146...
JDBC Update Example | JDBC Update Query Example | executeUpdate()
PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC EXCEPTIONS COLLECTIONS SWING JDBC JAVA 8 SPRING SPRING BOOT HIBERNATE PYTHON PHP JQUERY PROGRAMMINGJava ExamplesC Examples Java Examples C Examples C Tutorials aws In this tutorials, we are going to understand...
[ { "code": null, "e": 158, "s": 123, "text": "PROGRAMMINGJava ExamplesC Examples" }, { "code": null, "e": 172, "s": 158, "text": "Java Examples" }, { "code": null, "e": 183, "s": 172, "text": "C Examples" }, { "code": null, "e": 195, "s": 183, ...
jQuery | first() with Examples - GeeksforGeeks
12 Jan, 2022 The first() is an inbuilt function in jQuery which is used to select the first element from the specified elements. Syntax: $(selector).first() Here selector is the main class of all the elements.Parameters: It does not accept any parameter.Return value: It returns the first element out of the selected e...
[ { "code": null, "e": 40357, "s": 40329, "text": "\n12 Jan, 2022" }, { "code": null, "e": 40483, "s": 40357, "text": "The first() is an inbuilt function in jQuery which is used to select the first element from the specified elements. Syntax: " }, { "code": null, "e": ...
Erlang - File I/O
Erlang provides a number of methods when working with I/O. It has easier classes to provide the following functionalities for files − Reading files Writing to files Seeing whether a file is a file or directory Let’s explore some of the file operations Erlang has to offer. For the purposes of these examples, we are goin...
[ { "code": null, "e": 2435, "s": 2301, "text": "Erlang provides a number of methods when working with I/O. It has easier classes to provide the following functionalities for files −" }, { "code": null, "e": 2449, "s": 2435, "text": "Reading files" }, { "code": null, "e...
Difference between sizeof(int *) and sizeof(int) in C/C++
19 Oct, 2020 sizeof() is commonly used operator in the C or C++. It is a compile-time unary operator that can be used to compute the size of its operand. The result of sizeof() is of unsigned integral type which is usually denoted by size_t. This operator can be applied to any data-type, including primitive types such ...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Oct, 2020" }, { "code": null, "e": 465, "s": 54, "text": "sizeof() is commonly used operator in the C or C++. It is a compile-time unary operator that can be used to compute the size of its operand. The result of sizeof() is of unsi...
Python Tweepy – Getting the ID of a user
18 Jun, 2020 In this article we will see how we can get the ID of a user. ID is the unique identification marker of the twitter account. ID is given to the user by Twitter, the user can not select or change their own ID. In order to get the ID we have to do the following : Identify the user screen name of the profile.G...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Jun, 2020" }, { "code": null, "e": 236, "s": 28, "text": "In this article we will see how we can get the ID of a user. ID is the unique identification marker of the twitter account. ID is given to the user by Twitter, the user can no...
Signal Handling in C++
07 Dec, 2021 Signals are the interrupts that force an OS to stop its ongoing task and attend the task for which the interrupt has been sent. These interrupts can pause service in any program of an OS. Similarly, C++ also offers various signals which it can catch and process in a program. Here is a list of various signa...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Dec, 2021" }, { "code": null, "e": 426, "s": 54, "text": "Signals are the interrupts that force an OS to stop its ongoing task and attend the task for which the interrupt has been sent. These interrupts can pause service in any prog...
Pylatex module in python
11 Jan, 2019 Latex : Latex pronounced as “Lay-tech” is a document making system for high-quality documentation. It is mostly used for technical or scientific document preparation but it can be used for almost all forms of publishing. Latex is not a word processor like MS Word or LibreOffice Writer. Instead, Latex encou...
[ { "code": null, "e": 53, "s": 25, "text": "\n11 Jan, 2019" }, { "code": null, "e": 61, "s": 53, "text": "Latex :" }, { "code": null, "e": 512, "s": 61, "text": "Latex pronounced as “Lay-tech” is a document making system for high-quality documentation. It is mo...
Get value of a particular cell in PySpark Dataframe
30 Jun, 2021 In this article, we are going to get the value of a particular cell in the pyspark dataframe. For this, we will use the collect() function to get the all rows in the dataframe. We can specify the index (cell positions) to the collect function Creating dataframe for demonstration: Python3 # importing module...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2021" }, { "code": null, "e": 122, "s": 28, "text": "In this article, we are going to get the value of a particular cell in the pyspark dataframe." }, { "code": null, "e": 271, "s": 122, "text": "For this, we...
Python | Pandas Series.str.repeat()
27 Oct, 2021 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes importing and analyzing data much easier.Pandas str.repeat() method is used to repeat string values in the same position of passed seri...
[ { "code": null, "e": 28, "s": 0, "text": "\n27 Oct, 2021" }, { "code": null, "e": 678, "s": 28, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes imp...
Apache Pig - Limit Operator
The LIMIT operator is used to get a limited number of tuples from a relation. Given below is the syntax of the LIMIT operator. grunt> Result = LIMIT Relation_name required number of tuples; Assume that we have a file named student_details.txt in the HDFS directory /pig_data/ as shown below. student_details.txt 001,Raj...
[ { "code": null, "e": 2896, "s": 2818, "text": "The LIMIT operator is used to get a limited number of tuples from a relation." }, { "code": null, "e": 2945, "s": 2896, "text": "Given below is the syntax of the LIMIT operator." }, { "code": null, "e": 3009, "s": 294...
Jump Pointer Algorithm
05 Nov, 2021 The Jump pointer algorithm is a design technique for parallel algorithms that operate on pointer structures, such as arrays or linked list. This algorithm is normally used to determine the root of the forest of a rooted tree. In the jump pointer algorithm, we pre-process a tree so that one can able to answ...
[ { "code": null, "e": 28, "s": 0, "text": "\n05 Nov, 2021" }, { "code": null, "e": 254, "s": 28, "text": "The Jump pointer algorithm is a design technique for parallel algorithms that operate on pointer structures, such as arrays or linked list. This algorithm is normally used to ...
Output of Python Programs | (Dictionary)
04 Oct, 2018 Prerequisite: DictionaryNote: Output of all these programs is tested on Python31.What is the output of the following of code? a = {i: i * i for i in range(6)}print (a) Options:a) Dictionary comprehension doesn’t existb) {0: 0, 1: 1, 2: 4, 3: 9, 4: 16, 5: 25, 6:36}c) {0: 0, 1: 1, 4: 4, 9: 9, 16: 16, 25: 25}...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Oct, 2018" }, { "code": null, "e": 178, "s": 52, "text": "Prerequisite: DictionaryNote: Output of all these programs is tested on Python31.What is the output of the following of code?" }, { "code": "a = {i: i * i for i in ra...
Express.js vs KoaJS in Node.js
14 Sep, 2020 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 NodeJS 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 o...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Sep, 2020" }, { "code": null, "e": 421, "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 NodeJS is not a framework ...
Generating Test Cases (generate() and generate_n() in C++)
29 May, 2017 Generating test cases for array programs can be a cumbersome process. But the generate and generate_n functions in the STL (Standard Template Library), come handy to populate the array with random values. generate()The generate functions assigns random values provided by calling the generator function ‘gen...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 May, 2017" }, { "code": null, "e": 257, "s": 52, "text": "Generating test cases for array programs can be a cumbersome process. But the generate and generate_n functions in the STL (Standard Template Library), come handy to populate...
HTML <a> target Attribute
The target attribute of the <a> element is used to set where the linked document will open. You can set the document to open in a new window, same frame, parent frame, etc. Following is the syntax − <a target="_blank|_self|_parent|_top| frame"> Here, _blank is used to open the linked document in new window or tab, _sel...
[ { "code": null, "e": 1360, "s": 1187, "text": "The target attribute of the <a> element is used to set where the linked document will open. You can set the document to open in a new window, same frame, parent frame, etc." }, { "code": null, "e": 1386, "s": 1360, "text": "Following...
Python - HTTP Server
Python standard library comes with a in-built webserver which can be invoked for simple web client server communication. The port number can be assigned programmatically and the web server is accessed through this port. Though it is not a full featured web server which can parse many kinds of file, it can parse simple ...
[ { "code": null, "e": 2863, "s": 2460, "text": "Python standard library comes with a in-built webserver which can be invoked for simple web client server communication. The port number can be assigned programmatically\nand the web server is accessed through this port. Though it is not a full featured...
Program to print Inverse Diamond pattern
21 Apr, 2021 Given an integer n, the task is to print the Inverse Diamond Pattern in 2n-1 rows.Example: Input: n = 3 Output: *** *** ** ** * * ** ** *** *** Input: n = 7 Output: ******* ******* ****** ****** ***** ***** **** **** *** *** ** ** * * ** ** *...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Apr, 2021" }, { "code": null, "e": 145, "s": 52, "text": "Given an integer n, the task is to print the Inverse Diamond Pattern in 2n-1 rows.Example: " }, { "code": null, "e": 438, "s": 145, "text": "Input: n = 3...
C# program to check if a string contains any special character
To check if a string contains any special character, you need to use the following method − Char.IsLetterOrDigit Use it inside for loop and check or the string that has special characters. Let us say our string is − string str = "Amit$#%"; Now convert the string into character array − str.ToCharArray(); With that, use ...
[ { "code": null, "e": 1279, "s": 1187, "text": "To check if a string contains any special character, you need to use the following method −" }, { "code": null, "e": 1300, "s": 1279, "text": "Char.IsLetterOrDigit" }, { "code": null, "e": 1376, "s": 1300, "text":...
How to Read QR Code using Zxing Library in Android?
15 Jan, 2021 Zxing stands for Zebra Crossing, it is one of the most popular open-source API for integrating QR(Quick Response) Code processing. It is a barcode image processing library implemented in Java, with ports to other languages. It has support for the 1D product, 1D industrial, and 2D barcodes. Google uses ZXin...
[ { "code": null, "e": 54, "s": 26, "text": "\n15 Jan, 2021" }, { "code": null, "e": 547, "s": 54, "text": "Zxing stands for Zebra Crossing, it is one of the most popular open-source API for integrating QR(Quick Response) Code processing. It is a barcode image processing library im...
GATE CS 1996 - GeeksforGeeks
22 Nov, 2021 Case 1: Exactly one dice has 6 facing up and other dice can have any number from 1,2,3,4,5 facing up. There will be 5*2=10 such occurrences. Case 2: Both of the dices having 6 coming up. Only one possible case exists for the same. f'(x0) = (f(x0+h) - f(x0))/h f''(x0) = (f'(x0) - f'(x0-h))/h =[ ...
[ { "code": null, "e": 29577, "s": 29549, "text": "\n22 Nov, 2021" }, { "code": null, "e": 29718, "s": 29577, "text": "Case 1: Exactly one dice has 6 facing up and other dice can have any number from 1,2,3,4,5 facing up. There will be 5*2=10 such occurrences." }, { "code": ...
Java Program to fill an array of characters from user input
For user input, use the Scanner class with System.in. After getting the input, convert it to character array − char[] a = s.next().toCharArray(); Now, display it until the length of the character array i.e. number of elements input by the user − for (int i = 0; i < a.length; i++) { System.out.println(a[i]); } To fil...
[ { "code": null, "e": 1298, "s": 1187, "text": "For user input, use the Scanner class with System.in. After getting the input, convert it to character array −" }, { "code": null, "e": 1333, "s": 1298, "text": "char[] a = s.next().toCharArray();" }, { "code": null, "e":...
Python String partition() Method
19 Aug, 2021 Python String partition() method splits the string at the first occurrence of the separator and returns a tuple containing the part before the separator, separator, and the part after the separator. Here separator is a string that is given as the argument. Syntax: string.partition(separator) Parameters: ...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Aug, 2021" }, { "code": null, "e": 312, "s": 54, "text": "Python String partition() method splits the string at the first occurrence of the separator and returns a tuple containing the part before the separator, separator, and the p...
Sum of all Submatrices of a Given Matrix
22 Jun, 2022 Given a NxN 2-D matrix, the task to find the sum of all the submatrices. Examples: Input : arr[] = {{1, 1}, {1, 1}}; Output : 16 Explanation: Number of sub-matrices with 1 elements = 4 Number of sub-matrices with 2 elements = 4 Number of sub-matrices with 3 elements = 0 Number of sub-m...
[ { "code": null, "e": 54, "s": 26, "text": "\n22 Jun, 2022" }, { "code": null, "e": 127, "s": 54, "text": "Given a NxN 2-D matrix, the task to find the sum of all the submatrices." }, { "code": null, "e": 138, "s": 127, "text": "Examples: " }, { "code":...
Function as a Field in Golang Structure
13 Aug, 2019 A structure or struct in Golang is a user-defined type, which allows us to create a group of elements of different types into a single unit. Any real-world entity which has some set of properties or fields can be represented as a struct. As we know that in Go language function is also a user-defined type s...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Aug, 2019" }, { "code": null, "e": 534, "s": 52, "text": "A structure or struct in Golang is a user-defined type, which allows us to create a group of elements of different types into a single unit. Any real-world entity which has s...
ipcrm command in Linux with examples
22 May, 2019 ipcrm command in Linux is used to remove some IPC(Inter-Process Communication) resources. It eliminates the IPC objects and their associated data structure form the system. One must be a creator or superuser or the owner of the object in order to remove these objects. There are three types of System V IPC ...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 May, 2019" }, { "code": null, "e": 395, "s": 28, "text": "ipcrm command in Linux is used to remove some IPC(Inter-Process Communication) resources. It eliminates the IPC objects and their associated data structure form the system. On...
Image Inpainting using OpenCV
02 Aug, 2019 Image inpainting is the process of removing damage, such as noises, strokes or text, on images. It is particularly useful in the restoration of old photographs which might have scratched edges or ink spots on them. These can be digitally removed through this method. Image inpainting works by replacing the ...
[ { "code": null, "e": 52, "s": 24, "text": "\n02 Aug, 2019" }, { "code": null, "e": 319, "s": 52, "text": "Image inpainting is the process of removing damage, such as noises, strokes or text, on images. It is particularly useful in the restoration of old photographs which might ha...
Program to print its own name as output
04 Nov, 2019 Ever thought about writing a script which prints its own name when you execute it. It’s pretty simple. You must have noticed programs in which the main function is written like this int main(int argc, char** argv) and you must have wondered what these 2 arguments mean. Well the first one argc is the number...
[ { "code": null, "e": 53, "s": 25, "text": "\n04 Nov, 2019" }, { "code": null, "e": 235, "s": 53, "text": "Ever thought about writing a script which prints its own name when you execute it. It’s pretty simple. You must have noticed programs in which the main function is written li...
Program to check if tank will overflow, underflow or filled in given time
21 Jun, 2022 Given a tank with definite height and radius and the flow of water available to fill the tank. Determine whether the tank will overflow or not in a given amount of time. Note: The flow of water will be available in volume per minute.Examples: --r=5-- ---------- ^ | | | | ...
[ { "code": null, "e": 53, "s": 25, "text": "\n21 Jun, 2022" }, { "code": null, "e": 298, "s": 53, "text": "Given a tank with definite height and radius and the flow of water available to fill the tank. Determine whether the tank will overflow or not in a given amount of time. Note...
How to use Bootstrap modal for YouTube videos and play automatically ?
08 Aug, 2021 The task is to use modal for YouTube videos in Bootstrap. Here we will discuss two topics, embedding YouTube video in Bootstrap modal and make YouTube video auto-play in the Bootstrap modal. Embedding YouTube videos in the Bootstrap modal is very easy and simple to implement using the below approach. But t...
[ { "code": null, "e": 54, "s": 26, "text": "\n08 Aug, 2021" }, { "code": null, "e": 472, "s": 54, "text": "The task is to use modal for YouTube videos in Bootstrap. Here we will discuss two topics, embedding YouTube video in Bootstrap modal and make YouTube video auto-play in the ...
Java program to implement bubble sort
Bubble sort is a simple sorting algorithm. This sorting algorithm is a comparison-based algorithm in which each pair of adjacent elements is compared and the elements are swapped if they are not in order. This algorithm is not suitable for large datasets as its average and worst case complexity is of Ο(n2) where n is t...
[ { "code": null, "e": 1402, "s": 1062, "text": "Bubble sort is a simple sorting algorithm. This sorting algorithm is a comparison-based algorithm in which each pair of adjacent elements is compared and the elements are swapped if they are not in order. This algorithm is not suitable for large dataset...
An element inside another element in JavaScript?
The element inside an element is nothing but for instance a span element inside a div element. Javascript has provided .contains() method to find out whether an element contains another element. This method actually returns true if the condition is satisfied else returns false. node.contains(node); In the following ex...
[ { "code": null, "e": 1342, "s": 1062, "text": "The element inside an element is nothing but for instance a span element inside a div element. Javascript has provided .contains() method to find out whether an element contains another element. This method actually returns true if the condition is sati...
Frequencies of Limited Range Array Elements | Practice | GeeksforGeeks
Given an array A[] of N positive integers which can contain integers from 1 to P where elements can be repeated or can be absent from the array. Your task is to count the frequency of all elements from 1 to N. Note: The elements greater than N in the array can be ignored for counting. Example 1: Input: N = 5 arr[] = {...
[ { "code": null, "e": 524, "s": 238, "text": "Given an array A[] of N positive integers which can contain integers from 1 to P where elements can be repeated or can be absent from the array. Your task is to count the frequency of all elements from 1 to N.\nNote: The elements greater than N in the arr...
Image Segmentation With 5 Lines 0f Code | by Ayoola Olafenwa (she/her) | Towards Data Science
Computer vision is evolving on a daily basis. Popular computer vision techniques such as image classification and object detection have been used extensively to solve a lot of computer vision problems. In image classification, an entire image is classified. Object detection extends image classification by detecting the...
[ { "code": null, "e": 545, "s": 172, "text": "Computer vision is evolving on a daily basis. Popular computer vision techniques such as image classification and object detection have been used extensively to solve a lot of computer vision problems. In image classification, an entire image is classifie...
The CSS scale() Function
The scale() function in CSS is used to define a transformation that resizes an element on the 2D plane. Set the amount of scaling in each direction as the parameter of the scale() function. Live Demo <!DOCTYPE html> <html> <head> <style> .translate_img { transform: translate(100px, 10%); } .scale_img { transform...
[ { "code": null, "e": 1252, "s": 1062, "text": "The scale() function in CSS is used to define a transformation that resizes an element on the 2D plane. Set the amount of scaling in each direction as the parameter of the scale() function." }, { "code": null, "e": 1263, "s": 1252, "...
Why variables defined in try cannot be used in catch or finally in java?
A class in Java will have three kinds of variables namely, static (class), instance and, local. Instance variables − These variables belong to the instances (objects) of a class. These are declared within a class but outside methods. These are initialized when the class is instantiated. They can be accessed from any me...
[ { "code": null, "e": 1158, "s": 1062, "text": "A class in Java will have three kinds of variables namely, static (class), instance and, local." }, { "code": null, "e": 1436, "s": 1158, "text": "Instance variables − These variables belong to the instances (objects) of a class. The...
LeafletJS - Event Handling
The Leaflet JavaScript program can respond to various events generated by the user. In this chapter, we will provide a few examples demonstrating how to perform event handling while working with Leaflet. Follow the steps given below to add events to the map. Step 1 − Create a Map object by passing a <div> element (Stri...
[ { "code": null, "e": 2002, "s": 1798, "text": "The Leaflet JavaScript program can respond to various events generated by the user. In this chapter, we will provide a few examples demonstrating how to perform event handling while working with Leaflet." }, { "code": null, "e": 2057, "s...
Visualizing Topic Models with Scatterpies and t-SNE | by Siena Duplan | Towards Data Science
For better or worse, our language has not yet evolved into George Orwell’s 1984 vision of Newspeak (doubleplus ungood, anyone?). But had the English language resembled something like Newspeak, our computers would have a considerably easier time understanding large amounts of text data. Present-day challenges in natural...
[ { "code": null, "e": 632, "s": 171, "text": "For better or worse, our language has not yet evolved into George Orwell’s 1984 vision of Newspeak (doubleplus ungood, anyone?). But had the English language resembled something like Newspeak, our computers would have a considerably easier time understand...
8086 program to convert a 16 bit decimal number to Hexadecimal - GeeksforGeeks
26 Jun, 2019 Problem: We are given a 16 bit decimal number we have to print the number in Hexadecimal format. Examples: Input: d1 = 999 Output: 3E7 Input: d1 = 123 Output: 7B Explanation: Load the value stored into registerDivide the value by 16 to convert it to HexadecimalPush the remainder into the stackIncrease th...
[ { "code": null, "e": 24449, "s": 24421, "text": "\n26 Jun, 2019" }, { "code": null, "e": 24546, "s": 24449, "text": "Problem: We are given a 16 bit decimal number we have to print the number in Hexadecimal format." }, { "code": null, "e": 24556, "s": 24546, "t...
Merging Arrays in Perl
Because an array in Perl is just a comma-separated sequence of values, you can combine them together as shown below − Live Demo #!/usr/bin/perl @numbers = (1,3,(4,5,6)); print "numbers = @numbers\n"; This will produce the following result − numbers = 1 3 4 5 6 The embedded arrays just become a part of the main array a...
[ { "code": null, "e": 1180, "s": 1062, "text": "Because an array in Perl is just a comma-separated sequence of values, you can combine them together as shown below −" }, { "code": null, "e": 1191, "s": 1180, "text": " Live Demo" }, { "code": null, "e": 1263, "s": 1...
Basic Animation with Matplotlib and Plotly. | by Ben Bogart | Towards Data Science
Sometimes it just makes sense to animate a visual. Animation can help understand data in a more complete way. If your medium is the screen you may find yourself needing to animate occasionally. The next question you ask will be, “which toolkit should I use for the animation.” Here I compare the process for creating a b...
[ { "code": null, "e": 553, "s": 171, "text": "Sometimes it just makes sense to animate a visual. Animation can help understand data in a more complete way. If your medium is the screen you may find yourself needing to animate occasionally. The next question you ask will be, “which toolkit should I us...
Human-like mouse movements with Selenium.
We can do human-like mouse movements with Selenium. This can be done with the help of the Actions class. The human-like mouse movements include right-click, double-click, mouse movement, drag and drop, and so on. To do the mouse movement, the moveToElement method is used. To perform a right-click, the contextClick meth...
[ { "code": null, "e": 1275, "s": 1062, "text": "We can do human-like mouse movements with Selenium. This can be done with the help of the Actions class. The human-like mouse movements include right-click, double-click, mouse movement, drag and drop, and so on." }, { "code": null, "e": 147...
Parallelism with Python (Part 1). How to Muli-thread with Python to Speed... | by Louis Chan | Towards Data Science
As Python was first developed 29 years ago, it is unsurprisingly that it was designed more as a linear programming language when single-core CPUs are still dominating the market. In fact, CPython developer may still be feeling the heat when it comes to concurrency. Luckily, we Python noobs can lay back and enjoy the fr...
[ { "code": null, "e": 807, "s": 172, "text": "As Python was first developed 29 years ago, it is unsurprisingly that it was designed more as a linear programming language when single-core CPUs are still dominating the market. In fact, CPython developer may still be feeling the heat when it comes to co...
Reorder List | Practice | GeeksforGeeks
Given a singly linked list: A0→A1→...→An-1→An, reorder it to: A0→An→A1→An-1→A2→An-2→... For example: Given 1->2->3->4->5 its reorder is 1->5->2->4->3. Note: It is recommended do this in-place without altering the nodes' values. Example 1: Input: LinkedList: 1->2->3 Output: 1 3 2 Example 2: Input: LinkedList: 1->7->3->...
[ { "code": null, "e": 389, "s": 238, "text": "Given a singly linked list: A0→A1→...→An-1→An, reorder it to: A0→An→A1→An-1→A2→An-2→...\nFor example: Given 1->2->3->4->5 its reorder is 1->5->2->4->3." }, { "code": null, "e": 466, "s": 389, "text": "Note: It is recommended do this in...
Count of common multiples of two numbers in a range in C++
We are given two numbers A and B. Also provided two numbers START and END to define a range of numbers. The Ath tile has paint white and Bth tile has paint black. If the tile is painted both black and white then it turns grey. The goal is to find the total number of grey tiles . We will do this by traversing numbers fr...
[ { "code": null, "e": 1342, "s": 1062, "text": "We are given two numbers A and B. Also provided two numbers START and END to define a range of numbers. The Ath tile has paint white and Bth tile has paint black. If the tile is painted both black and white then it turns grey. The goal is to find the to...
How to Change App Icon of Android Programmatically in Android? - GeeksforGeeks
30 Jun, 2021 In this article, we are going to learn how to change the App Icon of an App on the Button Click. This feature can be used when we have an app for different types of users. Then as per the user type, we can change the App Icon Dynamically. Step 1: Create a New Project To create a new project in Android Stu...
[ { "code": null, "e": 25116, "s": 25088, "text": "\n30 Jun, 2021" }, { "code": null, "e": 25356, "s": 25116, "text": "In this article, we are going to learn how to change the App Icon of an App on the Button Click. This feature can be used when we have an app for different types o...
How to click on a button with Javascript executor in Selenium with python?
We can click on a button with a Javascript executor in Selenium. Javascript is a language used for scripting and runs on the client side (on the browser). Selenium gives default methods to work with Javascript. b = driver.find_element_by_xpath("//input[starts-with(@class,'gsc')]") driver.execute_script("arguments[0].cl...
[ { "code": null, "e": 1273, "s": 1062, "text": "We can click on a button with a Javascript executor in Selenium. Javascript is a language used for scripting and runs on the client side (on the browser). Selenium gives default methods to work with Javascript." }, { "code": null, "e": 1394,...
Machine Learning Basics: Multiple Linear Regression | by Gurucharan M K | Towards Data Science
In the previous story, I had given a brief of Linear Regression and showed how to perform Simple Linear Regression. In Simple Linear Regression, we had one dependent variable (y) and one independent variable (x). What if the marks of the student depended on two or more independent variables? In this example, we will go...
[ { "code": null, "e": 465, "s": 172, "text": "In the previous story, I had given a brief of Linear Regression and showed how to perform Simple Linear Regression. In Simple Linear Regression, we had one dependent variable (y) and one independent variable (x). What if the marks of the student depended ...
How to setup OpenGL with Visual Studio 2019 on Windows 10? - GeeksforGeeks
18 Apr, 2022 OpenGL is a 2D and 3D graphics API that provides a cross-platform application programming interface for a wide variety of computer platforms. It is operating system independent and has a transparent network. Application developers use it to develop high-performing and visually compelling graphics software ...
[ { "code": null, "e": 24524, "s": 24496, "text": "\n18 Apr, 2022" }, { "code": null, "e": 24845, "s": 24524, "text": "OpenGL is a 2D and 3D graphics API that provides a cross-platform application programming interface for a wide variety of computer platforms. It is operating syste...
How to Add Image into Dropdown List for each items ? - GeeksforGeeks
30 Jul, 2021 Programmers can add images into the dropdown list for each items by two methods which are mentioned below. Method 1: Using CSS The .dropdown class uses position: relative; is used when the user needs the content to be set right under the dropdown button (It is done using position: absolute). The .dropdown-...
[ { "code": null, "e": 25708, "s": 25680, "text": "\n30 Jul, 2021" }, { "code": null, "e": 25815, "s": 25708, "text": "Programmers can add images into the dropdown list for each items by two methods which are mentioned below." }, { "code": null, "e": 26001, "s": 258...
Smart handling of missing data in R | by Hannah Roos | Towards Data Science
When values should have been reported but were not available, we end up with missing values. In real-life data, missing values occur almost automatically — like a shadow nobody really can get rid of. Think of nonresponse in surveys, technical issues during data collection or joining data from different sources — annoyi...
[ { "code": null, "e": 657, "s": 171, "text": "When values should have been reported but were not available, we end up with missing values. In real-life data, missing values occur almost automatically — like a shadow nobody really can get rid of. Think of nonresponse in surveys, technical issues durin...
Java program to find the area of a square
A square is a rectangle whose length and breadth are same. Therefore, Area of a rectangle is the square of its length. so, to calculate the area of a square Get the length of the square form the user. Calculate its square. Print the square. import java.util.Scanner; public class AreaOfSquare { public static void mai...
[ { "code": null, "e": 1219, "s": 1062, "text": "A square is a rectangle whose length and breadth are same. Therefore, Area of a rectangle is the square of its length. so, to calculate the area of a square" }, { "code": null, "e": 1263, "s": 1219, "text": "Get the length of the squ...