Solaris is a Unix based operating system that was developed by Sun Microsystems and after its acquisition by Oracle it is known as Oracle Solaris. It is known for its scalability and its innovative features such as DTrace, ZFS, Time Slider etc.Solaris KernelThe kernel is the core of the operating system as its main function is to manage the hardware by allocating resources appropriately. Solaris is a microkernel design and it is not possible to create a monolithic Solaris kernel.Booting the kernel from a local disk in Solaris can be done using the following steps −Loading the bootblockReading and loading ... Read More
iOSThe iOS is the operating system created by Apple Inc. for mobile devices. The iOS is used in many of the mobile devices for Apple such as iPhone, iPod, iPad etc. The iOS is used a lot and only lags behind Android in terms of popularity.The iOS architecture is layered. It contains an intermediate layer between the applications and the hardware so they do not communicate directly. The lower layers in iOS provide the basic services and the higher layers provide the user interface and sophisticated graphics.The layered architecture of iOS is given as follows −AndroidAndroid is an operating system ... Read More
To display the last three elements from a list, use the Take() method. For reversing it, use the Reverse() method.Firstly, declare a list and add elements to it −List myList = new List(); myList.Add("One"); myList.Add("Two"); myList.Add("Three"); myList.Add("Four");Now, use the Take() method with Reverse() to display the last three elements from the list in reverse order −myList.Reverse().Take(3);The following is the code −Example Live Demousing System; using System.Linq; using System.Collections.Generic; public class Demo { public static void Main() { List myList = new List(); myList.Add("One"); myList.Add("Two"); myList.Add("Three"); ... Read More
MySQL LIKE operator is used to select data based on pattern matching. Similarly, we can use LIKE operator with views to select particular data based on pattern matching from the base table. To understand this concept we are using the base table ‘student_info’ having the following data −mysql> Select * from Student_info; +------+---------+------------+------------+ | id | Name | Address | Subject | +------+---------+------------+------------+ | 101 | YashPal | Amritsar | History | | 105 | Gaurav | Chandigarh | Literature | | 125 | Raman | Shimla | Computers | | 130 | ... Read More
Stopwatch is a class in C# to measure the elapsed time. Use it to calculate the time a function took to execute. It is found under System.Diagnostics.To get the elapsed time, firstly begin the Stopwatch −var sw = Stopwatch.StartNew();For elapsed ticks −long ticks = sw.ElapsedTicks;Let us see an example −Example Live Demousing System; using System.Linq; using System.Diagnostics; public class Demo { public static void Main() { var sw = Stopwatch.StartNew(); long ticks = sw.ElapsedTicks; Console.WriteLine(ticks); } }Output582
To set the timer information to zero, use the Stopwatch Restart method.Firstly, begin the Stopwatch −Stopwatch s = Stopwatch.StartNew();Then, use Restart() to set the timer to zero −s.Restart();Let us see the complete code −ExampleLive Demousing System; using System.Threading; using System.Diagnostics; public class Demo { public static void Main() { Stopwatch s = Stopwatch.StartNew(); Thread.Sleep(500); // restart s.Restart(); // begin again Thread.Sleep(500); Console.WriteLine(s.Elapsed); } }Output00:00:00.5004937
Use DateTime.Subtract to get the difference between two dates in C#.Firstly, set two dates −DateTime date1 = new DateTime(2018, 8, 27); DateTime date2 = new DateTime(2018, 8, 28);Use the Subtract method to get the difference −TimeSpan t = date2.Subtract(date1);The following is the complete code −Example Live Demousing System; using System.Threading; using System.Diagnostics; public class Demo { public static void Main() { DateTime date1 = new DateTime(2018, 8, 27); DateTime date2 = new DateTime(2018, 8, 28); // getting the difference TimeSpan t = date2.Subtract(date1); Console.WriteLine(t); Console.WriteLine("Days (Difference) = {0} ", t.TotalDays); Console.WriteLine("Minutes (Difference) = {0}", t.TotalMinutes); } }Output1.00:00:00 Days (Difference) = 1 Minutes (Difference) = 1440
We can use the similar syntax of the ORDER BY clause into the PHP function – mysql_query(). This function is used to execute the SQL command and later another PHP function – mysql_fetch_array() can be used to fetch all the selected data.To illustrate it we are having the following example −ExampleIn this example, we are writing a PHP script that will return the result in descending order of the authors of the tutorial −
Set a DateTime object;DateTime dt = DateTime.Now;To get years in different formats, try the following −dt.ToString("yy") dt.ToString("yyy") dt.ToString("yyyy") dt.ToString("yyyyy")Here is the complete code −Example Live Demousing System; using System.Threading; using System.Diagnostics; public class Demo { public static void Main() { DateTime dt = DateTime.Now; // Today's date Console.WriteLine("Today = {0}", DateTime.Today); Console.WriteLine("Displaying current year in dufferent formats:"); Console.WriteLine(dt.ToString("yy")); Console.WriteLine(dt.ToString("yyy")); Console.WriteLine(dt.ToString("yyyy")); Console.WriteLine(dt.ToString("yyyyy")); } }OutputToday = 9/4/2018 12:00:00 AM Displaying current year in dufferent formats: 18 2018 2018 02018
The Ulong type in C# is an alias to the System.UInt64 type. It is an Unsigned integer.Set the Ulong type −ulong val = 7712059531;To get the minimum and maximum value for Ulong type −Console.WriteLine(ulong.MaxValue); Console.WriteLine(ulong.MinValue);Here is the complete code −Example Live Demousing System; using System.Threading; using System.Diagnostics; public class Demo { public static void Main() { ulong val = 7712059531; Console.WriteLine(val); // Max and Min values Console.WriteLine(ulong.MaxValue); Console.WriteLine(ulong.MinValue); // typeof Console.WriteLine(typeof(ulong)); } }Output7712059531 18446744073709551615 0 System.UInt64
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP