text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>Bootstrap, from Twitter</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <link href="http://cdn.bootcss.com/bootstrap/2.0.4/css/bootstrap.min.css" rel="stylesheet">
    <link href="http://cdn.bootcss.com/bootstrap/2.0.4/css/bootstrap-responsive.min.css" rel="stylesheet">

          <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">

          </button>
          BTC

              用户名 {{ request.user.username }}

Home

Signout

Sidebar

Signin

LTC利差

BTC利差

API及汇率设置

Show

ShowMacd

Trade

btc交易记录

ltc交易记录

BTC的利差设置

            <form class="form-horizontal" action="" method="POST" role="form">
            {% csrf_token %}

                  okCoin2bitfinex<input type="text" class="form_control" placeholder="okCoin2bitfinex" name="okCoin2bitfinex" value="{{ request.user.userprofile.okCoin2bitfinex }}">
                  bitfinex2okCoin<input type="text" class="form_control" placeholder="bitfinex2okCoin" name="bitfinex2okCoin" value="{{ request.user.userprofile.bitfinex2okCoin }}">

                  okCoin2huobi<input type="text" class="form_control" placeholder="okCoin2huobi" name="okCoin2huobi" value="{{ request.user.userprofile.okCoin2huobi }}">
                  huobi2okCoin<input type="text" class="form_control" placeholder="huobi2okCoin" name="huobi2okCoin" value="{{ request.user.userprofile.huobi2okCoin }}">

                  okCoin2btcchina<input type="text" class="form_control" placeholder="okCoin2btcchina" name="okCoin2btcchina" value="{{ request.user.userprofile.okCoin2btcchina }}">
                  btcchina2okCoin<input type="text" class="form_control" placeholder="btcchina2okCoin" name="btcchina2okCoin" value="{{ request.user.userprofile.btcchina2okCoin }}">

                  huobi2btcchina<input type="text" class="form_control" placeholder="huobi2btcchina" name="huobi2btcchina" value="{{ request.user.userprofile.huobi2btcchina }}">
                  btcchina2huobi<input type="text" class="form_control" placeholder="btcchina2huobi" name="btcchina2huobi" value="{{ request.user.userprofile.btcchina2huobi }}">

                  huobi2bitfinex<input type="text" class="form_control" placeholder="huobi2bitfinex" name="huobi2bitfinex" value="{{ request.user.userprofile.huobi2bitfinex }}">
                  bitfinex2huobi<input type="text" class="form_control" placeholder="bitfinex2huobi" name="bitfinex2huobi" value="{{ request.user.userprofile.bitfinex2huobi }}">

                  bitfinex2btcchina<input type="text" class="form_control" placeholder="bitfinex2btcchina" name="bitfinex2btcchina" value="{{ request.user.userprofile.bitfinex2btcchina }}">
                  btcchina2bitfinex<input type="text" class="form_control" placeholder="btcchina2bitfinex" name="btcchina2bitfinex" value="{{ request.user.userprofile.btcchina2bitfinex }}">

                <button class="btn btn-primary" type="submit">更改设置</button>

          </form>


text:
function doTest(updates, assertions)
{
  doUpdateTest(updates, assertions, runNextTest, updateError);
}

// Test an add of two urls to a fresh database
function testSimpleAdds() {
  var addUrls = [ "foo.com/a", "foo.com/b", "bar.com/c" ];
  var update = buildPhishingUpdate(
        [
          { "chunkNum" : 1,
            "urls" : addUrls
          }]);

  var assertions = {
    "tableData" : "test-phish-simple;a:1",
    "urlsExist" : addUrls
  };

  doTest([update], assertions);
}

// Same as testSimpleAdds, but make the same-domain URLs come from different
// chunks.
function testMultipleAdds() {
  var add1Urls = [ "foo.com/a", "bar.com/c" ];
  var add2Urls = [ "foo.com/b" ];

  var update = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "urls" : add1Urls },
      { "chunkNum" : 2,
        "urls" : add2Urls }]);
  var assertions = {
    "tableData" : "test-phish-simple;a:1-2",
    "urlsExist" : add1Urls.concat(add2Urls)
  };

  doTest([update], assertions);
}

// Test that a sub will remove an existing add
function testSimpleSub()
{
  var addUrls = ["foo.com/a", "bar.com/b"];
  var subUrls = ["1:foo.com/a"];

  var addUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1, // adds and subtracts don't share a chunk numbering space
       "urls": addUrls }]);

  var subUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 50,
       "chunkType" : "s",
       "urls": subUrls }]);

  var assertions = {
    "tableData" : "test-phish-simple;a:1:s:50",
    "urlsExist" : [ "bar.com/b" ],
    "urlsDontExist": ["foo.com/a" ],
    "subsDontExist" : [ "foo.com/a" ]
  }

  doTest([addUpdate, subUpdate], assertions);

}

