Tutorial by Examples: is

A binary tree is BST if it satisfies any one of the following condition: It is empty It has no subtrees For every node x in the tree all the keys (if any) in the left sub tree must be less than key(x) and all the keys (if any) in the right sub tree must be greater than key(x). So a straightf...
Download seed Run dotnet restore Run npm install Always. Enjoy. https://github.com/SamML/CoreAngular000
Also known as the Knuth shuffle and the Durstenfeld-Fisher-Yates shuffle. This shuffle takes an array of n elements and shuffles it. The algorithm is truly random in that, after shuffling, each permutation of the array is equally likely. In java: public static void shuffle(E[] deck) { //Fro...
A way to create a list is to place elements in two square brackets, separated by semicolons. The elements must have the same type. Example: > let integers = [1; 2; 45; -1];; val integers : int list = [1; 2; 45; -1] > let floats = [10.7; 2.0; 45.3; -1.05];; val floats : float list = [1...
function a(x = 5) { "use strict"; } is invalid JavaScript and will throw a SyntaxError because you cannot use the directive "use strict" in a function with Non-Simple Parameter list like the one above - default assignment x = 5 Non-Simple parameters include - Default a...
In this example I will be using oauth2 in rest api with redis database Important: You will need to install redis database on your machine, Download it from here for linux users and from here to install windows version, and we will be using redis manager desktop app, install it from here. ...
Create Selector for Enable/Disable Menu Item. selector.xml <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:color="@color/white" android:state_enabled="true&q...
This will add a simple widget which displays just a small message. add_action('wp_dashboard_setup', 'register_my_dashboard_widgets'); function register_my_dashboard_widgets() { wp_add_dashboard_widget('myInfo_widget', 'Important Information', 'display_infoWidget'); } ...
To calculate the sum of terms (of type float, int or big integer) of a number list, it is preferable to use List.sum In other cases, List.fold is the function that is best suited to calculate such a sum. Sum of complex numbers In this example, we declare a list of complex numbers and we calcu...
Bukkit uses an event based system that allows plugin developers to interact with and modify the server and specific actions that occur in the world. Creating an Event Handler Event handlers are methods that get called when their event occurs. They are generally public and void as well as named o...
var Human = function() { this.canWalk = true; this.canSpeak = true; // }; Person.prototype.greet = function() { if (this.canSpeak) { // checks whether this prototype has instance of speak this.name = "Steve" console.log('Hi, I am ' + this.name); } else{ c...
/// <summary> /// Defines a student. /// </summary> [DataContract] public class Student { /// <summary> /// Gets or sets the student number. /// </summary> [DataMember] public string StudentNumber { get; set; } /// <summary> ///...
Below code represents an example of Opt-Out approach using Serializable and NonSerialized attributes. /// <summary> /// Represents a student. /// </summary> [Serializable] public class Student { /// <summary> /// Gets or sets student number. /// </summary&gt...
You finished your app, tested on debug mode and it is working perfect. Now, you want to prepare it to publish in the Google Play Store. Xamarin documentation provides good informations in here: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/publishing_an_application/...
Consider next example: public interface A { default void foo() { System.out.println("A.foo"); } } public interface B { default void foo() { System.out.println("B.foo"); } } Here are two interfaces declaring default method foo with the same signature. If you wi...
public class RecyclerTouchListener implements RecyclerView.OnItemTouchListener { private GestureDetector gestureDetector; private RecyclerTouchListener.ClickListener clickListener; public RecyclerTouchListener(Context context, final RecyclerView recyclerView, final RecyclerTouchL...
This function tells whether a given time lies within a a given time interval. (require '[clj-time.core :as t]) (def date1 (t/date-time 2016 11 5)) (def date2 (t/date-time 2016 12 5)) (def test-date1 (t/date-time 2016 12 20)) (def test-date2 (t/date-time 2016 11 15)) (t/within? (t/interva...
Imagine many users all running a web application that is trying to increment a counter in the database. Each user must read the current count, add one and write out the updated value. To make sure no one reads the counter while someone else is is adding one we use a transaction: ref.transaction(fun...
Now, here are some common pitfalls which might come along your way when upgrading your Dynamics CRM system. The organisation database selected for the import is a different version than the organisation database that is currently deployedCRM Organization Database To fix this issue, we need to in...
To see all the built-in rules execute: Get-ScriptAnalyzerRule

Page 97 of 109