Tutorial by Examples

document.getElementById('uniqueID') will retrieve <div id="uniqueID"></div> As long as an element with the given ID exists, document.getElementById will return only that element. Otherwise, it will return null. Note: IDs must be unique. Multiple elements cannot have the...
document.getElementsByClassName('class-name') will retrieve <a class="class-name">Any</a> <b class="class-name">tag</b> <div class="class-name an-extra-class">with that class.</div> If no existing elements contain the given c...
document.getElementsByTagName('b') will retrieve <b>All</b> <b>of</b> <b>the b elements.</b> If no elements with the given tag name exist, an empty collection will be returned.
Hashes can be freely converted to and from arrays. Converting a hash of key/value pairs into an array will produce an array containing nested arrays for pair: { :a => 1, :b => 2 }.to_a # => [[:a, 1], [:b, 2]] In the opposite direction a Hash can be created from an array of the same form...
Basics Anonymous functions are a powerful tool of the MATLAB language. They are functions that exist locally, that is: in the current workspace. However, they do not exist on the MATLAB path like a regular function would, e.g. in an m-file. That is why they are called anonymous, although they can h...
Firebase Authentication allows the users of your app to sign-in with social providers or their email+password. But what if you want to store additional information about a user, beyond what Firebase Authentication allows you to specify? Or what if you want to display a list of the users in your app...
Complete the Installation and setup part. This will create the project in Firebase console and will also install the base SDK in your Android App. Add the dependency for Firebase Realtime Database to your app-level build.gradle file: compile 'com.google.firebase:firebase-database:9.4.0' N...
<link rel="stylesheet" href="test.css" media="print"> Media specifies what style sheet should be used for what type of media. Using the print value would only display that style sheet for print pages. The value of this attribute can be any of the mediatype val...
This will create a folder with the same name as the project, i.e. /My.Project.Name $ git tfs clone http://tfs:8080/tfs/DefaultCollection/ $/My.Project.Name
Cloning from a git repository is ten times faster than cloning directly from TFVS and works well in a team environment. At least one team member will have to create the bare git repository by doing the regular git-tfs clone first. Then the new repository can be bootstrapped to work with TFVS. $ git...
The following assumes you will use kdiff3 for file diffing and although not essential it is a good idea. C:\> choco install kdiff3 Git can be installed first so you can state any parameters you wish. Here all the Unix tools are also installed and 'NoAutoCrlf' means checkout as is, commit as i...
Launch the Check In dialog for TFVS. $ git tfs checkintool This will take all of your local commits and create a single check-in.
Push all local commits to the TFVS remote. $ git tfs rcheckin Note: this will fail if Check-in Notes are required. These can be bypassed by adding git-tfs-force: rcheckin to the commit message.
Rust's From trait is a general-purpose trait for converting between types. For any two types TypeA and TypeB, impl From<TypeA> for TypeB indicates that an instance of TypeB is guaranteed to be constructible from an instance of TypeA. An implementation of From looks like this: struct TypeA...
std::convert::AsRef and std::convert::AsMut are used for cheaply converting types to references. For types A and B, impl AsRef<B> for A indicates that a &A can be converted to a &B and, impl AsMut<B> for A indicates that a &mut A can be converted to a &mut B. Thi...
The std::borrow::Borrow and std::borrow::BorrowMut traits are used to treat borrowed types like owned types. For types A and B, impl Borrow<B> for A indicates that a borrowed A may be used where a B is desired. For instance, std::collections::HashMap.get() uses Borrow for its get() method,...
The std::ops::Deref and std::ops::DerefMut traits are used for overloading the dereference operator, *x. For types A and B, impl Deref<Target=B> for A indicates that dereferencing a binding of &A will yield a &B and, impl DerefMut for A indicates that dereferencing a binding of...
This is a common gotcha with Laravel routes. Routes are matched in the order that they are declared. The first matching route is the one that is used. This example will work as expected: Route::get('/posts/{postId}/comments/{commentId}', 'CommentController@show'); Route::get('/posts/{postId}', 'P...
Stashing takes the dirty state of your working directory – that is, your modified tracked files and staged changes – and saves it on a stack of unfinished changes that you can reapply at any time. Stashing only modified files: Suppose you don't want to stash the staged files and only stash the mod...
Unlike the other helpers, this one uses static class helpers to serialize and deserialize, hence it is a little bit easier than the others to use. using Newtonsoft.Json; var rawJSON = "{\"Name\":\"Fibonacci Sequence\",\"Numbers\":[0, 1, 1, 2, 3, 5, 8, 13]}...

Page 335 of 1336