text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Madison Flaget, madisonflaget, madison, flaget, portfolio, design portfolio, website, resume, career, graphic design, graphic designer, freelance graphic design, photography, photographer, Montana, Missoula Montana, University of Montana">
    <meta name="author" content="Madison Flaget">

    <title>Madison Flaget Designs</title>

    <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
    <link href='https://fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700' rel='stylesheet' type='text/css'>

    <link href="css/agency.min.css" rel="stylesheet">
    <link href="css/overwrite.css" rel="stylesheet">

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation Menu
                </button>
                Madison Flaget Designs

                        Services

                        Portfolio

                        Contact

Graphic Portfolio

A selection of of my graphic designs.

Recruiting Postcard

Graphic Design

Honors Experience Poster

Graphic Design

Magazine Mockup

Graphic Design

Schwanke Honors Institute

Graphic Design

Lil' Smokies Poster

Graphic Design

Porfolio Website

Web Design

Recruiting Postcard

for the Davidson Honors College

As part of a university wide effort to increase enrollment and retention at the University of Montana, I worked with the Davidson Honors College to design new materials to distribute during recruiting visits. The goal was a clean modern design that used the university color themes and incorporated photos of actual DHC students.

Date: August 2016

Client: Davidson Honors College

Category: Graphic Design

                                <button type="button" class="btn btn-primary" data-dismiss="modal"> Close Project</button>

Honors Experience Poster

for the Davidson Honors College

As part of a university wide effort to increase enrollment and retention at the University of Montana, I worked with the Davidson Honors College to design new materials to explain the path to graduating with honors. The goal was to create a simple graphical representation that made the requirements seem less daunting to students and improve enrollment and retention in the DHC.

Date: May 2016

Client: Davidson Honors College

Category: Graphic Design

                                <button type="button" class="btn btn-primary" data-dismiss="modal"> Close Project</button>

Magazine Mockup

fitness magazine mockup for Intro to Illustrator Spring 2016

This project was for my Introduction to Illustrator class at the University of Montana. The parameters were to use Illsutraor to build a magazine from scratch with a cover, two-page article, and full-page ad. We could choose any theme or images that we wanted, but we had to create our own vector assets. We also made an ePub version of the magazine, complete with external links.

Date: April 2016

Client: None

Category: Graphic Design

                                <button type="button" class="btn btn-primary" data-dismiss="modal"> Close Project</button>

Schwanke Honors Institute

Social media based advertisement for the Schwanke Honors Institute

 This ad was created to advertise the Schwanke Honors Institute Resident Assistant job opening on the social media page of the Davidson Honors College. See the DHC website for more details.

Date: Febuary 2016

Client: Davidson Honors College

Category: Graphic Design

                                <button type="button" class="btn btn-primary" data-dismiss="modal"> Close Project</button>

Lil' Smokies Poster

Poster for Missoula based band The Lil Smokies

This project was design mockup for my Intro to Photoshop class. The assignment was to research The Lil' Smokies band and their style, then create a poster for an imaginary concert.

Date: May 2016

Client: None

Category: Graphic Design

                                <button type="button" class="btn btn-primary" data-dismiss="modal"> Close Project</button>

Portfolio Website

An early design for my portfolio website

This was another project for my intro to Photoshop class. The assignment was to make a log for ourselves and use it in a graphical mockup of a portfolio website for ourselves. As you can tell, the design for my porfolio has changed greatly since then.

Date: March 2016

Client: None

Category: Web Design

                                <button type="button" class="btn btn-primary" data-dismiss="modal"> Close Project</button>

                    Copyright © Madison Flaget Photography and Designs 2016


text:
package gov.nist.javax.sip.parser;
import java.text.ParseException;
import gov.nist.javax.sip.address.*;
import gov.nist.javax.sip.header.*;
import gov.nist.core.*;

/**
 * To Header parser.
 *
 * @version 1.2 $Revision: 1.11 $ $Date: 2009/10/22 10:27:38 $
 *
 * @author Olivier Deruelle   <br/>
 *
 *
 */
public class ToParser extends AddressParametersParser {

    /**
     * Creates new ToParser
     * @param to String to set
     */
    public ToParser(String to) {
        super(to);
    }

    protected ToParser(Lexer lexer) {
        super(lexer);
    }

    public SIPHeader parse() throws ParseException {

        headerName(TokenTypes.TO);
        To to = new To();
        super.parse(to);
        this.lexer.match('\n');
        return to;
    }

    /**

        public static void main(String args[]) throws ParseException {
            String to[] = {
               "To: <sip:+1-650-555-2222@ss1.wcom.com;user=phone>;tag=5617\n",
               "To: T. A. Watson <sip:watson@bell-telephone.com;param=something>\n",
               "To: LittleGuy <sip:UserB@there.com;tag=foo>;tag=bar\n",
               "To: sip:mranga@120.6.55.9\n",
               "To: sip:mranga@129.6.55.9;tag=696928473514.129.6.55.9\n",
               "To: sip:mranga@129.6.55.9; tag=696928473514.129.6.55.9\n",
               "To: sip:mranga@129.6.55.9 ;tag=696928473514.129.6.55.9\n",
               "To: sip:mranga@129.6.55.9 ; tag=696928473514.129.6.55.9\n"
            };

            for (int i = 0; i < to.length; i++ ) {
            System.out.println("toParse = " + to[i]);
                ToParser tp =
                new ToParser(to[i]);
                To t = (To) tp.parse();
                System.out.println("encoded = " + t.encode());
            }

        }
    **/
}
/*
 * $Log: ToParser.java,v $
 * Revision 1.11  2009/10/22 10:27:38  jbemmel
 * Fix for issue #230, restructured the code such that parsing for any address appearing without '<' '>'
 * stops at ';', then parameters are assigned to the header as expected
 *
 * Revision 1.10  2009/07/17 18:58:06  emcho
 * Converts indentation tabs to spaces so that we have a uniform indentation policy in the whole project.
 *
 * Revision 1.9  2007/10/23 17:34:55  mranga
 * Issue number:
 * Obtained from:
 * Submitted by:  mranga
 * Reviewed by:   mranga
 *
 * Refactored header collections.
 *
 * Revision 1.8  2006/07/13 09:02:00  mranga
 * Issue number:
 * Obtained from:
 * Submitted by:  jeroen van bemmel
 * Reviewed by:   mranga
 * Moved some changes from jain-sip-1.2 to java.net
 *
 * CVS: ----------------------------------------------------------------------
 * CVS: Issue number:
 * CVS:   If this change addresses one or more issues,
 * CVS:   then enter the issue number(s) here.
 * CVS: Obtained from:
 * CVS:   If this change has been taken from another system,
 * CVS:   then name the system in this line, otherwise delete it.
 * CVS: Submitted by:
 * CVS:   If this code has been contributed to the project by someone else; i.e.,
 * CVS:   they sent us a patch or a set of diffs, then include their name/email
 * CVS:   address here. If this is your work then delete this line.
 * CVS: Reviewed by:
 * CVS:   If we are doing pre-commit code reviews and someone else has
 * CVS:   reviewed your changes, include their name(s) here.
 * CVS:   If you have not had it reviewed then delete this line.
 *
 * Revision 1.3  2006/06/19 06:47:27  mranga
 * javadoc fixups
 *
 * Revision 1.2  2006/06/16 15:26:28  mranga
 * Added NIST disclaimer to all public domain files. Clean up some javadoc. Fixed a leak
 *
 * Revision 1.1.1.1  2005/10/04 17:12:36  mranga
 *
 * Import
 *
 *
 * Revision 1.6  2004/04/22 22:51:18  mranga
 * Submitted by:  Thomas Froment
 * Reviewed by:   mranga
 *
 * Fixed corner cases.
 *
 * Revision 1.5  2004/01/22 13:26:32  sverker
 * Issue number:
 * Obtained from:
 * Submitted by:  sverker
 * Reviewed by:   mranga
 *
 * Major reformat of code to conform with style guide. Resolved compiler and javadoc warnings. Added CVS tags.
 *
 * CVS: ----------------------------------------------------------------------
 * CVS: Issue number:
 * CVS:   If this change addresses one or more issues,
 * CVS:   then enter the issue number(s) here.
 * CVS: Obtained from:
 * CVS:   If this change has been taken from another system,
 * CVS:   then name the system in this line, otherwise delete it.
 * CVS: Submitted by:
 * CVS:   If this code has been contributed to the project by someone else; i.e.,
 * CVS:   they sent us a patch or a set of diffs, then include their name/email
 * CVS:   address here. If this is your work then delete this line.
 * CVS: Reviewed by:
 * CVS:   If we are doing pre-commit code reviews and someone else has
 * CVS:   reviewed your changes, include their name(s) here.
 * CVS:   If you have not had it reviewed then delete this line.
 *
 */

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

	<title>
		Music Disobedience Ensemble
	</title>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

	<meta name="description" content="MinimalCSS is a simple HTML / CSS template that is incredibly easy to customize. It can be downloaded and used with no limitations or obligations.">

	<link href="minimal.css" rel="stylesheet">

			Music Disobedience Ensemble

Bio

				Um laboratório de experimentação sócio-musical, um despertar de sentidos, um desafiar de ouvidos e corações, estudo do som e do silêncio, do caos e da ordem, como partes disparmente complementares. colocar o público como um recetor ativo de pinturas sonoras e experiências, onde o amador e o virtuoso se tocam. Trata a tensão dicotómica entre Natureza e Artifício, Acústico e Digital, Novo e Velho, Bom e Mau, Grande e Pequeno, Paz e Revolta.

Performance Showreel, Lisboa, December 2020

				Residência Músicos de Rua :: MIC®Om@cro :: Carpintarias de São Lázaro

·        ·

Contact / Pages

			music_disobedience [at] pm.me

			Soundcloud

Core Members

						Bruno Reis

						Fabio Sousa

						Martim Morais

						William Primett

</di	v>


text:
package controllers

import akka.actor.ActorSystem
import play.api._
import play.api.mvc._
import scala.concurrent.{ExecutionContext, Future, Promise}
import scala.concurrent.duration._

import scala.concurrent.ExecutionContext.Implicits.global

import org.glowroot.agent.it.harness._

object AsyncController extends Controller {

  val actorSystem = ActorSystem()

  def message = Action {
    val future = getFutureMessage(1.second)
    Async {
      future.map { msg => Ok(msg) }
    }
  }

  private def getFutureMessage(delayTime: FiniteDuration): Future[String] = {
    val promise: Promise[String] = Promise[String]()
    actorSystem.scheduler.scheduleOnce(delayTime) {
      new CreateTraceEntry().traceEntryMarker
      promise.success("Hi!")
    }
    promise.future
  }

  class CreateTraceEntry extends TraceEntryMarker {
      def traceEntryMarker() {}
  }
}


text:
#include <aws/iam/model/CreatePolicyVersionRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>

using namespace Aws::IAM::Model;
using namespace Aws::Utils;

CreatePolicyVersionRequest::CreatePolicyVersionRequest() :
    m_policyArnHasBeenSet(false),
    m_policyDocumentHasBeenSet(false),
    m_setAsDefault(false),
    m_setAsDefaultHasBeenSet(false)
{
}

Aws::String CreatePolicyVersionRequest::SerializePayload() const
{
  Aws::StringStream ss;
  ss << "Action=CreatePolicyVersion&";
  if(m_policyArnHasBeenSet)
  {
    ss << "PolicyArn=" << StringUtils::URLEncode(m_policyArn.c_str()) << "&";
  }
  if(m_policyDocumentHasBeenSet)
  {
    ss << "PolicyDocument=" << StringUtils::URLEncode(m_policyDocument.c_str()) << "&";
  }
  if(m_setAsDefaultHasBeenSet)
  {
    ss << "SetAsDefault=" << m_setAsDefault << "&";
  }
  ss << "Version=2010-05-08";
  return ss.str();
}


text:
<?php

declare(strict_types=1);

namespace Sonata\Doctrine\Document;

use Doctrine\ODM\MongoDB\DocumentManager;
use Doctrine\Persistence\ObjectManager;
use Sonata\Doctrine\Model\BaseManager;

