text:
<#
.SYNOPSIS
	1) Installs the SqlIaaS extension by calling Set-AzureRmVMSqlServerExtension cmdlet on a VM.
	2) Calls Get-AzureRmVMSqlServerExtension cmdlet to check the status of the extension installation.
	3) Verifies settings are correct given input
	4) Update extension values
	5) Verify changes
	6) Test with correct Name and Version
	7) Test with correct Name and incorrect Version
	8) Test with incorrect Name and crrect Version
	9) Test with incorrect Name and incorrect Version
#>

function Test-SetAzureRmVMSqlServerAKVExtension
{
    Set-StrictMode -Version latest; $ErrorActionPreference = 'Stop'

    # Setup
    $rgname = Get-ComputeTestResourceName
    $loc = Get-ComputeVMLocation

    try
    {
        # Common
        New-AzureRmResourceGroup -Name $rgname -Location $loc -Force;

        # VM Profile & Hardware
        $vmsize = 'Standard_A2';
        $vmname = 'vm' + $rgname;
        $p = New-AzureRmVMConfig -VMName $vmname -VMSize $vmsize;
        Assert-AreEqual $p.HardwareProfile.VmSize $vmsize;

        # NRP
        $subnet = New-AzureRmVirtualNetworkSubnetConfig -Name ('subnet' + $rgname) -AddressPrefix "10.0.0.0/24";
        $vnet = New-AzureRmVirtualNetwork -Force -Name ('vnet' + $rgname) -ResourceGroupName $rgname -Location $loc -AddressPrefix "10.0.0.0/16" -Subnet $subnet;
        $vnet = Get-AzureRmVirtualNetwork -Name ('vnet' + $rgname) -ResourceGroupName $rgname;
        $subnetId = $vnet.Subnets[0].Id;
        $pubip = New-AzureRmPublicIpAddress -Force -Name ('pubip' + $rgname) -ResourceGroupName $rgname -Location $loc -AllocationMethod Dynamic -DomainNameLabel ('pubip' + $rgname);
        $pubip = Get-AzureRmPublicIpAddress -Name ('pubip' + $rgname) -ResourceGroupName $rgname;
        $pubipId = $pubip.Id;
        $nic = New-AzureRmNetworkInterface -Force -Name ('nic' + $rgname) -ResourceGroupName $rgname -Location $loc -SubnetId $subnetId -PublicIpAddressId $pubip.Id;
        $nic = Get-AzureRmNetworkInterface -Name ('nic' + $rgname) -ResourceGroupName $rgname;
        $nicId = $nic.Id;

        $p = Add-AzureRmVMNetworkInterface -VM $p -Id $nicId;
        Assert-AreEqual $p.NetworkProfile.NetworkInterfaces.Count 1;
        Assert-AreEqual $p.NetworkProfile.NetworkInterfaces[0].Id $nicId;

        # Storage Account
        $stoname = 'sto' + $rgname;
        $stotype = 'Standard_GRS';
        New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype;
        Retry-IfException { $global:stoaccount = Get-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname; }

        $osDiskName = 'osDisk';
        $osDiskCaching = 'ReadWrite';
        $osDiskVhdUri = "https://$stoname.blob.core.windows.net/test/os.vhd";
        $dataDiskVhdUri1 = "https://$stoname.blob.core.windows.net/test/data1.vhd";

        $p = Set-AzureRmVMOSDisk -VM $p -Name $osDiskName -VhdUri $osDiskVhdUri -Caching $osDiskCaching -CreateOption FromImage;
        $p = Add-AzureRmVMDataDisk -VM $p -Name 'testDataDisk1' -Caching 'ReadOnly' -DiskSizeInGB 10 -Lun 1 -VhdUri $dataDiskVhdUri1 -CreateOption Empty;

        # OS & Image
        $user = "localadmin";
        $password = $PLACEHOLDER;
        $securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
        $cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
        $computerName = 'test';
        $vhdContainer = "https://$stoname.blob.core.windows.net/test";

        $p = Set-AzureRmVMOperatingSystem -VM $p -Windows -ComputerName $computerName -Credential $cred -ProvisionVMAgent;
        $p = Set-AzureRmVMSourceImage -VM $p -PublisherName MicrosoftSQLServer -Offer SQL2014SP1-WS2012R2 -Skus Enterprise -Version "latest"

        # Virtual Machine
        New-AzureRmVM -ResourceGroupName $rgname -Location $loc -VM $p;

        #Do actual changes and work here

        $extensionName = "Microsoft.SqlServer.Management.SqlIaaSAgent";

        # 1) Installs the SqlIaaS extension by calling Set-AzureRmVMSqlServerExtension cmdlet on a VM.

        $securepfxpwd = ConvertTo-SecureString –String "Amu6y/RzJcc7JBzdAdRVv6mk=" –AsPlainText –Force;
        $aps_akv = New-AzureVMSqlServerKeyVaultCredentialConfig -ResourceGroupName $rgname -Enable -CredentialName "CredentialTesting" -AzureKeyVaultUrl "https://Testkeyvault.vault.azure.net/" -ServicePrincipalName "0326921f-bf005595337c" -ServicePrincipalSecret $securepfxpwd;
        Set-AzureRmVMSqlServerExtension -KeyVaultCredentialSettings $aps_akv -ResourceGroupName $rgname -VMName $vmname -Version "1.2" -Verbose;

        # 2) Calls Get-AzureRmVMSqlServerExtension cmdlet to check the status of the extension installation.
        $extension = Get-AzureRmVMSqlServerExtension -ResourceGroupName $rgname -VmName $vmName -Name $extensionName;

        # 3) Verifies settings are correct given input

        Assert-AreEqual $extension.KeyVaultCredentialSettings.CredentialName "CredentialTesting";

        # 4) Update extension values

        $aps_akv = New-AzureVMSqlServerKeyVaultCredentialConfig -ResourceGroupName $rgname -Enable -CredentialName "CredentialTest" -AzureKeyVaultUrl "https://Testkeyvault.vault.azure.net/" -ServicePrincipalName "0326921f-82af-4ab3-9d46-bf005595337c" -ServicePrincipalSecret $securepfxpwd;
        Set-AzureRmVMSqlServerExtension -KeyVaultCredentialSettings $aps_akv -ResourceGroupName $rgname -VMName $vmname -Version "1.2" -Verbose;

        # 5) Verify changes
        $extension = Get-AzureRmVMSqlServerExtension -ResourceGroupName $rgname -VmName $vmName -Name $extensionName;

        Assert-AreEqual $extension.KeyVaultCredentialSettings.CredentialName "CredentialTest"

        # 6) Test with correct Name and Version

        Set-AzureRmVMSqlServerExtension -KeyVaultCredentialSettings $aps_akv  -ResourceGroupName $rgname -VMName $vmName -Name $extensionName -Version "1.2"

        # 7) Test with correct Name and incorrect Version
        Set-AzureRmVMSqlServerExtension -KeyVaultCredentialSettings $aps_akv  -ResourceGroupName $rgname -VMName $vmName -Name $extensionName -Version "1.*"
    }
    finally
    {
        # Cleanup
        if(Get-AzureRmResourceGroup -Name $rgname -Location $loc)
        {
             #Remove-AzureRmResourceGroup -Name $rgname -Force;
        }
    }
}

