text:
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$DIR"
source "build-scripts/utilities/project-env.sh"

# send current version as version to update to
build-scripts/utilities/manage-deployments.sh -v "$CURRENT_VERSION"

# reconfigure proxy
PROXY_PODS="$(kubectl get pods -l "app=web-proxy" | egrep -o "^[a-z0-9-]+")"

for pod in "$PROXY_PODS"; do
echo "reconfiguring $pod"
kubectl exec "$pod" -t -- bash -c "usr/local/etc/haproxy/reconf.sh"
done


text:
@implementation OriginateRemoteArray

#pragma mark - NSObject

- (instancetype)init
{
    self = [super init];

    if (self) {
        _state = OriginateRemoteArrayStateNone;
    }

    return self;
}

#pragma mark - OriginateRemoteArray

- (void)load:(OriginateRemoteArrayLoadHandler)loadHandler
{
    if (!loadHandler) {
        return;
    }

    [self setLoading];

    loadHandler(^(NSArray *result, NSError *error) {
        if (!error) {
            [self setObjects:result];
        }
        else {
            [self setError:error];
        }
    });
}

- (void)loadFromArray:(NSArray *)array
{
    [self setObjects:array];
}

- (id)objectAtIndex:(NSUInteger)index
{
    if (index >= self.objects.count) {
        return nil;
    }

    return [self.objects objectAtIndex:index];
}

- (id)objectAtIndexedSubscript:(NSUInteger)index
{
    return [self objectAtIndex:index];
}

- (NSUInteger)indexOfObject:(id)object
{
    return [self.objects indexOfObject:object];
}

- (NSUInteger)count
{
    return self.objects.count;
}

- (NSArray *)allObjects
{
    return self.objects;
}

#pragma mark - OriginateRemoteArray (Transitions)

- (void)setObjects:(NSArray *)objects
{
    [self setState:OriginateRemoteArrayStateIdle error:nil];

    if (![_objects isEqualToArray:objects]) {
        [self willChangeValueForKey:NSStringFromSelector(@selector(allObjects))];
        _objects = objects ?: @[];
        [self didChangeValueForKey:NSStringFromSelector(@selector(allObjects))];
    }

    if ([self.delegate respondsToSelector:@selector(remoteArrayDidLoad:)]) {
        [self.delegate remoteArrayDidLoad:self];
    }
}

- (void)setLoading
{
    switch (self.state) {
        case OriginateRemoteArrayStateNone:
        case OriginateRemoteArrayStateIdle:
        {
            [self setState:OriginateRemoteArrayStateLoading error:nil];

            if ([self.delegate respondsToSelector:@selector(remoteArrayWillLoad:)]) {
                [self.delegate remoteArrayWillLoad:self];
            }

            break;
        }
        case OriginateRemoteArrayStateLoading:
        {
            NSLog(@"OriginateRemoteArray <WARNING> setLoading: Already (re)loading.");
            break;
        }
    }
}

- (void)setError:(NSError *)error
{
    [self setState:OriginateRemoteArrayStateIdle error:error];

    if ([self.delegate respondsToSelector:@selector(remoteArray:didFailWithError:)]) {
        [self.delegate remoteArray:self didFailWithError:error];
    }
}

#pragma mark - OriginateRemoteArray (States)

- (BOOL)isLoading
{
    return self.state == OriginateRemoteArrayStateLoading && [_objects count] == 0;
}

- (BOOL)isReloading
{
    return self.state == OriginateRemoteArrayStateLoading && _objects;
}

- (BOOL)isEmpty
{
    return self.state == OriginateRemoteArrayStateIdle &&
           self.lastError == nil &&
           [self count] == 0;
}

- (void)setState:(OriginateRemoteArrayState)state error:(NSError *)error
{
    _state = state;
    _lastError = error;
}

@end

redpajama_set_name: RedPajamaGithub


text:
import Backbone from 'backbone'
import objectPath from './object-path'
import deepCopy from './deep-copy'

const DEFAULTS = Object.freeze({
  pathSeparator: '.',
  pathParser: null,
})

const defaults = Object.assign({}, DEFAULTS)

function updateObjectPath() {
  objectPath.pathSeparator = defaults.pathSeparator

  const { pathParser } = defaults
  if (typeof pathParser === 'function' || pathParser == null) {
    objectPath.pathParser = pathParser
  }

  return objectPath
}

function isObject(value) {
  return value != null && typeof value === 'object'
}

/**
 * @class
 * @see http://backbonejs.org/#Model
 *
 * @example
 * class Person extends DeepModel {...}
 *
 * // or
 * const Person = DeepModel.extend({...})
 */
export default class DeepModel extends Backbone.Model {
  /**
   * this module's version.
   */
  static get VERSION() {
    return '0.0.0'
  }

  /**
   * Update default settings.
   *
   * @param {Object} [settings={}] reset if `null`
   * @param {string} [settings.pathSeparator='/']
   * @param {function(path: string): Array.<string>} [settings.pathParser] ignore if returns `[]`
   * @returns {Object}
   *
   * @example
   * DeepModel.defaults({anySetting: true})
   * DeepModel.defaults(null) // reset!
   *
   * @example
   * DeepModel.defaults({pathSeparator: '/'})
   *
   * const model = new DeepModel()
   * model.set('a', {})
   * model.set('a/b', 1)
   * model.get('a/b') //=> 1
   *
   * @example
   * DeepModel.defaults({
   *   pathParser(path) {
   *     if (path === '*') { return [] } // ignore!
   *     return path.split('_')
   *   }
   * })
   *
   * const model = new DeepModel()
   * model.set('a', {})
   * model.set('a_b', 1)
   * model.get('a_b') //=> 1
   * model.set('*', 2)
   * model.get('*') //=> undefined
   */
  static defaults(settings = {}) {
    return Object.assign(defaults, settings == null ? DEFAULTS : settings)
  }

  /**
   * @see http://backbonejs.org/#Model-get
   * @override
   * @param {string} attribute
   * @returns {*}
   *
   * @example
   * model.get('a.b')
   */
  get(attribute) {
    return updateObjectPath().get(this.attributes, attribute)
  }

  /**
   * @see http://backbonejs.org/#Model-set
   * @override
   * @param {string} attribute
   * @param {*}      value
   * @param {Object} [options]
   * @returns {DeepModel}
   *
   * @example
   * model.set({'a.b': 'value'})
   * model.set('a.b', 'value')
   */
  set(attribute, value, options) {
    if (attribute == null) {
      return this
    }

    const _ = updateObjectPath()

    let attrs
    if (typeof attribute === 'object') {
      attrs = attribute
      options = value // eslint-disable-line no-param-reassign
    } else {
      if (!_.pathParser && !_.hasSeparator(attribute)) {
        return super.set(attribute, value, options)
      }
      attrs = {}
      attrs[attribute] = value
    }

    const newAttrs = Object.keys(attrs).reduce((newObj, path) => {
      const paths = _.parse(path)

      if (paths.length === 0) {
        return newObj
      }
      if (paths.length === 1) {
        newObj[paths[0]] = attrs[path] // eslint-disable-line no-param-reassign
        return newObj
      }

      const rootPath = paths[0]
      let obj = newObj[rootPath]
      if (obj == null) {
        obj = deepCopy(this.attributes[rootPath])
      }
      if (!isObject(obj)) {
        throw new Error(`"${path}" does not exist in ${JSON.stringify(this)}`)
      }
      newObj[rootPath] = obj // eslint-disable-line no-param-reassign

      return _.set(newObj, paths, attrs[path])
    }, {})

    return super.set(newAttrs, options)
  }
}

DeepModel.extend = Backbone.Model.extend


text:
var Car = function($engine) {
	this.$id = "car";
	this.$engine = $engine;
	this.$wheel = null;
}

Car.prototype.run = function() {
	this.$engine.run();
	var res = this.$wheel.run();
	console.log('run car...');
	return 'car ' + res;
}

module.exports = Car;


text:
package nz.co.lolnet.mercury.api.lolcon;

import java.sql.SQLException;
import java.util.Arrays;
import java.util.List;

import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;

import com.google.gson.Gson;
import com.google.gson.JsonObject;

import nz.co.lolnet.mercury.Mercury;
import nz.co.lolnet.mercury.authentication.Authentication;
import nz.co.lolnet.mercury.entries.Data;
import nz.co.lolnet.mercury.entries.Database.Databases;
import nz.co.lolnet.mercury.entries.IEndpoint;
import nz.co.lolnet.mercury.mysql.MySQL;
import nz.co.lolnet.mercury.util.LogHelper;
import nz.co.lolnet.mercury.util.MercuryUtil;

@Path("/lolcon/createsign")
public class CreateSign implements IEndpoint {

	@Override
	public Response doGet() {
		return Response.status(Status.METHOD_NOT_ALLOWED).entity(MercuryUtil.createErrorResponse("Method not allowed", "Method not allowed")).build();
	}

	@Override
	public Response doPost() {
		return Response.status(Status.BAD_REQUEST).entity(MercuryUtil.createErrorResponse("Bad Request", "Bad request")).build();
	}

