text:
package org.apache.orc;

import java.io.Closeable;
import java.io.IOException;

import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;

/**
 * A row-by-row iterator for ORC files.
 */
public interface RecordReader extends Closeable {
  /**
   * Read the next row batch. The size of the batch to read cannot be
   * controlled by the callers. Caller need to look at
   * VectorizedRowBatch.size of the retunred object to know the batch
   * size read.
   * @param batch a row batch object to read into
   * @return were more rows available to read?
   * @throws java.io.IOException
   */
  boolean nextBatch(VectorizedRowBatch batch) throws IOException;

  /**
   * Get the row number of the row that will be returned by the following
   * call to next().
   * @return the row number from 0 to the number of rows in the file
   * @throws java.io.IOException
   */
  long getRowNumber() throws IOException;

  /**
   * Get the progress of the reader through the rows.
   * @return a fraction between 0.0 and 1.0 of rows read
   * @throws java.io.IOException
   */
  float getProgress() throws IOException;

  /**
   * Release the resources associated with the given reader.
   * @throws java.io.IOException
   */
  void close() throws IOException;

  /**
   * Seek to a particular row number.
   */
  void seekToRow(long rowCount) throws IOException;
}


text:
<?php

namespace Elcodi\Bundle\MediaBundle\Tests\Functional\Controller;

use Symfony\Component\HttpFoundation\File\UploadedFile;
use Symfony\Component\Routing\RouteCollection;

use Elcodi\Bundle\TestCommonBundle\Functional\WebTestCase;
use Elcodi\Component\Media\Entity\Interfaces\FileInterface;

/**
 * Class ImageUploadControllerTest.
 */
class ImageUploadControllerTest extends WebTestCase
{
    /**
     * Schema must be loaded in all test cases.
     *
     * @return bool Load schema
     */
    protected static function loadSchema()
    {
        return true;
    }

    /**
     * Test resize action.
     */
    public function testUploadAction()
    {
        /**
         * @var RouteCollection $routeCollection
         */
        $client = $this->createClient();
        $routeCollection = $this
            ->get('router')
            ->getRouteCollection();

        $image = new UploadedFile(
            dirname(__FILE__) . '/images/image.png',
            'image.png',
            'image/png',
            3966,
            null,
            true
        );

        $client->request(
            'POST',
            $routeCollection
                ->get('elcodi.route.image_upload')
                ->getPath(),
            [],
            ['file' => $image]
        );

        $response = $client->getResponse();
        $this->assertEquals(200, $response->getStatusCode());
        $content = json_decode($response->getContent(), true);
        $this->assertEquals('ok', $content['status']);

        /**
         * @var FileInterface $image
         */
        $image = $this->find('image', 1);
        $this->assertInstanceOf('Elcodi\Component\Media\Entity\Interfaces\ImageInterface', $image);
        $this->assertEmpty($image->getContent());
        $this
            ->get('elcodi.manager.media_file')
            ->downloadFile($image);

        $this->assertNotEmpty($image->getContent());
    }
}

redpajama_set_name: RedPajamaGithub


text:
import hazelcast

client = hazelcast.HazelcastClient()

my_set = client.get_set("set")

my_set.add("Item1")
my_set.add("Item1")
my_set.add("Item2")

found = my_set.contains("Item2").result()
print("Set contains Item2:", found)

items = my_set.get_all().result()
print("Size of set:", len(items))

print("\nAll Items:")
for item in items:
    print(item)

client.shutdown()


text:
package io.dropwizard.configuration;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.io.Resources;
import io.dropwizard.configuration.ConfigurationFactoryTest.Example;
import io.dropwizard.jackson.Jackson;
import io.dropwizard.validation.BaseValidator;

import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

import javax.validation.Validator;
import java.io.File;

import static org.assertj.core.api.Assertions.assertThat;

public class ConfigurationFactoryFactoryTest {

    @Rule
    public final ExpectedException expectedException = ExpectedException.none();

    private final ConfigurationFactoryFactory<Example> factoryFactory = new DefaultConfigurationFactoryFactory<>();
    private final Validator validator = BaseValidator.newValidator();

    @Test
    public void createDefaultFactory() throws Exception {
        File validFile = new File(Resources.getResource("factory-test-valid.yml").toURI());
        ConfigurationFactory<Example> factory =
            factoryFactory.create(Example.class, validator, Jackson.newObjectMapper(), "dw");
        final Example example = factory.build(validFile);
        assertThat(example.getName())
            .isEqualTo("Coda Hale");
    }

    @Test
    public void createDefaultFactoryFailsUnknownProperty() throws Exception {
        File validFileWithUnknownProp = new File(
            Resources.getResource("factory-test-unknown-property.yml").toURI());
        ConfigurationFactory<Example> factory =
            factoryFactory.create(Example.class, validator, Jackson.newObjectMapper(), "dw");
        expectedException.expect(ConfigurationException.class);
        expectedException.expectMessage("Unrecognized field at: trait");
        factory.build(validFileWithUnknownProp);
    }

    @Test
    public void createFactoryAllowingUnknownProperties() throws Exception {
        ConfigurationFactoryFactory<Example> customFactory = new PassThroughConfigurationFactoryFactory();
        File validFileWithUnknownProp = new File(
            Resources.getResource("factory-test-unknown-property.yml").toURI());
        ConfigurationFactory<Example> factory =
            customFactory.create(
                Example.class,
                validator,
                Jackson.newObjectMapper().disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES),
                "dw");
        Example example = factory.build(validFileWithUnknownProp);
        assertThat(example.getName())
            .isEqualTo("Mighty Wizard");
    }

    private static final class PassThroughConfigurationFactoryFactory
            extends DefaultConfigurationFactoryFactory<Example> {
        @Override
        protected ObjectMapper configureObjectMapper(ObjectMapper objectMapper) {
            return objectMapper;
        }
    }
}


text:
package leap.htpl;

import leap.htpl.ast.Fragment;
import leap.htpl.ast.Node;
import leap.htpl.exception.HtplCompileException;
import leap.htpl.exception.HtplParseException;
import leap.htpl.exception.HtplRenderException;
import leap.lang.Args;
import leap.lang.Strings;

import java.io.Writer;
import java.util.Locale;
import java.util.Map.Entry;

public class DefaultHtplTemplate extends AbstractHtplTemplate implements HtplTemplate {

	protected final HtplEngine	 engine;
	protected final HtplResource resource;
	protected final Locale		 locale;

	protected HtplDocument documentWithoutLayout;
	protected HtplCompiled compiledWithoutLayout;

	protected TemplateWithLayout templateWithLayout;

	public DefaultHtplTemplate(HtplEngine engine,HtplResource resource,Locale locale){
		Args.notNull(engine,"engine");
		Args.notNull(resource,"resource");
		this.engine   = engine;
		this.locale   = locale;
		this.resource = resource;
		parseAndCompileDocument();
	}

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

	@Override
    public HtplEngine getEngine() {
	    return engine;
    }

	@Override
    public HtplResource getResource() {
	    return resource;
    }

	@Override
    public Locale getLocale() {
	    return locale;
    }

	@Override
    public Object getSource() {
	    return resource.getSource();
    }

	@Override
    public HtplDocument getDocument() {
	    return documentWithoutLayout;
    }

	@Override
    public HtplPage createPage() {
		DefaultHtplPage page = new DefaultHtplPage(this);

		if(null != templateWithLayout){
			page.putProperties(templateWithLayout.document.getProperties());
		}else{
			page.putProperties(documentWithoutLayout.getProperties());
		}

	    return page;
    }

	@Override
    public void render(HtplContext context, Writer writer) {
		render(context,createHtplWriter(writer));
    }

	@Override
    public void render(HtplContext context, HtplWriter writer) {
		try {
            if(!preRenderTemplate(context, writer)) {
                return;
            }

			if(context.isDebug() && null != resource) {
				String path = resource.isResource() ? resource.getResource().getPath() : resource.getFileName();
				if(null != path) {
					writer.append("<!--file: " + path + "-->\n");
				}
			}
			if(null != templateWithLayout && context.isRenderLayout()){
				templateWithLayout.compiled.render(this, context, writer);
			}else{
				compiledWithoutLayout.render(this, context, writer);
			}

            postRenderTemplate(context, writer);

        } catch (HtplException e) {
        	throw e;
        } catch (Throwable e){
        	throw new HtplRenderException("Error render template '" + getSource() + "' : " + e.getMessage(),e);
        }
    }

	@Override
    public void render(HtplTemplate parent, HtplContext context, HtplWriter writer) {
		try {
			if(null != templateWithLayout && context.isRenderLayout()){
				templateWithLayout.compiled.render(parent, context, writer);
			}else{
				compiledWithoutLayout.render(parent, context, writer);
			}
        } catch (HtplException e) {
        	throw e;
        } catch (Throwable e){
        	throw new HtplRenderException("Error render the included template '" + getSource() +
        								  "' in parent template '" + parent.getSource() + "' : " + e.getMessage(),e);
        }
    }

	protected void parseAndCompileDocument(){
		try{
			//Parse and compile document with out layout.
			this.documentWithoutLayout = engine.parseDocument(resource).process();
			this.compiledWithoutLayout = documentWithoutLayout.compile();

			//Resolve and compiles document with default layout
			resolveAndCompileLayoutDocument();

		}catch(Throwable e){
			throw new HtplParseException("Template '" + resource.getSource() + "' parse error : " + e.getMessage(), e);
		}
	}

	protected void resolveAndCompileLayoutDocument(){
		String layoutName = documentWithoutLayout.getLayout();
		if(!Strings.isEmpty(layoutName)){
			HtplTemplate layoutTemplate = engine.resolveTemplate(resource, layoutName, locale);

			if(null == layoutTemplate){
				throw new HtplCompileException("Layout '" + layoutName + "' can not be resolved");
			}

			//add listener to handle reloading of layout template.
			layoutTemplate.addListener(template -> compileLayoutDocument(template));

			//compile it now
			compileLayoutDocument(layoutTemplate);
		}
	}

	protected void compileLayoutDocument(HtplTemplate layoutTemplate) {
		HtplDocument layoutDocument = layoutTemplate.getDocument().deepClone();

		//Merge properties
		layoutDocument.putProperties(getDocument().getProperties());

		//Merge fragments
		for(Entry<String, Fragment> entry : this.documentWithoutLayout.getFragments().entrySet()) {
			layoutDocument.addFragment(entry.getKey(), entry.getValue().deepClone(null));
		}

		//Merge required headers
		Node[] requiredHeaders = this.documentWithoutLayout.getRequiredHeaders();
		for(int i=requiredHeaders.length-1;i>=0;i--) {
			layoutDocument.nodes().childNodes().add(0,requiredHeaders[i].deepClone(null));
		}

		//Replate placeholders
		//replaceLayoutPlaceholders(layoutDocument, layoutDocument.nodes());

		layoutDocument.lock();

		TemplateWithLayout twl = new TemplateWithLayout();
		twl.document = layoutDocument;
		twl.compiled = layoutDocument.compile();

		this.templateWithLayout = twl;
	}

	protected HtplWriter createHtplWriter(Writer out){
		return new DefaultHtplWriter(engine,out);
	}

	/*
	protected void replaceLayoutPlaceholders(HtplDocument layoutDocument, NodeContainer parent){
		replaceLayoutPlaceholders(layoutDocument, parent, new AtomicBoolean(false));
	}

	protected void replaceLayoutPlaceholders(HtplDocument layoutDocument, NodeContainer parent, AtomicBoolean requiredHeadersAdded){
		for(Node node : parent.childNodes()){
			if(node instanceof RenderFragment){
				RenderFragment render = (RenderFragment)node;
				Fragment fragment = documentWithoutLayout.getFragment(render.getName());
				if(null == fragment && render.isRequired()){
					throw new HtplCompileException("The fragment '" + render.getName() + "' must be defined in template '" + getSource() + "'");
				}

				if(null != fragment) {
					List<Node> fragmentNodes = fragment.deepCloneChildNodes();

					if(!requiredHeadersAdded.get()) {

						Node[] nodes = getDocument().getRequiredHeaders();
						if(null != nodes) {
							for(int i=nodes.length-1;i>=0;i--) {
								fragmentNodes.add(0, nodes[i].deepClone(null));
							}
						}

						requiredHeadersAdded.set(true);
					}

					render.setChildNodes(fragmentNodes);
				}else{
					parent.removeChildNode(node);
				}

				continue;
			}

			if(node instanceof NodeContainer){
				replaceLayoutPlaceholders(layoutDocument, (NodeContainer)node, requiredHeadersAdded);
			}
		}
	}
	*/

	@Override
    public String toString() {
		Object source = getSource();

		if(null == source){
			return super.toString();
		}

		return source.toString();
	}

	protected final class TemplateWithLayout {
		protected HtplDocument document;
		protected HtplCompiled compiled;
	}
}


text:
#include <core/ProcessContext.h>

namespace org {
namespace apache {
namespace nifi {
namespace minifi {
namespace core {

bool ProcessContext::getProperty(const std::string &name, std::string &value,
                                 const std::shared_ptr<FlowFile> &flow_file) {
  if (expressions_.find(name) == expressions_.end()) {
    std::string expression_str;
    getProperty(name, expression_str);
    logger_->log_debug("Compiling expression for %s/%s: %s", getProcessorNode()->getName(), name, expression_str);
    expressions_.emplace(name, expression::compile(expression_str));
  }

  value = expressions_[name]({flow_file});
  return true;
}

bool ProcessContext::getDynamicProperty(const std::string &name, std::string &value,
                                 const std::shared_ptr<FlowFile> &flow_file) {
  if (dynamic_property_expressions_.find(name) == dynamic_property_expressions_.end()) {
    std::string expression_str;
    getDynamicProperty(name, expression_str);
    logger_->log_debug("Compiling expression for %s/%s: %s", getProcessorNode()->getName(), name, expression_str);
    dynamic_property_expressions_.emplace(name, expression::compile(expression_str));
  }

  value = dynamic_property_expressions_[name]({flow_file});
  return true;
}

} /* namespace core */
} /* namespace minifi */
} /* namespace nifi */
} /* namespace apache */
} /* namespace org */


text:
class CreateCommunities < ActiveRecord::Migration[5.1]
  def change
    create_table :communities do |t|
      t.string :name, null: false
      t.integer :cap
      t.string :slug, null: false

      t.timestamps
    end

    add_index :communities, :name, unique: true
    add_index :communities, :slug, unique: true
  end
end


text:
import {expect} from "chai";

import {timeago, urlIsValid} from "lib/utils";

describe("timeago", () => {

    it("returns `a few seconds ago` when passed null", () => {
        expect(
            timeago(null)
        ).to.equal("a few seconds ago");
    });

});

describe("urlIsValid", () => {

    it("false on invalid url", () => {
        expect(
            urlIsValid("invalidUrl")
        ).to.equal(false);
    });

    it("false on valid url without http or https protocol string", () => {
        expect(
            urlIsValid("valid-without-protocol.com")
        ).to.equal(false);
        expect(
            urlIsValid("ftp://valid-with-wrong-protocol.com")
        ).to.equal(false);
    });

    it("true on valid url with http or https protocol string", () => {
        expect(
            urlIsValid("https://valid-with-valid-protocol.com")
        ).to.equal(true);
        expect(
            urlIsValid("http://valid-with-valid-protocol.com")
        ).to.equal(true);
    });

});


text:
#define SG_BUILD_LIBRARY

#include <siege/core/entity.h>
#include <siege/audio/source.h>
#include <siege/graphics/sprite.h>
#include <siege/graphics/mask.h>
#include <siege/physics/body.h>

#include <stdlib.h>
#include <string.h>
#include <math.h>

SGbool SG_CALL _sgEntityInit(void)
{
    _sg_entList = sgListCreate();
    if(!_sg_entList)
        return SG_FALSE;
    _sg_entSMap = sgSMapCreate();
    return SG_TRUE;
}
SGbool SG_CALL _sgEntityDeinit(void)
{
    sgEntityDestroyAll();
    sgListDestroy(_sg_entList);
    sgSMapDestroy(_sg_entSMap);
    return SG_TRUE;
}

static void SG_CALL _sg_evCall(SGEntity* entity, size_t num, va_list args)
{
    if(!entity->active) return;

    SGenum type;

    size_t siz[2];
    SGuint val[2];
    void* ptr[2];

    SGuint i;
    for(i = 0; i < num; i++)
    {
        type = va_arg(args, SGenum);
        switch(type)
        {
            case SG_EVF_INIT:
                if(entity->evInit != NULL)
                    entity->evInit(entity);
                break;
            case SG_EVF_DEINIT:
                if(entity->evDeinit != NULL)
                    entity->evDeinit(entity);
                break;

            case SG_EVF_START:
                if(entity->evStart != NULL)
                    entity->evStart(entity);
                break;
            case SG_EVF_EXIT:
                if(entity->evExit != NULL)
                    entity->evExit(entity);
                break;
            case SG_EVF_TICK:
                if(entity->evTick != NULL)
                    entity->evTick(entity);
                break;
            case SG_EVF_TICKB:
                if(entity->evTickBegin != NULL)
                    entity->evTickBegin(entity);
                break;
            case SG_EVF_TICKE:
                if(entity->evTickEnd != NULL)
                    entity->evTickEnd(entity);
                break;
            case SG_EVF_DRAW:
                if(entity->evDraw != NULL)
                    entity->evDraw(entity);
                break;

            case SG_EVF_WINOPEN:
                if(entity->evWindowOpen != NULL)
                    entity->evWindowOpen(entity);
                break;
            case SG_EVF_WINCLOSE:
                if(entity->evWindowClose != NULL)
                    entity->evWindowClose(entity);
                break;
            case SG_EVF_WINRESIZE:
                val[0] = va_arg(args, SGuint);
                val[1] = va_arg(args, SGuint);
                if(entity->evWindowResize != NULL)
                    entity->evWindowResize(entity, val[0], val[1]);
                break;

            case SG_EVF_MOUSEBUTH:
                val[0] = va_arg(args, SGuint);
                if(entity->evMouseButton != NULL)
                    entity->evMouseButton(entity, val[0]);
                break;
            case SG_EVF_MOUSEBUTP:
                val[0] = va_arg(args, SGuint);
                if(entity->evMouseButtonPress != NULL)
                    entity->evMouseButtonPress(entity, val[0]);
                break;
            case SG_EVF_MOUSEBUTR:
                val[0] = va_arg(args, SGuint);
                if(entity->evMouseButtonRelease != NULL)
                    entity->evMouseButtonRelease(entity, val[0]);
                break;

            case SG_EVF_MOUSEBUTLH:
                if(entity->evMouseButtonLeft != NULL)
                    entity->evMouseButtonLeft(entity);
                break;
            case SG_EVF_MOUSEBUTLP:
                if(entity->evMouseButtonLeftPress != NULL)
                    entity->evMouseButtonLeftPress(entity);
                break;
            case SG_EVF_MOUSEBUTLR:
                if(entity->evMouseButtonLeftRelease != NULL)
                    entity->evMouseButtonLeftRelease(entity);
                break;

            case SG_EVF_MOUSEBUTRH:
                if(entity->evMouseButtonRight != NULL)
                    entity->evMouseButtonRight(entity);
                break;
            case SG_EVF_MOUSEBUTRP:
                if(entity->evMouseButtonRightPress != NULL)
                    entity->evMouseButtonRightPress(entity);
                break;
            case SG_EVF_MOUSEBUTRR:
                if(entity->evMouseButtonRightRelease != NULL)
                    entity->evMouseButtonRightRelease(entity);
                break;

            case SG_EVF_MOUSEBUTMH:
                if(entity->evMouseButtonMiddle != NULL)
                    entity->evMouseButtonMiddle(entity);
                break;
            case SG_EVF_MOUSEBUTMP:
                if(entity->evMouseButtonMiddlePress != NULL)
                    entity->evMouseButtonMiddlePress(entity);
                break;
            case SG_EVF_MOUSEBUTMR:
                if(entity->evMouseButtonMiddleRelease != NULL)
                    entity->evMouseButtonMiddleRelease(entity);
                break;

            case SG_EVF_MOUSEMOVE:
                val[0] = va_arg(args, SGint);
                val[1] = va_arg(args, SGint);
                if(entity->evMouseMove != NULL)
                    entity->evMouseMove(entity, val[0], val[1]);
                break;
            case SG_EVF_MOUSEWHEEL:
                val[0] = va_arg(args, SGuint);
                if(entity->evMouseWheel != NULL)
                    entity->evMouseWheel(entity, val[0]);
                break;

            case SG_EVF_KEYKEYH:
                val[0] = va_arg(args, SGuint);
                if(entity->evKeyboardKey != NULL)
                    entity->evKeyboardKey(entity, val[0]);
                break;
            case SG_EVF_KEYKEYP:
                val[0] = va_arg(args, SGuint);
                if(entity->evKeyboardKeyPress != NULL)
                    entity->evKeyboardKeyPress(entity, val[0]);
                break;
            case SG_EVF_KEYKEYR:
                val[0] = va_arg(args, SGuint);
                if(entity->evKeyboardKeyRelease != NULL)
                    entity->evKeyboardKeyRelease(entity, val[0]);
                break;
            case SG_EVF_KEYKEYA:
                val[0] = va_arg(args, SGuint);
                if(entity->evKeyboardKeyRepeat != NULL)
                    entity->evKeyboardKeyRepeat(entity, val[0]);
                break;

            case SG_EVF_KEYCHARP:
                val[0] = va_arg(args, SGenum);
                if(entity->evKeyboardCharPress != NULL)
                    entity->evKeyboardCharPress(entity, val[0]);
                break;

            case SG_EVF_JOYSTICKBUTH:
                val[0] = va_arg(args, SGuint);
                val[1] = va_arg(args, SGuint);
                if(entity->evJoystickButton != NULL)
                    entity->evJoystickButton(entity, val[0], val[1]);
                break;
            case SG_EVF_JOYSTICKBUTP:
                val[0] = va_arg(args, SGuint);
                val[1] = va_arg(args, SGuint);
                if(entity->evJoystickButtonPress != NULL)
                    entity->evJoystickButtonPress(entity, val[0], val[1]);
                break;
            case SG_EVF_JOYSTICKBUTR:
                val[0] = va_arg(args, SGuint);
                val[1] = va_arg(args, SGuint);
                if(entity->evJoystickButtonRelease != NULL)
                    entity->evJoystickButtonRelease(entity, val[0], val[1]);
                break;
            case SG_EVF_JOYSTICKMOVE:
                val[0] = va_arg(args, SGuint);
                ptr[0] = va_arg(args, float*);
                siz[0] = va_arg(args, size_t);
                if(entity->evJoystickMove != NULL)
                    entity->evJoystickMove(entity, val[0], ptr[0], siz[0]);
                break;

            // networking goes here (SG_EVF_NET)

            case SG_EVF_LVLSTART:
                if(entity->evLevelStart != NULL)
                    entity->evLevelStart(entity);
                break;

            case SG_EVF_LVLEND:
                if(entity->evLevelEnd != NULL)
                    entity->evLevelEnd(entity);
                break;

            default:
                if(type & SG_EVT_USER)
                {
                    if(entity->evUser)
                        entity->evUser(entity, type & SG_EV_USERMASK, args);
                }
        }
    }
}
static void SG_CALL _sg_evDraw(SGEntity* entity)
{
    if(entity->visible)
        sgEntityDraw(entity);
}

SGEntity* SG_CALL sgEntityCreate(void)
{
    static const SGEntity DefaultEntity = { 0 };

    SGEntity* entity = malloc(sizeof(SGEntity));
    *entity = DefaultEntity;
    entity->active = SG_TRUE;
    entity->pausable = SG_TRUE;

    entity->visible = SG_TRUE;
    entity->pos = sgVec2f(0.0, 0.0);
    entity->depth = 0.0;
    entity->angle = 0.0;

    entity->minside = SG_FALSE;

    entity->evDraw = _sg_evDraw;

    entity->node = sgListAppend(_sg_entList, entity);
    entity->mnode = NULL;
    return entity;
}
void SG_CALL sgEntityDestroy(SGEntity* entity)
{
    if(entity == NULL)
        return;

    if(entity->lcDestroy != NULL)
        entity->lcDestroy(entity);

    sgListRemoveNode(_sg_entList, entity->node);
    sgEntitySetName(entity, NULL);

    free(entity);
}
void SG_CALL sgEntityDestroyAll(void)
{
    while(_sg_entList->head)
        sgEntityDestroy(_sg_entList->head->item);
}

void SG_CALL sgEntitySetName(SGEntity* entity, const char* name)
{
    SGList* list;
    if(entity->mnode)
    {
        list = entity->mnode->val;
        sgListRemoveNode(list, entity->mlnode);
        if(!list->head)
        {
            sgSMapRemove(_sg_entSMap, entity->mnode->key);
            sgListDestroy(list);
        }
        entity->mnode = NULL;
        entity->mlnode = NULL;
    }
    if(!name)
        return;

    SGSMapNode* mnode = sgSMapFind(_sg_entSMap, name);
    if(!mnode)
        mnode = sgSMapAssignNode(_sg_entSMap, name, sgListCreate());

    entity->mnode = mnode;
    entity->mlnode = sgListAppend(mnode->val, entity);
}
char* SG_CALL sgEntityGetName(SGEntity* entity)
{
    if(!entity->mnode) return NULL;

    return entity->mnode->key;
}

void SG_CALL sgEntitySetSprite(SGEntity* entity, SGSprite* sprite)
{
    if(entity == NULL)
        return;

    entity->sprite = sprite;
}
SGSprite* SG_CALL sgEntityGetSprite(SGEntity* entity)
{
    if(entity == NULL)
        return NULL;

    return entity->sprite;
}

void SG_CALL sgEntitySetMask(SGEntity* entity, SGMask* mask)
{
    if(entity == NULL)
        return;

    entity->mask = mask;
}
SGMask* SG_CALL sgEntityGetMask(SGEntity* entity)
{
    if(entity == NULL)
        return NULL;

    return entity->mask;
}

void SG_CALL sgEntitySetPhysicsBody(SGEntity* entity, SGPhysicsBody* body)
{
    if(entity == NULL)
        return;
    if(entity->body)
        entity->body->entity = NULL;
    if(body)
        body->entity = entity;
    entity->body = body;
}
SGPhysicsBody* SG_CALL sgEntityGetPhysicsBody(SGEntity* entity)
{
    if(entity == NULL)
        return NULL;

    return entity->body;
}

void SG_CALL sgEntitySetAudioSource(SGEntity* entity, SGAudioSource* source)
{
    if(entity == NULL)
        return;

    entity->source = source;
}
SGAudioSource* SG_CALL sgEntityGetAudioSource(SGEntity* entity)
{
    if(entity == NULL)
        return NULL;

    return entity->source;
}

void SG_CALL sgEntitySetPos2fv(SGEntity* entity, SGVec2 pos)
{
    if(entity == NULL)
        return;

    entity->pos = pos;
    if(entity->body != NULL)
        sgPhysicsBodySetPos(entity->body, pos.x, pos.y);
}
void SG_CALL sgEntitySetPos2f(SGEntity* entity, float x, float y)
{
    sgEntitySetPos2fv(entity, sgVec2f(x, y));
}
SGVec2 SG_CALL sgEntityGetPos2fv(SGEntity* entity)
{
    if(entity->body != NULL)
    {
        SGVec2 ret;
        sgPhysicsBodyGetPos(entity->body, &ret.x, &ret.y);
        return ret;
    }
    return entity->pos;
}

void SG_CALL sgEntitySetPosX(SGEntity* entity, float x)
{
    entity->pos.x = x;
    if(entity->body != NULL)
        sgPhysicsBodySetPosX(entity->body, x);
}
float SG_CALL sgEntityGetPosX(SGEntity* entity)
{
    if(entity->body != NULL)
        return sgPhysicsBodyGetPosX(entity->body);
    return entity->pos.x;
}
void SG_CALL sgEntitySetPosY(SGEntity* entity, float y)
{
    entity->pos.y = y;
    if(entity->body != NULL)
        sgPhysicsBodySetPosY(entity->body, y);
}
float SG_CALL sgEntityGetPosY(SGEntity* entity)
{
    if(entity->body != NULL)
        return sgPhysicsBodyGetPosY(entity->body);
    return entity->pos.y;
}

void SG_CALL sgEntitySetDepth(SGEntity* entity, float depth)
{
    if(entity == NULL)
        return;

    entity->depth = depth;
}
float SG_CALL sgEntityGetDepth(SGEntity* entity)
{
    if(entity == NULL)
        return SG_NAN;

    return entity->depth;
}

void SG_CALL sgEntitySetAngleRads(SGEntity* entity, float rads)
{
    if(entity == NULL)
        return;

    entity->angle = rads;
    if(entity->body != NULL)
        sgPhysicsBodySetAngleRads(entity->body, rads);
}
float SG_CALL sgEntityGetAngleRads(SGEntity* entity)
{
    if(entity == NULL)
        return SG_NAN;

    if(entity->body != NULL)
        return sgPhysicsBodyGetAngleRads(entity->body);
    return entity->angle;
}
void SG_CALL sgEntitySetAngleDegs(SGEntity* entity, float degs)
{
    sgEntitySetAngleRads(entity, degs * SG_PI / 180.0);
}
float SG_CALL sgEntityGetAngleDegs(SGEntity* entity)
{
    return sgEntityGetAngleRads(entity) * 180.0 / SG_PI;
}

void SG_CALL sgEntityDraw(SGEntity* entity)
{
    if(entity == NULL)
        return;
    if(entity->sprite == NULL)
        return;

    if(entity->body != NULL)
    {
        sgPhysicsBodyGetPos(entity->body, &entity->pos.x, &entity->pos.y);
        entity->angle = sgPhysicsBodyGetAngleRads(entity->body);
    }

    sgSpriteDrawRads3f1f(entity->sprite, entity->pos.x, entity->pos.y, entity->depth, entity->angle);
}

SGList* SG_CALL sgEntityFind(const char* name)
{
    return sgSMapFind(_sg_entSMap, name);
}
SGEntity* SG_CALL sgEntityFindIter(SGEntity* prev, const char* name)
{
    if(prev)
        return prev->mlnode ? prev->mlnode->next->item : NULL;
    SGList* list = sgSMapFind(_sg_entSMap, name);
    if(list)
        return list->head->item;
    return NULL;
}

void SG_CALL sgEntityEventSignalv(size_t num, va_list args)
{
    _sg_entStop = SG_FALSE;
    SGEntity* entity;
    SGListNode* node;
    SGListNode* next;
    va_list curarg;
    for(node = _sg_entList->head; node; node = next)
    {
        next = node->next;

        if(_sg_entStop)
            break;
        entity = node->item;

        va_copy(curarg, args);
        _sg_evCall(entity, num, curarg);
        va_end(curarg);
    }
}
void SG_CALL sgEntityEventSignal(size_t num, ...)
{
    va_list args;
    va_start(args, num);
    sgEntityEventSignalv(num, args);
    va_end(args);
}
void SG_CALL sgEntityEventStop(void)
{
    _sg_entStop = SG_TRUE;
}


text:
(function() {
	'use strict';

	angular.module('staurtherApp').controller('UserPasswordController', UserPasswordController);

	// inject dependencies
	UserPasswordController.$inject = ['$scope', 'UserService', 'ErrorService'];

	// define functionality
	function UserPasswordController($scope, User, Error) {
		var vm = this;

		// initialize variables
		vm.password = {
			current: '',
			new: '',
			confirm: ''
		};

		vm.loading = { password: false };

		// methods
		vm.updatePassword = function() {
			vm.loading.password = true;

			User.updatePassword(vm.password)
				.then(function(response) {
					vm.password = {
						curent: '',
						new: '',
						confirm: ''
					};

          vm.updatePasswordForm = Error.clearForm(vm.updatePasswordForm); // clear the form's state

          if(angular.isDefined(response.data) && angular.isDefined(response.data.message)) {
          	$scope.$emit('alert:show' , { status: response.data.status, message: response.data.message });
          }
				})
				.catch(function(response) {
					if(angular.isDefined(response.data)) {
						if(angular.isDefined(response.data.message)) {
							$scope.$emit('alert:show' , { status: response.data.status, message: response.data.message });
						}

						if(angular.isDefined(response.data.form)) {
							Error.setFormErrors(response.data.form, vm.updatePasswordForm);
            	vm.formErrors = Error.getFormErrors();
            	$scope.$broadcast('form:server', 'updatePasswordForm');
						}
					}
				})
				.finally(function() {
					vm.loading.password = false;
				});
		};
	}
})();


text:
layout: page
title: Seattle Police Officer 7594 Tyler S. Keating
permalink: /information/agencies/city_of_seattle/seattle_police_department/copbook/7594/
---

**Age as of Feb. 24, 2016:** 38


text:
package org.assertj.core.api.abstract_;

import static org.mockito.Mockito.verify;

import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.AbstractAssertBaseTest;
import org.assertj.core.api.ConcreteAssert;
import org.junit.jupiter.api.Test;

/**
 * Tests for <code>{@link AbstractAssert#isNull()}</code>.
 *
 * @author Alex Ruiz
 */
public class AbstractAssert_isNull_Test extends AbstractAssertBaseTest{

  @Test
  public void should_verify_that_actual_value_is_null() {
  }

  @Override
  protected ConcreteAssert invoke_api_method() {
    assertions.isNull();
    return null;
  }

  @Override
  protected void verify_internal_effects() {
    verify(objects).assertNull(getInfo(assertions), getActual(assertions));
  }

  @Override
  @Test
  public void should_return_this() {
    // Disable this test, the isNull method is void.
  }
}


text:
<html>
	<head>
		<title>{% block titletag %}New Project{% endblock %}</title>
		<link rel="stylesheet" href="/styles/all.min.css">
	</head>
	<body>
		{% block bodytag %}{% endblock %}

		<script src="/scripts/all.min.js"></script>
	</body>
</html>


text:
import numpy as np

from RULEngine.Debug.debug_interface import DebugInterface
from RULEngine.Game.OurPlayer import OurPlayer
from RULEngine.Util.Pose import Pose
from RULEngine.Util.constant import BALL_RADIUS, ROBOT_RADIUS
from RULEngine.Util.geometry import get_distance
from ai.STA.Action.Idle import Idle
from ai.STA.Action.grab import Grab
from ai.STA.Tactic.Tactic import Tactic
from ai.STA.Tactic.tactic_constants import Flags
from ai.STA.Action.GoBehind import GoBehind
from ai.states.game_state import GameState

__author__ = 'RoboCupULaval'

ORIENTATION_DEADZONE = 0.2
DISTANCE_TO_KICK_REAL = ROBOT_RADIUS * 3.4
DISTANCE_TO_KICK_SIM = ROBOT_RADIUS + BALL_RADIUS
COMMAND_DELAY = 1.5

class Capture(Tactic):
    """
    méthodes:
        exec(self) : Exécute une Action selon l'état courant
    attributs:
        game_state: L'état courant du jeu.
        player : Instance du joueur auquel est assigné la tactique
        current_state : L'état courant de la tactique
        next_state : L'état suivant de la tactique
        status_flag : L'indicateur de progression de la tactique
        target: Position à laquelle faire face après avoir pris la balle
    """

    def __init__(self, game_state: GameState, player: OurPlayer, target: Pose=Pose(), args=None):
        Tactic.__init__(self, game_state, player, target, args)
        self.current_state = self.get_behind_ball
        self.next_state = self.get_behind_ball
        self.debug_interface = DebugInterface()

        self.target = target

    def get_behind_ball(self):
        self.status_flag = Flags.WIP

        player_x = self.player.pose.position.x
        player_y = self.player.pose.position.y

        ball_x = self.game_state.get_ball_position().x
        ball_y = self.game_state.get_ball_position().y

        vector_player_2_ball = np.array([ball_x - player_x, ball_y - player_y])
        vector_player_2_ball /= np.linalg.norm(vector_player_2_ball)

        if self._is_player_towards_ball_and_target():
            self.next_state = self.grab_ball
            # orientation_target = self.player.pose.orientation
        else:
            self.next_state = self.get_behind_ball
        return GoBehind(self.game_state, self.player, self.game_state.get_ball_position(),
                        self.target.position, 120, pathfinding=True)

    def grab_ball(self):
        if self._get_distance_from_ball() < 120:
            self.next_state = self.keep
        elif self._is_player_towards_ball_and_target(-0.9):
            self.next_state = self.grab_ball
        else:
            self.next_state = self.get_behind_ball
        return Grab(self.game_state, self.player)

    def keep(self):
        if self._get_distance_from_ball() < 120:
            self.next_state = self.keep
            self.status_flag = Flags.SUCCESS
        elif self._is_player_towards_ball_and_target(-0.4):
            self.next_state = self.grab_ball
            self.status_flag = Flags.WIP
        else:
            self.next_state = self.get_behind_ball
            self.status_flag = Flags.WIP
        return Idle(self.game_state, self.player)

    def _get_distance_from_ball(self):
        return get_distance(self.player.pose.position, self.game_state.get_ball_position())

    def _is_player_towards_ball_and_target(self, fact=-0.99):
        player = self.player.pose.position.conv_2_np()
        ball = self.game_state.get_ball_position().conv_2_np()
        target = self.target.position.conv_2_np()

        vector_player_2_ball = ball - player
        vector_target_2_ball = ball - target
        if not (np.linalg.norm(vector_player_2_ball) == 0):
            vector_player_2_ball /= np.linalg.norm(vector_player_2_ball)
        if not (np.linalg.norm(vector_target_2_ball) == 0):
            vector_target_2_ball /= np.linalg.norm(vector_target_2_ball)
        vector_player_dir = np.array([np.cos(self.player.pose.orientation),
                                      np.sin(self.player.pose.orientation)])
        if np.dot(vector_player_2_ball, vector_target_2_ball) < fact:
            if np.dot(vector_player_dir, vector_target_2_ball) < fact:
                return True
        return False

    def _is_player_towards_target(self, fact=-0.99):

        player = self.player.pose.position.conv_2_np()
        target = self.target.position.conv_2_np()

        vector_target_2_player = player - target
        vector_target_2_player /= np.linalg.norm(vector_target_2_player)
        vector_player_dir = np.array([np.cos(self.player.pose.orientation),
                                      np.sin(self.player.pose.orientation)])
        if np.dot(vector_player_dir, vector_target_2_player) < fact:
            return True
        return False


text:
#ifndef OVR_PacketizedTCPSocket_h
#define OVR_PacketizedTCPSocket_h

#include "OVR_Socket.h"
#include "../Kernel/OVR_Allocator.h"
#include "../Kernel/OVR_Atomic.h"

#ifdef OVR_OS_WIN32
#include "OVR_Win32_Socket.h"
#else
#include "OVR_Unix_Socket.h"
#endif

namespace OVR { namespace Net {

//-----------------------------------------------------------------------------
// NetworkPlugin

// Packetized TCP base socket
class PacketizedTCPSocketBase : public TCPSocket
{
public:
	PacketizedTCPSocketBase() {}
	PacketizedTCPSocketBase(SocketHandle _sock, bool isListenSocket) : TCPSocket(_sock, isListenSocket) {}
};

//-----------------------------------------------------------------------------
// PacketizedTCPSocket

// Uses TCP but is message aligned rather than stream aligned
// Alternative to reliable UDP
class PacketizedTCPSocket : public PacketizedTCPSocketBase
{
public:
	PacketizedTCPSocket();
	PacketizedTCPSocket(SocketHandle _sock, bool isListenSocket);
	virtual ~PacketizedTCPSocket();

public:
	virtual int Send(const void* pData, int bytes);
	virtual int SendAndConcatenate(const void** pDataArray, int *dataLengthArray, int arrayCount);

protected:
	virtual void OnRecv(SocketEvent_TCP* eventHandler, uint8_t* pData, int bytesRead);

	int BytesFromStream(uint8_t* pData, int bytesRead);

    Lock   sendLock;
    Lock   recvBuffLock;

	uint8_t* pRecvBuff;     // Queued receive buffered data
	int    pRecvBuffSize; // Size of receive queue in bytes
};

}} // OVR::Net

#endif


text:
.pixangular * {
  font-family: arial;
  box-sizing: border-box;
}
.pixangular.editing .pixangular-grid .pixangular-row .pixangular-cell {
  cursor: cell;
}
.pixangular.editing .pixangular-grid .pixangular-row .pixangular-cell:hover {
  opacity: 0.5;
}
.pixangular.editing .pixangular-grid .pixangular-row .pixangular-cell.showgrid {
  border: solid thin #ccc;
}
.pixangular.editing .pixangular-editor {
  display: block;
}
.pixangular .pixangular-grid {
  position: relative;
  display: flex;
  flex-direction: column;
}
.pixangular .pixangular-grid* {
  padding: 0;
  margin: 0;
}
.pixangular .pixangular-grid .pixangular-row {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-grow: 1;
}
.pixangular .pixangular-grid .pixangular-row .pixangular-cell {
  position: relative;
  display: inline;
  flex-grow: 1;
}
.pixangular .pixangular-editor {
  display: none;
}
.pixangular .pixangular-editor .pixangular-controls .control-group {
  margin-bottom: 10px;
}
.pixangular .pixangular-editor .pixangular-console {
  position: relative;
  overflow: auto;
  height: 100px;
  width: 500px;
  border: solid thin #ccc;
  padding: 10px;
}


text:
<!doctype html>

    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>R & B Company | Products</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    include "head.html"

            include "header.html"

                include "product.html"

        include "footer.html"
        include "foot.html"


text:
from logging import getLogger

from plenum.common.constants import DOMAIN_LEDGER_ID
from plenum.common.util import getMaxFailures
from plenum.server.replica import Replica

from plenum.test.checkpoints.conftest import tconf, chkFreqPatched, \
    reqs_for_checkpoint
from plenum.test.helper import send_reqs_batches_and_get_suff_replies, assertExp
from plenum.test.node_catchup.helper import waitNodeDataInequality, waitNodeDataEquality, \
    repair_broken_node, get_number_of_completed_catchups

logger = getLogger()

CHK_FREQ = 5
LOG_SIZE = 3 * CHK_FREQ

def test_node_catchup_after_checkpoints(
        looper,
        chkFreqPatched,
        reqs_for_checkpoint,
        txnPoolNodeSet,
        sdk_pool_handle,
        sdk_wallet_client,
        broken_node_and_others):
    """
    A node misses 3pc messages and checkpoints during some period but later it
    stashes some amount of checkpoints and decides to catchup.
    """
    view_no = txnPoolNodeSet[0].viewNo
    max_batch_size = chkFreqPatched.Max3PCBatchSize
    broken_node, other_nodes = broken_node_and_others

    logger.info("Step 1: The node misses quite a lot of requests")

    send_reqs_batches_and_get_suff_replies(looper, txnPoolNodeSet,
                                           sdk_pool_handle,
                                           sdk_wallet_client,
                                           reqs_for_checkpoint + max_batch_size)

    waitNodeDataInequality(looper, broken_node, *other_nodes)

    logger.info(
        "Step 2: The node gets requests but cannot process them because of "
        "missed ones. But the nodes eventually stashes some amount checkpoints "
        "after that the node starts catch up")

    repaired_node = repair_broken_node(broken_node)
    completed_catchups_before = get_number_of_completed_catchups(broken_node)

    send_reqs_batches_and_get_suff_replies(looper, txnPoolNodeSet,
                                           sdk_pool_handle,
                                           sdk_wallet_client,
                                           (Replica.STASHED_CHECKPOINTS_BEFORE_CATCHUP + 1) *
                                           reqs_for_checkpoint - max_batch_size)

    waitNodeDataEquality(looper, repaired_node, *other_nodes,
                         exclude_from_check=['check_last_ordered_3pc_backup'])
    # Note that the repaired node might not fill the gap of missed 3PC-messages
    # by requesting them from other nodes because these 3PC-batches start from
    # an already stabilized checkpoint, so a part of these 3PC-messages are
    # already unavailable

    # Verify that a catch-up was done
    completed_catchups_after = get_number_of_completed_catchups(repaired_node)
    assert completed_catchups_after > completed_catchups_before

    logger.info("Step 3: Check if the node is able to process requests")

    send_reqs_batches_and_get_suff_replies(looper, txnPoolNodeSet,
                                           sdk_pool_handle,
                                           sdk_wallet_client,
                                           reqs_for_checkpoint + max_batch_size)

    waitNodeDataEquality(looper, repaired_node, *other_nodes)


text:
from django.conf import settings

from ..product.models import Category

def get_setting_as_dict(name, short_name=None):
    short_name = short_name or name
    try:
        return {short_name: getattr(settings, name)}
    except AttributeError:
        return {}

# request is a required parameter
# pylint: disable=W0613
def default_currency(request):
    return get_setting_as_dict('DEFAULT_CURRENCY')

# request is a required parameter
# pylint: disable=W0613
def categories(request):
    return {'categories': Category.tree.root_nodes().filter(hidden=False)}


text:
/*******************************************ÉêÃ÷***************************************
±¾Ç¶Èëʽ²Ù×÷ϵͳδ¾ÊÚȨ£¬½ûÖ¹Ó¦ÓÃÓÚÈκÎÉÌÒµÓÃ;
°æȨËùÓУ¬ÇÖȨ±Ø¾¿
**************************************************************************************/
/**********************************************************************
* $Id$		lpc177x_8x_usbhost.h			2011-09-05
*//**
* @file		lpc177x_8x_usbhost.h
* @brief		Host Controller functions.
* @version	1.0
* @date		05. September. 2011
* @author	NXP MCU SW Application Team
*
* Copyright(C) 2011, NXP Semiconductor
* All rights reserved.
*
***********************************************************************
* Software that is described herein is for illustrative purposes only
* which provides customers with programming information regarding the
* products. This software is supplied "AS IS" without any warranties.
* NXP Semiconductors assumes no responsibility or liability for the
* use of the software, conveys no license or title under any patent,
* copyright, or mask work right to the product. NXP Semiconductors
* reserves the right to make changes in the software without
* notification. NXP Semiconductors also make no representation or
* warranty that such application will be suitable for the specified
* use without further testing or modification.
* Permission to use, copy, modify, and distribute this software and its
* documentation is hereby granted, under NXP Semiconductors'
* relevant copyright in the software, without fee, provided that it
* is used in conjunction with NXP Semiconductors microcontrollers.  This
* copyright, permission, and disclaimer notice must appear in all copies of
* this code.
**********************************************************************/

#ifndef LPC177x_8x_USBHOST_H
#define LPC177x_8x_USBHOST_H

/* Peripheral group ----------------------------------------------------------- */
/** @defgroup USBHostLite 	USBHost (USB Host Controller)
 * @ingroup LPC177x_8xCMSIS_FwLib_Drivers
 * @{
 */

/*
**************************************************************************************************************
*                                       INCLUDE HEADER FILES
**************************************************************************************************************
*/
#include "LPC177x_8x.h"
#include "lpc_types.h"

/* Public macros ------------------------------------------------------------- */
/** @defgroup USB_Host_Macros	USB Host Public Macros
 * @{
 */

/*********************************************************************//**
 *  USB HOST GENERAL DEFINITIONS
 **********************************************************************/
#define HOST_BASE_ADDR		LPC_PERI_RAM_BASE

#define  DESC_LENGTH(x)  x[0]
#define  DESC_TYPE(x)    x[1]

#define  HOST_GET_DESCRIPTOR(descType, descIndex, data, length)                      \
         Host_CtrlRecv(USB_DEVICE_TO_HOST | USB_RECIPIENT_DEVICE, GET_DESCRIPTOR,    \
         (descType << 8)|(descIndex), 0, length, data)

#define  HOST_SET_ADDRESS(new_addr)                                                  \
         Host_CtrlSend(USB_HOST_TO_DEVICE | USB_RECIPIENT_DEVICE, SET_ADDRESS,       \
         new_addr, 0, 0, NULL)

#define  USBH_SET_CONFIGURATION(configNum)                                           \
         Host_CtrlSend(USB_HOST_TO_DEVICE | USB_RECIPIENT_DEVICE, SET_CONFIGURATION, \
         configNum, 0, 0, NULL)

#define  USBH_SET_INTERFACE(ifNum, altNum)                                           \
         Host_CtrlSend(USB_HOST_TO_DEVICE | USB_RECIPIENT_INTERFACE, SET_INTERFACE,  \
         altNum, ifNum, 0, NULL)

/*********************************************************************//**
 *  OHCI OPERATIONAL REGISTER FIELD DEFINITIONS
 **********************************************************************/
 											/* ------------------ HcControl Register ---------------------  */
#define  OR_CONTROL_CLE                 0x00000010
#define  OR_CONTROL_BLE                 0x00000020
#define  OR_CONTROL_HCFS                0x000000C0
#define  OR_CONTROL_HC_OPER             0x00000080
                                            /* ----------------- HcCommandStatus Register ----------------- */
#define  OR_CMD_STATUS_HCR              0x00000001
#define  OR_CMD_STATUS_CLF              0x00000002
#define  OR_CMD_STATUS_BLF              0x00000004
                                            /* --------------- HcInterruptStatus Register ----------------- */
#define  OR_INTR_STATUS_WDH             0x00000002
#define  OR_INTR_STATUS_UE              (0x1<<4)
#define  OR_INTR_STATUS_RHSC            0x00000040
                                            /* --------------- HcInterruptEnable Register ----------------- */
#define  OR_INTR_ENABLE_WDH             0x00000002
#define  OR_INTR_ENABLE_UE              (0x1<<4)
#define  OR_INTR_ENABLE_RHSC            0x00000040
#define  OR_INTR_ENABLE_MIE             0x80000000
                                            /* ---------------- HcRhDescriptorA Register ------------------ */
#define  OR_RH_STATUS_LPSC              0x00010000
#define  OR_RH_STATUS_DRWE              0x00008000
                                            /* -------------- HcRhPortStatus[1:NDP] Register -------------- */
#define  OR_RH_PORT_CCS                 0x00000001
#define  OR_RH_PORT_PRS                 0x00000010
#define  OR_RH_PORT_CSC                 0x00010000
#define  OR_RH_PORT_PRSC                0x00100000

/*********************************************************************//**
 *    FRAME INTERVAL
 **********************************************************************/
#define  FI                     0x2EDF           /* 12000 bits per frame (-1)                               */
#define  DEFAULT_FMINTERVAL     ((((6 * (FI - 210)) / 7) << 16) | FI)

/*********************************************************************//**
 *   TRANSFER DESCRIPTOR CONTROL FIELDS
 **********************************************************************/
#define  TD_ROUNDING        (uint32_t)(0x00040000)        /* Buffer Rounding                             */
#define  TD_SETUP           (uint32_t)(0)                  /* Direction of Setup Packet                   */
#define  TD_IN              (uint32_t)(0x00100000)         /* Direction In                                */
#define  TD_OUT             (uint32_t)(0x00080000)         /* Direction Out                               */
#define  TD_DELAY_INT(x)    (uint32_t)((x) << 21)          /* Delay Interrupt                             */
#define  TD_TOGGLE_0        (uint32_t)(0x02000000)         /* Toggle 0                                    */
#define  TD_TOGGLE_1        (uint32_t)(0x03000000)         /* Toggle 1                                    */
#define  TD_CC              (uint32_t)(0xF0000000)         /* Completion Code                             */

/*********************************************************************//**
 *   USB STANDARD REQUEST DEFINITIONS
 **********************************************************************/
#define  USB_DESCRIPTOR_TYPE_DEVICE                     1
#define  USB_DESCRIPTOR_TYPE_CONFIGURATION              2
#define  USB_DESCRIPTOR_TYPE_INTERFACE                  4
#define  USB_DESCRIPTOR_TYPE_ENDPOINT                   5
                                                    /*  ----------- Control RequestType Fields  ----------- */
#define  USB_DEVICE_TO_HOST         0x80
#define  USB_HOST_TO_DEVICE         0x00
#define  USB_REQUEST_TYPE_CLASS     0x20
#define  USB_RECIPIENT_DEVICE       0x00
#define  USB_RECIPIENT_INTERFACE    0x01
                                                    /* -------------- USB Standard Requests  -------------- */
#define  SET_ADDRESS                 5
#define  GET_DESCRIPTOR              6
#define  SET_CONFIGURATION           9
#define  SET_INTERFACE              11

/*********************************************************************//**
 *  Mass Storage Specific Definitions
 **********************************************************************/
#define    MASS_STORAGE_CLASS            0x08
#define    MASS_STORAGE_SUBCLASS_SCSI    0x06
#define    MASS_STORAGE_PROTOCOL_BO      0x50

/*********************************************************************//**
 *   HOST CONTROLLER SPECIFIC ERROR CODES
 **********************************************************************/
#define  USB_HOST_FUNC_OK		  0
#define  ERR_TD_FAIL              -1
#define  ERR_BAD_CONFIGURATION   -11
#define  ERR_NO_MS_INTERFACE     -12

/**
 * @}
 */

/* Public Types --------------------------------------------------------------- */
/** @defgroup  USB_Host_Public_Types	USB Host Public Types
 * @{
 */

/**
 * @brief USB Device Types */
typedef enum eUSB_DEVICE_TYPE {
	MASS_STORAGE_DEVICE,
	USB_DEVICE_UNKNOWN,
} USB_DEVICE_TYPE;

/**
 * @brief HCED Type*/

typedef struct hcEd {                       /* ----------- HostController EndPoint Descriptor ------------- */
    volatile  uint32_t  Control;              /* Endpoint descriptor control                              */
    volatile  uint32_t  TailTd;               /* Physical address of tail in Transfer descriptor list     */
    volatile  uint32_t  HeadTd;               /* Physcial address of head in Transfer descriptor list     */
    volatile  uint32_t  Next;                 /* Physical address of next Endpoint descriptor             */
} HCED;

/**
 * @brief HCTD Type*/
typedef struct hcTd {                       /* ------------ HostController Transfer Descriptor ------------ */
    volatile  uint32_t  Control;              /* Transfer descriptor control                              */
    volatile  uint32_t  CurrBufPtr;           /* Physical address of current buffer pointer               */
    volatile  uint32_t  Next;                 /* Physical pointer to next Transfer Descriptor             */
    volatile  uint32_t  BufEnd;               /* Physical address of end of buffer                        */
} HCTD;

/**
 * @brief HCCA Type*/

typedef struct hcca {                       /* ----------- Host Controller Communication Area ------------  */
    volatile  uint32_t  IntTable[32];         /* Interrupt Table                                          */
    volatile  uint16_t  FrameNumber;          /* Frame Number                                             */
	volatile  uint16_t  HccaPad1;        	  /* HCCA Pad1                                             */
    volatile  uint32_t  DoneHead;             /* Done Head                                                */
    volatile  uint8_t  Reserved[116];        /* Reserved for future use                                  */
    volatile  uint8_t  Unknown[4];           /* Unused                                                   */
} HCCA;

/**
 * @}
 */

/*********************************************************************//**
 *   USB STANDARD REQUEST DEFINITIONS
 **********************************************************************/

extern  volatile  HCED     *EDBulkIn;        /* BulkIn endpoint descriptor  structure                    */
extern  volatile  HCED     *EDBulkOut;       /* BulkOut endpoint descriptor structure                    */
extern  volatile  HCTD     *TDHead;          /* Head transfer descriptor structure                       */
extern  volatile  HCTD     *TDTail;          /* Tail transfer descriptor structure                       */
extern  volatile  uint8_t  *TDBuffer;        /* Current Buffer Pointer of transfer descriptor            */
extern  volatile  uint8_t  *FATBuffer;       /* Buffer used by FAT file system                           */
extern  volatile  uint8_t  *UserBuffer;      /* Buffer used by application                               */
extern 	volatile  uint8_t  *USB_ConfigDescriptor;	/* Device Configuration Descriptor		*/

/* Public Functions ----------------------------------------------------------- */
/** @defgroup USB_Host_Public_Functions USB Host Public Functions
 * @{
 */

void        Host_Init     (void);
int32_t     Host_EnumDev  (void);
int32_t     Host_ProcessTD(volatile  HCED       *ed,
                           volatile  uint32_t  token,
                           volatile  uint8_t *buffer,
                                     uint32_t  buffer_len);
void        Host_DelayUS  (          uint32_t    delay);
void        Host_DelayMS  (          uint32_t    delay);
int32_t     Host_CtrlRecv (          uint8_t   bm_request_type,
                                     uint8_t   b_request,
                                     uint16_t   w_value,
                                     uint16_t   w_index,
                                     uint16_t   w_length,
                           volatile  uint8_t  *buffer);
int32_t     Host_CtrlSend (          uint8_t   bm_request_type,
                                     uint8_t   b_request,
                                     uint16_t   w_value,
                                     uint16_t   w_index,
                                     uint16_t   w_length,
                           volatile  uint8_t  *buffer);

USB_DEVICE_TYPE Host_GetDeviceType(void);
uint32_t  ReadLE32U     (volatile  uint8_t  *pmem);
void      WriteLE32U    (volatile  uint8_t  *pmem, uint32_t   val);
uint16_t  ReadLE16U     (volatile  uint8_t  *pmem);
void      WriteLE16U    (volatile  uint8_t  *pmem, uint16_t   val);
uint32_t  ReadBE32U     (volatile  uint8_t  *pmem);
void      WriteBE32U    (volatile  uint8_t  *pmem, uint32_t   val);
uint16_t  ReadBE16U     (volatile  uint8_t  *pmem);
void      WriteBE16U    (volatile  uint8_t  *pmem, uint16_t   val);

/**
 * @}
 */
 /**
 * @}
 */

#endif


text:
package org.jabref.gui.preferences;

import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

import javafx.beans.property.ListProperty;
import javafx.beans.property.SimpleListProperty;
import javafx.collections.FXCollections;
import javafx.css.PseudoClass;
import javafx.scene.Node;
import javafx.scene.Parent;
import javafx.scene.control.Labeled;

import com.google.common.collect.ArrayListMultimap;

class PreferencesSearchHandler {

    private static PseudoClass labelHighlight = PseudoClass.getPseudoClass("search-highlight");
    private final List<PreferencesTab> preferenceTabs;
    private final ListProperty<PreferencesTab> filteredPreferenceTabs;
    private final ArrayListMultimap<PreferencesTab, Labeled> preferenceTabsLabelNames;
    private final ArrayList<Labeled> highlightedLabels = new ArrayList<>();

    PreferencesSearchHandler(List<PreferencesTab> preferenceTabs) {
        this.preferenceTabs = preferenceTabs;
        this.preferenceTabsLabelNames = getPrefsTabLabelMap();
        this.filteredPreferenceTabs = new SimpleListProperty<>(FXCollections.observableArrayList(preferenceTabs));
    }

    public void filterTabs(String text) {
        clearHighlights();
        if (text.isEmpty()) {
            clearSearch();
            return;
        }

        filteredPreferenceTabs.clear();
        for (PreferencesTab tab : preferenceTabsLabelNames.keySet()) {
            boolean tabContainsLabel = false;
            for (Labeled labeled : preferenceTabsLabelNames.get(tab)) {
                if (labelContainsText(labeled, text)) {
                    tabContainsLabel = true;
                    highlightLabel(labeled);
                }
            }
            boolean tabNameIsMatchedByQuery = tab.getTabName().toLowerCase(Locale.ROOT).contains(text);
            if (tabContainsLabel || tabNameIsMatchedByQuery) {
                filteredPreferenceTabs.add(tab);
            }
        }
    }

    private boolean labelContainsText(Labeled labeled, String text) {
        return labeled.getText().toLowerCase(Locale.ROOT).contains(text);
    }

    private void highlightLabel(Labeled labeled) {
        labeled.pseudoClassStateChanged(labelHighlight, true);
        highlightedLabels.add(labeled);
    }

    private void clearHighlights() {
        highlightedLabels.forEach(labeled -> labeled.pseudoClassStateChanged(labelHighlight, false));
    }

    private void clearSearch() {
        filteredPreferenceTabs.setAll(preferenceTabs);
    }

    /*
     * Traverse all nodes of a PreferencesTab and return a
     * mapping from PreferencesTab to all its Labeled type nodes.
     */
    private ArrayListMultimap<PreferencesTab, Labeled> getPrefsTabLabelMap() {
        ArrayListMultimap<PreferencesTab, Labeled> prefsTabLabelMap = ArrayListMultimap.create();
        for (PreferencesTab preferencesTab : preferenceTabs) {
            Node builder = preferencesTab.getBuilder();
            if (builder instanceof Parent) {
                Parent parentBuilder = (Parent) builder;
                for (Node child : parentBuilder.getChildrenUnmodifiable()) {
                    if (child instanceof Labeled) {
                        Labeled labeled = (Labeled) child;
                        if (!labeled.getText().isEmpty()) {
                            prefsTabLabelMap.put(preferencesTab, labeled);
                        }
                    }
                }
            }
        }
        return prefsTabLabelMap;
    }

    protected ListProperty<PreferencesTab> filteredPreferenceTabsProperty() {
        return filteredPreferenceTabs;
    }

}


