title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
How to generate armstrong numbers in Python?
Any three digit number is called an Armstrong number of sum of cube of its digits equals the number itself. In order to check if a number satisfies this condition, each digit from it is successively separated from right and its cube is cumulatively added. In the end if the sum is found to be equal to original number, i...
[ { "code": null, "e": 1412, "s": 1062, "text": "Any three digit number is called an Armstrong number of sum of cube of its digits equals the number itself. In order to check if a number satisfies this condition, each digit from it is successively separated from right and its cube is cumulatively adde...
Convert ArrayList to LinkedHashMap in Java - GeeksforGeeks
28 Dec, 2020 LinkedHashMap is a predefined class in Java that is similar to HashMap, contain key and its respective value unlike HashMap, In LinkedHashMap insertion order is preserved. We need to convert ArrayList to LinkedHashMap the Key value of LinkedHashMap will be an index of ArrayList, basically, LinkedHashMap wi...
[ { "code": null, "e": 23948, "s": 23920, "text": "\n28 Dec, 2020" }, { "code": null, "e": 24120, "s": 23948, "text": "LinkedHashMap is a predefined class in Java that is similar to HashMap, contain key and its respective value unlike HashMap, In LinkedHashMap insertion order is pr...
PHP Associative Array
In PHP, an array is a comma separated collection of key => value pairs. Such an array is called Associative Array where value is associated to a unique key. The key part has to ba a string or integer, whereas value can be of any type, even another array. Use of key is optional. If array consists only of values, it beco...
[ { "code": null, "e": 1317, "s": 1062, "text": "In PHP, an array is a comma separated collection of key => value pairs. Such an array is called Associative Array where value is associated to a unique key. The key part has to ba a string or integer, whereas value can be of any type, even another array...
C program to display all prime numbers between 1 to N using for loop
Write a C program to display all the prime numbers between 1 and n is a value given by the user at run time. C program to display all the prime numbers between 1 and n is a value given by the user at run time is explained below − Given below is an algorithm to display all the prime numbers between 1 and n is a value gi...
[ { "code": null, "e": 1171, "s": 1062, "text": "Write a C program to display all the prime numbers between 1 and n is a value given by the user at run time." }, { "code": null, "e": 1292, "s": 1171, "text": "C program to display all the prime numbers between 1 and n is a value giv...
INT_MAX and INT_MIN in C/C++ and Applications - GeeksforGeeks
03 Sep, 2021 Most of the time, in competitive programming, there is a need to assign the variable, the maximum or minimum value that data type can hold, but remembering such a large and precise number comes out to be a difficult job. Therefore, C++ has certain macros to represent these numbers, so that these can be dir...
[ { "code": null, "e": 24570, "s": 24542, "text": "\n03 Sep, 2021" }, { "code": null, "e": 24950, "s": 24570, "text": "Most of the time, in competitive programming, there is a need to assign the variable, the maximum or minimum value that data type can hold, but remembering such a ...
VSAM - LDS
LDS is known as Linear Data Set. Linear dataset is the only form of byte-stream dataset which is used in used in traditional operating system files. Linear datasets are rarely used. Following are the key features of LDS − Linear datasets does not contain RDF's and CIDF's as it does not have any control information embe...
[ { "code": null, "e": 1987, "s": 1765, "text": "LDS is known as Linear Data Set. Linear dataset is the only form of byte-stream dataset which is used in used in traditional operating system files. Linear datasets are rarely used. Following are the key features of LDS −" }, { "code": null, ...
Excel Pivot Table Calculated Field - GeeksforGeeks
30 Nov, 2021 “Pivot Table calculated field” is an option to include more data or calculations in the pivot table. Often, we need to add our own custom calculations that can refer to other fields in the data set for our reports. In the below examples we create a sales report by-product with an additional column “Sale...
[ { "code": null, "e": 25044, "s": 25016, "text": "\n30 Nov, 2021" }, { "code": null, "e": 25262, "s": 25044, "text": "“Pivot Table calculated field” is an option to include more data or calculations in the pivot table. Often, we need to add our own custom calculations that can re...
When your Neural Net doesn’t know: a bayesian approach with Keras | by Marco Cerliani | Towards Data Science
Everyone who has tried to fit a classification model and checked its performance has faced the problem of verifying not only KPI (like accuracy, precision and recall) but also how confident the model is in what it says. The most intuitive instrument to use to verify the reliability of a prediction is one that looks for...
[ { "code": null, "e": 535, "s": 172, "text": "Everyone who has tried to fit a classification model and checked its performance has faced the problem of verifying not only KPI (like accuracy, precision and recall) but also how confident the model is in what it says. The most intuitive instrument to us...
Hadoop - Quick Guide
Due to the advent of new technologies, devices, and communication means like social networking sites, the amount of data produced by mankind is growing rapidly every year. The amount of data produced by us from the beginning of time till 2003 was 5 billion gigabytes. If you pile up the data in the form of disks it may ...
[ { "code": null, "e": 2438, "s": 1851, "text": "Due to the advent of new technologies, devices, and communication means like social networking sites, the amount of data produced by mankind is growing rapidly every year. The amount of data produced by us from the beginning of time till 2003 was 5 bill...
Middleware in Express.js
19 Oct, 2021 Node.js is an open-source and cross-platform runtime environment built on Chrome’s V8 JavaScript engine for executing JavaScript code outside of a browser. You need to recollect that NodeJS isn’t a framework, and it’s not a programing language. In this article, we will discuss what is middleware in express...
[ { "code": null, "e": 53, "s": 25, "text": "\n19 Oct, 2021" }, { "code": null, "e": 365, "s": 53, "text": "Node.js is an open-source and cross-platform runtime environment built on Chrome’s V8 JavaScript engine for executing JavaScript code outside of a browser. You need to recoll...
Python Urllib Module
13 Oct, 2021 Urllib package is the URL handling module for python. It is used to fetch URLs (Uniform Resource Locators). It uses the urlopen function and is able to fetch URLs using a variety of different protocols. Urllib is a package that collects several modules for working with URLs, such as: urllib.request for ope...
[ { "code": null, "e": 52, "s": 24, "text": "\n13 Oct, 2021" }, { "code": null, "e": 255, "s": 52, "text": "Urllib package is the URL handling module for python. It is used to fetch URLs (Uniform Resource Locators). It uses the urlopen function and is able to fetch URLs using a var...
Java Program to Implement Circular Buffer
31 Aug, 2021 When data is constantly moved from one place to another or from one process to another or is frequently accessed, it cannot be stored in permanent memory locations such as hard drives as they take time to retrieve the data. This type of data needs to be accessed quickly and is stored in temporary memory lo...
[ { "code": null, "e": 28, "s": 0, "text": "\n31 Aug, 2021" }, { "code": null, "e": 374, "s": 28, "text": "When data is constantly moved from one place to another or from one process to another or is frequently accessed, it cannot be stored in permanent memory locations such as har...
CSS | flex-shrink Property
24 Aug, 2021 The flex-shrink property specifies how much the item will shrink compared to others item inside that container. It defines the ability of an element to shrink in compared to the other elements which are placed inside the same container. Note: If the item in the container is not flexible item then flex-shri...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Aug, 2021" }, { "code": null, "e": 265, "s": 28, "text": "The flex-shrink property specifies how much the item will shrink compared to others item inside that container. It defines the ability of an element to shrink in compared to t...
Python seek() function
28 Apr, 2022 The concept of file handling is used to preserve the data or information generated after running the program. Like other programming languages like C, C++, Java, Python also support file handling. Refer the below article to understand the basics of File Handling. File Handling in Python. Reading and W...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Apr, 2022" }, { "code": null, "e": 250, "s": 52, "text": "The concept of file handling is used to preserve the data or information generated after running the program. Like other programming languages like C, C++, Java, Python also ...
Hashtables Chaining with Doubly Linked Lists
06 Jun, 2022 Prerequisite – Hashing Introduction, Hashtable using Singly Linked List & Implementing our Own Hash Table with Separate Chaining in Java Implementing hash table using Chaining through Doubly Linked List is similar to implementing Hashtable using Singly Linked List. The only difference is that every node of...
[ { "code": null, "e": 52, "s": 24, "text": "\n06 Jun, 2022" }, { "code": null, "e": 571, "s": 52, "text": "Prerequisite – Hashing Introduction, Hashtable using Singly Linked List & Implementing our Own Hash Table with Separate Chaining in Java Implementing hash table using Chainin...
How to clear the text entered in Selenium with python?
We can enter text on any field in Selenium. After entering the text, we may need to remove or clear the text we entered in that field. This interaction with the web elements can be achieved with the help of clear() method. Thus a clear() method is used to clear or reset an input field belonging to a form/ edit box. It ...
[ { "code": null, "e": 1410, "s": 1187, "text": "We can enter text on any field in Selenium. After entering the text, we may need to remove or clear the text we entered in that field. This interaction with the web elements can be achieved with the help of clear() method." }, { "code": null, ...
Python | Plotting charts in excel sheet with Data Tools using XlsxWriter module | Set – 1
09 Jun, 2021 Prerequisite: Create and Write on an excel sheetXlsxWriter is a Python library using which one can perform multiple operations on excel files like creating, writing, arithmetic operations and plotting graphs. Let’s see how to plot charts with different types of Data Tools using realtime data. Charts are co...
[ { "code": null, "e": 52, "s": 24, "text": "\n09 Jun, 2021" }, { "code": null, "e": 346, "s": 52, "text": "Prerequisite: Create and Write on an excel sheetXlsxWriter is a Python library using which one can perform multiple operations on excel files like creating, writing, arithmet...
How to add jQuery code to HTML file ?
22 Jul, 2021 In this article, we will see how to add jQuery code to HTML file. You can easily add jQuery to HTML by using several methods, like adding jQuery from CDN or directly downloading jQuery files and including them into your projects. Several methods are discussed in this article. Methods: Download and include ...
[ { "code": null, "e": 53, "s": 25, "text": "\n22 Jul, 2021" }, { "code": null, "e": 330, "s": 53, "text": "In this article, we will see how to add jQuery code to HTML file. You can easily add jQuery to HTML by using several methods, like adding jQuery from CDN or directly download...
Pad or fill a string by a variable in Python using f-string
18 Aug, 2020 f-string stands for formatted string. It had come up by Python Version 3.6 and rapidly used to do easy formatting on strings. F-string is a string literal having syntax starts with f and followed by {}. That placeholder used for holding variable, that will be changed upon the variable names and their value...
[ { "code": null, "e": 28, "s": 0, "text": "\n18 Aug, 2020" }, { "code": null, "e": 351, "s": 28, "text": "f-string stands for formatted string. It had come up by Python Version 3.6 and rapidly used to do easy formatting on strings. F-string is a string literal having syntax starts...
Training vs Testing vs Validation Sets
22 Nov, 2021 In this article, we are going to see how to Train, Test and Validate the Sets. The fundamental purpose for splitting the dataset is to assess how effective will the trained model be in generalizing to new data. This split can be achieved by using train_test_split function of scikit-learn. This is the actu...
[ { "code": null, "e": 28, "s": 0, "text": "\n22 Nov, 2021" }, { "code": null, "e": 107, "s": 28, "text": "In this article, we are going to see how to Train, Test and Validate the Sets." }, { "code": null, "e": 319, "s": 107, "text": "The fundamental purpose for...
Scala Map toSeq() method with example
29 Jul, 2019 The toSeq() method is utilized to display a sequence from the Scala map. Method Definition: def toSeq: Seq[A] Return Type: It returns a sequence from the stated map. Example #1: // Scala program of toSeq()// method // Creating objectobject GfG{ // Main method def main(args:Array[String]) { ...
[ { "code": null, "e": 28, "s": 0, "text": "\n29 Jul, 2019" }, { "code": null, "e": 101, "s": 28, "text": "The toSeq() method is utilized to display a sequence from the Scala map." }, { "code": null, "e": 138, "s": 101, "text": "Method Definition: def toSeq: Seq...
OS Module in Python with Examples
16 Jun, 2022 The OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of using operating system-dependent functionality. The *os* and *os.path* modules include many functions to interact with the file syst...
[ { "code": null, "e": 52, "s": 24, "text": "\n16 Jun, 2022" }, { "code": null, "e": 364, "s": 52, "text": "The OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This module provides a portable way of...
Keywords in Python | Set 2
28 Jun, 2021 Python Keywords – Introduction Keywords in Python | Set 1 More keywords:16. try : This keyword is used for exception handling, used to catch the errors in the code using the keyword except. Code in “try” block is checked, if there is any type of error, except block is executed. 17. except : As explained a...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Jun, 2021" }, { "code": null, "e": 111, "s": 52, "text": "Python Keywords – Introduction Keywords in Python | Set 1 " }, { "code": null, "e": 332, "s": 111, "text": "More keywords:16. try : This keyword is used f...
Python | Pandas dataframe.sort_index()
13 Jun, 2022 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier.Pandas dataframe.sort_index() function sorts objects by labels along the given axis. Basically...
[ { "code": null, "e": 54, "s": 26, "text": "\n13 Jun, 2022" }, { "code": null, "e": 680, "s": 54, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes im...
Generating Password and OTP in Java
28 Jun, 2022 You may go through Generate a One Time Password or Unique Identification URL article before this for better understanding. Many a times we forget our passwords and we opt for Forget password option and within no time we get a new password at our registered email-ID or phone no. to login our account. And ...
[ { "code": null, "e": 52, "s": 24, "text": "\n28 Jun, 2022" }, { "code": null, "e": 177, "s": 52, "text": "You may go through Generate a One Time Password or Unique Identification URL article before this for better understanding. " }, { "code": null, "e": 784, "s"...
How to Implement Dynamic TabLayout in Android?
15 May, 2021 In this article, we will learn about how to add Dynamic TabLayout with ViewPager in an app. TabLayout provides a horizontal layout to display tabs. Here we will be just specifying the number of tabs we want to have. WhatsApp, Facebook, etc are a very good example of TabLayout with ViewPager. A sample GIF i...
[ { "code": null, "e": 28, "s": 0, "text": "\n15 May, 2021" }, { "code": null, "e": 486, "s": 28, "text": "In this article, we will learn about how to add Dynamic TabLayout with ViewPager in an app. TabLayout provides a horizontal layout to display tabs. Here we will be just specif...
Data Classes in Python | Set 5 (post-init) - GeeksforGeeks
15 Apr, 2019 Prerequisite: Data Classes in Python | Set 4 In this post, we will discuss how to modify values of some attributes during object creation without coding it in __init__() by using post-init processing. __post_init__(): This function when made, is called by in-built __init__() after initialization of all the...
[ { "code": null, "e": 24050, "s": 24022, "text": "\n15 Apr, 2019" }, { "code": null, "e": 24095, "s": 24050, "text": "Prerequisite: Data Classes in Python | Set 4" }, { "code": null, "e": 24251, "s": 24095, "text": "In this post, we will discuss how to modify v...
Exploring the Next Word Predictor! | by Dhruvil Shah | Towards Data Science
How does the keyboard on your phone know what you would like to type next? Language prediction is a Natural Language Processing - NLP application concerned with predicting the text given in the preceding text. Auto-complete or suggested responses are popular types of language prediction. The first step towards language...
[ { "code": null, "e": 691, "s": 171, "text": "How does the keyboard on your phone know what you would like to type next? Language prediction is a Natural Language Processing - NLP application concerned with predicting the text given in the preceding text. Auto-complete or suggested responses are popu...
How to pass objects to functions in C++?
There are four ways of passing objects to functions. Let's assume you have a class X and want to pass it to a function fun, then − This creates a shallow local copy of the object in the function scope. Things you modify here won't be reflected in the object passed to it. For example, Declaration void fun(X x); Calling...
[ { "code": null, "e": 1193, "s": 1062, "text": "There are four ways of passing objects to functions. Let's assume you have a class X and want to pass it to a function fun, then −" }, { "code": null, "e": 1347, "s": 1193, "text": "This creates a shallow local copy of the object in ...
How to find the last index value of specified string in Golang? - GeeksforGeeks
26 Aug, 2019 In Go language, strings are different from other languages like Java, C++, Python, etc. It is a sequence of variable-width characters where each and every character is represented by one or more bytes using UTF-8 Encoding.In Go strings, you can find the last index value of the specified string from the ori...
[ { "code": null, "e": 24376, "s": 24348, "text": "\n26 Aug, 2019" }, { "code": null, "e": 24863, "s": 24376, "text": "In Go language, strings are different from other languages like Java, C++, Python, etc. It is a sequence of variable-width characters where each and every characte...
An overview of several recommendation systems | by Alexandre Wrg | Towards Data Science
Collaborative filtering, KNN, Deep learning, transfer learning, Tfidf...ect explore all of these In this article we will review several recommendation algorithms, evaluate through KPI and compare them in real time. We will see in order : a popularity based recommender a content based recommender (Through KNN, TFIDF, Tr...
[ { "code": null, "e": 269, "s": 172, "text": "Collaborative filtering, KNN, Deep learning, transfer learning, Tfidf...ect explore all of these" }, { "code": null, "e": 410, "s": 269, "text": "In this article we will review several recommendation algorithms, evaluate through KPI an...
Extracting Data from Twitter using Python | by Shivani Dandir | Towards Data Science
Now that everything is being done online, the data shared on social media platforms has exponentially increased. Using this data we can analyze various socio-economic factors that are currently prevailing and a lot more. Here is a way to extract tweets based on certain topics from Twitter API using the Tweepy library. ...
[ { "code": null, "e": 491, "s": 171, "text": "Now that everything is being done online, the data shared on social media platforms has exponentially increased. Using this data we can analyze various socio-economic factors that are currently prevailing and a lot more. Here is a way to extract tweets ba...
Computer Programming - Data Types
Let's discuss about a very simple but very important concept available in almost all the programming languages which is called data types. As its name indicates, a data type represents a type of the data which you can process using your computer program. It can be numeric, alphanumeric, decimal, etc. Let’s keep Compute...
[ { "code": null, "e": 2442, "s": 2140, "text": "Let's discuss about a very simple but very important concept available in almost all the programming languages which is called data types. As its name indicates, a data type represents a type of the data which you can process using your computer program...
How to catch all JavaScript unhandled exceptions?
To catch all JavaScript unhandled exceptions, use window.error. The onerror event handler provides three pieces of information to identify the exact nature of the error − Error message − The same message that the browser would display for the given error URL − The file in which the error occurred Line number− The line ...
[ { "code": null, "e": 1233, "s": 1062, "text": "To catch all JavaScript unhandled exceptions, use window.error. The onerror event handler provides three pieces of information to identify the exact nature of the error −" }, { "code": null, "e": 1317, "s": 1233, "text": "Error messa...
OPTUNA: A Flexible, Efficient and Scalable Hyperparameter Optimization Framework | by Fernando López | Towards Data Science
One of the determining tasks when building machine learning models is hyperparameter optimization. A correct optimization of hyperparameters is directly reflected in the performance of the model. This is why hyperparameter optimization has been an active research area for several years. Fortunately, today there are sev...
[ { "code": null, "e": 863, "s": 171, "text": "One of the determining tasks when building machine learning models is hyperparameter optimization. A correct optimization of hyperparameters is directly reflected in the performance of the model. This is why hyperparameter optimization has been an active ...
Clojure - Lists
List is a structure used to store a collection of data items. In Clojure, the List implements the ISeq interface. Lists are created in Clojure by using the list function. Following is an example of creating a list of numbers in Clojure. (ns clojure.examples.example (:gen-class)) (defn example [] (println (list 1 ...
[ { "code": null, "e": 2545, "s": 2374, "text": "List is a structure used to store a collection of data items. In Clojure, the List implements the ISeq interface. Lists are created in Clojure by using the list function." }, { "code": null, "e": 2611, "s": 2545, "text": "Following i...
C# Program to perform Celsius to Fahrenheit Conversion
Firstly, set the Celsius temperature − double celsius = 36; Console.WriteLine("Celsius: " + celsius); Now convert it into Fahrenheit: fahrenheit = (celsius * 9) / 5 + 32; You can try to run the following code to convert Celsius to Fahrenheit. Live Demo using System; using System.Collections.Generic; using System.Linq; ...
[ { "code": null, "e": 1101, "s": 1062, "text": "Firstly, set the Celsius temperature −" }, { "code": null, "e": 1164, "s": 1101, "text": "double celsius = 36;\nConsole.WriteLine(\"Celsius: \" + celsius);" }, { "code": null, "e": 1196, "s": 1164, "text": "Now co...
How to find the previous and next record using a single query in MySQL?
You can use UNION to get the previous and next record in MySQL. The syntax is as follows (select *from yourTableName WHERE yourIdColumnName > yourValue ORDER BY yourIdColumnName ASC LIMIT 1) UNION (select *from yourTableName WHERE yourIdColumnName < yourValue ORDER BY yourIdColumnName DESC LIMIT 1); To understand the c...
[ { "code": null, "e": 1126, "s": 1062, "text": "You can use UNION to get the previous and next record in MySQL." }, { "code": null, "e": 1151, "s": 1126, "text": "The syntax is as follows" }, { "code": null, "e": 1363, "s": 1151, "text": "(select *from yourTabl...
Tryit Editor v3.7
Tryit: Multiple shadows
[]
How to change the font properties of a Matplotlib colorbar label?
To change the font properties of a matplotlib colorbar label, we can take the following steps − Set the figure size and adjust the padding between and around the subplots. Set the figure size and adjust the padding between and around the subplots. Create x, y and z data points using numpy. Create x, y and z data points...
[ { "code": null, "e": 1158, "s": 1062, "text": "To change the font properties of a matplotlib colorbar label, we can take the following steps −" }, { "code": null, "e": 1234, "s": 1158, "text": "Set the figure size and adjust the padding between and around the subplots." }, { ...
How to set cookies expiry date in JavaScript?
Extend the life of a cookie beyond the current browser session by setting an expiration date and saving the expiry date within the cookie. This can be done by setting the ‘expires’ attribute to a date and time. You can try to run the following example to set the expiry date of a cookie by 1 Month − <html> <head> ...
[ { "code": null, "e": 1273, "s": 1062, "text": "Extend the life of a cookie beyond the current browser session by setting an expiration date and saving the expiry date within the cookie. This can be done by setting the ‘expires’ attribute to a date and time." }, { "code": null, "e": 1362,...
How to remove Multicollinearity in dataset using PCA? | by Satyam Kumar | Towards Data Science
Multicollinearity refers to a condition in which the independent variables are correlated to each other. Multicollinearity can cause problems when you fit the model and interpret the results. The variables of the dataset should be independent of each other to overdue the problem of multicollinearity. In this article, y...
[ { "code": null, "e": 474, "s": 172, "text": "Multicollinearity refers to a condition in which the independent variables are correlated to each other. Multicollinearity can cause problems when you fit the model and interpret the results. The variables of the dataset should be independent of each othe...
Operations on Queue in Data Structures
Queue is First In First Out data structure. The queue is used in different area for graph traversal algorithms Breadth First Search etc. The queue has some primitive operations. Here we will see those operations of queue, and see one example using the queue ADT. The ADT (abstract datatype) is special kind of datatype, ...
[ { "code": null, "e": 1325, "s": 1062, "text": "Queue is First In First Out data structure. The queue is used in different area for graph traversal algorithms Breadth First Search etc. The queue has some primitive operations. Here we will see those operations of queue, and see one example using the q...
Basic Operators in Java - GeeksforGeeks
23 Jun, 2021 Java provides a rich operator environment. We can classify the basic operators in java in the following groups: Arithmetic Operators Relational Operators Bitwise Operators Assignment Operators Logical Operators Let us now learn about each of these operators in detail. 1. Arithmetic Operators: Arithmetic op...
[ { "code": null, "e": 24055, "s": 24027, "text": "\n23 Jun, 2021" }, { "code": null, "e": 24167, "s": 24055, "text": "Java provides a rich operator environment. We can classify the basic operators in java in the following groups:" }, { "code": null, "e": 24188, "s"...
How to use Calendar Widget using the CalendarView class in Android App using Kotlin?
This example demonstrates how to use Calendar Widget using the CalendarView class in Android App 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="...
[ { "code": null, "e": 1173, "s": 1062, "text": "This example demonstrates how to use Calendar Widget using the CalendarView class in Android App using Kotlin." }, { "code": null, "e": 1302, "s": 1173, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Proje...
What are the different modes of parameters used by MySQL stored procedure?
Parameters make the stored procedure more useful and flexible. In MySQL, we have the following three kinds of modes − It is the default mode. When we define an IN parameter in a stored procedure, the calling program has to pass an argument to the stored procedure. The value of an IN parameter is protected which means t...
[ { "code": null, "e": 1180, "s": 1062, "text": "Parameters make the stored procedure more useful and flexible. In MySQL, we have the following three kinds of modes −" }, { "code": null, "e": 1525, "s": 1180, "text": "It is the default mode. When we define an IN parameter in a stor...
Iterate through a LinkedList in reverse direction using a ListIterator in Java
A ListIterator can be used to traverse the elements in the forward direction as well as the reverse direction in a LinkedList. The method hasPrevious( ) in ListIterator returns true if there are more elements in the LinkedList while traversing in the reverse direction and false otherwise. The method previous( ) returns...
[ { "code": null, "e": 1464, "s": 1062, "text": "A ListIterator can be used to traverse the elements in the forward direction as well as the\nreverse direction in a LinkedList. The method hasPrevious( ) in ListIterator returns true if there\nare more elements in the LinkedList while traversing in the ...
MySQL - YEARWEEK() Function
The DATE, DATETIME and TIMESTAMP datatypes in MySQL are used to store the date, date and time, time stamp values respectively. Where a time stamp is a numerical value representing the number of milliseconds from '1970-01-01 00:00:01' UTC (epoch) to the specified time. MySQL provides a set of functions to manipulate the...
[ { "code": null, "e": 2439, "s": 2333, "text": "The DATE, DATETIME and TIMESTAMP datatypes in MySQL are used to store the date, date and time, time stamp" }, { "code": null, "e": 2664, "s": 2439, "text": "values respectively. Where a time stamp is a numerical value representing th...
Gensim - Doc2Vec Model
Doc2Vec model, as opposite to Word2Vec model, is used to create a vectorised representation of a group of words taken collectively as a single unit. It doesn’t only give the simple average of the words in the sentence. Here to create document vectors using Doc2Vec, we will be using text8 dataset which can be downloaded...
[ { "code": null, "e": 2271, "s": 2052, "text": "Doc2Vec model, as opposite to Word2Vec model, is used to create a vectorised representation of a group of words taken collectively as a single unit. It doesn’t only give the simple average of the words in the sentence." }, { "code": null, "e...
Create Dumbbell Plots to Visualize Group Differences in R | by Connor Rothschild | Towards Data Science
The coronavirus (also known as COVID-19) is a pandemic. As of this writing, nearly 6000 people have died and another 150,000 have been infected. All signs seem to show that the virus is only growing. But some groups are less worried about COVID-19 than others. Recent polling from Quinnipiac University suggests that wor...
[ { "code": null, "e": 372, "s": 172, "text": "The coronavirus (also known as COVID-19) is a pandemic. As of this writing, nearly 6000 people have died and another 150,000 have been infected. All signs seem to show that the virus is only growing." }, { "code": null, "e": 570, "s": 372,...
Getting Started with Recommender Systems and TensorRec | by James Kirk | Towards Data Science
Recommender systems are used in many products to present users with relevant or personalized items (food, movies, music, books, news, etc). To do this, they learn from users’ previous interactions with items to identify users’ tastes and improve future recommendations. This post will walk us through the prototyping of ...
[ { "code": null, "e": 442, "s": 172, "text": "Recommender systems are used in many products to present users with relevant or personalized items (food, movies, music, books, news, etc). To do this, they learn from users’ previous interactions with items to identify users’ tastes and improve future re...
How to check whether a thread is alive or not in C#
To check whether a thread is alive or not, the code is as follows − Live Demo using System; using System.Threading; public class Demo { public static void Main() { Thread thread = new Thread(new ThreadStart(demo1)); thread = Thread.CurrentThread; Console.WriteLine("Is the thread alive? = "+thread....
[ { "code": null, "e": 1130, "s": 1062, "text": "To check whether a thread is alive or not, the code is as follows −" }, { "code": null, "e": 1141, "s": 1130, "text": " Live Demo" }, { "code": null, "e": 1950, "s": 1141, "text": "using System;\nusing System.Thre...
Program to check whether list of points form a straight line or not in Python
Suppose we have a list coordinates in a Cartesian plane, we have to check whether the coordinates form a straight line segment or not. So, if the input is like coordinates = [(5, 5),(8, 8),(9, 9)], then the output will be True, as these points are forming a line segment with a slope 1. To solve this, we will follow the...
[ { "code": null, "e": 1197, "s": 1062, "text": "Suppose we have a list coordinates in a Cartesian plane, we have to check whether the coordinates form a straight line segment or not." }, { "code": null, "e": 1349, "s": 1197, "text": "So, if the input is like coordinates = [(5, 5),...
JavaScript Array reverse() Method - GeeksforGeeks
04 Oct, 2021 Below is the example of Array reverse() method. Example:<script>function func() { // Original Array var arr = ['Portal', 'Science', 'Computer', 'GeeksforGeeks']; document.write(arr); // Reversed array var new_arr = arr.reverse(); document.write("<br>"); document.writ...
[ { "code": null, "e": 24039, "s": 24011, "text": "\n04 Oct, 2021" }, { "code": null, "e": 24087, "s": 24039, "text": "Below is the example of Array reverse() method." }, { "code": null, "e": 24395, "s": 24087, "text": "Example:<script>function func() { // ...
Taking Derivatives in Python. Learn how to deal with Calculus part of... | by Dario Radečić | Towards Data Science
The idea behind this post is to revisit some calculus topics needed in data science and machine learning and to take them one step further — calculate them in Python. It’s really simple once you get the gist of it, and you don’t need to worry about memorizing differentiation rules. This post will be based on a Python l...
[ { "code": null, "e": 454, "s": 171, "text": "The idea behind this post is to revisit some calculus topics needed in data science and machine learning and to take them one step further — calculate them in Python. It’s really simple once you get the gist of it, and you don’t need to worry about memori...
What is difference between <button> vs. <input type="button" />?
In HTML, <input type="button" /> is used to create buttons in an HTML form. Inside the <button> tag, you can place content like text or images. But, this is not the case with the buttons created with <input> tag. Let’s see an example of button and <input type=”button” />, It is used for creating a button within an HTML...
[ { "code": null, "e": 1275, "s": 1062, "text": "In HTML, <input type=\"button\" /> is used to create buttons in an HTML form. Inside the <button> tag, you can place content like text or images. But, this is not the case with the buttons created with <input> tag." }, { "code": null, "e": 1...
Java Program to create Character Array from String Objects
Use the toCharArray() method in Java to create character arrays from string objects. The following is our string. String str = "This is it!"; Now, let us create character array from the above string. char[] strArr = str.toCharArray(); Live Demo public class Demo { public static void main(String[] args) { Stri...
[ { "code": null, "e": 1176, "s": 1062, "text": "Use the toCharArray() method in Java to create character arrays from string objects. The following is our string." }, { "code": null, "e": 1204, "s": 1176, "text": "String str = \"This is it!\";" }, { "code": null, "e": 1...
How to concatenate a string with numbers in Python?
To concatenate a string with numbers, you need to cast the numbers to string using str(number). For example, >>> a = "string" >>> b = 1 >>> print a + str(b) string1 In Python 2, you can also use backtick(``) to surround the number and get the same result with numbers and strings. Note that backticks have been removed f...
[ { "code": null, "e": 1171, "s": 1062, "text": "To concatenate a string with numbers, you need to cast the numbers to string using str(number). For example," }, { "code": null, "e": 1227, "s": 1171, "text": ">>> a = \"string\"\n>>> b = 1\n>>> print a + str(b)\nstring1" }, { ...
PHP | is_array() Function - GeeksforGeeks
06 Jan, 2020 The is_array() is an inbuilt function in PHP. The is_array() function is used to check whether a variable is an array or not. Syntax: bool is_array($variable_name) Parameter: This function accept a single parameter as mentioned above and described below:$variable_name: This parameter holds the variable we ...
[ { "code": null, "e": 24398, "s": 24370, "text": "\n06 Jan, 2020" }, { "code": null, "e": 24524, "s": 24398, "text": "The is_array() is an inbuilt function in PHP. The is_array() function is used to check whether a variable is an array or not." }, { "code": null, "e": ...
RxPY - Concurrency using Scheduler
One important feature of RxPy is concurrency, i.e. to allow the task to execute in parallel. To make that happen, we have two operators subscribe_on() and observe_on() that will work with a scheduler, that will decide the execution of the subscribed task. Here, is a working example, that shows the need for subscibe_on(...
[ { "code": null, "e": 2020, "s": 1764, "text": "One important feature of RxPy is concurrency, i.e. to allow the task to execute in parallel. To make that happen, we have two operators subscribe_on() and observe_on() that will work with a scheduler, that will decide the execution of the subscribed tas...
Classification. Building a full classification workflow | by Ali Masri | Towards Data Science
Note: This article is part of a series. Check out the full series: Part 1: Regression, Part 2: Feature Transformation, Part 3: Classification, Parts 4 and up are coming soon. In this part of the series, we will put together everything we have learned to train a classification model. The objective is to learn how to bui...
[ { "code": null, "e": 346, "s": 171, "text": "Note: This article is part of a series. Check out the full series: Part 1: Regression, Part 2: Feature Transformation, Part 3: Classification, Parts 4 and up are coming soon." }, { "code": null, "e": 560, "s": 346, "text": "In this par...
SQL CREATE TABLE Statement
The CREATE TABLE statement is used to create a new table in a database. The column parameters specify the names of the columns of the table. The datatype parameter specifies the type of data the column can hold (e.g. varchar, integer, date, etc.). Tip: For an overview of the available data types, go to our complete Da...
[ { "code": null, "e": 72, "s": 0, "text": "The CREATE TABLE statement is used to create a new table in a database." }, { "code": null, "e": 141, "s": 72, "text": "The column parameters specify the names of the columns of the table." }, { "code": null, "e": 248, "s"...
How to make a method deprecated in C#?
The Obsolete Attribute marks elements like classes, methods, properties, fields, delegates, and many others within our code as deprecated or obsolete. The attribute is read at compile time and it is used to generate a warning or an error to the developer. This attribute can help if we have ever wanted to make sure prog...
[ { "code": null, "e": 1318, "s": 1062, "text": "The Obsolete Attribute marks elements like classes, methods, properties, fields, delegates, and many others within our code as deprecated or obsolete. The attribute is read at compile time and it is used to generate a warning or an error to the develope...
C Program Coin Change
In this problem, we are given a value n, and we want to make change of n rupees, and we have n number of coins each of value ranging from 1 to m. And we have to return the total number of ways in which make the sum. Input : N = 6 ; coins = {1,2,4}. Output : 6 Explanation : The total combination that make the sum of 6 i...
[ { "code": null, "e": 1278, "s": 1062, "text": "In this problem, we are given a value n, and we want to make change of n rupees, and we have n number of coins each of value ranging from 1 to m. And we have to return the total number of ways in which make the sum." }, { "code": null, "e": ...
Write a program in Java to rotate a matrix by 90 degrees in anticlockwise direction
Let’s suppose we have given a square matrix of N×N. The task is to rotate the matrix counterclockwise. For example, Input-1 − N = 3 matrix[ ][ ] = [ [1 2 3], [4 5 6], [7 8 9] ] Output − 3 6 9 2 5 8 1 4 7 Explanation: After rotating the matrix counterclockwise it will generate the output as, 3 6 9 2 5 8 1 4 7. ...
[ { "code": null, "e": 1178, "s": 1062, "text": "Let’s suppose we have given a square matrix of N×N. The task is to rotate the matrix counterclockwise. For example," }, { "code": null, "e": 1188, "s": 1178, "text": "Input-1 −" }, { "code": null, "e": 1248, "s": 1188...
Audio Classification with Pre-trained VGG-19 (Keras) | by Asad Mahmood | Towards Data Science
In this post, I’ll target the problem of audio classification. I’ll train an SVM classifier on the features extracted by a pre-trained VGG-19, from the waveforms of audios. The main idea behind this post is to show the power of pre-trained models, and the ease with which they can be applied. I wanted to evaluate this a...
[ { "code": null, "e": 465, "s": 172, "text": "In this post, I’ll target the problem of audio classification. I’ll train an SVM classifier on the features extracted by a pre-trained VGG-19, from the waveforms of audios. The main idea behind this post is to show the power of pre-trained models, and the...
F# - Events
Events allow classes to send and receive messages between one another. In GUI, events are user actions like key press, clicks, mouse movements, etc., or some occurrence like system generated notifications. Applications need to respond to events when they occur. For example, interrupts. Events are used for inter-process...
[ { "code": null, "e": 2232, "s": 2161, "text": "Events allow classes to send and receive messages between one another." }, { "code": null, "e": 2497, "s": 2232, "text": "In GUI, events are user actions like key press, clicks, mouse movements, etc., or some occurrence like system g...
What are static methods in a Python class?
Any python class has three types of methods like the instance methods, class methods and the static methods. Consider the code class OurClass: def method(self): return 'instance method called', self @classmethod def classmethod(cls): return 'class method called', cls @staticmethod ...
[ { "code": null, "e": 1171, "s": 1062, "text": "Any python class has three types of methods like the instance methods, class methods and the static methods." }, { "code": null, "e": 1189, "s": 1171, "text": "Consider the code" }, { "code": null, "e": 1440, "s": 118...
COBOL - Quick Guide
COBOL is a high-level language. One must understand the way COBOL works. Computers only understand machine code, a binary stream of 0s and 1s. COBOL code must be converted into machine code using a compiler. Run the program source through a compiler. The compiler first checks for any syntax errors and then converts it...
[ { "code": null, "e": 2501, "s": 2022, "text": "COBOL is a high-level language. One must understand the way COBOL works. Computers only understand machine code, a binary stream of 0s and 1s. COBOL code must be converted into machine code using a compiler. Run the program source through a compiler. T...
XStream - Annotations
XStream supports annotations similarly like automatic configuration instead of coding. In the previous chapter, we've seen the following configurations in code. xstream.alias("student", Student.class); xstream.alias("note", Note.class); xstream.useAttributeFor(Student.class, "studentName"); xstream.aliasField("name", ...
[ { "code": null, "e": 1919, "s": 1758, "text": "XStream supports annotations similarly like automatic configuration instead of coding. In the previous chapter, we've seen the following configurations in code." }, { "code": null, "e": 2164, "s": 1919, "text": "xstream.alias(\"stude...
Java.util.Locale Class in Java | Set 1 - GeeksforGeeks
06 Aug, 2021 As the name suggests util.Locale Class is used to perform locale task and provides locale information for the user. Declaration : public final class Locale extends Object implements Cloneable, Serializable Constructors : Locale(String L): Creates Locale form the given language code. Locale(String ...
[ { "code": null, "e": 25821, "s": 25793, "text": "\n06 Aug, 2021" }, { "code": null, "e": 25938, "s": 25821, "text": "As the name suggests util.Locale Class is used to perform locale task and provides locale information for the user. " }, { "code": null, "e": 25953, ...
Fillna in multiple columns in place in Python Pandas - GeeksforGeeks
07 Jul, 2021 In this article, we are going to write python script to fill multiple columns in place in Python using pandas library. A data frame is a 2D data structure that can be stored in CSV, Excel, .dB, SQL formats. We will be using Pandas Library of python to fill the missing values in Data Frame. Let’s understand...
[ { "code": null, "e": 26235, "s": 26207, "text": "\n07 Jul, 2021" }, { "code": null, "e": 26526, "s": 26235, "text": "In this article, we are going to write python script to fill multiple columns in place in Python using pandas library. A data frame is a 2D data structure that can...
C++ Program To Write Your Own atoi() - GeeksforGeeks
23 Dec, 2021 The atoi() function in C takes a string (which represents an integer) as an argument and returns its value of type int. So basically the function is used to convert a string argument to an integer. Syntax: int atoi(const char strn) Parameters: The function accepts one parameter strn which refers to the s...
[ { "code": null, "e": 25773, "s": 25745, "text": "\n23 Dec, 2021" }, { "code": null, "e": 25971, "s": 25773, "text": "The atoi() function in C takes a string (which represents an integer) as an argument and returns its value of type int. So basically the function is used to conver...
order_of_key() in C++ - GeeksforGeeks
06 Jan, 2020 The order_of_key() is a builtin function of Ordered Set which is a Policy Based Data Structure in C++. Policy-based data structures are not part of the C++ standard library but g++ compiler supports them. Ordered set is a policy based data structure in g++ that keeps the unique elements in sorted order. It...
[ { "code": null, "e": 25369, "s": 25341, "text": "\n06 Jan, 2020" }, { "code": null, "e": 25574, "s": 25369, "text": "The order_of_key() is a builtin function of Ordered Set which is a Policy Based Data Structure in C++. Policy-based data structures are not part of the C++ standar...
getopts Command in Linux with Examples - GeeksforGeeks
24 Jul, 2020 getopts is a very convenient bash script utility, which helps you to conveniently and gracefully handle the passing of flags(short version), and arguments in a clean, standardized manner. Instead of having the developer manually handle the flags passed to a script, this provides a handy way of handling thi...
[ { "code": null, "e": 25651, "s": 25623, "text": "\n24 Jul, 2020" }, { "code": null, "e": 25998, "s": 25651, "text": "getopts is a very convenient bash script utility, which helps you to conveniently and gracefully handle the passing of flags(short version), and arguments in a cle...
How to Hide, Recover and Delete Tkinter Widgets? - GeeksforGeeks
11 Dec, 2020 Tkinter is a Python Package for creating GUI(Graphical User Interface) applications. Tkinter provides us with a variety of common GUI elements which we can use to build out interfaces — such as buttons, label, frame, message, menu, and various kind of entry fields and display areas. We call these elements ...
[ { "code": null, "e": 25555, "s": 25527, "text": "\n11 Dec, 2020" }, { "code": null, "e": 25874, "s": 25555, "text": "Tkinter is a Python Package for creating GUI(Graphical User Interface) applications. Tkinter provides us with a variety of common GUI elements which we can use to ...
ReactJS MDBootstrap Forms Checkbox Component - GeeksforGeeks
07 Jan, 2022 MDBootstrap is a Material Design and bootstrap-based react UI library that is used to make good-looking webpages with its seamless and easy-to-use component. In this article, we will know how to use Forms Checkbox Component in ReactJS MDBootstrap. A checkbox lets a user definitely choose a value from a lim...
[ { "code": null, "e": 26071, "s": 26043, "text": "\n07 Jan, 2022" }, { "code": null, "e": 26418, "s": 26071, "text": "MDBootstrap is a Material Design and bootstrap-based react UI library that is used to make good-looking webpages with its seamless and easy-to-use component. In th...
Sort an array of strings in ascending order with each string sorted in descending order - GeeksforGeeks
21 Nov, 2021 Given a array of strings S[] of size N (1 ≤ N ≤ 105), sort characters of each string in descending order and then print the array of strings in ascending order. Examples: Input: s[] = {“apple”, “box”, “cat”} Output: pplea tca xob Explanation: Sorting each string in descending order, S[] modfies to {“pple...
[ { "code": null, "e": 26883, "s": 26855, "text": "\n21 Nov, 2021" }, { "code": null, "e": 27044, "s": 26883, "text": "Given a array of strings S[] of size N (1 ≤ N ≤ 105), sort characters of each string in descending order and then print the array of strings in ascending order." ...
ISRO | ISRO CS 2018 | Question 19 - GeeksforGeeks
02 Jul, 2018 A doubly linked list is declared as struct Node { int Value; struct Node *Fwd; struct Node *Bwd; ); Where Fwd and Bwd represent forward and backward link to the adjacent elements of the list. Which of the following segments of code deletes the node pointed to by X from the doubly linke...
[ { "code": null, "e": 25611, "s": 25583, "text": "\n02 Jul, 2018" }, { "code": null, "e": 25647, "s": 25611, "text": "A doubly linked list is declared as" }, { "code": null, "e": 25732, "s": 25647, "text": "struct Node {\n int Value;\n struct Node *...
Love 3Blue1Brown Animations? Here is a Manim Tutorial For Creating Your Own in Python | Towards Data Science
Do you know how many lines of code went into creating the Essence of Linear Algebra series of 3Blue1Brown? With 16 videos in the series and a total of +100 on the channel, these numbers speak volumes about how indebted the math world is to Grant Sanderson. Though the channel is seemingly math-focused, it is the by-prod...
[ { "code": null, "e": 279, "s": 172, "text": "Do you know how many lines of code went into creating the Essence of Linear Algebra series of 3Blue1Brown?" }, { "code": null, "e": 429, "s": 279, "text": "With 16 videos in the series and a total of +100 on the channel, these numbers ...
Julia global Keyword | Creating a global variable in Julia
26 Mar, 2020 Keywords in Julia are reserved words whose value is pre-defined to the compiler and can not be changed by the user. These words have a specific meaning and perform their specific operation on execution. 'global' keyword in Julia is used to access a variable that is defined in the global scope. It makes the...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 Mar, 2020" }, { "code": null, "e": 231, "s": 28, "text": "Keywords in Julia are reserved words whose value is pre-defined to the compiler and can not be changed by the user. These words have a specific meaning and perform their speci...
gawk command in Linux with Examples
20 Jan, 2022 gawk command in Linux is used for pattern scanning and processing language. The awk command requires no compiling and allows the user to use variables, numeric functions, string functions, and logical operators. It is a utility that enables programmers to write tiny and effective programs in the form of st...
[ { "code": null, "e": 28, "s": 0, "text": "\n20 Jan, 2022" }, { "code": null, "e": 491, "s": 28, "text": "gawk command in Linux is used for pattern scanning and processing language. The awk command requires no compiling and allows the user to use variables, numeric functions, stri...
All forms of formatted scanf() in C
23 Sep, 2021 C language has standard libraries that allow input and output in a program. The stdio.h or standard input-output library in C has methods for input and output. scanf(): The scanf() method n C Language, reads the value from the console as per the type specified. It returns an integer type, the number of suc...
[ { "code": null, "e": 53, "s": 25, "text": "\n23 Sep, 2021" }, { "code": null, "e": 213, "s": 53, "text": "C language has standard libraries that allow input and output in a program. The stdio.h or standard input-output library in C has methods for input and output." }, { ...
How to get all unique values (remove duplicates) in a JavaScript array?
23 Apr, 2019 Given an array which contains some values, the task is to remove the duplicate elements from the array. Examples: Input: listArray = ["Manish", "Chandan", "Piyush", "Manish", "Sunil", "Chandan"]; Output: Manish, Chandan, Piyush, Sunil Method 1: This method checked each value of the original array (listArr...
[ { "code": null, "e": 54, "s": 26, "text": "\n23 Apr, 2019" }, { "code": null, "e": 158, "s": 54, "text": "Given an array which contains some values, the task is to remove the duplicate elements from the array." }, { "code": null, "e": 168, "s": 158, "text": "E...
Introducing Threads in Socket Programming in Java
08 Feb, 2018 Prerequisites : Socket Programming in Java This article assumes that you have basic knowledge of socket programming in java and the basic details of client-server model used in communication. Why to use threads in network programming? The reason is simple, we don’t want only a single client to connect to s...
[ { "code": null, "e": 52, "s": 24, "text": "\n08 Feb, 2018" }, { "code": null, "e": 95, "s": 52, "text": "Prerequisites : Socket Programming in Java" }, { "code": null, "e": 244, "s": 95, "text": "This article assumes that you have basic knowledge of socket pro...
Print a Binary Tree in Vertical Order | Set 1
14 Jun, 2022 Given a binary tree, print it vertically. The following example illustrates vertical order traversal. 1 / \ 2 3 / \ / \ 4 5 6 7 \ \ 8 9 The output of print this tree vertically will be: 4 2...
[ { "code": null, "e": 54, "s": 26, "text": "\n14 Jun, 2022" }, { "code": null, "e": 158, "s": 54, "text": "Given a binary tree, print it vertically. The following example illustrates vertical order traversal. " }, { "code": null, "e": 377, "s": 158, "text": " ...
Python program to find the sum of all even and odd digits of an integer list
01 Nov, 2020 The following article shows how given an integer list, we can produce the sum of all its odd and even digits. Input : test_list = [345, 893, 1948, 34, 2346] Output : Odd digit sum : 36 Even digit sum : 40 Explanation : 3 + 5 + 9 + 3 + 1 + 9 + 3 + 3 = 36, odd summation.Input : test_list = [345, 893] Output ...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Nov, 2020" }, { "code": null, "e": 138, "s": 28, "text": "The following article shows how given an integer list, we can produce the sum of all its odd and even digits." }, { "code": null, "e": 419, "s": 138, "text...
How to convert DataFrame column from Character to Numeric in R ?
26 May, 2021 In this article, we will discuss how to convert DataFrame column from Character to Numeric in R Programming Langauge. All dataframe column is associated with a class which is an indicator of the data type to which the elements of that column belong to. Therefore, in order to simulate the data type conversi...
[ { "code": null, "e": 28, "s": 0, "text": "\n26 May, 2021" }, { "code": null, "e": 146, "s": 28, "text": "In this article, we will discuss how to convert DataFrame column from Character to Numeric in R Programming Langauge." }, { "code": null, "e": 504, "s": 146, ...
String with k distinct characters and no same characters adjacent
14 Jun, 2022 Given n and k, print a string that has n characters. The string should have exactly k distinct characters and no adjacent positions.Examples: Input : n = 5, k = 3 Output : abcab Explanation: 3 distinct character a, b, c and n length string. Input: 3 2 Output: aba Explanation: 2 distinct character '...
[ { "code": null, "e": 52, "s": 24, "text": "\n14 Jun, 2022" }, { "code": null, "e": 196, "s": 52, "text": "Given n and k, print a string that has n characters. The string should have exactly k distinct characters and no adjacent positions.Examples: " }, { "code": null, ...
MATLAB - Transpose of a Vector
The transpose operation changes a column vector into a row vector and vice versa. The transpose operation is represented by a single quote ('). Create a script file with the following code − r = [ 1 2 3 4 ]; tr = r'; v = [1;2;3;4]; tv = v'; disp(tr); disp(tv); When you run the file, it displays the following result − ...
[ { "code": null, "e": 2419, "s": 2275, "text": "The transpose operation changes a column vector into a row vector and vice versa. The transpose operation is represented by a single quote (')." }, { "code": null, "e": 2466, "s": 2419, "text": "Create a script file with the followin...
How to sort an Array in descending order using STL in C++?
19 Mar, 2019 Given an array arr[], sort this array in descending order using STL in C++. Example: Input: arr[] = {1, 45, 54, 71, 76, 12} Output: {76, 71, 54, 45, 12, 1} Input: arr[] = {1, 7, 5, 4, 6, 12} Output: {12, 7, 6, 5, 4, 1} Approach: Sorting can be done with the help of sort() function provided in STL. Syntax...
[ { "code": null, "e": 54, "s": 26, "text": "\n19 Mar, 2019" }, { "code": null, "e": 130, "s": 54, "text": "Given an array arr[], sort this array in descending order using STL in C++." }, { "code": null, "e": 139, "s": 130, "text": "Example:" }, { "code"...
C# | Implicitly Typed Local Variables – var
21 Nov, 2019 Implicitly typed variables are those variables which are declared without specifying the .NET type explicitly. In implicitly typed variable, the type of the variable is automatically deduced at compile time by the compiler from the value used to initialize the variable. The implicitly typed variable concep...
[ { "code": null, "e": 53, "s": 25, "text": "\n21 Nov, 2019" }, { "code": null, "e": 568, "s": 53, "text": "Implicitly typed variables are those variables which are declared without specifying the .NET type explicitly. In implicitly typed variable, the type of the variable is autom...
PHP | shuffle() Function
11 Jun, 2021 The shuffle() Function is a builtin function in PHP and is used to shuffle or randomize the order of the elements in an array. This function assigns new keys for the elements in the array. It will also remove any existing keys, rather than just reordering the keys and assigns numeric keys starting from zer...
[ { "code": null, "e": 28, "s": 0, "text": "\n11 Jun, 2021" }, { "code": null, "e": 338, "s": 28, "text": "The shuffle() Function is a builtin function in PHP and is used to shuffle or randomize the order of the elements in an array. This function assigns new keys for the elements ...
Data Binding with LiveData in Android
07 Oct, 2021 Prerequisite: DataBinding LiveData and ViewModel So, Why we are using Data binding with LiveData? Actually, If we want our views to directly communicate with ViewModel (Data source), we can do that simply without using LiveData. But if data changes in ViewModel it won’t reflect its View. This is where we c...
[ { "code": null, "e": 54, "s": 26, "text": "\n07 Oct, 2021" }, { "code": null, "e": 68, "s": 54, "text": "Prerequisite:" }, { "code": null, "e": 80, "s": 68, "text": "DataBinding" }, { "code": null, "e": 103, "s": 80, "text": "LiveData and V...
What is the use of the @ symbol in PHP?
17 Oct, 2018 The at sign (@) is used as error control operator in PHP. When an expression is prepended with the @ sign, error messages that might be generated by that expression will be ignored. If the track_errors feature is enabled, an error message generated by the expression and it will be saved in the variable $ph...
[ { "code": null, "e": 52, "s": 24, "text": "\n17 Oct, 2018" }, { "code": null, "e": 420, "s": 52, "text": "The at sign (@) is used as error control operator in PHP. When an expression is prepended with the @ sign, error messages that might be generated by that expression will be i...
Runtime Environments in Compiler Design - GeeksforGeeks
21 Nov, 2019 A translation needs to relate the static source text of a program to the dynamic actions that must occur at runtime to implement the program. The program consists of names for procedures, identifiers etc., that require mapping with the actual memory location at runtime. Runtime environment is a state of th...
[ { "code": null, "e": 25164, "s": 25136, "text": "\n21 Nov, 2019" }, { "code": null, "e": 25435, "s": 25164, "text": "A translation needs to relate the static source text of a program to the dynamic actions that must occur at runtime to implement the program. The program consists ...
Program to count number of paths with cost k from start to end point in Python
Suppose we have a 2d binary matrix and another value k. Now starting from the top-left cell, we have to go to the bottom right cell. In one step, we can only go down, or right. Now the score of a path is the sum of the values on the cells on the path. We have to find the number of paths from the start cell to end cell ...
[ { "code": null, "e": 1459, "s": 1062, "text": "Suppose we have a 2d binary matrix and another value k. Now starting from the top-left cell, we have to go to the bottom right cell. In one step, we can only go down, or right. Now the score of a path is the sum of the values on the cells on the path. W...
Theano in Python - GeeksforGeeks
07 Sep, 2021 Theano is a Python library that allows us to evaluate mathematical operations including multi-dimensional arrays so efficiently. It is mostly used in building Deep Learning Projects. It works a way more faster on Graphics Processing Unit (GPU) rather than on CPU. Theano attains high speeds that gives a tou...
[ { "code": null, "e": 23927, "s": 23899, "text": "\n07 Sep, 2021" }, { "code": null, "e": 24777, "s": 23927, "text": "Theano is a Python library that allows us to evaluate mathematical operations including multi-dimensional arrays so efficiently. It is mostly used in building Deep...
Linear Search in Python Program
In this article, we will learn about the Linear Search and its implementation in Python 3.x. Or earlier. Start from the leftmost element of given arr[] and one by one compare element x with each element of arr[] Start from the leftmost element of given arr[] and one by one compare element x with each element of arr[] I...
[ { "code": null, "e": 1167, "s": 1062, "text": "In this article, we will learn about the Linear Search and its implementation in Python 3.x. Or earlier." }, { "code": null, "e": 1274, "s": 1167, "text": "Start from the leftmost element of given arr[] and one by one compare element...
A Complete Guide to Hypothesis Testing | by Christina | Towards Data Science
Hypothesis testing is a method of statistical inference that considers the null hypothesis H0 vs. the alternative hypothesis Ha, where we are typically looking to assess evidence against H0. Such a test is used to compare data sets against one another, or compare a data set against some external standard. The former be...
[ { "code": null, "e": 919, "s": 172, "text": "Hypothesis testing is a method of statistical inference that considers the null hypothesis H0 vs. the alternative hypothesis Ha, where we are typically looking to assess evidence against H0. Such a test is used to compare data sets against one another, or...