	@POST
	@Produces(MediaType.APPLICATION_JSON)
	public Response doPost(String request) {
		Authentication authentication = new Authentication();
		Response response = authentication.checkAuthentication(request, getPermissions());

		if (response.getStatus() != Status.ACCEPTED.getStatusCode()) {
			return response;
		}

		Data data = authentication.getData();
		if (!response.hasEntity() || !(response.getEntity() instanceof JsonObject)) {
			data.setMessage(authentication.doEncrypt(MercuryUtil.createErrorResponse("Internal Server Error", "Invalid response")));
			return Response.status(Status.INTERNAL_SERVER_ERROR).entity(new Gson().toJson(data)).build();
		}

		JsonObject jsonObject = (JsonObject) response.getEntity();
		if (!jsonObject.has("playerName") || !jsonObject.has("location") || !jsonObject.has("details")) {
			data.setMessage(authentication.doEncrypt(MercuryUtil.createErrorResponse("Bad Request", "Request is missing required arguments")));
			return Response.status(Status.BAD_REQUEST).entity(new Gson().toJson(data)).build();
		}

		String playerName = jsonObject.get("playerName").getAsString();
		String location = jsonObject.get("location").getAsString();
		String details = jsonObject.get("details").getAsString();

		try (MySQL mysql = new MySQL(Mercury.getInstance().getConfig().getDatabases().get(Databases.LOLCON.toString()))) {
			mysql.createConnection();
			mysql.setPreparedStatement(mysql.getConnection().prepareStatement("INSERT INTO `CommandSignDatabase`(`Location`, `Line3`, `Creator`) VALUES (?,?,?);"));
			mysql.getPreparedStatement().setString(1, location);
			mysql.getPreparedStatement().setString(2, details);
			mysql.getPreparedStatement().setString(3, playerName);
			mysql.getPreparedStatement().executeUpdate();

			jsonObject = null;

			return Response.status(Status.NO_CONTENT).build();
		} catch (SQLException ex) {
			LogHelper.error("Encountered an error processing in '" + getClass().getSimpleName() + "' - " + ex.getMessage());
			ex.printStackTrace();
		}
		return Response.status(Status.INTERNAL_SERVER_ERROR).entity(MercuryUtil.createErrorResponse("Internal Server Error", "Unable to process request")).build();
	}

	@Override
	public List<String> getPermissions() {
		return Arrays.asList("LolCon.CreateSign");
	}
}


text:
package io.grpc.netty;

import io.grpc.internal.WritableBuffer;
import io.netty.buffer.ByteBuf;

/**
 * The {@link WritableBuffer} used by the Netty transport.
 */
class NettyWritableBuffer implements WritableBuffer {

  private final ByteBuf bytebuf;

  NettyWritableBuffer(ByteBuf bytebuf) {
    this.bytebuf = bytebuf;
  }

  @Override
  public void write(byte[] src, int srcIndex, int length) {
    bytebuf.writeBytes(src, srcIndex, length);
  }

  @Override
  public void write(byte b) {
    bytebuf.writeByte(b);
  }

  @Override
  public int writableBytes() {
    return bytebuf.writableBytes();
  }

  @Override
  public int readableBytes() {
    return bytebuf.readableBytes();
  }

  @Override
  public void release() {
    bytebuf.release();
  }

  ByteBuf bytebuf() {
    return bytebuf;
  }
}


text:
from django.conf.urls import url

from . import views

urlpatterns = [
    url('^trezor/login/$', views.TrezorLoginView.as_view(), name="trezor_login")
]


text:
package com.amazonaws.services.elasticsearch;

import javax.annotation.Generated;

import com.amazonaws.services.elasticsearch.model.*;
import com.amazonaws.*;

