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

package com.google.api.services.classroom.model;

/**
 * Material attached to course work.
 *
 * When creating attachments, setting the `form` field is not supported.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Google Classroom API. For a detailed explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class Material extends com.google.api.client.json.GenericJson {

  /**
   * Google Drive file material.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private SharedDriveFile driveFile;

  /**
   * Google Forms material.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Form form;

  /**
   * Link material. On creation, will be upgraded to a more appropriate type if possible, and this
   * will be reflected in the response.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private Link link;

  /**
   * YouTube video material.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private YouTubeVideo youtubeVideo;

  /**
   * Google Drive file material.
   * @return value or {@code null} for none
   */
  public SharedDriveFile getDriveFile() {
    return driveFile;
  }

  /**
   * Google Drive file material.
   * @param driveFile driveFile or {@code null} for none
   */
  public Material setDriveFile(SharedDriveFile driveFile) {
    this.driveFile = driveFile;
    return this;
  }

  /**
   * Google Forms material.
   * @return value or {@code null} for none
   */
  public Form getForm() {
    return form;
  }

  /**
   * Google Forms material.
   * @param form form or {@code null} for none
   */
  public Material setForm(Form form) {
    this.form = form;
    return this;
  }

  /**
   * Link material. On creation, will be upgraded to a more appropriate type if possible, and this
   * will be reflected in the response.
   * @return value or {@code null} for none
   */
  public Link getLink() {
    return link;
  }

  /**
   * Link material. On creation, will be upgraded to a more appropriate type if possible, and this
   * will be reflected in the response.
   * @param link link or {@code null} for none
   */
  public Material setLink(Link link) {
    this.link = link;
    return this;
  }

  /**
   * YouTube video material.
   * @return value or {@code null} for none
   */
  public YouTubeVideo getYoutubeVideo() {
    return youtubeVideo;
  }

  /**
   * YouTube video material.
   * @param youtubeVideo youtubeVideo or {@code null} for none
   */
  public Material setYoutubeVideo(YouTubeVideo youtubeVideo) {
    this.youtubeVideo = youtubeVideo;
    return this;
  }

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

  @Override
  public Material clone() {
    return (Material) super.clone();
  }

}


text:
package com.streamsets.pipeline.stage.destination.mqtt;

import com.streamsets.pipeline.api.ErrorStage;
import com.streamsets.pipeline.api.ExecutionMode;
import com.streamsets.pipeline.api.GenerateResourceBundle;
import com.streamsets.pipeline.api.HideConfigs;
import com.streamsets.pipeline.api.HideStage;
import com.streamsets.pipeline.api.StageDef;
import com.streamsets.pipeline.api.Target;
import com.streamsets.pipeline.config.DataFormat;

@StageDef(
    version = 2,
    label = "Write to MQTT",
    description = "Writes error records to MQTT broker",
    icon = "mqtt.png",
    execution = {
        ExecutionMode.STANDALONE,
        ExecutionMode.CLUSTER_BATCH,
        ExecutionMode.CLUSTER_YARN_STREAMING,
        ExecutionMode.CLUSTER_MESOS_STREAMING,
        ExecutionMode.EDGE,
        ExecutionMode.EMR_BATCH

    },
    onlineHelpRefUrl ="index.html?contextID=concept_kgc_l4y_5r",
    upgrader = MqttClientTargetUpgrader.class
)
@HideConfigs(
    preconditions = true,
    onErrorRecord = true,
    value = {
        "commonConf.tlsConfig.keyStoreFilePath",
        "commonConf.tlsConfig.keyStoreType",
        "commonConf.tlsConfig.keyStorePassword",
        "commonConf.tlsConfig.keyStoreAlgorithm",
        "publisherConf.dataFormat"
    })
@ErrorStage
@HideStage(HideStage.Type.ERROR_STAGE)
@GenerateResourceBundle
public class ToErrorMqttClientDTarget extends MqttClientDTarget {
  @Override
  protected Target createTarget() {
    publisherConf.dataFormat = DataFormat.SDC_JSON;
    return new MqttClientTarget(commonConf, publisherConf);
  }
}

redpajama_set_name: RedPajamaGithub


text:
//
//  BLTestColletionVC.m
//  百思不得姐
//
//  Created by cyz on 16/11/26.
//  Copyright © 2016年 yuze. All rights reserved.
//

