text:
<!doctype html>

		<meta charset="utf-8">
		<meta name="description" content="">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>DiceRoller</title>
		<link rel="stylesheet" href="css/bootstrap.min.css">
		<link rel="stylesheet" href="css/roller.css">
		<link rel="author" href="humans.txt">

Dice Box 1

					<button type="button" id="button1" class="btn btn-info">Roll</button>
					<button type="button" id="button2" class="btn btn-info">Damage</button>
					<button type="button" id="button3" class="btn btn-info">Damage + Armor</button>
					<button type="button" id="button4" class="btn btn-info">Armor</button>

					<button type="button" id="button5" class="btn btn-info">Skill</button>
					<button type="button" id="button6" class="btn btn-info">XD6</button>
					<button type="button" id="button7" class="btn btn-info">Vampire DA</button>
					<button type="button" id="button8" class="btn btn-info">D20</button>
					<button type="button" id="button9" class="btn btn-info">Confront</button>

redpajama_set_name: RedPajamaGithub


text:
function [ishappy, epslevel, cutoff] = strictCheck(f, values, pref)
%STRICTCHECK   Attempt to trim trailing Chebyshev coefficients in a CHEBTECH.
%   [ISHAPPY, EPSLEVEL, CUTOFF] = STRICTCHECK(F) returns an estimated location
%   CUTOFF at which the CHEBTECH F could be truncated to maintain an accuracy of
%   EPSLEVEL relative to F.VSCALE and F.HSCALE. ISHAPPY is TRUE if CUTOFF <
%   MIN(LENGTH(F.COEFFS), 2) or F.VSCALE = 0, and FALSE otherwise. If ISHAPPY is
%   false, EPSLEVEL returns an estimate of the accuracy achieved.
%
%   [ISHAPPY, EPSLEVEL, CUTOFF] = STRICTCHECK(F, VALUES, PREF) allows additional
%   preferences to be passed. In particular, one can adjust the target accuracy
%   with PREF.EPS. The VALUES field is ignored, but included for consistency
%   with other happiness checks.
%
%   STRICTCHECK tests to see if the absolute values of the entries in the tail
%   of coeffs, i.e., f.coeffs(1:TESTLENGTH,:), where
%       TESTLENGTH = n,             for n = 1:4
%       TESTLENGTH = 5,             for n = 5:44
%       TESTLENGTH = round((n-1)/8) for n > 44
%   all lie below the value in PREF.EPS. This value is returned in
%   EPSLEVEL and CUTOFF is the location of the first entry above EPSLEVEL in
%   absolute value.
%
%   STRICKCHECK differs from CLASSICCHECK() in that the tolerance on EPSLEVEL is
%   not relaxed by the length of the representation of F or by any finite
%   difference approximation of the gradient of F.
%
% See also STRICTCHECK, LOOSECHECK.

% Copyright 2014 by The University of Oxford and The Chebfun Developers.
% See http://www.chebfun.org/ for Chebfun information.

% Deal with special cases ------------------------------------------------------

% Determine n (the length of the input):
n = length(f);

% Assume we're not happy:
ishappy = false;

% Grab some preferences:
if ( nargin == 1 )
    pref = f.techPref();
    epslevel = pref.eps;
elseif ( isnumeric(pref) )
    epslevel = pref;
else
    epslevel = pref.eps;
end

% Convert scalar epslevel/tolerance inputs into vectors.
if ( isscalar(epslevel) )
    epslevel = repmat(epslevel, size(f.vscale));
end

% Deal with the trivial case:
if ( n < 2 )  % (Can't be simpler than a constant.)
    cutoff = n;
    return
end

% Check the vertical scale:
if ( max(f.vscale) == 0 )
    % This is the zero function, so we must be happy.
    ishappy = true;
    cutoff = 1;
    return
elseif ( any(isinf(f.vscale)) )
    % Inf located. No cutoff.
    cutoff = n;
    epslevel = inf*epslevel;
    return
end

% If one column of f is the zero function, we will get into trouble further
% down when we take the absolute value of the coefficients relative to vscale
% and compute the relative condition number estimate in happinessCheck.  We
% zero vscales by eps to avoid division by zero.
ind = f.vscale == 0;
f.vscale(ind) = eps;

% NaNs are not allowed.
if ( any(isnan(f.coeffs(:))) )
    error('CHEBFUN:CHEBTECH:strictCheck:nanEval', ...
        'Function returned NaN when evaluated.')
end

% Check for convergence and chop location --------------------------------------
testLength = min(n, max(5, round((n-1)/8)));
ac = bsxfun(@rdivide, abs(f.coeffs), f.vscale);
f.coeffs(bsxfun(@le, ac, epslevel)) = 0;
tail = f.coeffs(1:testLength,:);
if ( ~any(tail(:)) )
    cutoff = n - find(max(f.coeffs, [], 2) > 0, 1, 'first') + 1;
    ishappy = true;
else
    cutoff = n;
    % Estimate the epslevel:
    epslevel = mean(abs(tail));
end

end


text:
package com.google.cloud.retail.v2;

import com.google.api.core.ApiFuture;
import com.google.api.core.ApiFutures;
import com.google.api.gax.core.BackgroundResource;
import com.google.api.gax.paging.AbstractFixedSizeCollection;
import com.google.api.gax.paging.AbstractPage;
import com.google.api.gax.paging.AbstractPagedListResponse;
import com.google.api.gax.rpc.PageContext;
import com.google.api.gax.rpc.UnaryCallable;
import com.google.cloud.retail.v2.stub.ControlServiceStub;
import com.google.cloud.retail.v2.stub.ControlServiceStubSettings;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.protobuf.Empty;
import com.google.protobuf.FieldMask;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
 * Service Description: Service for modifying Control.
 *
 *
This class provides the ability to make remote calls to the backing service through method
 * calls that map to API methods. Sample code to get started:
 *
 *
{@code
 * // This snippet has been automatically generated and should be regarded as a code template only.
 * // It will require modifications to work:
 * // - It may require correct/in-range values for request initialization.
 * // - It may require specifying regional endpoints when creating the service client as shown in
 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
 *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
 *   Control control = Control.newBuilder().build();
 *   String controlId = "controlId-395080872";
 *   Control response = controlServiceClient.createControl(parent, control, controlId);
 * }
 * }

 *
 *
Note: close() needs to be called on the ControlServiceClient object to clean up resources such
 * as threads. In the example above, try-with-resources is used, which automatically calls close().
 *
 *
The surface of this class includes several types of Java methods for each of the API's
 * methods:
 *
 *

 *
A "flattened" method. With this type of method, the fields of the request type have been
 *       converted into function parameters. It may be the case that not all fields are available as
 *       parameters, and not every API method will have a flattened method entry point.
 *
A "request object" method. This type of method only takes one parameter, a request object,
 *       which must be constructed before the call. Not every API method will have a request object
 *       method.
 *
A "callable" method. This type of method takes no parameters and returns an immutable API
 *       callable object, which can be used to initiate calls to the service.
 *

 *
 *
See the individual methods for example code.
 *
 *
Many parameters require resource names to be formatted in a particular way. To assist with
 * these names, this class includes a format method for each type of name, and additionally a parse
 * method to extract the individual identifiers contained within names that are returned.
 *
 *
This class can be customized by passing in a custom instance of ControlServiceSettings to
 * create(). For example:
 *
 *
To customize credentials:
 *
 *
{@code
 * // This snippet has been automatically generated and should be regarded as a code template only.
 * // It will require modifications to work:
 * // - It may require correct/in-range values for request initialization.
 * // - It may require specifying regional endpoints when creating the service client as shown in
 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 * ControlServiceSettings controlServiceSettings =
 *     ControlServiceSettings.newBuilder()
 *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
 *         .build();
 * ControlServiceClient controlServiceClient = ControlServiceClient.create(controlServiceSettings);
 * }

 *
 *