/**
 * Abstract implementation of {@code AWSElasticsearch}. Convenient method forms pass through to the corresponding
 * overload that takes a request object, which throws an {@code UnsupportedOperationException}.
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AbstractAWSElasticsearch implements AWSElasticsearch {

    protected AbstractAWSElasticsearch() {
    }

    @Override
    public void setEndpoint(String endpoint) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public void setRegion(com.amazonaws.regions.Region region) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public AddTagsResult addTags(AddTagsRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public CreateElasticsearchDomainResult createElasticsearchDomain(CreateElasticsearchDomainRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public DeleteElasticsearchDomainResult deleteElasticsearchDomain(DeleteElasticsearchDomainRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public DescribeElasticsearchDomainResult describeElasticsearchDomain(DescribeElasticsearchDomainRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public DescribeElasticsearchDomainConfigResult describeElasticsearchDomainConfig(DescribeElasticsearchDomainConfigRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public DescribeElasticsearchDomainsResult describeElasticsearchDomains(DescribeElasticsearchDomainsRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public DescribeElasticsearchInstanceTypeLimitsResult describeElasticsearchInstanceTypeLimits(DescribeElasticsearchInstanceTypeLimitsRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public ListDomainNamesResult listDomainNames(ListDomainNamesRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public ListElasticsearchInstanceTypesResult listElasticsearchInstanceTypes(ListElasticsearchInstanceTypesRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public ListElasticsearchVersionsResult listElasticsearchVersions(ListElasticsearchVersionsRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public ListTagsResult listTags(ListTagsRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public RemoveTagsResult removeTags(RemoveTagsRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public UpdateElasticsearchDomainConfigResult updateElasticsearchDomainConfig(UpdateElasticsearchDomainConfigRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public void shutdown() {
        throw new java.lang.UnsupportedOperationException();
    }

    @Override
    public com.amazonaws.ResponseMetadata getCachedResponseMetadata(com.amazonaws.AmazonWebServiceRequest request) {
        throw new java.lang.UnsupportedOperationException();
    }

}


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.youtubereporting;

/**
 * Service definition for YouTubeReporting (v1).
 *
 *

 * Schedules reporting jobs containing your YouTube Analytics data and downloads the resulting bulk data reports in the form of CSV files.
 *

 *
 *

 * For more information about this service, see the
 * API Documentation
 *

 *
 *

 * This service uses {@link YouTubeReportingRequestInitializer} to initialize global parameters via its
 * {@link Builder}.
 *

 *
 * @since 1.3
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public class YouTubeReporting extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient {

  // Note: Leave this static initializer at the top of the file.
  static {
    com.google.api.client.util.Preconditions.checkState(
        com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 &&
        com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 15,
        "You are currently running with version %s of google-api-client. " +
        "You need at least version 1.15 of google-api-client to run version " +
        "1.28.0 of the YouTube Reporting API library.", com.google.api.client.googleapis.GoogleUtils.VERSION);
  }

  /**
   * The default encoded root URL of the service. This is determined when the library is generated
   * and normally should not be changed.
   *
   * @since 1.7
   */
  public static final String DEFAULT_ROOT_URL = "https://youtubereporting.googleapis.com/";

  /**
   * The default encoded service path of the service. This is determined when the library is
   * generated and normally should not be changed.
   *
   * @since 1.7
   */
  public static final String DEFAULT_SERVICE_PATH = "";

  /**
   * The default encoded batch path of the service. This is determined when the library is
   * generated and normally should not be changed.
   *
   * @since 1.23
   */
  public static final String DEFAULT_BATCH_PATH = "batch";

  /**
   * The default encoded base URL of the service. This is determined when the library is generated
   * and normally should not be changed.
   */
  public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH;

  /**
   * Constructor.
   *
   *

   * Use {@link Builder} if you need to specify any of the optional parameters.
   *

   *
   * @param transport HTTP transport, which should normally be:
   *

   *
Google App Engine:
   *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}

   *
Android: {@code newCompatibleTransport} from
   *        {@code com.google.api.client.extensions.android.http.AndroidHttp}

   *
Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
   *

   *

   * @param jsonFactory JSON factory, which may be:
   *

   *
Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}

   *
Google GSON: {@code com.google.api.client.json.gson.GsonFactory}

   *
Android Honeycomb or higher:
   *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}

   *

   * @param httpRequestInitializer HTTP request initializer or {@code null} for none
   * @since 1.7
   */
  public YouTubeReporting(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
      com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
    this(new Builder(transport, jsonFactory, httpRequestInitializer));
  }

  /**
   * @param builder builder
   */
  YouTubeReporting(Builder builder) {
    super(builder);
  }

  @Override
  protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest<?> httpClientRequest) throws java.io.IOException {
    super.initialize(httpClientRequest);
  }

  /**
   * An accessor for creating requests from the Jobs collection.
   *
   *
The typical use is:

   *

   *   {@code YouTubeReporting youtubereporting = new YouTubeReporting(...);}
   *   {@code YouTubeReporting.Jobs.List request = youtubereporting.jobs().list(parameters ...)}
   *

   *
   * @return the resource collection
   */
  public Jobs jobs() {
    return new Jobs();
  }

  /**
   * The "jobs" collection of methods.
   */
  public class Jobs {

    /**
     * Creates a job and returns it.
     *
     * Create a request for the method "jobs.create".
     *
     * This request holds the parameters needed by the youtubereporting server.  After setting any
     * optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
     *
     * @param content the {@link com.google.api.services.youtubereporting.model.Job}
     * @return the request
     */
    public Create create(com.google.api.services.youtubereporting.model.Job content) throws java.io.IOException {
      Create result = new Create(content);
      initialize(result);
      return result;
    }

    public class Create extends YouTubeReportingRequest<com.google.api.services.youtubereporting.model.Job> {

      private static final String REST_PATH = "v1/jobs";

      /**
       * Creates a job and returns it.
       *
       * Create a request for the method "jobs.create".
       *
       * This request holds the parameters needed by the the youtubereporting server.  After setting any
       * optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
       *
 {@link
       * Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
       * be called to initialize this instance immediately after invoking the constructor.

       *
       * @param content the {@link com.google.api.services.youtubereporting.model.Job}
       * @since 1.13
       */
      protected Create(com.google.api.services.youtubereporting.model.Job content) {
        super(YouTubeReporting.this, "POST", REST_PATH, content, com.google.api.services.youtubereporting.model.Job.class);
      }

      @Override
      public Create set$Xgafv(java.lang.String $Xgafv) {
        return (Create) super.set$Xgafv($Xgafv);
      }

      @Override
      public Create setAccessToken(java.lang.String accessToken) {
        return (Create) super.setAccessToken(accessToken);
      }

      @Override
      public Create setAlt(java.lang.String alt) {
        return (Create) super.setAlt(alt);
      }

      @Override
      public Create setCallback(java.lang.String callback) {
        return (Create) super.setCallback(callback);
      }

      @Override
      public Create setFields(java.lang.String fields) {
        return (Create) super.setFields(fields);
      }

      @Override
      public Create setKey(java.lang.String key) {
        return (Create) super.setKey(key);
      }

      @Override
      public Create setOauthToken(java.lang.String oauthToken) {
        return (Create) super.setOauthToken(oauthToken);
      }

      @Override
      public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (Create) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public Create setQuotaUser(java.lang.String quotaUser) {
        return (Create) super.setQuotaUser(quotaUser);
      }

      @Override
      public Create setUploadType(java.lang.String uploadType) {
        return (Create) super.setUploadType(uploadType);
      }

      @Override
      public Create setUploadProtocol(java.lang.String uploadProtocol) {
        return (Create) super.setUploadProtocol(uploadProtocol);
      }

      /**
       * The content owner's external ID on which behalf the user is acting on. If not set, the user
       * is acting for himself (his own channel).
       */
      @com.google.api.client.util.Key
      private java.lang.String onBehalfOfContentOwner;

      /** The content owner's external ID on which behalf the user is acting on. If not set, the user is
     acting for himself (his own channel).
       */
      public java.lang.String getOnBehalfOfContentOwner() {
        return onBehalfOfContentOwner;
      }

      /**
       * The content owner's external ID on which behalf the user is acting on. If not set, the user
       * is acting for himself (his own channel).
       */
      public Create setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
        this.onBehalfOfContentOwner = onBehalfOfContentOwner;
        return this;
      }

      @Override
      public Create set(String parameterName, Object value) {
        return (Create) super.set(parameterName, value);
      }
    }
    /**
     * Deletes a job.
     *
     * Create a request for the method "jobs.delete".
     *
     * This request holds the parameters needed by the youtubereporting server.  After setting any
     * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
     *
     * @param jobId The ID of the job to delete.
     * @return the request
     */
    public Delete delete(java.lang.String jobId) throws java.io.IOException {
      Delete result = new Delete(jobId);
      initialize(result);
      return result;
    }

    public class Delete extends YouTubeReportingRequest<com.google.api.services.youtubereporting.model.Empty> {

      private static final String REST_PATH = "v1/jobs/{jobId}";

      /**
       * Deletes a job.
       *
       * Create a request for the method "jobs.delete".
       *
       * This request holds the parameters needed by the the youtubereporting server.  After setting any
       * optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
       *
 {@link
       * Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
       * be called to initialize this instance immediately after invoking the constructor.

       *
       * @param jobId The ID of the job to delete.
       * @since 1.13
       */
      protected Delete(java.lang.String jobId) {
        super(YouTubeReporting.this, "DELETE", REST_PATH, null, com.google.api.services.youtubereporting.model.Empty.class);
        this.jobId = com.google.api.client.util.Preconditions.checkNotNull(jobId, "Required parameter jobId must be specified.");
      }

      @Override
      public Delete set$Xgafv(java.lang.String $Xgafv) {
        return (Delete) super.set$Xgafv($Xgafv);
      }

      @Override
      public Delete setAccessToken(java.lang.String accessToken) {
        return (Delete) super.setAccessToken(accessToken);
      }

      @Override
      public Delete setAlt(java.lang.String alt) {
        return (Delete) super.setAlt(alt);
      }

      @Override
      public Delete setCallback(java.lang.String callback) {
        return (Delete) super.setCallback(callback);
      }

      @Override
      public Delete setFields(java.lang.String fields) {
        return (Delete) super.setFields(fields);
      }

      @Override
      public Delete setKey(java.lang.String key) {
        return (Delete) super.setKey(key);
      }

      @Override
      public Delete setOauthToken(java.lang.String oauthToken) {
        return (Delete) super.setOauthToken(oauthToken);
      }

      @Override
      public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (Delete) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public Delete setQuotaUser(java.lang.String quotaUser) {
        return (Delete) super.setQuotaUser(quotaUser);
      }

      @Override
      public Delete setUploadType(java.lang.String uploadType) {
        return (Delete) super.setUploadType(uploadType);
      }

      @Override
      public Delete setUploadProtocol(java.lang.String uploadProtocol) {
        return (Delete) super.setUploadProtocol(uploadProtocol);
      }

      /** The ID of the job to delete. */
      @com.google.api.client.util.Key
      private java.lang.String jobId;

      /** The ID of the job to delete.
       */
      public java.lang.String getJobId() {
        return jobId;
      }

      /** The ID of the job to delete. */
      public Delete setJobId(java.lang.String jobId) {
        this.jobId = jobId;
        return this;
      }

      /**
       * The content owner's external ID on which behalf the user is acting on. If not set, the user
       * is acting for himself (his own channel).
       */
      @com.google.api.client.util.Key
      private java.lang.String onBehalfOfContentOwner;

      /** The content owner's external ID on which behalf the user is acting on. If not set, the user is
     acting for himself (his own channel).
       */
      public java.lang.String getOnBehalfOfContentOwner() {
        return onBehalfOfContentOwner;
      }

      /**
       * The content owner's external ID on which behalf the user is acting on. If not set, the user
       * is acting for himself (his own channel).
       */
      public Delete setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
        this.onBehalfOfContentOwner = onBehalfOfContentOwner;
        return this;
      }

      @Override
      public Delete set(String parameterName, Object value) {
        return (Delete) super.set(parameterName, value);
      }
    }
    /**
     * Gets a job.
     *
     * Create a request for the method "jobs.get".
     *
     * This request holds the parameters needed by the youtubereporting server.  After setting any
     * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
     *
     * @param jobId The ID of the job to retrieve.
     * @return the request
     */
    public Get get(java.lang.String jobId) throws java.io.IOException {
      Get result = new Get(jobId);
      initialize(result);
      return result;
    }

    public class Get extends YouTubeReportingRequest<com.google.api.services.youtubereporting.model.Job> {

      private static final String REST_PATH = "v1/jobs/{jobId}";

      /**
       * Gets a job.
       *
       * Create a request for the method "jobs.get".
       *
       * This request holds the parameters needed by the the youtubereporting server.  After setting any
       * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.

       * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
       * must be called to initialize this instance immediately after invoking the constructor.

       *
       * @param jobId The ID of the job to retrieve.
       * @since 1.13
       */
      protected Get(java.lang.String jobId) {
        super(YouTubeReporting.this, "GET", REST_PATH, null, com.google.api.services.youtubereporting.model.Job.class);
        this.jobId = com.google.api.client.util.Preconditions.checkNotNull(jobId, "Required parameter jobId must be specified.");
      }

      @Override
      public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
        return super.executeUsingHead();
      }

      @Override
      public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
        return super.buildHttpRequestUsingHead();
      }

      @Override
      public Get set$Xgafv(java.lang.String $Xgafv) {
        return (Get) super.set$Xgafv($Xgafv);
      }

      @Override
      public Get setAccessToken(java.lang.String accessToken) {
        return (Get) super.setAccessToken(accessToken);
      }

      @Override
      public Get setAlt(java.lang.String alt) {
        return (Get) super.setAlt(alt);
      }

      @Override
      public Get setCallback(java.lang.String callback) {
        return (Get) super.setCallback(callback);
      }

      @Override
      public Get setFields(java.lang.String fields) {
        return (Get) super.setFields(fields);
      }

      @Override
      public Get setKey(java.lang.String key) {
        return (Get) super.setKey(key);
      }

      @Override
      public Get setOauthToken(java.lang.String oauthToken) {
        return (Get) super.setOauthToken(oauthToken);
      }

      @Override
      public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (Get) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public Get setQuotaUser(java.lang.String quotaUser) {
        return (Get) super.setQuotaUser(quotaUser);
      }

      @Override
      public Get setUploadType(java.lang.String uploadType) {
        return (Get) super.setUploadType(uploadType);
      }

      @Override
      public Get setUploadProtocol(java.lang.String uploadProtocol) {
        return (Get) super.setUploadProtocol(uploadProtocol);
      }

      /** The ID of the job to retrieve. */
      @com.google.api.client.util.Key
      private java.lang.String jobId;

      /** The ID of the job to retrieve.
       */
      public java.lang.String getJobId() {
        return jobId;
      }

      /** The ID of the job to retrieve. */
      public Get setJobId(java.lang.String jobId) {
        this.jobId = jobId;
        return this;
      }

      /**
       * The content owner's external ID on which behalf the user is acting on. If not set, the user
       * is acting for himself (his own channel).
       */
      @com.google.api.client.util.Key
      private java.lang.String onBehalfOfContentOwner;

      /** The content owner's external ID on which behalf the user is acting on. If not set, the user is
     acting for himself (his own channel).
       */
      public java.lang.String getOnBehalfOfContentOwner() {
        return onBehalfOfContentOwner;
      }

      /**
       * The content owner's external ID on which behalf the user is acting on. If not set, the user
       * is acting for himself (his own channel).
       */
      public Get setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
        this.onBehalfOfContentOwner = onBehalfOfContentOwner;
        return this;
      }

      @Override
      public Get set(String parameterName, Object value) {
        return (Get) super.set(parameterName, value);
      }
    }
    /**
     * Lists jobs.
     *
     * Create a request for the method "jobs.list".
     *
     * This request holds the parameters needed by the youtubereporting server.  After setting any
     * optional parameters, call the {@link List#execute()} method to invoke the remote operation.
     *
     * @return the request
     */
    public List list() throws java.io.IOException {
      List result = new List();
      initialize(result);
      return result;
    }

    public class List extends YouTubeReportingRequest<com.google.api.services.youtubereporting.model.ListJobsResponse> {

      private static final String REST_PATH = "v1/jobs";

      /**
       * Lists jobs.
       *
       * Create a request for the method "jobs.list".
       *
       * This request holds the parameters needed by the the youtubereporting server.  After setting any
       * optional parameters, call the {@link List#execute()} method to invoke the remote operation.

       * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
       * must be called to initialize this instance immediately after invoking the constructor.

       *
       * @since 1.13
       */
      protected List() {
        super(YouTubeReporting.this, "GET", REST_PATH, null, com.google.api.services.youtubereporting.model.ListJobsResponse.class);
      }

      @Override
      public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
        return super.executeUsingHead();
      }

      @Override
      public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
        return super.buildHttpRequestUsingHead();
      }

      @Override
      public List set$Xgafv(java.lang.String $Xgafv) {
        return (List) super.set$Xgafv($Xgafv);
      }

      @Override
      public List setAccessToken(java.lang.String accessToken) {
        return (List) super.setAccessToken(accessToken);
      }

      @Override
      public List setAlt(java.lang.String alt) {
        return (List) super.setAlt(alt);
      }

      @Override
      public List setCallback(java.lang.String callback) {
        return (List) super.setCallback(callback);
      }

      @Override
      public List setFields(java.lang.String fields) {
        return (List) super.setFields(fields);
      }

      @Override
      public List setKey(java.lang.String key) {
        return (List) super.setKey(key);
      }

      @Override
      public List setOauthToken(java.lang.String oauthToken) {
        return (List) super.setOauthToken(oauthToken);
      }

      @Override
      public List setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (List) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public List setQuotaUser(java.lang.String quotaUser) {
        return (List) super.setQuotaUser(quotaUser);
      }

      @Override
      public List setUploadType(java.lang.String uploadType) {
        return (List) super.setUploadType(uploadType);
      }

      @Override
      public List setUploadProtocol(java.lang.String uploadProtocol) {
        return (List) super.setUploadProtocol(uploadProtocol);
      }

      /**
       * If set to true, also system-managed jobs will be returned; otherwise only user-created jobs
       * will be returned. System-managed jobs can neither be modified nor deleted.
       */
      @com.google.api.client.util.Key
      private java.lang.Boolean includeSystemManaged;

      /** If set to true, also system-managed jobs will be returned; otherwise only user-created jobs will be
     returned. System-managed jobs can neither be modified nor deleted.
       */
      public java.lang.Boolean getIncludeSystemManaged() {
        return includeSystemManaged;
      }

      /**
       * If set to true, also system-managed jobs will be returned; otherwise only user-created jobs
       * will be returned. System-managed jobs can neither be modified nor deleted.
       */
      public List setIncludeSystemManaged(java.lang.Boolean includeSystemManaged) {
        this.includeSystemManaged = includeSystemManaged;
        return this;
      }

      /**
       * The content owner's external ID on which behalf the user is acting on. If not set, the user
       * is acting for himself (his own channel).
       */
      @com.google.api.client.util.Key
      private java.lang.String onBehalfOfContentOwner;

      /** The content owner's external ID on which behalf the user is acting on. If not set, the user is
     acting for himself (his own channel).
       */
      public java.lang.String getOnBehalfOfContentOwner() {
        return onBehalfOfContentOwner;
      }

      /**
       * The content owner's external ID on which behalf the user is acting on. If not set, the user
       * is acting for himself (his own channel).
       */
      public List setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
        this.onBehalfOfContentOwner = onBehalfOfContentOwner;
        return this;
      }

      /**
       * Requested page size. Server may return fewer jobs than requested. If unspecified, server
       * will pick an appropriate default.
       */
      @com.google.api.client.util.Key
      private java.lang.Integer pageSize;

      /** Requested page size. Server may return fewer jobs than requested. If unspecified, server will pick
     an appropriate default.
       */
      public java.lang.Integer getPageSize() {
        return pageSize;
      }

      /**
       * Requested page size. Server may return fewer jobs than requested. If unspecified, server
       * will pick an appropriate default.
       */
      public List setPageSize(java.lang.Integer pageSize) {
        this.pageSize = pageSize;
        return this;
      }

      /**
       * A token identifying a page of results the server should return. Typically, this is the
       * value of ListReportTypesResponse.next_page_token returned in response to the previous call
       * to the `ListJobs` method.
       */
      @com.google.api.client.util.Key
      private java.lang.String pageToken;

      /** A token identifying a page of results the server should return. Typically, this is the value of
     ListReportTypesResponse.next_page_token returned in response to the previous call to the `ListJobs`
     method.
       */
      public java.lang.String getPageToken() {
        return pageToken;
      }

      /**
       * A token identifying a page of results the server should return. Typically, this is the
       * value of ListReportTypesResponse.next_page_token returned in response to the previous call
       * to the `ListJobs` method.
       */
      public List setPageToken(java.lang.String pageToken) {
        this.pageToken = pageToken;
        return this;
      }

      @Override
      public List set(String parameterName, Object value) {
        return (List) super.set(parameterName, value);
      }
    }

    /**
     * An accessor for creating requests from the Reports collection.
     *
     *
The typical use is:

     *

     *   {@code YouTubeReporting youtubereporting = new YouTubeReporting(...);}
     *   {@code YouTubeReporting.Reports.List request = youtubereporting.reports().list(parameters ...)}
     *

     *
     * @return the resource collection
     */
    public Reports reports() {
      return new Reports();
    }

    /**
     * The "reports" collection of methods.
     */
    public class Reports {

      /**
       * Gets the metadata of a specific report.
       *
       * Create a request for the method "reports.get".
       *
       * This request holds the parameters needed by the youtubereporting server.  After setting any
       * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
       *
       * @param jobId The ID of the job.
       * @param reportId The ID of the report to retrieve.
       * @return the request
       */
      public Get get(java.lang.String jobId, java.lang.String reportId) throws java.io.IOException {
        Get result = new Get(jobId, reportId);
        initialize(result);
        return result;
      }

      public class Get extends YouTubeReportingRequest<com.google.api.services.youtubereporting.model.Report> {

        private static final String REST_PATH = "v1/jobs/{jobId}/reports/{reportId}";

        /**
         * Gets the metadata of a specific report.
         *
         * Create a request for the method "reports.get".
         *
         * This request holds the parameters needed by the the youtubereporting server.  After setting any
         * optional parameters, call the {@link Get#execute()} method to invoke the remote operation.

         * {@link Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
         * must be called to initialize this instance immediately after invoking the constructor.

         *
         * @param jobId The ID of the job.
         * @param reportId The ID of the report to retrieve.
         * @since 1.13
         */
        protected Get(java.lang.String jobId, java.lang.String reportId) {
          super(YouTubeReporting.this, "GET", REST_PATH, null, com.google.api.services.youtubereporting.model.Report.class);
          this.jobId = com.google.api.client.util.Preconditions.checkNotNull(jobId, "Required parameter jobId must be specified.");
          this.reportId = com.google.api.client.util.Preconditions.checkNotNull(reportId, "Required parameter reportId must be specified.");
        }

        @Override
        public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
          return super.executeUsingHead();
        }

        @Override
        public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
          return super.buildHttpRequestUsingHead();
        }

        @Override
        public Get set$Xgafv(java.lang.String $Xgafv) {
          return (Get) super.set$Xgafv($Xgafv);
        }

        @Override
        public Get setAccessToken(java.lang.String accessToken) {
          return (Get) super.setAccessToken(accessToken);
        }

        @Override
        public Get setAlt(java.lang.String alt) {
          return (Get) super.setAlt(alt);
        }

        @Override
        public Get setCallback(java.lang.String callback) {
          return (Get) super.setCallback(callback);
        }

        @Override
        public Get setFields(java.lang.String fields) {
          return (Get) super.setFields(fields);
        }

        @Override
        public Get setKey(java.lang.String key) {
          return (Get) super.setKey(key);
        }

        @Override
        public Get setOauthToken(java.lang.String oauthToken) {
          return (Get) super.setOauthToken(oauthToken);
        }

        @Override
        public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (Get) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public Get setQuotaUser(java.lang.String quotaUser) {
          return (Get) super.setQuotaUser(quotaUser);
        }

        @Override
        public Get setUploadType(java.lang.String uploadType) {
          return (Get) super.setUploadType(uploadType);
        }

        @Override
        public Get setUploadProtocol(java.lang.String uploadProtocol) {
          return (Get) super.setUploadProtocol(uploadProtocol);
        }

        /** The ID of the job. */
        @com.google.api.client.util.Key
        private java.lang.String jobId;

        /** The ID of the job.
         */
        public java.lang.String getJobId() {
          return jobId;
        }

        /** The ID of the job. */
        public Get setJobId(java.lang.String jobId) {
          this.jobId = jobId;
          return this;
        }

        /** The ID of the report to retrieve. */
        @com.google.api.client.util.Key
        private java.lang.String reportId;

        /** The ID of the report to retrieve.
         */
        public java.lang.String getReportId() {
          return reportId;
        }

        /** The ID of the report to retrieve. */
        public Get setReportId(java.lang.String reportId) {
          this.reportId = reportId;
          return this;
        }

        /**
         * The content owner's external ID on which behalf the user is acting on. If not set, the
         * user is acting for himself (his own channel).
         */
        @com.google.api.client.util.Key
        private java.lang.String onBehalfOfContentOwner;

        /** The content owner's external ID on which behalf the user is acting on. If not set, the user is
       acting for himself (his own channel).
         */
        public java.lang.String getOnBehalfOfContentOwner() {
          return onBehalfOfContentOwner;
        }

        /**
         * The content owner's external ID on which behalf the user is acting on. If not set, the
         * user is acting for himself (his own channel).
         */
        public Get setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
          this.onBehalfOfContentOwner = onBehalfOfContentOwner;
          return this;
        }

        @Override
        public Get set(String parameterName, Object value) {
          return (Get) super.set(parameterName, value);
        }
      }
      /**
       * Lists reports created by a specific job. Returns NOT_FOUND if the job does not exist.
       *
       * Create a request for the method "reports.list".
       *
       * This request holds the parameters needed by the youtubereporting server.  After setting any
       * optional parameters, call the {@link List#execute()} method to invoke the remote operation.
       *
       * @param jobId The ID of the job.
       * @return the request
       */
      public List list(java.lang.String jobId) throws java.io.IOException {
        List result = new List(jobId);
        initialize(result);
        return result;
      }

      public class List extends YouTubeReportingRequest<com.google.api.services.youtubereporting.model.ListReportsResponse> {

        private static final String REST_PATH = "v1/jobs/{jobId}/reports";

        /**
         * Lists reports created by a specific job. Returns NOT_FOUND if the job does not exist.
         *
         * Create a request for the method "reports.list".
         *
         * This request holds the parameters needed by the the youtubereporting server.  After setting any
         * optional parameters, call the {@link List#execute()} method to invoke the remote operation.

         * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
         * must be called to initialize this instance immediately after invoking the constructor.

         *
         * @param jobId The ID of the job.
         * @since 1.13
         */
        protected List(java.lang.String jobId) {
          super(YouTubeReporting.this, "GET", REST_PATH, null, com.google.api.services.youtubereporting.model.ListReportsResponse.class);
          this.jobId = com.google.api.client.util.Preconditions.checkNotNull(jobId, "Required parameter jobId must be specified.");
        }

        @Override
        public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
          return super.executeUsingHead();
        }

        @Override
        public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
          return super.buildHttpRequestUsingHead();
        }

        @Override
        public List set$Xgafv(java.lang.String $Xgafv) {
          return (List) super.set$Xgafv($Xgafv);
        }

        @Override
        public List setAccessToken(java.lang.String accessToken) {
          return (List) super.setAccessToken(accessToken);
        }

        @Override
        public List setAlt(java.lang.String alt) {
          return (List) super.setAlt(alt);
        }

        @Override
        public List setCallback(java.lang.String callback) {
          return (List) super.setCallback(callback);
        }

        @Override
        public List setFields(java.lang.String fields) {
          return (List) super.setFields(fields);
        }

        @Override
        public List setKey(java.lang.String key) {
          return (List) super.setKey(key);
        }

        @Override
        public List setOauthToken(java.lang.String oauthToken) {
          return (List) super.setOauthToken(oauthToken);
        }

        @Override
        public List setPrettyPrint(java.lang.Boolean prettyPrint) {
          return (List) super.setPrettyPrint(prettyPrint);
        }

        @Override
        public List setQuotaUser(java.lang.String quotaUser) {
          return (List) super.setQuotaUser(quotaUser);
        }

        @Override
        public List setUploadType(java.lang.String uploadType) {
          return (List) super.setUploadType(uploadType);
        }

        @Override
        public List setUploadProtocol(java.lang.String uploadProtocol) {
          return (List) super.setUploadProtocol(uploadProtocol);
        }

        /** The ID of the job. */
        @com.google.api.client.util.Key
        private java.lang.String jobId;

        /** The ID of the job.
         */
        public java.lang.String getJobId() {
          return jobId;
        }

        /** The ID of the job. */
        public List setJobId(java.lang.String jobId) {
          this.jobId = jobId;
          return this;
        }

        /** If set, only reports created after the specified date/time are returned. */
        @com.google.api.client.util.Key
        private String createdAfter;

        /** If set, only reports created after the specified date/time are returned.
         */
        public String getCreatedAfter() {
          return createdAfter;
        }

        /** If set, only reports created after the specified date/time are returned. */
        public List setCreatedAfter(String createdAfter) {
          this.createdAfter = createdAfter;
          return this;
        }

        /**
         * The content owner's external ID on which behalf the user is acting on. If not set, the
         * user is acting for himself (his own channel).
         */
        @com.google.api.client.util.Key
        private java.lang.String onBehalfOfContentOwner;

        /** The content owner's external ID on which behalf the user is acting on. If not set, the user is
       acting for himself (his own channel).
         */
        public java.lang.String getOnBehalfOfContentOwner() {
          return onBehalfOfContentOwner;
        }

        /**
         * The content owner's external ID on which behalf the user is acting on. If not set, the
         * user is acting for himself (his own channel).
         */
        public List setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
          this.onBehalfOfContentOwner = onBehalfOfContentOwner;
          return this;
        }

        /**
         * Requested page size. Server may return fewer report types than requested. If unspecified,
         * server will pick an appropriate default.
         */
        @com.google.api.client.util.Key
        private java.lang.Integer pageSize;

        /** Requested page size. Server may return fewer report types than requested. If unspecified, server
       will pick an appropriate default.
         */
        public java.lang.Integer getPageSize() {
          return pageSize;
        }

        /**
         * Requested page size. Server may return fewer report types than requested. If unspecified,
         * server will pick an appropriate default.
         */
        public List setPageSize(java.lang.Integer pageSize) {
          this.pageSize = pageSize;
          return this;
        }

        /**
         * A token identifying a page of results the server should return. Typically, this is the
         * value of ListReportsResponse.next_page_token returned in response to the previous call to
         * the `ListReports` method.
         */
        @com.google.api.client.util.Key
        private java.lang.String pageToken;

        /** A token identifying a page of results the server should return. Typically, this is the value of
       ListReportsResponse.next_page_token returned in response to the previous call to the `ListReports`
       method.
         */
        public java.lang.String getPageToken() {
          return pageToken;
        }

        /**
         * A token identifying a page of results the server should return. Typically, this is the
         * value of ListReportsResponse.next_page_token returned in response to the previous call to
         * the `ListReports` method.
         */
        public List setPageToken(java.lang.String pageToken) {
          this.pageToken = pageToken;
          return this;
        }

        /**
         * If set, only reports whose start time is greater than or equal the specified date/time
         * are returned.
         */
        @com.google.api.client.util.Key
        private String startTimeAtOrAfter;

        /** If set, only reports whose start time is greater than or equal the specified date/time are
       returned.
         */
        public String getStartTimeAtOrAfter() {
          return startTimeAtOrAfter;
        }

        /**
         * If set, only reports whose start time is greater than or equal the specified date/time
         * are returned.
         */
        public List setStartTimeAtOrAfter(String startTimeAtOrAfter) {
          this.startTimeAtOrAfter = startTimeAtOrAfter;
          return this;
        }

        /**
         * If set, only reports whose start time is smaller than the specified date/time are
         * returned.
         */
        @com.google.api.client.util.Key
        private String startTimeBefore;

        /** If set, only reports whose start time is smaller than the specified date/time are returned.
         */
        public String getStartTimeBefore() {
          return startTimeBefore;
        }

        /**
         * If set, only reports whose start time is smaller than the specified date/time are
         * returned.
         */
        public List setStartTimeBefore(String startTimeBefore) {
          this.startTimeBefore = startTimeBefore;
          return this;
        }

        @Override
        public List set(String parameterName, Object value) {
          return (List) super.set(parameterName, value);
        }
      }

    }
  }

  /**
   * An accessor for creating requests from the Media collection.
   *
   *
The typical use is:

   *

   *   {@code YouTubeReporting youtubereporting = new YouTubeReporting(...);}
   *   {@code YouTubeReporting.Media.List request = youtubereporting.media().list(parameters ...)}
   *

   *
   * @return the resource collection
   */
  public Media media() {
    return new Media();
  }

  /**
   * The "media" collection of methods.
   */
  public class Media {

    /**
     * Method for media download. Download is supported on the URI `/v1/media/{+name}?alt=media`.
     *
     * Create a request for the method "media.download".
     *
     * This request holds the parameters needed by the youtubereporting server.  After setting any
     * optional parameters, call the {@link Download#execute()} method to invoke the remote operation.
     *
     * @param resourceName Name of the media that is being downloaded.
     * @return the request
     */
    public Download download(java.lang.String resourceName) throws java.io.IOException {
      Download result = new Download(resourceName);
      initialize(result);
      return result;
    }

    public class Download extends YouTubeReportingRequest<com.google.api.services.youtubereporting.model.GdataMedia> {

      private static final String REST_PATH = "v1/media/{+resourceName}";

      private final java.util.regex.Pattern RESOURCE_NAME_PATTERN =
          java.util.regex.Pattern.compile("^.+$");

      /**
       * Method for media download. Download is supported on the URI `/v1/media/{+name}?alt=media`.
       *
       * Create a request for the method "media.download".
       *
       * This request holds the parameters needed by the the youtubereporting server.  After setting any
       * optional parameters, call the {@link Download#execute()} method to invoke the remote operation.
       *
 {@link
       * Download#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
       * must be called to initialize this instance immediately after invoking the constructor.

       *
       * @param resourceName Name of the media that is being downloaded.
       * @since 1.13
       */
      protected Download(java.lang.String resourceName) {
        super(YouTubeReporting.this, "GET", REST_PATH, null, com.google.api.services.youtubereporting.model.GdataMedia.class);
        this.resourceName = com.google.api.client.util.Preconditions.checkNotNull(resourceName, "Required parameter resourceName must be specified.");
        if (!getSuppressPatternChecks()) {
          com.google.api.client.util.Preconditions.checkArgument(RESOURCE_NAME_PATTERN.matcher(resourceName).matches(),
              "Parameter resourceName must conform to the pattern " +
              "^.+$");
        }
        initializeMediaDownload();
      }

      @Override
      public void executeMediaAndDownloadTo(java.io.OutputStream outputStream) throws java.io.IOException {
        super.executeMediaAndDownloadTo(outputStream);
      }

      @Override
      public java.io.InputStream executeMediaAsInputStream() throws java.io.IOException {
        return super.executeMediaAsInputStream();
      }

      @Override
      public com.google.api.client.http.HttpResponse executeMedia() throws java.io.IOException {
        return super.executeMedia();
      }

      @Override
      public com.google.api.client.http.GenericUrl buildHttpRequestUrl() {
        java.lang.String baseUrl = ("media".equals(get("alt")) && getMediaHttpUploader() == null)
            ? getRootUrl() + "download/" + getServicePath() : getBaseUrl();
        return new com.google.api.client.http.GenericUrl(
            com.google.api.client.http.UriTemplate.expand(baseUrl, getUriTemplate(), this, true));
      }

      @Override
      public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
        return super.executeUsingHead();
      }

      @Override
      public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
        return super.buildHttpRequestUsingHead();
      }

      @Override
      public Download set$Xgafv(java.lang.String $Xgafv) {
        return (Download) super.set$Xgafv($Xgafv);
      }

      @Override
      public Download setAccessToken(java.lang.String accessToken) {
        return (Download) super.setAccessToken(accessToken);
      }

      @Override
      public Download setAlt(java.lang.String alt) {
        return (Download) super.setAlt(alt);
      }

      @Override
      public Download setCallback(java.lang.String callback) {
        return (Download) super.setCallback(callback);
      }

      @Override
      public Download setFields(java.lang.String fields) {
        return (Download) super.setFields(fields);
      }

      @Override
      public Download setKey(java.lang.String key) {
        return (Download) super.setKey(key);
      }

      @Override
      public Download setOauthToken(java.lang.String oauthToken) {
        return (Download) super.setOauthToken(oauthToken);
      }

      @Override
      public Download setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (Download) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public Download setQuotaUser(java.lang.String quotaUser) {
        return (Download) super.setQuotaUser(quotaUser);
      }

      @Override
      public Download setUploadType(java.lang.String uploadType) {
        return (Download) super.setUploadType(uploadType);
      }

      @Override
      public Download setUploadProtocol(java.lang.String uploadProtocol) {
        return (Download) super.setUploadProtocol(uploadProtocol);
      }

      /** Name of the media that is being downloaded. */
      @com.google.api.client.util.Key
      private java.lang.String resourceName;

      /** Name of the media that is being downloaded.
       */
      public java.lang.String getResourceName() {
        return resourceName;
      }

      /** Name of the media that is being downloaded. */
      public Download setResourceName(java.lang.String resourceName) {
        if (!getSuppressPatternChecks()) {
          com.google.api.client.util.Preconditions.checkArgument(RESOURCE_NAME_PATTERN.matcher(resourceName).matches(),
              "Parameter resourceName must conform to the pattern " +
              "^.+$");
        }
        this.resourceName = resourceName;
        return this;
      }

      @Override
      public Download set(String parameterName, Object value) {
        return (Download) super.set(parameterName, value);
      }
    }

  }

  /**
   * An accessor for creating requests from the ReportTypes collection.
   *
   *
The typical use is:

   *

   *   {@code YouTubeReporting youtubereporting = new YouTubeReporting(...);}
   *   {@code YouTubeReporting.ReportTypes.List request = youtubereporting.reportTypes().list(parameters ...)}
   *

   *
   * @return the resource collection
   */
  public ReportTypes reportTypes() {
    return new ReportTypes();
  }

  /**
   * The "reportTypes" collection of methods.
   */
  public class ReportTypes {

    /**
     * Lists report types.
     *
     * Create a request for the method "reportTypes.list".
     *
     * This request holds the parameters needed by the youtubereporting server.  After setting any
     * optional parameters, call the {@link List#execute()} method to invoke the remote operation.
     *
     * @return the request
     */
    public List list() throws java.io.IOException {
      List result = new List();
      initialize(result);
      return result;
    }

    public class List extends YouTubeReportingRequest<com.google.api.services.youtubereporting.model.ListReportTypesResponse> {

      private static final String REST_PATH = "v1/reportTypes";

      /**
       * Lists report types.
       *
       * Create a request for the method "reportTypes.list".
       *
       * This request holds the parameters needed by the the youtubereporting server.  After setting any
       * optional parameters, call the {@link List#execute()} method to invoke the remote operation.

       * {@link List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
       * must be called to initialize this instance immediately after invoking the constructor.

       *
       * @since 1.13
       */
      protected List() {
        super(YouTubeReporting.this, "GET", REST_PATH, null, com.google.api.services.youtubereporting.model.ListReportTypesResponse.class);
      }

      @Override
      public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
        return super.executeUsingHead();
      }

      @Override
      public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
        return super.buildHttpRequestUsingHead();
      }

      @Override
      public List set$Xgafv(java.lang.String $Xgafv) {
        return (List) super.set$Xgafv($Xgafv);
      }

      @Override
      public List setAccessToken(java.lang.String accessToken) {
        return (List) super.setAccessToken(accessToken);
      }

      @Override
      public List setAlt(java.lang.String alt) {
        return (List) super.setAlt(alt);
      }

      @Override
      public List setCallback(java.lang.String callback) {
        return (List) super.setCallback(callback);
      }

      @Override
      public List setFields(java.lang.String fields) {
        return (List) super.setFields(fields);
      }

      @Override
      public List setKey(java.lang.String key) {
        return (List) super.setKey(key);
      }

      @Override
      public List setOauthToken(java.lang.String oauthToken) {
        return (List) super.setOauthToken(oauthToken);
      }

      @Override
      public List setPrettyPrint(java.lang.Boolean prettyPrint) {
        return (List) super.setPrettyPrint(prettyPrint);
      }

      @Override
      public List setQuotaUser(java.lang.String quotaUser) {
        return (List) super.setQuotaUser(quotaUser);
      }

      @Override
      public List setUploadType(java.lang.String uploadType) {
        return (List) super.setUploadType(uploadType);
      }

      @Override
      public List setUploadProtocol(java.lang.String uploadProtocol) {
        return (List) super.setUploadProtocol(uploadProtocol);
      }

      /**
       * If set to true, also system-managed report types will be returned; otherwise only the
       * report types that can be used to create new reporting jobs will be returned.
       */
      @com.google.api.client.util.Key
      private java.lang.Boolean includeSystemManaged;

      /** If set to true, also system-managed report types will be returned; otherwise only the report types
     that can be used to create new reporting jobs will be returned.
       */
      public java.lang.Boolean getIncludeSystemManaged() {
        return includeSystemManaged;
      }

      /**
       * If set to true, also system-managed report types will be returned; otherwise only the
       * report types that can be used to create new reporting jobs will be returned.
       */
      public List setIncludeSystemManaged(java.lang.Boolean includeSystemManaged) {
        this.includeSystemManaged = includeSystemManaged;
        return this;
      }

      /**
       * The content owner's external ID on which behalf the user is acting on. If not set, the user
       * is acting for himself (his own channel).
       */
      @com.google.api.client.util.Key
      private java.lang.String onBehalfOfContentOwner;

      /** The content owner's external ID on which behalf the user is acting on. If not set, the user is
     acting for himself (his own channel).
       */
      public java.lang.String getOnBehalfOfContentOwner() {
        return onBehalfOfContentOwner;
      }

      /**
       * The content owner's external ID on which behalf the user is acting on. If not set, the user
       * is acting for himself (his own channel).
       */
      public List setOnBehalfOfContentOwner(java.lang.String onBehalfOfContentOwner) {
        this.onBehalfOfContentOwner = onBehalfOfContentOwner;
        return this;
      }

      /**
       * Requested page size. Server may return fewer report types than requested. If unspecified,
       * server will pick an appropriate default.
       */
      @com.google.api.client.util.Key
      private java.lang.Integer pageSize;

      /** Requested page size. Server may return fewer report types than requested. If unspecified, server
     will pick an appropriate default.
       */
      public java.lang.Integer getPageSize() {
        return pageSize;
      }

      /**
       * Requested page size. Server may return fewer report types than requested. If unspecified,
       * server will pick an appropriate default.
       */
      public List setPageSize(java.lang.Integer pageSize) {
        this.pageSize = pageSize;
        return this;
      }

      /**
       * A token identifying a page of results the server should return. Typically, this is the
       * value of ListReportTypesResponse.next_page_token returned in response to the previous call
       * to the `ListReportTypes` method.
       */
      @com.google.api.client.util.Key
      private java.lang.String pageToken;

      /** A token identifying a page of results the server should return. Typically, this is the value of
     ListReportTypesResponse.next_page_token returned in response to the previous call to the
     `ListReportTypes` method.
       */
      public java.lang.String getPageToken() {
        return pageToken;
      }

      /**
       * A token identifying a page of results the server should return. Typically, this is the
       * value of ListReportTypesResponse.next_page_token returned in response to the previous call
       * to the `ListReportTypes` method.
       */
      public List setPageToken(java.lang.String pageToken) {
        this.pageToken = pageToken;
        return this;
      }

      @Override
      public List set(String parameterName, Object value) {
        return (List) super.set(parameterName, value);
      }
    }

  }

  /**
   * Builder for {@link YouTubeReporting}.
   *
   *

   * Implementation is not thread-safe.
   *

   *
   * @since 1.3.0
   */
  public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder {

    /**
     * Returns an instance of a new builder.
     *
     * @param transport HTTP transport, which should normally be:
     *

     *
Google App Engine:
     *        {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}

     *
Android: {@code newCompatibleTransport} from
     *        {@code com.google.api.client.extensions.android.http.AndroidHttp}

     *
Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
     *

     *

     * @param jsonFactory JSON factory, which may be:
     *

     *
Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}

     *
Google GSON: {@code com.google.api.client.json.gson.GsonFactory}

     *
Android Honeycomb or higher:
     *        {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}

     *

     * @param httpRequestInitializer HTTP request initializer or {@code null} for none
     * @since 1.7
     */
    public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
        com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
      super(
          transport,
          jsonFactory,
          DEFAULT_ROOT_URL,
          DEFAULT_SERVICE_PATH,
          httpRequestInitializer,
          false);
      setBatchPath(DEFAULT_BATCH_PATH);
    }

    /** Builds a new instance of {@link YouTubeReporting}. */
    @Override
    public YouTubeReporting build() {
      return new YouTubeReporting(this);
    }

    @Override
    public Builder setRootUrl(String rootUrl) {
      return (Builder) super.setRootUrl(rootUrl);
    }

    @Override
    public Builder setServicePath(String servicePath) {
      return (Builder) super.setServicePath(servicePath);
    }

    @Override
    public Builder setBatchPath(String batchPath) {
      return (Builder) super.setBatchPath(batchPath);
    }

    @Override
    public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
      return (Builder) super.setHttpRequestInitializer(httpRequestInitializer);
    }

    @Override
    public Builder setApplicationName(String applicationName) {
      return (Builder) super.setApplicationName(applicationName);
    }

    @Override
    public Builder setSuppressPatternChecks(boolean suppressPatternChecks) {
      return (Builder) super.setSuppressPatternChecks(suppressPatternChecks);
    }

    @Override
    public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) {
      return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks);
    }

    @Override
    public Builder setSuppressAllChecks(boolean suppressAllChecks) {
      return (Builder) super.setSuppressAllChecks(suppressAllChecks);
    }

    /**
     * Set the {@link YouTubeReportingRequestInitializer}.
     *
     * @since 1.12
     */
    public Builder setYouTubeReportingRequestInitializer(
        YouTubeReportingRequestInitializer youtubereportingRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(youtubereportingRequestInitializer);
    }

    @Override
    public Builder setGoogleClientRequestInitializer(
        com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
      return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
    }
  }
}


