title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
JSP | ScriptletTag - GeeksforGeeks
09 Aug, 2018 Java Server Page (JSP) is a technology for controlling the content or appearance of Web pages through the use of servlets. Small programs that are specified in the Web page and run on the Web server to modify the Web page before it is sent to the user who requested it. There are total three Scripting Eleme...
[ { "code": null, "e": 24145, "s": 24117, "text": "\n09 Aug, 2018" }, { "code": null, "e": 24415, "s": 24145, "text": "Java Server Page (JSP) is a technology for controlling the content or appearance of Web pages through the use of servlets. Small programs that are specified in the...
Card Flipping Game in C++
Suppose on a table are N cards, with a positive integer printed on both side of each card (possibly different). We have to flip any number of cards, and after we choose one card. If the number X on the back side of the chosen card is not on the front of any card, then the number X is known as good. We have to find the ...
[ { "code": null, "e": 1640, "s": 1062, "text": "Suppose on a table are N cards, with a positive integer printed on both side of each card (possibly different). We have to flip any number of cards, and after we choose one card. If the number X on the back side of the chosen card is not on the front of...
Initialization of local variable in a conditional block in Java - GeeksforGeeks
11 Sep, 2018 Java comprises 5 conditional blocks namely – if, switch, while, for and try.In all these blocks, if the specified condition is true, the code inside the block is executed and vice-versa. Also, Java compiler doesn’t let you leave a local variable uninitialized. While initializing local variable inside a con...
[ { "code": null, "e": 24052, "s": 24024, "text": "\n11 Sep, 2018" }, { "code": null, "e": 24313, "s": 24052, "text": "Java comprises 5 conditional blocks namely – if, switch, while, for and try.In all these blocks, if the specified condition is true, the code inside the block is e...
What is aggregation in Java?
When an object A contains a reference to another object B or we can say Object A has a HAS-A relationship with Object B, then it is termed as Aggregation. Aggregation helps in reusing the code. Object B can have utility methods and which can be utilized by multiple objects. Whichever class has object B then it can util...
[ { "code": null, "e": 1217, "s": 1062, "text": "When an object A contains a reference to another object B or we can say Object A has a HAS-A relationship with Object B, then it is termed as Aggregation." }, { "code": null, "e": 1399, "s": 1217, "text": "Aggregation helps in reusin...
Check Data Type of each DataFrame Column in R - GeeksforGeeks
21 Apr, 2021 In this article, we will discuss how to identify the data type of variables in a column of a given dataframe using R Programming language. We will be using str() and sapply() function in this article to check the data type of each column in a dataframe. Method 1: Using str() function str() function in R L...
[ { "code": null, "e": 25242, "s": 25214, "text": "\n21 Apr, 2021" }, { "code": null, "e": 25497, "s": 25242, "text": "In this article, we will discuss how to identify the data type of variables in a column of a given dataframe using R Programming language. We will be using str() a...
Degree of Vertex of a Graph
It is the number of vertices adjacent to a vertex V. Notation − deg(V). In a simple graph with n number of vertices, the degree of any vertices is − deg(v) = n – 1 ∀ v ∈ G A vertex can form an edge with all other vertices except by itself. So the degree of a vertex will be up to the number of vertices in the graph minu...
[ { "code": null, "e": 1115, "s": 1062, "text": "It is the number of vertices adjacent to a vertex V." }, { "code": null, "e": 1134, "s": 1115, "text": "Notation − deg(V)." }, { "code": null, "e": 1211, "s": 1134, "text": "In a simple graph with n number of vert...
GitHub User insights using GitHub API — Data Collection and Analysis | by Karan Bhanot | Towards Data Science
As I was working with GitHub pages, I decided that I’d like to have some statistics about my GitHub projects on it. Thus, I decided to use GitHub’s own API to draw insights. As this might be useful to others as well, I decided to create it as a project and publish on GitHub itself. Check out the repository below: https...
[ { "code": null, "e": 487, "s": 172, "text": "As I was working with GitHub pages, I decided that I’d like to have some statistics about my GitHub projects on it. Thus, I decided to use GitHub’s own API to draw insights. As this might be useful to others as well, I decided to create it as a project an...
Count of points such that sum of Manhattan distances is minimized - GeeksforGeeks
12 Jan, 2022 Given N points in K dimensional space in a 2D array Points[][], where 1≤ N ≤ 105 and 1 ≤ K ≤ 5. The task is to determine the number of points (with integer coordinates) such that the sum of Manhattan distances from these points to the N points is minimized. Manhattan distance is the sum of distances betw...
[ { "code": null, "e": 26376, "s": 26348, "text": "\n12 Jan, 2022" }, { "code": null, "e": 26636, "s": 26376, "text": "Given N points in K dimensional space in a 2D array Points[][], where 1≤ N ≤ 105 and 1 ≤ K ≤ 5. The task is to determine the number of points (with integer coordi...
Open-CV Based Sudoku Solver Powered By Rust | by PRAKHAR KAUSHIK | Towards Data Science
Okay so one day browsing through Reddit, I came across a project, It was a sudoku solver using video cam stream. The project was cool, but there was the only thing I didn’t like: it used to crop the sudoku image and give a solved sudoku image solution. So I thought why not project back the solution to the original imag...
[ { "code": null, "e": 425, "s": 172, "text": "Okay so one day browsing through Reddit, I came across a project, It was a sudoku solver using video cam stream. The project was cool, but there was the only thing I didn’t like: it used to crop the sudoku image and give a solved sudoku image solution." ...
Angular 4 - Directives
Directives in Angular is a js class, which is declared as @directive. We have 3 directives in Angular. The directives are listed below − These form the main class having details of how the component should be processed, instantiated and used at runtime. A structure directive basically deals with manipulating the dom el...
[ { "code": null, "e": 2129, "s": 1992, "text": "Directives in Angular is a js class, which is declared as @directive. We have 3 directives in Angular. The directives are listed below −" }, { "code": null, "e": 2246, "s": 2129, "text": "These form the main class having details of h...
Introduction to Image Processing with Python — Image Filtering | by Tonichi Edeza | Towards Data Science
In this article, we will tackle basic image filtering. We will see how to apply kernels to an image to change its overall look. Though this can be utilized for purely aesthetic purposes, we will also go through the practical applications of image filtering. Let’s get started! As always we begin by importing the require...
[ { "code": null, "e": 305, "s": 47, "text": "In this article, we will tackle basic image filtering. We will see how to apply kernels to an image to change its overall look. Though this can be utilized for purely aesthetic purposes, we will also go through the practical applications of image filtering...
JavaScript Array unshift() Method - GeeksforGeeks
04 Oct, 2021 Below is the example of Array unshift() method. Example:<script>function func() { // Original array var array = ["GFG", "Geeks", "for", "Geeks"]; // Checking for condition in array var value = array.unshift("GeeksforGeeks"); document.write(value); document.write("<br />"); ...
[ { "code": null, "e": 26692, "s": 26664, "text": "\n04 Oct, 2021" }, { "code": null, "e": 26740, "s": 26692, "text": "Below is the example of Array unshift() method." }, { "code": null, "e": 27047, "s": 26740, "text": "Example:<script>function func() { ...
\blacktriangledown - Tex Command
\blacktriangledown - Used to draw black triangle down symbol. { \blacktriangledown } \blacktriangledown command draws black triangle down symbol. \blacktriangledown ▾ \blacktriangledown ▾ \blacktriangledown 14 Lectures 52 mins Ashraf Said 11 Lectures 1 hours Ashraf Said 9 Lect...
[ { "code": null, "e": 8048, "s": 7986, "text": "\\blacktriangledown - Used to draw black triangle down symbol." }, { "code": null, "e": 8071, "s": 8048, "text": "{ \\blacktriangledown }" }, { "code": null, "e": 8132, "s": 8071, "text": "\\blacktriangledown comm...
Find the Closest Element in BST | Practice | GeeksforGeeks
Given a BST and an integer. Find the least absolute difference between any node value of the BST and the given integer. Example 1: Input: 10 / \ 2 11 / \ 1 5 / \ 3 6 \ 4 K = 13 Output: 2 Explanation: K=13. The node that has value nearest to K is 11. so the a...
[ { "code": null, "e": 358, "s": 238, "text": "Given a BST and an integer. Find the least absolute difference between any node value of the BST and the given integer." }, { "code": null, "e": 369, "s": 358, "text": "Example 1:" }, { "code": null, "e": 570, "s": 369,...
Java Program to Illustrate Escaping Characters in Regex - GeeksforGeeks
30 Sep, 2021 Special Characters like dot(.), hash(#), etc., which have a special meaning to the regular expression need to be escaped to match in the regular expression. For example, if dot(.) is not escaped in a regular expression, it matches any single character, thus giving ambiguous results. Methods: Characters ca...
[ { "code": null, "e": 23581, "s": 23553, "text": "\n30 Sep, 2021" }, { "code": null, "e": 23865, "s": 23581, "text": "Special Characters like dot(.), hash(#), etc., which have a special meaning to the regular expression need to be escaped to match in the regular expression. For ex...
How to create a swipe refresh layout in Android using Kotlin?
This example demonstrates how to create a swipe refresh layout in Android using Kotlin. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?>...
[ { "code": null, "e": 1150, "s": 1062, "text": "This example demonstrates how to create a swipe refresh layout in Android using Kotlin." }, { "code": null, "e": 1279, "s": 1150, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all require...
Angular CLI - ng e2e Command
This chapter explains the syntax, argument and options of ng e2e command along with an example. Here, e2e refers to end to end. The syntax for ng e2e command is as follows − ng e2e <project> [options] ng e <project> [options] ng e2e builds, serves an application and then runs the end to end test cases using protractor...
[ { "code": null, "e": 2203, "s": 2075, "text": "This chapter explains the syntax, argument and options of ng e2e command along with an example. Here, e2e refers to end to end." }, { "code": null, "e": 2249, "s": 2203, "text": "The syntax for ng e2e command is as follows −" }, ...
What is the groups() method in regular expressions in Python?
This method returns a tuple containing all the subgroups of the match, from 1 up to however many groups are in the pattern. The default argument is used for groups that did not participate in the match; it defaults to None. In later versions (from 1.5.1 on), a singleton tuple is returned in such cases. >>> m = re.matc...
[ { "code": null, "e": 1367, "s": 1062, "text": "This method returns a tuple containing all the subgroups of the match, from 1 up to however many groups are in the pattern. The default argument is used for groups that did not participate in the match; it defaults to None. In later versions (from 1.5....
TypeORM - Entity
An entity is a collection of fields and associated database operations. It is used to map database table and its fields with the entities and its attributes. This chapter explains about the TypeORM entities in detail. Let us create a simple Entity class in our code. Move to your project root location and go inside src ...
[ { "code": null, "e": 2269, "s": 2051, "text": "An entity is a collection of fields and associated database operations. It is used to map database table and its fields with the entities and its attributes. This chapter explains about the TypeORM entities in detail." }, { "code": null, "e"...
fg command in Linux with examples - GeeksforGeeks
15 May, 2019 fg command in linux used to put a background job in foreground. Syntax: fg [job_spec] job_spec may be: %n : Refer to job number n.%str : Refer to a job which was started by a command beginning with str.%?str : Refer to a job which was started by a command containing str.%% or %+ : Refer to the current job....
[ { "code": null, "e": 24155, "s": 24127, "text": "\n15 May, 2019" }, { "code": null, "e": 24219, "s": 24155, "text": "fg command in linux used to put a background job in foreground." }, { "code": null, "e": 24227, "s": 24219, "text": "Syntax:" }, { "cod...
Find shortest safe route in a path with landmines - GeeksforGeeks
05 Aug, 2021 Given a path in the form of a rectangular matrix having few landmines arbitrarily placed (marked as 0), calculate length of the shortest safe route possible from any cell in the first column to any cell in the last column of the matrix. We have to avoid landmines and their four adjacent cells (left, right,...
[ { "code": null, "e": 25082, "s": 25054, "text": "\n05 Aug, 2021" }, { "code": null, "e": 25554, "s": 25082, "text": "Given a path in the form of a rectangular matrix having few landmines arbitrarily placed (marked as 0), calculate length of the shortest safe route possible from a...
Calculating the completeness score using sklearn in Python - GeeksforGeeks
26 May, 2021 An entirely complete clustering is one where each cluster has information that directs a place toward a similar class cluster. Completeness portrays the closeness of the clustering algorithm to this (completeness_score) perfection. This metric is autonomous of the outright values of the labels. A permuta...
[ { "code": null, "e": 25627, "s": 25596, "text": " \n26 May, 2021\n" }, { "code": null, "e": 25860, "s": 25627, "text": "An entirely complete clustering is one where each cluster has information that directs a place toward a similar class cluster. Completeness portrays the closene...
Java Program to Find if a Given Year is a Leap Year - GeeksforGeeks
26 Jan, 2022 Leap Year contains 366 days, which comes once every four years. Every leap year corresponds to these facts : A century year is a year ending with 00. A century year is a leap year only if it is divisible by 400. A leap year (except a century year) can be identified if it is exactly divisible by 4. A centu...
[ { "code": null, "e": 24876, "s": 24848, "text": "\n26 Jan, 2022" }, { "code": null, "e": 24986, "s": 24876, "text": "Leap Year contains 366 days, which comes once every four years. Every leap year corresponds to these facts : " }, { "code": null, "e": 25089, "s": ...
Ruby | Array select() function - GeeksforGeeks
06 Dec, 2019 Array#select() : select() is a Array class method which returns a new array containing all elements of array for which the given block returns a true value. Syntax: Array.select() Parameter: Array Return: A new array containing all elements of array for which the given block returns a true value. Example #...
[ { "code": null, "e": 25614, "s": 25586, "text": "\n06 Dec, 2019" }, { "code": null, "e": 25771, "s": 25614, "text": "Array#select() : select() is a Array class method which returns a new array containing all elements of array for which the given block returns a true value." }, ...
Introduction to Semantic UI - GeeksforGeeks
21 Jan, 2022 Semantic UI is an open-source framework that uses CSS and jQuery to build great user interfaces. It is the same as a bootstrap for use and has great different elements to use to make your website look more amazing.How to use Semantic UI ? Just google CDN semantic UI and you will get the CDN link for semant...
[ { "code": null, "e": 40451, "s": 40423, "text": "\n21 Jan, 2022" }, { "code": null, "e": 40894, "s": 40451, "text": "Semantic UI is an open-source framework that uses CSS and jQuery to build great user interfaces. It is the same as a bootstrap for use and has great different elem...
Introduction to Convolution Neural Network
08 Jul, 2022 It is assumed that the reader knows the concept of Neural networks.When it comes to Machine Learning, Artificial Neural Networks perform really well. Artificial Neural Networks are used in various classification tasks like image, audio, words. Different types of Neural Networks are used for different purpo...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Jul, 2022" }, { "code": null, "e": 775, "s": 52, "text": "It is assumed that the reader knows the concept of Neural networks.When it comes to Machine Learning, Artificial Neural Networks perform really well. Artificial Neural Networ...
Groovy - xxxValue()
This method takes on the Number as the parameter and returns a primitive type based on the method which is invoked. Following are the list of methods available − byte byteValue() short shortValue() int intValue() long longValue() float floatValue() double doubleValue() Parameters − No parameters required. Return V...
[ { "code": null, "e": 2534, "s": 2372, "text": "This method takes on the Number as the parameter and returns a primitive type based on the method which is invoked. Following are the list of methods available −" }, { "code": null, "e": 2647, "s": 2534, "text": "byte byteValue() \ns...
Program to print half diamond Number-Star pattern
06 Jun, 2022 Given a number N which represents the number of rows. The task is to print a half diamond Number-Star pattern as shown in the below examples.Note: N is always an even number.Examples: Input: N = 4 Output: 2*2 1 1 2*2 Input: N = 6 Output: 3*3*3 2*2 1 1 ...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Jun, 2022" }, { "code": null, "e": 214, "s": 28, "text": "Given a number N which represents the number of rows. The task is to print a half diamond Number-Star pattern as shown in the below examples.Note: N is always an even number.E...
First() and Last()Function in MS Access
14 Sep, 2020 1. First() Function :In MS Access, the First() function is used to return a field value from the first record in the result set returned by a query. Syntax : First(expr) Parameter : expr : It represents a string expression identifying the field that contains the data we want to use or an expression that p...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Sep, 2020" }, { "code": null, "e": 177, "s": 28, "text": "1. First() Function :In MS Access, the First() function is used to return a field value from the first record in the result set returned by a query." }, { "code": null...
SARSA Reinforcement Learning
24 Jun, 2021 Prerequisites: Q-Learning techniqueSARSA algorithm is a slight variation of the popular Q-Learning algorithm. For a learning agent in any Reinforcement Learning algorithm it’s policy can be of two types:- On Policy: In this, the learning agent learns the value function according to the current action der...
[ { "code": null, "e": 54, "s": 26, "text": "\n24 Jun, 2021" }, { "code": null, "e": 261, "s": 54, "text": "Prerequisites: Q-Learning techniqueSARSA algorithm is a slight variation of the popular Q-Learning algorithm. For a learning agent in any Reinforcement Learning algorithm it’...
objdump - Unix, Linux Command
objfile... are the object files to be examined. When you specify archives, objdump shows information on each of the member object files. For example, objdump -b oasys -m vax -h fu.o displays summary information from the section headers (-h) of fu.o, which is explicitly identified (-m) as a VAX objec...
[ { "code": null, "e": 10851, "s": 10711, "text": "\nobjfile... are the object files to be examined. When you\nspecify archives, objdump shows information on each of the member\nobject files.\n" }, { "code": null, "e": 10867, "s": 10851, "text": "\n\nFor example,\n" }, { "...
Program to generate an array having convolution of two given arrays
04 Aug, 2021 Given two arrays A[] and B[] consisting of N and M integers respectively, the task is to construct a convolution array C[] of size (N + M – 1). The convolution of 2 arrays is defined as C[i + j] = ∑(a[i] * b[j]) for every i and j. Note: If the value for any index becomes very large, then print it to modu...
[ { "code": null, "e": 28, "s": 0, "text": "\n04 Aug, 2021" }, { "code": null, "e": 173, "s": 28, "text": "Given two arrays A[] and B[] consisting of N and M integers respectively, the task is to construct a convolution array C[] of size (N + M – 1). " }, { "code": null, ...
ISO 9000 Certification in Software Engineering
23 Nov, 2020 The International organization for Standardization is a world wide federation of national standard bodies. The International standards organization (ISO) is a standard which serves as a for contract between independent parties. It specifies guidelines for development of quality system. Quality system of an...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Nov, 2020" }, { "code": null, "e": 341, "s": 54, "text": "The International organization for Standardization is a world wide federation of national standard bodies. The International standards organization (ISO) is a standard which ...
Program for length of the longest word in a sentence
16 Aug, 2021 Given a string, we have to find the longest word in the input string and then calculate the number of characters in this word. Examples: Input : A computer science portal for geeks Output : Longest word's length = 8 Input : I am an intern at geeksforgeeks Output : Longest word's length = 13 The idea is...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Aug, 2021" }, { "code": null, "e": 179, "s": 52, "text": "Given a string, we have to find the longest word in the input string and then calculate the number of characters in this word." }, { "code": null, "e": 190, "...
Python unittest – assertIsNone() function
29 Aug, 2020 assertIsNone() in Python is a unittest library function that is used in unit testing to check that input value is None or not. This function will take two parameters as input and return a boolean value depending upon assert condition. If input value is equal to None assertIsNone() will return true else ret...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Aug, 2020" }, { "code": null, "e": 346, "s": 28, "text": "assertIsNone() in Python is a unittest library function that is used in unit testing to check that input value is None or not. This function will take two parameters as input ...
priority_queue::top() in C++ STL
21 Jun, 2022 Priority queues are a type of container adaptors, specifically designed such that the first element of the queue is wither the greatest or the smallest of all elements in the queue. In general, elements are arranged according to some priority. However in C++ STL, the top element is the greatest element by ...
[ { "code": null, "e": 52, "s": 24, "text": "\n21 Jun, 2022" }, { "code": null, "e": 536, "s": 52, "text": "Priority queues are a type of container adaptors, specifically designed such that the first element of the queue is wither the greatest or the smallest of all elements in the...
How to Append Pandas DataFrame to Existing CSV File?
22 Dec, 2021 In this article, we will discuss how to append Pandas dataframe to the existing CSV file using Python. Appending dataframe means adding data rows to already existing files. To add a dataframe row-wise to an existing CSV file, we can write the dataframe to the CSV file in append mode by the parameter a usi...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Dec, 2021" }, { "code": null, "e": 132, "s": 28, "text": "In this article, we will discuss how to append Pandas dataframe to the existing CSV file using Python." }, { "code": null, "e": 368, "s": 132, "text": "Ap...
HDFS – Data Read Operation
10 Dec, 2020 HDFS is a distributed file system that stores data over a network of commodity machines. HDFS works on the streaming data access pattern means it supports write-ones and read-many features. Read operation on HDFS is very important and also very much necessary for us to know while working on HDFS that how a...
[ { "code": null, "e": 52, "s": 24, "text": "\n10 Dec, 2020" }, { "code": null, "e": 467, "s": 52, "text": "HDFS is a distributed file system that stores data over a network of commodity machines. HDFS works on the streaming data access pattern means it supports write-ones and read...
Python Script to Restart Computer
14 Jul, 2019 As we know, Python is a popular scripting language because of its versatile features. In this article, we will write a Python script to restart a computer. Let’s start with how to restart the system with Python. Note: For this to work, you have to import os library in the ide. If you don’t have it, then ‘p...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Jul, 2019" }, { "code": null, "e": 240, "s": 28, "text": "As we know, Python is a popular scripting language because of its versatile features. In this article, we will write a Python script to restart a computer. Let’s start with ho...
Python program to create Bankaccount class with deposit, withdraw function
23 Aug, 2021 Prerequisite: Object Oriented Programming in PythonLet’s write a simple Python program using OOP concept to perform some simple bank operations like deposit and withdrawal of money.First of all, define class Bankacccount. This step is followed by defining a function using __init__. It is run as soon as an ...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Aug, 2021" }, { "code": null, "e": 521, "s": 54, "text": "Prerequisite: Object Oriented Programming in PythonLet’s write a simple Python program using OOP concept to perform some simple bank operations like deposit and withdrawal of...
Random Access Iterators in C++ - GeeksforGeeks
07 Jan, 2022 After going through the template definition of various STL algorithms like std::nth_element, std::sort, you must have found their template definition consisting of objects of type Random-access Iterator. So what are they and why are they used? Random-access iterators are one of the five main types of itera...
[ { "code": null, "e": 25755, "s": 25727, "text": "\n07 Jan, 2022" }, { "code": null, "e": 25999, "s": 25755, "text": "After going through the template definition of various STL algorithms like std::nth_element, std::sort, you must have found their template definition consisting of...
Web scraping with Scrapy : Practical Understanding | by Karthikeyan P | Jul, 2020 | Towards Data Science | Towards Data Science
With all the theoretical aspects of using Scrapy being dealt with in part-1, it’s now time for some practical examples. I shall put these theoretical aspects into examples of increasing complexity. There are 3 examples, An example demonstrating single request & response by extracting a city’s weather from a weather sit...
[ { "code": null, "e": 392, "s": 172, "text": "With all the theoretical aspects of using Scrapy being dealt with in part-1, it’s now time for some practical examples. I shall put these theoretical aspects into examples of increasing complexity. There are 3 examples," }, { "code": null, "e"...
SQL - Syntax
SQL is followed by a unique set of rules and guidelines called Syntax. This tutorial gives you a quick start with SQL by listing all the basic SQL Syntax. All the SQL statements start with any of the keywords like SELECT, INSERT, UPDATE, DELETE, ALTER, DROP, CREATE, USE, SHOW and all the statements end with a semicolon...
[ { "code": null, "e": 2608, "s": 2453, "text": "SQL is followed by a unique set of rules and guidelines called Syntax. This tutorial gives you a quick start with SQL by listing all the basic SQL Syntax." }, { "code": null, "e": 2779, "s": 2608, "text": "All the SQL statements star...
3 Python Projects That Will Help Automate Your Life | by Frank Andrade | Towards Data Science
Most jobs have some tasks that add little value to our profession. Doing such tasks once isn’t a big deal, but when they become repetitive and time-consuming, they have to be automated. By automating tasks you will stop wasting time doing mundane tasks and focus on what matters most for you. On top of that, you will pu...
[ { "code": null, "e": 357, "s": 171, "text": "Most jobs have some tasks that add little value to our profession. Doing such tasks once isn’t a big deal, but when they become repetitive and time-consuming, they have to be automated." }, { "code": null, "e": 563, "s": 357, "text": "...
Machine Learning Basics: Random Forest Regression | by Gurucharan M K | Towards Data Science
Previously, I had explained the various Regression models such as Linear, Polynomial, Support Vector and Decision Tree Regression. In this article, we will go through the code for the application of Random Forest Regression which is an extension to the Decision Tree Regression implemented previously. The Decision Tree ...
[ { "code": null, "e": 474, "s": 172, "text": "Previously, I had explained the various Regression models such as Linear, Polynomial, Support Vector and Decision Tree Regression. In this article, we will go through the code for the application of Random Forest Regression which is an extension to the De...
Dealing with List Values in Pandas Dataframes | by Max Hilsdorf | Towards Data Science
Have you ever dealt with a dataset that required you to work with list values? If so, you will understand how painful this can be. If you have not, you better prepare for it. If you look closely, you will find that lists are everywhere! Here are some practical problems, where you will probably encounter list values. Au...
[ { "code": null, "e": 346, "s": 171, "text": "Have you ever dealt with a dataset that required you to work with list values? If so, you will understand how painful this can be. If you have not, you better prepare for it." }, { "code": null, "e": 489, "s": 346, "text": "If you look...
Creating a 3D plot in Matplotlib from a 3D numpy array
To create a 3D plot from a 3D numpy array, we can create a 3D array using numpy and extract the x, y, and z points. Create a new figure or activate an existing figure using figure() method. Add an '~.axes.Axes' to the figure as part of a subplot arrangement using add_subplot() method. Create a random data of size=(3, 3...
[ { "code": null, "e": 1178, "s": 1062, "text": "To create a 3D plot from a 3D numpy array, we can create a 3D array using numpy and extract the x, y,\nand z points." }, { "code": null, "e": 1252, "s": 1178, "text": "Create a new figure or activate an existing figure using figure()...
Medical Image Pre-Processing with Python | by Esma Sert | Towards Data Science
In this post, I will explain how beautifully medical images can be preprocessed with simple examples to train any artificial intelligence model and how data is prepared for model to give the highest result by going through the all preprocessing stages. The data I am going to use is bunch of 2D Brain CT images. They are...
[ { "code": null, "e": 425, "s": 172, "text": "In this post, I will explain how beautifully medical images can be preprocessed with simple examples to train any artificial intelligence model and how data is prepared for model to give the highest result by going through the all preprocessing stages." ...
JSF - h:selectBooleanCheckbox
The h:selectBooleanCheckbox tag renders an HTML input element of the type "checkbox". <h:selectBooleanCheckbox value = "Remember Me" id = "chkRememberMe" /> <input id = "jsfForm1:chkRememberMe" type = "checkbox" name = "jsfForm1:chkRememberMe" checked = "checked" /> id Identifier for a component binding Referenc...
[ { "code": null, "e": 2038, "s": 1952, "text": "The h:selectBooleanCheckbox tag renders an HTML input element of the type \"checkbox\"." }, { "code": null, "e": 2110, "s": 2038, "text": "<h:selectBooleanCheckbox value = \"Remember Me\" id = \"chkRememberMe\" /> " }, { "cod...
Building a Content Based Recommender System for Hotels in Seattle | by Susan Li | Towards Data Science
The cold start problem is a well known and well researched problem for recommender systems, where system is not able to recommend items to users. due to three different situation i.e. for new users, for new products and for new websites. Content-based filtering is the method that solve this problem. Our system first us...
[ { "code": null, "e": 410, "s": 172, "text": "The cold start problem is a well known and well researched problem for recommender systems, where system is not able to recommend items to users. due to three different situation i.e. for new users, for new products and for new websites." }, { "co...
How to Check Timezone in Linux - GeeksforGeeks
17 Jun, 2021 There are a number of time management utilities available on Linux such as timedatectl, date, etc by which you can view the current timezone in your Linux system. In this article, we will be discussing some ways by which you can check the system timezone in Linux. We can use the timedatectl command to dis...
[ { "code": null, "e": 24406, "s": 24378, "text": "\n17 Jun, 2021" }, { "code": null, "e": 24672, "s": 24406, "text": "There are a number of time management utilities available on Linux such as timedatectl, date, etc by which you can view the current timezone in your Linux system. ...
LISP - Functions
A function is a group of statements that together perform a task. You can divide up your code into separate functions. How you divide up your code among different functions is up to you, but logically the division usually is so each function performs a specific task. The macro named defun is used for defining functions...
[ { "code": null, "e": 2126, "s": 2060, "text": "A function is a group of statements that together perform a task." }, { "code": null, "e": 2328, "s": 2126, "text": "You can divide up your code into separate functions. How you divide up your code among different functions is up to ...
How to match a word in python using Regular Expression?
The following code matches the word ‘meeting’ in the given string. It uses positive look-ahead and look-behind assertions to respect enclosing characters but without including them in the match. import re s = """http://www.google.com/meeting_agenda_minutes.html""" result = re.findall(r'(?<=[\W_])meeting(?=[\W_])', s) p...
[ { "code": null, "e": 1129, "s": 1062, "text": "The following code matches the word ‘meeting’ in the given string." }, { "code": null, "e": 1257, "s": 1129, "text": "It uses positive look-ahead and look-behind assertions to respect enclosing characters but without including them i...
What is InputMisMatchException in Java how do we handle it?
From Java 1.5 Scanner class was introduced. This class accepts a File, InputStream, Path and, String objects, reads all the primitive data types and Strings (from the given source) token by token using regular expressions. To read various datatypes from the source using the nextXXX() methods provided by this class name...
[ { "code": null, "e": 1285, "s": 1062, "text": "From Java 1.5 Scanner class was introduced. This class accepts a File, InputStream, Path and, String objects, reads all the primitive data types and Strings (from the given source) token by token using regular expressions." }, { "code": null, ...
Attention is all you need: Discovering the Transformer paper | by Eduardo Muñoz | Towards Data Science
In this post we will describe and demystify the relevant artifacts in the paper “Attention is all you need” (Vaswani, Ashish & Shazeer, Noam & Parmar, Niki & Uszkoreit, Jakob & Jones, Llion & Gomez, Aidan & Kaiser, Lukasz & Polosukhin, Illia. (2017))[1]. This paper was a great advance in the use of the attention mechan...
[ { "code": null, "e": 706, "s": 171, "text": "In this post we will describe and demystify the relevant artifacts in the paper “Attention is all you need” (Vaswani, Ashish & Shazeer, Noam & Parmar, Niki & Uszkoreit, Jakob & Jones, Llion & Gomez, Aidan & Kaiser, Lukasz & Polosukhin, Illia. (2017))[1]. ...
How to convert an image to a PyTorch Tensor?
A PyTorch tensor is an n-dimensional array (matrix) containing elements of a single data type. A tensor is like a numpy array. The difference between numpy arrays and PyTorch tensors is that the tensors utilize the GPUs to accelerate the numeric computations. For the accelerated computations, the images are converted t...
[ { "code": null, "e": 1397, "s": 1062, "text": "A PyTorch tensor is an n-dimensional array (matrix) containing elements of a single data type. A tensor is like a numpy array. The difference between\nnumpy arrays and PyTorch tensors is that the tensors utilize the GPUs to\naccelerate the numeric compu...
Association Rule - GeeksforGeeks
14 Sep, 2018 Association rule mining finds interesting associations and relationships among large sets of data items. This rule shows how frequently a itemset occurs in a transaction. A typical example is Market Based Analysis. Market Based Analysis is one of the key techniques used by large relations to show associati...
[ { "code": null, "e": 24015, "s": 23987, "text": "\n14 Sep, 2018" }, { "code": null, "e": 24230, "s": 24015, "text": "Association rule mining finds interesting associations and relationships among large sets of data items. This rule shows how frequently a itemset occurs in a trans...
Concatenate date and time from separate columns into a single column in MySQL
For this, concatenate both the date and time using CONCAT() function. Let us first create a table − mysql> create table DemoTable -> ( -> ShippingDate date, -> ShippingTime time, -> ShippingDatetime datetime -> ); Query OK, 0 rows affected (0.50 sec) Insert some records in the table using insert command ...
[ { "code": null, "e": 1162, "s": 1062, "text": "For this, concatenate both the date and time using CONCAT() function. Let us first create a table −" }, { "code": null, "e": 1328, "s": 1162, "text": "mysql> create table DemoTable\n -> (\n -> ShippingDate date,\n -> ShippingTi...
Beating the world record in Tetris (GB) with genetics algorithm | by Duc Anh Bui | Towards Data Science
A couple of weeks ago, I found this awesome Game Boy emulator written in Python with support for AI/bots. I was very excited because now I could use my Machine Learning knowledge to create agents for games that haunted my childhood. In this article, I’ll show how we can use a simple implementation of genetics algorithm...
[ { "code": null, "e": 405, "s": 172, "text": "A couple of weeks ago, I found this awesome Game Boy emulator written in Python with support for AI/bots. I was very excited because now I could use my Machine Learning knowledge to create agents for games that haunted my childhood." }, { "code": ...
T-SQL - ORDER BY Clause
The MS SQL Server ORDER BY clause is used to sort the data in ascending or descending order, based on one or more columns. Some database sort query results in ascending order by default. Following is the basic syntax of ORDER BY clause. SELECT column-list FROM table_name [WHERE condition] [ORDER BY column1, colum...
[ { "code": null, "e": 2247, "s": 2060, "text": "The MS SQL Server ORDER BY clause is used to sort the data in ascending or descending order, based on one or more columns. Some database sort query results in ascending order by default." }, { "code": null, "e": 2297, "s": 2247, "tex...
Machine Learning for Supply Chain Forecasting | by Nicolas Vandeput | Towards Data Science
The article below is an extract from my book Data Science for Supply Chain Forecast, available here. You can find my other publications here. I am also active on LinkedIn. Supply chain practitioners usually use old-school statistics to predict demand. But with the recent rise of machine learning algorithms, we have new...
[ { "code": null, "e": 343, "s": 171, "text": "The article below is an extract from my book Data Science for Supply Chain Forecast, available here. You can find my other publications here. I am also active on LinkedIn." }, { "code": null, "e": 836, "s": 343, "text": "Supply chain p...
How to update the image of a Tkinter Label widget?
We have used Label widget to group all the widgets in the application. A Label widget takes text and images in the constructor that sets the label with the position in the top-left corner of the window. However, to change or update the image associated with the Label, we can use a callable method where we provide the i...
[ { "code": null, "e": 1410, "s": 1062, "text": "We have used Label widget to group all the widgets in the application. A Label widget takes text and images in the constructor that sets the label with the position in the top-left corner of the window. However, to change or update the image associated ...
Java Swing JTabbedPane Example - onlinetutorialspoint
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 tutorial, we are going to create a si...
[ { "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, ...
Python Tkinter – How to position a topLevel() widget relative to the root window?
In Tkinter, the toplevel widget is used to create a popup modal window. The popup window created by the toplevel window works similar to the default window of the tkinter application. It can have widgets such as text widget, button widget, canvas widget, frame, etc. The size and position of the toplevel window can be d...
[ { "code": null, "e": 1329, "s": 1062, "text": "In Tkinter, the toplevel widget is used to create a popup modal window. The popup window created by the toplevel window works similar to the default window of the tkinter application. It can have widgets such as text widget, button widget, canvas widget...
Display MySQL Database, Table, and Column Information
The mysqlshow client can be used to see what databases exist, their tables, or a table's columns or indexes.It provides a command-line interface for several SQL SHOW statements. The mysqlshow utility can be invoked as shown below − shell> mysqlshow [options] [db_name [tbl_name [col_name]]] Here, If no database is provi...
[ { "code": null, "e": 1240, "s": 1062, "text": "The mysqlshow client can be used to see what databases exist, their tables, or a table's columns or indexes.It provides a command-line interface for several SQL SHOW statements." }, { "code": null, "e": 1294, "s": 1240, "text": "The ...
Environment Variables in Linux/Unix - GeeksforGeeks
30 Jul, 2021 Environment variables or ENVs basically define the behavior of the environment. They can affect the processes ongoing or the programs that are executed in the environment. Scope of any variable is the region from which it can be accessed or over which it is defined. An environment variable in Linux can h...
[ { "code": null, "e": 24172, "s": 24144, "text": "\n30 Jul, 2021" }, { "code": null, "e": 24346, "s": 24172, "text": "Environment variables or ENVs basically define the behavior of the environment. They can affect the processes ongoing or the programs that are executed in the envi...
Min number of operations to reduce N to 0 by subtracting any digits from N
02 Sep, 2021 Given a number N, the task is to find the minimum number of operations required to reduce the number N to zero by subtracting the given number by any digit present in it. Examples: Input: N = 4 Output: 1 Explanation: Here 4 is the only digit present hence 4 – 4 = 0 and only one operation is required. Inpu...
[ { "code": null, "e": 54, "s": 26, "text": "\n02 Sep, 2021" }, { "code": null, "e": 225, "s": 54, "text": "Given a number N, the task is to find the minimum number of operations required to reduce the number N to zero by subtracting the given number by any digit present in it." ...
p5.js | value() Function
21 Jun, 2021 The value() function is an inbuilt function which is used to set or return the value of the element.This function requires p5.dom library. So add the following line in the head section of the index.html file. javascript <script language="javascript" type="text/javascript" src="path/to/p5.dom.js"></scr...
[ { "code": null, "e": 28, "s": 0, "text": "\n21 Jun, 2021" }, { "code": null, "e": 239, "s": 28, "text": "The value() function is an inbuilt function which is used to set or return the value of the element.This function requires p5.dom library. So add the following line in the hea...
Kotlin - Quick Guide
Kotlin is a new open source programming language like Java, JavaScript, etc. It is a high level strongly statically typed language that combines functional and technical part in a same place. Currently, Kotlin targets Java and JavaScript. It runs on JVM. Kotlin is influenced by other programming languages such as Java,...
[ { "code": null, "e": 2814, "s": 2559, "text": "Kotlin is a new open source programming language like Java, JavaScript, etc. It is a high level strongly statically typed language that combines functional and technical part in a same place. Currently, Kotlin targets Java and JavaScript. It runs on JVM...
How to Remove Time from Date/Timestamp in Excel?
20 May, 2021 Timestamp stores a combined Date and Time value. In this article, we will look at how we can create Timestamp and remove Time from Date in Excel. To do so follow the steps below: Step 1: Formatting data to create a timestamp. Select the cell, right-click on it choose Format Cells... Step 2: Then in the Fo...
[ { "code": null, "e": 54, "s": 26, "text": "\n20 May, 2021" }, { "code": null, "e": 201, "s": 54, "text": "Timestamp stores a combined Date and Time value. In this article, we will look at how we can create Timestamp and remove Time from Date in Excel. " }, { "code": null,...
Fix Error 1136: Column count doesn't match value count at row 1?
You may get tis value, if you are missing the value for auto_increment column. The error is as follows − mysql> insert into DemoTable1353 values('Chris',23); ERROR 1136 (21S01): Column count doesn't match value count at row 1 You need to provide the value for auto_increment or leave it to automatic generation. Let us s...
[ { "code": null, "e": 1292, "s": 1187, "text": "You may get tis value, if you are missing the value for auto_increment column. The error is as follows −" }, { "code": null, "e": 1413, "s": 1292, "text": "mysql> insert into DemoTable1353 values('Chris',23);\nERROR 1136 (21S01): Col...
strftime() function in C/C++
16 Apr, 2021 strftime() is a function in C which is used to format date and time. It comes under the header file time.h, which also contains a structure named struct tm which is used to hold the time and date. The syntax of strftime() is as shown below : size_t strftime(char *s, size_t max, const char *format, ...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Apr, 2021" }, { "code": null, "e": 296, "s": 52, "text": "strftime() is a function in C which is used to format date and time. It comes under the header file time.h, which also contains a structure named struct tm which is used to h...
Program to convert IP address to hexadecimal
02 Dec, 2021 Given an IP Address and task is to change the IP address equivalent the hexadecimal value.Examples: Input : 127.0.0.1 Output : 0x7f000001 Input : 172.31.0.2 Output : 0xac1f0002 Explanationusing the Library function to convert the IP address to convert into the hexadecimal value we use ” arpa/inet.h “ ...
[ { "code": null, "e": 54, "s": 26, "text": "\n02 Dec, 2021" }, { "code": null, "e": 154, "s": 54, "text": "Given an IP Address and task is to change the IP address equivalent the hexadecimal value.Examples:" }, { "code": null, "e": 236, "s": 154, "text": "Input...
list pop_back() function in C++ STL
13 Jun, 2022 The list::pop_back() is a built-in function in C++ STL which is used to remove an element from the back of a list container. That is, this function deletes the last element of a list container. This function thus decreases the size of the container by 1 as it deletes an element from the end of list. Syntax...
[ { "code": null, "e": 53, "s": 25, "text": "\n13 Jun, 2022" }, { "code": null, "e": 362, "s": 53, "text": "The list::pop_back() is a built-in function in C++ STL which is used to remove an element from the back of a list container. That is, this function deletes the last element o...
Rakuten India Interview Experience | On-Campus 2021 - GeeksforGeeks
23 Feb, 2021 Basic Information about the Process Rakuten India visited our campus for the recruitment process, two times in one placement season. First time in the month of November 2020 and the second time in January 2021. I was part of the process that happened in January. They came for a Technical Intern position w...
[ { "code": null, "e": 25150, "s": 25122, "text": "\n23 Feb, 2021" }, { "code": null, "e": 25186, "s": 25150, "text": "Basic Information about the Process" }, { "code": null, "e": 25499, "s": 25186, "text": "Rakuten India visited our campus for the recruitment p...
Enchanced Tabular Data Visualization (Pandas) | by Elena Kosourova | Towards Data Science
In this article, we’ll discuss some useful options and functions to efficiently visualize dataframes as a set of tabular data in pandas. Let’s start with creating a dataframe for our further experiments: import pandas as pdimport numpy as npdf = pd.DataFrame(np.random.randn(20, 40))# Renaming columnsdf.columns = [x for...
[ { "code": null, "e": 376, "s": 172, "text": "In this article, we’ll discuss some useful options and functions to efficiently visualize dataframes as a set of tabular data in pandas. Let’s start with creating a dataframe for our further experiments:" }, { "code": null, "e": 664, "s": ...
How to add a paragraph in HTML?
Use the HTML <p> tag to add a paragraph in HTML. You can try to run the following code to implement <p> tag in HTML − <!DOCTYPE html> <html> <head> <title>HTML p Tag</title> </head> <body> <p>This is demo text.</p> </body> </html>
[ { "code": null, "e": 1180, "s": 1062, "text": "Use the HTML <p> tag to add a paragraph in HTML. You can try to run the following code to implement <p> tag in HTML −" }, { "code": null, "e": 1317, "s": 1180, "text": "<!DOCTYPE html>\n<html>\n <head>\n <title>HTML p Tag</tit...
What is $(window).load() method in jQuery?
The code which gets included inside $( window ).on( "load", function() { ... }) runs only once the entire page is ready (not only DOM). Note: The load() method deprecated in jQuery version 1.8. It was completely removed in version 3.0. To see its working, add jQuery version for CDN before 3.0. You can try to run the fo...
[ { "code": null, "e": 1198, "s": 1062, "text": "The code which gets included inside $( window ).on( \"load\", function() { ... }) runs only once the entire page is ready (not only DOM)." }, { "code": null, "e": 1357, "s": 1198, "text": "Note: The load() method deprecated in jQuery...
Minimum number of steps to convert a given matrix into Diagonally Dominant Matrix - GeeksforGeeks
31 Mar, 2022 Given a matrix of order NxN, the task is to find the minimum number of steps to convert given matrix into Diagonally Dominant Matrix. In each step, the only operation allowed is to decrease or increase any element by 1.Examples: Input: mat[][] = {{3, 2, 4}, {1, 4, 4}, {2, 3, 4}} Output: 5 Sum of the abso...
[ { "code": null, "e": 24877, "s": 24849, "text": "\n31 Mar, 2022" }, { "code": null, "e": 25108, "s": 24877, "text": "Given a matrix of order NxN, the task is to find the minimum number of steps to convert given matrix into Diagonally Dominant Matrix. In each step, the only operat...
Differences between abstract class and concrete class in Java
In Java, abstraction is achieved using Abstract classes and interfaces. An abstract class contains abstract methods which a child class. Following are the important differences between abstract class and a concrete class. public class JavaTester { public static void main(String args[]) { Cat lion = new Lion();...
[ { "code": null, "e": 1284, "s": 1062, "text": "In Java, abstraction is achieved using Abstract classes and interfaces. An abstract class contains abstract methods which a child class. Following are the important differences between abstract class and a concrete class." }, { "code": null, ...
Tryit Editor v3.7
Tryit: The universal (*) selector
[]
How To Fix pandas.parser.CParserError: Error tokenizing data | Towards Data Science
Importing data from csv files is probably the most commonly used way of instantiating pandas DataFrames. However, many times this could be a little bit tricky especially when the data included in the file are not in the expected form. In these cases, pandas parser may raise an error similar to the one reported below: p...
[ { "code": null, "e": 490, "s": 171, "text": "Importing data from csv files is probably the most commonly used way of instantiating pandas DataFrames. However, many times this could be a little bit tricky especially when the data included in the file are not in the expected form. In these cases, pand...
User Defined Functions in Redshift | by Mandy Gu | Towards Data Science
Amazon Redshift is a cloud data warehouse with its own Redshift SQL dialect (a variant of PostgreSQL). The service has become increasingly popular due to its low cost and compatibility with other Amazon Web Services. My favourite Redshift integration is the ability to unload and copy data to and from S3. In this articl...
[ { "code": null, "e": 478, "s": 172, "text": "Amazon Redshift is a cloud data warehouse with its own Redshift SQL dialect (a variant of PostgreSQL). The service has become increasingly popular due to its low cost and compatibility with other Amazon Web Services. My favourite Redshift integration is t...
Roll Out Animation Effect with CSS
To create a rollout animation effect with CSS, you can try to run the following code − <html> <head> <style> .animated { background-image: url(/css/images/logo.png); background-repeat: no-repeat; background-position: left top; padding-top:95px; ...
[ { "code": null, "e": 1149, "s": 1062, "text": "To create a rollout animation effect with CSS, you can try to run the following code −" }, { "code": null, "e": 2564, "s": 1149, "text": "<html>\n <head>\n <style>\n .animated {\n background-image: url(/css/...
What is morphological gradient in image processing?
Erosion and dilation are the two basic morphological operations. As the name implies, morphological operations are the set of operations that process images according to their shapes. During dilation operation additional pixels are added to an image boundary and, during erosion operation, additional pixels are removed ...
[ { "code": null, "e": 1246, "s": 1062, "text": "Erosion and dilation are the two basic morphological operations. As the name implies, morphological operations are the set of operations that process images\naccording to their shapes." }, { "code": null, "e": 1525, "s": 1246, "text"...
Java break statement with switch
Following is an example Live Demo public class Test { public static void main(String args[]) { // char grade = args[0].charAt(0); char grade = 'C'; switch(grade) { case 'A' : System.out.println("Excellent!"); break; case 'B' : case 'C' : ...
[ { "code": null, "e": 1086, "s": 1062, "text": "Following is an example" }, { "code": null, "e": 1096, "s": 1086, "text": "Live Demo" }, { "code": null, "e": 1730, "s": 1096, "text": "public class Test {\n\n public static void main(String args[]) {\n // ...
How to Change Tkinter Button State? - GeeksforGeeks
17 Dec, 2020 Tkinter is a Python Package for creating GUI applications. Python has a lot of GUI frameworks, but Tkinter is the only framework that’s built into the Python standard library. Tkinter has several strengths; it’s cross-platform, so the same code works on Windows, macOS, and Linux. Tkinter is lightweight and...
[ { "code": null, "e": 24503, "s": 24475, "text": "\n17 Dec, 2020" }, { "code": null, "e": 24868, "s": 24503, "text": "Tkinter is a Python Package for creating GUI applications. Python has a lot of GUI frameworks, but Tkinter is the only framework that’s built into the Python stand...
Count total set bits | Practice | GeeksforGeeks
You are given a number N. Find the total count of set bits for all numbers from 1 to N(both inclusive). Example 1: Input: N = 4 Output: 5 Explanation: For numbers from 1 to 4. For 1: 0 0 1 = 1 set bits For 2: 0 1 0 = 1 set bits For 3: 0 1 1 = 2 set bits For 4: 1 0 0 = 1 set bits Therefore, the total set bits is 5. Ex...
[ { "code": null, "e": 354, "s": 238, "text": "You are given a number N. Find the total count of set bits for all numbers from 1 to N(both inclusive).\n\nExample 1:" }, { "code": null, "e": 556, "s": 354, "text": "Input: N = 4\nOutput: 5\nExplanation:\nFor numbers from 1 to 4.\nFor...
Getting Started with Graph Databases in Azure Cosmos DB | by Will Velida | Towards Data Science
In Azure Cosmos DB, we can build graph databases using the Gremlin API offering. Like many up and coming trends in the data universe, you may hear people talk about Graph databases and roll your eyes thinking ‘here we go’. But there are many situations that we could model using a graph format. The most obvious example ...
[ { "code": null, "e": 394, "s": 171, "text": "In Azure Cosmos DB, we can build graph databases using the Gremlin API offering. Like many up and coming trends in the data universe, you may hear people talk about Graph databases and roll your eyes thinking ‘here we go’." }, { "code": null, ...
Scansets in C - GeeksforGeeks
06 Jul, 2021 scanf family functions support scanset specifiers which are represented by %[]. Inside scanset, we can specify single character or range of characters. While processing scanset, scanf will process only those characters which are part of scanset. We can define scanset by putting characters inside square bra...
[ { "code": null, "e": 24514, "s": 24486, "text": "\n06 Jul, 2021" }, { "code": null, "e": 24878, "s": 24514, "text": "scanf family functions support scanset specifiers which are represented by %[]. Inside scanset, we can specify single character or range of characters. While proce...
Binary Search Tree insert with Parent Pointer in C++
We can insert new node into the BST in recursive manner. In that case we return the address of the root of each subtree. Here we will see another approach, where parent pointer will need to be maintained. Parent pointer will be helpful to find ancestor of a node etc. The idea is to store the address of the left and rig...
[ { "code": null, "e": 1330, "s": 1062, "text": "We can insert new node into the BST in recursive manner. In that case we return the address of the root of each subtree. Here we will see another approach, where parent pointer will need to be maintained. Parent pointer will be helpful to find ancestor ...
How to check if an input is an integer using C/C++?
Here we will see how to check whether a given input is integer string or a normal string. The integer string will hold all characters that are in range 0 – 9. The solution is very simple, we will simply go through each characters one by one, and check whether it is numeric or not. If it is numeric, then point to the ne...
[ { "code": null, "e": 1416, "s": 1062, "text": "Here we will see how to check whether a given input is integer string or a normal string. The integer string will hold all characters that are in range 0 – 9. The solution is very simple, we will simply go through each characters one by one, and check w...
Building a weather app using Openweathermap and Flask | by Sagun Shrestha | Towards Data Science
In this article, we will learn the basics of using a web API. We will use Python and Flask to create a simple backend that calls Openweathermap API and render the result in a web page. If you want to skip the article and access code, head over to the GitHub repo. Goto https://home.openweathermap.org/users/sign_up and s...
[ { "code": null, "e": 357, "s": 172, "text": "In this article, we will learn the basics of using a web API. We will use Python and Flask to create a simple backend that calls Openweathermap API and render the result in a web page." }, { "code": null, "e": 436, "s": 357, "text": "I...
How to connect to my MongoDB table by command line?
In order to connect to my table by command line, you need to use db command db.yourCollectionName.find(); Let’s say we have a database “sample” with some collections. First check the current database > use sample; switched to db sample > db; Sample Now we have reached the database sample. The database “sample” is havin...
[ { "code": null, "e": 1138, "s": 1062, "text": "In order to connect to my table by command line, you need to use db command" }, { "code": null, "e": 1168, "s": 1138, "text": "db.yourCollectionName.find();" }, { "code": null, "e": 1262, "s": 1168, "text": "Let’s...
The Binary Multidimensional Knapsack Problem (MKP) | by Mohammed Agha | Towards Data Science
There are numerous posts addressing the knapsack problem as both an integer programming problem, and as a simple example to explain dynamic programming. Not enough content on the multidimensional knapsack problem though. In this post, I will go through the Multidimensional Knapsack Problem ‘MKP’, point to where we can ...
[ { "code": null, "e": 842, "s": 172, "text": "There are numerous posts addressing the knapsack problem as both an integer programming problem, and as a simple example to explain dynamic programming. Not enough content on the multidimensional knapsack problem though. In this post, I will go through th...
Display MySQL table values using Java
For this, you can use the ResultSet concept. For connection, we will be using the MySQL JDBC Driver. Let us create a table − mysql> create table demo87 -> ( -> name varchar(20), -> age int -> ) -> ; Query OK, 0 rows affected (0.62 Insert some records into the table with the help of insert command − mysql...
[ { "code": null, "e": 1163, "s": 1062, "text": "For this, you can use the ResultSet concept. For connection, we will be using the MySQL JDBC Driver." }, { "code": null, "e": 1187, "s": 1163, "text": "Let us create a table −" }, { "code": null, "e": 1308, "s": 1187,...
Interfacing OLED Display with ESP32
The combination of OLED with ESP32 is so popular that there are some boards of ESP32 with the OLED integrated. We'll, however, assume that you will be using a separate OLED module with your ESP32 board. If you have an OLED module, it perhaps looks like the image below. Like the MPU6050 module that we discussed in a pre...
[ { "code": null, "e": 2453, "s": 2183, "text": "The combination of OLED with ESP32 is so popular that there are some boards of ESP32 with the OLED integrated. We'll, however, assume that you will be using a separate OLED module with your ESP32 board. If you have an OLED module, it perhaps looks like ...
CNN based face detector from dlib | by Arun Ponnusamy | Towards Data Science
If you are into any sort of image processing, computer vision or machine learning, chances are high that you might have come across/used dlib somewhere in your journey. According to dlib’s github page, dlib is a toolkit for making real world machine learning and data analysis applications in C++. While the library is o...
[ { "code": null, "e": 341, "s": 172, "text": "If you are into any sort of image processing, computer vision or machine learning, chances are high that you might have come across/used dlib somewhere in your journey." }, { "code": null, "e": 560, "s": 341, "text": "According to dlib...
Get Random record from MongoDB?
To get a random record from MongoDB, you can use aggregate function. The syntax is as follows: db.yourCollectionName.aggregate([{$sample:{size:1}}]); To understand the above syntax, let us create a collection with some documents. The query to create collection is as follows: >db.employeeInformation.insert({"EmployeeId"...
[ { "code": null, "e": 1157, "s": 1062, "text": "To get a random record from MongoDB, you can use aggregate function. The syntax is as follows:" }, { "code": null, "e": 1212, "s": 1157, "text": "db.yourCollectionName.aggregate([{$sample:{size:1}}]);" }, { "code": null, ...
How to create a simple MySQL function?
You can create a function using create function command. The syntax is as follows − delimiter // DROP FUNCTION if exists yourFunctionName; CREATE FUNCTION yourFunctionName(Parameter1,...N) returns type BEGIN # declaring variables; # MySQL statementns END // delimiter ; First, here we will create a table and add some re...
[ { "code": null, "e": 1146, "s": 1062, "text": "You can create a function using create function command. The syntax is as follows −" }, { "code": null, "e": 1332, "s": 1146, "text": "delimiter //\nDROP FUNCTION if exists yourFunctionName;\nCREATE FUNCTION yourFunctionName(Paramete...