text:
package org.opensingular.form.util.diff;

import junit.framework.AssertionFailedError;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.opensingular.form.PackageBuilder;
import org.opensingular.form.SIComposite;
import org.opensingular.form.SIList;
import org.opensingular.form.SInfoPackage;
import org.opensingular.form.SInfoType;
import org.opensingular.form.SInstance;
import org.opensingular.form.SPackage;
import org.opensingular.form.SType;
import org.opensingular.form.STypeComposite;
import org.opensingular.form.STypeList;
import org.opensingular.form.TestCaseForm;
import org.opensingular.form.TypeBuilder;
import org.opensingular.form.io.HashUtil;
import org.opensingular.form.type.core.SIString;
import org.opensingular.form.type.core.STypeInteger;
import org.opensingular.form.type.core.STypeString;
import org.opensingular.form.type.core.attachment.SIAttachment;
import org.opensingular.form.type.core.attachment.STypeAttachment;
import org.opensingular.form.util.diff.TestDocumentDiff.TestDiffPackage.TestCompositeA;
import org.opensingular.form.util.diff.TestDocumentDiff.TestDiffPackage.TestCompositeB;
import org.opensingular.form.util.diff.TestDocumentDiff.TestDiffPackage.TestCompositeC;
import org.opensingular.internal.lib.commons.util.SingularIOUtils;
import org.opensingular.internal.lib.commons.util.TempFileProvider;

import java.io.IOException;
import java.util.Collections;

/**
 * @author Daniel C. Bordin on 27/12/2016.
 */
@RunWith(Parameterized.class)
public class TestDocumentDiff extends TestCaseForm {

    public TestDocumentDiff(TestFormConfig testFormConfig) {
        super(testFormConfig);
    }

    @Test
    public void testSimpleComposite() {
        TestCompositeA typeA = createTestDictionary().getType(TestCompositeA.class);

        SIComposite iA1 = typeA.newInstance();
        SIComposite iA2 = typeA.newInstance();
        iA2.setValue(typeA.name, "Daniel");
        SIComposite iA3 = typeA.newInstance();
        iA3.setValue(typeA.name, "Daniel Bordin");
        iA3.setValue(typeA.age, 41);
        SIComposite iA4 = typeA.newInstance();
        iA4.setValue(typeA.name, "Daniel C Bordin");
        iA4.setValue(typeA.age, 42);
        SIComposite iA5 = typeA.newInstance();
        iA5.setValue(typeA.name, "Daniel C Bordin");
        iA5.setValue(typeA.age, 43);

        DocumentDiff diff;
        diff = calculateDiff(iA1, iA1, 0);
        assertDiffUnchangedEmpty(diff, typeA);
        assertDiffUnchangedEmpty(diff, typeA.name);
        assertDiffUnchangedEmpty(diff, typeA.age);
        diff = calculateDiff(iA2, iA2, 0);
        assertDiffUnchanged(diff, typeA);
        assertDiffUnchanged(diff, typeA.name);
        assertDiffUnchangedEmpty(diff, typeA.age);
        diff = calculateDiff(iA3, iA3, 0);
        assertDiffUnchanged(diff, typeA);
        assertDiffUnchanged(diff, typeA.name);
        assertDiffUnchanged(diff, typeA.age);

        diff = calculateDiff(iA1, iA2, 1);
        assertDiffNew(diff, typeA);
        assertDiffNew(diff, typeA.name);
        assertDiffUnchangedEmpty(diff, typeA.age);

        diff = calculateDiff(iA2, iA1, 1);
        assertDiffDeleted(diff, typeA);
        assertDiffDeleted(diff, typeA.name);
        assertDiffUnchangedEmpty(diff, typeA.age);

        diff = calculateDiff(iA1, iA3, 2);
        assertDiffNew(diff, typeA);
        assertDiffNew(diff, typeA.name);
        assertDiffNew(diff, typeA.age);
        diff = calculateDiff(iA3, iA1, 2);
        assertDiffDeleted(diff, typeA);
        assertDiffDeleted(diff, typeA.name);
        assertDiffDeleted(diff, typeA.age);
        diff = calculateDiff(iA3, iA4, 2);
        assertDiffChanged(diff, typeA);
        assertDiffChanged(diff, typeA.name);
        assertDiffChanged(diff, typeA.age);
        diff = calculateDiff(iA4, iA3, 2);
        assertDiffChanged(diff, typeA);
        assertDiffChanged(diff, typeA.name);
        assertDiffChanged(diff, typeA.age);
        diff = calculateDiff(iA4, iA5, 1);
        assertDiffChanged(diff, typeA);
        assertDiffUnchanged(diff, typeA.name);
        assertDiffChanged(diff, typeA.age);
    }

    @Test
    public void testEmptyCompositeType() {
        STypeComposite emptyType = createTestDictionary().getType(STypeComposite.class);

        SIComposite emptyInstance1 = (SIComposite) emptyType.newInstance();
        SIComposite emptyInstance2 = (SIComposite) emptyType.newInstance();

        DocumentDiff diff;
        diff = calculateDiff(emptyInstance1, emptyInstance1, 0);
        assertDiffUnchangedEmpty(diff, emptyType);

        diff = calculateDiff(emptyInstance1, emptyInstance2, 0);
        assertDiffUnchangedEmpty(diff, emptyType);

        diff = calculateDiff(emptyInstance2, emptyInstance1, 0);
        assertDiffUnchangedEmpty(diff, emptyType);
    }

    @Test
    public void testEmptyCompositeDifferentType() {
        STypeComposite emptyType = createTestDictionary().getType(STypeComposite.class);
        TestCompositeB typeB = createTestDictionary().getType(TestCompositeB.class);

        SIComposite emptyInstance1 = (SIComposite) emptyType.newInstance();
        SIComposite iB1 = typeB.newInstance();
        iB1.setValue(typeB.name, "Daniel");
        iB1.setValue(typeB.info, "special");

        DocumentDiff diff;
        diff = calculateDiff(emptyInstance1, iB1, 2);
        assertDiffNew(diff, typeB.name);
        assertDiffNew(diff, typeB.info);

        diff = calculateDiff(iB1, emptyInstance1, 2);
        assertDiffDeleted(diff, typeB.name);
        assertDiffDeleted(diff, typeB.info);

    }

    @Test
    public void testCompositeOfDifferentTypes() {
        TestCompositeA typeA = createTestDictionary().getType(TestCompositeA.class);
        TestCompositeB typeB = createTestDictionary().getType(TestCompositeB.class);

        SIComposite iA1 = typeA.newInstance();
        SIComposite iA2 = typeA.newInstance();
        iA2.setValue(typeA.name, "Daniel");
        SIComposite iA3 = typeA.newInstance();
        iA3.setValue(typeA.name, "Daniel Bordin");
        iA3.setValue(typeA.age, 43);

        SIComposite iB1 = typeB.newInstance();
        SIComposite iB2 = typeB.newInstance();
        iB2.setValue(typeB.name, "Daniel");
        SIComposite iB3 = typeB.newInstance();
        iB3.setValue(typeA.name, "Daniel Bordin");
        iB3.setValue(typeB.info, "special");
        SIComposite iB4 = typeB.newInstance();
        iB4.setValue(typeB.name, "Daniel");
        iB4.setValue(typeB.age, 43);
        iB4.setValue(typeB.info, "special");

        DocumentDiff diff;
        diff = calculateDiff(iB1, iB1, 0);
        assertDiffUnchangedEmpty(diff, typeB);
        assertDiffUnchangedEmpty(diff, typeB.name);
        assertDiffUnchangedEmpty(diff, typeB.age);
        assertDiffUnchangedEmpty(diff, typeB.info);

        diff = calculateDiff(iB3, iB3, 0);
        assertDiffUnchanged(diff, typeB);
        assertDiffUnchanged(diff, typeB.name);
        assertDiffUnchangedEmpty(diff, typeB.age);
        assertDiffUnchanged(diff, typeB.info);

        diff = calculateDiff(iA1, iB1, 0);
        assertDiffUnchangedEmpty(diff, typeA);
        assertDiffUnchangedEmpty(diff, typeA.name);
        assertDiffUnchangedEmpty(diff, typeB.age);
        assertDiffUnchangedEmpty(diff, typeB.info);

        diff = calculateDiff(iA2, iB3, 2);
        assertDiffChanged(diff, typeB);
        assertDiffChanged(diff, typeB.name);
        assertDiffUnchangedEmpty(diff, typeB.age);
        assertDiffNew(diff, typeB.info);

        diff = calculateDiff(iB3, iA1, 2);
        assertDiffDeleted(diff, typeA);
        assertDiffDeleted(diff, typeA.name);
        assertDiffUnchangedEmpty(diff, typeB.age);
        assertDiffDeleted(diff, typeB.info);

        diff = calculateDiff(iB4, iA3, 2);
        assertDiffChanged(diff, typeA);
        assertDiffChanged(diff, typeA.name);
        assertDiffUnchanged(diff, typeB.age);
        assertDiffDeleted(diff, typeB.info);

        diff = calculateDiff(iB4, iB2, 2);
        assertDiffChanged(diff, typeB);
        assertDiffUnchanged(diff, typeB.name);
        assertDiffDeleted(diff, typeB.age);
        assertDiffDeleted(diff, typeB.info);

        diff = calculateDiff(iB2, iB4, 2);
        assertDiffChanged(diff, typeB);
        assertDiffUnchanged(diff, typeB.name);
        assertDiffNew(diff, typeB.age);
        assertDiffNew(diff, typeB.info);
    }