text:
layout:    page
permalink: "/whathashappened/"
author:    Debbie Hunter
title:     What has happened to my joint
menutitle: Joint problems
weight:    90
excerpt:   Joints
---

Joints can be damaged by arthritis and other diseases.

Arthritis or simply years of use may cause the joint to wear away.

Diseases and damage inside a joint can also limit blood flow, causing problems.

Excess weight can also put added pressure on joints allowing for greater wear and tear.

Old sports injuries can impact the integrity of joints.


text:
package io.airlift.bootstrap;

import com.google.common.collect.Lists;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * A utility for outputting columnar text
 */
class ColumnPrinter
{
    private final List<List<String>> data = Lists.newArrayList();
    private final List<String> columnNames = Lists.newArrayList();
    private int margin;

    private static final int DEFAULT_MARGIN = 2;

    ColumnPrinter()
    {
        margin = DEFAULT_MARGIN;
    }

    /**
     * Add a column
     *
     * @param columnName name of the column
     */
    void addColumn(String columnName)
    {
        data.add(new ArrayList<String>());
        columnNames.add(columnName);
    }

    /**
     * Add a value to the first column with the given name
     *
     * @param columnName name of the column to add to
     * @param value value to add
     */
    void addValue(String columnName, String value)
    {
        addValue(columnNames.indexOf(columnName), value);
    }

