text:
const debug = require("debug")("decoder:test:wire-test");
const assert = require("chai").assert;
const BN = require("bn.js");
const Ganache = require("ganache-core");
const path = require("path");
const Web3 = require("web3");

const Decoder = require("../../..");
const Codec = require("@truffle/codec");

const { prepareContracts } = require("../../helpers");

describe("Over-the-wire decoding", function () {

  let provider;
  let abstractions;
  let compilations;
  let web3;

  let Contracts;

  before("Create Provider", async function () {
    provider = Ganache.provider({seed: "decoder", gasLimit: 7000000});
    web3 = new Web3(provider);
  });

  before("Prepare contracts and artifacts", async function () {
    this.timeout(30000);

    const prepared = await prepareContracts(provider, path.resolve(__dirname, ".."));
    abstractions = prepared.abstractions;
    compilations = prepared.compilations;

    Contracts = [
      abstractions.WireTest,
      abstractions.WireTestParent,
      abstractions.WireTestLibrary,
      abstractions.WireTestAbstract,
      abstractions.WireTestRedHerring
    ];
  });

  it("should correctly decode transactions and events", async function () {
    let deployedContract = await abstractions.WireTest.new(true, "0xdeadbeef", 2);
    let address = deployedContract.address;
    let constructorHash = deployedContract.transactionHash;

    const decoder = await Decoder.forProject(web3.currentProvider, Contracts);

    let deployedContractNoConstructor = await abstractions.WireTestParent.new();
    let defaultConstructorHash = deployedContractNoConstructor.transactionHash;

    let emitStuffArgs = [
      {
        x: -1,
        y: "0xdeadbeef00000000deadbeef00000000deadbeef00000000deadbeef00000000",
        z: "0xbababa"
      },
      [
        "0x0000000000000000000000000000000000000001",
        "0x0000000000000000000000000000000000000002"
      ],
      ["hello", "hi", "hooblypoob"]
    ];
    let emitStuff = await deployedContract.emitStuff(...emitStuffArgs);
    let emitStuffHash = emitStuff.tx;

    let moreStuffArgs = [address, [8, 8, 8, 7, 8, 8, 8]];
    let moreStuff = await deployedContract.moreStuff(...moreStuffArgs);
    let moreStuffHash = moreStuff.tx;

    let globalTestArgs = [{ x: 3, y: 5 }, 1];
    let globalTest = await deployedContract.globalTest(...globalTestArgs);
    let globalTestHash = globalTest.tx;

    let inheritedArg = [2, 3];
    let inherited = await deployedContract.inherited(inheritedArg);
    let inheritedHash = inherited.tx;

    let indexTestArgs = [7, 89, "hello", "indecipherable", 62];
    let indexTest = await deployedContract.indexTest(...indexTestArgs);

    let libraryTestArg = "zooglyzooglyzooglyzoogly";
    let libraryTest = await deployedContract.libraryTest(libraryTestArg);

    let getter1Args = ["blornst", 1];
    //this function is view so we have to use sendTransaction
    let getterTest1 = await deployedContract.deepStruct.sendTransaction(
      ...getter1Args
    );
    let getterHash1 = getterTest1.tx;

    let getter2Args = [1, "blornst"];
    //this function is view so we have to use sendTransaction
    let getterTest2 = await deployedContract.deepString.sendTransaction(
      ...getter2Args
    );
    let getterHash2 = getterTest2.tx;

    let constructorTx = await web3.eth.getTransaction(constructorHash);
    let emitStuffTx = await web3.eth.getTransaction(emitStuffHash);
    let moreStuffTx = await web3.eth.getTransaction(moreStuffHash);
    let globalTestTx = await web3.eth.getTransaction(globalTestHash);
    let inheritedTx = await web3.eth.getTransaction(inheritedHash);
    let getterTx1 = await web3.eth.getTransaction(getterHash1);
    let getterTx2 = await web3.eth.getTransaction(getterHash2);
    let defaultConstructorTx = await web3.eth.getTransaction(
      defaultConstructorHash
    );

    let constructorDecoding = await decoder.decodeTransaction(constructorTx);
    let emitStuffDecoding = await decoder.decodeTransaction(emitStuffTx);
    let moreStuffDecoding = await decoder.decodeTransaction(moreStuffTx);
    let globalTestDecoding = await decoder.decodeTransaction(globalTestTx);
    let inheritedDecoding = await decoder.decodeTransaction(inheritedTx);
    let getterDecoding1 = await decoder.decodeTransaction(getterTx1);
    let getterDecoding2 = await decoder.decodeTransaction(getterTx2);
    let defaultConstructorDecoding = await decoder.decodeTransaction(
      defaultConstructorTx
    );

    assert.strictEqual(constructorDecoding.kind, "constructor");
    assert.strictEqual(constructorDecoding.class.typeName, "WireTest");
    assert.lengthOf(constructorDecoding.arguments, 3);
    assert.strictEqual(constructorDecoding.arguments[0].name, "status");
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(
        constructorDecoding.arguments[0].value
      ),
      true
    );
    assert.strictEqual(constructorDecoding.arguments[1].name, "info");
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(
        constructorDecoding.arguments[1].value
      ),
      "0xdeadbeef"
    );
    assert.strictEqual(constructorDecoding.arguments[2].name, "whoknows");
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(
        constructorDecoding.arguments[2].value
      ),
      "WireTest.Ternary.MaybeSo"
    );

    assert.strictEqual(emitStuffDecoding.kind, "function");
    assert.strictEqual(emitStuffDecoding.abi.name, "emitStuff");
    assert.strictEqual(emitStuffDecoding.class.typeName, "WireTest");
    assert.lengthOf(emitStuffDecoding.arguments, 3);
    assert.strictEqual(emitStuffDecoding.arguments[0].name, "p");
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(emitStuffDecoding.arguments[0].value),
      emitStuffArgs[0]
    );
    assert.strictEqual(emitStuffDecoding.arguments[1].name, "precompiles");
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(emitStuffDecoding.arguments[1].value),
      emitStuffArgs[1]
    );
    assert.strictEqual(emitStuffDecoding.arguments[2].name, "strings");
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(emitStuffDecoding.arguments[2].value),
      emitStuffArgs[2]
    );

    assert.strictEqual(moreStuffDecoding.kind, "function");
    assert.strictEqual(moreStuffDecoding.abi.name, "moreStuff");
    assert.strictEqual(moreStuffDecoding.class.typeName, "WireTest");
    assert.lengthOf(moreStuffDecoding.arguments, 2);
    assert.strictEqual(moreStuffDecoding.arguments[0].name, "notThis");
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(moreStuffDecoding.arguments[0].value),
      moreStuffArgs[0]
    );
    assert.strictEqual(moreStuffDecoding.arguments[1].name, "bunchOfInts");
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(moreStuffDecoding.arguments[1].value),
      moreStuffArgs[1]
    );

    assert.strictEqual(globalTestDecoding.kind, "function");
    assert.strictEqual(globalTestDecoding.abi.name, "globalTest");
    assert.strictEqual(globalTestDecoding.class.typeName, "WireTest");
    assert.lengthOf(globalTestDecoding.arguments, 2);
    assert.strictEqual(globalTestDecoding.arguments[0].name, "s");
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        globalTestDecoding.arguments[0].value
      ),
      globalTestArgs[0]
    );
    assert.strictEqual(globalTestDecoding.arguments[1].name, "e");
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(
        globalTestDecoding.arguments[1].value
      ),
      "GlobalEnum.Yes"
    );

    assert.strictEqual(inheritedDecoding.kind, "function");
    assert.strictEqual(inheritedDecoding.abi.name, "inherited");
    assert.strictEqual(inheritedDecoding.class.typeName, "WireTest"); //NOT WireTestParent
    assert.lengthOf(inheritedDecoding.arguments, 1);
    assert.isUndefined(inheritedDecoding.arguments[0].name);
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(inheritedDecoding.arguments[0].value),
      inheritedArg
    );

    assert.strictEqual(defaultConstructorDecoding.kind, "constructor");
    assert.strictEqual(
      defaultConstructorDecoding.class.typeName,
      "WireTestParent"
    );
    assert.isEmpty(defaultConstructorDecoding.arguments);

    assert.strictEqual(getterDecoding1.kind, "function");
    assert.strictEqual(getterDecoding1.abi.name, "deepStruct");
    assert.strictEqual(getterDecoding1.class.typeName, "WireTest");
    assert.lengthOf(getterDecoding1.arguments, 2);
    assert.isUndefined(getterDecoding1.arguments[0].name);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(getterDecoding1.arguments[0].value),
      getter1Args[0]
    );
    assert.isUndefined(getterDecoding1.arguments[1].name);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(getterDecoding1.arguments[1].value),
      getter1Args[1]
    );

    assert.strictEqual(getterDecoding2.kind, "function");
    assert.strictEqual(getterDecoding2.abi.name, "deepString");
    assert.strictEqual(getterDecoding2.class.typeName, "WireTest");
    assert.lengthOf(getterDecoding2.arguments, 2);
    assert.isUndefined(getterDecoding2.arguments[0].name);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(getterDecoding2.arguments[0].value),
      getter2Args[0]
    );
    assert.isUndefined(getterDecoding2.arguments[1].name);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(getterDecoding2.arguments[1].value),
      getter2Args[1]
    );

    //now for events!
    let constructorBlock = constructorTx.blockNumber;
    let emitStuffBlock = emitStuff.receipt.blockNumber;
    let moreStuffBlock = moreStuff.receipt.blockNumber;
    let globalTestBlock = globalTest.receipt.blockNumber;
    let inheritedBlock = inherited.receipt.blockNumber;
    let indexTestBlock = indexTest.receipt.blockNumber;
    let libraryTestBlock = libraryTest.receipt.blockNumber;

    try {
      //due to web3's having ethers's crappy decoder built in,
      //we have to put this in a try block to catch the error
      await deployedContract.danger();
    } catch (_) {
      //discard the error!
    }

    let constructorEvents = await decoder.events({
      fromBlock: constructorBlock,
      toBlock: constructorBlock
    });
    let emitStuffEvents = await decoder.events({
      fromBlock: emitStuffBlock,
      toBlock: emitStuffBlock
    });
    let moreStuffEvents = await decoder.events({
      fromBlock: moreStuffBlock,
      toBlock: moreStuffBlock
    });
    let globalTestEvents = await decoder.events({
      fromBlock: globalTestBlock,
      toBlock: globalTestBlock
    });
    let inheritedEvents = await decoder.events({
      fromBlock: inheritedBlock,
      toBlock: inheritedBlock
    });
    let indexTestEvents = await decoder.events({
      fromBlock: indexTestBlock,
      toBlock: indexTestBlock
    });
    let libraryTestEvents = await decoder.events({
      fromBlock: libraryTestBlock,
      toBlock: libraryTestBlock
    });
    //HACK -- since danger was last, we can just ask for the
    //events from the latest block
    let dangerEvents = await decoder.events();

    assert.lengthOf(constructorEvents, 1);
    let constructorEventDecodings = constructorEvents[0].decodings;
    assert.lengthOf(constructorEventDecodings, 1);
    let constructorEventDecoding = constructorEventDecodings[0];

    assert.lengthOf(emitStuffEvents, 1);
    let emitStuffEventDecodings = emitStuffEvents[0].decodings;
    assert.lengthOf(emitStuffEventDecodings, 1);
    let emitStuffEventDecoding = emitStuffEventDecodings[0];

    assert.lengthOf(moreStuffEvents, 1);
    let moreStuffEventDecodings = moreStuffEvents[0].decodings;
    assert.lengthOf(moreStuffEventDecodings, 1);
    let moreStuffEventDecoding = moreStuffEventDecodings[0];

    assert.lengthOf(globalTestEvents, 1);
    let globalTestEventDecodings = globalTestEvents[0].decodings;
    assert.lengthOf(globalTestEventDecodings, 1);
    let globalTestEventDecoding = globalTestEventDecodings[0];

    assert.lengthOf(inheritedEvents, 1);
    let inheritedEventDecodings = inheritedEvents[0].decodings;
    assert.lengthOf(inheritedEventDecodings, 1);
    let inheritedEventDecoding = inheritedEventDecodings[0];

    assert.lengthOf(indexTestEvents, 1);
    let indexTestEventDecodings = indexTestEvents[0].decodings;
    assert.lengthOf(indexTestEventDecodings, 1);
    let indexTestEventDecoding = indexTestEventDecodings[0];

    assert.lengthOf(libraryTestEvents, 1);
    let libraryTestEventDecodings = libraryTestEvents[0].decodings;
    assert.lengthOf(libraryTestEventDecodings, 1);
    let libraryTestEventDecoding = libraryTestEventDecodings[0];

    assert.lengthOf(dangerEvents, 1);
    let dangerEventDecodings = dangerEvents[0].decodings;
    assert.lengthOf(dangerEventDecodings, 1);
    let dangerEventDecoding = dangerEventDecodings[0];

    assert.strictEqual(constructorEventDecoding.kind, "event");
    assert.strictEqual(constructorEventDecoding.class.typeName, "WireTest");
    assert.strictEqual(constructorEventDecoding.definedIn.typeName, "WireTest");
    assert.strictEqual(constructorEventDecoding.abi.name, "ConstructorEvent");
    assert.lengthOf(constructorEventDecoding.arguments, 3);
    assert.strictEqual(constructorEventDecoding.arguments[0].name, "bit");
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(
        constructorEventDecoding.arguments[0].value
      ),
      true
    );
    assert.isUndefined(constructorEventDecoding.arguments[1].name);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(
        constructorEventDecoding.arguments[1].value
      ),
      "0xdeadbeef"
    );
    assert.isUndefined(constructorEventDecoding.arguments[2].name);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(
        constructorEventDecoding.arguments[2].value
      ),
      "WireTest.Ternary.MaybeSo"
    );

    assert.strictEqual(emitStuffEventDecoding.kind, "event");
    assert.strictEqual(emitStuffEventDecoding.abi.name, "EmitStuff");
    assert.strictEqual(emitStuffEventDecoding.class.typeName, "WireTest");
    assert.strictEqual(emitStuffEventDecoding.definedIn.typeName, "WireTest");
    assert.lengthOf(emitStuffEventDecoding.arguments, 3);
    assert.isUndefined(emitStuffEventDecoding.arguments[0].name);
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        emitStuffEventDecoding.arguments[0].value
      ),
      emitStuffArgs[0]
    );
    assert.isUndefined(emitStuffEventDecoding.arguments[1].name);
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        emitStuffEventDecoding.arguments[1].value
      ),
      emitStuffArgs[1]
    );
    assert.isUndefined(emitStuffEventDecoding.arguments[2].name);
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        emitStuffEventDecoding.arguments[2].value
      ),
      emitStuffArgs[2]
    );

    assert.strictEqual(moreStuffEventDecoding.kind, "event");
    assert.strictEqual(moreStuffEventDecoding.abi.name, "MoreStuff");
    assert.strictEqual(moreStuffEventDecoding.class.typeName, "WireTest");
    assert.strictEqual(moreStuffEventDecoding.definedIn.typeName, "WireTest");
    assert.lengthOf(moreStuffEventDecoding.arguments, 2);
    assert.isUndefined(moreStuffEventDecoding.arguments[0].name);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(
        moreStuffEventDecoding.arguments[0].value
      ),
      moreStuffArgs[0]
    );
    assert.strictEqual(moreStuffEventDecoding.arguments[1].name, "data");
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        moreStuffEventDecoding.arguments[1].value
      ),
      moreStuffArgs[1]
    );

    assert.strictEqual(globalTestEventDecoding.kind, "event");
    assert.strictEqual(globalTestEventDecoding.abi.name, "Globals");
    assert.strictEqual(globalTestEventDecoding.class.typeName, "WireTest");
    assert.strictEqual(globalTestEventDecoding.definedIn.typeName, "WireTest");
    assert.lengthOf(globalTestEventDecoding.arguments, 2);
    assert.isUndefined(globalTestEventDecoding.arguments[0].name);
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        globalTestEventDecoding.arguments[0].value
      ),
      globalTestArgs[0]
    );
    assert.isUndefined(globalTestEventDecoding.arguments[1].name);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(
        globalTestEventDecoding.arguments[1].value
      ),
      "GlobalEnum.Yes"
    );

    assert.strictEqual(inheritedEventDecoding.kind, "event");
    assert.strictEqual(inheritedEventDecoding.abi.name, "Done");
    assert.strictEqual(inheritedEventDecoding.class.typeName, "WireTest");
    assert.strictEqual(
      inheritedEventDecoding.definedIn.typeName,
      "WireTestParent"
    );
    assert.isEmpty(inheritedEventDecoding.arguments);

    assert.strictEqual(indexTestEventDecoding.kind, "event");
    assert.strictEqual(indexTestEventDecoding.abi.name, "HasIndices");
    assert.strictEqual(indexTestEventDecoding.class.typeName, "WireTest");
    assert.strictEqual(indexTestEventDecoding.definedIn.typeName, "WireTest");
    assert.lengthOf(indexTestEventDecoding.arguments, 5);
    assert.isUndefined(indexTestEventDecoding.arguments[0].name);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(
        indexTestEventDecoding.arguments[0].value
      ),
      indexTestArgs[0]
    );
    assert.isUndefined(indexTestEventDecoding.arguments[1].name);
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        indexTestEventDecoding.arguments[1].value
      ),
      indexTestArgs[1]
    );
    assert.isUndefined(indexTestEventDecoding.arguments[2].name);
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        indexTestEventDecoding.arguments[2].value
      ),
      indexTestArgs[2]
    );
    assert.isUndefined(indexTestEventDecoding.arguments[3].name);
    assert.isUndefined(
      Codec.Format.Utils.Inspect.nativize(
        indexTestEventDecoding.arguments[3].value
      ) //can't decode indexed reference type!
    );
    assert.isUndefined(indexTestEventDecoding.arguments[4].name);
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        indexTestEventDecoding.arguments[4].value
      ),
      indexTestArgs[4]
    );

    assert.strictEqual(libraryTestEventDecoding.kind, "event");
    assert.strictEqual(libraryTestEventDecoding.abi.name, "LibraryEvent");
    assert.strictEqual(
      libraryTestEventDecoding.class.typeName,
      "WireTestLibrary"
    );
    assert.strictEqual(
      libraryTestEventDecoding.definedIn.typeName,
      "WireTestLibrary"
    );
    assert.lengthOf(libraryTestEventDecoding.arguments, 1);
    assert.isUndefined(libraryTestEventDecoding.arguments[0].name);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(
        libraryTestEventDecoding.arguments[0].value
      ),
      libraryTestArg
    );

    assert.strictEqual(dangerEventDecoding.kind, "event");
    assert.strictEqual(dangerEventDecoding.abi.name, "Danger");
    assert.lengthOf(dangerEventDecoding.arguments, 1);
    assert.isUndefined(dangerEventDecoding.arguments[0].name);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(
        dangerEventDecoding.arguments[0].value
      ),
      `WireTest(${address}).danger`
    );
  });

  it("disambiguates events when possible and not when impossible", async function () {
    let deployedContract = await abstractions.WireTest.deployed();

    const decoder = await Decoder.forProject(web3.currentProvider, Contracts);

    //HACK HACK -- we're going to repeatedly apply the hack from above
    //because ethers also can't handle ambiguous events
    try {
      await deployedContract.ambiguityTest();
    } catch (_) {
      //discard the error!
    }
    let ambiguityTestEvents = await decoder.events();
    try {
      await deployedContract.unambiguityTest();
    } catch (_) {
      //discard the error!
    }
    let unambiguityTestEvents = await decoder.events();

    assert.lengthOf(ambiguityTestEvents, 1);
    let ambiguityTestEventDecodings = ambiguityTestEvents[0].decodings;
    assert.lengthOf(ambiguityTestEventDecodings, 2); //it's ambiguous!
    //contract should always come before libraries
    let ambiguityTestContractDecoding = ambiguityTestEventDecodings[0];
    let ambiguityTestLibraryDecoding = ambiguityTestEventDecodings[1];

    assert.lengthOf(unambiguityTestEvents, 4);
    for (let event of unambiguityTestEvents) {
      assert.lengthOf(event.decodings, 1); //they're unambiguous!
    }
    let unambiguousDecodings = unambiguityTestEvents.map(
      ({ decodings }) => decodings[0]
    );
    assert.strictEqual(ambiguityTestContractDecoding.kind, "event");
    assert.strictEqual(
      ambiguityTestContractDecoding.abi.name,
      "AmbiguousEvent"
    );
    assert.strictEqual(
      ambiguityTestContractDecoding.class.typeName,
      "WireTest"
    );
    assert.lengthOf(ambiguityTestContractDecoding.arguments, 2);
    assert.isUndefined(
      Codec.Format.Utils.Inspect.nativize(
        ambiguityTestContractDecoding.arguments[0].value
      )
    );
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        ambiguityTestContractDecoding.arguments[1].value
      ),
      [32, 3, 17, 18, 19]
    );

    assert.strictEqual(ambiguityTestLibraryDecoding.kind, "event");
    assert.strictEqual(ambiguityTestLibraryDecoding.abi.name, "AmbiguousEvent");
    assert.strictEqual(
      ambiguityTestLibraryDecoding.class.typeName,
      "WireTestLibrary"
    );
    assert.lengthOf(ambiguityTestLibraryDecoding.arguments, 2);
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        ambiguityTestLibraryDecoding.arguments[0].value
      ),
      [17, 18, 19]
    );
    assert.isUndefined(
      Codec.Format.Utils.Inspect.nativize(
        ambiguityTestLibraryDecoding.arguments[1].value
      )
    );

    for (let decoding of unambiguousDecodings) {
      assert.strictEqual(decoding.kind, "event");
      assert.strictEqual(decoding.abi.name, "AmbiguousEvent");
    }

    assert.strictEqual(unambiguousDecodings[0].class.typeName, "WireTest");
    assert.lengthOf(unambiguousDecodings[0].arguments, 2);
    assert.isUndefined(
      Codec.Format.Utils.Inspect.nativize(
        unambiguousDecodings[0].arguments[0].value
      )
    );
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        unambiguousDecodings[0].arguments[1].value
      ),
      [32, 1e12, 17, 18, 19]
    );

    assert.strictEqual(unambiguousDecodings[1].class.typeName, "WireTest");
    assert.lengthOf(unambiguousDecodings[1].arguments, 2);
    assert.isUndefined(
      Codec.Format.Utils.Inspect.nativize(
        unambiguousDecodings[1].arguments[0].value
      )
    );
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        unambiguousDecodings[1].arguments[1].value
      ),
      [32, 3, 257, 257, 257]
    );

    assert.strictEqual(unambiguousDecodings[2].class.typeName, "WireTest");
    assert.lengthOf(unambiguousDecodings[2].arguments, 2);
    assert.isUndefined(
      Codec.Format.Utils.Inspect.nativize(
        unambiguousDecodings[2].arguments[0].value
      )
    );
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        unambiguousDecodings[2].arguments[1].value
      ),
      [64, 0, 2, 1, 1]
    );

    assert.strictEqual(
      unambiguousDecodings[3].class.typeName,
      "WireTestLibrary"
    );
    assert.lengthOf(unambiguousDecodings[3].arguments, 2);
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(
        unambiguousDecodings[3].arguments[0].value
      ),
      [107]
    );
    assert.isUndefined(
      Codec.Format.Utils.Inspect.nativize(
        unambiguousDecodings[3].arguments[1].value
      )
    );
  });

  it("Handles anonymous events", async function () {
    let deployedContract = await abstractions.WireTest.deployed();

    const decoder = await Decoder.forProject(web3.currentProvider, Contracts);

    //thankfully, ethers ignores anonymous events,
    //so we don't need to use that hack here
    let anonymousTest = await deployedContract.anonymousTest();
    let block = anonymousTest.blockNumber;
    let anonymousTestEvents = await decoder.events({
      fromBlock: block,
      toBlock: block
    });
    //also, let's do a test with a specified name
    let specifiedNameEvents = await decoder.events({
      name: "AnonUint8s",
      fromBlock: block,
      toBlock: block
    });

    assert.lengthOf(anonymousTestEvents, 4);

    assert.lengthOf(anonymousTestEvents[0].decodings, 1);
    assert.strictEqual(anonymousTestEvents[0].decodings[0].kind, "anonymous");
    assert.strictEqual(
      anonymousTestEvents[0].decodings[0].abi.name,
      "AnonUints"
    );
    assert.strictEqual(
      anonymousTestEvents[0].decodings[0].class.typeName,
      "WireTest"
    );
    assert.lengthOf(anonymousTestEvents[0].decodings[0].arguments, 4);
    assert.deepEqual(
      anonymousTestEvents[0].decodings[0].arguments.map(({ value }) =>
        Codec.Format.Utils.Inspect.nativize(value)
      ),
      [257, 1, 1, 1]
    );

    assert.lengthOf(anonymousTestEvents[1].decodings, 2);
    assert.strictEqual(anonymousTestEvents[1].decodings[0].kind, "anonymous");
    assert.strictEqual(
      anonymousTestEvents[1].decodings[0].abi.name,
      "AnonUints"
    );
    assert.strictEqual(
      anonymousTestEvents[1].decodings[0].class.typeName,
      "WireTest"
    );
    assert.lengthOf(anonymousTestEvents[1].decodings[0].arguments, 4);
    assert.deepEqual(
      anonymousTestEvents[1].decodings[0].arguments.map(({ value }) =>
        Codec.Format.Utils.Inspect.nativize(value)
      ),
      [1, 2, 3, 4]
    );
    assert.strictEqual(anonymousTestEvents[1].decodings[1].kind, "anonymous");
    assert.strictEqual(
      anonymousTestEvents[1].decodings[1].abi.name,
      "AnonUint8s"
    );
    assert.strictEqual(
      anonymousTestEvents[1].decodings[1].class.typeName,
      "WireTestLibrary"
    );
    assert.lengthOf(anonymousTestEvents[1].decodings[1].arguments, 4);
    assert.deepEqual(
      anonymousTestEvents[1].decodings[1].arguments.map(({ value }) =>
        Codec.Format.Utils.Inspect.nativize(value)
      ),
      [1, 2, 3, 4]
    );

    assert.lengthOf(anonymousTestEvents[2].decodings, 2);
    assert.strictEqual(anonymousTestEvents[2].decodings[0].kind, "event");
    assert.strictEqual(anonymousTestEvents[2].decodings[0].abi.name, "NonAnon");
    assert.strictEqual(
      anonymousTestEvents[2].decodings[0].class.typeName,
      "WireTest"
    );
    assert.lengthOf(anonymousTestEvents[2].decodings[0].arguments, 3);
    assert.deepEqual(
      anonymousTestEvents[2].decodings[0].arguments.map(({ value }) =>
        Codec.Format.Utils.Inspect.nativize(value)
      ),
      [1, 2, 3]
    );
    let selector = anonymousTestEvents[2].decodings[0].selector;
    assert.strictEqual(anonymousTestEvents[2].decodings[1].kind, "anonymous");
    assert.strictEqual(
      anonymousTestEvents[2].decodings[1].abi.name,
      "AnonUints"
    );
    assert.strictEqual(
      anonymousTestEvents[2].decodings[1].class.typeName,
      "WireTest"
    );
    assert.lengthOf(anonymousTestEvents[2].decodings[1].arguments, 4);
    assert.deepEqual(
      anonymousTestEvents[2].decodings[1].arguments
        .slice(1)
        .map(({ value }) => Codec.Format.Utils.Inspect.nativize(value)),
      [1, 2, 3]
    );
    assert(
      anonymousTestEvents[2].decodings[1].arguments[0].value.value.asBN.eq(
        new BN(selector.slice(2), 16)
      )
    );

    assert.lengthOf(anonymousTestEvents[3].decodings, 1);
    assert.strictEqual(anonymousTestEvents[3].decodings[0].kind, "anonymous");
    assert.strictEqual(
      anonymousTestEvents[3].decodings[0].abi.name,
      "ObviouslyAnon"
    );
    assert.strictEqual(
      anonymousTestEvents[3].decodings[0].class.typeName,
      "WireTest"
    );
    assert.lengthOf(anonymousTestEvents[3].decodings[0].arguments, 1);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(
        anonymousTestEvents[3].decodings[0].arguments[0].value
      ),
      "0xfe"
    );

    //now, let's test the specified name events
    assert.lengthOf(specifiedNameEvents, 1);
    let specifiedNameEvent = specifiedNameEvents[0];
    assert.lengthOf(specifiedNameEvent.decodings, 1);
    let specifiedNameDecoding = specifiedNameEvent.decodings[0];
    assert.strictEqual(specifiedNameDecoding.kind, "anonymous");
    assert.strictEqual(specifiedNameDecoding.abi.name, "AnonUint8s");
    assert.strictEqual(specifiedNameDecoding.class.typeName, "WireTestLibrary");
    assert.lengthOf(specifiedNameDecoding.arguments, 4);
    assert.deepEqual(
      specifiedNameDecoding.arguments.map(({ value }) =>
        Codec.Format.Utils.Inspect.nativize(value)
      ),
      [1, 2, 3, 4]
    );
  });

  it("respects the extras option", async function () {
    const deployedContract = await abstractions.WireTest.deployed();
    const delegate = await abstractions.WireTestRedHerring.deployed();

    const decoder = await Decoder.forProject(web3.currentProvider,
      Contracts
    );

    const extrasTestNone = await deployedContract.extrasTestNone(
      delegate.address
    );
    const extrasTestSome = await deployedContract.extrasTestSome();

    const noneBlock = extrasTestNone.receipt.blockNumber;
    const someBlock = extrasTestSome.receipt.blockNumber;

    const noneTestEvents = await decoder.events({
      fromBlock: noneBlock,
      toBlock: noneBlock
    });

    const someTestEvents = await decoder.events({
      fromBlock: someBlock,
      toBlock: someBlock
    });

    const noneTestEventsExtras = await decoder.events({
      fromBlock: noneBlock,
      toBlock: noneBlock,
      extras: "on"
    });

    const someTestEventsExtras = await decoder.events({
      fromBlock: someBlock,
      toBlock: someBlock,
      extras: "on"
    });

    const noneTestEventsMaybe = await decoder.events({
      fromBlock: noneBlock,
      toBlock: noneBlock,
      extras: "necessary"
    });

    const someTestEventsMaybe = await decoder.events({
      fromBlock: someBlock,
      toBlock: someBlock,
      extras: "necessary"
    });

    assert.lengthOf(someTestEvents, 1);
    assert.lengthOf(someTestEventsExtras, 1);
    assert.lengthOf(someTestEventsMaybe, 1);
    assert.lengthOf(noneTestEvents, 1);
    assert.lengthOf(noneTestEventsExtras, 1);
    assert.lengthOf(noneTestEventsMaybe, 1);

    const someDecodings = someTestEvents[0].decodings;
    const someDecodingsExtras = someTestEventsExtras[0].decodings;
    const someDecodingsMaybe = someTestEventsMaybe[0].decodings;
    const noneDecodings = noneTestEvents[0].decodings;
    const noneDecodingsExtras = noneTestEventsExtras[0].decodings;
    const noneDecodingsMaybe = noneTestEventsMaybe[0].decodings;

    testNoneWithoutExtras(noneDecodings);
    testNoneWithExtras(noneDecodingsExtras);
    testNoneWithExtras(noneDecodingsMaybe); //with no ordinary interpretations, extras should appear
    testSomeWithoutExtras(someDecodings);
    testSomeWithExtras(someDecodingsExtras);
    testSomeWithoutExtras(someDecodingsMaybe); //there are no ordinary interpretations, so no extras
  });

  it("Decodes return values", async function () {
    const { WireTest } = abstractions;
    let deployedContract = await WireTest.deployed();

    const decoder = await Decoder.forContract(WireTest, Contracts);

    let abiEntry = WireTest.abi.find(
      ({ type, name }) => type === "function" && name === "returnsStuff"
    );
    let selector = web3.eth.abi.encodeFunctionSignature(abiEntry);

    //we need the raw return data, and contract.call() does not exist yet,
    //so we're going to have to use web3.eth.call()

    let data = await web3.eth.call({
      to: deployedContract.address,
      data: selector
    });

    let decodings = await decoder.decodeReturnValue(abiEntry, data);
    assert.lengthOf(decodings, 1);
    let decoding = decodings[0];
    assert.strictEqual(decoding.kind, "return");
    assert.strictEqual(decoding.decodingMode, "full");
    assert.lengthOf(decoding.arguments, 2);
    assert.deepEqual(
      Codec.Format.Utils.Inspect.nativize(decoding.arguments[0].value),
      {
        x: -1,
        y: "0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
        z: "0xdeadbeef"
      }
    );
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(decoding.arguments[1].value),
      "WireTest.Ternary.No"
    );

    //now: let's try decoding a self-destruct :D
    let sdAbiEntry = WireTest.abi.find(
      ({ type, name }) => type === "function" && name === "boom"
    );
    let sdSelector = web3.eth.abi.encodeFunctionSignature(sdAbiEntry);

    //we need the raw return data, and contract.call() does not exist yet,
    //so we're going to have to use web3.eth.call()

    let sdData = await web3.eth.call({
      to: deployedContract.address,
      data: sdSelector
    });

    let sdDecodings = await decoder.decodeReturnValue(sdAbiEntry, sdData, {
      status: true
    });

    assert.lengthOf(sdDecodings, 1);
    assert.strictEqual(sdDecodings[0].kind, "selfdestruct");
    assert.strictEqual(sdDecodings[0].decodingMode, "full");
  });

  it("Decodes return values when given superclass", async function () {
    const { WireTest, WireTestParent, WireTestAbstract } = abstractions;
    const deployedContract = await WireTest.deployed();

    let decoder = await Decoder.forContractAt(
      WireTestParent,
      deployedContract.address,
      Contracts
    );

    let abiEntry = WireTestParent.abi.find(
      ({ type, name }) => type === "function" && name === "inheritedReturn"
    );
    let selector = web3.eth.abi.encodeFunctionSignature(abiEntry);

    //we need the raw return data, and contract.call() does not exist yet,
    //so we're going to have to use web3.eth.call()

    let data = await web3.eth.call({
      to: deployedContract.address,
      data: selector
    });

    let decodings = await decoder.decodeReturnValue(abiEntry, data);
    assert.lengthOf(decodings, 1);
    let decoding = decodings[0];
    assert.strictEqual(decoding.kind, "return");
    assert.strictEqual(decoding.decodingMode, "full");
    assert.lengthOf(decoding.arguments, 1);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(decoding.arguments[0].value),
      1
    );

    //now again, but with an abstract contract
    decoder = await Decoder.forContractAt(
      WireTestAbstract,
      deployedContract.address,
      Contracts
    );

    abiEntry = WireTestAbstract.abi.find(
      ({ type, name }) => type === "function" && name === "overriddenReturn"
    );
    selector = web3.eth.abi.encodeFunctionSignature(abiEntry);

    //we need the raw return data, and contract.call() does not exist yet,
    //so we're going to have to use web3.eth.call()

    data = await web3.eth.call({
      to: deployedContract.address,
      data: selector
    });

    decodings = await decoder.decodeReturnValue(abiEntry, data);
    assert.lengthOf(decodings, 1);
    decoding = decodings[0];
    assert.strictEqual(decoding.kind, "return");
    assert.strictEqual(decoding.decodingMode, "full");
    assert.lengthOf(decoding.arguments, 1);
    assert.strictEqual(
      Codec.Format.Utils.Inspect.nativize(decoding.arguments[0].value),
      2
    );
  });
});

