text:
package com.netflix.priam.identity;

import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.Multimaps;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.netflix.priam.config.IConfiguration;
import com.netflix.priam.identity.config.InstanceInfo;
import com.netflix.priam.identity.token.ITokenRetriever;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;

/**
 * This class provides the central place to create and consume the identity of the instance - token,
 * seeds etc.
 */
@Singleton
public class InstanceIdentity {
    public static final String DUMMY_INSTANCE_ID = "new_slot";

    private final ListMultimap<String, PriamInstance> locMap =
            Multimaps.newListMultimap(new HashMap<>(), Lists::newArrayList);
    private final IPriamInstanceFactory factory;
    private final IMembership membership;
    private final IConfiguration config;

    private final Predicate<PriamInstance> differentHostPredicate =
            new Predicate<PriamInstance>() {
                @Override
                public boolean apply(PriamInstance instance) {
                    return (!instance.getInstanceId().equalsIgnoreCase(DUMMY_INSTANCE_ID)
                            && !instance.getHostName().equals(myInstance.getHostName()));
                }
            };

    private PriamInstance myInstance;
    // Instance information contains other information like ASG/vpc-id etc.
    private InstanceInfo myInstanceInfo;
    private boolean isReplace;
    private boolean isTokenPregenerated;
    private String replacedIp;

    @Inject
    // Note: do not parameterized the generic type variable to an implementation as
    // it confuses
    // Guice in the binding.
    public InstanceIdentity(
            IPriamInstanceFactory factory,
            IMembership membership,
            IConfiguration config,
            InstanceInfo instanceInfo,
            ITokenRetriever tokenRetriever)
            throws Exception {
        this.factory = factory;
        this.membership = membership;
        this.config = config;
        this.myInstanceInfo = instanceInfo;
        this.myInstance = tokenRetriever.get();
        this.replacedIp = tokenRetriever.getReplacedIp().orElse(null);
        this.isReplace = replacedIp != null;
        this.isTokenPregenerated = tokenRetriever.isTokenPregenerated();
    }

    public PriamInstance getInstance() {
        return myInstance;
    }

    public InstanceInfo getInstanceInfo() {
        return myInstanceInfo;
    }

    private void populateRacMap() {
        locMap.clear();
        factory.getAllIds(config.getAppName()).forEach(ins -> locMap.put(ins.getRac(), ins));
    }

    public List<String> getSeeds() {
        populateRacMap();
        List<String> seeds = new LinkedList<>();
        // Handle single zone deployment
        if (config.getRacs().size() == 1) {
            // Return empty list if all nodes are not up
            if (membership.getRacMembershipSize() != locMap.get(myInstance.getRac()).size())
                return seeds;
            // If seed node, return the next node in the list
            if (locMap.get(myInstance.getRac()).size() > 1
                    && locMap.get(myInstance.getRac())
                            .get(0)
                            .getHostIP()
                            .equals(myInstance.getHostIP())) {
                PriamInstance instance = locMap.get(myInstance.getRac()).get(1);
                if (instance != null && !isInstanceDummy(instance)) {
                    if (config.isMultiDC()) seeds.add(instance.getHostIP());
                    else seeds.add(instance.getHostName());
                }
            }
        }
        for (String loc : locMap.keySet()) {
            PriamInstance instance =
                    Iterables.tryFind(locMap.get(loc), differentHostPredicate).orNull();
            if (instance != null && !isInstanceDummy(instance)) {
                if (config.isMultiDC()) seeds.add(instance.getHostIP());
                else seeds.add(instance.getHostName());
            }
        }
        return seeds;
    }

    public boolean isSeed() {
        populateRacMap();
        String ip = locMap.get(myInstance.getRac()).get(0).getHostName();
        return myInstance.getHostName().equals(ip);
    }

    public boolean isReplace() {
        return isReplace;
    }

    public boolean isTokenPregenerated() {
        return isTokenPregenerated;
    }

    public String getReplacedIp() {
        return replacedIp;
    }

    public void setReplacedIp(String replacedIp) {
        this.replacedIp = replacedIp;
        if (!replacedIp.isEmpty()) this.isReplace = true;
    }

    private static boolean isInstanceDummy(PriamInstance instance) {
        return instance.getInstanceId().equals(DUMMY_INSTANCE_ID);
    }
}


text:
pub mod get;
pub mod store;

pub use self::get::get_callback;
pub use self::store::store_callback;

redpajama_set_name: RedPajamaGithub


text:
This package can be divided and described in two seperate parts:

1. The base of this package is to provide a way to manipulate tabs and panels in dashboards in Umbraco 7 - all by using C#. Currently in Umbraco, dashboards needs to be configured in `~/config/Dashboard.config`, but this package lets you add news tabs and panels as well as minipulating existing tabs and panels in Umbraco. Since this was thought as something other packages could use as well, I have created [an issue on the Umbraco tracker](http://issues.umbraco.org/issue/U4-6557) since I believe this is something that should be in the Umbraco core.

2. Secondly, this package adds a few panels can you can add to a dashboard - eg. a panel for showing Analytics statistics for sites in your Umbraco installation. This package won't add any panels by default, so you need to do this by writing a bit of code yourself - you can find a bit of inspiration in the examples below.

## Links

- Installation
- Quick example
- So why does this work?
- The Future

## Installation

The code in this repository has been released as `v1.0.0-beta1`. The beta label is primarily because I hadn't testet the code thoroughly at the time of the release, but I haven't experienced any issues since the beta release.

1. [**NuGet Package**][NuGetPackage]
Install this NuGet package in your Visual Studio project. Makes updating easy.

2. [**ZIP file**][GitHubRelease]
Grab a ZIP file of the latest release; unzip and the files to the root directory of your website.

## Quick example

By default, the "Content" section in Umbraco 7 will have two tabs - "Get Started" and "Change Password". Let us for this demo play around with those tabs.

Given this project, we can implement the `IDashboardPlugin` interface, and use the `GetDashboard` method to do our thing.

The plugin will change the tab name from "Get Started" to "Umbraco FTW" (because why not?), and add a new tab with our custom panel (or property as called internally in Umbraco). Properties of the `DashboardDataProperty` class will be available to play around with in AngularJS ;)

```C#
public class DemoDashboardPlugin : IDashboardPlugin {

    public void GetDashboard(string section, List<DashboardTab> tabs) {

        // Skip if not the dashboard for "content"
        if (section != "content") return;

        // Find the "Get Started" tab
        DashboardTab getStarted = tabs.FirstOrDefault(x => x.Alias == "GetStarted");
        if (getStarted == null) return;

        // Adjust the label a bit
        getStarted.Label = "Umbraco FTW";

        // Add a new tab
        tabs.Add(new DashboardTab {
            Label = "A lot of bacon",
            Alias = "bacon",
            Properties = new List<DashboardProperty> {
                new DashboardDataProperty("Demo") {
                    Data = new {
                        a = 123,
                        b = 456,
                        c = 789
                    }
                }
            }
        });

    }

}
```

The plugin doesn't get picked up by it self, so we need to add it our selves. This can be done as:

```C#
public class Startup : ApplicationEventHandler {

    protected override void ApplicationStarted(UmbracoApplicationBase app, ApplicationContext ctx) {
        DashboardContext.Current.Plugins.Add(new DemoDashboardPlugin());
    }

}
```

## So why does this work?

In a normal Umbraco installation, you can only add tabs and panels by editing the `/config/Dashboard.config` file (or by writing some code, that modifies that file). When Umbraco needs to render the dashboard for the "Content" section, it will make a request to `/umbraco/backoffice/UmbracoApi/Dashboard/GetDashboard?section=content`, and the response will be an array of the tabs for that section.