function Test-SetAzureRmVMSqlServerExtension
{
    Set-StrictMode -Version latest; $ErrorActionPreference = 'Stop'

    # Setup
    $rgname = Get-ComputeTestResourceName
    $loc = Get-ComputeVMLocation

    try
    {
        # Common
        New-AzureRmResourceGroup -Name $rgname -Location $loc -Force;

        # VM Profile & Hardware
        $vmsize = 'Standard_A2';
        $vmname = 'vm' + $rgname;
        $p = New-AzureRmVMConfig -VMName $vmname -VMSize $vmsize;
        Assert-AreEqual $p.HardwareProfile.VmSize $vmsize;

        # NRP
        $subnet = New-AzureRmVirtualNetworkSubnetConfig -Name ('subnet' + $rgname) -AddressPrefix "10.0.0.0/24";
        $vnet = New-AzureRmVirtualNetwork -Force -Name ('vnet' + $rgname) -ResourceGroupName $rgname -Location $loc -AddressPrefix "10.0.0.0/16" -Subnet $subnet;
        $vnet = Get-AzureRmVirtualNetwork -Name ('vnet' + $rgname) -ResourceGroupName $rgname;
        $subnetId = $vnet.Subnets[0].Id;
        $pubip = New-AzureRmPublicIpAddress -Force -Name ('pubip' + $rgname) -ResourceGroupName $rgname -Location $loc -AllocationMethod Dynamic -DomainNameLabel ('pubip' + $rgname);
        $pubip = Get-AzureRmPublicIpAddress -Name ('pubip' + $rgname) -ResourceGroupName $rgname;
        $pubipId = $pubip.Id;
        $nic = New-AzureRmNetworkInterface -Force -Name ('nic' + $rgname) -ResourceGroupName $rgname -Location $loc -SubnetId $subnetId -PublicIpAddressId $pubip.Id;
        $nic = Get-AzureRmNetworkInterface -Name ('nic' + $rgname) -ResourceGroupName $rgname;
        $nicId = $nic.Id;

        $p = Add-AzureRmVMNetworkInterface -VM $p -Id $nicId;
        Assert-AreEqual $p.NetworkProfile.NetworkInterfaces.Count 1;
        Assert-AreEqual $p.NetworkProfile.NetworkInterfaces[0].Id $nicId;

        # Storage Account
        $stoname = 'sto' + $rgname;
        $stotype = 'Standard_GRS';
        New-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname -Location $loc -Type $stotype;
        Retry-IfException { $global:stoaccount = Get-AzureRmStorageAccount -ResourceGroupName $rgname -Name $stoname; }

        $osDiskName = 'osDisk';
        $osDiskCaching = 'ReadWrite';
        $osDiskVhdUri = "https://$stoname.blob.core.windows.net/test/os.vhd";
        $dataDiskVhdUri1 = "https://$stoname.blob.core.windows.net/test/data1.vhd";

        $p = Set-AzureRmVMOSDisk -VM $p -Name $osDiskName -VhdUri $osDiskVhdUri -Caching $osDiskCaching -CreateOption FromImage;
        $p = Add-AzureRmVMDataDisk -VM $p -Name 'testDataDisk1' -Caching 'ReadOnly' -DiskSizeInGB 10 -Lun 1 -VhdUri $dataDiskVhdUri1 -CreateOption Empty;

        # OS & Image
        $user = "localadmin";
        $password = $PLACEHOLDER;
        $securePassword = ConvertTo-SecureString $password -AsPlainText -Force;
        $cred = New-Object System.Management.Automation.PSCredential ($user, $securePassword);
        $computerName = 'test';
        $vhdContainer = "https://$stoname.blob.core.windows.net/test";

        $p = Set-AzureRmVMOperatingSystem -VM $p -Windows -ComputerName $computerName -Credential $cred -ProvisionVMAgent;
        $p = Set-AzureRmVMSourceImage -VM $p -PublisherName MicrosoftSQLServer -Offer SQL2014SP1-WS2012R2 -Skus Enterprise -Version "latest"

        # Virtual Machine
        New-AzureRmVM -ResourceGroupName $rgname -Location $loc -VM $p;

        #Do actual changes and work here

        $extensionName = "Microsoft.SqlServer.Management.SqlIaaSAgent";

        # 1) Installs the SqlIaaS extension by calling Set-AzureRmVMSqlServerExtension cmdlet on a VM.
        $aps = New-AzureVMSqlServerAutoPatchingConfig -Enable -DayOfWeek "Thursday" -MaintenanceWindowStartingHour 20 -MaintenanceWindowDuration 120 -PatchCategory "Important"
        Set-AzureRmVMSqlServerExtension -AutoPatchingSettings $aps  -ResourceGroupName $rgname -VMName $vmname -Version "1.2" -Verbose -Name $extensionName;

        # 2) Calls Get-AzureRmVMSqlServerExtension cmdlet to check the status of the extension installation.
        $extension = Get-AzureRmVMSqlServerExtension -ResourceGroupName $rgname -VmName $vmName -Name $extensionName;

        # 3) Verifies settings are correct given input
        Assert-AreEqual $extension.AutoPatchingSettings.DayOfWeek "Thursday"
        Assert-AreEqual $extension.AutoPatchingSettings.MaintenanceWindowStartingHour 20
        Assert-AreEqual $extension.AutoPatchingSettings.MaintenanceWindowDuration 120
        Assert-AreEqual $extension.AutoPatchingSettings.PatchCategory "Important"

        # 4) Update extension values
        $aps = New-AzureVMSqlServerAutoPatchingConfig -Enable -DayOfWeek "Monday" -MaintenanceWindowStartingHour 20 -MaintenanceWindowDuration 120 -PatchCategory "Important"
        Set-AzureRmVMSqlServerExtension -AutoPatchingSettings $aps  -ResourceGroupName $rgname -VMName $vmname -Version "1.2" -Verbose -Name $extensionName;

        # 5) Verify changes
        $extension = Get-AzureRmVMSqlServerExtension -ResourceGroupName $rgname -VmName $vmName -Name $extensionName;
        Assert-AreEqual $extension.AutoPatchingSettings.DayOfWeek "Monday"

        # 6) Test with correct Name and Version
        Set-AzureRmVMSqlServerExtension -AutoPatchingSettings $aps  -ResourceGroupName $rgname -VMName $vmName -Name $extensionName -Version "1.2"

        # 7) Test with correct Name and incorrect Version
        Set-AzureRmVMSqlServerExtension -AutoPatchingSettings $aps  -ResourceGroupName $rgname -VMName $vmName -Name $extensionName -Version "1.*"
    }
    finally
    {
        # Cleanup
        if(Get-AzureRmResourceGroup -Name $rgname -Location $loc)
        {
            #Remove-AzureRmResourceGroup -Name $rgname -Force;
        }
    }
}

