text:
package lorawan

import (
	"encoding/binary"
	"encoding/hex"
	"errors"
	"fmt"
	"sync"
)

// macPayloadMutex is used when registering proprietary MAC command payloads to
// the macPayloadRegistry.
var macPayloadMutex sync.RWMutex

// CID defines the MAC command identifier.
type CID byte

// MarshalText implements encoding.TextMarshaler.
func (c CID) MarshalText() ([]byte, error) {
	return []byte(c.String()), nil
}

// MAC commands as specified by the LoRaWAN R1.0 specs. Note that each *Req / *Ans
// has the same value. Based on the fact if a message is uplink or downlink
// you should use on or the other.
const (
	LinkCheckReq     CID = 0x02
	LinkCheckAns     CID = 0x02
	LinkADRReq       CID = 0x03
	LinkADRAns       CID = 0x03
	DutyCycleReq     CID = 0x04
	DutyCycleAns     CID = 0x04
	RXParamSetupReq  CID = 0x05
	RXParamSetupAns  CID = 0x05
	DevStatusReq     CID = 0x06
	DevStatusAns     CID = 0x06
	NewChannelReq    CID = 0x07
	NewChannelAns    CID = 0x07
	RXTimingSetupReq CID = 0x08
	RXTimingSetupAns CID = 0x08
	TXParamSetupReq  CID = 0x09
	TXParamSetupAns  CID = 0x09
	DLChannelReq     CID = 0x0A
	DLChannelAns     CID = 0x0A
	// 0x80 to 0xFF reserved for proprietary network command extensions
)

// macPayloadInfo contains the info about a MAC payload
type macPayloadInfo struct {
	size    int
	payload func() MACCommandPayload
}

// macPayloadRegistry contains the info for uplink and downlink MAC payloads
// in the format map[uplink]map[CID].
// Note that MAC command that do not have a payload are not included in this
// list.
var macPayloadRegistry = map[bool]map[CID]macPayloadInfo{
	false: map[CID]macPayloadInfo{
		LinkCheckAns:     {2, func() MACCommandPayload { return &LinkCheckAnsPayload{} }},
		LinkADRReq:       {4, func() MACCommandPayload { return &LinkADRReqPayload{} }},
		DutyCycleReq:     {1, func() MACCommandPayload { return &DutyCycleReqPayload{} }},
		RXParamSetupReq:  {4, func() MACCommandPayload { return &RX2SetupReqPayload{} }},
		NewChannelReq:    {5, func() MACCommandPayload { return &NewChannelReqPayload{} }},
		RXTimingSetupReq: {1, func() MACCommandPayload { return &RXTimingSetupReqPayload{} }},
		TXParamSetupReq:  {1, func() MACCommandPayload { return &TXParamSetupReqPayload{} }},
		DLChannelReq:     {4, func() MACCommandPayload { return &DLChannelReqPayload{} }},
	},
	true: map[CID]macPayloadInfo{
		LinkADRAns:      {1, func() MACCommandPayload { return &LinkADRAnsPayload{} }},
		RXParamSetupAns: {1, func() MACCommandPayload { return &RX2SetupAnsPayload{} }},
		DevStatusAns:    {2, func() MACCommandPayload { return &DevStatusAnsPayload{} }},
		NewChannelAns:   {1, func() MACCommandPayload { return &NewChannelAnsPayload{} }},
		DLChannelAns:    {1, func() MACCommandPayload { return &DLChannelAnsPayload{} }},
	},
}

// DwellTime defines the dwell time type.
type DwellTime int

// Possible dwell time options.
const (
	DwellTimeNoLimit DwellTime = iota
	DwellTime400ms
)

// GetMACPayloadAndSize returns a new MACCommandPayload instance and it's size.
func GetMACPayloadAndSize(uplink bool, c CID) (MACCommandPayload, int, error) {
	macPayloadMutex.RLock()
	defer macPayloadMutex.RUnlock()

	v, ok := macPayloadRegistry[uplink][c]
	if !ok {
		return nil, 0, fmt.Errorf("lorawan: payload unknown for uplink=%v and CID=%v", uplink, c)
	}

	return v.payload(), v.size, nil
}

// RegisterProprietaryMACCommand registers a proprietary MAC command. Note
// that there is no need to call this when the size of the payload is > 0 bytes.
func RegisterProprietaryMACCommand(uplink bool, cid CID, payloadSize int) error {
	if !(cid >= 128 && cid <= 255) {
		return fmt.Errorf("lorawan: invalid CID %x", cid)
	}

	if payloadSize == 0 {
		// no need to register the payload size
		return nil
	}

	macPayloadMutex.Lock()
	defer macPayloadMutex.Unlock()

	macPayloadRegistry[uplink][cid] = macPayloadInfo{
		size:    payloadSize,
		payload: func() MACCommandPayload { return &ProprietaryMACCommandPayload{} },
	}

	return nil
}

// MACCommandPayload is the interface that every MACCommand payload
// must implement.
type MACCommandPayload interface {
	MarshalBinary() (data []byte, err error)
	UnmarshalBinary(data []byte) error
}

// MACCommand represents a MAC command with optional payload.
type MACCommand struct {
	CID     CID               `json:"cid"`
	Payload MACCommandPayload `json:"payload"`
}

// MarshalBinary marshals the object in binary form.
func (m MACCommand) MarshalBinary() ([]byte, error) {
	if !(m.CID >= 2 && m.CID <= 8) && !(m.CID >= 128) {
		return nil, fmt.Errorf("lorawan: invalid CID %x", m.CID)
	}

	b := []byte{byte(m.CID)}
	if m.Payload != nil {
		p, err := m.Payload.MarshalBinary()
		if err != nil {
			return nil, err
		}
		b = append(b, p...)
	}
	return b, nil
}

// UnmarshalBinary decodes the object from binary form.
func (m *MACCommand) UnmarshalBinary(uplink bool, data []byte) error {
	if len(data) == 0 {
		return errors.New("lorawan: at least 1 byte of data is expected")
	}

	m.CID = CID(data[0])
	if !(m.CID >= 2 && m.CID <= 8) && !(m.CID >= 128) {
		return fmt.Errorf("lorawan: invalid CID %x", int(m.CID))
	}

	if len(data) > 1 {
		p, _, err := GetMACPayloadAndSize(uplink, m.CID)
		if err != nil {
			return err
		}
		m.Payload = p
		if err := m.Payload.UnmarshalBinary(data[1:]); err != nil {
			return err
		}
	}
	return nil
}

// ProprietaryMACCommandPayload represents a proprietary payload.
type ProprietaryMACCommandPayload struct {
	Bytes []byte `json:"bytes"`
}

// MarshalBinary marshals the object into a slice of bytes.
func (p ProprietaryMACCommandPayload) MarshalBinary() ([]byte, error) {
	return p.Bytes, nil
}

// UnmarshalBinary decodes the object from a slice of bytes.
func (p *ProprietaryMACCommandPayload) UnmarshalBinary(data []byte) error {
	p.Bytes = data
	return nil
}

// LinkCheckAnsPayload represents the LinkCheckAns payload.
type LinkCheckAnsPayload struct {
	Margin uint8 `json:"margin"`
	GwCnt  uint8 `json:"gwCnt"`
}

// MarshalBinary marshals the object in binary form.
func (p LinkCheckAnsPayload) MarshalBinary() ([]byte, error) {
	return []byte{byte(p.Margin), byte(p.GwCnt)}, nil
}

// UnmarshalBinary decodes the object from binary form.
func (p *LinkCheckAnsPayload) UnmarshalBinary(data []byte) error {
	if len(data) != 2 {
		return errors.New("lorawan: 2 bytes of data are expected")
	}
	p.Margin = uint8(data[0])
	p.GwCnt = uint8(data[1])
	return nil
}

// ChMask encodes the channels usable for uplink access. 0 = channel 1,
// 15 = channel 16.
type ChMask [16]bool

// MarshalBinary marshals the object in binary form.
func (m ChMask) MarshalBinary() ([]byte, error) {
	b := make([]byte, 2)
	for i := uint8(0); i < 16; i++ {
		if m[i] {
			b[i/8] = b[i/8] ^ 1<<(i%8)
		}
	}
	return b, nil
}

// UnmarshalBinary decodes the object from binary form.
func (m *ChMask) UnmarshalBinary(data []byte) error {
	if len(data) != 2 {
		return errors.New("lorawan: 2 bytes of data are expected")
	}
	for i, b := range data {
		for j := uint8(0); j < 8; j++ {
			if b&(1<<j) > 0 {
				m[uint8(i)*8+j] = true
			}
		}
	}
	return nil
}

// Redundancy represents the redundancy field.
type Redundancy struct {
	ChMaskCntl uint8 `json:"chMaskCntl"`
	NbRep      uint8 `json:"nbRep"`
}

// MarshalBinary marshals the object in binary form.
func (r Redundancy) MarshalBinary() ([]byte, error) {
	b := make([]byte, 1)
	if r.NbRep > 15 {
		return b, errors.New("lorawan: max value of NbRep is 15")
	}
	if r.ChMaskCntl > 7 {
		return b, errors.New("lorawan: max value of ChMaskCntl is 7")
	}
	b[0] = r.NbRep ^ (r.ChMaskCntl << 4)
	return b, nil
}

// UnmarshalBinary decodes the object from binary form.
func (r *Redundancy) UnmarshalBinary(data []byte) error {
	if len(data) != 1 {
		return errors.New("lorawan: 1 byte of data is expected")
	}
	r.NbRep = data[0] & ((1 << 3) ^ (1 << 2) ^ (1 << 1) ^ (1 << 0))
	r.ChMaskCntl = (data[0] & ((1 << 6) ^ (1 << 5) ^ (1 << 4))) >> 4
	return nil
}

// LinkADRReqPayload represents the LinkADRReq payload.
type LinkADRReqPayload struct {
	DataRate   uint8      `json:"dataRate"`
	TXPower    uint8      `json:"txPower"`
	ChMask     ChMask     `json:"chMask"`
	Redundancy Redundancy `json:"redundancy"`
}

// MarshalBinary marshals the object in binary form.
func (p LinkADRReqPayload) MarshalBinary() ([]byte, error) {
	b := make([]byte, 0, 4)
	if p.DataRate > 15 {
		return b, errors.New("lorawan: the max value of DataRate is 15")
	}
	if p.TXPower > 15 {
		return b, errors.New("lorawan: the max value of TXPower is 15")
	}

	cm, err := p.ChMask.MarshalBinary()
	if err != nil {
		return b, err
	}
	r, err := p.Redundancy.MarshalBinary()
	if err != nil {
		return b, err
	}

	b = append(b, p.TXPower^(p.DataRate<<4))
	b = append(b, cm...)
	b = append(b, r...)

	return b, nil
}

