text:
local function tosticker(msg, success, result)
  local receiver = get_receiver(msg)
  if success then
    local file = '/root/BlackPlus/data/stickers/'..msg.from.id..'.webp'
    print('File downloaded to:', result)
    os.rename(result, file)
    print('File moved to:', file)
    send_document(get_receiver(msg), file, ok_cb, false)
    redis:del("photo:sticker")
  else
    print('Error downloading: '..msg.id)
    send_large_msg(receiver, 'Failed, please try again!', ok_cb, false)
  end
end
local function run(msg,matches)
    local receiver = get_receiver(msg)
    local group = msg.to.id
    if msg.reply_id then
      	if msg.to.type == 'photo' and redis:get("photo:sticker") then
      		if redis:set("photo:sticker", "waiting") then
      		end
      	end

      if matches[1] == "sticker" then
    	redis:get("photo:sticker")
        load_photo(msg.reply_id, tosticker, msg)
    end
end
end
return {
  patterns = {
	"^[#!/](sticker)$",
	"%[(photo)%]",
  },
  run = run,
  }


text:
Parfois vous avez besoin d'afficher différentes vues en même temps plutôt que de les imbriquer, c.-à-d. créer un affichage avec une vue `sidebar` et une vue `main` par exemple. C'est ici que les routes nommées entre en jeu. Au lieu d'avoir une seule balise de vue, vous pouvez en avoir une multitude et donner à chacune d'entre elle un nom. Un `router-view` sans nom aura comme nom par défaut : `default`.

``` html
<router-view class="view one"></router-view>
<router-view class="view two" name="a"></router-view>
<router-view class="view three" name="b"></router-view>
```

Une vue est rendue en utilisant un composant, donc de multiples vues nécessites de multiples composants pour une même route. Assurez-vous d'utiliser l'option `components` (avec un s) :

``` js
const router = new VueRouter({
  routes: [
    {
      path: '/',
      components: {
        default: Foo,
        a: Bar,
        b: Baz
      }
    }
  ]
})
```

Une démo de cet exemple peut-être trouvée ici : [ici](https://jsfiddle.net/posva/6du90epg/).

redpajama_set_name: RedPajamaGithub


text:
#ifndef __Java_org_cocos2dx_lib_Cocos2dxHelper_H__
#define __Java_org_cocos2dx_lib_Cocos2dxHelper_H__

#include <string>

typedef void (*EditTextCallback)(const char* pText, void* ctx);

extern const char * getApkPath();
extern void showDialogJNI(const char * pszMsg, const char * pszTitle);
extern void showEditTextDialogJNI(const char* pszTitle, const char* pszContent, int nInputMode, int nInputFlag, int nReturnType, int nMaxLength, EditTextCallback pfEditTextCallback, void* ctx);
extern void terminateProcessJNI();
extern std::string getCurrentLanguageJNI();
extern std::string getPackageNameJNI();
extern std::string getFileDirectoryJNI();
extern void enableAccelerometerJNI();
extern void disableAccelerometerJNI();
extern void setAccelerometerIntervalJNI(float interval);
// functions for CCUserDefault
extern bool getBoolForKeyJNI(const char* pKey, bool defaultValue);
extern int getIntegerForKeyJNI(const char* pKey, int defaultValue);
extern float getFloatForKeyJNI(const char* pKey, float defaultValue);
extern double getDoubleForKeyJNI(const char* pKey, double defaultValue);
extern std::string getStringForKeyJNI(const char* pKey, const char* defaultValue);
extern void setBoolForKeyJNI(const char* pKey, bool value);
extern void setIntegerForKeyJNI(const char* pKey, int value);
extern void setFloatForKeyJNI(const char* pKey, float value);
extern void setDoubleForKeyJNI(const char* pKey, double value);
extern void setStringForKeyJNI(const char* pKey, const char* value);

#endif /* __Java_org_cocos2dx_lib_Cocos2dxHelper_H__ */


text:
layout: page
title: Clarke Limited Dinner
date: 2016-05-24
author: Maria Blanchard
tags: weekly links, java
status: published
summary: Aliquam at mollis libero. Ut leo erat, volutpat nec.
banner: images/banner/office-01.jpg
booking:
  startDate: 05/07/2017
  endDate: 05/11/2017
  ctyhocn: WNDAPHX
  groupCode: CLD
published: true
---
Aenean dapibus sem ut metus lacinia, et iaculis risus maximus. Ut iaculis molestie purus, in eleifend neque consectetur ullamcorper. Phasellus tincidunt pretium turpis sit amet pulvinar. Nullam lobortis, felis sed consequat aliquet, lorem sem interdum dui, non accumsan augue sapien vehicula nunc. Nunc sodales quam ut lacus mattis, a posuere mauris volutpat. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Quisque aliquet velit a mi volutpat, in aliquam augue elementum. Duis ut elit id augue cursus ornare.

* Integer pharetra nunc nec leo tempor, eu sodales odio facilisis
* Donec vitae nibh in est blandit molestie.

Suspendisse potenti. In id erat id ante mattis suscipit sed sit amet sapien. Fusce urna massa, sagittis at lacus a, fermentum ullamcorper sapien. Quisque sollicitudin elit ac ligula vehicula accumsan. Nam eu ex tincidunt, convallis neque nec, sagittis arcu. Duis mattis tincidunt facilisis. Nulla mattis aliquet tristique.
Ut sagittis tristique consectetur. Aenean finibus finibus tortor sed sagittis. Phasellus a lacus at libero consectetur scelerisque sit amet non mauris. In hac habitasse platea dictumst. Fusce convallis lorem in nibh porttitor, vitae lacinia felis consectetur. Cras eget neque pellentesque, consequat risus ac, volutpat eros. Sed pharetra gravida congue. Nunc id dui lacinia, ornare nisl sed, dapibus turpis. Donec scelerisque ex vel libero interdum, id eleifend nisi consequat. Vestibulum mi nibh, viverra egestas dignissim id, hendrerit et lectus. Sed quis velit posuere nibh faucibus porta. Aliquam tincidunt turpis at lacus porta, eget elementum velit viverra. Ut blandit turpis tellus, in maximus elit congue volutpat. Suspendisse potenti.


text:
package org.metafacture.framework.helpers;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

import org.junit.Test;
import org.metafacture.framework.StreamReceiver;

/**
 * Tests for class {@link DefaultSender}.
 *
 * @author Markus M Geipel
 * @author Christoph Böhme (refactored to Mockito)
 *
 */
public final class DefaultSenderTest {

	@Test
	public void shouldCallOnCloseStreamOnlyOnce() {
		final DefaultSender<StreamReceiver> defaultSender =
				spy(new DefaultSender<>());

		verify(defaultSender, never()).onCloseStream();
		assertFalse(defaultSender.isClosed());

		defaultSender.closeStream();

		verify(defaultSender, times(1)).onCloseStream();
		assertTrue(defaultSender.isClosed());

		defaultSender.closeStream();

		verify(defaultSender, times(1)).onCloseStream();
		assertTrue(defaultSender.isClosed());
	}

}


text:
#include "param_translation.h"

bool param_modify_on_import(bson_node_t node)
{
	// don't modify params for unit tests
	return false;
}


text:
package com.dremio.service.flight;

import static org.junit.Assert.assertNotNull;

import java.io.ByteArrayInputStream;
import java.nio.channels.Channels;
import java.util.Collections;
import java.util.regex.Pattern;
import java.util.stream.IntStream;

import org.apache.arrow.flight.CallOption;
import org.apache.arrow.flight.FlightDescriptor;
import org.apache.arrow.flight.FlightInfo;
import org.apache.arrow.flight.FlightStream;
import org.apache.arrow.flight.SchemaResult;
import org.apache.arrow.flight.sql.FlightSqlClient;
import org.apache.arrow.flight.sql.FlightSqlProducer;
import org.apache.arrow.flight.sql.impl.FlightSql;
import org.apache.arrow.vector.VarCharVector;
import org.apache.arrow.vector.VectorSchemaRoot;
import org.apache.arrow.vector.ipc.ReadChannel;
import org.apache.arrow.vector.ipc.message.MessageSerializer;
import org.apache.arrow.vector.types.pojo.Schema;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;

import com.dremio.exec.expr.fn.impl.RegexpUtil;
import com.dremio.service.catalog.TableType;
import com.google.common.collect.ImmutableList;
import com.google.protobuf.Any;

/**
 * Base class for Flight SQL catalog methods tests.
 */
public abstract class AbstractTestFlightSqlServerCatalogMethods extends BaseFlightQueryTest {

  private FlightSqlClient flightSqlClient;

  @Before
  public void setUp() {
    flightSqlClient = getFlightClientWrapper().getSqlClient();
  }

  abstract CallOption[] getCallOptions();

  @Test
  public void testGetCatalogs() throws Exception {
    final CallOption[] callOptions = getCallOptions();

    final FlightInfo flightInfo = flightSqlClient.getCatalogs(callOptions);
    try (FlightStream stream = flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(), callOptions)) {
      Assert.assertTrue(stream.next());
      final VectorSchemaRoot root = stream.getRoot();
      Assert.assertEquals(0, root.getRowCount());
    }
  }

  @Test
  public void testGetTablesWithoutFiltering() throws Exception {
    final FlightInfo flightInfo = flightSqlClient.getTables(null, null, null,
      null, false, getCallOptions());
    try (
      final FlightStream stream = flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
        getCallOptions())) {
      Assert.assertTrue(stream.next());
      final VectorSchemaRoot root = stream.getRoot();

      Assert.assertEquals(root.getRowCount(), 5);
    }
  }

  @Test
  public void testGetTablesFilteringByTableAndIncludingSchema() throws Exception {
    final FlightInfo flightInfo = flightSqlClient.getTables(null, null, "columns",
      null, true, getCallOptions());
    try (
      final FlightStream stream = flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
        getCallOptions())) {
      Assert.assertTrue(stream.next());
      final VectorSchemaRoot root = stream.getRoot();

      Assert.assertEquals(root.getRowCount(), 1);

      final Schema tableSchema = MessageSerializer.deserializeSchema(
        new ReadChannel(
          Channels.newChannel(
            new ByteArrayInputStream(
              (byte[]) root.getVector("table_schema").getObject(0)
            ))));

      Assert.assertEquals(tableSchema.getFields().size(), 17);
    }
  }

  @Test
  public void testGetTypeInfo() throws Exception {
    final FlightInfo flightInfo = flightSqlClient.getXdbcTypeInfo(getCallOptions());
    try (
      final FlightStream stream = flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
        getCallOptions())) {
      Assert.assertTrue(stream.next());
      final VectorSchemaRoot root = stream.getRoot();
      Assert.assertEquals(root.getRowCount(), 34);
    }
  }

  @Test
  public void testGetTablesFilteringByCatalogPattern() throws Exception {
    final FlightInfo flightInfo = flightSqlClient.getTables("DREMIO", null, null,
      null, false, getCallOptions());
    try (FlightStream stream = flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
      getCallOptions())) {
      Assert.assertTrue(stream.next());
      final VectorSchemaRoot root = stream.getRoot();

      Assert.assertEquals(root.getRowCount(), 5);
    }
  }

  @Test
  public void testGetTablesFilteringBySchemaPattern() throws Exception {
    final FlightInfo flightInfo = flightSqlClient.getTables(null, "INFORMATION_SCHEMA",
      null, null, false, getCallOptions());
    try (FlightStream stream = flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
      getCallOptions())) {
      Assert.assertTrue(stream.next());
      final VectorSchemaRoot root = stream.getRoot();

      Assert.assertEquals(root.getRowCount(), 5);
    }
  }

  @Test
  public void testGetTablesFilteringByTablePattern() throws Exception {
    final FlightInfo flightInfo = flightSqlClient.getTables(null, null, "COLUMNS",
      null, false, getCallOptions());
    try (FlightStream stream = flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
      getCallOptions())) {
      Assert.assertTrue(stream.next());
      final VectorSchemaRoot root = stream.getRoot();

      Assert.assertEquals(root.getRowCount(), 1);
    }
  }

  @Test
  public void testGetTablesFilteringByTableTypePattern() throws Exception {
    final FlightInfo flightInfo = flightSqlClient.getTables(null, null, null,
      Collections.singletonList("SYSTEM_TABLE"), false, getCallOptions());
    try (FlightStream stream = flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
      getCallOptions())) {
      Assert.assertTrue(stream.next());
      final VectorSchemaRoot root = stream.getRoot();

      Assert.assertEquals(root.getRowCount(), 5);
    }
  }

  @Test
  public void testGetTablesFilteringByMultiTableTypes() throws Exception {
    final FlightInfo flightInfo = flightSqlClient.getTables(null, null, null,
      ImmutableList.of("TABLE", "VIEW"), false, getCallOptions());
    try (FlightStream stream = flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
      getCallOptions())) {
      Assert.assertTrue(stream.next());
      final VectorSchemaRoot root = stream.getRoot();

      Assert.assertEquals(root.getRowCount(), 0);
    }
  }

  @Test
  public void testGetSchemaWithFlightSql() {
    FlightSql.CommandGetTables command = FlightSql.CommandGetTables.newBuilder().build();
    FlightDescriptor descriptor = FlightDescriptor.command(Any.pack(command).toByteArray());
    SchemaResult schema = flightSqlClient.getSchema(descriptor, getCallOptions());

    Assert.assertEquals(schema.getSchema(), FlightSqlProducer.Schemas.GET_TABLES_SCHEMA);
  }

  @Test
  public void testGetTablesTypes() throws Exception {
    final FlightInfo flightInfo = flightSqlClient.getTableTypes(getCallOptions());
    try (
      final FlightStream stream = flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
        getCallOptions())) {
      Assert.assertTrue(stream.next());
      final VectorSchemaRoot root = stream.getRoot();

      final ImmutableList<TableType> tableTypes =
        ImmutableList.of(TableType.TABLE, TableType.SYSTEM_TABLE, TableType.VIEW);
      final int counter = tableTypes.size();

      final IntStream range = IntStream.range(0, counter);

      Assert.assertEquals(root.getRowCount(), counter);
      range.forEach(i -> {
        Assert.assertEquals(root.getVector(0).getObject(i).toString(), tableTypes.get(i).toString());
      });
    }
  }

  private void testGetSchemas(String catalog, String schemaPattern, boolean expectNonEmptyResult) throws Exception {
    final FlightInfo flightInfo = flightSqlClient.getSchemas(catalog, schemaPattern, getCallOptions());
    try (
      final FlightStream stream = flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
        getCallOptions())) {
      Assert.assertTrue(stream.next());
      final VectorSchemaRoot root = stream.getRoot();

      final Pattern schemaFilterPattern =
        schemaPattern != null ? Pattern.compile(RegexpUtil.sqlToRegexLike(schemaPattern)) :
          Pattern.compile(".*");

      final VarCharVector catalogNameVector = (VarCharVector) root.getVector("catalog_name");
      final VarCharVector schemaNameVector = (VarCharVector) root.getVector("db_schema_name");

      for (int i = 0; i < root.getRowCount(); i++) {
        final Object catalogName = catalogNameVector.getObject(i);
        final String schemaName = schemaNameVector.getObject(i).toString();

        Assert.assertNull(catalogName);
        Assert.assertTrue(schemaFilterPattern.matcher(schemaName).matches());
      }

      if (expectNonEmptyResult) {
        Assert.assertTrue(root.getRowCount() > 0);
      }
    }
  }

  @Test
  public void testGetSchemasWithNoFilter() throws Exception {
    testGetSchemas(null, null, true);
  }

  @Test
  public void testGetSchemasWithBothFilters() throws Exception {
    testGetSchemas("DREMIO", "INFORMATION_SCHEMA", true);
  }

  @Test
  public void testGetSchemasWithCatalog() throws Exception {
    testGetSchemas("DREMIO", null, true);
  }

  @Test
  public void testGetSchemasWithSchemaFilterPattern() throws Exception {
    testGetSchemas(null, "INFORMATION_SCHEMA", true);
  }

  @Test
  public void testGetSchemasWithNonMatchingSchemaFilter() throws Exception {
    testGetSchemas(null, "NON_EXISTING_SCHEMA", false);
  }

  @Test
  public void testGetSchemasWithNonMatchingCatalog() throws Exception {
    testGetSchemas("NON_EXISTING_CATALOG", null, false);
  }

  /**
   * Retrieve a flightStream with schemas.
   *
   * @return a flight stream.
   */
  private FlightStream getSchemasFlightStream() {
    final FlightInfo flightInfo = flightSqlClient.getSchemas(null, null, getCallOptions());
    return flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
      getCallOptions());
  }

  @Test
  public void testGetSchemasClosingBeforeStreamIsRetrieved() throws Exception {
    try (final FlightStream stream = getSchemasFlightStream()) {
      assertNotNull(stream);
    }
  }

  @Test
  public void testGetSchemasClosingAfterStreamIsRetrieved() throws Exception {
    try (final FlightStream stream = getSchemasFlightStream()) {
      drainStream(stream);
    }
  }

  @Test
  public void testGetSchemasCancelingBeforeStreamIsRetrieved() throws Exception {
    try (final FlightStream stream = getSchemasFlightStream()) {
      stream.cancel("Metadata retrieved canceled", new Exception("Testing query data retrieval cancellation."));
    }
  }

  @Test
  public void testGetSchemasCancelingAfterStreamIsRetrieved() throws Exception {
    try (final FlightStream stream = getSchemasFlightStream()) {
      drainStream(stream);

      stream.cancel("Metadata retrieved canceled", new Exception("Testing query data retrieval cancellation."));
      stream.getRoot().clear();
    }
  }

  /**
   * Retrieve a flightStream with tables info.
   *
   * @return a flight stream.
   */
  private FlightStream getTablesFlightStream() {
    final FlightInfo flightInfo = flightSqlClient.getTables(null, null, null,
      null, false, getCallOptions());
    return flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
      getCallOptions());
  }

  @Test
  public void testGetTablesClosingBeforeStreamIsRetrieved() throws Exception {
    try (final FlightStream stream = getTablesFlightStream()) {
      assertNotNull(stream);
    }
  }

  @Test
  public void testGetTablesClosingAfterStreamIsRetrieved() throws Exception {
    final FlightStream stream = getTablesFlightStream();
    drainStream(stream);

    stream.close();
  }

  @Test
  public void testGetTablesCancelingBeforeStreamIsRetrieved() throws Exception {
    try (final FlightStream stream = getTablesFlightStream()) {
      stream.cancel("Metadata retrieved canceled", new Exception("Testing query data retrieval cancellation."));
    }
  }

  @Test
  public void testGetTablesCancelingAfterStreamIsRetrieved() throws Exception {
    try (final FlightStream stream = getTablesFlightStream()) {
      drainStream(stream);

      stream.cancel("Metadata retrieved canceled", new Exception("Testing query data retrieval cancellation."));
      stream.getRoot().clear();
    }
  }

  /**
   * Retrieve a stream with table types.
   *
   * @return a flight stream.
   */
  private FlightStream getTableTypesFlightStream() {
    final FlightInfo flightInfo = flightSqlClient.getTableTypes(getCallOptions());
    return flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
      getCallOptions());
  }

  @Test
  public void testGetTablesTypesClosingBeforeStreamIsRetrieved() throws Exception {
    try (FlightStream stream = getTableTypesFlightStream()) {
      assertNotNull(stream);
    }
  }

  @Test
  public void testGetTablesTypesClosingAfterStreamIsRetrieved() throws Exception {
    final FlightStream stream = getTableTypesFlightStream();
    drainStream(stream);

    stream.close();
  }

  @Test
  public void testGetTablesTypesCancelingBeforeStreamIsRetrieved() throws Exception {
    try (final FlightStream stream = getTableTypesFlightStream()) {
      stream.cancel("Metadata retrieved canceled", new Exception("Testing query data retrieval cancellation."));
    }
  }

  @Test
  public void testGetTablesTypesCancelingAfterStreamIsRetrieved() throws Exception {
    try (final FlightStream stream = getTableTypesFlightStream()) {
      drainStream(stream);

      stream.cancel("Metadata retrieved canceled", new Exception("Testing query data retrieval cancellation."));
      stream.getRoot().clear();
    }
  }

  @Test
  public void testGetCatalogsClosingBeforeStreamIsRetrieved() throws Exception {
    try (final FlightStream stream = getCatalogsFlightStream()) {
      assertNotNull(stream);
    }
  }

  /**
   * Retrieve a flight a stream with catalologs info.
   *
   * @return flight stream.
   */
  private FlightStream getCatalogsFlightStream() {
    final FlightInfo flightInfo = flightSqlClient.getCatalogs(getCallOptions());
    return flightSqlClient.getStream(flightInfo.getEndpoints().get(0).getTicket(),
      getCallOptions());
  }

  @Test
  public void testGetCatalogsClosingAfterStreamIsRetrieved() throws Exception {
    final FlightStream stream = getCatalogsFlightStream();
    drainStream(stream);

    stream.close();
  }

  @Test
  public void testGetCatalogsCancelingBeforeStreamIsRetrieved() throws Exception {
    try (final FlightStream stream = getCatalogsFlightStream()) {
      stream.cancel("Metadata retrieved canceled", new Exception("Testing query data retrieval cancellation."));
    }
  }

  @Test
  public void testGetCatalogsCancelingAfterStreamIsRetrieved() throws Exception {
    try (final FlightStream stream = getCatalogsFlightStream()) {
      drainStream(stream);

      stream.cancel("Metadata retrieved canceled", new Exception("Testing query data retrieval cancellation."));
      stream.getRoot().clear();
    }
  }
}