function testNoneWithoutExtras(decodings) {
  //no normal decodings, no extras, so should be empty
  assert.lengthOf(decodings, 0);
}

function testNoneWithExtras(decodings) {
  //just the extra decoding
  assert.lengthOf(decodings, 1);
  const decoding = decodings[0];
  assert.strictEqual(decoding.kind, "event");
  assert.strictEqual(decoding.class.typeName, "WireTestRedHerring");
  assert.strictEqual(decoding.definedIn.typeName, "WireTestRedHerring");
  assert.strictEqual(decoding.abi.name, "NonAmbiguousEvent");
  assert.strictEqual(decoding.decodingMode, "full");
  assert.lengthOf(decoding.arguments, 0);
}

function testSomeWithoutExtras(decodings) {
  //just the normal decoding
  assert.lengthOf(decodings, 1);
  const decoding = decodings[0];
  assert.strictEqual(decoding.kind, "event");
  assert.strictEqual(decoding.class.typeName, "WireTest");
  assert.strictEqual(decoding.definedIn.typeName, "WireTest");
  assert.strictEqual(decoding.abi.name, "SemiAmbiguousEvent");
  assert.strictEqual(decoding.decodingMode, "full");
  assert.deepEqual(
    decoding.arguments.map(({ value }) =>
      Codec.Format.Utils.Inspect.nativize(value)
    ),
    [1, 2]
  );
}