// UnmarshalBinary decodes the object from binary form.
func (p *LinkADRReqPayload) UnmarshalBinary(data []byte) error {
	if len(data) != 4 {
		return errors.New("lorawan: 4 bytes of data are expected")
	}
	p.DataRate = (data[0] & ((1 << 7) ^ (1 << 6) ^ (1 << 5) ^ (1 << 4))) >> 4
	p.TXPower = data[0] & ((1 << 3) ^ (1 << 2) ^ (1 << 1) ^ (1 << 0))

	if err := p.ChMask.UnmarshalBinary(data[1:3]); err != nil {
		return err
	}
	if err := p.Redundancy.UnmarshalBinary(data[3:4]); err != nil {
		return err
	}
	return nil
}

// LinkADRAnsPayload represents the LinkADRAns payload.
type LinkADRAnsPayload struct {
	ChannelMaskACK bool `json:"channelMaskAck"`
	DataRateACK    bool `json:"dataRateAck"`
	PowerACK       bool `json:"powerAck"`
}

// MarshalBinary marshals the object in binary form.
func (p LinkADRAnsPayload) MarshalBinary() ([]byte, error) {
	var b byte
	if p.ChannelMaskACK {
		b = b ^ (1 << 0)
	}
	if p.DataRateACK {
		b = b ^ (1 << 1)
	}
	if p.PowerACK {
		b = b ^ (1 << 2)
	}
	return []byte{b}, nil
}

// UnmarshalBinary decodes the object from binary form.
func (p *LinkADRAnsPayload) UnmarshalBinary(data []byte) error {
	if len(data) != 1 {
		return errors.New("lorawan: 1 byte of data is expected")
	}
	if data[0]&(1<<0) > 0 {
		p.ChannelMaskACK = true
	}
	if data[0]&(1<<1) > 0 {
		p.DataRateACK = true
	}
	if data[0]&(1<<2) > 0 {
		p.PowerACK = true
	}
	return nil
}

// DutyCycleReqPayload represents the DutyCycleReq payload.
type DutyCycleReqPayload struct {
	MaxDCycle uint8 `json:"maxDCycle"`
}

// MarshalBinary marshals the object in binary form.
func (p DutyCycleReqPayload) MarshalBinary() ([]byte, error) {
	b := make([]byte, 0, 1)
	if p.MaxDCycle > 15 && p.MaxDCycle < 255 {
		return b, errors.New("lorawan: only a MaxDCycle value of 0 - 15 and 255 is allowed")
	}
	b = append(b, p.MaxDCycle)
	return b, nil
}

// UnmarshalBinary decodes the object from binary form.
func (p *DutyCycleReqPayload) UnmarshalBinary(data []byte) error {
	if len(data) != 1 {
		return errors.New("lorawan: 1 byte of data is expected")
	}
	p.MaxDCycle = data[0]
	return nil
}

// DLSettings represents the DLSettings fields (downlink settings).
type DLSettings struct {
	RX2DataRate uint8 `json:"rx2DataRate"`
	RX1DROffset uint8 `json:"rx1DROffset"`
}

// MarshalBinary marshals the object in binary form.
func (s DLSettings) MarshalBinary() ([]byte, error) {
	b := make([]byte, 0, 1)
	if s.RX2DataRate > 15 {
		return b, errors.New("lorawan: max value of RX2DataRate is 15")
	}
	if s.RX1DROffset > 7 {
		return b, errors.New("lorawan: max value of RX1DROffset is 7")
	}
	b = append(b, s.RX2DataRate^(s.RX1DROffset<<4))
	return b, nil
}

// MarshalText implements encoding.TextMarshaler.
func (s DLSettings) MarshalText() ([]byte, error) {
	b, err := s.MarshalBinary()
	if err != nil {
		return nil, err
	}

	return []byte(hex.EncodeToString(b)), nil
}

// UnmarshalBinary decodes the object from binary form.
func (s *DLSettings) UnmarshalBinary(data []byte) error {
	if len(data) != 1 {
		return errors.New("lorawan: 1 byte of data is expected")
	}
	s.RX2DataRate = data[0] & ((1 << 3) ^ (1 << 2) ^ (1 << 1) ^ (1 << 0))
	s.RX1DROffset = (data[0] & ((1 << 6) ^ (1 << 5) ^ (1 << 4))) >> 4
	return nil
}

// UnmarshalText implements encoding.TextUnmarshaler.
func (s *DLSettings) UnmarshalText(text []byte) error {
	b, err := hex.DecodeString(string(text))
	if err != nil {
		return err
	}

	return s.UnmarshalBinary(b)
}

// RX2SetupReqPayload represents the RX2SetupReq payload.
type RX2SetupReqPayload struct {
	Frequency  uint32     `json:"frequency"`
	DLSettings DLSettings `json:"dlSettings"`
}

// MarshalBinary marshals the object in binary form.
func (p RX2SetupReqPayload) MarshalBinary() ([]byte, error) {
	b := make([]byte, 5)
	if p.Frequency/100 >= 16777216 { // 2^24
		return b, errors.New("lorawan: max value of Frequency is 2^24-1")
	}
	if p.Frequency%100 != 0 {
		return b, errors.New("lorawan: Frequency must be a multiple of 100")
	}
	bytes, err := p.DLSettings.MarshalBinary()
	if err != nil {
		return b, err
	}
	b[0] = bytes[0]

	binary.LittleEndian.PutUint32(b[1:5], p.Frequency/100)
	// we don't return the last octet which is fine since we're only interested
	// in the 24 LSB of Frequency
	return b[0:4], nil
}

// UnmarshalBinary decodes the object from binary form.
func (p *RX2SetupReqPayload) UnmarshalBinary(data []byte) error {
	if len(data) != 4 {
		return errors.New("lorawan: 4 bytes of data are expected")
	}
	if err := p.DLSettings.UnmarshalBinary(data[0:1]); err != nil {
		return err
	}
	// append one block of empty bits at the end of the slice since the
	// binary to uint32 expects 32 bits.
	b := make([]byte, len(data))
	copy(b, data)
	b = append(b, byte(0))
	p.Frequency = binary.LittleEndian.Uint32(b[1:5]) * 100
	return nil
}

// RX2SetupAnsPayload represents the RX2SetupAns payload.
type RX2SetupAnsPayload struct {
	ChannelACK     bool `json:"channelAck"`
	RX2DataRateACK bool `json:"rx2DataRateAck"`
	RX1DROffsetACK bool `json:"rx1DROffsetAck"`
}

// MarshalBinary marshals the object in binary form.
func (p RX2SetupAnsPayload) MarshalBinary() ([]byte, error) {
	var b byte
	if p.ChannelACK {
		b = b ^ (1 << 0)
	}
	if p.RX2DataRateACK {
		b = b ^ (1 << 1)
	}
	if p.RX1DROffsetACK {
		b = b ^ (1 << 2)
	}
	return []byte{b}, nil
}

// UnmarshalBinary decodes the object from binary form.
func (p *RX2SetupAnsPayload) UnmarshalBinary(data []byte) error {
	if len(data) != 1 {
		return errors.New("lorawan: 1 byte of data is expected")
	}
	p.ChannelACK = data[0]&(1<<0) > 0
	p.RX2DataRateACK = data[0]&(1<<1) > 0
	p.RX1DROffsetACK = data[0]&(1<<2) > 0
	return nil
}

// DevStatusAnsPayload represents the DevStatusAns payload.
type DevStatusAnsPayload struct {
	Battery uint8 `json:"battery"`
	Margin  int8  `json:"margin"`
}

// MarshalBinary marshals the object in binary form.
func (p DevStatusAnsPayload) MarshalBinary() ([]byte, error) {
	b := make([]byte, 0, 2)
	if p.Margin < -32 {
		return b, errors.New("lorawan: min value of Margin is -32")
	}
	if p.Margin > 31 {
		return b, errors.New("lorawan: max value of Margin is 31")
	}

	b = append(b, p.Battery)
	if p.Margin < 0 {
		b = append(b, uint8(64+p.Margin))
	} else {
		b = append(b, uint8(p.Margin))
	}
	return b, nil
}

// UnmarshalBinary decodes the object from binary form.
func (p *DevStatusAnsPayload) UnmarshalBinary(data []byte) error {
	if len(data) != 2 {
		return errors.New("lorawan: 2 bytes of data are expected")
	}
	p.Battery = data[0]
	if data[1] > 31 {
		p.Margin = int8(data[1]) - 64
	} else {
		p.Margin = int8(data[1])
	}
	return nil
}

// NewChannelReqPayload represents the NewChannelReq payload.
type NewChannelReqPayload struct {
	ChIndex uint8  `json:"chIndex"`
	Freq    uint32 `json:"freq"`
	MaxDR   uint8  `json:"maxDR"`
	MinDR   uint8  `json:"minDR"`
}

// MarshalBinary marshals the object in binary form.
func (p NewChannelReqPayload) MarshalBinary() ([]byte, error) {
	b := make([]byte, 5)
	if p.Freq/100 >= 16777216 { // 2^24
		return b, errors.New("lorawan: max value of Freq is 2^24 - 1")
	}
	if p.Freq%100 != 0 {
		return b, errors.New("lorawan: Freq must be a multiple of 100")
	}
	if p.MaxDR > 15 {
		return b, errors.New("lorawan: max value of MaxDR is 15")
	}
	if p.MinDR > 15 {
		return b, errors.New("lorawan: max value of MinDR is 15")
	}

	// we're borrowing the last byte b[4] because PutUint32 needs 4 bytes,
	// the last byte b[4] will be set to 0 because max Freq = 2^24 - 1
	binary.LittleEndian.PutUint32(b[1:5], p.Freq/100)
	b[0] = p.ChIndex
	b[4] = p.MinDR ^ (p.MaxDR << 4)

	return b, nil
}

// UnmarshalBinary decodes the object from binary form.
func (p *NewChannelReqPayload) UnmarshalBinary(data []byte) error {
	if len(data) != 5 {
		return errors.New("lorawan: 5 bytes of data are expected")
	}
	p.ChIndex = data[0]
	p.MinDR = data[4] & ((1 << 3) ^ (1 << 2) ^ (1 << 1) ^ (1 << 0))
	p.MaxDR = (data[4] & ((1 << 7) ^ (1 << 6) ^ (1 << 5) ^ (1 << 4))) >> 4

	b := make([]byte, len(data))
	copy(b, data)
	b[4] = byte(0)
	p.Freq = binary.LittleEndian.Uint32(b[1:5]) * 100
	return nil
}

