text:
typedef PlatformTest SysInfoTest;

TEST_F(SysInfoTest, NumProcs) {
  // We aren't actually testing that it's correct, just that it's sane.
  EXPECT_GE(base::SysInfo::NumberOfProcessors(), 1);
}

TEST_F(SysInfoTest, AmountOfMem) {
  // We aren't actually testing that it's correct, just that it's sane.
  EXPECT_GT(base::SysInfo::AmountOfPhysicalMemory(), 0);
  EXPECT_GT(base::SysInfo::AmountOfPhysicalMemoryMB(), 0);
}

TEST_F(SysInfoTest, AmountOfFreeDiskSpace) {
  // We aren't actually testing that it's correct, just that it's sane.
  std::wstring tmp_path;
  ASSERT_TRUE(file_util::GetTempDir(&tmp_path));
  EXPECT_GT(base::SysInfo::AmountOfFreeDiskSpace(tmp_path), 0) << tmp_path;
}

TEST_F(SysInfoTest, GetEnvVar) {
  // Every setup should have non-empty PATH...
  EXPECT_NE(base::SysInfo::GetEnvVar(L"PATH"), L"");
}

TEST_F(SysInfoTest, HasEnvVar) {
  // Every setup should have PATH...
  EXPECT_TRUE(base::SysInfo::HasEnvVar(L"PATH"));
}

// TODO(port): If and when there's a LINUX version of this method, enable this
// unit test.
#if defined(OS_WIN) || defined(OS_MACOSX)
TEST_F(SysInfoTest, OperatingSystemVersionNumbers) {
  int32_t os_major_version = -1;
  int32_t os_minor_version = -1;
  int32_t os_bugfix_version = -1;
  base::SysInfo::OperatingSystemVersionNumbers(&os_major_version,
                                               &os_minor_version,
                                               &os_bugfix_version);
  EXPECT_GT(os_major_version, -1);
  EXPECT_GT(os_minor_version, -1);
  EXPECT_GT(os_bugfix_version, -1);
}
#endif  // OS_WIN || OS_MACOSX


text:
package org.jcrom.entities;

import org.jcrom.AbstractJcrEntity;
import org.jcrom.annotations.JcrProperty;

/**
 *
 * @author Olafur Gauti Gudmundsson
 * @author Nicolas Dos Santos
 */
public class LazyObject extends AbstractJcrEntity implements LazyInterface {

    private static final long serialVersionUID = 1L;

    @JcrProperty
    private String s;

    public LazyObject() {
        super();
    }

    @Override
    public void setString(String s) {
        this.s = s;
    }

