text:
#include <openautos.h>

const uint8_t TASKS_TOTAL = 7;

const TaskType task_rx = 1;
TASK(task_rx);
const TaskType task_farol = 2;
TASK(task_farol);
const TaskType task_seta = 3;
TASK(task_seta);
const TaskType task_volante = 4;
TASK(task_volante);
const TaskType task_velocidade = 5;
TASK(task_velocidade);
const TaskType task_sentido = 6;
TASK(task_sentido);
const TaskType task_init = 7;
TASK(task_init);

const ResourceType res_a = 1;

#define _XTAL_FREQ 64000000

void TASK_FUNC_IDLE() {
	while( TRUE ) {
#ifdef _XTAL_FREQ
		__delay_us(10);
#endif
		Schedule();
	}
}

void InitializeTasks() {
	InitializeTaskData( g_idle, TASK_ID_IDLE, 0, READY, TASK_FUNC_IDLE );
	InitializeTaskData( &g_tasks[0], task_rx, 3, SUSPENDED, TASK_FUNC_task_rx );
	InitializeTaskData( &g_tasks[1], task_farol, 2, SUSPENDED, TASK_FUNC_task_farol );
	InitializeTaskData( &g_tasks[2], task_seta, 2, SUSPENDED, TASK_FUNC_task_seta );
	InitializeTaskData( &g_tasks[3], task_volante, 2, SUSPENDED, TASK_FUNC_task_volante );
	InitializeTaskData( &g_tasks[4], task_velocidade, 2, SUSPENDED, TASK_FUNC_task_velocidade );
	InitializeTaskData( &g_tasks[5], task_sentido, 2, SUSPENDED, TASK_FUNC_task_sentido );
	InitializeTaskData( &g_tasks[6], task_init, 254, READY, TASK_FUNC_task_init );
	GroupTasksSamePriority();
}

ResourceDataType g_res[1];
void InititializeResources() {
	AddResourceDataToResources( &g_res[0], res_a, 255 );
}

asm("GLOBAL _TASK_FUNC_IDLE, _TASK_FUNC_task_rx, _TASK_FUNC_task_farol, _TASK_FUNC_task_seta, _TASK_FUNC_task_volante, _TASK_FUNC_task_velocidade, _TASK_FUNC_task_sentido, _TASK_FUNC_task_init" );
#include <stdint.h>
#include <xc.h>

typedef void (*callback_isr_t)(void);

///////////////////////////////////////////////////////////////////////////////
/// USART
///////////////////////////////////////////////////////////////////////////////
// TODO talvez trocar os buffers internos por ponteiros para buffers externos.
#define TX_BUFFER_MAX_SIZE 11
#define RX_BUFFER_MAX_SIZE 11

typedef enum {
    USART_SYNC_MODE_ASYNCHRONOUS = LOW,
    USART_SYNC_MODE_SYNCHRONOUS  = HIGH
} usart_sync_mode_t;

typedef enum {
    USART_9BIT_MODE_NOT_IMPLEMENTED = LOW
} usart_9bit_mode_t;

// Definição dos Baud Rates mais usados.
const uint32_t USART_BAUD_RATE_300    =    300ul;
const uint32_t USART_BAUD_RATE_484    =    484ul;
const uint32_t USART_BAUD_RATE_1200   =   1200ul;
const uint32_t USART_BAUD_RATE_2400   =   2400ul;
const uint32_t USART_BAUD_RATE_9600   =   9600ul;
const uint32_t USART_BAUD_RATE_10417  =  10417ul;
const uint32_t USART_BAUD_RATE_19200  =  19200ul;
const uint32_t USART_BAUD_RATE_57600  =  57600ul;
const uint32_t USART_BAUD_RATE_115200 = 115200ul;

/**
 * Inicia a comunicação por EUSART.
 *
 * @param usart_sync_mode Modo de sincronização desejado. Por hora, só tem Assincrono.
 * @param baud_rate Velocidade da transferencia. Existem constantes definidas com os valores mais comuns.
 * @todo Implementar modo sincrono!
 */
void usart_initialize( usart_sync_mode_t usart_sync_mode, uint32_t baud_rate );

/**
 * Transmite uma mensagem, utilizando interrupções.
 * @param message String que será enviada.
 * @param usart_callback_transmit_done Função que será chamada após o ultimo byte ser transmitido.
 */
void usart_transmite_interrupt_write_message( char * message, callback_isr_t usart_callback_transmit_done );
/**
 * @remark Não precisa chamar esta função. Ela é chamada automaticamente pela função tratadora de interrupções.
 * Função que trata a interrupção de envio de mensagem.
 * @todo Transformar em uma macro depois.
 */
void usart_transmite_interrupt_isr();

void usart_transmite_lock_write_byte( uint8_t data );

/**
 * Transmite uma string (mas trava a tarefa).
 * @param message String que será transmitida.
 */
void usart_transmite_lock_write_message( char * message );

/**
 * Recebe um byte (mas trava a tarefa).
 * @return O valor recebido do RX.
 */
uint8_t usart_receive_lock_read_byte();

/**
 * Recebe uma string inteira (mas trava a tarefa). A string deve terminar em '\r'.
 * @param buffer O buffer onde a mensagem será salva.
 * @param size O tamanho do buffer.
 * @return A quantidade de caracteres recebida.
 */
uint8_t usart_receive_lock_read_message( char * buffer, uint8_t size );

/**
 * Recebe uma string inteira, utilizando interrupções. A string deve terminar em '\r'.
 * @param usart_callback_receive_done função que será chamada quando a mensagem for totalmente recebida.
 */
void usart_receive_interrupt_read_message( callback_isr_t usart_callback_receive_done );

/**
 * Recebe um unico byte, utilizando interrupções.
 * @param usart_callback_receive_done função que será chamada quando o byte for recebido.
 */
void usart_receive_interrupt_read_byte( callback_isr_t usart_callback_receive_done );

/**
 * @remark Não precisa chamar esta função. Ela é chamada automaticamente pela função tratadora de interrupções.
 * Função que trata a interrupção de recepção de mensagem.
 * @todo Transformar em uma macro depois.
 */
void usart_receive_interrupt_isr();

/**
 * Recupera o ponteiro para a mensagem recebida ao final da interrupção.
 */
char* usart_receive_interrupt_get_message();

/**Recupera o caracter lido da interrupção*/
char usart_receive_interrupt_get_byte();

#include "string.h"

/**Buffer para envio de mensagens*/
char _tx_buffer[TX_BUFFER_MAX_SIZE];
/**Iterador do buffer de envio*/
char* _tx_buffer_iterator = NULL;
/**Função disparda quando a mensagem for totalmente enviada no modo por interrupção*/
callback_isr_t _tx_isr_done_callback = NULL;

/**Buffer para recebimento de mensagens*/
char _rx_buffer[RX_BUFFER_MAX_SIZE];
/**Iterador do buffer de recebimento*/
char* _rx_buffer_iterator = NULL;
/**Tamanho da mensagem recebida pelo buffer*/
uint8_t _rx_buffer_message_size;
/**Função disparda quando uma mensagem for totalmente recebida (terminada em 'r')*/
callback_isr_t _rx_isr_done_callback = NULL;
/**Define se o modo do rx por interrupção será por string ou caracter*/
const uint8_t _RX_ISR_MODE_STRING = 0;
const uint8_t _RX_ISR_MODE_CHAR = 1;
uint8_t _rx_isr_mode = 0;

void usart_initialize( usart_sync_mode_t usart_sync_mode, uint32_t baud_rate ) {
    // Ativa o envio (Transmit Enable)
    TXSTA1bits.TXEN = HIGH;
    // Setting the SPEN bit of the RCSTA register enables the EUSART and automatically configures the TX/CK I/O pin as an output.
    RCSTA1bits.SPEN = HIGH;
    // Synchronization Mode
    TXSTA1bits.SYNC = usart_sync_mode;

    // Ativa a recepção (Receive Enable)
    RCSTA1bits.CREN = HIGH;
    // Segundo o manual, o pino de entrada deve ser setado manualmente.
    TRISCbits.TRISC6 = OUTPUT; // TX
    TRISCbits.TRISC7 = INPUT;  // RX

    // TODO: Implementar o protocolo pra 9 bits, se necessário.
    TXSTA1bits.TX9 = USART_9BIT_MODE_NOT_IMPLEMENTED;
    RCSTA1bits.RX9 = USART_9BIT_MODE_NOT_IMPLEMENTED;

    // -------------------------------------------------------------------------
    // The default state of this bit is ?0? which selects high true transmit
    // idle and data bits. Setting the SCKP bit to ?1? will invert the transmit
    // data resulting in low true idle and data bits.
    // -------------------------------------------------------------------------
    // Basicamente, se tiver em modo Assincrono:
    //   SCKP(LOW)  => Faz transmissao com sinal 1
    //   SCKP(HIGH) => Faz transmissao com sinal 0 (invertido)
    if( usart_sync_mode == USART_SYNC_MODE_ASYNCHRONOUS ) {
        BAUDCON1bits.SCKP = LOW;
    }

    SPBRG1 = 64000000ul / ( 9600ul * 64ul ) - 1ul;
//    // Faz o calculo do Baud Rate!
//    // Primeiro, determina a frequencia
//    uint32_t fosc = 64000000;
//    // Fatores que decidem a formula para calculo do Baud Rate
//    uint8_t baud_switch = SYNC << 2 | BRG16 << 1 | BRGH << 0;
//    // Calibra o valor de SPBRG (X na formula do Baud Rate, pág. 348) para o Baud Rate desejado.
//    switch( baud_switch ) {
//        case 0b000: SPBRG1 = ( fosc / ( 64ul * baud_rate ) ) - 1ul; break;
//        case 0b001:
//        case 0b010: SPBRG = ( fosc / ( 16ul * baud_rate ) ) - 1ul; break;
//        default: // Para as demais combinações, a formula é:
//            SPBRG = ( fosc / ( 4ul * baud_rate ) ) - 1ul; break;
//    }
}

/**
 * @remark Função privada (Não acessivel de fora - não é pra cagar nela).
 *
 * Função que copia a mensagem para um buffer interno E cria um iterador (ponteiro) para percorre ela.
 */
void usart_transmite_set_message( char * message ) {
    // Copia a mensagem para o buffer, para que ela fique disponivel durante todo o processo.
    strcpy( _tx_buffer, message );
    // Inicia o iterador que ira enviar caracter por caracter para o inicio da mensagem.
    _tx_buffer_iterator = _tx_buffer;
}

void usart_transmite_interrupt_write_message( char * message, callback_isr_t usart_callback_transmit_done ) {
    // Copia a mensagem e prepara o iterador
    usart_transmite_set_message(message);
    // seta a função que será chamada no final da transmissão
    _tx_isr_done_callback = usart_callback_transmit_done;
    // Ativa as interrupções de periféricos externos.
    INTCONbits.PEIE = HIGH;
    // Ativa o uso de interrupções para transmissão
    // É para disparar uma interrupção imediatamente.
    PIE1bits.TXIE = HIGH;
}

void usart_transmite_interrupt_isr() {
    // Envia o proximo caracter, se ele existir.
    if( *_tx_buffer_iterator ) {
        TXREG = *_tx_buffer_iterator;
        _tx_buffer_iterator++;
    // Do contrário, encerra o envio e dispara o callback.
    } else {
        // Se o canal de envio ainda não havia sido encerrado E existe uma função de callback...
        if( PIE1bits.TXIE && _tx_isr_done_callback ) {
            // Faz a chamada da função
            _tx_isr_done_callback();
        }
        // Desativa interrupções para transmissão
        PIE1bits.TXIE = LOW;
    }
}

/**
 * @remark Função privada (Não acessivel de fora - não é pra cagar nela).
 *
 * Transmite um byte (mas trava a tarefa).
 *
 * @param data Byte que será transmitido.
 */
void usart_transmite_lock_write_byte( uint8_t data ) {
    // <TXIF (Interrupt Flag Bit for Transmiting) é controlado por hardware>
    // Aguarda a a transmissão anterior encerrar ...
    while( !PIR1bits.TXIF ) {
        NOP();
    }
    // ... para então escrever o byte.
	TXREG1 = data;
}

void usart_transmite_lock_write_message( char * message ) {
    // Habilita o canal de transmissao e prepara o iterador.
    usart_transmite_set_message( message );
    // Enquanto tiver mensagem para escrever...
    while( *_tx_buffer_iterator ) {
        // Escreve um byte ...
        usart_transmite_lock_write_byte( *_tx_buffer_iterator );
        // ...  e avança um byte por vez
        _tx_buffer_iterator++;
    }
    // Finalmente, desabilita o canal de transmissao
    PIE1bits.TXIE = LOW;
}

uint8_t usart_receive_lock_read_byte() {
 	/*// Verifica se ocorreu algum erro (Frame/Overflow)
    if( RCSTAbits.FERR || RCSTAbits.OERR ) {
        //TODO fazer um tratamento de erro
		// Reinicia o receiver, para poder resetar as flags de erro.
        RCSTAbits.CREN = LOW;
		RCSTAbits.CREN = HIGH;
	}*/

    // <RCIF (Interrupt Flag bit for Receiving) é controlador por hardware>
    // Aguarda a flag ir para high (indicando que recebeu 8+ bytes) ...
    while( !PIR1bits.RCIF ) {
        NOP();
    }
    // ... para então fazer a leitura do byte
    return RCREG1;
}

uint8_t usart_receive_lock_read_message( char * buffer, uint8_t size ) {
    // Cursor que irá navegar o buffer
    char* cursor = buffer;
    // Conta a quantidade de caratereres recebida pela mensagem
    uint8_t i;
    // Itera pelo buffer, salvando nele os bytes recebidos
    for( i = 0; i < size; i++ ) {
        // Recebe uma letra do RX
        uint8_t letter = usart_receive_lock_read_byte();
        // Verifica se é final do buffer. Estamos usando o carriage return, mas ideal era ver pelo caracter NULO mesmo...
        if( letter == '\r' ) {
            // Arrumamos a string para final NULO antes de retornar.
            *cursor = '\0';
            break;
        // Se não for a letra de termino de string
        } else {
            // salva a letra no buffer e posiciona o cursor na proxima posição.
            *cursor = letter;
            cursor++;
        }
    }
    // Retorna a quantidade de caracters lido (incluindo o nulo)
    return i;
}

void _usart_receive_interrupt_read_message( callback_isr_t usart_callback_receive_done ) {
    // Inicia as variaveis de interrupção para RX.
    _rx_buffer_iterator = _rx_buffer;
    _rx_buffer_message_size = 0;
    _rx_isr_done_callback = usart_callback_receive_done;
    // Ativa as interrupções de periféricos externos.
    INTCONbits.PEIE = HIGH;
    // Ativa o uso de interrupções para transmissão
    // É para disparar uma interrupção imediatamente.
    PIE1bits.RCIE = HIGH;
}

void usart_receive_interrupt_read_message( callback_isr_t usart_callback_receive_done ) {
    _rx_isr_mode = _RX_ISR_MODE_STRING;
    _usart_receive_interrupt_read_message( usart_callback_receive_done );
}

void usart_receive_interrupt_read_byte( callback_isr_t usart_callback_receive_done ) {
    _rx_isr_mode = _RX_ISR_MODE_CHAR;
    _usart_receive_interrupt_read_message( usart_callback_receive_done );
}

void usart_receive_interrupt_isr() {
    // Recebeu um byte inteiro, e agora armazena ele no buffer.
    *_rx_buffer_iterator = RCREG1;
    // Aumenta o tamanho recebido no buffer.
    _rx_buffer_message_size++;

    if( _rx_isr_mode == _RX_ISR_MODE_STRING ) {
        if( *_rx_buffer_iterator == '\r' ) {
            *_rx_buffer_iterator = '\0';
            // Se o canal de recepção ainda não havia sido encerrado E existe uma função de callback...
            if( PIE1bits.RCIE && _rx_isr_done_callback ) {
                // Faz a chamada da função
                _rx_isr_done_callback();
            }
            // Desativa interrupções para recepção
            PIE1bits.RCIE = LOW;
        } else if( _rx_buffer_message_size == (RX_BUFFER_MAX_SIZE-1) ) {
            //TODO deu merda. Veio mais caracteres do que o buffer comportava.
            PIE1bits.RCIE = LOW;
        } else {
            // Move o cursor para a proxima posição
            _rx_buffer_iterator++;
        }
    } else {
        // Faz a chamada da função
        _rx_isr_done_callback();
    }
}

char* usart_receive_interrupt_get_message() {
    return _rx_buffer;
}

char usart_receive_interrupt_get_byte() {
    return (*_rx_buffer);
}

//////////////////////////////////////////////////////////////////////////USART

///////////////////////////////////////////////////////////////////////////////
/// TIMER1
///////////////////////////////////////////////////////////////////////////////
/**
 * Reseta o timer1 para a quantidade de atrasos especificada e liga-o.
 * @param a_delay Quantidade de ciclos de atraso.
 */
void timer1_reset( uint16_t a_delay );

/**
 * Inicializa o timer1, mas não o liga.
 * @param timer1_callback Função que será chamada a cada estouro de timer.
 */
void timer1_initialize( callback_isr_t timer1_callback );

/**
 * Rotina invocada quando ocorre uma interrupção.
 */
void timer1_isr();

void timer1_reset( uint16_t a_delay ) {
    // Prepara a quantidade de ciclos para atrasar
    uint16_t l_timer = 65535u - a_delay;
    // Seta no timer a quantidade de ciclos de atraso
    TMR1H = l_timer >> 8;
    TMR1L = l_timer;
    // Ativa o timer1 para iniciar a contagem
    T1CONbits.TMR1ON = 1;
}

static callback_isr_t _timer1_callback;
asm("GLOBAL __timer1_callback");
void timer1_initialize( callback_isr_t timer1_callback ) {
    T1CONbits.TMR1CS = 0b00;  // Timer1 Clock Source = FOSC/4
    T1CONbits.T1CKPS = 0b11;  // Timer1 Input Clock Prescale = 1:8
    T1CONbits.SOSCEN = 0b0;   // SOSC Oscillator Enable = Disabled
    T1CONbits.nT1SYNC = 0b00; // Timer1 External Clock Input Synchronization = This bit is ignored. Timer1 uses the internal clock when TMR1CS<1:0> = 0x.
    T1CONbits.RD16 = 0b1;     // 16-Bit Read/Write Mode Enable = Enables register read/write of Timer1 in one 16-bit operation

    T1GCONbits.TMR1GE = 0b0;  // Timer1 Gate Enable = Timer1 counts regardless of Timer1 gate function

    timer1_reset( 0xFFFF );   // Resets the timer
    _timer1_callback = timer1_callback;

    PIR1bits.TMR1IF = 0;      // Timer1 Interrupt Flag = Off
    PIE1bits.TMR1IE = 1;      // Timer1 Interrupt Enable = True

    INTCONbits.PEIE = TRUE;

    T1CONbits.TMR1ON = 0;     // Timer1 On = Start Disabled
}

void timer1_isr() {
    T1CONbits.TMR1ON = 0;
    if( _timer1_callback != NULL ) {
        _timer1_callback();
    }
    // Clear Timer1 Interruption Flag
    PIR1bits.TMR1IF = 0;
}

/////////////////////////////////////////////////////////////////////////TIMER1

///////////////////////////////////////////////////////////////////////////////
/// TIMER3
///////////////////////////////////////////////////////////////////////////////
void timer3_reset( uint16_t a_delay ) {
    // Prepara a quantidade de ciclos para atrasar
    uint16_t l_timer = 65535u - a_delay;
    // Seta no timer a quantidade de ciclos de atraso
    WRITETIMER3( l_timer );
    // Ativa o timer3 para iniciar a contagem
    T3CONbits.TMR3ON = 1;
}

static callback_isr_t _timer3_callback;
asm("GLOBAL __timer3_callback");
void timer3_initialize( callback_isr_t timer3_callback ) {
    T3CONbits.TMR3CS = 0b00;  // Timer3 Clock Source = FOSC/4
    T3CONbits.T3CKPS = 0b11;  // Timer3 Input Clock Prescale = 1:8
    T3CONbits.SOSCEN = 0b0;   // SOSC Oscillator Enable = Disabled
    T3CONbits.nT3SYNC = 0b00; // Timer3 External Clock Input Synchronization = This bit is ignored. Timer3 uses the internal clock when TMR3CS<1:0> = 0x.
    T3CONbits.RD16 = 0b1;     // 16-Bit Read/Write Mode Enable = Enables register read/write of Timer3 in one 16-bit operation

    T3GCONbits.TMR3GE = 0b0;  // Timer3 Gate Enable = Timer3 counts regardless of Timer3 gate function

    timer3_reset( 0xFFFF );   // Resets the timer
    _timer3_callback = timer3_callback;

    PIR2bits.TMR3IF = 0;      // Timer3 Interrupt Flag = Off
    PIE2bits.TMR3IE = 1;      // Timer3 Interrupt Enable = True

    INTCONbits.PEIE = 1;

    T3CONbits.TMR3ON = 0;     // Timer3 On = Start Disabled
}

void timer3_isr() {
    T3CONbits.TMR3ON = 0;
    if( _timer3_callback != NULL ) {
        _timer3_callback();
    }
    // Clear Timer3 Interruption Flag
    PIR2bits.TMR3IF = 0;
}
/////////////////////////////////////////////////////////////////////////TIMER1

///////////////////////////////////////////////////////////////////////////////
/// PWM
///////////////////////////////////////////////////////////////////////////////
void pwm0_initialize() {
    PR2 = 64000000ul / ( 64000ul * 4ul * 1ul ) - 1; // 249 >> 1111 1001
    T2CONbits.T2CKPS = 0b00;
    T2CONbits.TMR2ON = 1;
}

void pwm5_initialize() {
    pwm0_initialize();
    TRISBbits.TRISB5 = 0;
    // CCPx Module Mode Select bits
    CCP5CONbits.CCP5M = 0b1100; // PWM mode
    //-- CCPTMRS: CCP TIMER SELECT REGISTER --//
    // CCP5 Timer Selection bit
    CCPTMRSbits.C5TSEL = 0b0; // CCP5 is based off of TMR1/TMR2
}

void pwm5_set_duty( uint16_t a_duty ) {
    CCPR5Lbits.CCPR5L = ((a_duty >> 2 ) & 0xFF);
    CCP5CONbits.DC5B = (a_duty & 0b11);
}

void pwm2_initialize() {
    pwm0_initialize();
    TRISCbits.TRISC2 = 0;
    // CCPx Module Mode Select bits
    CCP2CONbits.CCP2M = 0b1100; // PWM mode
    //-- CCPTMRS: CCP TIMER SELECT REGISTER --//
    // CCP2 Timer Selection bit
    CCPTMRSbits.C2TSEL = 0b0; // CCP2 is based off of TMR1/TMR2
}

void pwm2_set_duty( uint16_t a_duty ) {
    CCPR2Lbits.CCPR2L = ((a_duty >> 2 ) & 0xFF);
    CCP2CONbits.DC2B = (a_duty & 0b11);
}
////////////////////////////////////////////////////////////////////////////PWM

///////////////////////////////////////////////////////////////////////////////
/// RELAMPAGO MARQUINHOS
///////////////////////////////////////////////////////////////////////////////
typedef struct relampago_s {
	uint8_t comando;
	uint8_t freio_re;
	uint8_t volante_cmd;
    uint16_t volante;
    uint8_t velocidade_cmd;
    uint16_t velocidade;
} relampago_t;

typedef relampago_t* relampago_ptr_t;

void rm_init( relampago_ptr_t a_rc );

/**
 * Retorna um valor para o servomotor que controla o marquinhos
 * @param a_rc Ponteiro para o marquinhos
 * @return Valor entre 1 e 2 ms
 */
void rm_set_servo_volante( relampago_ptr_t a_rc );
/**
 * Retorna um valor para o tempo de alta do pwm do motor do marquinhos
 * @param a_rc Ponteiro para o marquinhos
 * @return Valor entre 50 e 0
 */
void rm_set_pwm_velocidade( relampago_ptr_t a_rc );

#define LPE (0b00000001)
#define LPD (0b00000010)
#define LFP (0b00000100)
#define LFM (0b00001000)
#define LFR (0b00010000)

static const uint8_t _CMD_VOLANTE[] = { 'B','L','R','G','I','H','J','S','F' };
static const uint8_t _CMD_VELOCIDADE[] = { '0', '1','2','3','4','5','6','7','8','9','q' };

void rm_init( relampago_ptr_t a_rc ) {
    a_rc->comando = 0;
    a_rc->freio_re = 0;
    a_rc->volante_cmd = 'B';
    rm_set_servo_volante( a_rc ); // a_rc->volante = 3000 + VOLANTE_OFFSET;
	a_rc->velocidade_cmd = '0';
    rm_set_pwm_velocidade( a_rc ); // a_rc->velocidade = 0;
}

#define VOLANTE_OFFSET 0
void rm_set_servo_volante( relampago_ptr_t a_marquinhos ) {
    switch( a_marquinhos->volante_cmd ) {
        case 'G': a_marquinhos->volante = 3666 + VOLANTE_OFFSET; break; // Left Forward >> Esquerda 100% >> 1.0ms
        case 'L': a_marquinhos->volante = 3444 + VOLANTE_OFFSET; break; // Left         >> Esquerda  66%
        case 'H': a_marquinhos->volante = 3222 + VOLANTE_OFFSET; break; // Left Back    >> Esquerda  33%
        case 'B': a_marquinhos->volante = 3000 + VOLANTE_OFFSET; break; // Back         >> Neutro     0% >> 1.5ms
        case 'J': a_marquinhos->volante = 2778 + VOLANTE_OFFSET; break; // Right        >> Direita   33%
        case 'R': a_marquinhos->volante = 2556 + VOLANTE_OFFSET; break; // Right        >> Direita   66%
        case 'I': a_marquinhos->volante = 2334 + VOLANTE_OFFSET; break; // Right        >> Direita  100% >> 2.0ms
        default : a_marquinhos->volante = 3000 + VOLANTE_OFFSET;
    }

}

void rm_set_pwm_velocidade( relampago_ptr_t a_marquinhos ) {
    switch( a_marquinhos->velocidade_cmd ) {
        case 'q': a_marquinhos->velocidade = 250 << 2; break; // Throttle 100% (Full Throttle :D)
        case '9': a_marquinhos->velocidade = 225 << 2; break; // Throttle  90%
        case '8': a_marquinhos->velocidade = 200 << 2; break; // Throttle  80%
        case '7': a_marquinhos->velocidade = 175 << 2; break; // Throttle  70%
        case '6': a_marquinhos->velocidade = 150 << 2; break; // Throttle  60%
        case '5': a_marquinhos->velocidade = 125 << 2; break; // Throttle  50%
        case '4': a_marquinhos->velocidade = 100 << 2; break; // Throttle  40%
        case '3': a_marquinhos->velocidade =  75 << 2; break; // Throttle  30%
        case '2': a_marquinhos->velocidade =  50 << 2; break; // Throttle  20%
        case '1': a_marquinhos->velocidade =  25 << 2; break; // Throttle  10%
        case '0': a_marquinhos->velocidade =   0 << 2; break; // Throttle   0%
		default: a_marquinhos->velocidade = 0;
    }
}
///////////////////////////////////////////////////////////RELAMPAGO MARQUINHOS

// #define _XTAL_FREQ 64000000

#define EVENT_RX			(0b00000001)
#define EVENT_VOLANTE		(0b00000001)
#define EVENT_VELOCIDADE	(0b00000001)
#define EVENT_PE_ON			(0b00001000)
#define EVENT_PE_OFF		(0b00000100)
#define EVENT_PD_ON			(0b00000010)
#define EVENT_PD_OFF		(0b00000001)
#define EVENT_FAR_MILHA_ON	(0b00001000)
#define EVENT_FAR_MILHA_OFF	(0b00000100)
#define EVENT_FAR_ON		(0b00000010)
#define EVENT_FAR_OFF		(0b00000001)
#define EVENT_MOV_F			(0b00000010)
#define EVENT_MOV_R			(0b00000001)

relampago_t marquinhos;

void isr_extra() {
	// USART RX
    if( PIE1bits.RCIE == HIGH && PIR1bits.RCIF == HIGH ) {
        usart_receive_interrupt_isr();
    }
    // TIMER1
    if( PIE1bits.TMR1IE && PIR1bits.TMR1IF ) {
        timer1_isr();
    }
    // TIMER3
    if( PIE2bits.TMR3IE && PIR2bits.TMR3IF ) {
        timer3_isr();
    }
}

void isr_rx_callback() {
	marquinhos.comando = usart_receive_interrupt_get_byte();
	SetEvent( task_rx, EVENT_RX );
}

#define VOLANTE_SERVO LATBbits.LB4
#define VOLANTE_LAZY_CYCLE 40000ul

uint16_t _volante_duty_cycle = 0ul;
uint16_t _volante_lazy_cycle = VOLANTE_LAZY_CYCLE;
uint8_t _volante_duty = 1;
void isr_timer1_callback() {
    // Duty
    if( _volante_duty ) {
        timer1_reset( _volante_duty_cycle );
        VOLANTE_SERVO = HIGH;
    // Full
    } else {
        timer1_reset( _volante_lazy_cycle );
        VOLANTE_SERVO = LOW;
    }
    _volante_duty = !_volante_duty;
}

#define MODO_PISCA_ESQ (0b00000010)
#define MODO_PISCA_DIR (0b00000001)
#define MODO_PISCA_ALL (0b00000011)

#define LED_FREIO		LATBbits.LATB1
#define LED_PISCA_ESQ	LATBbits.LATB7
#define LED_PISCA_DIR	LATBbits.LATB6
#define LED_FAROL		LATBbits.LATB3
#define LED_FAROL_MILHA	LATBbits.LATB2

#define LED_FREIO_READ			PORTBbits.RB1
#define LED_PISCA_ESQ_READ		PORTBbits.RB7
#define LED_PISCA_DIR_READ		PORTBbits.RB6
#define LED_FAROL_READ			PORTBbits.RB3
#define LED_FAROL_MILHA_READ 	PORTBbits.RB2

static uint8_t _timer3_counter = 0;
static uint8_t _timer3_pisca_modo = 0;
void isr_timer3_callback() {
    _timer3_counter++;
    if( _timer3_counter >= 20 ) {
        _timer3_counter = 0;
        if( _timer3_pisca_modo == MODO_PISCA_ESQ ) {
        	LED_PISCA_ESQ = !LED_PISCA_ESQ_READ;
        } else
        if( _timer3_pisca_modo == MODO_PISCA_DIR ) {
        	LED_PISCA_DIR = !LED_PISCA_DIR_READ;
        } else
        if( _timer3_pisca_modo == MODO_PISCA_ALL ) {
        	LED_PISCA_DIR = !LED_PISCA_ESQ_READ;
        	LED_PISCA_ESQ = !LED_PISCA_ESQ_READ;
        } else {
        }
    }
    timer3_reset( 50000ul );
}

void setup_portas() {
    // Saidas
    TRISB = 0b00000000;
    TRISCbits.TRISC2 = OUTPUT;

    TRISAbits.TRISA0 = INPUT;
    TRISAbits.TRISA1 = INPUT;
    TRISAbits.TRISA2 = INPUT;

    LATA = 0x00;
    LATB = 0x00;
    LATC = 0x00;
}

TASK( task_init ) {
	_isr_extra = isr_extra;

    setup_portas();

    usart_initialize( USART_SYNC_MODE_ASYNCHRONOUS, USART_BAUD_RATE_9600 );
    usart_receive_interrupt_read_byte( isr_rx_callback );
    // 40000 ciclos = 20 ms
    timer1_initialize( isr_timer1_callback );
    timer1_reset( 0xFFFF );

    timer3_initialize( isr_timer3_callback );
    timer3_reset( 50000ul );
    _timer3_counter = 0;

    pwm5_initialize(); // Velocidade -> Frente
    pwm5_set_duty(0);
    pwm2_initialize(); // Velocidade -> Re
    pwm2_set_duty(0);

    rm_init( &marquinhos );

    _volante_duty_cycle = marquinhos.volante;
	_volante_lazy_cycle = VOLANTE_LAZY_CYCLE - marquinhos.volante;

	ActivateTask( task_rx );
	ActivateTask( task_farol );
	ActivateTask( task_seta );
	ActivateTask( task_volante );
	ActivateTask( task_velocidade );
	ActivateTask( task_sentido );

	TerminateTask();
}

TASK( task_rx ) {
	while( TRUE ) {
		WaitEvent( EVENT_RX );
		ClearEvent( EVENT_RX );

		// Discarte de comandos
	    if( marquinhos.comando == 'S' ||
	    	marquinhos.comando == 'F' ||
	    	marquinhos.comando == 'D' ) {
	    	continue;
		}

	    // Comandos do Volante
	    for( uint8_t i = 0; i < sizeof(_CMD_VOLANTE); i++ ) {
	        if( marquinhos.comando == _CMD_VOLANTE[i] ) {
	        	marquinhos.volante_cmd = marquinhos.comando;
	        	SetEvent( task_volante, EVENT_VOLANTE );
	            continue;
	        }
	    }

	    // Comandos de Velocidade
	    for( uint8_t i = 0; i < sizeof(_CMD_VELOCIDADE); i++ ) {
	        if( marquinhos.comando == _CMD_VELOCIDADE[i] ) {
	        	marquinhos.velocidade_cmd = marquinhos.comando;
	            SetEvent( task_velocidade, EVENT_VELOCIDADE );
	            continue;
	        }
	    }

		// LEDs
		if( marquinhos.comando == 'W' ) { SetEvent( task_seta   , EVENT_PE_ON   ); } else
		if( marquinhos.comando == 'w' ) { SetEvent( task_seta   , EVENT_PE_OFF  ); } else
	    if( marquinhos.comando == 'U' ) { SetEvent( task_seta   , EVENT_PD_ON   ); } else
	    if( marquinhos.comando == 'u' ) { SetEvent( task_seta   , EVENT_PD_OFF  ); } else
	    if( marquinhos.comando == 'V' ) { SetEvent( task_farol  , EVENT_FAR_ON  ); } else
	    if( marquinhos.comando == 'v' ) { SetEvent( task_farol  , EVENT_FAR_OFF ); } else
	    if( marquinhos.comando == 'X' ) { SetEvent( task_sentido, EVENT_MOV_R   ); } else
	    if( marquinhos.comando == 'x' ) { SetEvent( task_sentido, EVENT_MOV_F   ); }
	}
}

TASK( task_farol ) {
	while( TRUE ) {
		WaitEvent( EVENT_FAR_MILHA_ON | EVENT_FAR_MILHA_OFF | EVENT_FAR_ON | EVENT_FAR_OFF );
		EventMaskType l_event;
		GetEvent( task_farol, &l_event );
		if( l_event & EVENT_FAR_MILHA_ON ) {
			ClearEvent( EVENT_FAR_MILHA_ON );
			LED_FAROL_MILHA = TRUE;
		} else
		if( l_event & EVENT_FAR_MILHA_OFF ) {
			ClearEvent( EVENT_FAR_MILHA_OFF );
			LED_FAROL_MILHA = FALSE;
		} else
		if( l_event & EVENT_FAR_ON ) {
			ClearEvent( EVENT_FAR_ON );
			LED_FAROL = TRUE;
		} else
		if( l_event & EVENT_FAR_OFF ) {
			ClearEvent( EVENT_FAR_OFF );
			LED_FAROL = FALSE;
		}
	}
}

TASK( task_seta ) {
	while( TRUE ) {
		WaitEvent( EVENT_PE_ON | EVENT_PE_OFF | EVENT_PD_ON | EVENT_PD_OFF );
		EventMaskType l_event;
		GetEvent( task_seta, &l_event );
		if( l_event & EVENT_PE_ON ) {
			ClearEvent( EVENT_PE_ON );
			LED_PISCA_ESQ = TRUE;
			_timer3_pisca_modo |= MODO_PISCA_ESQ;
		} else
		if( l_event & EVENT_PE_OFF ) {
			ClearEvent( EVENT_PE_OFF );
			LED_PISCA_ESQ = FALSE;
			_timer3_pisca_modo &= ~MODO_PISCA_ESQ;
		} else
		if( l_event & EVENT_PD_ON ) {
			ClearEvent( EVENT_PD_ON );
			LED_PISCA_DIR = TRUE;
			_timer3_pisca_modo |= MODO_PISCA_DIR;
		} else
		if( l_event & EVENT_PD_OFF ) {
			ClearEvent( EVENT_PD_OFF );
			LED_PISCA_DIR = FALSE;
			_timer3_pisca_modo &= ~MODO_PISCA_DIR;
		}
	}
}

TASK( task_volante ) {
	while( TRUE ) {
		WaitEvent( EVENT_VOLANTE );
		ClearEvent( EVENT_VOLANTE );
		rm_set_servo_volante( &marquinhos );
		_volante_duty_cycle = marquinhos.volante;
    	_volante_lazy_cycle = VOLANTE_LAZY_CYCLE - _volante_duty_cycle;
	}
}

TASK( task_velocidade ) {
	while( TRUE ) {
		WaitEvent( EVENT_VELOCIDADE );
		ClearEvent( EVENT_VELOCIDADE );
		rm_set_pwm_velocidade( &marquinhos );
		pwm5_set_duty( marquinhos.freio_re ? 0 : marquinhos.velocidade ); // Frente
		pwm2_set_duty( marquinhos.freio_re ? marquinhos.velocidade : 0 ); // Ré
	}
}

TASK( task_sentido ) {
	while( TRUE ) {
		WaitEvent( EVENT_MOV_F | EVENT_MOV_R );
		EventMaskType l_event;
		GetEvent( task_sentido, &l_event );
		// Frente
		if( l_event & EVENT_MOV_F ) {
			ClearEvent( EVENT_MOV_F );
			marquinhos.freio_re = FALSE;
		} else
		// Re
		if( l_event & EVENT_MOV_R ) {
			ClearEvent( EVENT_MOV_R );
			marquinhos.freio_re = TRUE;
		}
		LED_FREIO = marquinhos.freio_re;
		pwm5_set_duty( marquinhos.freio_re ? 0 : marquinhos.velocidade ); // Frente
		pwm2_set_duty( marquinhos.freio_re ? marquinhos.velocidade : 0 ); // Ré
	}
}
void main(void) {
	InitializeTasks();
	InititializeResources();

	StartOS( 0 );

	while( 1 ) { NOP(); }

	return;
}

redpajama_set_name: RedPajamaGithub


text:
Biografia
Wales ha dichiarato di essere nato il 7 agosto e che la data dell'8 che compare nel certificato di nascita è un errore del medico che lo ha compilato:

Durante la sua infanzia si mise in evidenza per la sua vivacità e per la sua fame insaziabile di letture. Acquistata la capacità di leggere, legge rapidamente la World Book Encyclopedia che la madre gli aveva regalato quando aveva tre anni. Secondo lo stesso Wales, da bambino venne educato in una scuola influenzata dalla filosofia educativa Montessori, dove trascorse molto tempo a leggere volumi dell'Enciclopedia Britannica; successivamente, studia alla Randolph School, dove si diploma all'età di sedici anni.

Dopo la Randolph passa all'Università di Auburn, terminata la quale si iscrive al dottorato di finanza dell'Università dell'Alabama, che abbandona dopo aver conseguito una laurea magistrale. Si riscrive all'Indiana University, sempre per un dottorato in finanza, ma abbandona prima di scrivere la tesi. Wales prosegue diventando un agente di borsa a Chicago, dove nel giro di pochi anni si guadagna una discreta ricchezza.

Nella metà degli anni novanta Wales fondò un portale di ricerca per musica pop chiamato Bomis, di cui attualmente non è più né presidente né amministratore, mentre nel marzo 2000 fondò il progetto per un'enciclopedia controllata dagli stessi utenti chiamata Nupedia, assumendo Larry Sanger come redattore capo.

Il 15 gennaio 2001 Wales e Sanger crearono Wikipedia, un sito pensato per fornire contenuti wiki a Nupedia, forniti dagli stessi utenti. La rapida crescita di Wikipedia ne fece presto il progetto dominante, ed il progetto di Nupedia scomparve il 23 settembre 2003. Sanger fu responsabile per buona parte dello sviluppo iniziale di Wikipedia, mentre Wales fornì il capitale necessario. Visto che Sanger era un dipendente di Wales, quest'ultimo si considera il solo fondatore di Wikipedia, anche se Sanger continua a definirsi "cofondatore".

A metà 2003, Wales fondò la Wikimedia Foundation, un'organizzazione non profit con sede attuale a San Francisco, in California, per fornire supporto a Wikipedia ed ai suoi progetti più recenti. Con la nascita della fondazione, Wales ha anche trasferito il possesso di tutti i nomi di dominio di tutte le edizioni di Wikipedia, Wiktionary e di Nupedia a Wikimedia insieme ai diritti d'autore per tutti i materiali collegati a quei progetti che furono creati da impiegati della Bomis o da Wales stesso. La fornitura stessa di computer usata per i progetti Wikimedia è stata donata da Wales alla Fondazione.

Da allora Wales è sempre più coinvolto nel divulgare e promuovere i progetti della fondazione; dopo essere stato presidente del consiglio direttivo della fondazione, è attualmente (2008) presidente emerito. All'epoca della conclusione della ricerca fondi del febbraio 2005, la Wikimedia Foundation era sorretta esclusivamente da donazioni. Wales è stato talvolta definito "il dittatore benevolo" di Wikipedia, o il suo "Dio-Re" . La rivista Wired di Daniel Pink, nello studiare Wikipedia per l'edizione di marzo 2005, scrisse che «Il Dio-Re guida una Hyundai».

Wales ha fondato due progetti a scopo di lucro assieme ad Angela Beesley: Wikia (nel 2004, con il nome Wikicities), un servizio di hosting wiki, e un motore di ricerca stile wiki, Wikia Search, nel 2008.

Vita privata
Ha avuto una figlia dalla sua seconda moglie. L'8 ottobre 2012 si è sposato per la terza volta, con un'ex segretaria di Tony Blair. Da allora vive stabilmente a Londra.

Ammira la corrente filosofica dell'oggettivismo di Ayn Rand; nella scuola per laureati possedeva e moderava una mailing list su Internet nota come la "Discussione moderata sulla filosofia oggettivista".

Riconoscimenti
Wales è stato insignito nel 2005 del titolo di Fellow del Centro Berkman per Internet e Società alla Facoltà di Legge di Harvard e dall'ottobre 2005 siede nel consiglio di amministrazione di Socialtext, un'azienda che fornisce tecnologia wiki per il mondo imprenditoriale.

Il 17 maggio 2014 ha ricevuto il titolo di dottore honoris causa della Facoltà di scienze della comunicazione dell'Università della Svizzera italiana (USI, Lugano).

Note

Voci correlate
 Wikipedia
 Storia di Wikipedia
 Fandom (sito web)

Altri progetti

Collegamenti esterni

Wikimedia Foundation
Storia di Wikipedia
Personalità di Internet
Oggettivisti

redpajama_set_name: RedPajamaWikipedia


Back then Halloween was the greatest holiday ever. You got to dress up all fancy in a child's size small costume, stay out late trick-or-treating house to house and get chocolate wasted. Now what we do is … dress up all fancy in child's size small costumes, stay out late going house to house and get (chocolate?) wasted. And our biggest worry is whether we'll actually wake up in time for our midterm Friday. OK, maybe Halloween hasn't changed all that much, but it's still awesome. So sit back, relax and chow down all 12 of those pumpkin-shaped cookies your roommate convinced you to buy from Ralphs as we celebrate this Throwback Thursday in Halloween style!
Do you have an awesome #tbt Halloween picture to share? Tweet us @dbmojo or comment below.


Rizk, Mysoon: "Looking at "Animals in Pants". The Case of David Wojnarowicz." In: Topia 21 (2009), S. 137–159.
Before dying of AIDS-related illnesses, New York-based artist David Wojnarowicz (1954–92) drew attention to the injurious artificiality of divisions both between human and non-human animals as well as within the Homo sapiens species itself, in particular with regard to its exclusion and condemnation of homosexuality. Engagements outside the "clockwork of civilization"—homosexual relations, natural disasters, animal behaviour, bodily contagion—could, Wojnarowicz argued, facilitate critical shifts in perspective. Notwithstanding its zoological references, his work muddies and upsets taxonomic hierarchies and boundaries by subverting normative territorial binds to identity, family, community, nation and even species.


text:
Home Life & Style
Comedy movies shine at cinemas
February, 22/2018 - 09:00
Vietnamese comedies sweeps through national cinemas over the holiday season
Funny stuff: Trường Giang (left) and Đức Thịnh in Siêu Sao Siêu Ngố. — Photo suckhoedoisong.vn
HÀ NỘI — Siêu Sao Siêu Ngố (Super Star Super Silly) is one of four Vietnamese movies being released during Tết, which are the lion's share of domestic productions in the nation's movie market.
Directed by Đức Thịnh, the comedy romance tells the story of a star in show business. Actor Trường Giang plays two characters as twin brothers who are a star and a farmer. Everything becomes complicated when the star's manager suggests the farmer take over for his famous brother.
The movie has attracted more than 100,000 ticket-holders, reporting a turnover of VNĐ10 billion (US$440,000) after its first day, and an additional 43 billion đồng after four days of screening. It is expected to take in VNĐ80 - 100 billion, although Hollywood blockbuster Black Panther was to released yesterday.
The other movies include 798 Mười; Đích Tôn Độc Đắc (Unique First Paternal Grandson) and Về Quê Ăn Tết (Return to Countryside for Tết).
798 Mười movie is a comedy action film by Dustin Nguyễn, telling the story of Master Peng Peng, a "hidden player". In a battle scene, he wears the uniform of the state, and performs the long-winded cone dance, which is no different from Shaolin monks, though he lives in modern times.
Đích Tôn Độc Đắc is a comedy by veteran director Trần Ngọc Giàu featuring comedian Hoài Linh. While the paternal grandfather, played by comedian Hoài Linh, desires to have a great-grandchild who will inherit his assets, the first paternal grandson, played by newcomer Bạch Công Khanh, dares not propose marriage to his long-time girlfriend.
Return to Countryside for Tết is made by woman director Nguyễn Hoàng Anh. This is the first motion picture after her success with television series Cô Thắm Về Làng (Miss Thắm Returns To Her Village), which has been seen on HCM Television.
The light-hearted movie is about a bus-trip returning people, working far from home, to their homeland for Tết. It features well-known actor Ngô Thanh Vân as a bus driver and her assistant driver, played by Jun Phạm.
The tomboy driver frightens the passengers with her driving. Though a situation comedy, the movie focuses on the emotions of the expatriates, who are on the way home for the final days of the year.
These movies are being shown at cinemas throughout the nation. — VNS
Tags Vietnam Vietnam News news vietnam cinema Vietnam movie
Late artist Nguyễn Tư Nghiêm's works on display in rare exhibition
The unique Gióng festival of Hà Nội
Đồng Kỵ giant firecracker procession festival attracts tourists
Visitors flock to annual HCMC City Tết book fair
Spiritual sites to visit in spring around Hà Nội
Tết book fairs rake in money
Book streets and fairs held in cities and towns across Việt Nam during the seven-day Lunar New Year holiday from February 14 to 20 earned a total income of VNĐ6.4 billion (US$282,000).
Ministry vows to improve management of festivals
The Ministry of Culture, Sports and Tourism and local authorities have pledged to join forces to boost the management and organisation of cultural festivities across the country.
Thúy Lĩnh ball scrambling festival
Hundreds of local villagers and visitors took part in a traditional ball scrambling festival which commenced in Hoàng Mai District, Hà Nội, on Tuesday.
Increasing affluence drives VN cruise market
Cruise travel is growing rapidly in Việt Nam due to the country's increasing affluence, experts said.
Kin of 'world's ugliest animal' among fish hauled off Australia abyss
More than 100 rarely seen fish species were hauled up from a deep and cold abyss off Australia during a scientific voyage, researchers said Wednesday, including a cousin of the "world's ugliest animal" Mr Blobby.
Britain's Queen makes surprise visit to London Fashion Week
Queen Elizabeth II and fashion matriarch Anna Wintour sat side-by-side on the front row of the catwalk on Tuesday as the British ruler paid her first visit to London Fashion Week.
Epizode festival returns
Việt Nam's biggest underground dance music festival is back for a third edition in December on the picturesque Phú Quốc Island.
New Year parade
Bà Đen Mountain Spring Festival opens
The Tây Ninh Province People's Committee on Feb 19 opened the Bà Đen (Black Lady) Mountain Spring Festival.

redpajama_set_name: RedPajamaCommonCrawl


text:
Home > Books > Book Reviews > 'Man the Hunter' Theory Debunked
By Neil Schoenherr
You wouldn't know it by current world events, but humans actually evolved to be peaceful, cooperative and social animals.
In his latest book, an anthropologist at Washington University in St. Louis goes against the prevailing view and argues that primates, including early humans, evolved not as hunters but as prey of many predators, including wild dogs and cats, hyenas, eagles and crocodiles.
Despite popular theories posed in research papers and popular literature, early man was not an aggressive killer, argues Robert W. Sussman, Ph.D., professor of anthropology in Arts & Sciences.
Sussman's book, "Man the Hunted: Primates, Predators and Human Evolution," poses a new theory, based on the fossil record and living primate species, that primates have been prey for millions of years, a fact that greatly influenced the evolution of early man.
He co-authored the book with Donna L. Hart, Ph.D., a member of the faculty of Pierre Laclede Honors College and the Department of Anthropology at the University of Missouri-St. Louis. The book is scheduled to be released in late February.
Our intelligence, cooperation and many other features we have as modern humans developed from our attempts to out-smart the predator, says Sussman.
Since the 1924 discovery of the first early humans, australopithicenes, which lived from seven million years ago to two million years ago, many scientists theorized that those early human ancestors were hunters and possessed a killer instinct.
Through his research and writing, Sussman has worked for years to debunk that theory. An expert in the ecology and social structure of primates, Sussman does extensive fieldwork in primate behavior and ecology in Costa Rica, Guyana, Madagascar and Mauritius. He is the author and editor of several books, including "The Origins and Nature of Sociality," "Primate Ecology and Social Structure," and "The Biological Basis of Human Behavior: A Critical Review."
The idea of "Man the Hunter" is the generally accepted paradigm of human evolution, says Sussman, who recently served as editor of American Anthropologist. "It developed from a basic Judeo-Christian ideology of man being inherently evil, aggressive and a natural killer. In fact, when you really examine the fossil and living non-human primate evidence, that is just not the case."
Studying the fossil evidence
Robert Sussman
And examine the evidence they did. Sussman and Hart's research is based on studying the fossil evidence dating back nearly seven million years. "Most theories on Man the Hunter fail to incorporate this key fossil evidence," Sussman says. "We wanted evidence, not just theory. We thoroughly examined literature available on the skulls, bones, footprints and on environmental evidence, both of our hominid ancestors and the predators that coexisted with them."
Since the process of human evolution is so long and varied, Sussman and Hart decided to focus their research on one specific species, Australopithecus afarensis, which lived between five million and two and a half million years ago and is one of the better known early human species. Most paleontologists agree that Australopithecus afarensis is the common link between fossils that came before and those that came after. It shares dental, cranial and skeletal traits with both. It's also a very well-represented species in the fossil record.
"Australopithecus afarensis was probably quite strong, like a small ape," Sussman says. Adults ranged from around 3 to 5 feet and they weighed 60-100 pounds. They were basically smallish bipedal primates. Their teeth were relatively small, very much like modern humans, and they were fruit and nut eaters.
But what Sussman and Hart discovered is that Australopithecus afarensis was not dentally pre-adapted to eat meat. "It didn't have the sharp shearing blades necessary to retain and cut such foods," Sussman says. "These early humans simply couldn't eat meat. If they couldn't eat meat, why would they hunt?"
It was not possible for early humans to consume a large amount of meat until fire was controlled and cooking was possible. Sussman points out that the first tools didn't appear until two million years ago. And there wasn't good evidence of fire until after 800,000 years ago. "In fact, some archaeologists and paleontologists don't think we had a modern, systematic method of hunting until as recently as 60,000 years ago," he says.
"Furthermore, Australopithecus afarensis was an edge species," adds Sussman. They could live in the trees and on the ground and could take advantage of both. "Primates that are edge species, even today, are basically prey species, not predators," Sussman argues.
The predators living at the same time as Australopithecus afarensis were huge and there were 10 times as many as today. There were hyenas as big as bears, as well as saber-toothed cats and many other mega-sized carnivores, reptiles and raptors. Australopithecus afarensis didn't have tools, didn't have big teeth and was three feet tall. He was using his brain, his agility and his social skills to get away from these predators. "He wasn't hunting them," says Sussman. "He was avoiding them at all costs."
Approximately 6 percent to 10 percent of early humans were preyed upon according to evidence that includes teeth marks on bones, talon marks on skulls and holes in a fossil cranium into which sabertooth cat fangs fit, says Sussman. The predation rate on savannah antelope and certain ground-living monkeys today is around 6 percent to 10 percent as well.
Sussman and Hart provide evidence that many of our modern human traits, including those of cooperation and socialization, developed as a result of being a prey species and the early human's ability to out-smart the predators. These traits did not result from trying to hunt for prey or kill our competitors, says Sussman.
"One of the main defenses against predators by animals without physical defenses is living in groups," says Sussman. "In fact, all diurnal primates (those active during the day) live in permanent social groups. Most ecologists agree that predation pressure is one of the major adaptive reasons for this group-living. In this way there are more eyes and ears to locate the predators and more individuals to mob them if attacked or to confuse them by scattering. There are a number of reasons that living in groups is beneficial for animals that otherwise would be very prone to being preyed upon."
The OUL is a left unity project. All who want to help it succeed are invited to make use of it, and also submit their own materials to share
29 December, 2019, 8:22 pm
2 October, 2019, 4:10 pm
29 August, 2019, 6:38 pm


The Sona By FireAngel Mains Powered Heat Alarm Thermistek heat alarm has a patented heat dish to target radiated heat directly onto the heat sensor for a faster reaction to potential fire risk.
The Sona By FireAngel Mains Powered Heat Alarm Thermistek heat alarm has a patented heat dish to target radiated heat directly onto the heat sensor for a faster reaction to potential fire risk. The Thermistek heat alarm, provides Class A1 heat detection and has a sealed for life tamper proof battery that significantly reduces energy consumption.
All Sona Heat alarms are easy to fit with a low profile mounting base and aesthetic design to complement any modern interior.
Normal smoke alarms are unsuitable for use in kitchens due to the amount of false alarms activations from the likes of burnt toast.
Sealed for life tamper proof battery back-up.
Low energy usage – typically less than 10% of the average AC heat alarm.
Ultra slim, integrated mounting base. Quick and simple installation reduces time on site.
Combined central test / silence / locate button.
Mains and battery powered alarms.
Low profile design, aesthetically pleasing that complements all modern interiors.


text:
21-DAY ARABIAN ODYSSEY: ITALY, GREECE, ISRAEL, EGYPT, AND ABU DHABI FROM ROME (CIVITAVECCHIA)
Dubai, United Arab Emirates · About River or Ocean Cruises · from $3,346.00 CAD
21-DAY ARABIAN OD...
21 Nights | 21-DAY ARABIAN ODYSSEY: ITALY, GREECE, ISRAEL, EGYPT, AND ABU DHABI FROM ROME (CIVITAVECCHIA)
You will see the following on your experience
Rhodes is the largest of the Dodecanese islands in terms of land area and also the island group's historical capital. Administratively the island forms a separate municipality within the Rhodes regional unit, which is part of the South Aegean administrative region. It is located northeast of Crete, southeast of Athens and just off the Anatolian coast of Turkey. Rhodes' nickname is The island of the Knights, named after the Knights of Saint John of Jerusalem, who once conquered the land. Historically, Rhodes was famous worldwide for the Colossus of Rhodes, one of the Seven Wonders of the Ancient World. The Medieval Old Town of the City of Rhodes has been declared a World Heritage Site. Today, it is one of the most popular tourist destinations in Europe.
Dubai is the most populous city and is one of the seven emirates of the United Arab Emirates (UAE). It is located south of the Persian Gulf on the Arabian Peninsula and has the largest population with the second-largest land territory by area of all the emirates, after Abu Dhabi. Dubai and Abu Dhabi are the only two emirates to have veto power over critical matters of national importance in the country's legislature. It is rather like an independent city-state and is the most modern and progressive emirate in the UAE, developing at an unbelievable pace in the tourist and trade sectors especially. Recently Dubai won the bid to host EXPO 2020, a Universal scale Registered Exposition approved by the Bureau of International Expositions (BIE), Paris.
Haifa International Airport
Haifa is the third-largest city in the State of Israel. It is home to the Bahá'í World Centre, a UNESCO World Heritage Site and a destination for Baha'i pilgrims. Built on the slopes of Mount Carmel, the settlement has a history spanning more than 3,000 years. The earliest known settlement in the vicinity was Tell Abu Hawam, a small port city established in the Late Bronze Age (14th century BCE). In the 3rd century CE, Haifa was known as a dye-making center. Today, the city is a major seaport located on Israel's Mediterranean coastline in the Bay of Haifa covering 63.7 square kilometres (24.6 sq mi). The city plays an important role in Israel's economy. It is also home to Matam, one of the oldest and largest high-tech parks in the country. Haifa Bay is a center of heavy industry, petroleum refining and chemical processing. Haifa formerly functioned as the western terminus of an oil pipeline from Iraq via Jordan.
Suez is a seaport city in north-eastern Egypt, located on the north coast of the Gulf of Suez (a branch of the Red Sea), near the southern terminus of the Suez Canal, having the same boundaries as Suez governorate. It has three harbors, Adabya, Ain Sukhna and Port Tawfiq, and extensive port facilities. Together they form a metropolitan area. Railway lines and highways connect the city with Cairo, Port Said, and Ismailia. Suez has a petrochemical plant, and its oil refineries have pipelines carrying the finished product to Cairo.
Cyprus is an island country in the Eastern Mediterranean Sea, off the coasts of Syria and Turkey. It is the third largest and third most populous island in the Mediterranean, and a member state of the European Union since May 1, 2004. It has a rich, turbulent history stretching back to antiquity. Cyprus is also famed for its lovely hotel resorts, beaches, archaeological sites relating to the cult of Aphrodite, including ruins of palaces, tombs and mosaic-adorned villas.
Abu Dhabi, the capital and the second largest city in the United Arab Emirates, lies on a T-shaped island jutting into the Persian Gulf from the central western coast. The city is also one of the most modern cities in the world. Abu Dhabi features large gardens and parks, green boulevards lining all the streets and roads, sophisticated high-rise buildings, international luxury hotel chains and opulent shopping malls.
Mascat
Muscat is the capital of Oman. It is also the seat of government and largest city in the Governorate of Muscat. As of 2008, the population of the Muscat metropolitan area was 1,090,797. The metropolitan area spans approximately 580 square miles and includes six wilayats. Known since the early 1st century CE as an important trading port between the west and the east, Muscat was ruled by various indigenous tribes as well as foreign powers such as the Persians and the Portuguese Empire at various points in its history. A regional military power in the 18th century, Muscat's influence extended as far as East Africa and Zanzibar. As an important port-town in the Gulf of Oman, Muscat attracted foreign tradesmen and settlers such as the Persians, the Balochs and Gujaratis.
Piraeus is a city in the periphery of Attica, Greece and within the Athens urban area, located 12 km southwest of its center and upon the Saronic Gulf. According to the 2001 census, Piraeus has a population of 175,697 people within its administrative limits, making it the third largest municipality in Greece and the second within the Greek capital following the municipality of Athens. The Piraeus urban area extends beyond the administrative city limits to the suburban municipalities, with a total population of 466,065.
Kuşadası is a coastal resort town in the Aydin Province of Aegean Turkey. It has become a popular holiday resort, especially for visitors from Northern and Western Europe. It has about 50,000 residents, although that grows significantly during the high season from May to October. The lovely city caters to tourists, growing to over half a million during the high season, when the large resort fills with tourists (from Turkey itself, northern Europe and the Balkans) plus the hotel staff, bar staff, construction workers, and drivers who are needed to work in the restaurants servicing all these visitors. The hills behind Kuşadasi are built up with big hotels and blocks of holiday flats.
Civitavecchia is a town and comune of the Metropolitan City of Rome in the central Italian region of Lazio. A sea port on the Tyrrhenian Sea, the name ''Civitavecchia'' means "ancient town". The modern city was built over a pre-existing Etruscan settlement. The massive Forte Michelangelo was first commissioned from Donato Bramante by Pope Julius II, to defend the port of Rome. The upper part of the "maschio" tower, however, was designed by Michelangelo, whose name is generally applied to the fortress. North of the city at Ficoncella are the Terme Taurine baths frequented by Romans and still popular with the Civitavecchiesi. The modern name stems from the common fig plants among the various pools. And also next to the town is the location of the cruise ship docks. All major cruise lines start and end their cruises at this location, and others stop for shore excursion days that allow guests to see Rome and Vatican sights, which are ninety minutes away.
Bur Safajah
Bur Safājah is a city in Egypt. It is located in the gouvernement of Al-Bahr al-Ahmar, in the eastern part of the country, 500 km southeast of the capital Cairo. Located 23 meters above sea level, the terrain around the cage Safājah is flat to the northeast, but in the south it is hilly. It is also a tourist area that consists of several bungalows and rest houses, including the Safaga Hotel, with a capacity of 48 rooms (126 beds). The resort is known for its unpolluted atmosphere, black sand-dunes and mineral springs which have acquired specific characteristics for remedy of rheumatoid arthritis and psoriasis. Having numerous phosphate mines, it is regarded as the phosphates export center.
Khasab is a city in an exclave of Oman bordering the United Arab Emirates. It is the local capital of the Musandam peninsula and has frequently been dubbed the "Norway of Arabia" because of its extensive fjord-like craggy inlets and desolate mountainscapes. The Portuguese built Khasab at the beginning of the 17th century, at the height of their naval presence in the region. The natural harbour gave shelter from tough seas. Unlike many forts, which were built on high ground for defensive purposes, Khasab was designed as a supply point for dates and water for Portuguese ships sailing through the strait. Today, Khasab is protected from floods by three large dams.
Al Aqabah
Interested in 21-DAY ARABIAN ODYSSEY: ITALY, GREECE, ISRAEL, EGYPT, AND ABU DHABI FROM ROME (CIVITAVECCHIA)?
15-DAY TRANSATLANTIC FROM NEW YORK CITY
Civitavecchia, Italy | River or Ocean Cruises
7-DAY WESTERN CARIBBEAN FROM MIAMI
Riviera Maya, Mexico | River or Ocean Cruises
10-DAY SOUTHERN CARIBBEAN FROM SAN JUAN
Saint Thomas Island, US Virgin Islands | River or Ocean Cruises
7-DAY ALASKA WITH GLACIER BAY FROM VANCOUVER (NORTHBOUND)
Seward, Alaska | River or Ocean Cruises
Xcursions
All content Copyright 2020, Xcursions


text:
Womxn Stories
Wellbeing Offer
WomxnConnect
about womxn for womxn
Wise Womxn
Businesswomxn
Jayne Meyer Tucker
I am a curious womxn with a passion for helping people and organisations be okay with embracing uncertainty.
My life-long fascination with uncertainty has its foundation in having lived a life of uncertainty. For nearly six decades, I have lived with the uncertainty of seizures, in which those seizures were a secret – even to me. I am embarking on a memoir journey to better understand these secrets and create a space for myself and others to embrace uncertainty rather than fight it.
What's easy for you as a womxn?
Due to my life experiences, I find making decisions, particularly in times of uncertainty, something I am quite skilled at or at least at ease with.
My philosophy and approach to life, which I call Balance Point, comes from the intersection between conventional wisdom and my womxn's intuition, a fusion of my intellect and innate gift. I understand that balance is not about being 'even or in the middle' but being okay with uncertainty or being 'out of balance'.
Most importantly, balance means considering opposites or dualities of the decision/s to be made. Secondly, balance seeks the best foundation/s to support the decision/s to be made whilst considering both short-and long-term gains. Thirdly, balance requires navigating and tracking the decision-making process - simply meaning - expect things to change - what is right for this moment may not be the case for the next moment.
What's difficult for you as a womxn?
My biggest difficulty has been and continues to be asking for help from others including even letting myself be helped by myself. This is my vulnerability, which sits on the other side of my strength.
I don't know how old I was when I had my first seizure, mainly because the seizures were kept secret within my family and away from my community. When something occurs from the beginning of your life – in my case, seizures - and you have no awareness that they are strange or different, then they become as normal to you as does a sneeze or cough. This is in fact a form of subconscious denial which hampered my ability to ask for help.
I have also had three extreme cases of concussion, which have also contributed to my condition (secrets) until I began to explore this further in my 50s. The key concussion incident resulted from a tragic car accident when, at the age of 23, I was widowed. After being placed in an induced coma, the seizures became more public. From that point on and for almost three decades, my biggest difficulty was speaking openly about my seizures. For a long time, I couldn't even say the word seizure – until now.
How do you maintain mental fitness/emotional health?
In some respect my confrontations with trauma, particularly brain trauma, has forced me to rehabilitate both physically and mentally.
Following the catastrophic car accident, which I survived after a period of intense physical rehabilitation, I completely ignored the necessary emotional healing. I now describe this period of my life and learning as an example of not making better decisions. In fact, I became expert at ignoring the needs of my psyche and brain, choosing instead to focus on my bodily repair. As I draw nearer to my sixth decade, my mental and emotional fitness has become even more prominent in my life.
What brings you joy and vitality?
Water and movement both play a big part of joy for me in my life. For as long as I can remember, I have either had a hobby or opportunities to be in or near water - be it pools, oceans, sink holes or even baths. Equally as important to me is the ability to move and opportunities to dance or exercise to music which places me in an immediate position of flow.
My innate curiosity also forms part of my vitality as I love to learn. My PhD was one of the most revolutionary experiences of my life and set me on the pathway to recognise with even more clarity my purpose and insights around uncertainty.
Spending time with my significant others is most important and although my husband Ronnie (I was fortunate to have met my second soul mate) and I chose not to have children, we are blessed by having healthy happy families and friends who also bring joy into our lives. We enjoy theatre, walks, eating out and travel (when travel returns).
How do you nurture your relationship with nature?
My connection with nature is simple as it involves exercising and movement outside. Over the years, this has taken many forms from horse riding as a child, running as a young adult, bike riding and Pilates in the most recent times. The impact from being so active in my younger years has now demanded a slower pace. Interestingly, this intersection of being slower and in nature has more strongly clarified my life's purpose.
Where do you feel a sense of belonging/community?
Sense of belonging/community for me is always best described as flow. I feel in flow when I am writing, learning or being active. Once again, I am drawn to water and can easily lose myself in my thoughts like when spending time on my stand-up paddleboard.
I align the sense of belonging and community with being at peace and therefore find this experience to also have no boundaries. This understanding has taken me a lifetime to recognise as in my earlier years I held expectations that a sense of belonging was something others had to give me almost like an expectation or a demand.
Where do you live/work?
I am a first generation Australian and live and work in Tumbalong (Darling Harbour Sydney), which is part of Gadigal country. My parents were ten-pound poms so my dual citizenship allowed me to live and work in the UK for nearly two decades while travelling the world. My second husband and I immigrated back to Australia in 2007, ready to start the next chapter of life (I call this the glowing years) in Australia.
What ideas are you working on, or playing with, or just sitting with now?
I am exploring the topic, Secret Seizures, for my memoir. I am also developing a Roadmap for Uncertainty as a resource in the writing of my memoir. As a result of the global pandemic (COVID 19) and during the 2021 lockdown period my fascination around uncertainty and research has intensified.
I was immediately interested in Jayne's experience of secrets as it is a topic I have been pondering also. There's a tension between privacy and open disclosure, a tension between how you are currently viewed and how you will be viewed if the secret becomes known. It can make you feel vulnerable, wary of pity. Perhaps fear of judgement is at the core of all secrets, we can move past this judgement by revealing our secrets to the non-judgemental people in our lives. As they respond with acceptance, compassion and validation it strengthens our own acceptance and commitment to a non-judgemental stance.
About Jayne
Founder and Director of JMT BalancePoint, Jayne Meyer Tucker (aka Dr JMT) says the lessons she has learned about the importance of finding balance in times of uncertainty stem from her six decades of living with the consequences of brain trauma and research. A former Director of Sure Start Dover UK government reform, CEO Good Beginnings Australia, Deputy Director of CCA and Director of The Growth Project, Jayne says research has helped her identify the tools for embracing uncertainty.
womxn
Nicole Duyst
*We acknowledge the Turball Jagera peoples,
the traditional owners of the land on which we live and work, we honour the elders of the past, present and those emerging.*


text:
Home » Entertainment » Walter Gretzky Net Worth
Walter Gretzky Net Worth
Updated : Dec 8, 2020, First Published Mar 6, 2015 Max Smith
Wayne Douglas Gretzky is a Canadian former professional ice hockey player and former head coach with an unknown net worth amount. During his active years in game, he has played 20 seasons in the National Hockey League (NHL) for four teams from 1979 to 1999. He has been nicknamed as "The Great One" and also he has been called "the greatest hockey player ever" by many sportswriters, players, and the NHL itself. On the game history, he is the leading point-scorer in NHL history, with more assists than any other player has points, and is the only NHL player to total over 200 points in one season – a feat he accomplished four times. In addition, he tallied over 100 points in 16 professional seasons, 14 of them consecutive. At the time of his retirement in 1999, he held 61 NHL records: 40 regular-season records, 15 playoff records, and six All-Star records. As for the end of 2014, he still holds 60 NHL records.
Born and raised in Brantford, Ontario, Gretzky honed his skills at a backyard rink and regularly played minor hockey at a level far above his peers. Despite his unimpressive stature, strength and speed, Gretzky's intelligence and reading of the game were unrivaled.
In 1978, he had signed with the Indianapolis Racers of the World Hockey Association (WHA), where he had briefly played before being traded to the Edmonton Oilers. When the WHA folded, the Oilers joined the NHL, where he established many scoring records and led his team to four Stanley Cup championships. His trade to the Los Angeles Kings on August 9, 1988, had an immediate impact on the team's performance, eventually leading them to the 1993 Stanley Cup Finals, and he is credited with popularizing hockey in California. Gretzky has played briefly for the St. Louis Blues before finishing his career with the New York Rangers. Gretzky captured nine Hart Trophies as the most valuable player, ten Art Ross Trophies for most points in a season, two Conn Smythe Trophies as playoff MVP, and five Lester B. Pearson Awards for most outstanding player as judged by other players. He won the Lady Byng Trophy for sportsmanship and performance five times, and often spoke out against fighting in hockey.
After his retirement in 1999, he was immediately inducted into the Hockey Hall of Fame, making him the most recent player to have the waiting period waived. The NHL retired his jersey number 99 league-wide, making him the only player to receive this honor. He was one of six players voted to the International Ice Hockey Federation's (IIHF) Centennial All-Star Team.
Later he became executive director for the Canadian national men's hockey team during the 2002 Winter Olympics, in which the team won a gold medal. In 2000, he became part owner of the Phoenix Coyotes, and following the 2004–05 NHL lockout he became the team's head coach. In 2004, he was inducted into the Ontario Sports Hall of Fame.
Jon Lord Net Worth
Is Wayne Gretzky still married to wife Janet Jones?


Fate / Extella Link is another part of the Fate series, set in a universe known for its visual novels and anime. This is an action game in which we observe the world from the third person (behind the hero). The game is a sequel to Fate / Extella: the Umbral Star, released in July 2017.
The action takes place immediately after the events presented in the passed part. We visit the digital world of SE.RA.PH and participate in the conflict because of the desired Holy Grail (supercomputer Moon Cell Automaton).
Fate / Extella Link is a three-dimensional action game in which we control a so - called Servant-powerful warriors with superhuman abilities. Players have a variety of characters, such as Nero Claudius, anonymous, Gawain, Ku Chulainn, Whether Shuwen, but Tamamo Mo, Karna, Elizabeth Bathory, Lu BU Fengxian, Medusa, Altera, Gilgamesh, Joan of Arc, Iskandar, Atoria Pendragon and Archimedes. These characters are divided into several classes (Swordsman, Archer, Lancer, caster, Assassin, rider, Berserker and Extra class). Each of them has their own skills that we use to fight legions of enemies. Opportunities are divided into several categories, for example, "Active skill" (allowing you to strengthen allies or weaken enemies) or "Mass skill" (most often it is a powerful attack on the area, destroying entire groups).
In addition, we have the ability to "combine" characters, so we strengthen their attributes and make joint coordinated attacks. Battles take place in real time and are characterized by high speed and efficiency. For the victory we get experience points that allow us to develop the characters. Compared to Fate/Extella: Umbral Star, in addition to Link's mechanics, there's also a new special type of mission you perform by capturing sectors on each of the maps.


Home Musings Day-to-Day Encounters What Can You Do?
In one smooth motion, I somehow squeeze through the 2 inches of clearance between the arc of the opening door — an arc fatally abbreviated by the front edge of the toilet — and the industrial-size toilet-paper dispenser. It's a clearance graciously provided by the building designers, presumably the better to meet regulations by squeezing one more stall into the space squeezed out of the space that has revenue-generating potential.
Am I at a sports arena? A highway rest stop? An airport? An arts or community complex? I can't remember.
Am I in Canada? In the USofA? I forget.
In truth, commercial restrooms all look and function pretty much alike.
As I prepare to, umm, settle in, I look around to see if I'll be holding my purse on my head, or if there's a hook provided on the door.
Do not use the hooks on the doors in the stalls.
Thieves come along and lift off the jackets.
The cautioner is a gendarme standing at the entrance to a restroom in a French airport; the cautionee, a former colleague of mine with a perpetual twinkle and a delight in the absurdities of the world as it is.
but the thieves, they put them back.
As I note the remnants of the hook installation in this stall, my reaction swerves erratically for just a second. I watch dispassionately to see where it will land. Irritation? Amusement? Frustration? Anger? Relief?
And another face . . . Bonus!
But changing the world's absurdities — whether it's poor restroom design or poor maintenance or poor behaviour — is likely beyond even my extensive powers. So as I balance my purse on my head, I shrug. Missing a Gallic flair by just a hair, I'm sure.
Are there really "hook thieves" looking for loot in enclosed restroom stalls? I have on occasion wondered if any man has ever been pick-pocketed while standing at a urinal?
All of which reminds me of a true story I heard a couple of weeks ago.
I attended a retirement party for a lawyer. He and another lawyer started a practice in 1967. In those days – and I didn't know this – lawyers weren't allowed to advertise; all they could have was a small plate on their door indicating who they were. They rented an office in a downtown building and put their name plate on the door. They had no clients.
Tom – Well, I always thought this was an urban legend, until my one-time colleague told me about the gendarme. Who knows? As for the lawyer story, that's really funny.
Now, what I have always wondered (in there where there is little else to contemplate) is why the hook is on the door and not on the "wall" (side panel). No answers so far.
Judith – Well, you might have telepathically influenced restroom designers, because I'm seeing more hooks on those very side walls. Hurray!
Judith — In all the "better" cubicles, the hook is chest-high, on a side wall.
But I suspect it's one of those — it happened ONCE, so Something has to be done!!!!
But, better safe that trying to reach for — in mid stream — the fast-disappearing purse, up, up and away.
A — Take off your shoes, travelers — knee-jerk reaction.
if it already hasn't by young sprouts, if they don't Google it.
Do not put feminine pads in the toilet.
Use the container provided for that purpose.
As English Majors (whatever that means), my roommate and I took them all down (it took hours) and sent them to the Chancellor of the school to grammatically fix.
We got no reply — not surprising, when it was an anonymous parcel — but the signs were all put back up, as is.
So we gave up, but only after hand-printing the error on the signs on every one of them.
Smart alecky Youth: The Age of Pranks. Good Times.
Barbara – I can just imagine the consternation in the Chancellor's anteroom! LOL. Gotta go for it when the spirit moves you.


Mark Burrows meets Iraqi-Australian doctor Munjed al Murderis, a leading orthopaedic surgeon.
When Munjed Al Muderis fled war-torn Iraq, he escaped with just two things: a medical journal and the determination to start a new life. In the years since, he has put both to great use. After arriving in Australia as an illegal immigrant, Associate Professor Al Muderis is now one of the most skilled surgeons in the world. His expertise is in a revolutionary procedure called Osseointegration, which fuses human bones with robotic limbs. On assignment for 60 MINUTES, Mark Burrows reports on an operation this remarkable surgeon performs to rebuild the often-troubled soldiers who fought in conflict zones like his old homeland – good men such as US Army Captain Luis Montalvan.


which has just been mentioned will convey the voice distinctly when placed against the skull of the hearer, and will even, according to Dr. Thomas, convey audible speech from the skull of one to that of the other. The efforts to make the audiphone and denta-phone useful as regular instruments of hearing to the deaf have not had satisfactory results. Dr. Thomas acknowledges that the expectations which have been excited on the subject are likely to be disappointed. Those who are able to hear with the aid of the audiphone hear their own voices perfectly without it; while those who are unable to hear their own voices without it can hear nothing with it. Dr. Charles S. Turnbull, of Philadelphia, states in the "Medical and Surgical Reporter" that his experience with these instruments has been as nothing, because the suitable cases were so few and far between. The cases in which they have proved of benefit are cases of acoustic deafness, generally due to middle-ear disease, for which devices of the nature of the ear-trumpet generally afford a more satisfactory remedy than either of the instruments under consideration.
Deterioration of Bookbinding by Illuminating Gas.—Professor William Ripley Nichols publishes an interesting paper on the deterioration of the binding of books in libraries, which is commonly ascribed to the action of sulphuric acid supposed to be generated by burning coal-gas. The agency of sulphuric acid having been disputed by Dr. Wolcott Gibbs and others, Professor Nichols made investigations to determine the question. Having examined a large number of samples of leather in every stage of decay, he found that morocco was but little affected, common sheep binding was attacked, and Russia leather and calf were badly acted upon. An acid taste and an acid reaction were observed that were more marked in proportion as the leather was decayed, and sulphuric acid was found in the extract made from the leather with water, in a similarly increasing proportion. Ammonia was also present, in about such a proportion as in combination with the sulphur would constitute the acid sulphate of ammonia. Samples of fresh leather gave extracts only slightly acid, not enough so to affect the taste, and contained only a minute amount of sulphuric acid in combination. Samples of Russia leather and sheep of good quality yielded from less than a quarter to less than a half of one per cent, of acid, and less than quarter of one per cent, of ammonia. A sample of well-worn but not decayed sheep taken from a Bible more than sixty years old, which had never been exposed to gas, gave 1·42 per cent, of sulphuric acid. Other samples, of very rotten Russia, and of scrapings from a number of books, gave from eight to ten per cent, of sulphuric acid, combined with ammonia. A quantity of rotten leather was carefully extracted with water, and crystals of sulphate of ammonia were obtained from it. It is difficult, in the face of these facts, Professor Nichols urges, to escape the conviction that bindings of Russia, calf, or sheep absorb sulphuric acid when exposed to the products of the combustion of illuminating gas. No other condition to which books are commonly exposed can so well account for the large proportion of acid which was found in the old bindings. It has been objected to this view that sulphurous (not sulphuric) acid is the general product of the combustion of sulphur compounds; but Professor Nichols's analyses of the results of the burning of gas have brought out sulphates with no evidence of the presence of a sulphite. It is admitted to be possible that the disintegration of the leather precedes the absorption of sulphuric acid, and prepares the way for it; and Professor Nichols intends to make experiments for the determination of this question.
We ask the attention of our readers to the premiums offered to new subscribers for "The Popular Science Monthly." No such valuable list of modern scientific works has ever before been prepared for such a purpose; and no other publishing-house in this country or in the world is able to furnish from its own stock such a varied and admirable popular scientific library as that which D. Appleton & Company now present for the choice of those who will become subscribers to this periodical. It is important that its patronage and influence should be increased.
This page was last edited on 25 August 2018, at 14:43.


text:
Q: Simple webpage fade out effect using CSS and HTML I have a very simple method below using CSS that fades in a webpage when the visitor arrives at the site. However, when the visitor leaves to another site, the page disappears abruptly instead of a smooth fade out before leaving.

Question:
How can I modify the code below using only CSS to achieve a simple
  fade out effect when the visitor leaves the page?

CSS:
@keyframes fade {
     0% {opacity: 0;}
     100% {opacity: 1;}
}
@-webkit-keyframes fade {
     0% {opacity: 0;}
     100% {opacity: 1;}
}
@-moz-keyframes fade {
     0% {opacity: 0;}
     100% {opacity: 1;}
}
@-o-keyframes fade {
     0% {opacity: 0;}
     100% {opacity: 1;}
}

html {
    opacity: 0;
    animation: fade 3s ease-in-out 1.5s forwards;
    -webkit-animation: fade 3s ease-in-out 1.5s forwards;
    -moz-animation: fade 3s ease-in-out 1.5s forwards;
    -o-animation: fade 3s ease-in-out 1.5s forwards;
}

redpajama_set_name: RedPajamaStackExchange


Perkins School for the Blind ("Perkins") grants permission to reproduce and publish materials from its collections ("Materials") in its capacity as owner of the physical Materials. It is the researcher's or publisher's ("User's") responsibility to obtain permission from the owners or holders of any rights in Material being quoted, reproduced or published. Publishing includes, but is not limited to any posting on the internet (e.g., websites, blogs, genealogy sites, social media), books, audio/visual productions, and magazines. Questions and clarification of intended use can be directed to Archives@Perkins.org.
Credit line: A credit line must be included for all Materials used. The credit line shall read: "Courtesy of Perkins School for the Blind Archives". This credit must be included at each reproduced image and in each footnote and endnote reference. Additional credits may be necessary if requested by donors.
One-time use: Permission is granted for one-time use only. Materials may only be used for the publication described on this form and may not be reused without written permission of Perkins. In the case of internet or web-based publication, specific written permission must be obtained from Perkins prior to the use of any Materials.
Copyright: This document does not grant any copyright permission or license. Perkins does not claim to own the rights to all of the Materials in its collections. The User assumes all responsibility for obtaining all reproduction permission and rights and for any infringement under U.S. Copyright Laws.
On-demand and/or photographed materials: If permission is granted for the publishing party to photograph or scan any visual materials in the Perkins Archives, all such negative, positive, or digital reproduction must be returned to the Archives or destroyed after use.
Contribution of copy: A copy of the publication must be provided for Perkins' review before publication and the final publication containing the image(s) must be donated to Perkins Archives immediately after publication. (In some circumstances a copy is requested, but not required.) You must provide the Perkins Archives with the URL or internet location for all websites where the images are displayed.
Image alterations: Photographs may be cropped to suit design and layout, but they may not be altered or drawn upon so that they look in any way different from the way they appear in the Perkins Archives.
Right to decline and/or refuse: The Perkins Archives reserves the right to decline onsite photography. The Perkins Archives reserves the right to refuse permission to Users to reproduce, publish, or use Materials in any way for any reason.
Fee: Users agree to pay all fees incurred with this request. All fees are per image, and all sales are final.
Effect of non-compliance: Failure to comply with one or more of the conditions stated herein may result in the loss of any permission granted and the denial of future requests for reproductions.
Liability: Users shall indemnify, defend, and hold harmless Perkins and its employees, directors, officers, and agents from and against any and all claims, injuries, liabilities, damages, losses, costs, and expenses of every kind and nature, including, but not limited to attorneys' fees, regardless of whether caused in part by Perkins, arising out of or in any way related to (1) any injury to any person or damage to property, including Materials, arising out of User's presence on Perkins' property; (2) any and all other acts, omissions or errors of User; and (3) any breach or default of any term or obligation in this Contract.
Please provide the description, Flickr.com URL, or digital identifier for each image and intended placement.


