text:
<?php

namespace sndsgd;

/**
 * A base class for types of issues
 */
abstract class Issue
{
   /**
    * A message describing the issue
    *
    * @var string
    */
   protected $message;

   /**
    * Data relevant to the issue
    *
    * @var array|null
    */
   protected $data = null;

   /**
    * Create a new issue
    *
    * @param string $message A human readable description of the issue
    * @param array|null $data Information relevant to the issue
    */
   public function __construct($message, $data = null)
   {
      $this->message = $message;
      if ($data !== null) {
         $this->setData($data);
      }
   }

   /**
    * Get the issue message
    *
    * @return string
    */
   public function getMessage()
   {
      return $this->message;
   }

   /**
    * Set the issue data
    *
    * @param array.<string,mixed> $data
    */
   public function setData(array $data)
   {
      $this->data = $data;
   }

   /**
    * Add data to the issue
    *
    * @param string $key
    * @param mixed $value
    */
   public function addData($key, $value)
   {
      $this->data[$key] = $value;
   }

   /**
    * Get the issue data
    *
    * @return array|null
    */
   public function getData()
   {
      return $this->data;
   }
}


text:
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
WORKDIR /app

# Copy local code to the container image.
COPY image-v1/watermarker ./image-v1/watermarker

# Copy common library
COPY common ./common

# Install production dependencies
# Restore as distinct layers
RUN dotnet restore common/csharp
RUN dotnet restore image-v1/watermarker/csharp

# Build a release artifact.
RUN dotnet publish image-v1/watermarker/csharp -c Release -o out

# Use Microsoft's official runtime .NET image.
# https://hub.docker.com/_/microsoft-dotnet-core-aspnet/
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS runtime
WORKDIR /app
COPY --from=build /app/out ./

# Copy the font file
COPY image-v1/watermarker/csharp/Arial.ttf /app/Arial.ttf

# Run the web service on container startup.
ENTRYPOINT ["dotnet", "Watermarker.dll"]

redpajama_set_name: RedPajamaGithub


text:
package com.eaybars.beans.index;

import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.NavigableMap;
import java.util.NavigableSet;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.ConcurrentSkipListSet;

/**
 * A factory interface to produce backing collections used in the bean indexer
 *
 * @author ertunc
 */
public interface CollectionFactory {

    public Set createNewSet();

    public NavigableSet createNewNavigableSet(Comparator<?> c);

    public Map createNewMap();

    public NavigableMap createNewNavigableMap(Comparator<?> c);

    public enum Predefined {

        THREAD_UNSAFE(new CollectionFactory() {

            @Override
            public Set createNewSet() {
                return new HashSet();
            }

            @Override
            public NavigableSet createNewNavigableSet(Comparator<?> c) {
                return new TreeSet(c);
            }

            @Override
            public Map createNewMap() {
                return new HashMap();
            }

            @Override
            public NavigableMap createNewNavigableMap(Comparator<?> c) {
                return new TreeMap(c);
            }

        }),

        CONCURRENT(new CollectionFactory() {

            @Override
            public Set createNewSet() {
                return Collections.newSetFromMap(new ConcurrentHashMap());
            }

            @Override
            public NavigableSet createNewNavigableSet(Comparator<?> c) {
                return new ConcurrentSkipListSet(c);
            }

            @Override
            public Map createNewMap() {
                return new ConcurrentHashMap();
            }

            @Override
            public NavigableMap createNewNavigableMap(Comparator<?> c) {
                return new ConcurrentSkipListMap(c);
            }

        });

        private final CollectionFactory factory;

        private Predefined(CollectionFactory factory) {
            this.factory = factory;
        }

        public CollectionFactory getFactory() {
            return factory;
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<CrawlItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Text>bezveze mi je ova s piletinom</Text>
  <Rating>2</Rating>
  <Source>http://pauza.hr/menu/sladomazo-palacinkarnica</Source>
</CrawlItem>


text:
/* eslint global-require: 0 */

import { Platform } from 'react-native';
import { createStore, applyMiddleware, compose } from 'redux';
import thunk from 'redux-thunk';
import reducer from './reducers';
import * as actionCreators from './actions/counter';

let composeEnhancers = compose;
if (__DEV__) {
  // Use it if Remote debugging with RNDebugger, otherwise use remote-redux-devtools
  /* eslint-disable no-underscore-dangle */
  composeEnhancers = (window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ||
    require('remote-redux-devtools').composeWithDevTools)({
    name: Platform.OS,
    ...require('../package.json').remotedev,
    actionCreators,
  });
  /* eslint-enable no-underscore-dangle */
}

const enhancer = composeEnhancers(applyMiddleware(thunk));

export default function configureStore(initialState) {
  const store = createStore(reducer, initialState, enhancer);
  if (module.hot) {
    module.hot.accept(() => {
      store.replaceReducer(require('./reducers').default);
    });
  }
  return store;
}


text:
using System;
using System.ServiceModel;
using System.Threading.Tasks;
using XUnitRemote.Remote.Result;

namespace XUnitRemote.Remote.Service.TestService
{
    [ServiceContract(CallbackContract = typeof(ITestResultNotificationService))]
    public interface ITestService
    {
        [OperationContract]
        [FaultContract(typeof(TestExecutionFault))]
        Task RunTest(string assemblyPath, string typeName, string methodName);
    }

    [ServiceContract]
    [ServiceKnownType(typeof(TestPassed))]
    [ServiceKnownType(typeof(TestFailed))]
    [ServiceKnownType(typeof(TestSkipped))]
    public interface ITestResultNotificationService
    {
        [OperationContract(IsOneWay = true)]
        void TestFinished(ITestResult result);
    }

    public interface ITestRunner
    {
        Task RunTest(string assemblyPath, string typeName, string methodName);
    }
}


text:
package common

import (
	log "github.com/Sirupsen/logrus"
	"runtime"
)

var Log *log.Entry

func init() {
	Log = log.NewEntry(log.StandardLogger())
}

//init logger with headers
func InitLogger(headers *HttpLib) {
	logger := log.WithFields(log.Fields{
		"x_calling_service":  headers.XCallingService,
		"x_calling_method":   headers.XCallingMethod,
	})

	Log = logger
}

//recover after panic, log traceback
func LogErr() {
	if err := recover(); err != nil {
		trace := make([]byte, 10024)
		count := runtime.Stack(trace, true)
		Log.WithField("error", err).Printf("[error recovered]")
		Log.Printf("Stack trace, lines %d  trace: %s", count, string(trace))
	}
}


text:
#include "plugin/file/state_db_pool.h"
#include "common/settings.h"
#include "common/file.h"
#include "common/uds_util.h"
#include "common/thread.h"
#include <stdio.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdlib.h>
#include <cmocka.h>
#include <unicode/ustring.h>

typedef struct pool_test
{
    state_db_pool* pool;
    /* This is uds */
    yella_ptr_vector* configs;
} pool_test;

static int set_up(void** arg)
{
    pool_test* pt;

    yella_remove_all(yella_settings_get_dir(u"file", u"data-dir"));
    pt = malloc(sizeof(pool_test));
    pt->pool = create_state_db_pool();
    pt->configs = yella_create_uds_ptr_vector();
    *arg = pt;
    return 0;
}

static int tear_down(void** arg)
{
    pool_test* pt;
    size_t i;

    pt = *arg;
    /* This has to be done this way, because destroy_state_db_pool will retain
     * all the DB files, and remove_state_db_from_pool does not retain files. */
    assert_int_equal(state_db_pool_size(pt->pool), yella_ptr_vector_size(pt->configs));
    for (i = 0; i < yella_ptr_vector_size(pt->configs); i++)
        remove_state_db_from_pool(pt->pool, yella_ptr_vector_at(pt->configs, i));
    assert_int_equal(state_db_pool_size(pt->pool), 0);
    destroy_state_db_pool(pt->pool);
    yella_destroy_ptr_vector(pt->configs);
    free(pt);
    return 0;
}

static void get(void** arg)
{
    pool_test* pt;
    state_db* db;

    pt = *arg;
    db = get_state_db_from_pool(pt->pool, u"doggies");
    assert_non_null(db);
    yella_push_back_ptr_vector(pt->configs, udsnew(u"doggies"));
    assert_int_equal(u_strcmp(state_db_name(db), u"doggies"), 0);
}

static void exceed_max(void** arg)
{
    pool_test* pt;
    state_db* db;

    pt = *arg;
    db = get_state_db_from_pool(pt->pool, u"one");
    assert_non_null(db);
    assert_int_equal(state_db_pool_size(pt->pool), 1);
    assert_int_equal(u_strcmp(state_db_name(db), u"one"), 0);
    yella_sleep_this_thread_milliseconds(100);
    db = get_state_db_from_pool(pt->pool, u"two");
    assert_non_null(db);
    assert_int_equal(state_db_pool_size(pt->pool), 2);
    assert_int_equal(u_strcmp(state_db_name(db), u"two"), 0);
    yella_push_back_ptr_vector(pt->configs, udsnew(u"two"));
    yella_sleep_this_thread_milliseconds(100);
    db = get_state_db_from_pool(pt->pool, u"three");
    assert_non_null(db);
    assert_int_equal(state_db_pool_size(pt->pool), 2);
    assert_int_equal(u_strcmp(state_db_name(db), u"three"), 0);
    remove_state_db_from_pool(pt->pool, u"three");
    assert_int_equal(state_db_pool_size(pt->pool), 1);
    db = get_state_db_from_pool(pt->pool, u"one");
    assert_non_null(db);
    assert_int_equal(state_db_pool_size(pt->pool), 2);
    assert_int_equal(u_strcmp(state_db_name(db), u"one"), 0);
    yella_push_back_ptr_vector(pt->configs, udsnew(u"one"));
}

static void repeated(void** arg)
{
    pool_test* pt;
    state_db* db;
    int i;

    pt = *arg;
    for (i = 0; i < 3; i++)
    {
        db = get_state_db_from_pool(pt->pool, u"one");
        assert_non_null(db);
        assert_int_equal(state_db_pool_size(pt->pool), 1);
        assert_int_equal(u_strcmp(state_db_name(db), u"one"), 0);
    }
    yella_push_back_ptr_vector(pt->configs, udsnew(u"one"));
}

int main()
{
    const struct CMUnitTest tests[] =
    {
        cmocka_unit_test_setup_teardown(get, set_up, tear_down),
        cmocka_unit_test_setup_teardown(exceed_max, set_up, tear_down),
        cmocka_unit_test_setup_teardown(repeated, set_up, tear_down)
    };

    yella_load_settings_doc();
    yella_destroy_settings_doc();
    yella_settings_set_dir(u"file", u"data-dir", u"state-db-pool-test-data");
    yella_settings_set_uint(u"file", u"max-spool-dbs", 2);
    return cmocka_run_group_tests(tests, NULL, NULL);
}


text:
var async = require('async');
var fs = require('fs');
var licenses = require('./licenses');
var path = require('path');
var promptFor = require('./prompts');
var isValid = require('./validator');

function help() {
  var filePath = path.resolve(__dirname, '../data/help.txt');
  var contents = fs.readFileSync(filePath, 'utf8');
  console.log(contents);
}

function generate(opts) {
  function generateLicense(opts) {
    var source = path.resolve(__dirname, '../licenses', opts.license + '.txt');
    var target = path.resolve(opts.path, opts.filename);
    var contents = fs.readFileSync(source, 'utf8');
    var license = licenses[opts.license];

    if (license.placeholders.description && opts.description) {
      var descriptionRegExp = new RegExp(license.placeholders.description);
      contents = contents.replace(descriptionRegExp, opts.description);
    }
    if (license.placeholders.year && opts.year) {
      var yearRegExp = new RegExp(license.placeholders.year);
      contents = contents.replace(yearRegExp, opts.year);
    }
    if (license.placeholders.user && opts.user) {
      var userRegExp = new RegExp(license.placeholders.user);
      contents = contents.replace(userRegExp, opts.user);
    }

    fs.writeFileSync(target, contents);
  }

  if (opts.license && isValid.license(opts.license) && opts.noprompt)
    return generateLicense(opts);
  else if (opts.license && !isValid.license(opts.license))
    console.log('! Invalid license:', opts.license);

  async.waterfall([
    function(cb) {
      promptFor.license(function(license) {
        opts.license = license;
        cb();
      });
    },
    function(cb) {
      var placeholder = licenses[opts.license].placeholders.description;
      if (placeholder === '')
        return cb();

      promptFor.description(placeholder, function(description) {
        opts.description = description;
        cb();
      });
    },
    function(cb) {
      var placeholder = licenses[opts.license].placeholders.user;
      if (placeholder === '')
        return cb();

      promptFor.user(placeholder, function(user) {
        opts.user = user;
        cb();
      });
    },
    function(cb) {
      var placeholder = licenses[opts.license].placeholders.year;
      if (placeholder === '')
        return cb();

      promptFor.year(placeholder, function(year) {
        opts.year = year;
        cb();
      });
    }
  ], function(err) {
    if (err) throw err;

    generateLicense(opts);

    console.log('!', opts.license.toUpperCase(), 'license generated in',
        opts.path);
  });
}

function show(opts) {
  function showLicense(license) {
    var fileName = license.toLowerCase() + '.txt';
    var filePath = path.resolve(__dirname, '../licenses', fileName);
    var contents = fs.readFileSync(filePath, 'utf8');
    process.stdout.write(contents);
  }

  if (opts.license && isValid.license(opts.license) && opts.noprompt)
    return showLicense(opts.license);
  else if (opts.license && !isValid.license(opts.license))
    console.log('! Invalid license:', opts.license);

  promptFor.license(function(license) {
    showLicense(license);
  });
}

function version() {
  var version = require('../package.json').version
  console.log(version);
}

exports.help = help;
exports.generate = generate;
exports.show = show;
exports.version = version;


text:
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/miscdevice.h>
#include <linux/init.h>
#include <linux/module.h>

#include <asm/system.h>
#include <asm/io.h>
#include <asm/dma.h>
#include <asm/ppc4xx_dma.h>

ppc_dma_ch_t dma_channels[MAX_PPC4xx_DMA_CHANNELS];

int
ppc4xx_get_dma_status(void)
{
	return (mfdcr(DCRN_DMASR));
}

void
ppc4xx_set_src_addr(int dmanr, phys_addr_t src_addr)
{
	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("set_src_addr: bad channel: %d\n", dmanr);
		return;
	}

#ifdef PPC4xx_DMA_64BIT
	mtdcr(DCRN_DMASAH0 + dmanr*2, (u32)(src_addr >> 32));
#else
	mtdcr(DCRN_DMASA0 + dmanr*2, (u32)src_addr);
#endif
}

void
ppc4xx_set_dst_addr(int dmanr, phys_addr_t dst_addr)
{
	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("set_dst_addr: bad channel: %d\n", dmanr);
		return;
	}

#ifdef PPC4xx_DMA_64BIT
	mtdcr(DCRN_DMADAH0 + dmanr*2, (u32)(dst_addr >> 32));
#else
	mtdcr(DCRN_DMADA0 + dmanr*2, (u32)dst_addr);
#endif
}

void
ppc4xx_enable_dma(unsigned int dmanr)
{
	unsigned int control;
	ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];
	unsigned int status_bits[] = { DMA_CS0 | DMA_TS0 | DMA_CH0_ERR,
				       DMA_CS1 | DMA_TS1 | DMA_CH1_ERR,
				       DMA_CS2 | DMA_TS2 | DMA_CH2_ERR,
				       DMA_CS3 | DMA_TS3 | DMA_CH3_ERR};

