text:
package testdomain;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class Account implements Serializable {

  private static final long serialVersionUID = 1L;
  private int id;
  private String firstName;
  private String lastName;
  private String emailAddress;
  private int[] ids;
  private int age;
  private Date dateAdded;
  private Account account;
  private List<Account> accountList;
  private boolean bannerOption;
  private boolean cartOption;

  public Account() {
  }

  public Account(int id) {
    this.id = id;
  }

  public int getId() {
    return id;
  }

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

  public int[] getIds() {
    return ids;
  }

  public void setIds(int[] ids) {
    this.ids = ids;
  }

  /**
   * @return Returns the age.
   */
  public int getAge() {
    return age;
  }

  /**
   * @param age
   *          The age to set.
   */
  public void setAge(int age) {
    this.age = age;
  }

  /**
   * @return Returns the dateAdded.
   */
  public Date getDateAdded() {
    return dateAdded;
  }

  /**
   * @param dateAdded
   *          The dateAdded to set.
   */
  public void setDateAdded(Date dateAdded) {
    this.dateAdded = dateAdded;
  }

  public String getFirstName() {
    return firstName;
  }

  public void setFirstName(String firstName) {
    this.firstName = firstName;
  }

  public String getLastName() {
    return lastName;
  }

  public void setLastName(String lastName) {
    this.lastName = lastName;
  }

  public String getEmailAddress() {
    return emailAddress;
  }

  public void setEmailAddress(String emailAddress) {
    this.emailAddress = emailAddress;
  }

  public Account getAccount() {
    return account;
  }

  public void setAccount(Account account) {
    this.account = account;
  }

  public List<Account> getAccountList() {
    return accountList;
  }

  public void setAccountList(List<Account> accountList) {
    this.accountList = accountList;
  }

  public boolean isBannerOption() {
    return bannerOption;
  }

  public void setBannerOption(boolean bannerOption) {
    this.bannerOption = bannerOption;
  }

  public boolean isCartOption() {
    return cartOption;
  }

  public void setCartOption(boolean cartOption) {
    this.cartOption = cartOption;
  }
}


text: from .pool import ConnectionPool, EmptyPool

redpajama_set_name: RedPajamaGithub


text:
BUILD=build
MOD_ROOT=..
CSV_PATH=backend/third_party_licenses

# Whenever build command for any of the binaries change, we should update them both here and in backend/Dockerfiles.

.PHONY: all
all: license_apiserver license_persistence_agent license_cache_server license_swf license_viewer

.PHONY: clean
clean:
	rm -rf $(BUILD)

$(BUILD)/apiserver:
	GO111MODULE=on go build -o $(BUILD)/apiserver github.com/kubeflow/pipelines/backend/src/apiserver
$(BUILD)/persistence_agent:
	GO111MODULE=on go build -o $(BUILD)/persistence_agent github.com/kubeflow/pipelines/backend/src/agent/persistence
$(BUILD)/cache_server:
	GO111MODULE=on go build -o $(BUILD)/cache_server github.com/kubeflow/pipelines/backend/src/cache
$(BUILD)/swf:
	GO111MODULE=on go build -o $(BUILD)/swf github.com/kubeflow/pipelines/backend/src/crd/controller/scheduledworkflow
$(BUILD)/viewer:
	GO111MODULE=on go build -o $(BUILD)/viewer github.com/kubeflow/pipelines/backend/src/crd/controller/viewer

# Update licenses info after dependencies changed.
# See README.md#updating-licenses-info section for more details.
.PHONY: license_apiserver
license_apiserver: $(BUILD)/apiserver
	cd $(MOD_ROOT) && go-licenses csv ./backend/src/apiserver > $(CSV_PATH)/apiserver.csv
.PHONY: license_persistence_agent
license_persistence_agent: $(BUILD)/persistence_agent
	cd $(MOD_ROOT) && go-licenses csv ./backend/src/agent/persistence > $(CSV_PATH)/persistence_agent.csv
.PHONY: license_cache_server
license_cache_server: $(BUILD)/cache_server
	cd $(MOD_ROOT) && go-licenses csv ./backend/src/cache > $(CSV_PATH)/cache_server.csv
.PHONY: license_swf
license_swf: $(BUILD)/swf
	cd $(MOD_ROOT) && go-licenses csv ./backend/src/crd/controller/scheduledworkflow > $(CSV_PATH)/swf.csv
.PHONY: license_viewer
license_viewer: $(BUILD)/viewer
	cd $(MOD_ROOT) && go-licenses csv ./backend/src/crd/controller/viewer > $(CSV_PATH)/viewer.csv

.PHONY: image_all
image_all: image_apiserver image_persistence_agent image_cache image_swf image_viewer image_visualization

.PHONY: image_apiserver
image_apiserver:
	cd $(MOD_ROOT) && docker build -t apiserver -f backend/Dockerfile .
.PHONY: image_persistence_agent
image_persistence_agent:
	cd $(MOD_ROOT) && docker build -t persistence-agent -f backend/Dockerfile.persistenceagent .
.PHONY: image_cache
image_cache:
	cd $(MOD_ROOT) && docker build -t cache-server -f backend/Dockerfile.cacheserver .
.PHONY: image_swf
image_swf:
	cd $(MOD_ROOT) && docker build -t scheduledworkflow -f backend/Dockerfile.scheduledworkflow .
.PHONY: image_viewer
image_viewer:
	cd $(MOD_ROOT) && docker build -t viewercontroller -f backend/Dockerfile.viewercontroller .
.PHONY: image_visualization
image_visualization:
	cd $(MOD_ROOT) && docker build -t visualization -f backend/Dockerfile.visualization .


text:
function FileData_Pairs(x)
{
x.t("searching","camod");
x.t("pre-clinical/clinical","trials");
x.t("trials","drug");
x.t("trials","results");
x.t("camod","search");
x.t("camod","database");
x.t("table","displays");
x.t("description","camod");
x.t("drug","screening");
x.t("drug","descriptor");
x.t("displays","model");
x.t("details","searching");
x.t("details","pre-clinical");
x.t("descriptors","models");
x.t("link","complete");
x.t("complete","model");
x.t("results","pre-clinical/clinical");
x.t("results","table");
x.t("results","description");
x.t("results","details");
x.t("results","pre-clinical");
x.t("results","information");
x.t("pre-clinical","trials");
x.t("search","drug");
x.t("search","results");
x.t("starting","model");
x.t("characteristics","page");
x.t("hypertext","link");
x.t("database","drug");
x.t("specific","drug");
x.t("models","tested");
x.t("tested","specific");
x.t("page","results");
x.t("information","starting");
x.t("model","descriptors");
x.t("model","characteristics");
x.t("model","information");
x.t("screening","results");
x.t("screening","search");
x.t("descriptor","hypertext");
}


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using Microsoft.Azure.Management.Compute;
using Microsoft.Rest.ClientRuntime.Azure.TestFramework;
using System.Linq;
using System.Net;
using Xunit;

namespace Compute.Tests
{
    public class ExtImgTests
    {
        // ##############
        //  SETUP
        // ##############
        // 0- For recording data froim local host, change RunMe.cmd as follows:
        // :Record
        // set TEST_CONNECTION_STRING=ManagementCertificate=76ddb456d73ae935a3aef20d6a1db0eb14bc6daf;SubscriptionId=84fffc2f-5d77-449a-bc7f-58c363f2a6b9;BaseUri=http://localhost:449

        // Note: Make sure whatever cert thumprint you used above is installed in you Cert *User* Store

        // 1- Create a publisher
        //
        // PUT http://localhost:449/Providers/Microsoft.Compute/Publishers/Microsoft.Windows
        // {
        //  "Properties": {
        //    "State": "Registered",
        //    "Type": "All",
        //    "IsHidden": false
        //  },
        //  "Name": "Microsoft.Windows"
        // }

        // 2- Put a VM Image Extension
        //PUT http://localhost:449/providers/Microsoft.Compute/locations/westus/publishers/Microsoft.Windows/artifacttypes/vmextension/types/vmaccess/versions/1.1.0?api-version=2014-12-01-preview HTTP/1.1
        //{
        // "name": "2.0",
        //  "location": "westus",

        //  "properties": {
        //    "publishLocations": [
        //      "all"
        //    ],
        //    "allowDeploymentTo": {
        //      "group": "MSDN"
        //    },
        //    "sourcePackageUri": "http://fake.com",
        //    "attributes":
        //     {
        //         "operatingSystem":"Windows",
        //         "computeRole":"PaaS",
        //         "handlerSchema":"",
        //         "vmScaleSetEnabled":"",
        //         "supportMultipleExtensions":""
        //     }
        //  }
        //}

        private class VirtualMachineExtensionImageGetParameters
        {
            public string Location = "westus";
            public string PublisherName = "Microsoft.Compute";
            public string Type = "VMAccessAgent";
            public string FilterExpression = "";
        }

        private static readonly VirtualMachineExtensionImageGetParameters parameters =
            new VirtualMachineExtensionImageGetParameters();

        [Fact]
        public void TestExtImgGet()
        {
            using (MockContext context = MockContext.Start(this.GetType().FullName))
            {
                ComputeManagementClient _pirClient =
                    ComputeManagementTestUtilities.GetComputeManagementClient(context,
                        new RecordedDelegatingHandler {StatusCodeToReturn = HttpStatusCode.OK});

                var vmimageext = _pirClient.VirtualMachineExtensionImages.Get(
                    parameters.Location,
                    parameters.PublisherName,
                    parameters.Type,
                    "2.0");

                Assert.True(vmimageext.Name == "2.0");
                Assert.True(vmimageext.Location == "westus");

                Assert.True(vmimageext.OperatingSystem == "Windows");
                Assert.True(vmimageext.ComputeRole == "IaaS");
                Assert.True(vmimageext.HandlerSchema == null);
                Assert.True(vmimageext.VmScaleSetEnabled == false);
                Assert.True(vmimageext.SupportsMultipleExtensions == false);
            }
        }

        [Fact]
        public void TestExtImgListTypes()
        {
            using (MockContext context = MockContext.Start(this.GetType().FullName))
            {
                ComputeManagementClient _pirClient =
                    ComputeManagementTestUtilities.GetComputeManagementClient(context,
                        new RecordedDelegatingHandler {StatusCodeToReturn = HttpStatusCode.OK});

                var vmextimg = _pirClient.VirtualMachineExtensionImages.ListTypes(
                    parameters.Location,
                    parameters.PublisherName);

                Assert.True(vmextimg.Count > 0);
                Assert.True(vmextimg.Count(vmi => vmi.Name == "VMAccessAgent") != 0);
            }
        }

        [Fact]
        public void TestExtImgListVersionsNoFilter()
        {
            using (MockContext context = MockContext.Start(this.GetType().FullName))
            {
                ComputeManagementClient _pirClient =
                    ComputeManagementTestUtilities.GetComputeManagementClient(context,
                        new RecordedDelegatingHandler {StatusCodeToReturn = HttpStatusCode.OK});

                var vmextimg = _pirClient.VirtualMachineExtensionImages.ListVersions(
                    parameters.Location,
                    parameters.PublisherName,
                    parameters.Type);

                Assert.True(vmextimg.Count > 0);
                Assert.True(vmextimg.Count(vmi => vmi.Name == "2.0") != 0);
            }
        }