    @Override
    public String getString() {
        return s;
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.example;

import com.google.actions.api.ActionRequest;
import com.google.actions.api.ActionResponse;
import com.google.actions.api.ActionsSdkApp;
import com.google.actions.api.ForIntent;
import com.google.actions.api.response.ResponseBuilder;
import com.google.actions.api.response.helperintent.DeliveryAddress;
import com.google.actions.api.response.helperintent.SignIn;
import com.google.actions.api.response.helperintent.transactions.v3.TransactionDecision;
import com.google.actions.api.response.helperintent.transactions.v3.TransactionRequirements;
import com.google.api.services.actions_fulfillment.v2.model.Action;
import com.google.api.services.actions_fulfillment.v2.model.Argument;
import com.google.api.services.actions_fulfillment.v2.model.DeliveryAddressValueSpecAddressOptions;
import com.google.api.services.actions_fulfillment.v2.model.GooglePaymentOption;
import com.google.api.services.actions_fulfillment.v2.model.LineItemV3;
import com.google.api.services.actions_fulfillment.v2.model.Location;
import com.google.api.services.actions_fulfillment.v2.model.MerchantPaymentMethod;
import com.google.api.services.actions_fulfillment.v2.model.MerchantPaymentOption;
import com.google.api.services.actions_fulfillment.v2.model.MerchantUnitMeasure;
import com.google.api.services.actions_fulfillment.v2.model.MerchantV3;
import com.google.api.services.actions_fulfillment.v2.model.MoneyV3;
import com.google.api.services.actions_fulfillment.v2.model.OpenUrlAction;
import com.google.api.services.actions_fulfillment.v2.model.OrderContents;
import com.google.api.services.actions_fulfillment.v2.model.OrderOptionsV3;
import com.google.api.services.actions_fulfillment.v2.model.OrderUpdateV3;
import com.google.api.services.actions_fulfillment.v2.model.OrderV3;
import com.google.api.services.actions_fulfillment.v2.model.PaymentMethodDisplayInfo;
import com.google.api.services.actions_fulfillment.v2.model.PaymentMethodStatus;
import com.google.api.services.actions_fulfillment.v2.model.PaymentParameters;
import com.google.api.services.actions_fulfillment.v2.model.PresentationOptionsV3;
import com.google.api.services.actions_fulfillment.v2.model.PriceAttribute;
import com.google.api.services.actions_fulfillment.v2.model.PromotionV3;
import com.google.api.services.actions_fulfillment.v2.model.PurchaseFulfillmentInfo;
import com.google.api.services.actions_fulfillment.v2.model.PurchaseItemExtension;
import com.google.api.services.actions_fulfillment.v2.model.PurchaseItemExtensionItemOption;
import com.google.api.services.actions_fulfillment.v2.model.PurchaseOrderExtension;
import com.google.api.services.actions_fulfillment.v2.model.PurchaseReturnsInfo;
import com.google.api.services.actions_fulfillment.v2.model.SimpleResponse;
import com.google.api.services.actions_fulfillment.v2.model.StructuredResponse;
import com.google.api.services.actions_fulfillment.v2.model.TimeV3;
import com.google.api.services.actions_fulfillment.v2.model.UserInfo;
import com.google.api.services.actions_fulfillment.v2.model.UserInfoOptions;
import com.google.auth.oauth2.AccessToken;
import com.google.auth.oauth2.ServiceAccountCredentials;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.protobuf.FieldMask;
import com.google.protobuf.util.FieldMaskUtil;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.Map;
import java.util.Random;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPatch;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MyActionsApp extends ActionsSdkApp {

  private static final Logger LOGGER = LoggerFactory.getLogger(MyActionsApp.class);
  private static final String SERVICE_ACCOUNT_KEY_FILE_NAME = "service-account.json";
  private static final GsonBuilder GSON_BUILDER;
  private static final LocationDeserializer LOCATION_DESERIALIZER;
  static {
    LOCATION_DESERIALIZER = new LocationDeserializer();
    GSON_BUILDER = new GsonBuilder();
    GSON_BUILDER.registerTypeAdapter(Location.class, LOCATION_DESERIALIZER);
  }

  @ForIntent("actions.intent.MAIN")
  public ActionResponse welcome(ActionRequest request) {
    ResponseBuilder responseBuilder = getResponseBuilder(request);
    String welcome = "Hey there! I can help you go through a transaction " +
        "with Google Pay and Merchant-managed payments.";
    return responseBuilder
        .add(new SimpleResponse()
            .setTextToSpeech(welcome)
            .setDisplayText(welcome))
        .addSuggestions(new String[] {
            "Merchant Transaction",
            "Google Pay Transaction"
        }).build();
  }

  @ForIntent("actions.intent.TEXT")
  public ActionResponse handleDialog(ActionRequest request) throws IOException {
    Map<String, Object> conversationData = request.getConversationData();
    String query = request.getRawInput().getQuery().toLowerCase();
    if (query.equals("merchant transaction")) {
      conversationData.put("paymentType", "merchant_payment");
      return signIn(request);
    } else if (query.equals("google pay transaction")) {
      conversationData.put("paymentType", "google_payment");
      return checkTransactionRequirements(request);
    } else if (query.equals("check transaction requirements") || query.equals("check requirements")) {
      return checkTransactionRequirements(request);
    } else if (query.equals("get delivery address")) {
      return getDeliveryAddress(request);
    } else if (query.equals("confirm transaction")) {
      return sendTransactionDecision(request);
    } else if (query.equals("send order update")) {
      return sendOrderUpdate(request);
    } else {
      return getResponseBuilder(request)
        .add("I didn't get that.")
        .add("What would you like to try?")
        .build();
    }
  }

  private ActionResponse signIn(ActionRequest request) {
    // [START sign_in_asdk]
    return getResponseBuilder(request).add(
        new SignIn()
            .setContext("To get your account details"))
        .build();
    // [END sign_in_asdk]
  }

  // [START get_sign_in_status_asdk]
  @ForIntent("actions.intent.SIGN_IN")
  public ActionResponse signInComplete(ActionRequest request) {
    ResponseBuilder responseBuilder = getResponseBuilder(request);
    if (request.isSignInGranted()) {
      responseBuilder
          .add("You must meet all the requirements necessary to make a " +
              "transaction. Try saying \"check transaction requirements\".")
          .addSuggestions(new String[] {
              "check requirements"
          });
    } else {
      responseBuilder.add("You need to sign in before making a transaction.");
    }
    return responseBuilder.build();
  }
  // [END get_sign_in_status_asdk]

  private ActionResponse checkTransactionRequirements(ActionRequest request) {
    // [START transaction_check_asdk]
    return getResponseBuilder(request)
        .add(new TransactionRequirements())
        .build();
    // [END transaction_check_asdk]
  }

  // [START transaction_check_complete_asdk]
  @ForIntent("actions.intent.TRANSACTION_REQUIREMENTS_CHECK")
  public ActionResponse transactionCheckComplete(ActionRequest request) {
    LOGGER.info("Checking Transaction Requirements Result.");

    // Check result of transaction requirements check
    Argument transactionCheckResult = request
        .getArgument("TRANSACTION_REQUIREMENTS_CHECK_RESULT");
    boolean result = false;
    if (transactionCheckResult != null) {
      Map<String, Object> map = transactionCheckResult.getExtension();
      if (map != null) {
        String resultType = (String) map.get("resultType");
        result = resultType != null && resultType.equals("CAN_TRANSACT");
      }
    }

    ResponseBuilder responseBuilder = getResponseBuilder(request);
    if (result) {
      // Normally take the user through cart building flow
      responseBuilder
          .add("Looks like you're good to go! Next " +
              "I'll need your delivery address. Try saying " +
              "\"get delivery address\".")
          .addSuggestions(new String[]{"get delivery address"});
    } else {
      // Exit conversation
      responseBuilder.add("Transaction failed.");
    }
    return responseBuilder.build();
  }
  // [END transaction_check_complete_asdk]

  private ActionResponse getDeliveryAddress(ActionRequest request) {
    // [START delivery_address_asdk]
    DeliveryAddressValueSpecAddressOptions addressOptions =
        new DeliveryAddressValueSpecAddressOptions()
            .setReason("To know where to send the order");
    return getResponseBuilder(request)
        .add(new DeliveryAddress()
            .setAddressOptions(addressOptions))
        .build();
    // [END delivery_address_asdk]
  }

  // [START delivery_address_complete_asdk]
  @ForIntent("actions.intent.DELIVERY_ADDRESS")
  public ActionResponse deliveryAddressComplete(ActionRequest request) {
    Argument deliveryAddressValue = request.getArgument("DELIVERY_ADDRESS_VALUE");
    Location deliveryAddress = null;
    if (deliveryAddressValue != null) {
      Map<String, Object> map = deliveryAddressValue.getExtension();
      if (map != null) {
        String userDecision = (String) map.get("userDecision");
        Location location = (Location) map.get("location");
        deliveryAddress = userDecision != null && userDecision.equals("ACCEPTED") ? location : null;
      }
    }
    ResponseBuilder responseBuilder = getResponseBuilder(request);
    if (deliveryAddress != null) {
      // Cache delivery address in conversation data for later use
      Map<String, Object> conversationData = request.getConversationData();
      conversationData.put("location",
          GSON_BUILDER.create().toJson(deliveryAddress, Location.class));
      responseBuilder
          .add("Great, got your address! Now say \"confirm transaction\".")
          .addSuggestions(new String[] {
              "confirm transaction"
          });
    } else {
      responseBuilder.add("Transaction failed.").endConversation();
    }
    return responseBuilder.build();
  }
  // [END delivery_address_complete_asdk]

  private ActionResponse sendTransactionDecision(ActionRequest request) {
    LOGGER.info("Checking Transaction Decision.");

    String orderId = "ORDER_ID";
    Map<String, Object> conversationData = request.getConversationData();
    conversationData.put("latestOrderId", orderId);

    // Build the Order
    // [START build_order_asdk]
    // Transaction Merchant
    MerchantV3 transactionMerchant = new MerchantV3()
        .setId("http://www.example.com")
        .setName("Example Merchant");

    // Line Item
    PriceAttribute itemPrice = new PriceAttribute()
        .setType("REGULAR")
        .setName("Item Price")
        .setState("ACTUAL")
        .setAmount(new MoneyV3()
            .setCurrencyCode("USD")
            .setAmountInMicros(8990000L)
        )
        .setTaxIncluded(true);

    PriceAttribute totalItemPrice = new PriceAttribute()
        .setType("TOTAL")
        .setName("Total Price")
        .setState("ACTUAL")
        .setAmount(new MoneyV3()
            .setCurrencyCode("USD")
            .setAmountInMicros(9990000L)
        )
        .setTaxIncluded(true);

    // Purchase Item Extension
    PurchaseItemExtension purchaseItemExtension = new PurchaseItemExtension()
        .setUnitMeasure(new MerchantUnitMeasure()
            .setMeasure(1.0)
            .setUnit("POUND"))
        .setItemOptions(Arrays.asList(new PurchaseItemExtensionItemOption()
            .setId("ITEM_OPTION_ID")
            .setName("Pepperoni")
            .setPrices(Arrays.asList(
                new PriceAttribute()
                  .setType("REGULAR")
                  .setState("ACTUAL")
                  .setName("Item Price")
                  .setAmount(new MoneyV3()
                      .setCurrencyCode("USD")
                      .setAmountInMicros(1000000L))
                  .setTaxIncluded(true),
                new PriceAttribute()
                    .setType("TOTAL")
                    .setState("ACTUAL")
                    .setName("Total Price")
                    .setAmount(new MoneyV3()
                        .setCurrencyCode("USD")
                        .setAmountInMicros(1000000L))
                    .setTaxIncluded(true)
                ))
            .setNote("Extra pepperoni")));

    LineItemV3 lineItem = new LineItemV3()
        .setId("LINE_ITEM_ID")
        .setName("Pizza")
        .setDescription("A four cheese pizza.")
        .setPriceAttributes(Arrays.asList(itemPrice, totalItemPrice))
        .setNotes(Collections.singletonList("Extra cheese."))
        .setPurchase(purchaseItemExtension);

    // Order Contents
    OrderContents contents = new OrderContents()
        .setLineItems(Collections.singletonList(lineItem));

    // User Info
    UserInfo buyerInfo = new UserInfo()
        .setEmail("janedoe@gmail.com")
        .setFirstName("Jane")
        .setLastName("Doe")
        .setDisplayName("Jane Doe");

    // Price Attributes
    PriceAttribute subTotal = new PriceAttribute()
        .setType("SUBTOTAL")
        .setName("Subtotal")
        .setState("ESTIMATE")
        .setAmount(new MoneyV3()
            .setCurrencyCode("USD")
            .setAmountInMicros(9990000L)
        )
        .setTaxIncluded(true);
    PriceAttribute deliveryFee = new PriceAttribute()
        .setType("DELIVERY")
        .setName("Delivery")
        .setState("ACTUAL")
        .setAmount(new MoneyV3()
            .setCurrencyCode("USD")
            .setAmountInMicros(2000000L)
        )
        .setTaxIncluded(true);
    PriceAttribute tax = new PriceAttribute()
        .setType("TAX")
        .setName("Tax")
        .setState("ESTIMATE")
        .setAmount(new MoneyV3()
            .setCurrencyCode("USD")
            .setAmountInMicros(3780000L)
        )
        .setTaxIncluded(true);
    PriceAttribute totalPrice = new PriceAttribute()
        .setType("TOTAL")
        .setName("Total Price")
        .setState("ESTIMATE")
        .setAmount(new MoneyV3()
            .setCurrencyCode("USD")
            .setAmountInMicros(15770000L)
        )
        .setTaxIncluded(true);

    // Follow up actions
    Action viewDetails = new Action()
        .setType("VIEW_DETAILS")
        .setTitle("View details")
        .setOpenUrlAction(new OpenUrlAction()
            .setUrl("https://example.com"));
    Action call = new Action()
        .setType("CALL")
        .setTitle("Call us")
        .setOpenUrlAction(new OpenUrlAction()
            .setUrl("tel:+16501112222"));
    Action email = new Action()
        .setType("EMAIL")
        .setTitle("Email us")
        .setOpenUrlAction(new OpenUrlAction()
            .setUrl("mailto:person@example.com"));

    // Terms of service and order note
    String termsOfServiceUrl = "http://example.com";
    String orderNote = "Sale event";

    // Promotions
    PromotionV3 promotion = new PromotionV3()
        .setCoupon("COUPON_CODE");

    // Purchase Order Extension
    Location location = GSON_BUILDER.create().fromJson(
        (String) conversationData.get("location"), Location.class);

    PurchaseOrderExtension purchaseOrderExtension = new PurchaseOrderExtension()
        .setStatus("CREATED")
        .setUserVisibleStatusLabel("CREATED")
        .setType("FOOD")
        .setReturnsInfo(new PurchaseReturnsInfo()
            .setIsReturnable(false)
            .setDaysToReturn(1)
            .setPolicyUrl("https://example.com"))
        .setFulfillmentInfo(new PurchaseFulfillmentInfo()
            .setId("FULFILLMENT_SERVICE_ID")
            .setFulfillmentType("DELIVERY")
            .setExpectedFulfillmentTime(new TimeV3()
                .setTimeIso8601("2019-09-25T18:00:00.877Z"))
            .setLocation(location)
            .setPrice(new PriceAttribute()
                .setType("REGULAR")
                .setName("Delivery price")
                .setState("ACTUAL")
                .setAmount(new MoneyV3()
                    .setCurrencyCode("USD")
                    .setAmountInMicros(2000000L))
                .setTaxIncluded(true))
            .setFulfillmentContact(new UserInfo()
                .setEmail("johnjohnson@gmail.com")
                .setFirstName("John")
                .setLastName("Johnson")
                .setDisplayName("John Johnson")))
        .setPurchaseLocationType("ONLINE_PURCHASE");

    OrderV3 order = new OrderV3()
        .setCreateTime("2019-09-24T18:00:00.877Z")
        .setLastUpdateTime("2019-09-24T18:00:00.877Z")
        .setMerchantOrderId(orderId)
        .setUserVisibleOrderId(orderId)
        .setTransactionMerchant(transactionMerchant)
        .setContents(contents)
        .setBuyerInfo(buyerInfo)
        .setPriceAttributes(Arrays.asList(
            subTotal,
            deliveryFee,
            tax,
            totalPrice
        ))
        .setFollowUpActions(Arrays.asList(
            viewDetails,
            call,
            email
        ))
        .setTermsOfServiceUrl(termsOfServiceUrl)
        .setNote(orderNote)
        .setPromotions(Collections.singletonList(promotion))
        .setPurchase(purchaseOrderExtension);
    // [END build_order_asdk]

    // Create payment parameters
    PaymentParameters paymentParameters = new PaymentParameters();
    if (conversationData.get("paymentType") != null &&
      conversationData.get("paymentType").equals("google_payment")) {
      // [START ask_for_transaction_decision_google_payment_asdk]
      // Create order options
      OrderOptionsV3 orderOptions = new OrderOptionsV3()
          .setUserInfoOptions(new UserInfoOptions()
              .setUserInfoProperties(Collections.singletonList("EMAIL")));

      // Create presentation options
      PresentationOptionsV3 presentationOptions = new PresentationOptionsV3()
          .setActionDisplayName("PLACE_ORDER");

      // Create payment parameters
      JSONObject merchantInfo = new JSONObject();
      merchantInfo.put("merchantName", "Example Merchant");

      JSONObject facilitationSpec = new JSONObject();
      facilitationSpec.put("apiVersion", 2);
      facilitationSpec.put("apiVersionMinor", 0);
      facilitationSpec.put("merchantInfo", merchantInfo);

      JSONObject allowedPaymentMethod = new JSONObject();
      allowedPaymentMethod.put("type", "CARD");

      JSONArray allowedAuthMethods = new JSONArray();
      allowedAuthMethods.addAll(Arrays.asList("PAN_ONLY", "CRYPTOGRAM_3DS"));
      JSONArray allowedCardNetworks = new JSONArray();
      allowedCardNetworks.addAll(Arrays.asList("AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA"));

      JSONObject allowedPaymentMethodParameters = new JSONObject();
      allowedPaymentMethodParameters.put("allowedAuthMethods", allowedAuthMethods);
      allowedPaymentMethodParameters.put("allowedCardNetworks", allowedCardNetworks);

      allowedPaymentMethod.put("parameters", allowedPaymentMethodParameters);

      JSONObject tokenizationSpecificationParameters = new JSONObject();
      tokenizationSpecificationParameters.put("gateway", "example");
      tokenizationSpecificationParameters.put("gatewayMerchantId", "exampleGatewayMerchantId");

      JSONObject tokenizationSpecification = new JSONObject();
      tokenizationSpecification.put("type", "PAYMENT_GATEWAY");
      tokenizationSpecification.put("parameters", tokenizationSpecificationParameters);
      allowedPaymentMethod.put("tokenizationSpecification", tokenizationSpecification);

      JSONArray allowedPaymentMethods = new JSONArray();
      allowedPaymentMethods.add(allowedPaymentMethod);

      facilitationSpec.put("allowedPaymentMethods", allowedPaymentMethods);

      JSONObject transactionInfo = new JSONObject();
      transactionInfo.put("totalPriceStatus", "FINAL");
      transactionInfo.put("totalPrice", "15.77");
      transactionInfo.put("currencyCode", "USD");

      facilitationSpec.put("transactionInfo", transactionInfo);

      GooglePaymentOption googlePaymentOption = new GooglePaymentOption()
          .setFacilitationSpec(facilitationSpec.toJSONString());
      paymentParameters.setGooglePaymentOption(googlePaymentOption);

      return getResponseBuilder(request)
          .add(new TransactionDecision()
              .setOrder(order)
              .setOrderOptions(orderOptions)
              .setPresentationOptions(presentationOptions)
              .setPaymentParameters(paymentParameters)
          )
          .build();
      // [END ask_for_transaction_decision_google_payment_asdk]
    } else {
      // [START ask_for_transaction_decision_merchant_payment_asdk]
      // Create order options
      OrderOptionsV3 orderOptions = new OrderOptionsV3()
          .setUserInfoOptions(new UserInfoOptions()
              .setUserInfoProperties(Collections.singletonList("EMAIL")));

      // Create presentation options
      PresentationOptionsV3 presentationOptions = new PresentationOptionsV3()
          .setActionDisplayName("PLACE_ORDER");

      // Create payment parameters
      MerchantPaymentMethod merchantPaymentMethod = new MerchantPaymentMethod()
          .setPaymentMethodDisplayInfo(new PaymentMethodDisplayInfo()
              .setPaymentMethodDisplayName("VISA **** 1234")
              .setPaymentType("PAYMENT_CARD"))
          .setPaymentMethodGroup("Payment method group")
          .setPaymentMethodId("12345678")
          .setPaymentMethodStatus(new PaymentMethodStatus()
              .setStatus("STATUS_OK")
              .setStatusMessage("Status message"));

      MerchantPaymentOption merchantPaymentOption = new MerchantPaymentOption()
          .setDefaultMerchantPaymentMethodId("12345678")
          .setManagePaymentMethodUrl("https://example.com/managePayment")
          .setMerchantPaymentMethod(Collections.singletonList(merchantPaymentMethod));

      paymentParameters.setMerchantPaymentOption(merchantPaymentOption);

      return getResponseBuilder(request)
          .add(new TransactionDecision()
              .setOrder(order)
              .setOrderOptions(orderOptions)
              .setPresentationOptions(presentationOptions)
              .setPaymentParameters(paymentParameters)
          )
          .build();
      // [END ask_for_transaction_decision_merchant_payment_asdk]
    }
  }

  // Check result of asking to perform transaction / place order
  @ForIntent("actions.intent.TRANSACTION_DECISION")
  public ActionResponse transactionDecisionComplete(ActionRequest request) {

    // [START get_transaction_decision_asdk]
    // Check transaction decision value
    Argument transactionDecisionValue = request
        .getArgument("TRANSACTION_DECISION_VALUE");
    Map<String, Object> extension = null;
    if (transactionDecisionValue != null) {
      extension = transactionDecisionValue.getExtension();
    }

    String transactionDecision = null;
    if (extension != null) {
      transactionDecision = (String) extension.get("transactionDecision");
    }
    ResponseBuilder responseBuilder = getResponseBuilder(request);
    if ((transactionDecision != null && transactionDecision.equals("ORDER_ACCEPTED"))) {
      OrderV3 order = ((OrderV3) extension.get("order"));
    }
    // [END get_transaction_decision_asdk]
    if ((transactionDecision != null && transactionDecision.equals("ORDER_ACCEPTED"))) {
      // [START create_order_asdk]
      OrderV3 order = ((OrderV3) extension.get("order"));
      order.setLastUpdateTime("2019-09-24T19:00:00.877Z");

      // Update order status
      PurchaseOrderExtension purchaseOrderExtension = order.getPurchase();
      purchaseOrderExtension.setStatus("CONFIRMED");
      purchaseOrderExtension.setUserVisibleStatusLabel("Order confirmed");
      order.setPurchase(purchaseOrderExtension);

      // Order update
      OrderUpdateV3 orderUpdate = new OrderUpdateV3()
          .setType("SNAPSHOT")
          .setReason("Reason string")
          .setOrder(order);

      Map<String, Object> conversationData = request.getConversationData();
      String orderId = (String) conversationData.get("latestOrderId");
      responseBuilder
          .add("Transaction completed! Your order " + orderId + " is all set!")
          .addSuggestions(new String[] {"send order update"})
          .add(new StructuredResponse().setOrderUpdateV3(orderUpdate));
      // [END create_order_asdk]
    }
    else {
      responseBuilder.add("Transaction failed.").endConversation();
    }
    return responseBuilder.build();
  }

  private ActionResponse sendOrderUpdate(ActionRequest request)
      throws IOException {
    Map<String, Object> conversationData = request.getConversationData();
    String orderId = (String) conversationData.get("latestOrderId");
    // [START order_update]
    // Setup service account credentials
    String serviceAccountFile = MyActionsApp.class.getClassLoader()
        .getResource(SERVICE_ACCOUNT_KEY_FILE_NAME)
        .getFile();
    InputStream actionsApiServiceAccount = new FileInputStream(
        serviceAccountFile);
    ServiceAccountCredentials serviceAccountCredentials = (ServiceAccountCredentials)
        ServiceAccountCredentials.fromStream(actionsApiServiceAccount)
            .createScoped(Collections.singleton(
                "https://www.googleapis.com/auth/actions.order.developer"));
    AccessToken token = serviceAccountCredentials.refreshAccessToken();

    // Setup request with headers
    HttpPatch patchRequest = new HttpPatch(
        "https://actions.googleapis.com/v3/orders/" + orderId);
    patchRequest.setHeader("Content-type", "application/json");
    patchRequest.setHeader("Authorization", "Bearer " + token.getTokenValue());

    // Create order update
    FieldMask fieldMask = FieldMask.newBuilder().addAllPaths(Arrays.asList(
        "lastUpdateTime",
        "purchase.status",
        "purchase.userVisibleStatusLabel"))
        .build();

    OrderUpdateV3 orderUpdate = new OrderUpdateV3()
        .setOrder(new OrderV3()
            .setMerchantOrderId(orderId)
            .setLastUpdateTime(Instant.now().toString())
            .setPurchase(new PurchaseOrderExtension()
                .setStatus("DELIVERED")
                .setUserVisibleStatusLabel("Order delivered.")))
        .setUpdateMask(FieldMaskUtil.toString(fieldMask))
        .setReason("Order status was updated to delivered.");

    // Setup JSON body containing order update
    JsonParser parser = new JsonParser();
    JsonObject orderUpdateJson =
        parser.parse(new Gson().toJson(orderUpdate)).getAsJsonObject();
    JsonObject body = new JsonObject();
    body.add("orderUpdate", orderUpdateJson);
    JsonObject header = new JsonObject();
    header.addProperty("isInSandbox", true);
    body.add("header", header);
    StringEntity entity = new StringEntity(body.toString());
    entity.setContentType(ContentType.APPLICATION_JSON.getMimeType());
    patchRequest.setEntity(entity);

    // Make request
    HttpClient httpClient = HttpClientBuilder.create().build();
    HttpResponse response = httpClient.execute(patchRequest);
    LOGGER.info(response.getStatusLine().getStatusCode() + " " + response
        .getStatusLine().getReasonPhrase());

    return getResponseBuilder(request)
        .add("The order has been updated.")
        .build();
    // [END order_update]
  }

  private static String generateRandomOrderId() {
    StringBuilder sb = new StringBuilder();
    Random random = new Random();
    String validCharacters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
    for (int i = 0; i < 6; i++) {
      sb.append(validCharacters.charAt(random.nextInt(validCharacters.length())));
    }
    return sb.toString();
  }
}


text:
import css from './import-file-protocol.css';

__export__ = css;

export default css;


text:
#ifdef _WIN32
#include <windows.h>
#else
#include <sys/mman.h>
#include <cstring>
#include <cerrno>
#endif

#ifdef new
#undef new
#endif

VHWD_ENTER

#ifdef _WIN32

void* heap_alloc(size_t nSize_)
{
	void* pMem_ = ::VirtualAlloc(NULL, nSize_, MEM_COMMIT, PAGE_READWRITE );
	if(pMem_)
	{
		return pMem_;
	}

	int ret=::GetLastError();
	System::LogTrace("VirtualAlloc failed: ret=%d",ret);
	return NULL;
}

void heap_free(void* pMem_,size_t)
{
	if(::VirtualFree(pMem_, 0, MEM_RELEASE)==0)
	{
		System::LogTrace("VirtualFree failed: ptr=%p",pMem_);
	}
}

void heap_protect(void* pMem_,size_t nSize_,bool f)
{
	DWORD old;
	VirtualProtect(pMem_,nSize_,f?PAGE_READONLY:PAGE_READWRITE,&old);
}

#else

void* heap_alloc(size_t nSize)
{

	void* p=mmap(NULL,nSize,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0);

	if(p!=MAP_FAILED)
	{
		return p;
	}

	int ret=errno;
	System::LogTrace("mmap failed: %s",strerror(ret));
	return NULL;
}

void heap_protect(void* pMem_,size_t nSize_,bool f)
{
	mprotect (pMem_, nSize_, f?PROT_READ:(PROT_READ|PROT_WRITE));
}

void heap_free(void* p,size_t s)
{
	munmap(p,s);
}
#endif

void MemPoolPaging::_init()
{
	if(m_nFixedSizeMax!=0) return;

	MemPageCache& mpc(MemPageCache::current());
	mpc._init();

	m_bCustom=false;
	m_nFixedSizeCount=mpc.m_nFixedSizeCount;
	m_nFixedSizeMax=mpc.m_nFixedSizeMax;
	m_pSlots=mpc.m_pSlots;
	m_aSlots=mpc.m_aSlots;
}

MemPoolPaging::MemPoolPaging()
{
	m_nFixedSizeMax=0;
	_init();
}

MemPoolPaging::~MemPoolPaging()
{
	if(!m_bCustom) return;

	for(size_t i=0; i<m_nFixedSizeCount; i++)
	{
		if(m_aSlots[i].pPageList!=NULL)
		{
			System::LogTrace("MemPool not empty in destructor");
		}
		else
		{
			m_aSlots[i].~FixedSizeAllocatorUnit();
		}
	}
	::free(m_pSlots);
	::free(m_aSlots);
}

void* MemPoolPaging::allocate(size_t nSize)
{

	if(nSize>m_nFixedSizeMax)
	{
		if(m_nFixedSizeMax==0)
		{
			_init();
			if(nSize>m_nFixedSizeMax)
			{
				return MemPoolMalloc::allocate(nSize);
			}
		}
		else
		{
			return MemPoolMalloc::allocate(nSize);
		}
	}

	FixedSizeAllocatorUnit& sl(*m_pSlots[nSize]);
	FixedSizeAllocatorUnit::LockType lock1(sl.tSpin);

	if(!sl.pPageList)
	{
		MemPageInfo* mi=MemPageInfo::CreatePage(sl);
		MemPageCache::current().append(mi);
		sl.pPageList=mi;
	}

	MemPageInfo* mi=sl.pPageList;
	void* p=mi->pFreeList;
	mi->pFreeList=mi->pFreeList->pNext;
	mi->nUsedCount++;

	if(!mi->pFreeList)
	{
		sl.pPageList=sl.pPageList->pNext;
		if(sl.pPageList)
		{
			sl.pPageList->pPrev=NULL;
		}
	}
	return p;
}

void MemPoolPaging::deallocate(void* p)
{

	if(!p) return;

	static MemPageCache& mpc(MemPageCache::current());

	MemPageInfo* mi=mpc.search(p);
	if(!mi)
	{
		::free(p);
		return;
	}

	{
		FixedSizeAllocatorUnit& sl(*mi->m_pSlot);
		MemPageNode* pn=(MemPageNode*)p;
		FixedSizeAllocatorUnit::LockType lock1(sl.tSpin);

		if(!mi->pFreeList)
		{
			if(sl.pPageList)
			{
				sl.pPageList->pPrev=mi;
			}
			wassert(mi->pPrev==NULL);
			mi->pNext=sl.pPageList;
			sl.pPageList=mi;
		}

		pn->pNext=mi->pFreeList;
		mi->pFreeList=pn;

		if(--mi->nUsedCount!=0||!sl.pPageList->pNext)
		{
			return;
		}

		if(mi->pPrev)
		{
			mi->pPrev->pNext=mi->pNext;
		}
		else
		{
			sl.pPageList=mi->pNext;
		}

		if(mi->pNext)
		{
			mi->pNext->pPrev=mi->pPrev;
		}

	}

	mpc.remove(mi);
	MemPageInfo::DestroyPage(mi);

}

char gInstance_mempoolpaging[sizeof(MemPoolPaging)];

MemPoolPaging& MemPoolPaging::current()
{
	return *(MemPoolPaging*)gInstance_mempoolpaging;
}

void* SmallObject::operator new[](size_t nSize)
{
	return vhwd::MemPoolPaging::current().allocate(nSize,NULL,-1);
}

void* SmallObject::operator new(size_t nSize,const char* sFile,int nLine)
{
	return vhwd::MemPoolPaging::current().allocate(nSize,sFile,nLine);
}

void* SmallObject::operator new[](size_t nSize,const char* sFile,int nLine)
{
	return vhwd::MemPoolPaging::current().allocate(nSize,sFile,nLine);
}

void SmallObject::operator delete(void* p,const char*,int)
{
	vhwd::MemPoolPaging::current().deallocate(p);
}
void SmallObject::operator delete[](void* p,const char*,int)
{
	vhwd::MemPoolPaging::current().deallocate(p);
}
void* SmallObject::operator new(size_t nSize)
{
	return vhwd::MemPoolPaging::current().allocate(nSize,NULL,-1);
}

void SmallObject::operator delete(void* p)
{
	vhwd::MemPoolPaging::current().deallocate(p);
}

void SmallObject::operator delete[](void* p)
{
	vhwd::MemPoolPaging::current().deallocate(p);
}

void* SmallObject::operator new(size_t s,void* p)
{
	(void)&s;
	return p;
}

void SmallObject::operator delete(void*,void*) {}

VHWD_LEAVE

#if defined(VHWD_MEMDEBUG) || defined(VHWD_MEMUSEPOOL)

void* operator new(size_t nSize)
{
	return vhwd::MemPool::current().allocate(nSize);
}

void operator delete(void* p)
{
	vhwd::MemPool::current().deallocate(p);
}

void* operator new(size_t nSize,const char* sFile,int nLine)
{
	return vhwd::MemPool::current().allocate(nSize,sFile,nLine);
}

void operator delete(void* p,const char*,int)
{
	vhwd::MemPool::current().deallocate(p);
}

void* operator new(size_t nSize,int,const char* sFile,int nLine)
{
	return vhwd::MemPool::current().allocate(nSize,sFile,nLine);
}

void operator delete(void* p,int,const char*,int)
{
	vhwd::MemPool::current().deallocate(p);
}

void* operator new[](size_t nSize)
{
	return vhwd::MemPool::current().allocate(nSize);
}

void operator delete[](void* p)
{
	vhwd::MemPool::current().deallocate(p);
}

void* operator new[](size_t nSize,const char* sFile,int nLine)
{
	return vhwd::MemPool::current().allocate(nSize,sFile,nLine);
}

void operator delete[](void* p,const char*,int)
{
	vhwd::MemPool::current().deallocate(p);
}

void* operator new[](size_t nSize,int,const char* sFile,int nLine)
{
	return vhwd::MemPool::current().allocate(nSize,sFile,nLine);
}

void operator delete[](void* p,int,const char*,int)
{
	vhwd::MemPool::current().deallocate(p);
}

#endif


text:
All contributions to the project will be considered for inclusion, simply submit a pull request!

1. [Fork](https://github.com/sixlettervariables/sierra-ecg-tools/fork) the repository ([read more detailed steps](https://help.github.com/articles/fork-a-repo)).
2. [Create a branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository#creating-a-branch)
3. Make and commit your changes
4. Push your changes back to your fork.
5. [Submit a pull request](https://github.com/sixlettervariables/sierra-ecg-tools/compare/) ([read more detailed steps](https://help.github.com/articles/creating-a-pull-request)).


text:
#define AMBA_UART_DR(base)	(*(volatile unsigned char *)((base) + 0x00))
#define AMBA_UART_LCRH(base)	(*(volatile unsigned char *)((base) + 0x2c))
#define AMBA_UART_CR(base)	(*(volatile unsigned char *)((base) + 0x30))
#define AMBA_UART_FR(base)	(*(volatile unsigned char *)((base) + 0x18))

#define get_uart_base()	(0x10000000 + 0x00009000)

/*
 * This does not append a newline
 */
static inline void putc(int c)
{
	unsigned long base = get_uart_base();

	while (AMBA_UART_FR(base) & (1 << 5))
		barrier();

	AMBA_UART_DR(base) = c;
}

static inline void flush(void)
{
	unsigned long base = get_uart_base();

	while (AMBA_UART_FR(base) & (1 << 3))
		barrier();
}

/*
 * nothing to do
 */
#define arch_decomp_setup()
#define arch_decomp_wdog()


text:
require "rails_helper"

describe "/heartbeat", :type => :api do
  context "index" do
    let(:uri) { "http://#{ENV['HOSTNAME']}/heartbeat" }

    it "JSON" do
      get uri
      expect(last_response.status).to eq(200)

      response = JSON.parse(last_response.body)
      status = response["status"]
      expect(status).to eq(10)
    end
  end
end


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

namespace Aws
{
namespace Utils
{
namespace Xml
{
  class XmlNode;
} // namespace Xml
} // namespace Utils
namespace S3Control
{
namespace Model
{

  /**
   *
The virtual private cloud (VPC) configuration for an access
   * point.

See Also:
   AWS
   * API Reference

   */
  class AWS_S3CONTROL_API VpcConfiguration
  {
  public:
    VpcConfiguration();
    VpcConfiguration(const Aws::Utils::Xml::XmlNode& xmlNode);
    VpcConfiguration& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);

    void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;

    /**
     *
If this field is specified, this access point will only allow connections
     * from the specified VPC ID.

     */
    inline const Aws::String& GetVpcId() const{ return m_vpcId; }

    /**
     *
If this field is specified, this access point will only allow connections
     * from the specified VPC ID.

     */
    inline bool VpcIdHasBeenSet() const { return m_vpcIdHasBeenSet; }

    /**
     *
If this field is specified, this access point will only allow connections
     * from the specified VPC ID.

     */
    inline void SetVpcId(const Aws::String& value) { m_vpcIdHasBeenSet = true; m_vpcId = value; }

    /**
     *
If this field is specified, this access point will only allow connections
     * from the specified VPC ID.

     */
    inline void SetVpcId(Aws::String&& value) { m_vpcIdHasBeenSet = true; m_vpcId = std::move(value); }

    /**
     *
If this field is specified, this access point will only allow connections
     * from the specified VPC ID.

     */
    inline void SetVpcId(const char* value) { m_vpcIdHasBeenSet = true; m_vpcId.assign(value); }

    /**
     *
If this field is specified, this access point will only allow connections
     * from the specified VPC ID.

     */
    inline VpcConfiguration& WithVpcId(const Aws::String& value) { SetVpcId(value); return *this;}

    /**
     *
If this field is specified, this access point will only allow connections
     * from the specified VPC ID.

     */
    inline VpcConfiguration& WithVpcId(Aws::String&& value) { SetVpcId(std::move(value)); return *this;}

    /**
     *
If this field is specified, this access point will only allow connections
     * from the specified VPC ID.

     */
    inline VpcConfiguration& WithVpcId(const char* value) { SetVpcId(value); return *this;}

  private:

    Aws::String m_vpcId;
    bool m_vpcIdHasBeenSet = false;
  };

} // namespace Model
} // namespace S3Control
} // namespace Aws


text:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<METS:mets LABEL="Zeitschrift für Kranken-und Humanitätsanstalten, 4, 10.03.1911" TYPE="Periodical"
  xmlns:METS="http://www.loc.gov/METS/"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.loc.gov/METS/
    http://www.loc.gov/standards/mets/mets.xsd
    info:lc/xmlns/premis-v2
    http://www.loc.gov/standards/premis/v2/premis.xsd">
<METS:metsHdr CREATEDATE="2014-11-18T12:06:15Z" ID="ope301-00000v" >
<METS:agent ROLE="CREATOR" TYPE="ORGANIZATION">
<METS:name>OSA001</METS:name>
</METS:agent>
</METS:metsHdr>
<METS:amdSec ID="PageID_0073">
<METS:techMD ID="MIX_001">
<METS:mdWrap MDTYPE="NISOIMG" MIMETYPE="text/xml">
<METS:xmlData>
<mix:mix xmlns:mix="http://www.loc.gov/mix/v20">
	<mix:BasicDigitalObjectInformation>
		<mix:ObjectIdentifier>
			<mix:objectIdentifierType>filename</mix:objectIdentifierType>
			<mix:objectIdentifierValue>PS_ope301-00000v_0073.tif</mix:objectIdentifierValue>
		</mix:ObjectIdentifier>
		<mix:ObjectIdentifier>
			<mix:objectIdentifierType>MD5</mix:objectIdentifierType>
			<mix:objectIdentifierValue>65c767acf956edec2c57453654106880</mix:objectIdentifierValue>
		</mix:ObjectIdentifier>
		<mix:fileSize>28509692</mix:fileSize>
		<mix:FormatDesignation>
			<mix:formatName>image/tiff</mix:formatName>
			<mix:formatVersion>6.0</mix:formatVersion>
		</mix:FormatDesignation>
		<mix:byteOrder>little endian</mix:byteOrder>
		<mix:Compression>
			<mix:compressionScheme>uncompressed</mix:compressionScheme>
		</mix:Compression>
	</mix:BasicDigitalObjectInformation>
	<mix:BasicImageInformation>
		<mix:BasicImageCharacteristics>
			<mix:imageWidth>2678</mix:imageWidth>
			<mix:imageHeight>3545</mix:imageHeight>
			<mix:PhotometricInterpretation>
				<mix:colorSpace>RGB</mix:colorSpace>
				<mix:ColorProfile>
					<mix:IccProfile>
						<mix:iccProfileName>Adobe RGB (1998)</mix:iccProfileName>
						<mix:iccProfileVersion>2.1.0</mix:iccProfileVersion>
					</mix:IccProfile>
				</mix:ColorProfile>
			</mix:PhotometricInterpretation>
		</mix:BasicImageCharacteristics>
	</mix:BasicImageInformation>
	<mix:ImageCaptureMetadata>
		<mix:GeneralCaptureInformation>
			<mix:dateTimeCreated>2014-05-22T12:40:54Z</mix:dateTimeCreated>
			<mix:imageProducer>Exon s.r.o.</mix:imageProducer>
			<mix:captureDevice>digital still camera</mix:captureDevice>
		</mix:GeneralCaptureInformation>
		<mix:ScannerCapture>
			<mix:scannerManufacturer>i2S</mix:scannerManufacturer>
			<mix:ScannerModel>
				<mix:scannerModelName>i2S</mix:scannerModelName>
				<mix:scannerModelNumber>ONYX RGB</mix:scannerModelNumber>
				<mix:scannerModelSerialNo>321007</mix:scannerModelSerialNo>
			</mix:ScannerModel>
			<mix:MaximumOpticalResolution>
				<mix:xOpticalResolution>400</mix:xOpticalResolution>
				<mix:yOpticalResolution>400</mix:yOpticalResolution>
				<mix:opticalResolutionUnit>in.</mix:opticalResolutionUnit>
			</mix:MaximumOpticalResolution>
			<mix:scannerSensor>OneChipColourArea</mix:scannerSensor>
			<mix:ScanningSystemSoftware>
				<mix:scanningSoftwareName>CopiBook RGB+</mix:scanningSoftwareName>
				<mix:scanningSoftwareVersionNo>4.0.7</mix:scanningSoftwareVersionNo>
			</mix:ScanningSystemSoftware>
		</mix:ScannerCapture>
		<mix:orientation>normal*</mix:orientation>
	</mix:ImageCaptureMetadata>
	<mix:ImageAssessmentMetadata>
		<mix:SpatialMetrics>
			<mix:samplingFrequencyUnit>in.</mix:samplingFrequencyUnit>
			<mix:xSamplingFrequency>
				<mix:numerator>300</mix:numerator>
				<mix:denominator>1</mix:denominator>
			</mix:xSamplingFrequency>
			<mix:ySamplingFrequency>
				<mix:numerator>300</mix:numerator>
				<mix:denominator>1</mix:denominator>
			</mix:ySamplingFrequency>
		</mix:SpatialMetrics>
		<mix:ImageColorEncoding>
			<mix:BitsPerSample>
				<mix:bitsPerSampleValue>8</mix:bitsPerSampleValue>
				<mix:bitsPerSampleValue>8</mix:bitsPerSampleValue>
				<mix:bitsPerSampleValue>8</mix:bitsPerSampleValue>
			</mix:BitsPerSample>
			<mix:samplesPerPixel>3</mix:samplesPerPixel>
		</mix:ImageColorEncoding>
	</mix:ImageAssessmentMetadata>
</mix:mix>
</METS:xmlData>
</METS:mdWrap>
</METS:techMD>
<METS:techMD ID="MIX_002">
<METS:mdWrap MDTYPE="NISOIMG" MIMETYPE="text/xml">
<METS:xmlData>
<mix:mix xmlns:mix="http://www.loc.gov/mix/v20">
	<mix:BasicDigitalObjectInformation>
		<mix:ObjectIdentifier>
			<mix:objectIdentifierType>filename</mix:objectIdentifierType>
			<mix:objectIdentifierValue>MC_ope301-00000v_0073.jp2</mix:objectIdentifierValue>
		</mix:ObjectIdentifier>
		<mix:ObjectIdentifier>
			<mix:objectIdentifierType>MD5</mix:objectIdentifierType>
			<mix:objectIdentifierValue>217210476ea16d06cbd254a390ed1ffc</mix:objectIdentifierValue>
		</mix:ObjectIdentifier>
		<mix:fileSize>14109649</mix:fileSize>
		<mix:FormatDesignation>
			<mix:formatName>image/jp2</mix:formatName>
			<mix:formatVersion>1.0</mix:formatVersion>
		</mix:FormatDesignation>
		<mix:byteOrder>big endian</mix:byteOrder>
		<mix:Compression>
			<mix:compressionScheme>JPEG 2000</mix:compressionScheme>
		</mix:Compression>
	</mix:BasicDigitalObjectInformation>
	<mix:BasicImageInformation>
		<mix:BasicImageCharacteristics>
			<mix:imageWidth>2678</mix:imageWidth>
			<mix:imageHeight>3545</mix:imageHeight>
			<mix:PhotometricInterpretation>
				<mix:colorSpace>RGB</mix:colorSpace>
				<mix:ColorProfile>
					<mix:IccProfile>
						<mix:iccProfileName>IT8_7_2-1993.icm</mix:iccProfileName>
						<mix:iccProfileVersion>2</mix:iccProfileVersion>
					</mix:IccProfile>
				</mix:ColorProfile>
			</mix:PhotometricInterpretation>
		</mix:BasicImageCharacteristics>
		<mix:SpecialFormatCharacteristics>
			<mix:JPEG2000>
				<mix:CodecCompliance>
					<mix:codec>Kakadu</mix:codec>
					<mix:codecVersion>7.0</mix:codecVersion>
					<mix:codestreamProfile>P0</mix:codestreamProfile>
					<mix:complianceClass>C1</mix:complianceClass>
				</mix:CodecCompliance>
				<mix:EncodingOptions>
					<mix:Tiles>
						<mix:tileWidth>4096</mix:tileWidth>
						<mix:tileHeight>4096</mix:tileHeight>
					</mix:Tiles>
					<mix:qualityLayers>1</mix:qualityLayers>
					<mix:resolutionLevels>5</mix:resolutionLevels>
				</mix:EncodingOptions>
			</mix:JPEG2000>
		</mix:SpecialFormatCharacteristics>
	</mix:BasicImageInformation>
	<mix:ImageAssessmentMetadata>
		<mix:SpatialMetrics>
			<mix:samplingFrequencyUnit>in.</mix:samplingFrequencyUnit>
			<mix:xSamplingFrequency>
				<mix:numerator>300</mix:numerator>
				<mix:denominator>1</mix:denominator>
			</mix:xSamplingFrequency>
			<mix:ySamplingFrequency>
				<mix:numerator>300</mix:numerator>
				<mix:denominator>1</mix:denominator>
			</mix:ySamplingFrequency>
		</mix:SpatialMetrics>
		<mix:ImageColorEncoding>
			<mix:BitsPerSample>
				<mix:bitsPerSampleValue>8</mix:bitsPerSampleValue>
				<mix:bitsPerSampleValue>8</mix:bitsPerSampleValue>
				<mix:bitsPerSampleValue>8</mix:bitsPerSampleValue>
			</mix:BitsPerSample>
			<mix:samplesPerPixel>3</mix:samplesPerPixel>
		</mix:ImageColorEncoding>
	</mix:ImageAssessmentMetadata>
	<mix:ChangeHistory>
		<mix:ImageProcessing>
			<mix:dateTimeProcessed>2014-07-02T13:59:28</mix:dateTimeProcessed>
			<mix:sourceData>PS_ope301-00000v_0073.tif</mix:sourceData>
		</mix:ImageProcessing>
	</mix:ChangeHistory>
</mix:mix>
</METS:xmlData>
</METS:mdWrap>
</METS:techMD>
<METS:techMD ID="OBJ_001">
<METS:mdWrap MDTYPE="PREMIS" MIMETYPE="text/xml">
<METS:xmlData>
<premis:object xsi:type="premis:file" xmlns:premis="info:lc/xmlns/premis-v2">
	<premis:objectIdentifier>
		<premis:objectIdentifierType>ObjectID</premis:objectIdentifierType>
		<premis:objectIdentifierValue>Object_3641</premis:objectIdentifierValue>
	</premis:objectIdentifier>
	<premis:preservationLevel>
		<premis:preservationLevelValue>deleted</premis:preservationLevelValue>
		<premis:preservationLevelDateAssigned>2014-11-18T11:44:49</premis:preservationLevelDateAssigned>
	</premis:preservationLevel>
	<premis:objectCharacteristics>
		<premis:compositionLevel>0</premis:compositionLevel>
		<premis:fixity>
			<premis:messageDigestAlgorithm>CRC32</premis:messageDigestAlgorithm>
			<premis:messageDigest>305d4270</premis:messageDigest>
			<premis:messageDigestOriginator>JHOVE</premis:messageDigestOriginator>
		</premis:fixity>
		<premis:fixity>
			<premis:messageDigestAlgorithm>SHA-1</premis:messageDigestAlgorithm>
			<premis:messageDigest>33eb33d6d50f2c72f63fab29c3053cc7dd82e9dd</premis:messageDigest>
			<premis:messageDigestOriginator>JHOVE</premis:messageDigestOriginator>
		</premis:fixity>
		<premis:fixity>
			<premis:messageDigestAlgorithm>MD5</premis:messageDigestAlgorithm>
			<premis:messageDigest>65c767acf956edec2c57453654106880</premis:messageDigest>
			<premis:messageDigestOriginator>JHOVE</premis:messageDigestOriginator>
		</premis:fixity>
		<premis:size>28509692</premis:size>
		<premis:format>
			<premis:formatDesignation>
				<premis:formatName>image/tiff</premis:formatName>
				<premis:formatVersion>6.0</premis:formatVersion>
			</premis:formatDesignation>
			<premis:formatRegistry>
				<premis:formatRegistryName>PRONOM</premis:formatRegistryName>
				<premis:formatRegistryKey>fmt/10</premis:formatRegistryKey>
			</premis:formatRegistry>
		</premis:format>
		<premis:creatingApplication>
			<premis:creatingApplicationName>CopiBook RGB+</premis:creatingApplicationName>
			<premis:creatingApplicationVersion>4.0.7</premis:creatingApplicationVersion>
			<premis:dateCreatedByApplication>2014-05-22T12:40:54Z</premis:dateCreatedByApplication>
		</premis:creatingApplication>
	</premis:objectCharacteristics>
	<premis:originalName>PS_ope301-00000v_0073.tif</premis:originalName>
	<premis:linkingEventIdentifier>
		<premis:linkingEventIdentifierType>EventID</premis:linkingEventIdentifierType>
		<premis:linkingEventIdentifierValue>Event_0551</premis:linkingEventIdentifierValue>
	</premis:linkingEventIdentifier>
</premis:object>
</METS:xmlData>
</METS:mdWrap>
</METS:techMD>
<METS:techMD ID="OBJ_003">
<METS:mdWrap MDTYPE="PREMIS" MIMETYPE="text/xml">
<METS:xmlData>
<premis:object xsi:type="premis:file" xmlns:premis="info:lc/xmlns/premis-v2">
	<premis:objectIdentifier>
		<premis:objectIdentifierType>ObjectID</premis:objectIdentifierType>
		<premis:objectIdentifierValue>Object_3163</premis:objectIdentifierValue>
	</premis:objectIdentifier>
	<premis:preservationLevel>
		<premis:preservationLevelValue>preservation</premis:preservationLevelValue>
		<premis:preservationLevelDateAssigned>2014-11-18T11:29:43</premis:preservationLevelDateAssigned>
	</premis:preservationLevel>
	<premis:objectCharacteristics>
		<premis:compositionLevel>0</premis:compositionLevel>
		<premis:fixity>
			<premis:messageDigestAlgorithm>CRC32</premis:messageDigestAlgorithm>
			<premis:messageDigest>cf220c58</premis:messageDigest>
			<premis:messageDigestOriginator>JHOVE</premis:messageDigestOriginator>
		</premis:fixity>
		<premis:fixity>
			<premis:messageDigestAlgorithm>SHA-1</premis:messageDigestAlgorithm>
			<premis:messageDigest>45d36bcb84fe81ac2e289f7b527b4ebab771b9e0</premis:messageDigest>
			<premis:messageDigestOriginator>JHOVE</premis:messageDigestOriginator>
		</premis:fixity>
		<premis:fixity>
			<premis:messageDigestAlgorithm>MD5</premis:messageDigestAlgorithm>
			<premis:messageDigest>18685f82c3ff4bcf4d918c59319c5bb9</premis:messageDigest>
			<premis:messageDigestOriginator>JHOVE</premis:messageDigestOriginator>
		</premis:fixity>
		<premis:size>241298</premis:size>
		<premis:format>
			<premis:formatDesignation>
				<premis:formatName>text/xml</premis:formatName>
				<premis:formatVersion>1.0</premis:formatVersion>
			</premis:formatDesignation>
			<premis:formatRegistry>
				<premis:formatRegistryName>PRONOM</premis:formatRegistryName>
				<premis:formatRegistryKey>fmt/101</premis:formatRegistryKey>
			</premis:formatRegistry>
		</premis:format>
		<premis:creatingApplication>
			<premis:creatingApplicationName>Recognition Server</premis:creatingApplicationName>
			<premis:creatingApplicationVersion>4.0</premis:creatingApplicationVersion>
			<premis:dateCreatedByApplication>2014-11-18T11:22:47Z</premis:dateCreatedByApplication>
		</premis:creatingApplication>
	</premis:objectCharacteristics>
	<premis:originalName>ALTO_ope301-00000v_0073.xml</premis:originalName>
	<premis:relationship>
		<premis:relationshipType>derivation</premis:relationshipType>
		<premis:relationshipSubType>created from</premis:relationshipSubType>
		<premis:relatedObjectIdentification>
			<premis:relatedObjectIdentifierType>temporary filepath</premis:relatedObjectIdentifierType>
			<premis:relatedObjectIdentifierValue>D:\EXON-VISK 7\MVK_projekty\cnb002200033-001\PS_ope301-00000v_0073.TIF</premis:relatedObjectIdentifierValue>
		</premis:relatedObjectIdentification>
		<premis:relatedEventIdentification>
			<premis:relatedEventIdentifierType>EventID</premis:relatedEventIdentifierType>
			<premis:relatedEventIdentifierValue>Event_0073</premis:relatedEventIdentifierValue>
			<premis:relatedEventSequence>0073</premis:relatedEventSequence>
		</premis:relatedEventIdentification>
	</premis:relationship>
</premis:object>
</METS:xmlData>
</METS:mdWrap>
</METS:techMD>
<METS:techMD ID="OBJ_002">
<METS:mdWrap MDTYPE="PREMIS" MIMETYPE="text/xml">
<METS:xmlData>
<premis:object xsi:type="premis:file" xmlns:premis="info:lc/xmlns/premis-v2">
	<premis:objectIdentifier>
		<premis:objectIdentifierType>ObjectID</premis:objectIdentifierType>
		<premis:objectIdentifierValue>Object_3642</premis:objectIdentifierValue>
	</premis:objectIdentifier>
	<premis:preservationLevel>
		<premis:preservationLevelValue>preservation</premis:preservationLevelValue>
		<premis:preservationLevelDateAssigned>2014-11-18T11:44:50</premis:preservationLevelDateAssigned>
	</premis:preservationLevel>
	<premis:objectCharacteristics>
		<premis:compositionLevel>0</premis:compositionLevel>
		<premis:fixity>
			<premis:messageDigestAlgorithm>CRC32</premis:messageDigestAlgorithm>
			<premis:messageDigest>c3c747d2</premis:messageDigest>
			<premis:messageDigestOriginator>JHOVE</premis:messageDigestOriginator>
		</premis:fixity>
		<premis:fixity>
			<premis:messageDigestAlgorithm>SHA-1</premis:messageDigestAlgorithm>
			<premis:messageDigest>8e7ef3fee7aa6ae64319f9ce38ff944d44746241</premis:messageDigest>
			<premis:messageDigestOriginator>JHOVE</premis:messageDigestOriginator>
		</premis:fixity>
		<premis:fixity>
			<premis:messageDigestAlgorithm>MD5</premis:messageDigestAlgorithm>
			<premis:messageDigest>217210476ea16d06cbd254a390ed1ffc</premis:messageDigest>
			<premis:messageDigestOriginator>JHOVE</premis:messageDigestOriginator>
		</premis:fixity>
		<premis:size>14109649</premis:size>
		<premis:format>
			<premis:formatDesignation>
				<premis:formatName>image/jp2</premis:formatName>
				<premis:formatVersion>1.0</premis:formatVersion>
			</premis:formatDesignation>
			<premis:formatRegistry>
				<premis:formatRegistryName>PRONOM</premis:formatRegistryName>
				<premis:formatRegistryKey>x-fmt/392</premis:formatRegistryKey>
			</premis:formatRegistry>
		</premis:format>
		<premis:creatingApplication>
			<premis:creatingApplicationName>Kakadu</premis:creatingApplicationName>
			<premis:creatingApplicationVersion>7.0</premis:creatingApplicationVersion>
			<premis:dateCreatedByApplication>2014-06-23T12:01:35Z</premis:dateCreatedByApplication>
		</premis:creatingApplication>
	</premis:objectCharacteristics>
	<premis:originalName>MC_ope301-00000v_0073.jp2</premis:originalName>
	<premis:relationship>
		<premis:relationshipType>derivation</premis:relationshipType>
		<premis:relationshipSubType>created from</premis:relationshipSubType>
		<premis:relatedObjectIdentification>
			<premis:relatedObjectIdentifierType>temporary filepath</premis:relatedObjectIdentifierType>
			<premis:relatedObjectIdentifierValue>D:\EXON-VISK 7\MVK_projekty\cnb002200033-001\PS_ope301-00000v_0073.TIF</premis:relatedObjectIdentifierValue>
		</premis:relatedObjectIdentification>
		<premis:relatedEventIdentification>
			<premis:relatedEventIdentifierType>EventID</premis:relatedEventIdentifierType>
			<premis:relatedEventIdentifierValue>Event_0552</premis:relatedEventIdentifierValue>
			<premis:relatedEventSequence>0552</premis:relatedEventSequence>
		</premis:relatedEventIdentification>
	</premis:relationship>
</premis:object>
</METS:xmlData>
</METS:mdWrap>
</METS:techMD>
<METS:digiprovMD ID="EVT_001">
<METS:mdWrap MDTYPE="PREMIS" MIMETYPE="text/xml">
<METS:xmlData>
<premis:event xmlns:premis="info:lc/xmlns/premis-v2">
	<premis:eventIdentifier>
		<premis:eventIdentifierType>EventId</premis:eventIdentifierType>
		<premis:eventIdentifierValue>Event_0073</premis:eventIdentifierValue>
	</premis:eventIdentifier>
	<premis:eventType>capture</premis:eventType>
	<premis:eventDateTime>2014-11-18T11:22:47Z</premis:eventDateTime>
	<premis:eventDetail>capture/XML_creation</premis:eventDetail>
	<premis:eventOutcomeInformation>
		<premis:eventOutcome>successful</premis:eventOutcome>
	</premis:eventOutcomeInformation>
	<premis:linkingAgentIdentifier>
		<premis:linkingAgentIdentifierType>AgentId</premis:linkingAgentIdentifierType>
		<premis:linkingAgentIdentifierValue>agent_OCR</premis:linkingAgentIdentifierValue>
	</premis:linkingAgentIdentifier>
	<premis:linkingObjectIdentifier>
		<premis:linkingObjectIdentifierType>FILE_ID</premis:linkingObjectIdentifierType>
		<premis:linkingObjectIdentifierValue>ALTO_ope301-00000v_0073.xml</premis:linkingObjectIdentifierValue>
	</premis:linkingObjectIdentifier>
</premis:event>
</METS:xmlData>
</METS:mdWrap>
</METS:digiprovMD>
<METS:digiprovMD ID="EVT_002">
<METS:mdWrap MDTYPE="PREMIS" MIMETYPE="text/xml">
<METS:xmlData>
<premis:event xmlns:premis="info:lc/xmlns/premis-v2">
	<premis:eventIdentifier>
		<premis:eventIdentifierType>EventId</premis:eventIdentifierType>
		<premis:eventIdentifierValue>Event_0552</premis:eventIdentifierValue>
	</premis:eventIdentifier>
	<premis:eventType>migration</premis:eventType>
	<premis:eventDateTime>2014-06-23T12:01:35Z</premis:eventDateTime>
	<premis:eventDetail>migration/MC_creation</premis:eventDetail>
	<premis:eventOutcomeInformation>
		<premis:eventOutcome>successful</premis:eventOutcome>
	</premis:eventOutcomeInformation>
	<premis:linkingAgentIdentifier>
		<premis:linkingAgentIdentifierType>AgentId</premis:linkingAgentIdentifierType>
		<premis:linkingAgentIdentifierValue>agent_Convertor</premis:linkingAgentIdentifierValue>
	</premis:linkingAgentIdentifier>
	<premis:linkingObjectIdentifier>
		<premis:linkingObjectIdentifierType>FILE_ID</premis:linkingObjectIdentifierType>
		<premis:linkingObjectIdentifierValue>MC_ope301-00000v_0073.jp2</premis:linkingObjectIdentifierValue>
	</premis:linkingObjectIdentifier>
</premis:event>
</METS:xmlData>
</METS:mdWrap>
</METS:digiprovMD>
<METS:digiprovMD ID="EVT_003">
<METS:mdWrap MDTYPE="PREMIS" MIMETYPE="text/xml">
<METS:xmlData>
<premis:event xmlns:premis="info:lc/xmlns/premis-v2">
	<premis:eventIdentifier>
		<premis:eventIdentifierType>EventId</premis:eventIdentifierType>
		<premis:eventIdentifierValue>Event_0551</premis:eventIdentifierValue>
	</premis:eventIdentifier>
	<premis:eventType>capture</premis:eventType>
	<premis:eventDateTime>2014-05-22T12:40:54Z</premis:eventDateTime>
	<premis:eventDetail>capture_digitization</premis:eventDetail>
	<premis:eventOutcomeInformation>
		<premis:eventOutcome>successful</premis:eventOutcome>
	</premis:eventOutcomeInformation>
	<premis:linkingAgentIdentifier>
		<premis:linkingAgentIdentifierType>AgentId</premis:linkingAgentIdentifierType>
		<premis:linkingAgentIdentifierValue>agent_Scanner</premis:linkingAgentIdentifierValue>
	</premis:linkingAgentIdentifier>
	<premis:linkingObjectIdentifier>
		<premis:linkingObjectIdentifierType>FILE_ID</premis:linkingObjectIdentifierType>
		<premis:linkingObjectIdentifierValue>PS_ope301-00000v_0073.tif</premis:linkingObjectIdentifierValue>
	</premis:linkingObjectIdentifier>
</premis:event>
</METS:xmlData>
</METS:mdWrap>
</METS:digiprovMD>
<METS:digiprovMD ID="AGENT_001">
<METS:mdWrap MDTYPE="PREMIS" MIMETYPE="text/xml">
<METS:xmlData>
<premis:agent xmlns:premis="info:lc/xmlns/premis-v2">
	<premis:agentIdentifier>
		<premis:agentIdentifierType>AgentID</premis:agentIdentifierType>
		<premis:agentIdentifierValue>agent_Scanner</premis:agentIdentifierValue>
	</premis:agentIdentifier>
	<premis:agentName>i2S</premis:agentName>
	<premis:agentType>software</premis:agentType>
</premis:agent>
</METS:xmlData>
</METS:mdWrap>
</METS:digiprovMD>
<METS:digiprovMD ID="AGENT_002">
<METS:mdWrap MDTYPE="PREMIS" MIMETYPE="text/xml">
<METS:xmlData>
<premis:agent xmlns:premis="info:lc/xmlns/premis-v2">
	<premis:agentIdentifier>
		<premis:agentIdentifierType>AgentID</premis:agentIdentifierType>
		<premis:agentIdentifierValue>agent_OCR</premis:agentIdentifierValue>
	</premis:agentIdentifier>
	<premis:agentName>Recognition Server v4.0</premis:agentName>
	<premis:agentType>software</premis:agentType>
</premis:agent>
</METS:xmlData>
</METS:mdWrap>
</METS:digiprovMD>
<METS:digiprovMD ID="AGENT_003">
<METS:mdWrap MDTYPE="PREMIS" MIMETYPE="text/xml">
<METS:xmlData>
<premis:agent xmlns:premis="info:lc/xmlns/premis-v2">
	<premis:agentIdentifier>
		<premis:agentIdentifierType>AgentID</premis:agentIdentifierType>
		<premis:agentIdentifierValue>agent_Convertor</premis:agentIdentifierValue>
	</premis:agentIdentifier>
	<premis:agentName>Kakadu v7.0</premis:agentName>
	<premis:agentType>software</premis:agentType>
	<premis:agentNote>kdu_compress -i "PS_ope301-00000v_0073.tif" -o "MC_ope301-00000v_0073.jp2" "Cblk={64,64}" Corder=RPCL "Stiles={4096,4096}" "Cprecincts={256,256},{256,256},{128,128}" ORGtparts=R Creversible=yes Clayers=1 Clevels=5 "Cmodes={BYPASS}" -double_buffering 60 Cuse_sop=yes Cuse_eph=yes</premis:agentNote>
</premis:agent>
</METS:xmlData>
</METS:mdWrap>
</METS:digiprovMD>
</METS:amdSec>
<METS:fileSec>
<METS:fileGrp ID="MC_IMGGRP" USE="Images" >
<METS:file SEQ="0073" CREATED="2014-07-02T13:59:28Z" ID="JP210073" MIMETYPE="image/jp2" CHECKSUM="217210476ea16d06cbd254a390ed1ffc" CHECKSUMTYPE="MD5" SIZE="14109649">
<METS:FLocat LOCTYPE="URL" xlink:href="./masterCopy/MC_ope301-00000v_0073.jp2" />
</METS:file>
</METS:fileGrp>
<METS:fileGrp ID="UC_IMGGRP" USE="Images" >
<METS:file SEQ="0073" CREATED="2014-07-02T14:07:40Z" ID="JP220073" MIMETYPE="image/jp2" CHECKSUM="7f6edac4f253a50efeb02822f827f6d8" CHECKSUMTYPE="MD5" SIZE="1424782">
<METS:FLocat LOCTYPE="URL" xlink:href="./userCopy/UC_ope301-00000v_0073.jp2" />
</METS:file>
</METS:fileGrp>
<METS:fileGrp ID="TXTGRP" USE="Text" >
<METS:file SEQ="0073" CREATED="2014-07-02T14:07:35Z" ID="TXT30073" MIMETYPE="text/plain" CHECKSUM="69ac6ad3e084065637a0594de7349894" CHECKSUMTYPE="MD5" SIZE="8510">
<METS:FLocat LOCTYPE="URL" xlink:href="./TXT/TXT_ope301-00000v_0073.txt" />
</METS:file>
</METS:fileGrp>
<METS:fileGrp ID="ALTOGRP" USE="Layout" >
<METS:file SEQ="0073" CREATED="2014-07-02T13:58:53Z" ID="XML40073" MIMETYPE="text/xml" CHECKSUM="18685f82c3ff4bcf4d918c59319c5bb9" CHECKSUMTYPE="MD5" SIZE="241298">
<METS:FLocat LOCTYPE="URL" xlink:href="./ALTO/ALTO_ope301-00000v_0073.xml" />
</METS:file>
</METS:fileGrp>
</METS:fileSec>
<METS:structMap LABEL="Physical_Structure" TYPE="PHYSICAL">
<METS:div TYPE="PERIODICAL_PAGE">
<METS:fptr FILEID="JP210073" />
<METS:fptr FILEID="JP220073" />
<METS:fptr FILEID="TXT30073" />
<METS:fptr FILEID="XML40073" />
</METS:div>
</METS:structMap>
</METS:mets>


text:
using Elasticsearch.Net;
using FluentAssertions;
using Nest.Tests.MockData.Domain;
using NUnit.Framework;

namespace Nest.Tests.Unit.QueryParsers.Queries
{
	[TestFixture]
	public class WildCardQueryTests : ParseQueryTestsBase
	{
		[Test]
		public void WildCard_Deserializes()
		{
			var q = this.SerializeThenDeserialize(
				f => f.Wildcard,
				f => f.Wildcard(wq => wq
					.Boost(1.1)
					.Rewrite(RewriteMultiTerm.ConstantScoreBoolean)
					.OnField(p => p.Name)
					.Value("wild*")
					)
				);
			q.Boost.Should().Be(1.1);
			q.Field.Should().Be("name");
			q.Value.Should().Be("wild*");
			q.Rewrite.Should().Be(RewriteMultiTerm.ConstantScoreBoolean);
		}

		[Test]
		public void InitializerTests()
		{
			QueryContainer wildcardQuery = new WildcardQuery
			{
				Field = "my_prefix_field",
				Value = "value",
				Rewrite = RewriteMultiTerm.ConstantScoreBoolean
			};
			var searchRequest = new SearchRequest()
			{
				Query = wildcardQuery
			};

			var search = this._client.Search<ElasticsearchProject>(searchRequest);

			var request = search.RequestInformation.Request.Utf8String();
			request.Should().Contain("my_prefix_field");
			Assert.Pass(request);
		}

		[Test]
		public void InitializerTypedTests()
		{
			QueryContainer boolQuery =
				new WildcardQuery<ElasticsearchProject>(p => p.Name)
				{
					Value = "value",
					Rewrite = RewriteMultiTerm.ConstantScoreBoolean
				}
				&& new WildcardQuery
				{
					Field = "my_other_prefix_field",
					Value = "value"
				};
			var searchRequest = new SearchRequest()
			{
				Query = boolQuery
			};

			var search = this._client.Search<ElasticsearchProject>(searchRequest);

			var request = search.RequestInformation.Request.Utf8String();
			request.Should().Contain("name");
			request.Should().Contain("my_other_prefix_field");
			Assert.Pass(request);
		}
	}
}


text:
package jp.co.cyberagent.typebook

import org.scalatest.Tag

object SlowTest extends Tag("typebook.SlowTest")
object UnitTest extends Tag("typebook.UnitTest")
object IntegrationTest extends Tag("typebook.IntegrationTest")
object End2EndTest extends Tag("typebook.End2EndTest")
object MemoryIntensiveTest extends Tag("typebook.MemoryIntensiveTest")
object DockerExecTest extends Tag("typebook.DockerExecTest")
object DockerV11Test extends Tag("typebook.DockerV11Test")
object InDevelopmentTest extends Tag("typebook.InDevelopmentTest")


text:
DROP TABLE IF EXISTS `lh_chat_config`;
CREATE TABLE `lh_chat_config` (
  `identifier` varchar(50) NOT NULL,
  `value` text NOT NULL,
  `type` tinyint(1) NOT NULL DEFAULT '0',
  `explain` varchar(250) NOT NULL,
  `hidden` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`identifier`)
);

INSERT INTO `lh_chat_config` (`identifier`, `value`, `type`, `explain`, `hidden`) VALUES
('tracked_users_cleanup',	'7',	0,	'How many days keep records of online users.',	0),
('track_online_visitors',	'0',	0,	'Enable online site visitors tracking, 0 - no, 1 - yes',	0);

DROP TABLE IF EXISTS `lh_chat_online_user`;
CREATE TABLE `lh_chat_online_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vid` varchar(50) NOT NULL,
  `ip` varchar(50) NOT NULL,
  `current_page` varchar(250) NOT NULL,
  `chat_id` int(11) NOT NULL,
  `last_visit` int(11) NOT NULL,
  `user_agent` varchar(250) NOT NULL,
  `user_location` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `last_visit` (`last_visit`),
  KEY `vid` (`vid`)
);


text:
@implementation TSUserStream

- (id)initWithAccount:(ACAccount*)account
          andDelegate:(id<TSStreamDelegate>)delegate
        andAllReplies:(BOOL)allReplies
     andAllFollowings:(BOOL)allFollowing {
    NSMutableDictionary* parameters = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                       allFollowing ? @"followings" : @"user", @"with",
                                       nil];
    if (allReplies)
        [parameters setObject:@"all" forKey:@"replies"];

    return [super initWithEndpoint:@"https://userstream.twitter.com/2/user.json"
                     andParameters:parameters
                        andAccount:account
                       andDelegate:delegate];
}

@end


text:
class ADXL345 : public Sensor
{
  public:
    ADXL345();

