text:
package org.openestate.is24.restapi.xml.offerlistelement;

import java.io.Serializable;
import java.net.URI;
import java.util.Calendar;
import javax.annotation.Generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.jvnet.jaxb2_commons.lang.CopyStrategy2;
import org.jvnet.jaxb2_commons.lang.CopyTo2;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
import org.openestate.is24.restapi.xml.Adapter2;
import org.openestate.is24.restapi.xml.Adapter4;
import org.openestate.is24.restapi.xml.common.AbstractRealEstateForList;
import org.openestate.is24.restapi.xml.common.Picture;
import org.openestate.is24.restapi.xml.common.PublishChannels;
import org.openestate.is24.restapi.xml.common.RealEstateState;

/**
 * Allgemeine Elemente f\u00fcr alle Immobilienarten.
 *
 *
Java class for OfferRealEstateForList complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="OfferRealEstateForList">
 *   <complexContent>
 *     <extension base="{http://rest.immobilienscout24.de/schema/common/1.0}AbstractRealEstateForList">
 *       <sequence>
 *         <element name="state" type="{http://rest.immobilienscout24.de/schema/common/1.0}RealEstateState"/>
 *         <element name="titlePicture" type="{http://rest.immobilienscout24.de/schema/common/1.0}Picture"/>
 *         <element name="floorplan" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
 *         <sequence>
 *           <element ref="{http://rest.immobilienscout24.de/schema/common/1.0}publishChannels" minOccurs="0"/>
 *         </sequence>
 *       </sequence>
 *       <attGroup ref="{http://rest.immobilienscout24.de/schema/offer/listelement/1.0}Reference"/>
 *     </extension>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OfferRealEstateForList", propOrder = {
    "state",
    "titlePicture",
    "floorplan",
    "publishChannels"
})
@XmlSeeAlso({
    OfferApartmentRent.class,
    OfferHouseRent.class,
    OfferApartmentBuy.class,
    OfferHouseBuy.class,
    OfferShortTermAccommodation.class,
    OfferHouseType.class,
    OfferOffice.class,
    OfferStore.class,
    OfferGastronomy.class,
    OfferIndustry.class,
    OfferSpecialPurpose.class,
    OfferInvestment.class,
    OfferCompulsoryAuction.class,
    OfferLivingBuySite.class,
    OfferLivingRentSite.class,
    OfferTradeSite.class,
    OfferGarageBuy.class,
    OfferGarageRent.class,
    OfferFlatShareRoom.class,
    OfferAssistedLiving.class,
    OfferSeniorCare.class
})
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
public abstract class OfferRealEstateForList
    extends AbstractRealEstateForList
    implements Serializable, Cloneable, CopyTo2, Equals2, ToString2
{

    @XmlElement(required = true)
    @XmlSchemaType(name = "string")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    protected RealEstateState state;
    @XmlElement(required = true)
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    protected Picture titlePicture;
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    protected Boolean floorplan;
    @XmlElement(namespace = "http://rest.immobilienscout24.de/schema/common/1.0")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    protected PublishChannels publishChannels;
    @XmlAttribute(name = "href", namespace = "http://www.w3.org/1999/xlink")
    @XmlJavaTypeAdapter(Adapter4 .class)
    @XmlSchemaType(name = "anyURI")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    protected URI href;
    @XmlAttribute(name = "modification")
    @XmlJavaTypeAdapter(Adapter2 .class)
    @XmlSchemaType(name = "dateTime")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    protected Calendar modification;
    @XmlAttribute(name = "creation")
    @XmlJavaTypeAdapter(Adapter2 .class)
    @XmlSchemaType(name = "dateTime")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    protected Calendar creation;
    @XmlAttribute(name = "publishDate")
    @XmlJavaTypeAdapter(Adapter2 .class)
    @XmlSchemaType(name = "dateTime")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    protected Calendar publishDate;

    /**
     * Gets the value of the state property.
     *
     * @return
     *     possible object is
     *     {@link RealEstateState }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public RealEstateState getState() {
        return state;
    }

    /**
     * Sets the value of the state property.
     *
     * @param value
     *     allowed object is
     *     {@link RealEstateState }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public void setState(RealEstateState value) {
        this.state = value;
    }

    /**
     * Gets the value of the titlePicture property.
     *
     * @return
     *     possible object is
     *     {@link Picture }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public Picture getTitlePicture() {
        return titlePicture;
    }

    /**
     * Sets the value of the titlePicture property.
     *
     * @param value
     *     allowed object is
     *     {@link Picture }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public void setTitlePicture(Picture value) {
        this.titlePicture = value;
    }

    /**
     * Gets the value of the floorplan property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public Boolean getFloorplan() {
        return floorplan;
    }

    /**
     * Sets the value of the floorplan property.
     *
     * @param value
     *     allowed object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public void setFloorplan(Boolean value) {
        this.floorplan = value;
    }

    /**
     * Gets the value of the publishChannels property.
     *
     * @return
     *     possible object is
     *     {@link PublishChannels }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public PublishChannels getPublishChannels() {
        return publishChannels;
    }

    /**
     * Sets the value of the publishChannels property.
     *
     * @param value
     *     allowed object is
     *     {@link PublishChannels }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public void setPublishChannels(PublishChannels value) {
        this.publishChannels = value;
    }

    /**
     * Link zum Element.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public URI getHref() {
        return href;
    }

    /**
     * Sets the value of the href property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public void setHref(URI value) {
        this.href = value;
    }

    /**
     * Gets the value of the modification property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public Calendar getModification() {
        return modification;
    }

    /**
     * Sets the value of the modification property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public void setModification(Calendar value) {
        this.modification = value;
    }

    /**
     * Gets the value of the creation property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public Calendar getCreation() {
        return creation;
    }

    /**
     * Sets the value of the creation property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public void setCreation(Calendar value) {
        this.creation = value;
    }

    /**
     * Gets the value of the publishDate property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public Calendar getPublishDate() {
        return publishDate;
    }

    /**
     * Sets the value of the publishDate property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public void setPublishDate(Calendar value) {
        this.publishDate = value;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public String toString() {
        final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE2;
        final StringBuilder buffer = new StringBuilder();
        append(null, buffer, strategy);
        return buffer.toString();
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
        strategy.appendStart(locator, this, buffer);
        appendFields(locator, buffer, strategy);
        strategy.appendEnd(locator, this, buffer);
        return buffer;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
        super.appendFields(locator, buffer, strategy);
        {
            RealEstateState theState;
            theState = this.getState();
            strategy.appendField(locator, this, "state", buffer, theState, (this.state!= null));
        }
        {
            Picture theTitlePicture;
            theTitlePicture = this.getTitlePicture();
            strategy.appendField(locator, this, "titlePicture", buffer, theTitlePicture, (this.titlePicture!= null));
        }
        {
            Boolean theFloorplan;
            theFloorplan = this.getFloorplan();
            strategy.appendField(locator, this, "floorplan", buffer, theFloorplan, (this.floorplan!= null));
        }
        {
            PublishChannels thePublishChannels;
            thePublishChannels = this.getPublishChannels();
            strategy.appendField(locator, this, "publishChannels", buffer, thePublishChannels, (this.publishChannels!= null));
        }
        {
            URI theHref;
            theHref = this.getHref();
            strategy.appendField(locator, this, "href", buffer, theHref, (this.href!= null));
        }
        {
            Calendar theModification;
            theModification = this.getModification();
            strategy.appendField(locator, this, "modification", buffer, theModification, (this.modification!= null));
        }
        {
            Calendar theCreation;
            theCreation = this.getCreation();
            strategy.appendField(locator, this, "creation", buffer, theCreation, (this.creation!= null));
        }
        {
            Calendar thePublishDate;
            thePublishDate = this.getPublishDate();
            strategy.appendField(locator, this, "publishDate", buffer, thePublishDate, (this.publishDate!= null));
        }
        return buffer;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public Object clone() {
        return copyTo(createNewInstance());
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public Object copyTo(Object target) {
        final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE2;
        return copyTo(null, target, strategy);
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
        if (null == target) {
            throw new IllegalArgumentException("Target argument must not be null for abstract copyable classes.");
        }
        super.copyTo(locator, target, strategy);
        if (target instanceof OfferRealEstateForList) {
            final OfferRealEstateForList copy = ((OfferRealEstateForList) target);
            {
                Boolean stateShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.state!= null));
                if (stateShouldBeCopiedAndSet == Boolean.TRUE) {
                    RealEstateState sourceState;
                    sourceState = this.getState();
                    RealEstateState copyState = ((RealEstateState) strategy.copy(LocatorUtils.property(locator, "state", sourceState), sourceState, (this.state!= null)));
                    copy.setState(copyState);
                } else {
                    if (stateShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.state = null;
                    }
                }
            }
            {
                Boolean titlePictureShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.titlePicture!= null));
                if (titlePictureShouldBeCopiedAndSet == Boolean.TRUE) {
                    Picture sourceTitlePicture;
                    sourceTitlePicture = this.getTitlePicture();
                    Picture copyTitlePicture = ((Picture) strategy.copy(LocatorUtils.property(locator, "titlePicture", sourceTitlePicture), sourceTitlePicture, (this.titlePicture!= null)));
                    copy.setTitlePicture(copyTitlePicture);
                } else {
                    if (titlePictureShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.titlePicture = null;
                    }
                }
            }
            {
                Boolean floorplanShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.floorplan!= null));
                if (floorplanShouldBeCopiedAndSet == Boolean.TRUE) {
                    Boolean sourceFloorplan;
                    sourceFloorplan = this.getFloorplan();
                    Boolean copyFloorplan = ((Boolean) strategy.copy(LocatorUtils.property(locator, "floorplan", sourceFloorplan), sourceFloorplan, (this.floorplan!= null)));
                    copy.setFloorplan(copyFloorplan);
                } else {
                    if (floorplanShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.floorplan = null;
                    }
                }
            }
            {
                Boolean publishChannelsShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.publishChannels!= null));
                if (publishChannelsShouldBeCopiedAndSet == Boolean.TRUE) {
                    PublishChannels sourcePublishChannels;
                    sourcePublishChannels = this.getPublishChannels();
                    PublishChannels copyPublishChannels = ((PublishChannels) strategy.copy(LocatorUtils.property(locator, "publishChannels", sourcePublishChannels), sourcePublishChannels, (this.publishChannels!= null)));
                    copy.setPublishChannels(copyPublishChannels);
                } else {
                    if (publishChannelsShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.publishChannels = null;
                    }
                }
            }
            {
                Boolean hrefShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.href!= null));
                if (hrefShouldBeCopiedAndSet == Boolean.TRUE) {
                    URI sourceHref;
                    sourceHref = this.getHref();
                    URI copyHref = ((URI) strategy.copy(LocatorUtils.property(locator, "href", sourceHref), sourceHref, (this.href!= null)));
                    copy.setHref(copyHref);
                } else {
                    if (hrefShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.href = null;
                    }
                }
            }
            {
                Boolean modificationShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.modification!= null));
                if (modificationShouldBeCopiedAndSet == Boolean.TRUE) {
                    Calendar sourceModification;
                    sourceModification = this.getModification();
                    Calendar copyModification = ((Calendar) strategy.copy(LocatorUtils.property(locator, "modification", sourceModification), sourceModification, (this.modification!= null)));
                    copy.setModification(copyModification);
                } else {
                    if (modificationShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.modification = null;
                    }
                }
            }
            {
                Boolean creationShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.creation!= null));
                if (creationShouldBeCopiedAndSet == Boolean.TRUE) {
                    Calendar sourceCreation;
                    sourceCreation = this.getCreation();
                    Calendar copyCreation = ((Calendar) strategy.copy(LocatorUtils.property(locator, "creation", sourceCreation), sourceCreation, (this.creation!= null)));
                    copy.setCreation(copyCreation);
                } else {
                    if (creationShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.creation = null;
                    }
                }
            }
            {
                Boolean publishDateShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.publishDate!= null));
                if (publishDateShouldBeCopiedAndSet == Boolean.TRUE) {
                    Calendar sourcePublishDate;
                    sourcePublishDate = this.getPublishDate();
                    Calendar copyPublishDate = ((Calendar) strategy.copy(LocatorUtils.property(locator, "publishDate", sourcePublishDate), sourcePublishDate, (this.publishDate!= null)));
                    copy.setPublishDate(copyPublishDate);
                } else {
                    if (publishDateShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.publishDate = null;
                    }
                }
            }
        }
        return target;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
        if ((object == null)||(this.getClass()!= object.getClass())) {
            return false;
        }
        if (this == object) {
            return true;
        }
        if (!super.equals(thisLocator, thatLocator, object, strategy)) {
            return false;
        }
        final OfferRealEstateForList that = ((OfferRealEstateForList) object);
        {
            RealEstateState lhsState;
            lhsState = this.getState();
            RealEstateState rhsState;
            rhsState = that.getState();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "state", lhsState), LocatorUtils.property(thatLocator, "state", rhsState), lhsState, rhsState, (this.state!= null), (that.state!= null))) {
                return false;
            }
        }
        {
            Picture lhsTitlePicture;
            lhsTitlePicture = this.getTitlePicture();
            Picture rhsTitlePicture;
            rhsTitlePicture = that.getTitlePicture();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "titlePicture", lhsTitlePicture), LocatorUtils.property(thatLocator, "titlePicture", rhsTitlePicture), lhsTitlePicture, rhsTitlePicture, (this.titlePicture!= null), (that.titlePicture!= null))) {
                return false;
            }
        }
        {
            Boolean lhsFloorplan;
            lhsFloorplan = this.getFloorplan();
            Boolean rhsFloorplan;
            rhsFloorplan = that.getFloorplan();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "floorplan", lhsFloorplan), LocatorUtils.property(thatLocator, "floorplan", rhsFloorplan), lhsFloorplan, rhsFloorplan, (this.floorplan!= null), (that.floorplan!= null))) {
                return false;
            }
        }
        {
            PublishChannels lhsPublishChannels;
            lhsPublishChannels = this.getPublishChannels();
            PublishChannels rhsPublishChannels;
            rhsPublishChannels = that.getPublishChannels();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "publishChannels", lhsPublishChannels), LocatorUtils.property(thatLocator, "publishChannels", rhsPublishChannels), lhsPublishChannels, rhsPublishChannels, (this.publishChannels!= null), (that.publishChannels!= null))) {
                return false;
            }
        }
        {
            URI lhsHref;
            lhsHref = this.getHref();
            URI rhsHref;
            rhsHref = that.getHref();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "href", lhsHref), LocatorUtils.property(thatLocator, "href", rhsHref), lhsHref, rhsHref, (this.href!= null), (that.href!= null))) {
                return false;
            }
        }
        {
            Calendar lhsModification;
            lhsModification = this.getModification();
            Calendar rhsModification;
            rhsModification = that.getModification();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "modification", lhsModification), LocatorUtils.property(thatLocator, "modification", rhsModification), lhsModification, rhsModification, (this.modification!= null), (that.modification!= null))) {
                return false;
            }
        }
        {
            Calendar lhsCreation;
            lhsCreation = this.getCreation();
            Calendar rhsCreation;
            rhsCreation = that.getCreation();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "creation", lhsCreation), LocatorUtils.property(thatLocator, "creation", rhsCreation), lhsCreation, rhsCreation, (this.creation!= null), (that.creation!= null))) {
                return false;
            }
        }
        {
            Calendar lhsPublishDate;
            lhsPublishDate = this.getPublishDate();
            Calendar rhsPublishDate;
            rhsPublishDate = that.getPublishDate();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "publishDate", lhsPublishDate), LocatorUtils.property(thatLocator, "publishDate", rhsPublishDate), lhsPublishDate, rhsPublishDate, (this.publishDate!= null), (that.publishDate!= null))) {
                return false;
            }
        }
        return true;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T09:44:49+02:00", comments = "JAXB RI v2.3.0")
    public boolean equals(Object object) {
        final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE2;
        return equals(null, null, object, strategy);
    }

}


text:
package com.google.gwt.dev.jjs.impl.gflow;

import com.google.gwt.dev.jjs.impl.gflow.TransformationFunction.Transformation;
import com.google.gwt.dev.util.Preconditions;

import java.util.ArrayList;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;

/**
 * Integrated analysis, which combines several other integrated analyses into
 * one. It does so be defining combined assumption, which is vector of original
 * assumptions, and applies each analysis to its own component.
 *
 * If any analysis decides to rewrite the node, combined analysis returns
 * produced transformation. If more than one analyses decide to transform, the
 * first one wins.
 *
 * @param <N> graph node type.
 * @param <E> graph edge type.
 * @param <T> graph transformer type.
 * @param <G> graph type.
 *
 */