    /**
     * Add a value to the nth column
     *
     * @param columnIndex n
     * @param value value to add
     */
    void addValue(int columnIndex, String value)
    {
        if ((columnIndex < 0) || (columnIndex >= data.size())) {
            throw new IllegalArgumentException();
        }

        List<String> stringList = data.get(columnIndex);
        stringList.add(value);
    }

    /**
     * Change the margin from the default
     *
     * @param margin new margin between columns
     */
    void setMargin(int margin)
    {
        this.margin = margin;
    }

    /**
     * Output the columns/data
     *
     * @param out stream
     */
    void print(PrintWriter out)
    {
        for (String s : generate()) {
            out.println(s);
        }
    }

    /**
     * Generate the output as a list of string lines
     *
     * @return lines
     */
    List<String> generate()
    {
        List<String> lines = Lists.newArrayList();
        StringBuilder workStr = new StringBuilder();

        List<AtomicInteger> columnWidths = getColumnWidths();
        List<Iterator<String>> dataIterators = getDataIterators();

        Iterator<AtomicInteger> columnWidthIterator = columnWidths.iterator();
        for (String columnName : columnNames) {
            int thisWidth = columnWidthIterator.next().intValue();
            printValue(workStr, columnName, thisWidth);
        }
        pushLine(lines, workStr);

        boolean done = false;
        while (!done) {
            boolean hadValue = false;
            Iterator<Iterator<String>> rowIterator = dataIterators.iterator();
            for (AtomicInteger width : columnWidths) {
                Iterator<String> thisDataIterator = rowIterator.next();
                if (thisDataIterator.hasNext()) {
                    hadValue = true;

                    String value = thisDataIterator.next();
                    printValue(workStr, value, width.intValue());
                }
                else {
                    printValue(workStr, "", width.intValue());
                }
            }
            pushLine(lines, workStr);

            if (!hadValue) {
                done = true;
            }
        }

        return lines;
    }

