text:
package org.onosproject.lisp.msg.protocols;

import com.google.common.base.Objects;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import io.netty.buffer.ByteBuf;
import org.onlab.util.ByteOperator;
import org.onosproject.lisp.msg.protocols.LispEidRecord.EidRecordReader;
import org.onosproject.lisp.msg.types.LispAfiAddress;
import org.onosproject.lisp.msg.exceptions.LispParseError;
import org.onosproject.lisp.msg.exceptions.LispReaderException;
import org.onosproject.lisp.msg.exceptions.LispWriterException;
import org.onosproject.lisp.msg.types.LispAfiAddress.AfiAddressReader;
import org.onosproject.lisp.msg.types.LispAfiAddress.AfiAddressWriter;

import java.util.List;

import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Preconditions.checkArgument;
import static org.onosproject.lisp.msg.protocols.LispEidRecord.EidRecordWriter;

/**
 * Default LISP map request message class.
 */
public final class DefaultLispMapRequest extends AbstractLispMessage
        implements LispMapRequest {

    private final long nonce;
    private final LispAfiAddress sourceEid;
    private final List<LispAfiAddress> itrRlocs;
    private final List<LispEidRecord> eidRecords;
    private final boolean authoritative;
    private final boolean mapDataPresent;
    private final boolean probe;
    private final boolean smr;
    private final boolean pitr;
    private final boolean smrInvoked;
    private final int replyRecord;

    static final RequestWriter WRITER;
    static {
        WRITER = new RequestWriter();
    }

    /**
     * A private constructor that protects object instantiation from external.
     *
     * @param nonce          nonce
     * @param sourceEid      source EID address
     * @param itrRlocs       a collection of ITR RLOCs
     * @param eidRecords     a collection of EID records
     * @param authoritative  authoritative flag
     * @param mapDataPresent map data present flag
     * @param probe          probe flag
     * @param smr            smr flag
     * @param pitr           pitr flag
     * @param smrInvoked     smrInvoked flag
     * @param replyReocrd    size of map-reply record
     */
    private DefaultLispMapRequest(long nonce, LispAfiAddress sourceEid,
                                  List<LispAfiAddress> itrRlocs,
                                  List<LispEidRecord> eidRecords,
                                  boolean authoritative, boolean mapDataPresent,
                                  boolean probe, boolean smr, boolean pitr,
                                  boolean smrInvoked, int replyReocrd) {
        this.nonce = nonce;
        this.sourceEid = sourceEid;
        this.itrRlocs = itrRlocs;
        this.eidRecords = eidRecords;
        this.authoritative = authoritative;
        this.mapDataPresent = mapDataPresent;
        this.probe = probe;
        this.smr = smr;
        this.pitr = pitr;
        this.smrInvoked = smrInvoked;
        this.replyRecord = replyReocrd;
    }

    @Override
    public LispType getType() {
        return LispType.LISP_MAP_REQUEST;
    }

    @Override
    public void writeTo(ByteBuf byteBuf) throws LispWriterException {
        WRITER.writeTo(byteBuf, this);
    }

    @Override
    public Builder createBuilder() {
        return new DefaultRequestBuilder();
    }

    @Override
    public boolean isAuthoritative() {
        return authoritative;
    }

    @Override
    public boolean isMapDataPresent() {
        return mapDataPresent;
    }

    @Override
    public boolean isProbe() {
        return probe;
    }

    @Override
    public boolean isSmr() {
        return smr;
    }

    @Override
    public boolean isPitr() {
        return pitr;
    }

    @Override
    public boolean isSmrInvoked() {
        return smrInvoked;
    }

    @Override
    public int getRecordCount() {
        return eidRecords.size();
    }

    @Override
    public long getNonce() {
        return nonce;
    }

    @Override
    public LispAfiAddress getSourceEid() {
        return sourceEid;
    }

    @Override
    public List<LispAfiAddress> getItrRlocs() {
        return ImmutableList.copyOf(itrRlocs);
    }

    @Override
    public List<LispEidRecord> getEids() {
        return ImmutableList.copyOf(eidRecords);
    }

    @Override
    public int getReplyRecord() {
        return replyRecord;
    }

    @Override
    public String toString() {
        return toStringHelper(this)
                .add("type", getType())
                .add("nonce", nonce)
                .add("source EID", sourceEid)
                .add("ITR rlocs", itrRlocs)
                .add("EID records", eidRecords)
                .add("authoritative", authoritative)
                .add("mapDataPresent", mapDataPresent)
                .add("probe", probe)
                .add("SMR", smr)
                .add("Proxy ITR", pitr)
                .add("SMR Invoked", smrInvoked)
                .add("Size of reply record", replyRecord).toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DefaultLispMapRequest that = (DefaultLispMapRequest) o;
        return Objects.equal(nonce, that.nonce) &&
                Objects.equal(sourceEid, that.sourceEid) &&
                Objects.equal(authoritative, that.authoritative) &&
                Objects.equal(mapDataPresent, that.mapDataPresent) &&
                Objects.equal(probe, that.probe) &&
                Objects.equal(smr, that.smr) &&
                Objects.equal(pitr, that.pitr) &&
                Objects.equal(smrInvoked, that.smrInvoked) &&
                Objects.equal(replyRecord, that.replyRecord);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(nonce, sourceEid, authoritative,
                mapDataPresent, probe, smr, pitr, smrInvoked, replyRecord);
    }

    public static final class DefaultRequestBuilder implements RequestBuilder {

        private long nonce;
        private LispAfiAddress sourceEid;
        private List<LispAfiAddress> itrRlocs = Lists.newArrayList();
        private List<LispEidRecord> eidRecords = Lists.newArrayList();
        private boolean authoritative;
        private boolean mapDataPresent;
        private boolean probe;
        private boolean smr;
        private boolean pitr;
        private boolean smrInvoked;
        private int replyRecord;

        @Override
        public LispType getType() {
            return LispType.LISP_MAP_REQUEST;
        }

        @Override
        public RequestBuilder withIsAuthoritative(boolean authoritative) {
            this.authoritative = authoritative;
            return this;
        }

        @Override
        public RequestBuilder withIsProbe(boolean probe) {
            this.probe = probe;
            return this;
        }

        @Override
        public RequestBuilder withIsMapDataPresent(boolean mapDataPresent) {
            this.mapDataPresent = mapDataPresent;
            return this;
        }

        @Override
        public RequestBuilder withIsSmr(boolean smr) {
            this.smr = smr;
            return this;
        }

        @Override
        public RequestBuilder withIsPitr(boolean pitr) {
            this.pitr = pitr;
            return this;
        }

        @Override
        public RequestBuilder withIsSmrInvoked(boolean smrInvoked) {
            this.smrInvoked = smrInvoked;
            return this;
        }

        @Override
        public RequestBuilder withNonce(long nonce) {
            this.nonce = nonce;
            return this;
        }

        @Override
        public RequestBuilder withSourceEid(LispAfiAddress sourceEid) {
            this.sourceEid = sourceEid;
            return this;
        }

        @Override
        public RequestBuilder withItrRlocs(List<LispAfiAddress> itrRlocs) {
            if (itrRlocs != null) {
                this.itrRlocs = ImmutableList.copyOf(itrRlocs);
            }
            return this;
        }

        @Override
        public RequestBuilder withEidRecords(List<LispEidRecord> records) {
            if (records != null) {
                this.eidRecords = ImmutableList.copyOf(records);
            }
            return this;
        }

        @Override
        public RequestBuilder withReplyRecord(int replyRecord) {
            this.replyRecord = replyRecord;
            return this;
        }

        @Override
        public LispMapRequest build() {

            checkArgument((itrRlocs != null) && (itrRlocs.size() > 0), "Must have an ITR RLOC entry");

            return new DefaultLispMapRequest(nonce, sourceEid, itrRlocs, eidRecords,
                    authoritative, mapDataPresent, probe, smr, pitr, smrInvoked, replyRecord);
        }
    }

    /**
     * A LISP message reader for MapRequest message.
     */
    public static final class RequestReader implements LispMessageReader<LispMapRequest> {

        private static final int AUTHORITATIVE_INDEX = 3;
        private static final int MAP_DATA_PRESENT_INDEX = 2;
        private static final int PROBE_INDEX = 1;
        private static final int SMR_INDEX = 0;
        private static final int PITR_INDEX = 7;
        private static final int SMR_INVOKED_INDEX = 6;

        @Override
        public LispMapRequest readFrom(ByteBuf byteBuf) throws LispParseError, LispReaderException {

            if (byteBuf.readerIndex() != 0) {
                return null;
            }

            byte typeWithFlags = byteBuf.readByte();

            // authoritative -> 1 bit
            boolean authoritative = ByteOperator.getBit(typeWithFlags, AUTHORITATIVE_INDEX);

            // mapDataPresent -> 1 bit
            boolean mapDataPresent = ByteOperator.getBit(typeWithFlags, MAP_DATA_PRESENT_INDEX);

            // probe -> 1 bit
            boolean probe = ByteOperator.getBit(typeWithFlags, PROBE_INDEX);

            // smr -> 1 bit
            boolean smr = ByteOperator.getBit(typeWithFlags, SMR_INDEX);

            byte reservedWithFlags = byteBuf.readByte();

            // pitr -> 1 bit
            boolean pitr = ByteOperator.getBit(reservedWithFlags, PITR_INDEX);

            // smrInvoked -> 1 bit
            boolean smrInvoked = ByteOperator.getBit(reservedWithFlags, SMR_INVOKED_INDEX);

            // let's skip reserved field, only obtains ITR counter value
            // assume that first 3 bits are all set as 0,
            // remain 5 bits represent Itr Rloc Counter (IRC)
            int irc = byteBuf.readUnsignedByte();

            // record count -> 8 bits
            int recordCount = byteBuf.readUnsignedByte();

            // nonce -> 64 bits
            long nonce = byteBuf.readLong();

            LispAfiAddress sourceEid = new AfiAddressReader().readFrom(byteBuf);

            // deserialize a collection of RLOC addresses
            List<LispAfiAddress> itrRlocs = Lists.newArrayList();
            for (int i = 0; i < irc + 1; i++) {
                itrRlocs.add(new AfiAddressReader().readFrom(byteBuf));
            }

            // deserialize a collection of EID records
            List<LispEidRecord> eidRecords = Lists.newArrayList();
            for (int i = 0; i < recordCount; i++) {
                eidRecords.add(new EidRecordReader().readFrom(byteBuf));
            }

            // reply record -> 32 bits
            int replyRecord = byteBuf.readInt();

            return new DefaultRequestBuilder()
                        .withIsAuthoritative(authoritative)
                        .withIsMapDataPresent(mapDataPresent)
                        .withIsProbe(probe)
                        .withIsSmr(smr)
                        .withIsPitr(pitr)
                        .withIsSmrInvoked(smrInvoked)
                        .withNonce(nonce)
                        .withSourceEid(sourceEid)
                        .withEidRecords(eidRecords)
                        .withItrRlocs(itrRlocs)
                        .withReplyRecord(replyRecord)
                        .build();
        }
    }

    /**
     * A LISP message writer for MapRequest message.
     */
    public static final class RequestWriter implements LispMessageWriter<LispMapRequest> {

        private static final int REQUEST_SHIFT_BIT = 4;

        private static final int AUTHORITATIVE_SHIFT_BIT = 3;
        private static final int MAP_DATA_PRESENT_SHIFT_BIT = 2;
        private static final int PROBE_SHIFT_BIT = 1;

        private static final int PITR_SHIFT_BIT = 7;
        private static final int SMR_INVOKED_SHIFT_BIT = 6;

        private static final int ENABLE_BIT = 1;
        private static final int DISABLE_BIT = 0;

        @Override
        public void writeTo(ByteBuf byteBuf, LispMapRequest message) throws LispWriterException {

            // specify LISP message type
            byte msgType = (byte) (LispType.LISP_MAP_REQUEST.getTypeCode() << REQUEST_SHIFT_BIT);

            // authoritative flag
            byte authoritative = DISABLE_BIT;
            if (message.isAuthoritative()) {
                authoritative = (byte) (ENABLE_BIT << AUTHORITATIVE_SHIFT_BIT);
            }

            // map data present flag
            byte mapDataPresent = DISABLE_BIT;
            if (message.isMapDataPresent()) {
                mapDataPresent = (byte) (ENABLE_BIT << MAP_DATA_PRESENT_SHIFT_BIT);
            }

            // probe flag
            byte probe = DISABLE_BIT;
            if (message.isProbe()) {
                probe = (byte) (ENABLE_BIT << PROBE_SHIFT_BIT);
            }

            // SMR flag
            byte smr = DISABLE_BIT;
            if (message.isSmr()) {
                smr = (byte) ENABLE_BIT;
            }

            byteBuf.writeByte((byte) (msgType + authoritative + mapDataPresent + probe + smr));

            // PITR flag bit
            byte pitr = DISABLE_BIT;
            if (message.isPitr()) {
                pitr = (byte) (ENABLE_BIT << PITR_SHIFT_BIT);
            }

            // SMR invoked flag bit
            byte smrInvoked = DISABLE_BIT;
            if (message.isSmrInvoked()) {
                smrInvoked = (byte) (ENABLE_BIT << SMR_INVOKED_SHIFT_BIT);
            }

            byteBuf.writeByte((byte) (pitr + smrInvoked));

            // ITR Rloc count
            byteBuf.writeByte((byte) message.getItrRlocs().size() - 1);

            // record count
            byteBuf.writeByte(message.getEids().size());

            // nonce
            byteBuf.writeLong(message.getNonce());

            // Source EID AFI with Source EID address
            AfiAddressWriter afiAddressWriter = new AfiAddressWriter();
            afiAddressWriter.writeTo(byteBuf, message.getSourceEid());

            // ITR RLOCs
            List<LispAfiAddress> rlocs = message.getItrRlocs();
            for (int i = 0; i < rlocs.size(); i++) {
                afiAddressWriter.writeTo(byteBuf, rlocs.get(i));
            }

            // EID records
            EidRecordWriter recordWriter = new EidRecordWriter();
            List<LispEidRecord> records = message.getEids();

            for (int i = 0; i < records.size(); i++) {
                recordWriter.writeTo(byteBuf, records.get(i));
            }

            // reply record
            byteBuf.writeInt(message.getReplyRecord());
        }
    }
}