// Same as testSimpleSub(), but the sub comes in before the add.
function testSubEmptiesAdd()
{
  var subUrls = ["1:foo.com/a"];
  var addUrls = ["foo.com/a", "bar.com/b"];

  var subUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 50,
       "chunkType" : "s",
       "urls": subUrls }]);

  var addUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "urls": addUrls }]);

  var assertions = {
    "tableData" : "test-phish-simple;a:1:s:50",
    "urlsExist" : [ "bar.com/b" ],
    "urlsDontExist": ["foo.com/a" ],
    "subsDontExist" : [ "foo.com/a" ] // this sub was found, it shouldn't exist anymore
  }

  doTest([subUpdate, addUpdate], assertions);
}

// Very similar to testSubEmptiesAdd, except that the domain entry will
// still have an item left over that needs to be synced.
function testSubPartiallyEmptiesAdd()
{
  var subUrls = ["1:foo.com/a"];
  var addUrls = ["foo.com/a", "foo.com/b", "bar.com/b"];

  var subUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "chunkType" : "s",
       "urls": subUrls }]);

  var addUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1, // adds and subtracts don't share a chunk numbering space
       "urls": addUrls }]);

  var assertions = {
    "tableData" : "test-phish-simple;a:1:s:1",
    "urlsExist" : [ "foo.com/b", "bar.com/b" ],
    "urlsDontExist" : ["foo.com/a" ],
    "subsDontExist" : [ "foo.com/a" ] // this sub was found, it shouldn't exist anymore
  }

  doTest([subUpdate, addUpdate], assertions);
}

// We SHOULD be testing that pending subs are removed using
// subsDontExist assertions.  Since we don't have a good interface for getting
// at sub entries, we'll verify it by side-effect.  Subbing a url once
// then adding it twice should leave the url intact.
function testPendingSubRemoved()
{
  var subUrls = ["1:foo.com/a", "2:foo.com/b"];
  var addUrls = ["foo.com/a", "foo.com/b"];

  var subUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "chunkType" : "s",
       "urls": subUrls }]);

  var addUpdate1 = buildPhishingUpdate(
    [{ "chunkNum" : 1, // adds and subtracts don't share a chunk numbering space
       "urls": addUrls }]);

  var addUpdate2 = buildPhishingUpdate(
    [{ "chunkNum" : 2,
       "urls": addUrls }]);

  var assertions = {
    "tableData" : "test-phish-simple;a:1-2:s:1",
    "urlsExist" : [ "foo.com/a", "foo.com/b" ],
    "subsDontExist" : [ "foo.com/a", "foo.com/b" ] // this sub was found, it shouldn't exist anymore
  }

  doTest([subUpdate, addUpdate1, addUpdate2], assertions);
}

// Make sure that a saved sub is removed when the sub chunk is expired.
function testPendingSubExpire()
{
  var subUrls = ["1:foo.com/a", "1:foo.com/b"];
  var addUrls = ["foo.com/a", "foo.com/b"];

  var subUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "chunkType" : "s",
       "urls": subUrls }]);

  var expireUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "chunkType" : "sd" }]);

  var addUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1, // adds and subtracts don't share a chunk numbering space
       "urls": addUrls }]);

  var assertions = {
    "tableData" : "test-phish-simple;a:1",
    "urlsExist" : [ "foo.com/a", "foo.com/b" ],
    "subsDontExist" : [ "foo.com/a", "foo.com/b" ] // this sub was expired
  }

  doTest([subUpdate, expireUpdate, addUpdate], assertions);
}

// Make sure that the sub url removes from only the chunk that it specifies
function testDuplicateAdds()
{
  var urls = ["foo.com/a"];

  var addUpdate1 = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "urls": urls }]);
  var addUpdate2 = buildPhishingUpdate(
    [{ "chunkNum" : 2,
       "urls": urls }]);
  var subUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 3,
       "chunkType" : "s",
       "urls": ["2:foo.com/a"]}]);

  var assertions = {
    "tableData" : "test-phish-simple;a:1-2:s:3",
    "urlsExist" : [ "foo.com/a"],
    "subsDontExist" : [ "foo.com/a"]
  }

  doTest([addUpdate1, addUpdate2, subUpdate], assertions);
}

// Tests a sub which matches some existing adds but leaves others.
function testSubPartiallyMatches()
{
  var subUrls = ["foo.com/a"];
  var addUrls = ["1:foo.com/a", "2:foo.com/b"];

  var addUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "urls" : addUrls }]);

  var subUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "chunkType" : "s",
       "urls" : addUrls }]);

  var assertions = {
    "tableData" : "test-phish-simple;a:1:s:1",
    "urlsDontExist" : ["foo.com/a"],
    "subsDontExist" : ["foo.com/a"],
    "subsExist" : ["foo.com/b"]
  };

  doTest([addUpdate, subUpdate], assertions);
}

