The clearfix hack is a popular way to contain floats (N. Gallagher aka @necolas)
Not to be confused with the clear property, clearfix is a concept (that is also related to floats, thus the possible confusion). To contain floats, you've to add .cf or .clearfix class on the container (the parent)...
Sometimes it happens that a file was being tracked by git, but in a later point in time was added to .gitignore, in order to stop tracking it. It's a very common scenario to forget to clean up such files before its addition to .gitignore. In this case, the old file will still be hanging around in th...
To list local branches that contain a specific commit or tag
git branch --contains <commit>
To list local and remote branches that contain a specific commit or tag
git branch -a --contains <commit>
Prior to C++17, when writing a template non-type parameter, you had to specify its type first. So a common pattern became writing something like:
template <class T, T N>
struct integral_constant {
using type = T;
static constexpr T value = N;
};
using five = integral_constant&l...
Rename the remote named <old> to <new>. All remote-tracking branches and configuration settings for the remote are updated.
To rename a remote branch name dev to dev1 :
git remote rename dev dev1
Remove the remote named <name>. All remote-tracking branches and configuration settings for the remote are removed.
To remove a remote repository dev:
git remote rm dev
To print a test field (TestField) from a test feature class (TestFC) in a test file geodatabase (Test.gdb) located in a temporary folder (C:\Temp):
with arcpy.da.SearchCursor(r"C:\Temp\Test.gdb\TestFC",["TestField"]) as cursor:
for row in cursor:
print row[0]
In Emacs, basic search tool (I-Search) allows you to search after or before the location of your cursor.
To search for sometext after the location of your cursor (search-forward) hit C-s sometext. If you want to go to the next occurence of sometext, just press C-s again (and so on for the ne...
To search for text foo within a {} block surrounding the cursor use the following command (<ESC> - escape key, <CR> - enter key) :
vi{<ESC>/\%Vfoo<CR>
now you can jump between the matches within the block by pressing n and p. If you have hlsearch option enabled this will ...
There are some cases in mixins where there can be single or multiple arguments while using it. Let's take a case of border-radius where there can be single argument like border-radius:4px; or multiple arguments like border-radius:4px 3px 2px 1px;.
Traditional with Keyword Arguments mixing will be l...
A common and task of someone using the Linux Command Line (shell) is to search for files/directories with a certain name or containing certain text. There are 2 commands you should familiarise yourself with in order to accomplish this:
Find files by name
find /var/www -name '*.css'
This will...
.default-settings() {
padding: 4px;
margin: 4px;
font-size: 16px;
border: 1px solid gray;
}
#demo {
.default-settings;
}
The above example when compiled would only produce the following output. The .default-settings() mixin definition would not be output in the compiled CSS fi...
my_array = array('i', [1,2,3,4,5])
my_array.append(6)
# array('i', [1, 2, 3, 4, 5, 6])
Note that the value 6 was appended to the existing array values.
Setting overflow value to hidden,auto or scroll to an element, will clear all the floats within that element.
Note: using overflow:scroll will always show the scrollbox
Batch file command line arguments are parameter values submitted when starting the batch. They should be enclosed in quotes if they contain spaces. In a running batch file, the arguments are used for various purposes, i.e. redirection to :labels, setting variables, or running commands.
The argument...
If you want to clear your current Activity stack and launch a new Activity (for example, logging out of the app and launching a log in Activity), there appears to be two approaches.
1. Target (API >= 16)
Calling finishAffinity() from an Activity
2. Target (11 <= API < 16)
Intent intent ...