    @Test
    public void testCompositeOfComposite() {
        TestCompositeA typeA = createTestDictionary().getType(TestCompositeA.class);
        TestCompositeB typeB = createTestDictionary().getType(TestCompositeB.class);
        TestCompositeC typeC = createTestDictionary().getType(TestCompositeC.class);

        SIComposite iA3 = typeA.newInstance();
        iA3.setValue(typeA.name, "Daniel Bordin");
        iA3.setValue(typeA.age, 43);

        SIComposite iC1 = typeC.newInstance();
        iC1.setValue("personB.name", "Renato");
        iC1.setValue("personB.age", 40);
        SIComposite iC2 = typeC.newInstance();
        iC2.setValue("personA.name", "Daniel");
        iC2.setValue("personB.name", "Renato");
        iC2.setValue("personB.age", 40);
        SIComposite iC3 = typeC.newInstance();
        iC3.setValue("personA.name", "Daniel Bordin");
        iC3.setValue("personB.name", "Renato");
        iC3.setValue("personB.info", "second");

        DocumentDiff diff;
        AssertionsDiff compact;

        diff = calculateDiff(iC1, iC1, 0);
        assertDiffUnchanged(diff, typeC);
        assertDiffUnchangedEmpty(diff, typeC.personA);
        assertDiffUnchanged(diff, typeC.personB);

        diff = calculateDiff(iC1, iC3, 3);
        assertDiffChanged(diff, typeC);
        assertDiffNew(diff, typeC.personA);
        assertDiffNew(diff, "personA.name");
        assertDiffUnchangedEmpty(diff, "personA.age");
        assertDiffChanged(diff, typeC.personB);
        assertDiffUnchanged(diff, "personB.name");
        assertDiffDeleted(diff, "personB.age");
        assertDiffNew(diff, "personB.info");

        diff = calculateDiff(iC3, iC1, 3);
        assertDiffChanged(diff, typeC);
        assertDiffDeleted(diff, typeC.personA);
        assertDiffDeleted(diff, "personA.name");
        assertDiffUnchangedEmpty(diff, "personA.age");
        assertDiffChanged(diff, typeC.personB);
        assertDiffUnchanged(diff, "personB.name");
        assertDiffNew(diff, "personB.age");
        assertDiffDeleted(diff, "personB.info");
        compact = assertDiff(diff.removeUnchangedAndCompact());
        compact.assertChanged(2).isOriginal(iC3).isNewer(iC1);
        compact.get(0).assertDeleted(0).isOriginal(iC3.getField("personA.name"));
        compact.get(1).assertChanged(2).isOriginal(iC3.getField("personB"));
        compact.get(1).get(0).assertNew(0).isNewer(iC1.getField("personB.age"));
        compact.get(1).get(1).assertDeleted(0).isOriginal(iC3.getField("personB.info"));

        diff = calculateDiff(iA3, iC3, 5);
        assertDiffChanged(diff, typeC);
        assertDiffNew(diff, typeC.personA);
        assertDiffNew(diff, "personA.name");
        assertDiffUnchangedEmpty(diff, "personA.age");
        assertDiffNew(diff, typeC.personB);
        assertDiffNew(diff, "personB.name");
        assertDiffUnchangedEmpty(diff, "personB.age");
        assertDiffNew(diff, "personB.info");
        assertDiffDeleted(diff, "name");
        assertDiffDeleted(diff, "age");
        compact = assertDiff(diff.removeUnchangedAndCompact());
        compact.assertChanged(4).isNewer(iC3);
        compact.get(0).assertNew(0).isNewer(iC3.getField("personA.name"));
        compact.get(1).assertNew(2).isNewer(iC3.getField("personB"));
        compact.get(1).get(0).assertNew(0).isNewer(iC3.getField("personB.name"));
        compact.get(1).get(1).assertNew(0).isNewer(iC3.getField("personB.info"));
        compact.get(2).assertDeleted(0).isOriginal(iA3.getField("name"));
        compact.get(3).assertDeleted(0).isOriginal(iA3.getField("age"));

        diff = calculateDiff(iA3, iC3.getField("personA"), 1);
        assertDiffChanged(diff, typeA);
        assertDiffUnchanged(diff, "name");
        assertDiffDeleted(diff, "age");
        compact = assertDiff(diff.removeUnchangedAndCompact());
        compact.assertDeleted(0).isOriginal(iA3.getField("age"));
        compact.assertNames("age", "Age", "personA.age", "Person A : Age");

    }

    @Test
    public void testCompositeResumedBecauseOfView() {
        TestCompositeC typeC = createTestDictionary().getType(TestCompositeC.class);
        typeC.getField(typeC.personB).asAtrProvider().provider(ctx -> Collections.emptyList());

        SIComposite c0 = typeC.newInstance();
        c0.setValue("personA.name", "Lara");
        c0.setValue("personA.age", 7);
        SIComposite c1 = typeC.newInstance();
        c1.setValue("personA.name", "Daniel");
        c1.setValue("personA.age", 40);
        c1.setValue("personB.name", "Marcos");
        c1.setValue("personB.age", 20);
        SIComposite c2 = typeC.newInstance();
        c2.setValue("personA.name", "Daniel B");
        c2.setValue("personA.age", 41);
        c2.setValue("personB.name", "Marcos B");
        c2.setValue("personB.age", 21);

        AssertionsDiff diff;
        diff = diff(c1, c2, 4).assertChanged(2);
        diff.get(0).assertChanged(2);
        diff.get(0).get(0).assertChanged(0);
        diff.get(0).get(1).assertChanged(0);
        diff.get(1).assertChanged(3);
        diff.get(1).get(0).assertChanged(0);
        diff.get(1).get(1).assertChanged(0);
        diff.get(1).get(2).assertUnchangedEmpty(0);
        diff = diff.compact(3);
        diff.get(0).assertChanged(2);
        diff.get(0).get(0).assertChanged(0);
        diff.get(0).get(1).assertChanged(0);
        diff.get(1).assertChanged(0);

        diff = diff(c0, c2, 4).assertChanged(2);
        diff.get(0).assertChanged(2);
        diff.get(0).get(0).assertChanged(0);
        diff.get(0).get(1).assertChanged(0);
        diff.get(1).assertNew(3);
        diff.get(1).get(0).assertNew(0);
        diff.get(1).get(1).assertNew(0);
        diff.get(1).get(2).assertUnchangedEmpty(0);
        diff = diff.compact(3);
        diff.get(0).assertChanged(2);
        diff.get(0).get(0).assertChanged(0);
        diff.get(0).get(1).assertChanged(0);
        diff.get(1).assertNew(0);
    }

    @Test
    public void testListSimple() {
        STypeList<STypeString, SIString> typeNomes = createTestPackage().createListTypeOf("nomes", STypeString.class);

        SIList<SIString> iL1 = typeNomes.newInstance();
        SIList<SIString> iL2 = typeNomes.newInstance();
        iL2.addValue("A");
        SIList<SIString> iL3 = typeNomes.newInstance();
        iL3.addValue("AA");
        SIList<SIString> iL4 = typeNomes.newInstance();
        iL4.addValue("A");
        iL4.addValue("B");
        SIList<SIString> iL5 = typeNomes.newInstance();
        iL5.addValue("A");
        iL5.addValue("B");
        iL5.addValue("C");
        iL5.remove(0);
        SIList<SIString> iL6 = typeNomes.newInstance();
        iL6.addValue("A");
        iL6.addValue("B");
        iL6.addValue("CC");
        iL6.addValue("D");

        DocumentDiff diff;
        AssertionsDiff compact;

        diff = calculateDiff(iL1, iL1, 0);
        diff = calculateDiff(iL2, iL2, 0);
        assertDiffUnchanged(diff, "");
        assertDiffUnchanged(diff, "[0]");
        diff = calculateDiff(iL5, iL5, 0);
        assertDiffUnchanged(diff, "");
        assertDiffUnchanged(diff, "[0]");
        assertDiffUnchanged(diff, "[1]");

        diff = calculateDiff(iL1, iL4, 2);
        assertDiffNew(diff, "");
        assertDiffNew(diff, "[0]");
        assertDiffNew(diff, "[1]");

        diff = calculateDiff(iL4, iL1, 2);
        assertDiffDeleted(diff, "");
        assertDiffDeleted(diff, "[0]");
        assertDiffDeleted(diff, "[1]");

        diff = calculateDiff(iL2, iL3, 1);
        assertDiffChanged(diff, "");
        assertDiffChanged(diff, "[0]");
        compact = assertDiff(diff.removeUnchangedAndCompact());
        compact.assertChanged(0).isNewer(iL3.get(0)).isIndex(0, 0);

        diff = calculateDiff(iL2, iL5, 3);
        assertDiffChanged(diff, "");
        assertDiffDeleted(diff, "[0]");
        assertDiffNew(diff, "[1]");
        assertDiffNew(diff, "[2]");

        diff = calculateDiff(iL5, iL2, 3);
        assertDiffChanged(diff, "");
        assertDiffDeleted(diff, "[0]");
        assertDiffDeleted(diff, "[1]");
        assertDiffNew(diff, "[2]");

        diff = calculateDiff(iL5, iL6, 3);
        assertDiffChanged(diff, "");
        assertDiffNew(diff, "[0]");
        assertDiffUnchanged(diff, "[1]");
        assertDiffChanged(diff, "[2]");
        assertDiffNew(diff, "[3]");
        compact = assertDiff(diff.removeUnchangedAndCompact());
        compact.assertChanged(3).isNewer(iL6);
        compact.get(0).assertNew(0).isNewer(iL6.get(0)).isIndex(-1, 0);
        compact.get(1).assertChanged(0).isNewer(iL6.get(2)).isIndex(1, 2);
        compact.get(2).assertNew(0).isNewer(iL6.get(3)).isIndex(-1, 3);
        compact.get(0).assertNames("String", null, "[ >0]", "Linha nova");
        compact.get(1).assertNames("String", null, "[1>2]", "Linha 2");
        compact.get(2).assertNames("String", null, "[ >3]", "Linha nova");

        diff = calculateDiff(iL6, iL5, 3);
        assertDiffChanged(diff, "");
        assertDiffDeleted(diff, "[0]");
        assertDiffUnchanged(diff, "[1]");
        assertDiffChanged(diff, "[2]");
        assertDiffDeleted(diff, "[3]");
        compact = assertDiff(diff.removeUnchangedAndCompact());
        compact.assertChanged(3).isOriginal(iL6);
        compact.get(0).assertDeleted(0).isOriginal(iL6.get(0));
        compact.get(1).assertChanged(0).isOriginal(iL6.get(2));
        compact.get(2).assertDeleted(0).isOriginal(iL6.get(3));
        compact.get(0).assertNames("String", null, "[0> ]", "Linha 1");
        compact.get(1).assertNames("String", null, "[2>1]", "Linha 3");
        compact.get(2).assertNames("String", null, "[3> ]", "Linha 4");
    }

