text:
#include "mugen/command.h"
#include "mugen/constraint.h"
#include "mugen/ast/key.h"
#include "util/debug.h"
#include <math.h>
#include <vector>
#include <string>
#include <set>
#include <sstream>
#include <exception>

using std::vector;
using std::string;
using std::ostringstream;
using std::set;

class Constraint{
public:
    enum Type{
        PressA,
        ReleaseA,
        PressB,
        ReleaseB,
        PressC,
        ReleaseC,
        PressX,
        ReleaseX,
        PressY,
        ReleaseY,
        PressZ,
        ReleaseZ,
        PressForward,
        ReleaseForward,
        PressBack,
        ReleaseBack,
        PressUp,
        ReleaseUp,
        PressDown,
        ReleaseDown,

        /* Its simpler to model UF, DB, etc as logical presses but it may be harder for
         * the user to press them because the individual keys (U and F) have to be pressed
         * at the same tick.
         */
        PressForwardUp,
        ReleaseForwardUp,
        PressBackUp,
        ReleaseBackUp,
        PressForwardDown,
        ReleaseForwardDown,
        PressBackDown,
        ReleaseBackDown,

        Combine
    };

    Constraint(Type type, double time, bool dominate):
    type(type),
    satisfied(false),
    dominate(dominate),
    time(time),
    emit(false),
    satisfiedTick(0){
    }

    virtual ~Constraint(){
    }

    Type getType() const {
        return type;
    }

    void setEmit(){
        this->emit = true;
    }

    bool isEmit() const {
        return emit;
    }

    void setUpConstraints(const vector<Util::ReferenceCount<Constraint> > & constraints){
        for (vector<Util::ReferenceCount<Constraint> >::const_iterator it = constraints.begin(); it != constraints.end(); it++){
            const Util::ReferenceCount<Constraint> & constraint = *it;
            if (constraint == this){
                continue;
            }

            bool depends = false;
            if (constraint->getTime() < getTime() &&
                constraint->isDominate()){

                depends = true;
            }

            /* If the key was generated as a response to a press/release and this is the same key
             * then this depends on that key.
             */
            if (constraint->getTime() < getTime() &&
                sameKey(*constraint)){

                depends = true;
            }

            if (depends){
                dependsOn.insert(constraint);
            }
        }
    }

    bool sameKey(const Constraint & him){
        switch (type){
            case PressA:
            case ReleaseA: return him.getType() == PressA ||
                                  him.getType() == ReleaseA;

            case PressB:
            case ReleaseB: return him.getType() == PressB ||
                                  him.getType() == ReleaseB;

            case PressC:
            case ReleaseC: return him.getType() == PressC ||
                                  him.getType() == ReleaseC;

            case PressX:
            case ReleaseX: return him.getType() == PressX ||
                                  him.getType() == ReleaseX;

            case PressY:
            case ReleaseY: return him.getType() == PressY ||
                                  him.getType() == ReleaseY;

            case PressZ:
            case ReleaseZ: return him.getType() == PressZ ||
                                  him.getType() == ReleaseZ;

            case PressForward:
            case ReleaseForward: return him.getType() == PressForward ||
                                        him.getType() == ReleaseForward;

            case PressBack:
            case ReleaseBack: return him.getType() == PressBack ||
                                     him.getType() == ReleaseBack;

            case PressUp:
            case ReleaseUp: return him.getType() == PressUp ||
                                   him.getType() == ReleaseUp;

            case PressDown:
            case ReleaseDown: return him.getType() == PressDown ||
                                     him.getType() == ReleaseDown;

            case PressForwardUp:
            case ReleaseForwardUp: return him.getType() == PressForwardUp ||
                                          him.getType() == ReleaseForwardUp;

            case PressBackUp:
            case ReleaseBackUp: return him.getType() == PressBackUp ||
                                       him.getType() == ReleaseBackUp;

            case PressForwardDown:
            case ReleaseForwardDown: return him.getType() == PressForwardDown ||
                                            him.getType() == ReleaseForwardDown;

            case PressBackDown:
            case ReleaseBackDown: return him.getType() == PressBackDown ||
                                         him.getType() == ReleaseBackDown;

            case Combine: return false;
        }

        return false;
    }

    virtual std::string toString() const {
        std::ostringstream out;

        switch (type){
            case PressA: out << "a"; break;
            case ReleaseA: out << "~a"; break;
            case PressB: out << "b"; break;
            case ReleaseB: out << "~b"; break;
            case PressC: out << "c"; break;
            case ReleaseC: out << "~c"; break;
            case PressX: out << "x"; break;
            case ReleaseX: out << "~x"; break;
            case PressY: out << "y"; break;
            case ReleaseY: out << "~y"; break;
            case PressZ: out << "z"; break;
            case ReleaseZ: out << "~z"; break;
            case PressForward: out << "F"; break;
            case ReleaseForward: out << "~F"; break;
            case PressBack: out << "B"; break;
            case ReleaseBack: out << "~B"; break;
            case PressUp: out << "U"; break;
            case ReleaseUp: out << "~U"; break;
            case PressDown: out << "D"; break;
            case ReleaseDown: out << "~D"; break;
            case PressForwardUp: out << "UF"; break;
            case ReleaseForwardUp: out << "~UF"; break;
            case PressForwardDown: out << "DF"; break;
            case ReleaseForwardDown: out << "~DF"; break;
            case PressBackUp: out << "UB"; break;
            case ReleaseBackUp: out << "~UB"; break;
            case PressBackDown: out << "DB"; break;
            case ReleaseBackDown: out << "~DB"; break;
            case Combine: break;
        }

        return out.str();
    }

    virtual bool doSatisfy(const Mugen::Input & input, int tick){
        switch (type){
            case PressA: return input.pressed.a; break;
            case ReleaseA: return input.released.a; break;
            case PressB: return input.pressed.b; break;
            case ReleaseB: return input.released.b; break;
            case PressC: return input.pressed.c; break;
            case ReleaseC: return input.released.c; break;
            case PressX: return input.pressed.x; break;
            case ReleaseX: return input.released.x; break;
            case PressY: return input.pressed.y; break;
            case ReleaseY: return input.released.y; break;
            case PressZ: return input.pressed.z; break;
            case ReleaseZ: return input.released.z; break;

            case PressForward: return input.pressed.forward; break;
            case ReleaseForward: return input.released.forward; break;
            case PressBack: return input.pressed.back; break;
            case ReleaseBack: return input.released.back; break;
            case PressDown: return input.pressed.down; break;
            case ReleaseDown: return input.released.down; break;
            case PressUp: return input.pressed.up; break;
            case ReleaseUp: return input.released.up; break;

            case PressForwardUp: return input.pressed.forward &&
                                        input.pressed.up; break;

            /* For releases its ok just to release one of the keys */
            case ReleaseForwardUp: return input.released.forward ||
                                          input.released.up; break;

            case PressBackUp: return input.pressed.up &&
                                     input.pressed.back; break;

            case ReleaseBackUp: return input.released.up ||
                                       input.released.back; break;

            case PressForwardDown: return input.pressed.forward &&
                                          input.pressed.down; break;

            case ReleaseForwardDown: return input.released.forward ||
                                            input.released.down; break;

            case PressBackDown: return input.pressed.back &&
                                       input.pressed.down; break;

            case ReleaseBackDown: return input.released.back ||
                                         input.released.down; break;

            case Combine: break;
        }

        return false;
    }

    virtual bool satisfy(const Mugen::Input & input, int tick){
        if (!satisfied){
            /*
            if (dependenciesSatisfied()){
                satisfied = doSatisfy(input, tick);
            }
            */
            satisfied = doSatisfy(input, tick);

            if (satisfied){
                satisfiedTick = tick;
            }
        }

        return satisfied;
    }

    int getSatisfiedTick() const {
        return satisfiedTick;
    }

    /*
    virtual bool dependenciesSatisfied() const {
        for (std::set<Util::ReferenceCount<Constraint> >::const_iterator it = dependsOn.begin(); it != dependsOn.end(); it++){
            const Util::ReferenceCount<Constraint> & constraint = *it;
            if (!constraint->isSatisfied()){
                return false;
            }
        }

        return true;
    }
    */

    virtual void depends(const Util::ReferenceCount<Constraint> & him){
        dependsOn.insert(him);
    }

    virtual void reset(){
        satisfied = false;
    }

    bool isDominate() const {
        return dominate;
    }

    double getTime() const {
        return time;
    }

    /*
    virtual bool isSatisfied() const {
        return satisfied;
    }
    */

    const std::set<Util::ReferenceCount<Constraint> > & getDepends(){
        return dependsOn;
    }

protected:
    Type type;
    bool satisfied;
    bool dominate;
    double time;
    bool emit;
    int satisfiedTick;
    std::set<Util::ReferenceCount<Constraint> > dependsOn;
};

typedef Util::ReferenceCount<Constraint> ConstraintRef;

class DelayConstraint: public Constraint {
public:
    DelayConstraint(int delayTime, Constraint::Type type, double time, bool dominate):
    Constraint(type, time, dominate),
    delayTime(delayTime),
    held(0){
    }

    virtual bool satisfy(const Mugen::Input & input, int tick){
        if (satisfied){
            return satisfied;
        } else {
            /* this logic works even if delayTime is 0, which means don't hold the key */
            bool pressed = Constraint::doSatisfy(input, tick);
            if (pressed){
                held += 1;
            } else {
                held = 0;
            }
            satisfied = held >= delayTime;
        }

        return satisfied;
    }

    virtual string toString() const {
        std::ostringstream out;

        out << "~";
        if (delayTime > 0){
            out << delayTime;
        }
        out << Constraint::toString();
        return out.str();
    }

    int delayTime;
    int held;
};

class HoldConstraint: public Constraint {
public:
    HoldConstraint(Constraint::Type type, double time, bool dominate):
    Constraint(type, time, dominate){
    }

    virtual string toString() const {
        std::ostringstream out;

        out << "/";
        out << Constraint::toString();

        return out.str();
    }

    /* The constraint is only satisfied when a key is held down and
     * must be held down forever until the end.
     */
    virtual bool satisfy(const Mugen::Input & input, int tick){
        return Constraint::doSatisfy(input, tick);
    }
};

class CombinedConstraint: public Constraint {
public:
    CombinedConstraint(const Util::ReferenceCount<Constraint> & key1,
                       const Util::ReferenceCount<Constraint> & key2,
                       double time, bool dominate):
    Constraint(Combine, time, dominate),
    key1(key1),
    key2(key2){
    }

