text:
<?xml version="1.0" encoding="UTF-8" ?>
        <XML>
            <Content>UPDATE</Content>
            <Clip>
                <ClipName>INPRCDP0000</ClipName>
                <TipoContenido>INFORMATIVOS PROGRAMAS</TipoContenido>
                <Contenido><![CDATA[ Cruce de Palabras]]></Contenido>
                <OriginalTitle></OriginalTitle>
                <Description> </Description>
                <Notes>a</Notes>
                <DurPrev></DurPrev>
                <Chapter></Chapter>
                <EndDate></EndDate>
                <EPG></EPG>
                <EPG_Content> </EPG_Content>
                <Segments>

                <Segment>
                    <SegTitle>1-1 CRUCE DE PALABRAS - Cruce de Palabras</SegTitle>
                    <MediaID>INPRCDP000001</MediaID>
                    <Duration>00:24:00.00</Duration>
                    <SegNumber>1</SegNumber>
                    <ClipGroup>PROGRAMA</ClipGroup>
                    <Description> </Description>
                </Segment>
            </Segments></Clip></XML>


text:
var fs   = require('fs');

exports.newer = function(src, dest) {
  var srcTime = 0;
  try {
    var srcTime  = fs.statSync(src).mtime.getTime();
  } catch (ex) {
    return false;
  }
  try {
    var destTime = fs.statSync(dest).mtime.getTime();
    return srcTime > destTime;
  } catch (ex) {
    return true;
  }
};

redpajama_set_name: RedPajamaGithub


text:
#include <gtest/gtest.h>
#include "ocprovisioningmanager.h"

static OicSecAcl_t acl1;
static OicSecAcl_t acl2;
static OCProvisionDev_t pDev1;
static OCProvisionDev_t pDev2;
static OicSecCredType_t credType = SYMMETRIC_PAIR_WISE_KEY;
static OicSecOxm_t oicSecDoxmJustWorks = OIC_JUST_WORKS;
static OicSecOxm_t oicSecDoxmRandomPin = OIC_RANDOM_DEVICE_PIN;
static OicSecDoxm_t defaultDoxm1 =
{
    &oicSecDoxmJustWorks,  /* uint16_t *oxm */
    1,                      /* size_t oxmLen */
    OIC_JUST_WORKS,         /* uint16_t oxmSel */
    SYMMETRIC_PAIR_WISE_KEY,/* OicSecCredType_t sct */
    false,                  /* bool owned */
    {{0}},                  /* OicUuid_t deviceID */
    false,                  /* bool dpc */
    {{0}},                  /* OicUuid_t owner */
#ifdef MULTIPLE_OWNER
    NULL,                   /* OicSecSubOwner_t* subOwners */
    NULL,                   /* OicSecMom_t *mom */
#endif //MULTIPLE_OWNER
    {{0}}                   /* rownerID */
};

static OicSecDoxm_t defaultDoxm2 =
{
    &oicSecDoxmRandomPin,   /* uint16_t *oxm */
    1,                      /* size_t oxmLen */
    OIC_RANDOM_DEVICE_PIN,  /* uint16_t oxmSel */
    SYMMETRIC_PAIR_WISE_KEY,/* OicSecCredType_t sct */
    false,                  /* bool owned */
    {{0}},                  /* OicUuid_t deviceID */
    false,                  /* bool dpc */
    {{0}},                  /* OicUuid_t owner */
#ifdef MULTIPLE_OWNER
    NULL,                   /* OicSecSubOwner_t* subOwners */
    NULL,                   /* OicSecMom_t *mom */
#endif //MULTIPLE_OWNER
    {{0}}                   /* rownerID */
};

static void provisioningCB (void* UNUSED1, size_t UNUSED2, OCProvisionResult_t *UNUSED3, bool UNUSED4)
{
    //dummy callback
    (void) UNUSED1;
    (void) UNUSED2;
    (void) UNUSED3;
    (void) UNUSED4;
}

static OCStackResult OTMLoadSecretCallback(OTMContext_t* otmCtx)
{
    //dummy callback
    (void) otmCtx;
    return OC_STACK_OK;
}

TEST(OCInitPMTest, NullPath)
{
    EXPECT_EQ(OC_STACK_OK, OCInitPM(NULL));
}

TEST(OCProvisionPairwiseDevicesTest, NullDevice1)
{
    pDev1.doxm = &defaultDoxm1;
    uint8_t deviceId1[] = {0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64};
    memcpy(pDev1.doxm->deviceID.id, deviceId1, sizeof(deviceId1));

    pDev2.doxm = &defaultDoxm2;
    uint8_t deviceId2[] = {0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x63};
    memcpy(pDev2.doxm->deviceID.id, deviceId2, sizeof(deviceId2));

    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCProvisionPairwiseDevices(NULL, credType,
                                                              OWNER_PSK_LENGTH_128, NULL, &acl1,
                                                              &pDev2, &acl2, &provisioningCB));
}

TEST(OCProvisionPairwiseDevicesTest, NullDevice2)
{
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCProvisionPairwiseDevices(NULL, credType,
                                                              OWNER_PSK_LENGTH_128, &pDev1, &acl1,
                                                              NULL, &acl2, &provisioningCB));
}

TEST(OCProvisionPairwiseDevicesTest, SamelDeviceId)
{
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCProvisionPairwiseDevices(NULL, credType,
                                                              OWNER_PSK_LENGTH_128, &pDev1, &acl1,
                                                              &pDev1, &acl2, &provisioningCB));
}

TEST(OCProvisionPairwiseDevicesTest, NullCallback)
{
    EXPECT_EQ(OC_STACK_INVALID_CALLBACK, OCProvisionPairwiseDevices(NULL, credType,
                                                              OWNER_PSK_LENGTH_128, &pDev1, &acl1,
                                                              &pDev2, &acl2, NULL));
}

TEST(OCProvisionPairwiseDevicesTest, InvalidKeySize)
{
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCProvisionPairwiseDevices(NULL, credType,
                                                              0, &pDev1, &acl1,
                                                              &pDev2, &acl2 ,&provisioningCB));
}

TEST(OCUnlinkDevicesTest, NullDevice1)
{
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCUnlinkDevices(NULL, NULL, &pDev2, provisioningCB));
}

TEST(OCUnlinkDevicesTest, NullDevice2)
{
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCUnlinkDevices(NULL, &pDev1, NULL, provisioningCB));
}

TEST(OCUnlinkDevicesTest, NullCallback)
{
    EXPECT_EQ(OC_STACK_INVALID_CALLBACK, OCUnlinkDevices(NULL, &pDev1, &pDev2, NULL));
}

TEST(OCUnlinkDevicesTest, SamelDeviceId)
{
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCUnlinkDevices(NULL,&pDev1, &pDev1, &provisioningCB));
}

TEST(OCRemoveDeviceTest, NullTargetDevice)
{
    unsigned short waitTime = 10 ;
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCRemoveDevice(NULL, waitTime, NULL, provisioningCB));
}

TEST(OCRemoveDeviceWithUuidTest, NullTargetDevice)
{
    unsigned short waitTime = 10 ;
    OicUuid_t uuid;
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCRemoveDeviceWithUuid(NULL, waitTime, NULL, provisioningCB));

    EXPECT_EQ(OC_STACK_INVALID_CALLBACK, OCRemoveDeviceWithUuid(NULL, waitTime, &uuid, NULL));
}

TEST(OCRemoveDeviceTest, NullResultCallback)
{
    unsigned short waitTime = 10;
    EXPECT_EQ(OC_STACK_INVALID_CALLBACK, OCRemoveDevice(NULL, waitTime, &pDev1, NULL));
}

TEST(OCRemoveDeviceTest, ZeroWaitTime)
{
    unsigned short waitTime = 0;
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCRemoveDevice(NULL, waitTime, &pDev1, provisioningCB));
}

TEST(OCGetDevInfoFromNetworkTest, NullUnOwnedDeviceInfo)
{
    unsigned short waitTime = 10;
    OCProvisionDev_t *ownedList = NULL;
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCGetDevInfoFromNetwork(waitTime, &ownedList, NULL));
}

TEST(OCGetDevInfoFromNetworkTest, NullOwnedDeviceInfo)
{
    unsigned short waitTime = 10;
    OCProvisionDev_t *unownedList = NULL;
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCGetDevInfoFromNetwork(waitTime, NULL, &unownedList));
}

TEST(OCGetDevInfoFromNetworkTest, ZeroWaitTime)
{
    unsigned short waitTime = 0;
    OCProvisionDev_t *ownedList = NULL;
    OCProvisionDev_t *unownedList = NULL;
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCGetDevInfoFromNetwork(waitTime, &ownedList, &unownedList));
}

TEST(OCGetLinkedStatusTest, NULLDeviceID)
{
    OCUuidList_t *list = NULL;
    size_t noOfDevices = 0;
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCGetLinkedStatus(NULL, &list, &noOfDevices));
}

TEST(OCDeleteUuidListTest, NullUuidList)
{
    OCDeleteUuidList(NULL);
    EXPECT_EQ(1, 1);
}

TEST(OCDeleteACLListTest, NullACLList)
{
    OCDeleteACLList(NULL);
    EXPECT_EQ(1, 1);
}

TEST(OCDeleteDiscoveredDevicesTest, NullProvisionDevList)
{
    OCDeleteDiscoveredDevices(NULL);
    EXPECT_EQ(1, 1);
}

TEST(OCSetOwnerTransferCallbackDataTest, NULLCallback)
{
    OicSecOxm_t ownershipTransferMethod = OIC_JUST_WORKS;
    EXPECT_EQ(OC_STACK_INVALID_CALLBACK, OCSetOwnerTransferCallbackData(ownershipTransferMethod,
    NULL));
}

TEST(OCSetOwnerTransferCallbackDataTest, InvalidOXMType)
{
    OicSecOxm_t ownershipTransferMethod = OIC_OXM_COUNT;
    OTMCallbackData_t stOTMCallbackData = { &OTMLoadSecretCallback, NULL, NULL, NULL};
    EXPECT_EQ(OC_STACK_INVALID_PARAM, OCSetOwnerTransferCallbackData(ownershipTransferMethod,
    &stOTMCallbackData));
}


text:
<?php
namespace App\Controller;

use App\Controller\AppController;

/**
 * Events Controller
 *
 * @property App\Model\Table\EventsTable $Events
 */