    private void pushLine(List<String> lines, StringBuilder workStr)
    {
        lines.add(workStr.toString());
        workStr.setLength(0);
    }

    private void printValue(StringBuilder str, String value, int thisWidth)
    {
        str.append(String.format(widthSpec(thisWidth), value));
    }

    private String widthSpec(int thisWidth)
    {
        return "%-" + (thisWidth + margin) + "s";
    }

    private List<Iterator<String>> getDataIterators()
    {
        List<Iterator<String>> dataIterators = Lists.newArrayList();
        for (List<String> valueList : data) {
            dataIterators.add(valueList.iterator());
        }
        return dataIterators;
    }

    private List<AtomicInteger> getColumnWidths()
    {
        List<AtomicInteger> columnWidths = Lists.newArrayList();
        for (String columnName : columnNames) {
            columnWidths.add(new AtomicInteger(columnName.length()));
        }

        int columnIndex = 0;
        for (List<String> valueList : data) {
            AtomicInteger width = columnWidths.get(columnIndex++);
            for (String value : valueList) {
                width.set(Math.max(value.length(), width.intValue()));
            }
        }

        return columnWidths;
    }
}


text:
module Bookshelf
  class Application < Hanami::Application
  end
end

RSpec.describe Hanami do
  describe ".application" do
    it "it raises error when already assigned" do
      expect do
        module Soundcard
          class Application < Hanami::Application
          end
        end
      end.to raise_error("Hanami.application already configured")
    end
  end
