Tutorial by Examples: st

Basic Example Use the set_viewXml method of the SP.CamlQuery object to specify a CAML query to retrieve items. SP.SOD.executeOrDelayUntilScriptLoaded(showListItems,"core.js"); function showListItems(){ var clientContext = new SP.ClientContext(); var list = clientContext.get_...
SP.SOD.executeOrDelayUntilScriptLoaded(showDialog,"sp.js"); function showDialog(){ var dialogOptions = SP.UI.$create_DialogOptions(); dialogOptions.title = "Your Title Here!"; var dummyElement = document.createElement("div"); dummyElement.style.te...
var request = new XMLHttpRequest(); request.onreadystatechange = (e) => { if (request.readyState !== 4) { return; } if (request.status === 200) { console.log('success', request.responseText); } else { console.warn('error'); } }; request.open('GET', 'https://my...
Starting with Asp.net 4.5 web controls can take advantage from strongly-typed binding to get IntelliSense support and compiletime errors. Create a class, which holds your model: public class Album { public int Id { get; set; } public string Name { get; set; } public string Artist {...
Given the following definitions : public interface IMyInterface1 { string GetName(); } public interface IMyInterface2 { string GetName(); } public class MyClass : IMyInterface1, IMyInterface2 { string IMyInterface1.GetName() { return "IMyInterface1"...
This simple example provides an explanation on some functions I found extremely useful since I have started using MATLAB: cellfun, arrayfun. The idea is to take an array or cell class variable, loop through all its elements and apply a dedicated function on each element. An applied function can eith...
Let's say we have a class MyClass with no constructor argument: class MyClass In Scala we can instantiate it using below syntax: val obj = new MyClass() Or we can simply write: val obj = new MyClass But, if not paid attention, in some cases optional parenthesis may produce some unexpecte...
Information The ABSTRACT and FINAL additions to the METHODS and CLASS statements allow you to define abstract and final methods or classes. An abstract method is defined in an abstract class and cannot be implemented in that class. Instead, it is implemented in a subclass of the class. Abstra...
string outsidetext = "I am outside of bracket"; string.Format("{{I am in brackets!}} {0}", outsidetext); //Outputs "{I am in brackets!} I am outside of bracket"
Example : CLLocationManager *locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyBest; locationManager.distanceFilter = 5; E.g. In the above example code above, location changes of less than 5 m...
Firstly, include the ngStorage source in your index.html. An example injecting ngStorage src would be: <head> <title>Angular JS ngStorage</title> <script src = "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> &l...
List<T> is a list of a given type. Items can be added, inserted, removed and addressed by index. using System.Collections.Generic; var list = new List<int>() { 1, 2, 3, 4, 5 }; list.Add(6); Console.WriteLine(list.Count); // 6 list.RemoveAt(3); Console.WriteLine(list.Count); // 5 ...
Linux kernel source code can be found in https://www.kernel.org/ Download extract and enter to the kernel directory Type these commands step by steps in your terminal.(Choose the appropriate version you needed instead of linux-4.7.tar.gz ) wget http://www.kernel.org/pub/linux/kernel/v4.7/linux-4....
Any permission required by your application to access a protected part of the API or to interact with other applications must be declared in your AndroidManifest.xml file. This is done using the <uses-permission /> tag. Syntax <uses-permission android:name="string" android...
Declaration and usage. // a is const int, so it can't be changed const int a = 15; a = 12; // Error: can't assign new value to const variable a += 1; // Error: can't assign new value to const variable Binding of references and pointers int &b = a; // Error: ca...
int a = 0, b = 2; const int* pA = &a; // pointer-to-const. `a` can't be changed through this int* const pB = &a; // const pointer. `a` can be changed, but this pointer can't. const int* const pC = &a; // const pointer-to-const. //Error: Cannot assign to a const reference *pA = b...
Following code will release lock. lock(locker) { return 5; } For a detailed explanation, this SO answer is recommended.
The = operator is used for assignment. The == operator is used for comparison. One should be careful not to mix the two. Sometimes one mistakenly writes /* assign y to x */ if (x = y) { /* logic */ } when what was really wanted is: /* compare if x is equal to y */ if (x == y) { ...
An instance method is a method that's available on a particular instance of a class, after the instance has been instantiated: MyClass *instance = [MyClass new]; [instance someInstanceMethod]; Here's how you define one: @interface MyClass : NSObject - (void)someInstanceMethod; // "-&qu...
Detailed instructions on getting ibm-midrange set up or installed.

Page 82 of 369