To customize the endpoint:
 *
 *
{@code
 * // This snippet has been automatically generated and should be regarded as a code template only.
 * // It will require modifications to work:
 * // - It may require correct/in-range values for request initialization.
 * // - It may require specifying regional endpoints when creating the service client as shown in
 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 * ControlServiceSettings controlServiceSettings =
 *     ControlServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 * ControlServiceClient controlServiceClient = ControlServiceClient.create(controlServiceSettings);
 * }

 *
 *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
 * the wire:
 *
 *
{@code
 * // This snippet has been automatically generated and should be regarded as a code template only.
 * // It will require modifications to work:
 * // - It may require correct/in-range values for request initialization.
 * // - It may require specifying regional endpoints when creating the service client as shown in
 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 * ControlServiceSettings controlServiceSettings =
 *     ControlServiceSettings.newHttpJsonBuilder().build();
 * ControlServiceClient controlServiceClient = ControlServiceClient.create(controlServiceSettings);
 * }

 *
 *
Please refer to the GitHub repository's samples for more quickstart code snippets.
 */
@Generated("by gapic-generator-java")
public class ControlServiceClient implements BackgroundResource {
  private final ControlServiceSettings settings;
  private final ControlServiceStub stub;

  /** Constructs an instance of ControlServiceClient with default settings. */
  public static final ControlServiceClient create() throws IOException {
    return create(ControlServiceSettings.newBuilder().build());
  }

  /**
   * Constructs an instance of ControlServiceClient, using the given settings. The channels are
   * created based on the settings passed in, or defaults for any settings that are not set.
   */
  public static final ControlServiceClient create(ControlServiceSettings settings)
      throws IOException {
    return new ControlServiceClient(settings);
  }

  /**
   * Constructs an instance of ControlServiceClient, using the given stub for making calls. This is
   * for advanced usage - prefer using create(ControlServiceSettings).
   */
  public static final ControlServiceClient create(ControlServiceStub stub) {
    return new ControlServiceClient(stub);
  }

  /**
   * Constructs an instance of ControlServiceClient, using the given settings. This is protected so
   * that it is easy to make a subclass, but otherwise, the static factory methods should be
   * preferred.
   */
  protected ControlServiceClient(ControlServiceSettings settings) throws IOException {
    this.settings = settings;
    this.stub = ((ControlServiceStubSettings) settings.getStubSettings()).createStub();
  }

  protected ControlServiceClient(ControlServiceStub stub) {
    this.settings = null;
    this.stub = stub;
  }

  public final ControlServiceSettings getSettings() {
    return settings;
  }

  public ControlServiceStub getStub() {
    return stub;
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Creates a Control.
   *
   *
If the [Control][google.cloud.retail.v2.Control] to create already exists, an ALREADY_EXISTS
   * error is returned.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
   *   Control control = Control.newBuilder().build();
   *   String controlId = "controlId-395080872";
   *   Control response = controlServiceClient.createControl(parent, control, controlId);
   * }
   * }

   *
   * @param parent Required. Full resource name of parent catalog. Format:
   *     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
   * @param control Required. The Control to create.
   * @param controlId Required. The ID to use for the Control, which will become the final component
   *     of the Control's resource name.
   *
This value should be 4-63 characters, and valid characters are /[a-z][0-9]-_/.
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final Control createControl(CatalogName parent, Control control, String controlId) {
    CreateControlRequest request =
        CreateControlRequest.newBuilder()
            .setParent(parent == null ? null : parent.toString())
            .setControl(control)
            .setControlId(controlId)
            .build();
    return createControl(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Creates a Control.
   *
   *
If the [Control][google.cloud.retail.v2.Control] to create already exists, an ALREADY_EXISTS
   * error is returned.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
   *   Control control = Control.newBuilder().build();
   *   String controlId = "controlId-395080872";
   *   Control response = controlServiceClient.createControl(parent, control, controlId);
   * }
   * }

   *
   * @param parent Required. Full resource name of parent catalog. Format:
   *     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
   * @param control Required. The Control to create.
   * @param controlId Required. The ID to use for the Control, which will become the final component
   *     of the Control's resource name.
   *
This value should be 4-63 characters, and valid characters are /[a-z][0-9]-_/.
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final Control createControl(String parent, Control control, String controlId) {
    CreateControlRequest request =
        CreateControlRequest.newBuilder()
            .setParent(parent)
            .setControl(control)
            .setControlId(controlId)
            .build();
    return createControl(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Creates a Control.
   *
   *
If the [Control][google.cloud.retail.v2.Control] to create already exists, an ALREADY_EXISTS
   * error is returned.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   CreateControlRequest request =
   *       CreateControlRequest.newBuilder()
   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
   *           .setControl(Control.newBuilder().build())
   *           .setControlId("controlId-395080872")
   *           .build();
   *   Control response = controlServiceClient.createControl(request);
   * }
   * }

   *
   * @param request The request object containing all of the parameters for the API call.
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final Control createControl(CreateControlRequest request) {
    return createControlCallable().call(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Creates a Control.
   *
   *
If the [Control][google.cloud.retail.v2.Control] to create already exists, an ALREADY_EXISTS
   * error is returned.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   CreateControlRequest request =
   *       CreateControlRequest.newBuilder()
   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
   *           .setControl(Control.newBuilder().build())
   *           .setControlId("controlId-395080872")
   *           .build();
   *   ApiFuture<Control> future = controlServiceClient.createControlCallable().futureCall(request);
   *   // Do something.
   *   Control response = future.get();
   * }
   * }

   */
  public final UnaryCallable<CreateControlRequest, Control> createControlCallable() {
    return stub.createControlCallable();
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Deletes a Control.
   *
   *
If the [Control][google.cloud.retail.v2.Control] to delete does not exist, a NOT_FOUND error
   * is returned.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
   *   controlServiceClient.deleteControl(name);
   * }
   * }

   *
   * @param name Required. The resource name of the Control to delete. Format:
   *     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final void deleteControl(ControlName name) {
    DeleteControlRequest request =
        DeleteControlRequest.newBuilder().setName(name == null ? null : name.toString()).build();
    deleteControl(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Deletes a Control.
   *
   *
If the [Control][google.cloud.retail.v2.Control] to delete does not exist, a NOT_FOUND error
   * is returned.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
   *   controlServiceClient.deleteControl(name);
   * }
   * }

   *
   * @param name Required. The resource name of the Control to delete. Format:
   *     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final void deleteControl(String name) {
    DeleteControlRequest request = DeleteControlRequest.newBuilder().setName(name).build();
    deleteControl(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Deletes a Control.
   *
   *
If the [Control][google.cloud.retail.v2.Control] to delete does not exist, a NOT_FOUND error
   * is returned.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   DeleteControlRequest request =
   *       DeleteControlRequest.newBuilder()
   *           .setName(
   *               ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString())
   *           .build();
   *   controlServiceClient.deleteControl(request);
   * }
   * }

   *
   * @param request The request object containing all of the parameters for the API call.
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final void deleteControl(DeleteControlRequest request) {
    deleteControlCallable().call(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Deletes a Control.
   *
   *
If the [Control][google.cloud.retail.v2.Control] to delete does not exist, a NOT_FOUND error
   * is returned.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   DeleteControlRequest request =
   *       DeleteControlRequest.newBuilder()
   *           .setName(
   *               ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString())
   *           .build();
   *   ApiFuture<Empty> future = controlServiceClient.deleteControlCallable().futureCall(request);
   *   // Do something.
   *   future.get();
   * }
   * }

   */
  public final UnaryCallable<DeleteControlRequest, Empty> deleteControlCallable() {
    return stub.deleteControlCallable();
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Updates a Control.
   *
   *
[Control][google.cloud.retail.v2.Control] cannot be set to a different oneof field, if so an
   * INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2.Control] to update does
   * not exist, a NOT_FOUND error is returned.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   Control control = Control.newBuilder().build();
   *   FieldMask updateMask = FieldMask.newBuilder().build();
   *   Control response = controlServiceClient.updateControl(control, updateMask);
   * }
   * }

   *
   * @param control Required. The Control to update.
   * @param updateMask Indicates which fields in the provided
   *     [Control][google.cloud.retail.v2.Control] to update. The following are NOT supported:
   *

   *