    void Update();
    Matrix getAngularPosition();
    Matrix getLinearAcceleration();

    void init(char xoff=0, char yoff=0, char zoff=0);

    // IO
    void writeTo(byte address, byte val);
    void readFrom(byte address, int num, byte _buff[]);

    // Calibration
    void printCalibrationValues(int samples);
    void setSoftwareOffset(double x, double y, double z);

    // DEBUG
    void printAllRegister();
    void print_byte(byte val);

  private:
    byte _buff[6];
    double _xoffset, _yoffset, _zoffset;

    Matrix data_ang_position(1,3);
    Matrix data_lin_acceleration(1, 3);

};

#endif


text:
<?php

/**
 * Concurrency Conflict exception
 *
 * @package     Tinebase
 * @subpackage  Timemachine
 */
class Tinebase_Timemachine_Exception_ConcurrencyConflict extends Exception {
    protected $code = 409;
}


text:
<!DOCTYPE html>

  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>Javascriptを有効にしてね</title>
  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
  <link rel="stylesheet" href="./bower_components/bootstrap/dist/css/bootstrap.css" />
  <link rel="stylesheet" type="text/css" href="./css/index.css" media="all" />

   <button type="button" id="userDataLoad" class="btn btn-default" disabled="disabled">Load</button>
   Save
   <button type="button" id="userDataDelete" class="btn btn-danger" disabled="disabled">Data Delete</button>
   <button class="btn btn-default" type="button" data-target="#helpModal" data-toggle="modal">help</button>

ユーザーに関するデータは通常ブラウザに保存されます
他のPCやブラウザとデータを一緒に使いたい場合にお使いください

