Tutorial by Examples: er

Current Item: bar (path: /sitecore/content/home/foo/bar) Query: query:./child/grandchild Result: grandchild (path: /sitecore/content/home/foo/bar/child/grandchild)
Query: query:/sitecore/content/[@@templatename='Homepage'] Result: home (name: home, path: /sitecore/content/home, template name: Homepage)
Tree structure: /sitecore /content /foo-site /home /my-account /bar-site /home /my-account /baz-site /home /my-account The template of each site item (foo-site, bar-site, b...
Overview The transpose function is one of Bosun's more powerful functions, but it also takes effort to understand. It is powerful because it lets us alert at different levels than the tag structure of the underlying data. Transpose changes the scope of your alert. This lets you scope things into l...
using System; [assembly:CLSCompliant(true)] namespace CLSDoc { public class Cat { internal UInt16 _age = 0; private UInt16 _daysTillVacination = 0; //Warning CS3003 Type of 'Cat.DaysTillVacination' is not CLS-compliant protected UInt16 DaysT...
using System; [assembly:CLSCompliant(true)] namespace CLSDoc { public class Car { //Warning CS3008 Identifier '_age' is not CLS-complian public int _age = 0; } } You can not start variable with _
using System; [assembly:CLSCompliant(true)] namespace CLSDoc { [CLSCompliant(false)] public class Animal { public int age = 0; } //Warning CS3009 'Dog': base type 'Animal' is not CLS-compliant public class Dog : Animal { } }
Breadth-first-search (BFS) is an algorithm for traversing or searching tree or graph data structures. It starts at the tree root (or some arbitrary node of a graph, sometimes referred to as a 'search key') and explores the neighbor nodes first, before moving to the next level neighbors. BFS was inve...
In a const-correct function, all passed-by-reference parameters are marked as const unless the function directly or indirectly modifies them, preventing the programmer from inadvertently changing something they didn't mean to change. This allows the function to take both const and non-cv-qualified ...
;;Find the nth Fibonacci number for any n > 0. ;; Precondition: n > 0, n is an integer. Behavior undefined otherwise. (defun fibonacci (n) (cond ( ;; Base case. ;; The first two Fibonacci numbers (indices 1 and 2) are 1 by defin...
Consider 2 MySQL Servers for replication setup, one is a Master and the other is a Slave. We are going to configure the Master that it should keep a log of every action performed on it. We are going to configure the Slave server that it should look at the log on the Master and whenever changes happ...
Whenever there is an error while running a query on the slave, MySQL stop replication automatically to identify the problem and fix it. This mainly because an event caused a duplicate key or a row was not found and it cannot be updated or deleted. You can skip such errors, even if this is not recomm...
UILabel *label=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, 320, 480)]; label.backgroundColor=[UIColor lightGrayColor]; NSMutableAttributedString *attributedString; attributedString = [[NSMutableAttributedString alloc] initWithString:@"Apply Underlining"]; [attributedString addAttrib...
@theme("reindeer")
First import #import <QuartzCore/QuartzCore.h> into your ViewController class. Here is how I set my view in code UIView *view1=[[UIView alloc]init]; view1.backgroundColor=[UIColor colorWithRed:255/255.0 green:193/255.0 blue:72/255.0 alpha:1.0]; CGRect view1Frame = view1.frame; view1Frame....
HTML to NSAttributedString conversion Code :- //HTML String NSString *htmlString=[[NSString alloc]initWithFormat:@"<!DOCTYPE html><html><body><h1>My First Heading</h1><p>My first paragraph.</p></body></html>"]; //Converting HTML s...
Using the PhantomData type like this allows you to use a specific type without needing it to be part of the Struct. use std::marker::PhantomData; struct Authenticator<T: GetInstance> { _marker: PhantomData<*const T>, // Using `*const T` indicates that we do not own a T } imp...
In SuiteScript 1.0, use nlobjContext.getRemainingUsage() to retrieve the remaining units. An nlobjContext reference is retrieved using the global nlapiGetContext function. // 1.0 var context = nlapiGetContext(); nlapiLogExecution("DEBUG", "Governance Monitoring", "Remai...
let inline getLength s = (^a: (member Length: _) s) //usage: getLength "Hello World" // or "Hello World" |> getLength // returns 11
// Record type Ribbon = {Length:int} // Class type Line(len:int) = member x.Length = len type IHaveALength = abstract Length:int let inline getLength s = (^a: (member Length: _) s) let ribbon = {Length=1} let line = Line(3) let someLengthImplementer = { new IHaveALength wit...

Page 305 of 417