        [Fact]
        public void TestExtImgListVersionsFilters()
        {
            using (MockContext context = MockContext.Start(this.GetType().FullName))
            {
                ComputeManagementClient _pirClient =
                    ComputeManagementTestUtilities.GetComputeManagementClient(context,
                        new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK });

                // Filter: startswith - Positive Test
                parameters.FilterExpression = null;
                var extImages = _pirClient.VirtualMachineExtensionImages.ListVersions(
                    parameters.Location,
                    parameters.PublisherName,
                    parameters.Type);
                Assert.True(extImages.Count > 0);

                string ver = extImages.First().Name;
                var query = new Microsoft.Rest.Azure.OData.ODataQuery<Microsoft.Azure.Management.Compute.Models.VirtualMachineExtensionImage>();

                query.SetFilter(f => f.Name.StartsWith(ver));
                parameters.FilterExpression = "$filter=startswith(name,'" + ver + "')";
                var vmextimg = _pirClient.VirtualMachineExtensionImages.ListVersions(
                    parameters.Location,
                    parameters.PublisherName,
                    parameters.Type,
                    query);
                Assert.True(vmextimg.Count > 0);
                Assert.True(vmextimg.Count(vmi => vmi.Name == "2.0") != 0);

                // Filter: startswith - Negative Test
                query.SetFilter(f => f.Name.StartsWith("1.0"));
                parameters.FilterExpression = "$filter=startswith(name,'1.0')";
                vmextimg = _pirClient.VirtualMachineExtensionImages.ListVersions(
                    parameters.Location,
                    parameters.PublisherName,
                    parameters.Type,
                    query);
                Assert.True(vmextimg.Count == 0);
                Assert.True(vmextimg.Count(vmi => vmi.Name == "2.0") == 0);

                // Filter: top - Positive Test
                query.Filter = null;
                query.Top =1;
                parameters.FilterExpression = "$top=1";
                vmextimg = _pirClient.VirtualMachineExtensionImages.ListVersions(
                    parameters.Location,
                    parameters.PublisherName,
                    parameters.Type,
                    query);
                Assert.True(vmextimg.Count == 1);
                Assert.True(vmextimg.Count(vmi => vmi.Name == "2.0") != 0);

                // Filter: top - Negative Test
                query.Top = 0;
                parameters.FilterExpression = "$top=0";
                vmextimg = _pirClient.VirtualMachineExtensionImages.ListVersions(
                    parameters.Location,
                    parameters.PublisherName,
                    parameters.Type,
                    query);
                Assert.True(vmextimg.Count == 0);
            }
        }
    }
}


text:
interface LinkedList<T> {
    readonly count: number,
    readonly first: LinkedList.Node<T> | null,
    readonly last: LinkedList.Node<T> | null,
    addFirst(value: T): LinkedList.Node<T>,
    addLast(value: T): LinkedList.Node<T>,
    remove(node: LinkedList.Node<T>): void,
    removeFirst(): T | undefined,
    removeLast(): T | undefined,
    find(value: T): LinkedList.Node<T> | undefined
}

function LinkedList<T>(): LinkedList<T> {
    return new LinkedListImpl();
}

namespace LinkedList {
    export interface Node<T> {
        previous: Node<T> | null,
        next: Node<T> | null,
        inList: boolean,
        value: T
    }
}

function createListNode<T>(value: T): LinkedList.Node<T> {
    return { previous: null, next: null, inList: true, value };
}

class LinkedListImpl<T> implements LinkedList<T> {
    count: number = 0;
    first: LinkedList.Node<T> | null = null;
    last: LinkedList.Node<T> | null = null;

    addFirst(value: T) {
        const node = createListNode(value);
        node.inList = true;
        if (this.first) this.first.previous = node;
        node.next = this.first;
        this.first = node;
        this.count++;
        if (!this.last) this.last = node;
        return node;
    }

    addLast(value: T) {
        const node = createListNode(value);
        if (this.last !== null) {
            this.last.next = node;
        }
        node.previous = this.last;
        this.last = node;
        if (this.first === null) {
            this.first = node;
        }
        node.inList = true;
        this.count++;
        return node;
    }

    removeFirst(): T | undefined {
        const fst = this.first;
        if (fst) {
            this.remove(fst);
            return fst.value;
        }
        return void 0;
    }

    removeLast(): T | undefined {
        const last = this.last;
        if (last) {
            this.remove(last);
            return last.value;
        }
        return void 0;
    }

    remove(node: LinkedList.Node<T>) {
        if (!node.inList) return;

        node.inList = false;

        if (node.previous !== null) {
            node.previous.next = node.next;
        } else if (/* first == item*/ node.previous === null) {
            this.first = node.next;
        }

        if (node.next !== null) {
            node.next.previous = node.previous;
        } else if (/* last == item*/ node.next === null) {
            this.last = node.previous;
        }

        node.next = null;
        node.previous = null;
        this.count--;
    }

    find(value: T): LinkedList.Node<T> | undefined {
        let current = this.first;
        while (current !== null) {
            if (current.value === value) return current;
            current = current.next;
        }
        return void 0;
    }
}

export { LinkedList };


text:
<?php
namespace RockSymphony\ServiceContainer\Tests;

use PHPUnit\Framework\TestCase;
use RockSymphony\ServiceContainer\ServiceContainer;
use RockSymphony\ServiceContainer\ServiceContainerLayer;
use RockSymphony\ServiceContainer\Tests\Support\DummyFilesystem;
use RockSymphony\ServiceContainer\Tests\Support\DummyFilesystemDecorator;

class LayerTest extends TestCase
{
    /**
     * @test
     */
    public function it_should_inherit_parent_layer_services()
    {
        $parent = new ServiceContainer();
        $parent->set('test_instance', $this);

        $layer = new ServiceContainerLayer($parent);

        $this->assertTrue($layer->has('test_instance'));
        $this->assertSame($this, $layer->get('test_instance'));
    }

    /**
     * @test
     */
    public function it_should_inherit_parent_layer_service_resolvers()
    {
        $parent = new ServiceContainer();
        $parent->bindResolver('test_resolver', function () {
            return $this;
        });

        $layer = new ServiceContainerLayer($parent);

        $this->assertTrue($layer->has('test_resolver'));
        $this->assertSame($this, $layer->get('test_resolver'));
    }

    /**
     * @test
     */
    public function it_should_define_new_services_on_the_lower_layer_only()
    {
        $parent = new ServiceContainer();
        $parent->set('test_instance', $this);

        $layer = new ServiceContainerLayer($parent);

        $this->assertTrue($layer->has('test_instance'));

        $test_override = new \stdClass();

        $layer->set('test_instance', $test_override);

        // "test_instance" is overriden
        $this->assertTrue($layer->has('test_instance'));
        $this->assertSame($test_override, $layer->get('test_instance'));

        // parent "test_instance" is not changed
        $this->assertTrue($parent->has('test_instance'));
        $this->assertSame($this, $parent->get('test_instance'));
    }

    /**
     * @test
     */
    public function it_should_define_new_service_resolvers_on_the_lower_layer()
    {
        $parent = new ServiceContainer();
        $parent->bindResolver('test_resolver', function () {
            return $this;
        });

        $layer = new ServiceContainerLayer($parent);

        $this->assertTrue($layer->has('test_resolver'));

        $test_override = new \stdClass();

        $layer->bindResolver('test_resolver', function () use ($test_override) {
            return $test_override;
        });

        // "test_instance" is overriden
        $this->assertTrue($layer->has('test_resolver'));
        $this->assertSame($test_override, $layer->get('test_resolver'));

        // parent "test_instance" is not changed
        $this->assertTrue($parent->has('test_resolver'));
        $this->assertSame($this, $parent->get('test_resolver'));
    }

    /**
     * @test
     */
    public function it_should_resolve_services_recursively_inheriting_definitions()
    {
        $local_filesystem = new DummyFilesystem('/', 'local');

        $parent = new ServiceContainer();
        $parent->bindResolver(DummyFilesystem::CLASS_NAME, function () use ($local_filesystem) {
            return $local_filesystem;
        });

        $layer = new ServiceContainerLayer($parent);

        // 1) resolve Decorator using parent service container
        /** @var DummyFilesystemDecorator $decorated_filesystem */
        $decorated_filesystem = $parent->resolve(DummyFilesystemDecorator::CLASS_NAME);
        $this->assertSame($local_filesystem, $decorated_filesystem->filesystem);

        // 2) resolve Decorator using lower layer service container
        /** @var DummyFilesystemDecorator $layer_decorated_filesystem */
        $layer_decorated_filesystem = $layer->resolve(DummyFilesystemDecorator::CLASS_NAME);
        $this->assertNotSame($decorated_filesystem, $layer_decorated_filesystem);
        $this->assertSame($local_filesystem, $layer_decorated_filesystem->filesystem);
    }

    /**
     * @test
     */
    public function it_should_resolve_services_recursively_preferring_lower_level()
    {
        $local_filesystem = new DummyFilesystem('/', 'local');
        $ssh_filesystem = new DummyFilesystem('/mnt/ssh', 'ssh');

        $parent = new ServiceContainer();
        $parent->bindResolver(DummyFilesystem::CLASS_NAME, function () use ($local_filesystem) {
            return $local_filesystem;
        });

        $layer = new ServiceContainerLayer($parent);
        $layer->bindResolver(DummyFilesystem::CLASS_NAME, function () use ($ssh_filesystem) {
            return $ssh_filesystem;
        });

        // 1) resolve Decorator using parent service container
        /** @var DummyFilesystemDecorator $decorated_filesystem */
        $decorated_filesystem = $parent->resolve(DummyFilesystemDecorator::CLASS_NAME);
        $this->assertSame($local_filesystem, $decorated_filesystem->filesystem);

        // 2) resolve Decorator using lower layer service container
        /** @var DummyFilesystemDecorator $layer_decorated_filesystem */
        $layer_decorated_filesystem = $layer->resolve(DummyFilesystemDecorator::CLASS_NAME);
        $this->assertNotSame($decorated_filesystem, $layer_decorated_filesystem);
        $this->assertSame($ssh_filesystem, $layer_decorated_filesystem->filesystem);
    }

    /**
     * @test
     */
    public function it_should_resolve_inherited_services_recursively_using_inherited_definitions_only()
    {
        $local_filesystem = new DummyFilesystem('/', 'local');
        $ssh_filesystem = new DummyFilesystem('/mnt/ssh', 'ssh');

        $parent = new ServiceContainer();
        $parent->bindResolver(DummyFilesystem::CLASS_NAME, function () use ($local_filesystem) {
            return $local_filesystem;
        });
        // Decorator is now defined on the parent layer
        $parent->bindResolver(DummyFilesystemDecorator::CLASS_NAME, function () use ($parent) {
            return $parent->construct(DummyFilesystemDecorator::CLASS_NAME);
        });

        $layer = new ServiceContainerLayer($parent);
        $layer->bindResolver(DummyFilesystem::CLASS_NAME, function () use ($ssh_filesystem) {
            return $ssh_filesystem;
        });

        // 1) resolve Decorator using parent service container
        /** @var DummyFilesystemDecorator $decorated_filesystem */
        $decorated_filesystem = $parent->resolve(DummyFilesystemDecorator::CLASS_NAME);
        $this->assertSame($local_filesystem, $decorated_filesystem->filesystem);

        // 2) resolve Decorator using lower layer service container => it should ignore lower layer Filesystem
        /** @var DummyFilesystemDecorator $layer_decorated_filesystem */
        $layer_decorated_filesystem = $layer->resolve(DummyFilesystemDecorator::CLASS_NAME);
        $this->assertNotSame($decorated_filesystem, $layer_decorated_filesystem);
        $this->assertSame($local_filesystem, $layer_decorated_filesystem->filesystem);
    }
}


