text:
package com.maxplus1.hd_client.hbase.utils;

import com.maxplus1.hd_client.hbase.cache.TableDefinitionCacheManager;
import com.maxplus1.hd_client.hbase.operations.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.filter.Filter;
import org.apache.hadoop.hbase.filter.PageFilter;
import org.apache.hadoop.hbase.filter.PrefixFilter;

import java.util.Map;

@Slf4j
public enum ScanUtils {
    ;

    private static final int PAGE_SIZE_NO_LIMIT = -1;
    /**
     * TODO setCaching和setBatch性能优化
     * scan.setCaching(scanCaching); 每次RPC返回的记录数
     * scan.setBatch(scanBatch); 每次RPC传ROW的几个Column
     * 所以cache和batch共同决定了RPC的次数
     */
    private static int scanCaching = 0;// default cache in scan
    private static int scanBatch = 0;// default batch in scan

    public static Scan initScan(PageInfo pageInfo, Class classType, Filter... filters) {
        Scan scan = new Scan();
        if (classType != null) {
            scan = TableDefinitionCacheManager.buildQuery(scan, classType, false);
        }
        Filter filter = new PageFilter(pageInfo.getPageSize());
        scan.setFilter(filter);
        scan = FilterUtils.addFilters(scan, filters);

        if (pageInfo.isPreviousPage()) {//向上翻页,不设置stopRow
            scan.setReversed(true);
            scan.setStartRow(pageInfo.getLastStartRow());
        } else {
            scan.setStartRow(pageInfo.getStartRow());
            if(pageInfo.getStopRow()!=null){
                scan.setStopRow(pageInfo.getStopRow());
            }
        }
        return scan;
    }

    /*public static Scan initScan(byte[] startRow, byte[] endRow, Class classType,Filter... filters) {
        return initScan(startRow, endRow, PAGE_SIZE_NO_LIMIT, classType,filters);
    }*/

    public static Scan initPrefixScan(byte[] prefix, Class classType, Filter... filters) {
        Scan scan = new Scan();
        if (classType != null) {
            scan = TableDefinitionCacheManager.buildQuery(scan, classType, false);
        }
        Filter filter = new PrefixFilter(prefix);
        scan.setFilter(filter);
        scan = FilterUtils.addFilters(scan, filters);
//        scan.setCaching(scanCaching);
        // scan.setBatch(scanBatch);
        return scan;
    }

    /**
     * @param startRow
     * @param endRow
     * @param pageSize
     * @param filters
     * @return
     */
    public static Scan initScan(byte[] startRow, byte[] endRow, int pageSize, Class classType, Filter... filters) {
        Scan scan = new Scan();
        if (classType != null) {
            scan = TableDefinitionCacheManager.buildQuery(scan, classType, false);
        }
        //scan 默认值是startRow=stopRow=HConstants.EMPTY_START_ROW
        if (startRow != null) {
            scan.setStartRow(startRow);
        }

        if (endRow != null) {
            scan.setStopRow(endRow);
        }

        if (pageSize != PAGE_SIZE_NO_LIMIT) {
            Filter filter = new PageFilter(pageSize);
            scan.setFilter(filter);
        }

        scan = FilterUtils.addFilters(scan, filters);

//        scan.setCaching(scanCaching);
        // scan.setBatch(scanBatch);
        return scan;
    }

    public static Scan initScan(byte[] startRow, byte[] endRow, Filter... filters) {
        return initScan(startRow, endRow, PAGE_SIZE_NO_LIMIT, null, filters);
    }

    public static Scan initScan(PageInfo<Map> pageInfo, Filter[] filters) {
        return initScan(pageInfo, null, filters);
    }

    public static Scan initPrefixScan(byte[] prefix, Filter... filters) {
        return initPrefixScan(prefix, null, filters);
    }

}


text:
package com.facebook.buck.apple;

import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assume.assumeTrue;

import com.facebook.buck.cli.BuckConfig;
import com.facebook.buck.cli.FakeBuckConfig;
import com.facebook.buck.util.FakeProcess;
import com.facebook.buck.util.FakeProcessExecutor;
import com.facebook.buck.util.HumanReadableException;
import com.facebook.buck.util.ProcessExecutorParams;
import com.facebook.buck.util.environment.Platform;
import com.google.common.base.Supplier;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;

import org.hamcrest.junit.ExpectedException;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Optional;

public class AppleConfigTest {

  @Rule
  public ExpectedException thrown = ExpectedException.none();

  @Before
  public void setUp() {
    assumeTrue(Platform.detect() == Platform.MACOS || Platform.detect() == Platform.LINUX);
  }

  @Test
  public void getUnspecifiedAppleDeveloperDirectorySupplier() {
    BuckConfig buckConfig = FakeBuckConfig.builder().build();
    AppleConfig config = buckConfig.getView(AppleConfig.class);
    assertNotNull(config.getAppleDeveloperDirectorySupplier(new FakeProcessExecutor()));
  }

  @Test
  public void getSpecifiedAppleDeveloperDirectorySupplier() {
    BuckConfig buckConfig = FakeBuckConfig.builder().setSections(
        ImmutableMap.of(
            "apple",
            ImmutableMap.of("xcode_developer_dir", "/path/to/somewhere"))).build();
    AppleConfig config = buckConfig.getView(AppleConfig.class);
    Supplier<Optional<Path>> supplier =
        config.getAppleDeveloperDirectorySupplier(new FakeProcessExecutor());
    assertNotNull(supplier);
    assertEquals(Optional.of(Paths.get("/path/to/somewhere")), supplier.get());

    // Developer directory for tests should fall back to developer dir if not separately specified.
    Supplier<Optional<Path>> supplierForTests =
        config.getAppleDeveloperDirectorySupplierForTests(new FakeProcessExecutor());
    assertNotNull(supplierForTests);
    assertEquals(Optional.of(Paths.get("/path/to/somewhere")), supplierForTests.get());
  }

  @Test
  public void getSpecifiedAppleDeveloperDirectorySupplierForTests() {
    BuckConfig buckConfig = FakeBuckConfig.builder().setSections(
        ImmutableMap.of(
            "apple",
            ImmutableMap.of(
                "xcode_developer_dir", "/path/to/somewhere",
                "xcode_developer_dir_for_tests", "/path/to/somewhere2"))).build();
    AppleConfig config = buckConfig.getView(AppleConfig.class);
    Supplier<Optional<Path>> supplier =
        config.getAppleDeveloperDirectorySupplier(new FakeProcessExecutor());
    assertNotNull(supplier);
    assertEquals(Optional.of(Paths.get("/path/to/somewhere")), supplier.get());

    Supplier<Optional<Path>> supplierForTests =
        config.getAppleDeveloperDirectorySupplierForTests(new FakeProcessExecutor());
    assertNotNull(supplierForTests);
    assertEquals(Optional.of(Paths.get("/path/to/somewhere2")), supplierForTests.get());
  }

  @Test
  public void getXcodeSelectDetectedAppleDeveloperDirectorySupplier() {
    BuckConfig buckConfig = FakeBuckConfig.builder().build();
    AppleConfig config = buckConfig.getView(AppleConfig.class);
    ProcessExecutorParams xcodeSelectParams =
        ProcessExecutorParams.builder()
            .setCommand(ImmutableList.of("xcode-select", "--print-path"))
            .build();
    FakeProcess fakeXcodeSelect = new FakeProcess(0, "/path/to/another/place", "");
    FakeProcessExecutor processExecutor = new FakeProcessExecutor(
        ImmutableMap.of(xcodeSelectParams, fakeXcodeSelect));
    Supplier<Optional<Path>> supplier = config.getAppleDeveloperDirectorySupplier(processExecutor);
    assertNotNull(supplier);
    assertEquals(Optional.of(Paths.get("/path/to/another/place")), supplier.get());
  }

  @Test
  public void packageConfigCommandWithoutExtensionShouldThrow() {
    AppleConfig config = FakeBuckConfig.builder()
        .setSections(
            "[apple]",
            "iphoneos_package_command = echo")
        .build().getView(AppleConfig.class);
    thrown.expect(HumanReadableException.class);
    thrown.expectMessage(containsString("be both specified, or be both omitted"));
    config.getPackageConfigForPlatform(ApplePlatform.IPHONEOS);
  }

  @Test
  public void packageConfigExtensionWithoutCommandShouldThrow() {
    AppleConfig config = FakeBuckConfig.builder()
        .setSections(
            "[apple]",
            "iphoneos_package_extension = api")
        .build().getView(AppleConfig.class);
    thrown.expect(HumanReadableException.class);
    thrown.expectMessage(containsString("be both specified, or be both omitted"));
    config.getPackageConfigForPlatform(ApplePlatform.IPHONEOS);
  }

  @Test
  public void packageConfigTreatsEmptyStringAsOmitted() {
    AppleConfig config = FakeBuckConfig.builder()
        .setSections(
            "[apple]",
            "iphoneos_package_extension = ",
            "iphoneos_package_command = ")
        .build().getView(AppleConfig.class);
    assertThat(
        config.getPackageConfigForPlatform(ApplePlatform.IPHONEOS),
        equalTo(Optional.empty()));
  }

  @Test
  public void packageConfigExtractsValuesFromConfig() {
    AppleConfig config = FakeBuckConfig.builder()
        .setSections(
            "[apple]",
            "iphoneos_package_extension = api",
            "iphoneos_package_command = echo $OUT")
        .build().getView(AppleConfig.class);
    Optional<ApplePackageConfig> packageConfig =
        config.getPackageConfigForPlatform(ApplePlatform.IPHONEOS);
    assertThat(packageConfig.get().getCommand(), equalTo("echo $OUT"));
    assertThat(packageConfig.get().getExtension(), equalTo("api"));
  }
}

redpajama_set_name: RedPajamaGithub


text:
package com.palantir.atlasdb.keyvalue.impl;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NavigableMap;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.common.base.Function;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSortedMap;
import com.google.common.collect.Iterables;
import com.google.common.collect.Iterators;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.PeekingIterator;
import com.google.common.collect.UnmodifiableIterator;
import com.google.common.util.concurrent.Futures;
import com.palantir.atlasdb.AtlasDbConstants;
import com.palantir.atlasdb.AtlasDbPerformanceConstants;
import com.palantir.atlasdb.keyvalue.api.Cell;
import com.palantir.atlasdb.keyvalue.api.KeyAlreadyExistsException;
import com.palantir.atlasdb.keyvalue.api.KeyValueService;
import com.palantir.atlasdb.keyvalue.api.TableReference;
import com.palantir.atlasdb.keyvalue.api.Value;
import com.palantir.common.base.Throwables;
import com.palantir.common.collect.Maps2;
import com.palantir.common.concurrent.NamedThreadFactory;
import com.palantir.common.concurrent.PTExecutors;