/**
 * @author Hugo Briand <briand@ekino.com>
 *
 * @phpstan-template T of object
 * @phpstan-extends BaseManager<T>
 */
abstract class BaseDocumentManager extends BaseManager
{
    /**
     * @return DocumentManager
     */
    public function getDocumentManager(): ObjectManager
    {
        $dm = $this->getObjectManager();

        \assert($dm instanceof DocumentManager);

        return $dm;
    }
}


text:
package io.reactivesw.customer.customer.application.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import io.reactivesw.order.cart.application.model.Cart;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * Created by umasuo on 16/11/16.
 */
@ApiModel
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class CustomerSignInResult {

  @ApiModelProperty(value = "Customer info.")
  @JsonProperty
  private Customer customer;

}


text:
<?php

namespace alsvanzelf\jsonapi\helpers;

use alsvanzelf\jsonapi\exceptions\InputException;
use alsvanzelf\jsonapi\helpers\Validator;

trait HttpStatusCodeManager {
	/** @var int */
	protected $httpStatusCode;

	/**
	 * spec api
	 */

	/**
	 * @param int $httpStatusCode
	 *
	 * @throws InputException if an invalid code is used
	 */
	public function setHttpStatusCode($httpStatusCode) {
		if (Validator::checkHttpStatusCode($httpStatusCode) === false) {
			throw new InputException('can not use an invalid http status code');
		}

		$this->httpStatusCode = $httpStatusCode;
	}

	/**
	 * internal api
	 */

	/**
	 * @internal
	 *
	 * @return boolean
	 */
	public function hasHttpStatusCode() {
		return ($this->httpStatusCode !== null);
	}

	/**
	 * @internal
	 *
	 * @return int
	 */
	public function getHttpStatusCode() {
		return $this->httpStatusCode;
	}
}


text:
package com.netflix.exhibitor.standalone;

public class SecurityArguments
{
    private final String securityFile;
    private final String realmSpec;
    private final String remoteAuthSpec;

    public SecurityArguments()
    {
        this(null, null, null);
    }

    public SecurityArguments(String securityFile, String realmSpec, String remoteAuthSpec)
    {
        this.securityFile = securityFile;
        this.realmSpec = realmSpec;
        this.remoteAuthSpec = remoteAuthSpec;
    }

    public String getSecurityFile()
    {
        return securityFile;
    }

    public String getRealmSpec()
    {
        return realmSpec;
    }

    public String getRemoteAuthSpec()
    {
        return remoteAuthSpec;
    }
}


text:
"""Support for Volvo On Call sensors."""
from homeassistant.components.sensor import SensorEntity

from . import DATA_KEY, VolvoEntity

async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
    """Set up the Volvo sensors."""
    if discovery_info is None:
        return
    async_add_entities([VolvoSensor(hass.data[DATA_KEY], *discovery_info)])

class VolvoSensor(VolvoEntity, SensorEntity):
    """Representation of a Volvo sensor."""

    @property
    def state(self):
        """Return the state."""
        return self.instrument.state

    @property
    def unit_of_measurement(self):
        """Return the unit of measurement."""
        return self.instrument.unit


text:
load("steal/rhino/steal.js");
steal.plugins('steal/build','steal/build/scripts','steal/build/styles',function(){
	steal.build('sparks/prism/scripts/build.html',{to: 'sparks/prism'});
});


text:
<Record>
<Term>Nitrefazole</Term>
<SemanticType>Pharmacologic Substance</SemanticType>
<ParentTerm>Enzyme Inhibitor</ParentTerm>
<ClassificationPath>Chemicals_and_Drugs_Kind/Drug, Food, Chemical or Biomedical Material/Pharmacologic Substance/Enzyme Inhibitor/Nitrefazole</ClassificationPath>
<BroaderTerm>Chemicals_and_Drugs_Kind</BroaderTerm>
<BroaderTerm>Enzyme Inhibitor</BroaderTerm>
<BroaderTerm>Pharmacologic Substance</BroaderTerm>
<BroaderTerm>Nitrefazole</BroaderTerm>
<BroaderTerm>Drug, Food, Chemical or Biomedical Material</BroaderTerm>
<Synonym>NITREFAZOLE</Synonym>
<Synonym>Nitrefazole</Synonym>
<Source>NCI Thesaurus</Source>
</Record>


text:
package org.pentaho.di.engine.configuration.api;

import java.util.List;

/**
 * Created by bmorrise on 3/17/17.
 */
public interface RunConfigurationFactory {
  List<RunConfiguration> load();
  RunConfiguration load( String name );
  boolean save( RunConfiguration runConfiguration );
  boolean delete( String name );
  void deleteAll();
  List<String> getNames();
}


text:
package de.plushnikov.intellij.plugin.thirdparty;

import de.plushnikov.intellij.plugin.processor.field.AccessorsInfo;
import org.junit.Test;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;

public class LombokUtilsSetterTest {

  private static String makeResults(String fieldName, boolean isBoolean) {
    String lombokResult = LombokHandlerUtil.toSetterName(AccessorsInfo.DEFAULT, fieldName, isBoolean);
    String result = LombokUtils.toSetterName(AccessorsInfo.DEFAULT, fieldName, isBoolean);

    assertThat(result, is(lombokResult));
    return result;
  }

  @Test
  public void testToSetterNames_dValue() {
    String result = makeResults("dValue", false);

    assertThat(result, equalTo("setDValue"));
  }

  @Test
  public void testToSetterNames_Value() {
    String result = makeResults("Value", false);

    assertThat(result, equalTo("setValue"));
  }

  @Test
  public void testToSetterNames_NonBoolean() {
    String result = makeResults("myField", false);

    assertThat(result, equalTo("setMyField"));
  }

  @Test
  public void testToSetterNames_NonBoolean_Uppercase() {
    String result = makeResults("myField", false);

    assertThat(result, equalTo("setMyField"));
  }

  @Test
  public void testToSetterNames_NonBoolean_Uppercase_Multiple() {
    String result = makeResults("MYField", false);

    assertThat(result, equalTo("setMYField"));
  }

  @Test
  public void testToSetterNames_Boolean() {
    String result = makeResults("myField", true);

    assertThat(result, equalTo("setMyField"));
  }

  @Test
  public void testToSetterNames_Boolean_Uppercase() {
    String result = makeResults("MyField", true);

    assertThat(result, equalTo("setMyField"));
  }

  @Test
  public void testToSetterNames_Boolean_is_Lowercase() {
    String result = makeResults("ismyField", true);

    assertThat(result, equalTo("setIsmyField"));
  }

  @Test
  public void testToSetterNames_Boolean_is_Uppercase() {
    String result = makeResults("isMyField", true);

    assertThat(result, equalTo("setMyField"));
  }

  @Test
  public void testToSetterNames_Boolean_IS() {
    String result = makeResults("ISmyField", true);

    assertThat(result, equalTo("setISmyField"));
  }

}


text:
import { async, TestBed, inject } from '@angular/core/testing';

import { LoadingIndicatorService } from './loading-indicator.service';

describe('LoadingIndicatorService', () => {
    let service: LoadingIndicatorService;

    beforeEach(async(() => {
        TestBed.configureTestingModule({
            providers: [LoadingIndicatorService]
        });
    }));

    beforeEach(() => {
        service = new LoadingIndicatorService();
    });

    it('can instantiate service with "new" in Loading Indicator Service', inject([], () => {
        service = new LoadingIndicatorService();
        expect(service instanceof LoadingIndicatorService).toBe(true, 'new service should be ok');
    }));

    it('can instantiate service when inject service in Loading Indicator Service',
        inject([LoadingIndicatorService], (injectedService: LoadingIndicatorService) => {
            expect(injectedService instanceof LoadingIndicatorService).toBe(true, 'new service should be ok');
        })
    );

    it('should emit false when `hide` is called', () => {
        service.loaderObservable.subscribe(show => {
            expect(show).toBe(false);
        });
        service.hide();
    });

    it('should emit true when `show` is called', () => {
        service.loaderObservable.subscribe(show => {
            expect(show).toBe(true);
        });
        service.show();
    });
});


text:
module.exports = function (config) {
    config.set({
        files: [
            'bower_components/underscore/underscore.js',
            'bower_components/angular/angular.js',
            'bower_components/angular-animate/angular-animate.js',
            'bower_components/angular-resource/angular-resource.js',
            'bower_components/angular-ui-router/release/angular-ui-router.js',
            'bower_components/angular-bootstrap/ui-bootstrap.js',
            'bower_components/angular-mocks/angular-mocks.js',
            'app/**/*!(_test).js',
            'app/**/*_test.js'
        ],

        autoWatch: true,

        frameworks: ['jasmine'],

        browsers: ['PhantomJS'],
        reporters: ["progress"],

        plugins: [
            'karma-phantomjs-launcher',
            'karma-chrome-launcher',
            'karma-firefox-launcher',
            'karma-jasmine',
            'karma-junit-reporter'
        ],

        junitReporter: {
            outputFile: 'test_out/unit.xml',
            suite: 'unit'
        },

        client:{
            captureConsole: true
        }

    });
};


text:
/*
 # types object

 Required ref types for communicating with the OpenCL C API.

 **base:** Object
 */

"use strict";

var fastcall = require("fastcall");
var ref = fastcall.ref;
var ffi = fastcall.ffi;
var StructType = fastcall.StructType;
var ArrayType = fastcall.ArrayType;

var ImageFormat = new StructType({
    imageChannelOrder: "uint",
    imageChannelDataType: "uint"
});

var ImageDesc = new StructType({
    // _imageType_
    // - CL_MEM_OBJECT_BUFFER
    // - CL_MEM_OBJECT_IMAGE2D
    // - CL_MEM_OBJECT_IMAGE3D
    imageType: "uint",
    imageWidth: "size_t",
    imageHeight: "size_t",
    imageDepth: "size_t",
    imageArraySize: "size_t",
    imageRowPitch: "size_t",
    imageSlicePitch: "size_t",
    numMipLevels: "uint",
    numSamples: "uint",
    buffer: ref.refType("void")
});

var BufferRegion = new StructType({
    origin: "size_t",
    size: "size_t"
});

var types = {
    ImageFormat: ImageFormat,
    ImageFormatArray: new ArrayType(ImageFormat),
    ImageFormatRef: ref.refType(ImageFormat),
    ImageDesc: ImageDesc,
    ImageDescRef: ref.refType(ImageDesc),
    BufferRegion: BufferRegion,
    Bool: ref.types.uint,
    SizeTArray: new ArrayType("size_t"),
    StringArray: new ArrayType("string"),
    ErrorCode: ref.types.int,
    ErrorCodeRet: ref.refType("int"),
    Bitfield: ref.types.uint64,
    DeviceType: ref.types.uint64,
    PlatformInfo: ref.types.uint,
    DeviceInfo: ref.types.uint,
    DeviceFpConfig: ref.types.uint64,
    DeviceMemCacheType: ref.types.uint,
    DeviceLocalMemType: ref.types.uint,
    DeviceExecCapabilities: ref.types.uint64,
    CommandQueueProperties: ref.types.uint64,
    DevicePartitionProperties: new ArrayType("int"),
    DeviceAffinityDomain: ref.types.uint64,
    ContextProperties: new ArrayType("size_t"),
    ContextInfo: ref.types.uint,
    CommandQueueInfo: ref.types.uint,
    ChannelOrder: ref.types.uint,
    ChannelType: ref.types.uint,
    MemFlags: ref.types.uint64,
    MemObjectType: ref.types.uint,
    MemInfo: ref.types.uint,
    MemMigrationFlags: ref.types.uint64,
    ImageInfo: ref.types.uint,
    BufferCreateType: ref.types.uint,
    AddressingMode: ref.types.uint,
    FilterMode: ref.types.uint,
    SamplerInfo: ref.types.uint,
    MapFlags: ref.types.uint64,
    ProgramInfo: ref.types.uint,
    ProgramBuildInfo: ref.types.uint,
    ProgramBinaryType: ref.types.uint,
    BuildStatus: ref.types.int,
    KernelInfo: ref.types.uint,
    KernelArgInfo: ref.types.uint,
    KernelArgAddressQualifier: ref.types.uint,
    KernelArgAccessQualifier: ref.types.uint,
    KernelArgTypeQualifier: ref.types.uint64,
    KernelWorkGroupInfo: ref.types.uint,
    EventInfo: ref.types.uint,
    CommandType: ref.types.uint,
    CommandExecutionStatus: ref.types.uint,
    ProfilingInfo: ref.types.uint,
    Mem: ref.refType("void"),
    MemArray: new ArrayType(ref.refType("void")),
    PlatformId: ref.refType("void"),
    PlatformIdArray: new ArrayType(ref.refType("void")),
    DeviceId: ref.refType("void"),
    DeviceIdArray: new ArrayType(ref.refType("void")),
    CommandQueue: ref.refType("void"),
    Context: ref.refType("void"),
    Sampler: ref.refType("void"),
    Program: ref.refType("void"),
    ProgramArray: new ArrayType(ref.refType("void")),
    Kernel: ref.refType("void"),
    KernelArray: new ArrayType(ref.refType("void")),
    Event: ref.refType("void"),
    EventRef: ref.refType(ref.refType("void")),
    EventArray: new ArrayType(ref.refType("void")),
    Binary: new ArrayType("byte"),
    Binaries: new ArrayType(ref.refType("void")),
    CreateContextNotify: ffi.Function("void", [ "pointer", "pointer" ]),
    BuildProgramNotify: ffi.Function("void", [ "pointer", "pointer" ]),
    EnqueueNativeKernelUserFunc: ffi.Function("void", [ "pointer" ]),
    SetEventCallbackCallback: ffi.Function("void", [ "pointer", "int", "pointer" ]),
    MemObjectDestructorCallback: ffi.Function("void", [ "pointer", "pointer" ])
};

