text:
namespace media {

namespace {

// Compares the priority of the capture formats. Returns true if |lhs| is the
// preferred capture format in comparison with |rhs|. Returns false otherwise.
bool CompareCapability(const VideoCaptureFormat& requested,
                       const CapabilityWin& lhs,
                       const CapabilityWin& rhs) {
  // When 16-bit format or NV12 is requested and available, avoid other formats.
  // If both lhs and rhs are 16-bit, we still need to compare them based on
  // height, width and frame rate.
  const bool use_requested =
      (requested.pixel_format == media::PIXEL_FORMAT_Y16) ||
      (requested.pixel_format == media::PIXEL_FORMAT_NV12);
  if (use_requested &&
      lhs.supported_format.pixel_format != rhs.supported_format.pixel_format) {
    if (lhs.supported_format.pixel_format == requested.pixel_format)
      return true;
    if (rhs.supported_format.pixel_format == requested.pixel_format)
      return false;
  }
  const int diff_height_lhs = std::abs(
      lhs.supported_format.frame_size.height() - requested.frame_size.height());
  const int diff_height_rhs = std::abs(
      rhs.supported_format.frame_size.height() - requested.frame_size.height());
  if (diff_height_lhs != diff_height_rhs)
    return diff_height_lhs < diff_height_rhs;

  const int diff_width_lhs = std::abs(lhs.supported_format.frame_size.width() -
                                      requested.frame_size.width());
  const int diff_width_rhs = std::abs(rhs.supported_format.frame_size.width() -
                                      requested.frame_size.width());
  if (diff_width_lhs != diff_width_rhs)
    return diff_width_lhs < diff_width_rhs;

  const float diff_fps_lhs =
      std::fabs(lhs.supported_format.frame_rate - requested.frame_rate);
  const float diff_fps_rhs =
      std::fabs(rhs.supported_format.frame_rate - requested.frame_rate);
  if (diff_fps_lhs != diff_fps_rhs)
    return diff_fps_lhs < diff_fps_rhs;

  // Compare by internal pixel format to avoid conversions when possible.
  if (lhs.source_pixel_format != rhs.source_pixel_format) {
    // Choose the format with no conversion if possible.
    if (lhs.source_pixel_format == requested.pixel_format)
      return true;
    if (rhs.source_pixel_format == requested.pixel_format)
      return false;
    // Prefer I420<->NV12 conversion over all.
    if ((lhs.source_pixel_format == PIXEL_FORMAT_NV12 &&
         requested.pixel_format == PIXEL_FORMAT_I420) ||
        (lhs.source_pixel_format == PIXEL_FORMAT_I420 &&
         requested.pixel_format == PIXEL_FORMAT_NV12)) {
      return true;
    }
    if ((rhs.source_pixel_format == PIXEL_FORMAT_NV12 &&
         requested.pixel_format == PIXEL_FORMAT_I420) ||
        (rhs.source_pixel_format == PIXEL_FORMAT_I420 &&
         requested.pixel_format == PIXEL_FORMAT_NV12)) {
      return false;
    }
    // YUY2<->NV12 is the next best.
    if ((lhs.source_pixel_format == PIXEL_FORMAT_NV12 &&
         requested.pixel_format == PIXEL_FORMAT_YUY2) ||
        (lhs.source_pixel_format == PIXEL_FORMAT_YUY2 &&
         requested.pixel_format == PIXEL_FORMAT_NV12)) {
      return true;
    }
    if ((rhs.source_pixel_format == PIXEL_FORMAT_NV12 &&
         requested.pixel_format == PIXEL_FORMAT_YUY2) ||
        (rhs.source_pixel_format == PIXEL_FORMAT_YUY2 &&
         requested.pixel_format == PIXEL_FORMAT_NV12)) {
      return false;
    }
  }

  // Deprioritize fake formats to avoid extra conversions.
  if (lhs.source_pixel_format == rhs.source_pixel_format &&
      (lhs.maybe_fake ^ rhs.maybe_fake)) {
    return rhs.maybe_fake;
  }

  return VideoCaptureFormat::ComparePixelFormatPreference(
      lhs.supported_format.pixel_format, rhs.supported_format.pixel_format);
}

}  // namespace

const CapabilityWin& GetBestMatchedCapability(
    const VideoCaptureFormat& requested,
    const CapabilityList& capabilities) {
  DCHECK(!capabilities.empty());
  const CapabilityWin* best_match = &(*capabilities.begin());
  for (const CapabilityWin& capability : capabilities) {
    if (CompareCapability(requested, capability, *best_match)) {
      best_match = &capability;
    }
  }
  return *best_match;
}

}  // namespace media

redpajama_set_name: RedPajamaGithub


text:
<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

$this->title = 'Login';
$this->params['breadcrumbs'][] = $this->title;
?>

    AdminLTE

Sign in to start your session

    <?php $form = ActiveForm::begin(['id' => 'login-form']); ?>
        <?= $form->field($model, 'username', [
            'options' => [
              'tag'         => 'div',
              'class'       => 'form-group field-loginform-username has-feedback required'
            ],
            'template' => '{input}
                          {error}{hint}'
        ])->textInput(['placeholder' => 'Email']);
        ?>

        <?= $form->field($model, 'password', [
            'options' => [
              'tag'         => 'div',
              'class'       => 'form-group field-loginform-username has-feedback required'
            ],
            'template' => '{input}'
        ])->passwordInput(['placeholder' => 'Password']);
        ?>

              <input type="checkbox" name="LoginForm[rememberMe]"> RememberMe

              <?= Html::submitButton('Sign In', ['class' => 'btn btn-primary btn-block btn-flat', 'name' => 'login-button']) ?>

    <?php ActiveForm::end(); ?>

- OR -

       Sign in using Facebook
       Sign in using Google+

    I forgot my password

    Register a new membership


text:
@implementation RKPossibilityTests {
    NSString *_testObject;
    NSError *_testError;
}

- (void)setUp
{
    [super setUp];

    _testObject = @"This is test, only a test";
    _testError = [NSError errorWithDomain:NSPOSIXErrorDomain code:'fail' userInfo:@{NSLocalizedDescriptionKey: @"everything is broken!"}];
}

#pragma mark - States

- (void)testValue
{
    RKPossibility *possibility = [[RKPossibility alloc] initWithValue:_testObject];
    STAssertEquals(possibility.state, kRKPossibilityStateValue, @"RKPossibility is in unexpected state");
    STAssertEqualObjects(possibility.value, _testObject, @"RKPossibility has unexpected value");
    STAssertNil(possibility.error, @"RKPossibility has unexpected error");
}

- (void)testError
{
    RKPossibility *possibility = [[RKPossibility alloc] initWithError:_testError];
    STAssertEquals(possibility.state, kRKPossibilityStateError, @"RKPossibility is in unexpected state");
    STAssertEqualObjects(possibility.error, _testError, @"RKPossibility has unexpected value");
    STAssertNil(possibility.value, @"RKPossibility has unexpected value");
}

- (void)testEmpty
{
    RKPossibility *possibility = [[RKPossibility alloc] initEmpty];
    STAssertEquals(possibility.state, kRKPossibilityStateEmpty, @"RKPossibility is in unexpected state");
    STAssertNil(possibility.value, @"RKPossibility has unexpected value");
    STAssertNil(possibility.error, @"RKPossibility has unexpected error");
}

#pragma mark - Utility Functions

- (void)testRefinement
{
    RKPossibility *possibility = [[RKPossibility alloc] initWithValue:_testObject];
    RKPossibility *refinedPossibility = [possibility refineValue:^RKPossibility *(NSString *value) {
        return [[RKPossibility alloc] initWithValue:[value stringByAppendingString:@" foo"]];
    }];
    STAssertEqualObjects(refinedPossibility.value, @"This is test, only a test foo", @"RKRefinePossibility returned wrong result");
}

- (void)testMatching
{
    RKPossibility *possibility = [[RKPossibility alloc] initWithValue:_testObject];
    [possibility whenValue:^(id value) {
        STAssertTrue(YES, @"RKMatchPossibility failed to match value");
    }];
    [possibility whenEmpty:^{
        STAssertTrue(NO, @"RKMatchPossibility failed to match value");
    }];
    [possibility whenError:^(NSError *error) {
        STAssertTrue(NO, @"RKMatchPossibility failed to match value");
    }];
}

@end


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>pl.oi</groupId>
    <artifactId>TestingEnvironment</artifactId>
    <version>1.0-SNAPSHOT</version>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <packaging>jar</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
    <build>
        <plugins>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>pl.oi.main.Main</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id> <!-- this is used for inheritance merges -->
                        <phase>package</phase> <!-- bind to the packaging phase -->
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>src\main\resources</directory>
                <includes>
                    <include>testing.txt</include>
                </includes>
            </resource>
        </resources>
    </build>

</project>


text:
package charge

import (
	"testing"
	"time"

	stripe "github.com/stripe/stripe-go"
	"github.com/stripe/stripe-go/bitcoinreceiver"
	"github.com/stripe/stripe-go/currency"
	"github.com/stripe/stripe-go/customer"
	"github.com/stripe/stripe-go/refund"
	"github.com/stripe/stripe-go/token"
	. "github.com/stripe/stripe-go/utils"
)

