text:
r"""
This code was generated by
\ / _    _  _|   _  _
 | (_)\/(_)(_|\/| |(/_  v1.0.0
      /       /
"""

from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import ListResource
from twilio.base.page import Page
from twilio.rest.preview.acc_security.service.verification import VerificationList
from twilio.rest.preview.acc_security.service.verification_check import VerificationCheckList

class ServiceList(ListResource):
    """ PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. """

    def __init__(self, version):
        """
        Initialize the ServiceList

        :param Version version: Version that contains the resource

        :returns: twilio.rest.preview.acc_security.service.ServiceList
        :rtype: twilio.rest.preview.acc_security.service.ServiceList
        """
        super(ServiceList, self).__init__(version)

        # Path Solution
        self._solution = {}
        self._uri = '/Services'.format(**self._solution)

    def create(self, name, code_length=values.unset):
        """
        Create a new ServiceInstance

        :param unicode name: Friendly name of the service
        :param unicode code_length: Length of verification code. Valid values are 4-10

        :returns: Newly created ServiceInstance
        :rtype: twilio.rest.preview.acc_security.service.ServiceInstance
        """
        data = values.of({'Name': name, 'CodeLength': code_length, })

        payload = self._version.create(
            'POST',
            self._uri,
            data=data,
        )

        return ServiceInstance(self._version, payload, )

    def stream(self, limit=None, page_size=None):
        """
        Streams ServiceInstance records from the API as a generator stream.
        This operation lazily loads records as efficiently as possible until the limit
        is reached.
        The results are returned as a generator, so this operation is memory efficient.

        :param int limit: Upper limit for the number of records to return. stream()
                          guarantees to never return more than limit.  Default is no limit
        :param int page_size: Number of records to fetch per request, when not set will use
                              the default value of 50 records.  If no page_size is defined
                              but a limit is defined, stream() will attempt to read the
                              limit with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        :rtype: list[twilio.rest.preview.acc_security.service.ServiceInstance]
        """
        limits = self._version.read_limits(limit, page_size)

        page = self.page(page_size=limits['page_size'], )

        return self._version.stream(page, limits['limit'], limits['page_limit'])

    def list(self, limit=None, page_size=None):
        """
        Lists ServiceInstance records from the API as a list.
        Unlike stream(), this operation is eager and will load `limit` records into
        memory before returning.

        :param int limit: Upper limit for the number of records to return. list() guarantees
                          never to return more than limit.  Default is no limit
        :param int page_size: Number of records to fetch per request, when not set will use
                              the default value of 50 records.  If no page_size is defined
                              but a limit is defined, list() will attempt to read the limit
                              with the most efficient page size, i.e. min(limit, 1000)

        :returns: Generator that will yield up to limit results
        :rtype: list[twilio.rest.preview.acc_security.service.ServiceInstance]
        """
        return list(self.stream(limit=limit, page_size=page_size, ))

    def page(self, page_token=values.unset, page_number=values.unset,
             page_size=values.unset):
        """
        Retrieve a single page of ServiceInstance records from the API.
        Request is executed immediately

        :param str page_token: PageToken provided by the API
        :param int page_number: Page Number, this value is simply for client state
        :param int page_size: Number of records to return, defaults to 50

        :returns: Page of ServiceInstance
        :rtype: twilio.rest.preview.acc_security.service.ServicePage
        """
        params = values.of({'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, })

        response = self._version.page(
            'GET',
            self._uri,
            params=params,
        )

        return ServicePage(self._version, response, self._solution)

    def get_page(self, target_url):
        """
        Retrieve a specific page of ServiceInstance records from the API.
        Request is executed immediately

        :param str target_url: API-generated URL for the requested results page

        :returns: Page of ServiceInstance
        :rtype: twilio.rest.preview.acc_security.service.ServicePage
        """
        response = self._version.domain.twilio.request(
            'GET',
            target_url,
        )

        return ServicePage(self._version, response, self._solution)

    def get(self, sid):
        """
        Constructs a ServiceContext

        :param sid: Verification Service Instance SID.

        :returns: twilio.rest.preview.acc_security.service.ServiceContext
        :rtype: twilio.rest.preview.acc_security.service.ServiceContext
        """
        return ServiceContext(self._version, sid=sid, )

    def __call__(self, sid):
        """
        Constructs a ServiceContext

        :param sid: Verification Service Instance SID.

        :returns: twilio.rest.preview.acc_security.service.ServiceContext
        :rtype: twilio.rest.preview.acc_security.service.ServiceContext
        """
        return ServiceContext(self._version, sid=sid, )

    def __repr__(self):
        """
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        """
        return '<Twilio.Preview.AccSecurity.ServiceList>'

class ServicePage(Page):
    """ PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. """

    def __init__(self, version, response, solution):
        """
        Initialize the ServicePage

        :param Version version: Version that contains the resource
        :param Response response: Response from the API

        :returns: twilio.rest.preview.acc_security.service.ServicePage
        :rtype: twilio.rest.preview.acc_security.service.ServicePage
        """
        super(ServicePage, self).__init__(version, response)

        # Path Solution
        self._solution = solution

    def get_instance(self, payload):
        """
        Build an instance of ServiceInstance

        :param dict payload: Payload response from the API

        :returns: twilio.rest.preview.acc_security.service.ServiceInstance
        :rtype: twilio.rest.preview.acc_security.service.ServiceInstance
        """
        return ServiceInstance(self._version, payload, )

    def __repr__(self):
        """
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        """
        return '<Twilio.Preview.AccSecurity.ServicePage>'

class ServiceContext(InstanceContext):
    """ PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. """

    def __init__(self, version, sid):
        """
        Initialize the ServiceContext

        :param Version version: Version that contains the resource
        :param sid: Verification Service Instance SID.

        :returns: twilio.rest.preview.acc_security.service.ServiceContext
        :rtype: twilio.rest.preview.acc_security.service.ServiceContext
        """
        super(ServiceContext, self).__init__(version)

        # Path Solution
        self._solution = {'sid': sid, }
        self._uri = '/Services/{sid}'.format(**self._solution)

        # Dependents
        self._verifications = None
        self._verification_checks = None

    def fetch(self):
        """
        Fetch a ServiceInstance

        :returns: Fetched ServiceInstance
        :rtype: twilio.rest.preview.acc_security.service.ServiceInstance
        """
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return ServiceInstance(self._version, payload, sid=self._solution['sid'], )

    def update(self, name=values.unset, code_length=values.unset):
        """
        Update the ServiceInstance

        :param unicode name: Friendly name of the service
        :param unicode code_length: Length of verification code. Valid values are 4-10

        :returns: Updated ServiceInstance
        :rtype: twilio.rest.preview.acc_security.service.ServiceInstance
        """
        data = values.of({'Name': name, 'CodeLength': code_length, })

        payload = self._version.update(
            'POST',
            self._uri,
            data=data,
        )

        return ServiceInstance(self._version, payload, sid=self._solution['sid'], )

    @property
    def verifications(self):
        """
        Access the verifications

        :returns: twilio.rest.preview.acc_security.service.verification.VerificationList
        :rtype: twilio.rest.preview.acc_security.service.verification.VerificationList
        """
        if self._verifications is None:
            self._verifications = VerificationList(self._version, service_sid=self._solution['sid'], )
        return self._verifications

    @property
    def verification_checks(self):
        """
        Access the verification_checks

        :returns: twilio.rest.preview.acc_security.service.verification_check.VerificationCheckList
        :rtype: twilio.rest.preview.acc_security.service.verification_check.VerificationCheckList
        """
        if self._verification_checks is None:
            self._verification_checks = VerificationCheckList(self._version, service_sid=self._solution['sid'], )
        return self._verification_checks

    def __repr__(self):
        """
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        """
        context = ' '.join('{}={}'.format(k, v) for k, v in self._solution.items())
        return '<Twilio.Preview.AccSecurity.ServiceContext {}>'.format(context)

class ServiceInstance(InstanceResource):
    """ PLEASE NOTE that this class contains preview products that are subject
    to change. Use them with caution. If you currently do not have developer
    preview access, please contact help@twilio.com. """

    def __init__(self, version, payload, sid=None):
        """
        Initialize the ServiceInstance

        :returns: twilio.rest.preview.acc_security.service.ServiceInstance
        :rtype: twilio.rest.preview.acc_security.service.ServiceInstance
        """
        super(ServiceInstance, self).__init__(version)

        # Marshaled Properties
        self._properties = {
            'sid': payload.get('sid'),
            'account_sid': payload.get('account_sid'),
            'name': payload.get('name'),
            'code_length': deserialize.integer(payload.get('code_length')),
            'date_created': deserialize.iso8601_datetime(payload.get('date_created')),
            'date_updated': deserialize.iso8601_datetime(payload.get('date_updated')),
            'url': payload.get('url'),
            'links': payload.get('links'),
        }

        # Context
        self._context = None
        self._solution = {'sid': sid or self._properties['sid'], }

    @property
    def _proxy(self):
        """
        Generate an instance context for the instance, the context is capable of
        performing various actions.  All instance actions are proxied to the context

        :returns: ServiceContext for this ServiceInstance
        :rtype: twilio.rest.preview.acc_security.service.ServiceContext
        """
        if self._context is None:
            self._context = ServiceContext(self._version, sid=self._solution['sid'], )
        return self._context

    @property
    def sid(self):
        """
        :returns: A string that uniquely identifies this Service.
        :rtype: unicode
        """
        return self._properties['sid']

    @property
    def account_sid(self):
        """
        :returns: Account Sid.
        :rtype: unicode
        """
        return self._properties['account_sid']

    @property
    def name(self):
        """
        :returns: Friendly name of the service
        :rtype: unicode
        """
        return self._properties['name']

    @property
    def code_length(self):
        """
        :returns: Length of verification code. Valid values are 4-10
        :rtype: unicode
        """
        return self._properties['code_length']

    @property
    def date_created(self):
        """
        :returns: The date this Service was created
        :rtype: datetime
        """
        return self._properties['date_created']

    @property
    def date_updated(self):
        """
        :returns: The date this Service was updated
        :rtype: datetime
        """
        return self._properties['date_updated']

    @property
    def url(self):
        """
        :returns: The url
        :rtype: unicode
        """
        return self._properties['url']

    @property
    def links(self):
        """
        :returns: The links
        :rtype: unicode
        """
        return self._properties['links']

    def fetch(self):
        """
        Fetch a ServiceInstance

        :returns: Fetched ServiceInstance
        :rtype: twilio.rest.preview.acc_security.service.ServiceInstance
        """
        return self._proxy.fetch()

    def update(self, name=values.unset, code_length=values.unset):
        """
        Update the ServiceInstance

        :param unicode name: Friendly name of the service
        :param unicode code_length: Length of verification code. Valid values are 4-10

        :returns: Updated ServiceInstance
        :rtype: twilio.rest.preview.acc_security.service.ServiceInstance
        """
        return self._proxy.update(name=name, code_length=code_length, )

    @property
    def verifications(self):
        """
        Access the verifications

        :returns: twilio.rest.preview.acc_security.service.verification.VerificationList
        :rtype: twilio.rest.preview.acc_security.service.verification.VerificationList
        """
        return self._proxy.verifications

    @property
    def verification_checks(self):
        """
        Access the verification_checks

        :returns: twilio.rest.preview.acc_security.service.verification_check.VerificationCheckList
        :rtype: twilio.rest.preview.acc_security.service.verification_check.VerificationCheckList
        """
        return self._proxy.verification_checks

    def __repr__(self):
        """
        Provide a friendly representation

        :returns: Machine friendly representation
        :rtype: str
        """
        context = ' '.join('{}={}'.format(k, v) for k, v in self._solution.items())
        return '<Twilio.Preview.AccSecurity.ServiceInstance {}>'.format(context)

redpajama_set_name: RedPajamaGithub


text:
package com.vaadin.tests.layouts;

import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.v7.ui.TextField;

@SuppressWarnings("serial")
public class MovingInvisibleField extends TestBase {

    @Override
    protected void setup() {
        final VerticalLayout layout1 = new VerticalLayout();
        final VerticalLayout layout2 = new VerticalLayout();

        final TextField tfHidden = new TextField("Hidden text field caption",
                "A hidden text field");
        final TextField tfVisible = new TextField("Visible text field caption",
                "A visible text field");
        tfHidden.setVisible(false);
        Button b = new Button("Move hidden textfield to other layout");
        b.addClickListener(event -> {
            if (layout1.getComponentIndex(tfHidden) != -1) {
                layout2.addComponent(tfVisible);
                layout2.addComponent(tfHidden);
            } else {
                layout1.addComponent(tfVisible);
                layout1.addComponent(tfHidden);
            }
        });

        layout1.addComponent(tfVisible);
        layout1.addComponent(tfHidden);

        addComponent(layout1);
        addComponent(b);
        addComponent(layout2);
    }

    @Override
    protected String getDescription() {
        return "Above and below the button is a VerticalLayout. Initially the first one contains two components: a visiable and an invisible TextField. Click the button to move the TextFields to the second layout, both should be moved but only the visible rendered.";
    }

    @Override
    protected Integer getTicketNumber() {
        return 5278;
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace AppCore.TestDemo
{
    public class NameJoiner
    {

        public string Join(string firstName, string lastName)
        {
            return firstName + " " + lastName;
        }
    }
}


text:
/**---------------------------------------------------------------------------------------------------------------------
 * tgi-spec/lib/tgi-spec.source.js
 **/
var Spec = function (options) {
  options = options || {};
  var spec = this;
  spec.scripts = []; // array of scripts
  spec.nodes = []; // array of Spec.Node's
  spec.testsCreated = 0;
  spec.testsPending = 0;
  spec.testsFailed = 0;
  spec.muted = false;
  spec.mutedTestsCreated = 0;
  spec.muteCount = 0;
  spec.timeOut = options.timeOut || 500;
};
Spec.prototype.test = function (testSource, testName, testDescription, testScript) {
  this.scripts.push({
    testSource: testSource,
    testName: testName,
    testDescription: testDescription,
    testScript: testScript
  });
};
Spec.prototype.testSection = function (sectionHeader, sectionText) {
  this.scripts.push({
    testSource: 'Section',
    testName: sectionHeader,
    testDescription: sectionText
  });
};
Spec.prototype.runTests = function (callback) {
  var spec = this;
  var node;
  spec.testCallback = callback;
  // Load the scripts
  for (var i = 0; i < spec.scripts.length; i++) {
    var script = spec.scripts[i];
    spec.testCallback({log: 'test script: ' + script.testName + (spec.muted ? ' (MUTED)' : '')});
    if (script.testSource == 'Section') {
      node = new Spec.Node({type: 's'});
      node.muted = spec.muted;
      node.text = script.testName;
      node.description = script.testDescription;
      spec.nodes.push(node);

    } else {
      node = new Spec.Node({type: 't'});
      node.muted = spec.muted;
      node.text = script.testName;
      node.description = script.testDescription;
      spec.nodes.push(node);
      script.testScript(callback);
    }
  }
  // Push Summary of all tests
  node = new Spec.Node({type: 't'});
  node.muted = spec.muted;
  node.text = 'Summary';
  node.description = 'for this spec.';
  spec.nodes.push(node);
  spec.completionCheck();
  spec.paragraph('This documentation generated with https://github.com/tgicloud/tgi-spec.
TODO put testin stats here.');
};
Spec.prototype.completionCheck = function (force) {

  function shallowStringify(obj, onlyProps, skipTypes) {
    var objType = typeof(obj);
    if(['function', 'undefined'].indexOf(objType)>=0) {
      return objType;
    } else if(['string', 'number', 'boolean'].indexOf(objType)>=0) {
      return obj; // will toString
    }
    // objType == 'object'
    var res = '{';
    for (var p in obj) { // property in object
      if(typeof(onlyProps)!=='undefined' && onlyProps) {
        // Only show property names as values may show too much noise.
        // After this you can trace more specific properties to debug
        res += p+', ';
      } else {
        var valType = typeof(obj[p]);
        if(typeof(skipTypes)=='undefined') {
          skipTypes = ['function'];
        }
        if(skipTypes.indexOf(valType)>=0) {
          res += p+': '+valType+', ';
        } else {
          res += p+': '+obj[p]+', ';
        }
      }
    }
    res += '}';
    return res;
  }

  var spec = this;
  //console.log('completionCheck ' + spec.testsPending);
  if (!spec.testsPending || force) {
    clearTimeout(spec.watchdog);
    /**
     * Emit any pending tests as errors
     */
    if (spec.testsPending) {
      for (var i = 0; i < this.nodes.length; i++) {
        var node = this.nodes[i];
        if (node.type=='e' && node.test.testAsync && !node.test.asyncCalledBack) {
          console.log(node.text + ': ' + shallowStringify(node.test));
        }
      }
    }
    /**
     * Finally we are done
     */
    spec.testCallback({
      done: true,
      testsCreated: spec.testsCreated,
      testsPending: spec.testsPending,
      testsFailed: spec.testsFailed
    });
  } else {
    // Give time for async to finish
    spec.watchdog = spec.watchdog || setTimeout(function () {
      spec.completionCheck(true); // force completion
    }, spec.timeOut);
  }
};
Spec.prototype.githubMarkdown = function () {
  var spec = this;
  var text = '';
  var i;
  for (i = 0; i < spec.nodes.length; i++) {
    var node = spec.nodes[i];
    var toc = textToAnchor(spec.tocDesc) || 'table-of-contents';
    if (!node.muted) {
      if (i)
        text += '\n';
      switch (node.type) {
        case 't':
          if (i === 0) {
            text += '# ' + node.text;
          } else if (isLastLink(i)) {
            text += '## [◀](' + getPreviousLink(i) + ') [⌘](#' + toc + ')  ' + node.text;
          } else {
            text += '## [◀](' + getPreviousLink(i) + ') [⌘](#' + toc + ') [▶](' + getNextLink(i) + ')  ' + node.text;
          }
          break;
        case 'h':
          text += '\n#### ' + node.text;
          break;
        case 'i':
          text += generateTOC(spec.tocDesc || 'Table of Contents');
          break;
        case 'e':
          text += codeBlock();
          break;
        case 'p':
          text += node.text + '    \n';
          break;
        default:
      }
    }
  }
  return text;

  /**
   * Generate Table of Contents for each test
   * [What is the point?](#-point-is-this)
   * https://github.com/tgicloud/tgi-spec/blob/master/spec/README.md#-illiad-book-1
   */
  function generateTOC(tocDesc) {
    var i;
    var text = '## ' + tocDesc + '\n';
    // todo skips first test should be overridable
    for (i = 1; i < spec.nodes.length; i++) {
      var node = spec.nodes[i];
      if (node.type == 's') {
        text += '\n\n#### ' + node.text;
      }
      if (node.type == 't') {
        if (node.text != 'Summary')
          text += '\n- [' + node.text + '](' + '#-' + textToAnchor(node.text) + ') ' + node.description;
      }
    }
    return text + '\n\n';
  }

  /**
   * helpers
   */
  function textToAnchor(text) {
    var headless = text.replace(/#/g, '');
    return headless.toLowerCase().replace(/ /g, '-');
  }

  function getPreviousLink(index) {
    var i;
    for (i = index - 1; i >= 0; i--) {
      var node = spec.nodes[i];
      if (node.type == 't') {
        if (index == 1)
          return '#' + textToAnchor(node.text);
        else
          return '#-' + textToAnchor(node.text);
      }
    }
    return '#';
  }

  function getNextLink(index) {
    var i;
    for (i = index + 1; i < spec.nodes.length; i++) {
      var node = spec.nodes[i];
      if (node.type == 't') {
        return '#-' + textToAnchor(node.text);
      }
    }
    return '#';
  }

  function isLastLink(index) {
    var i;
    var lastLink;
    for (i = 0; i < spec.nodes.length; i++) {
      var node = spec.nodes[i];
      if (node.type == 't') {
        lastLink = i;
      }
    }
    return lastLink == index;
  }

  /**
   * take test callback and format for code display
   */
  function codeBlock() {
    var i, j, k;
    var arrayOfLines;
    var prettyCode;
    var leadingSpaces = 0;
    var line, line2;
    var codeText = '';
    var resultsText = '';
    var expectedValue;
    arrayOfLines = node.test.testFunction.toString().match(/[^\r\n]+/g);
    prettyCode = '';
    for (j = 1; j < arrayOfLines.length - 1; j++) {
      line = arrayOfLines[j];
      if (j == 1) {
        leadingSpaces = 0;
        for (k = 0; k < line.length && line[k] == ' '; k++) {
          leadingSpaces++;
        }
      }
      for (k = 0; k < line.length && k < leadingSpaces && line[k] == ' '; k++) {
        // eat spaces
      }
      line2 = '';
      for (; k < line.length; k++) {
        line2 += line[k];
      }
      if (prettyCode.length)
        prettyCode += '\n' + line2;
      else
        prettyCode += line2;
    }
    codeText += ' ' + node.text + ':';
    codeText += '\n\n```javascript\n' + prettyCode + '\n```';
    expectedValue = node.test.expectedValue;
    if (typeof node.test.expectedValue === 'object' && node.test.expectedValue.async)
      expectedValue = node.test.expectedValue.expectedValue;
    if (node.test.testThrown) {
      if (node.test.testFailed) {
        resultsText = 'error thrown: ' + node.test.errorThrown + '\n';
      } else {
        if (expectedValue)
          resultsText = '' + expectedValue + ' thrown as expected\n';
        else
          resultsText = 'error thrown as expected\n';
      }
    } else {
      if (node.test.testFailed) {
        if (node.test.returnValue !== expectedValue)
          resultsText = 'ERROR got  ' + node.test.returnValue + ' expected ' + expectedValue + '\n';
      } else {
        if (expectedValue)
          resultsText = 'returns ' + expectedValue + ' as expected\n';
      }
    }
    if (node.test.assertionsFailed) {
      if (resultsText.length) resultsText += '
';
      resultsText += 'Assertion(s) failed\n';
    }

    // this.stuffLogged.push(stuff);
    //this.stuffLogged.push(stuff);
    if (node.test.stuffLogged) {
      for (i = 0; i < node.test.stuffLogged.length; i++) {
        var log = node.test.stuffLogged[i];
        resultsText = 'log: ' + log + '
' + resultsText;
      }
    }

    if (resultsText) {
      codeText += '\n
' +
      resultsText +
      '
\n';
    }
    return codeText;
  }

};
/**
 * Spec.Node object for each piece of spec types as follows:
 * s - section
 * t - test module
 * h - heading
 * i - index
 * p - paragraph
 * e - example (test)
 **/
Spec.Node = function (args) {
  args = args || {};
  this.type = args.type || null;
  if (!this.type || ((this.type != 's') && (this.type != 't') && (this.type != 'h') && (this.type != 'i') && (this.type != 'p') && (this.type != 'e'))) {
    throw new Error('Spec.Node type must be t, h, i, p or e');
  }
};
/**
 * Spec.Test for each example
 */
Spec.Test = function (spec, expectedValue, testFunction, example) {
  var test = this;
  var testExpectedValue;
  var testReturnValue;
  spec.testsCreated++;
  spec.testsPending++;
  test.expectedValue = expectedValue;
  test.testFunction = testFunction;
  test.testThrown = false;
  test.testAsync = false;
  test.asyncCalledBack = false;
  test.assertionsMade = 0;
  test.assertionsFailed = 0;
  test.stuffLogged = [];
  try {
    var returnValue = test.testFunction(function (callbackReturns) {
      spec.testsPending--;
      test.asyncCalledBack = true;
      if (test.assertionsFailed) {
        spec.testsFailed++;
        test.testFailed = true;
        spec.testCallback({error: 'ex. "' + example + '": ' + 'assertions failed: ' + testReturnValue});
      } else if (typeof expectedValue !== 'undefined' && expectedValue.async) {
        if (test.expectedValue.expectedValue != callbackReturns) {
          spec.testsFailed++;
          test.testFailed = true;
          spec.testCallback({error: 'ex. "' + example + '": ' + 'callback return value incorrect: "' + callbackReturns + '" expected "' + test.expectedValue.expectedValue + '"'});
        }
      }
    });
    testReturnValue = returnValue instanceof Error ? returnValue.toString() : returnValue;
    if (typeof expectedValue !== 'undefined') {
      test.testAsync = expectedValue.async;
      testExpectedValue = expectedValue instanceof Error ? expectedValue.toString() : expectedValue;
      if (!test.testAsync) {
        test.returnValue = testReturnValue;
        if (testExpectedValue != testReturnValue) {
          spec.testsFailed++;
          test.testFailed = true;
          spec.testCallback({error: 'ex. "' + example + '": ' + 'return value incorrect: "' + testReturnValue + '" expected "' + testExpectedValue + '"'});
        } else if (test.assertionsFailed) {
          spec.testsFailed++;
          test.testFailed = true;
          spec.testCallback({error: 'ex. "' + example + '": ' + 'assertions failed: ' + testReturnValue});
        }
      }
    } else if (test.assertionsFailed) {
      spec.testsFailed++;
      test.testFailed = true;
      spec.testCallback({error: 'ex. "' + example + '": ' + 'assertions failed: ' + testReturnValue});
    }
  } catch (e) {
    test.testThrown = true;
    test.errorThrown = e;
    if (typeof expectedValue === 'undefined' || !(expectedValue instanceof Error) || e.toString() !== expectedValue.toString()) {
      spec.testsFailed++;
      test.testFailed = true;
      spec.testCallback({error: 'ex. "' + example + '": ' + 'error thrown: ' + e});
    }
  }
  if (!test.testAsync)
    spec.testsPending--;
};
/**
 * Assertions
 */
Spec.Test.prototype.shouldBeTrue = function (expression) {
  this.assertionsMade++;
  if (expression !== true) {
    console.error('assertion failed ');
    this.assertionsFailed++;
  }
};
Spec.Test.prototype.shouldBeFalse = function (expression) {
  this.assertionsMade++;
  if (expression !== false) {
    console.error('assertion failed ');
    this.assertionsFailed++;
  }
};
Spec.Test.prototype.shouldBeTruthy = function (expression) {
  this.assertionsMade++;
  if (!expression) {
    console.error('assertion failed ');
    this.assertionsFailed++;
  }
};
Spec.Test.prototype.shouldBeFalsy = function (expression) {
  this.assertionsMade++;
  if (expression != false) {// jshint ignore:line
    console.error('assertion failed ');
    this.assertionsFailed++;
  }
};
Spec.Test.prototype.shouldThrowError = function (err, func) {
  var gotError = false;
  try {
    func();
  } catch (e) {
    gotError = true;
    if (err !== undefined)
      if (err.toString() != e.toString() && err.toString() != '*')
        throw('EXPECTED ERROR(' + err + ') GOT ERROR(' + e + ')');
  }
  if (!gotError) {
    throw('EXPECTED ERROR(' + err + ')');
  }
};
/**
 * Logging
 **/
Spec.Test.prototype.log = function (stuff) {
  this.stuffLogged.unshift(stuff);
};

/**
 * Create a heading node
 **/
Spec.prototype.heading = function (text, func) {
  var spec = this;
  if (typeof text !== 'string' || text === '') {
    throw new Error('Spec.heading requires text argument');
  }
  spec.testCallback({log: 'heading: ' + text + (spec.muted ? ' (MUTED)' : '')});
  var node = new Spec.Node({type: 'h'});
  node.muted = spec.muted;
  node.text = text;
  this.nodes.push(node);
  if (func) func();
  return node;
};
/**
 * Create a paragraph node
 **/
Spec.prototype.paragraph = function (text) {
  var spec = this;
  if (typeof text !== 'string' || text === '') {
    throw new Error('Spec.paragraph requires text argument');
  }
  spec.testCallback({log: 'paragraph: ' + text + (spec.muted ? ' (MUTED)' : '')});
  var node = new Spec.Node({type: 'p'});
  node.muted = spec.muted;
  node.text = text;
  this.nodes.push(node);
  return node;
};
/**
 * Create a example node
 **/
Spec.prototype.example = function (text, results, testFunction) {
  var spec = this;
  if (typeof text !== 'string' || text === '') {
    throw new Error('Spec.example requires text argument');
  }
  spec.testCallback({log: 'example: ' + text + (spec.muted ? ' (MUTED)' : '')});
  if (typeof testFunction !== 'function') {
    throw new Error('Spec.example 3rd arg is function code or undefined');
  }
  var node = new Spec.Node({type: 'e'});
  node.muted = spec.muted;
  if (spec.muted) spec.mutedTestsCreated++;
  node.text = text;
  node.test = new Spec.Test(this, results, testFunction, text);
  this.nodes.push(node);
  return node;
};
Spec.prototype.xexample = function () { // for disabling
};
/**
 * Create index / TOC
 */
Spec.prototype.index = function (tocDesc) {
  var spec = this;
  var node = new Spec.Node({type: 'i'});
  node.muted = spec.muted;
  spec.tocDesc = tocDesc;
  spec.nodes.push(node);
  return node;
};
/**
 * Encapsulate expected test results with async tag
 **/
Spec.prototype.asyncResults = function (arg) {
  return {async: true, expectedValue: arg};
};
/**
 * Mute / unmute tests
 **/
Spec.prototype.mute = function (arg) {

  var spec = this;
  if (arg) {
    if (!spec.muteCount)
      spec.mutedTestsCreated = 0;
    spec.muted = true;
    spec.muteCount++;
  } else {
    if (spec.muteCount > 0)
      spec.muteCount--;
    if (!spec.muteCount)
      spec.muted = false;
  }
  //if (spec.testCallback)
  //  spec.testCallback({log: 'MUTE ' + (arg ? 'ON' : 'OFF') + ' COUNT ' + spec.muteCount});
  //else
  //  console.log('*** MUTE ' + (arg ? 'ON' : 'OFF') + ' ***');

  return {testsCreated: spec.mutedTestsCreated};
};


text:
package com.minminaya.nidaily.column.adapter;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentManager;
import android.support.v7.widget.CardView;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.blankj.utilcode.util.ActivityUtils;
import com.bumptech.glide.Glide;
import com.minminaya.data.http.model.column.SectionsModel;
import com.minminaya.data.http.model.topic.TopicItemModel;
import com.minminaya.library.util.Logger;
import com.minminaya.nidaily.App;
import com.minminaya.nidaily.C;
import com.minminaya.nidaily.R;
import com.minminaya.nidaily.column.activity.SectionItemActivity;
import com.minminaya.nidaily.topic.activity.ThemeItemActivity;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * ColumnFragment页的RecyclerView的Adapter
 * Created by Niwa on 2017/10/07.
 */

public class ColumnRecyclerViewAdapter extends RecyclerView.Adapter<ColumnRecyclerViewAdapter.ViewHolderA> {
    private List<SectionsModel> sectionsModels;

    public List<SectionsModel> getSectionsModels() {
        return sectionsModels;
    }

    public void setSectionsModels(List<SectionsModel> sectionsModels) {
        this.sectionsModels = sectionsModels;
    }

    public ColumnRecyclerViewAdapter() {
        Logger.d("ColumnRecyclerViewAdapter", "ColumnRecyclerViewAdapter 构造");
    }

    @Override
    public ViewHolderA onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_topic_recycler_view, parent, false);
        ViewHolderA viewHolderA = new ViewHolderA(view);
        return viewHolderA;
    }

    @Override
    public void onBindViewHolder(ViewHolderA holder, final int position) {
        if (sectionsModels != null) {
            holder.tvDescriptionRecyclerViewItem.setText(sectionsModels.get(0).getData().get(position).getName());
            holder.tvTopicName.setText(sectionsModels.get(0).getData().get(position).getDescription());
            Glide.with(App.getINSTANCE()).load(sectionsModels.get(0).getData().get(position).getThumbnail()).into(holder.imgTopicRecyclerViewItem);

            holder.cardView.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Intent intent = new Intent(App.getINSTANCE(), SectionItemActivity.class);
                    Bundle bundle = new Bundle();
                    bundle.putInt(C.BundleKeyString.COLUMN_RECYCLER_VIEW_TO_SECTION_ACTIVITY, sectionsModels.get(0).getData().get(position).getId());
                    intent.putExtras(bundle);
                    ActivityUtils.startActivity(intent);
                }
            });
        }
    }

    @Override
    public int getItemCount() {
        return (sectionsModels != null) ? sectionsModels.get(0).getData().size() : 0;
    }

    class ViewHolderA extends RecyclerView.ViewHolder {
        @BindView(R.id.card_view_at_topic_recycler_view_item)
        CardView cardView;
        @BindView(R.id.tv_description_topic_recycler_view_item)
        TextView tvDescriptionRecyclerViewItem;
        @BindView(R.id.tv_topic_name)
        TextView tvTopicName;
        @BindView(R.id.img_topic_recycler_view_item)
        ImageView imgTopicRecyclerViewItem;

        ViewHolderA(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }
    }
}


text:
layout: job
title: Sourcing Specialist
subtitle: CLOSED
imagejob: /images/brightteam_devops_job_offer.png
image-alt-job: Bright Inventions' team
hours: full-time
salary: 5000 - 8000 PLN + VAT (B2B) or 4150 - 6650 PLN gross (UoP)
salary_min: 4150
salary_max: 8000
working time: full time
technology:
  - Android
  - iOS
show_new_title_more_about_us: false
button: join our Bright team
published: false
show_recruiter_info: false
order: 11
recruting_image2_title: interview
recruting_image3_title: task
---

At Bright Inventions you'll be an important part of a group of talented, ambitious and positive developers, designers, managers and marketers who love to solve real problems and build software that really matters in today's world.

We support and share responsibility with the members of our team. We also actively take responsibility for our own self-development. Positive attitude, flexibility and teamwork are elemental parts of our success. Clients trust us to build things that work and we take that seriously.

## about the role

We are looking for a determined, positive and talented Sourcing Specialist who would like to support us in developing our team with new bright technical talents. This role includes connecting with potential candidates online and offline, screening applications and supporting the whole recruitment team while maintaining a positive candidate experience.

## what you will do

* publish compelling and competitive job offers in various portals
* source and screen potential hires as well as schedule the interviews
* network with professional IT communities on social media groups/meetups/conferences
* ensure a positive candidate experience with frequent communication throughout the process
* maintain proper documentation of applicants within the recruiting process
* support hiring  best practices and taking part in Employer Branding initiatives

## our expectations

* 2+ year of experience in sourcing (preferably in IT sector )
* knowledge of sourcing techniques on social media and other professional websites
* strong interpersonal and organisational skills
* positive attitude and perfect communication skills
* an ability to prioritise and plan work in a time efficiently manner
* an ability to work independently as well as a part o the team
* very good command of Polish and English (both written and spoken)

## nice to have

* BSc in Human Resources Management, Psychology or relevant field

## what you will find in our Bright Team 🧡

* real impact on the company growth and space for self-development
* continuous feedback culture and regular 1:1 meetings
* flexible working hours (we start work between 7.00 -10.00 a.m.)
* remote work connected with working in the office in Gdańsk
* business contract depending on your needs (B2B, permanent contract UoP as well as Umowa zlecenie are possible)
* 20-26 paid days off + Polish bank holidays regardless of the contract type
* MultiSport and private medical package
* good equipment: MacBook and additional accessories
* office library with professional books and individual training budget
* weekly sport classes with a professional coach (running, swimming & biking)
* free English classes in small groups
* Friday yoga and board games evenings
* team buildings parties once a quarter and weekly bright lunch initiative

In case you have any questions, drop a line to [ula@bright.dev](mailto:ula@bright.dev) and grab the opportunity to become a part of our Bright Team! 🧡


text:
/*
 *    THIS FILE IS GENERATED. DO NOT MODIFY.
 *
 *    SOURCE TEMPLATE: trait.c.h
 *    SOURCE PROTO: weave/trait/security/user_nfc_token_management_trait.proto
 *
 */
#ifndef _WEAVE_TRAIT_SECURITY__USER_NFC_TOKEN_MANAGEMENT_TRAIT_C_H_
#define _WEAVE_TRAIT_SECURITY__USER_NFC_TOKEN_MANAGEMENT_TRAIT_C_H_

    //
    // Commands
    //

    typedef enum
    {
      kTransferUserNFCTokenRequestId = 0x1,
      kSetUserNFCTokenEnableStateRequestId = 0x2,
      kAuthUserNFCTokenToStructureRequestId = 0x3,
    } schema_weave_security_user_nfc_token_management_trait_command_id_t;

    // TransferUserNFCTokenRequest Parameters
    typedef enum
    {
        kTransferUserNFCTokenRequestParameter_TargetUserId = 1,
        kTransferUserNFCTokenRequestParameter_TokenDeviceId = 2,
    } schema_weave_security_user_nfc_token_management_trait_transfer_user_nfc_token_request_param_t;
    // SetUserNFCTokenEnableStateRequest Parameters
    typedef enum
    {
        kSetUserNFCTokenEnableStateRequestParameter_TokenDeviceId = 1,
        kSetUserNFCTokenEnableStateRequestParameter_Enabled = 2,
    } schema_weave_security_user_nfc_token_management_trait_set_user_nfc_token_enable_state_request_param_t;
    // AuthUserNFCTokenToStructureRequest Parameters
    typedef enum
    {
        kAuthUserNFCTokenToStructureRequestParameter_TokenDeviceId = 1,
        kAuthUserNFCTokenToStructureRequestParameter_Authorized = 2,
        kAuthUserNFCTokenToStructureRequestParameter_StructureId = 3,
    } schema_weave_security_user_nfc_token_management_trait_auth_user_nfc_token_to_structure_request_param_t;

    //
    // Enums
    //

    // NFCTokenEvent
    typedef enum
    {
    NFC_TOKEN_EVENT_PAIRED = 1,
    NFC_TOKEN_EVENT_UNPAIRED = 2,
    NFC_TOKEN_EVENT_STRUCTURE_AUTH = 3,
    NFC_TOKEN_EVENT_STRUCTURE_UNAUTH = 4,
    NFC_TOKEN_EVENT_TRANSFERRED = 5,
    NFC_TOKEN_EVENT_DISABLED = 6,
    NFC_TOKEN_EVENT_ENABLED = 7,
    } schema_weave_security_user_nfc_token_management_trait_nfc_token_event_t;

#endif // _WEAVE_TRAIT_SECURITY__USER_NFC_TOKEN_MANAGEMENT_TRAIT_C_H_


text:
{-# LANGUAGE EmptyDataDecls, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fcontext-stack42  #-}
module Games.Chaos2010.Database.Operator_source where
import Games.Chaos2010.Database.Fields
import Database.HaskellDB.DBLayout

type Operator_source =
     Record
       (HCons (LVPair Operator_name (Expr (Maybe String)))
          (HCons (LVPair Source (Expr (Maybe String))) HNil))

operator_source :: Table Operator_source
operator_source = baseTable "operator_source"


text:
//
//  ZVideoPlayerView.m
//  ZVideoPlayer
//
//  Created by dazhongge on 2016/12/29.
//  Copyright © 2016年 dazhongge. All rights reserved.
//

#import "ZVideoPlayerView.h"
#import <AVKit/AVKit.h>
#import <AVFoundation/AVFoundation.h>
#import <MediaPlayer/MediaPlayer.h>

// 由于 slider 的值是根据视频的时间来设置,所以,时间循环调用 slider 自动滚动的间隔,也表示着每次间隔 slider 移动的距离
static CGFloat zvideo_timer_move_distance = 0.5;

@interface ZVideoPlayerView()

/**
 关闭按钮
 */
@property (nonatomic, strong) UIButton *closeButton;

/**
 播放按钮放在中间位置
 */
@property (nonatomic, strong) UIButton *playButton;

/**
 暂停按钮
 */
@property (nonatomic, strong) UIButton *stopButton;

/**
 展开或者缩小全屏按钮
 */
@property (nonatomic, strong) UIButton *screenButton;

/**
 获取视频信息,当前时间以及总时间之类的信息
 */
@property (nonatomic, strong) AVPlayerItem *playerItem;

/**
 视频播放对象
 */
@property (nonatomic, strong) AVPlayer *player;

/**
 视频播放对象所在的layer层
 */
@property (nonatomic, strong) AVPlayerLayer *playLayer;

/**
 视频地址
 */
@property (nonatomic, strong) NSString *urlString;

/**
 底部的透明层
 */
@property (nonatomic, strong) UIView *bottomView;

/**
 顶部的透明层
 */
@property (nonatomic, strong) UIView *topView;

/**
 滑动条
 */
@property (nonatomic, strong) UISlider *slider;

/**
 根据视频的时间设置自动跟新 slider 值的一个定时器
 */
@property (nonatomic, strong) NSTimer *sliderTimer;

/**
 累计叠加 slider 的当前的value值,用于计算 slider 已经滑动的长度
 */
@property (nonatomic) CGFloat countSliderFloat;

/**
 计算视频的总时间
 */
@property (nonatomic) CGFloat videoTotalTime;

/**
 记录 view 上次的 frame
 */
@property (nonatomic) CGRect beforeFrame;

/**
 判断 继续播放按钮是否存在,根据此 布尔类型来判断点击手势是否成立
 */
@property (nonatomic, assign) BOOL isPlayButton;

/**
 判断是否是全屏的状态
 */
@property (nonatomic, assign) BOOL isFullScreen;

@end

@implementation ZVideoPlayerView

#pragma mark - 初始化对象

+ (instancetype)initWithLocalVideo:(NSString *)filePath {

    NSAssert(filePath && filePath.length > 0, @"------------ filePath can't be nil or ''");
    ZVideoPlayerView *video = [[ZVideoPlayerView alloc] init];
    video.urlString = filePath;
    return video;

}

+ (instancetype)initWithOnlineVideo:(NSString *)fileUrl {

    NSAssert(fileUrl && fileUrl.length > 0, @"------------ fileUrl can't be nil or ''");
    ZVideoPlayerView *video = [[ZVideoPlayerView alloc] initWithFrame:CGRectZero];
    video.urlString = fileUrl;
    return video;

}

#pragma mark - 属性的 set get 方法(when urlString != nil(and not ''), it's time to init subViews)

- (void)showViewIn:(UIView *)superView animation:(BOOL)animation {

    if(!animation) {[superView addSubview:self];return;}

    self.alpha = 0;
    [superView addSubview:self];
    [UIView animateWithDuration:0.3
                     animations:^{
                         self.alpha = 1;
                     }];

}

- (void)setIsPlay:(BOOL)isPlay {

    _isPlay = isPlay;
    if(_isPlay){[self.player play];return;}
    [self.player pause];

}

- (void)setUrlString:(NSString *)urlString {

    _urlString = urlString;

    [self loadInit];
    [self loadViews];
    [self loadLayout];
    [self loadInitStatus];
}

- (UIButton *)playButton {

    if(!_playButton) {

        _playButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_playButton setImage:[[UIImage imageNamed:@"player"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate] forState:UIControlStateNormal];
        [_playButton addTarget:self action:@selector(replayAction:) forControlEvents:UIControlEventTouchUpInside];
        _playButton.frame = CGRectMake(0, 0, 80, 80);
        _playButton.center = CGPointMake(CGRectGetWidth(self.bounds) / 2.0, CGRectGetHeight(self.bounds) / 2.0);
        self.isPlayButton = YES;
        [self addSubview:_playButton];

    }

    return _playButton;

}

#pragma mark - 构建界面以及布局(init some base datas and subViews)

- (void)loadInit {

    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapVideo:)];
    [self addGestureRecognizer:tap];

}