end


text:
#include <string>

#include "paddle/fluid/framework/generator.h"
#include "paddle/fluid/framework/op_registry.h"
#include "paddle/fluid/framework/operator.h"
#include "paddle/fluid/operators/uniform_random_op.h"

namespace paddle {
namespace operators {

template <typename T>
class NPUUniformRandomKernel : public framework::OpKernel<T> {
 public:
  void Compute(const framework::ExecutionContext &ctx) const override {
    phi::DenseTensor *tensor = nullptr;
    auto out_var = ctx.OutputVar("Out");
    std::vector<int64_t> new_shape;
    auto list_new_shape_tensor =
        ctx.MultiInput<phi::DenseTensor>("ShapeTensorList");
    if (list_new_shape_tensor.size() > 0 || ctx.HasInput("ShapeTensor")) {
      if (ctx.HasInput("ShapeTensor")) {
        auto *shape_tensor = ctx.Input<phi::DenseTensor>("ShapeTensor");
        new_shape = GetNewDataFromShapeTensor(shape_tensor);
      } else if (list_new_shape_tensor.size() > 0) {
        new_shape = GetNewDataFromShapeTensorList(list_new_shape_tensor);
      }
    }

    if (out_var->IsType<phi::SelectedRows>()) {
      auto *selected_rows = out_var->GetMutable<phi::SelectedRows>();
      tensor = selected_rows->mutable_value();
      auto shape = ctx.Attr<std::vector<int64_t>>("shape");
      if (!new_shape.empty()) shape = new_shape;
      tensor->Resize(phi::make_ddim(shape));
      selected_rows->mutable_rows()->reserve(shape[0]);
    } else if (out_var->IsType<phi::DenseTensor>()) {
      tensor = out_var->GetMutable<phi::DenseTensor>();
      if (!new_shape.empty()) tensor->Resize(phi::make_ddim(new_shape));
    } else {
      PADDLE_THROW(platform::errors::InvalidArgument(
          "Expected type of Output(out) in uniform_random_op must be Tensor, "
          "SelectedRows. But got "
          "unsupport type: %s.",
          framework::ToTypeName(out_var->Type())));
    }
    tensor->mutable_data<T>(ctx.GetPlace());
    int64_t size = tensor->numel();

    Tensor cpu_tensor(tensor->dtype());
    cpu_tensor.Resize(tensor->dims());
    T *data_cpu = cpu_tensor.mutable_data<T>(platform::CPUPlace());

    std::uniform_real_distribution<T> dist(
        static_cast<T>(ctx.Attr<float>("min")),
        static_cast<T>(ctx.Attr<float>("max")));
    unsigned int seed = static_cast<unsigned int>(ctx.Attr<int>("seed"));
    auto engine = framework::GetCPURandomEngine(seed);

    for (int64_t i = 0; i < size; ++i) {
      data_cpu[i] = dist(*engine);
    }

    unsigned int diag_num =
        static_cast<unsigned int>(ctx.Attr<int>("diag_num"));
    unsigned int diag_step =
        static_cast<unsigned int>(ctx.Attr<int>("diag_step"));
    auto diag_val = static_cast<T>(ctx.Attr<float>("diag_val"));
    if (diag_num > 0) {
      PADDLE_ENFORCE_GT(
          size,
          (diag_num - 1) * (diag_step + 1),
          platform::errors::InvalidArgument(
              "ShapeInvalid: the diagonal's elements is equal (num-1) "
              "* (step-1) with num %d, step %d,"
              "It should be smaller than %d, but received %d",
              diag_num,
              diag_step,
              (diag_num - 1) * (diag_step + 1),
              size));
      for (int64_t i = 0; i < diag_num; ++i) {
        int64_t pos = i * diag_step + i;
        data_cpu[pos] = diag_val;
      }
    }

    // copy to NPU
    framework::TensorCopy(
        cpu_tensor,
        ctx.GetPlace(),
        ctx.template device_context<platform::DeviceContext>(),
        tensor);
    ctx.template device_context<paddle::platform::NPUDeviceContext>().Wait();
  }
};

}  // namespace operators
}  // namespace paddle

REGISTER_OP_NPU_KERNEL(uniform_random,
                       paddle::operators::NPUUniformRandomKernel<float>);