      <button class="close" type="button" data-dismiss="modal" aria-hidden="true">×</button>

File Load

        <button class="btn btn-default" type="button">Reload</button>
        <button type="button" class="btn btn-default mystatus">Show</button>

Hello (Hello.dip.jp)

 <input type="checkbox" />Hello

 <input type="checkbox" />Hello

 <input type="checkbox" />Hello

 <input type="checkbox" />Hello

 <input type="checkbox" />Hello

        <button class="btn btn-default" type="button">Reload</button>
        <button type="button" class="btn btn-default mystatus">Show</button>

Hello (Hello.dip.jp)

 <input type="checkbox" />Hello

 <input type="checkbox" />Hello

 <input type="checkbox" />Hello

 <input type="checkbox" />Hello

 <input type="checkbox" />Hello

      <button class="btn-primary btn" data-dismiss="modal" type="button">Load Data</button>
      <button class="btn-default btn" data-dismiss="modal" type="button">Close</button>

      <button class="close" type="button" data-dismiss="modal" aria-hidden="true">×</button>

Help

      簡単に操作説明をさせていただきます.

問題設定画面について

         まず,お手元の問題データを"ここにファイルをドロップして..."と表示している場所にドロップしてください.そうすると問題数の入力欄の下に問題データ名とチェックボックスが表示されます.
         チェックボックスをonにするとその問題データから問題が出題されます.
         出題する問題データを選択したら上の問題数の入力欄に出題させる問題数を入力してください.
         その時,出題させる問題データのデータ数の合計を超えないようにしてください.
         問題データのデータ数は問題名の隣に(N問)という形で書かれています.
         設定を終えたらSTARTと書かれたボタンをクリックしてください.

問題画面