public abstract class AbstractKeyValueService implements KeyValueService {
    private static final Logger log = LoggerFactory.getLogger(KeyValueService.class);

    protected ExecutorService executor;

    private final TracingPrefsConfig tracingPrefs;
    private final ScheduledExecutorService scheduledExecutor;

    /**
     * Note: This takes ownership of the given executor. It will be shutdown when the key
     * value service is closed.
     */
    public AbstractKeyValueService(ExecutorService executor) {
        this.executor = executor;
        this.tracingPrefs = new TracingPrefsConfig();
        this.scheduledExecutor = PTExecutors.newSingleThreadScheduledExecutor(
                new NamedThreadFactory(getClass().getSimpleName() + "-tracing-prefs", true));
        this.scheduledExecutor.scheduleWithFixedDelay(this.tracingPrefs, 0, 1, TimeUnit.MINUTES); // reload every minute
    }

    /**
     * @param threadNamePrefix thread name prefix
     * @param poolSize fixed thread pool size
     * @return a new fixed size thread pool with a keep alive time of 1 minute.
     */
    protected static ThreadPoolExecutor createFixedThreadPool(String threadNamePrefix, int poolSize) {
        ThreadPoolExecutor executor = PTExecutors.newFixedThreadPool(poolSize,
                new NamedThreadFactory(threadNamePrefix, false));
        executor.setKeepAliveTime(1, TimeUnit.MINUTES);
        return executor;
    }

    @Override
    public void createTables(Map<TableReference, byte[]> tableRefToTableMetadata) {
        for (Entry<TableReference, byte[]> entry : tableRefToTableMetadata.entrySet()) {
            createTable(entry.getKey(), entry.getValue());
        }
    }

    @Override
    public void dropTables(Set<TableReference> tableRefs) {
        for (TableReference tableName : tableRefs) {
            dropTable(tableName);
        }
    }

    @Override
    public Collection<? extends KeyValueService> getDelegates() {
        return ImmutableList.of();
    }

    /*
     * This version just does a regular read and returns the timestamp of the fetched value.
     * This is slower than it needs to be so implementers are encouraged to make a faster impl.
     */
    @Override
    public Map<Cell, Long> getLatestTimestamps(TableReference tableRef, Map<Cell, Long> keys) {
        return Maps.newHashMap(Maps.transformValues(get(tableRef, keys), Value.GET_TIMESTAMP));
    }

    @Override
    public Map<TableReference, byte[]> getMetadataForTables() {
        ImmutableMap.Builder<TableReference, byte[]> builder = ImmutableMap.builder();
        for (TableReference table: getAllTableNames()) {
            builder.put(table, getMetadataForTable(table));
        }
        return builder.build();
    }

    protected int getMinimumDurationToTraceMillis() {
        return tracingPrefs.getMinimumDurationToTraceMillis();
    }

    protected int getMultiPutBatchCount() {
        return AtlasDbPerformanceConstants.MAX_BATCH_SIZE;
    }

    protected long getMultiPutBatchSizeBytes() {
        return AtlasDbPerformanceConstants.MAX_BATCH_SIZE_BYTES;
    }

    /* (non-Javadoc)
     * @see com.palantir.atlasdb.keyvalue.api.KeyValueService#multiPut(java.util.Map, long)
     */
    @Override
    public void multiPut(Map<TableReference, ? extends Map<Cell, byte[]>> valuesByTable, final long timestamp) throws KeyAlreadyExistsException {
        List<Callable<Void>> callables = Lists.newArrayList();
        for (Entry<TableReference, ? extends Map<Cell, byte[]>> e : valuesByTable.entrySet()) {
            final TableReference table = e.getKey();
            // We sort here because some key value stores are more efficient if you store adjacent keys together.
            NavigableMap<Cell, byte[]> sortedMap = ImmutableSortedMap.copyOf(e.getValue());

            Iterable<List<Entry<Cell, byte[]>>> partitions = partitionByCountAndBytes(sortedMap.entrySet(),
                    getMultiPutBatchCount(), getMultiPutBatchSizeBytes(), table, new Function<Entry<Cell, byte[]>, Long>(){

                        @Override
                        public Long apply(Entry<Cell, byte[]> entry) {
                            long totalSize = 0;
                            totalSize += entry.getValue().length;
                            totalSize += Cells.getApproxSizeOfCell(entry.getKey());
                            return totalSize;
                        }});

            for (final List<Entry<Cell, byte[]>> p : partitions) {
                callables.add(new Callable<Void>() {
                    @Override
                    public Void call() {
                        String originalName = Thread.currentThread().getName();
                        Thread.currentThread().setName("Atlas multiPut of " + p.size() + " cells into " + table);
                        try {
                            put(table, Maps2.fromEntries(p), timestamp);
                            return null;
                        } finally {
                            Thread.currentThread().setName(originalName);
                        }
                    }
                });
            }
        }

        List<Future<Void>> futures;
        try {
            futures = executor.invokeAll(callables);
        } catch (InterruptedException e) {
            throw Throwables.throwUncheckedException(e);
        }
        for (Future<Void> future : futures) {
            try {
                future.get();
            } catch (InterruptedException e) {
                throw Throwables.throwUncheckedException(e);
            } catch (ExecutionException e) {
                throw Throwables.rewrapAndThrowUncheckedException(e.getCause());
            }
        }
    }

    protected <T> Iterable<List<T>> partitionByCountAndBytes(final Iterable<T> iterable,
                                                             final int maximumCountPerPartition,
                                                             final long maximumBytesPerPartition,
                                                             final TableReference tableRef,
                                                             final Function<T, Long> sizingFunction) {
        return partitionByCountAndBytes(iterable, maximumCountPerPartition, maximumBytesPerPartition, tableRef.getQualifiedName(), sizingFunction);
    }

    protected <T> Iterable<List<T>> partitionByCountAndBytes(final Iterable<T> iterable,
                                                             final int maximumCountPerPartition,
                                                             final long maximumBytesPerPartition,
                                                             final String tableName,
                                                             final Function<T, Long> sizingFunction) {
        return new Iterable<List<T>>() {
            @Override
            public Iterator<List<T>> iterator() {
                return new UnmodifiableIterator<List<T>>() {
                    PeekingIterator<T> pi = Iterators.peekingIterator(iterable.iterator());
                    private int remainingEntries = Iterables.size(iterable);

                    @Override
                    public boolean hasNext() {
                        return pi.hasNext();
                    }
                    @Override
                    public List<T> next() {
                        if (!hasNext()) {
                            throw new NoSuchElementException();
                        }
                        List<T> entries =
                                Lists.newArrayListWithCapacity(Math.min(maximumCountPerPartition, remainingEntries));
                        long runningSize = 0;

                        // limit on: maximum count, pending data, maximum size, but allow at least one even if it's too huge
                        T firstEntry = pi.next();
                        runningSize += sizingFunction.apply(firstEntry);
                        entries.add(firstEntry);
                        if (runningSize > maximumBytesPerPartition && log.isWarnEnabled()) {
                            String message = "Encountered an entry of approximate size " + sizingFunction.apply(firstEntry) +
                                    " bytes, larger than maximum size of " + maximumBytesPerPartition +
                                    " defined per entire batch, while doing a write to " + tableName +
                                    ". Attempting to batch anyways.";
                            if (AtlasDbConstants.TABLES_KNOWN_TO_BE_POORLY_DESIGNED.contains(TableReference.createUnsafe(tableName))) {
                                log.warn(message);
                            } else {
                                log.warn(message + " This can potentially cause out-of-memory errors.");
                            }
                        }

                        while (pi.hasNext() && entries.size() < maximumCountPerPartition) {
                            runningSize += sizingFunction.apply(pi.peek());
                            if (runningSize > maximumBytesPerPartition) {
                                break;
                            }
                            entries.add(pi.next());
                        }
                        remainingEntries -= entries.size();
                        return entries;
                    }
                };
            }
        };
    }

    @Override
    public void putMetadataForTables(final Map<TableReference, byte[]> tableRefToMetadata) {
        for (Map.Entry<TableReference, byte[]> entry : tableRefToMetadata.entrySet()) {
            putMetadataForTable(entry.getKey(), entry.getValue());
        }
    }

    public boolean shouldTraceQuery(final TableReference tableRef) {
        return tracingPrefs.shouldTraceQuery(tableRef.getQualifiedName());
    }

    @Override
    public void close() {
        scheduledExecutor.shutdown();
        executor.shutdown();
    }

    @Override
    public void teardown() {
        close();
    }

    @Override
    public void truncateTables(final Set<TableReference> tableRefs) {
        List<Future<Void>> futures = Lists.newArrayList();
        for (final TableReference tableRef : tableRefs) {
            futures.add(executor.submit(new Callable<Void>() {
                @Override
                public Void call() throws Exception {
                    truncateTable(tableRef);
                    return null;
                }
            }));
        }

        for (Future<Void> future : futures) {
            Futures.getUnchecked(future);
        }
    }

    protected static String internalTableName(TableReference tableRef) {
        String tableName = tableRef.getQualifiedName();
        if (tableName.startsWith("_")) {
            return tableName;
        }
        return tableName.replaceFirst("\\.", "__");
    }

    protected TableReference fromInternalTableName(String tableName) {
        if (tableName.startsWith("_")) {
            return TableReference.createUnsafe(tableName);
        }
        return TableReference.createUnsafe(tableName.replaceFirst("__", "."));
    }
}


text:
package com.mpush.common;

import com.mpush.api.MessageHandler;
import com.mpush.api.PacketReceiver;
import com.mpush.api.connection.Connection;
import com.mpush.api.protocol.Command;
import com.mpush.api.protocol.Packet;
import com.mpush.common.message.ErrorMessage;
import com.mpush.tools.common.Profiler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

import static com.mpush.common.ErrorCode.DISPATCH_ERROR;
import static com.mpush.common.ErrorCode.UNSUPPORTED_CMD;

/**
 * Created by ohun on 2015/12/22.
 *
 * @author ohun@live.cn
 */
public final class MessageDispatcher implements PacketReceiver {
    public static final Logger LOGGER = LoggerFactory.getLogger(MessageDispatcher.class);
    private final Map<Byte, MessageHandler> handlers = new HashMap<>();

    public void register(Command command, MessageHandler handler) {
        handlers.put(command.cmd, handler);
    }

    @Override
    public void onReceive(Packet packet, Connection connection) {
        MessageHandler handler = handlers.get(packet.cmd);
        if (handler != null) {
            try {
                Profiler.enter("start handle:" + handler.getClass().getSimpleName());
                handler.handle(packet, connection);
            } catch (Throwable throwable) {
                LOGGER.error("dispatch message ex, packet={}, connect={}, body={}"
                        , packet, connection, Arrays.toString(packet.body), throwable);
                ErrorMessage
                        .from(packet, connection)
                        .setErrorCode(DISPATCH_ERROR)
                        .close();
            } finally {
                Profiler.release();
            }
        } else {
            LOGGER.error("dispatch message failure unsupported cmd, packet={}, connect={}, body={}"
                    , packet, connection);
            ErrorMessage
                    .from(packet, connection)
                    .setErrorCode(UNSUPPORTED_CMD)
                    .close();
        }
    }
}


