text:
package org.onosproject.ospf.controller.impl;

import org.easymock.EasyMock;
import org.jboss.netty.channel.Channel;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.onlab.packet.Ip4Address;
import org.onosproject.ospf.controller.OspfInterface;
import org.onosproject.ospf.controller.OspfLsa;
import org.onosproject.ospf.controller.OspfLsaType;
import org.onosproject.ospf.controller.OspfNeighborState;
import org.onosproject.ospf.controller.TopologyForDeviceAndLink;
import org.onosproject.ospf.controller.area.OspfAreaImpl;
import org.onosproject.ospf.controller.area.OspfInterfaceImpl;
import org.onosproject.ospf.controller.lsdb.LsaWrapperImpl;
import org.onosproject.ospf.controller.lsdb.LsdbAgeImpl;
import org.onosproject.ospf.protocol.lsa.LsaHeader;
import org.onosproject.ospf.protocol.lsa.types.NetworkLsa;
import org.onosproject.ospf.protocol.lsa.types.RouterLsa;
import org.onosproject.ospf.protocol.ospfpacket.OspfMessage;
import org.onosproject.ospf.protocol.ospfpacket.types.DdPacket;
import org.onosproject.ospf.protocol.ospfpacket.types.HelloPacket;
import org.onosproject.ospf.protocol.ospfpacket.types.LsRequest;
import org.onosproject.ospf.protocol.ospfpacket.types.LsUpdate;
import org.onosproject.ospf.protocol.util.ChecksumCalculator;
import org.onosproject.ospf.protocol.util.OspfUtil;

import java.net.SocketAddress;
import java.util.ArrayList;
import java.util.List;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;

/**
 * Unit test class for OspfNbrImpl.
 */
public class OspfNbrImplTest {

    private OspfNbrImpl ospfNbr;
    private OspfInterfaceImpl ospfInterface;
    private OspfAreaImpl ospfArea;
    private OspfInterfaceImpl ospfInterface1;
    private OspfInterfaceImpl ospfInterface2;
    private List<OspfInterface> ospfInterfaces;
    private List<OspfLsa> ospfLsaList;
    private Channel channel;
    private Channel channel1;
    private Channel channel2;
    private OspfMessage ospfMessage;
    private TopologyForDeviceAndLink topologyForDeviceAndLink;

    @Before
    public void setUp() throws Exception {
        ospfInterface = new OspfInterfaceImpl();
        ospfInterface.setInterfaceType(2);
        ospfInterface.setRouterDeadIntervalTime(30);
        ospfInterface.setReTransmitInterval(30);
        ospfInterface.setDr(Ip4Address.valueOf("1.1.1.1"));
        ospfInterface.setIpAddress(Ip4Address.valueOf("1.1.1.1"));
        ospfArea = new OspfAreaImpl();
        ospfInterface1 = new OspfInterfaceImpl();
        ospfInterface1.setInterfaceType(2);
        ospfInterface1.setRouterDeadIntervalTime(30);
        ospfInterface1.setReTransmitInterval(30);
        ospfInterface1.setDr(Ip4Address.valueOf("7.7.7.7"));
        ospfInterface1.setIpAddress(Ip4Address.valueOf("7.7.7.7"));
        ospfInterface2 = new OspfInterfaceImpl();
        ospfInterface2.setInterfaceType(2);
        ospfInterface2.setRouterDeadIntervalTime(30);
        ospfInterface2.setReTransmitInterval(30);
        ospfInterface2.setDr(Ip4Address.valueOf("6.6.6.6"));
        ospfInterface2.setIpAddress(Ip4Address.valueOf("6.6.6.6"));
        ospfInterfaces = new ArrayList();
        ospfInterfaces.add(ospfInterface);
        ospfInterfaces.add(ospfInterface1);
        ospfInterfaces.add(ospfInterface2);
        ospfArea.setInterfacesLst(ospfInterfaces);
        ospfArea.setRouterId(Ip4Address.valueOf("111.111.111.111"));
        topologyForDeviceAndLink = new TopologyForDeviceAndLinkImpl();
        ospfNbr = new OspfNbrImpl(ospfArea, ospfInterface, Ip4Address.valueOf("1.1.1.1"),
                                  Ip4Address.valueOf("2.2.2.2"), 2,
                                  new OspfInterfaceChannelHandler(new Controller(),
                                                                  ospfArea, ospfInterface),
                                  topologyForDeviceAndLink);

    }

    @After
    public void tearDown() throws Exception {
        ospfNbr = null;
        ospfArea = null;
        ospfInterface = null;
        ospfLsaList = null;
        channel = null;
        channel1 = null;
        channel2 = null;
        ospfMessage = null;

    }

    /**
     * Tests neighborIpAddr() method.
     */
    @Test
    public void testNeighborIpAddr() throws Exception {
        assertThat(ospfNbr.neighborIpAddr(), is(notNullValue()));
    }

    /**
     * Tests isOpaqueCapable() getter method.
     */
    @Test
    public void testIsOpaqueCapable() throws Exception {
        assertThat(ospfNbr.isOpaqueCapable(), is(false));
    }

    /**
     * Tests isOpaqueCapable() setter method.
     */
    @Test
    public void testSetIsOpaqueCapable() throws Exception {
        ospfNbr.setIsOpaqueCapable(true);
        assertThat(ospfNbr.isOpaqueCapable(), is(true));
    }

