text:
<?php

function makeIndex($data, $field) {
	include('fieldList.php');
	$index = '';

	if(in_array($field, $normalFields)) {
		$collect = collectIDs($data, $field);
	}
	elseif($field == 'beacon') {
		$collect = collectIDsBeacon($data);
	}
	elseif($field == 'persName') {
		$collect = collectIDsPersons($data);
	}
	elseif($field == 'placeName') {
		$collect = collectIDsPlaces($data);
	}
	elseif(in_array($field, $personFields)) {
		$collect = collectIDsSubObjects($data, 'persons', $field);
	}
	elseif(in_array($field, $placeFields)) {
		$collect = collectIDsSubObjects($data, 'places', $field);
	}
	elseif(in_array($field, $manifestationFields)) {
		$collect = collectIDsAssocArrayValues($data, 'manifestation', $field);
	}
	elseif(in_array($field, $workFields)) {
		$collect = collectIDsAssocArrayValues($data, 'work', $field);
	}
	elseif(in_array($field, $originalItemFields)) {
		$collect = collectIDsAssocArrayValues($data, 'originalItem', $field);
	}
	elseif(in_array($field, $arrayFields)) {
		$collect = collectIDsArrayValues($data, $field);
	}

	if($field == 'histSubject') {
		$index = makeEntries($collect, $field);
	}
	elseif(isset($collect)) {
		$collect = sortCollect($collect);
		$index = makeEntries($collect, $field);
	}
	elseif($field == 'catSubjectFormat') {
		$collect1 = collectIDs($data, 'histSubject');
		$index1 = makeEntries($collect1);
		unset($collect1);
		$collect2 = collectIDs($data, 'format');
		$index2 = makeEntries($collect2);
		unset($collect2);
		$index = mergeIndices($index1, $index2);
	}

	foreach($index as $entry) {
		$entry->label = postprocessFields($field, $entry->label);
	}

	return($index);
}

function makeEntries($collect, $field = '') {
	$collectLoop = $collect['collect'];
	$index = array();
	foreach($collectLoop as $value => $IDs) {
		$entry = new indexEntry();
		// Prüfen, ob Personennamen in einem eigenen Array hinterlegt wurden (Funktion collectIDsPersons)
		if(isset($collect['concordanceGND'])) {
			$entry->label = $collect['concordanceGND'][$value];
			if(preg_match('~[0-9X]{9}~', $value)) {
				$entry->authority['system'] = 'gnd';
				$entry->authority['id'] = strval($value);
			}
		}
		else {
			$entry->label = $value;
		}
		// Bei Facettierung nach Personen oder Jahren wird der Anzeigelevel auf 2 gesetzt (Standard 1) und damit die Anzeige der einzelnen Personen oder Jahre im Inhaltsverzeichnis unterdrückt
		if($field == 'persName') {
			$entry->level = 2;
		}
		elseif($field == 'year' and $value != 9999) {
			$entry->level = 2;
		}
		elseif($field == 'id' or $field == 'numberCat') {
			$entry->level = 0;
		}
		// Prüfen, ob eine Konkordanz der Place-Objekte übergeben wurde
		if(isset($collect['placeObjects'])) {
			$placeObject = $collect['placeObjects'][$value];
			$entry->geoData = $placeObject->geoData;
			if($placeObject->geoNames) {
				$entry->authority['system'] = 'geoNames';
				$entry->authority['id'] = $placeObject->geoNames;
			}
			elseif($placeObject->getty) {
				$entry->authority['system'] = 'getty';
				$entry->authority['id'] = $placeObject->getty;
			}
			elseif($placeObject->gnd) {
				$entry->authority['system'] = 'gnd';
				$entry->authority['id'] = $placeObject->gnd;
			}
		}
		$entry->content = $IDs;
		$index[] = $entry;
	}
	return($index);
}

function mergeIndices($index1, $index2) {
	$commonIndex = array();
	foreach($index1 as $entry1) {
		$higherEntry = new indexEntry();
		$higherEntry->label = $entry1->label;
		$higherEntry->authority = $entry1->authority;
		$higherEntry->geoData = $entry1->geoData;
		$commonIndex[] = $higherEntry;
		foreach($index2 as $entry2) {
			$intersection = array_intersect($entry1->content, $entry2->content);
			if($intersection) {
				$lowerEntry = new indexEntry();
				$lowerEntry->level = 2;
				$lowerEntry->label = $entry2->label;
				$lowerEntry->authority = $entry2->authority;
				$lowerEntry->geoData = $entry2->geoData;
				$lowerEntry->content = $intersection;
				$commonIndex[] = $lowerEntry;
			}
		}
	}
	return($commonIndex);
}

function collectIDs($data, $field) {
	$collect = array();
	$count = 0;
	foreach($data as $item) {
		$key = preprocessFields($field, $item->$field, $item);
		if(array_key_exists($key, $collect) == FALSE) {
			$collect[$key] = array();
		}
		$collect[$key][] = $count;
		$count ++;
	}
	$return = array('collect' => $collect);
	return($return);
}

function collectIDsArrayValues($data, $field) {
	$collect = array();
	$count = 0;
	foreach($data as $item) {
		foreach($item->$field as $key) {
			$key = preprocessFields($field, $key, $item);
			if(array_key_exists($key, $collect) == FALSE) {
				$collect[$key] = array();
			}
			$collect[$key][] = $count;
		}
		$count ++;
	}
	$return = array('collect' => $collect);
	return($return);
}

function collectIDsAssocArrayValues($data, $field, $subfield) {
	$collect = array();
	$count = 0;
	foreach($data as $item) {
		// Der folgende Umweg wird nötig, weil $item->$field[$subfield] eine Fehlermeldung produziert.
		$keyArray = $item->$field;
		$index = $subfield;
		$key = $keyArray[$subfield];
		$key = preprocessFields($subfield, $key, $item);
		if(array_key_exists($key, $collect) == FALSE) {
			$collect[$key] = array();
		}
		$collect[$key][] = $count;
		$count ++;
	}
	$return = array('collect' => $collect);
	return($return);
}

function collectIDsSubObjects($data, $field, $subField) {
	$collect = array();
	$count = 0;
	foreach($data as $item) {
		foreach($item->$field as $subItem) {
			$key = preprocessFields($subField, $subItem->$subField, $item);
			if(array_key_exists($key, $collect) == FALSE) {
				$collect[$key] = array();
			}
			$collect[$key][] = $count;
		}
	$count ++;
	}
	$return = array('collect' => $collect);
	return($return);
}

function collectIDsBeacon($data) {
    $beaconSources = $_SESSION['beaconRepository']->beacon_sources;
	$collect = array();
	$count = 0;
	foreach($data as $item) {
		foreach($item->persons as $person) {
			foreach($person->beacon as $beacon) {
				$key = $beaconSources[$beacon]['label'];
				if(array_key_exists($key, $collect) == FALSE) {
					$collect[$key] = array();
				}
				$collect[$key][] = $count;
			}
		}
	$count ++;
	}
	$return = array('collect' => $collect);
	return($return);
}