text:
TEST(TestTools, ExponentOfTwo)
{
  using namespace BABYLON;

  // Should be expoent of two
  {
    auto result = Tools::IsExponentOfTwo(2);
    EXPECT_TRUE(result);

    result = Tools::IsExponentOfTwo(4);
    EXPECT_TRUE(result);

    result = Tools::IsExponentOfTwo(8);
    EXPECT_TRUE(result);
  }

  // Should not be exponent of two
  {
    auto result = Tools::IsExponentOfTwo(3);
    EXPECT_FALSE(result);

    result = Tools::IsExponentOfTwo(6);
    EXPECT_FALSE(result);

    result = Tools::IsExponentOfTwo(12);
    EXPECT_FALSE(result);
  }
}


text:
class Subject < ActiveRecord::Base
  has_many :lessons, inverse_of: :subject, dependent: :restrict_with_error

  validates :name, presence: true, uniqueness: true

  has_paper_trail
end


text:
import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {TypographyDemo} from './typography-demo';

@NgModule({
  imports: [
    RouterModule.forChild([{path: '', component: TypographyDemo}]),
  ],
  declarations: [TypographyDemo],
})
export class TypographyDemoModule {
}


text:
Whether or not the module is done loading, or is in the process of
loading.


text:
package no.ntnu.stud.ubilearn.adapter;

import java.util.List;

import no.ntnu.stud.ubilearn.R;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;

/**
 * This class defines an adapter which is adapted to the individual rows in
 * the page which contain the different houses in a specific level. (Each row
 * represent a house (case) in the Training part of the application).
 */
public class HomeCasesAdapter extends ArrayAdapter<String>
{
	/**
	 * Variable contains a reference to an Activity that the fragment creating
	 * this adapter is associated with.
	 */
	private final Context 		_context;

	/**
	 * This list contains the text representation of the different medals for
	 * the different houses (cases).
	 */
	private final List<String>	_caseMedalValues;

	/**
	 * This list contains the names for the different houses (cases).
	 */
	private final List<String>	_caseNameValues;

	/**
	 * This list contains the scores for the different houses (cases).
	 */
	private final List<String>	_caseScoreValues;

	//#########################################################################
	/**
	 * The constructor initializes data for the adapter.
	 *
	 * @param context - The Activity this fragment is currently associated with.
	 * @param caseMedalValues - A list of strings that represent the medals for
	 * each case.
	 * @param caseNameValues - A list of strings that represent the name for
	 * each house (case).
	 * @param caseScoreValues - A list of strings that represent the score for
	 * each house (case). The format is <scoreAchieved/maxScore>.
	 */
	public HomeCasesAdapter(Context context,
			List<String> caseMedalValues,
			List<String> caseNameValues,
			List<String> caseScoreValues)
	{
		super(context, R.layout.home_list_single_case, caseNameValues);

		_context			= context;
		_caseMedalValues	= caseMedalValues;
		_caseNameValues		= caseNameValues;
		_caseScoreValues	= caseScoreValues;
	}
	//-------------------------------------------------------------------------
	@Override
	public View getView(int position, View convertView, ViewGroup parent)
	{
		LayoutInflater inflater	= (LayoutInflater)_context.getSystemService(
				Context.LAYOUT_INFLATER_SERVICE);

		View rowView = inflater.inflate(
				R.layout.home_list_single_case, parent, false);

		ImageView medalView	=
				(ImageView)rowView.findViewById(R.id.caseMedalImage);
		TextView nameView	=
				(TextView)rowView.findViewById(R.id.caseName);
		TextView scoreView	=
				(TextView)rowView.findViewById(R.id.caseScore);

		// Based on the type of medal we will load the specific medal image.
		// TODO: Later we could load an image indicating no medal.
		if(_caseMedalValues.get(position).equals("Bronze"))
		{
			medalView.setImageResource(R.drawable.medal_bronze_icon);
		}
		else if(_caseMedalValues.get(position).equals("Silver"))
		{
			medalView.setImageResource(R.drawable.medal_silver_icon);
		}
		else if(_caseMedalValues.get(position).equals("Gold"))
		{
			medalView.setImageResource(R.drawable.medal_gold_icon);
		}

		nameView.setText(_caseNameValues.get(position));
		scoreView.setText(_caseScoreValues.get(position));

		return rowView;
	}
}


text:
<?php

declare(strict_types=1);

/*
 * This file is part of PHP CS Fixer.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *     Dariusz Rumiński <dariusz.ruminski@gmail.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace PhpCsFixer\Fixer\Phpdoc;

use PhpCsFixer\AbstractFixer;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolver;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
use PhpCsFixer\FixerDefinition\CodeSample;
use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Preg;
use PhpCsFixer\Tokenizer\Token;
use PhpCsFixer\Tokenizer\Tokens;
use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
use Symfony\Component\OptionsResolver\Options;

final class PhpdocTagTypeFixer extends AbstractFixer implements ConfigurableFixerInterface
{
    private const TAG_REGEX = '/^(?:
        (?<tag>
            (?:@(?<tag_name>.+?)(?:\s.+)?)
        )
        |
        {(?<inlined_tag>
            (?:@(?<inlined_tag_name>.+?)(?:\s.+)?)
        )}
    )$/x';

    /**
     * {@inheritdoc}
     */
    public function isCandidate(Tokens $tokens): bool
    {
        return $tokens->isTokenKindFound(T_DOC_COMMENT);
    }

    /**
     * {@inheritdoc}
     */
    public function getDefinition(): FixerDefinitionInterface
    {
        return new FixerDefinition(
            'Forces PHPDoc tags to be either regular annotations or inline.',
            [
                new CodeSample(
                    "<?php\n/**\n * {@api}\n */\n"
                ),
                new CodeSample(
                    "<?php\n/**\n * @inheritdoc\n */\n",
                    ['tags' => ['inheritdoc' => 'inline']]
                ),
            ]
        );
    }

    /**
     * {@inheritdoc}
     *
     * Must run before PhpdocAlignFixer.
     * Must run after AlignMultilineCommentFixer, CommentToPhpdocFixer, PhpdocIndentFixer, PhpdocScalarFixer, PhpdocToCommentFixer, PhpdocTypesFixer.
     */
    public function getPriority(): int
    {
        return 0;
    }

    /**
     * {@inheritdoc}
     */
    protected function applyFix(\SplFileInfo $file, Tokens $tokens): void
    {
        if (!$this->configuration['tags']) {
            return;
        }

        $regularExpression = sprintf(
            '/({?@(?:%s).*?(?:(?=\s\*\/)|(?=\n)}?))/i',
            implode('|', array_map(
                static function (string $tag): string {
                    return preg_quote($tag, '/');
                },
                array_keys($this->configuration['tags'])
            ))
        );

        foreach ($tokens as $index => $token) {
            if (!$token->isGivenKind(T_DOC_COMMENT)) {
                continue;
            }

            $parts = Preg::split(
                $regularExpression,
                $token->getContent(),
                -1,
                PREG_SPLIT_DELIM_CAPTURE
            );

            for ($i = 1, $max = \count($parts) - 1; $i < $max; $i += 2) {
                if (!Preg::match(self::TAG_REGEX, $parts[$i], $matches)) {
                    continue;
                }

                if ('' !== $matches['tag']) {
                    $tag = $matches['tag'];
                    $tagName = $matches['tag_name'];
                } else {
                    $tag = $matches['inlined_tag'];
                    $tagName = $matches['inlined_tag_name'];
                }

                $tagName = strtolower($tagName);
                if (!isset($this->configuration['tags'][$tagName])) {
                    continue;
                }

                if ('inline' === $this->configuration['tags'][$tagName]) {
                    $parts[$i] = '{'.$tag.'}';

                    continue;
                }

                if (!$this->tagIsSurroundedByText($parts, $i)) {
                    $parts[$i] = $tag;
                }
            }

            $tokens[$index] = new Token([T_DOC_COMMENT, implode('', $parts)]);
        }
    }

    /**
     * {@inheritdoc}
     */
    protected function createConfigurationDefinition(): FixerConfigurationResolverInterface
    {
        return new FixerConfigurationResolver([
            (new FixerOptionBuilder('tags', 'The list of tags to fix'))
                ->setAllowedTypes(['array'])
                ->setAllowedValues([static function (array $value): bool {
                    foreach ($value as $type) {
                        if (!\in_array($type, ['annotation', 'inline'], true)) {
                            throw new InvalidOptionsException("Unknown tag type \"{$type}\".");
                        }
                    }

                    return true;
                }])
                ->setDefault([
                    'api' => 'annotation',
                    'author' => 'annotation',
                    'copyright' => 'annotation',
                    'deprecated' => 'annotation',
                    'example' => 'annotation',
                    'global' => 'annotation',
                    'inheritDoc' => 'annotation',
                    'internal' => 'annotation',
                    'license' => 'annotation',
                    'method' => 'annotation',
                    'package' => 'annotation',
                    'param' => 'annotation',
                    'property' => 'annotation',
                    'return' => 'annotation',
                    'see' => 'annotation',
                    'since' => 'annotation',
                    'throws' => 'annotation',
                    'todo' => 'annotation',
                    'uses' => 'annotation',
                    'var' => 'annotation',
                    'version' => 'annotation',
                ])
                ->setNormalizer(static function (Options $options, $value): array {
                    $normalized = [];

                    foreach ($value as $tag => $type) {
                        $normalized[strtolower($tag)] = $type;
                    }

                    return $normalized;
                })
                ->getOption(),
        ]);
    }

    private function tagIsSurroundedByText(array $parts, int $index): bool
    {
        return
            Preg::match('/(^|\R)\h*[^@\s]\N*/', $this->cleanComment($parts[$index - 1]))
            || Preg::match('/^.*?\R\s*[^@\s]/', $this->cleanComment($parts[$index + 1]))
        ;
    }

    private function cleanComment(string $comment): string
    {
        $comment = Preg::replace('/^\/\*\*|\*\/$/', '', $comment);

        return Preg::replace('/(\R)(\h*\*)?\h*/', '$1', $comment);
    }
}


text:
@interface Store : _Store {}
// Custom logic goes here.
@end


text:
<?xml version="1.0" encoding="utf-8"?>
<!--

-->
<com.albedinsky.android.dialog.widget.DialogSignInContent
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@id/dialog_content"
    style="?attr/dialogContentLayoutStyle"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:paddingBottom="?attr/dialogSpacingPrimary"
    tools:layout_gravity="center" />


text:
<?php

namespace Mage\Adminhtml\Test\Block\Catalog\Product\Edit\Tab\Crosssell;

use Mage\Adminhtml\Test\Block\Catalog\Product\Edit\Tab\AbstractAppurtenantProductsGrid;

/**
 * Cross sell products grid.
 */