    @Test
    public void testListOfComposite() {
        PackageBuilder pkg = createTestPackage();
        STypeList<TestCompositeC, SIComposite> typeCs = pkg.createListTypeOf("Cs", TestCompositeC.class);
        typeCs.asAtr().label("Clients");

        SIComposite c;
        SIList<SIComposite> iLC0 = typeCs.newInstance();
        SIList<SIComposite> iLC2 = typeCs.newInstance();
        c = iLC2.addNew();
        c.setValue("personA.name", "Daniel");
        SIList<SIComposite> iLC3 = typeCs.newInstance();
        c = iLC3.addNew();
        c.setValue("personA.name", "Daniel");
        c = iLC3.addNew();
        c.setValue("personA.name", "Renato");
        c.setValue("personB.name", "Lara");
        SIList<SIComposite> iLC4 = typeCs.newInstance();
        c = iLC4.addNew();
        c.setValue("personA.name", "Daniel");
        c = iLC4.addNew();
        c.setValue("personA.name", "Renato");
        c.setValue("personB.name", "Lara2");
        c = iLC4.addNew();
        c.setValue("personB.name", "Tomas");
        iLC4.remove(0);

        DocumentDiff diff;
        AssertionsDiff compact;
        diff = calculateDiff(iLC0, iLC0, 0);

        diff = calculateDiff(iLC2, iLC2, 0);
        assertDiffUnchanged(diff, "");
        assertDiffUnchanged(diff, "[0]");
        assertDiffUnchanged(diff, "[0].personA");
        assertDiffUnchanged(diff, "[0].personA.name");
        assertDiffUnchangedEmpty(diff, "[0].personA.age");
        assertDiffUnchangedEmpty(diff, "[0].personB");
        diff = calculateDiff(iLC3, iLC3, 0);

        diff = calculateDiff(iLC0, iLC2, 1);
        assertDiffNew(diff, "");
        assertDiffNew(diff, "[0]");
        assertDiffNew(diff, "[0].personA");
        assertDiffNew(diff, "[0].personA.name");
        assertDiffUnchangedEmpty(diff, "[0].personA.age");
        assertDiffUnchangedEmpty(diff, "[0].personB");
        compact = assertDiff(diff.removeUnchangedAndCompact());
        compact.assertNew(0).isNewer(iLC2.getField("[0]"));

        diff = calculateDiff(iLC0, iLC3, 3);
        assertDiffNew(diff, "");
        assertDiffNew(diff, "[0]");
        assertDiffNew(diff, "[0].personA");
        assertDiffNew(diff, "[0].personA.name");
        assertDiffUnchangedEmpty(diff, "[0].personA.age");
        assertDiffUnchangedEmpty(diff, "[0].personB");
        assertDiffNew(diff, "[1]");
        assertDiffNew(diff, "[1].personA");
        assertDiffNew(diff, "[1].personA.name");
        assertDiffUnchangedEmpty(diff, "[1].personA.age");
        assertDiffNew(diff, "[1].personB");
        assertDiffNew(diff, "[1].personB.name");
        assertDiffUnchangedEmpty(diff, "[1].personB.age");
        compact = assertDiff(diff.removeUnchangedAndCompact());
        compact.assertNew(2).isNewer(iLC3);
        compact.get(0).assertNew(0).isNewer(iLC3.get(0));
        compact.get(1).assertNew(0).isNewer(iLC3.get(1));

        diff = calculateDiff(iLC3, iLC0, 3);
        assertDiffDeleted(diff, "");
        assertDiffDeleted(diff, "[0]");
        assertDiffDeleted(diff, "[0].personA");
        assertDiffDeleted(diff, "[0].personA.name");
        assertDiffUnchangedEmpty(diff, "[0].personA.age");
        assertDiffUnchangedEmpty(diff, "[0].personB");
        assertDiffDeleted(diff, "[1]");
        assertDiffDeleted(diff, "[1].personA");
        assertDiffDeleted(diff, "[1].personA.name");
        assertDiffUnchangedEmpty(diff, "[1].personA.age");
        assertDiffDeleted(diff, "[1].personB");
        assertDiffDeleted(diff, "[1].personB.name");
        assertDiffUnchangedEmpty(diff, "[1].personB.age");
        compact = assertDiff(diff.removeUnchangedAndCompact());
        compact.assertDeleted(2).isOriginal(iLC3);
        compact.get(0).assertDeleted(0).isOriginal(iLC3.get(0));
        compact.get(1).assertDeleted(0).isOriginal(iLC3.get(1));

        diff = calculateDiff(iLC2, iLC3, 2);
        assertDiffChanged(diff, "");
        assertDiffUnchanged(diff, "[0]");
        assertDiffUnchanged(diff, "[0].personA");
        assertDiffUnchanged(diff, "[0].personA.name");
        assertDiffUnchangedEmpty(diff, "[0].personA.age");
        assertDiffUnchangedEmpty(diff, "[0].personB");
        assertDiffNew(diff, "[1]");
        assertDiffNew(diff, "[1].personA");
        assertDiffNew(diff, "[1].personA.name");
        assertDiffUnchangedEmpty(diff, "[1].personA.age");
        assertDiffNew(diff, "[1].personB");
        assertDiffNew(diff, "[1].personB.name");
        assertDiffUnchangedEmpty(diff, "[1].personB.age");
        compact = assertDiff(diff.removeUnchangedAndCompact());
        compact.assertNew(0).isNewer(iLC3.get(1)).isIndex(-1, 1);
        compact.assertNames("TestCompositeC", "Composite C", "Cs[ >1]", "Clients : Linha nova");

        diff = calculateDiff(iLC3, iLC4, 3);

        compact = assertDiff(diff.removeUnchangedAndCompact());
        compact.assertChanged(3).isOriginal(iLC3).isNewer(iLC4);
        compact.get(0).assertDeleted(0).isOriginal(iLC3.get(0)).isIndex(0, -1);
        compact.get(1).assertChanged(0).isOriginal(iLC3.getField("[1].personB.name"));
        compact.get(2).assertNew(0).isOriginal(null).isNewer(iLC4.get(1)).isIndex(-1, 1);
        compact.get(0).assertNames("TestCompositeC", "Composite C", "[0> ]", "Linha 1");
        compact.get(1).assertNames("name", "Name", "[1>0].personB.name", "Linha 2 : Person B : Name");
        compact.get(2).assertNames("TestCompositeC", "Composite C", "[ >1]", "Linha nova");

    }

    @Test
    public void testListOfCompositeEmpty() {
        PackageBuilder pkg = createTestPackage();
        STypeList<TestCompositeC, SIComposite> typeCs = pkg.createListTypeOf("Cs", TestCompositeC.class);

        SIList<SIComposite>[] iL = new SIList[6];

        SIComposite c;
        iL[0] = typeCs.newInstance();
        iL[1] = typeCs.newInstance();
        c = iL[1].addNew();
        iL[2] = typeCs.newInstance();
        c = iL[2].addNew();
        c = iL[2].addNew();
        iL[3] = typeCs.newInstance();
        c = iL[3].addNew();
        c = iL[3].addNew();
        iL[3].remove(0);
        iL[4] = typeCs.newInstance();
        c = iL[4].addNew();
        c.getField("personA.name");

        for (int i = 0; i < iL.length; i++) {
            for (int j = 0; j < iL.length; j++) {
                if (iL[i] != null && iL[j] != null) {
                    DocumentDiff diff = calculateDiff(iL[i], iL[j], 0);
                    assertFalse(diff.removeUnchangedAndCompact().hasChange());
                }
            }
        }
    }

    @Test
    public void testAttachment() throws IOException {
        TempFileProvider.create(this, tmpProvider -> {
            PackageBuilder pkg = createTestPackage();
            STypeComposite<SIComposite> typeOrder = pkg.createCompositeType("order");
            STypeAttachment typeFile1 = typeOrder.addFieldAttachment("file", false);
            STypeAttachment typeFile2 = pkg.getDictionary().getType(STypeAttachment.class);

            byte[] content0 = new byte[]{};
            byte[] content1 = new byte[]{10, 20, 30};
            byte[] content2 = new byte[]{1, 2, 3, 4};

            SIAttachment fS20 = typeFile2.newInstance();
            SIAttachment fS21 = typeFile2.newInstance();
            fS21.setContent("f0", tmpProvider.createTempFile(content1), content1.length, HashUtil.toSHA1Base16(content1));
            SIAttachment fS22 = typeFile2.newInstance();
            fS22.setContent("f0", tmpProvider.createTempFile(content1), content1.length, HashUtil.toSHA1Base16(content1));
            SIAttachment fS23 = typeFile2.newInstance();
            fS23.setContent("f00", tmpProvider.createTempFile(content1), content1.length, HashUtil.toSHA1Base16(content1));
            SIAttachment fS24 = typeFile2.newInstance();
            fS24.setContent("f0", tmpProvider.createTempFile(content2), content2.length, HashUtil.toSHA1Base16(content2));
            SIAttachment fS25 = typeFile2.newInstance();
            fS25.setContent("f0", tmpProvider.createTempFile(content2), content2.length, HashUtil.toSHA1Base16(content2));
            fS25.clearInstance();

            AssertionsDiff diff;
            diff = diff(fS20, fS20, 0).assertUnchangedEmpty(0).compact(0).assertUnchangedEmpty(0);
            diff = diff(fS20, null, 0).assertUnchangedEmpty(0).compact(0).assertUnchangedEmpty(0);
            diff = diff(null, fS20, 0).assertUnchangedEmpty(0).compact(0).assertUnchangedEmpty(0);
            diff = diff(fS21, fS21, 0).assertUnchanged(0).compact(0).assertUnchanged(0);
            diff = diff(null, fS21, 1).assertNew(0).compact(1).assertNew(0);
            diff = diff(fS20, fS21, 1).assertNew(0).compact(1).assertNew(0);
            diff = diff(fS21, fS20, 1).assertDeleted(0).compact(1).assertDeleted(0);
            diff = diff(fS21, null, 1).assertDeleted(0).compact(1).assertDeleted(0);

            diff = diff(fS21, fS22, 0).assertUnchanged(0).compact(0).assertUnchanged(0);

            diff = diff(fS21, fS23, 1).assertChanged(0).compact(1).assertChanged(0);
            diff = diff(fS21, fS24, 1).assertChanged(0).compact(1).assertChanged(0);
            diff = diff(fS23, fS24, 1).assertChanged(0).compact(1).assertChanged(0);

            diff = diff(fS20, fS25, 0).assertUnchangedEmpty(0).compact(0).assertUnchangedEmpty(0);

            SIComposite o1 = typeOrder.newInstance();
            SIComposite o2 = typeOrder.newInstance();
            o2.getField(typeFile1).setContent("f0", tmpProvider.createTempFile(content1), content1.length, HashUtil.toSHA1Base16(content1));
            SIComposite o3 = typeOrder.newInstance();
            o3.getField(typeFile1).setContent("f1", tmpProvider.createTempFile(content2), content2.length, HashUtil.toSHA1Base16(content2));
            o3.clearInstance();

            diff = diff(o1, o1, 0).assertUnchangedEmpty(1);
            diff.get(0).assertUnchangedEmpty(0);
            diff.compact(0).assertUnchangedEmpty(0);

            diff = diff(o1, o2, 1).assertNew(1);
            diff.get(0).assertNew(0).isNewer(o2.getField("file"));
            diff.compact(1).assertNew(0).isNewer(o2.getField("file"));

            diff = diff(o1, o3, 0).assertUnchangedEmpty(1);
            diff.get(0).assertUnchangedEmpty(0);
            diff.compact(0).assertUnchangedEmpty(0);

            diff = diff(o2, o3, 1).assertDeleted(1);
            diff.get(0).assertDeleted(0).isOriginal(o2.getField("file"));
            diff.compact(1).assertDeleted(0).isOriginal(o2.getField("file"));
        });
    }

