text:
package com.yougou.h5center.cdn.demo;

import java.io.*;

import com.aliyun.oss.ClientException;
import com.aliyun.oss.OSSClient;
import com.aliyun.oss.OSSException;
import com.aliyun.oss.model.AppendObjectRequest;
import com.aliyun.oss.model.AppendObjectResult;
import com.aliyun.oss.model.OSSObject;

/**
 * This sample demonstrates how to upload an object by append mode to Aliyun OSS
 * using the OSS SDK for Java.
 */
public class AppendObjectSample {

	private static String endpoint = "*** Provide OSS endpoint ***";

	private static String accessKeyId = "*** Provide your AccessKeyId ***";

	private static String accessKeySecret = "*** Provide your AccessKeySecret ***";

	private static String bucketName = "*** Provide bucket name ***";

	private static String key = "*** Provide key ***";

	public static void main(String[] args) throws IOException {
		/*
		 * Constructs a client instance with your account for accessing OSS
		 */
		OSSClient client = new OSSClient(endpoint, accessKeyId, accessKeySecret);

		try {
			/*
			 * Append an object from specfied input stream, keep in mind that
			 * position should be set to zero at first time.
			 */
			String content = "Thank you for using Aliyun Object Storage Service";
			InputStream instream = new ByteArrayInputStream(content.getBytes());
			Long firstPosition = 0L;
			System.out.println("Begin to append object at position(" + firstPosition + ")");
			AppendObjectResult appendObjectResult = client.appendObject(new AppendObjectRequest(bucketName, key,
					instream).withPosition(0L));
			System.out.println("\tNext position=" + appendObjectResult.getNextPosition() + ", CRC64="
					+ appendObjectResult.getObjectCRC64() + "\n");

			/*
			 * Continue to append the object from specfied file descriptor at
			 * last position
			 */
			Long nextPosition = appendObjectResult.getNextPosition();
			System.out.println("Continue to append object at last position(" + nextPosition + "):");
			appendObjectResult = client.appendObject(new AppendObjectRequest(bucketName, key, createTempFile())
					.withPosition(nextPosition));
			System.out.println("\tNext position=" + appendObjectResult.getNextPosition() + ", CRC64="
					+ appendObjectResult.getObjectCRC64());

			/*
			 * View object type of the appendable object
			 */
			OSSObject object = client.getObject(bucketName, key);
			System.out.println("\tObject type=" + object.getObjectMetadata().getObjectType() + "\n");
			// Do not forget to close object input stream if not use it any more
			object.getObjectContent().close();

			/*
			 * Delete the appendable object
			 */
			System.out.println("Deleting an appendable object");
			client.deleteObject(bucketName, key);

		} catch (OSSException oe) {
			System.out.println("Caught an OSSException, which means your request made it to OSS, "
					+ "but was rejected with an error response for some reason.");
			System.out.println("Error Message: " + oe.getErrorCode());
			System.out.println("Error Code:       " + oe.getErrorCode());
			System.out.println("Request ID:      " + oe.getRequestId());
			System.out.println("Host ID:           " + oe.getHostId());
		} catch (ClientException ce) {
			System.out.println("Caught an ClientException, which means the client encountered "
					+ "a serious internal problem while trying to communicate with OSS, "
					+ "such as not being able to access the network.");
			System.out.println("Error Message: " + ce.getMessage());
		} finally {
			/*
			 * Do not forget to shut down the client finally to release all
			 * allocated resources.
			 */
			client.shutdown();
		}
	}

	private static File createTempFile() throws IOException {
		File file = File.createTempFile("oss-java-sdk-", ".txt");
		file.deleteOnExit();

		Writer writer = new OutputStreamWriter(new FileOutputStream(file));
		writer.write("abcdefghijklmnopqrstuvwxyz\n");
		writer.write("0123456789011234567890\n");
		writer.close();

		return file;
	}
}


text:
<?php

namespace Application\Controller;

use Application\Common\RestResponse;
use Application\Experts\ExpApplication;
use Application\Models\ConfiguracionNotifiaciones;
use Application\Models\ConfiguracionNotificacionesDao;
use Application\Models\Constants;
use Application\Models\Debug;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\ViewModel;

class ConfiguracionesController extends AbstractActionController
{
    public function confnotificacionesindexAction(){

        $this->layout('layout/layout');

        $serviceLocator = $this->getServiceLocator();

        $conf_notif_dao = new ConfiguracionNotificacionesDao($serviceLocator);
        $params['objConf'] = $conf_notif_dao->getAllObjects();

        if($params['objConf'])
            $params['objConf'] = $params['objConf'][0];

        if(!$params['objConf']){
            $params['objConf'] = new ConfiguracionNotifiaciones();
            $params['objConf']->setCantidadStock(5);
        }

        return $params;
    }

    public function confnotificacionessaveAction(){

        $this->layout('layout/empty');

        $serviceLocator = $this->getServiceLocator();

        $conexion = $this->getServiceLocator()->get(Constants::SCHEMA)->getDriver()->getConnection();
        $conexion->beginTransaction();

        try{

            $conf_notif_dao = new ConfiguracionNotificacionesDao($serviceLocator);

            $objsConfNotif = $conf_notif_dao->getAllObjects();

            foreach ($objsConfNotif as $obj) {
                $conf_notif_dao->delete($obj);
            }

            $objConf = new ConfiguracionNotifiaciones();

            $objConf->setComprasPendientes($_POST['chk_cp']);
            $objConf->setVentasPendientes($_POST['chk_vp']);
            $objConf->setCantidadStock($_POST['conf_stock']);

            $conf_notif_dao->save($objConf);

            $conexion->commit();

            RestResponse::createResponse(RestResponse::OK, null, Constants::MSG_SAVE_SUCCESS);

        }catch(\Exception $e){

            $conexion->rollback();

            RestResponse::createResponse(RestResponse::SERVER_ERROR, null, Constants::MSG_SAVE_ERROR.$e->getMessage());

        }

    }
}

redpajama_set_name: RedPajamaGithub


text:
package org.apache.cassandra.db.rows;

import java.io.IOException;

import com.google.common.collect.Collections2;

import net.nicoulaj.compilecommand.annotations.Inline;
import org.apache.cassandra.config.ColumnDefinition;
import org.apache.cassandra.db.*;
import org.apache.cassandra.io.util.DataInputPlus;
import org.apache.cassandra.io.util.DataOutputBuffer;
import org.apache.cassandra.io.util.DataOutputPlus;

/**
 * Serialize/deserialize a single Unfiltered (both on-wire and on-disk).
 *

 *
 * The encoded format for an unfiltered is {@code <flags>(<row>|<marker>)} where:
 *

 *

 *     {@code <flags>} is a byte (or two) whose bits are flags used by the rest
 *     of the serialization. Each flag is defined/explained below as the
 *     "Unfiltered flags" constants. One of those flags is an extension flag,
 *     and if present, indicates the presence of a 2ndbyte that contains more
 *     flags. If the extension is not set, defaults are assumed for the flags
 *     of that 2nd byte.
 *

 *

 *     {@code <row>} is
 *        {@code <clustering><sizes>[<pkliveness>][<deletion>][<columns>]<columns_data>}
 *     where:
 *

 *
{@code <clustering>} is the row clustering as serialized by
 *           {@link org.apache.cassandra.db.Clustering.Serializer} (note that static row are an
 *           exception and don't have this).

 *
{@code <sizes>} are the sizes of the whole unfiltered on disk and
 *           of the previous unfiltered. This is only present for sstables and
 *           is used to efficiently skip rows (both forward and backward).

 *
{@code <pkliveness>} is the row primary key liveness infos, and it
 *           contains the timestamp, ttl and local deletion time of that info,
 *           though some/all of those can be absent based on the flags.

 *
{@code deletion} is the row deletion. It's presence is determined
 *           by the flags and if present, it conists of both the deletion
 *           timestamp and local deletion time.

 *
{@code <columns>} are the columns present in the row  encoded by
 *           {@link org.apache.cassandra.db.Columns.Serializer#serializeSubset}. It is absent if the row
 *           contains all the columns of the {@code SerializationHeader} (which
 *           is then indicated by a flag).

 *
{@code <columns_data>} is the data for each of the column present
 *           in the row. The encoding of each data depends on whether the data
 *           is for a simple or complex column:
 *

 *
Simple columns are simply encoded as one {@code <cell>}

 *
Complex columns are encoded as {@code [<delTime>]<n><cell1>...<celln>}
 *                  where {@code <delTime>} is the deletion for this complex
 *                  column (if flags indicates its presence), {@code <n>} is the
 *                  vint encoded value of n, i.e. {@code <celln>}'s 1-based
 *                  inde and {@code <celli>} are the {@code <cell>} for this
 *                  complex column

 *

 *

 *

 *

 *

 *     {@code <marker>} is {@code <bound><deletion>} where {@code <bound>} is
 *     the marker bound as serialized by {@link org.apache.cassandra.db.ClusteringBoundOrBoundary.Serializer}
 *     and {@code <deletion>} is the marker deletion time.
 *

 *

 *

 * The serialization of a {@code <cell>} is defined by {@link Cell.Serializer}.
 */
public class UnfilteredSerializer
{
    public static final UnfilteredSerializer serializer = new UnfilteredSerializer();

    /*
     * Unfiltered flags constants.
     */
    private final static int END_OF_PARTITION     = 0x01; // Signal the end of the partition. Nothing follows a <flags> field with that flag.
    private final static int IS_MARKER            = 0x02; // Whether the encoded unfiltered is a marker or a row. All following markers applies only to rows.
    private final static int HAS_TIMESTAMP        = 0x04; // Whether the encoded row has a timestamp (i.e. if row.partitionKeyLivenessInfo().hasTimestamp() == true).
    private final static int HAS_TTL              = 0x08; // Whether the encoded row has some expiration info (i.e. if row.partitionKeyLivenessInfo().hasTTL() == true).
    private final static int HAS_DELETION         = 0x10; // Whether the encoded row has some deletion info.
    private final static int HAS_ALL_COLUMNS      = 0x20; // Whether the encoded row has all of the columns from the header present.
    private final static int HAS_COMPLEX_DELETION = 0x40; // Whether the encoded row has some complex deletion for at least one of its columns.
    private final static int EXTENSION_FLAG       = 0x80; // If present, another byte is read containing the "extended flags" above.

    /*
     * Extended flags
     */
    private final static int IS_STATIC               = 0x01; // Whether the encoded row is a static. If there is no extended flag, the row is assumed not static.
    private final static int HAS_SHADOWABLE_DELETION = 0x02; // Whether the row deletion is shadowable. If there is no extended flag (or no row deletion), the deletion is assumed not shadowable.

    public void serialize(Unfiltered unfiltered, SerializationHeader header, DataOutputPlus out, int version)
    throws IOException
    {
        assert !header.isForSSTable();
        serialize(unfiltered, header, out, 0, version);
    }

    public void serialize(Unfiltered unfiltered, SerializationHeader header, DataOutputPlus out, long previousUnfilteredSize, int version)
    throws IOException
    {
        if (unfiltered.kind() == Unfiltered.Kind.RANGE_TOMBSTONE_MARKER)
        {
            serialize((RangeTombstoneMarker) unfiltered, header, out, previousUnfilteredSize, version);
        }
        else
        {
            serialize((Row) unfiltered, header, out, previousUnfilteredSize, version);
        }
    }

    public void serializeStaticRow(Row row, SerializationHeader header, DataOutputPlus out, int version)
    throws IOException
    {
        assert row.isStatic();
        serialize(row, header, out, 0, version);
    }

    private void serialize(Row row, SerializationHeader header, DataOutputPlus out, long previousUnfilteredSize, int version)
    throws IOException
    {
        int flags = 0;
        int extendedFlags = 0;

        boolean isStatic = row.isStatic();
        Columns headerColumns = header.columns(isStatic);
        LivenessInfo pkLiveness = row.primaryKeyLivenessInfo();
        Row.Deletion deletion = row.deletion();
        boolean hasComplexDeletion = row.hasComplexDeletion();
        boolean hasAllColumns = (row.size() == headerColumns.size());
        boolean hasExtendedFlags = hasExtendedFlags(row);

        if (isStatic)
            extendedFlags |= IS_STATIC;

        if (!pkLiveness.isEmpty())
            flags |= HAS_TIMESTAMP;
        if (pkLiveness.isExpiring())
            flags |= HAS_TTL;
        if (!deletion.isLive())
        {
            flags |= HAS_DELETION;
            if (deletion.isShadowable())
                extendedFlags |= HAS_SHADOWABLE_DELETION;
        }
        if (hasComplexDeletion)
            flags |= HAS_COMPLEX_DELETION;
        if (hasAllColumns)
            flags |= HAS_ALL_COLUMNS;

        if (hasExtendedFlags)
            flags |= EXTENSION_FLAG;

        out.writeByte((byte)flags);
        if (hasExtendedFlags)
            out.writeByte((byte)extendedFlags);

        if (!isStatic)
            Clustering.serializer.serialize(row.clustering(), out, version, header.clusteringTypes());

        if (header.isForSSTable())
        {
            DataOutputBuffer dob = DataOutputBuffer.RECYCLER.get();
            try
            {
                serializeRowBody(row, flags, header, dob);

                out.writeUnsignedVInt(dob.position() + TypeSizes.sizeofUnsignedVInt(previousUnfilteredSize));
                // We write the size of the previous unfiltered to make reverse queries more efficient (and simpler).
                // This is currently not used however and using it is tbd.
                out.writeUnsignedVInt(previousUnfilteredSize);
                out.write(dob.buffer());
            }
            finally
            {
                dob.recycle();
            }
        }
        else
        {
            serializeRowBody(row, flags, header, out);
        }
    }

    @Inline
    private void serializeRowBody(Row row, int flags, SerializationHeader header, DataOutputPlus out)
    throws IOException
    {
        boolean isStatic = row.isStatic();

        Columns headerColumns = header.columns(isStatic);
        LivenessInfo pkLiveness = row.primaryKeyLivenessInfo();
        Row.Deletion deletion = row.deletion();

        if ((flags & HAS_TIMESTAMP) != 0)
            header.writeTimestamp(pkLiveness.timestamp(), out);
        if ((flags & HAS_TTL) != 0)
        {
            header.writeTTL(pkLiveness.ttl(), out);
            header.writeLocalDeletionTime(pkLiveness.localExpirationTime(), out);
        }
        if ((flags & HAS_DELETION) != 0)
            header.writeDeletionTime(deletion.time(), out);

        if ((flags & HAS_ALL_COLUMNS) == 0)
            Columns.serializer.serializeSubset(Collections2.transform(row, ColumnData::column), headerColumns, out);

        for (ColumnData data : row)
        {
            if (data.column.isSimple())
                Cell.serializer.serialize((Cell) data, out, pkLiveness, header);
            else
                writeComplexColumn((ComplexColumnData) data, (flags & HAS_COMPLEX_DELETION) != 0, pkLiveness, header, out);
        }
    }

    private void writeComplexColumn(ComplexColumnData data, boolean hasComplexDeletion, LivenessInfo rowLiveness, SerializationHeader header, DataOutputPlus out)
    throws IOException
    {
        if (hasComplexDeletion)
            header.writeDeletionTime(data.complexDeletion(), out);

        out.writeUnsignedVInt(data.cellsCount());
        for (Cell cell : data)
            Cell.serializer.serialize(cell, out, rowLiveness, header);
    }

    private void serialize(RangeTombstoneMarker marker, SerializationHeader header, DataOutputPlus out, long previousUnfilteredSize, int version)
    throws IOException
    {
        out.writeByte((byte)IS_MARKER);
        ClusteringBoundOrBoundary.serializer.serialize(marker.clustering(), out, version, header.clusteringTypes());

        if (header.isForSSTable())
        {
            out.writeUnsignedVInt(serializedMarkerBodySize(marker, header, previousUnfilteredSize, version));
            out.writeUnsignedVInt(previousUnfilteredSize);
        }

        if (marker.isBoundary())
        {
            RangeTombstoneBoundaryMarker bm = (RangeTombstoneBoundaryMarker)marker;
            header.writeDeletionTime(bm.endDeletionTime(), out);
            header.writeDeletionTime(bm.startDeletionTime(), out);
        }
        else
        {
            header.writeDeletionTime(((RangeTombstoneBoundMarker)marker).deletionTime(), out);
        }
    }

    public long serializedSize(Unfiltered unfiltered, SerializationHeader header, int version)
    {
        assert !header.isForSSTable();
        return serializedSize(unfiltered, header, 0, version);
    }

    public long serializedSize(Unfiltered unfiltered, SerializationHeader header, long previousUnfilteredSize,int version)
    {
        return unfiltered.kind() == Unfiltered.Kind.RANGE_TOMBSTONE_MARKER
             ? serializedSize((RangeTombstoneMarker) unfiltered, header, previousUnfilteredSize, version)
             : serializedSize((Row) unfiltered, header, previousUnfilteredSize, version);
    }

    private long serializedSize(Row row, SerializationHeader header, long previousUnfilteredSize, int version)
    {
        long size = 1; // flags

        if (hasExtendedFlags(row))
            size += 1; // extended flags

        if (!row.isStatic())
            size += Clustering.serializer.serializedSize(row.clustering(), version, header.clusteringTypes());

        return size + serializedRowBodySize(row, header, previousUnfilteredSize, version);
    }

    private long serializedRowBodySize(Row row, SerializationHeader header, long previousUnfilteredSize, int version)
    {
        long size = 0;

        if (header.isForSSTable())
            size += TypeSizes.sizeofUnsignedVInt(previousUnfilteredSize);

        boolean isStatic = row.isStatic();
        Columns headerColumns = header.columns(isStatic);
        LivenessInfo pkLiveness = row.primaryKeyLivenessInfo();
        Row.Deletion deletion = row.deletion();
        boolean hasComplexDeletion = row.hasComplexDeletion();
        boolean hasAllColumns = (row.size() == headerColumns.size());

        if (!pkLiveness.isEmpty())
            size += header.timestampSerializedSize(pkLiveness.timestamp());
        if (pkLiveness.isExpiring())
        {
            size += header.ttlSerializedSize(pkLiveness.ttl());
            size += header.localDeletionTimeSerializedSize(pkLiveness.localExpirationTime());
        }
        if (!deletion.isLive())
            size += header.deletionTimeSerializedSize(deletion.time());

        if (!hasAllColumns)
            size += Columns.serializer.serializedSubsetSize(Collections2.transform(row, ColumnData::column), header.columns(isStatic));

        for (ColumnData data : row)
        {
            if (data.column.isSimple())
                size += Cell.serializer.serializedSize((Cell) data, pkLiveness, header);
            else
                size += sizeOfComplexColumn((ComplexColumnData) data, hasComplexDeletion, pkLiveness, header);
        }

        return size;
    }

    private long sizeOfComplexColumn(ComplexColumnData data, boolean hasComplexDeletion, LivenessInfo rowLiveness, SerializationHeader header)
    {
        long size = 0;

        if (hasComplexDeletion)
            size += header.deletionTimeSerializedSize(data.complexDeletion());

        size += TypeSizes.sizeofUnsignedVInt(data.cellsCount());
        for (Cell cell : data)
            size += Cell.serializer.serializedSize(cell, rowLiveness, header);

        return size;
    }

    private long serializedSize(RangeTombstoneMarker marker, SerializationHeader header, long previousUnfilteredSize, int version)
    {
        assert !header.isForSSTable();
        return 1 // flags
             + ClusteringBoundOrBoundary.serializer.serializedSize(marker.clustering(), version, header.clusteringTypes())
             + serializedMarkerBodySize(marker, header, previousUnfilteredSize, version);
    }

    private long serializedMarkerBodySize(RangeTombstoneMarker marker, SerializationHeader header, long previousUnfilteredSize, int version)
    {
        long size = 0;
        if (header.isForSSTable())
            size += TypeSizes.sizeofUnsignedVInt(previousUnfilteredSize);

        if (marker.isBoundary())
        {
            RangeTombstoneBoundaryMarker bm = (RangeTombstoneBoundaryMarker)marker;
            size += header.deletionTimeSerializedSize(bm.endDeletionTime());
            size += header.deletionTimeSerializedSize(bm.startDeletionTime());
        }
        else
        {
           size += header.deletionTimeSerializedSize(((RangeTombstoneBoundMarker)marker).deletionTime());
        }
        return size;
    }

    public void writeEndOfPartition(DataOutputPlus out) throws IOException
    {
        out.writeByte((byte)1);
    }

    public long serializedSizeEndOfPartition()
    {
        return 1;
    }

    public Unfiltered deserialize(DataInputPlus in, SerializationHeader header, SerializationHelper helper, Row.Builder builder)
    throws IOException
    {
        // It wouldn't be wrong per-se to use an unsorted builder, but it would be inefficient so make sure we don't do it by mistake
        assert builder.isSorted();

        int flags = in.readUnsignedByte();
        if (isEndOfPartition(flags))
            return null;

        int extendedFlags = readExtendedFlags(in, flags);

        if (kind(flags) == Unfiltered.Kind.RANGE_TOMBSTONE_MARKER)
        {
            ClusteringBoundOrBoundary bound = ClusteringBoundOrBoundary.serializer.deserialize(in, helper.version, header.clusteringTypes());
            return deserializeMarkerBody(in, header, bound);
        }
        else
        {
            // deserializeStaticRow should be used for that.
            if (isStatic(extendedFlags))
                throw new IOException("Corrupt flags value for unfiltered partition (isStatic flag set): " + flags);

            builder.newRow(Clustering.serializer.deserialize(in, helper.version, header.clusteringTypes()));
            Row row = deserializeRowBody(in, header, helper, flags, extendedFlags, builder);
            // we do not write empty rows because Rows.collectStats(), called by BTW.applyToRow(), asserts that rows are not empty
            // if we don't throw here, then later the very same assertion in Rows.collectStats() will fail compactions
            // see BlackListingCompactionsTest and CASSANDRA-9530 for details
            if (row.isEmpty())
                throw new IOException("Corrupt empty row found in unfiltered partition");
            return row;
        }
    }

    public Row deserializeStaticRow(DataInputPlus in, SerializationHeader header, SerializationHelper helper)
    throws IOException
    {
        int flags = in.readUnsignedByte();
        assert !isEndOfPartition(flags) && kind(flags) == Unfiltered.Kind.ROW && isExtended(flags) : flags;
        int extendedFlags = in.readUnsignedByte();
        Row.Builder builder = BTreeRow.sortedBuilder();
        builder.newRow(Clustering.STATIC_CLUSTERING);
        return deserializeRowBody(in, header, helper, flags, extendedFlags, builder);
    }

    public RangeTombstoneMarker deserializeMarkerBody(DataInputPlus in, SerializationHeader header, ClusteringBoundOrBoundary bound)
    throws IOException
    {
        if (header.isForSSTable())
        {
            in.readUnsignedVInt(); // marker size
            in.readUnsignedVInt(); // previous unfiltered size
        }

        if (bound.isBoundary())
            return new RangeTombstoneBoundaryMarker((ClusteringBoundary) bound, header.readDeletionTime(in), header.readDeletionTime(in));
        else
            return new RangeTombstoneBoundMarker((ClusteringBound) bound, header.readDeletionTime(in));
    }