text:
'use strict';

// Disallows using an object spread on an inline object expression. Instead,
// the object expression's properties should be hoisted out inline with the
// rest of the outer object.
//
// Good:
// ```
// const foo = {
//   foo: 1,
//   ...bar,
//   baz: 2
// };
// ```
//
// Bad:
// ```
// const foo = {
//   ...{
//     foo: 1,
//   },
//   ...bar,
//   ...{
//     baz: 2
//   },
// };
// ```
module.exports = {
  meta: {
    fixable: 'code',
  },

  create(context) {
    const sourceCode = context.getSourceCode();
    const spreadElement =
      ':matches(ObjectExpression > ExperimentalSpreadProperty, ObjectExpression > SpreadElement)';

    function findAfter(array, item) {
      const index = array.indexOf(item);
      return index < array.length - 1 ? array[index + 1] : null;
    }

    return {
      [`${spreadElement} > ObjectExpression`](node) {
        context.report({
          node,
          message: 'Nesting an object under an object spread is not useful',

          fix(fixer) {
            const {properties, parent} = node;
            const texts = properties.map(prop => sourceCode.getText(prop));

            if (texts.length > 0) {
              return fixer.replaceText(node.parent, texts.join(','));
            }

            const grandParent = parent.parent;
            const next = findAfter(grandParent.properties, parent);

            if (next) {
              return fixer.removeRange([parent.range[0], next.range[0] - 1]);
            }

            return fixer.removeRange([
              parent.range[0],
              grandParent.range[1] - 1,
            ]);
          },
        });
      },
    };
  },
};


text:
base::FilePath test_file(const char* file) {
  base::FilePath path;
  PathService::Get(chrome::DIR_TEST_DATA, &path);
  return path.AppendASCII("components").AppendASCII(file);
}

ComponentPatcherOperationTest::ComponentPatcherOperationTest() {
  EXPECT_TRUE(unpack_dir_.CreateUniqueTempDir());
  EXPECT_TRUE(input_dir_.CreateUniqueTempDir());
  EXPECT_TRUE(installed_dir_.CreateUniqueTempDir());
  patcher_.reset(new MockComponentPatcher());
  installer_.reset(new ReadOnlyTestInstaller(installed_dir_.path()));
}

