Tutorial by Examples

Detailed instructions on getting mvvmcross set up or installed.
Similar to int but accepts only positive integers (useful for pagination when there is a page parameter. Define: module.config(['$urlMatcherFactoryProvider', function($urlMatcherFactory) { $urlMatcherFactory.type('page', { decode: function(val) { return +val; }, encode: function(val) ...
Define: module.config(['$urlMatcherFactoryProvider', function($urlMatcherFactory) { $urlMatcherFactory.type('boolean', { decode: function(val) { return val == true || val == "true" }, encode: function(val) { return val ? 1 : 0; }, equals: function(a, b) { return this.is(...
A java.util.Date object does not have a concept of time zone. There is no way to set a timezone for a Date There is no way to change the timezone of a Date object A Date object created with the new Date() default constructor will be initialised with the current time in the system default timezo...
In this code example, the char pointer p is initialized to the address of a string literal. Attempting to modify the string literal has undefined behavior. char *p = "hello world"; p[0] = 'H'; // Undefined behavior However, modifying a mutable array of char directly, or through a poin...
Smoothing, also known as blurring, is one of the most commonly used operation in Image Processing. The most common use of the smoothing operation is to reduce noise in the image for further processing. There are many algorithms to perform smoothing operation. We'll look at one of the most commonl...
Detailed instructions on getting resharper set up or installed.
With the shape-outside CSS property one can define shape values for the float area so that the inline content wraps around the shape instead of the float's box. CSS img:nth-of-type(1) { shape-outside: circle(80px at 50% 50%); float: left; width: 200px; } img:nth-of-type(2) { shape-ou...
The shape-margin CSS property adds a margin to shape-outside. CSS img:nth-of-type(1) { shape-outside: circle(80px at 50% 50%); shape-margin: 10px; float: left; width: 200px; } img:nth-of-type(2) { shape-outside: circle(80px at 50% 50%); shape-margin: 10px; float: right; w...
To fetch the latest version of an item in the current language: Sitecore.Context.Database.GetItem(new ID("{11111111-1111-1111-1111-111111111111}"));
If you need to get a specific language or version of an item, you can use these overloads of GetItem() Sitecore.Context.Database.GetItem("/sitecore/content/Sitecore", Language.Current, new Version(5));
To fetch the latest version of an item in the current language: Sitecore.Context.Database.GetItem("/sitecore/content/Sitecore")
A hexadecimal number is a value in base-16. There are 16 digits, 0-9 and the letters A-F (case does not matter). A-F represent 10-16. An octal number is a value in base-8, and uses the digits 0-7. A binary number is a value in base-2, and uses the digits 0 and 1. All of these numbers result in ...
let strings = "bananas,apples,pear".split(","); split returns an iterator. for s in strings { println!("{}", s) } And can be "collected" in a Vec with the Iterator::collect method. let strings: Vec<&str> = "bananas,apples,pear"....
A resource is a special type of variable that references an external resource, such as a file, socket, stream, document, or connection. $file = fopen('/etc/passwd', 'r'); echo gettype($file); # Out: resource echo $file; # Out: Resource id #2 There are different (sub-)types of resource. Y...
Python has only limited support for parsing ISO 8601 timestamps. For strptime you need to know exactly what format it is in. As a complication the stringification of a datetime is an ISO 8601 timestamp, with space as a separator and 6 digit fraction: str(datetime.datetime(2016, 7, 22, 9, 25, 59, 55...
Given a JList like JList myList = new JList(items); the selected items in the list can be modified through the ListSelectionModel of the JList: ListSelectionModel sm = myList.getSelectionModel(); sm.clearSelection(); // clears the selection sm.setSelectionInterval(inde...
var wsHost = "http://my-sites-url.com/path/to/echo-web-socket-handler"; var ws = new WebSocket(wsHost); var buffer = new ArrayBuffer(5); // 5 byte buffer var bufferView = new DataView(buffer); bufferView.setFloat32(0, Math.PI); bufferView.setUint8(4, 127); ws.binaryType = 'arrayb...
This example adds a list of places with image and name by using an ArrayList of custom Place objects as dataset. Activity layout The layout of the activity / fragment or where the RecyclerView is used only has to contain the RecyclerView. There is no ScrollView or a specific layout needed. <?x...
There can be situations when you decide that one set of display objects should always be above another set of objects, for example, arrows over heads, explosions over something that just exploded, etc. To perform this as simple as possible, you need to designate and create a set of Sprites, arrange ...

Page 250 of 1336