- (void)loadViews {

    if([self.urlString hasPrefix:@"http"]) {

        [self loadOnlineVideo];

    } else {

        [self loadLocalVideo];

    }

    /****************************************** 组装 topView 部分 ******************************************/

    self.topView = [[UIView alloc] initWithFrame:CGRectZero];
    self.topView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
    self.topView.userInteractionEnabled = YES;
    [self addSubview:self.topView];

    self.closeButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.closeButton setImage:[UIImage imageNamed:@"close"] forState:UIControlStateNormal];
    [self.closeButton addTarget:self action:@selector(closeAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.topView addSubview:self.closeButton];

    /****************************************** 组装 topView 部分 ******************************************/

    /****************************************** 组装 bottomView 部分 ******************************************/

    self.bottomView = [[UIView alloc] initWithFrame:CGRectZero];
    self.bottomView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
    self.bottomView.userInteractionEnabled = YES;
    [self addSubview:self.bottomView];

    self.slider = [[UISlider alloc] initWithFrame:CGRectZero];
    [self.slider setThumbImage:[UIImage imageNamed:@"movepoint"] forState:UIControlStateNormal];
    self.videoTotalTime = CMTimeGetSeconds(self.playerItem.asset.duration);
    self.slider.maximumValue = self.videoTotalTime;
    self.slider.continuous = YES;
    [self.slider addTarget:self action:@selector(sliderBegan:) forControlEvents:UIControlEventTouchDown];
    [self.slider addTarget:self action:@selector(sliderEnd:) forControlEvents:UIControlEventTouchUpInside];
    [self.bottomView addSubview:self.slider];

    self.stopButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.stopButton setImage:[UIImage imageNamed:@"pause"] forState:UIControlStateNormal];
    [self.stopButton addTarget:self action:@selector(stopAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.bottomView addSubview:self.stopButton];

    self.screenButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.screenButton setImage:[UIImage imageNamed:@"screen"] forState:UIControlStateNormal];
    [self.screenButton addTarget:self action:@selector(fullScreenAction:) forControlEvents:UIControlEventTouchUpInside];
    [self.bottomView addSubview:self.screenButton];

    /****************************************** 组装 bottomView 部分 ******************************************/

}

