text:
mkdir ..\Build
cd ..\Build
cmake .. -G"Visual Studio 10" -DASMJIT_BUILD_LIBRARY=1 -DASMJIT_BUILD_TEST=1
cd ..\Util
pause

redpajama_set_name: RedPajamaGithub


text:
using System;
using Logic.JudgementTypes.QuantityType.BehaviourContracts;

namespace Logic.JudgementTypes.QuantityType
{
    class General : IQuantityType
    {
        public QuantityTypes _innerType;

        public QuantityTypes InnerType
        {
            get
            {
                return _innerType;

            }
            protected set { _innerType = value; }
        }

        public General()
        {
            InnerType = QuantityTypes.General;
        }

        public virtual Int32 GetIdent()
        {
            return (Int32)_innerType;
        }
    }
}


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Test.Utilities;
using Microsoft.VisualStudio.IntegrationTest.Utilities;
using Xunit;

namespace Roslyn.VisualStudio.NewIntegrationTests.CSharp
{
    [Trait(Traits.Feature, Traits.Features.ErrorSquiggles)]
    [Trait(Traits.Feature, Traits.Features.NetCore)]
    public class CSharpSquigglesNetCore : CSharpSquigglesCommon
    {
        protected override bool SupportsGlobalUsings => true;

        public CSharpSquigglesNetCore()
            : base(WellKnownProjectTemplates.CSharpNetCoreClassLibrary)
        {
        }

        public override async Task InitializeAsync()
        {
            await base.InitializeAsync().ConfigureAwait(false);

            // The CSharpNetCoreClassLibrary template does not open a file automatically.
            await TestServices.SolutionExplorer.OpenFileAsync(ProjectName, WellKnownProjectTemplates.CSharpNetCoreClassLibraryClassFileName, HangMitigatingCancellationToken);
        }
    }
}


text:
package src.systems.collision;

import com.artemis.World;
import src.systems.collision.handlers.BouncingCollision;
import src.systems.collision.handlers.KillingCollision;
import src.systems.collision.handlers.PointEarning;

/**
 * User: eptwalabha
 * Date: 01/03/14
 * Time: 20:00
 */
public class CollisionHandlerFactory {

    public static CollisionPair getCollisionPlayerPoint(World world, String groupA, String groupB) {
        CollisionPair collisionPlayerPoint = new CollisionPair(world, groupA, groupB);
        addEarningPointToCollisionPair(collisionPlayerPoint);
        return collisionPlayerPoint;
    }

    public static CollisionPair getBouncingHandler(World world, String groupA, String groupB) {
        CollisionPair collisionBouncing = new CollisionPair(world, groupA, groupB);
        addBouncingHandlerToCollisionPair(collisionBouncing);
        return collisionBouncing;
    }

    public static CollisionPair getKillingHandler(World world, String groupA, String groupB) {
        CollisionPair collisionBouncing = new CollisionPair(world, groupA, groupB);
        addKillingHandlerToCollisionPair(collisionBouncing);
        return collisionBouncing;
    }

    public static void addEarningPointToCollisionPair(CollisionPair collisionPlayerPoint) {
        PointEarning collisionHandler = new PointEarning();
        collisionPlayerPoint.addCollisionHandler(collisionHandler);
    }

    public static void addKillingHandlerToCollisionPair(CollisionPair collisionBouncing) {
        KillingCollision collisionHandler = new KillingCollision();
        collisionBouncing.addCollisionHandler(collisionHandler);
    }

    public static void addBouncingHandlerToCollisionPair(CollisionPair collisionPair) {
        BouncingCollision collisionHandler = new BouncingCollision();
        collisionPair.addCollisionHandler(collisionHandler);
    }
}


text:
<!DOCTYPE html>

	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<title>jQuery custom scrollbar demo</title>
	<meta name="viewport" content="width=device-width, initial-scale=1" />

	<link rel="stylesheet" href="style.css">

	<link rel="stylesheet" href="../jquery.mCustomScrollbar.css">

Your browser does not support iframes.

Plugin home Project on Github MIT License


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Package org.owasp.appsensor.core.correlation (appsensor-parent 2.3.0 API)</title>
<meta name="date" content="2016-09-29">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Uses of Package
org.owasp.appsensor.core.correlation

Packages that use org.owasp.appsensor.core.correlation

Package
Description

org.owasp.appsensor.core.configuration.server

org.owasp.appsensor.core.correlation

Classes in org.owasp.appsensor.core.correlation used by org.owasp.appsensor.core.configuration.server

Class and Description

CorrelationSet

Classes in org.owasp.appsensor.core.correlation used by org.owasp.appsensor.core.correlation

Class and Description

CorrelationSet

Copyright © 2016 The Open Web Application Security Project (OWASP). All rights reserved.


text:
/**
 * Allow expectations to await the expected value. Duck-type a real Promise.
 * This class, and its waitForValue member function, are necessary because
 * to behave like a Promise and to wait for the correct value from the
 * Browser Automation Framework, the onFulfilled chains need to propagate into
 * the new values that come from the browser.
 *
 * @template TYPE
 * @extends {Promise<TYPE>}
 */
class ControllerPromise {
  /**
   * @param {!Promise<TYPE>|function(function(?TYPE):void, function(*):void):void} executorOrPromise
   * @param {undefined|function(TYPE,function(TYPE): ?TYPE): Promise<TYPE>} opt_waitForValue
   */
  constructor(executorOrPromise, opt_waitForValue) {
    this.promise_ =
      typeof executorOrPromise == 'function'
        ? new Promise(executorOrPromise)
        : executorOrPromise;

    /**
     * Returns a Promise that resolves when the given expected value fulfills
     * the given condition.
     * @param {function(TYPE): ?TYPE} condition
     * @return {!Promise<?TYPE>}
     */
    this.waitForValue = opt_waitForValue;
  }

  /** @override */
  catch(onRejected) {
    return new ControllerPromise(
      this.promise_.catch(onRejected),
      this.waitForValue
    );
  }

  /** @override */
  finally(onFinally) {
    return new ControllerPromise(
      this.promise_.finally(onFinally),
      this.waitForValue
    );
  }

  /** @override */
  then(opt_onFulfilled, opt_onRejected) {
    // Allow this and future `then`s to update the wait value.
    let wrappedWait;
    if (this.waitForValue) {
      wrappedWait = wrapWait(this.waitForValue, opt_onFulfilled);
    }

    return new ControllerPromise(
      this.promise_.then(opt_onFulfilled, opt_onRejected),
      wrappedWait
    );
  }
}

/**
 * Wrap the given wait function with the given mutation function,
 * while still allowing it to be mutated again in the future by
 * the inner opt_mutate function.
 * @param {function(CONDITION, function(VALUE): ?DERIVED): Promise<RES>} wait
 * @param {function(VALUE): MUTANT} mutate
 * @return {function(CONDITION, function(MUTANT): ?DERIVED): Promise<RES>}
 * @template CONDITION
 * @template MUTANT
 * @template DERIVED
 * @template VALUE
 * @template RES
 */
function wrapWait(wait, mutate) {
  return (condition, opt_mutate) => {
    opt_mutate = opt_mutate || ((x) => /** @type {*} */ (x));
    return wait(condition, (value) => opt_mutate(mutate(value)));
  };
}

module.exports = {
  ControllerPromise,
};


text:
"""Support for Abode Security System covers."""
import abodepy.helpers.constants as CONST

from homeassistant.components.cover import CoverEntity

from . import AbodeDevice
from .const import DOMAIN

async def async_setup_entry(hass, config_entry, async_add_entities):
    """Set up Abode cover devices."""
    data = hass.data[DOMAIN]

    entities = []

    for device in data.abode.get_devices(generic_type=CONST.TYPE_COVER):
        entities.append(AbodeCover(data, device))

    async_add_entities(entities)

class AbodeCover(AbodeDevice, CoverEntity):
    """Representation of an Abode cover."""

    @property
    def is_closed(self):
        """Return true if cover is closed, else False."""
        return not self._device.is_open

    def close_cover(self, **kwargs):
        """Issue close command to cover."""
        self._device.close_cover()

    def open_cover(self, **kwargs):
        """Issue open command to cover."""
        self._device.open_cover()