function collectIDsPersons($data) {
	$collectGND = array();
	$collectName = array();
	$count = 0;
	foreach($data as $item) {
		$gnds = array();
		foreach($item->persons as $person) {
			$key = $person->gnd;
			$name = preprocessFields('persName', $person->persName, $item);
			if($key == '') {
					$key = $name;
			}
			if(array_key_exists($key, $collectGND) == FALSE) {
				$collectGND[$key] = array();
				$collectName[$key] = $name;
			}
			if (in_array($key, $gnds) == FALSE) {
				$collectGND[$key][] = $count;
				$gnds[] = $key;
			}
		}
		$count++;
	}
	$return = array('collect' => $collectGND, 'concordanceGND' => $collectName);
	return($return);
}

function collectIDsPlaces($data) {
	$collectPlaceName = array();
	$collectGeoData = array();
	$collectPlaceObjects = array();
	$count = 0;
	foreach($data as $item) {
		foreach($item->places as $place) {
			$key = preprocessFields('placeName', $place->placeName, $item);
			if(array_key_exists($key, $collectPlaceName) == FALSE) {
				$collectPlaceName[$key] = array();
				$collectGeoData[$key] = $place->geoData;
				$collectPlaceObjects[$key] = $place;
			}
			$collectPlaceName[$key][] = $count;
		}
	$count++;
	}
	$return = array('collect' => $collectPlaceName, 'placeObjects' => $collectPlaceObjects);
	return($return);
}

function preprocessFields($field, $value, $item) {
	$value = trim($value, '[]');
	if($field == 'persName') {
		$value = removeSpecial($value);
		$value = replaceArrowBrackets($value);
	}
	elseif($field == 'placeName') {
		$value = trim($value, '[]');
		$test = preg_match('~[oOsS][\. ]?[OlL]|[oO]hne Ort|[sS]ine [lL]oco|[oO]hne Druckort|[oO]hne Angabe~', $value);
		if($value == '' or $test == 1) {
			$value = 's. l.';
		}
	}
	elseif($field == 'publisher') {
		$value = trim($value, '[]');
		$test = preg_match('~[sSoO]\.? ?[nN]\.?|ohne Angabe|unbekannt|ohne Namen~', $value);
		if($value == '' or $test == 1) {
			$value = 's. n.';
		}
	}
	elseif($field == 'year') {
		$value = normalizeYear($value);
		if($value == '') {
			$value = getYearFromTitle($item->titleCat);
		}
		if($value == '') {
			$value = 9999; // Makes empty year fields be sorted to the end
		}
	}
	elseif($field == 'format') {
		$value = sortingFormat($value);
		if($value == '') {
			$value = 'ohne Angabe';
		}
	}
	elseif($field == 'titleWork') {
		if($value == '') {
			$value = 'ohne Werktitel';
		}
	}
	elseif($value == '') {
		$value = 'ohne Kategorie';
	}
	return($value);
}

function postprocessFields($field, $value) {
	/* Ist nicht ideal, weil auch label vom Typ histSubject erfasst werden, aber vermutl.
	keine praktische Auswirkung, weil die Ersetzungsfunktion sehr eng gefasst ist. */
	if($field == ('format' or 'catSubjectFormat')) {
		$value = reverseSortingFormat($value);
	}
	if($field == 'languages') {
		if($value == '' or $value == 'ohne Kategorie') {
			$value = 'ohne Angabe';
		}
		else {
			include('languageCodes.php');
			$value = $languageCodes[$value];
		}
	}
	if($field == 'gender') {
		$value = translateGenderAbbr($value);
		if($value == '') {
			$value = 'ohne Angabe';
		}
	}
	if($field == 'year') {
		if($value == 9999) {
			$value = 'ohne Jahr';
		}
	}
	return($value);
}

function sortCollect($collect) {
	if(isset($collect['concordanceGND'])) {
		$sortingConcordance = array_flip($collect['concordanceGND']);
		ksort($sortingConcordance, SORT_STRING | SORT_FLAG_CASE);
		$new = array();
		foreach($sortingConcordance as $name => $gnd) {
			$new[$gnd] = $collect['collect'][$gnd];
		}
		$collect['collect'] = $new;
	}
	else {
		ksort($collect['collect'], SORT_STRING | SORT_FLAG_CASE);
	}
	$collect['collect'] = postponeVoid($collect['collect']);
	return($collect);
}

/* The function puts all "void" categories to the end of the array that contains labels and indices. "ohne Jahr" does not appear, because it is treated by the functions preprocessFields and postprocessFields  */
function postponeVoid($collect) {
	$voidTerms = array('ohne Kategorie', 's. n.', 's. l.', 'Unbestimmbare Sprache', 'ohne Werktitel');
	foreach($collect as $key => $value) {
		$test1 = in_array($key, $voidTerms);
		if($test1) {
			if(isset($voidKey)) {
				echo 'Fehler: Mehr als ein leeres Feld in dem Index, der mit '.$collect[0].' beginnt.';
			}
			else {
				$voidKey = $key;
				$voidValue = $value;
			}
		}
	}
	if(isset($voidKey)) {
		unset($collect[$voidKey]);
		$collect[$voidKey] = $voidValue;
	}
	return($collect);
}

function normalizeYear($year) {
	if(preg_match('~([12][0-9][0-9][0-9])[-– ]{1,3}([12][0-9][0-9][0-9])~', $year, $treffer)) {
		$yearAssign = intval(($treffer[1] + $treffer[2]) / 2);
	}
	elseif(preg_match('~[12][0-9][0-9][0-9]~', $year, $treffer)) {
		$yearAssign = $treffer[0];
	}
	else {
		$yearAssign = '';
	}
	return($yearAssign);
}

function getYearFromTitle($title) {
	$yearAssign = '';
	if(preg_match('~ ([12][0-9][0-9][0-9])$| ([12][0-9][0-9][0-9])[^0-9]~', $title, $treffer)) {
		if(isset($treffer[2])) {
			$yearAssign = $treffer[2];
		}
		elseif(isset($treffer[1])) {
			$yearAssign = $treffer[1];
		}
	}
	return($yearAssign);
}

?>


text:
package org.wildfly.swarm.topology.webapp;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.msc.service.ServiceController;
import org.jboss.msc.service.ServiceName;
import org.jboss.msc.service.ServiceRegistry;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.swarm.Swarm;
import org.wildfly.swarm.arquillian.CreateSwarm;
import org.wildfly.swarm.spi.api.JARArchive;
import org.wildfly.swarm.topology.jgroups.JGroupsTopologyFraction;

import static org.junit.Assert.assertNotNull;

/**
 * @author Lance Ball
 * @author Ken Finnigan
 */
@RunWith(Arquillian.class)
public class TopologyWebAppArquillianTest {

    @Deployment
    public static Archive createDeployment() {
        JARArchive deployment = ShrinkWrap.create(JARArchive.class);
        deployment.add(EmptyAsset.INSTANCE, "nothing");
        return deployment;
    }

    @CreateSwarm
    public static Swarm newContainer() throws Exception {
        TopologyWebAppFraction topology = new TopologyWebAppFraction();
        topology.proxyService("myService", "/my-proxy");

        return new Swarm()
                .fraction(topology)
                .fraction(new JGroupsTopologyFraction());
    }

    @ArquillianResource
    private ServiceRegistry registry;