    virtual bool doSatisfy(const Mugen::Input & input, int tick){
        const int threshold = 4;

        if (key1->satisfy(input, tick) &&
            key2->satisfy(input, tick) &&
            fabs(key1->getSatisfiedTick() - key2->getSatisfiedTick()) < threshold){
            return true;
        }

        return false;
    }

    virtual string toString() const {
        return key1->toString() + "+" + key2->toString();
    }

    Util::ReferenceCount<Constraint> key1;
    Util::ReferenceCount<Constraint> key2;
};

static Constraint::Type getPress(const Ast::KeySingle & key){
    string name = key.toString();
    if (name == "a"){
        return Constraint::PressA;
    }
    if (name == "b"){
        return Constraint::PressB;
    }
    if (name == "c"){
        return Constraint::PressC;
    }
    if (name == "x"){
        return Constraint::PressX;
    }
    if (name == "y"){
        return Constraint::PressY;
    }
    if (name == "z"){
        return Constraint::PressZ;
    }
    if (name == "F"){
        return Constraint::PressForward;
    }
    if (name == "B"){
        return Constraint::PressBack;
    }
    if (name == "U"){
        return Constraint::PressUp;
    }
    if (name == "D"){
        return Constraint::PressDown;
    }
    if (name == "UF"){
        return Constraint::PressForwardUp;
    }
    if (name == "UB"){
        return Constraint::PressBackUp;
    }
    if (name == "DF"){
        return Constraint::PressForwardDown;
    }
    if (name == "DB"){
        return Constraint::PressBackDown;
    }

    /* utter failure */
    throw std::exception();
    return Constraint::PressA;
}

static Constraint::Type getRelease(const Ast::KeySingle & key){
    string name = key.toString();
    if (name == "a"){
        return Constraint::ReleaseA;
    }
    if (name == "b"){
        return Constraint::ReleaseB;
    }
    if (name == "c"){
        return Constraint::ReleaseC;
    }
    if (name == "x"){
        return Constraint::ReleaseX;
    }
    if (name == "y"){
        return Constraint::ReleaseY;
    }
    if (name == "z"){
        return Constraint::ReleaseZ;
    }
    if (name == "F"){
        return Constraint::ReleaseForward;
    }
    if (name == "B"){
        return Constraint::ReleaseBack;
    }
    if (name == "U"){
        return Constraint::ReleaseUp;
    }
    if (name == "D"){
        return Constraint::ReleaseDown;
    }
    if (name == "UF"){
        return Constraint::ReleaseForwardUp;
    }
    if (name == "UB"){
        return Constraint::ReleaseBackUp;
    }
    if (name == "DF"){
        return Constraint::ReleaseForwardDown;
    }
    if (name == "DB"){
        return Constraint::ReleaseBackDown;
    }

    /* utter failure */
    throw std::exception();
    return Constraint::ReleaseA;
}

vector<Util::ReferenceCount<Constraint> > makeConstraints(const Ast::Key * key, double time, bool last){
    vector<Util::ReferenceCount<Constraint> > constraints;

    class ConstraintWalker: public Ast::Walker {
    public:
        ConstraintWalker(vector<Util::ReferenceCount<Constraint> > & constraints, double time, bool last):
        constraints(constraints),
        time(time),
        last(last){
        }

        vector<Util::ReferenceCount<Constraint> > & constraints;
        double time;
        bool last;

        virtual void addPressRelease(Constraint::Type pressKey, Constraint::Type releaseKey){
            Util::ReferenceCount<Constraint> press = Util::ReferenceCount<Constraint>(new Constraint(pressKey, time, true));
            Util::ReferenceCount<Constraint> release = Util::ReferenceCount<Constraint>(new Constraint(releaseKey, time + 0.5, false));
            constraints.push_back(press);
            constraints.push_back(release);

            if (last){
                press->setEmit();
            }
        }

        virtual void onKeySingle(const Ast::KeySingle & key){
            addPressRelease(getPress(key), getRelease(key));
        }

        virtual void onKeyModifier(const Ast::KeyModifier & key){
            switch (key.getModifierType()){
                case Ast::KeyModifier::MustBeHeldDown: {

                    class HoldWalker: public Ast::Walker {
                    public:
                        HoldWalker(ConstraintWalker & outer, double time):
                        outer(outer),
                        time(time){
                        }

                        ConstraintWalker & outer;
                        const double time;

                        virtual void onKeySingle(const Ast::KeySingle & key){
                            Constraint::Type pressKey = getPress(key);
                            outer.constraints.push_back(ConstraintRef(new HoldConstraint(pressKey, time, true)));
                        }

                        virtual void onKeyCombined(const Ast::KeyCombined & key){
                            throw std::exception();
                        }

                        virtual void onKeyModifier(const Ast::KeyModifier & key){
                            switch (key.getModifierType()){
                                case Ast::KeyModifier::Direction: {
                                    key.getKey()->walk(*this);
                                    break;
                                }
                                default: {
                                    throw std::exception();
                                }
                            }
                        }
                    };

                    const Ast::Key * sub = key.getKey();
                    HoldWalker walker(*this, time);
                    sub->walk(walker);

                    break;
                }
                case Ast::KeyModifier::Release: {

                    class ReleaseWalker: public Ast::Walker {
                    public:
                        ReleaseWalker(ConstraintWalker & outer, int hold, double time):
                        outer(outer),
                        hold(hold),
                        time(time){
                        }

                        ConstraintWalker & outer;
                        int hold;
                        double time;

                        virtual void onKeySingle(const Ast::KeySingle & key){
                            string name = key.toString();

                            Constraint::Type pressKey = getPress(key);
                            Constraint::Type releaseKey = getRelease(key);

                            if (hold < 1){
                                hold = 1;
                            }

                            outer.constraints.push_back(ConstraintRef(new DelayConstraint(hold, pressKey, time, true)));
                            Util::ReferenceCount<Constraint> release = Util::ReferenceCount<Constraint>(new Constraint(releaseKey, time + 0.1, true));
                            if (outer.last){
                                release->setEmit();
                            }
                            outer.constraints.push_back(release);

                        }

                        virtual void onKeyCombined(const Ast::KeyCombined & key){
                            throw std::exception();
                        }

                        virtual void onKeyModifier(const Ast::KeyModifier & key){
                            throw std::exception();
switch (key.getModifierType()){
                                case Ast::KeyModifier::Direction: {
                                    key.getKey()->walk(*this);
                                    break;
                                }
                                default: {
                                    throw std::exception();
                                }
                            }
                        }
                    };

                    const Ast::Key * sub = key.getKey();
                    ReleaseWalker walker(*this, key.getExtra(), time);
                    sub->walk(walker);

                    break;
                }
                case Ast::KeyModifier::Direction: {
                    /* Direction keys can be handled just like regular keys.
                     * Technically they should only allow direction keys like U, D, F, B
                     * whereas the following code allows other butons like /a, which
                     * is meaningless.
                     */
                    key.getKey()->walk(*this);
                    break;
                }
                case Ast::KeyModifier::Only: {
                    /* F, >a */

                    /* FIXME: for now just treat this as a regular key press. Its probably
                     * not ultra important that we prevent certain commands from executing
                     * if the user pressed an extra button or two.
                     */

                    key.getKey()->walk(*this);

                    break;
                }
            }
        }

        Util::ReferenceCount<Constraint> findDominate(const vector<Util::ReferenceCount<Constraint> > & keys){
            for (vector<Util::ReferenceCount<Constraint> >::const_iterator it = keys.begin(); it != keys.end(); it++){
                const Util::ReferenceCount<Constraint> & constraint = *it;
                if (constraint->isDominate()){
                    return constraint;
                }
            }

            return Util::ReferenceCount<Constraint>(NULL);
        }

        /* For a combined key we have to check that the two sub-keys were pressed
         * at roughly the same time. We can implement that by checking when their Press
         * constraint was satisfied. If both constraints are satisfied within 0-4 ticks, or whatever,
         * then the combined constraint should satisfy.
         */
        virtual void onKeyCombined(const Ast::KeyCombined & key){
            vector<Util::ReferenceCount<Constraint> > key1 = makeConstraints(key.getKey1(), time, false);
            vector<Util::ReferenceCount<Constraint> > key2 = makeConstraints(key.getKey2(), time, false);

            constraints.insert(constraints.end(), key1.begin(), key1.end());
            constraints.insert(constraints.end(), key2.begin(), key2.end());
            Util::ReferenceCount<Constraint> dominateKey1 = findDominate(key1);
            Util::ReferenceCount<Constraint> dominateKey2 = findDominate(key2);
            Util::ReferenceCount<Constraint> combined = Util::ReferenceCount<Constraint>(new CombinedConstraint(dominateKey1, dominateKey2, time + 0.9, true));
            constraints.push_back(combined);
            if (last){
                combined->setEmit();
            }
        }
    };

    ConstraintWalker walker(constraints, time, last);
    key->walk(walker);

    return constraints;
}

void constructDependencies(const vector<Util::ReferenceCount<Constraint> > & constraints){
    for (vector<Util::ReferenceCount<Constraint> >::const_iterator it = constraints.begin(); it != constraints.end(); it++){
        const Util::ReferenceCount<Constraint> & constraint = *it;
        constraint->setUpConstraints(constraints);
    }
}

static void topologicalVisit(ConstraintRef constraint, vector<ConstraintRef> & sorted, set<ConstraintRef> & unsorted){
    const set<ConstraintRef> & depends = constraint->getDepends();
    unsorted.erase(constraint);
    for (set<ConstraintRef>::const_iterator it = depends.begin(); it != depends.end(); it++){
        ConstraintRef depend = *it;
        if (unsorted.find(depend) != unsorted.end()){
            topologicalVisit(depend, sorted, unsorted);
        }
    }
    sorted.push_back(constraint);
}

vector<Util::ReferenceCount<Constraint> > topologicalSort(const vector<ConstraintRef> & constraints){
    vector<ConstraintRef> out;
    set<ConstraintRef> unsorted;
    for (vector<ConstraintRef>::const_iterator it = constraints.begin(); it != constraints.end(); it++){
        unsorted.insert(*it);
    }

    while (unsorted.size() > 0){
        ConstraintRef first = *unsorted.begin();
        topologicalVisit(first, out, unsorted);
    }

    return out;
}