class EventsController extends AppController {

/**
 * Index method
 *
 * @return void
 */
	public function index() {
		$this->set('events', $this->paginate($this->Events));
	}

/**
 * Add method
 *
 * @return void
 */
	public function add() {
		$event = $this->Events->newEntity($this->request->data);
		if ($this->request->is('post')) {
			if ($this->Events->save($event)) {
				$this->Flash->success('The event has been saved.');
				return $this->redirect(['action' => 'index']);
			} else {
				$this->Flash->error('The event could not be saved. Please, try again.');
			}
		}
		$this->set(compact('event'));
	}

/**
 * Edit method
 *
 * @param string $id
 * @return void
 * @throws NotFoundException
 */
	public function edit($id = null) {
		$event = $this->Events->get($id, [
			'contain' => []
		]);
		if ($this->request->is(['post', 'put'])) {
			$event = $this->Events->patchEntity($event, $this->request->data);
			if ($this->Events->save($event)) {
				$this->Flash->success('The event has been saved.');
				return $this->redirect(['action' => 'index']);
			} else {
				$this->Flash->error('The event could not be saved. Please, try again.');
			}
		}
		$this->set(compact('event'));
	}

/**
 * Delete method
 *
 * @param string $id
 * @return void
 * @throws NotFoundException
 */
	public function delete($id = null) {
		$event = $this->Events->get($id);
		$this->request->allowMethod('post', 'delete');
		if ($this->Events->delete($event)) {
			$this->Flash->success('The event has been deleted.');
		} else {
			$this->Flash->error('The event could not be deleted. Please, try again.');
		}
		return $this->redirect(['action' => 'index']);
	}
}


text:
<template name="track">

        {{ songname }}{{ artist }}

</template>


text:
angular.module('bridge.controllers.auth')
  .controller('registerModalController', ['$scope', 'User', function($scope, User) {
    // A simple state machine that follows submitting a user registration
    reset();

    $scope.submit = function() {

      // TODO: Do some form validation

      $scope.isRegistering = true;
      $scope.didFail = false;

      User.register($scope.user)
        .then(onSuccess, onFailure);
    };

    function onSuccess(createdUser) {
      $scope.message = 'User successfully created';
      User.login($scope.user.username, $scope.user.password)
        .then(reset, onFailure);
    };

    function onFailure(err) {
      $scope.didFail = true;
      $scope.isRegistering = false;

      $scope.message = 'Failed to create user:' + err.statusText;
    };

    function reset() {
      $scope.user = {};
      $scope.isRegistering = false;
      $scope.didFail = false;
      $scope.message = null;
      $('#sign-up-modal').modal('hide');
    };
  }]);


text:
struct llist_head;

typedef struct llist_head {
	struct llist_head* prev;
	struct llist_head* next;
	void* data;
} llist_head;

int llist_head_init(struct llist_head** head, void* data);
void llist_head_free(struct llist_head* head);
int llist_append(struct llist_head** list, void* data);
void llist_remove(struct llist_head** list, struct llist_head* elem);
int llist_remove_data(struct llist_head** head, void* data);
int llist_remove_index(struct llist_head** head, unsigned int index);
int llist_get_value_at_index(struct llist_head* head, void** data, unsigned int index);
unsigned int llist_length(struct llist_head* head);

#endif


text:
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Dasync.Collections.Internals;

namespace Dasync.Collections
{
    /// <summary>
    /// Base abstract class that implements <see cref="IAsyncEnumerable"/>.
    /// Use concrete implementation <see cref="AsyncEnumerable{T}"/> or <see cref="AsyncEnumerableWithState{TItem, TState}"/>.
    /// </summary>
    public abstract class AsyncEnumerable : IAsyncEnumerable
    {
        /// <summary>
        /// Returns pre-cached empty collection
        /// </summary>
        public static IAsyncEnumerable<T> Empty<T>() => AsyncEnumerable<T>.Empty;

        IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
        {
            throw new NotImplementedException();
        }
    }

    /// <summary>
    /// Helps to enumerate items in a collection asynchronously
    /// </summary>
    /// <example>
    /// <code>
    /// IAsyncEnumerable<int> ProduceNumbers(int start, int end)
    /// {
    ///   return new AsyncEnumerable<int>(async yield => {
    ///     for (int number = start; number <= end; number++)
    ///       await yield.ReturnAsync(number);
    ///   });
    /// }
    ///
    /// async Task ConsumeAsync()
    /// {
    ///   var asyncEnumerableCollection = ProduceNumbers(start: 1, end: 10);
    ///   await asyncEnumerableCollection.ForEachAsync(async number => {
    ///     await Console.Out.WriteLineAsync(number);
    ///   });
    /// }
    /// </code>
    /// </example>
    public class AsyncEnumerable<T> : AsyncEnumerable, IAsyncEnumerable, IAsyncEnumerable<T>
    {
        private readonly Func<AsyncEnumerator<T>.Yield, Task> _enumerationFunction;

        /// <summary>
        /// A pre-cached empty collection
        /// </summary>
        public readonly static IAsyncEnumerable<T> Empty = new EmptyAsyncEnumerable<T>();

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="enumerationFunction">A function that enumerates items in a collection asynchronously</param>
        public AsyncEnumerable(Func<AsyncEnumerator<T>.Yield, Task> enumerationFunction)
        {
            _enumerationFunction = enumerationFunction;
        }

        /// <summary>
        /// Creates an enumerator that iterates through a collection asynchronously
        /// </summary>
        /// <param name="cancellationToken">A cancellation token to cancel creation of the enumerator in case if it takes a lot of time</param>
        /// <returns>Returns a task with the created enumerator as result on completion</returns>
        public IAsyncEnumerator<T> GetAsyncEnumerator(CancellationToken cancellationToken = default)
            => new AsyncEnumerator<T>(_enumerationFunction) { MasterCancellationToken = cancellationToken };

        IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
            => new AsyncEnumerator<T>(_enumerationFunction) { MasterCancellationToken = cancellationToken };
    }

    /// <summary>
    /// Similar to <see cref="AsyncEnumerable{T}"/>, but allows you to pass a state object into the enumeration function, what can be
    /// used for performance optimization, so don't have to create a delegate on the fly every single time you create the enumerator.
    /// </summary>
    /// <typeparam name="TItem">Type of items returned by </typeparam>
    /// <typeparam name="TState">Type of the state object</typeparam>
    public class AsyncEnumerableWithState<TItem, TState> : AsyncEnumerable, IAsyncEnumerable, IAsyncEnumerable<TItem>
    {
        private readonly Func<AsyncEnumerator<TItem>.Yield, TState, Task> _enumerationFunction;

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="enumerationFunction">A function that enumerates items in a collection asynchronously</param>
        /// <param name="state">A state object that is passed to the <paramref name="enumerationFunction"/></param>
        public AsyncEnumerableWithState(Func<AsyncEnumerator<TItem>.Yield, TState, Task> enumerationFunction, TState state)
        {
            _enumerationFunction = enumerationFunction;
            State = state;
        }

        /// <summary>
        /// A user state that gets passed into the enumeration function.
        /// </summary>
        protected TState State { get; }

        /// <summary>
        /// Creates an enumerator that iterates through a collection asynchronously
        /// </summary>
        /// <returns>Returns a task with the created enumerator as result on completion</returns>
        public virtual IAsyncEnumerator<TItem> GetAsyncEnumerator(CancellationToken cancellationToken = default)
            => new AsyncEnumeratorWithState<TItem, TState>(_enumerationFunction, State)
                { MasterCancellationToken = cancellationToken };

        /// <summary>
        /// Creates an enumerator that iterates through a collection asynchronously
        /// </summary>
        /// <returns>Returns a task with the created enumerator as result on completion</returns>
        IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken)
            => new AsyncEnumeratorWithState<TItem, TState>(_enumerationFunction, State)
                { MasterCancellationToken = cancellationToken };
    }
}


text:
namespace bsn.GoldParser.Grammar {
	/// <summary>
	/// The ending mode for a group in the EGT grammar
	/// </summary>
	public enum GroupEndingMode: int {
		/// <summary>
		/// The ending symbol will be left on the input queue.
		/// </summary>
		Open = 0,

		/// <summary>
		/// The ending symbol will be consumed.
		/// </summary>
		Closed = 1
	}
}


text:
class RemoveClientDevices < ActiveRecord::Migration
  def change
    drop_table :deathstare_client_devices
  end
end


text:
<?php

namespace AppBundle\Services;

use AppBundle\Entity\Sprint;
use AppBundle\Exception\SprintAlreadyClosedException;
use AppBundle\Exception\SprintNotFoundException;
use AppBundle\Repository\SprintRepository;

/**
 * @author Romain Kuzniak <romain.kuzniak@turn-it-up.org>
 */
class SprintService
{

    /**
     * @var SprintRepository
     */
    private $sprintRepository;

    /**
     * @return array
     * @throws SprintNotFoundException
     * @throws SprintAlreadyClosedException
     */
    public function closeSprint($id)
    {
        /** @var Sprint $sprint */
        $sprint = $this->sprintRepository->find($id);

        if ('CLOSE' === $sprint->getStatus()) {
            throw new SprintAlreadyClosedException();
        }

        foreach ($sprint->getIssues() as $issue) {
            if ('DONE' === $issue->getStatus()) {
                $issue->setClosedAt(new \DateTime());
                $issue->setStatus('CLOSE');
            } else {
                $sprint->removeIssue($issue);
            }
        }
        $sprint->setEffectiveClosedAt(new \DateTime());
        $sprint->setStatus('CLOSE');

        $closedIssuesCount = $sprint->getIssues()->count();

        return array(
            'closedIssuesCount'   => $closedIssuesCount,
            'averageClosedIssues' => $this->sprintRepository->findAverageClosedIssues()
        );
    }

    /**
     * @return int
     * @throws SprintNotFoundException
     * @throws SprintAlreadyClosedException
     */
    public function closeExpectedSprint()
    {
        $sprint = $this->sprintRepository->findSprintToClose();

        foreach ($sprint->getIssues() as $issue) {
            if ('DONE' === $issue->getStatus()) {
                $issue->setClosedAt(new \DateTime());
                $issue->setStatus('CLOSE');
            } else {
                $sprint->removeIssue($issue);
            }
        }
        $sprint->setEffectiveClosedAt(new \DateTime());
        $sprint->setStatus('CLOSE');

        return $sprint->getId();
    }

    /**
     * @return Sprint
     * @throws \AppBundle\Exception\SprintNotFoundException
     */
    public function get($id)
    {
        return $this->sprintRepository->find($id);
    }

    public function setSprintRepository(SprintRepository $sprintRepository)
    {
        $this->sprintRepository = $sprintRepository;
    }

}


text:
package org.apache.geode.test.junit.rules.accessible;

import org.junit.contrib.java.lang.system.RestoreSystemProperties;

/**
 * Subclass RestoreSystemProperties in order to invoke protected methods from different package.
 */
public class AccessibleRestoreSystemProperties extends RestoreSystemProperties {

  @Override
  public void before() throws Throwable {
    super.before();
  }

  @Override
  public void after() {
    super.after();
  }
}


text:
<?php

/**
 *  @see MarketplaceWebServiceProducts_Model
 */

require_once (dirname(__FILE__) . '/../Model.php');

