text:
from __future__ import absolute_import, division, print_function
__metaclass__ = type

ANSIBLE_METADATA = {
    'metadata_version': '1.1',
    'status': ['deprecated'],
    'supported_by': 'community'
}

DOCUMENTATION = r'''
---
module: vmware_host_vmnic_facts
deprecated:
  removed_in: '2.13'
  why: Deprecated in favour of C(_info) module.
  alternative: Use M(vmware_host_vmnic_info) instead.
short_description: Gathers facts about vmnics available on the given ESXi host
description:
- This module can be used to gather facts about vmnics available on the given ESXi host.
- If C(cluster_name) is provided, then vmnic facts about all hosts from given cluster will be returned.
- If C(esxi_hostname) is provided, then vmnic facts about given host system will be returned.
- Additional details about vswitch and dvswitch with respective vmnic is also provided which is added in 2.7 version.
version_added: '2.5'
author:
- Abhijeet Kasurde (@Akasurde)
- Christian Kotte (@ckotte)
notes:
- Tested on vSphere 6.5
requirements:
- python >= 2.6
- PyVmomi
options:
  capabilities:
    description:
    - Gather facts about general capabilities (Auto negotiation, Wake On LAN, and Network I/O Control).
    type: bool
    default: false
    version_added: 2.8
  directpath_io:
    description:
    - Gather facts about DirectPath I/O capabilities and configuration.
    type: bool
    default: false
    version_added: 2.8
  sriov:
    description:
    - Gather facts about SR-IOV capabilities and configuration.
    type: bool
    default: false
    version_added: 2.8
  esxi_hostname:
    description:
    - Name of the host system to work with.
    - Vmnic facts about this ESXi server will be returned.
    - This parameter is required if C(cluster_name) is not specified.
    type: str
  cluster_name:
    description:
    - Name of the cluster from which all host systems will be used.
    - Vmnic facts about each ESXi server will be returned for the given cluster.
    - This parameter is required if C(esxi_hostname) is not specified.
    type: str
extends_documentation_fragment: vmware.documentation
'''

EXAMPLES = r'''
- name: Gather facts about vmnics of all ESXi Host in the given Cluster
  vmware_host_vmnic_facts:
    hostname: '{{ vcenter_hostname }}'
    username: '{{ vcenter_username }}'
    password: '{{ vcenter_password }}'
    cluster_name: '{{ cluster_name }}'
  delegate_to: localhost
  register: cluster_host_vmnics

- name: Gather facts about vmnics of an ESXi Host
  vmware_host_vmnic_facts:
    hostname: '{{ vcenter_hostname }}'
    username: '{{ vcenter_username }}'
    password: '{{ vcenter_password }}'
    esxi_hostname: '{{ esxi_hostname }}'
  delegate_to: localhost
  register: host_vmnics
'''

RETURN = r'''
hosts_vmnics_facts:
    description:
    - dict with hostname as key and dict with vmnics facts as value.
    - for C(num_vmnics), only NICs starting with vmnic are counted. NICs like vusb* are not counted.
    - details about vswitch and dvswitch was added in version 2.7.
    - details about vmnics was added in version 2.8.
    returned: hosts_vmnics_facts
    type: dict
    sample:
        {
            "10.76.33.204": {
                "all": [
                    "vmnic0",
                    "vmnic1"
                ],
                "available": [],
                "dvswitch": {
                    "dvs_0002": [
                        "vmnic1"
                    ]
                },
                "num_vmnics": 2,
                "used": [
                    "vmnic1",
                    "vmnic0"
                ],
                "vmnic_details": [
                    {
                        "actual_duplex": "Full Duplex",
                        "actual_speed": 10000,
                        "adapter": "Intel(R) 82599 10 Gigabit Dual Port Network Connection",
                        "configured_duplex": "Auto negotiate",
                        "configured_speed": "Auto negotiate",
                        "device": "vmnic0",
                        "driver": "ixgbe",
                        "location": "0000:01:00.0",
                        "mac": "aa:bb:cc:dd:ee:ff",
                        "status": "Connected",
                    },
                    {
                        "actual_duplex": "Full Duplex",
                        "actual_speed": 10000,
                        "adapter": "Intel(R) 82599 10 Gigabit Dual Port Network Connection",
                        "configured_duplex": "Auto negotiate",
                        "configured_speed": "Auto negotiate",
                        "device": "vmnic1",
                        "driver": "ixgbe",
                        "location": "0000:01:00.1",
                        "mac": "ab:ba:cc:dd:ee:ff",
                        "status": "Connected",
                    },
                ],
                "vswitch": {
                    "vSwitch0": [
                        "vmnic0"
                    ]
                }
            }
        }
'''

try:
    from pyVmomi import vim
except ImportError:
    pass

from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.vmware import vmware_argument_spec, PyVmomi, get_all_objs

class HostVmnicMgr(PyVmomi):
    """Class to manage vmnic facts"""
    def __init__(self, module):
        super(HostVmnicMgr, self).__init__(module)
        self.capabilities = self.params.get('capabilities')
        self.directpath_io = self.params.get('directpath_io')
        self.sriov = self.params.get('sriov')
        cluster_name = self.params.get('cluster_name', None)
        esxi_host_name = self.params.get('esxi_hostname', None)
        self.hosts = self.get_all_host_objs(cluster_name=cluster_name, esxi_host_name=esxi_host_name)
        if not self.hosts:
            self.module.fail_json(msg="Failed to find host system.")

    def find_dvs_by_uuid(self, uuid=None):
        """Find DVS by it's UUID"""
        dvs_obj = None
        if uuid is None:
            return dvs_obj

        dvswitches = get_all_objs(self.content, [vim.DistributedVirtualSwitch])
        for dvs in dvswitches:
            if dvs.uuid == uuid:
                dvs_obj = dvs
                break

        return dvs_obj

    def gather_host_vmnic_facts(self):
        """Gather vmnic facts"""
        hosts_vmnic_facts = {}
        for host in self.hosts:
            host_vmnic_facts = dict(all=[], available=[], used=[], vswitch=dict(), dvswitch=dict())
            host_nw_system = host.configManager.networkSystem
            if host_nw_system:
                nw_config = host_nw_system.networkConfig
                vmnics = [pnic.device for pnic in nw_config.pnic if pnic.device.startswith('vmnic')]
                host_vmnic_facts['all'] = [pnic.device for pnic in nw_config.pnic]
                host_vmnic_facts['num_vmnics'] = len(vmnics)
                host_vmnic_facts['vmnic_details'] = []
                for pnic in host.config.network.pnic:
                    pnic_facts = dict()
                    if pnic.device.startswith('vmnic'):
                        if pnic.pci:
                            pnic_facts['location'] = pnic.pci
                            for pci_device in host.hardware.pciDevice:
                                if pci_device.id == pnic.pci:
                                    pnic_facts['adapter'] = pci_device.vendorName + ' ' + pci_device.deviceName
                                    break
                        else:
                            pnic_facts['location'] = 'PCI'
                        pnic_facts['device'] = pnic.device
                        pnic_facts['driver'] = pnic.driver
                        if pnic.linkSpeed:
                            pnic_facts['status'] = 'Connected'
                            pnic_facts['actual_speed'] = pnic.linkSpeed.speedMb
                            pnic_facts['actual_duplex'] = 'Full Duplex' if pnic.linkSpeed.duplex else 'Half Duplex'
                        else:
                            pnic_facts['status'] = 'Disconnected'
                            pnic_facts['actual_speed'] = 'N/A'
                            pnic_facts['actual_duplex'] = 'N/A'
                        if pnic.spec.linkSpeed:
                            pnic_facts['configured_speed'] = pnic.spec.linkSpeed.speedMb
                            pnic_facts['configured_duplex'] = 'Full Duplex' if pnic.spec.linkSpeed.duplex else 'Half Duplex'
                        else:
                            pnic_facts['configured_speed'] = 'Auto negotiate'
                            pnic_facts['configured_duplex'] = 'Auto negotiate'
                        pnic_facts['mac'] = pnic.mac
                        # General NIC capabilities
                        if self.capabilities:
                            pnic_facts['nioc_status'] = 'Allowed' if pnic.resourcePoolSchedulerAllowed else 'Not allowed'
                            pnic_facts['auto_negotiation_supported'] = pnic.autoNegotiateSupported
                            pnic_facts['wake_on_lan_supported'] = pnic.wakeOnLanSupported
                        # DirectPath I/O and SR-IOV capabilities and configuration
                        if self.directpath_io:
                            pnic_facts['directpath_io_supported'] = pnic.vmDirectPathGen2Supported
                        if self.directpath_io or self.sriov:
                            if pnic.pci:
                                for pci_device in host.configManager.pciPassthruSystem.pciPassthruInfo:
                                    if pci_device.id == pnic.pci:
                                        if self.directpath_io:
                                            pnic_facts['passthru_enabled'] = pci_device.passthruEnabled
                                            pnic_facts['passthru_capable'] = pci_device.passthruCapable
                                            pnic_facts['passthru_active'] = pci_device.passthruActive
                                        if self.sriov:
                                            try:
                                                if pci_device.sriovCapable:
                                                    pnic_facts['sriov_status'] = (
                                                        'Enabled' if pci_device.sriovEnabled else 'Disabled'
                                                    )
                                                    pnic_facts['sriov_active'] = \
                                                        pci_device.sriovActive
                                                    pnic_facts['sriov_virt_functions'] = \
                                                        pci_device.numVirtualFunction
                                                    pnic_facts['sriov_virt_functions_requested'] = \
                                                        pci_device.numVirtualFunctionRequested
                                                    pnic_facts['sriov_virt_functions_supported'] = \
                                                        pci_device.maxVirtualFunctionSupported
                                                else:
                                                    pnic_facts['sriov_status'] = 'Not supported'
                                            except AttributeError:
                                                pnic_facts['sriov_status'] = 'Not supported'
                        host_vmnic_facts['vmnic_details'].append(pnic_facts)

                vswitch_vmnics = []
                proxy_switch_vmnics = []
                if nw_config.vswitch:
                    for vswitch in nw_config.vswitch:
                        host_vmnic_facts['vswitch'][vswitch.name] = []
                        # Workaround for "AttributeError: 'NoneType' object has no attribute 'nicDevice'"
                        # this issue doesn't happen every time; vswitch.spec.bridge.nicDevice exists!
                        try:
                            for vnic in vswitch.spec.bridge.nicDevice:
                                vswitch_vmnics.append(vnic)
                                host_vmnic_facts['vswitch'][vswitch.name].append(vnic)
                        except AttributeError:
                            pass

                if nw_config.proxySwitch:
                    for proxy_config in nw_config.proxySwitch:
                        dvs_obj = self.find_dvs_by_uuid(uuid=proxy_config.uuid)
                        if dvs_obj:
                            host_vmnic_facts['dvswitch'][dvs_obj.name] = []
                        for proxy_nic in proxy_config.spec.backing.pnicSpec:
                            proxy_switch_vmnics.append(proxy_nic.pnicDevice)
                            if dvs_obj:
                                host_vmnic_facts['dvswitch'][dvs_obj.name].append(proxy_nic.pnicDevice)

                used_vmics = proxy_switch_vmnics + vswitch_vmnics
                host_vmnic_facts['used'] = used_vmics
                host_vmnic_facts['available'] = [pnic.device for pnic in nw_config.pnic if pnic.device not in used_vmics]

            hosts_vmnic_facts[host.name] = host_vmnic_facts
        return hosts_vmnic_facts