- (void)loadLayout {

    CGFloat blackViewHeight = CGRectGetHeight(self.bounds) / 6.0;
    self.playLayer.frame = self.bounds;
    _playButton.center = CGPointMake(CGRectGetWidth(self.bounds) / 2.0, CGRectGetHeight(self.bounds) / 2.0);

    /****************************************** 组装 topView 部分 ******************************************/

    self.topView.frame = CGRectMake(0, 0, CGRectGetWidth(self.bounds), blackViewHeight);
    self.closeButton.frame = CGRectMake(CGRectGetWidth(self.topView.frame) - 35, (CGRectGetHeight(self.topView.bounds) - CGRectGetHeight(self.topView.bounds) / 2.0) / 2.0, CGRectGetHeight(self.topView.bounds) / 2.0, CGRectGetHeight(self.topView.bounds) / 2.0);

    /****************************************** 组装 topView 部分 ******************************************/

    /****************************************** 组装 bottomView 部分 ******************************************/

    self.bottomView.frame = CGRectMake(0, CGRectGetHeight(self.bounds) - blackViewHeight, CGRectGetWidth(self.bounds), blackViewHeight);
    self.slider.frame = CGRectMake(40, 10, CGRectGetWidth(self.bounds) - 80, CGRectGetHeight(self.bottomView.bounds) - 20);
    self.stopButton.frame = CGRectMake((40 - CGRectGetHeight(self.bottomView.bounds) / 2.0) / 2.0, (CGRectGetHeight(self.bottomView.bounds) - CGRectGetHeight(self.bottomView.bounds) / 2.0) / 2.0, CGRectGetHeight(self.bottomView.bounds) / 2.0, CGRectGetHeight(self.bottomView.bounds) / 2.0);
    self.screenButton.frame = CGRectMake(self.slider.frame.origin.x + self.slider.frame.size.width + 5, (CGRectGetHeight(self.bottomView.bounds) - CGRectGetHeight(self.bottomView.bounds) / 2.0) / 2.0, CGRectGetHeight(self.bottomView.bounds) / 2.0, CGRectGetHeight(self.bottomView.bounds) / 2.0);

    /****************************************** 组装 bottomView 部分 ******************************************/

}