#import "BLTestColletionVC.h"
#import <ReactiveCocoa.h>
#import <Masonry.h>
#import "BLCollectionFlowLayout.h"
#import "YZWaterFlowLayout.h"
#import "YZCollectionCell.h"
#import "BLRefreshHeader.h"
#import "BLRefreshFooter.h"

#import "BLJinhuaALLModel.h"
#import "BLCommentVC.h"

#import "BLSeeBigImageVC.h" // 查看大图

@interface BLTestColletionVC ()<UICollectionViewDataSource, UICollectionViewDelegate, YZWaterFlowLayoutDelegate>

@property (nonatomic, strong) UICollectionView *colletionView;

@property (nonatomic, strong) NSMutableArray<list *> *dataList;

/**
 加载数据类型
 */
@property (nonatomic, copy) NSString *typeID;
/// 最后刷新时间
@property (nonatomic, copy) NSString *maxTime;

@end

@implementation BLTestColletionVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.

    [self.view addSubview:self.colletionView];
    [self.colletionView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.insets(UIEdgeInsetsZero);
    }];
    [self setupRefresh];
}

/**
 初始化刷新控件
 */
- (void)setupRefresh
{
    self.typeID = @"10";
    self.colletionView.mj_header = [BLRefreshHeader headerWithRefreshingTarget:self refreshingAction:@selector(loadNewData)];
    self.colletionView.mj_footer = [BLRefreshFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];
    [self.colletionView.mj_header beginRefreshing];
    self.colletionView.mj_footer.automaticallyHidden = YES;
}

/**
 加载最新数据
 */
- (void)loadNewData
{
    NSMutableDictionary *dic = [NSMutableDictionary dictionary];

//    dic[@"maxtime"] = self.maxTime;
    dic[@"type"] = self.typeID;
    __weak typeof(self) weakSelf = self;

    [BLJinhuaALLModel getEssenceModelWith:dic complection:^(BLJinhuaALLModel *ALLModel) {

        NSLog(@"加载数据完成ID=%@",ALLModel.list[0].ID);

        weakSelf.maxTime = ALLModel.info.maxtime; // 最后刷新时间
        weakSelf.dataList = ALLModel.list.mutableCopy;
        [weakSelf.colletionView reloadData];
        [weakSelf.colletionView.mj_header endRefreshing];

    } failure:^(NSError *error) {
        [weakSelf.colletionView.mj_header endRefreshing];
    }];

    NSLog(@"loadNewData");
}

/**
 加载更多数据
 */
- (void)loadMoreData
{
     NSLog(@"loadMoreData");
    NSMutableDictionary *dic = [NSMutableDictionary dictionary];

    dic[@"maxtime"] = self.maxTime;
    dic[@"type"] = self.typeID;
    __weak typeof(self) weakSelf = self;

    [BLJinhuaALLModel getEssenceModelWith:dic complection:^(BLJinhuaALLModel *ALLModel) {

        NSLog(@"加载数据完成ID=%@",ALLModel.list[0].ID);

        weakSelf.maxTime = ALLModel.info.maxtime; // 最后刷新时间
        [weakSelf.dataList addObjectsFromArray:ALLModel.list];
        [weakSelf.colletionView reloadData];
        [weakSelf.colletionView.mj_footer endRefreshing];
    } failure:^(NSError *error) {
        [weakSelf.colletionView.mj_footer endRefreshing];
    }];
}

/**
 请求新闻数据

 @param type         下拉刷新最新数据type=1,上拉刷新type=2
 @param allUrlString 请求数据的链接
 */
- (void)loadDataForType :(int)type withURL:(NSString *)allUrlString
{

}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
    return UIInterfaceOrientationMaskAll;
}
//- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
//{
//    return YES;
//}

- (BOOL)shouldAutorotate
{
//    NSLog(@"允许屏幕旋转");
    [self.colletionView reloadData];
    return YES;
}

/**
 初始化collectionView
 */
- (UICollectionView *)colletionView
{
    if (!_colletionView) {
        // 创建一个layou布局类
        YZWaterFlowLayout *layout = [[YZWaterFlowLayout alloc] init];

//        UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
        // 设置布局方向为垂直流布局
//        layout.scrollDirection = UICollectionViewScrollDirectionVertical;
        // 设置每一个item的大小为100*100
//        layout.itemSize = CGSizeMake(100, 100);
        // 创建引导页
//        layout.itemSize = [UIScreen mainScreen].bounds.size;
//        layout.minimumLineSpacing = 0;
//        layout.minimumInteritemSpacing = 0;
//        // 设置水平滚动
//        layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;

        _colletionView = [[UICollectionView alloc] initWithFrame:self.view.frame collectionViewLayout:layout];
//        _colletionView.pagingEnabled = YES;
//        _colletionView.showsHorizontalScrollIndicator = NO;
//        _colletionView.bounces = NO;

        // 创建colletionView通过一个布局策略layout来创建
        // 设置代理
        _colletionView.dataSource = self;
        _colletionView.delegate = self;
        layout.delegate = self;

        _colletionView.backgroundColor = [UIColor lightGrayColor];

        // 注册item类型这里使用系统的类型
        [_colletionView registerClass:[YZCollectionCell class] forCellWithReuseIdentifier:NSStringFromClass([YZCollectionCell class])];

    }
    return _colletionView;
}

//- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView
//{
//    return 3;
//}

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section
{
    return self.dataList.count;
}

- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
    YZCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([YZCollectionCell class]) forIndexPath:indexPath];
    list *model = self.dataList[indexPath.item];
    cell.model = model;

    __weak typeof(self) weakSelf = self;
    cell.buttonBlock = ^{
        BLSeeBigImageVC *imageVC = [[BLSeeBigImageVC alloc] init];
        imageVC.model = model;
        [weakSelf.navigationController pushViewController:imageVC animated:YES];
    };

    return cell;
}

- (CGFloat)waterflowLayout:(YZWaterFlowLayout *)waterflowLayout collectionView:(UICollectionView *)collectionView heightForItemAtIndexPath:(NSIndexPath *)indexPath itemWidth:(CGFloat)itemWidth
{
    list *model = self.dataList[indexPath.item];
    CGFloat height = itemWidth * [model.height floatValue] / [model.width floatValue];
//    return 30 + arc4random_uniform(200);
    return height;
}

- (CGFloat)rowMarginInWaterflowLayout:(YZWaterFlowLayout *)waterflowLayout
{
    return 10;
}

- (CGFloat)columnMarginInWaterflowLayout:(YZWaterFlowLayout *)waterflowLayout
{
    return 5;
}

- (CGFloat)columnCountInWaterflowLayout:(YZWaterFlowLayout *)waterflowLayout
{
    return 2;
}

- (UIEdgeInsets)edgeInsetsInWaterflowLayout:(YZWaterFlowLayout *)waterflowLayout
{
    return UIEdgeInsetsMake(5, 5, 10, 5);
}

- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
{
//    NSLog(@"选中的是%ld",indexPath.item);
//
//    YZCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([YZCollectionCell class]) forIndexPath:indexPath];
//    NSLog(@"cell=%@",cell);
    [self.navigationController pushViewController:[[BLCommentVC alloc] initWithCommentID:self.dataList[indexPath.row].ID] animated:YES];

}