#helper methods for ARM
function Get-DefaultResourceGroupLocation
{
    if ([Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Mode -ne [Microsoft.Azure.Test.HttpRecorder.HttpRecorderMode]::Playback)
    {
        $namespace = "Microsoft.Resources"
        $type = "resourceGroups"
        $location = Get-AzureRmResourceProvider -ProviderNamespace $namespace | where {$_.ResourceTypes[0].ResourceTypeName -eq $type}

        if ($location -eq $null)
        {
            return "West US"
        } else
        {
            return $location.Locations[0]
        }
    }
    return "West US"
}


text:
package vocabletrainer.heinecke.aron.vocabletrainer;

import androidx.annotation.NonNull;

import java.util.Arrays;
import java.util.List;

import vocabletrainer.heinecke.aron.vocabletrainer.eximport.CSV.CSVCustomFormat;
import vocabletrainer.heinecke.aron.vocabletrainer.eximport.CSV.MultiMeaningHandler;

import static org.junit.Assert.*;

import org.junit.Test;

/**
 * Tests for multi-meaning parsing
 */
public class MultiMeaningParserTest {
    @Test
    public void importMultiValueEscapingTest_Full(){
        CSVCustomFormat format = CSVCustomFormat.DEFAULT;
        MultiMeaningHandler mmh = new MultiMeaningHandler(format);
        final String[] meaningsInput = {"A\\/1","B\\\\2","C3"};
        final String[] meanings = {"A/1","B\\2","C3"};
        assertTrue(format.isMultiValueEnabled());
        assertTrue(format.isMVEscapeEnabled());
        String input = joinStringArray(meaningsInput,format.getMultiValueChar());
        System.out.println(input);
        List<String> result = mmh.parseMultiMeaning(input);
        assertArrayEquals(meanings,result.toArray());
    }

    @Test
    public void importMultiValueEscapingTest_Single(){
        CSVCustomFormat format = CSVCustomFormat.DEFAULT;
        MultiMeaningHandler mmh = new MultiMeaningHandler(format);
        final String[] meaningsInput = {"A\\/1"};
        final String[] meanings = {"A/1"};
        String input = joinStringArray(meaningsInput,format.getMultiValueChar());
        System.out.println(input);
        List<String> result = mmh.parseMultiMeaning(input);
        assertArrayEquals(meanings,result.toArray());
    }

    @Test
    public void importMultiValueEscapingTest_No_Escape(){
        CSVCustomFormat formatDefault = CSVCustomFormat.DEFAULT;
        CSVCustomFormat format = new CSVCustomFormat(formatDefault.getFormat(),
                formatDefault.getMultiValueChar(),null);
        MultiMeaningHandler mmh = new MultiMeaningHandler(format);
        assertTrue(format.isMultiValueEnabled());
        assertFalse(format.isMVEscapeEnabled());
        final String[] meaningsInput = {"A\\/1","B\\\\2","C3"};
        final String[] meanings = {"A\\","1","B\\\\2","C3"};
        String input = joinStringArray(meaningsInput,format.getMultiValueChar());
        System.out.println(input);
        List<String> result = mmh.parseMultiMeaning(input);
        assertArrayEquals(meanings,result.toArray());
    }

    @Test
    public void importMultiValueEscapingTest_No_Multivalue(){
        CSVCustomFormat formatDefault = CSVCustomFormat.DEFAULT;
        CSVCustomFormat format = new CSVCustomFormat(formatDefault.getFormat(),
                null,null);
        MultiMeaningHandler mmh = new MultiMeaningHandler(format);
        assertFalse(format.isMVEscapeEnabled());
        assertFalse(format.isMultiValueEnabled());
        final String[] meaningsInput = {"A\\/1","B\\\\2","C3"};
        final String[] meanings = {"A\\/1/B\\\\2/C3"};
        String input = joinStringArray(meaningsInput,formatDefault.getMultiValueChar());
        System.out.println(input);
        List<String> result = mmh.parseMultiMeaning(input);
        assertArrayEquals(meanings,result.toArray());
    }

    @Test
    public void importMultiValueEscapingTest_Full_Trim(){
        CSVCustomFormat format = CSVCustomFormat.DEFAULT;
        MultiMeaningHandler mmh = new MultiMeaningHandler(format);
        final String[] meaningsInput = {" A \\/1 "," B\\\\2 "," C3 "," C \\ /4"};
        final String[] meanings = {"A /1","B\\2","C3","C","4"};
        assertTrue(format.trim());
        assertTrue(format.isMultiValueEnabled());
        assertTrue(format.isMVEscapeEnabled());
        String input = joinStringArray(meaningsInput,format.getMultiValueChar());
        System.out.println(input);
        List<String> result = mmh.parseMultiMeaning(input);
        assertArrayEquals(meanings,result.toArray());
    }

    @Test
    public void importMultiValueEscapingTest_Full_No_Trim(){
        CSVCustomFormat formatDefault = CSVCustomFormat.DEFAULT;
        CSVCustomFormat format = new CSVCustomFormat(
                formatDefault.getFormat().withIgnoreSurroundingSpaces(false));
        MultiMeaningHandler mmh = new MultiMeaningHandler(format);
        final String[] meaningsInput = {" A \\/1 "," B\\\\2 "," C3 "," C \\ /4"};
        final String[] meanings = {" A /1 "," B\\2 "," C3 "," C  ","4"};
        assertFalse(format.trim());
        assertTrue(format.isMultiValueEnabled());
        assertTrue(format.isMVEscapeEnabled());
        String input = joinStringArray(meaningsInput,format.getMultiValueChar());
        System.out.println(input);
        List<String> result = mmh.parseMultiMeaning(input);
        assertArrayEquals(meanings,result.toArray());
    }

    /**
     * Join String array
     * @param array array of string
     * @param c join char
     * @return
     */
    public static String joinStringArray(@NonNull String[] array, final char c){
        return Arrays.stream(array).reduce("",(x,y) -> {
            if(x.length() > 0) {
                return x + c + y;
            } else {
                return y;
            }
        });
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

/**
 * This code was generated by
 * \ / _    _  _|   _  _
 * | (_)\/(_)(_|\/| |(/_  v1.0.0
 * /       /
 */

namespace Twilio\Rest;

use Twilio\Domain;
use Twilio\Exceptions\TwilioException;
use Twilio\Rest\Taskrouter\V1;

/**
 * @property \Twilio\Rest\Taskrouter\V1 v1
 * @property \Twilio\Rest\Taskrouter\V1\WorkspaceList workspaces
 * @method \Twilio\Rest\Taskrouter\V1\WorkspaceContext workspaces(string $sid)
 */
class Taskrouter extends Domain {
    protected $_v1 = null;

    /**
     * Construct the Taskrouter Domain
     *
     * @param \Twilio\Rest\Client $client Twilio\Rest\Client to communicate with
     *                                    Twilio
     * @return \Twilio\Rest\Taskrouter Domain for Taskrouter
     */
    public function __construct(Client $client) {
        parent::__construct($client);

        $this->baseUrl = 'https://taskrouter.twilio.com';
    }

    /**
     * @return \Twilio\Rest\Taskrouter\V1 Version v1 of taskrouter
     */
    protected function getV1() {
        if (!$this->_v1) {
            $this->_v1 = new V1($this);
        }
        return $this->_v1;
    }

    /**
     * Magic getter to lazy load version
     *
     * @param string $name Version to return
     * @return \Twilio\Version The requested version
     * @throws \Twilio\Exceptions\TwilioException For unknown versions
     */
    public function __get($name) {
        $method = 'get' . ucfirst($name);
        if (method_exists($this, $method)) {
            return $this->$method();
        }

        throw new TwilioException('Unknown version ' . $name);
    }

    /**
     * Magic caller to get resource contexts
     *
     * @param string $name Resource to return
     * @param array $arguments Context parameters
     * @return \Twilio\InstanceContext The requested resource context
     * @throws \Twilio\Exceptions\TwilioException For unknown resource
     */
    public function __call($name, $arguments) {
        $method = 'context' . ucfirst($name);
        if (method_exists($this, $method)) {
            return call_user_func_array(array($this, $method), $arguments);
        }

        throw new TwilioException('Unknown context ' . $name);
    }

    /**
     * @return \Twilio\Rest\Taskrouter\V1\WorkspaceList
     */
    protected function getWorkspaces() {
        return $this->v1->workspaces;
    }

    /**
     * @param string $sid The sid
     * @return \Twilio\Rest\Taskrouter\V1\WorkspaceContext
     */
    protected function contextWorkspaces($sid) {
        return $this->v1->workspaces($sid);
    }

    /**
     * Provide a friendly representation
     *
     * @return string Machine friendly representation
     */
    public function __toString() {
        return '[Twilio.Taskrouter]';
    }
}


text:
<!doctype html>

  <title>React Axios Examples</title>
  <link href="/style.css" rel="stylesheet"/>

React Axios Basic Examples

Request
 <Request
  axios={axios.create({})}
  method=""
  url=""
  data=""
  config=""
  debounce=200
  isReady={true}
  onSuccess={(response)=>{}}
  onLoading={(response)=>{}}
  onError="(error)=>{}"
/>

Alias Helper Components
<Get ... />
<Delete ... />
<Head ... />
<Post ... />
<Put ... />
<Patch ... />

React Axios Advanced Examples

Advanced
      Example of invoke different requests

AxiosProvider
      Create axios instance and pass down through prop or a provider

withAxios() HoC
      Use the HoC withAxios to wrap existing components with react-axios and supplied .
export default withAxios({options})(ComponentToBeWrapped)


text:
using HyperSlackers.AspNet.Identity.EntityFramework;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HyperSlackers.DbContext.Demo.Models
{
    // DRM Added
    public class InvoiceItemModel : IAuditable<Guid>
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public Guid Id { get; set; }
        public Guid HostId { get; set; }
        public string Code { get; set; }
        public string Description { get; set; }
        public double Price { get; set; }

    }
}


text:
package com.ctrip.xpipe.redis.meta.server.impl.event;

import com.ctrip.xpipe.redis.core.entity.KeeperMeta;
import com.ctrip.xpipe.redis.meta.server.impl.MetaUpdated;

/**
 * @author wenchao.meng
 *
 * Jun 23, 2016
 */
public class ActiveKeeperChanged extends AbstractMetaUpdated implements MetaUpdated{

	private KeeperMeta oldKeeperMeta;
	private KeeperMeta newKeeperMeta;

	public ActiveKeeperChanged(String clusterId, String shardId, KeeperMeta oldKeeperMeta, KeeperMeta newKeeperMeta){
		super(clusterId, shardId);
		this.oldKeeperMeta = oldKeeperMeta;
		this.newKeeperMeta = newKeeperMeta;
	}

	public KeeperMeta getNewKeeperMeta() {
		return newKeeperMeta;
	}

	public KeeperMeta getOldKeeperMeta() {
		return oldKeeperMeta;
	}

}


text:
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security;
using InteropDotNet;

namespace InteropCostManaged
{
  public interface INative
  {
    [RuntimeDllImport("InteropTarget", EntryPoint = "InteropTarget")]
    int InteropTargetRuntime(int a, int b, int x, int d);
  }

  class Program {
    [DllImport("InteropTarget", EntryPoint = "InteropTarget")]
    private static extern int InteropTargetRegular(int a, int b, int x, int d);

    [DllImport("InteropTarget", EntryPoint = "InteropTarget")]
    [SuppressUnmanagedCodeSecurity]
    private static extern int InteropTargetFast(int a, int b, int x, int d);

    static void Main(string[] args)
    {
      int a, b, x, d;
      a = 1;
      b = 2;
      x = 66;
      d = 3;

      NativePreloadHelper.Preload("InteropTarget");
      var native = InteropRuntimeImplementer.CreateInstance<INative>();

      var sw = Stopwatch.StartNew();

      var iterations = 100000000;
      double iterationsPerNsMsRatio = iterations/1000000;
      for (int i = 0; i < iterations; i++)
        InteropTargetRegular(a, b, x, d);

      var ms = sw.ElapsedMilliseconds;
      Console.WriteLine("{0}/{1}ns per normal [DllImport] call", ms, ms / iterationsPerNsMsRatio);

      sw = Stopwatch.StartNew();
      for (int i = 0; i < iterations; i++)
        InteropTargetFast(a, b, x, d);

      ms = sw.ElapsedMilliseconds;
      Console.WriteLine("{0}/{1}ns per [DllImport] + [SuppressUnmanagedCodeSecurity] call", ms, ms / iterationsPerNsMsRatio);

      sw = Stopwatch.StartNew();
      for (int i = 0; i < iterations; i++)
        native.InteropTargetRuntime(a, b, x, d);

      ms = sw.ElapsedMilliseconds;
      Console.WriteLine("{0}/{1}ns per [RuntimeDllImport] call", ms, ms / iterationsPerNsMsRatio);
    }
  }
}


text:
/* Check if the '-fno-zero-link' flag correctly _omits_ an objc_getClass() call. */
/* Contributed by Ziemowit Laski <zlaski@apple.com>.  */
/* { dg-options "-fnext-runtime -fno-zero-link" } */
/* { dg-do compile } */

#include <objc/objc.h>
#include <objc/Object.h>

extern void abort(void);
#define CHECK_IF(expr) if(!(expr)) abort();

@interface Base: Object
+ (int) getValue;
@end

@implementation Base
+ (int) getValue { return 1593; }
@end

int main(void) {
  int val = [Base getValue];
  CHECK_IF(val == 1593);
  return 0;
}

/* { dg-final { scan-assembler "_OBJC_CLASS_REFERENCES_0" } } */
/* { dg-final { scan-assembler-not "objc_getClass" } } */


text:
package mobi.tarantino.stub.auto.model.auth;

import mobi.tarantino.stub.auto.model.auth.pojo.AuthCodeMobiApiAnswer;
import mobi.tarantino.stub.auto.model.auth.pojo.AuthTokenMobiApiAnswer;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Api only for getting token. Last docs located here: https://docs.google
 * .com/document/d/16v6JISwN3B4G9kTwMaJpIo5bOag14ahM5nMEeAAs2Tk
 */

public interface MobiAuthApi {
    @POST("/authorize")
    @Headers("Cache-Control: no-cache")
    Observable<AuthCodeMobiApiAnswer> authorize(@Query("username") String username);

    @FormUrlEncoded
    @POST("/token")
    @Headers("Cache-Control: no-cache")
    Observable<AuthTokenMobiApiAnswer> getToken(@Field("code") String codeFormAuth, @Field
            ("vcode") String smsCode);
}


text:
package backend.transform.utils;

import backend.transform.scalars.GVNPRE;
import backend.value.Instruction;
import backend.value.Value;
import tools.Util;

/**
 * This file defines a class that implements a nested hash table that maps
 * {@code Instruction} to an integer.
 *

 * This class is used for global redundant instruction elimination corporated with
 * {@code GVNPRE} class.
 *

 * Thanks to Maxime virtual machine team, because this source code mainly references
 * to it's contribution.
 *

 * Created by Jianping Zeng  on 2016/3/17.
 *
 * @see GVNPRE
 */
public class ValueMap {
  /**
   * This class only used for forming hash chain.
   */
  private static class Link {
    final ValueMap map;
    final int valueNumber;
    final Value value;
    final Link next;

    /**
     * Constructor.
     *
     * @param map
     * @param number
     * @param value
     * @param next
     */
    Link(ValueMap map, int number, Value value, Link next) {
      this.map = map;
      this.valueNumber = number;
      this.value = value;
      this.next = next;
    }
  }

  private final ValueMap parent;

  /**
   * The table of links, indexed by {@link Instruction#valueNumber()} method.
   */
  private Link[] table;

  /**
   * The numbers of entries in this map.
   */
  private int count;

  /**
   * The maximun getArraySize of hash table allowed. It will be resized when load
   * factor is no less than 0.75.
   */
  private int max;

  /**
   * Constructs a new map.
   */
  public ValueMap() {
    parent = null;
    table = new Link[19];
  }

  public ValueMap(ValueMap parent) {
    this.parent = parent;
    this.table = parent.table.clone();
    this.count = parent.count;
    this.max = table.length + table.length / 2;
  }

  /**
   * Inserts a inst into the inst map and looks up any previously available inst.
   *
   * @param x the instruction to insert into the inst map
   * @return the inst with which to replace the specified instruction, or the specified
   * instruction if there is no replacement
   */
  public Value findInsert(Value x) {
    int valueNumber = x.valueNumber();

    // take insertion of current instruction x into Links list,
    // ignoring it if it's value number is equal to zero that means this
    // instruction is not referenced by other instruction.
    if (valueNumber != 0) {
      // inst number != 0 means the instruction can be inst numbered
      int index = indexOf(valueNumber, table);
      Link l = table[index];
      // hash and linear search
      while (l != null) {
        if (l.valueNumber == valueNumber && l.value.valueEqual(x)) {
          return l.value;
        }
        l = l.next;
      }
      // not found
      // insert at head of chain
      table[index] = new Link(this, valueNumber, x, table[index]);

      // resize it if it's count is larger than max
      if (count > max) {
        resize();
      }
    }
    return x;
  }

  /**
   * Kills all VALUES in this local inst map.
   */
  public void killAll() {
    Util.assertion(parent == null, "should only used for local number value.");

    for (int i = 0; i < table.length; i++) {
      table[i] = null;
    }
    count = 0;
  }

  /**
   * Resizing the hash table where all of map stores.
   */
  private void resize() {
    Link[] ntable = new Link[table.length * 3 + 4];

    if (parent != null) {
      for (int idx = 0; idx < table.length; ++idx) {
        Link current = table[idx];
        // skips all of entries in this map.
        while (current != null && current.map == this)
          current = current.next;
        // copy all of entries in parent map and do insertion into a new
        // hash table.
        while (current != null) {
          int index = indexOf(current.valueNumber, ntable);
          ntable[index] = new Link(current.map, current.valueNumber,
              current.value, ntable[index]);

          current = current.next;
        }
      }
    }

    for (int i = 0; i < table.length; i++) {
      Link l = table[i];
      // now add all the entries from this map
      while (l != null && l.map == this) {
        int index = indexOf(l.valueNumber, ntable);
        ntable[index] = new Link(l.map, l.valueNumber, l.value,
            ntable[index]);
        l = l.next;
      }
    }
    table = ntable;
    max = table.length + table.length / 2;
  }

  private int indexOf(int valueNumber, Link[] t) {
    return (valueNumber & 0x7fffffff) % t.length;
  }
}


text:
layout: post
title: Sınıf Yönetiminde Başlıca Yaklaşımlar
date: 2012-01-29 01:54
author: admin
comments: true
tags: [Eğitim Bilimleri, Eğitim Bilimleri]
---
1) Rehberlik (Danışmanlık) Yaklaşımı

Bu yaklaşım ABD 'de 1960'lı ve 1979'li yıllarda etkili olmuştur. Rehberlik yaklaşımında öğrencilerin olumsuz davranışlarının düzeltilmesinde öğretmen önemli rol oynar.Öğretmen olumsuz davranışlarının düzeltilmesinde öğrenciye
psikolojik rehberlik yapar.Bu amaçla,öğretmenler kısa bir eğitim alarak,sınıf ortamında istenmeyen davranışta bulunan öğrencilerin sorununu anlamaya çalışır,onlara kendilerini daha iyi anlamaları,yetişkinlerle işbirliği yapmaları ve
daha üretici olmaları için yardımcı olurlar.

2) Davranışçı Yaklaşım