    private void assertDiffNew(DiffInfo info, int expectedChildren) {
        assertDiff(info, expectedChildren, DiffType.CHANGED_NEW);
    }

    private void assertDiffDeleted(DiffInfo info, int expectedChildren) {
        assertDiff(info, expectedChildren, DiffType.CHANGED_DELETED);
    }

    private static void assertDiff(DiffInfo info, int expectedChildren, DiffType expectedType) {
        assertNotNull(info);
        assertType(expectedType, info);
        if (expectedChildren != info.getChildren().size()) {
            throw new AssertionFailedError(
                    "Era esperado " + expectedChildren + " filhos mas foram encontrados " + info.getChildren().size() +
                            " para o diff de " + info.getOriginalOrNewer().getPathFull());
        }
    }

    @Test
    public void testSerialization() {
        TestCompositeC typeC = createTestDictionary().getType(TestCompositeC.class);

        SIComposite iC1 = typeC.newInstance();
        iC1.setValue("personB.name", "Renato");
        iC1.setValue("personB.age", 40);
        SIComposite iC3 = typeC.newInstance();
        iC3.setValue("personA.name", "Daniel Bordin");
        iC3.setValue("personB.name", "Renato");
        iC3.setValue("personB.info", "second");

        AssertionsDiff diff = diff(iC3, iC1, 3).assertChanged(2);
        diff = diff.compact(3).assertChanged(2);

        AssertionsDiff diff2 = new AssertionsDiff(SingularIOUtils.serializeAndDeserialize(diff.getDocumentDiff()));
        diff2.assertChangedWithInstancesNull(2).assertNames("TestCompositeC", "Composite C");
        diff2.get(0).assertDeletedWithInstancesNull(0).assertNames("name", "Name", "personA.name", "Person A : Name");
        diff2.get(1).assertChangedWithInstancesNull(2).assertNames("personB", "Person B");
        diff2.get(1).get(0).assertNewWithInstancesNull(0).assertNames("age", "Age");
        diff2.get(1).get(1).assertDeletedWithInstancesNull(0).assertNames("info", "Info");

    }

    private static void assertType(DiffType expected, DiffInfo info) {
        if (!expected.equals(info.getType())) {
            throw new AssertionFailedError(
                    "Para o item " + info.getOriginalOrNewer() + "\nExpected :" + expected + "\nActual   :" +
                            info.getType());
        }
    }

    private void assertDiffChanged(DocumentDiff diff, SType<?> field) {
        assertType(DiffType.CHANGED_CONTENT, diff.findFirst(field).get());
    }

    private void assertDiffChanged(DocumentDiff diff, String path) {
        assertType(DiffType.CHANGED_CONTENT, diff.get(path));
    }

    private void assertDiffUnchangedEmpty(DocumentDiff diff, SType<?> field) {
        assertType(DiffType.UNCHANGED_EMPTY, diff.findFirst(field).get());
    }

    private void assertDiffUnchangedEmpty(DocumentDiff diff, String path) {
        assertType(DiffType.UNCHANGED_EMPTY, diff.get(path));
    }

    private void assertDiffUnchanged(DocumentDiff diff, SType<?> field) {
        assertType(DiffType.UNCHANGED_WITH_VALUE, diff.findFirst(field).get());
    }

    private void assertDiffUnchanged(DocumentDiff diff, String path) {
        assertType(DiffType.UNCHANGED_WITH_VALUE, diff.get(path));
    }

    private void assertDiffDeleted(DocumentDiff diff, SType<?> field) {
        assertType(DiffType.CHANGED_DELETED, diff.findFirst(field).get());
    }

    private void assertDiffDeleted(DocumentDiff diff, String path) {
        assertType(DiffType.CHANGED_DELETED, diff.get(path));
    }

    private void assertDiffNew(DocumentDiff diff, SType<?> field) {
        assertType(DiffType.CHANGED_NEW, diff.findFirst(field).get());
    }

    private void assertDiffNew(DocumentDiff diff, String path) {
        assertType(DiffType.CHANGED_NEW, diff.get(path));
    }

    private AssertionsDiff diff(SInstance original, SInstance newer, int expectedChangesSize) {
        return new AssertionsDiff(calculateDiff(original, newer)).assertChangesSize(expectedChangesSize);
    }

    private DocumentDiff calculateDiff(SInstance original, SInstance newer, int expectedSize) {
        DocumentDiff diff = calculateDiff(original, newer);
        assertEquals(expectedSize, diff.getQtdChanges());
        return diff;
    }

    private DocumentDiff calculateDiff(SInstance original, SInstance newer) {
        DocumentDiff diff = DocumentDiffUtil.calculateDiff(original, newer);
        //debug(diff);
        return diff;
    }

    private void debug(DocumentDiff diff) {
        System.out.println("==============");
        diff.debug();
        DocumentDiff compacted = diff.removeUnchangedAndCompact();
        if (compacted.hasChange()) {
            System.out.println("-------------");
            compacted.debug();
        }
    }

    @SInfoPackage(name = "test.diff")
    public static final class TestDiffPackage extends SPackage {

        @Override
        protected void onLoadPackage(PackageBuilder pb) {
            pb.createType(TestCompositeA.class);
            pb.createType(TestCompositeB.class);
            pb.createType(TestCompositeC.class);
        }

        @SInfoType(name = "TestCompositeA", spackage = TestDiffPackage.class)
        public static class TestCompositeA extends STypeComposite<SIComposite> {

            public STypeString name;
            public STypeInteger age;

            @Override
            protected void onLoadType(TypeBuilder tb) {
                name = addFieldString("name");
                age = addFieldInteger("age");

                asAtr().label("Person");
                name.asAtr().label("Name");
                age.asAtr().label("Age");
            }
        }

        @SInfoType(name = "TestCompositeB", spackage = TestDiffPackage.class)
        public static final class TestCompositeB extends TestCompositeA {

            public STypeString info;

            @Override
            protected void onLoadType(TypeBuilder tb) {
                info = addFieldString("info");

                asAtr().label("Person of B");
                info.asAtr().label("Info");
            }
        }

        @SInfoType(name = "TestCompositeC", spackage = TestDiffPackage.class)
        public static final class TestCompositeC extends STypeComposite<SIComposite> {

            public TestCompositeA personA;
            public TestCompositeB personB;

            @Override
            protected void onLoadType(TypeBuilder tb) {
                personA = addField("personA", TestCompositeA.class);
                personB = addField("personB", TestCompositeB.class);

                asAtr().label("Composite C");
                personA.asAtr().label("Person A");
                personB.asAtr().label("Person B");
            }
        }
    }

    private static AssertionsDiff assertDiff(DocumentDiff documentDiff) {
        return new AssertionsDiff(documentDiff);
    }

    private static final class AssertionsDiff {
        private final DocumentDiff documentDiff;
        private final DocumentDiff documentDiffOriginal;
        private final DiffInfo info;

        public AssertionsDiff(DocumentDiff documentDiff) {
            this(documentDiff, documentDiff.getDiffRoot(), null);
        }

        private AssertionsDiff(DocumentDiff documentDiff, DiffInfo info, DocumentDiff documentDiffOrginal) {
            this.documentDiff = documentDiff;
            this.info = info;
            this.documentDiffOriginal = documentDiffOrginal;
        }

        public DocumentDiff getDocumentDiff() {
            return documentDiff;
        }

        public DiffInfo getInfo() {
            return info;
        }

        public AssertionsDiff assertNew(int expectedChildrenSize) {
            assertDiff(info, expectedChildrenSize, DiffType.CHANGED_NEW);
            assertNotNull(info.getNewer());
            return this;
        }

        public AssertionsDiff assertNewWithInstancesNull(int expectedChildrenSize) {
            assertDiff(info, expectedChildrenSize, DiffType.CHANGED_NEW);
            return assertBothInstancesNull();
        }

        public AssertionsDiff assertDeleted(int expectedChildrenSize) {
            assertDiff(info, expectedChildrenSize, DiffType.CHANGED_DELETED);
            assertNotNull(info.getOriginal());
            return this;
        }

        public AssertionsDiff assertDeletedWithInstancesNull(int expectedChildrenSize) {
            assertDiff(info, expectedChildrenSize, DiffType.CHANGED_DELETED);
            return assertBothInstancesNull();
        }

        public AssertionsDiff assertUnchanged(int expectedChildrenSize) {
            assertDiff(info, expectedChildrenSize, DiffType.UNCHANGED_WITH_VALUE);
            return this;
        }

        public AssertionsDiff assertUnchangedEmpty(int expectedChildrenSize) {
            assertDiff(info, expectedChildrenSize, DiffType.UNCHANGED_EMPTY);
            return this;
        }

        public AssertionsDiff assertChanged(int expectedChildrenSize) {
            assertDiff(info, expectedChildrenSize, DiffType.CHANGED_CONTENT);
            assertNotNull(info.getOriginal());
            assertNotNull(info.getNewer());
            return this;
        }

        private AssertionsDiff assertBothInstancesNull() {
            assertNull(info.getOriginal());
            assertNull(info.getNewer());
            return this;
        }

        public AssertionsDiff assertChangedWithInstancesNull(int expectedChildrenSize) {
            assertDiff(info, expectedChildrenSize, DiffType.CHANGED_CONTENT);
            return assertBothInstancesNull();
        }

        public AssertionsDiff get(int childIndex) {
            return new AssertionsDiff(documentDiff, info.get(childIndex), null);
        }

