AmitDiwan has Published 10744 Articles

Byte.MaxValue Field in C#

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 11:00:30

228 Views

The Byte.MaxValue field in C# is used to represent the largest possible value of a Byte.SyntaxFollowing is the syntax −public const byte MaxValue = 255;ExampleLet us now see an example to implement the Byte.MaxValue field −using System; public class Demo {    public static void Main(){       byte ... Read More

Byte.GetTypeCode() Method in C#

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 10:59:35

70 Views

The Byte.GetTypeCode() method in C# returns the TypeCode for value type Byte.SyntaxFollowing is the syntax −public TypeCode GetTypeCode ();ExampleLet us now see an example to implement the Byte.GetTypeCode() method −using System; public class Demo {    public static void Main(){       byte val1;       val1 = ... Read More

Math.Cosh() Method in C#

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 10:58:09

77 Views

The Math.Cosh() method in C# is used to return the hyperbolic cosine of the angle specified as a parameter.SyntaxFollowing is the syntax −public static double Cosh (double val);Above, Val is an angle.ExampleLet us now see an example to implement Math.Cosh() method −using System; public class Demo {    public static ... Read More

Math.Cos() Method in C#

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 10:56:45

398 Views

The Math.Cos() method in C# is used to return the cosine of the angle set as a parameter.SyntaxFollowing is the syntax −public static double Cos (double val);Above, Val is the angle.ExampleLet us now see an example to implement Math.Cos() method −using System; public class Demo {    public static void ... Read More

Find specific records which has whitespace on the second place in MySQL

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 10:56:30

689 Views

For this, use SUBSTR() as in the below syntax −select * from yourTableName where substr(yourColumnName, 2, 1 ) = ' ';Let us first create a table −mysql> create table DemoTable1365     -> (     -> Value varchar(20)     -> ); Query OK, 0 rows affected (0.66 sec)Insert ... Read More

Find date record after a particular date from a column with VARCHAR type in MySQL

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 10:55:46

190 Views

Let us first create a table. Here, we have set date as VARCHAR −mysql> create table DemoTable1364     -> (     -> ShippingDate varchar(100)     -> ); Query OK, 0 rows affected (0.87 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1364 values('01-09-2019 ... Read More

Math.Ceiling() Method in C#

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 10:54:17

4K+ Views

The Math.Ceiling() method in C# is used to return the smallest integral value greater than or equal to the specified number.SyntaxFollowing is the syntax −public static decimal Ceiling (decimal val); public static double Ceiling(double val)For the first syntax above, the value Val is the decimal number, whereas Val in the ... Read More

Using MySQL IN() for some column values with underscore

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 10:53:26

179 Views

Let us first create a table −mysql> create table DemoTable1363     -> (     -> StudentId varchar(20)     -> ); Query OK, 0 rows affected (0.57 sec)Insert some records in the table using insert command −mysql> insert into DemoTable1363 values('901'); Query OK, 1 row affected (0.20 sec) ... Read More

Byte.GetHashCode() Method in C#

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 10:52:32

110 Views

The Byte.GetHashCode() method in C# is used to return the hash code for the current instance.SyntaxFollowing is the syntax −public override int GetHashCode ();ExampleLet us now see an example to implement the Byte.GetHashCode() method −using System; public class Demo {    public static void Main(){       long val ... Read More

MySQL permissions to view all databases?

AmitDiwan

AmitDiwan

Updated on 08-Nov-2019 10:51:40

256 Views

For this, the syntax is as follows −revoke show databases on *.* from 'yourUserName'@'yourHostName';Let us display all usernames along with host name −mysql> select user, host from MySQL.user;This will produce the following output −+------------------+-----------+ | user             | host      | +------------------+-----------+ | Bob ... Read More

Advertisements