class Grid extends AbstractAppurtenantProductsGrid
{
    /**
     * Crosssell products table identifier.
     *
     * @var string
     */
    protected $tableIdentifier = '@id="cross_sell_product_grid_table"';
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>NVFboColorAttachments (LWJGL API)</title>
<meta name="date" content="2013-12-02">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

org.lwjgl.opengles

Class NVFboColorAttachments

java.lang.Object

org.lwjgl.opengles.NVFboColorAttachments

public final class NVFboColorAttachments
extends java.lang.Object

Field Summary

Fields

Modifier and Type
Field and Description

static int
GL_COLOR_ATTACHMENT0_NV

static int
GL_COLOR_ATTACHMENT1_NV

static int
GL_COLOR_ATTACHMENT10_NV

static int
GL_COLOR_ATTACHMENT11_NV

static int
GL_COLOR_ATTACHMENT12_NV

static int
GL_COLOR_ATTACHMENT13_NV

static int
GL_COLOR_ATTACHMENT14_NV

static int
GL_COLOR_ATTACHMENT15_NV

static int
GL_COLOR_ATTACHMENT2_NV

static int
GL_COLOR_ATTACHMENT3_NV

static int
GL_COLOR_ATTACHMENT4_NV

static int
GL_COLOR_ATTACHMENT5_NV

static int
GL_COLOR_ATTACHMENT6_NV

static int
GL_COLOR_ATTACHMENT7_NV

static int
GL_COLOR_ATTACHMENT8_NV

static int
GL_COLOR_ATTACHMENT9_NV

static int
GL_MAX_COLOR_ATTACHMENTS_NV

Method Summary

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

GL_MAX_COLOR_ATTACHMENTS_NV

public static final int GL_MAX_COLOR_ATTACHMENTS_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT0_NV

public static final int GL_COLOR_ATTACHMENT0_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT1_NV

public static final int GL_COLOR_ATTACHMENT1_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT2_NV

public static final int GL_COLOR_ATTACHMENT2_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT3_NV

public static final int GL_COLOR_ATTACHMENT3_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT4_NV

public static final int GL_COLOR_ATTACHMENT4_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT5_NV

public static final int GL_COLOR_ATTACHMENT5_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT6_NV

public static final int GL_COLOR_ATTACHMENT6_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT7_NV

public static final int GL_COLOR_ATTACHMENT7_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT8_NV

public static final int GL_COLOR_ATTACHMENT8_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT9_NV

public static final int GL_COLOR_ATTACHMENT9_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT10_NV

public static final int GL_COLOR_ATTACHMENT10_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT11_NV

public static final int GL_COLOR_ATTACHMENT11_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT12_NV

public static final int GL_COLOR_ATTACHMENT12_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT13_NV

public static final int GL_COLOR_ATTACHMENT13_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT14_NV

public static final int GL_COLOR_ATTACHMENT14_NV

See Also:

Constant Field Values

GL_COLOR_ATTACHMENT15_NV

public static final int GL_COLOR_ATTACHMENT15_NV

See Also:

Constant Field Values

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Copyright © 2002-2009 lwjgl.org. All Rights Reserved.


text:
//
//  LineChartView.h
//  LineChart
//
//  Created by nyaago on 2013/10/24.
//  Copyright (c) 2013年 nyaago. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol LineChartSource <NSObject>

/*!
 * @return Xスケール数
 */
- (NSInteger) xScaleCount;
/*!
 * @return Yスケール数
 */
- (NSInteger) yScaleCount;

/*!
 * X軸のIndexからX軸の値を得る
 * @param x Y軸Index
 * @return X値
 */
- (CGFloat) xWithIndex:(NSInteger)index;

/*!
 * インデックス対応するYのスケール値を得る
 * @param y
 * @return インデックス対応するYのスケール値
 */
- (CGFloat) yWithIndex:(NSInteger)index;
/*!
 *
 * @param x X軸インデックス
 * @return 値
 */
-(CGFloat) yWithXIndex:(NSInteger)index;

/**
 * @param x X軸インデックス
 * @return X軸名
 */
-(NSString *) xScaleTitle:(NSInteger)index;

/**
 * @param y Y軸インデックス
 * @return Y軸名
 */
-(NSString *) yScaleTitle:(NSInteger)index;

/*!
 @return x軸の凡例
 */
-(NSString *) xAxisNote;
/*!
 @return y軸の凡例
 */
-(NSString *) yAxisNote;

@end

@interface LineChartView : UIView

@property (nonatomic, strong) UIColor *frameColor;
@property (nonatomic, strong) UIColor *chartLineColor;
@property (nonatomic, strong) UIColor *scaleLineColor;
@property (nonatomic, strong) UIColor *scaleTextColor;
@property (nonatomic, strong) UIColor *noteTextColor;

@property (nonatomic) NSInteger scaleTextSize;
@property (nonatomic) NSInteger noteTextSize;
/*!
 * 値の点の半径
 */
@property (nonatomic) CGFloat pointRedius;

@property (nonatomic, strong) NSObject <LineChartSource> *source;

@end


text:
package com.springsource.greenhouse.events;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;

import javax.inject.Inject;

import org.joda.time.DateTime;
import org.joda.time.DateTimeZone;
import org.joda.time.LocalDate;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.JoinRowMapper;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.springsource.greenhouse.utils.Location;
import com.springsource.greenhouse.utils.ResourceReference;
import com.springsource.greenhouse.utils.SubResourceReference;

/**
 * EventRepository implementation that stores Event data in a relational database using the JDBC API.
 * @author Keith Donald
 */
@Repository
public class JdbcEventRepository implements EventRepository {

	private final JdbcTemplate jdbcTemplate;

	@Inject
	public JdbcEventRepository(JdbcTemplate jdbcTemplate) {
		this.jdbcTemplate = jdbcTemplate;
	}

	public List<Event> findUpcomingEvents(Long afterMillis) {
		return jdbcTemplate.query(SELECT_UPCOMING_EVENTS, eventMapper.list(), new Date(afterMillis != null ? afterMillis : System.currentTimeMillis()));
	}

	public Event findEventBySlug(String groupSlug, Integer year, Integer month, String slug) {
		return jdbcTemplate.queryForObject(SELECT_EVENT_BY_SLUG, eventMapper.single(), groupSlug, year, month, slug);
	}

	public String findEventSearchString(Long eventId) {
		return jdbcTemplate.queryForObject("select g.hashtag from Event e, MemberGroup g where e.id = ? and e.memberGroup = g.id", String.class, eventId);
	}

	public String findSessionSearchString(Long eventId, Integer sessionId) {
		return jdbcTemplate.queryForObject("select (select g.hashtag from Event e, MemberGroup g where e.id = ? and e.memberGroup = g.id) || ' ' || hashtag from EventSession where event = ? and id = ?", String.class, eventId, eventId, sessionId);
	}

	@Transactional
	public List<EventSession> findSessionsOnDay(Long eventId, LocalDate day, Long attendeeId) {
		DateTimeZone eventTimeZone = DateTimeZone.forID(jdbcTemplate.queryForObject("select timezone from Event where id = ?", String.class, eventId));
		DateTime dayStart = day.toDateTimeAtStartOfDay(eventTimeZone);
		DateTime dayEnd = dayStart.plusDays(1);
		return jdbcTemplate.query(SELECT_SESSIONS_ON_DAY, eventSessionMapper.list(), attendeeId, eventId, dayStart.toDate(), dayEnd.toDate());
	}

	public List<EventSession> findEventFavorites(Long eventId, Long attendeeId) {
		return jdbcTemplate.query(SELECT_EVENT_FAVORITES, eventSessionMapper.list(), eventId, attendeeId, eventId);
	}

	public List<EventSession> findAttendeeFavorites(Long eventId, Long attendeeId) {
		return jdbcTemplate.query(SELECT_ATTENDEE_FAVORITES, eventSessionMapper.list(), attendeeId, eventId);
	}

	@Transactional
	public boolean toggleFavorite(Long eventId, Integer sessionId, Long attendeeId) {
		boolean favorite = jdbcTemplate.queryForObject("select exists(select 1 from EventSessionFavorite where event = ? and session = ? and attendee = ?)", Boolean.class, eventId, sessionId, attendeeId);
		if (favorite) {
			jdbcTemplate.update("delete from EventSessionFavorite where event = ? and session = ? and attendee = ?", eventId, sessionId, attendeeId);
		} else {
			jdbcTemplate.update("insert into EventSessionFavorite (event, session, attendee) values (?, ?, ?)", eventId, sessionId, attendeeId);
		}
		return !favorite;
	}

	@Transactional
	public Float rate(Long eventId, Integer sessionId, Long attendeeId, Rating rating) throws RatingPeriodClosedException {
		if (!isSessionEnded(eventId, sessionId)) {
			throw new RatingPeriodClosedException(eventId, sessionId);
		}
		boolean rated = jdbcTemplate.queryForObject("select exists(select 1 from EventSessionRating where event = ? and session = ? and attendee = ?)", Boolean.class, eventId, sessionId, attendeeId);
		if (rated) {
			jdbcTemplate.update("update EventSessionRating set rating = ?, comment = ? where event = ? and session = ? and attendee = ?", rating.getValue(), rating.getComment(), eventId, sessionId, attendeeId);
		} else {
			jdbcTemplate.update("insert into EventSessionRating (event, session, attendee, rating, comment) values (?, ?, ?, ?, ?)", eventId, sessionId, attendeeId, rating.getValue(), rating.getComment());
		}
		Float newAvgRating = jdbcTemplate.queryForObject("select round(avg(cast(rating as double)) * 2, 0) / 2 from EventSessionRating where event = ? and session = ? group by event, session", Float.class, eventId, sessionId);
		jdbcTemplate.update("update EventSession set rating = ? where event = ? and id = ?", newAvgRating, eventId, sessionId);
		return newAvgRating;
	}

	// internal helpers

	private boolean isSessionEnded(Long eventId, Integer sessionId) {
		Date endTime = jdbcTemplate.queryForObject("select endTime from EventSession where event = ? and id = ?", Date.class, eventId, sessionId);
		return new Date().after(endTime);
	}

	private final JoinRowMapper<Event, Long> eventMapper = new JoinRowMapper<Event, Long>() {
		protected Long mapId(ResultSet rs) throws SQLException {
			return rs.getLong("id");
		}
		protected Event mapRoot(Long id, ResultSet rs) throws SQLException {
			return new Event(id, rs.getString("title"), DateTimeZone.forID(rs.getString("timeZone")), new DateTime(rs.getTimestamp("startTime"), DateTimeZone.UTC), new DateTime(rs.getTimestamp("endTime"), DateTimeZone.UTC),
					rs.getString("slug"), rs.getString("description"), rs.getString("hashtag"), new ResourceReference<String>(rs.getString("groupSlug"), rs.getString("groupName")));
		}
		protected void addChild(Event event, ResultSet rs) throws SQLException {
			event.addVenue(new Venue(rs.getLong("venueId"), rs.getString("venueName"), rs.getString("venuePostalAddress"),
					new Location(rs.getDouble("venueLatitude"), rs.getDouble("venueLongitude")), rs.getString("venueLocationHint")));
		}
	};

	private final JoinRowMapper<EventSession, Integer> eventSessionMapper = new JoinRowMapper<EventSession, Integer>() {
		protected Integer mapId(ResultSet rs) throws SQLException {
			return rs.getInt("id");
		}
		protected EventSession mapRoot(Integer id, ResultSet rs) throws SQLException {
			return new EventSession(id, rs.getString("title"), new DateTime(rs.getTimestamp("startTime"), DateTimeZone.UTC), new DateTime(rs.getTimestamp("endTime"), DateTimeZone.UTC),
					rs.getString("description"), rs.getString("hashtag"), rs.getFloat("rating"), new SubResourceReference<Long, Integer>(rs.getLong("venue"), rs.getInt("room"), rs.getString("roomName")), rs.getBoolean("favorite"));
		}
		protected void addChild(EventSession session, ResultSet rs) throws SQLException {
			session.addLeader(new EventSessionLeader(rs.getString("name")));
		}
	};