vector<Util::ReferenceCount<Constraint> > makeConstraints(Ast::KeyList * keys){
    vector<Util::ReferenceCount<Constraint> > constraints;
    double time = 1;
    for (vector<Ast::Key*>::const_iterator it = keys->getKeys().begin(); it != keys->getKeys().end(); it++){
        bool last = false;
        Ast::Key * key = *it;
        if (key == keys->getKeys().back()){
            last = true;
        }

        vector<Util::ReferenceCount<Constraint> > more = makeConstraints(*it, time, last);
        time += 1;
        constraints.insert(constraints.end(), more.begin(), more.end());
    }

    constructDependencies(constraints);

    return topologicalSort(constraints);
}

string debugInput(const Mugen::Input & input){
    std::ostringstream out;

    if (input.pressed.a){
        out << "a, ";
    }
    if (input.released.a){
        out << "~a, ";
    }
    if (input.pressed.b){
        out << "b, ";
    }
    if (input.released.b){
        out << "~b, ";
    }
    if (input.pressed.c){
        out << "c, ";
    }
    if (input.released.c){
        out << "~c, ";
    }
    if (input.pressed.x){
        out << "x, ";
    }
    if (input.released.x){
        out << "~x, ";
    }
    if (input.pressed.y){
        out << "y, ";
    }
    if (input.released.y){
        out << "~y, ";
    }
    if (input.pressed.z){
        out << "z, ";
    }
    if (input.released.z){
        out << "~z, ";
    }
    if (input.pressed.forward){
        out << "F, ";
    }
    if (input.released.forward){
        out << "~F, ";
    }
    if (input.pressed.back){
        out << "B, ";
    }
    if (input.released.back){
        out << "~B, ";
    }
    if (input.pressed.down){
        out << "D, ";
    }
    if (input.released.down){
        out << "~D, ";
    }
    if (input.pressed.up){
        out << "U, ";
    }
    if (input.released.up){
        out << "~U, ";
    }

    return out.str();
}

class NewCommand{
public:
    NewCommand(Ast::KeyList * keys):
    constraints(makeConstraints(keys)){
    }

    bool handle(const Mugen::Input & input, int ticks){
        /* keep checking constraints until we reach a fix point. */

        bool emit = false;
        std::set<ConstraintRef> satisfied;
        for (vector<ConstraintRef>::iterator it = constraints.begin(); it != constraints.end(); it++){
            bool all = true;
            ConstraintRef constraint = *it;
            const std::set<ConstraintRef> & depends = constraint->getDepends();
            for (std::set<ConstraintRef>::const_iterator it2 = depends.begin(); it2 != depends.end(); it2++){
                /* If its not in the satisified set then not all dependencies can be satisifed */
                if (satisfied.find(*it2) == satisfied.end()){
                    all = false;
                    break;
                }
            }

            /* If `all' is still true then all dependencies have been satisfied and we can continue */
            if (all){
                if (constraint->satisfy(input, ticks)){
                    satisfied.insert(constraint);
                    if (constraint->isEmit()){
                        emit = true;
                    }
                }
            }
        }

        /* Uncomment to debug the commands */
        /*
        Global::debug(0) << "Tick: " << ticks << " Input " << debugInput(input) << std::endl;
        for (vector<ConstraintRef>::iterator it = constraints.begin(); it != constraints.end(); it++){
            ConstraintRef constraint = *it;
            Global::debug(0) << " Constraint " << constraint->getTime() << " " << constraint->toString() << " satisfied " << (satisfied.find(constraint) != satisfied.end()) << std::endl;
        }
        Global::debug(0) << std::endl;
        */

        return emit;
    }

    vector<Util::ReferenceCount<Constraint> > constraints;
};

void parseKey(Mugen::Input & input, const string & key){
    if (key == "a"){
        input.pressed.a = true;
    } else if (key == "b"){
        input.pressed.b = true;
    } else if (key == "c"){
        input.pressed.c = true;
    } else if (key == "x"){
        input.pressed.x = true;
    } else if (key == "y"){
        input.pressed.y = true;
    } else if (key == "z"){
        input.pressed.z = true;
    } else if (key == "U"){
        input.pressed.up = true;
    } else if (key == "D"){
        input.pressed.down = true;
    } else if (key == "F"){
        input.pressed.forward = true;
    } else if (key == "B"){
        input.pressed.back = true;
    } else if (key == "~a"){
        input.released.a = true;
    } else if (key == "~b"){
        input.released.b = true;
    } else if (key == "~c"){
        input.released.c = true;
    } else if (key == "~x"){
        input.released.x = true;
    } else if (key == "~y"){
        input.released.y = true;
    } else if (key == "~z"){
        input.released.z = true;
    } else if (key == "~U"){
        input.released.up = true;
    } else if (key == "~D"){
        input.released.down = true;
    } else if (key == "~F"){
        input.released.forward = true;
    } else if (key == "~B"){
        input.released.back = true;
    } else {
        Global::debug(0) << "Unknown key " << key << std::endl;
    }
}

Mugen::Input convert(string raw){
    size_t semicolon = raw.find(';');
    if (semicolon != -1){
        raw.erase(semicolon, 1);
    }
    vector<string> keys = Util::splitString(raw, ',');
    Mugen::Input input;

    for (vector<string>::iterator it = keys.begin(); it != keys.end(); it++){
        parseKey(input, Util::trim(*it));
    }

    return input;
}

vector<Mugen::Input> loadScript(const string & input){
    vector<string> lines = Util::splitString(input, ';');
    vector<Mugen::Input> out;

    for (vector<string>::iterator it = lines.begin(); it != lines.end(); it++){
        out.push_back(convert(*it));
    }

    return out;
}

int testKeys(Ast::KeyList * keys, const vector<Mugen::Input> & inputs){
    // Mugen::Command command("test", keys, 100, 1);
    // NewCommand command(keys);
    Mugen::Command2 command("", keys, 1000, 0);

    /* Make sure we emit something */
    bool emitted = false;
    int tick = 0;
    for (vector<Mugen::Input>::const_iterator it = inputs.begin(); it != inputs.end(); it++){
        const Mugen::Input & input = *it;
        bool last = false;
        tick += 1;
        if (&input == &inputs.back()){
            last = true;
        }

        if (!last){
            /* If its not the last input then the command should not fire, so if it does then its an error */
            if (command.handle(input, tick)){
                return 1;
            }
        } else {
            /* And similarly if its the last input the command should fire, otherwise error */
            if (!command.handle(input, tick)){
                return 1;
            } else {
                emitted = true;
            }
        }
    }

    return emitted ? 0 : 1;
}

int test1(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);
    // Mugen::Command command("test", list, 100, 1);

    std::ostringstream script;
    script << "a;";

    return testKeys(list, loadScript(script.str()));
}

int test1_1(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "b;";

    return !testKeys(list, loadScript(script.str()));
}

int test2(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    keys.push_back(new Ast::KeySingle(0, 0, "b"));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;";
    script << "b;";

    return testKeys(list, loadScript(script.str()));
}

int test3(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    keys.push_back(new Ast::KeySingle(0, 0, "b"));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;a,b";

    return testKeys(list, loadScript(script.str()));
}

int test4(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    keys.push_back(new Ast::KeySingle(0, 0, "b"));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;a;a;a;a;";
    script << "a;a;a;a;a;";
    script << "b;";

    return testKeys(list, loadScript(script.str()));
}

/* ~a, ~a, ~a */
int test5(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeyModifier(0, 0, Ast::KeyModifier::Release, new Ast::KeySingle(0, 0, "a"), 0));
    keys.push_back(new Ast::KeyModifier(0, 0, Ast::KeyModifier::Release, new Ast::KeySingle(0, 0, "a"), 0));
    keys.push_back(new Ast::KeyModifier(0, 0, Ast::KeyModifier::Release, new Ast::KeySingle(0, 0, "a"), 0));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;~a;";
    script << ";";
    script << "a;~a;";
    script << ";";
    script << "a;~a;";

    return testKeys(list, loadScript(script.str()));
}

int test6(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    keys.push_back(new Ast::KeySingle(0, 0, "b"));
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;b;~a;~b;a;";
    return testKeys(list, loadScript(script.str()));
}

int test7(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    keys.push_back(new Ast::KeySingle(0, 0, "b"));
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;~a;b;a";
    return testKeys(list, loadScript(script.str()));
}

int test8(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    keys.push_back(new Ast::KeySingle(0, 0, "b"));
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;b;~b;~a;a";
    return testKeys(list, loadScript(script.str()));
}

int test9(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeyCombined(0, 0, new Ast::KeySingle(0, 0, "a"),
                                              new Ast::KeySingle(0, 0, "b")));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a,b";
    return testKeys(list, loadScript(script.str()));
}

int test10(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    keys.push_back(new Ast::KeyCombined(0, 0, new Ast::KeySingle(0, 0, "a"),
                                              new Ast::KeySingle(0, 0, "b")));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;a;~a;";
    script << "a,b";
    return testKeys(list, loadScript(script.str()));
}

int test11(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    keys.push_back(new Ast::KeyCombined(0, 0, new Ast::KeySingle(0, 0, "a"),
                                              new Ast::KeySingle(0, 0, "b")));
    keys.push_back(new Ast::KeySingle(0, 0, "b"));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;a;~a;";
    script << "a,b;";
    script << "~b;b";
    return testKeys(list, loadScript(script.str()));
}

int test12(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeyCombined(0, 0, new Ast::KeySingle(0, 0, "a"),
                                              new Ast::KeySingle(0, 0, "b")));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a";
    return !testKeys(list, loadScript(script.str()));
}

int test13(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeyModifier(0, 0, Ast::KeyModifier::Release, new Ast::KeySingle(0, 0, "a"), 5));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;~a";
    return !testKeys(list, loadScript(script.str()));
}

int test14(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeyModifier(0, 0, Ast::KeyModifier::Release, new Ast::KeySingle(0, 0, "a"), 5));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;a;a;a;a;~a";
    return testKeys(list, loadScript(script.str()));
}

int test15(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeyModifier(0, 0, Ast::KeyModifier::Release, new Ast::KeySingle(0, 0, "a"), 5));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;a;;a;a;a;~a";
    return !testKeys(list, loadScript(script.str()));
}

int test16(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    keys.push_back(new Ast::KeyModifier(0, 0, Ast::KeyModifier::Release, new Ast::KeySingle(0, 0, "b"), 5));
    keys.push_back(new Ast::KeyCombined(0, 0, new Ast::KeySingle(0, 0, "a"),
                                              new Ast::KeySingle(0, 0, "b")));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;";
    script << "a,b;~a,b;b;b;b;";
    script << "b;~b;";
    script << "a,b;";
    return testKeys(list, loadScript(script.str()));
}

