text:
<?php

namespace Vegas\Forms;

use Phalcon\Forms\Element\Check;
use Phalcon\Forms\Element\Hidden;
use Phalcon\Forms\Element\Text;
use Vegas\Forms\DataProvider\DataProviderInterface;
use Vegas\Forms\DataProvider\Exception\NotFoundException;
use Vegas\Forms\Element\Select;
use Vegas\Validation\Validator\PresenceOf;

/**
 * Subform used to validate settings for each created input element in FormFactory
 */
class InputSettings extends \Vegas\Forms\Form
{

    /**
     * Param name used for element type recognition
     */
    const TYPE_PARAM = 'type';

    /**
     * Param name used for field identification - has to be unique
     */
    const IDENTIFIER_PARAM = 'name';

    /**
     * Param name used if a field should be required
     */
    const REQUIRED_PARAM = 'required';

    /**
     * Param name used for element label
     */
    const LABEL_PARAM = 'label';

    /**
     * Param name used for default value
     */
    const DEFAULTS_PARAM = 'defaults';

    /**
     * Param name used for placeholder value
     */
    const PLACEHOLDER_PARAM = 'placeholder';

    /**
     * Param name used for fully qualified classnames implementing DataProviderInterface
     */
    const DATA_PARAM = 'data';

    public function initialize()
    {

        $type = new Hidden(self::TYPE_PARAM);
        $this->add($type);

        $identifier = (new Text(self::IDENTIFIER_PARAM))
                ->addValidator(new PresenceOf)
                ->setLabel('Unique ID');
        $this->add($identifier);

        $required = (new Check(self::REQUIRED_PARAM))
                ->setAttribute('value', true)
                ->setLabel('Required field');
        $this->add($required);

        $label = (new Text(self::LABEL_PARAM))
                ->setLabel('Label');
        $this->add($label);

        $defaults = (new Text(self::DEFAULTS_PARAM))
                ->setLabel('Default value');
        $this->add($defaults);

        $placeholder = (new Text(self::PLACEHOLDER_PARAM))
                ->setLabel('Placeholder text');
        $this->add($placeholder);

        $this->addDataProviderInput();
    }

    /**
     * Proxy method to retrieve data to populate select lists.
     * @return array
     * @throws \Vegas\Forms\DataProvider\Exception\NotFoundException When DI is not configured properly or a wrong value is provided.
     */
    public function getDataFromProvider()
    {
        $select = $this->get(self::DATA_PARAM);
        if(is_null($select->getValue()) || $select->getValue() === '') {
            return [];
        }
        $className = $select->getValue();
        if (!class_exists($className) || !array_key_exists($className, $select->getOptions())) {
            throw new NotFoundException;
        }
        $provider = new $className;
        return $provider->getData();

    }

    /**
     * Adds selectable list of data providers.
     * Usable only for selectable input types.
     */
    public function addDataProviderInput()
    {
        $input = (new Select(self::DATA_PARAM))
                ->setOptions(array(null => '---'));
        $dataProviderClasses = array();
        foreach ($this->di->get('config')->formFactory->dataProviders as $className) {
            $provider = new $className;
            if ($provider instanceof DataProviderInterface) {
                $dataProviderClasses[$className] = $provider->getName();
            }
        }
        $input->addOptions($dataProviderClasses)->setLabel('Data provider');
        $this->add($input);
    }
}


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ImageView
        android:id="@+id/image_about_logo"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="32dp"
        android:adjustViewBounds="true"
        android:background="?attr/selectableItemBackgroundBorderless"
        android:contentDescription="Put.io logo"
        android:maxHeight="160dp"
        android:maxWidth="160dp"
        android:src="@drawable/biglogo" />

    <include
        layout="@layout/about_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:layout_marginBottom="32dp" />

</RelativeLayout>

redpajama_set_name: RedPajamaGithub


text:
use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode};
use ::RegType::*;
use ::instruction_def::*;
use ::Operand::*;
use ::Reg::*;
use ::RegScale::*;

