text:
#pragma once
#include <aws/cloudfront/CloudFront_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/DateTime.h>
#include <aws/cloudfront/model/FieldLevelEncryptionConfig.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Xml
{
  class XmlNode;
} // namespace Xml
} // namespace Utils
namespace CloudFront
{
namespace Model
{

  /**
   *
A complex data type that includes the profile configurations and other
   * options specified for field-level encryption.

See Also:
   AWS
   * API Reference

   */
  class AWS_CLOUDFRONT_API FieldLevelEncryption
  {
  public:
    FieldLevelEncryption();
    FieldLevelEncryption(const Aws::Utils::Xml::XmlNode& xmlNode);
    FieldLevelEncryption& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);

    void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;

    /**
     *
The configuration ID for a field-level encryption configuration which
     * includes a set of profiles that specify certain selected data fields to be
     * encrypted by specific public keys.

     */
    inline const Aws::String& GetId() const{ return m_id; }

    /**
     *
The configuration ID for a field-level encryption configuration which
     * includes a set of profiles that specify certain selected data fields to be
     * encrypted by specific public keys.

     */
    inline bool IdHasBeenSet() const { return m_idHasBeenSet; }

    /**
     *
The configuration ID for a field-level encryption configuration which
     * includes a set of profiles that specify certain selected data fields to be
     * encrypted by specific public keys.

     */
    inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }

    /**
     *
The configuration ID for a field-level encryption configuration which
     * includes a set of profiles that specify certain selected data fields to be
     * encrypted by specific public keys.

     */
    inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }

    /**
     *
The configuration ID for a field-level encryption configuration which
     * includes a set of profiles that specify certain selected data fields to be
     * encrypted by specific public keys.

     */
    inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }

    /**
     *
The configuration ID for a field-level encryption configuration which
     * includes a set of profiles that specify certain selected data fields to be
     * encrypted by specific public keys.

     */
    inline FieldLevelEncryption& WithId(const Aws::String& value) { SetId(value); return *this;}

    /**
     *
The configuration ID for a field-level encryption configuration which
     * includes a set of profiles that specify certain selected data fields to be
     * encrypted by specific public keys.

     */
    inline FieldLevelEncryption& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}

    /**
     *
The configuration ID for a field-level encryption configuration which
     * includes a set of profiles that specify certain selected data fields to be
     * encrypted by specific public keys.

     */
    inline FieldLevelEncryption& WithId(const char* value) { SetId(value); return *this;}

    /**
     *
The last time the field-level encryption configuration was changed.

     */
    inline const Aws::Utils::DateTime& GetLastModifiedTime() const{ return m_lastModifiedTime; }

    /**
     *
The last time the field-level encryption configuration was changed.

     */
    inline bool LastModifiedTimeHasBeenSet() const { return m_lastModifiedTimeHasBeenSet; }

    /**
     *
The last time the field-level encryption configuration was changed.

     */
    inline void SetLastModifiedTime(const Aws::Utils::DateTime& value) { m_lastModifiedTimeHasBeenSet = true; m_lastModifiedTime = value; }

    /**
     *
The last time the field-level encryption configuration was changed.

     */
    inline void SetLastModifiedTime(Aws::Utils::DateTime&& value) { m_lastModifiedTimeHasBeenSet = true; m_lastModifiedTime = std::move(value); }

    /**
     *
The last time the field-level encryption configuration was changed.

     */
    inline FieldLevelEncryption& WithLastModifiedTime(const Aws::Utils::DateTime& value) { SetLastModifiedTime(value); return *this;}

    /**
     *
The last time the field-level encryption configuration was changed.

     */
    inline FieldLevelEncryption& WithLastModifiedTime(Aws::Utils::DateTime&& value) { SetLastModifiedTime(std::move(value)); return *this;}

    /**
     *
A complex data type that includes the profile configurations specified for
     * field-level encryption.

     */
    inline const FieldLevelEncryptionConfig& GetFieldLevelEncryptionConfig() const{ return m_fieldLevelEncryptionConfig; }

    /**
     *
A complex data type that includes the profile configurations specified for
     * field-level encryption.

     */
    inline bool FieldLevelEncryptionConfigHasBeenSet() const { return m_fieldLevelEncryptionConfigHasBeenSet; }

    /**
     *
A complex data type that includes the profile configurations specified for
     * field-level encryption.

     */
    inline void SetFieldLevelEncryptionConfig(const FieldLevelEncryptionConfig& value) { m_fieldLevelEncryptionConfigHasBeenSet = true; m_fieldLevelEncryptionConfig = value; }

    /**
     *
A complex data type that includes the profile configurations specified for
     * field-level encryption.

     */
    inline void SetFieldLevelEncryptionConfig(FieldLevelEncryptionConfig&& value) { m_fieldLevelEncryptionConfigHasBeenSet = true; m_fieldLevelEncryptionConfig = std::move(value); }

    /**
     *
A complex data type that includes the profile configurations specified for
     * field-level encryption.

     */
    inline FieldLevelEncryption& WithFieldLevelEncryptionConfig(const FieldLevelEncryptionConfig& value) { SetFieldLevelEncryptionConfig(value); return *this;}

    /**
     *
A complex data type that includes the profile configurations specified for
     * field-level encryption.

     */
    inline FieldLevelEncryption& WithFieldLevelEncryptionConfig(FieldLevelEncryptionConfig&& value) { SetFieldLevelEncryptionConfig(std::move(value)); return *this;}

  private:

    Aws::String m_id;
    bool m_idHasBeenSet;

    Aws::Utils::DateTime m_lastModifiedTime;
    bool m_lastModifiedTimeHasBeenSet;

    FieldLevelEncryptionConfig m_fieldLevelEncryptionConfig;
    bool m_fieldLevelEncryptionConfigHasBeenSet;
  };

} // namespace Model
} // namespace CloudFront
} // namespace Aws