	if (p_dma_ch->in_use) {
		printk("enable_dma: channel %d in use\n", dmanr);
		return;
	}

	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("enable_dma: bad channel: %d\n", dmanr);
		return;
	}

	if (p_dma_ch->mode == DMA_MODE_READ) {
		/* peripheral to memory */
		ppc4xx_set_src_addr(dmanr, 0);
		ppc4xx_set_dst_addr(dmanr, p_dma_ch->addr);
	} else if (p_dma_ch->mode == DMA_MODE_WRITE) {
		/* memory to peripheral */
		ppc4xx_set_src_addr(dmanr, p_dma_ch->addr);
		ppc4xx_set_dst_addr(dmanr, 0);
	}

	/* for other xfer modes, the addresses are already set */
	control = mfdcr(DCRN_DMACR0 + (dmanr * 0x8));

	control &= ~(DMA_TM_MASK | DMA_TD);	/* clear all mode bits */
	if (p_dma_ch->mode == DMA_MODE_MM) {
		/* software initiated memory to memory */
		control |= DMA_ETD_OUTPUT | DMA_TCE_ENABLE;
	}

	mtdcr(DCRN_DMACR0 + (dmanr * 0x8), control);

	/*
	 * Clear the CS, TS, RI bits for the channel from DMASR.  This
	 * has been observed to happen correctly only after the mode and
	 * ETD/DCE bits in DMACRx are set above.  Must do this before
	 * enabling the channel.
	 */

	mtdcr(DCRN_DMASR, status_bits[dmanr]);

	/*
	 * For device-paced transfers, Terminal Count Enable apparently
	 * must be on, and this must be turned on after the mode, etc.
	 * bits are cleared above (at least on Redwood-6).
	 */

	if ((p_dma_ch->mode == DMA_MODE_MM_DEVATDST) ||
	    (p_dma_ch->mode == DMA_MODE_MM_DEVATSRC))
		control |= DMA_TCE_ENABLE;

	/*
	 * Now enable the channel.
	 */

	control |= (p_dma_ch->mode | DMA_CE_ENABLE);

	mtdcr(DCRN_DMACR0 + (dmanr * 0x8), control);

	p_dma_ch->in_use = 1;
}

void
ppc4xx_disable_dma(unsigned int dmanr)
{
	unsigned int control;
	ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];

	if (!p_dma_ch->in_use) {
		printk("disable_dma: channel %d not in use\n", dmanr);
		return;
	}

	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("disable_dma: bad channel: %d\n", dmanr);
		return;
	}

	control = mfdcr(DCRN_DMACR0 + (dmanr * 0x8));
	control &= ~DMA_CE_ENABLE;
	mtdcr(DCRN_DMACR0 + (dmanr * 0x8), control);

	p_dma_ch->in_use = 0;
}

/*
 * Sets the dma mode for single DMA transfers only.
 * For scatter/gather transfers, the mode is passed to the
 * alloc_dma_handle() function as one of the parameters.
 *
 * The mode is simply saved and used later.  This allows
 * the driver to call set_dma_mode() and set_dma_addr() in
 * any order.
 *
 * Valid mode values are:
 *
 * DMA_MODE_READ          peripheral to memory
 * DMA_MODE_WRITE         memory to peripheral
 * DMA_MODE_MM            memory to memory
 * DMA_MODE_MM_DEVATSRC   device-paced memory to memory, device at src
 * DMA_MODE_MM_DEVATDST   device-paced memory to memory, device at dst
 */
int
ppc4xx_set_dma_mode(unsigned int dmanr, unsigned int mode)
{
	ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];

	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("set_dma_mode: bad channel 0x%x\n", dmanr);
		return DMA_STATUS_BAD_CHANNEL;
	}

	p_dma_ch->mode = mode;

	return DMA_STATUS_GOOD;
}

/*
 * Sets the DMA Count register. Note that 'count' is in bytes.
 * However, the DMA Count register counts the number of "transfers",
 * where each transfer is equal to the bus width.  Thus, count
 * MUST be a multiple of the bus width.
 */
void
ppc4xx_set_dma_count(unsigned int dmanr, unsigned int count)
{
	ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];

#ifdef DEBUG_4xxDMA
	{
		int error = 0;
		switch (p_dma_ch->pwidth) {
		case PW_8:
			break;
		case PW_16:
			if (count & 0x1)
				error = 1;
			break;
		case PW_32:
			if (count & 0x3)
				error = 1;
			break;
		case PW_64:
			if (count & 0x7)
				error = 1;
			break;
		default:
			printk("set_dma_count: invalid bus width: 0x%x\n",
			       p_dma_ch->pwidth);
			return;
		}
		if (error)
			printk
			    ("Warning: set_dma_count count 0x%x bus width %d\n",
			     count, p_dma_ch->pwidth);
	}
#endif

	count = count >> p_dma_ch->shift;

	mtdcr(DCRN_DMACT0 + (dmanr * 0x8), count);
}

/*
 *   Returns the number of bytes left to be transfered.
 *   After a DMA transfer, this should return zero.
 *   Reading this while a DMA transfer is still in progress will return
 *   unpredictable results.
 */
int
ppc4xx_get_dma_residue(unsigned int dmanr)
{
	unsigned int count;
	ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];

	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("ppc4xx_get_dma_residue: bad channel 0x%x\n", dmanr);
		return DMA_STATUS_BAD_CHANNEL;
	}

	count = mfdcr(DCRN_DMACT0 + (dmanr * 0x8));

	return (count << p_dma_ch->shift);
}

/*
 * Sets the DMA address for a memory to peripheral or peripheral
 * to memory transfer.  The address is just saved in the channel
 * structure for now and used later in enable_dma().
 */
void
ppc4xx_set_dma_addr(unsigned int dmanr, phys_addr_t addr)
{
	ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];

	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("ppc4xx_set_dma_addr: bad channel: %d\n", dmanr);
		return;
	}

#ifdef DEBUG_4xxDMA
	{
		int error = 0;
		switch (p_dma_ch->pwidth) {
		case PW_8:
			break;
		case PW_16:
			if ((unsigned) addr & 0x1)
				error = 1;
			break;
		case PW_32:
			if ((unsigned) addr & 0x3)
				error = 1;
			break;
		case PW_64:
			if ((unsigned) addr & 0x7)
				error = 1;
			break;
		default:
			printk("ppc4xx_set_dma_addr: invalid bus width: 0x%x\n",
			       p_dma_ch->pwidth);
			return;
		}
		if (error)
			printk("Warning: ppc4xx_set_dma_addr addr 0x%x bus width %d\n",
			       addr, p_dma_ch->pwidth);
	}
#endif

	/* save dma address and program it later after we know the xfer mode */
	p_dma_ch->addr = addr;
}

/*
 * Sets both DMA addresses for a memory to memory transfer.
 * For memory to peripheral or peripheral to memory transfers
 * the function set_dma_addr() should be used instead.
 */
void
ppc4xx_set_dma_addr2(unsigned int dmanr, phys_addr_t src_dma_addr,
		     phys_addr_t dst_dma_addr)
{
	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("ppc4xx_set_dma_addr2: bad channel: %d\n", dmanr);
		return;
	}

#ifdef DEBUG_4xxDMA
	{
		ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];
		int error = 0;
		switch (p_dma_ch->pwidth) {
			case PW_8:
				break;
			case PW_16:
				if (((unsigned) src_dma_addr & 0x1) ||
						((unsigned) dst_dma_addr & 0x1)
				   )
					error = 1;
				break;
			case PW_32:
				if (((unsigned) src_dma_addr & 0x3) ||
						((unsigned) dst_dma_addr & 0x3)
				   )
					error = 1;
				break;
			case PW_64:
				if (((unsigned) src_dma_addr & 0x7) ||
						((unsigned) dst_dma_addr & 0x7)
				   )
					error = 1;
				break;
			default:
				printk("ppc4xx_set_dma_addr2: invalid bus width: 0x%x\n",
						p_dma_ch->pwidth);
				return;
		}
		if (error)
			printk
				("Warning: ppc4xx_set_dma_addr2 src 0x%x dst 0x%x bus width %d\n",
				 src_dma_addr, dst_dma_addr, p_dma_ch->pwidth);
	}
#endif

	ppc4xx_set_src_addr(dmanr, src_dma_addr);
	ppc4xx_set_dst_addr(dmanr, dst_dma_addr);
}

/*
 * Enables the channel interrupt.
 *
 * If performing a scatter/gatter transfer, this function
 * MUST be called before calling alloc_dma_handle() and building
 * the sgl list.  Otherwise, interrupts will not be enabled, if
 * they were previously disabled.
 */
int
ppc4xx_enable_dma_interrupt(unsigned int dmanr)
{
	unsigned int control;
	ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];

	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("ppc4xx_enable_dma_interrupt: bad channel: %d\n", dmanr);
		return DMA_STATUS_BAD_CHANNEL;
	}

	p_dma_ch->int_enable = 1;

	control = mfdcr(DCRN_DMACR0 + (dmanr * 0x8));
	control |= DMA_CIE_ENABLE;	/* Channel Interrupt Enable */
	mtdcr(DCRN_DMACR0 + (dmanr * 0x8), control);

	return DMA_STATUS_GOOD;
}

/*
 * Disables the channel interrupt.
 *
 * If performing a scatter/gatter transfer, this function
 * MUST be called before calling alloc_dma_handle() and building
 * the sgl list.  Otherwise, interrupts will not be disabled, if
 * they were previously enabled.
 */
int
ppc4xx_disable_dma_interrupt(unsigned int dmanr)
{
	unsigned int control;
	ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];

	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("ppc4xx_disable_dma_interrupt: bad channel: %d\n", dmanr);
		return DMA_STATUS_BAD_CHANNEL;
	}

	p_dma_ch->int_enable = 0;

	control = mfdcr(DCRN_DMACR0 + (dmanr * 0x8));
	control &= ~DMA_CIE_ENABLE;	/* Channel Interrupt Enable */
	mtdcr(DCRN_DMACR0 + (dmanr * 0x8), control);

	return DMA_STATUS_GOOD;
}

/*
 * Configures a DMA channel, including the peripheral bus width, if a
 * peripheral is attached to the channel, the polarity of the DMAReq and
 * DMAAck signals, etc.  This information should really be setup by the boot
 * code, since most likely the configuration won't change dynamically.
 * If the kernel has to call this function, it's recommended that it's
 * called from platform specific init code.  The driver should not need to
 * call this function.
 */
int
ppc4xx_init_dma_channel(unsigned int dmanr, ppc_dma_ch_t * p_init)
{
	unsigned int polarity;
	uint32_t control = 0;
	ppc_dma_ch_t *p_dma_ch = &dma_channels[dmanr];

	DMA_MODE_READ = (unsigned long) DMA_TD;	/* Peripheral to Memory */
	DMA_MODE_WRITE = 0;	/* Memory to Peripheral */

	if (!p_init) {
		printk("ppc4xx_init_dma_channel: NULL p_init\n");
		return DMA_STATUS_NULL_POINTER;
	}

	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("ppc4xx_init_dma_channel: bad channel %d\n", dmanr);
		return DMA_STATUS_BAD_CHANNEL;
	}

#if DCRN_POL > 0
	polarity = mfdcr(DCRN_POL);
#else
	polarity = 0;
#endif

	/* Setup the control register based on the values passed to
	 * us in p_init.  Then, over-write the control register with this
	 * new value.
	 */
	control |= SET_DMA_CONTROL;

	/* clear all polarity signals and then "or" in new signal levels */
	polarity &= ~GET_DMA_POLARITY(dmanr);
	polarity |= p_init->polarity;
#if DCRN_POL > 0
	mtdcr(DCRN_POL, polarity);
#endif
	mtdcr(DCRN_DMACR0 + (dmanr * 0x8), control);

	/* save these values in our dma channel structure */
	memcpy(p_dma_ch, p_init, sizeof (ppc_dma_ch_t));

	/*
	 * The peripheral width values written in the control register are:
	 *   PW_8                 0
	 *   PW_16                1
	 *   PW_32                2
	 *   PW_64                3
	 *
	 *   Since the DMA count register takes the number of "transfers",
	 *   we need to divide the count sent to us in certain
	 *   functions by the appropriate number.  It so happens that our
	 *   right shift value is equal to the peripheral width value.
	 */
	p_dma_ch->shift = p_init->pwidth;

	/*
	 * Save the control word for easy access.
	 */
	p_dma_ch->control = control;

	mtdcr(DCRN_DMASR, 0xffffffff);	/* clear status register */
	return DMA_STATUS_GOOD;
}

/*
 * This function returns the channel configuration.
 */
int
ppc4xx_get_channel_config(unsigned int dmanr, ppc_dma_ch_t * p_dma_ch)
{
	unsigned int polarity;
	unsigned int control;

	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("ppc4xx_get_channel_config: bad channel %d\n", dmanr);
		return DMA_STATUS_BAD_CHANNEL;
	}

	memcpy(p_dma_ch, &dma_channels[dmanr], sizeof (ppc_dma_ch_t));

#if DCRN_POL > 0
	polarity = mfdcr(DCRN_POL);
#else
	polarity = 0;
#endif

	p_dma_ch->polarity = polarity & GET_DMA_POLARITY(dmanr);
	control = mfdcr(DCRN_DMACR0 + (dmanr * 0x8));

	p_dma_ch->cp = GET_DMA_PRIORITY(control);
	p_dma_ch->pwidth = GET_DMA_PW(control);
	p_dma_ch->psc = GET_DMA_PSC(control);
	p_dma_ch->pwc = GET_DMA_PWC(control);
	p_dma_ch->phc = GET_DMA_PHC(control);
	p_dma_ch->ce = GET_DMA_CE_ENABLE(control);
	p_dma_ch->int_enable = GET_DMA_CIE_ENABLE(control);
	p_dma_ch->shift = GET_DMA_PW(control);

#ifdef CONFIG_PPC4xx_EDMA
	p_dma_ch->pf = GET_DMA_PREFETCH(control);
#else
	p_dma_ch->ch_enable = GET_DMA_CH(control);
	p_dma_ch->ece_enable = GET_DMA_ECE(control);
	p_dma_ch->tcd_disable = GET_DMA_TCD(control);
#endif
	return DMA_STATUS_GOOD;
}

/*
 * Sets the priority for the DMA channel dmanr.
 * Since this is setup by the hardware init function, this function
 * can be used to dynamically change the priority of a channel.
 *
 * Acceptable priorities:
 *
 * PRIORITY_LOW
 * PRIORITY_MID_LOW
 * PRIORITY_MID_HIGH
 * PRIORITY_HIGH
 *
 */
int
ppc4xx_set_channel_priority(unsigned int dmanr, unsigned int priority)
{
	unsigned int control;

	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("ppc4xx_set_channel_priority: bad channel %d\n", dmanr);
		return DMA_STATUS_BAD_CHANNEL;
	}

	if ((priority != PRIORITY_LOW) &&
	    (priority != PRIORITY_MID_LOW) &&
	    (priority != PRIORITY_MID_HIGH) && (priority != PRIORITY_HIGH)) {
		printk("ppc4xx_set_channel_priority: bad priority: 0x%x\n", priority);
	}

	control = mfdcr(DCRN_DMACR0 + (dmanr * 0x8));
	control |= SET_DMA_PRIORITY(priority);
	mtdcr(DCRN_DMACR0 + (dmanr * 0x8), control);

	return DMA_STATUS_GOOD;
}

/*
 * Returns the width of the peripheral attached to this channel. This assumes
 * that someone who knows the hardware configuration, boot code or some other
 * init code, already set the width.
 *
 * The return value is one of:
 *   PW_8
 *   PW_16
 *   PW_32
 *   PW_64
 *
 *   The function returns 0 on error.
 */
unsigned int
ppc4xx_get_peripheral_width(unsigned int dmanr)
{
	unsigned int control;

	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk("ppc4xx_get_peripheral_width: bad channel %d\n", dmanr);
		return DMA_STATUS_BAD_CHANNEL;
	}

	control = mfdcr(DCRN_DMACR0 + (dmanr * 0x8));

	return (GET_DMA_PW(control));
}

/*
 * Clears the channel status bits
 */
int
ppc4xx_clr_dma_status(unsigned int dmanr)
{
	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk(KERN_ERR "ppc4xx_clr_dma_status: bad channel: %d\n", dmanr);
		return DMA_STATUS_BAD_CHANNEL;
	}
	mtdcr(DCRN_DMASR, ((u32)DMA_CH0_ERR | (u32)DMA_CS0 | (u32)DMA_TS0) >> dmanr);
	return DMA_STATUS_GOOD;
}

#ifdef CONFIG_PPC4xx_EDMA
/*
 * Enables the burst on the channel (BTEN bit in the control/count register)
 * Note:
 * For scatter/gather dma, this function MUST be called before the
 * ppc4xx_alloc_dma_handle() func as the chan count register is copied into the
 * sgl list and used as each sgl element is added.
 */
int
ppc4xx_enable_burst(unsigned int dmanr)
{
	unsigned int ctc;
	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk(KERN_ERR "ppc4xx_enable_burst: bad channel: %d\n", dmanr);
		return DMA_STATUS_BAD_CHANNEL;
	}
        ctc = mfdcr(DCRN_DMACT0 + (dmanr * 0x8)) | DMA_CTC_BTEN;
	mtdcr(DCRN_DMACT0 + (dmanr * 0x8), ctc);
	return DMA_STATUS_GOOD;
}
/*
 * Disables the burst on the channel (BTEN bit in the control/count register)
 * Note:
 * For scatter/gather dma, this function MUST be called before the
 * ppc4xx_alloc_dma_handle() func as the chan count register is copied into the
 * sgl list and used as each sgl element is added.
 */
int
ppc4xx_disable_burst(unsigned int dmanr)
{
	unsigned int ctc;
	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk(KERN_ERR "ppc4xx_disable_burst: bad channel: %d\n", dmanr);
		return DMA_STATUS_BAD_CHANNEL;
	}
	ctc = mfdcr(DCRN_DMACT0 + (dmanr * 0x8)) &~ DMA_CTC_BTEN;
	mtdcr(DCRN_DMACT0 + (dmanr * 0x8), ctc);
	return DMA_STATUS_GOOD;
}
/*
 * Sets the burst size (number of peripheral widths) for the channel
 * (BSIZ bits in the control/count register))
 * must be one of:
 *    DMA_CTC_BSIZ_2
 *    DMA_CTC_BSIZ_4
 *    DMA_CTC_BSIZ_8
 *    DMA_CTC_BSIZ_16
 * Note:
 * For scatter/gather dma, this function MUST be called before the
 * ppc4xx_alloc_dma_handle() func as the chan count register is copied into the
 * sgl list and used as each sgl element is added.
 */
int
ppc4xx_set_burst_size(unsigned int dmanr, unsigned int bsize)
{
	unsigned int ctc;
	if (dmanr >= MAX_PPC4xx_DMA_CHANNELS) {
		printk(KERN_ERR "ppc4xx_set_burst_size: bad channel: %d\n", dmanr);
		return DMA_STATUS_BAD_CHANNEL;
	}
	ctc = mfdcr(DCRN_DMACT0 + (dmanr * 0x8)) &~ DMA_CTC_BSIZ_MSK;
	ctc |= (bsize & DMA_CTC_BSIZ_MSK);
	mtdcr(DCRN_DMACT0 + (dmanr * 0x8), ctc);
	return DMA_STATUS_GOOD;
}

EXPORT_SYMBOL(ppc4xx_enable_burst);
EXPORT_SYMBOL(ppc4xx_disable_burst);
EXPORT_SYMBOL(ppc4xx_set_burst_size);
#endif /* CONFIG_PPC4xx_EDMA */