function testSomeWithExtras(decodings) {
  //just the normal decoding and extras
  assert.lengthOf(decodings, 2);
  const decoding = decodings[0];
  assert.strictEqual(decoding.kind, "event");
  assert.strictEqual(decoding.class.typeName, "WireTest");
  assert.strictEqual(decoding.definedIn.typeName, "WireTest");
  assert.strictEqual(decoding.abi.name, "SemiAmbiguousEvent");
  assert.strictEqual(decoding.decodingMode, "full");
  assert.deepEqual(
    decoding.arguments.map(({ value }) =>
      Codec.Format.Utils.Inspect.nativize(value)
    ),
    [1, 2]
  );
  const extraDecoding = decodings[1];
  assert.strictEqual(extraDecoding.kind, "event");
  assert.strictEqual(extraDecoding.class.typeName, "WireTestRedHerring");
  assert.strictEqual(extraDecoding.definedIn.typeName, "WireTestRedHerring");
  assert.strictEqual(extraDecoding.abi.name, "SemiAmbiguousEvent");
  assert.strictEqual(extraDecoding.decodingMode, "full");
  assert.deepEqual(
    extraDecoding.arguments.map(({ value }) =>
      Codec.Format.Utils.Inspect.nativize(value)
    ),
    [2, 1]
  );
}