However with [a little hack](https://github.com/abjerner/Skybrud.Umbraco.Dashboard/blob/master/src/Skybrud.Umbraco.Dashboard/DashboardStartup.cs#L28), we can change which URL that Umbraco will request, so Umbraco instead will make a request to our custom Dashboard WebApi controller at `/umbraco/backoffice/Skybrud/Dashboard/GetDashboard?section=content`.

## The Future

In the future, this project will also feature panels/properties that you can add to your dashboard. Have a look at the screenshot below.

While the Mailchimp and NuGet boxes are currently just mockups, the big box with the statistics pulls information directly from Google Analytics.

So when your editors log in, they could be presented with a view like this:

![An example](https://github.com/abjerner/Skybrud.Umbraco.Dashboard/blob/master/images/readme-dashboard-preview.png)

[NuGetPackage]: https://www.nuget.org/packages/Skybrud.Umbraco.Dashboard
[GitHubRelease]: https://github.com/abjerner/Skybrud.Umbraco.Dashboard/releases/latest


text:
"""Testing for updating TensorFlow lite schema."""

import json
import tempfile
from tensorflow.lite.schema import upgrade_schema as upgrade_schema_lib
from tensorflow.python.framework import test_util
from tensorflow.python.platform import test as test_lib

EMPTY_TEST_SCHEMA_V1 = {
    "version": 1,
    "operator_codes": [],
    "subgraphs": [],
}

EMPTY_TEST_SCHEMA_V3 = {
    "version": 3,
    "operator_codes": [],
    "subgraphs": [],
    "buffers": [{
        "data": []
    }]
}

TEST_SCHEMA_V0 = {
    "operator_codes": [],
    "tensors": [],
    "inputs": [],
    "outputs": [],
    "operators": [],
    "version": 0
}

TEST_SCHEMA_V3 = {
    "operator_codes": [],
    "buffers": [{
        "data": []
    }],
    "subgraphs": [{
        "tensors": [],
        "inputs": [],
        "outputs": [],
        "operators": [],
    }],
    "version":
        3
}

FULL_TEST_SCHEMA_V1 = {
    "version":
        1,
    "operator_codes": [
        {
            "builtin_code": "CONVOLUTION"
        },
        {
            "builtin_code": "DEPTHWISE_CONVOLUTION"
        },
        {
            "builtin_code": "AVERAGE_POOL"
        },
        {
            "builtin_code": "MAX_POOL"
        },
        {
            "builtin_code": "L2_POOL"
        },
        {
            "builtin_code": "SIGMOID"
        },
        {
            "builtin_code": "L2NORM"
        },
        {
            "builtin_code": "LOCAL_RESPONSE_NORM"
        },
        {
            "builtin_code": "ADD"
        },
        {
            "builtin_code": "Basic_RNN"
        },
    ],
    "subgraphs": [{
        "operators": [
            {
                "builtin_options_type": "PoolOptions"
            },
            {
                "builtin_options_type": "DepthwiseConvolutionOptions"
            },
            {
                "builtin_options_type": "ConvolutionOptions"
            },
            {
                "builtin_options_type": "LocalResponseNormOptions"
            },
            {
                "builtin_options_type": "BasicRNNOptions"
            },
        ],
    }],
    "description":
        "",
}

FULL_TEST_SCHEMA_V3 = {
    "version":
        3,
    "operator_codes": [
        {
            "builtin_code": "CONV_2D"
        },
        {
            "builtin_code": "DEPTHWISE_CONV_2D"
        },
        {
            "builtin_code": "AVERAGE_POOL_2D"
        },
        {
            "builtin_code": "MAX_POOL_2D"
        },
        {
            "builtin_code": "L2_POOL_2D"
        },
        {
            "builtin_code": "LOGISTIC"
        },
        {
            "builtin_code": "L2_NORMALIZATION"
        },
        {
            "builtin_code": "LOCAL_RESPONSE_NORMALIZATION"
        },
        {
            "builtin_code": "ADD"
        },
        {
            "builtin_code": "RNN"
        },
    ],
    "subgraphs": [{
        "operators": [
            {
                "builtin_options_type": "Pool2DOptions"
            },
            {
                "builtin_options_type": "DepthwiseConv2DOptions"
            },
            {
                "builtin_options_type": "Conv2DOptions"
            },
            {
                "builtin_options_type": "LocalResponseNormalizationOptions"
            },
            {
                "builtin_options_type": "RNNOptions"
            },
        ],
    }],
    "description":
        "",
    "buffers": [{
        "data": []
    }]
}

BUFFER_TEST_V2 = {
    "operator_codes": [],
    "buffers": [],
    "subgraphs": [{
        "tensors": [
            {
                "data_buffer": [1, 2, 3, 4]
            },
            {
                "data_buffer": [1, 2, 3, 4, 5, 6, 7, 8]
            },
            {
                "data_buffer": []
            },
        ],
        "inputs": [],
        "outputs": [],
        "operators": [],
    }],
    "version":
        2
}

BUFFER_TEST_V3 = {
    "operator_codes": [],
    "subgraphs": [{
        "tensors": [
            {
                "buffer": 1
            },
            {
                "buffer": 2
            },
            {
                "buffer": 0
            },
        ],
        "inputs": [],
        "outputs": [],
        "operators": [],
    }],
    "buffers": [
        {
            "data": []
        },
        {
            "data": [1, 2, 3, 4]
        },
        {
            "data": [1, 2, 3, 4, 5, 6, 7, 8]
        },
    ],
    "version":
        3
}

def JsonDumpAndFlush(data, fp):
  """Write the dictionary `data` to a JSON file `fp` (and flush).

  Args:
    data: in a dictionary that is JSON serializable.
    fp: File-like object
  """
  json.dump(data, fp)
  fp.flush()

class TestSchemaUpgrade(test_util.TensorFlowTestCase):

  def testNonExistentFile(self):
    converter = upgrade_schema_lib.Converter()
    _, non_existent = tempfile.mkstemp(suffix=".json")  # safe to ignore fd
    with self.assertRaisesRegex(IOError, "No such file or directory"):
      converter.Convert(non_existent, non_existent)

  def testInvalidExtension(self):
    converter = upgrade_schema_lib.Converter()
    _, invalid_extension = tempfile.mkstemp(suffix=".foo")  # safe to ignore fd
    with self.assertRaisesRegex(ValueError, "Invalid extension on input"):
      converter.Convert(invalid_extension, invalid_extension)
    with tempfile.NamedTemporaryFile(suffix=".json", mode="w+") as in_json:
      JsonDumpAndFlush(EMPTY_TEST_SCHEMA_V1, in_json)
      with self.assertRaisesRegex(ValueError, "Invalid extension on output"):
        converter.Convert(in_json.name, invalid_extension)

  def CheckConversion(self, data_old, data_expected):
    """Given a data dictionary, test upgrading to current version.

    Args:
        data_old: TFLite model as a dictionary (arbitrary version).
        data_expected: TFLite model as a dictionary (upgraded).
    """
    converter = upgrade_schema_lib.Converter()
    with tempfile.NamedTemporaryFile(suffix=".json", mode="w+") as in_json, \
            tempfile.NamedTemporaryFile(
                suffix=".json", mode="w+") as out_json, \
            tempfile.NamedTemporaryFile(
                suffix=".bin", mode="w+b") as out_bin, \
            tempfile.NamedTemporaryFile(
                suffix=".tflite", mode="w+b") as out_tflite:
      JsonDumpAndFlush(data_old, in_json)
      # Test JSON output
      converter.Convert(in_json.name, out_json.name)
      # Test binary output
      # Convert to .tflite  and then to .bin and check if binary is equal
      converter.Convert(in_json.name, out_tflite.name)
      converter.Convert(out_tflite.name, out_bin.name)
      self.assertEqual(
          open(out_bin.name, "rb").read(),
          open(out_tflite.name, "rb").read())
      # Test that conversion actually produced successful new json.
      converted_schema = json.load(out_json)
      self.assertEqual(converted_schema, data_expected)

  def testAlreadyUpgraded(self):
    """A file already at version 3 should stay at version 3."""
    self.CheckConversion(EMPTY_TEST_SCHEMA_V3, EMPTY_TEST_SCHEMA_V3)
    self.CheckConversion(TEST_SCHEMA_V3, TEST_SCHEMA_V3)
    self.CheckConversion(BUFFER_TEST_V3, BUFFER_TEST_V3)

  # Disable this while we have incorrectly versioned structures around.
  # def testV0Upgrade_IntroducesSubgraphs(self):
  #   """V0 did not have subgraphs; check to make sure they get introduced."""
  #   self.CheckConversion(TEST_SCHEMA_V0, TEST_SCHEMA_V3)

  def testV1Upgrade_RenameOps(self):
    """V1 had many different names for ops; check to make sure they rename."""
    self.CheckConversion(EMPTY_TEST_SCHEMA_V1, EMPTY_TEST_SCHEMA_V3)
    self.CheckConversion(FULL_TEST_SCHEMA_V1, FULL_TEST_SCHEMA_V3)

  def testV2Upgrade_CreateBuffers(self):
    """V2 did not have buffers; check to make sure they are created."""
    self.CheckConversion(BUFFER_TEST_V2, BUFFER_TEST_V3)

if __name__ == "__main__":
  test_lib.main()


text:
package io.lumify.test;

import org.apache.commons.io.FileUtils;
import org.elasticsearch.action.admin.cluster.state.ClusterStateResponse;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.node.Node;
import org.elasticsearch.node.NodeBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.File;
import java.io.IOException;
import java.util.Properties;

public class TestElasticSearch {
    private static final Logger LOGGER = LoggerFactory.getLogger(TestElasticSearch.class);
    private File tempDir;
    private Node elasticSearchNode;
    private String addr;
    private final Properties lumifyConfig;

    public TestElasticSearch(Properties config) {
        this.lumifyConfig = config;
    }

    public void startup() {
        try {
            tempDir = File.createTempFile("elasticsearch-temp", Long.toString(System.nanoTime()));
            tempDir.delete();
            tempDir.mkdir();
            LOGGER.info("writing to: " + tempDir);

            elasticSearchNode = NodeBuilder
                    .nodeBuilder()
                    .local(false)
                    .clusterName("elasticsearch")
                    .settings(
                            ImmutableSettings.settingsBuilder()
                                    .put("gateway.type", "local")
                                    .put("path.data", new File(tempDir, "data").getAbsolutePath())
                                    .put("path.logs", new File(tempDir, "logs").getAbsolutePath())
                                    .put("path.work", new File(tempDir, "work").getAbsolutePath())
                    ).node();

            elasticSearchNode.start();

            ClusterStateResponse response = elasticSearchNode.client().admin().cluster().prepareState().execute().actionGet();
            addr = response.getState().getNodes().getNodes().values().iterator().next().value.getAddress().toString();
            addr = addr.substring("inet[/".length());
            addr = addr.substring(0, addr.length() - 1);

            lumifyConfig.setProperty("graph.search.locations", addr);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }

    public void shutdown() {
        LOGGER.info("shutdown");
        try {
            if (elasticSearchNode != null && !elasticSearchNode.isClosed()) {
                elasticSearchNode.stop();
                elasticSearchNode.close();
            }
            if (tempDir != null) {
                FileUtils.deleteDirectory(tempDir);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            tempDir = null;
            elasticSearchNode = null;
            addr = null;
        }
    }

}


text:
package org.keycloak.userprofile;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.function.Consumer;
import java.util.stream.Collectors;

import org.keycloak.models.Constants;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.UserModel;
import org.keycloak.validate.ValidationContext;
import org.keycloak.validate.ValidationError;

/**
 *
The default implementation for {@link Attributes}. Should be reused as much as possible by the different implementations
 * of {@link UserProfileProvider}.
 *
 *
One of the main aspects of this implementation is to allow normalizing attributes accordingly to the profile
 * configuration and current context. As such, it provides some common normalization to common profile attributes (e.g.: username,
 * email, first and last names, dynamic read-only attributes).
 *
 *
This implementation is not specific to any user profile implementation.
 *
 * @author Pedro Igor
 */
public class DefaultAttributes extends HashMap<String, List<String>> implements Attributes {

    /**
     * To reference dynamic attributes that can be configured as read-only when setting up the provider.
     * We should probably remove that once we remove the legacy provider, because this will come from the configuration.
     */
    public static final String READ_ONLY_ATTRIBUTE_KEY = "kc.read.only";

    protected final UserProfileContext context;
    private final KeycloakSession session;
    private final Map<String, AttributeMetadata> metadataByAttribute;
    protected final UserModel user;

    public DefaultAttributes(UserProfileContext context, Map<String, ?> attributes, UserModel user,
            UserProfileMetadata profileMetadata,
            KeycloakSession session) {
        this.context = context;
        this.user = user;
        this.session = session;
        this.metadataByAttribute = configureMetadata(profileMetadata.getAttributes());
        putAll(Collections.unmodifiableMap(normalizeAttributes(attributes)));
    }

    @Override
    public boolean isReadOnly(String attributeName) {
        if (isReadOnlyFromMetadata(attributeName) || isReadOnlyInternalAttribute(attributeName)) {
            return true;
        }

        return getMetadata(attributeName) == null;
    }

    /**
     * Checks whether an attribute is marked as read only by looking at its metadata.
     *
     * @param attributeName the attribute name
     * @return @return {@code true} if the attribute is readonly. Otherwise, returns {@code false}
     */
    protected boolean isReadOnlyFromMetadata(String attributeName) {
        AttributeMetadata attributeMetadata = metadataByAttribute.get(attributeName);

        if (attributeMetadata == null) {
            return false;
        }

        return attributeMetadata.isReadOnly(createAttributeContext(attributeMetadata));
    }

    @Override
    public boolean isRequired(String name) {
        AttributeMetadata attributeMetadata = metadataByAttribute.get(name);

        if (attributeMetadata == null) {
            return false;
        }

        return attributeMetadata.isRequired(createAttributeContext(attributeMetadata));
    }

    @Override
    public boolean validate(String name, Consumer<ValidationError>... listeners) {
        Entry<String, List<String>> attribute = createAttribute(name);
        List<AttributeMetadata> metadatas = new ArrayList<>();

        metadatas.addAll(Optional.ofNullable(this.metadataByAttribute.get(attribute.getKey()))
                .map(Collections::singletonList).orElse(Collections.emptyList()));
        metadatas.addAll(Optional.ofNullable(this.metadataByAttribute.get(READ_ONLY_ATTRIBUTE_KEY))
                .map(Collections::singletonList).orElse(Collections.emptyList()));

        Boolean result = null;

        for (AttributeMetadata metadata : metadatas) {
            AttributeContext attributeContext = createAttributeContext(attribute, metadata);

            for (AttributeValidatorMetadata validator : metadata.getValidators()) {
                ValidationContext vc = validator.validate(attributeContext);

                if (vc.isValid()) {
                    continue;
                }

                if (result == null) {
                    result = false;
                }

                if (listeners != null) {
                    for (ValidationError error : vc.getErrors()) {
                        for (Consumer<ValidationError> consumer : listeners) {
                            consumer.accept(error);
                        }
                    }
                }
            }
        }

        return result == null;
    }

    @Override
    public List<String> getValues(String name) {
        return getOrDefault(name, EMPTY_VALUE);
    }

    @Override
    public boolean contains(String name) {
        return containsKey(name);
    }

    @Override
    public Set<String> nameSet() {
        return keySet();
    }

    @Override
    public Set<Entry<String, List<String>>> attributeSet() {
        return entrySet();
    }

    @Override
    public AttributeMetadata getMetadata(String name) {
        AttributeMetadata metadata = metadataByAttribute.get(name);

        if (metadata == null) {
            return null;
        }

        return metadata.clone();
    }

    @Override
    public Map<String, List<String>> getReadable() {
        Map<String, List<String>> attributes = new HashMap<>(this);

        for (String name : nameSet()) {
            AttributeMetadata metadata = getMetadata(name);

            if (metadata == null || !metadata.canView(createAttributeContext(metadata))) {
                attributes.remove(name);
            }
        }

        return attributes;
    }

    @Override
    public Map<String, List<String>> toMap() {
        return this;
    }

    private AttributeContext createAttributeContext(Entry<String, List<String>> attribute, AttributeMetadata metadata) {
        return new AttributeContext(context, session, attribute, user, metadata);
    }

    private AttributeContext createAttributeContext(String attributeName, AttributeMetadata metadata) {
        return new AttributeContext(context, session, createAttribute(attributeName), user, metadata);
    }

    protected AttributeContext createAttributeContext(AttributeMetadata metadata) {
        return createAttributeContext(createAttribute(metadata.getName()), metadata);
    }

    private Map<String, AttributeMetadata> configureMetadata(List<AttributeMetadata> attributes) {
        Map<String, AttributeMetadata> metadatas = new HashMap<>();

        for (AttributeMetadata metadata : attributes) {
            // checks whether the attribute is selected for the current profile
            if (metadata.isSelected(createAttributeContext(metadata))) {
                metadatas.put(metadata.getName(), metadata);
            }
        }

        return metadatas;
    }

    private SimpleImmutableEntry<String, List<String>> createAttribute(String name) {
        return new SimpleImmutableEntry<String, List<String>>(name, null) {
            @Override
            public List<String> getValue() {
                List<String> values = get(name);

                if (values == null) {
                    return EMPTY_VALUE;
                }

                return values;
            }
        };
    }

    /**
     * Normalizes the given {@code attributes} (as they were provided when creating a profile) accordingly to the
     * profile configuration and the current context.
     *
     * @param attributes the denormalized map of attributes
     *
     * @return a normalized map of attributes
     */
    private Map<String, List<String>> normalizeAttributes(Map<String, ?> attributes) {
        Map<String, List<String>> newAttributes = new HashMap<>();
        RealmModel realm = session.getContext().getRealm();

        if (attributes != null) {
            for (Map.Entry<String, ?> entry : attributes.entrySet()) {
                String key = entry.getKey();

                if (!isSupportedAttribute(key)) {
                    continue;
                }

                if (key.startsWith(Constants.USER_ATTRIBUTES_PREFIX)) {
                    key = key.substring(Constants.USER_ATTRIBUTES_PREFIX.length());
                }

                List<String> values;
                Object value = entry.getValue();

                if (value instanceof String) {
                    values = Collections.singletonList((String) value);
                } else {
                    values = (List<String>) value;
                }

                newAttributes.put(key, Collections.unmodifiableList(values));
            }
        }

        // the profile should always hold all attributes defined in the config
        for (String attributeName : metadataByAttribute.keySet()) {
            if (!isSupportedAttribute(attributeName) || newAttributes.containsKey(attributeName)) {
                continue;
            }

            List<String> values = EMPTY_VALUE;
            AttributeMetadata metadata = metadataByAttribute.get(attributeName);

            if (user != null && isIncludeAttributeIfNotProvided(metadata)) {
                values = user.getAttributes().getOrDefault(attributeName, EMPTY_VALUE);
            }

            newAttributes.put(attributeName, values);
        }

        if (user != null) {
            List<String> username = newAttributes.get(UserModel.USERNAME);

            if (username == null || username.isEmpty() || (!realm.isEditUsernameAllowed() && UserProfileContext.USER_API.equals(context))) {
                newAttributes.put(UserModel.USERNAME, Collections.singletonList(user.getUsername()));
            }
        }

        List<String> email = newAttributes.get(UserModel.EMAIL);

        if (email != null && realm.isRegistrationEmailAsUsername()) {
            final List<String> lowerCaseEmailList = email.stream()
                    .filter(Objects::nonNull)
                    .map(String::toLowerCase)
                    .collect(Collectors.toList());

            newAttributes.put(UserModel.USERNAME, lowerCaseEmailList);
        }

        return newAttributes;
    }

    protected boolean isIncludeAttributeIfNotProvided(AttributeMetadata metadata) {
        return !metadata.canEdit(createAttributeContext(metadata));
    }

    /**
     *
Checks whether an attribute is support by the profile configuration and the current context.
     *
     *
This method can be used to avoid unexpected attributes from being added as an attribute because
     * the attribute source is a regular {@link Map} and not normalized.
     *
     * @param name the name of the attribute
     * @return
     */
    protected boolean isSupportedAttribute(String name) {
        if (READ_ONLY_ATTRIBUTE_KEY.equals(name)) {
            return false;
        }

        if (metadataByAttribute.containsKey(name)) {
            return true;
        }

        // expect any attribute if managing the user profile using REST
        if (UserProfileContext.USER_API.equals(context) || UserProfileContext.ACCOUNT.equals(context)) {
            return true;
        }

        if (isReadOnly(name)) {
            return true;
        }

        // checks whether the attribute is a core attribute
        return isRootAttribute(name);
    }

    /**
     *
Returns whether an attribute is read only based on the provider configuration (using provider config),
     * usually related to internal attributes managed by the server.
     *
     *
For user-defined attributes, it should be preferable to use the user profile configuration.
     *
     * @param attributeName the attribute name
     * @return {@code true} if the attribute is readonly. Otherwise, returns {@code false}
     */
    protected boolean isReadOnlyInternalAttribute(String attributeName) {
        // read-only can be configured through the provider so we try to validate global validations
        AttributeMetadata readonlyMetadata = metadataByAttribute.get(READ_ONLY_ATTRIBUTE_KEY);

        if (readonlyMetadata == null) {
            return false;
        }

        AttributeContext attributeContext = createAttributeContext(attributeName, readonlyMetadata);

        for (AttributeValidatorMetadata validator : readonlyMetadata.getValidators()) {
            ValidationContext vc = validator.validate(attributeContext);
            if (!vc.isValid()) {
                return true;
            }
        }

        return false;
    }
}


text:
package dta.pizzeria.dao;

import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;

import dta.pizzeria.exception.DeletePizzaException;
import dta.pizzeria.exception.SavePizzaException;
import dta.pizzeria.exception.StockageException;
import dta.pizzeria.model.CategoriePizza;
import dta.pizzeria.model.Pizza;

public class PizzaDaoFichiers implements IDao<Pizza> {

	@Override
	public List<Pizza> findAll() {
		List<Pizza> pizzas = new ArrayList<>();
		try {
			Files.list(Paths.get("data")).forEach(path -> pizzas.add(traitement(path)));
		} catch (IOException e) {
			throw new StockageException("Search error", e);
		}
		return pizzas;
	}

	private Pizza traitement(Path path) {
		String[] pizzaStr;
		try {
			pizzaStr = Files.readAllLines(path).get(0).split(" ");
			return new Pizza(pizzaStr[0], pizzaStr[1], Double.parseDouble(pizzaStr[2]),
					CategoriePizza.valueOf(pizzaStr[3].toUpperCase()));
		} catch (IOException e) {
			throw new StockageException("error", e);
		}
	}

	@Override
	public void saveNew(Pizza pizza) {
		try (BufferedWriter writer = Files.newBufferedWriter(Paths.get("data", pizza.getCode() + ".txt"))) {
			writer.write(pizza.toString());
		} catch (IOException e) {
			throw new SavePizzaException("Save error", e);
		}
	}

	@Override
	public void update(String codePizza, Pizza pizza) {
		delete(codePizza);
		saveNew(pizza);
	}

	@Override
	public void delete(String codePizza) {
		try {
			Files.delete(Paths.get("data", codePizza + ".txt"));
		} catch (IOException e) {
			throw new DeletePizzaException("delete error", e);
		}
	}

}


text:
if [ -z "$FEDORA_HOME" ]; then
  echo "ERROR: The FEDORA_HOME environment variable is not defined."
  exit 1
fi

if [ ! -f "$FEDORA_HOME/client/${fedora-client-jar}" ]; then
  echo "ERROR: ${fedora-client-jar} not found in $FEDORA_HOME/client"
  exit 1
fi

if [ -z "$JAVA_HOME" ]; then
  if [ -z "$FEDORA_JAVA_HOME" ]; then
    java="java"
  else
    java="$FEDORA_JAVA_HOME"/bin/java
  fi
else
  java="$JAVA_HOME"/bin/java
fi

cmdline_args=
for arg in "$@" ; do
  cmdline_args="$cmdline_args \"$arg\""
done

execWithCmdlineArgs() {
    execWithTheseArgs $1 "$cmdline_args"
    return $?
}

execWithTheseArgs() {
    exec_cmd="exec \"$java\" -Xms64m -Xmx96m \
            -cp \"$FEDORA_HOME\"/client/bin:\"$FEDORA_HOME\"/client/${fedora-client-jar} \
            -Djava.endorsed.dirs=\"$FEDORA_HOME\"/client/lib \
            -Djavax.net.ssl.trustStore=\"$FEDORA_HOME\"/client/truststore \
            -Djavax.net.ssl.trustStorePassword=tomcat \
            -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl \
            -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl \
            -Dfedora.home=\"$FEDORA_HOME\" \
            $1 $2"
    eval $exec_cmd
    return $?
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="Website">
  <meta name="author" content="Ashutosh Singh">
  <title>PC Game Dev</title>

  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

  <link href="https://opensource.keycdn.com/fontawesome/4.6.3/font-awesome.min.css" rel="stylesheet" type="text/css">
  <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
  <link href='https://fonts.googleapis.com/css?family=Kaushan+Script' rel='stylesheet' type='text/css'>
  <link href='https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
  <link href='https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700' rel='stylesheet' type='text/css'>

  <link href="css/agency.min.css" rel="stylesheet">
  <link href="css/login.css" rel="stylesheet">
  <link href="css/custom.css" rel="stylesheet">
  <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<link href="css/bootstrap-rating.css" rel="stylesheet">

        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
          Toggle navigation Menu
        </button>
        Code Warriors

            Home

            Website

            Consulting

            Reporting

            SEO

            App

            Support

            Mobile

            BPO

            Training

            Webgame

            PCGame

  <?php
  include('services/history.php');
    ?>

PC Game development

Nothing is better than native

PC Game development

              Developers can range in size from small groups making casual games to housing hundreds of employees and producing several large titles. Companies divide their subtasks of game's development. Individual job titles may vary; however, roles are the same
              within the industry.The development team consists of several members.Some members of the team may handle more than one role; similarly more than one task may be handled by the same member. Team size can vary from 20 to 100 or more members,
              depending on the game's scope. The most represented are artists, followed by programmers, then designers, and finally, audio specialists, with two to three producers in management. These positions are employed full-time. Other positions,
              such as testers, may be employed only part-time.Salaries for these positions vary depending on both the experience and the location of the employee. An entry-level programmer can make, on average, around $70,000 annually and an experienced
              programmer can make, on average, around $125,000 annually.

 <input id="pcgamedev.php" type="hidden" class="rating rate"  data-filled="fa fa-star fa-3x" data-empty="fa fa-star-o fa-3x" data-fractions="2"/>

This rating will be saved.You will not be able to change it later. Are you sure?


text:
import 'document-register-element/build/document-register-element.js';
import {element, method, attribute, property, template, on, dispatchCustomEvent} from '../src/ceb.js';
import './index.less';
import 'codemirror-minified/lib/codemirror.css';
import CodeMirror from 'codemirror-minified/lib/codemirror.js';
import 'codemirror-minified/mode/javascript/javascript.js';
import 'codemirror-minified/mode/htmlmixed/htmlmixed.js';
import cebInput from './ceb-input';
import cebVideo from './ceb-video';
import amd from './amd';

const tutorials = {cebInput, cebVideo, amd};

element().builders(
    template(`
      <select class="tutorials"></select>
      <select class="steps"></select>
    `),
    property('tutorials')
        .setter((el, value) => {
            el._tutorials = value;
            el.querySelector('select.tutorials').innerHTML = Object.keys(value).map(k => `<option value="${k}">${value[k].name}</option>`).join('');
            el.tutorial = Object.keys(value)[0];
        })
        .getter(el => el._tutorials),
    attribute('tutorial').listen((el, oldVal, newVal) => {
        el.step = '';
        el.querySelector('select.steps').innerHTML = el.tutorials[newVal].steps.map((step, index) => `<option value="${index}">${step.name}</option>`);
        el.step = 0;
    }),
    attribute('step').listen((el, oldVal, newVal) => {
        if (newVal) {
            const step = el.tutorials[el.tutorial].steps[parseInt(newVal)];
            dispatchCustomEvent(el, 'select-step', {detail: step});
        }
    }),
    on('change').delegate('select.tutorials').invoke((el, evt, select) => {
        el.tutorial = select.value;
    }),
    on('change').delegate('select.steps').invoke((el, evt, select) => {
        el.step = select.value;
    })
).register('ceb-playground-tutorials');

element().builders(
    method('createdCallback').invoke(el => {
        el.editor = CodeMirror(el, {
            lineNumbers: true,
            tabSize: true,
            autofocus: true,
            mode: 'htmlmixed',
            viewportMargin: Infinity
        });
        el.editor.on('change', evt => dispatchCustomEvent(el, 'update-input', {detail: el.editor.getValue()}));
    }),
    property('value')
        .setter((el, value) => {
            el.editor.setValue(value);
        })
        .getter(el => el.editor.getValue())
).register('ceb-playground-input');

element().builders(
    template(`<iframe></iframe>`),
    property('value')
        .setter((el, value) => {
            el._example = value;
            const iframe = el.querySelector('iframe');
            iframe.src = 'about:blank';
            iframe.onload = () => {
                const iframeDocument = iframe.contentWindow || iframe.contentDocument.document || iframe.contentDocument;
                iframeDocument.document.open();
                iframeDocument.document.write(value);
                iframeDocument.document.close();
            };
        })
        .getter(el => el._example)
).register('ceb-playground-output');

function resize() {
    const windowHeight = window.innerHeight;
    const headerHeight = document.querySelector('body > header').getBoundingClientRect().height;
    const asideHeight = document.querySelector('body > aside').getBoundingClientRect().height;
    const height = windowHeight - headerHeight - asideHeight;
    document.querySelector('ceb-playground-input .CodeMirror').style.height = height + 'px';
    document.querySelector('ceb-playground-output iframe').style.height = height + 'px';
}

window.addEventListener('load', () => {
    window.addEventListener('resize', resize);
    document.addEventListener('update-input', evt => {
        document.querySelector('ceb-playground-output').value = evt.detail;
    });
    document.addEventListener('select-step', evt => {
        if (evt.detail) {
            document.querySelector('ceb-playground-input').value = evt.detail.content;
            document.querySelector('aside').innerHTML = evt.detail.desc || '';
        } else {
            document.querySelector('ceb-playground-input').value = '';
            document.querySelector('aside').innerHTML = '';
        }
    });
    document.querySelector('ceb-playground-tutorials').tutorials = tutorials;
    setTimeout(() => resize(), 0);
});


text:
layout: post
title: Quarantine Cookies v0.2
published: true
date: 2020-04-13
permalink: post/quarantine-cookies-v2
---

Today one of my friends decided to help me to make cookies after I failed so
surprisingly hard at making a cookie mix last week (turns out 300g is different
than 30g of water).

One interesting challenge to making cookies is that I do not have a scale or
measuring cup! Luckily, my friend and I had gone to a wine tasting where we got
to keep the wine tasting glass! So she used her own wine glass to measure the
weight of flour and sugar so that I could figure out the right amount to add.

I chose to make dark chocolate chip, macadamia nut cookies, with some sprinkled
in 3 chocolate chip mix (can you tell I love chocolate?).

Most of the cookies were made by mixing the dough with all the aforementioned
toppings in it. But a couple of them were separated and had a big chunk of
chocolate in the middle.

Needless to say the results were amazing!


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

<TITLE>
OFMessageDamper
</TITLE>

<META NAME="date" CONTENT="2013-08-27">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

net.floodlightcontroller.util

Class OFMessageDamper

java.lang.Object
  net.floodlightcontroller.util.OFMessageDamper

public class OFMessageDamper
extends java.lang.Object

Dampens OFMessages sent to an OF switch. A message is only written to
 a switch if the same message (as defined by .equals()) has not been written
 in the last n milliseconds. Timer granularity is based on TimedCache

Author:

gregor

Nested Class Summary

protected static class
OFMessageDamper.DamperEntry

          An entry in the TimedCache.

Field Summary

(package private)  TimedCache<OFMessageDamper.DamperEntry>
cache

(package private)  java.util.EnumSet<OFType>
msgTypesToCache

Constructor Summary

OFMessageDamper(int capacity,
                java.util.Set<OFType> typesToDampen,
                int timeout)

Method Summary

 boolean
write(IOFSwitch sw,
      OFMessage msg,
      FloodlightContext cntx)

          write the messag to the switch according to our dampening settings

 boolean
write(IOFSwitch sw,
      OFMessage msg,
      FloodlightContext cntx,
      boolean flush)

          write the messag to the switch according to our dampening settings

Methods inherited from class java.lang.Object

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

Field Detail

cache

TimedCache<OFMessageDamper.DamperEntry> cache

msgTypesToCache

java.util.EnumSet<OFType> msgTypesToCache

Constructor Detail

OFMessageDamper

public OFMessageDamper(int capacity,
                       java.util.Set<OFType> typesToDampen,
                       int timeout)

Parameters:
capacity - the maximum number of messages that should be
 kept
typesToDampen - The set of OFMessageTypes that should be
 dampened by this instance. Other types will be passed through
timeout - The dampening timeout. A message will only be
 written if the last write for the an equal message more than
 timeout ms ago.

Method Detail

write

public boolean write(IOFSwitch sw,
                     OFMessage msg,
                     FloodlightContext cntx)
              throws java.io.IOException

write the messag to the switch according to our dampening settings

Parameters:
sw -
msg -
cntx -

Returns:
true if the message was written to the switch, false if
 the message was dampened.

Throws:

java.io.IOException

write

public boolean write(IOFSwitch sw,
                     OFMessage msg,
                     FloodlightContext cntx,
                     boolean flush)
              throws java.io.IOException

write the messag to the switch according to our dampening settings

Parameters:
sw -
msg -
cntx -
flush - true to flush the packet immidiately

Returns:
true if the message was written to the switch, false if
 the message was dampened.

Throws:

java.io.IOException

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
from marshmallow import fields, post_load

from azure.ai.ml._schema.core.schema import PatchedSchemaMeta
from azure.ai.ml.constants._job.automl import AutoMLConstants

class AutoMLTableLimitsSchema(metaclass=PatchedSchemaMeta):
    enable_early_termination = fields.Bool()
    exit_score = fields.Float()
    max_concurrent_trials = fields.Int()
    max_cores_per_trial = fields.Int()
    max_trials = fields.Int(data_key=AutoMLConstants.MAX_TRIALS_YAML)
    timeout_minutes = fields.Int()  # type duration
    trial_timeout_minutes = fields.Int()  # type duration

    @post_load
    def make(self, data, **kwargs) -> "TabularLimitSettings":
        from azure.ai.ml.automl import TabularLimitSettings

        return TabularLimitSettings(**data)


text:
package com.keen.ma.activity;

import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.keen.ma.MenuControl;
import com.keen.ma.MyApplication;
import com.keen.ma.R;

/**
 * @author KeenW
 * @lastChangeTime 2014-8-14ÏÂÎç8:30:22
 */
public class HomeActivity extends FragmentActivity {

	private long currentSysTime;
	private SharedPreferences sp = null;
	private ImageView menuImageView;
	private static MenuControl menuControl;
	private static TextView titleTV;
	private MyApplication myApp = null;

	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);
		myApp = (MyApplication)getApplication();
		myApp.addActivity(this);
		setContentView(R.layout.activity_home);
		menuControl = new MenuControl(this);
		menuImageView = (ImageView)findViewById(R.id.menu_imageview);
		menuImageView.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				menuControl.toggleMenu();
			}
		});
		titleTV = (TextView)findViewById(R.id.title);
	}

	@Override
	protected void onResume() {
		// TODO Auto-generated method stub
		super.onResume();
		sp = getSharedPreferences("KeenW", Context.MODE_PRIVATE);
		int num = sp.getInt("wallPaperNumber", 0);
		myApp.setCurrentWallPaper(this, num);
	}

	public static void setCurrentFragment(int position){
		menuControl.setCurrentFragment(position);
	}

	public static void setTitle(String title){
		titleTV.setText(title);
	}
	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		// TODO Auto-generated method stub
		if(keyCode == KeyEvent.KEYCODE_BACK){
			if(System.currentTimeMillis() - currentSysTime < 2000){
				myApp.exit();
				return true;
			}else{
				currentSysTime = System.currentTimeMillis();
				Toast.makeText(HomeActivity.this, "ÔÙ°´Ò»´ÎÍ˳ö³ÌÐò", Toast.LENGTH_SHORT).show();
				return false;
			}
		}

		return super.onKeyDown(keyCode, event);
	}
}