int test17(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    keys.push_back(new Ast::KeyModifier(0, 0, Ast::KeyModifier::Release, new Ast::KeySingle(0, 0, "b"), 5));
    keys.push_back(new Ast::KeyCombined(0, 0, new Ast::KeySingle(0, 0, "a"),
                                              new Ast::KeySingle(0, 0, "b")));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;";
    script << "a,b;~a,b;b;b;b;";
    script << "b;~b;";
    script << "a,b;";
    return testKeys(list, loadScript(script.str()));
}

/* simple test for all keys */
int test18(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    keys.push_back(new Ast::KeySingle(0, 0, "b"));
    keys.push_back(new Ast::KeySingle(0, 0, "c"));
    keys.push_back(new Ast::KeySingle(0, 0, "x"));
    keys.push_back(new Ast::KeySingle(0, 0, "y"));
    keys.push_back(new Ast::KeySingle(0, 0, "z"));
    keys.push_back(new Ast::KeySingle(0, 0, "F"));
    keys.push_back(new Ast::KeySingle(0, 0, "B"));
    keys.push_back(new Ast::KeySingle(0, 0, "U"));
    keys.push_back(new Ast::KeySingle(0, 0, "D"));
    keys.push_back(new Ast::KeySingle(0, 0, "UF"));
    keys.push_back(new Ast::KeySingle(0, 0, "UB"));
    keys.push_back(new Ast::KeySingle(0, 0, "DF"));
    keys.push_back(new Ast::KeySingle(0, 0, "DB"));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;b;c;x;y;z;F;~F;B;~B;U;~U;D;~D;";
    script << "U,F;~U,~F;";
    script << "U,B;~U,~B;";
    script << "D,F;~D,~F;";
    script << "D,B;";
    return testKeys(list, loadScript(script.str()));
}

int test19(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeyModifier(0, 0, Ast::KeyModifier::Direction, new Ast::KeySingle(0, 0, "D"), 0));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "D;";
    return testKeys(list, loadScript(script.str()));
}

int test20(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeyModifier(0, 0, Ast::KeyModifier::Direction, new Ast::KeySingle(0, 0, "D"), 0));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "D;";
    return testKeys(list, loadScript(script.str()));
}

int test21(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeyModifier(0, 0, Ast::KeyModifier::MustBeHeldDown, new Ast::KeySingle(0, 0, "a"), 0));
    keys.push_back(new Ast::KeySingle(0, 0, "b"));
    keys.push_back(new Ast::KeySingle(0, 0, "b"));
    keys.push_back(new Ast::KeySingle(0, 0, "c"));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;a,b;a,~b;a,b;a,c;";
    return testKeys(list, loadScript(script.str()));
}

int test22(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeyModifier(0, 0, Ast::KeyModifier::MustBeHeldDown, new Ast::KeySingle(0, 0, "a"), 0));
    keys.push_back(new Ast::KeySingle(0, 0, "b"));
    keys.push_back(new Ast::KeySingle(0, 0, "b"));
    keys.push_back(new Ast::KeySingle(0, 0, "c"));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    std::ostringstream script;
    script << "a;a,b;~b;b;c;";
    return !testKeys(list, loadScript(script.str()));
}

int test23(){
    std::vector<Ast::Key*> keys;
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    keys.push_back(new Ast::KeySingle(0, 0, "a"));
    keys.push_back(new Ast::KeySingle(0, 0, "b"));
    Ast::KeyList * list = new Ast::KeyList(0, 0, keys);

    bool fail = true;
    bool success = false;

    std::ostringstream script;
    script << "a;~a;a;~a;b";

    vector<Mugen::Input> input = loadScript(script.str());

    Mugen::Command2 command1("", list, 1000, 0);

    // a
    if (command1.handle(input[0], 0)){
        return fail;
    }

    // ~a
    if (command1.handle(input[1], 1)){
        return fail;
    }

    // a
    if (command1.handle(input[2], 2)){
        return fail;
    }

    Token * serialize = command1.serialize();
    Mugen::Command2 command2("", list, 1000, 0);
    command2.deserialize(serialize);

    // ~a
    if (command2.handle(input[3], 3)){
        return fail;
    }

    // b
    if (!command2.handle(input[4], 4)){
        return fail;
    }

    return success;
}

int runTest(int (*test)(), const std::string & name){
    if (test()){
        Global::debug(0) << name << " failed" << std::endl;
        return 1;
    }
    return 0;
}

int main(int argc, char ** argv){
    if (
        runTest(test1, "Test1") ||
        runTest(test1_1, "Test1_1") ||
        runTest(test2, "Test2") ||
        runTest(test3, "Test3") ||
        runTest(test4, "Test4") ||
        runTest(test5, "Test5") ||
        runTest(test6, "Test6") ||
        runTest(test7, "Test7") ||
        runTest(test8, "Test8") ||
        runTest(test9, "Test9") ||
        runTest(test10, "Test10") ||
        runTest(test11, "Test11") ||
        runTest(test12, "Test12") ||
        runTest(test13, "Test13") ||
        runTest(test14, "Test14") ||
        runTest(test15, "Test15") ||
        runTest(test16, "Test16") ||
        runTest(test17, "Test17") ||
        runTest(test18, "Test18") ||
        runTest(test19, "Test19") ||
        runTest(test20, "Test20") ||
        runTest(test21, "Test21") ||
        runTest(test22, "Test22") ||
        runTest(test23, "Test23") ||
        /* having false here lets us copy/paste a runTest line easily */
        false
        ){
        return 1;
    }
}

redpajama_set_name: RedPajamaGithub


Coercive control: an increasingly common issue in relationship breakdown?
In 2011, Sally Challen was jailed for life for the murder of her husband of 31 years following a hammer attack in their Surrey Home the previous year. A sustained campaign led by her two sons, and supported by a feminist advocacy organisation, Justice for Women, succeeded in getting Sally's conviction quashed after a panel of three judges ruled it was unsafe in light of new evidence that was not available at the time of her trial.
But what does this tell us about how the UK courts treat victims of coercive control?
Coercive control became a crime in December 2015 with the introduction of the Serious Crime Act 2015. The statute sets out that coercive control occurs where the 'controller' acts in a way that that they know or ought to know will have a serious effect on the victim. This 'serious effect' is something that causes the victim to fear, on at least two occasions that violence will be used against them, or that causes the victim alarm or distress that has a substantial adverse effect on their day to day activities.
Although not in force when Sally Challen was originally convicted, criminalising coercive control has certainly raised awareness, and will give context to her retrial. It has given lawyers and the public a deeper understanding the serious effect that a pattern of slow-burning non-physical violence can have on the victim.
Clients are increasingly raising the concept of 'gaslighting' whereby a victim is consistently told they are mad, misremembering or making things up. The perpetrator does this to undermine the victim and convince them they are wrong when they are not. It is a pernicious form of controlling behaviour, prevalent across all sections of society showing no respect for gender, wealth or class.
Where does it become a criminal act?


text:
<?php

namespace Opl\Template\Compiler\Stage;
use Opl\Template\Compiler\Compiler;
use Opl\Template\Compiler\AST\Document;

/**
 * This interface defines the basic API for writing the compilation
 * stages without affecting anything else, yet still be able to talk
 * with the compiler.
 *
 * @author Tomasz Jędrzejewski
 * @copyright Invenzzia Group <http://www.invenzzia.org/> and contributors.
 * @license http://www.invenzzia.org/license/new-bsd New BSD License
 */
interface StageInterface
{
	/**
	 * Allows to pass the compiler instance to the linker.
	 *
	 * @param Compiler $compiler The compiler that uses this linker.
	 */
	public function setCompiler(Compiler $compiler);

	/**
	 * Performs some operations on the AST typical to this processing stage.
	 *
	 * @throws Opl\Template\Exception\StageException
	 * @param Opl\Template\Compiler\AST\Document $document The document to process.
	 * @return string
	 */
	public function process(Document $document);

	/**
	 * Clears the internal references in order to free the memory.
	 */
	public function dispose();
} // end StageInterface;


One of the most irritating parts of any headphone is the long wire which often gets caught in our bags and makes life difficult for us. With the advent of retractable headphones, this problem is solved as you can just keep the wire coiled up. But with so many options available, which one would best suit you? Here are some of the best retractable headphones which you can buy.
If you are a person who wants value for money then Kicker EB300 Wireless In-Ear Sports Earbuds is best suited for you. These water-resistant headphones allow you to carry them conveniently to all places such as office, gym or when you are on the go. It has great bass quality for those who love the deep sound. The sound quality is good compared to the price for which it is available. Kicker EB300 Wireless In-Ear Sports Earbuds comes with eight hours of listening battery life.
Rioddas Wireless Headphones Retractable Earbuds Sports Neckband Bluetooth is extremely lightweight and comes with a cool design that resembles the snake's skin. The retractable wire that is present in the headphone can be controlled with the help of just a button and it can be used for talking for over 12 hours at a single charge with a standby time of 300 hours. Rioddas Wireless Headphones Retractable Earbuds Sports Neckband Bluetooth has noise cancellation technology which further helps in enjoying the music.
These are value for money but some people find it a bit inconvenient due to the small battery life and connectivity issues. Apart from this, Jabra Step Earbuds allow you to listen to clear and powerful music which is devoid of the problems caused by a wire.
JBL Black Reflect Mini Bluetooth In-Ear Sports Headphones comes with noise cancellation features which provide uninterrupted good music along with crystal clear sound. The fit is a smug one which allows no penetration of external noise.
LG Tone Free Wireless Stereo Earbuds comes with a cool neckband which makes it kind of wireless and the neckband vibrates when there is an incoming call or message. The sound quality is on par with the price of the earbuds.