text:
Real-Time Strategy Games
Spore Creature Creator
By EA Games Free to try
By EA Games
Spore is an upcoming computer game for a variety of systems that allows users to create unique creatures and guide them on epic journeys through universes of their own creation. The Spore Creature Creator is a separate pre-release utility that is free to try. The trial version contains 25% of the full creature content from the full utility.
First add
Release December 5, 2008
Date Added June 18, 2008
Operating Systems Windows, Windows XP, Windows Vista
Additional Requirements Windows XP/Vista, 2GHz CPU, 512MB RAM (768MB RAM for Vista), 128 MB video card with support for Pixel Shader 2.0, DirectX 9.0c
Age of Empires II HD
Fall in love with the classic Age of Empires II experience, now with high definition graphics.
Play as the British or Spanish in New England or Texas.
Defend your garden from a zombie attack using a variety of plants.
Advance an entire civilization in this strategy game.

redpajama_set_name: RedPajamaCommonCrawl


Oh my god, have you ever been? It is the WORST. I went there for my cousin's wedding and I can't believe people actually LIVE there. It is devoid of all culture and has zero _______.
It's also incredibly dangerous and _________.
That said, it IS crazy cheap to live in Wilmington. My friend Caleb just moved there and for very little money bought a ________.
And now I hear all these young people are moving to Wilmington. Apparently a group of ambitious and optimistic millennials created this whole ________.
In other eras and societies — the Great Depression, the Soviet Union — long lines signify scarcity or oppression. In the Bizarro World that is 21st-century America, it's the opposite: Long lines are signs of abundance and hedonism. Much can be learned about a civilization from studying its queuing habits, and Comic-Con surpasses even the Disney theme parks in the sophistication of its crowd management and the variety of its arrangements.
Where has Syriza taken Greece? Which are the forces at play in the restructuring of the Greek economy? And what are the conditions of its radical critique? What follows is a discussion of Cognord's text "Changing of the Guards", including TH's critical remarks on that text, Cognord's reply to these remarks and Ady Amatia's comments on the questions raised in this discussion. TH and Ady Adamantia are members of Sic collective.
The recent anarchist riots in Greece have cost the country billions of dollars in damage. Rioters destroyed shops and luxury cars, sparing homes. They attacked Citibank and other buildings which represented the system. They were not interested in looting. For example, they broke open an ATM machine and burned all the cash.
From the February 20th agreement in the Eurogroup onwards, it had become clear that Syriza was in no position to implement its Thessaloniki Program. After it became clear that they had no leverage to impose a discussion on debt reduction and an admission of Greece into the Qualitative Easing program of the ECB(European Central Bank),3 Syriza's last chance was to rely on a show of good will from the Troika (which was kind enough to accept a ridiculous name change into "Brussels Group"), in exchange for social and political stability in Greece's troubled territory. A clearly misunderstood version of the "extend and pretend" policy that the Eurozone has been following since the beginning of the crisis was seen by Syriza as a possible win-win for everyone: both the Troika and Syriza would pretend that austerity is minimized, while its essential character would remain unchanged.


