Byte Struct in C#

AmitDiwan
Updated on 11-Dec-2019 07:46:18

305 Views

Byte Struct in C# represents an 8-bit unsigned integer. Following are the fields −Sr.noField & Description1MaxValueRepresents the largest possible value of a Byte. This field is constant.2MinValueRepresents the smallest possible value of a Byte. This field is constant.Following are some of the methods −Sr.noField & Description1CompareTo(Byte)Compares this instance to a specified 8-bit unsigned integer and returns an indication of their relative values.2CompareTo(Object)Compares this instance to a specified object and returns an indication of their relative values.3Equals(Byte)Returns a value indicating whether this instance and a specified Byte object represent the same value.4Equals(Object)Returns a value indicating whether this instance is equal to ... Read More

Handle HTML5 Media Events Using jQuery

Alex Onsman
Updated on 11-Dec-2019 07:44:05

466 Views

To handle HTML5 media events using jQuery, use the click() method.ExampleYou can try to run the following code to learn how to handle HTML5 media events such as playing a song:Live Demo $(document).ready(function(){     var x = $(".myPlayer").length; // Count total audio players     var z = 0; // Start at first audio player     $("#play-bt").click(function(){        $(".myPlayer")[z].play();        $(".message").text("Music started");     })     $("#stop-bt").click(function(){        $(".myPlayer")[z].pause();        $(".myPlayer")[z].currentTime = 0;        $(".message").text("Music Stopped");     }) });   Play music Stop music

Finally Keyword in C#

AmitDiwan
Updated on 11-Dec-2019 07:41:28

3K+ Views

The finally keyword is used as a block to execute a given set of statements, whether an exception is thrown or not thrown. For example, if you open a file, it must be closed whether an exception is raised or not.SyntaxFollowing is the syntax −try {    // statements causing exception } catch( ExceptionName e1 ) {    // error handling code } catch( ExceptionName e2 ) {    // error handling code } catch( ExceptionName eN ) {    // error handling code } finally {    // statements to be executed }ExampleLet us see an example to implement ... Read More

Display Records with Maximum Event Number for Each Group in SAP Crystal Reports

Lakshmi Srinivas
Updated on 11-Dec-2019 07:40:46

476 Views

I would suggest using this logic to suppress details if the current record is not the record with the maximum amount for the group.//Suppress Details if the current record is not the record with the maximum amount for the group {Event.Event_no}maximum({Event.Event_no},{Deal_NO})This will suppress each record except records with the maximum amount each group.

jQuery Datepicker OnChange Event

Alex Onsman
Updated on 11-Dec-2019 07:39:51

17K+ Views

To work with jQuery Datepicker onchange(), use the datepicker onSelect event. This will show which date we added currently and changed to.ExampleYou can try to run the following code to learn how to work jQuery Datepicker onchange:Live Demo           $( function() {       $(".date").datepicker({     onSelect: function(dateText) {       display("Selected date: " + dateText + ", Current Selected Value= " + this.value);       $(this).change();     }   }).on("change", function() {     display("Change event");   });   function display(msg) {     $("").html(msg).appendTo(document.body);   }   });       Date:

Get HashCode for Current UInt64 Instance in C#

AmitDiwan
Updated on 11-Dec-2019 07:38:32

154 Views

To get the HashCode for the current UInt64 instance, the code is as follows −Example Live Demousing System; public class Demo {    public static void Main() {       ulong val1 = 8768768;       ulong val2 = UInt64.MinValue;       Console.WriteLine("HashCode for val1 = "+val1.GetHashCode());       Console.WriteLine("HashCode for val2 = "+val2.GetHashCode());    } }OutputThis will produce the following output −HashCode for val1 = 8768768 HashCode for val2 = 0ExampleLet us see another example − Live Demousing System; public class Demo {    public static void Main() {       ulong val1 = 89879878;   ... Read More

Creating Index in Column-based Tables in SAP HANA

Samual Sam
Updated on 11-Dec-2019 07:37:47

2K+ Views

Note that an index not necessary to be NOT NULL. You can create an Index in SAP HANA database by using below query:CREATE INDEX IDX_MY_INDEX ON TABLE1 (MY_COLUMN);To know more about SAP HANA database, Modeling, and Administration features, you can refer our SAP HANA Text and Video tutorials:https://www.tutorialspoint.com/sap_hana/https://www.tutorialspoint.com/sap_hana_online_training/index.asp

Pass jQuery Event as a Parameter in a Method

Alex Onsman
Updated on 11-Dec-2019 07:36:38

3K+ Views

To pass a jQuery event as a parameter in a method, use the bind() method.ExampleYou can try to run the following code to learn how to apss a jQuery event as a parameter:Live Demo $(document).ready(function(){    $("#btn1").bind("click", { key1: "value1", key2: "value2" }, myFunction);    function myFunction (event)    {      $("#myid").text(event.data.key1);    } });

Check Instance Equality in C# with Chash

AmitDiwan
Updated on 11-Dec-2019 07:36:06

110 Views

To return a value indicating whether this instance is equal to a specified object or UInt64, the code is as follows −Example Live Demousing System; public class Demo {    public static void Main() {       ulong val1 = 44565777;       ulong val2 = 77878787;       bool res = val1.Equals(val2);       Console.WriteLine("Return value (comparison) = "+res);       if (res)          Console.WriteLine("val1 = val2");       else          Console.WriteLine("val1 != val2");    } }OutputThis will produce the following output −Return value (comparison) = False val1 ... Read More

Disable Right Click Using jQuery

Alex Onsman
Updated on 11-Dec-2019 07:35:10

3K+ Views

To disable right click on a page, use the jQuery bind() method.ExampleYou can try to run the following code to learn how to disable right click:Live Demo $(document).ready(function(){    $(document).bind("contextmenu",function(e){       return false;    }); }); Right click is disabled on this page.

Advertisements