    @Test
    public void testTopologyProxyHandlerPresence() throws Exception {
        ServiceController<?> proxyService = registry.getService(ServiceName.parse("swarm.topology.proxy"));
        assertNotNull("TopologyProxyService is not available in service registry", proxyService);

        ServiceController<?> proxyHandler = registry
                .getService(ServiceName.parse("jboss.undertow.handler.myService-proxy-handler"));
        assertNotNull("`myService` Undertow handler is not available in service registry", proxyHandler);
    }
}

redpajama_set_name: RedPajamaGithub


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.beecavegames</groupId>
	<artifactId>server-core</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<dependencies>
			<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>1.16.8</version>
		</dependency>

			<dependency>
			<groupId>commons-configuration</groupId>
			<artifactId>commons-configuration</artifactId>
			<version>1.10</version>
		</dependency>
		<dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
			<version>1</version>
		</dependency>

		<dependency>
			<groupId>com.beecavegames</groupId>
			<artifactId>eris</artifactId>
			<version>1.0.2</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-collections4</artifactId>
			<version>4.1</version>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.3</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>


text:
//#include "stdafx.h"
#include "NFWorldNet_ServerPlugin.h"
#include "NFCWorldNet_ServerModule.h"

//
//
#ifdef NF_DYNAMIC_PLUGIN

NF_EXPORT void DllStartPlugin(NFIPluginManager* pm)
{
    CREATE_PLUGIN(pm, NFWorldNet_ServerPlugin)

};

NF_EXPORT void DllStopPlugin(NFIPluginManager* pm)
{
    DESTROY_PLUGIN(pm, NFWorldNet_ServerPlugin)
};

#endif
//////////////////////////////////////////////////////////////////////////

const int NFWorldNet_ServerPlugin::GetPluginVersion()
{
    return 0;
}

const std::string NFWorldNet_ServerPlugin::GetPluginName()
{
    return GET_CLASS_NAME(NFWorldNet_ServerPlugin)
}

void NFWorldNet_ServerPlugin::Install()
{
    REGISTER_MODULE(pPluginManager, NFCWorldNet_ServerModule)
}

void NFWorldNet_ServerPlugin::Uninstall()
{
    UNREGISTER_MODULE(pPluginManager, NFCWorldNet_ServerModule)
}


text:
/* eslint-env es6, node */
/* eslint-disable no-console */

'use strict';

const del = require('del');
const gulp = require('gulp');
const gulpif = require('gulp-if');
const htmlmin = require('gulp-htmlmin');
const imagemin = require('gulp-imagemin');
const jsonmin = require('gulp-jsonmin');
const mergeStream = require('merge-stream');
const polymerBuild = require('polymer-build');
const replace = require('gulp-replace');
const uglify = require('gulp-uglify');

const environment = process.env.NODE_ENV || 'development';
const swPrecacheConfig = require('./sw-precache-config.js');
const polymerJson = require('./polymer.json');
const polymerProject = new polymerBuild.PolymerProject(polymerJson);
const buildDirectory = 'build';

const settings = {
  authDomain: {
    develop: 'gdg-es-develop.firebaseapp.com',
    production: 'gdg-es.firebaseapp.com'
  },
  databaseUrl: {
    develop: 'https://gdg-es-develop.firebaseio.com',
    production: 'https://gdg-es.firebaseio.com'
  }
};

/**
 * Waits for the given ReadableStream.
 */
function waitFor(stream) {
  return new Promise((resolve, reject) => {
    stream.on('end', resolve);
    stream.on('error', reject);
  });
}

function build() {
  return new Promise((resolve) => {
    // Let's create some inline code splitters.
    let sourcesStreamSplitter = new polymerBuild.HtmlSplitter();
    let dependenciesStreamSplitter = new polymerBuild.HtmlSplitter();

    // Okay, so first thing we do is clear the build directory.
    console.log(`Deleting ${buildDirectory} directory...`);
    del([buildDirectory])
      .then(() => {
        // Let's start by getting your source files.
        let sourcesStream = polymerProject.sources()
          .pipe(gulpif(/\.(png|gif|jpg|svg)$/, imagemin()))

          // The `sourcesStreamSplitter` created above can be added here to
          // pull any inline styles and scripts out of their HTML files and
          // into seperate CSS and JS files in the build stream.
          .pipe(sourcesStreamSplitter.split())

          // Let's optimice your source files.
          .pipe(gulpif(/\.html$/, htmlmin({
            collapseWhitespace: true
          })))
          .pipe(gulpif(/\.js$/, uglify()))
          .pipe(gulpif(/\.json$/, jsonmin()))

          // Let's do the some changes for production
          .pipe(gulpif(environment === 'production', replace(
            settings.authDomain.develop,
            settings.authDomain.production,
            { skipBinary: true }
          )))
          .pipe(gulpif(environment === 'production', replace(
            settings.databaseUrl.develop,
            settings.databaseUrl.production,
            { skipBinary: true }
          )))

          // Rejoin your source files.
          .pipe(sourcesStreamSplitter.rejoin());

        // Similarly, you can get your dependencies seperately and perform any
        // dependency-only optimizations here as well.
        let dependenciesStream = polymerProject.dependencies()
          .pipe(dependenciesStreamSplitter.split())
          // Add any dependency optimizations here.
          .pipe(dependenciesStreamSplitter.rejoin());

        // Okay, now let's merge them into a single build stream.
        let buildStream = mergeStream(sourcesStream, dependenciesStream)
          .once('data', () => {
            console.log('Analyzing build dependencies...');
          });

        // This will bundle dependencies into your fragments so you can lazy
        // load them.
        buildStream = buildStream.pipe(polymerProject.bundler());

        // Okay, time to pipe to the build directory
        buildStream = buildStream.pipe(gulp.dest(buildDirectory));

        // Wait for the buildStream to complete
        return waitFor(buildStream);
      })
      .then(() => {
        console.log('Generating the Service Worker...');

        return polymerBuild.addServiceWorker({
          project: polymerProject,
          buildRoot: buildDirectory,
          bundled: true,
          swPrecacheConfig: swPrecacheConfig
        });
      })
      .then(() => {
        console.log('Build complete!');
        resolve();
      });
  });
}

gulp.task('build', build);


text:
import asposeimagingcloud
from asposeimagingcloud.ImagingApi import ImagingApi
from asposeimagingcloud.ImagingApi import ApiException

import asposestoragecloud
from asposestoragecloud.StorageApi import StorageApi
from asposestoragecloud.StorageApi import ResponseMessage

apiKey = "XXXXX" #sepcify App Key
appSid = "XXXXX" #sepcify App SID
apiServer = "http://api.aspose.com/v1.1"
data_folder = "../../data/"

#Instantiate Aspose Storage API SDK
storage_apiClient = asposestoragecloud.ApiClient.ApiClient(apiKey, appSid, True)
storageApi = StorageApi(storage_apiClient)
#Instantiate Aspose Imaging API SDK
api_client = asposeimagingcloud.ApiClient.ApiClient(apiKey, appSid, True)
imagingApi = ImagingApi(api_client);

#set input file name
name =  "sample.bmp"
bitsPerPixel = 24
horizontalResolution = 300
verticalResolution = 300

try:

    #invoke Aspose.Imaging Cloud SDK API to update BMP specific properties without using cloud storage
    response = imagingApi.PostImageBmp(bitsPerPixel, horizontalResolution, verticalResolution, file=data_folder + name)

    if response.Status == 'OK':
        #download image from API response
        outfilename = "c:/temp/" + name
        with open(outfilename, 'wb') as f:
                    for chunk in response.InputStream:
                        f.write(chunk)