text:
cask 'gog-galaxy' do
  version '1.2.55.53'
  sha256 'e3009a71c14e4ee35202e96ef6b7a1312c2adfc56f35089c5e2297baa5acc792'

  url "https://cdn.gog.com/open/galaxy/client/galaxy_client_#{version}.pkg"
  name 'GOG Galaxy Client'
  homepage 'https://www.gog.com/galaxy'

  auto_updates true

  pkg "galaxy_client_#{version}.pkg"

  uninstall delete:    '/Applications/GOG Galaxy.app',
            launchctl: [
                         'com.gog.galaxy.ClientService',
                         'com.gog.galaxy.commservice',
                       ]

  zap trash: [
               '/Library/LaunchDaemons/com.gog.galaxy.ClientService.plist',
               '/Library/PrivilegedHelperTools/com.gog.galaxy.ClientService',
               '/Users/Shared/GOG.com',
               '~/Library/Application Support/GOG.com',
               '~/Library/Preferences/com.gog.galaxy.cef.renderer.plist',
               '~/Library/Preferences/com.gog.galaxy.plist',
               '~/Library/Saved Application State/com.gog.galaxy.savedState',
             ]
end


text:
Dynamic configuration with Kubernetes Custom Resource
{: .subtitle }

## Definitions

```yaml
--8<-- "content/reference/dynamic-configuration/kubernetes-crd-definition.yml"
```

## Resources

```yaml
--8<-- "content/reference/dynamic-configuration/kubernetes-crd-resource.yml"
```

## RBAC

```yaml
--8<-- "content/reference/dynamic-configuration/kubernetes-crd-rbac.yml"
```


text:
@interface YR_Network : NSObject

@end


text:
@import url(font-awesome.min.css);

/*
	Massively by HTML5 UP
	html5up.net | @ajlkn
	Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/

/* Wrapper */

	#wrapper {
		background-color: #212931;
		background-image: url("../../images/overlay.png"), linear-gradient(0deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), url("../../images/bg.jpg");
		background-size: auto,								auto,														100% auto;
		background-position: center,								center,														top center;
		background-repeat: repeat,								no-repeat,													no-repeat;
		background-attachment: fixed,								fixed,														fixed;
	}

		#wrapper.fade-in:before {
			display: none;
		}

/* Intro */

	body.is-preload #intro {
		opacity: 1;
	}

		body.is-preload #intro:not(.hidden) + #header + #nav {
			-moz-transform: none;
			-webkit-transform: none;
			-ms-transform: none;
			transform: none;
			opacity: 1;
		}


text:
package com.github.stevecrox.mirror.manifest.processors.maven.properties;

import java.io.EOFException;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URL;
import java.util.Properties;

import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.apache.commons.io.IOUtils;
import org.apache.maven.model.Model;
import org.apache.maven.model.Parent;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;

import com.github.stevecrox.mirror.dto.maven.MavenPackaging;
import com.github.stevecrox.mirror.dto.maven.artifacts.MavenDownloadArtifact;
import com.github.stevecrox.mirror.dto.maven.artifacts.MavenManifestArtifact;
import com.github.stevecrox.mirror.exceptions.DownloadArtifactException;
import com.github.stevecrox.mirror.exceptions.url.URLCheckerException;
import com.github.stevecrox.mirror.interfaces.DownloadArtifact;
import com.github.stevecrox.mirror.manifest.exceptions.maven.ManifestParseException;
import com.github.stevecrox.mirror.manifest.exceptions.maven.MavenManifestRouteException;
import com.github.stevecrox.mirror.manifest.exceptions.maven.MissingManifestException;
import com.github.stevecrox.mirror.processors.download.AbstractGenerateURIProcessor;

public final class LoadPOMPropertiesProcessor extends AbstractGenerateURIProcessor {

  /** The target repository to check the dependencies out into. */
  private final URI destination;

  /**
   * Constructor.
   *
   * @param target
   * @throws DownloadArtifactRouteException
   */
  public LoadPOMPropertiesProcessor(final URI target) throws MavenManifestRouteException {
    super();

    if (null == target) {
      throw new MavenManifestRouteException("Supplied URI was invalid.");
    }

    this.destination = target;
  }

  /**
   * Retrieves the target repository to check the dependencies out into.
   *
   * @return a valid URI location.
   */
  public URI getDestination() {
    return destination;
  }

  public void process(final Exchange exchange) throws Exception {
    final Message inMessage = exchange.getIn();

    //
    final Object body = inMessage.getBody();
    if (body instanceof MavenManifestArtifact) {
      final MavenManifestArtifact artifact = (MavenManifestArtifact) body;

      // generate a parent object for us to process.
      final MavenDownloadArtifact downloadArtifact = new MavenDownloadArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), MavenPackaging.PARENT_POM);
      final URI path = downloadArtifact.generateDestination(this.getDestination());
      downloadArtifact.setDestination(path);

      //
      final Properties properties = this.loadParent(downloadArtifact);
      artifact.addProperties(properties);

    } else {
      throw new MavenManifestRouteException("Unexpected Artifact was supplied.");
    }

  }

  /**
   *
   * @param artifact
   * @return
   * @throws MissingManifestException
   * @throws ManifestParseException
   */
  private Properties loadParent(final DownloadArtifact artifact) throws MissingManifestException, ManifestParseException {
    Properties result = new Properties();
    InputStream input = null;

    try {
      if (this.fileExists(artifact.getDestination()) || this.urlExists(artifact.getDestination())) {
        final URL urlDestination = artifact.getDestination().toURL();
        input = urlDestination.openStream();
      }

      // if we couldn't open a stream it is because the file doesn't exist and we need to retrieve it.
      if (null == input) {
        throw new MissingManifestException();
      }

      final MavenXpp3Reader reader = new MavenXpp3Reader();
      final Model model = reader.read(input);
      final Parent parent = model.getParent();

      // If no parent we don't need to keep loading we can just use the information in the POM.
      if (null == parent) {
        result.putAll(model.getProperties());
      } else {
        // generate a parent object for us to process.
        final MavenDownloadArtifact parentArt = new MavenDownloadArtifact(parent.getGroupId(), parent.getArtifactId(), parent.getVersion(), MavenPackaging.PARENT_POM);
        final URI parentURI = parentArt.generateDestination(this.getDestination());
        parentArt.setDestination(parentURI);
        // process to create our head manifest, Maven works through inheritance so we have to
        // goto the highest level and work our way down.
        result.putAll(this.loadParent(parentArt));
        result.putAll(model.getProperties());
      }

    } catch (FileNotFoundException|XmlPullParserException|EOFException e) {
      throw new MissingManifestException();
    } catch (DownloadArtifactException | URLCheckerException | IOException e) {
      throw new ManifestParseException(e);
    } finally {
      IOUtils.closeQuietly(input);
    }

    return result;
  }
}


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

<!--

  Copyright 2003 - 2013 The eFaps Team

  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.

  Author:          The eFaps Team
  Revision:        $Rev$
  Last Changed:    $Date$
  Last Changed By: $Author$

-->

<install xmlns="http://www.efaps.org/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.efaps.org/xsd http://www.efaps.org/xsd/eFaps_1.0.xsd">
    <application>eFapsApp-Products</application>
    <dependencies>
        <dependency order="0">
            <groupId>org.efaps</groupId>
            <artifactId>efaps-kernel-install</artifactId>
            <version>3.0.0-SNAPSHOT</version>
        </dependency>
        <dependency order="1">
            <groupId>org.efaps</groupId>
            <artifactId>efaps-webapp-install</artifactId>
            <version>3.0.0-SNAPSHOT</version>
        </dependency>
        <dependency order="2">
            <groupId>org.efaps.apps</groupId>
            <artifactId>contacts</artifactId>
            <version>3.0.0-SNAPSHOT</version>
        </dependency>
        <dependency order="3">
            <groupId>org.efaps.apps</groupId>
            <artifactId>commons</artifactId>
            <version>3.0.0-SNAPSHOT</version>
        </dependency>
    </dependencies>

    <version number="1" reloadCache="false" login="true" compile="true">
        <description>Install ERP-Products Basic Modul.</description>
        <script type="groovy">
        import java.io.File;
        import java.util.UUID;
        import org.efaps.admin.runlevel.RunLevel;
        import org.efaps.admin.user.JAASSystem;
        import org.efaps.admin.user.Role;
        import org.efaps.db.Context;
        import org.efaps.db.QueryBuilder;
        import org.efaps.db.InstanceQuery;
        import org.efaps.esjp.admin.ui.UIUpdate;

        EFAPS_LOGGER.info("Importing Data for eFapsApp-Products");

        RunLevel.init("shell");
        RunLevel.execute();

        <!-- Products_MyDesk, MainToolBar -->
        UIUpdate update = new UIUpdate();
        update.add2Menu("0ff70869-361c-4971-bd09-6cf79a0a7dfb", "87001cc3-c45c-44de-b8f1-776df507f268", 2);

        <!-- connect the Products_Contacts_ContactTree_Product Menu to the Contacts_ContactTree menu from contacts -->
        update.add2Menu("0ecba961-c0bf-48b8-93a5-4d098bc0c022", "e1944ac8-4007-476c-a5c8-2bfbdb2b79f9",-1);

        <!-- Products_Products, Admin_Help_MainMenu -->
        update.add2Help("8e74046b-28cd-4079-bac4-5cf0a04f47e5", "dead549e-5cc6-49f9-9a79-8e33aa139f6d",-1);

     </script>
    </version>