public class CombinedIntegratedAnalysis<N, E, T, G extends Graph<N, E, T>>
    implements
    IntegratedAnalysis<N, E, T, G, CombinedIntegratedAnalysis.CombinedAssumption> {

  /**
   * Combined assumption which holds vector of original assumptions.
   */
  public static class CombinedAssumption implements
      Assumption<CombinedAssumption> {

    private static class CopyOnWrite {
      private final int size;
      private CombinedAssumption assumption;
      private boolean copied = false;

      private CopyOnWrite(CombinedAssumption assumption, int size) {
        this.assumption = assumption;
        this.size = size;
      }

      public boolean isCopied() {
        return copied;
      }

      public void set(int slice, Assumption<?> assumption) {
        copyIfNeeded();
        this.assumption.set(slice, assumption);
      }

      public CombinedAssumption unwrap() {
        return assumption;
      }

      private void copyIfNeeded() {
        if (!copied) {
          copied = true;
          if (assumption == null) {
            assumption = new CombinedAssumption(size);
          } else {
            assumption = new CombinedAssumption(assumption);
          }
        }
      }
    }

    /**
     * Individual assumptions vector.
     */
    private final List<Assumption<?>> assumptions;

    public CombinedAssumption(CombinedAssumption assumption) {
      this.assumptions = new ArrayList<Assumption<?>>(assumption.assumptions);
    }

    public CombinedAssumption(int size) {
      this.assumptions = new ArrayList<Assumption<?>>(size);
      for (int i = 0; i < size; ++i) {
        this.assumptions.add(null);
      }
    }

    public CombinedAssumption(List<Assumption<?>> assumptions) {
      this.assumptions = assumptions;
    }

    @Override
    public boolean equals(Object obj) {
      if (this == obj) {
        return true;
      }
      if (obj == null) {
        return false;
      }

      CombinedAssumption other = (CombinedAssumption) obj;

      // We do not implement equals in our zipped lists. Do it here.
      if (other.assumptions.size() != assumptions.size()) {
        return false;
      }

      for (int i = 0; i < assumptions.size(); ++i) {
        Assumption<?> a1 = assumptions.get(i);
        Assumption<?> a2 = other.assumptions.get(i);
        if (a1 == null) {
          if (a1 != a2) {
            return false;
          }
        } else {
          if (a2 == null) {
            return false;
          }
          if (!a1.equals(a2)) {
            return false;
          }
        }
      }

      return true;
    }

    @Override
    public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result
          + ((assumptions == null) ? 0 : assumptions.hashCode());
      return result;
    }

    /**
     * Joins combined assumption by joining all individual components.
     */
    @SuppressWarnings("unchecked")
    public CombinedAssumption join(CombinedAssumption value) {
      if (value == null) {
        return this;
      }
      Preconditions.checkArgument(value.assumptions.size() ==
        assumptions.size());

      List<Assumption<?>> newAssumptions = new ArrayList<Assumption<?>>();
      for (int i = 0; i < assumptions.size(); ++i) {
        Assumption a1 = assumptions.get(i);
        Assumption a2 = value.assumptions.get(i);
        newAssumptions.add(AssumptionUtil.join(a1, a2));
      }

      return new CombinedAssumption(newAssumptions);
    }

    @Override
    public String toString() {
      return assumptions.toString();
    }

    /**
     * Gets nth assumption component.
     */
    private Assumption<?> get(int n) {
      return assumptions.get(n);
    }

    private void set(int slice, Assumption<?> assumption) {
      assumptions.set(slice, assumption);
    }
  }

  /**
   * Combined integrated flow function.
   */
  private final class CombinedIntegratedFlowFunction implements
      IntegratedFlowFunction<N, E, T, G, CombinedAssumption> {
    @SuppressWarnings("unchecked")
    public Transformation interpretOrReplace(final N node, final G graph,
        final AssumptionMap<E, CombinedAssumption> assumptionMap) {

      final Map<E, CombinedAssumption.CopyOnWrite> newAssumptions = new IdentityHashMap<E, CombinedAssumption.CopyOnWrite>();

      final int size = functions.size();
      for (int i = 0; i < size; ++i) {
        final int slice = i;
        IntegratedFlowFunction function = functions.get(i);

        Transformation transformation =
          function.interpretOrReplace(node, graph,
              new AssumptionMap() {
                public Assumption getAssumption(Object edge) {
                  CombinedAssumption combinedAssumption = assumptionMap.getAssumption((E) edge);
                  if (combinedAssumption == null) {
                    return null;
                  }
                  return combinedAssumption.get(slice);
                }

                public void setAssumption(Object edge, Assumption assumption) {
                  CombinedAssumption.CopyOnWrite newAssumption = newAssumptions.get(edge);
                  if (newAssumption == null) {
                    newAssumption = new CombinedAssumption.CopyOnWrite(assumptionMap.getAssumption((E) edge), size);
                    newAssumptions.put((E) edge, newAssumption);
                  }
                  newAssumption.set(slice, assumption);
                }

                @Override
                public String toString() {
                  return AssumptionUtil.toString(graph.getInEdges(node),
                      graph.getOutEdges(node), this);
                }
              });

        if (transformation != null) {
          return transformation;
        }
      }

      for (E e : newAssumptions.keySet()) {
        CombinedAssumption.CopyOnWrite newAssumption = newAssumptions.get(e);
        if (newAssumption.isCopied()) {
          assumptionMap.setAssumption(e, newAssumption.unwrap());
        }
      }

      return null;
    }
  }

  /**
   * Factory method.
   */
  public static <N, E, T, G extends Graph<N, E, T>>
  CombinedIntegratedAnalysis<N, E, T, G> createAnalysis() {
    return new CombinedIntegratedAnalysis<N, E, T, G>();
  }
  /**
   * Individual analyses.
   */
  List<IntegratedAnalysis<N, E, T, G, ?>> analyses =
    new ArrayList<IntegratedAnalysis<N, E, T, G, ?>>();

  /**
   * Their flow functions.
   */
  List<IntegratedFlowFunction<N, E, T, G, ?>> functions =
    new ArrayList<IntegratedFlowFunction<N, E, T, G, ?>>();

  /**
   * Adds analysis to the combined one.
   */
  public void addAnalysis(IntegratedAnalysis<N, E, T, G, ?> analysis) {
    analyses.add(analysis);
    functions.add(analysis.getIntegratedFlowFunction());
  }

  public IntegratedFlowFunction<N, E, T, G, CombinedAssumption>
  getIntegratedFlowFunction() {
    return new CombinedIntegratedFlowFunction();
  }

  @SuppressWarnings("unchecked")
  public void setInitialGraphAssumptions(G graph,
      final AssumptionMap<E, CombinedAssumption> assumptionMap) {
    for (int i = 0; i < functions.size(); ++i) {
      final int slice = i;
      IntegratedAnalysis<N, E, T, G, ?> analysis = analyses.get(slice);
      analysis.setInitialGraphAssumptions(graph, new AssumptionMap() {
        public Assumption getAssumption(Object edge) {
          throw new UnsupportedOperationException();
        }

        public void setAssumption(Object edge,Assumption assumption) {
          CombinedAssumption combinedAssumption = assumptionMap.getAssumption((E) edge);
          if (combinedAssumption == null) {
            combinedAssumption = new CombinedAssumption(functions.size());
            combinedAssumption.set(slice, assumption);
            assumptionMap.setAssumption((E) edge, combinedAssumption);
          } else {
            combinedAssumption.set(slice, assumption);
          }
        }
      });
    }
  }
}