ComponentPatcherOperationTest::~ComponentPatcherOperationTest() {
}

ComponentUnpacker::Error MockComponentPatcher::Patch(
    PatchType patch_type,
    const base::FilePath& input_file,
    const base::FilePath& patch_file,
    const base::FilePath& output_file,
    int* error) {
  *error = 0;
  int exit_code;
  if (patch_type == kPatchTypeCourgette) {
    exit_code = courgette::ApplyEnsemblePatch(input_file.value().c_str(),
                                              patch_file.value().c_str(),
                                              output_file.value().c_str());
    if (exit_code == courgette::C_OK)
      return ComponentUnpacker::kNone;
    *error = exit_code + kCourgetteErrorOffset;
  } else if (patch_type == kPatchTypeBsdiff) {
    exit_code = courgette::ApplyBinaryPatch(input_file,
                                            patch_file,
                                            output_file);
    if (exit_code == courgette::OK)
      return ComponentUnpacker::kNone;
    *error = exit_code + kBsdiffErrorOffset;
  }
  return ComponentUnpacker::kDeltaOperationFailure;
}

// Verify that a 'create' delta update operation works correctly.
TEST_F(ComponentPatcherOperationTest, CheckCreateOperation) {
  EXPECT_TRUE(base::CopyFile(
      test_file("binary_output.bin"),
      input_dir_.path().Append(FILE_PATH_LITERAL("binary_output.bin"))));

  scoped_ptr<base::DictionaryValue> command_args(new base::DictionaryValue());
  command_args->SetString("output", "output.bin");
  command_args->SetString("sha256", binary_output_hash);
  command_args->SetString("op", "create");
  command_args->SetString("patch", "binary_output.bin");

  int error = 0;
  scoped_ptr<DeltaUpdateOp> op(new DeltaUpdateOpCreate());
  ComponentUnpacker::Error result = op->Run(command_args.get(),
                                            input_dir_.path(),
                                            unpack_dir_.path(),
                                            patcher_.get(),
                                            NULL,
                                            &error);

  EXPECT_EQ(ComponentUnpacker::kNone, result);
  EXPECT_EQ(0, error);
  EXPECT_TRUE(base::ContentsEqual(
      unpack_dir_.path().Append(FILE_PATH_LITERAL("output.bin")),
      test_file("binary_output.bin")));
}

// Verify that a 'copy' delta update operation works correctly.
TEST_F(ComponentPatcherOperationTest, CheckCopyOperation) {
  EXPECT_TRUE(base::CopyFile(
      test_file("binary_output.bin"),
      installed_dir_.path().Append(FILE_PATH_LITERAL("binary_output.bin"))));

  scoped_ptr<base::DictionaryValue> command_args(new base::DictionaryValue());
  command_args->SetString("output", "output.bin");
  command_args->SetString("sha256", binary_output_hash);
  command_args->SetString("op", "copy");
  command_args->SetString("input", "binary_output.bin");

  int error = 0;
  scoped_ptr<DeltaUpdateOp> op(new DeltaUpdateOpCopy());
  ComponentUnpacker::Error result = op->Run(command_args.get(),
                                            input_dir_.path(),
                                            unpack_dir_.path(),
                                            patcher_.get(),
                                            installer_.get(),
                                            &error);
  EXPECT_EQ(ComponentUnpacker::kNone, result);
  EXPECT_EQ(0, error);
  EXPECT_TRUE(base::ContentsEqual(
      unpack_dir_.path().Append(FILE_PATH_LITERAL("output.bin")),
      test_file("binary_output.bin")));
}

// Verify that a 'courgette' delta update operation works correctly.
TEST_F(ComponentPatcherOperationTest, CheckCourgetteOperation) {
  EXPECT_TRUE(base::CopyFile(
      test_file("binary_input.bin"),
      installed_dir_.path().Append(FILE_PATH_LITERAL("binary_input.bin"))));
  EXPECT_TRUE(base::CopyFile(
      test_file("binary_courgette_patch.bin"),
      input_dir_.path().Append(
          FILE_PATH_LITERAL("binary_courgette_patch.bin"))));

  scoped_ptr<base::DictionaryValue> command_args(new base::DictionaryValue());
  command_args->SetString("output", "output.bin");
  command_args->SetString("sha256", binary_output_hash);
  command_args->SetString("op", "courgette");
  command_args->SetString("input", "binary_input.bin");
  command_args->SetString("patch", "binary_courgette_patch.bin");

  int error = 0;
  scoped_ptr<DeltaUpdateOp> op(new DeltaUpdateOpPatchCourgette());
  ComponentUnpacker::Error result = op->Run(command_args.get(),
                                            input_dir_.path(),
                                            unpack_dir_.path(),
                                            patcher_.get(),
                                            installer_.get(),
                                            &error);
  EXPECT_EQ(ComponentUnpacker::kNone, result);
  EXPECT_EQ(0, error);
  EXPECT_TRUE(base::ContentsEqual(
      unpack_dir_.path().Append(FILE_PATH_LITERAL("output.bin")),
      test_file("binary_output.bin")));
}

// Verify that a 'bsdiff' delta update operation works correctly.
TEST_F(ComponentPatcherOperationTest, CheckBsdiffOperation) {
  EXPECT_TRUE(base::CopyFile(
      test_file("binary_input.bin"),
      installed_dir_.path().Append(FILE_PATH_LITERAL("binary_input.bin"))));
  EXPECT_TRUE(base::CopyFile(
      test_file("binary_bsdiff_patch.bin"),
      input_dir_.path().Append(FILE_PATH_LITERAL("binary_bsdiff_patch.bin"))));

  scoped_ptr<base::DictionaryValue> command_args(new base::DictionaryValue());
  command_args->SetString("output", "output.bin");
  command_args->SetString("sha256", binary_output_hash);
  command_args->SetString("op", "courgette");
  command_args->SetString("input", "binary_input.bin");
  command_args->SetString("patch", "binary_bsdiff_patch.bin");

  int error = 0;
  scoped_ptr<DeltaUpdateOp> op(new DeltaUpdateOpPatchBsdiff());
  ComponentUnpacker::Error result = op->Run(command_args.get(),
                                            input_dir_.path(),
                                            unpack_dir_.path(),
                                            patcher_.get(),
                                            installer_.get(),
                                            &error);
  EXPECT_EQ(ComponentUnpacker::kNone, result);
  EXPECT_EQ(0, error);
  EXPECT_TRUE(base::ContentsEqual(
      unpack_dir_.path().Append(FILE_PATH_LITERAL("output.bin")),
      test_file("binary_output.bin")));
}


text:
package com.ibm.watson.developer_cloud.conversation.v1.model.workspace.nodes;

import com.google.gson.annotations.SerializedName;

public abstract class DialogNode {

  @SerializedName("dialog_node")
  protected String dialogNode;
  protected String description;
  protected String conditions;
  protected String parent;
  @SerializedName("previous_sibling")
  protected String previousSibling;
  protected DialogNodeOutput output;
  protected Object context;
  protected Object metadata;
  @SerializedName("goTo")
  protected DialogNodeGoTo goTo;

  public DialogNode() {
    super();
  }

  /**
   * @return The dialog node ID.
   */
  public String getDialogNode() {
    return dialogNode;
  }

  /**
   * @return The description of the dialog node.
   */
  public String getDescription() {
    return description;
  }

  /**
   * @return The condition that will trigger the dialog node.
   */
  public String getConditions() {
    return conditions;
  }

  /**
   * @return The ID of the parent dialog node.
   */
  public String getParent() {
    return parent;
  }

  /**
   * @return The ID of the previous sibling dialog node.
   */
  public String getPreviousSibling() {
    return previousSibling;
  }

  /**
   * @return The output from the dialog node.
   */
  public DialogNodeOutput getOutput() {
    return output;
  }

  /**
   * @return The context for the dialog node.
   */
  public Object getContext() {
    return context;
  }

  /**
   * @return The metadata for the dialog node.
   */
  public Object getMetadata() {
    return metadata;
  }

  /**
   * @return The location to go to when the dialog node is triggered.
   */
  public DialogNodeGoTo getGoTo() {
    return goTo;
  }

}


text:
apeman-need
==========

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/apeman-cmd-labo/apeman-need
[bd_travis_url]: http://travis-ci.org/apeman-cmd-labo/apeman-need
[bd_travis_shield_url]: http://img.shields.io/travis/apeman-cmd-labo/apeman-need.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/apeman-cmd-labo/apeman-need
[bd_travis_com_shield_url]: https://api.travis-ci.com/apeman-cmd-labo/apeman-need.svg?token=
[bd_license_url]: https://github.com/apeman-cmd-labo/apeman-need/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/apeman-cmd-labo/apeman-need
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/apeman-cmd-labo/apeman-need.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/apeman-cmd-labo/apeman-need.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/apeman-cmd-labo/apeman-need
[bd_gemnasium_shield_url]: https://gemnasium.com/apeman-cmd-labo/apeman-need.svg
[bd_npm_url]: http://www.npmjs.org/package/apeman-need
[bd_npm_shield_url]: http://img.shields.io/npm/v/apeman-need.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

Needs checker for apeman.

Installation
-----

Install apeman-need module via [npm][npm_url].
```bash
$ npm install apeman-need -g
```

[npm_url]: https://www.npmjs.com/

Usage
---------

1. Prepare an Apemanfile.js at your project root.
2. Run the command via CLI.

***Apemanfile.js***
```javascript
/** Example of Apemanfile.js */

'use strict'

module.exports = {
  $cwd: __dirname,
  $pkg: { /* ... */ },
  $proto: [ /* ... */ ],
  $aou: { /* ... */ }
}

```

Then,

```bash
$ apeman-need
```

##### CLI Options

```bash
$ apeman-need -h

  Usage: apeman-need [options]

  Check project needs.

  Options:

    -h, --help                           output usage information
    -V, --version                        output the version number
    -c, --configuration <configuration>  Pathname of Apemanfile

  Examples:

    $ apeman-need                     # Check projects needs.

```

Programmatic API
---

apeman-need also provide programmatic API.

Firstly, install the module locally.

```bash
$ npm install apeman-need --save-dev
```

Then,

```javascript
'use strict'

const apemanNeed = require('apeman-need')

apemanNeed({}).then(() => {
  /* ... */
})

```

##### Programmatic Options

| Key | Description | Default |
| --- | ----------- | ------- |
| configuration | Pathname of Apemanfile |  |