</install>


text:
<?php

namespace AcmePhp\Core\Exception;

/**
 * @author Titouan Galopin <galopintitouan@gmail.com>
 */
class AcmeCoreException extends \RuntimeException
{
}


text:
"""
.NET Streams

REFERENCES

    https://www.ntcore.com/files/dotnetformat.htm
    https://referencesource.microsoft.com/System.AddIn/System/Addin/MiniReflection/MetadataReader/Metadata.cs.html#123

Copyright (c) 2020-2022 MalwareFrank
"""

import struct as _struct
import logging
from typing import Dict, List, Tuple, Union, Optional
from binascii import hexlify as _hexlify

from pefile import MAX_STRING_LENGTH, Structure

from . import base, errors, mdtable
from .utils import read_compressed_int

logger = logging.getLogger(__name__)

class GenericStream(base.ClrStream):
    """
    A generic CLR Stream of unknown type.
    """
    pass

class StringsHeap(base.ClrHeap):
    offset_size = 0

    def get(self, index, max_length=MAX_STRING_LENGTH, encoding="utf-8", as_bytes=False):
        """
        Given an index (offset), read a null-terminated UTF-8 (or given encoding) string.
        Returns None on error, or string, or bytes if as_bytes is True.
        """

        if not self.__data__ or index is None or not max_length:
            return None

        if index >= len(self.__data__):
            raise IndexError("index out of range")

        offset = index
        end = self.__data__.find(b"\x00", offset)
        if end - offset > max_length:
            return None
        data = self.__data__[offset:end]
        if as_bytes:
            return data
        s = data.decode(encoding)
        return s

class BinaryHeap(base.ClrHeap):
    def get_with_size(self, index) -> Optional[Tuple[bytes, int]]:
        if self.__data__ is None:
            logger.warning("stream has no data")
            return None

        if index >= len(self.__data__):
            logger.warning("stream is too small: wanted: 0x%x found: 0x%x", index, len(self.__data__))
            return None

        offset = index

        # read compressed int length
        buf = self.__data__[offset:offset + 4]
        ret = read_compressed_int(buf)
        if ret is None:
            # invalid compressed int length, such as invalid leading flags.
            logger.warning("stream entry has invalid compressed int")
            return None

        data_length, length_size = ret

        # read data
        offset = offset + length_size
        data = self.__data__[offset:offset + data_length]

        return data, length_size + data_length

    def get(self, index) -> Optional[bytes]:
        try:
            ret = self.get_with_size(index)
        except IndexError:
            return None

        if ret is None:
            return None

        data, _ = ret

        return data

class BlobHeap(BinaryHeap):
    pass

class UserString(object):
    """
    The #US or UserStrings stream should contain UTF-16 strings.
    Each entry in the stream includes a byte indicating whether
    any Unicode characters require handling beyond that normally
    provided for 8-bit encoding sets.

    Reference ECMA-335, Partition II Section 24.2.4
    """
    def __init__(self, data: bytes, encoding="utf-16"):
        self.__data__: bytes = data
        self.value: str = data.decode(encoding)

class UserStringHeap(BinaryHeap):
    def get(self, index) -> Optional[bytes]:
        data = super(UserStringHeap, self).get(index)
        if data is None:
            return None

        flag: int = 0
        if len(data) % 2 == 1:
            # > This final byte holds the value 1 if and only if any UTF16
            # > character within the string has any bit set in its top byte,
            # > or its low byte is any of the following:
            # > 0x01–0x08, 0x0E–0x1F, 0x27, 0x2D, 0x7F.
            #
            # via ECMA-335 6th edition, II.24.2.4
            #
            # Trim this trailing flag, which is not part of the string.
            flag = data[-1]
            if flag == 0x00:
                # > Otherwise, it holds 0.
                #
                # via ECMA-335 6th edition, II.24.2.4
                #
                # *should* be a normal UTF-16 string, but still not
                # make sense.
                pass
            elif flag == 0x01:
                # > The 1 signifies Unicode characters that require handling
                # > beyond that normally provided for 8-bit encoding sets.
                #
                # via ECMA-335 6th edition, II.24.2.4
                #
                # these strings are probably best interpreted as bytes.
                pass
            else:
                logger.warning("unexpected string flag value: 0x%02x", flag)
            data = data[:-1]
        else:
            logger.warning("string missing trailing flag")

        return data

    def get_us(self, index, encoding="utf-16") -> Optional[UserString]:
        """
        Fetch the user string at the given index and attempt to decode it as UTF-16.

        Note: the underlying data is not guaranteed to be well formed UTF-16,
        so this routine may raise a UnicodeDecodeError when encountering such data.
        You can always use `UserStringHeap.get()` to fetch the raw binary data.
        """
        data = self.get(index)
        if data is None:
            return None
        else:
            return UserString(data, encoding=encoding)

class GuidHeap(base.ClrHeap):
    offset_size = 0

    def get(self, index, as_bytes=False):
        if index is None or index < 1:
            return None

        size = 128 // 8  # number of bytes in a guid
        # offset into the GUID stream
        offset = (index - 1) * size

        if offset + size > len(self.__data__):
            raise IndexError("index out of range")

        data = self.__data__[offset:offset + size]
        if as_bytes:
            return data
        # convert to string
        parts = _struct.unpack_from("<IHH", data)
        part3 = _hexlify(data[8:10])
        part4 = _hexlify(data[10:16])
        part3 = part3.decode("ascii")
        part4 = part4.decode("ascii")
        return "{:08x}-{:04x}-{:04x}-{}-{}".format(
            parts[0], parts[1], parts[2], part3, part4
        )

class MDTablesStruct(Structure):
    Reserved_1: int
    MajorVersion: int
    MinorVersion: int
    HeapOffsetSizes: int
    Reserved_2: int
    MaskValid: int
    MaskSorted: int

