text:
/*

 NUGGGGGH MUST TONGUE WANGS
                           \
                                .....
                               C C  /
                              /<   /
               ___ __________/_#__=o
              /(- /(\_\________   \
              \ ) \ )_      \o     \
              /|\ /|\       |'     |
                            |     _|
                            /o   __\
                           / '     |
                          / /      |
                         /_/\______|
                        (   _(    <
                         \    \    \
                          \    \    |
                           \____\____\
                           ____\_\__\_\
                         /`   /`     o\
                         |___ |_______|.. . b'ger

 IN THE FINAL BUILD THIS FILE DOESN'T HAVE DIRECT ACCESS TO GLOBAL FUNCTIONS
 DEFINED IN Angular.js YOU *MUST* REFER TO THEM VIA angular OBJECT
 (e.g. angular.forEach(...)) AND MAKE SURE THAT THE GIVEN FUNCTION IS EXPORTED
 TO THE angular NAMESPACE in AngularPublic.js

 */

/**
 * @workInProgress
 * @ngdoc overview
 * @name angular.mock
 * @description
 *
 * The `angular.mock` object is a namespace for all built-in mock services that ship with angular.
 * It automatically replaces real services if the `angular-mocks.js` file is loaded after
 * `angular.js` and before any tests.
 *
 * Built-in mocks:
 *
 * * {@link angular.mock.service.$browser $browser } - A mock implementation of the browser.
 * * {@link angular.mock.service.$exceptionHandler $exceptionHandler } - A mock implementation of the
 * angular service exception handler.
 * * {@link angular.mock.service.$log $log } - A mock implementation of the angular service log.
 */
angular.mock = {};

/**
 * @workInProgress
 * @ngdoc service
 * @name angular.mock.service.$browser
 */
function MockBrowser() {
  var self = this,
      expectations = {},
      requests = [];

  this.isMock = true;
  self.url = "http://server";
  self.lastUrl = self.url; // used by url polling fn
  self.pollFns = [];

  // register url polling fn

  self.onHashChange = function(listener) {
    self.pollFns.push(
      function() {
        if (self.lastUrl != self.url) {
          self.lastUrl = self.url;
          listener();
        }
      }
    );

    return listener;
  };

  self.xhr = function(method, url, data, callback, headers) {
    headers = headers || {};
    if (data && angular.isObject(data)) data = angular.toJson(data);
    if (data && angular.isString(data)) url += "|" + data;
    var expect = expectations[method] || {};
    var expectation = expect[url];
    if (!expectation) {
      throw new Error("Unexpected request for method '" + method + "' and url '" + url + "'.");
    }
    requests.push(function(){
      angular.forEach(expectation.headers, function(value, key){
        if (headers[key] !== value) {
          throw new Error("Missing HTTP request header: " + key + ": " + value);
        }
      });
      callback(expectation.code, expectation.response);
    });
  };
  self.xhr.expectations = expectations;
  self.xhr.requests = requests;
  self.xhr.expect = function(method, url, data, headers) {
    if (data && angular.isObject(data)) data = angular.toJson(data);
    if (data && angular.isString(data)) url += "|" + data;
    var expect = expectations[method] || (expectations[method] = {});
    return {
      respond: function(code, response) {
        if (!angular.isNumber(code)) {
          response = code;
          code = 200;
        }
        expect[url] = {code:code, response:response, headers: headers || {}};
      }
    };
  };
  self.xhr.expectGET    = angular.bind(self, self.xhr.expect, 'GET');
  self.xhr.expectPOST   = angular.bind(self, self.xhr.expect, 'POST');
  self.xhr.expectDELETE = angular.bind(self, self.xhr.expect, 'DELETE');
  self.xhr.expectPUT    = angular.bind(self, self.xhr.expect, 'PUT');
  self.xhr.expectJSON   = angular.bind(self, self.xhr.expect, 'JSON');
  self.xhr.flush = function() {
    if (requests.length == 0) {
      throw new Error("No xhr requests to be flushed!");
    }

    while(requests.length) {
      requests.pop()();
    }
  };

  self.cookieHash = {};
  self.lastCookieHash = {};
  self.deferredFns = [];

  self.defer = function(fn, delay) {
    delay = delay || 0;
    self.deferredFns.push({time:(self.defer.now + delay), fn:fn});
    self.deferredFns.sort(function(a,b){ return a.time - b.time;});
  };

  self.defer.now = 0;

  self.defer.flush = function(time) {
    self.defer.now += (time || 0);
    while (self.deferredFns.length && self.deferredFns[0].time <= self.defer.now) {
      self.deferredFns.shift().fn();
    }
  };
}
MockBrowser.prototype = {

  poll: function poll(){
    angular.forEach(this.pollFns, function(pollFn){
      pollFn();
    });
  },

  addPollFn: function(pollFn) {
    this.pollFns.push(pollFn);
    return pollFn;
  },

  hover: function(onHover) {
  },

  getUrl: function(){
    return this.url;
  },

  setUrl: function(url){
    this.url = url;
  },

  cookies:  function(name, value) {
    if (name) {
      if (value == undefined) {
        delete this.cookieHash[name];
      } else {
        if (angular.isString(value) &&       //strings only
            value.length <= 4096) {          //strict cookie storage limits
          this.cookieHash[name] = value;
        }
      }
    } else {
      if (!angular.equals(this.cookieHash, this.lastCookieHash)) {
        this.lastCookieHash = angular.copy(this.cookieHash);
        this.cookieHash = angular.copy(this.cookieHash);
      }
      return this.cookieHash;
    }
  },

  addJs: function(){}
};

angular.service('$browser', function(){
  return new MockBrowser();
});

/**
 * @workInProgress
 * @ngdoc service
 * @name angular.mock.service.$exceptionHandler
 *
 * @description
 * Mock implementation of {@link angular.service.$exceptionHandler} that rethrows any error passed
 * into `$exceptionHandler`. If any errors are are passed into the handler in tests, it typically
 * means that there is a bug in the application or test, so this mock will make these tests fail.
 *
 * See {@link angular.mock} for more info on angular mocks.
 */
angular.service('$exceptionHandler', function(e) {
  return function(e) {throw e;};
});

/**
 * @workInProgress
 * @ngdoc service
 * @name angular.mock.service.$log
 *
 * @description
 * Mock implementation of {@link angular.service.$log} that gathers all logged messages in arrays
 * (one array per logging level). These arrays are exposed as `logs` property of each of the
 * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`.
 *
 * See {@link angular.mock} for more info on angular mocks.
 */
angular.service('$log', MockLogFactory);

function MockLogFactory() {
  var $log = {
    log: function(){ $log.log.logs.push(arguments); },
    warn: function(){ $log.warn.logs.push(arguments); },
    info: function(){ $log.info.logs.push(arguments); },
    error: function(){ $log.error.logs.push(arguments); }
  };

  $log.log.logs = [];
  $log.warn.logs = [];
  $log.info.logs = [];
  $log.error.logs = [];

  return $log;
}

/**
 * Mock of the Date type which has its timezone specified via constroctor arg.
 *
 * The main purpose is to create Date-like instances with timezone fixed to the specified timezone
 * offset, so that we can test code that depends on local timezone settings without dependency on
 * the time zone settings of the machine where the code is running.
 *
 * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored)
 * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC*
 *
 * @example
 * !!!! WARNING !!!!!
 * This is not a complete Date object so only methods that were implemented can be called safely.
 * To make matters worse, TzDate instances inherit stuff from Date via a prototype.
 *
 * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is
 * incomplete we might be missing some non-standard methods. This can result in errors like:
 * "Date.prototype.foo called on incompatible Object".
 *
 * <pre>
 * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
 * newYearInBratislava.getTimezoneOffset() => -60;
 * newYearInBratislava.getFullYear() => 2010;
 * newYearInBratislava.getMonth() => 0;
 * newYearInBratislava.getDate() => 1;
 * newYearInBratislava.getHours() => 0;
 * newYearInBratislava.getMinutes() => 0;
 * </pre>
 *
 */
function TzDate(offset, timestamp) {
  if (angular.isString(timestamp)) {
    var tsStr = timestamp;

    this.origDate = angular.String.toDate(timestamp);

    timestamp = this.origDate.getTime();
    if (isNaN(timestamp))
      throw {
        name: "Illegal Argument",
        message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string"
      };
  } else {
    this.origDate = new Date(timestamp);
  }

  var localOffset = new Date(timestamp).getTimezoneOffset();
  this.offsetDiff = localOffset*60*1000 - offset*1000*60*60;
  this.date = new Date(timestamp + this.offsetDiff);

  this.getTime = function() {
    return this.date.getTime() - this.offsetDiff;
  };

  this.toLocaleDateString = function() {
    return this.date.toLocaleDateString();
  };

  this.getFullYear = function() {
    return this.date.getFullYear();
  };

  this.getMonth = function() {
    return this.date.getMonth();
  };

  this.getDate = function() {
    return this.date.getDate();
  };

  this.getHours = function() {
    return this.date.getHours();
  };

  this.getMinutes = function() {
    return this.date.getMinutes();
  };

  this.getSeconds = function() {
    return this.date.getSeconds();
  };

  this.getTimezoneOffset = function() {
    return offset * 60;
  };

  this.getUTCFullYear = function() {
    return this.origDate.getUTCFullYear();
  };

  this.getUTCMonth = function() {
    return this.origDate.getUTCMonth();
  };

  this.getUTCDate = function() {
    return this.origDate.getUTCDate();
  };

  this.getUTCHours = function() {
    return this.origDate.getUTCHours();
  };

  this.getUTCMinutes = function() {
    return this.origDate.getUTCMinutes();
  };

  this.getUTCSeconds = function() {
    return this.origDate.getUTCSeconds();
  };

  this.getDay = function() {
    return this.origDate.getDay();
  };

  //hide all methods not implemented in this mock that the Date prototype exposes
  var unimplementedMethods = ['getMilliseconds', 'getTime', 'getUTCDay',
      'getUTCMilliseconds', 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
      'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
      'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',
      'setYear', 'toDateString', 'toJSON', 'toGMTString', 'toLocaleFormat', 'toLocaleString',
      'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf'];

  angular.forEach(unimplementedMethods, function(methodName) {
    this[methodName] = function() {
      throw {
        name: "MethodNotImplemented",
        message: "Method '" + methodName + "' is not implemented in the TzDate mock"
      };
    };
  });
}

//make "tzDateInstance instanceof Date" return true
TzDate.prototype = Date.prototype;


text: 2D game set in the nightmares of a person.

redpajama_set_name: RedPajamaGithub


text:
cask :v1 => 'transmit' do
  version '4.4.8'
  sha256 '3547a5e8baabffd18c4e21c766362cd4295d878d391ce48bb8f8f4d6eabd9ef9'

  url "https://www.panic.com/transmit/d/Transmit%20#{version}.zip"
  appcast 'http://www.panic.com/updates/update.php'
  homepage 'http://panic.com/transmit'
  license :unknown    # todo: improve this machine-generated value

  app 'Transmit.app'

  zap :delete => [
                  '~/Library/Preferences/com.panic.Transmit.plist',
                  '~/Library/Application Support/Transmit',
                 ]