- (void)loadInitStatus {

    self.bottomView.alpha = 0;
    self.topView.alpha = 0;
    self.playButton.alpha = 1;
    self.bottomView.hidden = YES;
    self.topView.hidden = YES;
    self.playButton.hidden = NO;
    self.isPlayButton = YES;
}

- (void)layoutSubviews {

    [super layoutSubviews];
    [self loadLayout];

}

#pragma mark - 在线视频生成代码(AVPlayerItem 用户获取视频信息,当前时间以及总时间)

- (void)loadOnlineVideo {

    self.playerItem = [AVPlayerItem playerItemWithURL:[NSURL URLWithString:self.urlString]];
    self.player = [AVPlayer playerWithPlayerItem:self.playerItem];
    self.playLayer = [AVPlayerLayer playerLayerWithPlayer:self.player];
    [self.layer addSublayer:self.playLayer];

}

#pragma mark - 本地视频生成代码

- (void)loadLocalVideo {

    AVAsset *movieAsset = [AVURLAsset URLAssetWithURL:[NSURL fileURLWithPath:self.urlString] options:nil];
    self.playerItem = [AVPlayerItem playerItemWithAsset:movieAsset];
    self.player = [AVPlayer playerWithPlayerItem:self.playerItem];
    self.playLayer = [AVPlayerLayer playerLayerWithPlayer:self.player];
    [self.layer addSublayer:self.playLayer];

}