text:
package com.ra4king.opengl.arcsynthesis.gl32.chapter2.example2;

import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.opengl.GL15.*;
import static org.lwjgl.opengl.GL20.*;
import static org.lwjgl.opengl.GL30.*;

import java.nio.FloatBuffer;
import java.util.HashMap;

import org.lwjgl.BufferUtils;

import com.ra4king.opengl.GLProgram;
import com.ra4king.opengl.util.ShaderProgram;

public class Example2_2 extends GLProgram {
	public static void main(String[] args) {
		new Example2_2().run(3, 2, true);
	}

	private ShaderProgram program;
	private int vbo;

	public Example2_2() {
		super("Example 2.2 - Vertex Colors", 500, 500, true);
	}

	@Override
	public void init() {
		glClearColor(0, 0, 0, 0);

		HashMap<Integer,String> attributes = new HashMap<>();
		attributes.put(0, "position");
		attributes.put(1, "color");
		program = new ShaderProgram(readFromFile("example2.2.vert"), readFromFile("example2.2.frag"), attributes);

		vbo = glGenBuffers();

		glBindBuffer(GL_ARRAY_BUFFER, vbo);
		glBufferData(GL_ARRAY_BUFFER, (FloatBuffer)BufferUtils.createFloatBuffer(24).put(new float[] { 0.0f, 0.5f, 0.0f, 1.0f,
				0.5f, -0.366f, 0.0f, 1.0f,
				-0.5f, -0.366f, 0.0f, 1.0f,
				1.0f, 0.0f, 0.0f, 1.0f,
				0.0f, 1.0f, 0.0f, 1.0f,
				0.0f, 0.0f, 1.0f, 1.0f }).flip(), GL_STATIC_DRAW);

		glBindVertexArray(glGenVertexArrays());

		glBindBuffer(GL_ARRAY_BUFFER, 0);
	}

	@Override
	public void render() {
		glClear(GL_COLOR_BUFFER_BIT);

		program.begin();

		glBindBuffer(GL_ARRAY_BUFFER, vbo);
		glEnableVertexAttribArray(0);
		glEnableVertexAttribArray(1);
		glVertexAttribPointer(0, 4, GL_FLOAT, false, 0, 0);
		glVertexAttribPointer(1, 4, GL_FLOAT, false, 0, 48);

		glDrawArrays(GL_TRIANGLES, 0, 3);

		glDisableVertexAttribArray(0);
		glDisableVertexAttribArray(1);
		glBindBuffer(GL_ARRAY_BUFFER, 0);

		program.end();
	}
}


text:
/* ###
 * IP: GHIDRA
 * REVIEWED: YES
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package ghidra.feature.vt.api.main;

public enum VTAssociationStatus {

	/**
	 * An association with this status is available for accepting (applying).  Also,
	 * no competing associations are currently {@link #ACCEPTED}.
	 */
	AVAILABLE("Available"),

	/**
	 * An association with this status means no other competing associations can add markup
	 * items.  Any competing associations cannot have markup items applied while
	 * one of them has this status. In this status, not all markup items have been applied, as
	 * the status would then be {@link #FULLY_APPLIED}.
	 */
	ACCEPTED("Accepted"),

	/**
	 * A competing association has been accepted and an association with this status cannot be
	 * accepted.
	 */
	BLOCKED("Blocked"),

	/**
	 * The user has explicitly rejected this association.
	 */
	REJECTED("Rejected");

	private final String displayName;

	private VTAssociationStatus(String displayName) {
		this.displayName = displayName;
	}

	public String getDisplayName() {
		return displayName;
	}

	/**
	 * Convenience method that returns true if match with this status can transition to the
	 * accepted status.
	 * @return true if match with this status can transition to the
	 * accepted status.
	 */
	public boolean canApply() {
		return this == ACCEPTED || this == AVAILABLE;
	}

	/**
	 * Convenience method that returns true if match with this status cannot be transitioned to
	 * an accepted status.
	 * @return true if match with this status cannot be transitioned to
	 * an accepted status.
	 */
	public boolean isBlocked() {
		return this == BLOCKED || this == REJECTED;
	}
}


text:
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -ms-text-size-adjust: none;
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  -ms-content-zooming: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}

html, body {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  overflow: hidden;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  background-color: #000;
  color: #fff;
}

a, a:hover, a:active, a:visited {
  text-decoration: none;
  color: inherit;
}

#pano {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#titleBar {
  position: absolute;
  top: 0;
  left: 0;
  right: 40px;
  height: 40px;
  text-align: center;
}

.mobile #titleBar {
  height: 50px;
  right: 50px;
}

/* If there is a fullscreen button the title bar must make space for it */
body.fullscreen-enabled #titleBar {
  right: 80px;
}

body.fullscreen-enabled.mobile #titleBar {
  right: 100px;
}

/* If there are multiple scenes the title bar must make space for the scene list toggle */
body.multiple-scenes #titleBar {
  left: 40px;
}

body.multiple-scenes.mobile #titleBar {
  left: 50px;
}

#titleBar .sceneName {
  width: 100%;
  height: 100%;
  line-height: 30px;
  padding: 5px;
  background-color: rgb(58,68,84);
  background-color: rgba(58,68,84,0.8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.mobile #titleBar .sceneName {
  line-height: 40px;
}

#fullscreenToggle {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 5px;
  background-color: rgb(103,115,131);
  background-color: rgba(103,115,131,0.8);
}

.mobile #fullscreenToggle {
  width: 50px;
  height: 50px;
}

body.fullscreen-enabled #fullscreenToggle {
  display: block;
}

#fullscreenToggle .icon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
}

.mobile #fullscreenToggle .icon {
  top: 10px;
  right: 10px;
}

#fullscreenToggle .icon.on {
  display: none;
}

#fullscreenToggle .icon.off {
  display: block;
}

#fullscreenToggle.enabled .icon.on {
  display: block;
}

#fullscreenToggle.enabled .icon.off {
  display: none;
}

#autorotateToggle {
  display: block;
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 5px;
  background-color: rgb(103,115,131);
  background-color: rgba(103,115,131,0.8);
}

.mobile #autorotateToggle {
  width: 50px;
  height: 50px;
}

/* If there is a fullscreen button, autorotate must placed a bit to the left */
body.fullscreen-enabled #autorotateToggle {
  right: 40px;
}

body.fullscreen-enabled.mobile #autorotateToggle {
  right: 50px;
}

#autorotateToggle .icon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
}

.mobile #autorotateToggle .icon {
  top: 10px;
  right: 10px;
}

#autorotateToggle .icon.on {
  display: none;
}

#autorotateToggle .icon.off {
  display: block;
}

#autorotateToggle.enabled .icon.on {
  display: block;
}

#autorotateToggle.enabled .icon.off {
  display: none;
}

#sceneListToggle {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  padding: 5px;
  background-color: rgb(103,115,131);
  background-color: rgba(103,115,131,0.8);
}

.mobile #sceneListToggle {
  width: 50px;
  height: 50px;
}

#sceneListToggle .text {
  position: absolute;
  top: 5px;
  left: 15px;
  width: 100%;
  line-height: 30px;
}

#sceneListToggle .icon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
}

.mobile #sceneListToggle .icon {
  top: 10px;
  right: 10px;
}

#sceneListToggle .icon.on {
  display: none;
}

#sceneListToggle .icon.off {
  display: block;
}

#sceneListToggle.enabled .icon.on {
  display: block;
}

#sceneListToggle.enabled .icon.off {
  display: none;
}

#sceneList {
  position: absolute;
  top: 0;
  left: -220px;
  padding-top: 40px;
  width: 220px;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  margin-left: 0;
  -webkit-transition: margin-left 0.5s ease-in-out;
  transition: margin-left 0.5s ease-in-out;
}

.mobile #sceneList {
  padding-top: 50px;
}

#sceneList .scenes {
  width: 100%;
  background-color: rgb(58,68,84);
  background-color: rgba(58,68,84,0.8);
}

.mobile #sceneList {
  width: 100%;
  height: 100%;
  left: -100%;
}

.mobile #sceneList.enabled {
  margin-left: 100%;
}

.mobile #sceneList .scenes {
  height: 100%;
}

#sceneList.enabled {
  margin-left: 220px;
}

#sceneList .scene {
  display: block;
  width: 100%;
  height: 30px;
}

.mobile #sceneList .scene {
  height: 40px;
}

#sceneList .scene .text {
  width: 100%;
  height: 100%;
  padding: 0 15px;
  line-height: 30px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile #sceneList .scene .text {
  line-height: 40px;
}

.no-touch #sceneList .scene:hover {
  background-color: rgb(103,115,131);
  background-color: rgba(103,115,131,0.8);
}

#sceneList .scene.current {
  background-color: rgb(103,115,131);
  background-color: rgba(103,115,131,0.8);
}

/* Hide scene list when only a single scene exists */
body.single-scene #sceneList, body.single-scene #sceneListToggle {
  display: none;
}

/* Link hotspot */

.link-hotspot {
  width: 60px;
  height: 60px;
  margin-left: -30px;
  margin-top: -30px;
  opacity: 0.9;
  -webkit-transition: opacity 0.2s;
  transition: opacity 0.2s;
}

.no-touch .link-hotspot:hover {
  opacity: 1;
}

.mobile .link-hotspot {
  width: 70px;
  height: 70px;
}