class MetaDataTables(base.ClrStream):
    """Holds CLR (.NET) Metadata Tables.

    struct:     the stream list entry
    header:     IMAGE_CLR_METADATA_TABLES structure
    tables:     dict of tables where table number is key and value is CLRMetaDataTable object
    tables_list:            list of tables, in processing order
    strings_offset_size:    number of bytes
    guids_offset_size:      number of bytes
    blobs_offset_size:      number of bytes
    """

    _format = (
        "IMAGE_CLR_METADATA_TABLES",
        (
            "I,Reserved_1",
            "B,MajorVersion",
            "B,MinorVersion",
            "B,HeapOffsetSizes",
            "B,Reserved_2",
            "Q,MaskValid",
            "Q,MaskSorted",
        ),
    )

    header: Optional[MDTablesStruct]
    tables: Dict[Union[str, int], base.ClrMetaDataTable]
    tables_list: List[base.ClrMetaDataTable]
    strings_offset_size: int
    guids_offset_size: int
    blobs_offset_size: int

    # from https://www.ntcore.com/files/dotnetformat.htm
    # and https://referencesource.microsoft.com/System.AddIn/System/Addin/MiniReflection/MetadataReader/Metadata.cs.html#123
    Module:                 Optional[mdtable.Module]
    TypeRef:                Optional[mdtable.TypeRef]
    TypeDef:                Optional[mdtable.TypeDef]
    Field:                  Optional[mdtable.Field]
    MethodDef:              Optional[mdtable.MethodDef]
    Param:                  Optional[mdtable.Param]
    InterfaceImpl:          Optional[mdtable.InterfaceImpl]
    MemberRef:              Optional[mdtable.MemberRef]
    Constant:               Optional[mdtable.Constant]
    CustomAttribute:        Optional[mdtable.CustomAttribute]
    FieldMarshal:           Optional[mdtable.FieldMarshal]
    DeclSecurity:           Optional[mdtable.DeclSecurity]
    ClassLayout:            Optional[mdtable.ClassLayout]
    FieldLayout:            Optional[mdtable.FieldLayout]
    StandAloneSig:          Optional[mdtable.StandAloneSig]
    EventMap:               Optional[mdtable.EventMap]
    Event:                  Optional[mdtable.Event]
    PropertyMap:            Optional[mdtable.PropertyMap]
    Property:               Optional[mdtable.Property]
    MethodSemantics:        Optional[mdtable.MethodSemantics]
    MethodImpl:             Optional[mdtable.MethodImpl]
    ModuleRef:              Optional[mdtable.ModuleRef]
    TypeSpec:               Optional[mdtable.TypeSpec]
    ImplMap:                Optional[mdtable.ImplMap]
    FieldRva:               Optional[mdtable.FieldRva]
    Assembly:               Optional[mdtable.Assembly]
    AssemblyProcessor:      Optional[mdtable.AssemblyProcessor]
    AssemblyOS:             Optional[mdtable.AssemblyOS]
    AssemblyRef:            Optional[mdtable.AssemblyRef]
    AssemblyRefProcessor:   Optional[mdtable.AssemblyRefProcessor]
    AssemblyRefOS:          Optional[mdtable.AssemblyRefOS]
    File:                   Optional[mdtable.File]
    ExportedType:           Optional[mdtable.ExportedType]
    ManifestResource:       Optional[mdtable.ManifestResource]
    NestedClass:            Optional[mdtable.NestedClass]
    GenericParam:           Optional[mdtable.GenericParam]
    GenericParamConstraint: Optional[mdtable.GenericParamConstraint]
    Unused:                 Optional[mdtable.Unused]

    def __init__(self, metadata_rva: int, stream_struct: base.StreamStruct, stream_data: bytes):
        super().__init__(metadata_rva, stream_struct, stream_data)
        self.header = None
        self.tables = dict()
        self.tables_list = list()
        strings_offset_size = 0
        guids_offset_size = 0
        blobs_offset_size = 0
        self.Module: Optional[mdtable.Module] = None
        self.TypeRef: Optional[mdtable.TypeRef] = None
        self.TypeDef: Optional[mdtable.TypeDef] = None
        self.Field: Optional[mdtable.Field] = None
        self.MethodDef: Optional[mdtable.MethodDef] = None
        self.Param: Optional[mdtable.Param] = None
        self.InterfaceImpl: Optional[mdtable.InterfaceImpl] = None
        self.MemberRef: Optional[mdtable.MemberRef] = None
        self.Constant: Optional[mdtable.Constant] = None
        self.CustomAttribute: Optional[mdtable.CustomAttribute] = None
        self.FieldMarshal: Optional[mdtable.FieldMarshal] = None
        self.DeclSecurity: Optional[mdtable.DeclSecurity] = None
        self.ClassLayout: Optional[mdtable.ClassLayout] = None
        self.FieldLayout: Optional[mdtable.FieldLayout] = None
        self.StandAloneSig: Optional[mdtable.StandAloneSig] = None
        self.EventMap: Optional[mdtable.EventMap] = None
        self.Event: Optional[mdtable.Event] = None
        self.PropertyMap: Optional[mdtable.PropertyMap] = None
        self.Property: Optional[mdtable.Property] = None
        self.MethodSemantics: Optional[mdtable.MethodSemantics] = None
        self.MethodImpl: Optional[mdtable.MethodImpl] = None
        self.ModuleRef: Optional[mdtable.ModuleRef] = None
        self.TypeSpec: Optional[mdtable.TypeSpec] = None
        self.ImplMap: Optional[mdtable.ImplMap] = None
        self.FieldRva: Optional[mdtable.FieldRva] = None
        self.Assembly: Optional[mdtable.Assembly] = None
        self.AssemblyProcessor: Optional[mdtable.AssemblyProcessor] = None
        self.AssemblyOS: Optional[mdtable.AssemblyOS] = None
        self.AssemblyRef: Optional[mdtable.AssemblyRef] = None
        self.AssemblyRefProcessor: Optional[mdtable.AssemblyRefProcessor] = None
        self.AssemblyRefOS: Optional[mdtable.AssemblyRefOS] = None
        self.File: Optional[mdtable.File] = None
        self.ExportedType: Optional[mdtable.ExportedType] = None
        self.ManifestResource: Optional[mdtable.ManifestResource] = None
        self.NestedClass: Optional[mdtable.NestedClass] = None
        self.GenericParam: Optional[mdtable.GenericParam] = None
        self.GenericParamConstraint: Optional[mdtable.GenericParamConstraint] = None
        self.Unused: Optional[mdtable.Unused] = None

    def parse(self, streams: List[base.ClrStream]):
        """
        this may raise an exception if the data cannot be parsed correctly.
        however, `self` may still be partially initialized with *some* data.
        """
        STRINGS_MASK = 0x01
        GUIDS_MASK = 0x02
        BLOBS_MASK = 0x04
        DELTA_ONLY_MASK = 0x20
        EXTRA_DATA_MASK = 0x40
        HAS_DELETE_MASK = 0x80
        MAX_TABLES = 64

        # we may be able to parse some data before reaching corruption.
        # so, we'll keep parsing all we can, which updates `self` in-place,
        # and then raise the first deferred exception captured here.
        deferred_exceptions = list()

        header_len = Structure(self.__class__._format).sizeof()
        if not self.__data__ or len(self.__data__) < header_len:
            logger.warning("unable to read .NET metadata tables")
            raise errors.dnFormatError("Unable to read .NET metadata tables")

        #### parse header
        header_struct = MDTablesStruct(self._format, file_offset=self.rva)
        header_struct.__unpack__(self.__data__)
        self.header = header_struct

        #### heaps offsets
        if header_struct.HeapOffsetSizes & STRINGS_MASK:
            strings_offset_size = 4
        else:
            strings_offset_size = 2
        if header_struct.HeapOffsetSizes & GUIDS_MASK:
            guids_offset_size = 4
        else:
            guids_offset_size = 2
        if header_struct.HeapOffsetSizes & BLOBS_MASK:
            blobs_offset_size = 4
        else:
            blobs_offset_size = 2
        self.strings_offset_size = strings_offset_size
        self.guids_offset_size = guids_offset_size
        self.blobs_offset_size = blobs_offset_size

        #### heaps
        strings_heap: Optional[StringsHeap] = None
        guid_heap: Optional[GuidHeap] = None
        blob_heap: Optional[BlobHeap] = None
        for s in streams:
            # Find the last instance of the strings, guid, and blob heaps.
            # If there are multiple instances of a type, dotnet runtime uses last.
            if isinstance(s, StringsHeap):
                strings_heap = s
            elif isinstance(s, GuidHeap):
                guid_heap = s
            elif isinstance(s, BlobHeap):
                blob_heap = s

        #### Parse tables rows list.
        #  It is a variable length array of dwords.  Each dword is
        #  the number of rows in a table.  They are ordered by table
        #  number, smallest first.  Only the tables needed/defined
        #  are listed, thus the variable length and need to parse
        #  the header's MaskValid member.
        cur_rva = self.rva + header_len
        table_rowcounts = []
        # read all row counts
        for i in range(MAX_TABLES):
            # if table bit is set
            if header_struct.MaskValid & 2 ** i != 0:
                # read the row count
                table_rowcounts.append(self.get_dword_at_rva(cur_rva))
                # increment to next dword
                cur_rva += 4
            else:
                table_rowcounts.append(0)

        # consume an extra dword if the extra data bit is set
        if header_struct.HeapOffsetSizes & EXTRA_DATA_MASK == EXTRA_DATA_MASK:
            cur_rva += 4

        # initialize all tables
        for i in range(MAX_TABLES):
            # if table bit is set
            if header_struct.MaskValid & 2 ** i:
                is_sorted = header_struct.MaskSorted & 2 ** i != 0
                try:
                    table = mdtable.ClrMetaDataTableFactory.createTable(
                        i,
                        table_rowcounts,
                        is_sorted,
                        self.strings_offset_size,
                        self.guids_offset_size,
                        self.blobs_offset_size,
                        strings_heap,
                        guid_heap,
                        blob_heap,
                    )
                except errors.dnFormatError as e:
                    table = None
                    deferred_exceptions.append(e)
                    logger.warning(str(e))
                if not table:
                    logger.warning("invalid .NET metadata table list @ %d RVA: 0x%x", i, cur_rva)
                    # Everything up to this point has been saved in the object and is accessible,
                    # but more can be parsed, so we delay raising exception.

                    deferred_exceptions.append(errors.dnFormatError(
                        "Invalid .NET metadata table list @ {} rva:{}".format(
                            i, cur_rva
                        ))
                    )
                    continue
                # table number
                table.number = i
                # add to tables dict
                self.tables[i] = table
                # add to tables list
                self.tables_list.append(table)
                # set member, to allow reference by name
                if table.name:
                    setattr(self, table.name, table)

        #### parse each table
        # here, cur_rva points to start of table rows
        for table in self.tables_list:
            if table.row_size > 0 and table.num_rows > 0:
                table_data = self.get_data_at_rva(
                    cur_rva, table.row_size * table.num_rows
                )
                # parse structures (populates .struct for each row)
                table.parse_rows(cur_rva, table_data)
                table.rva = cur_rva
                # move to next set of rows
                cur_rva += table.row_size * table.num_rows
        #### finalize parsing each table
        # For each row, de-references indexes in the .struct and populates row attributes.
        for table in self.tables_list:
            table.parse(self.tables_list)

        # raise warning/error
        if deferred_exceptions:
            raise deferred_exceptions[0]