#pragma mark - selector action

- (void)fullScreenAction:(UIButton *)sender {

    if(self.isFullScreen) {

        [UIView animateWithDuration:0.25
                         animations:^{
                             [self setTransform:CGAffineTransformIdentity];
                             self.frame = self.beforeFrame;
                         }
                         completion:^(BOOL finished) {
                             [self.screenButton setImage:[UIImage imageNamed:@"screen"] forState:UIControlStateNormal];
                             self.isFullScreen = NO;
                         }];

        return;

    }

    self.beforeFrame = self.frame;

    [UIView animateWithDuration:0.25
                     animations:^{
                         [self setTransform:CGAffineTransformMakeRotation(M_PI_2)];
                         self.frame = [[UIScreen mainScreen] bounds];
                     }
                     completion:^(BOOL finished) {
                         [self.screenButton setImage:[UIImage imageNamed:@"scale"] forState:UIControlStateNormal];
                         self.isFullScreen = YES;
                     }];

}

- (void)sliderBegan:(UISlider *)sender {

    [self.player pause];
    [self.sliderTimer invalidate];
    self.sliderTimer = nil;

}

- (void)sliderEnd:(UISlider *)sender {

    [self.player seekToTime:CMTimeMake(self.slider.value, 1)];
    self.countSliderFloat = self.slider.value;
    if(self.isPlayButton) {

        return;

    }
    self.sliderTimer = [NSTimer scheduledTimerWithTimeInterval:zvideo_timer_move_distance target:self selector:@selector(countSlider:) userInfo:nil repeats:YES];
    [self.player play];

}