        public AssertionsDiff isOriginal(SInstance expectedInstance) {
            assertSame(expectedInstance, info.getOriginal());
            return this;
        }

        public AssertionsDiff isNewer(SInstance expectedInstance) {
            assertSame(expectedInstance, info.getNewer());
            return this;
        }

        public AssertionsDiff isIndex(int expectedOriginalIndex, int expectedNewerIndex) {
            assertEquals(expectedOriginalIndex, info.getOriginalIndex());
            assertEquals(expectedNewerIndex, info.getNewerIndex());
            return this;
        }

        public AssertionsDiff assertChangesSize(int expectedChangesSize) {
            if (expectedChangesSize == 0 && info != null) {
                assertEquals(expectedChangesSize, info.getQtdChanges());
            }
            return this;
        }

        public AssertionsDiff compact(int expectedChangesSize) {
            DocumentDiff compact = documentDiff.removeUnchangedAndCompact();
            AssertionsDiff a = new AssertionsDiff(compact, compact.getDiffRoot(), documentDiff);
            return a.assertChangesSize(expectedChangesSize);
        }

        public AssertionsDiff assertNames(String expectedSimpleName, String expectedSimpleLabel) {
            return assertNames(expectedSimpleName, expectedSimpleLabel, expectedSimpleName, expectedSimpleLabel);
        }

        public AssertionsDiff assertNames(String expectedSimpleName, String expectedSimpleLabel, String expectedName,
                                          String expectedLabel) {
            assertEquals(expectedSimpleName, info.getSimpleName());
            assertEquals(expectedSimpleLabel, info.getSimpleLabel());
            assertEquals(expectedName, info.getName());
            assertEquals(expectedLabel, info.getLabel());
            return this;
        }
    }
}


This case shaped envelope is made of real soft leather.
It is very convenient for bankbooks and of course you can put anything you like in .
The alphabet did silk-screen printing on the leather is designed by myself.
I designed a proverb has the same meaning in Japanese and English.