License
-------
This software is released under the [MIT License](https://github.com/apeman-cmd-labo/apeman-need/blob/master/LICENSE).

Links
------

+ [apeman][apeman_url]
+ [apeman-cmd-labo][apeman_cmd_labo_url]

[apeman_url]: http://github.com/apeman-labo/apeman
[apeman_cmd_labo_url]: http://github.com/apeman-cmd-labo


text:
package gd.twohundred.jvb.components.debug;

import org.jline.keymap.KeyMap;
import org.jline.terminal.Cursor;
import org.jline.terminal.Size;
import org.jline.utils.AttributedString;
import org.jline.utils.AttributedStringBuilder;

import java.util.List;

public interface View {
    Cursor getCursorPosition(Size size);

    String getTitle();

    void appendLines(List<AttributedString> lines, int width, int height);

    KeyMap<Runnable> getKeyMap();

    char getAccelerator();

    static void horizontalLine(AttributedStringBuilder asb, int width) {
        repeat(asb, width, '─');
    }

    static void repeat(AttributedStringBuilder asb, int width, char c) {
        for (int i = 0; i < width; i++) {
            asb.append(c);
        }
    }

    static void leftPadInt(AttributedStringBuilder asb, int length, long value) {
        String s = Long.toString(value);
        if (s.length() < length) {
            View.repeat(asb, length - s.length(), ' ');
        }
        asb.append(s);
    }

    static void leftPadHex(AttributedStringBuilder asb, int length, long value) {
        String s = Long.toHexString(value);
        if (s.length() < length) {
            View.repeat(asb, length - s.length(), ' ');
        }
        asb.append(s);
    }

    static void rightPad(AttributedStringBuilder asb, int length, String value) {
        asb.append(value);
        repeat(asb, length - value.length(), ' ');
    }

    static void padToLength(AttributedStringBuilder asb, int length) {
        padToLength(asb, length, ' ');
    }

    static void padToLength(AttributedStringBuilder asb, int length, char c) {
        repeat(asb, length - asb.length(), c);
    }
}


text:
<?php
require '../config/db.php';
require '../src/model/Invitation.php';
$obj = new Invitation();
try{
    header('Content-Type: application/csv');
    header('Content-Disposition: attachment; filename=dump.csv');
    header('Pragma: no-cache');
    foreach($obj -> dump() as $row){
        echo join($row,',')."\n";
    }
}catch(Exception $e){
    echo $e -> getMessage();
}


text:
identifier: MIR:00000061
name: PRINTS
description: PRINTS is a compendium of protein fingerprints. A fingerprint is a group of conserved motifs used to characterise a protein family; its diagnostic power is refined by iterative scanning of a SWISS-PROT/TrEMBL composite. Usually the motifs do not overlap, but are separated along a sequence, though they may be contiguous in 3D-space. Fingerprints can encode protein folds and functionalities more flexibly and powerfully than can single motifs, full diagnostic potency deriving from the mutual context provided by motif neighbours.
prefix: prints
pattern: ^PR\d{5}$
prefixed: 0
local_id: PR00001
synonyms:
 - SPRINT
resources:
 - identifier: MIR:00100089
   accessurl: http://www.bioinf.manchester.ac.uk/cgi-bin/dbbrowser/sprint/searchprintss.cgi?prints_accn=${lid}&display_opts=Prints&category=None&queryform=false&regexpr=off
   keyword: Coagulation factor GLA domain signature
   description: PRINTS through SPRINT
   homepage: http://www.bioinf.manchester.ac.uk/dbbrowser/sprint/
   institution: University of Manchester
   location: United Kingdom
   official: false
---


text:
package bp.action;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.KeyStroke;

import bp.app.AppCore;

public class NewDiagramAction extends AbstractAction{

    /**
     *
     */
    private static final long serialVersionUID = 8237800191665124730L;

    public NewDiagramAction(String name, String description, KeyStroke key) {
        putValue(Action.NAME, name);
        putValue(Action.SHORT_DESCRIPTION, description);
        putValue(Action.ACCELERATOR_KEY, key);

        // temporarily disabled
        setEnabled(false);
    }

    @Override
    public void actionPerformed(ActionEvent arg0) {
        AppCore.getInstance().createBPPanel();

    }

}


text:
using UnityEngine;
using System.Collections;

public class ViveGripExample_Tar : MonoBehaviour {
	private ViveGrip_GripPoint attachedGripPoint;
  private const float SPEED_THRESHOLD = 6f;
  private bool attached = false;

  void Start() {}

  void Update() {
    if (attachedGripPoint == null) { return; }
    float speed = GetComponent<Rigidbody>().velocity.magnitude;
    attached = attached || speed < SPEED_THRESHOLD;
    if (attached && speed > SPEED_THRESHOLD) {
      attachedGripPoint.enabled = true;
      attachedGripPoint.ToggleGrab();
      attachedGripPoint = null;
    }
  }

	void ViveGripTouchStart(ViveGrip_GripPoint gripPoint) {
    if (gripPoint.HoldingSomething()) { return; }
    gripPoint.ToggleGrab();
    attachedGripPoint = gripPoint;
    gripPoint.enabled = false;
    attached = false;
  }
}


text:
namespace content {

bool RenderWidgetHostDelegate::PreHandleKeyboardEvent(
    const NativeWebKeyboardEvent& event,
    bool* is_keyboard_shortcut) {
  return false;
}

bool RenderWidgetHostDelegate::HandleWheelEvent(
    const blink::WebMouseWheelEvent& event) {
  return false;
}

bool RenderWidgetHostDelegate::PreHandleGestureEvent(
    const blink::WebGestureEvent& event) {
  return false;
}

BrowserAccessibilityManager*
    RenderWidgetHostDelegate::GetRootBrowserAccessibilityManager() {
  return NULL;
}

BrowserAccessibilityManager*
    RenderWidgetHostDelegate::GetOrCreateRootBrowserAccessibilityManager() {
  return NULL;
}

#if defined(OS_WIN)
gfx::NativeViewAccessible
    RenderWidgetHostDelegate::GetParentNativeViewAccessible() {
  return NULL;
}
#endif

// If a delegate does not override this, the RenderWidgetHostView will
// assume it is the sole platform event consumer.
RenderWidgetHostInputEventRouter*
RenderWidgetHostDelegate::GetInputEventRouter() {
  return nullptr;
}

}  // namespace content


text:
.widget-notification {
    position: relative;
}

.widget-notification .-summary {
    cursor: pointer;
    font-size: 10px;
    padding: 0;
    margin: 0;
}

.widget-notification .-summary .-item {
    padding: 0;
    margin: 0;
}

.widget-notification .-container {
    background-color: white;
    position: absolute;
    top: 0;
    left: 0;
}

.widget-notification .-notification-set {
    padding: 3px;
    position: relative;
    background-color: silver;
}

.widget-notification .-notification-set .-triangle {
    position: absolute;
    top: -3px;
    left: 196px;
    font-size: 25px;
    color: silver;
}

.widget-notification .-notification-set .-pointer {
    position: absolute;
    top: 0px;
    left: 200px;
    height: 25px;
    width: 25px;
}

.widget-notification .-notification-set .-notification-container {
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: hidden;
    text-align: left;
}

.widget-notification .-notification {
    padding: 4px;
    color: black;
    margin: 2px;
    position: relative;
}

.widget-notification .-notification .-message {
    padding-right: 1em;
}

.widget-notification a.-button {
    padding: 0 4px;
    background-color: rgba(255, 255, 255, 0.5);
    color: black;
    user-select: none;
}

.widget-notification .-notification a.-close-button .fa::before {
    color: rgb(143, 46, 46);
}

.widget-notification .-notification a.-close-button {
    position: absolute;
    right: 2px;
    top: 2px;
}

.widget-notification a.-button {
    text-decoration: none;
    color: black;
}

.widget-notification a.-button:hover,
.widget-notification a.-button:hover {
    color: black;
}

.widget-notification a.-button:hover,
.widget-notification a.-button:active {
    background-color: rgba(255, 255, 255, 1);
    color: black;
}

/* new */

.widget-notification .-notification.-success {
    /* bootstrap is dff0d8 */
    background-color: #dff0d8;
}

.widget-notification .-notification.-success:hover {
    /* bootstrap is #c1e2b3 */
    background-color: #c1e2b3;
}

.widget-notification .-item.-success.-hasitems {
    background-color: #c1e2b3;
}

.widget-notification .-notification.-info {
    background-color: #d9edf7;
}

.widget-notification .-notification.-info:hover {
    background-color: #afd9ee;
}

.widget-notification .-item.-info.-hasitems {
    background-color: #afd9ee;
}

.widget-notification .-notification.-warning {
    background-color: #fcf8e3;
}

.widget-notification .-notification.-warning:hover {
    background-color: #f7ecb5;
}

.widget-notification .-item.-warning.-hasitems {
    background-color: #f7ecb5;
}

.widget-notification .-notification.-error {
    background-color: #f2dede;
}

.widget-notification .-notification.-error:hover {
    background-color: #e4b9b9;
}

.widget-notification .-item.-error.-hasitems {
    background-color: #e4b9b9;
}


text:
package com.flipkart.flux.integration;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.flipkart.flux.client.model.Event;

public class StringEvent implements Event {
    @JsonProperty
    private String aString;

    StringEvent() {
    }

    public StringEvent(String aString) {
        this.aString = aString;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        StringEvent that = (StringEvent) o;

        return !(aString != null ? !aString.equals(that.aString) : that.aString != null);

    }

    @Override
    public int hashCode() {
        return aString != null ? aString.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "StringEvent{" +
            "aString='" + aString + '\'' +
            '}';
    }
}


text:
package org.docksidestage.mysql.dbflute.cbean.bs;

import org.dbflute.cbean.AbstractConditionBean;
import org.dbflute.cbean.ConditionBean;
import org.dbflute.cbean.ConditionQuery;
import org.dbflute.cbean.chelper.*;
import org.dbflute.cbean.coption.*;
import org.dbflute.cbean.dream.*;
import org.dbflute.cbean.sqlclause.SqlClause;
import org.dbflute.cbean.sqlclause.SqlClauseCreator;
import org.dbflute.cbean.scoping.*;
import org.dbflute.dbmeta.DBMetaProvider;
import org.dbflute.twowaysql.factory.SqlAnalyzerFactory;
import org.dbflute.twowaysql.style.BoundDateDisplayTimeZoneProvider;
import org.docksidestage.mysql.dbflute.allcommon.DBFluteConfig;
import org.docksidestage.mysql.dbflute.allcommon.DBMetaInstanceHandler;
import org.docksidestage.mysql.dbflute.allcommon.ImplementedInvokerAssistant;
import org.docksidestage.mysql.dbflute.allcommon.ImplementedSqlClauseCreator;
import org.docksidestage.mysql.dbflute.cbean.*;
import org.docksidestage.mysql.dbflute.cbean.cq.*;
import org.docksidestage.mysql.dbflute.cbean.nss.*;

/**
 * The base condition-bean of white_all_in_one_cls_normal_col_ref.
 * @author DBFlute(AutoGenerator)
 */
public class BsWhiteAllInOneClsNormalColRefCB extends AbstractConditionBean {

    // ===================================================================================
    //                                                                           Attribute
    //                                                                           =========
    protected WhiteAllInOneClsNormalColRefCQ _conditionQuery;

    // ===================================================================================
    //                                                                         Constructor
    //                                                                         ===========
    public BsWhiteAllInOneClsNormalColRefCB() {
        if (DBFluteConfig.getInstance().isPagingCountLater()) {
            enablePagingCountLater();
        }
        if (DBFluteConfig.getInstance().isPagingCountLeastJoin()) {
            enablePagingCountLeastJoin();
        }
        if (DBFluteConfig.getInstance().isNonSpecifiedColumnAccessAllowed()) {
            enableNonSpecifiedColumnAccess();
        }
        if (DBFluteConfig.getInstance().isSpecifyColumnRequired()) {
            enableSpecifyColumnRequired();
        }
        xsetSpecifyColumnRequiredExceptDeterminer(DBFluteConfig.getInstance().getSpecifyColumnRequiredExceptDeterminer());
        if (DBFluteConfig.getInstance().isSpecifyColumnRequiredWarningOnly()) {
            xenableSpecifyColumnRequiredWarningOnly();
        }
        if (DBFluteConfig.getInstance().isQueryUpdateCountPreCheck()) {
            enableQueryUpdateCountPreCheck();
        }
    }

    // ===================================================================================
    //                                                                           SqlClause
    //                                                                           =========
    @Override
    protected SqlClause createSqlClause() {
        SqlClauseCreator creator = DBFluteConfig.getInstance().getSqlClauseCreator();
        if (creator != null) {
            return creator.createSqlClause(this);
        }
        return new ImplementedSqlClauseCreator().createSqlClause(this); // as default
    }

    // ===================================================================================
    //                                                                             DB Meta
    //                                                                             =======
    @Override
    protected DBMetaProvider getDBMetaProvider() {
        return DBMetaInstanceHandler.getProvider(); // as default
    }

    public String asTableDbName() {
        return "white_all_in_one_cls_normal_col_ref";
    }

    // ===================================================================================
    //                                                                 PrimaryKey Handling
    //                                                                 ===================
    /**
     * Accept the query condition of primary key as equal.
     * @param fooCode : PK, NotNull, CHAR(3), FK to WHITE_ALL_IN_ONE_CLS_ELEMENT. (NotNull)
     * @param barCode : PK, NotNull, CHAR(3), FK to WHITE_ALL_IN_ONE_CLS_ELEMENT. (NotNull)
     * @param quxCode : PK, NotNull, CHAR(3). (NotNull)
     * @return this. (NotNull)
     */
    public WhiteAllInOneClsNormalColRefCB acceptPK(String fooCode, String barCode, String quxCode) {
        assertObjectNotNull("fooCode", fooCode);assertObjectNotNull("barCode", barCode);assertObjectNotNull("quxCode", quxCode);
        BsWhiteAllInOneClsNormalColRefCB cb = this;
        cb.query().setFooCode_Equal(fooCode);cb.query().setBarCode_Equal(barCode);cb.query().setQuxCode_Equal(quxCode);
        return (WhiteAllInOneClsNormalColRefCB)this;
    }

    public ConditionBean addOrderBy_PK_Asc() {
        query().addOrderBy_FooCode_Asc();
        query().addOrderBy_BarCode_Asc();
        query().addOrderBy_QuxCode_Asc();
        return this;
    }

    public ConditionBean addOrderBy_PK_Desc() {
        query().addOrderBy_FooCode_Desc();
        query().addOrderBy_BarCode_Desc();
        query().addOrderBy_QuxCode_Desc();
        return this;
    }

    // ===================================================================================
    //                                                                               Query
    //                                                                               =====
    /**
     * Prepare for various queries.

     * Examples of main functions are following:
     *

     * // Basic Queries
     * cb.query().setMemberId_Equal(value);        // =
     * cb.query().setMemberId_NotEqual(value);     // !=
     * cb.query().setMemberId_GreaterThan(value);  // >
     * cb.query().setMemberId_LessThan(value);     // <
     * cb.query().setMemberId_GreaterEqual(value); // >=
     * cb.query().setMemberId_LessEqual(value);    // <=
     * cb.query().setMemberName_InScope(valueList);    // in ('a', 'b')
     * cb.query().setMemberName_NotInScope(valueList); // not in ('a', 'b')
     * // LikeSearch with various options: (versatile)
     * // {like ... [options]}
     * cb.query().setMemberName_LikeSearch(value, option);
     * cb.query().setMemberName_NotLikeSearch(value, option); // not like ...
     * // FromTo with various options: (versatile)
     * // {(default) fromDatetime <= BIRTHDATE <= toDatetime}
     * cb.query().setBirthdate_FromTo(fromDatetime, toDatetime, option);
     * // DateFromTo: (Date means yyyy/MM/dd)
     * // {fromDate <= BIRTHDATE < toDate + 1 day}
     * cb.query().setBirthdate_IsNull();    // is null
     * cb.query().setBirthdate_IsNotNull(); // is not null
     *
     * // ExistsReferrer: (correlated sub-query)
     * // {where exists (select PURCHASE_ID from PURCHASE where ...)}
     * cb.query().existsPurchase(purchaseCB -> {
     *     purchaseCB.query().set... // referrer sub-query condition
     * });
     * cb.query().notExistsPurchase...
     *
     * // (Query)DerivedReferrer: (correlated sub-query)
     * cb.query().derivedPurchaseList().max(purchaseCB -> {
     *     purchaseCB.specify().columnPurchasePrice(); // derived column for function
     *     purchaseCB.query().set... // referrer sub-query condition
     * }).greaterEqual(value);
     *
     * // ScalarCondition: (self-table sub-query)
     * cb.query().scalar_Equal().max(scalarCB -> {
     *     scalarCB.specify().columnBirthdate(); // derived column for function
     *     scalarCB.query().set... // scalar sub-query condition
     * });
     *
     * // OrderBy
     * cb.query().addOrderBy_MemberName_Asc();
     * cb.query().addOrderBy_MemberName_Desc().withManualOrder(option);
     * cb.query().addOrderBy_MemberName_Desc().withNullsFirst();
     * cb.query().addOrderBy_MemberName_Desc().withNullsLast();
     * cb.query().addSpecifiedDerivedOrderBy_Desc(aliasName);
     *
     * // Query(Relation)
     * cb.query().queryMemberStatus()...;
     * cb.query().queryMemberAddressAsValid(targetDate)...;
     *

     * @return The instance of condition-query for base-point table to set up query. (NotNull)
     */
    public WhiteAllInOneClsNormalColRefCQ query() {
        assertQueryPurpose(); // assert only when user-public query
        return doGetConditionQuery();
    }

    public WhiteAllInOneClsNormalColRefCQ xdfgetConditionQuery() { // public for parameter comment and internal
        return doGetConditionQuery();
    }

    protected WhiteAllInOneClsNormalColRefCQ doGetConditionQuery() {
        if (_conditionQuery == null) {
            _conditionQuery = createLocalCQ();
        }
        return _conditionQuery;
    }

    protected WhiteAllInOneClsNormalColRefCQ createLocalCQ() {
        return xcreateCQ(null, getSqlClause(), getSqlClause().getBasePointAliasName(), 0);
    }

    protected WhiteAllInOneClsNormalColRefCQ xcreateCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) {
        WhiteAllInOneClsNormalColRefCQ cq = xnewCQ(childQuery, sqlClause, aliasName, nestLevel);
        cq.xsetBaseCB(this);
        return cq;
    }

    protected WhiteAllInOneClsNormalColRefCQ xnewCQ(ConditionQuery childQuery, SqlClause sqlClause, String aliasName, int nestLevel) {
        return new WhiteAllInOneClsNormalColRefCQ(childQuery, sqlClause, aliasName, nestLevel);
    }

    /**
     * {@inheritDoc}
     */
    public ConditionQuery localCQ() {
        return doGetConditionQuery();
    }

    // ===================================================================================
    //                                                                               Union
    //                                                                               =====
    /**
     * Set up 'union' for base-point table.

     * You don't need to call SetupSelect in union-query,
     * because it inherits calls before. (Don't call SetupSelect after here)
     *

     * cb.query().union(unionCB -> {
     *     unionCB.query().set...
     * });
     *

     * @param unionCBLambda The callback for query of 'union'. (NotNull)
     */
    public void union(UnionQuery<WhiteAllInOneClsNormalColRefCB> unionCBLambda) {
        final WhiteAllInOneClsNormalColRefCB cb = new WhiteAllInOneClsNormalColRefCB(); cb.xsetupForUnion(this); xsyncUQ(cb);
        try { lock(); unionCBLambda.query(cb); } finally { unlock(); } xsaveUCB(cb);
        final WhiteAllInOneClsNormalColRefCQ cq = cb.query(); query().xsetUnionQuery(cq);
    }

    /**
     * Set up 'union all' for base-point table.

     * You don't need to call SetupSelect in union-query,
     * because it inherits calls before. (Don't call SetupSelect after here)
     *

     * cb.query().unionAll(unionCB -> {
     *     unionCB.query().set...
     * });
     *

     * @param unionCBLambda The callback for query of 'union all'. (NotNull)
     */
    public void unionAll(UnionQuery<WhiteAllInOneClsNormalColRefCB> unionCBLambda) {
        final WhiteAllInOneClsNormalColRefCB cb = new WhiteAllInOneClsNormalColRefCB(); cb.xsetupForUnion(this); xsyncUQ(cb);
        try { lock(); unionCBLambda.query(cb); } finally { unlock(); } xsaveUCB(cb);
        final WhiteAllInOneClsNormalColRefCQ cq = cb.query(); query().xsetUnionAllQuery(cq);
    }

    // ===================================================================================
    //                                                                         SetupSelect
    //                                                                         ===========
    protected WhiteAllInOneClsElementNss _nssWhiteAllInOneClsElementAsFoo;
    public WhiteAllInOneClsElementNss xdfgetNssWhiteAllInOneClsElementAsFoo() {
        if (_nssWhiteAllInOneClsElementAsFoo == null) { _nssWhiteAllInOneClsElementAsFoo = new WhiteAllInOneClsElementNss(null); }
        return _nssWhiteAllInOneClsElementAsFoo;
    }
    /**
     * Set up relation columns to select clause.

     * WHITE_ALL_IN_ONE_CLS_ELEMENT by my FOO_CODE, named 'whiteAllInOneClsElementAsFoo'.
     *

     * whiteAllInOneClsNormalColRefBhv.selectEntity(cb -> {
     *     cb.setupSelect_WhiteAllInOneClsElementAsFoo(); // ...().with[nested-relation]()
     *     cb.query().set...
     * }).alwaysPresent(whiteAllInOneClsNormalColRef -> {
     *     ... = whiteAllInOneClsNormalColRef.getWhiteAllInOneClsElementAsFoo(); // you can get by using SetupSelect
     * });
     *

     * @return The set-upper of nested relation. {setupSelect...().with[nested-relation]} (NotNull)
     */
    public WhiteAllInOneClsElementNss setupSelect_WhiteAllInOneClsElementAsFoo() {
        assertSetupSelectPurpose("whiteAllInOneClsElementAsFoo");
        doSetupSelect(() -> query().queryWhiteAllInOneClsElementAsFoo());
        if (_nssWhiteAllInOneClsElementAsFoo == null || !_nssWhiteAllInOneClsElementAsFoo.hasConditionQuery())
        { _nssWhiteAllInOneClsElementAsFoo = new WhiteAllInOneClsElementNss(query().queryWhiteAllInOneClsElementAsFoo()); }
        return _nssWhiteAllInOneClsElementAsFoo;
    }

    protected WhiteAllInOneClsElementNss _nssWhiteAllInOneClsElementAsBar;
    public WhiteAllInOneClsElementNss xdfgetNssWhiteAllInOneClsElementAsBar() {
        if (_nssWhiteAllInOneClsElementAsBar == null) { _nssWhiteAllInOneClsElementAsBar = new WhiteAllInOneClsElementNss(null); }
        return _nssWhiteAllInOneClsElementAsBar;
    }
    /**
     * Set up relation columns to select clause.

     * WHITE_ALL_IN_ONE_CLS_ELEMENT by my BAR_CODE, named 'whiteAllInOneClsElementAsBar'.
     *

     * whiteAllInOneClsNormalColRefBhv.selectEntity(cb -> {
     *     cb.setupSelect_WhiteAllInOneClsElementAsBar(); // ...().with[nested-relation]()
     *     cb.query().set...
     * }).alwaysPresent(whiteAllInOneClsNormalColRef -> {
     *     ... = whiteAllInOneClsNormalColRef.getWhiteAllInOneClsElementAsBar(); // you can get by using SetupSelect
     * });
     *

     * @return The set-upper of nested relation. {setupSelect...().with[nested-relation]} (NotNull)
     */
    public WhiteAllInOneClsElementNss setupSelect_WhiteAllInOneClsElementAsBar() {
        assertSetupSelectPurpose("whiteAllInOneClsElementAsBar");
        doSetupSelect(() -> query().queryWhiteAllInOneClsElementAsBar());
        if (_nssWhiteAllInOneClsElementAsBar == null || !_nssWhiteAllInOneClsElementAsBar.hasConditionQuery())
        { _nssWhiteAllInOneClsElementAsBar = new WhiteAllInOneClsElementNss(query().queryWhiteAllInOneClsElementAsBar()); }
        return _nssWhiteAllInOneClsElementAsBar;
    }

    // [DBFlute-0.7.4]
    // ===================================================================================
    //                                                                             Specify
    //                                                                             =======
    protected HpSpecification _specification;

    /**
     * Prepare for SpecifyColumn, (Specify)DerivedReferrer.

     * This method should be called after SetupSelect.
     *

     * memberBhv.selectEntity(cb -> {
     *     cb.setupSelect_MemberStatus(); // should be called before specify()
     *     cb.specify().columnMemberName();
     *     cb.specify().specifyMemberStatus().columnMemberStatusName();
     *     cb.specify().derivedPurchaseList().max(purchaseCB -> {
     *         purchaseCB.specify().columnPurchaseDatetime();
     *         purchaseCB.query().set...
     *     }, aliasName);
     * }).alwaysPresent(member -> {
     *     ...
     * });
     *

     * @return The instance of specification. (NotNull)
     */
    public HpSpecification specify() {
        assertSpecifyPurpose();
        if (_specification == null) { _specification = new HpSpecification(this
            , xcreateSpQyCall(() -> true, () -> xdfgetConditionQuery())
            , _purpose, getDBMetaProvider(), xcSDRFnFc()); }
        return _specification;
    }

    public HpColumnSpHandler localSp() {
        return specify();
    }

    public boolean hasSpecifiedLocalColumn() {
        return _specification != null && _specification.hasSpecifiedColumn();
    }

    public static class HpSpecification extends HpAbstractSpecification<WhiteAllInOneClsNormalColRefCQ> {
        protected WhiteAllInOneClsElementCB.HpSpecification _whiteAllInOneClsElementAsFoo;
        protected WhiteAllInOneClsElementCB.HpSpecification _whiteAllInOneClsElementAsBar;
        public HpSpecification(ConditionBean baseCB, HpSpQyCall<WhiteAllInOneClsNormalColRefCQ> qyCall
                             , HpCBPurpose purpose, DBMetaProvider dbmetaProvider
                             , HpSDRFunctionFactory sdrFuncFactory)
        { super(baseCB, qyCall, purpose, dbmetaProvider, sdrFuncFactory); }
        /**
         * CLS_REF_ID: {NotNull, INT(10)}
         * @return The information object of specified column. (NotNull)
         */
        public SpecifiedColumn columnClsRefId() { return doColumn("CLS_REF_ID"); }
        /**
         * FOO_CODE: {PK, NotNull, CHAR(3), FK to WHITE_ALL_IN_ONE_CLS_ELEMENT}
         * @return The information object of specified column. (NotNull)
         */
        public SpecifiedColumn columnFooCode() { return doColumn("FOO_CODE"); }
        /**
         * BAR_CODE: {PK, NotNull, CHAR(3), FK to WHITE_ALL_IN_ONE_CLS_ELEMENT}
         * @return The information object of specified column. (NotNull)
         */
        public SpecifiedColumn columnBarCode() { return doColumn("BAR_CODE"); }
        /**
         * QUX_CODE: {PK, NotNull, CHAR(3)}
         * @return The information object of specified column. (NotNull)
         */
        public SpecifiedColumn columnQuxCode() { return doColumn("QUX_CODE"); }
        public void everyColumn() { doEveryColumn(); }
        public void exceptRecordMetaColumn() { doExceptRecordMetaColumn(); }
        @Override
        protected void doSpecifyRequiredColumn() {
            columnFooCode(); // PK
            columnBarCode(); // PK
            columnQuxCode(); // PK
        }
        @Override
        protected String getTableDbName() { return "white_all_in_one_cls_normal_col_ref"; }
        /**
         * Prepare to specify functions about relation table.

         * WHITE_ALL_IN_ONE_CLS_ELEMENT by my FOO_CODE, named 'whiteAllInOneClsElementAsFoo'.
         * @return The instance for specification for relation table to specify. (NotNull)
         */
        public WhiteAllInOneClsElementCB.HpSpecification specifyWhiteAllInOneClsElementAsFoo() {
            assertRelation("whiteAllInOneClsElementAsFoo");
            if (_whiteAllInOneClsElementAsFoo == null) {
                _whiteAllInOneClsElementAsFoo = new WhiteAllInOneClsElementCB.HpSpecification(_baseCB
                    , xcreateSpQyCall(() -> _qyCall.has() && _qyCall.qy().hasConditionQueryWhiteAllInOneClsElementAsFoo()
                                    , () -> _qyCall.qy().queryWhiteAllInOneClsElementAsFoo())
                    , _purpose, _dbmetaProvider, xgetSDRFnFc());
                if (xhasSyncQyCall()) { // inherits it
                    _whiteAllInOneClsElementAsFoo.xsetSyncQyCall(xcreateSpQyCall(
                        () -> xsyncQyCall().has() && xsyncQyCall().qy().hasConditionQueryWhiteAllInOneClsElementAsFoo()
                      , () -> xsyncQyCall().qy().queryWhiteAllInOneClsElementAsFoo()));
                }
            }
            return _whiteAllInOneClsElementAsFoo;
        }
        /**
         * Prepare to specify functions about relation table.

         * WHITE_ALL_IN_ONE_CLS_ELEMENT by my BAR_CODE, named 'whiteAllInOneClsElementAsBar'.
         * @return The instance for specification for relation table to specify. (NotNull)
         */
        public WhiteAllInOneClsElementCB.HpSpecification specifyWhiteAllInOneClsElementAsBar() {
            assertRelation("whiteAllInOneClsElementAsBar");
            if (_whiteAllInOneClsElementAsBar == null) {
                _whiteAllInOneClsElementAsBar = new WhiteAllInOneClsElementCB.HpSpecification(_baseCB
                    , xcreateSpQyCall(() -> _qyCall.has() && _qyCall.qy().hasConditionQueryWhiteAllInOneClsElementAsBar()
                                    , () -> _qyCall.qy().queryWhiteAllInOneClsElementAsBar())
                    , _purpose, _dbmetaProvider, xgetSDRFnFc());
                if (xhasSyncQyCall()) { // inherits it
                    _whiteAllInOneClsElementAsBar.xsetSyncQyCall(xcreateSpQyCall(
                        () -> xsyncQyCall().has() && xsyncQyCall().qy().hasConditionQueryWhiteAllInOneClsElementAsBar()
                      , () -> xsyncQyCall().qy().queryWhiteAllInOneClsElementAsBar()));
                }
            }
            return _whiteAllInOneClsElementAsBar;
        }
    }

    @Override
    protected <LOCAL_CQ extends ConditionQuery, REFERRER_CB extends ConditionBean> HpSDRFunction<REFERRER_CB, LOCAL_CQ> newSDFFunction(
            ConditionBean baseCB, LOCAL_CQ localCQ
            , HpSDRSetupper<REFERRER_CB, LOCAL_CQ> querySetupper
            , DBMetaProvider dbmetaProvider, DerivedReferrerOptionFactory optionFactory) {
        return new org.dbflute.cbean.chelper.dbms.HpSDRFunctionMySql<REFERRER_CB, LOCAL_CQ>(baseCB, localCQ, querySetupper, dbmetaProvider, optionFactory);
    }

    // ===================================================================================
    //                                                                        Dream Cruise
    //                                                                        ============
    /**
     * Welcome to the Dream Cruise for condition-bean deep world.

     * This is very specialty so you can get the frontier spirit. Bon voyage!
     * @return The condition-bean for dream cruise, which is linked to main condition-bean.
     */
    public WhiteAllInOneClsNormalColRefCB dreamCruiseCB() {
        WhiteAllInOneClsNormalColRefCB cb = new WhiteAllInOneClsNormalColRefCB();
        cb.xsetupForDreamCruise((WhiteAllInOneClsNormalColRefCB) this);
        return cb;
    }

    protected ConditionBean xdoCreateDreamCruiseCB() {
        return dreamCruiseCB();
    }

    // [DBFlute-0.9.5.3]
    // ===================================================================================
    //                                                                        Column Query
    //                                                                        ============
    /**
     * Set up column-query. {column1 = column2}
     *

     * // where FOO < BAR
     * cb.columnQuery(colCB -> {
     *     colCB.specify().columnFoo(); // left column
     * }).lessThan(colCB -> {
     *     colCB.specify().columnBar(); // right column
     * }); // you can calculate for right column like '}).plus(3);'
     *

     * @param colCBLambda The callback for specify-query of left column. (NotNull)
     * @return The object for setting up operand and right column. (NotNull)
     */
    public HpColQyOperand.HpExtendedColQyOperandMySql<WhiteAllInOneClsNormalColRefCB> columnQuery(final SpecifyQuery<WhiteAllInOneClsNormalColRefCB> colCBLambda) {
        return xcreateColQyOperandMySql((rightSp, operand) -> {
            return xcolqy(xcreateColumnQueryCB(), xcreateColumnQueryCB(), colCBLambda, rightSp, operand);
        });
    }

    protected WhiteAllInOneClsNormalColRefCB xcreateColumnQueryCB() {
        WhiteAllInOneClsNormalColRefCB cb = new WhiteAllInOneClsNormalColRefCB();
        cb.xsetupForColumnQuery((WhiteAllInOneClsNormalColRefCB)this);
        return cb;
    }

    // [DBFlute-0.9.6.3]
    // ===================================================================================
    //                                                                       OrScope Query
    //                                                                       =============
    /**
     * Set up the query for or-scope.

     * (Same-column-and-same-condition-key conditions are allowed in or-scope)
     *

     * // where (FOO = '...' or BAR = '...')
     * cb.orScopeQuery(orCB -> {
     *     orCB.query().setFoo...
     *     orCB.query().setBar...
     * });
     *

     * @param orCBLambda The callback for query of or-condition. (NotNull)
     */
    public void orScopeQuery(OrQuery<WhiteAllInOneClsNormalColRefCB> orCBLambda) {
        xorSQ((WhiteAllInOneClsNormalColRefCB)this, orCBLambda);
    }

    /**
     * Set up the and-part of or-scope.

     * (However nested or-scope query and as-or-split of like-search in and-part are unsupported)
     *

     * // where (FOO = '...' or (BAR = '...' and QUX = '...'))
     * cb.orScopeQuery(orCB -> {
     *     orCB.query().setFoo...
     *     orCB.orScopeQueryAndPart(andCB -> {
     *         andCB.query().setBar...
     *         andCB.query().setQux...
     *     });
     * });
     *

     * @param andCBLambda The callback for query of and-condition. (NotNull)
     */
    public void orScopeQueryAndPart(AndQuery<WhiteAllInOneClsNormalColRefCB> andCBLambda) {
        xorSQAP((WhiteAllInOneClsNormalColRefCB)this, andCBLambda);
    }

    // ===================================================================================
    //                                                                          DisplaySQL
    //                                                                          ==========
    @Override
    protected SqlAnalyzerFactory getSqlAnalyzerFactory()
    { return new ImplementedInvokerAssistant().assistSqlAnalyzerFactory(); }
    @Override
    protected String getConfiguredLogDatePattern() { return DBFluteConfig.getInstance().getLogDatePattern(); }
    @Override
    protected String getConfiguredLogTimestampPattern() { return DBFluteConfig.getInstance().getLogTimestampPattern(); }
    @Override
    protected String getConfiguredLogTimePattern() { return DBFluteConfig.getInstance().getLogTimePattern(); }
    @Override
    protected BoundDateDisplayTimeZoneProvider getConfiguredLogTimeZoneProvider() { return DBFluteConfig.getInstance().getLogTimeZoneProvider(); }

    // ===================================================================================
    //                                                                       Meta Handling
    //                                                                       =============
    public boolean hasUnionQueryOrUnionAllQuery() {
        return query().hasUnionQueryOrUnionAllQuery();
    }

    // ===================================================================================
    //                                                                        Purpose Type
    //                                                                        ============
    @Override
    protected void xprepareSyncQyCall(ConditionBean mainCB) {
        final WhiteAllInOneClsNormalColRefCB cb;
        if (mainCB != null) {
            cb = (WhiteAllInOneClsNormalColRefCB)mainCB;
        } else {
            cb = new WhiteAllInOneClsNormalColRefCB();
        }
        specify().xsetSyncQyCall(xcreateSpQyCall(() -> true, () -> cb.query()));
    }

    // ===================================================================================
    //                                                                            Internal
    //                                                                            ========
    // very internal (for suppressing warn about 'Not Use Import')
    protected String xgetConditionBeanClassNameInternally() { return WhiteAllInOneClsNormalColRefCB.class.getName(); }
    protected String xgetConditionQueryClassNameInternally() { return WhiteAllInOneClsNormalColRefCQ.class.getName(); }
    protected String xgetSubQueryClassNameInternally() { return SubQuery.class.getName(); }
    protected String xgetConditionOptionClassNameInternally() { return ConditionOption.class.getName(); }
}