// XXX: because subsExist isn't actually implemented, this is the same
// test as above but with a second add chunk that should fail to be added
// because of a pending sub chunk.
function testSubPartiallyMatches2()
{
  var addUrls = ["foo.com/a"];
  var subUrls = ["1:foo.com/a", "2:foo.com/b"];
  var addUrls2 = ["foo.com/b"];

  var addUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "urls" : addUrls }]);

  var subUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "chunkType" : "s",
       "urls" : subUrls }]);

  var addUpdate2 = buildPhishingUpdate(
    [{ "chunkNum" : 2,
       "urls" : addUrls2 }]);

  var assertions = {
    "tableData" : "test-phish-simple;a:1-2:s:1",
    "urlsDontExist" : ["foo.com/a", "foo.com/b"],
    "subsDontExist" : ["foo.com/a", "foo.com/b"]
  };

  doTest([addUpdate, subUpdate, addUpdate2], assertions);
}

// Verify that two subs for the same domain but from different chunks
// match (tests that existing sub entries are properly updated)
function testSubsDifferentChunks() {
  var subUrls1 = [ "3:foo.com/a" ];
  var subUrls2 = [ "3:foo.com/b" ];

  var addUrls = [ "foo.com/a", "foo.com/b", "foo.com/c" ];

  var subUpdate1 = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "chunkType" : "s",
       "urls": subUrls1 }]);
  var subUpdate2 = buildPhishingUpdate(
    [{ "chunkNum" : 2,
       "chunkType" : "s",
       "urls" : subUrls2 }]);
  var addUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 3,
       "urls" : addUrls }]);

  var assertions = {
    "tableData" : "test-phish-simple;a:3:s:1-2",
    "urlsExist" : [ "foo.com/c" ],
    "urlsDontExist" : [ "foo.com/a", "foo.com/b" ],
    "subsDontExist" : [ "foo.com/a", "foo.com/b" ]
  };

  doTest([subUpdate1, subUpdate2, addUpdate], assertions);
}

// for bug 534079
function testSubsDifferentChunksSameHostId() {
  var subUrls1 = [ "1:foo.com/a" ];
  var subUrls2 = [ "1:foo.com/b", "2:foo.com/c" ];

  var addUrls = [ "foo.com/a", "foo.com/b" ];
  var addUrls2 = [ "foo.com/c" ];

  var subUpdate1 = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "chunkType" : "s",
       "urls": subUrls1 }]);
  var subUpdate2 = buildPhishingUpdate(
    [{ "chunkNum" : 2,
       "chunkType" : "s",
       "urls" : subUrls2 }]);

  var addUpdate = buildPhishingUpdate(
    [{ "chunkNum" : 1,
       "urls" : addUrls }]);
  var addUpdate2 = buildPhishingUpdate(
    [{ "chunkNum" : 2,
       "urls" : addUrls2 }]);

  var assertions = {
    "tableData" : "test-phish-simple;a:1-2:s:1-2",
    "urlsDontExist" : [ "foo.com/c", "foo.com/b", "foo.com/a", ],
  };

  doTest([addUpdate, addUpdate2, subUpdate1, subUpdate2], assertions);
}

// Test lists of expired chunks
function testExpireLists() {
  var addUpdate = buildPhishingUpdate(
        [
          { "chunkNum" : 1,
            "urls" : [ "foo.com/a" ]
          },
          { "chunkNum" : 3,
            "urls" : [ "bar.com/a" ]
          },
          { "chunkNum" : 4,
            "urls" : [ "baz.com/a" ]
          },
          { "chunkNum" : 5,
            "urls" : [ "blah.com/a" ]
          },
          ]);
  var subUpdate = buildPhishingUpdate(
        [
          { "chunkNum" : 1,
            "chunkType" : "s",
            "urls" : [ "50:foo.com/1" ]
          },
          { "chunkNum" : 2,
            "chunkType" : "s",
            "urls" : [ "50:bar.com/1" ]
          },
          { "chunkNum" : 3,
            "chunkType" : "s",
            "urls" : [ "50:baz.com/1" ]
          },
          { "chunkNum" : 5,
            "chunkType" : "s",
            "urls" : [ "50:blah.com/1" ]
          },
          ]);

  var expireUpdate = buildPhishingUpdate(
    [ { "chunkType" : "ad:1,3-5" },
      { "chunkType" : "sd:1-3,5" }]);

  var assertions = {
    //    "tableData" : "test-phish-simple;"
    "tableData": ""
  };

  doTest([addUpdate, subUpdate, expireUpdate], assertions);
}

// Test a duplicate add chunk.
function testDuplicateAddChunks() {
  var addUrls1 = [ "foo.com/a" ];
  var addUrls2 = [ "bar.com/b" ];
  var update = buildPhishingUpdate(
        [
          { "chunkNum" : 1,
            "urls" : addUrls1
          },
          { "chunkNum" : 1,
            "urls" : addUrls2
          }]);

  var assertions = {
    "tableData" : "test-phish-simple;a:1",
    "urlsExist" : addUrls1,
    "urlsDontExist" : addUrls2
  };

  doTest([update], assertions);
}

