Git – working on wrong branch – how to copy changes to existing topic branch
Sounds like all you need is the following: git stash git checkout branch123 git stash apply Then you should be back on your own branch without touching the master branch.
Sounds like all you need is the following: git stash git checkout branch123 git stash apply Then you should be back on your own branch without touching the master branch.
For HashSet<T>, the name is UnionWith. This is to indicate the distinct way the HashSet works. You cannot safely Add a set of random elements to it like in Collections, some elements may naturally evaporate. I think that UnionWith takes its name after “merging with another HashSet“, however, there’s an overload for IEnumerable<T> too.
This is a feature called template literals. They were called “template strings” in prior editions of the ECMAScript 2015 specification. Template literals are supported by Firefox 34, Chrome 41, and Edge 12 and above, but not by Internet Explorer. Examples: http://tc39wiki.calculist.org/es6/template-strings/ Official specification: ECMAScript 2015 Language Specification, 12.2.9 Template Literal Lexical Components (a bit dry) Template … Read more
python setup.py install is used to install (typically third party) packages that you’re not going to develop/modify/debug yourself. For your own stuff, you want to first install your package and then be able to frequently edit the code without having to re-install the package every time — and that is exactly what python setup.py develop … Read more
Here’s how you can do it without helper libs: handleChange: function (e) { // 1. Make a shallow copy of the items let items = […this.state.items]; // 2. Make a shallow copy of the item you want to mutate let item = {…items[1]}; // 3. Replace the property you’re intested in item.name=”newName”; // 4. Put … Read more
JDK is not available as a portable ZIP file, unfortunately. However, you can follow these steps: Create working JDK directory (C:\JDK in this case) Download latest version of JDK from Oracle (for example jdk-7u7-windows-x64.exe) Download and install 7-Zip (or download 7-Zip portable version if you are not administrator) With 7-Zip extract all the files from … Read more
You can do: $(“#submittername”).text(“testing”); or $(“#submittername”).html(“testing <b>1 2 3</b>”);
First make some data: > df = data.frame(matrix(rnorm(20), nrow=10)) > df X1 X2 1 0.7091409 -1.4061361 2 -1.1334614 -0.1973846 3 2.3343391 -0.4385071 4 -0.9040278 -0.6593677 5 0.4180331 -1.2592415 6 0.7572246 -0.5463655 7 -0.8996483 0.4231117 8 -1.0356774 -0.1640883 9 -0.3983045 0.7157506 10 -0.9060305 2.3234110 Then select some rows at random: > df[sample(nrow(df), 3), ] X1 X2 … Read more
Use DATENAME or DATEPART: SELECT DATENAME(dw,GETDATE()) — Friday SELECT DATEPART(dw,GETDATE()) — 6
psql -U username -d mydatabase -c ‘SELECT * FROM mytable’ If you’re new to postgresql and unfamiliar with using the command line tool psql then there is some confusing behaviour you should be aware of when you’ve entered an interactive session. For example, initiate an interactive session: psql -U username mydatabase mydatabase=# At this point … Read more