This code is a direct copy of the code found on the Express.js site under Getting Started. I just followed installing and hello world from there to get a basic server up and running.
(index.js file)
This code is a direct copy of the code found on the Express.js site under Getting Started. I just followed installing and hello world from there to get a basic server up and running.
(index.js file)
| Spinner spinner = (Spinner) findViewById(R.id.main_spinner); | |
| ArrayAdapter<String> spinnerAdapter = new ArrayAdapter<>(getSupportActionBar().getThemedContext(), | |
| R.layout.spinner_list_style, | |
| getResources().getStringArray(R.array.countries)); | |
| spinnerAdapter.setDropDownViewResource(R.layout.spinner_dropdown_item); | |
| spinner.setAdapter(spinnerAdapter); |
| class EspressoTextInputLayoutUtils{ | |
| /* | |
| * Use this method to find the EditText within the TextInputLayout. Useful for typing into the TextInputLayout | |
| */ | |
| public static ViewInteraction onEditTextWithinTilWithId(@IdRes int textInputLayoutId) { | |
| //Note, if you have specified an ID for the EditText that you place inside | |
| //the TextInputLayout, use that instead - i.e, onView(withId(R.id.my_edit_text)); | |
| return onView(allOf(isDescendantOfA(withId(textInputLayoutId)), isAssignableFrom(EditText.class))); | |
| } | |
| package com.donnfelker.rxexample; | |
| import android.os.Bundle; | |
| import android.support.v7.app.ActionBarActivity; | |
| import rx.Subscriber; | |
| import rx.Subscription; | |
| import rx.android.schedulers.AndroidSchedulers; | |
| import rx.schedulers.Schedulers; |
| dependencies { | |
| compile 'io.reactivex:rxjava:1.0.12' | |
| compile 'com.squareup.okhttp:okhttp:2.5.0' | |
| compile 'com.squareup.retrofit:retrofit:2.0.0-beta1' | |
| compile 'com.squareup.retrofit:converter-gson:2.0.0-beta1' | |
| compile 'com.squareup.retrofit:adapter-rxjava:2.0.0-beta1' | |
| } |
| /* | |
| * Copyright 2015 Farbod Salamat-Zadeh | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| public class MapViewHolder extends RecyclerView.ViewHolder { | |
| private MapViewListItemView mMapViewListItemView; | |
| public MapViewHolder(MapViewListItemView mapViewListItemView) { | |
| super(mapViewListItemView); | |
| mMapViewListItemView = mapViewListItemView; | |
| } | |
| public void mapViewListItemViewOnCreate(Bundle savedInstanceState) { |
| #!/usr/bin/python | |
| # License for any modification to the original (linked below): | |
| # ---------------------------------------------------------------------------- | |
| # "THE BEER-WARE LICENSE" (Revision 42): | |
| # Sebastiano Poggi and Daniele Conti wrote this file. As long as you retain | |
| # this notice you can do whatever you want with this stuff. If we meet some day, | |
| # and you think this stuff is worth it, you can buy us a beer in return. | |
| import argparse, sys, subprocess, tempfile |
| OkHttpClient okHttpClient = new OkHttpClient(); | |
| try { | |
| int cacheSize = 10 * 1024 * 1024 // 10 MiB | |
| Cache cache = new Cache(getCacheDir(), cacheSize); | |
| okHttpClient.setCache(cache); | |
| } catch (IOException e) { | |
| Log.e(TAG, "Could not set cache", e); | |
| } | |
| // Forces cache. Used for cache connection |
| apply plugin: 'com.android.application' | |
| android { | |
| compileSdkVersion 22 | |
| buildToolsVersion "22.0.1" | |
| defaultConfig { | |
| applicationId "com.example.databaseexample" | |
| minSdkVersion 14 | |
| targetSdkVersion 22 |