text:
American South 1 [-]
Civil rights 1 [-]
Cvil Rights 1 [-]
Education 1 [-]
March on Washington for Jobs and Freedom 1 [-]
Social reform 1 [-]
Suffrage 1 [-]
U.S. History, 1961-1969 1 [-]
Cambridge Nonviolent Action Committee 1 [-]
Civil Rights History Project 1 [-]
Frazier, E. Franklin 1 [-]
Mosnier, Joseph 1 [-]
Nation of Islam 1 [-]
Richardson, Gloria St. Clair Hayes 1 [-]
Student Nonviolent Coordinating Committee 1 [-]
X, Malcolm 1 [-]
Interviews 1 [-]
Oral histories (document genres) 1 [-]
digital media - born digital 1 [-]
Dorchester County 1 [-]
New York City 1 [-]
North and Central America 1 [-]
United States 1 [-]
place: "Cambridge"
topic: "Activism"
date: "1920s"
place: "District of Columbia"
topic: "Labor unions"
topic: "Resistance"
topic: "Associations and institutions"
place: "Washington"
topic: "Religion"
name:"March on Washington for Jobs and Freedom"
place: "Maryland"
Gloria Hayes Richardson Oral History Interview
Civil Rights History Project, American, founded 2009
Interview of
Richardson, Gloria St. Clair Hayes, American, born 1922
Interviewed by
Mosnier, Joseph Ph. D.
Student Nonviolent Coordinating Committee, American, 1960 - 1970s
Cambridge Nonviolent Action Committee, American, founded 1962
Frazier, E. Franklin, American, 1894 - 1962
March on Washington for Jobs and Freedom, American, founded 1963
Nation of Islam, American, founded 1930
X, Malcolm, American, 1925 - 1965
The oral history consists of five digital files: 2011.174.35.1a, 2011.174.35.1b, 2011.174.35.1c, 2011.174.35.1d, and 2011.174.35.1e.
Gloria Richardson recalls growing up in Cambridge, Maryland, attending Howard University, and joining Student Nonviolent Coordinating Committee (SNCC) with her daughter, Donna, after returning to Cambridge and running her father's drug store. She recalls traveling to the South with her family to assist SNCC with voter registration, organizing the Cambridge Nonviolent Action Committee, assisting E. Franklin Frazier with research on African Americans, and marching in a protest where the police used cyanogen gas. She also discusses attending the March on Washington, her involvement with the Nation of Islam, and meeting Malcolm X.
LOC ID: afc2010039_crhp0035
Place collected
New York City, New York, United States, North and Central America
Cambridge, Dorchester County, Maryland, United States, North and Central America
Washington, District of Columbia, United States, North and Central America
Civil Rights History Project
March on Washington for Jobs and Freedom
digital media - born digital
Associations and institutions
U.S. History, 1961-1969
Collection of the Smithsonian National Museum of African American History and Culture in partnership with the American Folklife Center, Library of Congress
2011.174.35.1a-e
© Smithsonian National Museum of African American History & Culture and The American Folklife Center, Library of Congress
http://n2t.net/ark:/65665/fd5662c23c0-7c29-4344-8690-066160ec7342

redpajama_set_name: RedPajamaCommonCrawl


Barnstaple Library is currently exhibiting an art installation that has been designed using inspiration from some of the major transformational events that have taken place in Barnstaple. 'A meeting Point', by Historian Oskar Schortz and inventor and technologist Marcus Comaschi is a new interactive 'tome stone' developed through workshops with the North Devon local studies collection. Inspired by Barnstaple's historic tomhttps://youtu.be/L39tgoj1EsEe stone, the place where people would hang notes of their paid debts. This unique and remarkable artwork sees interactive lights which pulse and ascend as they respond to visitor's movements.


Scientific Research, and the so-call "Big Science" in particular has always been a key stakeholder for Research and Education network. Beingits more demanding and regular user community, it it often drives with its requirements the future evolution in ICTs and directly contributs to define and implement the services which will then be adopted by the wider scientific community and the society at large.
In fact, the "Big Science" is a heterogeneous collection of communities belonging to different disciplines, united by the common need of tackling complex scientific problems ndthrough the collection and the analysis of vast amounts of data.
This community includes major research organizations such as INFN, ENEA, CNR, INGV, ASI and INAF, with about 100 sites, laboratories and facilities located in the four regions of Convergence which will benefit of the new infrastructure implemented by GARR-X Progress.
The need of archiving and duplicating large datasets to ensure their longer-term preservation, with strong requirements in terms of robustness, data confidentiality and integrity. Data duplication at independent sites and redundant access are crucial to ensure disaster recovery, a key point especially for some kinds of data (e.g. those used both in research and civil protection, such as meteorological, volcanological, and geological data).


text:
Rear Admiral Roger Welles, Director of Naval Intelligence, to Captain William D. MacDougall, United States Naval Attaché at London, 7/8/1917
Rear Admiral Roger Welles, Director of Naval Intelligence, to Captain William D. MacDougall, United States Naval Attaché at London
[Extract]
NMoC-VSO
NAVY DEPARTMENT 14416
Office of Naval Intelligence
From: Director of Naval Intelligence.
To: Naval Attache, London.
SUBJECT: Armed American Merchant Vessels.
1. Complying with the request contained in your telegram No. 13016, there is forwarded herewith a list of American Merchant Vessels to which armed guards have been ordered.1
2. This list does not include those vessels which were furnished with Armed Guards, but which have since been sunk or from which the Armed Guards have been removed.
3. It should further be noted that the order to furnish Armed Guards to these vessels does not necessarily mean an immediate sailing as where possible the orders are issued with a view to enabling the Companies to prepare gun emplacements, etc., while the vessels are undergoing other repairs, notably in the case of ex-German vessels operated by the Shipping Board.
4. It is impracticable to give the destination of all of the vessels as many of them are being operated under the direction of the Shipping Board or under the direction of the Petroleum Board, chartered to Foreign Allied Governments, and the Government to which charter is made is not always determined upon until shortly before sailing.
5. Additions to the attached list will be forwarded as orders are issued.
(signed) Roger Welles.
Source Note: DTS, UK-KeNA, Adm. 137/1437. Attached to the document is an alphabetized list of ships, 102 in number, giving the ship's tonnage and the number and caliber of guns provided for it.
Footnote 1: The cable number "13016" has not been found. On the Armed Guard program, see: Information for Ship Owners Concerning the Armed Guard Program, 13 March 1917, and Regulations Concerning Armed Guards, 13 March 1917. See also, William V. Pratt to Sims, 2 July 1917, DLC-MSS, William S. Sims Papers, Box 78.
Commodore Guy R. Gaunt, British Naval Attaché at Washington, to British Admiralty, 7/1/1917
Commodore Guy R. Gaunt, British Naval Attaché at Washington, to First Sea Lord Admiral Sir John R. Jellicoe, 7/1/1917
Captain Arthur de K. L. May, Assistant Chief of the Naval Staff, to Vice Admiral Montague E. Browning, Commander-in-Chief, North America and West Indies Station, 7/1/1917
Memorandum from Sir Colville A. R. Barclay, Chargé d'Affaires of the Embassy of Great Britain in Washington, D. C., 7/1/1917
Draft Proposal for the Inter-Allied Munitions Council, 7/2/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Captain Richard H. Jackson, American Naval Representative to Paris, 7/2/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Officers Under His Command, 7/2/1917
Captain William V. Pratt, Assistant Chief of Naval Operations, to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, 7/2/1917
President Woodrow Wilson to Secretary of the Navy Josephus Daniels, 7/2/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces in Europe, to Captain William V. Pratt, Assistant Chief of Naval Operations, 7/3/1917
Secretary of the Navy Josephus Daniels to Secretary of State Robert M. Lansing, 7/3/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in Europe, to Secretary of the Navy Josephus Daniels, 7/3/1917
Secretary of War Newton D. Baker to Secretary of the Navy Josephus Daniels, 7/3/1917
Commodore Guy R. Gaunt, British Naval Attaché at Washington, to Admiral William S. Benson, Chief of Naval Operations, 7/4/1917
Rear Admiral Albert Gleaves, Commander, Convoy Operations in the Atlantic, to Secretary of the Navy Josephus Daniels, 7/4/1917
First Sea Lord Admiral Sir John R. Jellicoe to Commodore Guy R. Gaunt, British Naval Attaché at Washington, 7/4/1917
President Woodrow Wilson to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, 7/4/1917
Lieutenant Commander John H. Boesch, Commander, Orion, to the Office of the Chief of Naval Operations, 7/4/1917
Commander Joel R. Poinsett Pringle, Chief of Staff, Destroyer Flotillas, Queenstown, to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, 7/4/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Commander Powers Symington, Commander, USS Tacoma, 7/4/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Captain Richard H. Jackson, American Naval Representative to the Ministry of Marine, 7/5/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Lieutenant Commander Joseph F. Daniels, U.S.S. Melville, 7/5/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Secretary of the Navy Josephus Daniels., 7/5/1917
Memorandum from Captain William W. Fisher, Director, Anti-Submarine Warfare, 7/5/1917
Commodore Guy R. Gaunt, British Naval Attaché at Washington, to Secretary of the Admiralty Sir William Graham Greene, 7/5/1917
Rear Admiral Albert Gleaves, Commander, Convoy Operations in the Atlantic, to Vice Admiral William S. Sims, Commander, United States Forces Operating in European Waters, 7/5/1917
Commodore Guy R. Gaunt, British Naval Attaché at Washington, to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters., 7/5/1917
Alfred C. W. Harmsworth, First Viscount Northcliffe, to Imperial War Cabinet, 7/5/1917
United States Ambassador to the United Kingdom Walter Hines Page to Secretary of State Robert Lansing, 7/5/1917
Vice Admiral Sir Lewis Bayly, Commander, Southern Ireland, to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, 7/6/1917
Lieutenant Commander Thomas A. Kittinger, Commander, Coarsair, to Captain William B. Fletcher, Force Commander, Special Patrol Squadron, 7/6/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Captain William V. Pratt, Assistant Chief of Naval Operations, 7/6/1917
Lieutenant Kenneth Whiting, Commander, First Aeronautic Detachment, to Secretary of the Navy Josephus Daniels, 7/7/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Secretary of the Navy Josephus Daniels 7/7/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Bureau of Steam Engineering, 7/7/1917
Admiral William S. Benson, Chief of Naval Operations, to José Martí, Chief of Staff, Cuban Army, and President, Cuban Mission, 7/9/1917
Captain William R. Hall, Director, Intelligence Division, to Imperial War Cabinet, 7/9/1917
Lieutenant Commander Joseph F. Daniels to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, 7/10/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Commander Joel R. Poinsett Pringle, Chief of Staff, Destroyer Flotillas, 7/10/1917
VIce Admiral Sir Lewis Bayly, Commander, Southern Ireland to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, 7/10/1917
Admiral William S. Benson, Chief of Naval Operations, Memorandum for Ship Owners, 7/10/1917
Lieutenant Fred M. Perkins, Destroyer Force Engineer Officer, to Vice Admiral William S. Sims, United States Naval Forces Operating in European Waters, 7/10/1917
Raymond B. Fosdick, Chairman, Commission on Training Camp Activities, to Secretary of the Navy Josephus Daniels, 7/10/1917
Secretary of the Navy Josephus Daniels to General José Martí, Chief of Staff, Cuban Army, and President of Cuban Mission, 7/11/1917
Secretary of the Navy Josephus Daniels, Memorandum to Naval Departments, 7/11/1917
Vice Admiral Sir Lewis Bayly, Commander, Southern Ireland, to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, 7/11/1917
Captain Edwin A. Anderson, Commander, Squadron Three, Patrol Force, to Secretary of the Navy Josephus Daniels, 7/11/1917
Vice Admiral Sir Lewis Bayly, Commander, Southern Ireland, to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters., 7/12/1917
Captain Richard H. Jackson, American Naval Representative to the Ministry of Marine, to Secretary of the Navy Josephus Daniels, 7/12/1917
Captain William B. Fletcher, Commander, United States Patrol Squadron, Patrol Instructions, 7/12/1917
United States Ambassador to the United Kingdom Walter Hines Page to Secretary of State Robert Lansing, 7/13/1917
Captain Benton Decker, United States Naval Attaché at Madrid, to Office of Naval Intelligence, 7/13/1917
British Foreign Office to British Ambassador to the United States Sir Cecil Spring Rice, 7/14/1917
Lieutenant Arthur S. Carpender, Commander, Fanning, to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, 7/15/1917
Commander Joel R. Poinsett Pringle, Chief of Staff, Destroyer Flotillass, to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, 7/15/1917
Lieutenant Norman Wilkinson, to Rear Admiral Clement Greatorex, Director of Naval Equipment 7/16/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Captain Benton C. Decker, United States Naval Attaché at Madrid, 7/17/1917
Commander William R. Sayles, United States Naval Attaché at Paris, to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, 7/17/1917
Report on the Sinking of Florence Creadick, 7/17/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Vice Admiral Lewis Bayly, Commander, Southern Ireland, 7/18/1917
Rear Admiral Ralph Earle, Chief of Bureau of Ordnance to Admiral William S. Benson, Chief of Naval Operations, 7/18/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Captain William B. Fletcher, Force Commander, United States Patrol Squadron, 7/18/1917
Commodore Guy R. Gaunt, British Naval Attaché at Washington, to First Sea Lord Admiral Sir John R. Jellicoe, 7/20/1917
Assistant Secretary of the Navy Franklin D. Roosevelt to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, 7/20/1917
Rear Admiral Albert Gleaves, Commander, Convoy Operations in the Atlantic, to Vice Admiral Henry T. Mayo, Commander, Atlantic Fleet, 7/20/1917
British Admiralty to Commodore Guy R. Gaunt, British Naval Attaché at Washington, 7/21/1917
Report by Commander Richard T. Down, 7/22/1917
Admiral William S. Benson, Chief of Naval Operation, to Rear Admiral Albert G. Winterhalter, Commander, Asiatic Fleet, 7/24/1917
Third Assistant Secretary of State Breckinridge Long, "What the Navy Has Done Since the War Began", 7/24/1917
Memorandum from Commander Edward McCauley, Jr., Acting Director, Office of Naval Intelligence, 7/25/1917
Ministry of Marine to Captain Richard H. Jackson, American Naval Representative to the Ministry of Marine, 7/25/1917
Rear Admiral Samuel McGowan, Paymaster General, Intra-Bureau Order No. 201, 7/26/1917
Secretary of War Newton D. Baker to Secretary of the Navy Josephus Daniels, 7/26/1917
Vice Admiral Williams S. Sims, Commander, United States Naval Forces Operating in European Waters, to Anne Hitchcock Sims, 7/26/1917
Secretary of the Navy Josephus Daniels to Captain Samuel S. Robinson, Commander, Submarine Force, Atlantic Fleet, 7/26/1917
Lieutenant Commander Charles K. Belknap, Jr., Office of the Chief of Naval Operations, to Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, 7/26/1917
Rear Admiral Albert Gleaves, Commander, Convoy Operations in the Atlantic Ocean, to Admiral William S. Benson, Chief of Naval Operations, 7/27/1917
State Department to United States Ambassador to the United Kingdom Walter Hines Page, 7/30/1917
Lieutenant Commander Theodore G. Ellyson to Helen Ellyson, 7/30/1917
Commander Thomas A. Kearney, Acting Chief, Bureau of Ordnance, to Admiral William S. Benson, Chief of Naval Operations, 7/30/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters, to Vice Admiral Ferdinand de Bon, Chief of Staff, Ministry of Marine, 7/30/1917
Vice Admiral William S. Sims, Commander, United States Naval Forces Operating in European Waters to Commander Joel R. Poinsett Pringle, 7/31/1917
Acting Secretary of State Frank Polk to United States Ambassador to the United Kingdom Walter Hines Page, 7/31/1917
Captain William B. Fletcher, Commander, Special Patrol Squadrons, Patrol Instructions, 7/31/1917
William D MacDougall, Roger Welles
Armed Merchantmen
Additional Resources for July 1917