	private static final String SELECT_FROM_EVENT_SESSION = "select s.id, s.title, s.startTime, s.endTime, s.description, s.hashtag, s.rating, s.venue, s.room, r.name as roomName, (f.attendee is not null) as favorite, l.name from EventSession s ";

	private static final String SELECT_EVENT = "select e.id, e.title, e.timeZone, e.startTime, e.endTime, e.slug, e.description, g.hashtag, g.slug as groupSlug, g.name as groupName, " +
		"v.id as venueId, v.name as venueName, v.postalAddress as venuePostalAddress, v.latitude as venueLatitude, v.longitude as venueLongitude, v.locationHint as venueLocationHint from Event e " +
		"inner join MemberGroup g on e.memberGroup = g.id " +
		"inner join EventVenue ev on e.id = ev.event " +
		"inner join Venue v on ev.venue = v.id";

	private static final String SELECT_UPCOMING_EVENTS = SELECT_EVENT + " where e.endTime > ? order by e.startTime";

	private static final String SELECT_EVENT_BY_SLUG = SELECT_EVENT + " where g.slug = ? and extract(year from e.startTime) = ? and extract(month from e.startTime) = ? and e.slug = ?";

	private static final String SELECT_SESSIONS_ON_DAY = SELECT_FROM_EVENT_SESSION +
		"left outer join VenueRoom r on s.venue = r.venue and s.room = r.id " +
		"left outer join EventSessionFavorite f on s.event = f.event and s.id = f.session and f.attendee = ? " +
		"inner join EventSessionLeader sl on s.event = sl.event and s.id = sl.session " +
		"inner join Leader l on sl.leader = l.id " +
		"where s.event = ? and s.startTime >= ? and s.endTime <= ? " +
		"order by s.startTime, s.id, sl.rank";

	private static final String SELECT_EVENT_FAVORITES = SELECT_FROM_EVENT_SESSION +
		"inner join (select top 10 session, count(*) as favoriteCount from EventSessionFavorite where event = ? group by session) top on s.id = top.session " +
		"left outer join VenueRoom r on s.venue = r.venue and s.room = r.id " +
		"left outer join EventSessionFavorite f on s.event = f.event and s.id = f.session and f.attendee = ? " +
		"inner join EventSessionLeader sl on s.event = sl.event and s.id = sl.session " +
		"inner join Leader l on sl.leader = l.id " +
		"where s.event = ? " +
		"order by top.favoriteCount desc, s.id, sl.rank";

	private static final String SELECT_ATTENDEE_FAVORITES = SELECT_FROM_EVENT_SESSION +
		"left outer join VenueRoom r on s.venue = r.venue and s.room = r.id " +
		"inner join EventSessionFavorite f on s.event = f.event and s.id = f.session and f.attendee = ? " +
		"inner join EventSessionLeader sl on s.event = sl.event and s.id = sl.session " +
		"inner join Leader l on sl.leader = l.id " +
		"where s.event = ? " +
		"order by f.rank, s.id, sl.rank";

}


text:
/*
 Angular Softtion Middleware v1.0.4
 (c) 2016 - 2018 Softtion Developers
 http://angular.softtion.com.co
 https://github.com/oldtimeguitarguy/angular-middleware
 License: MIT
 Updated: 16/Abr/2018
*/

((factory) => {
    if (typeof window.softtion === "object" && typeof window.angular === "object") {
        factory(window.softtion, window.angular);
    } else {
        throw new Error("Softtion Angular requiere Softtion y Angular cargado en la Aplicación");
    } // No se ha cargado Softtion y Angular
})((softtion, angular) => {

    angular.module("ngSofttion").
        provider("$middleware", middlewareProvider).
        config(config).run(run);

        // Atributos
    var $bypassAll = false,
        $mappings = {},
        $global = { middleware: [], resolve: [] };

    function middlewareProvider() {

        this.map = function (mappings) {
            if (typeof mappings !== "object")
                throw "¡Tu mapa de middlewares debe ser un objeto!";

            $mappings = mappings; // Asignando middlewares
        };

        this.bypassAll = function (enabledBypass) {
            if (typeof enabledBypass !== "boolean")
                throw "Debe proporcionar paramétro como un valor booleano";

            $bypassAll = enabledBypass; // Estado de byPass
        };

        this.setGlobalMiddlewares = function (middlewares) {
            if (typeof middlewares !== "string" && !angular.isArray(middlewares))
                throw "Debe proporcionar una cadena, una cadena separada | o un array de nombres de middleware";

            $global.middleware = middlewares; // Middlewares globales
        };

        this.setGlobalResolves = function (resolves) {
            if (!angular.isArray(resolves))
                throw "Debe proporcionar una matriz de funciones resolves";

            $global.resolve = resolves; // Resolves globales
        };

        this.$get = factoryProvider;

        factoryProvider.$inject = [ "$injector", "$q" ];

        function factoryProvider($injector, $q) {

            var middleware = {
                    next: nextMiddleware
                },
                request = {
                    next: nextRequest, redirectTo: redirectTo
                };

            function shouldBypass(route) {
                return ($bypassAll) ? true : !middlewareExists(route);
            }

            function middlewareExists(route) {
                return hasMiddleware($global) || hasMiddleware(route);
            }

            function hasMiddleware(route) {
                var middleware = getRouteMiddleware(route);

                return !!middleware && !!middleware.length;
            }

            function getRouteMiddleware(route) {
                return route.middleware || ((route.data || {}).vars || {}).middleware;
            }

            function concatMiddlewareNames(routes) {
                var middlewares = []; // Listado de middlewares

                for (var i = 0; i < routes.length; i++) {
                    middlewares = middlewares.together(getMiddlewareNames(routes[i]));
                } // Concat each route"s middleware names

                return middlewares; // Retornando middlewares
            }

            function getMiddlewareNames(route) {
                var middleware = getRouteMiddleware(route);

                if (typeof middleware === "undefined") return [];

                if (middleware instanceof Array) return middleware;

                return middleware.split("|"); // Middlewares
            }

            function nextMiddleware() {
                var next = $mappings[middleware.names[middleware.index++]];

                if (next) $injector.invoke(next, request);
            }

            function nextRequest() {
                if (middleware.index === middleware.names.length)
                    middleware.resolution.resolve();

                middleware.next(); // Verificando siguiente middleware
            }

            function redirectTo(route, params, options) {
                middleware.resolution.reject({
                    type: "redirectTo", route: route, params: params, options: options
                });
            }

            return function (toRoute, toParams) {
                // Return if we should bypass
                if (shouldBypass(toRoute)) return $q.resolve();

                // Store a copy of the route parameters in the request
                request.params = angular.copy(toParams);

                // Store route name in the request
                request.route = toRoute.name;

                // Set the middleware index to 0
                middleware.index = 0;

                // Set the middleware names.
                // Make sure the globals are first, then concat toRoute
                middleware.names = concatMiddlewareNames([$global, toRoute]);

                // Create a deferred promise
                middleware.resolution = $q.defer();

                // Process that first middleware!
                middleware.next();

                // Return the promise
                return middleware.resolution.promise;
            };
        }
    }

    config.$inject = [ "$provide" ];

    function config($provide) {
        $provide.decorator("$route", decoratorProvider);

        decoratorProvider.$inject = [ "$delegate" ];

        function decoratorProvider($delegate) {
            angular.forEach($delegate.routes,
                (route) => { route.resolve = route.resolve || {}; }
            );

            return $delegate; // Retornando delegación
        }
    }

    run.$inject = [ "$rootScope", "$route", "$location", "$middleware" ];

    function run($rootScope, $route, $location, $middleware) {
        $rootScope.$on("$routeChangeStart", (angularEvent, next, current) => {
            next.resolve.middleware = function () {
                return $middleware(next, next.params);
            };
        });

        $rootScope.$on("$routeChangeSuccess", (angularEvent, current, previous) => {
            $global.resolve.forEach((resolve) => {
                if (softtion.isFunction(resolve)) resolve();
            });

            if (angular.isFunction(current.resolve)) current.resolve();
        });

        $rootScope.$on("$routeChangeError", (event, current, previous, rejection) => {
            if (rejection.type !== "redirectTo") return;

            event.preventDefault(); // Prevent the route change from working normally

            // If the redirect route is the same, then just reload
            if (current.regexp.test(rejection.route)) return $route.reload();

            $location.path(rejection.route); // The path is new, so go there!

            if (rejection.params) $location.search(rejection.params);

        });
    }
});


text:
package com.stulsoft.pscalafx.demo1

import scala.reflect.runtime.universe.typeOf
import scalafx.application.{Platform, JFXApp}
import scalafx.Includes._
import scalafx.scene.Scene
import scalafx.scene.control.{ComboBox, TextField}
import scalafx.event.ActionEvent
import scalafxml.core.{DependenciesByType, FXMLView}
import scalafxml.core.macros.sfxml
import javafx.beans.binding.StringBinding

/**
  * @see [[http://vigoo.github.io/posts/2014-01-12-scalafx-with-fxml.html ScalaFX with FXML]]
  * @author Yuriy Stul
  */
@sfxml
class UnitConverterPresenter(from: TextField,
                             to: TextField,
                             types: ComboBox[UnitConverter],
                             converters: UnitConverters) {

  // Filling the combo box
  for (converter <- converters.available) {
    types += converter
  }
  types.getSelectionModel.selectFirst()

  // Data binding
  to.text <== new StringBinding {
    bind(from.text.delegate, types.getSelectionModel.selectedItemProperty)

    def computeValue(): String = types.getSelectionModel.getSelectedItem.run(from.text.value)
  }

  // Close button event handler
  def onClose(event: ActionEvent) {
    Platform.exit()
  }
}

object ScalaFXML extends JFXApp {

  val root = FXMLView(getClass.getResource("/fxml/unitconverter.fxml"),
    new DependenciesByType(Map(
      typeOf[UnitConverters] -> new UnitConverters(InchesToMM, MMtoInches))))

  stage = new JFXApp.PrimaryStage() {
    title = "Unit conversion"
    scene = new Scene(root)

  }
}


text:
package uk.nhs.hdn.common.http.client;

import org.jetbrains.annotations.NotNull;
import uk.nhs.hdn.common.exceptions.ShouldNeverHappenException;
import uk.nhs.hdn.common.http.ResponseCode;
import uk.nhs.hdn.common.http.ResponseCodeOutsideOfValidRangeInvalidException;
import uk.nhs.hdn.common.http.ResponseCodeRange;
import uk.nhs.hdn.common.http.client.connectionConfigurations.ChunkedUploadsConnectionConfiguration;
import uk.nhs.hdn.common.http.client.connectionConfigurations.CombinedConnectionConfiguration;
import uk.nhs.hdn.common.http.client.connectionConfigurations.ConnectionConfiguration;
import uk.nhs.hdn.common.http.client.connectionConfigurations.TcpConnectionConfiguration;
import uk.nhs.hdn.common.http.client.exceptions.CorruptResponseException;
import uk.nhs.hdn.common.http.client.exceptions.CouldNotConnectHttpException;
import uk.nhs.hdn.common.http.client.exceptions.CouldNotUploadException;
import uk.nhs.hdn.common.http.client.exceptions.UnacceptableResponseException;
import uk.nhs.hdn.common.http.client.getHttpResponseUsers.GetHttpResponseUser;
import uk.nhs.hdn.common.http.client.headHttpResponseUsers.HeadHttpResponseUser;
import uk.nhs.hdn.common.http.client.uploadContents.UploadContent;
import uk.nhs.hdn.common.reflection.toString.AbstractToString;
import uk.nhs.hdn.common.tuples.Pair;

import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;

import static uk.nhs.hdn.common.VariableArgumentsHelper.copyOf;
import static uk.nhs.hdn.common.http.ResponseCode.NoContentResponseCode;
import static uk.nhs.hdn.common.http.ResponseCodeRange.Successful2xx;
import static uk.nhs.hdn.common.http.ResponseCodeRange.responseCodeRange;
import static uk.nhs.hdn.common.http.client.connectionConfigurations.HttpMethodConnectionConfiguration.*;
import static uk.nhs.hdn.common.http.client.connectionConfigurations.TcpConnectionConfiguration.tcpConnectionConfiguration;
import static uk.nhs.hdn.common.inputStreams.EmptyInputStream.EmptyInputStreamInstance;

public final class JavaHttpClient extends AbstractToString implements HttpClient
{
	@NotNull
	private final URL httpUrl;
	@NotNull
	private final Pair<String, String>[] httpHeaders;