text:
package org.jboss.weld.tests.builtinBeans.metadata.broken.decorator;

import jakarta.decorator.Delegate;
import jakarta.enterprise.inject.Decorated;
import jakarta.enterprise.inject.spi.Bean;
import jakarta.enterprise.inject.spi.Decorator;
import jakarta.inject.Inject;

@jakarta.decorator.Decorator
@SuppressWarnings("unused")
public class MilkProductDecorator2 implements MilkProduct {

    @Inject
    @Delegate
    private MilkProduct delegate;
    @Inject
    private Decorator<Integer> decorator;

    @Override
    public void foo() {
        delegate.foo();
    }
}


text:
/*
 * This combined file was created by the DataTables downloader builder:
 *   https://datatables.net/download
 *
 * To rebuild or modify this file with the latest versions of the included
 * software please visit:
 *   https://datatables.net/download/#dt/jszip-2.5.0/dt-1.10.12/b-1.2.2/b-colvis-1.2.2/b-html5-1.2.2/b-print-1.2.2/cr-1.3.2/r-2.1.0
 *
 * Included libraries:
 *   JSZip 2.5.0, DataTables 1.10.12, Buttons 1.2.2, Column visibility 1.2.2, HTML5 export 1.2.2, Print view 1.2.2, ColReorder 1.3.2, Responsive 2.1.0
 */