/**
 * MarketplaceWebServiceProducts_Model_Summary
 *
 * Properties:
 *

 *
 *
TotalOfferCount: int

 *
NumberOfOffers: MarketplaceWebServiceProducts_Model_NumberOfOffers

 *
LowestPrices: MarketplaceWebServiceProducts_Model_LowestPrices

 *
BuyBoxPrices: MarketplaceWebServiceProducts_Model_BuyBoxPrices

 *
ListPrice: MarketplaceWebServiceProducts_Model_MoneyType

 *
SuggestedLowerPricePlusShipping: MarketplaceWebServiceProducts_Model_MoneyType

 *
BuyBoxEligibleOffers: MarketplaceWebServiceProducts_Model_BuyBoxEligibleOffers

 *
OffersAvailableTime: string

 *
 *

 */

 class MarketplaceWebServiceProducts_Model_Summary extends MarketplaceWebServiceProducts_Model {

    public function __construct($data = null)
    {
    $this->_fields = array (
    'TotalOfferCount' => array('FieldValue' => null, 'FieldType' => 'int'),
    'NumberOfOffers' => array('FieldValue' => null, 'FieldType' => 'MarketplaceWebServiceProducts_Model_NumberOfOffers'),
    'LowestPrices' => array('FieldValue' => null, 'FieldType' => 'MarketplaceWebServiceProducts_Model_LowestPrices'),
    'BuyBoxPrices' => array('FieldValue' => null, 'FieldType' => 'MarketplaceWebServiceProducts_Model_BuyBoxPrices'),
    'ListPrice' => array('FieldValue' => null, 'FieldType' => 'MarketplaceWebServiceProducts_Model_MoneyType'),
    'SuggestedLowerPricePlusShipping' => array('FieldValue' => null, 'FieldType' => 'MarketplaceWebServiceProducts_Model_MoneyType'),
    'BuyBoxEligibleOffers' => array('FieldValue' => null, 'FieldType' => 'MarketplaceWebServiceProducts_Model_BuyBoxEligibleOffers'),
    'OffersAvailableTime' => array('FieldValue' => null, 'FieldType' => 'string'),
    );
    parent::__construct($data);
    }

    /**
     * Get the value of the TotalOfferCount property.
     *
     * @return int TotalOfferCount.
     */
    public function getTotalOfferCount()
    {
        return $this->_fields['TotalOfferCount']['FieldValue'];
    }

    /**
     * Set the value of the TotalOfferCount property.
     *
     * @param int totalOfferCount
     * @return this instance
     */
    public function setTotalOfferCount($value)
    {
        $this->_fields['TotalOfferCount']['FieldValue'] = $value;
        return $this;
    }

    /**
     * Check to see if TotalOfferCount is set.
     *
     * @return true if TotalOfferCount is set.
     */
    public function isSetTotalOfferCount()
    {
                return !is_null($this->_fields['TotalOfferCount']['FieldValue']);
            }

    /**
     * Set the value of TotalOfferCount, return this.
     *
     * @param totalOfferCount
     *             The new value to set.
     *
     * @return This instance.
     */
    public function withTotalOfferCount($value)
    {
        $this->setTotalOfferCount($value);
        return $this;
    }

    /**
     * Get the value of the NumberOfOffers property.
     *
     * @return NumberOfOffers NumberOfOffers.
     */
    public function getNumberOfOffers()
    {
        return $this->_fields['NumberOfOffers']['FieldValue'];
    }

    /**
     * Set the value of the NumberOfOffers property.
     *
     * @param MarketplaceWebServiceProducts_Model_NumberOfOffers numberOfOffers
     * @return this instance
     */
    public function setNumberOfOffers($value)
    {
        $this->_fields['NumberOfOffers']['FieldValue'] = $value;
        return $this;
    }

    /**
     * Check to see if NumberOfOffers is set.
     *
     * @return true if NumberOfOffers is set.
     */
    public function isSetNumberOfOffers()
    {
                return !is_null($this->_fields['NumberOfOffers']['FieldValue']);
            }

    /**
     * Set the value of NumberOfOffers, return this.
     *
     * @param numberOfOffers
     *             The new value to set.
     *
     * @return This instance.
     */
    public function withNumberOfOffers($value)
    {
        $this->setNumberOfOffers($value);
        return $this;
    }

    /**
     * Get the value of the LowestPrices property.
     *
     * @return LowestPrices LowestPrices.
     */
    public function getLowestPrices()
    {
        return $this->_fields['LowestPrices']['FieldValue'];
    }

    /**
     * Set the value of the LowestPrices property.
     *
     * @param MarketplaceWebServiceProducts_Model_LowestPrices lowestPrices
     * @return this instance
     */
    public function setLowestPrices($value)
    {
        $this->_fields['LowestPrices']['FieldValue'] = $value;
        return $this;
    }

    /**
     * Check to see if LowestPrices is set.
     *
     * @return true if LowestPrices is set.
     */
    public function isSetLowestPrices()
    {
                return !is_null($this->_fields['LowestPrices']['FieldValue']);
            }

    /**
     * Set the value of LowestPrices, return this.
     *
     * @param lowestPrices
     *             The new value to set.
     *
     * @return This instance.
     */
    public function withLowestPrices($value)
    {
        $this->setLowestPrices($value);
        return $this;
    }

    /**
     * Get the value of the BuyBoxPrices property.
     *
     * @return BuyBoxPrices BuyBoxPrices.
     */
    public function getBuyBoxPrices()
    {
        return $this->_fields['BuyBoxPrices']['FieldValue'];
    }

    /**
     * Set the value of the BuyBoxPrices property.
     *
     * @param MarketplaceWebServiceProducts_Model_BuyBoxPrices buyBoxPrices
     * @return this instance
     */
    public function setBuyBoxPrices($value)
    {
        $this->_fields['BuyBoxPrices']['FieldValue'] = $value;
        return $this;
    }

    /**
     * Check to see if BuyBoxPrices is set.
     *
     * @return true if BuyBoxPrices is set.
     */
    public function isSetBuyBoxPrices()
    {
                return !is_null($this->_fields['BuyBoxPrices']['FieldValue']);
            }

    /**
     * Set the value of BuyBoxPrices, return this.
     *
     * @param buyBoxPrices
     *             The new value to set.
     *
     * @return This instance.
     */
    public function withBuyBoxPrices($value)
    {
        $this->setBuyBoxPrices($value);
        return $this;
    }

    /**
     * Get the value of the ListPrice property.
     *
     * @return MoneyType ListPrice.
     */
    public function getListPrice()
    {
        return $this->_fields['ListPrice']['FieldValue'];
    }

    /**
     * Set the value of the ListPrice property.
     *
     * @param MarketplaceWebServiceProducts_Model_MoneyType listPrice
     * @return this instance
     */
    public function setListPrice($value)
    {
        $this->_fields['ListPrice']['FieldValue'] = $value;
        return $this;
    }

    /**
     * Check to see if ListPrice is set.
     *
     * @return true if ListPrice is set.
     */
    public function isSetListPrice()
    {
                return !is_null($this->_fields['ListPrice']['FieldValue']);
            }

    /**
     * Set the value of ListPrice, return this.
     *
     * @param listPrice
     *             The new value to set.
     *
     * @return This instance.
     */
    public function withListPrice($value)
    {
        $this->setListPrice($value);
        return $this;
    }

    /**
     * Get the value of the SuggestedLowerPricePlusShipping property.
     *
     * @return MoneyType SuggestedLowerPricePlusShipping.
     */
    public function getSuggestedLowerPricePlusShipping()
    {
        return $this->_fields['SuggestedLowerPricePlusShipping']['FieldValue'];
    }

    /**
     * Set the value of the SuggestedLowerPricePlusShipping property.
     *
     * @param MarketplaceWebServiceProducts_Model_MoneyType suggestedLowerPricePlusShipping
     * @return this instance
     */
    public function setSuggestedLowerPricePlusShipping($value)
    {
        $this->_fields['SuggestedLowerPricePlusShipping']['FieldValue'] = $value;
        return $this;
    }

    /**
     * Check to see if SuggestedLowerPricePlusShipping is set.
     *
     * @return true if SuggestedLowerPricePlusShipping is set.
     */
    public function isSetSuggestedLowerPricePlusShipping()
    {
                return !is_null($this->_fields['SuggestedLowerPricePlusShipping']['FieldValue']);
            }

    /**
     * Set the value of SuggestedLowerPricePlusShipping, return this.
     *
     * @param suggestedLowerPricePlusShipping
     *             The new value to set.
     *
     * @return This instance.
     */
    public function withSuggestedLowerPricePlusShipping($value)
    {
        $this->setSuggestedLowerPricePlusShipping($value);
        return $this;
    }

    /**
     * Get the value of the BuyBoxEligibleOffers property.
     *
     * @return BuyBoxEligibleOffers BuyBoxEligibleOffers.
     */
    public function getBuyBoxEligibleOffers()
    {
        return $this->_fields['BuyBoxEligibleOffers']['FieldValue'];
    }

    /**
     * Set the value of the BuyBoxEligibleOffers property.
     *
     * @param MarketplaceWebServiceProducts_Model_BuyBoxEligibleOffers buyBoxEligibleOffers
     * @return this instance
     */
    public function setBuyBoxEligibleOffers($value)
    {
        $this->_fields['BuyBoxEligibleOffers']['FieldValue'] = $value;
        return $this;
    }

    /**
     * Check to see if BuyBoxEligibleOffers is set.
     *
     * @return true if BuyBoxEligibleOffers is set.
     */
    public function isSetBuyBoxEligibleOffers()
    {
                return !is_null($this->_fields['BuyBoxEligibleOffers']['FieldValue']);
            }

    /**
     * Set the value of BuyBoxEligibleOffers, return this.
     *
     * @param buyBoxEligibleOffers
     *             The new value to set.
     *
     * @return This instance.
     */
    public function withBuyBoxEligibleOffers($value)
    {
        $this->setBuyBoxEligibleOffers($value);
        return $this;
    }

    /**
     * Get the value of the OffersAvailableTime property.
     *
     * @return XMLGregorianCalendar OffersAvailableTime.
     */
    public function getOffersAvailableTime()
    {
        return $this->_fields['OffersAvailableTime']['FieldValue'];
    }

    /**
     * Set the value of the OffersAvailableTime property.
     *
     * @param string offersAvailableTime
     * @return this instance
     */
    public function setOffersAvailableTime($value)
    {
        $this->_fields['OffersAvailableTime']['FieldValue'] = $value;
        return $this;
    }

    /**
     * Check to see if OffersAvailableTime is set.
     *
     * @return true if OffersAvailableTime is set.
     */
    public function isSetOffersAvailableTime()
    {
                return !is_null($this->_fields['OffersAvailableTime']['FieldValue']);
            }

    /**
     * Set the value of OffersAvailableTime, return this.
     *
     * @param offersAvailableTime
     *             The new value to set.
     *
     * @return This instance.
     */
    public function withOffersAvailableTime($value)
    {
        $this->setOffersAvailableTime($value);
        return $this;
    }

}