Bu yaklaşımda sınıf ortamında olumsuz öğrenci davranışlarının davranışçı yöntemlerle değiştirilmesi temel alınmaktadır.Davranışçı yaklaşımda olumsuz öğrenci davranışları,pekiştirme model olma ve ceza gibi tekniklerle
değiştirilmeye çalışılır.
3) Etkili Öğretmenlik Yaklaşımı

Bu yaklaşım 1970'li yıllarda ortaya çıkmıştır. Rehberlik ve Davranışçı yaklaşımda 'Öğrencinin olumsuz davranışı karşısında öğretmen ne yapmalı?' sorusuna yanıt aranırken, etkili öğretmenlik yaklaşımında 'Öğrencilerin olumsuz
davranışları nasıl önlenir?' sorusu önem kazanmaktadır. Etkili öğretmenlik kavramı eğitimciler tarafından çokca incelenen konulardan biridir. Medly (1979) etkili öğretmenlikle ilgili beş özellik tanımlamıştır. Medly ' e göre etkili
öğretmen:


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

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

import org.camunda.bpm.engine.ClassLoadingException;
import org.camunda.bpm.engine.ProcessEngineException;
import org.camunda.bpm.engine.impl.test.PluggableProcessEngineTestCase;
import org.camunda.bpm.engine.impl.util.CollectionUtil;
import org.camunda.bpm.engine.runtime.Execution;
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.camunda.bpm.engine.task.Task;
import org.camunda.bpm.engine.test.Deployment;
import org.camunda.bpm.engine.test.bpmn.servicetask.util.GenderBean;

/**
 * @author Joram Barrez
 * @author Frederik Heremans
 */
public class JavaServiceTaskTest extends PluggableProcessEngineTestCase {

  @Deployment
  public void testJavaServiceDelegation() {
    ProcessInstance pi = runtimeService.startProcessInstanceByKey("javaServiceDelegation", CollectionUtil.singletonMap("input", "Activiti BPM Engine"));
    Execution execution = runtimeService.createExecutionQuery()
      .processInstanceId(pi.getId())
      .activityId("waitState")
      .singleResult();
    assertEquals("ACTIVITI BPM ENGINE", runtimeService.getVariable(execution.getId(), "input"));
  }

  @Deployment
  public void testFieldInjection() {
    // Process contains 2 service-tasks using field-injection. One should use the exposed setter,
    // the other is using the private field.
    ProcessInstance pi = runtimeService.startProcessInstanceByKey("fieldInjection");
    Execution execution = runtimeService.createExecutionQuery()
      .processInstanceId(pi.getId())
      .activityId("waitState")
      .singleResult();

    assertEquals("HELLO WORLD", runtimeService.getVariable(execution.getId(), "var"));
    assertEquals("HELLO SETTER", runtimeService.getVariable(execution.getId(), "setterVar"));
  }

  @Deployment
  public void testExpressionFieldInjection() {
    Map<String, Object> vars = new HashMap<String, Object>();
    vars.put("name", "kermit");
    vars.put("gender", "male");
    vars.put("genderBean", new GenderBean());

    ProcessInstance pi = runtimeService.startProcessInstanceByKey("expressionFieldInjection", vars);
    Execution execution = runtimeService.createExecutionQuery()
      .processInstanceId(pi.getId())
      .activityId("waitState")
      .singleResult();

    assertEquals("timrek .rM olleH", runtimeService.getVariable(execution.getId(), "var2"));
    assertEquals("elam :si redneg ruoY", runtimeService.getVariable(execution.getId(), "var1"));
  }

  @Deployment
  public void testUnexistingClassDelegation() {
    try {
      runtimeService.startProcessInstanceByKey("unexistingClassDelegation");
      fail();
    } catch (ProcessEngineException e) {
      assertTrue(e.getMessage().contains("Exception while instantiating class 'org.camunda.bpm.engine.test.BogusClass'"));
      assertNotNull(e.getCause());
      assertTrue(e.getCause() instanceof ClassLoadingException);
    }
  }

  public void testIllegalUseOfResultVariableName() {
    try {
      repositoryService.createDeployment().addClasspathResource("org/camunda/bpm/engine/test/bpmn/servicetask/JavaServiceTaskTest.testIllegalUseOfResultVariableName.bpmn20.xml").deploy();
      fail();
    } catch (ProcessEngineException e) {
      assertTrue(e.getMessage().contains("resultVariable"));
    }
  }