redpajama_set_name: RedPajamaGithub


text:
package de.jooschy.chatfilter.utils.command;

import lombok.Data;
import lombok.RequiredArgsConstructor;
import org.bukkit.ChatColor;

import java.lang.reflect.Method;

@Data
@RequiredArgsConstructor
public class ChatCommandWrapper {

    private final String label;
    private final Method method;
    private final Object clazz;
    private final String permission;
    private final String help;
    private final String description;
    private ChatCommand command;

    ChatCommandWrapper(ChatCommand command, Method method, Object clazz) {
        this.label = command.name();
        this.method = method;
        this.clazz = clazz;
        this.permission = command.permission();
        this.help = command.help();
        this.description = command.description();

        this.command = command;
    }

    public boolean hasHelp() {
        return help.length() > 0;
    }

    public String getHelpScreenMessage() {

        StringBuilder builder = new StringBuilder();

        builder.append(ChatColor.DARK_AQUA).append(getHelp());

        if (this.description.length() > 0)
            builder.append(ChatColor.GRAY).append(" - ").append(getDescription());

       return builder.toString();
    }

}


text:
require 'spec_helper'

feature 'p3p header should be present' do
  scenario 'has a p3p policy header by default' do
    visit '/'

    expect(page.response_headers.keys).to include 'P3P'
  end
end


text:
class Monchant::Payment
	include Mongoid::Document
	embedded_in :container, polymorphic: true

	field :refunded_at, type: DateTime
	field :messages, type: Array, default: []
	field :paid_at, type: DateTime
	field :error, type: Boolean
	field :pending, type: Boolean
	field :pending_refund, type: Boolean

	def status
		messages.last.to_s
	end

	def paid?
		paid_at?
	end

	def mark_paid
		self.paid_at = Time.now
		self.pending = nil
		self.error = nil
		self.messages << "PAYMENT COMPLETED (#{self.paid_at})"
	end

	def mark_pending
		self.pending = true
		self.error = nil
		self.messages << "PAYMENT PENDING (#{Time.now})"
	end

	def refunded?
		refunded_at?
	end

	def mark_refunded
		self.refunded_at = Time.now
		self.pending_refund = nil
		self.error = nil
		self.messages <<  "REFUND COMPLETED (#{self.refunded_at})"
	end