I wanna to get started! First, 15 months of saving and preparation!
I boiled my first cup of tea with my Trangia Mini last night in my apartment! ha. Climbing a small mountain next Sunday.
My girlfriend is warming to the idea of a month with me on the trail.
Sitting here with a big disgusting head cold watching all the Appalachian Trail vids on Youtube I can before work tonight.
Starting around mid March 2012.
In summary.... I just wanted to say.... I CAN´T WAIT!
Lots of prep to do. And plenty of weekends to hit the local trails, and 4 weeks vacation time this year to go on longer trips. Preparing the food and mail drops, testing the equipment, and day dreaming about the trail... all part of the adventure.
The anticipation seems like half the fun, really can't wait to get out there and have all my illusions destroyed.
...really can't wait to get out there and have all my illusions destroyed.
It is much better to have your dreams destroyed than to never have any dreams to begin with.
My actual last name is "Gale" so I've been Storm all my life and it's as good as any for a trail name.
I'm sick and have spent the majority of the last 12 hours reading about the AT and watching Lion King's ADT vids on youtube. i'm about ready already! When do we get our own page for reals?!
does a midweek start mean a less bunched up group at the beginning?
I think it's so interesting. I'm kinda interested... maybe I'll re-read twilight.
now that i can completely agree with, with the addition that one has the courage and determination to chase those dreams.
I am very excited also about my start in may 2012, but admittedly a little (ok, a lot) scared about facing the struggles I imagine are waiting for me out there.
I guess time will tell. To hell with all this waiting. let's get on with it already!


Defining which are the most hospitable countries in the world is not easy. At the end of the day, in all the countries of the planet, there are friendly people who offer a warm welcome to the traveller. And also, in all the nations, the one who sees the foreigner as an intruder doesn't cease to exist, and they make it known with their gestures and attitudes.
And we must bear in mind that the opinion of each person is conditioned by the individual experience that lived in a certain place. There may be unpleasant facts in places where people are very nice and vice versa. That is why the ranking of the most hospitable countries in the world is always relative.
Be that as it may, we have consulted the top 10 of the most hospitable countries in diverse sources and dates. It is clear that the name of some is repeated with some frequency. Based on that, here is my ranking, in no particular order.
Iceland appears in all listings of the most hospitable countries in the world. Likewise, in almost all figures in the top positions. Icelanders are very kind people, who are always willing to help a person who is in difficulties. In fact, they are famous for their affability for a long time. In the works of Jules Verne that distinctive feature of this fabulous country was captured.
New Zealand is among the happiest countries in the world, and this is not surprising. The quality of life of its inhabitants is one of the highest on the planet. There the slogan is equality: you lavish full respect, regardless of your origin or economic capacity. There is a deeply rooted culture of ensuring the rights of all people.
The Portuguese are people from overseas. They have very internalized the spirit of the migrant, and for that reason, they are incredibly receptive and hospitable to any traveller. They know how to welcome those who come from abroad and do their best because they feel comfortable in their country. They are altruistic, open and sincere. Besides that, the country is beautiful, its people decorate it even more.
It is true that in the big cities of Spain, as happens all over the world, hospitality is not such a visible feature. However, in the smaller towns, it is very evident that the welcoming and affable spirit of the Spaniards. It is very easy to be greeted without knowing you and to do everything possible to make you feel good. The southern part of Spain is particularly famous for the kindness of its people.
Ireland is world famous for the kindness of its people. One of the popular slogans in that country is: "There are no foreigners, there are only friends that you have not met yet." The Irish are outgoing and curious, always open to know more about the travellers who visit them. They make conversation easily and are very helpful with those who demand their help.
Canadians are very polite and friendly. Courtesy is a hallmark in this country of people with a great sense of humour and very open to the world. As it is a nation of immigrants, the culture that prevails is to welcome those who come from other parts of the world as if they were a Canadian. This, added to the impressive beauty of the country, places Canada as one of the favourite destinations of foreigners. Something that cannot be missed.
Not for nothing Costa Rica is one of the countries in Latin America that has the most foreign residents. It is a nation that has everything to attract any visitor. In a survey about this, 80% of travellers said they feel at home when they go to Costa Rica. Many stays there because of the high human and environmental quality of the whole nation.
Uganda is for many the most friendly country in the world. The kindness and the excellent treatment with the traveller are something that is in the culture and the DNA of the country. The majority of those who visit this nation fall in love with it, mainly because of the warmth of its people.
Thailand is known throughout the world as "the country of the smile." Not missing in any top 10 of the most hospitable countries on the planet. The Thai idiosyncrasy is of welcome and respect with the visitor. All this, without forgetting that the country is an exquisite mixture of tradition and modernity, within the framework of fabulous landscapes and spectacular gastronomy.
The Philippines has a privileged geographical position. This has caused many multinationals to set up branches there. Therefore, there are many foreigners in this country, where English is spoken, mainly. The locals are very open and helpful. They don't save expressions of enthusiasm and welcome for those who visit them.
List of Top 10 Richest Countries in the World! how many have you visited?


Glazerbook is located in the Waihopai Valley in the South Island. The famous vineyards of New Zealand's Marlborough District are down river from Glazebrook Station on the way to the village of Blenheim, just 90 minutes away. Blenheim has a small airport.
Whether you want to book a hunt, sign up to our newsletter or just find out more about our lodge, we'd love to hear from you.
Want to ask a question about Glazebrook, personalise your vacation with bespoke itinerary options or find out about available dates? We would love to hear from you!