def main():
    """Main"""
    argument_spec = vmware_argument_spec()
    argument_spec.update(
        cluster_name=dict(type='str', required=False),
        esxi_hostname=dict(type='str', required=False),
        capabilities=dict(type='bool', required=False, default=False),
        directpath_io=dict(type='bool', required=False, default=False),
        sriov=dict(type='bool', required=False, default=False),
    )

    module = AnsibleModule(
        argument_spec=argument_spec,
        required_one_of=[
            ['cluster_name', 'esxi_hostname'],
        ],
        supports_check_mode=True,
    )

    host_vmnic_mgr = HostVmnicMgr(module)
    module.exit_json(changed=False, hosts_vmnics_facts=host_vmnic_mgr.gather_host_vmnic_facts())

if __name__ == "__main__":
    main()


text:
<!DOCTYPE html>

  {% include head_main.html %}

LemonPy Main Page

    {% include nav-bar_main.html %}

    {{ content }}

    {% include footer_main.html %}

    {% if site.debug %}
    {% include toc.html %}
    {% endif %}

redpajama_set_name: RedPajamaGithub


text:
package io.pravega.client.stream;

import lombok.Data;

/**
 * Represents a time window for the events which are currently being read by a reader.
 *
 * The lower time bound is a timestamp which is less than or equal to the most recent
 * value provided via the {@link EventStreamWriter#noteTime(long)} API for by any writer using that
 * API at the current location in the stream. If the reader is near the beginning (or the truncation
 * point) of the stream, there may be no timestamps to compare against and no lower bound can be established.
 *
 * Similarly the upper time bound is a timestamp which is greater than or equal to any that were provided by
 * any writer via the {@link EventStreamWriter#noteTime(long)} API prior to the current location in
 * the stream. If a reader is near the end (tail) of the stream there may be no writer timestamps
 * to compare against and no upper bound can be established.
 *
 * upperTimeBound will always be greater than or equal to lowerTimeBound.
 */
@Data
public class TimeWindow {
    private final Long lowerTimeBound;
    private final Long upperTimeBound;

    /**
     * Returns true if the reader is currently near the tail of the stream and therefore no upper time bound can be obtained.
     * @return if a upper bound is unavailable.
     */
    public boolean isNearTailOfStream() {
        return upperTimeBound == null;
    }

    /**
     * Returns true if the reader is currently near the head of the stream and therefore no lower time bound can be obtained.
     * @return if a lower bound is unavailable.
     */
    public boolean isNearHeadOfStream() {
        return lowerTimeBound == null;
    }
}


text:
layout: webapp
title: Freecodecamp Quote App (React + Redux)
meta: A simple React + Redux app that calls an API that requests quotes and allows you to tweet the results
source: /react/quotes
image: /img/quote-logo.jpeg
image-alt: Quote Generator
category: react, redux
type: webapp
---


text:
.class Lcom/google/android/gms/internal/zzli$zzd;
.super Lcom/google/android/gms/internal/zzll;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/google/android/gms/internal/zzli;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = "zzd"
.end annotation

# instance fields
.field private zzacC:Ljava/lang/ref/WeakReference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/WeakReference",
            "<",
            "Lcom/google/android/gms/internal/zzli;",
            ">;"
        }
    .end annotation
.end field

# direct methods
.method constructor <init>(Lcom/google/android/gms/internal/zzli;)V
    .registers 3

    invoke-direct {p0}, Lcom/google/android/gms/internal/zzll;-><init>()V

    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/google/android/gms/internal/zzli$zzd;->zzacC:Ljava/lang/ref/WeakReference;

    return-void
.end method

# virtual methods
.method public zzoi()V
    .registers 2

    iget-object v0, p0, Lcom/google/android/gms/internal/zzli$zzd;->zzacC:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/android/gms/internal/zzli;

    if-nez v0, :cond_b

    :goto_a
    return-void

    :cond_b
    invoke-static {v0}, Lcom/google/android/gms/internal/zzli;->zzd(Lcom/google/android/gms/internal/zzli;)V

    goto :goto_a
.end method


text:
Contributing
------------
To contribute to pika, please make sure that any new features or changes
to existing functionality **include test coverage**.

*Pull requests that add or change code without coverage will most likely be rejected.*

Additionally, please format your code using `yapf <http://pypi.python.org/pypi/yapf>`_
with ``google`` style prior to issuing your pull request.

为了完善Pika,请确保任何新功能或变更
对现有功能的更改**包括测试**。

*合并请求包含添加或更改代码,而覆盖将最有可能被拒绝。*

此外,请使用`yapf格式化代码<http://pypi.python.org/pypi/yapf>`_
发出合并求的代码要求符合``google``风格。


text:
<?php

require __DIR__ . '/../includes/bootstrap.php';

list($message, $additionalData) = require __DIR__ . '/../includes/message-pipe.php';

$config = require 'config.php';

$processor = new \Feedbee\Smp\Processor;
$processor->addRule(new \Feedbee\Smp\Rule\Rule(
    [
        new \Feedbee\Smp\Condition\Header\HasHeader('Subject'),
        new \Feedbee\Smp\Condition\Header\HeaderValueRegexp('From', '/feedbee/'),
    ],
    [
        new \Feedbee\Smp\Task\Task(
            new \Feedbee\Smp\Action\SetHeader('X-Test-Header'),
            [
                'value' => 'Testing',
            ]
        ),
        new \Feedbee\Smp\Task\Task(
            new \Feedbee\Smp\Action\Forward(
                new \Feedbee\Smp\Sender\Smtp(new \Feedbee\Smp\Mail\SmtpTransport(new \Zend\Mail\Transport\SmtpOptions($config['smtp'])))
            ),
            [
                'forward-to' => $config['forward']['to'],
                'forward-from' => $config['forward']['from'],
                'bounces-to' => $config['forward']['return-path'],
            ]
        )
    ]
));
$processor->process($message, $additionalData);


text:
require File.dirname(__FILE__) + '/helper'

class TestSugar < Minitest::Test
  def test_seconds
    assert_equal 1, 1.seconds
    assert_equal 1, 1.second
  end

  def test_minutes
    assert_equal 60, 1.minutes
    assert_equal 60, 1.minute
  end

  def test_hours
    assert_equal 3600, 1.hours
    assert_equal 3600, 1.hour
  end

  def test_days
    assert_equal 86400, 1.days
    assert_equal 86400, 1.day
  end

  def test_kilobytes
    assert_equal 1, 1.kilobytes
    assert_equal 1, 1.kilobyte
  end

  def test_megabytes
    assert_equal 1024, 1.megabytes
    assert_equal 1024, 1.megabyte
  end

  def test_gigabytes
    assert_equal 1024 ** 2, 1.gigabytes
    assert_equal 1024 ** 2, 1.gigabyte
  end

  def test_percent
    assert_equal 1, 1.percent
  end
end


text:
foam.CLASS({
  package: 'foam.nanos.medusa',
  name: 'MedusaAdapterDAO',
  extends: 'foam.dao.ProxyDAO',

  documentation: `Entry point into the Medusa system.
This DAO intercepts MDAO 'put' operations and creates a medusa entry for argument model.
It then marshalls it to the primary mediator, and waits on a response.`,

  javaImports: [
    'foam.core.FObject',
    'foam.core.X',
    'foam.dao.ArraySink',
    'foam.dao.DAO',
    'foam.dao.DOP',
    'foam.dao.MDAO',
    'foam.dao.RemoveSink',
    'foam.lib.formatter.FObjectFormatter',
    'foam.lib.formatter.JSONFObjectFormatter',
    'static foam.mlang.MLang.AND',
    'static foam.mlang.MLang.EQ',
    'foam.log.LogLevel',
    'foam.nanos.alarming.Alarm',
    'foam.nanos.logger.PrefixLogger',
    'foam.nanos.logger.Logger',
    'foam.nanos.pm.PM',
    'foam.util.SafetyUtil',
    'java.util.List'
  ],

  properties: [
    {
      name: 'nSpec',
      class: 'FObjectProperty',
      of: 'foam.nanos.boot.NSpec'
    },
    {
      name: 'medusaEntryDAO',
      class: 'FObjectProperty',
      of: 'foam.dao.DAO',
      javaFactory: 'return (foam.dao.DAO) getX().get("localMedusaEntryDAO");'
    },
    {
      name: 'clientDAO',
      class: 'FObjectProperty',
      of: 'foam.dao.DAO',
      javaFactory: `
      return new foam.nanos.medusa.ClusterClientDAO.Builder(getX())
        .setNSpec(getNSpec())
        .setDelegate(new foam.dao.NullDAO(getX(), getDelegate().getOf()))
        .build();
      `
    },
    {
      name: 'logger',
      class: 'FObjectProperty',
      of: 'foam.nanos.logger.Logger',
      visibility: 'HIDDEN',
      javaFactory: `
        return new PrefixLogger(new Object[] {
          this.getClass().getSimpleName(),
          getNSpec().getName()
        }, (Logger) getX().get("logger"));
      `
    }
  ],

  axioms: [
    {
      name: 'javaExtras',
      buildJavaClass: function(cls) {
        cls.extras.push(foam.java.Code.create({
          data: `
  protected static final ThreadLocal<FObjectFormatter> formatter_ = new ThreadLocal<FObjectFormatter>() {
    @Override
    protected JSONFObjectFormatter initialValue() {
      JSONFObjectFormatter formatter = new JSONFObjectFormatter();
      formatter.setQuoteKeys(false); // default
      formatter.setOutputShortNames(true); // default
      formatter.setOutputDefaultValues(true);
      formatter.setOutputClassNames(true); // default
      formatter.setOutputDefaultClassNames(true); // default
      formatter.setOutputReadableDates(false);
      formatter.setPropertyPredicate(new foam.lib.StoragePropertyPredicate());
      return formatter;
    }

    @Override
    public FObjectFormatter get() {
      FObjectFormatter formatter = super.get();
      formatter.reset();
      return formatter;
    }
  };
          `
        }));
      }
    }
  ],

  methods: [
    {
      name: 'put_',
      javaCode: `
      return update(x, obj, DOP.PUT);
      `
    },
    {
      name: 'remove_',
      javaCode: `
      return update(x, obj, DOP.REMOVE);
      `
    },
    {
      name: 'removeAll_',
      javaCode: `
      getDelegate().select_(x, new RemoveSink(x, this), skip, limit, order, predicate);
      `
    },
    {
      documentation: 'Route DAO operation to primary mediator',
      name: 'update',
      args: [
        {
          name: 'x',
          type: 'Context'
        },
        {
          name: 'obj',
          type: 'foam.core.FObject'
        },
        {
          name: 'dop',
          type: 'foam.dao.DOP'
        }
      ],
      javaType: 'foam.core.FObject',
      javaCode: `
      if ( ! ( DOP.PUT == dop ||
               DOP.REMOVE == dop ) ) {
        getLogger().warning("update", "Unsupported operation", dop.getLabel());
        throw new UnsupportedOperationException(dop.getLabel());
      }

      if ( obj instanceof Clusterable &&
           ! ((Clusterable) obj).getClusterable() ) {
        getLogger().debug("update", dop.getLabel(), "not clusterable", obj.getClass().getSimpleName(), obj.getProperty("id"));
        if ( DOP.PUT == dop ) return getDelegate().put_(x, obj);
        if ( DOP.REMOVE == dop ) return getDelegate().remove_(x, obj);
      }

      ClusterConfigSupport support = (ClusterConfigSupport) x.get("clusterConfigSupport");
      ClusterConfig config = support.getConfig(x, support.getConfigId());

      if ( config.getIsPrimary() ) {
        return updatePrimary(x, obj, dop);
      }
      return updateSecondary(x, obj, dop);
    `
    },
    {
      documentation: `Secondary flow: proxy to next server, wait on own mdao update.`,
      name: 'updateSecondary',
      args: [
        {
          name: 'x',
          type: 'Context'
        },
        {
          name: 'obj',
          type: 'foam.core.FObject'
        },
        {
          name: 'dop',
          type: 'foam.dao.DOP'
        }
      ],
      javaType: 'foam.core.FObject',
      javaCode: `
      ClusterCommand cmd = new ClusterCommand(x, getNSpec().getName(), dop, obj);
      getLogger().debug("update", "secondary", dop, obj.getProperty("id"), "send");
      PM pm = PM.create(x, this.getClass().getSimpleName(), "secondary", "cmd");
      // PM pm = new PM(this.getClass().getSimpleName(), "secondary", "cmd");
      cmd = (ClusterCommand) getClientDAO().cmd_(x, cmd);
      pm.log(x);
      cmd.logHops(x);
      getLogger().debug("update", "secondary", dop, obj.getProperty("id"), "receive", cmd.getMedusaEntryId());
      if ( cmd.getMedusaEntryId() > 0 ) {
        pm = PM.create(x, this.getClass().getSimpleName(), "secondary", "registry", "wait");
        MedusaRegistry registry = (MedusaRegistry) x.get("medusaRegistry");
        registry.wait(x, (Long) cmd.getMedusaEntryId());
        pm.log(x);
      }
      FObject result = cmd.getData();
      if ( DOP.PUT == dop ) {
        if ( result != null ) {
          FObject nu = getDelegate().find_(x, result.getProperty("id"));
          if ( nu == null ) {
            getLogger().error("update", "secondary", dop, obj.getProperty("id"), "delegate", cmd.getMedusaEntryId(), "find", result.getProperty("id"), "null");
            Alarm alarm = new Alarm();
            alarm.setClusterable(false);
            alarm.setSeverity(LogLevel.ERROR);
            alarm.setName("MedusaAdapter secondary find failed");
            alarm.setNote(obj.getClass().getName()+" "+obj.getProperty("id"));
            alarm = (Alarm) ((DAO) x.get("alarmDAO")).put(alarm);
          }
          // put again to update storageTransient properties
          return getDelegate().put_(x, result);
        }
        // TODO/REVIEW
        getLogger().error("update", "secondary", dop, obj.getProperty("id"), "result,null");
        Alarm alarm = new Alarm();
        alarm.setClusterable(false);
        alarm.setSeverity(LogLevel.ERROR);
        alarm.setName("MedusaAdapter secondary cmd failed");
        alarm.setNote(obj.getClass().getName()+" "+obj.getProperty("id"));
        alarm = (Alarm) ((DAO) x.get("alarmDAO")).put(alarm);
      } else if ( DOP.REMOVE == dop ) {
        if ( getDelegate().find_(x, obj.getProperty("id")) != null ) {
          getLogger().error("update", "secondary", dop, obj.getProperty("id"), "delegate", "not deleted");
          Alarm alarm = new Alarm();
          alarm.setClusterable(false);
          alarm.setSeverity(LogLevel.ERROR);
          alarm.setName("MedusaAdapter secondary remove failed");
          alarm.setNote(obj.getClass().getName()+" "+obj.getProperty("id"));
          alarm = (Alarm) ((DAO) x.get("alarmDAO")).put(alarm);
          return getDelegate().remove_(x, obj);
        }
      }
      return result;
      `
    },
    {
      documentation: 'Primary flow: put to delegate/MDAO, then submit to nodes, wait on MedusaEntry consensus.',
      name: 'updatePrimary',
      args: [
        {
          name: 'x',
          type: 'Context'
        },
        {
          name: 'obj',
          type: 'foam.core.FObject'
        },
        {
          name: 'dop',
          type: 'foam.dao.DOP'
        }
      ],
      javaType: 'foam.core.FObject',
      javaCode: `
      PM pm = PM.create(x, this.getClass().getSimpleName(), "primary");
      ClusterCommand cmd = null;
      if ( obj instanceof ClusterCommand ) {
        cmd = (ClusterCommand) obj;
        obj = cmd.getData();
      }

      try {
        if ( DOP.PUT == dop ) {
          Object id = obj.getProperty("id");
          FObject old = getDelegate().find_(x, id);
          FObject nu = getDelegate().put_(x, obj);
          String data = data(x, nu, old, dop);
          // data will be empty if only changes are storageTransient.
          if ( ! SafetyUtil.isEmpty(data) ) {
            MedusaEntry entry = (MedusaEntry) submit(x, data, dop);
            getLogger().debug("updatePrimary", "primary", dop, nu.getProperty("id"), "entry", entry.toSummary());
            if ( cmd != null ) {
              cmd.setMedusaEntryId((Long) entry.getId());
            }
          }
          if ( cmd != null ) {
            cmd.setData(nu);
            return cmd;
          }
          return nu;
        }
        // DOP.REMOVE
        FObject result = getDelegate().remove_(x, obj);
        String data = data(x, obj, null, dop);
        MedusaEntry entry = (MedusaEntry) submit(x, data, dop);
        if ( cmd != null ) {
          cmd.setMedusaEntryId((Long) entry.getId());
          cmd.setData(result);
          return cmd;
        }
        return result;
      } finally {
        pm.log(x);
      }
      `
    },
    {
      name: 'cmd_',
      javaCode: `
      if ( foam.dao.DAO.LAST_CMD.equals(obj) ) {
        return getDelegate();
      }
      if ( obj instanceof ClusterCommand ) {
        ClusterConfigSupport support = (ClusterConfigSupport) x.get("clusterConfigSupport");
        ClusterConfig config = support.getConfig(x, support.getConfigId());
        ClusterCommand cmd = (ClusterCommand) obj;

        if ( config.getIsPrimary() ) {
          if ( DOP.PUT == cmd.getDop() ) {
            return put_(x, cmd);
          }
          if ( DOP.REMOVE == cmd.getDop() ) {
            return remove_(x, cmd);
          }
          getLogger().warning("Unsupported operation", cmd.getDop().getLabel());
          throw new UnsupportedOperationException(cmd.getDop().getLabel());
        }

        cmd = (ClusterCommand) getClientDAO().cmd_(x, obj);

        if ( config.getType() == MedusaType.MEDIATOR ) {
          Long id = cmd.getMedusaEntryId();
          if ( id != null &&
               id > 0L ) {
            MedusaRegistry registry = (MedusaRegistry) x.get("medusaRegistry");
            registry.wait(x, id);
          }
        }
        return cmd;
      }
      return getClientDAO().cmd_(x, obj);
      `
    },
    {
      name: 'data',
      args: [
        {
          name: 'x',
          type: 'Context'
        },
        {
          name: 'obj',
          type: 'FObject'
        },
        {
          name: 'old',
          type: 'FObject'
        },
        {
          name: 'dop',
          type: 'foam.dao.DOP'
        }
      ],
      type: 'String',
      javaCode: `
      PM pm = PM.create(x, this.getClass().getSimpleName(), "data");
      String data = null;
      try {
        FObjectFormatter formatter = formatter_.get();
        if ( old != null ) {
          formatter.maybeOutputDelta(old, obj);
        } else {
          formatter.output(obj);
        }
        data = formatter.builder().toString();
      } finally {
        pm.log(x);
      }
      return data;
      `
    },
    {
      name: 'submit',
      args: [
        {
          name: 'x',
          type: 'Context'
        },
        {
          name: 'data',
          type: 'String'
        },
        {
          name: 'dop',
          type: 'foam.dao.DOP'
        }
      ],
      type: 'FObject',
      javaCode: `
      PM pm = PM.create(x, this.getClass().getSimpleName(), "submit");
      MedusaEntry entry = x.create(MedusaEntry.class);
      try {
        PM pmLink = new PM(this.getClass().getSimpleName(), "submit", "link");
        DaggerService dagger = (DaggerService) x.get("daggerService");
        entry = dagger.link(x, entry);
        entry.setNSpecName(getNSpec().getName());
        entry.setDop(dop);
        entry.setData(data);
        pmLink.log(x);

        getLogger().debug("submit", entry.getId());

        MedusaRegistry registry = (MedusaRegistry) x.get("medusaRegistry");
        registry.register(x, (Long) entry.getId());
        PM pmPut = new PM(this.getClass().getSimpleName(), "submit", "put");
        entry = (MedusaEntry) getMedusaEntryDAO().put_(x, entry);
        pmPut.log(x);
        PM pmWait = new PM(this.getClass().getSimpleName(), "submit", "wait");
        registry.wait(x, (Long) entry.getId());
        pmWait.log(x);
        return entry;
      } catch (Throwable t) {
        pm.error(x, entry.toSummary(), t);
        getLogger().error("submit", entry.toSummary(), t.getMessage(), t);
        throw t;
      } finally {
        pm.log(x);
      }
      `
    }
  ]
});