// NewChannelAnsPayload represents the NewChannelAns payload.
type NewChannelAnsPayload struct {
	ChannelFrequencyOK bool `json:"channelFrequencyOK"`
	DataRateRangeOK    bool `json:"dataRateRangeOK"`
}

// MarshalBinary marshals the object in binary form.
func (p NewChannelAnsPayload) MarshalBinary() ([]byte, error) {
	var b byte
	if p.ChannelFrequencyOK {
		b = (1 << 0)
	}
	if p.DataRateRangeOK {
		b = b ^ (1 << 1)
	}
	return []byte{b}, nil
}

// UnmarshalBinary decodes the object from binary form.
func (p *NewChannelAnsPayload) UnmarshalBinary(data []byte) error {
	if len(data) != 1 {
		return errors.New("lorawan: 1 byte of data is expected")
	}
	p.ChannelFrequencyOK = data[0]&(1<<0) > 0
	p.DataRateRangeOK = data[0]&(1<<1) > 0
	return nil
}

// RXTimingSetupReqPayload represents the RXTimingSetupReq payload.
type RXTimingSetupReqPayload struct {
	Delay uint8 `json:"delay"` // 0=1s, 1=1s, 2=2s, ... 15=15s
}

// MarshalBinary marshals the object in binary form.
func (p RXTimingSetupReqPayload) MarshalBinary() ([]byte, error) {
	if p.Delay > 15 {
		return []byte{}, errors.New("lorawan: the max value of Delay is 15")
	}
	return []byte{p.Delay}, nil
}

// UnmarshalBinary decodes the object from binary form.
func (p *RXTimingSetupReqPayload) UnmarshalBinary(data []byte) error {
	if len(data) != 1 {
		return errors.New("lorawan: 1 byte of data is expected")
	}
	p.Delay = data[0]
	return nil
}

// TXParamSetupReqPayload represents the TXParamSetupReq payload.
type TXParamSetupReqPayload struct {
	DownlinkDwelltime DwellTime `json:"downlinkDwellTime"`
	UplinkDwellTime   DwellTime `json:"uplinkDwellTime"`
	MaxEIRP           uint8     `json:"maxEIRP"`
}

// MarshalBinary encodes the object into a bytes.
func (p TXParamSetupReqPayload) MarshalBinary() ([]byte, error) {
	var b uint8
	for i, v := range []uint8{8, 10, 12, 13, 14, 16, 18, 20, 21, 24, 26, 27, 29, 30, 33, 36} {
		if v == p.MaxEIRP {
			b = uint8(i)
		}
	}
	if b == 0 {
		return nil, errors.New("lorawan: invalid MaxEIRP value")
	}

	if p.UplinkDwellTime == DwellTime400ms {
		b = b ^ (1 << 4)
	}
	if p.DownlinkDwelltime == DwellTime400ms {
		b = b ^ (1 << 5)
	}

	return []byte{b}, nil
}

// UnmarshalBinary decodes the object from bytes.
func (p *TXParamSetupReqPayload) UnmarshalBinary(data []byte) error {
	if len(data) != 1 {
		return errors.New("lorawan: 1 byte of data is expected")
	}

	if data[0]&(1<<4) > 0 {
		p.UplinkDwellTime = DwellTime400ms
	}
	if data[0]&(1<<5) > 0 {
		p.DownlinkDwelltime = DwellTime400ms
	}
	p.MaxEIRP = []uint8{8, 10, 12, 13, 14, 16, 18, 20, 21, 24, 26, 27, 29, 30, 33, 36}[data[0]&15]

	return nil
}

// DLChannelReqPayload represents the DLChannelReq payload.
type DLChannelReqPayload struct {
	ChIndex uint8  `json:"chIndex"`
	Freq    uint32 `json:"freq"`
}

// MarshalBinary encodes the object into bytes.
func (p DLChannelReqPayload) MarshalBinary() ([]byte, error) {
	b := make([]byte, 5)        // we need one byte more for PutUint32
	if p.Freq/100 >= 16777216 { // 2^24
		return b, errors.New("lorawan: max value of Freq is 2^24 - 1")
	}

	if p.Freq%100 != 0 {
		return b, errors.New("lorawan: Freq must be a multiple of 100")
	}

	b[0] = p.ChIndex
	binary.LittleEndian.PutUint32(b[1:5], p.Freq/100)

	return b[0:4], nil
}

// UnmarshalBinary decodes the object from bytes.
func (p *DLChannelReqPayload) UnmarshalBinary(data []byte) error {
	if len(data) != 4 {
		return errors.New("lorawan: 4 bytes of data are expected")
	}

	p.ChIndex = data[0]
	b := make([]byte, 4)
	copy(b, data[1:])
	p.Freq = binary.LittleEndian.Uint32(b) * 100
	return nil
}

// DLChannelAnsPayload represents the DLChannelAns payload.
type DLChannelAnsPayload struct {
	UplinkFrequencyExists bool `json:"uplinkFrequencyExists"`
	ChannelFrequencyOK    bool `json:"channelFrequencyOK"`
}

// MarshalBinary encodes the object into bytes.
func (p DLChannelAnsPayload) MarshalBinary() ([]byte, error) {
	var b byte
	if p.ChannelFrequencyOK {
		b = b ^ 1
	}
	if p.UplinkFrequencyExists {
		b = b ^ (1 << 1)
	}
	return []byte{b}, nil
}

// UnmarshalBinary decodes the object from bytes.
func (p *DLChannelAnsPayload) UnmarshalBinary(data []byte) error {
	if len(data) != 1 {
		return errors.New("lorawan: 1 byte of data is expected")
	}

	p.ChannelFrequencyOK = data[0]&1 > 0
	p.UplinkFrequencyExists = data[0]&(1<<1) > 0
	return nil
}

redpajama_set_name: RedPajamaGithub


text:
Q: Can two passphrases result into same 40 bit encryption key - Office 2003 If I understand correctly, when we password protect an Office 2003 document, the passphrase is converted to a 40 bit key that's internally used to encrypt the document.
If so, is there any chance whereby two different passphrases result into the same 40 bit key?
Is Office 2003 susceptible to such a vulnerability when it comes to encryption?
It's altogether different story that today's high speed CPUs can brute force a 40 bit key in a finite time.
Thanks.

A: Roughly, you can expect one collision for every million passwords (see the wikipedia entry on the birthday problem for an explanation).
The rule of thumb is that there is about a 50% chance of collision for every 2n/2 repetitions, where n is the number of bits in the key.

redpajama_set_name: RedPajamaStackExchange


text:
Boardwalk Empire star Stephen Graham thrilled to play Al Capone alongside Steve Buscemi for Martin Scorcese
FEW actors can boast they've had the legendary director Martin Scorsese take it upon himself to find the perfect showcase for them.
Stephen Graham as Al Capone in Boardwalk Empire
FEW actors can boast they've had the legendary director Martin Scorsese take it upon himself to find the perfect showcase for them. Kirkby's Stephen Graham can.
"I feel terrible saying this but Marty actually asked me to play this character," says Stephen of his role in Boardwalk Empire, a lavish TV series that has already received huge acclaim in the US.
The honour is even greater when you learn that the particular character happens to be history's most infamous gangster, Al Capone.
"Marty's always said he wanted to find something for me to do and that he wanted to work with me again," adds Stephen – referring to their first collaboration, 2002's Gangs Of New York.
"I've met him a good few times since and he always said, 'Don't worry, something's going to come up'. I didn't hear anything and then out of the blue I got a phone call from his office and it was him saying, 'Would you like to play Al Capone?' You don't really say no."
Co-created by Scorsese and the award-winning writer of The Sopranos, Terence Winter, Boardwalk Empire opens on the eve of prohibition in 1920s Atlantic City, and follows the machinations of city treasurer Enoch "Nucky" Thompson (Steve Buscemi), a political fixer who's the man to see for illegal alcohol.
It's based on the best-selling book, The Birth, High Times And Corruption Of Atlantic City, and paints a vivid picture of America in the roaring Twenties..
But as Nucky provides booze, jobs and cash to the city's residents and visitors, gangster culture inspires a generation of men to turn to crime – and that includes rising star Al Capone.
"He's a young lad trying to make it in the business," says 37-year-old Stephen, whose 5ft 5in frame makes him the perfect candidate to play diminutive, yet terrifying characters.
"He starts out as a driver and we see him trying to grow up a little bit, and try to learn the ropes and see what it's like to move up in that world," he says.
Stephen admits he was a little tentative "being someone from England playing an iconic American character", but reveals the cast and crew embraced him from the outset.
"As an actor, it's a doddle basically. All you have to do is believe what you're saying because the set's full of craftsmen and women who love their job and completely believe in what they're doing and set the world up perfectly for you," says Stephen, who still lives in Leicestershire with his wife and two children – and isn't tempted to move to Hollywood.
"Never, no, no no," he says emphatically in his strong Scouse accent which he transforms into the Brooklyn burr of Capone brilliantly.
"I've got a good ear for accents so it does come quite easily," he admits.
"My voice coach was a member of the crew on Boardwalk, because he's born and bred from Brooklyn. I like to listen to the people from the areas."
Growing up in Kirkby Stephen recalls being a bit of tearaway. But it all changed when he appeared in a school production.
"There was this fantastic actor called Drew Schofield (Scully). He's a lovely man and came to watch his nephew in a play I was in when I was around 10. He had a little chat with my mum and dad afterwards and said, 'Your lad's got a bit of talent there, may be you should take him to the youth theatre'. Obviously I went and I've never really looked back."
There have been testing times for Stephen though, namely after playing the critically-acclaimed role of racist Combo in 2006's This Is England.
"After that I couldn't get a job for three months," he says.
"You go through hard times as an actor and you need skin like a rhino. I was going to pack it all in and become a youth worker."
He thanks his family and close friends for not allowing him to give up.
"They told me to stop being an idiot and to carry on, and it kind of turned after that."
He hasn't stopped working since, with the likes of The Damned United, The Street and Occupation on his CV – though he'll forever be associated with playing complex, violent characters, from Tommy and Combo to John Godden in Awaydays and Baby Face Nelson in Public Enemies.
Now of course, he's playing the most famous gangster of them all.
"I'm never going to play Mr Darcy," he jokes. "I like three-dimensional characters that have a lot going on and there has to be something I like about the character."
After Boardwalk Empire, Stephen will hook up again with his old pal Johnny in the fourth instalment of the Pirates Of The Caribbean franchise.
"It's so the kids can watch something I've done," he laughs.
Boardwalk Empire begins on Tuesday, February 1 on Sky Atlantic HD