func init() {
	stripe.Key = GetTestKey()
}

func TestChargeNew(t *testing.T) {
	chargeParams := &stripe.ChargeParams{
		Amount:    1000,
		Currency:  currency.USD,
		Statement: "statement",
		Email:     "a@b.com",
		Shipping: &stripe.ShippingDetails{
			Name: "Shipping Name",
			Address: stripe.Address{
				Line1: "One Street",
				Line2: "Apt 1",
				City:  "Somewhere",
				State: "SW",
				Zip:   "10044",
			},
		},
	}
	chargeParams.SetSource(&stripe.CardParams{
		Name:   "Stripe Tester",
		Number: "378282246310005",
		Month:  "06",
		Year:   "20",
	})

	target, err := New(chargeParams)

	if err != nil {
		t.Error(err)
	}

	if target.Amount != chargeParams.Amount {
		t.Errorf("Amount %v does not match expected amount %v\n", target.Amount, chargeParams.Amount)
	}

	if target.Currency != chargeParams.Currency {
		t.Errorf("Currency %q does not match expected currency %q\n", target.Currency, chargeParams.Currency)
	}

	if target.Source.Card.Name != chargeParams.Source.Card.Name {
		t.Errorf("Card name %q does not match expected name %q\n", target.Source.Card.Name, chargeParams.Source.Card.Name)
	}

	if target.Statement != chargeParams.Statement {
		t.Errorf("Statement description %q does not match expected description %v\n", target.Statement, chargeParams.Statement)
	}

	if target.Email != chargeParams.Email {
		t.Errorf("Email %q does not match expected email %v\n", target.Email, chargeParams.Email)
	}

	if target.Shipping.Name != chargeParams.Shipping.Name {
		t.Errorf("Shipping name %q does not match expected name %v\n", target.Shipping.Name, chargeParams.Shipping.Name)
	}
	if target.Shipping.Address.Line2 != chargeParams.Shipping.Address.Line2 {
		t.Errorf("Shipping address line 2 %q does not match expected address line 2 %v\n", target.Shipping.Address.Line2, chargeParams.Shipping.Address.Line2)
	}
	if target.Shipping.Address.City != chargeParams.Shipping.Address.City {
		t.Errorf("Shipping address city %q does not match expected address city %v\n", target.Shipping.Address.City, chargeParams.Shipping.Address.City)
	}
	if target.Shipping.Address.State != chargeParams.Shipping.Address.State {
		t.Errorf("Shipping address state %q does not match expected address state %v\n", target.Shipping.Address.State, chargeParams.Shipping.Address.State)
	}
	if target.Shipping.Address.Zip != chargeParams.Shipping.Address.Zip {
		t.Errorf("Shipping address zip %q does not match expected address zip %v\n", target.Shipping.Address.Zip, chargeParams.Shipping.Address.Zip)
	}
}

func TestWithoutIdempotentTwoDifferentCharges(t *testing.T) {
	chargeParams := &stripe.ChargeParams{
		Amount:    1000,
		Currency:  currency.USD,
		Statement: "statement",
		Email:     "a@b.com",
	}
	chargeParams.SetSource(&stripe.CardParams{
		Name:   "Stripe Tester",
		Number: "378282246310005",
		Month:  "06",
		Year:   "20",
	})

	if chargeParams.Params.IdempotencyKey != "" {
		t.Errorf("The default value of a Params.IdempotencyKey was not blank, and it needs to be. (%q).", chargeParams.Params.IdempotencyKey)
	}

	first, err := New(chargeParams)

	if err != nil {
		t.Error(err)
	}

	second, err := New(chargeParams)

	if err != nil {
		t.Error(err)
	}

	if first.ID == second.ID {
		t.Errorf("Created two charges with no Idempotency Key (%s), but they resulted in charges with the same IDs (%q and %q).\n", chargeParams.Params.IdempotencyKey, first.ID, second.ID)
	}
}

func TestChargeNewWithCustomerAndCard(t *testing.T) {
	customerParams := &stripe.CustomerParams{}
	customerParams.SetSource(&stripe.CardParams{
		Number: "378282246310005",
		Month:  "06",
		Year:   "20",
	})

	cust, _ := customer.New(customerParams)

	chargeParams := &stripe.ChargeParams{
		Amount:    1000,
		Currency:  currency.USD,
		Customer:  cust.ID,
		Statement: "statement",
		Email:     "a@b.com",
	}
	chargeParams.SetSource(cust.Sources.Values[0].Card.ID)

	target, err := New(chargeParams)

	if err != nil {
		t.Error(err)
	}

	if target.Amount != chargeParams.Amount {
		t.Errorf("Amount %v does not match expected amount %v\n", target.Amount, chargeParams.Amount)
	}

	if target.Currency != chargeParams.Currency {
		t.Errorf("Currency %q does not match expected currency %q\n", target.Currency, chargeParams.Currency)
	}

	if target.Customer.ID != cust.ID {
		t.Errorf("Customer ID %q doesn't match expected customer ID %q", target.Customer.ID, cust.ID)
	}

	if target.Source.Card.ID != cust.Sources.Values[0].Card.ID {
		t.Errorf("Card ID %q doesn't match expected card ID %q", target.Source.Card.ID, cust.Sources.Values[0].Card.ID)
	}

}

func TestChargeNewWithToken(t *testing.T) {
	tokenParams := &stripe.TokenParams{
		Card: &stripe.CardParams{
			Number: "4242424242424242",
			Month:  "10",
			Year:   "20",
		},
	}

	tok, _ := token.New(tokenParams)

	chargeParams := &stripe.ChargeParams{
		Amount:   1000,
		Currency: currency.USD,
	}

	chargeParams.SetSource(tok.ID)

	target, err := New(chargeParams)

	if err != nil {
		t.Error(err)
	}

	if target.Amount != chargeParams.Amount {
		t.Errorf("Amount %v does not match expected amount %v\n", target.Amount, chargeParams.Amount)
	}

	if target.Currency != chargeParams.Currency {
		t.Errorf("Currency %q does not match expected currency %q\n", target.Currency, chargeParams.Currency)
	}

	if target.Source.Card.ID != tok.Card.ID {
		t.Errorf("Card Id %q doesn't match card id %q of token %q", target.Source.Card.ID, tok.Card.ID, tok.ID)
	}
}

func TestChargeGet(t *testing.T) {
	chargeParams := &stripe.ChargeParams{
		Amount:   1001,
		Currency: currency.USD,
	}

	chargeParams.SetSource(&stripe.CardParams{
		Number: "378282246310005",
		Month:  "06",
		Year:   "20",
	})

	res, _ := New(chargeParams)

	target, err := Get(res.ID, nil)

	if err != nil {
		t.Error(err)
	}

	if target.ID != res.ID {
		t.Errorf("Charge id %q does not match expected id %q\n", target.ID, res.ID)
	}
}

func TestChargeUpdate(t *testing.T) {
	chargeParams := &stripe.ChargeParams{
		Amount:   1002,
		Currency: currency.USD,
		Desc:     "original description",
	}

	chargeParams.SetSource(&stripe.CardParams{
		Number: "378282246310005",
		Month:  "06",
		Year:   "20",
	})

	res, _ := New(chargeParams)

	if res.Desc != chargeParams.Desc {
		t.Errorf("Original description %q does not match expected description %q\n", res.Desc, chargeParams.Desc)
	}

	updated := &stripe.ChargeParams{
		Desc: "updated description",
	}

	target, err := Update(res.ID, updated)

	if err != nil {
		t.Error(err)
	}

	if target.Desc != updated.Desc {
		t.Errorf("Updated description %q does not match expected description %q\n", target.Desc, updated.Desc)
	}
}

func TestChargeCapture(t *testing.T) {
	chargeParams := &stripe.ChargeParams{
		Amount:    1004,
		Currency:  currency.USD,
		NoCapture: true,
	}

	chargeParams.SetSource(&stripe.CardParams{
		Number: "378282246310005",
		Month:  "06",
		Year:   "20",
	})

	res, _ := New(chargeParams)

	if res.Captured {
		t.Errorf("The charge should not have been captured\n")
	}

	// full capture
	target, err := Capture(res.ID, nil)

	if err != nil {
		t.Error(err)
	}

	if !target.Captured {
		t.Errorf("Expected to have captured this charge after full capture\n")
	}

	res, err = New(chargeParams)

	// partial capture
	capture := &stripe.CaptureParams{
		Amount: 554,
		Email:  "a@b.com",
	}

	target, err = Capture(res.ID, capture)

	if err != nil {
		t.Error(err)
	}

	if !target.Captured {
		t.Errorf("Expected to have captured this charge after partial capture\n")
	}

	if target.AmountRefunded != chargeParams.Amount-capture.Amount {
		t.Errorf("Refunded amount %v does not match expected amount %v\n", target.AmountRefunded, chargeParams.Amount-capture.Amount)
	}

	if target.Email != capture.Email {
		t.Errorf("Email %q does not match expected email %v\n", target.Email, capture.Email)
	}
}