end


text:
layout: page
title: Hebert - Wolfe Wedding
date: 2016-05-24
author: Karen Roberson
tags: weekly links, java
status: published
summary: Aliquam tincidunt ut felis eu eleifend. Nullam a velit.
banner: images/banner/leisure-01.jpg
booking:
  startDate: 10/23/2019
  endDate: 10/25/2019
  ctyhocn: GSOEAHX
  groupCode: HWW
published: true
---
Cras condimentum justo vel scelerisque egestas. Fusce semper dui nec ligula venenatis viverra. Ut sollicitudin, enim in tempus porta, enim nibh auctor ante, et fermentum tortor lectus vitae ex. Aenean placerat pulvinar arcu vitae accumsan. Integer feugiat felis vel pharetra pharetra. Pellentesque sollicitudin laoreet ligula, eu commodo nibh gravida pulvinar. Donec maximus eros a sapien commodo, sed lobortis mauris condimentum. Mauris sed rhoncus sem. Nunc tincidunt enim at fringilla ultrices. Pellentesque dapibus tellus sed lectus eleifend, at dictum diam convallis.

* Maecenas pharetra dolor nec quam sollicitudin vehicula.

Praesent semper justo at auctor consectetur. Sed sapien magna, fermentum sit amet aliquet ac, volutpat at nisi. Quisque vitae tincidunt eros. Nunc mi arcu, hendrerit ut velit ut, suscipit vehicula justo. Nulla id rutrum justo. Donec non aliquet lorem, at convallis nulla. Ut in augue non nulla imperdiet volutpat quis sed lorem.


text:
import PropTypes from "prop-types";
import { injectIntl } from "react-intl";
import Immutable from "immutable";
import jobsUtils from "@app/utils/jobsUtils";
import { Tooltip } from "dremio-ui-lib";
import { getIconPath } from "@app/utils/getIconPath";
import timeUtils from "utils/timeUtils";

import "./Reflection.less";

const renderIcon = (iconName, className) => {
  return (
    <Tooltip title="Reflection">

    </Tooltip>
  );
};

const getReflectionIcon = (reflectionType) => {
  const reflectionCreatedIcon =
    reflectionType === "RAW"
      ? "interface/reflections-created-raw"
      : "interface/reflections-created-agg";
  return renderIcon(reflectionCreatedIcon, "reflectionIcon");
};

const ReflectionsCreated = (props) => {
  const {
    reflections,
    intl: { formatMessage },
    location,
  } = props;

  return (

      {reflections.size > 0 && (

            {formatMessage({ id: "Reflections.ReflectionCreated" })}

      )}
      {reflections &&
        reflections.map((item, index) => {
          const reflectionAge =
            item.get("reflectionCreated") && item.get("reflectionCreated");
          return (
            <div
              className="jobsDetailsReflections"
              key={`reflections-${index}`}
              data-qa="reflectionsTestCase"
            >

                {getReflectionIcon(item.get("reflectionType"))}

                    {jobsUtils.getReflectionsLink(item, location)}

                    {item.get("reflectionDatasetPath")}

              {reflectionAge && (

                  {formatMessage({ id: "Reflections.Age" })}
                  {timeUtils.toNow(Number(reflectionAge))}

              )}

          );
        })}

  );
};

ReflectionsCreated.propTypes = {
  intl: PropTypes.object.isRequired,
  isAcceleration: PropTypes.bool,
  reflections: PropTypes.instanceOf(Immutable.List),
  location: PropTypes.object,
};
export default injectIntl(ReflectionsCreated);


text:
package sep.gaia.controller;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.util.HashSet;
import java.util.Set;

import sep.gaia.renderer.layer.CompassAdapter;
import sep.gaia.renderer.layer.WeatherAdapter;
import sep.gaia.resources.tiles2d.TileManager;
import sep.gaia.state.AbstractStateManager.StateType;
import sep.gaia.state.GLState;
import sep.gaia.state.GeoState;
import sep.gaia.state.StateManager;
import sep.gaia.state.StateObserver;
import sep.gaia.ui.GaiaCanvas;
import sep.gaia.util.AlgoUtil;
import sep.gaia.util.FloatBoundingBox;
import sep.gaia.util.FloatVector3D;
import sep.gaia.util.RayCast;

/**
 * TODO
 * @author Johannes Bauer
 */
public class MouseDraggedListener2d implements MouseMotionListener, MouseListener {

	private GLState glState;

	private Set<StateObserver> observerBackup = new HashSet<>();

	private int oldX = -1;
	private int oldY = -1;

	private boolean mouseDragged = false;

	public MouseDraggedListener2d(GLState glState) {
		this.glState = glState;
	}

	@Override
	public void mouseDragged(MouseEvent e) {

		// If the button was just pressed:
		if(oldX == -1 && oldY == -1) {

			// Unregister all unnecessary observers and remember them,
			// in order to prevent them to invoke block unnecessary:
			for(StateObserver observer : glState.getObservers()) {
				if(!(observer instanceof TileManager) && !(observer instanceof CompassAdapter)
						&& !(observer instanceof WeatherAdapter)) {

					observerBackup.add(observer);
					glState.unregister(observer);
				}
			}
		}

		if (!glState.is2DMode()) {
			return;
		}

		int x = e.getX();
		int y = e.getY();

		int dX = 0;
		int dY = 0;

		if (oldX > -1 && oldY > -1) {
			dX = oldX - x;
			dY = y - oldY;

			// Convert the distance moved in window to GL-coordinates:
			int tileZoom = AlgoUtil.glToTileZoom(glState.getZoom());
			final float glMoveX = AlgoUtil.glCoordsPerPixelRange(dX, tileZoom);
			final float glMoveY = AlgoUtil.glCoordsPerPixelRange(dY, tileZoom);

			float rotationZ = glState.getRotation().getZ();
			FloatVector3D direction = new FloatVector3D(glMoveX, glMoveY, 0);
			direction.rotateAroundZ(-rotationZ);

			// Translate the current position:
			glState.translate(direction);
		}

		oldX = x;
		oldY = y;

		mouseDragged = true;
	}

	@Override
	public void mouseReleased(MouseEvent e) {
		if (mouseDragged) {
			mouseDragged = false;

			oldX = -1;
			oldY = -1;

			// Re-register the remembered observers:
			for(StateObserver observer : observerBackup) {
				glState.register(observer);
			}

			// Empty the remembered observers:
			observerBackup.clear();

			glState.notifyManager();
			glState.notifyStateObservers();
		}
	}

	@Override
	public void mouseClicked(MouseEvent e) {
	}

	@Override
	public void mousePressed(MouseEvent e) {
		// TODO Auto-generated method stub

	}

	@Override
	public void mouseEntered(MouseEvent e) {
		// TODO Auto-generated method stub

	}

	@Override
	public void mouseExited(MouseEvent e) {
		// TODO Auto-generated method stub

	}

	@Override
	public void mouseMoved(MouseEvent e) {
		// TODO Auto-generated method stub

	}

}


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

@import UIKit;
@import Buy;

extern float const imageDuration;

/**
 *  Provides an easy way to asynchronously load images from a URL
 */
@interface AsyncImageView : UIImageView

@property (nonatomic, assign) BOOL showsActivityIndicator;

/**
 *  Load an image asynchronously from a URL
 *
 *  @param imageURL   The URL to load the image from
 *  @param completion Completion block returning the image or an error
 */
- (void)loadImageWithURL:(NSURL *)imageURL completion:(void (^)(UIImage *image, NSError *error))completion;

/**
 *  Load an image asynchronously from a URL and animate the transition
 *
 *  @param imageURL      The URL to load the image from
 *  @param animateChange YES to animation the image transition
 *  @param completion    Completion block returning the image or an error
 */
- (void)loadImageWithURL:(NSURL *)imageURL animateChange:(BOOL)animateChange completion:(void (^)(UIImage *image, NSError *error))completion;

/**
 *  Cancel the current image loading task
 */
- (void)cancelImageTask;

/**
 *  Check if the image is portrait or square - or landscape
 *
 *  @return Returns YES if the image is portrait or square, returns NO if the image is landscape
 */
- (BOOL)isPortraitOrSquare;

/**
 *  Load an image asynchronously from an BUYImageLink and animate the transition.  Will use the optimal image size for the ImageView
 *
 *  @param imageLink     the BUYImageLink that points to the image asset to use
 *  @param animateChange YES to animation the image transition
 *  @param completion    Completion block returning the image or an error
 */
- (void)loadImageLink:(BUYImageLink *)imageLink animateChange:(BOOL)animateChange completion:(void (^)(UIImage *image, NSError *error))completion;

@end


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

<title>Overview</title>
<meta name="date" content="2014-06-05">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

MyTardis API - Java Client

        This package implements a Java client for the
        MyTardis API.

See: Description

Packages

Package
Description

org.mytardis.api.client

org.mytardis.api.model

        This package implements a Java client for the
        MyTardis API.
        It contains two sub-packages:

org.mytardis.api.client

                Includes the classes for building, posting, and
                retrieving objects from MyTardis.

                Experiments are built using the
                ExperimentTree,
                DatasetTree, and
                DatafileTree classes---each of which
                can have associated meta-data parameters.
                Trees take a TardisClient instance
                as a constructor parameter---which handles the interaction with the
                MyTardis RESTful interface.

                Trees can be validated individually using an associated
                checkTree() method. Alternatively, the
                ExperimentTree.verify() method can be
                used to execute all checkTree() methods in an experiment and
                aggregate any errors that they generate. This verify() method
                must validate successfully---with no errors---for the
                ExperimentTree.post() method to push the
                experiment, datasets, and datafiles to the MyTardis system.
                See ExperimentTree.verify() for details of
                which attributes are required and which are optional for each tree.

                A TardisClient can be used to retrieve
                TardisObject instances for a given
                model, either as a list or individually---by <emph>Id</emph> or
                <emph>ResourceURI</emph>.

org.mytardis.api.model

                Includes the object models generated from the MyTardis API schema.
                Objects are generated using the
                jsonschema2pojo utility,
                using the following parameters: source type is "JSON", and
                annotation style is "Gson".

Version:

1.0

Author:

Nick May.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.0
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.badlogic.gdx.physics.bullet.collision;

import com.badlogic.gdx.physics.bullet.BulletBase;
import com.badlogic.gdx.physics.bullet.linearmath.*;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.Quaternion;
import com.badlogic.gdx.math.Matrix3;
import com.badlogic.gdx.math.Matrix4;

public class btConvexInternalAabbCachingShape extends btConvexInternalShape {
	private long swigCPtr;

	protected btConvexInternalAabbCachingShape(final String className, long cPtr, boolean cMemoryOwn) {
		super(className, CollisionJNI.btConvexInternalAabbCachingShape_SWIGUpcast(cPtr), cMemoryOwn);
		swigCPtr = cPtr;
	}

