text:
<?php /** @noinspection ALL */
/**
 * Copyright (c) 2020, Nosto Solutions Ltd
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification,
 * are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * 3. Neither the name of the copyright holder nor the names of its contributors
 * may be used to endorse or promote products derived from this software without
 * specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * @author Nosto Solutions Ltd <contact@nosto.com>
 * @copyright 2020 Nosto Solutions Ltd
 * @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause
 *
 */ //[STAMP] 27db558f1aa6e8002205a720703734e2

// This class was automatically generated by build task
// You should not change it manually as it will be overwritten on next build
// @codingStandardsIgnoreFile

/**
 * Inherited Methods
 * @method void wantToTest($text)
 * @method void wantTo($text)
 * @method void execute($callable)
 * @method void expectTo($prediction)
 * @method void expect($prediction)
 * @method void amGoingTo($argumentation)
 * @method void am($role)
 * @method void lookForwardTo($achieveValue)
 * @method void comment($description)
 * @method void haveFriend($name, $actorClass = null)
 *
 * @SuppressWarnings(PHPMD)
 */
class UnitTester extends \Codeception\Actor
{

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that two variables are equal.
     *
     * @param        $expected
     * @param        $actual
     * @param string $message
     *
     * @return mixed
     * @see \Codeception\Module\Asserts::assertEquals()
     */
    public function assertEquals($expected, $actual, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertEquals',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that two variables are not equal
     *
     * @param        $expected
     * @param        $actual
     * @param string $message
     * @see \Codeception\Module\Asserts::assertNotEquals()
     */
    public function assertNotEquals($expected, $actual, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEquals',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that expected is greater than actual
     *
     * @param        $expected
     * @param        $actual
     * @param string $message
     * @see \Codeception\Module\Asserts::assertGreaterThan()
     */
    public function assertGreaterThan($expected, $actual, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThan',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * @deprecated
     * @see \Codeception\Module\Asserts::assertGreaterThen()
     */
    public function assertGreaterThen($expected, $actual, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThen',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that expected is greater or equal than actual
     *
     * @param        $expected
     * @param        $actual
     * @param string $message
     * @see \Codeception\Module\Asserts::assertGreaterThanOrEqual()
     */
    public function assertGreaterThanOrEqual($expected, $actual, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThanOrEqual',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * @deprecated
     * @see \Codeception\Module\Asserts::assertGreaterThenOrEqual()
     */
    public function assertGreaterThenOrEqual($expected, $actual, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertGreaterThenOrEqual',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that expected is less than actual
     *
     * @param        $expected
     * @param        $actual
     * @param string $message
     * @see \Codeception\Module\Asserts::assertLessThan()
     */
    public function assertLessThan($expected, $actual, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThan',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that expected is less or equal than actual
     *
     * @param        $expected
     * @param        $actual
     * @param string $message
     * @see \Codeception\Module\Asserts::assertLessThanOrEqual()
     */
    public function assertLessThanOrEqual($expected, $actual, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertLessThanOrEqual',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that haystack contains needle
     *
     * @param        $needle
     * @param        $haystack
     * @param string $message
     * @see \Codeception\Module\Asserts::assertContains()
     */
    public function assertContains($needle, $haystack, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertContains',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that haystack doesn't contain needle.
     *
     * @param        $needle
     * @param        $haystack
     * @param string $message
     * @see \Codeception\Module\Asserts::assertNotContains()
     */
    public function assertNotContains($needle, $haystack, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertNotContains',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that variable is empty.
     *
     * @param        $actual
     * @param string $message
     * @see \Codeception\Module\Asserts::assertEmpty()
     */
    public function assertEmpty($actual, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertEmpty',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that variable is not empty.
     *
     * @param        $actual
     * @param string $message
     * @see \Codeception\Module\Asserts::assertNotEmpty()
     */
    public function assertNotEmpty($actual, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertNotEmpty',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that variable is NULL
     *
     * @param        $actual
     * @param string $message
     * @see \Codeception\Module\Asserts::assertNull()
     */
    public function assertNull($actual, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertNull',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that variable is not NULL
     *
     * @param        $actual
     * @param string $message
     * @see \Codeception\Module\Asserts::assertNotNull()
     */
    public function assertNotNull($actual, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertNotNull',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that condition is positive.
     *
     * @param        $condition
     * @param string $message
     * @see \Codeception\Module\Asserts::assertTrue()
     */
    public function assertTrue($condition, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertTrue',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Checks that condition is negative.
     *
     * @param        $condition
     * @param string $message
     * @see \Codeception\Module\Asserts::assertFalse()
     */
    public function assertFalse($condition, $message = null)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('assertFalse',
            func_get_args()));
    }

    /**
     * [!] Method is generated. Documentation taken from corresponding module.
     *
     * Fails the test with message.
     *
     * @param $message
     * @see \Codeception\Module\Asserts::fail()
     */
    public function fail($message)
    {
        return $this->scenario->runStep(new \Codeception\Step\Action('fail', func_get_args()));
    }
}


text:
/// Copyright (c) 2012 Ecma International.  All rights reserved.
/// Ecma International makes this code available under the terms and conditions set
/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
/// "Use Terms").   Any redistribution of this code must retain the above
/// copyright and this notice and otherwise comply with the Use Terms.
/**
 * Refer 13;
 * The production FunctionBody : SourceElementsopt is evaluated as follows:
 *
 * @path ch13/13.0/13.0-10-s.js
 * @description Strict Mode - SourceElements is evaluated as strict mode code when the code of this FunctionBody with an inner function contains a Use Strict Directive
 * @onlyStrict
 */

function testcase() {

        function _13_0_10_fun() {
            function _13_0_10_inner() {
                "use strict";
                eval("eval = 42;");
            }
            _13_0_10_inner();
        };
        try {
            _13_0_10_fun();
            return false;
        } catch (e) {
            return e instanceof SyntaxError;
        }
    }
runTestCase(testcase);

redpajama_set_name: RedPajamaGithub


text:
# jstransformer-cdata-css

Transformer that converts a CSS string to XML CDATA.

[![Build Status](https://img.shields.io/travis/jstransformers/jstransformer-cdata-css/master.svg)](https://travis-ci.org/jstransformers/jstransformer-cdata-css)
[![Coverage Status](https://img.shields.io/codecov/c/github/jstransformers/jstransformer-cdata-css/master.svg)](https://codecov.io/gh/jstransformers/jstransformer-cdata-css)
[![Dependency Status](https://img.shields.io/david/jstransformers/jstransformer-cdata-css/master.svg)](http://david-dm.org/jstransformers/jstransformer-cdata-css)
[![NPM version](https://img.shields.io/npm/v/jstransformer-cdata-css.svg)](https://www.npmjs.org/package/jstransformer-cdata-css)

## Installation

    npm install jstransformer-cdata-css

## API

```js
var cdata = require('jstransformer')(require('jstransformer-cdata-css'))

var css = 'p::before { content: "hello world"; }'
console.log(cdata.render(css).body)
// Prints:
// /*<![CDATA[*/
// p::before { content: "hello world"; }
// /*]]>*/

// ']]>' is properly escaped:
css = 'p::before { content: "<[[goodbye world]]>" }'
console.log(cdata.render(css).body)
// Prints:
// /*<![CDATA[*/
// p::before { content: "<[[goodbye world]]]]><![CDATA[>" }
// /*]]>*/
```

## License

MIT


text:
/** @defgroup RelationalOperators
 *
 * Relational operators which form query plans, and work orders which comprise
 * the actual work to be done in query execution.
 **/


text:
//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qt API.  It exists purely as an
// implementation detail.  This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.

#ifndef Patternist_ExternalVariableReference_H
#define Patternist_ExternalVariableReference_H

#include <private/qemptycontainer_p.h>

QT_BEGIN_NAMESPACE

namespace QPatternist
{
    /**
     * @short A reference to an external variable.
     *
     * ExternalVariableReference does not sub-class VariableReference, because it
     * works differently from how sub-classes of VariableReference do. This class
     * uses DynamicContext::externalVariableLoader() for retrieving its value, while
     * a VariableReference sub-class uses slots in the DynamicContext.
     *
     * @author Frans Englich <frans.englich@nokia.com>
     * @ingroup Patternist_expressions
     */
    class ExternalVariableReference : public EmptyContainer
    {
    public:
        ExternalVariableReference(const QXmlName &name,
                                  const SequenceType::Ptr &type);

        virtual Item::Iterator::Ptr evaluateSequence(const DynamicContext::Ptr &context) const;
        virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const;
        virtual bool evaluateEBV(const DynamicContext::Ptr &context) const;

        virtual SequenceType::Ptr staticType() const;

        /**
         * @returns always DisableElimination
         */
        virtual Expression::Properties properties() const;

        virtual ExpressionVisitorResult::Ptr accept(const ExpressionVisitor::Ptr &visitor) const;

    private:
        const QXmlName             m_name;
        const SequenceType::Ptr m_seqType;
    };
}

QT_END_NAMESPACE

#endif


text:
/*jslint node: true */
/*global describe, it, before, beforeEach, after, afterEach */
"use strict";

var assert          = require('chai').assert;
var dbModule        = require('../lib/util/db.js');
var schemaModule    = require('../lib/util/schema.js');
var schema;

beforeEach(function (done) {
    schema = dbModule({name: 'test_db'}).addSchema({ name: 'public' });
    schema.addTable({ name: 'account' });
    schema.addTable({ name: 'contact' });
    schema.addTable({ name: 'product' });
    done();
});

describe('Schema function', function () {
    it('should throw error if no args provided', function () {
        assert.throw(function () { schemaModule(); }, /Schema arguments are required/);
    });
    it('should throw error if arguments are not validated', function () {
        assert.throw(function () { schemaModule({ corruptParam: true }); }, /schema\. ValidationError: name is required/);
    });
});

describe('addTable function', function () {
    it('should add table and return it.', function () {
        var table = schema.addTable({ name: 'test_table' });
        assert.equal(table.constructor.name, 'Table');
        assert.equal(table.name(), 'test_table');
        assert.equal(schema.table('test_table').name(), 'test_table');
    });
    it('should return table when existing table tried to be added.', function () {
        var table = schema.addTable({ name: 'contact' });
        assert.equal(table.constructor.name, 'Table');
        assert.equal(table.name(), 'contact');
        assert.equal(schema.table('contact').name(), 'contact');
    });
    it('should throw error when no arguments passed.', function () {
        assert.throw(function () { schema.addTable(); }, /required/);
    });
    it('should add reference to its schema', function () {
        var addedTable  = schema.addTable({ name: 'test_table' });
        assert.equal(addedTable.schema().name(), 'public');
        assert.equal(addedTable.parent().name(), 'public');
    });
});

describe('table function', function () {
    it('should get table', function () {
        assert.equal(schema.table('account').name(), 'account');
        assert.equal(schema.table('product').name(), 'product');
    });
    it('should throw error if non existing table requested.', function () {
        assert.throw(function () { schema.table(); }, /Error in function arguments/);
    });
});

describe('tables function', function () {
    it('should return all tables without callback.', function () {
        var tables = schema.tables();
        assert.equal(tables.account.name(), 'account');
    });
    it('should execute callback if callback provided.', function () {
        schema.tables(function (table) {
            assert.deepEqual(table, schema.table(table.name()));
        });
    });
});

describe('Accessing from tables back to schema', function () {
    it('should return schema', function () {
        assert.equal(schema.table('account').schema().name(), 'public');
    });
    it('should access other columns thrugh table', function () {
        assert.equal(schema.table('account').schema().table('contact').name(), 'contact');
    });
});


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>LxEvent (lightadapter API)</title>
<meta name="date" content="2019-09-08">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

您的浏览器已禁用 JavaScript。

跳过导航链接

概览

程序包

类

树

已过时

索引

帮助

上一个类

下一个类

框架

无框架

所有类

概要:

嵌套 |

字段 |

构造器 |

方法

详细资料:

字段 |

构造器 |

方法

com.zfy.adapter.function

类 LxEvent

java.lang.Object

com.zfy.adapter.function.LxEvent

public class LxEvent
extends java.lang.Object

CreateAt : 2019-08-31
 Describe : 支持单击、双击、长按事件

构造器概要

构造器

构造器和说明

LxEvent()

方法概要

所有方法 静态方法 具体方法

限定符和类型
方法和说明

static void
setClickEvent(LxVh holder,
             OnItemEventListener listener)

static void
setDoubleClickEvent(LxVh holder,
                   boolean setClick,
                   boolean setLongPress,
                   OnItemEventListener listener)

static void
setEvent(LxVh holder,
        boolean setClick,
        boolean setLongPress,
        boolean setDoubleClick,
        OnItemEventListener listener)

static void
setLongPressEvent(LxVh holder,
                 OnItemEventListener listener)

从类继承的方法 java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

构造器详细资料

LxEvent

public LxEvent()

方法详细资料

setClickEvent

public static void setClickEvent(LxVh holder,
                                 OnItemEventListener listener)

setLongPressEvent

public static void setLongPressEvent(LxVh holder,
                                     OnItemEventListener listener)

setDoubleClickEvent

public static void setDoubleClickEvent(LxVh holder,
                                       boolean setClick,
                                       boolean setLongPress,
                                       OnItemEventListener listener)

setEvent

public static void setEvent(LxVh holder,
                            boolean setClick,
                            boolean setLongPress,
                            boolean setDoubleClick,
                            OnItemEventListener listener)

跳过导航链接

概览

程序包

类

树

已过时

索引

帮助

上一个类

下一个类

框架

无框架

所有类

概要:

嵌套 |

字段 |

构造器 |

方法

详细资料:

字段 |

构造器 |

方法


text:
package flex.messaging.services.messaging.adapters;

import javax.jms.ExceptionListener;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;

/**
 * A MessageReceiver that receives messages asynchronously from JMS.
 *
 * @exclude
 */
class AsyncMessageReceiver implements MessageReceiver, ExceptionListener, MessageListener
{
    private JMSConsumer jmsConsumer;

    /**
     * Constructs a new AsyncMessageReceiver.
     *
     * @param jmsConsumer JMSConsumer associated with the AsyncMessageReceiver.
     */
    public AsyncMessageReceiver(JMSConsumer jmsConsumer)
    {
        this.jmsConsumer = jmsConsumer;
    }

    /**
     * Implements MessageReceiver.startReceive.
     */
    public void startReceive() throws JMSException
    {
        jmsConsumer.setMessageListener(this);
    }

    /**
     * Implements MessageReceiver.stopReceive.
     */
    public void stopReceive()
    {
        // Nothing to do.
    }

    /**
     * Implements javax.jms.ExceptionListener.onException.
     *
     * @param exception JMS exception received from the JMS server.
     */
    public void onException(JMSException exception)
    {
        jmsConsumer.onException(exception);
    }

    /**
     * Implements javax.jms.MessageListener.onMessage.
     *
     * @param message JMS message received from the JMS server.
     */
    public void onMessage(Message message)
    {
        jmsConsumer.onMessage(message);
    }
}


text:
Web application that predicts flat prices using machine learning.

## How to run

* [Install Apache Spark](http://spark.apache.org/downloads.html)
* Clone repository
* Run in terminal `mvn clean assembly:assembly`
* Run `spark-submit target/flats-1.0-jar-with-dependencies.jar`
* In browser go to localhost:4567


text:
<?php

namespace Guzzle\Service\Command\LocationVisitor\Request;

use Guzzle\Http\Message\RequestInterface;
use Guzzle\Service\Command\CommandInterface;
use Guzzle\Service\Description\Operation;
use Guzzle\Service\Description\Parameter;

/**
 * Location visitor used to serialize XML bodies
 */
class XmlVisitor extends AbstractRequestVisitor
{
    /** @var \SplObjectStorage Data object for persisting XML data */
    protected $data;

    /** @var \XMLWriter XML writer resource */
    protected $writer;

    /** @var bool Content-Type header added when XML is found */
    protected $contentType = 'application/xml';

    public function __construct()
    {
        $this->data = new \SplObjectStorage();
    }

    /**
     * Change the content-type header that is added when XML is found
     *
     * @param string $header Header to set when XML is found
     *
     * @return self
     */
    public function setContentTypeHeader($header)
    {
        $this->contentType = $header;

        return $this;
    }

    public function visit(CommandInterface $command, RequestInterface $request, Parameter $param, $value)
    {
        $xml = isset($this->data[$command])
            ? $this->data[$command]
            : $this->createRootElement($param->getParent());
        $this->addXml($xml, $param, $value);

        $this->data[$command] = $xml;
    }

    public function after(CommandInterface $command, RequestInterface $request)
    {
        $xml = null;

        // If data was found that needs to be serialized, then do so
        if (isset($this->data[$command])) {
            $xml = $this->finishDocument($this->writer);
            unset($this->data[$command]);
        } else {
            // Check if XML should always be sent for the command
            $operation = $command->getOperation();
            if ($operation->getData('xmlAllowEmpty')) {
                $xmlWriter = $this->createRootElement($operation);
                $xml = $this->finishDocument($xmlWriter);
            }
        }

        if ($xml) {
            // Don't overwrite the Content-Type if one is set
            if ($this->contentType && !$request->hasHeader('Content-Type')) {
                $request->setHeader('Content-Type', $this->contentType);
            }
            $request->setBody($xml);
        }
    }

    /**
     * Create the root XML element to use with a request
     *
     * @param Operation $operation Operation object
     *
     * @return \XMLWriter
     */
    protected function createRootElement(Operation $operation)
    {
        static $defaultRoot = array('name' => 'Request');
        // If no root element was specified, then just wrap the XML in 'Request'
        $root = $operation->getData('xmlRoot') ?: $defaultRoot;
        // Allow the XML declaration to be customized with xmlEncoding
        $encoding = $operation->getData('xmlEncoding');

        $xmlWriter = $this->startDocument($encoding);

        $xmlWriter->startElement($root['name']);
        // Create the wrapping element with no namespaces if no namespaces were present
        if (!empty($root['namespaces'])) {
            // Create the wrapping element with an array of one or more namespaces
            foreach ((array) $root['namespaces'] as $prefix => $uri) {
                $nsLabel = 'xmlns';
                if (!is_numeric($prefix)) {
                    $nsLabel .= ':'.$prefix;
                }
                $xmlWriter->writeAttribute($nsLabel, $uri);
            }
        }
        return $xmlWriter;
    }

    /**
     * Recursively build the XML body
     *
     * @param \XMLWriter $xmlWriter XML to modify
     * @param Parameter  $param     API Parameter
     * @param mixed      $value     Value to add
     */
    protected function addXml(\XMLWriter $xmlWriter, Parameter $param, $value)
    {
        if ($value === null) {
            return;
        }

        $value = $param->filter($value);
        $type = $param->getType();
        $name = $param->getWireName();
        $prefix = null;
        $namespace = $param->getData('xmlNamespace');
        if (false !== strpos($name, ':')) {
            list($prefix, $name) = explode(':', $name, 2);
        }

        if ($type == 'object' || $type == 'array') {
            if (!$param->getData('xmlFlattened')) {
                $xmlWriter->startElementNS(null, $name, $namespace);
            }
            if ($param->getType() == 'array') {
                $this->addXmlArray($xmlWriter, $param, $value);
            } elseif ($param->getType() == 'object') {
                $this->addXmlObject($xmlWriter, $param, $value);
            }
            if (!$param->getData('xmlFlattened')) {
                $xmlWriter->endElement();
            }
            return;
        }
        if ($param->getData('xmlAttribute')) {
            $this->writeAttribute($xmlWriter, $prefix, $name, $namespace, $value);
        } else {
            $this->writeElement($xmlWriter, $prefix, $name, $namespace, $value);
        }
    }

    /**
     * Write an attribute with namespace if used
     *
     * @param  \XMLWriter $xmlWriter XMLWriter instance
     * @param  string     $prefix    Namespace prefix if any
     * @param  string     $name      Attribute name
     * @param  string     $namespace The uri of the namespace
     * @param  string     $value     The attribute content
     */
    protected function writeAttribute($xmlWriter, $prefix, $name, $namespace, $value)
    {
        if (empty($namespace)) {
            $xmlWriter->writeAttribute($name, $value);
        } else {
            $xmlWriter->writeAttributeNS($prefix, $name, $namespace, $value);
        }
    }

    /**
     * Write an element with namespace if used
     *
     * @param  \XMLWriter $xmlWriter XML writer resource
     * @param  string     $prefix    Namespace prefix if any
     * @param  string     $name      Element name
     * @param  string     $namespace The uri of the namespace
     * @param  string     $value     The element content
     */
    protected function writeElement(\XMLWriter $xmlWriter, $prefix, $name, $namespace, $value)
    {
        $xmlWriter->startElementNS($prefix, $name, $namespace);
        if (strpbrk($value, '<>&')) {
            $xmlWriter->writeCData($value);
        } else {
            $xmlWriter->writeRaw($value);
        }
        $xmlWriter->endElement();
    }

    /**
     * Create a new xml writer and start a document
     *
     * @param  string $encoding document encoding
     *
     * @return \XMLWriter the writer resource
     */
    protected function startDocument($encoding)
    {
        $this->writer = new \XMLWriter();
        $this->writer->openMemory();
        $this->writer->startDocument('1.0', $encoding);

        return $this->writer;
    }

    /**
     * End the document and return the output
     *
     * @param \XMLWriter $xmlWriter
     *
     * @return \string the writer resource
     */
    protected function finishDocument($xmlWriter)
    {
        $xmlWriter->endDocument();

        return $xmlWriter->outputMemory();
    }

    /**
     * Add an array to the XML
     */
    protected function addXmlArray(\XMLWriter $xmlWriter, Parameter $param, &$value)
    {
        if ($items = $param->getItems()) {
            foreach ($value as $v) {
                $this->addXml($xmlWriter, $items, $v);
            }
        }
    }

    /**
     * Add an object to the XML
     */
    protected function addXmlObject(\XMLWriter $xmlWriter, Parameter $param, &$value)
    {
        $noAttributes = array();
        // add values which have attributes
        foreach ($value as $name => $v) {
            if ($property = $param->getProperty($name)) {
                if ($property->getData('xmlAttribute')) {
                    $this->addXml($xmlWriter, $property, $v);
                } else {
                    $noAttributes[] = array('value' => $v, 'property' => $property);
                }
            }
        }
        // now add values with no attributes
        foreach ($noAttributes as $element) {
            $this->addXml($xmlWriter, $element['property'], $element['value']);
        }
    }
}


text:
layout: interior
title: Rethink Construction Talent and Technology
speaker: Chris Callen
permalink: chris-callen
image: img/20160413/chris_callen.jpg
event: 20160413
video: DJVWmyGZ0sY
favorite: My favorite thing about Wichita is the people. I have been all over the world and these are the most energetic, caring, and passionate people I have ever met.
about: Growing up, Chris Callen wanted little to do with the family construction business. As he grew up, Chris focused his education and career efforts in information technology. Little did he know, but his experiences with his father and mother in the company were leaving an impression on him. A year out of college, and this attraction to construction was fully realized. Joining the family business full-time in 2013, Chris has set out to 'ding the universe' with two key initiatives — the immersive application to technology to construction, and the perception shift to construction being a sought-after profession.
twitter: concretecallen
facebook:
instagram:
linkedin:
website:
email: ccallen@bpc.build
telephone:
---


text:
@implementation IDLTextArea {
    IDLTextView * _placeHolderLabel;
}

- (void)setupFromAttributes:(NSDictionary *)attrs {
    [super setupFromAttributes:attrs];

    //placeholder
    NSString* text = attrs[@"hint"];
    if ([[IDLResourceManager currentResourceManager] isValidIdentifier:text]) {
        NSString *title = [[IDLResourceManager currentResourceManager] stringForIdentifier:text];
        self.placeholder = title;
    } else {
        self.placeholder = text;
    }

    if (_placeHolderLabel == nil )
    {
        _placeHolderLabel = [[IDLTextView alloc] initWithFrame:CGRectMake(0,0,self.bounds.size.width,0)];
        _placeHolderLabel.lineBreakMode = NSLineBreakByWordWrapping;
        _placeHolderLabel.numberOfLines = 0;
        _placeHolderLabel.font = self.font;
        _placeHolderLabel.backgroundColor = [UIColor clearColor];
        _placeHolderLabel.textColor = self.placeholderColor;
        [self addSubview:_placeHolderLabel];
    }

    _placeHolderLabel.text = self.placeholder;
    [_placeHolderLabel sizeToFit];

}

- (void)setText:(NSString *)text {
    [super setText:text];
    [self textChanged:nil];
    [self requestLayout];
}

- (void)setFont:(UIFont *)font {
    [super setFont:font];
    [self requestLayout];
}

- (void)setPlaceholder:(NSString *)placeholder {
    _placeholder = placeholder;
    if (_placeHolderLabel) {
        _placeHolderLabel.text = placeholder;
    }
}

- (void)setFrame:(CGRect)frame {
    [super setFrame:frame];

    if (_placeHolderLabel) {
        CGRect rect = CGRectMake(0, 0, 0, 0);
        rect.size = [_placeHolderLabel sizeThatFits:frame.size];
        _placeHolderLabel.frame = rect;

        IDLLayoutMeasureSpec width = { rect.size.width, IDLLayoutMeasureSpecModeExactly };
        IDLLayoutMeasureSpec height = { rect.size.height, IDLLayoutMeasureSpecModeExactly };
        [_placeHolderLabel measureWithWidthMeasureSpec:width heightMeasureSpec:height];
    }
}

- (void)dealloc
{
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}

- (id)initWithFrame:(CGRect)frame
{
    if( (self = [super initWithFrame:frame]) )
    {
        [self setPlaceholder:@""];
        [self setPlaceholderColor:[UIColor lightGrayColor]];
        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textChanged:) name:UITextViewTextDidChangeNotification object:nil];
    }

    return self;
}

- (void)textChanged:(NSNotification *)notification
{
    if([[self placeholder] length] == 0)
    {
        return;
    }

    _placeHolderLabel.hidden = [self text].length != 0;
}

- (void)drawRect:(CGRect)rect
{

    if( [[self placeholder] length] > 0 )
    {
        [self sendSubviewToBack:_placeHolderLabel];
    }

    if( [[self text] length] == 0 && [[self placeholder] length] > 0 )
    {
        _placeHolderLabel.hidden = NO;
    }

    [super drawRect:rect];
}

- (BOOL) isViewGroup {
    return YES;
}

@end


text:
<ion-view view-title="Donate">
  <ion-content>

              Donate 1

              Donate 2

              Thank you for purchasing {{message}}

  </ion-content>
</ion-view>


text:
<?php

namespace Sh;

use Symfony\Component\Process\Process;

class Command
{
    private $name;
    private $lineCallback;
    private $commandArgument;

    /** @var \Sh\Sh */
    private $sh;

    public function __construct($name, $commandArgument = null)
    {
        $this->name = $name;
        $parser = new Parser($commandArgument);
        $this->commandArgument = $parser->getParsedArguments();
    }

    function __toString()
    {
        $output = null;
        $commandString = $this->getCommandString();

        $process = new Process($commandString);
        $process->setTimeout($this->sh->getTimeout());

        $process->run();

        return trim($process->getOutput());
    }

    public function doCallback()
    {
        $output        = null;
        $process = new Process($this->getCommandString());
        $process->setTimeout($this->sh->getTimeout());
        $process->run(function ($type, $buffer) {
                call_user_func_array($this->lineCallback, array($buffer, $type));
            }
        );

        return;
    }

    public function __call($name, $arguments)
    {
        $comandArgument = isset($arguments[0]) ? $arguments[0] : null;
        $lineCallback = isset($arguments[1]) ? $arguments[1] : null;

        $command = new Command($this->name, $this->getMixedArguments($name, $comandArgument));
        $command->setSh($this->sh);
        $command->setLineCallback($lineCallback);

        return $command;
    }

    private function getMixedArguments($name, $comandArgument)
    {
        $mixedArguments = array($this->commandArgument, $name);
        if (!is_null($comandArgument)) {
            $parser = new Parser($comandArgument);
            $mixedArguments[] = $parser->getParsedArguments();
        }
        return implode(' ',  $mixedArguments);
    }

    public function getString()
    {
        return $this->getCommandString();
    }

    private function getCommandString()
    {
        return is_null($this->commandArgument) ? $this->name : $this->name . ' ' . $this->commandArgument;
    }

    public function setSh(Sh $sh)
    {
        $this->sh = $sh;
    }

    public function setLineCallback($lineCallback)
    {
        $this->lineCallback = $lineCallback;
    }
}


text:
/*
editor_ie.css
===============

This file contains styles to used by all versions of Internet Explorer only.
*/

/* Base it on editor.css, overriding it with styles defined in this file. */
@import url("editor.css");

a.cke_button_disabled,

/* Those two are to overwrite the gradient filter since we cannot have both of them. */
a.cke_button_disabled:hover,
a.cke_button_disabled:focus,
a.cke_button_disabled:active
{
	filter: alpha(opacity = 30);
}

/* PNG Alpha Transparency Fix For IE<9 */
.cke_button_disabled .cke_button_icon
{
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#00ffffff, endColorstr=#00ffffff);
}

.cke_button_off:hover,
.cke_button_off:focus,
.cke_button_off:active
{
	filter: alpha(opacity = 100);
}

.cke_combo_disabled .cke_combo_inlinelabel,
.cke_combo_disabled .cke_combo_open
{
	filter: alpha(opacity = 30);
}

.cke_toolbox_collapser
{
	border: 1px solid #a6a6a6;
}

.cke_toolbox_collapser .cke_arrow
{
	margin-top: 1px;
}

/* Gradient filters must be removed for HC mode to reveal the background. */
.cke_hc .cke_top,
.cke_hc .cke_bottom,
.cke_hc .cke_combo_button,
.cke_hc a.cke_combo_button:hover,
.cke_hc a.cke_combo_button:focus,
.cke_hc .cke_toolgroup,
.cke_hc .cke_button_on,
.cke_hc a.cke_button_off:hover,
.cke_hc a.cke_button_off:focus,
.cke_hc a.cke_button_off:active,
.cke_hc .cke_toolbox_collapser,
.cke_hc .cke_toolbox_collapser:hover,
.cke_hc .cke_panel_grouptitle
{
	filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
}


text:
var app = app || {};

app.AttributeValue = Backbone.Model.extend({});

app.AttributeValueCollection = Backbone.Collection.extend({
  model: app.AttributeValue,
  initialize: function( attrUid, type ) {
    this.attrUid = attrUid;
    // this.fetch({reset:true});
  },
  url: function() {
    return app.baseUrl + '/attribute-values?attr='+this.attrUid+app.bustCache(true);
  },
  parse: function(response) {
    return response.models;
  }
});


text:
<?php
/**
 * Shop System SDK:
 * - Terms of Use can be found under:
 * https://github.com/wirecard/paymentSDK-php/blob/master/_TERMS_OF_USE
 * - License can be found under:
 * https://github.com/wirecard/paymentSDK-php/blob/master/LICENSE
 */

namespace Wirecard\PaymentSdk\Response;

use Wirecard\PaymentSdk\Exception\MalformedResponseException;

/**
 * Class InteractionResponse
 * @package Wirecard\PaymentSdk\Response
 *
 * This object is returned,
 * if the payment process was initialized successfully,
 * and an interaction with the consumer browser is required in order to continue it.
 */
class InteractionResponse extends Response
{
    /**
     * @var string
     */
    private $transactionId;

    /**
     * @var string
     */
    private $redirectUrl;

    /**
     * InteractionResponse constructor.
     * @param \SimpleXmlElement $simpleXml
     * @param string $redirectUrl - Redirect url of the external service provider
     * @throws MalformedResponseException
     */
    public function __construct($simpleXml, $redirectUrl)
    {
        parent::__construct($simpleXml);
        $this->transactionId = $this->findElement('transaction-id');
        $this->redirectUrl = $redirectUrl;
    }

    /**
     * get the unique transaction id for followup operations
     *
     * @return string
     */
    public function getTransactionId()
    {
        return $this->transactionId;
    }

    /**
     * get the redirect url used for external service provider redirects
     *
     * @return string
     */
    public function getRedirectUrl()
    {
        return $this->redirectUrl;
    }
}


text:
namespace XSharp.Assembler.x86.x87
{
    [XSharp.Assembler.OpCode("fcomip")]
    public class FloatCompareAndSetAndPop : InstructionWithDestination
    {
    }
}


text:
Logs mac addresses from wifi probe requests

Logs devices that probe a network. Written to monitor traffic flow by placing nodes at different locations.


text: module.exports = 'this should be a function';


text:
namespace Parallax::Threads
{
    ThreadManager::ThreadManager(U32 nbThread)
        : m_running(true)
    {
        for (U32 i = 0; i < nbThread; ++i)
        {
            this->addNewThread();
        }
    }

    ThreadManager::~ThreadManager()
    {
        if (this->m_running.load())
        {
            this->stop();
        }

        {
            std::lock_guard<std::mutex> guard(this->m_workersMutex);
            m_workers.clear();
        }
    }

    void ThreadManager::addNewThread()
    {
        std::lock_guard<std::mutex> guard(this->m_workersMutex);

        this->m_workers.emplace_back(new Worker);
        this->m_workers.back()->start(this->m_cv, this->m_condvarMutex);
    }

    U32 ThreadManager::roundToNextPower(U32 nbThread) const
    {
        nbThread |= nbThread >>  1;
        nbThread |= nbThread >>  2;
        nbThread |= nbThread >>  4;
        nbThread |= nbThread >>  8;
        nbThread |= nbThread >> 16;
        ++nbThread;

        return nbThread;
    }

    std::shared_ptr<Worker>
    ThreadManager::getWorker()
    {
        U32 maxThreads;
        U32 nbWorkers;

        if (not this->m_running.load())
            return nullptr;

        {
            std::lock_guard<std::mutex> guard(this->m_workersMutex);

            for (auto& worker : this->m_workers)
            {
                if (worker->isIdle() && not worker->isReserved())
                {
                    worker->setReserved(true);
                    return worker;
                }
            }
        }

        {
            std::lock_guard<std::mutex> guard(this->m_workersMutex);

            nbWorkers = this->m_workers.size();
            maxThreads = roundToNextPower(nbWorkers);
        }

        for (unsigned int i = 0; i < maxThreads - nbWorkers; ++i)
        {
            this->addNewThread();
        }

        return this->getWorker();
    }

    void ThreadManager::startTask(std::shared_ptr<Worker> worker, const Task& task)
    {
        worker->setTask(task);
        this->m_cv.notify_all();
    }

    std::pair<bool, std::string>
    ThreadManager::stop()
    {
        std::lock_guard<std::mutex> guard(this->m_workersMutex);

        if (this->m_running.load() == false)
        {
            return std::make_pair(false, "ThreadManager is already stopped");
        }

        this->m_running.store(false);
        for (auto& worker : this->m_workers)
        {
            worker->stop();
        }
        this->m_cv.notify_all();
        return std::make_pair(true, "");
    }
}


text:
goog.setTestOnly();
goog.require('goog.testing.jsunit');
goog.require('hr.db');
goog.require('lf.cache.Journal');
goog.require('lf.proc.GroupByStep');
goog.require('lf.proc.Relation');
goog.require('lf.schema.DataStoreType');
goog.require('lf.structs.set');
goog.require('lf.testing.hrSchema.MockDataGenerator');
goog.require('lf.testing.proc.DummyStep');

/** @type {!hr.db.schema.Employee} */
var e;

/** @type {!hr.db.schema.Job} */
var j;

/** @type {!lf.testing.hrSchema.MockDataGenerator} */
var dataGenerator;

function setUp() {
  var schema = hr.db.getSchema();
  j = schema.getJob();
  e = schema.getEmployee();
  dataGenerator = new lf.testing.hrSchema.MockDataGenerator(schema);
  dataGenerator.generate(20, 100, 0);
  return hr.db.connect({storeType: lf.schema.DataStoreType.MEMORY});
}

/**
 * Tests GroupByStep#exec() method for the case where grouping is performed on a
 * single column.
 * @return {!IThenable}
 */
function testExec_SingleColumn() {
  var inputRelation = lf.proc.Relation.fromRows(
      dataGenerator.sampleEmployees, [e.getName()]);
  var childStep = new lf.testing.proc.DummyStep([inputRelation]);
  var groupByStep = new lf.proc.GroupByStep([e.jobId]);
  groupByStep.addChild(childStep);

  var employeesPerJob = dataGenerator.employeeGroundTruth.employeesPerJob;
  var journal =
      new lf.cache.Journal(hr.db.getGlobal(), lf.structs.set.create());
  return groupByStep.exec(journal).then(function(relations) {
    var jobIds = employeesPerJob.getKeys();
    assertEquals(jobIds.length, relations.length);
    relations.forEach(function(relation) {
      var jobId = /** @type {string} */ (relation.entries[0].getField(e.jobId));
      var expectedRows = employeesPerJob.get(jobId);
      assertEquals(expectedRows.length, relation.entries.length);
      relation.entries.forEach(function(entry) {
        assertEquals(jobId, entry.getField(e.jobId));
      });
    });
  });
}

/**
 * Tests GroupByStep#exec() method for the case where grouping is performed on
 * multiple columns.
 * @return {!IThenable}
 */
function testExec_MultiColumn() {
  var inputRelation = lf.proc.Relation.fromRows(
      dataGenerator.sampleJobs, [j.getName()]);
  var childStep = new lf.testing.proc.DummyStep([inputRelation]);
  var groupByStep = new lf.proc.GroupByStep([j.minSalary, j.maxSalary]);
  groupByStep.addChild(childStep);

  var journal =
      new lf.cache.Journal(hr.db.getGlobal(), lf.structs.set.create());
  return groupByStep.exec(journal).then(function(relations) {
    var jobCount = 0;
    relations.forEach(function(relation) {
      var groupByMinSalary = relation.entries[0].getField(j.minSalary);
      var groupByMaxSalary = relation.entries[0].getField(j.maxSalary);
      relation.entries.forEach(function(entry) {
        assertEquals(groupByMinSalary, entry.getField(j.minSalary));
        assertEquals(groupByMaxSalary, entry.getField(j.maxSalary));
        jobCount++;
      });
    });
    assertEquals(inputRelation.entries.length, jobCount);
  });
}


text:
@class BaseRequest, NSString;

@interface GetConnectInfoRequest : WXPBGeneratedMessage
{
}

+ (void)initialize;

// Remaining properties
@property(retain, nonatomic) BaseRequest *baseRequest; // @dynamic baseRequest;
@property(retain, nonatomic) NSString *url; // @dynamic url;

@end


text:
var express = require('express');
var http = require('http');
var path = require('path');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var config = require('./config')

var app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');

app.use(logger('dev'));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

require('./routes/index')(app, config);

var port = process.env.PORT || 3000 ;
app.set('port', port);

var server = http.createServer(app);
server.listen(port);
server.on('listening', onListening);

function onListening() {
	console.log("app started and listening on port " + " : " + port);
}


text: require("core-js/modules/es6.weak-map");