Practical uses of git reset –soft?

git reset is all about moving HEAD, and generally the branch ref.Question: what about the working tree and index?When employed with –soft, moves HEAD, most often updating the branch ref, and only the HEAD.This differ from commit –amend as: it doesn’t create a new commit. it can actually move HEAD to any commit (as commit … Read more

Maven skip tests

I am using Maven 2.2.1 and to build my project I used this command However, the build failed saying it couldn’t find one of the artifact. However, when I used: everything worked fine. So far I have been thinking that these 2 commands are equivalent. However, this link seems to suggest that -Dmaven.test.skip=true also skips … Read more

Difference between != and =! with an example(in C++)

This operation: determines if A is not equal to B. If they’re not equal, it evaluates to true. If they are equal, it evaluates to false. It’s just a boolean comparison operation. This operation: is not a boolean comparison. It sets the value of A to the negated value of B. (When used in this … Read more

What are good grep tools for Windows? [closed]

Based on recommendations in the comments, I’ve started using grepWin and it’s fantastic and free. (I’m still a fan of PowerGREP, but I don’t use it anymore.) I know you already mentioned it, but PowerGREP is awesome. Some of my favorite features are: Right-click on a folder to run PowerGREP on it Use regular expressions … Read more

How do I print out the contents of a vector?

If you have a C++11 compiler, I would suggest using a range-based for-loop (see below); or else use an iterator. But you have several options, all of which I will explain in what follows. range-based for-loop (C++11) In C++11 (and later) you can use the new range-based for-loop, which looks like this: The type char … Read more

What does the protected modifier mean?

In chapter 3.5 , it illustrates the protected modifier with the following words: More precisely, beyond being accessible within the class itself and to code within the same package, a protected member can also be accessed from a class through object references that are of at least the same type as the class that is, … Read more