Both Avenidas and Rivas did not give their opponents the time of day in the deciding semifinals game. Excellent and determining plays on the offense and defensive ends placed them in the finals where they were both expected.
The outside game Rivas Ecopolis with a remarkable Gaby Ocete (13 points) and a Rachel Allison (15) who were decisive in game that Rivas gave the second ticket to the LF finals.
The inside game of Perfumerias dominated the boards with a great Angel Robinson (23 points and 14 rebounds) and excellent Marija Rezan (22 points and 13 catches), who signed an outstanding game for the Salamancans.


Engagement photography accomplishes a lot for the bride, the groom, and the couple they have become. Your engagement photoshoot is your first opportunity to have a professional photographer capture the emotions and personality that make you who you are together.
There's a reason that an increasing number of couples start the wedding photography months before the wedding date rolls around. Not only will the photos provide you with memories you will cherish for a lifetime; they also provide you with the unique images that will make your wedding invitations or your event even more personal.
Many couples use their engagement photos as part of the décor for their ceremony or reception. It's an artistic and unique way of sharing another special occasion leading to your wedding day. Many couples show a slideshow of their engagement photos prior to or after their wedding, or at the reception. Others frame them and set them along the tables for the reception. Sharing your favourite shots from your engagement photoshoot is a meaningful way to share even more with your loved ones and friends.
Looking at a wedding photographer's portfolio is a great way to learn their style and determine if they are a good fit for you. The connection that you see between the photographer and other couples they've photographed doesn't happen by accident. The last thing you want to do is wait until your wedding day to get to know your photographer.
An engagement photoshoot is often more relaxed and more intimate than the wedding ceremony. The time you spend with your photographer gives you a chance to get to know each other. The photos you take before your wedding help you interact with each other's personalities. Feeling comfortable for your wedding photography will result in photos that capture the special moments that matter to you.
Edge Photography GC knows how to capture the details that make you stand out as a couple. Book your engagement photoshoot and get the award-winning photography needed to create memories that last a lifetime.


The namesake of Abilene Christian University's Carl Spain Center on Race Studies and Spiritual Action was a "courageous individual," said Dr. Jerry Taylor, who named the center after the now-legendary Bible professor.
Spain was a man who considered it a sin to deny entrance to a Christian university based on the color of a person's skin, Taylor said.
And the facility that bears his name offers a chance to "celebrate the courage and the legacy" that prompted him to step forward and challenge that policy, said Taylor, himself an associate professor of Bible at ACU and founding director of the Spain Center .
During a time when ACU still enforced a policy of not accepting African-Americans as students, Spain famously delivered a keynote address, "Modern Challenges to Christian Morals," at the ACU Lectures in 1960.
His talk, which called into question the school's whites-only admissions policies, also called for integration, coming mere weeks after an African-American student was denied admission to the school because of his race.
That famous lecture had had significant negative effects for Spain's career. He was ostracized by many in the church, his preaching career "left permanently tarnished by those who opposed him," a history on the center's website says.
Today, however, he is regarded as a "legendary figure" whose "prophetic voice was a catalyst for change," the site says.
"We have sought to solve many of our conflicts and divisions around the issue of race by relying heavily on the human intellect – by thinking we can think our way out of a problem that has been historically embedded in this country since its very inception," he said.
But the Spain Center "calls people back to the divine center, to rely on the power and inspiration that comes from God, as He was manifest in Jesus Christ," Taylor said.
Christ "bequeathed to his followers the power to become sons and daughters of God, which actually has given us the capacity to relate to each other as brothers and sisters in the same family of God," he said.
"We also believe that it is impossible for us as blacks, whites, Hispanics and otherwise, to be reconciled to each other without all of the aforementioned groups being intentional about being reconciled to their creator," he said.
The center honors Spain's legacy on the academic side by conducting research on the historic and contemporary role of race and racism in the church and its institutions, said Tryce Prince, executive assistant.
"We also exist to be an example and promote contemplative spiritual practices, such as prayer and meditation, and creating a diverse community to be able to tap into the divine in each of us, but also in all of us collectively," he said.
A series of Racial Unity Leadership Summits (RULS), the next scheduled in Dallas on May 15-18, is among the core of the center's current work, and a continuation of original work begun by Taylor in 2014, Prince said.
The May summit will focus on the life, death and legacy of 26-year-old Botham Shem Jean in September 2018.
A graduate of Harding University, Jean was shot by an off-duty police officer, who fired on him after walked into an apartment she mistakenly believed was her own.
"I think that the challenge that is before us now, the area that we need to really focus on, is the inner space of human beings – black, white, Hispanic, Asian, you name it," he said.
That private space is "where we still give lodging to toxic thoughts and toxic beliefs about other human beings based on the training and conditioning that we receive from our family systems and the broader society," Taylor said.
But it is "as much alive today as it was back then," Taylor said.
"The only difference is that you have fewer people that are living in an imagined future – of how we can see the world, see our country, see our churches as they are now, but yet envision a future history that we can all join in making and creating together under the guidance of the spirit," he said.


text:
'Box' doesn't have too much inside it
Good movies make you question your morals sometimes, but that's why we love them. Regardless of whether or not you're smiling as The Joker makes a pencil disappear or laughing at the end of "There Will Be Blood," the situations make you think about what you would do in a certain circumstance. "The Box" may not have been nearly as good as those films, but I couldn't help but wonder if I would press the button.
Based off Richard Matheson's short story "Button, Button," Richard Kelly's "The Box" follows Norma (Diaz) and Arthur (Marsden) Lewis, a middle class family in West Virginia. Arthur works for NASA in hopes of traveling to space, and Norma is a teacher at a private school that their young son attends. After their child loses his scholarship and Arthur loses his dreams of going to space, they find themselves in a financial crisis. Late one night, an unmarked package is left at their doorstep. It contains a wood box with a red button locked in glass. A note in the package explains a man named Mr. Steward (Frank Langella) will arrive at 5 p.m. the next day. Steward informs the couple that they have 24 hours to press the button that will kill someone that they do not know and they will receive $1 million. The couple tries to figure out the situation, but as they get deeper into the conspiracy, they suspect they are being tested for an unknown reason.
Marsden and Diaz have a realistic chemistry in this movie and that makes up for missing character development. Marsden is above average as a good man that finds himself in a bad situation, and I never thought he was overacting. Diaz, on the other hand, was bad, with her terrible old-time southern accent. Langella steals the show as the deformed man, and he does a great job not playing a more than average villain by not being over the top.
The idea behind "The Box" is outstanding because the situation is terrifyingly simple. The first half of the film I was at the edge of my seat, as the two main characters raced to find out what was going to happen next. Unfortunately, the film changes pace about halfway through, and they tried to make this simple suspense film more than it truly was. Even with a mediocre second half, I give this film credit for being a cool throwback to suspense films from the 50s.
Director Richard Kelly may always live in the shadow of his cult classic "Donnie Darko," but his talent behind the camera is noticeable. Even though this film has a vibe that was in many 50s films, Kelly approaches it as an homage rather than a modern take. The first half is shot like numerous Alfred Hitchcock films, from the frantic unknown suspense, to the screeching score during scenes of action. Even during the film's weak second half, the cinematography stays true to the old-school feel that managed to keep my attention.
The score by three members of the band Arcade Fire is honestly the best part of this film. The suspense built by the constant frantic music inspired by older movies like "Chinatown" really can make a simple situation riveting. Unfortunately, I cannot say the same about the film's special effects. They looked like made for TV effects on a low budget horror film.
I really wanted to like this movie, but the films second half ruined it for me. The classic feel is great, and I hope that Kelly can use it in the future toward a better movie. I can't recommend this movie for that many people, but if it sounds like your type of movie than give this film a rental.


With over 25 years of experience managing construction across a number of industries, I work at SBSG because of the fabulous culture, varied project mix and impressive track record. I take pride in my work and constantly strive to execute each project with the upmost integrity and efficiency. These values are shared across our team and this is what aids us to get projects delivered on budget, on schedule and above expectation.


http://youtu.be/_JJbnFy3yak 'Male Survivors of Sexual Abuse Discuss Sharing Their Stories' To be a voice in this movement, please like, subscribe, & share. For help, visit http://1in6.org/.
'Male Survivors of Sexual Abuse Discuss Sharing Their Stories' To be a voice in this movement, please like, subscribe, & share. For help, visit http://1in6.org/.


text:
Hans-Joachim Speßhardt (* 1935 in Berlin) ist ein deutscher Kunstmaler und Autor. Er lebt und arbeitet in Berlin.

Biografie
Speßhardt studierte an der Berliner Meisterschule für Grafik bei Kögler. Er stellt in seinen Ölbildern, die meist etwa einen Meter groß sind, hauptsächlich den weiblichen Körper und dazugehörende Attribute dar. Darüber hinaus schafft er auch Pastellzeichnungen und Siebdrucke. Speßhardt hat in Den Haag bei der Internationalen Galerie Orez und in anderen europäischen Städten seine Werke gezeigt und erhielt mehrere Auszeichnungen. Er ist verheiratet und hat zwei Töchter. Sein erstes Atelier richtete Hans-Joachim Speßhardt 1961 nach seiner Hochzeit mit Erika Speßhardt, geborene Höhne und Cousine von Otto Höhne, in seiner Wohnung in Berlin-Charlottenburg ein, die zuvor vom Schauspieler Karl Ludwig Schreiber bewohnt wurde. Hier schuf er bis 1972 die meisten seiner frühen Werke. Seit 1972 entstehen seine Arbeiten in seinem Atelier in Berlin-Kladow.

Hans-Joachim Speßhardt war Mitglied im Deutschen Künstlerbund.

Werke (Auswahl)
 Gisèle (Grafik, 1970)
 Akt im Sessel (1968)
 Fremdes Paar, (Farbserigraphie 1969)

Einzelausstellungen
 1966: Galerie Potsdamer, Berlin; Internationale Galerie Orez, Den Haag
 1967: Internationale Galerie Orez, Den Haag; Galerie Neue Pforte, Aachen; Galerie Potsdamer, Berlin; Galerie de Sleurtel, Dordrecht
 1968: Kleine Galerie, Frankfurt; Kabinett für aktuelle Kunst, Bremerhaven; Galerie Hake, Köln; Tsamas Galerie, Villingen; Internationale Galerie Orez, Den Haag
 1969: Galerie Wargin, Berlin; Galerie Niedlich, Stuttgart; Internationale Galerie Orez, Den Haag
 1970: Internationale Galerie Orez, Den Haag; Galerie Margot Ostheimer, Frankfurt; Galerie 2000, Berlin