text:
package com.vaadin.ui;

import java.util.Collection;

import com.vaadin.data.Container;

/**
 *

 * A class representing a selection of items the user has selected in a UI. The
 * set of choices is presented as a set of {@link com.vaadin.data.Item}s in a
 * {@link com.vaadin.data.Container}.
 *

 *
 *

 * A Select component may be in single- or multiselect mode.
 * Multiselect mode means that more than one item can be selected
 * simultaneously.
 *

 *
 * @author Vaadin Ltd.
 * @since 3.0
 * @deprecated As of 7.0. Use {@link ComboBox} instead.
 */
@Deprecated
public class Select extends ComboBox {
    /* Component methods */

    public Select() {
        super();
    }

    public Select(String caption, Collection<?> options) {
        super(caption, options);
    }

    public Select(String caption, Container dataSource) {
        super(caption, dataSource);
    }

    public Select(String caption) {
        super(caption);
    }

}


text:
"use strict";

// Tree transformer helpers.
// XXX: eventually I should refactor the compressor to use this infrastructure.

function TreeTransformer(before, after) {
    TreeWalker.call(this);
    this.before = before;
    this.after = after;
}
TreeTransformer.prototype = new TreeWalker;

(function(undefined){

    function _(node, descend) {
        node.DEFMETHOD("transform", function(tw, in_list){
            var x, y;
            tw.push(this);
            if (tw.before) x = tw.before(this, descend, in_list);
            if (x === undefined) {
                if (!tw.after) {
                    x = this;
                    descend(x, tw);
                } else {
                    tw.stack[tw.stack - 1] = x = this.clone();
                    descend(x, tw);
                    y = tw.after(x, in_list);
                    if (y !== undefined) x = y;
                }
            }
            tw.pop();
            return x;
        });
    };

    function do_list(list, tw) {
        return MAP(list, function(node){
            return node.transform(tw, true);
        });
    };

    _(AST_Node, noop);

    _(AST_LabeledStatement, function(self, tw){
        self.label = self.label.transform(tw);
        self.body = self.body.transform(tw);
    });

    _(AST_SimpleStatement, function(self, tw){
        self.body = self.body.transform(tw);
    });

    _(AST_Block, function(self, tw){
        self.body = do_list(self.body, tw);
    });

    _(AST_DWLoop, function(self, tw){
        self.condition = self.condition.transform(tw);
        self.body = self.body.transform(tw);
    });

    _(AST_For, function(self, tw){
        if (self.init) self.init = self.init.transform(tw);
        if (self.condition) self.condition = self.condition.transform(tw);
        if (self.step) self.step = self.step.transform(tw);
        self.body = self.body.transform(tw);
    });

    _(AST_ForIn, function(self, tw){
        self.init = self.init.transform(tw);
        self.object = self.object.transform(tw);
        self.body = self.body.transform(tw);
    });

    _(AST_With, function(self, tw){
        self.expression = self.expression.transform(tw);
        self.body = self.body.transform(tw);
    });

    _(AST_Exit, function(self, tw){
        if (self.value) self.value = self.value.transform(tw);
    });

    _(AST_LoopControl, function(self, tw){
        if (self.label) self.label = self.label.transform(tw);
    });

    _(AST_If, function(self, tw){
        self.condition = self.condition.transform(tw);
        self.body = self.body.transform(tw);
        if (self.alternative) self.alternative = self.alternative.transform(tw);
    });

    _(AST_Switch, function(self, tw){
        self.expression = self.expression.transform(tw);
        self.body = do_list(self.body, tw);
    });

    _(AST_Case, function(self, tw){
        self.expression = self.expression.transform(tw);
        self.body = do_list(self.body, tw);
    });

    _(AST_Try, function(self, tw){
        self.body = do_list(self.body, tw);
        if (self.bcatch) self.bcatch = self.bcatch.transform(tw);
        if (self.bfinally) self.bfinally = self.bfinally.transform(tw);
    });

    _(AST_Catch, function(self, tw){
        self.argname = self.argname.transform(tw);
        self.body = do_list(self.body, tw);
    });

    _(AST_Definitions, function(self, tw){
        self.definitions = do_list(self.definitions, tw);
    });

    _(AST_VarDef, function(self, tw){
        if (self.value) self.value = self.value.transform(tw);
    });

    _(AST_Lambda, function(self, tw){
        if (self.name) self.name = self.name.transform(tw);
        self.argnames = do_list(self.argnames, tw);
        self.body = do_list(self.body, tw);
    });

    _(AST_Call, function(self, tw){
        self.expression = self.expression.transform(tw);
        self.args = do_list(self.args, tw);
    });

    _(AST_Seq, function(self, tw){
        self.car = self.car.transform(tw);
        self.cdr = self.cdr.transform(tw);
    });

    _(AST_Dot, function(self, tw){
        self.expression = self.expression.transform(tw);
    });

    _(AST_Sub, function(self, tw){
        self.expression = self.expression.transform(tw);
        self.property = self.property.transform(tw);
    });

    _(AST_Unary, function(self, tw){
        self.expression = self.expression.transform(tw);
    });

    _(AST_Binary, function(self, tw){
        self.left = self.left.transform(tw);
        self.right = self.right.transform(tw);
    });

    _(AST_Conditional, function(self, tw){
        self.condition = self.condition.transform(tw);
        self.consequent = self.consequent.transform(tw);
        self.alternative = self.alternative.transform(tw);
    });

    _(AST_Array, function(self, tw){
        self.elements = do_list(self.elements, tw);
    });

    _(AST_Object, function(self, tw){
        self.properties = do_list(self.properties, tw);
    });

    _(AST_ObjectProperty, function(self, tw){
        self.value = self.value.transform(tw);
    });

})();


text:
<?php

use \Mockery as m;

class TasksTest extends PHPUnit_Framework_TestCase
{
    function testCreate()
    {
        $http = m::mock(new Services_Twilio_TinyHttp);
        $http->shouldReceive('post')->once()
            ->with('/v1/Workspaces/WS123/Tasks',
                array('Content-Type' => 'application/x-www-form-urlencoded'),
                'Timeout=60&Attributes=attribute&WorkflowSid=WF123')
            ->andReturn(array(200, array('Content-Type' => 'application/json'),
                json_encode(array('sid' => 'WT123'))
            ));
        $taskrouterClient = new TaskRouter_Services_Twilio('AC123', '123', 'WS123', 'v1', $http);
        $activity = $taskrouterClient->workspace->tasks->create('attribute', 'WF123',array(
            'Timeout' => 60,
        ));
        $this->assertNotNull($activity);
    }

    function testGet() {
        $http = m::mock(new Services_Twilio_TinyHttp);
        $http->shouldReceive('get')->once()
            ->with('/v1/Workspaces/WS123/Tasks/WT123')
            ->andReturn(array(200, array('Content-Type' => 'application/json'),
                json_encode(array('sid' => 'WT123', 'workflow_sid' => 'WF123'))
            ));
        $taskrouterClient = new TaskRouter_Services_Twilio('AC123', '123', 'WS123', 'v1', $http);
        $task = $taskrouterClient->workspace->tasks->get('WT123');
        $this->assertNotNull($task);
        $this->assertEquals('WF123', $task->workflow_sid);
    }