text:
var fs          = require('fs');
var path        = require('path');
var through     = require('through2');
var gutil       = require('gulp-util');
var PluginError = gutil.PluginError;

var fs      = require("fs");
var request = require("superagent");

var gulp    = require("gulp");

function gulpVisualforceUpload(opts){

  return through.obj(function(file, enc, callback){

    if (file.isNull() || file.isDirectory()) {
        this.push(file);
        return callback();
    }

    if (['.html'].indexOf(path.extname(file.path)) === -1) {
        throw new PluginError({
            plugin: 'R2-VFUPLOAD',
            message: 'Supported formats include HTML and PAGE only.'
        });
        return callback();
    }

    // No support for streams
    if (file.isStream()) {
        throw new PluginError({
            plugin: 'R2-VFUPLOAD',
            message: 'Streams are not supported.'
        });
        return callback();
    }

    if (file.isBuffer()) {
      var _this= this;

      var name = opts.name
      if(opts.development) name += "_dev"

      var url  = opts.session.instance_url + "/services/data/v30.0/sobjects/ApexPage/Name/" + name;
      var page = file.contents.toString();

      body = {
        Markup : page,
        ControllerType : 3,
        MasterLabel: name,
        ApiVersion: opts.apiVersion || "30.0"
      }

      var req = request.patch( url )
      .type( "application/json" )
      .set( 'Authorization', 'Bearer ' + opts.session.access_token )
      .send( body )
      .end( function( err, res ){
        gulpVisualforceUpload.lastResult = false;
        if( err ){
          throw new PluginError({
            plugin: 'R2-VFUPLOAD',
            message: err.toString()
          });
          return callback();
        }

        if( res.body[0] && res.body[0].errorCode ){
          throw new PluginError({
            plugin: 'R2-VFUPLOAD',
            message: "Salesforce.com rejected the upsert of a Visualforce Page with the HTML we send, it's posibly due to unvalid HTML. Please review your file. ERROR: " + res.body[0].message
          });
          return callback();

        }
        if( res.body.success == false || res.body.errorCode ){
          throw new PluginError({
            plugin: 'R2-VFUPLOAD',
            message: "ERROR: " + JSON.stringify( res.body )
          });
          return callback();
        }

        gulpVisualforceUpload.lastResult = true;
        _this.push(file);
        return callback();
      })

    }
  });
}