	private final CombinedConnectionConfiguration headConfiguration;
	private final CombinedConnectionConfiguration getConfiguration;
	private final CombinedConnectionConfiguration postConfiguration;
	private final CombinedConnectionConfiguration putConfiguration;

	@SuppressWarnings("FeatureEnvy")
	@SafeVarargs
	public JavaHttpClient(@NotNull final URL httpUrl, @SuppressWarnings("TypeMayBeWeakened") @NotNull final ChunkedUploadsConnectionConfiguration supportsChunkedUploads, @NotNull final Pair<String, String>... httpHeaders)
	{
		this.httpUrl = httpUrl;
		this.httpHeaders = copyOf(httpHeaders);
		final TcpConnectionConfiguration tcpConnectionConfiguration = tcpConnectionConfiguration(true, 10 * 1000, 1000 * 1000);
		headConfiguration = tcpConnectionConfiguration.with(HEAD);
		getConfiguration = tcpConnectionConfiguration.with(GET);
		postConfiguration = tcpConnectionConfiguration.with(POST).with(supportsChunkedUploads);
		putConfiguration = tcpConnectionConfiguration.with(PUT).with(supportsChunkedUploads);
	}

	@Override
	public void head(@NotNull final HeadHttpResponseUser headHttpResponseUser) throws CouldNotConnectHttpException, UnacceptableResponseException, CorruptResponseException
	{
		final HttpURLConnection httpConnection = connectedHttpConnection(headConfiguration);

		try
		{
			final int responseCode = responseCode(httpConnection);
			final ResponseCodeRange responseCodeRange = validateResponseCodeRange(responseCode);
			final long contentLengthLong = httpConnection.getContentLengthLong();

			headHttpResponseUser.response(responseCode, responseCodeRange, httpConnection.getDate(), httpConnection.getExpiration(), contentLengthLong, httpConnection.getContentType(), httpConnection.getContentEncoding());
		}
		finally
		{
			httpConnection.disconnect();
		}
	}

	@Override
	@NotNull
	public <V> V get(@NotNull final GetHttpResponseUser<V> getHttpResponseUser) throws CouldNotConnectHttpException, UnacceptableResponseException, CorruptResponseException
	{
		final HttpURLConnection httpConnection = connectedHttpConnection(getConfiguration);

		return receive(httpConnection, getHttpResponseUser);
	}

	@NotNull
	@Override
	public <V> V post(@NotNull final UploadContent uploadContent, @NotNull final GetHttpResponseUser<V> getHttpResponseUser) throws CouldNotConnectHttpException, UnacceptableResponseException, CorruptResponseException, CouldNotUploadException
	{
		final HttpURLConnection httpConnection = connectedHttpConnection(postConfiguration);

		try
		{
			uploadContent.upload(httpConnection);
		}
		catch (IOException e)
		{
			throw new CouldNotUploadException("IOException whilst uploading", e);
		}

		return receive(httpConnection, getHttpResponseUser);
	}

	private static <V> V receive(final HttpURLConnection httpConnection, final GetHttpResponseUser<V> getHttpResponseUser) throws CorruptResponseException, UnacceptableResponseException
	{
		try
		{
			final int responseCode = responseCode(httpConnection);
			final ResponseCodeRange responseCodeRange = validateResponseCodeRange(responseCode);
			final long contentLengthLong = httpConnection.getContentLengthLong();
			final InputStream inputStream = inputStream(httpConnection, responseCode, responseCodeRange, contentLengthLong);
			try
			{
				return getHttpResponseUser.response(responseCode, responseCodeRange, httpConnection.getDate(), httpConnection.getExpiration(), contentLengthLong, httpConnection.getContentType(), httpConnection.getContentEncoding(), inputStream);
			}
			finally
			{
				try
				{
					inputStream.close();
				}
				catch (IOException ignored)
				{
				}
			}
		}
		finally
		{
			httpConnection.disconnect();
		}
	}

	private static ResponseCodeRange validateResponseCodeRange(final int responseCode) throws CorruptResponseException
	{
		final ResponseCodeRange responseCodeRange;
		try
		{
			responseCodeRange = responseCodeRange(responseCode);
		}
		catch (ResponseCodeOutsideOfValidRangeInvalidException e)
		{
			throw new CorruptResponseException(e);
		}
		return responseCodeRange;
	}

	private HttpURLConnection connectedHttpConnection(final ConnectionConfiguration configuration) throws CouldNotConnectHttpException
	{
		final HttpURLConnection httpConnection = newHttpConnection(configuration);

		try
		{
			httpConnection.connect();
		}
		catch (IOException e)
		{
			// seems that 400 / 500 happens here...
			throw new CouldNotConnectHttpException(httpUrl, e);
		}
		return httpConnection;
	}

	private static int responseCode(final HttpURLConnection httpConnection) throws CorruptResponseException
	{
		final int responseCode;
		try
		{
			responseCode = httpConnection.getResponseCode();
		}
		catch (IOException e)
		{
			throw new CorruptResponseException("could not obtain response code", e);
		}
		return responseCode;
	}

	private static InputStream inputStream(final HttpURLConnection httpConnection, @ResponseCode final int responseCode, final ResponseCodeRange responseCodeRange, final long contentLengthLong) throws CorruptResponseException
	{
		final InputStream inputStream;
		if (responseCode == NoContentResponseCode || contentLengthLong == 0L)
		{
			inputStream = EmptyInputStreamInstance;
		}
		else if (responseCodeRange == Successful2xx)
		{
			try
			{
				inputStream = httpConnection.getInputStream();
			}
			catch (IOException e)
			{
				throw new CorruptResponseException("could not obtain response body", e);
			}
		}
		else
		{
			inputStream = httpConnection.getErrorStream();
		}
		return inputStream;
	}

	private HttpURLConnection newHttpConnection(@NotNull final ConnectionConfiguration connectionConfiguration)
	{
		final HttpURLConnection httpConnection;
		try
		{
			httpConnection = (HttpURLConnection) httpUrl.openConnection();
		}
		catch (IOException e)
		{
			throw new ShouldNeverHappenException(e);
		}
		connectionConfiguration.configure(httpConnection);
		for (final Pair<String, String> httpHeader : httpHeaders)
		{
			httpConnection.setRequestProperty(httpHeader.a, httpHeader.b);
		}
		return httpConnection;
	}
}


text:
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\force-mkdir.psm1
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\take-own.psm1

echo "Elevating priviledges for this process"
do {} until (Elevate-Privileges SeTakeOwnershipPrivilege)

echo "Apply MarkC's mouse acceleration fix"
sp "HKCU:\Control Panel\Mouse" "MouseSensitivity" "10"
sp "HKCU:\Control Panel\Mouse" "MouseSpeed" "0"
sp "HKCU:\Control Panel\Mouse" "MouseThreshold1" "0"
sp "HKCU:\Control Panel\Mouse" "MouseThreshold2" "0"
sp "HKCU:\Control Panel\Mouse" "SmoothMouseXCurve" ([byte[]](0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xCC, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x99, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x66, 0x26, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x33, 0x33, 0x00, 0x00, 0x00, 0x00, 0x00))
sp "HKCU:\Control Panel\Mouse" "SmoothMouseYCurve" ([byte[]](0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00))

echo "Disable mouse pointer hiding"
sp "HKCU:\Control Panel\Desktop" "UserPreferencesMask" ([byte[]](0x9e,
0x1e, 0x06, 0x80, 0x12, 0x00, 0x00, 0x00))

echo "Disable Game DVR and Game Bar"
force-mkdir "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR"
sp "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" "AllowgameDVR" 0

echo "Disable easy access keyboard stuff"
sp "HKCU:\Control Panel\Accessibility\StickyKeys" "Flags" "506"
sp "HKCU:\Control Panel\Accessibility\Keyboard Response" "Flags" "122"
sp "HKCU:\Control Panel\Accessibility\ToggleKeys" "Flags" "58"

echo "Restoring old volume slider"
force-mkdir "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC"
sp "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\MTCUVC" "EnableMtcUvc" 0

echo "Setting folder view options"
sp "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Hidden" 1
sp "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "HideFileExt" 0
sp "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "HideDrivesWithNoMedia" 0
sp "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "ShowSyncProviderNotifications" 0

echo "Setting default explorer view to This PC"
sp "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "LaunchTo" 1

echo "Removing user folders under This PC"
# Remove Desktop from This PC
rm "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}"
rm "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}"
# Remove Documents from This PC
rm "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}"
rm "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}"
rm "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0}"
rm "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af}"
# Remove Downloads from This PC
rm "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}"
rm "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}"
rm "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B}"
rm "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f}"
# Remove Music from This PC
rm "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}"
rm "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}"
rm "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}"
rm "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}"
# Remove Pictures from This PC
rm "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}"
rm "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}"
rm "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}"
rm "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}"
# Remove Videos from This PC
rm "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}"
rm "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}"
rm "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C}"
rm "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}"

#echo "Disabling tile push notification"
#force-mkdir "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications"
#sp "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" "NoTileApplicationNotification" 1


text:
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel.DataAnnotations

Public Class SubjectReport
    Implements IContainerAware
    Public Property Container As IContainer Implements IContainerAware.Container

    Public Overridable Property Id As Integer

    <DemoProperty(Order:=1)> 'Disabled
    Public Overridable Property Student As Student

    <DemoProperty(Order:=2)>
    Public Overridable Property Subject As Subject

    <DemoProperty(Order:=3)>
    Public Overridable Property Grade As Grades

    <DemoProperty(Order:=4)>
    Public Overridable Property GivenBy As Teacher

    Public Sub AboutGivenBy(a As FieldAbout)
        Select Case a.TypeCode
            Case AboutTypeCodes.Parameters
                a.Options = Container.AllInstances(Of Teacher).ToArray()
            Case Else
        End Select
    End Sub

    Public Property mappedDate As Date
    Private myDate As NODate

    <DemoProperty(Order:=5)>
    Public ReadOnly Property [Date] As NODate
        Get
            If Not Container.IsPersistent(Me) Then
                mappedDate = Today
            End If
            myDate = If(myDate, New NODate(mappedDate, Sub(v) mappedDate = v))
            Return myDate
        End Get
    End Property

    Public Property mappedNotes As String
    Private myNotes As MultiLineTextString

    <DemoProperty(Order:=6)>
    Public ReadOnly Property Notes As MultiLineTextString
        Get
            myNotes = If(myNotes, New MultiLineTextString(mappedNotes, Sub(v) mappedNotes = v))
            Return myNotes
        End Get
    End Property