text:
Home » INTERNATIONAL » U.S. Supreme Court » QUARLES v. UNITED STATES(2019)
QUARLES v. UNITED STATES(2019)
Post category:U.S. Supreme Court
No. 17-778
Argued: April 24, 2019Decided: June 10, 2019
When petitioner Jamar Quarles pled guilty to being a felon in possession of a firearm in violation of 18 U. S. C. §922(g)(1), he also appeared to qualify for enhanced sentencing under the Armed Career Criminal Act because he had at least three prior "violent felony" convictions, §924(e). He claimed, however, that a 2002 Michigan conviction for third-degree home invasion did not qualify, even though §924(e) defines "violent felony" to include "burglary," and the generic statutory term "burglary" means "unlawful or unprivileged entry into, or remaining in, a building or structure, with intent to commit a crime," Taylor v. United States, 495 U. S. 575, 599 (emphasis added). Quarles argued that Michigan's third-degree home invasion statute–which applies when a person "breaks and enters a dwelling or enters a dwelling without permission and, at any time while he or she is entering, present in, or exiting the dwelling, commits a misdemeanor," Mich. Comp. Laws Ann. §750.110a(4)(a) (emphasis added)–swept too broadly. Specifically, he claimed, it encompassed situations where the defendant forms the intent to commit a crime at any time while unlawfully remaining in a dwelling, while generic remaining-in burglary occurs only when the defendant has the intent to commit a crime at the exact moment when he or she first unlawfully remains in a building or structure. The District Court rejected that argument, and the Sixth Circuit affirmed.
Held:
1. Generic remaining-in burglary occurs under §924(e) when the defendant forms the intent to commit a crime at any time while unlawfully remaining in a building or structure. In ordinary usage, "remaining-in" refers to a continuous activity, and this Court has followed that ordinary meaning in analogous legal contexts, see, e.g., United States v. Cores, 356 U. S. 405, 408. Those contexts thus inform the interpretation of "remaining-in" burglary in §924(e): The common understanding of "remaining in" as a continuous event means that burglary occurs for purposes of §924(e) if the defendant forms the intent to commit a crime at any time during the continuous event of unlawfully remaining in a building or structure. The intent to commit a crime must be contemporaneous with unlawful entry or remaining, but the defendant's intent is contemporaneous with the unlawful remaining so long as the defendant forms the intent at any time while unlawfully remaining. That conclusion is supported by the body of state law as of 1986, when Congress enacted §924(e). Quarles' narrow interpretation makes little sense in light of Congress' rationale for specifying burglary as a violent felony. Congress "singled out burglary" because of its "inherent potential for harm to persons," Taylor, 495 U. S., at 588, and the possibility of a violent confrontation does not depend on the exact moment when the burglar forms the intent to commit a crime while unlawfully present in a building or structure. Quarles' interpretation would also thwart the stated goals of the Armed Career Criminal Act by presumably eliminating many States' burglary statutes as predicate offenses under §924(e). Pp. 3-9.
2. For the Court's purposes here, the Michigan home-invasion statute substantially corresponds to or is narrower than generic burglary. The conclusion that generic remaining-in burglary occurs when the defendant forms the intent to commit a crime at any time while unlawfully remaining in a building or structure resolves this case. When deciding whether a state law is broader than generic burglary, the state law's "exact definition or label" does not control. Taylor, 495 U. S., at 599. So long as the state law in question "substantially corresponds" to (or is narrower than) generic burglary, the conviction qualifies. Ibid. Pp. 9-10.
850 F. 3d 836, affirmed.
KAVANAUGH, J., delivered the opinion for a unanimous Court. THOMAS, J., filed a concurring opinion.
Opinion of the Court
587 U. S. ____ (2019)
NOTICE: This opinion is subject to formal revision before publication in the preliminary print of the United States Reports. Readers are requested to notify the Reporter of Decisions, Supreme Court of the United States, Washington, D. C. 20543, of any typographical or other formal errors, in order that corrections may be made before the preliminary print goes to press.
JAMAR ALONZO QUARLES, PETITIONER v.
ON WRIT OF CERTIORARI TO THE UNITED STATES COURT OF APPEALS FOR THE SIXTH CIRCUIT
[June 10, 2019]
JUSTICE KAVANAUGH delivered the opinion of the Court.
Section 924(e) of Title 18, also known as the Armed Career Criminal Act, mandates a minimum 15-year prison sentence for a felon who unlawfully possesses a firearm and has three prior convictions for a "serious drug offense" or "violent felony." Section 924(e) defines "violent felony" to include "burglary." Under this Court's 1990 decision in Taylor v. United States, 495 U. S. 575, the generic statutory term "burglary" means "unlawful or unprivileged entry into, or remaining in, a building or structure, with intent to commit a crime." Id., at 599 (emphasis added).
The exceedingly narrow question in this case concerns remaining-in burglary. The question is whether remaining-in burglary (i) occurs only if a person has the intent to commit a crime at the exact moment when he or she first unlawfully remains in a building or structure, or (ii) more broadly, occurs when a person forms the intent to commit a crime at any time while unlawfully remaining in a building or structure. For purposes of §924(e), we conclude that remaining-in burglary occurs when the defendant forms the intent to commit a crime at any time while unlawfully remaining in a building or structure. We affirm the judgment of the U. S. Court of Appeals for the Sixth Circuit.
On August 24, 2013, police officers in Grand Rapids, Michigan, responded to a 911 call. When the officers arrived at the scene, the caller, Chasity Warren, told the officers that she had just escaped from her boyfriend, Jamar Quarles. Warren said that Quarles had threatened her at gunpoint and also hit her. While the police officers were speaking with Warren, Quarles drove by. The officers then arrested Quarles and later searched his house. Inside they found a semiautomatic pistol.
Quarles pled guilty to being a felon in possession of a firearm in violation of 18 U. S. C. §922(g)(1). Quarles had at least three prior convictions that appeared to qualify as violent felonies under the Armed Career Criminal Act, 18 U. S. C. §924(e). Those three convictions were: (1) a 2002 Michigan conviction for third-degree home invasion stemming from an attempt to chase down an ex-girlfriend who had sought refuge in a nearby apartment; (2) a 2004 Michigan conviction for assault with a dangerous weapon based on an incident where Quarles held a gun to the head of another ex-girlfriend and threatened to kill her; and (3) a 2008 Michigan conviction for assault with a dangerous weapon arising from an altercation with another man and that same ex-girlfriend in which Quarles shot at the man.
In the sentencing proceedings for his federal felon-in-possession offense, Quarles argued that his 2002 Michigan conviction for third-degree home invasion did not qualify as a burglary under §924(e). Under this Court's precedents, the District Court had to decide whether the Michigan statute under which Quarles was convicted in 2002 was broader than the generic definition of burglary set forth in Taylor (in which case the conviction would not qualify as a prior conviction under §924(e)) or, instead, whether the Michigan statute "substantially correspond[ed]" to or was narrower than the generic definition of burglary set forth in Taylor. 495 U. S., at 602. To reiterate, Taylor interpreted burglary under §924(e) to mean "unlawful or unprivileged entry into, or remaining in, a building or structure, with intent to commit a crime." Id., at 599 (emphasis added).
Under the Michigan law at issue here, a person commits third-degree home invasion if he or she "breaks and enters a dwelling or enters a dwelling without permission and, at any time while he or she is entering, present in, or exiting the dwelling, commits a misdemeanor." Mich. Comp. Laws Ann. §750.110a(4)(a) (West 2004) (emphasis added). Quarles argued to the District Court that the Michigan third-degree home invasion statute swept too broadly to qualify as burglary under §924(e) because the Michigan statute encompassed situations where the defendant forms the intent to commit a crime at any time while unlawfully remaining in a dwelling, not at the exact moment when the defendant is first unlawfully present in a dwelling. The District Court rejected that argument and sentenced Quarles to 17 years in prison. The Sixth Circuit affirmed. 850 F. 3d 836, 840 (2017). We granted certiorari in light of a Circuit split on the question of how to assess state remaining-in burglary statutes for purposes of §924(e). 586 U. S. ___ (2019).
Section 924(e) lists "burglary" as a qualifying predicate offense for purposes of the Armed Career Criminal Act. But §924(e) does not define "burglary." The question here is how to define "burglary" under §924(e). We do not write on a clean slate. See Taylor, 495 U. S., at 599.
At common law, burglary was confined to unlawful breaking and entering a dwelling at night with the intent to commit a felony. See, e.g., 4 W. Blackstone, Commentaries on the Laws of England 224 (1769). But by the time Congress passed and President Reagan signed the current version of §924(e) in 1986, state burglary statutes had long since departed from the common-law formulation. See Taylor, 495 U. S., at 593-596. In addition to casting off relics like the requirement that there be a breaking, or that the unlawful entry occur at night, a majority of States by 1986 prohibited unlawfully "remaining in" a building or structure with intent to commit a crime. Those remaining-in statutes closed a loophole in some States' laws by extending burglary to cover situations where a person enters a structure lawfully but stays unlawfully–for example, by remaining in a store after closing time without permission to do so.
In the 1990 Taylor decision, this Court interpreted the term "burglary" in §924(e) in accord with the more expansive understanding of burglary that had become common by 1986: "We believe that Congress meant by 'burglary' the generic sense in which the term is now used in the criminal codes of most States." 495 U. S., at 598. The Court concluded that generic burglary under §924(e) means "unlawful or unprivileged entry into, or remaining in, a building or structure, with intent to commit a crime." Id., at 599 (emphasis added). A defendant's prior conviction under a state statute qualifies as a predicate burglary under §924(e) if the state statute–regardless of its "exact definition or label"–"substantially corresponds" to or is narrower than the generic definition of burglary. Id., at 599, 602.
In this case, we must determine the scope of generic remaining-in burglary under Taylor–in particular, the timing of the intent requirement. Quarles argues that remaining-in burglary occurs only when the defendant has the intent to commit a crime at the exact moment when he or she first unlawfully remains in a building or structure. The Government argues for a broader definition of remaining-in burglary. According to the Government, remaining-in burglary occurs when the defendant forms the intent to commit a crime at any time while unlawfully present in a building or structure. We agree with the Government.
As noted, Taylor interpreted generic burglary under §924(e) to include remaining-in burglary. Id., at 599. In ordinary usage, "remaining in" refers to a continuous activity. See United States v. Cores, 356 U. S. 405, 408 (1958); see also Webster's New International Dictionary 2106 (2d ed. 1949); 8 Oxford English Dictionary 418 (1933). This Court has followed that ordinary meaning in analogous legal contexts. For example, when interpreting a federal criminal statute punishing any " 'alien crewman who willfully remains in the United States in excess of the number of days allowed,' " the Court stated that "the crucial word 'remains' permits no connotation other than continuing presence." Cores, 356 U. S., at 408. The law of trespass likewise proscribes remaining on the land of another without permission. In that context, the term "remain" refers to "a continuing trespass for the entire time during which the actor wrongfully remains." Restatement (Second) of Torts §158, Comment m, p. 280 (1965).
Those interpretations of "remaining in" in analogous areas of the law inform our interpretation of "remaining-in" burglary in §924(e). In particular, the common understanding of "remaining in" as a continuous event means that burglary occurs for purposes of §924(e) if the defendant forms the intent to commit a crime at any time during the continuous event of unlawfully remaining in a building or structure. To put it in conventional criminal law terms: Because the actus reus is a continuous event, the mens rea matches the actus reus so long as the burglar forms the intent to commit a crime at any time while unlawfully present in the building or structure.
Quarles insists, however, that to constitute a burglary under §924(e), the intent to commit a crime must be contemporaneous with unlawful entry or remaining. That is true. But the defendant's intent is contemporaneous with the unlawful remaining so long as the defendant forms the intent at any time while unlawfully remaining. Put simply, for burglary predicated on unlawful entry, the defendant must have the intent to commit a crime at the time of entry. For burglary predicated on unlawful remaining, the defendant must have the intent to commit a crime at the time of remaining, which is any time during which the defendant unlawfully remains.
That conclusion is supported by the States' laws as of 1986 when Congress enacted §924(e). As of 1986, a majority of States proscribed remaining-in burglary. At that time, there was not much case law addressing the precise timing of the intent requirement for remaining-in burglary. That is presumably because in most remaining-in burglaries, the defendant has the intent to commit a crime when he or she first unlawfully remains in a building or structure. The timing issue arises only in the rarer cases where the defendant forms the intent to commit a crime only after unlawfully remaining in the building or structure for a while. In any event, for present purposes, the important point is that all of the state appellate courts that had definitively addressed this issue as of 1986 had interpreted remaining-in burglary to occur when the defendant forms the intent to commit a crime at any time while unlawfully present in the building or structure. See Gratton v. State, 456 So. 2d 865, 872 (Ala. Crim. App. 1984); State v. Embree, 130 Ariz. 64, 66, 633 P. 2d 1057, 1059 (App. 1981); Keith v. State, 138 Ga. App. 239, 225 S. E. 2d 719, 720 (1976); State v. Mogenson, 10 Kan. App. 2d 470, 472-476, 701 P. 2d 1339, 1343-1345 (1985); State v. Papineau, 53 Ore. App. 33, 38, 630 P. 2d 904, 906-907 (1981).1
Especially in light of the body of state law as of 1986, it is not likely that Congress intended generic burglary under §924(e) to include (i) a burglar who intends to commit a crime at the exact moment when he or she first unlawfully remains in a building or structure, but to exclude (ii) a burglar who forms the intent to commit a crime at any time while unlawfully remaining in a building or structure.
Indeed, excluding that latter category of burglaries from generic burglary under §924(e) would make little sense in light of Congress' rationale for specifying burglary as a violent felony. As the Court recognized in Taylor, Congress "singled out burglary" because of its "inherent potential for harm to persons." 495 U. S., at 588. Burglary is dangerous because it "creates the possibility of a violent confrontation between the offender and an occupant, caretaker, or some other person who comes to investigate." Ibid.; see also United States v. Stitt, 586 U. S. ___, ___ (2018) (slip op., at 6).
With respect to remaining-in burglary, the possibility of a violent confrontation does not depend on the exact moment when the burglar forms the intent to commit a crime while unlawfully present in a building or structure. Once an intruder is both unlawfully present inside a building or structure and has the requisite intent to commit a crime, all of the reasons that led Congress to include burglary as a §924(e) predicate fully apply. The dangers of remaining-in burglary are not tied to the esoteric question of precisely when the defendant forms the intent to commit a crime. That point underscores that Congress, when enacting §924(e) in 1986, would not have understood the meaning of burglary to hinge on exactly when the defendant forms the intent to commit a crime while unlawfully present in a building or structure.
Moreover, to interpret remaining-in burglary narrowly, as Quarles advocates, would thwart the stated goals of the Armed Career Criminal Act. After all, most burglaries involve unlawful entry, not unlawful remaining in. Yet if we were to narrowly interpret the remaining-in category of generic burglary so as to require that the defendant have the intent to commit a crime at the exact moment he or she first unlawfully remains, then many States' burglary statutes would be broader than generic burglary. As a result, under our precedents, many States' burglary statutes would presumably be eliminated as predicate offenses under §924(e). That result not only would defy common sense, but also would defeat Congress' stated objective of imposing enhanced punishment on armed career criminals who have three prior convictions for burglary or other violent felonies. We should not lightly conclude that Congress enacted a self-defeating statute. See, e.g., Stokeling v. United States, 586 U. S. ___, ___ (2019) (slip op., at 8); Taylor, 495 U. S., at 594.
To sum up: The Armed Career Criminal Act does not define the term "burglary." In Taylor, the Court explained that "Congress did not wish to specify an exact formulation that an offense must meet in order to count as 'burglary' for enhancement purposes." Id., at 599. And the Court recognized that the definitions of burglary "vary" among the States. Id., at 598. The Taylor Court therefore interpreted the generic term "burglary" in §924(e) in light of: the ordinary understanding of burglary as of 1986; the States' laws at that time; Congress' recognition of the dangers of burglary; and Congress' stated objective of imposing increased punishment on armed career criminals who had committed prior burglaries. Looking at those sources, the Taylor Court interpreted generic burglary under §924(e) to encompass remaining-in burglary. Looking at those same sources, we interpret remaining-in burglary under §924(e) to occur when the defendant forms the intent to commit a crime at any time while unlawfully present in a building or structure.
In light of our conclusion that generic remaining-in burglary occurs when the defendant forms the intent to commit a crime at any time while unlawfully remaining in a building or structure, Quarles' case is easily resolved. The question in Quarles' case is whether the Michigan home-invasion statute under which he was convicted in 2002 is broader than generic burglary or, instead, "substantially corresponds" to or is narrower than generic burglary. Id., at 602. Regarding that inquiry, the Taylor Court cautioned courts against seizing on modest state-law deviations from the generic definition of burglary. A state law's "exact definition or label" does not control. Id., at 599. As the Court stated in Taylor, so long as the state law in question "substantially corresponds" to (or is narrower than) generic burglary, the conviction qualifies under §924(e). Id., at 602.
As stated above, generic remaining-in burglary occurs under §924(e) when the defendant forms the intent to commit a crime at any time while unlawfully remaining in a building or structure. For the Court's purposes here, the Michigan statute substantially corresponds to or is narrower than generic burglary.2
* * *
We affirm the judgment of the U. S. Court of Appeals for the Sixth Circuit.
THOMAS, J., concurring
JAMAR ALONZO QUARLES, PETITIONER v. UNITED STATES
JUSTICE THOMAS, concurring.
I join the opinion of the Court because it correctly applies our precedent requiring a "categorical approach" to the enumerated-offenses clause of the Armed Career Criminal Act (ACCA). I write separately to question this approach altogether.
This case demonstrates the absurdity of applying the categorical approach to the enumerated-offenses clause. The categorical approach relies on a comparison of the crime of conviction and a judicially created ideal of burglary. But this ideal is starkly different from the reality of petitioner's actual crime: Petitioner attempted to climb through an apartment window to attack his ex-girlfriend.
More importantly, there are strong reasons to suspect that the categorical approach described in Taylor v. United States, 495 U. S. 575 (1990), is not compelled by ACCA's text but was rather a misguided attempt to avoid Sixth Amendment problems. See Sessions v. Dimaya, 584 U. S. ___, ___-___ (2018) (THOMAS, J., dissenting) (slip op., at 21-23). Under our precedent, any state burglary statute with a broader definition than the one adopted in Taylor is categorically excluded simply because other conduct might be swept in at the margins. It is far from obvious that this is the best reading of the statute. A jury could readily determine whether a particular conviction satisfied the federal definition of burglary or instead fell outside that definition. See Ovalles v. United States, 905 F. 3d 1231, 1258-1260 (CA11 2018) (W. Pryor, J., concurring). Moreover, allowing a jury to do so would end the unconstitutional judicial factfinding that occurs when applying the categorical approach. See, e.g., Dimaya, supra, at ___-___ (opinion of THOMAS, J.) (slip op., at 22-23); Mathis v. United States, 579 U. S. ___, ___ (2016) (THOMAS, J., concurring) (slip op., at 2); Descamps v. United States, 570 U. S. 254, 280 (2013) (THOMAS, J., concurring in judgment); James v. United States, 550 U. S. 192, 231-232 (2007) (THOMAS, J., dissenting); Shepard v. United States, 544 U. S. 13, 26-28 (2005) (THOMAS, J., concurring in part and concurring in judgment).
Of course, addressing this issue would not help petitioner: He has not preserved a Sixth Amendment challenge. Moreover, any reasonable jury reviewing the record here would have concluded that petitioner was convicted of burglary, so any error was harmless.
Because the categorical approach employed today is difficult to apply and can yield dramatically different sentences depending on where a burglary occurred, the Court should consider whether its approach is actually required in the first place for ACCA's enumerated-offenses clause. With these observations, I join the opinion of the Court.
BARNETT BANK OF MARION COUNTY v. NELSON(1996)
THACKER ET UX. v. TENNESSEE VALLEY AUTHORITY(2019)
BRACY v. GRAMLEY, WARDEN(1997)