         STARTボタンを押すと、問題と解答用の入力欄が表示されます.入力欄に解答を入力し,Enterキーを押して次へ進めます.指定した問題数繰り返して解答を入力しEnterキーを押してください.
         最後の問題でEnterキーを押すと,結果画面が表示されます.

結果画面

         結果画面では,もし1問以上間違えたら,間違えた問題を表にして表示します.
         表は,右から問題データ名,問題データ番号,問題,正解,あなたの解答を表示します.
         もし1問も間違えなければ,"Perfect"と表示します.
         OKボタンを押して問題設定画面へ戻ってください.

保存するデータについて

ごめんなさい実装していません

      <button class="btn-default btn" data-dismiss="modal" type="button">Close</button>

    <form class="form-horizontal" action="#">

      問題数

       <input id="questionNumber" class="form-control" type="number" placeholder="10" min="1" />

     <fieldset class="forDebug">
      <legend>QuestionDataSample <button class="btn btn-default">Dummy</button></legend>

         <input type="checkbox" checked="checked"/>
         この問題を追加する

        出題範囲

         <select id="RangeType" class="form-control">
          <option disabled>過去に間違えた問題全て</option>
          <option value="selectRange" disabled>範囲選択</option>
          <option value="all" selected>全ての範囲</option>
         </select>

       <fieldset disabled="disabled">

         <button type="button" class="btn btn-default">Add</button>

         範囲

           <input class="form-control" type="number" />
           -
           <input class="form-control" type="number" />

         <button class="btn btn-danger" type="button">
          Delete
         </button>

       </fieldset>

     </fieldset>
     <button id="testStart" class="btn btn-primary" type="button">START</button>

    </form>

      問題読込
      <button type="button" class="btn btn-default mystatus">show</button>
      <button class="btn btn-default" disabled="disabled" type="button" data-target="#fileLoadFromServerModal" data-toggle="modal">サーバーから読み込む</button>

ここにファイルをドロップして各種データを読み込んで下さい

      File Name

        50% Complete

     問題

    <form action="#" class="form-inline row">

      解答

<input type="text" class="form-control" spellcheck="false" />

    </form>

       Please wait...

      5/10

     Perfect.

       問題データID
       番号
       問題文
       解答
       正解

       QuestionTestData
       0
       What is this?
       pen
       bucket

    <button class="btn btn-primary">OK</button>


text:
<?php

declare(strict_types=1);

namespace Sonata\DoctrineORMAdminBundle\Tests\Filter;

use Sonata\AdminBundle\Filter\Model\FilterData;
use Sonata\DoctrineORMAdminBundle\Datagrid\ProxyQuery;
use Sonata\DoctrineORMAdminBundle\Filter\DateTimeRangeFilter;
use Sonata\Form\Type\DateTimeRangeType;

/**
 * @author Marko Kunic <kunicmarko20@gmail.com>
 */
final class DateTimeRangeFilterTest extends FilterTestCase
{
    public function testEmpty(): void
    {
        $filter = new DateTimeRangeFilter();
        $filter->initialize('field_name', ['field_options' => ['class' => 'FooBar']]);

        $proxyQuery = new ProxyQuery($this->createQueryBuilderStub());

        $filter->filter($proxyQuery, 'alias', 'field', FilterData::fromArray([]));

        self::assertSameQuery([], $proxyQuery);
        static::assertFalse($filter->isActive());
    }