  @Deployment
  public void testExceptionHandling() {

    // If variable value is != 'throw-exception', process goes
    // through service task and ends immidiately
    Map<String, Object> vars = new HashMap<String, Object>();
    vars.put("var", "no-exception");
    runtimeService.startProcessInstanceByKey("exceptionHandling", vars);
    assertEquals(0, runtimeService.createProcessInstanceQuery().count());

    // If variable value == 'throw-exception', process executes
    // service task, which generates and catches exception,
    // and takes sequence flow to user task
    vars.put("var", "throw-exception");
    runtimeService.startProcessInstanceByKey("exceptionHandling", vars);
    Task task = taskService.createTaskQuery().singleResult();
    assertEquals("Fix Exception", task.getName());
  }

  @Deployment
  public void testGetBusinessKeyFromDelegateExecution() {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("businessKeyProcess", "1234567890");
    assertEquals(1, runtimeService.createProcessInstanceQuery().processDefinitionKey("businessKeyProcess").count());

    // Check if business-key was available from the process
    String key = (String) runtimeService.getVariable(processInstance.getId(), "businessKeySetOnExecution");
    assertNotNull(key);
    assertEquals("1234567890", key);
  }

}


text:
uint32_t _IRtimer_unittest_now = 0;
uint32_t _TimerMs_unittest_now = 0;
#endif  // UNIT_TEST

// This class performs a simple time in useconds since instantiated.
// Handles when the system timer wraps around (once).
IRtimer::IRtimer() { reset(); }

void IRtimer::reset() {
#ifndef UNIT_TEST
  start = micros();
#else
  start = _IRtimer_unittest_now;
#endif
}

uint32_t IRtimer::elapsed() {
#ifndef UNIT_TEST
  uint32_t now = micros();
#else
  uint32_t now = _IRtimer_unittest_now;
#endif
  if (start <= now)      // Check if the system timer has wrapped.
    return now - start;  // No wrap.
  else
    return UINT32_MAX - start + now;  // Has wrapped.
}

// Only used in unit testing.
#ifdef UNIT_TEST
void IRtimer::add(uint32_t usecs) { _IRtimer_unittest_now += usecs; }
#endif  // UNIT_TEST

// This class performs a simple time in milli-seoncds since instantiated.
// Handles when the system timer wraps around (once).
TimerMs::TimerMs() { reset(); }

void TimerMs::reset() {
#ifndef UNIT_TEST
  start = millis();
#else
  start = _TimerMs_unittest_now;
#endif
}

uint32_t TimerMs::elapsed() {
#ifndef UNIT_TEST
  uint32_t now = millis();
#else
  uint32_t now = _TimerMs_unittest_now;
#endif
  if (start <= now)      // Check if the system timer has wrapped.
    return now - start;  // No wrap.
  else
    return UINT32_MAX - start + now;  // Has wrapped.
}

// Only used in unit testing.
#ifdef UNIT_TEST
void TimerMs::add(uint32_t msecs) { _IRtimer_unittest_now += msecs; }
#endif  // UNIT_TEST


text:
require 'spec_helper'

describe '::influxdb', :type => :class do
  context 'Debian default parameters' do
      describe "influxdb class without any parameters on Debian" do
        let(:params) {{ }}
        let(:facts) {{
          :osfamily => 'Debian',
          :operatingsystem => 'Debian',
          :lsbdistid => 'Debian',
          :operatingsystemrelease => '7.8',
          :lsbdistcodename => 'wheezy',
        }}

        it { should compile.with_all_deps }
        it { should contain_class('influxdb::params') }
        it { should contain_class('influxdb::install').that_comes_before('class[influxdb::config]') }
        it { should contain_class('influxdb::config') }
        it { should contain_class('influxdb::service').that_subscribes_to('class[influxdb::config]') }
        it { should contain_service('influxdb') }
        it { should contain_package('influxdb').with_ensure('present') }
      end
  end

  context 'RedHat default parameters' do
      describe "influxdb class without any parameters on RedHat" do
        let(:params) {{ }}
        let(:facts) {{
          :osfamily => 'RedHat',
          :operatingsystem => 'RedHat',
          :operatingsystemrelease => '6',
          :lsbdistid => 'RedHat',
        }}

        it { should compile.with_all_deps }
        it { should contain_class('influxdb::params') }
        it { should contain_class('influxdb::install').that_comes_before('class[influxdb::config]') }
        it { should contain_class('influxdb::config') }
        it { should contain_class('influxdb::service').that_subscribes_to('class[influxdb::config]') }
        it { should contain_service('influxdb') }
        it { should contain_package('influxdb').with_ensure('present') }
      end
  end

  context 'unsupported operating system' do
    describe 'influxdb class without any parameters on Solaris/Nexenta' do
      let(:facts) {{
        :osfamily        => 'Solaris',
        :operatingsystem => 'Nexenta',
      }}

      it { expect { should contain_package('influxdb') }.to raise_error(Puppet::Error, /Nexenta not supported/) }
    end
  end

  context "with default parameters" do
    let :facts do
      {
        :osfamily => 'Debian',
        :operatingsystem => 'Debian',
        :lsbdistid => 'Debian',
        :operatingsystemrelease => '7.8',
        :lsbdistcodename => 'wheezy',
      }
    end
    it { is_expected.to contain_file("/etc/influxdb/influxdb.conf").with(
        'ensure'  => 'file',
        'owner'   => 'influxdb',
        'group'   => 'influxdb',
        'mode'    => '0640',
    ) }
    it do
      is_expected.to contain_file("/etc/influxdb/influxdb.conf").with_content %r{dir = "/var/lib/influxdb/meta"}
      is_expected.to contain_file("/etc/influxdb/influxdb.conf").with_content %r{dir = "/var/lib/influxdb/hh"}
      is_expected.to contain_file("/etc/influxdb/influxdb.conf").with_content %r{dir = "/var/lib/influxdb/data"}
      is_expected.to contain_file("/var/lib/influxdb/meta")
      is_expected.to contain_file("/var/lib/influxdb/hh")
      is_expected.to contain_file("/var/lib/influxdb/data")
    end
  end

  context "when declaring another dir" do
    let :facts do
      {
        :osfamily => 'Debian',
        :operatingsystem => 'Debian',
        :lsbdistid => 'Debian',
        :operatingsystemrelease => '7.8',
        :lsbdistcodename => 'wheezy',
      }
    end
    let(:params) { {
      :data => {
         'dir' => '/data/influxdb/data',
      },
      :meta => {
         'dir' => '/data/influxdb/meta',
      },
      :hh => {
         'dir' => '/data/influxdb/hh',
      },
    } }
    it do
      is_expected.to contain_file("/etc/influxdb/influxdb.conf").with_content %r{dir = "/data/influxdb/meta"}
      is_expected.to contain_file("/etc/influxdb/influxdb.conf").with_content %r{dir = "/data/influxdb/hh"}
      is_expected.to contain_file("/etc/influxdb/influxdb.conf").with_content %r{dir = "/data/influxdb/data"}
      is_expected.to contain_file("/data/influxdb/meta")
      is_expected.to contain_file("/data/influxdb/hh")
      is_expected.to contain_file("/data/influxdb/data")
    end
  end

  context "with specific wal size plugin" do
    let :facts do
      {
        :osfamily => 'Debian',
        :lsbdistid => 'Debian',
        :operatingsystem => 'Debian',
        :operatingsystemrelease => '7.8',
        :lsbdistcodename => 'wheezy',
      }
    end
    let :params do
      {   :data => { 'max-wal-size' => '1024000'}
      }
    end
    it { is_expected.to contain_file("/etc/influxdb/influxdb.conf").with_content %r{max-wal-size = 1024000} }
  end

end


text:
import * as React from 'react';
import { CSSModule } from '../index';

export type NavItemProps<T = {}> = React.HTMLAttributes<HTMLElement> & {
  tag?: React.ReactType;
  active?: boolean;
  className?: string;
  cssModule?: CSSModule;
} & T;

declare class NavItem<T = {[key: string]: any}> extends React.Component<NavItemProps<T>> {}
export default NavItem;


text:
package com.alibaba.cobar.manager.qa.monitor;

import java.util.List;

import org.junit.Assert;
import org.junit.Test;

import com.alibaba.cobar.manager.dataobject.cobarnode.DataNodesStatus;

public class TestDataSources extends TestCobarAdapter {
    @Test
    public void testDataSourcesCommand() {
        List<DataNodesStatus> dsStatusList = cobarAdapter.listDataNodes();
        Assert.assertTrue(dsStatusList.size() > 0);
    }
}


text:
<?php
/**
 * @category    Grafikentwicklung
 * @package     Tracking
 * @author      Grafik, Entwicklung & IT Service <info@pierrearlt.com>
 * @date        21.11.2016
 * @license     https://github.com/parlt/Grafikentwicklung_Tracking/blob/master/LICENSE The MIT License (MIT)
 */

/**
 * Class Grafikentwicklung_Tracking_Block_Shopzilla_Body
 */
class Grafikentwicklung_Tracking_Block_Shopzilla_Body extends Grafikentwicklung_Tracking_Block_Common_Abstract
{

    protected function _construct()
    {
        parent::_construct();
        $this->setTemplate('grafikentwicklung/tracking/shopzilla/body.phtml');
    }

    /**
     * @return array
     */
    public function getShopZillaSalesTrackingData()
    {
        /** @var Grafikentwicklung_Tracking_Model_Salestracking $model */
        $model = $this->getModelWithLoggedDataBySession(Grafikentwicklung_Tracking_Model_Salestracking::TYPE_CHECKOUT);
        if ($model) {
            $data = [
                'cust_type' => !empty($model->getData('transaction_is_new_customer')) ? '1' : '0',
                'order_value' => $model->getData('transaction_total'),
                'order_id' => $model->getData('transaction_id'),
                'units_ordered' => $model->getData('transaction_units_ordered')
            ];

            return $data;
        }

        return [
            'cust_type' => '0',
            'order_value' => 0,
            'order_id' => 0,
            'units_ordered' => 0
        ];
    }
}


