Tutorial by Examples: a

Reading numbers from standard input is a combination of reading strings and parsing such strings as numbers. The parse function is used to parse a string into the desired number type: julia> parse(Int, "17") 17 julia> parse(Float32, "-3e6") -3.0f6 The format expec...
Reading strings or bytes Files can be opened for reading using the open function, which is often used together with do block syntax: open("myfile") do f for (i, line) in enumerate(eachline(f)) print("Line $i: $line") end end Suppose myfile exists and its ...
Detailed instructions on getting iOS 10 set up or installed.
Sometimes we need to collect data from google spreadsheets. We can use gspread and oauth2client libraries to collect data from google spreadsheets. Here is a example to collect data: Code: from __future__ import print_function import gspread from oauth2client.client import SignedJwtAssertionCred...
Apart from CSS, model, and binding selectors, protractor can also locate elements using xpath View <ul> <li><a href='http://www.google.com'>Go to google</a></li> </ul> Code var googleLink= element(by.xpath('//ul/li/a')); expect(element.getText()).to.event...
XPath selectors can be used to select elements with specific attributes, such as class, id, title etc. By Class View: <div class="HakunaMatata"> Hakuna Matata </div> Code: var theLionKing= element(by.xpath('//div[@class="HakunaMatata"]')); expect(theLionKing.g...
lib.pagetitle = TEXT lib.pagetitle.data = page : title
Elastic Beanstalk (EB) is essentially a hybrid between Golden AMIs and CloudFormation, while vastly simplifying the learning curve of Puppet or Chef. An Elastic Beanstalk deployment is broken down into two components: Application and Environment. Application Consider this your top-level groupin...
Blue/Green deployment is a release technique that reduces downtime and risk by running two identical production environments (one called "Blue", the other called "Green"). At any one time, only one of the environments is serving live traffic, while the other is sitting idle. Whe...
Powershell supports standard conditional logic operators, much like many programming languages. These allow certain functions or commands to be run under particular circumstances. With an if the commands inside the brackets ({}) are only executed if the conditions inside the if(()) are met $test =...
Creating a new array is slightly confusing, as there is no real identifier for an array in awk. So, an array cannot really be initialised with our AWK code. An array in awk is associative, meaning that any string or number can be a key. This means that the array is more like a key-value pair dictio...
The following example will contain a block of code that is meant to be split into several source files, as denoted by // filename comments. Source Files // my_function.h /* Note how this header contains only a declaration of a function. * Header functions usually do not define implementations...
Templates require compile-time generation of code: a templated function, for example, will be effectively turned into multiple distinct functions once a templated function is parameterized by use in source code. This means that template function, member function, and class definitions cannot be del...
Query: query:/sitecore/content/home/foo/bar Result bar
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)
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 { internal UInt16 _yearOfCreation = 0; //Warning CS3008 Identifier '_numberOfDoors' is not CLS-compliant //Warning CS3003 Type of 'Car._numberOfDoors' is not CLS-compli...
using System; [assembly:CLSCompliant(true)] namespace CLSDoc { public class Car { //Warning CS3005 Identifier 'Car.CALCULATEAge()' differing only in case is not CLS-compliant public int CalculateAge() { return 0; } ...

Page 787 of 1099