text:
"""
   InformationMachineAPILib.Models.UserData

"""
from InformationMachineAPILib.APIHelper import APIHelper

class UserData(object):

    """Implementation of the 'UserData' model.

    TODO: type model description here.

    Attributes:
        email (string): TODO: type description here.
        zip (string): TODO: type description here.
        user_id (string): TODO: type description here.
        owner_app_id (string): TODO: type description here.
        created_at (string): TODO: type description here.

    """

    def __init__(self,
                 **kwargs):
        """Constructor for the UserData class

        Args:
            **kwargs: Keyword Arguments in order to initialise the
                object. Any of the attributes in this object are able to
                be set through the **kwargs of the constructor. The values
                that can be supplied and their types are as follows::

                    email -- string -- Sets the attribute email
                    zip -- string -- Sets the attribute zip
                    user_id -- string -- Sets the attribute user_id
                    owner_app_id -- string -- Sets the attribute owner_app_id
                    created_at -- string -- Sets the attribute created_at

        """
        # Set all of the parameters to their default values
        self.email = None
        self.zip = None
        self.user_id = None
        self.owner_app_id = None
        self.created_at = None

        # Create a mapping from API property names to Model property names
        replace_names = {
            "email": "email",
            "zip": "zip",
            "user_id": "user_id",
            "owner_app_id": "owner_app_id",
            "created_at": "created_at",
        }

        # Parse all of the Key-Value arguments
        if kwargs is not None:
            for key in kwargs:
                # Only add arguments that are actually part of this object
                if key in replace_names:
                    setattr(self, replace_names[key], kwargs[key])

    def resolve_names(self):
        """Creates a dictionary representation of this object.

        This method converts an object to a dictionary that represents the
        format that the model should be in when passed into an API Request.
        Because of this, the generated dictionary may have different
        property names to that of the model itself.

        Returns:
            dict: The dictionary representing the object.

        """
        # Create a mapping from Model property names to API property names
        replace_names = {
            "email": "email",
            "zip": "zip",
            "user_id": "user_id",
            "owner_app_id": "owner_app_id",
            "created_at": "created_at",
        }

        retval = dict()

        return APIHelper.resolve_names(self, replace_names, retval)


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using WindowsAzure.Table.Queryable.Expressions;
using WindowsAzure.Table.Queryable.Expressions.Methods;
using WindowsAzure.Tests.Samples;
using Xunit;

namespace WindowsAzure.Tests.Table.Queryable.Methods
{
    public sealed class SingleOrDefaultTests
    {
        private readonly IQueryable<Country> _countries;
        private readonly Dictionary<string, string> _nameChanges;

        public SingleOrDefaultTests()
        {
            _countries = new EnumerableQuery<Country>(new Country[] {});
            _nameChanges = new Dictionary<string, string>
                {
                    {"Continent", "PartitionKey"},
                    {"Name", "RowKey"}
                };
        }

        [Fact]
        public void SingleOrDefault()
        {
            // Arrange
            var translator = new SingleOrDefaultTranslator(_nameChanges);
            Expression<Func<Country>> query = () => _countries.SingleOrDefault(p => !p.IsExists);
            var translation = new TranslationResult();

            // Act
            translator.Translate((MethodCallExpression) query.Body, translation);

            // Assert
            Assert.NotNull(translation.TableQuery);
            Assert.NotNull(translation.TableQuery.FilterString);
            Assert.Equal("not IsExists", translation.TableQuery.FilterString);
        }

        // ReSharper disable ReplaceWithSingleCallToSingleOrDefault

        [Fact]
        public void SingleOrDefaultAfterWhere()
        {
            // Arrange
            var translator = new SingleOrDefaultTranslator(_nameChanges);
            Expression<Func<Country>> query = () => _countries.Where(p => !p.IsExists).SingleOrDefault();
            var translation = new TranslationResult();

            // Act
            translator.Translate((MethodCallExpression) query.Body, translation);

            // Assert
            Assert.NotNull(translation.TableQuery);
            Assert.NotNull(translation.TableQuery.FilterString);
            Assert.Equal("not IsExists", translation.TableQuery.FilterString);
        }

        // ReSharper restore ReplaceWithSingleCallToSingleOrDefault