redpajama_set_name: RedPajamaCommonCrawl


A classic Mid-Century Modern inspired bench made in either walnut or maple wood with an upholstered seat cushion.
This bench can be customized in any size, any color, any style of leather or hair-on hide in our library.
A classic Mid-Century Modern inspired pair of ottomans made in either walnut or maple wood with an upholstered seat cushion. This bench can be customized in any size, any color, any style of leather or hair-on hide in our library.


text:
Carter visiting Ramallah
Photo: AP
Carter urges Palestinian elections
Former US president believes holding first elections in nearly a decade will help heal division between Fatah-run West Bank and Hamas-ruled Gaza Strip.
AFP|Published: 05.02.15 , 19:42
Former US president Jimmy Carter on Saturday urged Palestinians to hold elections to end the de facto division of the West Bank and the Islamist-run Gaza Strip.
He was speaking at a joint news conference with Palestinian president Mahmud Abbas in the Palestinian capital of Ramallah in the West Bank.
"We hope that sometime we'll see elections all over the Palestinian area and east Jerusalem and Gaza and also in the West Bank," said Carter, a member of the independent Elders Group of global leaders.
Former President Jimmy Carter (Photo: AP)
No election has been held in the Palestinian territories for nearly a decade. Abbas's presidential mandate expired in 2009, but he remains in office since there has been no election. The Palestinian parliament has also not met since 2007.
In 2006, a year after Abbas was elected, Hamas won the most recent Palestinian legislative elections. Differences between Abbas's Fatah party and the Islamist Hamas then led to the so-called "inqissam", or division.
Despite the rivals signing a reconciliation agreement a year ago, Hamas is reluctant to hand over power in Gaza to an independent Palestinian unity government they formed. Carter had also planned to go to Gaza, but the visit was cancelled at the last moment.
He said it would be "very important" for "full implementation of the agreement reached between Hamas and Fatah". Carter was accompanied by Norway's former prime minister Gro Harlem Brundtland.
She said that despite not being able to visit the impoverished Palestinian enclave devastated by last summer's war with Israel, "we have had a chance to discuss with people who know the issues in Gaza".
Reconstruction of the coastal territory has not begun eight months after the end of the conflict, the third in six years.
The Elders Group said ahead of the trip by Carter and Brundtland that they were visiting "in a renewed push to promote the two-state solution and to address the root causes of the conflict" in the Middle East.


text:
Home Health 'I helped test a wonder drug – then I was denied it'
'I helped test a wonder drug – then I was denied it'
'I helped test a wonder drug – then I was denied it'
Because of rare illness, Louise Moorhouse is on a special diet of pills or foul-tasting shakes. There's a drug that would allow her to eat like anyone else – she took it for three years during a clinical trial. But the NHS won't pay for it, reports the BBC's Deborah Cohen – and the drug company stopped giving it to her once the trial was over.
Imagine having to take more than 80 pills a day or drink shakes to replace everyday foods you can't eat. That's the reality for Louise Moorhouse, a 35-year-old teacher from Birmingham, who has a rare genetic condition called phenylketonuria or PKU.
The pills are "huge", she says.
"They're quite tricky to swallow. I think the most I have managed to do in one go is four. Any more than that and they come out my nose."
The shakes are preferable, but attempts to give them a fruity taste have not succeeded in masking their "stomach-turning" acidity. From time to time her stomach starts to reject them, Louise says. In which case, she goes back on the pills.
People with PKU can't properly digest the amino acid phenylalanine. Amino acids are the building blocks of protein and are broken down by the body to make our own proteins. But in people with PKU the levels build up, and can cause brain damage.
Louise says she has to completely avoid 80% of normal food, and the protein in her diet has to be severely restricted – which may mean weighing it on scales before eating it.
"I basically live on fruits and vegetables," she says.
Dinner dates are best avoided, she has learned.
"I avoid socialising with food if there's people there who I don't know," Louise says. "They may notice that sometimes I have to get my scales out and sometimes I have to send food back or it takes me a long time to choose food."
But for three years, in her early 20s, Louise was able to eat like anyone else.
That's because she took part in trials for a drug now called Kuvan (sapropterin hydrochloride) that was being developed by US biotech company, BioMarin.
Watch Deborah Cohen's report on Newsnight, on BBC Two, on Tuesday 16 April 2019
"I took part in the trial because I just thought, 'Wow, if this works it's just going to change lives,'" she says.
And for Louise it did.
"Kuvan allowed me to eat a completely normal diet. And it was it was almost like someone had opened curtains on my life and I could see everything in Technicolor," she says. "It just freed me up so much."
The dietician who had treated Louise as a child, Prof Anita MacDonald of Birmingham Children's Hospital, was one of the scientists involved. With help from her and Louise, BioMarin gathered enough evidence to show Kuvan reduced the levels of phenylalanine in many people with PKU. In 2007, it became the only licensed drug for the condition in the US; its European licence followed in 2008.
Image caption Prof Anita MacDonald: The NHS said No
"Because the trial had gone so well and because it made such a difference, I was convinced that it would only be a matter of time before this drug – that we had proved worked – would be available to everyone who responded to it," Louise says.
But for NHS patients it wasn't. BioMarin put a £70,000 price tag on it, per adult per year – and the NHS thought it wasn't worth that.
"The drug was too expensive and the NHS decided that there wasn't enough evidence of efficacy of that drug at that time and so they said no to prescribing it," says Anita MacDonald.
It was a blow for Louise, who had to return to the pills and shakes.
"It was a massive shock to my system," she says. "I had to relearn almost everything. It had a massive effect on my concentration, my mood, my focus at work, my relationship."
The hope of an effective treatment for PKU had appeared on the horizon in the 1990s. A simple compound developed in a Swiss laboratory had been found to enable people with PKU to digest phenylalanine. It was then researched with public money and used unlicensed by many doctors.
The trouble was, PKU is quite a rare disease. In England it is estimated that between one in 10,000 and one in 14,000 people have PKU. So there was little financial incentive for a pharmaceutical company to turn the compound into a licensed drug.
Then in 2000, the European Commission introduced incentives to encourage the production of "orphan drugs" for people with rare conditions, ruling that companies would enjoy up to 12 years of market exclusivity.
The cost of orphan drugs
According to Dyfrig Hughes, professor of pharmacoeconomics at Bangor University, more than 165 orphan drugs have now been approved – and that in fact 50% of all drugs approved last year were for rare diseases. Companies find them profitable.
But critics say the profitability – and the high price – of orphan drugs does not reflect the amount of effort companies have had to make to generate them.
"We did one piece of work where we identified that 40% of orphan drugs are actually repurposed. That is they've been previously used for other purposes before they were granted orphan status," Dyfrig Hughes says.
With governments across Europe struggling with the price of drugs used to treat rare conditions, the BBC is aware that the European Commission is reviewing the incentives scheme.
In 2004, BioMarin – which specialises in drugs for rare conditions – bought the data from the early development of the compound to treat PKU. This meant that while it had to fund trials it didn't have to meet the costs of searching for an entirely novel chemical compound.
When Kuvan was licensed a few years later and the NHS refused to pay the hefty price, patients were stuck in the middle. This remains the case, even now that the NHS has come to recognise the efficacy of the drug.
"BioMarin have been asked to drop the price on many occasions but at the moment they have a patent," Anita Macdonald says. "They've got no competition."
BioMarin told the BBC the NHS has asked for an 80% discount.
"BioMarin is disappointed that the NHS England has not recognised the value of treating PKU patients with Kuvan, despite more than a decade of positive patient outcomes across 26 countries in Europe, Russia and Turkey," a spokesperson said.
An NHS England spokesperson said: "The NHS does not offer a blank cheque to pharmaceutical companies, instead the NHS works hard to strike deals which give people access to the most clinically effective and innovative medicines, and at a price which is fair and affordable, which is exactly what our patients and the country's taxpayers would expect us to do."
Most disappointed by the outcome were the people like Louise, who had taken part in the trial and identified Kuvan as what Louise calls "the holy grail for us". The BBC is aware of seven others.
"You want your patients to gain any benefit from the work that they've done. They've entered the trial in good heart. We as scientists enter the trial in good heart," says Anita Macdonald.
"I don't think it is ethical for patients to be involved in a trial and not continue with a treatment. Those patients put a lot of trust in the drug company and it's the least that could have been done for them to continue with that treatment longer term."
Indeed, there is a global medical ethics agreement for research, called the Declaration of Helsinki, which says provisions should be made "for all participants who still need an intervention identified as beneficial in the trial".
When the BBC pointed this out to BioMarin, the company said: "To the best of our knowledge, BioMarin is treating all known ex-trial patients. If there are any ex-trial patients who are not being treated and would like to be treated, they should talk to their treating physician and apply for treatment."
For Louise, who for 10 years since the end of the trial has had to maintain her diet of pills or shakes, this came as startling news. She burst into tears.
It had taken her years to conceive because of the difficulty getting her blood levels of phenylalanine down, she said.
"A lot has happened that didn't have to happen. All these years I could have been on Kuvan and I wouldn't have had so many issues.
"I feel so emotional – it's like winning the lottery."
British teenager Shauna Davison was given an experimental transplant in 2012, in the hope of prolonging her life. Her mother says she was told in advance about two patients who had survived a similar operation – but not about others who had died. Was Shauna, who died after two weeks, a casualty of the rush to develop stem cell technology?
Shauna Davison: 'I might have had her for a bit longer'
Join the conversation – find us on Facebook, Instagram, YouTube and Twitter.