func TestChargeList(t *testing.T) {
	params := &stripe.ChargeListParams{}
	params.Filters.AddFilter("limit", "", "5")
	params.Single = true

	i := List(params)
	for i.Next() {
		if i.Charge() == nil {
			t.Error("No nil values expected")
		}

		if i.Meta() == nil {
			t.Error("No metadata returned")
		}
	}
	if err := i.Err(); err != nil {
		t.Error(err)
	}
}

func TestMarkFraudulent(t *testing.T) {
	chargeParams := &stripe.ChargeParams{
		Amount:    1000,
		Currency:  currency.USD,
		Statement: "statement",
		Email:     "a@b.com",
	}
	chargeParams.SetSource(&stripe.CardParams{
		Name:   "Stripe Tester",
		Number: "378282246310005",
		Month:  "06",
		Year:   "20",
	})

	target, _ := New(chargeParams)
	refund.New(&stripe.RefundParams{Charge: target.ID})

	ch, _ := MarkFraudulent(target.ID)

	if ch.FraudDetails.UserReport != ReportFraudulent {
		t.Error("UserReport was not fraudulent for a charge marked as fraudulent")
	}
}

func TestMarkSafe(t *testing.T) {
	chargeParams := &stripe.ChargeParams{
		Amount:    1000,
		Currency:  currency.USD,
		Statement: "statement",
		Email:     "a@b.com",
	}
	chargeParams.SetSource(&stripe.CardParams{
		Name:   "Stripe Tester",
		Number: "378282246310005",
		Month:  "06",
		Year:   "20",
	})

	target, _ := New(chargeParams)

	ch, _ := MarkSafe(target.ID)

	if ch.FraudDetails.UserReport != ReportSafe {
		t.Error("UserReport was not safe for a charge marked as safe: ",
			ch.FraudDetails.UserReport)
	}
}

func TestChargeSourceForCard(t *testing.T) {
	chargeParams := &stripe.ChargeParams{
		Amount:    1000,
		Currency:  currency.USD,
		Statement: "statement",
		Email:     "a@b.com",
	}
	chargeParams.SetSource(&stripe.CardParams{
		Name:   "Stripe Tester",
		Number: "378282246310005",
		Month:  "06",
		Year:   "20",
	})

	ch, _ := New(chargeParams)

	if ch.Source == nil {
		t.Error("Source is nil for Charge `source` property created by a Card")
	}

	if ch.Source.Type != stripe.PaymentSourceCard {
		t.Error("Source Type for Charge created by Card should be `card`")
	}

	card := ch.Source.Card

	if len(card.ID) == 0 {
		t.Error("Source ID is nil for Charge `source` Card property")
	}

	if card.Display() != "American Express ending in 0005" {
		t.Error("Display value did not match expectation")
	}
}

func TestChargeSourceForBitcoinReceiver(t *testing.T) {
	bitcoinReceiverParams := &stripe.BitcoinReceiverParams{
		Amount:   1000,
		Currency: currency.USD,
		Email:    "do+fill_now@stripe.com",
		Desc:     "some details",
	}

	receiver, _ := bitcoinreceiver.New(bitcoinReceiverParams)

	chargeParams := &stripe.ChargeParams{
		Amount:   1000,
		Currency: currency.USD,
		Email:    "do+fill_now@stripe.com",
	}

	chargeParams.SetSource(receiver.ID)

	ch, _ := New(chargeParams)

	if len(ch.ID) == 0 {
		t.Error("ID is nil for Charge")
	}

	if ch.Source == nil {
		t.Error("Source is nil for Charge, should be BitcoinReceiver property")
	}

	if ch.Source.Type != stripe.PaymentSourceBitcoinReceiver {
		t.Error("Source Type for Charge created by BitcoinReceiver should be `bitcoin_receiver`")
	}

	rreceiver := ch.Source.BitcoinReceiver

	if len(rreceiver.ID) == 0 {
		t.Error("Source ID is nil for Charge `source` BitcoinReceiver property")
	}

	if rreceiver.Amount == 0 {
		t.Error("Amount is empty for Charge `source` BitcoinReceiver property")
	}

	if rreceiver.Display() != "Filled bitcoin receiver (1000/1000 usd)" {
		t.Error("Display value did not match expectation")
	}
}

func newDisputedCharge() (*stripe.Charge, error) {
	chargeParams := &stripe.ChargeParams{
		Amount:   1001,
		Currency: currency.USD,
	}

	chargeParams.SetSource(&stripe.CardParams{
		Number: "4000000000000259",
		Month:  "06",
		Year:   "20",
	})

	res, err := New(chargeParams)
	if err != nil {
		return nil, err
	}

	target, err := Get(res.ID, nil)

	if err != nil {
		return target, err
	}

	for target.Dispute == nil {
		time.Sleep(time.Second * 10)
		target, err = Get(res.ID, nil)
		if err != nil {
			return target, err
		}
	}
	return target, err
}

// Use one large test here to avoid needing to create multiple disputed charges
func TestUpdateDispute(t *testing.T) {
	ch, err := newDisputedCharge()
	if err != nil {
		t.Fatal(err)
	}

	disputeParams := &stripe.DisputeParams{
		Evidence: &stripe.DisputeEvidenceParams{
			ProductDesc: "original description",
		},
	}

	dp, err := UpdateDispute(ch.ID, disputeParams)
	if err != nil {
		t.Error(err)
	}

	if dp.Evidence.ProductDesc != disputeParams.Evidence.ProductDesc {
		t.Errorf("Original description %q does not match expected description %q\n",
			dp.Evidence.ProductDesc, disputeParams.Evidence.ProductDesc)
	}
}

func TestCheckClose(t *testing.T) {
	ch, err := newDisputedCharge()
	if err != nil {
		t.Fatal(err)
	}

	dp, err := CloseDispute(ch.ID)
	if err != nil {
		t.Error(err)
	}

	if dp.Status != "lost" {
		t.Errorf("Dispute status %q does not match expected status lost\n", dp.Status)
	}
}


text:
package com.navercorp.pinpoint.bootstrap.plugin.request.method;

import com.navercorp.pinpoint.bootstrap.context.MethodDescriptor;
import com.navercorp.pinpoint.common.trace.MethodType;
import com.navercorp.pinpoint.common.util.LineNumber;

/**
 * @author jaehong.kim
 */
public class ServletSyncMethodDescriptor implements MethodDescriptor {
    private int apiId = 0;

    @Override
    public String getMethodName() {
        return "";
    }

    @Override
    public String getClassName() {
        return "";
    }

    @Override
    public String[] getParameterTypes() {
        return null;
    }

    @Override
    public String[] getParameterVariableName() {
        return null;
    }

    @Override
    public String getParameterDescriptor() {
        return "()";
    }

    @Override
    public int getLineNumber() {
        return LineNumber.NO_LINE_NUMBER;
    }

    @Override
    public String getFullName() {
        return "com.navercorp.pinpoint.bootstrap.plugin.request.method.ServletSyncMethodDescriptor.invoke()";
    }

    @Override
    public void setApiId(int apiId) {
        this.apiId = apiId;
    }

    @Override
    public int getApiId() {
        return apiId;
    }

    @Override
    public String getApiDescriptor() {
        return "Servlet Process";
    }

    public int getType() {
        return MethodType.WEB_REQUEST;
    }

}


text:
/* required styles */

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	  -webkit-user-drag: none;
	}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
	image-rendering: -webkit-optimize-contrast;
	}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg,
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer {
	max-width: none !important;
	max-height: none !important;
	}

.leaflet-container.leaflet-touch-zoom {
	-ms-touch-action: pan-x pan-y;
	touch-action: pan-x pan-y;
	}
.leaflet-container.leaflet-touch-drag {
	-ms-touch-action: pinch-zoom;
	/* Fallback for FF which doesn't support pinch-zoom */
	touch-action: none;
	touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
	-ms-touch-action: none;
	touch-action: none;
}
.leaflet-container {
	-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	z-index: 800;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	}

.leaflet-pane         { z-index: 400; }