text:
[![Build Status](https://img.shields.io/travis-ci/pulyaevskiy/dart-http-mocks.svg?branch=master&style=flat-square)](https://travis-ci.org/pulyaevskiy/dart-http-mocks)
[![Coverage Status](https://img.shields.io/coveralls/pulyaevskiy/dart-http-mocks.svg?branch=master&style=flat-square)](https://coveralls.io/github/pulyaevskiy/dart-http-mocks?branch=master)
[![License](https://img.shields.io/badge/license-BSD--2-blue.svg?style=flat-square)](https://raw.githubusercontent.com/pulyaevskiy/dart-http-mocks/master/LICENSE)

Mocks and special test matchers to simplify testing of HttpRequests
from `dart:io`.

## 1. Usage

```dart
// file: some_test.dart
library some_lib.tests;

import 'dart:io';
import 'package:test/test.dart';
import 'package:http_mocks/http_mocks.dart';

void main() {
  test('it mocks http requests', () async {
    var request = new HttpRequestMock(Uri.parse('/hello-world'), 'GET');
    // Pass it to your HTTP server or whatever else accepting HttpRequest
    // as an input argument:
    await yourHttpServer.handle(request);

    // Use provided matchers:
    expect(request, responseStatus(HttpStatus.OK));
    expect(request, responseContentType(ContentType.TEXT));
    expect(request,
      responseHeaders(containsPair('Access-Control-Allow-Origin', '*')));
    expect(request, responseBody(contains('Hello world!')));
    expect(request, responseSent); // makes sure request has been "closed".
  });
}
```

## 2. How it works

Under the hood this library uses
[mockito](https://pub.dartlang.org/packages/mockito) to create all the mocks.
All mocks are available through `HttpRequestMock` so it is possible
to perform custom expectations or verifications provided by `mockito`
library.

```dart
var request = new HttpRequestMock(Uri.parse('/foo'), 'GET');
request.headersMock; // mock for request's headers
request.responseMock; // mock for HttpResponse
request.responseHeadersMock; // mock for response's headers
```

## 3. Limitations

Current implementation only covers only a subset of all possible use cases,
though hopefully the most common ones. This means that not all the expectations
can be performed.

* The `HttpHeadersMock` does not support "multi-value" headers at
  this moment (but this can be added in the future).
* Reading of request body assumes you will use `UTF8.decodeStream()`.

If you find a use case which is not covered, feel free to create an issue or a
pull request!

## License

BSD-2

redpajama_set_name: RedPajamaGithub


text:
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import Icon from 'components/Icon';
import { Color } from 'constants/css';

ChangePicture.propTypes = {
  shown: PropTypes.bool
};

export default function ChangePicture({ shown }) {
  const [opacity, setOpacity] = useState(0);
  useEffect(() => {
    setOpacity(shown ? 1 : 0);
  }, [shown]);

  return (
    <div
      style={{
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        width: '100%',
        height: '50%',
        marginTop: '50%',
        position: 'absolute',
        borderBottomRightRadius: '11rem',
        borderBottomLeftRadius: '11rem',
        transition: 'background 0.5s',
        background: Color.black(Math.max(opacity - 0.3, 0))
      }}
    >
      <div
        style={{
          display: 'flex',
          color: Color.white(opacity),
          justifyContent: 'center',
          alignItems: 'center',
          flexDirection: 'column'
        }}
      >
        <Icon icon="camera-alt" size="lg" />
        <div style={{ fontSize: '1.5rem', marginTop: '0.5rem' }}>
          Change Picture
        </div>
      </div>
    </div>
  );
}


text:
import { StyleSheet } from 'react-native';

const styles = StyleSheet.create({
  container: {
  },
});

export default styles;


text:
<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="bug535806-css.css">
  </head>
  <body onload="window.parent.wrappedJSObject.htmlLoaded()">
  </body>
</html>


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="cn.jarlen.houseinspection">

    <uses-permission android:name="android.permission.GET_TASKS" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.READ_LOGS" />
    <uses-permission android:name="com.android.launcher.permission.READ_SETTINGS" />
    <!-- 这个权限用于进行网络定位 -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <!-- 这个权限用于访问GPS定位 -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <application
        android:name=".UIApplication"
        android:allowBackup="true"
        android:icon="@drawable/logo"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".HomeActivity"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".ui.LoginActivity"
            android:launchMode="singleTop"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Translucent" />
        <activity
            android:name=".ui.ProblemSubActivity"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustPan|stateHidden" />
        <activity
            android:name=".ui.LoactionChooseActivity"
            android:screenOrientation="portrait" />
        <activity
            android:name=".ui.ProblemDetailActivity"
            android:screenOrientation="portrait" />

        <provider
            android:name="android.support.v4.content.FileProvider"
            android:authorities="${applicationId}.fileProvider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/provider_paths" />
        </provider>

        <!-- Begin: 百度定位 -->
        <meta-data
            android:name="com.baidu.lbsapi.API_KEY"
            android:value="9GpveYxfLrryV8cuN78YSfPqRT38GEQ0" />

        <service
            android:name="com.baidu.location.f"
            android:enabled="true"
            android:process=":remote" />

        <!-- End: 百度定位 -->

        <activity
            android:name="com.mob.tools.MobUIShell"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.Translucent.NoTitleBar"
            android:windowSoftInputMode="stateHidden|adjustResize">
            <intent-filter>
                <data android:scheme="tencent1105798238" />

                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.sina.weibo.sdk.action.ACTION_SDK_REQ_ACTIVITY" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity android:name=".ui.PhotoViewActivity"
            android:screenOrientation="portrait"/>
        <activity android:name=".ui.AdSubActivity"
            android:screenOrientation="portrait"/>
    </application>

</manifest>


text:
With the inclusion of the Cassandra Data Source, PySpark can now be used with the Connector to
access Cassandra data. This does not require DataStax Enterprise but you are limited to DataFrame
only operations.

### Setup

To enable Cassandra access the Spark Cassandra Connector assembly jar must be included on both the
driver and executor classpath for the PySpark Java Gateway. This can be done by starting the PySpark
shell similarlly to how the spark shell is started. The preferred method is now to use the Spark Packages
website.
http://spark-packages.org/package/datastax/spark-cassandra-connector

```bash
./bin/pyspark \
  --packages com.datastax.spark:spark-cassandra-connector_2.10:1.4.0
```

### Loading a DataFrame in Python

A DataFrame can be created which links to cassandra by using the the `org.apache.spark.sql.cassandra`
source and by specifying keyword arguements for `keyspace` and `table`.

```python
 sqlContext.read\
    .format("org.apache.spark.sql.cassandra")\
    .options(table="kv", keyspace="test")\
    .load().show()
```

```
+-+-+
|k|v|
+-+-+
|5|5|
|1|1|
|2|2|
|4|4|
|3|3|
+-+-+
```

### Saving a DataFrame in Python to Cassandra

A DataFrame can be saved to an *existing* Cassandra table by using the the `org.apache.spark.sql.cassandra` source and by specifying keyword arguements for `keyspace` and `table` and saving mode (`append`, `overwrite`, `error` or `ignore`, see [Data Sources API doc](https://spark.apache.org/docs/latest/sql-programming-guide.html#save-modes)).

```python
 sqlContext.write\
    .format("org.apache.spark.sql.cassandra")\
    .mode('append')\
    .options(table="kv", keyspace="test")\
    .save()
```

The options and parameters are identical to the Scala Data Frames Api so
please see [Data Frames](14_data_frames.md) for more information.

[Next - Spark Partitioners](16_partitioning.md)


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('plants', '0010_auto_20160330_0922'),
    ]

    operations = [
        migrations.AlterField(
            model_name='plant',
            name='shade_tolerance',
            field=models.CharField(blank=True, choices=[('NONE', 'NONE'), ('LIGHT', 'LIGHT'), ('PERMANENT', 'PERMANENT')], help_text='How much shade the plant can tolerate', max_length=100),
        ),
        migrations.AlterField(
            model_name='plant',
            name='sun_preference',
            field=models.CharField(blank=True, choices=[('MINIMAL', 'MINIMAL'), ('FULL', 'FULL')], help_text='How much sun the plant prefers', max_length=100),
        ),
    ]


text:
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text.Json.Serialization;

namespace System.Text.Json
{
    public static partial class JsonSerializer
    {
        private static bool HandleDictionary(
            JsonClassInfo elementClassInfo,
            JsonSerializerOptions options,
            Utf8JsonWriter writer,
            ref WriteStack state)
        {
            JsonPropertyInfo jsonPropertyInfo = state.Current.JsonPropertyInfo;
            if (state.Current.CollectionEnumerator == null)
            {
                IEnumerable enumerable;

                enumerable = (IEnumerable)jsonPropertyInfo.GetValueAsObject(state.Current.CurrentValue);
                if (enumerable == null)
                {
                    if ((state.Current.JsonClassInfo.ClassType != ClassType.Object || // Write null dictionary values
                        !state.Current.JsonPropertyInfo.IgnoreNullValues) && // Ignore ClassType.Object properties if IgnoreNullValues is true
                        state.Current.ExtensionDataStatus != ExtensionDataWriteStatus.Writing) // Ignore null extension property (which is a dictionary)
                    {
                        // Write a null object or enumerable.
                        state.Current.WriteObjectOrArrayStart(ClassType.Dictionary, writer, options, writeNull: true);
                    }

                    if (state.Current.PopStackOnEndCollection)
                    {
                        state.Pop();
                    }

                    return true;
                }

                // Let the dictionary return the default IEnumerator from its IEnumerable.GetEnumerator().
                // For IDictionary-derived classes this is normally be IDictionaryEnumerator.
                // For IDictionary<TKey, TVale>-derived classes this is normally IDictionaryEnumerator as well
                // but may be IEnumerable<KeyValuePair<TKey, TValue>> if the dictionary only supports generics.
                state.Current.CollectionEnumerator = enumerable.GetEnumerator();

                if (state.Current.ExtensionDataStatus != ExtensionDataWriteStatus.Writing)
                {
                    state.Current.WriteObjectOrArrayStart(ClassType.Dictionary, writer, options);
                }
            }

            if (state.Current.CollectionEnumerator.MoveNext())
            {
                // A dictionary should not have a null KeyValuePair.
                Debug.Assert(state.Current.CollectionEnumerator.Current != null);

                bool obtainedValues = false;
                string key = default;
                object value = default;

                // Check for polymorphism.
                if (elementClassInfo.ClassType == ClassType.Unknown)
                {
                    jsonPropertyInfo.GetDictionaryKeyAndValue(ref state.Current, out key, out value);
                    GetRuntimeClassInfo(value, ref elementClassInfo, options);
                    obtainedValues = true;
                }

                if (elementClassInfo.ClassType == ClassType.Value)
                {
                    elementClassInfo.PolicyProperty.WriteDictionary(ref state, writer);
                }
                else
                {
                    if (!obtainedValues)
                    {
                        jsonPropertyInfo.GetDictionaryKeyAndValue(ref state.Current, out key, out value);
                    }

                    // An object or another enumerator requires a new stack frame.
                    state.Push(elementClassInfo, value);
                    state.Current.KeyName = key;
                }

                return false;
            }

            // We are done enumerating.
            if (state.Current.ExtensionDataStatus == ExtensionDataWriteStatus.Writing)
            {
                state.Current.ExtensionDataStatus = ExtensionDataWriteStatus.Finished;
            }
            else
            {
                writer.WriteEndObject();
            }

            if (state.Current.PopStackOnEndCollection)
            {
                state.Pop();
            }
            else
            {
                state.Current.EndDictionary();
            }

            return true;
        }

        internal static void WriteDictionary<TProperty>(
            JsonConverter<TProperty> converter,
            JsonSerializerOptions options,
            ref WriteStackFrame current,
            Utf8JsonWriter writer)
        {
            Debug.Assert(converter != null && current.CollectionEnumerator != null);

            string key;
            TProperty value;
            if (current.CollectionEnumerator is IEnumerator<KeyValuePair<string, TProperty>> enumerator)
            {
                key = enumerator.Current.Key;
                value = enumerator.Current.Value;
            }
            else if (current.CollectionEnumerator is IEnumerator<KeyValuePair<string, object>> polymorphicEnumerator)
            {
                key = polymorphicEnumerator.Current.Key;
                value = (TProperty)polymorphicEnumerator.Current.Value;
            }
            else if (current.CollectionEnumerator is IDictionaryEnumerator iDictionaryEnumerator &&
                iDictionaryEnumerator.Key is string keyAsString)
            {
                key = keyAsString;
                value = (TProperty)iDictionaryEnumerator.Value;
            }
            else
            {
                throw ThrowHelper.GetNotSupportedException_SerializationNotSupportedCollection(
                    current.JsonPropertyInfo.DeclaredPropertyType,
                    current.JsonPropertyInfo.ParentClassType,
                    current.JsonPropertyInfo.PropertyInfo);
            }

            Debug.Assert(key != null);

            if (options.DictionaryKeyPolicy != null &&
                // We do not convert extension data.
                current.ExtensionDataStatus != ExtensionDataWriteStatus.Writing)
            {
                key = options.DictionaryKeyPolicy.ConvertName(key);

                if (key == null)
                {
                    ThrowHelper.ThrowInvalidOperationException_SerializerDictionaryKeyNull(options.DictionaryKeyPolicy.GetType());
                }
            }

            if (value == null)
            {
                writer.WriteNull(key);
            }
            else
            {
                writer.WritePropertyName(key);
                converter.Write(writer, value, options);
            }
        }
    }
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Tomaž Lovrec - Software Developer</title>

    <link rel="stylesheet" href="css/material.min.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">

Tomaž Lovrec

Software Developer

Tomaž Lovrec

                    keyboard_arrow_down

        {% include content with contentData %}

© 2015, Tomaž Lovrec


text:
CMD=$2
INSTANCE_NAME=$1
SERVER_GROUP=$3
SCRIPTS_HOME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
APP_NAME=java_efactura_uy
REMOTE_DIR=/srv/$APP_NAME
CONF=$SCRIPTS_HOME/../conf
PORT=9000
JAVA_OPTS="export JAVA_OPTS=-XX:+CMSClassUnloadingEnabled\ -XX:+UseConcMarkSweepGC\ -XX:NewSize=1024m\ -XX:MaxNewSize=1024m\ -XX:SurvivorRatio=6\ -Xmx2g\ -Xms2g"

#LOG functions
LOG() {
echo "`date`:$@"
}

INFO() {
LOG "INFO: $@"
}

WARNING() {
LOG "WARNING: $@"
}

instanceIp() {
        echo $(cat $CONF/servers.conf | grep $1 | grep -v "#" | awk -F "|" {'print $2'})
}

instancePort() {
        echo $(cat $CONF/servers.conf | grep $1 | grep -v "#" | awk -F "|" {'print $3'})
}

instanceKey() {
        echo $(cat $CONF/servers.conf | grep $1 | grep -v "#" | awk -F "|" {'print $5'})
}

instanceUser() {
        echo $(cat $CONF/servers.conf | grep $1 | grep -v "#" | awk -F "|" {'print $6'})
}

instanceIp=$(instanceIp $INSTANCE_NAME)
instancePort=$(instancePort $INSTANCE_NAME)
instanceKey=$(instanceKey $INSTANCE_NAME)
instanceUser=$(instanceUser $INSTANCE_NAME)

start() {

        cant=$(ssh -i $instanceKey $instanceUser@$instanceIp -p $instancePort  "ps ax | grep -v grep | grep Dconfig.file | grep $APP_NAME | grep -v grep | wc -l")

        if [ "$cant" != "0" ]; then
                INFO "$APP_NAME is running at $INSTANCE_NAME, aborting ..."
        else
                INFO "No $APP_NAME instances running on $INSTANCE_NAME"
                INFO "Starting instance $INSTANCE_NAME..."
		INFO "$JAVA_OPTS"
                APP_NAME_VERSION=$(ssh -i $instanceKey $instanceUser@$instanceIp -p $instancePort "ls $REMOTE_DIR/$SERVER_GROUP")
                ssh -i $instanceKey $instanceUser@$instanceIp -p $instancePort "echo '$JAVA_OPTS; nohup $REMOTE_DIR/$SERVER_GROUP/$APP_NAME_VERSION/bin/$APP_NAME -Dhttp.port=$PORT -Dconfig.file=$REMOTE_DIR/$SERVER_GROUP/$APP_NAME_VERSION/conf/application.conf >> /var/log/srv/$APP_NAME.log 2>&1 &' | bash"
                sleep 2

                cant=$(ssh -i $instanceKey $instanceUser@$instanceIp -p $instancePort "ps -ef | grep Dconfig.file | grep $APP_NAME | grep -v grep | wc -l")

                if [ "$cant" -gt "0" ]; then
                        INFO "$APP_NAME at instance $INSTANCE_NAME started"
                else
                        INFO "$APP_NAME at instance $INSTANCE_NAME could not be started, trying againg..."
                        $0 $INSTANCE_NAME start $SERVER_GROUP
                fi
        fi
}

stop() {
        INFO "Stoping instance $INSTANCE_NAME..."

        APP_PID=$(ssh -i $instanceKey $instanceUser@$instanceIp -p $instancePort "ps -ef | grep -v grep | grep Dconfig.file | grep $APP_NAME" | awk '{print $2}')
        #curl "http://$INSTANCE_HOSTNAME:9000/api/v1/application/shutdown" -H "X-BH-IPASS-AUTH-TOKEN: 013df144-dd02-430c-affc-33511bab6f8d"  --compressed

        cant=$(ssh -i $instanceKey $instanceUser@$instanceIp -p $instancePort "ps -ef | grep Dconfig.file | grep $APP_NAME | grep -v grep | wc -l")
        if [ "$cant" -gt "0" ]; then
                ssh -t -i $instanceKey $instanceUser@$instanceIp -p $instancePort "kill $APP_PID" 2>/dev/null
                sleep 2
                $0 $INSTANCE_NAME stop $SERVER_GROUP
        else
                INFO "$APP_NAME at instance $INSTANCE_NAME stopped"
        fi

}

status() {
	cant=$(ssh -i $instanceKey $instanceUser@$instanceIp -p $instancePort  "ps ax | grep -v grep | grep Dconfig.file | grep $APP_NAME | grep -v grep | wc -l")

        if [ "$cant" != "0" ]; then
		INFO "$APP_NAME running instances at $INSTANCE_NAME:  $cant "
        else
		INFO "No $APP_NAME instances running on $INSTANCE_NAME"
        fi

}

case "$CMD" in
    start)
        start "start"
        ;;
    stop)
        stop "stop"
        ;;
    restart)
        stop "stop"
	start "start"
	;;
    status)
	status "status"
	;;
    *)
        echo "Usage $0 INSTANCE_ID {start|stop|restart|status} <serverGroup>"

        RETVAL=1
esac


text:
using MyRoutine.Web.ViewModels;
using System.Collections.Generic;

namespace MyRoutine.Web.Areas.Admin.ViewModels.EditPicky
{
    public class PickyMessagesGridViewModel
    {
        public PickyMessagesGridViewModel()
        {
            PickyMessages = new List<PickyMessageViewModel>();
        }

        public List<PickyMessageViewModel> PickyMessages { get; set; }
        public GridFiltersViewModel GridFilters { get; set; }
    }
}


text:
/*#ifndef OPTIONS_H
#define OPTIONS_H
#endif

#define DARKGRAY  int(70/8*2048)  + int(70/4*32)  + int(70/8)
#define BLACK     0x0000
#define ORANGE    int(255/8*2048) + int(120/4*32) + int(0/8)
#define WHITE     0xFFFF

#define ARRAY_SIZE(X) sizeof(X)/sizeof(X[0])

#include<SPFD5408_Adafruit_GFX.h>
#include<SPFD5408_Adafruit_TFTLCD.h>
#include"../option/Option.h"

//#include <StandardCplusplus.h>
//#include <serstream>
//#include <string>
//#include <vector>
//#include <iterator>

class Options {
private:
	typedef struct params {
		int id;
		String name;
	}  parameter_t;

	typedef struct option{
		int id;
		String name;
		parameter_t params[];
	} options_t;

	options_t *menu;
	Option menu[3];
	Adafruit_TFTLCD *tft;
	char *active_option_view;

	void setMarker();

public:
	Options();
	Options(Adafruit_TFTLCD *tft);

	void next();
	void previous();

	void print(char *type);
	void init();
};*/


text:
BUILD_DIR ?= build
BUILD_APP_DIR ?= $(BUILD_DIR)/apps

# Default platform is the Storm (http://storm.rocks). Change to any platform in
# the `platform` directory.
PLATFORM ?= storm
CHIP ?= sam4l

# Dummy all. The real one is in platform-specific Makefiles.
all:	$(BUILD_DIR) $(BUILD_APP_DIR)

$(BUILD_DIR):
	@mkdir -p $@

$(BUILD_APP_DIR):
	@mkdir -p $@

# Common functions and variables
include Common.mk

BASE_DIR = $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))/

# External dependencies (Rust libcore)
EXTERN_DIR = $(BASE_DIR)extern/
include extern/Makefile.mk

# Tock
SRC_DIR = $(BASE_DIR)src/
include src/Makefile.mk

.PHONY: doc all clean clean-all

# Generates documentation for the kernel and selected architecture and platform.
doc: $(BUILD_DIR)/main.o
	@echo "Generating documentation..."
	@$(RUSTDOC) --target $(RUST_TARGET) -L$(BUILD_DIR) $(SRC_DIR)chips/$(CHIP)/lib.rs
	@$(RUSTDOC) --target $(RUST_TARGET) -L$(BUILD_DIR) $(SRC_DIR)common/lib.rs
	@$(RUSTDOC) --target $(RUST_TARGET) -L$(BUILD_DIR) $(SRC_DIR)drivers/lib.rs
	@$(RUSTDOC) --target $(RUST_TARGET) -L$(BUILD_DIR) $(SRC_DIR)hil/lib.rs
	@$(RUSTDOC) --target $(RUST_TARGET) -L$(BUILD_DIR) $(SRC_DIR)main/main.rs
	@$(RUSTDOC) --target $(RUST_TARGET) -L$(BUILD_DIR) $(SRC_DIR)platform/$(PLATFORM)/lib.rs

# Removes compilation artifacts for Tock, but not external dependencies.
clean:
	rm -Rf $(BUILD_DIR)/*.*
	rm -Rf $(BUILD_APP_DIR)/*.*

# Remove all compilation artifacts, including for external dependencies.
clean-all:
	rm -Rf $(BUILD_DIR)

# Keep all object files
.PRECIOUS: *.o *.elf


text:
  #define DLL_PUBLIC __declspec(dllexport)
#else
  #if defined __GNUC__
    #define DLL_PUBLIC __attribute__ ((visibility("default")))
  #else
    #pragma message ("Compiler does not support symbol visibility.")
    #define DLL_PUBLIC
  #endif
#endif

int statlibfunc(void);

int DLL_PUBLIC shlibfunc2(void) {
    return 24;
}


text:
    //
//  ImageWithTextViewController.m
//  universaldemo
//
//  Created by forrest on 10-8-1.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "ImageWithTextViewController.h"
#import "ChivasAppDelegate.h"

@implementation ImageWithTextViewController

@synthesize imageArrays,startLocation,currentImageView ,nextImageView;

- (void)dealloc {

	[imageArrays release];
	[nextImageView release];

	[currentImageView release];

    [super dealloc];
}

- (void) backToMainMenu{
	NSLog(@"%s \n",__FUNCTION__);
	[self showPreButton:NO];
	ChivasAppDelegate* appDelegate = [[UIApplication sharedApplication] delegate];
	if (appDelegate) {
		[appDelegate switchToCoverFlow: 1];
	}
}

- (void) showBackButton:(Boolean)bShowMe{
	NSLog(@"%s \n",__FUNCTION__);
	ChivasAppDelegate* appDelegate = [[UIApplication sharedApplication] delegate];
	if (appDelegate) {
		[appDelegate enableBackButton:bShowMe];
	}
}

- (void) showNextButton:(Boolean)bShowMe{
	NSLog(@"%s \n",__FUNCTION__);
	ChivasAppDelegate* appDelegate = [[UIApplication sharedApplication] delegate];
	if (appDelegate) {
		[appDelegate enableNextButton:bShowMe];
	}
}

- (void) showPreButton:(Boolean)bShowMe{
	NSLog(@"%s \n",__FUNCTION__);
	ChivasAppDelegate* appDelegate = [[UIApplication sharedApplication] delegate];
	if (appDelegate) {
		[appDelegate enablePreButton:bShowMe];
	}
}

- (void) onClickBackButton{
#ifdef DEBUG
		NSLog(@"%s \n",__FUNCTION__);
#endif

	[self backToMainMenu];

}

- (void) onClickNextButton{
#ifdef DEBUG
	NSLog(@"%s \n",__FUNCTION__);
#endif
	NSLog(@"currentIndex %d ", currentIndex);
	currentImageView = (UIImageView*)[imageArrays objectAtIndex:currentIndex ];
	currentIndex++;
	NSLog(@"currentIndex %d ", currentIndex);
	[self updateImageView];
}

- (void) onClickPreButton{
#ifdef DEBUG
	NSLog(@"%s \n",__FUNCTION__);
#endif
	NSLog(@"currentIndex %d ", currentIndex);
	currentImageView = (UIImageView*)[imageArrays objectAtIndex:currentIndex ];
	currentIndex--;
	NSLog(@"currentIndex %d ", currentIndex);
	[self updateImageView];

}

- (id)init{

	if (self = [super init]) {

		imageArrays = [[NSMutableArray alloc] init];

		//
		for (int i = 1; i < 5; i++) {
			UIImage *image1 =[UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"age%d.png",i] ofType:nil] ];

			UIImageView *imageView1 = [[UIImageView alloc] initWithImage:image1];
			imageView1.alpha = 1;

			int X = (COVERFLOW_WIDTH - image1.size.width )/2;

			imageView1.frame = CGRectMake(X + 8, AGEMATTER_Y, image1.size.width, image1.size.height);
			[imageArrays addObject:imageView1];
			[imageView1 release];
		}
		currentIndex = 0;
		currentImageView = (UIImageView*)[imageArrays objectAtIndex:currentIndex ];
		nextImageView = (UIImageView*)[imageArrays objectAtIndex:(currentIndex+1) ];
		[self.view addSubview: currentImageView];

		[self updateImageView];
	}
	return self;
}

//- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
//{
//	//NSLog(@"touchesBegan");
//	UITouch *touch = [[event allTouches] anyObject];
//	startLocation = [touch locationInView:self.view];
//
//	currentImageView = (UIImageView*)[imageArrays objectAtIndex:currentIndex ];
//
//}
//
//- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
//{
//	//NSLog(@"touchesMoved");
//}
//
//- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
//{
//	//NSLog(@"touchesEnded");
//
//	UITouch *touch = [[event allTouches] anyObject];
//	CGPoint endLocation = [touch locationInView:self.view];
//
//	if (endLocation.x > startLocation.x) {
//		currentIndex--;
//	}else {
//		currentIndex++;
//	}
//
//	[self updateImageView];
//
//}

- (void) updateImageView{
	if (currentIndex < 0) {
		currentIndex = 0 ;
		return;
	}else if (currentIndex > 3) {
		currentIndex = 3;
		return;
	}

	if (currentIndex == 0) {
		NSLog(@"currentIndex %d ", currentIndex);
		[self showPreButton:NO];
		[self showNextButton:YES];
		[self showBackButton:NO];
	}else if (currentIndex == 1 || currentIndex == 2 ) {
		NSLog(@"currentIndex %d ", currentIndex);
		[self showPreButton:YES];
		[self showNextButton:YES];
		[self showBackButton:NO];

	}else if (currentIndex == 3) {
		NSLog(@"currentIndex %d ", currentIndex);
		[self showPreButton:YES];
		[self showNextButton:NO];
		[self showBackButton:YES];
	}

	nextImageView = (UIImageView*)[imageArrays objectAtIndex:currentIndex ];
	nextImageView.alpha = 1;
	//[self.view addSubview:currentImageView];
	if (currentImageView) {
		[currentImageView removeFromSuperview];
		currentImageView = nil;
	}
	[self.view addSubview:nextImageView];

	//[UIView beginAnimations:@"test1" context:nil];
//	[UIView setAnimationDuration:1.5];
//	[UIView setAnimationCurve:UIViewAnimationCurveEaseIn];
//	currentImageView.alpha = 0;
//	nextImageView.alpha = 1;
//	[UIView commitAnimations];

}

/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/

/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
}
*/

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Overriden to allow any orientation.
    return YES;
}

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

@end


text:
package java.lang.management;

/**
 * The management and monitoring interface for the operating system where the
 * virtual machine is running.
 *

 * Precisely one instance of this interface will be made available to management
 * clients.
 *

 *

 * Accessing this MXBean can be done in one of three ways.

 *

 *
Invoking the static ManagementFactory.getOperatingSystemMXBean() method.
 *

 *
Using a javax.management.MBeanServerConnection.

 *
Obtaining a proxy MXBean from the static
 * {@link ManagementFactory#newPlatformMXBeanProxy}method, passing in
 * "java.lang:type=OperatingSystem" for the value of the second
 * parameter.

 *

 *

 *
 * @since 1.5
 */
public interface OperatingSystemMXBean extends PlatformManagedObject {

    /**
     * Returns a unique string identifier for the architecture of the underlying
     * operating system. The identifier value is identical to that which would
     * be obtained from a call to {@link System#getProperty(java.lang.String)}
     * supplying the value "os.arch" for the key.
     *
     * @return the identifier for the operating system architecture.
     * @throws SecurityException
     *             if there is a security manager in operation and the caller
     *             does not have permission to check system properties.
     * @see System#getProperty(java.lang.String)
     */
    public String getArch();

    /**
     * Returns the number of processors that are available for the virtual
     * machine to run on. The information returned from this method is identical
     * to that which would be received from a call to
     * {@link Runtime#availableProcessors()}.
     *
     * @return the number of available processors.
     */
    public int getAvailableProcessors();

    /**
     * Returns the name of the underlying operating system. The value is
     * identical to that which would be obtained from a call to
     * {@link System#getProperty(java.lang.String)}supplying the value
     * "os.name" for the key.
     *
     * @return the name of the operating system.
     * @throws SecurityException
     *             if there is a security manager in operation and the caller
     *             does not have permission to check system properties.
     * @see System#getProperty(java.lang.String)
     */
    public String getName();

    /**
     * Returns the version string for the underlying operating system. The value
     * is identical to that which would be obtained from a call to
     * {@link System#getProperty(java.lang.String)}supplying the value
     * "os.version" for the key.
     *
     * @return the version of the operating system.
     * @throws SecurityException
     *             if there is a security manager in operation and the caller
     *             does not have permission to check system properties.
     * @see System#getProperty(java.lang.String)
     */
    public String getVersion();

    /**
     * Returns a double value which holds the system load average calculated for
     * the minute preceding the call, where system load average is taken
     * to mean the following:
     *

     * the time-averaged value of the sum of the number of runnable entities
     * running on the available processors and the number of runnable entities
     * ready and queued to run on the available processors. The averaging
     * technique adopted can vary depending on the underlying operating system.
     *
     * @return normally, the system load average as a double. If the system load
     *         average is not obtainable (e.g. because the calculation may
     *         involve an unacceptable performance impact) then a negative value
     *         is returned.
     * @since 1.6
     */
    public double getSystemLoadAverage();
}


text:
package org.encog.util.normalize.segregate;

import java.io.Serializable;

/**
 * Specifies a range that might be included or excluded.
 */
public class SegregationRange implements Serializable {

    /**
     * The low end of this range.
     */
    private double low;
    /**
     * The high end of this range.
     */
    private double high;
    /**
     * Should this range be included.
     */
    private boolean include;

    /**
     * Default constructor for reflection.
     */
    public SegregationRange() {
    }

    /**
     * Construct a segregation range.
     *

     * @param low
     *                The low end of the range.
     * @param high
     *                The high end of the range.
     * @param include
     *                Specifies if the range should be included.
     */
    public SegregationRange(final double low, final double high,
                            final boolean include) {
        super();
        this.low = low;
        this.high = high;
        this.include = include;
    }

    /**
     * @return The high end of the range.
     */
    public double getHigh() {
        return this.high;
    }

    /**
     * @return The low end of the range.
     */
    public double getLow() {
        return this.low;
    }

    /**
     * Is this value within the range.
     *

     * @param value The value to check.
     *

     * @return True if the value is within the range.
     */
    public boolean inRange(final double value) {
        return ((value >= this.low) && (value <= this.high));
    }

    /**
     * @return True if this range should be included.
     */
    public boolean isIncluded() {
        return this.include;
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.github.ledsoft</groupId>
    <artifactId>jopa-spring-transaction</artifactId>
    <version>0.1.3</version>
    <name>JOPA-Spring-transaction</name>
    <description>
        Integration of JOPA with Spring declarative transactions.
    </description>
    <url>https://github.com/ledsoft/jopa-spring-transaction</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>

        <cz.cvut.kbss.jopa.version>0.19.0</cz.cvut.kbss.jopa.version>
        <org.springframework.version>5.3.23</org.springframework.version>

        <org.junit.jupiter.version>5.9.1</org.junit.jupiter.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>cz.cvut.kbss.jopa</groupId>
            <artifactId>jopa-api</artifactId>
            <version>${cz.cvut.kbss.jopa.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${org.junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${org.junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${org.junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.3.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>2.0.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${org.springframework.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${org.springframework.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>cz.cvut.kbss.jopa</groupId>
            <artifactId>jopa-impl</artifactId>
            <version>${cz.cvut.kbss.jopa.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>cz.cvut.kbss.jopa</groupId>
            <artifactId>ontodriver-sesame</artifactId>
            <version>${cz.cvut.kbss.jopa.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <version>1.3.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.4</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.3</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <aggregate>true</aggregate>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <!-- explicitly define maven-deploy-plugin after other to force exec order -->
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.8.2</version>
                        <executions>
                            <execution>
                                <id>deploy</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
            </plugin>
            <!-- This plugin is here only to make tests work, as they require AJC to process JOPA entity classes -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.14.0</version>
                <configuration>
                    <complianceLevel>${java.version}</complianceLevel>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <aspectLibraries>
                        <aspectLibrary>
                            <groupId>cz.cvut.kbss.jopa</groupId>
                            <artifactId>jopa-impl</artifactId>
                        </aspectLibrary>
                    </aspectLibraries>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>1.9.7</version>
                    </dependency>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjrt</artifactId>
                        <version>1.9.7</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>test</id>
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>test-compile</goal>
                            <!-- use this goal to weave all your test classes -->
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
            </plugin>

            <!-- Code coverage plugin -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.6</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <licenses>
        <license>
            <name>MIT license</name>
            <url>https://opensource.org/licenses/MIT</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Martin Ledvinka</name>
            <email>martin.ledvinka@hotmail.com</email>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/ledsoft/jopa-spring-transaction.git</url>
        <connection>scm:git:https://github.com/ledsoft/jopa-spring-transaction.git</connection>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <site>
            <id>github</id>
            <name>JOPA-Spring-transaction</name>
            <url>https://github.com/ledsoft/jopa-spring-transaction</url>
        </site>
    </distributionManagement>
</project>


text:
=head1 LICENSE

Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute

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.

=cut

=head1 CONTACT

  Please email comments or questions to the public Ensembl
  developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.

  Questions may also be sent to the Ensembl help desk at
  <http://www.ensembl.org/Help/Contact>.

=cut

=head1 NAME

Bio::EnsEMBL::Utils::IO::FASTASerializer

=head1 SYNOPSIS

  my $serializer = Bio::EnsEMBL::Utils::IO::FASTASerializer->new($filehandle);
  $serializer->chunk_factor(1000);
  $serializer->line_width(60);
  $serializer->print_Seq($slice);

  $serializer = Bio::EnsEMBL::Utils::IO::FASTASerializer->new($filehandle,
      sub {
        my $slice = shift;
        return "Custom header";
      }
  );

=head1 DESCRIPTION

  Replacement for SeqDumper, making better use of shared code. Outputs FASTA
  format with optional custom header and formatting parameters. Set line_width
  and chunk_factor to dictate buffer size depending on application. A 60kb
  buffer is used by default with a line width of 60 characters.

  Custom headers are set by supplying an anonymous subroutine to new(). Custom
  header code must accept a Slice or Bio::PrimarySeqI compliant object as
  argument and return a string.

  The custom header method can be overridden later through set_custom_header()
  but this is not normally necessary.

=cut

package Bio::EnsEMBL::Utils::IO::FASTASerializer;

use strict;
use warnings;
use Bio::EnsEMBL::Utils::Exception;
use Bio::EnsEMBL::Utils::Scalar qw/assert_ref assert_integer check_ref/;

use base qw(Bio::EnsEMBL::Utils::IO::Serializer);

=head2 new

  Arg [1]    : Filehandle (optional)
  Arg [2]    : CODEREF subroutine for writing custom headers
  Arg [3]    : [optional] Chunking size (integer)
  Arg [4]    : [optional] Line width (integer)
  Example    : $dumper = Bio::EnsEMBL::Utils::IO::FASTASerializer->new($filehandle,$header_function,1000,60);
  Description: Constructor
               Allows the specification of a custom function for rendering
               header lines.
               Set line width to 0 for no linefeeds in the sequence.
  Returntype : Bio::EnsEMBL::Utils::IO::FASTASerializer;
  Exceptions : none
  Caller     : general

=cut

sub new {
  my $caller = shift;
  my $class = ref($caller) || $caller;
  my $filehandle = shift;
  my $header_function = shift;
  my $chunk_factor = shift;
  my $line_width = shift;

  my $self = $class->SUPER::new($filehandle);

  $self->{'header_function'} = $header_function;
  $self->line_width( (defined $line_width)? $line_width : 60 );
  $self->{'chunk_factor'} = ($chunk_factor)? $chunk_factor : 1000;
  # gives a 60kb buffer by default, increase for higher database and disk efficiency.

  if ( defined($self->{'header_function'}) ) {
    if (ref($self->{'header_function'}) ne "CODE") {
      throw("Custom header function must be an anonymous subroutine when instantiating FASTASerializer");}
  }
  else {
    $self->{'header_function'} = sub {
      my $slice = shift;

      if(check_ref($slice, 'Bio::EnsEMBL::Slice')) {
        my $id     = $slice->seq_region_name;
        my $seqtype  = 'dna';
        my $idtype   = $slice->coord_system->name;
        my $location = $slice->name;

        return "$id $seqtype:$idtype $location";
      }
      else {
        # must be a Bio::Seq , or we're doomed

        return $slice->display_id;
      }
    };

  }

  return $self;
}

=head2 print_metadata

  Arg [1]    : Bio::EnsEMBL::Slice
  Description: Printing header lines into FASTA files. Usually handled
               internally to the serializer.
  Returntype : None
  Caller     : print_Seq
=cut

sub print_metadata {
  my $self = shift;
  my $slice = shift;
  my $fh = $self->{'filehandle'};
  my $function = $self->header_function();
  my $metadata = $function->($slice);
  print $fh '>'.$metadata."\n" or throw "Error writing to file handle: $!";
}

=head2 print_Seq

  Arg [1]    : Bio::EnsEMBL::Slice or other Bio::PrimarySeqI compliant object

  Description: Serializes the slice into FASTA format. Buffering is used
               While other Bioperl PrimarySeqI implementations can be used,
               a custom header function will be required to accommodate it.

  Returntype : None

=cut

sub print_Seq {
  my $self = shift;
  my $slice = shift;
  my $fh = $self->{'filehandle'};

  $self->print_metadata($slice);
  my $width = $self->{line_width};

  # set buffer size
  my $chunk_size = $self->{'chunk_factor'} * $width;
  $chunk_size = $self->{'chunk_factor'} if $width == 0;
  my $start = 1;
  my $end = $slice->length();

  #chunk the sequence to conserve memory, and print

  my $here = $start;
  if ($width == 0) {
    print $fh $slice->seq."\n" or throw "Error writing to file handle: $!";
  } else {
    while($here <= $end) {
      my $there = $here + $chunk_size - 1;
      $there = $end if($there > $end);
      my $seq = $slice->subseq($here, $there);

      my @lines = unpack ("(A$width)*", $seq);
      push @lines,''; # ensure last line has a carriage return
      $seq = join "\n",@lines;
      # $seq =~ s/(.{1,$width})/$1\n/g; # straightforward but has cost

      print $fh $seq or throw "Error writing to file handle: $!";
      $here = $there + 1;
    }
  }
  if ($slice->length > 0) {$self->{'achieved_something'} = 1;}

}

=head2 line_width

  Arg [1]    : Integer e.g. 60 or 80
  Description: Set and get FASTA format line width. Default is 60, maximum is 2**30
               Set to 0 for no line feeds in the sequence
  Returntype : Integer

=cut

sub line_width {
  my $self = shift;
  my $line_width = shift;
  if (defined $line_width) {
    assert_integer($line_width,'line width');
    throw "Must have a sensible line width" if $line_width < 0;
    throw "Maximum line width is 2**30, consider using 0 for no line feeds instead" if $line_width > 1073741824;
    $self->{'line_width'} = $line_width
  }
  return $self->{'line_width'}
}

=head2 chunk_factor

  Arg [1]    : Integer e.g. 1000
  Description: Set and get the multiplier used to dictate buffer size
               Chunk factor x line width = buffer size in bases.
  Returntype : Integer

=cut

sub chunk_factor {
  my $self = shift;
  my $chunk_factor = shift;
  assert_integer($chunk_factor,'chunk factor') if $chunk_factor;
  if ($chunk_factor) { $self->{'chunk_factor'} = $chunk_factor};
  return $self->{'chunk_factor'}
}

=head2 set_custom_header

  Arg [1]    : CODE reference
  Description: Set the custom header function. Normally this is done at
               construction time, but can be overridden here.
  Example    : $serializer->set_custom_header( sub { return 'New header'});
  Returntype :

=cut

sub set_custom_header {
  my ($self, $new_header_function) = @_;
  $self->header_function($new_header_function);
  return;
}

=head2 header_function

  Arg [1]     : CODE reference (optional)
  Description : Getter/setter for the custom header code
  Example     : $serializer->header_function( sub { return 'New header'});
  Returntype  : CODE

=cut

sub header_function {
  my ($self, $header_function) = @_;
  if($header_function) {
    assert_ref($header_function, 'CODE', 'header_function');
    $self->{header_function} = $header_function;
  }
  return $self->{header_function};
}

1;


text:
/*
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied. See the License for the specific language governing permissions and limitations under
 * the License.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.run.v1alpha1.model;

/**
 * ServiceSpecReleaseType contains the options for slowly releasing revisions. See ServiceSpec for
 * more details. Not currently supported by Cloud Run.
 *
 *
 This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Cloud Run Admin API. For a detailed explanation see:
 * https://developers.google.com/api-client-library/java/google-http-java-client/json
 *

 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class ServiceSpecReleaseType extends com.google.api.client.json.GenericJson {

  /**
   * The configuration for this service. All revisions from this service must come from a single
   * configuration.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ConfigurationSpec configuration;

  /**
   * Revisions is an ordered list of 1 or 2 revisions. The first is the current revision, and the
   * second is the candidate revision. If a single revision is provided, traffic will be pinned at
   * that revision. "@latest" is a shortcut for usage that refers to the latest created revision by
   * the configuration.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> revisions;

  /**
   * RolloutPercent is the percent of traffic that should be sent to the candidate revision, i.e.
   * the 2nd revision in the revisions list. Valid values are between 0 and 99 inclusive.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer rolloutPercent;

  /**
   * The configuration for this service. All revisions from this service must come from a single
   * configuration.
   * @return value or {@code null} for none
   */
  public ConfigurationSpec getConfiguration() {
    return configuration;
  }

  /**
   * The configuration for this service. All revisions from this service must come from a single
   * configuration.
   * @param configuration configuration or {@code null} for none
   */
  public ServiceSpecReleaseType setConfiguration(ConfigurationSpec configuration) {
    this.configuration = configuration;
    return this;
  }

  /**
   * Revisions is an ordered list of 1 or 2 revisions. The first is the current revision, and the
   * second is the candidate revision. If a single revision is provided, traffic will be pinned at
   * that revision. "@latest" is a shortcut for usage that refers to the latest created revision by
   * the configuration.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getRevisions() {
    return revisions;
  }

  /**
   * Revisions is an ordered list of 1 or 2 revisions. The first is the current revision, and the
   * second is the candidate revision. If a single revision is provided, traffic will be pinned at
   * that revision. "@latest" is a shortcut for usage that refers to the latest created revision by
   * the configuration.
   * @param revisions revisions or {@code null} for none
   */
  public ServiceSpecReleaseType setRevisions(java.util.List<java.lang.String> revisions) {
    this.revisions = revisions;
    return this;
  }

  /**
   * RolloutPercent is the percent of traffic that should be sent to the candidate revision, i.e.
   * the 2nd revision in the revisions list. Valid values are between 0 and 99 inclusive.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getRolloutPercent() {
    return rolloutPercent;
  }

  /**
   * RolloutPercent is the percent of traffic that should be sent to the candidate revision, i.e.
   * the 2nd revision in the revisions list. Valid values are between 0 and 99 inclusive.
   * @param rolloutPercent rolloutPercent or {@code null} for none
   */
  public ServiceSpecReleaseType setRolloutPercent(java.lang.Integer rolloutPercent) {
    this.rolloutPercent = rolloutPercent;
    return this;
  }

  @Override
  public ServiceSpecReleaseType set(String fieldName, Object value) {
    return (ServiceSpecReleaseType) super.set(fieldName, value);
  }

  @Override
  public ServiceSpecReleaseType clone() {
    return (ServiceSpecReleaseType) super.clone();
  }

}


text:
Mini activity indicator - is contained in the spinner and spinner-bounce-middle
    class. The default activity indicator uses the accent color, contained in the
    spinner-accent class.

An alternative activity indicator using the primary color contained in the
    spinner-primary class has also been supplied.

<uxd-snippet [content]="snippets.compiled.sample1Html"></uxd-snippet>


text:
package net.guerra24.infinity.client.graphics;

import static org.lwjgl.opengl.GL11.GL_TRIANGLES;
import static org.lwjgl.opengl.GL11.glBindTexture;
import static org.lwjgl.opengl.GL11.glDrawArrays;
import static org.lwjgl.opengl.GL13.GL_TEXTURE0;
import static org.lwjgl.opengl.GL13.GL_TEXTURE1;
import static org.lwjgl.opengl.GL13.GL_TEXTURE_CUBE_MAP;
import static org.lwjgl.opengl.GL13.glActiveTexture;
import static org.lwjgl.opengl.GL20.glDisableVertexAttribArray;
import static org.lwjgl.opengl.GL20.glEnableVertexAttribArray;
import static org.lwjgl.opengl.GL30.glBindVertexArray;

import net.guerra24.infinity.client.core.InfinityVariables;
import net.guerra24.infinity.client.graphics.shaders.SkyboxShader;
import net.guerra24.infinity.client.resources.GameResources;
import net.guerra24.infinity.client.resources.Loader;
import net.guerra24.infinity.client.resources.models.RawModel;
import net.guerra24.infinity.universal.util.vector.Matrix4f;

/**
 * Skybox Rendering
 *
 * @author Guerra24 <pablo230699@hotmail.com>
 * @category Rendering
 */
public class SkyboxRenderer {
	/**
	 * Skybox Data
	 */
	private final float[] VERTICES = { -InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE,
			-InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE,
			-InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE,
			InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE,

			-InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE,
			-InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE,
			InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE,
			-InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE,

			InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE,
			InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE,
			InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE,
			InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE,

			-InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE,
			InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE,
			InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE,
			-InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE,

			-InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE,
			-InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE,
			InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE,
			-InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE,

			-InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE,
			-InfinityVariables.SIZE, InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE,
			InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE, -InfinityVariables.SIZE,
			InfinityVariables.SIZE, InfinityVariables.SIZE, -InfinityVariables.SIZE, InfinityVariables.SIZE };

	private String[] TEXTURE_FILES = { "day/right", "day/left", "day/top", "day/bottom", "day/front", "day/back" };
	private String[] NIGHT_TEXTURE_FILES = { "night/right", "night/left", "night/top", "night/bottom", "night/front",
			"night/back" };
	private RawModel cube;
	private int texture;
	private int nightTexture;
	private SkyboxShader shader;
	private float time = 0;
	private float blendFactor = 0;

	private int dayTex, nightTex;

	/**
	 * Constructor, Initializes the Skybox model, Textures and Shader
	 *
	 * @param loader
	 *            Game Loader
	 * @param projectionMatrix
	 *            Matrix4f, Projection Matrix
	 */
	public SkyboxRenderer(Loader loader, Matrix4f projectionMatrix) {
		cube = loader.loadToVAO(VERTICES, 3);
		texture = loader.loadCubeMap(TEXTURE_FILES);
		nightTexture = loader.loadCubeMap(NIGHT_TEXTURE_FILES);
		shader = new SkyboxShader();
		shader.start();
		shader.connectTextureUnits();
		shader.loadProjectionMatrix(projectionMatrix);
		shader.stop();
		time = 8000;
	}

	/**
	 * Render the Skybox
	 *
	 * @param camera
	 *            A Camera
	 * @param r
	 *            Fog Red Color
	 * @param g
	 *            Fog Green Color
	 * @param b
	 *            Fog Blue Color
	 * @param delta
	 *            Delta
	 */
	public void render(float r, float g, float b, float delta, GameResources gm) {
		shader.start();
		shader.loadProjectionMatrix(gm.getRenderer().getProjectionMatrix());
		shader.loadViewMatrix(gm.getCamera(), delta);
		shader.loadFog(r, g, b);
		glBindVertexArray(cube.getVaoID());
		glEnableVertexAttribArray(0);
		bindTextures();
		glDrawArrays(GL_TRIANGLES, 0, cube.getVertexCount());
		glDisableVertexAttribArray(0);
		glBindVertexArray(0);
		shader.stop();
	}

	/**
	 * Update world time
	 *
	 * @param delta
	 *            Delta
	 */
	public float update(float delta) {
		time += delta * 10;
		time %= 24000;
		float res = time * 0.015f;
		return res - 90;
	}

	/**
	 * Updates the Skybox Textures
	 *
	 */
	private void bindTextures() {
		if (time >= 0 && time < 5000) {
			dayTex = nightTexture;
			nightTex = nightTexture;
			blendFactor = (time - 0) / (5000 - 0);
		} else if (time >= 5000 && time < 8000) {
			dayTex = nightTexture;
			nightTex = texture;
			blendFactor = (time - 5000) / (8000 - 5000);
		} else if (time >= 8000 && time < 15500) {
			dayTex = texture;
			nightTex = texture;
			blendFactor = 1f;
		} else if (time >= 15500 && time < 18000) {
			dayTex = texture;
			nightTex = nightTexture;
			blendFactor = (time - 15500) / (18000 - 15500);
		} else {
			dayTex = nightTexture;
			nightTex = nightTexture;
			blendFactor = 1f;
		}

		glActiveTexture(GL_TEXTURE0);
		glBindTexture(GL_TEXTURE_CUBE_MAP, dayTex);
		glActiveTexture(GL_TEXTURE1);
		glBindTexture(GL_TEXTURE_CUBE_MAP, nightTex);
		shader.loadBlendFactor(blendFactor);
	}

	/**
	 * Get the blend factor
	 *
	 * @return time
	 */
	public float getBlendFactor() {
		return blendFactor;
	}

	/**
	 * Get the world time
	 *
	 * @return time
	 */
	public float getTime() {
		return time;
	}

	public void setTime(float time) {
		this.time = time;
	}

	public int getDayTexture() {
		return dayTex;
	}

	public int getNightTexture() {
		return nightTex;
	}

}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Security.Authentication;
using System.Threading;
using System.Threading.Tasks;

namespace TypedRest.Endpoints.Generic
{
    /// <summary>
    /// Provides extension methods for <see cref="IIndexerEndpoint{TElementEndpoint}"/> and <see cref="ICollectionEndpoint{TEntity,TElementEndpoint}"/>.
    /// </summary>
    public static class CollectionEndpointExtensions
    {
        /// <summary>
        /// Determines whether the collection contains a specific element.
        /// </summary>
        /// <typeparam name="TElementEndpoint">The type of <see cref="IEndpoint"/> to provide for individual entity.</typeparam>
        /// <param name="endpoint">The collection endpoint containing the element.</param>
        /// <param name="id">The ID identifying the entity in the collection.</param>
        /// <param name="cancellationToken">Used to cancel the request.</param>
        /// <exception cref="AuthenticationException"><see cref="HttpStatusCode.Unauthorized"/></exception>
        /// <exception cref="UnauthorizedAccessException"><see cref="HttpStatusCode.Forbidden"/></exception>
        /// <exception cref="HttpRequestException">Other non-success status code.</exception>
        /// <remarks>This is a convenience method equivalent to combining <see cref="IIndexerEndpoint{TElementEndpoint}.this[string]"/> with <see cref="IElementEndpoint.ExistsAsync"/>.</remarks>
        public static Task<bool> ContainsAsync<TElementEndpoint>(this IIndexerEndpoint<TElementEndpoint> endpoint, string id, CancellationToken cancellationToken = default)
            where TElementEndpoint : IElementEndpoint
            => endpoint[id].ExistsAsync(cancellationToken);

        /// <summary>
        /// Determines whether the collection contains a specific element.
        /// </summary>
        /// <typeparam name="TEntity">The type of individual elements in the collection.</typeparam>
        /// <typeparam name="TElementEndpoint">The type of <see cref="IEndpoint"/> to provide for individual <typeparamref name="TEntity"/>s.</typeparam>
        /// <param name="endpoint">The collection endpoint containing the element.</param>
        /// <param name="element">The element to be checked.</param>
        /// <param name="cancellationToken">Used to cancel the request.</param>
        /// <exception cref="AuthenticationException"><see cref="HttpStatusCode.Unauthorized"/></exception>
        /// <exception cref="UnauthorizedAccessException"><see cref="HttpStatusCode.Forbidden"/></exception>
        /// <exception cref="HttpRequestException">Other non-success status code.</exception>
        /// <remarks>This is a convenience method equivalent to combining <see cref="ICollectionEndpoint{TEntity,TElementEndpoint}.this[TEntity]"/> with <see cref="IElementEndpoint.ExistsAsync"/>.</remarks>
        public static Task<bool> ContainsAsync<TEntity, TElementEndpoint>(this ICollectionEndpoint<TEntity, TElementEndpoint> endpoint, TEntity element, CancellationToken cancellationToken = default)
            where TEntity : class
            where TElementEndpoint : IElementEndpoint<TEntity>
            => endpoint[element].ExistsAsync(cancellationToken);

        /// <summary>
        /// Sets/replaces an existing element in the collection.
        /// </summary>
        /// <typeparam name="TEntity">The type of individual elements in the collection.</typeparam>
        /// <typeparam name="TElementEndpoint">The type of <see cref="IEndpoint"/> to provide for individual <typeparamref name="TEntity"/>s.</typeparam>
        /// <param name="endpoint">The collection endpoint containing the element.</param>
        /// <param name="element">The new state of the element.</param>
        /// <param name="cancellationToken">Used to cancel the request.</param>
        /// <returns>The <typeparamref name="TEntity"/> as returned by the server, possibly with additional fields set. <c>null</c> if the server does not respond with a result entity.</returns>
        /// <exception cref="InvalidDataException"><see cref="HttpStatusCode.BadRequest"/></exception>
        /// <exception cref="AuthenticationException"><see cref="HttpStatusCode.Unauthorized"/></exception>
        /// <exception cref="UnauthorizedAccessException"><see cref="HttpStatusCode.Forbidden"/></exception>
        /// <exception cref="KeyNotFoundException"><see cref="HttpStatusCode.NotFound"/> or <see cref="HttpStatusCode.Gone"/></exception>
        /// <exception cref="HttpRequestException">Other non-success status code.</exception>
        /// <remarks>This is a convenience method equivalent to combining <see cref="ICollectionEndpoint{TEntity,TElementEndpoint}.this[TEntity]"/> with <see cref="IElementEndpoint{TEntity}.SetAsync"/>.</remarks>
        public static Task<TEntity?> SetAsync<TEntity, TElementEndpoint>(this ICollectionEndpoint<TEntity, TElementEndpoint> endpoint, TEntity element, CancellationToken cancellationToken = default)
            where TEntity : class
            where TElementEndpoint : IElementEndpoint<TEntity>
            => endpoint[element].SetAsync(element, cancellationToken);

        /// <summary>
        /// Modifies an existing element in the collection by merging changes on the server-side.
        /// </summary>
        /// <typeparam name="TEntity">The type of individual elements in the collection.</typeparam>
        /// <typeparam name="TElementEndpoint">The type of <see cref="IEndpoint"/> to provide for individual <typeparamref name="TEntity"/>s.</typeparam>
        /// <param name="endpoint">The collection endpoint containing the element.</param>
        /// <param name="element">The <typeparamref name="TEntity"/> data to merge with the existing element.</param>
        /// <param name="cancellationToken">Used to cancel the request.</param>
        /// <returns>The <typeparamref name="TEntity"/> as returned by the server, possibly with additional fields set. <c>null</c> if the server does not respond with a result entity.</returns>
        /// <exception cref="InvalidDataException"><see cref="HttpStatusCode.BadRequest"/></exception>
        /// <exception cref="AuthenticationException"><see cref="HttpStatusCode.Unauthorized"/></exception>
        /// <exception cref="UnauthorizedAccessException"><see cref="HttpStatusCode.Forbidden"/></exception>
        /// <exception cref="KeyNotFoundException"><see cref="HttpStatusCode.NotFound"/> or <see cref="HttpStatusCode.Gone"/></exception>
        /// <exception cref="HttpRequestException">Other non-success status code.</exception>
        /// <remarks>This is a convenience method equivalent to combining <see cref="ICollectionEndpoint{TEntity,TElementEndpoint}.this[TEntity]"/> with <see cref="IElementEndpoint{TEntity}.SetAsync"/>.</remarks>
        public static Task<TEntity?> MergeAsync<TEntity, TElementEndpoint>(this ICollectionEndpoint<TEntity, TElementEndpoint> endpoint, TEntity element, CancellationToken cancellationToken = default)
            where TEntity : class
            where TElementEndpoint : IElementEndpoint<TEntity>
            => endpoint[element].MergeAsync(element, cancellationToken);

        /// <summary>
        /// Deletes an existing element from the collection.
        /// </summary>
        /// <typeparam name="TElementEndpoint">The type of <see cref="IEndpoint"/> to provide for individual entities.</typeparam>
        /// <param name="endpoint">The collection endpoint containing the element.</param>
        /// <param name="id">The ID identifying the entity in the collection.</param>
        /// <param name="cancellationToken">Used to cancel the request.</param>
        /// <exception cref="AuthenticationException"><see cref="HttpStatusCode.Unauthorized"/></exception>
        /// <exception cref="UnauthorizedAccessException"><see cref="HttpStatusCode.Forbidden"/></exception>
        /// <exception cref="KeyNotFoundException"><see cref="HttpStatusCode.NotFound"/> or <see cref="HttpStatusCode.Gone"/></exception>
        /// <exception cref="HttpRequestException">Other non-success status code.</exception>
        /// <remarks>This is a convenience method equivalent to combining <see cref="IIndexerEndpoint{TElementEndpoint}.this[string]"/> with <see cref="IElementEndpoint.DeleteAsync"/>.</remarks>
        public static Task DeleteAsync<TElementEndpoint>(this IIndexerEndpoint<TElementEndpoint> endpoint, string id, CancellationToken cancellationToken = default)
            where TElementEndpoint : IElementEndpoint
            => endpoint[id].DeleteAsync(cancellationToken);

        /// <summary>
        /// Deletes an existing element from the collection.
        /// </summary>
        /// <typeparam name="TEntity">The type of individual elements in the collection.</typeparam>
        /// <typeparam name="TElementEndpoint">The type of <see cref="IEndpoint"/> to provide for individual <typeparamref name="TEntity"/>s.</typeparam>
        /// <param name="endpoint">The collection endpoint containing the element.</param>
        /// <param name="element">The element to be deleted.</param>
        /// <param name="cancellationToken">Used to cancel the request.</param>
        /// <exception cref="AuthenticationException"><see cref="HttpStatusCode.Unauthorized"/></exception>
        /// <exception cref="UnauthorizedAccessException"><see cref="HttpStatusCode.Forbidden"/></exception>
        /// <exception cref="KeyNotFoundException"><see cref="HttpStatusCode.NotFound"/> or <see cref="HttpStatusCode.Gone"/></exception>
        /// <exception cref="HttpRequestException">Other non-success status code.</exception>
        /// <remarks>This is a convenience method equivalent to combining <see cref="ICollectionEndpoint{TEntity,TElementEndpoint}.this[TEntity]"/> with <see cref="IElementEndpoint.DeleteAsync"/>.</remarks>
        public static Task DeleteAsync<TEntity, TElementEndpoint>(this ICollectionEndpoint<TEntity, TElementEndpoint> endpoint, TEntity element, CancellationToken cancellationToken = default)
            where TEntity : class
            where TElementEndpoint : IElementEndpoint<TEntity>
            => endpoint[element].DeleteAsync(cancellationToken);
    }
}


text:
package com.facebook.buck.artifact_cache;

import static org.hamcrest.MatcherAssert.assertThat;

import com.facebook.buck.core.rulekey.RuleKey;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.hash.HashCode;
import com.google.common.io.BaseEncoding;
import com.google.common.io.ByteSource;
import com.google.common.io.ByteStreams;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import org.hamcrest.Matchers;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;

public class HttpArtifactCacheBinaryProtocolTest {

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

  @Test
  public void testCreateMetadataHeader() throws IOException {
    String base64EncodedData =
        "AAAAAQAgMDAwMDAwMDAwMTAwMDAwMDAwMDAwMDgwMDAwMDAwMDAAAAABAANrZXkAAAAFdmFsdWVc/GBY";
    RuleKey ruleKey = new RuleKey("00000000010000000000008000000000");
    String data = "data";
    byte[] metadata =
        HttpArtifactCacheBinaryProtocol.createMetadataHeader(
            ImmutableSet.of(ruleKey),
            ImmutableMap.of("key", "value"),
            ByteSource.wrap(data.getBytes(StandardCharsets.UTF_8)));
    assertThat(metadata, Matchers.equalTo(BaseEncoding.base64().decode(base64EncodedData)));
  }

  @Test
  public void testCreateKeysHeader() throws IOException {
    String base64EncodedData =
        "AAAAAgAgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAIDkwMDAwMDAwMDAwMDAwMDAw"
            + "MDAwMDA4MDAwMDAwMDA1";
    RuleKey ruleKey = new RuleKey("00000000000000000000000000000000");
    RuleKey ruleKey2 = new RuleKey("90000000000000000000008000000005");
    byte[] keysHeader =
        HttpArtifactCacheBinaryProtocol.createKeysHeader(ImmutableSet.of(ruleKey, ruleKey2));
    assertThat(keysHeader, Matchers.equalTo(BaseEncoding.base64().decode(base64EncodedData)));
  }

  @Test
  public void testFetchResponse() throws IOException {
    RuleKey ruleKey = new RuleKey("00000000000000000000000000000000");
    RuleKey ruleKey2 = new RuleKey("90000000000000000000008000000005");
    String data = "data";
    ImmutableMap<String, String> metadata = ImmutableMap.of("metaKey", "metaValue");

    HttpArtifactCacheBinaryProtocol.FetchResponse fetchResponse =
        new HttpArtifactCacheBinaryProtocol.FetchResponse(
            ImmutableSet.of(ruleKey, ruleKey2),
            metadata,
            new ByteSource() {
              @Override
              public InputStream openStream() {
                return new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
              }
            });
    assertThat(fetchResponse.getContentLength(), Matchers.is(110L));

    ByteArrayOutputStream fetchResponseOutputStream = new ByteArrayOutputStream();
    fetchResponse.write(fetchResponseOutputStream);

    ByteArrayInputStream fetchResponseInputStream =
        new ByteArrayInputStream(fetchResponseOutputStream.toByteArray());
    ByteArrayOutputStream fetchResponsePayload = new ByteArrayOutputStream();
    HttpArtifactCacheBinaryProtocol.FetchResponseReadResult responseReadResult =
        HttpArtifactCacheBinaryProtocol.readFetchResponse(
            new DataInputStream(fetchResponseInputStream), fetchResponsePayload);

    assertThat(responseReadResult.getRuleKeys(), Matchers.containsInAnyOrder(ruleKey, ruleKey2));
    assertThat(responseReadResult.getMetadata(), Matchers.equalTo(metadata));
    assertThat(
        fetchResponsePayload.toByteArray(),
        Matchers.equalTo(data.getBytes(StandardCharsets.UTF_8)));
  }

  @Test
  public void testReadFetchResponse() throws IOException {
    String base64EncodedData =
        "AAAALgAAAAEAIDAwMDAwMDAwMDEwMDAwMDAwMDAwMDA4MDAwMDAwMDAwAAAAANcwdr5kYXRh";
    RuleKey ruleKey = new RuleKey("00000000010000000000008000000000");
    String data = "data";

    byte[] expectedData;
    try (ByteArrayOutputStream out = new ByteArrayOutputStream();
        DataOutputStream dataOut = new DataOutputStream(out)) {
      byte[] metadata =
          HttpArtifactCacheBinaryProtocol.createMetadataHeader(
              ImmutableSet.of(ruleKey),
              ImmutableMap.of(),
              ByteSource.wrap(data.getBytes(StandardCharsets.UTF_8)));
      dataOut.writeInt(metadata.length);
      dataOut.write(metadata);
      dataOut.write(data.getBytes(StandardCharsets.UTF_8));
      expectedData = out.toByteArray();
    }
    assertThat(expectedData, Matchers.equalTo(BaseEncoding.base64().decode(base64EncodedData)));

    try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        DataInputStream inputStream = new DataInputStream(new ByteArrayInputStream(expectedData))) {
      HttpArtifactCacheBinaryProtocol.FetchResponseReadResult result =
          HttpArtifactCacheBinaryProtocol.readFetchResponse(inputStream, outputStream);
      assertThat(result.getRuleKeys(), Matchers.contains(ruleKey));
      assertThat(
          outputStream.toByteArray(), Matchers.equalTo(data.getBytes(StandardCharsets.UTF_8)));
      assertThat(result.getActualHashCode(), Matchers.equalTo(HashCode.fromString("d73076be")));
      assertThat(result.getExpectedHashCode(), Matchers.equalTo(HashCode.fromString("d73076be")));
      assertThat(result.getMetadata(), Matchers.anEmptyMap());
      assertThat(result.getResponseSizeBytes(), Matchers.equalTo(4L));
    }
  }

  @Test
  public void testMassiveMetadataHeaderWrite() throws IOException {
    ImmutableMap.Builder<String, String> metadataBuilder = ImmutableMap.builder();
    long metadataSize = 65 * 1024 * 1024;
    StringBuilder valueBuilder = new StringBuilder();
    for (int i = 0; i < 16384; ++i) {
      valueBuilder.append('x');
    }
    String value = valueBuilder.toString();
    long valueLength = value.getBytes(StandardCharsets.UTF_8).length;

    while (metadataSize > 0) {
      String key = "key" + metadataSize;
      metadataSize -= key.getBytes(StandardCharsets.UTF_8).length + valueLength;
      metadataBuilder.put(key, value);
    }

    thrown.expect(IOException.class);
    thrown.expectMessage(Matchers.containsString("too big"));
    HttpArtifactCacheBinaryProtocol.createMetadataHeader(
        ImmutableSet.of(new RuleKey("0000")),
        metadataBuilder.build(),
        ByteSource.wrap("wsad".getBytes(StandardCharsets.UTF_8)));
  }

  @Test
  public void testMassiveMetadataHeaderRead() throws IOException {
    byte[] bytes;
    try (ByteArrayOutputStream out = new ByteArrayOutputStream();
        DataOutputStream dataOut = new DataOutputStream(out)) {
      dataOut.writeInt(Integer.MAX_VALUE);
      bytes = out.toByteArray();
    }

    try (ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes)) {
      thrown.expect(IOException.class);
      thrown.expectMessage(Matchers.containsString("too big"));
      HttpArtifactCacheBinaryProtocol.readFetchResponse(
          new DataInputStream(inputStream), ByteStreams.nullOutputStream());
    }
  }

  @Test
  public void testStoreRequest() throws IOException {
    RuleKey ruleKey = new RuleKey("00000000010000000000008000000000");
    RuleKey ruleKey2 = new RuleKey("90000000000000000000008000000005");
    String data = "data";
    ImmutableMap<String, String> metadata = ImmutableMap.of("metaKey", "metaValue");

    HttpArtifactCacheBinaryProtocol.StoreRequest storeRequest =
        new HttpArtifactCacheBinaryProtocol.StoreRequest(
            ArtifactInfo.builder().addRuleKeys(ruleKey, ruleKey2).setMetadata(metadata).build(),
            new ByteSource() {
              @Override
              public InputStream openStream() {
                return new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
              }
            });

    ByteArrayOutputStream storeRequestOutputStream = new ByteArrayOutputStream();
    storeRequest.write(storeRequestOutputStream);

    ByteArrayOutputStream storeRequestPayloadStream = new ByteArrayOutputStream();
    HttpArtifactCacheBinaryProtocol.StoreResponseReadResult readStoreRequest =
        HttpArtifactCacheBinaryProtocol.readStoreRequest(
            new DataInputStream(new ByteArrayInputStream(storeRequestOutputStream.toByteArray())),
            storeRequestPayloadStream);

    assertThat(readStoreRequest.getRuleKeys(), Matchers.containsInAnyOrder(ruleKey, ruleKey2));
    assertThat(readStoreRequest.getMetadata(), Matchers.equalTo(metadata));
    assertThat(
        storeRequestPayloadStream.toByteArray(),
        Matchers.equalTo(data.getBytes(StandardCharsets.UTF_8)));
  }

  @Test
  public void testWriteStoreRequest() throws IOException {
    String base64EncodedData =
        "AAAAAgAgMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAIDkwMDA"
            + "wMDAwMDAwMDAwMDAwMDAwMDA4MDAwMDAwMDA1AAAAXgAAAAIAIDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDA"
            + "wMDAwACA5MDAwMDAwMDAwMDAwMDAwMDAwMDAwODAwMDAwMDAwNQAAAAEAA2tleQAAAAV2YWx1ZRf0zcZkYXRhZGF"
            + "0YQ==";
    RuleKey ruleKey = new RuleKey("00000000000000000000000000000000");
    RuleKey ruleKey2 = new RuleKey("90000000000000000000008000000005");

    HttpArtifactCacheBinaryProtocol.StoreRequest storeRequest =
        new HttpArtifactCacheBinaryProtocol.StoreRequest(
            ArtifactInfo.builder()
                .addRuleKeys(ruleKey, ruleKey2)
                .setMetadata(ImmutableMap.of("key", "value"))
                .build(),
            new ByteSource() {
              @Override
              public InputStream openStream() {
                return new ByteArrayInputStream("datadata".getBytes(StandardCharsets.UTF_8));
              }
            });

    assertThat(storeRequest.getContentLength(), Matchers.is(178L));

    ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
    HttpArtifactCacheBinaryProtocol.StoreWriteResult writeResult =
        storeRequest.write(byteArrayOutputStream);
    assertThat(
        writeResult.getArtifactContentHashCode(),
        Matchers.equalTo(HashCode.fromString("2c0b14a4")));
    assertThat(writeResult.getArtifactSizeBytes(), Matchers.is(8L));
    byte[] expectedBytes = BaseEncoding.base64().decode(base64EncodedData);
    assertThat(byteArrayOutputStream.toByteArray(), Matchers.equalTo(expectedBytes));
  }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Fish.MovieManager.UI
{
    /// <summary>
    /// WaitingProgress.xaml 的交互逻辑
    /// </summary>
    public partial class WaitingProgress : UserControl
    {
        private Storyboard story;
        public WaitingProgress()
        {
            InitializeComponent();
            this.story = (base.Resources["waiting"] as Storyboard);
        }
        private void Image_Loaded_1(object sender, RoutedEventArgs e)
        {
            this.story.Begin(this.image, true);
        }
        public void Stop()
        {
            base.Dispatcher.BeginInvoke(new Action(() => {
                this.story.Pause(this.image);
                base.Visibility = System.Windows.Visibility.Collapsed;
            }));
        }
    }
}