table.dataTable {
    width: 100%;
    margin: 0 auto;
    clear: both;
    border-collapse: separate;
    border-spacing: 0
}

table.dataTable thead th,
table.dataTable tfoot th {
    font-weight: bold
}

table.dataTable thead th,
table.dataTable thead td {
    padding: 10px 18px;
    border-bottom: 1px solid #111
}

table.dataTable thead th:active,
table.dataTable thead td:active {
    outline: none
}

table.dataTable tfoot th,
table.dataTable tfoot td {
    padding: 10px 18px 6px 18px;
    border-top: 1px solid #111
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    cursor: pointer;
    *cursor: hand
}

table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
    background-repeat: no-repeat;
    background-position: center right
}

table.dataTable thead .sorting {
    background-image: url("DataTables-1.10.12/images/sort_both.png")
}

table.dataTable thead .sorting_asc {
    background-image: url("DataTables-1.10.12/images/sort_asc.png")
}

table.dataTable thead .sorting_desc {
    background-image: url("DataTables-1.10.12/images/sort_desc.png")
}

table.dataTable thead .sorting_asc_disabled {
    background-image: url("DataTables-1.10.12/images/sort_asc_disabled.png")
}

table.dataTable thead .sorting_desc_disabled {
    background-image: url("DataTables-1.10.12/images/sort_desc_disabled.png")
}