	/** Construct a new btConvexInternalAabbCachingShape, normally you should not need this constructor it's intended for low-level usage. */
	public btConvexInternalAabbCachingShape(long cPtr, boolean cMemoryOwn) {
		this("btConvexInternalAabbCachingShape", cPtr, cMemoryOwn);
		construct();
	}

	@Override
	protected void reset(long cPtr, boolean cMemoryOwn) {
		if (!destroyed)
			destroy();
		super.reset(CollisionJNI.btConvexInternalAabbCachingShape_SWIGUpcast(swigCPtr = cPtr), cMemoryOwn);
	}

	public static long getCPtr(btConvexInternalAabbCachingShape obj) {
		return (obj == null) ? 0 : obj.swigCPtr;
	}

	@Override
	protected void finalize() throws Throwable {
		if (!destroyed)
			destroy();
		super.finalize();
	}

  @Override protected synchronized void delete() {
		if (swigCPtr != 0) {
			if (swigCMemOwn) {
				swigCMemOwn = false;
				CollisionJNI.delete_btConvexInternalAabbCachingShape(swigCPtr);
			}
			swigCPtr = 0;
		}
		super.delete();
	}

  public void recalcLocalAabb() {
    CollisionJNI.btConvexInternalAabbCachingShape_recalcLocalAabb(swigCPtr, this);
  }

}


text:
module ApiKits

  # ApiKits::Configuration provides a way to configure ApiKits globally.
  class Configuration

    # Handle a boolean to define when mock the requests.
    #
    # @return [Boolean] boolean used to set mock requests.
    attr_accessor :mock

    # Handle a the hydra object used by typhoeus to make parallel requests.
    #
    # @return [Typhoeus] object that handle parallel requests.
    attr_accessor :hydra

    # The default header for all requests.
    #
    # @return [Hash] all the default header params used by ApiKits.
    attr_reader :header

    # Get the API URI.
    #
    # @return [String] the API URI.
    def api_uri
      raise Exceptions::BadlyConfigured.new if @api_uri.empty? || @api_uri.nil? || @api_uri == '/'
      @api_uri
    end

    # Set the API URI.
    #
    # @param [String] the API URI.
    def api_uri=(api_uri)
      @api_uri = "#{api_uri}/" unless api_uri[api_uri.size - 1, 1] == '/'
      @api_uri
    end

    # Set the default params of header.
    #
    # @param [Hash] header the default header for requests.
    def header=(header = {})
      @header = { 'Content-Type' => 'application/json', 'Accept' => 'application/json' }.merge(header)
    end

    # Set a bearer token authorization for all requests.
    #
    # @param [String] token the user JWT token requests.
    def bearer_token(token)
      @header.merge!({ 'Authorization' => "Bearer #{token}" })
    end
  end

end


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.curso.java.modelo;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Administrador
 */
public class PersonaProxy implements Persona {

    private static final Logger LOG = Logger.getLogger(PersonaProxy.class.getName());
    private Persona personaReal;

    public void setPersonaReal(Persona personaReal) {
        this.personaReal = personaReal;
    }

    @Override
    public String getNombre() {
        LOG.log(Level.INFO, "Ejecutando getNombre en el proxy");
        return personaReal.getNombre();
    }

    @Override
    public void setNombre(String nombre) {
        LOG.log(Level.INFO, "Ejecutando setNombre en el proxy: {0}", nombre);
        personaReal.setNombre(nombre);
    }

}


text:
package org.gobiiproject.gobiidao.resultset.sqlworkers.read;

import org.gobiiproject.gobiidao.resultset.core.DbMetaData;
import org.hibernate.jdbc.Work;
import org.springframework.beans.factory.annotation.Autowired;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;

/**
 * Created by Phil on 4/7/2016.
 */
public class SpGetDbConnectionMetaData implements Work {

    @Autowired
    DbMetaData dbMetaData;

    private Map<String, Object> parameters = null;

    public SpGetDbConnectionMetaData(Map<String, Object> parameters) {
        this.parameters = parameters;
    }

    private ResultSet resultSet = null;

    public ResultSet getResultSet() {
        return resultSet;
    }

    private String getDbUrl(Connection connection) throws SQLException {

        return connection
                .getMetaData()
                .getURL();
    }

    @Override
    public void execute(Connection dbConnection) throws SQLException {

        parameters.put("url", getDbUrl(dbConnection));

    } // execute()
}


text:
<!DOCTYPE HTML>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

    <meta name="viewport" content="initial-scale = 1.0, user-scalable = no">
    <meta name="apple-mobile-web-app-capable" content="yes" />

    <link rel="stylesheet" href="../../source/css/mootor.css">
    <link rel="stylesheet" href="../../source/css/color.css">
    <link rel="stylesheet" href="../../source/css/icons.css">


text:
<?xml version="1.0" ?>
<xliff version="1.0">
  <file original="global" source-language="en" datatype="plaintext">
    <body>

<!-- showSuccess -->
      <trans-unit id="1">
        <source>Purpose</source>
        <target>Цель</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Bank account</source>
        <target>Банковский счёт</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Account Holder's Name</source>
        <target>Имя владельца счёта</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Account Number</source>
        <target>Номер счёта</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Bank Name</source>
        <target>Название банка</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Branch</source>
        <target>Отделение</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Address</source>
        <target>Адрес</target>
      </trans-unit>

      <trans-unit id="1">
        <source>street</source>
        <target>улица</target>
      </trans-unit>

      <trans-unit id="1">
        <source>sity</source>
        <target>город</target>
      </trans-unit>

      <trans-unit id="1">
        <source>district</source>
        <target>район</target>
      </trans-unit>

      <trans-unit id="1">
        <source>country</source>
        <target>страна</target>
      </trans-unit>

      <trans-unit id="1">
        <source>SWIFT (BIC)</source>
        <target>SWIFT (БИК)</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Phone</source>
        <target>Телефон</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Fax</source>
        <target>Факс</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Reports</source>
        <target>Отчёты</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Income / Expenses</source>
        <target>Отчёт о полученных и потраченных средствах</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Planned expenses</source>
        <target>Запланированные расходы</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Currency Converter</source>
        <target>Конвертер валют</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Donations received</source>
        <target>Полученные пожертвования</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Email at</source>
        <target>Обращайтесь на</target>
      </trans-unit>

      <trans-unit id="1">
        <source>for instructions.</source>
        <target>для получения инструкций.</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Donations support a wide range of causes: constructions, shelters, protection of the environment, food, transport, rents... It all is done through your kindness and generosity only.</source>
        <target>Собранные пожертвования идут на самые разные нужды: возведение и ремонт построек, временные укрытия, защиту окружающей среды, питание, транспорт, покрытие арендных плат... Всё это только благодаря вашей доброте и отзывчивости.</target>
      </trans-unit>

      <trans-unit id="1">
        <source>PayPal or Credit Card</source>
        <target>PayPal или кредитная карта</target>
      </trans-unit>

      <trans-unit id="1">
        <source>PayPal - The safer, easier way to pay online!</source>
        <target>PayPal — более безопасный и легкий способ оплаты через Интернет!</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Recurring Donation</source>
        <target>Повторяющееся пожертвование</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Donation amount</source>
        <target>Размер пожертвования</target>
      </trans-unit>

      <trans-unit id="1">
        <source>USD</source>
        <target>доллара(ов) США</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Payment cycle</source>
        <target>Период</target>
      </trans-unit>

      <trans-unit id="1">
        <source>day(s)</source>
        <target>дня (дней)</target>
      </trans-unit>

      <trans-unit id="1">
        <source>week(s)</source>
        <target>недели (недель)</target>
      </trans-unit>

      <trans-unit id="1">
        <source>month(s)</source>
        <target>месяца (месяцев)</target>
      </trans-unit>

      <trans-unit id="1">
        <source>year(s)</source>
        <target>года (лет)</target>
      </trans-unit>

      <trans-unit id="1">
        <source>After how many cycles should sending donations stop</source>
        <target>Через сколько повторов прекратится отправка пожертвований</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Never</source>
        <target>Никогда</target>
      </trans-unit>

      <trans-unit id="1">
        <source>You have control over your payments through your Paypal account and can cancel at any time.</source>
        <target>Вы имеете полный контроль над своими платежами через свой аккаунт PayPal и можете в любой момент отменить отправку средств.</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Detailed reports on received donations and expenses are being sent personally to donors.</source>
        <target>Подробные отчёты о собранных средствах и расходах перидически отправляются лично донорам.</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Order of</source>
        <target></target>
      </trans-unit>

      <trans-unit id="1">
        <source>Address to</source>
        <target></target>
      </trans-unit>

      <trans-unit id="1">
        <source>PayPal fees</source>
        <target>Размер комиссии PayPal</target>
      </trans-unit>

      <trans-unit id="1">
        <source>Fees for donations from the United States are from 2.2 to 2.9%. There can be fees up to 4.9% for donations sent from outside the United States depending on the country.</source>
        <target>С пожертвований, отправленных из США, взимается комиссия 2,2-2,9%. Комиссия с пожертвований, перечисленных из других стран, может достигать 4,9% в зависимости от страны отправления.</target>
      </trans-unit>

<!-- утф -->
    </body>
  </file>
</xliff>


text:
require 'thread'

class Proco
module Queue
# @private
class SingleQueue < Proco::Queue::Base
  def initialize size, delay
    super
  end

  def push_impl item
    future = Future.new
    @items << [future, item]
    future
  end

  def take_impl
    @items.shift
  end
end
end
end


text:
            ${i18n.findNearest}

            ${i18n.summarizeDefine}

              ${i18n.oneLabel}
              ${i18n.findLocationsIn}

              <select class="longInput esriLeadingMargin1 esriLongLabel"  style="margin-top:1.0em;" data-dojo-type="dijit/form/Select" data-dojo-attach-point="_layersSelect" data-dojo-attach-event="onChange:_handleLayerChange"></select>

              ${i18n.twoLabel}
              ${i18n.measureLabel}

${i18n.straightLineDistance}

${i18n.drivingTime}

${i18n.drivingDistance}

${i18n.truckingTime}

${i18n.truckingDistance}

${i18n.walkingTime}

${i18n.walkingDistance}

              ${i18n.threeLabel}

                  ${i18n.findNearestLabel}

             <input data-dojo-type="dijit/form/NumberSpinner"  class= "esriMediumlabel esriLeadingMargin2"  data-dojo-attach-point="_maxCountInput" data-dojo-props="style: 'width:25%',smallDelta:1,constraints: { min:1, max:100, places:0 }"/>

                   ${i18n.limitSearchRangeCheck}

              <input type="text" class="esriLeadingMargin2" data-dojo-type="dijit/form/NumberTextBox" data-dojo-attach-event="onChange:_handleDistValueChange" data-dojo-props="value:100,intermediateChanges:true,required:true,invalidMessage:'${i18n.distanceMsg}'" data-dojo-attach-point="_searchCutoffInput" class="esriLeadingMargin1"  style="width:60%;">

              <select class="mediumInput esriMediumlabel esriAnalysisSelect esriLeadingMargin1" data-dojo-type="dijit/form/Select" data-dojo-attach-event="onChange:_handleDistUnitsChange" data-dojo-attach-point="_distanceUnitsSelect" style="width:65%;table-layout:fixed;">
              </select>

                <input type="text" class="" style="width:40%" data-dojo-type="dijit/form/NumberTextBox" data-dojo-attach-event="onChange:_handleTimeUnitsChange" data-dojo-props="intermediateChanges:true,value:'1',required:true,invalidMessage:'${i18n.distanceMsg}'" data-dojo-attach-point="_hoursInput"></input>
                ${i18n.hoursSmall}

                <input type="text" class="" style="width:40%" data-dojo-type="dijit/form/NumberTextBox" data-dojo-attach-event="onChange:_handleTimeUnitsChange" data-dojo-props="intermediateChanges:true,value:'0',required:true,invalidMessage:'${i18n.distanceMsg}'" data-dojo-attach-point="_minutesInput"></input>
                ${i18n.minutesSmall}

                <input type="text" class="" style="width:40%" data-dojo-type="dijit/form/NumberTextBox" data-dojo-attach-event="onChange:_handleTimeUnitsChange" data-dojo-props="intermediateChanges:true,value:'0',required:true,invalidMessage:'${i18n.distanceMsg}'" data-dojo-attach-point="_secondsInput"></input>
                ${i18n.secondsSmall}

              ${i18n.fourLabel}
              ${i18n.outputLayerLabel}

              <input type="text" data-dojo-type="dijit/form/ValidationTextBox" class="esriLeadingMargin1 esriOutputText"  data-dojo-props="trim:true,required:true" data-dojo-attach-point="_outputLayerInput" value=""></input>

                 ${i18n.saveResultIn}
                 <input class="longInput esriFolderSelect" dojoAttachPoint="_webMapFolderSelect" dojotype="dijit/form/ComboBox" trim="true"></input>

        ${i18n.showCredits}

         <input type="radio" data-dojo-attach-point="_useExtentCheck" data-dojo-type="dijit/form/CheckBox" data-dojo-props="checked:true" name="extent" value="true"/>
           ${i18n.useMapExtent}

      <button data-dojo-type="dijit/form/Button" type="submit" data-dojo-attach-point="_saveBtn" class="esriLeadingMargin4 esriAnalysisSubmitButton" data-dojo-attach-event="onClick:_handleSaveBtnClick">
          ${i18n.runAnalysis}
      </button>


text:
/**
 * @file s2740vc_init.c
 *
 * S2740VCv1-specific early startup code.  This file implements the
 * board_app_initialize() function that is called early by nsh during startup.
 *
 * Code here is run before the rcS script is invoked; it should start required
 * subsystems and perform board-specific initialization.
 */

/****************************************************************************
 * Included Files
 ****************************************************************************/

#include <px4_config.h>

#include <stdbool.h>
#include <stdio.h>
#include <debug.h>
#include <errno.h>

#include "platform/cxxinitialize.h"
#include <nuttx/board.h>
#include <nuttx/spi/spi.h>
#include <nuttx/i2c/i2c_master.h>
#include <nuttx/mmcsd.h>
#include <nuttx/analog/adc.h>

#include <stm32.h>
#include "board_config.h"
#include "stm32_uart.h"

#include <arch/board/board.h>

#include <drivers/drv_hrt.h>
#include <drivers/drv_board_led.h>

#include <systemlib/cpuload.h>
#include <parameters/param.h>

#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
#include <systemlib/systemlib.h>
#endif

#include "board_config.h"

/* todo: This is constant but not proper */
__BEGIN_DECLS
extern void led_off(int led);
__END_DECLS

/****************************************************************************
 * Pre-Processor Definitions
 ****************************************************************************/

/* Configuration ************************************************************/

/* Debug ********************************************************************/

/****************************************************************************
 * Protected Functions
 ****************************************************************************/

/****************************************************************************
 * Public Functions
 ****************************************************************************/

/************************************************************************************
 * Name: stm32_boardinitialize
 *
 * Description:
 *   All STM32 architectures must provide the following entry point.  This entry point
 *   is called early in the initialization -- after all memory has been configured
 *   and mapped but before any devices have been initialized.
 *
 ************************************************************************************/

__EXPORT void stm32_boardinitialize(void)
{
	stm32_configgpio(GPIO_CAN_SILENT);
}

__EXPORT void board_initialize(void)
{
}

/****************************************************************************
 * Name: board_app_initialize
 *
 * Description:
 *   Perform application specific initialization.  This function is never
 *   called directly from application code, but only indirectly via the
 *   (non-standard) boardctl() interface using the command BOARDIOC_INIT.
 *
 * Input Parameters:
 *   arg - The boardctl() argument is passed to the board_app_initialize()
 *         implementation without modification.  The argument has no
 *         meaning to NuttX; the meaning of the argument is a contract
 *         between the board-specific initalization logic and the the
 *         matching application logic.  The value cold be such things as a
 *         mode enumeration value, a set of DIP switch switch settings, a
 *         pointer to configuration data read from a file or serial FLASH,
 *         or whatever you would like to do with it.  Every implementation
 *         should accept zero/NULL as a default configuration.
 *
 * Returned Value:
 *   Zero (OK) is returned on success; a negated errno value is returned on
 *   any failure to indicate the nature of the failure.
 *
 ****************************************************************************/

__EXPORT int board_app_initialize(uintptr_t arg)
{
	int result = OK;

#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)

	/* run C++ ctors before we go any further */

	up_cxxinitialize();

#	if defined(CONFIG_EXAMPLES_NSH_CXXINITIALIZE)
#  		error CONFIG_EXAMPLES_NSH_CXXINITIALIZE Must not be defined! Use CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE.
#	endif

#else
#  error platform is dependent on c++ both CONFIG_HAVE_CXX and CONFIG_HAVE_CXXINITIALIZE must be defined.
#endif

	/* configure the high-resolution time/callout interface */
	hrt_init();

	param_init();

	/* set up the serial DMA polling */
	static struct hrt_call serial_dma_call;
	struct timespec ts;

	/*
	 * Poll at 1ms intervals for received bytes that have not triggered
	 * a DMA event.
	 */
	ts.tv_sec = 0;
	ts.tv_nsec = 1000000;

	hrt_call_every(&serial_dma_call,
		       ts_to_abstime(&ts),
		       ts_to_abstime(&ts),
		       (hrt_callout)stm32_serial_dma_poll,
		       NULL);

	return result;
}


text:
package dae.prefabs.lights;

import com.jme3.asset.AssetManager;
import com.jme3.light.PointLight;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.scene.Geometry;
import com.jme3.scene.Node;
import com.jme3.scene.Spatial;
import com.jme3.scene.control.LightControl;
import com.jme3.scene.shape.Sphere;
import dae.prefabs.Prefab;

/**
 *
 * @author Koen Samyn
 */
public class PointLightPrefab extends Prefab {

    private PointLight pointLight;
    private Spatial pointLightSphere;
    private Material lightMaterial;
    private ColorRGBA pointLightColor;
    private float pointLightIntensity;

    public PointLightPrefab() {
        pointLight = new PointLight();

        LightControl lightControl = new LightControl(pointLight);
        this.addControl(lightControl);
    }

    @Override
    public void create(AssetManager manager, String extraInfo) {
        pointLight.setPosition(this.getLocalTranslation());
        pointLightColor = pointLight.getColor().clone();
        lightMaterial = manager.loadMaterial("/Materials/LightMaterial.j3m");

        Sphere s = new Sphere(12, 12, 0.15f);
        Geometry g = new Geometry("pointlightgizmo", s);
        g.setMaterial(manager.loadMaterial("/Materials/LightGizmoMaterial.j3m"));
        attachChild(g);
        adaptLightSphere();
    }

    /**
     * @return the radius
     */
    public float getRadius() {
        return pointLight.getRadius();
    }

    /**
     * @param radius the radius to set
     */
    public void setRadius(float radius) {
        pointLight.setRadius(radius);
        adaptLightSphere();
    }

    /**
     * @return the pointLightColor
     */
    public ColorRGBA getPointLightColor() {
        return pointLightColor;
    }

    /**
     * @param pointLightColor the pointLightColor to set
     */
    public void setPointLightColor(ColorRGBA pointLightColor) {
        this.pointLightColor = pointLightColor;
        this.pointLight.setColor(pointLightColor.mult(pointLightIntensity));
    }

    private void adaptLightSphere() {
        Sphere sphere = new Sphere(12, 12, pointLight.getRadius());
        Geometry innerCone = new Geometry("lightSphere", sphere);
        innerCone.setMaterial(lightMaterial);

        if (this.pointLightSphere != null) {
            pointLightSphere.removeFromParent();
        }

        pointLightSphere = innerCone;
        if (isSelected()) {
            attachChild(pointLightSphere);
        }
    }

    @Override
    public void setParent(Node parent) {
        super.setParent(parent);
        if (parent != null) {
            parent.addLight(this.pointLight);
        }
    }

    @Override
    public boolean removeFromParent() {
        Node parentNode = this.getParent();
        parentNode.removeLight(this.pointLight);
        return super.removeFromParent();
    }

    @Override
    public void setSelected(boolean selected) {
        super.setSelected(selected);
        if (pointLightSphere == null) {
            return;
        }
        if (selected) {
            attachChild(pointLightSphere);
        } else {
            pointLightSphere.removeFromParent();

        }
    }

    /**
     * @return the pointLightIntensity
     */
    public float getPointLightIntensity() {
        return pointLightIntensity;
    }

    /**
     * @param pointLightIntensity the pointLightIntensity to set
     */
    public void setPointLightIntensity(float pointLightIntensity) {
        this.pointLightIntensity = pointLightIntensity;
        this.pointLight.setColor(pointLightColor.mult(pointLightIntensity));
    }
}


text:
<?php
  global $user;
  $node = $element['#object'];
  $nid  = $node->nid;
?>
  <div class="<?php print $classes; ?>"<?php print $attributes; ?>>
    <div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>:

    <div class="field-items"<?php print $content_attributes; ?>>

        <?php print render($items[0]); ?>
        <?php if (in_array('Client', $user->roles) || in_array('administrator', $user->roles)) : ?> => update priority<?php endif; ?>

    <?php
      $priority = taxonomy_get_tree(6);
      foreach ($priority as $p) :
    ?>
      <a href="#" onclick="jQuery('#priority-row').load('/stories/priority/<?php print $nid; ?>/<?php print $p->tid; ?>'); jQuery('#story-status-update').hide(); return false;" ><?php print $p->name; ?> <?php print $p->description; ?>

    <?php endforeach; ?>


text:
class MecanismoOrigenCatalogo < ActiveRecord::Base
end


text:
git clone https://github.com/yahoo/kafka-manager

# ---
# Build
cd kafka-manager
sbt debian:packageBin

exit

# ---
# Install
cd ../
DIST=$(basename ${SRC}/core/build/distributions/kafka_*-${VER}.tgz .tgz)
tar zxf ${SRC}/core/build/distributions/${DIST}.tgz -C /usr/local/
rm -f /usr/local/kafka
ln -s /usr/local/$DIST /usr/local/kafka


text:
/* $Id$ */

package ibis.ipl.impl.multi;

import ibis.ipl.IbisIdentifier;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataOutput;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;

/**
 * This implementation of the {@link ibis.ipl.IbisIdentifier} interface
 * identifies an Ibis instance on the network.
 */
public final class MultiIbisIdentifier implements IbisIdentifier {
    /**
     * Generated
     */
    private static final long serialVersionUID = 5259510418367257559L;

    /**
     * The location for this Ibis instance. */
    public final Location location;

    /** The name of the pool to which this Ibis instance belongs. */
    public final String pool;

    /** Extra data for registry. */
    private byte[] registryData;

    /** Identification of Ibis instances, provided by the registry. */
    private final String id;

    /** An Ibis identifier coded as a byte array. Computed once. */
    private transient byte[] codedForm;

    private final HashMap<String, IbisIdentifier>idMap;

    /** The application tag for this multi ibis instance */
    private byte[] tag;

    /**
     * Constructs an IbisIdentifier with the specified parameters.
     * @param id join id, allocated by the registry.
     * @param idMap implementation-dependent data.
     * @param registryData registry-dependent data.
     * @param location location of this Ibis instance.
     * @param pool identifies the run with the registry.
     */
    public MultiIbisIdentifier(String id, HashMap<String, ibis.ipl.IbisIdentifier> idMap,
            byte[] registryData, Location location, String pool, byte[] applicationTag) {
        this.id = id;
        this.idMap = idMap;
        this.registryData = registryData;
        this.location = location;
        this.pool = pool;
        this.tag = applicationTag;
        this.codedForm = computeCodedForm();
    }

    /**
     * Constructs an IbisIdentifier from the specified coded form.
     * @param codedForm the coded form.
     * @exception IOException is thrown in case of trouble.
     */
    public MultiIbisIdentifier(byte[] codedForm) throws IOException {
        this(codedForm, 0, codedForm.length);
    }

    /**
     * Constructs an IbisIdentifier from the specified coded form,
     * at a particular offset and size.
     * @param codedForm the coded form.
     * @param offset offset in the coded form.
     * @param size size of the coded form.
     * @exception IOException is thrown in case of trouble.
     */
    public MultiIbisIdentifier(byte[] codedForm, int offset, int size)
            throws IOException {
        this(new ObjectInputStream(
                new ByteArrayInputStream(codedForm, offset, size)));
    }

    /**
     * Reads an IbisIdentifier from the specified input stream.
     * @param dis the input stream.
     * @exception IOException is thrown in case of trouble.
     */
    public MultiIbisIdentifier(ObjectInputStream dis) throws IOException {
        location = new Location(dis);
        pool = dis.readUTF();
        idMap = new HashMap<String, ibis.ipl.IbisIdentifier>();
        int subCount = dis.readInt();
        for (int i = 0; i < subCount; i++) {
            try {
                String impl = dis.readUTF();
                ibis.ipl.IbisIdentifier ibisId = (ibis.ipl.IbisIdentifier)dis.readObject();
                idMap.put(impl, ibisId);
            } catch (ClassNotFoundException e) {
                // TODO should we be ignoring this?
                // It means we won't be able to connect on this Ibis but we lack
                // it anyway so I am not sure it matters.
            }
        }
        int registrySize = dis.readInt();
        if (registrySize < 0) {
            registryData = null;
        } else {
            registryData = new byte[registrySize];
            dis.readFully(registryData);
        }
        int tagSize = dis.readInt();
        if (tagSize < 0) {
            tag = null;
        } else {
            tag = new byte[tagSize];
            dis.readFully(tag);
        }
        id = dis.readUTF();
        codedForm = computeCodedForm();
    }

    /**
     * Returns the coded form of this IbisIdentifier.
     * @return the coded form.
     */
    public byte[] toBytes() {
        if (codedForm == null) {
            codedForm = computeCodedForm();
        }
        return codedForm.clone();
    }

    private synchronized byte[] computeCodedForm() {
        try {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            ObjectOutputStream dos = new ObjectOutputStream(bos);
            location.writeTo(dos);
            dos.writeUTF(pool);
            dos.write(idMap.size());
            for (String impl:idMap.keySet()) {
                dos.writeUTF(impl);
                dos.writeObject(idMap.get(impl));
            }
            if (registryData == null) {
                dos.writeInt(-1);
            } else {
                dos.writeInt(registryData.length);
                dos.write(registryData);
            }
            if (tag == null) {
                dos.writeInt(-1);
            } else {
                dos.writeInt(tag.length);
                dos.write(tag);
            }
            dos.writeUTF(id);
            dos.close();
            return bos.toByteArray();
        } catch(Exception e) {
            // Should not happen.
            return null;
        }
    }

    /**
     * Adds coded form of this IbisIdentifier to the specified
     * output stream.
     * @param dos the output stream.
     * @exception IOException is thrown in case of trouble.
     */
    public void writeTo(DataOutput dos) throws IOException {
        if (codedForm == null) {
            codedForm = computeCodedForm();
        }
        dos.write(codedForm);
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (o == null) {
            return false;
        }

        if (! o.getClass().equals(getClass())) {
            return false;
        }

        MultiIbisIdentifier other = (MultiIbisIdentifier) o;
        return other.id.equals(id) && other.pool.equals(pool);
    }

    public int hashCode() {
        return id.hashCode();
    }

    public String toString() {
        return "(Ibis " + id + ", location " + location + ")";
    }

    public String name() {
        return "(Ibis " + id + ")";
    }

    public ibis.ipl.Location location() {
        return location;
    }

    public String poolName() {
        return pool;
    }

    /**
     * Obtains the registry dependent data.
     * @return the data.
     */
    public synchronized byte[] getRegistryData() {
        return registryData;
    }

    /**
     * Compare to the specified Ibis identifier.
     * @param c the Ibis identifier to compare to.
     */
    public int compareTo(ibis.ipl.IbisIdentifier c) {
        if (c instanceof MultiIbisIdentifier) {
            // If not, the specified Ibis identifier is from a completely
            // different implementation.
            MultiIbisIdentifier other = (MultiIbisIdentifier) c;
            // First compare pools.
            int cmp = pool.compareTo(other.pool);
            if (cmp == 0) {
                cmp = location.compareTo(other.location);
                if (cmp == 0) {
                    // Finally compare id.
                    return id.compareTo(other.id);
                }
            }
            return cmp;
        }
        return this.getClass().getName().compareTo(c.getClass().getName());
    }

    public String getID() {
        return id;
    }

    public String tagAsString() {
        if (tag == null) {
            return null;
        }
        try {
            return new String(tag, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException("could not convert tag to string", e);
        }
    }

    public byte[] tag() {
        return tag;
    }

    public IbisIdentifier subIdForIbis(String ibisName) {
        return idMap.get(ibisName);
    }
}


text:
from unittest import mock

from rest_framework import test

from waldur_jira import models
from waldur_jira.backend import JiraBackend
from waldur_jira.tests import factories, fixtures

class PriorityPullTest(test.APITransactionTestCase):
    def setUp(self):
        self.fixture = fixtures.JiraFixture()

        self.highest_priority = mock.MagicMock(
            id='10',
            description='This problem will block progress.',
            iconUrl='http://example.com/highest.svg',
        )
        self.highest_priority.name = 'Highest'

        self.lowest_priority = mock.Mock(
            id='100',
            description='Trivial problem with little or no impact on progress.',
            iconUrl='http://example.com/lowest.svg',
        )
        self.lowest_priority.name = 'Lowest'
        self.priorities = [self.highest_priority, self.lowest_priority]

        self.backend = JiraBackend(self.fixture.service_settings)
        self.backend.manager = mock.Mock()
        self.backend.manager.priorities.return_value = self.priorities

    def test_create_new_priorities(self):
        self.backend.pull_priorities()
        self.assert_priorities_are_pulled()

    def test_update_existing_priority(self):
        factories.PriorityFactory(
            settings=self.fixture.service_settings,
            backend_id=self.highest_priority.id,
            name='Old name',
        )
        self.backend.pull_priorities()
        self.assert_priorities_are_pulled()

    def test_delete_stale_priorities(self):
        self.backend.manager.priorities.return_value = []
        self.backend.pull_priorities()
        self.assertEqual(models.Priority.objects.count(), 0)

    def assert_priorities_are_pulled(self):
        for priority in self.priorities:
            self.assertTrue(
                models.Priority.objects.filter(
                    settings=self.fixture.service_settings,
                    backend_id=priority.id,
                    name=priority.name,
                    description=priority.description,
                    icon_url=priority.iconUrl,
                ).exists()
            )


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

<title>Client (VoltDB Client APIs)</title>
<meta name="date" content="2013-12-09">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Index

Help

PREV CLASS

NEXT CLASS

FRAMES

NO FRAMES

All Classes

SUMMARY:

NESTED |

FIELD |

CONSTR |

METHOD

DETAIL:

FIELD |

CONSTR |

METHOD

org.voltdb.client

Interface Client

public interface Client

  A Client that connects to one or more nodes in a volt cluster
  and provides methods for invoking stored procedures and receiving
  responses. Client applications that are resource constrained (memory, CPU) or high performance
  (process hundreds of thousands of transactions per second) will want to pay attention to the hints that
  can be provided via
  ClientFactory#createClient(int, int[], boolean, StatsUploaderSettings) and
  callProcedure(ProcedureCallback, int, String, Object...).
  Most Client applications will not need to generate enough load for these optimizations to matter.

  A stored procedure invocation contains approximately 24 bytes of data per
  invocation plus the serialized sized of the procedure name and any parameters. The size of any specific procedure
  and parameter set can be calculated using
  calculateInvocationSerializedSize. This method
  serializes the invocation and returns the serialized size and is computationally intensive and not suitable
  for use on a per invocation basis.

  The expected serialized message size parameter provided to
  createClient
  determines the default size of the initial memory allocation used when serializing stored procedure invocations.
  If the initial allocation is insufficient then the allocation is doubled necessitating an extra allocation and copy
  If the allocation is excessively small it may be doubled and copied several times when serializing large
  parameter sets.

  callProcedure(ProcedureCallback, int, String, Object...) allows the initial allocation to be hinted on a
  per procedure invocation basis. This is useful when an application invokes procedures where the size can vary
  significantly between invocations or procedures.

  The Client performs aggressive memory pooling of DirectByteBuffers. The pool
  contains arenas with buffers that are sized to powers of 2 from 2^4 to 2^18. Java does not reliably
  garbage collect DirectByteBuffers so the pool never returns a buffer to the
  heap. The maxArenaSizes array passed to
  ClientFactory#createClient(int, int[], boolean, StatsUploaderSettings) can be used
  to specify the maximum size each arena will be allowed to grow to. The client will continue to function even
  if the an arena is no longer able to grow. It will fall back to using slower
  HeapByteBuffers for serializing invocations.

Field Summary

Fields

Modifier and Type
Field and Description

static int
VOLTDB_SERVER_PORT

Method Summary

Methods

Modifier and Type
Method and Description

void
backpressureBarrier()

Blocks the current thread until there is no more backpressure or there are no more connections
 to the database

boolean
blocking()

Whether callProcedure will return immediately if a an async procedure invocation could not be queued
 due to backpressure

int
calculateInvocationSerializedSize(String procName,
                                 Object... parameters)

Deprecated.

boolean
callProcedure(ProcedureCallback callback,
             int expectedSerializedSize,
             String procName,
             Object... parameters)

Deprecated.

boolean
callProcedure(ProcedureCallback callback,
             String procName,
             Object... parameters)

Asynchronously invoke a replicated procedure.

ClientResponse
callProcedure(String procName,
             Object... parameters)

Synchronously invoke a procedure.

void
close()

Shutdown the Client closing all network connections and release all memory resources.

void
configureBlocking(boolean blocking)

The default behavior for queuing of asynchronous procedure invocations is to block until
 it is possible to queue the invocation.

void
createConnection(String host)

Create a connection to another VoltDB node.

void
createConnection(String host,
                int port)

Create a connection to another VoltDB node.

ClientStatsContext
createStatsContext()

Get a ClientStatsContext instance to fetch and process performance
 statistics.

void
drain()

Block the current thread until all queued stored procedure invocations have received responses
 or there are no more connections to the cluster.

String
getBuildString()

Retrieve the build string that was provided by the server on logon

List<InetSocketAddress>
getConnectedHostList()

Get the list of VoltDB server hosts that this client has open TCP connections
 to.

Object[]
getInstanceId()

Get an identifier for the cluster that this client is currently connected to.

int[]
getThroughputAndOutstandingTxnLimits()

Get the instantaneous values of the rate limiting values for this client.

ClientResponse
updateApplicationCatalog(File catalogPath,
                        File deploymentPath)

Synchronously invokes UpdateApplicationCatalog procedure.

boolean
updateApplicationCatalog(ProcedureCallback callback,
                        File catalogPath,
                        File deploymentPath)

Asynchronously invokes UpdateApplicationCatalog procedure.

void
writeSummaryCSV(ClientStats stats,
               String path)

Write a single line of comma separated values to the file specified.

Field Detail

VOLTDB_SERVER_PORT

static final int VOLTDB_SERVER_PORT

See Also:

Constant Field Values

Method Detail

backpressureBarrier

void backpressureBarrier()
                         throws InterruptedException

Blocks the current thread until there is no more backpressure or there are no more connections
 to the database

Throws:

InterruptedException

blocking

boolean blocking()

Whether callProcedure will return immediately if a an async procedure invocation could not be queued
 due to backpressure

Returns:

true if callProcedure will block until backpressure ceases and false otherwise

calculateInvocationSerializedSize

@Deprecated
int calculateInvocationSerializedSize(String procName,
                                               Object... parameters)

Deprecated.

Deprecated because hinting at the serialized size no longer has any effect
 Calculate the size of a stored procedure invocation once it is serialized. This is computationally intensive
 as the invocation is serialized as part of the calculation.

Parameters:

procName - class name (not qualified by package) of the procedure to execute.

parameters - vararg list of procedure's parameter values.

Returns:

The size of the invocation once serialized

callProcedure

@Deprecated
boolean callProcedure(ProcedureCallback callback,
                               int expectedSerializedSize,
                               String procName,
                               Object... parameters)
                      throws IOException,
                             NoConnectionsException

Deprecated.

Deprecated because hinting at the serialized size no longer has any effect

 Asynchronously invoke a replicated procedure. If there is backpressure
 this call will block until the invocation is queued. If configureBlocking(false) is invoked
 then it will return immediately. Check the return value to determine if queuing actually took place.

 An opportunity is provided to hint what the size of the invocation
 will be once serialized. This is used to perform more efficient memory allocation and serialization. The size
 of an invocation can be calculated using calculateInvocationSerializedSize(String, Object...).
 Only Clients that are resource constrained or expect to process hundreds of thousands of txns/sec will benefit
 from accurately determining the serialized size of message.

Parameters:

callback - ProcedureCallback that will be invoked with procedure results.

procName - class name (not qualified by package) of the procedure to execute.

parameters - vararg list of procedure's parameter values.

expectedSerializedSize - A hint indicating the size the procedure invocation is expected to be
                               once serialized. Allocations are done in powers of two.

Returns:

true if the procedure was queued and false otherwise

Throws:

IOException

NoConnectionsException

callProcedure

boolean callProcedure(ProcedureCallback callback,
                    String procName,
                    Object... parameters)
                      throws IOException,
                             NoConnectionsException

Asynchronously invoke a replicated procedure. If there is backpressure
 this call will block until the invocation is queued. If configureBlocking(false) is invoked
 then it will return immediately. Check the return value to determine if queuing actually took place.

Parameters:

callback - ProcedureCallback that will be invoked with procedure results.

procName - class name (not qualified by package) of the procedure to execute.

parameters - vararg list of procedure's parameter values.

Returns:

true if the procedure was queued and false otherwise

Throws:

IOException

NoConnectionsException

callProcedure

ClientResponse callProcedure(String procName,
                           Object... parameters)
                             throws IOException,
                                    NoConnectionsException,
                                    ProcCallException

Synchronously invoke a procedure. Blocks until a result is available. A ProcCallException
 is thrown if the response is anything other then success.

Parameters:

procName - class name (not qualified by package) of the procedure to execute.

parameters - vararg list of procedure's parameter values.

Returns:

array of VoltTable results.

Throws:

ProcCallException

NoConnectionsException

IOException

close

void close()
           throws InterruptedException

Shutdown the Client closing all network connections and release all memory resources.
 Failing to call this method before the Client is garbage collected can generate errors because
 finalization is used to detect resource leaks. A client cannot be used once it has
 been closed.

Throws:

InterruptedException

configureBlocking

void configureBlocking(boolean blocking)

The default behavior for queuing of asynchronous procedure invocations is to block until
 it is possible to queue the invocation. If blocking is set to false callProcedure will always return
 immediately if it is not possible to queue the procedure invocation due to backpressure.

Parameters:

blocking -

createConnection

void createConnection(String host)
                      throws UnknownHostException,
                             IOException

Create a connection to another VoltDB node.

Parameters:

host - Hostname or IP address of the host to connect to including
 optional port int hostname:port format.

Throws:

UnknownHostException

IOException

createConnection

void createConnection(String host,
                    int port)
                      throws UnknownHostException,
                             IOException

Create a connection to another VoltDB node. This version can only be used when
 the username and password were specified when the client was constructed.

Parameters:

host - Hostname or IP address of the host to connect to.

port - Port number on remote host to connect to.

Throws:

UnknownHostException

IOException

createStatsContext

ClientStatsContext createStatsContext()

Get a ClientStatsContext instance to fetch and process performance
 statistics. Each instance is linked to this client, but provides a custom
 view of statistics for a desired time period.

Returns:

Statistics context object linked to this client.

drain

void drain()
           throws NoConnectionsException,
                  InterruptedException

Block the current thread until all queued stored procedure invocations have received responses
 or there are no more connections to the cluster.

Throws:

NoConnectionsException - never, this is deprecated behavior, declared only for backward compatibility.

InterruptedException

getBuildString

String getBuildString()

Retrieve the build string that was provided by the server on logon

Returns:

Volt server build string

getConnectedHostList

List<InetSocketAddress> getConnectedHostList()

Get the list of VoltDB server hosts that this client has open TCP connections
 to. Note that this doesn't guarantee that those nodes are actually alive at
 the precise moment this method is called. There is also a race condition
 between calling this method and acting on the results. It is true that the list
 won't grow unless createConnection is called, and the list will never contain
 hosts that weren't explicitly connected to.

Returns:

An array of InetSocketAddresses representing the connected hosts.

getInstanceId

Object[] getInstanceId()

Get an identifier for the cluster that this client is currently connected to.
 Will be null if the client has not been connected

Returns:

An array of a Long and Integer containing the millisecond timestamp when the cluster was
 started and the leader address

getThroughputAndOutstandingTxnLimits

int[] getThroughputAndOutstandingTxnLimits()

Get the instantaneous values of the rate limiting values for this client.

Returns:

A length-2 array of integers representing max throughput/sec and
 max outstanding txns.

updateApplicationCatalog

ClientResponse updateApplicationCatalog(File catalogPath,
                                      File deploymentPath)
                                        throws IOException,
                                               NoConnectionsException,
                                               ProcCallException

Synchronously invokes UpdateApplicationCatalog procedure. Blocks until a
 result is available. A ProcCallException is thrown if the
 response is anything other then success.

Parameters:

catalogPath - Path to the catalog jar file.

deploymentPath - Path to the deployment file

Returns:

array of VoltTable results

Throws:

IOException - If the files cannot be serialized

NoConnectionException

ProcCallException

NoConnectionsException

updateApplicationCatalog

boolean updateApplicationCatalog(ProcedureCallback callback,
                               File catalogPath,
                               File deploymentPath)
                                 throws IOException,
                                        NoConnectionsException

Asynchronously invokes UpdateApplicationCatalog procedure. Does not
 guarantee that the invocation is actually queued. If there is
 backpressure on all connections to the cluster then the invocation will
 not be queued. Check the return value to determine if queuing actually
 took place.

Parameters:

callback - ProcedureCallback that will be invoked with procedure results.

catalogPath - Path to the catalog jar file.

deploymentPath - Path to the deployment file

Returns:

true if the procedure was queued and false otherwise

Throws:

IOException - If the files cannot be serialized

NoConnectionException

NoConnectionsException

writeSummaryCSV

void writeSummaryCSV(ClientStats stats,
                   String path)
                     throws IOException

Write a single line of comma separated values to the file specified.
 Used mainly for collecting results from benchmarks.
 Format:
 1) Timestamp (ms) of creation of this client, or last call to Client#resetGlobalStats().
 2) Duration from first procedure call until this call in ms.
 3) 1-percentile round trip latency estimate in ms.
 4) Max measure round trip latency in ms.
 5) 95-percentile round trip latency estimate in ms.
 6) 99-percentile round trip latency estimate in ms.

Parameters:

path - Path to write to, passed to FileWriter.FileWriter(String).

Throws:

IOException - on any file write error.

Overview

Package

Class

Use

Tree

Index

Help

PREV CLASS

NEXT CLASS

FRAMES

NO FRAMES

All Classes

SUMMARY:

NESTED |

FIELD |

CONSTR |

METHOD

DETAIL:

FIELD |

CONSTR |