	function testGetPage() {
		$http = m::mock(new Services_Twilio_TinyHttp);
		$http->shouldReceive('get')->once()
			->with('/v1/Workspaces/WS123/Tasks?Page=0&PageSize=50')
			->andReturn(array(200, array('Content-Type' => 'application/json'),
							json_encode(array(
											'meta' => array('key' => 'tasks', 'next_page_url' => null),
											'tasks' => array(array('sid' => 'WT123', 'workflow_sid' => 'WF123'))
						))));
		$taskrouterClient = new TaskRouter_Services_Twilio('AC123', '123', 'WS123', 'v1', $http);
		$tasks = $taskrouterClient->workspace->tasks->getPage();
		$tasksItems = $tasks->getItems();
		$this->assertNotNull($tasks);
		$this->assertEquals('WF123', $tasksItems[0]->workflow_sid);
	}

    function tearDown()
    {
        m::close();
    }
}


text:
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
 *  Copyright (c) 2009 INRIA, UDcast
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *         Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
 *                              <amine.ismail@udcast.com>
 *
 */
#include "ns3/log.h"
#include "ns3/abort.h"
#include "ns3/test.h"
#include "ns3/uinteger.h"
#include "ns3/inet-socket-address.h"
#include "ns3/point-to-point-helper.h"
#include "ns3/internet-stack-helper.h"
#include "ns3/ipv4-address-helper.h"
#include "ns3/ipv4-header.h"
#include "ns3/packet-sink-helper.h"
#include "ns3/udp-client-server-helper.h"
#include "ns3/udp-header.h"
#include "ns3/simulator.h"
#include "ns3/wimax-helper.h"
#include "ns3/mobility-helper.h"
#include "ns3/global-route-manager.h"
#include "ns3/wimax-tlv.h"
#include "ns3/ipcs-classifier-record.h"
#include "ns3/service-flow.h"
#include <iostream>

using namespace ns3;

/*
 * Test the service flow creation.
 */
class Ns3WimaxSfCreationTestCase : public TestCase
{
public:
  Ns3WimaxSfCreationTestCase ();
  virtual ~Ns3WimaxSfCreationTestCase ();

private:
  virtual void DoRun (void);

};

Ns3WimaxSfCreationTestCase::Ns3WimaxSfCreationTestCase ()
  : TestCase ("Test the service flow tlv implementation.")
{
}

Ns3WimaxSfCreationTestCase::~Ns3WimaxSfCreationTestCase ()
{
}

void
Ns3WimaxSfCreationTestCase::DoRun (void)
{

  // default values
  int duration = 2;
  WimaxHelper::SchedulerType scheduler = WimaxHelper::SCHED_TYPE_SIMPLE;

  NodeContainer ssNodes;
  NodeContainer bsNodes;

  ssNodes.Create (1);
  bsNodes.Create (1);

  WimaxHelper wimax;

  NetDeviceContainer ssDevs, bsDevs;

  ssDevs = wimax.Install (ssNodes,
                          WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
                          WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
                          scheduler);
  bsDevs = wimax.Install (bsNodes, WimaxHelper::DEVICE_TYPE_BASE_STATION, WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler);

  ssDevs.Get (0)->GetObject<SubscriberStationNetDevice> ()->SetModulationType (WimaxPhy::MODULATION_TYPE_QAM16_12);
  bsDevs.Get (0)->GetObject<BaseStationNetDevice> ();

  InternetStackHelper stack;
  stack.Install (bsNodes);
  stack.Install (ssNodes);

  Ipv4AddressHelper address;
  address.SetBase ("10.1.1.0", "255.255.255.0");

  Ipv4InterfaceContainer SSinterfaces = address.Assign (ssDevs);
  Ipv4InterfaceContainer BSinterface = address.Assign (bsDevs);

  // Create one UGS Downlink service flow between the ss and the bs
  ServiceFlow * DlServiceFlowUgs = new ServiceFlow (ServiceFlow::SF_DIRECTION_DOWN);
  IpcsClassifierRecord DlClassifierUgs (Ipv4Address ("0.0.0.0"),
                                        Ipv4Mask ("0.0.0.0"),
                                        Ipv4Address ("0.0.0.0"),
                                        Ipv4Mask ("0.0.0.0"),
                                        3000,
                                        3000,
                                        0,
                                        35000,
                                        17,
                                        1);
  CsParameters DlcsParam (CsParameters::ADD, DlClassifierUgs);
  DlServiceFlowUgs->SetConvergenceSublayerParam (DlcsParam);
  DlServiceFlowUgs->SetCsSpecification (ServiceFlow::IPV4);
  DlServiceFlowUgs->SetServiceSchedulingType (ServiceFlow::SF_TYPE_UGS);
  DlServiceFlowUgs->SetMaxSustainedTrafficRate (1000000);
  DlServiceFlowUgs->SetMinReservedTrafficRate (1000000);
  DlServiceFlowUgs->SetMinTolerableTrafficRate (1000000);
  DlServiceFlowUgs->SetMaximumLatency (10);
  DlServiceFlowUgs->SetMaxTrafficBurst (1000);
  DlServiceFlowUgs->SetTrafficPriority (1);

  // Create one UGS Uplink service flow between the ss and the bs
  ServiceFlow * UlServiceFlowUgs = new ServiceFlow (ServiceFlow::SF_DIRECTION_UP);
  IpcsClassifierRecord UlClassifierUgs (Ipv4Address ("0.0.0.0"),
                                        Ipv4Mask ("0.0.0.0"),
                                        Ipv4Address ("0.0.0.0"),
                                        Ipv4Mask ("0.0.0.0"),
                                        0,
                                        35000,
                                        3000,
                                        3000,
                                        17,
                                        1);
  CsParameters UlcsParam (CsParameters::ADD, UlClassifierUgs);
  UlServiceFlowUgs->SetConvergenceSublayerParam (UlcsParam);
  UlServiceFlowUgs->SetCsSpecification (ServiceFlow::IPV4);
  UlServiceFlowUgs->SetServiceSchedulingType (ServiceFlow::SF_TYPE_UGS);
  UlServiceFlowUgs->SetMaxSustainedTrafficRate (1000000);
  UlServiceFlowUgs->SetMinReservedTrafficRate (1000000);
  UlServiceFlowUgs->SetMinTolerableTrafficRate (1000000);
  UlServiceFlowUgs->SetMaximumLatency (10);
  UlServiceFlowUgs->SetMaxTrafficBurst (1000);
  UlServiceFlowUgs->SetTrafficPriority (1);
  ssDevs.Get (0)->GetObject<SubscriberStationNetDevice> ()->AddServiceFlow (DlServiceFlowUgs);
  ssDevs.Get (0)->GetObject<SubscriberStationNetDevice> ()->AddServiceFlow (UlServiceFlowUgs);

  Simulator::Stop (Seconds (duration));
  Simulator::Run ();
  Simulator::Destroy ();
}

// ==============================================================================
class Ns3WimaxServiceFlowTestSuite : public TestSuite
{
public:
  Ns3WimaxServiceFlowTestSuite ();
};

Ns3WimaxServiceFlowTestSuite::Ns3WimaxServiceFlowTestSuite ()
  : TestSuite ("wimax-service-flow", UNIT)
{
  AddTestCase (new Ns3WimaxSfCreationTestCase, TestCase::QUICK);
}

static Ns3WimaxServiceFlowTestSuite ns3WimaxServiceFlowTestSuite;


text:
package com.zackehh.parse;

import java.util.Locale;

public abstract class ExpressionUtil {
	public static String normalizeNumber(String number,Locale loc) throws UnparsableExpressionException{
		String result=number.replaceAll("e|E", "*10^");
		return result;
	}
	public static String normalizeNumber(String number) throws UnparsableExpressionException{
		return normalizeNumber(number, Locale.getDefault());
	}
}


text:
#import "GTLUtilities.h"

#include <objc/runtime.h>

@implementation GTLUtilities

#pragma mark String encoding

// URL Encoding

+ (NSString *)stringByURLEncodingString:(NSString *)str {
  NSString *result = [str stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
  return result;
}

// NSURL's stringByAddingPercentEscapesUsingEncoding: does not escape
// some characters that should be escaped in URL parameters, like / and ?;
// we'll use CFURL to force the encoding of those
//
// Reference: http://www.ietf.org/rfc/rfc3986.txt

const CFStringRef kCharsToForceEscape = CFSTR("!*'();:@&=+$,/?%#[]");

+ (NSString *)stringByURLEncodingForURI:(NSString *)str {

  NSString *resultStr = str;

  CFStringRef originalString = (CFStringRef) str;
  CFStringRef leaveUnescaped = NULL;

  CFStringRef escapedStr;
  escapedStr = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
                                                       originalString,
                                                       leaveUnescaped,
                                                       kCharsToForceEscape,
                                                       kCFStringEncodingUTF8);
  if (escapedStr) {
    resultStr = [(id)CFMakeCollectable(escapedStr) autorelease];
  }
  return resultStr;
}