- (void)countSlider:(NSTimer *)timer {

    if(self.countSliderFloat > self.videoTotalTime) {

        [self.sliderTimer invalidate];
        return;

    }

    [self.slider setValue:self.countSliderFloat animated:YES];
    self.countSliderFloat += zvideo_timer_move_distance;

}

- (void)stopAction:(UIButton *)sender {

    [self.player pause];
    [self.sliderTimer invalidate];
    self.sliderTimer = nil;
    [self afterStop];

}

- (void)replayAction:(UIButton *)sender {

    [self.player play];
    self.sliderTimer = [NSTimer scheduledTimerWithTimeInterval:zvideo_timer_move_distance target:self selector:@selector(countSlider:) userInfo:nil repeats:YES];
    [self afterPlay];

}

- (void)tapVideo:(UITapGestureRecognizer *)gesture {

    if(self.isPlayButton) {

        return;

    }

    if(self.bottomView.hidden) {

        self.bottomView.hidden = NO;
        self.topView.hidden = NO;
        [UIView animateWithDuration:0.25
                         animations:^{
                             self.bottomView.alpha = 1;
                             self.topView.alpha = 1;
                         }];

        return;

    }

    [UIView animateWithDuration:0.25
                     animations:^{
                         self.bottomView.alpha = 0;
                         self.topView.alpha = 0;
                     }
                     completion:^(BOOL finished) {
                         self.bottomView.hidden = YES;
                         self.topView.hidden = YES;
                     }];

}