redpajama_set_name: RedPajamaCommonCrawl


text:
A Touching Remembrance
Chadwick Boseman's Brother Shares His Last Conversation With The Late Actor
October 5, 2020 - 04:45 pm / Amanda Stanford
Chadwick Boseman's older brothers are remembering their youngest sibling lovingly and opened up to the New York Times about their emotional conversations they shared in his last moments. It's been five weeks since Boseman has passed from colon cancer at just 43 years old.
Wakanda truly will live on forever despite the passing of Chadwick Boseman. His iconic role of "Black Panther" and his incredible personality has touched the lives of many, and in a recent interview, Boseman's brothers are remembering the late actor.
Boseman, who passed away at just 43 from colon cancer, is being remembered lovingly by his older brothers, whom at 5 weeks since his passing sat down with the New York Times to recall their last moments together.
Chadwick Boseman's brothers remember him lovingly
Chadwick's two older brothers, Kevin and Pastor Derrick Boseman, took a moment to honour their late brother and sat down five weeks after his passing with the New York Times to share their emotional recollections.
"I have been trying to remember Chad and not Chadwick. And there's just been a lot of Chadwick in the air," Kevin said.
Chadwick Boseman attends the photocall for STX Entertainment's "21 Bridges".
Kevin, who also is an actor, shared what it was like watching his brother's rise to fame.
"You have to start sharing that person with the world; I always endeavoured to just treat him like my brother," he said.
Before the late actor started making it big in the Box Office, Pastor Boseman said he was just like anyone from their small town of Anderson, South Carolina.
"Him being born there is an inspiration that you can come from there and become anything," Pastor Boseman said.
Sienna Miller Reveals Chadwick Boseman Took A Pay Cut To Increase Her Salary While Filming '21 Bridges'
"Chad was gifted," he continued. "He's probably the most gifted person I've ever met."
Kevin added, "He always did his best. His best was incredible."
Pastor Boseman then recalled the last conversation he shared with his little brother and said the family called on for prayers the day that he passed.
"No matter what he was going through, he always said, 'Hallelujah.' He never stopped saying it," he said. "When he told me that, I changed my prayer from, 'God heal him, God save him,' to 'God, let your will be done'. And the next day he passed away."
The late actor has been laid to rest near his hometown on September 3, at Welfare Baptist Church Cemetary. The town is currently working on a permanent memorial to honour the late actor for his incredible talents and wholesome outlook.
Ryan Murphy And 6-Year Old Son Celebrate Birthday After Battle With Cancer
'Duck Dynasty's' Sadie Robertson Announces Pregnancy With Husband Christian Huff
'Good Morning Britain': Dominic West Apologizes To Kate Garraway For COVID Comment
Top 10: Stars With Famous Offspring
'The Umbrella Academy' Quiz
> Chadwick Boseman's Brother Shares His Last Conversation With The Late Actor


Let him take off in the water with confidence in these Rex water sandals from Khombu. This sporty style offers bungee lacing and a velcro strap for a secure fit. The cutouts will allow for water to drain out so he stays comfortable all day.


We are very pleased to serve the Nepali communities with you and sharing your expertise and generate skills to enhance someone. Think if we stop to help, who will be there? let's forget it. In presence, I will be there.
Stay connected with us You can be a part of our mission or you can support us by your valuable prayers and views.


text:
Durango's Lokken looks to start fast at Canoeing World Cup
Professional College High School Youth Outdoors Living Sports
Lokken gears up for first canoe World Cup of summer in London
By Brendan Ploen Sports reporter
Follow @BrendanPloen
Durango's Zachary Lokken looks to get over a rapid during a recent training session in France. Lokken is set to begin the International Canoeing Federation World Cup this weekend in London.
Courtesy Zachary Lokken
Zachary Lokken was loud and clear about his goals for this weekend's kickoff of the International Canoe Federation's World Cup cycle and next month's Pan-American Games in Lima, Peru. Even from his training site in the middle of the Pyrenees Mountains in France.
The 25-year-old Durango native, who has moved to Charlotte, North Carolina, for training, is set to begin a month-long international trek that will take him to three continents, four countries and thousands of miles. He is hopeful it will culminate with a podium finish in July in Peru.
"I've got high hopes this year and want to consistently finish in the top 20 through the World Cup and want to build toward the World Championships later this year because if I do a good job at the Worlds, I'll pretty much set my spot for the Olympics next summer in Tokyo," Lokken said. "That's why it's so important for me to get a good start."
Lokken's quest for an Olympic team spot starts Saturday, when he will compete in the first ICF canoe slalom World Cup, which will be held at Lee Valley Whitewater Centre just outside of London. It is the same venue as the 2012 London Olympics.
Lokken said 2019 is a year for redemption after he was disappointed in his results from his previous year of racing.
"I think this year is a big chance for me to prove myself," Lokken said. "My last season wasn't as good as I wanted it to be, and I wasn't very happy with my results. I really hunkered down and tried to fight for that knowing that this is the Pan-Am Games, the World Cup cycle and qualifying for the Olympics is on the line."
In order for him to get off to a good start, his biggest test is getting a fast and penalty-free run as quick as possible to get momentum.
Canoe slalom is a race against the clock to get the fastest time possible all while not trying to miss one of up to a maximum 25 gates on the run, which has various up-and downstream locations on a given course. If Lokken misses a gate, it could prove crucial, with a two-second penalty per each missed gate. Given that the gate locations can change, as can the water conditions, it means that no two runs are ensured to be the same.
After qualifying for the Pan-American Games, Durango's Zachary Lokken is training hard in pursuit of a podium finish later this summer in Peru.
"My biggest thing right now is just staying consistent with my runs," Lokken said. "That means to me having a few good runs in a row, and also through the whole course. The top is as good as the bottom, so having consistency and being clean. I'm not sure what our gate arrangement is going to look like in London, but also we really only have one opportunity to do well. If not, we have two runs, but really, that first run is huge."
London will be the first test of the season, and the World Cup venue will change the following week when it moves June 21-23 to Bratislava, Slovenia.
Lokken said traveling is one of the more enjoyable parts of the job, and he says it's pretty easy to know where to train and compete: Wherever the water is flowing the best.
"Charlotte is my home right now and where I do most of my training," he said. "We also go to Australia for the winter and Europe always has good during the summer. We're traveling a lot just because our sport is so hyped and you have to be on whitewater so much and because the venues are always changing, so you can never really adjust to one specific course. You have to adjust a lot to keep in touch with the water, and the balance that comes with that."
Charlotte is home to the U.S. National Whitewater Center and the location is growing in influence for paddlers.
Lokken is currently the second-highest ranked American canoer and sits No. 49 in the world behind his close friend and closest competitor, Casey Eichfeld, who is No. 21.
"Casey is such a strong competitor, and he and I have really been pushing each other, and while it's an individual sport, it really is nice to practice with him and the other Americans here," Lokken said. "We all get along off of the water, but it gets intense when you're competing for an Olympic spot."
Heading into this weekend, Lokken is looking to get the season off to a solid start but knows that he will be facing the best competition in the world.
"I'm ready for it all to kick off," Lokken said. "I put in a lot of hours training and really got off to a great start when I finally was able to break through and qualify for the Pan-Am Games. I'm not sure what the course will hold, but I know that the competition is going to be really strong, as always, and I'm going to go out there and try my best to have a clean and fast race."
bploen@durangoherald.com
Recent Outdoors
Natural sandstone arches of New Mexico
Seniors Outdoors! announces weekly events
Seniors Outdoors! weekly events
Gardner: BLM headquarters will move to Grand Junction