table.dataTable tbody tr {
    background-color: #ffffff
}

table.dataTable tbody tr.selected {
    background-color: #B0BED9
}

table.dataTable tbody th,
table.dataTable tbody td {
    padding: 8px 10px
}

table.dataTable.row-border tbody th,
table.dataTable.row-border tbody td,
table.dataTable.display tbody th,
table.dataTable.display tbody td {
    border-top: 1px solid #ddd
}

table.dataTable.row-border tbody tr:first-child th,
table.dataTable.row-border tbody tr:first-child td,
table.dataTable.display tbody tr:first-child th,
table.dataTable.display tbody tr:first-child td {
    border-top: none
}

table.dataTable.cell-border tbody th,
table.dataTable.cell-border tbody td {
    border-top: 1px solid #ddd;
    border-right: 1px solid #ddd
}

table.dataTable.cell-border tbody tr th:first-child,
table.dataTable.cell-border tbody tr td:first-child {
    border-left: 1px solid #ddd
}

table.dataTable.cell-border tbody tr:first-child th,
table.dataTable.cell-border tbody tr:first-child td {
    border-top: none
}

table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd {
    background-color: #f9f9f9
}

table.dataTable.stripe tbody tr.odd.selected,
table.dataTable.display tbody tr.odd.selected {
    background-color: #acbad4
}

table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover {
    background-color: #f6f6f6
}

table.dataTable.hover tbody tr:hover.selected,
table.dataTable.display tbody tr:hover.selected {
    background-color: #aab7d1
}

table.dataTable.order-column tbody tr>.sorting_1,
table.dataTable.order-column tbody tr>.sorting_2,
table.dataTable.order-column tbody tr>.sorting_3,
table.dataTable.display tbody tr>.sorting_1,
table.dataTable.display tbody tr>.sorting_2,
table.dataTable.display tbody tr>.sorting_3 {
    background-color: #fafafa
}

table.dataTable.order-column tbody tr.selected>.sorting_1,
table.dataTable.order-column tbody tr.selected>.sorting_2,
table.dataTable.order-column tbody tr.selected>.sorting_3,
table.dataTable.display tbody tr.selected>.sorting_1,
table.dataTable.display tbody tr.selected>.sorting_2,
table.dataTable.display tbody tr.selected>.sorting_3 {
    background-color: #acbad5
}

table.dataTable.display tbody tr.odd>.sorting_1,
table.dataTable.order-column.stripe tbody tr.odd>.sorting_1 {
    background-color: #f1f1f1
}

table.dataTable.display tbody tr.odd>.sorting_2,
table.dataTable.order-column.stripe tbody tr.odd>.sorting_2 {
    background-color: #f3f3f3
}

table.dataTable.display tbody tr.odd>.sorting_3,
table.dataTable.order-column.stripe tbody tr.odd>.sorting_3 {
    background-color: whitesmoke
}

table.dataTable.display tbody tr.odd.selected>.sorting_1,
table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_1 {
    background-color: #a6b4cd
}

table.dataTable.display tbody tr.odd.selected>.sorting_2,
table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_2 {
    background-color: #a8b5cf
}

table.dataTable.display tbody tr.odd.selected>.sorting_3,
table.dataTable.order-column.stripe tbody tr.odd.selected>.sorting_3 {
    background-color: #a9b7d1
}

table.dataTable.display tbody tr.even>.sorting_1,
table.dataTable.order-column.stripe tbody tr.even>.sorting_1 {
    background-color: #fafafa
}

table.dataTable.display tbody tr.even>.sorting_2,
table.dataTable.order-column.stripe tbody tr.even>.sorting_2 {
    background-color: #fcfcfc
}

table.dataTable.display tbody tr.even>.sorting_3,
table.dataTable.order-column.stripe tbody tr.even>.sorting_3 {
    background-color: #fefefe
}

table.dataTable.display tbody tr.even.selected>.sorting_1,
table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_1 {
    background-color: #acbad5
}

table.dataTable.display tbody tr.even.selected>.sorting_2,
table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_2 {
    background-color: #aebcd6
}

table.dataTable.display tbody tr.even.selected>.sorting_3,
table.dataTable.order-column.stripe tbody tr.even.selected>.sorting_3 {
    background-color: #afbdd8
}

