text:
using System;
using System.Linq;
using System.Security.Claims;
using Microsoft.AspNet.Authorization;
using Microsoft.AspNet.Mvc;
using Microsoft.Data.Entity;
using UnicornStore.AspNet.Models;
using UnicornStore.AspNet.Models.Identity;
using UnicornStore.AspNet.Models.UnicornStore;
using UnicornStore.AspNet.ViewModels.Cart;

namespace UnicornStore.AspNet.Controllers
{
    [Authorize]
    public class CartController : Controller
    {
        private UnicornStoreContext db;
        private ApplicationDbContext identityDb;
        CategoryCache categoryCache;

        public CartController(UnicornStoreContext context, ApplicationDbContext identityContext, CategoryCache cache)
        {
            db = context;
            identityDb = identityContext;
            categoryCache = cache;
        }

        public IActionResult Index(IndexMessage message = IndexMessage.None)
        {
            var items = db.CartItems
                .Where(i => i.Username == User.GetUserName())
                .Include(i => i.Product)
                .ToList();

            return View(new IndexViewModel
            {
                CartItems = items,
                TopLevelCategories = categoryCache.TopLevel(),
                Message = message
            });
        }

        public IActionResult Add(int productId, int quantity = 1)
        {
            var product = db.Products
                .SingleOrDefault(p => p.ProductId == productId);

            if (product == null)
            {
                return new HttpStatusCodeResult(404);
            }

            var item = db.CartItems
                .SingleOrDefault(i => i.ProductId == product.ProductId
                                      && i.Username == User.GetUserName());

            if (item != null)
            {
                item.Quantity += quantity;
                item.PricePerUnit = product.CurrentPrice;
                item.PriceCalculated = DateTime.Now.ToUniversalTime();
            }
            else
            {
                item = new CartItem
                {
                    ProductId = product.ProductId,
                    PricePerUnit = product.CurrentPrice,
                    Quantity = quantity,
                    Username = User.GetUserName(),
                    PriceCalculated = DateTime.Now.ToUniversalTime()
                };
                db.CartItems.Add(item);
            }

            db.SaveChanges();

            return RedirectToAction("Index", new { message = IndexMessage.ItemAdded });
        }

        public IActionResult Remove(int productId)
        {
            var item = db.CartItems
                .SingleOrDefault(i => i.ProductId == productId
                                      && i.Username == User.GetUserName());

            if (item == null)
            {
                return new HttpStatusCodeResult(404);
            }

            db.CartItems.Remove(item);
            db.SaveChanges();

            return RedirectToAction("Index", new { message = IndexMessage.ItemRemoved });
        }

        public IActionResult Checkout()
        {
            var items = db.CartItems
                .Where(i => i.Username == User.GetUserName())
                .Include(i => i.Product)
                .ToList();

            var order = new Order
            {
                CheckoutBegan = DateTime.Now.ToUniversalTime(),
                Username = User.GetUserName(),
                Total = items.Sum(i => i.PricePerUnit * i.Quantity),
                State = OrderState.CheckingOut,
                Lines = items.Select(i => new OrderLine
                {
                    ProductId = i.ProductId,
                    Product = i.Product,
                    Quantity = i.Quantity,
                    PricePerUnit = i.PricePerUnit,
                }).ToList()
            };

            db.ChangeTracker.TrackGraph(order, e => e.State = EntityState.Added);
            db.SaveChanges();

            // TODO workaround for https://github.com/aspnet/EntityFramework/issues/1449
            var orderFixed = db.Orders
                .AsNoTracking()
                .Include(o => o.Lines).ThenInclude(ol => ol.Product)
                .Single(o => o.OrderId == order.OrderId);

            orderFixed.ShippingDetails = new OrderShippingDetails();

            var addresses = identityDb.UserAddresses
                .Where(a => a.UserId == User.GetUserId())
                .ToList();

            return View(new CheckoutViewModel
            {
                Order = orderFixed,
                UserAddresses = addresses
            });
        }

        [HttpPost]
        [ValidateAntiForgeryToken]
        public IActionResult Checkout(CheckoutViewModel formOrder)
        {
            var order = db.Orders
                .Include(o => o.Lines)
                .SingleOrDefault(o => o.OrderId == formOrder.Order.OrderId);

            if (order == null)
            {
                return new HttpStatusCodeResult(404);
            }

            if (order.Username != User.GetUserName())
            {
                return new HttpStatusCodeResult(403);
            }

            if (order.State != OrderState.CheckingOut)
            {
                return new HttpStatusCodeResult(400);
            }

            // Place order
            order.ShippingDetails = formOrder.Order.ShippingDetails.CloneTo<OrderShippingDetails>();
            order.State = OrderState.Placed;
            order.OrderPlaced = DateTime.Now.ToUniversalTime();
            db.SaveChanges();

            if(formOrder.RememberAddress)
            {
                var address = formOrder.Order.ShippingDetails.CloneTo<UserAddress>();
                address.UserId = User.GetUserId();
                identityDb.UserAddresses.Add(address);
                identityDb.SaveChanges();
            }

            // Remove items from cart
            var cartItems = db.CartItems
                .Where(i => i.Username == User.GetUserName())
                .ToList();

            foreach (var item in cartItems)
            {
                if (order.Lines.Any(l => l.ProductId == item.ProductId))
                {
                    db.CartItems.Remove(item);
                }
            }

            db.SaveChanges();

            return RedirectToAction("Details", "Orders", new { orderId = order.OrderId, showConfirmation = true });
        }
    }
}


text:
package org.sakaiproject.tool.assessment.integration.helper.standalone;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.sakaiproject.tool.assessment.facade.AgentFacade;
import org.sakaiproject.tool.assessment.integration.helper.ifc.AgentHelper;
import org.sakaiproject.tool.assessment.osid.shared.impl.AgentImpl;
import org.sakaiproject.tool.assessment.osid.shared.impl.IdImpl;
import org.sakaiproject.user.cover.UserDirectoryService;

/**
 *
 *
Description:
 * This is a stub standalone context implementation helper delegate class for
 * the AgentFacade class.  "Standalone" means that Samigo (Tests and Quizzes)
 * is running without the context of the Sakai portal and authentication
 * mechanisms, and therefore we "make up" some of the values returned.

 *
Note: To customize behavior you can add your own helper class to the
 * Spring injection via the integrationContext.xml for your context.
 * The particular integrationContext.xml to be used is selected by the
 * build process.
 *

 *
Sakai Project Copyright (c) 2005

 *

 * @author Ed Smiley <esmiley@stanford.edu>
 * based on code originally in AgentFacade
 */
public class AgentHelperImpl implements AgentHelper
{
  private Log log = LogFactory.getLog(AgentHelperImpl.class);
  String agentString;

  /**
   * Get an osid Agent implementation class instance.
   *
   * @return an AgentImpl: osid Agent implementation class.
   */
  public AgentImpl getAgent(){
    AgentImpl agent = new AgentImpl("Administrator", null, new IdImpl("admin"));
    return agent;
  }

  /**
   * Get the agent string.
   * @return the agent string.
   */

  public String getEid(String agentString){
    return getAgentString(agentString);
  }
  public String getEidById(String agentString){
    return getAgentString(agentString);
  }

  public String getAgentString(String agentString){
    String agentS = "admin";
    try
    {
      if (!UNASSIGNED_AGENT_STRING.equals(agentString))
      {
        agentS = agentString;
      }
    }
    catch (Exception ex)
    {
      log.warn(ex.getMessage());
      // default
    }
    return agentS;
  }

  /**
   * Get the agent string.
   * @param req the HttpServletRequest
   * @param res the HttpServletResponse
   * @return the agent string.
   */
  public String getAgentString(HttpServletRequest req, HttpServletResponse res){
    String agentS = "admin";
    try
    {
      if (!UNASSIGNED_AGENT_STRING.equals(agentString))
      {
        agentS = agentString;
      }
    }
    catch (Exception ex)
    {
      log.warn(ex.getMessage());
      // default
    }
    return agentS;
  }

  /**
   * Get the Agent display name.
   * @param agentS the Agent string.
   * @return the Agent display name.
   */
  public String getDisplayName(String agentString){
    if ("admin".equals(agentString))
      return "Administrator";
    else if ("rachel".equals(agentString))
      return "Rachel Gollub";
    else if ("marith".equals(agentString))
      return "Margaret Petit";
    else
      return "Dr. Who";
  }

  /**
   * Get the Agent first name.
   * @param agentString teh agent string
   * @return the Agent first name.
   */
  public String getFirstName(String agentString)
  {
    if ("admin".equals(agentString))
      return "Samigo";
    else if ("rachel".equals(agentString))
      return "Rachel";
    else if ("marith".equals(agentString))
      return "Margaret";
    else
      return "Dr.";
  }

  /**
   * Get the Agent last name.
   * @param agentString the agent string
   * @return the Agent last name.
   */
  public String getLastName(String agentString)
  {
    if ("admin".equals(agentString))
      return "Administrator";
    else if ("rachel".equals(agentString))
      return "Gollub";
    else if ("marith".equals(agentString))
      return "Petit";
    else
      return "Who";
  }

  /**
   * Get the Agent email.
   * @param agentString teh agent string
   * @return the Agent email.
   */
  public String getEmail(String agentString)
  {
    String s="";
    try{
      if (!agentString.startsWith("anonymous_"))
        s=UserDirectoryService.getUser(agentString).getEmail();
    }
    catch(Exception e){
      log.warn(e.getMessage());
    }
    return s;
  }

  /**
   * Called by AgentFacade from an instance.
   * @param agentString the agent string for current AgentFacade instance
   * @return role string
   */

  public String getRoleForCurrentAgent(String agentString)
  {
    return "Student";
  }

  /**
   * For a specific agent id, get the agent role.
   * @param agentString the agent string
   * @return the agent role.
   */
  public String getRole(String agentString)
  {
    return "Maintain";
  }

  /**
   * Get the current site id.
   * @return the site id.
   */
  public String getCurrentSiteId(boolean accessViaUrl){
    return "Samigo Site";
  }

  /**
   * Get the current site name.
   * @return the site name.
   */
  public String getCurrentSiteName(boolean accessViaUrl){
    return "Samigo Site";
  }

  /**
   * Get the site name.
   * @param siteId  site id
   * @return the site name.
   */
  public String getSiteName(String siteId){
    return "Samigo Site";
  }

  /**
   * Get the id string.
   * @return the id string.
   */

  /**
   * Get the display name fo ra specific agent id string.
   * @param agentId the agent id string.
   * @return the display name.
   */
  public String getDisplayNameByAgentId(String agentId){
    return "Samigo Administrator";
  }

  /**
   * Create anonymous user and return the anonymous user id.
   * @return the anonymous user id.
   */
  public String createAnonymous(AgentFacade agent){
    String anonymousId = "anonymous_";
    try
    {
      anonymousId += (new java.util.Date()).getTime();
      agent.setAgentInstanceString(anonymousId);
    }
    catch (Exception ex)
    {
      log.warn(ex.getMessage());
      // leave... ...mostly for unit testing
    }
    return anonymousId;
  }

