Tutorial by Examples: is

Creating a custom directive with isolated scope will separate the scope inside the directive from the outside scope, in order to prevent our directive from accidentally change the data in the parent scope and restricting it from reading private data from the parent scope. To create an isolated scop...
Some languages include a list data structure. Common Lisp, and other languages in the Lisp family, make extensive use of lists (and the name Lisp is based on the idea of a LISt Processor). However, Common Lisp doesn't actually include a primitive list datatype. Instead, lists exist by convention....
A cons cell, also known as a dotted pair (because of its printed representation), is simply a pair of two objects. A cons cell is created by the function cons, and elements in the pair are extracted using the functions car and cdr. (cons "a" 4) For instance, this returns a pair whose ...
To generate a list (tree view) of currently installed packages, use npm list ls, la and ll are aliases of list command. la and ll commands shows extended information like description and repository. Options The response format can be changed by passing options. npm list --json json - Sh...
Removing duplicate values in a list can be done by converting the list to a set (that is an unordered collection of distinct objects). If a list data structure is needed, then the set can be converted back to a list using the function list(): names = ["aixk", "duke", "edik&...
The reduce function can be used to sum the elements in a list. (reduce '+ '(1 2 3 4)) ;;=> 10 By default, reduce performs a left-associative reduction, meaning that the sum 10 is computed as (+ (+ (+ 1 2) 3) 4) The first two elements are summed first, and then that result (3) is added to...
Tips & Tricks to avoid nasty situations EC2 Instances and EBS Set IAM Roles. Unlike tags, the IAM Role is set once and for all on EC2 instanciation (even after 4 years) ! Try to identify and categorize beforehand your instances so you can give an them appropriate IAM roles. IAM Roles are ...
trait HelloWorld { public function sayHello() { echo 'Hello World!'; } } // Change visibility of sayHello class MyClass1 { use HelloWorld { sayHello as protected; } } // Alias method with changed visibility // sayHello visibility not changed class MyClass2 { u...
Problem: Some data needs to be passed to a scene loaded from a fxml. Solution Specify a controller using the fx:controller attribute and get the controller instance created during the loading process from the FXMLLoader instance used to load the fxml. Add methods for passing the data to the contr...
Sometimes it's a good idea to further secure your publishes by requiring a user login. Here is how you achieve this via Meteor. import { Recipes } from '../imports/api/recipes.js'; import { Meteor } from 'meteor/meteor'; Meteor.publish('recipes', function() { if(this.userId) { return Re...
Run command below to install nginx. sudo apt-get install nginx By default, Nginx automatically starts when it is installed. You can access the default Nginx landing page to confirm that the software is running properly by visiting your server's domain name or public IP address in your web browse...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCollection collList = oWebsite.Lists; clientContext.Load(collList); clientContext.ExecuteQuery(); foreach (List oList in collList) { Console.WriteLine("Title: {0} Created: {1}",...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCollection collList = oWebsite.Lists; clientContext.Load( collList, lists => lists.Include( list => list.Title, list => list.Id)); clientContext.ExecuteQuery(...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCollection collList = oWebsite.Lists; IEnumerable<List> resultCollection = clientContext.LoadQuery( collList.Include( list=>list.Title, list=>list.Id)); clientCo...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCollection collList = oWebsite.Lists; IEnumerable<SP.List> listInfo = clientContext.LoadQuery( collList.Include( list => list.Title, list => list.Fields.Include( ...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; ListCreationInformation listCreationInfo = new ListCreationInformation(); listCreationInfo.Title = "My Announcements List"; listCreationInfo.TemplateType = (int)ListTemplateType.Announcements;...
ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements"); SP.Field oField = oList.Fields.AddFieldAsXml("<Field DisplayName='MyField' Type='Number' />", true, AddFieldOptions.DefaultValue); ...
ClientContext clientContext = new ClientContext(siteUrl); Web oWebsite = clientContext.Web; List oList = oWebsite.Lists.GetByTitle("My Announcements List"); oList.DeleteObject(); clientContext.ExecuteQuery();
ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements"); CamlQuery camlQuery = new CamlQuery(); camlQuery.ViewXml = "<View><Query><Where><Geq><FieldRef Name='ID'/>" + &qu...
ClientContext clientContext = new ClientContext(siteUrl); ListCollection collList = clientContext.Web.Lists; clientContext.Load( collList, lists => lists.Where( list => list.Hidden == false).Include( list => list.Title, list => list.Items.Take(10)...

Page 28 of 109