// This test is a bit tricky.  We want to test that an add removes all
// subs with the same add chunk id, even if there is no match.  To do
// that we need to add the same add chunk twice, with an expiration
// in the middle.  This would be easier if subsDontExist actually
// worked...
function testExpireWholeSub()
{
  var subUrls = ["1:foo.com/a"];

  var update = buildPhishingUpdate(
        [{ "chunkNum" : 5,
           "chunkType" : "s",
           "urls" : subUrls
          },
          // empty add chunk should still cause foo.com/a to go away.
          { "chunkNum" : 1,
            "urls" : []
          },
          // and now adding chunk 1 again with foo.com/a should succeed,
          // because the sub should have been expired with the empty
          // add chunk.

          // we need to expire this chunk to let us add chunk 1 again.
          {
            "chunkType" : "ad:1"
          },
          { "chunkNum" : 1,
            "urls" : [ "foo.com/a" ]
          }]);

  var assertions = {
    "tableData" : "test-phish-simple;a:1:s:5",
    "urlsExist" : ["foo.com/a"]
  };

  doTest([update], assertions);
}

// This test is roughly the opposite of testExpireWholeSub().  We add
// the empty add first, and make sure that it prevents a sub for that
// add from being applied.
function testPreventWholeSub()
{
  var subUrls = ["1:foo.com/a"];

  var update = buildPhishingUpdate(
        [  // empty add chunk should cause foo.com/a to not be saved
          { "chunkNum" : 1,
            "urls" : []
          },
          { "chunkNum" : 5,
           "chunkType" : "s",
           "urls" : subUrls
          },
          // and now adding chunk 1 again with foo.com/a should succeed,
          // because the sub should have been expired with the empty
          // add chunk.

          // we need to expire this chunk to let us add chunk 1 again.
          {
            "chunkType" : "ad:1"
          },
          { "chunkNum" : 1,
            "urls" : [ "foo.com/a" ]
          }]);

  var assertions = {
    "tableData" : "test-phish-simple;a:1:s:5",
    "urlsExist" : ["foo.com/a"]
  };

  doTest([update], assertions);
}

function run_test()
{
  runTests([
    testSimpleAdds,
    testMultipleAdds,
    testSimpleSub,
    testSubEmptiesAdd,
    testSubPartiallyEmptiesAdd,
    testPendingSubRemoved,
    testPendingSubExpire,
    testDuplicateAdds,
    testSubPartiallyMatches,
    testSubPartiallyMatches2,
    testSubsDifferentChunks,
    testSubsDifferentChunksSameHostId,
    testExpireLists
  ]);
}

do_test_pending();

redpajama_set_name: RedPajamaGithub


text:
layout: post
title: List 2
excerpt: GRE Word List 2
categories: [WList]
comments: true
---

### ambrosial

### obscure

### amenable

### amenity

### amiable

### amicable

### amity

### analgesic

### anathema

### tractable

### anemic

### anesthetic

### animus

### annals

### enmity

### annul

### antediluvian

### anthology

### antic

### apathy

### aphorism

### prophetic

### remedy

### terse

### apophasis

### apoplectic

### apostasy

### apostrophe

### apothecary

### apparel

### renunciation

### paradoxical

### spurious

### consternate

### appellation

### approbation

### apron

### apposite

### pertinent

### furtively

### arbor

### arboreal

### archaic

### archipelago

### ardor

### argot

### ascendant

### aseptic

### askew

### asperity

### aspersion

### aspirant

### assent

### assiduous

### awry

### aver

### assuage

### astringent

### astute

### asunder

### asylum

### atone

### atrocious

### contraction


text:
/**
 * The OverlayContainer is the container in which all overlays will load.
 * It should be provided in the root component to ensure it is properly shared.
 */
export class OverlayContainer {
  private _containerElement: HTMLElement;

  /**
   * This method returns the overlay container element.  It will lazily
   * create the element the first time  it is called to facilitate using
   * the container in non-browser environments.
   * @returns the container element
   */
  getContainerElement(): HTMLElement {
    if (!this._containerElement) { this._createContainer(); }
    return this._containerElement;
  }

  /**
   * Create the overlay container element, which is simply a div
   * with the 'cdk-overlay-container' class on the document body.
   */
  private _createContainer(): void {
    let container = document.createElement('div');
    container.classList.add('cdk-overlay-container');
    document.body.appendChild(container);
    this._containerElement = container;
  }
}


text:
package com.siemens.ct.exi.core.grammars.production;

import com.siemens.ct.exi.core.grammars.event.Event;
import com.siemens.ct.exi.core.grammars.grammar.Grammar;