text:
package Evoke.Core.Session;

import Evoke.Core.Mover;

/**
 * Defines how a stream of data is split into the tree of representative segments.
 */
public interface SegmentationStrategy extends Mover {
    boolean segmentAvailable();
    PlaySegment getSegment();
}


text:
package io.nodyn.fs;

import io.netty.buffer.ByteBuf;
import jnr.posix.POSIX;
import jnr.posix.POSIXFactory;

/**
 * @author Lance Ball
 */
public class Fs {
    public static int read(POSIX posix, int fd, ByteBuf buf, int offset, int length) {
        byte[] input = new byte[length];
        int read = posix.read(fd, input, length);
        if (read != -1) {
            buf.setBytes(offset, input, 0, read);
            buf.writerIndex(Math.max(buf.writerIndex(), offset + read));
        }
        return read;
    }

    public static int pread(POSIX posix, int fd, ByteBuf buf, int offset, int length, int position) {
        byte[] input = new byte[length];
        int read = posix.pread(fd, input, length, position);
        if (read != -1) {
            buf.setBytes(offset, input, 0, read);
            buf.writerIndex(Math.max(buf.writerIndex(), offset + read));
        }
        return read;
    }
}


text:
module Choco
  class PluginGenerator < Thor::Group
    include Thor::Actions

    def self.source_root
      File.dirname(__FILE__)
    end

    desc 'Generates a Choco plugin (Sammy or js-model)'
    argument :name
    class_option :for_lib

    def create_model_file
      @plugin_name = name.camelcase.singularize
      @name = name.underscore.singularize
      template('templates/lib/plugin.js', "lib/plugin_#{@name}.js")
    end

  end
end


text:
type Module = { [name: string]: any } | (() => any);
type RequireMap = { [filepath: string]: Module };

/**
 * Return module from a given map (like {react: require('react')}) or throw.
 * We allow to require modules only from Markdown examples (won't work dynamically because we need to know all required
 * modules in advance to be able to bundle them with the code).
 */
export default function requireInRuntime(requireMap: RequireMap, filepath: string): Module {
	if (!(filepath in requireMap)) {
		throw new Error(
			`import or require() statements can be added only by editing a Markdown example file: ${filepath}`
		);
	}

	return requireMap[filepath];
}


text:
package com.simplegame.server.bus.account;

/**
 *
 * @Author zeusgooogle@gmail.com
 * @sine   2015年6月4日 下午4:47:37
 *
 */

public class AccountModuleInfo {

	public static final String MODULE_NAME = "role_account";
	public static final String MODULE_NAME_ALIAS = "RA";

}


text:
$('div[data-doi]').each(function( index ) {
   doi = $( this ).attr("data-doi");
   $( this ).parent().prev().append(''+doi+' ')
   if (doi.includes('figshare')){
          $( this ).parent().prev().append('')
       }

    $.getJSON( "https://api.crossref.org/v1/works/http://dx.doi.org/"+doi,
           function(data)
                {
                  publisher = data.message.publisher;
                  if (publisher.includes('PLoS') || publisher.includes('PeerJ') || publisher.includes('Nature') || publisher.includes('Wiley') || publisher.includes('Springer') ){

                    $('div[data-doi="'+data.message.DOI+'"]').parent().prev().append('')
                    console.log($('div[data-doi="'+data.message.DOI+'"]').parent().prev())
                  }

                }
         );
});


text:
package com.ipfaffen.ovenbird.commons;

import java.util.List;

/**
 * @author Isaias Pfaffenseller
 */
public class Pagination {

	private List<Integer> pages;
	private PagingHelper paging;
	private Integer pageFirstIndex;
	private Integer pageLastIndex;

	/**
	 * @param paging
	 */
	public Pagination(PagingHelper paging) {
		this.paging = paging;
		pages = PagingUtil.buildLimitedPageList(paging, 9);
		if(paging.getPageNumber() > 1) {
			pageFirstIndex = ((paging.getPageNumber() - 1) * paging.getPageSize());
			pageLastIndex = (pageFirstIndex + paging.getPageSize());
			pageFirstIndex += 1;
		}
		else {
			pageFirstIndex = 1;
			pageLastIndex = paging.getPageSize();
		}
		if(pageLastIndex > paging.getTotalRows()) {
			pageLastIndex = paging.getTotalRows();
		}
	}

	/**
	 * @return
	 */
	public PagingHelper getPaging() {
		return paging;
	}

	/**
	 * @return
	 */
	public List<Integer> getPages() {
		return pages;
	}

	/**
	 * @return
	 */
	public Integer getPageFirstIndex() {
		return pageFirstIndex;
	}

	/**
	 * @return
	 */
	public Integer getPageLastIndex() {
		return pageLastIndex;
	}
}


text:
package pouteam.com.example.pouteam;

import android.support.v7.app.ActionBarActivity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class SubmitForm extends ActionBarActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_submit_form);
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

		Button submitInfo = (Button)findViewById(R.id.submitInfo);
		final EditText Vacc = (EditText) findViewById(R.id.Vacc);
		final EditText Morts = (EditText) findViewById(R.id.Morts);
		final EditText Infect = (EditText) findViewById(R.id.Infect);
		submitInfo.setOnClickListener(new View.OnClickListener() {
			@Override
			 public void onClick(View v) {
             //envoyer les donnees vers le serveur apres avoir recup les valeurs des fields
				Log.d("EditText", Vacc.getText().toString());
	            String TextInVacc = Vacc.getText().toString();
	            Log.d("EditText", Morts.getText().toString());
	            String TextInMorts = Morts.getText().toString();
	            Log.d("EditText", Infect.getText().toString());
	            String TextInInfect = Infect.getText().toString();
            }
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.submit_form, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// Handle action bar item clicks here. The action bar will
		// automatically handle clicks on the Home/Up button, so long
		// as you specify a parent activity in AndroidManifest.xml.
		int id = item.getItemId();
		if (id == R.id.action_settings) {
			return true;
		}
		return super.onOptionsItemSelected(item);
	}
}


text:
package com.jetbrains.env;

import com.intellij.execution.process.ProcessListener;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.projectRoots.Sdk;
import com.jetbrains.commandInterface.command.SimpleCommand;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Arrays;
import java.util.List;

/**
 * {@link ProcessWithConsoleRunner} that runs {@link SimpleCommand}.
 * It uses {@link SimpleProcessRunnerConsole} so you have access to console
 *
 * @author Ilya.Kazakevich
 * @see PyProcessWithConsoleTestTask
 * @see com.jetbrains.commandInterface.command
 */
public class CommandBasedProcessRunner extends ProcessWithConsoleRunner {
  @NotNull
  private final SimpleCommand myCommand;
  @NotNull
  private final Module myModule;
  @NotNull
  private final List<String> myParameters;

  /**
   * @param command    command to run
   * @param module     module to run on
   * @param parameters command parameters
   */
  public CommandBasedProcessRunner(@NotNull final SimpleCommand command,
                                   @NotNull final Module module,
                                   final String @NotNull ... parameters) {
    myCommand = command;
    myModule = module;
    myParameters = Arrays.asList(parameters);
  }

  @Override
  void runProcess(@NotNull final String sdkPath,
                  @Nullable Sdk sdk,
                  @NotNull final Project project,
                  @NotNull final ProcessListener processListener,
                  @NotNull final String tempWorkingPath) {
    myConsole = new SimpleProcessRunnerConsole(project, processListener);
    myCommand.execute(myCommand.getName(), myModule, myParameters, myConsole);
  }
}


text:
class UpdateMenuDeleteObject < ActiveRecord::Migration[4.2]
  def self.up
    permission = Permission.find_by_name('administer assignments')

    site_controller = SiteController.create(name: 'delete_object', permission_id: permission.id)

    Role.rebuild_cache
  end

  def self.down; end
end


text:
export const ids = {
  ID_TOKEN: 'ID_TOKEN',
  ACCESS_TOKEN: 'ACCESS_TOKEN',
  TOKEN_EXPIRES_AT: 'TOKEN_EXPIRES_AT',
  TOKEN_PAYLOAD: 'TOKEN_PAYLOAD',
  SHOPPING_CART: 'SHOPPING_CART',
  REDIRECT_URI: 'REDIRECT_URI',
};

export const store = (id, data) => localStorage.setItem(id, JSON.stringify(data));

export const load = id => JSON.parse(localStorage.getItem(id));

export const remove = id => localStorage.removeItem(id);


text:
. ./dev.sh

go get github.com/siddontang/go-log/log
go get github.com/siddontang/go-snappy/snappy

go get github.com/siddontang/goleveldb/leveldb

go get github.com/szferi/gomdb

go get github.com/boltdb/bolt

go get github.com/ugorji/go/codec
go get github.com/BurntSushi/toml

go get github.com/siddontang/go-bson/bson

go get github.com/siddontang/go-tokuft/tokuft


text:
oslo.config
===========

An OpenStack library for parsing configuration options from the command
line and configuration files.

Contents
========

.. toctree::
   :maxdepth: 2

   cfg
   opts
   configopts
   helpers
   parser
   exceptions

Release Notes
=============

1.2.0
-----

* 1223667_: Fix DictOpt to split only the first colon
* 1228995_: Disallow duplicate keys in DictOpt
* Explicit version removed from setup.cfg
* Dependency version updates

.. _1223667: https://bugs.launchpad.net/oslo/+bug/1223667
.. _1228995: https://bugs.launchpad.net/oslo/+bug/1228995

1.2.0a4
-------

