Tutorial by Examples: is

The angular.isElement returns true if the argument passed to it is a DOM Element or a jQuery wrapped Element. angular.isElement(elem) This function is useful to type check if a passed argument is an element before being processed as such. Examples: angular.isElement(document.querySelector(&q...
In order to ssh into a server your identity's public key has to be added to the list of trusted keys. Most commonly this is done per-user: ssh-copy-id -i ~/.ssh/<identity>.pub <user>@<hostname> Which can be also done manually: cat ~/.ssh/<identity>.pub | ssh <user>...
The degree of parallelism is the maximum number of concurrently executing tasks that will be used to process the query. var sequence = Enumerable.Range(1, 10000); var evenNumbers = sequence.AsParallel() .WithDegreeOfParallelism(4) .Where(x =&gt...
Derives from Object Key members public Dispatcher Dispatcher { get; } Summary Most objects in WPF derive from DispatcherObject, which provides the basic constructs for dealing with concurrency and threading. Such objects are associated with a Dispatcher. Only the thread that the Dispatcher w...
public function drawDisplayObjectUsingBounds(source:DisplayObject):BitmapData { var bitmapData:BitmapData;//declare a BitmapData var bounds:Rectangle = source.getBounds(source);//get the source object actual size //round bounds to integer pixel values (to aviod 1px str...
With the appropriate storage backend running a new titan graph can be initialised via: graph = TitanFactory.open("config.properties"); Wehere config.properties defines several configurations relevant to the storage backend. Titan provides some sample configs in its downloadable package...
Pseudo-elements are often used to change the look of lists (mostly for unordered lists, ul). The first step is to remove the default list bullets: ul { list-style-type: none; } Then you add the custom styling. In this example, we will create gradient boxes for bullets. li:before { conte...
Hints to the compiler that access to an object should be as fast as possible. Whether the compiler actually uses the hint is implementation-defined; it may simply treat it as equivalent to auto. The only property that is definitively different for all objects that are declared with register is that...
Read the accelerometer Sensor with precision. This example allocates memory: void Update() { //Get Precise Accelerometer values Vector3 accelValue = preciseAccelValue(); Debug.Log("PRECISE X: " + accelValue.x + " Y: " + accelValue.y + " Z: " + acc...
The "listener" or "observer" pattern is the most common strategy for creating asynchronous callbacks in Android development. public class MyCustomObject { //1 - Define the interface public interface MyCustomObjectListener { public void onAction(String ac...
Rebasing when pulling If you are pulling in fresh commits from the remote repository and you have local changes on the current branch then git will automatically merge the remote version and your version. If you would like to reduce the number of merges on your branch you can tell git to rebase you...
DataTables has the capability to enable or disable a number of its features, such as paging or searching. To choose these options, simply select them in your initialization: $(document).ready(function() { $('#tableid').DataTable( { "paging": false, //Turn off paging, all r...
Locally created images can be pushed to Docker Hub or any other docker repo host, known as a registry. Use docker login to sign in to an existing docker hub account. docker login Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https...
Lists can populated with any data type as necessary, with the format Dim aList as New List(Of Type) For example: Create a new, empty list of Strings Dim aList As New List(Of String) Create a new list of strings, and populate with some data VB.NET 2005/2008: Dim aList as New List(Of String...
Dim aList as New List(Of Integer) aList.Add(1) aList.Add(10) aList.Add(1001) To add more than one item at a time use AddRange. Always adds to the end of the list Dim blist as New List(of Integer) blist.AddRange(alist) Dim aList as New List(of String) alist.AddRange({"one", &...
Dim aList As New List(Of String) aList.Add("Hello") aList.Add("Delete Me!") aList.Add("World") 'Remove the item from the list at index 1 aList.RemoveAt(1) 'Remove a range of items from a list, starting at index 0, for a count of 1) 'This will remove index 0, ...
Dim aList as New List(Of String) aList.Add("Hello, World") aList.Add("Test") Dim output As String = aList(0) output: Hello, World If you do not know the index of the item or only know part of the string then use the Find or FindAll method Dim aList as New List(Of S...
Let's say you have two commits d9e1db9 and 5651067 and want to see what happened between them. d9e1db9 is the oldest ancestor and 5651067 is the final descendant in the chain of commits. gitk --ancestry-path d9e1db9 5651067
If you have the version tag v2.3 you can display all commits since that tag. gitk v2.3..

Page 39 of 109