[Control.name][google.cloud.retail.v2.Control.name]
   *

   *
If not set or empty, all supported fields are updated.
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final Control updateControl(Control control, FieldMask updateMask) {
    UpdateControlRequest request =
        UpdateControlRequest.newBuilder().setControl(control).setUpdateMask(updateMask).build();
    return updateControl(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Updates a Control.
   *
   *
[Control][google.cloud.retail.v2.Control] cannot be set to a different oneof field, if so an
   * INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2.Control] to update does
   * not exist, a NOT_FOUND error is returned.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   UpdateControlRequest request =
   *       UpdateControlRequest.newBuilder()
   *           .setControl(Control.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .build();
   *   Control response = controlServiceClient.updateControl(request);
   * }
   * }

   *
   * @param request The request object containing all of the parameters for the API call.
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final Control updateControl(UpdateControlRequest request) {
    return updateControlCallable().call(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Updates a Control.
   *
   *
[Control][google.cloud.retail.v2.Control] cannot be set to a different oneof field, if so an
   * INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2.Control] to update does
   * not exist, a NOT_FOUND error is returned.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   UpdateControlRequest request =
   *       UpdateControlRequest.newBuilder()
   *           .setControl(Control.newBuilder().build())
   *           .setUpdateMask(FieldMask.newBuilder().build())
   *           .build();
   *   ApiFuture<Control> future = controlServiceClient.updateControlCallable().futureCall(request);
   *   // Do something.
   *   Control response = future.get();
   * }
   * }

   */
  public final UnaryCallable<UpdateControlRequest, Control> updateControlCallable() {
    return stub.updateControlCallable();
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Gets a Control.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
   *   Control response = controlServiceClient.getControl(name);
   * }
   * }

   *
   * @param name Required. The resource name of the Control to get. Format:
   *     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final Control getControl(ControlName name) {
    GetControlRequest request =
        GetControlRequest.newBuilder().setName(name == null ? null : name.toString()).build();
    return getControl(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Gets a Control.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
   *   Control response = controlServiceClient.getControl(name);
   * }
   * }

   *
   * @param name Required. The resource name of the Control to get. Format:
   *     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final Control getControl(String name) {
    GetControlRequest request = GetControlRequest.newBuilder().setName(name).build();
    return getControl(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Gets a Control.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   GetControlRequest request =
   *       GetControlRequest.newBuilder()
   *           .setName(
   *               ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString())
   *           .build();
   *   Control response = controlServiceClient.getControl(request);
   * }
   * }

   *
   * @param request The request object containing all of the parameters for the API call.
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final Control getControl(GetControlRequest request) {
    return getControlCallable().call(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Gets a Control.
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   GetControlRequest request =
   *       GetControlRequest.newBuilder()
   *           .setName(
   *               ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString())
   *           .build();
   *   ApiFuture<Control> future = controlServiceClient.getControlCallable().futureCall(request);
   *   // Do something.
   *   Control response = future.get();
   * }
   * }

   */
  public final UnaryCallable<GetControlRequest, Control> getControlCallable() {
    return stub.getControlCallable();
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Lists all Controls by their parent [Catalog][google.cloud.retail.v2.Catalog].
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
   *   for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }

   *
   * @param parent Required. The catalog resource name. Format:
   *     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final ListControlsPagedResponse listControls(CatalogName parent) {
    ListControlsRequest request =
        ListControlsRequest.newBuilder()
            .setParent(parent == null ? null : parent.toString())
            .build();
    return listControls(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Lists all Controls by their parent [Catalog][google.cloud.retail.v2.Catalog].
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
   *   for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }

   *
   * @param parent Required. The catalog resource name. Format:
   *     `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final ListControlsPagedResponse listControls(String parent) {
    ListControlsRequest request = ListControlsRequest.newBuilder().setParent(parent).build();
    return listControls(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Lists all Controls by their parent [Catalog][google.cloud.retail.v2.Catalog].
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   ListControlsRequest request =
   *       ListControlsRequest.newBuilder()
   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .build();
   *   for (Control element : controlServiceClient.listControls(request).iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }

   *
   * @param request The request object containing all of the parameters for the API call.
   * @throws com.google.api.gax.rpc.ApiException if the remote call fails
   */
  public final ListControlsPagedResponse listControls(ListControlsRequest request) {
    return listControlsPagedCallable().call(request);
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Lists all Controls by their parent [Catalog][google.cloud.retail.v2.Catalog].
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   ListControlsRequest request =
   *       ListControlsRequest.newBuilder()
   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .build();
   *   ApiFuture<Control> future =
   *       controlServiceClient.listControlsPagedCallable().futureCall(request);
   *   // Do something.
   *   for (Control element : future.get().iterateAll()) {
   *     // doThingsWith(element);
   *   }
   * }
   * }

   */
  public final UnaryCallable<ListControlsRequest, ListControlsPagedResponse>
      listControlsPagedCallable() {
    return stub.listControlsPagedCallable();
  }

  // AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Lists all Controls by their parent [Catalog][google.cloud.retail.v2.Catalog].
   *
   *
Sample code:
   *
   *
{@code
   * // This snippet has been automatically generated and should be regarded as a code template only.
   * // It will require modifications to work:
   * // - It may require correct/in-range values for request initialization.
   * // - It may require specifying regional endpoints when creating the service client as shown in
   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
   * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
   *   ListControlsRequest request =
   *       ListControlsRequest.newBuilder()
   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
   *           .setPageSize(883849137)
   *           .setPageToken("pageToken873572522")
   *           .setFilter("filter-1274492040")
   *           .build();
   *   while (true) {
   *     ListControlsResponse response = controlServiceClient.listControlsCallable().call(request);
   *     for (Control element : response.getControlsList()) {
   *       // doThingsWith(element);
   *     }
   *     String nextPageToken = response.getNextPageToken();
   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
   *       request = request.toBuilder().setPageToken(nextPageToken).build();
   *     } else {
   *       break;
   *     }
   *   }
   * }
   * }

   */
  public final UnaryCallable<ListControlsRequest, ListControlsResponse> listControlsCallable() {
    return stub.listControlsCallable();
  }

  @Override
  public final void close() {
    stub.close();
  }

  @Override
  public void shutdown() {
    stub.shutdown();
  }

  @Override
  public boolean isShutdown() {
    return stub.isShutdown();
  }

  @Override
  public boolean isTerminated() {
    return stub.isTerminated();
  }

  @Override
  public void shutdownNow() {
    stub.shutdownNow();
  }

  @Override
  public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
    return stub.awaitTermination(duration, unit);
  }

  public static class ListControlsPagedResponse
      extends AbstractPagedListResponse<
          ListControlsRequest,
          ListControlsResponse,
          Control,
          ListControlsPage,
          ListControlsFixedSizeCollection> {

    public static ApiFuture<ListControlsPagedResponse> createAsync(
        PageContext<ListControlsRequest, ListControlsResponse, Control> context,
        ApiFuture<ListControlsResponse> futureResponse) {
      ApiFuture<ListControlsPage> futurePage =
          ListControlsPage.createEmptyPage().createPageAsync(context, futureResponse);
      return ApiFutures.transform(
          futurePage,
          input -> new ListControlsPagedResponse(input),
          MoreExecutors.directExecutor());
    }

    private ListControlsPagedResponse(ListControlsPage page) {
      super(page, ListControlsFixedSizeCollection.createEmptyCollection());
    }
  }

  public static class ListControlsPage
      extends AbstractPage<ListControlsRequest, ListControlsResponse, Control, ListControlsPage> {

    private ListControlsPage(
        PageContext<ListControlsRequest, ListControlsResponse, Control> context,
        ListControlsResponse response) {
      super(context, response);
    }

    private static ListControlsPage createEmptyPage() {
      return new ListControlsPage(null, null);
    }

    @Override
    protected ListControlsPage createPage(
        PageContext<ListControlsRequest, ListControlsResponse, Control> context,
        ListControlsResponse response) {
      return new ListControlsPage(context, response);
    }

    @Override
    public ApiFuture<ListControlsPage> createPageAsync(
        PageContext<ListControlsRequest, ListControlsResponse, Control> context,
        ApiFuture<ListControlsResponse> futureResponse) {
      return super.createPageAsync(context, futureResponse);
    }
  }

  public static class ListControlsFixedSizeCollection
      extends AbstractFixedSizeCollection<
          ListControlsRequest,
          ListControlsResponse,
          Control,
          ListControlsPage,
          ListControlsFixedSizeCollection> {

    private ListControlsFixedSizeCollection(List<ListControlsPage> pages, int collectionSize) {
      super(pages, collectionSize);
    }

    private static ListControlsFixedSizeCollection createEmptyCollection() {
      return new ListControlsFixedSizeCollection(null, 0);
    }

    @Override
    protected ListControlsFixedSizeCollection createCollection(
        List<ListControlsPage> pages, int collectionSize) {
      return new ListControlsFixedSizeCollection(pages, collectionSize);
    }
  }
}


text:
package com.vaadin.tests.components.grid;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import java.util.List;

import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;

import com.vaadin.testbench.elements.GridElement;
import com.vaadin.testbench.elements.GridElement.GridCellElement;
import com.vaadin.testbench.parallel.BrowserUtil;
import com.vaadin.tests.tb3.MultiBrowserTest;

public class GridResizeHiddenColumnTest extends MultiBrowserTest {

    @Before
    public void before() {
        openTestURL();
    }

    @Test
    public void testDragResizeHiddenColumnSize() {
        GridElement grid = $(GridElement.class).first();
        Actions action = new Actions(getDriver());

        // Check if column 'Last Name' hidden
        List<GridCellElement> headerCells = grid.getHeaderCells(0);
        assertEquals("There should be two visible columns", 2,
                headerCells.size());
        assertFalse("'Last Name' column should be hidden",
                containsText("Last Name", headerCells));

        // Resize first column
        int dragOffset = -100;
        int headerCellWidth = headerCells.get(0).getSize().getWidth();
        dragResizeColumn(headerCells.get(0), 1, dragOffset);

        // When dragging the resizer on IE8, the final offset will be smaller
        // (might be an issue with the feature that doesn't start resizing until
        // the cursor moved a few pixels)
        double delta = BrowserUtil.isIE8(getDesiredCapabilities()) ? 5d : 0;
        assertEquals("Column width should've changed by " + dragOffset + "px",
                headerCellWidth + dragOffset,
                headerCells.get(0).getSize().getWidth(), delta);

        // Make column 'Last Name' visible
        WebElement menuButton = grid.findElement(By.className("v-contextmenu"))
                .findElement(By.tagName("button"));
        action.click(menuButton).perform(); // Click on menu button

        WebElement sidebarPopup = findElement(
                By.className("v-grid-sidebar-popup"));
        WebElement visibilityToggle = findElementByText("Last Name",
                sidebarPopup.findElements(By.className("gwt-MenuItem")));
        // Click on "Last Name" menu item
        action.click(visibilityToggle).perform();

        // Check if column "Last Name" is visible
        headerCells = grid.getHeaderCells(0);
        assertEquals("There should be three visible columns", 3,
                headerCells.size());
        assertTrue("'Last Name' column should be visible",
                containsText("Last Name", headerCells));

        // Check if column "Last Name" has expanded width
        int widthSum = 0;
        for (GridCellElement e : headerCells) {
            widthSum += e.getSize().getWidth();
        }
        assertEquals("'Last Name' column should take up the remaining space",
                grid.getHeader().getSize().getWidth(), widthSum, 1d);
    }

    private WebElement findElementByText(String text,
            List<? extends WebElement> elements) {
        for (WebElement e : elements) {
            if (text.equalsIgnoreCase(e.getText())) {
                return e;
            }
        }
        return null;
    }

    private boolean containsText(String text,
            List<? extends WebElement> elements) {
        return !(findElementByText(text, elements) == null);
    }

    private void dragResizeColumn(GridCellElement headerCell, int posX,
            int offset) {
        Dimension size = headerCell.getSize();
        new Actions(getDriver())
                .moveToElement(headerCell, size.getWidth() + posX,
                        size.getHeight() / 2)
                .clickAndHold().moveByOffset(offset, 0).release().perform();
    }
}


text:
//
//  RecallController.h
//  MiniBatteryLogger
//
//  Created by delphine on 15-05-2007.
//  Copyright 2007 Claudio Procida - Emeraldion Lodge. All rights reserved.
//

#import <Cocoa/Cocoa.h>

enum {
	MBLBatteryRecalliBookPBookBatteryExchangeTab = 1,
	MBLBatteryRecallMacBookBatteryUpdateTab = 2,
	MBLBatteryRecallNotEligibleTab = 3
};

@interface NSString (BatteryRecallExtensions)

/* Returns YES if the serial number is eligible for the battery exchange program */
- (BOOL)isEligibleForiBookNPowerBookExchangeProgram;

@end

@class AppController;

@interface RecallController : NSWindowController {

	NSDictionary *countriesDict;

	IBOutlet NSPopUpButton *countryChooser;
	IBOutlet NSTextField *computerSerialNumberField;
	IBOutlet NSTextField *batterySerialNumberField;

	AppController *appController;
}

- (void)setAppController:(AppController *)controller;

- (IBAction)onlineHelp:(id)sender;
- (IBAction)countryChanged:(id)sender;
- (IBAction)moreInfo:(id)sender;
- (IBAction)checkiBookNPowerBookBatteryExchangeEligibility:(id)sender;

@end


text:
//
//  YWeatherAPI.h
//  Pods
//
//  Created by Nishanth Shanmugham on 3/24/2015.
//  The MIT License (MIT)
//
//  Copyright (c) 2015 Nishanth Shanmugham <nishanth.gerrard@gmail.com>
//
//  Permission is hereby granted, free of charge, to any person obtaining a copy
//  of this software and associated documentation files (the "Software"), to deal
//  in the Software without restriction, including without limitation the rights
//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom the Software is
//  furnished to do so, subject to the following conditions:
//
//  The above copyright notice and this permission notice shall be included in
//  all copies or substantial portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//  THE SOFTWARE.
//

#import <Foundation/Foundation.h>
@class CLLocation;

/*  Enumerated values for units */
typedef enum {
    MI, KM
} YWADistanceUnit;

typedef enum {
    IN, MB
} YWAPressureUnit;

typedef enum {
    F, C
} YWATemperatureUnit;

typedef enum {
    MPH, KMPH
} YWASpeedUnit;

/*  Keys to access objects success results
 *
 *  All values returned are NSString objects except for the objects accessed using these keys:
 *
 *  kYWASunriseInLocalTime
 *  kYWASunsetInLocalTime
 *  kYWADateComponents
 *  kYWAFiveDayForecasts
 *
 *
 *  The index key provides quick access to the detail you queried for. However, it maps to an empty in the methods under these sections:
 *
 *  Today's forecast
 *  All Current Weather Conditions
 *
 *
 *  See the comments for details            */
extern NSString* const kYWAIndex; // The detail asked for
// Pressure trend
extern NSString* const kYWAPressureTrend;
// Pressure
extern NSString* const kYWAPressureInIN;
extern NSString* const kYWAPressureInMB;
// Location
extern NSString* const kYWALatitude;
extern NSString* const kYWALongtitude;
extern NSString* const kYWALocation;
extern NSString* const kYWACity;
extern NSString* const kYWARegion;
extern NSString* const kYWACountry;
// Wind
extern NSString* const kYWAWindSpeedInMPH;
extern NSString* const kYWAWindSpeedInKMPH;
extern NSString* const kYWAWindDirectionInDegrees;
extern NSString* const kYWAWindDirectionInCompassPoints;
extern NSString* const kYWAWindChillInF;
extern NSString* const kYWAWindChillInC;
// Sunrise and Sunset
extern NSString* const kYWASunriseInLocalTime; // NSDateComponent with hour, minute, timeZone
extern NSString* const kYWASunsetInLocalTime; // NSDateComponent with hour, minute, timeZone
// Humdity
extern NSString* const kYWAHumidity;
// Visibility
extern NSString* const kYWAVisibilityInMI;
extern NSString* const kYWAVisibilityInKM;
// Short description
extern NSString* const kYWAShortDescription;
// Long description
extern NSString* const kYWALongDescription; // May contain HTML tags
// Condition
extern NSString* const kYWACondition;
extern NSString* const kYWAConditionNumber;
// Temperature
extern NSString* const kYWATemperatureInF;
extern NSString* const kYWATemperatureInC;
// Forecast conditions daily
extern NSString* const kYWAHighTemperatureForDay;
extern NSString* const kYWALowTemperatureForDay;
extern NSString* const kYWADateComponents; // NSDateCompoent with month, day, year
// Five day forecasts array key
extern NSString* const kYWAFiveDayForecasts; // NSArray containing NSDictionary objects for each day

/*  Comparison strings for empty index
 *  Compare with object for key kYWAIndex
 *  Currently, the today's forecast methods and the all current conditions methods return kYWAEmptyValue for the key kYWAIndex */
extern NSString* const kYWAEmptyValue;

/*  Returned by the condition methods when Yahoo weather has no condition string available
 *  See code 3200 at https://developer.yahoo.com/weather/documentation.html#codes */
extern NSString* const kYWANoDataAvailable;

/*  Comparison strings for wind direction
 *  Compare with object for key kYWAWindDirectionInCompassPoints */
extern NSString* const kYWAWindDirectionN;
extern NSString* const kYWAWindDirectionE;
extern NSString* const kYWAWindDirectionS;
extern NSString* const kYWAWindDirectionW;
// Quadrant 1
extern NSString* const kYWAWindDirectionNNE;
extern NSString* const kYWAWindDirectionNE;
extern NSString* const kYWAWindDirectionENE;
// Quadrant 2
extern NSString* const kYWAWindDirectionESE;
extern NSString* const kYWAWindDirectionSE;
extern NSString* const kYWAWindDirectionSSE;
// Quadrant 3
extern NSString* const kYWAWindDirectionSSW;
extern NSString* const kYWAWindDirectionSW;
extern NSString* const kYWAWindDirectionWSW;
// Quadrant 4
extern NSString* const kYWAWindDirectionWNW;
extern NSString* const kYWAWindDirectionNW;
extern NSString* const kYWAWindDirectionNNW;

/*  Comparison strings for pressure trends
 *  Compare with object for key kYWAPressureTrend */
extern NSString* const kYWAPressureTrendFalling;
extern NSString* const kYWAPressureTrendRising;

@interface YWeatherAPI : NSObject

/** @name Customizable properties */

@property (nonatomic, assign) BOOL cacheEnabled; // Defaults to YES
@property (nonatomic, assign) uint cacheExpiryInMinutes; // Defaults to 15 minutes
@property (nonatomic, assign) YWAPressureUnit defaultPressureUnit; // Defaults to IN
@property (nonatomic, assign) YWASpeedUnit defaultSpeedUnit; // Defaults to MPH
@property (nonatomic, assign) YWADistanceUnit defaultDistanceUnit; // Defaults to MI
@property (nonatomic, assign) YWATemperatureUnit defaultTemperatureUnit; // Defaults to F

/** @name Shared Instance */

/**
 *  Returns the shared singleton instance
 *
 *  @return The singleton object for the class
 */
+ (instancetype)sharedManager;

/** @name Today's Forecast */

/**
 *  Gets forecast information for the current day and includes a short description and low and high temperatures in the default temperature unit for a coordinate
 *
 *  @param coordinate Coordinate to get today's forecast for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) todaysForecastForCoordinate:(CLLocation*)coordinate
                             success:(void (^)(NSDictionary* result))success
                             failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets forecast information for the current day and includes a short description and low and high temperatures in the specified temperature unit for a coordinate
 *
 *  @param coordinate      Coordinate to get today's forecast for
 *  @param temperatureUnit Temperature unit for the response that overrides the default
 *  @param success         Callback block that receives the result on success
 *  @param failure         Callback block that receives the bad response and error on failure
 */
- (void) todaysForecastForCoordinate:(CLLocation*)coordinate
                     temperatureUnit:(YWATemperatureUnit)temperatureUnit
                             success:(void (^)(NSDictionary* result))success
                             failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets forecast information for the current day and includes a short description and low and high temperatures in the default temperature unit for a location
 *
 *  @param location Location to get today's forecast for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void) todaysForecastForLocation:(NSString*)location
                           success:(void (^)(NSDictionary* result))success
                           failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets forecast information for the current day and includes a short description and low and high temperatures in the specified temperature unit for a location
 *
 *  @param location        Location to get today's forecast for
 *  @param temperatureUnit Temperature unit for the response that overrides the default
 *  @param success         Callback block that receives the result on success
 *  @param failure         Callback block that receives the bad response and error on failure
 */
- (void) todaysForecastForLocation:(NSString*)location
                   temperatureUnit:(YWATemperatureUnit)temperatureUnit
                           success:(void (^)(NSDictionary* result))success
                           failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets forecast information for the current day and includes a short description and low and high temperatures in the default temperature unit for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get today's forecast for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) todaysForecastForWOEID:(NSString*)woeid
                        success:(void (^)(NSDictionary* result))success
                        failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets forecast information for the current day and includes a short description and low and high temperatures in the specified temperature unit for a Yahoo WOEID
 *
 *  @param woeid           Yahoo WOEID to get today's forecast for
 *  @param temperatureUnit Temperature unit for the response that overrides the default
 *  @param success         Callback block that receives the result on success
 *  @param failure         Callback block that receives the bad response and error on failure
 */
- (void) todaysForecastForWOEID:(NSString*)woeid
                temperatureUnit:(YWATemperatureUnit)temperatureUnit
                        success:(void (^)(NSDictionary* result))success
                        failure:(void (^)(id response, NSError* error))failure;

/** @name Five Day Forecast */

/**
 *  Gets forecast information for the next five days starting today and includes a short description and low and high temperatures in the default temperature unit for a coordinate
 *
 *  @param coordinate Coordinate to get five day forecast for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) fiveDayForecastForCoordinate:(CLLocation*)coordinate
                              success:(void (^)(NSDictionary* result))success
                              failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets forecast information for the next five days starting today and includes a short description and low and high temperatures in the specified temperature unit for a coordinate
 *
 *  @param coordinate      Coordinate to get five day forecast for
 *  @param temperatureUnit Temperature unit for the response that overrides the default
 *  @param success         Callback block that receives the result on success
 *  @param failure         Callback block that receives the bad response and error on failure
 */
- (void) fiveDayForecastForCoordinate:(CLLocation*)coordinate
                      temperatureUnit:(YWATemperatureUnit)temperatureUnit
                              success:(void (^)(NSDictionary* result))success
                              failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets forecast information for the next five days starting today and includes a short description and low and high temperatures in the default temperature unit for a location
 *
 *  @param location Location to get five day forecast for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void) fiveDayForecastForLocation:(NSString*)location
                            success:(void (^)(NSDictionary* result))success
                            failure:(void (^)(id response, NSError* error))failure;
/**
 *  Gets forecast information for the next five days starting today and includes a short description and low and high temperatures in the specified temperature unit for a location
 *
 *  @param location        Location to get five day forecast for
 *  @param temperatureUnit Temperature unit for the response that overrides the default
 *  @param success         Callback block that receives the result on success
 *  @param failure         Callback block that receives the bad response and error on failure
 */
- (void) fiveDayForecastForLocation:(NSString*)location
                    temperatureUnit:(YWATemperatureUnit)temperatureUnit
                            success:(void (^)(NSDictionary* result))success
                            failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets forecast information for the next five days starting today and includes a short description and low and high temperatures in the default temperature unit for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get five day forecast for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) fiveDayForecastForWOEID:(NSString*)woeid
                         success:(void (^)(NSDictionary* result))success
                         failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets forecast information for the next five days starting today and includes a short description and low and high temperatures in the specified temperature unit for a Yahoo WOEID
 *
 *  @param woeid           Yahoo WOEID to get five day forecast for
 *  @param temperatureUnit Temperature unit for the response that overrides the default
 *  @param success         Callback block that receives the result on success
 *  @param failure         Callback block that receives the bad response and error on failure
 */
- (void) fiveDayForecastForWOEID:(NSString*)woeid
                 temperatureUnit:(YWATemperatureUnit)temperatureUnit
                         success:(void (^)(NSDictionary* result))success
                         failure:(void (^)(id response, NSError* error))failure;

/** @name All Current Weather Conditions */

/**
 *  Gets all the current weather conditions for a coordinate
 *
 *  @param woeid   Coordinate to get weather condition for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) allCurrentConditionsForCoordinate:(CLLocation*)coordinate
                                   success:(void (^)(NSDictionary* result))success
                                   failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets all the current weather conditions for a location
 *
 *  @param woeid   Location to get weather condition for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) allCurrentConditionsForLocation:(NSString*)location
                                 success:(void (^)(NSDictionary* result))success
                                 failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets all the current weather conditions for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get weather condition for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) allCurrentConditionsForWOEID:(NSString*)woeid
                              success:(void (^)(NSDictionary* result))success
                              failure:(void (^)(id response, NSError* error))failure;

/** @name Current Weather Descriptions */

/**
 *  Gets the weather condition code for a coordinate
 *
 *  @param location   Coordinate to get weather condition for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 *  @see https://developer.yahoo.com/weather/documentation.html#codes
 *  @see -weatherConditionForCode:
 */
- (void) conditionCodeForCoordinate:(CLLocation*)coordinate
                            success:(void (^)(NSDictionary*))success
                            failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the weather condition code for a location
 *
 *  @param location   Location to get weather condition for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 *  @see https://developer.yahoo.com/weather/documentation.html#codes
 *  @see -weatherConditionForCode:
 */
- (void) conditionCodeForLocation:(NSString*)location
                          success:(void (^)(NSDictionary*))success
                          failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the weather condition code for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get weather condition for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 *  @see https://developer.yahoo.com/weather/documentation.html#codes
 *  @see -weatherConditionForCode:
 */
- (void) conditionCodeForWOEID:(NSString*)woeid
                       success:(void (^)(NSDictionary*))success
                       failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets a long description of the weather for the current day for a coordinate
 *
 *  @param coordinate Coordinate to get long description for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) longDescriptionForCoordinate:(CLLocation*)coordinate
                              success:(void (^)(NSDictionary* result))success
                              failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets a long description of the weather for the current day for a location
 *
 *  @param location Location to get long description for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void) longDescriptionForLocation:(NSString*)location
                            success:(void (^)(NSDictionary* result))success
                            failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets a long description of the weather for the current day for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get long description for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) longDescriptionForWOEID:(NSString*)woeid
                         success:(void (^)(NSDictionary* result))success
                         failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets a short description of the weather for the current day for a coordinate
 *
 *  @param coordinate Coordinate to get short description for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) shortDescriptionForCoordinate:(CLLocation*)coordinate
                               success:(void (^)(NSDictionary* result))success
                               failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets a short description of the weather for the current day for a location
 *
 *  @param location Location to get short description for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void) shortDescriptionForLocation:(NSString*)location
                             success:(void (^)(NSDictionary* result))success
                             failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets a short description of the weather for the current day for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get short description for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) shortDescriptionForWOEID:(NSString*)woeid
                          success:(void (^)(NSDictionary* result))success
                          failure:(void (^)(id response, NSError* error))failure;

/** @name Current Temperature conditions */

/**
 *  Gets the current temperature in the default temperature unit for a coordinate
 *
 *  @param coordinate Coordinate to get temperature for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) temperatureForCoordinate:(CLLocation*)coordinate
                          success:(void (^)(NSDictionary* result))success
                          failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current temperature in the specified temperature unit for a coordinate
 *
 *  @param coordinate      Coordinate to get temperature for
 *  @param temperatureUnit Temperature unit for the response that overrides the default
 *  @param success         Callback block that receives the result on success
 *  @param failure         Callback block that receives the bad response and error on failure
 */
- (void) temperatureForCoordinate:(CLLocation*)coordinate
                  temperatureUnit:(YWATemperatureUnit)temperatureUnit
                          success:(void (^)(NSDictionary* result))success
                          failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current temperature in the default temperature unit for a location
 *
 *  @param location Location to get temperature for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void) temperatureForLocation:(NSString*)location
                        success:(void (^)(NSDictionary* result))success
                        failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current temperature in the specified temperature unit for a location
 *
 *  @param location        Location to get temperature for
 *  @param temperatureUnit Temperature unit for the response that overrides the default
 *  @param success         Callback block that receives the result on success
 *  @param failure         Callback block that receives the bad response and error on failure
 */
- (void) temperatureForLocation:(NSString*)location
                temperatureUnit:(YWATemperatureUnit)temperatureUnit
                        success:(void (^)(NSDictionary* result))success
                        failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current temperature in the default temperature unit for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get temperature for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) temperatureForWOEID:(NSString*)woeid
                     success:(void (^)(NSDictionary* result))success
                     failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current temperature in the specified temperature unit for a Yahoo WOEID
 *
 *  @param woeid           Yahoo WOEID to get temperature for
 *  @param temperatureUnit Temperature unit for the response that overrides the default
 *  @param success         Callback block that receives the result on success
 *  @param failure         Callback block that receives the bad response and error on failure
 */
- (void) temperatureForWOEID:(NSString*)woeid
             temperatureUnit:(YWATemperatureUnit)temperatureUnit
                     success:(void (^)(NSDictionary* result))success
                     failure:(void (^)(id response, NSError* error))failure;

/** @name Current Pressure conditions */

/**
 *  Gets the current pressure trend for a coordinate
 *
 *  @param coordinate Coordinate to get pressure trend for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) pressureTrendForCoordinate:(CLLocation*)coordinate
                            success:(void (^)(NSDictionary* result))success
                            failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current pressure trend for a location
 *
 *  @param location Location to get pressure trend for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void) pressureTrendForLocation:(NSString*)location
                          success:(void (^)(NSDictionary* result))success
                          failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current pressure trend for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get pressure trend for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) pressureTrendForWOEID:(NSString*)woeid
                       success:(void (^)(NSDictionary* result))success
                       failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current pressure in the default pressure unit for a coordinate
 *
 *  @param coordinate Coordinate to get pressure for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) pressureForCoordinate:(CLLocation*)coordinate
                       success:(void (^)(NSDictionary* result))success
                       failure:(void (^)(id response, NSError* error))failure;
/**
 *  Gets the current pressure in the specified pressure unit for a coordinate
 *
 *  @param coordinate   Coordinate to get pressure for
 *  @param pressureUnit Pressure unit for the response that overrides the default
 *  @param success      Callback block that receives the result on success
 *  @param failure      Callback block that receives the bad response and error on failure
 */
- (void) pressureForCoordinate:(CLLocation*)coordinate
                  pressureUnit:(YWAPressureUnit)pressureUnit
                       success:(void (^)(NSDictionary* result))success
                       failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current pressure in the default pressure unit for a location
 *
 *  @param location Location to get pressure for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void) pressureForLocation:(NSString*)location
                     success:(void (^)(NSDictionary* result))success
                     failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current pressure in the specified pressure unit for a location
 *
 *  @param location     Location to get pressure for
 *  @param pressureUnit Pressure unit for the response that overrides the default
 *  @param success      Callback block that receives the result on success
 *  @param failure      Callback block that receives the bad response and error on failure
 */
- (void) pressureForLocation:(NSString*)location
                pressureUnit:(YWAPressureUnit)pressureUnit
                     success:(void (^)(NSDictionary* result))success
                     failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current pressure in the default pressure unit for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get pressure for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) pressureForWOEID:(NSString*)woeid
                  success:(void (^)(NSDictionary* result))success
                  failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current pressure in the specified pressure unit for a Yahoo WOEID
 *
 *  @param woeid        Yahoo WOEID to get pressure for
 *  @param pressureUnit Pressure unit for the response that overrides the default
 *  @param success      Callback block that receives the result on success
 *  @param failure      Callback block that receives the bad response and error on failure
 */
- (void) pressureForWOEID:(NSString*)woeid
             pressureUnit:(YWAPressureUnit)pressureUnit
                  success:(void (^)(NSDictionary* result))success
                  failure:(void (^)(id response, NSError* error))failure;

/** @name Current Visibility conditions */

/**
 *  Gets the current visibility distance in the default distance unit for a coordinate
 *
 *  @param coordinate Coordinate to get visibility for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) visibilityForCoordinate:(CLLocation*)coordinate
                         success:(void (^)(NSDictionary* result))success
                         failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current visibility distance in the specified distance unit for a coordinate
 *
 *  @param coordinate   Coordinate to get visibility for
 *  @param distanceUnit Distance unit for the response that overrides the default
 *  @param success      Callback block that receives the result on success
 *  @param failure      Callback block that receives the bad response and error on failure
 */
- (void) visibilityForCoordinate:(CLLocation*)coordinate
                    distanceUnit:(YWADistanceUnit)distanceUnit
                         success:(void (^)(NSDictionary* result))success
                         failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current visibility distance in the default distance unit for a location
 *
 *  @param location Location to get visibility for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void) visibilityForLocation:(NSString*)location
                       success:(void (^)(NSDictionary* result))success
                       failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current visibility distance in the specified distance unit for a location
 *
 *  @param location     Location to get visibility for
 *  @param distanceUnit Distance unit for the response that overrides the default
 *  @param success      Callback block that receives the result on success
 *  @param failure      Callback block that receives the bad response and error on failure
 */
- (void) visibilityForLocation:(NSString*)location
                  distanceUnit:(YWADistanceUnit)distanceUnit
                       success:(void (^)(NSDictionary* result))success
                       failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current visibility distance in the default distance unit for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get visibility for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) visibilityForWOEID:(NSString*)woeid
                    success:(void (^)(NSDictionary* result))success
                    failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current visibility distance in the specified distance unit for a Yahoo WOEID
 *
 *  @param woeid        Yahoo WOEID to get visibility for
 *  @param distanceUnit Distance unit for the response that overrides the default
 *  @param success      Callback block that receives the result on success
 *  @param failure      Callback block that receives the bad response and error on failure
 */
- (void) visibilityForWOEID:(NSString*)woeid
               distanceUnit:(YWADistanceUnit)distanceUnit
                    success:(void (^)(NSDictionary* result))success
                    failure:(void (^)(id response, NSError* error))failure;

/** @name Current Humidity conditions */

/**
 *  Gets the current humidity for a coordinate
 *
 *  @param coordinate Coordinate to get humidity for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) humidityForCoordinate:(CLLocation*)coordinate
                       success:(void (^)(NSDictionary* result))success
                       failure:(void (^)(id response, NSError *))failure;

/**
 *  Gets the current humidity for a location
 *
 *  @param location Location to get humidity for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void) humidityForLocation:(NSString*)location
                     success:(void (^)(NSDictionary* result))success
                     failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current humidity for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get humidity for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) humidityForWOEID:(NSString*) woeid
                  success:(void (^)(NSDictionary* result))success
                  failure:(void (^)(id response, NSError* error))failure;

/** @name Sunrise and Sunset times */

/**
 *  Gets the sunrise time for the current day for a coordinate in its local time
 *
 *  @param coordinate Coordinate to get sunrise time for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) sunriseForCoordinate:(CLLocation*)coordinate
                      success:(void (^)(NSDictionary* result))success
                      failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the sunrise time for the current day for a location in its local time
 *
 *  @param location Location to get sunrise time for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void) sunriseForLocation:(NSString*)location
                    success:(void (^)(NSDictionary* result))success
                    failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the sunrise time for the current day for a Yahoo WOEID in its local time
 *
 *  @param woeid   Yahoo WOEID to get sunrise time for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) sunriseForWOEID:(NSString*) woeid
                 success:(void (^)(NSDictionary* result))success
                 failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the sunset time for the current day for a coordinate in its local time
 *
 *  @param coordinate Coordinate to get sunset time for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) sunsetForCoordinate:(CLLocation*)coordinate
                     success:(void (^)(NSDictionary* result))success
                     failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the sunset time for the current day for a location in its local time
 *
 *  @param location Location to get sunset time for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void) sunsetForLocation:(NSString*) location
                   success:(void (^)(NSDictionary* result))success
                   failure:(void (^)(id response, NSError* error))failure;
/**
 *  Gets the sunset time for the current day for a Yahoo WOEID in its local time
 *
 *  @param woeid   Yahoo WOEID to get sunset time for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) sunsetForWOEID:(NSString*) woeid
                success:(void (^)(NSDictionary* result))success
                failure:(void (^)(id response, NSError* error))failure;

/** @name Current Wind conditions */

/**
 *  Gets the current wind chill temperature in the default temperature unit for a coordinate
 *
 *  @param coordinate Coordinate to get wind chill for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) windChillForCoordinate:(CLLocation*)coordinate
                        success:(void (^)(NSDictionary* result))success
                        failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current wind chill temperature in the specified temperature unit for a coordinate
 *
 *  @param coordinate      Coordinate to get wind chill for
 *  @param temperatureUnit Temperature unit for the response that overrides the default
 *  @param success         Callback block that receives the result on success
 *  @param failure         Callback block that receives the bad response and error on failure
 */
- (void) windChillForCoordinate:(CLLocation*)coordinate
                temperatureUnit:(YWATemperatureUnit)temperatureUnit
                        success:(void (^)(NSDictionary* result))success
                        failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current wind chill temperature in the default temperature unit for a location
 *
 *  @param location Location to get wind chill for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void) windChillForLocation:(NSString*)location
                      success:(void (^)(NSDictionary* result))success
                      failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current wind chill temperature in the specified temperature unit for a location
 *
 *  @param location        Location to get wind chill for
 *  @param temperatureUnit Temperature unit for the response that overrides the default
 *  @param success         Callback block that receives the result on success
 *  @param failure         Callback block that receives the bad response and error on failure
 */
- (void) windChillForLocation:(NSString*)location
              temperatureUnit:(YWATemperatureUnit)temperatureUnit
                      success:(void (^)(NSDictionary* result))success
                      failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current wind chill temperature in the default temperature unit for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get wind chill for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) windChillForWOEID:(NSString*) woeid
                   success:(void (^)(NSDictionary* result))success
                   failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current wind chill temperature in the specified temperature unit for a Yahoo WOEID
 *
 *  @param woeid           Yahoo WOEID to get wind chill for
 *  @param temperatureUnit Temperature unit for the response that overrides the default
 *  @param success         Callback block that receives the result on success
 *  @param failure         Callback block that receives the bad response and error on failure
 */
- (void) windChillForWOEID:(NSString*) woeid
           temperatureUnit:(YWATemperatureUnit)temperatureUnit
                   success:(void (^)(NSDictionary* result))success
                   failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current wind direction for a coordinate
 *
 *  @param coordinate Coordinate to get wind direction for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) windDirectionForCoordinate:(CLLocation*)coordinate
                            success:(void (^)(NSDictionary* result))success
                            failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current wind direction for a location
 *
 *  @param location Location to get wind direction for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void) windDirectionForLocation:(NSString*)location
                          success:(void (^)(NSDictionary* result))success
                          failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current wind direction for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get wind direction for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) windDirectionForWOEID:(NSString*)woeid
                       success:(void (^)(NSDictionary* result))success
                       failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current wind speed in the default speed unit for a coordinate
 *
 *  @param coordinate Coordinate to get wind speed for
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) windSpeedForCoordinate:(CLLocation*)coordinate
                        success:(void (^)(NSDictionary* result))success
                        failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current wind speed in the specified speed unit for a coordinate
 *
 *  @param coordinate Coordinate to get wind speed for
 *  @param speedUnit  Speed unit for the response that overrides the default
 *  @param success    Callback block that receives the result on success
 *  @param failure    Callback block that receives the bad response and error on failure
 */
- (void) windSpeedForCoordinate:(CLLocation*)coordinate
                      speedUnit:(YWASpeedUnit)speedUnit
                        success:(void (^)(NSDictionary* result))success
                        failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current wind speed in the default speed unit for a location
 *
 *  @param location Location to get wind speed for
 *  @param success  Callback block that receives the result on success
 *  @param failure  Callback block that receives the bad response and error on failure
 */
- (void)windSpeedForLocation:(NSString *)location
                     success:(void (^)(NSDictionary* result))success
                     failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current wind speed in the specified speed unit for a location
 *
 *  @param location  Location to get wind speed for
 *  @param speedUnit Speed unit for the response that overrides the default
 *  @param success   Callback block that receives the result on success
 *  @param failure   Callback block that receives the bad response and error on failure
 */
- (void)windSpeedForLocation:(NSString *)location
                   speedUnit:(YWASpeedUnit)speedUnit
                     success:(void (^)(NSDictionary* result))success
                     failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the current wind speed in the default speed unit for a Yahoo WOEID
 *
 *  @param woeid   Yahoo WOEID to get wind speed for
 *  @param success Callback block that receives the result on success
 *  @param failure Callback block that receives the bad response and error on failure
 */
- (void) windSpeedForWOEID:(NSString*)woeid
                   success:(void (^)(NSDictionary* result))success
                   failure:(void (^)(id response, NSError *error))failure;

/**
 *  Gets the current wind speed in the specified speed unit for a Yahoo WOEID
 *
 *  @param woeid     Yahoo WOEID to get wind speed for
 *  @param speedUnit Speed unit for the response that overrides the default
 *  @param success   Callback block that receives the result on success
 *  @param failure   Callback block that receives the bad response and error on failure
 */
- (void) windSpeedForWOEID:(NSString*)woeid
                 speedUnit:(YWASpeedUnit)speedUnit
                   success:(void (^)(NSDictionary* result))success
                   failure:(void (^)(id response, NSError *error))failure;

/** @name Working with the Cache */

/**
 *  Flushes the cache, removing all cached results
 *
 *  @see -removeCachedResultsForWOEID:
 */
- (void) clearCache;

/**
 *  Removes cached results for a WOEID
 *
 *  @param woeid A WOEID
 *  @see -clearCache
 */
- (void) removeCachedResultsForWOEID:(NSString*) woeid;

/**
 *  Removes cached results for a location
 *
 *  @param location Natural-language string representing a geographical location
 *  @warning Requires the cached location string verbatim for guaranteed removal
 *  @see -clearCache
 */
- (void) removeCachedResultsForLocation: (NSString*) location;

/** @name Converting between geographical location formats */

/**
 *  Returns a natural-language location string by reverse geocoding a coordinate
 *
 *  @param coordinate CLLocation object with valid latitude and longitude
 *  @param success    Callback block that receives the location on successful reverse geocoding
 *  @param failure    Callback block that receives nil and an NSError object on failure
 */
- (void) locationStringForCoordinate:(CLLocation*)coordinate
                             success:(void (^)(NSString* locationString))success
                             failure:(void (^)(id response, NSError* error))failure;

/**
 *  Gets the Yahoo WOEID for a natural-language location using Yahoo's GEO lookup
 *
 *  @param location Natural-language string representing a geographical location
 *  @param success  Callback block that receives the WOEID on a successful lookup
 *  @param failure  Callback block that receives the bad response and an NSError object on failure
 */
- (void) woeidForLocation:(NSString*)location
                  success:(void (^)(NSString* woeid))success
                  failure:(void (^)(id response, NSError *error))failure;

/** @name Converting between other units */

/**
 *  Converts speed units from MPH to KMPH or vice versa.
 *  For your convenience, consider setting the default distance unit or using a method that has a speed unit parameter instead.
 *
 *  @param toUnit   The speed unit to convert to
 *  @param fromUnit The speed unit to convert from
 *  @param speed    The value to convert
 *
 *  @return Converted speed value in the unit to convert to
 */
- (double) speedIn:(YWASpeedUnit)toUnit
              from:(YWASpeedUnit)fromUnit
             value:(double)speed;

/**
 *  Converts speed units from F to C or vice versa.
 *  For your convenience, consider setting the default temperature unit or using a method that has a temperature unit parameter instead.
 *
 *  @param toUnit      The temperature unit to convert to
 *  @param fromUnit    The temperature unit to convert from
 *  @param temperature The value to convert
 *
 *  @return Converted temperature value in the unit to convert to
 */
- (double) temperatureIn:(YWATemperatureUnit)toUnit
                    from:(YWATemperatureUnit)fromUnit
                   value:(double)temperature;

/**
 *  Converts speed units from IN to MN or vice versa.
 *  For your convenience, consider setting the default pressure unit or using a method that has a pressure unit parameter instead.
 *
 *  @param toUnit      The pressure unit to convert to
 *  @param fromUnit    The pressure unit to convert from
 *  @param temperature The value to convert
 *
 *  @return Converted pressure value in the unit to convert to
 */
- (double) pressureIn:(YWAPressureUnit)toUnit
                 from:(YWAPressureUnit)fromUnit
                value:(double)pressure;

/**
 *  Converts speed units from MI to KM or vice versa.
 *  For your convenience, consider setting the default distance unit or using a method that has a distance unit parameter instead.
 *
 *  @param toUnit      The distance unit to convert to
 *  @param fromUnit    The distance unit to convert from
 *  @param temperature The value to convert
 *
 *  @return Converted distance value in the unit to convert to
 */
- (double) distanceIn:(YWADistanceUnit)toUnit
                 from:(YWADistanceUnit)fromUnit
                value:(double)distance;

/**
 *  Returns a string reperesenting the approximate compass point direction for a degree
 *
 *  @param degree The degree to convert, should be in the range [0 .. 360] for proper behavior
 *
 *  @return The compass point string
 */
- (NSString*) compassPointForDegree:(double) degree;

@end