text:
namespace ServiceRegister.Store.CodeFirst.Model
{
    public interface ILanguageReference
    {
        Language Language { get; }
    }
}


text:
package com.variant.client.servlet;

import com.variant.client.VariantError;

public class ServletVariantError extends VariantError {

	/**
	 * Okay to use reserved range 301-400
	 */
	protected ServletVariantError(int code, String format) {
		super(code, format);
	}

	public static final ServletVariantError SERVLET_ADAPTER_INTERNAL_ERROR =
			new ServletVariantError(301, "Servlet adapter internal error: %s");

	public static final ServletVariantError USER_DATA_INVALID =
			new ServletVariantError(302, "User data  must have single element of type HttpServletRequest");

	public static final ServletVariantError PATTERN_INVALID =
			new ServletVariantError(303,"Pattern must start with [/] but was [%s]");

	public static final ServletVariantError FILTER_INIT_MISSING =
			new ServletVariantError(304,"Filter init parameter [schema] must be specified");

}


text:
<?php

use Illuminate\Routing\Router;
use Orchestra\Support\Facades\Foundation;

/*
|--------------------------------------------------------------------------
| Frontend Routing
|--------------------------------------------------------------------------
*/

Foundation::group('blupl/host', 'host', ['namespace' => 'Blupl\Host\Http\Controllers'], function (Router $router) {

        $router->get('create', 'HostController@create');
});

/*
|--------------------------------------------------------------------------
| Backend Routing
|--------------------------------------------------------------------------
*/

Foundation::namespaced('Blupl\Host\Http\Controllers\Admin', function (Router $router) {
    $router->group(['prefix' => 'Host'], function (Router $router) {
        $router->get('/', 'HomeController@index');
        $router->match(['GET', 'HEAD', 'DELETE'], 'profile/{roles}/delete', 'HomeController@delete');

    });
});


text: Ambient Monitoring taking flight


text:
namespace foundation
{

APPLESEED_DEFINE_APIARRAY(LibraryVersionArray);

//
// ThirdParties class implementation.
//

LibraryVersionArray ThirdParties::get_versions()
{
    static const char* BCDVersion = "v1.1";
    static const char* LibJpegTurboVersion = "1.3.1";
    static const char* LibTIFFVersion = "4.0.3";
    static const char* LLVMVersion = "3.4.2";
    static const char* LZ4Version = "revision 98 (July 1st, 2013)";
    static const char* SeExprVersion = "commit db9610a24401fa7198c54c8768d0484175f54172";

    LibraryVersionArray versions;

    // Keep entries sorted alphabetically.

    versions.push_back(APIStringPair("BCD", BCDVersion));
    versions.push_back(APIStringPair("Boost", format("{0}.{1}.{2}", BOOST_VERSION / 100000, (BOOST_VERSION / 100) % 1000, BOOST_VERSION % 100)));

#ifdef APPLESEED_WITH_EMBREE
    versions.push_back(APIStringPair("Embree", RTC_VERSION_STRING));
#endif

    versions.push_back(APIStringPair("IlmBase", ILMBASE_VERSION_STRING));
    versions.push_back(APIStringPair("libjpeg-turbo", LibJpegTurboVersion));
    versions.push_back(APIStringPair("libpng", PNG_LIBPNG_VER_STRING));
    versions.push_back(APIStringPair("LibTIFF", LibTIFFVersion));
    versions.push_back(APIStringPair("LLVM", LLVMVersion));
    versions.push_back(APIStringPair("LZ4", LZ4Version));
    versions.push_back(APIStringPair("OpenColorIO", OCIO_VERSION));
    versions.push_back(APIStringPair("OpenEXR", OPENEXR_VERSION_STRING));
    versions.push_back(APIStringPair("OpenImageIO", OIIO_VERSION_STRING));
    versions.push_back(APIStringPair("OpenShadingLanguage", OSL_LIBRARY_VERSION_STRING));
    versions.push_back(APIStringPair("SeExpr", SeExprVersion));
    versions.push_back(APIStringPair("Xerces-C++", XERCES_FULLVERSIONDOT));
    versions.push_back(APIStringPair("zlib", ZLIB_VERSION));

    return versions;
}

}   // namespace foundation


text:
Spine.RegionAttachment = function(name, attachmentResolver) {
    this.name = name;
    this._attachmentResolver = attachmentResolver;
    this.x = 0;
    this.y = 0;
    this.scaleX = 1;
    this.scaleY = 1;
    this.rotation = 0;
    this.width = 0;
    this.height = 0;

    this._img = this._attachmentResolver.resolve(name);
    this._imgX = 0;
    this._imgY = 0;
    this._imgRot = 0;
    this._imgScaleX = 1;
    this._imgScaleY = 0;

    this._alpha = null;
};

Spine.RegionAttachment.prototype = {
    destroy: function() {},

    updateWorldTransform: function(flipX, flipY, slot) {
        this._alpha = slot.a;

        if(this._img._spine_loaded) {
            this._imgX = slot.bone.worldX + this.x * slot.bone.m00 + this.y * slot.bone.m01;
            this._imgY = slot.bone.worldY + this.x * slot.bone.m10 + this.y * slot.bone.m11;
            this._imgRot = -(slot.bone.worldRotation + this.rotation);
            this._imgScaleX = slot.bone.worldScaleX + this.scaleX - 1;
            this._imgScaleY = slot.bone.worldScaleY + this.scaleY - 1;

            if(flipX) {
                this._imgScaleX *= -1;
                this._imgRot *= -1;
            }

            if(flipY) {
                this._imgScaleY *= -1;
                this._imgRot *= -1;
            }
        }

    },

    draw: function(context) {
        context.save();

        context.globalAlpha = this._alpha;

        context.translate(this._imgX, this._imgY);
        context.rotate(this._imgRot * (Math.PI/180));
        context.scale(this.scaleX, this.scaleY);

        var x = -((this._img.width*this._imgScaleX)>>1),
            y = -((this._img.height*this._imgScaleY)>>1);

        context.drawImage(this._img, x, y, this.width, this.height);

        context.restore();
    }

};


text:
/* ** GENEREATED FILE - DO NOT MODIFY ** */
package com.wilutions.mslib.office;
import com.wilutions.com.*;

/**
 * SharedWorkspaceFiles.
 *
 */
@CoInterface(guid="{000C037C-0000-0000-C000-000000000046}")
public interface SharedWorkspaceFiles extends IDispatch {
  static boolean __typelib__loaded = __TypeLib.load();
  @DeclDISPID(1610743808)  public IDispatch getApplication() throws ComException;
  @DeclDISPID(1610743809)  public Integer getCreator() throws ComException;
  @DeclDISPID(-4)  public Object get_NewEnum() throws ComException;
  @DeclDISPID(0)  public SharedWorkspaceFile getItem(final Integer Index) throws ComException;
  @DeclDISPID(1)  public Integer getCount() throws ComException;
  @DeclDISPID(2)  public SharedWorkspaceFile Add(final String FileName, final Object ParentFolder, final Object OverwriteIfFileAlreadyExists, final Object KeepInSync) throws ComException;
  @DeclDISPID(3)  public IDispatch getParent() throws ComException;
  @DeclDISPID(4)  public Boolean getItemCountExceeded() throws ComException;
}


text:
package org.motechproject.mds.domain;

import org.apache.commons.lang.StringUtils;
import org.motechproject.mds.dto.LookupDto;
import org.motechproject.mds.dto.LookupFieldDto;
import org.motechproject.mds.dto.LookupFieldType;
import org.motechproject.mds.util.LookupName;
import org.motechproject.mds.util.ValidationUtil;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.Join;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

import static org.apache.commons.lang.BooleanUtils.toBoolean;
import static org.motechproject.mds.util.Constants.Util.TRUE;

/**
 * The Lookup class contains information about single lookup
 */