.link-hotspot-icon {
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.link-hotspot-tooltip {
  position: absolute;
  left: 100%;
  top: 14px; /* ( 60 - (16 + 2*8) ) / 2 */

  margin-left: 3px;

  font-size: 16px;

  max-width: 300px;

  padding: 8px 10px;

  border-radius: 5px;

  background-color: rgb(58,68,84);
  background-color: rgba(58,68,84,0.8);

  color: #fff;

  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;

  cursor: pointer;

  opacity: 0;

  -ms-transform: translateX(-8px);
  -webkit-transform: translateX(-8px);
  transform: translateX(-8px);

  -webkit-transition: -ms-transform 0.3s,
                      -webkit-transform 0.3s,
                      transform 0.3s,
                      opacity 0.3s;
  transition: -ms-transform 0.3s,
              -webkit-transform 0.3s,
              transform 0.3s,
              opacity 0.3s;
}

.mobile .link-hotspot {
  top: 19px; /* ( 70 - (16 + 2*8) ) / 2 */
}

.no-touch .link-hotspot:hover .link-hotspot-tooltip {
  opacity: 1;
  -ms-transform: translateX(0);
  -webkit-transform: translateX(0);
  transform: translateX(0);
}

/* Prevent tooltip from triggering */
.link-hotspot-tooltip {
  pointer-events: none;
}
.no-touch .link-hotspot:hover .link-hotspot-tooltip {
  pointer-events: all;
}

/* Fallback mode without pointer-events (IE8-10) */
.tooltip-fallback .link-hotspot-tooltip {
  display: none;
}
.no-touch .tooltip-fallback .link-hotspot:hover .link-hotspot-tooltip {
  display: block;
}

/* Info hotspot */

.info-hotspot {
  line-height: 1.2em;
  opacity: 0.9;
  -webkit-transition: opacity 0.2s 0.2s;
  transition: opacity 0.2s 0.2s;
}

.no-touch .info-hotspot:hover {
  opacity: 1;
  -webkit-transition: opacity 0.2s;
  transition: opacity 0.2s;
}

.info-hotspot.visible {
  opacity: 1;
}

.info-hotspot .info-hotspot-header {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background-color: rgb(103,115,131);
  cursor: pointer;
  -webkit-transition: width 0.3s ease-in-out 0.5s,
                      border-radius 0.3s ease-in-out 0.5s;
  transition: width 0.3s ease-in-out 0.5s,
              border-radius 0.3s ease-in-out 0.5s;
}

.mobile .info-hotspot .info-hotspot-header {
  width: 50px;
  height: 50px;
  border-radius: 25px;
}

.desktop.no-touch .info-hotspot .info-hotspot-header:hover {
  width: 260px;
  border-radius: 5px;
  -webkit-transition: width 0.3s ease-in-out,
                      border-radius 0.3s ease-in-out;
  transition: width 0.3s ease-in-out,
              border-radius 0.3s ease-in-out;
}

.desktop .info-hotspot.visible .info-hotspot-header,
.desktop.no-touch .info-hotspot.visible .info-hotspot-header:hover {
  width: 260px;
  border-radius: 5px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
  -webkit-transition: width 0.3s ease-in-out,
                      border-radius 0.3s ease-in-out;
  transition: width 0.3s ease-in-out,
              border-radius 0.3s ease-in-out;
}

.info-hotspot .info-hotspot-icon-wrapper {
  width: 40px;
  height: 40px;
}

.mobile .info-hotspot .info-hotspot-icon-wrapper {
  width: 50px;
  height: 50px;
}

.info-hotspot .info-hotspot-icon {
  width: 90%;
  height: 90%;
  margin: 5%;
}

.info-hotspot .info-hotspot-title-wrapper {
  position: absolute;
  left: 40px;
  top: 0;
  width: 0;
  height: 40px;
  padding: 0;
  overflow: hidden;
  -webkit-transition: width 0s 0.4s,
                      padding 0s 0.4s;
  transition: width 0s 0.4s,
              padding 0s 0.4s;
}

.desktop .info-hotspot.visible .info-hotspot-title-wrapper,
.desktop.no-touch .info-hotspot .info-hotspot-header:hover .info-hotspot-title-wrapper {
  width: 220px;
  padding: 0 5px;
  -webkit-transition: width 0s 0.4s,
                      padding 0s 0.4s;
  transition: width 0s 0.4s,
              padding 0s 0.4s;
}

.info-hotspot .info-hotspot-title-wrapper:before {
  content: '';
  display: inline-block;
  vertical-align: middle;
  height: 100%;
}

.info-hotspot .info-hotspot-title {
  display: inline-block;
  vertical-align: middle;

  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.info-hotspot .info-hotspot-close-wrapper {
  position: absolute;
  left: 260px;
  top: 0;
  height: 40px;
  width: 40px;
  border-top-right-radius: 5px;
  background-color: rgb(78,88,104);
  visibility: hidden;
  -ms-transform: perspective(200px) rotateY(90deg);
  -webkit-transform: perspective(200px) rotateY(90deg);
  transform: perspective(200px) rotateY(90deg);
  -ms-transform-origin: 0 50% 0;
  -webkit-transform-origin: 0 50% 0;
  transform-origin: 0 50% 0;
  -webkit-transition: -ms-transform 0.3s 0.3s,
                      -webkit-transform 0.3s 0.3s,
                      transform 0.3s 0.3s,
                      visibility 0s 0.6s;
  transition: -ms-transform 0.3s 0.3s,
              -webkit-transform 0.3s 0.3s,
              transform 0.3s 0.3s,
              visibility 0s 0.6s;
}

.desktop .info-hotspot.visible .info-hotspot-close-wrapper {
  visibility: visible;
  -ms-transform: perspective(200px) rotateY(0deg);
  -webkit-transform: perspective(200px) rotateY(0deg);
  transform: perspective(200px) rotateY(0deg);
  -webkit-transition: -ms-transform 0.3s,
                      -webkit-transform 0.3s,
                      transform 0.3s,
                      visibility 0s 0s;
  transition: -ms-transform 0.3s,
              -webkit-transform 0.3s,
              transform 0.3s,
              visibility 0s 0s;
}

.info-hotspot .info-hotspot-close-icon {
  width: 70%;
  height: 70%;
  margin: 15%;
}

.info-hotspot .info-hotspot-text {
  position: absolute;
  width: 300px;
  height: auto;
  max-height: 200px;
  top: 40px;
  left: 0;
  padding: 10px;
  background-color: rgb(58,68,84);
  border-bottom-right-radius: 5px;
  border-bottom-left-radius: 5px;
  overflow-y: auto;
  visibility: hidden;
  /* rotate(90deg) causes transition flicker on Firefox 58 */
  -ms-transform: perspective(200px) rotateX(-89.999deg);
  -webkit-transform: perspective(200px) rotateX(-89.999deg);
  transform: perspective(200px) rotateX(-89.999deg);
  -ms-transform-origin: 50% 0 0;
  -webkit-transform-origin: 50% 0 0;
  transform-origin: 50% 0 0;
  -webkit-transition: -ms-transform 0.3s,
                      -webkit-transform 0.3s,
                      transform 0.3s,
                      visibility 0s 0.3s;
  transition: -ms-transform 0.3s,
              -webkit-transform 0.3s,
              transform 0.3s,
              visibility 0s 0.3s;

  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.desktop .info-hotspot.visible .info-hotspot-text {
  visibility: visible;
  -ms-transform: perspective(200px) rotateX(0deg);
  -webkit-transform: perspective(200px) rotateX(0deg);
  transform: perspective(200px) rotateX(0deg);
  -webkit-transition: -ms-transform 0.3s 0.3s,
                      -webkit-transform 0.3s 0.3s,
                      transform 0.3s 0.3s,
                      visibility 0s 0s;
  transition: -ms-transform 0.3s 0.3s,
              -webkit-transform 0.3s 0.3s,
              transform 0.3s 0.3s,
              visibility 0s 0s;
}

/* Info hotspot modal */

.desktop .info-hotspot-modal {
  display: none;
}

.info-hotspot-modal {
  top: 0;
  left: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 11000 !important;
  background-color: rgba(0,0,0,.5);
  line-height: 1.2em;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity 0.2s ease-in-out 0.5s,
                      visibility 0s 0.7s;
  transition: opacity 0.2s ease-in-out 0.5s,
              visibility 0s 0.7s;
}

.info-hotspot-modal.visible {
  opacity: 1;
  visibility: visible;
  -webkit-transition: opacity 0.2s ease-in-out,
                      visibility 0s 0s;
  transition: opacity 0.2s ease-in-out,
              visibility 0s 0s;
}

.info-hotspot-modal .info-hotspot-header {
  position: absolute;
  top: 60px;
  left: 10px;
  right: 10px;
  width: auto;
  height: 50px;
  background-color: rgb(103,115,131);
  background-color: rgba(103,115,131,0.8);
  opacity: 0;
  -webkit-transition: opacity 0.3s ease-in-out 0.2s;
  transition: opacity 0.3s ease-in-out 0.2s;
}

.info-hotspot-modal.visible .info-hotspot-header {
  opacity: 1;
  -webkit-transition: opacity 0.3s ease-in-out 0.2s;
  transition: opacity 0.3s ease-in-out 0.2s;
}

.info-hotspot-modal .info-hotspot-icon-wrapper {
  width: 50px;
  height: 50px;
}

.info-hotspot-modal .info-hotspot-icon {
  width: 90%;
  height: 90%;
  margin: 5%;
}

.info-hotspot-modal .info-hotspot-title-wrapper {
  position: absolute;
  top: 0;
  left: 50px;
  right: 50px;
  width: auto;
  height: 50px;
  padding: 0 10px;
}

.info-hotspot-modal .info-hotspot-title-wrapper:before {
  content: '';
  display: inline-block;
  vertical-align: middle;
  height: 100%;
}

.info-hotspot-modal .info-hotspot-title {
  display: inline-block;
  vertical-align: middle;

  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.info-hotspot-modal .info-hotspot-close-wrapper {
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 50px;
  background-color: rgb(78,88,104);
  background-color: rgba(78,88,104,0.8);
  cursor: pointer;
}

.info-hotspot-modal .info-hotspot-close-icon {
  width: 70%;
  height: 70%;
  margin: 15%;
}

.info-hotspot-modal .info-hotspot-text {
  position: absolute;
  top: 110px;
  bottom: 10px;
  left: 10px;
  right: 10px;
  padding: 10px;
  background-color: rgb(58,68,84);
  background-color: rgba(58,68,84,0.8);
  overflow-y: auto;
  opacity: 0;
  -webkit-transition: opacity 0.3s ease-in-out;
  transition: opacity 0.3s ease-in-out;

  -moz-user-select: text;
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.info-hotspot-modal.visible .info-hotspot-text {
  opacity: 1;
  -webkit-transition: opacity 0.3s ease-in-out 0.4s;
  transition: opacity 0.3s ease-in-out 0.4s;
}

/* View control buttons */

.viewControlButton {
  display: none;
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 40px;
  height: 40px;
  padding: 5px;
  background-color: rgb(103,115,131);
  background-color: rgba(103,115,131,0.8);
}

body.view-control-buttons .viewControlButton {
  display: block;
}

/* Hide controls when width is too small */
@media (max-width: 600px) {
  body.view-control-buttons .viewControlButton {
    display: none;
  }
}

.viewControlButton .icon {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
}

/* Center is at margin-left: -20px */
.viewControlButton-1 {
  margin-left: -145px;
}
.viewControlButton-2 {
  margin-left: -95px;
}
.viewControlButton-3 {
  margin-left: -45px;
}
.viewControlButton-4 {
  margin-left: 5px;
}
.viewControlButton-5 {
  margin-left: 55px;
}
.viewControlButton-6 {
  margin-left: 105px;
}


text:
namespace {

using libspirv::DiagnosticStream;
using ::testing::Eq;

// Returns a newly created diagnostic value.
spv_diagnostic MakeValidDiagnostic() {
  spv_position_t position = {};
  spv_diagnostic diagnostic = spvDiagnosticCreate(&position, "");
  EXPECT_NE(nullptr, diagnostic);
  return diagnostic;
}

TEST(Diagnostic, DestroyNull) { spvDiagnosticDestroy(nullptr); }

TEST(Diagnostic, DestroyValidDiagnostic) {
  spv_diagnostic diagnostic = MakeValidDiagnostic();
  spvDiagnosticDestroy(diagnostic);
  // We aren't allowed to use the diagnostic pointer anymore.
  // So we can't test its behaviour.
}

TEST(Diagnostic, DestroyValidDiagnosticAfterReassignment) {
  spv_diagnostic diagnostic = MakeValidDiagnostic();
  spv_diagnostic second_diagnostic = MakeValidDiagnostic();
  EXPECT_TRUE(diagnostic != second_diagnostic);
  spvDiagnosticDestroy(diagnostic);
  diagnostic = second_diagnostic;
  spvDiagnosticDestroy(diagnostic);
}

TEST(Diagnostic, PrintDefault) {
  char message[] = "Test Diagnostic!";
  spv_diagnostic_t diagnostic = {{2, 3, 5}, message};
  // TODO: Redirect stderr
  ASSERT_EQ(SPV_SUCCESS, spvDiagnosticPrint(&diagnostic));
  // TODO: Validate the output of spvDiagnosticPrint()
  // TODO: Remove the redirection of stderr
}

TEST(Diagnostic, PrintInvalidDiagnostic) {
  ASSERT_EQ(SPV_ERROR_INVALID_DIAGNOSTIC, spvDiagnosticPrint(nullptr));
}

// TODO(dneto): We should be able to redirect the diagnostic printing.
// Once we do that, we can test diagnostic corner cases.

TEST(DiagnosticStream, ConversionToResultType) {
  // Check after the DiagnosticStream object is destroyed.
  spv_result_t value;
  { value = DiagnosticStream({}, nullptr, SPV_ERROR_INVALID_TEXT); }
  EXPECT_EQ(SPV_ERROR_INVALID_TEXT, value);

  // Check implicit conversion via plain assignment.
  value = DiagnosticStream({}, nullptr, SPV_SUCCESS);
  EXPECT_EQ(SPV_SUCCESS, value);

  // Check conversion via constructor.
  EXPECT_EQ(SPV_FAILED_MATCH,
            spv_result_t(DiagnosticStream({}, nullptr, SPV_FAILED_MATCH)));
}

TEST(
    DiagnosticStream,
    MoveConstructorPreservesPreviousMessagesAndPreventsOutputFromExpiringValue) {
  std::ostringstream messages;
  int message_count = 0;
  auto consumer = [&messages, &message_count](spv_message_level_t, const char*,
                                              const spv_position_t&,
                                              const char* msg) {
    message_count++;
    messages << msg;
  };

  // Enclose the DiagnosticStream variables in a scope to force destruction.
  {
    DiagnosticStream ds0({}, consumer, SPV_ERROR_INVALID_BINARY);
    ds0 << "First";
    DiagnosticStream ds1(std::move(ds0));
    ds1 << "Second";
  }
  EXPECT_THAT(message_count, Eq(1));
  EXPECT_THAT(messages.str(), Eq("FirstSecond"));
}

}  // anonymous namespace


text:
/*
* generated by Xtext
*/
package co.edu.unal.B;

/**
 * Initialization support for running Xtext languages
 * without equinox extension registry
 */
public class BDslStandaloneSetup extends BDslStandaloneSetupGenerated{

	public static void doSetup() {
		new BDslStandaloneSetup().createInjectorAndDoEMFRegistration();
	}
}


text:
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../../resources/testdriver.js"></script>
<script src="../../../resources/testdriver-vendor.js"></script>
<script src="../resources/common.js"></script>
<script src="../resources/picker-common.js"></script>
<script src="../calendar-picker/resources/calendar-picker-common.js"></script>
</head>
<body>
<input type="datetime-local" id="datetime-local" value="2019-02-14T13:02">
<script>

let t = async_test('Test select value in datetime-local popup');

function selectValue() {
  let dateTimeElement = document.getElementById("datetime-local");
  dateTimeElement.addEventListener("change", t.step_func_done(() => {
    assert_equals(dateTimeElement.value, "2019-02-27T17:03");
  }));
  clickDayCellAt(3, 4);
  clickTimeCellAt(0, 4);
  clickTimeCellAt(1, 1);
  eventSender.keyDown('Enter');
}

t.step(() => {
  openPickerDeprecatedJsTest(document.getElementById('datetime-local'), t.step_func(selectValue));
});
</script>
</body>
</html>


text:
regex_t regex;

struct globalArgs_t {
  int daemonize;
} globalArgs;

static const char *optString = "-fh";


text:
'use strict';

describe('Directive: accesslevel', function () {

  // load the directive's module
  beforeEach(module('privateTheaterApp'));

  var scope;

  beforeEach(inject(function ($rootScope) {
    scope = $rootScope.$new();
  }));

  it('should make hidden element visible', inject(function () {
    //TODO: accessLevel directive test unit
    expect(true).toBe(true);
  }));
});


text:
using UnityEngine;
using System.Collections;

public class MoveTrail : MonoBehaviour
{
	public int moveSpeed = 230;

	// Update is called once per frame
	void Update ()
	{
		transform.Translate (Vector3.right * Time.deltaTime * this.moveSpeed);
		Destroy (gameObject, 1);
	}
}


text:
using System.Collections.Generic;
using Xunit;
using SimplyFast.Expressions.Tests.TestData;
using SimplyFast.Reflection;

namespace SimplyFast.Expressions.Tests
{

    public class LambdaExtractTests
    {
        /*[Fact]
        public void CopyValuesWorksForFields()
        {
            var a = new SomeClass1 {P1 = 321, P2 = "test2", P3 = "test3", P4 = "test4", P5 = "test5"};
            var b = new SomeClass1();
            Assert.NotEqual(a, b);
            typeof (SomeClass1).Simple().Fields.CopyValues(a, b);
            // Compiler creates hidden fields for auto-properties, that's why this thing works
            Assert.Equal(a, b);
        }

        [Fact]
        public void CopyValuesWorksForProperties()
        {
            var a = new SomeClass1 {P1 = 321, P2 = "test2", P3 = "test3", P4 = "test4", P5 = "test5"};
            var b = new SomeClass1();
            Assert.NotEqual(a, b);
            typeof (SomeClass1).Simple().Properties.CopyValues(a, b);
            Assert.Equal(a.P1, b.P1);
            Assert.Equal(a.P2, b.P2);
            Assert.Equal(a.P3, b.P3);
            Assert.Equal(a.P4, b.P4);
            Assert.Equal(a.P5, b.P5);
        }

        [Fact]
        public void GetValuesAsDictionaryWorkForAnonymousTypes()
        {
            var a = new TestClass2 {P1 = 123, P2 = "test2", P3 = "test3", P4 = "test4", P5 = "test5"};
            var b = new {a.P1, a.P3, a.P4, Test5 = "5"};
            var values = SimpleReflection.TypeOf(b).Properties.Where(x => x.IsPublic).GetValuesAsDictionary(b);
            Assert.Equal(4, values.Count);
            Assert.Equal(123, values["P1"]);
            Assert.Equal("test3", values["P3"]);
            Assert.Equal("test4", values["P4"]);
            Assert.Equal("5", values["Test5"]);
        }

        [Fact]
        public void GetValuesAsDictionaryWorkForNormalTypes()
        {
            var a = new TestClass2 {P1 = 231, P2 = "test2", P3 = "test3", P4 = "test4", P5 = "test5"};
            var values = SimpleReflection.TypeOf(a).Properties.Where(x => x.IsPublic).GetValuesAsDictionary(a);
            Assert.Equal(7, values.Count);
            Assert.Equal(231, values["P1"]);
            Assert.Equal("test2", values["P2"]);
            Assert.Equal("test3", values["P3"]);
            Assert.Equal("test4", values["P4"]);
            Assert.Equal("test5", values["P5"]);
            Assert.Null(values["P00"]);
            Assert.Equal("_f3t", values["F3"]);
        }

        [Fact]
        public void GetValuesAsDictionaryWorkForTypesWithIndexProp()
        {
            var a = new SomeClass3 {P1 = 321, P2 = "test2", P3 = "test3", P4 = "test4", P5 = "test5"};
            var values = SimpleReflection.TypeOf(a).Properties.Where(x => x.IsPublic).GetValuesAsDictionary(a);
            Assert.Equal(8, values.Count);
            Assert.Null(values["P00"]);
            Assert.Equal(321, values["P1"]);
            Assert.Equal("test2", values["P2"]);
            Assert.Equal("test3", values["P3"]);
            Assert.Equal("test4", values["P4"]);
            Assert.Equal("test5", values["P5"]);
            Assert.Equal("_f3t", values["F3"]);
            Assert.Equal(1, values["CanGet"]);
        }

        [Fact]
        public void GetValuesWorkForAnonymousTypes()
        {
            var a = new TestClass2 {P1 = 123, P2 = "test2", P3 = "test3", P4 = "test4", P5 = "test5"};
            var b = new {a.P1, a.P3, a.P4, Test5 = "5"};
            var values = SimpleReflection.TypeOf(b).Properties.Where(x => x.IsPublic).GetValues(b);
            Assert.Equal(4, values.Count);
            Assert.True(values.Contains(123));
            Assert.True(values.Contains("test3"));
            Assert.True(values.Contains("test4"));
            Assert.True(values.Contains("5"));
        }

        [Fact]
        public void GetValuesWorkForNormalTypes()
        {
            var a = new TestClass2 {P1 = 231, P2 = "test2", P3 = "test3", P4 = "test4", P5 = "test5"};
            var values = SimpleReflection.TypeOf(a).Properties.Where(x => x.IsPublic).GetValues(a);
            Assert.Equal(12, values.Count);
            var valuesExpected = new List<object> {1, 231, "test2", "test3", "test4", "test5", null, "_f3t"};
            foreach (var value in values)
            {
                if (!valuesExpected.Contains(value))
                    Assert.Fail();
            }
            foreach (var value in valuesExpected)
            {
                if (!values.Contains(value))
                    Assert.Fail();
            }
        }

        [Fact]
        public void GetValuesWorkForTypesWithIndexProp()
        {
            var a = new SomeClass3 {P1 = 321, P2 = "test2", P3 = "test3", P4 = "test4", P5 = "test5"};
            var values = SimpleReflection.TypeOf(a).Properties.Where(x => x.IsPublic).GetValues(a);
            Assert.Equal(13, values.Count);
            var valuesExpected = new List<object> {1, 321, "test2", "test3", "test4", "test5", null, "_f3t"};
            foreach (var value in values)
            {
                if (!valuesExpected.Contains(value))
                    Assert.Fail();
            }
            foreach (var value in valuesExpected)
            {
                if (!values.Contains(value))
                    Assert.Fail();
            }
        }*/

        [Fact]
        public void GetMemberWorks()
        {
            Assert.Equal(typeof(List<int>).Property("Count"), LambdaExtract.Member((List<int> l) => l.Count));
            Assert.Equal(typeof(SomeClass1).Constructor(), LambdaExtract.Member(() => new SomeClass1()));
            Assert.Equal(typeof(string).Constructor(typeof(char), typeof(int)), LambdaExtract.Member(() => new string('c', 10)));
            Assert.Equal(typeof(SomeClass1).Property("P00"), LambdaExtract.Member((SomeClass1 tc) => tc.P00));
            Assert.Equal(typeof(SomeClass1).Field("F2"), LambdaExtract.Member((SomeClass1 tc) => tc.F2));
            Assert.Equal(typeof(object).Method("GetHashCode"), LambdaExtract.Member((SomeClass1 tc) => tc.GetHashCode()));
            Assert.Equal(typeof(Dictionary<string, double>).Property("Keys"),
                            LambdaExtract.Member((Dictionary<string, double> d) => d.Keys));
            Assert.Equal(typeof(SomeClass3).Property("Item"),
                            LambdaExtract.Member((SomeClass3 d) => d[0]));
        }

        [Fact]
        public void GetMemberWorksTyped()
        {
            Assert.Equal(typeof(List<int>).Property("Count"), LambdaExtract.Property((List<int> l) => l.Count));
            Assert.Equal(typeof(SomeClass1).Constructor(), LambdaExtract.Constructor(() => new SomeClass1()));
            Assert.Equal(typeof(string).Constructor(typeof(char), typeof(int)), LambdaExtract.Constructor(() => new string('c', 10)));
            Assert.Equal(typeof(SomeClass1).Property("P00"), LambdaExtract.Property((SomeClass1 tc) => tc.P00));
            Assert.Equal(typeof(SomeClass1).Field("F2"), LambdaExtract.Field((SomeClass1 tc) => tc.F2));
            Assert.Equal(typeof(object).Method("GetHashCode"), LambdaExtract.Method((SomeClass1 tc) => tc.GetHashCode()));
            Assert.Equal(typeof(Dictionary<string, double>).Property("Keys"),
                            LambdaExtract.Property((Dictionary<string, double> d) => d.Keys));
            Assert.Equal(typeof(SomeClass3).Property("Item"),
                LambdaExtract.Property((SomeClass3 d) => d[0]));
            Assert.Equal(typeof(TestClass2).Property("F3"),
                LambdaExtract.Property(() => TestClass2.F3));
            Assert.Equal(typeof(TestClass2).Field("FStatic"),
                LambdaExtract.Field(() => TestClass2.FStatic));
        }

        [Fact]
        public void ArrayLengthPropertyWorks()
        {
            var prop = LambdaExtract.Property((string[] x) => x.Length);
            Assert.NotNull(prop);
            Assert.Equal("Length", prop.Name);
        }
    }
}


text:
package de.vandermeer.skb.datatool.commons;

import java.net.URISyntaxException;
import java.util.Map;

import org.apache.commons.lang3.text.StrBuilder;

/**
 * Base of the special data objects.
 *
 * @author     Sven van der Meer <vdmeer.sven@mykolab.com>
 * @version    v0.0.1 build 160301 (01-Mar-16) for Java 1.8
 * @since      v0.0.1
 */
public interface EntryObject {

	/**
	 * Loads an entry object from a given map with tests against expected keys.
	 * @param keyStart string used to start a key
	 * @param data the data to load information from, usually a mapping of strings to objects
	 * @param loadedTypes loaded types as lookup for links
	 * @param cs core settings required for loading data
	 * @throws URISyntaxException if creating a URI for an SKB link failed
	 * @throws IllegalArgumentException if any of the required arguments or map entries are not set or empty
	 */
	void loadObject(String keyStart, Object data, LoadedTypeMap loadedTypes, CoreSettings cs) throws URISyntaxException;

	/**
	 * Returns the schema for the entry object.
	 * @return entry object schema
	 */
	DataEntrySchema getSchema();

	/**
	 * Loads an entry object from a given map with tests against expected keys.
	 * @param keyStart string used to start a key
	 * @param data the data to load information from, usually a mapping of strings to objects
	 * @param loadedTypes loaded types as lookup for links
	 * @param cs core settings required for loading data
	 * @throws URISyntaxException if creating a URI for an SKB link failed
	 * @throws IllegalArgumentException if any of the required arguments or map entries are not set or empty
	 */
	default void load(String keyStart, Object data, LoadedTypeMap loadedTypes, CoreSettings cs) throws URISyntaxException {
		StrBuilder err = this.getSchema().testSchema(data);
		if(err.size()>0){
			throw new IllegalArgumentException(err.toString());
		}
		this.loadObject(keyStart, data, loadedTypes, cs);
	}

	/**
	 * Returns the local entry map.
	 * @return local entry map
	 */
	Map<EntryKey, Object> getEntryMap();
}