module.exports = gulpVisualforceUpload;
gulpVisualforceUpload.lastResult = null;


text:
Editing {{.Title}}

<form action="/save/{{.Title}}" method="POST">

<textarea name="body" rows="20" cols="80">{{printf "%s" .Body}}</textarea>

<textarea name="client" rows="1" cols="80">client</textarea>

<textarea name="clientver" rows="1" cols="80">clientver</textarea>

<textarea name="protover" rows="1" cols="80">protover</textarea>

<textarea name="url" rows="1" cols="80">url</textarea>

<textarea name="port" rows="1" cols="80">port</textarea>

<textarea name="programdatapath" rows="1" cols="80">Program Path</textarea>

<textarea name="programconfigpath" rows="1" cols="80">Program Config</textarea>

 First name: <input type="text" name="fname">

<input type="submit" value="Save">

</form>


text:
<?php

namespace Nova\Support\Facades;

/**
 * @see \Nova\Database\Schema\Builder
 */
class Schema extends Facade
{
    /**
     * Get a schema builder instance for a connection.
     *
     * @param  string  $name
     * @return \Nova\Database\Schema\Builder
     */
    public static function connection($name)
    {
        return static::$app['db']->connection($name)->getSchemaBuilder();
    }

    /**
     * Get the registered name of the component.
     *
     * @return string
     */
    protected static function getFacadeAccessor()
    {
        return static::$app['db']->connection()->getSchemaBuilder();
    }

}