table.dataTable.display tbody tr:hover>.sorting_1,
table.dataTable.order-column.hover tbody tr:hover>.sorting_1 {
    background-color: #eaeaea
}

table.dataTable.display tbody tr:hover>.sorting_2,
table.dataTable.order-column.hover tbody tr:hover>.sorting_2 {
    background-color: #ececec
}

table.dataTable.display tbody tr:hover>.sorting_3,
table.dataTable.order-column.hover tbody tr:hover>.sorting_3 {
    background-color: #efefef
}

table.dataTable.display tbody tr:hover.selected>.sorting_1,
table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_1 {
    background-color: #a2aec7
}

table.dataTable.display tbody tr:hover.selected>.sorting_2,
table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_2 {
    background-color: #a3b0c9
}

table.dataTable.display tbody tr:hover.selected>.sorting_3,
table.dataTable.order-column.hover tbody tr:hover.selected>.sorting_3 {
    background-color: #a5b2cb
}

table.dataTable.no-footer {
    border-bottom: 1px solid #111
}

table.dataTable.nowrap th,
table.dataTable.nowrap td {
    white-space: nowrap
}

table.dataTable.compact thead th,
table.dataTable.compact thead td {
    padding: 4px 17px 4px 4px
}

table.dataTable.compact tfoot th,
table.dataTable.compact tfoot td {
    padding: 4px
}

table.dataTable.compact tbody th,
table.dataTable.compact tbody td {
    padding: 4px
}

table.dataTable th.dt-left,
table.dataTable td.dt-left {
    text-align: left
}

table.dataTable th.dt-center,
table.dataTable td.dt-center,
table.dataTable td.dataTables_empty {
    text-align: center
}

table.dataTable th.dt-right,
table.dataTable td.dt-right {
    text-align: right
}

table.dataTable th.dt-justify,
table.dataTable td.dt-justify {
    text-align: justify
}

table.dataTable th.dt-nowrap,
table.dataTable td.dt-nowrap {
    white-space: nowrap
}

table.dataTable thead th.dt-head-left,
table.dataTable thead td.dt-head-left,
table.dataTable tfoot th.dt-head-left,
table.dataTable tfoot td.dt-head-left {
    text-align: left
}

table.dataTable thead th.dt-head-center,
table.dataTable thead td.dt-head-center,
table.dataTable tfoot th.dt-head-center,
table.dataTable tfoot td.dt-head-center {
    text-align: center
}

table.dataTable thead th.dt-head-right,
table.dataTable thead td.dt-head-right,
table.dataTable tfoot th.dt-head-right,
table.dataTable tfoot td.dt-head-right {
    text-align: right
}

table.dataTable thead th.dt-head-justify,
table.dataTable thead td.dt-head-justify,
table.dataTable tfoot th.dt-head-justify,
table.dataTable tfoot td.dt-head-justify {
    text-align: justify
}

table.dataTable thead th.dt-head-nowrap,
table.dataTable thead td.dt-head-nowrap,
table.dataTable tfoot th.dt-head-nowrap,
table.dataTable tfoot td.dt-head-nowrap {
    white-space: nowrap
}

table.dataTable tbody th.dt-body-left,
table.dataTable tbody td.dt-body-left {
    text-align: left
}

table.dataTable tbody th.dt-body-center,
table.dataTable tbody td.dt-body-center {
    text-align: center
}

table.dataTable tbody th.dt-body-right,
table.dataTable tbody td.dt-body-right {
    text-align: right
}

table.dataTable tbody th.dt-body-justify,
table.dataTable tbody td.dt-body-justify {
    text-align: justify
}

table.dataTable tbody th.dt-body-nowrap,
table.dataTable tbody td.dt-body-nowrap {
    white-space: nowrap
}

table.dataTable,
table.dataTable th,
table.dataTable td {
    box-sizing: content-box
}

.dataTables_wrapper {
    position: relative;
    clear: both;
    *zoom: 1;
    zoom: 1
}

/* @noflip */
.dataTables_wrapper .dataTables_length {
    float: left
}

/* @noflip */
.dataTables_wrapper .dataTables_filter {
    float: right;
    text-align: right
}

/* @noflip */
.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5em
}

.dataTables_wrapper .dataTables_info {
    clear: both;
    float: left;
    padding-top: 0.755em
}

/* @noflip */
.dataTables_wrapper .dataTables_paginate {
    float: right;
    text-align: right;
    padding-top: 0.25em
}

/* @noflip */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    box-sizing: border-box;
    display: inline-block;
    min-width: 1.5em;
    padding: 0.5em 1em;
    margin-left: 2px;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    *cursor: hand;
    color: #333 !important;
    border: 1px solid transparent;
    border-radius: 2px
}

/* @noflip */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    color: #333 !important;
    border: 1px solid #979797;
    background-color: white;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));
    background: -webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);
    background: linear-gradient(to bottom, #fff 0%, #dcdcdc 100%)
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    cursor: default;
    color: #666 !important;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: white !important;
    border: 1px solid #111;
    background-color: #585858;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));
    background: -webkit-linear-gradient(top, #585858 0%, #111 100%);
    background: linear-gradient(to bottom, #585858 0%, #111 100%)
}

.dataTables_wrapper .dataTables_paginate .paginate_button:active {
    outline: none;
    background-color: #2b2b2b;
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));
    background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
    background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);
    box-shadow: inset 0 0 3px #111
}

.dataTables_wrapper .dataTables_paginate .ellipsis {
    padding: 0 1em
}

.dataTables_wrapper .dataTables_processing {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 40px;
    margin-left: -50%;
    margin-top: -25px;
    padding-top: 20px;
    text-align: center;
    font-size: 1.2em;
    background-color: white;
    background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));
    background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%)
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: #333
}

.dataTables_wrapper .dataTables_scroll {
    clear: both
}

.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
    *margin-top: -1px;
    -webkit-overflow-scrolling: touch
}

.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th,
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td {
    vertical-align: middle
}

.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th>div.dataTables_sizing,
.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td>div.dataTables_sizing {
    height: 0;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important
}

.dataTables_wrapper.no-footer .dataTables_scrollBody {
    border-bottom: 1px solid #111
}

.dataTables_wrapper.no-footer div.dataTables_scrollHead table,
.dataTables_wrapper.no-footer div.dataTables_scrollBody table {
    border-bottom: none
}

.dataTables_wrapper:after {
    visibility: hidden;
    display: block;
    content: "";
    clear: both;
    height: 0
}

@media screen and (max-width: 767px) {
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        float: none;
        text-align: center
    }
    .dataTables_wrapper .dataTables_paginate {
        margin-top: 0.5em
    }
}

/* @noflip */
@media screen and (max-width: 640px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: center
    }
    .dataTables_wrapper .dataTables_filter {
        margin-top: 0.5em
    }
}

div.dt-button-info {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 400px;
    margin-top: -100px;
    margin-left: -200px;
    background-color: white;
    border: 2px solid #111;
    box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    text-align: center;
    z-index: 21
}

div.dt-button-info h2 {
    padding: 0.5em;
    margin: 0;
    font-weight: normal;
    border-bottom: 1px solid #ddd;
    background-color: #f3f3f3
}

div.dt-button-info>div {
    padding: 1em
}