/**
 *
 * @author Daniel.Peintner.EXT@siemens.com
 * @author Richard.Kuntschke@siemens.com
 *
 */

public class SchemaInformedProduction extends AbstractProduction {

	public SchemaInformedProduction(Grammar next, Event event, int eventCode) {
		super(next, event, eventCode);
	}

	@Override
	public int getEventCode() {
		return eventCode;
	}

}


text:
<?php
namespace Vanio\WebBundle\Tests\Translation;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Translation\MessageCatalogue;
use Vanio\WebBundle\Translation\PhpExtractor;

class PhpExtractorTest extends TestCase
{
    function test_extracting_messages()
    {
        $catalogue = new MessageCatalogue('locale', []);
        (new PhpExtractor)->extract(realpath(sprintf('%s/../Fixtures', __DIR__)), $catalogue);
        $messages = [
            'foo' => 'foo',
            'bar' => 'bar',
            'baz' => 'baz',
            'qux' => 'qux',
            'quux' => 'quux',
            'corge' => 'corge',
            'grault' => 'grault',
        ];
        $this->assertEquals(['messages' => $messages], $catalogue->all());
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PVPNetConnect.RiotObjects.Platform.Summoner.Boost
{

public class SummonerActiveBoostsDTO : RiotGamesObject
{
public override string TypeName
{
get
{
return this.type;
}
}

private string type = "com.riotgames.platform.summoner.boost.SummonerActiveBoostsDTO";

public SummonerActiveBoostsDTO()
{
}

public SummonerActiveBoostsDTO(Callback callback)
{
this.callback = callback;
}

public SummonerActiveBoostsDTO(TypedObject result)
{
base.SetFields(this, result);
}

public delegate void Callback(SummonerActiveBoostsDTO result);

private Callback callback;

public override void DoCallback(TypedObject result)
{
base.SetFields(this, result);
callback(this);
}

[InternalName("xpBoostEndDate")]
public Double XpBoostEndDate { get; set; }

[InternalName("xpBoostPerWinCount")]
public Int32 XpBoostPerWinCount { get; set; }

[InternalName("xpLoyaltyBoost")]
public Int32 XpLoyaltyBoost { get; set; }

[InternalName("ipBoostPerWinCount")]
public Int32 IpBoostPerWinCount { get; set; }

[InternalName("ipLoyaltyBoost")]
public Int32 IpLoyaltyBoost { get; set; }

[InternalName("summonerId")]
public Double SummonerId { get; set; }

[InternalName("ipBoostEndDate")]
public Double IpBoostEndDate { get; set; }

}
}


text:
'use strict';

chrome.runtime.onInstalled.addListener(function (details) {
  console.log('previousVersion', details.previousVersion);
});

chrome.browserAction.setBadgeText({text: 'Debug'});

chrome.browserAction.onClicked.addListener(function(){
  var newURL = 'main.html';
  chrome.tabs.create({ url: newURL });
});


text:
import { afterEach, describe, it } from '@ephox/bedrock-client';
import { Arr } from '@ephox/katamari';
import { TinyAssertions, TinyHooks, TinySelections } from '@ephox/wrap-mcagar';
import { assert } from 'chai';

import Editor from 'tinymce/core/api/Editor';
import { TableModifiedEvent } from 'tinymce/core/api/EventTypes';
import { EditorEvent } from 'tinymce/core/api/util/EventDispatcher';

describe('browser.tinymce.models.dom.table.command.TableDeleteColumnTest', () => {
  let events: Array<EditorEvent<TableModifiedEvent>> = [];
  const hook = TinyHooks.bddSetupLight<Editor>({
    indent: false,
    base_url: '/project/tinymce/js/tinymce',
    setup: (editor: Editor) => {
      editor.on('TableModified', logEvent);
    }
  }, [], true);

  afterEach(() => {
    events = [];
  });

  const logEvent = (event: EditorEvent<TableModifiedEvent>) => {
    events.push(event);
  };

  const assertEvents = (count: number) => {
    assert.lengthOf(events, count);
    Arr.each(events, (event) => {
      assert.equal(event.type, 'tablemodified', 'Event name');
      assert.isTrue(event.structure, 'Table modified structure');
      assert.isFalse(event.style, 'Table modified style');
    });
  };

  it('TINY-7916: Delete all columns should delete the table', () => {
    const editor = hook.editor();
    editor.setContent('

1	2	3

');
    TinySelections.setCursor(editor, [ 0, 0, 0, 2, 0 ], 1);

    editor.execCommand('mceTableDeleteCol');
    TinyAssertions.assertCursor(editor, [ 0, 0, 0, 1, 0 ], 1);
    editor.execCommand('mceTableDeleteCol');
    TinyAssertions.assertCursor(editor, [ 0, 0, 0, 0, 0 ], 1);
    editor.execCommand('mceTableDeleteCol');
    TinyAssertions.assertContent(editor, '');
    assertEvents(2);
  });

  it('TINY-7916: Delete all columns with a contenteditable=false column', () => {
    const editor = hook.editor();
    editor.setContent('

1	2	3

');
    TinySelections.setCursor(editor, [ 0, 0, 0, 2, 0 ], 1);

    editor.execCommand('mceTableDeleteCol');
    TinyAssertions.assertCursor(editor, [ 0, 0, 0, 1, 0 ], 1);
    editor.execCommand('mceTableDeleteCol');
    TinyAssertions.assertSelection(editor, [ 0, 0, 0 ], 0, [ 0, 0, 0 ], 1);
    editor.execCommand('mceTableDeleteCol');
    TinyAssertions.assertContent(editor, '');
    assertEvents(2);
  });
});


text:
"""Config exceptions"""

class ConfigNotFoundException(Exception):
    pass


text:
<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "team".
 *
 * @property integer $id
 * @property integer $team_id
 * @property integer $competition
 * @property string $name
 * @property string $logo
 * @property string $status
 * @property string $form
 * @property integer $position
 * @property integer $overall_gp
 * @property integer $overall_w
 * @property integer $overall_d
 * @property integer $overall_l
 * @property integer $overall_gs
 * @property integer $overall_ga
 * @property integer $home_w
 * @property integer $home_d
 * @property integer $home_l
 * @property integer $home_gs
 * @property integer $home_ga
 * @property integer $away_gp
 * @property integer $away_w
 * @property integer $away_d
 * @property integer $away_l
 * @property integer $away_gs
 * @property integer $away_ga
 * @property integer $gd
 * @property integer $points
 * @property integer $last_updated
 * @property integer $created
 */
class Team extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'team';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['team_id', 'competition', 'name', 'last_updated', 'created'], 'required'],
            [['team_id', 'competition', 'position', 'overall_gp', 'overall_w', 'overall_d', 'overall_l', 'overall_gs', 'overall_ga', 'home_w', 'home_d', 'home_l', 'home_gs', 'home_ga', 'away_gp', 'away_w', 'away_d', 'away_l', 'away_gs', 'away_ga', 'gd', 'points', 'last_updated', 'created'], 'integer'],
            [['logo'], 'string'],
            [['name', 'status', 'form'], 'string', 'max' => 128]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'team_id' => 'Team ID',
            'competition' => 'Competition',
            'name' => 'Name',
            'logo' => 'Logo',
            'status' => 'Status',
            'form' => 'Form',
            'position' => 'Position',
            'overall_gp' => 'Overall Gp',
            'overall_w' => 'Overall W',
            'overall_d' => 'Overall D',
            'overall_l' => 'Overall L',
            'overall_gs' => 'Overall Gs',
            'overall_ga' => 'Overall Ga',
            'home_w' => 'Home W',
            'home_d' => 'Home D',
            'home_l' => 'Home L',
            'home_gs' => 'Home Gs',
            'home_ga' => 'Home Ga',
            'away_gp' => 'Away Gp',
            'away_w' => 'Away W',
            'away_d' => 'Away D',
            'away_l' => 'Away L',
            'away_gs' => 'Away Gs',
            'away_ga' => 'Away Ga',
            'gd' => 'Gd',
            'points' => 'Points',
            'last_updated' => 'Last Updated',
            'created' => 'Created',
        ];
    }
}


