git branch --set-upstream-to=origin/branch local-branch
git branch --set-upstream-to=origin/feature/auth feature/auth
| # Vim | |
| *.sw? | |
| .*.un~ | |
| Session.vim | |
| # Python | |
| *.pyc | |
| # Ruby | |
| .rbenv-* |
| task testLogDecorator { | |
| tasks.withType(Test) { | |
| testLogging { | |
| events "passed", "skipped", "failed", "standardOut" | |
| showExceptions true | |
| exceptionFormat "full" | |
| showCauses true | |
| showStackTraces true | |
| debug { |
At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)
Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.
| public static boolean isNetworkAvailable (Context context) { | |
| if (connectedToTheNetwork(context)) { | |
| try { | |
| HttpURLConnection urlc = (HttpURLConnection) | |
| (new URL("http://clients3.google.com/generate_204") | |
| .openConnection()); | |
| urlc.setRequestProperty("User-Agent", "Android"); | |
| urlc.setRequestProperty("Connection", "close"); | |
| urlc.setConnectTimeout(1500); | |
| urlc.connect(); |
Original solution sacrifices new api lint check.
Here my solution:
int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
| echo "y" | android update sdk --no-ui; echo "yes" | apm upgrade; sudo softwareupdate -i -a; brew update; brew upgrade --all; brew cleanup; brew cask cleanup; npm update npm -g; npm update -g; sudo gem update |
You can use this class to realize a simple sectioned RecyclerView.Adapter without changing your code.
The RecyclerView should use a LinearLayoutManager.
You can use this code also with the TwoWayView with the ListLayoutManager (https://github.com/lucasr/twoway-view)
This is a porting of the class SimpleSectionedListAdapter provided by Google
Example: