text:
/**
 * Kubernetes
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: v1.5.1-660c2a2
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 *
 */

(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD. Register as an anonymous module.
    define(['io.kubernetes.js/ApiClient', 'io.kubernetes.js/io.kubernetes.js.models/UnversionedTime', 'io.kubernetes.js/io.kubernetes.js.models/V1EventSource', 'io.kubernetes.js/io.kubernetes.js.models/V1ObjectMeta', 'io.kubernetes.js/io.kubernetes.js.models/V1ObjectReference'], factory);
  } else if (typeof module === 'object' && module.exports) {
    // CommonJS-like environments that support module.exports, like Node.
    module.exports = factory(require('../ApiClient'), require('./UnversionedTime'), require('./V1EventSource'), require('./V1ObjectMeta'), require('./V1ObjectReference'));
  } else {
    // Browser globals (root is window)
    if (!root.KubernetesJsClient) {
      root.KubernetesJsClient = {};
    }
    root.KubernetesJsClient.V1Event = factory(root.KubernetesJsClient.ApiClient, root.KubernetesJsClient.UnversionedTime, root.KubernetesJsClient.V1EventSource, root.KubernetesJsClient.V1ObjectMeta, root.KubernetesJsClient.V1ObjectReference);
  }
}(this, function(ApiClient, UnversionedTime, V1EventSource, V1ObjectMeta, V1ObjectReference) {
  'use strict';

  /**
   * The V1Event model module.
   * @module io.kubernetes.js/io.kubernetes.js.models/V1Event
   * @version 1.0-snapshot
   */

  /**
   * Constructs a new V1Event.
   * Event is a report of an event somewhere in the cluster.
   * @alias module:io.kubernetes.js/io.kubernetes.js.models/V1Event
   * @class
   * @param involvedObject {module:io.kubernetes.js/io.kubernetes.js.models/V1ObjectReference} The object that this event is about.
   * @param metadata {module:io.kubernetes.js/io.kubernetes.js.models/V1ObjectMeta} Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
   */
  var exports = function(involvedObject, metadata) {
    var _this = this;

    _this['involvedObject'] = involvedObject;

    _this['metadata'] = metadata;

  };

  /**
   * Constructs a V1Event from a plain JavaScript object, optionally creating a new instance.
   * Copies all relevant properties from data to obj if supplied or a new instance if not.
   * @param {Object} data The plain JavaScript object bearing properties of interest.
   * @param {module:io.kubernetes.js/io.kubernetes.js.models/V1Event} obj Optional instance to populate.
   * @return {module:io.kubernetes.js/io.kubernetes.js.models/V1Event} The populated V1Event instance.
   */
  exports.constructFromObject = function(data, obj) {
    if (data) {
      obj = obj || new exports();

      if (data.hasOwnProperty('apiVersion')) {
        obj['apiVersion'] = ApiClient.convertToType(data['apiVersion'], 'String');
      }
      if (data.hasOwnProperty('count')) {
        obj['count'] = ApiClient.convertToType(data['count'], 'Number');
      }
      if (data.hasOwnProperty('firstTimestamp')) {
        obj['firstTimestamp'] = UnversionedTime.constructFromObject(data['firstTimestamp']);
      }
      if (data.hasOwnProperty('involvedObject')) {
        obj['involvedObject'] = V1ObjectReference.constructFromObject(data['involvedObject']);
      }
      if (data.hasOwnProperty('kind')) {
        obj['kind'] = ApiClient.convertToType(data['kind'], 'String');
      }
      if (data.hasOwnProperty('lastTimestamp')) {
        obj['lastTimestamp'] = UnversionedTime.constructFromObject(data['lastTimestamp']);
      }
      if (data.hasOwnProperty('message')) {
        obj['message'] = ApiClient.convertToType(data['message'], 'String');
      }
      if (data.hasOwnProperty('metadata')) {
        obj['metadata'] = V1ObjectMeta.constructFromObject(data['metadata']);
      }
      if (data.hasOwnProperty('reason')) {
        obj['reason'] = ApiClient.convertToType(data['reason'], 'String');
      }
      if (data.hasOwnProperty('source')) {
        obj['source'] = V1EventSource.constructFromObject(data['source']);
      }
      if (data.hasOwnProperty('type')) {
        obj['type'] = ApiClient.convertToType(data['type'], 'String');
      }
    }
    return obj;
  }

  /**
   * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#resources
   * @member {String} apiVersion
   */
  exports.prototype['apiVersion'] = undefined;
  /**
   * The number of times this event has occurred.
   * @member {Number} count
   */
  exports.prototype['count'] = undefined;
  /**
   * The time at which the event was first recorded. (Time of server receipt is in TypeMeta.)
   * @member {module:io.kubernetes.js/io.kubernetes.js.models/UnversionedTime} firstTimestamp
   */
  exports.prototype['firstTimestamp'] = undefined;
  /**
   * The object that this event is about.
   * @member {module:io.kubernetes.js/io.kubernetes.js.models/V1ObjectReference} involvedObject
   */
  exports.prototype['involvedObject'] = undefined;
  /**
   * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#types-kinds
   * @member {String} kind
   */
  exports.prototype['kind'] = undefined;
  /**
   * The time at which the most recent occurrence of this event was recorded.
   * @member {module:io.kubernetes.js/io.kubernetes.js.models/UnversionedTime} lastTimestamp
   */
  exports.prototype['lastTimestamp'] = undefined;
  /**
   * A human-readable description of the status of this operation.
   * @member {String} message
   */
  exports.prototype['message'] = undefined;
  /**
   * Standard object's metadata. More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
   * @member {module:io.kubernetes.js/io.kubernetes.js.models/V1ObjectMeta} metadata
   */
  exports.prototype['metadata'] = undefined;
  /**
   * This should be a short, machine understandable string that gives the reason for the transition into the object's current status.
   * @member {String} reason
   */
  exports.prototype['reason'] = undefined;
  /**
   * The component reporting this event. Should be a short machine understandable string.
   * @member {module:io.kubernetes.js/io.kubernetes.js.models/V1EventSource} source
   */
  exports.prototype['source'] = undefined;
  /**
   * Type of this event (Normal, Warning), new types could be added in the future
   * @member {String} type
   */
  exports.prototype['type'] = undefined;

  return exports;
}));


text:
<!doctype html>

	<head>

		<base href="/">
		<meta charset="utf-8">
		<meta http-equiv="x-ua-compatible" content="ie=edge">
		<meta name="robots" content="noindex, nofollow">
		<title>Akrobarth</title>
		<meta name="description" content="Akrobarth">

		<meta name="HandheldFriendly" content="True">
		<meta name="MobileOptimized" content="320">
		<meta name="viewport" content="width=device-width, initial-scale=1.0"/>

		<link href="https://fonts.googleapis.com/css?family=Abril+Fatface" rel="stylesheet">
		<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="/styles/style.css" />

	</head>

	<body class="main-wrapper" ng-app="app">
		<!-- Main view for templates -->
		<div ng-view class="main-view"></div>

	</body>
	<!-- Angular external libraries for application -->
	<script type="text/javascript" src="/bower_components/angular/angular.js"></script>
	<script type="text/javascript" src="/bower_components/angular-route/angular-route.js"></script>
	<script type="text/javascript" src="/bower_components/angular-animate/angular-animate.js"></script>
	<!-- Angular components -->
	<script type="text/javascript" src="/app/app.js"></script>
	<!-- App Controler -->
	<script type="text/javascript" src="/app/controller.js"></script>
	<!-- home Controler -->
	<script type="text/javascript" src="/home/homeController.js"></script>
	<!-- QC Controler -->
	<script type="text/javascript" src="/qc/QcController.js"></script>
	<!-- home data -->
	<script type="text/javascript" src="/js/data.js"></script>
	<!-- google map -->
	<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyARqdRZpXVIGRTiF_lgkWySX4rSchrx9ZU&callback=initMap"></script>

</html>

redpajama_set_name: RedPajamaGithub


text:
In the root folder,

. build/envsetup.sh

lunch sdk-eng

make sdk

Once it's done, the sdk can be found in the /out/host/linux-x86/sdk/ folder. The simplest way to use the new sdk, in case you've added a new API, is by adding the new android.jarto build path.

NOTE

And droid doc errors (Error 45) can be resolved by executing

git revert 5f9922d7c3bce158e4c7a58929d4075e7c91e32e in the <src>/frameworks/base folder 1.

https://groups.google.com/forum/#!topic/android-building/fo–bOxDTPQ : ↩


text:
var request = require('superagent');
var chai = require("chai");
var expect = chai.expect;

describe('FrontOffice Route', function(){

  describe('.get(\'/\')', function(){

    it('Show the home view', function(){

       request.get('http://localhost:8080').end(function(res){
		    expect(res).to.exist;
		    expect(res.status).to.equal(200);
		    // done();
	     });
    })
  });

  describe('.get(\'/login\')', function(){

    it('Show the login view', function(){

       request.get('http://localhost:8080/login').end(function(res){
        expect(res).to.exist;
        expect(res.status).to.equal(200);
        // done();
       });
    })
  });

  describe('.get(\'/signup\')', function(){

    it('Show the signup view', function(){

       request.get('http://localhost:8080/signup').end(function(res){
        expect(res).to.exist;
        expect(res.status).to.equal(200);
        // done();
       });
    })
  });

  describe('.get(\'/partials/search\')', function(){

    it('Show the partial search view', function(){

       request.get('http://localhost:8080/profile#/').end(function(res){
        expect(res).to.exist;
        expect(res.status).to.equal(200);
       });
    })
  });

  describe('.get(\'/partials/mybooks\')', function(){

    it('Show the partial search view', function(){

       request.get('http://localhost:8080/profile#/mybooks').end(function(res){
        expect(res).to.exist;
        expect(res.status).to.equal(200);
       });
    })
  });

});

describe('BackOffice Route', function(){

  describe('.get(\'/partials/rentedBooks\')', function(){

    it('Show the partial rentedBooks view', function(){

       request.get('http://localhost:8080/admin#/').end(function(res){
        expect(res).to.exist;
        expect(res.status).to.equal(200);
       });
    })
  });

  describe('.get(\'/partials/manageSearch\')', function(){

    it('Show the partial manageSearch view', function(){

       request.get('http://localhost:8080/admin#/manageSearch').end(function(res){
        expect(res).to.exist;
        expect(res.status).to.equal(200);
       });
    })
  });

  describe('.get(\'/partials/rentedBooks\')', function(){

    it('Show the partial rentedBooks view', function(){

       request.get('http://localhost:8080/admin#/').end(function(res){
        expect(res).to.exist;
        expect(res.status).to.equal(200);
       });
    })

  });

  describe('.get(\'/partials/manageSearch\')', function(){

    it('Show the partial manageSearch view', function(){

       request.get('http://localhost:8080/admin#/manageSearch').end(function(res){
        expect(res).to.exist;
        expect(res.status).to.equal(200);
       });
    })

  });

  describe('.get(\'/partials/addBook\')', function(){

    it('Show the partial addBook view', function(){

       request.get('http://localhost:8080/admin#/addBook').end(function(res){
        expect(res).to.exist;
        expect(res.status).to.equal(200);
       });
    })

  });

  describe('.get(\'/partials/manageUser\')', function(){

    it('Show the partial manageUser view', function(){

       request.get('http://localhost:8080/admin#/manageUser').end(function(res){
        expect(res).to.exist;
        expect(res.status).to.equal(200);
       });
    })

  });

});


text:
#import <iTunesStoreUI/SUScriptObject.h>

@class SUScriptSection;

@interface SUScriptSectionsController : SUScriptObject
{
}

+ (void)initialize;
+ (id)webScriptNameForSelector:(SEL)arg1;
+ (id)webScriptNameForKeyName:(id)arg1;
- (id)scriptAttributeKeys;
- (id)attributeKeys;
- (void)_setSelectedIdentifier:(id)arg1;
- (id)_fixedSelectedIdentifier;
- (id)_copySectionWithIdentifier:(id)arg1;
- (void)_tabBarConfigurationChangedNotification:(id)arg1;
- (void)setRootViewController:(id)arg1 forSection:(id)arg2;
@property(retain) SUScriptSection *selectedSection;
@property(readonly) id sections;
- (id)_className;
- (id)sectionWithIdentifier:(id)arg1;
- (void)dealloc;
- (id)init;

@end


text:
package com.groupon.mapreduce.mongo.in;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.RawComparator;
import org.apache.hadoop.mapreduce.*;
import org.apache.hadoop.security.Credentials;

import java.io.IOException;
import java.net.URI;

public class TestTaskAttemptContext implements TaskAttemptContext {
    private Configuration config;

    public TestTaskAttemptContext(Configuration c) {
        config = c;
    }

    @Override
    public TaskAttemptID getTaskAttemptID() {
        return null;
    }

    @Override
    public void setStatus(String s) {

    }

    @Override
    public String getStatus() {
        return null;
    }

    @Override
    public Configuration getConfiguration() {
        return config;
    }

    @Override
    public Credentials getCredentials() {
        return null;
    }

    @Override
    public JobID getJobID() {
        return null;
    }

    @Override
    public int getNumReduceTasks() {
        return 0;
    }

    @Override
    public Path getWorkingDirectory() throws IOException {
        return null;
    }

    @Override
    public Class<?> getOutputKeyClass() {
        return null;
    }

    @Override
    public Class<?> getOutputValueClass() {
        return null;
    }

    @Override
    public Class<?> getMapOutputKeyClass() {
        return null;
    }

    @Override
    public Class<?> getMapOutputValueClass() {
        return null;
    }

    @Override
    public String getJobName() {
        return null;
    }

    @Override
    public boolean userClassesTakesPrecedence() {
        return false;
    }

    @Override
    public Class<? extends InputFormat<?, ?>> getInputFormatClass() throws ClassNotFoundException {
        return null;
    }

    @Override
    public Class<? extends Mapper<?, ?, ?, ?>> getMapperClass() throws ClassNotFoundException {
        return null;
    }

    @Override
    public Class<? extends Reducer<?, ?, ?, ?>> getCombinerClass() throws ClassNotFoundException {
        return null;
    }

    @Override
    public Class<? extends Reducer<?, ?, ?, ?>> getReducerClass() throws ClassNotFoundException {
        return null;
    }

    @Override
    public Class<? extends OutputFormat<?, ?>> getOutputFormatClass() throws ClassNotFoundException {
        return null;
    }

    @Override
    public Class<? extends Partitioner<?, ?>> getPartitionerClass() throws ClassNotFoundException {
        return null;
    }

    @Override
    public RawComparator<?> getSortComparator() {
        return null;
    }

    @Override
    public String getJar() {
        return null;
    }

    @Override
    public RawComparator<?> getGroupingComparator() {
        return null;
    }

    @Override
    public boolean getJobSetupCleanupNeeded() {
        return false;
    }

    @Override
    public boolean getProfileEnabled() {
        return false;
    }

    @Override
    public String getProfileParams() {
        return null;
    }

    @Override
    public String getUser() {
        return null;
    }

    @Override
    public boolean getSymlink() {
        return false;
    }

    @Override
    public Path[] getArchiveClassPaths() {
        return new Path[0];
    }

    @Override
    public URI[] getCacheArchives() throws IOException {
        return new URI[0];
    }

    @Override
    public URI[] getCacheFiles() throws IOException {
        return new URI[0];
    }

    @Override
    public Path[] getLocalCacheArchives() throws IOException {
        return new Path[0];
    }

    @Override
    public Path[] getLocalCacheFiles() throws IOException {
        return new Path[0];
    }

    @Override
    public Path[] getFileClassPaths() {
        return new Path[0];
    }

    @Override
    public String[] getArchiveTimestamps() {
        return new String[0];
    }

    @Override
    public String[] getFileTimestamps() {
        return new String[0];
    }

    @Override
    public int getMaxMapAttempts() {
        return 0;
    }

    @Override
    public int getMaxReduceAttempts() {
        return 0;
    }

    @Override
    public void progress() {

    }
}


text:
package me.ekranos.web.froxy.util;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class FileUtil {

    public static String readString(String path) throws IOException {
        return readString(new File(path));
    }

    public static String readString(File file) throws IOException {
        return new String(readBytes(file), StandardCharsets.UTF_8);
    }

    public static byte[] readBytes(String path) throws IOException {
        return readBytes(new File(path));
    }

    public static byte[] readBytes(File file) throws IOException {
        InputStream in = new FileInputStream(file);
        ByteArrayOutputStream out = new ByteArrayOutputStream((int) file.length());
        StreamUtil.tranfer(in, out);
        in.close();
        return out.toByteArray();
    }

}


text:
The guidelines for contributing are available here:
https://docs.scrapy.org/en/master/contributing.html

Please do not abuse the issue tracker for support questions.
If your issue topic can be rephrased to "How to ...?", please use the
support channels to get it answered: https://scrapy.org/community/


text:
#define NDEBUG

typedef unsigned int uint;
#include<string>
using namespace std;

const string SPREAD_NAME = "10600";
const uint N_SERVER = 5;            // total number of mail servers
const string SERVER_CLUSTER_NAME = "DisSys_Servers";
const string CLIENT_USER = "Cli";

const uint MAX_MESSLEN = 1400;      // maximum length of a message
const uint MAX_USERNAME_LEN = 40;   // maximum length of user name
const uint MAX_VSSETS = 10;
const uint PASSCODE = 3456543;      // unique passcode to fight intrusions

const char Delimiter = 29;
const char NewLine = 30;

#endif


text:
package com.reader.common;

public interface ColorConstants {

	public static final String WHITE = "#FFFFFF";

	public static final String RED = "#FF0000";

	public static final String BLUE = "#0000FF";

	public static final String BLACK = "#000000";

	public static final String YELLOW = "#FFFF00";

	public static final String DEFAULT = BLUE;

}


text:
//
//  Centauri.h
//  Centauri
//
//  Created by Steve Madsen on 5/15/13.
//  Copyright (c) 2013 Light Year Software, LLC
//

#import <Foundation/Foundation.h>

/*!
 @typedef CentauriLogSeverity
 @brief Indicates the severity level of a log message.
 @const CentauriLogError An error, usually unrecoverable.
 @const CentauriLogWarning A warning for something that should not happen, but can be recovered from and is not an error.
 @const CentauriLogInfo Useful information, typically at a high level and very verbose.
 @const CentauriLogDebug Information primarily useful while debugging a problem and otherwise not interesting.
 */
typedef NS_ENUM(NSInteger, CentauriLogSeverity)
{
    CentauriLogError,
    CentauriLogWarning,
    CentauriLogInfo,
    CentauriLogDebug
};

#ifdef __cplusplus
extern "C" {
#endif

    /*!
     @brief The version of the libary.
     */
    extern NSString * const CentauriSDKVersion;

    /*!
     @brief Logs a simple message, with optional arguments.

     This function, just like @link //apple_ref/c/func/NSLog @/link, accepts a format string and optional arguments. It formats the message exactly like @link //apple_ref/occ/cl/NSString @/link, then sends it to @link logSeverity:tags:format:arguments: @/link with severity and tag set to nil.

     A simple way to redirect existing @link //apple_ref/c/func/NSLog @/link statements to this logger is to use this preprocessor macro:

     #define NSLog CENLog

     @param format An NSString-style format string.
     */
    void CENLog(NSString *format, ...)
        __attribute__((format(__NSString__, 1, 2)));

    /*!
     @brief Logs a message with tags and optional arguments.

     This function takes an additional argument, tags, over the simpler @link CENLog @/link. When examining logs on the server, you can choose to filter messages by tag. It otherwise acts exactly like @link CENLog @/link.

     How you use tags is entirely your choice. Tags are arbitrary text strings, separated by spaces. They can change from version to version, and show up in some logs and not others. One possible use of tags is for the major components of your app: "network", "ui", "core data", etc. Another is to tag log messages by file. For example, you could redefine @link //apple_ref/c/func/NSLog @/link as:

     #define NSLog(...) CENLogT(\@__FILE__, __VA_ARGS__)

     @param tags A text string that can be used to filter log messages on the server. May be nil, although in that case it's better to use CENLog().
     @param format An NSString-style format string.
     */
    void CENLogT(NSString *tags, NSString *format, ...)
        __attribute__((format(__NSString__, 2, 3)));

    /*!
     @brief Logs a message at a severity level, with tags and optional arguments.

     This function builds on @link CENLogT @/link, adding a severity level. Severities can also be used to filter messages on the server, but instead of filtering by categorization, it filters on the importantance of the log message.

     @param severity The importance level of the log message.
     @param tags A text string that can be used to filter log messages on the server. May be nil.
     @param format An NSString-style format string.
     */
    void CENLogST(CentauriLogSeverity severity, NSString *tags, NSString *format, ...)
        __attribute__((format(__NSString__, 3, 4)));

#ifdef __cplusplus
}
#endif

/*!
 @brief Primary interface to the Centauri service.
 */
@interface Centauri : NSObject

/*!
 @brief A unique value that you use to identify the person using your app.

 If you wish to associate a given session with a user, set this property to their unique ID. For ad hoc builds, this will often be the UDID. Apps that retrieve the UDID will be rejected from the App Store, so you must consider alternatives when submitting.

 The default value for this property is nil.
 */
@property (copy, nonatomic) NSString *userID;

/*!
 @brief Use HTTPS (or not) when communicating with the server.

 When set to YES, all communication with the server use an encrypted connection. When set to NO, regular, unencrypted HTTP is used.

 If you are based in the United States, you should be aware that as of early 2013, using HTTPS and including the library in your App Store build may require you to register your app with the Bureau of Industry and Security; see http://www.bis.doc.gov/index.php/policy-guidance/encryption. It is your responsibility to make this judgement for your app.

 The default value for this property is NO.
 */
@property (assign, nonatomic) BOOL useHTTPS;

/*!
 @brief The time (in seconds) that an app can be suspended in the background before resuming starts a new session.

 The session idle timeout determines how much time (in seconds) may pass between a user suspending your app (by pressing the home button) and resuming it again for both uses to be considered part of a single session. This allows for brief switches away from your app to maintain a single session and one continuous session log on the server.

 The default value for this property is 300 seconds (5 minutes).
 */
@property (assign, nonatomic) NSTimeInterval sessionIdleTimeout;

/*!
 @brief The maximum number of bytes of messages to buffer before transmitting them to the server.

 Log messages are buffered on disk before being sent to the server. When on a cellular network, this reduces the number of times that the cellular radio is powered up to transfer data, which conserves battery power.

 Set this to a large value to further reduce the number of times Centauri hits the network. Set it to a small(er) value to more quickly deliver log messages to the server, at the potential expense of battery power.

 The default value for this property is 65536 bytes (64 KB).
 */
@property (assign, nonatomic) NSUInteger autoFlushThreshold;

/*!
 @brief Controls whether log messages are sent to @link //apple_ref/c/func/NSLog @/link.

 When set to YES, log messages are also sent to the Apple System Log and stderr. This is equivalent to calling @link //apple_ref/c/func/NSLog @/link.

 The default value for this property is YES. For shipping apps, you probably want to set this to NO.
 */
@property (assign, nonatomic) BOOL teeToSystemLog;

/*!
 @brief A arbitrary dictionary to associate with every new session.

 Whenever a new session is started, various information about the environment that does not change for the lifetime of the session is collected and sent to the server. This includes the hardware model, OS version, your app version, and the current locale.

 If there is other information you'd like to have available when browsing the logs later, assign a dictionary of that information to this property before calling @link beginSession: @/link.

 Keys with an underscore prefix are reserved and may be overwritten.
 */
@property (copy, nonatomic) NSDictionary *sessionInfo;

/*!
 @brief Provides a hook to supply state information every time a message is logged.

 Every time you log a message, various information about the running state is collected. This information includes a timestamp, the thread ID and dispatch/NSOperation queue name. If there is additional information you wish to capture, you can assign a block to this property that will be invoked every time you log a message. It is passed a mutable dictionary to which you can add your own data.

 The default value for this property is nil.

 @performance A block assigned to this property is called every time you log a message. The block is called on the same thread that you logged the message. The block should be thread-safe and do as little work as possible. Do not log additional messages from this block: your app will infinitely recurse and eventually crash when stack is exhausted.
 */
@property (copy, nonatomic) void (^userInfoBlock)(NSMutableDictionary *);

/*!
 @brief Returns the global shared instance.
 */
+ (instancetype) sharedInstance;

/*!
 @brief Marks the beginning of a new user session.

 Call this method when your app first launches to mark the beginning of a new session.

 @param appToken Your app's unique token
 */
- (void) beginSession:(NSString *)appToken;

/*!
 @brief Marks the end of a user session.

 Call this method when you want to explicitly end a user session. On iOS, this is generally not required. When the user presses the home button to switch away from your app, Centauri automatically suspends the session. If the user returns within the configured idle timeout, the previous session is resumed. Otherwise, a new session is automatically started.

 If your app opts out of background execution, you should call this method from your application delegate's @link //apple_doc/occ/intfm/UIApplicationDelegate/applicationWillTerminate: @/link.
 */
- (void) endSession;

/*!
 @brief Initiates transmission of data to the server.

 Centauri buffers session and log data to disk until the @link autoFlushThreshold @/link is reached. If your app has just used the network and you know that now is a good time to perform additional network operations, you can call this method to transmit data to the server before the auto-flush threshold is reached.
 */
- (void) flush;

/*!
 @brief Begins buffering log messages.

 Centauri separates session data from log data. While testing your app, there is rarely a reason to differentiate, but the story changes once you ship your app.

 A shipping app can easily have thousands of active users. While log data from production can be extraordinarily helpful to track down a bug, that many users will generate too much data to be useful. Instead, your production app should only turn logging on for users that need it.

 If your app has a server component and users are identifiable (perhaps through an account), add a flag to the server that allows you to turn logging on for individual users. Call this method after fetching the user's account information when the flag is turned on.

 Another option is to create a custom URL scheme. This URL launches your app, sets a flag to enable logging, probably for a limited duration, then continues normally.
 */
- (void) beginLogging;

/*!
 @brief Ends buffering log messages.

 Call this method to explicitly stop buffering log messages.
 */
- (void) endLogging;

/*!
 @brief Buffers a log message with optional arguments.

 This method is the pure Objective-C interface to log a message. It provides the same functionality as @link CENLogST @/link.

 @param severity The importance level of the log message, boxed in an @link //apple_ref/occ/cl/NSNumber @/link. May be nil.
 @param tags A text string that can be used to filter log messages on the server. May be nil.
 @param message An NSString-style format string.
 */
- (void) logSeverity:(NSNumber *)severity tags:(NSString *)tags message:(NSString *)message, ...
    __attribute__((format(__NSString__, 3, 4)));

/*!
 @brief Buffers a log message (va_list interface).

 This method provides a va_list interface to logging, similar to @link //apple_ref/c/func/NSLogv @/link. It is useful if you have your own logging wrapper that needs a va_list API. Otherwise, the C functions @link CENLog @/link, @link CENLogT @/link or @link CENLogST @/link, or the Objective-C method @link logSeverity:tags:message: @/link, are better choices.

 @param severity The importance level of the log message, boxed in an @link //apple_ref/occ/cl/NSNumber @/link. May be nil.
 @param tags A text string that can be used to filter log messages on the server. May be nil.
 @param format An NSString-style format string.
 @param arguments The variable argument list prepared by va_start.
 */
- (void) logSeverity:(NSNumber *)severity tags:(NSString *)tags format:(NSString *)format arguments:(va_list)arguments;

@end


text:
import Mixin from '@ember/object/mixin';
import $ from 'jquery';
import DS from 'ember-data';
import { attr, belongsTo } from 'ember-flexberry-data/utils/attributes';

export let Model = Mixin.create({
  definition: DS.attr('string'),
  /**
    Non-stored property.

    @property properties
  */
  properties: DS.attr('string'),
  /**
    Method to set non-stored property.
    Please, use code below in model class (outside of this mixin) otherwise it will be replaced during regeneration of models.
    Please, implement 'propertiesCompute' method in model class (outside of this mixin) if you want to compute value of 'properties' property.

    @method _propertiesCompute
    @private
    @example
      ```javascript
      _propertiesChanged: Ember.on('init', Ember.observer('properties', function() {
        Ember.run.once(this, '_propertiesCompute');
      }))
      ```
  */
  _propertiesCompute: function() {
    let result = (this.propertiesCompute && typeof this.propertiesCompute === 'function') ? this.propertiesCompute() : null;
    this.set('properties', result);
  },
  class: DS.belongsTo('fd-dev-class', { inverse: 'views', async: false }),
  getValidations: function () {
    let parentValidations = this._super();
    let thisValidations = {
      class: { presence: true }
    };
    return $.extend(true, {}, parentValidations, thisValidations);
  },
  init: function () {
    this.set('validations', this.getValidations());
    this._super(...arguments);
  }
});
export let defineBaseModel = function (modelClass) {
  modelClass.reopenClass({
    _parentModelName: 'fd-repository-data-object'
  });
};

export let defineProjections = function (modelClass) {
  modelClass.defineProjection('AttributesView', 'fd-dev-view', {
    name: attr(''),
    properties: attr(''),
    definition: attr(''),
    class: belongsTo('fd-dev-class', '', {

    })
  });
  modelClass.defineProjection('BusinessServer', 'fd-dev-view', {
    name: attr(''),
    description: attr(''),
    class: belongsTo('fd-dev-class', '', {
      stage: belongsTo('fd-stage', '', {

      })
    })
  });
  modelClass.defineProjection('EditDataObjectClass', 'fd-dev-view', {
    name: attr(''),
    description: attr(''),
    properties: attr('')
  });
  modelClass.defineProjection('EditFormView', 'fd-dev-view', {
    name: attr('Name'),
    description: attr('Description')
  });
  modelClass.defineProjection('EditPropertyLookups', 'fd-dev-view', {
    name: attr(''),
    definition: attr(''),
    class: belongsTo('fd-dev-class', '', {
      name: attr('')
    }, { hidden: true })
  });
  modelClass.defineProjection('FdAttributesView', 'fd-dev-view', {
    name: attr(''),
    definition: attr(''),
    class: belongsTo('fd-dev-class', '', {

    })
  });
  modelClass.defineProjection('FdEditClassForm', 'fd-dev-view', {
    name: attr('Имя'),
    description: attr('Описание'),
    class: belongsTo('fd-dev-class', '', {

    }, { hidden: true })
  });
  modelClass.defineProjection('FdPreloadMetadata', 'fd-dev-view', {
    definition: attr(''),
    name: attr(''),
    description: attr(''),
    nameStr: attr(''),
    class: belongsTo('fd-dev-class', '', {
      name: attr('')
    })
  });
  modelClass.defineProjection('Generator', 'fd-dev-view', {
    name: attr(''),
    description: attr(''),
    definition: attr(''),
    class: belongsTo('fd-dev-class', '', {

    })
  });
  modelClass.defineProjection('ListFormView', 'fd-dev-view', {
    class: belongsTo('fd-dev-class', '', {
      name: attr('Class')
    }, { hidden: true }),
    name: attr('View name')
  });
  modelClass.defineProjection('Prototyping', 'fd-dev-view', {
    name: attr(''),
    definition: attr('')
  });
  modelClass.defineProjection('SearchView', 'fd-dev-view', {
    name: attr(''),
    class: belongsTo('fd-dev-class', '', {

    })
  });
  modelClass.defineProjection('ViewManager', 'fd-dev-view', {
    class: belongsTo('fd-dev-class', 'Класс', {
      name: attr('Класс'),
      stage: belongsTo('fd-stage', '', {

      }, { hidden: true })
    }),
    name: attr('Название представления'),
    properties: attr('Свойства в представлении'),
    definition: attr('', { hidden: true })
  });
  modelClass.defineProjection('ViewPeeker', 'fd-dev-view', {
    name: attr('')
  });
};


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

<TITLE>
IFOAuthCredential
</TITLE>

<META NAME="date" CONTENT="2015-03-02">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

com.getifinity.sdk.auth

Class IFOAuthCredential

java.lang.Object
  com.getifinity.sdk.auth.IFOAuthCredential

public class IFOAuthCredential
extends java.lang.Object

The Class IFOAuthCredential.

Field Summary

static IFOAuthCredential
sharedInstance

Constructor Summary

IFOAuthCredential()

Method Summary

 void
clearTokens(Context context)

 boolean
expired()

 java.lang.String
getAccessToken()

 java.util.Date
getExpirationDate()

static IFOAuthCredential
getInstance()

 java.lang.String
getRefreshToken()

 boolean
hasTokens(Context context)

 void
saveTokens(Context context)

 void
setAccessToken(java.lang.String token)

 void
setExpirationDate(int seconds)

 void
setRefreshToken(java.lang.String token)

 void
setTokenType(java.lang.String type)

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

sharedInstance

public static IFOAuthCredential sharedInstance

Constructor Detail

IFOAuthCredential

public IFOAuthCredential()

Method Detail

getInstance

public static IFOAuthCredential getInstance()

setExpirationDate

public void setExpirationDate(int seconds)

saveTokens

public void saveTokens(Context context)

clearTokens

public void clearTokens(Context context)

hasTokens

public boolean hasTokens(Context context)

setAccessToken

public void setAccessToken(java.lang.String token)

setRefreshToken

public void setRefreshToken(java.lang.String token)

getRefreshToken

public java.lang.String getRefreshToken()

setTokenType

public void setTokenType(java.lang.String type)

getExpirationDate

public java.util.Date getExpirationDate()

getAccessToken

public java.lang.String getAccessToken()

expired

public boolean expired()

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
// Copyright 2011 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
 * @fileoverview Entity database.
 */
/**
 * Temporary storage for information about entities and their relationships.
 * @param {Object} json Json data from server.
 * @constructor
 */
o3v.EntityMetadata = function (json) {
  /**
   * Logger.
   * @type {Object.<string, Function>}
   * @private
   */
  this.log_ = o3v.log;

  /**
   * Map of entity id to entity metadata.
   * @type {Object.<number, Object>}
   * @private
   */
  this.entities_ = {};

  /**
   * Map of external id to id.
   * @type {Object.<string, number>}
   * @private
   */
  this.externalIdToId_ = {};

  /**
   * Set of layer ids.
   * @type {Object.<number, boolean>}
   * @private
   */
  this.layers_ = {};

  /**
   * Map of layer name to entity id.
   * @type {Object.<string, number>}
   * @private
   */
  this.layerNameToId_ = {};

  /**
   * Sublayers: indexed by layer entity id, array of arrays of entity ids.
   * @type {Object.<number, Array.<Array.<number>>>}
   * @private
   */
  this.sublayers_ = {};

  /**
   * Symmetry information - pair id to symmetry info.
   * @type {Object.<number, Object>}
   * @private
   */
  this.symmetries_ = {};

  /**
   * Set of entity ids that are hidden from search and selection.
   * @type {Object.<number, boolean>}
   * @private
   */
  this.hidden_ = {};

  this.loadEntities_(json);
  this.loadDag_(json);
  this.loadLayers_(json);

  this.log_.info('loaded entity metadata: ', json);
};

/**
 * Generates a readable name from an external id.
 * This badly needs to be moved to the pipeline.
 * @param {string} stringId Id (e.g. 'r_lower_subclavian_artery').
 * @return {string} Name (e.g. 'lower subclavian artery').
 * @private
 */
o3v.makeName = function (stringId) {
  return stringId.replace(/_/g, ' ').replace(/^r /, '').replace(/^l /, '');
};

/**
 * Loads entity data from json.
 * @param {Object} json Json data from server.
 * @private
 */
o3v.EntityMetadata.prototype.loadEntities_ = function (json) {
  // Load leafs.
  json['leafs'].forEach(
      function (entityInfo) {
        this.loadEntity_(entityInfo, true);
      }, this);

  // Load non-leafs.
  json['nodes'].forEach(
      function (entityInfo) {
        this.loadEntity_(entityInfo, false);
      }, this);

  // Load hidden.
  json['hidden'].forEach(
      function (entityId) {
        this.hidden_[entityId] = true;
      }, this);

  // Load symmetries.
  json['symmetries'].forEach(this.computeSymmetryObject_, this);

  // Load names.
  /**
   * Set of entities with overridden names.
   * @type {Object.<number, boolean>}
   * @private
   */
  this.entitiesWithOverriddenNames_ = {};
  json['names'].forEach(this.computeName_, this);
};

/**
 * Loads one entity.
 * @param {Array.<number|string>} entityInfo Data about entity from json.
 * @param {boolean} isLeaf True if this is a leaf entity.
 * @private
 */
o3v.EntityMetadata.prototype.loadEntity_ = function (entityInfo, isLeaf) {
  var entityId = +entityInfo[0];
  var externalId = '' + entityInfo[1];
  // TODO(dkogan): This logic needs to move into the data pipeline.
  var entityNames = [o3v.makeName(externalId)];
  var entity = {};
  entity.externalId = externalId;
  entity.names = entityNames;
  entity.parentIds = {};

  this.entities_[entityId] = entity;
  if (isLeaf) { // We don't want the externalid -> id map for nonleafs
    this.externalIdToId_[externalId] = entityId;
  }
};

/**
 * Loads the dag of parent/child relationships between entities.
 * @param {Object} json Json data from server.
 * @private
 */
o3v.EntityMetadata.prototype.loadDag_ = function (json) {
  json['dag'].forEach(
      function (groupInfo) {
        var parentId = groupInfo[0];
        var childIds = groupInfo[1];
        // All children are under one parent id.
        this.entities_[parentId].childIds = o3v.util.createSet(childIds);
        childIds.forEach(
            function (childId) {
              this.entities_[childId].parentIds[parentId] = true;
            }, this);
      }, this);
};

/**
 * Loads layer and sublayer data.
 * @param {Object} json Json data from server.
 * @private
 */
o3v.EntityMetadata.prototype.loadLayers_ = function (json) {
  // Load layers.
  json['layers'].forEach(
      function (layerId) {
        this.layers_[layerId] = true;
        this.layerNameToId_[this.getEntity(layerId).name] = layerId;
      }, this);

  var entitiesAccountedFor = {};

  // Load sublayers.
  // this.subLayers = Object.<number, Array.<Array.<number>>>
  //   layerId -> [ [entityId, entityId], [entityId, entityId] ...]
  //   The sublayers are sorted from innermost to outermost.
  json['sublayers'].forEach(
      function (layer) {
        var layerId = layer[0];
        var sublayers = layer[1];
        var sublayerArray = [];
        sublayers.forEach(
            function (sublayer) {
              var depth = sublayer[0];
              var entityIds = sublayer[1];
              sublayerArray[depth] = [];
              entityIds.forEach(
                  function (entityId) {
                      sublayerArray[depth].push(entityId);
                      entitiesAccountedFor[entityId] = true;
                    }, this);
                  }, this);
        this.sublayers_[layerId] = sublayerArray;
      }, this);

  // If, for some reason, there are sublayers with gaps, fill in those
  // gaps with empty sets.
  o3v.util.forEach(this.sublayers_, function (sublayerArray) {
      for (var i = 0; i < sublayerArray.length; i++) {
        if (sublayerArray[i] === undefined) {
          sublayerArray[i] = [];
        }
      }
    }, this);

  // Complete sublayers by calculating any leftover entities
  // and putting them in the default (top) layer.
  o3v.util.forEach(this.layers_, function (unused_true, layerId) {
      if (this.sublayers_[layerId] === undefined) {
        this.sublayers_[layerId] = [];
      }
      var sublayerArray = this.sublayers_[layerId];
      sublayerArray[sublayerArray.length] = [];
    }, this);
  o3v.util.forEach(
      this.entities_,
      function(entity, entityId) {
        // If this a new leaf entity, it needs to be assigned to a layer.
        if (entitiesAccountedFor[entityId] === undefined &&
            entity.childIds === undefined) {
          var layerId = this.getLayerId(entityId);
          if (!layerId) {
            this.log_.warning('Failed to find layer for leaf entity ',
                              entityId, ' ', entity.names[0]);
          } else {
            var sublayerArray = this.sublayers_[layerId];
            sublayerArray[sublayerArray.length - 1].push(
                parseInt(entityId));
          }
        }
      }, this);
};

/**
 * Gets the layer id of an entity.
 * @param {number} The entity id.
 * @return {number} The layer id or 0 if none.
 */
o3v.EntityMetadata.prototype.getLayerId = function(entityId) {
  var entity = this.entities_[entityId];
  var layerId = 0;
  // Inefficient (because no short-circuiting) but easy.
  o3v.util.forEach(
      entity.parentIds,
      function(true_unused, parentId) {
        if (this.layers_[parentId] !== undefined) {
          layerId = parentId;
        } else {
          var parentLayerId = this.getLayerId(parentId);
          if (parentLayerId != 0) {
            layerId = parentLayerId;
          }
        }
      }, this);
  return layerId;
};

/**
 * Maps an external id to an internal id.
 * @param {string} externalId External id.
 * @return {number} The internal id.
 */
o3v.EntityMetadata.prototype.externalIdToId = function (externalId) {
  // TODO(dkogan): This lower case should not be necessary once the pipeline
  // does the right thing.
  return this.externalIdToId_[externalId.toLowerCase()];
};

/**
 * Gets an entity object by id.
 * @param {number} entityId The id of the entity.
 * @return {Object} The entity.
 */
o3v.EntityMetadata.prototype.getEntity = function (entityId) {
  return this.entities_[entityId];
};

/**
 * Gets the layers.
 * @return {Object.<number, boolean>} Set of layer entity ids.
 */
o3v.EntityMetadata.prototype.getLayers = function () {
  return this.layers_;
};

/**
 * Gets the sublayers. See definition of EntityMetadata.sublayers_ for
 * structure explanation.
 * @return {Object.<number, Array.<Array.<number>>>} Sublayer object.
 */
o3v.EntityMetadata.prototype.getSublayers = function () {
  return this.sublayers_;
};

/**
 * Gets symmetry information.
 * @return {Object.<number, Object>} Map of pair id to symmetry info.
 */
o3v.EntityMetadata.prototype.getSymmetries = function () {
  return this.symmetries_;
};

/**
 * Gets the hidden entities.
 * @return {Object.<number, boolean>} Set of hidden entity ids.
 */
o3v.EntityMetadata.prototype.getHidden = function () {
  return this.hidden_;
};

/**
 * Computes and stores a single symmetry object.
 * This sets this.symmetries_.
 * @param {Array.<number|string>} symmetryJson Json data for the symmetry.
 *        Structure: [<pairId>, <leftId>, <rightId>, <singularName>].
 * @private
 */
o3v.EntityMetadata.prototype.computeSymmetryObject_ = function (symmetryJson) {
  var pairId = symmetryJson[0];
  var symmetryObj = {};
  symmetryObj.childIds = [];
  symmetryObj.childIds[HANDEDNESS_.LEFT] = symmetryJson[1];
  symmetryObj.childIds[HANDEDNESS_.RIGHT] = symmetryJson[2];
  symmetryObj.singularName = o3v.makeName('' + symmetryJson[3]);

  this.symmetries_[pairId] = symmetryObj;
};

/**
 * Stores a name associated with an entity.
 * @param {Array.<number|string>} nameTuple Tuple of (entityId, name).
 * @private
 */
o3v.EntityMetadata.prototype.computeName_ = function (nameTuple) {
  var entityId = +nameTuple[0];
  var name = nameTuple[1];
  if (!this.entitiesWithOverriddenNames_[entityId]) {
    // First override clobbers existing name.
    this.entities_[entityId].names = [name];
    this.entitiesWithOverriddenNames_[entityId] = true;
  } else {
    this.entities_[entityId].names.push(name);
  }
};

/**
 * Storage for entity information associated with a particular model.
 * @param {Object} json Json data from server for this model.
 * @param {o3v.EntityMetadata} metadata Global metadata.
 * @constructor
 */
o3v.EntityModel = function (json, metadata) {
  // TODO(wonchun): This should be constructed out of models, not out of json.
  // TODO(dkogan): Much of this code needs to be pushed back earlier into the
  //               data pipeline. The symmetry code is especially bad.
  this.log_ = o3v.log;

  /**
   * Map of entity id to entity metadata.
   * @type {Object.<number, Object>}
   * @private
   */
  this.entities_ = {};

  /**
   * Map of external id to id.
   * @type {Object.<string, number>}
   * @private
   */
  this.externalIdToId_ = {};

  /**
   * Map of search term to array of entity ids.
   * @type {Object.<string, Array.<number>>}
   * @private
   */
  this.searchToEntityIds_ = {};

  /**
   * Matcher for search.
   * @type {Object}
   * @private
   */
  this.searchMatcher_ = null;

  /**
   * Root of the entity DAG (there must only be one).
   * @type {number}
   * @private
   */
  this.rootId_;

  /**
   * Array of layer names.
   * @type Array.<String>
   * @private
   */
  this.layerNames_ = [];

  /**
   * Map of layer name to entity id.
   * @type {Object.<string, number>}
   * @private
   */
  this.layerNameToId_ = {};

  /**
   * Set of entity ids that are unselectable.
   * @type {Object.<number, boolean>}
   * @private
   */
  this.unselectable_ = o3v.util.cloneObject(metadata.getHidden());

  this.loadLeafEntities_(json, metadata);
  this.nonSearchableEntityIds_ = o3v.util.cloneObject(metadata.getHidden());
  this.computeDagAndSymmetries_(metadata);
  this.computeRoot_();
  this.computeSplits_();
  this.computeLayers_(metadata);
  this.computeSearches_(metadata);

  /**
   * Sublayers: indexed by layer entity id, array of arrays of entity ids.
   * @type {Object.<number, Array.<Array.<number>>>}view
   * @private
   */
  this.sublayers_ = this.loadSublayers_(metadata.getSublayers());
};

/**
 * Maximum number of entities into which a group entity is allowed to split. If
 * it's not possible to split under this number, entity is considered
 * unsplittable.
 * @type {number}
 * @const
 * @private
 */
o3v.EntityModel.MAX_SPLIT_COUNT_ = 25;

/**
 * Loads sublayers from metadata.
 * This is just postprocessing to remove any entities not in this model.
 * @param {Object.<number, Array.<Array.<number>>>} sublayers
 * @return {Object.<number, Array.<Array.<number>>>} sublayers
 */
o3v.EntityModel.prototype.loadSublayers_ = function(sublayers) {

  var newSublayers = {};

  o3v.util.forEach(
      sublayers,
      function(sublayer, layerId) {
        newSublayers[layerId] = [];
        sublayer.forEach(
            function(sublayerArray) {
              newSublayers[layerId][newSublayers[layerId].length] = [];
              sublayerArray.forEach(
                  function(entityId) {
                    if (this.entities_[entityId] !== undefined) {
                      newSublayers[layerId][newSublayers[layerId].length - 1]
                          .push(entityId);
                    }
                  }, this);
            }, this);
      }, this);

  return newSublayers;
};

/**
 * Loads leaf entities from json and metadata.
 * This sets this.entities_ and this.externalIdToId_ for leaf entities.
 * @param {Object} json Json data for this model.
 * @param {o3v.EntityMetadata} metadata Overall metadata.
 * @private
 */
o3v.EntityModel.prototype.loadLeafEntities_ = function (json, metadata) {
  // Generate list of initial entities.
  for (var url in json.urls) {
    var urlItems = json.urls[url].length;
    for (var i = 0; i < urlItems; ++i) {
      json.urls[url][i].names.forEach(
        function(externalId) {
          var entityId = metadata.externalIdToId(externalId);
          var entityMetadata = metadata.getEntity(entityId);
          if (!entityId) {
            this.log_.error('Missing leaf geometry ', externalId,
                            ' in metadata.');
          } else {
            var entity = {};
            entity.name = entityMetadata.names[0];
            // TODO(dkogan): This field only used for symmetry calculation -
            // really should move that to the data pipeline somewhere as a
            // boolean.
            entity.externalId = externalId;

            // TODO(dkogan): Make parents & children just pointers.
            entity.parentIds = entityMetadata.parentIds;

            this.entities_[entityId] = entity;
            this.externalIdToId_[externalId] = entityId;
          }
      }, this);
    }
  }
};

/**
 * Computes the entity hierarchy DAG and fills in any symmetries. The DAG
 * represents how entities and groups of entities relate to one another: e.g.
 * 'cervical vertebrae' belong to the groups 'spine' and 'skeleton'.
 * This sets this.entities_ for groups, and sets parentIds and childIds on the
 * entities.
 * @param {o3v.EntityMetadata} metadata Overall metadata.
 * @private
 */
o3v.EntityModel.prototype.computeDagAndSymmetries_ = function (metadata) {
  var symmetries = metadata.getSymmetries();

  // Generate a lookup table for group entities which known to be symmetric.
  // The left and right children of group entities are generated in the
  // pipeline.
  var entityIdToHandedness = {};
  o3v.util.forEach(symmetries, function (pair, pairId) {
    o3v.util.forEach(HANDEDNESS_, function (handedness) {
      var childId = pair.childIds[handedness];
      this.nonSearchableEntityIds_[childId] = true;
      entityIdToHandedness[childId] = handedness;
    }, this);
  }, this);

  // Function to get handedness given an entity. Group entity handedness is
  // known from metadata (entityIdToHandedness); leaf entity handedness in
  // determined by the prefix of the external id.
  var getHandedness = function (entityId, entity) {
      if (o3v.util.objectContains(entityIdToHandedness, entityId)) {
        return entityIdToHandedness[entityId];
      } else if (entity.externalId && entity.externalId.match(/^l_/i)) {
        return HANDEDNESS_.LEFT;
      } else if (entity.externalId && entity.externalId.match(/^r_/i)) {
        return HANDEDNESS_.RIGHT;
      } else {
        this.log_.error('paired entity of unknown handedness ', entityId,
                        ' ', entity.name);
      }
    };

  // Queue of entities to process. Every entity is processed to set the parent
  // child connections.
  // Any entity created in the process of dag generation or symmetry
  // generation gets added to the queue and processed in turn.
  var queue = Object.keys(this.entities_).map(
      function (entityId) {
        return +entityId;
      });
  while (queue.length) {
    var childId = queue.shift();
    var child = this.entities_[childId];
    var modifiedParentIds = {}; // Updated parent ids for this child.
    for (var parentId in child.parentIds) {
      parentId = +parentId;
      // If no entity for parentId exists, create an entity. This is how the
      // DAG is grown (from the bottom up).
      if (!this.entities_[parentId]) {
        var parentMetadata = metadata.getEntity(parentId);
        var parent = {};
        parent.name = parentMetadata.names[0];
        parent.parentIds = parentMetadata.parentIds;
        parent.childIds = o3v.util.createSet();
        this.entities_[parentId] = parent;
        if (symmetries[parentId]) {
          // If parent is symmetric, create its left and right children along
          // with it. One of these children becomes the parent of the child
          // entity. For example 'left thumb' becomes the child of 'hand' and
          // 'left hand', and 'left hand' is the child of 'hand'.
          var symmetry = symmetries[parentId];
          o3v.util.forEach(HANDEDNESS_, function (handedness) {
            var subParentId = symmetry.childIds[handedness];
            var subParent = {};
            subParent.name = symmetry.singularName;
            subParent.parentIds = o3v.util.createSet();
            subParent.parentIds[parentId] = true;
            subParent.childIds = o3v.util.createSet();

            parent.childIds[subParentId] = true;

            this.entities_[subParentId] = subParent;

            // New subParent needs to be processed.
            queue.push(subParentId);
          }, this);
        }
        // New parent needs to be processed.
        queue.push(parentId);
      }
      // Now that the parent is guaranteed to exist, hook up the child to it.
      var parent = this.entities_[parentId];
      if (symmetries[parentId] && !parent.childIds[childId]) {
        // This is the child of a symmetric entity.
        if (symmetries[childId]) {
          // This entity itself is symmetric, so the following connections
          // need to be made:
          // a -> b
          // a -> left_a          * done prior to this code executing
          // a -> right_a         * done prior to this code executing
          // b -> left_b          * done prior to this code executing
          // b -> right_b         * done prior to this code executing
          // left_a -> left_b
          // right_a -> right_b
          var parentSymmetry = symmetries[parentId];
          var childSymmetry = symmetries[childId];

          // a -> b
          modifiedParentIds[parentId] = true;
          parent.childIds[childId] = true;

          // left_a -> left_b && right_a -> right_b
          o3v.util.forEach(HANDEDNESS_, function (handedness) {
            var subParentId = parentSymmetry.childIds[handedness];
            var subChildId = childSymmetry.childIds[handedness];
            var subParent = this.entities_[subParentId];
            var subChild = this.entities_[subChildId];
            subParent.childIds[subChildId] = true;
            subChild.parentIds[subParentId] = true;
          }, this);
        } else {
          // This entity is not symmetric, which means it
          // belongs under either the left or right child of its parent.
          var handedness = getHandedness(childId, child);
          var symmetry = symmetries[parentId];
          var subParentId = symmetry.childIds[handedness];
          var subParent = this.entities_[subParentId];

          if (subParent) {
            subParent.childIds[childId] = true;
            modifiedParentIds[subParentId] = true;
          } else {
            this.log_.error('no subparent for ', parent.name,
                            ' -> ', child.name);
          }
        }
      } else {
        // Regular parent->child; not symmetric.
        parent.childIds[childId] = true;
        modifiedParentIds[parentId] = true;
      }
    }
    // Incorporate changes due to symmetries.
    child.parentIds = modifiedParentIds;
  }
};

/**
 * Computes the root entity and verifies there is only one.
 * This sets this.rootId_.
 * @private
 */
o3v.EntityModel.prototype.computeRoot_ = function () {
  // Compute root node.
  o3v.util.forEach(
  this.entities_, function (entity, entityId) {
    if (o3v.util.isEmpty(entity.parentIds)) {
      if (!this.rootId_) {
        this.rootId_ = entityId;
      } else {
        this.log_.error('MULTIPLE ROOTS', this.rootId_, ' ', entityId,
                        ' ', this.entities_[this.rootId_].name,
                        ' ', this.entities_[entityId].name);
      }
    }
  }, this);
};

/**
 * Computes bounding boxes and their centers for all entities.
 * This sets bbox and ctr on all the entities.
 * This must get called before bboxes are read.
 * @param {Object.<string, Array.<number>> leafBboxesByExternalId
 * @private
 */
o3v.EntityModel.prototype.computeBboxes = function (leafBboxesByExternalId) {
  var leafIds = this.getLeafIds(this.rootId_);
  o3v.util.forEach(
      leafIds,
      function(unused_true, entityId) {
        var entity = this.entities_[entityId];
        entity.bbox = leafBboxesByExternalId[entity.externalId];
      }, this);

  var dirty = leafIds; // dirty = need to propagate change up
  var queue = Object.keys(leafIds);
  while (queue.length) {
    var nodeId = queue.shift();
    if (dirty[nodeId]) {
      delete dirty[nodeId];
      var node = this.entities_[nodeId];
      o3v.util.forEach(
          node.parentIds,
          function (unused_true, parentId) {
            var parent = this.entities_[parentId];
            if (node.bbox !== undefined) {
              parent.bbox = o3v.growBBox(parent.bbox, node.bbox);
              dirty[parentId] = true;
              queue.push(parentId);
            } else {
              o3v.log.error('error adding ', node.name, ' to ', parent.name);
            }
          }, this);
    }
  }

  // Compute bbox centers.
  o3v.util.forEach(
      this.entities_,
      function (entity) {
        if (entity.bbox !== undefined) {
          entity.ctr = [];
          entity.ctr[0] = 0.5 * (entity.bbox[0] + entity.bbox[3]);
          entity.ctr[1] = 0.5 * (entity.bbox[1] + entity.bbox[4]);
          entity.ctr[2] = 0.5 * (entity.bbox[2] + entity.bbox[5]);
        } else {
          o3v.log.error('no bbox or center for entity', entity);
        }
      });
};

/**
 * Computes the set of entityIds that best splits this group entity. It returns
 * null if the entity is unsplittable, or if it's impossible to split it into
 * fewer than MAX_SPLIT_COUNT_ subentities.
 * Note: Both the entity and entity id are passed in to simplify the recursion.
 * @param {Object} entity Entity.
 * @param {number} entityId Entity id.
 * @return {Object.<number, boolean>?} Set of entity ids.
 * @private
 */
o3v.EntityModel.prototype.computeOneSplit_ = function (entity, entityId) {
  if (!entity.childIds) {
    return null;
  }

  var split = {};

  // If this is a synonym, delegate.
  if (o3v.util.getObjectCount(entity.childIds) == 1) {
    var childId = +(Object.keys(entity.childIds)[0]);
    return this.computeOneSplit_(this.getEntity(childId), childId);
  }

  var leafIds = this.getLeafIds(entityId);

  // Generate child groups.
  var childGroupIdToGroupLeafIds = {};
  for (var childId in entity.childIds) {
    if (!this.unselectable_[childId]) {
      var childLeafIds = this.getLeafIds(+childId);
      if (childLeafIds && o3v.util.getObjectCount(childLeafIds) > 1) {
        childGroupIdToGroupLeafIds[childId] = childLeafIds;
      }
    }
  }

  // Sort child groups by number of subelements.
  var childGroupIds = Object.keys(childGroupIdToGroupLeafIds);
  childGroupIds.sort(function (a, b) {
    return (o3v.util.getObjectCount(childGroupIdToGroupLeafIds[b]) - o3v.util.getObjectCount(childGroupIdToGroupLeafIds[a]));
  });

  // Add useful child groups to split.
  childGroupIds.forEach(
      function (childGroupId) {
        var useful = false;
        var childLeafIds = childGroupIdToGroupLeafIds[childGroupId];
        for (var childLeafId in childLeafIds) {
          if (leafIds[childLeafId]) {
            useful = true;
            break;
          }
        }
        if (useful) {
          split[childGroupId] = true;
          for (var childLeafId in childLeafIds) {
            delete leafIds[childLeafId];
          }
        }
      });

  // Add any individual leafs unaccounted for.
  for (var leafId in leafIds) {
    if (!this.unselectable_[leafId]) {
      split[leafId] = true;
    }
  }

  if (o3v.util.getObjectCount(split) <= 1) {
    // Leaf entity or group - unsplittable.
    return null;
  } else if (o3v.util.getObjectCount(split) <= o3v.EntityModel.MAX_SPLIT_COUNT_) {
    return split;
  } else {
    this.log_.warning('entity ', entity.name,' splits into too many: ',
                      o3v.util.getObjectCount(split), ' ', split);
    if (o3v.debug) {
      return split;
    } else {
      return null;
    }
  }
};

/**
 * Computes the best split (where possible) for group entities.
 * This sets split_ on this.entities_.
 * @private
 */
o3v.EntityModel.prototype.computeSplits_ = function () {
  // TODO(dkogan): This needs to go into the pipeline, but requires that
  // the pipeline be model-specific.
  o3v.util.forEach(this.entities_, function (entity, entityId) {
    if (!this.unselectable_[entityId]) {
      var split = this.computeOneSplit_(entity, entityId);
      if (split) {
        entity.split_ = split;
      }
    }
  }, this);
};

/**
 * Propagates layer information down to leaf entities. If entityId is leaf, the
 * layer is set on that leaf. Otherwise, the function is called recursively on
 * all the entity's children.
 * @param {number} layerId Entity id of the layer to propagate.
 * @param {number} entityId Entity id to propagate through.
 * @private
 */
o3v.EntityModel.prototype.propagateLayerDown_ = function (layerId, entityId) {
  var entity = this.entities_[entityId];
  if (!entity.layers) {
    entity.layers = {};
  }
  if (!entity.childIds) {
    entity.layers[layerId] = true;
  } else {
    // TODO(dkogan): Implement without recursion. Should be okay for now.
    for (var childId in entity.childIds) {
      this.propagateLayerDown_(layerId, +childId);
    }
  }
};

/**
 * Propagates layer information up through the tree. The layer is set on both
 * the current entity, and all its ancestors (recursively).
 * @param {number} layerId Entity id of the layer to propagate.
 * @param {number} entityId Entity id to propagate through.
 * @private
 */
o3v.EntityModel.prototype.propagateLayerUp_ = function (layerId, entityId) {
  var entity = this.entities_[entityId];
  if (!entity.layers) {
    entity.layers = {};
  }
  entity.layers[layerId] = true;
  // TODO(dkogan): Implement without recursion. Should be okay for now.
  for (var parentId in entity.parentIds) {
    this.propagateLayerUp_(layerId, +parentId);
  }
};

/**
 * Computes layer information on all entities. Leaf entities are analogous
 * to render groups, and must be in exactly one layer. All other entities are
 * considered to be in every layer in which one of their children is. Thus,
 * the root entity is in every layer, and 'elbow' may be in 'muscle' and
 * 'skeleton' layers.
 * This sets layers on this.entities_.
 * @param {o3v.EntityMetadata} metadata Metadata.
 * @private
 */
o3v.EntityModel.prototype.computeLayers_ = function (metadata) {
  // Compute initial layers.
  Object.keys(metadata.getLayers()).forEach(
      function (layerId) {
        // Use external ids for layers, not names.
        // TODO(dkogan): We should split up layers and groups
        // to avoid this kind of hack.
        if (this.entities_[layerId]) {
          var layerName = metadata.getEntity(layerId).externalId;
          this.layerNames_.push(layerName);
          this.entities_[layerId].externalId = layerName;
          this.layerNameToId_[layerName] = layerId;
        }
      }, this);

  // Pass layer info to the child nodes.
  Object.keys(metadata.getLayers()).forEach(
      function (layerId) {
        if (this.entities_[layerId]) {
          this.propagateLayerDown_(layerId, layerId);
        }
      }, this);

  // Sanity check - any leaf entity must be in exactly one layer.
  o3v.util.forEach(this.entities_, function (entity) {
    if (!entity.childIds && (!entity.layers || o3v.util.getObjectCount(entity.layers) != 1)) {
      this.log_.error('leaf entity not in one layer: ', entity.name);
    }
  }, this);

  // Propagate layer info up through the tree.
  o3v.util.forEach(this.entities_, function (entity, entityId) {
    if (!entity.childIds) {
      this.propagateLayerUp_(
      Object.keys(entity.layers)[0], entityId);
    }
  }, this);

  // Turn layers into arrays for easier processing.
  o3v.util.forEach(
  this.entities_, function (entity) {
    if (!o3v.util.isEmpty(entity.layers)) {
      entity.layers = Object.keys(entity.layers);
    }
  });
};

/**
 * Computes layer information on all entities. Leaf entities are analogous
 * to render groups, and must be in exactly one layer. All other entities are
 * considered to be in every layer in which one of their children is. Thus,
 * the root entity is in every layer, and 'elbow' may be in 'muscle' and
 * 'skeleton' layers.
 * This sets this.searchMatcher_ and this.searchToEntityIds_.
 * @param {o3v.EntityMetadata} metadata Metadata.
 * @private
 */
o3v.EntityModel.prototype.computeSearches_ = function (metadata) {
  var symmetries = metadata.getSymmetries();

  // Compute search table.
  for (var entityId in this.entities_) {
    entityId = +entityId;
    if (!this.nonSearchableEntityIds_[entityId]) {
      var names = metadata.getEntity(entityId).names.slice(0);
      // Use singular form as the primarywhen searching, for aesthetics.
      if (symmetries[entityId]) {
        names[0] = symmetries[entityId].singularName;
      }
      // TODO(dkogan): Expand this to be able to handle 'left lung'.
      names.forEach(
          function (name) {
            o3v.util.setIfUndefined(this.searchToEntityIds_, name, []);
            this.searchToEntityIds_[name].push(entityId);
          }, this);
    }
  }

  var searches = Object.keys(this.searchToEntityIds_);
  searches.sort(function (a, b) {
    return a.length - b.length;
  });

  this.autocompleteList_ = searches;
};

/**
 * Get a selectable entity by traversing the DAG up. This function tries to find
 * the smallest group of entities that includes the current entity, and is
 * selectable. In many cases, this is just the current entity. Note that no
 * guarantee is made about whether this is actually the smallst group - this
 * function is heuristical.
 * @param {number} entityId Entity id to start from.
 * @return {number} Entity id of the group.
 * @private
 */
// TODO(dkogan): Extend this function to generically unexplode entities.
// TODO(dkogan): Move this calculation into the pipeline.
o3v.EntityModel.prototype.getSelectable_ = function (entityId) {
  if (!this.unselectable_[entityId]) {
    return entityId;
  } else {
    // Recurse on parent id with fewest children.
    var parentIds = Object.keys(this.entities_[entityId].parentIds);

    var minCount = o3v.util.getObjectCount(this.getRootEntity().childIds) + 1;
    var minParentId = -1;
    parentIds.forEach(
        function (parentId) {
          var parent = this.entities_[parentId];
          var count = o3v.util.getObjectCount(parent.childIds);
          if (count < minCount) {
            minCount = count;
            minParentId = parentId;
          }
        }, this);
    if (minParentId == -1) {
      this.log_.error('Unable to find entity id under click.');
      return this.rootId_;
    } else {
      return this.getSelectable_(minParentId);
    }
  }
};

/**
 * Maps an external id to an internal id.
 * @param {string} externalId External id.
 * @return {number} The internal id.
 */
o3v.EntityModel.prototype.externalIdToId = function (externalId) {
  return this.getSelectable_(this.externalIdToId_[externalId]);
};

/**
 * Gets an entity object by id.
 * @param {number} entityId The id of the entity.
 * @return {Object} The entity.
 */
o3v.EntityModel.prototype.getEntity = function (entityId) {
  return this.entities_[entityId];
};

/**
 * Gets the root entity. (Entity, not just entity id.)
 * @return {Object} The root entity.
 */
o3v.EntityModel.prototype.getRootEntity = function () {
  return this.entities_[this.rootId_];
};

/**
 * Gets the set of leaf entities in any subtree.
 * @param {number} entityId The root of the subtree.
 * @return {Object.<number, boolean>} Set of leaf entity ids.
 */
o3v.EntityModel.prototype.getLeafIds = function (entityId) {
  var leafIds = {};
  var entity = this.entities_[entityId];
  if (!entity.childIds) {
    leafIds[entityId] = true;
    return leafIds;
  } else {
    for (var childId in entity.childIds) {
      o3v.util.extendObject(leafIds, this.getLeafIds(+childId));
    }
    return leafIds;
  }
};

/**
 * Checks to see if entity is splittable.
 * @param {number} entityId The entity to try to split.
 * @return {boolean} True if entity is splittable.
 */
o3v.EntityModel.prototype.isSplittable = function (entityId) {
  return !!this.getEntity(entityId).split_;
};

/**
 * Gets the minimal split of the entity. Returns undefined if no split is
 * possible.
 * @param {number} entityId The entity id to split.
 * @return {Object.<number, boolean>?} Entity ids into which to split.
 */
o3v.EntityModel.prototype.getSplit = function (entityId) {
  return this.getEntity(entityId).split_;
};

/** Gets layer names.
 * @return Array.<string> Layer names
 */
o3v.EntityModel.prototype.getLayerNames = function() {
  return this.layerNames_;
};

/**
 * Maps a layer name to id.
 * @param {string} layerName Name of the layer.
 * @return {number} Entity id of the layer.
 */
o3v.EntityModel.prototype.layerNameToId = function (layerName) {
  return this.layerNameToId_[layerName];
};

/**
 * Maps a search term to a set of matching entity ids.
 * @param {string} search The search term.
 * @return {Object.<number, boolean>?} Matching entity ids.
 */
o3v.EntityModel.prototype.searchToEntityIds = function (search) {
  return this.searchToEntityIds_[search];
};

/**
 * Gets the search matcher for this model.
 * @return {Array.<string>} Array of search strings.
 */
o3v.EntityModel.prototype.getAutocompleteList = function () {
  return this.autocompleteList_;
};

/**
 * Gets sublayer information. For explanation of datastructure, see
 * sublayers_ member in EntityMetadata.
 * @return {Object.<number, Array.<Array.<number>>>} Sublayers.
 */
o3v.EntityModel.prototype.getSublayers = function () {
  return this.sublayers_;
};


text:
package co.cask.tigon.runtime;

import com.google.inject.Module;

/**
 * Runtime Module defines all of the methods that all of our Guice modules must
 * implement. We expect all modules that are found in each component's "runtime"
 * package to extend this class.
 */
public abstract class RuntimeModule {

  /**
   * Get a combined Module that includes all of the modules and classes
   * required to instantiate and run an in memory instance of Tigon.
   *
   * @return A combined set of Modules required for InMemory execution.
   */
  public abstract Module getInMemoryModules();

  /**
   * Get a combined Module that includes all of the modules and classes
   * required to instantiate and run a single node instance of Tigon.
   *
   * @return A combined set of Modules required for SingleNode execution.
   */
  public abstract Module getSingleNodeModules();

  /**
   * Get a combined Module that includes all of the modules and classes
   * required to instantiate and run a fully distributed instance of Tigon.
   *
   * @return A combined set of Modules required for distributed execution.
   */
  public abstract Module getDistributedModules();

}


text:
This is the QuickIO client for iOS devices.

## Usage

```objective-c
#import "QuickiOS.h"

// Defaults to port 80, plain-text
QuickiOS *qio = [[QuickiOS alloc] init:@"public.address.com"];

// For specifying ports and ssl
// qio = [[QuickiOS alloc] init:@"public.address.com"
//                     withPort:4433
//                      withSsl:YES];

// Call this when you're ready to connect to the servers. If you need
// to bind to "/open", do that before calling reconnect.
[qio reconnect];

QuickiOSEventCallback cb = ^(QuickiOS *qio, NSObject *data) {
   // Do something useful with the object
};

// Subscribe to some event
[qio on:@"/some/event"
  addCb:cb
onError:^(QuickiOS *qio, NSError *error) {
    // Handle any errors subscribing to the event
}];

// Remove a single callback from the event
[qio off:@"/some/event" removeCb:cb];

// Remove all callbacks from the event
[qio off:@"/some/event" removeCb:nil];

// Send an event to the server
[qio send:@"/another/event"
 withData:@{@"test": @"fun"}
   withCb:^(QuickiOS *qio,
            NSObject *data,
            NSError *error,
            QuickiOSServerCallback *cb)
   {
        switch (error.code) {
            case 200:
                // Data contains valid data from the server
                [cb send:@[@"an array"]
                  withCb:^(QuickiOS *qio,
                           NSObject *data,
                           NSError *error,
                           QuickiOSServerCallback *cb)
                  {
                        // A callback within a callback, and so forth
                  }];
                break;

            case 404:
                // Event doesn't exist on the server
                break;

            default:
                // Some unhandled error code
                break;
        }
   }];

// If you ever want to close the connection
[qio close];
```

## Special Events

### /open

When a new connection to the server is opened, this event will _always_ be triggered. Any initialization you need to do on server connect should happen in here.

### /close

When the connection to the server is lost, this event will be triggered.  This is typically only used for cleanup.

### /error

Whenever there is an error connecting, a connection is lost, or some other internal error occurs, this will be fired. This is mainly for debugging and logging purposes.


text:
<?php

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * BotInterview
 *
 * @ORM\Table(name="bot_interview", indexes={@ORM\Index(name="id_users", columns={"id_users"})})
 * @ORM\Entity
 */
class BotInterview
{
    /**
     * @var \DateTime
     *
     * @ORM\Column(name="date_start", type="datetime", nullable=false)
     */
    private $dateStart;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="date_end", type="datetime", nullable=false)
     */
    private $dateEnd;

    /**
     * @var boolean
     *
     * @ORM\Column(name="is_active", type="boolean", nullable=false)
     */
    private $isActive;

    /**
     * @var integer
     *
     * @ORM\Column(name="id_bot_interview", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $idBotInterview;

    /**
     * @var \AppBundle\Entity\Users
     *
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Users")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="id_users", referencedColumnName="id_users")
     * })
     */
    private $idUsers;

    /**
     * Set dateStart
     *
     * @param \DateTime $dateStart
     *
     * @return BotInterview
     */
    public function setDateStart($dateStart)
    {
        $this->dateStart = $dateStart;

        return $this;
    }

    /**
     * Get dateStart
     *
     * @return \DateTime
     */
    public function getDateStart()
    {
        return $this->dateStart;
    }

    /**
     * Set dateEnd
     *
     * @param \DateTime $dateEnd
     *
     * @return BotInterview
     */
    public function setDateEnd($dateEnd)
    {
        $this->dateEnd = $dateEnd;

        return $this;
    }

    /**
     * Get dateEnd
     *
     * @return \DateTime
     */
    public function getDateEnd()
    {
        return $this->dateEnd;
    }

    /**
     * Set isActive
     *
     * @param boolean $isActive
     *
     * @return BotInterview
     */
    public function setIsActive($isActive)
    {
        $this->isActive = $isActive;

        return $this;
    }

    /**
     * Get isActive
     *
     * @return boolean
     */
    public function getIsActive()
    {
        return $this->isActive;
    }

    /**
     * Get idBotInterview
     *
     * @return integer
     */
    public function getIdBotInterview()
    {
        return $this->idBotInterview;
    }

    /**
     * Set idUsers
     *
     * @param \AppBundle\Entity\Users $idUsers
     *
     * @return BotInterview
     */
    public function setIdUsers(\AppBundle\Entity\Users $idUsers = null)
    {
        $this->idUsers = $idUsers;

        return $this;
    }

    /**
     * Get idUsers
     *
     * @return \AppBundle\Entity\Users
     */
    public function getIdUsers()
    {
        return $this->idUsers;
    }
}


text:
<?php
/**
 * DO NOT EDIT THIS FILE!
 *
 * This file was automatically generated from external sources.
 *
 * Any manual change here will be lost the next time the SDK
 * is updated. You've been warned!
 */

namespace DTS\eBaySDK\Account\Types;

/**
 *
 * @property string $paymentMethodName
 * @property \DTS\eBaySDK\Account\Enums\ExternalPaymentMethodTypeEnum $paymentMethodType
 * @property boolean $primary
 * @property boolean $verified
 */
class ExternalPaymentMethod extends \DTS\eBaySDK\Types\BaseType
{
    /**
     * @var array Properties belonging to objects of this class.
     */
    private static $propertyTypes = [
        'paymentMethodName' => [
            'type' => 'string',
            'repeatable' => false,
            'attribute' => false,
            'elementName' => 'paymentMethodName'
        ],
        'paymentMethodType' => [
            'type' => 'string',
            'repeatable' => false,
            'attribute' => false,
            'elementName' => 'paymentMethodType'
        ],
        'primary' => [
            'type' => 'boolean',
            'repeatable' => false,
            'attribute' => false,
            'elementName' => 'primary'
        ],
        'verified' => [
            'type' => 'boolean',
            'repeatable' => false,
            'attribute' => false,
            'elementName' => 'verified'
        ]
    ];

    /**
     * @param array $values Optional properties and values to assign to the object.
     */
    public function __construct(array $values = [])
    {
        list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values);

        parent::__construct($parentValues);

        if (!array_key_exists(__CLASS__, self::$properties)) {
            self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes);
        }

        $this->setValues(__CLASS__, $childValues);
    }
}


text:
require "xpath" # XPath is a separate gem now

module Cucumber
  module Rails
    module CapybaraSelectDatesAndTimes
      def select_date(field, options = {})
        id = find("label", text: field)["for"]
        date = Date.parse(options[:with])
        find("select##{id}_1i option[value='#{date.year}']").select_option
        find("select##{id}_2i option[value='#{date.month}']").select_option
        find("select##{id}_3i option[value='#{date.day}']").select_option
      end

      def select_time(field, options = {})
        id = find("label", text: field)["for"]
        time = Time.parse(options[:with])
        find("select##{id}_4i option[value='#{time.hour.to_s.rjust(2, '0')}']").select_option
        find("select##{id}_5i option[value='#{time.min.to_s.rjust(2, '0')}']").select_option
      end

      def select_datetime(field, options = {})
        select_date(field, options)
        select_time(field, options)
      end
    end
  end
end

World(Cucumber::Rails::CapybaraSelectDatesAndTimes)

When /^(?:|I )select "([^\"]*)" as the "([^\"]*)" time$/ do |time, selector|
  select_time(selector, with: time)
end

When /^(?:|I )select "([^\"]*)" as the "([^\"]*)" date$/ do |date, selector|
  select_date(selector, with: date)
end

When /^(?:|I )select "([^\"]*)" as the "([^\"]*)" date and time$/ do |datetime, selector|
  select_datetime(selector, with: datetime)
end


text:
This app is aimed at Primary aged children, as a tool to help them learn te reo Māori phonics and high-usage words.

##Instructions for use on a local directory

Clone the repo into your workspace.

In the KoreroMai2 directory: npm i

To run the app in development use Node and in the terminal: npm run dev

To see the app in action: localhost:3000

or go to Heroku hosted web app: https://koreromai.maori.nz

# Using the App

The app is a simple library of the Māori alphabet, with some related multimedia files.
The user simply clicks on a letter they want to learn. They will see a page with a Capital, Lowercase and some images/words with the letter showing it in context. The letters and images can all be clicked on, and the user will hear the letter or word pronounced in te reo Māori. This can be repeated as many times as needed, to learn the correct pronounciation.

##Purpose
This app came about from a need for more digital teaching resources to help younger audiences learn the basics of a new language. Phonics is a building block for language, and the learning of which enables the user to move on to more complex words, grammar and other language features.

##Target audience
This app has specifically been designed for Primary school children, which in New Zealand is the ages between 5 - 9 years.

##Development Installations:

- If you're on linux:
- Install ruby: sudo apt-get install ruby-full
- Install Sass: sudo su -c "gem install sass"
- once downloaded: npm i


text:
using LanguageExt.TypeClasses;
using System.Reflection;

namespace LanguageExt.ClassInstances
{
    public struct OrdTypeInfo : Ord<TypeInfo>
    {
        public int Compare(TypeInfo x, TypeInfo y) =>
            x.ToString().CompareTo(y.ToString());

        public bool Equals(TypeInfo x, TypeInfo y) =>
            default(EqTypeInfo).Equals(x, y);

        public int GetHashCode(TypeInfo x) =>
            default(EqTypeInfo).GetHashCode(x);
    }
}


text:
shared class Timer
{
public:
    static u64 Ticks;

    /// <summary>
    /// Returns the current tick count from the boot of the system
    /// </summary>
    /// <returns>The current tick count from the boot of the system</returns>
    static u64 Time();

    /// <summary>
    /// Sleeps the specified amount of milliseconds
    /// </summary>
    /// <param name="milliseconds">The number of milliseconds to sleep</param>
    static void Sleep(u64 milliseconds);
};

#endif


text:
using ArgeHeiwako.Data.Common;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xunit;

namespace ArgeHeiwako.Tests.Data.Common
{
    [ExcludeFromCodeCoverage]
    public class ErweiteterOrdnungsbegriffAbrechnungsunternehmenTests
    {
        private LiegenschaftsNummer liegenschaftsNummer;
        private Nutzerfolge nutzerfolge;
        private NutzergruppenNummer nutzergruppenNummer;
        private WohnungsNummer wohnungsNummer;
        private ErweiterterOrdnungsbegriffAbrechnungsunternehmen ordnungsbegriff;

        public ErweiteterOrdnungsbegriffAbrechnungsunternehmenTests()
        {
            liegenschaftsNummer = new LiegenschaftsNummer(1);
            nutzergruppenNummer = new NutzergruppenNummer(1);
            wohnungsNummer = new WohnungsNummer(1);
            nutzerfolge = new Nutzerfolge(1);

            ordnungsbegriff = new ErweiterterOrdnungsbegriffAbrechnungsunternehmen(liegenschaftsNummer, nutzergruppenNummer, wohnungsNummer, nutzerfolge);
        }

        #region Ctor

        [Fact]
        public void Ctor_NullItemItemItem_ThrowsArgumentNullException()
        {
            var ex = Assert.Throws<ArgumentNullException>(
                () => new ErweiterterOrdnungsbegriffAbrechnungsunternehmen(null, nutzergruppenNummer, wohnungsNummer, nutzerfolge));
            Assert.Equal("liegenschaftsNummer", ex.ParamName);
        }

        [Fact]
        public void Ctor_ItemNullItemItem_ThrowsArgumentNullException()
        {
            var ex = Assert.Throws<ArgumentNullException>(
                () => new ErweiterterOrdnungsbegriffAbrechnungsunternehmen(liegenschaftsNummer, null, wohnungsNummer, nutzerfolge));
            Assert.Equal("nutzergruppenNummer", ex.ParamName);
        }

        [Fact]
        public void Ctor_ItemItemNullItem_ThrowsArgumentNullException()
        {
            var ex = Assert.Throws<ArgumentNullException>(
                () => new ErweiterterOrdnungsbegriffAbrechnungsunternehmen(liegenschaftsNummer, nutzergruppenNummer, null, nutzerfolge));
            Assert.Equal("wohnungsNummer", ex.ParamName);
        }

        [Fact]
        public void Ctor_ItemItemItemNull_ThrowsArgumentNullException()
        {
            var ex = Assert.Throws<ArgumentNullException>(
                () => new ErweiterterOrdnungsbegriffAbrechnungsunternehmen(liegenschaftsNummer, nutzergruppenNummer, wohnungsNummer, null));
            Assert.Equal("nutzerfolge", ex.ParamName);
        }

        #endregion

        #region FromString()

        [Fact]
        public void FromString_StringNull_ThrowsArgumentNullException()
        {
            var ex = Assert.Throws<ArgumentNullException>(() => ErweiterterOrdnungsbegriffAbrechnungsunternehmen.FromString(null));
            Assert.Equal("erweiterterOrdnungsbegriffAbrechnungsunternehmenString", ex.ParamName);
        }

        [Theory]
        [InlineData("")]
        [InlineData("00000000000000000")]
        [InlineData("0000000000000000000")]
        public void FromString_StringNotValid_ThrowsArgumentOutOfRangeException(string data)
        {
            var ex = Assert.Throws<ArgumentOutOfRangeException>(() => ErweiterterOrdnungsbegriffAbrechnungsunternehmen.FromString(data));
            Assert.Equal("erweiterterOrdnungsbegriffAbrechnungsunternehmenString", ex.ParamName);
        }

        [Fact]
        public void FromString_ValidString_ReturnsValidToString()
        {
            var validString = "000000001000100011";
            Assert.Equal(validString, ErweiterterOrdnungsbegriffAbrechnungsunternehmen.FromString(validString).ToString());
        }

        #endregion

        #region LiegenschaftsNummer

        [Fact]
        public void LiegenschaftsNummer_Get_ReturnsInstance()
        {
            Assert.Equal(liegenschaftsNummer, ordnungsbegriff.LiegenschaftsNummer);
        }

        #endregion

        #region NutzergruppenNummer

        [Fact]
        public void NutzergruppenNummer_Get_ReturnsInstance()
        {
            Assert.Equal(nutzergruppenNummer, ordnungsbegriff.NutzergruppenNummer);
        }

        #endregion

        #region WohnungsNummer

        [Fact]
        public void WohnungsNummer_Get_ReturnsInstance()
        {
            Assert.Equal(wohnungsNummer, ordnungsbegriff.WohnungsNummer);
        }

        #endregion

        #region WohnungsNummer

        [Fact]
        public void Nutzerfolge_Get_ReturnsInstance()
        {
            Assert.Equal(nutzerfolge, ordnungsbegriff.Nutzerfolge);
        }

        #endregion

        #region ToString()

        [Fact]
        public void ToString_ValuesSet1111_Returns000000001000100011()
        {
            Assert.Equal("000000001000100011", ordnungsbegriff.ToString());
        }

        #endregion
    }
}


text:
namespace AngleSharp.Css.Declarations
{
    using AngleSharp.Css.Dom;
    using System;
    using static ValueConverters;

    static class FlexWrapDeclaration
    {
        public static String Name = PropertyNames.FlexWrap;

        public static String[] Shorthands = new[]
        {
            PropertyNames.FlexFlow,
        };

        public static IValueConverter Converter = FlexWrapConverter;

        public static ICssValue InitialValue = InitialValues.FlexWrapDecl;

        public static PropertyFlags Flags = PropertyFlags.None;
    }
}


text:
package com.koushikdutta.ion;

enum ScaleMode {
    FitXY,
    CenterCrop,
    CenterInside
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<metadata:ruleset-metadata xmlns:metadata="http://www.ilog.com/products/xml/schemas/ruleset_metadata_1.0">
  <metadata:generation-date>2007-02-25T09:56:41Z</metadata:generation-date>

  <metadata:property-typing-declaration>
    <metadata:property>
      <metadata:name>priority</metadata:name>
      <metadata:type>java.lang.String</metadata:type>
    </metadata:property>
    <metadata:property>
      <metadata:name>effectiveDate</metadata:name>
      <metadata:type>java.util.Date</metadata:type>
    </metadata:property>
    <metadata:property>
      <metadata:name>expirationDate</metadata:name>
      <metadata:type>java.util.Date</metadata:type>
    </metadata:property>
    <metadata:property>
      <metadata:name>status</metadata:name>
      <metadata:type>java.lang.String</metadata:type>
    </metadata:property>
  </metadata:property-typing-declaration>
  </metadata:ruleset-metadata>


text:
Occasion.Modules.push(function(library) {
  library.Question = class Question extends library.Base {}

  library.Question.className = 'Question'
  library.Question.queryName = 'questions'

  library.Question.belongsTo('product')
  library.Question.hasMany('answers')
  library.Question.hasMany('options')
})


text:
<?php
/**
 * Ajax "diff" route, for rendering PO/POT file diffs
 */
class Loco_ajax_DiffController extends Loco_mvc_AjaxController {

    /**
     * {@inheritdoc}
     */
    public function render(){
        $post = $this->validate();

        // require x2 valid files for diffing
        if( ! $post->lhs || ! $post->rhs ){
            throw new InvalidArgumentException('Path parameters required');
        }

        $dir = loco_constant('WP_CONTENT_DIR');
        $lhs = new Loco_fs_File( $post->lhs ); $lhs->normalize($dir);
        $rhs = new Loco_fs_File( $post->rhs ); $rhs->normalize($dir);

        // avoid diffing non Gettext source files
        $exts = array_flip( array( 'pot', 'pot~', 'po', 'po~' ) );

        /* @var $file Loco_fs_File */
        foreach( array($lhs,$rhs) as $file ){
            if( ! $file->exists() ){
                throw new InvalidArgumentException('File paths must exist');
            }
            if( ! $file->underContentDirectory() ){
                throw new InvalidArgumentException('Files must be under '.basename($dir) );
            }
            $ext = $file->extension();
            if( ! isset($exts[$ext]) ){
                throw new InvalidArgumentException('Disallowed file extension');
            }
        }

        // OK to diff files as HTML table
        $renderer = new Loco_output_DiffRenderer;
        $emptysrc = $renderer->_startDiff().$renderer->_endDiff();
        $tablesrc = $renderer->renderFiles( $rhs, $lhs );

        if( $tablesrc === $emptysrc ){
            // translators: Where %s is a file name
            $message = __('Revisions are identical, you can delete %s','loco-translate');
            $this->set( 'error', sprintf( $message, $rhs->basename() ) );
        }
        else {
            $this->set( 'html', $tablesrc );
        }

        return parent::render();
    }

}


text:
export default function (node) {
  var result = ""
  if (node.raws && node.raws.before) {
    result += node.raws.before
  }
  result += node.toString()
  return result
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.android.apis.tests">

    <!-- We add an application tag here just so that we can indicate that
         this package needs to link against the android.test library,
         which is needed when building test cases. -->
    <application>
        <uses-library android:name="android.test.runner" />
    </application>

</manifest>