text:
package com.comcast.cdn.traffic_control.traffic_monitor.data;

public class DataPoint implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	private long index;
	private final String value;
	private int span;

	public DataPoint(final String value, final long index) {
		this.value = value;
		this.index = index;
		this.span = 1;
	}

	public String getValue() {
		return value;
	}

	public boolean matches(final String other) {
		return (other != null) ? other.equals(value) : value == null;
	}

	public long getIndex() {
		return index;
	}

	public void setIndex(final int index) {
		this.index = index;
	}

	public void update(final long index) {
		this.index = index;
		span++;
	}

	public int getSpan() {
		return span;
	}
}


text:
import { Component } from '@angular/core';

import { Router} from "@angular/router";

@Component({
  templateUrl: './app/components/home/home.tpl.html'
})

export class HomeComponent {
	public pageHeading = "Welcome";
}


text:
import json
import unittest
try:
    from urllib.parse import parse_qs
except ImportError:
    from urlparse import parse_qs

import requests
import responses

from medium import Client

class TestClient(unittest.TestCase):

    def setUp(self):
        self.client = Client(access_token="myaccesstoken")

    @responses.activate
    def test_exchange_authorization_code(self):
        def response_callback(payload):
            self.assertEqual(payload["code"][0], "mycode")
            self.assertEqual(payload["client_id"][0], "myclientid")
            self.assertEqual(payload["client_secret"][0], "myclientsecret")
            self.assertEqual(payload["grant_type"][0], "authorization_code")
            self.assertEqual(payload["redirect_uri"][0],
                             "http://example.com/cb")
            data = {
                "token_type": "Bearer",
                "access_token": "myaccesstoken",
                "expires_at": 4575744000000,
                "refresh_token": "myrefreshtoken",
                "scope": ["basicProfile"],
            }
            return (201, data)
        self._mock_endpoint("POST", "/v1/tokens", response_callback,
                            is_json=False)

        client = Client(application_id="myclientid",
                        application_secret="myclientsecret")

        # TODO(kyle) Remove after Ceasar's refactoring
        resp = client.exchange_authorization_code("mycode",
                                                  "http://example.com/cb")
        self.assertEqual(resp["access_token"], "myaccesstoken")
        self.assertEqual(resp["refresh_token"], "myrefreshtoken")
        self.assertEqual(resp["scope"], ["basicProfile"])

        # TODO(kyle) Uncomment after Ceasar's refactoring
        # client.exchange_authorization_code("mycode", "http://example.com/cb")
        # self.assertEqual(client.access_token, "myaccesstoken")
        # self.assertEqual(client.refresh_token, "myrefreshtoken")

    @responses.activate
    def test_exchange_refresh_token(self):
        def response_callback(payload):
            self.assertEqual(payload["refresh_token"][0], "myrefreshtoken")
            self.assertEqual(payload["client_id"][0], "myclientid")
            self.assertEqual(payload["client_secret"][0], "myclientsecret")
            self.assertEqual(payload["grant_type"][0], "refresh_token")
            data = {
                "token_type": "Bearer",
                "access_token": "myaccesstoken2",
                "expires_at": 4575744000000,
                "refresh_token": "myrefreshtoken2",
                "scope": ["basicProfile"],
            }
            return (201, data)
        self._mock_endpoint("POST", "/v1/tokens", response_callback,
                            is_json=False)

        client = Client(application_id="myclientid",
                        application_secret="myclientsecret")

        # TODO(kyle) Remove after Ceasar's refactoring
        resp = client.exchange_refresh_token("myrefreshtoken")
        self.assertEqual(resp["access_token"], "myaccesstoken2")
        self.assertEqual(resp["refresh_token"], "myrefreshtoken2")
        self.assertEqual(resp["scope"], ["basicProfile"])

        # TODO(kyle) Uncomment after Ceasar's refactoring
        # client.exchange_refresh_token("myrefreshtoken")
        # self.assertEqual(client.access_token, "myaccesstoken2")
        # self.assertEqual(client.refresh_token, "myrefreshtoken2")

    @responses.activate
    def test_get_current_user(self):
        def response_callback(payload):
            data = {
                "username": "nicki",
                "url": "https://medium.com/@nicki",
                "imageUrl": "https://images.medium.com/0*fkfQiTzT7TlUGGyI.png",
                "id": "5303d74c64f66366f00cb9b2a94f3251bf5",
                "name": "Nicki Minaj",
            }
            return 200, data
        self._mock_endpoint("GET", "/v1/me", response_callback)

        resp = self.client.get_current_user()
        self.assertEqual(resp, {
            "username": "nicki",
            "url": "https://medium.com/@nicki",
            "imageUrl": "https://images.medium.com/0*fkfQiTzT7TlUGGyI.png",
            "id": "5303d74c64f66366f00cb9b2a94f3251bf5",
            "name": "Nicki Minaj",
        })

    @responses.activate
    def test_create_post(self):
        def response_callback(payload):
            self.assertEqual(payload, {
                "title": "Starships",
                "content": "
Are meant to flyyyy
",
                "contentFormat": "html",
                "tags": ["stars", "ships", "pop"],
                "publishStatus": "draft",
            })

            data = {
                "license": "all-rights-reserved",
                "title": "Starships",
                "url": "https://medium.com/@nicki/55050649c95",
                "tags": ["stars", "ships", "pop"],
                "authorId": "5303d74c64f66366f00cb9b2a94f3251bf5",
                "publishStatus": "draft",
                "id": "55050649c95",
            }
            return 200, data
        self._mock_endpoint(
            "POST",
            "/v1/users/5303d74c64f66366f00cb9b2a94f3251bf5/posts",
            response_callback
        )

        resp = self.client.create_post(
            "5303d74c64f66366f00cb9b2a94f3251bf5",
            "Starships",
            "
Are meant to flyyyy
",
            "html",
            tags=["stars", "ships", "pop"],
            publish_status="draft"
        )
        self.assertEqual(resp, {
            "license": "all-rights-reserved",
            "title": "Starships",
            "url": "https://medium.com/@nicki/55050649c95",
            "tags": ["stars", "ships", "pop"],
            "authorId": "5303d74c64f66366f00cb9b2a94f3251bf5",
            "publishStatus": "draft",
            "id": "55050649c95",
        })

    @responses.activate
    def test_upload_image(self):
        def response_callback(req):
            self.assertEqual(req.headers["Authorization"],
                             "Bearer myaccesstoken")
            self.assertIn(b"Content-Type: image/png", req.body)
            return 200, {}, json.dumps({
                "url": "https://cdn-images-1.medium.com/0*dlkfjalksdjfl.jpg",
                "md5": "d87e1628ca597d386e8b3e25de3a18bc",
            })
        responses.add_callback(responses.POST, "https://api.medium.com/v1/images",
                               content_type="application/json",
                               callback=response_callback)

        resp = self.client.upload_image("./tests/test.png", "image/png")
        self.assertEqual(resp, {
            "url": "https://cdn-images-1.medium.com/0*dlkfjalksdjfl.jpg",
            "md5": "d87e1628ca597d386e8b3e25de3a18bc",
        })

    def _mock_endpoint(self, method, path, callback, is_json=True):
        def wrapped_callback(req):
            if is_json:
                self.assertEqual(req.headers["Authorization"],
                                 "Bearer myaccesstoken")
            if req.body is not None:
                body = json.loads(req.body) if is_json else parse_qs(req.body)
            else:
                body = None
            status, data = callback(body)
            return (status, {}, json.dumps(data))
        response_method = responses.GET if method == "GET" else responses.POST
        url = "https://api.medium.com" + path
        content_type = ("application/json" if is_json else
                        "application/x-www-form-urlencoded")
        responses.add_callback(response_method, url, content_type=content_type,
                               callback=wrapped_callback)

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