        [Fact]
        public void SingleOrDefaultWithInvalidMethod()
        {
            // Arrange
            var translator = new SingleOrDefaultTranslator(_nameChanges);
            Expression<Func<Country>> query = () => _countries.Single(p => !p.IsExists);
            var translation = new TranslationResult();

            // Act
            Assert.Throws<ArgumentOutOfRangeException>(() => translator.Translate((MethodCallExpression) query.Body, translation));

            // Assert
            Assert.NotNull(translation.TableQuery);
            Assert.Null(translation.TableQuery.FilterString);
            Assert.Null(translation.PostProcessing);
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
import * as React from 'react';
import { Role } from '../../../common/types/json';

export const roleNames: { [role: number]: string } = {
  [Role.NONE]: 'None',
  [Role.VIEWER]: 'Viewer',
  [Role.REPORTER]: 'Reporter',
  [Role.UPDATER]: 'Updater',
  [Role.DEVELOPER]: 'Developer',
  [Role.MANAGER]: 'Manager',
  [Role.ADMINISTRATOR]: 'Administrator',
  // [Role.OWNER]: 'Owner',
  // [Role.SYSTEM]: 'System',
};

export function RoleName({ role }: { role: Role }) {
  let roleName = roleNames[role];
  if (!roleName) {
    roleName = `Level ${role}`;
  }
  return {roleName};
}


text:
package com.mangopay.core;

import com.mangopay.core.enumerations.CurrencyIso;
import com.mangopay.core.enumerations.PayOutPaymentType;
import com.mangopay.core.enumerations.PayoutMode;
import com.mangopay.entities.*;
import com.mangopay.entities.subentities.PayOutPaymentDetailsBankWire;
import org.junit.Test;

import java.util.List;

import static org.junit.Assert.*;

/**
 * PayOutApiImpl test methods
 */
public class PayOutApiImplTest extends BaseTest {

    @Test
    public void createBankWire() throws Exception {
            PayIn payIn = this.getJohnsPayInCardWeb();
            PayOut payOut = this.getJohnsPayOutBankWire();

            assertTrue(payOut.getId().length() > 0);
            assertTrue(payOut.getPaymentType() == PayOutPaymentType.BANK_WIRE);
            assertTrue(payOut.getMeanOfPaymentDetails() instanceof PayOutPaymentDetailsBankWire);
    }

    @Test
    public void createAndGetBankWire() throws Exception {
        PayIn payIn = this.getJohnsPayInCardWeb();
        PayOut payOut = this.getJohnsPayOutBankWire();

        PayOut getPayOut = this.api.getPayOutApi().getBankwire(payOut.getId());

        assertTrue(payOut.getId().length() > 0);
        assertTrue(payOut.getPaymentType() == PayOutPaymentType.BANK_WIRE);
        assertTrue(payOut.getMeanOfPaymentDetails() instanceof PayOutPaymentDetailsBankWire);

        assertTrue(getPayOut.getId().length() > 0);
        assertTrue(getPayOut.getPaymentType() == PayOutPaymentType.BANK_WIRE);
        assertTrue(getPayOut.getMeanOfPaymentDetails() instanceof PayOutPaymentDetailsBankWire);
    }

    @Test
    public void getPayOutRefunds() throws Exception {
        String payOutId = "38233499";//hardcoded and in sync with mangopay test database
        String expectedRefundId = "38239297";//hardcoded and in sync with mangopay test database
        PayOut payOut = this.api.getPayOutApi().get(payOutId);
        assertNotNull("PayOut object is null", payOut);

        List<Refund> refunds = this.api.getPayOutApi().getRefunds(payOutId);
        assertNotNull("Payout refunds api returns null", refunds);
        assertFalse("Payout refunds api returns empty list", refunds.isEmpty());
        assertTrue("Api returns more than 1 refund", refunds.size() == 1);
        assertTrue("Expected refund not found!", refunds.get(0).getId().equals(expectedRefundId));
    }

    @Test
    public void checkEligibility() throws Exception {
        PayIn payIn = this.getJohnsPayInCardWeb();
        PayOut payOut = this.getJohnsPayOutBankWire();

        assertTrue(payOut.getId().length() > 0);
        assertTrue(payOut.getPaymentType() == PayOutPaymentType.BANK_WIRE);
        assertTrue(payOut.getMeanOfPaymentDetails() instanceof PayOutPaymentDetailsBankWire);

        PayOutEligibility eligibility = new PayOutEligibility();
        eligibility.setAuthorId(payIn.getAuthorId());
        eligibility.setDebitedFunds(new Money(CurrencyIso.EUR, 10));
        eligibility.setPayoutModeRequested(PayoutMode.INSTANT_PAYMENT);
        eligibility.setBankAccountId(((PayOutPaymentDetailsBankWire) payOut.getMeanOfPaymentDetails()).getBankAccountId());

        PayOutEligibilityResult result = this.api.getPayOutApi().checkInstantPayoutEligibility("", eligibility);

        assertNotNull(result);
    }

}


text:
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>使用单例模式实现命名空间的设置</title>
</head>
<body>
  <script>
    (function() {
      'use strict';

      var myProject = {
        data: {
          ajax: {
            get: function(url, callback) {
              var xhr = new XMLHttpRequest(),
                  STATE_LOADED = 4,
                  STATUS_OK = 200;

              xhr.onreadystatechange = function() {
                if (xhr.readyState !== STATE_LOADED) {
                  return;
                }

                if (xhr.status === STATUS_OK) {
                  callback(xhr.responseText);
                }
              };

              xhr.open('GET', url);
              xhr.send();
            }
          }
        }
      };

      window.myProject = myProject;
    })();
  </script>
  <script>
    (function() {
      'use strict';

      myProject.data.cookies = {
        get: function(name) {
          var output = '',
              escapedName = escape(name),
              start = document.cookie.indexOf(escapedName + '='),
              end = document.cookie.indexOf(';', start);

          end = end === -1 ? (document.cookie.length - 1) : end;

          if (start >= 0) {
            output = document.cookie.substring(start + escapedName.length + 1, end);
          }

          return unescape(output);
        },
        set: function(name, value) {
          document.cookie = escape(name) + '=' + escape(value);
        }
      };

      myProject.data.ajax.get('/user/12345', function(response) {
        alert('HTTP GET response received. User data: ' + response);
      });

      myProject.data.cookies.set('company', 'AKQA');
      myProject.data.cookies.set('name', 'Den Odell');

      alert(myProject.data.cookies.get('company'));
      alert(myProject.data.cookies.get('name'));
    })();
  </script>
</body>
</html>


text:
#include "emboss.h"

/* @prog seqcount *************************************************************
**
** Reads and counts sequences
**
******************************************************************************/

int main(int argc, char **argv)
{
    AjPSeqall seqall;
    AjPFile outfile;
    AjPSeq seq = NULL;
    ajuint count = 0;

    embInit("seqcount", argc, argv);

    outfile = ajAcdGetOutfile("outfile");
    seqall = ajAcdGetSeqall("sequence");

    while(ajSeqallNext(seqall, &seq))
    {
        count++;
    }

    ajFmtPrintF(outfile, "%u\n", count);

    ajSeqallDel(&seqall);
    ajSeqDel(&seq);
    ajFileClose(&outfile);

    embExit();

    return 0;
}


text:
package com.raoulvdberge.refinedstorage.apiimpl.network.node.diskmanipulator;

import com.raoulvdberge.refinedstorage.api.storage.AccessType;
import com.raoulvdberge.refinedstorage.api.storage.disk.IStorageDisk;
import com.raoulvdberge.refinedstorage.api.storage.disk.IStorageDiskContainerContext;
import com.raoulvdberge.refinedstorage.api.storage.disk.IStorageDiskListener;
import com.raoulvdberge.refinedstorage.api.util.Action;
import com.raoulvdberge.refinedstorage.render.constants.ConstantsDisk;
import com.raoulvdberge.refinedstorage.tile.config.IFilterable;
import com.raoulvdberge.refinedstorage.util.StackUtils;
import com.raoulvdberge.refinedstorage.util.WorldUtils;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fluids.FluidStack;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.Collection;

public class StorageDiskFluidManipulatorWrapper implements IStorageDisk<FluidStack> {
    private NetworkNodeDiskManipulator diskManipulator;
    private IStorageDisk<FluidStack> parent;
    private int lastState;

    public StorageDiskFluidManipulatorWrapper(NetworkNodeDiskManipulator diskManipulator, IStorageDisk<FluidStack> parent) {
        this.diskManipulator = diskManipulator;
        this.parent = parent;
        this.setSettings(
            () -> {
                int currentState = ConstantsDisk.getDiskState(getStored(), getCapacity());

                if (lastState != currentState) {
                    lastState = currentState;

                    WorldUtils.updateBlock(diskManipulator.getWorld(), diskManipulator.getPos());
                }
            },
            diskManipulator
        );
        this.lastState = ConstantsDisk.getDiskState(getStored(), getCapacity());
    }

    @Override
    public int getCapacity() {
        return parent.getCapacity();
    }

    @Override
    public void setSettings(@Nullable IStorageDiskListener listener, IStorageDiskContainerContext context) {
        parent.setSettings(listener, context);
    }

    @Override
    public NBTTagCompound writeToNbt() {
        return parent.writeToNbt();
    }

    @Override
    public String getId() {
        return parent.getId();
    }

    @Override
    public Collection<FluidStack> getStacks() {
        return parent.getStacks();
    }

    @Override
    @Nullable
    public FluidStack insert(@Nonnull FluidStack stack, int size, Action action) {
        if (!IFilterable.acceptsFluid(diskManipulator.getFluidFilters(), diskManipulator.getMode(), diskManipulator.getCompare(), stack)) {
            return StackUtils.copy(stack, size);
        }

        return parent.insert(stack, size, action);
    }

    @Override
    @Nullable
    public FluidStack extract(@Nonnull FluidStack stack, int size, int flags, Action action) {
        if (!IFilterable.acceptsFluid(diskManipulator.getFluidFilters(), diskManipulator.getMode(), diskManipulator.getCompare(), stack)) {
            return null;
        }

        return parent.extract(stack, size, flags, action);
    }

    @Override
    public int getStored() {
        return parent.getStored();
    }

    @Override
    public int getPriority() {
        return parent.getPriority();
    }

    @Override
    public AccessType getAccessType() {
        return parent.getAccessType();
    }

    @Override
    public int getCacheDelta(int storedPreInsertion, int size, @Nullable FluidStack remainder) {
        return parent.getCacheDelta(storedPreInsertion, size, remainder);
    }
}


text:
package org.adligo.fabricate.common.util;

public class StringUtils {
  /**
   * This singleton refernce is just to make sure
   * we hit the constructor for code coverage
   */
  public static final StringUtils INSTANCE = new StringUtils();

  public static boolean isEmpty(String p) {
    if (p == null) {
      return true;
    }
    if (p.trim().length() == 0) {
      return true;
    }
    return false;
  }

  private StringUtils() {}
}


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

namespace Marketing
{
    /// <summary>
    /// Interaction logic for UserControl1.xaml
    /// </summary>
    public partial class Icon : UserControl
    {
        public Icon()
        {
            InitializeComponent();
        }
    }
}


text:
name: cljs.core/*print-newline*
see also:
---

## Summary

Set to false by [doc:cljs.core/enable-console-print!] to prevent
[doc:cljs.core/println] and [doc:cljs.core/prn] from duplicating the newline
already appended by JavaScript console.

## Details

## Examples

<!-- AUTO-GENERATED docfile links for github -->
[doc:cljs.core/enable-console-print!]:https://github.com/cljs/api/blob/master/docfiles/cljs.core/enable-console-printBANG.md
[doc:cljs.core/prn]:https://github.com/cljs/api/blob/master/docfiles/cljs.core/prn.md
[doc:cljs.core/println]:https://github.com/cljs/api/blob/master/docfiles/cljs.core/println.md


text:
// Generated by CoffeeScript 1.6.3
(function() {
  var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
    __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
    __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

  window.DomTextMapper = (function(_super) {
    var SELECT_CHILDREN_INSTEAD, USE_EMPTY_TEXT_WORKAROUND, USE_TABLE_TEXT_WORKAROUND, WATCHED_PATHS, WHITESPACE;

    __extends(DomTextMapper, _super);

    DomTextMapper.applicable = function() {
      return true;
    };

    USE_TABLE_TEXT_WORKAROUND = true;

    USE_EMPTY_TEXT_WORKAROUND = true;

    SELECT_CHILDREN_INSTEAD = ["table", "thead", "tbody", "tfoot", "ol", "a", "caption", "p", "span", "div", "h1", "h2", "h3", "h4", "h5", "h6", "ul", "li", "form"];

    WATCHED_PATHS = ["./DIV[3]/DIV[5]/DIV[2]", "./DIV[3]/DIV[5]/DIV[2]/DIV[2]"];

    DomTextMapper.instances = 0;

    function DomTextMapper(_options) {
      var _ref;
      this._options = _options != null ? _options : {};
      this._onMutation = __bind(this._onMutation, this);
      this._getEndInfoForNode = __bind(this._getEndInfoForNode, this);
      this._getStartInfoForNode = __bind(this._getStartInfoForNode, this);
      this._startScan = __bind(this._startScan, this);
      this._getMappingsForCharRange = __bind(this._getMappingsForCharRange, this);
      DomTextMapper.__super__.constructor.call(this, (_ref = this._options.id) != null ? _ref : "d-t-m #" + DomTextMapper.instances);
      if (this._options.rootNode != null) {
        this.setRootNode(this._options.rootNode);
      } else {
        this.setRealRoot();
      }
      DomTextMapper.instances += 1;
    }

    DomTextMapper.prototype.setRootNode = function(rootNode) {
      this._rootWin = window;
      return this._pathStartNode = this._changeRootNode(rootNode);
    };

    DomTextMapper.prototype.setRootId = function(rootId) {
      return this.setRootNode(document.getElementById(rootId));
    };

    DomTextMapper.prototype.setRootIframe = function(iframeId) {
      var iframe;
      iframe = window.document.getElementById(iframeId);
      if (iframe == null) {
        throw new Error("Can't find iframe with specified ID!");
      }
      this._rootWin = iframe.contentWindow;
      if (this._rootWin == null) {
        throw new Error("Can't access contents of the specified iframe!");
      }
      this._changeRootNode(this._rootWin.document);
      return this._pathStartNode = this._getBody();
    };

    DomTextMapper.prototype.setRealRoot = function() {
      this._rootWin = window;
      this._changeRootNode(document);
      return this._pathStartNode = this._getBody();
    };

    DomTextMapper.prototype.setExpectedContent = function(content) {
      return this._expectedContent = content;
    };

    DomTextMapper.prototype._selectPath = function(path, scroll) {
      var node;
      if (scroll == null) {
        scroll = false;
      }
      node = this._lookUpNode(path);
      return this._selectNode(node, scroll);
    };

    DomTextMapper.prototype._getMappingsForCharRange = function(start, end) {
      var changedChar, changedCorpus, changedText, endIndex, endInfo, endMapping, endNode, endOffset, endPath, i, index, info, mappings, node, nodes, origChar, origCorpus, origText, pcs, r, result, startIndex, startInfo, startMapping, startNode, startOffset, startPath, _i, _len,
        _this = this;
      if (!((start != null) && (end != null))) {
        throw new Error("start and end is required!");
      }
      nodes = this._collectAllTextNodes();
      this._saveSelection();
      origCorpus = this._getFreshCorpus(false, true);
      pcs = {};
      index = 0;
      for (_i = 0, _len = nodes.length; _i < _len; _i++) {
        node = nodes[_i];
        origText = node.nodeValue;
        if (!origText.length) {
          continue;
        }
        origChar = origText[0];
        changedChar = origChar === "." ? "," : ".";
        changedText = changedChar + origText.substring(1);
        node.nodeValue = changedText;
        changedCorpus = this._getFreshCorpus(false, true);
        startIndex = this._getDiffIndex(origCorpus, changedCorpus);
        origChar = origText[origText.length - 1];
        changedChar = origChar === "." ? "," : ".";
        changedText = origText.substr(0, origText.length - 1) + changedChar;
        node.nodeValue = changedText;
        changedCorpus = this._getFreshCorpus(false, true);
        endIndex = 1 + this._getDiffIndex(origCorpus, changedCorpus);
        node.nodeValue = origText;
        if (endIndex === startIndex + 1) {
          continue;
        }
        pcs[++index] = {
          start: startIndex,
          end: endIndex,
          node: node,
          content: origCorpus.slice(startIndex, endIndex)
        };
      }
      this._restoreSelection();
      mappings = [];
      for (i in pcs) {
        info = pcs[i];
        if (this._regions_overlap(info.start, info.end, start, end)) {
          (function(info) {
            var full, mapping;
            mapping = {
              element: info
            };
            full = start <= info.start && info.end <= end;
            if (full) {
              mapping.full = true;
              mapping.wanted = info.content;
              mapping.yields = info.content;
              mapping.startCorrected = 0;
              mapping.endCorrected = 0;
            } else {
              if (info.node.nodeType === Node.TEXT_NODE) {
                if (start <= info.start) {
                  mapping.end = end - info.start;
                  mapping.wanted = info.content.substr(0, mapping.end);
                } else if (info.end <= end) {
                  mapping.start = start - info.start;
                  mapping.wanted = info.content.substr(mapping.start);
                } else {
                  mapping.start = start - info.start;
                  mapping.end = end - info.start;
                  mapping.wanted = info.content.substr(mapping.start, mapping.end - mapping.start);
                }
                _this._computeSourcePositions(mapping);
                mapping.yields = info.node.data.substr(mapping.startCorrected, mapping.endCorrected - mapping.startCorrected);
              } else if ((info.node.nodeType === Node.ELEMENT_NODE) && (info.node.tagName.toLowerCase() === "img")) {
                _this._log("Can not select a sub-string from the title of an image. Selecting all.");
                mapping.full = true;
                mapping.wanted = info.content;
              } else {
                _this._log("Warning: no idea how to handle partial mappings for node type " + info.node.nodeType);
                if (info.node.tagName != null) {
                  _this._log("Tag: " + info.node.tagName);
                }
                _this._log("Selecting all.");
                mapping.full = true;
                mapping.wanted = info.content;
              }
            }
            return mappings.push(mapping);
          })(info);
        }
      }
      if (mappings.length === 0) {
        this._log("Collecting nodes for [" + start + ":" + end + "]");
        this._log("Should be: '" + this._corpus.slice(start, end) + "'.");
        throw new Error("No mappings found for [" + start + ":" + end + "]!");
      }
      mappings = mappings.sort(function(a, b) {
        return a.element.start - b.element.start;
      });
      r = this._rootWin.document.createRange();
      startMapping = mappings[0];
      startNode = startMapping.element.node;
      startPath = startMapping.element.path = this._getPathTo(startNode);
      startOffset = startMapping.startCorrected;
      if (startMapping.full) {
        r.setStartBefore(startNode);
        startInfo = startPath;
      } else {
        r.setStart(startNode, startOffset);
        startInfo = startPath + ":" + startOffset;
      }
      endMapping = mappings[mappings.length - 1];
      endNode = endMapping.element.node;
      endPath = endMapping.element.path = this._getPathTo(endNode);
      endOffset = endMapping.endCorrected;
      if (endMapping.full) {
        r.setEndAfter(endNode);
        endInfo = endPath;
      } else {
        r.setEnd(endNode, endOffset);
        endInfo = endPath + ":" + endOffset;
      }
      result = {
        mappings: mappings,
        realRange: r,
        rangeInfo: {
          startPath: startPath,
          startOffset: startOffset,
          startInfo: startInfo,
          endPath: endPath,
          endOffset: endOffset,
          endInfo: endInfo
        },
        safeParent: r.commonAncestorContainer
      };
      return {
        sections: [result]
      };
    };

    DomTextMapper.prototype.ready = function(reason, callback) {
      if (callback == null) {
        throw new Error("missing callback!");
      }
      if (this._pendingCallbacks == null) {
        this._pendingCallbacks = [];
      }
      this._pendingCallbacks.push(callback);
      this._startScan(reason);
      return null;
    };

    DomTextMapper.prototype._startScan = function() {
      this._getFreshCorpus();
      return this._scanFinished();
    };

    DomTextMapper.prototype._getFreshCorpus = function(shouldRestoreSelection, intermittent) {
      var newCorpus;
      if (shouldRestoreSelection == null) {
        shouldRestoreSelection = true;
      }
      if (intermittent == null) {
        intermittent = false;
      }
      newCorpus = this._getNodeContent(this._pathStartNode, shouldRestoreSelection);
      if (intermittent) {
        return newCorpus;
      }
      if (this._isDirty()) {
        this._ignorePos = this._findFirstIgnoredPosition();
      }
      if (this._ignorePos != null) {
        newCorpus = newCorpus.slice(0, this._ignorePos);
      }
      return this._corpus = newCorpus.trim();
    };

    DomTextMapper.prototype._findFirstTextNode = function(node) {
      var child, result, _i, _len, _ref;
      if (node.nodeType === Node.TEXT_NODE) {
        return node;
      }
      if (!node.hasChildNodes()) {
        return null;
      }
      _ref = node.childNodes;
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        child = _ref[_i];
        result = this._findFirstTextNode(child);
        if (result) {
          return result;
        }
      }
      return null;
    };

    DomTextMapper.prototype._findLastTextNode = function(node) {
      var child, result, _i, _len, _ref;
      if (node.nodeType === Node.TEXT_NODE) {
        return node;
      }
      if (!node.hasChildNodes()) {
        return null;
      }
      _ref = node.childNodes.reverse();
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        child = _ref[_i];
        result = this._findLastTextNode(child);
        if (result) {
          return result;
        }
      }
      return null;
    };

    DomTextMapper.prototype._getDiffIndex = function(string1, string2) {
      var i, result, _i, _ref;
      result = -1;
      for (i = _i = 0, _ref = string1.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
        if (string1[i] !== string2[i]) {
          result = i;
          break;
        }
      }
      return result;
    };

    DomTextMapper.prototype._getStartInfoForNode = function(node, shouldRestoreSelection) {
      var changedChar, changedCorpus, changedText, index, origChar, origCorpus, origText, startText;
      if (shouldRestoreSelection == null) {
        shouldRestoreSelection = true;
      }
      startText = this._findFirstTextNode(node);
      if (!startText) {
        return null;
      }
      origText = startText.nodeValue;
      if (!origText.length) {
        return null;
      }
      if (shouldRestoreSelection) {
        this._saveSelection();
      }
      origCorpus = this._getFreshCorpus(false, true);
      origChar = origText[0];
      changedChar = origChar === "." ? "," : ".";
      changedText = changedChar + origText.substring(1);
      startText.nodeValue = changedText;
      changedCorpus = this._getFreshCorpus(false, true);
      index = this._getDiffIndex(origCorpus, changedCorpus);
      startText.nodeValue = origText;
      if (shouldRestoreSelection) {
        this._restoreSelection();
      }
      if (index === -1) {
        return null;
      }
      return {
        page: 0,
        start: index
      };
    };

    DomTextMapper.prototype._getEndInfoForNode = function(node, shouldRestoreSelection) {
      var changedChar, changedCorpus, changedText, endText, index, origChar, origCorpus, origText;
      if (shouldRestoreSelection == null) {
        shouldRestoreSelection = true;
      }
      endText = this._findLastTextNode(node);
      if (!endText) {
        return null;
      }
      origText = endText.nodeValue;
      if (!origText.length) {
        return null;
      }
      if (shouldRestoreSelection) {
        this._saveSelection();
      }
      origCorpus = this._getFreshCorpus(false, true);
      origChar = origText[origText.length - 1];
      changedChar = origChar === "." ? "," : ".";
      changedText = origText.substr(0, origText.length - 1) + changedChar;
      endText.nodeValue = changedText;
      changedCorpus = this._getFreshCorpus(false, true);
      index = this._getDiffIndex(origCorpus, changedCorpus);
      endText.nodeValue = origText;
      if (shouldRestoreSelection) {
        this._restoreSelection();
      }
      if (index === -1) {
        return null;
      }
      return {
        page: 0,
        end: index + 1
      };
    };

    DomTextMapper.prototype._collectAllTextNodes = function(node, results) {
      var n, _i, _len, _ref;
      if (node == null) {
        node = null;
      }
      if (results == null) {
        results = [];
      }
      if (node == null) {
        node = this._pathStartNode;
      }
      switch (node.nodeType) {
        case Node.TEXT_NODE:
          results.push(node);
          break;
        case Node.ELEMENT_NODE:
          if (node.hasChildNodes()) {
            _ref = node.childNodes;
            for (_i = 0, _len = _ref.length; _i < _len; _i++) {
              n = _ref[_i];
              this._collectAllTextNodes(n, results);
            }
          }
          break;
        default:
          this._log("Ignoring node type", node.nodeType);
      }
      return results;
    };

    DomTextMapper.prototype._parentPath = function(path) {
      return path.substr(0, path.lastIndexOf("/"));
    };

    DomTextMapper.prototype._getProperNodeName = function(node) {
      var nodeName;
      nodeName = node.nodeName;
      switch (nodeName) {
        case "#text":
          return "text()";
        case "#comment":
          return "comment()";
        case "#cdata-section":
          return "cdata-section()";
        default:
          return nodeName;
      }
    };

    DomTextMapper.prototype._getNodePosition = function(node) {
      var pos, tmp;
      pos = 0;
      tmp = node;
      while (tmp) {
        if (tmp.nodeName === node.nodeName) {
          pos++;
        }
        tmp = tmp.previousSibling;
      }
      return pos;
    };

    DomTextMapper.prototype._getPathSegment = function(node) {
      var name, pos;
      name = this._getProperNodeName(node);
      pos = this._getNodePosition(node);
      return name + (pos > 1 ? "[" + pos + "]" : "");
    };

    DomTextMapper.prototype._getPathTo = function(node) {
      var origNode, xpath;
      if (!(origNode = node)) {
        throw new Error("Called getPathTo with null node!");
      }
      xpath = '';
      while (node !== this._rootNode) {
        if (node == null) {
          this._log("Root node:", this._rootNode);
          this._log("Wanted node:", origNode);
          this._log("Is this even a child?", this._rootNode.contains(origNode));
          throw new Error("Called getPathTo on a node which was not a descendant of the configured root node.");
        }
        xpath = (this._getPathSegment(node)) + '/' + xpath;
        node = node.parentNode;
      }
      xpath = (this._rootNode.ownerDocument != null ? './' : '/') + xpath;
      xpath = xpath.replace(/\/$/, '');
      return xpath;
    };

    DomTextMapper.prototype._getBody = function() {
      return (this._rootWin.document.getElementsByTagName("body"))[0];
    };

    DomTextMapper.prototype._regions_overlap = function(start1, end1, start2, end2) {
      return start1 < end2 && start2 < end1;
    };

    DomTextMapper.prototype._lookUpNode = function(path) {
      var doc, node, results, _ref;
      doc = (_ref = this._rootNode.ownerDocument) != null ? _ref : this._rootNode;
      results = doc.evaluate(path, this._rootNode, null, 0, null);
      return node = results.iterateNext();
    };

    DomTextMapper.prototype._saveSelection = function() {
      var i, r, sel;
      if (this._savedSelection != null) {
        this._log("Selection saved at:");
        this._log(this._selectionSaved);
        throw new Error("Selection already saved!");
      }
      sel = this._rootWin.getSelection();
      this._savedSelection = (function() {
        var _i, _ref, _results;
        _results = [];
        for (i = _i = 0, _ref = sel.rangeCount; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
          r = sel.getRangeAt(i);
          _results.push({
            range: r,
            endOffset: r.endOffset
          });
        }
        return _results;
      })();
      return this._selectionSaved = (new Error("selection was saved here")).stack;
    };

    DomTextMapper.prototype._restoreSelection = function() {
      var r, sel, _i, _len, _ref;
      if (this._savedSelection == null) {
        throw new Error("No selection to restore.");
      }
      sel = this._rootWin.getSelection();
      sel.removeAllRanges();
      _ref = this._savedSelection;
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        r = _ref[_i];
        r.range.setEnd(r.range.endContainer, r.endOffset);
        sel.addRange(r.range);
      }
      return delete this._savedSelection;
    };

    DomTextMapper.prototype._selectNode = function(node, scroll) {
      var children, exception, realRange, sel, sn, _ref;
      if (scroll == null) {
        scroll = false;
      }
      if (node == null) {
        throw new Error("Called selectNode with null node!");
      }
      sel = this._rootWin.getSelection();
      sel.removeAllRanges();
      realRange = this._rootWin.document.createRange();
      if (node.nodeType === Node.ELEMENT_NODE && node.hasChildNodes() && (_ref = node.tagName.toLowerCase(), __indexOf.call(SELECT_CHILDREN_INSTEAD, _ref) >= 0)) {
        children = node.childNodes;
        realRange.setStartBefore(children[0]);
        realRange.setEndAfter(children[children.length - 1]);
        sel.addRange(realRange);
      } else {
        if (USE_TABLE_TEXT_WORKAROUND && node.nodeType === Node.TEXT_NODE && this._isWhitespace(node)) {

        } else {
          try {
            realRange.setStartBefore(node);
            realRange.setEndAfter(node);
            sel.addRange(realRange);
          } catch (_error) {
            exception = _error;
            if (!(USE_EMPTY_TEXT_WORKAROUND && this._isWhitespace(node))) {
              this._log("Warning: failed to scan element @ " + this.underTraverse);
              this._log("Content is: " + node.innerHTML);
              this._log("We won't be able to properly anchor to any text inside this element.");
            }
          }
        }
      }
      if (scroll) {
        sn = node;
        while ((sn != null) && (sn.scrollIntoViewIfNeeded == null)) {
          sn = sn.parentNode;
        }
        if (sn != null) {
          sn.scrollIntoViewIfNeeded();
        } else {
          this._log("Failed to scroll to element. (Browser does not support scrollIntoViewIfNeeded?)");
        }
      }
      return sel;
    };

    DomTextMapper.prototype._readSelectionText = function(sel) {
      sel || (sel = this._rootWin.getSelection());
      return sel.toString().trim().replace(/\n/g, " ").replace(/\s{2,}/g, " ");
    };

    DomTextMapper.prototype._getNodeSelectionText = function(node, shouldRestoreSelection) {
      var sel, text;
      if (shouldRestoreSelection == null) {
        shouldRestoreSelection = true;
      }
      if (shouldRestoreSelection) {
        this._saveSelection();
      }
      sel = this._selectNode(node);
      text = this._readSelectionText(sel);
      if (shouldRestoreSelection) {
        this._restoreSelection();
      }
      return text;
    };

    DomTextMapper.prototype._computeSourcePositions = function(match) {
      var dc, displayEnd, displayIndex, displayStart, displayText, sc, sourceEnd, sourceIndex, sourceStart, sourceText;
      sourceText = match.element.node.data.replace(/\n/g, " ");
      displayText = match.element.content;
      if (displayText.length > sourceText.length) {
        throw new Error("Invalid match at" + match.element.path + ": sourceText is '" + sourceText + "'," + " displayText is '" + displayText + "'.");
      }
      displayStart = match.start != null ? match.start : 0;
      displayEnd = match.end != null ? match.end : displayText.length;
      if (displayEnd === 0) {
        match.startCorrected = 0;
        match.endCorrected = 0;
        return;
      }
      sourceIndex = 0;
      displayIndex = 0;
      while (!((sourceStart != null) && (sourceEnd != null))) {
        sc = sourceText[sourceIndex];
        dc = displayText[displayIndex];
        if (sc === dc) {
          if (displayIndex === displayStart) {
            sourceStart = sourceIndex;
          }
          displayIndex++;
          if (displayIndex === displayEnd) {
            sourceEnd = sourceIndex + 1;
          }
        }
        sourceIndex++;
      }
      match.startCorrected = sourceStart;
      match.endCorrected = sourceEnd;
      return null;
    };

    DomTextMapper.prototype._getNodeContent = function(node, shouldRestoreSelection) {
      var content;
      if (shouldRestoreSelection == null) {
        shouldRestoreSelection = true;
      }
      content = this._getNodeSelectionText(node, shouldRestoreSelection);
      if ((node === this._pathStartNode) && (this._expectedContent != null)) {
        this._log("I should find out how to make actual content fit the expectations");
        content = this._expectedContent;
      }
      return content;
    };

    WHITESPACE = /^\s*$/;

    DomTextMapper.prototype._isWhitespace = function(node) {
      var child, mightBeEmpty, result;
      result = (function() {
        var _i, _len, _ref;
        switch (node.nodeType) {
          case Node.TEXT_NODE:
            return WHITESPACE.test(node.data);
          case Node.ELEMENT_NODE:
            mightBeEmpty = true;
            _ref = node.childNodes;
            for (_i = 0, _len = _ref.length; _i < _len; _i++) {
              child = _ref[_i];
              mightBeEmpty = mightBeEmpty && this._isWhitespace(child);
            }
            return mightBeEmpty;
          default:
            return false;
        }
      }).call(this);
      return result;
    };

    DomTextMapper.prototype.getPageIndex = function() {
      return 0;
    };

    DomTextMapper.prototype.getPageCount = function() {
      return 1;
    };

    DomTextMapper.prototype.getPageRoot = function() {
      return this._rootNode;
    };

    DomTextMapper.prototype._getPageIndexForPos = function() {
      return 0;
    };

    DomTextMapper.prototype.isPageMapped = function() {
      return true;
    };

    DomTextMapper.prototype._getIgnoredParts = function() {
      if (this._options.getIgnoredParts) {
        if (this._ignoredParts && this._options.cacheIgnoredParts) {
          return this._ignoredParts;
        } else {
          return this._ignoredParts = this._options.getIgnoredParts();
        }
      } else {
        return [];
      }
    };

    DomTextMapper.prototype._isIrrelevant = function(node) {
      var _ref;
      return node.nodeType === Node.ELEMENT_NODE && ((_ref = node.tagName.toLowerCase()) === "canvas" || _ref === "script");
    };

    DomTextMapper.prototype._isIgnored = function(node, ignoreIrrelevant, debug) {
      var container, _i, _len, _ref;
      if (ignoreIrrelevant == null) {
        ignoreIrrelevant = false;
      }
      if (debug == null) {
        debug = false;
      }
      if (!this._pathStartNode.contains(node)) {
        if (debug) {
          this._log("Node", node, "is ignored, because it's not a descendant of", this._pathStartNode, ".");
        }
        return true;
      }
      _ref = this._getIgnoredParts();
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        container = _ref[_i];
        if (container.contains(node)) {
          if (debug) {
            this._log("Node", node, "is ignore, because it's a descendant of", container);
          }
          return true;
        }
      }
      if (ignoreIrrelevant) {
        if (this._isIrrelevant(node)) {
          if (debug) {
            this._log("Node", node, "is ignored, because it's irrelevant.");
          }
          return true;
        }
      }
      if (debug) {
        this._log("Node", node, "is NOT ignored.");
      }
      return false;
    };

    DomTextMapper.prototype._findFirstIgnoredPositionInNode = function(node) {
      var child, info, start, _i, _len, _ref;
      if (this._isIgnored(node)) {
        info = this._getStartInfoForNode(node, false);
        if (info) {
          return info.start;
        }
      }
      if (!node.hasChildNodes()) {
        return null;
      }
      _ref = node.childNodes;
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        child = _ref[_i];
        start = this._findFirstIgnoredPositionInNode(child);
        if (start) {
          return start;
        }
      }
      return null;
    };

    DomTextMapper.prototype._findFirstIgnoredPosition = function() {
      this._saveSelection();
      this._ignorePos = this._findFirstIgnoredPositionInNode(this._pathStartNode);
      this._restoreSelection();
      delete this._dirty;
      return this._ignorePos;
    };

    DomTextMapper.prototype._isDirty = function() {
      var x;
      x = this._observer.takeSummaries();
      return (x != null) || this._dirty;
    };

    DomTextMapper.prototype._onMutation = function(summaries) {
      var oldCorpus,
        _this = this;
      this._dirty = true;
      oldCorpus = this._corpus;
      this._getFreshCorpus();
      if (this._corpus !== oldCorpus) {
        return setTimeout(function() {
          var event;
          event = document.createEvent("UIEvents");
          event.initUIEvent("corpusChange", true, false, window, 0);
          return _this._rootNode.dispatchEvent(event);
        });
      }
    };

    DomTextMapper.prototype._changeRootNode = function(node) {
      var _ref;
      if ((_ref = this._observer) != null) {
        _ref.disconnect();
      }
      this._observer = new MutationSummary({
        callback: this._onMutation,
        rootNode: node,
        queries: [
          {
            all: true
          }
        ]
      });
      return this._rootNode = node;
    };

    return DomTextMapper;

  })(TextMapperCore);

}).call(this);

/*
//@ sourceMappingURL=dom_text_mapper.map
*/


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="semtex.archery"
    android:versionCode="1"
    android:installLocation="auto"
    android:versionName="1.0" >
    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <application
        android:icon="@drawable/archery_front_icon_256_256"
        android:label="@string/app_name" android:backupAgent="semtex.archery.util.BasicGoogleBackupAgent"
        android:allowBackup="true" android:killAfterRestore="true" android:theme="@android:style/Theme.Black.NoTitleBar">
        <activity
            android:name=".TacActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="UserManager"></activity>
        <activity android:name="AddEditUser"></activity>
      @android:style/Theme.Black.NoTitleBar  <activity android:name="StartParcour"></activity>
        <activity android:name="Scoring"></activity>
        <activity android:name="Scoreboard"></activity>
        <activity android:name="Sharing"></activity>
        <activity android:name="History" android:launchMode="singleTop" android:label="@string/history">
          <intent-filter>
            <action android:name="android.intent.action.SEARCH" />
          </intent-filter>
          <meta-data
            android:name="android.app.searchable"
            android:resource="@xml/searchable" />
          <meta-data android:name="android.app.default_searchable"
                   android:value="History" />
        </activity>
        <meta-data android:name="com.google.android.backup.api_key" android:value="AEdPqrEAAAAISB_FPu5AUYzXaPWZjOq2juTT5h6pVLBcXZFfTA" />
        <activity android:name="ArcheryPreferences"></activity>
    </application>

</manifest>


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE concept PUBLIC "-//IXIA//DTD IXIA DITA Composite//EN" "../../system/dtd/ixia/IxiaDitabase.dtd">
<concept id="blackbery_ui_cover_CoverLabel" xml:lang="en-us">
    <title>Cover Labels</title>
    <shortdesc><i>Represents a label object to be displayed on the application's window cover.</i></shortdesc>
    <conbody>
        <p>{Sample - Using a label on a Window Cover} https://github.com/blackberry/BB10-WebWorks-Samples/tree/master/WindowCovers Sample that demonstrates how to use the BlackBerry CoverLabel API [BlackBerry on GitHub].
        </p>
    </conbody>
</concept>


text:
class AddTmpClientLineToEvents < ActiveRecord::Migration
  def change
  	add_column :events, :new_name, :string
  	add_column :events, :new_email, :string
  end
end


text:
/*
# This file is part of the Astrometry.net suite.
# Licensed under a 3-clause BSD style license - see LICENSE
*/

#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <assert.h>

#include "solvedclient.h"
#include "bl.h"

static int serveraddr_initialized = 0;
static struct sockaddr_in serveraddr;
static FILE* fserver = NULL;

int solvedclient_set_server(char* addr) {
	char buf[256];
	char* ind;
	struct hostent* he;
	int len;
	int port;
	if (fserver) {
		if (fflush(fserver) ||
			fclose(fserver)) {
			fprintf(stderr, "Failed to close previous connection to server.\n");
		}
		fserver = NULL;
	}
	if (!addr)
		return -1;
	ind = index(addr, ':');
	if (!ind) {
		fprintf(stderr, "Invalid IP:port address: %s\n", addr);
		return -1;
	}
	len = ind - addr;
	memcpy(buf, addr, len);
	buf[len] = '\0';
	he = gethostbyname(buf);
	if (!he) {
		fprintf(stderr, "Solved server \"%s\" not found: %s.\n", buf, hstrerror(h_errno));
		return -1;
	}
    if (!serveraddr_initialized) {
        memset(&serveraddr, 0, sizeof(serveraddr));
        serveraddr_initialized = 1;
    }
	memcpy(&(serveraddr.sin_addr), he->h_addr, he->h_length);
	port = atoi(ind+1);
	serveraddr.sin_family = AF_INET;
	serveraddr.sin_port = htons(port);

	return 0;
}

static int connect_to_server() {
	int sock;
	if (fserver)
		return 0;
	sock = socket(PF_INET, SOCK_STREAM, 0);
	if (sock == -1) {
		fprintf(stderr, "Couldn't create socket: %s\n", strerror(errno));
		return -1;
	}
	fserver = fdopen(sock, "r+b");
	if (!fserver) {
		fprintf(stderr, "Failed to fdopen socket: %s\n", strerror(errno));
		return -1;
	}
    assert(serveraddr_initialized);
    // gcc with strict-aliasing warns about this cast but it should be okay.
	if (connect(sock, (struct sockaddr*)&serveraddr, sizeof(serveraddr))) {
		fprintf(stderr, "Couldn't connect to server: %s\n", strerror(errno));
		if (fclose(fserver))
			fprintf(stderr, "Failed to close socket: %s\n", strerror(errno));
		fserver = NULL;
		return -1;
	}
	return 0;
}

int solvedclient_get(int filenum, int fieldnum) {
	char buf[256];
	const char* solvedstr = "solved";
	int nchars;
	int solved;

	if (connect_to_server())
		return -1;
	nchars = sprintf(buf, "get %i %i\n", filenum, fieldnum);
	if ((fwrite(buf, 1, nchars, fserver) != nchars) ||
		fflush(fserver)) {
		fprintf(stderr, "Failed to write request to server: %s\n", strerror(errno));
		fclose(fserver);
		fserver = NULL;
		return -1;
	}
	if (!fgets(buf, 256, fserver)) {
		fprintf(stderr, "Couldn't read response: %s\n", strerror(errno));
		fclose(fserver);
		fserver = NULL;
		return -1;
	}
	solved = (strncmp(buf, solvedstr, strlen(solvedstr)) == 0);
	return solved;
}

void solvedclient_set(int filenum, int fieldnum) {
	char buf[256];
	int nchars;
	if (connect_to_server())
		return;
	nchars = sprintf(buf, "set %i %i\n", filenum, fieldnum);
	if ((fwrite(buf, 1, nchars, fserver) != nchars) ||
		fflush(fserver)) {
		fprintf(stderr, "Failed to send command (%s) to solvedserver: %s\n", buf, strerror(errno));
		return;
	}
	// wait for response.
	if (!fgets(buf, 256, fserver)) {
		fprintf(stderr, "Couldn't read response: %s\n", strerror(errno));
		fclose(fserver);
		fserver = NULL;
		return;
	}
}

il* solvedclient_get_fields(int filenum, int firstfield, int lastfield,
							int maxnfields) {
	char* buf;
	int bufsize;
	il* list;
	char* cptr;
	int fld;
	int nchars;

	if (connect_to_server())
		return NULL;
	bufsize = 100 + 10 * (maxnfields ? maxnfields : (1 + lastfield - firstfield));
	buf = malloc(bufsize);
	nchars = sprintf(buf, "getall %i %i %i %i\n", filenum, firstfield,
					 lastfield, maxnfields);
	if ((fwrite(buf, 1, nchars, fserver) != nchars) ||
		fflush(fserver)) {
		fprintf(stderr, "Failed to send command (%s) to solvedserver: %s\n", buf, strerror(errno));
		return NULL;
	}
	// wait for response.
	if (!fgets(buf, bufsize, fserver)) {
		fprintf(stderr, "Couldn't read response: %s\n", strerror(errno));
		fclose(fserver);
		fserver = NULL;
		free(buf);
		return NULL;
	}
	if (sscanf(buf, "unsolved %i%n", &fld, &nchars) != 1) {
		fprintf(stderr, "Couldn't parse response: %s\n", buf);
		free(buf);
		return NULL;
	}
	if (fld != filenum) {
		fprintf(stderr, "Expected file number %i, not %i.\n", filenum, fld);
		free(buf);
		return NULL;
	}
	cptr = buf + nchars;
	list = il_new(256);
	while (*cptr && *cptr != '\n') {
		if (sscanf(cptr, " %i%n", &fld, &nchars) != 1) {
			fprintf(stderr, "Couldn't parse response: %s\n", buf);
			il_free(list);
			free(buf);
			return NULL;
		}
		cptr += nchars;
		il_append(list, fld);
	}
	free(buf);
	return list;
}


text:
import { Subscription } from 'expo-modules-core';
import { ColorValue } from 'react-native';
import { NavigationBarButtonStyle, NavigationBarBehavior, NavigationBarPosition, NavigationBarVisibility, NavigationBarVisibilityEvent } from './NavigationBar.types';
/**
 * Observe changes to the system navigation bar.
 * Due to platform constraints, this callback will also be triggered when the status bar visibility changes.
 *
 * @example
 * ```ts
 * NavigationBar.addVisibilityListener(({ visibility }) => {
 *   // ...
 * });
 * ```
 */
export declare function addVisibilityListener(listener: (event: NavigationBarVisibilityEvent) => void): Subscription;
/**
 * Changes the navigation bar's background color.
 *
 * @example
 * ```ts
 * NavigationBar.setBackgroundColorAsync("white");
 * ```
 * @param color Any valid [CSS 3 (SVG) color](http://www.w3.org/TR/css3-color/#svg-color).
 */
export declare function setBackgroundColorAsync(color: ColorValue): Promise<void>;
/**
 * Gets the navigation bar's background color.
 *
 * @example
 * ```ts
 * const color = await NavigationBar.getBackgroundColorAsync();
 * ```
 * @returns Current navigation bar color in hex format. Returns `#00000000` (transparent) on unsupported platforms (iOS, web).
 */
export declare function getBackgroundColorAsync(): Promise<ColorValue>;
/**
 * Changes the navigation bar's border color.
 *
 * @example
 * ```ts
 * NavigationBar.setBorderColorAsync("red");
 * ```
 * @param color Any valid [CSS 3 (SVG) color](http://www.w3.org/TR/css3-color/#svg-color).
 */
export declare function setBorderColorAsync(color: ColorValue): Promise<void>;
/**
 * Gets the navigation bar's top border color, also known as the "divider color".
 *
 * @example
 * ```ts
 * const color = await NavigationBar.getBorderColorAsync();
 * ```
 * @returns Navigation bar top border color in hex format. Returns `#00000000` (transparent) on unsupported platforms (iOS, web).
 */
export declare function getBorderColorAsync(): Promise<ColorValue>;
/**
 * Set the navigation bar's visibility.
 *
 * @example
 * ```ts
 * NavigationBar.setVisibilityAsync("hidden");
 * ```
 * @param color Based on CSS visibility property.
 */
export declare function setVisibilityAsync(visibility: NavigationBarVisibility): Promise<void>;
/**
 * Get the navigation bar's visibility.
 *
 * @example
 * ```ts
 * const visibility = await NavigationBar.getVisibilityAsync("hidden");
 * ```
 * @returns Navigation bar's current visibility status. Returns `hidden` on unsupported platforms (iOS, web).
 */
export declare function getVisibilityAsync(): Promise<NavigationBarVisibility>;
/**
 * Changes the navigation bar's button colors between white (`light`) and a dark gray color (`dark`).
 *
 * @example
 * ```ts
 * NavigationBar.setButtonStyleAsync("light");
 * ```
 * @param style Dictates the color of the foreground element color.
 */
export declare function setButtonStyleAsync(style: NavigationBarButtonStyle): Promise<void>;
/**
 * Gets the navigation bar's button color styles.
 *
 * @example
 * ```ts
 * const style = await NavigationBar.getButtonStyleAsync();
 * ```
 * @returns Navigation bar foreground element color settings. Returns `light` on unsupported platforms (iOS, web).
 */
export declare function getButtonStyleAsync(): Promise<NavigationBarButtonStyle>;
/**
 * Sets positioning method used for the navigation bar (and status bar).
 * Setting position `absolute` will float the navigation bar above the content,
 * whereas position `relative` will shrink the screen to inline the navigation bar.
 *
 * When drawing behind the status and navigation bars, ensure the safe area insets are adjusted accordingly.
 *
 * @example
 * ```ts
 * // enables edge-to-edge mode
 * await NavigationBar.setPositionAsync('absolute')
 * // transparent backgrounds to see through
 * await NavigationBar.setBackgroundColorAsync('#ffffff00')
 * ```
 * @param position Based on CSS position property.
 */
export declare function setPositionAsync(position: NavigationBarPosition): Promise<void>;
/**
 * Whether the navigation and status bars float above the app (absolute) or sit inline with it (relative).
 * This value can be incorrect if `androidNavigationBar.visible` is used instead of the config plugin `position` property.
 *
 * This method is unstable because the position can be set via another native module and get out of sync.
 * Alternatively, you can get the position by measuring the insets returned by `react-native-safe-area-context`.
 *
 * @example
 * ```ts
 * await NavigationBar.unstable_getPositionAsync()
 * ```
 * @returns Navigation bar positional rendering mode. Returns `relative` on unsupported platforms (iOS, web).
 */
export declare function unstable_getPositionAsync(): Promise<NavigationBarPosition>;
/**
 * Sets the behavior of the status bar and navigation bar when they are hidden and the user wants to reveal them.
 *
 * For example, if the navigation bar is hidden (`setVisibilityAsync(false)`) and the behavior
 * is `'overlay-swipe'`, the user can swipe from the bottom of the screen to temporarily reveal the navigation bar.
 *
 * - `'overlay-swipe'`: Temporarily reveals the System UI after a swipe gesture (bottom or top) without insetting your App's content.
 * - `'inset-swipe'`: Reveals the System UI after a swipe gesture (bottom or top) and insets your App's content (Safe Area). The System UI is visible until you explicitly hide it again.
 * - `'inset-touch'`: Reveals the System UI after a touch anywhere on the screen and insets your App's content (Safe Area). The System UI is visible until you explicitly hide it again.
 *
 * @example
 * ```ts
 * await NavigationBar.setBehaviorAsync('overlay-swipe')
 * ```
 * @param behavior Dictates the interaction behavior of the navigation bar.
 */
export declare function setBehaviorAsync(behavior: NavigationBarBehavior): Promise<void>;
/**
 * Gets the behavior of the status and navigation bars when the user swipes or touches the screen.
 *
 * @example
 * ```ts
 * await NavigationBar.getBehaviorAsync()
 * ```
 * @returns Navigation bar interaction behavior. Returns `inset-touch` on unsupported platforms (iOS, web).
 */
export declare function getBehaviorAsync(): Promise<NavigationBarBehavior>;
/**
 * React hook that statefully updates with the visibility of the system navigation bar.
 *
 * @example
 * ```ts
 * function App() {
 *   const visibility = NavigationBar.useVisibility()
 *   // React Component...
 * }
 * ```
 * @returns Visibility of the navigation bar, `null` during async initialization.
 */
export declare function useVisibility(): NavigationBarVisibility | null;
export * from './NavigationBar.types';
//# sourceMappingURL=NavigationBar.d.ts.map


text:
package com.mohiva.play.silhouette.api.util

import play.api.libs.ws.WSRequest
import play.api.test._

/**
 * Test case for the [[com.mohiva.play.silhouette.api.util.PlayHTTPLayer]] class.
 */
class PlayHTTPLayerSpec extends PlaySpecification {

  "The `url` method" should {
    "return a new WS.WSRequest instance" in new WithApplication {
      val url = "http://silhouette.mohiva.com"
      val httpLayer = new PlayHTTPLayer
      val requestHolder = httpLayer.url(url)

      requestHolder should beAnInstanceOf[WSRequest]
      requestHolder.url must be equalTo url
    }
  }
}


text:
#ifndef CPU_X86_VM_C2_GLOBALS_X86_HPP
#define CPU_X86_VM_C2_GLOBALS_X86_HPP

#include "utilities/globalDefinitions.hpp"
#include "utilities/macros.hpp"

// Sets the default values for platform dependent flags used by the server compiler.
// (see c2_globals.hpp).  Alpha-sorted.

define_pd_global(bool, BackgroundCompilation,        true);
define_pd_global(bool, UseTLAB,                      true);
define_pd_global(bool, ResizeTLAB,                   true);
define_pd_global(bool, CICompileOSR,                 true);
define_pd_global(bool, InlineIntrinsics,             true);
define_pd_global(bool, PreferInterpreterNativeStubs, false);
define_pd_global(bool, ProfileTraps,                 true);
define_pd_global(bool, UseOnStackReplacement,        true);
#ifdef CC_INTERP
define_pd_global(bool, ProfileInterpreter,           false);
#else
define_pd_global(bool, ProfileInterpreter,           true);
#endif // CC_INTERP
define_pd_global(bool, TieredCompilation,            false);
define_pd_global(intx, CompileThreshold,             10000);
define_pd_global(intx, BackEdgeThreshold,            100000);

define_pd_global(intx, OnStackReplacePercentage,     140);
define_pd_global(intx, ConditionalMoveLimit,         3);
define_pd_global(intx, FLOATPRESSURE,                6);
define_pd_global(intx, FreqInlineSize,               325);
#ifdef AMD64
define_pd_global(intx, INTPRESSURE,                  13);
define_pd_global(intx, InteriorEntryAlignment,       16);
define_pd_global(intx, NewSizeThreadIncrease, ScaleForWordSize(4*K));
define_pd_global(intx, LoopUnrollLimit,              60);
// InitialCodeCacheSize derived from specjbb2000 run.
define_pd_global(intx, InitialCodeCacheSize,         2496*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(intx, CodeCacheExpansionSize,       64*K);

// Ergonomics related flags
define_pd_global(uint64_t,MaxRAM,                    128ULL*G);
#else
define_pd_global(intx, INTPRESSURE,                  6);
define_pd_global(intx, InteriorEntryAlignment,       4);
define_pd_global(intx, NewSizeThreadIncrease,        4*K);
define_pd_global(intx, LoopUnrollLimit,              50);     // Design center runs on 1.3.1
// InitialCodeCacheSize derived from specjbb2000 run.
define_pd_global(intx, InitialCodeCacheSize,         2304*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(intx, CodeCacheExpansionSize,       32*K);

// Ergonomics related flags
define_pd_global(uint64_t,MaxRAM,                    4ULL*G);
#endif // AMD64
define_pd_global(intx, RegisterCostAreaRatio,        16000);

// Peephole and CISC spilling both break the graph, and so makes the
// scheduler sick.
define_pd_global(bool, OptoPeephole,                 true);
define_pd_global(bool, UseCISCSpill,                 true);
define_pd_global(bool, OptoScheduling,               false);
define_pd_global(bool, OptoBundling,                 false);

define_pd_global(intx, ReservedCodeCacheSize,        48*M);
define_pd_global(uintx,CodeCacheMinBlockLength,      4);

// Heap related flags
define_pd_global(uintx,PermSize,    ScaleForWordSize(16*M));
define_pd_global(uintx,MaxPermSize, ScaleForWordSize(64*M));

// Ergonomics related flags
define_pd_global(bool, NeverActAsServerClassMachine, false);

#endif // CPU_X86_VM_C2_GLOBALS_X86_HPP


text:
package de.surfice.smacrotools

abstract class ExtendableMacroAnnotationHandler extends ExtendableMacro {
  override def extensionClasses: Seq[String] = setting("smacrotools.extensions","") match {
    case "" => Nil
    case s => s.split(";")
  }
}


text:
export const ADD_MODEL = 'ADD_MODEL';
export const ADD_INDEX = 'ADD_INDEX';
export const SAVE_FILE = 'SAVE_FILE';

export function addModel(name) {
  return {
    type: ADD_MODEL,
    name
  };
}

export function addIndex(name) {
  return {
    type: ADD_INDEX,
    name
  };
}

export function saveFile() {
  return {
    type: SAVE_FILE
  }
}


text:
from ork.task import task

@task()
def flour():
    print('Producing flour')
    return 'flour'

@task()
def water():
    print('Producing water')
    return 'water'

@task()
def yeast():
    print('Producing yeast')
    return 'yeast'

@task()
def pepperoni():
    print('Producing pepperoni')
    return 'pepperoni'

@task()
def tomato_sauce():
    print('Producing tomato sauce')
    return 'tomato sauce'

@task()
def cheese():
    print('Producing cheese')
    return 'cheese'

@task()
def prepare_dough(*ingredients):
    print('Preparing dough from {}'.format(', '.join(ingredients)))
    return 'dough'

@task()
def cook_pizza(*ingredients):
    print('Cooking pizza from {}'.format(', '.join(ingredients)))
    return 'pizza'

@task()
def eat(food):
    print('Eating {}'.format(food))

dough = prepare_dough.delay(flour.delay(), water.delay(), yeast.delay())
cooked_pizza = cook_pizza.delay(dough, tomato_sauce.delay(), cheese.delay(),
                                pepperoni.delay())
eat.delay(cooked_pizza)


text:
package cz.kramolis.mega.config.internal;

import java.util.List;
import java.util.Map;

import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;

import cz.kramolis.mega.Component;
import cz.kramolis.mega.Environment;
import cz.kramolis.mega.config.Configuration;
import cz.kramolis.mega.messaging.Messaging;

public class HoconConfiguration implements Configuration {

    private Config config;

    private HoconConfiguration(final Config config) {
        this.config = config;
    }

    @Override
    public boolean hasValue(final String name) {
        return config.hasPath(name);
    }

    @Override
    public String getString(final String name) {
        if (!hasValue(name)) {
            return null;
        }
        return config.getString(name);
    }

    @Override
    public List<String> getStringList(final String name) {
        if (!hasValue(name)) {
            return null;
        }
        return config.getStringList(name);
    }

    @Override
    public Integer getInteger(final String name) {
        if (!hasValue(name)) {
            return null;
        }
        return config.getInt(name);
    }

    @Override
    public Double getDouble(final String name) {
        if (!hasValue(name)) {
            return null;
        }
        return config.getDouble(name);
    }

    @Override
    public Boolean getBoolean(final String name) {
        return hasValue(name) && config.getBoolean(name);
    }

    @Override
    public <T> T getValue(final String name) {
        if (!hasValue(name)) {
            return null;
        }
        return (T) config.getValue(name).unwrapped();
    }

    @Override
    public Configuration getConfiguration(final String name) {
        if (!hasValue(name)) {
            return null;
        }
        return new HoconConfiguration(config.getConfig(name)); //TODO cache
    }

    //
    // class Provider
    //

    public static class Provider implements Messaging.Subscriber, Component {

        private Environment environment;

        public void setEnvironment(final Environment environment) {
            this.environment = environment;
        }

        @Override
        public void onEvent(final Messaging.Event event, final Map<String, String> eventProperties) {
            if (Environment.Event.STATE_CHANGED.equals(event)) {
                final Config config = ConfigFactory.load();
                environment.getRegistry().put(Configuration.class, new HoconConfiguration(config));
                environment.getMessaging().fire(Event.LOADED);
            }
        }

    }

}


text:
<?php
// src/Blogger/BlogBundle/Form/NewPostType.php

namespace Blogger\BlogBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class NewPostType extends AbstractType
{

    public function buildForm(FormBuilderInterface $builder, array $options)
    {
	   $builder->add('post_creator', 'hidden');
	   $builder->add('post_title','text');
	   $builder->add('post_text','textarea');
    }

    public function getName()
    {
        return 'post';
    }

   public function getDefaultOptions(array $options)
    {
        /* If this form corresponds to an Entity, we should include it here */
        return array(
            'data_class' => 'Blogger\BlogBundle\Entity\Post',
        );
    }
}


text:
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_WEBSOCKETS_WEBSOCKET_CHANNEL_IMPL_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_WEBSOCKETS_WEBSOCKET_CHANNEL_IMPL_H_

#include <stdint.h>

#include <memory>
#include <utility>

#include "base/containers/span.h"
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_refptr.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/system/simple_watcher.h"
#include "services/network/public/mojom/websocket.mojom-blink.h"
#include "third_party/blink/public/mojom/websockets/websocket_connector.mojom-blink-forward.h"
#include "third_party/blink/renderer/bindings/core/v8/source_location.h"
#include "third_party/blink/renderer/core/fileapi/blob.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/modules/websockets/websocket_channel.h"
#include "third_party/blink/renderer/modules/websockets/websocket_message_chunk_accumulator.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
#include "third_party/blink/renderer/platform/heap/prefinalizer.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_receiver.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_remote.h"
#include "third_party/blink/renderer/platform/mojo/heap_mojo_wrapper_mode.h"
#include "third_party/blink/renderer/platform/scheduler/public/frame_scheduler.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
#include "third_party/blink/renderer/platform/wtf/deque.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "third_party/blink/renderer/platform/wtf/wtf_size_t.h"

namespace v8 {
class Isolate;
}  // namespace v8

namespace blink {

class BaseFetchContext;
enum class FileErrorCode;
class WebSocketChannelClient;
class WebSocketHandshakeThrottle;

// This is an implementation of WebSocketChannel. This is created on the main
// thread for Document, or on the worker thread for WorkerGlobalScope. All
// functions must be called on the execution context's thread.
class MODULES_EXPORT WebSocketChannelImpl final
    : public WebSocketChannel,
      public network::mojom::blink::WebSocketHandshakeClient,
      public network::mojom::blink::WebSocketClient {
  USING_PRE_FINALIZER(WebSocketChannelImpl, Dispose);

 public:
  // Public for use in tests.
  static constexpr size_t kMaxWebSocketsPerRenderProcess = 255u;

  // You can specify the source file and the line number information
  // explicitly by passing the last parameter.
  // In the usual case, they are set automatically and you don't have to
  // pass it.
  static WebSocketChannelImpl* Create(ExecutionContext* context,
                                      WebSocketChannelClient* client,
                                      std::unique_ptr<SourceLocation> location);
  static WebSocketChannelImpl* CreateForTesting(
      ExecutionContext*,
      WebSocketChannelClient*,
      std::unique_ptr<SourceLocation>,
      std::unique_ptr<WebSocketHandshakeThrottle>);

  WebSocketChannelImpl(ExecutionContext*,
                       WebSocketChannelClient*,
                       std::unique_ptr<SourceLocation>);
  ~WebSocketChannelImpl() override;

  // WebSocketChannel functions.
  bool Connect(const KURL&, const String& protocol) override;
  SendResult Send(const std::string& message,
                  base::OnceClosure completion_callback) override;
  SendResult Send(const DOMArrayBuffer&,
                  size_t byte_offset,
                  size_t byte_length,
                  base::OnceClosure completion_callback) override;
  void Send(scoped_refptr<BlobDataHandle>) override;
  // Start closing handshake. Use the CloseEventCodeNotSpecified for the code
  // argument to omit payload.
  void Close(int code, const String& reason) override;
  void Fail(const String& reason,
            mojom::ConsoleMessageLevel,
            std::unique_ptr<SourceLocation>) override;
  void Disconnect() override;
  void CancelHandshake() override;
  void ApplyBackpressure() override;
  void RemoveBackpressure() override;

  // network::mojom::blink::WebSocketHandshakeClient methods:
  void OnOpeningHandshakeStarted(
      network::mojom::blink::WebSocketHandshakeRequestPtr) override;
  void OnFailure(const WTF::String& message,
                 int net_error,
                 int response_code) override;
  void OnConnectionEstablished(
      mojo::PendingRemote<network::mojom::blink::WebSocket> websocket,
      mojo::PendingReceiver<network::mojom::blink::WebSocketClient>
          client_receiver,
      network::mojom::blink::WebSocketHandshakeResponsePtr,
      mojo::ScopedDataPipeConsumerHandle readable,
      mojo::ScopedDataPipeProducerHandle writable) override;

  // network::mojom::blink::WebSocketClient methods:
  void OnDataFrame(bool fin,
                   network::mojom::blink::WebSocketMessageType,
                   uint64_t data_length) override;
  void OnDropChannel(bool was_clean,
                     uint16_t code,
                     const String& reason) override;
  void OnClosingHandshake() override;

  void Trace(Visitor*) const override;

 private:
  struct DataFrame final {
    DataFrame(bool fin,
              network::mojom::blink::WebSocketMessageType type,
              uint32_t data_length)
        : fin(fin), type(type), data_length(data_length) {}

    bool fin;
    network::mojom::blink::WebSocketMessageType type;
    uint32_t data_length;
  };

  // Used by BlobLoader and Message, so defined here so that it can be shared.
  class MessageDataDeleter {
   public:
    // This constructor exists to permit default construction of the MessageData
    // type, but the deleter cannot be called when it was used.
    MessageDataDeleter() : isolate_(nullptr), size_(0) {}

    MessageDataDeleter(v8::Isolate* isolate, size_t size)
        : isolate_(isolate), size_(size) {}

    MessageDataDeleter(const MessageDataDeleter&) = default;
    MessageDataDeleter& operator=(const MessageDataDeleter&) = default;

    void operator()(char* p) const;

   private:
    v8::Isolate* isolate_;
    size_t size_;
  };

  using MessageData = std::unique_ptr<char[], MessageDataDeleter>;

  static MessageData CreateMessageData(v8::Isolate*, size_t);

  friend class WebSocketChannelImplHandshakeThrottleTest;
  FRIEND_TEST_ALL_PREFIXES(WebSocketChannelImplHandshakeThrottleTest,
                           ThrottleSucceedsFirst);
  FRIEND_TEST_ALL_PREFIXES(WebSocketChannelImplHandshakeThrottleTest,
                           HandshakeSucceedsFirst);
  FRIEND_TEST_ALL_PREFIXES(WebSocketChannelImplHandshakeThrottleTest,
                           ThrottleReportsErrorBeforeConnect);
  FRIEND_TEST_ALL_PREFIXES(WebSocketChannelImplHandshakeThrottleTest,
                           ThrottleReportsErrorAfterConnect);

  class BlobLoader;
  class Message;
  struct ConnectInfo;

  enum MessageType {
    kMessageTypeText,
    kMessageTypeBlob,
    kMessageTypeArrayBuffer,
    kMessageTypeClose,
  };

  struct ReceivedMessage {
    bool is_message_text;
    Vector<char> data;
  };

  class Message final {
    DISALLOW_NEW();

   public:
    using DidCallSendMessage =
        base::StrongAlias<class DidCallSendMessageTag, bool>;

    // Initializes message as a string
    Message(v8::Isolate*,
            const std::string&,
            base::OnceClosure completion_callback,
            DidCallSendMessage did_call_send_message);

    // Initializes message as a blob
    explicit Message(scoped_refptr<BlobDataHandle>);

    // Initializes message from the contents of a blob
    Message(MessageData, size_t);

    // Initializes message as a ArrayBuffer
    Message(v8::Isolate*,
            base::span<const char> message,
            base::OnceClosure completion_callback,
            DidCallSendMessage did_call_send_message);

    // Initializes a Blank message
    Message(MessageType type,
            base::span<const char> message,
            base::OnceClosure completion_callback);

    // Close message
    Message(uint16_t code, const String& reason);

    Message(const Message&) = delete;
    Message& operator=(const Message&) = delete;

    Message(Message&&);
    Message& operator=(Message&&);

    MessageType Type() const;
    scoped_refptr<BlobDataHandle> GetBlobDataHandle();
    DidCallSendMessage GetDidCallSendMessage() const;
    uint16_t Code() const;
    String Reason() const;
    base::OnceClosure CompletionCallback();

    // Returns a mutable |pending_payload_|. Since calling code always mutates
    // the value, |pending_payload_| only has a mutable getter.
    base::span<const char>& MutablePendingPayload();

    void SetDidCallSendMessage(DidCallSendMessage did_call_send_message);

   private:
    MessageData message_data_;
    MessageType type_;

    scoped_refptr<BlobDataHandle> blob_data_handle_;
    base::span<const char> pending_payload_;
    DidCallSendMessage did_call_send_message_ = DidCallSendMessage(false);
    uint16_t code_ = 0;
    String reason_;
    base::OnceClosure completion_callback_;
  };

  // A handle to a global count of the number of WebSockets that have been
  // created. Can be used to limit the total number of WebSockets that have been
  // created in this render process.
  class ConnectionCountTrackerHandle {
    DISALLOW_NEW();

   public:
    enum class CountStatus {
      kOkayToConnect,
      kShouldNotConnect,
    };

    ConnectionCountTrackerHandle() = default;
    ~ConnectionCountTrackerHandle() = default;

    ConnectionCountTrackerHandle(const ConnectionCountTrackerHandle&) = delete;
    ConnectionCountTrackerHandle& operator=(
        const ConnectionCountTrackerHandle&) = delete;

    // Increments the count and returns SHOULD_NOT_CONNECT if it exceeds
    // kMaxWebSocketsPerRenderProcess. Should only be called once.
    CountStatus IncrementAndCheckStatus();

    // Decrements the count. Should be called at least once. If there is no
    // matching call to IncrementAndCheckStatus() it does nothing, so it is safe
    // to call multiple times.
    void Decrement();

   private:
    bool incremented_ = false;
  };

  // The state is defined to see the conceptual state more clearly than checking
  // various members (for DCHECKs for example). This is only used internally.
  enum class State {
    // The channel is running an opening handshake. This is the initial state.
    // It becomes |kOpen| when the connection is established. It becomes
    // |kDisconnected| when detecting an error.
    kConnecting,
    // The channel is ready to send / receive messages. It becomes
    // |kDisconnected| when the connection is closed or when an error happens.
    kOpen,
    // The channel is not ready for communication. The channel stays in this
    // state forever.
    kDisconnected,
  };
  State GetState() const;

  bool MaybeSendSynchronously(network::mojom::blink::WebSocketMessageType,
                              base::span<const char>* data);
  void ProcessSendQueue();
  bool SendMessageData(base::span<const char>* data);
  void FailAsError(const String& reason) {
    Fail(reason, mojom::ConsoleMessageLevel::kError,
         location_at_construction_->Clone());
  }
  void AbortAsyncOperations();
  void HandleDidClose(bool was_clean, uint16_t code, const String& reason);

  // Completion callback. It is called with the results of throttling.
  void OnCompletion(const absl::optional<WebString>& error);

  // Methods for BlobLoader.
  void DidFinishLoadingBlob(MessageData, size_t);
  void BlobTooLarge();
  void DidFailLoadingBlob(FileErrorCode);

  void TearDownFailedConnection();
  bool ShouldDisallowConnection(const KURL&);

  BaseFetchContext* GetBaseFetchContext() const;

  // Called when |readable_| becomes readable.
  void OnReadable(MojoResult result, const mojo::HandleSignalsState& state);
  void ConsumePendingDataFrames();
  void ConsumeDataFrame(bool fin,
                        network::mojom::blink::WebSocketMessageType type,
                        const char* data,
                        size_t data_size);
  // Called when |writable_| becomes writable.
  void OnWritable(MojoResult result, const mojo::HandleSignalsState& state);
  MojoResult ProduceData(base::span<const char>* data,
                         uint64_t* consumed_buffered_amount);
  String GetTextMessage(const Vector<base::span<const char>>& chunks,
                        wtf_size_t size);
  void OnConnectionError(const base::Location& set_from,
                         uint32_t custom_reason,
                         const std::string& description);
  void Dispose();

  const Member<WebSocketChannelClient> client_;
  KURL url_;
  uint64_t identifier_;
  Member<BlobLoader> blob_loader_;
  WTF::Deque<Message> messages_;
  WebSocketMessageChunkAccumulator message_chunks_;
  const Member<ExecutionContext> execution_context_;

  bool backpressure_ = false;
  bool receiving_message_type_is_text_ = false;
  bool received_text_is_all_ascii_ = true;
  bool throttle_passed_ = false;
  bool has_initiated_opening_handshake_ = false;
  size_t sent_size_of_top_message_ = 0;
  FrameScheduler::SchedulingAffectingFeatureHandle
      feature_handle_for_scheduler_;
  WTF::String failure_message_;

  const std::unique_ptr<const SourceLocation> location_at_construction_;
  network::mojom::blink::WebSocketHandshakeRequestPtr handshake_request_;
  std::unique_ptr<WebSocketHandshakeThrottle> handshake_throttle_;
  // This field is only initialised if the object is still waiting for a
  // throttle response when DidConnect is called.
  std::unique_ptr<ConnectInfo> connect_info_;

  HeapMojoRemote<network::mojom::blink::WebSocket> websocket_;
  HeapMojoReceiver<network::mojom::blink::WebSocketHandshakeClient,
                   WebSocketChannelImpl>
      handshake_client_receiver_;
  HeapMojoReceiver<network::mojom::blink::WebSocketClient, WebSocketChannelImpl>
      client_receiver_;

  mojo::ScopedDataPipeConsumerHandle readable_;
  mojo::SimpleWatcher readable_watcher_;
  WTF::Deque<DataFrame> pending_data_frames_;

  mojo::ScopedDataPipeProducerHandle writable_;
  mojo::SimpleWatcher writable_watcher_;
  bool wait_for_writable_ = false;
  ConnectionCountTrackerHandle connection_count_tracker_handle_;

  const scoped_refptr<base::SingleThreadTaskRunner> file_reading_task_runner_;
};

MODULES_EXPORT std::ostream& operator<<(std::ostream&,
                                        const WebSocketChannelImpl*);

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_WEBSOCKETS_WEBSOCKET_CHANNEL_IMPL_H_


text:
@interface EditableCell : UITableViewCell {
	UITextField *field;
}

@property(readwrite, nonatomic, assign) UITextField *field;

@end


text:
SELECT '' AS two, unique1, unique2, stringu1
		FROM onek WHERE unique1 > 50
		ORDER BY unique1 LIMIT 2;
SELECT '' AS five, unique1, unique2, stringu1
		FROM onek WHERE unique1 > 60
		ORDER BY unique1 LIMIT 5;
SELECT '' AS two, unique1, unique2, stringu1
		FROM onek WHERE unique1 > 60 AND unique1 < 63
		ORDER BY unique1 LIMIT 5;
SELECT '' AS three, unique1, unique2, stringu1
 		FROM onek WHERE unique1 > 100
 		ORDER BY unique1 LIMIT 3 OFFSET 20;
SELECT '' AS zero, unique1, unique2, stringu1
		FROM onek WHERE unique1 < 50
		ORDER BY unique1 DESC LIMIT 8 OFFSET 99;
SELECT '' AS eleven, unique1, unique2, stringu1
		FROM onek WHERE unique1 < 50
 		ORDER BY unique1 DESC LIMIT 20 OFFSET 39;
SELECT '' AS ten, unique1, unique2, stringu1
 		FROM onek
 		ORDER BY unique1 OFFSET 990;
-- SELECT '' AS five, unique1, unique2, stringu1
-- 		FROM onek
-- 		ORDER BY unique1 OFFSET 990 LIMIT 5;
SELECT '' AS five, unique1, unique2, stringu1
 		FROM onek
 		ORDER BY unique1 LIMIT 5 OFFSET 900;

CREATE OR REPLACE TEMPORARY VIEW INT8_TBL AS SELECT * FROM
  (VALUES
    (123, 456),
    (123, 4567890123456789),
    (4567890123456789, 123),
    (4567890123456789, 4567890123456789),
    (4567890123456789, -4567890123456789))
  AS v(q1, q2);

-- Test null limit and offset.  The planner would discard a simple null
-- constant, so to ensure executor is exercised, do this:
-- [SPARK-29650] Discard a NULL constant in LIMIT
select * from int8_tbl limit (case when random() < 0.5 then bigint(null) end);
select * from int8_tbl offset (case when random() < 0.5 then bigint(null) end);

-- Test assorted cases involving backwards fetch from a LIMIT plan node
-- [SPARK-20965] Support PREPARE/EXECUTE/DECLARE/FETCH statements
-- begin;
--
-- declare c1 cursor for select * from int8_tbl limit 10;
-- fetch all in c1;
-- fetch 1 in c1;
-- fetch backward 1 in c1;
-- fetch backward all in c1;
-- fetch backward 1 in c1;
-- fetch all in c1;
--
-- declare c2 cursor for select * from int8_tbl limit 3;
-- fetch all in c2;
-- fetch 1 in c2;
-- fetch backward 1 in c2;
-- fetch backward all in c2;
-- fetch backward 1 in c2;
-- fetch all in c2;
--
-- declare c3 cursor for select * from int8_tbl offset 3;
-- fetch all in c3;
-- fetch 1 in c3;
-- fetch backward 1 in c3;
-- fetch backward all in c3;
-- fetch backward 1 in c3;
-- fetch all in c3;
--
-- declare c4 cursor for select * from int8_tbl offset 10;
-- fetch all in c4;
-- fetch 1 in c4;
-- fetch backward 1 in c4;
-- fetch backward all in c4;
-- fetch backward 1 in c4;
-- fetch all in c4;
--
-- rollback;

DROP VIEW INT8_TBL;

-- Stress test for variable LIMIT in conjunction with bounded-heap sorting

-- [SPARK-27767] Built-in function: generate_series
-- SELECT
--   (SELECT n
--      FROM (VALUES (1)) AS x,
--           (SELECT n FROM generate_series(1,10) AS n
--              ORDER BY n LIMIT 1 OFFSET s-1) AS y) AS z
--   FROM generate_series(1,10) AS s;

--
-- Test behavior of volatile and set-returning functions in conjunction
-- with ORDER BY and LIMIT.
--

-- [SPARK-29631] Support ANSI SQL CREATE SEQUENCE
-- create temp sequence testseq;

-- explain (verbose, costs off)
-- select unique1, unique2, nextval('testseq')
--   from tenk1 order by unique2 limit 10;

-- select unique1, unique2, nextval('testseq')
--   from tenk1 order by unique2 limit 10;

-- select currval('testseq');

-- explain (verbose, costs off)
-- select unique1, unique2, nextval('testseq')
--   from tenk1 order by tenthous limit 10;

-- select unique1, unique2, nextval('testseq')
--   from tenk1 order by tenthous limit 10;

-- select currval('testseq');

-- explain (verbose, costs off)
-- select unique1, unique2, generate_series(1,10)
--   from tenk1 order by unique2 limit 7;

-- [SPARK-27767] Built-in function: generate_series
-- select unique1, unique2, generate_series(1,10)
--   from tenk1 order by unique2 limit 7;

-- explain (verbose, costs off)
-- select unique1, unique2, generate_series(1,10)
--   from tenk1 order by tenthous limit 7;

-- [SPARK-27767] Built-in function: generate_series
-- select unique1, unique2, generate_series(1,10)
--   from tenk1 order by tenthous limit 7;

-- use of random() is to keep planner from folding the expressions together
-- explain (verbose, costs off)
-- select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2;

-- [SPARK-27767] Built-in function: generate_series
-- select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2;

-- explain (verbose, costs off)
-- select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2
-- order by s2 desc;

-- [SPARK-27767] Built-in function: generate_series
-- select generate_series(0,2) as s1, generate_series((random()*.1)::int,2) as s2
-- order by s2 desc;

-- test for failure to set all aggregates' aggtranstype
-- explain (verbose, costs off)
-- select sum(tenthous) as s1, sum(tenthous) + random()*0 as s2
--   from tenk1 group by thousand order by thousand limit 3;

select sum(tenthous) as s1, sum(tenthous) + random()*0 as s2
  from tenk1 group by thousand order by thousand limit 3;


text:
hostname

# Distribution name and version
echo
echo '## Distribution name and version'
head -n1 /etc/issue

# Kernel version and system architecture
echo
echo '## Kernel version and system architecture'
uname -snrm

# RAM info
echo
echo '## RAM info'
grep MemTotal /proc/meminfo

# CPU info
echo
echo '## CPU info'
grep "model name" /proc/cpuinfo
echo
lscpu

# Network interfaces
echo
echo '## Network interfaces'
lspci | egrep -i 'network|ethernet'
echo
ifconfig

# Partitions
echo
echo '## Partitions'
df -Th
echo
cat /proc/partitions

# Mounted filesystems
echo
echo '## Mounted filesystems'
mount | column -t

echo
echo "Generated on `date`"