It's time to take this playground staple to the big leagues. Jumping rope can burn as many calories as running (and build some killer muscles to boot). Plus, a jump rope is the ideal size for travel (and won't break the bank at $20 or less). Greatist Expert Ilen Bell recommends using Tabata intervals (alternating 20 seconds of work with 10 seconds of rest for four minutes) to really maximize calorie burn Metabolic profile of high intensity intermittent exercises. Tabata, I., Irisawa, K., Kouzaki, M., et al. Department of Physiology and Biomechanics, National Institute of Fitness and Sports, Kanoya City, Japan. Medicine & Science in Sports & Exercise 1997 Mar;29(3):390-5. . And for this workout, prepare to work: We're putting 10 minutes on the clock to hit all eight of Bell's moves — two times through. Need a rope-skipping refresher course? Check out this video of Bell demonstrating each of the moves in order.
Ready to hop to it? Just remember that in addition to these 10 minutes of aerobic activity, it's also important to warm up, stretch, and cool down correctly. Jumping into an intense activity with cold muscles is a recipe for disaster (think pulled muscles and torn ACLs) Warm-up and stretching in the prevention of muscular injury. Woods K, Bishop P, Jones E. Human Performance Laboratory, University of Alabama, Tuscaloosa, Alabama, USA. Sports Medicine. 2007; 37(12): 1089-99. . Get the blood pumping with a short jog or jumping jacks followed by some dynamic warm-up moves like walking lunges, walking toe touches, and skips. It's time to stop making excuses and get skipping — you could finish a workout by the time it takes to read this article!
If this series of moves didn't make you break a sweat, pick a weighted rope for an even tougher challenge (those feet will really have to move!).
Special thanks to Greatist Expert Ilen Bell for creating the workout for this article.
Do you hit the (jump) ropes at the gym? What are your favorite recess-inspired moves? Share in the comments below or tweet the author at @SophBreene.


text:
Поль Брак (, , , Франция) — французский автомобильный дизайнер, известен по работе в Mercedes-Benz, BMW и Peugeot.

Карьера Брака началась в студии дизайна , где он служил его помощником в 1953—1954 годах. Во время этого периода студия создала французский лимузин Presidential, построенный компанией Citroen, купе Pegaso и ряд других автомобилей.

Брак служил на военной службе в Германии с конца 1954 по 1957 годы. Впоследствии он работал на Daimler-Benz, возглавляя студию дизайна в Зиндельфингене, этот пост он занимал в течение десяти лет. Наиболее известной его работой является купе Mercedes-Benz Pagoda.

По возвращении во Францию в 1967 году, Брак работал на , где он был ответственным за дизайн высокоскоростного пассажирского поезда TGV. В это время Брак также отвечал за опытные образцы спортивного автомобиля, базирующегося на BMW Neue Klasse и автомобиле-купе, базирующегося на Simca 1100.