.leaflet-tile-pane    { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane  { z-index: 500; }
.leaflet-marker-pane  { z-index: 600; }
.leaflet-tooltip-pane   { z-index: 650; }
.leaflet-popup-pane   { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg    { z-index: 200; }

.leaflet-vml-shape {
	width: 1px;
	height: 1px;
	}
.lvml {
	behavior: url(#default#VML);
	display: inline-block;
	position: absolute;
	}

/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 800;
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}
.leaflet-top,
.leaflet-bottom {
	position: absolute;
	z-index: 1000;
	pointer-events: none;
	}
.leaflet-top {
	top: 0;
	}
.leaflet-right {
	right: 0;
	}
.leaflet-bottom {
	bottom: 0;
	}
.leaflet-left {
	left: 0;
	}
.leaflet-control {
	float: left;
	clear: both;
	}
.leaflet-right .leaflet-control {
	float: right;
	}
.leaflet-top .leaflet-control {
	margin-top: 10px;
	}
.leaflet-bottom .leaflet-control {
	margin-bottom: 10px;
	}
.leaflet-left .leaflet-control {
	margin-left: 10px;
	}
.leaflet-right .leaflet-control {
	margin-right: 10px;
	}

/* zoom and fade animations */

.leaflet-fade-anim .leaflet-tile {
	will-change: opacity;
	}
.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	   -moz-transition: opacity 0.2s linear;
	     -o-transition: opacity 0.2s linear;
	        transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}
.leaflet-zoom-animated {
	-webkit-transform-origin: 0 0;
	    -ms-transform-origin: 0 0;
	        transform-origin: 0 0;
	}
.leaflet-zoom-anim .leaflet-zoom-animated {
	will-change: transform;
	}
.leaflet-zoom-anim .leaflet-zoom-animated {
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
	     -o-transition:      -o-transform 0.25s cubic-bezier(0,0,0.25,1);
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
	-webkit-transition: none;
	   -moz-transition: none;
	     -o-transition: none;
	        transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}

/* cursors */

.leaflet-interactive {
	cursor: pointer;
	}
.leaflet-grab {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
	cursor: crosshair;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
	cursor: move;
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	}

/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
	pointer-events: none;
	}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive {
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline: 0;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-container a.leaflet-active {
	outline: 2px solid orange;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}

/* general typography */
.leaflet-container {
	font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
	}

/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a,
.leaflet-bar a:hover {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}

.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {
	font-size: 22px;
	}

/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: url(images/layers.png);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(images/layers-2x.png);
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-scrollbar {
	overflow-y: scroll;
	overflow-x: hidden;
	padding-right: 5px;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* Default icon URLs */
.leaflet-default-icon-path {
	background-image: url(images/marker-icon.png);
	}

/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.7);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover {
	text-decoration: underline;
	}
.leaflet-container .leaflet-control-attribution,
.leaflet-container .leaflet-control-scale {
	font-size: 11px;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	font-size: 11px;
	white-space: nowrap;
	overflow: hidden;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;

	background: #fff;
	background: rgba(255, 255, 255, 0.5);
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}

/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	margin-bottom: 20px;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 19px;
	line-height: 1.4;
	}
.leaflet-popup-content p {
	margin: 18px 0;
	}
.leaflet-popup-tip-container {
	width: 40px;
	height: 20px;
	position: absolute;
	left: 50%;
	margin-left: -20px;
	overflow: hidden;
	pointer-events: none;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;

	-webkit-transform: rotate(45deg);
	   -moz-transform: rotate(45deg);
	    -ms-transform: rotate(45deg);
	     -o-transform: rotate(45deg);
	        transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;
	color: #333;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	padding: 4px 4px 0 0;
	border: none;
	text-align: center;
	width: 18px;
	height: 14px;
	font: 16px/14px Tahoma, Verdana, sans-serif;
	color: #c3c3c3;
	text-decoration: none;
	font-weight: bold;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover {
	color: #999;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	border-bottom: 1px solid #ddd;
	border-top: 1px solid #ddd;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}
.leaflet-oldie .leaflet-popup-tip-container {
	margin-top: -1px;
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}

/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}

/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-clickable {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}

/***********************************************
    jquery-scroll-container.scss,

    (c) 2017, FCOO

    https://github.com/FCOO/jquery-scroll-container
    https://github.com/FCOO

    USING MODIFIED VERSIONS OF THE STYLE
    FROM PERFECT-SCROLLBAR
    https://github.com/noraesae/perfect-scrollbar

************************************************/
/***********************************************
    _jquery-scroll-container-variables.scss,

    (c) 2017, FCOO

    https://github.com/FCOO/jquery-scroll-container
    https://github.com/FCOO

    USING MODIFIED VERSIONS OF THE STYLE
    FROM PERFECT-SCROLLBAR
    https://github.com/noraesae/perfect-scrollbar

************************************************/
/****************************************************
*****************************************************
SHAPE AND POSITION
*****************************************************
****************************************************/
.ps {
  /*1*/
  position: relative;
  -ms-touch-action: auto;
  touch-action: auto;
  overflow: hidden !important;
  -ms-overflow-style: none; }
  @supports (-ms-overflow-style: none) {
    .ps {
      overflow: auto !important; } }
  @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    .ps {
      overflow: auto !important; } }
  .ps.ps--active-x > .ps__scrollbar-x-rail,
  .ps.ps--active-y > .ps__scrollbar-y-rail {
    display: block; }
  .ps > .ps__scrollbar-x-rail, .ps > .ps__scrollbar-y-rail {
    display: none;
    position: absolute; }
  .ps > .ps__scrollbar-x-rail > .ps__scrollbar-x,
  .ps > .ps__scrollbar-x-rail > .ps__scrollbar-x-bg,
  .ps > .ps__scrollbar-y-rail > .ps__scrollbar-y,
  .ps > .ps__scrollbar-y-rail > .ps__scrollbar-y-bg {
    position: absolute;
    z-index: 100;
    background-clip: content-box;
    box-sizing: border-box;
    padding: 0.1875rem; }
    .ps > .ps__scrollbar-x-rail > .ps__scrollbar-x:after,
    .ps > .ps__scrollbar-x-rail > .ps__scrollbar-x-bg:after,
    .ps > .ps__scrollbar-y-rail > .ps__scrollbar-y:after,
    .ps > .ps__scrollbar-y-rail > .ps__scrollbar-y-bg:after {
      display: block;
      box-sizing: border-box;
      width: 100%;
      height: 100%;
      content: "";
      border-radius: 0.09375rem;
      transition: background-color .2s linear, height .2s linear, width .2s ease-in-out, border-radius .2s ease-in-out; }
  .ps > .ps__scrollbar-x-rail {
    bottom: 0;
    height: 0.5625rem; }
    .ps > .ps__scrollbar-x-rail > .ps__scrollbar-x,
    .ps > .ps__scrollbar-x-rail > .ps__scrollbar-x-bg {
      bottom: 0;
      height: 0.5625rem;
      padding-left: 0;
      padding-right: 0; }
    .ps > .ps__scrollbar-x-rail > .ps__scrollbar-x-bg {
      width: 100%; }
  .ps > .ps__scrollbar-y-rail {
    right: 0;
    width: 0.5625rem; }
    .ps > .ps__scrollbar-y-rail > .ps__scrollbar-y,
    .ps > .ps__scrollbar-y-rail > .ps__scrollbar-y-bg {
      right: 0;
      width: 0.5625rem;
      padding-top: 0;
      padding-bottom: 0; }
    .ps > .ps__scrollbar-y-rail > .ps__scrollbar-y-bg {
      height: 100%; }

/****************************************************
*****************************************************
COLOR AND OPACITY
*****************************************************
****************************************************/
/*Normal*/
.ps .ps__scrollbar-x, .ps .ps__scrollbar-y,
.ps .ps__scrollbar-x-bg, .ps .ps__scrollbar-y-bg {
  transition: padding .2s ease-in-out; }
  .ps .ps__scrollbar-x:after, .ps .ps__scrollbar-y:after,
  .ps .ps__scrollbar-x-bg:after, .ps .ps__scrollbar-y-bg:after {
    transition: opacity .2s ease-in-out, background-color .2s ease-in-out, padding .2s ease-in-out, border-radius .2s ease-in-out; }

.ps .ps__scrollbar-x:after, .ps .ps__scrollbar-y:after {
  background-color: rgba(0, 0, 0, 0.2); }

.ps .ps__scrollbar-x-bg:after, .ps .ps__scrollbar-y-bg:after {
  background-color: transparent; }

.no-touchevents .ps {
  /* Hover content */
  /* Hover scrollbar (bar or bar-bg) */
  /* Dragging scrollbar */ }
  .no-touchevents .ps:hover .ps__scrollbar-x:after, .no-touchevents .ps:hover .ps__scrollbar-y:after {
    background-color: rgba(0, 0, 0, 0.29); }
  .no-touchevents .ps:hover .ps__scrollbar-x-bg:after, .no-touchevents .ps:hover .ps__scrollbar-y-bg:after {
    background-color: rgba(0, 0, 0, 0.15); }
  .no-touchevents .ps .ps__scrollbar-x-bg:hover ~ .ps__scrollbar-x, .no-touchevents .ps .ps__scrollbar-x:hover {
    padding-top: 0.0625rem;
    padding-bottom: 0.0625rem; }
    .no-touchevents .ps .ps__scrollbar-x-bg:hover ~ .ps__scrollbar-x:after, .no-touchevents .ps .ps__scrollbar-x:hover:after {
      background-color: #8F8F8F;
      opacity: 1; }
    .no-touchevents .ps .ps__scrollbar-x-bg:hover ~ .ps__scrollbar-x:after, .no-touchevents .ps .ps__scrollbar-x:hover:after {
      border-radius: 0.21875rem; }
  .no-touchevents .ps .ps__scrollbar-y-bg:hover ~ .ps__scrollbar-y, .no-touchevents .ps .ps__scrollbar-y:hover {
    padding-left: 0.0625rem;
    padding-right: 0.0625rem; }
    .no-touchevents .ps .ps__scrollbar-y-bg:hover ~ .ps__scrollbar-y:after, .no-touchevents .ps .ps__scrollbar-y:hover:after {
      background-color: #8F8F8F;
      opacity: 1; }
    .no-touchevents .ps .ps__scrollbar-y-bg:hover ~ .ps__scrollbar-y:after, .no-touchevents .ps .ps__scrollbar-y:hover:after {
      border-radius: 0.21875rem; }
  .no-touchevents .ps.ps--in-scrolling .ps__scrollbar-x {
    padding-top: 0.0625rem;
    padding-bottom: 0.0625rem; }
    .no-touchevents .ps.ps--in-scrolling .ps__scrollbar-x:after {
      background-color: #616161;
      opacity: 1; }
    .no-touchevents .ps.ps--in-scrolling .ps__scrollbar-x:after {
      border-radius: 0.21875rem; }
  .no-touchevents .ps.ps--in-scrolling .ps__scrollbar-y {
    padding-left: 0.0625rem;
    padding-right: 0.0625rem; }
    .no-touchevents .ps.ps--in-scrolling .ps__scrollbar-y:after {
      background-color: #616161;
      opacity: 1; }
    .no-touchevents .ps.ps--in-scrolling .ps__scrollbar-y:after {
      border-radius: 0.21875rem; }
  .no-touchevents .ps.ps--in-scrolling .ps__scrollbar-x-bg:after, .no-touchevents .ps.ps--in-scrolling .ps__scrollbar-y-bg:after {
    background-color: rgba(0, 0, 0, 0.3); }

