text:
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.txt)
[![Build Status](https://img.shields.io/travis/cakephp/cakephp/master.svg?style=flat-square)](https://travis-ci.org/cakephp/cakephp)
[![Coverage Status](https://img.shields.io/codecov/c/github/cakephp/cakephp.svg?style=flat-square)](https://codecov.io/github/cakephp/cakephp)
[![Code Consistency](https://squizlabs.github.io/PHP_CodeSniffer/analysis/cakephp/cakephp/grade.svg)](http://squizlabs.github.io/PHP_CodeSniffer/analysis/cakephp/cakephp/)
[![Total Downloads](https://img.shields.io/packagist/dt/cakephp/cakephp.svg?style=flat-square)](https://packagist.org/packages/cakephp/cakephp)
[![Latest Stable Version](https://img.shields.io/packagist/v/cakephp/cakephp.svg?style=flat-square&label=stable)](https://packagist.org/packages/cakephp/cakephp)

[CakePHP](http://www.cakephp.org) is a rapid development framework for PHP which
uses commonly known design patterns like Associative Data
Mapping, Front Controller, and MVC.  Our primary goal is to provide a structured
framework that enables PHP users at all levels to rapidly develop robust web
applications, without any loss to flexibility.

## Installing CakePHP via Composer

You can install CakePHP into your project using
[Composer](http://getcomposer.org).  If you're starting a new project, we
recommend using the [app skeleton](https://github.com/cakephp/app) as
a starting point. For existing applications you can run the following:

``` bash
$ composer require cakephp/cakephp:"~3.2"
```

## Running Tests

Assuming you have PHPUnit installed system wide using one of the methods stated
[here](http://phpunit.de/manual/current/en/installation.html), you can run the
tests for CakePHP by doing the following:

1. Copy `phpunit.xml.dist` to `phpunit.xml`.
2. Add the relevant database credentials to your `phpunit.xml` if you want to run tests against
   a non-SQLite datasource.
3. Run `phpunit`.

## Some Handy Links

[CakePHP](http://www.cakephp.org) - The rapid development PHP framework.

[CookBook](http://book.cakephp.org) - The CakePHP user documentation; start learning here!

[API](http://api.cakephp.org) - A reference to CakePHP's classes.

[Plugins](http://plugins.cakephp.org) - A repository of extensions to the framework.

[The Bakery](http://bakery.cakephp.org) - Tips, tutorials and articles.

[Community Center](http://community.cakephp.org) - A source for everything community related.

[Training](http://training.cakephp.org) - Join a live session and get skilled with the framework.

[CakeFest](http://cakefest.org) - Don't miss our annual CakePHP conference.

[Cake Software Foundation](http://cakefoundation.org) - Promoting development related to CakePHP.

## Get Support!

[Slack](http://cakesf.herokuapp.com/) - Join us on Slack.

[#cakephp](http://webchat.freenode.net/?channels=#cakephp) on irc.freenode.net - Come chat with us, we have cake.

[Forum](http://discourse.cakephp.org/) - Offical CakePHP forum.

[GitHub Issues](https://github.com/cakephp/cakephp/issues) - Got issues? Please tell us!

[Roadmaps](https://github.com/cakephp/cakephp/wiki#roadmaps) - Want to contribute? Get involved!

## Contributing

[CONTRIBUTING.md](.github/CONTRIBUTING.md) - Quick pointers for contributing to the CakePHP project.

[CookBook "Contributing" Section](http://book.cakephp.org/3.0/en/contributing.html) - Details about contributing to the project.

# Security

If you've found a security issue in CakePHP, please use the following procedure instead of the normal bug reporting system. Instead of using the bug tracker, mailing list or IRC please send an email to security [at] cakephp.org. Emails sent to this address go to the CakePHP core team on a private mailing list.

For each report, we try to first confirm the vulnerability. Once confirmed, the CakePHP team will take the following actions:

- Acknowledge to the reporter that we've received the issue, and are working on a fix. We ask that the reporter keep the issue confidential until we announce it.
- Get a fix/patch prepared.
- Prepare a post describing the vulnerability, and the possible exploits.
- Release new versions of all affected versions.
- Prominently feature the problem in the release announcement.


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Ranunculus auricomus subsp. rubicundulus Markl. ex Fagerstr.

### Remarks
null

redpajama_set_name: RedPajamaGithub


text:
function GetQueryString(name)
{
     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
     var r = window.location.search.substr(1).match(reg);
     if(r!=null)return  unescape(r[2]); return null;
}
GetQueryString("code");


text:
body {
    display: unkown-property;
}


text:
//#define LOG_NDEBUG 0
#define LOG_TAG "MetadataRetrieverClient"
#include <utils/Log.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <unistd.h>

#include <string.h>
#include <cutils/atomic.h>
#include <cutils/properties.h>
#include <binder/MemoryBase.h>
#include <binder/MemoryHeapBase.h>
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
#include <media/MediaMetadataRetrieverInterface.h>
#include <media/MediaPlayerInterface.h>
#include <private/media/VideoFrame.h>
#include "MidiMetadataRetriever.h"
#include "MetadataRetrieverClient.h"
#include "StagefrightMetadataRetriever.h"
#include "MediaPlayerFactory.h"

namespace android {

MetadataRetrieverClient::MetadataRetrieverClient(pid_t pid)
{
    ALOGV("MetadataRetrieverClient constructor pid(%d)", pid);
    mPid = pid;
    mThumbnail = NULL;
    mAlbumArt = NULL;
    mRetriever = NULL;
}

MetadataRetrieverClient::~MetadataRetrieverClient()
{
    ALOGV("MetadataRetrieverClient destructor");
    disconnect();
}

status_t MetadataRetrieverClient::dump(int fd, const Vector<String16>& args) const
{
    const size_t SIZE = 256;
    char buffer[SIZE];
    String8 result;
    result.append(" MetadataRetrieverClient\n");
    snprintf(buffer, 255, "  pid(%d)\n", mPid);
    result.append(buffer);
    write(fd, result.string(), result.size());
    write(fd, "\n", 1);
    return NO_ERROR;
}

void MetadataRetrieverClient::disconnect()
{
    ALOGV("disconnect from pid %d", mPid);
    Mutex::Autolock lock(mLock);
    mRetriever.clear();
    mThumbnail.clear();
    mAlbumArt.clear();
    IPCThreadState::self()->flushCommands();
}

static sp<MediaMetadataRetrieverBase> createRetriever(player_type playerType)
{
    sp<MediaMetadataRetrieverBase> p;
    switch (playerType) {
        case STAGEFRIGHT_PLAYER:
        case NU_PLAYER:
        {
            p = new StagefrightMetadataRetriever;
            break;
        }
        case SONIVOX_PLAYER:
            ALOGV("create midi metadata retriever");
            p = new MidiMetadataRetriever();
            break;
        default:
            // TODO:
            // support for TEST_PLAYER
            ALOGE("player type %d is not supported",  playerType);
            break;
    }
    if (p == NULL) {
        ALOGE("failed to create a retriever object");
    }
    return p;
}

status_t MetadataRetrieverClient::setDataSource(
        const char *url, const KeyedVector<String8, String8> *headers)
{
    ALOGV("setDataSource(%s)", url);
    Mutex::Autolock lock(mLock);
    if (url == NULL) {
        return UNKNOWN_ERROR;
    }

    // When asking the MediaPlayerFactory subsystem to choose a media player for
    // a given URL, a pointer to an outer IMediaPlayer can be passed to the
    // factory system to be taken into consideration along with the URL.  In the
    // case of choosing an instance of a MediaPlayerBase for a
    // MetadataRetrieverClient, there is no outer IMediaPlayer which will
    // eventually encapsulate the result of this selection.  In this case, just
    // pass NULL to getPlayerType to indicate that there is no outer
    // IMediaPlayer to consider during selection.
    player_type playerType =
        MediaPlayerFactory::getPlayerType(NULL /* client */, url);
    ALOGV("player type = %d", playerType);
    sp<MediaMetadataRetrieverBase> p = createRetriever(playerType);
    if (p == NULL) return NO_INIT;
    status_t ret = p->setDataSource(url, headers);
    if (ret == NO_ERROR) mRetriever = p;
    return ret;
}

status_t MetadataRetrieverClient::setDataSource(int fd, int64_t offset, int64_t length)
{
    ALOGV("setDataSource fd=%d, offset=%lld, length=%lld", fd, offset, length);
    Mutex::Autolock lock(mLock);
    struct stat sb;
    int ret = fstat(fd, &sb);
    if (ret != 0) {
        ALOGE("fstat(%d) failed: %d, %s", fd, ret, strerror(errno));
        return BAD_VALUE;
    }
    ALOGV("st_dev  = %llu", sb.st_dev);
    ALOGV("st_mode = %u", sb.st_mode);
    ALOGV("st_uid  = %lu", sb.st_uid);
    ALOGV("st_gid  = %lu", sb.st_gid);
    ALOGV("st_size = %llu", sb.st_size);

    if (offset >= sb.st_size) {
        ALOGE("offset (%lld) bigger than file size (%llu)", offset, sb.st_size);
        ::close(fd);
        return BAD_VALUE;
    }
    if (offset + length > sb.st_size) {
        length = sb.st_size - offset;
        ALOGV("calculated length = %lld", length);
    }

    player_type playerType =
        MediaPlayerFactory::getPlayerType(NULL /* client */,
                                          fd,
                                          offset,
                                          length);
    ALOGV("player type = %d", playerType);
    sp<MediaMetadataRetrieverBase> p = createRetriever(playerType);
    if (p == NULL) {
        ::close(fd);
        return NO_INIT;
    }
    status_t status = p->setDataSource(fd, offset, length);
    if (status == NO_ERROR) mRetriever = p;
    ::close(fd);
    return status;
}

sp<IMemory> MetadataRetrieverClient::getFrameAtTime(int64_t timeUs, int option)
{
    ALOGV("getFrameAtTime: time(%lld us) option(%d)", timeUs, option);
    Mutex::Autolock lock(mLock);
    mThumbnail.clear();
    if (mRetriever == NULL) {
        ALOGE("retriever is not initialized");
        return NULL;
    }
    VideoFrame *frame = mRetriever->getFrameAtTime(timeUs, option);
    if (frame == NULL) {
        ALOGE("failed to capture a video frame");
        return NULL;
    }
    size_t size = sizeof(VideoFrame) + frame->mSize;
    sp<MemoryHeapBase> heap = new MemoryHeapBase(size, 0, "MetadataRetrieverClient");
    if (heap == NULL) {
        ALOGE("failed to create MemoryDealer");
        delete frame;
        return NULL;
    }
    mThumbnail = new MemoryBase(heap, 0, size);
    if (mThumbnail == NULL) {
        ALOGE("not enough memory for VideoFrame size=%u", size);
        delete frame;
        return NULL;
    }
    VideoFrame *frameCopy = static_cast<VideoFrame *>(mThumbnail->pointer());
    frameCopy->mWidth = frame->mWidth;
    frameCopy->mHeight = frame->mHeight;
    frameCopy->mDisplayWidth = frame->mDisplayWidth;
    frameCopy->mDisplayHeight = frame->mDisplayHeight;
    frameCopy->mSize = frame->mSize;
    frameCopy->mRotationAngle = frame->mRotationAngle;
    ALOGV("rotation: %d", frameCopy->mRotationAngle);
    frameCopy->mData = (uint8_t *)frameCopy + sizeof(VideoFrame);
    memcpy(frameCopy->mData, frame->mData, frame->mSize);
    delete frame;  // Fix memory leakage
    return mThumbnail;
}

sp<IMemory> MetadataRetrieverClient::extractAlbumArt()
{
    ALOGV("extractAlbumArt");
    Mutex::Autolock lock(mLock);
    mAlbumArt.clear();
    if (mRetriever == NULL) {
        ALOGE("retriever is not initialized");
        return NULL;
    }
    MediaAlbumArt *albumArt = mRetriever->extractAlbumArt();
    if (albumArt == NULL) {
        ALOGE("failed to extract an album art");
        return NULL;
    }
    size_t size = sizeof(MediaAlbumArt) + albumArt->mSize;
    sp<MemoryHeapBase> heap = new MemoryHeapBase(size, 0, "MetadataRetrieverClient");
    if (heap == NULL) {
        ALOGE("failed to create MemoryDealer object");
        delete albumArt;
        return NULL;
    }
    mAlbumArt = new MemoryBase(heap, 0, size);
    if (mAlbumArt == NULL) {
        ALOGE("not enough memory for MediaAlbumArt size=%u", size);
        delete albumArt;
        return NULL;
    }
    MediaAlbumArt *albumArtCopy = static_cast<MediaAlbumArt *>(mAlbumArt->pointer());
    albumArtCopy->mSize = albumArt->mSize;
    albumArtCopy->mData = (uint8_t *)albumArtCopy + sizeof(MediaAlbumArt);
    memcpy(albumArtCopy->mData, albumArt->mData, albumArt->mSize);
    delete albumArt;  // Fix memory leakage
    return mAlbumArt;
}

const char* MetadataRetrieverClient::extractMetadata(int keyCode)
{
    ALOGV("extractMetadata");
    Mutex::Autolock lock(mLock);
    if (mRetriever == NULL) {
        ALOGE("retriever is not initialized");
        return NULL;
    }
    return mRetriever->extractMetadata(keyCode);
}

}; // namespace android


text:
/**
 * The `applyToJSON()` function defines toJSON() and inspect() prototype
 * methods which are aliases for toString().
 */
export default function applyToJSON(classObject: Class<any>): void {
  classObject.prototype.toJSON = classObject.prototype.inspect =
    classObject.prototype.toString;
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>E-Index</title>
<meta name="date" content="2014-09-01">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

A B C D E F G H I K L M N O P R S T U V W X

E

ECDSASignature - Class in org.security.crypt.signature

Implements the ECDSA algorithm.

ECDSASignature() - Constructor for class org.security.crypt.signature.ECDSASignature

Creates a new ECDSA signature instance that uses SHA-1 for computation of
 message digests.

ECDSASignature(DigestAlgorithm) - Constructor for class org.security.crypt.signature.ECDSASignature

Creates a new ECDSA signature instance that uses the given digest
 algorithm for message digest computation.

ECUtils - Class in org.security.crypt.util

Elliptic curve cryptography utilty methods.

encodeCert(Certificate) - Static method in class org.security.crypt.util.PemHelper

Encodes the given certificate to PEM format.

encodeKey(PublicKey) - Static method in class org.security.crypt.util.PemHelper

Encodes the given public key to PEM format.

encodeKey(PrivateKey, char[], SecureRandom) - Static method in class org.security.crypt.util.PemHelper

Encodes the given private key to PEM format.

encrypt(int[]) - Method in class org.security.crypt.a9cipher.AES

encrypt(byte[]) - Method in class org.security.crypt.a9cipher.DES

encrypt(int[]) - Method in class org.security.crypt.a9cipher.RC4

encrypt(int[]) - Method in class org.security.crypt.a9cipher.Rijndael

encrypt(byte[]) - Method in class org.security.crypt.AbstractEncryptionAlgorithm

Encrypts the given plaintext bytes into a byte array of ciphertext using
 the encryption key.

encrypt(byte[], Converter) - Method in class org.security.crypt.AbstractEncryptionAlgorithm

Encrypts the given plaintext bytes into a ciphertext string using the
 conversion strategy provided by the given converter.

encrypt(InputStream, OutputStream) - Method in class org.security.crypt.AbstractEncryptionAlgorithm

Encrypts the data in the given plaintext input stream into ciphertext in
 the output stream.

encrypt(byte[]) - Method in interface org.security.crypt.EncryptionAlgorithm

Encrypts the given plaintext bytes into a byte array of ciphertext using
 the encryption key.

encrypt(byte[], Converter) - Method in interface org.security.crypt.EncryptionAlgorithm

Encrypts the given plaintext bytes into a ciphertext string using the
 conversion strategy provided by the given converter.

encrypt(InputStream, OutputStream) - Method in interface org.security.crypt.EncryptionAlgorithm

Encrypts the data in the given plaintext input stream into ciphertext in
 the output stream.

encrypt(char[], byte[]) - Method in class org.security.crypt.pbe.AbstractEncryptionScheme

Encrypts the given plaintext bytes into a byte array of ciphertext using
 an encryption key derived from the password.

encrypt(char[], InputStream, OutputStream) - Method in class org.security.crypt.pbe.AbstractEncryptionScheme

Encrypts the data in the given plaintext input stream into ciphertext in
 the output stream.

encrypt(char[], byte[]) - Method in interface org.security.crypt.pbe.EncryptionScheme

Encrypts the given plaintext bytes into a byte array of ciphertext using
 an encryption key derived from the password.

encrypt(char[], InputStream, OutputStream) - Method in interface org.security.crypt.pbe.EncryptionScheme

Encrypts the data in the given plaintext input stream into ciphertext in
 the output stream.

EncryptionAlgorithm - Interface in org.security.crypt

Describes operations common to both symmetric and asymmetric encryption
 algorithms.

EncryptionScheme - Interface in org.security.crypt.pbe

Describes a password-based encryption scheme.

EncryptPropertyTask - Class in org.security.crypt.tasks

 EncryptPropertyTask will encrypt an ant property using a
 symmetric algorithm.

EncryptPropertyTask() - Constructor for class org.security.crypt.tasks.EncryptPropertyTask

equal(File, File) - Static method in class org.security.crypt.FileHelper

Determines whether the contents of two files are equal by hashing their
 contents and comparing the resulting hash.

equal(InputStream, InputStream) - Static method in class org.security.crypt.FileHelper

Determines whether the contents of two streams are equal by hashing their
 contents and comparing the resulting hash.

equals(Object) - Method in class org.security.crypt.x509.BasicConstraints

equals(Object) - Method in class org.security.crypt.x509.types.AbstractList

equals(Object) - Method in class org.security.crypt.x509.types.AccessDescription

equals(Object) - Method in class org.security.crypt.x509.types.AttributeTypeAndValue

equals(Object) - Method in class org.security.crypt.x509.types.AuthorityKeyIdentifier

equals(Object) - Method in class org.security.crypt.x509.types.BasicConstraints

equals(Object) - Method in class org.security.crypt.x509.types.BitString

equals(Object) - Method in class org.security.crypt.x509.types.DistributionPoint

equals(Object) - Method in class org.security.crypt.x509.types.GeneralName

equals(Object) - Method in class org.security.crypt.x509.types.KeyIdentifier

equals(Object) - Method in class org.security.crypt.x509.types.NoticeReference

equals(Object) - Method in class org.security.crypt.x509.types.PolicyInformation

equals(Object) - Method in class org.security.crypt.x509.types.PolicyQualifierInfo

equals(Object) - Method in class org.security.crypt.x509.types.UserNotice

ESCAPE_CHAR - Static variable in class org.security.crypt.x509.types.AttributeTypeAndValue

Escape character.

ESCAPE_CHARSET - Static variable in class org.security.crypt.x509.types.AttributeTypeAndValue

Set of characters in the value that MUST be escaped in the string
 representation.

execute() - Method in class org.security.crypt.tasks.AbstractCryptTask

.

execute() - Method in class org.security.crypt.tasks.DecryptPropertyTask

 See @link{org.apache.tools.ant.Task}.

execute() - Method in class org.security.crypt.tasks.EncryptPropertyTask

 See @link{org.apache.tools.ant.Task}.

ExtensionFactory - Class in org.security.crypt.x509

Creates X.509v3 extension types in the VT Crypt namespace from BouncyCastle
 ASN1Encodable types.

ExtensionReader - Class in org.security.crypt.x509

Reads X.509v3 extended properties from an X509Certificate object.

ExtensionReader(X509Certificate) - Constructor for class org.security.crypt.x509.ExtensionReader

Creates a new instance that can read extension fields from the given
 X.509 certificate.

ExtensionReaderTest - Class in org.security.crypt.x509

Unit test for ExtensionReader class.

ExtensionReaderTest() - Constructor for class org.security.crypt.x509.ExtensionReaderTest

ExtensionType - Enum in org.security.crypt.x509

Enumeration of X.509v3 extension fields defined in section 4.2 of RFC 2459.

A B C D E F G H I K L M N O P R S T U V W X

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes


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

package com.google.devtools.build.lib.testutil;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.UUID;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * Some static utility functions for testing.
 */
public class TestUtils {
  public static final ThreadPoolExecutor POOL =
    (ThreadPoolExecutor) Executors.newFixedThreadPool(10);

  public static final UUID ZERO_UUID = UUID.fromString("00000000-0000-0000-0000-000000000000");

  /**
   * Wait until the {@link System#currentTimeMillis} / 1000 advances.
   *
   * This method takes 0-1000ms to run, 500ms on average.
   */
  public static void advanceCurrentTimeSeconds() throws InterruptedException {
    long currentTimeSeconds = System.currentTimeMillis() / 1000;
    do {
      Thread.sleep(50);
    } while (currentTimeSeconds == System.currentTimeMillis() / 1000);
  }

  public static ThreadPoolExecutor getPool() {
    return POOL;
  }

  public static String tmpDir() {
    return tmpDirFile().getAbsolutePath().replaceAll("\\\\", "/");
  }

  static String getUserValue(String key) {
    String value = System.getProperty(key);
    if (value == null) {
      value = System.getenv(key);
    }
    return value;
  }

  public static File tmpDirFile() {
    File tmpDir;

    // Flag value specified in environment?
    String tmpDirStr = getUserValue("TEST_TMPDIR");

    if (tmpDirStr != null && tmpDirStr.length() > 0) {
      tmpDir = new File(tmpDirStr);
    } else {
      // Fallback default $TEMP/$USER/tmp/$TESTNAME
      String baseTmpDir = System.getProperty("java.io.tmpdir");
      tmpDir = new File(baseTmpDir).getAbsoluteFile();

      // .. Add username
      String username = System.getProperty("user.name");
      username = username.replace('/', '_');
      username = username.replace('\\', '_');
      username = username.replace('\000', '_');
      tmpDir = new File(tmpDir, username);
      tmpDir = new File(tmpDir, "tmp");
    }

    // Ensure tmpDir exists
    if (!tmpDir.isDirectory()) {
      tmpDir.mkdirs();
    }
    return tmpDir;
  }

  public static File makeTempDir() throws IOException {
    File dir = File.createTempFile(TestUtils.class.getName(), ".temp", tmpDirFile());
    if (!dir.delete()) {
      throw new IOException("Cannot remove a temporary file " + dir);
    }
    if (!dir.mkdir()) {
      throw new IOException("Cannot create a temporary directory " + dir);
    }
    return dir;
  }

  public static int getRandomSeed() {
    // Default value if not running under framework
    int randomSeed = 301;

    // Value specified in environment by framework?
    String value = getUserValue("TEST_RANDOM_SEED");
    if ((value != null) && (value.length() > 0)) {
      try {
        randomSeed = Integer.parseInt(value);
      } catch (NumberFormatException e) {
        // throw new AssertionError("TEST_RANDOM_SEED must be an integer");
        throw new RuntimeException("TEST_RANDOM_SEED must be an integer");
      }
    }

    return randomSeed;
  }

  public static byte[] serializeObject(Object obj) throws IOException {
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    try (ObjectOutputStream objectStream = new ObjectOutputStream(outputStream)) {
      objectStream.writeObject(obj);
    }
    return outputStream.toByteArray();
  }

  public static Object deserializeObject(byte[] buf) throws IOException, ClassNotFoundException {
    try (ObjectInputStream inStream = new ObjectInputStream(new ByteArrayInputStream(buf))) {
      return inStream.readObject();
    }
  }

  /**
   * Timeouts for asserting that an arbitrary event occurs eventually.
   *
   *
In general, it's not appropriate to use a small constant timeout for an arbitrary
   * computation since there is no guarantee that a snippet of code will execute within a given
   * amount of time - you are at the mercy of the jvm, your machine, and your OS. In theory we
   * could try to take all of these factors into account but instead we took the simpler and
   * obviously correct approach of not having timeouts.
   *
   *
If a test that uses these timeout values is failing due to a "timeout" at the
   * 'blaze test' level, it could be because of a legitimate deadlock that would have been caught
   * if the timeout values below were small. So you can rule out such a deadlock by changing these
   * values to small numbers (also note that the --test_timeout blaze flag may be useful).
   */
  public static final long WAIT_TIMEOUT_MILLISECONDS = Long.MAX_VALUE;
  public static final long WAIT_TIMEOUT_SECONDS = WAIT_TIMEOUT_MILLISECONDS / 1000;
}


text:
var gulp = require('gulp')
var fs   = require('fs-extra')
var del  = require('del')
var path = require('path')

var replaceFiles = function (cb) {
  var temp = path.resolve(process.env.PWD, PATH_CONFIG.dest)
  var dest = path.resolve(process.env.PWD, PATH_CONFIG.finalDest)
  var delPatterns = (TASK_CONFIG.clean && TASK_CONFIG.clean.patterns) ? TASK_CONFIG.clean.patterns : dest

  fs.copySync(temp, dest)
  del.sync(temp, { force: true })

  cb()
}

gulp.task('replaceFiles', replaceFiles)

module.exports = replaceFiles


text:
function Get-ShareableDatastore {
        # Get all datastores.
        $datastores = Get-Datastore

        # Load the HostStorageSystems of all hosts.
        $hosts = Get-VMHost | Get-View -property ConfigManager
        $storageSystems = @()
        foreach ($h in $hosts) {
                $sdi = Get-View $h.ConfigManager.StorageSystem -Property StorageDeviceInfo
                Write-Debug ("GSD: SDI for host $h is " + $sdi)
                $storageSystems += $sdi
        }

        foreach ($dso in $datastores) {
                $ds = $dso | Get-View -Property Info

                # Check if this datastore is NFS.
                $dsInfo = $ds.Info
                Write-Debug ("GSD: Is it NFS? " + $dsInfo.getType())
                if ($dsInfo -is [VMware.Vim.NasDatastoreInfo]) {
                        Write-Output $dso
                        continue
                }

                # Get the first extent of the datastore.
                $firstExtent = $dsInfo.Vmfs.Extent[0]
                Write-Debug ("GSD: first extent: " + $firstExtent.DiskName)

                # Find a host that maps this LUN.
                foreach ($hss in $storageSystems) {
                        $lun = $hss.StorageDeviceInfo.ScsiLun | Where { $_.CanonicalName -eq $firstExtent.DiskName }

                        if ($lun) {
                                Write-Debug ("GSD: found " + $lun.DeviceName + " on " + $hss.MoRef.Value)
                                Write-Debug ("GSD: LUN details: Name:" + $lun.DisplayName + ", Type:" + $lun.DeviceType + ", Vendor:" + $lun.Vendor + ", Model:" + $lun.Model)

                                # Search the adapter topology of this host, looking for the LUN.
                                $adapterTopology = $hss.StorageDeviceInfo.ScsiTopology.Adapter |
                                        Where { $_.Target |
                                                Where { $_.Lun |
                                                        Where { $_.ScsiLun -eq $lun.key }
                                                }
                                        } | Select -First 1

                                # We've found a host that has this LUN. Find how it maps to an adapter.
                                $adapter = $hss.StorageDeviceInfo.HostBusAdapter | Where { $_.Key -eq $adapterTopology.Adapter }
                                Write-Debug ("GSD: HBA type is: " + $adapter.getType())

                                # It's shared if it's Fibre Channel or iSCSI (we checked for NFS earlier)
                                if ($adapter -is [VMware.Vim.HostFibreChannelHba] -or $adapter -is [VMware.Vim.HostInternetScsiHba]) {
                                        Write-Debug "GSO: $dso is sharable"
                                        Write-Output $dso
                                }

                                # Otherwise it's not shared and we quit walking through hosts.
                                break
                        }
                }
        }
}


text:
package scredis.io

import com.typesafe.scalalogging.LazyLogging

import akka.actor._

import scredis.Transaction
import scredis.exceptions._
import scredis.protocol._
import scredis.util.UniqueNameGenerator

import scala.util.Try
import scala.concurrent.{ ExecutionContext, Future, Await }
import scala.concurrent.duration._

import java.net.InetSocketAddress
import java.util.concurrent.locks.ReentrantReadWriteLock

/**
 * This trait represents a non-blocking connection to a `Redis` server.
 */
abstract class AkkaNonBlockingConnection(
  system: ActorSystem,
  host: String,
  port: Int,
  passwordOpt: Option[String],
  database: Int,
  nameOpt: Option[String],
  decodersCount: Int,
  receiveTimeoutOpt: Option[FiniteDuration],
  connectTimeout: FiniteDuration,
  maxWriteBatchSize: Int,
  tcpSendBufferSizeHint: Int,
  tcpReceiveBufferSizeHint: Int,
  akkaListenerDispatcherPath: String,
  akkaIODispatcherPath: String,
  akkaDecoderDispatcherPath: String
) extends AbstractAkkaConnection(
  system = system,
  host = host,
  port = port,
  passwordOpt = passwordOpt,
  database = database,
  nameOpt = nameOpt,
  decodersCount = decodersCount,
  receiveTimeoutOpt = receiveTimeoutOpt,
  connectTimeout = connectTimeout,
  maxWriteBatchSize = maxWriteBatchSize,
  tcpSendBufferSizeHint = tcpSendBufferSizeHint,
  tcpReceiveBufferSizeHint = tcpReceiveBufferSizeHint,
  akkaListenerDispatcherPath = akkaListenerDispatcherPath,
  akkaIODispatcherPath = akkaIODispatcherPath,
  akkaDecoderDispatcherPath = akkaDecoderDispatcherPath
) with NonBlockingConnection with TransactionEnabledConnection {

  private val lock = new ReentrantReadWriteLock()

  protected implicit val listenerActor = system.actorOf(
    Props(
      classOf[ListenerActor],
      host,
      port,
      passwordOpt,
      database,
      nameOpt,
      decodersCount,
      receiveTimeoutOpt,
      connectTimeout,
      maxWriteBatchSize,
      tcpSendBufferSizeHint,
      tcpReceiveBufferSizeHint,
      akkaIODispatcherPath,
      akkaDecoderDispatcherPath
    ).withDispatcher(akkaListenerDispatcherPath),
    UniqueNameGenerator.getUniqueName(s"${nameOpt.getOrElse(s"$host:$port")}-listener-actor")
  )

  override protected def send[A](request: Request[A]): Future[A] = {
    if (isShuttingDown) {
      Future.failed(RedisIOException(s"Connection has been shutdown to $host:$port"))
    } else {
      logger.debug(s"Sending request: $request")
      updateState(request)
      Protocol.send(request)
    }
  }

  override protected def send(transaction: Transaction): Future[Vector[Try[Any]]] = {
    if (isShuttingDown) {
      Future.failed(RedisIOException(s"Connection has been shutdown to $host:$port"))
    } else {
      logger.debug(s"Sending transaction: $transaction")
      transaction.requests.foreach(updateState)
      Protocol.send(transaction)
    }
  }

}


text:
/* Extensions to Bootstrap Functionality */
.progress-value {
    position:absolute;
    right:0;
    left:0;
}


text:
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Microsoft.Recognizers.Text.DataDrivenTests.Choice
{
    [TestClass]
    public class TestChoice_Portuguese : TestBase
    {
        public static TestResources TestResources { get; protected set; }

        [ClassInitialize]
        public static void ClassInitialize(TestContext context)
        {
            TestResources = new TestResources();
            TestResources.InitFromTestContext(context);
        }

        [TestInitialize]
        public void TestInitialize()
        {
            base.TestSpecInitialize(TestResources);
        }

        [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "BooleanModel-Portuguese.csv", "BooleanModel-Portuguese#csv", DataAccessMethod.Sequential)]
        [TestMethod]
        public void BooleanModel()
        {
            TestChoice();
        }
    }
}


text:
Here are some of the materials Etsy uses to help our engineers learn about
testing and design:

- [Testing Best Practices Guide](Testing_Best_Practices.md)

- Testing 101 CodeLab, in `CodeLab/`

Note these materials use PHP and PHPUnit.


text:
<?php

namespace Zettacast\Support;

trait SingletonTrait
{
	/**
	 * Object's singleton instance. Every operation made into object in which
	 * this trait is used, this instance is called.
	 * @var static Object's singleton instance.
	 */
	private static $instance = null;

	/**
	 * Singleton instance discovery method. Gives access to the singleton or
	 * creates it if it has not yet been created.
	 * @return static Singleton instance.
	 */
	final public static function i(): self
	{
		if(!isset(self::$instance)) {
			self::$instance = new static;
			zetta()->set(static::class, self::$instance);
		}

		return self::$instance;
	}

	/**
	 * SingletonTrait constructor.
	 * The constructor is blocked. This does not allow Singleton objects to be
	 * instantiated out of context when a constructor is not needed.
	 */
	protected function __construct()
	{
		# Blocked constructor.
	}

	/**
	 * SingletonTrait clone magic method.
	 * Cloning is blocked. This does not allow Singleton objects to be cloned.
	 * Cloning is not possible when one wants keep one single instance.
	 */
	final protected function __clone()
	{
		# Blocked cloning.
	}

	/**
	 * SingletonTrait wakeup magic method.
	 * Unserialization is blocked. This does not allow Singleton objects to be
	 * instanciated via unserialization.
	 */
	final protected function __wakeup()
	{
		# Blocked unserialization.
	}
}


text:
<?php
declare(strict_types=1);

namespace phpDocumentor\Reflection\Php\Factory;

use phpDocumentor\Reflection\Fqsen;
use phpDocumentor\Reflection\Location;
use phpDocumentor\Reflection\Php\Class_ as ClassElement;
use phpDocumentor\Reflection\Php\ProjectFactoryStrategy;
use phpDocumentor\Reflection\Php\StrategyContainer;
use phpDocumentor\Reflection\Types\Context;
use PhpParser\Node\Stmt\Class_ as ClassNode;
use PhpParser\Node\Stmt\ClassConst;
use PhpParser\Node\Stmt\ClassMethod;
use PhpParser\Node\Stmt\Property as PropertyNode;
use PhpParser\Node\Stmt\TraitUse;

/**
 * Strategy to create a ClassElement including all sub elements.
 */
// @codingStandardsIgnoreStart
final class Class_ extends AbstractFactory implements ProjectFactoryStrategy
// @codingStandardsIgnoreEnd
{
    public function matches($object): bool
    {
        return $object instanceof ClassNode;
    }

    /**
     * Creates an ClassElement out of the given object.
     * Since an object might contain other objects that need to be converted the $factory is passed so it can be
     * used to create nested Elements.
     *
     * @param ClassNode $object object to convert to an Element
     * @param StrategyContainer $strategies used to convert nested objects.
     * @param Context $context of the created object
     * @return ClassElement
     */
    protected function doCreate($object, StrategyContainer $strategies, ?Context $context = null)
    {
        $docBlock = $this->createDocBlock($strategies, $object->getDocComment(), $context);

        $classElement = new ClassElement(
            $object->fqsen,
            $docBlock,
            $object->extends ? new Fqsen('\\' . $object->extends) : null,
            $object->isAbstract(),
            $object->isFinal(),
            new Location($object->getLine())
        );

        if (isset($object->implements)) {
            foreach ($object->implements as $interfaceClassName) {
                $classElement->addInterface(
                    new Fqsen('\\' . $interfaceClassName->toString())
                );
            }
        }

        if (isset($object->stmts)) {
            foreach ($object->stmts as $stmt) {
                switch (get_class($stmt)) {
                    case TraitUse::class:
                        foreach ($stmt->traits as $use) {
                            $classElement->addUsedTrait(new Fqsen('\\' . $use->toString()));
                        }
                        break;
                    case PropertyNode::class:
                        $properties = new PropertyIterator($stmt);
                        foreach ($properties as $property) {
                            $element = $this->createMember($property, $strategies, $context);
                            $classElement->addProperty($element);
                        }
                        break;
                    case ClassMethod::class:
                        $method = $this->createMember($stmt, $strategies, $context);
                        $classElement->addMethod($method);
                        break;
                    case ClassConst::class:
                        $constants = new ClassConstantIterator($stmt);
                        foreach ($constants as $const) {
                            $element = $this->createMember($const, $strategies, $context);
                            $classElement->addConstant($element);
                        }
                        break;
                }
            }
        }

        return $classElement;
    }
}


text:
package h;
import java.util.Arrays;
import java.util.List;

import smetana.core.__ptr__;

//2 2xdqtc3a2c3n08rywh1rm8cjw

public interface font_type extends __ptr__ {
	public static List<String> DEFINITION = Arrays.asList(
"typedef enum",
"{",
"FONT_REGULAR, FONT_BOLD, FONT_ITALIC",
"}",
"font_type");
}

// typedef enum { FONT_REGULAR, FONT_BOLD, FONT_ITALIC } font_type;


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Text;
using System.Xml;
using System.Xml.Schema;
using System.IO;
using System.Reflection;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Security.Permissions;
using System.Globalization;

//using System.Workflow.Activities;
using System.Workflow.ComponentModel;
using System.Workflow.Runtime;
using System.Workflow.Runtime.Hosting;
using Hosting = System.Workflow.Runtime.Hosting;

namespace System.Workflow.Runtime.Tracking
{
    [Serializable]
    [Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
    public class TrackingProfile
    {
        #region Private Data Members

        private System.Version _version;

        private ActivityTrackPointCollection _activities = new ActivityTrackPointCollection();
        private UserTrackPointCollection _code = new UserTrackPointCollection();
        private WorkflowTrackPointCollection _instance = new WorkflowTrackPointCollection();

        #endregion

        #region Constructors

        public TrackingProfile()
        {
        }

        #endregion

        #region Public Properties

        public ActivityTrackPointCollection ActivityTrackPoints
        {
            get { return _activities; }
        }

        public UserTrackPointCollection UserTrackPoints
        {
            get { return _code; }
        }

        public WorkflowTrackPointCollection WorkflowTrackPoints
        {
            get { return _instance; }
        }

        public Version Version
        {
            get
            {
                return _version;
            }
            set
            {
                _version = value;
            }
        }

        #endregion

    }
}


text:
import toFastProperties from "to-fast-properties";
import compact from "lodash/array/compact";
import assign from "lodash/object/assign";
import each from "lodash/collection/each";
import uniq from "lodash/array/uniq";

var t = exports;

/**
 * Registers `is[Type]` and `assert[Type]` generated functions for a given `type`.
 * Pass `skipAliasCheck` to force it to directly compare `node.type` with `type`.
 */

function registerType(type: string, skipAliasCheck?: boolean) {
  var is = t[`is${type}`] = function (node, opts) {
    return t.is(type, node, opts, skipAliasCheck);
  };

  t[`assert${type}`] = function (node, opts) {
    opts = opts || {};
    if (!is(node, opts)) {
      throw new Error(`Expected type ${JSON.stringify(type)} with option ${JSON.stringify(opts)}`);
    }
  };
}

/**
 * Constants.
 */

export const STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"];
export const FLATTENABLE_KEYS        = ["body", "expressions"];
export const FOR_INIT_KEYS           = ["left", "init"];
export const COMMENT_KEYS            = ["leadingComments", "trailingComments"];

export const BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="];
export const COMPARISON_BINARY_OPERATORS     = ["==", "===", "!=", "!==", "in", "instanceof"];
export const BOOLEAN_BINARY_OPERATORS        = [].concat(COMPARISON_BINARY_OPERATORS, BOOLEAN_NUMBER_BINARY_OPERATORS);
export const NUMBER_BINARY_OPERATORS         = ["-", "/", "*", "**", "&", "|", ">>", ">>>", "<<", "^"];

export const BOOLEAN_UNARY_OPERATORS = ["delete", "!"];
export const NUMBER_UNARY_OPERATORS  = ["+", "-", "++", "--", "~"];
export const STRING_UNARY_OPERATORS  = ["typeof"];

export const VISITOR_KEYS = require("./visitor-keys");
export const BUILDER_KEYS = require("./builder-keys");
export const ALIAS_KEYS   = require("./alias-keys");

/**
 * Registers `is[Type]` and `assert[Type]` for all types.
 */

each(t.VISITOR_KEYS, function (keys, type) {
  registerType(type, true);
});

/**
 * Flip `ALIAS_KEYS` for faster access in the reverse direction.
 */

t.FLIPPED_ALIAS_KEYS = {};

each(t.ALIAS_KEYS, function (aliases, type) {
  each(aliases, function (alias) {
    var types = t.FLIPPED_ALIAS_KEYS[alias] = t.FLIPPED_ALIAS_KEYS[alias] || [];
    types.push(type);
  });
});

/**
 * Registers `is[Alias]` and `assert[Alias]` functions for all aliases.
 */

each(t.FLIPPED_ALIAS_KEYS, function (types, type) {
  t[type.toUpperCase() + "_TYPES"] = types;
  registerType(type, false);
});

export const TYPES = Object.keys(t.VISITOR_KEYS).concat(Object.keys(t.FLIPPED_ALIAS_KEYS));

/**
 * Returns whether `node` is of given `type`.
 *
 * For better performance, use this instead of `is[Type]` when `type` is unknown.
 * Optionally, pass `skipAliasCheck` to directly compare `node.type` with `type`.
 */

// @TODO should `skipAliasCheck` be removed?
export function is(type: string, node: Object, opts?: Object, skipAliasCheck?: boolean): boolean {
  if (!node) return false;

  var matches = isType(node.type, type);
  if (!matches) return false;

  if (typeof opts === "undefined") {
    return true;
  } else {
    return t.shallowEqual(node, opts);
  }
}

/**
 * Test if a `nodeType` is a `targetType` or if `targetType` is an alias of `nodeType`.
 */

export function isType(nodeType: string, targetType: string): boolean {
  if (nodeType === targetType) return true;

  var aliases = t.FLIPPED_ALIAS_KEYS[targetType];
  if (aliases) {
    if (aliases[0] === nodeType) return true;

    for (var alias of (aliases: Array)) {
      if (nodeType === alias) return true;
    }
  }

  return false;
}

/**
 * [Please add a description.]
 */

each(t.VISITOR_KEYS, function (keys, type) {
  if (t.BUILDER_KEYS[type]) return;

  var defs = {};
  each(keys, function (key) {
    defs[key] = null;
  });
  t.BUILDER_KEYS[type] = defs;
});

/**
 * [Please add a description.]
 */

each(t.BUILDER_KEYS, function (keys, type) {
  var builder = function () {
    var node = {};
    node.start = null;
    node.type = type;

    var i = 0;

    for (var key in keys) {
      var arg = arguments[i++];
      if (arg === undefined) arg = keys[key];
      node[key] = arg;
    }

    return node;
  };

  t[type] = builder;
  t[type[0].toLowerCase() + type.slice(1)] = builder;
});

/**
 * Test if an object is shallowly equal.
 */

export function shallowEqual(actual: Object, expected: Object): boolean {
  var keys = Object.keys(expected);

  for (var key of (keys: Array)) {
    if (actual[key] !== expected[key]) {
      return false;
    }
  }

  return true;
}

/**
 * Append a node to a member expression.
 */

export function appendToMemberExpression(member: Object, append: Object, computed?: boolean): Object {
  member.object   = t.memberExpression(member.object, member.property, member.computed);
  member.property = append;
  member.computed = !!computed;
  return member;
}

/**
 * Prepend a node to a member expression.
 */

export function prependToMemberExpression(member: Object, prepend: Object): Object {
  member.object = t.memberExpression(prepend, member.object);
  return member;
}

/**
 * Ensure the `key` (defaults to "body") of a `node` is a block.
 * Casting it to a block if it is not.
 */

export function ensureBlock(node: Object, key: string = "body") {
  return node[key] = t.toBlock(node[key], node);
}

/**
 * Create a shallow clone of a `node` excluding `_private` properties.
 */

export function clone(node: Object): Object {
  var newNode = {};
  for (var key in node) {
    if (key[0] === "_") continue;
    newNode[key] = node[key];
  }
  return newNode;
}

/**
 * Create a deep clone of a `node` and all of it's child nodes
 * exluding `_private` properties.
 */

export function cloneDeep(node: Object): Object {
  var newNode = {};

  for (var key in node) {
    if (key[0] === "_") continue;

    var val = node[key];

    if (val) {
      if (val.type) {
        val = t.cloneDeep(val);
      } else if (Array.isArray(val)) {
        val = val.map(t.cloneDeep);
      }
    }

    newNode[key] = val;
  }

  return newNode;
}

/**
 * Build a function that when called will return whether or not the
 * input `node` `MemberExpression` matches the input `match`.
 *
 * For example, given the match `React.createClass` it would match the
 * parsed nodes of `React.createClass` and `React["createClass"]`.
 */

export function buildMatchMemberExpression(match:string, allowPartial?: boolean): Function {
  var parts = match.split(".");

  return function (member) {
    // not a member expression
    if (!t.isMemberExpression(member)) return false;

    var search = [member];
    var i = 0;

    while (search.length) {
      var node = search.shift();

      if (allowPartial && i === parts.length) {
        return true;
      }

      if (t.isIdentifier(node)) {
        // this part doesn't match
        if (parts[i] !== node.name) return false;
      } else if (t.isLiteral(node)) {
        // this part doesn't match
        if (parts[i] !== node.value) return false;
      } else if (t.isMemberExpression(node)) {
        if (node.computed && !t.isLiteral(node.property)) {
          // we can't deal with this
          return false;
        } else {
          search.push(node.object);
          search.push(node.property);
          continue;
        }
      } else {
        // we can't deal with this
        return false;
      }

      // too many parts
      if (++i > parts.length) {
        return false;
      }
    }

    return true;
  };
}

/**
 * Remove comment properties from a node.
 */

export function removeComments(node: Object): Object {
  for (var key of (COMMENT_KEYS: Array)) {
    delete node[key];
  }
  return node;
}

/**
 * Inherit all unique comments from `parent` node to `child` node.
 */

export function inheritsComments(child: Object, parent: Object): Object {
  if (child && parent) {
    for (var key of (COMMENT_KEYS: Array)) {
      child[key] = uniq(compact([].concat(child[key], parent[key])));
    }
  }
  return child;
}

/**
 * Inherit all contextual properties from `parent` node to `child` node.
 */

export function inherits(child: Object, parent: Object): Object {
  if (!child || !parent) return child;

  child._scopeInfo = parent._scopeInfo;
  child._paths     = parent._paths;

  child.range = parent.range;
  child.start = parent.start;
  child.loc   = parent.loc;
  child.end   = parent.end;

  child.typeAnnotation = parent.typeAnnotation;
  child.returnType     = parent.returnType;

  t.inheritsComments(child, parent);
  return child;
}

// Optimize property access.
toFastProperties(t);
toFastProperties(t.VISITOR_KEYS);

// Export all type checkers from other files.
assign(t, require("./retrievers"));
assign(t, require("./validators"));
assign(t, require("./converters"));
assign(t, require("./flow"));


text:
exports = module.exports = require('log4js')
exports.koaLogger = require('./koa-logger')


text: Raspberry Pi Bare Bones


text:
<!DOCTYPE html>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>exiftool.js - compliance report</title>

<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="../css/report.css" rel="stylesheet">

exiftool.js compliance report

Comparison of outputs fromexiftool.js against exiftool reference

image	supported tags	unsupported tags (perl output, followed by js output)

sampleImages/Acer/AcerX960.jpg
DateTimeDigitized : 2009-09-23 17:40:52 UTC

DateTimeOriginal : 2009-09-23 17:40:52 UTC

ExifVersion : 2.20

Flash : No Flash

DateTime : 2009-09-23 17:40:52 UTC

Make : ACER

Model : X960

Software : ACER Camera

_IFDpointer_EXIF : 140
Artist : ???????

Artist :

sampleImages/Acer/AcerStream.jpg
ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

DateTimeDigitized : 2002:12:08 12:00:00

DateTimeOriginal : 2011:05:27 13:18:32

ExifVersion : 2.20

FlashpixVersion : 1.00

PixelXDimension : 2592 px w

PixelYDimension : 1944 px h

_IFDpointer_Interop : 286

Make : Acer

Model : Acer Stream

ResolutionUnit : inches

XResolution : 72.00000000

YCbCrPositioning : Centered

YResolution : 72.00000000

_IFDpointer_EXIF : 132

sampleImages/Acer/AcerS200.jpg
ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

DateTimeDigitized : 2010:06:04 18:25:39

DateTimeOriginal : 2010:06:04 18:25:39

ExifVersion : 2.20

FlashpixVersion : 1.00

PixelXDimension : 2592 px w

PixelYDimension : 1944 px h

_IFDpointer_Interop : 398

Copyright : Copyrights 2009 Acer Incorporate

DateTime : 2010:06:04 18:25:39

Make : ACER

Model : ACER S200

ResolutionUnit : inches

Software : ACER Camera

XResolution : 72.00000000

YCbCrPositioning : Centered

YResolution : 72.00000000

_IFDpointer_EXIF : 244

_IFDpointer_GPS : 428

sampleImages/Acer/AcerM900.jpg
ApertureValue : 2.8

ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

CompressedBitsPerPixel : 3.2

Contrast : Normal

CustomRendered : Custom

DateTimeDigitized : 2010:12:18 02:32:55

DateTimeOriginal : 2010:12:18 02:32:55

DigitalZoomRatio : 0

ExifVersion : 2.21

ExposureBias : 0

ExposureIndex : 400

ExposureMode : Auto

ExposureProgram : Program AE

ExposureTime : 1/8

FNumber : 2.8

FileSource : Digital Camera

Flash : Off, Flash did not fire

FlashpixVersion : 1.00

FocalLength : 4.8 mm

FocalLengthIn35mmFilm : 36 mm

GainControl : High gain up

ISO : 400

LightSource : Daylight

MaxApertureValue : 2.8

MeteringMode : Multi-segment

PixelXDimension : 2560 px w

PixelYDimension : 1920 px h

Saturation : 8

SceneCaptureType : Standard

SceneType : Directly photographed

SensingMethod : One-chip color area

Sharpness : Normal

ShutterSpeedValue : 1/8

SubjectDistanceRange : Unknown

WhiteBalance : Auto

_IFDpointer_Interop : 4564

_IFDpointer_Makernote : 922

Make : Acer

Model : M900

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : Ver 02.1006

XResolution : 230.00000000

YCbCrPositioning : Co-sited

YResolution : 230.00000000

_IFDpointer_EXIF : 340

sampleImages/Acer/AcerLiquidMetal.jpg
ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

DateTimeDigitized : 2011:02:13 14:01:35

DateTimeOriginal : 2011:02:13 14:01:35

ExifVersion : 2.20

FlashpixVersion : 1.00

FocalLength : 3.5 mm

PixelXDimension : 2592 px w

PixelYDimension : 1944 px h

_IFDpointer_Interop : 320

GPSAltitude : 0 m Above Sea Level

GPSAltitudeRef : Below Sea Level

GPSDateStamp : 2002:12:08

GPSLatitude : 0° 0' 0.0000" N

GPSLatitudeRef : South

GPSLongitude : 0° 0' 0.0000" E

GPSLongitudeRef : West

GPSTimeStamp : 12:00:00

Make : Acer

Model : Liquid Metal

ResolutionUnit : inches

XResolution : 72.00000000

YCbCrPositioning : Centered

YResolution : 72.00000000

_IFDpointer_EXIF : 146

_IFDpointer_GPS : 350

sampleImages/Acer/AcerLiquid.jpg
ApertureValue : 2.8

ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

DateTimeDigitized : 2010:06:04 08:09:42

DateTimeOriginal : 2010:06:04 08:09:42

ExifVersion : 2.20

ExposureMode : Auto

FNumber : 2.8

FlashpixVersion : 1.00

FocalLength : 4.3 mm

FocalLengthIn35mmFilm : 33 mm

MeteringMode : Average

PixelXDimension : 2592 px w

PixelYDimension : 1944 px h

WhiteBalance : Auto

_IFDpointer_Interop : 406

Make : Acer

Model : Acer Liquid

ResolutionUnit : inches

XResolution : 72.00000000

YCbCrPositioning : Centered

YResolution : 72.00000000

_IFDpointer_EXIF : 144

_IFDpointer_GPS : 436

sampleImages/Acer/AcerE101.jpg
ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

DateTimeDigitized : 2010-06-09 23:15:52 UTC

DateTimeOriginal : 2010-06-09 23:15:52 UTC

ExifVersion : 2.20

FileSource : Digital Camera

FlashpixVersion : 1.00

PixelXDimension : 1600 px w

PixelYDimension : 1200 px h

SceneType : Directly photographed

WhiteBalance : Auto

_IFDpointer_Interop : 573

GPSLatitude : 59° 56' 49.9600" N

GPSLatitudeRef : North

GPSLongitude : 30° 11' 35.3900" E

GPSLongitudeRef : East

GPSMapDatum : WGS84

GPSTimeStamp : 19:15:07

GPSVersion : 2.0.0.0

DateTime : 2010-06-09 23:15:52 UTC

Make : ACER

Model : ACER E101

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : ACER Camera

XResolution : 72.00000000

YCbCrPositioning : Centered

YResolution : 72.00000000

_IFDpointer_EXIF : 299

_IFDpointer_GPS : 603

sampleImages/Acer/AcerDX650.jpg
DateTimeDigitized : 2010-11-14 16:25:16 UTC

DateTimeOriginal : 2010-11-14 16:25:16 UTC

ExifVersion : 2.20

Flash : No Flash

DateTime : 2010-11-14 16:25:16 UTC

Make : ACER

Model : DX650

Software : ACER Camera

_IFDpointer_EXIF : 140
Artist : @????@

Artist : @@

sampleImages/Acer/AcerCU-6530.jpg
ApertureValue : 5.7

ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

Contrast : Normal

CustomRendered : Normal

DateTimeDigitized : 2010:01:20 16:59:50

DateTimeOriginal : 2010:01:20 16:59:50

DigitalZoomRatio : 1

ExifVersion : 2.20

ExposureBias : 0

ExposureMode : Auto

ExposureProgram : Program AE

ExposureTime : 1/380

FNumber : 5.6

FileSource : Digital Camera

Flash : No Flash

FlashpixVersion : 1.00

FocalLengthIn35mmFilm : 35 mm

GainControl : None

ISO : 50

LightSource : Unknown

MaxApertureValue : 2.9

MeteringMode : Center-weighted average

PixelXDimension : 2816 px w

PixelYDimension : 2112 px h

RelatedSoundFile :

Saturation : Normal

SceneCaptureType : Standard

Sharpness : Normal

ShutterSpeedValue : 1/377

SubjectDistanceRange : Unknown

WhiteBalance : Auto

_IFDpointer_Interop : 890

_IFDpointer_Makernote : 768

DateTime : 2010:01:20 16:59:50

ImageDescription : Digital StillCamera

Make : acer

Model : CU-6530

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : Ver 1.01

XResolution : 72.00000000

YCbCrPositioning : Co-sited

YResolution : 72.00000000

_IFDpointer_EXIF : 266

sampleImages/Acer/AcerCS6530.jpg
ApertureValue : 3.2

ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

Contrast : Normal

CustomRendered : Normal

DateTimeDigitized : 2005:01:02 05:11:38

DateTimeOriginal : 2005:01:02 05:11:38

DigitalZoomRatio : 1

ExifVersion : 2.20

ExposureBias : 1.3

ExposureMode : Auto

ExposureProgram : Program AE

ExposureTime : 1/15

FNumber : 3.2

FileSource : Digital Camera

Flash : On, Flash fired

FlashpixVersion : 1.00

FocalLengthIn35mmFilm : 39 mm

GainControl : None

ISO : 64

LightSource : Unknown

MaxApertureValue : 3.2

MeteringMode : Center-weighted average

PixelXDimension : 1600 px w

PixelYDimension : 1200 px h

RelatedSoundFile :

Saturation : Normal

SceneCaptureType : Night scene

Sharpness : Normal

ShutterSpeedValue : 1/15

SubjectDistanceRange : Unknown

WhiteBalance : Auto

_IFDpointer_Interop : 890

_IFDpointer_Makernote : 768

DateTime : 2005:01:02 05:11:38

ImageDescription : Digital StillCamera

Make : acer

Model : CS6530

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : Ver 1.00

XResolution : 72.00000000

YCbCrPositioning : Co-sited

YResolution : 72.00000000

_IFDpointer_EXIF : 266

sampleImages/Acer/AcerCS5531.jpg
ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

Contrast : Normal

CustomRendered : Normal

DateTimeDigitized : 2008:06:11 04:43:02

DateTimeOriginal : 2008:06:11 04:43:02

DigitalZoomRatio : 1

ExifVersion : 2.20

ExposureBias : 0

ExposureMode : Manual

ExposureProgram : Program AE

ExposureTime : 1/32

FNumber : 2.8

FileSource : Digital Camera

Flash : Auto, Flash fired

FlashpixVersion : 1.00

FocalLength : 5.4 mm

GainControl : High gain up

ISO : 200

LightSource : Daylight

MaxApertureValue : 3.1

MeteringMode : Center-weighted average

PixelXDimension : 2048 px w

PixelYDimension : 1536 px h

Saturation : Normal

SceneCaptureType : Standard

Sharpness : Normal

UserComment : 10958

WhiteBalance : Auto

_IFDpointer_Interop : 11092

_IFDpointer_Makernote : 958

DateTime : 2008:06:11 04:43:02

ImageDescription : DIGITAL IMAGE

Make : ACER

Model : CS5531

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : 1.06ACE

XResolution : 200.00000000

YCbCrPositioning : Co-sited

YResolution : 200.00000000

_IFDpointer_EXIF : 500

PrintIM : 232

sampleImages/Acer/AcerCR8530.jpg
ApertureValue : 4.0

ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

Contrast : Normal

CustomRendered : Normal

DateTimeDigitized : 2005:01:01 17:00:34

DateTimeOriginal : 2005:01:01 17:00:34

DigitalZoomRatio : 1

ExifVersion : 2.20

ExposureBias : 0

ExposureMode : Auto

ExposureProgram : Program AE

ExposureTime : 1/55

FNumber : 4

FileSource : Digital Camera

Flash : No Flash

FlashpixVersion : 1.00

FocalLengthIn35mmFilm : 51 mm

GainControl : None

ISO : 50

LightSource : Unknown

MaxApertureValue : 2.9

MeteringMode : Center-weighted average

PixelXDimension : 3264 px w

PixelYDimension : 2448 px h

RelatedSoundFile :

Saturation : Normal

SceneCaptureType : Standard

Sharpness : Normal

ShutterSpeedValue : 1/55

SubjectDistanceRange : Unknown

WhiteBalance : Auto

_IFDpointer_Interop : 890

_IFDpointer_Makernote : 768

DateTime : 2005:01:01 17:00:34

ImageDescription : Digital StillCamera

Make : acer

Model : CR8530

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : Ver 1.00

XResolution : 72.00000000

YCbCrPositioning : Co-sited

YResolution : 72.00000000

_IFDpointer_EXIF : 266

sampleImages/Acer/AcerCP-8660.jpg
ApertureValue : 3.4

ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

Contrast : Normal

CustomRendered : Normal

DateTimeDigitized : 2010:07:06 20:45:12

DateTimeOriginal : 2010:07:06 20:45:12

DigitalZoomRatio : 1

ExifVersion : 2.20

ExposureBias : 0

ExposureMode : Auto

ExposureProgram : Program AE

ExposureTime : 1/64

FNumber : 3.5

FileSource : Digital Camera

Flash : On, Flash fired

FlashpixVersion : 1.00

FocalLengthIn35mmFilm : 75 mm

GainControl : None

ISO : 200

LightSource : Unknown

MaxApertureValue : 2.8

MeteringMode : Center-weighted average

PixelXDimension : 2560 px w

PixelYDimension : 1920 px h

RelatedSoundFile :

Saturation : Normal

SceneCaptureType : Standard

Sharpness : Normal

ShutterSpeedValue : 1/64

SubjectDistanceRange : Unknown

WhiteBalance : Auto

_IFDpointer_Interop : 1010

_IFDpointer_Makernote : 768

DateTime : 2010:07:06 20:45:12

ImageDescription : Digital StillCamera

Make : Acer

Model : CP-8660

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : Ver 1.03

XResolution : 72.00000000

YCbCrPositioning : Co-sited

YResolution : 72.00000000

_IFDpointer_EXIF : 266

sampleImages/Acer/AcerCP-8531.jpg
ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

Contrast : Normal

CustomRendered : Normal

DateTimeDigitized : 2011:07:24 12:52:36

DateTimeOriginal : 2011:07:24 12:52:36

DigitalZoomRatio : 1

ExifVersion : 2.20

ExposureBias : 0

ExposureMode : Auto

ExposureProgram : Program AE

ExposureTime : 1/638

FNumber : 6.7

FileSource : Digital Camera

Flash : Auto, Flash did not fire

FlashpixVersion : 1.00

FocalLength : 5.4 mm

GainControl : None

ISO : 50

LightSource : Unknown

MaxApertureValue : 2.8

MeteringMode : Center-weighted average

PixelXDimension : 1600 px w

PixelYDimension : 1200 px h

Saturation : Normal

SceneCaptureType : Standard

Sharpness : Normal

SubjectDistanceRange : Close view

WhiteBalance : Auto

_IFDpointer_Interop : 10688

_IFDpointer_Makernote : 680

DateTime : 2011:07:24 12:52:36

ImageDescription : DIGITAL CAMERA

Make : acer

Model : CP-8531

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : V0.23

XResolution : 72.00000000

YCbCrPositioning : Co-sited

YResolution : 72.00000000

_IFDpointer_EXIF : 222

sampleImages/Acer/AcerCL-6300.jpg
ApertureValue : 3.1

ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

CustomRendered : Normal

DateTimeDigitized : 2009:05:09 20:14:31

DateTimeOriginal : 2009:05:09 20:14:31

ExifVersion : 2.20

ExposureBias : 0

ExposureMode : Auto

ExposureProgram : Program AE

ExposureTime : 1/30

FNumber : 3.3

FileSource : Digital Camera

Flash : Auto, Flash fired

FlashpixVersion : 1.00

FocalLength : 7.3 mm

ISO : 100

LightSource : Flash

MaxApertureValue : 2.8

MeteringMode : Center-weighted average

PixelXDimension : 2816 px w

PixelYDimension : 2112 px h

SceneCaptureType : Standard

SensingMethod : One-chip color area

ShutterSpeedValue : 1/30

WhiteBalance : Auto

_IFDpointer_Interop : 832

_IFDpointer_Makernote : 704

DateTime : 2009:05:09 20:14:31

ImageDescription : Digital image

Make : Acer

Model : CL-6300

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : 1.00.004AC

XResolution : 180.00000000

YCbCrPositioning : Co-sited

YResolution : 180.00000000

_IFDpointer_EXIF : 266

sampleImages/Acer/AcerCL-5300.jpg
ApertureValue : 3.1

ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

CustomRendered : Normal

DateTimeDigitized : 2009:11:27 14:03:26

DateTimeOriginal : 2009:11:27 14:03:26

ExifVersion : 2.20

ExposureBias : 0

ExposureMode : Auto

ExposureProgram : Program AE

ExposureTime : 1/55

FNumber : 3.3

FileSource : Digital Camera

Flash : Off, Flash did not fire

FlashpixVersion : 1.00

FocalLength : 7.3 mm

ISO : 50

LightSource : Unknown

MaxApertureValue : 2.8

MeteringMode : Center-weighted average

PixelXDimension : 2048 px w

PixelYDimension : 1536 px h

SceneCaptureType : Standard

SensingMethod : One-chip color area

ShutterSpeedValue : 1/55

WhiteBalance : Auto

_IFDpointer_Interop : 832

_IFDpointer_Makernote : 704

DateTime : 2009:11:27 14:03:26

ImageDescription : Digital image

Make : Digital Camera

Model : CL-5300

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : 1.01ver.

XResolution : 180.00000000

YCbCrPositioning : Co-sited

YResolution : 180.00000000

_IFDpointer_EXIF : 266

sampleImages/Acer/AcerCI6330.jpg
ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

Contrast : Normal

CustomRendered : Normal

DateTimeDigitized : 2008:07:24 18:15:26

DateTimeOriginal : 2008:07:24 18:15:26

DigitalZoomRatio : 1

ExifVersion : 2.20

ExposureBias : 0

ExposureMode : Auto

ExposureProgram : Program AE

ExposureTime : 1/235

FNumber : 2.8

FileSource : Digital Camera

Flash : Auto, Did not fire, Red-eye reduction

FlashpixVersion : 1.00

FocalLength : 7.5 mm

GainControl : None

ISO : 64

LightSource : Unknown

MaxApertureValue : 2.9

MeteringMode : Center-weighted average

PixelXDimension : 2848 px w

PixelYDimension : 2136 px h

Saturation : Normal

SceneCaptureType : Standard

Sharpness : Normal

WhiteBalance : Auto

_IFDpointer_Interop : 11042

_IFDpointer_Makernote : 1034

DateTime : 2008:07:24 18:15:26

ImageDescription : Acer Image

Make : Acer Corporation

Model : CI6330

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : V1.00

XResolution : 314.00000000

YCbCrPositioning : Co-sited

YResolution : 314.00000000

_IFDpointer_EXIF : 588

PrintIM : 238

sampleImages/Acer/AcerCI-8330.jpg
ApertureValue : 2.6

ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

CustomRendered : Normal

DateTimeDigitized : 2005:01:27 19:48:50

DateTimeOriginal : 2005:01:27 19:48:50

ExifVersion : 2.20

ExposureBias : 1.3

ExposureMode : Auto

ExposureProgram : Program AE

ExposureTime : 1/30

FNumber : 2.8

FileSource : Digital Camera

Flash : Auto, Flash fired

FlashpixVersion : 1.00

FocalLength : 7.3 mm

ISO : 100

LightSource : Flash

MaxApertureValue : 2.8

MeteringMode : Center-weighted average

PixelXDimension : 2272 px w

PixelYDimension : 1704 px h

SceneCaptureType : Standard

SensingMethod : One-chip color area

ShutterSpeedValue : 0.7

WhiteBalance : Auto

_IFDpointer_Interop : 832

_IFDpointer_Makernote : 704

DateTime : 2005:01:27 19:48:50

ImageDescription :

Make : acer

Model : CI-8330

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : 1.0004.2A

XResolution : 180.00000000

YCbCrPositioning : Co-sited

YResolution : 180.00000000

_IFDpointer_EXIF : 266

sampleImages/Acer/AcerCE6430.jpg
ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

Contrast : Normal

CustomRendered : Normal

DateTimeDigitized : 2008:07:31 17:46:50

DateTimeOriginal : 2008:07:31 17:46:50

DigitalZoomRatio : 1

ExifVersion : 2.20

ExposureBias : 0

ExposureMode : Auto

ExposureProgram : Action (High speed)

ExposureTime : 1/1042

FNumber : 2.8

FileSource : Digital Camera

Flash : On, Flash fired, compulsory flash mode

FlashpixVersion : 1.00

FocalLength : 5.5 mm

GainControl : Low gain up

ISO : 100

MaxApertureValue : 2.8

MeteringMode : Center-weighted average

PixelXDimension : 2272 px w

PixelYDimension : 1704 px h

Saturation : High saturation

SceneCaptureType : Standard

Sharpness : Hard

WhiteBalance : Manual

_IFDpointer_Interop : 21026

_IFDpointer_Makernote : 1018

DateTime : 2008:07:31 17:46:50

ImageDescription : DIGITAL CAMERA

Make : Acer

Model : CE6430

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : V0.21

XResolution : 314.00000000

YCbCrPositioning : Co-sited

YResolution : 314.00000000

_IFDpointer_EXIF : 584

PrintIM : 234

sampleImages/Acer/AcerCE-5330.jpg
ColorSpace : sRGB

ComponentsConfiguration : Y, Cb, Cr, -

Contrast : Normal

CustomRendered : Normal

DateTimeDigitized : 2009:10:10 22:58:22

DateTimeOriginal : 2009:10:10 22:58:22

DigitalZoomRatio : 1

ExifVersion : 2.20

ExposureBias : 0

ExposureMode : Auto

ExposureProgram : Program AE

ExposureTime : 1/30

FNumber : 2.8

FileSource : Digital Camera

Flash : Auto, Flash fired

FlashpixVersion : 1.00

FocalLength : 5.4 mm

GainControl : Low gain up

ISO : 100

LightSource : Flash

MaxApertureValue : 2.8

MeteringMode : Center-weighted average

PixelXDimension : 2560 px w

PixelYDimension : 1920 px h

Saturation : Normal

SceneCaptureType : Standard

Sharpness : Normal

WhiteBalance : Auto

_IFDpointer_Interop : 10676

_IFDpointer_Makernote : 668

DateTime : 2009:10:10 22:58:22

ImageDescription : ACER

Make : ACER

Model : CE-5330

Orientation : Horizontal (normal)

ResolutionUnit : inches

Software : V1.00

XResolution : 72.00000000

YCbCrPositioning : Co-sited

YResolution : 72.00000000

_IFDpointer_EXIF : 222


text:
'use strict'
var test = require('tap').test
var requireInject = require('require-inject')
var npm = require('../../lib/npm.js')

test('setup', function (t) {
  npm.load({progress: false}, t.end)
})

test('outdated', function (t) {
  var rptError = new Error('read-package-tree')
  var outdated = requireInject('../../lib/outdated.js', {
    'read-package-tree': function (dir, cb) {
      cb(rptError)
    }
  })
  outdated([], function (err) {
    t.is(err, rptError)
    t.end()
  })
})


text:
package com.box.l10n.mojito.service.drop.exporter;

import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.Date;

/** @author jaurambault */
@JsonPropertyOrder(alphabetic = true)
public class BoxDropExporterConfig {

  String dropFolderId;
  String localizedFolderId;
  String importedFolderId;
  String sourceFolderId;
  String quotesFolderId;
  String queriesFolderId;
  Date uploadDate;

  public String getDropFolderId() {
    return dropFolderId;
  }

  public void setDropFolderId(String dropFolderId) {
    this.dropFolderId = dropFolderId;
  }

  public String getLocalizedFolderId() {
    return localizedFolderId;
  }

  public void setLocalizedFolderId(String localizedFolderId) {
    this.localizedFolderId = localizedFolderId;
  }

  public String getImportedFolderId() {
    return importedFolderId;
  }

  public void setImportedFolderId(String importedFolderId) {
    this.importedFolderId = importedFolderId;
  }

  public String getSourceFolderId() {
    return sourceFolderId;
  }

  public void setSourceFolderId(String sourceFolderId) {
    this.sourceFolderId = sourceFolderId;
  }

  public String getQuotesFolderId() {
    return quotesFolderId;
  }

  public void setQuotesFolderId(String quotesFolderId) {
    this.quotesFolderId = quotesFolderId;
  }

  public String getQueriesFolderId() {
    return queriesFolderId;
  }

  public void setQueriesFolderId(String queriesFolderId) {
    this.queriesFolderId = queriesFolderId;
  }

  public Date getUploadDate() {
    return uploadDate;
  }

  public void setUploadDate(Date uploadDate) {
    this.uploadDate = uploadDate;
  }
}


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

using System.Collections.Generic;
using UnityEngine;

namespace GVR.Entity {
  /// <summary>
  /// Used in conjunction with Explodable to create composed explodable
  /// objects. Objects using ExplodablePart need a parent gameobject
  /// with Explodable attached.
  /// </summary>
  [RequireComponent(typeof(Rigidbody))]
  public class ExplodablePart : ResetPosition {
    [Tooltip("If true, unparent from the hierarchy when exploding.")]
    public bool UnParentOnExplode = false;

    void Start() {
      _body = GetComponent<Rigidbody>();
    }

    /// <summary>
    /// Attaches this part to a parent object, disabling gravity.
    /// </summary>
    /// <param name="parent">The parent.</param>
    public void Attach(Transform parent) {
      _body.isKinematic = true;
      ResetObject(parent);
    }

    /// <summary>
    /// Releases this instance, apply no force and letting gravity take over.
    /// </summary>
    public void Release() {
      _body.isKinematic = false;
      _body.transform.parent = null;
    }

    /// <summary>
    /// Releases the instance by applying an explosive force.
    /// </summary>
    /// <param name="force">Force to apply</param>
    public void Release(ExplosionForce force) {
      Release();
      if (force != null) {
        force.ApplyForce(_body);
      }
    }

    /// <summary>
    /// Releases the instance by applying explosive forces.
    /// </summary>
    /// <param name="forces">Forces to apply</param>
    public void Release(List<ExplosionForce> forces) {
      Release();
      if (forces != null && forces.Count > 0) {
        forces.ForEach(f => f.ApplyForce(_body));
      }
    }

    private Rigidbody _body;
  }
}


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

#nullable enable

namespace Marten.Storage
{
    #region sample_IFeatureSchema
    /// <summary>
    /// Defines the database objects for a named feature within your
    /// Marten application
    /// </summary>
    public interface IFeatureSchema
    {
        /// <summary>
        /// Any document or feature types that this feature depends on. Used
        /// to intelligently order the creation and scripting of database
        /// schema objects
        /// </summary>
        /// <returns></returns>
        IEnumerable<Type> DependentTypes();

        /// <summary>
        /// All the schema objects in this feature
        /// </summary>
        ISchemaObject[] Objects { get; }

        /// <summary>
        /// Identifier by type for this feature. Used along with the DependentTypes()
        /// collection to control the proper ordering of object creation or scripting
        /// </summary>
        Type StorageType { get; }

        /// <summary>
        /// Really just the filename when the SQL is exported
        /// </summary>
        string Identifier { get; }

        /// <summary>
        /// Write any permission SQL when this feature is exported to a SQL
        /// file
        /// </summary>
        /// <param name="rules"></param>
        /// <param name="writer"></param>
        void WritePermissions(DdlRules rules, TextWriter writer);
    }

    #endregion sample_IFeatureSchema

    /// <summary>
    /// Base class for easier creation of custom IFeatureSchema objects
    /// </summary>
    public abstract class FeatureSchemaBase: IFeatureSchema
    {
        public string Identifier { get; }

        protected FeatureSchemaBase(string identifier)
        {
            Identifier = identifier;
        }

        public virtual IEnumerable<Type> DependentTypes()
        {
            return new Type[0];
        }

        protected abstract IEnumerable<ISchemaObject> schemaObjects();

        public ISchemaObject[] Objects => schemaObjects().ToArray();

        public virtual Type StorageType => GetType();

        public virtual void WritePermissions(DdlRules rules, TextWriter writer)
        {
            // Nothing
        }
    }
}


text:
module Rack::Block::DSL
  module Responses
    def detect_matching_pattern
      if in_ua_block?
        ua_matchers[@_current_matching_ua_pattern] ||= {}
      elsif in_ip_block?
        ip_matchers[@_current_matching_ip_pattern] ||= {}
      end
    end

    # TODO non DRY on handling `@_current_matching_path' !!!! it is terrible!!
    def halt(code, opts={})
      if @_current_matching_path
        path = Regexp.compile("^" + @_current_matching_path.gsub(/\./, '\\.').gsub(/\*/, '.*'))
        current_matchers = detect_matching_pattern
        current_matchers[path] = [:do_halt, code, opts]
      else
        path '*' do
          halt code, opts
        end
      end
    end

    def redirect(dest_path, opts={})
      if @_current_matching_path
        path = Regexp.compile("^" + @_current_matching_path.gsub(/\./, '\\.').gsub(/\*/, '.*'))
        current_matchers = detect_matching_pattern
        current_matchers[path] = [:do_redirect, dest_path, opts]
      else
        path '*' do
          redirect dest_path, opts
        end
      end
    end

    def dummy_app(opts={}, &app_proc)
      if @_current_matching_path
        path = Regexp.compile("^" + @_current_matching_path.gsub(/\./, '\\.').gsub(/\*/, '.*'))
        current_matchers = detect_matching_pattern
        current_matchers[path] = [:do_dummy_app, app_proc, opts]
      else
        path '*' do
          dummy_app opts, &app_proc
        end
      end
    end

    alias_method :double, :dummy_app

    private
    def do_halt(req, code, opts={})
      headers = {"Content-Type" => "text/plain"}.merge(opts[:headers] || {})
      body = opts[:body] || "Halt!"
      return [code, headers, [body]]
    end

    def do_redirect(req, dest_path, opts={})
      dest_full_path = case dest_path
                       when /^https?:\/\//
                         dest_path
                       else
                         uri = URI.parse req.url
                         uri.path = dest_path
                         uri.to_s
                       end
      code = opts[:status_code] || 301
      return [code, {"Location" => dest_full_path}, []]
    end

    def do_dummy_app(req, app_proc, opts={})
      case app_proc.arity
      when -1, 0
        return app_proc.call.call(req.env)
      else
        return app_proc.call(req.env)
      end
    end
  end
end


text:
(function($){
/**
 * To make a form auto submit, all you have to do is 3 things:
 *
 * ctools_add_js('auto-submit');
 *
 * On gadgets you want to auto-submit when changed, add the ctools-auto-submit
 * class. With FAPI, add:
 * @code
 *  '#attributes' => array('class' => array('ctools-auto-submit')),
 * @endcode
 *
 * If you want to have auto-submit for every form element,
 * add the ctools-auto-submit-full-form to the form. With FAPI, add:
 * @code
 *   '#attributes' => array('class' => array('ctools-auto-submit-full-form')),
 * @endcode
 *
 * If you want to exclude a field from the ctool-auto-submit-full-form auto submission,
 * add the class ctools-auto-submit-exclude to the form element. With FAPI, add:
 * @code
 *   '#attributes' => array('class' => array('ctools-auto-submit-exclude')),
 * @endcode
 *
 * Finally, you have to identify which button you want clicked for autosubmit.
 * The behavior of this button will be honored if it's ajaxy or not:
 * @code
 *  '#attributes' => array('class' => array('ctools-use-ajax', 'ctools-auto-submit-click')),
 * @endcode
 *
 * Currently only 'select', 'radio', 'checkbox' and 'textfield' types are supported. We probably
 * could use additional support for HTML5 input types.
 */

Drupal.behaviors.CToolsAutoSubmit = {
  attach: function(context) {
    // 'this' references the form element
    function triggerSubmit (e) {
      var $this = $(this);
      if (!$this.hasClass('ctools-ajaxing')) {
        $this.find('.ctools-auto-submit-click').click();
      }
    }

    // the change event bubbles so we only need to bind it to the outer form
    $('form.ctools-auto-submit-full-form', context)
      .add('.ctools-auto-submit', context)
      .filter('form, select, input:not(:text, :submit, .ctools-auto-submit-exclude)')
      .once('ctools-auto-submit')
      .change(function (e) {
        // don't trigger on text change for full-form
        if ($(e.target).is(':not(:text, :submit)')) {
          triggerSubmit.call(e.target.form);
        }
      });

    // e.keyCode: key
    var discardKeyCode = [
      16, // shift
      17, // ctrl
      18, // alt
      20, // caps lock
      33, // page up
      34, // page down
      35, // end
      36, // home
      37, // left arrow
      38, // up arrow
      39, // right arrow
      40, // down arrow
       9, // tab
      13, // enter
      27  // esc
    ];
    // Don't wait for change event on textfields
    $('.ctools-auto-submit-full-form input:text, input:text.ctools-auto-submit', context)
      .filter(':not(.ctools-auto-submit-exclude)')
      .once('ctools-auto-submit', function () {
        // each textinput element has his own timeout
        var timeoutID = 0;
        $(this)
          .bind('keydown keyup', function (e) {
            if ($.inArray(e.keyCode, discardKeyCode) === -1) {
              timeoutID && clearTimeout(timeoutID);
            }
          })
          .keyup(function(e) {
            if ($.inArray(e.keyCode, discardKeyCode) === -1) {
              timeoutID = setTimeout($.proxy(triggerSubmit, this.form), 500);
            }
          });
      });
  }
}
})(jQuery);


text:
<?php

namespace MichalKocarek\TeamcityMessages\Tests;

use Exception;
use LogicException;
use MichalKocarek\TeamcityMessages\MessageLogger;
use MichalKocarek\TeamcityMessages\Writers\StdoutWriter;
use PHPUnit_Framework_TestCase;

class MessageLoggerCallbacksTest extends PHPUnit_Framework_TestCase
{

    /**
     * @param callable $caller
     * @param string $expected
     * @dataProvider callbacksDataProvider
     */
    public function testCallbacks(callable $caller, $expected)
    {
        $logger = new MessageLogger(new StdoutWriter());

        $callback = function(MessageLogger $passedLogger) use($logger) {
            self::assertSame($logger, $passedLogger);
            return 'foo';
        };

        ob_start();
        $result = $caller($logger, $callback);
        $dump = ob_get_clean();

        self::assertSame('foo', $result);

        $this->assertDump($expected, $dump);
    }

    /**
     * @param callable $caller
     * @param string $expected
     * @dataProvider callbacksDataProvider
     */
    public function testCallbacksRethrowException(callable $caller, $expected)
    {
        $logger = new MessageLogger(new StdoutWriter());

        $raisedException = new LogicException('Foo');

        $callback = function(MessageLogger $passedLogger) use($logger, $raisedException) {
            self::assertSame($logger, $passedLogger);
            throw $raisedException;
        };

        $exception = null;
        $result = null;
        ob_start();
        try {
            $result = $caller($logger, $callback);
        } catch(Exception $ex) {
            $exception = $ex;
        }
        $dump = ob_get_clean();

        self::assertSame($raisedException, $exception);
        self::assertNull($result);

        $this->assertDump($expected, $dump);
    }

    public function callbacksDataProvider()
    {
        return [
            'block' => [
                function(MessageLogger $logger, callable $callback) {
                    return $logger->block('Foo', 'bar', $callback);
                },
                "##teamcity[blockOpened timestamp='*' name='Foo' description='bar']" . PHP_EOL .
                "##teamcity[blockClosed timestamp='*' name='Foo']"
            ],
            'compilation' => [
                function(MessageLogger $logger, callable $callback) {
                    return $logger->compilation('gcc', $callback);
                },
                "##teamcity[compilationStarted timestamp='*' compilerName='gcc']" . PHP_EOL .
                "##teamcity[compilationFinished timestamp='*' compilerName='gcc']"
            ],
            'progress' => [
                function(MessageLogger $logger, callable $callback) {
                    return $logger->progress('Foo', $callback);
                },
                "##teamcity[progressStart timestamp='*' message='Foo']" . PHP_EOL .
                "##teamcity[progressFinish timestamp='*' message='Foo']"
            ],
            'without-service-messages' => [
                function(MessageLogger $logger, callable $callback) {
                    return $logger->withoutServiceMessages($callback);
                },
                "##teamcity[disableServiceMessages timestamp='*']" . PHP_EOL .
                "##teamcity[enableServiceMessages timestamp='*']"
            ]
        ];
    }

    /**
     * @param $expected
     * @param $dump
     */
    private function assertDump($expected, $dump)
    {
        // Normalize dynamic timestamp
        $dump = preg_replace("/timestamp='[^']+'/", "timestamp='*'", $dump);

        // Normalize expected
        $expected .= PHP_EOL;

        self::assertSame($expected, $dump);
    }

}


text:
OpenEBS
=======

[OpenEBS](https://github.com/openebs/openebs) is an open source storage platform that provides persistent and containerized block storage for DevOps and container environments.

OpenEBS can be deployed on any Kubernetes cluster - either in cloud, on-premise or developer laptop (minikube). OpenEBS itself is deployed as just another container on your cluster, and enables storage services that can be designated on a per pod, application, cluster or container level.

Introduction
------------

This chart bootstraps OpenEBS deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.

## Prerequisites
- Kubernetes 1.7.5+ with RBAC enabled
- iSCSI PV support in the underlying infrastructure

## Installing OpenEBS
```
helm install stable/openebs
```

## Installing OpenEBS with the release name `my-release`:
```
helm install --name `my-release` stable/openebs
```

## To uninstall/delete the `my-release` deployment:
```
helm ls --all
helm delete `my-release`
```

## Configuration

The following table lists the configurable parameters of the OpenEBS chart and their default values.

| Parameter                              | Description                                   | Default                           |
| -------------------------------------- | --------------------------------------------- | --------------------------------- |
| `rbac.create`                          | Enable RBAC Resources                         | `true`                            |
| `serviceAccount.create`                | Specify if Service Account should be created  | `true`                            |
| `serviceAccount.name`                  | Specify the name of service account           | `openebs-maya-operator`           |
| `image.pullPolicy`                     | Container pull policy                         | `IfNotPresent`                    |
| `apiserver.image`                      | Docker Image for API Server                   | `openebs/m-apiserver`             |
| `apiserver.imageTag`                   | Docker Image Tag for API Server               | `0.6.0`                           |
| `apiserver.replicas`                   | Number of API Server Replicas                 | `1`                               |
| `provisioner.image`                    | Docker Image for Provisioner                  | `openebs/openebs-k8s-provisioner` |
| `provisioner.imageTag`                 | Docker Image Tag for Provisioner              | `0.6.0`                           |
| `provisioner.replicas`                 | Number of Provisioner Replicas                | `1`                               |
| `snapshotOperator.provisioner.image`   | Docker Image for Snapshot Provisioner         | `openebs/snapshot-provisioner`    |
| `snapshotOperator.provisioner.imageTag`| Docker Image Tag for Snapshot Provisioner     | `0.6.0`                           |
| `snapshotOperator.controller.image`    | Docker Image for Snapshot Controller          | `openebs/snapshot-controller`     |
| `snapshotOperator.controller.imageTag` | Docker Image Tag for Snapshot Controller      | `0.6.0`                           |
| `snapshotOperator.replicas`            | Number of Snapshot Operator Replicas          | `1`                               |
| `jiva.image`                           | Docker Image for Jiva                         | `openebs/jiva`                    |
| `jiva.imageTag`                        | Docker Image Tag for Jiva                     | `0.6.0`                           |
| `jiva.replicas`                        | Number of Jiva Replicas                       | `3`                               |
| `jiva.replicaNodeSelector.enabled`     | Enable scheduling replicas with node selector | `false`                           |
| `jiva.replicaNodeSelector.value`       | node labels assigned to replica pods          | `nodetype=storage`                |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

```shell
helm install --name `my-release` -f values.yaml stable/openebs
```

> **Tip**: You can use the default [values.yaml](values.yaml)