Tutorial by Examples: au

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...
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...
Let's have a basic failing program: #include <iostream> void fail() { int *p1; int *p2(NULL); int *p3 = p1; if (p3) { std::cout << *p3 << std::endl; } } int main() { fail(); } Build it (add -g to include debug info): g++ -g -o m...
Most modern distributions will come with BASH (Bourne Again SHell) pre-installed and configured as a default shell. The command (actually an executable binary, an ELF) that is responsible for changing shells in Linux is chsh (change shell). We can first check which shells are already installed and...
This object, Shape has a property image that depends on numberOfSides and sideWidth. If either one of them is set, than the image has to be recalculated. But recalculation is presumably long, and only needs to be done once if both properties are set, so the Shape provides a way to set both propertie...
defaultProps allows you to set default, or fallback, values for your component props. defaultProps are useful when you call components from different views with fixed props, but in some views you need to pass different value. Syntax ES5 var MyClass = React.createClass({ getDefaultProps: ...
With automatic reference counting (ARC), the compiler inserts retain, release, and autorelease statements where they are needed, so you don't have to write them yourself. It also writes dealloc methods for you. The sample program from Manual Memory Management looks like this with ARC: @interface M...
This simple CUDA program demonstrates how to write a function that will execute on the GPU (aka "device"). The CPU, or "host", creates CUDA threads by calling special functions called "kernels". CUDA programs are C++ programs with additional syntax. To see how it works...
Before ECMAScript 2015 (ES6), a parameter's default value could be assigned in the following way: function printMsg(msg) { msg = typeof msg !== 'undefined' ? // if a value was provided msg : // then, use that value in the reassignemnt 'Default value for ...
It is often useful for debugging purposes to find the root cause of an error. In order to examine an error value that implements std::error::Error: use std::error::Error; let orig_error = call_returning_error(); // Use an Option<&Error>. This is the return type of Error.cause(). le...
You can use an environment filter to change the author of commits. Just modify and export $GIT_AUTHOR_NAME in the script to change who authored the commit. Create a file filter.sh with contents like so: if [ "$GIT_AUTHOR_NAME" = "Author to Change From" ] then export GIT_A...
Provided an App.GoogleMap coffee script class with the google.maps.Map stored as @map and the google.maps.Markers stored as @markers, the map can be auto-zoomed, i.e. adjusted that all markers are visible, like this: on the map like this: # app/assets/javascripts/google_maps.js.coffee # ... cla...
;; disable automatic loading of packages after the init file (setq package-enable-at-startup nil) ;; instead load them explicitly (package-initialize) ;; refresh package descriptions (unless package-archive-contents (package-refresh-contents)) ;;; use-package initialization ;;; install ...
Example: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title></title> </head> <body> <textarea id="content"></textarea> <input type="button" id="copy...
In case of autologin or "remember me" cookie, the same quirks as in case of subdomain cookies are applying. But this time you need to configure user component, setting identityCookie array to desired cookie config. Open you application config file and add identityCookie parameters to use...
The "factory default" number of worksheets created in a new Excel workbook is generally set to three. Your VBA code can explicitly set the number of worksheets in a new workbook. '--- save the current Excel global setting With Application Dim oldSheetsCount As Integer oldSheets...

Page 10 of 37