    /**
     * Tests oneWayReceived() method.
     */
    @Test
    public void testOneWayReceived() throws Exception {
        ospfMessage = new HelloPacket();
        ospfNbr.setState(OspfNeighborState.ATTEMPT);
        channel = EasyMock.createMock(Channel.class);
        ospfNbr.oneWayReceived(ospfMessage, channel);
        channel1 = EasyMock.createMock(Channel.class);
        ospfNbr.setState(OspfNeighborState.DOWN);
        ospfNbr.oneWayReceived(ospfMessage, channel1);
        channel2 = EasyMock.createMock(Channel.class);
        ospfNbr.setState(OspfNeighborState.TWOWAY);
        ospfNbr.oneWayReceived(ospfMessage, channel2);
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests twoWayReceived() method.
     */
    @Test(expected = Exception.class)
    public void testTwoWayReceived() throws Exception {
        ospfNbr.setNeighborDr(Ip4Address.valueOf("1.1.1.1"));
        ospfMessage = new HelloPacket();
        ospfNbr.setState(OspfNeighborState.ATTEMPT);
        ospfNbr.setNeighborDr(Ip4Address.valueOf("2.2.2.2"));
        ospfInterface.setIpAddress(Ip4Address.valueOf("2.2.2.2"));
        channel = EasyMock.createMock(Channel.class);
        SocketAddress socketAddress = EasyMock.createMock(SocketAddress.class);
        channel.bind(socketAddress);
        ospfNbr.twoWayReceived(ospfMessage, channel);
        ospfInterface.setIpAddress(Ip4Address.valueOf("3.3.3.3"));
        channel1 = EasyMock.createMock(Channel.class);
        ospfNbr.twoWayReceived(ospfMessage, channel1);
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests negotiationDone() method.
     */
    @Test(expected = Exception.class)
    public void testNegotiationDone() throws Exception {
        ospfLsaList = new ArrayList();
        ospfLsaList.add(new RouterLsa());
        ospfMessage = new HelloPacket();
        ospfNbr.setState(OspfNeighborState.EXSTART);
        channel = EasyMock.createMock(Channel.class);
        ospfNbr.negotiationDone(ospfMessage, true, ospfLsaList, channel);
        channel1 = EasyMock.createMock(Channel.class);
        ospfNbr.negotiationDone(ospfMessage, false, ospfLsaList, channel1);
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests processLsas() method.
     */
    @Test
    public void testProcessLsas() throws Exception {
        ospfLsaList = new ArrayList();
        RouterLsa routerLsa = new RouterLsa();
        routerLsa.setLsType(1);
        ospfLsaList.add(routerLsa);
        NetworkLsa networkLsa = new NetworkLsa();
        routerLsa.setLsType(2);
        ospfLsaList.add(networkLsa);
        routerLsa.setLsType(3);
        ospfLsaList.add(routerLsa);
        ospfNbr.processLsas(ospfLsaList);
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests seqNumMismatch() method.
     */
    @Test
    public void testSeqNumMismatch() throws Exception {
        ospfNbr.setState(OspfNeighborState.FULL);
        assertThat(ospfNbr.seqNumMismatch("samelsa"), is(notNullValue()));
    }

    /**
     * Tests badLSReq() method.
     */
    @Test
    public void testBadLSReq() throws Exception {
        channel = EasyMock.createMock(Channel.class);
        ospfNbr.setState(OspfNeighborState.FULL);
        ospfNbr.badLSReq(channel);
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests processDdPacket() method.
     */
    @Test
    public void testProcessDdPacket() throws Exception {
        ospfArea.addLsa(new RouterLsa(), false, ospfInterface);
        ospfArea.addLsa(new RouterLsa(), ospfInterface);
        ospfArea.addLsaToMaxAgeBin("lsa", new LsaWrapperImpl());
        channel = EasyMock.createMock(Channel.class);
        DdPacket ddPacket = new DdPacket();
        ddPacket.addLsaHeader(new LsaHeader());
        ospfNbr.processDdPacket(true, ddPacket, channel);
        channel1 = EasyMock.createMock(Channel.class);
        ddPacket.setIsMore(1);
        ospfNbr.processDdPacket(false, ddPacket, channel1);
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests exchangeDone() method.
     */
    @Test
    public void testExchangeDone() throws Exception {
        ospfMessage = new HelloPacket();
        channel = EasyMock.createMock(Channel.class);
        ospfNbr.setState(OspfNeighborState.EXCHANGE);
        ospfNbr.exchangeDone(ospfMessage, channel);
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests exchangeDone() method.
     */
    @Test
    public void testExchangeDone1() throws Exception {
        ospfMessage = new HelloPacket();
        channel = EasyMock.createMock(Channel.class);
        ospfNbr.setState(OspfNeighborState.EXCHANGE);
        ospfLsaList = new ArrayList();
        RouterLsa routerLsa = new RouterLsa();
        routerLsa.setLsType(1);
        ospfLsaList.add(routerLsa);
        NetworkLsa networkLsa = new NetworkLsa();
        routerLsa.setLsType(2);
        ospfLsaList.add(networkLsa);
        routerLsa.setLsType(3);
        ospfLsaList.add(routerLsa);
        ospfNbr.processLsas(ospfLsaList);
        ospfNbr.setState(OspfNeighborState.EXCHANGE);
        ospfNbr.exchangeDone(ospfMessage, channel);
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests adjOk() method.
     */
    @Test
    public void testAdjOk() throws Exception {
        channel = EasyMock.createMock(Channel.class);
        ospfInterface.setIpAddress(Ip4Address.valueOf("2.2.2.2"));
        ospfNbr.setState(OspfNeighborState.TWOWAY);
        ospfNbr.setNeighborDr(Ip4Address.valueOf("2.2.2.2"));
        ospfNbr.adjOk(channel);
        Assert.assertNotNull(ospfNbr);
    }

    /**
     * Tests processLsUpdate() method.
     */
    @Test
    public void testProcessLsUpdate() throws Exception {
        LsUpdate ospfMessage = new LsUpdate();
        ospfMessage.setSourceIp(Ip4Address.valueOf("10.10.10.10"));
        ospfMessage.addLsa(new RouterLsa());
        ospfMessage.addLsa(new NetworkLsa());
        channel = EasyMock.createMock(Channel.class);
        ospfNbr.setState(OspfNeighborState.EXCHANGE);
        ospfNbr.processLsUpdate(ospfMessage, channel);
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests loadingDone() method.
     */
    @Test
    public void testLoadingDone() throws Exception {
        ospfArea.addLsa(new RouterLsa(), false, ospfInterface);
        ospfArea.addLsa(new RouterLsa(), ospfInterface);
        ospfArea.addLsaToMaxAgeBin("lsa", new LsaWrapperImpl());
        ospfNbr.loadingDone();
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests processReceivedLsa() method.
     */
    @Test
    public void testProcessReceivedLsa() throws Exception {
        LsaWrapperImpl lsaWrapper = new LsaWrapperImpl();
        LsdbAgeImpl lsdbAge = new LsdbAgeImpl(new OspfAreaImpl());
        lsdbAge.ageLsaAndFlood();
        lsaWrapper.setLsdbAge(lsdbAge);
        lsaWrapper.setLsaHeader(new NetworkLsa());
        RouterLsa routerlsa = new RouterLsa();
        routerlsa.setLsType(1);
        routerlsa.setOptions(2);
        routerlsa.setAdvertisingRouter(Ip4Address.valueOf("1.1.1.1"));
        routerlsa.setAge(100);
        routerlsa.setLinkStateId("2.2.2.2");
        routerlsa.setLsSequenceNo(1010101);
        lsaWrapper.setLsaHeader(new RouterLsa());
        ospfArea.addLsa(routerlsa, false, ospfInterface);

        lsaWrapper.addLsa(OspfLsaType.ROUTER, routerlsa);
        ospfArea.addLsa(routerlsa, ospfInterface);
        ospfArea.addLsaToMaxAgeBin("lsa", new LsaWrapperImpl());
        byte[] res = routerlsa.asBytes();
        routerlsa.setLsPacketLen(res.length);
        res = new ChecksumCalculator().calculateLsaChecksum(routerlsa.asBytes(), 16, 17);
        routerlsa.setLsCheckSum(OspfUtil.byteToInteger(res));
        channel = EasyMock.createMock(Channel.class);
        lsdbAge.ageLsaAndFlood();
        assertThat(ospfNbr.processReceivedLsa(lsaWrapper.lsaHeader(), true, channel,
                                              Ip4Address.valueOf("10.10.10.10")), is(true));
        channel1 = EasyMock.createMock(Channel.class);
        assertThat(ospfNbr.processReceivedLsa(routerlsa, true, channel1,
                                              Ip4Address.valueOf("10.10.10.10")), is(true));
    }

    /**
     * Tests isNullorLatest() method.
     */
    @Test
    public void testIsNullorLatest() throws Exception {

        LsaWrapperImpl lsaWrapper = new LsaWrapperImpl();
        LsdbAgeImpl lsdbAge = new LsdbAgeImpl(new OspfAreaImpl());
        lsdbAge.ageLsaAndFlood();
        lsaWrapper.setLsdbAge(lsdbAge);
        lsaWrapper.setLsaHeader(new LsaHeader());
        lsaWrapper.addLsa(OspfLsaType.ROUTER, new RouterLsa());
        assertThat(ospfNbr.isNullorLatest(lsaWrapper, new LsaHeader()), is(notNullValue()));
    }

    /**
     * Tests processSelfOriginatedLsa() method.
     */
    @Test
    public void testProcessSelfOriginatedLsa() throws Exception {
        ospfNbr.processSelfOriginatedLsa();
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests sendLsa() method.
     */
    @Test
    public void testSendLsa() throws Exception {
        channel = EasyMock.createMock(Channel.class);
        ospfNbr.sendLsa(new LsaHeader(), Ip4Address.valueOf("1.1.1.1"), channel);
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests directAcknowledge() method.
     */
    @Test
    public void testDirectAcknowledge() throws Exception {
        channel = EasyMock.createMock(Channel.class);
        ospfNbr.directAcknowledge(new LsaHeader(), channel, Ip4Address.valueOf("1.1.1.1"));
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests neighborDown() method.
     */
    @Test(expected = Exception.class)
    public void testNeighborDown() throws Exception {
        ospfNbr.neighborDown();
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests startFloodingTimer() method.
     */
    @Test
    public void testStartFloodingTimer() throws Exception {
        channel = EasyMock.createMock(Channel.class);
        ospfNbr.startFloodingTimer(channel);
        assertThat(ospfNbr, is(notNullValue()));
    }

    /**
     * Tests lastDdPacket() getter method.
     */
    @Test
    public void testGetLastDdPacket() throws Exception {
        ospfNbr.setLastDdPacket(new DdPacket());
        assertThat(ospfNbr.lastDdPacket(), is(notNullValue()));
    }

    /**
     * Tests lastDdPacket() setter method.
     */
    @Test
    public void testSetLastDdPacket() throws Exception {
        ospfNbr.setLastDdPacket(new DdPacket());
        assertThat(ospfNbr.lastDdPacket(), is(notNullValue()));
    }

    /**
     * Tests neighborId() getter method.
     */
    @Test
    public void testNeighborId() throws Exception {
        ospfNbr.setNeighborId(Ip4Address.valueOf("1.1.1.1"));
        assertThat(ospfNbr.neighborId(), is(Ip4Address.valueOf("1.1.1.1")));
    }

    /**
     * Tests neighborId() setter method.
     */
    @Test
    public void testSetNeighborId() throws Exception {
        ospfNbr.setNeighborId(Ip4Address.valueOf("1.1.1.1"));
        assertThat(ospfNbr.neighborId(), is(Ip4Address.valueOf("1.1.1.1")));
    }

    /**
     * Tests neighborDr() getter method.
     */
    @Test
    public void testNeighborDr() throws Exception {
        ospfNbr.setNeighborDr(Ip4Address.valueOf("1.1.1.1"));
        assertThat(ospfNbr.neighborDr(), is(Ip4Address.valueOf("1.1.1.1")));
    }

    /**
     * Tests neighborDr() setter method.
     */
    @Test
    public void testSetNeighborDr() throws Exception {
        ospfNbr.setNeighborDr(Ip4Address.valueOf("1.1.1.1"));
        assertThat(ospfNbr.neighborDr(), is(Ip4Address.valueOf("1.1.1.1")));
    }

    /**
     * Tests neighborBdr() getter method.
     */
    @Test
    public void testNeighborBdr() throws Exception {
        ospfNbr.setNeighborBdr(Ip4Address.valueOf("1.1.1.1"));
        assertThat(ospfNbr.neighborBdr(), is(Ip4Address.valueOf("1.1.1.1")));
    }

    /**
     * Tests neighborBdr() setter method.
     */
    @Test
    public void testSetNeighborBdr() throws Exception {
        ospfNbr.setNeighborBdr(Ip4Address.valueOf("1.1.1.1"));
        assertThat(ospfNbr.neighborBdr(), is(Ip4Address.valueOf("1.1.1.1")));
    }

    /**
     * Tests routerPriority() getter method.
     */
    @Test
    public void testRouterPriority() throws Exception {
        ospfNbr.setRouterPriority(1);
        assertThat(ospfNbr.routerPriority(), is(1));
    }

    /**
     * Tests routerPriority() setter method.
     */
    @Test
    public void testSetRouterPriority() throws Exception {
        ospfNbr.setRouterPriority(1);
        assertThat(ospfNbr.routerPriority(), is(1));
    }

    /**
     * Tests options() getter method.
     */
    @Test
    public void testGetOptions() throws Exception {
        ospfNbr.setOptions(1);
        assertThat(ospfNbr.options(), is(1));
    }

    /**
     * Tests options() setter method.
     */
    @Test
    public void testSetOptions() throws Exception {
        ospfNbr.setOptions(1);
        assertThat(ospfNbr.options(), is(1));
    }

    /**
     * Tests ddSeqNum() getter method.
     */
    @Test
    public void testGetDdSeqNum() throws Exception {
        ospfNbr.setDdSeqNum(1);
        assertThat(ospfNbr.ddSeqNum(), is(1L));
    }

    /**
     * Tests ddSeqNum() setter method.
     */
    @Test
    public void testSetDdSeqNum() throws Exception {
        ospfNbr.setDdSeqNum(1);
        assertThat(ospfNbr.ddSeqNum(), is(1L));
    }

    /**
     * Tests isMaster() getter method.
     */
    @Test
    public void testIsMaster() throws Exception {
        ospfNbr.setIsMaster(1);
        assertThat(ospfNbr.isMaster(), is(1));
    }

    /**
     * Tests lastDdPacket() getter method.
     */
    @Test
    public void testGetLastSentDdPacket() throws Exception {
        ospfNbr.setLastDdPacket(new DdPacket());
        assertThat(ospfNbr.lastDdPacket(), is(notNullValue()));
    }

    /**
     * Tests lastDdPacket() setter method.
     */
    @Test
    public void testSetLastSentDdPacket() throws Exception {
        ospfNbr.setLastDdPacket(new DdPacket());
        assertThat(ospfNbr.lastDdPacket(), is(notNullValue()));
    }

    /**
     * Tests getLastSentLsrPacket() getter method.
     */
    @Test
    public void testGetLastSentLsrPacket() throws Exception {
        ospfNbr.setLastSentLsrPacket(new LsRequest());
        assertThat(ospfNbr.getLastSentLsrPacket(), is(notNullValue()));
    }

    /**
     * Tests getLastSentLsrPacket() setter method.
     */
    @Test
    public void testSetLastSentLsrPacket() throws Exception {
        ospfNbr.setLastSentLsrPacket(new LsRequest());
        assertThat(ospfNbr.getLastSentLsrPacket(), is(notNullValue()));
    }

    /**
     * Tests getState() getter method.
     */
    @Test
    public void testGetState() throws Exception {
        ospfNbr.setState(OspfNeighborState.EXCHANGE);
        assertThat(ospfNbr.getState(), is(OspfNeighborState.EXCHANGE));
    }

    /**
     * Tests getState() setter method.
     */
    @Test
    public void testSetState() throws Exception {
        ospfNbr.setState(OspfNeighborState.EXCHANGE);
        assertThat(ospfNbr.getState(), is(OspfNeighborState.EXCHANGE));
    }

    /**
     * Tests isMaster() setter method.
     */
    @Test
    public void testSetIsMaster() throws Exception {
        ospfNbr.setIsMaster(1);
        assertThat(ospfNbr.isMaster(), is(1));
    }

    /**
     * Tests getLsReqList() method.
     */
    @Test
    public void testGetLsReqList() throws Exception {
        assertThat(ospfNbr.getLsReqList(), is(notNullValue()));
    }

    /**
     * Tests getReTxList() method.
     */
    @Test
    public void testGetReTxList() throws Exception {
        assertThat(ospfNbr.getReTxList(), is(notNullValue()));
    }

    /**
     * Tests getPendingReTxList() method.
     */
    @Test
    public void testGetPendingReTxList() throws Exception {
        assertThat(ospfNbr.getPendingReTxList(), is(notNullValue()));
    }
}

redpajama_set_name: RedPajamaGithub


text:
Nigeria to provide amnesty program
Published on April 18, 2013 at 8:33 am
LAGOS, Nigeria — Nigeria formed a panel that will create an amnesty program for Islamic extremists to try to quell a bloody guerrilla campaign of bombings and shootings that's killed hundreds of people across its north, the government said Wednesday.
The 26-person panel has a 60-day deadline to come up with an offer for militants belonging to the Islamic extremist network Boko Haram and other groups now fighting against government forces and killing civilians with apparent impunity.
The presidential committee, including police and military officials, as well as politicians and human rights activists, would "constructively engage key members of Boko Haram and define a comprehensive and workable framework for resolving the crisis of insecurity in the country" as well as offer a "comprehensive victims' support program."

redpajama_set_name: RedPajamaCommonCrawl


That pesky sharp pain in your back, the culprit of your sleepless nights, can often result from everyday activities. Many back strains can happen due to work or exercising. Just being aware of the harmful effects of the things you do every day can keep you from putting your back at further risk.
Heavy lifting is a common cause of back pain. Lifting weights overhead can be especially unsafe. Weights being held overhead put more pressure on the discs and the joints in the spine than normal, leading to their eventual wear. But no matter what you do, make sure not to bend forward and lift at the same time. This is the ultimate sin and puts even more pressure on the back.
Trying new things is a good thing… but it can have a toll on your body. Trying a new sport or activity can put foreign stress on your back muscles leading to muscle strain.
Any repetitive motion, (twisting, lifting, etc.) can cause the muscles in your back to tighten and tear. Rowing and baseball can be strenuous, and over time, these activities can put your back under chronic strain.
The insistent "are we there yet?" isn't the only painful part about taking long drives. People who drive for long hours consistently are at risk for developing back strain. The subtle body vibrations that are felt by the driver can cause pain over time. Truck drivers, who sit days behind the wheel, are especially perceptible to chronic pain back.
While some of these activities are unavoidable in daily life, just being aware can be one step towards better health. Most back pain is relatively harmless and can be treated with self-care.
Schedule your appointment with Neurosurgeon/Spine Surgeon Dr. Rebecca Stachniak.
Dr. Rebeccca Stachniak is a board certified Neurological Spine Surgeon and Medical Director of the Brain & Spine Center of Texas. Dr. Stachniak is part of the faculty at Medtronic as a teaching physician, teaching other spine surgeons on techniques in spine surgery. Having authored many papers, posters, and presentations for major Neurosurgical and Spine related conferences, Dr. Stachniak is highly sought after and regarded around the world speaking at international conferences. Named Top10MD in 2016 – an honor only 1-in-3 doctors succeed within the United States. To schedule a consultation with Dr. Stachniak, click on her profile or call her office at 972.943.9779.


Branches and representatives will be aware that activity in RDC's/WBC's has already commenced in line with the Resourcing Realignment commitments contained in the 'Four Pillars' agreement. In addition to that activity discussions have also been taking place with the business to formalise a model week process that can be applied in the RDC function.
It was jointly agreed that it would be mutually beneficial to produce a standardised process to assist in ensuring that a robust resourcing base is achieved in the RDC/WBC functions, recognising the variable and evolving nature of the workload.
Following discussions Joint activity was agreed, including the involvement of CWU Industrial Engineers, to establish a revised process which meets the commitments in the Four Pillars agreement and Realignment documents.
A Joint Statement has now been concluded and endorsed by the Postal Executive, which provides a Methodology for Creating a Model Week in RDC's/WBC's to support the commitments in the Guiding Principles Agreement in relation to resourcing mix activity.
A copy of the Joint Statement is attached for the information of Branches and RDC/WBC representatives.
 Avoid stranded costs during low workload demand periods.
 Provide a level of fixed and flexible earning opportunities to meet employee aspirations (OT/SA).
 Ensure a reliable resourcing base.
 Ensure effective alignment of resource to workload.
 Promote the use of innovative, mutual interest duty structures, ensuring workload clearance while providing work/life balance.
The attached Joint Statement provides details of the review process to be undertaken on an annual basis and at peak periods to ascertain and facilitate resourcing mix requirements.
It is jointly envisaged that the processes that have been developed will provide a framework that will enable maximum permanent resourcing to be achieved, whilst also seeking to minimise stranded costs. Equally, the processes will enable flexibility in relation to resourcing, the maintenance of earnings potential for existing employees and reduce the reliance on agency resource during peak demand periods. It is jointly intended that the defined process will provide a method of reducing reliance on agency use and promote a contractual resourcing model that maximises, wherever possible, a permanent workforce consistent with existing agreements to ensure that a robust staffing base is achieved.
To ensure that the joint objectives are being achieved the resourcing figures/arrangements will be subject to National review on a six monthly basis going forward.
It has been reaffirmed that all activity will take place in line with the IR Framework and National agreements, including the MTSF where required.
It has also been confirmed that where agreed outcomes produce efficiency/operational savings these will be identified, tracked and recorded and will be included in the agreed funding solution for the 2nd Hour reduction in the Working Week for RDC/WBC's.
A Joint workshop has been arranged for the 27th March 2019 to deliver training in relation to the new process and RDC and WBC representatives should have received an invitation to attend. The training is extremely important and as such the department would request that every effort is made to ensure that one unit representative from each RDC and WBC is in attendance at this event.


It's a miracle, but so far I have been able to launch these monthly reports on time! This month was not the most productive I've ever had, but still I got plenty of unexpected developments and intriguing insights to share with you in this month's edition.
First ever guest post - A new milestone was reached with the release of the first ever guest post on my blog this month. Paul Marcel, one of my readers and an expert on options, contacted me and proposed to write an article on how value investors can use options to increase their returns. I then proofread the article, added some extra bits and pieces, and the result is a highly informative article from which I learned a lot myself, which is great!
Website improvements - In last month's report you could read how I moved the Value Spreadsheet website to a new webhost and also started using a more powerful mail server (although some of you are probably not receiving my newsletter anymore, but I'm working on this). This month I set up secured URLs throughout the entire website (see the beautiful green lock in front of the https in your browser), and optimized the speed of the website to further enhance your viewing pleasure. This led to all kinds of technical difficulties, but everything on the website should be working again, except for the fact that all my social media buttons were reset to zero :-( (if you happen to know how to salvage them, please contact me).
New house, new office - This month I moved to a new place and also moved in to a new office in the absolute center of my beloved Amsterdam. It's a creative working space where I'm surrounded by entrepreneurs, startups and all-round inspirational people. Hopefully this environment will allow me to focus even more on creating informative content for you guys (I got something interesting lined up for you in the coming month..).
That's why I decided to suspend the development of ValueScout for now. This was a fairly big decision, since ValueScout is already 90% finished and I have invested a lot of time, energy, and money in it, but I only wish to offer you the best-of-the-best tools out there, and after some thorough testing I concluded that Jitta was by far the strongest player out there for value investors, and will only become better over time. I actually got in touch with the owner of Jitta, and you can expect me to talk much more about this currently invite-only tool in the future!
With regards to my portfolio, not much happened. Of course, some of my holdings moved a bit, but nothing spectacular or noteworthy. I did use the unfinished bèta version of ValueScout to identify a potential hidden gem. This stock is a micro-cap growth stock with zero debt, Return on Equity between 20 and 30%, and a decent valuation. They are a market leader with a relatively simple, high-quality product. I am talking about an under-the-radar stock called Omega Flex (OFLX). I have placed an order for a price significantly below the current share price, because the stock is not cheap, but definitely has potential.
Also, I started applying the option strategy explained in the guest post I mentioned before, but with a slight tweak from my friend and pro-trader Chris Moody, who I recently interviewed for my new podcast. He said that you can sell a put option, as explained in the guest post, and simultaneously buy a put option with a lower strike price. This way you lock-up less money in the trade, allowing even people with small portfolios to earn a decent amount of income from the option premium, and you'll no longer run the risk of having to purchase the stock. Pretty sweet! We might cover this strategy in more detail in a future interview or blog post.
This is always my favorite part to write, since it provides me with an excuse to become all philosophical, which I love!
Options equal power - I'm not talking about the options you trade on an exchange here, but about options in the sense of having a choice to either do this, or do that. Tim Ferriss once said that "The person who has more options has more power. Don't wait until you need options to search for them." And the truth of this message became painfully clear this month when a friend of mine had, after several weeks of searching, finally found himself an (expensive) place in Amsterdam, where he moved for his job, and then heard from his boss that same week that he was fired. His boss then bossed him into signing an early leave paper, which he was silly enough to sign, which left him with an expensive place, no job, and no salary, since he gave that up when he signed the paper.
He talked to me about starting his own business, but I reminded him that it usually takes months, if not years, before most businesses generate any real income, so if money was his main concern, he might be better off looking for a job and setting up a business in his free hours. He put all his money on one horse, the job in Amsterdam, and had no other options. Signing the paper left him with even less options. Now he is obviously stressed out, because he feels he has lost power over his situation.
The lesson I drew from this is that you should make sure you always have options. If you need one extra client, call 3. They might all say yes. If you are looking for a house, have at least several you really like, so you have the power to leave the price negotiation if one of the sellers won't play ball. If you are looking for a job, have several interviews lined up. They might even raise their salary offer. In short, overdo things so you always have options, because options equal power.
The obstacle is the way - I just finished reading Ryan Holiday's new book, The Obstacle is the Way, and can recommend it to anyone who needs a guide on how to take setbacks and turn them into triumphs. The central idea is that something which initially looks like an obstacle, a hindrance, is often a blessing in disguise.
For example, I used to work from home, but when I moved to a new place this month, the cable company told me it would take 6 weeks (!!!) to get internet up and running. Insane, but true. I was about to get pissed off, because how would I be able to run my website for 6 weeks without internet?! But then my always insightful roommate reminded me that I always wanted to try a flexible working space, and that this could be the perfect time to give it a try. He was right, and here I am, writing this article from my flex-desk in the centre of Amsterdam. It's an awesome experience and I'm glad I decided to try it out.
So take things as they come to you, and find a way to use an apparent obstacle as a springboard instead of a roadblock.
The upcoming month was supposed to be all about the launch of my ValueScout investment tool, but, as I mentioned before, this tool is put on hold for now. So what will I do? Leisure? Well no, I still have some further improvements planned for the website, but more exciting than that is my idea of launching 30 videos in 30 days (or however many my schedule permits), each covering one tiny subject related to investing. These videos will hopefully teach you a thing or two while also increasing my presence on YouTube, which happens to be the second largest search engines in the world.
I also have a new podcast episode coming up with Hewitt Heiserman, author of It's Earnings That Count, on the controversial topic of earnings manipulation. Other than that, this month will require some improvisation, so we'll see what October brings.
I do have one idea though, which is related to the fairly recent introduction of the XBRL financial reporting language. In theory, XBRL should make it easier for software applications to access financial statement information directly from the SEC website, which has definitely piqued my interest. If you have any experience with-, or knowledge about XBRL, I would love to hear from you!


The Rectory behind the church was demolished on completion of the Castle. The little township of dwellings belonging to the masons and labourers which had grown up on the bank side behind the church was possibly knocked down too, and the site turned over to gardens and orchards. The home farm would have occupied the flat ground beyond the wood at the rear of the castle. The gardens enjoy fine views and, unlike the castle itself, with its steep spiral stairways, are accessible, with help, for visitors in wheelchairs.
The original garden covered an area of nearly 20 acres, stretching across to the shelter belt in the west and down to Scrogs Wood to the south. To the west, in now what is described as the moat, was a formal arrangement of flower beds, paths and arbours and one raised mound is thought to cover the remains of a fountain.
To the south, archaeologists differ on their interpretation but we think that the recently renewed garden laid out on artificially flat ground stands on the site of either a bowling green or possibly another geometrically designed formal garden. All agree that there was a summer house or pavilion and possibly a dovecote in the wildflower garden below. (Dovecotes were a feature of many castles – their tenants being a useful source of food).


Ginger With Brown Leaves: Learn Why Ginger Leaves Are Turning Brown. Ginger plants are interesting additions to gardens, but they can be .
How To Grow Ginger In Pot | Growing Ginger .
Growing ginger in a pot is easy! It's a great idea if you live in a cool temperate climate or you don't have a plenty of space.
Ginger Oil Extraction Machine - ABC .
Garlic Peeling Machine Plant - Manufacturer .
On the average, ginger takes about nine months from the time of planting to mature. The rhizome can be harvested at different times depending on its purpose.
Full Automatic Dehydrated Ginger Slice Packing .
Growing ginger, from planting to harvest :: .
Did you know you can grow ginger or tangawizi on your own? Or you can use part of the root and it will continue to grow?
Ginger Plant manufacturers & suppliers - made .
How to Plant Ginger Root in a Pot - 7 steps .
How to Plant Ginger Root in a Pot. Ginger is a plant from the zingiberaceae family, whose underground stem is a horizontal rhizome prized for its aroma and spicy flavour.
Ginger Peeling Machine - Adarak Peeling .
Get contact details & address of companies manufacturing and supplying Ginger Peeling Machine, Adarak Peeling Machine, ... Ginger Washing Plant.
Ginger Processing Plant - Ginger Processing .
Ginger Machine, Ginger Machine Suppliers and .
Ginger Machine, Wholesale Various High Quality Ginger Machine Products from Global Ginger Machine Suppliers and Ginger Machine Factory,Importer,Exporter at .
Ginger Garlic Paste Processing Business ~ .
Easy Ways Ginger Cultivation In polybag Good .
# Bed Planting Pattern Of Ginger Woodworking .
ginger washing machine, View ginger washing .
ginger washing machine,US $ 2,000 - 4,000 / Set, New, Henan, China (Mainland), MS.Source from Henan Machinery & Equipment Company Limited on Alibaba .
Ginger Chips Processing Line|Ginger Washing .
Ginger chips processing line is consisted of ginger washing machine and ginger slice cutting machine,with capacity range from 500kg to 2000kg per hour.
Ginger Processing Market: Global Industry .
This report provides an analysis on the global ginger market and the various factors required to set-up and run a ginger processing plant.
Ginger starting to sprout - can I still use it? - .
I have two beautiful ginger roots ... Ginger starting to sprout - can I still use it? ... and wondering whether it's worth my time to try planting it!
ginger planting machine - Newest Crusher, .
The Benefits Of Juicing With Ginger - Best For .
Growing ginger in plastic bag economically .
Ginger and Garlic Paste Project | garlic Peeling .
Asp Industries is the best manufacturer, Supplier and exporter of Ginger and Garlic Paste Project in India and is well known in Garlic Peeling Industry.
Planting Ginger Machine, Planting Ginger .
Design and Fabrication of Ginger Harvesting .
Design and Fabrication of Ginger Harvesting Machine. ... Ginger is a tropical plant that is found in the Caribbean, India, Southeast Asia, and West Africa.
Full Automatic Ginger Mesh Bag Packing .
Ginger Garlic Paste Machine at Rs 16500 .
How To Make Old Fashioned Ginger Beer | For .
strain ginger plant through a fine muslin cloth and add the liquid to the syrup. ... Looks like the soda stream machine will get a workout pumping in some co2. Reply.


Government Training College Pusiga which is now Gbewaa College of Education was established in 1953. It was built on a land that only became part of Ghana after the 1956 plebiscite. Until then, that part of Ghana was called Trans Volta Togoland.


text:
Q: Python connect to an external server using sockets I am trying to build a connection between a server and one or more clients in Python using sockets. My code works just fine when I connect with a client in the same network, but my goal is to build a program which me and my friend can use, so I want to figure out a way to connect to my server from an external network via the internet.
My server-side code looks like this:
import socket

server = "internal_ip"
port = 5006

serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

try:
    serv.bind((server, port))
    print(server)
except socket.error as e:
    print(e)

serv.listen(2)

while True:
    conn, addr = serv.accept()
    from_client = ""
    while True:
        data = conn.recv(4096)
        if not data:
            break
        from_client += str(data)
        print(from_client)
        conn.send(str.encode("I am SERVER"))
    conn.close()
    print("Client disconnected")

And this is my client:
import socket

server = "internal_ip"
port = 5006

client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

try:
    client.connect((server, port))
except socket.error as e:
    print(e)

while True:
    try:
        client.send(str.encode("I am CLIENT"))
        from_server = client.recv(4096)
    #client.close()
        print(from_server)
    except:
        break
client.close()

This works just fine within a network. Then I started testing the code from an external client. I changed  the ip to my external ip address which I have found using whatismyipaddress.com, and port number to a different one than I use on the server side.
server = "external_ip"
port = 5007

Then I enabled port forwarding using cmd:
netsh interface portproxy add v4tov4 listenport=5007 listenaddress=external_ip connectport=5006 connectaddress=internal_ip

I get WinError 10060. Tried switching firewall on and off, and allowing these specific ports, but I can't make it work.
Can you help me with my problem please?

redpajama_set_name: RedPajamaStackExchange


My name is Jacob. I'm 23 y.o. and I'm from Poland. I work as a physiotherapist and currently studying to get my master degree in physiotherapy. I'm rather a silent observer and I don't speak, if I don't feel I need to. I'm usually focused on a things, that I'm doing. I like to meet other people and get to know their culture. I'm trying to keep my life balanced, even tho I'm spending a lot of time (in my opinion) in front of a screen. I also don't like to force myself on people.
Weapon DPS > Mastery > Agi ~ Crit > Haste > Versa. In terms of secondary stats - mastery above everything, preferably with crit over haste as a 2nd stat. It's pretty much common sense - each point of mastery directly buffs focus spenders and two skills (Aimed Shot/Marked Shot), which are main source of hunter's dps. Other than that weapon DPS scales insanly high compared to anything else.
T2: True Aim most often. Lock and Load only if there is a lot of movement and target switching required.
T6: Volley - pushes out AMoC (crows) when there is even a little cleave possible. I'd be going with crows, if there would be a high prio on bursting some add or if the fight would be pure ST.
Last Word - Burning Legion - raider - I've finished SoO 13/13HC 25m pre nerf and I left on a good terms trying to make my own guild.
My pet project guild Unleash - Burning Legion had mixed roster - high rank players with low-bobs, so it was doomed to fail (HM 5/7M, BrF 2/10M). After that I've moved to friendly guild - Misplaced - BL, clearing 5/13M. Their roster kinda collapsed, so I transferred to Kazzak - Infusion and progressed through rest of the bosses on HfC. Infusion was a guild of many issues, some of them were concerning me, for example the number of hunters, so I migrated to Repose on Ragnaros.
Repose was my choice for a Legion expansion and maybe even more, but after WoD GMs old friends started to zone out new people, so the climate got a bit frosty. I was excluded from most of the mythic raids, even tho I was one of the best geared people before raids. After that I was slowly pushed to "backup" and demoted to social. Two days after a demotion I got invited to next pet project guild - Intent on Kazzak, by some friends from Infusion split. We manage to do EN 5/7M and the project failed. After that I applied to Order of Sargeras where my current progress was achieved. OoS officialy disbanded on 5th March.
I expect nothing else than a nice raiding environment, a stable guild and a nice social atmosphere.
I did some research and I think (and hope) I can improve Your current roster as a hunter. Other than that, as a breathing person, I always serve with my knowledge in terms of health related training, diet, physiotherapy and help in determining if You should visit a doctor, when Your knee bends the other way .
I'm just here to inform You, that I'm withdrawing my application. Thanks for the time ,which You possibly spent analyzing my application. Cheers!


The hints that have offered assume that you have played the game for a while and are somewhat familiar with the terms used in the game. I have not included any procedures on how to start playing the game. I am concentrating on a few hints that I have discovered to be difficult to master or were not immediately clear to me. If you have other hints to share, or have questions, please feel free to email me. (My email address is at the top of each website page.) Again, please remember, I am NOT a Galaxy Legend expert!
If you find any errors in this site please let me know! i want to keep this as accurate as possible. I hope to be adding additional information as time permits.
On my wish list is someone taking the time to THROUGHLY explain how the lieutenant system works. I have lieutenants, but I'm not even sure where to place them ... in the "Back-Up" area or do they have to be right with the ship that are the working with? Any help would be appreciated.
* This is the game I am currently playing.
* The game is produced by Tap4Fun.
* I play the Apple iOS version.
* The game is available on the Apple store and for Android.
* My Ship is GrayHawk and I'm on the World 670 iOS Server.
* I am currently a Level 92 and played the game for over a year.


text:
Q: Android app crashes when the orientation changes This app crashes when the orientation changes, specially in the state there i can give the variables back there value. But in my case i just want to empty the variable mp. When i add mp.reset() the app begins to crash when i rotate the phone.
package com.phone.sensor;

import android.app.Activity;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.Menu;
import android.widget.TextView;

public class sensorActivity extends Activity implements SensorEventListener{
    public boolean musStatus = false;
    public boolean musDeclare = false;
    public MediaPlayer mp;

    Sensor accelerometer;
    SensorManager sm;
    TextView acceleration;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if(savedInstanceState==null)
        {
            musDeclare = false;
            musStatus = false;
            mp = null;
        }
        else
        {
            mp.reset();
        }

        setContentView(R.layout.activity_main);
        sm=(SensorManager) getSystemService(SENSOR_SERVICE);
        accelerometer=sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
        sm.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_NORMAL);

        acceleration=(TextView)findViewById(R.id.acceleration);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    @Override
    public void onAccuracyChanged(Sensor sensor, int accuracy) {
        // TODO Auto-generated method stub

    }

    @Override
    public void onSaveInstanceState (Bundle outState)
    {
        super.onSaveInstanceState(outState);
        outState.putBoolean("musStatus", musStatus);
        outState.putBoolean("musDeclare", musDeclare);
    }

    @Override
    public void onSensorChanged(SensorEvent event) {
        // TODO Auto-generated method stub
        acceleration.setText("X: "+event.values[0]+
                "\nY: "+event.values[1]+
                "\nZ: "+event.values[2]);

        float x = event.values[0];
        float y = event.values[1];
        float z = event.values[2];

        if(musDeclare == false)
        {
            mp = MediaPlayer.create(this, R.raw.alexander);
            musDeclare = true;
        }

        if(y > 8.9) {
            if(musStatus == false)
            {
                mp.start();
                musStatus = true;
            }
        }

        if(y < 5)
        {
            if(musStatus == true)
            {
                mp.stop();
                musStatus = false;

                if(musDeclare == true)
                {
                    mp = MediaPlayer.create(this, R.raw.alexander);
                    musDeclare = false;
                }
            }
        }
    }
}

Logcat
10-06 01:30:37.105: E/AndroidRuntime(15258): FATAL EXCEPTION: main
10-06 01:30:37.105: E/AndroidRuntime(15258): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.phone.sensor/com.phone.sensor.sensorActivity}: java.lang.NullPointerException
10-06 01:30:37.105: E/AndroidRuntime(15258):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2460)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2521)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4260)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at android.app.ActivityThread.access$700(ActivityThread.java:162)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1376)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at android.os.Handler.dispatchMessage(Handler.java:99)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at android.os.Looper.loop(Looper.java:158)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at android.app.ActivityThread.main(ActivityThread.java:5777)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at java.lang.reflect.Method.invokeNative(Native Method)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at java.lang.reflect.Method.invoke(Method.java:511)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1083)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:850)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at dalvik.system.NativeStart.main(Native Method)
10-06 01:30:37.105: E/AndroidRuntime(15258): Caused by: java.lang.NullPointerException
10-06 01:30:37.105: E/AndroidRuntime(15258):    at com.phone.sensor.sensorActivity.onCreate(sensorActivity.java:33)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at android.app.Activity.performCreate(Activity.java:5165)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1103)
10-06 01:30:37.105: E/AndroidRuntime(15258):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
10-06 01:30:37.105: E/AndroidRuntime(15258):    ... 12 more

A: Im no guru but it fells like you could save your mp in:
@Override
public Object onRetainCustomNonConfigurationInstance() {
    return this.mp;
}

and in onCreate() you will get it back like his
mp = (MediaPlayer) getLastCustomNonConfigurationInstance();

Check this out  because trying to keep the MediaPlayer alive in an Activity is surrounded with problems

A: Try to use the following function to reset your music player:
private MediaPlayer mpSound;
    private void stopPlaying() {
        if (mpSound != null) {
            mpSound.stop();
            mpSound.release();
            mpSound = null;
       }
    }

Calling that each time ensures the sound is set to null and released so the next time it plays, your app doesn't crash (in this case when it changes orientation)
I had similar issue with my app and the above code fixed it.


63918 | Ahmann Design, Inc.
Great room: 23' 0" x 16' 4"
Kitchen: 13' 8" x 14' 6"
Dining: 13' 8" x 14' 0"
Master: 14' 0" x 16' 6"
Bedroom 2: 14' 0" x 13' 6"
Bedroom 3: 11' 4" x 15' 0"
Bedroom 4: 13' 0" x 14' 0"
Sun room: 12' 6"x12' 0"
Front porch: 24' 0" x 13' 4"
Back porch: 14' 0"x17' 0"
Garage: 29' 4" x 39' 8"
1st Floor: 9'. Entry 11', Grt Rm 2-Story. Master Bdrm 10' Step.
The new farmhouse style is easily the most popular design right now. The great room flows into the dining room and kitchen with a sun room attached as well. The master suite lies right off the entrance which includes a large walk-in closet, dual sinks, and a Jacuzzi tub. Upstairs, bedrooms two and three both have large closets and share a full bathroom connected to both of their rooms. The fourth bedroom enjoys a private bath and walk-in closet. The design is finished with a three-stall side garage that has access to the backyard and in the home.


It's about time an employer realized a paper credential was no guarantee of high performance on the job. As an employer, for the past forty years, I realized early on that hiring someone was, a crapshoot. It took time on the job, usually about three to four months, to see if a person would perform their job. In fact, one company I ran. hired a star academic performer with impeccable credentials. He was so unaware of the need for certain skills that he ruined at least one important relationship for us. Nothing beats certain key skills, some innate and some learned, to create value for an employer and career success for an employee.