- (void)closeAction:(UIButton *)sender {

    if(self.removeViewBlock) {

        self.removeViewBlock();

    }

}

#pragma mark - 点击暂停之后的变化

- (void)afterStop {

    self.playButton.alpha = 0;
    [UIView animateWithDuration:0.25
                     animations:^{
                         self.playButton.alpha = 1;
                     }];

}

#pragma mark - 点击继续播放之后的变化

- (void)afterPlay {

    [UIView animateWithDuration:0.25
                     animations:^{
                         self.playButton.alpha = 0;
                     }
                     completion:^(BOOL finished) {
                         [self.playButton removeFromSuperview];
                         self.playButton = nil;
                         self.isPlayButton = NO;
                     }];

}

@end


text:
using System;
using System.Linq;
using Rothko.Interfaces.Commands;
using Rothko.Model;
using System.Collections.Generic;

namespace Rothko.Commands
{
	public class LeaveCarrierUnitCommand : ICommand
	{
		List<Unit> _Units;
		Unit _CarrierUnit;
		Unit _CarriedUnit;
		int _X;
		int _Y;

		public void Execute ()
		{
			if (_CarrierUnit == null)
				throw new Exception("Null carrier unit specified");

			if (_CarriedUnit == null)
				throw new Exception("Invalid carried unit ID specified");

			_CarriedUnit.IDUnitCarrier = null;
			_CarriedUnit.X = _X;
			_CarriedUnit.Y = _Y;
			_CarrierUnit.NumberOfUnitsBeingCarried--;
		}