except ApiException as ex:
            print "ApiException:"
            print "Code:" + str(ex.code)
            print "Message:" + ex.message


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Tests: _jobject Struct Reference</title>
<link href="hydoxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">

Main Page

Modules

Classes

Files

Class List

Class Hierarchy

Class Members

_jobject Struct Reference
#include <thread_unit_test_utils.h>

List of all members.

Public Attributes

_jjobject * 	object

Member Data Documentation

          _jjobject* _jobject.object

The documentation for this struct was generated from the following file:

thread_unit_test_utils.h

<address style="text-align: center;">

Genereated on Tue Mar 11 19:26:09 2008 by Doxygen.

(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.

</address>


text:
package example.springdata.mongodb.shop;

/**
 * The interface for repository functionality that will be implemented manually.
 *
 * @author Oliver Gierke
 */
interface OrderRepositoryCustom {

	/**
	 * Creates an {@link Invoice} for the given {@link Order}.
	 *
	 * @param order must not be {@literal null}.
	 * @return
	 */
	Invoice getInvoiceFor(Order order);
}


text:
<title>
UAW rams through Chrysler deal
</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>

<?php include "../../legacy-includes/TopLogo.htmlf" ?>

<?php include "../../legacy-includes/TopAd.htmlf" ?>

<?php include "../../legacy-includes/LeftButtons.htmlf" ?>

<?php include "../../legacy-includes/BodyInsert.htmlf" ?>

UAW rams through Chrysler deal

November 2, 2007 | Page 15

LEE SUSTAR reports on how union leaders sold another surrender to members at Chrysler.

UNION LEADERS mounted an all-out effort to push through an unprecedented concessionary contract covering 45,000 workers at Chrysler by a narrow margin.

The UAW's official final tally was 56 percent of production workers in support of the deal, and 51 percent of those in skilled trades voting "yes." However, a significant rank-and-file rebellion, coordinated by the Soldiers of Solidarity opposition network, nearly sank the deal.

When two big United Auto Workers (UAW) locals in Kokomo, Ind., voted down the proposed deal, the contract appeared headed for defeat. But UAW officials took to the shop floor in Detroit-area plants to sell the deal with Chrysler's new owners, the private equity firm Cerberus.

The contract even passed in the Sterling Heights, Mich., assembly plant, despite the opposition of local president Bill Parker, who also chaired the union's national bargaining committee with Chrysler.

The closeness of the vote raised questions among opposition activists, who pointed out that contract ratification votes are handled differently in different locals. Even so, the vote reflects the fact that large numbers of Chrysler workers were unwilling to challenge both the UAW and the company by rejecting the deal.

Like the UAW contract at GM ratified in September, the Chrysler deal creates a permanent lower-tier wage for future hires in "non-core" jobs off of the assembly lines, a category that, according to Chrysler, includes not only 19 parts warehouses but also three manufacturing plants.

Also like GM, the contract allows Chrysler to turn over its retiree health care plan to a union-controlled Voluntary Employee Beneficiary Association (VEBA). According to Automotive News, Chrysler will spend $8.8 billion to rid itself of $16 billion in UAW retiree health care liabilities--that is, 55 cents on the dollar.

To make up the difference, the UAW-VEBA trustees will have to beat the stock market and 10 percent annual inflation in health care--or cut benefits. The track record isn't good. Past VEBA plans accepted by the UAW at Detroit Diesel and Caterpillar have run out of money.

There were other concessions in the Chrysler deal as well. New hires will get 401(k) plans instead of pensions and won't receive retiree health care. Annual lump-sum payments will replace wages, lowering the base rate of pay for future wages and benefits.

Temporary workers--hired at GM as full-timers under the new contract--will remain temps. Specific commitments by management to investment in U.S. factories--a high-profile part of the GM deal--are absent in the Chrysler contract.

Now, the UAW turns to negotiations with Ford, where executives will try special pleas for even more concessions. Ford will certainly demand a VEBA on terms similar to those at Chrysler and GM, as well as further downsizing to meet its goal of eliminating 30,000 jobs and closing at least six plants.

While workers sacrifice, Ford CEO Alan Mulally got a $39.1 million in bonuses for "working" just the last four months of 2006, even as Ford lost $12.7 billion.

<?php include "../../legacy-includes/BottomNavLinks.htmlf" ?>

<?php include "../../legacy-includes/RightAdFolder.htmlf" ?>


text:
var Stream = require('../core/stream');
var ScrollStream = require('../streams/scroll-stream');

/**
 * Create a new Stream containing events which fire when a position has
 * been scrolled past.
 * @param {number} targetScrollY The position we are tracking.
 * @return {Stream} The resulting stream.
 */
function create(targetScrollY) {
  var scrollPositionStream = ScrollStream.create();
  var overTheLineStream = Stream.create();
  var pastScrollY = false;
  var firstRun = true;

  Stream.onValue(scrollPositionStream, function onScrollTrackPosition_(currentScrollY) {
    if ((firstRun || pastScrollY) && (currentScrollY < targetScrollY)) {
      pastScrollY = false;
      Stream.emit(overTheLineStream, ['before', targetScrollY]);
    } else if ((firstRun || !pastScrollY) && (currentScrollY >= targetScrollY)) {
      pastScrollY = true;
      Stream.emit(overTheLineStream, ['after', targetScrollY]);
    }

    firstRun = false;
  });

  return overTheLineStream;
}

module.exports = { create: create };


text:
require 'spec_helper'

def create_todo_list(options={})
    options[:title] ||= "My todo list"
    options[:description] ||= "This is my todo list."

    visit "/todo_lists"
    click_link "New Todo list"
    expect(page).to have_content("New todo_list")

    fill_in "Title", with: options[:title]
    fill_in "Description", with: options[:description]
    click_button "Create Todo list"
end

before do
    sign_in user, password: "treehouse1"
end

it "redirects to the todo list index page on success" do
    create_todo_list
    expect(page).to have_content("My todo list")
end

it "displays an error when the todo list has no title" do
    expect(TodoList.count).to eq(0)

    create_todo_list title: ""

    expect(page).to have_content("error")
    expect(TodoList.count).to eq(0)

    visit "/todo_lists"
    expect(page).to_not have_content("This is what I'm doing today.")
end

it "displays an error when the todo list has a title less than 3 characters" do
    expect(TodoList.count).to eq(0)

    create_todo_list title: "Hi"

    expect(page).to have_content("error")
    expect(TodoList.count).to eq(0)

    visit "/todo_lists"
    expect(page).to_not have_content("This is what I'm doing today.")
end

it "displays an error when the todo list has no description" do
    expect(TodoList.count).to eq(0)

    create_todo_list title: "Grocery list", description: ""

    expect(page).to have_content("error")
    expect(TodoList.count).to eq(0)

    visit "/todo_lists"
    expect(page).to_not have_content("Grocery list")
end

it "displays an error when the todo list has no description" do
    expect(TodoList.count).to eq(0)

    create_todo_list title: "Grocery list", description: "Food"

    expect(page).to have_content("error")
    expect(TodoList.count).to eq(0)

    visit "/todo_lists"
    expect(page).to_not have_content("Grocery list")
end
end


text:
package org.olat.course.nodes.portfolio;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.olat.core.CoreSpringFactory;
import org.olat.core.commons.fullWebApp.LayoutMain3ColsBackController;
import org.olat.core.commons.fullWebApp.LayoutMain3ColsController;
import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.form.flexible.FormItem;
import org.olat.core.gui.components.form.flexible.FormItemContainer;
import org.olat.core.gui.components.form.flexible.elements.FormLink;
import org.olat.core.gui.components.form.flexible.elements.StaticTextElement;
import org.olat.core.gui.components.form.flexible.impl.FormBasicController;
import org.olat.core.gui.components.form.flexible.impl.FormEvent;
import org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer;
import org.olat.core.gui.components.link.Link;
import org.olat.core.gui.components.stack.StackedController;
import org.olat.core.gui.control.Controller;
import org.olat.core.gui.control.Event;
import org.olat.core.gui.control.WindowControl;
import org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController;
import org.olat.core.id.Identity;
import org.olat.core.id.OLATResourceable;
import org.olat.core.util.Formatter;
import org.olat.core.util.resource.OresHelper;
import org.olat.course.CourseModule;
import org.olat.course.nodes.PortfolioCourseNode;
import org.olat.course.run.userview.UserCourseEnvironment;
import org.olat.portfolio.EPSecurityCallback;
import org.olat.portfolio.EPSecurityCallbackImpl;
import org.olat.portfolio.EPUIFactory;
import org.olat.portfolio.manager.EPFrontendManager;
import org.olat.portfolio.model.structel.EPStructuredMap;
import org.olat.portfolio.model.structel.PortfolioStructureMap;
import org.olat.repository.RepositoryEntry;

/**
 *
 * Description:

 * Assessment details controller.
 *
 *

 * Initial Date:  11 nov. 2010

 * @author srosse, stephane.rosse@frentix.com, http://www.frentix.com
 */
public class PortfolioResultDetailsController extends FormBasicController {
	private final EPFrontendManager ePFMgr;
	private Identity assessedIdentity;
	private PortfolioStructureMap template;
	private List<PortfolioStructureMap> maps;
	private Map<PortfolioStructureMap, MapElements> mapToElements = new HashMap<PortfolioStructureMap, MapElements>();

	private DeadlineController deadlineCtr;
	private CloseableCalloutWindowController deadlineCalloutCtr;
	private final StackedController stackPanel;

	public PortfolioResultDetailsController(UserRequest ureq, WindowControl wControl, StackedController stackPanel, PortfolioCourseNode courseNode,
			UserCourseEnvironment userCourseEnv) {
		super(ureq, wControl);

		this.stackPanel = stackPanel;
		ePFMgr = (EPFrontendManager) CoreSpringFactory.getBean("epFrontendManager");
		assessedIdentity = userCourseEnv.getIdentityEnvironment().getIdentity();

		RepositoryEntry mapEntry = courseNode.getReferencedRepositoryEntry();
		if(mapEntry != null) {
			template = (PortfolioStructureMap)ePFMgr.loadPortfolioStructure(mapEntry.getOlatResource());
			Long courseResId = userCourseEnv.getCourseEnvironment().getCourseResourceableId();
			OLATResourceable courseOres = OresHelper.createOLATResourceableInstance(CourseModule.class, courseResId);
			maps = ePFMgr.loadPortfolioStructureMaps(assessedIdentity, courseOres, courseNode.getIdent(), null);
		}

		initForm(ureq);
	}

	@Override
	protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
		if(maps == null || maps.isEmpty()) {
			uifactory.addStaticTextElement("no.map", "", formLayout);
		} else {
			Formatter formatter = Formatter.getInstance(getLocale());

			int count = 0;
			for(PortfolioStructureMap map:maps) {
				MapElements mapElements = new MapElements();
				if(map instanceof EPStructuredMap) {
					EPStructuredMap structuredMap = (EPStructuredMap)map;

					if(maps.size() > 1 || !structuredMap.getStructuredMapSource().equals(template)) {
						String templateTitle = structuredMap.getStructuredMapSource().getTitle();
						uifactory.addStaticTextElement("map.template." + count, "map.template", templateTitle, formLayout);
					}

					String copyDate = "";
					if(structuredMap.getCopyDate() != null) {
						copyDate = formatter.formatDateAndTime(structuredMap.getCopyDate());
					}
					uifactory.addStaticTextElement("map.copyDate." + count, "map.copyDate", copyDate, formLayout);

					String returnDate = "";
					if(structuredMap.getReturnDate() != null) {
						returnDate = formatter.formatDateAndTime(structuredMap.getReturnDate());
					}
					uifactory.addStaticTextElement("map.returnDate." + count, "map.returnDate", returnDate, formLayout);

					String deadLine = "";
					if(structuredMap.getDeadLine() != null) {
						deadLine = formatter.formatDateAndTime(structuredMap.getDeadLine());
					}
					mapElements.deadlineEl = uifactory.addStaticTextElement("map.deadline." + count, "map.deadline", deadLine, formLayout);
				}

				FormLayoutContainer buttonsCont = FormLayoutContainer.createButtonLayout("buttons." + count, getTranslator());
				buttonsCont.setRootForm(mainForm);
				formLayout.add(buttonsCont);
				if(map instanceof EPStructuredMap) {
					mapElements.changeDeadlineLink = uifactory.addFormLink("map.deadline.change." + count, "map.deadline.change", null, buttonsCont, Link.BUTTON);
					mapElements.changeDeadlineLink.setUserObject(map);
				}
				mapElements.openMapLink = uifactory.addFormLink("open.map." + count, "open.map", null, buttonsCont, Link.BUTTON);
				mapElements.openMapLink.setUserObject(map);

				count++;
				if(count != maps.size()) {
					uifactory.addSpacerElement("spacer-" + count, formLayout, false);
				}

				mapToElements.put(map, mapElements);
			}
		}
	}

	@Override
	protected void doDispose() {
		//
	}

	@Override
	protected void formOK(UserRequest ureq) {
		//
	}

	@Override
	protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
		if(source instanceof FormLink) {
			FormLink link = (FormLink)source;
			if(link.getName().startsWith("map.deadline.change")) {
				if (deadlineCalloutCtr == null) {
					EPStructuredMap map = (EPStructuredMap)link.getUserObject();
					popupDeadlineBox(ureq, map);
				} else {
					// close on second click
					closeDeadlineBox();
				}
			} else if(link.getName().startsWith("open.map")) {
				PortfolioStructureMap map = (PortfolioStructureMap)link.getUserObject();
				doOpenMap(ureq, map);
			}
		}
		super.formInnerEvent(ureq, source, event);
	}

	private void doOpenMap(UserRequest ureq, PortfolioStructureMap map) {
		EPSecurityCallback secCallback = new EPSecurityCallbackImpl(false, true);
		Controller viewCtr = EPUIFactory.createPortfolioStructureMapController(ureq, getWindowControl(), map, secCallback);
		listenTo(viewCtr);
		if(stackPanel == null) {
			LayoutMain3ColsBackController ctr = new LayoutMain3ColsBackController(ureq, getWindowControl(), null, null, viewCtr.getInitialComponent(), "portfolio" + map.getKey());
			ctr.activate();
		} else {
			LayoutMain3ColsController ctr = new LayoutMain3ColsController(ureq, getWindowControl(), viewCtr);
			stackPanel.pushController(translate("preview.map"), ctr);
		}
	}

	/**
	 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
	 *      org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
	 */
	@Override
	protected void event(UserRequest ureq, Controller source, Event event) {
		if (source == deadlineCalloutCtr && event == CloseableCalloutWindowController.CLOSE_WINDOW_EVENT) {
			removeAsListenerAndDispose(deadlineCalloutCtr);
			deadlineCalloutCtr = null;
		} else if (source == deadlineCtr) {
			String deadLine = "";
			EPStructuredMap structuredMap = deadlineCtr.getMap();
			if(structuredMap.getDeadLine() != null) {
				Formatter formatter = Formatter.getInstance(getLocale());
				deadLine = formatter.formatDateAndTime(structuredMap.getDeadLine());
			}
			mapToElements.get(structuredMap).deadlineEl.setValue(deadLine);
			closeDeadlineBox();
		}
	}

	/**
	 * @param ureq
	 */
	private void popupDeadlineBox(UserRequest ureq, EPStructuredMap map) {
		String title = translate("map.deadline.change");

		removeAsListenerAndDispose(deadlineCtr);
		deadlineCtr = new DeadlineController(ureq, getWindowControl(), map);
		listenTo(deadlineCtr);

		removeAsListenerAndDispose(deadlineCalloutCtr);
		FormLink changeDeadlineLink = mapToElements.get(map).changeDeadlineLink;
		deadlineCalloutCtr = new CloseableCalloutWindowController(ureq, getWindowControl(), deadlineCtr.getInitialComponent(),
				changeDeadlineLink, title, true, "b_eportfolio_deadline_callout");
		listenTo(deadlineCalloutCtr);
		deadlineCalloutCtr.activate();
	}

	private void closeDeadlineBox() {
		if (deadlineCalloutCtr != null){
			deadlineCalloutCtr.deactivate();
			removeAsListenerAndDispose(deadlineCalloutCtr);
			deadlineCalloutCtr = null;
		}
	}

	private static class MapElements {
		private FormLink openMapLink;
		private FormLink changeDeadlineLink;
		private StaticTextElement deadlineEl;
	}
}


