text:
var assert = require('chai').assert;
var sinon = require('sinon');
var Hashids = require('hashids');
var randomString = require('randomstring');

var User = require('../../../../../app/models/api/users');
var UserFollow = require('../../../../../app/models/api/user_follows');
var UserInvite = require('../../../../../app/models/api/user_invite');
var userDomain = require('../../../../../app/api/v1/domain/user');

var config = require('../../../../../app/config');
var hashid = new Hashids(config.get('hashID.secret'), config.get('hashID.length'), config.get('hashID.alphabet'));

var userAccount = {
  id: 1,
  activated: true,
  banned: false,
  banned_reason: '',
  bio: 'I exist only in memory.',
  company_name: 'My Company',
  created_at: new Date(),
  email: 'jane.doe@email.com',
  first_name: 'Jane',
  hash_id: 'abc123',
  join_date: new Date(),
  last_name: 'Doe',
  location: 'Florida, USA',
  modified_at: new Date(),
  new_email: 'new@email.com',
  new_email_key: '',
  new_email_requested: new Date(),
  new_password: 'abc123',
  new_password_requested: new Date(),
  password: 'password',
  profile_link_1: 'https://website1.com',
  profile_link_2: 'https://website2.com',
  profile_link_3: 'https://website3.com',
  profile_link_twitter: 'https://twitter.com/handler',
  profile_link_website: 'http://mywebsite.com',
  profile_name: 'Awesome Sauce',
  profile_photo: 'http://www.mywebsite.com/img/avatar.jpg',
  username: 'JaneDoe'
};

