title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
GraphQL - Apollo Client
We have used Apollo Server to build graphql specification on server side. It is quick and easy to build production ready GraphQL server. Now let us understand the client side. Apollo Client is the best way to use GraphQL to build client applications. The client is designed to help developer quickly build a UI that fetc...
[ { "code": null, "e": 2127, "s": 1951, "text": "We have used Apollo Server to build graphql specification on server side. It is quick and easy to build production ready GraphQL server. Now let us understand the client side." }, { "code": null, "e": 2340, "s": 2127, "text": "Apollo...
How can we see the source code of a particular MySQL stored procedure?
With the help of SHOW CREATE PROCEDURE statement, we can see the source code of a stored procedure. To make it understand we are using the stored procedure named allrecords() in the query as follows − mysql> Show Create Procedure allrecords\G *************************** 1. row *************************** Procedure: all...
[ { "code": null, "e": 1263, "s": 1062, "text": "With the help of SHOW CREATE PROCEDURE statement, we can see the source code of a stored procedure. To make it understand we are using the stored procedure named allrecords() in the query as follows −" }, { "code": null, "e": 1786, "s": ...
How to draw text On image in Android using Kotlin?
This example demonstrates how to draw text On image 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"?> <RelativeLa...
[ { "code": null, "e": 1139, "s": 1062, "text": "This example demonstrates how to draw text On image in Android using Kotlin." }, { "code": null, "e": 1267, "s": 1139, "text": "Step 1 − Create a new project in Android Studio, go to File? New Project and fill all required details to...
SQL using Python
In this tutorial, we are going to learn how to use SQL with Python using SQLite database. has a built-in module to connect with SQLite database. We are going to use sqlite3 module to connect Python and SQLite. We have to follow the below steps to connect the SQLite database with Python. Have a look at the steps and wri...
[ { "code": null, "e": 1272, "s": 1062, "text": "In this tutorial, we are going to learn how to use SQL with Python using SQLite database. has a built-in module to connect with SQLite database. We are going to use sqlite3 module to connect Python and SQLite." }, { "code": null, "e": 1398, ...
Java sql.Date valueOf() method with example
The valueOf() method of the java.sql.Date class accepts a String value representing a date in JDBC escape format (yyyy-mm-dd) and converts the given String value into Date object. Date date = Date.valueOf("date_string"); Let us create a table with name dispatches in MySQL database using CREATE statement as follows − CR...
[ { "code": null, "e": 1201, "s": 1062, "text": "The valueOf() method of the java.sql.Date class accepts a String value representing a date in JDBC escape format (yyyy-mm-dd) and converts" }, { "code": null, "e": 1242, "s": 1201, "text": "the given String value into Date object." ...
How to change the color of the Check box in Android?
This example demonstrates how do I change the color of the check box in android. Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project. Step 2 − Add the following code to res/layout/activity_main.xml. <?xml version="1.0" encoding="utf-8"?> <Relat...
[ { "code": null, "e": 1143, "s": 1062, "text": "This example demonstrates how do I change the color of the check box in android." }, { "code": null, "e": 1272, "s": 1143, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required detai...
Clojure - File I/O
Clojure provides a number of helper methods when working with I/O. It offers easier classes to provide the following functionalities for files. Reading files Writing to files Seeing whether a file is a file or directory Let’s explore some of the file operations Clojure has to offer. If you want to get the entire conten...
[ { "code": null, "e": 2518, "s": 2374, "text": "Clojure provides a number of helper methods when working with I/O. It offers easier classes to provide the following functionalities for files." }, { "code": null, "e": 2532, "s": 2518, "text": "Reading files" }, { "code": nu...
Bitwise AND of the Array | Practice | GeeksforGeeks
Given an array A[ ] of N integers and an integer X. In one operation, you can change the ith element of the array to any integer value where 1 ≤ i ≤ N. Calculate minimum number of such operations required such that the bitwise AND of all the elements of the array is strictly greater than X. Example 1: Input: N = 4, X =...
[ { "code": null, "e": 518, "s": 226, "text": "Given an array A[ ] of N integers and an integer X. In one operation, you can change the ith element of the array to any integer value where 1 ≤ i ≤ N. Calculate minimum number of such operations required such that the bitwise AND of all the elements of t...
C++ Permutations of a Given String Using STL
A permutation of a string is formed when the character of the given strings are rearranged in any form. In this tutorial, we are going to discuss how we can print all the permutations of a given string using C++’s Standard Template Library, for example Input : s = “ADT” Output : “ADT”, “ATD”, “DAT”, “DTA”, “TAD”, “TDA...
[ { "code": null, "e": 1315, "s": 1062, "text": "A permutation of a string is formed when the character of the given strings are rearranged in any form. In this tutorial, we are going to discuss how we can print all the permutations of a given string using C++’s Standard Template Library, for example"...
Class method vs static method in Python
The class method in Python is a method, which is bound to the class but not the object of that class. The static methods are also same but there are some basic differences. For class methods, we need to specify @classmethod decorator, and for static method @staticmethod decorator is used. Syntax for Class Method. class...
[ { "code": null, "e": 1352, "s": 1062, "text": "The class method in Python is a method, which is bound to the class but not the object of that class. The static methods are also same but there are some basic differences. For class methods, we need to specify @classmethod decorator, and for static met...
N Digit numbers with digits in increasing order | Practice | GeeksforGeeks
Given an integer N, print all the N digit numbers in increasing order, such that their digits are in strictly increasing order(from left to right). Example 1: Input: N = 1 Output: 0 1 2 3 4 5 6 7 8 9 Explanation: Single digit numbers are considered to be strictly increasing order. Example 2: Input: N = 2 Output: 12 1...
[ { "code": null, "e": 374, "s": 226, "text": "Given an integer N, print all the N digit numbers in increasing order, such that their digits are in strictly increasing order(from left to right)." }, { "code": null, "e": 385, "s": 374, "text": "Example 1:" }, { "code": null,...
How to write files to the assets folder in android using Kotlin?
This example demonstrates how to write files to the assets folder 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": 1153, "s": 1062, "text": "This example demonstrates how to write files to the assets folder in android using Kotlin." }, { "code": null, "e": 1282, "s": 1153, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all requ...
Twitchverse: A network analysis of Twitch universe using Neo4j Graph Data Science | by Tomaz Bratanic | Towards Data Science
Graph data science focuses on analyzing the connections and relationships in data to gain valuable insights. Every day, massive amounts of data are generated, but the connections between data points are often overlooked in data analysis. With the rise of Graph Data Science tools, the ability to analyze connections is n...
[ { "code": null, "e": 1116, "s": 172, "text": "Graph data science focuses on analyzing the connections and relationships in data to gain valuable insights. Every day, massive amounts of data are generated, but the connections between data points are often overlooked in data analysis. With the rise of...
How to convert a .wav file to a spectrogram in Python3?
To convert a .wav file to a spectrogram in python3, we can take the following steps − Load a .wav file from local machine. Load a .wav file from local machine. Compute a spectrogram with consecutive Fourier transforms using spectrogram() method. Compute a spectrogram with consecutive Fourier transforms using spectrogra...
[ { "code": null, "e": 1148, "s": 1062, "text": "To convert a .wav file to a spectrogram in python3, we can take the following steps −" }, { "code": null, "e": 1185, "s": 1148, "text": "Load a .wav file from local machine." }, { "code": null, "e": 1222, "s": 1185, ...
Array To Stream in Java
With Java 8, Arrays class has a stream() methods to generate a Stream using the passed array as its source. The java.util.Arrays.stream() method returns a sequential Stream with the specified array as its source. − Arrays.stream(array) Following is the declaration for java.util.Arrays.stream() method public static <T> ...
[ { "code": null, "e": 1170, "s": 1062, "text": "With Java 8, Arrays class has a stream() methods to generate a Stream using the passed array as its source." }, { "code": null, "e": 1277, "s": 1170, "text": "The java.util.Arrays.stream() method returns a sequential Stream with the ...
Check whether a field is empty or null in MySQL?
NULL and empty string ‘ ’ both aren’t similar in MySQL. To check the field is empty like ‘ ’or is null, you need to use the IS NULL property or something else. You can check all the conditions with CASE statement. The syntax is as follows: SELECT *, CASE WHEN yourColumnName =’ ‘ THEN ‘yourMessage1’ WHEN yourColumnName ...
[ { "code": null, "e": 1302, "s": 1062, "text": "NULL and empty string ‘ ’ both aren’t similar in MySQL. To check the field is empty like ‘ ’or is null, you need to use the IS NULL property or something else. You can check all the conditions with CASE statement. The syntax is as follows:" }, { ...
Converting Emojis to Text. Using Emot to convert emoticons to text... | by Himanshu Sharma | Towards Data Science
Have you ever received an emoji that you don’t know or don’t understand what is it? I know that happens to all of us. There are a lot of emojis out there which we don’t understand, using that data in creating an NLP model can result in discrepancies. What if I tell you that you can change these emojis to text? Yes, you...
[ { "code": null, "e": 423, "s": 172, "text": "Have you ever received an emoji that you don’t know or don’t understand what is it? I know that happens to all of us. There are a lot of emojis out there which we don’t understand, using that data in creating an NLP model can result in discrepancies." }...
Swap Nodes in Pairs in C++
Consider we have a linked list. We have to swap every two adjacent nodes and return its head. The constraint is that we cannot modify the value of the nodes, only the node itself can be changed. So if the list is like [1,2,3,4], then the resultant list will be [2,1,4,3] To solve this, we will follow these steps − if he...
[ { "code": null, "e": 1333, "s": 1062, "text": "Consider we have a linked list. We have to swap every two adjacent nodes and return its head. The constraint is that we cannot modify the value of the nodes, only the node itself can be changed. So if the list is like [1,2,3,4], then the resultant list ...
Significance or Hypothesis Tests with Python | by Luís Roque | Medium | Towards Data Science
In a series of weekly articles, I will cover some important statistics topics with a twist. The goal is to use Python to help us get intuition on complex concepts, empirically test theoretical proofs, or build algorithms from scratch. In this series, you will find articles covering topics such as random variables, samp...
[ { "code": null, "e": 263, "s": 171, "text": "In a series of weekly articles, I will cover some important statistics topics with a twist." }, { "code": null, "e": 563, "s": 263, "text": "The goal is to use Python to help us get intuition on complex concepts, empirically test theor...
Android | Auto Complete TextBox and How to Create it - GeeksforGeeks
23 Jan, 2022 Pre-requisites: Android App Development Fundamentals for Beginners Guide to Install and Set up Android Studio Android | Starting with first app/android project Android | Running your first Android app Android AutoComplete TextViews is used for Completing the words automatically. Whenever the user writes a...
[ { "code": null, "e": 24725, "s": 24697, "text": "\n23 Jan, 2022" }, { "code": null, "e": 24742, "s": 24725, "text": "Pre-requisites: " }, { "code": null, "e": 24793, "s": 24742, "text": "Android App Development Fundamentals for Beginners" }, { "code": ...
10 Configs to Make Your Kafka Producer More Resilient | by Xiaoxu Gao | Towards Data Science
Kafka is well known for its resiliency, fault-tolerance, and high throughput. But its performance doesn’t always meet everyone’s expectations. In some cases, we can improve it by scaling out or scaling up brokers. While in most cases, we have to play the game of configurations. There are really tons of configurations i...
[ { "code": null, "e": 450, "s": 171, "text": "Kafka is well known for its resiliency, fault-tolerance, and high throughput. But its performance doesn’t always meet everyone’s expectations. In some cases, we can improve it by scaling out or scaling up brokers. While in most cases, we have to play the ...
Custom loss function in Tensorflow 2.0 | by Sunny Guha | Towards Data Science
The first hitch I ran into when I was learning to write my own layers in Tensorflow (TF) was how to write a loss function. TF contains almost all the loss functions you’ll ever need but sometimes that is not enough. When implementing deep reinforcement learning or constructing your own models you might need to write yo...
[ { "code": null, "e": 621, "s": 171, "text": "The first hitch I ran into when I was learning to write my own layers in Tensorflow (TF) was how to write a loss function. TF contains almost all the loss functions you’ll ever need but sometimes that is not enough. When implementing deep reinforcement le...
8 AI-driven Creative Apps for You and Your Kids | by Merzmensch | Towards Data Science
It came unexpectedly and changed everything: our life, our work, our daily routines. COVID-19 is disrupting our world in unimaginable ways. Now #SocalDistancing and #HomeOffice are trending topics (even if we have to avoid #SocialDistancing, especially now). Many of you are currently working in the home office. And eve...
[ { "code": null, "e": 430, "s": 171, "text": "It came unexpectedly and changed everything: our life, our work, our daily routines. COVID-19 is disrupting our world in unimaginable ways. Now #SocalDistancing and #HomeOffice are trending topics (even if we have to avoid #SocialDistancing, especially no...
How to merge MySQL results?
To merge, use simple join. Following is the syntax − select aliasName1.yourColumnName1, aliasName1.yourColumnName2, . . .N aliasName2.yourColumnName1 from yourTableName1 aliasName1 . . . N join yourTableName2 aliasName2 on yourCondition; Let us create a table − mysql> create table demo8 −> ( −> id int, −> name varchar(...
[ { "code": null, "e": 1115, "s": 1062, "text": "To merge, use simple join. Following is the syntax −" }, { "code": null, "e": 1300, "s": 1115, "text": "select\naliasName1.yourColumnName1,\naliasName1.yourColumnName2,\n.\n.\n.N\naliasName2.yourColumnName1\nfrom yourTableName1 alias...
Construct Tree from given Inorder and Preorder traversals - GeeksforGeeks
18 Feb, 2022 Let us consider the below traversals:Inorder sequence: D B E A F C Preorder sequence: A B D E C F In a Preorder sequence, the leftmost element is the root of the tree. So we know ‘A’ is the root for given sequences. By searching ‘A’ in the Inorder sequence, we can find out all elements on the left side of ...
[ { "code": null, "e": 37758, "s": 37730, "text": "\n18 Feb, 2022" }, { "code": null, "e": 37856, "s": 37758, "text": "Let us consider the below traversals:Inorder sequence: D B E A F C Preorder sequence: A B D E C F" }, { "code": null, "e": 38174, "s": 37856, "...
Delta lake with Spark: What and Why? | by Jyoti Dhiman | Towards Data Science
Let me start by introducing two problems that I have dealt time and again with my experience with Apache Spark: Data “overwrite” on the same path causing data loss in case of Job Failure.Updates in the data. Data “overwrite” on the same path causing data loss in case of Job Failure. Updates in the data. Sometimes I sol...
[ { "code": null, "e": 284, "s": 172, "text": "Let me start by introducing two problems that I have dealt time and again with my experience with Apache Spark:" }, { "code": null, "e": 380, "s": 284, "text": "Data “overwrite” on the same path causing data loss in case of Job Failure...
Push vs pop in stack class in C#
Stack class represents a last-in, first out collection of object. It is used when you need a last-in, first-out access of items. The following is the property of Stack class − Count − Gets the number of elements in the stack. Count − Gets the number of elements in the stack. Add elements in the stack using the Push ope...
[ { "code": null, "e": 1191, "s": 1062, "text": "Stack class represents a last-in, first out collection of object. It is used when you need a last-in, first-out access of items." }, { "code": null, "e": 1238, "s": 1191, "text": "The following is the property of Stack class −" }, ...
MySQL - CHECKSUM TABLE Statement
In case something wrong happens to the database server like if the server was shutdown unexpectedly or, an error occurred while writing data to the hard disk, etc. These situations could make the database operate incorrectly and in the worst case, it can be crashed. Sometimes specific tables will be crushed. A checksum...
[ { "code": null, "e": 2643, "s": 2333, "text": "In case something wrong happens to the database server like if the server was shutdown unexpectedly or, an error occurred while writing data to the hard disk, etc. These situations could make the database operate incorrectly and in the worst case, it ca...
A Guide to Unicode, UTF-8 and Strings in Python | by Sanket Gupta | Towards Data Science
Strings are one of the most common data types in Python. They are used to deal with text data of any kind. The field of Natural Language Processing is built on top of text and string processing of some kind. It is important to know about how strings work in Python. Strings are usually easy to deal with when they are ma...
[ { "code": null, "e": 680, "s": 171, "text": "Strings are one of the most common data types in Python. They are used to deal with text data of any kind. The field of Natural Language Processing is built on top of text and string processing of some kind. It is important to know about how strings work ...
Exploring Best-Selling Books of the Last Five Years | by Scott Jones | Towards Data Science
Every week, the New York Times (NYT) publishes a list of the top ten highest-selling novels in each of the fiction and non-fiction categories. As an avid reader, I wanted to determine whether these lists might offer suggestions for future reads (i.e. whether they might cater more strongly to a particular sub-genre) and...
[ { "code": null, "e": 667, "s": 171, "text": "Every week, the New York Times (NYT) publishes a list of the top ten highest-selling novels in each of the fiction and non-fiction categories. As an avid reader, I wanted to determine whether these lists might offer suggestions for future reads (i.e. whet...
Contains and Between-And operators in SAS Programming - GeeksforGeeks
23 Jul, 2019 BETWEEN-AND Operator: Between Two NumbersTask 1: Suppose you want to select scores whose values are greater than or equal to 50 and less than or equal to 90.data readin;input name $ Section $ Score;cards;Raj A 80Atul A 77Priya B 45Sandeep A 95Rahul C 84Shreya C 44;run; data readin1;set readin;where Score...
[ { "code": null, "e": 24108, "s": 24080, "text": "\n23 Jul, 2019" }, { "code": null, "e": 25101, "s": 24108, "text": "BETWEEN-AND Operator: Between Two NumbersTask 1: Suppose you want to select scores whose values are greater than or equal to 50 and less than or equal to 90.data r...
What is the FlatList component and how to use it in React Native?
FlatList is a container that can be used to load the list items. It offers header and footer support, multiple column support, comes with vertical/horizontal scrolling, lazy loading etc. Here are some important features of FlatList − Comes with scroll loading Able to adjust the scroll by using ScrolltoIndex support Com...
[ { "code": null, "e": 1249, "s": 1062, "text": "FlatList is a container that can be used to load the list items. It offers header and footer support, multiple column support, comes with vertical/horizontal scrolling, lazy loading etc." }, { "code": null, "e": 1296, "s": 1249, "tex...
Strongly Connected Components (Kosaraju's Algo) | Practice | GeeksforGeeks
Given a Directed Graph with V vertices (Numbered from 0 to V-1) and E edges, Find the number of strongly connected components in the graph. Example 1: Input: Output: 3 Explanation: We can clearly see that there are 3 Strongly Connected Components in the Graph Example 2: Input: Output: 1 Explanation: All of the no...
[ { "code": null, "e": 380, "s": 238, "text": "Given a Directed Graph with V vertices (Numbered from 0 to V-1) and E edges, Find the number of strongly connected components in the graph.\n " }, { "code": null, "e": 391, "s": 380, "text": "Example 1:" }, { "code": null, ...
Find the subset of Array with given LCM - GeeksforGeeks
22 Nov, 2021 Given an array arr[] consisting of N positive integers and a positive integer X, the task is to find the subset of the given array whose Lowest Common Multiple(LCM) is X. If there doesn’t exists any subset then print “-1”. Examples: Input: arr[ ] = {2, 4, 3, 5}, X = 20Output: {4, 5}Explanation:Consider the...
[ { "code": null, "e": 24820, "s": 24792, "text": "\n22 Nov, 2021" }, { "code": null, "e": 25043, "s": 24820, "text": "Given an array arr[] consisting of N positive integers and a positive integer X, the task is to find the subset of the given array whose Lowest Common Multiple(LCM...
Difference Between Local and Global Variable
In this post, we will understand the difference between local and global variables. It is generally declared inside a function. It is generally declared inside a function. If it isn’t initialized, a garbage value is stored inside it. If it isn’t initialized, a garbage value is stored inside it. It is created when the f...
[ { "code": null, "e": 1146, "s": 1062, "text": "In this post, we will understand the difference between local and global variables." }, { "code": null, "e": 1190, "s": 1146, "text": "It is generally declared inside a function." }, { "code": null, "e": 1234, "s": 11...
How to show multiple images in one figure in Matplotlib?
To show multiple images in one figure in matplotlib, we can take the following steps − Create random data using numpy. Create random data using numpy. Add a subplot to the current figure, nrows=1, ncols=4 and at index=1. Add a subplot to the current figure, nrows=1, ncols=4 and at index=1. Display data as an image, i.e...
[ { "code": null, "e": 1149, "s": 1062, "text": "To show multiple images in one figure in matplotlib, we can take the following steps −" }, { "code": null, "e": 1181, "s": 1149, "text": "Create random data using numpy." }, { "code": null, "e": 1213, "s": 1181, "...
Find average of a list in python - GeeksforGeeks
21 Nov, 2018 Prerequisites: sum() function, len() function, round() function, reduce(), lambda, and mean(). Given a list of numbers, the task is to find average of that list. Average is the sum of elements divided by the number of elements. Examples: Input : [4, 5, 1, 2, 9, 7, 10, 8] Output : Average of the list = 5.75...
[ { "code": null, "e": 24200, "s": 24172, "text": "\n21 Nov, 2018" }, { "code": null, "e": 24295, "s": 24200, "text": "Prerequisites: sum() function, len() function, round() function, reduce(), lambda, and mean()." }, { "code": null, "e": 24428, "s": 24295, "tex...
Array getChar() Method in Java - GeeksforGeeks
04 Nov, 2019 The java.lang.reflect.Array.getChar() is an inbuilt method in Java and is used to return the element present at a given index from the specified Array as a char. Syntax Array.getChar(Object []array,int index) Parameters : array : The object array whose index is to be returned. index : The particular index...
[ { "code": null, "e": 24892, "s": 24864, "text": "\n04 Nov, 2019" }, { "code": null, "e": 25054, "s": 24892, "text": "The java.lang.reflect.Array.getChar() is an inbuilt method in Java and is used to return the element present at a given index from the specified Array as a char." ...
pydantic. The library you must know if you juggle... | by Martin Thoma | Towards Data Science
Having complex nested data structures is hard. The traditional approach to store this kind of data in Python is nested dictionaries. Although Python dictionaries are amazing, there are two issues which typically arise: (1) How do I, as a developer, know which kind of data is to be expected in the passed dictionary and ...
[ { "code": null, "e": 519, "s": 171, "text": "Having complex nested data structures is hard. The traditional approach to store this kind of data in Python is nested dictionaries. Although Python dictionaries are amazing, there are two issues which typically arise: (1) How do I, as a developer, know w...
Check if a large number is divisible by 5 or not - GeeksforGeeks
28 Jan, 2022 Given a number, the task is to check if number is divisible by 5. The input number may be large and it may not be possible to store even if we use long long int. Examples: Input : n = 56945255 Output : Yes Input : n = 1234567589333150 Output : Yes Input : n = 3635883959606670431112222 Output : No Sin...
[ { "code": null, "e": 24717, "s": 24689, "text": "\n28 Jan, 2022" }, { "code": null, "e": 24879, "s": 24717, "text": "Given a number, the task is to check if number is divisible by 5. The input number may be large and it may not be possible to store even if we use long long int." ...
MySQL Tryit Editor v1.0
SELECT IFNULL(NULL, 500); ​ Edit the SQL Statement, and click "Run SQL" to see the result. This SQL-Statement is not supported in the WebSQL Database. The example still works, because it uses a modified version of SQL. Your browser does not support WebSQL. Your are now using a light-version of the Try-SQL Edit...
[ { "code": null, "e": 26, "s": 0, "text": "SELECT IFNULL(NULL, 500);" }, { "code": null, "e": 28, "s": 26, "text": "​" }, { "code": null, "e": 100, "s": 37, "text": "Edit the SQL Statement, and click \"Run SQL\" to see the result." }, { "code": null, ...
Difference between strlen() and sizeof() for string in C - GeeksforGeeks
08 Aug, 2019 sizeof() Sizeof operator is a compile time unary operator which can be used to compute the size of its operand. The result of sizeof is of unsigned integral type which is usually denoted by size_t. sizeof can be applied to any data-type, including primitive types such as integer and floating-point types, p...
[ { "code": null, "e": 24412, "s": 24384, "text": "\n08 Aug, 2019" }, { "code": null, "e": 24421, "s": 24412, "text": "sizeof()" }, { "code": null, "e": 24524, "s": 24421, "text": "Sizeof operator is a compile time unary operator which can be used to compute the...
How do I list all the columns in a MySQL table?
To list all columns in a table, we can use the SHOW command. Let us first create a table. mysql> create table ColumnsList -> ( -> id int, -> Firstname varchar(200), -> LastName varchar(100), -> Age int, -> Address varchar(300), -> CollegeName varchar(100) -> ); Query OK, 0 rows affected (1.33 se...
[ { "code": null, "e": 1152, "s": 1062, "text": "To list all columns in a table, we can use the SHOW command. Let us first create a table." }, { "code": null, "e": 1385, "s": 1152, "text": "mysql> create table ColumnsList\n -> (\n -> id int,\n -> Firstname varchar(200),\n -...
Decimal.Round() Method in C#
The Decimal.Round() method in C# is used to round a value to the nearest integer or specified number of decimal places. Following is the syntax − public static decimal Round (decimal d); public static decimal Round (decimal d, int decimals); public static decimal Round (decimal d, MidpointRounding mode); public static ...
[ { "code": null, "e": 1182, "s": 1062, "text": "The Decimal.Round() method in C# is used to round a value to the nearest integer or specified number of decimal places." }, { "code": null, "e": 1208, "s": 1182, "text": "Following is the syntax −" }, { "code": null, "e":...
Hyperparameter tuning for Machine learning models | by Jaswanth Badvelu | Towards Data Science
This article covers the comparison and implementation of random search, grid search, and Bayesian optimization methods using Sci-kit learn and HyperOpt libraries for hyperparameter tuning of the machine learning model. Hyperparameters tuning is crucial as they control the overall behavior of a machine learning model. E...
[ { "code": null, "e": 574, "s": 172, "text": "This article covers the comparison and implementation of random search, grid search, and Bayesian optimization methods using Sci-kit learn and HyperOpt libraries for hyperparameter tuning of the machine learning model. Hyperparameters tuning is crucial as...
HTML | Responsive Modal Login Form - GeeksforGeeks
29 Jul, 2021 Responsive Login Form Follow the steps to create a responsive Login form using CSS. Step 1 : Adding HTMLAdd an image inside a container and add inputs with matching labels for each field. Wrap a “form” element around them to process the input. Step 2 : Adding CSSAdd the required CSS to design the login pag...
[ { "code": null, "e": 24814, "s": 24786, "text": "\n29 Jul, 2021" }, { "code": null, "e": 24836, "s": 24814, "text": "Responsive Login Form" }, { "code": null, "e": 24898, "s": 24836, "text": "Follow the steps to create a responsive Login form using CSS." }, ...
SQL Tryit Editor v1.6
SELECT Orders.OrderID, Customers.CustomerName FROM Orders INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID; ​ Edit the SQL Statement, and click "Run SQL" to see the result. This SQL-Statement is not supported in the WebSQL Database. The example still works, because it uses a modified version of SQL. You...
[ { "code": null, "e": 46, "s": 0, "text": "SELECT Orders.OrderID, Customers.CustomerName" }, { "code": null, "e": 58, "s": 46, "text": "FROM Orders" }, { "code": null, "e": 124, "s": 58, "text": "INNER JOIN Customers ON Orders.CustomerID = Customers.CustomerID;...
Content Placeholder Animation using Shimmer in Android with RecyclerView - GeeksforGeeks
24 Feb, 2021 We have seen the implementation of Content Placeholder Animation using Shimmer in Android for a simple view. In this article, we will take a look at implementing Content Placeholder Animation using Shimmer in Android with RecyclerView. We will be building a simple application in which we will be simply di...
[ { "code": null, "e": 25142, "s": 25114, "text": "\n24 Feb, 2021" }, { "code": null, "e": 25379, "s": 25142, "text": "We have seen the implementation of Content Placeholder Animation using Shimmer in Android for a simple view. In this article, we will take a look at implementing C...
Explain interface in PHP.
In this article, we will figure out how to utilize the PHP interface that is one of the most significant structure patterns in PHP object-oriented programming. An Interface enables us to make programs, indicating the public methods that a class must execute, without including the complexities and procedure of how the s...
[ { "code": null, "e": 1222, "s": 1062, "text": "In this article, we will figure out how to utilize the PHP interface that is one of the most significant structure patterns in PHP object-oriented programming." }, { "code": null, "e": 1613, "s": 1222, "text": "An Interface enables u...
What is the type conversion operator ( ) in Java and how to use it?
Cast operator in java is used to convert one data type to other. public class Sample { public static void main(String args[]) { double d = 20.3; int i = (int)d; System.out.println(i); } } 20
[ { "code": null, "e": 1127, "s": 1062, "text": "Cast operator in java is used to convert one data type to other." }, { "code": null, "e": 1274, "s": 1127, "text": "public class Sample {\n public static void main(String args[]) {\n double d = 20.3;\n int i = (int)d;\n ...
CSS Icons - GeeksforGeeks
16 Dec, 2021 In this article, we will know how to use the CSS icons to add to the HTML page from the icon library. All the icons in the library can be formatted using CSS. They can be customized according to size, color, shadow, etc. The icon is a graphical representation that conveys the specific meaning for which it ...
[ { "code": null, "e": 28070, "s": 28042, "text": "\n16 Dec, 2021" }, { "code": null, "e": 28422, "s": 28070, "text": "In this article, we will know how to use the CSS icons to add to the HTML page from the icon library. All the icons in the library can be formatted using CSS. They...
getParameter() - Passing data from client to JSP - GeeksforGeeks
10 Jun, 2018 The familiarity of the getParameter() method in getting data, especially form data, from a client HTML page to a JSP page is dealt with here. The request.getParameter() is being used here to retrieve form data from client side. Steps to be followed1) First, a html page exGetParameter.html accepts data from...
[ { "code": null, "e": 24131, "s": 24103, "text": "\n10 Jun, 2018" }, { "code": null, "e": 24359, "s": 24131, "text": "The familiarity of the getParameter() method in getting data, especially form data, from a client HTML page to a JSP page is dealt with here. The request.getParame...
Integrating image and tabular data for deep learning | by Yuan Tian | Towards Data Science
I recently participated in the SIIM-ISIC Melanoma Classification competition on Kaggle. In this competition, participants are asked to identify melanoma in images of skin lesions. Interestingly, they also provide metadata about the patient and the anatomic site in addition to the image. In essence, we have both image a...
[ { "code": null, "e": 1176, "s": 172, "text": "I recently participated in the SIIM-ISIC Melanoma Classification competition on Kaggle. In this competition, participants are asked to identify melanoma in images of skin lesions. Interestingly, they also provide metadata about the patient and the anatom...
iText - Setting Position of the Image
In this chapter, we will see how to set the position of an image in a PDF document using the iText library. You can create an empty PDF Document by instantiating the Document class. While instantiating this class, you need to pass a PdfDocument object as a parameter to its constructor. To add an image to the pdf, creat...
[ { "code": null, "e": 2476, "s": 2368, "text": "In this chapter, we will see how to set the position of an image in a PDF document using the iText library." }, { "code": null, "e": 2655, "s": 2476, "text": "You can create an empty PDF Document by instantiating the Document class. ...
How to sort an array of objects containing null elements in java?
Whenever we try to sort elements with null values using the sort method it throws an exception. The sort() method of the Arrays class also accepts a Comparator along with the array. Using comparator, you need to specify the order in which the elements need to be sorted. Using this method push all the null elements to l...
[ { "code": null, "e": 1158, "s": 1062, "text": "Whenever we try to sort elements with null values using the sort method it throws an exception." }, { "code": null, "e": 1333, "s": 1158, "text": "The sort() method of the Arrays class also accepts a Comparator along with the array. ...
Apply and Lambda usage in pandas. Learn these to master Pandas | by Rahul Agarwal | Towards Data Science
Pandas is a wonderful tool to have at your disposal. I have been working with Pandas for years and it never ceases to amaze me with its new functionalities, shortcuts and multiple ways of doing a particular thing. But I have realized that sticking to some of the conventions I have learned has served me well over the ye...
[ { "code": null, "e": 224, "s": 171, "text": "Pandas is a wonderful tool to have at your disposal." }, { "code": null, "e": 385, "s": 224, "text": "I have been working with Pandas for years and it never ceases to amaze me with its new functionalities, shortcuts and multiple ways o...
How to get rid of grid lines when plotting with Seaborn + Pandas with secondary_y?
To get rid of grid lines when plotting with Pandas with secondary_y, we can take the following steps − Create a data frame using DataFrame wth keys column1 and column2. Create a data frame using DataFrame wth keys column1 and column2. Use data frame data to plot the data frame. To get rid of gridlines, use grid=False. ...
[ { "code": null, "e": 1165, "s": 1062, "text": "To get rid of grid lines when plotting with Pandas with secondary_y, we can take the following steps −" }, { "code": null, "e": 1231, "s": 1165, "text": "Create a data frame using DataFrame wth keys column1 and column2." }, { ...
Hanning in Numpy | Python - GeeksforGeeks
22 Jul, 2021 The Hanning window is a taper formed by using a weighted cosine. Syntax: numpy.hamming(M) Parameters: M : Number of points in the output window. Returns: AN array The window, with the maximum value normalized to one (the value one appears only if M is odd). Code #1: import numpy as np print(np.han...
[ { "code": null, "e": 23681, "s": 23653, "text": "\n22 Jul, 2021" }, { "code": null, "e": 23746, "s": 23681, "text": "The Hanning window is a taper formed by using a weighted cosine." }, { "code": null, "e": 23850, "s": 23746, "text": "Syntax: numpy.hamming(M)...
Google Colab - Installing ML Libraries
Colab supports most of machine learning libraries available in the market. In this chapter, let us take a quick overview of how to install these libraries in your Colab notebook. To install a library, you can use either of these options − !pip install or !apt-get install Keras, written in Python, runs on top of Tenso...
[ { "code": null, "e": 2220, "s": 2041, "text": "Colab supports most of machine learning libraries available in the market. In this chapter, let us take a quick overview of how to install these libraries in your Colab notebook." }, { "code": null, "e": 2280, "s": 2220, "text": "To ...
sysklogd - Unix, Linux Command
System logging is provided by a version of syslogd(8) derived from the stock BSD sources. Support for kernel logging is provided by the klogd(8) utility which allows kernel logging to be conducted in either a standalone fashion or as a client of syslogd. Syslogd provides a kind of logging that many modern programs u...
[ { "code": null, "e": 10837, "s": 10579, "text": "\nSystem logging is provided by a version of\nsyslogd(8)\nderived from the\nstock BSD sources. Support for kernel logging is provided by the\nklogd(8)\nutility which allows kernel logging to be conducted in either a\nstandalone fashion or as a client...
Find the integral roots of a given Cubic equation - GeeksforGeeks
22 Apr, 2021 Given 5 integers say A, B, C, D, and E which represents the cubic equation , the task is to find the integral solution for this equation. If there doesn’t exist any integral solution then print “NA”.Examples: Input: A = 1, B = 0, C = 0, D = 0, E = 27 Output: 3Input: A = 1, B = 0, C = 0, D = 0, E = 16 Out...
[ { "code": null, "e": 25269, "s": 25241, "text": "\n22 Apr, 2021" }, { "code": null, "e": 25480, "s": 25269, "text": "Given 5 integers say A, B, C, D, and E which represents the cubic equation , the task is to find the integral solution for this equation. If there doesn’t exist an...
Can we compare numbers in a MySQL varchar field?
Yes, we can do this by first using CAST(). Let us first create a table − mysql> create table DemoTable -> ( -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY, -> StudentScore varchar(100) -> ); Query OK, 0 rows affected (0.66 sec) Insert some records in the table using insert command − mysql> insert into...
[ { "code": null, "e": 1135, "s": 1062, "text": "Yes, we can do this by first using CAST(). Let us first create a table −" }, { "code": null, "e": 1308, "s": 1135, "text": "mysql> create table DemoTable\n -> (\n -> StudentId int NOT NULL AUTO_INCREMENT PRIMARY KEY,\n -> Stude...
PostgreSQL - Bitwise Operators
Here are simple examples showing the usage of PostgreSQL Bitwise Operators. Assume variable A holds 60 and variable B holds 13 then − testdb=# select 60 | 13; ?column? ---------- 61 (1 row) testdb=# select 60 & 13; ?column? ---------- 12 (1 row) testdb=# select (~60); ?column? ---------- -6...
[ { "code": null, "e": 2901, "s": 2825, "text": "Here are simple examples showing the usage of PostgreSQL Bitwise Operators." }, { "code": null, "e": 2959, "s": 2901, "text": "Assume variable A holds 60 and variable B holds 13 then −" }, { "code": null, "e": 3360, "...
CopyOnWriteArraySet in Java - GeeksforGeeks
24 Jan, 2022 CopyOnWriteArraySet is a member of the Java Collections Framework. It is a Set that uses an internal CopyOnWriteArrayList for all of its operations. It was introduced in JDK 1.5, we can say that it is a thread-safe version of Set. To use this class, we need to import it from java.util.concurrent package. ...
[ { "code": null, "e": 23804, "s": 23776, "text": "\n24 Jan, 2022" }, { "code": null, "e": 24111, "s": 23804, "text": "CopyOnWriteArraySet is a member of the Java Collections Framework. It is a Set that uses an internal CopyOnWriteArrayList for all of its operations. It was introdu...
KnockoutJS - removeAll() Method
The KnockoutJS Observable removeAll() method removes all items and returns them as an array. arrayName.removeAll() Does not accept any parameter. <!DOCTYPE html> <head> <title>KnockoutJS ObservableArray removeAll method</title> <script src = "https://ajax.aspnetcdn.com/ajax/knockout/knockout-3.1.0.js" ...
[ { "code": null, "e": 1945, "s": 1852, "text": "The KnockoutJS Observable removeAll() method removes all items and returns them as an array." }, { "code": null, "e": 1968, "s": 1945, "text": "arrayName.removeAll()\n" }, { "code": null, "e": 1999, "s": 1968, "te...
C Program for Extended Euclidean algorithms - GeeksforGeeks
05 Dec, 2018 GCD of two numbers is the largest number that divides both of them. A simple way to find GCD is to factorize both numbers and multiply common factors. // C program to demonstrate working of extended// Euclidean Algorithm#include <stdio.h> // C function for extended Euclidean Algorithmint gcdExtended(int a...
[ { "code": null, "e": 24930, "s": 24902, "text": "\n05 Dec, 2018" }, { "code": null, "e": 25081, "s": 24930, "text": "GCD of two numbers is the largest number that divides both of them. A simple way to find GCD is to factorize both numbers and multiply common factors." }, { ...
How to check whether a key exist in JavaScript object or not?
There are a couple of ways to find whether a key exist in javascript object or not. Let's say we have an 'employee' object as shown below. var employee = { name: "Ranjan", age: 25 } Now we need to check whether 'name' property exist in employee object or not. We can use 'in' operator on object to chec...
[ { "code": null, "e": 1146, "s": 1062, "text": "There are a couple of ways to find whether a key exist in javascript object or not." }, { "code": null, "e": 1201, "s": 1146, "text": "Let's say we have an 'employee' object as shown below." }, { "code": null, "e": 1262, ...
Data Visualization Tutorial Using Seaborn | by Pavan Kumar Boinapalli | Towards Data Science
“Seaborn makes the exploratory data analysis phase of your data science project beautiful and painless” This tutorial is targeted at the audience who have worked with Seaborn, but had lost the touch of it. I hope that, by reading this article, you can recollect Seaborn visualization style and commands to get started wi...
[ { "code": null, "e": 275, "s": 171, "text": "“Seaborn makes the exploratory data analysis phase of your data science project beautiful and painless”" }, { "code": null, "e": 699, "s": 275, "text": "This tutorial is targeted at the audience who have worked with Seaborn, but had lo...
How to create a new image from a JPEG file using the imagecreatefromjpeg() function in PHP?
imagecreatefromjpeg() is an inbuilt function in PHP that is used to create a new image from a JPEG file. It returns an image identifier representing the image obtained from the given filename. resource imagecreatefromjpeg(string $filename) imagecreatefromjpeg() uses only one parameter, $filename, that holds the name of...
[ { "code": null, "e": 1255, "s": 1062, "text": "imagecreatefromjpeg() is an inbuilt function in PHP that is used to create a new image from a JPEG file. It returns an image identifier representing the image obtained from the given filename." }, { "code": null, "e": 1302, "s": 1255, ...
Python | Linear search on list or tuples
08 Jun, 2022 Let us see a basic linear search operation on Python lists and tuples. A simple approach is to do a linear search, that is Start from the leftmost element of the list and one by one compare x with each element of the list. If x matches with an element, return True. If x doesn’t match with any of the eleme...
[ { "code": null, "e": 28, "s": 0, "text": "\n08 Jun, 2022" }, { "code": null, "e": 152, "s": 28, "text": "Let us see a basic linear search operation on Python lists and tuples. A simple approach is to do a linear search, that is " }, { "code": null, "e": 252, "s": ...
Length of the Longest Consecutive 1s in Binary Representation
10 Jun, 2022 Given a number n, find length of the longest consecutive 1s in its binary representation.Examples : Input : n = 14 Output : 3 The binary representation of 14 is 1110. Input : n = 222 Output : 4 The binary representation of 222 is 11011110. Naive Approach: One simple way would be to simply loop over the b...
[ { "code": null, "e": 54, "s": 26, "text": "\n10 Jun, 2022" }, { "code": null, "e": 155, "s": 54, "text": "Given a number n, find length of the longest consecutive 1s in its binary representation.Examples : " }, { "code": null, "e": 296, "s": 155, "text": "Inpu...
PHP | addslashes() Function
03 Apr, 2018 The addslashes() function is an inbuilt function in PHP and it returns a string with backslashes in front of predefined characters. It does not take any specified characters in the parameter. The predefined characters are: single quote (‘)double quote (“)backslash (\)NULL single quote (‘) double quote (“) ...
[ { "code": null, "e": 28, "s": 0, "text": "\n03 Apr, 2018" }, { "code": null, "e": 220, "s": 28, "text": "The addslashes() function is an inbuilt function in PHP and it returns a string with backslashes in front of predefined characters. It does not take any specified characters i...
Local Inner Class in Java
07 Dec, 2021 Prerequisites: Nested Classes in Java Local Inner Classes are the inner classes that are defined inside a block. Generally, this block is a method body. Sometimes this block can be a for loop or an if clause. Local Inner classes are not a member of any enclosing classes. They belong to the block they are ...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Dec, 2021" }, { "code": null, "e": 93, "s": 54, "text": "Prerequisites: Nested Classes in Java " }, { "code": null, "e": 652, "s": 93, "text": "Local Inner Classes are the inner classes that are defined inside a ...
Linux – Monitoring Network Traffic With nethogs
19 Feb, 2021 NetHogs is similar to Linux top command which is an open-source command-line program, that is used for monitoring network traffic in Linux. But do you ever wanted to notice which application in your system is eating up your bandwidth, Then Nethogs is one of the good choices. Nethogs will help you find out ...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Feb, 2021" }, { "code": null, "e": 611, "s": 54, "text": "NetHogs is similar to Linux top command which is an open-source command-line program, that is used for monitoring network traffic in Linux. But do you ever wanted to notice w...
How to Remove Prefix From Field in SQL Server?
28 Nov, 2021 In SQL, certain words are reserved. These are called Keywords or Reserved Words. These words cannot be used as identifiers i.e. as column names in SQL. But, there is an exception to this rule too. In this article, we will discuss how to use Reserved Words as column names in SQL and how to remove prefixes f...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Nov, 2021" }, { "code": null, "e": 425, "s": 28, "text": "In SQL, certain words are reserved. These are called Keywords or Reserved Words. These words cannot be used as identifiers i.e. as column names in SQL. But, there is an except...
Difference between Inner Join and Outer Join in SQL
24 Dec, 2021 1. Inner Join : It is a type of join operation in SQL. Inner join is an operation that returns combined tuples between two or more tables where at least one attribute is in common. If there is no attribute in common between tables then it will return nothing. Syntax: select * from table1 INNER JOIN table...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Dec, 2021" }, { "code": null, "e": 297, "s": 28, "text": "1. Inner Join : It is a type of join operation in SQL. Inner join is an operation that returns combined tuples between two or more tables where at least one attribute is in co...
SQL Query to Print Name of Distinct Employee Whose DOB is Between a Given Range
19 Apr, 2021 Query in SQL is like a statement that performs a task. Here, we need to write a query that will print the name of the distinct employee whose DOB is in the given range. We will first create a database named “geeks” then we will create a table “department” in that database. Use the below SQL statement to cr...
[ { "code": null, "e": 28, "s": 0, "text": "\n19 Apr, 2021" }, { "code": null, "e": 197, "s": 28, "text": "Query in SQL is like a statement that performs a task. Here, we need to write a query that will print the name of the distinct employee whose DOB is in the given range." }, ...
PHP | Defining Constants
11 Aug, 2021 In a production level code it is very important to keep information as either variables or constants rather than using them explicitly. A PHP constant is nothing but an identifier for a simple value that tends not to change over time(such as the domain name of a website eg. www.geeksforgeeks.org). It is id...
[ { "code": null, "e": 53, "s": 25, "text": "\n11 Aug, 2021" }, { "code": null, "e": 714, "s": 53, "text": "In a production level code it is very important to keep information as either variables or constants rather than using them explicitly. A PHP constant is nothing but an ident...
Draw a rectangular shape and extract objects using Python’s OpenCV
15 Oct, 2020 OpenCV is an open-source computer vision and machine learning software library. Various image processing operations such as manipulating images and applying tons of filters can be done with the help of it. It is broadly used in Object detection, Face Detection, and other Image processing tasks. Let’s see h...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 Oct, 2020" }, { "code": null, "e": 348, "s": 52, "text": "OpenCV is an open-source computer vision and machine learning software library. Various image processing operations such as manipulating images and applying tons of filters c...
Python | Get random dictionary pair
30 Jun, 2021 Sometimes, while working with dictionaries, we can have a situation in which we need to find a random pair from the dictionary. This type of problem can come in games such as lotteries etc. Let’s discuss certain ways in which this task can be performed. Method #1 : Using random.choice() + list() + items(...
[ { "code": null, "e": 28, "s": 0, "text": "\n30 Jun, 2021" }, { "code": null, "e": 284, "s": 28, "text": "Sometimes, while working with dictionaries, we can have a situation in which we need to find a random pair from the dictionary. This type of problem can come in games such as ...
Count swaps required to sort an array using Insertion Sort
04 May, 2021 Given an array A[] of size N (1 ≤ N ≤ 105), the task is to calculate the number of swaps required to sort the array using insertion sort algorithm. Examples: Input: A[] = {2, 1, 3, 1, 2} Output: 4 Explanation: Step 1: arr[0] stays in its initial position. Step 2: arr[1] shifts 1 place to the left. Count = ...
[ { "code": null, "e": 54, "s": 26, "text": "\n04 May, 2021" }, { "code": null, "e": 202, "s": 54, "text": "Given an array A[] of size N (1 ≤ N ≤ 105), the task is to calculate the number of swaps required to sort the array using insertion sort algorithm." }, { "code": null...
Java - String split() Method
This method has two variants and splits this string around matches of the given regular expression. Here is the syntax of this method − public String[] split(String regex) Here is the detail of parameters − regex − the delimiting regular expression. regex − the delimiting regular expression. It returns the array of st...
[ { "code": null, "e": 2611, "s": 2511, "text": "This method has two variants and splits this string around matches of the given regular expression." }, { "code": null, "e": 2647, "s": 2611, "text": "Here is the syntax of this method −" }, { "code": null, "e": 2684, ...
Working with Tables – Python .docx Module
03 Jan, 2021 Prerequisites: docx Word documents contain formatted text wrapped within three object levels. Lowest level- run objects, middle level- paragraph objects and highest level- document object. So, we cannot work with these documents using normal text editors. But, we can manipulate these word documents in pyth...
[ { "code": null, "e": 53, "s": 25, "text": "\n03 Jan, 2021" }, { "code": null, "e": 73, "s": 53, "text": "Prerequisites: docx" }, { "code": null, "e": 394, "s": 73, "text": "Word documents contain formatted text wrapped within three object levels. Lowest level-...
How to create a Blog app using ReactJS ?
31 Oct, 2021 Introduction: React js is an open-source JavaScript library used for building the Awesome User Interface for the website’s front end. React JS is also famous for Declarative,component-based, and Learn Once, Write Anywhere in code. Approach: In this article, we have created the blog app using react js, Fir...
[ { "code": null, "e": 53, "s": 25, "text": "\n31 Oct, 2021" }, { "code": null, "e": 285, "s": 53, "text": "Introduction: React js is an open-source JavaScript library used for building the Awesome User Interface for the website’s front end. React JS is also famous for Declarative...
How to make PDF file downloadable in HTML link using PHP ?
01 Aug, 2021 To Download PDF from HTML link using PHP with the help of header() function in php. The header()function is used to send a raw HTTP header. Sometimes it wants the user to be prompted to save the data such as generated PDF. Syntax: http response headers to download any applicationheader("Content-Type: appli...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Aug, 2021" }, { "code": null, "e": 251, "s": 28, "text": "To Download PDF from HTML link using PHP with the help of header() function in php. The header()function is used to send a raw HTTP header. Sometimes it wants the user to be p...
StringTokenizer countTokens() Method in Java with Examples
28 Jan, 2019 The countTokens() method of StringTokenizer class calculate the number of times that this tokenizer’s nextToken method can be called before the method generates any further exception.Note: The current position is not advanced during the process. Syntax: public int countTokens() Parameters: The method does ...
[ { "code": null, "e": 28, "s": 0, "text": "\n28 Jan, 2019" }, { "code": null, "e": 274, "s": 28, "text": "The countTokens() method of StringTokenizer class calculate the number of times that this tokenizer’s nextToken method can be called before the method generates any further ex...
Python MySQL – BETWEEN and IN Operator
29 Jul, 2021 In this article, we are going to see the database operations BETWEEN and IN operators in MySQL using Python. Both of these operators are used with the WHERE query to check if an expression is within a range or in a list of values in SQL. We are going to use the below table to perform various operations: Th...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jul, 2021" }, { "code": null, "e": 137, "s": 28, "text": "In this article, we are going to see the database operations BETWEEN and IN operators in MySQL using Python." }, { "code": null, "e": 333, "s": 137, "text"...
Minimum distance to visit all the nodes of an undirected weighted tree
30 Nov, 2021 Given a weighted tree with N nodes starting from 1 to N. The distance between any two nodes is given by the edge weight. Node 1 is the source, the task is to visit all the nodes of the tree with the minimum distance traveled. Examples: Input: u[] = {1, 1, 2, 2, 1} v[] = {2, 3, 5, 6, 4} w[] = {1, 4, 2, 5...
[ { "code": null, "e": 52, "s": 24, "text": "\n30 Nov, 2021" }, { "code": null, "e": 279, "s": 52, "text": "Given a weighted tree with N nodes starting from 1 to N. The distance between any two nodes is given by the edge weight. Node 1 is the source, the task is to visit all the no...
Taking input in Python
22 Jun, 2022 Developers often have a need to interact with users, either to get data or to provide some sort of result. Most programs today use a dialog box as a way of asking the user to provide some type of input. While Python provides us with two inbuilt functions to read the input from the keyboard. input ( promp...
[ { "code": null, "e": 52, "s": 24, "text": "\n22 Jun, 2022" }, { "code": null, "e": 346, "s": 52, "text": "Developers often have a need to interact with users, either to get data or to provide some sort of result. Most programs today use a dialog box as a way of asking the user to...
Jolly Jumper Sequence
04 Jul, 2022 A sequence of n numbers (n < 3000) is called Jolly Jumper if the absolute values of the differences between the successive elements take on all possible values from 1 through n-1. The definition implies that any sequence of a single integer is a jolly jumper. Examples: Input: 1 4 2 3 Output: True This seq...
[ { "code": null, "e": 52, "s": 24, "text": "\n04 Jul, 2022" }, { "code": null, "e": 312, "s": 52, "text": "A sequence of n numbers (n < 3000) is called Jolly Jumper if the absolute values of the differences between the successive elements take on all possible values from 1 through...
How to Delete Duplicate Records in Oracle Database?
14 Sep, 2021 To delete the duplicate records we need to first find all the distinct records. In duplicate records, every data is the same except row_id because row_id is the physical address that the record occupies. So we find the distinct row id where data are distinct in each column and then delete all the rows with...
[ { "code": null, "e": 28, "s": 0, "text": "\n14 Sep, 2021" }, { "code": null, "e": 376, "s": 28, "text": "To delete the duplicate records we need to first find all the distinct records. In duplicate records, every data is the same except row_id because row_id is the physical addre...
Python | Check whether a string is valid json or not
15 Mar, 2019 Given a string, the task is to check whether a string is valid json object or not. Let’s try to understand the problem using different examples. Code #1 : # Python code to demonstrate# checking whether string# is valid json or not import json ini_string = "{'akshat' : 1, 'nikhil' : 2}" # printing initia...
[ { "code": null, "e": 52, "s": 24, "text": "\n15 Mar, 2019" }, { "code": null, "e": 197, "s": 52, "text": "Given a string, the task is to check whether a string is valid json object or not. Let’s try to understand the problem using different examples." }, { "code": null, ...
Lexicographically largest string possible consisting of at most K consecutive similar characters
02 Jun, 2021 Given a string S and an integer K, the task is to generate lexicographically the largest string possible from the given string, by removing characters also, that consists of at most K consecutive similar characters. Examples: Input: S = “baccc”, K = 2Output: ccbca Input: S = “ccbbb”, K = 2Output: ccbb Appr...
[ { "code": null, "e": 54, "s": 26, "text": "\n02 Jun, 2021" }, { "code": null, "e": 270, "s": 54, "text": "Given a string S and an integer K, the task is to generate lexicographically the largest string possible from the given string, by removing characters also, that consists of ...
IntStream filter() in Java with examples
06 Dec, 2018 IntStream filter(IntPredicate predicate) returns a stream consisting of the elements of this stream that match the given predicate. This is an intermediate operation. These operations are always lazy i.e, executing an intermediate operation such as filter() does not actually perform any filtering, but inst...
[ { "code": null, "e": 28, "s": 0, "text": "\n06 Dec, 2018" }, { "code": null, "e": 458, "s": 28, "text": "IntStream filter(IntPredicate predicate) returns a stream consisting of the elements of this stream that match the given predicate. This is an intermediate operation. These op...
Java Program to Sort an ArrayList
17 May, 2021 ArrayList is the class provided in the Collection framework. In Java, the collection framework is defined in java.util package. ArrayList is used to dynamically stores the elements. It is more flexible than an array because there is no size limit in ArrayList. ArrayList stores the data in an unordered mann...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 May, 2021" }, { "code": null, "e": 431, "s": 52, "text": "ArrayList is the class provided in the Collection framework. In Java, the collection framework is defined in java.util package. ArrayList is used to dynamically stores the el...
Remove extra spaces in string JavaScript?
To remove extra spaces, you need to use trim() along with regular expressions. Following is our string with spaces before applying trim() − var sentence="My name is John Smith "; Now, we will remove the extra spaces as in the below code − var sentence="My name is John Smith "; console.log("The actual value="); console....
[ { "code": null, "e": 1202, "s": 1062, "text": "To remove extra spaces, you need to use trim() along with regular expressions. Following is our\nstring with spaces before applying trim() −" }, { "code": null, "e": 1241, "s": 1202, "text": "var sentence=\"My name is John Smith \";"...
Constrained Logistic Regression with Python | by Pararawendy Indarjo | Towards Data Science
Logistic regression is a basic yet popular classification model. Despite its simplicity, logistic regression is a powerful tool that is used in real-world contexts. The method’s primary benefit is perhaps its explainability, thanks to the ease with which its parameters/coefficients may be interpreted. As a result, one ...
[ { "code": null, "e": 337, "s": 172, "text": "Logistic regression is a basic yet popular classification model. Despite its simplicity, logistic regression is a powerful tool that is used in real-world contexts." }, { "code": null, "e": 591, "s": 337, "text": "The method’s primary ...
Sentinel-2 image clustering in python | by Wathela Hamed | Towards Data Science
Clustering or unsupervised classification is the process of grouping or aggregating the pixel values of an image into a certain number of natural classes (groups) based on statistical similarity. In this tutorial, we will be using the rasterio for sentinel-2 image manipulation and the power full scikit-learn python pac...
[ { "code": null, "e": 532, "s": 171, "text": "Clustering or unsupervised classification is the process of grouping or aggregating the pixel values of an image into a certain number of natural classes (groups) based on statistical similarity. In this tutorial, we will be using the rasterio for sentine...
How to find the range of a vector in R?
The range function in R provides the minimum and maximum values instead of the difference between the two. Hence, we can find the minimum and maximum by using range function then diff function can be used to find the actual range. For example, if we have a vector x then the range can be found by using diff(range(x)). L...
[ { "code": null, "e": 1381, "s": 1062, "text": "The range function in R provides the minimum and maximum values instead of the difference between the two. Hence, we can find the minimum and maximum by using range function then diff function can be used to find the actual range. For example, if we hav...
NortonLifeLock (Symantec) Interview Experience for Internship - GeeksforGeeks
18 Nov, 2020 A full-fledged 4-week process for the internship. Place: SASTRA University, Thanjavur. Round 1: A coding round that had 6 questions with the difficulty level of easy(3), medium(2), and hard(1). I solved 4 questions with 100% result and hard with 70% result and a question of medium with 30%. The time allott...
[ { "code": null, "e": 25109, "s": 25081, "text": "\n18 Nov, 2020" }, { "code": null, "e": 25159, "s": 25109, "text": "A full-fledged 4-week process for the internship." }, { "code": null, "e": 25196, "s": 25159, "text": "Place: SASTRA University, Thanjavur." ...