text:
@implementation NSProcessInfo (MHF)

- (NSDictionary *)mhf_operationSystemVersionDictionary{
    NSOperatingSystemVersion v = self.operatingSystemVersion;
    return @{@"majorVersion" : @(v.majorVersion),
             @"minorVersion" : @(v.minorVersion),
             @"patchVersion" : @(v.patchVersion)};
}

@end


text:
"use strict";

import * as assert from "assert";

import * as vscode from "vscode";
import * as myExtension from "../src/extension";
import Transformation from "../src/transformation";

suite("integration test", () => {
    suiteSetup(setupTest);

    test("behaviour of text-transformer framework (async)", (done: MochaDone) => {
        vscode.workspace.onDidChangeTextDocument(singleFire((change: vscode.TextDocumentChangeEvent) => { //We need singleFire here, otherwise this handler gets procesed when editor content changed during second testcase
            const text = vscode.window.activeTextEditor.document.getText();

            try { //Usually one wouldn"t need this construct - but it seems like the "thenables" catch the error before getting up higher in the stack
                assert.equal(text, "HAllo, HIER bin ich!\n");
            }
            catch (err) {
                return done(err);
            }

            done();
        }));

        vscode.commands.executeCommand("Test-Transformer-Async");
    });

    test("behaviour of text-transformer framework (sync)", (done: MochaDone) => {
        vscode.workspace.onDidChangeTextDocument((change: vscode.TextDocumentChangeEvent) => {
            const text = vscode.window.activeTextEditor.document.getText();

            try { //Usually one wouldn"t need this construct - but it seems like the "thenables" catch the error before getting up higher in the stack
                assert.equal(text, "hallo, hier bin ich!\n");
            }
            catch (err) {
                return done(err);
            }

            done();
        });

        //Actually the next three lines are setup code...
        const selections = new Array<vscode.Selection>();
        selections.push(new vscode.Selection(new vscode.Position(0, 0), new vscode.Position(0, 2)));
        selections.push(new vscode.Selection(new vscode.Position(0, 5), new vscode.Position(0, 11)));

        vscode.window.activeTextEditor.selections = selections;

        vscode.commands.executeCommand("Test-Transformer-Sync");
    });
});