Gruppenausstellungen
 1964: Prix Europe, Ostende
 1965: Facetten van hedendaagse erotiek, Internationale Galerie Orez, Den Haag; Ils sont venus de si loin, Galerie Delta, Rotterdam
 1966: Deutscher Künstlerbund, Essen; Kunstpreis der Jugend, Baden-Baden; Total Realismus, Berlin
 1967: Nouvelle école de Berlin, Genf; Junger Westen, Recklinghausen; Galerie Ben Wargin, Berlin; Deutscher Künstlerbund, Karlsruhe; Galerie Junge Generation, Hamburg; Stedelijk Museum, Schiedam
 1968: Tecta Galerie, Düsseldorf; Retrospektive Galerie Potsdamer, Berlin; Junge Grafik, Berlin; Olefer Hagarpresse, Aachen; Berlin Prospekt, Galerie Springer, Berlin
 1969: Galerie Niepel, Düsseldorf; Prix Europe, Ostende; Internationale Galerie Orez, Den Haag; Junge Stadt sieht junge Kunst, Wolfsburg, Oberhausen und Bremerhaven; Neue illustrierte Bücher und Grafikmappen, Frankfurter Kunstverein
 1970: Pop-Sammlung Beck, Bonn, Darmstadt und Dortmund; Frühjahrsmesse Berliner Galerien, Akademie der Künste, Berlin; 10 Jahre Internationale Galerie Orez, Den Haag; Galerie Margot Ostheimer, Frankfurt; Galerie 2000, Berlin; 10 Jahre Galerie Niedlich, Stuttgart

Publikationen
 Beauties. Hake Verlag, Köln 1967.
 Kunst in Berlin. Belser Verlag, Stuttgart 1969.
 Gisèle. Hake Verlag, Köln 1969 (Einleitung: Walter Aue).
 Fremde Mädchen. Rembrandt Verlag, Berlin 1969.

Einzelnachweise

Weblinks
 Hans-Joachim Speßhardt auf artnet.de (abgerufen am 8. März 2016)

Autor
Maler (Deutschland)
Mitglied im Deutschen Künstlerbund
Deutscher
Geboren 1935
Mann

redpajama_set_name: RedPajamaWikipedia


text:
Before she died, at the age of 81 in 1944, the Swedish artist Hilma af Klint stipulated that her paintings were not to be shown in public for 20 years after her death. Perhaps she felt that the world was not yet ready for them. In some respects, the world never will be ready for the occult symbolism and spiritualist gibberish that her work was derived from, and from which she gained her inspiration.
Although the same peculiar beliefs attend the work of pioneering artists such as Mondrian, Kandinsky and Malevich, they never suggested, as did Af Klint, that their work was guided by an imaginary "leader in the spiritual world". For Af Klint, this was a certain Ananda, who in 1904 told her "she was to execute paintings on the astral plane".
By all accounts, Af Klint was a sober, well-balanced woman. Her art and beliefs, however, were extreme. Regarded as a clairvoyant from childhood, she was a medium and one of Sweden's first followers of the theosophical teachings of Madame Blavatsky, and later of Rudolf Steiner's Anthroposophic movement. Full Story
Related: religion, wicca, pagan, spells
posted at 10:55 AM
October 2005 November 2005 December 2005 January 2006 February 2006 March 2006 April 2006 May 2006 June 2006 July 2006 August 2006 September 2006 October 2006 November 2006 December 2006 January 2007 February 2007 March 2007 April 2007 May 2007 June 2007 August 2007 September 2007 October 2007 November 2007 December 2007 January 2008 February 2008 March 2008 April 2008 May 2008
© 2007 Simple Magick - Your Daily Source for Wiccan and Pagan Information.
If you have a website click here to get fresh, pagan content for your site with our daily feeds. Just copy and paste the code.
Weekly Pagan Digest
Shamanism, Oldest Healing Tradition In The World
Wiccans Wait For Symbol On Headstones
Witches: Followers Of The Craft Speak Out
From Baptist to Wiccan
Last Bastions Of Paganism Tell All
1692 Salem Was Ripe For Witch Trials
Truly Bewitching
Altared Spaces
Justices Reject Intervention In Wiccan Tax Case
Update: Wiccan Request Gains Support


text:
Bright Lights, Volume 8 | Number 1
by Jamilah Simmons
Jamilah Simmons
Senior film student Annie Bercy: "I like where I'm headed."
After directing a video for Grammy Award–winning artist Ciara, senior film student Annie Bercy is on a path to follow her dreams.
It's Juneteenth. Senior film student Annie Bercy is shooting a racial justice protest in Brooklyn, and she gets a DM from Ciara. Ciara Princess Wilson: Grammy Award–winning, Billboard charts-busting recording artist, model, Revlon brand ambassador. "Ooooh/All my ladies to the flooooor." That Ciara.
Bercy—who showcases her dynamic portfolio of poppy mood boards, provocative photo shoots, and other culturally rich and hip-on-the-scene aesthetics to her 30,000+ Instagram followers—clicks on the message request, and it's verified blue. "The one and only," Bercy thinks. She starts coughing.
The message? "Hey love, I love your work, I really want to work with you, my people…your people."
"It took me three hours to respond," says Bercy. "It was so random. What do you say?"
Next thing she knows she's on a Zoom call with the artist and listening to her latest single, "Rooted," a thumping nod to the Black Lives Matter movement and general black pride manifesto. She's hearing the chorus—"Brown skin poppin/I'm rooted,"—and thinking of plants and families and babies and friends. "Black friends, black culture, just black people," she says.
And then next thing she's on a flight to Los Angeles with her trusted director of photography to shoot at Ciara's home. Full creative freedom, even down to the outfits the artist and the rest of the talent wore. The shoot would also take her to Atlanta, San Diego, New Jersey, and then back to New York. Two different edits. More Zoom calls with Ciara to make the final cut. The video was released in August.
"I'm happy with how the world has responded," says Bercy, a couple months after the shoot. "I was just looking at the YouTube comments and loving every second of it. It took a while to dawn on me, but now I'm finally pinching myself. It says 'Directed by Annie Bercy' at the end."
For the former Queensborough Community College student who was once on a path to becoming an English teacher, the moment where she could really point to her first major production behind the driver's seat had been years in the making. She had always been prolific with a phone camera, always shooting and editing, really into fashion, and loved writing, staging, and generally bringing a project together. They were passions and skills she had honed in high school in various stage and theater clubs and projects and through work for her church.
She gradually built up a body of work after an encounter with television executive Mona Scott Young, who told her "If you want to direct, just direct." So Bercy did, following her own creative instincts, making her own projects, and posting them on her Instagram, which started gaining traction. She hit the New York club scene and became the party girl who wasn't really there to party, but to shoot the video of the party. She got referrals to do different video shoots and small brand commercials. She was meeting people. She networked her way to a job as a videographer/producer/editor at the legendary hip-hop radio station Hot 97 FM. She ended up editing videos for Grammy-nominated artists Sza and Ty Dolla $ign and has been approached by Grammy-nominated artist Lil Baby to work on some content.
Somewhere in between, she decided to get a degree in film production because even though she was getting good work, she wanted to learn "the technical aspects of film, to be versed in the language, and to really understand the different roles in a production."
She also needed to prove something to her Haitian mother, who didn't understand where her new party lifestyle and video work was going.
"I'm proud of myself for committing to school because I can't lie—it's been tough after already getting so much professional work," she says. "But I like where I'm headed."
Her five-year plan is to "just create," she says. She's eyeing certain brands, like Zara and Gucci, that she'd love to work with, identifying music artists she thinks her creative vision is compatible with, and generally charging on with the hustle that has already paid off.
"I'm just going to keep walking in this direction," she says. "It's where my passion is leading me."
Annie Bercy Director Editor Film Music Video School of Visual Media and Performing Arts
Jamilah Simmons 11/23/2020
Teaching in the Pandemic, Volume 8 | Number 1


Pumpkin is a perfect creamy addition to any soup, plus it adds fiber and vitamin A! I love how simple Shannon's recipe is – it's quick and easy enough to make any night of the week.
This chili is the perfect every-night dish for fall! With a balance of whole grains, legumes and veggies, this recipe is loaded with nutrition and sure to keep your tummy satisfied for hours. If you just can't with peeling and cubing butternut squash (this was me before I invested in a quality chef's knife), save yourself the headache and buy pre-prepped squash.
Are you one of those people that gets tired of soups and slow cooker creations when cool weather hits? Remember that salads aren't just for summer! I love the addition of the less-popular whole grain sorghum to this dark green salad. Why not make it a goal to try out a few new-to-you grains this season?
If you've only ever used lentils in a savory recipe, check this out! Seasonal fruit adds crunch, color and sweetness to this fiber-packed dish. Simple to make and perfect for the lunch box.
Have you ever seen such colorful falafel? Mix up Mediterranean night with these zippy sliders and sauce served on a bed of greens or a bun. And don't discard those beet greens – wash, chop and toss them into your salad or on top of your sandwich!
How cozy and warm does this sound? Another simple stew for cold nights – this dish can be made ahead and frozen for those days you're short on time, patience or energy. Just don't forget the pumpkin seed and cilantro garnish!
Grain-stuffed acorn squash is one of my fall favorites and including it in this round-up inspired me to make it more often! Not only is it fun to feast on a beautiful squash filled with deliciousness, it's also packed with fiber and vitamins A and C. EA's use of dried cherries in the pilaf is a nice twist on dried cranberries which are so popular this time of year.
I love a good fruit cobbler on cool autumn weekend mornings! They're easy to make and you can customize them based on whatever fruit and grains you happen to have on hand. Bonus: they make your house smell amazing while they're baking! Katie's addition of fresh ginger and orange zest give this version extra flavor!
Wash that cobbler down with a mug of this stuff! Forget artificial flavors – whisk together coffee, soy milk, pumpkin and spices for a comforting autumn drink.
Be sure to follow my Twitter and Facebook pages for even more colorful fall recipes!
What a great roundup! Thanks so much for including my butternut squash chili. I'm totally with you on buying the precut ones for easy prep! 🙂 Can't wait to try all the rest of the recipes on this list.
Hi, I'm Taylor! I believe self-care is a huge part of health. Follow along as I share weight-inclusive and eco-ethical perspectives on food, exercise and lifestyle.
Get the FREE Beginner's Guide to Eating Intuitively!
Strategies, tips and resources for starting your food freedom journey.