These dwellings adorned with mirror mosaics take you through the journey of afflicted migrants. A peek through the peep holes of each dwelling reveals a story of transformation, and leads to the final fourth dwelling which is a red and white mosaic that radiates a kaleidoscope of colours.
Why you should go: This socially moving piece depicts the journey of afflicted migrants in a stunning, captivating way.
This installation explores the possible impact on human health if we are denied regular access to the natural environment. As "patients" to the clinic, visitors experience an interactive choreography of visual, lighting and sound elements that bring the futuristic plot to life.
Photography based installation art inspired by Zahra Saleki's memories in Canada that begins with a powerful image: 150 sets of eyes, belonging to people that she met in Canada.. The room is also surrounded by mirrors, light boxes and includes an interactive element where the audience can own and tell her/his/they story in their own language for 5 minutes. The audience can also get temporary tattoos that represent a label in society that will illuminate.
Why you should go: The only thing better than glow in the dark tattoos are glow in the dark tattoos with a profound meaning.
A group of cars with souped-up sound systems are parked under a bridge in front of the parliament building. You'll hear the bass before you see them, as their systems are connected together in a 6 channel immersive sound piece amplified through the cars.
Why you should go: If you love music, this one's for you.
Drawbacks: You can't escape whatever song these 6 cars will play, even if it's Nickelback.
An experimental composition combining poetry and music, Listen to the Chorus was developed from a series of conversations about women's experiences and hopes for the future. This immersive video installation seeks to amplify voices of those who identify as women and to present a chorus of resistance that implores the audience to listen.
Why you should go: There is literally nothing better than inspiring conversations surrounding women.
Drawbacks: You'll probably leave with a raging desire to go protest outside the White House.
This government issued workstation reflects the future's decimated landscape. People clock in for their shifts and work tirelessly during the days to filter water, grow food hydroponically, attempt to make communication with "the others" and take their daily dose of life, a serum that protects citizens from the high levels of pollutants in the air and water.
At night the space is converted into an activist meeting place by The Stolen People, rebels who are resisting the system and have created a life-giving serum of their own. They are Black people - people who would not be eradicated.
Why you should go: This powerful message fits perfectly with this year's Nuit Blanche theme.
Drawbacks: Students don't like to think about graduation, nevermind 100 years from now.
This structure depicts landscapes both in their natural environment and altered states of industry and destruction caused by human impact. Combining natural elements (willow saplings) with ethereal visual projections and soundscapes, Nagam has created a series of three wigwam-like dome structures which invite viewer's engagement.
Why you should go: To gain a deeper insight into how we can look after our planet.
Drawbacks: You just need to walk down Yonge to see how a natural environment is destructed.
An interactive installation that uses the ambient noise of the room to trigger movement from glowing orbs of light. Intended to react to the noises that audiences create in the space, DELIGHT uses kinetic sculpture to create a social and playful sound-making environment.
Krista Kim explores the physiological effect of digital light with this display, showing how the light is a manipulation of software and the sensation it has on the human brain.
This installation investigates city transformation in Canada and countries that Canadians have originated from by layering images of both settings to suggest new forms of urban experiences. Based on diverse cultural design practices that citizens bring to their city, the projections stand in a maze-like structure where they change with the audience's movement through the space.
Domanique Grant's music album PLAYHOUSE takes you through an interactive play space that reimagines the meaning of "home" for millennials in Toronto's hidden public housing neighborhoods.
Watch this performance progress throughout the night as the artist translates T.S. Eliot's canonical poem "The Waste Land" into a knitted tapestry. The artist will knit the 500-line poem over 12 hours.
The project features an undulating fabric canopy catching computationally generated moving projections of stars and the northern Canadian night sky.
Why you should go: When do you ever get the chance to see stars in the city?
Drawbacks: When it leaves, Toronto's current polluted night sky will seem even sadder.
Using recycled clothing and textiles from H&M's Garment Collecting Initiative, TRUTH, reimagines discarded garments transformed into a work of art - an abstract sculpture.
This portal is design students will create and implement a temporary site-specific installation that uses the latest lighting technology to illuminate and animate features, public art, and buildings in Toronto's Graffiti Alley.
Three artists create works in which performing bodies adjust the nature of the real or imagined spaces they inhabit. This awareness of the body in space is further magnified as visitors to the gallery move through other bodies in an attempt to access the work.
Photon Gallery 3.0 is a collection of mind-blowing, awe-inspiring interactive lighting installations which include a garden of LED plants and creatures; the transformation of a building wall into a Tetris game; 'invisible' paintings using infrared LEDs; a Ruben's Air Hockey Table that produces small flames that react to sound; a 'Bullet-Time Waterfall' that lets people freeze falling water droplets mid-air; wearable tech costumes; a light-paintable canvas with laser 'paint brushes' for people to create their own art; and glowing orbs that communicate and interact with the public through a combination of light and sound.
The front lawn of a century-old high school is filled with interactive installations based on popular games or fortune-telling activities. It will show how a single event can result in a multiplicity of outcomes. With determination and luck, good fortune can result – but how many end up broken?
"Wiggly Street" is an urban celebration of Canada, 150 Years into the Future. It includes projection mapping, sculptural installations with LED components representing futuristic urban forestry, and live audio and group dance performances. This performance will symbolically ignite the 'Reactor' that powers the installation, fueled by the vibrations caused by audience movement.
This protest invites Nuit Blanche Toronto audiences to sit or stand and engage in a discussion about the multiple meanings and definitions of Canadian values. Protest signs that marry the political and the artistic in their designs will create a circular amphitheatre. These placards will serve the dual purpose of becoming an art installation and of constructing a safe and positive space for the exchange of ideas and the appreciation of art.
Why you should go: In today's political climate, we all need a safe space to express our thoughts and concerns.
Send us your pics and thoughts while you're out at Nuit Blanche 2014 by tagging us @RUStudentLife, and make sure to follow us on Snapchat, Instagram, Twitter, and Facebook! We'll be out hitting the streets all night and can't wait to share our experience!


text:
Q: Trouble with making a piglatin converter Okay so I'm having some trouble trying to get this to remove everything before the first vowel, adding it to the end, and then adding "ay" to the end of that
    function translate(word) { // put first constants at end && add "ay"
      var result = word;
      var end = "WillBeOverrideN";
      for (var i = 0; i < result.length; i++) {
        if (result.charAt(i) === ("a" || "e" || "i" || "o" || "u")) {
          end = result.slice(0, i-1); // everything b/f vowel
          result = result.slice(i-1); // everything after && vowel
          result += end;
          break;
        }
      }
      result += "ay";
      return result;
    }

A: you have to change function slightly,
here is the working function
function translate(word) { // put first constants at end && add "ay"
      var result = word;
      var last = "WillBeOverrideN";
      for (var i = 0; i < result.length; i++) {
        if(["a","e","i","o","u"].indexOf(result[i]) !== -1){

          last = result.slice(0, i); // everything b/f vowel
          result = result.slice(i); // everything after && vowel
          result += last ;
          break;
        }
      }
      result += "ay";
      return result;
    }

redpajama_set_name: RedPajamaStackExchange


text:
Q: Permisions overwritten when files are transferred via FTP. What to do? Got my web server up and running using apache2 with the ability to ftp to /var/www folder.  However, if I make an update to .html and copied over the file via ftp, the file's permissions become more restrictive such that apache produces an error to the web client that file is not readable because of insufficient permissions (or something to that effect).  I then have to ssh in and modify the permissions to the associated files (sudo chmod 755 *) while in /var/www.
Is there an easier to do this?

A: You have few options:

*

*Set local_umask in vsftpd.conf to 022 instead of default 077

*Set chmod_enable to YES and do CHMOD via ftp client (if it does not do so already)

By the way, better to use scp, because it does not transmits your credentials in plaintext, and you can configure public key authentication, so you will not have to enter password each time, but I'm not sure about how it sets permissions on uploaded files.


There is a strong focus on excellence at this new British school Dubai, and parents can rest assured that their children will receive the best education possible through a combination of contemporary teaching approaches, student involvement and the latest that technology has to offer. The School is committed to moulding its students into well-rounded individuals who engage with their learning and thrive on a social level. Our curriculum is enhanced through a variety of sporting and artistic opportunities. In addition we offer an enhanced language programme at all ages including Arabic, Mandarin, Spanish, French and German.


Great story…an enjoyable way to spend a rainy day! Easy, fun read that keeps you turning the pages. I don't read that many romance novels but gave this one a try. Engaging characters and a good story line especially if if you also happen to be a dog lover!
A wonderful way to spend an evening curled up with a good book.