EXPORT_SYMBOL(ppc4xx_init_dma_channel);
EXPORT_SYMBOL(ppc4xx_get_channel_config);
EXPORT_SYMBOL(ppc4xx_set_channel_priority);
EXPORT_SYMBOL(ppc4xx_get_peripheral_width);
EXPORT_SYMBOL(dma_channels);
EXPORT_SYMBOL(ppc4xx_set_src_addr);
EXPORT_SYMBOL(ppc4xx_set_dst_addr);
EXPORT_SYMBOL(ppc4xx_set_dma_addr);
EXPORT_SYMBOL(ppc4xx_set_dma_addr2);
EXPORT_SYMBOL(ppc4xx_enable_dma);
EXPORT_SYMBOL(ppc4xx_disable_dma);
EXPORT_SYMBOL(ppc4xx_set_dma_mode);
EXPORT_SYMBOL(ppc4xx_set_dma_count);
EXPORT_SYMBOL(ppc4xx_get_dma_residue);
EXPORT_SYMBOL(ppc4xx_enable_dma_interrupt);
EXPORT_SYMBOL(ppc4xx_disable_dma_interrupt);
EXPORT_SYMBOL(ppc4xx_get_dma_status);
EXPORT_SYMBOL(ppc4xx_clr_dma_status);


text:
package com.evolveum.midpoint.prism.impl.lex.json;

import java.io.IOException;

import com.evolveum.midpoint.prism.impl.marshaller.ItemPathParserTemp;
import org.apache.commons.lang.StringUtils;

import com.evolveum.prism.xml.ns._public.types_3.ItemPathType;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonToken;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;

public class ItemPathTypeDeserializer extends JsonDeserializer<ItemPathType>{

    @Override
    public ItemPathType deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {
        if (jp.getCurrentToken() != JsonToken.VALUE_STRING){
            throw new JsonParseException("Cannot parse path value. Expected that the value will be string but it is: " + jp.getCurrentTokenId(), jp.getCurrentLocation());
        }
        String path = jp.getText();
        if (StringUtils.isBlank(path)){
            throw new IllegalStateException("Error while deserializing path. No path specified.");
        }
        return new ItemPathType(ItemPathParserTemp.parseFromString(path));
    }

}


text:
module.exports = {
    settings: {
        react: {
            version: '16.2.0',
        },
    },
    rules: {
        // warns when trying to name boolean variables like `isEnabled` or `wasActive`
        'react/boolean-prop-naming': 'warn',

        // requires a type attribute on all buttons
        'react/button-has-type': 'error',

        // requires defaultProps do not have a corresponding `isRequired` propType
        'react/default-props-match-prop-types': 'error',

        // require access to object's properties are done through destructuring only
        'react/destructuring-assignment': ['error', 'always'],

        // require setting of `displayName` property on components
        'react/display-name': 'error',

        // forbids the use of `style` property on components, only on dom elements (div, span, etc)
        'react/forbid-component-props': [
            'warn',
            {
                forbid: ['style'],
            },
        ],

        // forbids the use of `id` property on dom elements
        'react/forbid-dom-props': [
            'warn',
            {
                forbid: ['id'],
            },
        ],

        // don't allow the use of any or array PropTypes as they're too vague
        'react/forbid-prop-types': [
            'warn',
            {
                forbid: ['any', 'array'],
            },
        ],

        // don't allow using other components propTypes unless exported out the component
        'react/forbid-foreign-prop-types': 'error',

        // don't allow the use of `this.state` within `setState` as it can cause issues
        'react/no-access-state-in-setstate': 'error',

        // don't allow using array indexes as key's when looping over arrays for components
        'react/no-array-index-key': 'error',

        // don't allow children of a component to be passed in as a property, they should be done via JSX nesting
        'react/no-children-prop': 'error',

        // don't allow using `dangerouslySetInnerHTML` as we shouldn't be using it, EVER
        'react/no-danger': 'error',

        // don't allow using `dangerouslySetInnerHTML` as well as children via JSX nesting
        'react/no-danger-with-children': 'error',

        // don't allow using deprecated methods of React
        'react/no-deprecated': 'error',

        // don't allow `setState` in `componentDidMount` methods outside of `onMount`
        'react/no-did-mount-set-state': 'error',

        // don't allow `setState` in `componentDidUpdate` methods outside of `onUpdate`
        'react/no-did-update-set-state': 'error',

        // don't allow mutating state via `this.state`
        'react/no-direct-mutation-state': 'error',

        // don't allow use of `findDOMNode`
        'react/no-find-dom-node': 'error',

        // don't allow use of deprecated `isMounted` function
        'react/no-is-mounted': 'error',

        // don't allow more than one component per file, even stateless components
        'react/no-multi-comp': [
            'error',
            {
                ignoreStateless: false,
            },
        ],

        // don't allow defining `shouldComponentUpdate` when using a pure component
        'react/no-redundant-should-component-update': 'error',

        // don't allow using the return value from `ReactDOM.render()`
        'react/no-render-return-value': 'error',

        // shows an error for common typos
        'react/no-typos': 'error',

        // don't allow using string ref attributes
        'react/no-string-refs': 'error',

        // don't allow the use of `this` in stateless functional components
        'react/no-this-in-sfc': 'error',

        // don't allow the use of unescaped entities in JSX
        'react/no-unescaped-entities': 'error',

        // enforce the use of camelCase property names
        'react/no-unknown-property': 'error',

        // don't allow unused PropType's
        'react/no-unused-prop-types': 'error',

        // don't allow unused state
        'react/no-unused-state': 'error',

        // don't allow unused state
        'react/no-unused-state': 'error',

        // don't allow the use of `setState` in `componentWillUpdate`
        'react/no-will-update-set-state': 'error',

        // ensures stateless components are used where possible over `React.Component` but allow `React.PureComponent`
        'react/prefer-stateless-function': [
            'warn',
            {
                ignorePureComponents: true,
            },
        ],

        // ensures PropType's are written and contain all properties are added into it
        'react/prop-types': 'error',

        // ensures React has been imported into all files using JSX
        'react/react-in-jsx-scope': 'error',

        // requires all PropType's that aren't required to have a default defined for it
        'react/require-default-props': 'error',

        // requires render functions return correctly
        'react/require-render-return': 'error',

        // requires components with no children to use self closing tags
        'react/self-closing-comp': 'error',

        // ensures correct ordering of methods in a class component
        'react/sort-comp': [
            'error',
            {
                order: ['static-methods', 'lifecycle', 'everything-else', 'rendering'],
                groups: {
                    rendering: ['/^render.+$/', 'render'],
                },
            },
        ],

        // require style properties to be defined in a variable
        'react/style-prop-object': 'error',

        // don't allow self closing DOM elements to have children (img, br, etc)
        'react/void-dom-elements-no-children': 'error',

        // all boolean attributes must be specified as `<A prop={true} />` rather than just `<A prop />`
        'react/jsx-boolean-value': ['error', 'always'],

        // ensures any multiline components will have closing bracket aligning with the opening tag
        'react/jsx-closing-bracket-location': 'error',

        // ensures any multiline components will have closing tag aligning with the opening tag
        'react/jsx-closing-tag-location': 'error',

        // don't allow spaces in between JSX variables like `<A prop={ test } />`
        'react/jsx-curly-spacing': ['error', 'never'],

        // don't allow spaces around the `=` in JSX variables like `<A prop = {test} />`
        'react/jsx-equals-spacing': ['error', 'never'],

        // only allow naming components as .js and not .jsx
        'react/jsx-filename-extension': [
            'error',
            {
                extensions: ['.js'],
            },
        ],

        // require any multiline components to have the first property on a new line
        'react/jsx-first-prop-new-line': ['error', 'multiline'],

        // ensure all properties use event handlers prefixed with `on` and class methods prefixed with `handle`
        'react/jsx-handler-names': [
            'error',
            {
                eventHandlerPrefix: 'handle',
                eventHandlerPropPrefix: 'on',
            },
        ],

        // ensure all indents in JSX use 4 spaces
        'react/jsx-indent': ['error', 4],

        // ensure all indents in props to use 4 spaces
        'react/jsx-indent-props': ['error', 4],

        // require the `key` property to be specified where needed
        'react/jsx-key': 'error',

        // ensure that all multiline component props are limited to 1 per line
        'react/jsx-max-props-per-line': [
            'error',
            {
                maximum: 1,
                when: 'multiline',
            },
        ],

        // don't allow the use of arrow functions or `.bind` in render methods, except for refs
        'react/jsx-no-bind': [
            'error',
            {
                ignoreRefs: true,
            },
        ],

        // don't allow the use of HTML comments and enforce JSX comment style
        'react/jsx-no-comment-textnodes': 'error',

        // don't allow duplicate props
        'react/jsx-no-duplicate-props': 'error',

        // don't allow `target="_blank"` on links without `rel="noopener noreferrer"`
        'react/jsx-no-target-blank': 'error',

        // don't allow using undefined components
        'react/jsx-no-undef': 'error',

        // require all components use PascalCase
        'react/jsx-pascal-case': 'error',

        // require a space before self closing tags such as `<A prop={prop} />` rather than `<A prop={prop}/>`
        'react/jsx-tag-spacing': [
            'error',
            {
                closingSlash: 'never',
                beforeSelfClosing: 'always',
                afterOpening: 'never',
            },
        ],

        // ensures components that import React don't show it as being unused
        'react/jsx-uses-react': 'error',

        // ensures imported components don't show up as unused when used in JSX
        'react/jsx-uses-vars': 'error',

        // ensures multiline JSX is wrapped within parenthesis
        'react/jsx-wrap-multilines': 'error',

        // forbids using another components propTypes unless they're exported
        'react/forbid-foreign-prop-types': 'error',
    },
};


text:
var express = require('express');
var browserify = require('browserify');

var app = express.createServer();
app.use(express.static(__dirname));
app.use(browserify({
    entry : __dirname + '/main.js',
    watch : true,
}));

app.listen(8081);
console.log('Listening on :8081');


text:
var Assertion = require('should').Assertion;
var util = require('util');

Assertion.add('approximatelyDeep', function (other, delta, description) {
    this.params = {
        operator: 'to be approximately deep close to ' + util.inspect(other) + ' (±' + delta + ')',
        message: description
    };
    goDeeper(this.obj, other, delta, this);
});

function goDeeper(actual, expected, maxDifference, assertion) {
    if (typeof actual === 'number') {
        return assertion.assert((actual === expected) || (Math.abs(actual - expected) <= maxDifference));
    } else if (Array.isArray(actual)) {
        var l = actual.length;
        assertion.assert(l === expected.length);
        for (var i = 0; i < l; i++) {
            goDeeper(actual[i], expected[i], maxDifference, assertion);
        }
    } else {
        // error for all other types
        assertion.assert(false);
    }
}


text:
mod chip8;
mod keyboard;
mod display;

#[cfg(feature="interpreter")]
mod interpreter;

#[cfg(not(feature="interpreter"))]
mod recompiler;

#[cfg(not(feature="interpreter"))]
mod codeemitter;

#[cfg(not(feature="interpreter"))]
mod codecache;

pub use self::chip8::Chip8;

const MEMORY_SIZE: usize = 0x1000;
const ROM_START_ADDRESS: u16 = 0x200;


text: bool LOG_OPEN = true;


text:
<?php

namespace Kunstmaan\LeadGenerationBundle\AdminList;

use Doctrine\ORM\EntityManager;
use Kunstmaan\AdminListBundle\AdminList\FilterType\ORM;
use Kunstmaan\AdminListBundle\AdminList\Configurator\AbstractDoctrineORMAdminListConfigurator;
use Kunstmaan\AdminBundle\Helper\Security\Acl\AclHelper;

class PopupAdminListConfigurator extends AbstractDoctrineORMAdminListConfigurator
{
    /**
     * @param EntityManager $em The entity manager
     * @param AclHelper $aclHelper The acl helper
     */
    public function __construct(EntityManager $em, AclHelper $aclHelper = null)
    {
        parent::__construct($em, $aclHelper);

        $this->setListTemplate('KunstmaanLeadGenerationBundle:AdminList:popup-list.html.twig');
        $this->setEditTemplate('KunstmaanLeadGenerationBundle:AdminList:popup-edit.html.twig');
        $this->setAddTemplate('KunstmaanLeadGenerationBundle:AdminList:popup-edit.html.twig');
    }