import {CapitalcaseTransformer} from "../src/simple-transformations";

suite("unit tests", () => {
    suite("capitalcase", () => {
        const SAMPLE_SENTENCE = "hallo\twelt,\nich frEUe   mich!"; // between "frEUu" and "mich" there a three whitespaces
        let instance = new CapitalcaseTransformer();

        test("correct handling of multiword input", (done: MochaDone) => {
            instance.transform(SAMPLE_SENTENCE, (output: string) => {
                assert.equal(output, "Hallo\tWelt,\nIch Freue   Mich!");
                done();
            });
        });
    });
});

function singleFire(fn: Function) {
    let fired = false;
    return function () {
        if (fired) return;
        fired = true;

        fn.apply(null, arguments);
    };
}

class TestTransformerAsync extends Transformation {
    getCommandName(): string {
        return "Test-Transformer-Async";
    }

    transform(input: string, cb: (output: string) => void): void {
        process.nextTick(cb.bind(null, input.toUpperCase()));
    }
}

class TestTransformerSync extends Transformation {
    getCommandName(): string {
        return "Test-Transformer-Sync";
    }

    transform(input: string, cb: (output: string) => void): string {
        return input.toLowerCase();
    }
}

function setupTest(done: MochaDone) {
    myExtension.transformers.push(new TestTransformerAsync());
    myExtension.transformers.push(new TestTransformerSync());

    //myExtension.activateAgain(); //Actually extension should be initiliazed at startup, so before coming to this line?!

    const selections = new Array<vscode.Selection>();
    selections.push(new vscode.Selection(new vscode.Position(0, 0), new vscode.Position(0, 2)));
    selections.push(new vscode.Selection(new vscode.Position(0, 5), new vscode.Position(0, 11)));

    vscode.workspace.openTextDocument(__dirname + "/../../test/sample_text").then((doc: vscode.TextDocument) => {
        vscode.window.activeTextEditor.edit((editBuilder: vscode.TextEditorEdit) => {
            editBuilder.insert(new vscode.Position(0, 0), doc.getText());
        }).then(() => {
            vscode.window.activeTextEditor.selections = selections;

            done();
        });
    }, (err) => {
        console.error(err);
        done(new Error("Could not load sample text file!"));
    });
}


text:
/**
 * Annotations for writing verse in your code.
 */
package com.github.stokito.gag.annotation.literary.verse;


text:
package com.planet_ink.coffee_mud.Common;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;

import java.util.Arrays;
import java.util.Comparator;
import java.util.Vector;

public class DefaultPhyStats implements PhyStats
{
	@Override
	public String ID()
	{
		return "DefaultPhyStats";
	}

	@Override
	public String name()
	{
		return ID();
	}

	private final static String[]	empty			= new String[0];
	private final static int[]		DEFAULT_STATS	= {0,0,100,0,0,0,0,0,0,0};
	private final static Comparator<String> ambiComp= new Comparator<String>()
	{
		@Override
		public int compare(final String o1, final String o2)
		{
			return o1.compareToIgnoreCase(o2);
		}
	};