text:
Leadville, Colorado circa 1882
Called the "Cloud City" because of its 10,000-foot elevation, Leadville, Colorado was both the highest city in the country and the richest silver camp in the world. By 1882, when Doc Holliday arrived, the Leadville mining district was producing $14 million worth of silver and the hills were warrened with mine shafts, cluttered with stamp mills, and overhung with the haze of smelters that never stopped burning. With all that money and a population of 40,000 and growing, Leadville seemed destined to take over Denver's place as the state capital. The city's main thoroughfare of Harrison Street was crowded day and night with coaches and carriages, ore wagons and delivery drays, foot traffic and fine horses and trains of burros bound for the mines. There were brick and stone sidewalks fronting tall business buildings, stores filled with every description of merchandise, a grand Opera House provided by Horace Tabor, and enough law offices to handle all the legal entanglements of claims and claim jumpers, mine deeds and multiple-owner partnerships. There were, in fact, nearly as many lawyers in Leadville as there were saloons—and there were nearly a hundred of those, making saloon-keeping the biggest business in town. And where there were saloons, there were all the lesser establishments that went along with them: gambling houses, dance halls, bordellos and opium dens.
Filed Under: Doc Holliday Stories Tagged With: colorado, doc holliday smallpox, epidemic, leadville, smallpox, vaccination, vaccine
One of the last—but most important—elements of book publishing is the design of the cover. A self published author may have complete control over cover design, while a traditionally published author (like yours truly) has a whole art and marketing department to do the work. With many creators taking part in the process, the final product may not reflect the author's first intent, while still satisfying bookstore buyers and distributors.
Filed Under: Doc Holliday Stories Tagged With: doc holliday images, doc holliday photos, The World of Doc Holliday
Val Kilmer as Doc Holliday challenges Johnny Ringo in their last duel.
It's the dramatic final duel between Doc Holliday and his alter-ego nemesis, Johnny Ringo, in the classic Western film "Tombstone," as Doc shoots Ringo dead and comments wryly, "the strain was more than he could bear." Although that's not what really happened (Doc wasn't even in Arizona when Ringo died), there's a reason screenwriter Kevin Jarre wrote it that way: this is drama not documentary, and the rules of
Filed Under: Doc Holliday Stories Tagged With: Cowboy, Johnny Ringo, tombstone
According to popular legend, Doc Holliday left home and went west because he was diagnosed with consumption and told that he had to go to a kinder climate to save his life. And that's partly true. He was eventually diagnosed with consumption (though when or where, we don't know) and he did go to the western Territory of New Mexico for his health. But that was years after he left Georgia, after he'd already made a name for himself in several other states. The first place he went after leaving home was Dallas, Texas, which is in the South, not the West, and which did not have a kinder climate. The Dallas weather was much like Georgia, hot and humid in the summer, cold and humid in the winter. It had also been recently closed down by a yellow fever epidemic and was famous for being the second least healthy place in the country to live, right behind the bayous of Louisiana. No one would go there for his health.
Withlacoochee River
So what was it that made John Henry Holliday leave home? The more likely cause of his western exodus wasn't sickness, but a shooting—a story told in various versions by people who knew him personally, most notably by lawman Bat Masterson. As Masterson tells it, near to the South Georgia village where Holliday was raised ran a little river where a swimming hole had been cleared, and where he one day came across some black boys swimming where he thought they shouldn't be. He ordered them out of the water and when they refused to go, he took a shotgun to them and "caused a massacre." In the troubled days of Reconstruction, his family thought it best that he leave the area, so he moved to Dallas, Texas. The village, of course, was Valdosta, and the river was the nearby Withlacoochee. Continue reading
Filed Under: Doc Holliday Stories Tagged With: doc holliday going west, wyatt earp
No one knew when John Henry Holliday was born that he would die as a legend called "Doc Holliday." So no one bothered keeping the kind of records that his future chronicler would need to bring his story back to life. The facts that were noted were nothing more than would appear in any old family Bible. But if you mix together the few recorded facts of his life before he became a legend with details of the lives of his family and set it against the background of the Southern world in which he lived, the history begins to look something like a story…
He was born on the 14th of August in 1851 in the little city of Griffin, Georgia. His father, Henry Burroughs Holliday, was a businessman and clerk of the county court. His mother, Alice Jane McKey, was the musically talented oldest daughter of a cotton planter, set to inherit some of her family's fortune. There was another boy in the Holliday household when John Henry was born — a teenager named Francisco Hidalgo who'd been orphaned during the Mexican War and brought to Georgia by Henry Holliday in his bachelor days.
Before long there were girls coming to join the family: Alice Jane's younger sisters Eliza and Ella and Margaret, given into Henry Holliday's guardianship when their father William Land McKey died. But there were no sisters or brothers for John Henry. His parents' only other child, a baby girl they named Martha Eleanora, had died six months after her birth and nearly two years before John Henry was born.Continue reading
Filed Under: Doc Holliday Stories
Doc Holliday arrived in Dodge City, Kansas in the spring of 1878, and opened a dental practice at the Dodge House Hotel. The town was lively that summer, keeping the local police force occupied with arresting drunks and cowboys who carried their pistols with them over the "deadline," the boundary between the red light district south of the railroad tracks and the business district north of the tracks. Wyatt Earp had arrived back in Dodge soon after Doc got there, and took back his former job as Assistant to Marshal Charlie Bassett. Bat Masterson was in town, too, as the new Sheriff of Ford County, and it was there that he first met Doc Holliday. As he later wrote of Doc during his time in Dodge:
Bat Masterson & Wyatt Earp, Dodge City
He was slim of build and sallow of complexion, standing about five feet ten inches, and weighing no more than 130 pounds. His eyes were of a pale blue and his moustache was thin and of a sandy hue. Dodge City was then very much like Dallas and Denver, only a little more so, and the doctor did not express regret at having come. It was easily seen that he was not a healthy man for he not only looked the part, but he incessantly coughed it as well. During his year's stay at Dodge at that time, he did not have a quarrel with anyone, and, although regarded as sort of a grouch, he was not disliked by those with whom he became acquainted. Continue reading
Filed Under: Doc Holliday Stories Tagged With: dental practice, doc holliday, dodge city
"I was in love once. My first cousin. She was… We were both so…
She joined a convent over the affair.
She was all I ever wanted."
Doc & Wyatt's Last Game
Those are Doc Holliday's words in his tragic but touching final scene from the film "Tombstone," the cult classic that made Doc lovable and relatable again after a generation of his being cast as a movie villain. In Kevin Jarre's brilliant version of the West's most famous gunfight, gambling dentist Doc Holliday is lawman Wyatt Earp's most loyal friend – and the heart of the whole story. Partly that comes from Jarre's own script which gave Doc so many quotable lines. Partly that comes from actor Kurt Russell's generous editing of the filming script that cut out many of Wyatt's lines in favor of a focus on Doc. For as every follower of Westerns knows, if you have a sympathetic Doc Holliday, you have a hit movie.
But what about that iconic final scene, as Doc confesses his young love and then dies? Was that Jarre's dramatic invention or Russell's addition? Or was it based on something from Doc Holliday's own life?
Ashley & Melanie: The fictional Doc & Mattie?
According to old Holliday family stories, the young romance between Doc and his first cousin really happened – and may have been one of the reasons he left Georgia. The girl was Martha Anne "Mattie" Holliday, daughter of Doc's uncle Robert Kennedy Holliday. Doc (then just John Henry Holliday) grew up in the little city of Griffin, Georgia, while Mattie grew up in Jonesboro, thirty miles or so up the road. Although the families were a bit separated in those horse-and-buggy days, they gathered together whenever they could, often at the home of Doc's medical doctor uncle, John Stiles Holliday, in nearby Fayetteville. Mattie was eighteen months older than John Henry, but the two were close as children and remained close – and reportedly even had a romance when they were teens. While we might not consider cousins as appropriate sweethearts, in 19th century America cousins did sometimes fall in love and marry. As Margaret Mitchell says in the classic novel of the Old South, Gone With the Wind: "The Wilkes and Hamiltons always marry their own cousins." She was referring, of course, to Ashley Wilkes (Scarlett O'Hara's crush) marrying his cousin, Melanie Hamilton.Continue reading
Filed Under: Doc Holliday Stories Tagged With: margaret mitchell, mattie holliday
Doc Holliday is one of the great legends of the Wild West, his life an epic adventure that's been told and retold in literature and film. But without the help of another legendary doctor, he might never have seen the Wild West at all.
According to one old family story, John Henry Holliday was born with a cleft palate that threatened his life and required a dangerous surgical procedure – the surgery performed by his medical doctor uncle, John Stiles Holliday, assisted by the Holliday's relative Dr. Crawford Long, who pioneered the use of ether anesthesia in surgery (see links below).
Cleft Palate Baby
A cleft palate occurs during pregnancy, when the two halves of the baby's mouth do not connect and grow together as they were designed to do. It's that joining together that makes a suture line down the roof of your mouth and gives your lips that pretty bow shape. If that joining doesn't happen, a baby is born with a "cleft" – a gap in the roof of the mouth that opens up into the sinuses. If the cleft continues into the lip and up into the nose, it's what is known as a "harelip"…Continue reading
Filed Under: Doc Holliday Stories Tagged With: anesthesia, cleft palate, crawford long, doc holliday, ether, procedure, surgery
Doc Holliday in Prescott, Arizona Territory
In the opening scenes of the movie "Tombstone," Wyatt Earp asks his brother Virgil if he happened to see anything of Doc Holliday while he was in Prescott on his way to Tombstone. Virgil replies, "Yeah. He had a streak when we left, him and Kate." The scene soon cuts away to show Holliday sitting at cards in a saloon, with a monumental painting of a nude woman on the wall behind him and his elegantly dressed Hungarian mistress, Kate Elder, at his side. On the green baize table in front of him are the scattered paraphernalia of poker: paperboards, poker chips and silver coins, a gold pocket watch. And across the table, his anger seething, sits gambler Ed Bailey who is clearly losing this hand.
"Why, Ed Bailey," says Doc in his best gentlemanly Southern drawl while he gives a tap to the pearl-handled pistol in his pocket, "are we cross?"
"Them guns don't scare me," replies Ed Bailey darkly. "'Cause without them guns you ain't nothin' but a skinny lunger."
"Ed, what an ugly thing to say. I abhor ugliness. Does this mean we're not friends anymore? You know, Ed, if I thought you weren't my friend, I just don't think I could bear it." And to show his cordial intent, Doc pulls out his pistols and lays them down on the table with the coins and the poker chips. "There. Now we can be friends again."Continue reading
Filed Under: Doc Holliday Stories Tagged With: ed bailey, ghost of ed bailey, wyatt earp
Mary Anne Fitzgerald Holliday, Mattie's mother
Although John Henry "Doc" Holliday grew up in Georgia during the Civil War as the son of a Confederate officer, the closest he got to the action himself was seeing troops marching through his hometown of Griffin, location of two Confederate training camps. When his father returned home early from the war on a medical discharge, the family left Griffin and moved south to the little village of Valdosta, close by the Florida border and far from the advancing Yankee army. But other members of the family had a much closer view of the war, and their stories became part of his childhood memories – like the story of his Uncle Robert Kennedy Holliday (father of Cousin Mattie) who served under General Longstreet at Gettysburg, and Rob's wife, Aunt Mary Anne Fitzgerald Holliday, who was home with the children in Jonesboro when Sherman's Army marched south from Atlanta. With an army approaching and the road "filled with bluecoats," Mary Anne took her children away to her uncle's plantation for safety. The following comes from Mattie in her "Memoirs of the Holliday Family in Georgia":Continue reading
Filed Under: Doc Holliday Stories Tagged With: battle of jonesboro, civil war, doc holliday, gone with the wind, holliday family history


Sunday August 12th – WHY are Central Americans coming here?
The current migrant crisis is not some random coincidence. The people camping outside our border gates and filling detention centers are here for very real and compelling reasons. They represent a very physical reality of all the world history classes we paid scant attention to in school.
It is important to educate ourselves, now, about how the US economic and political interventions has caused the instability forcing many people in Central America and Mexico to flee for their lives.
And like those airline PSA's to put on your own mask first, once we understand, we can pass that understanding on to others.
Warm up with this post. Then go to this screening and discussion and learn more.
Here's the link to RSVP. Respond by July 30th to get free parking.