    Public Overrides Function ToString() As String
        Return $"{Subject} {[Date]}"
    End Function

    Public Function Title() As Title
        Return New Title()
    End Function
End Class

Public Enum Grades
    A_star
    A
    B
    C
    D
    E
    U
End Enum


text:
SYNONYM

#### According to
Index Fungorum

#### Published in
Corpus Fl. Prov. Suec. 1: 282 (1835)

#### Original name
Lichen tigillaris Ach.

### Remarks
null


text:
import { moduleFor, test } from 'ember-qunit';

moduleFor('service:foo', 'Unit | Service | Foo', {
  beforeEach() {
    this.register('service:thingy', thingy);
    this.registry.register('service:thingy', thingy);
  }
});

test('it happens', function() {
  this.register('service:thingy', thingy);
  this.registry.register('service:thingy', thingy);
});

moduleFor('service:bar', 'Unit | Service | Bar');

test('it happens again?', function() {
  this.register('service:thingy', thingy);
  this.registry.register('service:thingy', thingy);
});


text:
<?php
Class Index extends CI_Controller{
	private function autenticado() {
		$autenticado = false;
		if (session_status () == PHP_SESSION_NONE) {
			session_start ();
		}
		if (isset ( $_SESSION ['empleado'] ['id'] )) {
			$autenticado = true;
		}
		return $autenticado;
	}
}
?>


text:
<?php

error_reporting(E_STRICT | E_ALL);

// You can set the include path to src directory or reference
// DfpUser.php directly via require_once.
// $path = '/path/to/dfp_api_php_lib/src';
$path = dirname(__FILE__) . '/../../../../src';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);

require_once 'Google/Api/Ads/Dfp/Lib/DfpUser.php';
require_once 'Google/Api/Ads/Dfp/Util/v201602/DateTimeUtils.php';
require_once dirname(__FILE__) . '/../../../Common/ExampleUtils.php';

// Set the ID of the proposal that the proposal line items will belong to.
$proposalId = 'INSERT_PROPOSAL_ID_HERE';

// Set the ID of the product that the proposal line items should be created
// from.
$productId = 'INSERT_PRODUCT_ID_HERE';

// Set the ID of the rate card that the proposal line items should be priced
// with.
$rateCardId = 'INSERT_RATE_CARD_ID_HERE';

try {
  // Get DfpUser from credentials in "../auth.ini"
  // relative to the DfpUser.php file's directory.
  $user = new DfpUser();

  // Log SOAP XML request and response.
  $user->LogDefaults();

  // Get the ProposalLineItemService.
  $proposalLineItemService = $user->GetService('ProposalLineItemService',
      'v201602');

  // Get the NetworkService.
  $networkService = $user->GetService('NetworkService', 'v201602');

  // Get the root ad unit ID used to target the whole site.
  $rootAdUnitId = $networkService->getCurrentNetwork()->effectiveRootAdUnitId;

  // Create inventory targeting.
  $inventoryTargeting = new InventoryTargeting();

  // Create ad unit targeting for the root ad unit (i.e. the whole network).
  $adUnitTargeting = new AdUnitTargeting();
  $adUnitTargeting->adUnitId = $rootAdUnitId;
  $adUnitTargeting->includeDescendants = true;

  $inventoryTargeting->targetedAdUnits = array($adUnitTargeting);

  // Create targeting.
  $targeting = new Targeting();
  $targeting->inventoryTargeting = $inventoryTargeting;

  // Create a proposal line item.
  $proposalLineItem = new ProposalLineItem();
  $proposalLineItem->name = sprintf('Proposal line item #%s', uniqid());

  $proposalLineItem->proposalId = $proposalId;
  $proposalLineItem->rateCardId = $rateCardId;
  $proposalLineItem->productId = $productId;
  $proposalLineItem->targeting = $targeting;

  // Set the length of the proposal line item to run.
  $proposalLineItem->startDateTime = DateTimeUtils::ToDfpDateTime(
      new DateTime('now', new DateTimeZone('America/New_York')));
  $proposalLineItem->endDateTime = DateTimeUtils::ToDfpDateTime(
      new DateTime('+1 month', new DateTimeZone('America/New_York')));

  // Set delivery specifications for the proposal line item.
  $proposalLineItem->deliveryRateType = 'EVENLY';
  $proposalLineItem->creativeRotationType = 'OPTIMIZED';

  // Set billing specifications for the proposal line item.
  $proposalLineItem->billingCap = 'CAPPED_CUMULATIVE';
  $proposalLineItem->billingSource = 'THIRD_PARTY_VOLUME';

  // Set pricing for the proposal line item for 1000 impressions at a CPM of $2
  // for a total value of $2.
  $goal = new Goal();
  $goal->units = 1000;
  $goal->unitType = 'IMPRESSIONS';
  $proposalLineItem->goal = $goal;

  $proposalLineItem->cost = new Money('USD', 2000000);
  $proposalLineItem->costPerUnit = new Money('USD', 2000000);
  $proposalLineItem->rateType = 'CPM';

  // Create the proposal line item on the server.
  $proposalLineItems = $proposalLineItemService->createProposalLineItems(
      array($proposalLineItem));

  foreach ($proposalLineItems as $createdProposalLineItem) {
    printf("A proposal line item with ID %d and name '%s' was created.\n",
        $createdProposalLineItem->id, $createdProposalLineItem->name);
  }
} catch (OAuth2Exception $e) {
  ExampleUtils::CheckForOAuth2Errors($e);
} catch (ValidationException $e) {
  ExampleUtils::CheckForOAuth2Errors($e);
} catch (Exception $e) {
  printf("%s\n", $e->getMessage());
}


text:
#include "Components\Component.h"

using namespace ME3D;

Component::Component()
{
	m_enabled = true;
}

/************************************************************************/

bool Component::S_IsEnabled() const
{
	return IsEnabled();
}

void Component::S_SetEnabled( bool value )
{
	SetEnabled(value);
}


text:
layout: landing
---

{{ site.landing_header }}

{{ site.landing_text }}

      Read My Blog
      Hire Me


text:
const actionController = require('../controllers/action');
const authenticationMiddleware = require('../middleware/authentication');
const express = require('express');

const router = express.Router();

/**
 * @api {get} /action Get Actions
 * @apiName GetActions
 * @apiGroup Action
 *
 * @apiDescription
 * Retrieve all Actions. Requires authentication.
 *
 * @apiHeader  {String}     Authorization     Bearer [JWT_TOKEN]
 *
 * @apiSuccess {Action[]}   actions                 List of Actions.
 * @apiSuccess {Number}     actions.id              Primary key.
 * @apiSuccess {String}     actions.name            Title of the action.
 * @apiSuccess {String}     actions.description     A brief explanation of the action.
 * @apiSuccess {Number}     actions.devcaps_cost    The amount of DevCaps required by a team
 *                                                  to perform the action.
 * @apiSuccess {Number}     actions.mindset_reward  The amount of HackerMindset rewarded to a team
 *                                                  after performing the action.
 * @apiSuccess {Boolean}    actions.repeatable      Indicates whether or not an action may be
 *                                                  performed multiple times by a single team.
 * @apiSuccess {Boolean}    actions.requires_mature Indicates whether or not a team must be Mature
 *                                                  in order to perform the action.
 */
router.get(
  '/',
  authenticationMiddleware.validateAuthentication,
  actionController.getActions
);

/**
 * @api {get} /action/:id Get Action by ID
 * @apiName GetAction
 * @apiGroup Action
 *
 * @apiDescription
 * Retrieve an Action by its ID. Requires authentication.
 *
 * @apiHeader  {String}     Authorization   Bearer [JWT_TOKEN]
 *
 * @apiParam   {Number}     :id             The ID of the action.
 *
 * @apiSuccess {Number}     id              Primary key.
 * @apiSuccess {String}     name            Title of the action.
 * @apiSuccess {String}     description     A brief explanation of the action.
 * @apiSuccess {Number}     devcaps_cost    The total number of DevCaps required by a team
 *                                          to perform the action.
 * @apiSuccess {Number}     mindset_reward  The total number of HackerMindset rewarded to a team
 *                                          after performing the action.
 * @apiSuccess {Boolean}    repeatable      Indicates whether or not an action may be
 *                                          performed multiple times by a single team.
 * @apiSuccess {Boolean}    requires_mature Indicates whether or not a team must be Mature
 *                                          in order to perform the action.
 */
router.get(
  '/:id',
  authenticationMiddleware.validateAuthentication,
  actionController.getActionById
);

/**
 * Generate 404s.
 * Only use this at the bottom of custom route handlers.
 */
router.use((req, res) => {
  res.status(404).json({
    error: 'Not Found',
    request: req.body,
  });
});

module.exports = router;


text:
A simple, high performance thread pool on Windows platform written with Win32 API.
# Requirment
Need libcuckoo-windows to compile with. <https://github.com/litinglin/libcuckoo-windows>

Has been tested with msvc 2013.


text:
package org.apache.jena.fuseki.servlets;

import javax.servlet.http.HttpServletRequest ;

import org.apache.jena.atlas.web.AcceptList ;
import org.apache.jena.atlas.web.MediaType ;
import org.apache.jena.fuseki.DEF ;
import org.apache.jena.fuseki.conneg.ConNeg ;
import org.apache.jena.fuseki.server.DataAccessPoint ;
import org.apache.jena.fuseki.server.DataAccessPointRegistry ;

/** Operations related to servlets */

public class ActionLib {
    /**
     * A possible implementation for {@link ActionSPARQL#mapRequestToDataset}
     * that assumes the form /dataset/service.
     * @param action the request
     * @return the dataset
     */    public static String mapRequestToDataset(HttpAction action) {
         String uri = action.getActionURI() ;
         return mapActionRequestToDataset(uri) ;
     }

    /** Map request to uri in the registry.
     *  A possible implementation for mapRequestToDataset(String)
     *  that assumes the form /dataset/service
     *  Returning null means no mapping found.
     *  The URI must be the action URI (no contact path)
     */

    public static String mapActionRequestToDataset(String uri) {
        // Chop off trailing part - the service selector
        // e.g. /dataset/sparql => /dataset
        int i = uri.lastIndexOf('/') ;
        if ( i == -1 )
            return null ;
        if ( i == 0 )
        {
            // started with '/' - leave.
            return uri ;
        }

        return uri.substring(0, i) ;
    }

    /** Calculate the operation , given action and data access point */
    public static String mapRequestToOperation(HttpAction action, DataAccessPoint dsRef) {
        if ( dsRef == null )
            return "" ;
        String uri = action.getActionURI() ;
        String name = dsRef.getName();
        if ( name.length() >= uri.length() )
            return "" ;
        return uri.substring(name.length()+1) ;   // Skip the separating "/"

    }

    /** Implementation of mapRequestToDataset(String) that looks for
     * the longest match in the registry.
     * This includes use in direct naming GSP.
     */
    public static String mapRequestToDatasetLongest$(String uri)
    {
        if ( uri == null )
            return null ;

        // This covers local, using the URI as a direct name for
        // a graph, not just using the indirect ?graph= or ?default
        // forms.

        String ds = null ;
        for ( String ds2 : DataAccessPointRegistry.get().keys() ) {
            if ( ! uri.startsWith(ds2) )
                continue ;

            if ( ds == null )
            {
                ds = ds2 ;
                continue ;
            }
            if ( ds.length() < ds2.length() )
            {
                ds = ds2 ;
                continue ;
            }
        }
        return ds ;
    }