text:
'use strict';

module.exports = function(app) {
	var users = require('../../app/controllers/users');
	var alerts = require('../../app/controllers/alerts');

	// Alerts Routes
	app.route('/alerts')
		.get(alerts.list)
		.post(users.requiresLogin, alerts.create);

	app.route('/alerts/:alertId')
		.get(alerts.read)
		.put(users.requiresLogin, alerts.hasAuthorization, alerts.update)
		.delete(users.requiresLogin, alerts.hasAuthorization, alerts.delete);

	// Finish by binding the Alert middleware
	app.param('alertId', alerts.alertByID);
};


text:
package com.lyj.base.service;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.hibernate.Session;
import org.hibernate.Transaction;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.lyj.base.dao.UserDao;
import com.lyj.base.entity.MenuInfo;
import com.lyj.base.entity.RoleInfo;
import com.lyj.base.entity.RoleMenu;
import com.lyj.base.entity.UserInfo;
import com.lyj.base.entity.UserRole;
import com.lyj.base.util.StringUtil;
/**
 *  SpringMVC+Hibernate +MySql+ EasyUI ---CRUD
 * @author LIUYIJIAO
 * 类名称:UserService
 * @date 2014-11-15 下午4:14:37
 * 备注:
 */
public class UserService extends BaseService {
	UserDao userDao;
	/**
	 * list
	 * @param name
	 * @param start
	 * @param size
	 * @param order
	 * @return
	 */
	public String list(String name,int start, int size, String order){
		List<Map<String,Object>> list =userDao.list(name,start, size, order);
		int count = count(name,start, size, order);

		Map<String,Object> map = new HashMap<String, Object>();
		map.put("total", count);
		map.put("rows", list);

		Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create();
		String s = gson.toJson(map);
		return s;
	}
	/**
	 * save
	 * @param userinfo
	 * @return
	 */
	public String save(UserInfo userinfo) {
		String result = null;
		Date date = new Date();
		userinfo.setBirthday(date);
		userinfo.setPassword("888888");
		super.save(userinfo);
		result = "{\"success\":true,\"msg\":\"新增角色成功\"}";
		return result ;
	}
	/**
	 * count
	 * @param name
	 * @param start
	 * @param size
	 * @param order
	 * @return
	 */
	public int count(String name,int start, int size, String order){
		return userDao.count(name,start, size, order);
	}
	/**
	 * getuserbyname
	 * @param name
	 * @return
	 */
	public UserInfo getUserByName(String name) {
		return userDao.getUserByName(name);
	}
	/**
	 * update
	 * @param request
	 * @param userinfo
	 * @param id
	 * @return
	 */
	public String update(HttpServletRequest request, UserInfo userinfo,
			Integer id,int roleId) {
		//开启事物
		Session  session= this.baseDao.getSession().getSessionFactory().openSession();
		Transaction tx= session.beginTransaction();

		RoleInfo roleInfo=(RoleInfo) session.get(RoleInfo.class, roleId);

		UserInfo userinfoOld = (UserInfo) session.get(UserInfo.class, id);
		if(null != userinfo){
			StringUtil.requestToObject(request, userinfoOld);
		}
		//删除该用户的角色关联
		String hqlDelete = "delete UserRole ur where ur.userInfo = :userId";
		int deletedEntities = session.createQuery( hqlDelete )
		.setInteger( "userId", userinfoOld.getId() )
		.executeUpdate();
		System.out.println("删除个数:"+deletedEntities);
		if(roleInfo!=null){
			UserRole userRole=new UserRole();
			userRole.setRoleInfo(roleInfo);
			userRole.setUserInfo(userinfoOld);
			session.saveOrUpdate(userRole);
		}
		session.update(userinfoOld);
		tx.commit();
		session.close();
		//结束事物
		String result = "{\"success\":true,\"msg\":\"更新成功!\"}";
		return result;
	}
	/**
	 * delete
	 * @param id
	 */
	public void delete(Serializable id){
		userDao.delete(UserInfo.class,id);
	}

	/*------------------*/
	public UserDao getUserDao() {
		return userDao;
	}
	public void setUserDao(UserDao userDao) {
		this.userDao = userDao;
	}

}


text:
<!DOCTYPE html>

  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="description" content="A 1Devs Website." />
  <meta name="viewport" content="width=device-width" />

  <title>..:: 1Website ::..</title>

  <link type="text/plain" rel="author" href="humans.txt" />
  <link type="text/css" rel="stylesheet" href="http://alimd.github.io/libs/normalize/2.1.0/normalize.min.css" />
  <link type="text/css" rel="stylesheet" href="style.css?v=0.1" />

h1.title

nav ul li a

nav ul li a

nav ul li a

article header h1

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sodales urna non odio egestas tempor. Nunc vel vehicula ante. Etiam bibendum iaculis libero, eget molestie nisl pharetra in. In semper consequat est, eu porta velit mollis nec.

article section h2

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sodales urna non odio egestas tempor. Nunc vel vehicula ante. Etiam bibendum iaculis libero, eget molestie nisl pharetra in. In semper consequat est, eu porta velit mollis nec. Curabitur posuere enim eget turpis feugiat tempor. Etiam ullamcorper lorem dapibus velit suscipit ultrices. Proin in est sed erat facilisis pharetra.

article section h2

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sodales urna non odio egestas tempor. Nunc vel vehicula ante. Etiam bibendum iaculis libero, eget molestie nisl pharetra in. In semper consequat est, eu porta velit mollis nec. Curabitur posuere enim eget turpis feugiat tempor. Etiam ullamcorper lorem dapibus velit suscipit ultrices. Proin in est sed erat facilisis pharetra.

article footer h3

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sodales urna non odio egestas tempor. Nunc vel vehicula ante. Etiam bibendum iaculis libero, eget molestie nisl pharetra in. In semper consequat est, eu porta velit mollis nec. Curabitur posuere enim eget turpis feugiat tempor.

aside

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sodales urna non odio egestas tempor. Nunc vel vehicula ante. Etiam bibendum iaculis libero, eget molestie nisl pharetra in. In semper consequat est, eu porta velit mollis nec. Curabitur posuere enim eget turpis feugiat tempor. Etiam ullamcorper lorem dapibus velit suscipit ultrices.

footer


text:
<?php
/**
 * Created by PhpStorm.
 * User: Jones
 * Date: 24.11.2016
 * Time: 10:27
 */

namespace Source\Models\DAOs;
use \Source\Models\User;

class UserDAO extends AbstractDAO
{

    public function create($username, $email, $password, $token){
        // get Usertable
        $users = $this->getTable();

        // create new User
        $id = md5(uniqid(rand(), true));
        $user = new User($id, $username, $email, $password, "user", $token);

        // add new User to the Usertable
        $users[] = $user;

        // save changes
        $this->saveTable($users);
        $this->container->get('logger')->info("Added new User: " . $user->to_json());
        return $user;
    }

    /*
     * Returns the table as an array
     */
    public function getTable(){
        $this->container->get('logger')->info("Collecting usertable from database user-db.json");
        $string = file_get_contents($this->db_location);
        $users = $this->container->get('serializer')->deserialize($string,'Source\\Models\\User[]', 'json');
        return $users;
    }

    /**
     * Saves the user table
     * @param $users [] the new usertable that should be saved, represented as an array
     */
    public function saveTable($users){
        $jsonContent = $this->container->get('serializer')->serialize($users, 'json');
        file_put_contents($this->db_location,$jsonContent);
    }

    public function getUserWithEmail($email){
        $result = 0;
        foreach ($this->getTable() as $user){
            if(strcmp($email, $user->getEmail()) == 0){
                $result = $user;
                break;
            }

        }
        return $result;
    }

    public function getUserByID($id){
        $result = 0;
        foreach ($this->getTable() as $user){
            if(strcmp($user->getId(), $id) == 0){
                $result = $user;
                break;
            }
        }
        return $result;
    }

    public function getUserByUsername($username){
        $result = 0;
        foreach ($this->getTable() as $user){
            if( strcmp($username, $user->getUsername()) == 0){
                $result = $user;
                break;
            }
        }
        return $result;
    }

    public function updateUser(User $updatedUser){
        $users = $this->getTable();
        $newUsers = array();
        foreach ($users as $user){
            if(strcmp($user->getId(),$updatedUser->getId()) == 0){
                $newUsers[] = $updatedUser;
            } else{
                $newUsers[] = $user;
            }
        }
        $this->saveTable($newUsers);
    }

}


text:
package com.poiji.deserialize;

import com.poiji.bind.Poiji;
import com.poiji.bind.mapping.PoijiNumberFormat;
import com.poiji.deserialize.model.byname.DateExcelColumn;
import com.poiji.exception.PoijiExcelType;
import com.poiji.option.PoijiOptions;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Calendar;
import java.util.List;
import java.util.Locale;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.fail;

/**
 * Created by hakan on 2019-01-10
 */
@RunWith(Parameterized.class)
public class DeserializerCaseDateTest {

    private String path;
    private PoijiExcelType poijiExcelType;

    public DeserializerCaseDateTest(String path, PoijiExcelType type) {
        this.path = path;
        this.poijiExcelType = type;
    }

    @Parameterized.Parameters(name = "{index}: ({0})={1}")
    public static Iterable<Object[]> queries() {
        return Arrays.asList(new Object[][]{
                {"src/test/resources/dates-not-empty.xlsx", PoijiExcelType.XLSX},
                {"src/test/resources/dates-not-empty-copy.xlsx", PoijiExcelType.XLSX},
        });
    }

    @Test
    public void shouldMapExcelToJava() {
        try (InputStream stream = new FileInputStream(new File(path))) {
            PoijiNumberFormat numberFormat = new PoijiNumberFormat();
            numberFormat.putNumberFormat((short) 47, "mm/dd/yyyy hh.mm aa");
            numberFormat.putNumberFormat((short) 22, "mm/dd/yyyy hh.mm aa");

            PoijiOptions options = PoijiOptions.PoijiOptionsBuilder.settings()
                    .poijiNumberFormat(numberFormat)
                    .build();

            List<DateExcelColumn> rows = Poiji.fromExcel(stream, poijiExcelType, DateExcelColumn.class, options);

            DateExcelColumn row = rows.get(0);
            assertThat(row.getDate1(), is("12/31/2020 12.00 AM"));
            assertThat(row.getDate2(), is("11/09/2015 12.00 AM"));
            assertThat(row.getDate3(), is("11/09/2015 12.00 AM"));

            assertThat(numberFormat.getNumberFormatAt((short) 47), is("mm/dd/yyyy hh.mm aa"));
            assertThat(numberFormat.getNumberFormatAt((short) 22), is("mm/dd/yyyy hh.mm aa"));
        } catch (IOException e) {
            fail(e.getMessage());
        }
    }