.jquery-scroll-container {
  position: relative;
  z-index: 101;
  background-color: transparent;
  padding: 0;
  margin: 0; }
  .scrollbar-horizontal .jquery-scroll-container {
    margin-bottom: 0.5625rem; }
  .scrollbar-vertical .jquery-scroll-container {
    margin-left: 0.5625rem;
    margin-right: 0.5625rem; }

.ps {
  /*2*/ }
  .ps .ps__scrollbar-y-rail {
    width: 100%; }
  .ps .ps__scrollbar-x-rail {
    height: 100%; }
  .ps .ps__scrollbar-x-rail:before, .ps .ps__scrollbar-x-rail:after, .ps .ps__scrollbar-y-rail:before, .ps .ps__scrollbar-y-rail:after {
    content: "";
    position: absolute;
    display: none;
    background: transparent;
    z-index: 1000;
    transition: box-shadow 0.1s linear; }
  .ps.scrollbar-horizontal .ps__scrollbar-x-rail:before, .ps.scrollbar-horizontal .ps__scrollbar-x-rail:after {
    top: 0;
    bottom: 0;
    width: 0.375rem; }
  .ps.scrollbar-horizontal .ps__scrollbar-x-rail:before {
    left: 0; }
  .ps.scrollbar-horizontal .ps__scrollbar-x-rail:after {
    right: 0; }
  .ps.scrollbar-horizontal .ps__scrollbar-x-rail.shadow-left:before {
    display: inline-block;
    box-shadow: inset 0.375rem 0 0.375rem -0.25rem rgba(0, 0, 0, 0.5), inset -0.375rem 0 0.375rem -0.25rem transparent; }
  .ps.scrollbar-horizontal .ps__scrollbar-x-rail.shadow-right:after {
    display: inline-block;
    box-shadow: inset 0.375rem 0 0.375rem -0.25rem transparent, inset -0.375rem 0 0.375rem -0.25rem rgba(0, 0, 0, 0.5); }
  .ps.scrollbar-vertical .ps__scrollbar-y-rail:before, .ps.scrollbar-vertical .ps__scrollbar-y-rail:after {
    left: 0;
    right: 0;
    height: 0.375rem; }
  .ps.scrollbar-vertical .ps__scrollbar-y-rail:before {
    top: 0; }
  .ps.scrollbar-vertical .ps__scrollbar-y-rail:after {
    bottom: 0; }
  .ps.scrollbar-vertical .ps__scrollbar-y-rail.shadow-top:before {
    display: inline-block;
    box-shadow: inset 0 0.375rem 0.375rem -0.25rem rgba(0, 0, 0, 0.5), inset 0 -0.375rem 0.375rem -0.25rem transparent; }
  .ps.scrollbar-vertical .ps__scrollbar-y-rail.shadow-bottom:after {
    display: inline-block;
    box-shadow: inset 0 0.375rem 0.375rem -0.25rem transparent, inset 0 -0.375rem 0.375rem -0.25rem rgba(0, 0, 0, 0.5); }

/***********************************************
    leaflet-control-fa-button.scss,

    (c) 2017, FCOO

    https://github.com/FCOO/leaflet-control-fa-button
    https://github.com/FCOO

************************************************/
.leaflet-bar a i.fa {
  line-height: inherit; }

.leaflet-control-fa-button a {
  font-size: 1.3333em;
  cursor: default; }
  .leaflet-touch .leaflet-control-fa-button a {
    font-size: 1.5384230769em; }

/***********************************************
	leaflet-control-topcenter.scss,

	(c) 2016, FCOO

	https://github.com/FCOO/leaflet-control-topcenter
	https://github.com/FCOO

************************************************/
/* control positioning */
.leaflet-center {
  position: relative !important;
  left: 0;
  right: 0;
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center; }
  .leaflet-center .leaflet-control {
    bottom: 0; }

.leaflet-control-container .leaflet-control-bottomcenter {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0; }

/***********************************************
leaflet-control-box.scss, Create Leaflet Control in a box with optional icons and size-toggle

    (c) 2015, FCOO

    https://github.com/FCOO/leaflet-control-box
    https://github.com/FCOO

************************************************/
.leaflet-control-container,
.leaflet-left.leaflet-top,
.leaflet-right.leaflet-top {
  height: 100%; }

.leaflet-control-box-container {
  box-sizing: border-box;
  background-color: white;
  display: flex;
  flex-direction: column;
  cursor: default; }
  .leaflet-control-box-container.hide-when-minimized:not(.maximized) {
    display: none; }
  .leaflet-control-box-container.maximized a.open {
    display: none; }
  .leaflet-control-box-container.maximized .leaflet-control-box-header {
    display: block; }
  .leaflet-control-box-container .leaflet-control-box-header {
    display: none;
    flex: 0 0 auto;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    line-height: 1.1;
    color: inherit;
    border-bottom: 1px solid gray;
    height: 16px;
    padding: 2px 4px;
    margin: 0;
    cursor: default; }
    .leaflet-control-box-container .leaflet-control-box-header i:first-child {
      float: left;
      margin-right: 4px; }
    .leaflet-control-box-container .leaflet-control-box-header i:last-child {
      float: right; }
      .leaflet-control-box-container .leaflet-control-box-header i:last-child:hover {
        color: red; }
  .leaflet-control-box-container.maximized .leaflet-control-box-content-container {
    display: block;
    flex: 1 1 auto; }
  .leaflet-control-box-container .leaflet-control-box-content-container {
    display: none;
    box-sizing: border-box;
    padding: 4px; }
    .leaflet-control-box-container .leaflet-control-box-content-container.scroll-container {
      padding: 0; }


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="SQLiteActivity"
            android:id="@+id/SQLiteActivity"
            android:padding="10dp"/>

    <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="SharedPreferencesActivity"
            android:id="@+id/SharedPreferencesActivity"
            android:padding="10dp"/>

    <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="ContentProviderActivity"
            android:id="@+id/ContentProviderActivity"
            android:padding="10dp"/>

    <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="StorageActivity"
            android:id="@+id/StorageActivity"
            android:padding="10dp"/>

    <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="HttpClientActivity"
            android:id="@+id/HttpClientActivity"
            android:padding="10dp"/>

    <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="FragmentActivity"
            android:id="@+id/FragmentActivity"
            android:padding="10dp"/>

    <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="WebViewActivity"
            android:id="@+id/WebviewActivity"
            android:padding="10dp"/>

    <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="BufferedActivity"
            android:id="@+id/BufferedActivity"
            android:padding="10dp"/>
</LinearLayout>


text:
.. _1-1-6:

1.1.6
===========================
*10/24/2019*

Graphite 1.1.6 is now available for usage. Please note that this is a bugfix / securityfix release for the stable Graphite 1.1.x branch and it's recommended for production usage. It also contains some improvements backported from the master branch.

Highlights
-------------
* Function parameters validation (disabled by default, can be enabled through ENFORCE_INPUT_VALIDATION variable)
* Better error handling (return 4XX instead of 5XX in case of wrong function parameters) if input validation enabled
* Python 3.8 and Django 2.x support
* New functions: add, sigmoid, logit, exp
* Python 3 fixes for Whisper and Carbon
* Carbonate have Python 3 support now
* Many improvements for Docker image, check its `release page <https://github.com/graphite-project/docker-graphite-statsd/releases>`_ for details

Thanks a lot for all Graphite contributors and users! You are the best!

Source bundles are available from GitHub:

* https://github.com/graphite-project/graphite-web/archive/1.1.6.tar.gz
* https://github.com/graphite-project/carbon/archive/1.1.6.tar.gz
* https://github.com/graphite-project/whisper/archive/1.1.6.tar.gz
* https://github.com/graphite-project/carbonate/archive/1.1.6.tar.gz

Graphite can also be installed from `PyPI <http://pypi.python.org/>`_ via
`pip <http://www.pip-installer.org/en/latest/index.html>`_. PyPI bundles are here:

