-
Open a browser
# start an instance of firefox with selenium-webdriver driver = Selenium::WebDriver.for :firefox # :chrome -> chrome # :ie -> iexplore
- Go to a specified URL
56k: "https://123.campfirenow.com/images/56k.gif" | |
bell: ":bell:" | |
bezos: ":laughing::thought_balloon:" | |
bueller: "anyone?" | |
butts: ":open_hands: :smoking:" | |
clowntown: "https://123.campfirenow.com/images/clowntown.gif" | |
cottoneyejoe: ":notes::hear_no_evil::notes:" | |
crickets: "hears crickets chirping" | |
dadgummit: "dad gummit!! :fishing_pole_and_fish:" | |
dangerzone: "https://123.campfirenow.com/images/dangerzone.png" |
#!/usr/local/bin/ruby | |
# | |
# Need "nokogiri" for xml parse | |
# | |
require "nokogiri" | |
file = File.open(ARGV[0]) | |
xml_doc = Nokogiri::XML(file) | |
array = xml_doc.xpath("//string") |
You need to add the files below, and do this once in your base test runner:
ActionBarSherlock.registerImplementation(ActionBarSherlockRobolectric.class);
ActionBarSherlock.unregisterImplementation(ActionBarSherlockNative.class);
ActionBarSherlock.unregisterImplementation(ActionBarSherlockCompat.class);
import com.google.gson.Gson; | |
import com.google.gson.JsonSyntaxException; | |
import com.android.volley.AuthFailureError; | |
import com.android.volley.NetworkResponse; | |
import com.android.volley.ParseError; | |
import com.android.volley.Request; | |
import com.android.volley.Response; | |
import com.android.volley.Response.ErrorListener; | |
import com.android.volley.Response.Listener; |
import com.android.volley.toolbox.HurlStack; | |
import com.squareup.okhttp.OkHttpClient; | |
import java.io.IOException; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
/** | |
* An {@link com.android.volley.toolbox.HttpStack HttpStack} implementation which | |
* uses OkHttp as its transport. | |
*/ |
final class TokenRequest extends StringRequest { | |
TokenRequest(int method, String url, Listener<String> listener, | |
ErrorListener errorListener) { | |
super(method, url, listener, errorListener); | |
} | |
@Override | |
protected Map<String, String> getParams() throws AuthFailureError { | |
Map<String, String> params = new HashMap<String, String>(); | |
params.put("grant_type", "client_credentials"); |
Strg Alt Shift Key Function | |
x Einf Generate/Insert dialog | |
x x ENTER Statements completion like blocks and brackets | |
x x T Surrond codeblock with… | |
x W Select succesively increasing code blocks | |
x F11 bookmarks and mark the line with selected key | |
x F11 invokes a list of bookmarks. Pressing a key takes to associated bookmark. | |
x x Backspace go to most recent code edit. Hit again to go even further back. | |
x E recent opened files | |
x x E recent edited files |
Make your multiple type view adapter with annotations!
Gist for Making a Multiple View Types Adapter With Annotations
Pretty easy to use.
@DelegateAdapterType(itemType = 0)
/** | |
* Creates a 'ghost' bitmap version of the given source drawable (ideally a BitmapDrawable). | |
* In the ghost bitmap, the RGB values take on the values from the 'color' argument, while | |
* the alpha values are derived from the source's grayscaled RGB values. The effect is that | |
* you can see through darker parts of the source bitmap, while lighter parts show up as | |
* the given color. The 'invert' argument inverts the computation of alpha values, and looks | |
* best when the given color is a dark. | |
*/ | |
private Bitmap createGhostIcon(Drawable src, int color, boolean invert) { | |
int width = src.getIntrinsicWidth(); |