+ (NSString *)stringByURLEncodingStringParameter:(NSString *)str {
  // For parameters, we'll explicitly leave spaces unescaped now, and replace
  // them with +'s
  NSString *resultStr = str;

  CFStringRef originalString = (CFStringRef) str;
  CFStringRef leaveUnescaped = CFSTR(" ");

  CFStringRef escapedStr;
  escapedStr = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,
                                                       originalString,
                                                       leaveUnescaped,
                                                       kCharsToForceEscape,
                                                       kCFStringEncodingUTF8);

  if (escapedStr) {
    NSMutableString *mutableStr = [NSMutableString stringWithString:(NSString *)escapedStr];
    CFRelease(escapedStr);

    // replace spaces with plusses
    [mutableStr replaceOccurrencesOfString:@" "
                                withString:@"+"
                                   options:0
                                     range:NSMakeRange(0, [mutableStr length])];
    resultStr = mutableStr;
  }
  return resultStr;
}

+ (NSString *)stringByPercentEncodingUTF8ForString:(NSString *)inputStr {

  // Encode per http://bitworking.org/projects/atom/rfc5023.html#rfc.section.9.7
  //
  // This is used for encoding upload slug headers
  //
  // Step through the string as UTF-8, and replace characters outside 20..7E
  // (and the percent symbol itself, 25) with percent-encodings
  //
  // We avoid creating an encoding string unless we encounter some characters
  // that require it
  const char* utf8 = [inputStr UTF8String];
  if (utf8 == NULL) {
    return nil;
  }

  NSMutableString *encoded = nil;

  for (unsigned int idx = 0; utf8[idx] != '\0'; idx++) {

    unsigned char currChar = (unsigned char)utf8[idx];
    if (currChar < 0x20 || currChar == 0x25 || currChar > 0x7E) {

      if (encoded == nil) {
        // Start encoding and catch up on the character skipped so far
        encoded = [[[NSMutableString alloc] initWithBytes:utf8
                                                   length:idx
                                                 encoding:NSUTF8StringEncoding] autorelease];
      }

      // append this byte as a % and then uppercase hex
      [encoded appendFormat:@"%%%02X", currChar];

    } else {
      // This character does not need encoding
      //
      // Encoded is nil here unless we've encountered a previous character
      // that needed encoding
      [encoded appendFormat:@"%c", currChar];
    }
  }

  if (encoded) {
    return encoded;
  }

  return inputStr;
}

#pragma mark Key-Value Coding Searches in an Array

+ (NSArray *)objectsFromArray:(NSArray *)sourceArray
                    withValue:(id)desiredValue
                   forKeyPath:(NSString *)keyPath {
  // Step through all entries, get the value from
  // the key path, and see if it's equal to the
  // desired value
  NSMutableArray *results = [NSMutableArray array];

  for(id obj in sourceArray) {
    id val = [obj valueForKeyPath:keyPath];
    if (GTL_AreEqualOrBothNil(val, desiredValue)) {

      // found a match; add it to the results array
      [results addObject:obj];
    }
  }
  return results;
}

+ (id)firstObjectFromArray:(NSArray *)sourceArray
                 withValue:(id)desiredValue
                forKeyPath:(NSString *)keyPath {
  for (id obj in sourceArray) {
    id val = [obj valueForKeyPath:keyPath];
    if (GTL_AreEqualOrBothNil(val, desiredValue)) {
      // found a match; return it
      return obj;
    }
  }
  return nil;
}

#pragma mark Version helpers

// compareVersion compares two strings in 1.2.3.4 format
// missing fields are interpreted as zeros, so 1.2 = 1.2.0.0
+ (NSComparisonResult)compareVersion:(NSString *)ver1 toVersion:(NSString *)ver2 {

  static NSCharacterSet* dotSet = nil;
  if (dotSet == nil) {
    dotSet = [[NSCharacterSet characterSetWithCharactersInString:@"."] retain];
  }

  if (ver1 == nil) ver1 = @"";
  if (ver2 == nil) ver2 = @"";

  NSScanner* scanner1 = [NSScanner scannerWithString:ver1];
  NSScanner* scanner2 = [NSScanner scannerWithString:ver2];

  [scanner1 setCharactersToBeSkipped:dotSet];
  [scanner2 setCharactersToBeSkipped:dotSet];

  int partA1 = 0, partA2 = 0, partB1 = 0, partB2 = 0;
  int partC1 = 0, partC2 = 0, partD1 = 0, partD2 = 0;

  if ([scanner1 scanInt:&partA1] && [scanner1 scanInt:&partB1]
      && [scanner1 scanInt:&partC1] && [scanner1 scanInt:&partD1]) {
  }
  if ([scanner2 scanInt:&partA2] && [scanner2 scanInt:&partB2]
      && [scanner2 scanInt:&partC2] && [scanner2 scanInt:&partD2]) {
  }

  if (partA1 != partA2) return ((partA1 < partA2) ? NSOrderedAscending : NSOrderedDescending);
  if (partB1 != partB2) return ((partB1 < partB2) ? NSOrderedAscending : NSOrderedDescending);
  if (partC1 != partC2) return ((partC1 < partC2) ? NSOrderedAscending : NSOrderedDescending);
  if (partD1 != partD2) return ((partD1 < partD2) ? NSOrderedAscending : NSOrderedDescending);
  return NSOrderedSame;
}

#pragma mark URL builder

+ (NSURL *)URLWithString:(NSString *)urlString
         queryParameters:(NSDictionary *)queryParameters {
  if ([urlString length] == 0) return nil;

  NSString *fullURLString;
  if ([queryParameters count] > 0) {
    NSMutableArray *queryItems = [NSMutableArray arrayWithCapacity:[queryParameters count]];

    // sort the custom parameter keys so that we have deterministic parameter
    // order for unit tests
    NSArray *queryKeys = [queryParameters allKeys];
    NSArray *sortedQueryKeys = [queryKeys sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];

    for (NSString *paramKey in sortedQueryKeys) {
      NSString *paramValue = [queryParameters valueForKey:paramKey];

      NSString *paramItem = [NSString stringWithFormat:@"%@=%@",
                             [self stringByURLEncodingStringParameter:paramKey],
                             [self stringByURLEncodingStringParameter:paramValue]];

      [queryItems addObject:paramItem];
    }

    NSString *paramStr = [queryItems componentsJoinedByString:@"&"];

    BOOL hasQMark = ([urlString rangeOfString:@"?"].location == NSNotFound);
    char joiner = hasQMark ? '?' : '&';
    fullURLString = [NSString stringWithFormat:@"%@%c%@",
                     urlString, joiner, paramStr];
  } else {
    fullURLString = urlString;
  }
  NSURL *result = [NSURL URLWithString:fullURLString];
  return result;
}

#pragma mark Collections

+ (NSDictionary *)mergedClassDictionaryForSelector:(SEL)selector
                                        startClass:(Class)startClass
                                     ancestorClass:(Class)ancestorClass
                                             cache:(NSMutableDictionary *)cache {
  NSDictionary *result;
  @synchronized(cache) {
    result = [cache objectForKey:startClass];
    if (result == nil) {
      // Collect the class's dictionary.
      NSDictionary *classDict = [startClass performSelector:selector];

      // Collect the parent class's merged dictionary.
      NSDictionary *parentClassMergedDict;
      if ([startClass isEqual:ancestorClass]) {
        parentClassMergedDict = nil;
      } else {
        Class parentClass = class_getSuperclass(startClass);
        parentClassMergedDict =
          [GTLUtilities mergedClassDictionaryForSelector:selector
                                              startClass:parentClass
                                           ancestorClass:ancestorClass
                                                   cache:cache];
      }

      // Merge this class's into the parent's so things properly override.
      NSMutableDictionary *mergeDict;
      if (parentClassMergedDict != nil) {
        mergeDict =
          [NSMutableDictionary dictionaryWithDictionary:parentClassMergedDict];
      } else {
        mergeDict = [NSMutableDictionary dictionary];
      }
      if (classDict != nil) {
        [mergeDict addEntriesFromDictionary:classDict];
      }

      // Make an immutable version.
      result = [NSDictionary dictionaryWithDictionary:mergeDict];

      // Save it.
      [cache setObject:result forKey:(id<NSCopying>)startClass];
    }
  }
  return result;
}