  /**
   * Is this a standalone environment?
   * @return true, always, in this implementation
   */
  public boolean isStandaloneEnvironment(){
    return true;
  }

  /**
   * Is this an integrated environment?
   * @return false, in this implementation
   */
  public boolean isIntegratedEnvironment(){
    return false;
  }

  /**
   * Get current site id from within an external servlet.
   * @param req the HttpServletRequest
   * @param res the HttpServletResponse
   * @return teh site id.
   */
  public String getCurrentSiteIdFromExternalServlet(HttpServletRequest req,  HttpServletResponse res){
      return "Samigo Site";
  }

  /**
   * Get the anonymous user id.
   * @return the anonymous user id.
   */
  public String getAnonymousId(String agentString){
    String agentS = "";
    try
    {
      if (!UNASSIGNED_AGENT_STRING.equals(agentString))
      {
        agentS = agentString;
      }
    }
    catch (Exception ex)
    {
      log.warn(ex.getMessage());
      // leave... ...mostly for unit testing
    }
    return agentS;
  }

  /**
   * Set the agent id string.
   * @param idString the isd string.
   */

  /**
   * Set the agent string.
   * @param agentString the agent string.
   */
  public void setAgentString(String agentString)
  {
    this.agentString = agentString;
  }

  /**
   * This gets the current site id and transforms it into the realm.
   *
   * @param inUsers the Collection of users who have their roles looked up.
   *                This is a Collection of userId Strings
   * @return Returns the map of users as keys and their roles as values.
   *			If the user is not in the realm then they will have a null role.
   */
  public Map getUserRolesFromContextRealm(Collection inUsers)
  {
  return new HashMap();
  }

  //cwen
  public String getRoleForAgentAndSite(String agentString, String siteId)
  {
    return null;
  }
  /**
   * This is a kludge to work around a JSF scriptlet dependency introduced by cwen
   * on org.sakaiproject.component.cover.ServerConfigurationService.
   * @todo for 2.2 remove method when done with refactor.
   * @deprecated
   *
   * @return true unless it is turned off
   */

  public boolean isFileUploadAvailable()
  {
    return true;//always, in standalone
  }

    public String getDisplayId(String agentId) {
        if (AgentHelper.UNASSIGNED_AGENT_STRING.equals(agentString)) {
            return "";
        }
        try {
            if (!agentString.startsWith("anonymous_")) {
                return UserDirectoryService.getUser(agentString).getDisplayId();
            }

        } catch (Exception e) {
            log.warn("getDisplayId: " + e.getMessage());
        }
        return "";
    }
}

redpajama_set_name: RedPajamaGithub


text:
@interface DMOAuthSession ()

@property (nonatomic, readwrite) NSString *scope;

@end

@implementation DMOAuthSession
{
    NSString *_accessToken;
}

+ (DMOAuthSession *)sessionWithSessionInfo:(NSDictionary *)sessionInfo;
{
    DMOAuthSession *session = [[self alloc] init];

    if (session)
    {
        if (DMISSET(sessionInfo, @"access_token"))
        {
            session.accessToken = sessionInfo[@"access_token"];
        }
        if (DMISSET(sessionInfo, @"expires_in"))
        {
            session.expires = [NSDate dateWithTimeIntervalSinceNow:[sessionInfo[@"expires_in"] doubleValue]];
        }
        else if (DMISSET(sessionInfo, @"expires"))
        {
            session.expires = sessionInfo[@"expires"];
        }
        if (DMISSET(sessionInfo, @"refresh_token"))
        {
            session.refreshToken = sessionInfo[@"refresh_token"];
        }
        if (DMISSET(sessionInfo, @"scope"))
        {
            session.scope = sessionInfo[@"scope"];
        }
        if (!session.accessToken && !session.refreshToken)
        {
            session = nil;
        }
    }

    return session;
}

- (NSString *)accessToken
{
    if (_accessToken)
    {
        if (!self.expires || [self.expires timeIntervalSinceNow] > 0)
        {
            return _accessToken;
        }
        else
        {
            // Token expired
            _accessToken = nil;
        }
    }

    return nil;
}

- (void)setAccessToken:(NSString *)accessToken
{
    _accessToken = accessToken;
}

@end

@implementation DMOAuthSession (Keychain)

+ (DMOAuthSession *)sessionFromKeychainIdentifier:(NSString *)keychainIdentifier
{
    NSDictionary *keychainQuery = [self keychainQueryForIdentifier:keychainIdentifier];
    CFTypeRef secData = nil;

    OSStatus result = SecItemCopyMatching((__bridge CFDictionaryRef)keychainQuery, &secData);
    if (result == noErr)
    {
        NSDictionary *sessionInfo = [self dictionaryFromSecItem:(__bridge_transfer NSDictionary *)secData];
        if (sessionInfo)
        {
            return [DMOAuthSession sessionWithSessionInfo:(NSDictionary *)sessionInfo];
        }
    }
    else if (result != errSecItemNotFound)
    {
        NSLog(@"Keychain access error: %ld", result);
    }

    return nil;
}

- (BOOL)storeInKeychainWithIdentifier:(NSString *)keychainIdentifier
{
    CFTypeRef attributes = NULL;
    NSDictionary *keychainQuery = [self.class keychainQueryForIdentifier:(NSString *)keychainIdentifier];

    // If the keychain item already exists, modify it:
    if (SecItemCopyMatching((__bridge CFDictionaryRef)keychainQuery, &attributes) == noErr)
    {
        // First we need the attributes from the Keychain.
        NSMutableDictionary *updateItem = [NSMutableDictionary dictionaryWithDictionary:(__bridge_transfer NSDictionary *)attributes];

        // Second we need to add the appropriate search key/values.
        updateItem[(__bridge id)kSecClass] = keychainQuery[(__bridge id)kSecClass];

        // Lastly, we need to set up the updated attribute list being careful to remove the class.
        NSMutableDictionary *tempCheck = [self secItemDictionaryForIdentifier:keychainIdentifier];
        [tempCheck removeObjectForKey:(__bridge id)kSecClass];

#if TARGET_IPHONE_SIMULATOR
        // Remove the access group if running on the iPhone simulator.
        [tempCheck removeObjectForKey:(__bridge id)kSecAttrAccessGroup];
#endif

        return SecItemUpdate((__bridge CFDictionaryRef)updateItem, (__bridge CFDictionaryRef)tempCheck) == noErr;
    }
    else
    {
        // No previous item found; add the new one.
        OSStatus result = SecItemAdd((__bridge CFDictionaryRef)[self secItemDictionaryForIdentifier:keychainIdentifier], NULL);
        if (result != noErr)
        {
            NSLog(@"Keychain write error: %ld", result);
        }
        return result == noErr;
    }
}

- (BOOL)clearFromKeychainWithIdentifier:(NSString *)keychainIdentifier
{
    NSDictionary *secItem = [self secItemDictionaryForIdentifier:keychainIdentifier];
    OSStatus result = SecItemDelete((__bridge CFDictionaryRef)secItem);
    if (result == noErr || result == errSecItemNotFound)
    {
        return YES;
    }
    else
    {
        NSLog(@"Keychain delete error: %ld", result);
        return NO;
    }
}

+ (NSDictionary *)keychainQueryForIdentifier:(NSString *)keychainIdentifier
{
    NSDictionary *query = @
    {
        (__bridge id)kSecClass: (__bridge id)kSecClassGenericPassword,
        (__bridge id)kSecAttrAccount: keychainIdentifier,
        (__bridge id)kSecAttrService: @"Dailymotion",

        // Return the attributes of the first match only:
        (__bridge id)kSecMatchLimit: (__bridge id)kSecMatchLimitOne,

        // Return the attributes of the keychain item (the password is
        // acquired in the secItemFormatToDictionary: method):
        (__bridge id)kSecReturnAttributes: (id)kCFBooleanTrue
    };

#if !TARGET_IPHONE_SIMULATOR
    if (NSBundle.mainBundle.infoDictionary[@"DMKeychainAccessGroup"])
    {
        NSMutableDictionary *mutableQuery = [query mutableCopy];
        mutableQuery[(__bridge id)kSecAttrAccessGroup] = NSBundle.mainBundle.infoDictionary[@"DMKeychainAccessGroup"];
        query = [mutableQuery copy];
    }
#endif

    return query;
}

- (NSMutableDictionary *)secItemDictionaryForIdentifier:(NSString *)keychainIdentifier
{
    // Create a dictionary to return populated with the attributes and data.
    NSMutableDictionary *secItem = [NSMutableDictionary new];

    if (self.refreshToken)
    {
        // Convert the NSString to NSData to meet the requirements for the value type kSecValueData.
        // This is where to store sensitive data that should be encrypted thus we store the refresh token in there
        secItem[(__bridge id)kSecValueData] = [self.refreshToken dataUsingEncoding:NSUTF8StringEncoding];
    }

    // Add the Generic Password keychain item class attribute.
    secItem[(__bridge id)kSecClass] = (__bridge id)kSecClassGenericPassword;
    secItem[(__bridge id)kSecAttrAccount] = keychainIdentifier;
    secItem[(__bridge id)kSecAttrService] = @"Dailymotion";
    secItem[(__bridge id)kSecAttrAccessible] = (__bridge id)kSecAttrAccessibleAfterFirstUnlock;

#if !TARGET_IPHONE_SIMULATOR
    if (NSBundle.mainBundle.infoDictionary[@"DMKeychainAccessGroup"])
    {
        secItem[(__bridge id)kSecAttrAccessGroup] = NSBundle.mainBundle.infoDictionary[@"DMKeychainAccessGroup"];
    }
#endif

    return secItem;
}

+ (NSMutableDictionary *)dictionaryFromSecItem:(NSDictionary *)secItem
{
    // Create a dictionary to return populated with the attributes and data.
    NSMutableDictionary *returnDictionary = [secItem mutableCopy];

    // Add the proper search key and class attribute.
    returnDictionary[(__bridge id)kSecReturnData] = (id)kCFBooleanTrue;
    returnDictionary[(__bridge id)kSecClass] = (__bridge id)kSecClassGenericPassword;

    // Acquire the password data from the attributes.
    CFTypeRef passwordDataRef = NULL;
    if (SecItemCopyMatching((__bridge CFDictionaryRef)returnDictionary, &passwordDataRef) == noErr)
    {
        // Remove the search, class, and identifier key/value, we don't need them anymore.
        [returnDictionary removeObjectForKey:(__bridge id)kSecReturnData];

        // Add the password as refresh_token to the dictionary, converting from NSData to NSString.
        NSData *passwordData = (__bridge_transfer NSData *)passwordDataRef;
        NSString *password = [[NSString alloc] initWithBytes:[passwordData bytes]
                                                      length:[passwordData length]
                                                    encoding:NSUTF8StringEncoding];
        if (!password)
        {
            return nil;
        }

        returnDictionary[@"refresh_token"] = password;
    }
    else
    {
        // Don't do anything if nothing is found.
        return nil;
    }

    return returnDictionary;
}