    /**
     * Configure the visible columns
     */
    public function buildFields()
    {
        $this->addField('id', 'kuma_lead_generation.popup.list.header.id', true);
        $this->addField('name', 'kuma_lead_generation.popup.list.header.name', true);
        $this->addField('classname', 'kuma_lead_generation.popup.list.header.type', false);
        $this->addField('htmlId', 'kuma_lead_generation.popup.list.header.html_id', true);
        $this->addField('ruleCount', 'kuma_lead_generation.popup.list.header.rule_count', false);
    }

    /**
     * Build filters for admin list
     */
    public function buildFilters()
    {
        $this->addFilter('name', new ORM\StringFilterType('name'), 'kuma_lead_generation.popup.list.filter.name');
        $this->addFilter('htmlId', new ORM\StringFilterType('htmlId'), 'kuma_lead_generation.popup.list.filter.html_id');
    }

    /**
     * Get bundle name
     *
     * @return string
     */
    public function getBundleName()
    {
        return 'KunstmaanLeadGenerationBundle';
    }

    /**
     * Get entity name
     *
     * @return string
     */
    public function getEntityName()
    {
        return 'Popup\AbstractPopup';
    }

    /**
     * @param object|array $item
     *
     * @return bool
     */
    public function canEdit($item)
    {
        return true;
    }

    /**
     * Configure if it's possible to delete the given $item
     *
     * @param object|array $item
     *
     * @return bool
     */
    public function canDelete($item)
    {
        return true;
    }

    /**
     * Configure if it's possible to add new items
     *
     * @return bool
     */
    public function canAdd()
    {
        return true;
    }
}


text:
<?php
/**
 * Controller_Keyword
 * キーワード
 *
 *
 *
 * @author sr2smail
 *
 */
class Controller_Keyword extends Controller_Template
{
	public function before()
	{
		parent::before();

 		/*
 		 * 管理者ログインが必要なアクション
 		 * edit
 		 * delete
 		 *
 		 * 管理者ログインが不要なアクション
 		 * index
 		 * view
 		 */
 		$admin_login_need_action = array('edit', 'delete');

 		// 現在アクティブなアクション
 		$active = Request::active()->action;

 		/*
 		 * editとdeleteはログインが必要
 		 */
 		if(in_array($active, $admin_login_need_action, true)) {
 			if (!(Auth::check() && (int)Auth::get('group') === 100)) {
 				Response::redirect('admin/login');
 			}
 		}

	}

	/**
	 * action_index
	 * キーワード画面の一覧
	 *
	 * 権限は管理者のみ
	 */
    public function action_index()
	{
 		$data['keywords'] = Model_Keyword::find('all', array (
 								'where' => array (
 									array('keyword', 'like', '%'.Input::post('keyword').'%')
 								)
 							));
		$this->template->title = "キーワード一覧";
		$this->template->content = View::forge('keyword/index', $data);
	}

	/**
	 * action_view
	 * キーワード画面の詳細(閲覧のみ)
	 *
	 * すべての権限で参照可能
	 *
	 * @param string $id
	 */
	public function action_view($keyword_id = null)
	{
		is_null($keyword_id) and Response::redirect('keyword');

		if ( ! $data['keyword'] = Model_Keyword::find($keyword_id))
		{
			Session::set_flash('error', 'キーワードがみつまりませんでした。 番号'.$keyword_id);
			/*
			 * @todo
			 * リダイレクト先は要検討
			 */
			Response::redirect('keyword');
		}

		/*
		 * 小項目のキーワードリンクのためデータを取得
		 * first_category_idで取得できる
		 * データがない場合は何も表示しない
		 */
		//-- 小項目 firstcategory_idを取得
		$keywordcategory_where['keyword_id'] = $keyword_id;
		$data['keyword_datas'] = Model_Keywordcategory::get_keywordcategories(
		        $keywordcategory_where
		        , 1 /*get_one 1行*/
		);
		$keywordcategory_where = null;

		//-- 小項目ごとのキーワードを取得
		$keywordcategory_where['firstcategory_id'] = $data['keyword_datas']->firstcategory_id;
		$data['keywordcategories'] = Model_Keywordcategory::get_keywordcategories(
		        $keywordcategory_where
		        , 0 /*get 複数行*/
		);
		$keywordcategory_where = null;

		/*
		 * タイトルはキーワード
		 */
		$this->template->title = $data['keyword']->keyword;

		/*
		 * HTMLを表示するために、第3引数はfalse
		 */
		$this->template->content = View::forge('keyword/view', $data, false);

	}

	public function action_create()
	{
		if (Input::method() == 'POST')
		{
			$val = Model_Keyword::validate('create');

			if ($val->run())
			{
				$keyword = Model_Keyword::forge(array(
					'keyword' => Input::post('keyword'),
					'desctiption' => Input::post('desctiption'),
					'deleted_at' => Input::post('deleted_at'),
				));

				if ($keyword and $keyword->save())
				{
					Session::set_flash('success', 'Added keyword #'.$keyword->id.'.');

					Response::redirect('keyword');
				}

				else
				{
					Session::set_flash('error', 'Could not save keyword.');
				}
			}
			else
			{
				Session::set_flash('error', $val->error());
			}
		}

		$this->template->title = "Keywords";
		$this->template->content = View::forge('keyword/create');

	}

	public function action_edit($id = null)
	{
		is_null($id) and Response::redirect('keyword');

		if ( ! $keyword = Model_Keyword::find($id))
		{
			Session::set_flash('error', 'Could not find keyword #'.$id);
			Response::redirect('keyword');
		}

		$val = Model_Keyword::validate('edit');

		if ($val->run())
		{
			$keyword->keyword = Input::post('keyword');
			$keyword->desctiption = Input::post('desctiption');
			$keyword->deleted_at = Input::post('deleted_at');

			if ($keyword->save())
			{
				Session::set_flash('success', 'Updated keyword #' . $id);

				Response::redirect('keyword');
			}

			else
			{
				Session::set_flash('error', 'Could not update keyword #' . $id);
			}
		}

		else
		{
			if (Input::method() == 'POST')
			{
				$keyword->keyword = $val->validated('keyword');
				$keyword->desctiption = $val->validated('desctiption');
				$keyword->deleted_at = $val->validated('deleted_at');

				Session::set_flash('error', $val->error());
			}

			$this->template->set_global('keyword', $keyword, false);
		}

		$this->template->title = "Keywords";
		$this->template->content = View::forge('keyword/edit');

	}

	public function action_delete($id = null)
	{
		is_null($id) and Response::redirect('keyword');

		if ($keyword = Model_Keyword::find($id))
		{
			$keyword->delete();

			Session::set_flash('success', 'Deleted keyword #'.$id);
		}

		else
		{
			Session::set_flash('error', 'Could not delete keyword #'.$id);
		}

		Response::redirect('keyword');

	}

}


text:
#include "third_party/blink/renderer/core/svg/svg_desc_element.h"

#include "third_party/blink/renderer/core/svg_names.h"

namespace blink {

SVGDescElement::SVGDescElement(Document& document)
    : SVGElement(svg_names::kDescTag, document) {}
}


text:
const assert = require('chai').assert; // const assert = require('assert'); for not chai
const iconPNG = require('../app/create-icon-png.js')
const fs = require('fs')

// story in rally

// If icon path is provided, copy/paste into tools directory. If not, create default .png in tools directory.
//
// propose: connector cloud image as default .png, but speak with UX for default .png.
//
// AC
// .png file exists in tools directory
// if icon path provided, the .png file matches the file specified

// Defining the test you want to run
// 1. result is defined in readIconPNG
// 2. File path should be stored in the user Object
// 3. File Data should be stored in the user Object
// 4. Tool Icon should exist in new path

const result = {
  ToolName: 'tool_name',
  Description: 'tool description',
  Version: '2',
  Category: 'tool category',
  Author: 'author',
  IconPath: 'default_icon.png',
  ToolDirectory: 'C:\\Users\\odembowski\\AppData\\Roaming\\Alteryx\\Tools\\tool_name_v2',
  AlteryxInstallDir: 'C:\\Program Files\\Alteryx\\bin'
}

// Results: better practice to call results separately from the tests
const iconPNGResult = iconPNG.createIconPNG(result).Promise
const fileName = `${result.ToolName}_v${result.Version}_Icon.png`
const fileData = fs.readFileSync(result.IconPNGPath)

describe('readIconPNG', function() {
  it('result is defined', function() {
    assert.isDefined(result)
    console.log('Result is defined')
  })
})

describe('writeIconPNG', function() {
  it('IconPNGPath should be stored in the user Object', function() {
    assert.propertyVal(result,'IconPNGPath' ,'C:\\Users\\odembowski\\AppData\\Roaming\\Alteryx\\Tools\\tool_name_v2\\tool_name_v2_Icon.png')
    console.log(`${result.IconPNGPath} is stored in IconPNGPath`)
  })
  it('IconPNGData should not be empty in user Object', function() {
    assert.isNotEmpty(result.IconPNGData, 'IconPNGData is not empty' )
    console.log('IconPNGData is not empty')
  })
  it(`${fileName} should not be empty`, function() {
    assert.isNotEmpty(fileData, `${fileName} is not empty` )
    console.log(`${fileName} is not empty` )
  })
})


text:
package org.teavm.dom.ajax;

import org.teavm.dom.core.Document;
import org.teavm.jso.JSObject;
import org.teavm.jso.JSProperty;

/**
 *
 * @author Alexey Andreev
 */
public interface XMLHttpRequest extends JSObject {
    int UNSET = 0;

    int OPENED = 1;

    int HEADERS_RECEIVED = 2;

    int LOADING = 3;

    int DONE = 4;

    void open(String method, String url);

    void open(String method, String url, boolean async);

    void open(String method, String url, boolean async, String user);

    void open(String method, String url, boolean async, String user, String password);

    void send();

    void send(String data);

    void setRequestHeader(String name, String value);

    String getAllResponseHeaders();

    String getResponseHeader(String name);

    @JSProperty("onreadystatechange")
    void setOnReadyStateChange(ReadyStateChangeHandler handler);

    void overrideMimeType(String mimeType);

    @JSProperty
    int getReadyState();

    @JSProperty
    String getResponseText();

    @JSProperty
    Document getResponseXML();

    @JSProperty
    JSObject getResponse();

    @JSProperty
    int getStatus();

    @JSProperty
    String getStatusText();

    @JSProperty
    void setResponseType(String type);

    @JSProperty
    String getResponseType();
}


text:
'use strict';

/**
 * Check if arg is an array describing a callable
 *
 * @param {*} value
 *
 * @returns {boolean}
 */
global.isCallableArray = function isCallableArray(value) {
    if (! isArray(value) || 2 !== value.length) {
        return false;
    }

    const target = value[0];
    return isString(value[1]) && isFunction(target[value[1]]);
};

/**
 * Generate a BoundFunction object from a callable
 * array. The function can be called via apply or
 * call methods.
 *
 * @param {[object, string]} arg
 *
 * @returns {BoundFunction}
 */
global.getCallableFromArray = function getCallableFromArray(arg) {
    if (! isCallableArray(arg)) {
        throw new LogicException(arg + ' is not a callable array');
    }

    const target = arg[0];
    const func = target[arg[1]];

    return new BoundFunction(target, func);
};


text:
package com.north.application;

import com.north.gamecore.Board;

public class PVE {
    public static void main(String args[]) {
        Board board = new Board();
        board.startNewGameOfPVE();
    }
}


text:
package com.intellij.codeInsight.editorActions.smartEnter;