text:
<?php

require_once(dirname( __FILE__ ).'/classes/browser.php');

$plugin = new WFFileBrowserPlugin();//::getInstance();
$plugin->execute();


text:
layout: post
title:  "Círculo de Teletransporte"
date:   2018-01-01
source: Módulo Básico 159, Módulo Básico Edição Revisada 169.
tags: [nenhum, bardo]
---

**arcana 9 (invocação)**

**Alcance**: toque

**Teste de Resistência**: nenhum.

**Duração**: 1 hora

**Efeito**: círculo com 1,5m de raio

**Tempo de Execução**: 10 minutos

Você cria um círculo no chão, que transporta qualquer criatura que pisar nele (como teletransporte maior). O destino é escolhido quando a magia é lançada.
O círculo é tênue e praticamente invisível. Você pode marcá-lo de alguma forma (por exemplo, lançando-o sobre uma plataforma elevada). Se não fizer isso, ele pode ser pisado por acidente. Junte com um destino hostil e você terá uma armadilha bastante eficaz!
Um personagem com a habilidade de encontrar armadilhas pode perceber o círculo do teletransporte com um teste de Percepção, e desarmá-lo com um teste de Ladinagem (ambos CD 34).
Componente material: pó de âmbar (no valor de 1.000 TO).


text:
from django.db import migrations

class Migration(migrations.Migration):

    dependencies = [
        ("socialprofile", "0002_models_proxy"),
        ("socialprofile", "0002_auto_20170107_0237"),
    ]

    operations = []


text:
<?xml version="1.0"?>
<config>
    <menu>
        <ecominfinity>
            <title>EcomInfinity</title>
            <sort_order>25</sort_order>
            <children>
                <mageacf translate="title" module="mageacf">
                    <title>Colour Group Management</title>
                    <action>adminhtml/mageacf/index</action>
                    <sort_order>10</sort_order>
                </mageacf>
            </children>
        </ecominfinity>
    </menu>
    <acl>
        <resources>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <mageacf translate="title" module="mageacf">
                                        <title>Config Advanced Colour Filter</title>
                                        <sort_order>50</sort_order>
                                    </mageacf>
                                </children>
                            </config>
                        </children>
                    </system>
                    <ecominfinity translate="title" module="mageacf">
                        <title>EcomInfinity</title>
                        <sort_order>100</sort_order>
                        <children>
                            <mageacf translate="title">
                                <title>Advanced Colour Filter</title>
                            </mageacf>
                        </children>
                    </ecominfinity>
                </children>
            </admin>
        </resources>
    </acl>
</config>


text:
<!doctype html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">

  <title>app-toolbar demo</title>

  <custom-style>

  </custom-style>

  <app-toolbar>Random Text</app-toolbar>

  <app-toolbar>
    <paper-icon-button icon="delete"></paper-icon-button>
    <paper-icon-button icon="search"></paper-icon-button>
  </app-toolbar>

  <app-toolbar>

App name

  </app-toolbar>

  <app-toolbar>

App name

  </app-toolbar>

  <app-toolbar>
    <paper-icon-button icon="menu"></paper-icon-button>

App name

  </app-toolbar>

  <app-toolbar>
    <paper-icon-button icon="menu"></paper-icon-button>

App name

    <paper-icon-button icon="search"></paper-icon-button>
  </app-toolbar>

  <app-toolbar>
    <paper-icon-button icon="close"></paper-icon-button>

App name

  </app-toolbar>

  <app-toolbar>
    <paper-icon-button icon="close"></paper-icon-button>

App name

    <paper-progress value="10" indeterminate bottom-item></paper-progress>
  </app-toolbar>


text:
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { ActionCreators } from '../actions';
import Sidebar from './Sidebar';
import Project from './Project';
import animation from '../actions/animations';
import ProjectList from './ProjectList';
import { CSSTransitionGroup } from 'react-transition-group';

class ProjectContainer extends Component {
	constructor(props){
		super(props);
		this.runProjectTransition = this.runProjectTransition.bind(this);
	}

	componentDidMount(){
		//document.body.scrollTo(0,0);
		document.body.scrollTop = 0;
		document.getElementById('top').scrollIntoView();

		if ( navigator.userAgent.match(/(iPod|iPhone|iPad|Android)/) || document.body.classList.contains('isMobile') ) {
            document.getElementById('top').scrollTo(0,0);
			window.scrollTo(0,0);
        }
		this.runProjectTransition();
	}

	runProjectTransition(){
		if( document.body.classList.contains('isMobile') ){
			animation.transitionMain(this.projectBackgroundColorMobile, this.projectBackgroundMainMobile);
			animation.animateProjectEnter();
		} else {
			animation.transitionMain(this.projectBackgroundColor, this.projectBackgroundMain);
			animation.animateProjectEnter();
		}
	}

	render() {
		const projectURL = this.props.match.params.projectURL;
		const data = this.props.content.projects.filter((project) => {
	  		return project.projectURL === projectURL;
	  	});

	  	var styles = {
			backgroundColor: data[0].projectColor,
		};

		return (

				    <Sidebar project={data} heading={'project'} animate={this.props.animations.bool} appLocation={this.props.match.path}  />

				    	<CSSTransitionGroup
					        transitionName="change-view"
					        transitionAppear={true}
					        transitionAppearTimeout={900}
					        transitionEnterTimeout={3000}
					        transitionLeaveTimeout={3000}
					        className="transition-group-wrapper project-transition-target"
						>
				      		<Project project={data} />
				      		<ProjectList projects={this.props.content.projects} current={data[0]} runBackground={this.runBackground} runProjectTransition={this.runProjectTransition} />

				      	</CSSTransitionGroup>

 { this.projectBackgroundColor = div; } } style={styles} className="project-background-color background-piece background-piece-right-color">

 { this.projectBackgroundMain = div; } } className="project-background-main background-piece background-piece-right-main">

 { this.projectBackgroundColorMobile = div; } } style={styles} className="background-piece background-piece-right-color">

 { this.projectBackgroundMainMobile = div; } } className="background-piece background-piece-right-main">

		);
	}
}

function mapDispatchToProps(dispatch){
  return bindActionCreators(ActionCreators, dispatch);
}

function mapStateToProps(state){
  return {
    content: state.content,
    animations: state.animations,
  }
}

export default connect(mapStateToProps, mapDispatchToProps)(ProjectContainer);


text:
;;   ==========================================================================
;;   This file is part of 6502.ts, an emulator for 6502 based systems built
;;   in Typescript
;;
;;   Copyright (c) 2014 -- 2020 Christian Speckner and contributors
;;
;;   Permission is hereby granted, free of charge, to any person obtaining a copy
;;   of this software and associated documentation files (the "Software"), to deal
;;   in the Software without restriction, including without limitation the rights
;;   to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
;;   copies of the Software, and to permit persons to whom the Software is
;;   furnished to do so, subject to the following conditions:
;;
;;   The above copyright notice and this permission notice shall be included in all
;;   copies or substantial portions of the Software.
;;
;;   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
;;   IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
;;   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
;;   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
;;   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;;   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
;;   SOFTWARE.
;;   ==========================================================================
;;   Interface:
;;
;;   * The BIOS code should be relocated to the beginning of the ROM bank
;;   * The entry vector ($F807) must be patched into the last four bytes of the
;;     ROM bank
;;   * A canary value of zero must be placed at $FFFB
;;   * The BIOS triggers the actual load by writing the requested multiload ID
;;     $FFF9. The write originates from page zero.
;;   * After loading, the following values must be patched into the ROM:
;;       - $FFF0: control word
;;       - $FFF1: a random value for A
;;       - $FFF2 -- $FFF3: entry point
;;   ==========================================================================
        processor 6502

VBLANK  equ  $01

        SEG code
; ===
; Entry point for multi-load reading
; ===
        org $F800

; Load the target bank and jump
        LDA $FA
        JMP load

; ===
; System reset
; ===

        org $F807
start:
        SEI
        CLD

        LDA #0
        LDX #$FF
        TXS
        TAX
        TAY

clearmem:
; the regular init dance
        STA $00,X
        INX
        BNE clearmem

        JMP load

load:
; Blank the screen
        LDX #2
        STX VBLANK

; Configure banking and enable RAM writes
        LDX $F006
        STX $FFF8

; Clear TIA registers
        LDY #$00
        LDX #$28