button.dt-button,
div.dt-button,
a.dt-button {
    position: relative;
    display: inline-block;
    box-sizing: border-box;
    margin-right: 0.333em;
    padding: 0.5em 1em;
    border: 1px solid #999;
    border-radius: 2px;
    cursor: pointer;
    font-size: 0.88em;
    color: black;
    white-space: nowrap;
    overflow: hidden;
    background-color: #e9e9e9;
    background-image: -webkit-linear-gradient(top, #fff 0%, #e9e9e9 100%);
    background-image: linear-gradient(to bottom, #fff 0%, #e9e9e9 100%);
    filter: progid: DXImageTransform.Microsoft.gradient(GradientType=0, StartColorStr='white', EndColorStr='#e9e9e9');
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    text-decoration: none;
    outline: none
}

button.dt-button.disabled,
div.dt-button.disabled,
a.dt-button.disabled {
    color: #999;
    border: 1px solid #d0d0d0;
    cursor: default;
    background-color: #f9f9f9;
    background-image: -webkit-linear-gradient(top, #fff 0%, #f9f9f9 100%);
    background-image: linear-gradient(to bottom, #fff 0%, #f9f9f9 100%);
    filter: progid: DXImageTransform.Microsoft.gradient(GradientType=0, StartColorStr='#ffffff', EndColorStr='#f9f9f9')
}

button.dt-button:active:not(.disabled),
button.dt-button.active:not(.disabled),
div.dt-button:active:not(.disabled),
div.dt-button.active:not(.disabled),
a.dt-button:active:not(.disabled),
a.dt-button.active:not(.disabled) {
    background-color: #e2e2e2;
    background-image: -webkit-linear-gradient(top, #f3f3f3 0%, #e2e2e2 100%);
    background-image: linear-gradient(to bottom, #f3f3f3 0%, #e2e2e2 100%);
    filter: progid: DXImageTransform.Microsoft.gradient(GradientType=0, StartColorStr='#f3f3f3', EndColorStr='#e2e2e2');
    box-shadow: inset 1px 1px 3px #999999
}

button.dt-button:active:not(.disabled):hover:not(.disabled),
button.dt-button.active:not(.disabled):hover:not(.disabled),
div.dt-button:active:not(.disabled):hover:not(.disabled),
div.dt-button.active:not(.disabled):hover:not(.disabled),
a.dt-button:active:not(.disabled):hover:not(.disabled),
a.dt-button.active:not(.disabled):hover:not(.disabled) {
    box-shadow: inset 1px 1px 3px #999999;
    background-color: #cccccc;
    background-image: -webkit-linear-gradient(top, #eaeaea 0%, #ccc 100%);
    background-image: linear-gradient(to bottom, #eaeaea 0%, #ccc 100%);
    filter: progid: DXImageTransform.Microsoft.gradient(GradientType=0, StartColorStr='#eaeaea', EndColorStr='#cccccc')
}

button.dt-button:hover,
div.dt-button:hover,
a.dt-button:hover {
    text-decoration: none
}

button.dt-button:hover:not(.disabled),
div.dt-button:hover:not(.disabled),
a.dt-button:hover:not(.disabled) {
    border: 1px solid #666;
    background-color: #e0e0e0;
    background-image: -webkit-linear-gradient(top, #f9f9f9 0%, #e0e0e0 100%);
    background-image: linear-gradient(to bottom, #f9f9f9 0%, #e0e0e0 100%);
    filter: progid: DXImageTransform.Microsoft.gradient(GradientType=0, StartColorStr='#f9f9f9', EndColorStr='#e0e0e0')
}

button.dt-button:focus:not(.disabled),
div.dt-button:focus:not(.disabled),
a.dt-button:focus:not(.disabled) {
    border: 1px solid #426c9e;
    text-shadow: 0 1px 0 #c4def1;
    outline: none;
    background-color: #79ace9;
    background-image: -webkit-linear-gradient(top, #bddef4 0%, #79ace9 100%);
    background-image: linear-gradient(to bottom, #bddef4 0%, #79ace9 100%);
    filter: progid: DXImageTransform.Microsoft.gradient(GradientType=0, StartColorStr='#bddef4', EndColorStr='#79ace9')
}

.dt-button embed {
    outline: none
}

div.dt-buttons {
    position: relative;
    float: left
}

div.dt-buttons.buttons-right {
    float: right
}

div.dt-button-collection {
    position: absolute;
    top: 0;
    left: 0;
    width: 150px;
    margin-top: 3px;
    padding: 8px 8px 4px 8px;
    border: 1px solid #ccc;
    border: 1px solid rgba(0, 0, 0, 0.4);
    background-color: white;
    overflow: hidden;
    z-index: 2002;
    border-radius: 5px;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
    z-index: 2002;
    -webkit-column-gap: 8px;
    -moz-column-gap: 8px;
    -ms-column-gap: 8px;
    -o-column-gap: 8px;
    column-gap: 8px
}

div.dt-button-collection button.dt-button,
div.dt-button-collection div.dt-button,
div.dt-button-collection a.dt-button {
    position: relative;
    left: 0;
    right: 0;
    display: block;
    float: none;
    margin-bottom: 4px;
    margin-right: 0
}

div.dt-button-collection button.dt-button:active:not(.disabled),
div.dt-button-collection button.dt-button.active:not(.disabled),
div.dt-button-collection div.dt-button:active:not(.disabled),
div.dt-button-collection div.dt-button.active:not(.disabled),
div.dt-button-collection a.dt-button:active:not(.disabled),
div.dt-button-collection a.dt-button.active:not(.disabled) {
    background-color: #dadada;
    background-image: -webkit-linear-gradient(top, #f0f0f0 0%, #dadada 100%);
    background-image: linear-gradient(to bottom, #f0f0f0 0%, #dadada 100%);
    filter: progid: DXImageTransform.Microsoft.gradient(GradientType=0, StartColorStr='#f0f0f0', EndColorStr='#dadada');
    box-shadow: inset 1px 1px 3px #666
}

div.dt-button-collection.fixed {
    position: fixed;
    top: 50%;
    left: 50%;
    margin-left: -75px;
    border-radius: 0
}

div.dt-button-collection.fixed.two-column {
    margin-left: -150px
}

div.dt-button-collection.fixed.three-column {
    margin-left: -225px
}

div.dt-button-collection.fixed.four-column {
    margin-left: -300px
}

div.dt-button-collection>* {
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    break-inside: avoid
}

div.dt-button-collection.two-column {
    width: 300px;
    padding-bottom: 1px;
    -webkit-column-count: 2;
    -moz-column-count: 2;
    -ms-column-count: 2;
    -o-column-count: 2;
    column-count: 2
}

div.dt-button-collection.three-column {
    width: 450px;
    padding-bottom: 1px;
    -webkit-column-count: 3;
    -moz-column-count: 3;
    -ms-column-count: 3;
    -o-column-count: 3;
    column-count: 3
}

div.dt-button-collection.four-column {
    width: 600px;
    padding-bottom: 1px;
    -webkit-column-count: 4;
    -moz-column-count: 4;
    -ms-column-count: 4;
    -o-column-count: 4;
    column-count: 4
}

div.dt-button-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    background: -webkit-gradient(radial, center center, 0, center center, 497, color-stop(0, rgba(0, 0, 0, 0.3)), color-stop(1, rgba(0, 0, 0, 0.7)));
    background: -webkit-radial-gradient(center, ellipse farthest-corner, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    background: -webkit-radial-gradient(ellipse farthest-corner at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    background: radial-gradient(ellipse farthest-corner at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 2001
}

@media screen and (max-width: 640px) {
    div.dt-buttons {
        float: none !important;
        text-align: center
    }
}

table.DTCR_clonedTable.dataTable {
    position: absolute !important;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 202
}

div.DTCR_pointer {
    width: 1px;
    background-color: #0259C4;
    z-index: 201
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td.child,
table.dataTable.dtr-inline.collapsed>tbody>tr>th.child,
table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty {
    cursor: default !important
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td.child:before,
table.dataTable.dtr-inline.collapsed>tbody>tr>th.child:before,
table.dataTable.dtr-inline.collapsed>tbody>tr>td.dataTables_empty:before {
    display: none !important
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child,
table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child {
    position: relative;
    padding-left: 30px;
    cursor: pointer
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td:first-child:before,
table.dataTable.dtr-inline.collapsed>tbody>tr>th:first-child:before {
    top: 9px;
    left: 4px;
    height: 14px;
    width: 14px;
    display: block;
    position: absolute;
    color: white;
    border: 2px solid white;
    border-radius: 14px;
    box-shadow: 0 0 3px #444;
    box-sizing: content-box;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    line-height: 14px;
    content: '+';
    background-color: #31b131
}

table.dataTable.dtr-inline.collapsed>tbody>tr.parent>td:first-child:before,
table.dataTable.dtr-inline.collapsed>tbody>tr.parent>th:first-child:before {
    content: '-';
    background-color: #d33333
}

table.dataTable.dtr-inline.collapsed>tbody>tr.child td:before {
    display: none
}

table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child,
table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child {
    padding-left: 27px
}

table.dataTable.dtr-inline.collapsed.compact>tbody>tr>td:first-child:before,
table.dataTable.dtr-inline.collapsed.compact>tbody>tr>th:first-child:before {
    top: 5px;
    left: 4px;
    height: 14px;
    width: 14px;
    border-radius: 14px;
    line-height: 14px;
    text-indent: 3px
}

table.dataTable.dtr-column>tbody>tr>td.control,
table.dataTable.dtr-column>tbody>tr>th.control {
    position: relative;
    cursor: pointer
}

table.dataTable.dtr-column>tbody>tr>td.control:before,
table.dataTable.dtr-column>tbody>tr>th.control:before {
    top: 50%;
    left: 50%;
    height: 16px;
    width: 16px;
    margin-top: -10px;
    margin-left: -10px;
    display: block;
    position: absolute;
    color: white;
    border: 2px solid white;
    border-radius: 14px;
    box-shadow: 0 0 3px #444;
    box-sizing: content-box;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    line-height: 14px;
    content: '+';
    background-color: #31b131
}

table.dataTable.dtr-column>tbody>tr.parent td.control:before,
table.dataTable.dtr-column>tbody>tr.parent th.control:before {
    content: '-';
    background-color: #d33333
}

table.dataTable>tbody>tr.child {
    padding: 0.5em 1em
}

table.dataTable>tbody>tr.child:hover {
    background: transparent !important
}

table.dataTable>tbody>tr.child ul {
    display: inline-block;
    list-style-type: none;
    margin: 0;
    padding: 0
}

table.dataTable>tbody>tr.child ul li {
    border-bottom: 1px solid #efefef;
    padding: 0.5em 0
}

table.dataTable>tbody>tr.child ul li:first-child {
    padding-top: 0
}

table.dataTable>tbody>tr.child ul li:last-child {
    border-bottom: none
}

table.dataTable>tbody>tr.child span.dtr-title {
    display: inline-block;
    min-width: 75px;
    font-weight: bold
}

div.dtr-modal {
    position: fixed;
    box-sizing: border-box;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    z-index: 100;
    padding: 10em 1em
}

div.dtr-modal div.dtr-modal-display {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    width: 50%;
    height: 50%;
    overflow: auto;
    margin: auto;
    z-index: 102;
    overflow: auto;
    background-color: #f5f5f7;
    border: 1px solid black;
    border-radius: 0.5em;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6)
}

div.dtr-modal div.dtr-modal-content {
    position: relative;
    padding: 1em
}

div.dtr-modal div.dtr-modal-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border: 1px solid #eaeaea;
    background-color: #f9f9f9;
    text-align: center;
    border-radius: 3px;
    cursor: pointer;
    z-index: 12
}

div.dtr-modal div.dtr-modal-close:hover {
    background-color: #eaeaea
}

div.dtr-modal div.dtr-modal-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 101;
    background: rgba(0, 0, 0, 0.6)
}

@media screen and (max-width: 767px) {
    div.dtr-modal div.dtr-modal-display {
        width: 95%
    }
}


text:
Returns current view type or sets a new one.

    viewType([value])

        value
        string, optional, new view type to be set

Returns string.

Description

You can use this method to change view type of listview.
Allowed values is "table", "icon-tile", "icon-large", "icon-medium", "icon-small".
If passed a different value, then "icon-small" is used.

If you have listview defined in the following way:
<textarea class="javascript">
$('#listview').w2listview({
    name : 'listview',
    viewType: 'icon-large',
    items: [
        { id: 'id-1', caption: 'Item 1' },
        { id: 'id-2', caption: 'Item 2' },
        { id: 'id-3', caption: 'Item 3' }
    ]
});
</textarea>

You can change view type of the listview:
<textarea class="javascript">
w2ui['listview'].viewType('icon-medium');
</textarea>


text:
/**
 * WicketPixie
 * (c) 2006-2011 Eddie Ringle <eddie@eringle.net>
 * Provided by Chris Pirillo <chris@pirillo.com>
 *
 * Licensed under the New BSD License.
 */

/* Do all the cool JS stuff once the page is ready */
jQuery(document).ready(function ($) {
    /* Top bar dropdowns */
    $('.dropdown').hide();
    $('#inner-top-bar .dropdown').parent().toggle(
        function() {
            $('#inner-top-bar > ul > li > .dropdown').slideDown();
            return false;
        },
        function () {
            $('#inner-top-bar > ul > li > .dropdown').slideUp();
            return false;
        }
    );
});


text:
"""
For every column that occurs in a multiple alignment print the column
and the number of times it occurs (one column/count per line, tab
separated), sorted by count descending.

This version allows special handling of the 'wildcard' symbol in alignments.

Note: all blocks must have exactly the same number of species.

usage: %prog [options] < maf > column_counts
    -w, --wildcard: include wildcards
    -m, --maxwildcards=N: only allow N missing species
"""

import bx.align.maf
import sys
from bx.cookbook import doc_optparse, cross_lists

from itertools import *

counts = {}

nspecies = None

for block in bx.align.maf.Reader( sys.stdin ):
    # Ensure all blocks have the same number of rows
    if nspecies: assert len( block.components ) == nspecies
    else: nspecies = len( block.components )
    # Increment count for each column
    for col in izip( * [ iter( comp.text.upper() ) for comp in block.components ] ):
        col = ''.join( col )
        try: counts[ col ] += 1
        except: counts[ col ] = 1

# counts = [ ( value, key ) for key, value in counts.iteritems() ]
# counts.sort()
# counts.reverse()

## for count, col in counts:
##     print "".join(col), count

options, args = doc_optparse.parse( __doc__ )

wildcard = False
if options.wildcard:
    wildcard = True
    max_wildcard = nspecies - 1
if options.maxwildcards:
    wildcard = True
    max_wildcard = int( options.maxwildcards )

nucs = "ACGT-"
if wildcard:
    nucs += "*"

for col in cross_lists( *( [ nucs ] * nspecies ) ):
    col = ''.join( col )
    if wildcard and col.count( "*" ) > max_wildcard:
        continue
    if col.count( "-" ) == nspecies:
        continue
    print col, counts.get( col, 0 )


text:
package impl

import (
	"context"
	"os"
	"testing"

	comcfg "github.com/goharbor/harbor/src/common/config"
	"github.com/goharbor/harbor/src/jobservice/common/utils"
	"github.com/goharbor/harbor/src/jobservice/config"
	"github.com/goharbor/harbor/src/jobservice/job"
	"github.com/goharbor/harbor/src/jobservice/tests"
	"github.com/gomodule/redigo/redis"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
	"github.com/stretchr/testify/suite"
)

// ContextImplTestSuite tests functions of context impl
type ContextImplTestSuite struct {
	suite.Suite

	tracker   job.Tracker
	namespace string
	pool      *redis.Pool
	jobID     string
}

// TestContextImplTestSuite is entry of go test
func TestContextImplTestSuite(t *testing.T) {
	suite.Run(t, new(ContextImplTestSuite))
}

// SetupSuite prepares test suite
func (suite *ContextImplTestSuite) SetupSuite() {
	config.DefaultConfig.JobLoggerConfigs = []*config.LoggerConfig{
		{
			Name:  "STD_OUTPUT",
			Level: "DEBUG",
		},
		{
			Name:  "FILE",
			Level: "INFO",
			Settings: map[string]interface{}{
				"base_dir": os.TempDir(),
			},
			Sweeper: &config.LogSweeperConfig{
				Duration: 1,
				Settings: map[string]interface{}{
					"work_dir": os.TempDir(),
				},
			},
		},
	}

	suite.namespace = tests.GiveMeTestNamespace()
	suite.pool = tests.GiveMeRedisPool()

	suite.jobID = utils.MakeIdentifier()
	mockStats := &job.Stats{
		Info: &job.StatsInfo{
			JobID:    suite.jobID,
			JobKind:  job.KindGeneric,
			JobName:  job.SampleJob,
			Status:   job.PendingStatus.String(),
			IsUnique: false,
		},
	}

	suite.tracker = job.NewBasicTrackerWithStats(
		context.Background(),
		mockStats,
		suite.namespace,
		suite.pool,
		nil,
	)

	err := suite.tracker.Save()
	require.NoError(suite.T(), err, "job stats: nil error expected but got %s", err)
}

// SetupSuite clears test suite
func (suite *ContextImplTestSuite) TearDownSuite() {
	conn := suite.pool.Get()
	defer func() {
		_ = conn.Close()
	}()

	_ = tests.ClearAll(suite.namespace, conn)
}

// TestContextImpl tests the context impl
func (suite *ContextImplTestSuite) TestContextImpl() {
	cfgMem := comcfg.NewInMemoryManager()
	cfgMem.Set("read_only", "true")
	ctx := NewContext(context.Background(), cfgMem)
	jCtx, err := ctx.Build(suite.tracker)

	require.NoErrorf(suite.T(), err, "build job context: nil error expected but got %s", err)
	v, ok := jCtx.Get("read_only")
	assert.Equal(suite.T(), true, ok)
	assert.Equal(suite.T(), v, v.(bool))

	err = jCtx.Checkin("check in testing")
	assert.NoErrorf(suite.T(), err, "check in: nil error expected but got %s", err)

	l := jCtx.GetLogger()
	assert.NotNil(suite.T(), l, "logger should be not nil")

	_, ok = jCtx.OPCommand()
	assert.Equal(suite.T(), false, ok)
}


text:
namespace pp {
class Module;

// Forcibly sets the value returned by pp::Module::Get(). Do not call this
// function except to support the trusted plugin or the remoting plugin!
void InternalSetModuleSingleton(Module* module);
}

#endif  // PPAPI_CPP_PRIVATE_INTERNAL_MODULE_H_


text:
package com.tikinou.schedulesdirect.core.commands.metadata;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.tikinou.schedulesdirect.core.commands.AuthenticatedBaseCommandParameter;
import com.tikinou.schedulesdirect.core.domain.SchedulesDirectApiVersion;

/**
 * @author Sebastien Astie
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class UpdateMetadataParameters extends AuthenticatedBaseCommandParameter{
    private Request request;

    public UpdateMetadataParameters(){
        this(null);
    }

    public UpdateMetadataParameters(SchedulesDirectApiVersion version){
        super(version);
        request = new Request();
    }

    public Request getRequest() {
        return request;
    }

    public void setRequest(Request request) {
        this.request = request;
    }

    @JsonIgnore
    public String getProgramId() {
        return request.getProgramId();
    }

    @JsonIgnore
    public void setProgramId(String programId) {
        request.setProgramId(programId);
    }

    @JsonIgnore
    public String getCurrent() {
        return request.getCurrent();
    }

    @JsonIgnore
    public void setCurrent(String current) {
        request.setCurrent(current);
    }

    @JsonIgnore
    public String getSuggested() {
        return request.getSuggested();
    }

    @JsonIgnore
    public void setSuggested(String suggested) {
        request.setSuggested(suggested);
    }

    @JsonIgnore
    public String getField() {
        return request.getField();
    }

    @JsonIgnore
    public void setField(String field) {
        request.setField(field);
    }

    @JsonIgnore
    public String getSource() {
        return request.getSource();
    }

    @JsonIgnore
    public void setSource(String source) {
        request.setSource(source);
    }

    @JsonIgnore
    public String getComment() {
        return request.getComment();
    }

    @JsonIgnore
    public void setComment(String comment) {
        request.setComment(comment);
    }

    @Override
    public String toString() {
        return "UpdateMetadataParameters{" + toStringMembers() + '}';
    }

    @Override
    protected String toStringMembers() {
        return super.toStringMembers() + ", request=" + request;
    }

    @JsonIgnoreProperties(ignoreUnknown = true)
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private static class Request {
        @JsonProperty("prog_id")
        private String programId;
        private String current;
        private String suggested;
        private String field;
        private String source;
        private String comment;

        public String getProgramId() {
            return programId;
        }

        public void setProgramId(String programId) {
            this.programId = programId;
        }

        public String getCurrent() {
            return current;
        }

        public void setCurrent(String current) {
            this.current = current;
        }

        public String getSuggested() {
            return suggested;
        }

        public void setSuggested(String suggested) {
            this.suggested = suggested;
        }

        public String getField() {
            return field;
        }

        public void setField(String field) {
            this.field = field;
        }

        public String getSource() {
            return source;
        }

        public void setSource(String source) {
            this.source = source;
        }

        public String getComment() {
            return comment;
        }

        public void setComment(String comment) {
            this.comment = comment;
        }

        @Override
        public String toString() {
            return "Request{" +
                    "programId='" + programId + '\'' +
                    ", current='" + current + '\'' +
                    ", suggested='" + suggested + '\'' +
                    ", field='" + field + '\'' +
                    ", source='" + source + '\'' +
                    ", comment='" + comment + '\'' +
                    '}';
        }
    }
}


text:
"""
PyPacMan
Copyright (c) 2013 - Péricles Lopes Machado

This file is distributed under the MIT license. See LICENSE for details.
"""

from distutils.core import setup

setup(
    name='PyPacMan',
    version='0.1.7',
    author='Pericles Lopes Machado',
    author_email='pericles.raskolnikoff@gmail.com',
    packages=['pypacman','pypacman.ai','pypacman.gui','pypacman.game'],
    scripts=[
	'pypacman/ai/a_star.py',
	'pypacman/ai/ai_control.py',
	'pypacman/gui/window.py',
	'pypacman/game/game_control.py'
],
    url='http://pypi.python.org/pypi/PyPacMan/',
    license='LICENSE.txt',
    description='Um clone do pacman desenvolvido como estudo de caso da aplicação de sistemas paralelos em games de tempor real.',
    long_description=open('README.txt').read(),
    install_requires=[
	"pygame >= 1.0.0"
    ],
	package_data = {
        '': ['*.txt'],
		'': ['*.png']
    }

)


text:
namespace GameCore
{
	extern HWND g_hWnd;
}

namespace GameCore
{
	#define NumInputs  static_cast<Input::KEY_TYPE>(InputKey::NumInputs)
	bool sButton[ 2 ][ NumInputs ];
	float sHoldDuration[ NumInputs ];

	IDirectInput8A* sDI;
	IDirectInputDevice8A* sKeyboard;
	IDirectInputDevice8A* sMouse;

	_DIMOUSESTATE2 sMouseState;
	unsigned char sKeybuffer[ 256 ];
	unsigned char sDXKeyMapping[ static_cast<Input::KEY_TYPE>(InputKey::NumKeys) ];

	bool Input::IsAnyPressed()
	{
		return sButton[0][0];
	}

	bool Input::IsPressed(InputKey key)
	{
		return sButton[0][ static_cast<Input::KEY_TYPE>(key) ];
	}

	void Input::Update() {

	}
}