text:
Tsibog is first and foremost a platform we can use as a community for improving our Ruby practice.

Here are several ways we can work on it:

* Study how to build a Ruby app with a CLI using Thor (guide: https://github.com/radar/guides/blob/master/gem-development.md)

* Study BDD for command-line apps using Aruba (see https://rubygems.org/gems/aruba)

* Put this into a stand-alone gem. This is a perfect playground for studying how to encapsulate business logic into a gem. (guide: https://github.com/radar/guides/blob/master/gem-development.md)

* Study how to encapsulate different content downloads using different classes (guides: http://www.sandimetz.com/blog/2014/9/9/shape-at-the-bottom-of-all-things, http://poodr.com)

* Create a RubyMotion template app and integrate tsibog into that template

* Integrate tsibog into a Rails application

redpajama_set_name: RedPajamaGithub


text:
"use strict";

//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------

module.exports = function(context) {

    //--------------------------------------------------------------------------
    // Helpers
    //--------------------------------------------------------------------------

    /**
     * Checks if a node has a constant truthiness value.
     * @param {ASTNode} node The AST node to check.
     * @returns {Bool} true when node's truthiness is constant
     * @private
     */
    function isConstant(node) {
        switch (node.type) {
            case "Literal":
            case "ArrowFunctionExpression":
            case "FunctionExpression":
            case "ObjectExpression":
            case "ArrayExpression":
                return true;
            case "UnaryExpression":
                return isConstant(node.argument);
            case "BinaryExpression":
            case "LogicalExpression":
                return isConstant(node.left) && isConstant(node.right) && node.operator !== "in";
            case "AssignmentExpression":
                return (node.operator === "=") && isConstant(node.right);
            case "SequenceExpression":
                return isConstant(node.expressions[node.expressions.length - 1]);
            // no default
        }
        return false;
    }

    /**
     * Reports when the given node contains a constant condition.
     * @param {ASTNode} node The AST node to check.
     * @returns {void}
     * @private
     */
    function checkConstantCondition(node) {
        /*
            PATCH

            Allow `while (true)`
        */
        if (node.type === "WhileStatement" &&
            node.test &&
            node.test.type === "Literal" &&
            node.test.value === true)
            return;

        if (node.test && isConstant(node.test)) {
            context.report(node, "Unexpected constant condition.");
        }
    }

    //--------------------------------------------------------------------------
    // Public
    //--------------------------------------------------------------------------

    return {
        "ConditionalExpression": checkConstantCondition,
        "IfStatement": checkConstantCondition,
        "WhileStatement": checkConstantCondition,
        "DoWhileStatement": checkConstantCondition,
        "ForStatement": checkConstantCondition
    };

};

module.exports.schema = [];


text:
<?php
declare(strict_types=1);
namespace Ivory\Value;

use Ivory\Value\Alg\IDiscreteStepper;

/**
 * Representation of a date according to the
 * {@link https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar proleptic} Gregorian calendar.
 *
 * As in PostgreSQL, there are two special dates, `-infinity` and `infinity`, representing a date respectively before or
 * after any other date. There are special factory methods {@link Date::minusInfinity()} and {@link Date::infinity()}
 * for getting these values.
 *
 * Besides being {@link IEqualable}, the {@link Date} objects may safely be compared using the `<`, `==`, and `>`
 * operators with the expected results.
 *
 * All the operations work correctly beyond the UNIX timestamp range bounded by 32bit integers, i.e., it is no problem
 * calculating with year 12345, for example.
 *
 * Note the date value is immutable, i.e., once constructed, its value cannot be changed.
 *
 * @see https://www.postgresql.org/docs/11/datetime-units-history.html
 */
class Date extends DateBase implements IDiscreteStepper
{
    /**
     * @return Date date representing the current day
     */
    public static function today(): Date
    {
        $tz = self::getUTCTimeZone();
        try {
            $datetime = new \DateTimeImmutable('today', $tz);
        } catch (\Exception $e) {
            throw new \LogicException('Date/time error', 0, $e);
        }
        return new Date(0, $datetime);
    }

    /**
     * @return Date date representing the next day
     */
    public static function tomorrow(): Date
    {
        $tz = self::getUTCTimeZone();
        try {
            $datetime = new \DateTimeImmutable('tomorrow', $tz);
        } catch (\Exception $e) {
            throw new \LogicException('Date/time error', 0, $e);
        }
        return new Date(0, $datetime);
    }

    /**
     * @return Date date representing the previous day
     */
    public static function yesterday(): Date
    {
        $tz = self::getUTCTimeZone();
        try {
            $datetime = new \DateTimeImmutable('yesterday', $tz);
        } catch (\Exception $e) {
            throw new \LogicException('Date/time error', 0, $e);
        }
        return new Date(0, $datetime);
    }

    /**
     * Creates a date from an ISO 8601 string, i.e., formatted as `YYYY-MM-DD`.
     *
     * Years beyond 4 digits are supported, i.e., `'12345-01-30'` is a valid input, representing a date of year 12345.
     *
     * As defined by ISO 8601, years before Christ are expected to be represented by numbers prefixed with a minus sign,
     * `0000` representing year 1 BC, `-0001` standing for year 2 BC, etc.
     *
     * Years anno Domini, i.e., the positive years, may optionally be prefixed with a plus sign.
     *
     * @param string $isoDateString
     * @return Date
     * @throws \InvalidArgumentException on invalid input
     */
    public static function fromISOString(string $isoDateString): Date
    {
        // check out for more than 4 digits for the year - something date_create_immutable() does not handle properly
        $intPrefix = (int)$isoDateString;
        if ($intPrefix > -10000 && $intPrefix < 10000) { // optimization for the typical: dash-separated 4-digit years
            $dateCreateInput = $isoDateString;
        } else {
            $addYears = 0;
            $dateCreateInput = preg_replace_callback(
                '~\d{5,}(?=-|\d{4})~',
                // supports both dash-separated date parts and also the form without dash separators
                function ($y) use (&$addYears) {
                    $res = $y[0] % 10000;
                    $addYears = $y[0] - $res;
                    return $res;
                },
                $isoDateString,
                1
            );
            if ($addYears) {
                $sgn = ($dateCreateInput[0] == '-' ? '-' : '+');
                $dateCreateInput .= " $sgn$addYears years";
            }
        }

        // using the procedural style as it does not throw the generic Exception
        $dt = date_create_immutable($dateCreateInput, self::getUTCTimeZone());
        if ($dt === false) {
            throw new \InvalidArgumentException('$isoDateString');
        }

        return new Date(0, $dt);
    }

    /**
     * @param int $datetime the UNIX timestamp;
     *                       just the date part is used, other information is ignored;
     *                       note that a UNIX timestamp represents the number of seconds since 1970-01-01 UTC, i.e., it
     *                         corresponds to usage of PHP functions {@link gmmktime()} and {@link gmdate()} rather than
     *                         {@link mktime()} or {@link date()}
     * @return Date the date of the given timestamp
     */
    public static function fromUnixTimestamp(int $datetime): Date
    {
        $tz = self::getUTCTimeZone();
        $dateStr = gmdate('Y-m-d', $datetime);
        try {
            $datetime = new \DateTimeImmutable($dateStr, $tz);
        } catch (\Exception $e) {
            throw new \LogicException('Date/time error', 0, $e);
        }
        return new Date(0, $datetime);
    }

    /**
     * @param \DateTimeInterface $dateTime
     * @return Date date represented by the date part of the given <tt>$dateTime</tt> object
     */
    public static function fromDateTime(\DateTimeInterface $dateTime): Date
    {
        return self::fromISOString($dateTime->format('Y-m-d'));
    }

    /**
     * Creates a date from the given year, month, and day.
     *
     * Invalid combinations of months and days are accepted similarly to the {@link mktime()} function.
     * E.g., `$year 2015, $month 14, $day 32` will be silently converted to `2016-03-03`. If this is unacceptable, use
     * the strict variant {@link Date::fromPartsStrict()} instead.
     *
     * Years before Christ shall be represented by negative numbers. E.g., year 42 BC shall be given as -42.
     *
     * Note that, in the Gregorian calendar, there is no year 0. Thus, `$year == 0` will be rejected with an
     * `\InvalidArgumentException`, which is the only case an exception is thrown by this method.
     *
     * @param int $year
     * @param int $month
     * @param int $day
     * @return Date
     * @throws \InvalidArgumentException iff <tt>$year</tt> is zero
     */
    public static function fromParts(int $year, int $month, int $day): Date
    {
        if ($year == 0) {
            throw new \InvalidArgumentException('$year zero is undefined');
        }

        $z = ($year > 0 ? $year : $year + 1);

        if ($month >= 1 && $month <= 12 && $day >= 1 && $day <= 31) { // works even for months without 31 days
            return self::fromISOString(sprintf('%s%04d-%02d-%02d', ($z < 0 ? '-' : ''), abs($z), $month, $day));
        } else {
            return self::fromISOString(sprintf('%s%04d-01-01', ($z < 0 ? '-' : ''), abs($z)))
                ->addParts(0, $month - 1, $day - 1);
        }
    }

    /**
     * Creates a date from the given year, month, and day while strictly checking for the validity of the data.
     *
     * For a friendlier variant, accepting even out-of-range values (doing the adequate calculations), see
     * {@link Date::fromParts()}.
     *
     * Years before Christ shall be represented by negative numbers. E.g., year 42 BC shall be given as -42.
     *
     * Note that, in the Gregorian calendar, there is no year 0. Thus, `$year == 0` will be rejected with an
     * `\InvalidArgumentException`.
     *
     * @param int $year
     * @param int $month
     * @param int $day
     * @return Date
     * @throws \OutOfRangeException if <tt>$month</tt> or <tt>$day</tt> are out of their valid ranges, according to the
     *                                Gregorian calendar
     * @throws \InvalidArgumentException if <tt>$year</tt> is zero
     */
    public static function fromPartsStrict(int $year, int $month, int $day): Date
    {
        if ($year == 0) {
            throw new \InvalidArgumentException('$year zero is undefined');
        }
        if ($month < 1 || $month > 12) {
            throw new \OutOfRangeException('$month out of range');
        }
        if ($day < 1 || $day > 31) { // days in the month will be verified ex post
            throw new \OutOfRangeException('$day out of range');
        }

        $z = ($year > 0 ? $year : $year + 1);
        $date = self::fromISOString(sprintf('%s%04d-%02d-%02d', ($z < 0 ? '-' : ''), abs($z), $month, $day));
        if ($date->format('j') == $day) {
            return $date;
        } else {
            throw new \OutOfRangeException('$day out of range');
        }
    }

    final protected function getISOFormat(): string
    {
        return 'Y-m-d';
    }

    /**
     * Adds a given number of years, months, and days to this date and returns the result.
     *
     * Only affects finite dates - an infinite date is returned as is.
     *
     * Note that addition of months respects the month days, and might actually change the day part. Example:
     * - adding 1 month to `2015-05-31` results in `2015-07-01` (June only has 30 days).
     *
     * Addition of years and months is done prior to addition of days, so the actual number of days in month is
     * evaluated with respect to the new month. Examples:
     * - adding 2 months and 1 day to `2015-05-31` results in `2015-08-01`,
     * - adding 1 month and 1 day to `2015-05-31` results in `2015-07-02` (June only has 30 days),
     * - adding 1 month and 1 day to `2015-02-28` results in `2015-03-29`,
     * - adding 1 year and 1 day to `2015-02-28` results in `2016-02-29`,
     * - adding 1 year and 1 day to `2016-02-28` results in `2017-03-01`.
     *
     * @param int $years
     * @param int $months
     * @param int $days
     * @return Date the date <tt>$years</tt> years, <tt>$months</tt> months and <tt>$days</tt> days after this date
     */
    public function addParts(int $years, int $months, int $days): Date
    {
        return $this->addPartsImpl($years, $months, $days, 0, 0, 0);
    }

    /**
     * @return int[]|null a triple of year, month, and day of this date;
     *                    <tt>null</tt> iff the date is not finite
     */
    public function toParts(): ?array
    {
        if ($this->inf) {
            return null;
        } else {
            $z = (int)$this->dt->format('Y');
            return [($z > 0 ? $z : $z - 1), (int)$this->dt->format('n'), (int)$this->dt->format('j')];
        }
    }

    public function step(int $delta, $value)
    {
        if (!$value instanceof Date) {
            throw new \InvalidArgumentException('$value');
        }

        return $value->addDay($delta);
    }
}


text:
#pragma once
#include <aws/securityhub/SecurityHub_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace SecurityHub
{
namespace Model
{

  /**
   *
Provides information about the billing for read/write capacity on the
   * table.

See Also:
   AWS
   * API Reference

   */
  class AWS_SECURITYHUB_API AwsDynamoDbTableBillingModeSummary
  {
  public:
    AwsDynamoDbTableBillingModeSummary();
    AwsDynamoDbTableBillingModeSummary(Aws::Utils::Json::JsonView jsonValue);
    AwsDynamoDbTableBillingModeSummary& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The method used to charge for read and write throughput and to manage
     * capacity.

     */
    inline const Aws::String& GetBillingMode() const{ return m_billingMode; }

    /**
     *
The method used to charge for read and write throughput and to manage
     * capacity.

     */
    inline bool BillingModeHasBeenSet() const { return m_billingModeHasBeenSet; }

    /**
     *
The method used to charge for read and write throughput and to manage
     * capacity.

     */
    inline void SetBillingMode(const Aws::String& value) { m_billingModeHasBeenSet = true; m_billingMode = value; }

    /**
     *
The method used to charge for read and write throughput and to manage
     * capacity.

     */
    inline void SetBillingMode(Aws::String&& value) { m_billingModeHasBeenSet = true; m_billingMode = std::move(value); }

    /**
     *
The method used to charge for read and write throughput and to manage
     * capacity.

     */
    inline void SetBillingMode(const char* value) { m_billingModeHasBeenSet = true; m_billingMode.assign(value); }

    /**
     *
The method used to charge for read and write throughput and to manage
     * capacity.

     */
    inline AwsDynamoDbTableBillingModeSummary& WithBillingMode(const Aws::String& value) { SetBillingMode(value); return *this;}

    /**
     *
The method used to charge for read and write throughput and to manage
     * capacity.

     */
    inline AwsDynamoDbTableBillingModeSummary& WithBillingMode(Aws::String&& value) { SetBillingMode(std::move(value)); return *this;}

    /**
     *
The method used to charge for read and write throughput and to manage
     * capacity.

     */
    inline AwsDynamoDbTableBillingModeSummary& WithBillingMode(const char* value) { SetBillingMode(value); return *this;}

    /**
     *
If the billing mode is PAY_PER_REQUEST, indicates when the
     * billing mode was set to that value.

Uses the date-time
     * format specified in RFC 3339 section 5.6,
     * Internet Date/Time Format. The value cannot contain spaces. For example,
     * 2020-03-22T13:22:13.933Z.

     */
    inline const Aws::String& GetLastUpdateToPayPerRequestDateTime() const{ return m_lastUpdateToPayPerRequestDateTime; }

    /**
     *
If the billing mode is PAY_PER_REQUEST, indicates when the
     * billing mode was set to that value.

Uses the date-time
     * format specified in RFC 3339 section 5.6,
     * Internet Date/Time Format. The value cannot contain spaces. For example,
     * 2020-03-22T13:22:13.933Z.

     */
    inline bool LastUpdateToPayPerRequestDateTimeHasBeenSet() const { return m_lastUpdateToPayPerRequestDateTimeHasBeenSet; }

    /**
     *
If the billing mode is PAY_PER_REQUEST, indicates when the
     * billing mode was set to that value.

Uses the date-time
     * format specified in RFC 3339 section 5.6,
     * Internet Date/Time Format. The value cannot contain spaces. For example,
     * 2020-03-22T13:22:13.933Z.

     */
    inline void SetLastUpdateToPayPerRequestDateTime(const Aws::String& value) { m_lastUpdateToPayPerRequestDateTimeHasBeenSet = true; m_lastUpdateToPayPerRequestDateTime = value; }

    /**
     *
If the billing mode is PAY_PER_REQUEST, indicates when the
     * billing mode was set to that value.

Uses the date-time
     * format specified in RFC 3339 section 5.6,
     * Internet Date/Time Format. The value cannot contain spaces. For example,
     * 2020-03-22T13:22:13.933Z.

     */
    inline void SetLastUpdateToPayPerRequestDateTime(Aws::String&& value) { m_lastUpdateToPayPerRequestDateTimeHasBeenSet = true; m_lastUpdateToPayPerRequestDateTime = std::move(value); }

    /**
     *
If the billing mode is PAY_PER_REQUEST, indicates when the
     * billing mode was set to that value.

Uses the date-time
     * format specified in RFC 3339 section 5.6,
     * Internet Date/Time Format. The value cannot contain spaces. For example,
     * 2020-03-22T13:22:13.933Z.

     */
    inline void SetLastUpdateToPayPerRequestDateTime(const char* value) { m_lastUpdateToPayPerRequestDateTimeHasBeenSet = true; m_lastUpdateToPayPerRequestDateTime.assign(value); }

    /**
     *
If the billing mode is PAY_PER_REQUEST, indicates when the
     * billing mode was set to that value.

Uses the date-time
     * format specified in RFC 3339 section 5.6,
     * Internet Date/Time Format. The value cannot contain spaces. For example,
     * 2020-03-22T13:22:13.933Z.

     */
    inline AwsDynamoDbTableBillingModeSummary& WithLastUpdateToPayPerRequestDateTime(const Aws::String& value) { SetLastUpdateToPayPerRequestDateTime(value); return *this;}

    /**
     *
If the billing mode is PAY_PER_REQUEST, indicates when the
     * billing mode was set to that value.

Uses the date-time
     * format specified in RFC 3339 section 5.6,
     * Internet Date/Time Format. The value cannot contain spaces. For example,
     * 2020-03-22T13:22:13.933Z.

     */
    inline AwsDynamoDbTableBillingModeSummary& WithLastUpdateToPayPerRequestDateTime(Aws::String&& value) { SetLastUpdateToPayPerRequestDateTime(std::move(value)); return *this;}

    /**
     *
If the billing mode is PAY_PER_REQUEST, indicates when the
     * billing mode was set to that value.

Uses the date-time
     * format specified in RFC 3339 section 5.6,
     * Internet Date/Time Format. The value cannot contain spaces. For example,
     * 2020-03-22T13:22:13.933Z.

     */
    inline AwsDynamoDbTableBillingModeSummary& WithLastUpdateToPayPerRequestDateTime(const char* value) { SetLastUpdateToPayPerRequestDateTime(value); return *this;}

  private:

    Aws::String m_billingMode;
    bool m_billingModeHasBeenSet = false;

    Aws::String m_lastUpdateToPayPerRequestDateTime;
    bool m_lastUpdateToPayPerRequestDateTimeHasBeenSet = false;
  };

} // namespace Model
} // namespace SecurityHub
} // namespace Aws


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

namespace SoaMetaModel.MetaInfo
{
    public class NameContext
    {
        /// <summary>
        /// The object whose scope is represented by the context.
        /// </summary>
        public SoaObject Scope
        {
            get;
            private set;
        }

        /// <summary>
        /// Additional scopes to search in.
        /// </summary>
        /// <remarks>
        /// This includes the main scope also.
        /// </remarks>
        public HashSet<SoaObject> Imports
        {
            get;
            private set;
        }

        /// <summary>
        /// Constructs a new context.
        /// </summary>
        /// <remarks>
        /// The method is accessible only by the scope class.
        /// </remarks>
        /// <param name="scope">The object whose scope is represented by the context.</param>
        internal NameContext(SoaObject scope)
        {
            this.Scope = scope;
            this.Imports = new HashSet<SoaObject>();

            this.Imports.Add(this.Scope);
        }

        /// <summary>
        /// Initializes the static objects.
        /// </summary>
        static NameContext()
        {
            NameContext.Contexts = new Stack<NameContext>();
        }

        /// <summary>
        /// The stack of contexts.
        /// </summary>
        internal static Stack<NameContext> Contexts
        {
            get;
            set;
        }

        /// <summary>
        /// Gets the root context.
        /// </summary>
        /// <remarks>
        /// Returns the context at the bottom of the stack.
        /// </remarks>
        public static NameContext Root
        {
            get
            {
                if (NameContext.Contexts.Count > 0)
                {
                    return NameContext.Contexts.Last();
                }
                else
                {
                    return null;
                }
            }
        }

        /// <summary>
        /// Gets the current context.
        /// </summary>
        /// <remarks>
        /// Returns the context at the top of the stack.
        /// </remarks>
        public static NameContext Current
        {
            get
            {
                if (NameContext.Contexts.Count > 0)
                {
                    return NameContext.Contexts.First();
                }
                else
                {
                    return null;
                }
            }
        }

        /// <summary>
        /// Checks whether the name exists in the current context.
        /// </summary>
        /// <remarks>
        /// Does not search in parent scopes.
        /// </remarks>
        /// <param name="name">The name to find</param>
        /// <param name="types">The types to find.</param>
        /// <exception cref="NameCollisionException">If the name exists.</exception>
        public void CheckName(string name, params System.Type[] types)
        {
            NameContext.CheckName(this.Scope, name, types);
        }

        /// <summary>
        /// Resolves name in the current context.
        /// </summary>
        /// <remarks>
        /// Does not search in parent contexts.
        /// </remarks>
        /// <param name="name">The name to find</param>
        /// <param name="types">The types to find.</param>
        /// <returns>The objects found.</returns>
        /// <exception cref="NameNotFoundException">If the object is not found.</exception>
        /// <exception cref="NameCollisionException">If multiple objects are found.</exception>
        public SoaObject ResolveName(string name, params System.Type[] types)
        {
            return NameContext.ResolveName(this.Scope, name, types);
        }

        public SoaObject ResolveOperation(string name, List<Type> paramTypes, bool exact = false)
        {
            return NameContext.ResolveOperation(this.Scope, name, paramTypes, exact);
        }

        /// <summary>
        /// Checks whether the name exists in the given scope.
        /// </summary>
        /// <remarks>
        /// Does not search in parent scopes.
        /// </remarks>
        /// <param name="scope">The scope to search in.</param>
        /// <param name="name">The name to find</param>
        /// <param name="types">The types to find.</param>
        /// <exception cref="NameCollisionException">If the name exists.</exception>
        public static void CheckName(SoaObject scope, string name, params System.Type[] types)
        {
            NameHelpers.CheckName(NameContext.ResolveNameMany(scope, name, types), scope, name, types);
        }

        /// <summary>
        /// Resolves name in the given scope.
        /// </summary>
        /// <remarks>
        /// Does not search in parent scopes.
        /// </remarks>
        /// <param name="scope">The scope to search in.</param>
        /// <param name="name">The name to find</param>
        /// <param name="types">The types to find.</param>
        /// <returns>The objects found.</returns>
        /// <exception cref="NameNotFoundException">If the object is not found.</exception>
        /// <exception cref="NameCollisionException">If multiple objects are found.</exception>
        public static SoaObject ResolveName(SoaObject scope, string name, params System.Type[] types)
        {
            return NameHelpers.SelectName(NameContext.ResolveNameMany(scope, name, types), scope, name, types);
        }

        public static SoaObject ResolveOperation(SoaObject scope, string name, List<Type> paramTypes, bool exact = false)
        {
            return NameHelpers.SelectName(NameContext.ResolveOperationMany(scope, name, paramTypes, exact), scope, name, typeof(Operation));
        }

        /// <summary>
        /// Returns the objects that matches the name and type in the given scope.
        /// </summary>
        /// <remarks>
        /// Does not search in parent scopes.
        /// </remarks>
        /// <param name="scope">The scope to search in.</param>
        /// <param name="name">The name to find</param>
        /// <param name="types">The types to find.</param>
        /// <returns>The objects found.</returns>
        public static IEnumerable<SoaObject> ResolveNameMany(SoaObject scope, string name, params System.Type[] types)
        {
            return NameHelpers.LookupNameMany(scope, name, types);
        }

        public static IEnumerable<SoaObject> ResolveOperationMany(SoaObject scope, string name, List<Type> paramTypes, bool exact)
        {
            return NameHelpers.LookupOperationMany(scope, name, paramTypes, exact);
        }

        /// <summary>
        /// Resolves name in the current context.
        /// </summary>
        /// <remarks>
        /// Searches in parent contexts, but stops if an object is found.
        /// </remarks>
        /// <param name="name">The name to find</param>
        /// <param name="types">The types to find.</param>
        /// <returns>The objects found.</returns>
        /// <exception cref="NameNotFoundException">If the object is not found.</exception>
        /// <exception cref="NameCollisionException">If multiple objects are found.</exception>
        public SoaObject ResolveFirstName(string name, params System.Type[] types)
        {
            return NameHelpers.SelectName(NameContext.ResolveFirstNameMany(name, types), this.Scope, name, types);
        }

        public SoaObject ResolveFirstOperation(string name, List<Type> paramTypes, bool exact = false)
        {
            return NameHelpers.SelectName(NameContext.ResolveFirstOperationMany(name, paramTypes, exact), this.Scope, name, typeof(Operation));
        }

        /// <summary>
        /// Returns the objects that matches the name and type in the current context.
        /// </summary>
        /// <remarks>
        /// Searches in parent and imported contexts, but stops if an object is found.
        /// </remarks>
        /// <param name="name">The name to find</param>
        /// <param name="types">The types to find.</param>
        /// <returns>The objects found.</returns>
        public static IEnumerable<SoaObject> ResolveFirstNameMany(string name, params System.Type[] types)
        {
            List<SoaObject> result = new List<SoaObject>();
            // From the current context towards the root
            foreach (NameContext context in NameContext.Contexts)
            {
                // Search in main and imported scopes
                foreach (SoaObject scope in context.Imports)
                {
                    result.AddRange(NameContext.ResolveNameMany(scope, name, types));
                }
                // If at least one object is found by the end of the step, we're done
                if (result.Count > 0)
                {
                    break;
                }
            }
            return result;
        }

        public static IEnumerable<SoaObject> ResolveFirstOperationMany(string name, List<Type> paramTypes, bool exact = false)
        {
            List<SoaObject> result = new List<SoaObject>();
            // From the current context towards the root
            foreach (NameContext context in NameContext.Contexts)
            {
                // Search in main and imported scopes
                foreach (SoaObject scope in context.Imports)
                {
                    result.AddRange(NameContext.ResolveOperationMany(scope, name, paramTypes, exact));
                }
                // If at least one object is found by the end of the step, we're done
                if (result.Count > 0)
                {
                    break;
                }
            }
            return result;
        }

    }

    public class NameContextScope : IDisposable
    {
        public NameContextScope(SoaObject scope)
        {
            NameContext.Contexts.Push(new NameContext(scope));
        }

        public void Dispose()
        {
            NameContext.Contexts.Pop();
        }
    }
}


text:
import { expect, ifExitCodeIsOtherThan, logOutput, PickEvent, StdOutReporter } from '@integration/testing-tools';
import { SceneFinished, SceneStarts, SceneTagged, TestRunFinished, TestRunFinishes, TestRunnerDetected, TestRunStarts } from '@serenity-js/core/lib/events';
import { BrowserTag, ExecutionSuccessful, FeatureTag, Name, PlatformTag, Timestamp } from '@serenity-js/core/lib/model';
import { describe, it } from 'mocha';

import { wdio } from '../src';

describe('@serenity-js/webdriverio with @serenity-js/jasmine', function () {

    this.timeout(60_000);

    it('recognises a passing scenario', () =>
        wdio(
            './examples/wdio.conf.ts',
            '--spec=examples/passing.spec.js',
        )
        .then(ifExitCodeIsOtherThan(0, logOutput))
        .then(result => {

            expect(result.exitCode).to.equal(0);

            PickEvent.from(StdOutReporter.parse(result.stdout))
                .next(TestRunStarts,       event => expect(event.timestamp).to.be.instanceof(Timestamp))
                .next(SceneStarts,         event => expect(event.details.name).to.equal(new Name('A scenario passes')))
                .next(SceneTagged,         event => expect(event.tag).to.be.instanceOf(BrowserTag))
                .next(SceneTagged,         event => expect(event.tag).to.be.instanceOf(PlatformTag))
                .next(SceneTagged,         event => expect(event.tag).to.equal(new FeatureTag('Jasmine')))
                .next(TestRunnerDetected,  event => expect(event.name).to.equal(new Name('Jasmine')))
                .next(SceneFinished,       event => expect(event.outcome).to.equal(new ExecutionSuccessful()))
                .next(TestRunFinishes,     event => expect(event.timestamp).to.be.instanceof(Timestamp))
                .next(TestRunFinished,     event => expect(event.timestamp).to.be.instanceof(Timestamp))
            ;
        }));
});


text:
@interface PodsDummy_Pods_VivaRealChallenge : NSObject
@end
@implementation PodsDummy_Pods_VivaRealChallenge
@end


text:
SELECT
	m.JobNum + '.' + CAST(m.AssemblySeq AS VARCHAR) + '.' + CAST(m.MtlSeq AS VARCHAR) AS ID
	, m.JobNum
	, m.AssemblySeq
	, m.MtlSeq
	, m.PartNum
	, m.Description
	, m.RequiredQty
	, m.IUM
	, m.RelatedOperation
	, m.IssuedQty
	, m.Plant
FROM
	JobMtl m with (nolock)
WHERE
	m.JobNum = '{Job}'
	AND m.AssemblySeq = (CASE WHEN '{Asm}' = '' THEN m.AssemblySeq ELSE '{Asm}' END)
	AND m.RelatedOperation = (CASE WHEN '{Op}' = '' THEN m.RelatedOperation ELSE '{Op}' END)
	AND m.JobComplete = 0


text:
[![npm][npm]][npm-url]
[![node][node]][node-url]
[![deps][deps]][deps-url]
[![tests][tests]][tests-url]
[![chat][chat]][chat-url]
[![size][size]][size-url]

# url-loader

A loader for webpack which transforms files into base64 URIs.

## Getting Started

To begin, you'll need to install `url-loader`:

```console
$ npm install url-loader --save-dev
```

`url-loader` works like
[`file-loader`](https://github.com/webpack-contrib/file-loader), but can return
a DataURL if the file is smaller than a byte limit.

**index.js**

```js
import img from './image.png';
```

**webpack.config.js**

```js
module.exports = {
  module: {
    rules: [
      {
        test: /\.(png|jpg|gif)$/i,
        use: [
          {
            loader: 'url-loader',
            options: {
              limit: 8192,
            },
          },
        ],
      },
    ],
  },
};
```

And run `webpack` via your preferred method.

## Options

### `fallback`

Type: `String`
Default: `'file-loader'`

Specifies an alternative loader to use when a target file's size exceeds the
limit set in the `limit` option.

**webpack.config.js**

```js
module.exports = {
  module: {
    rules: [
      {
        test: /\.(png|jpg|gif)$/i,
        use: [
          {
            loader: 'url-loader',
            options: {
              fallback: require.resolve('responsive-loader'),
            },
          },
        ],
      },
    ],
  },
};
```

The fallback loader will receive the same configuration options as url-loader.

For example, to set the quality option of a responsive-loader above use:

**webpack.config.js**

```js
module.exports = {
  module: {
    rules: [
      {
        test: /\.(png|jpg|gif)$/i,
        use: [
          {
            loader: 'url-loader',
            options: {
              fallback: require.resolve('responsive-loader'),
              quality: 85,
            },
          },
        ],
      },
    ],
  },
};
```

### `limit`

Type: `Number|Boolean|String`
Default: `undefined`

The limit can be specified via loader options and defaults to no limit.

#### `Number|String`

A `Number` or `String` specifying the maximum size of a file in bytes. If the file size is
**equal** or **greater** than the limit [`file-loader`](https://github.com/webpack-contrib/file-loader)
will be used (by default) and all query parameters are passed to it.
Using an alternative to `file-loader` is enabled via the `fallback` option.

**webpack.config.js**

```js
module.exports = {
  module: {
    rules: [
      {
        test: /\.(png|jpg|gif)$/i,
        use: [
          {
            loader: 'url-loader',
            options: {
              limit: 8192,
            },
          },
        ],
      },
    ],
  },
};
```

#### `Boolean`

Enable or disable transform files into base64.

**webpack.config.js**

```js
module.exports = {
  module: {
    rules: [
      {
        test: /\.(png|jpg|gif)$/i,
        use: [
          {
            loader: 'url-loader',
            options: {
              limit: false,
            },
          },
        ],
      },
    ],
  },
};
```

### `mimetype`

Type: `String`
Default: `(file extension)`

Sets the MIME type for the file to be transformed. If unspecified the file
extensions will be used to lookup the MIME type.

**webpack.config.js**

```js
module.exports = {
  module: {
    rules: [
      {
        test: /\.(png|jpg|gif)$/i,
        use: [
          {
            loader: 'url-loader',
            options: {
              mimetype: 'image/png',
            },
          },
        ],
      },
    ],
  },
};
```

### `esModule`

Type: `Boolean`
Default: `true`

By default, `file-loader` generates JS modules that use the ES modules syntax.
There are some cases in which using ES modules is beneficial, like in the case of [module concatenation](https://webpack.js.org/plugins/module-concatenation-plugin/) and [tree shaking](https://webpack.js.org/guides/tree-shaking/).

You can enable a CommonJS module syntax using:

**webpack.config.js**

```js
module.exports = {
  module: {
    rules: [
      {
        test: /\.css$/,
        use: [
          {
            loader: 'url-loader',
            options: {
              esModule: false,
            },
          },
        ],
      },
    ],
  },
};
```

## Contributing

Please take a moment to read our contributing guidelines if you haven't yet done so.

[CONTRIBUTING](./.github/CONTRIBUTING.md)

## License

[MIT](./LICENSE)

[npm]: https://img.shields.io/npm/v/url-loader.svg
[npm-url]: https://npmjs.com/package/url-loader
[node]: https://img.shields.io/node/v/url-loader.svg
[node-url]: https://nodejs.org
[deps]: https://david-dm.org/webpack-contrib/url-loader.svg
[deps-url]: https://david-dm.org/webpack-contrib/url-loader
[tests]: https://dev.azure.com/webpack-contrib/url-loader/_apis/build/status/webpack-contrib.url-loader?branchName=master
[tests-url]: https://dev.azure.com/webpack-contrib/url-loader/_build/latest?definitionId=2&branchName=master
[cover]: https://codecov.io/gh/webpack-contrib/url-loader/branch/master/graph/badge.svg
[cover-url]: https://codecov.io/gh/webpack-contrib/url-loader
[chat]: https://img.shields.io/badge/gitter-webpack%2Fwebpack-brightgreen.svg
[chat-url]: https://gitter.im/webpack/webpack
[size]: https://packagephobia.now.sh/badge?p=url-loader
[size-url]: https://packagephobia.now.sh/result?p=url-loader


text:
System.registerDynamic(["foo", "bar"], true, function ($__require, exports, module) {
  var global = this || self,
      GLOBAL = global;
});


text:
using System;
using System.Xml.Serialization;

namespace Aop.Api.Response
{
    /// <summary>
    /// AlipayOpenAppXwbtestabcQueryResponse.
    /// </summary>
    public class AlipayOpenAppXwbtestabcQueryResponse : AopResponse
    {
        /// <summary>
        /// 1
        /// </summary>
        [XmlElement("xw")]
        public string Xw { get; set; }
    }
}


text:
<?php
class Kwf_Assets_UseRequire3_TestProvider extends Kwf_Assets_Provider_Abstract
{
    public function getDependency($dependencyName)
    {
        if ($dependencyName == 'A') {
            return new Kwf_Assets_UseRequire3_TestDependency($this->_providerList, "A");
        } else if ($dependencyName == 'B') {
            return new Kwf_Assets_UseRequire3_TestDependency($this->_providerList, "B");
        } else if ($dependencyName == 'C') {
            return new Kwf_Assets_UseRequire3_TestDependency($this->_providerList, "C");
        }
    }
    /*
    Build the following dependency tree:

     A (recursion!)
     ^
     |
 (requires)
     |
     C
     ^
     |
  (uses)
     |
     B
     ^
     |
 (requires)
     |
     A (<<< start)

    Desired Order:
    BAC, not BCA
    */
    public function getDependenciesForDependency(Kwf_Assets_Dependency_Abstract $dependency)
    {
        if ($dependency->getContentsPacked()->getFileContents() == 'A') {
            return array(
                Kwf_Assets_Dependency_Abstract::DEPENDENCY_TYPE_REQUIRES => array(
                    $this->_providerList->findDependency('B'),
                )
            );
        } else if ($dependency->getContentsPacked()->getFileContents() == 'B') {
            return array(
                Kwf_Assets_Dependency_Abstract::DEPENDENCY_TYPE_USES => array(
                    $this->_providerList->findDependency('C')
                )
            );
        } else if ($dependency->getContentsPacked()->getFileContents() == 'C') {
            return array(
                Kwf_Assets_Dependency_Abstract::DEPENDENCY_TYPE_REQUIRES => array(
                    $this->_providerList->findDependency('A'),
                )
            );
        }
    }
}


text:
/* eslint-disable no-unused-vars */
// This helps ember-browserify find npm modules in ember-cli addons
import trunc from 'npm:unicode-byte-truncate'

export { default } from 'ember-osf/components/sharing-icons/component';


text:
package com.speedment.common.singletonstream;

import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;

abstract class AbstractStreamTester extends AbstractTester<Integer, Stream<Integer>> {

    @Override
    Function<Stream<Integer>, List<Integer>> finisher() {
        return s -> s.collect(Collectors.toList());
    }

    @Override
    Stream<Integer> referenceStream() {
        return Stream.of(INITIAL_VALUE);
    }

    @Override
    Stream<Integer> initialStream() {
        return SingletonStream.of(INITIAL_VALUE);
    }
}


text:
package com.comsysto.dcc.auth.role;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

@Repository
public interface RoleRepository extends JpaRepository<Role, String> {
    Optional<Role> findById(String id);
}


text:
- Write a script that finds the lexicographically smallest and largest property in `document`, `window` and `navigator` objects. Write the script in an external `.js` file and refer it from a html page.
- Execute the same script under `NodeJS`. Why does it crash?

## Submission
- You do not have to submit anything for this task.


text:
layout: media
title: "Neon green short sleeve shirt"
excerpt: "PaperFaces portrait of @Mstr_Dee drawn with Paper by 53 on an iPad."
image:
  feature: paperfaces-mstr-dee-twitter-lg.jpg
  thumb: paperfaces-mstr-dee-twitter-150.jpg
category: paperfaces
tags: [portrait, illustration, paper by 53]
---

PaperFaces portrait of [@Mstr_Dee](http://twitter.com/Mstr_Dee).

{% include paperfaces-boilerplate.html %}


text:
const GraphQL = require('graphql')

module.exports = new GraphQL.GraphQLObjectType({
  name: 'User',
  fields: {
    id: {
      type: GraphQL.GraphQLString
    },
    name: {
      type: GraphQL.GraphQLString
    }
  }
})


text:
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// Package plan9obj implements access to Plan 9 a.out object files.
package plan9obj

import (
	"encoding/binary"
	"errors"
	"fmt"
	"io"
	"os"
)

// A FileHeader represents a Plan 9 a.out file header.
type FileHeader struct {
	Magic       uint32
	Bss         uint32
	Entry       uint64
	PtrSize     int
	LoadAddress uint64
	HdrSize     uint64
}

// A File represents an open Plan 9 a.out file.
type File struct {
	FileHeader
	Sections []*Section
	closer   io.Closer
}

// A SectionHeader represents a single Plan 9 a.out section header.
// This structure doesn't exist on-disk, but eases navigation
// through the object file.
type SectionHeader struct {
	Name   string
	Size   uint32
	Offset uint32
}

// A Section represents a single section in a Plan 9 a.out file.
type Section struct {
	SectionHeader

	// Embed ReaderAt for ReadAt method.
	// Do not embed SectionReader directly
	// to avoid having Read and Seek.
	// If a client wants Read and Seek it must use
	// Open() to avoid fighting over the seek offset
	// with other clients.
	io.ReaderAt
	sr *io.SectionReader
}

// Data reads and returns the contents of the Plan 9 a.out section.
func (s *Section) Data() ([]byte, error) {
	dat := make([]byte, s.sr.Size())
	n, err := s.sr.ReadAt(dat, 0)
	if n == len(dat) {
		err = nil
	}
	return dat[0:n], err
}

// Open returns a new ReadSeeker reading the Plan 9 a.out section.
func (s *Section) Open() io.ReadSeeker { return io.NewSectionReader(s.sr, 0, 1<<63-1) }

// A Symbol represents an entry in a Plan 9 a.out symbol table section.
type Sym struct {
	Value uint64
	Type  rune
	Name  string
}

/*
 * Plan 9 a.out reader
 */

// formatError is returned by some operations if the data does
// not have the correct format for an object file.
type formatError struct {
	off int
	msg string
	val any
}

func (e *formatError) Error() string {
	msg := e.msg
	if e.val != nil {
		msg += fmt.Sprintf(" '%v'", e.val)
	}
	msg += fmt.Sprintf(" in record at byte %#x", e.off)
	return msg
}

// Open opens the named file using os.Open and prepares it for use as a Plan 9 a.out binary.
func Open(name string) (*File, error) {
	f, err := os.Open(name)
	if err != nil {
		return nil, err
	}
	ff, err := NewFile(f)
	if err != nil {
		f.Close()
		return nil, err
	}
	ff.closer = f
	return ff, nil
}

// Close closes the File.
// If the File was created using NewFile directly instead of Open,
// Close has no effect.
func (f *File) Close() error {
	var err error
	if f.closer != nil {
		err = f.closer.Close()
		f.closer = nil
	}
	return err
}

func parseMagic(magic []byte) (uint32, error) {
	m := binary.BigEndian.Uint32(magic)
	switch m {
	case Magic386, MagicAMD64, MagicARM:
		return m, nil
	}
	return 0, &formatError{0, "bad magic number", magic}
}

// NewFile creates a new File for accessing a Plan 9 binary in an underlying reader.
// The Plan 9 binary is expected to start at position 0 in the ReaderAt.
func NewFile(r io.ReaderAt) (*File, error) {
	sr := io.NewSectionReader(r, 0, 1<<63-1)
	// Read and decode Plan 9 magic
	var magic [4]byte
	if _, err := r.ReadAt(magic[:], 0); err != nil {
		return nil, err
	}
	_, err := parseMagic(magic[:])
	if err != nil {
		return nil, err
	}

	ph := new(prog)
	if err := binary.Read(sr, binary.BigEndian, ph); err != nil {
		return nil, err
	}

	f := &File{FileHeader: FileHeader{
		Magic:       ph.Magic,
		Bss:         ph.Bss,
		Entry:       uint64(ph.Entry),
		PtrSize:     4,
		LoadAddress: 0x1000,
		HdrSize:     4 * 8,
	}}

	if ph.Magic&Magic64 != 0 {
		if err := binary.Read(sr, binary.BigEndian, &f.Entry); err != nil {
			return nil, err
		}
		f.PtrSize = 8
		f.LoadAddress = 0x200000
		f.HdrSize += 8
	}

	var sects = []struct {
		name string
		size uint32
	}{
		{"text", ph.Text},
		{"data", ph.Data},
		{"syms", ph.Syms},
		{"spsz", ph.Spsz},
		{"pcsz", ph.Pcsz},
	}

	f.Sections = make([]*Section, 5)

	off := uint32(f.HdrSize)

	for i, sect := range sects {
		s := new(Section)
		s.SectionHeader = SectionHeader{
			Name:   sect.name,
			Size:   sect.size,
			Offset: off,
		}
		off += sect.size
		s.sr = io.NewSectionReader(r, int64(s.Offset), int64(s.Size))
		s.ReaderAt = s.sr
		f.Sections[i] = s
	}

	return f, nil
}

func walksymtab(data []byte, ptrsz int, fn func(sym) error) error {
	var order binary.ByteOrder = binary.BigEndian
	var s sym
	p := data
	for len(p) >= 4 {
		// Symbol type, value.
		if len(p) < ptrsz {
			return &formatError{len(data), "unexpected EOF", nil}
		}
		// fixed-width value
		if ptrsz == 8 {
			s.value = order.Uint64(p[0:8])
			p = p[8:]
		} else {
			s.value = uint64(order.Uint32(p[0:4]))
			p = p[4:]
		}

		typ := p[0] & 0x7F
		s.typ = typ
		p = p[1:]

		// Name.
		var i int
		var nnul int
		for i = 0; i < len(p); i++ {
			if p[i] == 0 {
				nnul = 1
				break
			}
		}
		switch typ {
		case 'z', 'Z':
			p = p[i+nnul:]
			for i = 0; i+2 <= len(p); i += 2 {
				if p[i] == 0 && p[i+1] == 0 {
					nnul = 2
					break
				}
			}
		}
		if len(p) < i+nnul {
			return &formatError{len(data), "unexpected EOF", nil}
		}
		s.name = p[0:i]
		i += nnul
		p = p[i:]

		fn(s)
	}
	return nil
}

// NewTable decodes the Go symbol table in data,
// returning an in-memory representation.
func newTable(symtab []byte, ptrsz int) ([]Sym, error) {
	var n int
	err := walksymtab(symtab, ptrsz, func(s sym) error {
		n++
		return nil
	})
	if err != nil {
		return nil, err
	}

	fname := make(map[uint16]string)
	syms := make([]Sym, 0, n)
	err = walksymtab(symtab, ptrsz, func(s sym) error {
		n := len(syms)
		syms = syms[0 : n+1]
		ts := &syms[n]
		ts.Type = rune(s.typ)
		ts.Value = s.value
		switch s.typ {
		default:
			ts.Name = string(s.name)
		case 'z', 'Z':
			for i := 0; i < len(s.name); i += 2 {
				eltIdx := binary.BigEndian.Uint16(s.name[i : i+2])
				elt, ok := fname[eltIdx]
				if !ok {
					return &formatError{-1, "bad filename code", eltIdx}
				}
				if n := len(ts.Name); n > 0 && ts.Name[n-1] != '/' {
					ts.Name += "/"
				}
				ts.Name += elt
			}
		}
		switch s.typ {
		case 'f':
			fname[uint16(s.value)] = ts.Name
		}
		return nil
	})
	if err != nil {
		return nil, err
	}

	return syms, nil
}

// ErrNoSymbols is returned by File.Symbols if there is no such section
// in the File.
var ErrNoSymbols = errors.New("no symbol section")

// Symbols returns the symbol table for f.
func (f *File) Symbols() ([]Sym, error) {
	symtabSection := f.Section("syms")
	if symtabSection == nil {
		return nil, ErrNoSymbols
	}

	symtab, err := symtabSection.Data()
	if err != nil {
		return nil, errors.New("cannot load symbol section")
	}

	return newTable(symtab, f.PtrSize)
}

// Section returns a section with the given name, or nil if no such
// section exists.
func (f *File) Section(name string) *Section {
	for _, s := range f.Sections {
		if s.Name == name {
			return s
		}
	}
	return nil
}


text:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script type="text/javascript" src="../Scripts/Jasmine/jasmine.js"></script>
    <script type="text/javascript" src="../Scripts/Jasmine/jasmine-html.js"></script>
    <script type="text/javascript" src="../Scripts/Jasmine/boot.js"></script>
    <script type="text/javascript" src="../Scripts/custom-lib.js"></script>
    <script type="text/javascript" src="../Scripts/custom-tests.js"></script>
</head>
<body>

</body>
</html>


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

using Blueprint41;
using Blueprint41.Core;
using Blueprint41.Query;
using Blueprint41.DatastoreTemplates;
using q = Domain.Data.Query;

namespace Domain.Data.Manipulation
{
	public interface IAddressTypeOriginalData : ISchemaBaseOriginalData
    {
		string Name { get; }
		string rowguid { get; }
    }

	public partial class AddressType : OGM<AddressType, AddressType.AddressTypeData, System.String>, ISchemaBase, INeo4jBase, IAddressTypeOriginalData
	{
        #region Initialize

        static AddressType()
        {
            Register.Types();
        }

        protected override void RegisterGeneratedStoredQueries()
        {
            #region LoadByKeys

            RegisterQuery(nameof(LoadByKeys), (query, alias) => query.
                Where(alias.Uid.In(Parameter.New<System.String>(Param0))));

            #endregion

			AdditionalGeneratedStoredQueries();
        }
        partial void AdditionalGeneratedStoredQueries();

        public static Dictionary<System.String, AddressType> LoadByKeys(IEnumerable<System.String> uids)
        {
            return FromQuery(nameof(LoadByKeys), new Parameter(Param0, uids.ToArray(), typeof(System.String))).ToDictionary(item=> item.Uid, item => item);
        }

		protected static void RegisterQuery(string name, Func<IMatchQuery, q.AddressTypeAlias, IWhereQuery> query)
        {
            q.AddressTypeAlias alias;

            IMatchQuery matchQuery = Blueprint41.Transaction.CompiledQuery.Match(q.Node.AddressType.Alias(out alias));
            IWhereQuery partial = query.Invoke(matchQuery, alias);
            ICompiled compiled = partial.Return(alias).Compile();

			RegisterQuery(name, compiled);
        }

		public override string ToString()
        {
            return $"AddressType => Name : {this.Name}, rowguid : {this.rowguid}, ModifiedDate : {this.ModifiedDate}, Uid : {this.Uid}";
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

		protected override void LazySet()
        {
            base.LazySet();
            if (PersistenceState == PersistenceState.NewAndChanged || PersistenceState == PersistenceState.LoadedAndChanged)
            {
                if ((object)InnerData == (object)OriginalData)
                    OriginalData = new AddressTypeData(InnerData);
            }
        }

        #endregion

		#region Validations

		protected override void ValidateSave()
		{
            bool isUpdate = (PersistenceState != PersistenceState.New && PersistenceState != PersistenceState.NewAndChanged);

#pragma warning disable CS0472
			if (InnerData.Name == null)
				throw new PersistenceException(string.Format("Cannot save AddressType with key '{0}' because the Name cannot be null.", this.Uid?.ToString() ?? "<null>"));
			if (InnerData.rowguid == null)
				throw new PersistenceException(string.Format("Cannot save AddressType with key '{0}' because the rowguid cannot be null.", this.Uid?.ToString() ?? "<null>"));
			if (InnerData.ModifiedDate == null)
				throw new PersistenceException(string.Format("Cannot save AddressType with key '{0}' because the ModifiedDate cannot be null.", this.Uid?.ToString() ?? "<null>"));
#pragma warning restore CS0472
		}

		protected override void ValidateDelete()
		{
		}

		#endregion

		#region Inner Data

		public class AddressTypeData : Data<System.String>
		{
			public AddressTypeData()
            {

            }

            public AddressTypeData(AddressTypeData data)
            {
				Name = data.Name;
				rowguid = data.rowguid;
				ModifiedDate = data.ModifiedDate;
				Uid = data.Uid;
            }

            #region Initialize Collections

			protected override void InitializeCollections()
			{
				NodeType = "AddressType";

			}
			public string NodeType { get; private set; }
			sealed public override System.String GetKey() { return Entity.Parent.PersistenceProvider.ConvertFromStoredType<System.String>(Uid); }
			sealed protected override void SetKey(System.String key) { Uid = (string)Entity.Parent.PersistenceProvider.ConvertToStoredType<System.String>(key); base.SetKey(Uid); }

			#endregion
			#region Map Data

			sealed public override IDictionary<string, object> MapTo()
			{
				IDictionary<string, object> dictionary = new Dictionary<string, object>();
				dictionary.Add("Name",  Name);
				dictionary.Add("rowguid",  rowguid);
				dictionary.Add("ModifiedDate",  Conversion<System.DateTime, long>.Convert(ModifiedDate));
				dictionary.Add("Uid",  Uid);
				return dictionary;
			}

			sealed public override void MapFrom(IReadOnlyDictionary<string, object> properties)
			{
				object value;
				if (properties.TryGetValue("Name", out value))
					Name = (string)value;
				if (properties.TryGetValue("rowguid", out value))
					rowguid = (string)value;
				if (properties.TryGetValue("ModifiedDate", out value))
					ModifiedDate = Conversion<long, System.DateTime>.Convert((long)value);
				if (properties.TryGetValue("Uid", out value))
					Uid = (string)value;
			}

			#endregion

			#region Members for interface IAddressType

			public string Name { get; set; }
			public string rowguid { get; set; }

			#endregion
			#region Members for interface ISchemaBase

			public System.DateTime ModifiedDate { get; set; }

			#endregion
			#region Members for interface INeo4jBase

			public string Uid { get; set; }

			#endregion
		}

		#endregion

		#region Outer Data

		#region Members for interface IAddressType

		public string Name { get { LazyGet(); return InnerData.Name; } set { if (LazySet(Members.Name, InnerData.Name, value)) InnerData.Name = value; } }
		public string rowguid { get { LazyGet(); return InnerData.rowguid; } set { if (LazySet(Members.rowguid, InnerData.rowguid, value)) InnerData.rowguid = value; } }

		#endregion
		#region Members for interface ISchemaBase

		public System.DateTime ModifiedDate { get { LazyGet(); return InnerData.ModifiedDate; } set { if (LazySet(Members.ModifiedDate, InnerData.ModifiedDate, value)) InnerData.ModifiedDate = value; } }

		#endregion
		#region Members for interface INeo4jBase

		public string Uid { get { return InnerData.Uid; } set { KeySet(() => InnerData.Uid = value); } }

		#endregion

		#region Virtual Node Type

		public string NodeType  { get { return InnerData.NodeType; } }

		#endregion

		#endregion

		#region Reflection

        private static AddressTypeMembers members = null;
        public static AddressTypeMembers Members
        {
            get
            {
                if (members == null)
                {
                    lock (typeof(AddressType))
                    {
                        if (members == null)
                            members = new AddressTypeMembers();
                    }
                }
                return members;
            }
        }
        public class AddressTypeMembers
        {
            internal AddressTypeMembers() { }

			#region Members for interface IAddressType

            public Property Name { get; } = Datastore.AdventureWorks.Model.Entities["AddressType"].Properties["Name"];
            public Property rowguid { get; } = Datastore.AdventureWorks.Model.Entities["AddressType"].Properties["rowguid"];
			#endregion

			#region Members for interface ISchemaBase

            public Property ModifiedDate { get; } = Datastore.AdventureWorks.Model.Entities["SchemaBase"].Properties["ModifiedDate"];
			#endregion

			#region Members for interface INeo4jBase

            public Property Uid { get; } = Datastore.AdventureWorks.Model.Entities["Neo4jBase"].Properties["Uid"];
			#endregion

        }

        private static AddressTypeFullTextMembers fullTextMembers = null;
        public static AddressTypeFullTextMembers FullTextMembers
        {
            get
            {
                if (fullTextMembers == null)
                {
                    lock (typeof(AddressType))
                    {
                        if (fullTextMembers == null)
                            fullTextMembers = new AddressTypeFullTextMembers();
                    }
                }
                return fullTextMembers;
            }
        }

        public class AddressTypeFullTextMembers
        {
            internal AddressTypeFullTextMembers() { }

        }

		sealed public override Entity GetEntity()
        {
            if (entity == null)
            {
                lock (typeof(AddressType))
                {
                    if (entity == null)
                        entity = Datastore.AdventureWorks.Model.Entities["AddressType"];
                }
            }
            return entity;
        }

		private static AddressTypeEvents events = null;
        public static AddressTypeEvents Events
        {
            get
            {
                if (events == null)
                {
                    lock (typeof(AddressType))
                    {
                        if (events == null)
                            events = new AddressTypeEvents();
                    }
                }
                return events;
            }
        }
        public class AddressTypeEvents
        {

            #region OnNew

            private bool onNewIsRegistered = false;

            private EventHandler<AddressType, EntityEventArgs> onNew;
            public event EventHandler<AddressType, EntityEventArgs> OnNew
            {
                add
                {
                    lock (this)
                    {
                        if (!onNewIsRegistered)
                        {
                            Entity.Events.OnNew -= onNewProxy;
                            Entity.Events.OnNew += onNewProxy;
                            onNewIsRegistered = true;
                        }
                        onNew += value;
                    }
                }
                remove
                {
                    lock (this)
                    {
                        onNew -= value;
                        if (onNew == null && onNewIsRegistered)
                        {
                            Entity.Events.OnNew -= onNewProxy;
                            onNewIsRegistered = false;
                        }
                    }
                }
            }

			private void onNewProxy(object sender, EntityEventArgs args)
            {
                EventHandler<AddressType, EntityEventArgs> handler = onNew;
                if ((object)handler != null)
                    handler.Invoke((AddressType)sender, args);
            }

            #endregion

            #region OnDelete

            private bool onDeleteIsRegistered = false;

            private EventHandler<AddressType, EntityEventArgs> onDelete;
            public event EventHandler<AddressType, EntityEventArgs> OnDelete
            {
                add
                {
                    lock (this)
                    {
                        if (!onDeleteIsRegistered)
                        {
                            Entity.Events.OnDelete -= onDeleteProxy;
                            Entity.Events.OnDelete += onDeleteProxy;
                            onDeleteIsRegistered = true;
                        }
                        onDelete += value;
                    }
                }
                remove
                {
                    lock (this)
                    {
                        onDelete -= value;
                        if (onDelete == null && onDeleteIsRegistered)
                        {
                            Entity.Events.OnDelete -= onDeleteProxy;
                            onDeleteIsRegistered = false;
                        }
                    }
                }
            }

			private void onDeleteProxy(object sender, EntityEventArgs args)
            {
                EventHandler<AddressType, EntityEventArgs> handler = onDelete;
                if ((object)handler != null)
                    handler.Invoke((AddressType)sender, args);
            }

            #endregion

            #region OnSave

            private bool onSaveIsRegistered = false;

            private EventHandler<AddressType, EntityEventArgs> onSave;
            public event EventHandler<AddressType, EntityEventArgs> OnSave
            {
                add
                {
                    lock (this)
                    {
                        if (!onSaveIsRegistered)
                        {
                            Entity.Events.OnSave -= onSaveProxy;
                            Entity.Events.OnSave += onSaveProxy;
                            onSaveIsRegistered = true;
                        }
                        onSave += value;
                    }
                }
                remove
                {
                    lock (this)
                    {
                        onSave -= value;
                        if (onSave == null && onSaveIsRegistered)
                        {
                            Entity.Events.OnSave -= onSaveProxy;
                            onSaveIsRegistered = false;
                        }
                    }
                }
            }

			private void onSaveProxy(object sender, EntityEventArgs args)
            {
                EventHandler<AddressType, EntityEventArgs> handler = onSave;
                if ((object)handler != null)
                    handler.Invoke((AddressType)sender, args);
            }

            #endregion

            #region OnPropertyChange

            public static class OnPropertyChange
            {

				#region OnName

				private static bool onNameIsRegistered = false;

				private static EventHandler<AddressType, PropertyEventArgs> onName;
				public static event EventHandler<AddressType, PropertyEventArgs> OnName
				{
					add
					{
						lock (typeof(OnPropertyChange))
						{
							if (!onNameIsRegistered)
							{
								Members.Name.Events.OnChange -= onNameProxy;
								Members.Name.Events.OnChange += onNameProxy;
								onNameIsRegistered = true;
							}
							onName += value;
						}
					}
					remove
					{
						lock (typeof(OnPropertyChange))
						{
							onName -= value;
							if (onName == null && onNameIsRegistered)
							{
								Members.Name.Events.OnChange -= onNameProxy;
								onNameIsRegistered = false;
							}
						}
					}
				}

				private static void onNameProxy(object sender, PropertyEventArgs args)
				{
					EventHandler<AddressType, PropertyEventArgs> handler = onName;
					if ((object)handler != null)
						handler.Invoke((AddressType)sender, args);
				}

				#endregion

				#region Onrowguid

				private static bool onrowguidIsRegistered = false;

				private static EventHandler<AddressType, PropertyEventArgs> onrowguid;
				public static event EventHandler<AddressType, PropertyEventArgs> Onrowguid
				{
					add
					{
						lock (typeof(OnPropertyChange))
						{
							if (!onrowguidIsRegistered)
							{
								Members.rowguid.Events.OnChange -= onrowguidProxy;
								Members.rowguid.Events.OnChange += onrowguidProxy;
								onrowguidIsRegistered = true;
							}
							onrowguid += value;
						}
					}
					remove
					{
						lock (typeof(OnPropertyChange))
						{
							onrowguid -= value;
							if (onrowguid == null && onrowguidIsRegistered)
							{
								Members.rowguid.Events.OnChange -= onrowguidProxy;
								onrowguidIsRegistered = false;
							}
						}
					}
				}

				private static void onrowguidProxy(object sender, PropertyEventArgs args)
				{
					EventHandler<AddressType, PropertyEventArgs> handler = onrowguid;
					if ((object)handler != null)
						handler.Invoke((AddressType)sender, args);
				}

				#endregion

				#region OnModifiedDate

				private static bool onModifiedDateIsRegistered = false;

				private static EventHandler<AddressType, PropertyEventArgs> onModifiedDate;
				public static event EventHandler<AddressType, PropertyEventArgs> OnModifiedDate
				{
					add
					{
						lock (typeof(OnPropertyChange))
						{
							if (!onModifiedDateIsRegistered)
							{
								Members.ModifiedDate.Events.OnChange -= onModifiedDateProxy;
								Members.ModifiedDate.Events.OnChange += onModifiedDateProxy;
								onModifiedDateIsRegistered = true;
							}
							onModifiedDate += value;
						}
					}
					remove
					{
						lock (typeof(OnPropertyChange))
						{
							onModifiedDate -= value;
							if (onModifiedDate == null && onModifiedDateIsRegistered)
							{
								Members.ModifiedDate.Events.OnChange -= onModifiedDateProxy;
								onModifiedDateIsRegistered = false;
							}
						}
					}
				}

				private static void onModifiedDateProxy(object sender, PropertyEventArgs args)
				{
					EventHandler<AddressType, PropertyEventArgs> handler = onModifiedDate;
					if ((object)handler != null)
						handler.Invoke((AddressType)sender, args);
				}

				#endregion

				#region OnUid

				private static bool onUidIsRegistered = false;

				private static EventHandler<AddressType, PropertyEventArgs> onUid;
				public static event EventHandler<AddressType, PropertyEventArgs> OnUid
				{
					add
					{
						lock (typeof(OnPropertyChange))
						{
							if (!onUidIsRegistered)
							{
								Members.Uid.Events.OnChange -= onUidProxy;
								Members.Uid.Events.OnChange += onUidProxy;
								onUidIsRegistered = true;
							}
							onUid += value;
						}
					}
					remove
					{
						lock (typeof(OnPropertyChange))
						{
							onUid -= value;
							if (onUid == null && onUidIsRegistered)
							{
								Members.Uid.Events.OnChange -= onUidProxy;
								onUidIsRegistered = false;
							}
						}
					}
				}

				private static void onUidProxy(object sender, PropertyEventArgs args)
				{
					EventHandler<AddressType, PropertyEventArgs> handler = onUid;
					if ((object)handler != null)
						handler.Invoke((AddressType)sender, args);
				}

				#endregion

			}

			#endregion
        }

        #endregion

		#region IAddressTypeOriginalData

		public IAddressTypeOriginalData OriginalVersion { get { return this; } }

		#region Members for interface IAddressType

		string IAddressTypeOriginalData.Name { get { return OriginalData.Name; } }
		string IAddressTypeOriginalData.rowguid { get { return OriginalData.rowguid; } }

		#endregion
		#region Members for interface ISchemaBase

		ISchemaBaseOriginalData ISchemaBase.OriginalVersion { get { return this; } }

		System.DateTime ISchemaBaseOriginalData.ModifiedDate { get { return OriginalData.ModifiedDate; } }

		#endregion
		#region Members for interface INeo4jBase

		INeo4jBaseOriginalData INeo4jBase.OriginalVersion { get { return this; } }

		string INeo4jBaseOriginalData.Uid { get { return OriginalData.Uid; } }

		#endregion
		#endregion
	}
}


text:
<?php
	Defined("BASE_PATH") or die("Dilarang Mengakses File Secara Langsung");

	$notif = isset($_SESSION['notif']) ? $_SESSION['notif'] : false;
	unset($_SESSION['notif']);
?>

<link rel="stylesheet" type="text/css" href="<?= base_url."assets/plugins/DataTables/DataTables-1.10.15/css/dataTables.bootstrap.min.css"; ?>"/>
<link rel="stylesheet" type="text/css" href="<?= base_url."assets/plugins/DataTables/Responsive-2.1.1/css/responsive.bootstrap.min.css"; ?>"/>

<link rel="stylesheet" type="text/css" href="<?= base_url."assets/plugins/datepicker/bootstrap-datepicker3.min.css"; ?>"/>

Member

<a href="<?= base_url ?>"> SiSGar

<a href="<?= base_url."index.php?m=member&p=list"; ?>">Member

Data Member

Data Member

                                <a href="<?= base_url."index.php?m=member&p=form" ?>" class="btn btn-default btn-flat" role="button"> Tambah

                                <button type="button" class="btn btn-success btn-flat" id="exportExcel"> Export Excel</button>

                                <button type="button" class="btn btn-danger btn-flat" id="exportPdf"> Export Pdf</button>

                                        No
                                        No. KTP
                                        Nama
                                        No. Telepon
                                        Pekerjaan
                                        Alamat
                                        No. Polisi Kendaraan
                                        Aksi

<?php
	if($notif){
		?>

		<?php
	}
	else{
		?>

		<?php
	}
?>


text:
var PAGE_SCHEMA = "Page";

exports.viewAll = function (dbAction, next) {
    var query = dbAction.getQuery().where('friendlyURL').sort("pageId");
    dbAction.authorizedGetByQuery(query, next);
};

exports.hasChildren = function (dbAction, pageId, next) {

    var query = dbAction.getQuery().where("parentPageId", pageId);
    dbAction.authorizedGetByQuery(query, next);
};

exports.getChildrenCount = function (dbAction, parentPageId, next) {

    var query = dbAction.getQuery()
        .where("parentPageId", parentPageId);
    dbAction.authorizedCount(query, next);
};

/**
 * Get those siblings whose order is greater than current page(@param page)
 * @param dbAction
 * @param pageId
 * @param next
 */
exports.getAboveSiblings = function (dbAction, page, next) {
    async.series([
        function (n) {
            if (page) {
                var pPId = page.parentPageId , q;
                Debug._l("ppid: " + pPId)
                q = dbAction.getQuery().where("parentPageId", pPId)
                    .where('order').gt(page.order)
                    .sort("order");

                dbAction.getByQuery(q, n);
            }
            else {
                n(new Error("Page not valid"));
            }
        }
    ], function (err, result) {
        if(result && result.length > 0){
            result = result[0];
        }
        next(err, result);
    });
};


text:
<!DOCTYPE html>

		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>News - Summary Extraction</title>
		<link rel="stylesheet" href="css/bootstrap.css">
		<link rel="stylesheet" href="css/news.css">

		Zero to One: Notes on Startups, or How to Build the Future:Amazon:Books

		www.amazon.com

			Amazon Zero to One: Notes on Startups, or How to Build the Future

		The Coin Center – AVC

		avc.com

			We have found that the best way to deal with policy makers and regulators when something new and threatening and dangerous looking comes around is to ...

		Requests for Startups

		www.ycombinator.com

			You shouldn't start a company just because it's on this list. 1. It's mostly here to help stimulate you to think about ideas.

		Peter Thiel disagrees with you

		fortune.com

			The tech financier and intellectual provocateur has some ideas that may turn you off. But there's no arguing with his commercial achievements. That's ...

		How to Be Polite

		medium.com

			Most people don't notice I'm polite, which is sort of the point. I don't look polite. I am big and droopy and need a hai…

		Get Lucky – AVC

		avc.com

			I've always thought of myself as a lucky person . I've had a tremendous amount of good fortune in my life; a happy marriage, great kids, a fantastic ...

		The Dentist Office Software Story – AVC

		avc.com

			I've been telling this fictional story about Dentist Office Software for years to describe why we are so focused on our "networks" investment ...

		The Bitcoin Hype Cycle – AVC

		avc.com

			Most people are familiar with the Gartner Hype Cycle. It is a great framework for looking at the development of important technological innovations:

		My Current Home Screen – AVC

		avc.com

			here's the current state of my phone's home screen.

		Audio Books – Late To The Party – AVC

		avc.com

			We were driving up the coast of Italy from Rome to Genoa listening to music being bluetoothed from my phone to the car's audio system and the Gotham ...

		Elizabeth Spiers

		www.elizabethspiers.com

			I think I just gave myself a tiny glass splinter attempting to use the phone anyway. According to my former nightlife reporter at the Observer ['s ...

		Bad Notes on Venture Capital

		www.bothsidesofthetable.com

			This week. On the phone ... Me: So, you raised venture capital? Him: Yeah. We raised a seed round. About $1 million. Me: At what price? Him: It ...

		Fred Wilson

		www.facebook.com

			Auteur

		Search Vs Social – AVC

		avc.com

			Back in 2008 and 2009, probably because of our investment in Twitter, I was obsessed with looking at acquisition traffic from search and social and ...

		Toshi – AVC

		avc.com

			Our portfolio company Coinbase announced something yesterday that went largely unnoticed, but might be one of the most important things to happen in ...

		How U2 Blew It - Lefsetz Letter

		lefsetz.com

			NEWS FOR A DAY No different from a rape or a murder, but with even less legs. In today's world it's not about making an impact, but sustaining. Could ...

		Feature Friday: Crowdfunding Filters – AVC

		avc.com

			Our portfolio company CircleUp , a crowdfunding market for equity investments in consumer products companies, launched something this week that I ...

		CSNYC Education Meetup

		www.meetup.com

			Scratch, Java, Robots, Web? We're coming together to build a community of professional practice around computer science education in New York City. ...

		September 11th – AVC

		avc.com

			Today is a very meaningful day for all New Yorkers. For me, the terrorist acts of September 11, 2001 came at an important time in my life. The ...

		Everything Bad is Good for You: How Today's Popular Culture is Actually ...

		www.amazon.com

			Amazon Everything Bad is Good for You: How Today's Popular Culture is Actually Making Us Smarter

		A Watch Guy's Thoughts On The Apple Watch After Seeing It In The Metal ...

		www.hodinkee.com

			I'm not even sure we can call it a watch. Okay, it goes on the wrist, and it happens to tell the time, but that's about where the similarities ...

		Today, September 10th, Is A Day Of Protest – AVC

		avc.com

			When you come to AVC for the first time today, you will be met with a "modal" that shows the site loading slowly. This is my way of participating in ...

		Crypto-Currency Market Capitalizations

		coinmarketcap.com

			Crypto-currency market cap rankings, charts, and more

		It's Not Really Social Media, Maybe It's Anti Social Media, But ...

		avc.com

			The President said this the other day:

		Next Wednesday Is The Internet Slowdown – AVC

		avc.com

			We've talked a lot here at AVC about Net Neutrality. I hate that term because it's got so much baggage now that it is essentially meaningless to me. ...

		Etsy CEO to Businesses: If Net Neutrality Perishes, We Will Too | WIRED

		www.wired.com

			As the CEO of a young company, I spend most of my time thinking about serving our community of one million sellers, leading 600 employees, building ...

		Reblog: How To Calculate A Return On Investment – AVC

		avc.com

			It turns out this is one of my most viewed posts of all time. I guess that's a good thing. So I'm reblogging it today. ————————- The Gotham Gal and I ...

		Opting Out for the Kids

		www.optingoutforthekids.org

			Before this day is done, a highly educated, full-time professional woman will shut the lights and close the door to her office, turn in her ID and ...

		The Personal Blog – AVC

		avc.com

			There's a bit of a renaissance of real personal blogging here in NYC. Two of the original NYC bloggers have, after years of writing professionally ...

		Andy Weissman sur Twitter : "@gregorylevey @richardpenner intrigued by the ...

		twitter.com

			Mot de passe oublié ? Vous utilisez déjà Twitter via SMS ?


text:
#if !INTERNAL_DROP || ODATALIB

#if ASTORIA_SERVER
namespace Microsoft.OData.Service
#else
namespace Microsoft.OData.Core
#endif
{
    #region Namespaces
    #if ASTORIA_SERVER
    using Microsoft.OData.Core;
    #endif
    #endregion Namespaces

    /// <summary>
    /// Class with utility methods to deal with values in ODataLib.
    /// </summary>
    internal static class ODataValueUtils
    {
        /// <summary>
        /// Converts an object to an ODataValue. If the given object is already an ODataValue (such as an ODataCompleValue, ODataCollectionValue, etc.), the original object will be returned.
        /// </summary>
        /// <param name="objectToConvert">The object to convert to an ODataValue</param>
        /// <returns>The given object as an ODataValue.</returns>
        internal static ODataValue ToODataValue(this object objectToConvert)
        {
            if (objectToConvert == null)
            {
                return new ODataNullValue();
            }

            // If the given object is already an ODataValue, return it as is.
            ODataValue odataValue = objectToConvert as ODataValue;
            if (odataValue != null)
            {
                return odataValue;
            }

            // Otherwise treat it as a primitive and wrap in an ODataPrimitiveValue. This includes spatial types.
            return new ODataPrimitiveValue(objectToConvert);
        }

        /// <summary>
        /// Converts an ODataValue to the old style of representing values, where null values are null and primitive values are just the direct primitive (no longer wrapped by ODataPrimitiveValue).
        /// All other value types, such as ODataComplexValue and ODataCollectionValue are returned unchanged.
        /// </summary>
        /// <param name="odataValue">The value to convert.</param>
        /// <returns>The value behind the given ODataValue.</returns>
        internal static object FromODataValue(this ODataValue odataValue)
        {
            if (odataValue is ODataNullValue)
            {
                return null;
            }

            ODataPrimitiveValue primitiveValue = odataValue as ODataPrimitiveValue;
            if (primitiveValue != null)
            {
                return primitiveValue.Value;
            }

            return odataValue;
        }
    }
}

#endif


text:
function f(){
  var functions = arguments

  //convert all string arguments into field accessors
  var i = 0, l = functions.length
  while (i < l) {
    if (typeof(functions[i]) === 'string' || typeof(functions[i]) === 'number'){
      functions[i] = (function(str){ return function(d){ return d[str] } })(functions[i])
    }
    i++
  }

   //return composition of functions
  return function(d) {
    var i=0, l = functions.length
    while (i++ < l) d = functions[i-1].call(this, d)
    return d
  }
}

f.not = function(d){ return !d }
f.run = function(d){ return d() }
f.objToFn = function(obj, defaultVal){
  if (arguments.length == 1) defaultVal = undefined

  return function(str){
    return typeof(obj[str]) !== undefined ? obj[str] : defaultVal }
}

export default f


text:
<?xml version="1.0" encoding="utf-8"?>

<query style="NullStyle.xsl" startDoc="0" maxDocs="10">
  <meta indexPath="IndexDB" sortMetaFields="rights,date">
    <term field="description">the</term>
  </meta>
</query>


text:
<template name="no_rights">
  {{#if currentUser}}

      {{i18n "Sorry, you don't have the rights to view this page."}}

  {{else}}

        You must sign in to access this site.
        Sign In

  {{/if}}
</template>


text:
abendkleider-mit--rmel
======================

http://www.liebmode.com/a-linie-unsymmetrisch-chiffon-fast-shipping-schleife-homecoming-kleider-p-47


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Gladiolus sulphureus Baker ex Oliv.

### Remarks
null