Tutorial by Examples

ClientContext clientContext = new ClientContext("http://MyServer/sites/MySiteCollection "); GroupCollection collGroup = clientContext.Web.SiteGroups; Group oGroup = collGroup.GetById(6); UserCreationInformation userCreationInfo = new UserCreationInformation(); userCreationInfo.Email ...
ClientContext oClientContext = new ClientContext("http://MyServer/sites/MySiteCollection"); Web oWebsite = clientContext.Web; BasePermissions permissions = new BasePermissions(); permissions.Set(PermissionKind.CreateAlerts); permissions.Set(PermissionKind.ManageAlerts); RoleDefi...
ClientContext oClientContext = new ClientContext("http://MyServer/sites/MySiteCollection/MyWebSite"); Web oWebsite = clientContext.Web; Principal oUser = oWebsite.SiteUsers.GetByLoginName(@"DOMAIN\alias"); RoleDefinition oRoleDefinition = oWebsite.RoleDefinitions.GetByName...
ClientContext oClientContext = new ClientContext("http://MyServer/sites/MySiteCollection/MyWebSite"); Web oWebsite = clientContext.Web; GroupCreationInformation groupCreationInfo = new GroupCreationInformation(); groupCreationInfo.Title = "My New Group"; groupCreationInfo.D...
string siteUrl = "http://MyServer/sites/MySiteCollection"; ClientContext oContext = new ClientContext(siteUrl); SP.List oList = oContext.Web.Lists.GetByTitle("Announcements"); oList.BreakRoleInheritance(true, false); oContext.ExecuteQuery();
ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("MyList"); int itemId = 3; ListItem oListItem = oList.Items.GetById(itemId); oListItem.BreakRoleInheritance(false); User oUser = clientContext.Web.SiteUsers.GetByLoginNam...
ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("MyList"); int itemId = 2; ListItem oListItem = oList.Items.GetById(itemId); oListItem.BreakRoleInheritance(true); User oUser = clientContext.Web.SiteUsers.GetByLoginName...
string urlWebsite = "http://MyServer/sites/MySiteCollection"; ClientContext clientContext = new ClientContext(urlWebsite); Web oWebsite = clientContext.Web; List oList = oWebsite.Lists.GetByTitle("My List"); UserCustomActionCollection collUserCustomAction = oList.UserCustom...
string urlWebsite = "http://MyServer/sites/SiteCollection"; ClientContext clientContext = new ClientContext(urlWebsite); Web oWebsite = clientContext.Web; List oList = oWebsite.Lists.GetByTitle("My List"); UserCustomActionCollection collUserCustomAction = oList.UserCustomAc...
string urlWebsite = "http://MyServer/sites/MySiteCollection"; ClientContext clientContext = new ClientContext(urlWebsite); Web oWebsite = clientContext.Web; UserCustomActionCollection collUserCustomAction = oWebsite.UserCustomActions; UserCustomAction oUserCustomAction = collUserCu...
ClientContext oClientContext = new ClientContext("http://MyServer/sites/MySiteCollection"); File oFile = oClientContext.Web.GetFileByServerRelativeUrl("Default.aspx"); LimitedWebPartManager limitedWebPartManager = oFile.GetLimitedWebPartManager(PersonalizationScope.Shared); ...
ClientContext oClientContext = new ClientContext("http://MyServer/sites/MySiteCollection"); File oFile = oClientContext.Web.GetFileByServerRelativeUrl("Default.aspx"); LimitedWebPartManager limitedWebPartManager = oFile.GetLimitedWebPartManager(PersonalizationScope.Shared); ...
ClientContext oClientContext = new ClientContext("http://MyServer/sites/MySiteCollection"); File oFile = oClientContext.Web.GetFileByServerRelativeUrl("/sites/MySiteCollection/SitePages/Home.aspx "); LimitedWebPartManager limitedWebPartManager = oFile.GetLimitedWebPartManager(P...
Assume you've initialized a project with the following directory structure: /build app.js Then you add everything so you've created so far and commit: git init git add . git commit -m "Initial commit" Git will only track the file app.js. Assume you added a build step to your applicat...
Arrays in C can be seen as a contiguous chunk of memory. More precisely, the last dimension of the array is the contiguous part. We call this the row-major order. Understanding this and the fact that a cache fault loads a complete cache line into the cache when accessing uncached data to prevent sub...
You can order ActiveRecord query results by using .order: User.order(:created_at) #=> => [#<User id: 2, created_at: "2015-08-12 21:36:23">, #<User id: 11, created_at: "2015-08-15 10:21:48">] If not specified, ordering will be performed in ascending order. Y...
When you have a variable containing a struct, you can access its fields using the dot operator (.). However, if you have a pointer to a struct, this will not work. You have to use the arrow operator (->) to access its fields. Here's an example of a terribly simple (some might say "terribl...
extern crate serde; extern crate serde_json; #[macro_use] extern crate serde_derive; #[derive(Deserialize, Debug)] struct Request { // Use the result of a function as the default if "resource" is // not included in the input. #[serde(default="default_resource&quot...
You can give alias names to a struct: typedef struct Person { char name[32]; int age; } Person; Person person; Compared to the traditional way of declaring structs, programmers wouldn't need to have struct every time they declare an instance of that struct. Note that the name Pers...
Enums can have custom init methods that can be more useful than the default init?(rawValue:). Enums can also store values as well. This can be useful for storing the values they where initialized with and retrieving that value later. enum CompassDirection { case north(Int) case south(Int)...

Page 340 of 1336