text:
jenkins-hello-java
==================
test2


text:
package com.croconaut.tictactoe.utils;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.croconaut.tictactoe.model.board.GameSeed;

import java.util.Locale;

/**
 * Runtime assertions checks.
 */
public final class Assertions {

    /**
     * @param actual Value to be compared against {@code value}.
     * @param value Value that the lower limit of {@code actual}.
     * @param name The string representation of {@code actual}.
     *
     * @throws AssertionError If {@code actual} is lower than {@code value}.
     */
    public static void assertIsBiggerThan(final int actual, final int value,
                                          @NonNull final String name) {
        if (actual < value) {
            throw new AssertionError(String.format(Locale.US,
                    "%s cannot be lower then %d currently is %d",  //$NON-NLS-1$
                    name, value, actual));
        }
    }

    /**
     * @param actual Value that will be checked whether it is bigger or equal than zero.
     * @param name The string representation of {@code actual}.
     *
     * @throws AssertionError If {@code actual} is lower then zero.
     */
    public static void assertIsPositive(final int actual, @NonNull final String name) {
        if (actual < 0) {
            throw new AssertionError(String.format(Locale.US,
                    "%s cannot be negative and is: %d", name, actual)); //$NON-NLS-1$
        }
    }

    /**
     * @param object Object that will be checked whether it is null.
     * @param name The string representation of {@code object}.
     *
     * @throws AssertionError If {@code object} is null.
     */
    public static void assertNotNull(@Nullable final Object object, @NonNull final String name) {
        if (null == object) {
            throw new AssertionError(
                    String.format(Locale.US, "%s cannot be null", name));//$NON-NLS-1$
        }
    }

    /**
     *
     * @param actual Value that will be checked whether it is inside {@code minValue}, {@code maxValue}.
     * @param minValue Lower limit for {@code value}.
     * @param maxValue Upper limit for {@code value}.
     * @param name The string representation of {@code actual}.
     *
     * @throws IllegalArgumentException If {@code minValue} is bigger then {@code maxValue}.
     * @throws AssertionError If {@code actual} isn't in interval of {@code minValue},{@code maxValue}
     */
    public static void assertIsInRange(final int actual, final int minValue,
                                       final int maxValue, @NonNull final String name) {
        if (minValue > maxValue) {
            throw new IllegalArgumentException("maxValue has to be bigger then minValue"); //$NON-NLS-1$
        }

        if (actual < minValue || actual > maxValue) {
            throw new AssertionError(String.format(Locale.US,
                    "%s has value %d that is not in range of: %d,%d", name, actual, minValue, //$NON-NLS-1$
                    maxValue));
        }
    }

    /**
     * @param seed Represents value that will be checked whether is is truly {@link GameSeed}.
     * @param name The string representation of {@code seed}.
     *
     *  @throws AssertionError If {@code seed} is not {@link GameSeed}.
     */
    public static void assertIsSeed(@GameSeed final int seed, @NonNull final String name) {
        final boolean isSeed = seed == GameSeed.BLANK || seed == GameSeed.CROSS || seed == GameSeed.NOUGHT;
        if (!isSeed) {
            throw new AssertionError(String.format(Locale.US,
                    "%s is not seed, value found: %d", name, seed));//$NON-NLS-1$
        }
    }

    /**
     *
     * @param actual Integer that needs to be compared to {@code value}.
     * @param value Value to compare.
     * @param name  The string representation of {@code actual}.
     *
     * @throws AssertionError If {@code value} and {@code value} are not equals.
     */
    public static void assertEquals(final int actual, final int value, @NonNull final String name) {
        if (actual != value) {
            throw new AssertionError(
                    String.format(Locale.US, "%s is not equals, %d != %d", name, actual, value)); //$NON-NLS-1$
        }
    }

    /**
     * Private constructor prevents instantiation.
     *
     * @throws UnsupportedOperationException because this class cannot be instantiated.
     */
    private Assertions() {
        throw new UnsupportedOperationException("This class is non-instantiable"); //$NON-NLS-1$
    }
}


text:
package iso20022

// Choice between a standard code or proprietary code to specify the type of lottery.
type LotteryTypeFormat4Choice struct {

	// Standard code to specify the type of lottery announced.
	Code *LotteryType1Code `xml:"Cd"`

	// Proprietary identification of the type of lottery announced.
	Proprietary *GenericIdentification30 `xml:"Prtry"`
}

func (l *LotteryTypeFormat4Choice) SetCode(value string) {
	l.Code = (*LotteryType1Code)(&value)
}

func (l *LotteryTypeFormat4Choice) AddProprietary() *GenericIdentification30 {
	l.Proprietary = new(GenericIdentification30)
	return l.Proprietary
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Debugger (FreeMarker 2.3.21 API)</title>
<meta name="date" content="2014-10-12">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

freemarker.debug

Interface Debugger

All Superinterfaces:

Remote

public interface Debugger
extends Remote

The main debugger interface. Allows management of breakpoints as well as
 installation of listeners for debug events.

Field Summary

Fields

Modifier and Type
Field and Description

static int
DEFAULT_PORT

Method Summary

All Methods Instance Methods Abstract Methods

Modifier and Type
Method and Description

void
addBreakpoint(Breakpoint breakpoint)

Adds a breakpoint

Object
addDebuggerListener(DebuggerListener listener)

Adds a listener for debugger events.

List
getBreakpoints()

Retrieves a list of all Breakpoint objects.

List
getBreakpoints(String templateName)

Retrieves a list of all Breakpoint objects for the specified
 template.

Collection
getSuspendedEnvironments()

Retrieves a collection of all DebuggedEnvironment objects that
 are currently suspended.

void
removeBreakpoint(Breakpoint breakpoint)

Removes a single breakpoint

void
removeBreakpoints()

Removes all breakpoints

void
removeBreakpoints(String templateName)

Removes all breakpoints for a specific template

void
removeDebuggerListener(Object id)

Removes a previously added debugger listener.

Field Detail

DEFAULT_PORT

static final int DEFAULT_PORT

See Also:

Constant Field Values

Method Detail

addBreakpoint

void addBreakpoint(Breakpoint breakpoint)
            throws RemoteException

Adds a breakpoint

Parameters:

breakpoint - the breakpoint to add

Throws:

RemoteException

removeBreakpoint

void removeBreakpoint(Breakpoint breakpoint)
               throws RemoteException

Removes a single breakpoint

Parameters:

breakpoint - the breakpoint to remove

Throws:

RemoteException

removeBreakpoints

void removeBreakpoints(String templateName)
                throws RemoteException

Removes all breakpoints for a specific template

Throws:

RemoteException

removeBreakpoints

void removeBreakpoints()
                throws RemoteException

Removes all breakpoints

Throws:

RemoteException

getBreakpoints

List getBreakpoints()
             throws RemoteException

Retrieves a list of all Breakpoint objects.

Throws:

RemoteException

getBreakpoints

List getBreakpoints(String templateName)
             throws RemoteException

Retrieves a list of all Breakpoint objects for the specified
 template.

Throws:

RemoteException

getSuspendedEnvironments

Collection getSuspendedEnvironments()
                             throws RemoteException

Retrieves a collection of all DebuggedEnvironment objects that
 are currently suspended.

Throws:

RemoteException

addDebuggerListener

Object addDebuggerListener(DebuggerListener listener)
                    throws RemoteException

Adds a listener for debugger events.

Returns:

an identification token that should be passed to
 removeDebuggerListener(Object) to remove this listener.

Throws:

RemoteException

removeDebuggerListener

void removeDebuggerListener(Object id)
                     throws RemoteException

Removes a previously added debugger listener.

Parameters:

id - the identification token for the listener that was returned
 from a prior call to addDebuggerListener(DebuggerListener).

Throws:

RemoteException

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
class CreateTokens < ActiveRecord::Migration
  def change
    create_table :tokens do |t|
      t.string :token, limit: 45, null: false
      t.string :hash_sum, limit: 255, null: true

      t.timestamps
    end
  end
end


text:
import expect from 'expect';
// import { shallow } from 'enzyme';
// import React from 'react';

describe('<NutrientHeaderRow />', () => {
  it('Expect to have unit tests specified', () => {
    expect(true).toEqual(false);
  });
});


text:
#region License
//
// Copyright (c) 2013, Kooboo team
//
// Licensed under the BSD License
// See the file LICENSE.txt for details.
//
#endregion

namespace Kooboo.Web.Mvc.WebResourceLoader
{
    public enum Mode
    {
        Debug,
        Release
    }
}


text:
+++
Title = "Douglas Heller"
Twitter = ""
Website = ""
type = "speaker"
linktitle = "douglas-heller"
image = "douglas-heller.jpg"
+++
I'm a Quality Engineer at RSA Archer working on machine learning based applications, as well as a brand-new CI/CD pipeline for a company that's been using the same release vehicle for almost two decades (DevOps transformation).  I can't get enough information about interesting technologies, especially as they pertain to the above fields.  Don't want to talk tech?  Let's chat about food, drinks, astronomy, or _your_ favorite hobby!


text:
require 'readline'

module Sidir
  class Browser
    attr_accessor :current_context

    def initialize
      Dir.chdir File.expand_path("~/Library/Application Support/iPhone Simulator/")
      @current_context = SimulatorsContext.new nil
    end

    def self.start
      instance = self.new.repl
    end

    def repl
      cmd = nil

      Readline.completion_proc = proc do |input|
        current_context.completions input
      end

      while cmd != 'exit'
        line = Readline.readline("sidir #{current_context.prompt} > ", true)

        break if line.nil? || line =~ /^exit$/

        args = line.split
        cmd  = args.shift

        if current_context.available_command? cmd
          self.current_context = current_context.execute_command cmd, args
        else
          puts "command not recognised :#{cmd}"
          current_context.help nil
        end
      end
    end
  end
end