describe('Domain User', function() {
  beforeEach(function() {
    this.sandbox = sinon.sandbox.create();
  });

  afterEach(function() {
    this.sandbox.restore();
  });

  it('should be defined', function() {
    assert.isDefined(userDomain);
    assert.isDefined(userDomain.prepareForAPIOutput);
    assert.isDefined(userDomain.prepareForElasticSearch);
    assert.isDefined(userDomain.checkInviteCode);
    assert.isDefined(userDomain.deleteAccount);
    assert.isDefined(userDomain.emailAddressInUse);
    assert.isDefined(userDomain.followUser);
    assert.isDefined(userDomain.getFollowers);
    assert.isDefined(userDomain.getFollowing);
    assert.isDefined(userDomain.unfollowUser);
    assert.isDefined(userDomain.updateAccount);
    assert.isDefined(userDomain.usernameInUse);
  });

  describe('prepareForAPIOutput', function() {
    it('prepareForAPIOutput should return correct data', function() {
      var output = userDomain.prepareForAPIOutput({ _source: userAccount });

      assert.isDefined(output.bio);
      assert.isDefined(output.company_name);
      assert.isDefined(output.email);
      assert.isDefined(output.first_name);
      assert.isDefined(output.hash_id);
      assert.isDefined(output.join_date);
      assert.isDefined(output.last_name);
      assert.isDefined(output.location);
      assert.isDefined(output.profile_link_1);
      assert.isDefined(output.profile_link_2);
      assert.isDefined(output.profile_link_3);
      assert.isDefined(output.profile_link_twitter);
      assert.isDefined(output.profile_link_website);
      assert.isDefined(output.profile_name);
      assert.isDefined(output.profile_photo);
      assert.isDefined(output.username);

      assert.isTrue(output.bio === userAccount.bio);
      assert.isTrue(output.company_name === userAccount.company_name);
      assert.isTrue(output.email === userAccount.email);
      assert.isTrue(output.first_name === userAccount.first_name);
      assert.isTrue(output.hash_id === userAccount.hash_id);
      assert.isTrue(output.join_date === userAccount.join_date);
      assert.isTrue(output.last_name === userAccount.last_name);
      assert.isTrue(output.location === userAccount.location);
      assert.isTrue(output.profile_link_1 === userAccount.profile_link_1);
      assert.isTrue(output.profile_link_2 === userAccount.profile_link_2);
      assert.isTrue(output.profile_link_3 === userAccount.profile_link_3);
      assert.isTrue(output.profile_link_twitter === userAccount.profile_link_twitter);
      assert.isTrue(output.profile_link_website === userAccount.profile_link_website);
      assert.isTrue(output.profile_name === userAccount.profile_name);
      assert.isTrue(output.profile_photo === userAccount.profile_photo);
      assert.isTrue(output.username === userAccount.username);

      assert.isUndefined(output.id);
      assert.isUndefined(output.activated);
      assert.isUndefined(output.banned);
      assert.isUndefined(output.banned_reason);
      assert.isUndefined(output.created_at);
      assert.isUndefined(output.modified_at);
      assert.isUndefined(output.new_email);
      assert.isUndefined(output.new_email_key);
      assert.isUndefined(output.new_email_requested);
      assert.isUndefined(output.new_password);
      assert.isUndefined(output.new_password_requested);
      assert.isUndefined(output.password);
    });
  });

  describe('prepareForElasticSearch', function() {
    it('prepareForElasticSearch should return correct data', function() {
      var output = userDomain.prepareForElasticSearch(userAccount);

      assert.isDefined(output.id);
      assert.isDefined(output.bio);
      assert.isDefined(output.company_name);
      assert.isDefined(output.email);
      assert.isDefined(output.first_name);
      assert.isDefined(output.hash_id);
      assert.isDefined(output.join_date);
      assert.isDefined(output.last_name);
      assert.isDefined(output.location);
      assert.isDefined(output.profile_link_1);
      assert.isDefined(output.profile_link_2);
      assert.isDefined(output.profile_link_3);
      assert.isDefined(output.profile_link_twitter);
      assert.isDefined(output.profile_link_website);
      assert.isDefined(output.profile_name);
      assert.isDefined(output.profile_photo);
      assert.isDefined(output.username);

      assert.isTrue(output.id === userAccount.id);
      assert.isTrue(output.bio === userAccount.bio);
      assert.isTrue(output.company_name === userAccount.company_name);
      assert.isTrue(output.email === userAccount.email);
      assert.isTrue(output.first_name === userAccount.first_name);
      assert.isTrue(output.hash_id === userAccount.hash_id);
      assert.isTrue(output.join_date === userAccount.join_date);
      assert.isTrue(output.last_name === userAccount.last_name);
      assert.isTrue(output.location === userAccount.location);
      assert.isTrue(output.profile_link_1 === userAccount.profile_link_1);
      assert.isTrue(output.profile_link_2 === userAccount.profile_link_2);
      assert.isTrue(output.profile_link_3 === userAccount.profile_link_3);
      assert.isTrue(output.profile_link_twitter === userAccount.profile_link_twitter);
      assert.isTrue(output.profile_link_website === userAccount.profile_link_website);
      assert.isTrue(output.profile_name === userAccount.profile_name);
      assert.isTrue(output.profile_photo === userAccount.profile_photo);
      assert.isTrue(output.username === userAccount.username);

      assert.isUndefined(output.activated);
      assert.isUndefined(output.banned);
      assert.isUndefined(output.banned_reason);
      assert.isUndefined(output.created_at);
      assert.isUndefined(output.modified_at);
      assert.isUndefined(output.new_email);
      assert.isUndefined(output.new_email_key);
      assert.isUndefined(output.new_email_requested);
      assert.isUndefined(output.new_password);
      assert.isUndefined(output.new_password_requested);
      assert.isUndefined(output.password);
    });
  });

  describe('checkInviteCode', function() {
    beforeEach(function() {
      this.userInviteStub = this.sandbox.stub(UserInvite, 'findAll');
    });

    it('should return invites', function(done) {
      var fakeKey = hashid.encode(123);
      var fakeResponse = [];

      this.userInviteStub.returns(Promise.resolve(fakeResponse));

      userDomain.checkInviteCode(fakeKey)
        .then(function(foundUser) {
          assert.isDefined(foundUser);
          done();
        });
    });

    it('should not return invites', function(done) {
      var fakeKey = hashid.encode(123);
      var fakeResponse = null;

      this.userInviteStub.returns(Promise.resolve(fakeResponse));

      userDomain.checkInviteCode(fakeKey)
        .then(function(foundUser) {
          assert.isDefined(foundUser);
          done();
        });
    });

    it('should throw error', function(done) {
      userDomain.checkInviteCode(null)
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'Invalid Invitation Code');
          done();
        });
    });
  });

  describe('deleteAccount', function() {
    beforeEach(function() {
      this.userFindStub = this.sandbox.stub(User, 'findOne');
    });

    it('should delete user', function(done) {
      var fakeUser = {
        username: 'JaneDoe',
        id: 123
      };

      var fakeFoundUser = {
        set: sinon.stub(),
        save: sinon.stub(),
        destroy: sinon.stub().returns(Promise.resolve({})),
        email: 'jane.doe@email.com',
        username: 'JaneDoe'
      };

      this.userFindStub.returns(Promise.resolve(fakeFoundUser));

      userDomain.deleteAccount(fakeUser)
        .then(function(deletedUser) {
          assert.isTrue(fakeFoundUser.destroy.calledOnce);
          assert.isTrue(fakeFoundUser.set.calledWith('username', '~' + fakeFoundUser.username));
          assert.isTrue(fakeFoundUser.set.calledWith('email', '~' + fakeFoundUser.email));
          assert.isTrue(fakeFoundUser.set.calledWith('password', 'deleted-account'));
          assert.isTrue(fakeFoundUser.set.calledWith('password_oauth', null));
          assert.isTrue(fakeFoundUser.set.calledWith('new_password_key', null));
          assert.isTrue(fakeFoundUser.set.calledWith('new_password_requested', null));
          assert.isTrue(fakeFoundUser.set.calledWith('new_email', null));
          assert.isTrue(fakeFoundUser.set.calledWith('new_email_key', null));
          assert.isTrue(fakeFoundUser.set.calledWith('new_email_requested', null));
          assert.isTrue(fakeFoundUser.set.calledWith('activated', 0));
          done();
        });
    });

    it('should not delete user', function(done) {
      var fakeUser = {
        username: 'JaneDoe',
        id: 123
      };

      this.userFindStub.returns(Promise.resolve(null));

      userDomain.deleteAccount(fakeUser)
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'No user found for user ' + fakeUser.username);
          done();
        });
    });

    it('should throw error', function(done) {
      userDomain.deleteAccount(null)
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'Request Invalid');
          done();
        });
    });
  });

  describe('emailAddressInUse', function() {
    beforeEach(function() {
      this.userStub = this.sandbox.stub(User, 'findOne');
    });

    it('should return a result', function(done) {
      var fakeQuery = {
        emailAddress: 'jane.doe@email.com',
        callback: function () {
          return true;
        }
      };

      var fakeResponse = {
        id: 123,
        username: 'JaneDoe'
      };

      this.userStub.returns(Promise.resolve(fakeResponse));

      userDomain.emailAddressInUse(fakeQuery.emailAddress, fakeQuery.callback)
        .then(function(foundUser) {
          assert.isDefined(foundUser);
          done();
        });
    });

    it('should error with missing callback', function(done) {
      var fakeQuery = {
        emailAddress: 'jane.doe@email.com',
        callback: function () {
          return false;
        }
      };

      this.userStub.returns(Promise.resolve(null));

      userDomain.emailAddressInUse(fakeQuery.emailAddress)
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'Request Invalid');
          done();
        });
    });

    it('should error with missing email', function(done) {
      var fakeQuery = {
        callback: function () {
          return false;
        }
      };

      var fakeResponse = {
        id: 123,
        username: 'JaneDoe'
      };

      this.userStub.returns(Promise.resolve(fakeResponse));

      userDomain.emailAddressInUse(null, fakeQuery.callback)
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'Request Invalid');
          done();
        });
    });

    it('should not return a result', function(done) {
      var fakeQuery = {
        emailAddress: 'jane.doe@email.com',
        callback: function () {
          return false;
        }
      };

      this.userStub.returns(Promise.resolve(null));

      userDomain.emailAddressInUse(fakeQuery.emailAddress, fakeQuery.callback)
        .then(function(foundUser) {
          assert.isFalse(foundUser);
          done();
        });
    });

    it('should throw error', function(done) {
      userDomain.emailAddressInUse()
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'Request Invalid');
          done();
        });
    });
  });

  describe('followUser', function() {
    beforeEach(function() {
      this.userStub = this.sandbox.stub(User, 'findOne');
      this.userFollowStub = this.sandbox.stub(UserFollow, 'findOne');
      this.userFollowCreateStub = this.sandbox.stub(UserFollow, 'create');
    });

    it('should return a result for new follow', function(done) {
      var self = this;
      var fakeResponse = {
        dataValues: {
          id: 123,
          username: 'JaneDoe'
        },
        create: sinon.stub(),
        restore: sinon.stub()
      };

      this.userStub.returns(Promise.resolve(fakeResponse));
      this.userFollowStub.returns(Promise.resolve(false));
      this.userFollowCreateStub.returns(Promise.resolve(fakeResponse));

      userDomain.followUser(321, 'JaneDoe')
        .then(function(foundUser) {
          assert.isDefined(foundUser);
          assert.isTrue(self.userFollowCreateStub.calledOnce);
          done();
        });
    });

    it('should return a result for existing follow', function(done) {
      var fakeResponse = {
        dataValues: {
          id: 123,
          username: 'JaneDoe'
        },
        create: sinon.stub(),
        restore: sinon.stub()
      };

      this.userStub.returns(Promise.resolve(fakeResponse));
      this.userFollowStub.returns(Promise.resolve(fakeResponse));
      this.userFollowCreateStub.returns(Promise.resolve(fakeResponse));

      userDomain.followUser(321, 'JaneDoe')
        .then(function(foundUser) {
          assert.isDefined(foundUser);
          done();
        });
    });

    it('should prevent following yourself', function(done) {
      var fakeResponse = {
        id: 123,
        username: 'JaneDoe'
      };

      this.userStub.returns(Promise.resolve(fakeResponse));
      this.userFollowStub.returns(Promise.resolve(fakeResponse));

      userDomain.followUser(123, 'JaneDoe')
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'You Can\'t follow yourself.');
          done();
        });
    });

    it('should throw error for missing user', function(done) {
      var fakeResponse = null;

      this.userStub.returns(Promise.resolve(fakeResponse));
      this.userFollowStub.returns(Promise.resolve(fakeResponse));

      userDomain.followUser(123, 'JaneDoe')
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'No user found for user JaneDoe');
          done();
        });
    });

    it('should throw error for invalid request', function(done) {
      userDomain.followUser()
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'Request Invalid');
          done();
        });
    });
  });

  describe('getFollowers', function() {
    beforeEach(function() {
      this.userStub = this.sandbox.stub(User, 'findOne');
      this.userFollowStub = this.sandbox.stub(UserFollow, 'findAll');
    });

    it('should return followers', function(done) {
      var fakeUsername = 'JaneDoe';
      var fakeUserResponse = {
        id: 123
      };
      var fakeUserFollowResponse = {};

      this.userStub.returns(Promise.resolve(fakeUserResponse));
      this.userFollowStub.returns(Promise.resolve(fakeUserFollowResponse));

      userDomain.getFollowers(fakeUsername)
        .then(function(foundUser) {
          assert.isDefined(foundUser);
          done();
        });
    });

    it('should not return followers', function(done) {
      var fakeUsername = 'JaneDoe';
      var fakeUserFollowResponse = {};

      this.userStub.returns(Promise.resolve(null));
      this.userFollowStub.returns(Promise.resolve(fakeUserFollowResponse));

      userDomain.getFollowers(fakeUsername)
        .then(function(foundUser) {
          assert.isDefined(foundUser);
          done();
        });
    });

    it('should throw error', function(done) {
      userDomain.getFollowers(null)
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'Request Invalid');
          done();
        });
    });
  });

  describe('getFollowing', function() {
    beforeEach(function() {
      this.userStub = this.sandbox.stub(User, 'findOne');
      this.userFollowStub = this.sandbox.stub(UserFollow, 'findAll');
    });

    it('should return followers', function(done) {
      var fakeUsername = 'JaneDoe';
      var fakeUserResponse = {
        id: 123
      };
      var fakeUserFollowResponse = {};

      this.userStub.returns(Promise.resolve(fakeUserResponse));
      this.userFollowStub.returns(Promise.resolve(fakeUserFollowResponse));

      userDomain.getFollowing(fakeUsername)
        .then(function(foundUser) {
          assert.isDefined(foundUser);
          done();
        });
    });

    it('should not return followers', function(done) {
      var fakeUsername = 'JaneDoe';
      var fakeUserFollowResponse = {};

      this.userStub.returns(Promise.resolve(null));
      this.userFollowStub.returns(Promise.resolve(fakeUserFollowResponse));

      userDomain.getFollowing(fakeUsername)
        .then(function(foundUser) {
          assert.isDefined(foundUser);
          done();
        });
    });

    it('should throw error', function(done) {
      userDomain.getFollowing(null)
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'Request Invalid');
          done();
        });
    });
  });

  describe('unfollowUser', function() {
    beforeEach(function() {
      this.userStub = this.sandbox.stub(User, 'findOne');
      this.userFollowStub = this.sandbox.stub(UserFollow, 'findOne');
    });

    it('should return a result for new follow', function(done) {
      var fakeResponse = {
        id: 123,
        username: 'JaneDoe',
        destroy: sinon.stub().returns(Promise.resolve()),
      };

      this.userStub.returns(Promise.resolve(fakeResponse));
      this.userFollowStub.returns(Promise.resolve(fakeResponse));

      userDomain.unfollowUser(321, 'JaneDoe')
        .then(function(foundUser) {
          assert.isTrue(fakeResponse.destroy.calledOnce);
          done();
        });
    });

    it('should fail with messsage saying you cannot unfollow yourself', function(done) {
      var fakeResponse = {
        id: 123,
        username: 'JaneDoe',
        destroy: sinon.stub().returns(Promise.resolve()),
      };

      this.userStub.returns(Promise.resolve(fakeResponse));
      this.userFollowStub.returns(Promise.resolve(fakeResponse));

      userDomain.unfollowUser(123, 'JaneDoe')
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'You Can\'t follow / unfollow yourself.');
          done();
        });
    });

    it('should fail with notice you are not following user', function(done) {
      var fakeResponse = {
        id: 123,
        username: 'JaneDoe',
        destroy: sinon.stub().returns(Promise.resolve()),
      };

      this.userStub.returns(Promise.resolve(fakeResponse));
      this.userFollowStub.returns(Promise.resolve(false));

      userDomain.unfollowUser(321, 'JaneDoe')
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'You are not following JaneDoe');
          done();
        });
    });

    it('should fail with notice no user found', function(done) {
      var fakeResponse = {
        id: 123,
        username: 'JaneDoe',
        destroy: sinon.stub().returns(Promise.resolve()),
      };

      this.userStub.returns(Promise.resolve(null));
      this.userFollowStub.returns(Promise.resolve(false));

      userDomain.unfollowUser(321, 'JaneDoe')
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'No user found for user JaneDoe');
          done();
        });
    });

    it('should throw error for invalid request', function(done) {
      userDomain.unfollowUser()
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'Request Invalid');
          done();
        });
    });
  });

  describe('updateAccount', function() {
    beforeEach(function() {
      this.userStub = this.sandbox.stub(User, 'findOne');
      this.userFollowStub = this.sandbox.stub(UserFollow, 'findOne');
    });

    it('should update account', function() {
      var fakeUserID = 123;
      var fakeIpAddress = '97.96.74.114';
      var fakeUserData = {
        new_username: 'JohnDoe',
        new_email: 'john.doe@email.com',
        new_password: 'abc123'
      };
      var fakeResponse = {
        set: sinon.stub()
      };

      this.userStub.returns(Promise.resolve(fakeResponse));

      userDomain.updateAccount(fakeUserID, fakeUserData, fakeIpAddress)
        .then(function(foundUser) {
          assert.isTrue(fakeResponse.destroy.calledOnce);
          assert.isTrue(fakeFoundUser.set.calledWith('new_email', fakeUserData.new_email));
          assert.isTrue(fakeFoundUser.set.calledWith('new_email_key', randomString.generate(12)));
          assert.isTrue(fakeFoundUser.set.calledWith('new_email_requested', Date.now()));
          done();
        });
    });

    it('should update account without password', function() {
      var fakeUserID = 123;
      var fakeIpAddress = '97.96.74.114';
      var fakeUserData = {
        new_username: 'JohnDoe',
        new_email: 'john.doe@email.com'
      };
      var fakeResponse = {
        set: sinon.stub()
      };

      this.userStub.returns(Promise.resolve(fakeResponse));

      userDomain.updateAccount(fakeUserID, fakeUserData, fakeIpAddress)
        .then(function(foundUser) {
          assert.isTrue(fakeResponse.destroy.calledOnce);
          done();
        });
    });

    it('should update account using new_username only', function() {
      var fakeUserID = 123;
      var fakeIpAddress = '97.96.74.114';
      var fakeUserData = {
        new_username: 'JohnDoe'
      };
      var fakeResponse = {};

      this.userStub.returns(Promise.resolve(fakeResponse));

      userDomain.updateAccount(fakeUserID, fakeUserData, fakeIpAddress)
        .then(function(foundUser) {
          assert.isTrue(fakeResponse.destroy.calledOnce);
          done();
        });
    });

    it('should update account using new_email only', function() {
      var fakeUserID = 123;
      var fakeIpAddress = '97.96.74.114';
      var fakeUserData = {
        new_email: 'john.doe@email.com'
      };
      var fakeResponse = {};

      this.userStub.returns(Promise.resolve(fakeResponse));

      userDomain.updateAccount(fakeUserID, fakeUserData, fakeIpAddress)
        .then(function(foundUser) {
          assert.isTrue(fakeResponse.destroy.calledOnce);
          done();
        });
    });

    it('should update account using new_password only', function() {
      var fakeUserID = 123;
      var fakeIpAddress = '97.96.74.114';
      var fakeUserData = {
        new_password: 'abc123'
      };
      var fakeResponse = {};

      this.userStub.returns(Promise.resolve(fakeResponse));

      userDomain.updateAccount(fakeUserID, fakeUserData, fakeIpAddress)
        .then(function(foundUser) {
          assert.isTrue(fakeResponse.destroy.calledOnce);
          done();
        });
    });

    it('should fail with no matching user', function() {
      var fakeUserID = 123;
      var fakeIpAddress = '97.96.74.114';
      var fakeUserData = {
        new_username: 'JohnDoe',
        new_email: 'john.doe@email.com',
        new_password: 'abc123'
      };

      this.userStub.returns(Promise.resolve(null));

      userDomain.updateAccount(fakeUserID, fakeUserData, fakeIpAddress)
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'No matching user found.');
          done();
        });
    });

    it('should fail with no params', function() {
      userDomain.updateAccount()
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'Request Invalid');
          done();
        });
    });
  });

  describe('usernameInUse', function() {
    beforeEach(function() {
      this.userStub = this.sandbox.stub(User, 'findOne');
    });

    it('should return username is in use', function(done) {
      var fakeUsername = 'JaneDoe';
      var fakeCallback = function() {
        return true;
      };
      var fakeResponse = {
        id: 123,
        username: fakeUsername
      };

      this.userStub.returns(Promise.resolve(fakeResponse));

      userDomain.usernameInUse(fakeUsername, fakeCallback)
        .then(function(foundUser) {
          assert.isDefined(foundUser);
          done();
        });
    });

    it('should return username is not in use', function(done) {
      var fakeUsername = 'JaneDoe';
      var fakeCallback = function() {
        return false;
      };
      var fakeResponse = null;

      this.userStub.returns(Promise.resolve(fakeResponse));

      userDomain.usernameInUse(fakeUsername, fakeCallback)
        .then(function(foundUser) {
          assert.isDefined(foundUser);
          done();
        });
    });

    it('should return invalid request', function(done) {
      var fakeUsername = 'JaneDoe';

      this.userStub.returns(Promise.resolve(null));

      userDomain.usernameInUse(fakeUsername)
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'Invalid Request');
          done();
        });
    });

    it('should throw error', function(done) {
      userDomain.usernameInUse()
        .catch(function(error) {
          assert.isDefined(error);
          assert.isTrue(error === 'Username Check Request Invalid');
          done();
        });
    });
  });
});


text:
Chrysocoma ciliata
Chrysocoma ciliata L.
Common names: bitter bush, bitter cowcud (Eng.); bitterbos (Afr.); sehalahala (Sesotho)
A dense, slender-stemmed shrublet that boasts with its alluring, bright yellow, globular flowerheads.
Chrysocoma ciliata is a densely leaved, evergreen, dwarf shrub which grows up to 600 mm tall, with narrow or needle-shaped, hairless leaves, 2–14 mm long.
Belonging to the daisy family, the yellow, roundish flowerheads are usually solitary on the branch tips, without ray florets, 6–8 mm diameter surrounded by rows of green bracts with narrow membranous margins. The stem is slender with small leaflets when it is still young.
The fruit is flattened and oval with a thickened rim. It flowers throughout spring up until midsummer (September to January).
Chrysocoma ciliata is not threatened, and is assessed as one of the Least Concern (LC) species in South Africa at present.
Chrysocoma ciliata is not endemic to South Africa, but widely distributed in southern Africa. In the eastern Lesotho highlands this species is argued to be a karroid invasive, introduced by people within the last century. This shrub is able to tolerate dry or wet summer and dry or wet winter seasons. It also does well in areas with salty winds and can tolerate frost. Here in South Africa it is distributed in 7 Provinces, namely Gauteng, North West, Mpumalanga, the Free State, KwaZulu-Natal and the Northern, Eastern and Western Cape. In the Fynbos, Succulent Karoo and Nama Karoo Biomes, it grows on rocky slopes and stony flats, usually in gravel soils.
Chrysocoma is derived from the Greek, khrusos, meaning 'gold', and kome, 'lock of hair', in reference to the golden flowerheads. The species name ciliata means 'fringed with hairs' and describes the fine and rather sparse hairs on the leaf margins.
Chrysocoma is a genus of 23 recorded species, 8 of these being fynbos species.
During the flowering season, Chrysocoma ciliata is predominantly visited by honeybees that forage for nectar and pollen. They transfer pollen from one flower to another, aiding pollination, which allows the plant to reproduce. This plant self-seeds freely; the dry seeds are dispersed by wind and germinate wherever they land.
No cultural or medicinal uses have been recorded. It can be planted on sand dunes to bind the sand and prevent erosion.
Although it is pleasant to taste for animals, it can cause illness if it is consumed in large quantities. In the garden, it is a lovely bright plant, adding spring and summer colour when in flower; also suitable for rocky slopes and stony flats.
Growing Chrysocoma ciliata
Chrysocoma ciliata is a small to medium-sized shrub with a bushy growth and yellow flowerheads that provides a textural contrast in the garden. Dead heading and pruning must be done after flowering, to maintain the plant's compact shape. It requires full sun and a well-drained soil. Before planting, prepare the planting area by adding compost and bonemeal into the planting hole and water.
In the winter-rainfall region, this plant must be planted in early winter at the start of the rainy season. The rainy season allows the plants to establish themselves in the garden, then enabling them to cope with drought and less water in summer. Add a layer of mulch after planting to keep the soil temperature low. Mulch retains soil moisture and helps with the suppression of the germination of weed seeds.
Chrysocoma ciliata can be propagated by both seeds and cuttings, in the same way as C. coma-aurea. In the Kirstenbosch Plant Production Nursery, this plant is only propagated by cuttings. Semi-hardwood cuttings are taken from the current year's growth in early August; cutting material is harvested from a healthy stock plant, free of pests and diseases, in the early morning while the plant is still in its turgid phase. Meristem tip cuttings are the healthiest and the give the best rooting results. The cuttings are immediately placed in a bucket of water to avoid them from drying out.
Prepare the cutting by making a clean cut below a node, and remove the third bottom of the foliage to reduce the rate of transpiration. Dip the base of the cutting into a rooting hormone such as Seradix 2. Firmly place the cutting in a well-drained medium of 1 parts perlite and 2-part sieved bark. The cuttings are sprayed with a fungicide to prevent damping-off disease; this is done on a weekly basis.
The cuttings can be placed in a well-aerated, propagation unit or mist house bed with heating underneath. Rooting occurs from 5 to 8 weeks. Once the rooted cuttings have been hardened off, the plantlets can be potted, adding a little bonemeal per plant, into any average, well-drained potting soil. Plants must be placed under 40% shade net for hardening-off, for a period of 4 weeks. Once the young plants are well established, plant out into the garden. Plants will be ready for planting in 7 to 8 months. Feed plants regularly with an organic fertilizer.
Clarke, H. & Charters, M. 2016. The illustrated dictionary of southern African plant names. Flora & Fauna Publications Trust, Jacana, Johannesburg.
Fitchett, J.M., Bamford, M.K., Mackay, A.W. & Grab, S.W. 2017. Chrysocoma ciliata L. (Asteraceae) in the Lesotho Highlands: an anthropogenically introduced invasive or a niche coloniser? Biological Invasions 19(9): 2711-2728 DOI 10.1007/s10530-017-1478-1
Gledhill, D. 1989. The names of plants. Edn 2. Cambridge University Press, Cambridge.
Manning, J. 2003. Wild flowers of southern Africa. Briza Publications, Pretoria.
Manning, J. 2007. Field guide to Fynbos. Struik Publishers, Cape Town.
Maytham Kidd, M. 1983. Cape Peninsula. South African Wild Flower Guide 3. Botanical Society of SA, Cape Town.
Snijman, D.A. (ed.). 2013. Plants of the Greater Cape Floristic Region 2: The Extra Cape Flora. Strelitzia 30. South African National Biodiversity Institute, Pretoria.
Trinder-Smith, T.H. 2003. Guide to the plant genera of the southwestern Cape . Paarl Print, Paarl.
Tsoanyane, P. 2014. Chrysocoma coma–aurea L. (Asteraceae). PlantZAfrica. Internet. http://pza.sanbi.org/ chrysocoma-coma-aurea.
Thembakazi Dyariwe
SA Distribution: Eastern Cape, Free State, Gauteng, KwaZulu-Natal, Mpumalanga, North West, Northern Cape, Western Cape

redpajama_set_name: RedPajamaCommonCrawl