		public LeaveCarrierUnitCommand (Unit carrierUnit, List<Unit> units, int idCarriedUnit, int x, int y)
		{
			_Units = units;
			_CarrierUnit = carrierUnit;
			_CarriedUnit = _Units.FirstOrDefault(u => u.ID == idCarriedUnit);
			_X = x;
			_Y = y;
		}
	}
}


text:
using System;

namespace System.Xml.Xsl.Qil
{
    internal enum SerializationHints
    {
        None = 0,
        CData,
        DisableOutputEscaping,
    }
}


text:
<!DOCTYPE html>

    <link rel="stylesheet" href="{{ url_for('static', filename='bootstrap.min.css') }}">
    <link rel=stylesheet type=text/css href="{{ url_for('static', filename='style.css') }}">

HuRandom*

A project about 'random' numbers

        {% block body %}{% endblock %}

                ISSUES
                About
                Source
            {% if not session.logged_in %}
                Admin Login
            {% else %}
                admin
                logout
            {% endif %}
            {% for message in get_flashed_messages() %}
                <button class="flash btn btn-default btn-xs">{{ message }}

            {% endfor %}

HuRandom is made with
        Flask,
        Pygal,
        Bootstrap, and
        <3 by
        Elijah Caine.

            All HuRandom code is licensed under the MIT license.

All collected data is licensed under

        ; for more info read the

            About Page.