@end

// isEqual: has the fatal flaw that it doesn't deal well with the receiver
// being nil. We'll use this utility instead.
BOOL GTL_AreEqualOrBothNil(id obj1, id obj2) {
  if (obj1 == obj2) {
    return YES;
  }
  if (obj1 && obj2) {
    BOOL areEqual = [obj1 isEqual:obj2];
    return areEqual;
  }
  return NO;
}

BOOL GTL_AreBoolsEqual(BOOL b1, BOOL b2) {
  // avoid comparison problems with boolean types by negating
  // both booleans
  return (!b1 == !b2);
}

NSNumber *GTL_EnsureNSNumber(NSNumber *num) {
  // If the server returned a string object where we expect a number, try
  // to make a number object.
  if ([num isKindOfClass:[NSString class]]) {
    NSNumber *newNum;
    NSString *str = (NSString *)num;
    if ([str rangeOfString:@"."].location != NSNotFound) {
      // This is a floating-point number.
      // Force the parser to use '.' as the decimal separator.
      static NSLocale *usLocale = nil;
      @synchronized([GTLUtilities class]) {
        if (usLocale == nil) {
          usLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
        }
        newNum = [NSDecimalNumber decimalNumberWithString:(NSString*)num
                                                   locale:(id)usLocale];
      }
    } else {
      // NSDecimalNumber +decimalNumberWithString:locale:
      // does not correctly create an NSNumber for large values like
      // 71100000000007780.
      if ([str hasPrefix:@"-"]) {
        newNum = @([str longLongValue]);
      } else {
        const char *utf8 = [str UTF8String];
        unsigned long long ull = strtoull(utf8, NULL, 10);
        newNum = @(ull);
      }
    }
    if (newNum) {
      num = newNum;
    }
  }
  return num;
}


text:
all: clean test build buildcmd

.PHONY: clean
clean:
	rm -f feiertage
	rm -rf bin/

run:
	go run cmd/feiertage/feiertage.go -region baden-württemberg 2016

debug:
	dlv debug cmd/feiertage/feiertage.go -- -region baden-württemberg 2016

test:
	go test

build: feiertage.go region.go
	go build ./...

buildcmd: feiertage.go region.go cmd/feiertage/feiertage.go
	mkdir -p bin
	GOOS=linux GOARCH=amd64   go build -o bin/feiertage_linux_x86_64 cmd/feiertage/feiertage.go
	GOOS=darwin GOARCH=amd64  go build -o bin/feiertage_osx_x86_64   cmd/feiertage/feiertage.go
	GOOS=windows GOARCH=386   go build -o bin/feiertage_win32        cmd/feiertage/feiertage.go
	GOOS=windows GOARCH=amd64 go build -o bin/feiertage_win64        cmd/feiertage/feiertage.go


text:
class SomeClass
  def work_it
    puts 'some class work it'
  end

  def work_out
    puts 'some class work out'
  end
end


text:
/*
 * $Id: IC_Key.hpp 527149 2007-04-10 14:56:39Z amassari $
 */

#if !defined(XERCESC_INCLUDE_GUARD_IC_KEY_HPP)
#define XERCESC_INCLUDE_GUARD_IC_KEY_HPP

// ---------------------------------------------------------------------------
//  Includes
// ---------------------------------------------------------------------------
#include <xercesc/validators/schema/identity/IdentityConstraint.hpp>

XERCES_CPP_NAMESPACE_BEGIN

class VALIDATORS_EXPORT IC_Key: public IdentityConstraint
{
public:
    // -----------------------------------------------------------------------
    //  Constructors/Destructor
    // -----------------------------------------------------------------------
    IC_Key(const XMLCh* const identityConstraintName,
           const XMLCh* const elemName,
           MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
	~IC_Key();

	// -----------------------------------------------------------------------
    //  Getter methods
    // -----------------------------------------------------------------------
    short getType() const;

    /***
     * Support for Serialization/De-serialization
     ***/
    DECL_XSERIALIZABLE(IC_Key)

    IC_Key(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);

private:
    // -----------------------------------------------------------------------
    //  Unimplemented contstructors and operators
    // -----------------------------------------------------------------------
    IC_Key(const IC_Key& other);
    IC_Key& operator= (const IC_Key& other);
};

// ---------------------------------------------------------------------------
//  IC_Key: Getter methods
// ---------------------------------------------------------------------------
inline short IC_Key::getType() const {

    return IdentityConstraint::ICType_KEY;
}

XERCES_CPP_NAMESPACE_END

#endif

/**
  * End of file IC_Key.hpp
  */


text:
Set a image as iOS  LockScreen /HOME wallpaper or both,By call private framework.
Support iOS7~iOS9

now just a Demo !!! zz


text:
@interface BubbleView : UIView

@property (nonatomic,assign) CGPoint desPoint;
@property (nonatomic,strong) BubbleLayer *bubbleLayer;

@end


text:
using Microsoft.AspNet.Identity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HyperSlackers.AspNet.Identity.EntityFramework
{
    /// <summary>
    /// Minimal interface for a role for a multi-tenant <c>DbContext</c>.
    /// </summary>
    /// <typeparam name="TKey">The key type. (Typically <c>string</c>, <c>Guid</c>, <c>int</c>, or <c>long</c>.)</typeparam>
    public interface IRoleMultiHost<TKey> : IRole<TKey>
        where TKey : IEquatable<TKey>
    {
        TKey HostId { get; set; }
        bool IsGlobal { get; set; }
    }

    /// <summary>
    /// Minimal interface for a role for a multi-tenant <c>DbContext</c> having key type of <c>Guid</c>.
    /// </summary>
    public interface IRoleMultiHostGuid : IRoleMultiHost<Guid>
    {
    }

    /// <summary>
    /// Minimal interface for a role for a multi-tenant <c>DbContext</c> having key type of <c>int</c>.
    /// </summary>
    public interface IRoleMultiHostInt : IRoleMultiHost<int>
    {
    }

    /// <summary>
    /// Minimal interface for a role for a multi-tenant <c>DbContext</c> having key type of <c>long</c>.
    /// </summary>
    public interface IRoleMultiHostLong : IRoleMultiHost<long>
    {
    }
}


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Kursovaya
{
    public partial class ref_form : Form
    {
        public ref_form()
        {
            InitializeComponent();
        }
    }
}


text:
<?php

namespace Google\Service\CloudRedis;

class TlsCertificate extends \Google\Model
{
  /**
   * @var string
   */
  public $cert;
  /**
   * @var string
   */
  public $createTime;
  /**
   * @var string
   */
  public $expireTime;
  /**
   * @var string
   */
  public $serialNumber;
  /**
   * @var string
   */
  public $sha1Fingerprint;

  /**
   * @param string
   */
  public function setCert($cert)
  {
    $this->cert = $cert;
  }
  /**
   * @return string
   */
  public function getCert()
  {
    return $this->cert;
  }
  /**
   * @param string
   */
  public function setCreateTime($createTime)
  {
    $this->createTime = $createTime;
  }
  /**
   * @return string
   */
  public function getCreateTime()
  {
    return $this->createTime;
  }
  /**
   * @param string
   */
  public function setExpireTime($expireTime)
  {
    $this->expireTime = $expireTime;
  }
  /**
   * @return string
   */
  public function getExpireTime()
  {
    return $this->expireTime;
  }
  /**
   * @param string
   */
  public function setSerialNumber($serialNumber)
  {
    $this->serialNumber = $serialNumber;
  }
  /**
   * @return string
   */
  public function getSerialNumber()
  {
    return $this->serialNumber;
  }
  /**
   * @param string
   */
  public function setSha1Fingerprint($sha1Fingerprint)
  {
    $this->sha1Fingerprint = $sha1Fingerprint;
  }
  /**
   * @return string
   */
  public function getSha1Fingerprint()
  {
    return $this->sha1Fingerprint;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TlsCertificate::class, 'Google_Service_CloudRedis_TlsCertificate');


text:
<?xml version="1.0" encoding="utf-8"?>
<merger version="3"><dataSet config="main"><source path="H:\AndroidPro\kzmen\OneSDK\src\androidTest\shaders"/></dataSet></merger>


text:
require "aasm_progressable/engine"
require "aasm_progressable/model_mixin"

module AasmProgressable
end