Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Articles by Chandu yadav
Page 10 of 81
Decimal Functions in C#
The following are some of the decimal functions in C#.Sr.No.Name & Description1Add (Decimal, Decimal)Adds two specified Decimal values.2Ceiling(Decimal)Returns the smallest integral value that is greater than or equal to the specified decimal number.3Compare (Decimal, Decimal)Compares two specified Decimal values.4CompareTo(Decimal)Compares this instance to a specified Decimal object and returns a comparison of their relative values.5CompareTo(Object)Compares this instance to a specified object and returns a comparison of their relative values.6Divide (Decimal, Decimal)Divides two specified Decimal values.7Equals(Decimal)Returns a value indicating whether this instance and a specified Decimal object represent the same value.Let us see an example of Decimal Ceiling() method in C# that returns the smallest integral value greater than or equal to ...
Read MorePython Text Sequence Types
In python the str object, handles the text or string type data. Strings are immutable. The strings are sequence of Unicode characters. We can use single quote, double quotes or triple quotes to define the string literals. ‘This is a string with single quote’ “Another Text with double quotes” ‘’’Text using three single quotes’’’ or “””Text using three double quotes””” We can use triple quotes to assign multiline strings in python. There is different string related functions. Some of the String methods are as follows − Sr.No. Operation/Functions & Description 1 s.capitalize() Convert first ...
Read MoreHide content with Bootstrap
To hide content with Bootstrap, use the .hidden class in Bootstrap. You can try to run the following code to hide content:Example Bootstrap Example Content is visible. Content is hidden.
Read MoreItem text inside the list group in Bootstrap
To set item text inside the list group, use the .list-group-item-text class.You can try to run the following code to implement the .list-group-item-text class −Example Bootstrap Example Cars Hyundai i10 i20 Volkswagen Vento Polo
Read MoreWhat is a parameterized constructor in C# programs?
In a constructor you can also add parameters. Such constructors are called parameterized constructors. This technique helps you to assign initial value to an object at the time of its creation.The following is an example −// class class DemoParameterized constructor with a prarameter rank −public Demo(int rank) { Console.WriteLine("RANK = {0}", rank); }Here is the complete example displaying how to work with parameterized constructor in C# −Exampleusing System; namespace Demo { class Line { private double length; // Length of a line public Line(double len) { //Parameterized constructor ...
Read MoreTime Functions in C#
The DateTime has methods and properties for Date and Time as well like how to get the number of hours or minutes of a day, etc.Let us only focus on the time functions −Refer MSDN (Microsoft Developer Network) for all the functions −Sr.No.Method & Properties1AddDays(Double)Returns a new DateTime that adds the specified number of days to the value of this instance.2AddHours(Double)Returns a new DateTime that adds the specified number of hours to the value of this instance.3AddMilliseconds(Double)Returns a new DateTime that adds the specified number of milliseconds to the value of this instance.4AddMinutes(Double)Returns a new DateTime that adds the specified ...
Read MoreHow to use Bootstrap Tab Plugins
By combining a few data attributes, you can easily create a tabbed interface. With this plug-in you can transition through panes of local content in tabs or pills, even via drop down menus.You can try to run the following code to implement tab plugins −Example Bootstrap Example Home ...
Read MoreTrigonometric Functions in C#
Trignometric Functions in C# include, ACos, ASin, Sin, Cos, Tan, etc. It comes under the Math type of the System namespace.The following is an example showing how to implement trigonometric functions in C# −Exampleusing System; class Program { static void Main() { Console.WriteLine(Math.Acos(0)); Console.WriteLine(Math.Cos(2)); Console.WriteLine(Math.Asin(0.2)); Console.WriteLine(Math.Sin(2)); Console.WriteLine(Math.Atan(-5)); Console.WriteLine(Math.Tan(1)); } }Output1.5707963267949 -0.416146836547142 0.201357920790331 0.909297426825682 -1.37340076694502 1.5574077246549Above we saw the Inverse Sine value using Asin −Math.Asin(0.2)With that, we also saw the Inverse Cosine value using Acos −Math.Acos(0)In the same ...
Read MoreHow to find the size of a list in C#?
Declare and initialize a list.var products = new List (); products.Add("Accessories"); products.Add("Clothing"); products.Add("Footwear");To get the size, use the Capacity property.products.CapacityNow let us see the complete code to find the size of a list.Exampleusing System; using System.Collections.Generic; public class Demo { public static void Main(string[] args) { var products = new List (); products.Add("Accessories"); products.Add("Clothing"); products.Add("Footwear"); Console.WriteLine("Our list...."); foreach(var p in products) { Console.WriteLine(p); } Console.WriteLine("Size of list = " + products.Capacity); } }OutputOur list.... Accessories Clothing Footwear Size of list = 4
Read MoreBootstrap Pills
To turn the tabs into pills, use the class .nav-pills,You can try to run the following code to implement Bootstrap Pills:Example Bootstrap Example Subjects Java WordPress JavaScript AngularJS
Read More