import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.Editor;
import com.intellij.psi.PsiBlockStatement;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiJavaToken;
import com.intellij.psi.PsiWhileStatement;
import com.intellij.util.IncorrectOperationException;

/**
 * Created by IntelliJ IDEA.
 * User: max
 * Date: Sep 5, 2003
 * Time: 7:24:03 PM
 * To change this template use Options | File Templates.
 */
public class MissingWhileBodyFixer implements Fixer
{
	@Override
	public void apply(Editor editor, JavaSmartEnterProcessor processor, PsiElement psiElement) throws IncorrectOperationException
	{
		if(!(psiElement instanceof PsiWhileStatement))
		{
			return;
		}
		PsiWhileStatement whileStatement = (PsiWhileStatement) psiElement;

		final Document doc = editor.getDocument();

		PsiElement body = whileStatement.getBody();
		if(body instanceof PsiBlockStatement)
		{
			return;
		}
		if(body != null && startLine(doc, body) == startLine(doc, whileStatement) && whileStatement.getCondition() != null)
		{
			return;
		}

		final PsiJavaToken rParenth = whileStatement.getRParenth();
		assert rParenth != null;

		doc.insertString(rParenth.getTextRange().getEndOffset(), "{}");
	}

	private static int startLine(Document doc, PsiElement psiElement)
	{
		return doc.getLineNumber(psiElement.getTextRange().getStartOffset());
	}
}


text:
namespace Ritter.Domain.Business
{
    public interface IBusinessRulesEvaluator<in TEntity>
    {
        void Evaluate(TEntity entity);
    }
}


text:
<?php

/**
 * @package PHP-MARC
 */

//-----------------------------------------------------------------------------
//
// Copyright (C) 2003-2005 Oy Realnode Ab
//
//-----------------------------------------------------------------------------
//
// example.php
//     Part of the Emilda Project (http://www.emilda.org/)
//
// Description
//     Examples how to use PHP-MARC
//
// Authors
//     Christoffer Landtman <landtman (at) realnode com>
//
//-----------------------------------------------------------------------------
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
//-----------------------------------------------------------------------------
//
// $Revision$
//
//-----------------------------------------------------------------------------

require_once "../php-marc/php-marc.php";

// Other way to access file
/*$string = file("example.mrc");
$file = new USMARC($string[0]);*/

// Open file
$file = new File("example.mrc");

// Read next record
$record = $file->next();

// Create new field
$field = new Field("245", "", "", array("a" => "Mumin"));
// Add subfield
$field->add_subfields(array("b" => "Det Osynliga Barnet"));
// Other ways to update field
$field->update(array("ind2" => "1", "b" => "Vinter i Mumindalen", "c" => "Tove Jansson"));

// Replace existing field
$existing =& $record->field("245");
$existing->replace_with($field);

$clone = $field->make_clone();
// Change some more
$clone->update(array("a" => "Muminsagor", "b" => "Muminpappans memoarer"));

// And append to record
$record->append_fields($clone);

// Some output
print "
";
print $record->formatted();
print "\n\n";
print $file->raw[0];
print "\n";
print $record->raw();
print "\n\n";
print $record->ffield("245", "Formatted output: Title: %a, Remainder of title: %b, Responsibility: %c\n");
print "
";

?>


text:
package com.intellij.codeInsight;

import com.intellij.openapi.diagnostic.Logger;
import com.intellij.psi.*;
import com.intellij.psi.tree.IElementType;
import com.intellij.util.IncorrectOperationException;

/**
 * Consider using instead
 * {@link com.siyeh.ig.psiutils.BoolUtils#getNegatedExpressionText(com.intellij.psi.PsiExpression)}
 *
 * to be deleted in 2018.2
 */
@Deprecated
public class CodeInsightServicesUtil {
  private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.CodeInsightServicesUtil");

  private static final IElementType[] ourTokenMap = {
    JavaTokenType.EQEQ, JavaTokenType.NE,
    JavaTokenType.LT, JavaTokenType.GE,
    JavaTokenType.LE, JavaTokenType.GT,
    JavaTokenType.OROR, JavaTokenType.ANDAND
  };

  public static PsiExpression invertCondition(PsiExpression booleanExpression) throws IncorrectOperationException {
    PsiElementFactory factory = JavaPsiFacade.getInstance(booleanExpression.getProject()).getElementFactory();

    if (booleanExpression instanceof PsiPolyadicExpression) {
      PsiPolyadicExpression expression = (PsiPolyadicExpression)booleanExpression;
      IElementType operationSign = expression.getOperationTokenType();
      for (int i = 0; i < ourTokenMap.length; i++) {
        IElementType tokenType = ourTokenMap[i];
        if (operationSign == tokenType) {
          expression = (PsiPolyadicExpression)expression.copy();
          PsiExpression[] operands = expression.getOperands();
          for (int o = 0; o < operands.length; o++) {
            PsiExpression op = operands[o];
            if (o != 0) {
              expression.getTokenBeforeOperand(op).replace(createOperationToken(factory, ourTokenMap[i + (i % 2 == 0 ? 1 : -1)]));
            }
            if (tokenType == JavaTokenType.OROR || tokenType == JavaTokenType.ANDAND) {
              PsiExpression inverted = invertCondition(op);
              op.replace(inverted);
            }
          }
          if (tokenType == JavaTokenType.ANDAND && booleanExpression.getParent() instanceof PsiPolyadicExpression) {
            final PsiParenthesizedExpression parth = (PsiParenthesizedExpression)factory.createExpressionFromText("(a)", expression);
            parth.getExpression().replace(expression);
            return parth;
          }
          return expression;
        }
      }
    }
    else if (booleanExpression instanceof PsiPrefixExpression) {
      PsiPrefixExpression expression = (PsiPrefixExpression)booleanExpression;
      if (expression.getOperationTokenType() == JavaTokenType.EXCL) {
        PsiExpression operand = expression.getOperand();
        if (operand instanceof PsiParenthesizedExpression) {
          final PsiElement parent = booleanExpression.getParent();
          if (parent instanceof PsiPolyadicExpression &&
              ((PsiPolyadicExpression)parent).getOperationTokenType() == JavaTokenType.ANDAND) {
            operand = ((PsiParenthesizedExpression)operand).getExpression();
          }
        }
        return operand;
      }
    }
    else if (booleanExpression instanceof PsiLiteralExpression) {
      Object value = ((PsiLiteralExpression)booleanExpression).getValue();
      if (value instanceof Boolean) {
        return factory.createExpressionFromText(String.valueOf(!((Boolean)value)), booleanExpression);
      }
    }

    if (booleanExpression instanceof PsiParenthesizedExpression) {
      PsiExpression operand = ((PsiParenthesizedExpression)booleanExpression).getExpression();
      if (operand != null) {
        operand.replace(invertCondition(operand));
        return booleanExpression;
      }
    }

    PsiPrefixExpression result = (PsiPrefixExpression)factory.createExpressionFromText("!(a)", null);
    if (!(booleanExpression instanceof PsiPolyadicExpression)) {
      result.getOperand().replace(booleanExpression);
    }
    else {
      PsiParenthesizedExpression e = (PsiParenthesizedExpression)result.getOperand();
      e.getExpression().replace(booleanExpression);
    }

    return result;
  }

  private static PsiElement createOperationToken(PsiElementFactory factory, IElementType tokenType) throws IncorrectOperationException {
    final String s;
    if (tokenType == JavaTokenType.EQEQ) {
      s = "==";
    }
    else if (tokenType == JavaTokenType.NE) {
      s = "!=";
    }
    else if (tokenType == JavaTokenType.LT) {
      s = "<";
    }
    else if (tokenType == JavaTokenType.LE) {
      s = "<=";
    }
    else if (tokenType == JavaTokenType.GT) {
      s = ">";
    }
    else if (tokenType == JavaTokenType.GE) {
      s = ">=";
    }
    else if (tokenType == JavaTokenType.ANDAND) {
      s = "&&";
    }
    else if (tokenType == JavaTokenType.OROR) {
      s = "||";
    }
    else {
      LOG.error("Unknown token type");
      s = "==";
    }

    PsiBinaryExpression expression = (PsiBinaryExpression)factory.createExpressionFromText("a" + s + "b", null);
    return expression.getOperationSign();
  }
}


text:
package com.github.sviengine.performance;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.content.res.Configuration;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.view.ViewGroup.LayoutParams;
import android.widget.CheckBox;
import android.widget.LinearLayout;
import android.widget.TextView;

public class PropertyTestActivity extends TestCaseBaseActivity implements OnClickListener{

	@Override
	protected void onCreate(Bundle savedInstanceState) {

		super.onCreate(savedInstanceState);

		LinearLayout subLayout = new LinearLayout(this);

		subLayout.setGravity(Gravity.BOTTOM);

		subLayout.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT));

		prevText = new TextView(this);
		currentText = new TextView(this);
		nextText = new TextView(this);

		prevText.setText(menuArray[0]);
		currentText.setText(menuArray[1]);
		nextText.setText(menuArray[2]);

		prevText.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 1f));
		currentText.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 1f));
		nextText.setLayoutParams(new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 1f));

		String sideColor = "#000000";
		prevText.setTextColor(Color.parseColor(sideColor));
		nextText.setTextColor(Color.parseColor(sideColor));

		prevText.setTextSize(sideTextSize);
		nextText.setTextSize(sideTextSize);

		currentText.setTextSize(centerTextSize);

		String centerColor = "#ff0000";
		currentText.setTextColor(Color.parseColor(centerColor));

		prevText.setGravity(Gravity.BOTTOM|Gravity.LEFT);
		nextText.setGravity(Gravity.BOTTOM|Gravity.RIGHT);
		currentText.setGravity(Gravity.BOTTOM|Gravity.CENTER);

		prevText.setId(0);
		nextText.setId(1);
		currentText.setId(2);

		prevText.setOnClickListener(this);
		nextText.setOnClickListener(this);
		currentText.setOnClickListener(this);

		subLayout.addView(prevText);
		subLayout.addView(currentText);
		subLayout.addView(nextText);

		addContentView(subLayout, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT) );

		propertyText = new TextView(this);

		propertyText.setText("Explicit");
		propertyText.setTextSize(60.0f);
		addContentView(propertyText, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT));

		mCheckBoxList = new CheckBox[menuArray.length-2];
	}

	@Override
	public void onClick(View v) {
		int temp = (int)v.getId();

		mOriginWindow.removeall();

		switch(temp){

		case 0:
			if(mIndex>0){
				nextText.setText(menuArray[mIndex+1]);
				currentText.setText(menuArray[mIndex]);
				prevText.setText(menuArray[mIndex-1]);
				mIndex--;
			}
			break;

		case 1:
			if(mIndex<menuArray.length-3){
				mIndex++;
				prevText.setText(menuArray[mIndex]);
				currentText.setText(menuArray[mIndex+1]);
				nextText.setText(menuArray[mIndex+2]);
			}
			break;
		case 2:
			Log.i("test",menuArray[mIndex+1]+"");
			break;
		default :
			Log.i("test",menuArray[mIndex+1]+"");
		}

		mOriginWindow.mProperty = mIndex;

		mOriginWindow.buildSubSlide();

	}

	@Override
	public void onConfigurationChanged(Configuration newConfig) {
		// TODO Auto-generated method stub
		super.onConfigurationChanged(newConfig);

	}

	@Override
	protected void onPause() {
		// TODO Auto-generated method stub
		super.onPause();

	}

	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();

	}

	@Override
	protected void onDestroy() {
		mOriginWindow.release();
		mOriginWindow = null;
		super.onDestroy();
	}

	@Override
	boolean createWindow() {

		mWindow = new PropertyTestWindow(this);
		mOriginWindow = (PropertyTestWindow)mWindow;

		if(mWindow == null)
			return false;

		return true;
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// TODO Auto-generated method stub
		for(int i=COMBINATION; i<IMPLICIT+1; i++)
			menu.add(0, i, 0, mOptionsMenu[i]);
		return true;
	}

	@Override
	protected Dialog onCreateDialog(int id) {
		// TODO Auto-generated method stub
		switch (id) {
		case COMBINATION:
			LinearLayout linearLayout = new LinearLayout(this);
			linearLayout.setOrientation(LinearLayout.VERTICAL);
			for(int j=0; j<mCheckBoxList.length; j++) {
				mCheckBoxList[j] = new CheckBox(this);
				mCheckBoxList[j].setText(menuArray[j+1]);
				linearLayout.addView(mCheckBoxList[j]);
			}
			return new AlertDialog.Builder(this)
			.setTitle("Animatable property list")
			.setView(linearLayout)
			.setPositiveButton("OK", new DialogInterface.OnClickListener() {

				@Override
				public void onClick(DialogInterface arg0, int arg1) {
					// TODO Auto-generated method stub
					boolean[] checkedList = new boolean[menuArray.length-2];
					for(int i=0; i<checkedList.length; i++) {
						checkedList[i] = mCheckBoxList[i].isChecked();
					}
					((PropertyTestWindow)mWindow).setCheckedList(checkedList);
					((PropertyTestWindow)mWindow).runKeyFrameAnimation(0);
				}

			})
			.create();

		default:
			return super.onCreateDialog(id);
		}
	}

	@Override
	public boolean onOptionsItemSelected (MenuItem item) {
		// Handle item selection
		int id = item.getItemId();

		switch(id) {
		case COMBINATION:
			showDialog(COMBINATION);
			return true;
		default:
			mOriginWindow.isImplicit = (item.getItemId() == EXPLICIT) ? false : true;
			mOriginWindow.removeall();
			propertyText.setText(mOptionsMenu[id]);
			mOriginWindow.buildSubSlide();
			return true;
		}
	}

	protected TextView 			prevText;
	protected TextView 			currentText;
	protected TextView 			nextText;
	protected TextView			propertyText;

	protected int					mIndex =0;

	final protected float 				sideTextSize = 30.0f;
	final protected float 				centerTextSize = 50.0f;

	protected String[] menuArray = {
			"==",
			"REGION",
			"POSITION",
			"ZPOSITION",
			"ROTATION",
			"SCALE",
			"BG_COLOR",
			"OPACITY",
			"CORNER_RADIUS",
			"BORDER_WIDTH",
			"BORDER_COLOR",
			"SHADOW_RADIUS",
			"SHADOW_COLOR",
			"SHADOW_OPACITY",
			"SHADOW_OFFSET",

			"TEXTURE_REGION",

			"LIGHT_RADIUS",
			"LIGHT_COLOR",
			"LIGHT_OPACITY",
			"LIGHT_ANGLE",
			"LIGHT_OFFSET",
			"LIGHT_POWER",
			"SCALETOFIT_REGION",
			"=="
	};

	PropertyTestWindow 					mOriginWindow = null;

	protected static final int 				COMBINATION = 0;
	protected static final int 				EXPLICIT = 1;
	protected static final int 				IMPLICIT = 2;

	protected static final String[] 		mOptionsMenu
	= new String[] {"Combination", "Explicit", "Implicit"};

	protected CheckBox[] 					mCheckBoxList;

}