* Add auto-create support for OptGroup instances (see review 41865_)
* Publish full API docs to docs.openstack.org_
* Finished Python 3 support
* 1196601_: Raise an exception if print_help() is called before __call__
* Fix DeprecatedOpt equality test
* Use oslo.sphinx

.. _41865: https://review.openstack.org/41865
.. _1196601: https://bugs.launchpad.net/oslo/+bug/1196601
.. _docs.openstack.org:  http://docs.openstack.org/developer/oslo.config/

1.2.0a3
-------

* 1176817_: Fix the priority of CLI args vs config file values
* 1123043_: New 'choices' param to StrOpt constructor
* cfg-reload-config-files_: Add new ConfigOpts.reload_config_files() method
* 1194742_: Fix regression which meant we weren't registering our namespace package
* 1185959_: Make --help output order alphabetical
* More progress on python3 support
* Fix obscure cache clearing race condition
* Move from tools/pip-requires to requirements.txt
* Include missing .testr.conf in dist tarball

.. _1176817: https://bugs.launchpad.net/oslo/+bug/1176817
.. _1123043: https://bugs.launchpad.net/oslo/+bug/1123043
.. _cfg-reload-config-files: https://blueprints.launchpad.net/oslo/+spec/cfg-reload-config-files
.. _1194742: https://bugs.launchpad.net/oslo/+bug/1194742
.. _1185959: https://bugs.launchpad.net/oslo/+bug/1185959

1.2.0a2
-------

* Fix MultiConfigParser API breakage in 1.2.0a1

1.2.0a1
-------

* Solid progress has been made adding Python 3 support.
* cfg-lowercase-groups_: uppercase section names in config files are now normalized to lowercase.
* Support has been added for dictionary style options with the ``DictOpt`` class.
* Multiple deprecated option names per option are now supported via the ``deprecated_opts`` argument.
* The package build process now uses pbr_.
* The package tests are now run using testr_.
* The package coding style checks are now performed using hacking_.

.. _cfg-lowercase-groups: https://blueprints.launchpad.net/oslo/+spec/cfg-lowercase-groups
.. _pbr: http://docs.openstack.org/developer/pbr/
.. _testr: https://wiki.openstack.org/wiki/Testr
.. _hacking: https://pypi.python.org/pypi/hacking

1.1.1
-----

* 1160922_: Fix set_defaults() to handle multiple arguments
* 1175096_: Fix the title argument to ``OptGroup``