@end


text:
"""Experimental API for optimizing `tf.data` pipelines."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

from tensorflow.python.data.ops import dataset_ops
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.ops import gen_experimental_dataset_ops
from tensorflow.python.util.tf_export import tf_export

# A constant that can be used to enable auto-tuning.
AUTOTUNE = -1
tf_export("data.experimental.AUTOTUNE").export_constant(__name__, "AUTOTUNE")

# TODO(jsimsa): Support RE matching for both individual transformation (e.g. to
# account for indexing) and transformation sequence.
def assert_next(transformations):
  """A transformation that asserts which transformations happen next.

  Args:
    transformations: A `tf.string` vector `tf.Tensor` identifying the
      transformations that are expected to happen next.

  Returns:
    A `Dataset` transformation function, which can be passed to
    `tf.data.Dataset.apply`.
  """

  def _apply_fn(dataset):
    """Function from `Dataset` to `Dataset` that applies the transformation."""
    return _AssertNextDataset(dataset, transformations)

  return _apply_fn

def model():
  """A transformation that models performance.

  Returns:
    A `Dataset` transformation function, which can be passed to
    `tf.data.Dataset.apply`.
  """

  def _apply_fn(dataset):
    """Function from `Dataset` to `Dataset` that applies the transformation."""
    return dataset_ops._ModelDataset(dataset)  # pylint: disable=protected-access

  return _apply_fn

def non_serializable():
  """A non-serializable identity transformation.

  Returns:
    A `Dataset` transformation function, which can be passed to
    `tf.data.Dataset.apply`.
  """

  def _apply_fn(dataset):
    """Function from `Dataset` to `Dataset` that applies the transformation."""
    return _NonSerializableDataset(dataset)

  return _apply_fn

def optimize(optimizations=None):
  """A transformation that applies optimizations.

  Args:
    optimizations: (Optional.) A `tf.string` vector `tf.Tensor` identifying
      optimizations to use. If not specified, the default set of optimizations
      is applied.

  Returns:
    A `Dataset` transformation function, which can be passed to
    `tf.data.Dataset.apply`.
  """

  def _apply_fn(dataset):
    """Function from `Dataset` to `Dataset` that applies the transformation."""
    return dataset_ops._OptimizeDataset(dataset, optimizations)  # pylint: disable=protected-access

  return _apply_fn

class _AssertNextDataset(dataset_ops.UnaryUnchangedStructureDataset):
  """A `Dataset` that asserts which transformations happen next."""

  def __init__(self, input_dataset, transformations):
    """See `assert_next()` for details."""
    self._input_dataset = input_dataset
    if transformations is None:
      raise ValueError("At least one transformation should be specified")
    self._transformations = ops.convert_to_tensor(
        transformations, dtype=dtypes.string, name="transformations")
    variant_tensor = (
        gen_experimental_dataset_ops.experimental_assert_next_dataset(
            self._input_dataset._variant_tensor,  # pylint: disable=protected-access
            self._transformations,
            **dataset_ops.flat_structure(self)))
    super(_AssertNextDataset, self).__init__(input_dataset, variant_tensor)

class _NonSerializableDataset(dataset_ops.UnaryUnchangedStructureDataset):
  """A `Dataset` that performs non-serializable identity transformation."""

  def __init__(self, input_dataset):
    """See `non_serializable()` for details."""
    self._input_dataset = input_dataset
    variant_tensor = (
        gen_experimental_dataset_ops.experimental_non_serializable_dataset(
            self._input_dataset._variant_tensor,  # pylint: disable=protected-access
            **dataset_ops.flat_structure(self)))
    super(_NonSerializableDataset, self).__init__(input_dataset, variant_tensor)

class _ChooseFastestDataset(dataset_ops.DatasetV2):
  """A `Dataset` that merges two input datasets."""

  def __init__(self, datasets, num_experiments=10):
    """Chooses the fastest of some input datasets.

    Given input datasets, produces elements as quickly as the fastest of the
    inputs. Note that this dataset assumes that input datasets have the same
    elements in the same order, though this is not enforced besides checking
    that the input datasets have compatible output types, output shapes, and
    cardinality at runtime. The resulting dataset produces elements that are
    identical to the input elements, and in the same order.

    Note that the time to first iteration is longer when this dataset is used
    due to the overhead of dynamically picking the faster dataset. Namely,
    for the first num_experiments iterations, this dataset will pull from all
    of its inputs simultaneously in order to determine which input is the
    fastest. For all subsequent iterations, that input will be used.

    Args:
      datasets: A list of `Datasets` that all have the same elements in the same
        order.
      num_experiments: The number of experiments to run before deciding which
        dataset is fastest. In each "experiment" iteration, the dataset will
        call from all its inputs simultaneously, and update its knowledge of
        which input is the fastest.

    Returns:
      A `Dataset` that has the same elements the inputs.
    """
    self._datasets = list(datasets)
    self._structure = self._datasets[0]._element_structure  # pylint: disable=protected-access
    variant_tensor = (
        gen_experimental_dataset_ops.experimental_choose_fastest_dataset(
            [dataset._variant_tensor for dataset in self._datasets],  # pylint: disable=protected-access
            num_experiments=num_experiments,
            **dataset_ops.flat_structure(self)))
    super(_ChooseFastestDataset, self).__init__(variant_tensor)

  def _inputs(self):
    return self._datasets

  @property
  def _element_structure(self):
    return self._datasets[0]._element_structure  # pylint: disable=protected-access


text:
---
order: 3
layout: default
title: Au plaisir des yeux
subtitle: "Color, font, text, word"
permalink: /3-plaisir/
---

Vous me lisez, je vous écris. Vous m'observez, je vous intrigue. Vous m'applaudissez, je…
Le **texte** est là, et ici même. Stylé déjà.
Coloré, espacé, étiré, rapproché, chargé, changé.
Le style commence ici.

### Color

Un air de déjà vu.

{% highlight css %}
p{ color: aliceBlue;}
{% endhighlight %}

Un bleu pâle. Grâce à un nom. Illisible, certes.
Un rouge orangé pour y remédier.

{% highlight css %}
p{ color: tomato;}
{% endhighlight %}

Très bien. Mais mon coeur penche pour le bleu marine. Je me jette :

{% highlight css %}
p{ color: bleuMarine;}
{% endhighlight %}

Argh. Inexistant. Comment faire ? Trouver le nom correct ? Parmi la centaine qui existe ? Laborieux et imprécis.

Il y a plus simple.

#### RGB

A l'écran, les couleurs se promènent par trio.
Du rouge, du vert, du bleu. Plus ou moins chacune. Une coalition pour mieux nous servir.
D'une échelle de 0 à 255 inclus, il faut choisir successivement la quantité de rouge, de vert puis de bleu.
Revenons à mon bleu marine. Du rouge, du vert, mais surtout du bleu.

{% highlight css %}
p{ color: rgb(47, 58, 97);}
{% endhighlight %}

Comment le trouver ? Photoshop. Fireworks. Illustrator. Ou sur [Color Picker](http://www.colorpicker.com/) par exemple. Choisissez une couleur et trouvez les valeurs R, G et B à droite.

Rajoutez un "a" (pour alpha) et jouez sur l'opacité.

{% highlight css %}
p{ color: rgba(47, 58, 97, 0.7);}
{% endhighlight %}

Mon bleu marine à 70% d'opacité.

#### Hexadécimal

La syntaxe rgb est un peu longue, un peu lente. Pourquoi ne pas se restreindre à 7 caractères ?

{% highlight css %}
p{ color: #2F3A61;}
{% endhighlight %}

2F pour le rouge
3A pour le vert
61 pour le bleu

Pour chaque duo de lettres, 256 valeurs possibles aussi. On compte de 0 à 9, puis de A à F.
Par exemple pour le rouge :

* 00 : 0/256, soit 0% de rouge
* 01 : 1/256 de rouge
* ..
* 09 : 10/256 de rouge
* 0A (et non pas 10) : 11/256 de rouge
* ..
* 0F : 16/256 de rouge
* 10 : 17/256 de rouge
* 11
* 12
* ..
* 1A
* ..
* 1F
* ..
* F1
* F2
* ..
* FF : 256/256, soit 100% de rouge

Tourne à droite chéri

Si le code hexadécimal est composé de 3 duos, où chaque duo est le même caractère en double, alors on gagne 3 caractères.

#C33

est équivalent à

#CC3333

Après le rouge, pareil pour le vert. Pareil pour le bleu.
Un code hexa(6)décimal.
Non, n'apprenez pas par coeur, mais comprenez et utilisez le.
[Color Picker](http://www.colorpicker.com/) et copiez-collez.

#### HSL

Alternative : **H**(ue) **S**(aturation) **L**(ightness).

En langue de coq : **Teinte Saturation Lumière**. Et mon bleu marine :

{% highlight css %}
p{ color:hsl(227%, 52%, 38%);}
{% endhighlight %}

Pour faire simple :

* La teinte, c'est la couleur.
* La saturation, c'est la quantité de couleur.
* La lumière, c'est la quantité de blanc.

Pratique pour jouer sur une valeur sans changer les deux autres.

Comme pour le rgba, le hsla existe.

{% highlight css %}
p{ color:hsla(227%, 52%, 38%, .7);}
{% endhighlight %}

Le 0 est facultatif pour les décimales.

### (Ainsi) font

Font. (Police de caractère pour les sédentaires.)
Les polices, il en existe depuis des siècles.
Une police, c'est des caractères. Des lettres oui, mais aussi des chiffres, de la ponctuation, des caractères spéciaux.
Une police, ça vit. Un "a" suivi d'un "p" ne réagit pas pareil si suivi d'un "i" ou d'un "w".
C'est [tout un art](http://ilovetypography.com/).
Qu'en est-il pour nous, maigres intégrateurs ?
Choisir la police, la taille des caractères, leur espacement, leur style, leur graisse.

Sous les feux de la rampe, je demande Arial, Georgia, Verdana, Courier, Times…

#### font-family

La famille d'une police, c'est l'ensemble de ses caractères.

{% highlight css %}
p{ font-family:Verdana;}
{% endhighlight %}

On annonce au navigateur d'aller chercher la police Verdana sur l'ordinateur de l'internaute et de l'appliquer à tous nos p.
Au meilleur des cas, la police est là, elle est appliquée.
Mais si elle venait à manquer ? Le navigateur prendra la police par défaut, en général Times New Roman. Damnation !

Palier au manque, c'est possible. On définit alors plusieurs polices.

{% highlight css %}
p{ font-family:Verdana, Calibri, Arial, sans-serif;}
{% endhighlight %}

Si Verdana prend la poudre d'escampette, Calibri viendra à la rescousse.
Si Calibri suit Verdana, Arial sera là.

"Et Comic Sans MS dans tout ça ?"

Mais quelle est cette police de dernier recours ? sans-serif ? Quel nom peu commun !
Je vous arrête : sans-serif n'est pas une police, mais un type de police, en l'occurence les polices sans empattement. Libre alors à l'ordinateur de choisir la police qu'il veut.
Pratique ces types de police ! Voici d'autres options CSS :

serif : avec empattement

monospace : chaque caractère occupe la même largeur

cursive

fantasy

A utiliser en dernière option d'une liste de polices.

#### font-size

La famille choisie, va-t-on utiliser les petits ou les grands ?

{% highlight css %}
p{ font-size:12px;}
{% endhighlight %}

En pixels de préférence, car la CSS se lit sur écran. Chaque caractère fera à peu près 12px de haut.

D'autres options que le pixel :

* **pt** (point) : à éviter ! Le point est une unité d'imprimerie, donc non précise pour l'écran.
* **em** : une taille de police proportionnelle. S la taille de police du parent est de 16px et que l'on met p{ font-size: 1.2em;}, les p feront 16 x 1,2 = 19,2 pixels.
Très pratique pour garder des proportions égales entre les différents blocs, tout en centralisant la valeur absolue de la taille en un seul lieu.
Inconvénient : les calculs précis sont plus compliqués.
* **120%** : le pourcentage. Plutôt moche.
* **large/small/medium…** : valeurs arbitraires du navigateur. Inutilisables.

Le pixel est précis, le em est pratique. A vous de voir.

#### font-style

Du style dans du style.

{% highlight css %}
p{ font-style: italic;}
{% endhighlight %}

Un peu penché le texte.

{% highlight css %}
p{ font-style: oblique;}
{% endhighlight %}

Très penché le texte.

{% highlight css %}
p{ font-style: normal;}
{% endhighlight %}

Valeur par défaut qui a bon dos.

Requis : la police doit avoir dans sa famille les caractères en italique et/ou oblique pour que cela prenne effet.

#### font-weight

La graisse, la vraie.

{% highlight css %}
p{ font-weight: bold;}
{% endhighlight %}

Du gras.

{% highlight css %}
p{ font-weight: bolder;}
{% endhighlight %}

Encore plus gras.

{% highlight css %}
p{ font-weight: lighter;}
{% endhighlight %}

Top-model.

Ou par centaines : 100, 200, … 900.

{% highlight css %}
p{ font-weight: 100;}
{% endhighlight %}

Pas génial. Du tout.

{% highlight css %}
p{ font-weight: normal;}
{% endhighlight %}

Requis (bis) : la police doit contenir ses caractères en gras, faute de quoi…

#### font-variant

Une option :

{% highlight css %}
p{ font-variant: small-caps;}
{% endhighlight %}

Joli ? Parfois.

{% highlight css %}
p{ font-variant: normal;}
{% endhighlight %}

Retour à la normale.

#### line-height

Le font-size définit la taille des caractères.
Le line-height définit l'espacement entre les lignes.

Le confort de lecture est le résultat de l'association des deux.

{% highlight css %}
p{ font-size: 12px; line-height: 16px;}
{% endhighlight %}

Un confort notable.

Le em peut s'avérer pratique ici.

{% highlight css %}
p{ font-size: 12px; line-height: 1.4em;}
{% endhighlight %}

Changez le font-size, le line-height restera proportionnellement supérieur.

Mais le line-height définit aussi la hauteur du block.
Un `<p>` à 3 lignes avec un line-height de 16px fera 48px de haut.

Associez le line-height avec le height, et vous centrez verticalement le texte.

{% highlight css %}
.annonce{ font-size: 12px; height:40px; line-height: 40px;}
{% endhighlight %}

Un block de 40px de haut. Fixe. Une seule ligne de texte. Pour la centrer verticalement, mettre un line-height égal au height. Magique.

#### font

Tous ces font-, ce line-height... Quel bavardage ! Gagner du temps, c'est gagner du style.

{% highlight css %}
p{ font: italic bold 12px/16px Georgia, Times, serif;}
{% endhighlight %}

Du style, du gras, de la taille, de l'interlignage, et des polices. Compressé comme jamais.

#### text-align

A gauche, au centre, à droite.

{% highlight css %}
p{ text-align: center;}
{% endhighlight %}

Appliqué à un block, il centre le texte de ce block (et non pas le block lui-même).

#### text-transform

La prestidigitation s'invite dans les CSS.

{% highlight css %}
p{ text-transform: uppercase;} /* GE KIF LÉ MAJUSKUL */
p{ text-transform: lowercase;} /* pas moi */
p{ text-transform: capitalize;} /* Quel Mauvais Genre ! */
p{ text-transform: none;} /* Chut. */
{% endhighlight %}

Le code HTML peut être en majuscules, minuscules, peu importe. Le style agit là, pas dans le HTML.

#### text-decoration

Un trait, des clignotements.

{% highlight css %}
p{ text-decoration: overline;}
p{ text-decoration: line-through;}
p{ text-decoration: underline;}
p{ text-decoration: blink;}
p{ text-decoration: none;}
{% endhighlight %}

#### text-indent

Décaler la première ligne de texte, pour diriger l'oeil et apaiser la lecture.

{% highlight css %}
p{ text-indent: 20px;}
p{ text-indent: 3 em;}
{% endhighlight %}

Ou en négatif.

{% highlight css %}
p{ text-indent: -2px;}
{% endhighlight %}

#### text-shadow

A l'ombre, rien de nouveau. Une syntaxe :

{% highlight css %}
p{ text-shadow:[x] [y] [flou] [couleur];}
{% endhighlight %}

Un duo [x] horizontal et [y] vertical pour la position de l'ombre. En pixels positif ou négatif. Le [flou] de l'ombre, en pixels. L'étendue (facultative), de 0 à 1. Puis la couleur : hexa, rgba, rgba, hsl, hsla, texte...

Pour mieux vous lire, un appui noir transparent :

{% highlight css %}
p{ text-shadow: 0 2px 2px rgba( 0, 0, 0, .7);}
{% endhighlight %}

Sur fond foncé, une lumière vers le haut :

{% highlight css %}
p{ text-shadow: 0 -1px 0 rgba( 255, 255, 255, .3);}
{% endhighlight %}

#### white-space

Le texte est fluide au départ. Arrivé au bout d'une ligne, la suite fait un retour à la ligne. Cette attitude peut être anéantie :

{% highlight css %}
p{ white-space: nowrap;}
{% endhighlight %}

Le texte restera sur une et une seule ligne, quitte à dépasser du paragraphe et/ou disparaître d'une l'écran, jusqu'à ce qu'il rencontre un éventuel `<br>`.

Le code HTML n'a habituellement aucun impact quant à la mise en forme textuelle, c'est à dire que les sauts de ligne, les tabulations et les espaces multiples dans le HTML ne s'affichent pas de le navigateur. Seul l'espace simple est conservé. Pour tenir compte de la mise en forme présente dans le code HTML, un outil existe :

{% highlight css %}
p{ white-space: pre;}
{% endhighlight %}

La balise `<pre>` agit de même.

#### letter-spacing

L'espacement des lettres. Toute une science. La parcimonie est de rigueur.

{% highlight css %}
p{ letter-spacing: 1px;} /* Espacement fixe, quelle que soit la taille de la police */
p{ letter-spacing: -.5em;} /* Espacement réduit et proportionnel, pratique */
{% endhighlight %}

Comme pour le font-size : px, em plutôt, et pas pt, cm, pourcentage...

#### word-spacing

Après les lettres, les mots.

{% highlight css %}
p{ word-spacing: 2em;}
p{ word-spacing: normal;}
{% endhighlight %}

#### word-wrap

Les chaînes de caractère sans espace (tel "Supercalifragilisticexpialidocious") restent unies et ne passent jamais à la ligne, quitte à dépasser du block dans lequel il est.
Pour forcer le retour à la ligne, en brisant le mot en deux :

{% highlight css %}
p{ word-wrap: break-word;}
{% endhighlight %}

Cruel destin.

Jouer avec les lettres, leur pluralité, et se restreindre à la forme. Les frontières s'effacent pour laisser place au goût très prononcé pour l'expérimentation typographique, tant mocharde que délicieuse. A l'horizon, s'éprendre pour une fresque et en broder le parcours.

Construisez donc un empire avec les armes que je vous laisse !

La victoire acquise, la [tâpisserie](/4-abime) vous attend.


text:
namespace v8 {
namespace internal {
namespace wasm {

namespace liftoff {

//  half
//  slot        Frame
//  -----+--------------------+---------------------------
//  n+3  |   parameter n      |
//  ...  |       ...          |
//   4   |   parameter 1      | or parameter 2
//   3   |   parameter 0      | or parameter 1
//   2   |  (result address)  | or parameter 0
//  -----+--------------------+---------------------------
//   1   | return addr (lr)   |
//   0   | previous frame (fp)|
//  -----+--------------------+  <-- frame ptr (fp)
//  -1   | 0xa: WASM          |
//  -2   |     instance       |
//  -----+--------------------+---------------------------
//  -3   |    slot 0 (high)   |   ^
//  -4   |    slot 0 (low)    |   |
//  -5   |    slot 1 (high)   | Frame slots
//  -6   |    slot 1 (low)    |   |
//       |                    |   v
//  -----+--------------------+  <-- stack ptr (sp)
//
constexpr int32_t kInstanceOffset = 2 * kSystemPointerSize;

inline MemOperand GetHalfStackSlot(int offset, RegPairHalf half) {
  int32_t half_offset =
      half == kLowWord ? 0 : LiftoffAssembler::kStackSlotSize / 2;
  return MemOperand(fp, -offset + half_offset);
}

}  // namespace liftoff

int LiftoffAssembler::PrepareStackFrame() {
  bailout(kUnsupportedArchitecture, "PrepareStackFrame");
  return 0;
}

void LiftoffAssembler::PatchPrepareStackFrame(int offset, int frame_size) {
  bailout(kUnsupportedArchitecture, "PatchPrepareStackFrame");
}

void LiftoffAssembler::FinishCode() {}

void LiftoffAssembler::AbortCompilation() {}

// static
constexpr int LiftoffAssembler::StaticStackFrameSize() {
  return liftoff::kInstanceOffset;
}

int LiftoffAssembler::SlotSizeForType(ValueType type) {
  switch (type.kind()) {
    case ValueType::kS128:
      return type.element_size_bytes();
    default:
      return kStackSlotSize;
  }
}

bool LiftoffAssembler::NeedsAlignment(ValueType type) {
  switch (type.kind()) {
    case ValueType::kS128:
      return true;
    default:
      // No alignment because all other types are kStackSlotSize.
      return false;
  }
}

void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value,
                                    RelocInfo::Mode rmode) {
  bailout(kUnsupportedArchitecture, "LoadConstant");
}

void LiftoffAssembler::LoadFromInstance(Register dst, uint32_t offset,
                                        int size) {
  bailout(kUnsupportedArchitecture, "LoadFromInstance");
}

void LiftoffAssembler::LoadTaggedPointerFromInstance(Register dst,
                                                     uint32_t offset) {
  bailout(kUnsupportedArchitecture, "LoadTaggedPointerFromInstance");
}

void LiftoffAssembler::SpillInstance(Register instance) {
  bailout(kUnsupportedArchitecture, "SpillInstance");
}

void LiftoffAssembler::FillInstanceInto(Register dst) {
  bailout(kUnsupportedArchitecture, "FillInstanceInto");
}

void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr,
                                         Register offset_reg,
                                         uint32_t offset_imm,
                                         LiftoffRegList pinned) {
  bailout(kUnsupportedArchitecture, "LoadTaggedPointer");
}

void LiftoffAssembler::Load(LiftoffRegister dst, Register src_addr,
                            Register offset_reg, uint32_t offset_imm,
                            LoadType type, LiftoffRegList pinned,
                            uint32_t* protected_load_pc, bool is_load_mem) {
  bailout(kUnsupportedArchitecture, "Load");
}

void LiftoffAssembler::Store(Register dst_addr, Register offset_reg,
                             uint32_t offset_imm, LiftoffRegister src,
                             StoreType type, LiftoffRegList pinned,
                             uint32_t* protected_store_pc, bool is_store_mem) {
  bailout(kUnsupportedArchitecture, "Store");
}

void LiftoffAssembler::AtomicLoad(LiftoffRegister dst, Register src_addr,
                                  Register offset_reg, uint32_t offset_imm,
                                  LoadType type, LiftoffRegList pinned) {
  bailout(kAtomics, "AtomicLoad");
}

void LiftoffAssembler::AtomicStore(Register dst_addr, Register offset_reg,
                                   uint32_t offset_imm, LiftoffRegister src,
                                   StoreType type, LiftoffRegList pinned) {
  bailout(kAtomics, "AtomicStore");
}

void LiftoffAssembler::AtomicAdd(Register dst_addr, Register offset_reg,
                                 uint32_t offset_imm, LiftoffRegister value,
                                 LiftoffRegister result, StoreType type) {
  bailout(kAtomics, "AtomicAdd");
}

void LiftoffAssembler::AtomicSub(Register dst_addr, Register offset_reg,
                                 uint32_t offset_imm, LiftoffRegister value,
                                 LiftoffRegister result, StoreType type) {
  bailout(kAtomics, "AtomicSub");
}

void LiftoffAssembler::AtomicAnd(Register dst_addr, Register offset_reg,
                                 uint32_t offset_imm, LiftoffRegister value,
                                 LiftoffRegister result, StoreType type) {
  bailout(kAtomics, "AtomicAnd");
}

void LiftoffAssembler::AtomicOr(Register dst_addr, Register offset_reg,
                                uint32_t offset_imm, LiftoffRegister value,
                                LiftoffRegister result, StoreType type) {
  bailout(kAtomics, "AtomicOr");
}

void LiftoffAssembler::AtomicXor(Register dst_addr, Register offset_reg,
                                 uint32_t offset_imm, LiftoffRegister value,
                                 LiftoffRegister result, StoreType type) {
  bailout(kAtomics, "AtomicXor");
}

void LiftoffAssembler::AtomicExchange(Register dst_addr, Register offset_reg,
                                      uint32_t offset_imm,
                                      LiftoffRegister value,
                                      LiftoffRegister result, StoreType type) {
  bailout(kAtomics, "AtomicExchange");
}

void LiftoffAssembler::AtomicCompareExchange(
    Register dst_addr, Register offset_reg, uint32_t offset_imm,
    LiftoffRegister expected, LiftoffRegister new_value, LiftoffRegister result,
    StoreType type) {
  bailout(kAtomics, "AtomicCompareExchange");
}

void LiftoffAssembler::AtomicFence() { bailout(kAtomics, "AtomicFence"); }

void LiftoffAssembler::LoadCallerFrameSlot(LiftoffRegister dst,
                                           uint32_t caller_slot_idx,
                                           ValueType type) {
  bailout(kUnsupportedArchitecture, "LoadCallerFrameSlot");
}

void LiftoffAssembler::StoreCallerFrameSlot(LiftoffRegister src,
                                            uint32_t caller_slot_idx,
                                            ValueType type) {
  bailout(kUnsupportedArchitecture, "StoreCallerFrameSlot");
}

void LiftoffAssembler::MoveStackValue(uint32_t dst_offset, uint32_t src_offset,
                                      ValueType type) {
  bailout(kUnsupportedArchitecture, "MoveStackValue");
}

void LiftoffAssembler::Move(Register dst, Register src, ValueType type) {
  bailout(kUnsupportedArchitecture, "Move Register");
}

void LiftoffAssembler::Move(DoubleRegister dst, DoubleRegister src,
                            ValueType type) {
  bailout(kUnsupportedArchitecture, "Move DoubleRegister");
}

void LiftoffAssembler::Spill(int offset, LiftoffRegister reg, ValueType type) {
  bailout(kUnsupportedArchitecture, "Spill register");
}

void LiftoffAssembler::Spill(int offset, WasmValue value) {
  bailout(kUnsupportedArchitecture, "Spill value");
}

void LiftoffAssembler::Fill(LiftoffRegister reg, int offset, ValueType type) {
  bailout(kUnsupportedArchitecture, "Fill");
}

void LiftoffAssembler::FillI64Half(Register, int offset, RegPairHalf) {
  bailout(kUnsupportedArchitecture, "FillI64Half");
}

void LiftoffAssembler::FillStackSlotsWithZero(int start, int size) {
  DCHECK_LT(0, size);
  RecordUsedSpillOffset(start + size);

  // We need a zero reg. Always use r0 for that, and push it before to restore
  // its value afterwards.
  push(r0);
  mov(r0, Operand(0));

  if (size <= 5 * kStackSlotSize) {
    // Special straight-line code for up to five slots. Generates two
    // instructions per slot.
    uint32_t remainder = size;
    for (; remainder >= kStackSlotSize; remainder -= kStackSlotSize) {
      StoreP(r0, liftoff::GetHalfStackSlot(start + remainder, kLowWord));
      StoreP(r0, liftoff::GetHalfStackSlot(start + remainder, kHighWord));
    }
    DCHECK(remainder == 4 || remainder == 0);
    if (remainder) {
      StoreP(r0, liftoff::GetHalfStackSlot(start + remainder, kLowWord));
    }
  } else {
    // General case for bigger counts (9 instructions).
    // Use r3 for start address (inclusive), r4 for end address (exclusive).
    push(r3);
    push(r4);
    SubP(r3, fp, Operand(start + size));
    SubP(r4, fp, Operand(start));

    Label loop;
    bind(&loop);
    StoreP(r0, MemOperand(r0));
    la(r0, MemOperand(r0, kSystemPointerSize));
    CmpLogicalP(r3, r4);
    bne(&loop);

    pop(r4);
    pop(r3);
  }

  pop(r0);
}

#define UNIMPLEMENTED_I32_BINOP(name)                            \
  void LiftoffAssembler::emit_##name(Register dst, Register lhs, \
                                     Register rhs) {             \
    bailout(kUnsupportedArchitecture, "i32 binop: " #name);      \
  }
#define UNIMPLEMENTED_I32_BINOP_I(name)                             \
  UNIMPLEMENTED_I32_BINOP(name)                                     \
  void LiftoffAssembler::emit_##name##i(Register dst, Register lhs, \
                                        int32_t imm) {              \
    bailout(kUnsupportedArchitecture, "i32 binop_i: " #name);       \
  }
#define UNIMPLEMENTED_I64_BINOP(name)                                          \
  void LiftoffAssembler::emit_##name(LiftoffRegister dst, LiftoffRegister lhs, \
                                     LiftoffRegister rhs) {                    \
    bailout(kUnsupportedArchitecture, "i64 binop: " #name);                    \
  }
#define UNIMPLEMENTED_I64_BINOP_I(name)                                     \
  UNIMPLEMENTED_I64_BINOP(name)                                             \
  void LiftoffAssembler::emit_##name##i(LiftoffRegister dst,                \
                                        LiftoffRegister lhs, int32_t imm) { \
    bailout(kUnsupportedArchitecture, "i64 binop_i: " #name);               \
  }
#define UNIMPLEMENTED_GP_UNOP(name)                                \
  void LiftoffAssembler::emit_##name(Register dst, Register src) { \
    bailout(kUnsupportedArchitecture, "gp unop: " #name);          \
  }
#define UNIMPLEMENTED_FP_BINOP(name)                                         \
  void LiftoffAssembler::emit_##name(DoubleRegister dst, DoubleRegister lhs, \
                                     DoubleRegister rhs) {                   \
    bailout(kUnsupportedArchitecture, "fp binop: " #name);                   \
  }
#define UNIMPLEMENTED_FP_UNOP(name)                                            \
  void LiftoffAssembler::emit_##name(DoubleRegister dst, DoubleRegister src) { \
    bailout(kUnsupportedArchitecture, "fp unop: " #name);                      \
  }
#define UNIMPLEMENTED_FP_UNOP_RETURN_TRUE(name)                                \
  bool LiftoffAssembler::emit_##name(DoubleRegister dst, DoubleRegister src) { \
    bailout(kUnsupportedArchitecture, "fp unop: " #name);                      \
    return true;                                                               \
  }
#define UNIMPLEMENTED_I32_SHIFTOP(name)                             \
  void LiftoffAssembler::emit_##name(Register dst, Register src,    \
                                     Register amount) {             \
    bailout(kUnsupportedArchitecture, "i32 shiftop: " #name);       \
  }                                                                 \
  void LiftoffAssembler::emit_##name##i(Register dst, Register src, \
                                        int32_t amount) {           \
    bailout(kUnsupportedArchitecture, "i32 shiftop: " #name);       \
  }
#define UNIMPLEMENTED_I64_SHIFTOP(name)                                        \
  void LiftoffAssembler::emit_##name(LiftoffRegister dst, LiftoffRegister src, \
                                     Register amount) {                        \
    bailout(kUnsupportedArchitecture, "i64 shiftop: " #name);                  \
  }                                                                            \
  void LiftoffAssembler::emit_##name##i(LiftoffRegister dst,                   \
                                        LiftoffRegister src, int32_t amount) { \
    bailout(kUnsupportedArchitecture, "i64 shiftop: " #name);                  \
  }

UNIMPLEMENTED_I32_BINOP_I(i32_add)
UNIMPLEMENTED_I32_BINOP(i32_sub)
UNIMPLEMENTED_I32_BINOP(i32_mul)
UNIMPLEMENTED_I32_BINOP_I(i32_and)
UNIMPLEMENTED_I32_BINOP_I(i32_or)
UNIMPLEMENTED_I32_BINOP_I(i32_xor)
UNIMPLEMENTED_I32_SHIFTOP(i32_shl)
UNIMPLEMENTED_I32_SHIFTOP(i32_sar)
UNIMPLEMENTED_I32_SHIFTOP(i32_shr)
UNIMPLEMENTED_I64_BINOP_I(i64_add)
UNIMPLEMENTED_I64_BINOP(i64_sub)
UNIMPLEMENTED_I64_BINOP(i64_mul)
#ifdef V8_TARGET_ARCH_S390X
UNIMPLEMENTED_I64_BINOP_I(i64_and)
UNIMPLEMENTED_I64_BINOP_I(i64_or)
UNIMPLEMENTED_I64_BINOP_I(i64_xor)
#endif
UNIMPLEMENTED_I64_SHIFTOP(i64_shl)
UNIMPLEMENTED_I64_SHIFTOP(i64_sar)
UNIMPLEMENTED_I64_SHIFTOP(i64_shr)
UNIMPLEMENTED_GP_UNOP(i32_clz)
UNIMPLEMENTED_GP_UNOP(i32_ctz)
UNIMPLEMENTED_FP_BINOP(f32_add)
UNIMPLEMENTED_FP_BINOP(f32_sub)
UNIMPLEMENTED_FP_BINOP(f32_mul)
UNIMPLEMENTED_FP_BINOP(f32_div)
UNIMPLEMENTED_FP_BINOP(f32_min)
UNIMPLEMENTED_FP_BINOP(f32_max)
UNIMPLEMENTED_FP_BINOP(f32_copysign)
UNIMPLEMENTED_FP_UNOP(f32_abs)
UNIMPLEMENTED_FP_UNOP(f32_neg)
UNIMPLEMENTED_FP_UNOP_RETURN_TRUE(f32_ceil)
UNIMPLEMENTED_FP_UNOP_RETURN_TRUE(f32_floor)
UNIMPLEMENTED_FP_UNOP_RETURN_TRUE(f32_trunc)
UNIMPLEMENTED_FP_UNOP_RETURN_TRUE(f32_nearest_int)
UNIMPLEMENTED_FP_UNOP(f32_sqrt)
UNIMPLEMENTED_FP_BINOP(f64_add)
UNIMPLEMENTED_FP_BINOP(f64_sub)
UNIMPLEMENTED_FP_BINOP(f64_mul)
UNIMPLEMENTED_FP_BINOP(f64_div)
UNIMPLEMENTED_FP_BINOP(f64_min)
UNIMPLEMENTED_FP_BINOP(f64_max)
UNIMPLEMENTED_FP_BINOP(f64_copysign)
UNIMPLEMENTED_FP_UNOP(f64_abs)
UNIMPLEMENTED_FP_UNOP(f64_neg)
UNIMPLEMENTED_FP_UNOP_RETURN_TRUE(f64_ceil)
UNIMPLEMENTED_FP_UNOP_RETURN_TRUE(f64_floor)
UNIMPLEMENTED_FP_UNOP_RETURN_TRUE(f64_trunc)
UNIMPLEMENTED_FP_UNOP_RETURN_TRUE(f64_nearest_int)
UNIMPLEMENTED_FP_UNOP(f64_sqrt)

#undef UNIMPLEMENTED_I32_BINOP
#undef UNIMPLEMENTED_I32_BINOP_I
#undef UNIMPLEMENTED_I64_BINOP
#undef UNIMPLEMENTED_I64_BINOP_I
#undef UNIMPLEMENTED_GP_UNOP
#undef UNIMPLEMENTED_FP_BINOP
#undef UNIMPLEMENTED_FP_UNOP
#undef UNIMPLEMENTED_FP_UNOP_RETURN_TRUE
#undef UNIMPLEMENTED_I32_SHIFTOP
#undef UNIMPLEMENTED_I64_SHIFTOP

bool LiftoffAssembler::emit_i32_popcnt(Register dst, Register src) {
  bailout(kUnsupportedArchitecture, "i32_popcnt");
  return true;
}

bool LiftoffAssembler::emit_i64_popcnt(LiftoffRegister dst,
                                       LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "i64_popcnt");
  return true;
}

void LiftoffAssembler::emit_i32_divs(Register dst, Register lhs, Register rhs,
                                     Label* trap_div_by_zero,
                                     Label* trap_div_unrepresentable) {
  bailout(kUnsupportedArchitecture, "i32_divs");
}

void LiftoffAssembler::emit_i32_divu(Register dst, Register lhs, Register rhs,
                                     Label* trap_div_by_zero) {
  bailout(kUnsupportedArchitecture, "i32_divu");
}

void LiftoffAssembler::emit_i32_rems(Register dst, Register lhs, Register rhs,
                                     Label* trap_div_by_zero) {
  bailout(kUnsupportedArchitecture, "i32_rems");
}

void LiftoffAssembler::emit_i32_remu(Register dst, Register lhs, Register rhs,
                                     Label* trap_div_by_zero) {
  bailout(kUnsupportedArchitecture, "i32_remu");
}

bool LiftoffAssembler::emit_i64_divs(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs,
                                     Label* trap_div_by_zero,
                                     Label* trap_div_unrepresentable) {
  bailout(kUnsupportedArchitecture, "i64_divs");
  return true;
}

bool LiftoffAssembler::emit_i64_divu(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs,
                                     Label* trap_div_by_zero) {
  bailout(kUnsupportedArchitecture, "i64_divu");
  return true;
}

bool LiftoffAssembler::emit_i64_rems(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs,
                                     Label* trap_div_by_zero) {
  bailout(kUnsupportedArchitecture, "i64_rems");
  return true;
}

bool LiftoffAssembler::emit_i64_remu(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs,
                                     Label* trap_div_by_zero) {
  bailout(kUnsupportedArchitecture, "i64_remu");
  return true;
}

void LiftoffAssembler::emit_i64_clz(LiftoffRegister dst, LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "i64_clz");
}

void LiftoffAssembler::emit_i64_ctz(LiftoffRegister dst, LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "i64_ctz");
}

void LiftoffAssembler::emit_u32_to_intptr(Register dst, Register src) {
#ifdef V8_TARGET_ARCH_S390X
  bailout(kUnsupportedArchitecture, "emit_u32_to_intptr");
#else
// This is a nop on s390.
#endif
}

bool LiftoffAssembler::emit_type_conversion(WasmOpcode opcode,
                                            LiftoffRegister dst,
                                            LiftoffRegister src, Label* trap) {
  bailout(kUnsupportedArchitecture, "emit_type_conversion");
  return true;
}

void LiftoffAssembler::emit_i32_signextend_i8(Register dst, Register src) {
  bailout(kUnsupportedArchitecture, "emit_i32_signextend_i8");
}

void LiftoffAssembler::emit_i32_signextend_i16(Register dst, Register src) {
  bailout(kUnsupportedArchitecture, "emit_i32_signextend_i16");
}

void LiftoffAssembler::emit_i64_signextend_i8(LiftoffRegister dst,
                                              LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i64_signextend_i8");
}

void LiftoffAssembler::emit_i64_signextend_i16(LiftoffRegister dst,
                                               LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i64_signextend_i16");
}

void LiftoffAssembler::emit_i64_signextend_i32(LiftoffRegister dst,
                                               LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i64_signextend_i32");
}

void LiftoffAssembler::emit_jump(Label* label) {
  bailout(kUnsupportedArchitecture, "emit_jump");
}

void LiftoffAssembler::emit_jump(Register target) {
  bailout(kUnsupportedArchitecture, "emit_jump");
}

void LiftoffAssembler::emit_cond_jump(Condition cond, Label* label,
                                      ValueType type, Register lhs,
                                      Register rhs) {
  bailout(kUnsupportedArchitecture, "emit_cond_jump");
}

void LiftoffAssembler::emit_i32_eqz(Register dst, Register src) {
  bailout(kUnsupportedArchitecture, "emit_i32_eqz");
}

void LiftoffAssembler::emit_i32_set_cond(Condition cond, Register dst,
                                         Register lhs, Register rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32_set_cond");
}

void LiftoffAssembler::emit_i64_eqz(Register dst, LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i64_eqz");
}

void LiftoffAssembler::emit_i64_set_cond(Condition cond, Register dst,
                                         LiftoffRegister lhs,
                                         LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i64_set_cond");
}

void LiftoffAssembler::emit_f32_set_cond(Condition cond, Register dst,
                                         DoubleRegister lhs,
                                         DoubleRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f32_set_cond");
}

void LiftoffAssembler::emit_f64_set_cond(Condition cond, Register dst,
                                         DoubleRegister lhs,
                                         DoubleRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f64_set_cond");
}

void LiftoffAssembler::emit_f64x2_splat(LiftoffRegister dst,
                                        LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_f64x2splat");
}

void LiftoffAssembler::emit_f64x2_extract_lane(LiftoffRegister dst,
                                               LiftoffRegister lhs,
                                               uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_f64x2extractlane");
}

void LiftoffAssembler::emit_f64x2_replace_lane(LiftoffRegister dst,
                                               LiftoffRegister src1,
                                               LiftoffRegister src2,
                                               uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_f64x2replacelane");
}

void LiftoffAssembler::emit_f64x2_abs(LiftoffRegister dst,
                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_f64x2_abs");
}

void LiftoffAssembler::emit_f64x2_neg(LiftoffRegister dst,
                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_f64x2neg");
}

void LiftoffAssembler::emit_f64x2_sqrt(LiftoffRegister dst,
                                       LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_f64x2sqrt");
}

void LiftoffAssembler::emit_f64x2_add(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f64x2add");
}

void LiftoffAssembler::emit_f64x2_sub(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f64x2sub");
}

void LiftoffAssembler::emit_f64x2_mul(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f64x2mul");
}

void LiftoffAssembler::emit_f64x2_div(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f64x2div");
}

void LiftoffAssembler::emit_f64x2_min(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f64x2min");
}

void LiftoffAssembler::emit_f64x2_max(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f64x2max");
}

void LiftoffAssembler::emit_f32x4_splat(LiftoffRegister dst,
                                        LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_f32x4_splat");
}

void LiftoffAssembler::emit_f32x4_extract_lane(LiftoffRegister dst,
                                               LiftoffRegister lhs,
                                               uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_f32x4extractlane");
}

void LiftoffAssembler::emit_f32x4_replace_lane(LiftoffRegister dst,
                                               LiftoffRegister src1,
                                               LiftoffRegister src2,
                                               uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_f32x4replacelane");
}

void LiftoffAssembler::emit_f32x4_abs(LiftoffRegister dst,
                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_f32x4_abs");
}

void LiftoffAssembler::emit_f32x4_neg(LiftoffRegister dst,
                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_f32x4neg");
}

void LiftoffAssembler::emit_f32x4_sqrt(LiftoffRegister dst,
                                       LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_f32x4sqrt");
}

void LiftoffAssembler::emit_f32x4_add(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f32x4add");
}

void LiftoffAssembler::emit_f32x4_sub(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f32x4sub");
}

void LiftoffAssembler::emit_f32x4_mul(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f32x4mul");
}

void LiftoffAssembler::emit_f32x4_div(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f32x4div");
}

void LiftoffAssembler::emit_f32x4_min(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f32x4min");
}

void LiftoffAssembler::emit_f32x4_max(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f32x4max");
}

void LiftoffAssembler::emit_i64x2_splat(LiftoffRegister dst,
                                        LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i64x2splat");
}

void LiftoffAssembler::emit_i64x2_extract_lane(LiftoffRegister dst,
                                               LiftoffRegister lhs,
                                               uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_i64x2extractlane");
}

void LiftoffAssembler::emit_i64x2_replace_lane(LiftoffRegister dst,
                                               LiftoffRegister src1,
                                               LiftoffRegister src2,
                                               uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_i64x2replacelane");
}

void LiftoffAssembler::emit_i64x2_neg(LiftoffRegister dst,
                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i64x2neg");
}

void LiftoffAssembler::emit_i64x2_shl(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kSimd, "i64x2_shl");
}

void LiftoffAssembler::emit_i64x2_shli(LiftoffRegister dst, LiftoffRegister lhs,
                                       int32_t rhs) {
  bailout(kSimd, "i64x2_shli");
}

void LiftoffAssembler::emit_i64x2_add(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i64x2add");
}

void LiftoffAssembler::emit_i64x2_sub(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i64x2sub");
}

void LiftoffAssembler::emit_i64x2_mul(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i64x2mul");
}

void LiftoffAssembler::emit_i32x4_splat(LiftoffRegister dst,
                                        LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i32x4_splat");
}

void LiftoffAssembler::emit_i32x4_extract_lane(LiftoffRegister dst,
                                               LiftoffRegister lhs,
                                               uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_i32x4extractlane");
}

void LiftoffAssembler::emit_i32x4_replace_lane(LiftoffRegister dst,
                                               LiftoffRegister src1,
                                               LiftoffRegister src2,
                                               uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_i32x4replacelane");
}

void LiftoffAssembler::emit_i32x4_neg(LiftoffRegister dst,
                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i32x4neg");
}

void LiftoffAssembler::emit_i32x4_shl(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kSimd, "i32x4_shl");
}

void LiftoffAssembler::emit_i32x4_shli(LiftoffRegister dst, LiftoffRegister lhs,
                                       int32_t rhs) {
  bailout(kSimd, "i32x4_shli");
}

void LiftoffAssembler::emit_i32x4_add(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32x4add");
}

void LiftoffAssembler::emit_i32x4_sub(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32x4sub");
}

void LiftoffAssembler::emit_i32x4_mul(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32x4mul");
}

void LiftoffAssembler::emit_i32x4_min_s(LiftoffRegister dst,
                                        LiftoffRegister lhs,
                                        LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32x4_min_s");
}

void LiftoffAssembler::emit_i32x4_min_u(LiftoffRegister dst,
                                        LiftoffRegister lhs,
                                        LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32x4_min_u");
}

void LiftoffAssembler::emit_i32x4_max_s(LiftoffRegister dst,
                                        LiftoffRegister lhs,
                                        LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32x4_max_s");
}

void LiftoffAssembler::emit_i32x4_max_u(LiftoffRegister dst,
                                        LiftoffRegister lhs,
                                        LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32x4_max_u");
}

void LiftoffAssembler::emit_i16x8_splat(LiftoffRegister dst,
                                        LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i16x8splat");
}

void LiftoffAssembler::emit_i16x8_neg(LiftoffRegister dst,
                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i16x8neg");
}

void LiftoffAssembler::emit_i16x8_shl(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kSimd, "i16x8_shl");
}

void LiftoffAssembler::emit_i16x8_shli(LiftoffRegister dst, LiftoffRegister lhs,
                                       int32_t rhs) {
  bailout(kSimd, "i16x8_shli");
}

void LiftoffAssembler::emit_i16x8_add(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8add");
}

void LiftoffAssembler::emit_i16x8_add_saturate_s(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8addsaturate_s");
}

void LiftoffAssembler::emit_i16x8_sub(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8sub");
}

void LiftoffAssembler::emit_i16x8_sub_saturate_s(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8subsaturate_s");
}

void LiftoffAssembler::emit_i16x8_sub_saturate_u(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8subsaturate_u");
}

void LiftoffAssembler::emit_i16x8_mul(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8mul");
}

void LiftoffAssembler::emit_i16x8_add_saturate_u(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8addsaturate_u");
}

void LiftoffAssembler::emit_i16x8_min_s(LiftoffRegister dst,
                                        LiftoffRegister lhs,
                                        LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_min_s");
}

void LiftoffAssembler::emit_i16x8_min_u(LiftoffRegister dst,
                                        LiftoffRegister lhs,
                                        LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_min_u");
}

void LiftoffAssembler::emit_i16x8_max_s(LiftoffRegister dst,
                                        LiftoffRegister lhs,
                                        LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_max_s");
}

void LiftoffAssembler::emit_i16x8_max_u(LiftoffRegister dst,
                                        LiftoffRegister lhs,
                                        LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_max_u");
}

void LiftoffAssembler::emit_i16x8_extract_lane_u(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_i16x8extractlane_u");
}

void LiftoffAssembler::emit_i16x8_replace_lane(LiftoffRegister dst,
                                               LiftoffRegister src1,
                                               LiftoffRegister src2,
                                               uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_i16x8replacelane");
}

void LiftoffAssembler::emit_i16x8_extract_lane_s(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_i16x8extractlane_s");
}

void LiftoffAssembler::emit_i8x16_splat(LiftoffRegister dst,
                                        LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i8x16splat");
}

void LiftoffAssembler::emit_i8x16_extract_lane_u(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_i8x16extractlane_u");
}

void LiftoffAssembler::emit_i8x16_extract_lane_s(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_i8x16extractlane_s");
}

void LiftoffAssembler::emit_i8x16_replace_lane(LiftoffRegister dst,
                                               LiftoffRegister src1,
                                               LiftoffRegister src2,
                                               uint8_t imm_lane_idx) {
  bailout(kUnsupportedArchitecture, "emit_i8x16replacelane");
}

void LiftoffAssembler::emit_i8x16_neg(LiftoffRegister dst,
                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i8x16neg");
}

void LiftoffAssembler::emit_i8x16_shl(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kSimd, "i8x16_shl");
}

void LiftoffAssembler::emit_i8x16_shli(LiftoffRegister dst, LiftoffRegister lhs,
                                       int32_t rhs) {
  bailout(kSimd, "i8x16_shli");
}

void LiftoffAssembler::emit_i8x16_add(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16add");
}

void LiftoffAssembler::emit_i8x16_add_saturate_s(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16addsaturate_s");
}

void LiftoffAssembler::emit_i8x16_sub(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16sub");
}

void LiftoffAssembler::emit_i8x16_sub_saturate_s(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16subsaturate_s");
}

void LiftoffAssembler::emit_i8x16_sub_saturate_u(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16subsaturate_u");
}

void LiftoffAssembler::emit_i8x16_mul(LiftoffRegister dst, LiftoffRegister lhs,
                                      LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16mul");
}

void LiftoffAssembler::emit_i8x16_add_saturate_u(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16addsaturate_u");
}

void LiftoffAssembler::emit_i8x16_min_s(LiftoffRegister dst,
                                        LiftoffRegister lhs,
                                        LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16_min_s");
}

void LiftoffAssembler::emit_i8x16_min_u(LiftoffRegister dst,
                                        LiftoffRegister lhs,
                                        LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16_min_u");
}

void LiftoffAssembler::emit_i8x16_max_s(LiftoffRegister dst,
                                        LiftoffRegister lhs,
                                        LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16_max_s");
}

void LiftoffAssembler::emit_i8x16_max_u(LiftoffRegister dst,
                                        LiftoffRegister lhs,
                                        LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16_max_u");
}

void LiftoffAssembler::emit_i8x16_eq(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16_eq");
}

void LiftoffAssembler::emit_i8x16_ne(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16_ne");
}

void LiftoffAssembler::emit_i8x16_gt_s(LiftoffRegister dst, LiftoffRegister lhs,
                                       LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16gt_s");
}

void LiftoffAssembler::emit_i8x16_gt_u(LiftoffRegister dst, LiftoffRegister lhs,
                                       LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16gt_u");
}

void LiftoffAssembler::emit_i8x16_ge_s(LiftoffRegister dst, LiftoffRegister lhs,
                                       LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16ge_s");
}

void LiftoffAssembler::emit_i8x16_ge_u(LiftoffRegister dst, LiftoffRegister lhs,
                                       LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16ge_u");
}

void LiftoffAssembler::emit_i16x8_eq(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_eq");
}

void LiftoffAssembler::emit_i16x8_ne(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_ne");
}

void LiftoffAssembler::emit_i16x8_gt_s(LiftoffRegister dst, LiftoffRegister lhs,
                                       LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8gt_s");
}

void LiftoffAssembler::emit_i16x8_gt_u(LiftoffRegister dst, LiftoffRegister lhs,
                                       LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8gt_u");
}

void LiftoffAssembler::emit_i16x8_ge_s(LiftoffRegister dst, LiftoffRegister lhs,
                                       LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8ge_s");
}

void LiftoffAssembler::emit_i16x8_ge_u(LiftoffRegister dst, LiftoffRegister lhs,
                                       LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8ge_u");
}

void LiftoffAssembler::emit_i32x4_eq(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32x4_eq");
}

void LiftoffAssembler::emit_i32x4_ne(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32x4_ne");
}

void LiftoffAssembler::emit_i32x4_gt_s(LiftoffRegister dst, LiftoffRegister lhs,
                                       LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32x4gt_s");
}

void LiftoffAssembler::emit_i32x4_gt_u(LiftoffRegister dst, LiftoffRegister lhs,
                                       LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32x4gt_u");
}

void LiftoffAssembler::emit_i32x4_ge_s(LiftoffRegister dst, LiftoffRegister lhs,
                                       LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32x4ge_s");
}

void LiftoffAssembler::emit_i32x4_ge_u(LiftoffRegister dst, LiftoffRegister lhs,
                                       LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i32x4ge_u");
}

void LiftoffAssembler::emit_f32x4_eq(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f32x4_eq");
}

void LiftoffAssembler::emit_f32x4_ne(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f32x4_ne");
}

void LiftoffAssembler::emit_f32x4_lt(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f32x4_lt");
}

void LiftoffAssembler::emit_f32x4_le(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f32x4_le");
}

void LiftoffAssembler::emit_f64x2_eq(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f64x2_eq");
}

void LiftoffAssembler::emit_f64x2_ne(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f64x2_ne");
}

void LiftoffAssembler::emit_f64x2_lt(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f64x2_lt");
}

void LiftoffAssembler::emit_f64x2_le(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_f64x2_le");
}

void LiftoffAssembler::emit_s128_not(LiftoffRegister dst, LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_s128_not");
}

void LiftoffAssembler::emit_s128_and(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_s128_and");
}

void LiftoffAssembler::emit_s128_or(LiftoffRegister dst, LiftoffRegister lhs,
                                    LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_s128_or");
}

void LiftoffAssembler::emit_s128_xor(LiftoffRegister dst, LiftoffRegister lhs,
                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_s128_xor");
}

void LiftoffAssembler::emit_s128_select(LiftoffRegister dst,
                                        LiftoffRegister src1,
                                        LiftoffRegister src2,
                                        LiftoffRegister mask) {
  bailout(kUnsupportedArchitecture, "emit_s128select");
}

void LiftoffAssembler::emit_i8x16_sconvert_i16x8(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16_sconvert_i16x8");
}

void LiftoffAssembler::emit_i8x16_uconvert_i16x8(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16_uconvert_i16x8");
}

void LiftoffAssembler::emit_i16x8_sconvert_i32x4(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_sconvert_i32x4");
}

void LiftoffAssembler::emit_i16x8_uconvert_i32x4(LiftoffRegister dst,
                                                 LiftoffRegister lhs,
                                                 LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_uconvert_i32x4");
}

void LiftoffAssembler::emit_i16x8_sconvert_i8x16_low(LiftoffRegister dst,
                                                     LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_sconvert_i8x16_low");
}

void LiftoffAssembler::emit_i16x8_sconvert_i8x16_high(LiftoffRegister dst,
                                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_sconvert_i8x16_high");
}

void LiftoffAssembler::emit_i16x8_uconvert_i8x16_low(LiftoffRegister dst,
                                                     LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_uconvert_i8x16_low");
}

void LiftoffAssembler::emit_i16x8_uconvert_i8x16_high(LiftoffRegister dst,
                                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_uconvert_i8x16_high");
}

void LiftoffAssembler::emit_i32x4_sconvert_i16x8_low(LiftoffRegister dst,
                                                     LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i32x4_sconvert_i16x8_low");
}

void LiftoffAssembler::emit_i32x4_sconvert_i16x8_high(LiftoffRegister dst,
                                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i32x4_sconvert_i16x8_high");
}

void LiftoffAssembler::emit_i32x4_uconvert_i16x8_low(LiftoffRegister dst,
                                                     LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i32x4_uconvert_i16x8_low");
}

void LiftoffAssembler::emit_i32x4_uconvert_i16x8_high(LiftoffRegister dst,
                                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i32x4_uconvert_i16x8_high");
}

void LiftoffAssembler::emit_s128_and_not(LiftoffRegister dst,
                                         LiftoffRegister lhs,
                                         LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_s128_and_not");
}

void LiftoffAssembler::emit_i8x16_rounding_average_u(LiftoffRegister dst,
                                                     LiftoffRegister lhs,
                                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i8x16_rounding_average_u");
}

void LiftoffAssembler::emit_i16x8_rounding_average_u(LiftoffRegister dst,
                                                     LiftoffRegister lhs,
                                                     LiftoffRegister rhs) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_rounding_average_u");
}

void LiftoffAssembler::emit_i8x16_abs(LiftoffRegister dst,
                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i8x16_abs");
}

void LiftoffAssembler::emit_i16x8_abs(LiftoffRegister dst,
                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i16x8_abs");
}

void LiftoffAssembler::emit_i32x4_abs(LiftoffRegister dst,
                                      LiftoffRegister src) {
  bailout(kUnsupportedArchitecture, "emit_i32x4_abs");
}

void LiftoffAssembler::StackCheck(Label* ool_code, Register limit_address) {
  bailout(kUnsupportedArchitecture, "StackCheck");
}

void LiftoffAssembler::CallTrapCallbackForTesting() {
  bailout(kUnsupportedArchitecture, "CallTrapCallbackForTesting");
}

void LiftoffAssembler::AssertUnreachable(AbortReason reason) {
  bailout(kUnsupportedArchitecture, "AssertUnreachable");
}

void LiftoffAssembler::PushRegisters(LiftoffRegList regs) {
  bailout(kUnsupportedArchitecture, "PushRegisters");
}

void LiftoffAssembler::PopRegisters(LiftoffRegList regs) {
  bailout(kUnsupportedArchitecture, "PopRegisters");
}

void LiftoffAssembler::DropStackSlotsAndRet(uint32_t num_stack_slots) {
  bailout(kUnsupportedArchitecture, "DropStackSlotsAndRet");
}

void LiftoffAssembler::CallC(const wasm::FunctionSig* sig,
                             const LiftoffRegister* args,
                             const LiftoffRegister* rets,
                             ValueType out_argument_type, int stack_bytes,
                             ExternalReference ext_ref) {
  bailout(kUnsupportedArchitecture, "CallC");
}

void LiftoffAssembler::CallNativeWasmCode(Address addr) {
  bailout(kUnsupportedArchitecture, "CallNativeWasmCode");
}

void LiftoffAssembler::CallIndirect(const wasm::FunctionSig* sig,
                                    compiler::CallDescriptor* call_descriptor,
                                    Register target) {
  bailout(kUnsupportedArchitecture, "CallIndirect");
}

void LiftoffAssembler::CallRuntimeStub(WasmCode::RuntimeStubId sid) {
  bailout(kUnsupportedArchitecture, "CallRuntimeStub");
}

void LiftoffAssembler::AllocateStackSlot(Register addr, uint32_t size) {
  bailout(kUnsupportedArchitecture, "AllocateStackSlot");
}

void LiftoffAssembler::DeallocateStackSlot(uint32_t size) {
  bailout(kUnsupportedArchitecture, "DeallocateStackSlot");
}

void LiftoffStackSlots::Construct() {
  asm_->bailout(kUnsupportedArchitecture, "LiftoffStackSlots::Construct");
}

}  // namespace wasm
}  // namespace internal
}  // namespace v8

#undef BAILOUT

#endif  // V8_WASM_BASELINE_S390_LIFTOFF_ASSEMBLER_S390_H_


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Nest;
using Newtonsoft.Json;

namespace Nest
{
	public interface IRestoreResponse : IResponse
	{

		[JsonProperty("snapshot")]
		SnapshotRestore Snapshot { get; set; }
	}

	[JsonObject]
	public class RestoreResponse : BaseResponse, IRestoreResponse
	{

		[JsonProperty("snapshot")]
		public SnapshotRestore Snapshot { get; set; }

	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article
  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">

<front>
<journal-meta>
<journal-id journal-id-type="nlm-ta">PLoS ONE</journal-id>
<journal-id journal-id-type="publisher-id">plos</journal-id>
<journal-id journal-id-type="pmc">plosone</journal-id><journal-title-group>
<journal-title>PLoS ONE</journal-title></journal-title-group>
<issn pub-type="epub">1932-6203</issn>
<publisher>
<publisher-name>Public Library of Science</publisher-name>
<publisher-loc>San Francisco, USA</publisher-loc></publisher>
</journal-meta>

PONE-D-14-18167

10.1371/journal.pone.0097541

<subj-group subj-group-type="heading"><subject>Correction</subject></subj-group>

<title-group>

Correction: Pollen and Phytolith Evidence for Rice Cultivation and Vegetation Change during the Mid-Late Holocene at the Jiangli Site, Suzhou, East China

</title-group>
<contrib-group>
<contrib contrib-type="author" xlink:type="simple"><collab xlink:type="simple">The <italic>PLOS ONE</italic> Staff</collab></contrib>
</contrib-group>
<pub-date pub-type="collection"><year>2014</year></pub-date>
<pub-date pub-type="epub"><day>6</day><month>5</month><year>2014</year></pub-date>
<volume>9</volume>
<issue>5</issue>
<elocation-id>e97541</elocation-id><permissions>
<copyright-year>2014</copyright-year>
<copyright-holder>The PLOS ONE Staff</copyright-holder><license xlink:type="simple"><license-p>This is an open-access article distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/4.0/" xlink:type="simple">Creative Commons Attribution License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.</license-p></license></permissions><related-article id="RA1" related-article-type="corrected-article" ext-link-type="uri" page="e86816" xlink:type="simple" xlink:href="info:doi/10.1371/journal.pone.0086816">
Pollen and Phytolith Evidence for Rice Cultivation and Vegetation Change during the Mid-Late Holocene at the Jiangli Site, Suzhou, East China
</related-article><counts><page-count count="1"/></counts>

</front>
<sec id="s1">
<title>Notice of Republication</title>

This article was republished on April 21, 2014, to correct errors in number symbols that were introduced during the typesetting process. Please download this article again to view the correct version. The originally published, uncorrected article and the republished, corrected article are provided here for reference.

</sec><sec id="s2">
<title>Supporting Information</title>
<supplementary-material id="pone.0097541.s001" mimetype="application/pdf" xlink:href="info:doi/10.1371/journal.pone.0097541.s001" position="float" xlink:type="simple">File S1

Originally published, uncorrected article.

(PDF)

</supplementary-material><supplementary-material id="pone.0097541.s002" mimetype="application/pdf" xlink:href="info:doi/10.1371/journal.pone.0097541.s002" position="float" xlink:type="simple">File S2

Republished corrected article.

(PDF)

</supplementary-material></sec>
<back><ref-list>
<title>Reference</title>
<ref id="pone.0097541-Qiu1">1
<mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Qiu</surname><given-names>Z</given-names></name>, <name name-style="western"><surname>Jiang</surname><given-names>H</given-names></name>, <name name-style="western"><surname>Ding</surname><given-names>J</given-names></name>, <name name-style="western"><surname>Hu</surname><given-names>Y</given-names></name>, <name name-style="western"><surname>Shang</surname><given-names>X</given-names></name> (<year>2014</year>)
Pollen and Phytolith Evidence for Rice Cultivation and Vegetation Change during the Mid-Late Holocene at the Jiangli Site, Suzhou, East China
. <source>PLoS ONE</source> <volume>9(1)</volume>: <fpage>e86816</fpage> <comment>doi:<ext-link ext-link-type="uri" xlink:href="http://dx.doi.org/10.1371/journal.pone.0086816" xlink:type="simple">10.1371/journal.pone.0086816</ext-link></comment></mixed-citation>
</ref>
</ref-list></back>


text:
import {
  DynamicFormControlComponentBase,
  DynamicFormFormControlComponent,
  GroupModel,
  GroupOptions,
} from '../../public_api';
import { Component } from '@angular/core';

@Component({
  selector: 'adf-test-form-component',
  template: `
    <div>
      <form
        [formGroup]="model.ngControl"
        [id]="model.id"
        [ngClass]="model.css.control"
        (ngSubmit)="onSubmit($event)"
        (reset)="onReset($event)"
        adfHTMLDomElement
        novalidate
      >
        <div [ngClass]="model.css.content">
          <ng-container
            *ngFor="let item of model.items"
            adfControlComponent
            [model]="item"
          ></ng-container>
        </div>
      </form>
    </div>
  `,
  inputs: ['model'],
  outputs: ['submit', 'reset'],
  providers: [
    {
      provide: DynamicFormControlComponentBase,
      useExisting: TestFormControlComponent,
    }, // required to support 'adfHTMLDomElement' directive
    { provide: DynamicFormFormControlComponent, useExisting: TestFormControlComponent },
  ],
})
export class TestFormControlComponent extends DynamicFormFormControlComponent {
  model!: GroupModel;
  options!: GroupOptions;
}


text:
#ifndef maxdnn_ConvolutionIndexesGpu_h
#define maxdnn_ConvolutionIndexesGpu_h

namespace maxdnn
{
    struct ConvolutionIndexesGpu
    {
        enum
        {
            Alignment = 16,
            Capacity = 16000, // ints
            MaxArrays = 32
        };

        int numArrays;
        int arrayOffsets[MaxArrays];
        int arraySizes[MaxArrays];
        int imageIndex[Capacity];
    };
}

#endif