    public Row deserializeRowBody(DataInputPlus in,
                                  SerializationHeader header,
                                  SerializationHelper helper,
                                  int flags,
                                  int extendedFlags,
                                  Row.Builder builder)
    throws IOException
    {
        try
        {
            boolean isStatic = isStatic(extendedFlags);
            boolean hasTimestamp = (flags & HAS_TIMESTAMP) != 0;
            boolean hasTTL = (flags & HAS_TTL) != 0;
            boolean hasDeletion = (flags & HAS_DELETION) != 0;
            boolean deletionIsShadowable = (extendedFlags & HAS_SHADOWABLE_DELETION) != 0;
            boolean hasComplexDeletion = (flags & HAS_COMPLEX_DELETION) != 0;
            boolean hasAllColumns = (flags & HAS_ALL_COLUMNS) != 0;
            Columns headerColumns = header.columns(isStatic);

            if (header.isForSSTable())
            {
                in.readUnsignedVInt(); // Skip row size
                in.readUnsignedVInt(); // previous unfiltered size
            }

            LivenessInfo rowLiveness = LivenessInfo.EMPTY;
            if (hasTimestamp)
            {
                long timestamp = header.readTimestamp(in);
                int ttl = hasTTL ? header.readTTL(in) : LivenessInfo.NO_TTL;
                int localDeletionTime = hasTTL ? header.readLocalDeletionTime(in) : LivenessInfo.NO_EXPIRATION_TIME;
                rowLiveness = LivenessInfo.withExpirationTime(timestamp, ttl, localDeletionTime);
            }

            builder.addPrimaryKeyLivenessInfo(rowLiveness);
            builder.addRowDeletion(hasDeletion ? new Row.Deletion(header.readDeletionTime(in), deletionIsShadowable) : Row.Deletion.LIVE);

            Columns columns = hasAllColumns ? headerColumns : Columns.serializer.deserializeSubset(headerColumns, in);
            for (ColumnDefinition column : columns)
            {
                if (column.isSimple())
                    readSimpleColumn(column, in, header, helper, builder, rowLiveness);
                else
                    readComplexColumn(column, in, header, helper, hasComplexDeletion, builder, rowLiveness);
            }

            return builder.build();
        }
        catch (RuntimeException | AssertionError e)
        {
            // Corrupted data could be such that it triggers an assertion in the row Builder, or break one of its assumption.
            // Of course, a bug in said builder could also trigger this, but it's impossible a priori to always make the distinction
            // between a real bug and data corrupted in just the bad way. Besides, re-throwing as an IOException doesn't hide the
            // exception, it just make we catch it properly and mark the sstable as corrupted.
            throw new IOException("Error building row with data deserialized from " + in, e);
        }
    }

    private void readSimpleColumn(ColumnDefinition column, DataInputPlus in, SerializationHeader header, SerializationHelper helper, Row.Builder builder, LivenessInfo rowLiveness)
    throws IOException
    {
        if (helper.includes(column))
        {
            Cell cell = Cell.serializer.deserialize(in, rowLiveness, column, header, helper);
            if (helper.includes(cell, rowLiveness) && !helper.isDropped(cell, false))
                builder.addCell(cell);
        }
        else
        {
            Cell.serializer.skip(in, column, header);
        }
    }

    private void readComplexColumn(ColumnDefinition column, DataInputPlus in, SerializationHeader header, SerializationHelper helper, boolean hasComplexDeletion, Row.Builder builder, LivenessInfo rowLiveness)
    throws IOException
    {
        if (helper.includes(column))
        {
            helper.startOfComplexColumn(column);
            if (hasComplexDeletion)
            {
                DeletionTime complexDeletion = header.readDeletionTime(in);
                if (!helper.isDroppedComplexDeletion(complexDeletion))
                    builder.addComplexDeletion(column, complexDeletion);
            }

            int count = (int) in.readUnsignedVInt();
            while (--count >= 0)
            {
                Cell cell = Cell.serializer.deserialize(in, rowLiveness, column, header, helper);
                if (helper.includes(cell, rowLiveness) && !helper.isDropped(cell, true))
                    builder.addCell(cell);
            }

            helper.endOfComplexColumn();
        }
        else
        {
            skipComplexColumn(in, column, header, hasComplexDeletion);
        }
    }

    public void skipRowBody(DataInputPlus in) throws IOException
    {
        int rowSize = (int)in.readUnsignedVInt();
        in.skipBytesFully(rowSize);
    }

    public void skipStaticRow(DataInputPlus in, SerializationHeader header, SerializationHelper helper) throws IOException
    {
        int flags = in.readUnsignedByte();
        assert !isEndOfPartition(flags) && kind(flags) == Unfiltered.Kind.ROW && isExtended(flags) : "Flags is " + flags;
        int extendedFlags = in.readUnsignedByte();
        assert isStatic(extendedFlags);
        skipRowBody(in);
    }

    public void skipMarkerBody(DataInputPlus in) throws IOException
    {
        int markerSize = (int)in.readUnsignedVInt();
        in.skipBytesFully(markerSize);
    }

    private void skipComplexColumn(DataInputPlus in, ColumnDefinition column, SerializationHeader header, boolean hasComplexDeletion)
    throws IOException
    {
        if (hasComplexDeletion)
            header.skipDeletionTime(in);

        int count = (int) in.readUnsignedVInt();
        while (--count >= 0)
            Cell.serializer.skip(in, column, header);
    }

    public static boolean isEndOfPartition(int flags)
    {
        return (flags & END_OF_PARTITION) != 0;
    }

    public static Unfiltered.Kind kind(int flags)
    {
        return (flags & IS_MARKER) != 0 ? Unfiltered.Kind.RANGE_TOMBSTONE_MARKER : Unfiltered.Kind.ROW;
    }

    public static boolean isStatic(int extendedFlags)
    {
        return (extendedFlags & IS_STATIC) != 0;
    }

    private static boolean isExtended(int flags)
    {
        return (flags & EXTENSION_FLAG) != 0;
    }

    public static int readExtendedFlags(DataInputPlus in, int flags) throws IOException
    {
        return isExtended(flags) ? in.readUnsignedByte() : 0;
    }