.. _1160922: https://bugs.launchpad.net/oslo/+bug/1160922
.. _1175096: https://bugs.launchpad.net/oslo/+bug/1175096

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`


text:
/**
 * Foodstuff.js
 *
 * @description :: TODO: You might write a short summary of how this model works and what it represents here.
 * @docs        :: http://sailsjs.org/documentation/concepts/models-and-orm/models
 */

module.exports = {

  tableName: 'in_fridge_foodstuff',
  attributes: {

    category: {
        type: 'int'
    },
    foodstuff: {
        type: 'int'
    },
    foodstuff_name: {
        type: 'string'
    },
    best_before_date: {
        type: 'date'
    },

    owner: {
        model: 'fridge'
    }

  }
};


text:
using System;

namespace DevProLauncher.Network.Data
{
    [Serializable]
    public class LoginRequest
    {
        public string Username { get; set; }
        public string Password { get; set; }
        public int Version { get; set; }
        public string UID { get; set; }
        public string HID { get; set; }
    }
}


text:
.. role:: hidden
    :class: hidden-section

Data
====

:hidden:`AbsDataHolder`
-----------------------

.. autoclass:: cogitare.data.AbsDataHolder
    :show-inheritance:
    :special-members:
    :members:

:hidden:`TensorHolder`
----------------------

.. autoclass:: cogitare.data.TensorHolder
    :show-inheritance:
    :special-members:
    :members:

:hidden:`NumpyHolder`
---------------------

.. autofunction:: cogitare.data.NumpyHolder

:hidden:`CallableHolder`
------------------------

.. autoclass:: cogitare.data.CallableHolder
    :show-inheritance:
    :special-members:
    :members:

:hidden:`AutoHolder`
--------------------

.. autofunction:: cogitare.data.AutoHolder

:hidden:`DataSet`
-----------------

.. autoclass:: cogitare.data.DataSet
    :members:
    :special-members:


text:
<?xml version="1.0" encoding="utf-8" ?>
<litepal>
    <dbname value = "Collections"></dbname>
    <version value="1"></version>
    <list>
        <mapping class="com.example.bajie.jianwen.db.Collection"></mapping>
    </list>
</litepal>


text:
package com.here;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import javax.annotation.PreDestroy;

import org.springframework.beans.factory.InitializingBean;

public class StartupBean implements InitializingBean {
	private ExecutorService executor;

	@Override
	public void afterPropertiesSet() {
		/**
		 * Launch Hosebird service in a thread because
		 * 1) It runs continuously
		 * 2) If we didn't do it in a thread it would block the rest of the web server startup
		 */
		this.executor = Executors.newFixedThreadPool(1);
		HosebirdThread t= new HosebirdThread();
		executor.execute(t);
	}

	@PreDestroy
	public void atShutdown() {
		this.executor.shutdownNow();
	}
}

class HosebirdThread implements Runnable {

	@Override
	public void run() {
		try {

			String consumerKey = "R2srtfc5kEIxuQfiyG9pEA";
			String consumerSecret = "0id5kQT8ZSkQuNRBDhIlKOrE3sKvPDGAfmgIVVZPI";
			String accessToken = "312942836-izeK4pfEQGOt48ySWyKYRQJBdgz716cFFcDqh1eg";
			String accessTokenSecret = "d99NY9IjkygnrPtAqafn77aDyqp0PAhztSaXhqyJE40fp";

			System.out.println("Starting Hosebird Service . . . . .");
			HosebirdService.oauth(consumerKey, consumerSecret, accessToken,
					accessTokenSecret);
		} catch (InterruptedException e) {
			System.err.println(e);
		}

	}

}


text:
package com.cadiducho.minegram.api;

import java.util.List;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * This object represent a user's profile pictures.
 */
@ToString
@Getter @Setter
public class UserProfilePhotos {

    /**
     * Total number of profile pictures the target user has
     */
    private Integer total_count;

    /**
     * Requested profile pictures (in up to 4 sizes each)
     */
    private List<List<PhotoSize>> photos;

}


text:
import glob
import os
from time import sleep
import hashlib
from subprocess import call

path_to_ase = "path\\to\\aseprite.exe"

def main():
    while True:
        for filename in glob.glob("*.ase"):

            # Try to find an existing instance for that file
            file = AseFile.find_file(filename)

            if file:
                # check if md5 changed between passes
                new_file = AseFile(filename)
                if new_file.hash != file.hash:
                    new_file.export()
                    AseFile.files.remove(file)
                    AseFile.files.append(new_file)
            else:
                # Create an instance and save it
                file = AseFile(filename)
                file.export()
                AseFile.files.append(file)

        sleep(2)

class AseFile:
    files = []

    def __init__(self, name):
        self.name = name
        self.hash = self.get_hash()
        self.png_name = os.path.splitext(self.name)[0] + ".png"

    def get_hash(self):
        fullpath = os.path.abspath(self.name)
        return hashlib.md5(open(fullpath, 'rb').read()).hexdigest()

    def export(self):
        call([path_to_ase, "--batch", self.name, "--sheet", self.png_name])

    @classmethod
    def find_file(cls, filename):
        for file in cls.files:
            if file.name == filename:
                return file
        return False

if __name__ == "__main__":
    main()


text:
<resources>
    <string name="app_name">TestOCR</string>
</resources>


text:
package org.optaplanner.benchmark.impl.ranking;

import java.util.Comparator;
import java.util.List;
import java.util.Objects;

import org.optaplanner.benchmark.impl.result.SingleBenchmarkResult;
import org.optaplanner.benchmark.impl.result.SolverBenchmarkResult;
import org.optaplanner.core.api.domain.solution.PlanningSolution;
import org.optaplanner.core.api.score.Score;

/**
 * This {@link SolverRankingWeightFactory} orders a {@link SolverBenchmarkResult} by how many times each of its
 * {@link SingleBenchmarkResult}s beat {@link SingleBenchmarkResult}s of the other {@link SolverBenchmarkResult}.
 * It maximizes the overall ranking.
 * <p>
 * When the inputSolutions differ greatly in size or difficulty, this often produces a difference in
 * {@link Score} magnitude between each {@link PlanningSolution}. For example: score 10 for dataset A versus 1000 for dataset B.
 * In such cases, this ranking is more fair than {@link TotalScoreSolverRankingComparator},
 * because in this ranking, dataset B wouldn't marginalize dataset A.
 */
public class TotalRankSolverRankingWeightFactory implements SolverRankingWeightFactory {

    private final Comparator<SingleBenchmarkResult> singleBenchmarkRankingComparator =
            new TotalScoreSingleBenchmarkRankingComparator();

    @Override
    public Comparable createRankingWeight(List<SolverBenchmarkResult> solverBenchmarkResultList,
            SolverBenchmarkResult solverBenchmarkResult) {
        int betterCount = 0;
        int equalCount = 0;
        int lowerCount = 0;
        List<SingleBenchmarkResult> singleBenchmarkResultList = solverBenchmarkResult.getSingleBenchmarkResultList();
        for (SingleBenchmarkResult single : singleBenchmarkResultList) {
            List<SingleBenchmarkResult> otherSingleList = single.getProblemBenchmarkResult().getSingleBenchmarkResultList();
            for (SingleBenchmarkResult otherSingle : otherSingleList) {
                if (single == otherSingle) {
                    continue;
                }
                int scoreComparison = singleBenchmarkRankingComparator.compare(single, otherSingle);
                if (scoreComparison > 0) {
                    betterCount++;
                } else if (scoreComparison == 0) {
                    equalCount++;
                } else {
                    lowerCount++;
                }
            }
        }
        return new TotalRankSolverRankingWeight(solverBenchmarkResult, betterCount, equalCount, lowerCount);
    }

    public static class TotalRankSolverRankingWeight implements Comparable<TotalRankSolverRankingWeight> {

        private final Comparator<SolverBenchmarkResult> totalScoreSolverRankingComparator =
                new TotalScoreSolverRankingComparator();

        private SolverBenchmarkResult solverBenchmarkResult;
        private int betterCount;
        private int equalCount;
        private int lowerCount;

        public SolverBenchmarkResult getSolverBenchmarkResult() {
            return solverBenchmarkResult;
        }

        public int getBetterCount() {
            return betterCount;
        }

        public int getEqualCount() {
            return equalCount;
        }

        public int getLowerCount() {
            return lowerCount;
        }

        public TotalRankSolverRankingWeight(SolverBenchmarkResult solverBenchmarkResult,
                int betterCount, int equalCount, int lowerCount) {
            this.solverBenchmarkResult = solverBenchmarkResult;
            this.betterCount = betterCount;
            this.equalCount = equalCount;
            this.lowerCount = lowerCount;
        }

        @Override
        public int compareTo(TotalRankSolverRankingWeight other) {
            return Comparator
                    .comparingInt(TotalRankSolverRankingWeight::getBetterCount)
                    .thenComparingInt(TotalRankSolverRankingWeight::getEqualCount)
                    .thenComparingInt(TotalRankSolverRankingWeight::getLowerCount)
                    .thenComparing(TotalRankSolverRankingWeight::getSolverBenchmarkResult, totalScoreSolverRankingComparator) // Tie-breaker
                    .compare(this, other);
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            } else if (o instanceof TotalRankSolverRankingWeight) {
                TotalRankSolverRankingWeight other = (TotalRankSolverRankingWeight) o;
                return this.compareTo(other) == 0;
            } else {
                return false;
            }
        }

        @Override
        public int hashCode() {
            return Objects.hash(betterCount, equalCount, lowerCount);
        }

    }

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Resources;
using System.Diagnostics;

namespace BrandSupport
{
    public class BrandingControl
    {
        private ResourceManager resources;

        public BrandingControl(string path)
        {
            Assembly sat = Assembly.LoadFile(path);
            resources = new ResourceManager("textstrings", sat);
            Trace.WriteLine("Resource manager created");
        }

        public string getString(string key)
        {
            try
            {
                string res = this.resources.GetString(key);
                Trace.WriteLine(key + ":" + res);
                return res;
            }
            catch (Exception e)
            {
                Trace.WriteLine("Unknown Branding : " + key);
                Trace.WriteLine(e.ToString());
                return "Unknown Branding " + key;
            }
        }
    }
}


text:
#ifndef DESCRIPTOR_BASE_HPP
#define DESCRIPTOR_BASE_HPP

#include "../data_structures/coordinate_calculation.hpp"
#include "../data_structures/internal_route_result.hpp"
#include "../data_structures/phantom_node.hpp"
#include "../typedefs.h"

#include <boost/assert.hpp>

#include <osrm/json_container.hpp>

#include <string>
#include <unordered_map>
#include <vector>

struct DescriptorTable : public std::unordered_map<std::string, unsigned>
{
    unsigned get_id(const std::string &key)
    {
        auto iter = find(key);
        if (iter != end())
        {
            return iter->second;
        }
        return 0;
    }
};

struct DescriptorConfig
{
    DescriptorConfig() : instructions(true), geometry(true), encode_geometry(true), zoom_level(18)
    {
    }

    template <class OtherT>
    DescriptorConfig(const OtherT &other)
        : instructions(other.print_instructions), geometry(other.geometry),
          encode_geometry(other.compression), zoom_level(other.zoom_level)
    {
        BOOST_ASSERT(zoom_level >= 0);
    }

    bool instructions;
    bool geometry;
    bool encode_geometry;
    short zoom_level;
};

template <class DataFacadeT> class BaseDescriptor
{
  public:
    BaseDescriptor() {}
    // Maybe someone can explain the pure virtual destructor thing to me (dennis)
    virtual ~BaseDescriptor() {}
    virtual void Run(const InternalRouteResult &raw_route, osrm::json::Object &json_result) = 0;
    virtual void SetConfig(const DescriptorConfig &c) = 0;
};

#endif // DESCRIPTOR_BASE_HPP


text:
/*
 * The MainMenu state is responsible for showing the
 * main menu of the game.
 *
 * The main menu has a scrolling background with two options
 * of new solo game or new multiplayer game. The difference
 * between the two is that `Game.multiplayer` is set to true
 * on the new mulitplayer option.
 */
module.exports = (function(Game) {
  Game.States.MainMenu = function(game) {
    this.juicy;
    this.screenFlash;
  }

  Game.States.MainMenu.prototype = {
    create: function() {

      var game = this.game;

      this.startTime = game.time.now;

      var image = this.game.cache.getImage('logo'),
        centerX = this.world.centerX,
        centerY = this.world.centerY - image.height,
        endY    = this.world.height + image.height,
        textPadding = this.game.device.desktop ? 60 : 30;

      // Menu background
      this.background = game.add.tileSprite(0, 0, this.world.width, this.world.height, 'menu_background');
      this.background.autoScroll(-50, -20);
      this.background.tilePosition.x = 0;
      this.background.tilePosition.y = 0;

      // Add logo
      var sprite = game.add.sprite(centerX, centerY - textPadding, 'logo');
      sprite.anchor.set(0.5);

      if (this.game.device.desktop) {
        sprite.scale.set(2);
      }

      // Add new game
      var fontSize = (this.game.device.desktop ? '40px' : '20px');
      var newGame = this.newGame = this.add.text(this.world.centerX,
        centerY + textPadding,
        "New game",
        {
          font: fontSize + " Architects Daughter",
          align:"center",
          fill:"#fff"
        });
      newGame.inputEnabled = true;
      newGame.anchor.set(0.5);

      newGame.events.onInputOver.add(this.overNewgame, this);
      newGame.events.onInputOut.add(this.outNewgame, this);
      newGame.events.onInputDown.add(this.playGame, this);

      var multiGame = this.multiGame =
        this.add.text(this.world.centerX,
          centerY + textPadding + newGame.height,
        "New multiplayer game",
        {
          font: fontSize + " Architects Daughter",
          align:"center",
          fill:"#fff"
        });
      multiGame.inputEnabled = true;
      multiGame.anchor.set(0.5);

      multiGame.events.onInputOver.add(this.overMultigame, this);
      multiGame.events.onInputOut.add(this.outMultigame, this);
      multiGame.events.onInputDown.add(this.playMultiGame, this);

      // Juicy
      this.juicy = game.plugins.add(Phaser.Plugin.Juicy);
      this.screenFlash = this.juicy.createScreenFlash();
      this.add.existing(this.screenFlash);

      // Music
      this.menu_music = game.add.audio('menu_music');
      this.dink       = game.add.audio('dink');
      this.menu_music.play();
    },

    playGame: function() {
      Game.multiplayer = false;
      this.menu_music.stop();
      this.game.state.start('Play');
    },

    playMultiGame: function() {
      Game.multiplayer = true;
      this.play();
    },

    overNewgame: function() {
      this.game.add.tween(this.newGame.scale)
        .to({x: 1.3, y: 1.3}, 300, Phaser.Easing.Exponential.Out, true)
      this.dink.play();
    },

    overMultigame: function() {
      this.game.add.tween(this.multiGame.scale)
        .to({x: 1.3, y: 1.3}, 300, Phaser.Easing.Exponential.Out, true)
      this.dink.play();
    },

    outMultigame: function() {
      this.game.add.tween(this.multiGame.scale)
        .to({x: 1, y: 1}, 300, Phaser.Easing.Exponential.Out, true)
      this.dink.play();
    },

    outNewgame: function() {
      this.game.add.tween(this.newGame.scale)
        .to({x: 1, y: 1}, 300, Phaser.Easing.Exponential.Out, true);
    }
  }
});


text:
@interface ZXDetailViewController : UIViewController

@end


text:
<!doctype html>

		<title>Zabuun - Learn Egyptian Arabic for English speakers</title>
		<meta name="description" content="">
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/head.php';?>

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/ie8.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/header.php';?>

			<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/side.php';?>

Essays > The Park

						Expand All | Collapse All

The Park

  Linda loves the park. There is so much to do. First, she looks at the sky. One cloud looks like a dog. Another cloud looks like a sheep. Later, she feeds the ducks. They are hungry. Linda throws bread crumbs. The ducks enjoy the food. Finally, Linda watches the sun go down. It is beautiful.

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/footer.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/scripts.php';?>


text:
:root {
	--n-border-radius: var(--border-radius, 4px);
	--n-line: var(--line, 1.5);
	--n-line-em: calc(var(--n-line) * 1rem);
}

/* Unfortunately, line-height of 1.6 or 1.65 is rounded differently in Firefox and Chrome :-( */

@import "./util";
@import "./grids";
@import "./media";
@import "./lists";
@import "./buttons";
@import "./forms";
@import "./tables";
@import "./alerts";


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.example.whizbang</groupId>
    <artifactId>whizbang</artifactId>
    <version>0.0.1-SNAPSHOT</version>
  </parent>
  <artifactId>jmx</artifactId>
</project>