- (void)dealloc
{
    NSLog(@"%s",__func__);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end


text:
import Vue from 'vue';
import specialKeys from '../special.keys';

function makeWatchDecorator(options){
  return function(target, key){
    if(!target[specialKeys.USED_PROPS]){
      target[specialKeys.USED_PROPS] = {};
    }

    if(!target[specialKeys.WATCHERS]){
      target[specialKeys.WATCHERS] = {};
    }

    if(!target[specialKeys.WATCHERS][options || key]){
      target[specialKeys.USED_PROPS][key] = true;
      target[specialKeys.WATCHERS][options || key] = target[key];
    }
  };
}

export function Watch(options, key, descriptor){
  if(options instanceof Vue){
    return makeWatchDecorator()(options, key);
  }

  return makeWatchDecorator(options);
}


text:
'use strict';

function processQueryParams() {
  const queryParams = new URL(window.location).searchParams;
  return {
    expectAccessAllowed: queryParams.get("allowed") != "false",
    topLevelDocument: queryParams.get("rootdocument") != "false",
    testPrefix: queryParams.get("testCase") || "top-level-context",
  };
}

function CreateFrameAndRunTests(setUpFrame) {
  const frame = document.createElement('iframe');
  const promise = new Promise((resolve, reject) => {
    frame.onload = resolve;
    frame.onerror = reject;
  });

  setUpFrame(frame);

  fetch_tests_from_window(frame.contentWindow);
  return promise;
}

function RunTestsInIFrame(sourceURL) {
  return CreateFrameAndRunTests((frame) => {
    frame.src = sourceURL;
    document.body.appendChild(frame);
  });
}

function RunTestsInNestedIFrame(sourceURL) {
  return CreateFrameAndRunTests((frame) => {
    document.body.appendChild(frame);
    frame.contentDocument.write(`
      <script src="/resources/testharness.js"></script>
      <script src="helpers.js"></script>
      <body>
      <script>
        RunTestsInIFrame("${sourceURL}");
      </script>
    `);
    frame.contentDocument.close();
  });
}

function RunRequestStorageAccessInDetachedFrame() {
  const frame = document.createElement('iframe');
  document.body.append(frame);
  const inner_doc = frame.contentDocument;
  frame.remove();
  return inner_doc.requestStorageAccess();
}

function RunRequestStorageAccessViaDomParser() {
  const parser = new DOMParser();
  const doc = parser.parseFromString('<html></html>', 'text/html');
  return doc.requestStorageAccess();
}

function RunCallbackWithGesture(callback) {
  return test_driver.bless('run callback with user gesture', callback);
}


text:
Small repo to show how to spec something in Cucumber (in this case the rules of I Ching). Suggested reading order is:

1. `casting.feature`
1. `scoring.feature`
1. `plotting.feature`
1. `changing.feature`

## Running Cucumber with Docker

This isn't a Web application, but to get running with Cucumber quickly you can use Docker:

1. Install Docker for your platform
2. Run `docker build -t i_ching .`
3. Run `docker run --rm i_ching cucumber`
4. After editing, run `docker build -t i_ching .` again before running Cucumber again

## Running Cucumber with RubyMine IDE

Follow the instructions at https://www.jetbrains.com/help/ruby/using-docker-as-a-remote-interpreter.html.

## Contributing to i_ching

1. Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
1. Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
1. Fork the project.
1. Start a feature/bugfix branch.
1. Commit and push until you are happy with your contribution.
1. Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
1. Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

## Copyright

Copyright (c) 2013--2016 Nigel Lowry. See LICENSE.txt for
further details.


text:
#import "NSObject-Protocol.h"

@protocol DVTTextAnnotationDelegate <NSObject>

@optional
- (void)annotation:(id)arg1 willDrawInTextSidebarView:(id)arg2 withAnnotationsInSameLine:(id)arg3;
- (BOOL)annotation:(id)arg1 shouldDrawInTextSidebarView:(id)arg2 withAnnotationsInSameLine:(id)arg3;
- (double)sidebarMarkerOpacityForAnnotation:(id)arg1;
- (BOOL)shouldMoveCursorForAnnotation:(id)arg1;
- (id)contextMenuItemsForAnnotation:(id)arg1 inTextSidebarView:(id)arg2;
- (void)didDeleteOrReplaceParagraphForAnnotation:(id)arg1;
- (void)didRemoveAnnotation:(id)arg1;
- (void)didMoveAnnotation:(id)arg1;
- (unsigned long long)annotation:(id)arg1 willMoveToParagraphNumber:(unsigned long long)arg2;
- (void)didDragAnnotation:(id)arg1 inTextSidebarView:(id)arg2 event:(id)arg3;
- (void)didEndRolloverOnAnnotation:(id)arg1 inTextSidebarView:(id)arg2 event:(id)arg3;
- (void)didBeginRolloverOnAnnotation:(id)arg1 inTextSidebarView:(id)arg2 event:(id)arg3;
- (void)didClickAnnotation:(id)arg1 inTextSidebarView:(id)arg2 event:(id)arg3;
@end


text:
<?xml version="1.0" encoding="UTF-8"?>
<tileset name="indoors_2.png" tilewidth="16" tileheight="16">
 <image source="areas/tiles/indoors_2.png" width="176" height="192"/>
</tileset>


text:
pub struct ClanStats {
	pub tag: String,
	pub name: String,
	pub color: String,
	pub members: usize,
	pub description: String,
	pub motto: String,
	pub id: String,
	pub emblems: ClanStatsEmblems,
	pub blocked: bool,
	pub stats: HistoryClanStats,
}

impl ClanStats {
	pub fn empty() -> Self {
		Self {
			tag: String::new(),
			name: String::new(),
			color: String::new(),
			members: 0,
			description: String::new(),
			motto: String::new(),
			id: String::new(),
			emblems: ClanStatsEmblems::empty(),
			blocked: true,
			stats: HistoryClanStats::empty(),
		}
	}
}

#[derive(Clone, Serialize)]
pub struct ClanStatsEmblems {
	pub x256_wowp: String,
	pub x195_portal: String,
	pub x64_portal: String,
	pub x64_wot: String,
	pub x32_portal: String,
	pub x24_portal: String,
}

impl ClanStatsEmblems {
	pub fn empty() -> Self {
		Self {
			x256_wowp: String::new(),
			x195_portal: String::new(),
			x64_portal: String::new(),
			x64_wot: String::new(),
			x32_portal: String::new(),
			x24_portal: String::new(),
		}
	}
}

// HistoryClanStats this is what to be exepected to get back per clan from the database when requesting old clan data
#[derive(Clone, Serialize)]
pub struct HistoryClanStats {
	pub tag: String,
	pub name: String,
	pub id: String,
	pub members: usize,
	pub battles: Option<f64>,
	pub daily_battles: Option<f64>,
	pub efficiency: Option<f64>,
	pub fb_elo10: Option<f64>,
	pub fb_elo8: Option<f64>,
	pub fb_elo6: Option<f64>,
	pub fb_elo: Option<f64>,
	pub gm_elo10: Option<f64>,
	pub gm_elo8: Option<f64>,
	pub gm_elo6: Option<f64>,
	pub gm_elo: Option<f64>,
	pub glob_rating: Option<f64>,
	pub glob_rating_weighted: Option<f64>,
	pub win_ratio: Option<f64>,
	pub v10l: Option<f64>,
}

impl HistoryClanStats {
	pub fn empty() -> Self {
		Self {
			tag: String::new(),
			name: String::new(),
			id: String::new(),
			members: 0,
			battles: None,
			daily_battles: None,
			efficiency: None,
			fb_elo10: None,
			fb_elo8: None,
			fb_elo6: None,
			fb_elo: None,
			gm_elo10: None,
			gm_elo8: None,
			gm_elo6: None,
			gm_elo: None,
			glob_rating: None,
			glob_rating_weighted: None,
			win_ratio: None,
			v10l: None,
		}
	}
}

// HistoryCollectionItem is what the contens is of 1 hisotry colleciton item
#[derive(Clone, Serialize)]
pub struct HistoryCollectionItem {
	pub date: String,
	pub stats: Vec<HistoryClanStats>,
}

// User defines what a user is
#[derive(Clone, Serialize)]
pub struct User {
	pub rights: String,
	pub userid: isize,
	pub nickname: String,
}

// ClanPositionEvery this shows the clan possition in all type stats
#[derive(Clone, Serialize)]
pub struct ClanPositionEvery {
	pub v10l: u32,
	pub winratio: u32,
	pub global_weighted: u32,
	pub global: u32,
	pub gm_elo: u32,
	pub gm_elo6: u32,
	pub gm_elo8: u32,
	pub gm_elo10: u32,
	pub fb_elo: u32,
	pub fb_elo6: u32,
	pub fb_elo8: u32,
	pub fb_elo10: u32,
	pub efficiency: u32,
	pub daily_battles: u32,
	pub battles: u32,
	pub members: u32,
}

impl ClanPositionEvery {
	pub fn empty() -> Self {
		Self {
			v10l: 0,
			winratio: 0,
			global_weighted: 0,
			global: 0,
			gm_elo: 0,
			gm_elo6: 0,
			gm_elo8: 0,
			gm_elo10: 0,
			fb_elo: 0,
			fb_elo6: 0,
			fb_elo8: 0,
			fb_elo10: 0,
			efficiency: 0,
			daily_battles: 0,
			battles: 0,
			members: 0,
		}
	}
}

// ClanNameAndTag is a type that has the tag, name and id of a clan
#[derive(Clone, Serialize)]
pub struct ClanNameAndTag {
	pub tag: String,
	pub name: String,
}


text:
package edu.ucdenver.ccp.datasource.fileparsers.snomed;

import java.io.File;
import java.io.IOException;

import org.apache.log4j.Logger;

import edu.ucdenver.ccp.common.file.CharacterEncoding;
import edu.ucdenver.ccp.common.file.reader.Line;
import edu.ucdenver.ccp.common.string.RegExPatterns;
import edu.ucdenver.ccp.datasource.fileparsers.SingleLineFileRecordReader;
import edu.ucdenver.ccp.datasource.fileparsers.snomed.SnomedRf2DescriptionFileRecord.DescriptionType;

public class SnomedRf2DescriptionFileRecordReader extends SingleLineFileRecordReader<SnomedRf2DescriptionFileRecord> {

	private static final Logger logger = Logger.getLogger(SnomedRf2DescriptionFileRecordReader.class);
	private static final String HEADER = "id\teffectiveTime\tactive\tmoduleId\tconceptId\tlanguageCode\ttypeId\tterm\tcaseSignificanceId";

	public static final CharacterEncoding ENCODING = CharacterEncoding.UTF_8;
	public static final String SKIP_LINE_PREFIX = null;

	public SnomedRf2DescriptionFileRecordReader(File file) throws IOException {
		super(file, ENCODING, SKIP_LINE_PREFIX);
	}

	@Override
	protected String getFileHeader() throws IOException {
		return readLine().getText();
	}

	@Override
	protected String getExpectedFileHeader() throws IOException {
		return HEADER;
	}

	@Override
	protected SnomedRf2DescriptionFileRecord parseRecordFromLine(Line line) {
		return parseSnomedRf2DescriptionFileLine(line);
	}

	/**
	 * @param line
	 * @return
	 */
	private SnomedRf2DescriptionFileRecord parseSnomedRf2DescriptionFileLine(Line line) {
		int index = 0;
		String[] columns = line.getText().split(RegExPatterns.TAB, -1);
		if (columns.length != 9) {
			logger.warn("Unexpected number of columns observed. Expected 9 but was " + columns.length + " on line: "
					+ line.getText());
			return null;
		}

		String descriptionId = columns[index++];
		String effectiveTime = columns[index++];
		boolean isActive = (columns[index++].equals("1")) ? true : false;
		String moduleId = columns[index++];
		String conceptId = columns[index++];
		String languageCode = columns[index++];
		DescriptionType type = DescriptionType.getType(columns[index++]);
		String term = columns[index++];
		String caseSignificanceId = columns[index++];

		return new SnomedRf2DescriptionFileRecord(descriptionId, effectiveTime, isActive, moduleId, conceptId,
				languageCode, type, term, caseSignificanceId, line.getByteOffset(), line.getLineNumber());
	}

}


text:
import { dirname, extname } from 'path';
import { existsSync, readFileSync } from 'fs';

const FileLoader = Jymfony.Component.Config.Loader.FileLoader;
const FileResource = Jymfony.Component.Config.Resource.FileResource;
const Route = Jymfony.Component.Routing.Route;
const RouteCollection = Jymfony.Component.Routing.RouteCollection;

const availableKeys = [
    'resource', 'type', 'prefix', 'path',
    'host', 'schemes', 'methods', 'defaults',
    'requirements', 'options', 'condition',
    'controller', 'name_prefix', 'trailing_slash_on_root',
    'locale', 'format',
];

/**
 * JsonFileLoader loads JSON routing files.
 *
 * @memberOf Jymfony.Component.Routing.Loader
 */
export default class JsonFileLoader extends FileLoader {
    /**
     * Loads a JSON file.
     *
     * @param {string} file A JSON file path
     *
     * @returns {Jymfony.Component.Routing.RouteCollection} A RouteCollection instance
     *
     * @throws {InvalidArgumentException} When a route can't be parsed because JSON is invalid
     */
    load(file) {
        const path = this._locator.locate(file);
        if (! existsSync(path)) {
            throw new InvalidArgumentException(__jymfony.sprintf('File "%s" not found.', path));
        }

        const content = readFileSync(path).toString('utf-8');

        let parsedConfig;
        try {
            parsedConfig = content ? JSON.parse(content) : null;
        } catch (e) {
            throw new InvalidArgumentException(__jymfony.sprintf('The file "%s" does not contain valid JSON.', path), 0, e);
        }

        return this._doLoad(parsedConfig, path, file);
    }

    /**
     * @inheritdoc
     */
    supports(resource, type = null) {
        if (! isString(resource)) {
            return false;
        }

        if (null === type && '.json' === extname(resource)) {
            return true;
        }

        return 'json' === type;
    }

    /**
     * Loads a parsed configuration.
     *
     * @param {*} parsedConfig
     * @param {string} path
     * @param {string} file
     *
     * @returns {Jymfony.Component.Routing.RouteCollection}
     *
     * @protected
     */
    _doLoad(parsedConfig, path, file) {
        const collection = new RouteCollection();
        collection.addResource(new FileResource(path));

        // Empty file
        if (null === parsedConfig) {
            return collection;
        }

        // Not an array
        if (! isObjectLiteral(parsedConfig)) {
            throw new InvalidArgumentException(__jymfony.sprintf('The file "%s" must contain a JSON object.', path));
        }

        for (const [ name, config ] of __jymfony.getEntries(parsedConfig)) {
            this._validate(config, name, path);

            if (undefined !== config.resource) {
                this._parseImport(collection, config, path, file);
            } else {
                this._parseRoute(collection, name, config);
            }
        }

        return collection;
    }

    /**
     * Parses a route and adds it to the RouteCollection.
     *
     * @param {Jymfony.Component.Routing.RouteCollection} collection A RouteCollection instance
     * @param {string} name Route name
     * @param {*} config Route definition
     *
     * @protected
     */
    _parseRoute(collection, name, config) {
        const defaults = config.defaults || {};
        const requirements = config.requirements;
        const options = config.options;
        const host = config.host;
        const schemes = config.schemes;
        const methods = config.methods;

        if (undefined !== config.controller) {
            defaults._controller = config.controller;
        }
        if (undefined !== config.locale) {
            defaults._locale = config.locale;
        }
        if (undefined !== config.format) {
            defaults._format = config.format;
        }

        if (isObjectLiteral(config.path)) {
            const route = new Route('', defaults, requirements, options, host, schemes, methods);

            for (const [ locale, path ] of __jymfony.getEntries(config.path)) {
                const localizedRoute = __jymfony.clone(route);
                localizedRoute.setDefault('_locale', locale);
                localizedRoute.setDefault('_canonical_route', name);
                localizedRoute.setPath(path);
                collection.add(name + '.' + locale, localizedRoute);
            }
        } else {
            const route = new Route(config.path, defaults, requirements, options, host, schemes, methods);
            collection.add(name, route);
        }
    }

    /**
     * Parses an import and adds the routes in the resource to the RouteCollection.
     *
     * @param {Jymfony.Component.Routing.RouteCollection} collection A RouteCollection instance
     * @param {*} config Route definition
     * @param {string} path Full path of the file being processed
     * @param {string} file Loaded file name
     *
     * @protected
     */
    _parseImport(collection, config, path, file) {
        const type = config.type || null;
        const prefix = undefined !== config.prefix ? config.prefix : '';
        const defaults = config.defaults || {};
        const requirements = config.requirements || {};
        const options = config.options || {};
        const host = config.host;
        const schemes = config.schemes ? config.schemes : null;
        const methods = config.methods;

        const trailingSlashOnRoot = undefined !== config.trailing_slash_on_root ? config.trailing_slash_on_root : true;

        if (undefined !== config.controller) {
            defaults._controller = config.controller;
        }
        if (undefined !== config.locale) {
            defaults._locale = config.locale;
        }
        if (undefined !== config.format) {
            defaults._format = config.format;
        }

        this.currentDir = dirname(path);
        let imported = this.importResource(config.resource, type, false, file);

        if (! isArray(imported)) {
            imported = [ imported ];
        }

        for (const subCollection of imported) {
            if (! isObjectLiteral(prefix)) {
                subCollection.addPrefix(prefix);
                if (! trailingSlashOnRoot) {
                    const rootPath = (new Route(__jymfony.trim(__jymfony.trim(prefix), '/') + '/')).path;
                    for (const route of Object.values(subCollection.all())) {
                        if (route.path === rootPath) {
                            route.setPath(__jymfony.rtrim(rootPath, '/'));
                        }
                    }
                }
            } else {
                for (const [ locale, localePrefix ] of __jymfony.getEntries(prefix)) {
                    prefix[locale] = __jymfony.trim(__jymfony.trim(localePrefix), '/');
                }

                for (const [ name, route ] of __jymfony.getEntries(subCollection.all())) {
                    const locale = route.getDefault('_locale');
                    if (undefined === locale) {
                        subCollection.remove(name);
                        for (const [ locale, localePrefix ] of __jymfony.getEntries(prefix)) {
                            const localizedRoute = __jymfony.clone(route);
                            localizedRoute.setDefault('_locale', locale);
                            localizedRoute.setDefault('_canonical_route', name);
                            localizedRoute.setPath(localePrefix + (! trailingSlashOnRoot && '/' === route.path ? '' : route.path));
                            subCollection.add(name + '.' + locale, localizedRoute);
                        }
                    } else if (undefined === prefix[locale]) {
                        throw new InvalidArgumentException(__jymfony.sprintf('Route "%s" with locale "%s" is missing a corresponding prefix when imported in "%s".', name, locale, file));
                    } else {
                        route.setPath(prefix[locale] + (! trailingSlashOnRoot && '/' === route.path ? '' : route.path));
                        subCollection.add(name, route);
                    }
                }
            }

            if (null !== host) {
                subCollection.addHost(host);
            }
            if (null !== schemes) {
                subCollection.setSchemes(schemes);
            }
            if (undefined !== methods) {
                subCollection.setMethods(methods);
            }

            subCollection.addDefaults(defaults);
            subCollection.addRequirements(requirements);
            subCollection.addOptions(options);

            if (undefined !== config.name_prefix) {
                subCollection.addNamePrefix(config.name_prefix);
            }

            collection.addCollection(subCollection);
        }
    }

    /**
     * Validates the route configuration.
     *
     * @param {*} config A resource config
     * @param {string} name The config key
     * @param {string} path The loaded file path
     *
     * @throws {InvalidArgumentException} If one of the provided config keys is not supported,
     *                                    something is missing or the combination is nonsense
     *
     * @private
     */
    _validate(config, name, path) {
        if (! isObjectLiteral(config)) {
            throw new InvalidArgumentException(__jymfony.sprintf('The definition of "%s" in "%s" must be an object.', name, path));
        }

        const extraKeys = Object.keys(config).filter(k => ! availableKeys.includes(k));
        if (0 !== extraKeys.length) {
            throw new InvalidArgumentException(__jymfony.sprintf('The routing file "%s" contains unsupported keys for "%s": "%s". Expected one of: "%s".', path, name, extraKeys.join('", "'), availableKeys.join('", "')));
        }

        if (undefined !== config.resource && undefined !== config.path) {
            throw new InvalidArgumentException(__jymfony.sprintf('The routing file "%s" must not specify both the "resource" key and the "path" key for "%s". Choose between an import and a route definition.', path, name));
        }

        if (undefined === config.resource && undefined !== config.type) {
            throw new InvalidArgumentException(__jymfony.sprintf('The "type" key for the route definition "%s" in "%s" is unsupported. It is only available for imports in combination with the "resource" key.', name, path));
        }

        if (undefined === config.resource && undefined === config.path) {
            throw new InvalidArgumentException(__jymfony.sprintf('You must define a "path" for the route "%s" in file "%s".', name, path));
        }

        if (undefined !== config.controller && undefined !== config.defaults && undefined !== config.defaults._controller) {
            throw new InvalidArgumentException(__jymfony.sprintf('The routing file "%s" must not specify both the "controller" key and the defaults key "_controller" for "%s".', path, name));
        }
    }
}


text:
<?php

namespace spec\Al\ResourceManagement\Domain\Event;

use Al\ResourceManagement\Domain\Event\EmployeeHired;
use PhpSpec\ObjectBehavior;
use SimpleBus\Message\Name\NamedMessage;

class EmployeeHiredSpec extends ObjectBehavior
{
    function let()
    {
        $this->beConstructedWith('employee-id', 'name', 'position');
    }

    function it_is_initializable()
    {
        $this->shouldHaveType(EmployeeHired::class);
    }

    function it_is_a_named_message()
    {
        $this->shouldImplement(NamedMessage::class);
    }

    function it_has_a_name()
    {
        $this::messageName()->shouldReturn('employee_hired');
    }

    function it_has_a_employee_id()
    {
        $this->getEmployeeId()->shouldReturn('employee-id');
    }

    function it_has_a_employee_name()
    {
        $this->getEmployeeName()->shouldReturn('name');
    }

    function it_has_a_employee_position()
    {
        $this->getEmployeePosition()->shouldReturn('position');
    }
}


text:
package mil.nga.giat.geowave.cli.osm;

import com.google.common.io.BaseEncoding;

import mil.nga.giat.geowave.cli.osm.accumulo.osmschema.Schema;

import org.junit.Assert;
import org.junit.Test;

import static org.junit.Assert.*;

public class ColumnQualifierTest
{

	@Test(expected = NullPointerException.class)
	public void TAG_QUALIFIER_NULL()
			throws Exception {
		byte[] bytes = Schema.CQ.TAG_QUALIFIER(null);
		if (bytes != null) {
			Assert.fail("returned non null value back; execution path should never be seen");
		}
	}

	@Test
	public void TAG_QUALIFIER_TOBYTE()
			throws Exception {
		byte[] bytes = Schema.CQ.TAG_QUALIFIER("フォースを使え ルーク");
		byte[] bytes2 = BaseEncoding.base64().decode(
				"44OV44Kp44O844K544KS5L2/44GI44CA44Or44O844Kv");
		Assert.assertArrayEquals(
				bytes,
				bytes2);
	}
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Eesti NSV Tead. Akad. Toim. , Biol. seer 2: 118 (1961)

#### Original name
Leptoporus simanii Pilát, 1938

### Remarks
null