module.exports = types;


text:
layout: page
title: About
permalink: /about/
---

<link rel="stylesheet" href="{{ site.baseurl }}/font-awesome-4.7.0/css/font-awesome.min.css">

<title>vertical-align</title>

      Obtained my BA in Social Sciences from the University of Stuttgart (supervised by the amazing André Bächtiger). My current masters thesis project involves neural networks trained on textual data to solve a classification task.

      I enjoy predictive modeling and writing lecture materials to get all the crazy thoughts caught.

      The research page is a nice place to see some of my work, its still under development.

      I like to go to conference like `useR! 2017` or ECPR Prague, because one's own local maximum can be pushed to infinity. Proud member of the R-Group Stuttgart and new vice chairman of FÖPS e.V.

[awesome-r](https://awesome-r.com/#awesome-r-machine-learning)
[Shiny Learn](http://sia.webpopix.org/lme.html)

I love equations:

$$mean = 2*2$$

$$x^2$$

$$\bar x$$

[sy-ro@gmx.net](mailto:sy-ro@gmx.net)


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/menuItemRootView"
    android:layout_width="100dp"
    android:layout_height="50dp">

    <TextView
        android:id="@+id/tv_menu_text"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="?attr/selectableItemBackground"
        android:clickable="true"
        android:gravity="center"
        android:paddingBottom="5dp"
        android:paddingLeft="10dp"
        android:paddingRight="10dp"
        android:paddingTop="5dp"
        android:singleLine="true"
        android:text="Menu"
        android:textSize="14sp" />

    <ImageView
        android:id="@+id/iv_expandable_icon"
        android:layout_width="10dp"
        android:layout_height="10dp"
        android:layout_alignParentBottom="true"
        android:layout_alignParentRight="true"
        android:src="@drawable/ic_expandable_arrow" />

    <View
        android:id="@+id/view_divider_bottom"
        android:layout_width="match_parent"
        android:layout_height="1dp"
        android:layout_alignParentBottom="true"
        android:background="@android:color/darker_gray"
        android:visibility="gone" />

    <View
        android:id="@+id/view_divider_right"
        android:layout_width="1dp"
        android:layout_height="match_parent"
        android:layout_alignParentRight="true"
        android:background="@android:color/darker_gray"
        android:visibility="gone" />
</RelativeLayout>


text:
sfFacebookConnect = function(app_id, signin_url)
{
  this.app_id = app_id;
  this.signin_url = signin_url;
  this.callback = '';
  this.forward = '';

  this.init();
};
sfFacebookConnect.prototype.init = function()
{
  FB.init({appId: this.app_id, status: true, cookie: true, xfbml: true});
}
sfFacebookConnect.prototype.getSigninUrl = function()
{
  t_signin_url = this.signin_url;
  if(this.forward != undefined && this.forward != '')
  {
    t_signin_url += '?forward=' + this.forward;
  }

  return t_signin_url;
}
sfFacebookConnect.prototype.gotoLoginPage = function()
{
  document.location.href= this.getSigninUrl();
};
sfFacebookConnect.prototype.requireSession = function(forward, callback, permissions)
{
  this.forward = forward;
  if (callback == undefined || callback == '')
  {
	var current_obj = this;
	callback = function() { current_obj.gotoLoginPage() };
  }
  this.init();

  options = null;
  if (permissions != '')
  {
    options = {scope: permissions};
  }

  FB.login(function(response) {
     if (response.authResponse) {
       callback();
     } else {
       console.log('User cancelled login or did not fully authorize.');
     }
   }, options);

};

/*
 * Show the feed form. This would be typically called in response to the
 * onclick handler of a "Publish" button, or in the onload event after
 * the user submits a form with info that should be published.
 *
 */
sfFacebookConnect.prototype.publishFeedStory = function(form_bundle_id, template_data)
{
  // Load the feed form
  FB.ensureInit(
    function()
    {
      FB.Connect.showFeedDialog(form_bundle_id, template_data);
      //FB.Connect.showFeedDialog(form_bundle_id, template_data, null, null, FB.FeedStorySize.shortStory, FB.RequireConnect.promptConnect);

      // hide the "Loading feed story ..." div
      //ge('feed_loading').style.visibility = "hidden";
    }
  );
};

sfFacebookConnect.prototype.streamPublish = function (message, attachment, action_links)
{
   FB.Connect.streamPublish(message, attachment, action_links);
}


text:
'use strict';

// A test CouchDB server app built using Express and PouchDB

const _ = require('underscore');
const pouchdb = require('pouchdb');
const memdown = require('memdown');
const expouchdb = require('express-pouchdb');
const webapp = require('abacus-webapp');
const cluster = require('abacus-cluster');
const cp = require('child_process');
const commander = require('commander');

const wrap = _.wrap;

// Setup debug log
const debug = require('abacus-debug')('abacus-pouchserver');

// Return an Express app configured to work as a PouchDB server
const pouchserver = (dbopt) => {

  // Configure Node cluster to use a single CPU as PouchDB / LevelDB is not a
  // multi-process db
  cluster.singleton();

  // Create an Express Web app
  const app = webapp.basic();

  // Monkey patch the app.listen() method to add the PouchDB server
  // middleware last, after the app middleware
  app.listen = wrap(app.listen, (listen, opt) => {
    if(cluster.isWorker()) {

      /*
      app.use('/', (req, res, next) => {
          // Intercept session read-writes to prevent that a previously
          // established session be wiped out and replaced by the PouchDB
          // session
          const s = req.session || {};
          Object.defineProperty(req, 'session', {
              set: (v) => extend(s, v),
              get: () => s
          });
          next();
      });
      */

      // Use the PouchDB server middleware
      debug('Initializing database');
      app.use('/', expouchdb(pouchdb.defaults(dbopt ? dbopt : {})));
    }

    // Call the original app listen function
    return listen.call(app, opt);
  });

  return app;
};

// Set default port and host name, command line has higher priority then
// the existing env, then rc files
const conf = () => {
  process.env.PORT = commander.port || process.env.PORT || 5984;
  if(commander.host)
    process.env.HOST = commander.host;
};

// Command line interface
const runCLI = () => {

  // Parse command line options
  commander
    .option('-p, --port <port>', 'port number [5984]')
    .option('-h, --host <hostname>', 'host name [*]')
    .option('start', 'start the server')
    .option('stop', 'stop the server')
    .parse(process.argv);

  // Start DB server
  if(commander.start) {
    conf();

    // Create PouchDB app and listen on the configured port
    const app = pouchserver({
      db: memdown
    });
    app.listen({
      port: parseInt(process.env.PORT),
      hostname: process.env.HOST
    });

  }
  else if (commander.stop)
    // Stop DB server
    cp.exec('pkill -f "node abacus-pouchserver"',
      (err, stdout, stderr) => {
        if(err) debug('Stop error %o', err);
      });
};

// Export our public functions
module.exports = pouchserver;
module.exports.runCLI = runCLI;


text:
<?xml version="1.0" encoding="UTF-8"?>
<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.github.pipelinerunner</groupId>
    <artifactId>pipeline-runner</artifactId>
    <version>1.0</version>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.4.3</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>128</id>
            <name>mvn.128.no</name>
            <url>https://mvn.128.no/maven2</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>com.github.sparkaligner</groupId>
            <artifactId>sparkaligner</artifactId>
            <version>1.1.5</version>
        </dependency>

        <dependency>
            <groupId>com.github.sparkcaller</groupId>
            <artifactId>sparkcaller</artifactId>
            <version>1.0.3</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-cli/commons-cli -->
        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
            <version>1.3.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.spark/spark-core_2.10 -->
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-core_2.11</artifactId>
            <version>2.0.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

</project>


text:
#ifndef UINT_CONTROL_H
#define UINT_CONTROL_H

#include "control.h"

#include "widgets/spin_box_ex.h"
#include <QSlider>
#include <QHBoxLayout>

namespace Imagine
{

class UIntControl : public Control
{
public:
	UIntControl(const std::string& name, unsigned int* pairedValue, unsigned int min, unsigned int max, const std::string& label,
				bool scrubHandle = false);
	virtual ~UIntControl();

	virtual bool valueChanged();

	virtual void refreshFromValue();

	virtual bool deltaChange(float delta, unsigned int index);

protected:
	SpinBoxEx*			m_intSpin;

	unsigned int*		m_pairedValue;

	unsigned int		m_minimum;
	unsigned int		m_maximum;
};

} // namespace Imagine

#endif // UINT_CONTROL_H


text:
package dproxy

// Type is type of value.
type Type int

const (
	// Tunknown shows value is not supported.
	Tunknown Type = iota

	// Tnil shows value is nil.
	Tnil

	// Tbool shows value is bool.
	Tbool

	// Tint64 shows value is int64.
	Tint64

	// Tfloat64 shows value is float64.
	Tfloat64

	// Tstring shows value is string.
	Tstring

	// Tarray shows value is an array ([]interface{})
	Tarray

	// Tmap shows value is a map (map[string]interface{})
	Tmap
)

// detectType returns type of a value.
func detectType(v interface{}) Type {
	if v == nil {
		return Tnil
	}
	switch v.(type) {
	case bool:
		return Tbool
	case int, int32, int64:
		return Tint64
	case float32, float64:
		return Tfloat64
	case string:
		return Tstring
	case []interface{}:
		return Tarray
	case map[string]interface{}:
		return Tmap
	default:
		return Tunknown
	}
}

func (t Type) String() string {
	switch t {
	case Tunknown:
		return "unknown"
	case Tnil:
		return "nil"
	case Tbool:
		return "bool"
	case Tint64:
		return "int64"
	case Tfloat64:
		return "float64"
	case Tstring:
		return "string"
	case Tarray:
		return "array"
	case Tmap:
		return "map"
	default:
		return "unknown"
	}
}


text:
<?php

/**
 * Wrapper class to store an AMF3 flash.utils.ByteArray
 *
 * @package    Zend_Amf
 * @subpackage Value
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Amf_Value_ByteArray
{
    /**
     * @var string ByteString Data
     */
    protected $_data = '';

    /**
     * Create a ByteArray
     *
     * @param  string $data
     * @return void
     */
    public function __construct($data)
    {
        $this->_data = $data;
    }

    /**
     * Return the byte stream
     *
     * @return string
     */
    public function getData()
    {
        return $this->_data;
    }
}


text:
import beaglebone_pru_adc as adc
import subprocess, os.path
import sys, time

class SpeedSensor(adc.Capture):
	def __init__(self, firmware, *k, **kw):
		super(SpeedSensor, self).__init__(*k, **kw)

		fw = os.path.splitext(firmware)[0]
		cmd = [ 'pasm', '-V3', '-b', firmware, fw ]
		p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
		(stdout, stderr) = p.communicate()

		if p.returncode != 0:
			print stdout
			raise IOError('Failed to compile "%s"' % firmware)

		self._firmware = fw = os.path.abspath(fw + '.bin')

		self.encoder0_pin = kw.get('pin', 0)

	def calibrate(self):
		print 'Running encoder for 10 seconds...'

		self.encoder0_threshold = 4096
		self.encoder0_delay = 0
		adc._pru_adc.Capture.start(self, self._firmware)

		time.sleep(10)
		timer = s.timer
		_, min0, max0, _, _ = s.encoder0_values

		self.close()

		print 'Capture runs at %d readings per second' % (timer // 10)
		print 'Time value of one timer unit is %d nanosec' % (1000000000 // timer)
		print 'Range for the encoder:', min0, '-', max0
		print 'Recommended threshold value for encoder is:', int(0.9*(max0-min0))

	def start(self):
		s.encoder0_threshold = 425
		s.encoder0_delay = 1
		adc._pru_adc.Capture.start(self, self._firmware)

	def close(self):
		self.stop()
		self.wait()
		super(SpeedSensor, self).close()

if __name__ == '__main__':
	s = SpeedSensor('tank/firmware.p')

	if '--test' in sys.argv:
		s.calibrate()
		sys.exit()

	try:
		s.start()

		if '-v' in sys.argv:
			while True:
				print s.timer, s.encoder0_values

		num = 0

		while True:
			delta = s.encoder0_ticks - num
			if delta:
				print 'Tick: %s (%s)' % (delta, num)
				num += delta

	except KeyboardInterrupt:
		s.close()


text:
package twiliogo

import "net/http"

// Constants for the IP Messaging service.
const (
	IP_MESSAGING_ROOT     = "https://ip-messaging.twilio.com"
	IP_MESSAGING_VERSION  = "v1"
	IP_MESSAGING_ROOT_URL = IP_MESSAGING_ROOT + "/" + IP_MESSAGING_VERSION
)

// TwilioIPMessagingClient is used for accessing the Twilio IP Messaging API.
type TwilioIPMessagingClient struct {
	TwilioClient
}

var _ Client = &TwilioIPMessagingClient{}

// NewIPMessagingClient creates a new Twilio IP Messaging client.
func NewIPMessagingClient(accountSid, authToken string) *TwilioIPMessagingClient {
	rootUrl := IP_MESSAGING_ROOT + "/" + IP_MESSAGING_VERSION
	return &TwilioIPMessagingClient{TwilioClient{
		accountSid: accountSid,
		authToken:  authToken,
		rootUrl:    rootUrl,
		options: options{
			httpClient: http.DefaultClient,
		},
	},
	}
}


text:
<!DOCTYPE html>

    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />

    <title>{{ page.title }}</title>
    <meta name="description" content="">
    <link rel="stylesheet" type="text/css" href="/assets/css/style.css">
    <link rel="stylesheet" href="/assets/css/hg/monokai_sublime.css">

全部

前端

生活

日志

        <form action="" id="search-form">

          <input id="search-input" type="text" placeholder="Search..." disabled >
        </form>

        {% for post in site.posts %}
          {{ post.title }}{{ post.date | date: "%Y-%m-%d" }}
        {% endfor %}

        {{ content }}

          Table of Contents

   {% include cnzz.html %}
    <button id="js-fullscreen"></button>


text:
/*
 * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
 * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
 * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
 * a choice of LGPL license versions is made available with the language indicating
 * that LGPLv2 or any later version may be used, or where a choice of which version
 * of the LGPL is applied is otherwise unspecified.
 */

#ifndef __dxgitype_h__
#define __dxgitype_h__

#include "dxgiformat.h"

typedef struct DXGI_SAMPLE_DESC {
    UINT Count;
    UINT Quality;
} DXGI_SAMPLE_DESC;

typedef enum DXGI_MODE_ROTATION {
    DXGI_MODE_ROTATION_UNSPECIFIED  = 0,
    DXGI_MODE_ROTATION_IDENTITY     = 1,
    DXGI_MODE_ROTATION_ROTATE90     = 2,
    DXGI_MODE_ROTATION_ROTATE180    = 3,
    DXGI_MODE_ROTATION_ROTATE270    = 4,
} DXGI_MODE_ROTATION;

typedef enum DXGI_MODE_SCANLINE_ORDER {
    DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED        = 0,
    DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE        = 1,
    DXGI_MODE_SCANLINE_ORDER_UPPER_FIELD_FIRST  = 2,
    DXGI_MODE_SCANLINE_ORDER_LOWER_FIELD_FIRST  = 3,
} DXGI_MODE_SCANLINE_ORDER;

typedef enum DXGI_MODE_SCALING {
    DXGI_MODE_SCALING_UNSPECIFIED   = 0,
    DXGI_MODE_SCALING_CENTERED      = 1,
    DXGI_MODE_SCALING_STRETCHED     = 2,
} DXGI_MODE_SCALING;

typedef struct DXGI_RATIONAL {
    UINT Numerator;
    UINT Denominator;
} DXGI_RATIONAL;

typedef struct DXGI_MODE_DESC {
    UINT Width;
    UINT Height;
    DXGI_RATIONAL RefreshRate;
    DXGI_FORMAT Format;
    DXGI_MODE_SCANLINE_ORDER ScanlineOrdering;
    DXGI_MODE_SCALING Scaling;
} DXGI_MODE_DESC;

typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES {
    BOOL ScaleAndOffsetSupported;
    float MaxConvertedValue;
    float MinConvertedValue;
    UINT NumGammaControlPoints;
    float ControlPointPositions[1025];
} DXGI_GAMMA_CONTROL_CAPABILITIES;

typedef struct DXGI_RGB {
    float Red;
    float Green;
    float Blue;
} DXGI_RGB;

typedef struct DXGI_GAMMA_CONTROL {
    DXGI_RGB Scale;
    DXGI_RGB Offset;
    DXGI_RGB GammaCurve[1025];
} DXGI_GAMMA_CONTROL;

#endif


text:
<?php

/*
 *
 *  ____            _        _   __  __ _                  __  __ ____
 * |  _ \ ___   ___| | _____| |_|  \/  (_)_ __   ___      |  \/  |  _ \
 * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
 * |  __/ (_) | (__|   <  __/ |_| |  | | | | | |  __/_____| |  | |  __/
 * |_|   \___/ \___|_|\_\___|\__|_|  |_|_|_| |_|\___|     |_|  |_|_|
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * @author PocketMine Team
 * @link http://www.pocketmine.net/
 *
 *
*/

namespace pocketmine\resourcepacks;

use pocketmine\Server;
use pocketmine\utils\Config;

class ResourcePackManager{

	/** @var Server */
	private $server;

	/** @var string */
	private $path;

	/** @var Config */
	private $resourcePacksConfig;

	/** @var bool */
	private $serverForceResources = false;

	/** @var ResourcePack[] */
	private $resourcePacks = [];

	/** @var ResourcePack[] */
	private $uuidList = [];

	/**
	 * @param Server $server
	 * @param string $path Path to resource-packs directory.
	 */
	public function __construct(Server $server, string $path){
		$this->server = $server;
		$this->path = $path;

		if(!file_exists($this->path)){
			mkdir($this->path);
		}elseif(!is_dir($this->path)){
			throw new \InvalidArgumentException("Resource packs path $path exists and is not a directory");
		}

		if(!file_exists($this->path . "resource_packs.yml")){
			file_put_contents($this->path . "resource_packs.yml", file_get_contents($this->server->getFilePath() . "src/pocketmine/resources/resource_packs.yml"));
		}

		$this->resourcePacksConfig = new Config($this->path . "resource_packs.yml", Config::YAML, []);

		$this->serverForceResources = (bool) $this->resourcePacksConfig->get("force_resources", false);

		$this->server->getLogger()->info("Loading resource packs...");

		foreach($this->resourcePacksConfig->get("resource_stack", []) as $pos => $pack){
			try{
				$packPath = $this->path . DIRECTORY_SEPARATOR . $pack;
				if(file_exists($packPath)){
					$newPack = null;
					//Detect the type of resource pack.
					if(is_dir($packPath)){
						$this->server->getLogger()->warning("Skipped resource entry $pack due to directory resource packs currently unsupported");
					}else{
						$info = new \SplFileInfo($packPath);
						switch($info->getExtension()){
							case "zip":
							case "mcpack":
								$newPack = new ZippedResourcePack($packPath);
								break;
							default:
								$this->server->getLogger()->warning("Skipped resource entry $pack due to format not recognized");
								break;
						}
					}

					if($newPack instanceof ResourcePack){
						$this->resourcePacks[] = $newPack;
						$this->uuidList[$newPack->getPackId()] = $newPack;
					}
				}else{
					$this->server->getLogger()->warning("Skipped resource entry $pack due to file or directory not found");
				}
			}catch(\Throwable $e){
				$this->server->getLogger()->logException($e);
			}
		}

		$this->server->getLogger()->debug("Successfully loaded " . count($this->resourcePacks) . " resource packs");
	}

	/**
	 * Returns whether players must accept resource packs in order to join.
	 * @return bool
	 */
	public function resourcePacksRequired() : bool{
		return $this->serverForceResources;
	}

	/**
	 * Returns an array of resource packs in use, sorted in order of priority.
	 * @return ResourcePack[]
	 */
	public function getResourceStack() : array{
		return $this->resourcePacks;
	}

	/**
	 * Returns the resource pack matching the specified UUID string, or null if the ID was not recognized.
	 *
	 * @param string $id
	 * @return ResourcePack|null
	 */
	public function getPackById(string $id){
		return $this->uuidList[$id] ?? null;
	}

	/**
	 * Returns an array of pack IDs for packs currently in use.
	 * @return string[]
	 */
	public function getPackIdList() : array{
		return array_keys($this->uuidList);
	}
}


text:
import java.util.List;

class Scratch {
  List<caret>
}


text:
using namespace std;

namespace shapelens {

  ShapeletObjectList::ShapeletObjectList() : vector<boost::shared_ptr<ShapeletObject> >() {
  }

  ShapeletObjectList::ShapeletObjectList(string filename) : vector<boost::shared_ptr<ShapeletObject> >() {
    // open file with list of ShapeletObjects
    ifstream listfile (filename.c_str());
    if (listfile.fail()) {
      cout << "ShapeletObjectList: list file does not exists!" << endl;
      terminate();
    }
    // read in list file
    string sifname;
    while(getline(listfile, sifname)) {
      boost::shared_ptr<ShapeletObject> safePointer (new ShapeletObject(sifname));
      ShapeletObjectList::push_back(safePointer);
    }
  }

#ifdef HAS_SQLiteDB
  ShapeletObjectList::ShapeletObjectList(SQLiteDB& sqlite, std::string table, std::string where, bool loadHistory, bool loadCovariance) : vector<boost::shared_ptr<ShapeletObject> >() {

    //send SQL query
    string query = "SELECT id,nmax,beta,chi2,flags,min_x,min_y,size_x,size_y,centroid_x,centroid_y,basefile,prop,";
    if (loadHistory)
      query += "history,";
    else
      query += "NULL,";
    query += "coeffs,";
    if (loadCovariance)
      query += "cov";
    else
    query += "NULL";

    query +=" FROM " + table;

    if (where.size() > 0)
      query += " WHERE " + where;
    query += ";";

    // create prepared statement
    sqlite3_stmt *stmt;
    sqlite3_prepare_v2(sqlite.db, query.c_str(), query.size(), &stmt, NULL);

    // get objects from DB
    ShapeletObject tmp;
    CoefficientVector<data_t>& cv = tmp.coeffs;
    NumMatrix<data_t>& cov = tmp.cov;
    int rc;
    while ((rc = sqlite3_step(stmt)) == SQLITE_ROW) {
      tmp.history.clear();
      tmp.id = sqlite3_column_int(stmt,0);
      cv.setNMax(sqlite3_column_int(stmt,1));
      tmp.setBeta(sqlite3_column_double(stmt,2));
      tmp.chisquare = sqlite3_column_double(stmt,3);
      tmp.flags = bitset<16>(sqlite3_column_int(stmt,4));
      tmp.model.grid = Grid(sqlite3_column_int(stmt,5),
			    sqlite3_column_int(stmt,6),
			    sqlite3_column_int(stmt,7),
			    sqlite3_column_int(stmt,8));
      tmp.xcentroid(0) = sqlite3_column_double(stmt,9);
      tmp.xcentroid(1) = sqlite3_column_double(stmt,10);
      tmp.basefilename = string(reinterpret_cast<const char*>(sqlite3_column_text(stmt,11)));

      // set properties
      tmp.prop.clear();
      if (sqlite3_column_bytes(stmt,12)) {
	istringstream is(reinterpret_cast<const char*>(sqlite3_column_text(stmt,12)));
	tmp.prop.read(is);
      }

      // copy history
      if (sqlite3_column_bytes(stmt,13)) {
	tmp.history.setSilent();
	tmp.history << sqlite3_column_text(stmt,13);
	tmp.history.unsetSilent();
      }

      // load coeffs and cov
      memcpy(cv.c_array(),
	     reinterpret_cast<const data_t*>(sqlite3_column_blob(stmt, 14)),
	     sqlite3_column_bytes(stmt, 14));

      // check whether covariance matrix is stored
      if (sqlite3_column_bytes(stmt, 15)) {
	unsigned int nCoeffs = cv.getNCoeffs();
	cov = NumMatrix<data_t>(nCoeffs,nCoeffs);
	// cov is stored in either symmetric-packed format or compressed
	// into one number (first diagonal element)
	if (sqlite3_column_bytes(stmt, 15) == sizeof(data_t)) {// single element
	  data_t sigma = *reinterpret_cast<const data_t*>(sqlite3_column_blob(stmt, 15));
	  for (unsigned int i=0; i < nCoeffs; i++)
	    cov(i,i) = sigma;
	} else {
	  // as symmetric matrix is stored in packed format
	  // we have to unpack it here again:
	  // readout in row-wise fashion
	  int done = 0;
	  for (unsigned int i = 0; i < nCoeffs; i++) {
	    memcpy(cov.c_array() + i*(nCoeffs+1),
		   reinterpret_cast<const data_t*>(sqlite3_column_blob(stmt, 15)) + done,
		   (nCoeffs-i)*sizeof(data_t));
	    done += nCoeffs-i;
	  }
	  // reconstruct the upper left from the lower right side of cov
	  for (unsigned int i = 1; i < nCoeffs; i++)
	    for (unsigned int j = 0; j < i; j++)
	      cov(i,j) = cov(j,i);
	}
      }

      // push copy of tmp to sl
      boost::shared_ptr<ShapeletObject> safePointer (new ShapeletObject(tmp));
      ShapeletObjectList::push_back(safePointer);
    }
    sqlite3_finalize(stmt);
  }

  void ShapeletObjectList::save(SQLiteDB& sqlite, std::string table) {
    // create table (if it doesn't exist)
    createTable(sqlite,table);

    // create prepared statement
    sqlite3_stmt *stmt;
    std::string query = "INSERT INTO `" + table + "` VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?);";
    sqlite.checkRC(sqlite3_prepare_v2(sqlite.db, query.c_str(), query.size(), &stmt, NULL));
    for(ShapeletObjectList::const_iterator iter = ShapeletObjectList::begin(); iter != ShapeletObjectList::end(); iter++) {
      const ShapeletObject& sobj = *(*iter);
      sqlite.checkRC(sqlite3_bind_int(stmt,1,sobj.getObjectID()));
      sqlite.checkRC(sqlite3_bind_int(stmt,2,sobj.getNMax()));
      sqlite.checkRC(sqlite3_bind_double(stmt,3,sobj.getBeta()));
      sqlite.checkRC(sqlite3_bind_double(stmt,4,sobj.getChiSquare()));
      sqlite.checkRC(sqlite3_bind_int(stmt,5,sobj.getFlags().to_ulong()));
      const Grid& grid = sobj.getGrid();
      sqlite.checkRC(sqlite3_bind_int(stmt,6,grid.getStartPosition(0)));
      sqlite.checkRC(sqlite3_bind_int(stmt,7,grid.getStartPosition(1)));
      sqlite.checkRC(sqlite3_bind_int(stmt,8,grid.getSize(0)));
      sqlite.checkRC(sqlite3_bind_int(stmt,9,grid.getSize(1)));
      const Point<data_t>& centroid = sobj.getCentroid();
      sqlite.checkRC(sqlite3_bind_double(stmt,10,centroid(0)));
      sqlite.checkRC(sqlite3_bind_double(stmt,11,centroid(1)));
      sqlite.checkRC(sqlite3_bind_text(stmt,12,sobj.getBaseFilename().c_str(), sobj.getBaseFilename().size(),SQLITE_STATIC));

      if (sobj.prop.size() > 0) {
	std::ostringstream pis;
	sobj.prop.write(pis,"\\n");
	sqlite.checkRC(sqlite3_bind_text(stmt,13,pis.str().c_str(),pis.str().size(),SQLITE_STATIC));
      } else
	sqlite.checkRC(sqlite3_bind_null(stmt,13));

      std::string hist = sobj.getHistory();
      if (hist.size() > 0) {
	sqlite.checkRC(sqlite3_bind_text(stmt,14,hist.c_str(),hist.size(),SQLITE_STATIC));
      } else
	sqlite.checkRC(sqlite3_bind_null(stmt,14));

      const CoefficientVector<data_t>& coeffs = sobj.getCoeffs();
      int nCoeffs = coeffs.size();
      sqlite.checkRC(sqlite3_bind_blob(stmt,15,coeffs.c_array(),nCoeffs*sizeof(data_t),SQLITE_STATIC));

      // same for cov if not empty
      // only store the neccessary entries of the symmetric matrix
      // by copying them row-wise (and shrinking the number of columns);
      // in case of Gaussian errors with diagonal matrix,
      // store only first diagonal element
      const NumMatrix<data_t>& cov = sobj.getCovarianceMatrix();
      if (cov.getRows() > 0) {
	if (ShapeLensConfig::NOISEMODEL == "GAUSSIAN")
	  sqlite.checkRC(sqlite3_bind_blob(stmt,16,cov.c_array(),sizeof(data_t),SQLITE_STATIC));
	else {
	  unsigned long covlen = ((nCoeffs + 1)*nCoeffs)/2 * sizeof(data_t);
	  data_t* covpacked = (data_t*) malloc(covlen);
	  int done = 0;
	  for (unsigned int i = 0; i < nCoeffs; i++) {
	    memcpy(covpacked + done, cov.c_array() + i*(nCoeffs+1),(nCoeffs-i)*sizeof(data_t));
	    done += nCoeffs-i;
	  }
	  sqlite.checkRC(sqlite3_bind_blob(stmt,16,cov.c_array(),covlen*sizeof(data_t),SQLITE_STATIC));
	  free(covpacked);
	}
      } else
	sqlite.checkRC(sqlite3_bind_null(stmt,16));

      if(sqlite3_step(stmt)!=SQLITE_DONE)
	throw std::runtime_error("ShapeletObjectDB: insertion failed: " + string(sqlite3_errmsg(sqlite.db)));
      sqlite.checkRC(sqlite3_reset(stmt));
    }
    sqlite.checkRC(sqlite3_finalize(stmt));
  }

  void ShapeletObjectList::createTable(SQLiteDB& sqlite, std::string table) {
    string query = "CREATE TABLE IF NOT EXISTS `" + table + "` (";
    query += "`id` int(10) NOT NULL default '0' PRIMARY KEY,";
    query += "`nmax` tinyint(3) NOT NULL default '0',";
    query += "`beta` float NOT NULL default '0',";
    query += "`chi2` float NOT NULL default '0',";
    query += "`flags` smallint(5) NOT NULL default '0',";
    query += "`min_x` int(10) NOT NULL default '0',";
    query += "`min_y` int(10) NOT NULL default '0',";
    query += "`size_x` smallint(5) NOT NULL default '0',";
    query += "`size_y` smallint(5) NOT NULL default '0',";
    query += "`centroid_x` float NOT NULL default '0',";
    query += "`centroid_y` float NOT NULL default '0',";
    query += "`basefile` varchar(255) default NULL,";
    query += "`prop` text,";
    query += "`history` text,";
    query += "`coeffs` blob NOT NULL,";
    query += "`cov` mediumblob)";
    sqlite.query(query);
  }
#endif // HAS_SQLiteDB

  void ShapeletObjectList::average(CoefficientVector<data_t>& mean, CoefficientVector<data_t>& std_mean, data_t& beta) {
    average(mean,std_mean,beta,NULL);
  }

  void ShapeletObjectList::average(CoefficientVector<data_t>& mean, CoefficientVector<data_t>& std_mean, data_t& beta, data_t (* weightFunction) (ShapeletObject&, void*), void* p) {
    // set up two empty matrices for mean and std_mean
    // as they are easier to resize
    NumMatrix<data_t> meanMatrix(1,1), stdMatrix(1,1);
    beta = 0;
    data_t sum_weights = 0, sum_weights2 = 0;
    int nmax=0, n1, n2;

    // go through all ShapeletObjects
    for (ShapeletObjectList::iterator iter = ShapeletObjectList::begin(); iter != ShapeletObjectList::end(); iter++) {
      const CoefficientVector<data_t>& coeffs = (*iter)->getCoeffs();
      const IndexVector& nVector = coeffs.getIndexVector();
      data_t weight = 1;
      if (weightFunction != NULL)
	weight = (*weightFunction)(*(*iter), p);
      // if new coeff matrix is bigger than current matrices:
      // expand them
      if (coeffs.getNMax() > nmax) {
	nmax = coeffs.getNMax();
	meanMatrix.resize_clear(nmax+1, nmax+1);
	stdMatrix.resize_clear(nmax+1,nmax+1);
      }
      // go thru all coeffs
      for (unsigned int i=0; i < nVector.getNCoeffs(); i++) {
	n1 = nVector.getState1(i);
	n2 = nVector.getState2(i);
	meanMatrix(n1,n2) += weight*coeffs(i);
	stdMatrix(n1,n2) += weight*coeffs(i)*coeffs(i);
      }
      beta += weight*((*iter)->getBeta());
      sum_weights += weight;
      sum_weights2 += weight*weight;
    }
    // compute average of beta and all coeffs
    beta /= sum_weights;

    // set up mean and std_mean with appropriate nmax
    mean.setNMax(nmax);
    std_mean.setNMax(nmax);
    const IndexVector& nVector = mean.getIndexVector();
    for (unsigned int i=0; i < nVector.getNCoeffs(); i++) {
      n1 = nVector.getState1(i);
      n2 = nVector.getState2(i);
      std_mean(i) = sqrt((stdMatrix(n1,n2)*sum_weights - meanMatrix(n1,n2)*meanMatrix(n1,n2)) / (sum_weights*sum_weights - sum_weights2));
      mean(i) = meanMatrix(n1,n2) / sum_weights;
    }
  }

  ShapeletObjectList ShapeletObjectList::select(bool (* selectionFunction) (ShapeletObject&, void*), void* p) {
    ShapeletObjectList selection;
    for(vector<boost::shared_ptr<ShapeletObject> >::iterator iter = vector<boost::shared_ptr<ShapeletObject> >::begin(); iter != vector<boost::shared_ptr<ShapeletObject> >::end(); iter++)
      if ((*selectionFunction)(*(*iter),p))
	selection.push_back(*iter);
    return selection;
  }

} // end namespace


text:
package org.apache.causeway.applib.util;

import org.junit.jupiter.api.Test;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;

import org.apache.causeway.applib.annotation.Where;

class EnumsTest {

    @Test
    public void getFriendlyNameOf() {
        assertThat(Enums.getFriendlyNameOf(Where.ANYWHERE), is("Anywhere"));
        assertThat(Enums.getFriendlyNameOf(Where.ALL_TABLES), is("All Tables"));
    }

    @Test
    public void getEnumNameFromFriendly() {
        assertThat(Enums.getEnumNameFromFriendly("Anywhere"), is("ANYWHERE"));
        assertThat(Enums.getEnumNameFromFriendly("All Tables"), is("ALL_TABLES"));
    }

}


text:
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class clarkapp_netlibrary_NetEngine */

#ifndef _Included_clarkapp_netlibrary_NetEngine
#define _Included_clarkapp_netlibrary_NetEngine
#ifdef __cplusplus
extern "C" {
#endif
/*
 * Class:     clarkapp_netlibrary_NetEngine
 * Method:    test
 * Signature: ([Ljava/lang/String;)V
 */
JNIEXPORT void JNICALL Java_clarkapp_netlibrary_NetEngine_test
  (JNIEnv *env, jobject thiz, jobjectArray jstrs);

#ifdef __cplusplus
}
#endif
#endif


text:
"""Utilities for working with SR document instances."""
from collections import defaultdict
from typing import List, Mapping, Optional, Sequence, Tuple, Union

from pydicom.dataset import Dataset
from pydicom.sr.coding import Code

from highdicom.sr.coding import CodedConcept
from highdicom.sr.enum import ValueTypeValues, RelationshipTypeValues
from highdicom.sr.value_types import ContentItem

def find_content_items(
    dataset: Dataset,
    name: Optional[Union[CodedConcept, Code]] = None,
    value_type: Optional[Union[ValueTypeValues, str]] = None,
    relationship_type: Optional[Union[RelationshipTypeValues, str]] = None,
    recursive: bool = False
) -> List[Dataset]:
    """Finds content items in a Structured Report document that match a given
    query.

    Parameters
    ----------
    dataset: pydicom.dataset.Dataset
        SR document instance
    name: Union[highdicom.sr.CodedConcept, pydicom.sr.coding.Code, None], optional
        Coded name that items should have
    value_type: Union[highdicom.sr.ValueTypeValues, str, None], optional
        Type of value that items should have
        (e.g. ``highdicom.sr.ValueTypeValues.CONTAINER``)
    relationship_type: Union[highdicom.sr.RelationshipTypeValues, str, None], optional
        Type of relationship that items should have with its parent
        (e.g. ``highdicom.sr.RelationshipTypeValues.CONTAINS``)
    recursive: bool, optional
        Whether search should be performed recursively, i.e. whether contained
        child content items should also be queried

    Returns
    -------
    List[pydicom.dataset.Dataset]
        flat list of all content items that matched the query

    Raises
    ------
    AttributeError
        When data set does not contain Content Sequence attribute.

    """  # noqa: E501
    def has_name(
        item: ContentItem,
        name: Optional[Union[Code, CodedConcept]]
    ) -> bool:
        if name is None:
            return True
        return item.name == name

    def has_value_type(
        item: ContentItem,
        value_type: Optional[Union[ValueTypeValues, str]]
    ) -> bool:
        if value_type is None:
            return True
        value_type = ValueTypeValues(value_type)
        return item.value_type == value_type

    def has_relationship_type(
            item: ContentItem,
            relationship_type: Optional[Union[RelationshipTypeValues, str]]
    ) -> bool:
        if relationship_type is None:
            return True
        if getattr(item, 'relationship_type', None) is None:
            return False
        relationship_type = RelationshipTypeValues(relationship_type)
        return item.relationship_type == relationship_type

    if not hasattr(dataset, 'ContentSequence'):
        raise AttributeError(
            'Data set does not contain a Content Sequence attribute.'
        )

    def search_tree(
        node: Dataset,
        name: Optional[Union[CodedConcept, Code]],
        value_type: Optional[Union[ValueTypeValues, str]],
        relationship_type: Optional[Union[RelationshipTypeValues, str]],
        recursive: bool
    ) -> List:
        matched_content_items = []
        for i, content_item in enumerate(node.ContentSequence):
            name_code = content_item.ConceptNameCodeSequence[0]
            item = ContentItem(
                value_type=content_item.ValueType,
                name=CodedConcept(
                    value=name_code.CodeValue,
                    scheme_designator=name_code.CodingSchemeDesignator,
                    meaning=name_code.CodeMeaning
                ),
                relationship_type=content_item.get('RelationshipType', None)
            )
            if (has_name(item, name) and
                    has_value_type(item, value_type) and
                    has_relationship_type(item, relationship_type)):
                matched_content_items.append(content_item)
            if hasattr(content_item, 'ContentSequence') and recursive:
                matched_content_items += search_tree(
                    node=content_item,
                    name=name,
                    value_type=value_type,
                    relationship_type=relationship_type,
                    recursive=recursive
                )
        return matched_content_items

    return search_tree(
        node=dataset,
        name=name,
        value_type=value_type,
        relationship_type=relationship_type,
        recursive=recursive
    )

def get_coded_name(item: Dataset) -> CodedConcept:
    """Gets the concept name of a SR Content Item.

    Parameters
    ----------
    item: pydicom.dataset.Dataset
        Content Item

    Returns
    -------
    highdicom.sr.CodedConcept
        Concept name

    """
    try:
        name = item.ConceptNameCodeSequence[0]
    except AttributeError:
        raise AttributeError(
            'Dataset does not contain attribute "ConceptNameCodeSequence" and '
            'thus doesn\'t represent a SR Content Item.'
        )
    return CodedConcept.from_dataset(name)

def get_coded_value(item: Dataset) -> CodedConcept:
    """Gets the value of a SR Content Item with Value Type CODE.

    Parameters
    ----------
    item: pydicom.dataset.Dataset
        Content Item

    Returns
    -------
    highdicom.sr.CodedConcept
        Value

    """
    try:
        value = item.ConceptCodeSequence[0]
    except AttributeError:
        raise AttributeError(
            'Dataset does not contain attribute "ConceptCodeSequence" and '
            'thus doesn\'t represent a SR Content Item of Value Type CODE.'
        )
    return CodedConcept.from_dataset(value)

class _ReferencedSOPInstance(Dataset):

    """Class representing an item of Referenced SOP Sequence."""

    def __init__(
        self,
        sop_class_uid: str,
        sop_instance_uid: str,
    ) -> None:
        """
        Parameters
        ----------
        sop_class_uid: str
            SOP Class UID of the referenced object
        sop_instance_uid: str
            SOP Instance UID of the referenced object

        """
        self.ReferencedSOPClassUID = sop_class_uid
        self.ReferencedSOPInstanceUID = sop_instance_uid

def _create_references(
    collection: Mapping[Tuple[str, str], Sequence[_ReferencedSOPInstance]]
) -> List[Dataset]:
    """Create references.

    Parameters
    ----------
    collection: Mapping[Tuple[str, str], Sequence[pydicom.dataset.Dataset]]
        Mapping of Study and Series Instance UIDs to referenced SOP instances

    Returns
    -------
    List[pydicom.dataset.Dataset]
        Items containing the Study Instance UID and the
        Referenced Series Sequence attributes

    """  # noqa: E501
    study_collection: Mapping[str, List[Dataset]] = defaultdict(list)
    for (study_uid, series_uid), instance_items in collection.items():
        series_item = Dataset()
        series_item.SeriesInstanceUID = series_uid
        series_item.ReferencedSOPSequence = instance_items
        study_collection[study_uid].append(series_item)

    ref_items = []
    for study_uid, series_items in study_collection.items():
        study_item = Dataset()
        study_item.StudyInstanceUID = study_uid
        study_item.ReferencedSeriesSequence = series_items
        ref_items.append(study_item)

    return ref_items

def collect_evidence(
    evidence: Sequence[Dataset],
    content: Dataset
) -> Tuple[List[Dataset], List[Dataset]]:
    """Collect evidence for a SR document.

    Any `evidence` that is referenced in `content` via IMAGE or
    COMPOSITE content items will be grouped together for inclusion in the
    Current Requested Procedure Evidence Sequence and all remaining
    evidence will be grouped for potential inclusion in the Pertinent Other
    Evidence Sequence.

    Parameters
    ----------
    evidence: List[pydicom.dataset.Dataset]
        Metadata of instances that serve as evidence for the SR document content
    content: pydicom.dataset.Dataset
        SR document content

    Returns
    -------
    current_requested_procedure_evidence: List[pydicom.dataset.Dataset]
        Items of the Current Requested Procedure Evidence Sequence
    other_pertinent_evidence: List[pydicom.dataset.Dataset]
        Items of the Pertinent Other Evidence Sequence

    Raises
    ------
    ValueError
        When a SOP instance is referenced in `content` but not provided as
        `evidence`

    """  # noqa: E501
    references = find_content_items(
        content,
        value_type=ValueTypeValues.IMAGE,
        recursive=True
    )
    references += find_content_items(
        content,
        value_type=ValueTypeValues.COMPOSITE,
        recursive=True
    )
    ref_uids = set([
        ref.ReferencedSOPSequence[0].ReferencedSOPInstanceUID
        for ref in references
    ])
    evd_uids = set()
    ref_group: Mapping[Tuple[str, str], List[Dataset]] = defaultdict(list)
    unref_group: Mapping[Tuple[str, str], List[Dataset]] = defaultdict(list)
    for evd in evidence:
        if evd.SOPInstanceUID in evd_uids:
            # Skip potential duplicates
            continue
        evd_item = Dataset()
        evd_item.ReferencedSOPClassUID = evd.SOPClassUID
        evd_item.ReferencedSOPInstanceUID = evd.SOPInstanceUID
        key = (evd.StudyInstanceUID, evd.SeriesInstanceUID)
        if evd.SOPInstanceUID in ref_uids:
            ref_group[key].append(evd_item)
        else:
            unref_group[key].append(evd_item)
        evd_uids.add(evd.SOPInstanceUID)
    if not(ref_uids.issubset(evd_uids)):
        missing_uids = ref_uids.difference(evd_uids)
        raise ValueError(
            'No evidence was provided for the following SOP instances, '
            'which are referenced in the document content: "{}"'.format(
                '", "'.join(missing_uids)
            )
        )

    ref_items = _create_references(ref_group)
    unref_items = _create_references(unref_group)
    return (ref_items, unref_items)


text:
package org.gradle.test.performance.mediummonolithicjavaproject.p492;

import org.gradle.test.performance.mediummonolithicjavaproject.p163.Production3279;
import org.gradle.test.performance.mediummonolithicjavaproject.p327.Production6559;
import org.gradle.test.performance.mediummonolithicjavaproject.p491.Production9839;

public class Production9840 {

    private Production3279 property0;

    public Production3279 getProperty0() {
        return property0;
    }

    public void setProperty0(Production3279 value) {
        property0 = value;
    }

    private Production6559 property1;

    public Production6559 getProperty1() {
        return property1;
    }

    public void setProperty1(Production6559 value) {
        property1 = value;
    }

    private Production9839 property2;

    public Production9839 getProperty2() {
        return property2;
    }

    public void setProperty2(Production9839 value) {
        property2 = value;
    }

    private String property3;

    public String getProperty3() {
        return property3;
    }

    public void setProperty3(String value) {
        property3 = value;
    }

    private String property4;

    public String getProperty4() {
        return property4;
    }

    public void setProperty4(String value) {
        property4 = value;
    }

    private String property5;

    public String getProperty5() {
        return property5;
    }

    public void setProperty5(String value) {
        property5 = value;
    }

    private String property6;

    public String getProperty6() {
        return property6;
    }

    public void setProperty6(String value) {
        property6 = value;
    }

    private String property7;

    public String getProperty7() {
        return property7;
    }

    public void setProperty7(String value) {
        property7 = value;
    }

    private String property8;

    public String getProperty8() {
        return property8;
    }

    public void setProperty8(String value) {
        property8 = value;
    }

    private String property9;

    public String getProperty9() {
        return property9;
    }

    public void setProperty9(String value) {
        property9 = value;
    }

}


text:
/**
 * Serverstub.js
 *
 * Simple dummy server for TDDD97
 *
 * If you're a student, you shouldn't need to look through this file,
 *  the description of how it works is in the lab instructions.
 **/
var serverstub = (function() {
  'use strict';

  var users;
  var loggedInUsers;
  if (localStorage.getItem("users") === null) {
    users = {};
  } else {
    users = JSON.parse(localStorage.getItem("users"));
  }

  if (localStorage.getItem("loggedinusers") === null) {
    loggedInUsers = {};
  } else {
    loggedInUsers = JSON.parse(localStorage.getItem("loggedinusers"));
  }

  var persistUsers = function(){
    localStorage.setItem("users", JSON.stringify(users));
  };
  var persistLoggedInUsers = function(){
    localStorage.setItem("loggedinusers", JSON.stringify(loggedInUsers));
  };
  var tokenToEmail = function(token){
    return loggedInUsers[token];
  };
  var copyUser = function(user){
    return JSON.parse(JSON.stringify(user));
  };

  var serverstub = {
    signIn: function(email, password){
      if(users[email] != null && users[email].password == password){
        var letters = "abcdefghiklmnopqrstuvwwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
        var token = "";
        for (var i = 0 ; i < 36 ; ++i) {
          token += letters[Math.floor(Math.random() * letters.length)];
        }
        loggedInUsers[token] = email;
        persistLoggedInUsers();
        return {"success": true, "message": "Successfully signed in.", "data": token};
      } else {
        return {"success": false, "message": "Wrong username or password."};
      }
    },

    postMessage: function(token, content, toEmail){
      var fromEmail = tokenToEmail(token);
      if (fromEmail != null) {
        if (toEmail == null) {
          toEmail = fromEmail;
        }
        if(users[toEmail] != null){
          var recipient = users[toEmail];
          var message = {"writer": fromEmail, "content": content};
          recipient.messages.unshift(message);
          persistUsers();
          return {"success": true, "message": "Message posted"};
        } else {
          return {"success": false, "message": "No such user."};
        }
      } else {
        return {"success": false, "message": "You are not signed in."};
      }
    },

    getUserDataByToken: function(token){
      var email = tokenToEmail(token);
      return serverstub.getUserDataByEmail(token, email);
    },

    getUserDataByEmail: function(token, email){
      if (loggedInUsers[token] != null){
        if (users[email] != null) {
          var match = copyUser(users[email]);
          delete match.messages;
          delete match.password;
          return {"success": true, "message": "User data retrieved.", "data": match};
        } else {
          return {"success": false, "message": "No such user."};
        }
      } else {
        return {"success": false, "message": "You are not signed in."};
      }
    },

    getUserMessagesByToken: function(token){
      var email = tokenToEmail(token);
      return serverstub.getUserMessagesByEmail(token,email);
    },

    getUserMessagesByEmail: function(token, email){
      if (loggedInUsers[token] != null){
        if (users[email] != null) {
          var match = copyUser(users[email]).messages;
          return {"success": true, "message": "User messages retrieved.", "data": match};
        } else {
          return {"success": false, "message": "No such user."};
        }
      } else {
        return {"success": false, "message": "You are not signed in."};
      }
    },

    signOut: function(token){
      if (loggedInUsers[token] != null){
        delete loggedInUsers[token];
        persistLoggedInUsers();
        return {"success": true, "message": "Successfully signed out."};
      } else {
        return {"success": false, "message": "You are not signed in."};
      }
    },

    signUp: function(inputObject){ // {email, password, firstname, familyname, gender, city, country}
      if (users[inputObject.email] === undefined){
        if(
          (typeof(inputObject.email) === 'string') &&
          (typeof(inputObject.password) === 'string') &&
          (typeof(inputObject.firstname) === 'string') &&
          (typeof(inputObject.familyname) === 'string') &&
          (typeof(inputObject.gender) === 'string') &&
          (typeof(inputObject.city) === 'string') &&
          (typeof(inputObject.country) === 'string')
        ) {
          var user = {
            'email': inputObject.email,
            'password': inputObject.password,
            'firstname': inputObject.firstname,
            'familyname': inputObject.familyname,
            'gender': inputObject.gender,
            'city': inputObject.city,
            'country': inputObject.country,
            'messages': []
          };
            users[inputObject.email] = user;
            persistUsers();
            return {"success": true, "message": "Successfully created a new user."};
        } else {
          return {"success": false, "message": "Form data missing or incorrect type."};
        }

      } else {
        return {"success": false, "message": "User already exists."};
      }
    },

    changePassword: function(token, oldPassword, newPassword){
      if (loggedInUsers[token] != null){
        var email = tokenToEmail(token);
        if (users[email].password == oldPassword){
          users[email].password = newPassword;
          persistUsers();
          return {"success": true, "message": "Password changed."};
        } else {
          return {"success": false, "message": "Wrong password."};
        }
      } else {
        return {"success": false, "message": "You are not logged in."};
      }
    }
  };

  return serverstub;
})();


text:
@class MapViewController;

@interface MapAppAppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *window;
	MapViewController *mapViewController;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;

@end


text:
/*
 * These are globally available services in any component or any other service
 */
import { provide } from 'angular2/core';

// Angular 2
import { FORM_PROVIDERS } from 'angular2/common';

// Angular 2 Http
import { HTTP_PROVIDERS } from 'angular2/http';

// Angular 2 Material
// TODO(gdi2290): replace with @angular2-material/all
import { MATERIAL_PROVIDERS } from './angular2-material2';

// 3rd party providers
import { installSagaMiddleware } from 'store-saga';
import { loggerMiddleware } from 'ngrx-store-logger';

const THIRDPARTY_PROVIDERS = [
  installSagaMiddleware(),
  ...loggerMiddleware()
];

/*
* Application Providers/Directives/Pipes
* providers/directives/pipes that only live in our browser environment
*/
export const APPLICATION_PROVIDERS = [
  ...FORM_PROVIDERS,
  ...HTTP_PROVIDERS,
  ...MATERIAL_PROVIDERS,
  ...THIRDPARTY_PROVIDERS
];

export const PROVIDERS = [
  ...APPLICATION_PROVIDERS
];


text:
Rails.application.routes.draw do

  devise_for :admin_users, ActiveAdmin::Devise.config
  ActiveAdmin.routes(self)
  get 'lease/show'
  post 'lease/create', to: 'lease#create'
  post 'lease/:id' => 'lease#close', as: 'close_lease'

  get 'home/terms'
  get 'home/companies'
  get 'home/about'
  get 'profile/show'
  post 'bids/create', to: 'bids#create'

  get 'equips/restore/:id' => 'equips#restore'
  match "/equips/new" => "equips#create", :via => "post"
  get 'equips/:id/update_cities' => 'equips#update_cities'
  get 'equips/update_cities' => 'equips#update_cities'
  get 'equips/update_marks_equip', as: 'update_marks_equip'
  get 'equips/:id/update_marks' => 'equips#update_marks_equip'
  post 'equips/bids/create', to: 'bids#create'
  resources :equips

  get 'trucks/restore/:id' => 'trucks#restore'
  match "/trucks/new" => "trucks#create", :via => "post"
  get 'trucks/:id/update_cities' => 'trucks#update_cities'
  get 'trucks/update_cities' => 'trucks#update_cities'
  get 'trucks/update_marks_truck', as: 'update_marks_truck'
  get 'trucks/:id/update_marks' => 'trucks#update_marks_truck'
  post 'trucks/bids/create', to: 'bids#create'
  resources :trucks

  get 'cars/restore/:id' => 'cars#restore'
  match "/cars/new" => "cars#create", :via => "post"
  get 'cars/:id/update_cities' => 'cars#update_cities'
  get 'cars/update_cities' => 'cars#update_cities'
  post 'cars/bids/create', to: 'bids#create'
  get 'cars/update_marks', as: 'update_marks'
  get 'cars/:id/update_marks' => 'cars#update_marks'
  resources :cars

  get 'search/update_types', to: 'search#update_types', as: 'update_types'
  get 'update_cities', to: 'search#update_cities', as: 'update_cities'
  get 'search/update_brands', to: 'search#update_brands', as: 'update_brands'
  get 'search/update_marks_search', to: 'search#update_marks_search', as: 'update_marks_search'
  get 'search/result'
  post 'search/result'

  post 'bids/:id' => 'bids#close', as: 'close_bid'

  get 'moderate/index'

  get 'home/index'

  post 'moderate/index', to: 'moderate#send_offer'
  post 'moderate/dell_offer', to: 'moderate#dell_offer'

  get 'offers/comment', to: 'offers#comment'
  get 'offers/update_results'
  get 'offers/new', to: 'offers#new'
  post 'offers/add_comment', to: 'offers#add_comment'
  post 'offers', to: 'offers#create'
  get 'offers/index', to: 'offers#index'
  get 'offers' => redirect('offers/index')

  resources :bids
  resources :lease

  devise_for :users, :controllers => { :registrations => "users/registrations"}

  as :user do
    get "users/sign_up", to: "registrations#new", as: "new"
  end

  root 'offers#index'
end


text:
[Install](https://github.com/joewalnes/websocketd/wiki/Download-and-install) websocketd and add it to your `PATH`.

##### 2. Start a server: getter

Run `websocketd --port=8080 --devconsole ./getter.js` and then go to `http://localhost:8080` to interact with it

##### 3. Start a server: counter

Run `websocketd --port=8080 ./counter.js` to start the server, then go to [examples/html](https://github.com/joewalnes/websocketd/tree/master/examples/html) directory and double click **count.html** to open in a browser


text:
/* suppress inclusion of conflicting openssl functions */
#define OPENSSL_NO_MD5
#define HEADER_HMAC_H
#define HEADER_SHA_H
#include <CommonCrypto/CommonHMAC.h>
#define EVP_md5(...) kCCHmacAlgMD5
/* CCHmac doesn't take md_len and the return type is void */
#define HMAC git_CC_HMAC
static inline unsigned char *git_CC_HMAC(CCHmacAlgorithm alg,
		const void *key, int key_len,
		const unsigned char *data, size_t data_len,
		unsigned char *md, unsigned int *md_len)
{
	CCHmac(alg, key, key_len, data, data_len, md);
	return md;
}

#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
#define APPLE_LION_OR_NEWER
#include <Security/Security.h>
/* Apple's TYPE_BOOL conflicts with config.c */
#undef TYPE_BOOL
#endif

#ifndef SHA1_MAX_BLOCK_SIZE
#error Using Apple Common Crypto library requires setting SHA1_MAX_BLOCK_SIZE
#endif

#ifdef APPLE_LION_OR_NEWER
#define git_CC_error_check(pattern, err) \
	do { \
		if (err) { \
			die(pattern, (long)CFErrorGetCode(err)); \
		} \
	} while(0)

#define EVP_EncodeBlock git_CC_EVP_EncodeBlock
static inline int git_CC_EVP_EncodeBlock(unsigned char *out,
		const unsigned char *in, int inlen)
{
	CFErrorRef err;
	SecTransformRef encoder;
	CFDataRef input, output;
	CFIndex length;

	encoder = SecEncodeTransformCreate(kSecBase64Encoding, &err);
	git_CC_error_check("SecEncodeTransformCreate failed: %ld", err);

	input = CFDataCreate(kCFAllocatorDefault, in, inlen);
	SecTransformSetAttribute(encoder, kSecTransformInputAttributeName,
			input, &err);
	git_CC_error_check("SecTransformSetAttribute failed: %ld", err);

	output = SecTransformExecute(encoder, &err);
	git_CC_error_check("SecTransformExecute failed: %ld", err);

	length = CFDataGetLength(output);
	CFDataGetBytes(output, CFRangeMake(0, length), out);

	CFRelease(output);
	CFRelease(input);
	CFRelease(encoder);

	return (int)strlen((const char *)out);
}

#define EVP_DecodeBlock git_CC_EVP_DecodeBlock
static int inline git_CC_EVP_DecodeBlock(unsigned char *out,
		const unsigned char *in, int inlen)
{
	CFErrorRef err;
	SecTransformRef decoder;
	CFDataRef input, output;
	CFIndex length;

	decoder = SecDecodeTransformCreate(kSecBase64Encoding, &err);
	git_CC_error_check("SecEncodeTransformCreate failed: %ld", err);

	input = CFDataCreate(kCFAllocatorDefault, in, inlen);
	SecTransformSetAttribute(decoder, kSecTransformInputAttributeName,
			input, &err);
	git_CC_error_check("SecTransformSetAttribute failed: %ld", err);

	output = SecTransformExecute(decoder, &err);
	git_CC_error_check("SecTransformExecute failed: %ld", err);

	length = CFDataGetLength(output);
	CFDataGetBytes(output, CFRangeMake(0, length), out);

	CFRelease(output);
	CFRelease(input);
	CFRelease(decoder);

	return (int)strlen((const char *)out);
}
#endif /* APPLE_LION_OR_NEWER */


text:
{-# LANGUAGE ExistentialQuantification #-}

-- | Module containing all globally visible type definitions

module Language.Nano.SMT.Types where

import Data.Hashable
import Data.Monoid
import Data.Function            (on)
import Language.Nano.SMT.Misc   (errorstar, sortNub)

-------------------------------------------------------------------------
-- | Theory Entities -----------------------------------------------------
--------------------------------------------------------------------------

-- | Theory Variables

newtype TVar   = S String
               deriving (Eq, Show)

-- | Theory Operators

data Operator  = Plus               -- ^ addition
               | Minus              -- ^ subtraction
               | App TVar           -- ^ uninterpreted function
               deriving (Eq, Show)

-- | Relations

data Relation  = Eq                 -- ^ Equality
               | Ne                 -- ^ Disequality
               | LeC Int            -- ^ `LeC n x y` is `x - y <= n`
               deriving (Eq, Show)

-- | Theory Expressions

data Expr      = Var TVar
               | Con Int
               | Op  Operator [Expr]
                 deriving (Eq, Show)

-- | Theory Relations

data Atom      = Rel Relation [Expr]
                 deriving (Eq, Show)

-- | Theory Cubes

type TheoryCube a  = [(a, Atom)]

-- | Theory Formula

data TheoryFormula = TheoryCube PVar

--------------------------------------------------------------------------
-- | Source Level Formulas and Results -----------------------------------
--------------------------------------------------------------------------

-- | These will only be used for parsing.

data Formula   = Atom Atom
               | Prop PVar
               | And  [Formula]
               | Or   [Formula]
               | Not  Formula
                 deriving (Eq, Show)

-- | Output Result

data Result    = Satisfiable
               | Unsatisfiable
                 deriving (Eq, Show)

--------------------------------------------------------------------------
-- | Conjunctive Normal Form Formulas ------------------------------------
--------------------------------------------------------------------------

-- | Propositional Variables

type PVar     = Int

-- | Literals

data Literal  = Pos PVar | Neg PVar
                deriving (Eq, Ord, Show)

neg (Pos x) = Neg x
neg (Neg x) = Pos x

cnf :: [[Int]] -> CnfFormula
cnf = map (map lit)

lit n | n > 0     = Pos n
      | n < 0     = Neg (-n)
      | otherwise = errorstar "Cannot convert 0 to literal"

-- | Clauses

type Clause       = [Literal]

-- | CNF Formulas

type CnfFormula = [Clause]

--------------------------------------------------------------------------
-- | SMT Formulas --------------------------------------------------------
--------------------------------------------------------------------------

type SmtFormula = (CnfFormula, TheoryFormula)

--------------------------------------------------------------------------
-- | Solver Results ------------------------------------------------------
--------------------------------------------------------------------------

type Assignment     = [Literal]

data SatResult      = Unsat | Asgn Assignment       deriving (Show)

data TheoryResult a = Sat   | Blocking [a]          deriving (Show)

--------------------------------------------------------------------------
-- | Hash-Consed Formulas Shared Across Theory Solvers and NO ------------
--------------------------------------------------------------------------

type HId = Int

data HExpr = HVar TVar             HId
           | HCon Int              HId
           | HOp  Operator [HExpr] HId
             deriving (Show)

data HAtom = HRel Relation [HExpr] HId
             deriving (Show)

class Hashed a where
  hid :: a -> HId

instance Hashed HExpr where
  hid (HVar _   i) = i
  hid (HCon _   i) = i
  hid (HOp  _ _ i) = i

instance Hashed HAtom where
  hid (HRel _ _ i) = i

instance Hashable HExpr where
  hashWithSalt _ = hid

instance Hashable HAtom where
  hashWithSalt _ = hid

hashEqual x x'   = hid x == hid x'
hashCompare x x' = compare (hid x) (hid x')

instance Eq HExpr where
  (==) = hashEqual

instance Eq HAtom where
  (==) = hashEqual

instance Ord HExpr where
  compare = hashCompare

instance Ord HAtom where
  compare = hashCompare

----------------------------------------------------------------------
-- | API Behavior of a Single Theory Solver --------------------------
----------------------------------------------------------------------

class IsSolver st where
  init :: st
  upd  :: [HAtom] -> st -> (SolveResult, st)

data Solver = forall st. (IsSolver st) => SS st

-------------------------------------------------------------------
-- | Data types to describe behavior of Theory Solvers ------------
-------------------------------------------------------------------

-- | Theory solver either returns (all) new discovered equalities,
--   or a contradiction if one was found (together with the cause).

data SolveResult = Eqs    [Equality]
                 | Contra Cause

-- | Data type for representing @Equality@ between two (hash-consed) terms

data Equality = Equal { lhs   :: HExpr -- ^ Canonical ordering of lhs/rhs
                      , rhs   :: HExpr -- ^ {v: HExpr | (hash lhs) <= (hash v)}
                      , cause :: Cause -- ^ Explanation of equality
                      }

-- | Smart constructor for creating @Equality@ values

equal x y c
  | hid x < hid y = Equal x y c
  | otherwise     = Equal y x c

-- | Data type to explain how an equality was deduced; required to generate
--   blocking/conflict clause (and if you so desire, a proof)

type Cause       = [HId]

-- | Make this instance to combine results from different theory solvers.

instance Monoid SolveResult where
  mempty                    = Eqs []
  mappend c@(Contra _) _    = c
  mappend _ c@(Contra _)    = c
  mappend (Eqs xs) (Eqs ys) = Eqs $ sortNub $ xs ++ ys

instance Eq Equality where
  (==)    = (==) `on` eqSig

instance Ord Equality where
  compare = compare `on` eqSig

eqSig e = (hid $ lhs e, hid $ rhs e)


text:
package org.kisoonlineapp.uc.teilnehmer;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import org.apache.commons.lang3.StringUtils;
import org.kisoonlineapp.model.Teilnehmer;

/**
 * Build search-predicates for finding teilnehmer restricted by
 * teilnehmer-example
 *
 * @author berni
 */
class SearchPredicatesForTeilnehmerFilterForm {

    EntityManager entityManager;

    SearchPredicatesForTeilnehmerFilterForm(EntityManager entityManager) {
        this.entityManager = entityManager;
    }

    List<Predicate> createSearchPredicates(TeilnehmerFilterForm teilnehmerFilterForm, Root<Teilnehmer> root) {

       final  Teilnehmer example = teilnehmerFilterForm.getExample();

       final  CriteriaBuilder builder = this.entityManager.getCriteriaBuilder();
       final  List<Predicate> predicatesList = new ArrayList<>();

        {
            final String vorname = example.getVorname();
            if (isNotEmpty(vorname)) {
                predicatesList.add(builder.like(
                        builder.lower(root.<String>get("vorname")),
                        lowerWildcards(vorname)));
            }
        }
        {
            final String nachname = example.getNachname();
            if (isNotEmpty(nachname)) {
                predicatesList.add(builder.like(
                        builder.lower(root.<String>get("nachname")),
                        lowerWildcards(nachname)));
            }
        }
        {
            final String email = example.getEmail();
            if (isNotEmpty(email)) {
                predicatesList.add(builder.like(
                        builder.lower(root.<String>get("email")),
                        lowerWildcards(email)));
            }
        }
        {
            final String telefon = example.getTelefon();
            if (isNotEmpty(telefon)) {
                predicatesList.add(builder.like(
                        builder.lower(root.<String>get("telefon")),
                        lowerWildcards(telefon)));
            }
        }

        return Collections.unmodifiableList(predicatesList);
    }

    boolean isNotEmpty(String s) {
        return StringUtils.isNotBlank(s);
    }

    String lowerWildcards(String s) {
        return "%" + s.toLowerCase() + "%";
    }

}


text:
    <uib-alert ng-repeat="alert in alerts" type="{{alert.type}}" close="closeAlert($index)">{{alert.msg}}</uib-alert>

Mercadorias Incluir

Mercadorias Atualizar

    <form class="form-horizontal" name="formMercadoria">

        Nome *

          <input type="text" class="form-control" name="nome"
              placeholder="Nome da mercadoria" ng-model="mercadoria.nome"
              required />

        Descrição

          <input type="text" class="form-control" name="descricao"
              placeholder="Descrição da mercadoria" ng-model="mercadoria.descricao" />

        Categoria *

          <input type="text" class="form-control" name="categoria"
              placeholder="Categoria da mercadoria" ng-model="mercadoria.categoria"
              required="true" />

        Quantidade *

          <input type="text" class="form-control" name="quantidade"
              placeholder="Quantidade" ng-model="mercadoria.quantidade"
              required />

        Preço *

          <input type="text" class="form-control" name="preco"
              placeholder="Preço" ng-model="mercadoria.preco"
              required />

        <button type="button" class="btn btn-lg btn-success" ng-click="save()"
            ng-disabled="formMercadoria.nome.$invalid || formMercadoria.categoria.$invalid
          || formMercadoria.quantidade.$invalid || formMercadoria.preco.$invalid">Salvar</button>
        <button type="button" class="btn btn-default btn-lg" ui-sref="base.list">Cancelar</button>
        <button type="button" class="btn btn-lg btn-danger" ng-click="remove()"
            ng-disabled="!mercadoria.id">Excluir</button>

    </form>


text:
<?xml version="1.0" encoding="utf-8" ?>
<Defs>
  <IncidentDef>
    <defName>WandererJoin</defName>
    wanderer join
    <targetType>BaseMap</targetType>
    <workerClass>IncidentWorker_WandererJoin</workerClass>
    <baseChance>0.0</baseChance>
    <populationEffect>Increase</populationEffect>
  </IncidentDef>

  <IncidentDef>
    <defName>PoliteWandererJoin</defName>
    polite wanderer join
    <targetType>BaseMap</targetType>
    <workerClass>NoAutoJoin.IncidentWorker_PoliteWandererJoin</workerClass>
    <baseChance>0.4</baseChance>
    <populationEffect>Increase</populationEffect>
  </IncidentDef>
</Defs>


text:
var should      = require('should');
var config      = require('./apiConfig');
var thunderhead = require('../thunderhead');

describe('Core', function(){
    before(function(){
        //strap up the client object before testing
        this.client = new thunderhead({
            username    : config.username,
            apikey      : config.apiKey,
            internalNet : config.internalNet,
            region      : config.region
        });
    });

    describe('Thunderhead construct', function(){
        it('client should exist', function(done){
            this.client.should.exist;
            done();
        });
    });

    describe('request should succeed with callback', function(){
        it('client should exist', function(done){
            done();
        });
    });

    describe('request should succeed with streaming', function(){
        it('client should exist', function(done){
            done();
        });

        // it('should test request', function(done) {
        //     var request = require('request');
        //     var first = false;
        //     request({
        //         url : 'http://www.google.com',
        //         method : 'GET'
        //     }, function(){
        //         first = first || "CALLBACK";
        //         console.log(first);
        //     }).on('end', function(){
        //         first = first || "PIPE";
        //         console.log(first);
        //     });
        // });
    });

});