    public function testGetType(): void
    {
        $filter = new DateTimeRangeFilter();
        $filter->initialize('foo');

        static::assertSame(DateTimeRangeType::class, $filter->getFieldType());
    }
}


text:
var Bvalidator = require("./bvalidator");
var Validator = require("./validator");
var eventing = require('../../eventing/eventing');
var rss = require('rss');

//FIXME this needs redone with promises
//var Q = require('q');
var async = require('async');

module.exports = function(models, io, logger) {
	var me = this;

	var services = {
		alertService: me
	};

	var bvalidator = new Bvalidator(services, logger);

	/**
	 * Returns a list of all alerts
	 */
	me.list = function(params, callback) {
		//FIXME this needs done in the route
		if (params !== null) {
			var sortObject = {};
			sortObject[params.sortKey] = params.sort;

			var config = {
				createdDate: {
					$gte: params.start,
					$lte: params.end
				}
			};

			models.alert.find(config)
			.skip(params.offset)
			.sort(sortObject)
			.limit(params.count)
			.exec(function(err, res) {
				callback(err, res, config);
			});
		} else {
			models.alert.find({}, function(err, res) {
				callback(err, res, {});
			});
		}
	};

	me.getTags = function(callback) {
		var o = {
			map : function () {
				if (!this.tags) { return; }

				/* global emit */  // TODO: not certain why JSHint cannot see emit
				for (var index in this.tags) {
					if (index >= 0) {
						emit( this.tags[index], 1);
					}
				}
			},

			reduce: function(k, vals) {
				var count = 0;
				for (var index in vals){
					if (index >= 0) {
						count += vals[index];
					}
				}

				return count;
			},
		};

		models.alert.mapReduce(o, callback);
	};

	/**
	 * Returns a list of indexed attributes for alert_
	 */
	me.getIndexes = function(callback) {
		var keys = Object.keys(models.alert.schema.paths);
		var indexes = ["_id"];
		for (var i = 0; i < keys.length; i++) {
			if (models.alert.schema.paths[keys[i]]._index) {
				indexes.push(keys[i].toString());
			}
		}

		callback(indexes);
	};

	/**
	 *	Returns a sorted list containing _id and createdDate for all alert
	 */
	me.findDates = function(callback) {
		models.alert.find({}, {_id: 0, createdDate:1}, function(err, dates) {
			var errorMsg = new Error("Could not get alert Dates: " + err);
			if (err) {
				callback(errorMsg);
			} else {
				async.map(dates, me.flattenArray, function(err, results) {
					if (err) {
						callback(errorMsg);
					} else {
						callback(results);
					}
				});
			}
		});
	};

	/**
	 * Returns the Date version of the parameter string.createdDate
	 */
	me.flattenArray = function(string, callback) {
		callback(null, Date.parse(string.createdDate));
	};

	/**
	 * Returns the number of alerts that fit the specified config
	 */
	me.getTotalCount = function(config, callback) {
		models.alert.count(config, callback);
	};

	/**
	 * Returns only the fields specified in field_string for each alert
	 */
	me.listFields = function(params, field_string, callback) {
		models.alert.find(params, field_string, callback);
	};

	/**
	 * create is a "generic" save method callable from both
	 * request-response methods and parser-type methods for population of alert data
	 *
	 * create calls the validateAlert module to ensure that the
	 * alert data being saved to the database is complete and has integrity.
	 *
	 * saveCallback takes the form function(err, valid object, alert object)
	 */
	me.create = function(data, saveCallback) {
		me.validateAlert(data, function(valid) {
			if (valid.valid) {
				logger.info("Valid Alert");

				var newAlert = new models.alert(data);
				newAlert.save(function(err) {
					if (err) {
						logger.error("Error saving Alert", err);
					} else {
						eventing.fire('alert-saved', newAlert);
					}

					saveCallback(err, valid, newAlert);
				});
			} else {
				saveCallback(undefined, valid, data);
			}
		});
	};

	/**
	 * validateAlert validates a alert object against the Alert
	 * semantic rules and the business rules associated with a alert
	 *
	 * validateAlert calls the JSON validation module revalidator and
	 * calls the business validation module bvalidator for the alert object

	 * data is the alert object being validated
	 *
	 * valCallback takes the form of function(valid structure)
	 */
	me.validateAlert = function(data, valCallback) {
		// is the JSON semantically valid for the alert object?
		Validator.validate(data)
		.then(function(valid) {
			if (valid.valid) {
				// does the Alert object comply with business validation logic
				bvalidator.validate(data, function(valid) {
					valCallback(valid);
				});
			} else {
				valCallback(valid);
			}
		});

	};

	/**
	 *	Returns the alert_ object with the specified id
	 */
	me.get = function(id, callback) {
		me.findWhere({_id: id}, callback);
	};

	/**
	 * generic read method to return all documents that have a matching
	 * set of key, value pairs specified by config
	 *
	 * callback takes the form function(err, docs)
	 */
	me.findWhere = function(config, callback) {
		models.alert.find(config, callback);
	};

	/**
	 * update gets the alert by the specified id then calls validateAlert
	 *
	 * callback takes the form function(err, valid object, alert object)
	 */
	me.update = function(id, data, updCallback) {
		me.get(id, function(err, docs) {
			if (err) {
				logger.error("Error getting alert", err);
				updCallback(err, null, data);
			} else if (docs[0]) {
				docs = docs[0]; //there will only be one alert from the get
				for (var e in data) {
					if (e !== "_id") {
						docs[e] = data[e];
					}
				}

				docs.updatedDate = new Date();
				me.validateAlert(docs, function(valid) {
					if (valid.valid) {
						docs.save(function(err) {
							if (err) {
								updCallback(err, valid, data);
							} else {
								updCallback(err, valid, docs);
							}
						});
					} else {
						updCallback(err, valid, data);
					}
				});
			} else {
				var errorMsg = new Error("Could not find alert to update");
				updCallback(errorMsg, null, data);
			}
		});
	};

	/**
	 * Remove all alerts that match the specified config
	 */
	me.del = function(config, callback) {
		models.alert.remove(config, callback);
	};

	me.getRss = function(callback) {
		me.findWhere({
			activationDate: { $lte: Date.now() },
			$or: [{deactivationDate: {$gte: Date.now()}}, {deactivationDate: undefined}]
		}, function(err, alerts) {
			if(err) {
				logger.error("Error getting alerts for rss feed", err);
			} else {
				var feed = new rss({
					title: "Alerts",
					//feed_url: "localhost", //Is there a way to know what to display for a public url?
					//site_url: "localhost",
					author: "Centurion"
				});
				async.each(alerts, function(alert, innerCallback) {
					feed.item({
						title: alert.name,
						description: alert.severity + " - " + (alert.description ? alert.description : alert.name),
						//url: "FIXME localhost",
						guid: alert._id.toString(),
						date: alert.activationDate
					});
					innerCallback();
				}, function(err) {
					var xml = feed.xml('  ');
					callback(err, xml);
				});
			}
		});
	};
};


text:
/**
 * From VigoJS
 * https://github.com/M6Web/VigoJS
 *
 */
(function() {

    "use strict";

    /**
     * Inheritance is part of VigoJS package
     * It provides all functionnalities to use inheritance
     *
     * This module might be called using :
     * var Inheritance = require('Inheritance').create();
     *
     * Code has been hugely inspired by this (thanks Alex) : http://www.2ality.com/2012/01/js-inheritance-by-example.html
     */

    /**
     * Copy property from source to target
     *
     * @params Object target
     * @params Object source

     * @return Object target
     */
    exports.extend = function extendProp(target, source) {
        Object.getOwnPropertyNames(source).forEach(function (propName) {
            Object.defineProperty(target, propName,
                Object.getOwnPropertyDescriptor(source, propName));
        });

        return target;
    };

    /**
     * Copy prototype from Super to Sub
     *
     * @params Object target
     * @params Object source

     * @return void
     */
    exports.inherits = function inheritsProto(SubC, SuperC) {
        var subProto = Object.create(SuperC.prototype);
        // At the very least, we keep the "constructor" property
        // At most, we keep additions that have already been made
        this.extend(subProto, SubC.prototype);
        SubC.prototype = subProto;
        SubC._super = SuperC.prototype;
    };
})();


text:
import DBManager = require('./dbmanager');
//
class DataServer {
  constructor(app: any) {
    app.get('/api/:collectionName', function(req, res, next) {
      var bcount = false;
      var skip = 0;
      var limit = 0;
      var pp = {};
      for (var k in req.query) {
        var v = req.query[k];
        if (k == '$count') {
          bcount = true;
        }
        else if (k == '$limit') {
          limit = v;
        }
        else if (k == '$skip') {
          skip = v;
        }
        else {
          pp[k] = v;
        }
      }
      var collectionName = req.params.collectionName;
      if (bcount) {
        DBManager.get_count(collectionName, pp).then(function(results) {
          res.send({ count: results });
        }).catch(function(err) {
            next(err);
          });
      } else {
        DBManager.get_all(collectionName, pp, skip, limit).then(function(results) {
          res.send(results);
        }).catch(function(err) {
            next(err);
          });
      }
    });
    app.post('/api/:collectionName', function(req, res, next) {
      var collectionName = req.params.collectionName;
      //console.log(req.body);
      DBManager.insert_one(collectionName, req.body).then(function(results) {
        res.send(results);
      }).catch(function(err) {
          next(err);
        });
    });
    app.get('/api/:collectionName/:id', function(req, res, next) {
      var collectionName = req.params.collectionName;
      var id = req.params.id;
      DBManager.find_one(collectionName, id).then(function(results) {
        res.send(results);
      }).catch(function(err) {
          next(err);
        });
    });
    app.put('/api/:collectionName/:id', function(req, res, next) {
      var collectionName = req.params.collectionName;
      var id = req.params.id;
      var pp = req.body;
      DBManager.update_one(collectionName, id, pp).then(function(result) {
        res.send((result === 1) ? { msg: 'success' } : { msg: 'error' });
      }).catch(function(err) {
          next(err);
        });
    });
    app.delete('/api/:collectionName/:id', function(req, res, next) {
      var collectionName = req.params.collectionName;
      var id = req.params.id;
      DBManager.remove_one(collectionName, id).then(function(result) {
        res.send((result === 1) ? { msg: 'success' } : { msg: 'error' });
      }).catch(function(err) {
          next(err);
        });
    });
  }
} // class DataServer
export = DataServer;


text:
/**
 * Analyzes number of requests and sizes of different types and console messages
 *
 * setMetric('htmlCount') @desc number of HTML responses @offenders
 * setMetric('htmlSize')  @desc size of HTML responses @unreliable
 * setMetric('cssCount') @desc number of CSS responses @offenders
 * setMetric('cssSize')  @desc size of CSS responses @unreliable
 * setMetric('jsCount') @desc number of JS responses @offenders
 * setMetric('jsSize')  @desc size of JS responses @unreliable
 * setMetric('consoleMessages') @desc number of calls to console.* functions
 * setMetric('imageCount') @desc number of image responses @offenders
 * setMetric('imageSize')  @desc size of image responses @unreliable
 */
'use strict';

exports.module = function(results) {
    var types = ['css', 'js', 'image'];
    types.forEach(function(key) {
        results.setMetric(key + 'Count');
        results.setMetric(key + 'Size');
    });
    results.setMetric('consoleMessages'); // @desc number of calls to console.* functions

    casper.on('recv', function(entry, res) {
        if (types.indexOf(entry.type) === -1) {
            return;
        }

        var size = entry.contentLength;

        results.incrMetric(entry.type + 'Count');
        results.incrMetric(entry.type + 'Size', size);

        results.addOffender(entry.type + 'Count', entry.url + ' (' + (size / 1024).toFixed(2)  + ' kB)');
    });

    casper.on('consoleLog', function(msg) {
        results.incrMetric('consoleMessages');
    });
};


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:task="http://www.springframework.org/schema/task"
       xmlns:rabbit="http://www.springframework.org/schema/rabbit"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd
                           http://www.springframework.org/schema/context
                           http://www.springframework.org/schema/context/spring-context.xsd
                           http://www.springframework.org/schema/task
                           http://www.springframework.org/schema/task/spring-task.xsd
                           http://www.springframework.org/schema/rabbit
                           http://www.springframework.org/schema/rabbit/spring-rabbit-1.3.xsd">

