Tutorial by Examples: git

Applies the last stash without removing it from the stack git stash apply Or a specific stash git stash apply stash@{n}
To get your most recent stash after running git stash, use git stash apply To see a list of your stashes, use git stash list You will get a list that looks something like this stash@{0}: WIP on master: 67a4e01 Merge tests into develop stash@{1}: WIP on master: 70f0d95 Add user role to loca...
Start with an iterable which needs to be grouped lst = [("a", 5, 6), ("b", 2, 4), ("a", 2, 5), ("c", 2, 6)] Generate the grouped generator, grouping by the second element in each tuple: def testGroupBy(lst): groups = itertools.groupby(lst, key=lambda...
The underscore _ may be used as a digit separator. Being able to group digits in large numeric literals has a significant impact on readability. The underscore may occur anywhere in a numeric literal except as noted below. Different groupings may make sense in different scenarios or with different ...
To install packages directly from GitHub use the devtools package: library(devtools) install_github("authorName/repositoryName") To install ggplot2 from github: devtools::install_github("tidyverse/ggplot2") The above command will install the version of ggplot2 that corre...
Occasionally you'd want to catch an exception and throw it from a different thread or method while preserving the original exception stack. This can be done with ExceptionDispatchInfo: using System.Runtime.ExceptionServices; void Main() { ExceptionDispatchInfo capturedException = null; ...
DROP INDEX ix_cars_employee_id ON Cars; We can use command DROP to delete our index. In this example we will DROP the index called ix_cars_employee_id on the table Cars. This deletes the index entirely, and if the index is clustered, will remove any clustering. It cannot be rebuilt without rec...
Foreword Git can work with video game development out of the box. However the main caveat is that versioning large (>5 MB) media files can be a problem over the long term as your commit history bloats - Git simply wasn't originally built for versioning binary files. The great news is that since...
When initializing a Git repository for Unity development, there are a couple of things that need to be done. Unity Ignore Folders Not everything should be versioned in the repository. You can add the template below to your .gitignore file in the root of your repository. Or alternatively, you can c...
Creating List Items SP.SOD.executeOrDelayUntilScriptLoaded(createItem,"sp.js"); function createItem(){ var clientContext = new SP.ClientContext(); var list = clientContext.get_web().get_lists().getByTitle("List Title"); var newItem = list.addItem(); newIte...
Wildfly, part of the JBoss umbrella of projects, can also be executed via Docker. On a machine with Docker properly configured, run: $ docker run -it jboss/wildfly Once the image is pulled, the container starts and the following line can be seen: 09:44:49,225 INFO [org.jboss.as] (Controller Bo...
[^0-9] This will match all characters that are not ASCII digits. If Unicode digits are also to be negated, the following expression can be used, depending on your flavor/language settings: [^\d] This can be shortened to: \D You may need to enable Unicode character properties support expl...
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.
ClientContext clientContext = new ClientContext(siteUrl); SP.List oList = clientContext.Web.Lists.GetByTitle("Announcements"); CamlQuery camlQuery = new CamlQuery(); camlQuery.ViewXml = "<View><Query><Where><Geq><FieldRef Name='ID'/>" + &qu...
This example shows how to retrieve items from the server as well as get deeper properties of each list item. By default, the server will only return the minimum amount of data to represent the object. It is up to the caller to request additional information from the server. ClientContext clientCont...
ClientContext clientContext = new ClientContext(siteUrl); ListCollection collList = clientContext.Web.Lists; clientContext.Load( collList, lists => lists.Where( list => list.Hidden == false).Include( list => list.Title, list => list.Items.Take(10)...

Page 2 of 8