fn fucomip_1() {
    run_test(&Instruction { mnemonic: Mnemonic::FUCOMIP, operand1: Some(Direct(ST)), operand2: Some(Direct(ST6)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[223, 238], OperandSize::Word)
}

fn fucomip_2() {
    run_test(&Instruction { mnemonic: Mnemonic::FUCOMIP, operand1: Some(Direct(ST)), operand2: Some(Direct(ST2)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[223, 234], OperandSize::Dword)
}

fn fucomip_3() {
    run_test(&Instruction { mnemonic: Mnemonic::FUCOMIP, operand1: Some(Direct(ST)), operand2: Some(Direct(ST6)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[223, 238], OperandSize::Qword)
}


text:
<?php

declare(strict_types=1);

namespace Zhiyi\Plus\Tests\Feature\API2;

use Zhiyi\Plus\Tests\TestCase;
use Zhiyi\Plus\Models\User as UserModel;
use Illuminate\Foundation\Testing\DatabaseTransactions;

class WalletTransferTest extends TestCase
{
    use DatabaseTransactions;

    protected $user;

    protected function setUp()
    {
        parent::setUp();

        $this->user = factory(UserModel::class)->create();
        $this->target_user = factory(UserModel::class)->create();
        $this->user->newWallet()->update(['balance' => 999999, 'total_income' => 0, 'total_expenses' => 0]);
    }

    /**
     * 测试发起转账.
     *
     * @return void
     * @author BS <414606094@qq.com>
     */
    public function testTransfer()
    {
        $response = $this->actingAs($this->user, 'api')->json('POST', '/api/v2/plus-pay/transfer', ['user' => $this->target_user->id, 'amount' => 2121]);

        $response->assertStatus(201);
    }

    protected function tearDown()
    {
        $this->user->forceDelete();
        $this->target_user->forceDelete();

        parent::tearDown();
    }
}


text:
<resources>
  <string name="app_name">FingerprintAPI</string>
  <string name="title_activity_main">MainActivity</string>
  <string name="title_fingerprint">One-touch Sign In</string>
  <string name="desc_fingerprint">Please place your fingertip on the scanner to verify your identity</string>
  <string name="note">(Fingerprint sign in makes your app login much faster. Your device should have at least one fingerprint registered in device settings)</string>
  <string name="title_activity_home">FingerprintAPI</string>
  <string name="activity_home_desc">You have successfully logged in with fingerprint authentication</string>
  <string name="activity_home_note">Close and re-open the app to see the fingerprint auth screen again</string>
</resources>


text:
package se.cygni.snake.api.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

public class PlayerPoints {

    private final String name;
    private final String playerId;
    private final int points;

    @JsonCreator
    public PlayerPoints(
            @JsonProperty("name") String name,
            @JsonProperty("playerId") String playerId,
            @JsonProperty("points") int points) {
        this.name = name;
        this.playerId = playerId;
        this.points = points;
    }

    public String getName() {
        return name;
    }

    public String getPlayerId() {
        return playerId;
    }

    public int getPoints() {
        return points;
    }
}


text:
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
      ui->setupUi(this);

      dl_handle = new ariawarapper;
      dl_handle->moveToThread(&worker);
      worker.start();

      timer = new QTimer(this);
      label = new QLabel(this);

      connect(timer, SIGNAL(timeout()), dl_handle, SLOT(update()));
      connect(dl_handle,&ariawarapper::globalDownloadStat,this,&MainWindow::globalDownloadStat);
      connect(dl_handle,&ariawarapper::downloadStatPerItem,this,&MainWindow::downloadStatPerItem,Qt::BlockingQueuedConnection);
      connect(dl_handle,&ariawarapper::finishAddNew,this,&MainWindow::finishAddNew);
      connect(this,&MainWindow::addNewDownload, dl_handle,&ariawarapper::addNewDownload);
      for(int i = 0; i<10; i++) {
          objectHolder * temp_objh = new objectHolder(this);
          ui->verticalLayout_4->addWidget(temp_objh->groupw,0,Qt::AlignTop);
          list_of_objholder.prepend(temp_objh);
      }

}

MainWindow::~MainWindow()
{
    delete ui;

}

void MainWindow::on_actionAddNew_triggered()
{
    newDialog = new addNewDialog(this);
    newDialog->show();

}
void MainWindow::globalDownloadStat(int inactive, int active, int gdl, int gup)
{
    QString message = QString("Inactive:%1 Active:%2 Speed down:%3KB/s up:%4KB/s").arg(inactive).arg(active).arg(gdl/1024).arg(gup/1024);
    statusBar()->showMessage(message);
}
void MainWindow::downloadStatPerItem(uint id, int completed, int total,int perDl, int perUp)
{
    objectHolder * temp_objh = dlList.value(id); //take out one item from list
    int percentage;
    if(total == 0 || total == -1) {
        std::cout<<"error"<<total;
        return;
    }
    else if(total == -2 ) {
        percentage = 100;
    } else {
        percentage = completed * 100 / total;
    }
    QString message = QString("ID %1 Downloaded:%2|%3[ %6% ] Speed D%4KB/s U%5KB/s").arg(id).arg(completed).arg(total).arg(perDl).arg(perUp).arg(percentage);
    temp_objh->info->setText(message);
}
void MainWindow::emitAddNewDownload(QString url,QString location)
{
    //        http://speed.hetzner.de/100MB.bin
    //QString url = "  http://ipv4.download.thinkbroadband.com/5MB.zip  ";

    timer->start(100);
    dl_handle->addNewDownload(url, location); //emit addNewDownload(url, location);
}
void MainWindow::finishAddNew(uint fid)
{

    if (fid == 0) {
        std::cout<<"error";
        return;
    }
    objectHolder * temp_objh;
    if(list_of_objholder.isEmpty()) {
        dlList.insert(fid, new objectHolder(this));
        temp_objh = dlList.value(fid);
        ui->verticalLayout_4->addWidget(temp_objh->groupw,0,Qt::AlignTop);
    } else {
        temp_objh = list_of_objholder.takeLast();
        dlList.insert(fid, temp_objh);
    }
    temp_objh->activate();

}


text:
import GameSprite from './GameSprite'
import Tree from './Tree'
import Meteor from './Meteor'

export default class Arrow extends GameSprite {
  constructor (game, group, obstacleGroup, meteorGroup, fireGroup) {
    super(game, 0, 0, 'pre-arrow', null, group)
    this.power = -1
    this.baseDmg = 100;
    this.game = game;
    this.obstacleGroup = obstacleGroup;
    this.meteorGroup = meteorGroup;
    this.fireGroup = fireGroup
  }

  getDamage () {
    return this.baseDmg
  }

  enchant (power) {
    this.power = power
    if (power == 0) {
      this.tint = 0x9093FF
      this.baseDmg = 200
    } else if (power == 1) {
      this.tint = 0xACFFA2
    } else if (power == 2) {
      this.tint = 0xFF7575
    } else if (power == 3) {
      this.tint = 0x4D1717
    }
  }

  createTree(x, y, centered) {
    var tree = new Tree(this.game, this.obstacleGroup);
    console.log(tree);
    tree.setPos(x, y, centered);
  }

  createFire(x, lowerY) {
    let fire = this.game.add.sprite(x, lowerY - 64, 'junglesheet', 'fire', this.fireGroup)
    fire.anchor.x = 0.5
    fire.scale.setTo(2, 2)
    this.game.physics.enable(fire, Phaser.Physics.ARCADE);
    fire.body.setSize(fire.width - 40, fire.height);
    fire.body.immovable = true
    let timer = this.game.time.create(false)
    timer.add(3000, (fire) => fire.destroy(), this, fire)
    timer.start()
    fire.body.allowGravity = false

  }

  createMeteor(x, y) {
    new Meteor(this.game, x, y, this.meteorGroup);
  }

  getGroundHeight () {
    return this.game.height - 32;
  }

  enemyHit (enemy) {
    if (this.power == 1) {
      console.log(enemy);
      this.createTree(
          enemy.body.right,
          this.getGroundHeight(),
          true
      );
      enemy.pushBack();
    } else if (this.power == 2){
      this.createFire(enemy.body.center.x, this.getGroundHeight())
    } else if (this.power == 3) {
      this.createMeteor(this.x, this.y);
    }

    enemy.damage(this.getDamage());

    if (this.power != 0) {
     this.kill();
    }
  }

  groundHit (ground) {
    if (this.power == 1) {
      this.createTree(this.body.right, this.getGroundHeight(), true);
    } else if (this.power == 2){
      this.createFire(
          this.body.center.x,
          this.getGroundHeight())
    } else if (this.power == 3) {
      this.createMeteor(this.body.right, this.body.bottom);
    }
    this.kill();
  }

  updateRotation () {
    this.rotation = Math.atan2(this.body.velocity.y, this.body.velocity.x);
  }
}


text:
Many thanks to the [contributors](https://github.com/purescript/purescript/graphs/contributors) who helped with this release.

- Full language guide can be found [here](http://functorial.com/purescript).
- Try out the latest features [here](http://tryps.functorial.com).

### New Features

- RankNTypes

  This experimental feature allows polymorphic types (introduced with `forall`) to appear on the left of a function arrow, or as the type of a record field, etc. For example:

        rank2 :: (forall a. a -> a) -> Number
        rank2 = \f -> if f true then f 1 else f 2

- Modules
- Polymorphic Object Update

  Records now support member update in which the type of the field changes during the update. For example:

        data Wrap a = Wrap a

        update = \o -> o { prop = Wrap o.prop }

### Enhancements

- Naked expressions as statements

  Naked expressions of type `{}` can now be used as statements.

- Split code generation into `AST -> JS` and `JS -> String`

  JavaScript generation is now split into the generation of a JavaScript AST, and the pretty-printing of that AST. This enables some optimizations, and a better JavaScript pretty-printer.

- Syntactic sugar for introducing curried functions

  Single-argument functions and multiple-argument functions can now be introduced in the same way:

        test = \a (b, c) d -> a + b + c + d

- JavaScript optimizations

  Some basic dead-variable elimination, inlining and eta-conversion are now performed on the generated JavaScript.

- Generate formatted Javascript

  The generated JavaScript is now formatted to be more readable. In particular, newlines get generated, and the correct indentation is used.

- More valid infix operators

  The colon and period characters are now valid in infix operator names.

### Syntax Changes

- Avoid 'do' keyword for blocks

  `do` will be used later for Haskell-like monad comprehensions, so its previous use in introducing blocks of statements is now invalid. The `do` keyword is still reserved.

- Member foreign import syntax

  A small syntactic addition to the FFI, to support a common use case.

- Make FFI syntax match Haskell

  Use `foreign import` instead of `extern`.

- Make record declaration syntax match Haskell
- Simplify array binders

  There are now two types of array binders: cons binders `x : xs -> ...` and array binders `[x, y, z] -> ...` instead of the previously confusing `[x:xs]`.

- Array indexing syntax is ambiguous

  Array elements are now accessed using the `!!` operator: `arr !! 0` etc.

### Bug Fixes

- Allow guards access to current scope

### Libraries

- Prelude

  There is now a basic prelude in the `libraries/prelude` folder.


text:
<?php

Yii::import('zii.widgets.jui.CJuiInputWidget');

/**
 * CJuiAutoComplete displays an autocomplete field.
 *
 * CJuiAutoComplete encapsulates the {@link http://jqueryui.com/demos/autocomplete/ JUI
 * autocomplete} plugin.
 *
 * To use this widget, you may insert the following code in a view:
 *

 * $this->widget('zii.widgets.jui.CJuiAutoComplete', array(
 *     'name'=>'city',
 *     'source'=>array('ac1', 'ac2', 'ac3'),
 *     // additional javascript options for the autocomplete plugin
 *     'options'=>array(
 *         'minLength'=>'2',
 *     ),
 *     'htmlOptions'=>array(
 *         'style'=>'height:20px;'
 *     ),
 * ));
 *

 *
 * By configuring the {@link options} property, you may specify the options
 * that need to be passed to the JUI autocomplete plugin. Please refer to
 * the {@link http://jqueryui.com/demos/autocomplete/ JUI
 * autocomplete} documentation for possible options (name-value pairs).
 *
 * By configuring the {@link source} property, you may specify where to search
 * the autocomplete options for each item. If source is an array, the list is
 * used for autocomplete. You may also configure {@link sourceUrl} to retrieve
 * autocomplete items from an ajax response.
 *
 * @author Sebastian Thierer <sebathi@gmail.com>
 * @version $Id: CJuiAutoComplete.php 2799 2011-01-01 19:31:13Z qiang.xue $
 * @package zii.widgets.jui
 * @since 1.1.2
 */
class CJuiAutoComplete extends CJuiInputWidget
{
	/**
	 * @var mixed the entries that the autocomplete should choose from. This can be
	 *

	 *
an Array with local data

     *
a String, specifying a URL that returns JSON data as the entries.

     *
a javascript callback. Please make sure you prefix the callback name with "js:" in this case.

     *

	 */
	public $source = array();
	/**
	 * @var mixed the URL that will return JSON data as the autocomplete items.
	 * CHtml::normalizeUrl() will be applied to this property to convert the property
	 * into a proper URL. When this property is set, the {@link source} property will be ignored.
	 */
	public $sourceUrl;

	/**
	 * Run this widget.
	 * This method registers necessary javascript and renders the needed HTML code.
	 */
	public function run()
	{
		list($name,$id)=$this->resolveNameID();

		if(isset($this->htmlOptions['id']))
			$id=$this->htmlOptions['id'];
		else
			$this->htmlOptions['id']=$id;

		if(isset($this->htmlOptions['name']))
			$name=$this->htmlOptions['name'];

		if($this->hasModel())
			echo CHtml::activeTextField($this->model,$this->attribute,$this->htmlOptions);
		else
			echo CHtml::textField($name,$this->value,$this->htmlOptions);

		if($this->sourceUrl!==null)
			$this->options['source']=CHtml::normalizeUrl($this->sourceUrl);
		else
			$this->options['source']=$this->source;

		$options=CJavaScript::encode($this->options);

		$js = "jQuery('#{$id}').autocomplete($options);";

		$cs = Yii::app()->getClientScript();
		$cs->registerScript(__CLASS__.'#'.$id, $js);
	}
}


text:
package org.pac4j.core.client;

import org.pac4j.core.context.WebContext;
import org.pac4j.core.credentials.Credentials;
import org.pac4j.core.exception.RequiresHttpAction;
import org.pac4j.core.profile.UserProfile;

/**
 *
This interface is the core of pac4j. It represents an authentication mechanism to validate user's credentials and
 * retrieve the user profile.

 *

 *
Clients can be "indirect": in that case, credentials are not provided with the HTTP request, but the user must be redirected to
 * an identity provider to perform login, the original requested url being saved and restored after the authentication process is done.

 *
The {@link #redirect(WebContext, boolean, boolean)} method is called to redirect the user to the identity provider,
 * the {@link #getCredentials(WebContext)} method is used to retrieve the credentials provided by the remote identity provider and
 * the {@link #getUserProfile(Credentials, WebContext)} method is called to get the user profile from the identity provider and based
 * on the provided credentials.

 *

 *
Clients can be "direct": in that case, credentials are provided along with the HTTP request and validated by the application.

 *
The {@link #redirect(WebContext, boolean, boolean)} method is not used, the {@link #getCredentials(WebContext)} method is used to retrieve
 * and validate the credentials provided and the {@link #getUserProfile(Credentials, WebContext)} method is called to get the user profile from
 * the appropriate system.

 *
 * @author Jerome Leleu
 * @since 1.4.0
 */
public interface Client<C extends Credentials, U extends UserProfile> {

    /**
     * Get the name of the client.
     *
     * @return the name of the client
     */
    public String getName();

    /**
     *
Redirect to the authentication provider for an indirect client.

     *
     * @param context the current web context
     * @param requiresAuthentication whether the target url is protected
     * @param ajaxRequest whether it is an AJAX request
     * @throws RequiresHttpAction whether an additional HTTP action is required
     */
    public void redirect(WebContext context, boolean requiresAuthentication, boolean ajaxRequest) throws RequiresHttpAction;

    /**
     *
Get the credentials from the web context. If no validation was made remotely (direct client), credentials must be validated at this step.

     *
In some cases, a {@link RequiresHttpAction} may be thrown instead.

     *
     * @param context the current web context
     * @return the credentials
     * @throws RequiresHttpAction whether an additional HTTP action is required
     */
    public C getCredentials(WebContext context) throws RequiresHttpAction;

    /**
     * Get the user profile based on the provided credentials.
     *
     * @param credentials credentials
     * @param context web context
     * @return the user profile
     */
    public U getUserProfile(C credentials, WebContext context);
}


text:
package com.android.tools.idea.ui.properties.swing;

import com.android.tools.idea.ui.properties.ObservableProperty;
import com.android.tools.idea.ui.properties.core.IntProperty;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * {@link ObservableProperty} that wraps a Swing combobox and exposes its selected index.
 */
public final class SelectedIndexProperty extends IntProperty implements ActionListener {

  private JComboBox myComboBox;

  public SelectedIndexProperty(@NotNull JComboBox comboBox) {
    myComboBox = comboBox;
    myComboBox.addActionListener(this);
  }

  @Override
  public void actionPerformed(ActionEvent actionEvent) {
    notifyInvalidated();
  }

  @NotNull
  @Override
  public Integer get() {
    return myComboBox.getSelectedIndex();
  }

  @Override
  protected void setDirectly(@NotNull Integer value) {
    myComboBox.setSelectedIndex(value);
  }
}


text:
using System;
using System.IO;
using Windows.Security.Cryptography;
using Windows.Security.Cryptography.Core;
using Windows.Storage.Streams;

namespace ArcGIS.ServiceModel
{
    public static class CryptoProviderFactory
    {
        public static Func<ICryptoProvider> Get { get; set; }

        public static bool Disabled { get; set; }

        static CryptoProviderFactory()
        {
            Get = (() => { return Disabled ? null : new RsaEncrypter(); });
        }
    }

    public class RsaEncrypter : ICryptoProvider
    {
        public Operation.GenerateToken Encrypt(Operation.GenerateToken tokenRequest, byte[] exponent, byte[] modulus)
        {
            if (exponent == null || modulus == null)
                throw new InvalidOperationException("Exponent and modulus must be set");

            byte[] bufferContent;

            using (var stream = new MemoryStream())
            {
                var writer = new BinaryWriter(stream);
                writer.Write((byte)0x30); // SEQUENCE
                using (var innerStream = new MemoryStream())
                {
                    var innerWriter = new BinaryWriter(innerStream);
                    EncodeIntegerBigEndian(innerWriter, modulus);
                    EncodeIntegerBigEndian(innerWriter, exponent);
                    var length = (int)innerStream.Length;
                    EncodeLength(writer, length);
                    writer.Write(innerStream.ToArray(), 0, length);
                }

                bufferContent = stream.ToArray();
            }

            var encryptedUsername = Encrypt(bufferContent, tokenRequest.Username).BytesToHex();
            var encryptedPassword = Encrypt(bufferContent, tokenRequest.Password).BytesToHex();
            var encryptedClient = string.IsNullOrWhiteSpace(tokenRequest.Client) ? "" : Encrypt(bufferContent, tokenRequest.Client).BytesToHex();
            var encryptedExpiration = Encrypt(bufferContent, tokenRequest.ExpirationInMinutes.ToString()).BytesToHex();
            var encryptedReferer = string.IsNullOrWhiteSpace(tokenRequest.Referer) ? "" : Encrypt(bufferContent, tokenRequest.Referer).BytesToHex();

            tokenRequest.Encrypt(encryptedUsername, encryptedPassword, encryptedExpiration, encryptedClient, encryptedReferer);

            return tokenRequest;
        }

        static byte[] Encrypt(byte[] bufferContent, string data)
        {
            IBuffer keyBuffer = CryptographicBuffer.CreateFromByteArray(bufferContent);

            var asym = AsymmetricKeyAlgorithmProvider.OpenAlgorithm(AsymmetricAlgorithmNames.RsaPkcs1);

            var key = asym.ImportPublicKey(keyBuffer, CryptographicPublicKeyBlobType.Pkcs1RsaPublicKey);

            IBuffer plainBuffer = CryptographicBuffer.ConvertStringToBinary(data, BinaryStringEncoding.Utf8);
            IBuffer encryptedBuffer = CryptographicEngine.Encrypt(key, plainBuffer, null);

            byte[] encryptedBytes;
            CryptographicBuffer.CopyToByteArray(encryptedBuffer, out encryptedBytes);

            return encryptedBytes;
        }

        static void EncodeLength(BinaryWriter stream, int length)
        {
            if (length < 0) throw new ArgumentOutOfRangeException("length", "Length must be non-negative");
            if (length < 0x80)
            {
                // Short form
                stream.Write((byte)length);
            }
            else
            {
                // Long form
                var temp = length;
                var bytesRequired = 0;
                while (temp > 0)
                {
                    temp >>= 8;
                    bytesRequired++;
                }
                stream.Write((byte)(bytesRequired | 0x80));
                for (var i = bytesRequired - 1; i >= 0; i--)
                {
                    stream.Write((byte)(length >> (8 * i) & 0xff));
                }
            }
        }

        static void EncodeIntegerBigEndian(BinaryWriter stream, byte[] value, bool forceUnsigned = true)
        {
            stream.Write((byte)0x02); // INTEGER
            var prefixZeros = 0;
            for (var i = 0; i < value.Length; i++)
            {
                if (value[i] != 0) break;
                prefixZeros++;
            }
            if (value.Length - prefixZeros == 0)
            {
                EncodeLength(stream, 1);
                stream.Write((byte)0);
            }
            else
            {
                if (forceUnsigned && value[prefixZeros] > 0x7f)
                {
                    // Add a prefix zero to force unsigned if the MSB is 1
                    EncodeLength(stream, value.Length - prefixZeros + 1);
                    stream.Write((byte)0);
                }
                else
                {
                    EncodeLength(stream, value.Length - prefixZeros);
                }
                for (var i = prefixZeros; i < value.Length; i++)
                {
                    stream.Write(value[i]);
                }
            }
        }
    }
}


text:
screenshot
==========

A really simple screenshot script to capture an image of a selected window.

Install
-------

`curl -L https://raw.github.com/travisperson/screenshot/master/ss.sh -o ~/bin/ss && chmod +x ~/bin/ss`


text:
module.exports = (query, request) => {
  const data = {
    type: '0',
  }
  return request('POST', `https://music.163.com/api/point/dailyTask`, data, {
    crypto: 'weapi',
    cookie: query.cookie,
    proxy: query.proxy,
    realIP: query.realIP,
  })
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Rules Data Base -->
<rules>
  <rule type="project">
    <name>RULE_1</name>
    <atr>projectNumBoards</atr>
    <function>comparationMax</function>
    <param>p_num_boards</param>
    <text>MESSAGE_1</text>
  </rule>
  <rule type="board">
    <name>RULE_2</name>
    <atr>boardWidth</atr>
    <function>comparationMin</function>
    <param>s_board_width</param>
    <text>MESSAGE_2</text>
  </rule>
  <rule type="board">
    <name>RULE_3</name>
    <atr>boardHeight</atr>
    <function>comparationMin</function>
    <param>s_board_height</param>
    <text>MESSAGE_3</text>
  </rule>
  <rule type="board">
    <name>RULE_4</name>
    <atr>boardNoImage</atr>
    <function>exist</function>
    <param>s_board_noImage</param>
    <text>MESSAGE_4</text>
  </rule>
  <rule type="board">
    <name>RULE_5</name>
    <atr>boardNoImage</atr>
    <function>exist</function>
    <param>p_board_noImage</param>
    <text>MESSAGE_5</text>
  </rule>
  <rule type="board">
    <name>RULE_6</name>
    <atr>boardSound</atr>
    <function>exist</function>
    <param>s_board_sound</param>
    <text>MESSAGE_6</text>
  </rule>
  <rule type="cell">
    <name>RULE_7</name>
    <atr>cellWidth</atr>
    <function>comparationMin</function>
    <param>m_cell_width</param>
    <text>MESSAGE_7</text>
  </rule>
  <rule type="cell">
    <name>RULE_8</name>
    <atr>cellHeight</atr>
    <function>comparationMin</function>
    <param>m_cell_height</param>
    <text>MESSAGE_8</text>
  </rule>
  <rule type="cell">
    <name>RULE_9</name>
    <atr>cellWidth</atr>
    <function>comparationMin</function>
    <param>s_cell_width</param>
    <text>MESSAGE_9</text>
  </rule>
  <rule type="cell">
    <name>RULE_10</name>
    <atr>cellHeight</atr>
    <function>comparationMin</function>
    <param>s_cell_height</param>
    <text>MESSAGE_10</text>
  </rule>
  <rule type="cell">
    <name>RULE_11</name>
    <atr>cellNoImage</atr>
    <function>exist</function>
    <param>p_cell_noImage</param>
    <text>MESSAGE_11</text>
  </rule>
  <rule type="cell">
    <name>RULE_12</name>
    <atr>cellNoImage</atr>
    <function>exist</function>
    <param>s_cell_noImage</param>
    <text>MESSAGE_12</text>
  </rule>
  <rule type="cell">
    <name>RULE_13</name>
    <atr>cellSound</atr>
    <function>exist</function>
    <param>s_cell_sound</param>
    <text>MESSAGE_13</text>
  </rule>
  <rule type="cell">
    <name>RULE_14</name>
    <atr>cellBorderWidth</atr>
    <function>comparationMin</function>
    <param>s_cell_borderWidth</param>
    <text>MESSAGE_14</text>
  </rule>
  <rule type="cell">
    <name>RULE_15</name>
    <atr>cellText</atr>
    <function>exist</function>
    <param>p_cell_text</param>
    <text>MESSAGE_15</text>
  </rule>
  <rule type="cell">
    <name>RULE_16</name>
    <atr>cellTextType</atr>
    <function>type</function>
    <param>p_cell_textType</param>
    <text>MESSAGE_16</text>
  </rule>
  <rule type="cell">
    <name>RULE_17</name>
    <atr>cellTextSize</atr>
    <function>comparationMin</function>
    <param>s_cell_textSize</param>
    <text>MESSAGE_17</text>
  </rule>
  <rule type="cell">
    <name>RULE_18</name>
    <atr>cellTextFont</atr>
    <function>type</function>
    <param>s_cell_textFont</param>
    <text>MESSAGE_18</text>
  </rule>
  <rule type="cell">
    <name>RULE_19</name>
    <atr>cellTextStyle</atr>
    <function>type</function>
    <param>s_cell_textStyle</param>
    <text>MESSAGE_19</text>
  </rule>
  <rule type="cell">
    <name>RULE_20</name>
    <atr>cellLightness</atr>
    <atr2>boardLightness</atr2>
    <function>lightness</function>
    <param>s_lightness_range</param>
    <text>MESSAGE_20</text>
  </rule>
  <rule type="cell">
    <name>RULE_21</name>
    <atr>cellLightness</atr>
    <atr2>cellBorderLightness</atr2>
    <function>lightness</function>
    <param>s_lightness_range</param>
    <text>MESSAGE_21</text>
  </rule>
  <rule type="cell">
    <name>RULE_22</name>
    <atr>cellLightness</atr>
    <atr2>cellTextLightness</atr2>
    <function>lightness</function>
    <param>s_lightness_range</param>
    <text>MESSAGE_22</text>
  </rule>
  <rule type="interpreter">
    <name>RULE_23</name>
    <atr>intMouseBar</atr>
    <function>type</function>
    <param>m_int_mouseBar</param>
    <text>MESSAGE_23</text>
  </rule>
  <rule type="interpreter">
    <name>RULE_24</name>
    <atr>intDelay</atr>
    <function>comparationMax</function>
    <param>m_int_delay</param>
    <text>MESSAGE_24</text>
  </rule>
  <rule type="interpreter">
    <name>RULE_25</name>
    <atr>intAccumulated</atr>
    <function>comparationMax</function>
    <param>p_int_accumulated</param>
    <text>MESSAGE_25</text>
  </rule>
</rules>


text:
<?php
// Arquivo Header
define('APPLICATION_PATH', realpath(dirname(__FILE__)));

header('Content-Type: text/html; charset=utf-8');

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
header("Access-Control-Allow-Headers: X-Requested-With, Content-Type, Origin, Authorization, Accept, Client-Security-Token, Cache-Control, Pragma");
date_default_timezone_set('America/Sao_Paulo');
?>


text:
package com.hellgate;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.util.Base64;
import android.content.Intent;
import android.database.Cursor;
import android.net.Uri;
import android.provider.MediaStore;

import java.io.ByteArrayOutputStream;

public class UnityGalleryActivity {
    private static UnityGalleryActivity instance;

    public static UnityGalleryActivity getInstance() {
        if (instance == null) {
            instance = new UnityGalleryActivity();
        }

        return instance;
    }

    public void openGallery() {
        Intent intent = new Intent();
        intent.setType("image/*");
        intent.setAction(Intent.ACTION_GET_CONTENT);
        com.hellgate.UnityPlayerActivity.getInstance().startActivityForResult(intent, Config.REQUEST_CODE_GALLERY_ACTIVITY);
    }

    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        String path = "";
        Uri uri = data.getData();
        String[] column = {MediaStore.Images.Media.DATA};
        Cursor cursor = com.hellgate.UnityPlayerActivity.getInstance().getContentResolver().query(uri, column, null, null, null);
        cursor.moveToFirst();

        int index = cursor.getColumnIndex(column[0]);
        path = cursor.getString(index);
        cursor.close();

        if (path == null) {
            path = uri.getPath();
        }

        if (path != null) {
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.append(path);
            stringBuilder.append("|");

            String image = "";
            if (path != null) {
                Bitmap bitMap = BitmapFactory.decodeFile(path);
                float aspect = (float)bitMap.getWidth() / (float)bitMap.getHeight();
                float height = 512 / aspect;
                Bitmap scaledBitmap = bitMap.createScaledBitmap(bitMap, 512, (int)height, false);

                ByteArrayOutputStream stream = new ByteArrayOutputStream();
                scaledBitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
                image = Base64.encodeToString(stream.toByteArray(), 0);

                stringBuilder.append(image);
                stringBuilder.append("|");
                stringBuilder.append(bitMap.getWidth());
                stringBuilder.append("|");
                stringBuilder.append(bitMap.getHeight());
            }

            Util.sendMessage(Config.GALLERY_MANAGER, Config.GALLERY_PATH_RECEIVED, stringBuilder.toString());
        }
    }
}


text:
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Configuration;
using System.Diagnostics;
using System.IO;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Text.RegularExpressions;
using System.Xml;
using log4net;

namespace SIPSorcery.Sys
{
    public class AppState : IConfigurationSectionHandler
    {
        public const string CRLF = "\r\n";
        public const string DEFAULT_ERRRORLOG_FILE = @"c:\temp\appstate.error.log";
        public const string ENCRYPTED_SETTING_PREFIX = "$#";
        private const string ENCRYPTED_SETTINGS_CERTIFICATE_NAME = "EncryptedSettingsCertificateName";
        private const string APP_LOGGING_ID = "sipsorcery"; // Name of log4net identifier.

        // From http://fightingforalostcause.net/misc/2006/compare-email-regex.php.
        public const string EMAIL_VALIDATION_REGEX = @"^([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+@((((([a-zA-Z0-9]{1}[a-zA-Z0-9\-]{0,62}[a-zA-Z0-9]{1})|[a-zA-Z])\.)+[a-zA-Z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)$";

        public static ILog logger;		                        // Used to provide logging functionality for the application.

        private static StringDictionary m_appConfigSettings;	// Contains application configuration key, value pairs.
        private static X509Certificate2 m_encryptedSettingsCertificate;
        public static readonly string NewLine = Environment.NewLine;
        public static readonly string CurrentDirectory;

        static AppState()
        {
            try
            {
                try
                {
                    // Initialise logging functionality from an XML node in the app.config file.
                    Console.WriteLine("Starting logging initialisation.");
                    log4net.Config.XmlConfigurator.Configure();
                }
                catch
                {
                    // Unable to load the log4net configuration node (probably invalid XML in the config file).
                    Console.WriteLine("Unable to load logging configuration check that the app.config file exists and is well formed.");

                    try
                    {
                        //EventLog.WriteEntry(APP_LOGGING_ID, "Unable to load logging configuration check that the app.config file exists and is well formed.", EventLogEntryType.Error, 0);
                    }
                    catch (Exception evtLogExcp)
                    {
                        Console.WriteLine("Exception writing logging configuration error to event log. " + evtLogExcp.Message);
                    }

                    // Configure a basic console appender so if there is anyone watching they can still see log messages and to
                    // ensure that any classes using the logger won't get null references.
                    ConfigureConsoleLogger();
                }
                finally
                {
                    try
                    {
                        logger = log4net.LogManager.GetLogger(APP_LOGGING_ID);
                        logger.Debug("Logging initialised.");
                    }
                    catch (Exception excp)
                    {
                        StreamWriter errorLog = new StreamWriter(DEFAULT_ERRRORLOG_FILE, true);
                        errorLog.WriteLine(DateTime.Now.ToString("dd MMM yyyy HH:mm:ss") + " Exception Initialising AppState Logging. " + excp.Message);
                        errorLog.Close();
                    }
                }

                // Initialise the string dictionary to hold the application settings.
                m_appConfigSettings = new StringDictionary();

                CurrentDirectory = Regex.Replace(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase), @"^file:\\", ""); // There's undoubtedly a better way!
            }
            catch (Exception excp)
            {
                StreamWriter errorLog = new StreamWriter(DEFAULT_ERRRORLOG_FILE, true);
                errorLog.WriteLine(DateTime.Now.ToString("dd MMM yyyy HH:mm:ss") + " Exception Initialising AppState. " + excp.Message);
                errorLog.Close();
            }
        }

        public static ILog GetLogger(string logName)
        {
            return log4net.LogManager.GetLogger(logName);
        }

        /// <summary>
        /// Configures the logging object to use a console logger. This would normally be used
        /// as a fallback when either the application does not have any logging configuration
        /// or there is an error in it.
        /// </summary>
        public static void ConfigureConsoleLogger()
        {
            log4net.Appender.ConsoleAppender appender = new log4net.Appender.ConsoleAppender();

            log4net.Layout.ILayout fallbackLayout = new log4net.Layout.PatternLayout("%m%n");
            appender.Layout = fallbackLayout;

            log4net.Config.BasicConfigurator.Configure(appender);
        }

        /// <summary>
        /// Wrapper around the object holding the application configuration settings extracted
        /// from the App.Config file.
        /// </summary>
        /// <param name="key">The name of the configuration setting wanted.</param>
        /// <returns>The value of the configuration setting.</returns>
        public static string GetConfigSetting(string key)
        {
            try
            {
                if (m_appConfigSettings != null && m_appConfigSettings.ContainsKey(key))
                {
                    return m_appConfigSettings[key];
                }
                else
                {
                    string setting = ConfigurationManager.AppSettings[key];

                    if (!setting.IsNullOrBlank())
                    {
                        if (setting.StartsWith(ENCRYPTED_SETTING_PREFIX))
                        {
                            logger.Debug("Decrypting appSetting " + key + ".");

                            X509Certificate2 encryptedSettingsCertificate = GetEncryptedSettingsCertificate();
                            if (encryptedSettingsCertificate != null)
                            {
                                if (encryptedSettingsCertificate.HasPrivateKey)
                                {
                                    logger.Debug("Private key on encrypted settings certificate is available.");

                                    setting = setting.Substring(2);
                                    byte[] encryptedBytes = Convert.FromBase64String(setting);
                                    RSACryptoServiceProvider rsa = (RSACryptoServiceProvider)encryptedSettingsCertificate.PrivateKey;
                                    byte[] plainTextBytes = rsa.Decrypt(encryptedBytes, false);
                                    setting = Encoding.ASCII.GetString(plainTextBytes);

                                    logger.Debug("Successfully decrypted appSetting " + key + ".");
                                }
                                else
                                {
                                    throw new ApplicationException("Could not access private key on encrypted settings certificate.");
                                }
                            }
                            else
                            {
                                throw new ApplicationException("Could not load the encrypted settings certificate to decrypt setting " + key + ".");
                            }
                        }

                        m_appConfigSettings[key] = setting;
                        return setting;
                    }
                    else
                    {
                        return null;
                    }
                }
            }
            catch (Exception excp)
            {
                logger.Error("Exception AppState.GetSetting. " + excp.Message);
                throw;
            }
        }

        public static bool GetConfigSettingAsBool(string key)
        {
            bool boolVal = false;
            Boolean.TryParse(GetConfigSetting(key), out boolVal);
            return boolVal;
        }

        public static string GetConfigNodeValue(XmlNode configNode, string nodeName)
        {
            XmlNode valueNode = configNode.SelectSingleNode(nodeName);
            if (valueNode != null)
            {
                if (valueNode.Attributes.GetNamedItem("value") != null)
                {
                    return valueNode.Attributes.GetNamedItem("value").Value;
                }
            }

            return null;
        }

        public static object GetSection(string sectionName)
        {
            return ConfigurationManager.GetSection(sectionName);
        }

        /// <summary>
        /// Attempts to load an X509 certificate from a Windows OS certificate store.
        /// </summary>
        /// <param name="storeLocation">The certificate store to load from, can be CurrentUser or LocalMachine.</param>
        /// <param name="certificateSubject">The subject name of the certificate to attempt to load.</param>
        /// <param name="checkValidity">Checks if the certificate is current and has a verifiable certificate issuer list. Should be
        /// set to false for self issued certificates.</param>
        /// <returns>A certificate object if the load is successful otherwise null.</returns>
        public static X509Certificate2 LoadCertificate(StoreLocation storeLocation, string certificateSubject, bool checkValidity)
        {
            X509Store store = new X509Store(storeLocation);
            logger.Debug("Certificate store " + store.Location + " opened");
            store.Open(OpenFlags.OpenExistingOnly);
            X509Certificate2Collection collection = store.Certificates.Find(X509FindType.FindBySubjectName, certificateSubject, checkValidity);
            if (collection != null && collection.Count > 0)
            {
                X509Certificate2 serverCertificate = collection[0];
                bool verifyCert = serverCertificate.Verify();
                logger.Debug("X509 certificate loaded from current user store, subject=" + serverCertificate.Subject + ", valid=" + verifyCert + ".");
                return serverCertificate;
            }
            else
            {
                logger.Warn("X509 certificate with subject name=" + certificateSubject + ", not found in " + store.Location + " store.");
                return null;
            }
        }

        private static X509Certificate2 GetEncryptedSettingsCertificate()
        {
            try
            {
                if (m_encryptedSettingsCertificate == null)
                {
                    string encryptedSettingsCertName = ConfigurationManager.AppSettings[ENCRYPTED_SETTINGS_CERTIFICATE_NAME];
                    if (!encryptedSettingsCertName.IsNullOrBlank())
                    {
                        X509Certificate2 encryptedSettingsCertificate = LoadCertificate(StoreLocation.LocalMachine, encryptedSettingsCertName, false);
                        if (encryptedSettingsCertificate != null)
                        {
                            logger.Debug("Encrypted settings certificate successfully loaded for " + encryptedSettingsCertName + ".");
                            m_encryptedSettingsCertificate = encryptedSettingsCertificate;
                        }
                        else
                        {
                            logger.Error("Could not load the encrypted settings certificate for " + encryptedSettingsCertName + ".");
                        }
                    }
                    else
                    {
                        logger.Error("Could not load the encrypted settings certificate, no " + ENCRYPTED_SETTINGS_CERTIFICATE_NAME + " setting found.");
                    }
                }

                return m_encryptedSettingsCertificate;
            }
            catch (Exception excp)
            {
                logger.Error("Exception AppState.GetEncryptedSettingsCertificate. " + excp.Message);
                return null;
            }
        }

        /// <summary>
        /// Checks whether a file path represents a relative or absolute path and if it's relative converts it to
        /// an absolute one by prefixing it with the application's base directory.
        /// </summary>
        /// <param name="filePath">The file path to check.</param>
        /// <returns>An absolute file path.</returns>
        public static string ToAbsoluteFilePath(string filePath)
        {
            if (filePath.IsNullOrBlank())
            {
                return null;
            }

            if (!filePath.Contains(":"))
            {
                // Relative path.
                filePath = AppDomain.CurrentDomain.BaseDirectory + filePath;
            }

            return filePath;
        }

        /// <summary>
        /// Checks whether a directory path represents a relative or absolute path and if it's relative converts it to
        /// an absolute one by prefixing it with the application's base directory.
        /// </summary>
        /// <param name="directoryPath">The directory path to check.</param>
        /// <returns>An absolute directory path.</returns>
        public static string ToAbsoluteDirectoryPath(string directoryPath)
        {
             if (directoryPath.IsNullOrBlank())
            {
                return null;
            }

            if (!directoryPath.Contains(":"))
            {
                // Relative path.
                directoryPath = AppDomain.CurrentDomain.BaseDirectory + directoryPath;
            }

            if (!directoryPath.EndsWith(@"\"))
            {
                directoryPath += @"\";
            }

            return directoryPath;
        }

        /// <summary>
        /// Handler for processing the App.Config file and retrieving a custom XML node.
        /// </summary>
        public object Create(object parent, object context, XmlNode configSection)
        {
            return configSection;
        }
    }
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Bull. N. Z. Dept. Sci. Industr. Res. , Pl. Dis. Div. 164: 137 (1965)

#### Original name
Trametes sepium Berk., 1847

### Remarks
null


text:
import React from "react";
import MapView from "react-native-map-clustering";
import { Marker } from "react-native-maps";

function getRandomLatitude(min = 48, max = 56) {
  return Math.random() * (max - min) + min;
}

function getRandomLongitude(min = 14, max = 24) {
  return Math.random() * (max - min) + min;
}

const INITIAL_REGION = {
  latitude: 52.5,
  longitude: 19.2,
  latitudeDelta: 8.5,
  longitudeDelta: 8.5
};

const App = () => {
  const _generateMarkers = count => {
    const markers = [];

    for (let i = 0; i < count; i++) {
      markers.push(
        <Marker
          key={i}
          coordinate={{
            latitude: getRandomLatitude(),
            longitude: getRandomLongitude()
          }}
        />
      );
    }

    return markers;
  };

  return (
    <MapView initialRegion={INITIAL_REGION} style={{ flex: 1 }}>
      {_generateMarkers(200)}
    </MapView>
  );
};

export default App;


text:
namespace Azure.ResourceManager.Datadog.Models
{
    /// <summary> The DatadogSetPasswordLink. </summary>
    public partial class DatadogSetPasswordLink
    {
        /// <summary> Initializes a new instance of DatadogSetPasswordLink. </summary>
        internal DatadogSetPasswordLink()
        {
        }

        /// <summary> Initializes a new instance of DatadogSetPasswordLink. </summary>
        /// <param name="setPasswordLink"></param>
        internal DatadogSetPasswordLink(string setPasswordLink)
        {
            SetPasswordLink = setPasswordLink;
        }

        /// <summary> Gets the set password link. </summary>
        public string SetPasswordLink { get; }
    }
}


text:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Polaroid Image Border</title>
<meta charset="utf-8" />
<style type="text/css">
img.polaroid {
	background: #000; /*Change this to a background image or remove*/
	border: solid #fff;
	border-width: 6px 6px 20px 6px;
	box-shadow: 1px 1px 5px #333;
	/* Standard blur at 5px. Increase for more depth */
	-webkit-box-shadow: 1px 1px 5px #333;
	-moz-box-shadow: 1px 1px 5px #333;
}
</style>
</head>
<body>
	<img src="https://www.google.com/images/srpr/logo4w.png" alt="Google" class="polaroid"/>
</body>
</html>


text:
#include "Widget.h"
#include <QHBoxLayout>
#include <QScrollBar>
#include <QVBoxLayout>
#include <QtDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
{
    QHBoxLayout *mainLayout = new QHBoxLayout();
    _mapView = new QMMapView(QMMapView::RoadMap,
                             QMCoordinate(25.047795, 121.516900),
                             9);
    _controls = new QWidget();
    buildControls();
    mainLayout->addWidget(_mapView, 1);
    mainLayout->addWidget(_controls, 1);
    setLayout(mainLayout);

    resize(1200, 600);
    connect(_mapView, SIGNAL(mapLoaded()), this, SLOT(onMapLoaded()));
    connect(_mapView, SIGNAL(regionChanged(QMCoordinateRegion)),
            this, SLOT(onRegionChanged(QMCoordinateRegion)));
    connect(_mapView, SIGNAL(mapBecameIdle()), this, SLOT(onMapBecameIdle()));
}

Widget::~Widget()
{

}

void Widget::buildControls()
{
    QVBoxLayout *mainLayout = new QVBoxLayout();
    _logger = new QTextEdit();
    _logger->setReadOnly(true);
    mainLayout->addWidget(_logger, 1);
    _controls->setLayout(mainLayout);
}

void Widget::log(QString text, QString delimiter)
{
    _logger->setPlainText(_logger->toPlainText() + delimiter + text);
    _logger->verticalScrollBar()->setSliderPosition(    // Scroll to bottom
                _logger->verticalScrollBar()->maximum());
}

void Widget::log(const char *text, QString delimiter)
{
    log(QString(text), delimiter);
}

void Widget::onMapLoaded()
{
    log("Loaded:");
    log(QString("Type %1 at (%2, %3) , zoom %4").arg(
            QString::number(_mapView->mapType()),
            QString::number(_mapView->center().latitude()),
            QString::number(_mapView->center().longitude()),
            QString::number(_mapView->zoomLevel())),
        " ");
}

void Widget::onMapBecameIdle()
{
    log("Idle");
}

void Widget::onRegionChanged(QMCoordinateRegion region)
{
    log("Region changed:");
    log(QString("((%1, %2), (%3, %4))").arg(
            QString::number(region.northWest().latitude()),
            QString::number(region.west()),
            QString::number(region.south()),
            QString::number(region.southEast().longitude())),
        " ");
}


text:
namespace KeepyUppy.Interop
{
    public class TestUrlProvider : IUrlProvider
    {
        public string BackplaneUrl { get { return "http://localhost:8888/"; } }
        public string ServiceUrl { get { return "http://localhost:8889/"; } }
    }
}


text:
<resources>
    <string name="app_name">"WunderButton"</string>
    <string name="title_activity_addproduct">"Выбор продукта"</string>
    <string name="title_activity_selectlist">"Выберите список из Wunderlist"</string>

    <string name="action_change_list">"Сменить список"</string>
    <string name="add_item">"Добавить продукт"</string>
    <string name="product_added">"Продукт добавлен"</string>
    <string name="lets_create_list">"Давайте сначала создадим список, в Wunderlist "</string>
    <string name="action_refresh">"Обновить"</string>

	    <string name="def_products">Туалетная бумага|Стиральный порошок|Зубная паста|Шампунь</string>
</resources>


text:
<?php

class Twig_Tests_Loader_FilesystemTest extends PHPUnit_Framework_TestCase
{
    /**
     * @dataProvider getSecurityTests
     */
    public function testSecurity($template)
    {
        $loader = new Twig_Loader_Filesystem(array(dirname(__FILE__).'/../Fixtures'));

        try {
            $loader->getCacheKey($template);
            $this->fail();
        } catch (Twig_Error_Loader $e) {
            $this->assertNotContains('Unable to find template', $e->getMessage());
        }
    }

    public function getSecurityTests()
    {
        return array(
            array("AutoloaderTest\0.php"),
            array('..\\AutoloaderTest.php'),
            array('..\\\\\\AutoloaderTest.php'),
            array('../AutoloaderTest.php'),
            array('..////AutoloaderTest.php'),
            array('./../AutoloaderTest.php'),
            array('.\\..\\AutoloaderTest.php'),
            array('././././././../AutoloaderTest.php'),
            array('.\\./.\\./.\\./../AutoloaderTest.php'),
            array('foo/../../AutoloaderTest.php'),
            array('foo\\..\\..\\AutoloaderTest.php'),
            array('foo/../bar/../../AutoloaderTest.php'),
            array('foo/bar/../../../AutoloaderTest.php'),
            array('filters/../../AutoloaderTest.php'),
            array('filters//..//..//AutoloaderTest.php'),
            array('filters\\..\\..\\AutoloaderTest.php'),
            array('filters\\\\..\\\\..\\\\AutoloaderTest.php'),
            array('filters\\//../\\/\\..\\AutoloaderTest.php'),
            array('/../AutoloaderTest.php'),
        );
    }

    public function testPaths()
    {
        $basePath = dirname(__FILE__).'/Fixtures';

        $loader = new Twig_Loader_Filesystem(array($basePath.'/normal', $basePath.'/normal_bis'));
        $loader->setPaths(array($basePath.'/named', $basePath.'/named_bis'), 'named');
        $loader->addPath($basePath.'/named_ter', 'named');
        $loader->addPath($basePath.'/normal_ter');
        $loader->prependPath($basePath.'/normal_final');
        $loader->prependPath($basePath.'/named_final', 'named');

        $this->assertEquals(array(
            $basePath.'/normal_final',
            $basePath.'/normal',
            $basePath.'/normal_bis',
            $basePath.'/normal_ter',
        ), $loader->getPaths());
        $this->assertEquals(array(
            $basePath.'/named_final',
            $basePath.'/named',
            $basePath.'/named_bis',
            $basePath.'/named_ter',
        ), $loader->getPaths('named'));

        $this->assertEquals("path (final)\n", $loader->getSource('index.html'));
        $this->assertEquals("path (final)\n", $loader->getSource('@__main__/index.html'));
        $this->assertEquals("named path (final)\n", $loader->getSource('@named/index.html'));
    }

    public function testGetNamespaces()
    {
        $loader = new Twig_Loader_Filesystem(sys_get_temp_dir());
        $this->assertEquals(array('__main__'), $loader->getNamespaces());

        $loader->addPath(sys_get_temp_dir(), 'named');
        $this->assertEquals(array('__main__', 'named'), $loader->getNamespaces());
    }
}


text:
package target.aula.cursoandroid.telegram;

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

public class From {

    private Integer id;
    private String firstName;
    private String lastName;
    private String username;
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Map<String, Object> getAdditionalProperties() {
        return this.additionalProperties;
    }

    public void setAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
    }

}


text:
typedef struct
{
	float r;
	float g;
	float b;
	float shininess;
	float shinstr;
	UBYTE alpha;		// IMP_ALPHA_*
	UBYTE sided;		// IMP_SIDED_*
	UBYTE has_texture;	// There is a texture
	UBYTE has_bumpmap;	// There is a bumpmap
	CBYTE tname[32];	// The texture filename or "none"
	CBYTE bname[32];	// The bumpmap filename or "none"

	//
	// Put extra stuff in here if you want...
	//

	OS_Texture *ot_tex;		// For the texture.
	OS_Texture *ot_bpos;	// For the bumpmap.
	OS_Texture *ot_bneg;	// For 1 - the bumpmap.

	OS_Buffer  *ob;

} IMP_Mat;

typedef struct
{
	float x;
	float y;
	float z;

	//
	// Add extra fields here if you want.
	//

	float lu;
	float lv;

} IMP_Vert;

typedef struct
{
	float u;
	float v;

} IMP_Tvert;

//
// Only faces of the same smoothing group with the same material
// and the same uvs share vertices.
//

typedef struct
{
	float u;
	float v;

	float nx;
	float ny;
	float nz;

	float dxdu;
	float dydu;
	float dzdu;

	float dxdv;
	float dydv;
	float dzdv;

	UWORD vert;	// Index into the vertex array for position.
	UWORD mat;	// The material of the faces that use this shared vertex.

	//
	// Add extra fields here if you want.
	//

	//
	// Lighting.
	//

	ULONG colour;
	ULONG specular;

	float lu;
	float lv;

	//
	// Bumpmapping.
	//

	float du;
	float dv;

} IMP_Svert;

#define IMP_FACE_FLAG_EDGE		(1 << 0)
#define IMP_FACE_FLAG_EDGE_A	(1 << 0)
#define IMP_FACE_FLAG_EDGE_B	(1 << 1)
#define IMP_FACE_FLAG_EDGE_C	(1 << 2)
#define IMP_FACE_FLAG_QUADDED	(1 << 3)	// This face is part of a quad.
#define IMP_FACE_FLAG_BACKFACE	(1 << 4)	// EXTRA FLAG! Not set by the importer...

typedef struct
{
	UWORD v[3];		// Index into the vertex array.
	UWORD t[3];		// index into the texture vertex array.
	UWORD s[3];		// Index into the shared vertex array.
	UBYTE mat;		// Index info the material array
	UBYTE flag;
	ULONG group;

	float nx;
	float ny;
	float nz;

	float dxdu;
	float dydu;
	float dzdu;

	float dxdv;
	float dydv;
	float dzdv;

} IMP_Face;

//
// Using the edge flags exported from MAX to find quads.
//

typedef struct
{
	UWORD v[4];

} IMP_Quad;

//
// The edges of the mesh. Which vertices they are between and the
// face that lies on each edge.
//

typedef struct
{
	UWORD v1;
	UWORD v2;
	UWORD f1;
	UWORD f2;	// 0xffff => The edge belongs to only one face.

} IMP_Edge;

//
// All the visible edges of the mesh.
//

typedef struct
{
	UWORD v1;
	UWORD v2;

} IMP_Line;

typedef struct
{
	SLONG      valid;
	CBYTE      name[32];
	SLONG      num_mats;
	SLONG      num_verts;
	SLONG      num_tverts;
	SLONG      num_faces;
	SLONG      num_sverts;
	SLONG      num_quads;
	SLONG      num_edges;
	SLONG      num_lines;
	IMP_Mat   *mat;
	IMP_Vert  *vert;
	IMP_Tvert *tvert;
	IMP_Face  *face;
	IMP_Svert *svert;
	IMP_Quad  *quad;
	IMP_Edge  *edge;
	IMP_Line  *line;

	//
	// The bounding box and bounding sphere of the mesh.
	//

	float min_x;
	float min_y;
	float min_z;
	float max_x;
	float max_y;
	float max_z;
	float radius;

	//
	// For backing-up when we rotate.
	//

	IMP_Vert  *old_vert;
	IMP_Svert *old_svert;

} IMP_Mesh;

IMP_Mesh IMP_load(CBYTE *fname, float scale = 1.0F);

//
// All the arrays in the IMP_Mesh structure are dynamically allocated.
// This function frees up all that memory.
//

void IMP_free(IMP_Mesh *im);

//
// Loads and saves a binary version of the mesh.
//

SLONG    IMP_binary_save(CBYTE *fname, IMP_Mesh *im);	// Returns FALSE on failure.
IMP_Mesh IMP_binary_load(CBYTE *fname);

#endif


text:
package com.voxelwind.server.network.rcon;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;

import java.nio.ByteOrder;

public class RconEncoder extends MessageToByteEncoder<RconMessage> {
    @Override
    protected void encode(ChannelHandlerContext ctx, RconMessage message, ByteBuf buf) throws Exception {
        ByteBuf leBuf = buf.order(ByteOrder.LITTLE_ENDIAN);
        // 4 bytes ID, 4 bytes type, 2 bytes of terminating zero(!)
        int fullLength = 10 + message.getBody().length();

        leBuf.writeInt(fullLength);
        leBuf.writeInt(message.getId());
        leBuf.writeInt(message.getType());
        ByteBufUtil.writeUtf8(leBuf, message.getBody());
        // 2 null bytes
        leBuf.writeByte(0);
        leBuf.writeByte(0);
    }
}


text:
<?php

namespace Common\Domain\Factory;

interface FactoryInterface
{
    /**
     * Function create
     *
     * @return mixed
     *
     * @access public
     */
    public function create();
}


text:
=========================
Rule ``phpdoc_no_access``
=========================

``@access`` annotations should be omitted from PHPDoc.

Examples
--------

Example #1
~~~~~~~~~~

.. code-block:: diff

   --- Original
   +++ New
   @@ -3,7 +3,6 @@
    {
        /**
         * @internal
   -     * @access private
         */
        private $bar;
    }

Rule sets
---------

The rule is part of the following rule sets:

@Symfony
  Using the ``@Symfony`` rule set will enable the ``phpdoc_no_access`` rule.

@PhpCsFixer
  Using the ``@PhpCsFixer`` rule set will enable the ``phpdoc_no_access`` rule.


text:
using System.ComponentModel.Composition;
using System.Windows.Media;
using Microsoft.VisualStudio.Text.Classification;
using Microsoft.VisualStudio.Utilities;

namespace hsp.vs
{

    #region Format definition

    /// <summary>
    ///     Defines an editor format for the HSPClassifier type that has a purple background
    ///     and is underlined.
    /// </summary>
    [Export(typeof (EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "HSPClassifierValidFormat")]
    [Name("HSPClassifierValidFormat")]
    [UserVisible(true)] //this should be visible to the end user
    [Order(Before = Priority.Default)] //set the priority to be after the default classifiers
    internal sealed class HSPClassifierValidFormat : ClassificationFormatDefinition
    {
        /// <summary>
        ///     Defines the visual format for the "HSPClassifier" classification type
        /// </summary>
        public HSPClassifierValidFormat()
        {
            DisplayName = "HSPClassifierValidFormat"; //human readable version of the name
            ForegroundColor = Colors.Blue;
        }
    }

    [Export(typeof (EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "HSPClassifierNormalFormat")]
    [Name("HSPClassifierNormalFormat")]
    [UserVisible(true)] //this should be visible to the end user
    [Order(Before = Priority.Default)] //set the priority to be after the default classifiers
    internal sealed class HSPClassifierNormalFormat : ClassificationFormatDefinition
    {
        /// <summary>
        ///     Defines the visual format for the "HSPClassifier" classification type
        /// </summary>
        public HSPClassifierNormalFormat()
        {
            DisplayName = "HSPClassifierNormalFormat"; //human readable version of the name
            ForegroundColor = Colors.Black;
        }
    }

    [Export(typeof (EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "HSPClassifierCommentOutFormat")]
    [Name("HSPClassifierCommentOutFormat")]
    [UserVisible(true)] //this should be visible to the end user
    [Order(Before = Priority.Default)] //set the priority to be after the default classifiers
    internal sealed class HSPClassifierCommentOutFormat : ClassificationFormatDefinition
    {
        /// <summary>
        ///     Defines the visual format for the "HSPClassifier" classification type
        /// </summary>
        public HSPClassifierCommentOutFormat()
        {
            DisplayName = "HSPClassifierCommentOutFormat"; //human readable version of the name
            ForegroundColor = Colors.Gray;
        }
    }

    [Export(typeof (EditorFormatDefinition))]
    [ClassificationType(ClassificationTypeNames = "HSPClassifierKeywordFormat")]
    [Name("HSPClassifierKeywordFormat")]
    [UserVisible(true)] //this should be visible to the end user
    [Order(Before = Priority.Default)] //set the priority to be after the default classifiers
    internal sealed class HSPClassifierKeywordFormat : ClassificationFormatDefinition
    {
        /// <summary>
        ///     Defines the visual format for the "HSPClassifier" classification type
        /// </summary>
        public HSPClassifierKeywordFormat()
        {
            DisplayName = "HSPClassifierKeywordFormat"; //human readable version of the name
            ForegroundColor = Colors.DarkGreen;
        }
    }

    #endregion //Format definition
}


text:
/*-------------------------------------------------------------------------
 *
 * Created:	H5Edeprec.c
 *		April 11 2007
 *		Quincey Koziol <koziol@hdfgroup.org>
 *
 * Purpose:	Deprecated functions from the H5E interface.  These
 *              functions are here for compatibility purposes and may be
 *              removed in the future.  Applications should switch to the
 *              newer APIs.
 *
 *-------------------------------------------------------------------------
 */

/****************/
/* Module Setup */
/****************/

#include "H5Emodule.h"          /* This source code file is part of the H5E module */

/***********/
/* Headers */
/***********/
#include "H5private.h"		/* Generic Functions			*/
#include "H5Iprivate.h"		/* IDs                                  */
#include "H5Epkg.h"		/* Error handling		  	*/
#include "H5FLprivate.h"	/* Free lists                           */
#include "H5MMprivate.h"	/* Memory management			*/

/****************/
/* Local Macros */
/****************/

/******************/
/* Local Typedefs */
/******************/

/********************/
/* Package Typedefs */
/********************/

/********************/
/* Local Prototypes */
/********************/

/*********************/
/* Package Variables */
/*********************/

/*****************************/
/* Library Private Variables */
/*****************************/

/*******************/
/* Local Variables */
/*******************/

#ifndef H5_NO_DEPRECATED_SYMBOLS

/*-------------------------------------------------------------------------
 * Function:	H5Eget_major
 *
 * Purpose:	Retrieves a major error message.
 *
 * Return:      Returns message if succeeds.
 *              otherwise returns NULL.
 *
 * Programmer:	Raymond Lu
 *              Friday, July 14, 2003
 *
 *-------------------------------------------------------------------------
 */
char *
H5Eget_major(H5E_major_t maj)
{
    H5E_msg_t   *msg;           /* Pointer to error message */
    ssize_t      size;
    H5E_type_t  type;
    char        *msg_str = NULL;
    char        *ret_value;     /* Return value */

    FUNC_ENTER_API_NOCLEAR(NULL)
    H5TRACE1("*s", "i", maj);

    /* Get the message object */
    if(NULL == (msg = (H5E_msg_t *)H5I_object_verify(maj, H5I_ERROR_MSG)))
	HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID")

    /* Get the size & type of the message's text */
    if((size = H5E_get_msg(msg, &type, NULL, (size_t)0)) < 0)
	HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
    if(type != H5E_MAJOR)
	HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a major one")

    /* Application will free this */
    size++;
    msg_str = (char *)H5MM_malloc((size_t)size);

    /* Get the text for the message */
    if(H5E_get_msg(msg, NULL, msg_str, (size_t)size) < 0)
	HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")

    ret_value = msg_str;

done:
    if(!ret_value)
        msg_str = (char *)H5MM_xfree(msg_str);

    FUNC_LEAVE_API(ret_value)
} /* end H5Eget_major() */

/*-------------------------------------------------------------------------
 * Function:	H5Eget_minor
 *
 * Purpose:	Retrieves a minor error message.
 *
 * Return:      Returns message if succeeds.
 *              otherwise returns NULL.
 *
 * Programmer:	Raymond Lu
 *              Friday, July 14, 2003
 *
 *-------------------------------------------------------------------------
 */
char *
H5Eget_minor(H5E_minor_t min)
{
    H5E_msg_t   *msg;           /* Pointer to error message */
    ssize_t      size;
    H5E_type_t  type;
    char        *msg_str = NULL;
    char        *ret_value;     /* Return value */

    FUNC_ENTER_API_NOCLEAR(NULL)
    H5TRACE1("*s", "i", min);

    /* Get the message object */
    if(NULL == (msg = (H5E_msg_t *)H5I_object_verify(min, H5I_ERROR_MSG)))
	HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID")

    /* Get the size & type of the message's text */
    if((size = H5E_get_msg(msg, &type, NULL, (size_t)0)) < 0)
	HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
    if(type != H5E_MINOR)
	HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a minor one")

    /* Application will free this */
    size++;
    msg_str = (char *)H5MM_malloc((size_t)size);

    /* Get the text for the message */
    if(H5E_get_msg(msg, NULL, msg_str, (size_t)size) < 0)
	HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")

    ret_value = msg_str;

done:
    if(!ret_value)
        msg_str = (char *)H5MM_xfree(msg_str);

    FUNC_LEAVE_API(ret_value)
} /* end H5Eget_minor() */

/*-------------------------------------------------------------------------
 * Function:	H5Epush1
 *
 * Purpose:	This function definition is for backward compatibility only.
 *              It doesn't have error stack and error class as parameters.
 *              The old definition of major and minor is casted as HID_T
 *              in H5Epublic.h
 *
 * Notes: 	Basically a public API wrapper around the H5E_push2
 *              function.  For backward compatibility, it maintains the
 *              same parameter as the old function, in contrary to
 *              H5Epush2.
 *
 * Return:	Non-negative on success/Negative on failure
 *
 * Programmer:	Raymond Lu
 *		Tuesday, Sep 16, 2003
 *
 *-------------------------------------------------------------------------
 */
herr_t
H5Epush1(const char *file, const char *func, unsigned line,
        H5E_major_t maj, H5E_minor_t min, const char *str)
{
    herr_t	ret_value = SUCCEED;    /* Return value */

    /* Don't clear the error stack! :-) */
    FUNC_ENTER_API_NOCLEAR(FAIL)
    H5TRACE6("e", "*s*sIuii*s", file, func, line, maj, min, str);

    /* Push the error on the default error stack */
    if(H5E__push_stack(NULL, file, func, line, H5E_ERR_CLS_g, maj, min, str) < 0)
        HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't push error on stack")

done:
    FUNC_LEAVE_API(ret_value)
} /* end H5Epush1() */

/*-------------------------------------------------------------------------
 * Function:	H5Eclear1
 *
 * Purpose:	This function is for backward compatibility.
 *              Clears the error stack for the specified error stack.
 *
 * Return:	Non-negative on success/Negative on failure
 *
 * Programmer:	Raymond Lu
 *              Wednesday, July 16, 2003
 *
 *-------------------------------------------------------------------------
 */
herr_t
H5Eclear1(void)
{
    herr_t ret_value = SUCCEED; /* Return value */

    /* Don't clear the error stack! :-) */
    FUNC_ENTER_API_NOCLEAR(FAIL)
    H5TRACE0("e","");

    /* Clear the default error stack */
    if(H5E_clear_stack(NULL) < 0)
        HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't clear error stack")

done:
    FUNC_LEAVE_API(ret_value)
} /* end H5Eclear1() */

/*-------------------------------------------------------------------------
 * Function:	H5Eprint1
 *
 * Purpose:	This function is for backward compatibility.
 *              Prints the error stack in some default way.  This is just a
 *		convenience function for H5Ewalk() with a function that
 *		prints error messages.  Users are encouraged to write there
 *		own more specific error handlers.
 *
 * Return:	Non-negative on success/Negative on failure
 *
 * Programmer:	Raymond Lu
 *              Sep 16, 2003
 *
 *-------------------------------------------------------------------------
 */
herr_t
H5Eprint1(FILE *stream)
{
    H5E_t   *estack;            /* Error stack to operate on */
    herr_t ret_value = SUCCEED; /* Return value */

    /* Don't clear the error stack! :-) */
    FUNC_ENTER_API_NOCLEAR(FAIL)
    /*NO TRACE*/

    if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
        HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")

    /* Print error stack */
    if(H5E_print(estack, stream, TRUE) < 0)
        HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't display error stack")

done:
    FUNC_LEAVE_API(ret_value)
} /* end H5Eprint1() */

/*-------------------------------------------------------------------------
 * Function:	H5Ewalk1
 *
 * Purpose:	This function is for backward compatibility.
 *              Walks the error stack for the current thread and calls some
 *		function for each error along the way.
 *
 * Return:	Non-negative on success/Negative on failure
 *
 * Programmer:	Raymond Lu
 *              Sep 16, 2003
 *
 *-------------------------------------------------------------------------
 */
herr_t
H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func, void *client_data)
{
    H5E_t   *estack;            /* Error stack to operate on */
    H5E_walk_op_t walk_op;      /* Error stack walking callback */
    herr_t ret_value = SUCCEED; /* Return value */

    /* Don't clear the error stack! :-) */
    FUNC_ENTER_API_NOCLEAR(FAIL)
    /*NO TRACE*/

    if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
        HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")

    /* Walk the error stack */
    walk_op.vers = 1;
    walk_op.u.func1 = func;
    if(H5E_walk(estack, direction, &walk_op, client_data) < 0)
        HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack")

done:
    FUNC_LEAVE_API(ret_value)
} /* end H5Ewalk1() */

/*-------------------------------------------------------------------------
 * Function:	H5Eget_auto1
 *
 * Purpose:	This function is for backward compatibility.
 *              Returns the current settings for the automatic error stack
 *		traversal function and its data for specific error stack.
 *		Either (or both) arguments may be null in which case the
 *		value is not returned.
 *
 * Return:	Non-negative on success/Negative on failure
 *
 * Programmer:	Raymond Lu
 *              Sep 16, 2003
 *
 * Modification:Raymond Lu
 *              4 October 2010
 *              If the printing function isn't the default H5Eprint1 or 2,
 *              and H5Eset_auto2 has been called to set the new style
 *              printing function, a call to H5Eget_auto1 should fail.
 *-------------------------------------------------------------------------
 */
herr_t
H5Eget_auto1(H5E_auto1_t *func, void **client_data)
{
    H5E_t   *estack;            /* Error stack to operate on */
    H5E_auto_op_t auto_op;      /* Error stack operator */
    herr_t ret_value = SUCCEED;   /* Return value */

    FUNC_ENTER_API(FAIL)
    H5TRACE2("e", "*x**x", func, client_data);

    /* Retrieve default error stack */
    if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
        HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")

    /* Get the automatic error reporting information */
    if(H5E_get_auto(estack, &auto_op, client_data) < 0)
        HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info")

    /* Fail if the printing function isn't the default(user-set) and set through H5Eset_auto2 */
    if(!auto_op.is_default && auto_op.vers == 2)
        HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "wrong API function, H5Eset_auto2 has been called")

    if(func)
        *func = auto_op.func1;

done:
    FUNC_LEAVE_API(ret_value)
} /* end H5Eget_auto1() */

/*-------------------------------------------------------------------------
 * Function:	H5Eset_auto1
 *
 * Purpose:	This function is for backward compatibility.
 *              Turns on or off automatic printing of errors for certain
 *              error stack.  When turned on (non-null FUNC pointer) any
 *              API function which returns an error indication will first
 *              call FUNC passing it CLIENT_DATA as an argument.
 *
 *		The default values before this function is called are
 *		H5Eprint1() with client data being the standard error stream,
 *		stderr.
 *
 *		Automatic stack traversal is always in the H5E_WALK_DOWNWARD
 *		direction.
 *
 * Return:	Non-negative on success/Negative on failure
 *
 * Programmer:	Raymond Lu
 *              Sep 16, 2003
 *
 * Modification:Raymond Lu
 *              4 October 2010
 *              If the FUNC is H5Eprint2, put the IS_DEFAULT flag on.
 *-------------------------------------------------------------------------
 */
herr_t
H5Eset_auto1(H5E_auto1_t func, void *client_data)
{
    H5E_t   *estack;            /* Error stack to operate on */
    H5E_auto_op_t auto_op;      /* Error stack operator */
    herr_t ret_value = SUCCEED; /* Return value */

    /* Don't clear the error stack! :-) */
    FUNC_ENTER_API_NOCLEAR(FAIL)
    H5TRACE2("e", "x*x", func, client_data);

    if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
        HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")

    /* Get the automatic error reporting information */
    if(H5E_get_auto(estack, &auto_op, NULL) < 0)
        HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info")

    /* Set the automatic error reporting information */
    auto_op.vers = 1;
    if(func != auto_op.func1_default)
        auto_op.is_default = FALSE;
    else
        auto_op.is_default = TRUE;
    auto_op.func1 = func;

    if(H5E_set_auto(estack, &auto_op, client_data) < 0)
        HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't set automatic error info")

done:
    FUNC_LEAVE_API(ret_value)
} /* end H5Eset_auto1() */
#endif /* H5_NO_DEPRECATED_SYMBOLS */


text: 1. Turn `mult(..)` into a recursive function that can work on as many arguments as necessary.


text:
import java.io.Serializable;

class B {}
abstract class A {
  abstract Class<?> get();
  abstract Class<? extends Object> get1();
  abstract Class<? super Object> get2();

  abstract Class<? extends B> get3();
  abstract Class<? super B> get4();

  abstract Class<? extends Serializable> get5();
  abstract Class<? super Serializable> get6();

  {
    if (get()  == byte[].class);
    if (get1() == byte[].class);
    if (<error descr="Operator '==' cannot be applied to 'java.lang.Class<capture<? super java.lang.Object>>', 'java.lang.Class<byte[]>'">get2() == byte[].class</error>);
    if (<error descr="Operator '==' cannot be applied to 'java.lang.Class<capture<? extends B>>', 'java.lang.Class<byte[]>'">get3() == byte[].class</error>);
    if (<error descr="Operator '==' cannot be applied to 'java.lang.Class<capture<? super B>>', 'java.lang.Class<byte[]>'">get4() == byte[].class</error>);
    if (get5() == byte[].class);
    if (<error descr="Operator '==' cannot be applied to 'java.lang.Class<capture<? super java.io.Serializable>>', 'java.lang.Class<byte[]>'">get6() == byte[].class</error>);
  }
}


text:
require 'test_helper'

describe Lotus::Router do
  # Bug https://github.com/lotus/router/issues/73
  it 'respects the Rack spec' do
    router = Lotus::Router.new(force_ssl: true)
    router.public_send(:get, '/http_destination', to: ->(env) { [200, {}, ['http destination!']] })
    app = Rack::MockRequest.new(router)

    app.get('/http_destination', lint: true)
  end

  %w{get}.each do |verb|
    it "force_ssl to true and scheme is http, return 307 and new location, verb: #{verb}" do
      router = Lotus::Router.new(force_ssl: true)
      router.public_send(verb, '/http_destination', to: ->(env) { [200, {}, ['http destination!']] })
      app = Rack::MockRequest.new(router)

      status, headers, body = app.public_send(verb, '/http_destination', lint: true)

      status.must_equal 301
      headers['Location'].must_equal 'https://localhost:443/http_destination'
      body.body.must_equal ''
    end

    it "force_ssl to true and scheme is https, return 200, verb: #{verb}" do
      router = Lotus::Router.new(force_ssl: true, scheme: 'https', host: 'lotus.test')
      router.public_send(verb, '/http_destination', to: ->(env) { [200, {}, ['http destination!']] })
      app = Rack::MockRequest.new(router)

      status, headers, body = app.public_send(verb, 'https://lotus.test/http_destination', lint: true)

      status.must_equal 200
      headers['Location'].must_be_nil
      body.body.must_equal 'http destination!'
    end
  end

  %w{post put patch delete options}.each do |verb|
    it "force_ssl to true and scheme is http, return 307 and new location, verb: #{verb}" do
      router = Lotus::Router.new(force_ssl: true)
      router.public_send(verb, '/http_destination', to: ->(env) { [200, {}, ['http destination!']] })
      app = Rack::MockRequest.new(router)

      status, headers, body = app.public_send(verb, '/http_destination', lint: true)

      status.must_equal 307
      headers['Location'].must_equal 'https://localhost:443/http_destination'
      body.body.must_equal ''
    end

    it "force_ssl to true and added query string, verb: #{verb}" do
      router = Lotus::Router.new(force_ssl: true)
      router.public_send(verb, '/http_destination', to: ->(env) { [200, {}, ['http destination!']] })

      app = Rack::MockRequest.new(router)

      status, headers, body = app.public_send(verb, '/http_destination?foo=bar', lint: true)

      status.must_equal 307
      headers['Location'].must_equal 'https://localhost:443/http_destination?foo=bar'
      body.body.must_equal ''
    end

    it "force_ssl to true and added port, verb: #{verb}" do
      router = Lotus::Router.new(force_ssl: true, port: 4000)
      router.public_send(verb, '/http_destination', to: ->(env) { [200, {}, ['http destination!']] })

      app = Rack::MockRequest.new(router)

      status, headers, body = app.public_send(verb, '/http_destination?foo=bar', lint: true)

      status.must_equal 307
      headers['Location'].must_equal 'https://localhost:4000/http_destination?foo=bar'
      body.body.must_equal ''
    end

    it "force_ssl to true, added host and port, verb: #{verb}" do
      router = Lotus::Router.new(force_ssl: true, host: 'lotusrb.org', port: 4000)
      router.public_send(verb, '/http_destination', to: ->(env) { [200, {}, ['http destination!']] })

      app = Rack::MockRequest.new(router)

      status, headers, body = app.public_send(verb, '/http_destination?foo=bar', lint: true)

      status.must_equal 307
      headers['Location'].must_equal 'https://lotusrb.org:4000/http_destination?foo=bar'
      body.body.must_equal ''
    end

    it "force_ssl to false and scheme is http, return 200 and doesn't return new location, verb: #{verb}" do
      router = Lotus::Router.new(force_ssl: false)
      router.public_send(verb, '/http_destination', to: ->(env) { [200, {}, ['http destination!']] })

      app = Rack::MockRequest.new(router)

      status, headers, body = app.public_send(verb, '/http_destination', lint: true)

      status.must_equal 200
      headers['Location'].must_be_nil
      body.body.must_equal 'http destination!'
    end

    it "force_ssl to false and scheme is https, return 200 and doesn't return new location, verb: #{verb}" do
      router = Lotus::Router.new(force_ssl: false, scheme: 'https')
      router.public_send(verb, '/http_destination', to: ->(env) { [200, {}, ['http destination!']] })

      app = Rack::MockRequest.new(router)

      status, headers, body = app.public_send(verb, '/http_destination', lint: true)

      status.must_equal 200
      headers['Location'].must_be_nil
      body.body.must_equal 'http destination!'
    end
  end
end


text:
namespace Point_Of_Sales
{
    partial class FormSupplier_View
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.listView1 = new System.Windows.Forms.ListView();
            this.chSupplierCode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.chSupplierName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.chIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
            this.bttnSelect = new System.Windows.Forms.Button();
            this.bttnCancel = new System.Windows.Forms.Button();
            this.SuspendLayout();
            //
            // listView1
            //
            this.listView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
            | System.Windows.Forms.AnchorStyles.Left)
            | System.Windows.Forms.AnchorStyles.Right)));
            this.listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
            this.chSupplierCode,
            this.chSupplierName,
            this.chIndex});
            this.listView1.Cursor = System.Windows.Forms.Cursors.Hand;
            this.listView1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.listView1.ForeColor = System.Drawing.Color.Navy;
            this.listView1.FullRowSelect = true;
            this.listView1.GridLines = true;
            this.listView1.HideSelection = false;
            this.listView1.Location = new System.Drawing.Point(12, 12);
            this.listView1.MultiSelect = false;
            this.listView1.Name = "listView1";
            this.listView1.Size = new System.Drawing.Size(298, 243);
            this.listView1.TabIndex = 223;
            this.listView1.UseCompatibleStateImageBehavior = false;
            this.listView1.View = System.Windows.Forms.View.Details;
            this.listView1.DoubleClick += new System.EventHandler(this.listView1_DoubleClick);
            //
            // chSupplierCode
            //
            this.chSupplierCode.Text = "KODE";
            this.chSupplierCode.Width = 100;
            //
            // chSupplierName
            //
            this.chSupplierName.Text = "NAMA SUPPLIER";
            this.chSupplierName.Width = 220;
            //
            // chIndex
            //
            this.chIndex.Text = "Index";
            this.chIndex.Width = 0;
            //
            // bttnSelect
            //
            this.bttnSelect.Cursor = System.Windows.Forms.Cursors.Hand;
            this.bttnSelect.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bttnSelect.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.bttnSelect.Location = new System.Drawing.Point(103, 261);
            this.bttnSelect.Name = "bttnSelect";
            this.bttnSelect.Size = new System.Drawing.Size(100, 25);
            this.bttnSelect.TabIndex = 222;
            this.bttnSelect.Text = "&Pilih";
            this.bttnSelect.Click += new System.EventHandler(this.bttnSelect_Click);
            //
            // bttnCancel
            //
            this.bttnCancel.Cursor = System.Windows.Forms.Cursors.Hand;
            this.bttnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.bttnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.bttnCancel.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.bttnCancel.Location = new System.Drawing.Point(210, 261);
            this.bttnCancel.Name = "bttnCancel";
            this.bttnCancel.Size = new System.Drawing.Size(100, 25);
            this.bttnCancel.TabIndex = 221;
            this.bttnCancel.Text = "&Batal";
            this.bttnCancel.Click += new System.EventHandler(this.bttnCancel_Click);
            //
            // FormSupplier_View
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(322, 298);
            this.Controls.Add(this.listView1);
            this.Controls.Add(this.bttnSelect);
            this.Controls.Add(this.bttnCancel);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "FormSupplier_View";
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "FormSupplier_View";
            this.Load += new System.EventHandler(this.FormSupplier_View_Load);
            this.ResumeLayout(false);

        }

        #endregion

        private System.Windows.Forms.ListView listView1;
        private System.Windows.Forms.ColumnHeader chSupplierCode;
        private System.Windows.Forms.ColumnHeader chSupplierName;
        private System.Windows.Forms.ColumnHeader chIndex;
        private System.Windows.Forms.Button bttnSelect;
        private System.Windows.Forms.Button bttnCancel;
    }
}