text:
/* globals Inject */

Inject.rawBody('page-loading', `

`
);

RocketChat.settings.get('Site_Url', function() {
	Meteor.defer(function() {
		let baseUrl;
		if (__meteor_runtime_config__.ROOT_URL_PATH_PREFIX && __meteor_runtime_config__.ROOT_URL_PATH_PREFIX.trim() !== '') {
			baseUrl = __meteor_runtime_config__.ROOT_URL_PATH_PREFIX;
		} else {
			baseUrl = '/';
		}
		if (/\/$/.test(baseUrl) === false) {
			baseUrl += '/';
		}
		Inject.rawHead('base', `<base href="${baseUrl}">`);
	});
});

RocketChat.settings.get('GoogleSiteVerification_id', function(key, value) {
	if (value) {
		Inject.rawHead('google-site-verification', `<meta name="google-site-verification" content="${value}" />`);
	} else {
		Inject.rawHead('google-site-verification', '');
	}
});


text:
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

$string['admindirerror'] = 'The admin directory specified is incorrect';
$string['admindirname'] = 'Admin directory';
$string['admindirsetting'] = 'A very few webhosts use /admin as a special URL for you to access a
    control panel or something.  Unfortunately this conflicts with the
    standard location for the Moodle admin pages.  You can fix this by
    renaming the admin directory in your installation, and putting that
    new name here.  For example:

moodleadmin

    This will fix admin links in Moodle.';
$string['admindirsettinghead'] = 'Setting the admin directory ...';
$string['admindirsettingsub'] = 'A very few webhosts use /admin as a special URL for you to access a
    control panel or something.  Unfortunately this conflicts with the
    standard location for the Moodle admin pages.  You can fix this by
    renaming the admin directory in your installation, and putting that
    new name here.  For example:

moodleadmin

    This will fix admin links in Moodle.';
$string['availablelangs'] = 'Available language packs';
$string['caution'] = 'Caution';
$string['cliadminemail'] = 'New admin user email address';
$string['cliadminpassword'] = 'New admin user password';
$string['cliadminusername'] = 'Admin account username';
$string['clialreadyconfigured'] = 'The configuration file config.php already exists. Please use admin/cli/install_database.php to install Moodle for this site.';
$string['clialreadyinstalled'] = 'The configuration file config.php already exists. Please use admin/cli/install_database.php to upgrade Moodle for this site.';
$string['cliinstallfinished'] = 'Installation completed successfully.';
$string['cliinstallheader'] = 'Moodle {$a} command line installation program';
$string['climustagreelicense'] = 'In non interactive mode you must agree to license by specifying --agree-license option';
$string['cliskipdatabase'] = 'Skipping database installation.';
$string['clitablesexist'] = 'Database tables already present, cli installation can not continue.';
$string['compatibilitysettings'] = 'Checking your PHP settings ...';
$string['compatibilitysettingshead'] = 'Checking your PHP settings ...';
$string['compatibilitysettingssub'] = 'Your server should pass all these tests to make Moodle run properly';
$string['configfilenotwritten'] = 'The installer script was not able to automatically create a config.php file containing your chosen settings, probably because the Moodle directory is not writeable. You can manually copy the following code into a file named config.php within the root directory of Moodle.';
$string['configfilewritten'] = 'config.php has been successfully created';
$string['configurationcomplete'] = 'Configuration completed';
$string['configurationcompletehead'] = 'Configuration completed';
$string['configurationcompletesub'] = 'Moodle made an attempt to save your configuration in a file in the root of your Moodle installation.';
$string['database'] = 'Database';
$string['databasehead'] = 'Database settings';
$string['databasehost'] = 'Database host';
$string['databasename'] = 'Database name';
$string['databasepass'] = 'Database password';
$string['databaseport'] = 'Database port';
$string['databasesocket'] = 'Unix socket';
$string['databasetypehead'] = 'Choose database driver';
$string['databasetypesub'] = 'Moodle supports several types of database servers. Please contact server administrator if you do not know which type to use.';
$string['databaseuser'] = 'Database user';
$string['dataroot'] = 'Data directory';
$string['datarooterror'] = 'The \'data directory\' you specified could not be found or created.  Either correct the path or create that directory manually.';
$string['datarootpermission'] = 'Data directories permission';
$string['datarootpublicerror'] = 'The \'data directory\' you specified is directly accessible via web, you must use different directory.';
$string['dbconnectionerror'] = 'We could not connect to the database you specified. Please check your database settings.';
$string['dbcreationerror'] = 'Database creation error. Could not create the given database name with the settings provided';
$string['dbhost'] = 'Host server';
$string['dbpass'] = 'Password';
$string['dbport'] = 'Port';
$string['dbprefix'] = 'Tables prefix';
$string['dbtype'] = 'Type';
$string['directorysettings'] = '
Please confirm the locations of this Moodle installation.

Web address:
Specify the full web address where Moodle will be accessed.
If your web site is accessible via multiple URLs then choose the
most natural one that your students would use.  Do not include
a trailing slash.

Moodle directory:
Specify the full directory path to this installation
Make sure the upper/lower case is correct.

