Tutorial by Examples: al

The AppCompat Support Library defines several useful styles for Buttons, each of which extend a base Widget.AppCompat.Button style that is applied to all buttons by default if you are using an AppCompat theme. This style helps ensure that all buttons look the same by default following the Material D...
The order in which operators are evaluated is determined by the operator precedence (see also the Remarks section). In $a = 2 * 3 + 4; $a gets a value of 10 because 2 * 3 is evaluated first (multiplication has a higher precedence than addition) yielding a sub-result of 6 + 4, which equals to 10...
To assert that a value is either true or false,: Assert.IsFalse(Settings.DoBadThings, "Bad things should not happen, disable DoBadThings."); Assert.IsTrue(magicNumber =< 42, "The magic number is greater than 42!"); You can also pass formatting parameters for the exception...
This query returns all cones with either a mint scoop or a vanilla scoop. minty_vanilla_cones = IceCream.objects.filter(scoops__contained_by=[MINT, VANILLA])
In order to define a Set of your own type you need to conform your type to Hashable struct Starship: Hashable { let name: String var hashValue: Int { return name.hashValue } } func ==(left:Starship, right: Starship) -> Bool { return left.name == right.name } Now you can cr...
Create a Loader object: var loader:Loader = new Loader(); //import Add listeners on the loader. Standard ones are complete and io/security errors loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); //when the loader is done loading, call this function loader.co...
pip install sqlalchemy For most common applications, particularly web applications, it is usually recommended that beginners consider using a supplementary library, such as flask-sqlalchemy. pip install flask-sqlalchemy
Detailed instructions on getting ssl set up or installed.
If you put your commonly used aliases into an .iex.exs file at the root of your app, IEx will load them for you on startup. alias App.{User, Repo}
php artisan route:list --method=GET --method=POST This will include all routes that accept GET and POST methods simultaneously.
Salt can be installed via : salt-bootstrap: a shell script, that can install salt (client and/or master packages) on standard Unix/Linux platform, Platform Specific binaries: available for Windows, Mac OS X and Linux, Package Management systems: available for pacman, apt-get, yum and other pack...
TreeWalker is a generator-like interface that makes recursively filtering nodes in a DOM tree easy and efficient. The following code concatenates the value of all Text nodes in the page, and prints the result. let parentNode = document.body; let treeWalker = document.createTreeWalker(parentNode, ...
Stored procedures can be created through a database management GUI (SQL Server example), or through a SQL statement as follows: -- Define a name and parameters CREATE PROCEDURE Northwind.getEmployee @LastName nvarchar(50), @FirstName nvarchar(50) AS -- Define the query to be...
Before to launch you to code with Pug, you need to have some prerequisits. You will need to install: NodeJS with NPM ExpressJS (optional) After installing NodeJS, you can check in your terminal the correct installation doing: $ node -v If successful, it will print the number of Node's ve...
Sometimes, you may want something to occur regardless of whatever exception happened, for example, if you have to clean up some resources. The finally block of a try clause will happen regardless of whether any exceptions were raised. resource = allocate_some_expensive_resource() try: do_stu...
Suggested Install Method Windows: Download and run the binary setup file. Linux(Debian): Run this command in your command line: $ apt-get install python-qt4 pyqt4-dev-tools qt4-designer OS X : Run this command in your command line: $ brew install pyqt Install Manually You can also downloa...
If you would like to stash only some diffs in your working set, you can use a partial stash. git stash -p And then interactively select which hunks to stash. As of version 2.13.0 you can also avoid the interactive mode and create a partial stash with a pathspec using the new push keyword. git ...
To find some number (more than one) of largest or smallest values of an iterable, you can use the nlargest and nsmallest of the heapq module: import heapq # get 5 largest items from the range heapq.nlargest(5, range(10)) # Output: [9, 8, 7, 6, 5] heapq.nsmallest(5, range(10)) # Output: [...
Packages are collections of R functions, data, and compiled code in a well-defined format. Public (and private) repositories are used to host collections of R packages. The largest collection of R packages is available from CRAN. Using CRAN A package can be installed from CRAN using following code...
To install package from local source file: install.packages(path_to_source, repos = NULL, type="source") install.packages("~/Downloads/dplyr-master.zip", repos=NULL, type="source") Here, path_to_source is absolute path of local source file. Another command that ...

Page 42 of 269