    @Test
    public void shouldMapExcelToJavaWithNonDefaultLocale() {
        Locale userLocale = Locale.GERMANY;
        try (InputStream stream = new FileInputStream(new File(path))) {
            PoijiNumberFormat numberFormat = new PoijiNumberFormat();
            numberFormat.putNumberFormat((short) 47, "mm/dd/yyyy hh.mm aa");
            numberFormat.putNumberFormat((short) 22, "mm/dd/yyyy hh.mm aa");

            PoijiOptions options = PoijiOptions.PoijiOptionsBuilder.settings()
                    .poijiNumberFormat(numberFormat)
                    .setLocale(userLocale)
                    .build();

            List<DateExcelColumn> rows = Poiji.fromExcel(stream, poijiExcelType, DateExcelColumn.class, options);

            DateExcelColumn row = rows.get(0);

            SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy hh.mm aa", userLocale);
            Calendar calendar = Calendar.getInstance();
            calendar.set(2020, 11,31, 0, 00);
            String expectedValueCol1 = sdf.format(calendar.getTime());
            calendar.set(2015, 10,9, 0, 00);
            String expectedValueCol2And3 = sdf.format(calendar.getTime());

            assertThat(row.getDate1(), is(expectedValueCol1));
            assertThat(row.getDate2(), is(expectedValueCol2And3));
            assertThat(row.getDate3(), is(expectedValueCol2And3));

            assertThat(numberFormat.getNumberFormatAt((short) 47), is("mm/dd/yyyy hh.mm aa"));
            assertThat(numberFormat.getNumberFormatAt((short) 22), is("mm/dd/yyyy hh.mm aa"));
        } catch (IOException e) {
            fail(e.getMessage());
        }
    }
}


text:
package org.apache.activemq.artemis.tests.util.transactions;

import javax.transaction.HeuristicMixedException;
import javax.transaction.HeuristicRollbackException;
import javax.transaction.InvalidTransactionException;
import javax.transaction.NotSupportedException;
import javax.transaction.RollbackException;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;

import org.apache.activemq.artemis.service.extensions.transactions.TransactionManagerLocator;

public class DummyTransactionManagerLocator implements TransactionManagerLocator,TransactionManager
{
   @Override
   public void begin() throws NotSupportedException, SystemException
   {

   }

   @Override
   public void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException, RollbackException, SecurityException, SystemException
   {

   }

   @Override
   public int getStatus() throws SystemException
   {
      return 0;
   }

   @Override
   public Transaction getTransaction() throws SystemException
   {
      return null;
   }

   @Override
   public void resume(Transaction transaction) throws IllegalStateException, InvalidTransactionException, SystemException
   {

   }

   @Override
   public void rollback() throws IllegalStateException, SecurityException, SystemException
   {

   }

   @Override
   public void setRollbackOnly() throws IllegalStateException, SystemException
   {

   }

   @Override
   public void setTransactionTimeout(int i) throws SystemException
   {

   }

   @Override
   public Transaction suspend() throws SystemException
   {
      return null;
   }

   @Override
   public TransactionManager getTransactionManager()
   {
      return this;
   }
}


text:
#ifndef __XML_SCHEMA_H__
#define __XML_SCHEMA_H__

#include <libxml/xmlversion.h>

#ifdef LIBXML_SCHEMAS_ENABLED

#include <libxml/tree.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * This error codes are obsolete; not used any more.
 */
typedef enum {
    XML_SCHEMAS_ERR_OK        = 0,
    XML_SCHEMAS_ERR_NOROOT    = 1,
    XML_SCHEMAS_ERR_UNDECLAREDELEM,
    XML_SCHEMAS_ERR_NOTTOPLEVEL,
    XML_SCHEMAS_ERR_MISSING,
    XML_SCHEMAS_ERR_WRONGELEM,
    XML_SCHEMAS_ERR_NOTYPE,
    XML_SCHEMAS_ERR_NOROLLBACK,
    XML_SCHEMAS_ERR_ISABSTRACT,
    XML_SCHEMAS_ERR_NOTEMPTY,
    XML_SCHEMAS_ERR_ELEMCONT,
    XML_SCHEMAS_ERR_HAVEDEFAULT,
    XML_SCHEMAS_ERR_NOTNILLABLE,
    XML_SCHEMAS_ERR_EXTRACONTENT,
    XML_SCHEMAS_ERR_INVALIDATTR,
    XML_SCHEMAS_ERR_INVALIDELEM,
    XML_SCHEMAS_ERR_NOTDETERMINIST,
    XML_SCHEMAS_ERR_CONSTRUCT,
    XML_SCHEMAS_ERR_INTERNAL,
    XML_SCHEMAS_ERR_NOTSIMPLE,
    XML_SCHEMAS_ERR_ATTRUNKNOWN,
    XML_SCHEMAS_ERR_ATTRINVALID,
    XML_SCHEMAS_ERR_VALUE,
    XML_SCHEMAS_ERR_FACET,
    XML_SCHEMAS_ERR_,
    XML_SCHEMAS_ERR_XXX
} xmlSchemaValidError;

/*
* ATTENTION: Change xmlSchemaSetValidOptions's check
* for invalid values, if adding to the validation
* options below.
*/
/**
 * xmlSchemaValidOption:
 *
 * This is the set of XML Schema validation options.
 */
typedef enum {
    XML_SCHEMA_VAL_VC_I_CREATE            = 1<<0
    /* Default/fixed: create an attribute node
    * or an element's text node on the instance.
    */
} xmlSchemaValidOption;

/*
    XML_SCHEMA_VAL_XSI_ASSEMBLE            = 1<<1,
    * assemble schemata using
    * xsi:schemaLocation and
    * xsi:noNamespaceSchemaLocation
*/

/**
 * The schemas related types are kept internal
 */
typedef struct _xmlSchema xmlSchema;
typedef xmlSchema *xmlSchemaPtr;

/**
 * xmlSchemaValidityErrorFunc:
 * @ctx: the validation context
 * @msg: the message
 * @...: extra arguments
 *
 * Signature of an error callback from an XSD validation
 */
typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);

/**
 * xmlSchemaValidityWarningFunc:
 * @ctx: the validation context
 * @msg: the message
 * @...: extra arguments
 *
 * Signature of a warning callback from an XSD validation
 */
typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);

/**
 * A schemas validation context
 */
typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;

typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;

/*
 * Interfaces for parsing.
 */
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
        xmlSchemaNewParserCtxt    (const char *URL);
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
        xmlSchemaNewMemParserCtxt    (const char *buffer,
                     int size);
XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
        xmlSchemaNewDocParserCtxt    (xmlDocPtr doc);
XMLPUBFUN void XMLCALL
        xmlSchemaFreeParserCtxt    (xmlSchemaParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
        xmlSchemaSetParserErrors    (xmlSchemaParserCtxtPtr ctxt,
                     xmlSchemaValidityErrorFunc err,
                     xmlSchemaValidityWarningFunc warn,
                     void *ctx);
XMLPUBFUN void XMLCALL
        xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
                     xmlStructuredErrorFunc serror,
                     void *ctx);
XMLPUBFUN int XMLCALL
        xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
                    xmlSchemaValidityErrorFunc * err,
                    xmlSchemaValidityWarningFunc * warn,
                    void **ctx);
XMLPUBFUN int XMLCALL
        xmlSchemaIsValid    (xmlSchemaValidCtxtPtr ctxt);

XMLPUBFUN xmlSchemaPtr XMLCALL
        xmlSchemaParse        (xmlSchemaParserCtxtPtr ctxt);
XMLPUBFUN void XMLCALL
        xmlSchemaFree        (xmlSchemaPtr schema);
#ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void XMLCALL
        xmlSchemaDump        (FILE *output,
                     xmlSchemaPtr schema);
#endif /* LIBXML_OUTPUT_ENABLED */
/*
 * Interfaces for validating
 */
XMLPUBFUN void XMLCALL
        xmlSchemaSetValidErrors    (xmlSchemaValidCtxtPtr ctxt,
                     xmlSchemaValidityErrorFunc err,
                     xmlSchemaValidityWarningFunc warn,
                     void *ctx);
XMLPUBFUN void XMLCALL
        xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
                     xmlStructuredErrorFunc serror,
                     void *ctx);
XMLPUBFUN int XMLCALL
        xmlSchemaGetValidErrors    (xmlSchemaValidCtxtPtr ctxt,
                     xmlSchemaValidityErrorFunc *err,
                     xmlSchemaValidityWarningFunc *warn,
                     void **ctx);
XMLPUBFUN int XMLCALL
        xmlSchemaSetValidOptions    (xmlSchemaValidCtxtPtr ctxt,
                     int options);
XMLPUBFUN int XMLCALL
        xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);

XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
        xmlSchemaNewValidCtxt    (xmlSchemaPtr schema);
XMLPUBFUN void XMLCALL
        xmlSchemaFreeValidCtxt    (xmlSchemaValidCtxtPtr ctxt);
XMLPUBFUN int XMLCALL
        xmlSchemaValidateDoc    (xmlSchemaValidCtxtPtr ctxt,
                     xmlDocPtr instance);
XMLPUBFUN int XMLCALL
            xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
                             xmlNodePtr elem);
XMLPUBFUN int XMLCALL
        xmlSchemaValidateStream    (xmlSchemaValidCtxtPtr ctxt,
                     xmlParserInputBufferPtr input,
                     xmlCharEncoding enc,
                     xmlSAXHandlerPtr sax,
                     void *user_data);
XMLPUBFUN int XMLCALL
        xmlSchemaValidateFile    (xmlSchemaValidCtxtPtr ctxt,
                     const char * filename,
                     int options);

XMLPUBFUN xmlParserCtxtPtr XMLCALL
        xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);

/*
 * Interface to insert Schemas SAX validation in a SAX stream
 */
typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;

XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
            xmlSchemaSAXPlug        (xmlSchemaValidCtxtPtr ctxt,
                     xmlSAXHandlerPtr *sax,
                     void **user_data);
XMLPUBFUN int XMLCALL
            xmlSchemaSAXUnplug        (xmlSchemaSAXPlugPtr plug);
#ifdef __cplusplus
}
#endif

#endif /* LIBXML_SCHEMAS_ENABLED */
#endif /* __XML_SCHEMA_H__ */


text:
from grab.selector import XpathSelector

class Reference(object):
    def __init__(self, node, query=None, query_args=None):
        self._node = node
        self._query = query
        self._query_args = {} if query_args is None else query_args

    def __getattr__(self, key):
        return Reference(self._node, query=key)

    def _selector(self):
        return XpathSelector(self._node)

    def _text(self):
        return self._selector().select('.//%s' % self._query).text()

    def _node(self):
        return self._selector().node()

    #def __call__(self, **kwargs):
        #self.query_args.update(kwargs)
        #return self