Data directory:
You need a place where Moodle can save uploaded files.  This
directory should be readable AND WRITEABLE by the web server user
(usually \'nobody\' or \'apache\'), but it must not be accessible
directly via the web. The installer will try to create it if doesn\'t exist.
';
$string['directorysettingshead'] = 'Please confirm the locations of this Moodle installation';
$string['directorysettingssub'] = 'Web address:
Specify the full web address where Moodle will be accessed.
If your web site is accessible via multiple URLs then choose the
most natural one that your students would use.  Do not include
a trailing slash.

Moodle directory:
Specify the full directory path to this installation
Make sure the upper/lower case is correct.

Data directory:
You need a place where Moodle can save uploaded files.  This
directory must be readable AND WRITEABLE by the web server user
(usually \'nobody\' or \'apache\'), but it must not be accessible
directly via the web. The installer will try to create it if doesn\'t exist.';
$string['dirroot'] = 'Moodle directory';
$string['dirrooterror'] = 'The \'Moodle directory\' setting seems to be incorrect - we can\'t find a Moodle installation there. The value below has been reset.';
$string['download'] = 'Download';
$string['downloadlanguagebutton'] = 'Download the "{$a}" language pack';
$string['downloadlanguagehead'] = 'Download language pack';
$string['downloadlanguagenotneeded'] = 'You may continue the installation process using the default language pack, "{$a}".';
$string['downloadlanguagesub'] = 'You now have the option of downloading a language pack and continuing the installation process in this language.

If you are unable to download the language pack, the installation process will continue in English. (Once the installation process is complete, you will have the opportunity to download and install additional language packs.)';
$string['doyouagree'] = 'Do you agree ? (yes/no):';
$string['environmenthead'] = 'Checking your environment ...';
$string['environmentsub'] = 'We are checking if the various components of your system meet the system requirements';
$string['environmentsub2'] = 'Each Moodle release has some minimum PHP version requirement and a number of mandatory PHP extensions.
Full environment check is done before each install and upgrade. Please contact server administrator if you do not know how to install new version or enable PHP extensions.';
$string['errorsinenvironment'] = 'Environment check failed!';
$string['fail'] = 'Fail';
$string['fileuploads'] = 'File uploads';
$string['fileuploadserror'] = 'This should be on';
$string['fileuploadshelp'] = '
File uploading seems to be disabled on your server.

Moodle can still be installed, but without this ability, you will not be able
   to upload course files or new user profile images.

To enable file uploading you (or your system administrator) will need to
   edit the main php.ini file on your system and change the setting for
   file_uploads to \'1\'.
';
$string['chooselanguage'] = 'Choose a language';
$string['chooselanguagehead'] = 'Choose a language';
$string['chooselanguagesub'] = 'Please choose a language for the installation. This language will also be used as the default language for the site, though it may be changed later.';
$string['inputdatadirectory'] = 'Data directory:';
$string['inputwebadress'] = 'Web address :';
$string['inputwebdirectory'] = 'Moodle directory:';
$string['installation'] = 'Installation';
$string['langdownloaderror'] = 'Unfortunately the language "{$a}" could not be downloaded. The installation process will continue in English.';
$string['langdownloadok'] = 'The language "{$a}" was installed successfully. The installation process will continue in this language.';
$string['memorylimit'] = 'Memory limit';
$string['memorylimiterror'] = 'The PHP memory limit is set quite low ... you may run into problems later.';
$string['memorylimithelp'] = '
The PHP memory limit for your server is currently set to {$a}.

This may cause Moodle to have memory problems later on, especially
   if you have a lot of modules enabled and/or a lot of users.

We recommend that you configure PHP with a higher limit if possible, like 40M.
   There are several ways of doing this that you can try:

If you are able to, recompile PHP with --enable-memory-limit.
    This will allow Moodle to set the memory limit itself.

If you have access to your php.ini file, you can change the memory_limit
    setting in there to something like 40M.  If you don\'t have access you might
    be able to ask your administrator to do this for you.

On some PHP servers you can create a .htaccess file in the Moodle directory
    containing this line:

php_value memory_limit 40M

However, on some servers this will prevent all PHP pages from working
    (you will see errors when you look at pages) so you\'ll have to remove the .htaccess file.

';
$string['mssqlextensionisnotpresentinphp'] = 'PHP has not been properly configured with the MSSQL extension so that it can communicate with SQL*Server.  Please check your php.ini file or recompile PHP.';
$string['mysqliextensionisnotpresentinphp'] = 'PHP has not been properly configured with the MySQLi extension for it to communicate with MySQL. Please check your php.ini file or recompile PHP.';
$string['nativemariadb'] = 'MariaDB (native/mariadb)';
$string['nativemariadbhelp'] = '
The database is where most of the Moodle settings and data are stored and must be configured here.

The database name, username, and password are required fields; table prefix is optional.

If the database currently does not exist, and the user you specify has permission, Moodle will attempt to create a new database with the correct permissions and settings.

This driver is not compatible with legacy MyISAM engine.
';
$string['nativemysqli'] = 'Improved MySQL (native/mysqli)';
$string['nativemysqlihelp'] = '
The database is where most of the Moodle settings and data are stored and must be configured here.

The database name, username, and password are required fields; table prefix is optional.

If the database currently does not exist, and the user you specify has permission, Moodle will attempt to create a new database with the correct permissions and settings.
';
$string['nativemssql'] = 'SQL*Server FreeTDS (native/mssql)';
$string['nativemssqlhelp'] = 'Now you need to configure the database where most Moodle data will be stored.
This database must already have been created and a username and password created to access it. Table prefix is mandatory.';
$string['nativeoci'] = 'Oracle (native/oci)';
$string['nativeocihelp'] = 'Now you need to configure the database where most Moodle data will be stored.
This database must already have been created and a username and password created to access it. Table prefix is mandatory.';
$string['nativepgsql'] = 'PostgreSQL (native/pgsql)';
$string['nativepgsqlhelp'] = '
The database is where most of the Moodle settings and data are stored and must be configured here.

The database name, username, password and table prefix are required fields.

The database must already exist and the user must have access to both read, and write to it.
';
$string['nativesqlsrv'] = 'SQL*Server Microsoft (native/sqlsrv)';
$string['nativesqlsrvhelp'] = 'Now you need to configure the database where most Moodle data will be stored.
This database must already have been created and a username and password created to access it. Table prefix is mandatory.';
$string['nativesqlsrvnodriver'] = 'Microsoft Drivers for SQL Server for PHP are not installed or not configured properly.';
$string['nativesqlsrvnonwindows'] = 'Microsoft Drivers for SQL Server for PHP are available only for Windows OS.';
$string['ociextensionisnotpresentinphp'] = 'PHP has not been properly configured with the OCI8 extension so that it can communicate with Oracle.  Please check your php.ini file or recompile PHP.';
$string['pass'] = 'Pass';
$string['paths'] = 'Paths';
$string['pathserrcreatedataroot'] = 'Data directory ({$a->dataroot}) cannot be created by the installer.';
$string['pathshead'] = 'Confirm paths';
$string['pathsrodataroot'] = 'Dataroot directory is not writable.';
$string['pathsroparentdataroot'] = 'Parent directory ({$a->parent}) is not writeable. Data directory ({$a->dataroot}) cannot be created by the installer.';
$string['pathssubadmindir'] = 'A very few webhosts use /admin as a special URL for you to access a
control panel or something.  Unfortunately this conflicts with the standard location for the Moodle admin pages.  You can fix this by
renaming the admin directory in your installation, and putting that  new name here.  For example: moodleadmin. This will fix admin links in Moodle.';
$string['pathssubdataroot'] = '
A directory where Moodle will store all file content uploaded by users.

This directory should be both readable and writeable by the web server user (usually \'www-data\', \'nobody\', or \'apache\').

It must not be directly accessible over the web.

If the directory does not currently exist, the installation process will attempt to create it.
';
$string['pathssubdirroot'] = '
The full path to the directory containing the Moodle code.
';
$string['pathssubwwwroot'] = '
The full address where Moodle will be accessed i.e. the address that users will enter into the address bar of their browser to access Moodle.

It is not possible to access Moodle using multiple addresses. If your site is accessible via multiple addresses then choose the easiest one and set up a permanent redirect for each of the other addresses.

If your site is accessible both from the Internet, and from an internal network (sometimes called an Intranet), then use the public address here.

If the current address is not correct, please change the URL in your browser\'s address bar and restart the installation.
';
$string['pathsunsecuredataroot'] = 'Dataroot location is not secure';
$string['pathswrongadmindir'] = 'Admin directory does not exist';
$string['pgsqlextensionisnotpresentinphp'] = 'PHP has not been properly configured with the PGSQL extension so that it can communicate with PostgreSQL.  Please check your php.ini file or recompile PHP.';
$string['phpextension'] = '{$a} PHP extension';
$string['phpversion'] = 'PHP version';
$string['phpversionhelp'] = '
Moodle requires a PHP version of at least 4.3.0 or 5.1.0 (5.0.x has a number of known problems).

You are currently running version {$a}

You must upgrade PHP or move to a host with a newer version of PHP!

(In case of 5.0.x you could also downgrade to 4.4.x version)
';
$string['releasenoteslink'] = 'For information about this version of Moodle, please see the release notes at {$a}';
$string['safemode'] = 'Safe mode';
$string['safemodeerror'] = 'Moodle may have trouble with safe mode on';
$string['safemodehelp'] = '
Moodle may have a variety of problems with safe mode on, not least is that
   it probably won\'t be allowed to create new files.

Safe mode is usually only enabled by paranoid public web hosts, so you may have
   to just find a new web hosting company for your Moodle site.

You can try continuing the install if you like, but expect a few problems later on.
';
$string['sessionautostart'] = 'Session auto start';
$string['sessionautostarterror'] = 'This should be off';
$string['sessionautostarthelp'] = '
Moodle requires session support and will not function without it.

Sessions can be enabled in the php.ini file ... look for the session.auto_start parameter.
';
$string['sqliteextensionisnotpresentinphp'] = 'PHP has not been properly configured with the SQLite extension.  Please check your php.ini file or recompile PHP.';
$string['upgradingqtypeplugin'] = 'Upgrading question/type plugin';
$string['welcomep10'] = '{$a->installername} ({$a->installerversion})';
$string['welcomep20'] = 'You are seeing this page because you have successfully installed and
    launched the {$a->packname} {$a->packversion} package in your computer. Congratulations!';
$string['welcomep30'] = 'This release of the {$a->installername} includes the applications
    to create an environment in which Moodle will operate, namely:';
$string['welcomep40'] = 'The package also includes Moodle {$a->moodlerelease} ({$a->moodleversion}).';
$string['welcomep50'] = 'The use of all the applications in this package is governed by their respective
    licences. The complete {$a->installername} package is
    open source and is distributed
    under the GPL license.';
$string['welcomep60'] = 'The following pages will lead you through some easy to follow steps to
    configure and set up Moodle on your computer. You may accept the default
    settings or, optionally, amend them to suit your own needs.';
$string['welcomep70'] = 'Click the "Next" button below to continue with the set up of Moodle.';
$string['wwwroot'] = 'Web address';
$string['wwwrooterror'] = 'The \'Web Address\' does not appear to be valid - this Moodle installation doesn\'t appear to be there. The value below has been reset.';


text:
/* $NetBSD: strtoul.c,v 1.3 2008/08/20 19:58:34 oster Exp $ */

/*-
 * Copyright (c) 2005 The DragonFly Project.  All rights reserved.
 * Copyright (c) 2003 Citrus Project,
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#if 0
__RCSID("$NetBSD: strtoul.c,v 1.3 2008/08/20 19:58:34 oster Exp $");
#endif

#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>

#define	_FUNCNAME	strtoull
#define	__UINT		unsigned long long int
#define	__UINT_MAX	ULLONG_MAX

#include "_strtoul.h"


text:
require File.dirname(__FILE__) + '/../../spec_helper'

class CookiesProxyExamplesController < ActionController::Base
  def index
    cookies[:key] = cookies[:key]
  end
end

module Spec
  module Rails
    module Example
      describe CookiesProxy, :type => :controller do
        controller_name :cookies_proxy_examples

        describe "with a String key" do

          it "should accept a String value" do
            cookies = CookiesProxy.new(self)
            cookies['key'] = 'value'
            get :index
            cookies['key'].should == ['value']
          end

          if Rails::VERSION::STRING >= "2.0.0"
            it "should accept a Hash value" do
              cookies = CookiesProxy.new(self)
              cookies['key'] = { :value => 'value', :expires => expiration = 1.hour.from_now, :path => path = '/path' }
              get :index
              cookies['key'].should == ['value']
              cookies['key'].value.should == ['value']
              cookies['key'].expires.should == expiration
              cookies['key'].path.should == path
            end
          end

        end

        describe "with a Symbol key" do

          it "should accept a String value" do
            example_cookies = CookiesProxy.new(self)
            example_cookies[:key] = 'value'
            get :index
            example_cookies[:key].should == ['value']
          end

          if Rails::VERSION::STRING >= "2.0.0"
            it "should accept a Hash value" do
              example_cookies = CookiesProxy.new(self)
              example_cookies[:key] = { :value => 'value', :expires => expiration = 1.hour.from_now, :path => path = '/path' }
              get :index
              example_cookies[:key].should == ['value']
              example_cookies[:key].value.should == ['value']
              example_cookies[:key].expires.should == expiration
              example_cookies[:key].path.should == path
            end
          end

        end

        describe "#delete" do
          it "should delete from the response cookies" do
            example_cookies = CookiesProxy.new(self)
            response_cookies = mock('cookies')
            response.should_receive(:cookies).and_return(response_cookies)
            response_cookies.should_receive(:delete).with('key')
            example_cookies.delete :key
          end
        end
      end

    end
  end
end


text:
using namespace bold;
using namespace bold::test;

//===----------------------------------------------------------------------===//
// AllocatorsTest
//===----------------------------------------------------------------------===//
// Constructor can do set-up work for all test here.
AllocatorsTest::AllocatorsTest()
{
}

// Destructor can do clean-up work that doesn't throw exceptions here.
AllocatorsTest::~AllocatorsTest()
{
}

// SetUp() will be called immediately before each test.
void AllocatorsTest::SetUp()
{
}

// TearDown() will be called immediately after each test.
void AllocatorsTest::TearDown()
{
}

//===----------------------------------------------------------------------===//
// Testcases
//===----------------------------------------------------------------------===//
PAT_C( AllocatorsTest, max_size_check_int)
{
  MallocAllocator<int> int_alloc;
  ASSERT_TRUE((size_t(-1)/sizeof(int)) == int_alloc.max_size());

  MallocAllocator<uint8_t> uint8_alloc;
  ASSERT_TRUE((size_t(-1)/sizeof(uint8_t)) == uint8_alloc.max_size());
}


text:
package org.apache.myfaces.trinidadinternal.ui;

import java.io.IOException;

/**
 * Basic implementation of Renderer.
 *

 * The protected hooks on this class are called in the following order:
 *

 *
prerender()
 *

 *
renderContent()
 *

 *
renderChild()
 *
renderBetweenIndexedChildren()
 *
renderChild()
 *
...
 *
renderchild()
 *

 *

 *
postrender()
 *

 *

 * @version $Name:  $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/ui/BaseRenderer.java#0 $) $Date: 10-nov-2005.18:50:11 $
 * @deprecated This class comes from the old Java 1.2 UIX codebase and should not be used anymore.
 */
@Deprecated
public class BaseRenderer implements Renderer
{
  /**
   * Value passed to renderIndexedChild to indicate that no child exists.
   *

   * @see #renderIndexedChild
   */
  protected static final int NO_CHILD_INDEX = -1;

  /**
   * Determines if a specific UINode should be skipped.
   * @return true for nodes with a {@link UIConstants#RENDERED_ATTR}
   * attribute set to Boolean.FALSE.
   * @param context the rendering context
   * @param node the node under consideration
   */
  public static boolean skipNode(UIXRenderingContext context, UINode node)
  {
    Object render = node.getAttributeValue(context, UIConstants.RENDERED_ATTR);
    return Boolean.FALSE.equals(render);
  }

  /**
   * Render a UINode in a RenderingContext.  Subclassers should not need to
   * override this method.
   * @param context the rendering context
   * @param node the current UINode
   */
  public void render(
    UIXRenderingContext context,
    UINode           node
    ) throws IOException
  {
    // Don't do this anymore;  we handle this in the ResponseWriter
    if (false && context.getConfiguration().isDebug())
    {
      // show the node that started this output
      // =-=AEW HACK.  I really don't want comments for TextNodes,
      // since adding the comments messes with whitespace
      // that really does matter (two adjacent TextNodes would
      // get separated).
      if (!"text".equals(node.getLocalName()))
        context.getResponseWriter().writeComment("Start:" + node);
    }

    prerender(context, node);

    renderContent(context, node);

    postrender(context, node);

    // -= Simon Lessard =-
    // Completely useless piece of code...
    //boolean assertEnabled = false;
	  //assert assertEnabled = true;
    //if (false && assertEnabled)
    //{
    //  // show the node that ended this output
    //  context.getResponseWriter().writeComment("End:" + node);
    //}
  }

  protected void renderContent(
    UIXRenderingContext context,
    UINode           node
    ) throws IOException
  {
    int childCount = node.getIndexedChildCount(context);

    if (childCount > 0)
    {
      int prevVisChildIndex;
      int currVisChildIndex = -1;
      int ithRenderedChild = 0;

      int nextVisChildIndex = -1;

      do
      {
        prevVisChildIndex = currVisChildIndex;
        currVisChildIndex = nextVisChildIndex;

        // get the index of the next visible child
        nextVisChildIndex = getNextRenderedChildIndex(context,
                                                      node,
                                                      nextVisChildIndex);

        if (currVisChildIndex != -1)
        {
          if (prevVisChildIndex != -1)
          {
            renderBetweenIndexedChildren(context, node, currVisChildIndex);
          }

          // render this indexed child
          renderIndexedChild(context,
                             node,
                             currVisChildIndex,
                             prevVisChildIndex,
                             nextVisChildIndex,
                             ithRenderedChild);

          // update the rendered index
          ithRenderedChild++;
        }
      } while (nextVisChildIndex != NO_CHILD_INDEX);
    }
  }

  /**
   * Returns the next child UINode that will be rendered after the passed in
   * index.
   *

   * @see #getNextRenderedChildIndex
   */
  protected final UINode getNextRenderedChildNode(
    UIXRenderingContext context,
    UINode           parentNode,
    int              afterChildIndex
    )
  {
    int nextVisIndex = getNextRenderedChildIndex(context,
                                                 parentNode,
                                                 afterChildIndex);

    if (nextVisIndex != NO_CHILD_INDEX)
    {
      return parentNode.getIndexedChild(context, nextVisIndex);
    }
    else
    {
      return null;
    }
  }

  /**
   * @param afterChildIndex The indexed children coming after this index, will
   * be considered. To find the first rendered child use {@link
   * #NO_CHILD_INDEX}
   * @return the index of the next child UINode that must be rendered, or
   * {@link #NO_CHILD_INDEX} if there is none.
   * @see #getNextRenderedChildNode
   */
  protected int getNextRenderedChildIndex(
    UIXRenderingContext context,
    UINode           parentNode,
    int              afterChildIndex
    )
  {
    int childCount = parentNode.getIndexedChildCount(context);

    int childIndex = afterChildIndex + 1;

    for (; childIndex < childCount; childIndex++)
    {
      UINode currChild = parentNode.getIndexedChild(context, childIndex);

      if (!skipChild(context, parentNode, currChild))
      {
        return childIndex;
      }
    }

    return NO_CHILD_INDEX;
  }

  /**
   * Called each time an indexed child needs to be rendered.  The
   * previous visible child is passed in to provide renderers with
   * additional context information.
   *

   * The default implementation is call the three-argument
   * version of renderIndexedChild().
   *

   * @see #renderChild
   */
  protected void renderIndexedChild(
    UIXRenderingContext context,
    UINode           node,
    int              currVisChildIndex,
    int              prevVisChildIndex,
    int              nextVisChildIndex,
    int              ithRenderedChild
    ) throws IOException
  {
    renderIndexedChild(context,
                       node,
                       currVisChildIndex);
  }

  /**
   * Called to render the portion before the contents.  Default
   * implementation does nothing.
   * @param context the rendering context
   * @param node the current UINode
   */
  protected void prerender(
    UIXRenderingContext context,
    UINode           node
    ) throws IOException
  {
  }

  /**
   * Called to render the portion after the contents.  Default
   * implementation does nothing.
   * @param context the rendering context
   * @param node the current UINode
   */
  protected void postrender(
    UIXRenderingContext context,
    UINode           node
    ) throws IOException
  {
  }

  /**
   * Called to render between each set of rendered indexed children.
   * @param context the rendering context
   * @param node the current UINode
   */
  protected void renderBetweenIndexedChildren(
    UIXRenderingContext context,
    UINode           node
    ) throws IOException
  {
  }

   /**
   * Called to render between each set of rendered indexed children.
   * @param context the rendering context
   * @param node the current UINode
   * @param index the index of the next child to be rendered
   */
  protected void renderBetweenIndexedChildren(
    UIXRenderingContext context,
    UINode           node,
    int              nextIndex
    ) throws IOException
  {
    renderBetweenIndexedChildren( context, node );
  }

  /**
   * Called to determine if a specific child should be skipped.  This
   * method is called for both named children and indexed children.
   * The default implementation returns true for nodes with a rendered
   * attribute set to Boolean.FALSE.
   *

   * @param context the rendering context
   * @param node the current UINode
   * @param child the child under consideration
   *

   * @see #getVisibleIndexedChildCount
   */
  protected boolean skipChild(
    UIXRenderingContext context,
    UINode           node,
    UINode           child
    )
  {
    return skipNode(context, child);
  }

  /**
   * Called to render an indexed child.  The default implementation
   * will update the context as needed (e.g., calling pushChild()
   * and popChild()) and then call renderChild().
   *

   * @see #renderChild
   */
  protected void renderIndexedChild(
    UIXRenderingContext context,
    UINode           node,
    int              childIndex
    ) throws IOException
  {
    UINode child = node.getIndexedChild(context, childIndex);

    if (child != null)
    {
      context.pushChild(child, null, childIndex);
      context.pushRenderedChild(context, child);

      try
      {
        renderChild(context, child);
      }
      finally
      {
        context.popRenderedChild(context);
        context.popChild();
      }
    }
  }

  /**
   * Called to render a named child.  Retrieves the child,
   * then calls the four-argument version of this function.
   *

   * @see #renderChild
   */
  protected final void renderNamedChild(
    UIXRenderingContext context,
    UINode           node,
    String           childName
    ) throws IOException
  {
    renderNamedChild(context,
                     node,
                     node.getNamedChild(context, childName),
                     childName);
  }

  /**
   * Called to render a named child.  Renderers that render named
   * children should call this method to do the actual rendering.  The
   * default implementation will update the context as needed (e.g.,
   * calling pushChild() and popChild()) and render the child.
   *

   * @see #renderChild
   */
  protected void renderNamedChild(
    UIXRenderingContext context,
    UINode           node,
    UINode           child,
    String           childName
    ) throws IOException
  {
    if (childName == null)
      throw new NullPointerException();

    if ((child != null) && !skipChild(context, node, child))
    {
      context.pushChild(child, childName, -1);
      context.pushRenderedChild(context, child);

      try
      {
        renderChild(context, child);
      }
      finally
      {
        context.popRenderedChild(context);
        context.popChild();
      }
    }
  }

  /**
   * Called to render a child.  This method does not update the
   * rendering context (by calling pushChild() and popChild()
   * as needed);  subclasses need to use renderIndexedChild() or
   * renderNamedChild() for that purpose.
   *

   * @param context the rendering context
   * @param node the current UINode
   * @param child the child under consideration
   */
  protected void renderChild(
    UIXRenderingContext context,
    UINode           child
    ) throws IOException
  {
    if (child != null)
    {
      child.render(context);
    }
  }

  /**
   * Convenience function to return the number of non-skipped indexed children.
   *

   * @param context the rendering context
   * @param node the current UINode
   *

   * @see #skipChild
   */
  protected int getVisibleIndexedChildCount(
    UIXRenderingContext context,
    UINode           node
    )
  {
    int childCount = node.getIndexedChildCount(context);

    int visibleCount = 0;

    for (int childIndex = 0; childIndex < childCount; childIndex++)
    {
      if (!skipChild(context, node, node.getIndexedChild(context, childIndex)))
      {
        visibleCount++;
      }
    }

    return visibleCount;
  }
}


text:
package io.github.kobakei.anago.viewmodel;

import android.databinding.ObservableBoolean;
import android.databinding.ObservableField;
import android.support.v4.util.Pair;
import android.view.View;
import android.widget.Toast;

import org.greenrobot.eventbus.EventBus;

import javax.inject.Inject;

import io.github.kobakei.anago.activity.StargazerListActivity;
import io.github.kobakei.anago.activity.UserActivity;
import io.github.kobakei.anago.entity.Repo;
import io.github.kobakei.anago.fragment.BaseFragment;
import io.github.kobakei.anago.usecase.CheckStarUseCase;
import io.github.kobakei.anago.usecase.GetRepoUseCase;
import io.github.kobakei.anago.usecase.StarUseCase;
import io.github.kobakei.anago.usecase.UnstarUseCase;
import io.github.kobakei.anago.viewmodel.base.ActivityViewModel;
import io.github.kobakei.anago.viewmodel.base.FragmentViewModel;
import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * リポジトリ詳細画面のビューモデル
 * Created by keisuke on 2016/09/18.
 */

public class RepoInfoFragmentViewModel extends FragmentViewModel {

    private final GetRepoUseCase getRepoUseCase;
    private final CheckStarUseCase checkStarUseCase;
    private final StarUseCase starUseCase;
    private final UnstarUseCase unstarUseCase;
    private final EventBus eventBus;

    public ObservableField<Repo> repo;
    public ObservableBoolean isConnecting;
    public ObservableBoolean starred;

    private String paramUser;
    private String paramRepo;

    @Inject
    public RepoInfoFragmentViewModel(BaseFragment fragment, GetRepoUseCase getRepoUseCase,
                                     CheckStarUseCase checkStarUseCase, StarUseCase starUseCase,
                                     UnstarUseCase unstarUseCase, EventBus eventBus) {
        super(fragment);
        this.getRepoUseCase = getRepoUseCase;
        this.checkStarUseCase = checkStarUseCase;
        this.starUseCase = starUseCase;
        this.unstarUseCase = unstarUseCase;
        this.eventBus = eventBus;

        this.repo = new ObservableField<>();
        this.isConnecting = new ObservableBoolean(true);
        this.starred = new ObservableBoolean(false);
    }

    public void setParams(String user, String repo) {
        this.paramUser = user;
        this.paramRepo = repo;
    }

    @Override
    public void onStart() {

    }

    @Override
    public void onResume() {
        refreshRepo();
    }

    @Override
    public void onPause() {

    }

    @Override
    public void onStop() {

    }

    public void onStarClick(View view) {
        starUseCase.run(repo.get().owner.login, repo.get().name)
                .compose(bindToLifecycle().forCompletable())
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(() -> {
                    this.starred.set(true);
                    refreshRepo();
                    Toast.makeText(getContext(), "Starred!", Toast.LENGTH_SHORT).show();
                }, throwable -> {
                    Toast.makeText(getContext(), "Error", Toast.LENGTH_SHORT).show();
                });
    }

    public void onUnstarClick(View view) {
        unstarUseCase.run(repo.get().owner.login, repo.get().name)
                .compose(bindToLifecycle().forCompletable())
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(() -> {
                    this.starred.set(false);
                    refreshRepo();
                    Toast.makeText(getContext(), "Unstarred!", Toast.LENGTH_SHORT).show();
                }, throwable -> {
                    Toast.makeText(getContext(), "Error", Toast.LENGTH_SHORT).show();
                });
    }

    public void onImageClick(View view) {
        UserActivity.startActivity(getContext(), repo.get().owner.login);
    }

    public void onStargazerClick(View view) {
        StargazerListActivity.startActivity(getContext(), repo.get().owner.login, repo.get().name);
    }

    private void refreshRepo() {
        getRepoUseCase.run(paramUser, paramRepo)
                .flatMapObservable(repo1 -> Observable.combineLatest(
                        Observable.just(repo1),
                        checkStarUseCase.run(repo1.owner.login, repo1.name).toObservable(),
                        Pair::create
                ))
                .toSingle()
                .compose(bindToLifecycle().forSingle())
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(pair -> {
                    this.isConnecting.set(false);
                    this.repo.set(pair.first);
                    this.starred.set(pair.second);

                    eventBus.post(new RefreshRepoEvent(pair.first));

                }, Throwable::printStackTrace);
    }

    public static class RefreshRepoEvent {
        public final Repo repo;
        public RefreshRepoEvent(Repo repo) {
            this.repo = repo;
        }
    }
}


text:
<!doctype html>

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

  <link rel="import" href="../icon-popup.html">
  <link rel="import" href="../../fa-awesome/fa-awesome.html">
  <link rel="import" href="../../paper-styles/shadow.html">

An example of <icon-popup>:

<icon-popup valign="bottom" style="position: absolute; left: 10%; top: 50%;">
  <fa-awesome popup-icon icon="flag">Open me!</fa-awesome>
  <fa-awesome popup-slider icon="angle-down"></fa-awesome>

This popup opens under the icon.

But only if there is enough space left in you brower.

</icon-popup>

<icon-popup valign="top" halign="right" class="whatsapp-icon-popup" style="position: absolute; left: 50%; top: 50%;">
  <fa-awesome popup-icon icon="whatsapp"></fa-awesome>
  <fa-awesome popup-slider icon="angle-double-down"></fa-awesome>

    Everybody uses whatsapp.

    <button popup-close>That's cool</button>

</icon-popup>


text:
module Starscope
  module Lang
    module Vue
      VERSION = 1

      SCRIPT_START = '<script>'.freeze
      SCRIPT_END = '</script>'.freeze

      def self.match_file(name)
        name.end_with?('.vue')
      end

      def self.extract(_path, contents)
        in_script = false

        contents.lines.each_with_index do |line, line_no|
          line_no += 1 # zero-index to one-index

          if in_script
            if line.strip == SCRIPT_END
              in_script = false
            else
              yield Starscope::DB::FRAGMENT, :Javascript, frag: line, line_no: line_no
            end
          elsif line.strip == SCRIPT_START
            in_script = true
          end
        end
      end
    end
  end
end


text:
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>Test file</title>

    <link rel="stylesheet" href="css/combined.css">
</head>
<body>
<script src="js/one.js"></script>
<script src="js/two.js?ts=123"></script>

<script src="js/with_tpl.js"></script>

<script src="js/with_tpl.js"></script>
<script src="js/with_tpl_2.js"></script>

<script data-main="js/with_tpl_2vars1.js" src="js/with_tpl_2vars2.js"></script>

<script data-main="js/with_tpl_2vars1.js" src="js/with_tpl_2vars2.js"></script>
<script data-main="js/with_tpl_2vars1_2.js" src="js/with_tpl_2vars2_2.js"></script>

<script src="js/index.min.js"></script>

<script src="js/index.min.js"></script>

<script data-src="index.data" src="js/with_tpl.js"></script>
<script data-src="index.data" src="js/with_tpl_2.js"></script>

<script data-src="index.html" data-main="js/with_tpl_2vars1.js" src="js/with_tpl_2vars2.js"></script>

<script data-src="index.data" data-main="js/with_tpl_2vars1.js" src="js/with_tpl_2vars2.js"></script>
<script data-src="index.data" data-main="js/with_tpl_2vars1_2.js" src="js/with_tpl_2vars2_2.js"></script>

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</body>
</html>


text:
package com.sz.site7road.dao.event;

import com.sz.site7road.dao.base.BaseDaoImpl;
import com.sz.site7road.entity.event.EventInfo;
import org.springframework.stereotype.Repository;

/**
 * project: 公司官网重构---李福春
 * Created by cutter.li on 2014/9/22 17:49.
 * remark:大事件dao实现类
 */
@Repository
public class EventDaoImpl extends BaseDaoImpl<EventInfo> implements EventDao {
}


text:
import java.util.Scanner;

public class Principal {

	 private static int opc;
	 private static String cadena="";
	 private static char seguir = 'S';

	public static void main(String[] args) {
		while ((seguir=='s') | (seguir=='S')){
			System.out.println("\n\t Cajero áutomático (ATM).");
			System.out.println("\n Ha iniciado sesion.");
			System.out.println("\n       MENU");
			System.out.println("------------------");
			System.out.println("1. Hacer una transaccion y retiro.");
			System.out.println("2. salir");

	    Scanner keyboard = new Scanner(System.in);
	    System.out.print("\nIngrese una opción:");
	    opc = keyboard.nextInt();

		switch (opc){
     	case 1:
     		Cliente b = new Cliente();
       		b.digitos1();

   			break;

   		case 2:
   			keyboard.nextLine();
    	    keyboard = new Scanner(System.in);
			System.out.printf("\n\n\t\t¿Desea continuar? s/n : ");
			cadena=keyboard.nextLine();
		    seguir=cadena.charAt(0);
		    System.out.printf("\n\n\n");
   			break;
   			}
		 System.out.println("\n********************");
		}
	}
}


text:
using Bivi.Domaine;
using Bivi.FrontOffice.Web.ViewModels.Helpers;
using Bivi.FrontOffice.Web.ViewModels.Pages.Common;
using Bivi.FrontOffice.Web.ViewModels.ViewModels;
using Bivi.Infrastructure.Constant;
using Bivi.Infrastructure.Services.Caching;
using System;
using System.Collections.Generic;

namespace Bivi.FrontOffice.Web.ViewModels.Pages.Module.StaticModel
{
    public class BlocViewModel : ViewModelBase, IBlocContenu
    {
        public long ID { get; set; }
        public long TypeRenduBlocID { get; set; }
        public long SelectionID { get; set; }

        public string TypeBlocLibelle { get; set; }
        public string Description { get; set; }

        public string Libelle { get; set; }
        public string Code { get; set; }
        public string CodeTypeRenduBloc { get; set; }
        public bool IsAutomatique { get; set; }
        //public long Option { get; set; }

        public Nullable<long> Option { get; set; }
        public long TypeBlocID { get; set; }
        public string Accroche { get; set; }
        public string Auteurs { get; set; }
        public string Reference { get; set; }
        public long NombreConsultation { get; set; }
        public DateTime? DatePublication { get; set; }
        public bool HideLibelle { get; set; }

        public long? ParentID { get; set; }
        public Nullable<int> Ordre { get; set; }
        public string Rubrique { get; set; }

        public string UrlVignette { get; set; }
        public string LibelleVignette { get; set; }
        public string SizeVignette { get; set; }
        public string TitreVideo { get; set; }
        public string VideoTypeVideo { get; set; }
        public bool ExternalVideo { get; set; }
        public string UrlVideo { get; set; }
        public long TypeContenuID { get; set; }

        public long IdApercuVideo { get; set; }
        public string TitreApercuVideo { get; set; }
        public string TitreAnglais { get; set; }
        public string UrlApercuVideo { get; set; }

        public long Page { get; set; }
        public long NbParPage { get; set; }
        public long UtilisateurID { get; set; }
        public long SiteID { get; set; }
        public bool RechercheImage { get; set; }
        public long RechercheID { get; set; }
        public string Mot { get; set; }

        public long idDate { get; set; }
        public long count { get; set; }
        public long TotalRow { get; set; }
        public long Compteur { get; set; }

        public int selectionne { get; set; }
        public string Type { get; set; }

        public long FigureID { get; set; }
        public string FigureTexte { get; set; }
        public string FigureTitre { get; set; }
        public string FigureAccroche { get; set; }

        public bool IsAlerte { get; set; }
        public bool IsProfil { get; set; }
        public PostitViewModel Postits { get; set; }
        public PartageViewModel Partage { get; set; }

        public Nullable<long> CiviliteID { get; set; }
        public string Email { get; set; }
        public string Nom { get; set; }
        public string Prenom { get; set; }
        public string Telephone { get; set; }
        public string mobile { get; set; }
        public string Fax { get; set; }

        public bool AvecDocument { get; set; }
        public int Niveau { get; set; }

        public string Famille { get; set; }
        public string CodeFamille { get; set; }
        public bool Abonne { get; set; }

        public string Texte { get; set; }

        public string Thematique { get; set; }

        public string DateAffichee { get; set; }

        public string Nomenclature { get; set; }

        public string UrlNav { get; set; }

        //public string Description { get; set; }
        public BlocViewModel(Context context, ICaching translator)
            :base(context, translator)
        {

        }

        public BlocViewModel()
        {

        }

    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<out xmlns:pfix="http://party.com"><inner pfix:nuts="pecan"/></out>


text:
from social.backends.yandex import YandexOpenId as YandexBackend, \
                                   YaruOAuth2 as YaruBackend, \
                                   YandexOAuth2 as YandexOAuth2Backend


text:
import React from 'react';
import Button from 'react-bootstrap/Button';
import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
import { LogVarsComponentProps } from './LogVars.interface';
import { VarsState } from './LogVars.reducers';
import { HorizontalInput } from '../Form';

export const LogVarsComponent: React.FC<LogVarsComponentProps> = (props) => {
  const { resetVariables, onChange, rawVars, bracketsError } = props;

  return (
    <Row>
      <Col>
        <Row>
          <Col>

Variables

          </Col>
          <Col className="text-right">
            <Button
              variant="outline-danger"
              size="sm"
              onClick={() => {
                resetVariables();
              }}
            >
              Reset variables
            </Button>
          </Col>
        </Row>

        <HorizontalInput
          label="Variable names to log"
          onChange={(rawVars: VarsState['rawVars']) => {
            onChange(rawVars);
          }}
          value={rawVars}
          errorMsg={bracketsError}
        />
      </Col>
    </Row>
  );
};


text:
@interface BAProfileViewController ()
<
    UITableViewDelegate,
    UITableViewDataSource
>

@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (nonatomic, strong) BALoginViewController *loginVC;
@property (nonatomic, strong) NSArray *dataArray;

@end

@implementation BAProfileViewController

#pragma mark - life cycle
- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];

}

- (void)viewWillDisappear:(BOOL)animated
{
    [super viewWillDisappear:animated];

}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.

    [self setupUI];
}

#pragma mark - 私有方法
- (void)setupUI
{
    self.title                     = @"我 的";
    self.view.backgroundColor      = BAKit_Color_Red;

    self.tableView.delegate        = self;
    self.tableView.dataSource      = self;
    self.tableView.tableFooterView = [UIView new];

    [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:BAProfile_CellID2];

    _loginVC                       = [BALoginViewController new];
    [self addNoti];
}

- (void)openAppWithAlert:(NSString *)msg
{
    [self.view ba_showAlertView:@"网页打开APP,带传参:" message:msg];
}

#pragma mark - 通知
- (void)addNoti
{
    [BA_NotiCenter addObserver:self selector:@selector(loginFinishAction:) name:BANotioKey_LoginFinish object:nil];
}

#pragma mark - UITableView Delegate / UITableViewDataSource
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 4;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return (1 == section) ? 4:1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (0 == indexPath.section)
    {
        //        BAProfileHeadCell *headCell = [tableView dequeueReusableCellWithIdentifier:@"BAProfileHeadCell"];
        BAProfileHeadCell *headCell = [BAProfileHeadCell dequeueCellFromNibIndex:indexPath.section identify:BAProfile_CellID tableView:tableView];
        headCell.model = BAUSERSHARE;
        return headCell;
    }
    else
    {
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:BAProfile_CellID2];
        cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;

        if (1 == indexPath.section)
        {
            NSDictionary *dict = self.dataArray[indexPath.row];
            cell.textLabel.text  = dict[BAProfile_Title];
            cell.imageView.image = BA_ImageName(dict[BAProfile_Image]);
        }
        else if (2 == indexPath.section)
        {
            cell.textLabel.text = @"表情";
            cell.imageView.image = BA_ImageName(@"profileVC.bundle/MoreExpressionShops");
        }
        else if (3 == indexPath.section)
        {
            cell.textLabel.text = @"设置";
            cell.imageView.image = BA_ImageName(@"profileVC.bundle/MoreSetting");
        }

        return cell;
    }
    return [UITableViewCell new];
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return (0 == indexPath.section) ? 82:42;
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{
    return (0 == section) ? 15:20;
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
    return FLT_MIN;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    if (!BAUSERSHARE.isLogin)
    {
        [BAJumpManager ba_gotoLoginVCWithViewController:self];
    }
}

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (1 == indexPath.section)
    {
        if ([cell respondsToSelector:@selector(setSeparatorInset:)])
        {
            [cell setSeparatorInset:UIEdgeInsetsMake(0, 15, 0, 0)];
        }
        if ([cell respondsToSelector:@selector(setLayoutMargins:)])
        {
            [cell setLayoutMargins:UIEdgeInsetsMake(0, 15, 0, 0)];
        }
    }
}

