Instead of the verbose setOnClickListener:
RxView.clicks(submitButton).subscribe(o -> log("submit button clicked!"));Observable
.just(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)| PackageInfo info; | |
| try { | |
| info = getPackageManager().getPackageInfo("ecentinela.mercadotes", PackageManager.GET_SIGNATURES); | |
| for (Signature signature : info.signatures) { | |
| MessageDigest md; | |
| md = MessageDigest.getInstance("SHA"); | |
| md.update(signature.toByteArray()); |
| gem 'json', github: 'flori/json', branch: 'v1.8' | |
| https://github.com/flori/json/issues/253#issuecomment-270294986 |
| import android.app.Activity; | |
| import android.app.Service; | |
| import android.content.BroadcastReceiver; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.IntentFilter; | |
| import android.os.Bundle; | |
| import android.os.IBinder; | |
| import android.support.v4.content.LocalBroadcastManager; |
| dirs=$(find . -name Podfile -print0 | xargs -0 -n1 dirname | sort --unique) | |
| top=$(pwd) | |
| for dir in $dirs | |
| do | |
| cd "$dir" | |
| pod install | |
| cd "$top" | |
| done |
| #!/bin/sh | |
| #----------------------------------------------------------------------------------------# | |
| # Hex over TCP with Echo and Netcat # | |
| #----------------------------------------------------------------------------------------# | |
| echo -n -e "x01x18x03" | nc 192.168.1.4 80 | |
| # The -n supresses outputting the trailing newline. | |
| # The -e enables the interpretation of backslash escapes -- allowing us to send hex codes. |
| #!/bin/bash | |
| # https://github.com/Homebrew/homebrew/issues/31125 | |
| for i in `brew list -1` | |
| do | |
| if [[ "$i" == python.* ]] || [[ "$i" == ruby.* ]] || [[ "$i" == android-* ]] | |
| then | |
| continue | |
| fi | |
| brew rm --force $i && brew install $i |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>CFBundleDevelopmentRegion</key> | |
| <string>en</string> | |
| <key>CFBundleExecutable</key> | |
| <string>$(EXECUTABLE_NAME)</string> | |
| <key>CFBundleIdentifier</key> | |
| <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> |
| package com.alexzh.recyclerviewsetemptyview; | |
| import android.content.Context; | |
| import android.support.annotation.Nullable; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.util.AttributeSet; | |
| import android.view.View; | |
| public class EmptyRecyclerView extends RecyclerView { | |
| private View mEmptyView; |