METHOD


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.ai.textanalytics.implementation.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** The MultiLanguageAnalysisInput model. */
@Fluent
public final class MultiLanguageAnalysisInput {
    /*
     * The documents property.
     */
    @JsonProperty(value = "documents")
    private List<MultiLanguageInput> documents;

    /**
     * Get the documents property: The documents property.
     *
     * @return the documents value.
     */
    public List<MultiLanguageInput> getDocuments() {
        return this.documents;
    }

    /**
     * Set the documents property: The documents property.
     *
     * @param documents the documents value to set.
     * @return the MultiLanguageAnalysisInput object itself.
     */
    public MultiLanguageAnalysisInput setDocuments(List<MultiLanguageInput> documents) {
        this.documents = documents;
        return this;
    }
}


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/run/v2/condition.proto

package com.google.cloud.run.v2;

public interface ConditionOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.run.v2.Condition)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * type is used to communicate the status of the reconciliation process.
   * See also:
   * https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting
   * Types common to all resources include:
   * * "Ready": True when the Resource is ready.
   *

   *
   * string type = 1;
   *
   * @return The type.
   */
  java.lang.String getType();
  /**
   *
   *
   *

   * type is used to communicate the status of the reconciliation process.
   * See also:
   * https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting
   * Types common to all resources include:
   * * "Ready": True when the Resource is ready.
   *

   *
   * string type = 1;
   *
   * @return The bytes for type.
   */
  com.google.protobuf.ByteString getTypeBytes();

  /**
   *
   *
   *

   * State of the condition.
   *

   *
   * .google.cloud.run.v2.Condition.State state = 2;
   *
   * @return The enum numeric value on the wire for state.
   */
  int getStateValue();
  /**
   *
   *
   *

   * State of the condition.
   *

   *
   * .google.cloud.run.v2.Condition.State state = 2;
   *
   * @return The state.
   */
  com.google.cloud.run.v2.Condition.State getState();

  /**
   *
   *
   *

   * Human readable message indicating details about the current status.
   *

   *
   * string message = 3;
   *
   * @return The message.
   */
  java.lang.String getMessage();
  /**
   *
   *
   *

   * Human readable message indicating details about the current status.
   *

   *
   * string message = 3;
   *
   * @return The bytes for message.
   */
  com.google.protobuf.ByteString getMessageBytes();

  /**
   *
   *
   *

   * Last time the condition transitioned from one status to another.
   *

   *
   * .google.protobuf.Timestamp last_transition_time = 4;
   *
   * @return Whether the lastTransitionTime field is set.
   */
  boolean hasLastTransitionTime();
  /**
   *
   *
   *

   * Last time the condition transitioned from one status to another.
   *

   *
   * .google.protobuf.Timestamp last_transition_time = 4;
   *
   * @return The lastTransitionTime.
   */
  com.google.protobuf.Timestamp getLastTransitionTime();
  /**
   *
   *
   *

   * Last time the condition transitioned from one status to another.
   *

   *
   * .google.protobuf.Timestamp last_transition_time = 4;
   */
  com.google.protobuf.TimestampOrBuilder getLastTransitionTimeOrBuilder();

  /**
   *
   *
   *

   * How to interpret failures of this condition, one of Error, Warning, Info
   *

   *
   * .google.cloud.run.v2.Condition.Severity severity = 5;
   *
   * @return The enum numeric value on the wire for severity.
   */
  int getSeverityValue();
  /**
   *
   *
   *

   * How to interpret failures of this condition, one of Error, Warning, Info
   *

   *
   * .google.cloud.run.v2.Condition.Severity severity = 5;
   *
   * @return The severity.
   */
  com.google.cloud.run.v2.Condition.Severity getSeverity();

  /**
   *
   *
   *

   * A common (service-level) reason for this condition.
   *

   *
   * .google.cloud.run.v2.Condition.CommonReason reason = 6;
   *
   * @return Whether the reason field is set.
   */
  boolean hasReason();
  /**
   *
   *
   *

   * A common (service-level) reason for this condition.
   *

   *
   * .google.cloud.run.v2.Condition.CommonReason reason = 6;
   *
   * @return The enum numeric value on the wire for reason.
   */
  int getReasonValue();
  /**
   *
   *
   *

   * A common (service-level) reason for this condition.
   *

   *
   * .google.cloud.run.v2.Condition.CommonReason reason = 6;
   *
   * @return The reason.
   */
  com.google.cloud.run.v2.Condition.CommonReason getReason();

  /**
   *
   *
   *

   * A reason for the internal condition.
   *

   *
   * .google.cloud.run.v2.Condition.InternalReason internal_reason = 7;
   *
   * @return Whether the internalReason field is set.
   */
  boolean hasInternalReason();
  /**
   *
   *
   *

   * A reason for the internal condition.
   *

   *
   * .google.cloud.run.v2.Condition.InternalReason internal_reason = 7;
   *
   * @return The enum numeric value on the wire for internalReason.
   */
  int getInternalReasonValue();
  /**
   *
   *
   *

   * A reason for the internal condition.
   *

   *
   * .google.cloud.run.v2.Condition.InternalReason internal_reason = 7;
   *
   * @return The internalReason.
   */
  com.google.cloud.run.v2.Condition.InternalReason getInternalReason();

  /**
   *
   *
   *

   * A reason for the domain mapping condition.
   *

   *
   * .google.cloud.run.v2.Condition.DomainMappingReason domain_mapping_reason = 8;
   *
   * @return Whether the domainMappingReason field is set.
   */
  boolean hasDomainMappingReason();
  /**
   *
   *
   *

   * A reason for the domain mapping condition.
   *

   *
   * .google.cloud.run.v2.Condition.DomainMappingReason domain_mapping_reason = 8;
   *
   * @return The enum numeric value on the wire for domainMappingReason.
   */
  int getDomainMappingReasonValue();
  /**
   *
   *
   *

   * A reason for the domain mapping condition.
   *

   *
   * .google.cloud.run.v2.Condition.DomainMappingReason domain_mapping_reason = 8;
   *
   * @return The domainMappingReason.
   */
  com.google.cloud.run.v2.Condition.DomainMappingReason getDomainMappingReason();

  /**
   *
   *
   *

   * A reason for the revision condition.
   *

   *
   * .google.cloud.run.v2.Condition.RevisionReason revision_reason = 9;
   *
   * @return Whether the revisionReason field is set.
   */
  boolean hasRevisionReason();
  /**
   *
   *
   *

   * A reason for the revision condition.
   *

   *
   * .google.cloud.run.v2.Condition.RevisionReason revision_reason = 9;
   *
   * @return The enum numeric value on the wire for revisionReason.
   */
  int getRevisionReasonValue();
  /**
   *
   *
   *

   * A reason for the revision condition.
   *

   *
   * .google.cloud.run.v2.Condition.RevisionReason revision_reason = 9;
   *
   * @return The revisionReason.
   */
  com.google.cloud.run.v2.Condition.RevisionReason getRevisionReason();

  /**
   *
   *
   *

   * A reason for the execution condition.
   *

   *
   * .google.cloud.run.v2.Condition.ExecutionReason execution_reason = 11;
   *
   * @return Whether the executionReason field is set.
   */
  boolean hasExecutionReason();
  /**
   *
   *
   *

   * A reason for the execution condition.
   *

   *
   * .google.cloud.run.v2.Condition.ExecutionReason execution_reason = 11;
   *
   * @return The enum numeric value on the wire for executionReason.
   */
  int getExecutionReasonValue();
  /**
   *
   *
   *

   * A reason for the execution condition.
   *

   *
   * .google.cloud.run.v2.Condition.ExecutionReason execution_reason = 11;
   *
   * @return The executionReason.
   */
  com.google.cloud.run.v2.Condition.ExecutionReason getExecutionReason();

  public com.google.cloud.run.v2.Condition.ReasonsCase getReasonsCase();
}


text:
package com.facebook.buck.shell;

import com.facebook.buck.android.toolchain.AndroidPlatformTarget;
import com.facebook.buck.android.toolchain.AndroidSdkLocation;
import com.facebook.buck.android.toolchain.ndk.AndroidNdk;
import com.facebook.buck.core.description.arg.CommonDescriptionArg;
import com.facebook.buck.core.description.arg.HasTests;
import com.facebook.buck.core.model.BuildTarget;
import com.facebook.buck.core.model.targetgraph.BuildRuleCreationContextWithTargetGraph;
import com.facebook.buck.core.model.targetgraph.DescriptionWithTargetGraph;
import com.facebook.buck.core.model.targetgraph.TargetGraph;
import com.facebook.buck.core.rules.ActionGraphBuilder;
import com.facebook.buck.core.rules.BuildRule;
import com.facebook.buck.core.rules.BuildRuleParams;
import com.facebook.buck.core.rules.BuildRuleResolver;
import com.facebook.buck.core.rules.SourcePathRuleFinder;
import com.facebook.buck.core.rules.common.BuildableSupport;
import com.facebook.buck.core.toolchain.ToolchainProvider;
import com.facebook.buck.io.filesystem.ProjectFilesystem;
import com.facebook.buck.rules.args.Arg;
import com.facebook.buck.rules.coercer.SourceSet;
import com.facebook.buck.rules.macros.AbstractMacroExpander;
import com.facebook.buck.rules.macros.ClasspathAbiMacroExpander;
import com.facebook.buck.rules.macros.ClasspathMacroExpander;
import com.facebook.buck.rules.macros.ExecutableMacroExpander;
import com.facebook.buck.rules.macros.LocationMacroExpander;
import com.facebook.buck.rules.macros.Macro;
import com.facebook.buck.rules.macros.MacroContainer;
import com.facebook.buck.rules.macros.MavenCoordinatesMacroExpander;
import com.facebook.buck.rules.macros.QueryOutputsMacroExpander;
import com.facebook.buck.rules.macros.QueryPathsMacroExpander;
import com.facebook.buck.rules.macros.QueryTargetsAndOutputsMacroExpander;
import com.facebook.buck.rules.macros.QueryTargetsMacroExpander;
import com.facebook.buck.rules.macros.StringWithMacros;
import com.facebook.buck.rules.macros.StringWithMacrosConverter;
import com.facebook.buck.rules.macros.WorkerMacro;
import com.facebook.buck.rules.macros.WorkerMacroArg;
import com.facebook.buck.rules.macros.WorkerMacroExpander;
import com.facebook.buck.sandbox.SandboxExecutionStrategy;
import com.facebook.buck.util.Optionals;
import com.facebook.buck.util.RichStream;
import com.facebook.infer.annotation.SuppressFieldNotInitialized;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSortedSet;
import java.util.Comparator;
import java.util.Optional;
import java.util.function.Function;
import java.util.stream.Stream;
import org.immutables.value.Value;