text:
Top 10 highest-paid tennis stars of 2021
The Swiss legend Roger Federer tops the list being the highest-earning player with veteran ace American Naomi Osaka taking the second spot, and legend Serena Williams taking the third spot.
By News Desk On October 10, 2021 12:17 IST
This year, there were many prestigious events which were conducted including the inaugural Wimbledon Open, Australian Open and French Open which was won by Serbian ace Novak Djokovic completely conquering the tennis fraternity to a whole level. There are tennis legends like Roger Federer, Rafael Nadal, Serena Williams, Novak Djokovic and many more who have conquered the sport with their exceptional performance shown every year. They are the highest elite players which the entire world has ever witnessed. Similarly, their hard work and success are determined by their effect on their performance throughout by winning huge price money for winning the title year after year. Forbes release the highest-paid list recently.
The top 10 highest-earning tennis players this year are as follows:-
1) Roger Federer
Image Courtesy: Roger Federer/Twitter
Total Earnings: 90.6 Million Dollars
Total Earnings (in INR): Rs 6,71,75,37,000
Annual Income (in INR): Rs 55,60,87,898
Roger Federer, also considered as the Swiss legend is no doubt one of the iconic tennis players the fans have ever witnessed. His commendable service, shots and defensive skills make him tough to beat in any match. He is the first player to reach a record of winning 20 Grand Slam titles ever in the history of this sport. He has been ranked world No 1 for a record of 310 weeks, more than anyone else in this sport. He has also won 103 single titles making him only behind Jimmy Corners. He is also won many Wimbledon titles as much as eight in number.
2) Naomi Osaka
Image Courtesy: Naomi Osaka/Twitter
Total Earnings (in INR): ₹44,75,88,230
Annual Income (in INR): ₹ 181,02,89,250
The 23-year-old Japanese tennis star made headlines and introduced herself into the tennis world when she beat the legend, Serena Williams, in the finals of the US Open in the year 2018. Naomi Osaka had to unfortunately as well withdraw from this year's French Open and Wimbledon as she was dealing with mental health issues. She has been ranked World no 1 for several months and snow has fallen in the 12th rankings of the WTA. She is a future star in the making as she looks to win more and more titles for herself.
3) Serena Williams
Image Courtesy: Serena Williams/Twitter
Total Earnings (in INR): ₹3,07,65,60,900
Annual Income (in INR): ₹25,64,18,308
Serena Jameka Williams is an American professional tennis player. She has won 23 Grand Slam titles, the most by any player in the Open Era and stands second in the all-time list just behind Margaret Court. She was ranked world No 1 for a record-breaking 319 weeks, which is more than anyone in this sport.
4) Novak Djokovic
Image Courtesy: DjokerNole/Twitter
Total Earnings: 38 Million Dollars
Novak Djokovic is a Serbian professional tennis player as he is currently equalised with Roger Federer and Rafael Nadal by winning 20 Grand Slam titles in total. He is currently the No 1 ranked player by the ATP. He has been in this spot for 337 weeks and has finished the ATP season in a record six times. He has also won 85 ATP singles titles and is also a six-time Wimbledon champion.
5) Rafael Nadal
Image Courtesy: Rafael Nadal/Twitter
Rafael Nadal is a Spanish professional tennis player who is also known as the king of clay. He has been ranked No 1 for 209 weeks and finished the year with the first spot 5 times in total. He has won a record-breaking 13 times in the French Open, which is more than anyone in the history of this sport.
6) Kei Nishikori
Image Courtesy: Kei NishikoriTwitter
Total Earnings (in INR):₹ 2,38,00,56,199
Annual Income (in INR):₹ 19,83,38,016
Kei Nishikori is a Japanese tennis player who has performed tremendously in the past. He is the second male Japanese player to have ranked in the top 5 in singles and the only one to do it in the Open Era. His best career rank is no 4 which he achieved in March 2015.
7) Daniil Medvedev
Image Courtesy: DaniiMedwed/Twitter
Annual Income (in INR): ₹ 7,29,09,302
Daniil Sergeyevich Medvedev is a Russian professional tennis player who is currently ranked world No 2 as per ATP Rankings, which is currently his best career ranking first achieved on 15th March 2021. Medvedev was also the runners up at the 2019 US Open and 2021 Australian Open where he lost to both Nadal and Roger Federer irrespective.
8) Dominic Thiem
Image Courtesy: ThiemDomi/Twitter
Total Earnings: 8.9 Million Dollars
Annual Income (in INR): ₹6,85,84,173
Dominic Thiem is an Austrian tennis player. He has been ranked world No 3 in singles as per the Association of Tennis Professionals which he achieved in March 2020. He has won 17 ATP Tour singles titles, including a Grand Slam title at the 2020 US Open where he came back from two sets down to defeat Alexander Zverev in the final.
9) Stefanos Tsitsipas
Image Courtesy: steftsitsipas/Twitter
Total Earnings (in INR):₹ 23,28,15,466
Stefanos Tsitsipas is a Greek professional tennis player. He is also the second-youngest player to feature in the top 10 by the Association of Tennis Professionals (ATP). He is currently ranked on the 3rd spot in the world, making him the highest-ranked Greek in the history of this sport. He has won a total of eight grand slam titles in his belt.
10) Ashleigh Barty
Image Courtesy: aas heart twitter
Ashleigh Barty is an Australian professional tennis player and former cricketer. She is ranked No. 1 in the world in singles by the Women's Tennis Association (WTA) and is the second Australian WTA singles No. 1 after fellow Indigenous Australian player Evonne Goolagong Cawley. She has also won thirteen singles titles and eleven doubles titles on the WTA Tour, including two Grand Slam singles titles, the 2019 French Open and 2021 Wimbledon Championships.
Alexander ZverevAshley BartyDaniil MedvedevDominic ThiemKai NishikoriNaomi OsakaNovak DjokovicRafael NadalRoger FedererSerena WilliamsStefanos Tsitsipas
5 inspiring books written by India's former president Dr. APJ Abdul Kalam you…
Top 10 unknown & interesting facts about late Dr. APJ Abdul Kalam
Top 8 quotes by late Dr APJ Abdul Kalam
Tina Dutta- Wiki, age, girlfriend, family, personal life, biography and more
Miss Scarlet and The Duke Season 4: Is it releasing in…
The Chair Season 2: Check out release date, cast and plot
PSG progress in the Coupe De France
Is Katrina Kaif Pregnant? New rumours sparked as Vicky…
Shark Tank India 2: Netizens come out in support of Flat…
Russian oil exports to India may reach new highs as demand…
SA 20: List of players and coach of team Joburg Super Kings
Rohit Shetty opens up on Cirkus failure says it is all part…


text:
License Provisions/General Rights For All Uses:
In connection with your exercise of the right and license granted herein, you shall have the right to make a musical arrangement of the Composition(s) ("the "Composition(s)") to the extent necessary to conform the Compositions to the style or manner of interpretation of the performance and/or publication involved, provided however, that any such arrangement shall not change the basic melody or the fundamental character of the Composition(s). You hereby transfer and assign to Publisher(s) all rights, title, and interest in and to any such arrangement.
BMG Rights Management (US), LLC hereby warrants and represents that it is the authorized agent for the BMG Rights Management (US), LLC Clients identified and their respective Composition(s), and possesses full right and authority to grant the rights and license herein described for the percentage of each Composition owned or controlled by said BMG Rights Management (US), LLC Client(s). Licensee warrants and represents that it is the rightful owner or lawful assignee of the owner of the master recordings, if any, to be made and distributed pursuant to this license.
In the event that you fail to pay royalties to BMG Rights Management (US), LLC on all copies manufactured and fail to remedy such default within thirty (30) days after written notice given to you by certified or registered mail, this agreement and all rights herein granted shall automatically terminate and such termination shall render either the making or distribution of copies of the product(s) for which the royalty has not been paid actionable as acts of infringement under the United States Copyright Law.
This license is limited to the rights expressly granted herein and does not authorize any use of the aforesaid musical Composition(s) not expressly set forth herein. By way of illustration, but not limitation, this license does not include the right to change, arrange or adapt the lyrics or music, or alter the fundamental character of said musical Composition(s) or to use the title thereof as the title or sub-title of the product(s).
You agree to identify the Composition(s) on your project as detailed in this license.
BMG Rights Management (US), LLC shall have the right to inspect and audit your books and records relating to transactions involving the rights granted herein upon reasonable notice.
All rights not herein specifically granted are reserved by BMG Rights Management (US), LLC. All rights granted here in are on a non-exclusive basis.
The Territory covered by this license is the United States only.
If we license less than 100% of a composition to you, it means that there are other owners of the composition that BMG Rights Management (US), LLC does not represent. It is your responsibility to secure permission from these publishers directly.
The term of this license shall be a one-time manufacture and eventual distribution of the number of units stated herein. Upon the expiration of this license, all rights herein granted shall cease and terminate, and the right to make or authorize any further use or distribution of the product(s) made hereunder shall cease and terminate.
This agreement shall be binding upon the heirs, legal representatives, successors, and assigns of each of the parties hereto. The rights granted herein may not be transferred or assigned by you to any other party without written permission from BMG Rights Management (US), LLC .
This license constitutes our entire agreement and cannot be modified except by written instrument signed by both parties. This license shall be construed and interpreted by the laws of the state of New York applicable to agreements wholly to be performed therein.
Mechanical License Provisions:
When you authorize BMG Rights Management (US), LLC to bill your credit card for the non-refundable Total Amount Due herein, this will constitute an agreement with respect to a grant by BMG Rights Management (US), LLC to you of a non-exclusive license for the manufacture and distribution of phonorecords (including compact disc, cassette configurations and any other audio device intended for home use) embodying a single performance of the following musical Composition(s).
You are hereby granted the non-exclusive right and license during the term of the United States Copyright in the Composition(s) to make and distribute the following phonorecords embodying a single performance of the Composition(s):
As used in this agreement, all terms and phrases, including the word "phonorecord" and the phrase "made and distributed" shall have the meaning ascribed thereto in the United States Copyright Law and the regulations properly adopted in connection therewith, unless otherwise specified or defined herein.
For phonorecords manufactured and distributed in the United States the royalty rate payable is the statutory mechanical rate.
If applicable, you are hereby granted a nonexclusive license for the manufacture and distribution of digital phonorecord deliveries ("DPDs"), as defined in Section 115 of the Copyright Act, of the following musical composition(s) (the "Composition{s}"). You hereby agree to comply with all applicable provisions of the Copyright Laws of the United States (17 U.S.C. Section 101 et. seq.), unless otherwise modified herein. You will identify the Composition as shown herein on all DPDs distributed hereunder in any graphics and imagery displayed in connection with playback of such DPDs. This agreement covers and is limited to the particular phonorecord identified/licensed herein as performed by the artist identified herein, and this license does not supersede nor in any way affect any prior agreements now in effect respecting phonorecords of the Composition(s) licensed herein. This license is limited to the manufacture and distribution of DPDs, and the making of a copy of a sound recording of the Composition(s) on a computer file server located in the United States, its territories or possessions, solely for the purpose of distributing such DPDs. The authority hereunder does not extend to DPDs where the reproduction and distribution of a phonorecord or the Composition is incidental to the transmission which constitutes the DPD.


1330 S Rimpau Blvd is located in the Mid Wilshire neighborhood. This Duplex has two separate houses on one lot; totaling 6 bedrooms and 4 bathrooms. The front home accommodates two large bedrooms and two completely modernized baths with premium tile showers. The front home also includes hardwood floors, dark-wood finish cabinetry, stainless steel appliances, and white stone countertops. As you enter the second home, you are exposed to an abundance of natural light, spilling throughout the spacious living room. The kitchen is spacious and welcoming with a homey breakfast counter. This large lot allows for plenty of off-street parking - for both units. Being in the heart of LA, this Duplex is just a few miles from the Grove, Staples Center, Downtown, Koreatown, LACMA, and much more! This Duplex is excellent for an extended family, owner-user, or income property. The choice is yours!