    /** Calculate the fill URL including query string
     * for the HTTP request. This may be quite long.
     * @param request HttpServletRequest
     * @return String The full URL, including query string.
     */
    public static String wholeRequestURL(HttpServletRequest request) {
        StringBuffer sb = request.getRequestURL() ;
        String queryString = request.getQueryString() ;
        if ( queryString != null ) {
            sb.append("?") ;
            sb.append(queryString) ;
        }
        return sb.toString() ;
    }

    /*
     * The context path can be:
     * "" for the root context
     * "/APP" for named contexts
     * so:
     * "/dataset/server" becomes "/dataset/server"
     * "/APP/dataset/server" becomes "/dataset/server"
     */
    public static String removeContextPath(HttpAction action) {

        return actionURI(action.request) ;
    }

    public static String actionURI(HttpServletRequest request) {
//      Log.info(this, "URI                     = '"+request.getRequestURI()) ;
//      Log.info(this, "Context path            = '"+request.getContextPath()+"'") ;
//      Log.info(this, "Servlet path            = '"+request.getServletPath()+"'") ;
//      ServletContext cxt = this.getServletContext() ;
//      Log.info(this, "ServletContext path     = '"+cxt.getContextPath()+"'") ;

        String contextPath = request.getServletContext().getContextPath() ;
        String uri = request.getRequestURI() ;
        if ( contextPath == null )
            return uri ;
        if ( contextPath.isEmpty())
            return uri ;
        String x = uri ;
        if ( uri.startsWith(contextPath) )
            x = uri.substring(contextPath.length()) ;
        //log.info("uriWithoutContextPath: uri = "+uri+" contextPath="+contextPath+ "--> x="+x) ;
        return x ;
    }

    /** Negotiate the content-type and set the response headers */
    public static MediaType contentNegotation(HttpAction action, AcceptList myPrefs,
                                              MediaType defaultMediaType) {
        MediaType mt = ConNeg.chooseContentType(action.request, myPrefs, defaultMediaType) ;
        if ( mt == null )
            return null ;
        if ( mt.getContentType() != null )
            action.response.setContentType(mt.getContentType()) ;
        if ( mt.getCharset() != null )
            action.response.setCharacterEncoding(mt.getCharset()) ;
        return mt ;
    }

    /** Negotiate the content-type for an RDF triples syntax and set the response headers */
    public static MediaType contentNegotationRDF(HttpAction action) {
        return contentNegotation(action, DEF.rdfOffer, DEF.acceptRDFXML) ;
    }

    /** Negotiate the content-type for an RDF quads syntax and set the response headers */
    public static MediaType contentNegotationQuads(HttpAction action) {
        return contentNegotation(action, DEF.quadsOffer, DEF.acceptNQuads) ;
    }
}


text:
<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/talent/v4beta1/tenant_service.proto

namespace Google\Cloud\Talent\V4beta1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Request to delete a tenant.
 *
 * Generated from protobuf message google.cloud.talent.v4beta1.DeleteTenantRequest
 */
class DeleteTenantRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the tenant to be deleted.
     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
     * "projects/foo/tenants/bar".
     *
     * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
     */
    private $name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The resource name of the tenant to be deleted.
     *           The format is "projects/{project_id}/tenants/{tenant_id}", for example,
     *           "projects/foo/tenants/bar".
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Talent\V4Beta1\TenantService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the tenant to be deleted.
     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
     * "projects/foo/tenants/bar".
     *
     * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The resource name of the tenant to be deleted.
     * The format is "projects/{project_id}/tenants/{tenant_id}", for example,
     * "projects/foo/tenants/bar".
     *
     * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

}


text:
package events

import (
	"github.com/Sirupsen/logrus"
	"github.com/docker/distribution/context"
	"github.com/docker/docker/api/types"
	"github.com/docker/docker/api/types/events"
	"github.com/docker/docker/client"
	rclient "github.com/rancher/go-rancher/client"
	"testing"
	"time"
)

func TestProcessDockerEvents(t *testing.T) {
	processor := NewDockerEventsProcessor(10)

	dockerClient, err := NewDockerClient()
	if err != nil {
		t.Fatal(err)
	}
	processor.getDockerClient = func() (*client.Client, error) {
		return dockerClient, nil
	}

	// Mock Handler
	handledEvents := make(chan *events.Message, 10)
	hFn := func(event *events.Message) error {
		handledEvents <- event
		return nil
	}
	handler := &testHandler{
		handlerFunc: hFn,
	}
	processor.getHandlers = func(dockerClient *client.Client,
		rancherClient *rclient.RancherClient) (map[string][]Handler, error) {
		return map[string][]Handler{"start": {handler}}, nil
	}

	// Create pre-existing containers before starting event listener
	preexistRunning, err := createNetTestContainer(dockerClient, "10.1.2.3")
	if err != nil {
		t.Fatal(err)
	}
	logrus.Infof("%+v", preexistRunning)
	defer func() {
		if err := dockerClient.ContainerRemove(context.Background(), preexistRunning.ID, types.ContainerRemoveOptions{
			Force:         true,
			RemoveVolumes: true,
		}); err != nil {
			t.Fatal(err)
		}
	}()
	if err := dockerClient.ContainerStart(context.Background(), preexistRunning.ID, types.ContainerStartOptions{}); err != nil {
		t.Fatal(err)
	}
	preexistPaused, _ := createNetTestContainer(dockerClient, "10.1.2.3")
	defer func() {
		if err := dockerClient.ContainerUnpause(context.Background(), preexistPaused.ID); err != nil {
			t.Fatal(err)
		}
		if err := dockerClient.ContainerRemove(context.Background(), preexistPaused.ID, types.ContainerRemoveOptions{
			Force:         true,
			RemoveVolumes: true,
		}); err != nil {
			t.Fatal(err)
		}
	}()
	if err := dockerClient.ContainerStart(context.Background(), preexistPaused.ID, types.ContainerStartOptions{}); err != nil {
		t.Fatal(err)
	}
	dockerClient.ContainerPause(context.Background(), preexistPaused.ID)

	if err := processor.Process(); err != nil {
		t.Fatal(err)
	}

	waitingOnRunning := true
	waitingOnPaused := true
	for waitingOnRunning || waitingOnPaused {
		select {
		case e := <-handledEvents:
			if e.ID == preexistRunning.ID {
				waitingOnRunning = false
			}
			if e.ID == preexistPaused.ID {
				waitingOnPaused = false
			}
		case <-time.After(10 * time.Second):
			t.Fatalf("Never received event for preexisting container [%v]", preexistRunning.ID)
		}
	}
}

func TestGetHandlers(t *testing.T) {
	dockerClient := prep(t)
	handlers, err := getHandlersFn(dockerClient, nil)
	if err != nil {
		t.Fatal(err)
	}
	// RancherClient is not nil, so SendToRancherHandler should be configured
	handlers, err = getHandlersFn(dockerClient, &rclient.RancherClient{})
	if err != nil {
		t.Fatal(err)
	}
	if len(handlers) != 5 {
		t.Fatalf("Expected 5 configured hanlders: %v, %#v", len(handlers), handlers)
	}
}


text:
@implementation Window

@synthesize windowController, webView;

- (id) initWithWebView:(WebView*)view
{
    if(self = [super init]) {
        self.webView = view;
    }
    return self;
}

- (void) open:(NSDictionary *)properties
{
    self.windowController = [[WindowController alloc] initWithURL:[properties valueForKey:@"url"]];
    [self.windowController showWindow: [NSApplication sharedApplication].delegate];
    [self.windowController.window makeKeyWindow];
}

- (void) move:(NSDictionary *)properties
{
    NSRect frame = [self.webView window].frame;
    frame.origin.x = [[properties valueForKey:@"x"] doubleValue];
    frame.origin.y = [[properties valueForKey:@"y"] doubleValue];
    [[self.webView window] setFrame:frame display:YES];

}

- (void) resize:(NSDictionary *) properties
{
    NSRect frame = [self.webView window].frame;
    frame.size.width = [[properties valueForKey:@"width"] doubleValue];
    frame.size.height = [[properties valueForKey:@"height"] doubleValue];
    [[self.webView window] setFrame:frame display:YES];
}

+ (BOOL) isSelectorExcludedFromWebScript:(SEL)selector
{
    return NO;
}

+ (NSString*) webScriptNameForSelector:(SEL)selector{
	id	result = nil;

	if (selector == @selector(open:)) {
		result = @"open";
	}else if (selector == @selector(move:)){
        result = @"move";
    }else if (selector == @selector(resize:)){
        result = @"resize";
    }

	return result;
}

+ (BOOL) isKeyExcludedFromWebScript:(const char*)name
{
	return YES;
}

@end


text:
var URLUtils = {
  constructURL : function(route, data)
  {
    var url = 'http://truetime.portauthority.org/bustime/api/v2/';
    url += route + '?';
    data.key = 'myAm3A47DLjS4wuSvvHCrgs42';
    data.format = 'json';
    var params = [];
    for (var key in data)
    {
      params.push(encodeURIComponent(key) + '=' + encodeURIComponent(data[key]));
    }
    url += params.join('&');
    return url;
  }
};

this.exports = URLUtils;


text:
using Common.Logging;
using Common.Logging.Configuration;
using DatabaseMigrateExt;
using Microsoft.Extensions.Configuration;
using Serilog;
using System;

namespace DemoLog.Serilog
{
    class Program
    {
        static void Main(string[] args)
        {
            IConfiguration config = new ConfigurationBuilder()
                .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                .Build();

            // Common logging
            LogConfiguration logConfiguration = new LogConfiguration();
            config.GetSection("LogConfiguration").Bind(logConfiguration);
            LogManager.Configure(logConfiguration);

            // Serilog
            var log = new LoggerConfiguration()
                 .ReadFrom.Configuration(config) // Serilog.Settings.Configuration
                .WriteTo.ColoredConsole()
                //.WriteTo.File("Logs/log.txt", rollingInterval: RollingInterval.Day) // reading from appsetting.json
                .CreateLogger();

            Log.Logger = log;

            ExtMigrationRunner.Initialize().Process();

            log.Error("Test error message");
            log.Information("test information message");

            log.Information("===================================================================");
        }
    }
}


text:
import React, {PropTypes} from 'react';
import styled from 'styled-components';
import Grid from './Grid';

export default function PageHeader({label, aside}) {
  return (
    <PageHeaderContainer>
      <PageHeaderBackdrop />
      <Grid>
        <Grid.Cell size="6" verticalAlign="middle">
          <PageTitle>
            {label}
          </PageTitle>
        </Grid.Cell>
        {aside && (
          <Grid.Cell size="6" verticalAlign="middle">
            <PageActions>
              {aside}
            </PageActions>
          </Grid.Cell>
        )}
      </Grid>
    </PageHeaderContainer>
  );
}

PageHeader.propTypes = {
  label: PropTypes.string,
  aside: PropTypes.node
};

const PageHeaderContainer = styled.div`
  border-bottom: 1px solid #f1f2f3;
  position: relative;

  > div {
    height: 72px;
  }
`;

const PageHeaderBackdrop = styled.div`
  position: absolute;
  height: 74px;
  left: -9999em;
  right: -9999em;
  opacity: 0.25;
  background: ${(props) => props.theme.gray1};
  background-image: linear-gradient(-180deg, rgba(255, 255, 255, 0.39) 0%, white 100%);
  z-index: -1;
`;

const PageTitle = styled.div`
  font-weight: 500;
  font-size: 17px;
  color: ${(props)=> props.theme.gray5};
`;

const PageActions = styled.div`
  text-align: right;
`;