tiaclr:
        STY $04,X
        DEX
        BPL tiaclr

; Clear memory (skip $80 though as it still contains the requested multiload ID)
        LDX #$80
        LDY #0
clear:
        STY $0,X
        INX
        BNE clear

; Copy wait-for-load snipped to RIOT RAM (11 bytes)
        LDX #11
copywaitforload:
        LDY waitforload,X
        STY $F0,X
        DEX
        BPL copywaitforload

; Jump to wait-for-load
        JMP $F0

; The load is done; copy the trampoline to RIOT RAM (6 bytes)
prepareexec:
        LDX #6
copyexec:
        LDA execute,X
        STA $F0,X
        DEX
        BPL copyexec

; The cartridge emulation will provide the load parameters at 0xfff0 -- 0xfff3
; Prepare the control byte
        LDX $FFF0
        STX $80
        LDY $F000,X
; Load random value for A
        LDA $FFF1
; The entry point comes next; patch it into the trampoline
        LDX $FFF2
        STX $F4
        LDX $FFF3
        STX $F5

; Setup the registers (we have randomized A above)
        LDX #$FF
        LDY #0
        TXS

; jump into the trampoline and continue execution
        JMP $F0

; ===
; Wait for the cartridge emulation to load the new multiload into RAM.
; This will be executed from RIOT RAM.
; ===
waitforload:
; Write the load ID to $FFF9. This will cause the cartridge emulation to
; copy in the new multiload
        STA $FFF9
wait:
; As long as the cartridge is busy, the data bus will be undriven, and the canary
; load will return $FB
        LDA $FFFB
        BNE wait
; We got 0? The cartridge is driving the bus again, so the load is finished, and
; we can continue
        JMP prepareexec

; ===
; Trampoline
;
; Setup the control register and jump back into the code. This will be
; executed from RIOT RAM.
; ===
execute:
; Trigger the write to the control register...
        STA $FFF8
; ... and jump. The address will be patched in.
        JMP $0000


text:
<!DOCTYPE html>

        <meta charset="UTF-8" />
        <meta name="robots" content="index, follow, all" />
        <title>HealthCareAbroad\UserBundle\Form | HealthCareAbroad API</title>
                    <link rel="stylesheet" type="text/css" href="../../stylesheet.css">

Classes

Namespaces

Interfaces

Index

HealthCareAbroad API

Namespace

HealthCareAbroad\UserBundle\Form

                    UserAccountDetailType

                    UserLoginType

        Generated by Sami, the API Documentation Generator.


text:
package orp.demo.encryptor;

import java.nio.ByteBuffer;
import java.io.ByteArrayOutputStream;
import android.util.Log;

import orp.orp.Endpoint;
import orp.orp.Outbound;
import orp.orp.Session;
import orp.orp.SessionManager;
import orp.orp.TIDL;

/**
 * Created by drmorr on 3/25/15.
 */

/** @brief Wrapper class for the bulk encryptor application */
public class Encryptor {

    private Session session;
    public static final int DATA_LEN = 2040;
    public enum EncError {SESSION_FAILED, INITIALIZATION_FAILED, UNSUPPORTED_ALGORITHM, DATA_FAILED, RESET_FAILED, SHUTDOWN_FAILED};

    public static class EncryptorException extends Exception {

        public final EncError e;
        private EncryptorException(EncError in_e) {
            e = in_e;
        }

        @Override
        public String getMessage() { return "Error with encryptor: " + e; }
    }

    // Initialize the session and try to start the application
    public Encryptor(SessionManager sm) throws EncryptorException, Endpoint.InvalidHash, InterruptedException {
        /* enc_hash = "enc\n" */
        byte[] enc_hash = {0x65, 0x6e, 0x63, 0xa, 0x0, 0x0, 0x0, 0x0,
                0x0,  0x0,  0x0,  0x0,  0x0, 0x0, 0x0, 0x0,
                0x0,  0x0,  0x0,  0x0,  0x0, 0x0, 0x0, 0x0,
                0x0,  0x0,  0x0,  0x0,  0x0, 0x0, 0x0, 0x0};
        Endpoint enc_ep = new Endpoint(enc_hash, (short)0x1337);
        Thread.sleep(1000);

        SessionManager.PreSession preSession = sm.newSession(enc_ep);
        session = preSession.getSession();
        if (preSession.getState() != SessionManager.PreSession.State.OK)
            throw new EncryptorException(EncError.SESSION_FAILED);
    }

    // Set the algorithm, mode, and key
    public void init(String key, EncryptorAlgo algo, EncryptorMode mode) throws EncryptorException, TIDL.TIDLException, Outbound.ETooMuchData, InterruptedException {
        // Write the initialization packet
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        EncryptorAlgo.Serialize(out, algo);
        EncryptorMode.Serialize(out, mode);
        TIDL.string_serialize(out, key);
        session.writeBlocking(out.toByteArray());

        // Check to make sure initialization was OK
        ByteBuffer rbuf = ByteBuffer.wrap(session.read());
        EncryptorResponse response = EncryptorResponse.Deserialize(rbuf);
        if (response == EncryptorResponse.ER_ERROR)
            throw new EncryptorException(EncError.INITIALIZATION_FAILED);
        else if (response == EncryptorResponse.ER_UNSUPPORTED)
            throw new EncryptorException(EncError.UNSUPPORTED_ALGORITHM);
    }

    // Do the encryption or decryption and return the result
    public byte[] go(byte[] data) throws EncryptorException, TIDL.TIDLException, Outbound.ETooMuchData, InterruptedException {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        byte[] ret = new byte[data.length];

        // Loop through the input data -- can only transfer DATA_LEN bytes at a time
        for (int i = 0; i < data.length; i += DATA_LEN) {
            Log.d("Encryptor.go", "Starting chunk " + i);
            EncryptorCommand.Serialize(out, EncryptorCommand.EC_DATA);
            int len = i + DATA_LEN > data.length ? data.length - i: DATA_LEN;
            out.write(data, i, len);
            session.writeBlocking(out.toByteArray());
            Log.d("Encryptor.go", "Wrote " + len + "bytes of chunk " + i + ", beginning read");

            ByteBuffer response = ByteBuffer.wrap(session.read());
            Log.d("Encryptor.go", "Done with read of chunk " + i);
            if (EncryptorResponse.Deserialize(response) != EncryptorResponse.ER_OK)
                throw new EncryptorException(EncError.DATA_FAILED);
            response.get(ret, i, len);
            out.reset();
        }
        return ret;
    }

    // Stop encrypting; must call when you're done (not automatic because you could have multiple things
    // to encrypt or decrypt with the same key)
    public void stop() throws EncryptorException, TIDL.TIDLException, Outbound.ETooMuchData, InterruptedException {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        EncryptorCommand.Serialize(out, EncryptorCommand.EC_DONE);
        session.writeBlocking(out.toByteArray());

        ByteBuffer response = ByteBuffer.wrap(session.read());
        if (EncryptorResponse.Deserialize(response) != EncryptorResponse.ER_OK)
            throw new EncryptorException(EncError.RESET_FAILED);
    }

    // Shut down the application.  There's no way to restart it, so this object is dead at that point.
    public void shutdown() throws EncryptorException, TIDL.TIDLException, Outbound.ETooMuchData, InterruptedException {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        EncryptorAlgo.Serialize(out, EncryptorAlgo.EC_GCM_128);     // Shutdown is the second part of the packet, so just fill in a dummy algo
        EncryptorMode.Serialize(out, EncryptorMode.EC_SHUTDOWN);
        session.writeBlocking(out.toByteArray());

        ByteBuffer response = ByteBuffer.wrap(session.read());
        if (EncryptorResponse.Deserialize(response) != EncryptorResponse.ER_OK)
            throw new EncryptorException(EncError.SHUTDOWN_FAILED);
    }
}


text:
<?php
/**
 * Fake FTP file system.
 * - Hook into WordPress with `new Loco_test_DummyFtpConnect`
 * - Use to write a file with `$file->getWriteContext()->connect( new WP_Filesystem_Debug($creds) )`
 */
class Loco_test_DummyFtpConnect extends Loco_hooks_Hookable {

    public function filter_filesystem_method(){
        return 'debug';
    }

}

/**
 * Dummy FTP file system.
 * WARNING: this actually modifies files - it just does it while simulating a remote connection
 * - All operations performed "direct" when authorized, else they fail.
 */
class WP_Filesystem_Debug extends WP_Filesystem_Base {

    private $authed;

    /**
     * @var WP_Error
     */
    public $errors;

    public function __construct( array $opt ) {
        $this->options = $opt;
        $this->method = 'ftp';
    }

    /**
     * Dummy FTP connect: requires username=foo password=xxx
     */
    public function connect() {
        $this->authed = false;
        $this->errors = new WP_Error;
        // @codeCoverageIgnoreStart
        if( empty($this->options['hostname']) ){
            $this->errors->add( 'bad_hostname', 'Debug: empty hostname');
            return false;
        }
        if( empty($this->options['username']) ){
            $this->errors->add( 'bad_username', 'Debug: empty username');
            return false;
        }
        if( $this->options['username'] !== 'foo' ) {
            $this->errors->add( 'bad_username', 'Debug: username expected to be "foo"');
            return false;
        }
        if( empty($this->options['password']) ){
            $this->errors->add( 'bad_username', 'Debug: empty password');
            return false;
        }
        if( $this->options['password'] !== 'xxx' ) {
            $this->errors->add( 'bad_password', 'Debug: password expected to be "xxx"' );
            return false;
        }
        // @codeCoverageIgnoreEnd
        $this->authed = true;
        return true;
    }

    /**
     * @return WP_Filesystem_Debug
     */
    public function disconnect(){
        $this->authed = false;
        $this->options = array();
        return $this;
    }

    /**
     * {@inheritdoc}
     * Dummy function allows exact path to be returned, subject to debugging filters
     */
    public function find_folder( $path ){
        if( WP_CONTENT_DIR === $path ){
            return loco_constant('WP_CONTENT_DIR');
        }
        return false;
    }

    /**
     * @internal
     * Proxies supposed remote call to *real* direct call, as long as instance is authorized.
     * Deliberately not extending WP_Filesystem_Direct for safety.
     */
    private function _call( $method, array $args ){
        if( $this->authed ){
            $real = new WP_Filesystem_Direct( null );
            return call_user_func_array( array($real,$method), $args );
        }
        return false;
    }

    /**
     * {@inheritdoc}
     */
    public function is_writable( $file ){
        return $this->_call( __FUNCTION__, func_get_args() );
    }

    /**
     * {@inheritdoc}
     */
    public function chmod( $file, $mode = false, $recursive = false ){
        return $this->_call( __FUNCTION__, func_get_args() );
    }

    /**
     * {@inheritdoc}
     */
    public function copy( $source, $destination, $overwrite = false, $mode = false ){
        return $this->_call( __FUNCTION__, func_get_args() );
    }

    /**
     * {@inheritdoc}
     */
    public function put_contents( $path, $data, $mode = false ){
        return $this->_call( __FUNCTION__, func_get_args() );
    }

    /**
     * {@inheritdoc}
     */
    public function delete( $file, $recursive = false, $type = false ){
        return $this->_call( __FUNCTION__, func_get_args() );
    }

    /**
     * {@inheritdoc}
     */
    public function mkdir( $path, $chmod = false, $chown = false, $chgrp = false ){
        return $this->_call( __FUNCTION__, func_get_args() );
    }

}


text:
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using AwfulRedux.Tools.ScrollingCollection;
using AwfulRedux.UI.Models.Threads;
using Template10.Mvvm;

namespace AwfulRedux.ViewModels
{
    public class SearchViewModel : ForumThreadListBaseViewModel
    {
        private SearchPageScrollingCollection _ForumPageScrollingCollection = default(SearchPageScrollingCollection);

        public SearchPageScrollingCollection ForumPageScrollingCollection
        {
            get { return _ForumPageScrollingCollection; }
            set { Set(ref _ForumPageScrollingCollection, value); }
        }
    }
}