text:
/*
 * MinIO Java SDK for Amazon S3 Compatible Cloud Storage, (C) 2020 MinIO, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import io.minio.GetBucketTagsArgs;
import io.minio.MinioClient;
import io.minio.errors.MinioException;
import io.minio.messages.Tags;
import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

public class GetBucketTags {
  /** MinioClient.getBucketTags() example. */
  public static void main(String[] args)
      throws IOException, NoSuchAlgorithmException, InvalidKeyException {
    try {
      /* play.min.io for test and development. */
      MinioClient minioClient =
          MinioClient.builder()
              .endpoint("https://play.min.io")
              .credentials("Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG")
              .build();

      /* Amazon S3: */
      // MinioClient minioClient =
      //     MinioClient.builder()
      //         .endpoint("https://s3.amazonaws.com")
      //         .credentials("YOUR-ACCESSKEY", "YOUR-SECRETACCESSKEY")
      //         .build();

      Tags tags =
          minioClient.getBucketTags(GetBucketTagsArgs.builder().bucket("my-bucketname").build());
      System.out.println("Bucket tags: " + tags.get());
    } catch (MinioException e) {
      System.out.println("Error occurred: " + e);
    }
  }
}


text:
/**
 * @author Toru Nagashima <https://github.com/mysticatea>
 * See LICENSE file in root directory for full license.
 */