text:
FakeNonDifferentiableConstantExecutor::FakeNonDifferentiableConstantExecutor(float value) {
    _value = Scalar(value);
}

DataObject FakeNonDifferentiableConstantExecutor::operator() (const ExecutionContext& context) const {
    return _value;
}

FakeNonDifferentiableConstant::FakeNonDifferentiableConstant(float value): Node({}) {
    std::shared_ptr<FakeNonDifferentiableConstantExecutor> executor(new FakeNonDifferentiableConstantExecutor(value));
    RegisterExecutor(executor);
}


text:
<?xml version="1.0" encoding="UTF-8"?>

		<item value="0" key="DIALOG_Y_ORIGIN"/>
		<item value="7" key="DIALOG_X_ORIGIN"/>

		<item value="org.eclipse.jdt.ui.wizards.JavaProjectWizard" key="NewWizardSelectionPage.STORE_SELECTED_ID"/>
		<list key="NewWizardSelectionPage.STORE_EXPANDED_CATEGORIES_ID">
		</list>

		<item value="org.eclipse.jdt.internal.ui.fatjarpackager.JarPackageWizard" key="ImportExportPage.STORE_SELECTED_EXPORT_WIZARD_ID"/>
		<list key="ImportExportPage.STORE_EXPANDED_EXPORT_CATEGORIES">
			<item value="org.eclipse.jdt.ui.Java"/>
		</list>


text:
#ifndef LIB_SYSTEM_H
#define LIB_SYSTEM_H	1

#include <stddef.h>
#include <stdint.h>

extern void *xmalloc (size_t) __attribute__ ((__malloc__));
extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__));
extern void *xrealloc (void *, size_t) __attribute__ ((__malloc__));

extern char *xstrdup (const char *) __attribute__ ((__malloc__));
extern char *xstrndup (const char *, size_t) __attribute__ ((__malloc__));

extern uint32_t crc32 (uint32_t crc, unsigned char *buf, size_t len);
extern int crc32_file (int fd, uint32_t *resp);

/* A special gettext function we use if the strings are too short.  */
#define sgettext(Str) \
  ({ const char *__res = strrchr (gettext (Str), '|');			      \
     __res ? __res + 1 : Str; })

#define gettext_noop(Str) Str

#define pwrite_retry(fd, buf,  len, off) \
  TEMP_FAILURE_RETRY (pwrite (fd, buf, len, off))
#define write_retry(fd, buf, n) \
     TEMP_FAILURE_RETRY (write (fd, buf, n))
#define pread_retry(fd, buf,  len, off) \
  TEMP_FAILURE_RETRY (pread (fd, buf, len, off))

#endif /* system.h */


text:
<!DOCTYPE html>

	<meta http-equiv="content-type" content="text/html; charset=utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="generator" content="Hugo 0.89.4" />

	<title>Follow the trail…….Join the Concurrency Revolution !!! · A Developer's Experience</title>

	<meta name="description" content="" />

<meta itemprop="name" content="Follow the trail…….Join the Concurrency Revolution !!!">
<meta itemprop="description" content="I could not stop writing this post after I read this article by Herb Sutter."><meta itemprop="datePublished" content="2006-12-20T17:50:00+00:00" />
<meta itemprop="dateModified" content="2006-12-20T17:50:00+00:00" />
<meta itemprop="wordCount" content="110">
<meta itemprop="keywords" content="" />

<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="Follow the trail…….Join the Concurrency Revolution !!!"/>
<meta name="twitter:description" content="I could not stop writing this post after I read this article by Herb Sutter."/>

<meta property="og:title" content="Follow the trail…….Join the Concurrency Revolution !!!" />
<meta property="og:description" content="I could not stop writing this post after I read this article by Herb Sutter." />
<meta property="og:type" content="article" />
<meta property="og:url" content="/2006/12/20/follow-the-trail-join-the-concurrency-revolution/" /><meta property="article:section" content="post" />
<meta property="article:published_time" content="2006-12-20T17:50:00+00:00" />
<meta property="article:modified_time" content="2006-12-20T17:50:00+00:00" />

	<link type="text/css" rel="stylesheet" href="/css/print.css" media="print">

	<link type="text/css" rel="stylesheet" href="/css/poole.css">

	<link type="text/css" rel="stylesheet" href="/css/hyde.css">

	<link type="text/css" rel="stylesheet" href="/css/blockquote.css"><link type="text/css" rel="stylesheet" href="/css/custom.css">

	<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700&display=swap">

	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css"
		integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />

	<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">

	<link rel="shortcut icon" href="/images/favicon.png">

A Developer's Experience

The romantic image of an über-programmer is someone who fires up Emacs, types like a machine gun, and delivers a flawless final product from scratch. A more accurate image would be someone who stares quietly into space for a few minutes and then says Hmm. I think I've seen something like this before – John D. Cook

          Posts

          Pages

          About

          Qs

	<button class="blog-search-btn"></button>
	<input type="text" class="blog-search-input" placeholder="Type to Search...">

	<form style='display: none;' action='/search/' method="get">
		<input name="q" type="text">
	</form>

Follow the trail…….Join the Concurrency Revolution !!!

    <time datetime="2006-12-20T17:50:00Z">Dec 20, 2006</time> · 1 min read

I could not stop writing this post after I read this article by Herb Sutter. The article is just a casual technical discussion but very encouraging that a person requires at the right time – the time when he is a student. Even after several years after my college, I have been trying to keep myself a student and I got a right encouragement to join the Concurrency revolution. Thanks to Herb Sutter.

As Albert Einstein, Robert Goddard, and Wernher von Braun walked the trail of Galileo and Newton , I will to walk the trail of some of the contemporary people like Sutter, Stroustoup, Don Box, Richter and others.

    ©  2021

    · CC BY-SA 4.0

	<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Nanum+Gothic+Coding:wght@400;700&display=swap" />
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/styles/default.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.3.1/styles/base16/ocean.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />


text:
var children = [];
for (var i=el.children.length; i--;){
  // Skip comment nodes on IE8
  if (el.children[i].nodeType != 8)
    children.unshift(el.children[i]);
}


text:
<?xml version="1.0"?>
<!--
  ~ Copyright 2015 OpenCB
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.opencb.biodata</groupId>
        <artifactId>biodata</artifactId>
        <version>0.5.0b</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>org.opencb.biodata</groupId>
    <artifactId>biodata-models</artifactId>
    <version>${biodata.version}</version>

    <name>models</name>
    <url>http://maven.apache.org</url>

    <dependencies>
        <dependency>
            <groupId>org.opencb.commons</groupId>
            <artifactId>commons-lib</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro</artifactId>
            <version>1.7.7</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
    </dependencies>

</project>


text:
package com.rgi.common.coordinate;

/**
 * Coordinate within a specific coordinate reference system
 *
 * @author Luke Lambert
 *
 */
public class CrsCoordinate extends Coordinate<Double>
{
    /**
     * Constructor
     *
     * @param x
     *             Horizontal portion of the coordinate
     * @param y
     *             Vertical portion of the coordinate
     * @param authority
     *             The name of the defining authority of the coordinate
     *             reference system (e.g. "EPSG"). This value is converted to
     *             upper case.
     * @param identifier
     *             The identifier as assigned by the the authority of the
     *             coordinate reference system
     */
    public CrsCoordinate(final double x, final double y, final String authority, final int identifier)
    {
        this(x, y, new CoordinateReferenceSystem(authority, identifier));
    }

    /**
     * Constructor
     *
     * @param x
     *             Horizontal portion of the coordinate
     * @param y
     *             Vertical portion of the coordinate
     * @param coordinateReferenceSystem
     *             A coordinate reference system object
     */
    public CrsCoordinate(final double x, final double y, final CoordinateReferenceSystem coordinateReferenceSystem)
    {
        this(new Coordinate<>(x, y), coordinateReferenceSystem);
    }

    /**
     * Constructor
     *
     * @param coordinate
     *             A coordinate in the units of the coordinate reference system
     * @param coordinateReferenceSystem
     *             A coordinate reference system object
     */
    public CrsCoordinate(final Coordinate<Double> coordinate, final CoordinateReferenceSystem coordinateReferenceSystem)
    {
        super(coordinate);

        if(coordinateReferenceSystem == null)
        {
            throw new IllegalArgumentException("Coordinate Reference System may not be null");
        }

        this.coordinateReferenceSystem = coordinateReferenceSystem;
    }

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

        final CrsCoordinate other = (CrsCoordinate)object;

        return super.equals(other) && this.coordinateReferenceSystem.equals(other.coordinateReferenceSystem);
    }

    @Override
    public int hashCode()
    {
        return super.hashCode() ^ this.coordinateReferenceSystem.hashCode();
    }

    /**
     * @return Returns the coordinate reference system
     */
    public CoordinateReferenceSystem getCoordinateReferenceSystem()
    {
        return this.coordinateReferenceSystem;
    }

    private final CoordinateReferenceSystem coordinateReferenceSystem;
}


text:
module Spree
  class Image < Asset
    validate :no_attachment_errors

    has_attached_file :attachment,
                      styles: { mini: '48x48>', small: '100x100>', product: '240x240>', large: '600x600>' },
                      default_style: :product,
                      url: '/spree/products/:id/:style/:basename.:extension',
                      path: ':rails_root/public/spree/products/:id/:style/:basename.:extension',
                      convert_options: { all: '-strip -auto-orient -colorspace sRGB' }
    validates_attachment :attachment,
      :presence => true,
      :content_type => { :content_type => %w(image/jpeg image/jpg image/png image/gif) }

    # save the w,h of the original image (from which others can be calculated)
    # we need to look at the write-queue for images which have not been saved yet
    after_post_process :find_dimensions

    #used by admin products autocomplete
    def mini_url
      attachment.url(:mini, false)
    end

    def find_dimensions
      temporary = attachment.queued_for_write[:original]
      filename = temporary.path unless temporary.nil?
      filename = attachment.path if filename.blank?
      geometry = Paperclip::Geometry.from_file(filename)
      self.attachment_width  = geometry.width
      self.attachment_height = geometry.height
    end

    # if there are errors from the plugin, then add a more meaningful message
    def no_attachment_errors
      unless attachment.errors.empty?
        # uncomment this to get rid of the less-than-useful interrim messages
        # errors.clear
        errors.add :attachment, "Paperclip returned errors for file '#{attachment_file_name}' - check ImageMagick installation or image source file."
        false
      end
    end
  end