text:
European Perspectives is an international scientific journal that publishes original, peer-reviewed manuscripts that provide scientific articles focusing on relevant political, sociological, social, security, economic and legal as well as ethnic, cross-cultural, minority and cross-ethnical issues related to European and Euro-Atlantic integrations and South-Eastern Europe.
Before the submission please note:
All texts submitted to the journal must be original works of the author(s). By submitting a manuscript, the author(s) warrant(s) to the journal that it does not infringe the copyright or any other rights of third parties.
The journal reviews received manuscripts on the assumption of an exclusive submission: by submitting a manuscript for consideration, the author(s) warrant(s) that it is not simultaneously being considered by any other publication and that it shall not be sent to another publication until a response is received from the journal.
All issues of the journal and all articles are published on the journal webpage europeanperspectives.org
Article should be submitted in electronic version in text format (doc., docx.) to e-mail address: office@europeanperspectives.org.
European Perspectives reserves the right to reject any manuscript as being unsuitable in topic, style or form without requesting an external review.
All manuscripts are checked by referees by means of a double-blind peer review. Two external referees review each manuscript.
While preparing the manuscript take in the account the following:
Manuscripts should be written in English.
The normal length is between 000 and 9.000 words (including footnotes).
Every article should contain title, abstract, keywords, introduction, and additional titles in the body, conclusion, and references.
A brief biographical note about author, including previous and current institutional affiliation should be attached with full postal and e-mail address, as well as telephone and fax numbers of the author. If the manuscript is co-authored, then please provide the requested information about all the authors.
The following format and style guidelines should be applied:
Article should be divided with titles (introduction, additional titles in the body, conclusion). Format of the titles in the text should be: letters only, caps lock & bold.
An abstract should have 150 - 200 words, in English, stating precisely the topic under consideration, the method of argument used in addressing the topic, and the conclusions reached. An abstract should be translated in Slovene.
An abstract is followed by a list of up to six keywords suitable for indexing and abstracting purposes.
The text of the manuscript should be in 12 point normal Times New Roman with single line spacing.
For in-text citations, notes, and references, please follow the guidelines below:
In the text please use the Harvard system of referencing available at http://libweb.anglia.ac.uk/referencing/harvard.htm.
When making reference to an author's whole work in your text, it is sufficient to give the name followed by the year of publication of their work: When writing for a professional publication, it is good practice to make reference to other relevant published work. This view has been supported by Cormack (1994).
However, where you are mentioning a particular part of the work, and making direct or indirect reference to this, a page reference should be included: Cormack (1994, pp.32-33) states that "when writing for a professional readership, writers invariably make reference to already published works".
If you make reference to a work or piece of research without mentioning the author in the text then both the author's name and publication year are placed at the relevant point in the sentence or at the end of the sentence in brackets: Making reference to published work appears to be characteristic of writing for a professional audience (Cormack, 1994).
Including the page numbers of a reference will help readers trace your sources. This is particularly important for quotations and for paraphrasing specific paragraphs in the texts: Lawrence (1966, p.124) states "we should expect ..." or indirectly: This is to be expected (Lawrence, 1966, p.124)... Please note page numbers: preceded with p. for a single page and pp. for a range of pages.
References list - The purpose of a reference list is to enable sources to be easily traced by another reader. All items should be listed alphabetically by author or authorship, regardless of the format, whether books, websites or journal articles etc.
The required elements for a book reference are: Author, Initials., Year. Title of book. (only include this if not the first edition) Place of publication (this must be a town or city, not a country): Publisher: Baron, D. P., 2008. Business and the organisation. Chester: Pearson.
For chapters of edited books the required elements for a reference are:
Chapter author(s) surname(s) and initials., Year of chapter. Title of chapter followed by In: Book editor(s) initials first followed by surnames with ed. or eds. after the last name. Year of book. Title of book. Place of publication: Publisher. Chapter number or first and last page numbers followed by full-stop: Samson, C., 1970. Problems of information studies in history. In: S. Stone, ed. 1980. Humanities information research. Sheffield: CRUS. pp.44-68.
Articles from web based magazines or journals, including Open Access articles found in institutional repositories - Authors, Initials., Year. Title of article. Full Title of Journal or Magazine, [online] Available at: web address (quote the exact URL for the article) [Accessed date]. - Kipper, D., 2008. Japan's new dawn. Popular Science and Technology, [online] Available at: <http://www.popsci.com/popsci37b144110vgn/html> [Accessed 22 June 2009].
European Perspectives welcomes reviews of recently published books (i.e. those published in the year in which the current issue of European Perspectives was published or in the previous year). Authors should submit reviews of works relating to political science and other social sciences with the themes focused on (East) Central European issues.
European Perspectives encourages authors to submit either of two types of reviews: a book review or a review essay.
For submitting a book review, authors should follow the requirements:
A book review should not exceed 1.500 words.
State clearly the name of the author(s), the title of the book (the subtitle, if any, should also be included), the place of publication, the publishing house, the year of publication and the number of pages.
If the reviewed book is the result of a particular event (a conference, workshop, etc.), then this should be mentioned in the introductory part of the review.
Review authors should describe the topic of the book under consideration, but not at the expense of providing an evaluation of the book and its potential contribution to the relevant field of research. In other words, the review should provide a balance between description and critical evaluation. The potential audience of the reviewed work should also be identified.
An exact page reference should be provided for all direct quotations used in reviewing the book.
Book reviews should be submitted in electronic version in text format (doc., docx.) to e-mail address: office@europeanperspectives.org.
European Perspectives
Vošnjakova 1, P.O.Box 2795
SI-1001 LJUBLJANA, Slovenia, EU
For more information about the journal:
office@europeanperspectives.org
For submission of articles and papers:
© 2019 European perspectives


Just got back from Savannah, and weekend two of the now three weeks long Savannah Music Festival. Note to Raleigh: Why don't we do this too? They've got the spring sewn up--and their azaleas are already in bloom. Ours can be in the fall. They've got classical, jazz, bluegrass, ballet, you name it. Lots of local talents, lots of visiting artists, from Buddy Guy to Arianna Zuckerman. So can we--heck, one of their featured guests was our own Cool John Ferguson. I love Savannah. Even when the music stops, it's a musical place, in 4/4 time, you might say. It was America's first planned city. In 1733, when General James Oglethorpe claimed Georgia for the British, he laid out Savannah as a series of short blocks arranged around 24 one-acre public squares, almost all of which remain intact in the downtown district (and are replicated to some extent in the near-downtown neighborhoods).
Buildings were limited to five stories, a rule Savannah's maintained--with very few exceptions, most of which are now considered mistakes by city leaders--ever since.
Add some serious historic preservation and the latterday design skills of its resident SCAD folks (the biggest developer in town is the entrepreneurial Savannah College of Art and Design), and the result today is a city that many consider America's most beautiful--and a stunning display of every one of the elements you read about whenever the subject is "livable places" or "downtown revitalization." Cribbing now from Jeff Speck, city planner and author of Suburban Nation: The Rise of Sprawl and the Decline of the American Dream, these elements start with a couple of old chestnuts: design your streets for people, not cars, and "small is beautiful."
Says Speck: "People are small, and the most walkable cities acknowledge this fact with small blocks, small buildings, and small increments of investment." Mix the uses, hide the parking lots, and let the skyscrapers in only when all the empty land (aka, parking lots) has been developed, because otherwise what you'll end up with is a few overbuilt sites and massive speculation on the empty remainders--you've read the rules, you know them, but: "That many of these items are common sense," as Speck goes on, "does not alter the fact that (public officials) every day make decisions large and small that violate them outright."
An important footnote: Your height limit is key when it comes to getting some affordable housing mixed in with the trés cher. Use that extra story as a bargaining chip with the developer, Speck says.
Well, there are no skyscrapers in Savannah, and very few empty lots either. Instead, the downtown consists of block after block of the most "walkable," visually interesting streets, all different, all design-driven, as owners work to make the most of their three- and four-story buildings. Here, a mansion; there, condos over a store; around the corner, apartments in a row and a neighborhood "local." The newest hotel is built in the style--and to the scale--of the old four-story manse that serves to anchor it on one corner. Wow.
Cities, Speck says, quoting Charleston Mayor Joe Riley, "should be places that make the heart sing." Now, admittedly, it was a glorious spring day Saturday, but that alone doesn't explain why my traveling companions broke out in a chorus of "On the Street Where You Live" as we walked from our host's apartment toward the river. Ever seen that in Raleigh?
People--and all the downtown streets were full of them--did indeed stop and stare. They did not bother me. For there's nowhere else on earth--hey, maybe they thought we were visiting artists.
But seriously. Savannah is not Raleigh, of course, and its development rules are no exact template for Raleigh's downtown. For one thing, Savannah is a tourist mecca, and the main economic driver there is its history and beauty. Raleigh's economic drivers are government and university research (and, of course, sprawl).
On the other hand, Raleigh is building a convention center, which means it must attract more visitors. And in that vein, Savannah's insistence that its new buildings match the scale of its old ones, and that they fit the fabric of a walkable, beautiful city, is a model for Raleigh to follow. We've got no end of downtown parking lots here, all hoping to be skyscrapers--and whenever we let one go up, the rest are left to fume with cars--and Raleigh gets less walkable, not more.
Moreover, Raleigh wasn't built on a river, unlike Savannah, nor did it do all that well at preserving its history, though the basic outlines of its own 18th century plan (by William Christmas) are still visible. Which only ups the ante for what comes next: If Raleigh's to have a downtown that'll bring in the tourists, most of it remains to be seen.
Our next big test: Ted Reynolds' scheme to put a 32-story building up on Hillsborough Street, roughly across from one of Raleigh's mistakes, the round 19-story hotel that used to be a Holiday Inn and is now a Clarion. Reynolds is a nice fellow and a successful businessman, but if this goes through (he's got an option on city-owned land, but hasn't tried to exercise it yet), it will be as if misshapen goal posts were erected to frame the entry to downtown Raleigh, save only for a missing crossbar. Not a pretty sight.
As one of my friends said, looking at Savannah, "furnishing" your downtown is like furnishing a room, or a house even. You can mix styles all you want. But it's hard to mix scales.
Mayor Charles Meeker, who pushed through an extension of Reynolds's option over the objections of the city manager, Russell Allen, has tossed out 20 stories as a possible compromise. Uh, oh. In his "State of City" message recently, Meeker was all over the place trying to define mid-sized buildings, landing variously on six, 10 and 20 stories as he answered questions from his audience.
Now, we have it on good authority that County Commissioner Herb Council, a Republican, will challenge Democrat Meeker this fall, taking what amounts to a free run at him, since Council's commission term has another year to go.
But on what basis will Council challenge Meeker? Not on the convention center, Meeker's baby. Republicans like Councilor Mike Regan, who briefly was in the running for mayor, hope it'll be Meeker's tar baby, but Council voted for it, and the hotel subsidy too. We await Council's views on building heights.
And perhaps Meeker was running his tape recorder when Joe Bryan, the current commission chair and Council's fellow Republican, called the mayor "one of the greatest leaders this region has seen in a long time" at a recent press conference on homelessness.
It's a running joke between us: At election time, the affable Council says, the Independent always calls him "pretty good," or "not that bad," then endorses his opponent. This time, is it "pretty good" against "one of the greats"?


As global bandwidth demand continues to explode, satellite communications have become the clear choice of service providers for delivering always-on broadband connectivity for any application to any point on the planet. The emergence of high throughput satellite (HTS) and technological advances have removed the cost barriers for satellite connectivity and opened up huge business opportunities and new markets for service providers.
Developing new, cutting-edge products and finding creative ways to take advantage of existing and emerging satellite communications technologies is what separates Gilat from the competition and provides added value for our customers.
For the past 30 years, Gilat has been a pioneer and leading innovator in satellite communications. Our dedication to constant product and business innovation places our customers at the forefront of the dynamic satellite communications industry. We invest heavily in R&D and operate five R&D centers worldwide, where our skilled engineers develop innovative, future-ready solutions to support evolving customer and market needs.


Ms. Wanda M. Cook is the SAPIS counselor at UMNS. She graduated from Audrey Cohen College and Metropolitan College. She has a bachelor's degree in Humanities and specialized in Social Services Counseling. Her master's degree is in Public Administration.
Ms. Cook is a founding parent at UNMS. Her daughter is a member of the graduating class of 2006. Ms. Cook also served as the PTA president for two years at UMNS. She has served children as a counselor for over 25 years.
Ms. Cook believes that children are precious gifts and we have to take care of them as special cargo. She provides classroom presentations, group counseling, individualized services, and she facilitates a wonderful peer leadership group. These services prepare middle school students for high school and beyond. Many of our alumni return and serve their communities. She loves being part of the C.A.R.E.S. team at UNMS. She also loves that our students enjoy being part of our community.
Ms. Cook has a member of the UNMS community since 2004.
She may be reached at w.cook@unmslearns.net.