"use strict"

module.exports = {
    meta: {
        docs: {
            description: "disallow optional `catch` binding.",
            category: "ES2019",
            recommended: false,
            url:
                "http://mysticatea.github.io/eslint-plugin-es/rules/no-optional-catch-binding.html",
        },
        fixable: null,
        messages: {
            forbidden: "ES2019 optional 'catch' binding is forbidden.",
        },
        schema: [],
        type: "problem",
    },
    create(context) {
        return {
            "CatchClause[param=null]"(node) {
                context.report({ node, messageId: "forbidden" })
            },
        }
    },
}


text:
module.exports = {
  up(queryInterface, Sequelize) {
    /*
      Add altering commands here.
      Return a promise to correctly handle asynchronicity.

      Example:
      return queryInterface.createTable('users', { id: Sequelize.INTEGER });
    */
    return [
      queryInterface.addColumn('Documents', 'accessId', {
        type: Sequelize.INTEGER,
        allowNull: false,
        defaultValue: 1
      }),
      queryInterface.addColumn('Documents', 'version', {
        type: Sequelize.STRING,
        allowNull: false,
        defaultValue: '1.0.0'
      })
    ];
  },

  down(queryInterface/* , Sequelize*/) {
    /*
      Add reverting commands here.
      Return a promise to correctly handle asynchronicity.

      Example:
      return queryInterface.dropTable('users');
    */
    queryInterface.removeColumn('Documents', 'accessId');
  }
};


text:
from django.db import models
from apps.titulos.models.CohorteAnexo import CohorteAnexo
from apps.titulos.models.EstadoCohorteAnexo import EstadoCohorteAnexo
import datetime

"""
Representa los estados por los que pasa cada cohorte de anexo
"""

class CohorteAnexoEstado(models.Model):
    cohorte_anexo = models.ForeignKey(CohorteAnexo)
    estado = models.ForeignKey(EstadoCohorteAnexo)
    fecha = models.DateField()

    class Meta:
        app_label = 'titulos'
        ordering = ['fecha']
        db_table = 'titulos_cohorte_anexo_estados'

    def __unicode__(self):
        return str(self.cohorte_anexo.cohorte.anio)