@PersistenceCapable(identityType = IdentityType.DATASTORE, detachable = TRUE)
public class Lookup {

    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.INCREMENT)
    private Long id;

    @Persistent
    private String lookupName;

    @Persistent
    private boolean singleObjectReturn;

    @Persistent
    private boolean exposedViaRest;

    @Persistent
    private Entity entity;

    @Persistent
    private boolean readOnly;

    @Persistent
    private String methodName;

    @Persistent(table = "LookupFields")
    @Join
    private List<Field> fields;

    @Persistent(defaultFetchGroup = TRUE)
    private List<String> fieldsOrder;

    @Persistent(defaultFetchGroup = TRUE)
    private List<String> rangeLookupFields;

    @Persistent(defaultFetchGroup = TRUE)
    private List<String> setLookupFields;

    @Persistent(defaultFetchGroup = TRUE)
    private Map<String, String> customOperators;

    @Persistent(defaultFetchGroup = TRUE)
    private Map<String, Boolean> useGenericParams;

    public Lookup() {
        this(null, false, false, null);
    }

    public Lookup(String lookupName, boolean singleObjectReturn, boolean exposedViaRest, List<Field> fields) {
        this(lookupName, singleObjectReturn, exposedViaRest, fields, false, LookupName.lookupMethod(lookupName));
    }

    public Lookup(String lookupName, boolean singleObjectReturn, boolean exposedViaRest, List<Field> fields, boolean readOnly,
                  String methodName) {
        this(lookupName, singleObjectReturn, exposedViaRest, fields, readOnly, methodName, Collections.<String>emptyList(),
                Collections.<String>emptyList(), new HashMap<String, String>(), new HashMap<String, Boolean>(), new ArrayList<String>());
    }

    public Lookup(String lookupName, boolean singleObjectReturn, boolean exposedViaRest, List<Field> fields, boolean readOnly,
                  String methodName, List<String> rangeLookupFields, List<String> setLookupFields,
                  Map<String, String> customOperators) {
        this(lookupName, singleObjectReturn, exposedViaRest, fields, readOnly, methodName, rangeLookupFields,
                setLookupFields, customOperators, new HashMap<String, Boolean>(), new ArrayList<String>());
    }

    public Lookup(String lookupName, boolean singleObjectReturn, boolean exposedViaRest, List<Field> fields, boolean readOnly,
                  String methodName, List<String> rangeLookupFields, List<String> setLookupFields,
                  Map<String, String> customOperators, Map<String, Boolean> useGenericParams, List<String> fieldsOrder) {
        setLookupName(lookupName);
        this.singleObjectReturn = singleObjectReturn;
        this.exposedViaRest = exposedViaRest;
        this.fields = fields;
        this.readOnly = readOnly;
        this.methodName = methodName;
        this.rangeLookupFields = rangeLookupFields;
        this.setLookupFields = setLookupFields;
        this.customOperators = customOperators;
        this.useGenericParams = useGenericParams;
        this.fieldsOrder = fieldsOrder;
    }

    public Lookup(String lookupName, boolean singleObjectReturn, boolean exposedViaRest, List<Field> fields, Entity entity) {
        this(lookupName, singleObjectReturn, exposedViaRest, fields);
        this.entity = entity;
    }

    public Lookup(LookupDto lookupDto, List<Field> lookupFields) {
        update(lookupDto, lookupFields);
    }

    public LookupDto toDto() {
        List<LookupFieldDto> lookupFields = new ArrayList<>();

        for (String lookupFieldName : getFieldsOrder()) {
            Field field = getLookupFieldByName(LookupName.getFieldName(lookupFieldName));
            LookupFieldType lookupFieldType = LookupFieldType.VALUE;

            if (isRangeParam(lookupFieldName)) {
                lookupFieldType = LookupFieldType.RANGE;
            } else if (isSetParam(lookupFieldName)) {
                lookupFieldType = LookupFieldType.SET;
            }

            String customOperator = getCustomOperators().get(lookupFieldName);
            boolean useGenericParam = toBoolean(getUseGenericParams().get(lookupFieldName));
            LookupFieldDto lookupField = new  LookupFieldDto(field.getId(), field.getName(), lookupFieldType, customOperator,
                    useGenericParam, LookupName.getRelatedFieldName(lookupFieldName));
            lookupFields.add(lookupField);
        }

        return new LookupDto(id, lookupName, singleObjectReturn, exposedViaRest,
                lookupFields, readOnly, methodName, fieldsOrder);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLookupName() {
        return lookupName;
    }

    public final void setLookupName(String lookupName) {
        ValidationUtil.validateNoJavaKeyword(lookupName);
        this.lookupName = lookupName;
    }

    public Map<String, String> getCustomOperators() {
        if (customOperators == null) {
            customOperators = new HashMap<>();
        }
        return customOperators;
    }

    public void setCustomOperators(Map<String, String> customOperators) {
        this.customOperators = customOperators;
    }

    public boolean isSingleObjectReturn() {
        return singleObjectReturn;
    }

    public void setSingleObjectReturn(boolean singleObjectReturn) {
        this.singleObjectReturn = singleObjectReturn;
    }

    public boolean isExposedViaRest() {
        return exposedViaRest;
    }

    public void setExposedViaRest(boolean exposedViaRest) {
        this.exposedViaRest = exposedViaRest;
    }

    public Entity getEntity() {
        return entity;
    }

    public void setEntity(Entity entity) {
        this.entity = entity;
    }

    public List<Field> getFields() {
        return fields;
    }

    public void setFields(List<Field> fields) {
        this.fields = fields;
    }

    public boolean isReadOnly() {
        return readOnly;
    }

    public void setReadOnly(boolean readOnly) {
        this.readOnly = readOnly;
    }

    public String getMethodName() {
        return (StringUtils.isBlank(methodName)) ? LookupName.lookupMethod(lookupName) : methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public final List<String> getRangeLookupFields() {
        if (rangeLookupFields == null) {
            rangeLookupFields = new ArrayList<>();
        }
        return rangeLookupFields;
    }

    public void setRangeLookupFields(List<String> rangeLookupFields) {
        this.rangeLookupFields = rangeLookupFields;
    }

    public final List<String> getSetLookupFields() {
        if (setLookupFields == null) {
            setLookupFields = new ArrayList<>();
        }
        return setLookupFields;
    }

    public void setSetLookupFields(List<String> setLookupFields) {
        this.setLookupFields = setLookupFields;
    }

    public final Field getLookupFieldByName(String name) {
        for (Field field : getFields()) {
            if (StringUtils.equals(name, field.getName())) {
                return field;
            }
        }
        return null;
    }

    public final Field getLookupFieldById(Long id) {
        for (Field field : getFields()) {
            if (Objects.equals(field.getId(), id)) {
                return field;
            }
        }
        return null;
    }

    public Map<String, Boolean> getUseGenericParams() {
        if (useGenericParams == null) {
            useGenericParams = new HashMap<>();
        }

        return useGenericParams;
    }

    public void setUseGenericParams(Map<String, Boolean> useGenericParams) {
        this.useGenericParams = useGenericParams;
    }

    public List<String> getFieldsOrder() {
        if (fieldsOrder == null) {
            return new ArrayList<>();
        }
        return fieldsOrder;
    }

    public void setFieldsOrder(List<String> fieldsOrder) {
        this.fieldsOrder = fieldsOrder;
    }

    public Lookup copy(List<Field> fields) {
        List<Field> lookupFields = new ArrayList<>();
        for (Field lookupField : this.fields) {
            for (Field newField : fields) {
                if (lookupField.getName().equals(newField.getName())) {
                    lookupFields.add(newField);
                    break;
                }
            }
        }

        return new Lookup(lookupName, singleObjectReturn, exposedViaRest, lookupFields, readOnly, methodName,
                getRangeLookupFields(), getSetLookupFields(), customOperators, useGenericParams, getFieldsOrder());
    }

    public final void update(LookupDto lookupDto, List<Field> lookupFields) {
        singleObjectReturn = lookupDto.isSingleObjectReturn();
        exposedViaRest = lookupDto.isExposedViaRest();
        setLookupName(lookupDto.getLookupName());
        fields = lookupFields;
        methodName = lookupDto.getMethodName();
        readOnly = lookupDto.isReadOnly();

        updateFieldsOrder(lookupDto.getFieldsOrder());
        updateCustomOperators(lookupDto);
        updateLookupFields(lookupDto);
        updateUseGenericParams(lookupDto);
    }

    public boolean isRangeParam(String field) {
        return getRangeLookupFields().contains(field);
    }

    public boolean isSetParam(String field) {
        return getSetLookupFields().contains(field);
    }

    private void updateFieldsOrder(List<String> newOrder) {
        if (fieldsOrder == null) {
            fieldsOrder = new ArrayList<>();
        } else {
            fieldsOrder.clear();
        }
        fieldsOrder.addAll(newOrder);
    }

    private void updateLookupFields(LookupDto lookupDto) {
        getRangeLookupFields().clear();
        getSetLookupFields().clear();
        for (LookupFieldDto lookupFieldDto : lookupDto.getLookupFields()) {
            String name = lookupFieldDto.getLookupFieldName();

            if (lookupFieldDto.getType() == LookupFieldType.RANGE) {
                getRangeLookupFields().add(name);
            } else if (lookupFieldDto.getType() == LookupFieldType.SET) {
                getSetLookupFields().add(name);
            }
        }
    }

    private void updateCustomOperators(LookupDto lookupDto) {
        getCustomOperators().clear();
        for (LookupFieldDto lookupField : lookupDto.getLookupFields()) {
            String customOperator = lookupField.getCustomOperator();
            if (StringUtils.isNotBlank(customOperator)) {
                getCustomOperators().put(lookupField.getLookupFieldName(), customOperator);
            }
        }
    }

    private void updateUseGenericParams(LookupDto lookupDto) {
        getUseGenericParams().clear();

        for (LookupFieldDto lookupField : lookupDto.getLookupFields()) {
            getUseGenericParams().put(lookupField.getLookupFieldName(), lookupField.isUseGenericParam());
        }
    }

    public LookupFieldType getLookupFieldType(String fieldName) {
        if (getRangeLookupFields().contains(fieldName)) {
            return LookupFieldType.RANGE;
        } else if (getSetLookupFields().contains(fieldName)) {
            return LookupFieldType.SET;
        } else {
            return LookupFieldType.VALUE;
        }
    }
}


text:
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List href="./awards%20template_files/filelist.xml">
<link rel=Edit-Time-Data href="./awards%20template_files/editdata.mso">

<title>2010 Silicon Valley Regional sponsored by Google and BAE Systems</title>

<![if !supportEmptyParas]> <![endif]><o:p></o:p>

Silicon Valley Regional sponsored by Google and BAE Systems<o:p></o:p>

3/18/2010 - 3/20/2010

Awards <o:p></o:p>

Match
  Results <o:p></o:p>

Team
  Standings <o:p></o:p>

Qual Schedule <o:p></o:p>

Elim Schedule <o:p></o:p>

<![if !supportEmptyParas]> <![endif]><o:p></o:p>

Award<o:p></o:p>

Team<o:p></o:p>

Name<o:p></o:p>

Home Town<o:p></o:p>

Outstanding Volunteer of the Year<o:p></o:p>

<![if !supportEmptyParas]> <![endif]><o:p></o:p>

<![if !supportEmptyParas]> <![endif]>John & Maggie Best<o:p></o:p>

<![if !supportEmptyParas]> <![endif]><o:p></o:p>

Imagery Award in honor of Jack Kamen<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>701<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Travis USD / Solano County Office of Education / PGP Corporation / COGCO, Wireline Inc / Fairfield-Suisun Rotary / Solano Community Foundation / Tesoro Refining Companies / Pedron's Storage Co. & Vanden High School<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Fairfield, CA, USA<o:p></o:p>

Innovation in Control Award sponsored by Rockwell Automation<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>1280<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>EMC Corporation/Intuitive Surgical & San Ramon Valley High School<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Danville, CA, USA<o:p></o:p>

Creativity Award sponsored by Xerox<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>675<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Expressway Self Storage / Brian Purcell / Rodney Sweet Chiropractic Care / Roadrunner Mobile Truck Repair / Twin Oaks Garage / RKF Consulting / Double Decker Lanes / Carl Pearlman and Associates & Technology High School<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Rohnert Park, CA, USA<o:p></o:p>

Engineering Excellence Award sponsored by Delphi<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>100<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>PDI Dreamworks/Woodside High School Foundation/SRI International & Woodside High School & Carlmont High School & Sequoia High School & Sequoia Union High School District<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Woodside, CA, USA<o:p></o:p>

Entrepreneurship Award sponsored by Kleiner Perkins Caufield and Byers<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>1351<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>MCNC De Anza College & Archbishop Mitty High School<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>San Jose, CA, USA<o:p></o:p>

Judges Award<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>1834<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Google / Boeing / San Jose Job Corps & School for Integrated Academics and Technologies- SIATech<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>San Jose, CA, USA<o:p></o:p>

Website Award<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>100<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>PDI Dreamworks/Woodside High School Foundation/SRI International & Woodside High School & Carlmont High School & Sequoia High School & Sequoia Union High School District<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Woodside, CA, USA<o:p></o:p>

Woodie Flowers Award<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>701<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Doug Green<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Fairfield, CA, USA<o:p></o:p>

Excellence in Design Award sponsored by Autodesk<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>100<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>PDI Dreamworks/Woodside High School Foundation/SRI International & Woodside High School & Carlmont High School & Sequoia High School & Sequoia Union High School District<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Woodside, CA, USA<o:p></o:p>

Industrial Design sponsored by General Motors<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>254<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>BAE Systems / Pacific Coast Metal / Modern Machine Company / Pacific Precision / Ride & Show Engineering, Inc. / Vivid-Hosting / Central Powder Coating / Lian-Mueller Enterprises / Gilbert Spray Coat / Mike Dininny / Ergodex / Foes Racing / NASA Ames Rese<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>San Jose, CA, USA<o:p></o:p>

Quality Award sponsored by Motorola<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>3256<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>NASA & Valley Christian Schools<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>San Jose, CA, USA<o:p></o:p>

Gracious Professionalism Award sponsored by Johnson & Johnson<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>1323<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Boeing/B-K Lighting/GBS Hardware/JBT FoodTech/Elk Ridge Almonds Inc./Kiwanis Club & Madera High School<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Madera, CA, USA<o:p></o:p>

Team Spirit Award sponsored by Chrysler<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>1868<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>BAE Systems / St. Jude Medical Foundation / Intuitive Surgical / Anytime Welding / Loral Space Systems / World Metal Finishing / Vivid-Hosting / Solidworks / Wildbit / NASA Ames Research Center / Santa Clara University & Girl Scouts of Northern California<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Moffett Field, CA, USA<o:p></o:p>

Rookie Inspiration Award<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>3156<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Google / Sun Microsystems / Dale Hardware / Life Technologies / Placer Title / Accuracy Machine, Inc. / SRT & Fremont Christian School<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Fremont, CA, USA<o:p></o:p>

Rookie All Star Award<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>3129<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>JCPenney & 4-H University of California<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Mountain View, CA, USA<o:p></o:p>

Highest Rookie Seed<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>3129<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>JCPenney & 4-H University of California<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Mountain View, CA, USA<o:p></o:p>

Industrial Safety Award sponsored by Underwriters Laboratories<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>3256<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>NASA & Valley Christian Schools<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>San Jose, CA, USA<o:p></o:p>

Coopertition Award<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>971<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Abbott Fund / Berger Manufacturing, Inc / St. Jude Medical Foundation / Google / The Linley Group / Intuitive Surgical, Inc. / OneLegacy & Mountain View High School<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Mountain View, CA, USA<o:p></o:p>

Finalist #1<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>1868<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>BAE Systems / St. Jude Medical Foundation / Intuitive Surgical / Anytime Welding / Loral Space Systems / World Metal Finishing / Vivid-Hosting / Solidworks / Wildbit / NASA Ames Research Center / Santa Clara University & Girl Scouts of Northern California<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Moffett Field, CA, USA<o:p></o:p>

Finalist #2<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>100<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>PDI Dreamworks/Woodside High School Foundation/SRI International & Woodside High School & Carlmont High School & Sequoia High School & Sequoia Union High School District<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Woodside, CA, USA<o:p></o:p>

Finalist #3<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>675<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Expressway Self Storage / Brian Purcell / Rodney Sweet Chiropractic Care / Roadrunner Mobile Truck Repair / Twin Oaks Garage / RKF Consulting / Double Decker Lanes / Carl Pearlman and Associates & Technology High School<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Rohnert Park, CA, USA<o:p></o:p>

Finalist #4<o:p></o:p>

<![if !supportEmptyParas]> <![endif]><o:p></o:p>

<![if !supportEmptyParas]> <![endif]><o:p></o:p>

<![if !supportEmptyParas]> <![endif]><o:p></o:p>

Winner #1<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>971<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Abbott Fund / Berger Manufacturing, Inc / St. Jude Medical Foundation / Google / The Linley Group / Intuitive Surgical, Inc. / OneLegacy & Mountain View High School<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Mountain View, CA, USA<o:p></o:p>

Winner #2<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>254<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>BAE Systems / Pacific Coast Metal / Modern Machine Company / Pacific Precision / Ride & Show Engineering, Inc. / Vivid-Hosting / Central Powder Coating / Lian-Mueller Enterprises / Gilbert Spray Coat / Mike Dininny / Ergodex / Foes Racing / NASA Ames Rese<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>San Jose, CA, USA<o:p></o:p>

Winner #3<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>649<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Valin Corporation- Automation Controls / FESTO / Saratoga Rotary Club / NASA & Saratoga High School<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Saratoga, CA, USA<o:p></o:p>

Winner #4<o:p></o:p>

<![if !supportEmptyParas]> <![endif]><o:p></o:p>

<![if !supportEmptyParas]> <![endif]><o:p></o:p>

<![if !supportEmptyParas]> <![endif]><o:p></o:p>

Engineering Inspiration<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>604<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>BAE SYSTEMS / IBM / Google / Sierra Radio Systems / Exatron / MDR Precision Machining / Design Visionaries & Leland High School<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>San Jose, CA, USA<o:p></o:p>

FIRST Dean's List Finalist Award<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>604<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Eugene Fang<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>San Jose, CA, USA<o:p></o:p>

FIRST Dean's List Finalist Award<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>2489<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Anna Liu <o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Fremont, CA, USA<o:p></o:p>

Regional Chairman's Award<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>115<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>BAE SYSTEMS/Symantec Corporation/Google & Monta Vista High School<o:p></o:p>

<![if !supportEmptyParas]> <![endif]>Cupertino, CA, USA<o:p></o:p>

<![if !supportEmptyParas]> <![endif]><o:p></o:p>

  Match scheduling software © 2007 Idle Loop Software
  Design, LLC.

  FIRST— For Inspiration and Recognition of
  Science and Technology

Copyright © 2008 FIRST

<![if !supportEmptyParas]> <![endif]><o:p></o:p>

Data brought to you
  by 4FX Design

<![if !supportEmptyParas]> <![endif]><o:p></o:p>

<![if !supportEmptyParas]> <![endif]><o:p></o:p>


text:
/**
 * Intended to be used by the plugin adapter implementation.
 * Surfaces enough for the adapter to get at the plugin artifacts and to use the PubSub mechanism.
 * Removes the need for the plugin adapter to know the topic on which it publishes.
 */
define([
    'ext/PluginContext',
    'util/PubSub',
    'util/Env'
], function (Context, PubSub, Env) {
    'use strict';

    function publish(suffix, msg) {
        PubSub.publish(Context.getDefinition()['topic-prefix'] + '.' + suffix, msg);
    }

    function pluginUrl(name) {
        return Env.plugin(name);
    }

    function adapterUrl(name) {
        return Env.pluginAdapter(name);
    }

    return {
        publish: publish,
        pluginUrl: pluginUrl,
        adapterUrl: adapterUrl
    };
});


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

import { Injectable } from '@angular/core';

import { CoreCanceledError } from '@classes/errors/cancelederror';
import { CoreError } from '@classes/errors/error';
import { CoreCourse } from '@features/course/services/course';
import { CoreNavigator } from '@services/navigator';
import { CoreSites, CoreSitesReadingStrategy } from '@services/sites';
import { CoreDomUtils } from '@services/utils/dom';
import { CoreUtils } from '@services/utils/utils';
import { makeSingleton, Translate } from '@singletons';
import { AddonModQuizPreflightModalComponent } from '../components/preflight-modal/preflight-modal';
import { AddonModQuizAccessRuleDelegate } from './access-rules-delegate';
import { AddonModQuizModuleHandlerService } from './handlers/module';
import {
    AddonModQuiz,
    AddonModQuizAttemptWSData,
    AddonModQuizCombinedReviewOptions,
    AddonModQuizGetQuizAccessInformationWSResponse,
    AddonModQuizProvider,
    AddonModQuizQuizWSData,
} from './quiz';
import { AddonModQuizOffline } from './quiz-offline';

/**
 * Helper service that provides some features for quiz.
 */
@Injectable({ providedIn: 'root' })
export class AddonModQuizHelperProvider {

    /**
     * Validate a preflight data or show a modal to input the preflight data if required.
     * It calls AddonModQuizProvider.startAttempt if a new attempt is needed.
     *
     * @param quiz Quiz.
     * @param accessInfo Quiz access info.
     * @param preflightData Object where to store the preflight data.
     * @param attempt Attempt to continue. Don't pass any value if the user needs to start a new attempt.
     * @param offline Whether the attempt is offline.
     * @param prefetch Whether user is prefetching.
     * @param title The title to display in the modal and in the submit button.
     * @param siteId Site ID. If not defined, current site.
     * @param retrying Whether we're retrying after a failure.
     * @return Promise resolved when the preflight data is validated. The resolve param is the attempt.
     */
    async getAndCheckPreflightData(
        quiz: AddonModQuizQuizWSData,
        accessInfo: AddonModQuizGetQuizAccessInformationWSResponse,
        preflightData: Record<string, string>,
        attempt?: AddonModQuizAttemptWSData,
        offline?: boolean,
        prefetch?: boolean,
        title?: string,
        siteId?: string,
        retrying?: boolean,
    ): Promise<AddonModQuizAttemptWSData> {

        const rules = accessInfo?.activerulenames;

        // Check if the user needs to input preflight data.
        const preflightCheckRequired = await AddonModQuizAccessRuleDelegate.isPreflightCheckRequired(
            rules,
            quiz,
            attempt,
            prefetch,
            siteId,
        );

        if (preflightCheckRequired) {
            // Preflight check is required. Show a modal with the preflight form.
            const data = await this.getPreflightData(quiz, accessInfo, attempt, prefetch, title, siteId);

            // Data entered by the user, add it to preflight data and check it again.
            Object.assign(preflightData, data);
        }

        // Get some fixed preflight data from access rules (data that doesn't require user interaction).
        await AddonModQuizAccessRuleDelegate.getFixedPreflightData(rules, quiz, preflightData, attempt, prefetch, siteId);

        try {
            // All the preflight data is gathered, now validate it.
            return await this.validatePreflightData(quiz, accessInfo, preflightData, attempt, offline, prefetch, siteId);
        } catch (error) {

            if (prefetch) {
                throw error;
            } else if (retrying && !preflightCheckRequired) {
                // We're retrying after a failure, but the preflight check wasn't required.
                // This means there's something wrong with some access rule or user is offline and data isn't cached.
                // Don't retry again because it would lead to an infinite loop.
                throw error;
            }

            // Show error and ask for the preflight again.
            // Wait to show the error because we want it to be shown over the preflight modal.
            setTimeout(() => {
                CoreDomUtils.showErrorModalDefault(error, 'core.error', true);
            }, 100);

            return this.getAndCheckPreflightData(
                quiz,
                accessInfo,
                preflightData,
                attempt,
                offline,
                prefetch,
                title,
                siteId,
                true,
            );
        }
    }

    /**
     * Get the preflight data from the user using a modal.
     *
     * @param quiz Quiz.
     * @param accessInfo Quiz access info.
     * @param attempt The attempt started/continued. If not supplied, user is starting a new attempt.
     * @param prefetch Whether the user is prefetching the quiz.
     * @param title The title to display in the modal and in the submit button.
     * @param siteId Site ID. If not defined, current site.
     * @return Promise resolved with the preflight data. Rejected if user cancels.
     */
    async getPreflightData(
        quiz: AddonModQuizQuizWSData,
        accessInfo: AddonModQuizGetQuizAccessInformationWSResponse,
        attempt?: AddonModQuizAttemptWSData,
        prefetch?: boolean,
        title?: string,
        siteId?: string,
    ): Promise<Record<string, string>> {
        const notSupported: string[] = [];
        const rules = accessInfo?.activerulenames;

        // Check if there is any unsupported rule.
        rules.forEach((rule) => {
            if (!AddonModQuizAccessRuleDelegate.isAccessRuleSupported(rule)) {
                notSupported.push(rule);
            }
        });

        if (notSupported.length) {
            throw new CoreError(
                Translate.instant('addon.mod_quiz.errorrulesnotsupported') + ' ' + JSON.stringify(notSupported),
            );
        }

        // Create and show the modal.
        const modalData = await CoreDomUtils.openModal<Record<string, string>>({
            component: AddonModQuizPreflightModalComponent,
            componentProps: {
                title: title,
                quiz,
                attempt,
                prefetch: !!prefetch,
                siteId: siteId,
                rules: rules,
            },
        });

        if (!modalData) {
            throw new CoreCanceledError();
        }

        return modalData;
    }

    /**
     * Gets the mark string from a question HTML.
     * Example result: "Marked out of 1.00".
     *
     * @param html Question's HTML.
     * @return Question's mark.
     */
    getQuestionMarkFromHtml(html: string): string | undefined {
        const element = CoreDomUtils.convertToElement(html);

        return CoreDomUtils.getContentsOfElement(element, '.grade');
    }

    /**
     * Get a quiz ID by attempt ID.
     *
     * @param attemptId Attempt ID.
     * @param options Other options.
     * @return Promise resolved with the quiz ID.
     */
    async getQuizIdByAttemptId(attemptId: number, options: { cmId?: number; siteId?: string } = {}): Promise<number> {
        // Use getAttemptReview to retrieve the quiz ID.
        const reviewData = await AddonModQuiz.getAttemptReview(attemptId, options);

        if (reviewData.attempt.quiz) {
            return reviewData.attempt.quiz;
        }

        throw new CoreError('Cannot get quiz ID.');
    }

    /**
     * Handle a review link.
     *
     * @param attemptId Attempt ID.
     * @param page Page to load, -1 to all questions in same page.
     * @param quizId Quiz ID.
     * @param siteId Site ID. If not defined, current site.
     * @return Promise resolved when done.
     */
    async handleReviewLink(attemptId: number, page?: number, quizId?: number, siteId?: string): Promise<void> {
        siteId = siteId || CoreSites.getCurrentSiteId();

        const modal = await CoreDomUtils.showModalLoading();

        try {
            if (!quizId) {
                quizId = await this.getQuizIdByAttemptId(attemptId, { siteId });
            }

            const module = await CoreCourse.getModuleBasicInfoByInstance(
                quizId,
                'quiz',
                { siteId, readingStrategy: CoreSitesReadingStrategy.PREFER_CACHE },
            );

            // Go to the review page.
            await CoreNavigator.navigateToSitePath(
                `${AddonModQuizModuleHandlerService.PAGE_NAME}/${module.course}/${module.id}/review/${attemptId}`,
                {
                    params: {
                        page: page == undefined || isNaN(page) ? -1 : page,
                    },
                    siteId,
                },
            );
        } catch (error) {
            CoreDomUtils.showErrorModalDefault(error, 'An error occurred while loading the required data.');
        } finally {
            modal.dismiss();
        }
    }

    /**
     * Add some calculated data to the attempt.
     *
     * @param quiz Quiz.
     * @param attempt Attempt.
     * @param highlight Whether we should check if attempt should be highlighted.
     * @param bestGrade Quiz's best grade (formatted). Required if highlight=true.
     * @param isLastAttempt Whether the attempt is the last one.
     * @param siteId Site ID.
     */
    async setAttemptCalculatedData(
        quiz: AddonModQuizQuizData,
        attempt: AddonModQuizAttemptWSData,
        highlight?: boolean,
        bestGrade?: string,
        isLastAttempt?: boolean,
        siteId?: string,
    ): Promise<AddonModQuizAttempt> {
        const formattedAttempt = <AddonModQuizAttempt> attempt;

        formattedAttempt.rescaledGrade = AddonModQuiz.rescaleGrade(attempt.sumgrades, quiz, false);
        formattedAttempt.finished = AddonModQuiz.isAttemptFinished(attempt.state);
        formattedAttempt.readableState = AddonModQuiz.getAttemptReadableState(quiz, attempt);

        if (quiz.showMarkColumn && formattedAttempt.finished) {
            formattedAttempt.readableMark = AddonModQuiz.formatGrade(attempt.sumgrades, quiz.decimalpoints);
        } else {
            formattedAttempt.readableMark = '';
        }

        if (quiz.showGradeColumn && formattedAttempt.finished) {
            formattedAttempt.readableGrade = AddonModQuiz.formatGrade(
                Number(formattedAttempt.rescaledGrade),
                quiz.decimalpoints,
            );

            // Highlight the highest grade if appropriate.
            formattedAttempt.highlightGrade = !!(highlight && !attempt.preview &&
                attempt.state == AddonModQuizProvider.ATTEMPT_FINISHED && formattedAttempt.readableGrade == bestGrade);
        } else {
            formattedAttempt.readableGrade = '';
        }

        if (isLastAttempt || isLastAttempt === undefined) {
            formattedAttempt.finishedOffline = await AddonModQuiz.isAttemptFinishedOffline(attempt.id, siteId);
        }

        return formattedAttempt;
    }

    /**
     * Add some calculated data to the quiz.
     *
     * @param quiz Quiz.
     * @param options Review options.
     */
    setQuizCalculatedData(quiz: AddonModQuizQuizWSData, options: AddonModQuizCombinedReviewOptions): AddonModQuizQuizData {
        const formattedQuiz = <AddonModQuizQuizData> quiz;

        formattedQuiz.sumGradesFormatted = AddonModQuiz.formatGrade(quiz.sumgrades, quiz.decimalpoints);
        formattedQuiz.gradeFormatted = AddonModQuiz.formatGrade(quiz.grade, quiz.decimalpoints);

        formattedQuiz.showAttemptColumn = quiz.attempts != 1;
        formattedQuiz.showGradeColumn = options.someoptions.marks >= AddonModQuizProvider.QUESTION_OPTIONS_MARK_AND_MAX &&
            AddonModQuiz.quizHasGrades(quiz);
        formattedQuiz.showMarkColumn = formattedQuiz.showGradeColumn && quiz.grade != quiz.sumgrades;
        formattedQuiz.showFeedbackColumn = !!quiz.hasfeedback && !!options.alloptions.overallfeedback;

        return formattedQuiz;
    }

    /**
     * Validate the preflight data. It calls AddonModQuizProvider.startAttempt if a new attempt is needed.
     *
     * @param quiz Quiz.
     * @param accessInfo Quiz access info.
     * @param preflightData Object where to store the preflight data.
     * @param attempt Attempt to continue. Don't pass any value if the user needs to start a new attempt.
     * @param offline Whether the attempt is offline.
     * @param sent Whether preflight data has been entered by the user.
     * @param prefetch Whether user is prefetching.
     * @param title The title to display in the modal and in the submit button.
     * @param siteId Site ID. If not defined, current site.
     * @return Promise resolved when the preflight data is validated.
     */
    async validatePreflightData(
        quiz: AddonModQuizQuizWSData,
        accessInfo: AddonModQuizGetQuizAccessInformationWSResponse,
        preflightData: Record<string, string>,
        attempt?: AddonModQuizAttempt,
        offline?: boolean,
        prefetch?: boolean,
        siteId?: string,
    ): Promise<AddonModQuizAttempt> {

        const rules = accessInfo.activerulenames;
        const modOptions = {
            cmId: quiz.coursemodule,
            readingStrategy: offline ? CoreSitesReadingStrategy.PREFER_CACHE : CoreSitesReadingStrategy.ONLY_NETWORK,
            siteId,
        };

        try {
            if (attempt) {
                if (attempt.state != AddonModQuizProvider.ATTEMPT_OVERDUE && !attempt.finishedOffline) {
                    // We're continuing an attempt. Call getAttemptData to validate the preflight data.
                    await AddonModQuiz.getAttemptData(attempt.id, attempt.currentpage!, preflightData, modOptions);

                    if (offline) {
                        // Get current page stored in local.
                        const storedAttempt = await CoreUtils.ignoreErrors(
                            AddonModQuizOffline.getAttemptById(attempt.id),
                        );

                        attempt.currentpage = storedAttempt?.currentpage ?? attempt.currentpage;
                    }
                } else {
                    // Attempt is overdue or finished in offline, we can only see the summary.
                    // Call getAttemptSummary to validate the preflight data.
                    await AddonModQuiz.getAttemptSummary(attempt.id, preflightData, modOptions);
                }
            } else {
                // We're starting a new attempt, call startAttempt.
                attempt = await AddonModQuiz.startAttempt(quiz.id, preflightData, false, siteId);
            }

            // Preflight data validated.
            AddonModQuizAccessRuleDelegate.notifyPreflightCheckPassed(
                rules,
                quiz,
                attempt,
                preflightData,
                prefetch,
                siteId,
            );

            return attempt;
        } catch (error) {
            if (CoreUtils.isWebServiceError(error)) {
                // The WebService returned an error, assume the preflight failed.
                AddonModQuizAccessRuleDelegate.notifyPreflightCheckFailed(
                    rules,
                    quiz,
                    attempt,
                    preflightData,
                    prefetch,
                    siteId,
                );
            }

            throw error;
        }
    }

}

export const AddonModQuizHelper = makeSingleton(AddonModQuizHelperProvider);

/**
 * Quiz data with calculated data.
 */
export type AddonModQuizQuizData = AddonModQuizQuizWSData & {
    sumGradesFormatted?: string;
    gradeFormatted?: string;
    showAttemptColumn?: boolean;
    showGradeColumn?: boolean;
    showMarkColumn?: boolean;
    showFeedbackColumn?: boolean;
};

/**
 * Attempt data with calculated data.
 */
export type AddonModQuizAttempt = AddonModQuizAttemptWSData & {
    finishedOffline?: boolean;
    rescaledGrade?: string;
    finished?: boolean;
    readableState?: string[];
    readableMark?: string;
    readableGrade?: string;
    highlightGrade?: boolean;
};


text:
While there are many pre-packaged slider solutions out there, I find that due to the nuiances of display I often like to put together my own.  However, the backend process is almost always the same.  To this end, this plugin creates a CPT called "Sliders".

Each "Slider" can contain multiple slides. By default a slide consists of a single image.

The slider can then be displayed with either the shortcode `[fe_slider id=5]` where `5` is the post id of the slider.

## Templating

This plugin contains a basic template for displaying items, however override templates can be added to the theme.  The shortcode takes an optional second parameter `template`.  This is the template suffix used for the custom template.

```
[fe_slider id=5 template=home]
```

For this shortcode, we'll check for custom templates at:

- `/wp-content/my-theme/fe-cmb2-slider/template-home.php`
- `/wp-content/my-theme/fe-cmb2-slider/template.php`

If neither of these are found, the default template with the plugin will be used.

If the `template` parameter is omitted

```
[fe_slider id=5]
```

We'll check
`/wp-content/my-theme/fe-cmb2-slider/template.php`
for a custom template.

## Building This Project

This project uses [Composer](https://getcomposer.org/) to managed dependencies.  To build the project [install Composer](https://getcomposer.org/doc/00-intro.md#globally) and run the following from the root of the plugin.

```
$ composer install --no-dev -o
```

### What this composer install command does

- reads the `composer.json` file, see [composer install](https://getcomposer.org/doc/03-cli.md#instal://getcomposer.org/doc/03-cli.md#install). Any `require` projects are installed in the folder `/vendor`
- configure the [Composer autoloader](https://getcomposer.org/doc/01-basic-usage.md#autoloading)
- `--no-dev` Skip installing packages listed in require-dev. (currently there are none)
- `-o` Convert PSR-0/4 autoloading to classmap to get a faster autoloader. This is recommended especially for production, but can take a bit of time to run so it is currently not done by default.
- Configure the autoloader to load the file `vendor/johnbillion/extended-cpts/extended-cpts.php`

## Credits

[Sal Ferrarello](https://salferrarello.com/) / [@salcode](https://twitter.com/salcode)


text:
<?php

namespace PayPal\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for EnhancedPaymentDataType StructType
 * Meta information extracted from the WSDL
 * - documentation: AID for Airlines | Enhanced data for different transactions.
 * @subpackage Structs
 * @author WsdlToPhp <contact@wsdltophp.com>
 */
class EnhancedPaymentDataType extends AbstractStructBase
{
    /**
     * The AirlineItinerary
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * - ref: ebl:AirlineItinerary
     * @var \PayPal\StructType\AirlineItineraryType
     */
    public $AirlineItinerary;
    /**
     * Constructor method for EnhancedPaymentDataType
     * @uses EnhancedPaymentDataType::setAirlineItinerary()
     * @param \PayPal\StructType\AirlineItineraryType $airlineItinerary
     */
    public function __construct(\PayPal\StructType\AirlineItineraryType $airlineItinerary = null)
    {
        $this
            ->setAirlineItinerary($airlineItinerary);
    }
    /**
     * Get AirlineItinerary value
     * @return \PayPal\StructType\AirlineItineraryType|null
     */
    public function getAirlineItinerary()
    {
        return $this->AirlineItinerary;
    }
    /**
     * Set AirlineItinerary value
     * @param \PayPal\StructType\AirlineItineraryType $airlineItinerary
     * @return \PayPal\StructType\EnhancedPaymentDataType
     */
    public function setAirlineItinerary(\PayPal\StructType\AirlineItineraryType $airlineItinerary = null)
    {
        $this->AirlineItinerary = $airlineItinerary;
        return $this;
    }
}


text:
//
// MessagePack for C++ static resolution routine
//
// Copyright (C) 2008-2009 FURUHASHI Sadayuki
//
//    Licensed under the Apache License, Version 2.0 (the "License");
//    you may not use this file except in compliance with the License.
//    You may obtain a copy of the License at
//
//        http://www.apache.org/licenses/LICENSE-2.0
//
//    Unless required by applicable law or agreed to in writing, software
//    distributed under the License is distributed on an "AS IS" BASIS,
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//    See the License for the specific language governing permissions and
//    limitations under the License.
//
#ifndef MSGPACK_TYPE_DEQUE_HPP
#define MSGPACK_TYPE_DEQUE_HPP

#include "msgpack/versioning.hpp"
#include "msgpack/object_fwd.hpp"
#include <deque>

namespace msgpack {

MSGPACK_API_VERSION_NAMESPACE(v1) {

template <typename T>
inline object const& operator>> (object const& o, std::deque<T>& v)
{
    if(o.type != type::ARRAY) { throw type_error(); }
    v.resize(o.via.array.size);
    object* p = o.via.array.ptr;
    object* const pend = o.via.array.ptr + o.via.array.size;
    typename std::deque<T>::iterator it = v.begin();
    for(; p < pend; ++p, ++it) {
        p->convert(*it);
    }
    return o;
}

template <typename Stream, typename T>
inline packer<Stream>& operator<< (packer<Stream>& o, const std::deque<T>& v)
{
    o.pack_array(v.size());
    for(typename std::deque<T>::const_iterator it(v.begin()), it_end(v.end());
            it != it_end; ++it) {
        o.pack(*it);
    }
    return o;
}

template <typename T>
inline void operator<< (object::with_zone& o, const std::deque<T>& v)
{
    o.type = type::ARRAY;
    if(v.empty()) {
        o.via.array.ptr = nullptr;
        o.via.array.size = 0;
    } else {
        object* p = static_cast<object*>(o.zone.allocate_align(sizeof(object)*v.size()));
        object* const pend = p + v.size();
        o.via.array.ptr = p;
        o.via.array.size = v.size();
        typename std::deque<T>::const_iterator it(v.begin());
        do {
            *p = object(*it, o.zone);
            ++p;
            ++it;
        } while(p < pend);
    }
}

}  // MSGPACK_API_VERSION_NAMESPACE(v1)

}  // namespace msgpack

#endif /* msgpack/type/deque.hpp */


text:
{% load static %}

# Where Do I Vote - User Feedback June 2017

## Introduction

On 29th May 2017, we introduced a feedback form asking a Yes/No question: "Did you find this useful?" and a follow up text question "Can you tell us anything more?". We only showed the feedback form in situations where we could provide the user with some data. We have implicitly assumed that in cases where we showed the "We don't have data for your area" page and provided contact details for the user's council, this was not helpful and didn't ask for feedback. The way to fix/improve that is to have greater coverage. We also only showed users a feedback form on our own website - it wasn't shown to embedded users and we don't have any data about users consuming our data on third party websites via the API.

From introducing the form until close of polls on 8th June, we served 480,000 unique users on the site and collected 18,394 responses from them. Of the 18,394 responses:

Found useful
Number
Percent

Yes
17,197
93.49%

No
1,197
6.51%

18,394

It is important to understand what people liked and found useful so we can keep doing it, and also why people found it unhelpful and what we can do to improve. To drill down into this, we will examine some text comments in greater detail.

## What are we doing well?

We received hundreds of short generally positive comments

> Excellent, couldn't want more

> Amazing

> Use of technology at its best

> Helpful and straightforward

> Brilliant service

These are lovely and it is nice to get so many of them, but they're not directly actionable.

Many people found the site easy to use and left positive comments about the design/presentation/UX:

> Super-easy to use, it took me less than 20 seconds to find out where I should vote.

> Amazing accessible website that encourages people to vote by its sheer simplicity

> very easy and accessible :)

> Very easy to use and understand.

> Very clear and well designed website.

> Nice ux, page load time was good on mobile and very informative

> This is a really clear and well set out website. Easy to navigate and all the information one might need is here. I think it deserves an HCI (Human Computer Interface) award. Well done! JMB

> Just very efficient

> Good UX, clear design

Another thing that a lot of people picked out to comment on was the focussed nature of the site. Where Do I Vote is a site that sets out to answer a single question and these comments seem to validate that it is useful to keep the scope of the site narrow in this respect:

> Easy to use and all the info I wanted on one page!

> Simple question, straight answer.

> Does what it's meant to with no clutter

> Nice clean design that does one thing well

> All the information clearly on one page thank you!

> This was a very quick and precise answer to my question. Well Done!

## What should we improve?

### Information Hierarchy

#### Opening Hours

By far the most common request was that people wanted to know the opening hours:

> Would be good to include when it shuts.

> Could be better if you have opening times too

> Opening times would also be useful

> you should inform us about the opening times

> does not give time of closing

> It should tell the time that the station opens and closes.

Over 50 people left a comment relating to this. We do actually show this information and a few people commented that it should be more obvious:

> Would've helped to have the opening hours repeated above the address: "Open from 7am to 10pm"

> Would like opening times to be more prominent.

Also a few people left positive comments that they found the opening times useful:

> All I really wanted to know was the time polling opened but there is it on the right hand side. Thank you. Directions are perfect too. This is an excellent little tool. Well done.

> I actually wanted to check when the polls are open until, but that was clearly stated on the right (and of course I guess the opening times are the same for everyone). So thank you!

> just had a mare and realised the times are on here aha x

> VERY USEFUL INFORMATION GIVEN RE TIMES AND ID

While the opening hours are at the top of the page in desktop layout, on mobile devices, that information 'collapses' and is displayed lower down the page.

Screenshot of [wheredoivote.co.uk](https://wheredoivote.co.uk/) in a desktop browser

Screenshot of [wheredoivote.co.uk](https://wheredoivote.co.uk/) in a mobile browser

The vast majority of users on Where Do I Vote were using mobile devices (74% over the study period, rising to 79% on polling day itself). Note that 2 of the people who did find the opening hours useful reference this info being "on the right" (i.e: they were using the desktop layout).

Key points for improvement here are:

* Make the opening times really obvious - this is an important piece of information and people expect it to be prominently displayed.
* Any future design work on Where Do I Vote must adopt a mobile-first approach (rather than a desktop-optimised site that "collapses" on mobile) assuming that the majority of our user base will be using mobile devices.

#### Information on candidates

A similar issue is that we would have also collapsed the 'Information on your candidates' panel on mobile. This would have been even less obvious than the opening times, but only 3 people suggested we add this:

> It would have been nice if you listed all the candidates that I could vote for

> Who are the candidates in this area

> List of candidates and the party they represent please

Again, it is worth making this information more prominent but it should clearly be much lower down in the information hierarchy than opening hours based on these comments.

#### Voting at your assigned station

A number of people submitted comments which indicate that they didn't understand you have to vote at your assigned station based on your registered address:

> Any other options instead of just the one station

> Have to search by full postcode not just 1st 3 digits - I want to see ones near work not home

> More locations to be shown on map

> I want a polling station between station road Cwmbran and Avondale road but don't know relevant postcodes

> There is another polling station closer to me but I was told I couldn't vote there.

> I live nearer to David Livingstone school which is being used as a polling station, why can't I vote there?

> Do I have to vote only from one polling station?

We currently don't explain this anywhere, but we should add some copy to the site to make this point more obvious.

### Mapping and Directions

We received a lot of feedback about mapping and directions. For a website which is trying to answer the question "where…" this is clearly going to be an important topic.

Feedback on mapping and directions was mixed. Many people who were shown map/directions found it helpful. We received a lot of positive comments about the use of map and directions:

> Love the time and distance calculations :)

> Very clear directions, well done!!!

> I think the map feature is brilliant. Such an easy tool to use.

> It is a quick and easy way to locate where your polling station is. The map is very clear and particularly useful

> Thank you for the help and the map. SO GOOD!!

> Map quality very good and adding the directions was most helpful.

> Good to encourage walking and cycling

> really useful, and the map is great :)

Additionally, in situations where we were unable to show a map, directions or distance (sometimes we aren't provided with a point and aren't able to geocode it), people commonly requested this info:

> no map

> Ideally google map

> useful but I also needed a map

> Maybe a map? But still good!

> Would be good if it automatically came up with walking time

> A map would help to locate this

> No directions, parking information, distance...

A common reason for people to leave negative feedback about mapping/directions was that the directions lines didn't follow the roads exactly (particularly if the roads are curved). In these examples, the maps the comments relate to are shown with the comments to provide context.

> This "suggested" route is awful, am I expected to fly or crawl over gardens to get there?

> The line doesn't match up with the roads - it's just a straight line between points on the journey. It's better than just a blank map with two points on, but a bit frustrating as it doesn't actually show a route

> There is something wrong with your maps. The route to the polling station means going through the gardens of several neighbours -- I'm not sure that would be appreciated…

> Walking direction is wrong! (You are walking through houses!)

In general, providing directions is useful more frequently than it is not useful but we need to take a more sophisticated approach to the way we represent directions to ensure that the directions provided are of a high quality. We have also run into usage limits with the google directions API which prevented us from being able to serve directions to some users. We should evaluate alternative providers to see if we can find a better solution. It is clear that this is a valuable feature for users.

Another of the most common reasons for people to leave negative feedback about mapping was because the polling station was correct and we were showing a polling station point based on a (correct) postcode centroid but that point we were showing was down the road or round the corner from the actual polling station building.

> It helped me confirm where I need to go but the map is slightly incorrect as the entrance to the school is on Regent Road.

> Polling station isn't quite in the right place. It's actually in the church 100m east of the marked location.

> The pointer is a little misleading. Our polling office is at Mountpleasant Primary School. People would probably find it the end if they didn't know where it was but may have to walk up and down the entire street to spot it.

> Wrong end of the street!

> when you put your postcode in its telling me my polling station is in someone's house? the polling station is a further 150 yards up the road

> The location of the station is wrong. It is about a two minute walk north of there, along Pinner Hill Road, opposite Latimer Gardens. What a terrible piece of information, given the magnitude of the election.

> The polling station is NOT in Gloucester Rd but on Brynland Avenue. This is a significant error and may have put people off.

> Highly inaccurate! This map shows the Polling Station to be at Skipton Auction Market not the swimming pool. It's a good job that I already know where to go as this load of rubbish would have sent me on a wild goose chase.

This was quite a common cause of negative comments and we did update the site with more accurate grid references throughout the day in many cases where we received complaints. People clearly want maps when we don't provide them but also expect a higher level of accuracy than we can sometimes realistically achieve with the supplied data. There is scope to deliver additional value here by exploring whether we can crowdsource more accurate points in cases where we do not have exact grid references or UPRNs.

Key themes for map and directions are:

* Users want maps and directions and find these useful when provided. If they aren't provided, we receive negative feedback
* Users expect the map and directions to be precise and of a high quality - if this isn't the case (for whatever reason), people leave negative comments

For a product which answers the question "where…" this is not surprising. We should look to make improvements in this area:

* Investigate how we can represent curved routes in a more sophisticated way. If we are unable to arrive at a better solution, add some text to acknowledge the issue and manage user expectations e.g: "Approximate route (click for more accurate directions from Google)"
* Investigate other solutions for a directions API - can we find an alternative to google directions which does not have the same usage restrictions?
* Aim to develop tools allowing us to crowdsource more accurate station points where we do not have exact grid references or UPRNs. Is there scope for us to work with or learn from existing online mapping volunteers (e.g. the OpenStreetMap community) on this?

### Bug Reports

Another strong theme of negative comments was people using the form to report problems or incorrect information. This is the worst and most worrying class of negative comment.

> That's wrong - I got there and the building is closed, no signage re it being a polling station. Correct place seems to be Bute Town Community Centre, about a mile away. Now run out of time to vote before work.

> The map sends you to West Bletchley, 30min walk away. Chepstow Community Centre is less than 5 mins walk away.

> The pin on the map doesn't match the address.

> Wrong polling station

> Our voting station was changed due to the hall not being available. You are feeding the wrong information to people.

> the map location shown was incorrect, by quite a long way. SM5 4NP is not on Wrythe Lane as shown but on Nightingale Road, the other side of both Carshalton and Carshalton Beeches stations.

> This is not where I have to vote. I went and they said nope not here

> No community hall at this address. Unable to vote because of this

It is difficult to generalise about these comments because each comment addresses a very specific problem and required its own individual follow-up and solution. Given the volume of data we are dealing with (and the speed with which we have to collate it) it is unrealistic to achieve a 0% error rate but we do need robust procedures to prevent and follow up errors. It is more useful to talk about improvements we can make to reduce errors and improve the process of following up on them rather than address the specific nature of individual reported problems here.

* As noted, we received a large number of error reports through the medium of people leaving negative feedback. One fairly time-consuming part of the process was sorting through a large volume of text comments to find bug reports. We should add a dedicated "report a problem" button to reduce that triage overhead. This form should also request an email address for follow-up.
* Although with 2 people working on it all day we were able to deal with a lot of problems, there was more than 2 people's worth of work to do. For the council election next year, 2 may be sufficient. For the next General Election we should try to allocate additional capacity to this task. Given this is a time-bound and well-defined task, we may be able to find a volunteer to help with this.
* We need to put more effort into making sure we have direct contacts at councils on polling day so we can follow up problems more easily. In particular, there are a number of authorities where we use published data but have no contacts and this was a problem.
* Although our data checking processes are fairly robust, there is scope to reduce our error rate by implementing more automated checks on the data at import time.

## Why do people use Where Do I Vote?

One of the most common reasons people stated for finding the site helpful was that they had lost their polling card or hadn't received one:

> I wasn't sent a poll card

> I didn't receive a polling card, so this was invaluable.

> Great for people without polling card

> Great tool to use for those who are hopeless with bits of paper through their door

> I misplaced my poll card so this was extremely useful.

> Haven't received my polling card from council. Useful resource.

Another common reason people gave for finding the site useful was that they had recently moved or were new to the area:

> Couldn't be clearer! Very helpful for a first-time voter in this constituency (have just moved here).

> Just moved here, didn't know

> New to the area. Wasn't sure where it was

> new to area ... 1st time voting here ... so thanks.

> I'm new to the area so this feature is heavily useful, it's also about 5 minutes walk away which is fantastic!

.. or both:

> I recently moved house and didn't get a polling card hence i had to search

> Great tool. New to the area and lost my polling card so didn't know where to go.

> Thanks, I lost my poll card and couldn't remember the address as I only moved last year.

A number of people without polling cards also left comments saying that they had found the additional info (e.g: that they didn't need their polling card) helpful:

> Gave me the information I needed right away with a map. And also had helpful related info on the site, including answering a question I had because my polling card hasn't arrived yet.

> Very simple to use and the extra information about whether one needs ID or polling card is helpful.

> quick and easy, straight from google and confirmed that I didn't need the poll card. Thank you.

> I didn't know you don't need your polling card to vote!

> Did not receive polling cards - so needed to check where to vote and if you needed the card

> I was worried I won't be able to vote without a poll card. But it's good to know that I don't need it to register my vote!

There was also evidence that the site was useful for people who had never voted before:

> Helpful for young, first-time voter

> MY FIRST VOTE TO MAKE A BETTER COUNTRY FOR MY CHILDREN TO LIVE

> Thank you, this site is so helpful and clear, it so easy and informative especially for a first timer!

> it is the first time I will be voting and I was lost how to do it but now I know thanks to you

Another theme from the comments was that some people had come to the site after trying to find this info from other places (e.g: their local council website):

> lovely quick and easy better than local council one!

> no other site provided this info for Potton! so thank you!

> I don't understand how all the other websites were difficult to navigate to get this info, but thank you for making this simple here.

> Quick easier service than phoning the council. Would been nicer to be aware of this before. moving with the times. Things like this need to be the first thing to go to rather than call in.

> My local council does not recognize my postcode. This has saved my vote!!!

> Better than the council info

> Bristol council site not working

Additionally, we can infer that the user interaction with Where Do I Vote is a very quick immediate interaction:

* The information most important to users relates to the practicalities of voting (e.g: opening hours, do I need my poll card). A much smaller number of people commented that they want information on their candidates (which would imply more considered research is taking place).
* The majority of our users were using mobile devices (74% over the study period, rising to 79% on polling day itself). Many people may be using the site while 'on the move'.
* Where Do I Vote gets the vast majority of all traffic on polling day and the night before.
* The average session duration is just 53 seconds.

Comments like

> just had a mare and realised the times are on here aha x

> Having walked to the place where I have previously voted - only to find it shut - I felt somewhat at a loss as to where to go. Until I accessed this site.

indicate that some users turn to the site in a moment of panic, while comments like

> Simple question, straight answer.

> This was a very quick and precise answer to my question. Well Done!

underline that users expect their interaction with the site to be rapid and focussed.

## ...and finally

In reading through the feedback comments, there were a few nice 'human interest' type stories which are nice to end with:

> Trying to blag a mate into voting, bribing him and all kinds. He had no idea his was just 0.2 mile away. Thanks for this site :)

> Wouldn't of been able to vote otherwise thankyou! Xxx

> I suffer from Vascular Dementia and lost my polling card although I am registered I have forgotten the details. This information has been invaluable. Thank-you so much.

> Having walked to the place where I have previously voted - only to find it shut - I felt somewhat at a loss as to where to go. Until I accessed this site.

> Very clear, simple, comprehensive. It's a wonderful voting tool and it definitely influenced positively my decision to vote. Thank you for providing such informative and easy-to-follow pre-voting platform.


text:
using System.Runtime.InteropServices;

namespace PreviewIo.ComInterop
{
	[ComImport]
	[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
	[Guid("b7d14566-0509-4cce-a71f-0a554233bd9b")]
	interface IInitializeWithFile
	{
		void Initialize([MarshalAs(UnmanagedType.LPWStr)] string pszFilePath, uint grfMode);
	}
}