title
stringlengths
3
221
text
stringlengths
17
477k
parsed
listlengths
0
3.17k
Programming 8051 using Keil Software
In this section we will see how to write and execute programs for 8051 microcontroller using the Keil Software. Here is the download link of Keil. You can download it and install it very easily. We are using C51 version for 8051 devices. https://www.keil.com/download/product/ Start the Keil software. Go to the Project ...
[ { "code": null, "e": 1174, "s": 1062, "text": "In this section we will see how to write and execute programs for 8051 microcontroller using the Keil Software." }, { "code": null, "e": 1300, "s": 1174, "text": "Here is the download link of Keil. You can download it and install it ...
shuffle vs random_shuffle in C++ - GeeksforGeeks
09 Oct, 2019 random_shuffle It randomly rearrange elements in range [first, last).The function swaps the value of each element with some other randomly picked element. When provided, the function gen determines which element is picked in every case. Otherwise, the function uses some unspecified source of randomness. //...
[ { "code": null, "e": 24652, "s": 24624, "text": "\n09 Oct, 2019" }, { "code": null, "e": 24667, "s": 24652, "text": "random_shuffle" }, { "code": null, "e": 24957, "s": 24667, "text": "It randomly rearrange elements in range [first, last).The function swaps th...
Tryit Editor v3.7
Tryit: Different border color for each side
[]
Program to rotate square matrix by 90 degrees counterclockwise in Python
Suppose we have a square matrix, we have to rotate it 90 degrees counter-clockwise. then the output will be To solve this, we will follow these steps − if matrix is empty, thenreturn a blank list if matrix is empty, then return a blank list return a blank list n := row count of matrix n := row count of matrix for each ...
[ { "code": null, "e": 1146, "s": 1062, "text": "Suppose we have a square matrix, we have to rotate it 90 degrees counter-clockwise." }, { "code": null, "e": 1170, "s": 1146, "text": "then the output will be" }, { "code": null, "e": 1214, "s": 1170, "text": "To ...
What is the scope of local variables in Java?
Scope of a variable denotes span of a variable. The scope of a local variable is within that method i.e. when we create a variable with in a method, it cannot be accessed outside that method. If you observe the following example here, we have created a variable named num in the main method and, trying to access it in a...
[ { "code": null, "e": 1110, "s": 1062, "text": "Scope of a variable denotes span of a variable." }, { "code": null, "e": 1254, "s": 1110, "text": "The scope of a local variable is within that method i.e. when we create a variable with in a method, it cannot be accessed outside tha...
Integrating Trino and Apache Ranger | by Aakash Nand | Towards Data Science
As demand for data grows day by day, the requirement for data security in an enterprise setup is increasing as well. In the Hadoop ecosystem, Apache Ranger has been a promising framework for data security with extensive plugins such as HDFS, Solr, Yarn, Kafka, Hive and many more. Apache Ranger added a plugin for presto...
[ { "code": null, "e": 622, "s": 172, "text": "As demand for data grows day by day, the requirement for data security in an enterprise setup is increasing as well. In the Hadoop ecosystem, Apache Ranger has been a promising framework for data security with extensive plugins such as HDFS, Solr, Yarn, K...
How to find an average color of an image using JavaScript ? - GeeksforGeeks
14 Feb, 2022 The average color of an image can be found with JavaScript by drawing the image on a canvas element. The following steps have to be performed to get the average color of an image: 1. The image is first drawn on the canvas using the method context.drawImage() of the Canvas 2D API. This method takes in the i...
[ { "code": null, "e": 25376, "s": 25348, "text": "\n14 Feb, 2022" }, { "code": null, "e": 25556, "s": 25376, "text": "The average color of an image can be found with JavaScript by drawing the image on a canvas element. The following steps have to be performed to get the average co...
Difference between String and StringBuilder in C#
String is immutable in C# that would mean you couldn’t modify it after it is created. It creates a new object of string type in memory if you will perform any operation. string str1 = "Welcome!"; // creates a new string instance str1 += "Hello"; str1 += "World”; StringBuilder is mutable in C#. This means that if an op...
[ { "code": null, "e": 1232, "s": 1062, "text": "String is immutable in C# that would mean you couldn’t modify it after it is created. It creates a new object of string type in memory if you will perform any operation." }, { "code": null, "e": 1326, "s": 1232, "text": "string str1 ...
Create a Profit and Loss Calculator using JavaScript - GeeksforGeeks
10 Oct, 2021 In this article, we will create a profit & loss calculator using HTML, CSS & Javascript for adding the basic functionality along with adding the design and layout. Profit and Loss Calculator is basically used to calculate the amount or percentage received after selling a particular price or goods. If the a...
[ { "code": null, "e": 24985, "s": 24957, "text": "\n10 Oct, 2021" }, { "code": null, "e": 25478, "s": 24985, "text": "In this article, we will create a profit & loss calculator using HTML, CSS & Javascript for adding the basic functionality along with adding the design and layout....
Find product of prime numbers between 1 to n in C++
Suppose we have a number n. We have to find the product of prime numbers between 1 to n. So if n = 7, then output will be 210, as 2 * 3 * 5 * 7 = 210. We will use the Sieve of Eratosthenes method to find all primes. Then calculate the product of them. Live Demo #include<iostream> using namespace std; long PrimeProds(i...
[ { "code": null, "e": 1213, "s": 1062, "text": "Suppose we have a number n. We have to find the product of prime numbers between 1 to n. So if n = 7, then output will be 210, as 2 * 3 * 5 * 7 = 210." }, { "code": null, "e": 1314, "s": 1213, "text": "We will use the Sieve of Eratos...
How to code a simple neural network in PyTorch? — for absolute beginners | by Harshanand B A | Towards Data Science
In this tutorial, we will see how to build a simple neural network for a classification problem using the PyTorch framework. This would help us to get a command over the fundamentals and framework’s basic syntaxes. For the same, we would be using Kaggle’s Titanic Dataset. ## For Windowspip install torch===1.5.0 torchvi...
[ { "code": null, "e": 320, "s": 47, "text": "In this tutorial, we will see how to build a simple neural network for a classification problem using the PyTorch framework. This would help us to get a command over the fundamentals and framework’s basic syntaxes. For the same, we would be using Kaggle’s ...
C Program To Check Whether Two Strings Are Anagram Of Each Other - GeeksforGeeks
20 Dec, 2021 Write a function to check whether two given strings are anagram of each other or not. An anagram of a string is another string that contains the same characters, only the order of characters can be different. For example, “abcd” and “dabc” are an anagram of each other. Method (Count characters): This metho...
[ { "code": null, "e": 24930, "s": 24902, "text": "\n20 Dec, 2021" }, { "code": null, "e": 25200, "s": 24930, "text": "Write a function to check whether two given strings are anagram of each other or not. An anagram of a string is another string that contains the same characters, o...
How to convert Integer array list to integer array in Java?
To convert integer array list to integer array is not a tedious task. First, create an integer array list and add some elements to it − ArrayList < Integer > arrList = new ArrayList < Integer > (); arrList.add(100); arrList.add(200); arrList.add(300); arrList.add(400); arrList.add(500); Now, assign each value of the in...
[ { "code": null, "e": 1198, "s": 1062, "text": "To convert integer array list to integer array is not a tedious task. First, create an integer array list and add some elements to it −" }, { "code": null, "e": 1350, "s": 1198, "text": "ArrayList < Integer > arrList = new ArrayList ...
JSP - Interview Questions
Dear readers, these JSP Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of JSP. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start wi...
[ { "code": null, "e": 2670, "s": 2239, "text": "Dear readers, these JSP Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of JSP. As per my experience good interviewers hardly plan to ask any par...
AlgorithmParameterGenerator init() method in Java with Examples - GeeksforGeeks
01 Jul, 2021 The init() method of java.security.AlgorithmParameterGenerator class is used to initialize AlgorithmParameterGenerator for particular size to use further. Syntax: public final void init(int size) Parameters: This method takes size of int type as a parameter.Return Value: This method returns nothing.Below...
[ { "code": null, "e": 23557, "s": 23529, "text": "\n01 Jul, 2021" }, { "code": null, "e": 23722, "s": 23557, "text": "The init() method of java.security.AlgorithmParameterGenerator class is used to initialize AlgorithmParameterGenerator for particular size to use further. Syntax: ...
This article gains insights into Catboost, a simple and lesser-known way to use embeddings with gradient boosted models. | Towards Data Science
When working with a large amount of data, it becomes necessary to compress the space with features into vectors. An example is text embeddings, which are an integral part of almost any NLP model creation process. Unfortunately, it is far from always possible to use neural networks to work with this type of data — the r...
[ { "code": null, "e": 552, "s": 172, "text": "When working with a large amount of data, it becomes necessary to compress the space with features into vectors. An example is text embeddings, which are an integral part of almost any NLP model creation process. Unfortunately, it is far from always possi...
Pandas - Cleaning Data
Data cleaning means fixing bad data in your data set. Bad data could be: Empty cells Data in wrong format Wrong data Duplicates In this tutorial you will learn how to deal with all of them. In the next chapters we will use this data set: Duration Date Pulse Maxpulse Calories 0 60 '2020/12...
[ { "code": null, "e": 54, "s": 0, "text": "Data cleaning means fixing bad data in your data set." }, { "code": null, "e": 74, "s": 54, "text": "Bad data could be: " }, { "code": null, "e": 86, "s": 74, "text": "Empty cells" }, { "code": null, "e": 1...
Android - Activities
If you have worked with C, C++ or Java programming language then you must have seen that your program starts from main() function. Very similar way, Android system initiates its program with in an Activity starting with a call on onCreate() callback method. There is a sequence of callback methods that start up an activ...
[ { "code": null, "e": 4077, "s": 3607, "text": "If you have worked with C, C++ or Java programming language then you must have seen that your program starts from main() function. Very similar way, Android system initiates its program with in an Activity starting with a call on onCreate() callback met...
Underscore.JS - Quick Guide
Underscore.JS is a popular javascript based library which provides 100+ functions to facilitate web development. It provides helper functions like map, filter, invoke as well as function binding, javascript templating, deep equality checks, creating indexes and so on. Underscore.JS can be used directly inside a browser...
[ { "code": null, "e": 2336, "s": 1992, "text": "Underscore.JS is a popular javascript based library which provides 100+ functions to facilitate web development. It provides helper functions like map, filter, invoke as well as function binding, javascript templating, deep equality checks, creating ind...
ExpressJS - Environment
In this chapter, we will learn how to start developing and using the Express Framework. To start with, you should have the Node and the npm (node package manager) installed. If you don’t already have these, go to the Node setup to install node on your local system. Confirm that node and npm are installed by running the...
[ { "code": null, "e": 2419, "s": 2061, "text": "In this chapter, we will learn how to start developing and using the Express Framework. To start with, you should have the Node and the npm (node package manager) installed. If you don’t already have these, go to the Node setup to install node on your l...
Jackson Annotations - @JsonSerialize
@JsonSerialize is used to specify custom serializer to marshall the json object. import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.ObjectMapper; import com.f...
[ { "code": null, "e": 2556, "s": 2475, "text": "@JsonSerialize is used to specify custom serializer to marshall the json object." }, { "code": null, "e": 4529, "s": 2556, "text": "import java.io.IOException; \nimport java.text.ParseException; \nimport java.text.SimpleDateFormat; \...
How to add a YouTube Video to your Website?
To add a YouTube Video to your website, you need to embed it. To embed a video in an HTML page, use the <iframe> element. The source attribute included the video URL. For the dimensions of the video player, set the width and height of the video appropriately. The Video URL is the video embed link. The video we will be ...
[ { "code": null, "e": 1322, "s": 1062, "text": "To add a YouTube Video to your website, you need to embed it. To embed a video in an HTML page, use the <iframe> element. The source attribute included the video URL. For the dimensions of the video player, set the width and height of the video appropri...
Groovy - sort()
Returns a sorted copy of the original List. List sort() None The sorted list. Following is an example of the usage of this method − class Example { static void main(String[] args) { def lst = [13, 12, 15, 14]; def newlst = lst.sort(); println(newlst); } } When we run the above program, we w...
[ { "code": null, "e": 2282, "s": 2238, "text": "Returns a sorted copy of the original List." }, { "code": null, "e": 2295, "s": 2282, "text": "List sort()\n" }, { "code": null, "e": 2300, "s": 2295, "text": "None" }, { "code": null, "e": 2317, "...
Unix filename pattern matching in Python
Here we will see how we can get the UNIX shell style pattern matching techniques using Python. There is a module called fnmatch, which is used to do the work. This module is used to compare file name against a pattern, then returns True or False according to the matches. To use it at first we need to import it the fnma...
[ { "code": null, "e": 1334, "s": 1062, "text": "Here we will see how we can get the UNIX shell style pattern matching techniques using Python. There is a module called fnmatch, which is used to do the work. This module is used to compare file name against a pattern, then returns True or False accordi...
Basic Operators in Shell Scripting
Shell is an interface using which the programmer can execute command and interact directly to the operating system. Shell scripting is giving commands that a shell can execute. In shell also there are variables and operators that are used to manipulate these variables. There are 5 basic operators in shell scripting. Ar...
[ { "code": null, "e": 1239, "s": 1062, "text": "Shell is an interface using which the programmer can execute command and interact directly to the operating system. Shell scripting is giving commands that a shell can execute." }, { "code": null, "e": 1380, "s": 1239, "text": "In sh...
Thread Synchronization in C#
Synchronize access to resources in multithreaded applications using Synchronization. A mutex can be used to synchronize threads across processes. Use it to prevent the simultaneous execution of a block of code by more than one thread at a time. C# lock statement is used to ensure that a block of code runs without inter...
[ { "code": null, "e": 1147, "s": 1062, "text": "Synchronize access to resources in multithreaded applications using Synchronization." }, { "code": null, "e": 1307, "s": 1147, "text": "A mutex can be used to synchronize threads across processes. Use it to prevent the simultaneous e...
Java Program to Print matrix in snake pattern - GeeksforGeeks
11 Jan, 2022 Given an n x n matrix .In the given matrix, you have to print the elements of the matrix in the snake pattern. Examples : Input :mat[][] = { {10, 20, 30, 40}, {15, 25, 35, 45}, {27, 29, 37, 48}, {32, 33, 39, 50}}; Output : 10 20 30 40...
[ { "code": null, "e": 23946, "s": 23918, "text": "\n11 Jan, 2022" }, { "code": null, "e": 24057, "s": 23946, "text": "Given an n x n matrix .In the given matrix, you have to print the elements of the matrix in the snake pattern." }, { "code": null, "e": 24069, "s":...
Subarrays with equal 1s and 0s | Practice | GeeksforGeeks
Given an array containing 0s and 1s. Find the number of subarrays having equal number of 0s and 1s. Example 1: Input: n = 7 A[] = {1,0,0,1,0,1,1} Output: 8 Explanation: The index range for the 8 sub-arrays are: (0, 1), (2, 3), (0, 3), (3, 4), (4, 5) ,(2, 5), (0, 5), (1, 6) Example 2: Input: n = 5 A[] = {1,1,1,1,0} O...
[ { "code": null, "e": 339, "s": 238, "text": "Given an array containing 0s and 1s. Find the number of subarrays having equal number of 0s and 1s. " }, { "code": null, "e": 350, "s": 339, "text": "Example 1:" }, { "code": null, "e": 515, "s": 350, "text": "Input...
Python - Geographical Data
Many open source python libraries now have been created to represent the geographical maps. They are highly customizable and offer a varierty of maps depicting areas in different shapes and colours. One such package is Cartopy. You can download and install this package in your local environment from Cartopy. You can fi...
[ { "code": null, "e": 2886, "s": 2529, "text": "Many open source python libraries now have been created to represent the geographical maps. They are highly customizable and offer a varierty of maps depicting areas in different shapes and colours.\nOne such package is Cartopy. You can download and ins...
Neural Network to play a snake game | by Slava Korolev | Towards Data Science
Today I’m going to talk about a small practical example of using neural networks — training one to play a snake game. This article is for beginners, so if you are good at machine learning you will not find something interesting for you. It would be great if you know something about machine learning, neural networks, an...
[ { "code": null, "e": 290, "s": 172, "text": "Today I’m going to talk about a small practical example of using neural networks — training one to play a snake game." }, { "code": null, "e": 540, "s": 290, "text": "This article is for beginners, so if you are good at machine learnin...
PHP - GET & POST Methods
There are two ways the browser client can send information to the web server. The GET Method The POST Method Before the browser sends the information, it encodes it using a scheme called URL encoding. In this scheme, name/value pairs are joined with equal signs and different pairs are separated by the ampersand. name1=...
[ { "code": null, "e": 2835, "s": 2757, "text": "There are two ways the browser client can send information to the web server." }, { "code": null, "e": 2850, "s": 2835, "text": "The GET Method" }, { "code": null, "e": 2866, "s": 2850, "text": "The POST Method" ...
Difference Between map() And flatMap() In Java Stream - GeeksforGeeks
03 Mar, 2021 In Java, the Stream interface has a map() and flatmap() methods and both have intermediate stream operation and return another stream as method output. Both of the functions map() and flatMap are used for transformation and mapping operations. map() function produces one output for one input value, whereas...
[ { "code": null, "e": 24422, "s": 24394, "text": "\n03 Mar, 2021" }, { "code": null, "e": 24844, "s": 24422, "text": "In Java, the Stream interface has a map() and flatmap() methods and both have intermediate stream operation and return another stream as method output. Both of the...
How to use the Magnific Popup jQuery plugin? - GeeksforGeeks
14 Jul, 2020 Magnific Popup is a fast, light, mobile-friendly and responsive lightbox and modal dialog jQuery plugin. It can be used to open inline HTML, ajax loaded content, image, form, iframe (YouTube video, Vimeo, Google Maps), and photo gallery. It has added animation effects using CSS3 transitions. Installation P...
[ { "code": null, "e": 24521, "s": 24493, "text": "\n14 Jul, 2020" }, { "code": null, "e": 24814, "s": 24521, "text": "Magnific Popup is a fast, light, mobile-friendly and responsive lightbox and modal dialog jQuery plugin. It can be used to open inline HTML, ajax loaded content, i...
How to remove li elements on button click in JavaScript?
Let’s say the following is our Unordered List (ul) − <ul> <li class="subjectName">JavaScript <button>Remove</button></li> <br> <li class="subjectName">MySQL <button>Remove</button></li> <br> <li class="subjectName">MongoDB <button>Remove</button></li> <br> <li class="subjectName">Java <button>Remov...
[ { "code": null, "e": 1115, "s": 1062, "text": "Let’s say the following is our Unordered List (ul) −" }, { "code": null, "e": 1404, "s": 1115, "text": "<ul>\n <li class=\"subjectName\">JavaScript <button>Remove</button></li>\n <br>\n <li class=\"subjectName\">MySQL <button>R...
AVL Tree | Set 2 (Deletion) - GeeksforGeeks
11 Apr, 2022 We have discussed AVL insertion in the previous post. In this post, we will follow a similar approach for deletion. Steps to follow for deletion. To make sure that the given tree remains AVL after every deletion, we must augment the standard BST delete operation to perform some re-balancing. Following are ...
[ { "code": null, "e": 24788, "s": 24760, "text": "\n11 Apr, 2022" }, { "code": null, "e": 24904, "s": 24788, "text": "We have discussed AVL insertion in the previous post. In this post, we will follow a similar approach for deletion." }, { "code": null, "e": 25269, ...
What are immediate functions in JavaScript?
The immediate function executes as soon as it is defined. To understand the role of immediate function, let’s see the difference between a function and an immediate function − Here’s immediate function − (function() { var str = "display"; }()); function display() { // this returns undefined alert(str); } Here’...
[ { "code": null, "e": 1238, "s": 1062, "text": "The immediate function executes as soon as it is defined. To understand the role of immediate function, let’s see the difference between a function and an immediate function −" }, { "code": null, "e": 1266, "s": 1238, "text": "Here’s...
JQuery deferred.resolve() method - GeeksforGeeks
14 Jul, 2020 This deferred.resolve() method in JQuery is used to resolve a Deferred object and call any doneCallbacks with the given arguments.Syntax: deferred.resolve([args]) Parameters: args: This is optional parameters and is arguments which are passed to the doneCallbacks. Return Value: This method returns the def...
[ { "code": null, "e": 25364, "s": 25336, "text": "\n14 Jul, 2020" }, { "code": null, "e": 25502, "s": 25364, "text": "This deferred.resolve() method in JQuery is used to resolve a Deferred object and call any doneCallbacks with the given arguments.Syntax:" }, { "code": nul...
log4j - Logging in Database
The log4j API provides the org.apache.log4j.jdbc.JDBCAppender object, which can put logging information in a specified database. Before you start using JDBC based logging, you should create a table to maintain all the log information. Following is the SQL Statement for creating the LOGS table − CREATE TABLE LOGS (US...
[ { "code": null, "e": 2089, "s": 1960, "text": "The log4j API provides the org.apache.log4j.jdbc.JDBCAppender object, which can put logging information in a specified database." }, { "code": null, "e": 2256, "s": 2089, "text": "Before you start using JDBC based logging, you should...
Design a Webpage like Technical Documentation using HTML & CSS
12 Apr, 2021 Introduction – Technical documentation is any document that explains the features of the respective product. In this project, we are going to create a technical documentation of C++ using HTML and CSS. The webpage has a menu sections that helps to navigate to different sections of the webpage. Approach – W...
[ { "code": null, "e": 28, "s": 0, "text": "\n12 Apr, 2021" }, { "code": null, "e": 323, "s": 28, "text": "Introduction – Technical documentation is any document that explains the features of the respective product. In this project, we are going to create a technical documentation ...
Spring - Injecting Inner Beans
As you know Java inner classes are defined within the scope of other classes, similarly, inner beans are beans that are defined within the scope of another bean. Thus, a <bean/> element inside the <property/> or <constructor-arg/> elements is called inner bean and it is shown below. <?xml version = "1.0" encoding = "UT...
[ { "code": null, "e": 2710, "s": 2426, "text": "As you know Java inner classes are defined within the scope of other classes, similarly, inner beans are beans that are defined within the scope of another bean. Thus, a <bean/> element inside the <property/> or <constructor-arg/> elements is called inn...
D3.js brush.move() Function
24 Aug, 2020 The brush.move() Function in D3.js is used to set the active selection of the brush on the specified group. Syntax: brush.move(group, selection); Parameters: This function accepts a single parameter as mentioned above and described below group: This parameter is the specified group on which brush is implem...
[ { "code": null, "e": 28, "s": 0, "text": "\n24 Aug, 2020" }, { "code": null, "e": 136, "s": 28, "text": "The brush.move() Function in D3.js is used to set the active selection of the brush on the specified group." }, { "code": null, "e": 144, "s": 136, "text":...
Program for Fahrenheit to Celsius conversion in C
Given with temperature ‘n’ in Fahrenheit and the challenge is to convert the given temperature to Celsius and display it. Input 1-: 132.00 Output -: after converting fahrenheit 132.00 to celsius 55.56 Input 2-: 456.10 Output -: after converting fahrenheit 456.10 to celsius 235.61 For converting the temperature from Fah...
[ { "code": null, "e": 1309, "s": 1187, "text": "Given with temperature ‘n’ in Fahrenheit and the challenge is to convert the given temperature to Celsius and display it." }, { "code": null, "e": 1468, "s": 1309, "text": "Input 1-: 132.00\nOutput -: after converting fahrenheit 132....
Python | Pandas Series.nunique()
17 Sep, 2018 Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages, and makes importing and analyzing data much easier. While analyzing the data, many times the user wants to see the unique values in a particular...
[ { "code": null, "e": 28, "s": 0, "text": "\n17 Sep, 2018" }, { "code": null, "e": 243, "s": 28, "text": "Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages, and makes im...
Python MongoDB – Query
01 Apr, 2022 MongoDB is a cross-platform document-oriented and a non relational (i.e NoSQL) database program. It is an open-source document database, that stores the data in the form of key-value pairs. MongoDB query is used to specify the selection filter using query operators while retrieving the data from the collec...
[ { "code": null, "e": 28, "s": 0, "text": "\n01 Apr, 2022" }, { "code": null, "e": 218, "s": 28, "text": "MongoDB is a cross-platform document-oriented and a non relational (i.e NoSQL) database program. It is an open-source document database, that stores the data in the form of ke...
Python - Extract Key's Value, if Key Present in List and Dictionary - GeeksforGeeks
30 Aug, 2020 Given a list, dictionary and a Key K, print value of K from dictionary if key present in both, list and dictionary. Input : test_list = [“Gfg”, “is”, “Good”, “for”, “Geeks”], test_dict = {“Gfg” : 5, “Best” : 6}, K = “Gfg”Output : 5Explanation : “Gfg” is present in list and has value 5 in dictionary. Input ...
[ { "code": null, "e": 24087, "s": 24059, "text": "\n30 Aug, 2020" }, { "code": null, "e": 24203, "s": 24087, "text": "Given a list, dictionary and a Key K, print value of K from dictionary if key present in both, list and dictionary." }, { "code": null, "e": 24388, ...
When to use virtual destructors in C++?
Scott Meyers in Effective C++ says − If a class has any virtual function, it should have a virtual destructor, and that classes not designed to be base classes or not designed to be used polymorphically should not declare virtual destructors. So you should declare destructors virtual in polymorphic base classes. This i...
[ { "code": null, "e": 1099, "s": 1062, "text": "Scott Meyers in Effective C++ says −" }, { "code": null, "e": 1305, "s": 1099, "text": "If a class has any virtual function, it should have a virtual destructor, and that classes not designed to be base classes or not designed to be ...
How does Python work?. A simple explanation of how Python code... | by Dhruvil Karani | Towards Data Science
As a Machine Learning Engineer, I have been using Python for more than a year. Recently, I have also started learning C++, for fun. It made me realize how easy and intuitive Python is. I got more curious about how Python is different from other languages and its working. In this blog, I try to scratch Python’s inner wo...
[ { "code": null, "e": 498, "s": 171, "text": "As a Machine Learning Engineer, I have been using Python for more than a year. Recently, I have also started learning C++, for fun. It made me realize how easy and intuitive Python is. I got more curious about how Python is different from other languages ...
Estimating the value of Pi using Monte Carlo - GeeksforGeeks
24 Nov, 2021 Monte Carlo estimation Monte Carlo methods are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results. One of the basic examples of getting started with the Monte Carlo algorithm is the estimation of Pi. Estimation of Pi The idea is to simulate random (x...
[ { "code": null, "e": 24423, "s": 24395, "text": "\n24 Nov, 2021" }, { "code": null, "e": 25025, "s": 24423, "text": "Monte Carlo estimation Monte Carlo methods are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results. One of ...
Find N distinct numbers whose bitwise Or is equal to K in Python
Suppose we have two integers N and K; we have to find N unique values whose bit-wise OR is same as K. If there is no such result, then return -1 So, if the input is like N = 4 and K = 6, then the output will be [6,0,1,2]. To solve this, we will follow these steps − MAX := 32 MAX := 32 visited := a list of size MAX and ...
[ { "code": null, "e": 1207, "s": 1062, "text": "Suppose we have two integers N and K; we have to find N unique values whose bit-wise OR is same as K. If there is no such result, then return -1" }, { "code": null, "e": 1284, "s": 1207, "text": "So, if the input is like N = 4 and K ...
concat(), replace(), and trim() Strings in Java.
The concat() method of the String class appends one String to the end of another. The method returns a String with the value of the String passed into the method, appended to the end of the String, used to invoke this method. public class Test { public static void main(String args[]) { String s = "Strings are ...
[ { "code": null, "e": 1288, "s": 1062, "text": "The concat() method of the String class appends one String to the end of another. The method returns a String with the value of the String passed into the method, appended to the end of the String, used to invoke this method." }, { "code": null,...
Special Binary String in C++
Suppose we have a spatial binary string. This string has following few properties − There are same number of 0s and 1s There are same number of 0s and 1s Every Prefix in the binary string has at least as many 1s as 0s Every Prefix in the binary string has at least as many 1s as 0s Now suppose we have special string S, ...
[ { "code": null, "e": 1146, "s": 1062, "text": "Suppose we have a spatial binary string. This string has following few properties −" }, { "code": null, "e": 1181, "s": 1146, "text": "There are same number of 0s and 1s" }, { "code": null, "e": 1216, "s": 1181, "...
Essential Math for Data Science: Basis and Change of Basis | by Hadrien Jean | Towards Data Science
In this article, you’ll learn about the concept of basis, which is an interesting way to understand matrix factorization methods like eigendecomposition or singular value decomposition (SVD). The basis is a coordinate system used to describe vector spaces (sets of vectors). It is a reference that you use to associate n...
[ { "code": null, "e": 363, "s": 171, "text": "In this article, you’ll learn about the concept of basis, which is an interesting way to understand matrix factorization methods like eigendecomposition or singular value decomposition (SVD)." }, { "code": null, "e": 522, "s": 363, "te...
CSS | rotateZ() Function - GeeksforGeeks
20 Aug, 2019 The rotateZ() function is an inbuilt function which is used to rotate an element around the z-axis. Syntax: rotateZ( angle ) Parameters: This function accepts single parameter angle which represents the angle of rotations. The positive and negative angles rotate the elements in clockwise and counter-clockw...
[ { "code": null, "e": 24985, "s": 24957, "text": "\n20 Aug, 2019" }, { "code": null, "e": 25085, "s": 24985, "text": "The rotateZ() function is an inbuilt function which is used to rotate an element around the z-axis." }, { "code": null, "e": 25093, "s": 25085, ...
C++ function call by value
The call by value method of passing arguments to a function copies the actual value of an argument into the formal parameter of the function. In this case, changes made to the parameter inside the function have no effect on the argument. By default, C++ uses call by value to pass arguments. In general, this means that ...
[ { "code": null, "e": 2556, "s": 2318, "text": "The call by value method of passing arguments to a function copies the actual value of an argument into the formal parameter of the function. In this case, changes made to the parameter inside the function have no effect on the argument." }, { "...
Java Generics - Set
Java has provided generic support in Set interface. Set<T> set = new HashSet<T>(); Where set − object of Set Interface. set − object of Set Interface. T − The generic type parameter passed during set declaration. T − The generic type parameter passed during set declaration. The T is a type parameter passed to the gene...
[ { "code": null, "e": 2692, "s": 2640, "text": "Java has provided generic support in Set interface." }, { "code": null, "e": 2724, "s": 2692, "text": "Set<T> set = new HashSet<T>();\n" }, { "code": null, "e": 2730, "s": 2724, "text": "Where" }, { "code"...
Python | TextBlob.sentiment() method - GeeksforGeeks
09 Sep, 2019 With the help of TextBlob.sentiment() method, we can get the sentiments of the sentences by using TextBlob.sentiment() method. Syntax : TextBlob.sentiment()Return : Return the tuple of sentiments. Example #1 :In this example we can say that by using TextBlob.sentiment() method, we are able to get the senti...
[ { "code": null, "e": 23901, "s": 23873, "text": "\n09 Sep, 2019" }, { "code": null, "e": 24028, "s": 23901, "text": "With the help of TextBlob.sentiment() method, we can get the sentiments of the sentences by using TextBlob.sentiment() method." }, { "code": null, "e":...
How is a file read using a limited buffer size using Python?
You can read a file using a limited buffer by specifying the buffer size in the read function. It takes the number of bytes you want to read from the current position of the pointer in the file. with open('my_file.txt', 'r') as f: print(f.read(10)) # Read and print 10 bytes This will give the output − Hello worl ...
[ { "code": null, "e": 1258, "s": 1062, "text": "You can read a file using a limited buffer by specifying the buffer size in the read function. It takes the number of bytes you want to read from the current position of the pointer in the file. " }, { "code": null, "e": 1343, "s": 1258,...
How to create Guid value in C#?
A Globally Unique Identifier or GUID represents a gigantic identification number — a number so large that it is mathematically guaranteed to be unique not only in a single system like a database, but across multiple systems or distributed applications. The total number of unique keys (3.40282366×1038) is so large that ...
[ { "code": null, "e": 1315, "s": 1062, "text": "A Globally Unique Identifier or GUID represents a gigantic identification number — a number so large that it is mathematically guaranteed to be unique not only in a single system like a database, but across multiple systems or distributed applications."...
How to create an unordered_map of user defined class in C++? - GeeksforGeeks
22 Nov, 2021 unordered_map is used to implement hash tables. It stores key value pairs. For every key, a hash function is computed and value is stored at that hash entry. Hash functions for standard data types (int, char, string, ..) are predefined. How to use our own data types for implementing hash tables?unordered_m...
[ { "code": null, "e": 24516, "s": 24488, "text": "\n22 Nov, 2021" }, { "code": null, "e": 24901, "s": 24516, "text": "unordered_map is used to implement hash tables. It stores key value pairs. For every key, a hash function is computed and value is stored at that hash entry. Hash ...
Fine-tuning pre-trained transformer models for sentence entailment | by Dhruv Verma | Towards Data Science
In this article, I will be describing the process of fine-tuning pre-trained models such as BERT and ALBERT on the task of sentence entailment using the MultiNLI dataset (Bowman et al. A Broad-Coverage Challenge Corpus for Sentence Understanding through Inference). The models will be loaded using the Hugging Face libra...
[ { "code": null, "e": 529, "s": 172, "text": "In this article, I will be describing the process of fine-tuning pre-trained models such as BERT and ALBERT on the task of sentence entailment using the MultiNLI dataset (Bowman et al. A Broad-Coverage Challenge Corpus for Sentence Understanding through I...
How to write retry logic in C#?
Retry logic is implemented whenever there is a failing operation. Implement retry logic only where the full context of a failing operation. It's important to log all connectivity failures that cause a retry so that underlying problems with the application, services, or resources can be identified. class Program{ pub...
[ { "code": null, "e": 1202, "s": 1062, "text": "Retry logic is implemented whenever there is a failing operation. Implement retry\nlogic only where the full context of a failing operation." }, { "code": null, "e": 1361, "s": 1202, "text": "It's important to log all connectivity fa...
How to check if a variable is NaN in JavaScript?
NaN is a JavaScript property, which is "Not-a-Number" value. To find out whether value is NaN, use the Number.isNaN() or isNan() method. Here’s an example to check if a variable in NaN in JavaScript Live Demo <!DOCTYPE html> <html> <body> <button onclick="display()">Check</button> <p id="test"></p> ...
[ { "code": null, "e": 1199, "s": 1062, "text": "NaN is a JavaScript property, which is \"Not-a-Number\" value. To find out whether value is NaN, use the Number.isNaN() or isNan() method." }, { "code": null, "e": 1261, "s": 1199, "text": "Here’s an example to check if a variable in...
Laravel - Artisan Console
Laravel framework provides three primary tools for interaction through command-line namely: Artisan, Ticker and REPL. This chapter explains about Artisan in detail. Artisan is the command line interface frequently used in Laravel and it includes a set of helpful commands for developing a web application. Here is a list...
[ { "code": null, "e": 2637, "s": 2472, "text": "Laravel framework provides three primary tools for interaction through command-line namely: Artisan, Ticker and REPL. This chapter explains about Artisan in detail." }, { "code": null, "e": 2778, "s": 2637, "text": "Artisan is the co...
Happy Number in Python
Here we will see how to detect a number n is one Happy number or not. So the happy number is a number, where starting with any positive integers replace the number by the sum of squares of its digits, this process will be repeated until it becomes 1, otherwise it will loop endlessly in a cycle. Those numbers, when the ...
[ { "code": null, "e": 1422, "s": 1062, "text": "Here we will see how to detect a number n is one Happy number or not. So the happy number is a number, where starting with any positive integers replace the number by the sum of squares of its digits, this process will be repeated until it becomes 1, ot...
How to save cache in local storage of android webview?
This example demonstrate about How to save cache in local storage of android webview. 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": 1148, "s": 1062, "text": "This example demonstrate about How to save cache in local storage of android webview." }, { "code": null, "e": 1277, "s": 1148, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required ...
K-Means Clustering: Identifying Profitable Hotel Customers | by Michael Grogan | Towards Data Science
In this instance, K-Means is used to analyse market segment clusters for a hotel in Portugal. This analysis is based on the original study by Antonio, Almeida and Nunes as cited in the References section below. Given lead time (the period of time from when the customer makes their booking to when they actually stay at ...
[ { "code": null, "e": 266, "s": 172, "text": "In this instance, K-Means is used to analyse market segment clusters for a hotel in Portugal." }, { "code": null, "e": 383, "s": 266, "text": "This analysis is based on the original study by Antonio, Almeida and Nunes as cited in the R...
File and Directory Management
Here, we will learn the concepts of File and Directory Management − File is nothing but a collection of information. The information can be of numbers, characters, graphs, images, etc. Every file should be stored under a unique name for its future reference. Every file should be saved along with an extension. Some of t...
[ { "code": null, "e": 1938, "s": 1870, "text": "Here, we will learn the concepts of File and Directory Management −" }, { "code": null, "e": 2244, "s": 1938, "text": "File is nothing but a collection of information. The information can be of numbers, characters, graphs, images, et...
How to show shaking / wobble view animation in android?
This example demonstrate about How to show shaking / wobble view animation 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...
[ { "code": null, "e": 1149, "s": 1062, "text": "This example demonstrate about How to show shaking / wobble view animation in android." }, { "code": null, "e": 1278, "s": 1149, "text": "Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required...
ASP.NET - Event Handling
An event is an action or occurrence such as a mouse click, a key press, mouse movements, or any system-generated notification. A process communicates through events. For example, interrupts are system-generated events. When events occur, the application should be able to respond to it and manage it. Events in ASP.NET r...
[ { "code": null, "e": 2648, "s": 2347, "text": "An event is an action or occurrence such as a mouse click, a key press, mouse movements, or any system-generated notification. A process communicates through events. For example, interrupts are system-generated events. When events occur, the application...
Fine-tuning a BERT model with transformers | by Thiago G. Martins | Towards Data Science
This post describes a simple way to get started with fine-tuning transformer models. It will cover the basics and introduce you to the amazing Trainer class from the transformers library. You can run the code from Google Colab but do not forget to enable GPU support. We use a dataset built from COVID-19 Open Research D...
[ { "code": null, "e": 440, "s": 172, "text": "This post describes a simple way to get started with fine-tuning transformer models. It will cover the basics and introduce you to the amazing Trainer class from the transformers library. You can run the code from Google Colab but do not forget to enable ...
Unix / Linux - File System Basics
A file system is a logical collection of files on a partition or disk. A partition is a container for information and can span an entire hard drive if desired. Your hard drive can have various partitions which usually contain only one file system, such as one file system housing the /file system or another containing t...
[ { "code": null, "e": 2907, "s": 2747, "text": "A file system is a logical collection of files on a partition or disk. A partition is a container for information and can span an entire hard drive if desired." }, { "code": null, "e": 3089, "s": 2907, "text": "Your hard drive can ha...
C library function - sqrt()
The C library function double sqrt(double x) returns the square root of x. Following is the declaration for sqrt() function. double sqrt(double x) x − This is the floating point value. x − This is the floating point value. This function returns the square root of x. The following example shows the usage of sqrt() funct...
[ { "code": null, "e": 2082, "s": 2007, "text": "The C library function double sqrt(double x) returns the square root of x." }, { "code": null, "e": 2132, "s": 2082, "text": "Following is the declaration for sqrt() function." }, { "code": null, "e": 2154, "s": 2132,...
Sum of first N natural numbers which are divisible by X or Y - GeeksforGeeks
11 May, 2022 Given a number N. Given two numbers X and Y, the task is to find the sum of all those numbers from 1 to N that are divisible by X or by Y.Examples: Input : N = 20 Output : 98 Input : N = 14 Output : 45 Approach: To solve the problem, follow the below steps:->Find the sum of numbers that are divisible b...
[ { "code": null, "e": 26333, "s": 26305, "text": "\n11 May, 2022" }, { "code": null, "e": 26483, "s": 26333, "text": "Given a number N. Given two numbers X and Y, the task is to find the sum of all those numbers from 1 to N that are divisible by X or by Y.Examples: " }, { ...
How to Download and Install Python Latest Version on Linux? - GeeksforGeeks
06 Oct, 2021 Python is a widely-used general-purpose, high-level programming language. This article will serve as a complete tutorial on How to download and install Python latest version on Linux Operating Systems.On every Linux system including following OS, Ubuntu Linux Mint Debian openSUSE CentOS Fedora and my favou...
[ { "code": null, "e": 25875, "s": 25847, "text": "\n06 Oct, 2021" }, { "code": null, "e": 26122, "s": 25875, "text": "Python is a widely-used general-purpose, high-level programming language. This article will serve as a complete tutorial on How to download and install Python late...
Node.js crypto.publicEncrypt() Method - GeeksforGeeks
11 Oct, 2021 The crypto.publicEncrypt() method is an inbuilt application programming interface of the crypto module which is used to encrypt the stated content of the buffer with the parameter ‘key’. Syntax: crypto.publicEncrypt( key, buffer ) Parameters: This method accept two parameters as mentioned above and describ...
[ { "code": null, "e": 26215, "s": 26187, "text": "\n11 Oct, 2021" }, { "code": null, "e": 26402, "s": 26215, "text": "The crypto.publicEncrypt() method is an inbuilt application programming interface of the crypto module which is used to encrypt the stated content of the buffer wi...
UGC NET CS 2018 Dec – II - GeeksforGeeks
03 Nov, 2021 R ≥ P(N − 1) + 1 12 ≥ P(4 − 1) + 1 11 ≥ 3P 11/3 ≥ P P ≤ 3.66 Writers are given exclusive access to shared objectsReaders are given exclusive access to shared objectsBoth readers and writers are given exclusive access to shared objects. Writers are given exclusive access to shared objects Readers are give...
[ { "code": null, "e": 28855, "s": 28827, "text": "\n03 Nov, 2021" }, { "code": null, "e": 28873, "s": 28855, "text": "R ≥ P(N − 1) + 1 " }, { "code": null, "e": 28918, "s": 28873, "text": "12 ≥ P(4 − 1) + 1\n11 ≥ 3P\n11/3 ≥ P\nP ≤ 3.66 " }, { "code": nu...
What are variadic functions in Java?
Methods which uses variable arguments (varargs, arguments with three dots) are known as variadic functions. Live Demo public class Sample { void demoMethod(String... args) { for (String arg: args) { System.out.println(arg); } } public static void main(String args[] ){ new Sample()...
[ { "code": null, "e": 1170, "s": 1062, "text": "Methods which uses variable arguments (varargs, arguments with three dots) are known as variadic functions." }, { "code": null, "e": 1180, "s": 1170, "text": "Live Demo" }, { "code": null, "e": 1480, "s": 1180, "t...
Applied Bayesian Inference with PyMC3 and Bambi Part 3 | by Ani Madurkar | Towards Data Science
This is the final part of my Applied Bayesian Inference series. In part 1, I introduced the conditional world and probabilistic programming: towardsdatascience.com In part 2, I showed how you can scale your models up to “real” data by modeling Nike and Adidas shoes. This piece showed how you can run more effective A/B ...
[ { "code": null, "e": 313, "s": 172, "text": "This is the final part of my Applied Bayesian Inference series. In part 1, I introduced the conditional world and probabilistic programming:" }, { "code": null, "e": 336, "s": 313, "text": "towardsdatascience.com" }, { "code": ...
Distilling BERT — How to achieve BERT performance using Logistic Regression | by Dima Shulga | Towards Data Science
BERT is awesome, and it’s everywhere. It looks like any NLP task can benefit from utilizing BERT. The authors showed that this is indeed the case, and from my experience, it works like magic. It’s easy to use, works on a small amount of data and supports many different languages. It seems like there’s no single reason ...
[ { "code": null, "e": 1607, "s": 47, "text": "BERT is awesome, and it’s everywhere. It looks like any NLP task can benefit from utilizing BERT. The authors showed that this is indeed the case, and from my experience, it works like magic. It’s easy to use, works on a small amount of data and supports ...
Stack designer | Practice | GeeksforGeeks
You are given an array arr of size N. You need to push the elements of the array into a stack and then print them while popping. Example 1: Input: n = 5 arr = {1 2 3 4 5} Output: 5 4 3 2 1 Example 2: Input: n = 7 arr = {1 6 43 1 2 0 5} Output: 5 0 2 1 43 6 1 Your Task: Since this is a function problem, you don'...
[ { "code": null, "e": 356, "s": 226, "text": "You are given an array arr of size N. You need to push the elements of the array into a stack and then print them while popping. " }, { "code": null, "e": 368, "s": 356, "text": "Example 1: " }, { "code": null, "e": 418, ...
Call methods of an object using reflection in Java
The methods of an object can be called using the java.lang.Class.getDeclaredMethods() method. This method returns an array that contains all the Method objects with public, private, protected and default access. However, the inherited methods are not included. Also, the getDeclaredMethods() method returns a zero length...
[ { "code": null, "e": 1323, "s": 1062, "text": "The methods of an object can be called using the java.lang.Class.getDeclaredMethods() method. This method returns an array that contains all the Method objects with public, private, protected and default access. However, the inherited methods are not in...
Word2Vec For Phrases — Learning Embeddings For More Than One Word | by Moshe Hazoom | Towards Data Science
When it comes to semantics, we all know and love the famous Word2Vec [1] algorithm for creating word embeddings by distributional semantic representations in many NLP applications, like NER, Semantic Analysis, Text Classification and many more. However, the limitation of the current implementation of Word2Vec algorithm...
[ { "code": null, "e": 417, "s": 172, "text": "When it comes to semantics, we all know and love the famous Word2Vec [1] algorithm for creating word embeddings by distributional semantic representations in many NLP applications, like NER, Semantic Analysis, Text Classification and many more." }, { ...
How To Install Go (Golang) 1.7 on CentOS 7
In this article, we will learn about how to install and configure Go (golang) which is developed by Google and its open source programming language. It’s a simple, efficient and reliable programming language for development with minimalist. A CentOS machine installed. A non-root user with Sudo permission on the CentOS ...
[ { "code": null, "e": 1303, "s": 1062, "text": "In this article, we will learn about how to install and configure Go (golang) which is developed by Google and its open source programming language. It’s a simple, efficient and reliable programming language for development with minimalist." }, { ...
Explain Nested if-else statement in C language
A ‘nested if’ is an if statement that is the object of either if (or) an else. ‘if’ is placed inside another if (or) else. Refer the syntax given below − if (condition1){ if (condition2) stmt1; else stmt2; } else{ if (condition3) stmt3; else stmt4; } Given below is the C program to e...
[ { "code": null, "e": 1185, "s": 1062, "text": "A ‘nested if’ is an if statement that is the object of either if (or) an else. ‘if’ is placed inside another if (or) else." }, { "code": null, "e": 1216, "s": 1185, "text": "Refer the syntax given below −" }, { "code": null, ...
Tk - Menu Widget
Tk menu widget is used along with Tk widget menubutton. So, we will see menubutton first. The syntax for menu button widget is shown below − menubutton menubuttonName options The options available for the menu button widget are listed below in the following table − -command action Sets the command action for button. -...
[ { "code": null, "e": 2342, "s": 2201, "text": "Tk menu widget is used along with Tk widget menubutton. So, we will see menubutton first. The syntax for menu button widget is shown below −" }, { "code": null, "e": 2377, "s": 2342, "text": "menubutton menubuttonName options\n" },...
A Tutorial Using Spark for Big Data: An Example to Predict Customer Churn | by Ying Geng | Towards Data Science
Apache Spark has become arguably the most popular tool for analyzing large data sets. As my capstone project for Udacity’s Data Science Nanodegree, I’ll demonstrate the use of Spark for scalable data manipulation and machine learning. Context-wise, we use the user log data from a fictitious music streaming company, Spa...
[ { "code": null, "e": 547, "s": 171, "text": "Apache Spark has become arguably the most popular tool for analyzing large data sets. As my capstone project for Udacity’s Data Science Nanodegree, I’ll demonstrate the use of Spark for scalable data manipulation and machine learning. Context-wise, we use...
VBA - Instr
The InStr Function returns the first occurrence of one string within another string. The search happens from the left to the right. InStr([start,]string1,string2[,compare]) Start − An optional parameter. Specifies the starting position for the search. The search begins at the first position from the left to the right....
[ { "code": null, "e": 2067, "s": 1935, "text": "The InStr Function returns the first occurrence of one string within another string. The search happens from the left to the right." }, { "code": null, "e": 2109, "s": 2067, "text": "InStr([start,]string1,string2[,compare])\n" }, ...
C++ Program to Concatenate Two Strings
A string is a one dimensional character array that is terminated by a null character. Concatenation of two strings is the joining of them to form a new string. For example. String 1: Mangoes are String 2: tasty Concatenation of 2 strings: Mangoes are tasty A program to concatenate two strings is given as follows. Live...
[ { "code": null, "e": 1235, "s": 1062, "text": "A string is a one dimensional character array that is terminated by a null character. Concatenation of two strings is the joining of them to form a new string. For example." }, { "code": null, "e": 1319, "s": 1235, "text": "String 1:...
K Means Clustering Without Libraries | by Rob LeCheminant | Towards Data Science
Kmeans is a widely used clustering tool for analyzing and classifying data. Often times, however, I suspect, it is not fully understood what is happening under the hood. This isn’t necessarily a bad thing if you understand what the end product conveys, but learning what happens by building the algorithm from scratch ca...
[ { "code": null, "e": 563, "s": 172, "text": "Kmeans is a widely used clustering tool for analyzing and classifying data. Often times, however, I suspect, it is not fully understood what is happening under the hood. This isn’t necessarily a bad thing if you understand what the end product conveys, bu...
CRM - Building Value for Customers
“Your relationship with the customers, not the customer’s relationship with your product, is the conduit through which the value flows.” − Bill Quiseng, Customer Service Speaker and Blogger The terms cost and value are often misunderstood as same, though these two terms are poles apart in their meaning. The cost of a p...
[ { "code": null, "e": 2071, "s": 1934, "text": "“Your relationship with the customers, not the customer’s relationship with your product, is the conduit through which the value flows.”" }, { "code": null, "e": 2124, "s": 2071, "text": "− Bill Quiseng, Customer Service Speaker and ...
AWK - Relational Operators
AWK supports the following relational operators − It is represented by ==. It returns true if both operands are equal, otherwise it returns false. The following example demonstrates this − awk 'BEGIN { a = 10; b = 10; if (a == b) print "a == b" }' On executing this code, you get the following result − a == b It is rep...
[ { "code": null, "e": 1907, "s": 1857, "text": "AWK supports the following relational operators −" }, { "code": null, "e": 2046, "s": 1907, "text": "It is represented by ==. It returns true if both operands are equal, otherwise it returns false. The following example demonstrates ...
Python Tricks: Flattening Lists. Are you still iterating through for... | by Louis Chan | Towards Data Science
Welcome to a series of short posts each with handy Python tricks that can help you become a better Python programmer. In this blog, we will look into how to flatten lists. We have all dealt with lists of lists or even worse: lists of nested lists. Theoretically, we can peel the list layer by layer like an onion: l = [0...
[ { "code": null, "e": 219, "s": 47, "text": "Welcome to a series of short posts each with handy Python tricks that can help you become a better Python programmer. In this blog, we will look into how to flatten lists." }, { "code": null, "e": 295, "s": 219, "text": "We have all dea...
Perl | Displaying Variable Values with a Debugger - GeeksforGeeks
21 Nov, 2019 Debugger in Perl comes up with various features thus making the debugging process quite simple and effective. One of the most powerful features of Perl Debugger is displaying variable values. This feature allows us to display the value of any variable at any time. There are two basic commands to implement ...
[ { "code": null, "e": 24210, "s": 24182, "text": "\n21 Nov, 2019" }, { "code": null, "e": 24531, "s": 24210, "text": "Debugger in Perl comes up with various features thus making the debugging process quite simple and effective. One of the most powerful features of Perl Debugger is...
Count ways to express a number as sum of consecutive numbers - GeeksforGeeks
03 Feb, 2022 Given an integer N, the task is to find the number of ways to represent this number as a sum of 2 or more consecutive natural numbers. Examples: Input: N = 15 Output: 3 Explanation: 15 can be represented as: 1 + 2 + 3 + 4 + 54 + 5 + 67 + 8 1 + 2 + 3 + 4 + 5 4 + 5 + 6 7 + 8 Input: N = 10 Output: 1 ...
[ { "code": null, "e": 26643, "s": 26615, "text": "\n03 Feb, 2022" }, { "code": null, "e": 26778, "s": 26643, "text": "Given an integer N, the task is to find the number of ways to represent this number as a sum of 2 or more consecutive natural numbers." }, { "code": null, ...
How to write a recursive function in Python?
A recursive function is a function that calls itself during its execution. This enables the function to repeat itself several times, outputting the result and the end of each iteration. Recursion has something to do with infinity. Following is an example of recursive function to find the factorial of an integer. Facto...
[ { "code": null, "e": 1294, "s": 1062, "text": "A recursive function is a function that calls itself during its execution. This enables the function to repeat itself several times, outputting the result and the end of each iteration. Recursion has something to do with infinity. " }, { "code":...
Latent Dirichlet Allocation: Intuition, math, implementation and visualisation with pyLDAvis | by Ioana | Towards Data Science
TL;DR — Latent Dirichlet Allocation (LDA, sometimes LDirA/LDiA) is one of the most popular and interpretable generative models for finding topics in text data. I’ve provided an example notebook based on web-scraped job description data. Although running LDA on a canonical dataset like 20Newsgroups would’ve provided cle...
[ { "code": null, "e": 712, "s": 172, "text": "TL;DR — Latent Dirichlet Allocation (LDA, sometimes LDirA/LDiA) is one of the most popular and interpretable generative models for finding topics in text data. I’ve provided an example notebook based on web-scraped job description data. Although running L...
Matplotlib.figure.Figure.clf() in Python - GeeksforGeeks
30 Apr, 2020 Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, which contains all the plot elements. This module is used to control the default spacing of the subplots and top level container for all plot elemen...
[ { "code": null, "e": 24390, "s": 24362, "text": "\n30 Apr, 2020" }, { "code": null, "e": 24701, "s": 24390, "text": "Matplotlib is a library in Python and it is numerical – mathematical extension for NumPy library. The figure module provides the top-level Artist, the Figure, whic...
Batch Script - MD
This batch command creates a new directory in the current location. md [new directory name] @echo off md newdir cd newdir cd Rem “Goes back to the parent directory and create 2 directories” cd.. md newdir1 newdir1 cd newdir1 cd cd.. cd newdir2 cd The above command produces the following output. C:\newdir C:...
[ { "code": null, "e": 2237, "s": 2169, "text": "This batch command creates a new directory in the current location." }, { "code": null, "e": 2262, "s": 2237, "text": "md [new directory name]\n" }, { "code": null, "e": 2427, "s": 2262, "text": "@echo off \nmd ne...
bzgrep command in Linux with examples - GeeksforGeeks
15 May, 2019 bzgrep is a Linux command used to search for a pattern or an expression but inside a bzip2-compressed file. This command simply passes it’s arguments and the decompressed files to grep. Therefore, all the flags used in the grep command remain same in bzgrep, since they are simply sent to grep as they are. ...
[ { "code": null, "e": 24406, "s": 24378, "text": "\n15 May, 2019" }, { "code": null, "e": 24808, "s": 24406, "text": "bzgrep is a Linux command used to search for a pattern or an expression but inside a bzip2-compressed file. This command simply passes it’s arguments and the decom...
How to replace multiple spaces in a string using a single space using Java regex?
The metacharacter “\\s” matches spaces and + indicates the occurrence of the spaces one or more times, therefore, the regular expression \\S+ matches all the space characters (single or multiple). Therefore, to replace multiple spaces with a single space. Match the input string with the above regular expression and rep...
[ { "code": null, "e": 1318, "s": 1062, "text": "The metacharacter “\\\\s” matches spaces and + indicates the occurrence of the spaces one or more times, therefore, the regular expression \\\\S+ matches all the space characters (single or multiple). Therefore, to replace multiple spaces with a single ...