end


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.network.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.SubResource;
import com.azure.resourcemanager.network.models.GatewayCustomBgpIpAddressIpConfiguration;
import com.azure.resourcemanager.network.models.IpsecPolicy;
import com.azure.resourcemanager.network.models.ProvisioningState;
import com.azure.resourcemanager.network.models.VirtualNetworkGatewayConnectionProtocol;
import com.azure.resourcemanager.network.models.VpnConnectionStatus;
import com.azure.resourcemanager.network.models.VpnLinkConnectionMode;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** VpnSiteLinkConnection Resource. */
@Fluent
public final class VpnSiteLinkConnectionInner extends SubResource {
    /*
     * Properties of the VPN site link connection.
     */
    @JsonProperty(value = "properties")
    private VpnSiteLinkConnectionProperties innerProperties;

    /*
     * The name of the resource that is unique within a resource group. This name can be used to access the resource.
     */
    @JsonProperty(value = "name")
    private String name;

    /*
     * A unique read-only string that changes whenever the resource is updated.
     */
    @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY)
    private String etag;

    /*
     * Resource type.
     */
    @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
    private String type;

    /** Creates an instance of VpnSiteLinkConnectionInner class. */
    public VpnSiteLinkConnectionInner() {
    }

    /**
     * Get the innerProperties property: Properties of the VPN site link connection.
     *
     * @return the innerProperties value.
     */
    private VpnSiteLinkConnectionProperties innerProperties() {
        return this.innerProperties;
    }

    /**
     * Get the name property: The name of the resource that is unique within a resource group. This name can be used to
     * access the resource.
     *
     * @return the name value.
     */
    public String name() {
        return this.name;
    }

    /**
     * Set the name property: The name of the resource that is unique within a resource group. This name can be used to
     * access the resource.
     *
     * @param name the name value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withName(String name) {
        this.name = name;
        return this;
    }

    /**
     * Get the etag property: A unique read-only string that changes whenever the resource is updated.
     *
     * @return the etag value.
     */
    public String etag() {
        return this.etag;
    }

    /**
     * Get the type property: Resource type.
     *
     * @return the type value.
     */
    public String type() {
        return this.type;
    }

    /** {@inheritDoc} */
    @Override
    public VpnSiteLinkConnectionInner withId(String id) {
        super.withId(id);
        return this;
    }

    /**
     * Get the vpnSiteLink property: Id of the connected vpn site link.
     *
     * @return the vpnSiteLink value.
     */
    public SubResource vpnSiteLink() {
        return this.innerProperties() == null ? null : this.innerProperties().vpnSiteLink();
    }

    /**
     * Set the vpnSiteLink property: Id of the connected vpn site link.
     *
     * @param vpnSiteLink the vpnSiteLink value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withVpnSiteLink(SubResource vpnSiteLink) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withVpnSiteLink(vpnSiteLink);
        return this;
    }

    /**
     * Get the routingWeight property: Routing weight for vpn connection.
     *
     * @return the routingWeight value.
     */
    public Integer routingWeight() {
        return this.innerProperties() == null ? null : this.innerProperties().routingWeight();
    }

    /**
     * Set the routingWeight property: Routing weight for vpn connection.
     *
     * @param routingWeight the routingWeight value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withRoutingWeight(Integer routingWeight) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withRoutingWeight(routingWeight);
        return this;
    }

    /**
     * Get the vpnLinkConnectionMode property: Vpn link connection mode.
     *
     * @return the vpnLinkConnectionMode value.
     */
    public VpnLinkConnectionMode vpnLinkConnectionMode() {
        return this.innerProperties() == null ? null : this.innerProperties().vpnLinkConnectionMode();
    }

    /**
     * Set the vpnLinkConnectionMode property: Vpn link connection mode.
     *
     * @param vpnLinkConnectionMode the vpnLinkConnectionMode value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withVpnLinkConnectionMode(VpnLinkConnectionMode vpnLinkConnectionMode) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withVpnLinkConnectionMode(vpnLinkConnectionMode);
        return this;
    }

    /**
     * Get the connectionStatus property: The connection status.
     *
     * @return the connectionStatus value.
     */
    public VpnConnectionStatus connectionStatus() {
        return this.innerProperties() == null ? null : this.innerProperties().connectionStatus();
    }

    /**
     * Get the vpnConnectionProtocolType property: Connection protocol used for this connection.
     *
     * @return the vpnConnectionProtocolType value.
     */
    public VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType() {
        return this.innerProperties() == null ? null : this.innerProperties().vpnConnectionProtocolType();
    }

    /**
     * Set the vpnConnectionProtocolType property: Connection protocol used for this connection.
     *
     * @param vpnConnectionProtocolType the vpnConnectionProtocolType value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withVpnConnectionProtocolType(
        VirtualNetworkGatewayConnectionProtocol vpnConnectionProtocolType) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withVpnConnectionProtocolType(vpnConnectionProtocolType);
        return this;
    }

    /**
     * Get the ingressBytesTransferred property: Ingress bytes transferred.
     *
     * @return the ingressBytesTransferred value.
     */
    public Long ingressBytesTransferred() {
        return this.innerProperties() == null ? null : this.innerProperties().ingressBytesTransferred();
    }

    /**
     * Get the egressBytesTransferred property: Egress bytes transferred.
     *
     * @return the egressBytesTransferred value.
     */
    public Long egressBytesTransferred() {
        return this.innerProperties() == null ? null : this.innerProperties().egressBytesTransferred();
    }

    /**
     * Get the connectionBandwidth property: Expected bandwidth in MBPS.
     *
     * @return the connectionBandwidth value.
     */
    public Integer connectionBandwidth() {
        return this.innerProperties() == null ? null : this.innerProperties().connectionBandwidth();
    }

    /**
     * Set the connectionBandwidth property: Expected bandwidth in MBPS.
     *
     * @param connectionBandwidth the connectionBandwidth value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withConnectionBandwidth(Integer connectionBandwidth) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withConnectionBandwidth(connectionBandwidth);
        return this;
    }

    /**
     * Get the sharedKey property: SharedKey for the vpn connection.
     *
     * @return the sharedKey value.
     */
    public String sharedKey() {
        return this.innerProperties() == null ? null : this.innerProperties().sharedKey();
    }

    /**
     * Set the sharedKey property: SharedKey for the vpn connection.
     *
     * @param sharedKey the sharedKey value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withSharedKey(String sharedKey) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withSharedKey(sharedKey);
        return this;
    }

    /**
     * Get the enableBgp property: EnableBgp flag.
     *
     * @return the enableBgp value.
     */
    public Boolean enableBgp() {
        return this.innerProperties() == null ? null : this.innerProperties().enableBgp();
    }

    /**
     * Set the enableBgp property: EnableBgp flag.
     *
     * @param enableBgp the enableBgp value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withEnableBgp(Boolean enableBgp) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withEnableBgp(enableBgp);
        return this;
    }

    /**
     * Get the vpnGatewayCustomBgpAddresses property: vpnGatewayCustomBgpAddresses used by this connection.
     *
     * @return the vpnGatewayCustomBgpAddresses value.
     */
    public List<GatewayCustomBgpIpAddressIpConfiguration> vpnGatewayCustomBgpAddresses() {
        return this.innerProperties() == null ? null : this.innerProperties().vpnGatewayCustomBgpAddresses();
    }

    /**
     * Set the vpnGatewayCustomBgpAddresses property: vpnGatewayCustomBgpAddresses used by this connection.
     *
     * @param vpnGatewayCustomBgpAddresses the vpnGatewayCustomBgpAddresses value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withVpnGatewayCustomBgpAddresses(
        List<GatewayCustomBgpIpAddressIpConfiguration> vpnGatewayCustomBgpAddresses) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withVpnGatewayCustomBgpAddresses(vpnGatewayCustomBgpAddresses);
        return this;
    }

    /**
     * Get the usePolicyBasedTrafficSelectors property: Enable policy-based traffic selectors.
     *
     * @return the usePolicyBasedTrafficSelectors value.
     */
    public Boolean usePolicyBasedTrafficSelectors() {
        return this.innerProperties() == null ? null : this.innerProperties().usePolicyBasedTrafficSelectors();
    }

    /**
     * Set the usePolicyBasedTrafficSelectors property: Enable policy-based traffic selectors.
     *
     * @param usePolicyBasedTrafficSelectors the usePolicyBasedTrafficSelectors value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withUsePolicyBasedTrafficSelectors(Boolean usePolicyBasedTrafficSelectors) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withUsePolicyBasedTrafficSelectors(usePolicyBasedTrafficSelectors);
        return this;
    }

    /**
     * Get the ipsecPolicies property: The IPSec Policies to be considered by this connection.
     *
     * @return the ipsecPolicies value.
     */
    public List<IpsecPolicy> ipsecPolicies() {
        return this.innerProperties() == null ? null : this.innerProperties().ipsecPolicies();
    }

    /**
     * Set the ipsecPolicies property: The IPSec Policies to be considered by this connection.
     *
     * @param ipsecPolicies the ipsecPolicies value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withIpsecPolicies(List<IpsecPolicy> ipsecPolicies) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withIpsecPolicies(ipsecPolicies);
        return this;
    }

    /**
     * Get the enableRateLimiting property: EnableBgp flag.
     *
     * @return the enableRateLimiting value.
     */
    public Boolean enableRateLimiting() {
        return this.innerProperties() == null ? null : this.innerProperties().enableRateLimiting();
    }

    /**
     * Set the enableRateLimiting property: EnableBgp flag.
     *
     * @param enableRateLimiting the enableRateLimiting value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withEnableRateLimiting(Boolean enableRateLimiting) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withEnableRateLimiting(enableRateLimiting);
        return this;
    }

    /**
     * Get the useLocalAzureIpAddress property: Use local azure ip to initiate connection.
     *
     * @return the useLocalAzureIpAddress value.
     */
    public Boolean useLocalAzureIpAddress() {
        return this.innerProperties() == null ? null : this.innerProperties().useLocalAzureIpAddress();
    }

    /**
     * Set the useLocalAzureIpAddress property: Use local azure ip to initiate connection.
     *
     * @param useLocalAzureIpAddress the useLocalAzureIpAddress value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withUseLocalAzureIpAddress(Boolean useLocalAzureIpAddress) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withUseLocalAzureIpAddress(useLocalAzureIpAddress);
        return this;
    }

    /**
     * Get the provisioningState property: The provisioning state of the VPN site link connection resource.
     *
     * @return the provisioningState value.
     */
    public ProvisioningState provisioningState() {
        return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
    }

    /**
     * Get the ingressNatRules property: List of ingress NatRules.
     *
     * @return the ingressNatRules value.
     */
    public List<SubResource> ingressNatRules() {
        return this.innerProperties() == null ? null : this.innerProperties().ingressNatRules();
    }

    /**
     * Set the ingressNatRules property: List of ingress NatRules.
     *
     * @param ingressNatRules the ingressNatRules value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withIngressNatRules(List<SubResource> ingressNatRules) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withIngressNatRules(ingressNatRules);
        return this;
    }

    /**
     * Get the egressNatRules property: List of egress NatRules.
     *
     * @return the egressNatRules value.
     */
    public List<SubResource> egressNatRules() {
        return this.innerProperties() == null ? null : this.innerProperties().egressNatRules();
    }

    /**
     * Set the egressNatRules property: List of egress NatRules.
     *
     * @param egressNatRules the egressNatRules value to set.
     * @return the VpnSiteLinkConnectionInner object itself.
     */
    public VpnSiteLinkConnectionInner withEgressNatRules(List<SubResource> egressNatRules) {
        if (this.innerProperties() == null) {
            this.innerProperties = new VpnSiteLinkConnectionProperties();
        }
        this.innerProperties().withEgressNatRules(egressNatRules);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (innerProperties() != null) {
            innerProperties().validate();
        }
    }
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="description" content="Metro, a sleek, intuitive, and powerful framework for faster and easier web development for Windows Metro Style.">
    <meta name="keywords" content="HTML, CSS, JS, JavaScript, framework, metro, front-end, frontend, web development">
    <meta name="author" content="Sergey Pimenov and Metro UI CSS contributors">

    <link rel='shortcut icon' type='image/x-icon' href='favicon.ico' />
    <title>Streamer :: Metro UI CSS - The front-end framework for developing projects on the web in Windows Metro Style</title>

    <link href="css/metro.css" rel="stylesheet">
    <link href="css/metro-icons.css" rel="stylesheet">
    <link href="css/metro-responsive.css" rel="stylesheet">
    <link href="css/metro-schemes.css" rel="stylesheet">

    <link href="css/docs.css" rel="stylesheet">

 Streamer

        @@adsense

                            <button class="toolbar-button js-show-all-streams" title="Show all streams"></button>
                            <button class="toolbar-button js-schedule-mode" title="On|Off schedule mode"></button>
                            <button class="toolbar-button js-go-previous-time" title="Go to previous time interval"></button>
                            <button class="toolbar-button js-go-next-time" title="Go to next time interval"></button>