В 1970 году Брак был назначен директором по дизайну BMW, где он занимался разработкой BMW 7-й серии. Его концепт кар  в 1973 году выиграл в конкурсе «Концептуальный автомобиль года» по версии , автомобиль повторил свой подвиг победив в 1992 году на конкурсе элегантности (Concours d'Elegance) в Багатель, Франция.

Его работа с Peugeot, начавшаяся в 1974 году, включала разработку интерьеров Peugeot 604 и Peugeot 505.

Брак также известен как судья во многих автомобильных конкурсах, включая .

Примечания

Автомобильные дизайнеры
Дизайнеры Франции

redpajama_set_name: RedPajamaWikipedia


Discussion in 'Regional Championships' started by PokeMama, Jan 26, 2008.
Hello everyone! On behalf of Jeff Prentiss, the PTO from MN, and Troy Lesky, the PTO from LaCrosse, I've been given the go-ahead to announce our MW Regionals information! All of the PTOs in the area are quite excited about this great event, and we believe you will love the wonderful central location this year!
Registration will be from 9am to 10am with the tournament beginning about 10:15am.
The Chula Vista Resort offers an Indoor Waterpark with 7 pool areas, 12 waterslides & 65 activities for the entire family!
Jeff has set up a Regionals Info website with more information for you and links to the various hotels in the area. There are even discounts for the Water Park if you mention Pokemon Regionals.
I've also got information up on my TIYPokemon website too, including a map you can print out.
Participants will receive a Pokémon TCG Regional Championships promo card and a commemorative Regional Championships pin, while supplies last, all just for playing!
A Travel Award for the winner (including a parent or legal guardian for players under 18)to the 2008 U.S. National Championships at the Origins Game Fair in Columbus, Ohio!
A scholarship award worth $1000 (Click here for scholarship details and restrictions).
I talked to Jeff and he said there are lots of areas that are well suited for players to get together and practice on Friday night for those of you who are coming up early. He said he and Troy will do whatever they can to get some things going for practice play, maybe an impromptu tourney or whatever there's interest for. But it looks like there will be a good number of people coming up Friday night to get things kicked off. Just ask at the desk for Jeff Prentiss's room number or call his cell 612-749-8225 once you get there to find out what's going on.
I will check this place out. I would imagine we would be there.
Ya what I've seen of it, the place looks wonderful! And plenty of things for families to do too. And there are some deals if you share rooms too. Make a Poke-weekend of it!
$299.00 for the El Grande 2 Bedroom Condo for 10 people, 1,500 sq ft, has two bedrooms. The master suite has a king bed and a private bath, fireplace and television, the other bedroom has two queen size beds with television. The living area is complete with a hot tub, fireplace, and a full size kitchen and dining room table.
That's not a bad price when you get a bunch of Pokemon Players bunkin' together playtesting all night!
ya the prices shouldent be bad it is an off season for the dells and there is !!!!!!a lot of hotels!!!!!!
I'm gonna check with my traveling players to see where they'd rather hit.
Any of you who are going, you should really check out the hotels nearby if you're planning on staying, as they tend to fill up fast... so book as early as you can!
I know!! He did great! 2nd at IL States! Ya, the Dells is gonna be great!! If you plan to get a room, should check into it from the links and be sure to mention Pokemon Regionals too when you call.
We're setting up a carpool list at TIY... for those who need a ride and for those who have space to offer a ride. We'll try to get as many people up there as possible from the area.
We'll be there!!! Can't come soon enough!


text:
Q: What is the missing puzzle piece to exporting images from FusionCharts? I am trying to get FusionCharts to export.
I have, besides XML files that specify registerWithJS="1",

and

Recent Portfolio Trends

FusionCharts will load here!
FusionCharts will load here!

FusionCharts Export Handler Component

FusionCharts Export Handler Component 2

Google searching suggests in various forms that I need to specify registerWithJS to be "1", perhaps in more than one place, and that I should get a diagnostic error code in an alert with debugMode set to True. (I do not get an alert or anything on Chrome's JavaScript console.) This is being served up by a distinct web server, so it's not a "local filesystem protection" issue.
What I do get are two charts rendered properly, plus two buttons that say "Waiting" and never, at least after a few minutes, change to say anything else. If I right-click the graphs, the contextmenu offers "Print Chart", "Copy data to clipboard", "About FusionCharts", "Settings...", "Global Settings...", and "About Adobe Flash Player 10.3.181.14..." but not the options to export as JPG, PNG, or PDF that should be available.
Suggestions for what I need to do?

A: You would need to set at-least three export related XML attributes in your XML to enable the export related context menu. These are : exportEnabled, exportAtClient and exportHandler.
Hence, your trends-outstandings.xml would contain:
<chart exportEnabled='1' exportAtClient='1' exportHandler='fcExporter1' ...>

and trends-volume.xml would contain:
<chart exportEnabled='1' exportAtClient='1' exportHandler='fcExporter2' ...>

Also please make sure you are using the latest FusionCharts.js and FusionChartsExportComponent.js.

A: Please try setting exportEnabled='1'


Welcome to my stop on the CBLS Blog Tour for Finding Esta! Check out the book trailer and giveaway below!
Prize is an eBook copy of "Finding Esta". Contest is tour-wide, open internationally and ends Feb 23. Must be 18 years of age or older to enter.


The Long-tailed Talaud Mosaic-tailed Rat (Melomys talaudium) is a species of concern belonging in the species group "mammals" and found in the following area(s): Indonesia. This species is also known by the following name(s): Long-tailed Talaud Melomys.
Glenn, C. R. 2006. "Earth's Endangered Creatures - Long-tailed Talaud Mosaic-tailed Rat Facts" (Online). Accessed 4/18/2019 at http://earthsendangered.com/profile.asp?sp=2480&ID=3.
Need more Long-tailed Talaud Mosaic-tailed Rat facts?


text:
secret in their eyes
Weekend Box Office Wrap-up: December 6, 2015
Chris Agar Dec 6, 2015
Weekend Box Office Wrap-up: November 29, 2015
Chris Agar Nov 29, 2015
Our box office wrap-up for the weekend of November 29, 2015, featuring new releases The Good Dinosaur and Creed.
Our box office wrap-up for the weekend of November 22, 2015, featuring new releases Hunger Games: Mockingjay - Part 2 and The Night Before.
Secret in Their Eyes Review
Sandy Schaefer Nov 20, 2015
Secret in Their Eyes is a well-acted and politically-charged drama/thriller with ambitions that exceed its grasp.
Movie News Wrap Up: Bad Santa 2, Secret in Their Eyes and More
Robert Yaniz Jr. Nov 7, 2015
Bad Santa 2 secures the director of Mean Girls, a new trailer for Secret in Their Eyes has been released and more!
Movie News Wrap-Up: 'Shaft' Reboot, New 'Nosferatu,' and More
Robert Yaniz Jr. Aug 2, 2015
A reboot of the 'Shaft' franchise is in the works from the creator of 'Black-ish', classic vampire film 'Nosferatu' will get a remake and more!
Movie News Wrap Up: 'Snowden' Trailer, '13 Hours' Release Date & More
Robert Yaniz Jr. Jul 2, 2015
Oliver Stone's biopic 'Snowden' gets a teaser trailer, a release date for Michael Bay's thriller '13 Hours' has been set, and more!
Supernatural Ending Means A Spinoff Could Finally Happen


Last week was Committee Meeting, delayed from the week previous because of the Intermediate Training Cohort Exam, and the very interesting talk by Roger (G3LDI), of which there was copious notes taken in glorious technicolour.
However, the big news of the evening was the official announcement that the Intermediate Training Cohort had all been joyously successful in passing their test, although the RSGB hadn't sent any call signs yet! Those in attendance 'volunteered' to have their photo taken to be sent off to Radcom for boasting purposes.
Obviously, passing his Intermediate went gone straight to Pirate Dave's head and he fell in love with a gloriously solid radio, with big knobs to twiddle, and all things were good.
Sadly however, the Bringers of Mysterious Boxes had brought no mysterious boxes, which meant we discussed whether Bob's jumper was more zebra (as his son said) or barcode (as we said). It was a thrilling discussion.
Meanwhile, in the shack, the battle between Kev and FLDigi continued. Eventually, Kev was the winner. Unfortunately, we're not sure what he did to make it work, and neither is he. Investigations shall continue.
Now, we aren't here next week, we are back again on 3/1/19, same time as usual. It's been a glorious year with much change, and we shall gather the highlights and lowlights for a Year Summary. If you've anything that you think needs to be in, let me know! sgyokel@yahoo.com and I'll put it together over the next week.
Merry Christmas and a Happy New Year from KLARC!
Usually, Club Night Diaries is a thrill packed live account of what went on at one of Norfolk's – nay, the world's – most up and coming clubs. Last night, with O2 being down and therefore no internet, this was not the case. However, it was no less thrill packed.
Obviously, nobody was allowed to the club until 1930 because of the Intermediate Training Cohort taking Their Exams. Results will be formally announced in due course, but there seemed to be no tears or chest beating. There was, perhaps, a slightly manic feel of relief that it was over, and that, perhaps, it hadn't been as bad as first thought it might be. The Exams are hard, but that is to maintain the knowledge of the hobby, and Kev makes everything as understandable as it can be. He's a clever lad, and we are working on him to begin an advanced course.
Of course, the reader can see that so far there are no photos on this post. Firstly, it was dark, and secondly, the assembled populace consumed the scones and cakes before there was a chance to take a photograph. The refreshments, as provided by Olly's Shack Manager, were of sterling quality as usual, with light fluffy scones and delightful little tarts. In fact, they were so delightful, that one Unnamed Member was fortunate enough to take a small doggy bag away with him! Yours truly was asked that it would not be mentioned, but the truth is a vital part of Club Night Diaries, and scone-based skullduggery such as this should not be hidden!
Next week is a committee meeting week. Oh what joy is ours!


We are a supplier of Donaldson products, a company who has been designing filters for over a century.
Back in 1915, their founder invented the first air cleaner for a tractor engine and the company has been at the forefront of filtration and contamination control innovation ever since.
Donaldson have a huge network of expert scientists and multi-disciplined engineers working on solutions to some of the toughest challenges our customers face.


There are authorized to be appropriated to carry out this chapter $82,000,000 for each of fiscal years 2019 through 2023.
For termination of section by section 1(b) of Pub. L. 102–551, see Termination of Chapter note set out under section 950aaa of this title.
A prior section 950aaa–5, Pub. L. 101–624, title XXIII, § 2335A, as added Pub. L. 102–551, § 1(a), Oct. 28, 1992, 106 Stat. 4098; amended Pub. L. 103–354, title II, § 235(b)(4)(C), Oct. 13, 1994, 108 Stat. 3222, related to special health care and distance learning program for qualified service areas, prior to the general amendment of this chapter by Pub. L. 104–127.
2018—Pub. L. 115–334 substituted "$82,000,000 for each of fiscal years 2019 through 2023" for "$75,000,000 for each of fiscal years 2014 through 2018".
2014—Pub. L. 113–79 substituted "$75,000,000 for each of fiscal years 2014 through 2018" for "$100,000,000 for each of fiscal years 1996 through 2012".
2008—Pub. L. 110–246, § 6201(b), substituted "2012" for "2007".
2002—Pub. L. 107–171 substituted "2007" for "2002".


text:
Meaww.com: 'Castle Rock' Season 2 Episode 9 Review: Annie Wilkes embraces her diabolic ax-wielding personality from 'Misery' in this episode
By timrobbins On December 4, 2019 · Add Comment · In Press, What Went On, whats-going-on
'Castle Rock' delivers an episode full of drama and jump-scares, just before the finale.
By: Lakshana Palat | Updated On: 4:58 PM PST, Dec 4, 2019
Gloom and death is spreading through the doomed town of Castle Rock, as the Angel looks on. Annie Wilkes' (Lizzy Caplan) daughter Joy (Elsie Fisher) has joined the possessed crowd that is following the Angel's call, and Annie is in a desperate tizzy to get her back.
But is that possible that she can get her daughter back, the way she was before? Yet, thankfully for Annie, she isn't the only one who has not been affected by the Angel's call. She has found herself some unlikely allies.
The latest episode of 'Castle Rock' sees the precious few survivors in the town, including Nadia (Yusra Warsima), Pop Merrill (Tim Robbins) and two others, band together and try to save themselves from being brutally murdered by Ace Merrill (Paul Sparks) and his army of the dead.
It's a Herculean task and involves a heartbreaking sacrifice on the part of one of the hapless survivors to save the others. Annie commits a murder that is almost as epic as her ice-cream scoop murder of Ace in the first episode, by jabbing injections in a man's eye. The scene is brutal and ugly, but Annie does it with much panache.
Another interesting aspect of the episode is that Annie slowly embraces her 'Misery' diabolic characteristics, and doesn't seem to be rattled by the killing she has been doing lately. She has a couple of zinger dialogues to share as she does her grim job as well.
Not just that, she quickly grows accustomed to the ax as a weapon. Clearly, she's preparing well for her gruesome kidnap of Paul Sheldon. But there's still time for that.
Ace Merrill wants Pop Merrill's body as another vessel, and Pop wants to put up a good fight against him, and not let his plans succeed. Ace wants to fulfill the rituals that he has elaborately been planning for 400 years, which will finally come to fruition.
Meanwhile, Pop Merrill is on his last legs, but yet has the energy to have a fully-fledged conversation with Augustine (The man possessing Ace), and some unpleasant revelations are made about Ace's relationship with Pop.
Pop has a hard time hearing this, and this readies him for his final moments. The episode embodies the theme of flawed and twisted love, the craven desire for redemption and forgiveness.
Nadia makes it clear to Pop that if in case she survives the night, she wants nothing to do with him. Abdi has a couple of harsh words to share with Pop as well. And that's when Pop realizes that he has nothing.
He ruined the lives of four children, in his words, and he does not have their forgiveness, let alone love now, just when he is teetering at the precipice of death.
There are threads connecting this season to the Season 1, and we see a familiar character make a brief return. Augustine wants those letters Dale Lacy (Terry Quinn) had written, which explained the evil that was controlling Castle Rock.
This evil was in the form of the Kid (Bill Skarsgård), who had been locked away in The Shawshank Redemption. In the first season, he had been released, only to be put back later. Yet, one thing is certain, the Kid is the Angel, who causes doom and destruction in its wake.
And that's why the town is following the Angel and is ready to commit murders at the drop of a hat.
The episode provided its share of horror, jump scares, as well as balancing it out with the family drama that seeps in occasionally. It's clear that Season 2 is heading to a bloodied finale and most questions will finally get the answer.
This season's 'Castle Rock' has focussed on the themes of flawed love between parents and children, the absolution that never comes and the demons that choose to consume us from inside. 'Castle Rock' released on Hulu, on December 3.


NewsBytes is SCARP's tri-annual newsletter highlighting current announcements, recent accomplishments, events, research, and broader planning movements of interest to staff, faculty, students, and alumni, as well as prospective students and members of the community. Below are a selection of articles from the most recent NewsBytes, as well as a link to download the newsletter.
Previous issues of NewsBytes are available from the NewsBytes Archive.


text:
Bourg-Sainte-Marie
French Version : http://www.cartesfrance.fr/carte-france-ville/52063_Bourg-Sainte-Marie.html
Champagne-Ardenne >
Haute-Marne >
Town of Bourg-Sainte-Marie
The village of Bourg-Sainte-Marie is a small village located north east of France. The town of Bourg-Sainte-Marie is located in the department of Haute-Marne of the french region Champagne-Ardenne.	The town of Bourg-Sainte-Marie is located in the township of Bourmont part of the district of Chaumont. The area code for Bourg-Sainte-Marie is 52063 (also known as code INSEE), and the Bourg-Sainte-Marie zip code is 52150.
Geography and map of Bourg-Sainte-Marie :
The altitude of the city hall of Bourg-Sainte-Marie is approximately 328 meters. The Bourg-Sainte-Marie surface is 9.19 km ². The latitude and longitude of Bourg-Sainte-Marie are 48.179 degrees North and 5.557 degrees East. Nearby cities and towns of Bourg-Sainte-Marie are : Romain-sur-Meuse (52150) at 1.93 km, Brainville-sur-Meuse (52150) at 2.05 km, Huilliécourt (52150) at 2.18 km, Hâcourt (52150) at 2.30 km, Bourmont (52150) at 2.87 km, Saint-Thiébault (52150) at 2.95 km, Illoud (52150) at 3.25 km, Doncourt-sur-Meuse (52150) at 3.65 km.
(The distances to these nearby towns of Bourg-Sainte-Marie are calculated as the crow flies)
Population and housing of Bourg-Sainte-Marie :
The population of Bourg-Sainte-Marie was 110 in 1999, 92 in 2006 and 90 in 2007. The population density of Bourg-Sainte-Marie is 9.79 inhabitants per km². The number of housing of Bourg-Sainte-Marie was 56 in 2007. These homes of Bourg-Sainte-Marie consist of 42 main residences, 12 second or occasional homes and 2 vacant homes.
I like Bourg-Sainte-Marie !
Administrative Information of Bourg-Sainte-Marie
Region : Champagne-Ardenne (21)
Departement : Haute-Marne (52)
District : Chaumont
Township : Bourmont
Nearby towns of Bourg-Sainte-Marie
Here are maps and information of the close municipalities near Bourg-Sainte-Marie.
See all the towns of Haute-Marne (Distances are calculated as the crow flies)
Romain-sur-Meuse (52) at 1.93 km Brainville-sur-Meuse (52) at 2.05 km
Huilliécourt (52) at 2.18 km Hâcourt (52) at 2.30 km
Bourmont (52) at 2.87 km Saint-Thiébault (52) at 2.95 km
Illoud (52) at 3.25 km Doncourt-sur-Meuse (52) at 3.65 km
Malaincourt-sur-Meuse (52) at 4.25 km Levécourt (52) at 4.41 km
Vroncourt-la-Côte (52) at 5.09 km Graffigny-Chemin (52) at 5.41 km
Maisoncelles (52) at 5.66 km Ozières (52) at 6.26 km
Nijon (52) at 6.30 km Thol-lès-Millières (52) at 6.61 km
Vaudrecourt (52) at 7.42 km Clinchamp (52) at 7.46 km
Goncourt (52) at 7.70 km Chaumont-la-Ville (52) at 7.82 km
Geography of Bourg-Sainte-Marie
Population and housings of Bourg-Sainte-Marie
Inhabitants in 2006 : 92 inhabitants
Population data : Population Bourg-Sainte-Marie
Population density : 9.79 hab/km²
Variation of population density : -2.48 %/year
Housings in 1999 : 58 logements
Housings data : Housing Bourg-Sainte-Marie
Hotel Bourg-Sainte-Marie
Search hotels near Bourg-Sainte-Marie : Book your hotel now !
Find all hotels of Bourg-Sainte-Marie :
Hotel : Hotel Saint Martin
Entirely renovated, the Saint Martin hotel welcomes you in the warm and friendly atmosphere of a former farmhouse. The comfortable and nicely decorated guest rooms feature sate...
Rate : from 53.00 € to 83.00 €
Address : 46 Rue De La Grande Fontaine 52150 Bourg-Sainte-Marie
Distance Hotel - Bourg-Sainte-Marie : 0.06 km
Guest accommodation : Les Alouettes
Les Alouettes is a self-catering holiday home in the countryside, 2 km from the historic town of Bourmont. It features a terrace and a large pond in the tree-lined garden. Deco...
Contact : 6, rue de l'Eglise 52150 Brainville-sur-Meuse
Distance Guest accommodation - Bourg-Sainte-Marie : 2.14 km
Bed and Breakfast : La Bulle Des Anges
La Bulle Des Anges is situated in Illoud and offers a garden and a terrace. Guests staying at this bed and breakfast have access to free WiFi. The bed and breakfast has a satel...
Contact : 9 lotissement de corrupt 52150 Illoud
Distance Bed and Breakfast - Bourg-Sainte-Marie : 3.33 km
Bed and Breakfast : La Maison De Marie-Claire
La Maison De Marie-Claire is a B&B located in Doncourt-sur-Meuse, 28 km from Neufchâteau. Offering free bikes, it also features a shared lounge with a fireplace and a room with ...
Contact : 2, rue Ergolaire 52150 Doncourt-sur-Meuse
Bed and Breakfast : Les Ombelles
Featuring free WiFi and a terrace, Les Ombelles offers accommodation in Clinchamp, 36 km from Joinville. Free private parking is available on site. All rooms include a bathroom...
Price : from 77.00 €
Address : 40, rue des 15 écus 52700 Clinchamp
Bed and Breakfast : La Taniere Douce
La Taniere Douce is located in Soulaucourt-sur-Mouzon, 48 km from Joinville and 20 km from Vittel. The rooms come with a TV and are accessible by stairs only. The rooms have a ...
Contact : 15 rue du Radon 52150 Soulaucourt-sur-Mouzon
Guest accommodation : ferme des champs
Situated in Vrécourt, ferme des champs offers a tennis court. Among the various facilities of this property are barbecue facilities and a garden. Both free WiFi and private park...
Contact : ferme des champs ( lieu dit ) 88140 Vrécourt
Distance Guest accommodation - Bourg-Sainte-Marie : 10.81 km
Bed and Breakfast : Relais de la Mothe
Relais de la Mothe is set in Vrécourt, 18 km from Vittel and near the A31 motorway. Guests can enjoy the on-site restaurant. Rooms have a flat-screen TV. Nancy is a 1-hour dri...
Price : from 51.00 € to 55.00 €
Contact : 11 rue du haut de la croix 88140 Vrécourt
Distance Bed and Breakfast - Bourg-Sainte-Marie : 11.11 km
Apartment : L'appartement Du Bien être
L'appartement Du Bien être is set in Damblain and offers a terrace and a shared lounge. Guests staying at this apartment have access to free WiFi. The apartment is located on t...
Address : 1 rue du colonel renard 88320 Damblain
Distance Apartment - Bourg-Sainte-Marie : 11.73 km
Guest accommodation : La Maison Du Bien Être
A garden, terrace and a shared kitchen feature at La Maison Du Bien Être and Wi-Fi is free of charge throughout the property. Bikes can be rented on site and guests can use the ...
Contact : 10 Rue Des Vachots 88320 Damblain
Find another hotel near Bourg-Sainte-Marie :
Bourg-Sainte-Marie hotels list
Map of Bourg-Sainte-Marie
Map of Bourg-Sainte-Marie :
At right you can find the localization of Bourg-Sainte-Marie on the map of France. Below, this is the satellite map of Bourg-Sainte-Marie. A road map, and maps templates of Bourg-Sainte-Marie are available here : "road map of Bourg-Sainte-Marie". This map show Bourg-Sainte-Marie seen by the satellite of Google Map. To see the streets of Bourg-Sainte-Marie or move on another zone, use the buttons "zoom" and "map" on top of this dynamic map.
Search on the map of Bourg-Sainte-Marie :
To search hotels, housings, tourist information office, administrations or other services, use the Google search integrated to the map on the following page : "map Bourg-Sainte-Marie".
Hotels of Bourg-Sainte-Marie are listed on the map with the following icons:
The map of Bourg-Sainte-Marie is centred in the following coordinates :
Print the map of Bourg-Sainte-Marie
Print the map of Bourg-Sainte-Marie : map of Bourg-Sainte-Marie
Photos Bourg-Sainte-Marie
Most popular and closest pictures of Bourg-Sainte-Marie town hall :
52 Bourg-Sainte-Marie
Photo taken : 08 Février 2011
Photographer : H. Rebours
Photo of the town of Bourg-Sainte-Marie or neighboring municipalities	 Lavoir de Romain-sur-Meuse (52)
Picture taken : 20 Octobre 2010
Taken by : H. Rebours
Picture of the town of Bourg-Sainte-Marie or nearby towns
Lavoir d'Hâcourt (52)
By : H. Rebours
Pic of the town of Bourg-Sainte-Marie or neighboring towns	 52 Saint-Thiébault - Pigeonnier tannerie
Photo of the town of Bourg-Sainte-Marie or nearby municipalities
La Meuse pres de Bourmont
Photo taken : 11 Juillet 2013
Photographer : Maxburgh
Photo of the town of Bourg-Sainte-Marie or neighboring municipalities	 Illoud, ermitage de Corrupt sous la neige - février 2005
Picture taken : 02 Décembre 2008
Taken by : jcube52
St-Thiébault - décembre 2004 - paysage d'hiver
Pic taken : 02 Décembre 2008
By : jcube52
Pic of the town of Bourg-Sainte-Marie or neighboring towns	 Illoud, coupe de bois en forêt (affouage) - avril 2005
Photographer : jcube52
Romain-sur-Meuse - décembre 2004 - paysage d'hiver
Photo taken : 02 Décembre 2008
Photo of the town of Bourg-Sainte-Marie or neighboring municipalities	 Saint Thiébault, église - septembre 2005
Picture taken : 06 Avril 2009
Bourg-Ste-Marie - février 2005 - paysage enneigé
Pic of the town of Bourg-Sainte-Marie or neighboring towns	 Illoud, étang de Corrupt - juin 2002
Bourmont, le long de la Meuse - juin 2005 - le foin est pressé !
Photo of the town of Bourg-Sainte-Marie or neighboring municipalities	 Chalet au camping Hirondelles, Bourg Sainte Marie
Picture taken : 15 Mai 2011
Taken by : campinghirondelles
See all photos of Bourg-Sainte-Marie :
Other photos of Bourg-Sainte-Marie and nearby towns can be found here: photos Bourg-Sainte-Marie
Bourg-Sainte-Marie weather forecast
Find next hours and 7 days weather forecast for Bourg-Sainte-Marie here : weather Bourg-Sainte-Marie (with english metrics)
This is the last weather forecast for Bourg-Sainte-Marie collected by the nearest observation station of Chaumont.
The latest weather data for Bourg-Sainte-Marie were collected Monday, 20 January 2020 at 19:49 from the nearest observation station of Chaumont.
Temperature Max: 5°C Temperature Min: -0°C
Precipitation Probability: 2% snow
Pressure: 1040 mbars
Percentage of sky occluded by clouds: 2%
Quick links Bourg-Sainte-Marie :
Bourg-Sainte-Marie city
Bourg-Sainte-Marie hotel
Bourg-Sainte-Marie hotels map
Bourg-Sainte-Marie road map
Bourg-Sainte-Marie map
Bourg-Sainte-Marie photos
Bourg-Sainte-Marie weather
Bourg-Sainte-Marie population
Bourg-Sainte-Marie housing
Make a link to this page of Bourg-Sainte-Marie with the following code :
Bourg-Sainte-Marie


text:
Justia › US Law › Case Law › Alabama Case Law › Supreme Court of Alabama Decisions › 1984 › Owens v. National SEC. of Alabama, Inc.
Owens v. National SEC. of Alabama, Inc.
454 So. 2d 1387 (1984)
Mack O. OWENS & Cheryl Diane Owens v. NATIONAL SECURITY OF ALABAMA, INC.
*1388 Jim Zeigler of Zeigler & Carpenter, Montgomery, for appellants.
W.J. McDaniel and William G. Gantt of McDaniel, Hall, Parsons, Conerly, Scott & Lusk, Birmingham, and Walter R. Byars and James A. Byram, Jr. of Steiner, Crum & Baker, Montgomery, for appellee.
This is an appeal from summary judgment in favor of defendant National Security of Alabama, Inc. ("National Security"). Plaintiffs filed an action[1] against various third parties for an accident at the plant of Montgomery Food Processors ("MFP") on December 6, 1981. Owens tripped over a forklift while walking to his place of work through a dark room. Owens was an employee of an independent contractor ("GNC") performing maintenance work on the MFP premises.
Plaintiffs contend that National Security negligently caused or allowed the lights to be turned off without warning Owens that the lights would be out. National Security moved for summary judgment on three grounds. First, that the one-year statute of limitations barred the action, under Columbia Engineering International, Ltd. v. Espey, 429 So. 2d 955 (Ala.1983). Second, that Owens was contributorily negligent. Third, that Owens assumed the risk which led to his injuries. After a hearing, the trial court granted summary judgment on all three grounds. Thereafter, the trial court properly declined to entertain additional evidence from plaintiffs and denied a motion to reconsider. This appeal followed.[2]
The Owenses' brief succinctly states the facts in this case. Mack Owens drove to the plant and arrived on the premises at approximately 7:00 a.m. He drove into the plant through a gate with a guard station. He presented his pass card to a National Security officer at the guardhouse, and he was allowed to proceed into the plant.
Owens parked his vehicle near a dock at the back of the plant, where he had been instructed to park. He noticed the vehicles of his supervisor and co-workers in their normal places. He met Eddie Mooney, a GNC co-worker. Mr. Mooney asked Owens if he could help in carrying some tools into the plant. Owens agreed to help and picked up his portion of the tools to carry into the plant. He entered the plant with Mr. Mooney.
The portion of the plant entered by Mooney and Owens was illuminated by natural light. The men proceeded through a darkened *1389 maintenance room, described by Owens as being about 70 yards long. At first, Owens could see by natural light. The room gradually became darker. When the room became too dark for them to see their way, Owens used a cigarette lighter to light the way. After walking some distance with the lighter, it failed. At this point, Owens had two choicesto go back through a darkened room and be late to work or to continue on the short distance to a door which he knew to have a light switch and also emergency lights behind it. Owens, followed by Mooney, continued to walk cautiously across the darkened room, shuffling his feet rather than stepping. Owens tripped over the blade of a parked forklift and incurred the injuries for which this action was brought.
On motion for summary judgment, there is a heavy burden upon the moving party:
"A party moving for summary judgment has the burden of clearly showing ... that there is an absence of a genuine issue as to any material fact. The moving party must be entitled to ... judgment as a matter of law. Furthermore, all reasonable inferences from the facts are to be viewed most favorably to the non-movant."
Butler v. Michigan Mutual Insurance Co., 402 So. 2d 949, 951 (Ala.1981) (citations omitted). See Day v. Merchants National Bank of Mobile, 431 So. 2d 1254, 1256 (Ala. 1983); Rule 56 A.R.Civ.P.
By the same token, a summary judgment motion, properly supported as provided for under Rule 56(e), A.R.Civ.P., must be granted "unless the adverse party makes an evidentiary or factual showing in opposition to show that there is a genuine issue of fact for trial." Butler, 402 So. 2d at 951. The non-movant need only establish a scintilla of supporting evidence to avoid summary judgment. White v. White, 431 So. 2d 1208, 1209 (Ala.1983).
Before reaching the issue of whether Owens assumed the risk or was contributorily negligent, we must first find some evidence that National Security breached its duty of care by failing to warn Owens that the lights were out. There is no duty to warn when the danger is fully known to the party who was injured. Crawford Johnson & Co. v. Duffner, 279 Ala. 678, 681, 189 So. 2d 474, 476 (1966). Similarly, there is no duty to warn of open and obvious defects which the injured party should be aware of in the exercise of reasonable care. Shaw v. City of Lipscomb, 380 So. 2d 812, 814 (Ala.1980); Tice v. Tice, 361 So. 2d 1051, 1052 (Ala.1978); Hand v. Butts, 289 Ala. 653, 656, 270 So. 2d 789, 791 (1972). The law does not require the doing of a useless act.
The evidence is undisputed that Owens knew that he was entering a room which was not lighted. Although the entrance area was somewhat illuminated by natural light, the interior of the cavernous building was obviously dark. Owens admitted using a lighter and shuffling his feet, undisputed facts which prove his knowledge of the dark conditions. Even without a warning, a reasonable person in the position of Owens would know the room was dark. Darkness is a plain condition which is open and obvious. Reasonable persons do not walk the length of a large, windowless, and unlighted building and not realize that the way is dark.
Owens contends that the darkness, coupled with the position of the forklift, led to a duty to warn. It is important to note that Owens does not argue that National Security was responsible for positioning or moving the forklift. Owens misunderstands the concept of open and obvious dangers. When someone proceeds through an unfamiliar[3] facility in the dark, he has no right to assume that his course is clear. See Yoder v. Greenwald, 246 So. 2d 148, 150 (Fla.Dist.Ct.App.1971). This rule is certainly as appropriate as the rule that water is an open and obvious danger, and hence no duty to warn exists even where the water conceals dangers beneath the *1390 surface. See generally Alabama Great Southern Railroad Co. v. Green, 276 Ala. 120, 159 So. 2d 823 (1964). Under these circumstances, we hold as a matter of law that National Security had no duty to warn Owens that the room was dark.
The dissent cites two cases to support the position that the appreciation of danger from an open and obvious defect is a jury issue. In Furgerson v. Dresser Industries, Inc., 438 So. 2d 732 (Ala.1983), plaintiff struck her head on an extension of a gasoline pump. The gasoline pump was one of three pumps. The extensions from the other two pumps were protected by concrete-filled pipes. The third pump was unprotected. This Court found that the evidence was disputed on the issue of whether a reasonable person in Mrs. Furgerson's position would know and appreciate the danger of the unprotected extension. We reversed the defendant's summary judgment. The present case is materially different from Furgerson, in which the evidence and inferences were mixed. Owens undisputedly knew he was entering a dark building. Moreover, the evidence in this case is such that the trial court is required to find as a matter of law that a reasonable man would be aware of the danger. The condition of total darkness is sufficient to put reasonable people on notice of a substantial risk of concealed hazards. Because of these differences, Furgerson does not control this case.
In Kingsberry Homes Corp. v. Ralston, 285 Ala. 600, 235 So. 2d 371 (1970), a railroad employee sued for injuries incurred when trapped between a train and the loading dock during coupling operations. Although Ralston knew it was dangerous to be between the cars and the platform, the evidence also showed that Ralston's "fellow employees were supposed to await a signal from him before proceeding with the coupling and that he had given no signal." 285 Ala. at 606, 235 So. 2d at 376. The Court found that the failure to comply with the warning system constituted at least a scintilla of evidence that Ralston did not anticipate the cars would move. Evidence of the failure to comply with the warning system materially distinguishes Kingsberry from the present case. Owens had every reason to anticipate hazards in the dark, while in Kingsberry Ralston could arguably have relied on the warning system.
The dissent's final concern is about requiring Owens to proceed through an unilluminated passage. National Security did not require Owens to proceed through the building in issue. Owens alleges only that National Security had the duty to warn him of the darkness. Whether it was unreasonable to allegedly require Owens to proceed through the darkened building is a dispute between Owens and his employer.
Because we find that National Security did not owe a duty to warn Owens that the room was dark, we pretermit any discussion of assumption of the risk, contributory negligence, or the statute of limitations.
MADDOX, FAULKNER, ALMON and SHORES, JJ., concur.
JONES, EMBRY, BEATTY and ADAMS, JJ., dissent.
JONES, Justice (dissenting).
I concur with Justice Embry as to the duty to warn issue, but find it unnecessary to comment on the statute of limitations issue not addressed in the majority opinion.
EMBRY, Justice (dissenting):
It is incomprehensible to me, how the majority can cavalierly ignore the fact that the trial court held this action to be barred by the one year statute of limitations. In this case, it cannot be said there is no genuine issue as to any material fact. The original complaint stated a claim against the fictitious defendant denominated as "G," thusly; "Defendants G, H and I ... negligently caused or allowed lights therein to be cut off without warning or notice to Plaintiff." National Security was later, by amendment, substituted for G. Under our liberal notice pleadings, which I decry as *1391 being too loose, this allegation of negligence would include the charge that defendant "G" negligently failed to warn Owens that the lights were off.
We then pass to the question of National's duty to warn. Both parties submitted National's motion for summary judgment upon the depositions of Mack Owens; National in support, Owens in opposition. Owen's deposition, as correctly stated by him in brief, shows that he was assigned to work in a place at Montgomery Food Processors requiring him to pass through a darkened maintenance area approximately 210 feet long; just a bit over two-thirds the length of a football field. He was unaware, and had not been notified of, a general electrical power outage. When this became apparent to him, he made for a door adjacent to which there was a switch and emergency lights. During this attempt he was caused to fall and be injured by a forklift left in an aisle theretofore known to him to be left free and clear as a passageway. Owens was employed by an independent contractor and was scheduled to work at the time and place of the injury. Surely National was aware of or should have known of these facts and circumstances. It was responsible for plant security. The question of its duty owed to Owens was an issue of fact for resolution by a jury.
It was also for the jury to decide whether Owens had a conscious appreciation of any obvious or open danger presented by the physical conditions making up the entrance-exit way at the time he fell and was injured. In summary, with the forklift blocking the aisle, was the danger presented by darkness so open and obvious as to relieve National of any duty to warn about the lights or move the forklift? See Furgerson v. Dresser Industries, 438 So. 2d 732 (Ala.1983).
Also, here, a jury question is presented because a jury could rationally find that Owens could not reasonably expect his path to be blocked in an area where there was a power outage of which there was no forewarning. Further, it could be reasonably concluded that Owens's conduct in slowing his walk and shuffling his feet when he could no longer see were precautions a prudent person would take.
The duty to warn usually arises from the particular relationship of the parties and under the particular facts of each case. To say, as a matter of law, there was no duty to warn under the facts of this case is a severe test of one's credulity. Where is there no disputable question of whether darkness of a passageway, having a forklift left to block it, is an open and obvious, consciously appreciated, danger? Unquestionably the question is one of fact for the jury and presents the factual dispute of the duty to warn for resolution by a jury. Where does this fact scenario present an indisputable issue of a danger, consciously appreciated, fully known to Owens?
"Reasonable persons do not walk the length of a large, windowless, and unlighted building and not realize that the way is dark." So says the majority. I ask, what reasonable person expects to find a place through which he must pass to go to his work place, customarily and usually illuminated, unilluminated without any forewarning?
This is no case for disposition by summary judgment. Negligence actions seldom can be disposed of by summary judgment in light of the scintilla rule which, in spite of my disagreement, is still the rule.
ADAMS, J., concurs.
[1] Mack Owens sued in negligence and his wife filed a claim for loss of consortium.
[2] National Security moved to dismiss the appeal on the ground that the case below was still pending as to other defendants. The record indicates, however, that at the time of appeal, the case was final as to all served defendants. After filing their notice of appeal, the Owenses were able to serve two more defendants; their previous attempts at service on these defendants had failed, either because the defendant's name was stated incorrectly or because the summons and complaint were returned unclaimed.
Under A.R.Civ.P., Rule 4(f), plaintiffs' appeal from the summary judgment was not premature. "When there are multiple defendants and the summons or other document to be served and complaint has been served on one or more, but not all, of the defendants, the plaintiff may proceed to trial and judgment as to the defendant or defendants on whom process has been served and if the judgment as to defendants who have been served is final in all other respects, it shall be a final judgment." Rule 4(f), as amended March 1, 1982.
Under Rule 4(f), service on the other defendants must be completed, not merely attempted, before it can be said the pending action involves other active defendants. Accordingly, we denied the motion to dismiss by order on January 17, 1984.
[3] Unfamiliarity can arise when the injured party is in the facility for the first time or when he has knowledge that the equipment and internal layout is frequently rearranged.