text:
require File.expand_path('../../../test_helper', __FILE__)

require 'mocha/parameter_matchers/anything'
require 'mocha/inspect'

class AnythingTest < Mocha::TestCase

  include Mocha::ParameterMatchers

  def test_should_match_anything
    matcher = anything
    assert matcher.matches?([:something])
    assert matcher.matches?([{'x' => 'y'}])
  end

  def test_should_describe_matcher
    matcher = anything
    assert_equal "anything", matcher.mocha_inspect
  end

end


text: Electronic Parts Inventory Catalog


text:
package requests

import (
	"github.com/grokify/ringcentral-sdk-go/rcsdk/definitions"
)

type AccountOrderPostRequestBody struct {
	Devices []definitions.DeviceInfo `json:"devices,omitempty"`
}


text:
package roulette.bets;

import roulette.Bet;
import roulette.Wheel;
import util.ConsoleReader;

public class OddEven extends Bet {
    private String myChoice;

    public OddEven(String description, int odds) {
        super(description, odds);
        myChoice = "";
    }

    /**
     * @see Bet#place()
     */
    @Override
    public void place() {
        myChoice = ConsoleReader.promptOneOf("Please bet", "even", "odd");
    }

    /**
     * @see Bet#isMade(String, Wheel)
     */
    @Override
    public boolean isMade(Wheel.SpinResult wheel) {
        return (wheel.getNumber() % 2 == 0 && myChoice.equals("even")) ||
                (wheel.getNumber() % 2 == 1 && myChoice.equals("odd"));
    }
}


text:
package com.digitalpetri.opcua.stack.core.application;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.file.FileSystems;
import java.nio.file.StandardWatchEventKinds;
import java.nio.file.WatchEvent;
import java.nio.file.WatchKey;
import java.nio.file.WatchService;
import java.security.cert.CertificateEncodingException;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.List;
import java.util.Set;

import com.digitalpetri.opcua.stack.core.UaException;
import com.digitalpetri.opcua.stack.core.util.CertificateUtil;
import com.digitalpetri.opcua.stack.core.util.CertificateValidationUtil;
import com.digitalpetri.opcua.stack.core.util.DigestUtil;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.Unpooled;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import static java.util.stream.Collectors.toSet;

public class DefaultCertificateValidator implements CertificateValidator {

    private final Logger logger = LoggerFactory.getLogger(getClass());

    private final Set<X509Certificate> trustedCertificates = Sets.newConcurrentHashSet();
    private final Set<X509Certificate> authorityCertificates = Sets.newConcurrentHashSet();

    private final File trustedDir;
    private final File rejectedDir;
    private final File revocationDir;

    public DefaultCertificateValidator(File certificatesBaseDir) {
        trustedDir = new File(certificatesBaseDir.getAbsolutePath() + File.separator + "trusted");
        if (!trustedDir.exists() && !trustedDir.mkdirs()) {
            logger.warn("Could not create trusted certificate dir: {}", trustedDir);
        }

        rejectedDir = new File(certificatesBaseDir.getAbsolutePath() + File.separator + "rejected");
        if (!rejectedDir.exists() && !rejectedDir.mkdirs()) {
            logger.warn("Could not create rejected certificate dir: {}", rejectedDir);
        }

        revocationDir = new File(certificatesBaseDir.getAbsolutePath() + File.separator + "revocation");
        if (!revocationDir.exists() && !revocationDir.mkdirs()) {
            logger.warn("Could not create revocation certificate dir: {}", revocationDir);
        }

        createWatchService();

        synchronizeTrustedCertificates();
    }

    @Override
    public void validate(X509Certificate certificate) throws UaException {
        try {
            CertificateValidationUtil.validateCertificateValidity(certificate);

        } catch (UaException e) {
            certificateRejected(certificate);
            throw e;
        }
    }

    @Override
    public synchronized void verifyTrustChain(X509Certificate certificate,
                                              List<X509Certificate> chain) throws UaException {
        try {
            CertificateValidationUtil.validateTrustChain(
                    certificate, chain, trustedCertificates, authorityCertificates);

        } catch (UaException e) {
            certificateRejected(certificate);
            throw e;
        }
    }

    /**
     * @return an immutable copy of the current trusted certificates.
     */
    public synchronized ImmutableSet<X509Certificate> getTrustedCertificates() {
        return ImmutableSet.copyOf(trustedCertificates);
    }

    /**
     * @return an immutable copy of the current trusted authority certificates.
     */
    public synchronized ImmutableSet<X509Certificate> getAuthorityCertificates() {
        return ImmutableSet.copyOf(authorityCertificates);
    }

    private void createWatchService() {
        try {
            WatchService watchService = FileSystems.getDefault().newWatchService();

            WatchKey trustedKey = trustedDir.toPath().register(
                    watchService,
                    StandardWatchEventKinds.ENTRY_CREATE,
                    StandardWatchEventKinds.ENTRY_DELETE,
                    StandardWatchEventKinds.ENTRY_MODIFY
            );

            Thread thread = new Thread(new Watcher(watchService, trustedKey));
            thread.setName("ua-certificate-directory-watcher");
            thread.setDaemon(true);
            thread.start();
        } catch (IOException e) {
            logger.error("Error creating WatchService.", e);
        }
    }

    private void synchronizeTrustedCertificates() {
        logger.debug("Synchronizing trusted certificates...");

        Set<X509Certificate> certificates = certificatesFromDir(trustedDir);

        Set<X509Certificate> trusted = certificates.stream()
                .filter(c -> c.getBasicConstraints() == -1)
                .collect(toSet());

        Set<X509Certificate> authority = certificates.stream()
                .filter(c -> c.getBasicConstraints() != -1)
                .collect(toSet());

        synchronized (DefaultCertificateValidator.this) {
            trustedCertificates.clear();
            trustedCertificates.addAll(trusted);

            authorityCertificates.clear();
            authorityCertificates.addAll(authority);
        }

        logger.debug("trustedCertificates.size()={}, authorityCertificates.size()={}",
                trustedCertificates.size(), authorityCertificates.size());
    }

    private Set<X509Certificate> certificatesFromDir(File dir) {
        File[] files = dir.listFiles();
        if (files == null) files = new File[0];

        return Arrays.stream(files)
                .map(this::file2certificate)
                .filter(c -> c != null)
                .collect(toSet());
    }

    private X509Certificate file2certificate(File f) {
        try {
            try (FileInputStream inputStream = new FileInputStream(f)) {
                return CertificateUtil.decodeCertificate(inputStream);
            }
        } catch (Throwable ignored) {
            return null;
        }
    }

    private void certificateRejected(X509Certificate certificate) {
        try {
            String[] ss = certificate.getSubjectX500Principal().getName().split(",");
            String name = ss.length > 0 ? ss[0] : certificate.getSubjectX500Principal().getName();
            String thumbprint = ByteBufUtil.hexDump(Unpooled.wrappedBuffer(DigestUtil.sha1(certificate.getEncoded())));

            String filename = String.format("%s [%s].der", URLEncoder.encode(name, "UTF-8"), thumbprint);

            File f = new File(rejectedDir.getAbsolutePath() + File.separator + filename);

            FileOutputStream fos = new FileOutputStream(f);
            fos.write(certificate.getEncoded());
            fos.flush();
            fos.close();

            logger.debug("Added rejected certificate entry: {}", filename);
        } catch (CertificateEncodingException | IOException e) {
            logger.error("Error adding rejected certificate entry.", e);
        }
    }

    private class Watcher implements Runnable {

        private final WatchService watchService;
        private final WatchKey trustedKey;

        public Watcher(WatchService watchService, WatchKey trustedKey) {
            this.watchService = watchService;
            this.trustedKey = trustedKey;
        }

        @Override
        public void run() {
            while (true) {
                try {
                    WatchKey key = watchService.take();

                    if (key == trustedKey) {
                        for (WatchEvent<?> watchEvent : key.pollEvents()) {
                            WatchEvent.Kind<?> kind = watchEvent.kind();

                            if (kind != StandardWatchEventKinds.OVERFLOW) {
                                synchronizeTrustedCertificates();
                            }
                        }
                    }

                    if (!key.reset()) {
                        break;
                    }
                } catch (InterruptedException e) {
                    logger.error("Watcher interrupted.", e);
                }
            }
        }

    }

}


text:
from boto.exception import SDBPersistenceError
from boto.sdb.persist import get_manager, object_lister
from boto.sdb.persist.property import *
import uuid