INTERNET
BUSINESS

room 1

ADVERTISING
ANALYST
SEO

room 2

STARTUPS
E-COMMERCE

room 3

MOBILE
GAMES
USABILITY

room 4

INTERNET
TECHNOLOGY

room 5

MASTERS

room 6

9:00 - 9:40

Registration

9:40 - 10:20

Keynote speech

Aleksandr Olshanskiy

Imena.UA, MiroHost

10:20

Katerina Kostereva

Terrasoft

Create and develop a business without external investment

10:30

Vlad Voskresensky

InvisibleCRM

Team Building in your startup: what to do and what not

10:40

Round table

Trends in mobile platforms

10:40

Round table

Trends in mobile platforms

10:20

Sergey Pimenov

Metro UI CSS

Create a site with interface similar to Windows 8

10:20

Sergey Pimenov

Metro UI CSS

Create a site with interface similar to Windows 8

10:30

Round table

Metro UI CSS

Discussion

10:40

Round table

Trends in mobile platforms

18:20

Final ceremony

    @@hit


text:
namespace caf::net {

#ifdef CAF_WINDOWS

expected<std::pair<pipe_socket, pipe_socket>> make_pipe() {
  // Windows has no support for unidirectional pipes. Emulate pipes by using a
  // pair of regular TCP sockets with read/write channels closed appropriately.
  if (auto result = make_stream_socket_pair()) {
    shutdown_write(result->first);
    shutdown_read(result->second);
    return std::make_pair(socket_cast<pipe_socket>(result->first),
                          socket_cast<pipe_socket>(result->second));
  } else {
    return std::move(result.error());
  }
}

ptrdiff_t write(pipe_socket x, const_byte_span buf) {
  // On Windows, a pipe consists of two stream sockets.
  return write(socket_cast<stream_socket>(x), buf);
}

ptrdiff_t read(pipe_socket x, byte_span buf) {
  // On Windows, a pipe consists of two stream sockets.
  return read(socket_cast<stream_socket>(x), buf);
}

#else // CAF_WINDOWS

expected<std::pair<pipe_socket, pipe_socket>> make_pipe() {
  socket_id pipefds[2];
  if (pipe(pipefds) != 0)
    return make_error(sec::network_syscall_failed, "pipe",
                      last_socket_error_as_string());
  auto guard = detail::make_scope_guard([&] {
    close(socket{pipefds[0]});
    close(socket{pipefds[1]});
  });
  // Note: for pipe2 it is better to avoid races by setting CLOEXEC (but not on
  // POSIX).
  if (auto err = child_process_inherit(socket{pipefds[0]}, false))
    return err;
  if (auto err = child_process_inherit(socket{pipefds[1]}, false))
    return err;
  guard.disable();
  return std::make_pair(pipe_socket{pipefds[0]}, pipe_socket{pipefds[1]});
}

ptrdiff_t write(pipe_socket x, const_byte_span buf) {
  CAF_LOG_TRACE(CAF_ARG2("socket", x.id) << CAF_ARG2("bytes", buf.size()));
  return ::write(x.id, reinterpret_cast<socket_send_ptr>(buf.data()),
                 buf.size());
}

ptrdiff_t read(pipe_socket x, byte_span buf) {
  CAF_LOG_TRACE(CAF_ARG2("socket", x.id) << CAF_ARG2("bytes", buf.size()));
  return ::read(x.id, reinterpret_cast<socket_recv_ptr>(buf.data()),
                buf.size());
}

#endif // CAF_WINDOWS

} // namespace caf::net


text:
import { connect } from "react-redux";
import FollowButton from "../../show/components/follow_button";
import { followUser, unfollowUser, subscribe } from "../actions";
import { fetchSubscriptions } from "../../show/ducks/subscriptions";

function mapStateToProps( state ) {
  return {
    config: state.config,
    observation: state.currentObservation.observation,
    subscriptions: state.subscriptions.subscriptions,
    subscriptionsLoaded: state.subscriptions.loaded
  };
}

function mapDispatchToProps( dispatch ) {
  return {
    followUser: ( ) => dispatch( followUser( ) ),
    unfollowUser: ( ) => dispatch( unfollowUser( ) ),
    subscribe: ( ) => dispatch( subscribe( ) ),
    fetchSubscriptions: options => dispatch( fetchSubscriptions( options ) )
  };
}

const FollowButtonContainer = connect(
  mapStateToProps,
  mapDispatchToProps
)( FollowButton );

export default FollowButtonContainer;


text:
const initializeNewMember = () => {
   return {
     type: 'MEMBER_INITIALIZE_NEW'
   }
}

export default initializeNewMember;


text:
var GetTilesWithin = require('./GetTilesWithin');

/**
 * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching
 * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does
 * not change collision information.
 *
 * @function Phaser.Tilemaps.Components.ReplaceByIndex
 * @private
 * @since 3.0.0
 *
 * @param {integer} findIndex - [description]
 * @param {integer} newIndex - [description]
 * @param {integer} [tileX=0] - [description]
 * @param {integer} [tileY=0] - [description]
 * @param {integer} [width=max width based on tileX] - [description]
 * @param {integer} [height=max height based on tileY] - [description]
 * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.
 */
var ReplaceByIndex = function (findIndex, newIndex, tileX, tileY, width, height, layer)
{
    var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);
    for (var i = 0; i < tiles.length; i++)
    {
        if (tiles[i] && tiles[i].index === findIndex)
        {
            tiles[i].index = newIndex;
        }
    }
};

module.exports = ReplaceByIndex;


text:
<!DOCTYPE html>

  <meta charset="utf-8">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>wolk.interfaces.ConnectivityService — WolkConnect-Python 3.2.0 documentation</title>

  <link rel="stylesheet" href="../../../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" />
    <link rel="index" title="Index" href="../../../genindex.html" />
    <link rel="search" title="Search" href="../../../search.html" />

             WolkConnect-Python

  <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>

Table of Content

Functional documentaition

Examples

Wolk Package

          WolkConnect-Python

Docs »

Module code »

wolk.interfaces.ConnectivityService

Source code for wolk.interfaces.ConnectivityService

#   Copyright 2018 WolkAbout Technology s.r.o.
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

from abc import ABC, abstractmethod

"""
ConnectivityService Module.
"""

[docs]class ConnectivityService(ABC):
    """Enable communication with WolkAbout IoT Platform."""

[docs]    @abstractmethod
    def connect(self):
        """Connect to WolkAbout IoT Platform."""
        pass

[docs]    @abstractmethod
    def disconnect(self):
        """Disconnect from WolkAbout IoT Platform."""
        pass

[docs]    @abstractmethod
    def publish(self, outbound_message):
        """
        Publish a message to WolkAbout IoT Platform.

        Returns true on success, false otherwise.

        :param outbound_message: Message to send
        :type outbound_message: wolk.models.OutboundMessage.OutboundMessage
        :returns: success
        :rtype: bool
        """
        pass

[docs]    @abstractmethod
    def set_inbound_message_listener(self, listener):
        """
        Set a callback to ``WolkConnect._on_inbound_message`` method.

        callback function passes back an ``wolk.models.InboundMessage.InboundMessage`` object.

        :param listener: WolkConnect instance
        :type listener: wolk.WolkConnect.WolkConnect
        """
        pass

        © Copyright 2019, WolkAbout

  Built with Sphinx using a theme provided by Read the Docs.


text:
package org.wisdom.orientdb.object;

import com.orientechnologies.orient.object.db.OObjectDatabaseTx;
import org.wisdom.orientdb.conf.WOrientConf;

import java.util.List;

/**
 * The OrientDbRepoCommand service will be used as incentive to provides a new {@link OrientDbRepository} and {@link org.wisdom.orientdb.object.OrientDbCrud} services
 * corresponding to its configuration {@link #getConf()}.
 *
 * If the OrientDbRepoCommand configuration is valid, a {@link org.wisdom.orientdb.object.OrientDbCrud} service will be published for each entity present in the
 * {@link #getEntityClass()} list.
 *
 * In addition to
 */
public interface OrientDbRepoCommand {

    /**
     * @return The {@link OrientDbRepository} configuration that we want to create.
     */
    WOrientConf getConf();

    /**
     * @return The entities class that we want to publish as {@link org.wisdom.orientdb.object.OrientDbCrud}
     */
    List<Class<?>> getEntityClass();

    /**
     * A hook that will be call before the creation of the OrientDbRepository and the OrientDbCrud services.
     * @param db The database instance that contains the entities.
     */
    void init(OObjectDatabaseTx db);

    /**
     * A hook that will be call after the destruction/de-registration of the OrientDbCrud services
     * and their OrientDbRepository.
     * @param db The database instance that contains the entities.
     */
    void destroy(OObjectDatabaseTx db);
}