- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
When several computers are connected together and are able to communicate with one another, it is called a computer network. Computer networks are designed to share data and information among the computers of the network. Depending on the operating geographical area, computer networks are of the three major types, namely LAN, MAN, and WAN. All the three computer networks are designed for the same purpose, i.e., for sharing information among the computers. But, they are different in many ways, which we are going to highlight in this article. Let's start with some basics of LAN, MAN, and WAN. What ... Read More
Use the tag in HTML to add a variable. The HTML tag is used to format text in a document. It can include a variable in a mathematical expression. Example You can try to run the following code to add a variable in HTML − HTML var Tag The equations: 2x - 4z = 2y + 3 and x + 5z = 3y + 6
In C#, String.Contains() is a string method. This method is used to check whether the substring occurs within a given string or not. It returns the boolean value. If substring exists in string or value is the empty string (""), then it returns True, otherwise returns False. Exception − This method can give ArgumentNullException if str is null. This method performs the case-sensitive checking. The search will always begin from the first character position of the string and continues until the last character position. Example 1 Contains is case sensitive if the string is found it return true else false ... Read More
You can easily insert DateTime with the MySQL command line. Following is the syntax − insert into yourTableName values(‘yourDateTimeValue’); Let us first create a table − mysql> create table DemoTable ( DateOfBirth datetime ); Query OK, 0 rows affected (0.97 sec) Insert some records in the table using insert command − mysql> insert into DemoTable values('1998-01-23 12:45:56'); Query OK, 1 row affected (0.26 sec) mysql> insert into DemoTable values('2010-12-31 01:15:00'); Query OK, 1 row affected (0.10 sec) mysql> insert into DemoTable values('2015-04-03 14:00:45'); Query OK, 1 row affected (0.10 sec) Display all records from the table using select statement ... Read More
To save Pandas DataFrames into multiple excel sheets, we can use the pd.ExcelWriter() method. Make sure you have the openpyxl package installed before using ExcelWriter().StepsCreate a two-dimensional, size-mutable, potentially heterogeneous tabular data, df1.Print the input DataFrame, df1.Create another DataFrame, df2, and print it.Use ExcelWriter() method to write the given formatted cells into an Excel sheet.Exampleimport pandas as pd df1 = pd.DataFrame( [[5, 2], [4, 1]], index=["One", "Two"], columns=["Rank", "Subjects"] ) df2 = pd.DataFrame( [[15, 21], [41, 11]], index=["One", "Two"], columns=["Rank", ... Read More
If you are AUTO_INCREMENT with column, then you can use last_insert_id() method. This method gets the ID of the last inserted record in MySQL. The syntax is as follows SELECT LAST_INSERT_ID(); To understand the above syntax, let us create a table. The query to create a table is as follows mysql> create table LastInsertedRow - > ( - > Id int NOT NULL AUTO_INCREMENT PRIMARY KEY, - > UserName varchar(20), - > UserAge int - > ); Query OK, 0 rows affected (0.56 sec) Insert some records in the table using insert command. The ... Read More
Use the AddRange() method to append a second list to an existing list.Here is list one −List < string > list1 = new List < string > (); list1.Add("One"); list1.Add("Two");Here is list two −List < string > list2 = new List < string > (); list2.Add("Three"); ist2.Add("Four");Now let us append −list1.AddRange(list2);Let us see the complete code.Exampleusing System; using System.Collections.Generic; using System.Linq; public class Demo { public static void Main() { List < string > list1 = new List < string > (); list1.Add("One"); list1.Add("Two"); ... Read More
In any programming paradigm, it is mandatory to check "null safety" in order to prevent runtime errors. In this article, we will see different ways to check "null safety" in Kotlin. Example - Using if…else In most of the programming languages, we have the "if" keyword to check conditions. In Kotlin too, we can use the "if-else" clause to check the null safety of a variable. fun main() { val name="TutorialsPoint.com" //null check if (name != null) { println(name) ... Read More
In C or C++, we cannot return multiple values from a function directly. In this section, we will see how to use some trick to return more than one value from a function. We can return more than one values from a function by using the method called “call by address”, or call by reference. In the invoker function, we will use two variables to store the results, and the function will take pointer type data. So we have to pass the address of the data. In this example, we will see how to define a function that can return ... Read More
To write text in subscript in the axis labels and the legend, we can take the following steps −Create x and y data points using NumPy.Plot x and y data points with a super subscript texts label.Use xlabel and ylabel with subscripts in the text.Use the legend() method to place a legend in the plot.Adjust the padding between and around subplots.To display the figure, use the show() method.Exampleimport numpy as np import matplotlib.pyplot as plt plt.rcParams["figure.figsize"] = [7.00, 3.50] plt.rcParams["figure.autolayout"] = True x = np.linspace(1, 10, 1000) y = np.exp(x) plt.plot(x, y, label=r'$e^x$', c="red", lw=2) plt.xlabel("$X_{axis}$") plt.ylabel("$Y_{axis}$") plt.legend(loc='upper left') plt.show()OutputRead More