class SDBBase(type):
    "Metaclass for all SDBObjects"
    def __init__(cls, name, bases, dict):
        super(SDBBase, cls).__init__(name, bases, dict)
        # Make sure this is a subclass of SDBObject - mainly copied from django ModelBase (thanks!)
        try:
            if filter(lambda b: issubclass(b, SDBObject), bases):
                # look for all of the Properties and set their names
                for key in dict.keys():
                    if isinstance(dict[key], Property):
                        property = dict[key]
                        property.set_name(key)
                prop_names = []
                props = cls.properties()
                for prop in props:
                    prop_names.append(prop.name)
                setattr(cls, '_prop_names', prop_names)
        except NameError:
            # 'SDBObject' isn't defined yet, meaning we're looking at our own
            # SDBObject class, defined below.
            pass

class SDBObject(object):
    __metaclass__ = SDBBase

    _manager = get_manager()

    @classmethod
    def get_lineage(cls):
        l = [c.__name__ for c in cls.mro()]
        l.reverse()
        return '.'.join(l)

    @classmethod
    def get(cls, id=None, **params):
        if params.has_key('manager'):
            manager = params['manager']
        else:
            manager = cls._manager
        if manager.domain and id:
            a = cls._manager.domain.get_attributes(id, '__type__')
            if a.has_key('__type__'):
                return cls(id, manager)
            else:
                raise SDBPersistenceError('%s object with id=%s does not exist' % (cls.__name__, id))
        else:
            rs = cls.find(**params)
            try:
                obj = rs.next()
            except StopIteration:
                raise SDBPersistenceError('%s object matching query does not exist' % cls.__name__)
            try:
                rs.next()
            except StopIteration:
                return obj
            raise SDBPersistenceError('Query matched more than 1 item')

    @classmethod
    def find(cls, **params):
        if params.has_key('manager'):
            manager = params['manager']
            del params['manager']
        else:
            manager = cls._manager
        keys = params.keys()
        if len(keys) > 4:
            raise SDBPersistenceError('Too many fields, max is 4')
        parts = ["['__type__'='%s'] union ['__lineage__'starts-with'%s']" % (cls.__name__, cls.get_lineage())]
        properties = cls.properties()
        for key in keys:
            found = False
            for property in properties:
                if property.name == key:
                    found = True
                    if isinstance(property, ScalarProperty):
                        checker = property.checker
                        parts.append("['%s' = '%s']" % (key, checker.to_string(params[key])))
                    else:
                        raise SDBPersistenceError('%s is not a searchable field' % key)
            if not found:
                raise SDBPersistenceError('%s is not a valid field' % key)
        query = ' intersection '.join(parts)
        if manager.domain:
            rs = manager.domain.query(query)
        else:
            rs = []
        return object_lister(None, rs, manager)

    @classmethod
    def list(cls, max_items=None, manager=None):
        if not manager:
            manager = cls._manager
        if manager.domain:
            rs = manager.domain.query("['__type__' = '%s']" % cls.__name__, max_items=max_items)
        else:
            rs = []
        return object_lister(cls, rs, manager)

    @classmethod
    def properties(cls):
        properties = []
        while cls:
            for key in cls.__dict__.keys():
                if isinstance(cls.__dict__[key], Property):
                    properties.append(cls.__dict__[key])
            if len(cls.__bases__) > 0:
                cls = cls.__bases__[0]
            else:
                cls = None
        return properties

    # for backwards compatibility
    find_properties = properties

    def __init__(self, id=None, manager=None):
        if manager:
            self._manager = manager
        self.id = id
        if self.id:
            self._auto_update = True
            if self._manager.domain:
                attrs = self._manager.domain.get_attributes(self.id, '__type__')
                if len(attrs.keys()) == 0:
                    raise SDBPersistenceError('Object %s: not found' % self.id)
        else:
            self.id = str(uuid.uuid4())
            self._auto_update = False

    def __setattr__(self, name, value):
        if name in self._prop_names:
            object.__setattr__(self, name, value)
        elif name.startswith('_'):
            object.__setattr__(self, name, value)
        elif name == 'id':
            object.__setattr__(self, name, value)
        else:
            self._persist_attribute(name, value)
            object.__setattr__(self, name, value)

    def __getattr__(self, name):
        if not name.startswith('_'):
            a = self._manager.domain.get_attributes(self.id, name)
            if a.has_key(name):
                object.__setattr__(self, name, a[name])
                return a[name]
        raise AttributeError

    def __repr__(self):
        return '%s<%s>' % (self.__class__.__name__, self.id)

    def _persist_attribute(self, name, value):
        if self.id:
            self._manager.domain.put_attributes(self.id, {name : value}, replace=True)

    def _get_sdb_item(self):
        return self._manager.domain.get_item(self.id)

    def save(self):
        attrs = {'__type__' : self.__class__.__name__,
                 '__module__' : self.__class__.__module__,
                 '__lineage__' : self.get_lineage()}
        for property in self.properties():
            attrs[property.name] = property.to_string(self)
        if self._manager.domain:
            self._manager.domain.put_attributes(self.id, attrs, replace=True)
            self._auto_update = True

    def delete(self):
        if self._manager.domain:
            self._manager.domain.delete_attributes(self.id)

    def get_related_objects(self, ref_name, ref_cls=None):
        if self._manager.domain:
            query = "['%s' = '%s']" % (ref_name, self.id)
            if ref_cls:
                query += " intersection ['__type__'='%s']" % ref_cls.__name__
            rs = self._manager.domain.query(query)
        else:
            rs = []
        return object_lister(ref_cls, rs, self._manager)


text:
title: PAT Advanced 1109 Group Photo
author: sigmainfy
excerpt: PAT Advanced 1109 Group Photo, Sort people by height, and then follow the rules defined to group people into rows, print out the grouped people.
layout: post
categories:
  - PAT
  - Algorithm
tags:
  - PAT
  - Simulation
  - Sort
---

## Overview
PAT Advanced 1109 Group Photo could be solved by first sorting people by height, and then follow the rules defined to group people into rows, lastly, print out the grouped people.

## PAT Advenced 1109 Group Photo Problem

Formation is very important when taking a group photo. Given the rules of forming K rows with N people as the following:

The number of people in each row must be N/K (round down to the nearest integer), with all the extra people (if any) standing in the last row;
All the people in the rear row must be no shorter than anyone standing in the front rows;
In each row, the tallest one stands at the central position (which is defined to be the position (m/2+1), where m is the total number of people in that row, and the division result must be rounded down to the nearest integer);
In each row, other people must enter the row in non-increasing order of their heights, alternately taking their positions first to the right and then to the left of the tallest one (For example, given five people with their heights 190, 188, 186, 175, and 170, the final formation would be 175, 188, 190, 186, and 170. Here we assume that you are facing the group so your left-hand side is the right-hand side of the one at the central position.);
When there are many people having the same height, they must be ordered in alphabetical (increasing) order of their names, and it is guaranteed that there is no duplication of names.
Now given the information of a group of people, you are supposed to write a program to output their formation.

**Input Specification:**

Each input file contains one test case. For each test case, the first line contains two positive integers N (<=10000), the total number of people, and K (<=10), the total number of rows. Then N lines follow, each gives the name of a person (no more than 8 English letters without space) and his/her height (an integer in [30, 300]).

**Output Specification:**

For each case, print the formation -- that is, print the names of people in K lines. The names must be separated by exactly one space, but there must be no extra space at the end of each line. Note: since you are facing the group, people in the rear rows must be printed above the people in the front rows.

**Sample Input:**
<pre>
10 3
Tom 188
Mike 170
Eva 168
Tim 160
Joe 190
Ann 168
Bob 175
Nick 186
Amy 160
John 159
Sample Output:
Bob Tom Joe Nick
Ann Mike Eva
Tim Amy John
</pre>

## PAT Advenced 1109 Group Photo Algorithm
First sort the input by people's heights, then follow the rules to group people, the following C++ code is accepted by PAT OJ to solve this 1109 Group Photo problem:

{% highlight cpp linenos %}
#include <string>
#include <vector>
#include <algorithm>
#include <iostream>

using std::string;
using std::vector;
using std::cin;
using std::cout;

struct P {
	string name;
	int height;
};

bool operator <(const P& x, const P& y) {
    if (x.height != y.height) {
    	return x.height < y.height;
    }
    return x.name > y.name;
}

void gao(const vector<P> &ps, const int l, vector<vector<int>> *result) {
	for (int t = 0, k = result->size(); t < k; ++t) {
		vector<int> row;
		if (t == k - 1) {
			row.resize(ps.size() - l * t);
		} else {
			row.resize(l);
		}

		int mid = row.size() / 2;
		for (int i = t * l + row.size() - 1, itr = 1; i >= t * l; --i, ++itr) {
			if (itr % 2 != 0) {
				row[mid + itr / 2] = i;
			} else {
				row[mid - itr / 2] = i;
			}
		}

		(*result)[t] = row;
	}
}

int main() {
	int n, k;
	vector<P> ps;
	cin >> n >> k;;
	ps.resize(n);

	for (int i = 0; i < n; ++i) {
		cin >> ps[i].name >> ps[i].height;
	}
	std::sort(ps.begin(), ps.end());
	vector<vector<int>> result;
	result.resize(k);
	gao(ps, n / k, &result);
	for (int i = result.size() - 1; i >= 0; --i) {
		for (int j = 0, len = result[i].size(); j < len; ++j) {
			if (j == 0) {
				cout << ps[result[i][j]].name;
			} else {
				cout << ' ' << ps[result[i][j]].name;
			}
		}
		cout << std::endl;
	}

	return 0;
}
{% endhighlight %}

## Summary
PAT Advanced 1109 Group Photo could be solved by first sorting people by height, and then follow the rules defined to group people into rows, lastly, print out the grouped people.


text:
module Rack
  #prints the environment and request for simple debugging
  class Printout
    def initialize(app)
      @app = app
    end

    def call(env)
      # See http://rack.rubyforge.org/doc/SPEC.html for details
      puts "**********\n Environment\n **************"
      puts env.inspect

      puts "**********\n Response\n **************"
      response = @app.call(env)
      puts response.inspect

      puts "**********\n Response contents\n **************"
      response[2].each do |chunk|
        puts chunk
      end
      puts "\n \n"
      return response
    end
  end
end


text:
import * as _ from 'lodash';

import { ApiService } from '../../../../../services/api.service';
import RoleService from '../../../../../services/role.service';

function DialogAddMemberApiController(
  $scope,
  $mdDialog,
  api,
  members,
  ApiService: ApiService,
  NotificationService,
  RoleService: RoleService,
) {
  'ngInject';

  RoleService.list('API').then((roles) => {
    $scope.roles = roles;
  });

  $scope.api = api;
  $scope.members = members;
  $scope.usersSelected = [];

  $scope.userFilterFn = (user: any) => {
    return _.findIndex($scope.members, { id: user.id }) === -1;
  };

  $scope.hide = function () {
    $mdDialog.cancel();
  };

  $scope.addMembers = function () {
    for (let i = 0; i < $scope.usersSelected.length; i++) {
      const member = $scope.usersSelected[i];
      const membership = {
        id: member.id,
        reference: member.reference,
        role: $scope.role.name,
      };
      ApiService.addOrUpdateMember($scope.api.id, membership)
        .then(() => {
          NotificationService.show('User ' + member.displayName + ' has been added as a member.');
        })
        .catch((error) => {
          $scope.error = error;
        });
    }
    $mdDialog.hide($scope.api);
  };
}

export default DialogAddMemberApiController;


text:
var searchData=
[
  ['obstacledetection',['ObstacleDetection',['../classObstacleDetection.html',1,'ObstacleDetection'],['../classObstacleDetection.html#a9271504043e6aeb2ae9cfc0f9ed4940e',1,'ObstacleDetection::ObstacleDetection()']]],
  ['obstacledetection_2ecpp',['obstacleDetection.cpp',['../obstacleDetection_8cpp.html',1,'']]],
  ['obstacledetection_2ehpp',['obstacleDetection.hpp',['../obstacleDetection_8hpp.html',1,'']]],
  ['obstacledetectiontest_2ecpp',['obstacleDetectionTest.cpp',['../obstacleDetectionTest_8cpp.html',1,'']]]
];