end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Chapter10Example01
{
    //本实例演示使用方法、属性和字段
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Creating object myObj...");
            MyClass myObj = new MyClass("My Object");
            Console.WriteLine("Object created.");

            for (int i = -1; i <= 0; i++)
            {
                try
                {
                    Console.WriteLine("\nAttempting to assign {0} to myObj.Val...", i);
                    myObj.Val = i;
                    Console.WriteLine("Value {0} assigned to myObj.Val.", myObj.Val);
                }
                catch (Exception e)
                {
                    Console.WriteLine("Exception {0}thrown.", e.GetType().FullName);
                    Console.WriteLine("Message:\n\"{0}\"", e.Message);
                }
            }

            Console.WriteLine("\nOutputing myObj.ToString()...");
            Console.WriteLine(myObj.ToString());
            Console.WriteLine("myObj.ToString() output.");
            Console.ReadKey();
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Threading;
using Part2.Common;

namespace Part2.Implementation
{
    public class TimerMonitorWithException : DeviceMonitorBase<int,DateTime>
    {
        protected override void Initialize()
        {
            Console.WriteLine("Initializing");
        }
        protected override DateTime ReadData()
        {
            //Add some artificial delay
            Thread.Sleep(1000);

            //Throw an exception if the seconds part is equal to the supplied value
            if (DateTime.Now.Second == this.configData)
            {
                throw new Exception("Boom!");
            }

            //Just return the current time
            return DateTime.Now;

        }
        protected override void CleanUp()
        {
            Console.WriteLine("Cleaning up");
        }

        public override void Dispose()
        {
            Console.WriteLine("Disposing of this junk");
            base.Dispose();
        }
    }
}


text:
// Copyright 2012 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.collide.codemirror2;

import com.google.collide.client.util.PathUtil;
import com.google.common.base.Preconditions;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.TextResource;

/**
 * Wraps the CodeMirror2 syntax parser modes.
 *
 */
public class CodeMirror2 {

  /**
   * External parser javascript source.
   */
  public interface Resources extends ClientBundle {
    @Source("codemirror2_parsers.js")
    TextResource parser();

    @Source("codemirror2_base.js")
    TextResource base();
  }

  public static String getJs(Resources resources) {
    return resources.base().getText() + resources.parser().getText();
  }

  public static Parser getParser(PathUtil path) {
    SyntaxType type = SyntaxType.syntaxTypeByFilePath(path);
    CmParser parser = getParserForMime(type.getMimeType());
    Preconditions.checkNotNull(parser);
    parser.setType(type);

    // TODO: testing no smart indentation to see how it feels
    parser.setPreventSmartIndent(type != SyntaxType.PY);
    return parser;
  }

  private static native CmParser getParserForMime(String mime) /*-{
    conf = $wnd.CodeMirror.defaults;
    if (mime == "text/x-python") {
      conf["mode"] = {
        version : 2
      };
    }
    return $wnd.CodeMirror.getMode(conf, mime);
  }-*/;

  /**
   * Mode constant: JavaScript.
   */
  public static final String JAVASCRIPT = "javascript";

  /**
   * Mode constant: HTML.
   */
  public static final String HTML = "html";

  /**
   * Mode constant: CSS.
   */
  public static final String CSS = "css";
}


text:
// -----------------------------------------------------------------------
// <copyright file="ProfileViewModel.cs" company="Nodine Legal, LLC">
// Licensed to Nodine Legal, LLC under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  Nodine Legal, LLC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//  http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.
// </copyright>
// -----------------------------------------------------------------------

namespace OpenLawOffice.WebClient.ViewModels.Account
{
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel;

    public class ProfileViewModel
    {
        [DataType(DataType.Text)]
        [DisplayName("Contact Info.")]
        public int? ContactId { get; set; }

        [DataType(DataType.Text)]
        [DisplayName("External App. Key")]
        public string ExternalAppKey { get; set; }
    }
}


text:
// Copyright (c) 2014-2015 The Dash developers
// Copyright (c) 2015-2017 The BlocknetDX developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef SERVICENODEMAN_H
#define SERVICENODEMAN_H

#include "base58.h"
#include "key.h"
#include "main.h"
#include "servicenode.h"
#include "net.h"
#include "sync.h"
#include "util.h"

#define SERVICENODES_DUMP_SECONDS (15 * 60)
#define SERVICENODES_DSEG_SECONDS (3 * 60 * 60)

using namespace std;

class CServicenodeMan;

extern CServicenodeMan mnodeman;
void DumpServicenodes();

/** Access to the MN database (mncache.dat)
 */
class CServicenodeDB
{
private:
    boost::filesystem::path pathMN;
    std::string strMagicMessage;

public:
    enum ReadResult {
        Ok,
        FileError,
        HashReadError,
        IncorrectHash,
        IncorrectMagicMessage,
        IncorrectMagicNumber,
        IncorrectFormat
    };

    CServicenodeDB();
    bool Write(const CServicenodeMan& mnodemanToSave);
    ReadResult Read(CServicenodeMan& mnodemanToLoad, bool fDryRun = false);
};

class CServicenodeMan
{
private:
    // critical section to protect the inner data structures
    mutable CCriticalSection cs;

    // critical section to protect the inner data structures specifically on messaging
    mutable CCriticalSection cs_process_message;

    // map to hold all MNs
    std::vector<CServicenode> vServicenodes;
    // who's asked for the Servicenode list and the last time
    std::map<CNetAddr, int64_t> mAskedUsForServicenodeList;
    // who we asked for the Servicenode list and the last time
    std::map<CNetAddr, int64_t> mWeAskedForServicenodeList;
    // which Servicenodes we've asked for
    std::map<COutPoint, int64_t> mWeAskedForServicenodeListEntry;

public:
    // Keep track of all broadcasts I've seen
    map<uint256, CServicenodeBroadcast> mapSeenServicenodeBroadcast;
    // Keep track of all pings I've seen
    map<uint256, CServicenodePing> mapSeenServicenodePing;

    // keep track of dsq count to prevent servicenodes from gaming obfuscation queue
    int64_t nDsqCount;

    ADD_SERIALIZE_METHODS;

    template <typename Stream, typename Operation>
    inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
    {
        LOCK(cs);
        READWRITE(vServicenodes);
        READWRITE(mAskedUsForServicenodeList);
        READWRITE(mWeAskedForServicenodeList);
        READWRITE(mWeAskedForServicenodeListEntry);
        READWRITE(nDsqCount);

        READWRITE(mapSeenServicenodeBroadcast);
        READWRITE(mapSeenServicenodePing);
    }

    CServicenodeMan();
    CServicenodeMan(CServicenodeMan& other);

    /// Add an entry
    bool Add(CServicenode& mn);

    /// Ask (source) node for mnb
    void AskForMN(CNode* pnode, CTxIn& vin);

    /// Check all Servicenodes
    void Check();

    /// Check all Servicenodes and remove inactive
    void CheckAndRemove(bool forceExpiredRemoval = false);

    /// Clear Servicenode vector
    void Clear();

    int CountEnabled(int protocolVersion = -1);

    void DsegUpdate(CNode* pnode);

    /// Find an entry
    CServicenode* Find(const CScript& payee);
    CServicenode* Find(const CTxIn& vin);
    CServicenode* Find(const CPubKey& pubKeyServicenode);

    /// Find an entry in the servicenode list that is next to be paid
    CServicenode* GetNextServicenodeInQueueForPayment(int nBlockHeight, bool fFilterSigTime, int& nCount);

    /// Find a random entry
    CServicenode* FindRandomNotInVec(std::vector<CTxIn>& vecToExclude, int protocolVersion = -1);

    /// Get the current winner for this block
    CServicenode* GetCurrentServiceNode(int mod = 1, int64_t nBlockHeight = 0, int minProtocol = 0);

    std::vector<CServicenode> GetFullServicenodeVector()
    {
        Check();
        return vServicenodes;
    }

    std::vector<pair<int, CServicenode> > GetServicenodeRanks(int64_t nBlockHeight, int minProtocol = 0);
    int GetServicenodeRank(const CTxIn& vin, int64_t nBlockHeight, int minProtocol = 0, bool fOnlyActive = true);
    CServicenode* GetServicenodeByRank(int nRank, int64_t nBlockHeight, int minProtocol = 0, bool fOnlyActive = true);

    void ProcessServicenodeConnections();

    void ProcessMessage(CNode* pfrom, std::string& strCommand, CDataStream& vRecv);

    /// Return the number of (unique) Servicenodes
    int size() { return vServicenodes.size(); }

    std::string ToString() const;

    void Remove(CTxIn vin);

    /// Update servicenode list and maps using provided CServicenodeBroadcast
    void UpdateServicenodeList(CServicenodeBroadcast mnb);
};

#endif


text:
<TITLE>Review for Todo sobre mi madre (1999)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Todo sobre mi madre (1999)

reviewed by
Dennis Schwartz

ALL ABOUT MY MOTHER (TODO SOBRE MI MADRE) (director/writer: Pedro
Almodóvar; cinematographer: Affonso Beato; cast: Cecilia Roth (Manuela),
Marisa Paredes (Huma Rojo), Candel Pena (Nina), Antonia San Juan
(Agrado), Penelope Cruz (Sister Rosa), Rosa Maria Sarda (Rosa's mother),
Fernando Fernan Gomez (Rosa's father), Toni Canto (Lola), Eloy Azorin
(Esteban), 1999-Spain)

Reviewed by Dennis Schwartz

Cecilia Roth, the wonderful Argentinian-born actress, is the focal point
of the film and it is fair to say that her outstanding performance tries
to portray what the director wants to say about the nature of
motherhood. She plays Manuela, a 38-year-old nurse coordinator in a
transplant organ unit in a Madrid hospital. She is a single-parent with
a son Esteban (Eloy Azorín), who wants to be a writer and is about to
celebrate his 17th birthday. He is watching TV with her and the movie
"All About Eve" is on, which encourages him to write in his pad, "All
About My Mother."

The boy's favorite writer is Truman Capote. For his birthday present,
Manuela takes him to the theater to see Tennessee Williams' "A Streetcar
Named Desire." The enthusiastic youngster, always with a notebook near
him, always ready to jot down things in his journal, such as his wish to
know who his father is, is star-struck by the masterly performance of
the aging actress playing Blanche Dubois, Huma (Marides). He waits for
her in the rain by the stage door with his mother after the show to get
her autograph, and when she gets in a cab he chases after her but gets
fatally hit by a car. This is filmed from his eye-sight view of the
accident, so what the audience sees is what he saw.

His mother is asked to donate his organs by the same doctors she works
with, the ones who just completed a dry-run of what it is like for
family members to be asked to be organ donors. In this film there is
little difference between what is real and what is fake. After she
agrees to donate his organs, she decides to fulfill her son's wish to
find the boy's father and she goes back to Barcelona, where she came
from 18 years ago. She has lost all contact with the father while in
Madrid and will try to retrace her steps.

But, before she goes on the journey, she must see who received her son's
heart and is relieved to see it is a decent fellow, as she watches him
leave the hospital and overhears him from her hiding place gleefully
talking about having a young man's heart him in.

This is the 13th Pedro Almodóvar film I have seen, one that many critics
say shows the aging, enfant terrible director maturing, becoming kinder
and gentler, showing a capacity for making a film with more of a
conventional plot and being less interested in shocking his audience as
he once loved to do. But the shock is still there, enough of it to keep
it from becoming a mainstream film. The shock comes from the characters
Manuela will meet on her journey back to where she hung around with
prostitutes and transvestites. To visually show her path back and forth
from Barcelona to Madrid, there is a stunningly photographed tunnel
looking very much like a womb, with a train racing through it.

Though the film has a pungency to it, there are just too many scenes
where the wit seems forced and doesn't flow in the natural rhythm of the
story. The film is filled with many references and homages to other
Hollywood films and to writers, something that is both good and bad. It
is good because too many films are devoid of any intellectual
influences. Bad because the references are overused here, making the
director's gushy homages too syrupy for my taste buds.

In Barcelona, Manuela meets again her friend Agrado (Antonia San Juan- a
popular nightclub performer, who plays this role in an amusingly
unrestrained manner). He is a transvestite prostitute, working in an
outdoor area known as the Field, where the customers are riding around
in a circle to look the odd assortment of male and female prostitutes
over, a very Fellini-like scene. Symbolically, it indicates that
Manuela's life is going around in circles, she is back to where she
started as a prostitute. Agrado was an actor with her in an amateur
production of the Tennessee Williams's play; he was a man then but has
since had breast implants and a complete make over to look like a woman.
He is upset because his transvestite lover, who used to be called
Esteban but now is Lola (Canto), has just run away from him. Lola also
happens to be another actor in that amateur play 18 years ago that
Agrado and Manuela were in and the father of Manuela's child. But he
doesn't know that.

This is a story about many different things: its subplots could take you
into areas such as organ donors, AIDS, coincidences, family
relationships, family values, and the affects of pop culture on the
public (take note of that hilarious diaper commercial, an actual one
shown on Spanish TV); but, the film's main premises were about: praising
actresses, praising motherhood, praising sexual ambiguity, and praising
the kindness from strangers (tolerance of all people seems to be the
strongest message emanating from the film).

The mixed feelings I got about the film come from my not being sure if
this film is meant to be taken as a parody or a tragic soap opera. My
perception of all the supporting characters was of them being
problematic: the two transvestites; a pregnant nun with AIDS who
counsels needy prostitutes; Huma, as an actress, who is in a hopeless
lesbian relationship with another actress, the junky Nina (Pena); and,
all the while, this is a story about women as actresses and as mothers
and as sexually ambiguous figures. There were times I didn't know
whether I was supposed to laugh at all this or cry.

This film is melodramatic in the tradition of the Douglas Sirk nuclear
family romantic Rock Hudson and Dorothy Malone ones of the 1950s, but
with Almodóvar, it becomes even a weepier one, one that is mostly
outrageous, one whose family nature is more ambiguous and certainly not
nuclear. It is a film that is paradoxical: men can be actresses also. It
is one that has a character who takes the name Agrado, which means
agreeable and an actress, Huma, who is influenced by Bette Davis in "All
About Eve," whose chosen name means chain-smoker. Bette influenced her
totally, including her smoking habit.

The deftness of the cinematography and the array of colors displayed are
simply dazzling. This film could be enjoyed solely for its bright
orange, red and yellow patterns, giving the eye a startling light show
to feast on, as the camera is constantly moving from one thing of beauty
to another. It is a film made by someone who has the self-confidence to
know who he is (a beautiful gay man) and to realize that his film will
be different things to different people: to those searching for their
own identity, it could be seen how resilient the characters are who are
adding body parts to change their sexual orientation. For the ones
adjusting to the loss of the dearest one in their life, like Manuela,
after having given away the deceased's body parts, it could be a way of
accepting change. The characters in this film will find ways to adjust
to their situation, these are not characters who will fall apart and
have nervous breakdowns. It is worth noting, that there is no criticism
by the director for any of his characters, no matter how they screw
things up.

What Almodóvar wishes to express, is his adoration for all women. He
dedicated the film to actresses who played actresses: Bette Davis, Gena
Rowlands, and Romy Schneider. The problem with all this adulation is
that all the flattery has a hollow ring to it, it is just too good to be
true, and his characters are not completely believable because of this.

The film's strength lies in the emotions of the characters; their
close-ups revealing an inner strength in them, that no matter what
they've been through, they will stick together and not succumb to their
overwhelming problems. Agrado, after being battered by a psychopath,
gets dressed in her imitation pink Chanel dress and takes Manuela to
meet the attractive Sister Rosa (Penélope Cruz) in the prostitutes'
shelter. In return Agrado is consoled by the empathetic Manuela. A
pregnant nun in an Almodóvar film shouldn't be that surprising to his
fans, in fact what else should they expect! The father of Sister Rosa's
child, by coincidence, is Lola, the same father of Manuela's child. The
anguished Sister Rosa will come to live in the apartment that Manuela
rents and be nursed by the woman who is both a tower of strength and a
fragile grieving mother.

When the older and younger women form a warm relationship, Manuela is
introduced to Rosa's so-called normal but not-knowing-how-to-love
parents. She first meets her wealthy mother (Sarda), who makes fake
Chagalls. This is another of the director's themes, of how the ones who
are supposed to be normal and try so hard to convey that impression, are
really fakes, while the ones who are considered to be oddballs in
society, could be the normal ones, who are at least living out their
fantasies. Later on, Manuela will meet Rosa's father (Gomez), who might
have Alzheimer's, or maybe he just doesn't seem to remember who his
daughter is. The family dog is the one who remembers her. The hurt look
on Rosa's face after her father leaves, gives us a picture of her
thought process that is better than dialogue, it is one that is worth
savoring.

There is one scene when Agrado announces that the performance of
"Streetcar..." will be cancelled but for those who want to stay, she
will tell her life story. Of course, this clears most of the audience
out, with those few remaining being mostly the young and more daring
ones, the same audience that has sustained the director over the years.
She proceeds to tell how he got put together into a she and how much
each part cost, in a comic bit that seemed, at least it did to me, that
the director was trying to please his audience too much.Trying to
convince everyone remaining that they could be who they want to be, all
they have to do is pay the price for their dreams.

The actors were all splendid. I was particularly impressed by Marisa
Paredes' subtle but invigorating performance. The aging actress had a
certain air about her that invigorated every scene she was in, showing
how vulnerable and engaging an actress she is. Cecilia Roth was the glue
that held the film together. But when the spotlight was on Marisa, what
the director was trying to say about actresses' had a clarity about it
that didn't seem forced.

But still, what makes an Almodóvar film special, is his eye for visual
effects. I haven't seen a more stunning visual film all year (it is
comparable to Kubrick's "Eyes Wide Shut"). I was so dazzled by the
visuals, that the film's metaphors, bizarre tale, and great actors, seem
to take second place to the visual splendor of the film.

As good as this film is, one of the problems Almodóvar still has, is
that he can't make his outrageous characters distinguishable from
caricatures. Making them seem normal by comparing them to the normal
parents of Cruz', or those normal theater patrons walking out of that
childish Agrado discourse when they paid good money to see a play and
not him lecture them about how he paid his dues to be the girl he is, is
not really making them seem normal. This cloy act of his does not make
Agrado any more compelling. What the director shows best is his
unyielding love to all these strange characters, the social outcasts,
those who are looked down by society. He treats them as if he was the
mother, the one who loves them for what they are, who loves them as only
a mother can love her own. His wish seems to be that society would also
give them a chance to be loved.

One must give Almodóvar credit for getting his voice heard in the
mainstream while keeping his artististic integrity intact. That is not
an easy thing to do and the director has used the popular vehicle of
Hollywood melodrama to add his own sense of culture and literary
references to it, despite the differences I have with his approach to
the characters and their development. The film's story line is ludicrous
but the hurt the characters receive as perceived by them is real.
Almodóvar retains in this work an intriguing call for the bizarre, that
keeps the film from descending toward being a Hollywood one. But it also
never reaches great artistic heights. There are no breakthroughs in
character study. This is basically still a message film. A most amusing
and diverting portrayal of the sexually ambiguous, but not a great film.

The critical success of this film makes for strange bedfellows, when the
'chic' Cannes crowd hooted in disappointment that the film wasn't chosen
as the best one in the festival, but cheered when Almodóvar won for best
director, they now might be considered as part of the usual Almodóvar
fan base of weirdoes and independent-minded movie goers, a fan base that
seems to be growing to accomodate a different type of enthusiast, one
that is more establishment orientated.

REVIEWED ON 2/21/2000         GRADE: B+

Dennis Schwartz: "Ozus' World Movie Reviews"

http://www.sover.net/~ozus

ozus@sover.net

© ALL RIGHTS RESERVED   DENNIS SCHWARTZ

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
#include "opt_pcic.h"

#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/malloc.h>
#include <sys/select.h>
#include <sys/sysctl.h>
#include <sys/conf.h>
#include <sys/module.h>
#include <sys/uio.h>
#include <sys/poll.h>
#include <sys/bus.h>
#include <machine/bus.h>

#include <i386/isa/isa_device.h>
#include <i386/isa/icu.h>
#include <i386/isa/intr_machdep.h>

#include <pccard/cardinfo.h>
#include <pccard/driver.h>
#include <pccard/pcic.h>
#include <pccard/slot.h>
#include <pccard/pccard_nbk.h>

#include <machine/md_var.h>

/*
 * XXX We shouldn't be using processor-specific/bus-specific code in
 * here, but we need the start of the ISA hole (IOM_BEGIN).
 */
#ifdef PC98
#include <pc98/pc98/pc98.h>
#else
#include <i386/isa/isa.h>
#endif

SYSCTL_NODE(_machdep, OID_AUTO, pccard, CTLFLAG_RW, 0, "pccard");

static int pcic_resume_reset = 1;

SYSCTL_INT(_machdep_pccard, OID_AUTO, pcic_resume_reset, CTLFLAG_RW,
	&pcic_resume_reset, 0, "");

#define	PCCARD_MEMSIZE	(4*1024)

#define MIN(a,b)	((a)<(b)?(a):(b))

static int		allocate_driver(struct slot *, struct dev_desc *);
static void		inserted(void *);
static void		disable_slot(struct slot *);
static void		disable_slot_to(struct slot *);
static int		invalid_io_memory(unsigned long, int);
static void		power_off_slot(void *);

static struct slot	*pccard_slots[MAXSLOT];	/* slot entries */

/*
 *	The driver interface for read/write uses a block
 *	of memory in the ISA I/O memory space allocated via
 *	an ioctl setting.
 */
static unsigned long pccard_mem;	/* Physical memory */
static unsigned char *pccard_kmem;	/* Kernel virtual address */

static	d_open_t	crdopen;
static	d_close_t	crdclose;
static	d_read_t	crdread;
static	d_write_t	crdwrite;
static	d_ioctl_t	crdioctl;
static	d_poll_t	crdpoll;

#define CDEV_MAJOR 50
static struct cdevsw crd_cdevsw = {
	/* open */	crdopen,
	/* close */	crdclose,
	/* read */	crdread,
	/* write */	crdwrite,
	/* ioctl */	crdioctl,
	/* poll */	crdpoll,
	/* mmap */	nommap,
	/* strategy */	nostrategy,
	/* name */	"crd",
	/* maj */	CDEV_MAJOR,
	/* dump */	nodump,
	/* psize */	nopsize,
	/* flags */	0,
	/* bmaj */	-1
};

/*
 *	Power off the slot.
 *	(doing it immediately makes the removal of some cards unstable)
 */
static void
power_off_slot(void *arg)
{
	struct slot *slt = (struct slot *)arg;
	int s;

	/*
	 * The following will generate an interrupt.  So, to hold off
	 * the interrupt unitl after disable runs so that we can get rid
	 * rid of the interrupt before it becomes unsafe to touch the
	 * device.
	 */
	s = splhigh();
	/* Power off the slot. */
	slt->pwr_off_pending = 0;
	slt->ctrl->disable(slt);
	splx(s);
}

/*
 *	disable_slot - Disables the slot by removing
 *	the power and unmapping the I/O
 */
static void
disable_slot(struct slot *slt)
{
	/* XXX Need to store pccarddev in slt. */
	device_t pccarddev;
	device_t *kids;
	int nkids;
	int i;
	int ret;

	/*
	 * Note that a race condition is possible here; if a
	 * driver is accessing the device and it is removed, then
	 * all bets are off...
	 */
	pccarddev = devclass_get_device(pccard_devclass, slt->slotnum);
	device_get_children(pccarddev, &kids, &nkids);
	for (i = 0; i < nkids; i++) {
		if ((ret = device_delete_child(pccarddev, kids[i])) != 0)
			printf("pccard: delete of %s failed: %d\n",
				device_get_nameunit(kids[i]), ret);
 	}
	free(kids, M_TEMP);

	/* Power off the slot 1/2 second after removal of the card */
	slt->poff_ch = timeout(power_off_slot, (caddr_t)slt, hz / 2);
	slt->pwr_off_pending = 1;
}

static void
disable_slot_to(struct slot *slt)
{
	slt->state = empty;
	disable_slot(slt);
	printf("pccard: card removed, slot %d\n", slt->slotnum);
	pccard_remove_beep();
	selwakeup(&slt->selp);
}

/*
 *	pccard_alloc_slot - Called from controller probe
 *	routine, this function allocates a new PC-CARD slot
 *	and initialises the data structures using the data provided.
 *	It returns the allocated structure to the probe routine
 *	to allow the controller specific data to be initialised.
 */
struct slot *
pccard_alloc_slot(struct slot_ctrl *ctrl)
{
	struct slot *slt;
	int slotno;

	for (slotno = 0; slotno < MAXSLOT; slotno++)
		if (pccard_slots[slotno] == 0)
			break;
	if (slotno == MAXSLOT)
		return(0);

	MALLOC(slt, struct slot *, sizeof(*slt), M_DEVBUF, M_WAITOK);
	bzero(slt, sizeof(*slt));
	make_dev(&crd_cdevsw, slotno, 0, 0, 0600, "card%d", slotno);
	slt->ctrl = ctrl;
	slt->slotnum = slotno;
	pccard_slots[slotno] = slt;
	callout_handle_init(&slt->insert_ch);
	callout_handle_init(&slt->poff_ch);
	return(slt);
}

/*
 *	allocate_driver - Create a new device entry for this
 *	slot, and attach a driver to it.
 */
static int
allocate_driver(struct slot *slt, struct dev_desc *desc)
{
	struct pccard_devinfo *devi;
	device_t pccarddev;
	int err, irq = 0;
	device_t child;

	pccarddev = devclass_get_device(pccard_devclass, slt->slotnum);
	irq = ffs(desc->irqmask) - 1;
	MALLOC(devi, struct pccard_devinfo *, sizeof(*devi), M_DEVBUF, M_WAITOK);
	bzero(devi, sizeof(*devi));
	strcpy(devi->name, desc->name);
	/*
	 *	Create an entry for the device under this slot.
	 */
	devi->running = 1;
	devi->slt = slt;
	bcopy(desc->misc, devi->misc, sizeof(desc->misc));
	resource_list_init(&devi->resources);
	child = device_add_child(pccarddev, devi->name, desc->unit);
	device_set_flags(child, desc->flags);
	device_set_ivars(child, devi);
	err = bus_set_resource(child, SYS_RES_IOPORT, 0, desc->iobase,
	    desc->iosize);
	if (err)
		goto err;
	if (irq)
		err = bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1);
	if (err)
		goto err;
	if (desc->memsize) {
		err = bus_set_resource(child, SYS_RES_MEMORY, 0, desc->mem,
		    desc->memsize);
		if (err)
			goto err;
	}
	err = device_probe_and_attach(child);
	snprintf(desc->name, sizeof(desc->name), "%s",
		 device_get_nameunit(child));
err:
	if (err)
		device_delete_child(pccarddev, child);
	return (err);
}

/*
 *	card insert routine - Called from a timeout to debounce
 *	insertion events.
 */
static void
inserted(void *arg)
{
	struct slot *slt = arg;

	slt->state = filled;
	/*
	 *	Enable 5V to the card so that the CIS can be read.
	 */
	slt->pwr.vcc = 50;
	slt->pwr.vpp = 0;

	/*
	 * Disable any pending timeouts for this slot, and explicitly
	 * power it off right now.  Then, re-enable the power using
	 * the (possibly new) power settings.
	 */
	untimeout(power_off_slot, (caddr_t)slt, slt->poff_ch);
	power_off_slot(slt);
	slt->ctrl->power(slt);

	printf("pccard: card inserted, slot %d\n", slt->slotnum);
	/*
	 *	Now start resetting the card.
	 */
	slt->ctrl->reset(slt);
}

/*
 *	Card event callback. Called at splhigh to prevent
 *	device interrupts from interceding.
 */
void
pccard_event(struct slot *slt, enum card_event event)
{
	if (slt->insert_seq) {
		slt->insert_seq = 0;
		untimeout(inserted, (void *)slt, slt->insert_ch);
	}

	switch(event) {
	case card_removed:
		/*
		 *	The slot and devices are disabled, but the
		 *	data structures are not unlinked.
		 */
		if (slt->state == filled) {
			slt->state = empty;
			disable_slot_to(slt);
		}
		break;
	case card_inserted:
		slt->insert_seq = 1;
		slt->insert_ch = timeout(inserted, (void *)slt, hz/4);
		pccard_insert_beep();
		break;
	}
}

/*
 *	Device driver interface.
 */
static	int
crdopen(dev_t dev, int oflags, int devtype, struct proc *p)
{
	struct slot *slt;

	if (minor(dev) >= MAXSLOT)
		return(ENXIO);
	slt = pccard_slots[minor(dev)];
	if (slt == 0)
		return(ENXIO);
	if (slt->rwmem == 0)
		slt->rwmem = MDF_ATTR;
	return(0);
}

/*
 *	Close doesn't de-allocate any resources, since
 *	slots may be assigned to drivers already.
 */
static	int
crdclose(dev_t dev, int fflag, int devtype, struct proc *p)
{
	return(0);
}

/*
 *	read interface. Map memory at lseek offset,
 *	then transfer to user space.
 */
static	int
crdread(dev_t dev, struct uio *uio, int ioflag)
{
	struct slot *slt = pccard_slots[minor(dev)];
	struct mem_desc *mp, oldmap;
	unsigned char *p;
	unsigned int offs;
	int error = 0, win, count;

	if (slt == 0 || slt->state != filled)
		return(ENXIO);
	if (pccard_mem == 0)
		return(ENOMEM);
	for (win = 0; win < slt->ctrl->maxmem; win++)
		if ((slt->mem[win].flags & MDF_ACTIVE) == 0)
			break;
	if (win >= slt->ctrl->maxmem)
		return(EBUSY);
	mp = &slt->mem[win];
	oldmap = *mp;
	mp->flags = slt->rwmem|MDF_ACTIVE;
	while (uio->uio_resid && error == 0) {
		mp->card = uio->uio_offset;
		mp->size = PCCARD_MEMSIZE;
		mp->start = (caddr_t)(void *)(uintptr_t)pccard_mem;
		if ((error = slt->ctrl->mapmem(slt, win)) != 0)
			break;
		offs = (unsigned int)uio->uio_offset & (PCCARD_MEMSIZE - 1);
		p = pccard_kmem + offs;
		count = MIN(PCCARD_MEMSIZE - offs, uio->uio_resid);
		error = uiomove(p, count, uio);
	}
	/*
	 *	Restore original map.
	 */
	*mp = oldmap;
	slt->ctrl->mapmem(slt, win);

	return(error);
}

/*
 *	crdwrite - Write data to card memory.
 *	Handles wrap around so that only one memory
 *	window is used.
 */
static	int
crdwrite(dev_t dev, struct uio *uio, int ioflag)
{
	struct slot *slt = pccard_slots[minor(dev)];
	struct mem_desc *mp, oldmap;
	unsigned char *p;
	unsigned int offs;
	int error = 0, win, count;

	if (slt == 0 || slt->state != filled)
		return(ENXIO);
	if (pccard_mem == 0)
		return(ENOMEM);
	for (win = 0; win < slt->ctrl->maxmem; win++)
		if ((slt->mem[win].flags & MDF_ACTIVE) == 0)
			break;
	if (win >= slt->ctrl->maxmem)
		return(EBUSY);
	mp = &slt->mem[win];
	oldmap = *mp;
	mp->flags = slt->rwmem|MDF_ACTIVE;
	while (uio->uio_resid && error == 0) {
		mp->card = uio->uio_offset;
		mp->size = PCCARD_MEMSIZE;
		mp->start = (caddr_t)(void *)(uintptr_t)pccard_mem;
		if ((error = slt->ctrl->mapmem(slt, win)) != 0)
			break;
		offs = (unsigned int)uio->uio_offset & (PCCARD_MEMSIZE - 1);
		p = pccard_kmem + offs;
		count = MIN(PCCARD_MEMSIZE - offs, uio->uio_resid);
		error = uiomove(p, count, uio);
	}
	/*
	 *	Restore original map.
	 */
	*mp = oldmap;
	slt->ctrl->mapmem(slt, win);

	return(error);
}

/*
 *	ioctl calls - allows setting/getting of memory and I/O
 *	descriptors, and assignment of drivers.
 */
static	int
crdioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p)
{
	struct slot *slt = pccard_slots[minor(dev)];
	struct mem_desc *mp;
	struct io_desc *ip;
	int s, err;
	int	pwval;

	if (slt == 0 && cmd != PIOCRWMEM)
		return(ENXIO);
	switch(cmd) {
	default:
		if (slt->ctrl->ioctl)
			return(slt->ctrl->ioctl(slt, cmd, data));
		return(ENOTTY);
	/*
	 * Get slot state.
	 */
	case PIOCGSTATE:
		s = splhigh();
		((struct slotstate *)data)->state = slt->state;
		((struct slotstate *)data)->laststate = slt->laststate;
		slt->laststate = slt->state;
		splx(s);
		((struct slotstate *)data)->maxmem = slt->ctrl->maxmem;
		((struct slotstate *)data)->maxio = slt->ctrl->maxio;
		((struct slotstate *)data)->irqs = 0;
		break;
	/*
	 * Get memory context.
	 */
	case PIOCGMEM:
		s = ((struct mem_desc *)data)->window;
		if (s < 0 || s >= slt->ctrl->maxmem)
			return(EINVAL);
		mp = &slt->mem[s];
		((struct mem_desc *)data)->flags = mp->flags;
		((struct mem_desc *)data)->start = mp->start;
		((struct mem_desc *)data)->size = mp->size;
		((struct mem_desc *)data)->card = mp->card;
		break;
	/*
	 * Set memory context. If context already active, then unmap it.
	 * It is hard to see how the parameters can be checked.
	 * At the very least, we only allow root to set the context.
	 */
	case PIOCSMEM:
		if (suser(p))
			return(EPERM);
		if (slt->state != filled)
			return(ENXIO);
		s = ((struct mem_desc *)data)->window;
		if (s < 0 || s >= slt->ctrl->maxmem)
			return(EINVAL);
		slt->mem[s] = *((struct mem_desc *)data);
		return(slt->ctrl->mapmem(slt, s));
	/*
	 * Get I/O port context.
	 */
	case PIOCGIO:
		s = ((struct io_desc *)data)->window;
		if (s < 0 || s >= slt->ctrl->maxio)
			return(EINVAL);
		ip = &slt->io[s];
		((struct io_desc *)data)->flags = ip->flags;
		((struct io_desc *)data)->start = ip->start;
		((struct io_desc *)data)->size = ip->size;
		break;
	/*
	 * Set I/O port context.
	 */
	case PIOCSIO:
		if (suser(p))
			return(EPERM);
		if (slt->state != filled)
			return(ENXIO);
		s = ((struct io_desc *)data)->window;
		if (s < 0 || s >= slt->ctrl->maxio)
			return(EINVAL);
		slt->io[s] = *((struct io_desc *)data);
		/* XXX Don't actually map */
		return 0;
		break;
	/*
	 * Set memory window flags for read/write interface.
	 */
	case PIOCRWFLAG:
		slt->rwmem = *(int *)data;
		break;
	/*
	 * Set the memory window to be used for the read/write interface.
	 */
	case PIOCRWMEM:
		if (*(unsigned long *)data == 0) {
			if (pccard_mem)
				*(unsigned long *)data = pccard_mem;
			break;
		}
		if (suser(p))
			return(EPERM);
		/*
		 * Validate the memory by checking it against the I/O
		 * memory range. It must also start on an aligned block size.
		 */
		if (invalid_io_memory(*(unsigned long *)data, PCCARD_MEMSIZE))
			return(EINVAL);
		if (*(unsigned long *)data & (PCCARD_MEMSIZE-1))
			return(EINVAL);
		/*
		 *	Map it to kernel VM.
		 */
		pccard_mem = *(unsigned long *)data;
		pccard_kmem =
		    (unsigned char *)(void *)(uintptr_t)
		    (pccard_mem + atdevbase - IOM_BEGIN);
		break;
	/*
	 * Set power values.
	 */
	case PIOCSPOW:
		slt->pwr = *(struct power *)data;
		return(slt->ctrl->power(slt));
	/*
	 * Allocate a driver to this slot.
	 */
	case PIOCSDRV:
		if (suser(p))
			return(EPERM);
		err = allocate_driver(slt, (struct dev_desc *)data);
		if (!err)
			pccard_success_beep();
		else
			pccard_failure_beep();
		return err;
	/*
	 * Virtual removal/insertion
	 */
	case PIOCSVIR:
		pwval = *(int *)data;
		if (!pwval) {
			if (slt->state != filled)
				return EINVAL;
		} else {
			if (slt->state != empty)
				return EINVAL;
		}
		pccard_event(slt, pwval == 0 ? card_removed : card_inserted);
		break;
	case PIOCSBEEP:
		if (pccard_beep_select(*(int *)data)) {
			return EINVAL;
		}
		break;
	}
	return(0);
}

/*
 *	poll - Poll on exceptions will return true
 *	when a change in card status occurs.
 */
static	int
crdpoll(dev_t dev, int events, struct proc *p)
{
	int s;
	struct slot *slt = pccard_slots[minor(dev)];
	int revents = 0;

	if (events & (POLLIN | POLLRDNORM))
		revents |= events & (POLLIN | POLLRDNORM);

	if (events & (POLLOUT | POLLWRNORM))
		revents |= events & (POLLIN | POLLRDNORM);

	s = splhigh();
	/*
	 *	select for exception - card event.
	 */
	if (events & POLLRDBAND)
		if (slt == 0 || slt->laststate != slt->state)
			revents |= POLLRDBAND;

	if (revents == 0)
		selrecord(p, &slt->selp);

	splx(s);
	return (revents);
}

/*
 *	invalid_io_memory - verify that the ISA I/O memory block
 *	is a valid and unallocated address.
 *	A simple check of the range is done, and then a
 *	search of the current devices is done to check for
 *	overlapping regions.
 */
static int
invalid_io_memory(unsigned long adr, int size)
{
	/* XXX - What's magic about 0xC0000?? */
	if (adr < 0xC0000 || (adr+size) > IOM_END)
		return(1);
	return(0);
}

static struct slot *
pccard_dev2slot(device_t dev)
{
	return pccard_slots[device_get_unit(dev)];
}

/*
 *	APM hooks for suspending and resuming.
 */
int
pccard_suspend(device_t dev)
{
	struct slot *slt = pccard_dev2slot(dev);

	/* This code stolen from pccard_event:card_removed */
	if (slt->state == filled) {
		int s = splhigh();
		disable_slot(slt);
		slt->laststate = filled;
		slt->state = suspend;
		splx(s);
		printf("pccard: card disabled, slot %d\n", slt->slotnum);
	}
	/*
	 * Disable any pending timeouts for this slot since we're
	 * powering it down/disabling now.
	 */
	untimeout(power_off_slot, (caddr_t)slt, slt->poff_ch);
	slt->ctrl->disable(slt);
	return (0);
}

int
pccard_resume(device_t dev)
{
	struct slot *slt = pccard_dev2slot(dev);

	if (pcic_resume_reset)
		slt->ctrl->resume(slt);
	/* This code stolen from pccard_event:card_inserted */
	if (slt->state == suspend) {
		slt->laststate = suspend;
		slt->state = empty;
		slt->insert_seq = 1;
		untimeout(inserted, (void *)slt, slt->insert_ch);
		inserted((void *) slt);
		selwakeup(&slt->selp);
	}
	return (0);
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace NuGetPe
{
    public class PhysicalFileSystem : IFileSystem
    {
        private readonly string _root;

        public PhysicalFileSystem(string root)
        {
            if (String.IsNullOrEmpty(root))
            {
                throw new ArgumentException("Argument cannot be null or empty.", "root");
            }
            _root = root;
        }

        #region IFileSystem Members

        public string Root
        {
            get { return _root; }
        }

        public virtual string GetFullPath(string path)
        {
            return Path.Combine(Root, path);
        }

        public virtual void AddFile(string path, Stream stream)
        {
            EnsureDirectory(Path.GetDirectoryName(path));

            using (Stream outputStream = File.Create(GetFullPath(path)))
            {
                stream.CopyTo(outputStream);
            }
        }

        public virtual void DeleteFile(string path)
        {
            if (!FileExists(path))
            {
                return;
            }

            try
            {
                path = GetFullPath(path);
                File.Delete(path);
            }
            catch (FileNotFoundException)
            {
            }
        }

        public virtual void DeleteDirectory(string path, bool recursive)
        {
            if (!DirectoryExists(path))
            {
                return;
            }

            try
            {
                path = GetFullPath(path);
                Directory.Delete(path, recursive);
            }
            catch (DirectoryNotFoundException)
            {
            }
        }

        public virtual IEnumerable<string> GetFiles(string path)
        {
            return GetFiles(path, "*.*");
        }

        public virtual IEnumerable<string> GetFiles(string path, string filter)
        {
            path = EnsureTrailingSlash(GetFullPath(path));
            try
            {
                if (!Directory.Exists(path))
                {
                    return Enumerable.Empty<string>();
                }
                return Directory.EnumerateFiles(path, filter)
                    .Select(MakeRelativePath);
            }
            catch (UnauthorizedAccessException)
            {
            }
            catch (DirectoryNotFoundException)
            {
            }

            return Enumerable.Empty<string>();
        }

        public virtual IEnumerable<string> GetDirectories(string path)
        {
            try
            {
                path = EnsureTrailingSlash(GetFullPath(path));
                if (!Directory.Exists(path))
                {
                    return Enumerable.Empty<string>();
                }
                return Directory.EnumerateDirectories(path)
                    .Select(MakeRelativePath);
            }
            catch (UnauthorizedAccessException)
            {
            }
            catch (DirectoryNotFoundException)
            {
            }

            return Enumerable.Empty<string>();
        }

        public virtual DateTimeOffset GetLastModified(string path)
        {
            if (DirectoryExists(path))
            {
                return new DirectoryInfo(GetFullPath(path)).LastWriteTimeUtc;
            }
            return new FileInfo(GetFullPath(path)).LastWriteTimeUtc;
        }

        public DateTimeOffset GetCreated(string path)
        {
            if (DirectoryExists(path))
            {
                return Directory.GetCreationTimeUtc(GetFullPath(path));
            }
            return File.GetCreationTimeUtc(GetFullPath(path));
        }

        public virtual bool FileExists(string path)
        {
            path = GetFullPath(path);
            return File.Exists(path);
        }

        public virtual bool DirectoryExists(string path)
        {
            path = GetFullPath(path);
            return Directory.Exists(path);
        }

        public virtual Stream OpenFile(string path)
        {
            path = GetFullPath(path);
            return File.OpenRead(path);
        }

        #endregion

        public virtual void DeleteDirectory(string path)
        {
            DeleteDirectory(path, recursive: false);
        }

        protected string MakeRelativePath(string fullPath)
        {
            return fullPath.Substring(Root.Length).TrimStart(Path.DirectorySeparatorChar);
        }

        protected virtual void EnsureDirectory(string path)
        {
            path = GetFullPath(path);
            Directory.CreateDirectory(path);
        }

        private static string EnsureTrailingSlash(string path)
        {
            if (!path.EndsWith("\\", StringComparison.Ordinal))
            {
                path += "\\";
            }
            return path;
        }
    }
}


text:
Loop with callbacks but don't RangeError

[![travis](https://travis-ci.org/dominictarr/looper.png?branch=master)
](https://travis-ci.org/dominictarr/looper)

[![testling](http://ci.testling.com/dominictarr/looper.png)
](http://ci.testling.com/dominictarr/looper)

## Synopsis

Normally, if `mightBeAsync` calls it's cb immediately
this would `RangeError`:

``` js
var l = 100000
;(function next () {
  if(--l) mightBeAsync(next)
})
```

`looper` detects that case, and falls back to a `while` loop,

## Example

``` js
var loop = require('looper')

var l = 100000
loop(function () {
  var next = this
  if(--l) probablySync(next)
})()
```

when you want to stop looping, don't call `next`.
`looper` checks if each callback is sync or not,
so you can even mix sync and async calls!

## License

MIT


text:
@implementation NSString (BJCFVersion)

-(NSComparisonResult)BJCF_compareToVersion:(NSString *)version{
    NSComparisonResult result;

    result = NSOrderedSame;

    if(![self isEqualToString:version]){
        NSArray *thisVersion = [self componentsSeparatedByString:@"."];
        NSArray *compareVersion = [version componentsSeparatedByString:@"."];

        for(NSInteger index = 0; index < MAX([thisVersion count], [compareVersion count]); index++){
            NSInteger thisSegment = (index < [thisVersion count]) ? [[thisVersion objectAtIndex:index] integerValue] : 0;
            NSInteger compareSegment = (index < [compareVersion count]) ? [[compareVersion objectAtIndex:index] integerValue] : 0;

            if(thisSegment < compareSegment){
                result = NSOrderedAscending;
                break;
            }

            if(thisSegment > compareSegment){
                result = NSOrderedDescending;
                break;
            }
        }
    }

    return result;
}

-(BOOL)BJCF_isOlderThanVersion:(NSString *)version{
    return ([self BJCF_compareToVersion:version] == NSOrderedAscending);
}

-(BOOL)BJCF_isNewerThanVersion:(NSString *)version{
    return ([self BJCF_compareToVersion:version] == NSOrderedDescending);
}

-(BOOL)BJCF_isEqualToVersion:(NSString *)version{
    return ([self BJCF_compareToVersion:version] == NSOrderedSame);
}

-(BOOL)BJCF_isEqualOrOlderThanVersion:(NSString *)version{
    return ([self BJCF_compareToVersion:version] != NSOrderedDescending);
}

-(BOOL)BJCF_isEqualOrNewerThanVersion:(NSString *)version{
    return ([self BJCF_compareToVersion:version] != NSOrderedAscending);
}

@end