text:
February 15, 2006 News » News Etc.
Feature In the company of men
By Ashley Lindstrom
Josh Doyen is the new president of UTSA's first gay fraternity, Alpha Lambda Tau. (Photo by Nicole Chaves)
The president of UTSA's gay fraternity talks about changing attitudes on campus
Josh Doyen is a graduate student in political science and the president of UTSA's chapter of Alpha Lambda Tau, a national gay fraternity based in Las Vegas. The fraternity has 15 members at UTSA, three of whom are alumni, including the chapter's founder, Chris Forbrich. Recently, he spoke with the Current about the climate for gays and lesbians at UTSA and the fraternity's role in changing attitudes towards the LGBT community.
Is UTSA supportive of the fraternity?
They're very supportive. I know that the outgoing president fought really hard to get this organization on campus, and it took him about a year, maybe a little bit longer to get all the paperwork done. I just took over the presidency this semester, but I can tell you that it was like blood, sweat, and tears for him to get this organization off the ground. So, when it finally came to fruition, I think he was pleasantly surprised at how supportive UTSA was and how open the Greek community is at UTSA, and everyone in the student activities office, and the university in general.
Other stories in the Current's
gay and lesbian issue
Telling it straight
Why a gay and lesbian issue? Why not? – From the Current's editor
Would the rich gay, white men please stand up?
The faltering Diversity Center reveals the LGBT community's political weakness
Politics is personal
City Councilwoman Elena Guajardo is SA's first openly lesbian elected official
Progressive pulpits
GLBT-friendly churches are the antidote to the Religious Right
Local lesbian and gay resources
Arts, events, health, politics, religion, support groups and more
A lifeline for parents
PFLAG doesn't want families to go into the closet when their loved ones come out
In the company of men
"I don't"
Not everyone in the LGBT community is sold on the idea of same-sex marriage
A crown fit for a queen
Miss Gay SA is back, my pretties. Don't forget to curtsy
One more for the road
Jump-Start's Chuck Squier followed a well-beaten Texas path out of the closet
Do you face adversity from people in the college or around the city?
I don't know so much around the city, but I know at the school there really isn't a lot of adversity. There are some groups on campus that are not supportive of us. Last October we had an event called GLBT pride month at UTSA. One organization had heterosexual pride week after the GLBT pride month in opposition to us. They had a thing up in the Sombrilla, which is the gathering place at UTSA, where they had a poster saying why gay people are, you know, it was just something very homophobic. And it was just pleasantly surprising that hardly anyone was paying attention to them. There were only about two people involved in the group, whereas I think 10 years ago, you would have seen more people participating. Now people don't even pay attention to them anymore because they realize that these people are just being driven by hate. Most people don't even give them the time of day, which is refreshing to us because it tells us that society is changing.
How do you get involved in the community?
We have different social activities, community-service projects, and fundraisers. This semester we're participating in the Webb party at the San Antonio Museum of Art. All proceeds go toward the San Antonio AIDS Foundation. Another big event that we always participate in is the Human Rights Campaign gala, which is in the fall. In about two weeks we're doing a project called "RAMP," which is the Repair and Modification Program, where we are going to build a wheelchair ramp for a 7-year-old boy who has, I believe, muscular dystrophy.
We definitely love to do social events; we probably go clubbing too much, actually. We need to think of some new things to do, but we spend a lot of time at the Bonham and we go to the Heat and the Saint every once and a while. We get together at our apartments, we have extended family members, if you will, who we always hang out with.
How did the decision on gay marriage affect ALT?
We took it pretty hard because, of course, all of our members are very in support of that. I shouldn't make it sound general because there are — believe it or not — gay people who are not supportive of gay marriage. But most of our members are, and we understand that this is Texas, this is a very conservative state, and we also have to take into account that the majority of people who go out and vote are older people, people who are driven to vote because of their beliefs, such as religion. I believe that the vote would have been a little different if young people had gone out and voted.
But I think what's happening right now in society that's really important is that we, more than ever, are getting a voice. Whether it's negative or positive, it's a voice. The whole gay-marriage phenomenon, this issue that just captivated the news media, whether it's negative or positive, we're out there. Even though the gay-marriage thing did not go the way we wanted it, the fact is that it made so much noise in the media and in the public light, and that to me is a huge step forward.
What's next for Alpha Lambda Tau?
Because we are such a new organization and we are gay-affiliated we have always felt like there has been an asterisk next to our name at UTSA. My ultimate goal is to get that asterisk dropped and to get Alpha Lambda Tau accepted as an organization that any student at UTSA would want to join: gay, straight, whatever. Just open to any student that wants to join a fraternity can come into Alpha Lambda Tau and feel at home. That would be my ultimate goal to have us accepted so widely that it wouldn't even matter anymore. •
Text and interview by Ashley Lindstrom
« Feature A lifeline for parents | Last words Politics is a drag »
More by Ashley Lindstrom
Film Review: Straw Dogs
Falling in love with Anne Hathaway
Critic's Pick: Another Earth
Lai Wah Place Read More
International House of Pancakes (SW Military) Read More


While guidance on statistical principles for clinical trials exists, there is an absence of guidance covering the required content of statistical analysis plans (SAPs) to support transparency and reproducibility.
To develop recommendations for a minimum set of items that should be addressed in SAPs for clinical trials, developed with input from statisticians, previous guideline authors, journal editors, regulators, and funders.
Funders and regulators (n = 39) of randomized trials were contacted and the literature was searched to identify existing guidance; a survey of current practice was conducted across the network of UK Clinical Research Collaboration-registered trial units (n = 46, 1 unit had 2 responders) and a Delphi survey (n = 73 invited participants) was conducted to establish consensus on SAPs. The Delphi survey was sent to statisticians in trial units who completed the survey of current practice (n = 46), CONSORT (Consolidated Standards of Reporting Trials) and SPIRIT (Standard Protocol Items: Recommendations for Interventional Trials) guideline authors (n = 16), pharmaceutical industry statisticians (n = 3), journal editors (n = 9), and regulators (n = 2) (3 participants were included in 2 groups each), culminating in a consensus meeting attended by experts (N = 12) with representatives from each group. The guidance subsequently underwent critical review by statisticians from the surveyed trial units and members of the expert panel of the consensus meeting (N = 51), followed by piloting of the guidance document in the SAPs of 5 trials.
No existing guidance was identified. The registered trials unit survey (46 responses) highlighted diversity in current practice and confirmed support for developing guidance. The Delphi survey (54 of 73, 74% participants completing both rounds) reached consensus on 42% (n = 46) of 110 items. The expert panel (N = 12) agreed that 63 items should be included in the guidance, with an additional 17 items identified as important but may be referenced elsewhere. Following critical review and piloting, some overlapping items were combined, leaving 55 items.
Recommendations are provided for a minimum set of items that should be addressed and included in SAPs for clinical trials. Trial registration, protocols, and statistical analysis plans are critically important in ensuring appropriate reporting of clinical trials.


text:
Eastern Forest Environmental Threat Assessment Center
Advances in Threat Assessment Report
Forest Health Monitoring Annual National Reports
Forest ThreatNet News Updates
Kid-Friendly Zone
Federal, State, and Tribal agencies and institutions
Non-governmental and international organizations and private companies
Research Unit Description
Home » About Us » Who We Are » Asheville Team » Asheville Team Bios » Biography of Bjorn Brooks
Biography of Bjorn Brooks
Bjorn Brooks is an ORISE Fellow at the Eastern Threat Center. He is a computational scientist that specializes in applying scientific computing to geoscience applications, environmental monitoring and prediction. His current work involves investigating ecosystem dynamics through the application of information theory to land surface phenology. His work is examining new ways to use satellite remote sensing to understand the capacities of vegetated ecosystems to endure disturbances of different kinds. From 2013 to 2014, Dr. Brooks worked as a research associate and faculty member at Saint Francis Xavier University in Nova Scotia. From 2009-2013 he completed postdocs at the University of Wisconsin and University of Illinois. He holds a PhD in geology and BS in biology from Iowa State University, and an MSc from the University of Bristol, England.
Learn more about Bjorn Brooks' work:
LanDAT: Landscape Dynamics Assessment Tools
Bjorn Brooks' personal website
Contact Bjorn Brooks at bjorn-gustaf.brooks@usda.gov or (828) 257-4850.
Powered by SREF
Updated 01/08/2020 08:44 AM


An "International Workshop on Above-Knee Fitting and Alignment Techniques" was held in Miami, Florida, May 15-19, 1987. Conceived and organized by A. Bennett Wilson, Jr. and Melvin L. Stills, CO., the workshop was supported and sponsored jointly by the International Society for Prosthetics and Orthotics and the Rehabilitation Research and Development Service of the Veteran's Administration. Hosting the workshop was the Prosthetics and Orthotics Education Program of the School of Health Sciences, Florida International University, and more specifically, Dr. Reba Anderson, Dean of Health Sciences and Ron Spiers, Director of Prosthetic Orthotic Education. Approximately 50 invited professionals attended the workshop, representing the United States, England, Scotland, Denmark, Sweden, Israel, the Netherlands, and Germany. Invited professionals included physicians, engineers, educators, and researchers, as well as prosthetic practitioners, all known to be active in the field of prosthetics.
The intent of the workshop was an organized sharing and discussion of information and experiences relative to the management of above-knee amputees. Above-knee socket design variables, specifically the accepted and established quadrilateral design and the newer ischial-con-tainment designs known by various acronyms (CAT-CAM, NSNA, Narrow M-L), were discussed in great detail. Goals were to determine differences/similarities, advantages/disadvan-tages, indications/contraindications, as well as to develop recommendations for future action with respect to the various socket designs. While many prosthetists and/or clinics may have considerable experience with the newer above-knee socket designs within the United States, it is true that there are still many questions and concerns on the part of consumers, prescribing physicians, third party paying agencies, and educators in the U.S., as well as a great curiosity on the part of our international colleagues abroad.
After introductory remarks from Dr. Anderson, Dean of Health Sciences at Florida International University, Mr. John Hughes, President of ISPO, and Dr. Margaret Gianninni, Director of the Rehabilitation Research and Development Service of the Veteran's Administration, the program began with a presentation by A. Bennett Wilson entitled, "Recent Brief History of AK Fitting and Alignment Techniques." This paper began with the advent of the suction socket in the U.S. shortly after World War II and proceeded with the development of the total contact quadrilateral socket in the early 1960's. The audience was reminded that the total-contact quadrilateral socket, with or without suction suspension, was the socket design of choice from 1964 until very recently, when ischial-containment socket designs emerged. It was noted that, at present, the three senior prosthetic education programs in the U.S. (UCLA, Northwestern University, and New York University), in addition to teaching the application of the standard total contact quadrilateral socket, are offering special courses in what at first glance appear to be radical departures from the quadrilateral design. The technique at UCLA is known as CAT-CAM (Contoured Adducted Trochanteric-Con-trolled Alignment Method), based on work by John Sabolich, C.P.O., and inspired by Ivan A. Long, CP. The technique being presented at Northwestern University is said to be based more directly on the Ivan Long technique and is known as NSNA (Normal Shape-Normal Alignment). The technique taught at New York University is usually referred to as the narrow ML socket design based on a special tool designed by Daniel Shamp to facilitate casting. Mr. Wilson concluded his remarks by saying "unfortunately, none of these techniques has been subjected to an evaluation program independent of the development group, and a great deal of confusion exists among clinicians responsible for amputee care. I hope that this workshop can be helpful in clearing away some of the confusion, and point the way for action that will bring order to the present day practice of above-knee prosthetics."
The next speaker on the agenda was Charles Radcliffe, Professor of Mechanical Engineering at the University of California, Berkeley. Professor Radcliff's presentation was entitled, "Review of UCB Quadrilateral Socket and Alignment Theory." Having been a member of the Prosthetic Devices Research Project of UC Berkeley in the 50's and 60's, Professor Rad-cliff is still a strong proponent of the quadrilateral socket. He presented a detailed review of the history and development of the quadrilateral socket and summarized this section of his presentation with the following comments. "The net result of all of this work in the 1950-1963 period was a better understanding of the complex interrelationships between the functional capability of the amputee, the rehabilitation goals, the prosthetic components required in the prescription, the gait of the amputee, the biomechanical forces generated, the socket shape, and the alignment. The socket was no longer described as a cross-section shape at the ischial level, but rather a three-dimensional receptacle for the stump with contours at every level which could be justified on a sound biomechanical basis. ... It should be emphasized again that the quadrilateral type of fitting is not just a socket, it is a complete system which includes the amputee as a most important component. The socket is the interface between stump and prosthesis, and its primary functions are to provide for weight-bearing in the stance phase, allow the use of the stump and hip musculature to control motion and posture of the upper body in the stance phase (Fig. 1), and to provide for control of the prosthesis in the swing phase of walking."
The next section of Professor Radcliffe's presentation focused on biomechanical and alignment principles of a prosthesis with a quadrilateral socket. Here he related his feelings that many of the biomechanically related claims made by proponents of the newer non-quadrilateral socket designs are equally attainable in the quadrilateral socket if the original biomechanical principles are followed. "Regardless of the fitting method employed, the socket for any patient must provide the same overall functional characteristics, including comfortable weight-bearing, a narrow base gait, and as normal a swing phase as possible consistent with the residual function available to the amputee after amputation. It is possible to provide this with a quadrilateral socket and it is being done routinely in many facilities." Professor Radcliffe went on to say, "In most of the recent articles that I have read, statements have been made which indicate clearly that the author is comparing very poorly fitted quadrilateral sockets to the results obtained using the new technique. They show diagrams of typical fittings and gait deviations which can only be described as a complete list of horror stories describing what not to do in fitting a quadrilateral socket. Any prosthesis with the problems listed in these articles should never have been delivered. If the average pros-thetist in the United States is having the problems described by Long, Shamp, and Sabolich, then I must suggest that something is wrong with the methods being taught and used in daily practice. I am aware that the schools have made significant changes in the way that the principles are taught, with each school emphasizing different aspects of the problem. I suspect that there may have been a shift away from the fundamentals of teaching of overall objectives, including the interrelationships of amputee evaluation, components prescribed, biomechanics, and why sockets are fitted with particular contours."
Following Professor Radcliffe was Tim Staats, Director of the UCLA Prosthetics Education Program. Mr. Staats' presentation was on the "UCLA CAT-CAM." UCLA began teaching CAT-CAM above-knee prosthetics with a pilot course in March 1985, which included both John Sabolich and Tom Guth as course instructors. Mr. Staats made it clear that the UCLA CAT-CAM philosophy of 1987 has departed from that of Sabolich, Guth, et al. and that the UCLA philosophy has now evolved to the point where a third edition of a teaching manual was published in March, 1987. To quote Mr. Staats as he spoke about this new manual, "the third edition of the UCLA CAT-CAM Above-Knee Prosthesis teaching manual integrates much additional material, covering the anatomy/socket relationship and how this is best achieved—material not yet fully understood and synthesized at the time of preparation of the previous edition. The UCLA CAT-CAM above-knee socket is a variation of the CAT-CAM design developed by John Sabolich, C.P.O., and Tom Guth, CP., and the NSNA AK prosthesis of Ivan Long, CP. Through countless hours of literature search, discussion, and intensive training given in this and nine foreign countries, and through the results of over 200 students who have fabricated and fit over 1,000 sockets under the guidance of our staff, a new insight has been developed. Our staff has refined the techniques of measurement, casting, and model modification to the point where it is a clearly teachable and viable above-knee fitting method. It is with great respect that we continue to recognize the published contributions of John Sabolich, C.P.O., Tom Guth, CP., and Ivan Long, CP., to the development and evolution of the UCLA technique. We would hope that this manual captures, blends, and enhances their philosophies. We recognize that our technique and CAT-CAM evolved from NSNA and we hope that these professionals can appreciate our efforts to refine and further evolve their clinical approach into a methodical step-by-step teaching manual."
At this point I will briefly review the highlights of the UCLA CAT-CAM sequence, beginning with patient evaluation and measurement and proceeding through model modification and bench alignment. For the details, I suggest referencing the third edition of the UCLA manual.
The wrap cast is taken with the patient in a standing position, and all shaping of the cast is accomplished by hand molding. The goal is good definition and containment of the medial and posterior aspects of the ischial tuberosity and ischial ramus within the wrap cast and subsequent socket, as well as allowance for the pubic ramus to exit the socket near the midline of the medial wall (Fig. 6).
Anteriorly, just proximal to the inguinal crease. The anterolateral brim must clear the superior iliac spine when the patient is sitting.
Laterally, the brim extends approximately 3" above the trochanter. The final height of this wall will be determined during fitting.
Posteriorly, the trim line should begin at least 1" above the level of the inferior border of the ischial tuberosity. The curve that defines the posterior to lateral trim line normally begins at a point between the lateral third and the midline of the socket ML dimension at ischial level.
The medial proximal brim will be "V" shaped, with the vortex of the "V" located at the point where the pubic ramus crosses the medial wall. This trim line projects upward from the vortex, posteriorly to encapsulate the medial aspect of the ischial ramus and tuberosity. (Fig. 6) A circumference reduction chart is used to attain suction suspension. The values used in this chart are slightly less than those normally used in quadrilateral suction sockets.
Posteriorly, bisect the socket at the level of the soft tissue ML, this reference line should fall as a plumb line to the center of the heel.
Laterally, bisect the socket AP dimension at ischial level, this reference line should fall as a plumb line between 0" and 1" anterior to the foot bolt.
Socket is set in measured adduction, and measured flexion plus 5°.
The distal aspect of the medial wall should be on the line of progression.
The knee bolt is externally rotated 5°.
The top of the foot, as well as the prosthetic shank should lean medially 4°, or alternatively, the socket is hyper-ad-ducted 4° beyond measured adduction with the foot parallel to the floor and the shank perpendicular to the floor.
The UCLA CAT-CAM can be fabricated using rigid socket or flexible socket techniques. If a flexible socket or brim system is desired, the proximal medial trimline in the ischial area must be more aggressive during casting to allow for the linear shrinkage factor known in most thermoplastics.
A final comment: the manual reflects the accumulated experience of the UCLA staff and includes a section on problem solving the difficulties that might be experienced in the CAT-CAM socket.
Next to speak was Gunther Gehl, CP., Director of Prosthetic Education at Northwestern University in Chicago. Northwestern has been teaching the NSNA AK techniques of Ivan Long for several years now, and it was Mr. Gehl's task to report to the workshop on NSNA and Long's Line. He said that he and his staff taught NSNA as presented by Ivan Long with no changes. Ivan has been fitting Long's Line, now known as NSNA, for more than 12 years, and his approach has been consistent, with few changes. Perhaps changing the name from Long's Line to NSNA in July, 1985 is the most significant change. Mr. Long has published three technical papers describing his technique: "Allowing Normal Adduction of the Femur in Above Knee Amputees," (Orthotics and Prosthetics, December, 1975); "Fabricating the Long's Line Above Knee Prosthesis," (1981); and as a reprint of the Long's Line article with new title, "Normal Shape-Normal Alignment (NSNA) Above Knee Prosthesis," (Clinical Prosthetics and Orthotics, Fall, 1985). These articles were the basis for Gunther Gehl's presentation to the International Workshop.
I will attempt to review and highlight the NSNA philosophy as I did the UCLA CAT-CAM. Again, within the limitations of this report, this will only be an overview. With the widespread availability of Ivan's publications, it does not seem necessary to go into details.
NSNA is less detailed regarding evaluation and measurements, placing great emphasis on the wrap cast, subsequent model modification, and alignment, all based on Long's Line, which is defined as a straight line, starting approximately at the center of a narrow socket, passing through the distal femur, and on down to the center of the heel (Fig. 7). Long's Line is not always vertical because it shifts constantly when the amputee goes from a standing position to a walking position.
The wrap cast is taken with the patient in a standing position. The important points about the wrap cast procedure are identification of the ischium and proper alignment. The hand will be held to indicate the medial and posterior surface of the ischium, but not forward of the ischium. The amputee then adducts as tightly as possible and extends his thigh to tighten the hamstrings. At this point a lateral reference line is established.
The resultant cast model is oversized and will require considerable modification. Practically all modification will take place on the lateral wall. Following is a brief description of modification goals and resultant trimlines, taken from Mr. Gehl's presentation and from Mr. Long's publications.
The lateral wall is to be shaped to give support over a wide area, and particularly the lateral-posterior aspect of the socket.
The medial wall will be lower than seat level, and the wrap cast will be the guideline as to how low.
Depth of the socket will be the same as the measured length of the thigh.
The seat will be at a right angle to Long's Line.
Long's Line is drawn from the center of the seat level ML to the center of the distal femur. The distal femur will be very close to the lateral surface, probably only covered by skin.
The top 1" of the medial wall will flare outward at 45°.
The lateral wall extends above the trochanter.
The ischium will bear on the flare of the socket, both medially and posteriorly.
The cast is taken down in the ML as though the trochanter does not exist. In order to achieve the desired ML, many casts will be reduced 2" or more. The desired ML dimension is taken from Ivan's chart of ML values related to the thigh circumference just below the ischium (Fig. 8).
Circumference reductions for suction suspension begin at 1" of tension proximally, reducing to 3/4", then 1/2", with the remaining tensions at 1/4".
Mr. Long does not advocate use of an alignment device. Bench alignment is critical and is based on Long's Line. The center of the lateral wall is marked at seat level for TKA and the vertical reference line established during casting should parallel the TKA line. Long's Line is marked on the posterior of the socket. For the male, the socket is mounted with the inner aspect of the medial wall (which follows the pubic ramus angle) in 30° internal rotation to the line of progression (the outer edge of the medial trimline is on the line of progression), and with the knee bolt axis 4° higher on the lateral side. This is the same as adding 4° additional adduction to Long's Line. For the female, the socket is mounted with the inner aspect of the medial wall in 40-45° internal rotation to the line of progression (again, the outer edge of the medial trimline is on the line of progression), and with the knee bolt axis 7° higher on the lateral side (Fig. 9). Mr. Long emphasizes that it is not necessary to change the alignment. When the amputee is allowed time to adjust to the new prosthesis, then alignment changes will not be necessary.
Following Gunther Gehl was Daniel Shamp, C.P.O., presenting, "The Shamp Brim, For the Narrow ML Above-Knee Prosthetic Socket." Mr. Shamp's system of brim casting and evaluation is currently the content of a special short course offered by New York University's Prosthetic and Orthotic Education Program.
Long and Sabolich, as well as UCLA, advocate that the hand casting technique is the most successful in their experience with the narrow ML, wide AP, or ischial-containment socket for above-knee amputees. In response, Mr. Shamp stated, "Experience with the Shamp Brim system has proven to make the procedure more uniformly successful and more easily learned and applied by the practitioner who has spent years working with the brim method for quadrilateral socket casting and modification." Mr. Shamp went on to present detailed biomechanical rationale for the narrow ML socket. Biomechanical descriptions such as bony lock on the ischium, ischial containment within the socket, retention of normal adduction, etc., are consistently relevant to Mr. Shamp's socket system, as well as all of the latest ischial-containment socket designs. Two noticeably different aspects of Mr. Shamp's technique are (1) the brim forming system itself, which allows for evaluation of brim design under weight bearing conditions before proceeding with the wrap cast, and (2) what Mr. Shamp refers to as centralization of the femur. To accomplish centralization of the femur, during the casting procedure, the prosthetist pulls the distal medial tissue in a lateral direction while stabilizing the femur with the other hand by means of a 45° force against the lateral shaft of the femur (Fig. 10). Mr. Shamp stated that this centralization procedure is essential to prevent a large medial-distal bulge with resultant cosmetic problems when the femur is maintained in a position of maximum adduction in the AK prosthesis.
Again, I will present an overview of the Shamp Narrow ML technique, summarizing from Mr. Shamp's presentation and from the "Manual for use of The Shamp Brim," which was provided for the workshop attendees. This manual was produced by Prosthetic Consultants, Incorporated of Akron, Ohio in cooperation with the Department of Prosthetics and Orthotics, New York University Post-Graduate Medical School, and is published by the Ohio Willow Wood Company.
Distal Ischial Tuberosity (DIT): firm ML measurement of the anatomy taken 1" to 2" distal to the ischial tuberosity (Fig. 11).
Oblique ML (OB): firm ML measurement taken from the medial side of the ramus of the tuberosity to a point just superior to the greater trochanter of the femur (Fig. 12).
Ischial Tuberosity ML (IT): firm ML measurement taken from the medial border of the ramus of the ischial tuberosity to the subtrochanteric area of the femur (Fig. 13).
The Shamp Brim, which is compatible with the Berkley brim stand, is now set up and adjusted to the patient's measurements. As stated earlier, the brim allows for weight-bearing evaluation of the patient with regard to socket design before the actual wrap cast is taken.
As with all of the ischial-containment socket designs discussed at the Workshop, the location of the ischial tuberosity in the socket is essential to both a comfortable fit and a stable femur in maximum adduction. For the Shamp technique, the ideal location is 1/2" inside the medial-proximal wall of the prosthesis and indicates the area referred to as the IT ML measurement. The medial wall has a 45° angle that assists the wedge effect in stabilizing the femur and so the location of the tuberosity on this slope is important. The trimlines are similar to both NSNA and the UCLA CAT-CAM, including the low anterior wall with clearance for the ASIS, the relatively horizontal posterior wall, and the high lateral wall, which extends generously above the trochanter. Although, not as exaggerated as the UCLA CAT-CAM, the medial wall is lowered as it approaches the anterior wall, allowing for the pubic ramus to pass from within the socket.
Alignment follows generally accepted quadrilateral alignment principles for TKA and knee bolt external rotation. For alignment in the frontal plane (posterior view, ML plane), Mr. Shamp advocates the principles of Long's Line.
Dr. Hans Lehneis, C.P.O., of the Rusk Institute of Rehabilitation Medicine was the next speaker and his presentation covered work done at the Rusk Institute and the New York Veterans Administration. Dr. Lehneis and associates are investigating anatomical, physiological, and biomechanical characteristics of geriatric above-knee amputees in an attempt to develop a set of design criteria for geriatric above-knee sockets. As this project is still in the developmental stages, I will not elaborate on this subject.
Following Dr. Lehneis was Ossür Kris-tinsson of Iceland. As the developer of the flexible socket-rigid frame system, he was the first to speak on flexible sockets. Mr. Kris-tinsson reported that he was continuing development of flexible sockets, including walls and brims. He is conducting an extensive materials search in hopes of finding the materials that will make possible the ultimate flexible socket design.
Mr. Kristinsson went on to say that we need some simple definition of flexible socket characteristics. "To label a socket as flexible, I would say that you should be able to deform it by your hands, and the material should not be elastic enough to stretch under the loads it will be subjected to." Concerning flexible socket design, Mr. Kristinsson stated, "When designing a flexible socket system, the most critical aspect for the comfort of the wearer is how the frame is designed. It has to be capable of supporting the flexible socket, preventing permanent deformation, and the socket-frame combination has to be structurally strong and stable enough to counteract the reaction forces." Mr. Kristinsson made a final, important point: "There may be doubt among professionals and users about the value of the flexible wall. I am, however, totally convinced that the flexible socket is here to stay. If anything, I think it will get more flexible as we gain access to more suitable materials than we are using today, and some obstacles on the way to proper understanding of the socket-stump interaction are overcome."
The flexible socket is fabricated with polyethylene, which has a known shrinkage factor.
The desired wall thickness of the flexible socket is 60/1000".
Lateral distal support for the femur is not provided for by the frame.
Note the mention of stabilization of the distal femur laterally; this is provided for by the frame design of the Scandinavian Flexible Socket. Mr. Pritham went on to say, "It will be appreciated that the design is actually not fundamentally different, flexible walls aside, from a similarly designed socket in the rigid walls. Indeed one of the factors that undoubtedly hastened its acceptance was the fact that previously learned methods of casting and fitting quadrilateral sockets were fully acceptable when fitting a flexible walled socket. While the advantages cited are formulated with the quadrilateral socket in mind, there is no reason to suspect that they are significantly different from non-quadrilateral above-knee sockets. Indeed, flexibility is often considered by the designers of one another of the various designs as an integral factor in their success."
Suspension is not a factor.
While the use of flexible wall sockets has been well accepted, Mr. Pritham pointed out that questions have arisen in at least three areas.
Both Surlyn® and low density polyethylene (in a variety of types and name brands) have been used successfully and each has its advocates. Mr. Pritham and colleagues at Durr Fillauer prefer Surlyn® for three reasons: clarity, no shrinkage, and ease of rolling the edge.
At least three different configurations have been described for quadrilateral sockets. The differences center on the lateral wall and the amount of support considered necessary for the femur.
A variety of designs have been put forth in order to achieve specific features in non-quadrilateral sockets, including the well known total flexible brim.
Mr. Pritham concluded his presentation by saying, "the crucial point would seem to be that flexibility is independent of socket shape and can be modified to provide specific design features in a socket-frame system. The specific configuration depends upon the prosthetist's experience and fitting philosophy and the needs of the individual patient."
Rounding out the first day of presentations was Dr. Robin Redhead, Senior Medical Officer at the Roehampton Limb Fitting Centre in London. Dr. Redhead's paper was entitled "Experience With Total Surface Bearing Sockets." This presentation centered more on weight-bearing distribution and biomechanics than on socket design or shapes. Dr. Redhead and associates maintain that regardless of socket shape or design, well distributed weight-bearing can eliminate the need for single point, bony weight bearing (such as ischial weight-bearing). This system of well distributed weight-bearing was referred to as a total-surface-bearing socket. It infers a hydrostatic type of socket fit utilizing the incom-pressibility of the fluids in an above-knee residual limb.
This presentation brought a reaction from of Professor Radcliffe, who doesn't agree with the hydrostatic concept of weight-bearing in prosthetics. He stated that "you need a closed system for hydrostatics and the AK residual limb is not a closed fluid system. With an open fluid system, the fluids are pushed out."
There was considerable discussion on this topic, both pro and con, and it was never resolved.
Beginning the morning of the second day, John Sabolich, C.P.O., from Oklahoma City, and Glenn Hutnick, CP., from New York, presented another view of CAT-CAM. As stated earlier, Tim Staats, C.P.O. reported that the UCLA CAT-CAM is evolving independently of the CAT-CAM technique of the original developers.
Sabolich and Hutnick report that the original CAT-CAM is continuing to evolve and develop. Sabolich stated that, "it took five to six years to develop the current medial wall design, which has become increasingly more aggressive in enclosing and capturing the ischial ramus." They advocate use of the total flexible brim. "The key is the flexible brim system—it is totally flexible in the proximal area, where most patients complain." Aside from 100% use of the total flexible brim, the Sabolich/Guth CAT-CAM differs from NSNA and the UCLA CAT-CAM by not advocating the 4° to 7° medial lean of the foot, pylon, and knee bolt in bench alignment as proposed by Long and UCLA. John Sabolich went on to say "this additional adduction or tilting of the knee bolt is a cover-up for lost stability due to inadequate ischial containment." Mr. Long's response was that this was incorrect. Probably the most noticeable aspect of design that separates the Sabolich/Guth CAT-CAM apart from the other recent ischial-containment designs is the earlier mentioned aggressive capture of the ischial tuberosity and ramus. Sabolich claimed that they are enclosing more and more of the ischial ramus, as much as possible and still allow pubic ramus comfort. This ramus enclosure provides two biomechanical functions: (1) a medial bony stop for ML stability, and (2) rotational control, especially on soft fleshy residual limbs. Other than these departures, the Sabolich/Guth CAT-CAM differs very little from the UCLA CAT-CAM, especially in terms of brim shape, trimlines, and biomechanics. Sabolich, unlike Long, does advocate the use of dynamic alignment devices.
At this point in the Workshop, Professor Radcliffe returned to the podium in an attempt to present and clarify the comparative biomechanical principles of both quadrilateral and ischial-containment sockets. The following biomechanical analyses are taken from Professor Radcliffe's discussion and from the paper he later submitted reviewing his presentations.
"It has been demonstrated that pressure against the medial aspect of the pubic ramus can be used to supplement the weight-bearing on the tuberosity of the ischium and contribute to medial stabilization in the upper one-third of the above-knee socket. In taking advantage of the weight-bearing potential on the medial aspect of the ramus, the prosthetist is creating a situation much like weight-bearing on the seat of a racing bicycle. To prevent the ramus from sliding laterally and downward into the socket, the prosthetist must exaggerate the counterpres-sure from the lateral side. This has been done by a reduction in the M-L dimension particularly in the area just distal to the head of the trochanter. The soft tissue must be accommodated. Therefore, the A-P dimension is correspondingly increased as compared to the quadrilateral socket. As compared to the quadrilateral fitting, the height of the anterior brim is typically lowered and flared and the gluteal area is filled in and fitted higher as a result of the ischium being encased deeper into the socket."
"The medial brim of the socket must slope forward and downward to the point where the pubic ramus crosses the medial brim and emerges from the socket. The ischial ramus clearly is capable of providing medial counter-pressure which supplements the medial pressure on the adductor musculature. Since the socket slopes downward and inward along the entire medial brim, this contour is flared into the medial wall of the socket, which gives the impression of exaggeration of the medial coun-terpressure in the upper one-third of the socket."
"The adduction of the socket and the use of lateral stabilization should not differ from that achieved by a properly fitted quadrilateral socket. There is an apparent exaggeration of the modification of the lateral wall, but this is primarily limited to the area just below the trochanter where the M-L dimension has been reduced to insure that the encased pubic ramus and ischium are maintained in the desired position on the medial brim. The exaggeration of the medial flare and reduction of the M-L dimension in the upper third of the socket leads to the impression of a greater angle of femur adduction, but the actual angle of the femur should be similar in both types of fittings if the quadrilateral socket is properly fitted and aligned."
"Long's Line as proposed by Ivan Long is the anatomical axis of the lower extremity as described in anatomy textbooks. Placing the fe-mural stump in an advantageous position for normal use of the hip musculature by adduction and flexion of the socket has been a part of good prosthetic practice for at least 40 years in the United States and perhaps longer in certain European centers. Mr. Long's Line appears to be most useful in the cast taking procedure and subsequent modifications of the model rather than have any fundamental bearing on the alignment of the prosthesis. It appears to offer no new concepts useful in the bench or dynamic alignment of the prosthesis."
Professor Radcliffe told the Workshop attendees that the use of "catchy names" should be avoided, and he therefore proposed the terminology of Ischial-Ramal weight-bearing socket, as well as Ischial-Gluteal weight-bearing socket.
Professor Radcliffe continued his biomechanical analysis by saying "The biomechanics of the ischial-ramal weight-bearing socket are similar to the ischial-gluteal weight-bearing quadrilateral socket. The major differences are in the manner in which the ischium is maintained in position within or on the brim of the socket. In each case, there must be vertical support with a combination of lateral and anterior counterpressure to maintain the ischium in position" . . . "Some of the socket shape diagrams I have seen published are so crude and inaccurate as to be almost meaningless. The level of the cross section shown is often not indicated and a section at ischial level is sometimes compared to a section which is obviously higher or lower." Professor Radcliffe then sketched on the blackboard what he believed to be a more accurate comparison with emphasis on the three-dimensional shape both above and below the level of the tuberosity of the ischium. In each case, he showed a cross section of the socket at, (1) ischial level with the medial wall projected upward to this level; and (2) the outline of the highest points on the brim (Fig. 14 and Fig. 15).
This concluded all presentations of current fitting techniques. The remaining presentations were concerned with evaluation techniques. Bo Klasson of Een-Holmgren Company in Sweden presented on "Socket Fit With Reference to Soft Tissue Force Transmission." Briefly, Mr. Klasson's theory is that we should attempt to design sockets with physical characteristics that match the physical characteristics of the residual limb. In other words, where the tissues of the residual limb are firm, so should the matching area of the socket material be; where the tissues are soft and flexible, so should the socket be. Mr. Klasson refers to this as "surface matching."
The next speaker was Professor George Murdoch of Dundee, Scotland, presenting "A Method for the Description of the Amputation Stump." Professor Murdoch's paper was based on his premise that there is a need for an international classification system for residual limbs to be developed in order to compare one publication with another, one patient with another, one fitting technique with another.
The final presentation was made by A. Bennett Wilson on "Physiological Monitoring Equipment in Evaluation of Lower Limb Prosthetic Components and Techniques." He reported on a system of physiological monitoring originally developed by MacGregor of the University of Strathclyde in the 1970's. Recently modified for use by the University of Virginia Division of Prosthetics and Orthotics, this system consists of a compact tape recording component worn on a waist belt that records electronically, step count, walking velocity, standing versus sitting, and heart rate, plotted against time up to 24 hours. The tapes are then analyzed by a special micro-computer program, which subsequently prints the information in digital and graphic format.
Under some circumstances the heart rate data can be useful in providing an energy index, but probably more importantly, the step count, standing versus sitting, and velocity data provide specific information about the activity of the subject. Mr. Wilson and colleagues have recently developed a solid state device which is less costly and more reliable. The new system has 17 information gathering channels. Mr. Wilson concluded by saying, "At this point, we do not have sufficient experience to know how many subjects have to be monitored and how much data is needed to show significant differences, but it certainly appears that at last we have a breakthrough in instrumentation for evaluation of prosthetic devices and other treatments involving the function of the musculoskeletal system.
What is the role of flexible walls?
This first group of panels reported back on Sunday morning. The reports were quite consistent among the different panels. A synopsis of these reports will be presented in concluding this report.
On Monday, new panels were formed to re-study the rationale for and possibly develop protocol for evaluation. The reports from this second group of panels was heard in plenary session on Tuesday morning.
The meeting was adjourned Tuesday, May 19, 1987 at noon.
What follows here is a synopsis of the conclusions and recommendations of the panel reports.
All participants agreed there is great need for improved flexible materials.
The panels' conclusions and recommendations were remarkably consistent. Most consistent was the recommendation for improved terminology, lumping what I have referred to as ischial containment into a single, workable term. Suggestions ranged from "Narrow ML" to Ischial/ Ramus Containment (IRC) and Non-Ischial Containment (Non-IRC). Due to time constraints, arguments about this recommendation were never resolved. It is hoped that all recommendations can be addressed in a future workshop or through some other form of action.
There was unanimous agreement for formal evaluation of the newer above-knee techniques (NSNA, CAT-CAM, Shamp Narrow ML) as well as evaluation of implications of the inferiority of the quadrilateral technique.
A program for scientific/laboratory evaluation should be set up at a center or multiple centers, depending upon resources. This study might include: cinematography, force plate, motion analysis, gait mat and other "gait lab" studies as well as radiographical data on alignment and containment, physiological data, residual limb/socket force analysis, and/or any other relevant laboratory studies.
A program of clinical evaluation, based on previous fittings and continuing fittings in clinics already utilizing new fitting techniques. This would be a more subjective study, and would require a greater effort for coordination and pooling of data.
Complete manuals should be developed for each individual technique, unless the developers can find it mutually agreeable to work together and blend the new techniques. The panels found the latter option to be most desirable.
Evaluation should be independent of the developers.
Any evaluation needs to be coordinated by an authoritative group. ISPO and/or the U.S. Veterans Administration were recommended. The American Academy of Ortho-tists and Prosthetists should also be involved.
Possible funding sources within the states include the Veterans Administration and the National Institute on Disability and Rehabilitation Research (NIDRR).
The post-graduate, specialized courses for experienced practitioners appear to be most appropriate for teaching these newer techniques at this time. Incorporation into entry level education programs should follow as well written, experience based manuals are developed. Any teaching course should include "hands-on", patient contact, fitting, and management as part of the curriculum.
The application of these new techniques, while certainly not as widespread and accepted as the quadrilateral technique, or even the flexible socket technique, is occurring at this time. Growing acceptance and application will most certainly follow. It is hoped that this workshop, as well as future workshops, will aid in safe and proper application of these and future advances and developments in prosthetics.
UCLA AK Teaching Manual, 1977-1978.
UCLA CAT-CAM Above Knee Prosthesis, Teaching Manual, Third Edition, March 1987.
Fabricating The Long's Line Above-Knee Prosthesis, by Ivan long, 1981.
Manual for use of THE SHAMP BRIM for the Narrow ML Above-Knee Prosthetic Socket, The Ohio Willowwood Co., 1987.
By Charles Radcliffe. Re-drawn by A. Bennett Wilson, Jr.


text:
Q: Returned gameScore Parse.Object object from Parse.Query.get documentation gives undefined gameScore object Directly from Parse.com javascript guide:
var GameScore = Parse.Object.extend("GameScore");
var query = new Parse.Query(GameScore);
query.get("xWMyZ4YEGZ", {
  success: function(gameScore) {
    // The object was retrieved successfully.
  },
  error: function(object, error) {
    // The object was not retrieved successfully.
    // error is a Parse.Error with an error code and message.
  }
});

var score = gameScore.get("score");
var playerName = gameScore.get("playerName");
var cheatMode = gameScore.get("cheatMode");

Basically gives Uncaught ReferenceError: gameScore is not defined...
Here is my code to troubleshoot this:
// Retrieve class
var GameScore = Parse.Object.extend("GameScore"); //redefine the GameScore class based on the cloud.
var query = new Parse.Query(GameScore);
var my_object;
var some_object = query.get("SQV1DZXv5p", {
    success: function(gameScore) { //gameScore is the retrieved object.
        alert('Object retrieved, with object ID: ' + gameScore.id);
        //document.getElementById('division1').innerHTML = gameScore.id;
        my_object = gameScore.id;

    },
    error: function(object, error) {
        alert('Retrieval FAILURE, error: ' + error.message + '; Object retrieved instead is: ' + object); //object will be NULL if not found.
    }
});

var score = gameScore;
document.getElementById('division1').innerHTML = my_object;

So this still throws the reference error for gameScore.
Also, the document.getELementById statement does not print the gameScore.id in my division1 div. It remains empty. But when I check to see what my_object is in the javascript console, it returns the gameScore.id correctly.
What's interesting is if I run the document.getELementById line inside the success function, then it will display the gameScore.id...

A: Do this:
var GameScore = Parse.Object.extend("GameScore");
var query = new Parse.Query(GameScore);
query.get("xWMyZ4YEGZ", {
  success: function(gameScore) {
    // The object was retrieved successfully.
    var score = gameScore.get("score");
    var playerName = gameScore.get("playerName");
    var cheatMode = gameScore.get("cheatMode");
  },
  error: function(object, error) {
    // The object was not retrieved successfully.
    // error is a Parse.Error with an error code and message.
  }
});

gameScore is only be available in the scope of the success block, hence the Uncaught ReferenceError. The world outside the success block does not know it exists. Do your stuff in there.
Also, .get() makes a request from the server, so it would take time to complete. Performing operations gameScore after the .get() method will result in accessing that object when it has not been fetched yet, hence another error. See @danh's comment below. For network calls like this, always perform actions on the fetched object inside the completion block.

redpajama_set_name: RedPajamaStackExchange


Helping parents raise good people.
In the book, Come On People: On the Path from Victims to Victors the authors Bill Cosby and Alvin F. Poussaint have a powerful message for families and communities as they lay out their visions for strengthening America, or for that matter the world.
They address the crises of people who are stuck because of feelings of low self-esteem, abandonment, anger, fearfulness, sadness, and feelings of being used, undefended and unprotected. These feelings often impede their ability to move forward. The authors aim to help empower people make the daunting transition from victims to victors. Come On, People! is always engaging, and loaded with heart-piercing stories of the problems facing many communities.
The issues the authors bring to light in this book are not exaggerated. But the problems to a much lesser degree are not limited to this community. Children simply exist and do not reach their potential in even the most affluent communities. The deciding factor seems of how successful a child turns out seems to revolve around how much the family and community care about the child. By success, I don't mean to limit the discussion to grades or future earnings, but contentment and self-esteem to believe they can do anything they set their minds to.
If we want to improve the success of today's youth we can take the approach of bringing back front porches; literally and figuratively. It's a metaphor for people to watch out for their community and to know that each of us is known and accountable for our actions.
It does take a village to raise a child.


text:
The timescale of perceptual evidence integration can be adapted to the environment
Ossmy, O. and Moran, R. and Pfeffer, T. and Tsetsos, Konstantinos and Usher, Marius and Donner, T.H. (2013) The timescale of perceptual evidence integration can be adapted to the environment. Current Biology 23 (11), pp. 981-986. ISSN 0960-9822.
Official URL: http://dx.doi.org/10.1016/j.cub.2013.04.039
A key computation underlying perceptual decisions is the temporal integration of "evidence" in favor of different states of the world. Studies from psychology and neuroscience have shown that observers integrate multiple samples of noisy perceptual evidence over time toward a decision [1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11]. An influential model posits perfect evidence integration (i.e., without forgetting), enabling optimal decisions based on stationary evidence [2, 3 and 12]. However, in real-life environments, the perceptual evidence typically changes continuously. We used a computational model to show that, under such conditions, performance can be improved by means of leaky (forgetful) integration, if the integration timescale is adapted toward the predominant signal duration. We then tested whether human observers employ such an adaptive integration process. Observers had to detect visual luminance "signals" of variable strength, duration, and onset latency, embedded within longer streams of noise. Different sessions entailed predominantly short or long signals. The rate of performance improvement as a function of signal duration indicated that observers indeed changed their integration timescale with the predominant signal duration, in accordance with the adaptive integration account. Our findings establish that leaky integration of perceptual evidence is flexible and that cognitive control mechanisms can exploit this flexibility for optimizing the decision process.
School of Science > Psychological Sciences


Ningbo Accor Bearing Company is one of leading bearing exporters & manufacturers in China. Starting since 1997, from a sales department of Ningbo Free Trade Zone Hengda Bearing Company, Currently ACCOR has become a well-known and respected supplier of a wide variety of bearings throughout the world!
We attended the PTC 2018 Shanghai, booth No.: E2 C6-1 and warmly appreciate all your visitings. Great talk and great business opportunities there.
© 2016 NINGBO ACCOR BEARING CO., LTD.


text:
Takata Recall
START YOUR ENGINE
Discover the Ferrari Line Up
FEEL THE DREAM
First day at Ferrari for Carlos
Yesterday, Friday, Carlos Sainz paid his first visit to Maranello. Next year, his seventh in Formula 1, the 26 year old will join Charles Leclerc at Scuderia Ferrari Mission Winnow to form the youngest pairing for the Prancing Horse since 1968.
FERRARI 488 GT MODIFICATA - GREATER POWER FOR A TRACK ICON
Ferrari presents the new 488 GT Modificata, a limited edition car that incorporates the technology developed for the 488 GT3 and 488 GTE, transcending the limits imposed by technical and sporting regulations to exploit its full potential.
Pure emotion
With the new SF90 Spider, Ferrari is taking driving emotion to a completely new, positively stratospheric, level.
Chief Executive Officer Louis Camilleri Retires for Personal Reasons; Executive Chairman John Elkann acting Chief Executive Officer
Ferrari N.V. (NYSE/MTA: RACE) ("Ferrari" or "the Company") announces that Mr. Louis Camilleri communicated today to the Company his decision, for personal reasons, to retire with immediate effect from his role as the Company's Chief Executive Officer and as member of the Board of Directors.
to relive the most precious moments with us
DISCOVER IT NOW
Competition and elegance
Two approaches that interweave into a single passion
Urgent Takata Airbag Recall
XX Programmes
Privacy Section


As any avid traveller will let on, the best way to explore any city is always on foot, as you take in the sights, sounds, scents, and scenery first-hand. And a guided walking tour is the perfect way to absorb as much as you can by seeing everything up close. If you're visiting Cyprus from abroad, or simply wish to familiarize yourselves with places you may not be so well acquainted with, there are some great organized tours that you can join!
All walking tours are free of charge and guided by an expert tour guide. All tours take place in English although some tours do offer other language options, including German, Russian, Finnish and Swedish. The tours last between 2 to 3 hours approximately, and while you can enjoy regular breaks, visitors are advised to wear comfortable walking shoes, light clothes and sun protection. Where to head to? My Cyprus Insider gives you the lowdown on some of the best tours on the island!
This walking tour gives you the chance to get better acquainted with the city's history, leading you past key landmarks in the old town and providing a glimpse of the Venetian walls. You'll also have the chance to visit workshops and shops in the traditional Laiki Yitonia where craftsmen such as candle makers, blacksmiths, chair-makers, cobblers, coppersmiths and tailors remain true to their traditional crafts.
Mainly because of grants from the EU, along with government and private funding, the old city of Nicosia has seen many its abandoned buildings restored and newer ones built in a style compatible with the architecture of the inner city. Along with street revamps, the areas of Kaimakli and Pallouriotissa are now are a great sight in their own right. Take this tour and you'll visit workshops, churches and quaint neighbourhoods, taking in architecture that reflects the old traditional style of the capital.
The main archaeological museum on the island, the Cyprus Museum traces the long history of civilization on the island from prehistoric times to the early Christian period. And you'll catch a glimpse of pottery, jewelry, sculpture and coins from the Neolithic period to the Bronze Age, Iron Age and the Greco-Roman period, cherished and displayed for everyone to enjoy. Star exhibits include the statue of Aphrodite of Soloi, a gold jewelry collection and relics from the royal tombs of Salamis. Do keep in mind that while the tour is free, museum fees still apply.
This walk provides a great overview of the history and development of Larnaca, looking at the role that the sea has played throughout the centuries. You'll visit workshops and get to see craftsmen at work, giving you a flavour of Larnaca today and yesterday. Marvel at the old colonial architecture and then head down the Finikoudes palm tree promenade before stepping into the old market. The guided tour will also be giving you the chance to ogle at one of the most important Byzantine monuments surviving in Cyprus: Saint Lazarus Church.
This walk explores the area of Scala (a colloquial name for Larnaca but now largely used to refer to a specific area in the city) and you'll be visiting workshops recently set up by young ceramic artists, many of whom have been inspired by ancient Cypriot art.
Although Limassol has morphed into an ultra-modern coastal city, this tour will take you deep into the past, as you'll get to meander through narrow streets to take in traditional workshops, unique architecture, the old market and some lovely traditional shops.
This walking tour takes visitors through the rich history of Paphos, with highly interesting sites to see including Saint Paul's Pillar, the Agia Solomoni Catacomb Church and the Tomb of the Kings; a large necropolis that stands as one of the most famous UNESCO World Heritage Sites on the island. The underground tombs – many of which date back to the 4th century BC – are carved out of solid rock, and are thought to have been the burial sites of Paphian aristocrats and high officials up to the third century A.D.