public abstract class AbstractGenruleDescription<T extends AbstractGenruleDescription.CommonArg>
    implements DescriptionWithTargetGraph<T> {

  protected final ToolchainProvider toolchainProvider;
  protected final SandboxExecutionStrategy sandboxExecutionStrategy;
  protected final boolean enableSandbox;

  protected AbstractGenruleDescription(
      ToolchainProvider toolchainProvider,
      SandboxExecutionStrategy sandboxExecutionStrategy,
      boolean enableSandbox) {
    this.toolchainProvider = toolchainProvider;
    this.sandboxExecutionStrategy = sandboxExecutionStrategy;
    this.enableSandbox = enableSandbox;
  }

  protected abstract BuildRule createBuildRule(
      BuildTarget buildTarget,
      ProjectFilesystem projectFilesystem,
      BuildRuleParams params,
      ActionGraphBuilder graphBuilder,
      T args,
      Optional<Arg> cmd,
      Optional<Arg> bash,
      Optional<Arg> cmdExe);

  protected BuildRule createBuildRule(
      BuildTarget buildTarget,
      ProjectFilesystem projectFilesystem,
      BuildRuleParams params,
      BuildRuleResolver resolver,
      T args,
      Optional<Arg> cmd,
      Optional<Arg> bash,
      Optional<Arg> cmdExe,
      String outputFileName) {
    return new Genrule(
        buildTarget,
        projectFilesystem,
        resolver,
        params,
        sandboxExecutionStrategy,
        args.getSrcs(),
        cmd,
        bash,
        cmdExe,
        args.getType(),
        outputFileName,
        args.getEnableSandbox().orElse(enableSandbox),
        args.getCacheable().orElse(true),
        args.getEnvironmentExpansionSeparator(),
        toolchainProvider.getByNameIfPresent(
            AndroidPlatformTarget.DEFAULT_NAME, AndroidPlatformTarget.class),
        toolchainProvider.getByNameIfPresent(AndroidNdk.DEFAULT_NAME, AndroidNdk.class),
        toolchainProvider.getByNameIfPresent(
            AndroidSdkLocation.DEFAULT_NAME, AndroidSdkLocation.class),
        false);
  }

  /**
   * @return the {@link com.facebook.buck.rules.macros.MacroExpander}s which apply to the macros in
   *     this description.
   */
  protected Optional<ImmutableList<AbstractMacroExpander<? extends Macro, ?>>> getMacroHandler(
      @SuppressWarnings("unused") BuildTarget buildTarget,
      @SuppressWarnings("unused") ProjectFilesystem filesystem,
      @SuppressWarnings("unused") BuildRuleResolver resolver,
      TargetGraph targetGraph,
      @SuppressWarnings("unused") T args) {
    return Optional.of(
        ImmutableList.of(
            new ClasspathMacroExpander(),
            new ClasspathAbiMacroExpander(),
            new ExecutableMacroExpander(),
            new WorkerMacroExpander(),
            new LocationMacroExpander(),
            new MavenCoordinatesMacroExpander(),
            new QueryTargetsMacroExpander(Optional.of(targetGraph)),
            new QueryOutputsMacroExpander(Optional.of(targetGraph)),
            new QueryPathsMacroExpander(Optional.of(targetGraph)),
            new QueryTargetsAndOutputsMacroExpander(Optional.of(targetGraph))));
  }

  @Override
  public BuildRule createBuildRule(
      BuildRuleCreationContextWithTargetGraph context,
      BuildTarget buildTarget,
      BuildRuleParams params,
      T args) {
    ActionGraphBuilder graphBuilder = context.getActionGraphBuilder();
    Optional<ImmutableList<AbstractMacroExpander<? extends Macro, ?>>> maybeExpanders =
        getMacroHandler(
            buildTarget,
            context.getProjectFilesystem(),
            graphBuilder,
            context.getTargetGraph(),
            args);
    if (maybeExpanders.isPresent()) {
      ImmutableList<AbstractMacroExpander<? extends Macro, ?>> expanders = maybeExpanders.get();
      SourcePathRuleFinder ruleFinder = new SourcePathRuleFinder(graphBuilder);
      StringWithMacrosConverter converter =
          StringWithMacrosConverter.of(buildTarget, context.getCellPathResolver(), expanders);
      Function<StringWithMacros, Arg> toArg =
          str -> {
            Arg arg = converter.convert(str, graphBuilder);
            if (RichStream.from(str.getMacros())
                .map(MacroContainer::getMacro)
                .anyMatch(WorkerMacro.class::isInstance)) {
              arg = WorkerMacroArg.fromStringWithMacros(arg, buildTarget, graphBuilder, str);
            }
            return arg;
          };
      Optional<Arg> cmd = args.getCmd().map(toArg);
      Optional<Arg> bash = args.getBash().map(toArg);
      Optional<Arg> cmdExe = args.getCmdExe().map(toArg);
      return createBuildRule(
          buildTarget,
          context.getProjectFilesystem(),
          params.withExtraDeps(
              Stream.concat(
                      ruleFinder.filterBuildRuleInputs(args.getSrcs().getPaths()).stream(),
                      Stream.of(cmd, bash, cmdExe)
                          .flatMap(Optionals::toStream)
                          .flatMap(input -> BuildableSupport.getDeps(input, ruleFinder)))
                  .collect(ImmutableSortedSet.toImmutableSortedSet(Comparator.naturalOrder()))),
          graphBuilder,
          args,
          cmd,
          bash,
          cmdExe);
    }
    return createBuildRule(
        buildTarget,
        context.getProjectFilesystem(),
        params,
        graphBuilder,
        args,
        Optional.empty(),
        Optional.empty(),
        Optional.empty());
  }

  @SuppressFieldNotInitialized
  public interface CommonArg extends CommonDescriptionArg, HasTests {
    Optional<StringWithMacros> getBash();

    Optional<StringWithMacros> getCmd();

    Optional<StringWithMacros> getCmdExe();

    Optional<String> getType();

    @Value.Default
    default SourceSet getSrcs() {
      return SourceSet.EMPTY;
    }

    Optional<Boolean> getEnableSandbox();

    Optional<String> getEnvironmentExpansionSeparator();

    /**
     * This functionality only exists to get around the lack of extensibility in our current build
     * rule / build file apis. It may go away at some point. Also, make sure that you understand
     * what {@link BuildRule.isCacheable} does with respect to caching if you decide to use this
     * attribute
     */
    Optional<Boolean> getCacheable();
  }
}


text:
function sendKeyToAllTabs(keyStr) {
  chrome.windows.getAll({'populate': true}, function(windows) {
    for (var i = 0; i < windows.length; i++) {
      var tabs = windows[i].tabs;
      for (var j = 0; j < tabs.length; j++) {
        chrome.tabs.sendRequest(
            tabs[j].id,
            {'key': keyStr});
      }
    }
  });
}

function loadContentScriptInAllTabs() {
  chrome.windows.getAll({'populate': true}, function(windows) {
    for (var i = 0; i < windows.length; i++) {
      var tabs = windows[i].tabs;
      for (var j = 0; j < tabs.length; j++) {
        chrome.tabs.executeScript(
            tabs[j].id,
            {file: 'keycodes.js', allFrames: true});
        chrome.tabs.executeScript(
            tabs[j].id,
            {file: 'content_script.js', allFrames: true});
      }
    }
  });
}


text:
<?php

class Mage_Usa_Model_Shipping_Carrier_Fedex_Source_Packaging
{
    public function toOptionArray()
    {
        $fedex = Mage::getSingleton('usa/shipping_carrier_fedex');
        $arr = array();
        foreach ($fedex->getCode('packaging') as $k=>$v) {
            $arr[] = array('value'=>$k, 'label'=>$v);
        }
        return $arr;
    }
}


text: mark{background:#ff0;color:#000}/*! EON */mark{content:"@extend %mark;"}


text:
package com.mrmo.mnavbarviewlib.impl;

import android.view.View;

/**
 * Created by moguangjian on 2017/4/28.
 */

public interface OnClickNavItemListener {
    void onClick(View view, int position);
}


text:
![Build Status](https://travis-ci.org/sharpred/grunt-appc-cli.svg?branch=master)
[![bitHound Score](https://www.bithound.io/github/sharpred/grunt-appc-cli/badges/score.svg)](https://www.bithound.io/github/sharpred/grunt-appc-cli)

# grunt-appc-cli

> Grunt plugin for Appcelerator Platform CLI tools

## Getting Started

This plugin requires Grunt.

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-appc-cli --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-appc-cli');
```

## The "appc-cli" task

### Overview

In your project's Gruntfile, add a section named `appc-cli` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
    "appc-cli": {
        options: {
            // Task-specific options go here.
        },
        your_target: {
            // Target-specific file lists and/or options go here.
        }
    }
});
```

### Options

#### options.separator
Type: `String`
Default value: `',  '`

A string value that is used to do something with whatever.

#### options.punctuation
Type: `String`
Default value: `'.'`

A string value that is used to do something else with whatever else.

### Usage Examples

#### Ti Build
In this example, `appc ti build` option is used to run your app in the iOS simulator with liveview enabled.

```js
grunt.initConfig({
  "appc-cli": {
    'options': {},
        'simulator' : {
            "command" : "ti",
            "subcommand" : "build",
            "options" : {
                "log-level" : "info",
                "platform" : "ios",
                "project-dir" : ".",
                "target" : "simulator"
            },
            "args" : ['--no-banner', "--no-progress-bars", "--no-prompt" ,"--liveview"]
        },
    },
});
```

#### Run

In this example, `appc run` option is used to run your app in the iOS simulator for a specific device also with liveview enabled.

```js
grunt.initConfig({
    "appc-cli": {
        'options': {},
        'simulator': {
            "command": "run",
            "args": ["-p", "ios", "-C", "E1406EC4-2BE2-4DFB-BC7C-38473815E862", "--liveview"]
        }
    }
});
```

#### Clean

You could also have for example a `clean` target which would run `appc ti clean`:

```js
grunt.initConfig({
    "appc-cli": {
        "options": {},
        "clean": {
            "command": "ti",
            "subcommand": "clean"
        }
    }
});
```

## Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History

1.0.0 Initial release 30/10/15


text:
package org.lua.commons.customapi.javafunctions;

import org.lua.commons.baseapi.LuaThread;
import org.lua.commons.baseapi.types.LuaFunction;

import java.lang.reflect.Method;
import java.lang.reflect.Type;

public class CustomKotlinFunction {

    protected final Object function;

    protected final CustomJavaFunction customFunction;

    public CustomKotlinFunction(Object function, boolean varArgs, boolean varRes) {
        this.function = function;
        Class clazz = function.getClass();
        this.customFunction = new CustomJavaFunction(findMethod(clazz), varArgs, varRes);
    }

    public LuaFunction function(LuaThread thread) {
        return customFunction.function(thread);
    }

    private Method findMethod(Class clazz) {
        Method result = null;
        for (Method method : clazz.getMethods()) {
            if (method.getName().equals("invoke")) {
                result = method;
                for (Type type : method.getGenericParameterTypes()) {
                    if (!type.equals(Object.class)) {
                        break;
                    }
                }
                if (!method.getGenericReturnType().equals(Object.class))
                    break;
            }
        }
        return result;
    }

}