text:
Homecoming 2018, Sports
Getting into the School Spirit
By: Anna McJunkin
Every year, we have spirit week and the pep assembly for Homecoming week, but what makes this year's different? First of all, we have new Student Council members and different students on the sports teams. Also, there were many more students and clubs that participated. Each year students show their spirit by dressing up. This year's themes were farmer day, USA day, Hawaiian day, neon day, and of course, blue and gold day.
The Squire interviewed Shannon Kellogg, a Student Council member, and we talked to her about how this year's spirit week themes were chosen. She said that they picked more popular themes and ones we haven't done before, with the hope that more students would participate. Their idea seemed to work out, because more students dressed up than in previous years, which was "really good," as Shannon put it. We asked her if there was a day she thinks we should've done, and she said "gold rush" would've been a good theme.
On Friday September 28, Eisenhower participated in the annual pep rally in the gym. During the assembly, Joey Bauer, the M.C., announced the homecoming court and led volunteers in games, including a hula-hoop contest, and trying to keep a beach ball in the air without dropping it. School spirit was impressive, as the band played and the cheerleaders cheered.
The cheerleaders were also getting in the spirit of the week, and Shannon Kellogg is also a cheerleader. The Squire asked her how much preparation was needed before the pep assembly, and she said that it took a lot of time to get their dance memorized, but, as it turns out, they weren't able to perform it at the rally, because it took too long. Thankfully, they had a backup plan and a good turnout with their stunting. At the Homecoming football game, they did a fantastic job cheering on the team and showing school spirit.
Even the journalism students have been getting in the school spirit. For homecoming week, the journalism 2 students made a special "hoco" edition of the W-IKE Afternoon Show. Alex Durante is in journalism and The Squire interviewed him and asked how much preparation it took to film and edit it. Alex said, "It took four days from Monday to Thursday to completely record and edit the show." We all worked together and Alex said, "Everybody in journalism 2 had a job, such as preparing questions for knight walking, people working the camera, people bringing in decorations for the studio, and making sure we had everything we needed."
As you can see, all the students and staff at Eisenhower really showed their school spirit for homecoming week. A special thanks to all of the effort put forth by Student Council and all the students and staff who participated.
Previous PostShopping Around on Black FridayNext PostFalling into Boys Sports


Are you fond of lace tops? Expand your wardrobe with this stylish Fetish Spandex Top. Leather-look shoulder pads will emphasize your shoulders in a masculine way, and the lacing will add spice to your outfit.


As a way to provide you advantage and enlarge our organization, we even have inspectors in QC Crew and guarantee you our greatest assistance and product or service for Portable Decompression Toy , portable decompression toy , little cute decompression toy , To be the Best". Please feel free to contact with us if you have any requirements.
"No matter new customer or previous client, We believe in prolonged time period and trustworthy relationship for Portable Decompression Toy , portable decompression toy , little cute decompression toy , Our company is continuing to serve customers with high quality competitive price and timely delivery. We sincerely welcome friends from all over the world to cooperate with us and enlarge our business. If you are interested in our products please feel free to contact us. We would love to provide you with further information.


text:
NIA gets extended time period for probing Kerala module IS
NIA Court in Kochi has granted extended time period to the NIA for probing the case related to the Kerala module of the so-called IS.
KOCHI: The National Investigation Agency (NIA) Court in Kochi has granted extended time period to the NIA for probing the case related to the Kerala module of the so-called Islamic State (IS) which was busted at Kanakamala in Kannur in October 2016. A fortnight ago, the anti-terror outfit had filed a petition for extending the time granted for filing the charge sheet before completion of the mandatory 90 day-period.
According to NIA officials, the investigation is making good progress. "Usually, in cases registered under the Unlawful Activities Prevention Act(UAPA), the investigation team receives 180 days of time period to complete the probe and file the charge sheet. However, on completion of the 90 day-period, the investigation team has to file a petition for extension of the time period. As per the provision, we approached the NIA Court for extension of time period and it was granted. Now, the charge sheet has to be filed within 180 days of registering the case. Otherwise, the arrested persons would become eligible for statutory bail," an NIA official said.
It was on October 2, 2016, that the NIA nabbed six persons of the IS module from Kanakamala in Kannur. During further investigation, the NIA managed to nab a Thodupuzha native residing at Madurai,who had returned from Iraq after fighting on the IS frontline there.
IS fighter Subahani Haja Moideen was trained by two persons involved in the deadly Paris terror strike of 2015 which claimed over 125 lives.
Kerala Is


Sign up for my newsletter for up-to-date information on new releases.
I'm a country gal at heart and am pretty keen on cowboy and home-grown heroes. Happily-ever-after is something I believe in with my whole heart. Love may be a bumpy road and there ares bound to be some perils along the way but in the end love should win. I try to take that attitude into my writing and think that love, hope and laughter are some of the best medicine there is. Along with books.
I love to hear from readers and the most important thing I can say is - "thank you. To every reader who has spent his or her hard-earned reading dollars on a Ciana Stone book, thank you from the bottom of my heart."
You can find me on Facebook. http://www.facebook.com/CianaStone - Follow me there and get a chance to win free books. On the 15th and 30th I give away books to two winners.


text:
import unittest
import pystache

class TestPystache(unittest.TestCase):
    def test_basic(self):
        ret = pystache.render("Hi {{thing}}!", { 'thing': 'world' })
        self.assertEquals(ret, "Hi world!")

    def test_kwargs(self):
        ret = pystache.render("Hi {{thing}}!", thing='world')
        self.assertEquals(ret, "Hi world!")

    def test_less_basic(self):
        template = "It's a nice day for {{beverage}}, right {{person}}?"
        ret = pystache.render(template, { 'beverage': 'soda', 'person': 'Bob' })
        self.assertEquals(ret, "It's a nice day for soda, right Bob?")

    def test_even_less_basic(self):
        template = "I think {{name}} wants a {{thing}}, right {{name}}?"
        ret = pystache.render(template, { 'name': 'Jon', 'thing': 'racecar' })
        self.assertEquals(ret, "I think Jon wants a racecar, right Jon?")

    def test_ignores_misses(self):
        template = "I think {{name}} wants a {{thing}}, right {{name}}?"
        ret = pystache.render(template, { 'name': 'Jon' })
        self.assertEquals(ret, "I think Jon wants a , right Jon?")

    def test_render_zero(self):
        template = 'My value is {{value}}.'
        ret = pystache.render(template, { 'value': 0 })
        self.assertEquals(ret, 'My value is 0.')

    def test_comments(self):
        template = "What {{! the }} what?"
        ret = pystache.render(template)
        self.assertEquals(ret, "What  what?")

    def test_false_sections_are_hidden(self):
        template = "Ready {{#set}}set {{/set}}go!"
        ret = pystache.render(template, { 'set': False })
        self.assertEquals(ret, "Ready go!")

    def test_true_sections_are_shown(self):
        template = "Ready {{#set}}set{{/set}} go!"
        ret = pystache.render(template, { 'set': True })
        self.assertEquals(ret, "Ready set go!")

    def test_non_strings(self):
        template = "{{#stats}}({{key}} & {{value}}){{/stats}}"
        stats = []
        stats.append({'key': 123, 'value': ['something']})
        stats.append({'key': u"chris", 'value': 0.900})

        ret = pystache.render(template, { 'stats': stats })
        self.assertEquals(ret, """(123 & ['something'])(chris & 0.9)""")

    def test_unicode(self):
        template = 'Name: {{name}}; Age: {{age}}'
        ret = pystache.render(template, { 'name': u'Henri Poincaré',
            'age': 156 })
        self.assertEquals(ret, u'Name: Henri Poincaré; Age: 156')

    def test_sections(self):
        template = """
{{#users}}
{{name}}
{{/users}}
"""

        context = { 'users': [ {'name': 'Chris'}, {'name': 'Tom'}, {'name': 'PJ'} ] }
        ret = pystache.render(template, context)
        self.assertEquals(ret, """

Chris

Tom

PJ

""")

    def test_implicit_iterator(self):
        template = """
{{#users}}
{{.}}
{{/users}}
"""
        context = { 'users': [ 'Chris', 'Tom','PJ' ] }
        ret = pystache.render(template, context)
        self.assertEquals(ret, """

Chris

Tom

PJ

""")

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

redpajama_set_name: RedPajamaGithub


text:
HomeBusiness DigestZim embassies useless'
Zim embassies useless'
Roadwin Chirara
ZIMBABWE National Chamber of Commerce president Luxon Zembe says most of the country's embassies are not serving any useful economic purpose and should be shaken up or closed down immediately
In an interview Zembe said embassies were merely doing public relations and political tasks instead of concentrating on trying to bring business to help shore up the country's ailing economy.
Zimbabwe has close to 33 embassies scattered around the world.
"Our embassies seem to serve mainly public relations and political functions which is not their core purpose," Zembe said. "Embassies justify their presence and should bring economic benefits to the country. If they fail to do so then they are a waste of time."
Zembe castigated the country's current marketing strategy, saying the state had failed to devise anything comprehensive.
He said the current strategies employed had failed to bear fruit and at the same time were done in a disorderly manner.
"As a country our current strategy to marketing the country is disorganised to the extent that government has neglected engaging the business community when designing a national strategy for marketing," Zembe said.
He said government's individualistic tendency saw it organising a delegation to the past Comesa summit and the business community was left with the task of organising its own.
He said such tendencies were not beneficial to the country's development and called for a uniform approach to encourage investments.
He said his organisation was worried about the resources being used by the various delegations that had gone out to market the country but failed to bring back results.
"We need, as a country, to be accountable to the resources that have been ploughed into the various missions and as a country take an audit of where we have gone wrong," said Zembe.
He said some members who took part in some of the missions were becoming a liability to the country because they use up funds but fail to justify their involvement in the huge delegations.
Previous articleSo much for trusting analysts to pick winners
Next articleElephant Hills Hotel posts $1,3 billion loss


We provide written advice on all applications regardless of the decision. If your grant is approved, congratulations! You now have Lotterywest support to continue to bring your project to life. You'll be advised of payment arrangements and what is needed to report on the community impact you've achieved.
If your grant is approved we'll send you a letter with the details of what's been approved and what is required for payment to be made. We pay all grants via electronic funds transfer, so make sure the bank account details you provide in your application are your organisation's main operating account.
Your grant approval letter will include your reporting requirements. All organisations who receive our support are accountable for the expenditure of a grant and reporting on the community impact that was achieved. Our grant acquittal processes are very simple and are explained once your grant is approved. How you measure community impact will be developed with you when you apply for a grant and will be relevant to the size and nature of your project.
How do I acknowledge Lotterywest's support?
Public acknowledgment helps spread the word about Lotterywest's contribution to the community, as well as informing people about how playing Lotterywest games enables us to provide grants like yours. Your organisation also benefits from being partnered with our well established and respected brand.
Visit Sharing the news for resources on how you can tell your good news story.
Let us know if there are changes to your project or key members involved so we can work with you in to ensure these changes do not affect the intended outcomes of your grant.
We also need to know if the changes relate to your organisation's details such as bank details, name, delegated authority or GST status.
Definitely! You'll receive feedback throughout the assessment of your application but you can always call us for more information. Our team focuses on building relationships and we are always happy to discuss how your project and application can be strengthened.
Yes, the request should be made in writing and to the attention of Susan Hunt PSM, Lotterywest CEO and signed by your organisation's Chairperson or authorised delegate within 60 working days of receiving formal advice of the decision. Please include the reason for the request and what you propose as a resolution. We will advise you of the outcome as soon as possible. A request will not impact the consideration of any future applications.