#pragma mark - Custom Delegate

#pragma mark - event response
- (void)loginFinishAction:(NSNotification *)noti
{
    NSDictionary *dict = noti.userInfo;
    if ([dict[@"isLogin"] isEqualToString:@"1"])
    {
        [self.tableView reloadData];
    }
}

#pragma mark - getters and setters
- (NSArray *)dataArray
{
    if (!_dataArray)
    {
        _dataArray = @[
                       @{
                           BAProfile_Title : @"相册",
                           BAProfile_Image : @"profileVC.bundle/MoreMyAlbum"
                           },
                       @{
                           BAProfile_Title : @"收藏",
                           BAProfile_Image : @"profileVC.bundle/MoreMyFavorites"
                           },
                       @{
                           BAProfile_Title : @"钱包",
                           BAProfile_Image : @"profileVC.bundle/MoreMyBankCard"
                           },
                       @{
                           BAProfile_Title : @"卡包",
                           BAProfile_Image : @"profileVC.bundle/MyCardPackageIcon"
                           }
                       ];

    }
    return _dataArray;
}

#pragma mark - dealloc
- (void)dealloc
{
//    [BA_NotiCenter removeObserver:self];
    [BA_NotiCenter removeObserver:self name:BANotioKey_LoginFinish object:nil];

}

@end


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

namespace mdryden.cflapi.v1.Models.Leaders
{
	public class PlayerFumblesRecoveries : PlayerLeader
	{
		[JsonProperty("fumbles_recoveries")]
		public int FumblesRecoveries { get; set; }
	}
}