    <import resource="classpath*:/META-INF/spring/marshaller/**/*-context.xml" />
    <import resource="classpath*:/META-INF/spring/si/amqp-context.xml" />
    <import resource="classpath*:/META-INF/spring/services/mapper-context.xml" />

    <context:property-placeholder location="classpath*:META-INF/config/**/*.properties,file:agent*.properties" />

    <context:component-scan base-package="org.cloudbyexample.dc.agent,org.cloudbyexample.dc.converter" />

    <rabbit:listener-container connection-factory="connectionFactory"
                               message-converter="marshallingMessageConverter"
                               task-executor="commandExecutor"
                               error-handler="agentMessageHandler">
        <rabbit:listener queue-names="dc.test" ref="agentMessageHandler" method="handle" />
    </rabbit:listener-container>

</beans>


text:
package com.pushtorefresh.storio3.sqlite.design;

import com.pushtorefresh.storio3.sqlite.queries.RawQuery;

import org.junit.Test;

import io.reactivex.Flowable;

import static io.reactivex.BackpressureStrategy.MISSING;

public class ExecuteSQLOperationDesignTest extends OperationDesignTest {

    @Test
    public void execSqlBlocking() {
        Object nothing = storIOSQLite()
                .executeSQL()
                .withQuery(RawQuery.builder()
                        .query("ALTER TABLE users ...")
                        .build())
                .prepare()
                .executeAsBlocking();
    }

    @Test
    public void execSqlAsRxFlowable() {
        Flowable<Object> flowable = storIOSQLite()
                .executeSQL()
                .withQuery(RawQuery.builder()
                        .query("DROP TABLE users")
                        .build())
                .prepare()
                .asRxFlowable(MISSING);
    }
}


text:
(function () {

  angular
    .module('pomonodoro')
    .controller('TodoController', TodoController);

  TodoController.$inject = ['$scope', 'todo'];

  function TodoController($scope, todo) {
    var vm = this;

    vm.add = addTodo;
    vm.delete = deleteTodo;
    vm.markAsDone = markAsDone;
    vm.newtodo = '';
    vm.select = select;
    vm.selected = {text:'<create or select one task bellow>'};
    vm.selectedIndex = null;
    vm.todos = todo.todos;
    vm.todosDone = todo.done;

    function addTodo() {
      if (vm.newtodo) {
        todo.addTodo(vm.newtodo);
        vm.newtodo = '';
        $scope.todoForm.$setPristine();
      }
    }

    function deleteTodo($index) {
      todo.deleteTodo($index);
    }

    function markAsDone($index) {
      todo.markAsDone($index);
    }

    function select($index) {
      vm.selected = todo.todos[$index];
      vm.selectedIndex = $index;
      console.log('selected index ' + $index);
    }

  }

})();