    public static boolean hasExtendedFlags(Row row)
    {
        return row.isStatic() || row.deletion().isShadowable();
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace LizardUX.Samples.Content
{
    /// <summary>
    /// Interaction logic for ListBoxSample.xaml
    /// </summary>
    public partial class ListBoxSample : UserControl
    {
        public ListBoxSample()
        {
            InitializeComponent();
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
    <item>

        <shape android:shape="rectangle" >
            <solid android:color="#00cc00" />
        </shape>
    </item>

    <item android:bottom="48dp">
        <bitmap
            android:gravity="center"
            android:src="@drawable/test5" />
    </item>
</layer-list>


text:
import channelsfactory = require('./channelsfactory');
import Channel = require('./channel');

export function url() {
    return 'http://eventyp.xrea.jp/index.txt';
}

export function getChannels(body: string) {
    return [[], [], channelsfactory.fromIndexTxt(body, 'EP').toArray()];
}


text:
using namespace arabica;

int main(int argc, char *argv[])
{
    std::string filename(argv[1]);
    CGModel model(filename);
    model.read_file();
    std::cout << model.size() << std::endl;
    for(int i(0); i<model.size(); ++i)
        std::cout << model.at(i)->get_sequence() << std::endl;
    return 0;
}


text:
"""An extension of Flask-SQLAlchemy to support the OCSPdash manager."""

from flask import Flask
from flask_sqlalchemy import SQLAlchemy, get_state

from ocspdash.manager import Manager

__all__ = ['OCSPSQLAlchemy']

class OCSPSQLAlchemy(SQLAlchemy):
    """An extension of Flask-SQLAlchemy to support the OCSPdash manager."""

    manager: Manager

    def init_app(self, app: Flask):
        """Initialize the extension with the app.

        :param app: A Flask app
        """
        super().init_app(app)

        self.manager = Manager(engine=self.engine, session=self.session)

    @staticmethod
    def get_manager(app: Flask) -> Manager:
        """Get the manager from an app.

        :param app: A Flask app
        """
        return get_state(app).db.manager


text:
// Copyright 2017 The Lynx Authors. All rights reserved.
package com.lynx.test;

import android.widget.FrameLayout;

import com.lynx.utils.ScreenUtil;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 测试点击事件的 type 以及 touches 和 changedTouches 中的 clientX / clientY / screenX / screenY
 * 是否符合预期
 *
 * __________________
 * |   body         |
 * |   ________     |
 * |   |      |     |
 * |   | view |     |
 * |   |______|     |
 * |                |
 * |________________|
 */

public class TouchInfoTestCase extends BaseTestCase {
    private static final int DELAY_TIME = 200;
    private TestResultRecorder mRecorder;
    private float mRatio;

    public TouchInfoTestCase() {
    }

    @Override
    protected void setUp() throws Exception {
        super.setUp();
        mRatio = (float) ScreenUtil.getScreenWidth() / 750;
    }

    // 测试单点触控在子 view 情况,主要测试在单指情况下,type 以及 touches 和 changedTouches 中的
    // clientX / clientY / screenX / screenY 符合预期
    public void testSingleTouchInfoOnView() throws InterruptedException {
        Thread.sleep(DELAY_TIME);
        SingleTouchGenerator generator = new SingleTouchGenerator(getActivity());
        String tag = "view";
        float[] downXArray = new float[1];
        float[] downYArray = new float[1];
        // down -> move -> up
        downXArray[0] = 100;
        downYArray[0] = 100;
        generator.down(downXArray[0] * mRatio, downYArray[0] * mRatio);
        Thread.sleep(DELAY_TIME);
        assetTouchInfo(mRecorder.getResults(), tag, "touchstart", downXArray, downYArray, 1, 1);
        mRecorder.reset();
        Thread.sleep(DELAY_TIME);
        downXArray[0] = 101;
        downYArray[0] = 101;
        generator.move(downXArray[0] * mRatio, downYArray[0] * mRatio);
        Thread.sleep(DELAY_TIME);
        assetTouchInfo(mRecorder.getResults(), tag, "touchmove", downXArray, downYArray, 1, 1);
        mRecorder.reset();

        Thread.sleep(DELAY_TIME);
        generator.up();
        Thread.sleep(DELAY_TIME);
        assetTouchInfo(mRecorder.getResults(), tag, "touchend", downXArray, downYArray, 0, 1);
        mRecorder.reset();

        // down -> cancel
        downXArray[0] = 120;
        downYArray[0] = 120;
        generator.down(downXArray[0] * mRatio, downYArray[0] * mRatio);
        Thread.sleep(DELAY_TIME);
        assetTouchInfo(mRecorder.getResults(), tag, "touchstart", downXArray, downYArray, 1, 1);
        mRecorder.reset();

        Thread.sleep(DELAY_TIME);
        generator.cancel();
        Thread.sleep(DELAY_TIME);
        assetTouchInfo(mRecorder.getResults(), tag, "touchcancel", downXArray, downYArray, 0, 1);
        mRecorder.reset();

    }

    // 测试单点触控在 body 情况,主要测试在单指情况下,type 以及 touches 和 changedTouches 的数量和其中的
    // clientX / clientY / screenX / screenY 是否符合预期
    public void testSingleTouchInfoOnBody() throws InterruptedException {
        Thread.sleep(1000);
        SingleTouchGenerator generator = new SingleTouchGenerator(getActivity());
        String tag = "body";
        float[] downXArray = new float[1];
        float[] downYArray = new float[1];
        // down -> move -> up
        downXArray[0] = 20;
        downYArray[0] = 30;
        generator.down(downXArray[0] * mRatio, downYArray[0] * mRatio);
        Thread.sleep(DELAY_TIME);
        assetTouchInfo(mRecorder.getResults(), tag, "touchstart", downXArray, downYArray, 1, 1);
        mRecorder.reset();

        Thread.sleep(DELAY_TIME);
        downXArray[0] = 21;
        downYArray[0] = 29;
        generator.move(downXArray[0] * mRatio, downYArray[0] * mRatio);
        Thread.sleep(DELAY_TIME);
        assetTouchInfo(mRecorder.getResults(), tag, "touchmove", downXArray, downYArray, 1, 1);
        mRecorder.reset();

        Thread.sleep(DELAY_TIME);
        generator.up();
        Thread.sleep(DELAY_TIME);
        assetTouchInfo(mRecorder.getResults(), tag, "touchend", downXArray, downYArray, 0, 1);
        mRecorder.reset();

        // down -> cancel
        downXArray[0] = 10;
        downYArray[0] = 20;
        generator.down(downXArray[0] * mRatio, downYArray[0] * mRatio);
        Thread.sleep(DELAY_TIME);
        assetTouchInfo(mRecorder.getResults(), tag, "touchstart", downXArray, downYArray, 1, 1);
        mRecorder.reset();

        Thread.sleep(DELAY_TIME);
        generator.cancel();
        Thread.sleep(DELAY_TIME);
        assetTouchInfo(mRecorder.getResults(), tag, "touchcancel", downXArray, downYArray, 0, 1);
        mRecorder.reset();
    }

    // 测试当页面不是全屏时候,screenX / screenY / clientX / clientY 是否满足预期
    // 预期:screenX / screenY 和 clientX clientY 有区别,
    // clientX clientY 是相对于 body 的坐标
    // screenX / screenY 是相对于屏幕的坐标
    public void testScreenInfoOfTouch() throws Throwable {
        // 设置 body 偏移
        final int marginTop = 50;
        runTestOnUiThread(new Runnable() {
            @Override
            public void run() {
                ((FrameLayout.LayoutParams) getActivity().getLynxView().getLayoutParams())
                        .setMargins(0, (int) (marginTop * mRatio), 0, 0);
                getActivity().getLynxView().requestLayout();
            }
        });
        Thread.sleep(DELAY_TIME);

        SingleTouchGenerator generator = new SingleTouchGenerator(getActivity());
        String tag = "body";
        float[] downXArray = new float[1];
        float[] downYArray = new float[1];
        // down -> move -> up
        downXArray[0] = 20;
        downYArray[0] = 80;
        generator.down(downXArray[0] * mRatio, downYArray[0] * mRatio);
        Thread.sleep(DELAY_TIME);
        assetTouchInfo(mRecorder.getResults(), tag, "touchstart", 0, marginTop, downXArray, downYArray, 1, 1);
        mRecorder.reset();
    }

    // 测试多点触控在 view 的情况,重点关注 changedTouches 和 touches 的变化是否符合预期
    // down1 -> down2 -> move1 -> move2 -> move12 -> up2 -> up1
    public void testMultiTouchInfoOnView() throws InterruptedException {
        Thread.sleep(1000);
        MultiTouchGenerator generator = new MultiTouchGenerator(getActivity());

        float downX_1 = 100;
        float downY_1 = 100;
        float downX_2 = 200;
        float downY_2 = 100;

        // 用于设置期望值
        float[] touchesXArray = new float[2];
        float[] touchesYArray = new float[2];
        float[] changedTouchesXArray = new float[2];
        float[] changedTouchesYArray = new float[2];

        int pointerId_1 = generator.down(downX_1 * mRatio, downY_1 * mRatio);
        Thread.sleep(DELAY_TIME);
        // 设置期望值
        touchesXArray[0] = downX_1;
        touchesYArray[0] = downY_1;
        changedTouchesXArray[0] = touchesXArray[0];
        changedTouchesYArray[0] = touchesYArray[0];
        // 验证是否符合预期
        assetTouchInfo(mRecorder.getResults(), "view", "touchstart", 1, touchesXArray, touchesYArray,
                1, changedTouchesXArray, changedTouchesYArray);
        mRecorder.reset();
        Thread.sleep(DELAY_TIME);
        int pointerId_2 =  generator.down(downX_2 * mRatio, downY_2 * mRatio);
        Thread.sleep(DELAY_TIME);
        // 设置期望值
        touchesXArray[1] = downX_2;
        touchesYArray[1] = downY_2;
        changedTouchesXArray[0] = touchesXArray[1];
        changedTouchesYArray[0] = touchesYArray[1];
        // 验证期望值
        assetTouchInfo(mRecorder.getResults(), "view", "touchstart", 2, touchesXArray, touchesYArray,
                1, changedTouchesXArray, changedTouchesYArray);
        mRecorder.reset();

        // 验证 move
        Thread.sleep(DELAY_TIME);
        generator.move(new MultiTouchGenerator.MultiTouchMoveParam(pointerId_1, ++downX_1 * mRatio, ++downY_1 * mRatio));
        Thread.sleep(DELAY_TIME);
        touchesXArray[0] = downX_1;
        touchesYArray[0] = downY_1;
        touchesXArray[1] = downX_2;
        touchesYArray[1] = downY_2;
        changedTouchesXArray[0] = downX_1;
        changedTouchesYArray[0] = downY_1;
        assetTouchInfo(mRecorder.getResults(), "view", "touchmove", 2, touchesXArray, touchesYArray,
                1, changedTouchesXArray, changedTouchesYArray);
        mRecorder.reset();

        Thread.sleep(DELAY_TIME);
        generator.move(new MultiTouchGenerator.MultiTouchMoveParam(pointerId_2, ++downX_2 * mRatio, ++downY_2 * mRatio));
        Thread.sleep(DELAY_TIME);
        touchesXArray[0] = downX_1;
        touchesYArray[0] = downY_1;
        touchesXArray[1] = downX_2;
        touchesYArray[1] = downY_2;
        changedTouchesXArray[0] = downX_2;
        changedTouchesYArray[0] = downY_2;
        assetTouchInfo(mRecorder.getResults(), "view", "touchmove", 2, touchesXArray, touchesYArray,
                1, changedTouchesXArray, changedTouchesYArray);
        mRecorder.reset();

        Thread.sleep(DELAY_TIME);
        generator.move(new MultiTouchGenerator.MultiTouchMoveParam(pointerId_1, ++downX_1 * mRatio, ++downY_1 * mRatio),
                new MultiTouchGenerator.MultiTouchMoveParam(pointerId_2, ++downX_2 * mRatio, downY_2 * mRatio));
        Thread.sleep(DELAY_TIME);
        touchesXArray[0] = downX_1;
        touchesYArray[0] = downY_1;
        touchesXArray[1] = downX_2;
        touchesYArray[1] = downY_2;
        changedTouchesXArray[0] = downX_1;
        changedTouchesYArray[0] = downY_1;
        changedTouchesXArray[1] = downX_2;
        changedTouchesYArray[1] = downY_2;
        assetTouchInfo(mRecorder.getResults(), "view", "touchmove", 2, touchesXArray, touchesYArray,
                2, changedTouchesXArray, changedTouchesYArray);
        mRecorder.reset();

        Thread.sleep(DELAY_TIME);
        generator.up(pointerId_2);
        Thread.sleep(DELAY_TIME);
        touchesXArray[0] = downX_1;
        touchesYArray[0] = downY_1;
        changedTouchesXArray[0] = downX_2;
        changedTouchesYArray[0] = downY_2;
        assetTouchInfo(mRecorder.getResults(), "view", "touchend", 1, touchesXArray, touchesYArray,
                1, changedTouchesXArray, changedTouchesYArray);
        mRecorder.reset();
        Thread.sleep(DELAY_TIME);
        generator.up(pointerId_1);
        Thread.sleep(DELAY_TIME);
        changedTouchesXArray[0] = downX_1;
        changedTouchesYArray[0] = downY_1;
        assetTouchInfo(mRecorder.getResults(), "view", "touchend", 0, touchesXArray, touchesYArray,
                1, changedTouchesXArray, changedTouchesYArray);
        mRecorder.reset();

    }

    // For single touch
    private void assetTouchInfo(LinkedHashMap<String, String> results,
                                String tag, String type, float[] downX, float[] downY,
                                int touchesLength, int changedTouchesLength) {
        assetTouchInfo(results, tag, type, 0, 0, touchesLength, downX, downY,
                changedTouchesLength, downX, downY);
    }

    // For single touch
    private void assetTouchInfo(LinkedHashMap<String, String> results,
                                String tag, String type, float offsetX, float offsetY,
                                float[] downX, float[] downY,
                                int touchesLength, int changedTouchesLength) {
        assetTouchInfo(results, tag, type, offsetX, offsetY, touchesLength, downX, downY,
                changedTouchesLength, downX, downY);
    }

    // For multiple touch
    private void assetTouchInfo(LinkedHashMap<String, String> results,
                                String tag, String type,
                                int touchesLength, float[] downX, float[] downY,
                                int changedTouchesLength, float[] changedDownX,
                                float[] changedDownY) {
        assetTouchInfo(results, tag, type, 0, 0, touchesLength, downX, downY,
                changedTouchesLength, changedDownX, changedDownY);
    }

    // For multiple touch
    private void assetTouchInfo(LinkedHashMap<String, String> results,
                                String tag, String type, float offsetX, float offsetY,
                                int touchesLength, float[] downX, float[] downY,
                                int changedTouchesLength, float[] changedDownX,
                                float[] changedDownY) {
        assertTrue(results.size() > 0);
        assertEquals(tag, results.get("tag"));
        assertEquals(type, results.get("type"));
        assertEquals(String.valueOf(touchesLength), results.get("touches.length"));
        for (int i = 0; i < touchesLength; ++i) {
            assertTrue((int) (Double.valueOf(results.get("touches[" + i + "].screenX")) - downX[i]) == 0);
            assertTrue((int) (Double.valueOf(results.get("touches[" + i + "].screenY")) - downY[i]) == 0);
            assertTrue((int) (Double.valueOf(results.get("touches[" + i + "].clientX")) - (downX[i] - offsetX)) == 0);
            assertTrue((int) (Double.valueOf(results.get("touches[" + i + "].clientY")) - (downY[i] - offsetY)) == 0);
        }

        assertEquals(String.valueOf(changedTouchesLength), results.get("changedTouches.length"));
        for (int i = 0; i < changedTouchesLength; ++i) {
            assertTrue((int) (Double.valueOf(results.get("changedTouches[" + i + "].screenX")) - changedDownX[i]) == 0);
            assertTrue((int) (Double.valueOf(results.get("changedTouches[" + i + "].screenY")) - changedDownY[i]) == 0);
            assertTrue((int) (Double.valueOf(results.get("changedTouches[" + i + "].clientX")) - (changedDownX[i] - offsetX)) == 0);
            assertTrue((int) (Double.valueOf(results.get("changedTouches[" + i + "].clientY")) - (changedDownY[i] - offsetY)) == 0);
        }
    }

    @Override
    public String getBundleNameForTest() {
        return "TouchInfoTest";
    }

    @Override
    public Map<String, Object> getExposedToJSObjectList() {
        HashMap<String, Object> objects = new HashMap<>();
        mRecorder = new TestResultRecorder();
        objects.put(TestResultRecorder.TAG, mRecorder);
        return objects;
    }
}


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

    <declare-styleable name="WoWoViewPager">
        <attr name="wowo_gearbox" format="enum|reference">
            <enum name="zero" value="0"/>
            <enum name="positive1" value="1"/>
            <enum name="positive2" value="2"/>
            <enum name="positive3" value="3"/>
            <enum name="positive4" value="4"/>
            <enum name="positive5" value="5"/>
            <enum name="positive6" value="6"/>
            <enum name="positive7" value="7"/>
        </attr>
        <attr name="wowo_draggable" format="boolean|reference"/>
        <attr name="wowo_scrollDuration" format="integer|reference"/>
        <attr name="wowo_direction" format="enum|reference">
            <enum name="horizontal" value="0"/>
            <enum name="vertical" value="1"/>
        </attr>
    </declare-styleable>

    <declare-styleable name="WoWoPathView">
        <attr name="wowo_dashPath" format="boolean|reference"/>
        <attr name="wowo_dashPathSegmentLength" format="dimension|reference"/>
        <attr name="wowo_dashPathPaddingLength" format="dimension|reference"/>
        <attr name="wowo_dynamicPath" format="boolean|reference"/>
        <attr name="wowo_dynamicPathSpeed" format="dimension|reference"/>
        <attr name="wowo_pathColor" format="color|reference"/>
        <attr name="wowo_pathWidth" format="dimension|reference"/>
        <attr name="wowo_headImageSrc" format="reference"/>
        <attr name="wowo_headImageWidth" format="dimension|reference"/>
        <attr name="wowo_headImageHeight" format="dimension|reference"/>
    </declare-styleable>

    <declare-styleable name="WoWoSvgView">
        <attr name="wowo_imageSizeX" format="integer|reference"/>
        <attr name="wowo_imageSizeY" format="integer|reference"/>
        <attr name="wowo_traceTime" format="string|reference"/>
        <attr name="wowo_traceTimePerGlyph" format="string|reference"/>
        <attr name="wowo_fillStart" format="string|reference"/>
        <attr name="wowo_fillTime" format="string|reference"/>
        <attr name="wowo_glyphStrings" format="reference"/>
        <attr name="wowo_traceColors" format="reference"/>
        <attr name="wowo_traceResidueColors" format="reference"/>
        <attr name="wowo_traceMarkerLength" format="dimension|reference"/>
        <attr name="wowo_fillColors" format="reference"/>
    </declare-styleable>

    <declare-styleable name="WoWoGifView">
        <attr name="wowo_src" format="reference"/>
    </declare-styleable>

</resources>


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Title</title>


text:
from django.conf.urls import patterns, url, include  # noqa
from django.contrib.auth import get_user_model  # noqa
from django.conf import settings
from django.utils.crypto import get_random_string  # noqa
from django.utils.timezone import now  # noqa
from django.http import HttpResponse

AUTH_USER_MODEL = settings.AUTH_USER_MODEL

class UnsafeRedirect(HttpResponse):

    def __init__(self, target_url, *args, **kwargs):
        super(UnsafeRedirect, self).__init__(*args, status=302, **kwargs)
        self["Location"] = target_url


text:
/**
 * @record
 */
function URIObject() {};

/** @type {string|undefined} */
URIObject.prototype.protocol;

/** @type {string|undefined} */
URIObject.prototype.username;

/** @type {string|undefined} */
URIObject.prototype.password;

/** @type {string|undefined} */
URIObject.prototype.hostname;

/** @type {string|undefined} */
URIObject.prototype.port;

/** @type {string|undefined} */
URIObject.prototype.path;

/** @type {string|undefined} */
URIObject.prototype.query;

/** @type {string|undefined} */
URIObject.prototype.fragment;

/**
 * @constructor
 * @nosideeffects
 * @return {!URI}
 * @param {URI|string|URIObject|Element=} arg1
 * @param {string=} absoluteTo
 * @see https://medialize.github.io/URI.js/docs.html#constructor
 */
function URI(arg1, absoluteTo) {}

/**
 * @nosideeffects
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#clone
 */
URI.prototype.clone = function() {};

/**
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#href
 */
URI.prototype.href = function() {};

/**
 * @param {string=} protocol
 * @return {string|!URI}
 * @throws {TypeError} on illegal input, that is anything but [a-z0-9.+-] and [empty string] and null
 * @see https://medialize.github.io/URI.js/docs.html#accessors-protocol
 */
URI.prototype.protocol = function(protocol) {};

/**
 * .scheme() is an alias of .protocol()
 * @param {string=} scheme
 * @return {string|!URI}
 * @throws {TypeError} on illegal input, that is anything but [a-z0-9.+-] and [empty string] and null
 * @see https://medialize.github.io/URI.js/docs.html#accessors-protocol
 */
URI.prototype.scheme = function(scheme) {};

/**
 * @param {string=} username
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-username
 */
URI.prototype.username = function(username) {};

/**
 * .hostname() returns the actual hostname, whereas .host() returns the hostname including the port
 * @param {string=} hostname
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-hostname
 */
URI.prototype.hostname = function(hostname) {};

/**
 * @param {string=} port
 * @return {string|!URI}
 * @throws {TypeError} on illegal input
 * although the port may be considered an integer, within URI it is a string.
 * @see https://medialize.github.io/URI.js/docs.html#accessors-port
 */
URI.prototype.port = function(port) {};

/**
 * .hostname() returns the actual hostname, whereas .host() returns the hostname including the port
 * @param {string=} host
 * @return {string|!URI}
 * @throws {TypeError} if path is part of the input
 * @see https://medialize.github.io/URI.js/docs.html#accessors-host
 */
URI.prototype.host = function(host) {};

/**
 * Userinfo is comprised of username and password
 * @param {string=} userinfo
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-userinfo
 */
URI.prototype.userinfo = function(userinfo) {};

/**
 * Authority is comprised of username, password, hostname and port
 * @param {string=} authority
 * @return {string|!URI}
 * @throws {TypeError} if path is part of the input
 * @see https://medialize.github.io/URI.js/docs.html#accessors-authority
 * .authority() will reset any of username, password and port if they're not specified.
 */
URI.prototype.authority = function(authority) {};

/**
 * Origin is comprised of the scheme and authority
 * @param {string=} origin
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-authority
 */
URI.prototype.origin = function(origin) {};

/**
 * .domain() is a convenience method that returns example.org from the hostname www.example.org.
 * @param {string|boolean=} domain
 * @return {string|!URI}
 * @throws {TypeError} if you pass it an empty string and on illegal input.
 * @see https://medialize.github.io/URI.js/docs.html#accessors-domain
 */
URI.prototype.domain = function(domain) {};

/**
 * .subdomain() is a convenience method that returns www from the hostname www.example.org.
 * @param {string=} subdomain
 * @return {string|!URI}
 * @throws {TypeError} on illegal input.
 * @see https://medialize.github.io/URI.js/docs.html#accessors-subdomain
 */
URI.prototype.subdomain = function(subdomain) {};

/**
 * .tld() is a convenience method that returns org from the hostname www.example.org.
 * @param {string|boolean=} tld
 * @return {string|!URI}
 * @throws {TypeError} if you pass it an empty string or use it on an IP-host.
 * @see https://medialize.github.io/URI.js/docs.html#accessors-tld
 */
URI.prototype.tld = function(tld) {};

/**
 * @param {string|boolean=} pathname
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-pathname
 */
URI.prototype.pathname = function(pathname) {};

/**
 * .path() is an alias of .pathname()
 * @param {string|boolean=} path
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-path
 */
URI.prototype.path = function(path) {};

/**
 * .directory() is an convenience method for mutating the directory part of a path
 * @param {string|boolean=} directory
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-directory
 */
URI.prototype.directory = function(directory) {};

/**
 * .filename() is an convenience method for mutating the filename part of a path
 * @param {string|boolean=} filename
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-filename
 */
URI.prototype.filename = function(filename) {};

/**
 * .suffix() is an convenience method for mutating the filename part of a path
 * @param {string|boolean=} suffix
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-suffix
 */
URI.prototype.suffix = function(suffix) {};

/**
 * .segment() allows convenient access to directory levels / URN segments within the path.
 * @param {string|number=} arg1
 * @param {string=} arg2
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-segment
 */
URI.prototype.segment = function(arg1,arg2) {};

/**
 * .segmentCoded() works the same way .segment() does, with the difference of transparently encoding and decoding values.
 * @param {string|number=} arg1
 * @param {string=} arg2
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-segmentCoded
 */
URI.prototype.segmentCoded = function(arg1,arg2) {};

/**
 * @param {string|boolean|Object<string,(string|Array<string>)>|function()=} search
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-search
 */
URI.prototype.search = function(search) {};

/**
 * @param {string=} hash
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-hash
 */
URI.prototype.hash = function(hash) {};

/**
 * @param {string=} fragment
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-hash
 */
URI.prototype.fragment = function(fragment) {};

/**
 * @param {string=} resource
 * @return {string|!URI}
 * @see https://medialize.github.io/URI.js/docs.html#accessors-resource
 */
URI.prototype.resource = function(resource) {};

/**
 * @param {string=} what
 * @return {boolean}
 * @see https://medialize.github.io/URI.js/docs.html#is
 */
URI.prototype.is = function(what) {};

/**
 * @param {string|Object<string,(string|Array<string>)>=} arg1
 * @param {string|Array<string>=} arg2
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#search-set
 */
URI.prototype.setSearch = function(arg1,arg2) {};

/**
 * .setQuery() is an alias of .setSearch()
 * @param {string|Object<string,(string|Array<string>)>=} arg1
 * @param {string|Array<string>=} arg2
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#search-set
 */
URI.prototype.setQuery = function(arg1,arg2) {};

/**
 * @param {string|Object<string,(string|Array<string>)>=} arg1
 * @param {string|Array<string>=} arg2
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#search-add
 */
URI.prototype.addSearch = function(arg1,arg2) {};

/**
 * .addQuery() is an alias of .addSearch()
 * @param {string|Object<string,(string|Array<string>)>=} arg1
 * @param {string|Array<string>=} arg2
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#search-add
 */
URI.prototype.addQuery = function(arg1,arg2) {};

/**
 * @param {string|Object<string,(string|Array<string>)>=} arg1
 * @param {string|Array<string>=} arg2
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#search-remove
 */
URI.prototype.removeSearch = function(arg1,arg2) {};

/**
 * .removeQuery() is an alias of .removeSearch()
 * @param {string|Object<string,(string|Array<string>|undefined)>|RegExp=} arg1
 * @param {string|Array<string>|RegExp=} arg2
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#search-remove
 */
URI.prototype.removeQuery = function(arg1,arg2) {};

/**
 * The method checks the existence and value of a given parameter within the query string.
 * @param {string} arg1
 * @param {string|boolean|Array<string>|RegExp|(function():boolean)=} arg2
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#search-has
 */
URI.prototype.hasSearch = function(arg1,arg2) {};

/**
 * .hasQuery() is an alias of .hasSearch().
 * @param {string} arg1
 * @param {string|boolean|Array<string>|RegExp|(function():boolean)=} arg2
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#search-has
 */
URI.prototype.hasQuery = function(arg1,arg2) {};

/**
 * executes normalizeProtocol(), normalizeHostname(), normalizePort(), normalizePath(), normalizeSearch(), normalizeHash()
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#normalize
 */
URI.prototype.normalize = function() {};

/**
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#normalize-protocol
 */
URI.prototype.normalizeProtocol = function() {};

/**
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#normalize-hostname
 */
URI.prototype.normalizeHostname = function() {};

/**
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#normalize-port
 */
URI.prototype.normalizePort = function() {};

/**
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#normalize-path
 */
URI.prototype.normalizePathname = function() {};

/**
 * .normalizePath() is an alias of .normalizePathname(), they resolve relative hierarchies
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#normalize-path
 */
URI.prototype.normalizePath = function() {};

/**Turns ?&foo=bar&&foo=bar&foo=baz& into ?foo=bar&foo=baz and removes ? if there is no query string.
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#normalize-search
 */
URI.prototype.normalizeSearch = function() {};

/**
 * Turns ?&foo=bar&&foo=bar&foo=baz& into ?foo=bar&foo=baz and removes ? if there is no query string.
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#normalize-search
 */
URI.prototype.normalizeQuery = function() {};

/**
 * removes # if there is no hash
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#normalize-hash
 */
URI.prototype.normalizeHash = function() {};

/**
 * removes # if there is no hash
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#normalize-hash
 */
URI.prototype.normalizeFragment = function() {};

/**
 * .iso8859() converts unicode-encoded escape sequences to ISO8859-encoded escape sequences. It does this by calling .normalize() internally.
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#iso8859
 */
URI.prototype.iso8859 = function() {};

/**
 * .unicode() converts ISO8859-encoded escape sequences to unicode-encoded escape sequences. It does this by calling .normalize() internally.
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#unicode
 */
URI.prototype.unicode = function() {};

/**
 * Formats URLs to be human readable (much like your browser does nowadays).
 * @return {string}
 * @nosideeffects
 * @see https://medialize.github.io/URI.js/docs.html#readable
 */
URI.prototype.readable = function() {};

/**
 * .relativeTo() compares two paths and makes one relative to the other
 * @param {string} arg1
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#relativeto
 */
URI.prototype.relativeTo = function(arg1) {};

/**
 * .absoluteTo() makes a relative path absolute based on another path
 * @param {string} arg1
 * @return {!URI}
 * @see https://medialize.github.io/URI.js/docs.html#absoluteto
 */
URI.prototype.absoluteTo = function(arg1) {};

/**
 * .equals() determines if the given URLs are the same - disregarding default ports, capitalization, dot-pathnames, query-parameter order, etc.
 * @param {URI|string|URIObject|Element} arg1
 * @return {boolean}
 * @see https://medialize.github.io/URI.js/docs.html#absoluteto
 */
URI.prototype.equals = function(arg1) {};

/**
 * parses a string into its URI components. returns an object containing the found components
 * @param {string} arg1
 * @return {URIObject}
 * @see https://medialize.github.io/URI.js/docs.html#parse
 */
URI.parse = function(arg1) {};

/**
 * parses a string's beginning into its URI components username, password, hostname, port. Found components are appended to the parts parameter. Remaining string is returned
 * @param {string} arg1
 * @param {Object} arg2
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-parseAuthority
 */
URI.parseAuthority = function(arg1, arg2) {};

/**
 * parses a string's beginning into its URI components username, password. Found components are appended to the parts parameter. Remaining string is returned
 * @param {string} arg1
 * @param {Object} arg2
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-parseUserinfo
 */
URI.parseUserinfo = function(arg1, arg2) {};

/**
 * parses a string's beginning into its URI components hostname, port. Found components are appended to the parts parameter. Remaining string is returned
 * @param {string} arg1
 * @param {Object} arg2
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-parseHost
 */
URI.parseHost = function(arg1, arg2) {};

/**
 * Parses the passed query string into an object. Returns object {propertyName: propertyValue}
 * @param {string} arg1
 * @param {Object} arg2
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-parseQuery
 */
URI.parseQuery = function(arg1, arg2) {};

/**
 * serializes the URI components passed in parts into a URI string
 * @param {URIObject} parts
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-build
 */
URI.build = function(parts) {};

/**
 * serializes the URI components username, password, hostname, port passed in parts into a URI string
 * @param {URIObject} parts
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-buildAuthority
 */
URI.buildAuthority = function(parts) {};

/**
 * serializes the URI components username, password passed in parts into a URI string
 * @param {URIObject} parts
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-buildUserinfo
 */
URI.buildUserinfo = function(parts) {};

/**
 * serializes the URI components hostname, port passed in parts into a URI string
 * @param {URIObject} parts
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-buildHost
 */
URI.buildHost = function(parts) {};

/**
 * serializes the query string parameters
 * @param {Object} data
 * @param {boolean} arg2
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-buildQuery
 */
URI.buildQuery = function(data,arg2) {};

/**
 * Encode an URI component with strict compliance to RFC3986
 * @param {string} arg1
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-encode
 */
URI.encode = function(arg1) {};

/**
 * Decode an URI component
 * @param {string} arg1
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-decode
 */
URI.decode = function(arg1) {};

/**
 * Encode an URI component whilst preserving reserved characters
 * @param {string} arg1
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-encodeReserved
 */
URI.encodeReserved = function(arg1) {};

/**
 * Encode a query string component.
 * Works like encode(), except it handles %20 as + (space) if URI.escapeQuerySpace = true;.
 * @param {string} arg1
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-encodeQuery
 */
URI.encodeQuery = function(arg1) {};

/**
 * Decode a query string component.
 * Works like decode(), except it handles + as %20 (space) if URI.escapeQuerySpace = true;.
 * @param {string} arg1
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-decodeQuery
 */
URI.decodeQuery = function(arg1) {};

/**
 * removes URI variables from global scope
 * @param {boolean} arg1
 * @see https://medialize.github.io/URI.js/docs.html#static-noConflict
 */
URI.noConflict = function(arg1) {};

/**
 * adds data to a map
 * @param {Object<string,(string|Array<string>)>} arg1
 * @param {string|Object<string,(string|Array<string>)>} arg2
 * @param {string=} arg3
 * @see https://medialize.github.io/URI.js/docs.html#static-addQuery
 */
URI.addQuery = function(arg1, arg2, arg3) {};

/**
 * removes data from a map
 * @param {Object<string,(string|Array<string>)>} arg1
 * @param {string|Object<string,(string|Array<string>|undefined)>} arg2
 * @param {string=} arg3
 * @see https://medialize.github.io/URI.js/docs.html#static-removeQuery
 */
URI.removeQuery = function(arg1, arg2, arg3) {};

/**
 * URI.commonPath() determines the common base directory of two paths.
 * @param {string} arg1
 * @param {string} arg2
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-commonPath
 */
URI.commonPath = function(arg1, arg2) {};

/**
 * @param {string} arg1
 * @param {function()} arg2
 * @param {Object} arg3
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-withinString
 */
URI.withinString = function(arg1, arg2, arg3) {};

/**
 * URI.iso8859() tells URI.js to use the older escape/unescape methods, for backwards compatibility with non-unicode platforms.
 * @see https://medialize.github.io/URI.js/docs.html#static-iso8859
 */
URI.iso8859 = function() {};

/**
 * URI.unicode() restores the default unicode-encoded URLs.
 * @see https://medialize.github.io/URI.js/docs.html#static-iso8859
 */
URI.unicode = function() {};

/**
 * URI.expand() is a convenience wrapper for URITemplate. While URITemplate#expand returns a string, URI.expand() returns an URI instance.
 * @param {string} arg1
 * @param {Object} arg2
 * @return {string}
 * @see https://medialize.github.io/URI.js/docs.html#static-expand
 */
URI.expand = function(arg1, arg2) {};


text:
var webgl_2d_image_my;
(function (webgl_2d_image_my) {
    var width = 240;
    var height = 240;
    function main() {
        var image = new Image();
        image.src = "../../../webgl/resources/leaves.jpg"; // MUST BE SAME DOMAIN!!!
        //image.src = "../../checkerboard.jpg";
        image.onload = function () {
            render(image);
        };
    }
    function setupUi(canvas) {
        webglLessonsHelper.setupLesson(canvas);
    }
    function render(image) {
        // Get A WebGL context
        /** @type {HTMLCanvasElement} */
        var canvas = document.getElementById("canvas");
        setupUi(canvas);
        var gl = canvas.getContext("webgl");
        if (!gl) {
            webglLessonsHelper.showNeedWebGL(canvas);
            return;
        }
        webglUtils.resizeCanvasToDisplaySize(gl.canvas);
        // Tell WebGL how to convert from clip space to pixels
        gl.viewport(0, 0, gl.canvas.width, gl.canvas.height);
        // Clear the canvas
        gl.clearColor(0, 0, 0, 0);
        gl.clear(gl.COLOR_BUFFER_BIT);
        // Create a texture.
        createTexture(gl, image);
        // setup GLSL program
        var program = webglUtils.createProgramFromScripts(gl, ["2d-vertex-shader", "2d-fragment-shader"]);
        var attribSetters = webglUtils.createAttributeSetters(gl, program);
        var uniformSetters = webglUtils.createUniformSetters(gl, program);
        var width2 = width * 1.5;
        var arrays = {
            position: {
                numComponents: 3, data: rectBufferData(width2),
            },
            texCoord: {
                numComponents: 3, data: textureBufferData(width2)
            },
        };
        var bufferInfo = webglUtils.createBufferInfoFromArrays(gl, arrays);
        var uniforms = {
            u_matrix: m3.identity()
        };
        // Tell it to use our program (pair of shaders)
        gl.useProgram(program);
        var matrix = m3.projection(gl.canvas.clientWidth, gl.canvas.clientHeight);
        //matrix = m3.translate(matrix, 200, 150);
        //matrix = m3.rotate(matrix, Math.PI / 2);
        uniforms.u_matrix = matrix;
        webglUtils.setBuffersAndAttributes(gl, attribSetters, bufferInfo);
        webglUtils.setUniforms(uniformSetters, uniforms);
        // Draw the rectangle.
        gl.drawArrays(gl.TRIANGLE_STRIP, 0, bufferInfo.numElements);
    }
    function rectBufferData(width2) {
        width2 = width2 || width;
        return [
            -width2 / 2, -height / 2, 0,
            +width2 / 2, -height / 2, 0,
            -width / 2, +height / 2, 0,
            +width / 2, +height / 2, 0,
        ];
    }
    function textureBufferData(width2) {
        width2 = width2 || width;
        return [
            0, 0, width2,
            width2, 0, width2,
            0, width, width,
            width, width, width,
        ];
    }
    function createTexture(gl, image) {
        var texture = gl.createTexture();
        gl.bindTexture(gl.TEXTURE_2D, texture);
        // Set the parameters so we can render any size image.
        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);
        gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);
        // Upload the image into the texture.
        gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
    }
    main();
})(webgl_2d_image_my || (webgl_2d_image_my = {}));
//# sourceMappingURL=index.js.map


text:
'use strict';

function mergeSort(A) {
  var left, middle, right;

  if (A.length < 2) {
    return A;
  }

  middle = Math.floor(A.length / 2);
  left = A.slice(0, middle);
  right = A.slice(middle, A.length);

  return merge(mergeSort(left), mergeSort(right));
}

function merge(left, right) {
  var result = [];

  while (left.length && right.length) {
    if (left[0] < right[0]) {
      result.push(left.shift());
    } else {
      result.push(right.shift());
    }
  }

  while (left.length) {
    result.push(left.shift());
  }

  while (right.length) {
    result.push(right.shift());
  }

  return result;
}

module.exports = mergeSort;


text:
package com.edwardvanraak.materialbarcodescanner;

import android.app.Activity;
import android.graphics.Color;
import android.hardware.Camera;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.ViewGroup;

import com.google.android.gms.vision.barcode.Barcode;
import com.google.android.gms.vision.barcode.BarcodeDetector;

public class MaterialBarcodeScannerBuilder {
    @Nullable
    protected Activity activity;
    private ViewGroup rootView;

    private MaterialBarcodeScanner.OnResultListener onResultListener;
    private BarcodeDetector barcodeDetector;
    private CameraSource cameraSource;

    private boolean flashEnabledByDefault = false;
    private boolean autoFocusEnabled = false;
    private boolean bleepEnabled = false;
    private boolean used = false; //used to check if a builder is only used

    private int trackerDetectedResourceID = R.drawable.reticule_overlay;
    private int trackerResourceID = R.drawable.reticule_overlay;
    private int cameraFacingBack = CameraSource.CAMERA_FACING_BACK;
    private int trackerColor = Color.parseColor("#F44336"); //Material Red 500
    private int scannerMode = MaterialBarcodeScanner.SCANNER_MODE_FREE;
    private int barcodeFormats = Barcode.ALL_FORMATS;

    private String text = "";

    /**
     * Default constructor
     */
    public MaterialBarcodeScannerBuilder() {

    }

    /**
     * Called immediately after a barcode was scanned
     *
     * @param onResultListener
     */
    public MaterialBarcodeScannerBuilder withResultListener(@NonNull MaterialBarcodeScanner.OnResultListener onResultListener) {
        this.onResultListener = onResultListener;
        return this;
    }

    /**
     * Construct a MaterialBarcodeScannerBuilder by passing the activity to use for the generation
     *
     * @param activity current activity which will contain the drawer
     */
    public MaterialBarcodeScannerBuilder(@NonNull Activity activity) {
        this.rootView = activity.findViewById(android.R.id.content);
        this.activity = activity;
    }

    /**
     * Sets the activity which will be used as the parent of the MaterialBarcodeScanner activity
     *
     * @param activity current activity which will contain the MaterialBarcodeScanner
     */
    public MaterialBarcodeScannerBuilder withActivity(@NonNull Activity activity) {
        this.rootView = activity.findViewById(android.R.id.content);
        this.activity = activity;
        return this;
    }

    /**
     * Makes the barcode scanner use the camera facing back
     */
    public MaterialBarcodeScannerBuilder withBackFacingCamera() {
        cameraFacingBack = CameraSource.CAMERA_FACING_BACK;
        return this;
    }

    /**
     * Makes the barcode scanner use camera facing front
     */
    public MaterialBarcodeScannerBuilder withFrontFacingCamera() {
        cameraFacingBack = CameraSource.CAMERA_FACING_FRONT;
        return this;
    }

    /**
     * Either CameraSource.CAMERA_FACING_FRONT or CameraSource.CAMERA_FACING_BACK
     *
     * @param cameraFacing
     */
    public MaterialBarcodeScannerBuilder withCameraFacing(int cameraFacing) {
        cameraFacingBack = cameraFacing;
        return this;
    }

    /**
     * Enables or disables auto focusing on the camera
     */
    public MaterialBarcodeScannerBuilder withEnableAutoFocus(boolean enabled) {
        autoFocusEnabled = enabled;
        return this;
    }

    /**
     * Sets the tracker color used by the barcode scanner, By default this is Material Red 500 (#F44336).
     *
     * @param color
     */
    public MaterialBarcodeScannerBuilder withTrackerColor(int color) {
        trackerColor = color;
        return this;
    }

    /**
     * Enables or disables a bleep sound whenever a barcode is scanned
     */
    public MaterialBarcodeScannerBuilder withBleepEnabled(boolean enabled) {
        bleepEnabled = enabled;
        return this;
    }

    /**
     * Shows a text message at the top of the barcode scanner
     */
    public MaterialBarcodeScannerBuilder withText(String text) {
        this.text = text;
        return this;
    }

    /**
     * Shows a text message at the top of the barcode scanner
     */
    public MaterialBarcodeScannerBuilder withFlashLightEnabledByDefault() {
        flashEnabledByDefault = true;
        return this;
    }

    /**
     * Bit mask (containing values like QR_CODE and so on) that selects which formats this barcode detector should recognize.
     *
     * @param barcodeFormats
     * @return
     */
    public MaterialBarcodeScannerBuilder withBarcodeFormats(int barcodeFormats) {
        this.barcodeFormats = barcodeFormats;
        return this;
    }

    /**
     * Enables exclusive scanning on EAN-13, EAN-8, UPC-A, UPC-E, Code-39, Code-93, Code-128, ITF and Codabar barcodes.
     *
     * @return
     */
    public MaterialBarcodeScannerBuilder withOnly2DScanning() {
        barcodeFormats = Barcode.EAN_13 | Barcode.EAN_8 | Barcode.UPC_A | Barcode.UPC_E | Barcode.CODE_39 | Barcode.CODE_93 | Barcode.CODE_128 | Barcode.ITF | Barcode.CODABAR;
        return this;
    }

    /**
     * Enables exclusive scanning on QR Code, Data Matrix, PDF-417 and Aztec barcodes.
     *
     * @return
     */
    public MaterialBarcodeScannerBuilder withOnly3DScanning() {
        barcodeFormats = Barcode.QR_CODE | Barcode.DATA_MATRIX | Barcode.PDF417 | Barcode.AZTEC;
        return this;
    }

    public MaterialBarcodeScannerBuilder withOnlyPdf417() {
        barcodeFormats = Barcode.PDF417;
        return this;
    }

    /**
     * Enables exclusive scanning on QR Codes, no other barcodes will be detected
     *
     * @return
     */
    public MaterialBarcodeScannerBuilder withOnlyQRCodeScanning() {
        barcodeFormats = Barcode.QR_CODE;
        return this;
    }

    /**
     * Enables the default center tracker. This tracker is always visible and turns green when a barcode is found.\n
     * Please note that you can still scan a barcode outside the center tracker! This is purely a visual change.
     *
     * @return
     */
    public MaterialBarcodeScannerBuilder withCenterTracker() {
        scannerMode = MaterialBarcodeScanner.SCANNER_MODE_CENTER;
        return this;
    }

    /**
     * Enables the center tracker with a custom drawable resource. This tracker is always visible.\n
     * Please note that you can still scan a barcode outside the center tracker! This is purely a visual change.
     *
     * @param trackerResourceId         a drawable resource id
     * @param detectedTrackerResourceId a drawable resource id for the detected tracker state
     * @return
     */
    public MaterialBarcodeScannerBuilder withCenterTracker(int trackerResourceId, int detectedTrackerResourceId) {
        scannerMode = MaterialBarcodeScanner.SCANNER_MODE_CENTER;
        trackerResourceID = trackerResourceId;
        trackerDetectedResourceID = detectedTrackerResourceId;
        return this;
    }

    /**
     * Build a ready to use MaterialBarcodeScanner
     *
     * @return A ready to use MaterialBarcodeScanner
     */
    public MaterialBarcodeScanner build() {
        if (used) {
            throw new RuntimeException("You must not reuse a MaterialBarcodeScanner builder");
        }
        if (activity == null) {
            throw new RuntimeException("Please pass an activity to the MaterialBarcodeScannerBuilder");
        }
        buildMobileVisionBarcodeDetector();
        MaterialBarcodeScanner materialBarcodeScanner = new MaterialBarcodeScanner(this);
        materialBarcodeScanner.setOnResultListener(onResultListener);
        return materialBarcodeScanner;
    }

    /**
     * Build a barcode scanner using the Mobile Vision Barcode API
     */
    protected void buildMobileVisionBarcodeDetector() {
        String focusMode = Camera.Parameters.FOCUS_MODE_FIXED;
        used = true;

        if (autoFocusEnabled) {
            focusMode = Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE;
        }
        barcodeDetector = new BarcodeDetector.Builder(activity)
            .setBarcodeFormats(barcodeFormats)
            .build();
        cameraSource = new CameraSource.Builder(activity, barcodeDetector)
            .setFacing(cameraFacingBack)
            .setFlashMode(flashEnabledByDefault ? Camera.Parameters.FLASH_MODE_TORCH : null)
            .setFocusMode(focusMode)
            .build();
    }

    public ViewGroup getRootView() {
        return rootView;
    }

    /**
     * Get the activity associated with this builder
     *
     * @return
     */
    @Nullable
    public Activity getActivity() {
        return activity;
    }

    /**
     * Get the barcode detector associated with this builder
     *
     * @return
     */
    public BarcodeDetector getBarcodeDetector() {
        return barcodeDetector;
    }

    /**
     * Get the camera source associated with this builder
     *
     * @return
     */
    public CameraSource getCameraSource() {
        return cameraSource;
    }

    /**
     * Get the tracker color associated with this builder
     *
     * @return
     */
    public int getTrackerColor() {
        return trackerColor;
    }

    /**
     * Get the text associated with this builder
     *
     * @return
     */
    public String getText() {
        return text;
    }

    /**
     * Get the bleep enabled value associated with this builder
     *
     * @return
     */
    public boolean isBleepEnabled() {
        return bleepEnabled;
    }

    /**
     * Get the flash enabled by default value associated with this builder
     *
     * @return
     */
    public boolean isFlashEnabledByDefault() {
        return flashEnabledByDefault;
    }

    /**
     * Get the tracker detected resource id value associated with this builder
     *
     * @return
     */
    public int getTrackerDetectedResourceID() {
        return trackerDetectedResourceID;
    }

    /**
     * Get the tracker resource id value associated with this builder
     *
     * @return
     */
    public int getTrackerResourceID() {
        return trackerResourceID;
    }

    /**
     * Get the scanner mode value associated with this builder
     *
     * @return
     */
    public int getScannerMode() {
        return scannerMode;
    }

    public boolean isUsedBuilder() {
        return used;
    }

    public void clean() {
        activity = null;
        rootView = null;
        onResultListener = null;
        barcodeDetector = null;
        cameraSource = null;
    }
}


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

import com.facebook.presto.block.Block;
import com.facebook.presto.block.RandomAccessBlock;
import com.google.common.base.Objects;
import com.google.common.base.Preconditions;
import io.airlift.slice.Slice;
import io.airlift.units.DataSize;
import io.airlift.units.DataSize.Unit;

import java.util.Arrays;

public class RandomAccessPage
{
    private final RandomAccessBlock[] blocks;
    private final int positionCount;

    public RandomAccessPage(RandomAccessBlock... blocks)
    {
        this(blocks[0].getPositionCount(), blocks);
    }

    public RandomAccessPage(int positionCount, RandomAccessBlock... blocks)
    {
        Preconditions.checkNotNull(blocks, "blocks is null");
        this.blocks = Arrays.copyOf(blocks, blocks.length);
        this.positionCount = positionCount;
    }

    public int getChannelCount()
    {
        return blocks.length;
    }

    public int getPositionCount()
    {
        return positionCount;
    }

    public DataSize getDataSize()
    {
        long dataSize = 0;
        for (Block block : blocks) {
            dataSize += block.getDataSize().toBytes();
        }
        return new DataSize(dataSize, Unit.BYTE);
    }

    public RandomAccessBlock[] getBlocks()
    {
        return blocks.clone();
    }

    public RandomAccessBlock getBlock(int channel)
    {
        return blocks[channel];
    }

    public boolean getBoolean(int channel, int position)
    {
        return getBlock(channel).getBoolean(position);
    }

    public long getLong(int channel, int position)
    {
        return getBlock(channel).getLong(position);
    }

    public double getDouble(int channel, int position)
    {
        return getBlock(channel).getDouble(position);
    }

    public Slice getSlice(int channel, int position)
    {
        return getBlock(channel).getSlice(position);
    }

    public boolean isNull(int channel, int position)
    {
        return getBlock(channel).isNull(position);
    }

    @Override
    public String toString()
    {
        return Objects.toStringHelper(this)
                .add("positionCount", positionCount)
                .add("channelCount", getChannelCount())
                .addValue("@" + Integer.toHexString(System.identityHashCode(this)))
                .toString();
    }
}


text:
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- vim:set ts=4 sw=4 sts=4 noet: */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "phz.h"

#include <cassert>
#include <cerrno>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <memory>
#include <string>

#define BOOST_FILESYSTEM_NO_DEPRECATED
#include <boost/filesystem.hpp>

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-qual"
#include <wx/wfstream.h>
#include <wx/zipstrm.h>
#pragma GCC diagnostic pop

#include "database.h"
#include "flint/utf8path.h"
#include "modelpath.h"

namespace flint {
namespace phz {

bool Read(sqlite3 *db, const boost::filesystem::path &dir)
{
	std::unique_ptr<char[]> filename(GetGivenFilename(db));
	if (!filename)
		return false;
	wxFileInputStream fis(filename.get()); // TODO: locale-dependency?
	if (!fis) {
		std::cerr << "failed to open " << filename.get() << std::endl;
		return false;
	}
	wxZipInputStream zis(fis);

	boost::filesystem::path tp(dir);

	std::unique_ptr<wxZipEntry> entry;
	while (entry.reset(zis.GetNextEntry()), entry) {
		if (entry->IsDir()) {
			// skip a directory entry
			continue;
		}
		wxString name = entry->GetName();
		if (name.empty()) {
			std::cerr << "found empty name in the zip archive" << std::endl;
			continue;
		}
		if (!zis.OpenEntry(*entry)) {
			std::cerr << "failed to open a zip entry: " << name << std::endl;
			return false;
		}
		auto name_s = name.ToStdString();
		if (name_s.empty()) {
			std::cerr << "data loss in converting to std::string: "
					  << name
					  << std::endl;
			continue;
		}

		boost::filesystem::path op(tp);
		op /= name_s;
		boost::filesystem::path pp(op.parent_path());
		boost::filesystem::create_directories(pp);

		std::string op_s = op.string();
		FILE *ofp = std::fopen(op_s.c_str(), "wb");
		if (!ofp) {
			std::perror(op_s.c_str());
			return false;
		}

		size_t size = static_cast<size_t>(entry->GetSize());
		std::unique_ptr<char[]> buf(new char[size]);
		if (!zis.Read(buf.get(), size)) {
			std::cerr << "failed to read zip entry of name " << name << std::endl;
			std::fclose(ofp);
			return false;
		}
		if (std::fwrite(buf.get(), size, 1, ofp) != 1) {
			std::cerr << "failed to write entry of name "
					  << name
					  << " in the zip archive: "
					  << filename.get()
					  << std::endl;
			std::fclose(ofp);
			return false;
		}
		std::fclose(ofp);
	}

	tp /= "model.phml";
	if (!boost::filesystem::is_regular_file(tp)) {
		std::cerr << "missing model.phml in the zip archive: "
			 << filename.get()
			 << std::endl;
		return false;
	}

	boost::filesystem::path amp = boost::filesystem::absolute(tp);
	std::unique_ptr<char[]> mf(GetUtf8FromPath(amp));
	if (!mf)
		return false;
	if (strlen(mf.get()) >= 1024) {
		std::cerr << "resulting filename is too long: "
			 << mf.get()
			 << std::endl;
		return false;
	}
	if (!SaveModelFile(db, mf.get())) return false;

	return true;
}

}
}


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, shrink-to-fit=no">
    <title>Title</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="robots" content="follow, index">
    <link rel="manifest" href="manifest.json">

    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" content="Title">
    <link rel="apple-touch-icon" href="assets/img/apple_icon.png">

    <meta name="mobile-web-app-capable" content="yes">
    <meta name="application-name" content="Title">
    <link rel="icon" sizes="192x192" href="assets/img/chrome_icon.png">
    <meta name="theme-color" content="#000000">

    <meta name="msapplication-tap-highlight" content="no">
    <meta name="msapplication-TileImage" content="assets/img/ms_icon.png">
    <meta name="msapplication-TileColor" content="#000000">

    <meta property="og:title" content="">
    <meta property="og:type" content="website">
    <meta property="og:url" content="">
    <meta property="og:image" content="">
    <meta property="og:description" content="">
    <meta property="og:locale" content="">
    <meta property="og:site_name" content="">
    <meta name="twitter:card" content="summary">
    <meta name="twitter:site" content="@">
    <meta name="twitter:title" content="">
    <meta name="twitter:description" content="">
    <meta name="twitter:image" content="">

      You need to enable JavaScript to run this app.


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE markables SYSTEM "markables.dtd">
<markables xmlns="www.eml.org/NameSpaces/negation">
<markable id="markable_100500176" span="word_10" mmax_level="negation"  emo-expression-ref="emo-expression:markable_100500174" />
<markable id="markable_100500213" span="word_935" mmax_level="negation"  emo-expression-ref="emo-expression:markable_100500209" />
</markables>


text:
package org.jclouds.cloudsigma2.compute.functions;

import org.easymock.EasyMock;
import org.jclouds.cloudsigma2.CloudSigma2Api;
import org.jclouds.cloudsigma2.domain.DeviceEmulationType;
import org.jclouds.cloudsigma2.domain.Drive;
import org.jclouds.cloudsigma2.domain.DriveInfo;
import org.jclouds.cloudsigma2.domain.ServerDrive;
import org.jclouds.compute.domain.Volume;
import org.jclouds.compute.domain.VolumeBuilder;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import java.math.BigInteger;

import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import static org.testng.Assert.assertEquals;

@Test(groups = "unit", testName = "ServerDriveToVolumeTest")
public class ServerDriveToVolumeTest {

   private ServerDrive input;
   private Volume expected;

   @BeforeMethod
   public void setUp() throws Exception {
      input = new ServerDrive.Builder()
            .bootOrder(1)
            .deviceChannel("0:1")
            .deviceEmulationType(DeviceEmulationType.VIRTIO)
            .drive(new Drive.Builder()
                  .uuid("f17cce62-bcc9-4e0b-a57b-a5582b05aff0")
                  .build())
            .build();

      expected = new VolumeBuilder()
            .id("f17cce62-bcc9-4e0b-a57b-a5582b05aff0")
            .size(1024000000.f)
            .durable(true)
            .type(Volume.Type.NAS)
            .bootDevice(true)
            .build();
   }

   public void testConvertServerDrive() {
      CloudSigma2Api api = EasyMock.createMock(CloudSigma2Api.class);

      DriveInfo mockDrive = new DriveInfo.Builder()
            .uuid(input.getDrive().getUuid())
            .size(new BigInteger("1024000000"))
            .build();

      expect(api.getDriveInfo(input.getDrive().getUuid())).andReturn(mockDrive);
      replay(api);

      ServerDriveToVolume function = new ServerDriveToVolume(api);
      assertEquals(function.apply(input), expected);

      verify(api);
   }
}


text:
from staffjoy.resource import Resource
from staffjoy.resources.session import Session
from staffjoy.resources.apikey import ApiKey

class User(Resource):
    PATH = "users/{user_id}"
    ID_NAME = "user_id"

    def get_sessions(self):
        return Session.get_all(parent=self)

    def get_session(self, id):
        return Session.get(parent=self, id=id)

    def get_apikeys(self):
        return ApiKey.get_all(parent=self)

    def get_apikey(self, id):
        return ApiKey.get(parent=self, id=id)


text:
<manifest package="org.no_creativity.aar.alog">

    <application />

</manifest>


text:
// calcAndWrite_Jaccards.cpp
// Jim Bagrow
// Last Modified: 2008-12-30

// USAGE:
//      g++ -O3 -o calc calcAndWrite_Jaccards.cpp
//      ./calc network.pairs network.jaccs
//
//  -- network.pairs is an integer edgelist (one edge, two nodes
//  per line)
//  -- network.jaccs will contain the jaccard coefficient for each
//  pair of edges compared, of the form:
//      i_0 i_1 j_0 j_1 jaccard<newline>
//      ...
//  for edges (i_0,i_1) and (j_0,j_1)

// same as calcAndWrite_Jaccards.cpp, but without the graph code...
// but not much quicker (:-()

// all this does is calculate the jaccard for "each" edge pair and
// write it to a file.  Two make this into real code will take some
// more work (the next step can be the hierarchical clustering over
// the output jacc file...)

// CORRECTNESS:
//  Returns same jaccard file as calcAndWrite_Jaccards.cpp, as shown
//  by compareTwoJaccs.py...

#include <fstream>
#include <iostream>
#include <set>
#include <vector>
#include <algorithm> // for swap
using namespace std;

int intersection_size( const set<int> &A, const set<int> &B ) {
    // only get number of elements, don't build a new set
    // this assumes the sets are ordered, which std::sets are!
    int num = 0;
    set<int>::const_iterator As = A.begin(), Af = A.end(),
                             Bs = B.begin(), Bf = B.end();
    while ( As != Af && Bs != Bf ) {
        if ( *As < *Bs) {
            ++As;
        } else if ( *Bs < *As ) {
            ++Bs;
        } else {
            ++num;
            ++As;
            ++Bs;
        }
    }
    return num;
}

int main (int argc, char const *argv[]){
    // make sure args are present:
    if (!argv[1]){
        cerr << "ERROR: no input file specified" << endl;
        cerr << "usage:\n    " << argv[0] << " input.pairs output.jaccs" << endl;
        exit(1);
    }
    if (!argv[2]){
        cerr << "ERROR: no output file specified" << endl;
        cerr << "usage:\n    " << argv[0] << " input.pairs output.jaccs" << endl;
        exit(1);
    }

    // load edgelist into two arrays, and into an array of sets:
    ifstream inFile;
    inFile.open (argv[1]);
    if (!inFile) {
        cerr << "ERROR: unable to open input file" << endl;
        exit(1); // terminate with error
    }
    int ni,nj, max_node = -1;
    while (inFile >> ni >> nj){ // scan edgelist once to get number of edges and nodes, for allocation
        if (ni > max_node){  max_node = ni;  }
        if (nj > max_node){  max_node = nj;  }
    }
    inFile.close();

    int num_nodes = max_node + 1; // assumes nodes are contiguous ints starting at zero
    set<int> *neighbors = NULL;
    neighbors = new set<int>[num_nodes]; // this stores the network

    inFile.open( argv[1] );
    int index = 0;
    while (inFile >> ni >> nj){ // rescan edgelist to populate
        neighbors[ni].insert(nj);
        neighbors[nj].insert(ni); // undirected
    }
    for (int i=0; i < num_nodes; i++){
        neighbors[i].insert(i); // neighbors[] is now INCLUSIVE!
    }
    inFile.close();
    // end load edgelist

    // do the gosh darn calculation, fool!
    FILE * jaccFile = fopen(argv[2],"w");
    int n_i, n_j, keystone, len_int;
    double curr_jacc;
    set<int>::iterator i, j;
    for (int keystone=0; keystone < num_nodes; keystone++) { // loop over keystones

        for ( i = neighbors[keystone].begin(); i != neighbors[keystone].end(); i++) { // neighbors of keystone
            n_i = *i;
            if (n_i == keystone)
                continue;

            for ( j = neighbors[keystone].begin(); j != neighbors[keystone].end(); j++ ) { // neighbors of keystone
                n_j = *j;
                if (n_j == keystone or n_i >= n_j)
                    continue;

                len_int = intersection_size( neighbors[n_i], neighbors[n_j] );    // my set intersection function
                curr_jacc = (double) len_int / (double)( neighbors[n_i].size() + neighbors[n_j].size() - len_int );

                if (keystone < n_i && keystone < n_j){
                    fprintf( jaccFile, "%i\t%i\t%i\t%i\t%f\n", keystone, n_i, keystone, n_j, curr_jacc );
                } else if (keystone < n_i && keystone > n_j){
                    fprintf( jaccFile, "%i\t%i\t%i\t%i\t%f\n", keystone, n_i, n_j, keystone, curr_jacc );
                } else if (keystone > n_i && keystone < n_j){
                    fprintf( jaccFile, "%i\t%i\t%i\t%i\t%f\n", n_i, keystone, keystone, n_j, curr_jacc );
                } else {
                    fprintf( jaccFile, "%i\t%i\t%i\t%i\t%f\n", n_i, keystone, n_j, keystone, curr_jacc );
                }
            }
        }
    } // done loop over keystones
    fclose(jaccFile);

    delete [] neighbors; // all done, clean up memory...

    return 0;
}