	protected int[]		stats			= DEFAULT_STATS.clone();
	protected double	speed			= 1.0;			// should be positive
	protected String	replacementName	= null;
	protected String[]	ambiances		= null;

	public DefaultPhyStats()
	{
	}

	@Override
	public void setAllValues(final int def)
	{
		for(int i=0;i<NUM_STATS;i++)
			stats[i]=def;
		speed=def;
	}

	@Override
	public void reset()
	{
		for(int i=0;i<DEFAULT_STATS.length;i++)
			stats[i]=DEFAULT_STATS[i];
		speed=1.0;
		replacementName=null;
		ambiances=null;
	}

	@Override
	public int sensesMask()
	{
		return stats[STAT_SENSES];
	}

	@Override
	public int disposition()
	{
		return stats[STAT_DISPOSITION];
	}

	@Override
	public int level()
	{
		return stats[STAT_LEVEL];
	}

	@Override
	public int ability()
	{
		return stats[STAT_ABILITY];
	}

	@Override
	public int rejuv()
	{
		return stats[STAT_REJUV];
	}

	@Override
	public int weight()
	{
		return stats[STAT_WEIGHT];
	}

	@Override
	public int height()
	{
		return stats[STAT_HEIGHT];
	}

	@Override
	public int armor()
	{
		return stats[STAT_ARMOR];
	}

	@Override
	public int damage()
	{
		return stats[STAT_DAMAGE];
	}

	@Override
	public double speed()
	{
		return speed;
	}

	@Override
	public int attackAdjustment()
	{
		return stats[STAT_ATTACK];
	}

	@Override
	public String newName()
	{
		return replacementName;
	}

	@Override
	public String[] ambiances()
	{
		return (ambiances == null) ? empty : ambiances;
	}

	@Override
	public void setRejuv(final int newRejuv)
	{
		stats[STAT_REJUV] = newRejuv;
	}

	@Override
	public void setLevel(final int newLevel)
	{
		stats[STAT_LEVEL] = newLevel;
	}

	@Override
	public void setArmor(final int newArmor)
	{
		stats[STAT_ARMOR] = newArmor;
	}

	@Override
	public void setDamage(final int newDamage)
	{
		stats[STAT_DAMAGE] = newDamage;
	}

	@Override
	public void setWeight(final int newWeight)
	{
		stats[STAT_WEIGHT] = newWeight;
	}

	@Override
	public void setSpeed(final double newSpeed)
	{
		speed = newSpeed;
	}

	@Override
	public void setAttackAdjustment(final int newAdjustment)
	{
		stats[STAT_ATTACK] = newAdjustment;
	}

	@Override
	public void setAbility(final int newAdjustment)
	{
		stats[STAT_ABILITY] = newAdjustment;
	}

	@Override
	public void setDisposition(final int newDisposition)
	{
		stats[STAT_DISPOSITION] = newDisposition;
	}

	@Override
	public void setSensesMask(final int newMask)
	{
		stats[STAT_SENSES] = newMask;
	}

	@Override
	public void setHeight(final int newHeight)
	{
		stats[STAT_HEIGHT] = newHeight;
	}

	@Override
	public void setName(final String newName)
	{
		replacementName = newName;
	}

	@Override
	public int getStat(final int statNum)
	{
		if(statNum<PhyStats.NUM_STATS)
			return stats[statNum];
		return 0;
	}

	@Override
	public void setStat(final int statNum, final int value)
	{
		if(statNum<PhyStats.NUM_STATS)
			stats[statNum] = value;
	}

	@Override
	public String getCombatStats()
	{
		return "L" + stats[STAT_LEVEL] + ":A" + stats[STAT_ARMOR] + ":K" + stats[STAT_ATTACK] + ":D" + stats[STAT_DAMAGE];
	}

	@Override
	public void addAmbiance(String ambiance)
	{
		if(ambiance==null)
			return;
		ambiance=ambiance.trim();
		if(ambiance.length()==0)
			return;
		final String[] ambiances = this.ambiances;
		if(ambiances == null)
		{
			this.ambiances = new String[] { ambiance };
		}
		else
		{
			final String[] newAmbiances = Arrays.copyOf(ambiances, ambiances.length+1);
			newAmbiances[newAmbiances.length-1]=ambiance;
			Arrays.sort(newAmbiances, ambiComp);
			this.ambiances = newAmbiances;
		}
	}

	@Override
	public void delAmbiance(final String ambiance)
	{
		if(ambiance==null)
			return;
		final String[] ambiances = this.ambiances;
		if(ambiances==null)
			return;
		int dex=Arrays.binarySearch(ambiances, ambiance.trim(), ambiComp);
		if(dex<0)
			return;
		if(ambiances.length==1)
		{
			this.ambiances=null;
			return;
		}
		final String[] newAmbiances=Arrays.copyOf(ambiances, ambiances.length-1);
		for(;dex<newAmbiances.length;dex++)
			newAmbiances[dex]=ambiances[dex+1];
		this.ambiances=newAmbiances;
	}

	@Override
	public boolean isAmbiance(final String ambiance)
	{
		final String[] ambiances=this.ambiances;
		if((ambiances==null)||(ambiance==null))
			return false;
		return Arrays.binarySearch(ambiances, ambiance.trim(), ambiComp) >=0;
	}

	@Override
	public int movesReqToPull()
	{
		return 1 + (weight() / 3);
	}

	@Override
	public int movesReqToPush()
	{
		return 1 + (weight() / 3);
	}

	@Override
	public CMObject newInstance()
	{
		try
		{
			return getClass().getDeclaredConstructor().newInstance();
		}
		catch (final Exception e)
		{
			return new DefaultPhyStats();
		}
	}

	@Override
	public void initializeClass()
	{
	}

	@Override
	public void copyInto(final PhyStats intoStats)
	{
		if(intoStats instanceof DefaultPhyStats)
		{
			for(int i=0;i<NUM_STATS;i++)
				((DefaultPhyStats)intoStats).stats[i]=stats[i];
			((DefaultPhyStats)intoStats).speed=speed;
			((DefaultPhyStats)intoStats).ambiances=ambiances;
			((DefaultPhyStats)intoStats).replacementName=replacementName;
		}
		else
		for(int i=0;i<getStatCodes().length;i++)
			intoStats.setStat(getStatCodes()[i],getStat(getStatCodes()[i]));
	}

	@Override
	public CMObject copyOf()
	{
		try
		{
			final DefaultPhyStats E=(DefaultPhyStats)this.clone();
			E.stats=E.stats.clone();
			return E;
		}
		catch(final java.lang.CloneNotSupportedException e)
		{
			return new DefaultPhyStats();
		}
	}

	private final static String[] CODES=
	{
		"SENSES","DISPOSITION","LEVEL",
		"ABILITY","REJUV","WEIGHT","HEIGHT",
		"ARMOR","DAMAGE","ATTACK", "AMBIANCES"
	};

	@Override
	public int getSaveStatIndex()
	{
		return getStatCodes().length;
	}

	@Override
	public String[] getStatCodes()
	{
		return CODES;
	}

	@Override
	public boolean isStat(final String code)
	{
		return CMParms.indexOf(getStatCodes(), code.toUpperCase().trim()) >= 0;
	}

