Tutorial by Examples: v

$ git show # equivalent to 'git show HEAD' 'HEAD' names the commit on which you based the changes in the working tree, and is usually the symbolic name for the current branch. Many (but not all) commands that take revision parameter defaults to 'HEAD' if it is missing.
$ git reset --hard HEAD^ # discard last commit $ git rebase --interactive HEAD~5 # rebase last 4 commits A suffix ^ to a revision parameter means the first parent of that commit object. ^<n> means the <n>-th parent (i.e. <rev>^ is equivalent to <rev>^1). A...
In some cases the behavior of a command depends on whether it is given branch name, tag name, or an arbitrary revision. You can use "de-referencing" syntax if you need the latter. A suffix ^ followed by an object type name (tag, commit, tree, blob) enclosed in brace pair (for example v0.9...
$ git show HEAD^{/fix nasty bug} # find starting from HEAD $ git show ':/fix nasty bug' # find starting from any branch A colon (':'), followed by a slash ('/'), followed by a text, names a commit whose commit message matches the specified regular expression. This name returns the younge...
Instead of linking to an external file, you can also include the JS code as-is in your HTML: <script> // JavaScript code </script>
If we consider a heterogenous list, wherein the elements of the list have varied but known types, it might be desirable to be able to perform operations on the elements of the list collectively without discarding the elements' type information. The following example implements a mapping operation ov...
The command set is used to assign values in Tcl. When it is called with two arguments in the following manner, % set tempVar "This is a string." This is a string. it places the second argument ("This is a string.") in the memory space referenced by the first argument (tempVa...
Jetty is a Java-based, open-source project providing a HTTP server/client and javax.servlet container. Jetty also provides support for HTTP/2, JMX, JNDI, OSGi JAAS and other integrations. Jetty can be deployed as a standard distribution package or as an embeddable web server, allowing users to custo...
When a page is part of a series of articles, for instance, one can use prev and next to point to pages that are coming before and after. <link rel="prev" href="http://stackoverflow.com/documentation/java/topics"> <link rel="next" href="http://stackover...
To print the value of a pointer to an object (as opposed to a function pointer) use the p conversion specifier. It is defined to print void-pointers only, so to print out the value of a non void-pointer it needs to be explicitly converted ("casted*") to void*. #include <stdlib.h> /*...
Sometimes we need to fetch and print the value of a TensorFlow variable to guarantee our program is correct. For example, if we have the following program: import tensorflow as tf import numpy as np a = tf.Variable(tf.random_normal([2,3])) # declare a tensorflow variable b = tf.random_normal([2...
Consider the following three equations: x0 + 2 * x1 + x2 = 4 x1 + x2 = 3 x0 + x2 = 5 We can express this system as a matrix equation A * x = b with: A = np.array([[1, 2, 1], [0, 1, 1], [1, 0, 1]]) b = np.array([4, 3, 5]) Then, use np.linalg....
When dealing with an unbalanced design and/or non-orthogonal contrasts, Type II or Type III Sum of Squares are necessary. The Anova() function from the car package implements these. Type II Sum of Squares assumes no interaction between main effects. If interactions are assumed, Type III Sum of Squar...
An SKView does not need to fill the whole screen and can share space with other UI controls. You can even have more than one SKView displayed at once if you wish. To create a smaller SKView amongst other controls with Interface Builder, first create a normal ViewController, then drag and drop a new...
In Tcl itself, a string consisting of a single word does not need to be quoted. In the language of expression strings that expr evaluates, all operands must have an identifiable type. Numeric operands are written without any decoration: expr {455682 / 1.96e4} So are boolean constants: expr {tr...
Navigation controller can be embed in each tabs using storyboard it self. It can be like in the screenshot added. To add a Navigation Controller to a View Controller connecting from Tab Bar Controller, here are the flow Select the view controller for which we need to add navigation controller. H...
In order to print the value of a variable such as, set tempVar "This is a string." The argument in the puts statement is preceded by a $ sign, which tells Tcl to use the value of the variable. % set tempVar "This is a string." This is a string. % puts $tempVar This is a s...
This example describes how to create a SurfaceView with a dedicated drawing thread. This implementation also handles edge cases such as manufacture specific issues as well as starting/stopping the thread to save cpu time. import android.content.Context; import android.graphics.Canvas; import and...
GitHub expands Markdown syntax to provide new useful features. Header # Header1 ## Header2 ### Header3 #### Header4 ##### Header5 ###### Header6 H1 === H2 --- Emphasis *Italic1* _Italic2_ **Bold1** __Bold2__ ***Bold_Italic*** ~~Strikethrough~~ Horizontal Line --- *** ___ ...
// Default export export default {}; // Named export export const SomeVariable = {};

Page 105 of 296