* http://pypi.python.org/pypi/graphite-web/
* http://pypi.python.org/pypi/carbon/
* http://pypi.python.org/pypi/whisper/
* http://pypi.python.org/pypi/carbonate/

You can also use docker image from https://hub.docker.com/r/graphiteapp/graphite-statsd/

Upgrading
---------
Please upgrade whisper, carbon and graphite-web - they contain valuable bugfixes and improvements.

Incompatible changes
--------------------
WHISPER_FALLOCATE_CREATE set to `False` by default in docker image (because True often causing issues in Docker).

Security Notes
--------------
SSRF vulnerability `CVE-2017-18638 <https://nvd.nist.gov/vuln/detail/CVE-2017-18638>`_ was fixed in this release. Please check `security advisory <https://github.com/graphite-project/graphite-web/security/advisories/GHSA-vfj6-275q-4pvm>`_ for details.
Also patches was released for graphite-web `1.0.x <https://github.com/graphite-project/graphite-web/pull/2501>`_ and `0.9.x <https://github.com/graphite-project/graphite-web/pull/2500>`_, and we'll discuss releases of non-supported branches later.
Check `issue 2008 <https://github.com/graphite-project/graphite-web/issues/2008>`_ for discussion.
Also, recommended Django version was increased to 1.11.19 because previous Django versions are vulnerable to `CVE-2019-6975 <https://nvd.nist.gov/vuln/detail/CVE-2019-6975>`_ and `CVE-2019-3498 <https://nvd.nist.gov/vuln/detail/CVE-2019-3498>`_.
Despite that, Graphite 1.1.6 functionally still supports Django >= 1.8.

New features
------------