text:
Coronation treat
A MOTOR museum has more on display than just cars to mark the Queen's 80th birthday this weekend.
Mouldsworth Motor Museum on Smithy Lane has 40 cabinets full of coronation badges dating from the reign of George VI - but many of them hail from Queen Elizabeth's time as monarch.
James Peacop, who owns the museum, said: 'We have so many designs, they are all fantastic. I was an art teacher until retirement and still a working artist, so I appreciate the craftsmanship that has gone into them all.'
The museum opened in 1971 and has been steadily collecting a range of memorabilia since then, including old pumps, signs, mascots and garage paraphernalia as well as a wide selection of vintage vehicles.
But its stock of royal badges will be the thing that regal enthusiasts will appreciate most.
The stock is housed in a 1930s Art Deco building, a former water softening plant which went out of business in 1961.
James said: 'The badges tell a story of our history, both through their regal elements and the artistic shifts in the design.
'They are all the more relevant now the Queen has reached this birthday. They will be even more important in years to come.'


View Test Prep - Quantitative-Analysis-for-Management-12th-Edition-Test-Bank-Barry-Render.pdf from MANAGEMENT C207 at Western Governors University. Quantitative Analysis for Management�... The bestselling project management text for students and professionals now updated and expanded. This Eleventh Edition of the bestselling "bible" of project management maintains the streamlined approach of the prior editions and moves the content even closer to PMI?s Project Management Body of Knowledge (PMBOK).
12 PMBOK4 PMBOK5 Chapter 7 Project Cost Management Chapter 7 Project Cost Management 7.1 Plan Cost Management 7.1 Estimate Costs 7.2 Estimate Costs 7.2 Define Budget 7.3 Determine Budget 7.3 Control Costs 7.4 Control Costs PMBOK 5th Edition . 13 7.1 Plan Cost Management Is the process that establishes the policies, procedures, and documentation for planning, managing, �... Project Management: A Systems Approach to Planning, Scheduling, and Controlling, by Harold Kerzner, 2009, 10th edition, John Wiley & Sons, Australia. Recommended texts 1- Project Management Workbook and PMP/CAPM Exam Study Guide, Harold Kerzner and Frank P. Saladis, 11th edition 2013, John Wiley.
In Goal Directed Project Management the authors emphasize the need to develop people�s involvement and commitment to a project, which they refer to as �PSO� (people, systems and organization).


2. Changes in the Physicianresourcecenter.comWebsite. VIP reserves the right to change the terms and conditions of access to and the use of the Physicianresourcecenter.com Website at any time. You should consult the most recent version of this User Agreement (not an older cached version) each time you view the Physicianresourcecenter.com Website. By accessing the Physicianresourcecenter.com Website, you agree in advance to be bound by all of the changes to the Physicianresourcecenter.com Website.
3. Use of the Physicianresourcecenter.com Website. You may use the Physicianresourcecenter.com Website to include the information and images ("Content") solely for your non-commercial, personal purposes. No right, title or interest in any Content is transferred to you, whether as a result of downloading such Content or otherwise. Physicianresourcecenter.com reserves all title to the intellectual property rights contained in all of the Content. Unless you are given express written authorization by VIP, you may not use, alter, copy, distribute, transmit, or derive another work from any Content unless you have express written authorization from VIP.
5. VIP Copyright Notice. VIP holds the sole and exclusive copyright to all works of authorship contained in the Physicianresourcecenter.com Website, including, but not limited to, all design, text and images contained therein, which may not be copied, reproduced, transmitted, displayed, performed, distributed, rented, sublicensed, altered, stored for subsequent use or otherwise used in whole or in part in any manner without VIP's prior written consent except to the extent that such use constitutes "fair use" under the Copyright Act of 1976 (17 U.S.C. § 107), as amended, and except for one temporary copy in a single computer's memory and one unaltered permanent copy to be used by the viewer for personal and non-commercial use only, with a copy of this page which contains the entire User Agreement as well as disclaimers, trademark and service mark notices, and copyright notices.
6. Linking to the Physicianresourcecenter.com Website. You may provide a hypertext link to this Website on another website only upon the following terms and conditions: (a) the appearance, position and other aspects of the link may not be such as to damage or dilute the goodwill associated with VIP's name, physicianresourcecenter.com, VIP's works of authorship, Physicianresourcecenter.com's Website content and design, and/or VIP's marks, (b) the appearance, position and other aspects of the link may not create the false appearance that an entity other than VIP is associated with or sponsored by VIP, and (c) VIP reserves the right to revoke its consent to the link at any time in its sole discretion.
7. Links to OtherWebsites. VIP may provide links on the Physicianresourcecenter.com Website to other websites that are not under the control of VIP. In general, any website that has an address (or URL) that does not contain "http:// physicianresourcecenter.com" or "http://physicianresourcecenter" is such a website. These links are provided for convenience of reference only and are not intended as a warranty or representation from the VIP Group of any type of information regarding the linked website or the information contained in the linked website. Further, VIP does not control and is not responsible for the content found on the other websites. VIP's inclusion of links to other websites does not imply any endorsement of the material on the other websites or any association with the operators of the websites.
8. Physicianresourcecenter.com Mark's Notice. The mark physicianresourcecenter.com SM is a lawfully protected mark of VIP and may not be used without the prior written consent of VIP.
9. Disclaimer of Warranties. The VIP Group makes no representations and/or warranties, either express or implied, and hereby expressly disclaims all warranties regarding the Physicianresourcecenter.com Website, including, but not limited to, any representation and/or warranty concerning the accuracy, completeness, timeliness, currency, merchantability, fitness for a particular purpose, or non-infringement of the Physicianresourcecenter.com Website. Because of the nature of the information contained in the Physicianresourcecenter.com Website, there may be inaccuracies, errors, and/or changes in the information contained in the Physicianresourcecenter.com Website, and as a result you should not rely on the information or photographs in making your vacation decision. Opinions and recommendations contained in the Physicianresourcecenter.com Website (or any linked websites) are not necessarily those of the VIP Group or endorsed by the VIP Group. You understand and agree that the opinions, recommendations and other information contained in the Physicianresourcecenter.com Website (or any linked websites) are not a reasonable substitute for thorough consultation with appropriately trained professionals familiar with your circumstances, and you agree that you will hold harmless the VIP Group from all claims arising out of or related to your access or use of the Physicianresourcecenter.com Website, or your inability to access or use the Physicianresourcecenter.com Website, or the information contained in this Physicianresourcecenter.com Website, including, but not limited to, claims that you have found information on the Physicianresourcecenter.com Website that was not true, or was obscene, offensive, or defamatory.
11. Governing Law and Jurisdiction. This User Agreement is governed by the laws of the State of California. By accessing the Physicianresourcecenter.com Website, you hereby consent to the exclusive jurisdiction and venue of courts in San Diego County, State of California for all disputes arising out of or relating to the use of the Physicianresourcecenter.com Website. Use of the Physicianresourcecenter.com Website is unauthorized in any jurisdiction that does not give effect to all provisions of these terms and conditions, including without limitation this paragraph.
12. Indemnification. You understand and agree that you are personally responsible for your behavior on Physicianresourcecenter.com Website. You agree to indemnify, defend and hold harmless the VIP Group, its affiliated companies, licensors, licensees, employees, agents, and any third party information providers to Physicianresourcecenter.com Website from and against all claims, losses, expenses, damages and costs (including, but not limited to, direct, incidental, consequential, exemplary, and indirect damages) and reasonable attorneys' fees, resulting from or arising out of your use, misuse, or inability to use Physicianresourcecenter.com Website or the Content, or any violation by you of this User Agreement.
13. User Conduct. You agree to use Physicianresourcecenter.com Website only for lawful purposes, you agree not to take any action that might compromise the security of Physicianresourcecenter.com Website, render Physicianresourcecenter.com Website inaccessible to others or otherwise cause damage to Physicianresourcecenter.com Website or to the Content. You agree not to add to, subtract from, or otherwise modify the Content, or attempt to access any Content that is not intended for you. You agree not to use the Physicianresourcecenter.com Website in any manner that might interfere with the rights of third parties.
15. Password Security. If you registered to use the Physicianresourcecenter.com Website, you are responsible for maintaining the confidentiality of your identification and password information. Further, you are responsible for restricting access to your computer to prevent the disclosure of your identification and/or password information to persons who are not authorized to have such information. You agree to accept responsibility for all activities that occur under your identification number and password.
16. Invalid Provisions. If any part of this User Agreement is determined to be invalid or unenforceable pursuant to applicable law including, but not limited to, the warranty disclaimers and liability limitations set forth above, then the invalid or unenforceable provision shall be deemed superseded by a valid, enforceable provision that most closely matches the intent of the original provision and the remainder of this User Agreement shall continue in effect. This User Agreement constitutes the entire agreement between you and the VIP Group with respect to the Physicianresourcecenter.com Website (as well as the links to other websites) and it supersedes all prior agreements, if any, between you and the VIP Group in connection with the Physicianresourcecenter.com Website. A printed version of this User Agreement and of any notice given in electronic form from Physicianresourcecenter.com shall be admissible in a judicial or administrative proceedings based upon or relating to this User Agreement to the same extent and subject to the same conditions as other business documents and records originally prepared and executed.
17. Risks of Electronic Transmission of Data. There may be risks associated with the use of the Internet regarding security, transmission, or other risks. You agree to expressly assume any and such risks. You are responsible for obtaining all software, hardware or other equipment necessary to access Physicianresourcecenter.com Website which may require antivirus software, anti-spy ware software, Internet security software, and/or a recent web-browser.


text:
Q: authorize aws security group using python boto3 with description for each ingress I am preparing a script to update security group with myip and static string when ever i am running with different network connection .
sg.authorize_ingress(DryRun=False,IpPermissions=[{'IpProtocol': 'tcp','FromPort': 22,'ToPort': 22,'IpRanges': [{'CidrIp': 192.168.2.3/32}]}])

above authorize is working fine but if i add
sg.authorize_ingress(DryRun=False,IpPermissions=[{'IpProtocol': 'tcp','FromPort': 22,'ToPort': 22,'IpRanges': [{'CidrIp': 192.168.2.3/32,'Description': 'string'}]}])

As per the syntax if i apply description part it throws an error msg . whether it is possible to update each and every entry with description.
syntax:
'IpRanges': [
                {
                    'CidrIp': 'string',
                    'Description': 'string'
                }

A: I do it using the AWS Command-Line Interface (CLI):
IP=`curl -s http://whatismyip.akamai.com/`
aws ec2 authorize-security-group-ingress --group-name "Foo-SG" --protocol tcp --port 22   --cidr $IP/32 --output text
aws ec2 authorize-security-group-ingress --group-name "Foo-SG" --protocol tcp --port 3389 --cidr $IP/32 --output text

However, I haven't tried it with the Description parameter.
See: authorize-security-group-ingress — AWS CLI Command Reference

A: import boto3

aws_access_key_id = 'XXXXXXXXXXXXXXXXXXXXXXXXXX'

aws_secret_access_key = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'

ec2 = boto3.resource('ec2', region_name='region_name', aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key)

sg = "security group id"

security_group = ec2.SecurityGroup(sg)

add_ip = security_group.authorize_ingress(GroupId=sg,IpPermissions=[ {'IpProtocol': 'tcp','FromPort': 80,'ToPort': 80,'IpRanges':[{'CidrIp': '127.5.5.5/32', 'Description' : 'description'}]}])

Please try with above mentioned code .
Because it's working fine for me . Hope it will work for you also .

A: Here is a general approach I use for boto3 to create ec2s and ssh in.
# Configure so you can SSH
ec2Client.modify_vpc_attribute( VpcId = vpc.id , EnableDnsSupport = { 'Value': DNS_SUPPORT })
ec2Client.modify_vpc_attribute( VpcId = vpc.id , EnableDnsHostnames = { 'Value': DNS_HOSTNAMES })

# Create a security group and allow SSH inbound rule through the VPC
securitygroup = ec2.create_security_group(
    GroupName=SG_GROUP_NAME,
    Description=SG_DESC,
    VpcId=vpc.id
)

securitygroup.authorize_ingress(
    IpPermissions=[
        {'IpProtocol': SG_IP_PROTOCOL,
         'FromPort': SG_FROM_PORT,
         'ToPort': SG_TO_PORT,
         'IpRanges': [{'CidrIp': SG_IP}]}
    ]
)

This is for ssh so:
SG_IP_PROTOCOL = 'tcp'
   SG_FROM_PORT = 22
   SG_TO_PORT = 22
   SG_IP = 'XXX.XXX.XXX.XXX/32' # your specified IP address

where
    ec2Client = boto3.client('ec2', region_name=aws_region)

AWS Boto3 Documentation