	protected int getCodeNum(final String code)
	{
		for(int i=0;i<CODES.length;i++)
		{
			if(code.equalsIgnoreCase(CODES[i]))
				return i;
		}
		return -1;
	}

	@Override
	public boolean sameAs(final PhyStats E)
	{
		for(int i=0;i<CODES.length;i++)
		{
			if(!E.getStat(CODES[i]).equals(getStat(CODES[i])))
				return false;
		}
		return true;
	}

	@Override
	public void setStat(final String code, final String val)
	{
		switch(getCodeNum(code))
		{
		case 0:
			setSensesMask(CMath.s_parseIntExpression(val));
			break;
		case 1:
			setDisposition(CMath.s_parseIntExpression(val));
			break;
		case 2:
			setLevel(CMath.s_parseIntExpression(val));
			break;
		case 3:
			setAbility(CMath.s_parseIntExpression(val));
			break;
		case 4:
			setRejuv(CMath.s_parseIntExpression(val));
			break;
		case 5:
			setWeight(CMath.s_parseIntExpression(val));
			break;
		case 6:
			setHeight(CMath.s_parseIntExpression(val));
			break;
		case 7:
			setArmor(CMath.s_parseIntExpression(val));
			break;
		case 8:
			setDamage(CMath.s_parseIntExpression(val));
			break;
		case 9:
			setAttackAdjustment(CMath.s_parseIntExpression(val));
			break;
		case 10:
		{
			if(val.trim().length()==0)
				ambiances=null;
			else
			{
				ambiances=CMParms.toStringArray(CMParms.parseCommas(val,true));
				Arrays.sort(ambiances);
			}
			break;
		}
		}
	}

	@Override
	public String getStat(final String code)
	{
		switch(getCodeNum(code))
		{
		case 0:
			return "" + sensesMask();
		case 1:
			return "" + disposition();
		case 2:
			return "" + level();
		case 3:
			return "" + ability();
		case 4:
			return "" + rejuv();
		case 5:
			return "" + weight();
		case 6:
			return "" + height();
		case 7:
			return "" + armor();
		case 8:
			return "" + damage();
		case 9:
			return "" + attackAdjustment();
		case 10:
			return CMParms.toListString(ambiances());
		default:
			return "";
		}
	}

	@Override
	public int compareTo(final CMObject o)
	{
		return CMClass.classID(this).compareToIgnoreCase(CMClass.classID(o));
	}
}


text:
/* Author: Ioan Sucan */

#include <boost/filesystem.hpp>

#include "ompl/base/SpaceInformation.h"
#include "ompl/base/ProblemDefinition.h"
#include "ompl/base/ScopedState.h"
#include "ompl/base/goals/GoalState.h"
#include "ompl/geometric/SimpleSetup.h"

#include "ompl/base/spaces/RealVectorStateSpace.h"

#include "../../resources/config.h"
#include "../../resources/environment2D.h"

namespace ompl
{
    namespace geometric
    {

        /** \brief Define a one-dimensional state space with an updated distance definition (Manhattan distance) */
        class StateSpace2DMap1 : public base::RealVectorStateSpace
        {
        public:

            StateSpace2DMap1(void) : base::RealVectorStateSpace(1)
            {
            }

            virtual double distance(const base::State *state1, const base::State *state2) const
            {
                return fabs(state1->as<base::RealVectorStateSpace::StateType>()->values[0] -
                            state2->as<base::RealVectorStateSpace::StateType>()->values[0]);
            }
        };

        /** \brief Define a state validity checking function that assumes a compound state space for the 2DMap environment */
        static bool isValidFn2DMap1(const std::vector< std::vector<int> > *grid, const base::State *state)
        {
            const base::CompoundState *cstate = state->as<base::CompoundState>();

            /* planning is done in a continuous space, but our collision space representation is discrete */
            int x = (int)(cstate->as<base::RealVectorStateSpace::StateType>(0)->values[0]);
            int y = (int)(cstate->as<base::RealVectorStateSpace::StateType>(1)->values[0]);
            return (*grid)[x][y] == 0; // 0 means valid state
        }

        /** \brief Given a description of the environment, construct a
            complete planning context. The context is equivalent to
            the one defined by SimpleSetup2DMap but the representation
            of states and the collision checker are different (so that
            more code from OMPL is covered) */
        class SimpleSetup2DMap1 : public SimpleSetup
        {
        public:

            SimpleSetup2DMap1(const std::string &fileName) : SimpleSetup(constructSpace())
            {
                loadTestFile(fileName);
            }

            SimpleSetup2DMap1(const Environment2D &env) : SimpleSetup(constructSpace()), env_(env)
            {
                configure2DMap1();
            }

            /** \brief Load a test file */
            void loadTestFile(const std::string &testFile)
            {
                /* load environment */
                boost::filesystem::path path(TEST_RESOURCES_DIR);
                path = path / testFile;
                loadEnvironment(path.string().c_str(), env_);
                configure2DMap1();
            }

        protected:

            base::StateSpacePtr constructSpace(void)
            {
                return base::StateSpacePtr(new StateSpace2DMap1()) + base::StateSpacePtr(new StateSpace2DMap1());
            }

            /** \brief Set the bounds and the state validity checker */
            void configure2DMap1(void)
            {
                base::RealVectorBounds bounds(1);
                bounds.low[0] = 0.0;
                bounds.high[0] = (double)env_.width - 0.000000001;
                getStateSpace()->as<base::CompoundStateSpace>()->as<StateSpace2DMap1>(0)->setBounds(bounds);

                bounds.high[0] = (double)env_.height - 0.000000001;
                getStateSpace()->as<base::CompoundStateSpace>()->as<StateSpace2DMap1>(1)->setBounds(bounds);

                setStateValidityChecker(boost::bind(&isValidFn2DMap1, &env_.grid, _1));

                base::ScopedState<base::CompoundStateSpace> state(getSpaceInformation());
                state->as<base::RealVectorStateSpace::StateType>(0)->values[0] = env_.start.first;
                state->as<base::RealVectorStateSpace::StateType>(1)->values[0] = env_.start.second;

                base::ScopedState<base::CompoundStateSpace> gstate(getSpaceInformation());
                gstate->as<base::RealVectorStateSpace::StateType>(0)->values[0] = env_.goal.first;
                gstate->as<base::RealVectorStateSpace::StateType>(1)->values[0] = env_.goal.second;

                setStartAndGoalStates(state, gstate);
            }

            /** \brief Representation of environment */
            Environment2D env_;
        };
    }

}


text:
//
//  GTLShilohranchSermon.m
//

// ----------------------------------------------------------------------------
// NOTE: This file is generated from Google APIs Discovery Service.
// Service:
//   shilohranch/v1
// Description:
//   Shiloh Ranch Mobile App API
// Classes:
//   GTLShilohranchSermon (0 custom class methods, 5 custom properties)

#import "GTLShilohranchSermon.h"

// ----------------------------------------------------------------------------
//
//   GTLShilohranchSermon
//

@implementation GTLShilohranchSermon
@dynamic audioLink, date, entityKey, timeAdded, title;

+ (NSDictionary *)propertyToJSONKeyMap {
  NSDictionary *map = @{
    @"audioLink" : @"audio_link",
    @"timeAdded" : @"time_added"
  };
  return map;
}

@end