Graphite-Web
^^^^^^^^^^^^
* set package long description (#2407, @YevhenLukomskyi)
* add tag formatting docs (#2426, @replay)
* Accept IPv6 addresses in CARBONLINK_HOSTS (#2436, @RoEdAl)
* update aggregation function docs for aggregate and groupbytags (#2451, @Dieterbe)
* Add Statusengine to list of integrations (Forwarding) (#2452, @nook24)
* Django22 compatibility (#2462, @piotr1212)
* Python 3.8 support (#2464, @piotr1212)
* New functions: add, sigmoid, logit, exp (#2466, @piotr1212)
* Better error handling (return 4XX instead of 5XX in case of wrong function parameters) (#2467, @replay)
* Pass maxDataPoints to the requestContext for Finder (#2479, @Felixoid)
* Add redis password support for tagdb (#2483, @ahmet2mir)
* Created issue template (#2488, @bigpythonimish)
* docs: add netdata to 'tools that work with graphite' (#2490, @sbasgall)
* Updated minimumBelow() docstring (#2493, @bigpythonimish)
* xFilesFactor is an optional parameter for removeEmptySeries (#2495, @DanCech)
* fix functions that aggregate to include the aliases in their params (#2496, @Dieterbe)
* the callback parameter for groupByNode is optional (#2497, @DanCech)

Carbon
^^^^^^
* Add testing for Python 3.8 (#859, @piotr1212)

Whisper
^^^^^^^
* set package long description (#271, @YevhenLukomskyi)
* Dump as raw values (#282, @Glandos)

Carbonate
^^^^^^^^^
* Python 3 support (PR#107, @piotr1212)
* Use --copy-dest, enabling the rsync algorithm when copying from remote to staging (PR#106, @luke-heberling)

Bug Fixes
---------

Graphite-Web
^^^^^^^^^^^^
* fix dashboard graph metric list icon paths with URL_PREFIX (#2424, @ploxiln)
* docs: for sql db migration to 1.1 recommend --fake-initial (#2425, @ploxiln)
* Fix dashboard template loading from URL (#2431, @cbowman0)
* Dashboard render urls missing document.body.dataset.baseUrl (#2433, @cbowman0)
* fixed small errors in docs (#2443, 0xflotus)
* Copy requestContext() and empty prefetch (#2450, @cbowman0)
* Fix a broken link to structured_metrics in doc (#2463, @izeye)
* added space before \ (#2487, @saikek)
* Fix for CVE-2017-18638 (#2499, @deniszh)
* Upgrading minimal Django version (#2502, @deniszh)

Carbon
^^^^^^
* set package long description (#834, @YevhenLukomskyi)
* Remove pidfile on ValueError exception (#853, @albang)

Whisper
^^^^^^^
* Switch to setuptools (#272, @piotr1212)
* adding appropriate 'type' to sleep variable (#273, @piotr1212)
* Add testing for Python 3.8, remove 3.4 (eol)(#277, @piotr1212)
* Altering rrd2whisper.py for py3 compatibility (#280, @FliesLikeABrick)

Carbonate
^^^^^^^^^
* fix lint errors (PR#105, @YevhenLukomskyi)
* specify long_description_content_type, so that package description is properly rendered on pypi.org (PR#104, @YevhenLukomskyi)


text:
<!doctype html>

	<meta charset="UTF-8">
	<title>Testing smartPicker</title>

	<link rel="stylesheet" type="text/css" href="../dist/styles/smart-picker.css">

	<link rel="stylesheet" type="text/css" href="test.css">

	<link rel="stylesheet" type="text/css" href="smart-picker.css">

	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

Example #2 - Event callbacks

beforeShow

There are similar options for: beforeShow, afterShow, beforeHide, afterHide

<button class="button" id="button1">Show Picker</button>

Usage:

var picker = new smartPicker("regular", "my-picker", {
	beforeShow: function() {
		alert("This happens before the picker is created");
	}
});
picker.show();

onInteraction

The callback is called everytime the value changes

<button class="button" id="button2">Choose a number</button>

The value now is:

Usage:

var picker = new smartPicker("regular", "my-picker", {
	onInteraction: function(data) {
		$("#result").html(data.selected);
	}
});
picker.show();

onSet

<button class="button" id="button3">Choose a number</button>

The value now is set to:

Usage:

var picker = new smartPicker("regular", "my-picker", {
	onSet: function(data) {
		$("#result").html(data.selected);
	},
	confirmButton: "Confirm this number" //true works fine too
});
picker.show();

Combined: onInteraction and onSet

<button class="button" id="button4">Choose a number</button>

Current selection:

Usage:

var picker = new smartPicker("regularList", "my-picker", {
	onInteraction: function(data) {
		$("#result").html(data.selected);
	},
	onSet: function(data) {
		alert("Selected value: "+data.selected);
	},
	confirmButton: "Confirm this number" //true works fine too
});
picker.show();

Menu


text:
require 'test_helper'

class FinansbankTest < Test::Unit::TestCase
  def setup
    @original_kcode = nil

    @gateway = FinansbankGateway.new(
      login: 'login',
      password: 'password',
      client_id: 'client_id'
    )

    @credit_card = credit_card
    @amount = 100

    @options = {
      order_id: '1',
      billing_address: address,
      description: 'Store Purchase'
    }
  end

  def teardown
    $KCODE = @original_kcode if @original_kcode
  end

  def test_successful_purchase
    @gateway.expects(:ssl_post).returns(successful_purchase_response)

    assert response = @gateway.purchase(@amount, @credit_card, @options)
    assert_instance_of Response, response
    assert_success response
    assert_equal '1', response.authorization
    assert response.test?
  end

  def test_successful_authorize_capture
    @gateway.expects(:ssl_post).returns(successful_authorize_response)

    assert response = @gateway.purchase(@amount, @credit_card, @options)
    assert_instance_of Response, response
    assert_success response
    assert_equal '1', response.authorization

    @gateway.expects(:ssl_post).returns(successful_capture_response)

    assert response = @gateway.capture(@amount, response.authorization, @options)
    assert_instance_of Response, response
    assert_success response

    assert_equal '1', response.authorization

    assert response.test?
  end

  def test_capture_without_authorize
    @gateway.expects(:ssl_post).returns(capture_without_authorize_response)

    assert response = @gateway.purchase(@amount, @credit_card, @options)
    assert_failure response
    assert response.test?
  end

  def test_unsuccessful_request
    @gateway.expects(:ssl_post).returns(failed_purchase_response)

    assert response = @gateway.purchase(@amount, @credit_card, @options)
    assert_failure response
    assert response.test?
  end

  def test_successful_void
    @gateway.expects(:ssl_post).returns(successful_void_response)

    assert response = @gateway.void(@options[:order_id])
    assert_success response
    assert response.test?
  end

  def test_failed_void
    @gateway.expects(:ssl_post).returns(failed_void_response)

    assert response = @gateway.void(@options[:order_id])
    assert_failure response
    assert response.test?
  end

  def test_successful_refund
    @gateway.expects(:ssl_post).returns(success_refund_response)

    assert response = @gateway.refund(5 * 100, @options[:order_id])
    assert_success response
    assert response.test?
  end

  def test_failed_refund
    @gateway.expects(:ssl_post).returns(failed_refund_response)

    assert response = @gateway.refund(5 * 100, @options[:order_id])
    assert_failure response
    assert response.test?
  end

  def test_successful_credit
    @gateway.expects(:ssl_post).returns(success_credit_response)

    assert response = @gateway.credit(5 * 100, @credit_card)
    assert_success response
    assert response.test?
  end

  def test_failed_credit
    @gateway.expects(:ssl_post).returns(failed_credit_response)

    assert response = @gateway.credit(5 * 100, @credit_card)
    assert_failure response
    assert response.test?
  end

  private

  def successful_purchase_response
    <<-EOF
<CC5Response>
      <OrderId>1</OrderId>
      <GroupId>1</GroupId>
      <Response>Approved</Response>
      <AuthCode>123456</AuthCode>
      <HostRefNum>123456</HostRefNum>
      <ProcReturnCode>00</ProcReturnCode>
      <TransId>123456</TransId>
      <ErrMsg></ErrMsg>
</CC5Response>
    EOF
  end

  def failed_purchase_response
    <<-EOF
<CC5Response>
      <OrderId>1</OrderId>
      <GroupId>2</GroupId>
      <Response>Declined</Response>
      <AuthCode></AuthCode>
      <HostRefNum>123456</HostRefNum>
      <ProcReturnCode>12</ProcReturnCode>
      <TransId>123456</TransId>
      <ErrMsg>Not enough credit</ErrMsg>
</CC5Response>
    EOF
  end

  def successful_authorize_response
    <<-EOF
<CC5Response>
  <OrderId>1</OrderId>
  <GroupId>1</GroupId>
  <Response>Approved</Response>
  <AuthCode>794573</AuthCode>
  <HostRefNum>305219419620</HostRefNum>
  <ProcReturnCode>00</ProcReturnCode>
  <TransId>13052TpOI06012476</TransId>
  <ErrMsg></ErrMsg>
  <Extra>
    <SETTLEID>411</SETTLEID>
    <TRXDATE>20130221 19:41:14</TRXDATE>
    <ERRORCODE></ERRORCODE>
    <HOSTMSG>ISLEMINIZ ONAYLANDI</HOSTMSG>
    <NUMCODE>00</NUMCODE>
    <HOSTCODE>000</HOSTCODE>
    <ISYERI3DSECURE>N</ISYERI3DSECURE>
  </Extra>
</CC5Response>
    EOF
  end

  def successful_capture_response
    <<-EOF
<CC5Response>
  <OrderId>1</OrderId>
  <GroupId>1</GroupId>
  <Response>Approved</Response>
  <AuthCode>794573</AuthCode>
  <HostRefNum>305219419622</HostRefNum>
  <ProcReturnCode>00</ProcReturnCode>
  <TransId>13052TpPH06012485</TransId>
  <ErrMsg></ErrMsg>
  <Extra>
    <SETTLEID>411</SETTLEID>
    <TRXDATE>20130221 19:41:15</TRXDATE>
    <ERRORCODE></ERRORCODE>
    <NUMCODE>00</NUMCODE>
  </Extra>
</CC5Response>
    EOF
  end

  def capture_without_authorize_response
    <<-EOF
<CC5Response>
  <OrderId></OrderId>
  <GroupId></GroupId>
  <Response>Error</Response>
  <AuthCode></AuthCode>
  <HostRefNum></HostRefNum>
  <ProcReturnCode>99</ProcReturnCode>
  <TransId>13052TtZF06012712</TransId>
  <ErrMsg>PostAuth sadece iliskili bir PreAuth icin yapilabilir.</ErrMsg>
  <Extra>
    <SETTLEID></SETTLEID>
    <TRXDATE>20130221 19:45:25</TRXDATE>
    <ERRORCODE>CORE-2115</ERRORCODE>
    <NUMCODE>992115</NUMCODE>
  </Extra>
</CC5Response>
    EOF
  end

  def successful_void_response
    <<-EOF
<CC5Response>
  <OrderId>1</OrderId>
  <GroupId>1</GroupId>
  <Response>Approved</Response>
  <AuthCode>794573</AuthCode>
  <HostRefNum>402310197597</HostRefNum>
  <ProcReturnCode>00</ProcReturnCode>
  <TransId>14023KVGD18549</TransId>
  <ErrMsg></ErrMsg>
    <Extra>
    <SETTLEID>1363</SETTLEID>
    <TRXDATE>20140123 10:21:05</TRXDATE>
    <ERRORCODE></ERRORCODE>
    <NUMCODE>00</NUMCODE>
    </Extra>
</CC5Response>
    EOF
  end

  def failed_void_response
    <<-EOF
<CC5Response>
  <OrderId></OrderId>
  <GroupId></GroupId>
  <Response>Error</Response>
  <AuthCode></AuthCode>
  <HostRefNum></HostRefNum>
  <ProcReturnCode>99</ProcReturnCode>
  <TransId>14023KvNI18702</TransId>
  <ErrMsg>İptal edilmeye uygun satış işlemi bulunamadı.</ErrMsg>
  <Extra>
    <SETTLEID></SETTLEID>
    <TRXDATE>20140123 10:47:13</TRXDATE>
    <ERRORCODE>CORE-2008</ERRORCODE>
    <NUMCODE>992008</NUMCODE>
  </Extra>
</CC5Response>
    EOF
  end

  def success_refund_response
    <<-EOF
<CC5Response>
  <OrderId>1</OrderId>
  <GroupId>1</GroupId>
  <Response>Approved</Response>
  <AuthCode>811778</AuthCode>
  <HostRefNum>402410197809</HostRefNum>
  <ProcReturnCode>00</ProcReturnCode>
  <TransId>14024KACE13836</TransId>
  <ErrMsg></ErrMsg>
  <Extra>
    <SETTLEID>1364</SETTLEID>
    <TRXDATE>20140124 10:00:02</TRXDATE>
    <ERRORCODE></ERRORCODE>
    <PARAPUANTRL>000000001634</PARAPUANTRL>
    <PARAPUAN>000000001634</PARAPUAN>
    <NUMCODE>00</NUMCODE>
    <CAVVRESULTCODE>3</CAVVRESULTCODE>
  </Extra>
</CC5Response>
    EOF
  end

  def failed_refund_response
    <<-EOF
<CC5Response>
  <OrderId></OrderId>
  <GroupId></GroupId>
  <Response>Error</Response>
  <AuthCode></AuthCode>
  <HostRefNum></HostRefNum>
  <ProcReturnCode>99</ProcReturnCode>
  <TransId>14024KEwH13882</TransId>
  <ErrMsg>Iade yapilamaz, siparis gunsonuna girmemis.</ErrMsg>
  <Extra>
    <SETTLEID></SETTLEID>
    <TRXDATE>20140124 10:04:48</TRXDATE>
    <ERRORCODE>CORE-2508</ERRORCODE>
    <NUMCODE>992508</NUMCODE>
  </Extra>
</CC5Response>
    EOF
  end

  def success_credit_response
    <<-EOF
<CC5Response>
  <OrderId>ORDER-14024KUGB13953</OrderId>
  <GroupId>ORDER-14024KUGB13953</GroupId>
  <Response>Approved</Response>
  <AuthCode>718160</AuthCode>
  <HostRefNum>402410197818</HostRefNum>
  <ProcReturnCode>00</ProcReturnCode>
  <TransId>14024KUGD13955</TransId>
  <ErrMsg></ErrMsg>
  <Extra>
    <SETTLEID>1364</SETTLEID>
    <TRXDATE>20140124 10:20:06</TRXDATE>
    <ERRORCODE></ERRORCODE>
    <NUMCODE>00</NUMCODE>
    <CAVVRESULTCODE>3</CAVVRESULTCODE>
  </Extra>
</CC5Response>
    EOF
  end

  def failed_credit_response
    <<-EOF
<CC5Response>
  <OrderId></OrderId>
  <GroupId></GroupId>
  <Response>Error</Response>
  <AuthCode></AuthCode>
  <HostRefNum></HostRefNum>
  <ProcReturnCode>99</ProcReturnCode>
  <TransId>14024KUtG13966</TransId>
  <ErrMsg>Kredi karti numarasi gecerli formatta degil.</ErrMsg>
  <Extra>
    <SETTLEID></SETTLEID>
    <TRXDATE>20140124 10:20:45</TRXDATE>
    <ERRORCODE>CORE-2012</ERRORCODE>
    <NUMCODE>992012</NUMCODE>
  </Extra>
</CC5Response>
    EOF
  end
end


text:
layout: page
title: About
---

<p class="message">
  Hey salut ! Moi c'est Aurélien, voilà la page pour les personnes qui souhaitent en savoir un peu plus sur moi.
</p>

J'ai 23 ans et je suis passionné des technologies du web depuis très jeune. J'ai toujours participer à des projets internet pour mes proches et depuis novembre 2016 j'ai décidé d'ouvrir mon propre blog intitulé [Herocoda](https://herocoda.github.io).

Je suis également sur les réseaux sociaux pour ceux qui souhaitent me suivre.

* [Facebook](http://facebook.com)
* [Twitter](http://twitter.com)

Si vous avez des questions ou des suggestions, n'hésitez pas à m'en faire part, je serai heureux d'y répondre. Vous pouvez aussi contacter par mail: [@herocoda](mailto:aurelien@blanes.fr)

Merci de votre lecture !


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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity"
            android:launchMode="singleTop"
            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=".NewChoreActivity"
            android:parentActivityName=".MainActivity"
            android:screenOrientation="portrait">
        </activity>
        <activity android:name=".CalendarActivity"
            android:parentActivityName=".MainActivity" android:screenOrientation="portrait">
        </activity>

    </application>

</manifest>


text:
/* The definition below is required to define RTLD_NEXT by including dlfcn.h */
#define _GNU_SOURCE

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>

#include <fcntl.h>
#include <time.h>
#include <sys/stat.h>
#include <unistd.h>

#define BUFFER_SIZE 4*4096

#define unused(argument) ((void) argument)

static void basedir(const char *, char *, size_t);
static void join_path(const char *, const char *, char *, size_t);
static void fdpath(int, char *, size_t);
static void mkdirp(const char *);
static void chop(char *, char);
static int is_dir(const char *);
static void move(const char *, const char *);
static void run(const char *, ...);

int unlinkat(int dirfd, const char *pathname, int flags)
{
	char *operation_path,
		root_path[BUFFER_SIZE],
		source_path[BUFFER_SIZE],
		base_path[BUFFER_SIZE],
		target_path[BUFFER_SIZE];

	unused(flags);

	operation_path = getenv("CARELESS_OPERATION_PATH");
	if (!operation_path) {
		fprintf(stderr, "CARELESS_OPERATION_PATH is undefined\n");
		return -1;
	}

	if (*pathname == '/') {
		strncpy(source_path, pathname, sizeof(source_path));
	} else if (AT_FDCWD == dirfd) {
		getcwd(root_path, sizeof(root_path));
		join_path(root_path, pathname, source_path, sizeof(source_path));
	} else {
		fdpath(dirfd, root_path, sizeof(root_path));
		join_path(root_path, pathname, source_path, sizeof(source_path));
	}

	snprintf(target_path,
		sizeof(target_path),
		"%s/%s",
		operation_path,
		source_path);
	basedir(target_path, base_path, sizeof(base_path));
	mkdirp(base_path);

	if (!is_dir(source_path) || !is_dir(target_path)) {
		move(source_path, target_path);
	} else {
		rmdir(source_path);
	}

	return 0;
}

static void basedir(const char *path, char *output, size_t size)
{
	char *p;

	strncpy(output, path, size);

	chop(output, '/');

	p = strrchr(output, '/');
	if (!p) {
		strncpy(output, ".", 1);
		goto out;
	}

	*p = '\0';

	if (!*output) {
		strncpy(output, "/", 1);
	}

out:
	return;
}

static void join_path(const char *path1, const char *path2, char *output, size_t size)
{
	snprintf(output, size, "%s/%s", path1, path2);
}

static void fdpath(int fd, char *output, size_t size)
{
	char path[BUFFER_SIZE];

	snprintf(path, sizeof(path), "/proc/self/fd/%d", fd);
	readlink(path, output, size);
}

/* A lazy implementation of mkdir -p ;-) */
static void mkdirp(const char *path)
{
	run("mkdir -p \"%s\"", path);
}

static void chop(char *string, char to_remove)
{
	size_t length = strlen(string);
	if (to_remove == string[length]) {
		string[length] = '\0';
	}
}

static int is_dir(const char *path)
{
	struct stat stat_;

	if (-1 == stat(path, &stat_)) {
		return 0;
	}

	return S_ISDIR(stat_.st_mode);
}

static void move(const char *source_path, const char *target_path)
{
	run("mv \"%s\" \"%s\"", source_path, target_path);
}

static void run(const char *command_format, ...)
{
	va_list args;
	char command[BUFFER_SIZE];

	va_start(args, command_format);
	vsnprintf(command, sizeof(command), command_format, args);
	va_end(args);
}


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:state_checked="true">
        <shape>
            <solid android:color="@color/common_gray_light" />

            <corners android:radius="5dp" />
        </shape>

    </item>

    <item>
        <shape>
            <solid android:color="@android:color/transparent" />
        </shape>

    </item>
</selector>


text:
from __future__ import unicode_literals

from django.db import migrations
from django.db import models

class Migration(migrations.Migration):

    dependencies = [
        ('contentcuration', '0110_auto_20200117_1948'),
    ]

    operations = [
        migrations.AlterField(
            model_name='invitation',
            name='first_name',
            field=models.CharField(blank=True, max_length=100),
        ),
    ]


text:
package nilgiri.physics;

import nilgiri.math.RealNumber;
import nilgiri.math.autodiff.DifferentialFunction;

public class PhysicalCharacteristics <X extends RealNumber<X>>
{
	private DifferentialFunction<X> m_radius;
	private DifferentialFunction<X> m_mass;

	public PhysicalCharacteristics(DifferentialFunction<X> i_radius,
			DifferentialFunction<X> i_mass){
		m_radius = i_radius;
		m_mass = i_mass;
	}

	public DifferentialFunction<X> mass(){
		return m_mass;
	}
	public DifferentialFunction<X> radius(){
		return m_radius;
	}
}


text:
package sample;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathFactory;

import org.w3c.dom.Document;
import org.w3c.dom.NodeList;

public class Sample {
	public static void main(String[] args) {
		try {
			DocumentBuilderFactory factory = DocumentBuilderFactory
					.newInstance();
			DocumentBuilder builder = factory.newDocumentBuilder();
			Document doc = builder.parse("source.xml");
			XPathFactory xPathfactory = XPathFactory.newInstance();
			XPath xpath = xPathfactory.newXPath();
			XPathExpression expr = xpath
					.compile("/*/listOfDocs/documents/document/topic");
			NodeList nodes = (NodeList) expr.evaluate(doc,
					XPathConstants.NODESET);

			for (int i = 0; i < nodes.getLength(); i++) {
				System.out.println(nodes.item(i).getAttributes()
						.getNamedItem("id"));
				System.out.println(nodes.item(i).getAttributes()
						.getNamedItem("percentage"));
			}
		} catch (Exception e) {
			System.err.println(e);
		}
	}
}


text:
This is a Discord bot that hooks into the GETIN-HR web application to run checks and validations on a schedule and give updates to recruiters from Discord.

## Installing

Note: This project requires Python 3.6+.

```bash
$ git clone https://github.com/Celeo/GETIN-Auth-Discord
$ cd GETIN-Auth-Discord
$ virtualenv env
$ . env/bin/activate
$ pip install -r requirements.txt
$ cp config.json.example config.json
```

Fill in the configuration. To run:

```bash
$ python bot.py
```


text:
package pipe.handlers;

import pipe.actions.gui.CreateAction;
import pipe.actions.gui.PipeApplicationModel;
import pipe.controllers.PetriNetController;
import pipe.gui.PetriNetTab;

import javax.swing.*;
import javax.swing.event.MouseInputAdapter;
import java.awt.Cursor;
import java.awt.Point;
import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;

/**
 * PetriNetMouseHandler handles mouse press inputs on a given petri net tab.
 * It works out what action is selected (e.g. create new place) and makes this happen.
 */
public class PetriNetMouseHandler extends MouseInputAdapter {
    /**
     * Main PIPE application model
     */
    private final PipeApplicationModel applicationModel;

    /**
     * Petri net tab
     */
    private final PetriNetTab petriNetTab;

    /**
     * Starting location of the petri net components drag
     */
    private Point dragStart = new Point(0,0);

    /**
     * Main PIPE application controller
     */
    private PetriNetController petriNetController;

    /**
     *
     * @param applicationModel main PIPE application model
     * @param controller main PIPE application controller
     * @param petriNetTab Petri net tab
     */
    public PetriNetMouseHandler(PipeApplicationModel applicationModel, PetriNetController controller, PetriNetTab petriNetTab) {
        super();
        this.applicationModel = applicationModel;
        this.petriNetTab = petriNetTab;
        this.petriNetController = controller;
    }

    /**
     * Performs the corresponding selected toolbar action on the component
     * @param event mouse event
     */
    @Override
    public void mousePressed(MouseEvent event) {
        if (SwingUtilities.isLeftMouseButton(event)) {
            doAction(event);
        }
    }

    /**
     * Performs action on the petri net if an aciton
     * has been selected and if the petri net is not in animation mode
     *
     * @param event mouse event
     */
    private void doAction(MouseEvent event) {

        CreateAction action = applicationModel.getSelectedAction();
        if (action != null && !applicationModel.isInAnimationMode()) {
            action.doAction(event, petriNetController);
        }
    }

    /**
     * Changes the cursor to a cross hair
     * @param e mouse event
     */
    @Override
    public void mouseReleased(MouseEvent e) {
        petriNetTab.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR));
    }

    /**
     * Noop
     * @param e mouse event
     */
    @Override
    public void mouseWheelMoved(MouseWheelEvent e) {
        // No action needed
    }

    /**
     * Sets the starting drag point
     * @param e mouse event
     */
    @Override
    public void mouseDragged(MouseEvent e) {
        petriNetTab.drag(dragStart, e.getPoint());
    }

    /**
     * Performs the movement action of the toolbar action selected on the component
     * @param event mouse event
     */
    @Override
    public void mouseMoved(MouseEvent event) {
        doAction(event);
    }

}