title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Get the count of elements in HashMap in Java
Use the size() method to get the count of elements. Let us first create a HashMap and add elements − HashMap hm = new HashMap(); // Put elements to the map hm.put("Maths", new Integer(98)); hm.put("Science", new Integer(90)); hm.put("English", new Integer(97)); Now, get the size − hm.size() The following is an example ...
[ { "code": null, "e": 1114, "s": 1062, "text": "Use the size() method to get the count of elements." }, { "code": null, "e": 1163, "s": 1114, "text": "Let us first create a HashMap and add elements −" }, { "code": null, "e": 1324, "s": 1163, "text": "HashMap hm...
MySQL query to get the next number in sequence for AUTO_INCREMENT field?
Let us first create a table − mysql> create table DemoTable -> ( -> Id int NOT NULL AUTO_INCREMENT, -> PRIMARY KEY(Id) -> ); Query OK, 0 rows affected (0.58 sec) Insert some records in the table using insert command − mysql> insert into DemoTable values(); Query OK, 1 row affected (0.19 sec) mysql> insert into DemoTab...
[ { "code": null, "e": 1092, "s": 1062, "text": "Let us first create a table −" }, { "code": null, "e": 1224, "s": 1092, "text": "mysql> create table DemoTable\n-> (\n-> Id int NOT NULL AUTO_INCREMENT,\n-> PRIMARY KEY(Id)\n-> );\nQuery OK, 0 rows affected (0.58 sec)" }, { "...
How to separate date and time in R ? - GeeksforGeeks
29 Jun, 2021 In this article, we are going to separate date and time in R Programming Language. Date-time is in the format of date and time (YYYY/MM/DD HH:MM:SS- year/month/day Hours:Minute:Seconds). Extracting date from timestamp: We are going to extract date by using as.Date() function. Syntax: as.Date(data) where...
[ { "code": null, "e": 26487, "s": 26459, "text": "\n29 Jun, 2021" }, { "code": null, "e": 26676, "s": 26487, "text": "In this article, we are going to separate date and time in R Programming Language. Date-time is in the format of date and time (YYYY/MM/DD HH:MM:SS- year/month/da...
Design data structures for a very large social network like Facebook or Linkedln - GeeksforGeeks
09 Feb, 2022 How would you design the data structures for a very large social network like Facebook or Linkedln? Describe how you would design an algorithm to show the shortest path between two people (e.g., Me-> Bob-> Susan-> Jason-> You). Asked In : Google Interview A good way to approach this problem is to remove ...
[ { "code": null, "e": 25811, "s": 25783, "text": "\n09 Feb, 2022" }, { "code": null, "e": 26067, "s": 25811, "text": "How would you design the data structures for a very large social network like Facebook or Linkedln? Describe how you would design an algorithm to show the shortest...
Java Examples - Replace an element in a list
How to replace an element in a list Following example uses replaceAll() method to replace all the occurance of an element with a different element in a list. import java.util.*; public class Main { public static void main(String[] args) { List list = Arrays.asList("one Two three Four five six one three Four"....
[ { "code": null, "e": 2104, "s": 2068, "text": "How to replace an element in a list" }, { "code": null, "e": 2226, "s": 2104, "text": "Following example uses replaceAll() method to replace all the occurance of an element with a different element in a list." }, { "code": nu...
Difference between TreeMap, HashMap, and LinkedHashMap in Java
HashMap, TreeMap and LinkedHashMap all implements java.util.Map interface and following are their characteristics. HashMap has complexity of O(1) for insertion and lookup. HashMap has complexity of O(1) for insertion and lookup. HashMap allows one null key and multiple null values. HashMap allows one null key and multi...
[ { "code": null, "e": 1177, "s": 1062, "text": "HashMap, TreeMap and LinkedHashMap all implements java.util.Map interface and following are their characteristics." }, { "code": null, "e": 1234, "s": 1177, "text": "HashMap has complexity of O(1) for insertion and lookup." }, { ...
Program to find length of contiguous strictly increasing sublist in Python
Suppose we have a list of numbers called nums, we have to find the maximum length of a contiguous strictly increasing sublist when we can remove one or zero elements from the list. So, if the input is like nums = [30, 11, 12, 13, 14, 15, 18, 17, 32], then the output will be 7, as when we remove 18 in the list we can ge...
[ { "code": null, "e": 1243, "s": 1062, "text": "Suppose we have a list of numbers called nums, we have to find the maximum length of a contiguous strictly increasing sublist when we can remove one or zero elements from the list." }, { "code": null, "e": 1497, "s": 1243, "text": "S...
Spring JDBC - SqlQuery Class
The org.springframework.jdbc.object.SqlQuery class provides a reusable operation object representing a SQL query. Following is the declaration for org.springframework.jdbc.object.SqlQuery class − public abstract class SqlQuery<T> extends SqlOperation Step 1 − Create a JdbcTemplate object using a configured datasour...
[ { "code": null, "e": 2510, "s": 2396, "text": "The org.springframework.jdbc.object.SqlQuery class provides a reusable operation object representing a SQL query." }, { "code": null, "e": 2592, "s": 2510, "text": "Following is the declaration for org.springframework.jdbc.object.Sql...
How does sparse convolution work? | by Zhiliang Zhou | Towards Data Science
Sparse Convolution plays an essential role in LiDAR signal processing. This article describes how the sparse convolution works, which used a quite different concept and GPU calculation schema compared with traditional convolution. In this article, the theory part is based on the paper “3D Semantic Segmentation with Sub...
[ { "code": null, "e": 278, "s": 47, "text": "Sparse Convolution plays an essential role in LiDAR signal processing. This article describes how the sparse convolution works, which used a quite different concept and GPU calculation schema compared with traditional convolution." }, { "code": nul...
Python Pandas - Environment Setup
Standard Python distribution doesn't come bundled with Pandas module. A lightweight alternative is to install NumPy using popular Python package installer, pip. pip install pandas If you install Anaconda Python package, Pandas will be installed by default with the following − Anaconda (from https://www.continuum.io) i...
[ { "code": null, "e": 2604, "s": 2443, "text": "Standard Python distribution doesn't come bundled with Pandas module. A lightweight alternative is to install NumPy using popular Python package installer, pip." }, { "code": null, "e": 2624, "s": 2604, "text": "pip install pandas\n"...
Performing mathematical operations in MySQL IF then ELSE is possible?
For performing mathematical operations and working with conditions, you can consider CASE statement. Let us first create a table − mysql> create table DemoTable ( Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, FruitName varchar(100), FruitPrice int ); Query OK, 0 rows affected (0.26 sec) Insert some records...
[ { "code": null, "e": 1193, "s": 1062, "text": "For performing mathematical operations and working with conditions, you can consider CASE statement. Let us first create a table −" }, { "code": null, "e": 1363, "s": 1193, "text": "mysql> create table DemoTable\n (\n Id int NOT ...
Connect nodes at same level - GeeksforGeeks
07 Feb, 2022 Write a function to connect all the adjacent nodes at the same level in a binary tree. Structure of the given Binary Tree node is like following. C++ C Javascript struct node { int data; struct node* left; struct node* right; struct node* nextRight;} struct node { int data; struct node*...
[ { "code": null, "e": 24631, "s": 24603, "text": "\n07 Feb, 2022" }, { "code": null, "e": 24779, "s": 24631, "text": "Write a function to connect all the adjacent nodes at the same level in a binary tree. Structure of the given Binary Tree node is like following. " }, { "...
How to declare a class in Java?
Following is the syntax to declare a class. class className { //Body of the class } You can declare a class by writing the name of the next to the class keyword, followed by the flower braces. Within these, you need to define the body (contents) of the class i.e. fields and methods. To make the class accessible to ...
[ { "code": null, "e": 1106, "s": 1062, "text": "Following is the syntax to declare a class." }, { "code": null, "e": 1150, "s": 1106, "text": "class className {\n //Body of the class\n}\n" }, { "code": null, "e": 1350, "s": 1150, "text": "You can declare a cl...
How to disable browser's back button with JavaScript?
To disable web browsers’ back button, try to run the following code. This is the code for current HTML page, <html> <head> <title>Disable Browser Back Button</title> <script src = "http://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src = "http://ajax.googleapis.com/a...
[ { "code": null, "e": 1171, "s": 1062, "text": "To disable web browsers’ back button, try to run the following code. This is the code for current HTML page," }, { "code": null, "e": 1777, "s": 1171, "text": "<html>\n <head>\n <title>Disable Browser Back Button</title>\n ...
C# | How to set the alignment of Check Mark in CheckBox? - GeeksforGeeks
15 Oct, 2021 The CheckBox control is the part of windows form which is used to take input from the user. Or in other words, CheckBox control allows us to select single or multiple elements from the given list. In CheckBox, you are allowed to set the horizontal and vertical alignment of the check mark on a CheckBox usin...
[ { "code": null, "e": 24222, "s": 24194, "text": "\n15 Oct, 2021" }, { "code": null, "e": 24800, "s": 24222, "text": "The CheckBox control is the part of windows form which is used to take input from the user. Or in other words, CheckBox control allows us to select single or multi...
From inside of a Docker container, how do I connect to the localhost of the machine
Suppose you have an Nginx web server running inside an Nginx container in your host machine. And you have a MySQL database running in your host machine. Now, you want to access the MySQL server in your host machine from the Nginx container. Also, the MySQL is running on your localhost and the host machine does not expo...
[ { "code": null, "e": 1570, "s": 1062, "text": "Suppose you have an Nginx web server running inside an Nginx container in your host machine. And you have a MySQL database running in your host machine. Now, you want to access the MySQL server in your host machine from the Nginx container. Also, the My...
Explain reference and pointer in C programming?
Explain the concept of reference and pointer in a c programming language using examples. It is the alternate name for the variable that we declared. It is the alternate name for the variable that we declared. It can be accessed by using pass by value. It can be accessed by using pass by value. It cannot hold the null v...
[ { "code": null, "e": 1151, "s": 1062, "text": "Explain the concept of reference and pointer in a c programming language using examples." }, { "code": null, "e": 1211, "s": 1151, "text": "It is the alternate name for the variable that we declared." }, { "code": null, "...
LISP - Input & Output
Common LISP provides numerous input-output functions. We have already used the format function, and print function for output. In this section, we will look into some of the most commonly used input-output functions provided in LISP. The following table provides the most commonly used input functions of LISP − read & o...
[ { "code": null, "e": 2294, "s": 2060, "text": "Common LISP provides numerous input-output functions. We have already used the format function, and print function for output. In this section, we will look into some of the most commonly used input-output functions provided in LISP." }, { "code...
Difference Between Object and Class in C++
In this post, we will understand the difference between an object and a class with respect to C++ programming language. It is a building block of code in C++ that helps implement object oriented programming. It is a type that is defined by the user. It holds its own data members and member functions. These data members...
[ { "code": null, "e": 1182, "s": 1062, "text": "In this post, we will understand the difference between an object and a class with respect to C++ programming language." }, { "code": null, "e": 1270, "s": 1182, "text": "It is a building block of code in C++ that helps implement obj...
MFC - Checkboxes
A checkbox is a Windows control that allows the user to set or change the value of an item as true or false. Create Creates the Windows button control and attaches it to the CButton object. DrawItem Override to draw an owner-drawn CButton object. GetBitmap Retrieves the handle of the bitmap previously set with SetBitma...
[ { "code": null, "e": 2176, "s": 2067, "text": "A checkbox is a Windows control that allows the user to set or change the value of an item as true or false." }, { "code": null, "e": 2183, "s": 2176, "text": "Create" }, { "code": null, "e": 2257, "s": 2183, "tex...
How to delete elements from an array?
To delete an element at a particular position from an array. Starting from the required position, replace the element in the current position with the element in the next position. Live Demo public class DeletingElementsBySwapping { public static void main(String args[]) { int [] myArray = {23, 93, 56, 92, 39}; System...
[ { "code": null, "e": 1243, "s": 1062, "text": "To delete an element at a particular position from an array. Starting from the required position, replace the element in the current position with the element in the next position." }, { "code": null, "e": 1254, "s": 1243, "text": " ...
async.queue() Method in Node.js
The async module provides different functionalities to work with asynchronous JavaScript in a nodejs application. The async.queue() method returns a queue that is further used for concurrent processing of processes i.e. multiple processing of items at a time/instant. Step 1 − Run the following command to initialize the...
[ { "code": null, "e": 1330, "s": 1062, "text": "The async module provides different functionalities to work with asynchronous JavaScript in a nodejs application. The async.queue() method returns a queue that is further used for concurrent processing of processes i.e. multiple processing of items at a...
Diagonal product of a matrix - JavaScript
Suppose, we have a 2-D array representing a square matrix like this − const arr = [ [1, 3, 4, 2], [4, 5, 3, 5], [5, 2, 6, 4], [8, 2, 9, 3] ]; We are required to write a function that takes in this array and returns the product of the element present at the principal Diagonal of the matrix. For this array th...
[ { "code": null, "e": 1132, "s": 1062, "text": "Suppose, we have a 2-D array representing a square matrix like this −" }, { "code": null, "e": 1216, "s": 1132, "text": "const arr = [\n [1, 3, 4, 2],\n [4, 5, 3, 5],\n [5, 2, 6, 4],\n [8, 2, 9, 3]\n];" }, { "code": n...
C++ Program to Check Whether an Undirected Graph Contains a Eulerian Cycle
To know about Euler Circuit, we have the idea about Euler Path. The Euler path is a path; by which we can visit every node exactly once. We can use the same edges for multiple times. The Euler Circuit is a special type of Euler path. When the starting vertex of the Euler path is also connected with the ending vertex of...
[ { "code": null, "e": 1394, "s": 1062, "text": "To know about Euler Circuit, we have the idea about Euler Path. The Euler path is a path; by which we can visit every node exactly once. We can use the same edges for multiple times. The Euler Circuit is a special type of Euler path. When the starting v...
C - Header Files
A header file is a file with extension .h which contains C function declarations and macro definitions to be shared between several source files. There are two types of header files: the files that the programmer writes and the files that comes with your compiler. You request to use a header file in your program by inc...
[ { "code": null, "e": 2349, "s": 2084, "text": "A header file is a file with extension .h which contains C function declarations and macro definitions to be shared between several source files. There are two types of header files: the files that the programmer writes and the files that comes with you...
Minimum number of deletions and insertions. | Practice | GeeksforGeeks
Given two strings str1 and str2. The task is to remove or insert the minimum number of characters from/in str1 so as to transform it into str2. It could be possible that the same character needs to be removed/deleted from one point of str1 and inserted to some another point. Example 1: Input: str1 = "heap", str2 = "pea...
[ { "code": null, "e": 514, "s": 238, "text": "Given two strings str1 and str2. The task is to remove or insert the minimum number of characters from/in str1 so as to transform it into str2. It could be possible that the same character needs to be removed/deleted from one point of str1 and inserted to...
Database Management Systems | Set 4 - GeeksforGeeks
07 Apr, 2022 Following Questions have been asked in GATE 2011 exam. 1. Consider a relational table with a single record for each registered student with the following attributes. 1. Registration_Number:< Unique registration number for each registered student 2. UID: Unique Identity number, unique at the national leve...
[ { "code": null, "e": 29235, "s": 29207, "text": "\n07 Apr, 2022" }, { "code": null, "e": 29291, "s": 29235, "text": "Following Questions have been asked in GATE 2011 exam. " }, { "code": null, "e": 29403, "s": 29291, "text": "1. Consider a relational table wit...
Can we convert MD5 to SHA256 in a MySQL table with user password column?
Use SHA2() to convert the MD5 password to SHA256. It calculates the SHA-2 family of hash functions i.e. SHA-224, SHA-256, SHA-384, and SHA-512). Let us first create a table − mysql> create table DemoTable818(UserPassword text); Query OK, 0 rows affected (0.51 sec) Insert some records in the table using insert command −...
[ { "code": null, "e": 1207, "s": 1062, "text": "Use SHA2() to convert the MD5 password to SHA256. It calculates the SHA-2 family of hash functions i.e. SHA-224, SHA-256, SHA-384, and SHA-512)." }, { "code": null, "e": 1237, "s": 1207, "text": "Let us first create a table −" }, ...
CNN Sentiment Analysis. Convolutional neural networks, or CNNs... | by Rita Kurban | Towards Data Science
Convolutional neural networks, or CNNs, form the backbone of multiple modern computer vision systems. Image classification, object detection, semantic segmentation — all these tasks can be tackled by CNNs successfully. At first glance, it seems to be counterintuitive to use the same technique for a task as different as...
[ { "code": null, "e": 623, "s": 172, "text": "Convolutional neural networks, or CNNs, form the backbone of multiple modern computer vision systems. Image classification, object detection, semantic segmentation — all these tasks can be tackled by CNNs successfully. At first glance, it seems to be coun...
Style Your Pandas DataFrames. Let’s create something more than plain... | by Soner Yıldırım | Towards Data Science
Data visualizations are great tools to infer meaningful results from plain data. They are widely-used in exploratory data analysis process in order to better understand the data at hand. What if we integrate a few visualization structures into pandas dataframes? I think it makes them look better than plain numbers. Fur...
[ { "code": null, "e": 567, "s": 172, "text": "Data visualizations are great tools to infer meaningful results from plain data. They are widely-used in exploratory data analysis process in order to better understand the data at hand. What if we integrate a few visualization structures into pandas data...
Deep Reinforcement Learning for Drones in 3D realistic environments | by Aqeel Anwar | Towards Data Science
A complete code to get you started with implementing Deep Reinforcement Learning in a realistically looking environment using Unreal Gaming Engine and Python. Note 1: The Github repository DRLwithTL mentioned in the article has been outdated. Please use the following more detailed repository instead https://github.com/...
[ { "code": null, "e": 331, "s": 172, "text": "A complete code to get you started with implementing Deep Reinforcement Learning in a realistically looking environment using Unreal Gaming Engine and Python." }, { "code": null, "e": 509, "s": 331, "text": "Note 1: The Github reposito...
Regular Expression \E Metacharacter in Java.
The subexpression/metacharacter “\E” ends the quoting begun with \Q. i.e. you can escape metacharacters in the regular expressions by placing them in between \Q and \E. For example, the expression [aeiou] matches the strings with vowel letters in it. Live Demo import java.util.Scanner; import java.util.regex.Matcher; ...
[ { "code": null, "e": 1313, "s": 1062, "text": "The subexpression/metacharacter “\\E” ends the quoting begun with \\Q. i.e. you can escape metacharacters in the regular expressions by placing them in between \\Q and \\E. For example, the expression [aeiou] matches the strings with vowel letters in it...
A very brief introduction to Fuzzy Logic and Fuzzy Systems | by Carmel Gafa | Towards Data Science
Many tasks are simple for humans, but they create a continuous challenge for machines. Examples of such systems include walking through a cluttered environment, lifting fragile objects or parking a car. The ability of humans to deal with vague and imprecise data makes such tasks easy for us. Therefore if we aim to repl...
[ { "code": null, "e": 580, "s": 47, "text": "Many tasks are simple for humans, but they create a continuous challenge for machines. Examples of such systems include walking through a cluttered environment, lifting fragile objects or parking a car. The ability of humans to deal with vague and imprecis...
Why You Should Always Use Feature Embeddings With Structured Datasets | by Michael Malin | Towards Data Science
Feature embeddings are one of the most important steps when training neural networks on tabular data tables. Unfortunately, this technique is seldom taught outside of natural language processing (NLP) settings and is consequently almost completely ignored for structured datasets. But skipping this step can lead to sign...
[ { "code": null, "e": 760, "s": 47, "text": "Feature embeddings are one of the most important steps when training neural networks on tabular data tables. Unfortunately, this technique is seldom taught outside of natural language processing (NLP) settings and is consequently almost completely ignored ...
AsQueryable() in C#
AsQueryable() method is used to get an IQueryable reference. Let us see an example to find sum of integer values. Firstly, set an integer array. var arr = new int[] { 100, 200, 300, 400 }; Now to find the sum, use the Queryable Sum() and AsQueryable() method. Queryable.Sum(arr.AsQueryable()); The following is the compl...
[ { "code": null, "e": 1123, "s": 1062, "text": "AsQueryable() method is used to get an IQueryable reference." }, { "code": null, "e": 1176, "s": 1123, "text": "Let us see an example to find sum of integer values." }, { "code": null, "e": 1207, "s": 1176, "text"...
How to get the IIS Application Pool Recycle settings using PowerShell?
To get the IIS application Pool to recycle settings using GUI, you need to check the Application pool advanced settings. To retrieve the above settings using PowerShell, we can use the Get-IISAppPool command with the specific application pool name. We have the application pool, DefaultAppPool and we need to retrieve it...
[ { "code": null, "e": 1183, "s": 1062, "text": "To get the IIS application Pool to recycle settings using GUI, you need to check the Application pool advanced settings." }, { "code": null, "e": 1404, "s": 1183, "text": "To retrieve the above settings using PowerShell, we can use t...
Tcl - Variables
In Tcl, there is no concept of variable declaration. Once, a new variable name is encountered, Tcl will define a new variable. The name of variables can contain any characters and length. You can even have white spaces by enclosing the variable in curly braces, but it is not preferred. The set command is used for assig...
[ { "code": null, "e": 2328, "s": 2201, "text": "In Tcl, there is no concept of variable declaration. Once, a new variable name is encountered, Tcl will define a new variable." }, { "code": null, "e": 2488, "s": 2328, "text": "The name of variables can contain any characters and le...
match_results prefix() and suffix() in C++
In this article we will be discussing the working, syntax and examples of match_results::prefix() and match_results::suffix() functions in C++ STL. std::match_results is a specialized container-like class which is used to hold the collection of character sequences which are matched. In this container class a regex matc...
[ { "code": null, "e": 1210, "s": 1062, "text": "In this article we will be discussing the working, syntax and examples of match_results::prefix() and match_results::suffix() functions in C++ STL." }, { "code": null, "e": 1436, "s": 1210, "text": "std::match_results is a specialize...
Significance of Q-Q Plots. Understanding the distribution of... | by Sundaresh Chandran | Towards Data Science
Understanding the distribution of a variable(s) is one of the first and foremost tasks done while exploring a dataset. One way to test the distribution of continuous variables graphically is via a Q-Q plot. Personally, these plots come in handy in the case of parametric tests as they insist on the assumption of normali...
[ { "code": null, "e": 557, "s": 172, "text": "Understanding the distribution of a variable(s) is one of the first and foremost tasks done while exploring a dataset. One way to test the distribution of continuous variables graphically is via a Q-Q plot. Personally, these plots come in handy in the cas...
How to separate string and a numeric value in R?
To separate string and a numeric value, we can use strplit function and split the values by passing all type of characters and all the numeric values. For example, if we have a data frame called df that contains a character column Var having concatenated string and numerical values then we can split them using the belo...
[ { "code": null, "e": 1394, "s": 1062, "text": "To separate string and a numeric value, we can use strplit function and split the values by passing all type of characters and all the numeric values. For example, if we have a data frame called df that contains a character column Var having concatenate...
Calculate Volume of Dodecahedron - GeeksforGeeks
17 Mar, 2021 Given the edge of the dodecahedron calculate its Volume. Volume is the amount of the space which the shapes takes up. A dodecahedron is a 3-dimensional figure made up of 12 faces, or flat sides. All of the faces are pentagons of the same size.The word ‘dodecahedron’ comes from the Greek words dodeca (‘twel...
[ { "code": null, "e": 25428, "s": 25400, "text": "\n17 Mar, 2021" }, { "code": null, "e": 25836, "s": 25428, "text": "Given the edge of the dodecahedron calculate its Volume. Volume is the amount of the space which the shapes takes up. A dodecahedron is a 3-dimensional figure made...
How to create a common error page using JSP?
JSP gives you an option to specify Error Page for each JSP using page attribute. Whenever the page throws an exception, the JSP container automatically invokes the error page. Following is an example to specifiy an error page for a main.jsp. To set up an error page, use the <%@ page errorPage = "xxx" %> directive. <%@ ...
[ { "code": null, "e": 1238, "s": 1062, "text": "JSP gives you an option to specify Error Page for each JSP using page attribute. Whenever the page throws an exception, the JSP container automatically invokes the error page." }, { "code": null, "e": 1378, "s": 1238, "text": "Follow...
Python - Convert Nested dictionary to Mapped Tuple - GeeksforGeeks
03 Jul, 2020 Sometimes, while working with Python dictionaries, we can have a problem in which we need to convert nested dictionaries to mapped tuple. This kind of problem can occur in web development and day-day programming. Let’s discuss certain ways in which this task can be performed. Input : test_dict = {‘gfg’ : {...
[ { "code": null, "e": 24333, "s": 24305, "text": "\n03 Jul, 2020" }, { "code": null, "e": 24610, "s": 24333, "text": "Sometimes, while working with Python dictionaries, we can have a problem in which we need to convert nested dictionaries to mapped tuple. This kind of problem can ...
Data Structures | Binary Trees | Question 13 - GeeksQuiz
Theory of Computation Computer Organization and Architecture Software Engineering HTML and XML Engineering Mathematics GATE Aptitude CS Interview Questions Programming Languages C C++ Java Python C C++ Java Python Computer Science Data Structures Algorithms Operating Systems DBMS Compiler Design Computer Networ...
[ { "code": null, "e": 314, "s": 0, "text": "\nTheory of Computation\nComputer Organization and Architecture\nSoftware Engineering\nHTML and XML\nEngineering Mathematics\n\n\nGATE\nAptitude\nCS Interview Questions\n\n" }, { "code": null, "e": 357, "s": 314, "text": "Programming Lan...
Draw a curve connecting two points instead of a straight line in matplotlib
To draw a curve connecting two points instead of a straight line in matplotlib, we can take the following steps − Set the figure size and adjust the padding between and around the subplots. Define a draw_curve() method to make a curve with a mathematical expression. Plot point1 and point2 data points. Plot x and y data...
[ { "code": null, "e": 1176, "s": 1062, "text": "To draw a curve connecting two points instead of a straight line in matplotlib, we can take the following steps −" }, { "code": null, "e": 1252, "s": 1176, "text": "Set the figure size and adjust the padding between and around the su...
Count pairs in an array which have at least one digit common - GeeksforGeeks
24 May, 2021 Given an array of N numbers. Find out the number of pairs i and j such that i < j and Ai and Aj have at least one digit common (For e.g. (11, 19) have 1 digit common but (36, 48) have no digit common) Examples: Input: A[] = { 10, 12, 24 } Output: 2 Explanation: Two valid pairs are (10, 12) and (12, 24) wh...
[ { "code": null, "e": 24820, "s": 24792, "text": "\n24 May, 2021" }, { "code": null, "e": 25021, "s": 24820, "text": "Given an array of N numbers. Find out the number of pairs i and j such that i < j and Ai and Aj have at least one digit common (For e.g. (11, 19) have 1 digit comm...
DropDownView in Android - GeeksforGeeks
18 Feb, 2021 DropDownView is another exciting feature used in most Android applications. It is a unique way of representing the menu and other options in animated form. We can get to see the list of options under one heading in DropDownView. In this article, we are going to see how to implement DropDownView in Android....
[ { "code": null, "e": 25116, "s": 25088, "text": "\n18 Feb, 2021" }, { "code": null, "e": 25589, "s": 25116, "text": "DropDownView is another exciting feature used in most Android applications. It is a unique way of representing the menu and other options in animated form. We can ...
File and FileReader in JavaScript?
Following is the code showing file and fileReader in JavaScript − Live Demo <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-se...
[ { "code": null, "e": 1128, "s": 1062, "text": "Following is the code showing file and fileReader in JavaScript −" }, { "code": null, "e": 1139, "s": 1128, "text": " Live Demo" }, { "code": null, "e": 2450, "s": 1139, "text": "<!DOCTYPE html>\n<html lang=\"en\"...
Sync AWS RDS Postgres to Redshift using AWS DMS | by Axel Furlan | Towards Data Science
Disclaimer: this post assumes some understanding of programming. When we first started to get to know AWS Redshift, we fell in love for the fast aggregated query processing. This strong advantage meant sky-rocketing our productivity and speed when performing statistical studies or simply data-extractions. So, of course...
[ { "code": null, "e": 112, "s": 47, "text": "Disclaimer: this post assumes some understanding of programming." }, { "code": null, "e": 541, "s": 112, "text": "When we first started to get to know AWS Redshift, we fell in love for the fast aggregated query processing. This strong a...
Standard SQL in Google BigQuery. Advantages and Examples of Use in... | by Marie Sharapa | Towards Data Science
In 2016, Google BigQuery introduced a new way to communicate with tables: Standard SQL. Until then, BigQuery had its own structured query language called BigQuery SQL (now called Legacy SQL). At first glance, there isn’t much difference between Legacy and Standard SQL: the names of tables are written a little different...
[ { "code": null, "e": 364, "s": 172, "text": "In 2016, Google BigQuery introduced a new way to communicate with tables: Standard SQL. Until then, BigQuery had its own structured query language called BigQuery SQL (now called Legacy SQL)." }, { "code": null, "e": 716, "s": 364, "te...
Convert given array to Arithmetic Progression by adding an element - GeeksforGeeks
20 May, 2021 Given an array arr[], the task is to find an element that can be added to the array in order to convert it to Arithmetic Progression. If it’s impossible to convert the given array into an AP, then print -1. Examples: Input: arr[] = {3, 7} Output: 11 3, 7 and 11 is a finite AP sequence. Input: a[] = {4, 6...
[ { "code": null, "e": 25256, "s": 25228, "text": "\n20 May, 2021" }, { "code": null, "e": 25463, "s": 25256, "text": "Given an array arr[], the task is to find an element that can be added to the array in order to convert it to Arithmetic Progression. If it’s impossible to convert...
How can a query multiply 2 cells for each row in MySQL?
You can use multiplication operator (*) between two cells. The syntax is as follows SELECT yourColumnName1,yourColumnName2, yourColumnName1*yourColumnName2 as ‘anyVariableName’ from yourTableName; To understand the above syntax, let us create a table. The query to create a table is as follows mysql> create table Multip...
[ { "code": null, "e": 1146, "s": 1062, "text": "You can use multiplication operator (*) between two cells. The syntax is as follows" }, { "code": null, "e": 1259, "s": 1146, "text": "SELECT yourColumnName1,yourColumnName2,\nyourColumnName1*yourColumnName2 as ‘anyVariableName’\nfro...
ANN Binary Classification | Towards Data Science
This article aims to explain how to create an artificial neural network (ANN) to predict if a banker customer is leaving or not using raw banking customers' data. The article is split into 6 parts as below. Problem statementData processingModel buildingModel compilingModel fittingModel prediction Problem statement Data...
[ { "code": null, "e": 378, "s": 171, "text": "This article aims to explain how to create an artificial neural network (ANN) to predict if a banker customer is leaving or not using raw banking customers' data. The article is split into 6 parts as below." }, { "code": null, "e": 469, "s...
How do I un-escape a backslash-escaped string in Python?
There are two ways to go about unescaping backslash escaped strings in Python. First is using literal_eval to evaluate the string. Note that in this method you need to surround the string in another layer of quotes. For example: >>> import ast >>> a = '"Hello,\\nworld"' >>> print ast.literal_eval(a) Hello, world Anothe...
[ { "code": null, "e": 1291, "s": 1062, "text": "There are two ways to go about unescaping backslash escaped strings in Python. First is using literal_eval to evaluate the string. Note that in this method you need to surround the string in another layer of quotes. For example:" }, { "code": nu...
Check if all occurrences of a character appear together - GeeksforGeeks
04 May, 2021 Given a string s and a character c, find if all occurrences of c appear together in s or not. If the character c does not appear in the string at all, the answer is true. Examples Input: s = "1110000323", c = '1' Output: Yes All occurrences of '1' appear together in "1110000323" Input: s = "3231131", c ...
[ { "code": null, "e": 25200, "s": 25172, "text": "\n04 May, 2021" }, { "code": null, "e": 25371, "s": 25200, "text": "Given a string s and a character c, find if all occurrences of c appear together in s or not. If the character c does not appear in the string at all, the answer i...
Final static variables in Java
Class variables also known as static variables are declared with the static keyword in a class, but outside a method, constructor or a block. Class variables also known as static variables are declared with the static keyword in a class, but outside a method, constructor or a block. There would only be one copy of each...
[ { "code": null, "e": 1204, "s": 1062, "text": "Class variables also known as static variables are declared with the static keyword in a class, but outside a method, constructor or a block." }, { "code": null, "e": 1346, "s": 1204, "text": "Class variables also known as static var...
Check if n is divisible by power of 2 without using arithmetic operators - GeeksforGeeks
16 Aug, 2021 Given two positive integers n and m. The problem is to check whether n is divisible by 2m or not without using arithmetic operators. Examples: Input : n = 8, m = 2 Output : Yes Input : n = 14, m = 3 Output : No Approach: If a number is divisible by 2 then it has its least significant bit (LSB) set to 0, ...
[ { "code": null, "e": 25014, "s": 24986, "text": "\n16 Aug, 2021" }, { "code": null, "e": 25147, "s": 25014, "text": "Given two positive integers n and m. The problem is to check whether n is divisible by 2m or not without using arithmetic operators." }, { "code": null, ...
Reverse a number in JavaScript
Our aim is to write a JavaScript function that takes in a number and returns its reversed number For example, reverse of 678 − 876 Here’s the code to reverse a number in JavaScript − const num = 124323; const reverse = (num) => parseInt(String(num) .split("") .reverse() .join(""), 10); console.log(reverse(num)); Output...
[ { "code": null, "e": 1159, "s": 1062, "text": "Our aim is to write a JavaScript function that takes in a number and returns its reversed number" }, { "code": null, "e": 1189, "s": 1159, "text": "For example, reverse of 678 −" }, { "code": null, "e": 1193, "s": 118...
Sort strings in Alphanumeric sequence
A list of given strings is sorted in alphanumeric order or Dictionary Order. Like for these words: Apple, Book, Aim, they will be sorted as Aim, Apple, Book.If there are some numbers, they can be placed before the alphabetic strings. Input: A list of strings: Ball Apple Data Area 517 April Man 506 Output: Strings after...
[ { "code": null, "e": 1296, "s": 1062, "text": "A list of given strings is sorted in alphanumeric order or Dictionary Order. Like for these words: Apple, Book, Aim, they will be sorted as Aim, Apple, Book.If there are some numbers, they can be placed before the alphabetic strings." }, { "code...
How does free() know the size of memory to be deallocated? - GeeksforGeeks
28 May, 2017 Consider the following prototype of free() function which is used to free memory allocated using malloc() or calloc() or realloc(). void free(void *ptr); Note that the free function does not accept size as a parameter. How does free() function know how much memory to free given just a pointer? Following is...
[ { "code": null, "e": 24232, "s": 24204, "text": "\n28 May, 2017" }, { "code": null, "e": 24364, "s": 24232, "text": "Consider the following prototype of free() function which is used to free memory allocated using malloc() or calloc() or realloc()." }, { "code": "void fre...
How to click on sign up button using Java in Selenium I am able to open page but not able to click?
We can click on the Sign up button using Java in Selenium. First of all, we have to identify the Sign up button with the help of any of the locators like id, class name, name, link text, xpath, css or partial link text. After identification, we have to click on the Sign up the button with the help of the method click. ...
[ { "code": null, "e": 1382, "s": 1062, "text": "We can click on the Sign up button using Java in Selenium. First of all, we have to identify the Sign up button with the help of any of the locators like id, class name, name, link text, xpath, css or partial link text. After identification, we have to ...
Matplotlib.axes.Axes.bar() 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...
How to Convert Epoch Time to Date in SQL?
17 Dec, 2021 DATEADD() function in SQL Server is used to sum up a time or a date interval to a specified date then returns the modified date. There are some features of DATEADD() below: This function is used to sum up a time or a date interval to a date specified. This function comes under Date Functions. This functio...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Dec, 2021" }, { "code": null, "e": 202, "s": 28, "text": "DATEADD() function in SQL Server is used to sum up a time or a date interval to a specified date then returns the modified date. There are some features of DATEADD() below: " ...
Preferences in ESP32
Non−volatile storage is an important requirement for embedded systems. Often, we want the chip to remember a couple of things, like setup variables, WiFi credentials, etc. even between power cycles. It would be so inconvenient if we had to perform setup or config every time the device undergoes a power reset. ESP32 has...
[ { "code": null, "e": 2911, "s": 2317, "text": "Non−volatile storage is an important requirement for embedded systems. Often, we want the chip to remember a couple of things, like setup variables, WiFi credentials, etc. even between power cycles. It would be so inconvenient if we had to perform setup...
stdev() method in Python statistics module
16 Jul, 2021 Statistics module in Python provides a function known as stdev() , which can be used to calculate the standard deviation. stdev() function only calculates standard deviation from a sample of data, rather than an entire population. To calculate standard deviation of an entire population, another function k...
[ { "code": null, "e": 54, "s": 26, "text": "\n16 Jul, 2021" }, { "code": null, "e": 286, "s": 54, "text": "Statistics module in Python provides a function known as stdev() , which can be used to calculate the standard deviation. stdev() function only calculates standard deviation ...
Property binding in angular 8
11 Sep, 2020 Property Binding is a one-way data-binding technique. In property binding, we bind a property of a DOM element to a field which is a defined property in our component TypeScript code. Actually, Angular internally converts string interpolation into property binding. In this, we bind the property of a define...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Sep, 2020" }, { "code": null, "e": 294, "s": 28, "text": "Property Binding is a one-way data-binding technique. In property binding, we bind a property of a DOM element to a field which is a defined property in our component TypeScri...
Head command in Linux with examples
22 Feb, 2022 It is the complementary of Tail command. The head command, as the name implies, print the top N number of data of the given input. By default, it prints the first 10 lines of the specified files. If more than one file name is provided then data from each file is preceded by its file name. Syntax: head [...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Feb, 2022" }, { "code": null, "e": 343, "s": 52, "text": "It is the complementary of Tail command. The head command, as the name implies, print the top N number of data of the given input. By default, it prints the first 10 lines of...
Python | Pandas dataframe.skew()
19 Feb, 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 dataframe.skew() function return unbiased skew over requested axis Normalized by N-1. ...
[ { "code": null, "e": 52, "s": 24, "text": "\n19 Feb, 2021" }, { "code": null, "e": 266, "s": 52, "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 im...
Python Program for QuickSort
In this article, we will learn about the solution to the problem statement given below. Problem statement − We are given an array, we need to sort it using the concept of quicksort Here we first partition the array and sort the separate partition to get the sorted array. Now let’s observe the solution in the implementa...
[ { "code": null, "e": 1275, "s": 1187, "text": "In this article, we will learn about the solution to the problem statement given below." }, { "code": null, "e": 1368, "s": 1275, "text": "Problem statement − We are given an array, we need to sort it using the concept of quicksort" ...
Android Listview in Java with Example
18 Feb, 2021 A ListView is a type of AdapterView that displays a vertical list of scroll-able views and each view is placed one below the other. Using adapter, items are inserted into the list from an array or database. For displaying the items in the list method setAdaptor() is used. setAdaptor() method conjoins an ad...
[ { "code": null, "e": 52, "s": 24, "text": "\n18 Feb, 2021" }, { "code": null, "e": 380, "s": 52, "text": "A ListView is a type of AdapterView that displays a vertical list of scroll-able views and each view is placed one below the other. Using adapter, items are inserted into the...
What is the Need of Inheritance in Java?
17 Mar, 2021 Inheritance, as we have all heard is one of the most important features of Object-Oriented Programming Languages whether it is Java, C++, or any other OOP language. But what is the need for Inheritance? Why is it so an important concept Inheritance can be defined as a mechanism by which one object can acqu...
[ { "code": null, "e": 54, "s": 26, "text": "\n17 Mar, 2021" }, { "code": null, "e": 291, "s": 54, "text": "Inheritance, as we have all heard is one of the most important features of Object-Oriented Programming Languages whether it is Java, C++, or any other OOP language. But what ...
Python File seek() Method
Python file method seek() sets the file's current position at the offset. The whence argument is optional and defaults to 0, which means absolute file positioning, other values are 1 which means seek relative to the current position and 2 means seek relative to the file's end. There is no return value. Note that if the...
[ { "code": null, "e": 2656, "s": 2378, "text": "Python file method seek() sets the file's current position at the offset. The whence argument is optional and defaults to 0, which means absolute file positioning, other values are 1 which means seek relative to the current position and 2 means seek rel...
PyQt5 QCalendarWidget – Clicked signal
25 Nov, 2021 In this article we will see how we can get the clicked signal from the QCalendarWidget. Clicked signal is emitted when a mouse button is clicked i.e when the mouse was clicked on the specified date. The signal is only emitted when clicked on a valid date, e.g., dates are not outside the minimum date and ma...
[ { "code": null, "e": 28, "s": 0, "text": "\n25 Nov, 2021" }, { "code": null, "e": 418, "s": 28, "text": "In this article we will see how we can get the clicked signal from the QCalendarWidget. Clicked signal is emitted when a mouse button is clicked i.e when the mouse was clicked...
How to insert a line break in PHP string ?
07 Oct, 2021 In this article, we will discuss how to insert a line break in PHP string. We will get it by using nl2br() function. This function is used to give a new line break wherever ‘\n’ is placed. Syntax: nl2br("string \n"); where, string is the input string. Example 1: PHP Program to insert a line break in a stri...
[ { "code": null, "e": 28, "s": 0, "text": "\n07 Oct, 2021" }, { "code": null, "e": 217, "s": 28, "text": "In this article, we will discuss how to insert a line break in PHP string. We will get it by using nl2br() function. This function is used to give a new line break wherever ‘\...
Intent Filter in Android with Demo App
07 Mar, 2021 The intent is a messaging object which tells what kind of action to be performed. The intent’s most significant use is the launching of the activity. Intent facilitates the communication between the components. Note: App components are the basic building blocks of App. Starting Activity An activity represe...
[ { "code": null, "e": 52, "s": 24, "text": "\n07 Mar, 2021" }, { "code": null, "e": 263, "s": 52, "text": "The intent is a messaging object which tells what kind of action to be performed. The intent’s most significant use is the launching of the activity. Intent facilitates the c...
Express.js req.cookies Property
08 Jul, 2020 The req.cookies property is used when the user is using cookie-parser middleware. This property is an object that contains cookies sent by the request. Syntax: req.cookies Parameter: No parameters. Return Value: Object Installation of express module: You can visit the link to Install express module. You ca...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jul, 2020" }, { "code": null, "e": 180, "s": 28, "text": "The req.cookies property is used when the user is using cookie-parser middleware. This property is an object that contains cookies sent by the request." }, { "code": n...
Sum of numbers from 1 to N which are divisible by 3 or 4
13 Jun, 2022 Given a number N. The task is to find the sum of all those numbers from 1 to N that are divisible by 3 or by 4.Examples: Input : N = 5 Output : 7 sum = 3 + 4 Input : N = 12 Output : 42 sum = 3 + 4 + 6 + 8 + 9 + 12 Approach: To solve the problem, follow the below steps: Find the sum of numbers that ...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Jun, 2022" }, { "code": null, "e": 175, "s": 52, "text": "Given a number N. The task is to find the sum of all those numbers from 1 to N that are divisible by 3 or by 4.Examples: " }, { "code": null, "e": 270, "s": ...
What is the difference between inline-flex and inline-block in CSS?
29 Mar, 2022 The display property specifies how an element should be displayed in a webpage. There can be many values, related to this property in CSS. Inline-block and inline-flex are two such properties. Although there are several values that this property can have, to understand the aforementioned, let us first look...
[ { "code": null, "e": 52, "s": 24, "text": "\n29 Mar, 2022" }, { "code": null, "e": 408, "s": 52, "text": "The display property specifies how an element should be displayed in a webpage. There can be many values, related to this property in CSS. Inline-block and inline-flex are tw...
Why Does BufferedReader Throw IOException in Java?
30 Aug, 2021 IOException is a type of checked exception which occurs during input/output operation. BufferedReader is used to read data from a file, input stream, database, etc. Below is the simplified steps of how a file is read using a BufferedReader in java. In RAM a buffered reader object is created.Some lines of a...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Aug, 2021" }, { "code": null, "e": 277, "s": 28, "text": "IOException is a type of checked exception which occurs during input/output operation. BufferedReader is used to read data from a file, input stream, database, etc. Below is t...
Eight “No-Code” Features In Python | by Christopher Tao | Towards Data Science
One of the reasons why Python become popular is that we can write relatively less code to achieve complex features. The Python developers’ community welcomes libraries that encapsulate complicated implementations with simple interfaces exposed for use. However, that’s even not the simplest. Can you believe that we can ...
[ { "code": null, "e": 425, "s": 172, "text": "One of the reasons why Python become popular is that we can write relatively less code to achieve complex features. The Python developers’ community welcomes libraries that encapsulate complicated implementations with simple interfaces exposed for use." ...
TypeScript - Functions
Functions are the building blocks of readable, maintainable, and reusable code. A function is a set of statements to perform a specific task. Functions organize the program into logical blocks of code. Once defined, functions may be called to access code. This makes the code reusable. Moreover, functions make it easy t...
[ { "code": null, "e": 2408, "s": 2048, "text": "Functions are the building blocks of readable, maintainable, and reusable code. A function is a set of statements to perform a specific task. Functions organize the program into logical blocks of code. Once defined, functions may be called to access cod...
Prime numbers in a range - JavaScript
We are required to write a JavaScript function that takes in two numbers, say, a and b and returns the total number of prime numbers between a and b (including a and b, if they are prime). For example − If a = 2, and b = 21, the prime numbers between them are 2, 3, 5, 7, 11, 13, 17, 19 And their count is 8. Our functio...
[ { "code": null, "e": 1251, "s": 1062, "text": "We are required to write a JavaScript function that takes in two numbers, say, a and b and returns the total number of prime numbers between a and b (including a and b, if they are prime)." }, { "code": null, "e": 1265, "s": 1251, "t...
How to get YouTube video ID with PHP Regex ? - GeeksforGeeks
21 Oct, 2021 YouTube ID is a string of 11 characters, which consists of both upper and lower case alphabets and numeric values. It is used to define a YouTube video uniquely. A link to any YouTube video consists of its YouTube ID in a query format whose variable is generally written as ‘v’ or ‘vi’ or can be represented...
[ { "code": null, "e": 24966, "s": 24938, "text": "\n21 Oct, 2021" }, { "code": null, "e": 25343, "s": 24966, "text": "YouTube ID is a string of 11 characters, which consists of both upper and lower case alphabets and numeric values. It is used to define a YouTube video uniquely. A...
Design and Analysis Insertion Sort
Insertion sort is a very simple method to sort numbers in an ascending or descending order. This method follows the incremental method. It can be compared with the technique how cards are sorted at the time of playing a game. The numbers, which are needed to be sorted, are known as keys. Here is the algorithm of the in...
[ { "code": null, "e": 2825, "s": 2599, "text": "Insertion sort is a very simple method to sort numbers in an ascending or descending order. This method follows the incremental method. It can be compared with the technique how cards are sorted at the time of playing a game." }, { "code": null,...
Elegant CICD with Databricks notebooks | by Rik Jongerius | Towards Data Science
With Luuk van der Velden Notebooks are the primary runtime on Databricks from data science exploration to ETL and ML in production. This emphasis on notebooks calls for a change in our understanding of production quality code. We have to do away with our hesitancy about messy notebooks and ask ourselves: How do we move...
[ { "code": null, "e": 196, "s": 171, "text": "With Luuk van der Velden" }, { "code": null, "e": 650, "s": 196, "text": "Notebooks are the primary runtime on Databricks from data science exploration to ETL and ML in production. This emphasis on notebooks calls for a change in our u...
Bootstrap 4 - Alerts
The alert component specifies the predefined message for an user actions. It is used to send the information such as warning, error or confirmation messages to the end users. You can create an alert box, by adding a class of .alert and along with contextual classes such as .alert-success, .alert-info, .alert-warning, ....
[ { "code": null, "e": 1991, "s": 1816, "text": "The alert component specifies the predefined message for an user actions. It is used to send the information such as warning, error or confirmation messages to the end users." }, { "code": null, "e": 2213, "s": 1991, "text": "You can...
Redux - Testing
Testing Redux code is easy as we mostly write functions, and most of them are pure. So we can test it without even mocking them. Here, we are using JEST as a testing engine. It works in the node environment and does not access DOM. We can install JEST with the code given below − npm install --save-dev jest With babel,...
[ { "code": null, "e": 2047, "s": 1815, "text": "Testing Redux code is easy as we mostly write functions, and most of them are pure. So we can test it without even mocking them. Here, we are using JEST as a testing engine. It works in the node environment and does not access DOM." }, { "code":...
Patchwork - Awesome ggplot2 extension for DataViz | Towards Data Science
For Data Visualization in R, ggplot2 has been the go-to package to generate awesome, publishing quality plots. Its layered approach enables us to start with a simple visual foundation and keep adding embellishments with each layer. Even the most basic plots with default settings, looks and feels way better than base R ...
[ { "code": null, "e": 879, "s": 172, "text": "For Data Visualization in R, ggplot2 has been the go-to package to generate awesome, publishing quality plots. Its layered approach enables us to start with a simple visual foundation and keep adding embellishments with each layer. Even the most basic plo...
Check if a large number is divisibility by 15 in C++
Here we will see how to check a number is divisible by 15 or not. In this case the number is very large number. So we put the number as string. To check whether a number is divisible by 15, if the number is divisible by 5, and divisible by 3. So to check divisibility by 5, we have to see the last number is 0 or 5. To c...
[ { "code": null, "e": 1206, "s": 1062, "text": "Here we will see how to check a number is divisible by 15 or not. In this case the number is very large number. So we put the number as string." }, { "code": null, "e": 1463, "s": 1206, "text": "To check whether a number is divisible...
How to animate RecyclerView items when they appear on screen?
This example demonstrates how to animate RecyclerView items when they appear on the screen . 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...
[ { "code": null, "e": 1155, "s": 1062, "text": "This example demonstrates how to animate RecyclerView items when they appear on the screen ." }, { "code": null, "e": 1284, "s": 1155, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all re...
Evaluating Performance of Models. Log reg/classification evaluation... | by Michelle Venables | Towards Data Science
After completing some data science projects in logistic regression and binary classification I have decided to write more about the evaluation of our models and steps to take to make sure they are running efficiently and accurately. You may have “good” data and understand how to build a model, but if you are able to in...
[ { "code": null, "e": 615, "s": 172, "text": "After completing some data science projects in logistic regression and binary classification I have decided to write more about the evaluation of our models and steps to take to make sure they are running efficiently and accurately. You may have “good” da...
Deep dive into ROC-AUC. deep dive into ROC-AUC | by Songhao Wu | Towards Data Science
I believe most people have heard of the ROC curve or Area under the Curve before if you are interested in data science. However, what exactly is the ROC curve, and why area under the ROC curve is a good metric to evaluate the classification model? I have briefly walked through in my previous article on top metrics for ...
[ { "code": null, "e": 561, "s": 172, "text": "I believe most people have heard of the ROC curve or Area under the Curve before if you are interested in data science. However, what exactly is the ROC curve, and why area under the ROC curve is a good metric to evaluate the classification model? I have ...
Monitor System Power States in ElectronJS
29 May, 2020 ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which are capable of running on Windows, macOS, and Linux operating systems. It combines the Chromium engine and NodeJS into a Single Runtime. One suc...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 May, 2020" }, { "code": null, "e": 328, "s": 28, "text": "ElectronJS is an Open Source Framework used for building Cross-Platform native desktop applications using web technologies such as HTML, CSS, and JavaScript which are capable ...
Morgan Stanley Interview | Set 1
24 Jul, 2019 Morgan Stanley campus placement for post IT analyst. 1st round – objective written test10 questions on aptitude and analytics30 questions on programming10 questions on computer fundamentalsThey had sectional cut-off and selected 20 students 2st round – coding written test5 questions on coding basically on ...
[ { "code": null, "e": 52, "s": 24, "text": "\n24 Jul, 2019" }, { "code": null, "e": 105, "s": 52, "text": "Morgan Stanley campus placement for post IT analyst." }, { "code": null, "e": 293, "s": 105, "text": "1st round – objective written test10 questions on ap...
BigInteger toString() Method in Java
04 Dec, 2018 BigInteger Class offers 2 methods for toString(). toString(int radix): The java.math.BigInteger.toString(int radix) method returns the decimal String representation of this BigInteger in given radix. Radix parameter decides on which number base (Binary, octal, hex etc) it should return the string. In case ...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Dec, 2018" }, { "code": null, "e": 78, "s": 28, "text": "BigInteger Class offers 2 methods for toString()." }, { "code": null, "e": 3396, "s": 78, "text": "toString(int radix): The java.math.BigInteger.toString(in...
Python | Sort list elements by frequency
05 Apr, 2022 Given a list containing repeated and non-repeated elements, the task is to sort the given list on basis of the frequency of elements. Let’s discuss few methods for the same. Python3 # Python code to demonstrate# sort list by frequency# of elements from collections import Counter ini_list = [1, 2, 3, 4, 4, ...
[ { "code": null, "e": 52, "s": 24, "text": "\n05 Apr, 2022" }, { "code": null, "e": 226, "s": 52, "text": "Given a list containing repeated and non-repeated elements, the task is to sort the given list on basis of the frequency of elements. Let’s discuss few methods for the same."...
Rexx - Basic Syntax
In order to understand the basic syntax of Rexx, let us first look at a simple Hello World program. /* Main program */ say "Hello World" One can see how simple the hello world program is. It is a simple script line which is used to execute the Hello World program. The following things need to be noted about the above...
[ { "code": null, "e": 2573, "s": 2473, "text": "In order to understand the basic syntax of Rexx, let us first look at a simple Hello World program." }, { "code": null, "e": 2612, "s": 2573, "text": "/* Main program */ \nsay \"Hello World\" " }, { "code": null, "e": 274...
Sum of the digits of square of the given number which has only 1’s as its digits
19 Mar, 2022 Given a number represented as string str consisting of the digit 1 only i.e. 1, 11, 111, .... The task is to find the sum of digits of the square of the given number. Examples: Input: str = 11 Output: 4 112 = 121 1 + 2 + 1 = 4 Input: str = 1111 Output: 16 Naive approach: Find the square of the given num...
[ { "code": null, "e": 53, "s": 25, "text": "\n19 Mar, 2022" }, { "code": null, "e": 220, "s": 53, "text": "Given a number represented as string str consisting of the digit 1 only i.e. 1, 11, 111, .... The task is to find the sum of digits of the square of the given number." }, ...
Check if the string contains consecutive letters and each letter occurs exactly once
30 Jun, 2022 Given string str. The task is to check if the string contains consecutive letters and each letter occurs exactly once. Examples: Input: str = “fced” Output: YesThe string contains ‘c’, ‘d’, ‘e’ and ‘f’ which are consecutive letters. Input: str = “xyz” Output: Yes Input: str = “abd” Output: No Approach:...
[ { "code": null, "e": 54, "s": 26, "text": "\n30 Jun, 2022" }, { "code": null, "e": 174, "s": 54, "text": "Given string str. The task is to check if the string contains consecutive letters and each letter occurs exactly once. " }, { "code": null, "e": 186, "s": 174...
Python | Pandas dataframe.reindex()
22 Nov, 2018 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 dataframe.reindex() function conform DataFrame to new index with optional filling logi...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Nov, 2018" }, { "code": null, "e": 242, "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...