text:
$(document).ready(function(){

    /**
     * TO FOCUS WHEN CLICK ON BASE HOLDER
     **/
    $(".base-holder").click(function(){
        $(this).find('input[data-tags-handle="tagger"]').focus();
    });

    /**
     * TO MAKE A TAG WHEN PRESS ENTER
     **/
    $('input[data-tags-handle="tagger"]').keyup(function (event) {
        var keyPressed = event.which;
        var tragetedTagger = $(this).parent();
        var taggerValue = $(this).val();
        var taggerSize = $(this).attr('data-tags-size');
        var taggerClass = $(this).attr('data-tags-color');
        var taggerMax = $(this).attr('data-tags-max');
        var taggerSide = $(this).attr('data-tags-side');
        var taggerRemove = $(this).attr('data-tags-remove');
        var taggerWidth = $(this).width();
        if(!taggerSize){
            taggerSize = 'default';
        }
        if(taggerRemove == 'true'){
            var tagRemover = '';
        }
        /**
         * CHECK MAX NUMBER POSITIVE NUMBERS ONLY
         **/
        function isNormalInteger(str) {
            var n = ~~Number(str);
            return String(n) === str && n >= 0;
        }

        taggerValue = taggerValue.split(' ').join('');
        if(taggerMax != 0){
            if(($.isNumeric(taggerMax)) && (isNormalInteger(taggerMax))){
            taggerValue = taggerValue.substr(0, taggerMax);
            }
        }
        var newTag = '
'+taggerValue+' '+tagRemover+'
';
        if((keyPressed == '13') || (keyPressed == '32')){
            if(taggerValue.split(' ').join('') != ''){
            $(this).val('');
                if(taggerSide == 'right'){
                    tragetedTagger.prepend(newTag);
                }else{
                    tragetedTagger.append(newTag);
                }
            }
        }
    });

    /**
     * REMOVE TAGS
     **/
    $(document).on('click','.base-holder i.fa-times',function(){
        $(this).parent().remove();
    });

    /**
     * CHANGE TAGS VALUE IF CHANGE OPTION IS TRUE
     **/
        $(document).on('dblclick','.this-tagger',function(){
            var taggerChange = $(this).parents().eq(2).find('input[data-tags-handle="tagger"]').attr('data-tags-change');
            if(taggerChange == 'true'){
                var tagValue = $(this).attr('data-tag-value');
            var taggerInput = $(this).parent().find('input[data-tags-handle="tagger"]').val(tagValue);
            $(this).remove();
            }
        });

});


text:
<?xml version="1.0" encoding="UTF-8"?>
<adhocDataView exportedWithPermissions="true">
    <folder>/public/audit/reports/archive</folder>
    <name>Repository_Resources_Report_AdhocDataView</name>
    <version>0</version>
    Archived Repository Resources Report Adhoc Data View
    <description>The AdhocDataView for Archived Repository Resources Report report</description>
    <creationDate>2015-05-27T15:05:29.827-07:00</creationDate>
    <updateDate>2012-05-03T16:51:33.620-07:00</updateDate>
    <dataSource>
        <uri>/public/audit/domains/AuditArchiveDomain</uri>
    </dataSource>
    <inputControl>
        <localResource
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            exportedWithPermissions="false" xsi:type="inputControl">
            <folder>/public/audit/reports/archive/Repository_Resources_Report_AdhocDataView_files</folder>
            <name>resource_org_type_1</name>
            <version>0</version>
            Resource Type
            <creationDate>2015-05-27T15:05:29.827-07:00</creationDate>
            <updateDate>2012-05-03T16:51:33.620-07:00</updateDate>
            <type>7</type>
            <mandatory>false</mandatory>
            <readOnly>false</readOnly>
            <visible>true</visible>
            <query>
                <localResource exportedWithPermissions="false" xsi:type="query">
                    <folder>/public/audit/reports/archive/Repository_Resources_Report_AdhocDataView_files/resource_org_type_1_files</folder>
                    <name>resource_org_type_1</name>
                    <version>0</version>
                    Resource Type
                    <creationDate>2015-05-27T15:05:29.827-07:00</creationDate>
                    <updateDate>2012-05-03T16:51:33.620-07:00</updateDate>
                    <language>domain</language>
                    <queryString><?xml version="1.0" encoding="UTF-8"?>
<query xmlns="http://www.jaspersoft.com/2007/SL/XMLSchema">
  <groupList>
    <group columnName="audit_join1.audit_event_group.resource_org_type" />
  </groupList>
  <queryFields>
    <queryField id="audit_join1.audit_event_group.resource_org_type" />
  </queryFields>
</query>

</queryString>
                    <dataSource>
                        <uri>/public/audit/domains/AuditArchiveDomain</uri>
                    </dataSource>
                </localResource>
            </query>
            <queryVisibleColumn>audit_join1.audit_event_group.resource_org_type</queryVisibleColumn>
            <queryValueColumn>audit_join1.audit_event_group.resource_org_type</queryValueColumn>
        </localResource>
    </inputControl>
    <resource>
        <localResource
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            exportedWithPermissions="false"
            dataFile="audit_schema.properties.data" xsi:type="fileResource">
            <folder>/public/audit/reports/archive/Repository_Resources_Report_AdhocDataView_files</folder>
            <name>audit_schema.properties</name>
            <version>0</version>
            bundle
            <description>bundle</description>
            <creationDate>2015-05-27T15:05:29.827-07:00</creationDate>
            <updateDate>2012-05-03T16:51:33.620-07:00</updateDate>
            <fileType>prop</fileType>
        </localResource>
    </resource>
    <resource>
        <localResource
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            exportedWithPermissions="false" dataFile="stateXML.data" xsi:type="fileResource">
            <folder>/public/audit/reports/archive/Repository_Resources_Report_AdhocDataView_files</folder>
            <name>stateXML</name>
            <version>0</version>
            stateXML
            <creationDate>2015-05-27T15:05:29.827-07:00</creationDate>
            <updateDate>2012-05-03T16:51:33.620-07:00</updateDate>
            <fileType>img</fileType>
        </localResource>
    </resource>
    <resource>
        <localResource
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            exportedWithPermissions="false"
            dataFile="mainReportJrxml.data" xsi:type="fileResource">
            <folder>/public/audit/reports/archive/Repository_Resources_Report_AdhocDataView_files</folder>
            <name>mainReportJrxml</name>
            <version>0</version>
            mainReportJrxml
            <creationDate>2015-05-27T15:05:29.827-07:00</creationDate>
            <updateDate>2012-05-03T16:51:33.620-07:00</updateDate>
            <fileType>jrxml</fileType>
        </localResource>
    </resource>
    <resource>
        <localResource
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            exportedWithPermissions="false" dataFile="topicJRXML.data" xsi:type="fileResource">
            <folder>/public/audit/reports/archive/Repository_Resources_Report_AdhocDataView_files</folder>
            <name>topicJRXML</name>
            <version>0</version>
            topicJRXML
            <creationDate>2015-05-27T15:05:29.827-07:00</creationDate>
            <updateDate>2012-05-03T16:51:33.620-07:00</updateDate>
            <fileType>jrxml</fileType>
        </localResource>
    </resource>
    <inputControlRenderingView></inputControlRenderingView>
    <alwaysPromptControls>true</alwaysPromptControls>
    <controlsLayout>1</controlsLayout>
</adhocDataView>

redpajama_set_name: RedPajamaGithub


text:
import java.io.*;
import java.net.*;
import java.util.*;

public class URLConnectionTest2 {
    public static void main(String[] args) throws Exception {
        if (args.length < 1) {
            System.out.println("사용법 : java URLConnectionTest2 <url>");
            System.exit(1);
        }

        URL url = new URL(args[0]);
        URLConnection con = url.openConnection();

        System.out.println("\n### URLConnection 의 기본값");
        System.out.println("URLConnection.getDefaultAllowUserInteraction() : "
                + con.getDefaultAllowUserInteraction());
        System.out.println("URLConnection.getDefaultUseCaches() : "
                + con.getDefaultUseCaches());

        System.out.println("\n### URLConnection 의 최초 접속용 정보");
        System.out.println("con.getRequestProperties() : "
                + con.getRequestProperties());
        System.out.println("con.getAllowUserInteraction() : "
                + con.getAllowUserInteraction());
        System.out.println("con.getDoInput() : " + con.getDoInput());
        System.out.println("con.getDoOutput() : " + con.getDoOutput());
        System.out.println("con.getIfModifiedSince() : "
                + con.getIfModifiedSince());
        System.out.println("con.getUseCaches() : " + con.getUseCaches());

        con.connect();

        System.out.println("\n### URLConnection 자원에 대한 정보[1]");
        System.out.println("con.getContentEncoding() : "
                + con.getContentEncoding());
        System.out
                .println("con.getContentLength() : " + con.getContentLength());
        System.out.println("con.getContentType() : " + con.getContentType());
        System.out.println("con.getDate() : " + con.getDate());
        System.out.println("con.getExpiration() : " + con.getExpiration());
        System.out.println("con.getLastModified() : " + con.getLastModified());
        System.out.println("con.getURL() : " + con.getURL());

        System.out.println("\n### URLConnection 자원에 대한 정보[2]");
        System.out.println("con.getHeaderFields() : " + con.getHeaderFields());

        System.out.println("\n### URLConnection 자원의 내용");
        System.out.println("con.getContent() : " + con.getContent());
        System.out.println("con.getInputStream() : " + con.getInputStream());
    }
}


text:
  ID:

  ASN:

[Post history]
[Offense record]
[File history]

  Reason:

  Board:

  Expiration:

  Applied By:

   Appeal:

<form
  class="denyForm"
  action="/denyAppeal.js"
  method="post"
  enctype="multipart/form-data">
  <input
    type="hidden"
    name="banId"
    class="denyIdentifier">
  <button
    type="submit"
    class="denyFormButton">Deny appeal</button>
</form>

<form
  action="/liftBan.js"
  method="post"
  enctype="multipart/form-data">
  <button
    type="submit"
    class="liftFormButton">Lift</button>
  <input
    type="hidden"
    class="liftIdentifier"
    name="banId">
</form>


text:
const AV = require('../../utils/av-weapp');
var app = getApp();
const u = require('../../utils/util');
// 创建一个页面对象用于控制页面的逻辑
Page({
    data: {
        page: 0,
        limit: 5,
        loading: true,
        hasMore: true,
        recipes: [],
        swiperHeight:0,
        globalData:{
        },
        Id:''
    },

    // 页面加载
    onLoad (params) {
        // wx.showNavigationBarLoading()
        // this.data.title = params.title || this.data.title;
        // this.data.type = params.type || this.data.type;
        // 用传参的方式传入入sort?

        // const {} = params;

        //console.log('onLoad');
        //console.log('a',params.objectId);
      //this.refresh();
    },
    onShow:function(){
        console.log('onShow收藏');
        console.log(app.globalData);
        this.refresh();
    },
    onReady(){
        var that = this;
        wx.getSystemInfo({
            success: function(res) {
                console.log('onReady!!!!',res);
                that.setData({
                    swiperHeight: (res.windowHeight)
                });
            }
        })
    },
    onPullDownRefresh(){
        this.upper();
    },
    refresh(){
        wx.showNavigationBarLoading();
        console.log('refresh');
        //const {sort, term} = this.data;
        // 类型: in_theaters  coming_soon  us_box
        console.log('id',app.globalData.user.objectId);
        console.log(app.globalData);

        AV.Cloud.run('recipeList',
            {sort: 'favorite', term: app.globalData.user.objectId, ex: '', l: this.data.limit, p: this.data.page},
            {remote: true})
            .then(list=> {
                console.log('list!!!!!',list);
                console.log(this.data.limit);
                console.log(this.data.page);
                if(list.length<this.data.limit){
                    this.setData({hasMore: false, loading: false})
                }
                if (list.length) {
                    this.setData({recipes: list, loading: false})
                } else {
                    this.setData({hasMore: false, loading: false})
                }
                //this.data.page++;
                //setTimeout(function(){wx.hideNavigationBarLoading();wx.stopPullDownRefresh();}, 2000);
                wx.hideNavigationBarLoading()

            })
            .catch(e => {
                this.setData({recipes: [], loading: false});
                // console.error(e);
                wx.hideNavigationBarLoading()

            });
    },
    upper(){
        wx.showNavigationBarLoading();
        console.log("收藏upper");
        this.data.page=0;
        this.refresh();
        setTimeout(function(){wx.hideNavigationBarLoading();wx.stopPullDownRefresh();}, 2000);
    },
    touch(e){
        console.log('触摸');
        console.log(e)
        let Id = e.currentTarget.dataset.idfive;

        this.setData({
            Id:Id
        });
    },
    touchend(e){

        this.setData({
            Id:''
        });
    },
    loadMore () {

         //获得当前登录用户
//        const user = AV.User.current();
//// 调用小程序 API,得到用户信息
//        wx.getUserInfo({
//            success: ({userInfo}) => {
//                // 更新当前用户的信息
//                user.set(userInfo).save().then(user => {
//                    // 成功,此时可在控制台中看到更新后的用户信息
//                    this.globalData.user = user.toJSON();
//                }).catch(console.error);
//            }  ,
//            fail:({userInfo})=>{
//                AV.User.loginWithWeapp().then(user => {
//                    console.log('登陆')
//                    this.globalData.user = user.toJSON();
//                }).catch(console.error);
//            }
//        });
        if(this.data.page==0){this.data.page++};
        if (!this.data.hasMore) return;
            AV.Cloud.run('recipeList', {sort: 'favorite', term: app.globalData.user.objectId, ex: '', l: this.data.limit, p: this.data.page}, {remote: true})
            .then(list=> {
                console.log('loadmore',this.data.page);
                let a = this.data.recipes.concat(list);
                a = u.removeDuplicates(a, "objectId");

                if (list.length) {
                    this.setData({recipes: a, loading: false})
                } else {
                    this.setData({hasMore: false, loading: false})
                }
                this.data.page++;
            })
            .catch(e => {
                this.setData({recipes: [], loading: false});
                console.error(e)
            })
    },
    //
    //onPullDownRefreash(){
    //    AV.Cloud.run('recipeList', {sort: 'favorite', term: 'objectId', ex: '', l: this.data.limit, p: this.data.page}, {remote: true})
    //        .then(list=> {
    //            if (list.length) {
    //                this.setData({recipes: list, loading: false})
    //            } else {
    //                this.setData({hasMore: false, loading: false})
    //            }
    //            this.data.page = 0;
    //
    //            wx.hideNavigationBarLoading()
    //
    //        })
    //        .catch(e => {
    //            this.setData({recipes: [], loading: false});
    //            // console.error(e);
    //            wx.hideNavigationBarLoading()
    //
    //        });
    //},
    tapFive(event){
        console.log(event);
        console.log('跳!!!!!!!');
        let Id = event.currentTarget.dataset.idfive;
        let title = event.currentTarget.dataset.titlefive;
        let page =  getCurrentPages();
        let url = '../recipe/recipe?id='+Id+'&title='+title
        console.log(page);
        if(page.length<3){
            wx.navigateTo({
                url:url
                //  //url: '../recipeList/recipeList?sort=keyword&term='+key+'&title='+key
            });
        }else{
            wx.redirectTo({
                url:url
            })
        }

    }
})


text:
package org.zaproxy.zap.view.messagecontainer.http;

import org.parosproxy.paros.network.HttpMessage;
import org.zaproxy.zap.view.messagecontainer.MessageContainer;

/**
 * A {@code MessageContainer} of {@code HttpMessage}s and base interface for containers of {@code
 * HttpMessage}s.
 *
 * @see HttpMessage
 * @see MessageContainer
 * @see SingleHttpMessageContainer
 * @see MultipleHttpMessagesContainer
 * @see MultipleHistoryReferencesContainer
 * @see SelectableHttpMessagesContainer
 * @see SelectableHistoryReferencesContainer
 * @since 2.3.0
 */
public interface HttpMessageContainer extends MessageContainer<HttpMessage> {}


text:
.class public interface abstract Lcom/samsung/android/multiscreen/MultiScreenListener$ScreenChangeListener;
.super Ljava/lang/Object;
.source "MultiScreenListener.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/samsung/android/multiscreen/MultiScreenListener;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x609
    name = "ScreenChangeListener"
.end annotation

# virtual methods
.method public abstract onScreenChanged(Landroid/view/Display;)V
.end method


text:
'use strict';
var jsdom = require('jsdom').jsdom;
var document = jsdom('

');
var window = document.defaultView;
var nodeRXS = require('../src/rxs.js');
var expect = require('chai').expect;

nodeRXS(window);
var rxs = window.rxs;

describe('rxs.set', function() {
  var el = window.document.getElementById('test');
  el.classList.add('rx-style');
  var r = rxs('.rx-style');

  it('should set a single CSS property', function() {
    r.set({
      display: 'inline',
    });
    var style = window.getComputedStyle(el);

    expect(style.display).to.equal('inline');
  });

  it('should accept and handle a number (type) value', function() {
    r.set({
      opacity: 0.92,
    });
    var style = window.getComputedStyle(el);

    expect(style.opacity).to.equal('0.92');
  });

  it('should set multiple CSS properties', function() {
    r.set({
      padding: '10px',
      width: '300px',
    });
    var style = window.getComputedStyle(el);

    expect(style.padding).to.equal('10px');
    expect(style.width).to.equal('300px');
  });

  it('should set single CSS property, without affecting previous properties', function() {
    r.set({
      background: 'transparent',
    });
    var style = window.getComputedStyle(el);

    expect(style.background).to.equal('transparent');
    expect(style.width).to.equal('300px'); // from previous test
  });

  it('should set multiple CSS property, without affecting previous properties', function() {
    r.set({
      marginLeft: '50px',
      position: 'absolute',
    });
    var style = window.getComputedStyle(el);

    expect(style.marginLeft).to.equal('50px');
    expect(style.position).to.equal('absolute');
    expect(style.width).to.equal('300px'); // from previous test
  });

  it('should set an !important CSS property', function() {
    r.set({
      display: 'inline-block !important',
    });

    expect(r.rule.style._importants.display).to.equal('important');
  });

  it('should set all props as !important if second argument is "important"', function() {
    r.set({
      padding: '10px',
    });
    r.set({
      display: 'flex',
      opacity: '0.5',
    }, 'important');

    expect(r.rule.style._importants.display).to.equal('important');
    expect(r.rule.style._importants.opacity).to.equal('important');
    expect(r.rule.style._importants.padding).to.equal('');
  });
});


text:
import pytest
import responses

import json

noop = lambda *args, **kwargs: None

def response_fixture_factory(url, data=None, status=200):
    @pytest.yield_fixture
    def fixture():
        responses.add(
            responses.POST,
            url,
            status=status,
            body=json.dumps(data or {}),
            content_type='application/json',
        )
        responses.start()
        yield responses
        responses.stop()
        responses.reset()
    return fixture


text:
title: Screenshots
menu: Screenshots
screenshots:
  - image: 01-screenshot.jpg
    large_image: 01.jpg
    description: Optimised For Design
    icon: search
  - image: 02-screenshot.jpg
    large_image: 02.jpg
    description: User Centric Design
    icon: search
  - image: 03-screenshot.jpg
    large_image: 03.jpg
    description: Responsive and Adaptive
    icon: search
  - image: 04-screenshot.jpg
    large_image: 04.jpg
    description: Absolutely Free
    icon: search
  - image: 05-screenshot.jpg
    large_image: 05.jpg
    description: Multi-Purpose Design
    icon: search
  - image: 06-screenshot.jpg
    large_image: 06.jpg
    description: Exclusive to Codrops
    icon: search
  - image: 07-screenshot.jpg
    large_image: 07.jpg
    description: Made with Love
    icon: search
  - image: 08-screenshot.jpg
    large_image: 08.jpg
    description: In Sydney, Australia
    icon: search
---

# Packed Full of Powerful Features

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed a lorem quis neque interdum consequat ut sed sem. Duis quis tempor nunc. Interdum et malesuada fames ac ante ipsum primis in faucibus.

See the screenshots!


text:
dtkComposerNodeSpawnEmbedded::dtkComposerNodeSpawnEmbedded(void) : dtkComposerNodeRemote(),  d(new dtkComposerNodeSpawnEmbeddedPrivate)
{
    this->removeReceiver(1);
    this->removeReceiver(0);
    this->removeEmitter(0);

//    this->appendReceiver(&(d->nthreads_receiver));
    this->appendReceiver(&(d->container_emitter));
    this->appendReceiver(&(d->size_emitter));
    this->appendReceiver(&(d->index_emitter));
    this->appendReceiver(&(d->item_emitter));

    this->appendEmitter(&(d->newitem_emitter));

    d->is_parent    = true;
    d->first_run        = true;
    d->rank = -1;
    d->np   = -1;
    d->container      = NULL;
    d->out_container  = NULL;
}

dtkComposerNodeSpawnEmbedded::~dtkComposerNodeSpawnEmbedded(void)
{

    delete d;

    d = NULL;
}

bool dtkComposerNodeSpawnEmbedded::isSlave(void)
{
    return !d->is_parent;
}

void dtkComposerNodeSpawnEmbedded::setApplication(QString app)
{
    d->application = app;
}

void dtkComposerNodeSpawnEmbedded::setComposition(QDomDocument document)
{
    d->composition  = document.toString();
    dtkDebug() << "Spawn embedded: composition is" << d->composition;
    d->current_hash = QCryptographicHash::hash(d->composition.toUtf8(),QCryptographicHash::Md5);
}

void dtkComposerNodeSpawnEmbedded::setParentNode(dtkComposerNodeComposite *parent)
{
    d->parent = parent;
    d->is_parent = false;
}

void dtkComposerNodeSpawnEmbedded::setContainer(QVariant var_container)
{
    d->var_container = var_container;
    d->container = new dtkMetaContainerSequential(var_container.value<dtkMetaContainerSequential>());
}

void dtkComposerNodeSpawnEmbedded::setOutputContainer(QVariant var_container)
{
    d->out_variant = var_container;
    d->out_container = new dtkMetaContainerSequential(var_container.value<dtkMetaContainerSequential>());
}

QVariant dtkComposerNodeSpawnEmbedded::outputContainer(void)
{
   return  d->out_variant;
}

void dtkComposerNodeSpawnEmbedded::setContainerIndex(qlonglong index)
{
    d->index = index;
}

void dtkComposerNodeSpawnEmbedded::begin(void)
{
    // first time execution on the parent thread
    bool first_time = (d->first_run && d->is_parent );
    if (first_time) {
        d->first_run = false;
        // we are running on the controller, for the first time:
        // need to spawn processes
        if (d->nthreads_receiver.isEmpty()) {
            d->np =  QThread::idealThreadCount();
            dtkInfo() << "Set number of spawned processes to" << d->np;
        } else {
            d->np = d->nthreads_receiver.data();
        }
        if (d->container->size() < d->np) {
            d->np = d->container->size();
            dtkInfo() << "Container too small, reduce the number of threads to " << d->np;
        }
        if (d->np < 1) {
            dtkError() << "Empty container in parallel map, skip!" ;
            return;
        }

        d->policy.setNWorkers(d->np);
        this->setCommunicator(dtkDistributed::communicator::instance());
        QMap<QString, QString> options;
        this->communicator()->spawn(d->policy.hosts(), "", options);

        d->p.setCommunicator(this->communicator());
        d->p.setComposition(d->composition);
        d->p.setContainer(d->var_container);
        d->p.setOutputContainer(d->out_variant);
        d->p.setParent(this);
        this->communicator()->exec(&(d->p));
        return;
    } else if (d->is_parent) {
        dtkTrace() << "communicator exists,  no spawn";
    }

    int first_transmitter = 4;

    if (d->is_parent) {

        //TODO: handle not modified in evaluator process
        // if (d->current_hash != d->last_sent_hash){
            // send sub-composition to rank 0 on remote node
        d->p.setComposition(d->composition);
        d->last_sent_hash=d->current_hash;
        // } else {
        //     dtkDebug() << "composition hash hasn't changed, send 'not-modified' to slave";
        //     d->p.setComposition(QString("not-modified"));
        // }

        this->communicator()->exec(&(d->p));
    } else {

        d->internal_comm_emitter.setData(this->communicator());
        d->rank_emitter.setData(this->communicator()->rank());
        // d->nthreads_receiver.setData(this->communicator()->size());
        // running on the slave, receive data and set transmitters
        QList<dtkComposerTransmitter*> parent_receivers = d->parent->receivers();
        QList<dtkComposerTransmitter*> receivers = this->dtkComposerNodeComposite::receivers();
        int max  = parent_receivers.count();
        d->container_emitter.setData(d->var_container);
        d->size_emitter.setData(d->container->size());
        d->index_emitter.setData(d->index);
        d->item_emitter.setData(d->container->at(d->index));
        dtkComposerTransmitterProxyVariant *parent_t = NULL;
        dtkComposerTransmitterProxyVariant *t = NULL;
        if (first_transmitter  >= receivers.count() )
            return;
        for (int i = first_transmitter; i < max ; ++i) {
//            dtkDebug() << "setting transmitter "<< i << "on rank" << this->communicator()->rank() << receivers.count();
            parent_t = reinterpret_cast<dtkComposerTransmitterProxyVariant*>(parent_receivers.at(i));
            t = reinterpret_cast<dtkComposerTransmitterProxyVariant*>(receivers.at(i));

            t->clearData();
            t->enableEmitter();
            t->setVariant(parent_t->variant());

        }
    }
}

void dtkComposerNodeSpawnEmbedded::end(void)
{
    qint16 tag = 0;
    if (d->is_parent) {
        dtkDebug() << "running node spawn end statement on the parent thread";
        //FIXME: should we unspawn ?
    } else {
//        dtkDebug() << "set item" << d->index << d->newitem_emitter.variant()  << "on rank" << this->communicator()->rank() ;
        d->out_container->setAt(d->index, d->newitem_emitter.variant());

        // if (this->communicator()->rank() == 0) {
        //     // running on the slave, send data and set transmitters
        //     dtkDebug() << "running node spawn end statement on rank" << this->communicator()->rank() ;

        //     QList<dtkComposerTransmitter*> parent_emitters = d->parent->emitters();
        //     QList<dtkComposerTransmitter*> emitters = this->dtkComposerNodeComposite::emitters();

        //     int max  = parent_emitters.count();
        //     int first_transmitter = 0;

        //     dtkComposerTransmitterProxyVariant *parent_t = NULL;
        //     dtkComposerTransmitterProxyVariant *t = NULL;
        //     for (int i = first_transmitter; i < max; i++) {
        //         parent_t = reinterpret_cast<dtkComposerTransmitterProxyVariant*>(parent_emitters.at(i));
        //         t = reinterpret_cast<dtkComposerTransmitterProxyVariant*>(emitters.at(i));
        //         parent_t->clearData();
        //         parent_t->enableEmitter();
        //         parent_t->setVariant(t->variant());
        //     }
        // }
    }
}

//
// dtkComposerNodeSpawnEmbedded.cpp ends here


text:
This container wraps the `HeaderBar` component to make it `cmfConnected` and extend its capabilities.

## Usage

`HeaderBar` **container** can be used as `HeaderBar` **component**.
All the `props` provided to the **container** will be forwarded downwards to the **component**.

## Examples

### Load products from backend
Here is an example of how to load remote products from a backend

```
import { HeaderBar } from '@talend/containers';
...

const products = {
	...otherProductsProps,
	url: "/my/backend/endpoint",
};

const props = {
	{ ... myOther props },
	products,
}

<HeaderBar {...props} />
```

Keep in mind that the `brand` prop must be provided (due to internal logic of the `HeaderBar` component).

The backend's response must follow the following format (see **Improvements** section):
```
[
	{
		"icon": "icon-from-ui/icons",
		"url": "http://www.product-url.com",
		"label": "My product name"
	},
	...
]
```

## Improvements
- Allow the alteration of fetched products. This would allow for example data formatting (to make it `HeaderBar` component compliant) or to add static entries.


text:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
  Copyright 2012-2014, Continuuity, Inc.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<configuration>

    <property>
        <name>server.port</name>
        <value>55054</value>
        <description>Specifies the port to bind to</description>
    </property>

    <property>
        <name>server.host</name>
        <value>localhost</value>
        <description>Specifies the host to bind to</description>
    </property>

    <property>
        <name>server.jdbc.driver</name>
        <value>org.apache.derby.jdbc.EmbeddedDriver</value>
        <description>specifies db driver to use</description>
    </property>

    <property>
        <name>server.db.user</name>
        <value>loom</value>
        <description>database user</description>
    </property>

    <property>
        <name>server.jdbc.max.active.connections</name>
        <value>100</value>
        <description>max active connections to the database</description>
    </property>

    <property>
        <name>server.zookeeper.session.timeout.millis</name>
        <value>40000</value>
        <description>zookeeper session timeout in milliseconds</description>
    </property>

    <property>
        <name>server.zookeeper.namespace</name>
        <value>/loom</value>
        <description>namespace in zookeeper for the server</description>
    </property>

    <property>
        <name>server.scheduler.run.interval.seconds</name>
        <value>1</value>
        <description>seconds to sleep between scheduler runs</description>
    </property>

    <property>
        <name>server.solver.num.threads</name>
        <value>20</value>
        <description>number of threads to use to solve cluster layouts</description>
    </property>

    <property>
        <name>server.local.data.dir</name>
        <value>/var/loom/data</value>
        <description>local data directory to use when using embedded derby db and in-process zookeeper</description>
    </property>

    <property>
        <name>server.task.timeout.seconds</name>
        <value>1800</value>
        <description>seconds before a task is timed out</description>
    </property>

    <property>
        <name>server.cluster.cleanup.seconds</name>
        <value>180</value>
        <description>seconds between janitor runs, which delete expired clusters and retry timed out tasks</description>
    </property>

    <property>
        <name>server.netty.exec.num.threads</name>
        <value>50</value>
        <description>number of exec threads to use for the server</description>
    </property>

    <property>
        <name>server.netty.worker.num.threads</name>
        <value>20</value>
        <description>number of worker threads to use for the server</description>
    </property>

    <property>
        <name>server.node.max.log.length</name>
        <value>2048</value>
        <description>max length in bytes of stdout and stderr to capture from provisioners</description>
    </property>

    <property>
        <name>server.node.max.num.actions</name>
        <value>200</value>
        <description>max number of actions to keep in history per node</description>
    </property>

    <property>
        <name>server.max.action.retries</name>
        <value>3</value>
        <description>number of times a task should be retried before counting it as a failure</description>
    </property>

    <property>
        <name>server.max.cluster.size</name>
        <value>10000</value>
        <description>maximum number of nodes allowed for any given cluster</description>
    </property>

    <property>
        <name>server.ids.start.num</name>
        <value>1</value>
        <description>id to start at in the database</description>
    </property>

    <property>
        <name>server.ids.increment.by</name>
        <value>1</value>
        <description>amount to increment ids by in the database</description>
    </property>

    <property>
        <name>server.callback.class</name>
        <value>com.continuuity.loom.scheduler.callback.HttpPostClusterCallback</value>
        <description>class to use to handle cluster callbacks</description>
    </property>

    <property>
        <name>server.credential.store.class</name>
        <value>com.continuuity.loom.store.credential.InProcessCredentialStore</value>
    </property>

    <property>
        <name>server.plugin.store.class</name>
        <value>com.continuuity.loom.store.provisioner.LocalFilePluginStore</value>
        <description>class to use to store plugin resources</description>
    </property>

    <property>
        <name>server.plugin.store.localfilestore.data.dir</name>
        <value>/var/loom/data/plugins/resources</value>
        <description>data directory to store plugin resources when using the local file plugin store</description>
    </property>

    <property>
        <name>server.provisioner.timeout.secs</name>
        <value>120</value>
        <description>seconds to wait for a provisioner heartbeat before moving its workers and deleting it</description>
    </property>

    <property>
        <name>server.provisioner.timeout.check.interval.secs</name>
        <value>60</value>
        <description>seconds between checks for timed out provisioners</description>
    </property>

    <property>
        <name>server.provisioner.request.max.retries</name>
        <value>2</value>
        <description>max number of times to retry a failed request to a provisioner before reassigning its workers
                     and deleting it</description>
    </property>

    <property>
        <name>server.provisioner.request.ms.between.retries</name>
        <value>500</value>
        <description>milliseconds to wait before retrying a failed request to a provisioner</description>
    </property>

    <property>
        <name>server.provisioner.request.socket.timeout.ms</name>
        <value>10000</value>
        <description>socket timeout in milliseconds to use when making requests to provisioners</description>
    </property>

    <property>
        <name>server.metrics.queue.cache.seconds</name>
        <value>10</value>
        <description>Seconds to cache queue metrics in memory before recalculating. Queue metrics require
                     walking through the queue and are therefore expensive to compute.</description>
    </property>
</configuration>


text:
<?xml version="1.0"?>
<project name="Bamboo Tests" default="test">
        <property name="app.dir" value=".." />
        <property name="tests.dir" value="." />
        <property name="reports.dir" value="reports" />
        <includepath classpath="${app.dir}/lib" />
        <includepath classpath="${app.dir}/lib-test" />
        <includepath classpath="${app.dir}/../devel" />
        <taskdef name="setup" classname="BBC.Test.SetupTask" />
        <target name="test" depends="dir_setup">
                <setup />
                <phpunit haltonerror="true" haltonfailure="true" printsummary="true">
                        <batchtest>
                                <fileset dir="${tests.dir}">
                                        <include name="**/*Test.php" />
                                </fileset>
                        </batchtest>
                        <formatter type="plain" usefile="false" />
                        <formatter type="xml" usefile="true" todir="${reports.dir}" outfile="test-results.xml" />
                </phpunit>
                <phpunitreport format="noframes" todir="${reports.dir}/html" infile="${reports.dir}/test-results.xml" />
        </target>
        <target name="coverage" depends="dir_setup">
                <setup />
                <coverage-setup database="${reports.dir}/database">
                        <fileset dir="${app.dir}">
                                <include name="lib/**/*.php" />
                        </fileset>
                </coverage-setup>
                <phpunit codecoverage="true">
                        <batchtest>
                                <fileset dir="${tests.dir}">
                                        <include name="**/*Test.php" />
                                </fileset>
                        </batchtest>
                </phpunit>
                <coverage-report outfile="${reports.dir}/coverage.xml">
                        <report todir="${reports.dir}/coverage" />
                </coverage-report>
        </target>
        <target name="dir_setup">
                <mkdir dir="${reports.dir}" />
                <mkdir dir="${reports.dir}/html" />
                <mkdir dir="${reports.dir}/coverage" />
        </target>
</project>


text:
require './tracer'

class Noop
  include TracerInterface
  def start_span(op_name)
  end

  def inject(span_context, format, carrier)
  end

  def extract(format, carrier)
  end
end


text:
<?php
/**
 * Load composer's autoload
 */

require_once '../../vendor/autoload.php';

const SERVICE_NAME = 'mysql_proxy';
const SERVICE_IP = '127.0.0.1';
const SERVICE_PORT = '8003';

$request_string = $_SERVER['REQUEST_METHOD'].':'.$_SERVER['REQUEST_URI'];

\easyops\easykin\core\Endpoint::init(SERVICE_NAME, SERVICE_IP, SERVICE_PORT);

$traceId = isset($_SERVER['HTTP_X_B3_TRACEID']) ? $_SERVER['HTTP_X_B3_TRACEID'] : null;
$parentSpanId = isset($_SERVER['HTTP_X_B3_PARENTSPANID']) ? $_SERVER['HTTP_X_B3_PARENTSPANID'] : null;
$spanId = isset($_SERVER['HTTP_X_B3_SPANID']) ? $_SERVER['HTTP_X_B3_SPANID'] : null;
$sampled = isset($_SERVER['HTTP_X_B3_SAMPLED']) ? $_SERVER['HTTP_X_B3_SAMPLED'] : null;

$trace = new \easyops\easykin\core\Trace($request_string, $sampled, $traceId, $parentSpanId, $spanId);
$span = $trace->newSpan('select', 'mysql', '127.0.0.1', '3306');
usleep(50000);
$span->receive();

echo "$request_string\n";

$trace->trace(new easyops\easykin\logger\HttpLogger('http://192.168.100.165:9411/api/v1/spans', false));


text:
const router = require('express').Router()
const noAuth = require('./no-auth')
const user = require('./user')

router.use( (req, res, next) => {
  let loggedIn, username
  if (req.session.user) {
    loggedIn = true
    username = req.session.user.username
  }
  res.locals = { loggedIn: loggedIn, username: username || null }
  next()
})

router.use('/', noAuth)
router.use('/', user)

module.exports = router


text:
CREATE TABLE [dbo].[User] (
    [UserId]           INT         IDENTITY (1, 1) NOT NULL,
    [NameIdentifier]   VARCHAR (256)   NOT NULL,
    [IdentityProvider] VARCHAR (128)   NULL,
    [FirstName]        NVARCHAR (64) NULL,
    [MiddleName]       NVARCHAR (64) NULL,
    [LastName]         NVARCHAR (64) NULL,
    [Organization]     NVARCHAR (128) NULL,
    [EmailId]          NVARCHAR (128) NULL,
    [IsActive]         BIT            NOT NULL DEFAULT 1,
    [CreatedOn]        DATETIME       NOT NULL DEFAULT GETUTCDATE(),
    [ModifiedOn]       DATETIME       NOT NULL DEFAULT GETUTCDATE(),
    CONSTRAINT [pk_UserId] PRIMARY KEY CLUSTERED ([UserId] ASC),
    CONSTRAINT [AK_User_NameIdentifier] UNIQUE ([NameIdentifier])
);
GO;
CREATE NONCLUSTERED INDEX [IX_User_NameIdentifier]
    ON [dbo].[User]([NameIdentifier] ASC) WITH (DROP_EXISTING = OFF, IGNORE_DUP_KEY = OFF, STATISTICS_NORECOMPUTE = OFF, ONLINE = OFF, MAXDOP = 0)
GO;

CREATE TRIGGER [dbo].[TRG_User_UpdateModifiedOn]
    ON [dbo].[User]
    AFTER UPDATE
    AS
    BEGIN
        SET NoCount ON;
        UPDATE [dbo].[User]
            SET [ModifiedOn] = GETUTCDATE()
            FROM [dbo].[User] u
            INNER JOIN inserted I on u.UserId = I.UserId
    END
GO;


text:
namespace lldb_private {

class DynamicLoaderWindowsDYLD : public DynamicLoader {
public:
  DynamicLoaderWindowsDYLD(Process *process);

  ~DynamicLoaderWindowsDYLD() override;

  static void Initialize();
  static void Terminate();
  static ConstString GetPluginNameStatic();
  static const char *GetPluginDescriptionStatic();

  static DynamicLoader *CreateInstance(Process *process, bool force);

  void OnLoadModule(lldb::ModuleSP module_sp, const ModuleSpec module_spec,
                    lldb::addr_t module_addr);
  void OnUnloadModule(lldb::addr_t module_addr);

  void DidAttach() override;
  void DidLaunch() override;
  Status CanLoadImage() override;
  lldb::ThreadPlanSP GetStepThroughTrampolinePlan(Thread &thread,
                                                  bool stop) override;

  ConstString GetPluginName() override;
  uint32_t GetPluginVersion() override;

protected:
  lldb::addr_t GetLoadAddress(lldb::ModuleSP executable);

private:
  std::map<lldb::ModuleSP, lldb::addr_t> m_loaded_modules;
};

} // namespace lldb_private

#endif // LLDB_SOURCE_PLUGINS_DYNAMICLOADER_WINDOWS_DYLD_DYNAMICLOADERWINDOWSDYLD_H


text:
@interface OtestQuery : NSObject

+ (void)queryTestBundlePath:(NSString *)testBundlePath;

@end


text: Add-WindowsCapability -online -Name "Rsat.FailoverCluster.Management.Tools~~~~0.0.1.0"


text:
package nu.danielsundberg.droid.gameofkrowns;

public class CommonUtils {

    public static final String CLIENT_ID = "259514315461.apps.googleusercontent.com";

}


text:
package core.framework.template;

import core.framework.internal.template.CDNManager;
import core.framework.internal.template.HTMLTemplate;
import core.framework.internal.template.HTMLTemplateBuilder;
import core.framework.internal.template.TemplateContext;
import core.framework.internal.template.source.ClasspathTemplateSource;
import core.framework.internal.template.source.StringTemplateSource;
import core.framework.internal.template.source.TemplateSource;
import core.framework.util.Maps;
import core.framework.util.StopWatch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Map;

/**
 * @author neo
 */
public final class HTMLTemplateEngine {
    private final Logger logger = LoggerFactory.getLogger(HTMLTemplateEngine.class);
    private final Map<String, HTMLTemplate> templates = Maps.newConcurrentHashMap();
    private final CDNManager cdnManager = new CDNManager();

    public String process(String name, Object model) {
        var watch = new StopWatch();
        try {
            HTMLTemplate template = templates.get(name);
            if (template == null) throw new Error("template not found, name=" + name);
            TemplateContext context = new TemplateContext(model, cdnManager);
            return template.process(context);
        } finally {
            logger.debug("process, name={}, elapsed={}", name, watch.elapsed());
        }
    }

    public void add(String name, String template, Class<?> modelClass) {
        add(new StringTemplateSource(name, template), modelClass);
    }

    public void add(String classpath, Class<?> modelClass) {
        add(new ClasspathTemplateSource(classpath), modelClass);
    }

    private void add(TemplateSource source, Class<?> modelClass) {
        var watch = new StopWatch();
        String name = source.name();
        try {
            HTMLTemplate previous = templates.putIfAbsent(name, new HTMLTemplateBuilder(source, modelClass).build());
            if (previous != null) throw new Error("template is already added, name=" + name);
        } finally {
            logger.info("add, name={}, modelClass={}, elapsed={}", name, modelClass.getCanonicalName(), watch.elapsed());
        }
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Wyatt: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

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

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

Wyatt
    0.0.1

ISensorManager Member List

This is the complete list of members for ISensorManager, including all inherited members.

addSensor(Hardware hardware, ISensor *sensor)=0	ISensorManager	pure virtual

updateSensors(std::list< IMessage *> *messages)=0	ISensorManager	pure virtual

~ISensorManager()	ISensorManager	inlinevirtual

<address class="footer">
Generated by

 1.8.13
</address>


text:
<?php

namespace Kunstmaan\AdminBundle\EventListener;

use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\HttpKernelInterface;

class SessionSecurityListener
{
    /**
     * @var LoggerInterface
     */
    private $logger;

    /**
     * @var bool
     */
    private $ipCheck;

    /**
     * @var bool
     */
    private $userAgentCheck;

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

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

    /**
     * @param bool $ipCheck
     * @param bool $userAgentCheck
     */
    public function __construct($ipCheck, $userAgentCheck, LoggerInterface $logger)
    {
        $this->ipCheck = $ipCheck;
        $this->userAgentCheck = $userAgentCheck;
        $this->logger = $logger;
    }

    public function onKernelResponse(ResponseEvent $event)
    {
        if (HttpKernelInterface::MAIN_REQUEST !== $event->getRequestType()) {
            return;
        }

        // Make sure the ip and user agent is stored in the session
        $request = $event->getRequest();
        if ($request->hasSession() && $request->getSession()->isStarted()) {
            $session = $request->getSession();
            if ($this->ipCheck && !$session->has('kuma_ip')) {
                $session->set('kuma_ip', $this->getIp($request));
            }
            if ($this->userAgentCheck && !$session->has('kuma_ua')) {
                $session->set('kuma_ua', $this->getUserAgent($request));
            }
        }
    }

    public function onKernelRequest(RequestEvent $event)
    {
        if (HttpKernelInterface::MAIN_REQUEST !== $event->getRequestType()) {
            return;
        }

        $request = $event->getRequest();
        if ($request->hasSession() && $request->getSession()->isStarted()) {
            $session = $request->getSession();

            // Check that the ip matches
            if ($this->ipCheck && $session->has('kuma_ip') && $session->get('kuma_ip') != $this->getIp($request)) {
                $this->logger->error(sprintf(
                    "Session ip '%s' does not match with request ip '%s', invalidating the current session",
                    $session->get('kuma_ip'),
                    $this->getIp($request)
                ));
                $this->invalidateSession($session, $request);
            }

            // Check that the user agent matches
            if ($this->userAgentCheck && $session->has('kuma_ua') && $session->get('kuma_ua') != $this->getUserAgent($request)) {
                $this->logger->error(sprintf(
                    "Session user agent '%s' does not match with request user agent '%s', invalidating the current session",
                    $session->get('kuma_ua'),
                    $this->getUserAgent($request)
                ));
                $this->invalidateSession($session, $request);
            }
        }
    }

    private function invalidateSession(SessionInterface $session, Request $request)
    {
        $session->invalidate();
        $session->set('kuma_ip', $this->getIp($request));
        $session->set('kuma_ua', $this->getUserAgent($request));
    }

    private function getIp(Request $request): string
    {
        if (!$this->ip) {
            $forwarded = $request->server->get('HTTP_X_FORWARDED_FOR');
            if (\strlen($forwarded) > 0) {
                $parts = explode(',', $forwarded);
                $parts = array_map('trim', $parts);
                $parts = array_filter($parts);
                if (\count($parts) > 0) {
                    $ip = $parts[0];
                }
            }
            if (empty($ip)) {
                $ip = $request->getClientIp();
            }
            $this->ip = $ip;
        }

        return $this->ip;
    }

    /**
     * @return array|string
     */
    private function getUserAgent(Request $request)
    {
        if (!$this->userAgent) {
            $this->userAgent = $request->headers->get('User-Agent');
        }

        return $this->userAgent;
    }
}


text:
/* This file is included after m68k.h by CPU COFF specific files.  It
   is not a complete target itself.  */

/* Used in m68k.c to include required support code.  */

#define M68K_TARGET_COFF 1

/* Generate sdb debugging information.  */

#define SDB_DEBUGGING_INFO 1

/* COFF symbols don't start with an underscore.  */

#undef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX ""

/* Use a prefix for local labels, just to be on the save side.  */

#undef LOCAL_LABEL_PREFIX
#define LOCAL_LABEL_PREFIX "."

/* Use a register prefix to avoid clashes with external symbols (classic
   example: `extern char PC;' in termcap).  */

#undef REGISTER_PREFIX
#define REGISTER_PREFIX "%"

/* In the machine description we can't use %R, because it will not be seen
   by ASM_FPRINTF.  (Isn't that a design bug?).  */

#undef REGISTER_PREFIX_MD
#define REGISTER_PREFIX_MD "%%"

/* config/m68k.md has an explicit reference to the program counter,
   prefix this by the register prefix.  */

#define ASM_RETURN_CASE_JUMP                                \
  do {                                                        \
    if (TARGET_COLDFIRE)                                \
      {                                                        \
        if (ADDRESS_REG_P (operands[0]))                \
          return "jmp %%pc@(2,%0:l)";                        \
        else                                                \
          return "ext%.l %0\n\tjmp %%pc@(2,%0:l)";        \
      }                                                        \
    else                                                \
      return "jmp %%pc@(2,%0:w)";                        \
  } while (0)

#define TARGET_ASM_FILE_START_FILE_DIRECTIVE true

/* If defined, a C expression whose value is a string containing the
   assembler operation to identify the following data as uninitialized global
   data.  */

#define BSS_SECTION_ASM_OP        "\t.section\t.bss"

/* A C statement (sans semicolon) to output to the stdio stream
   FILE the assembler definition of uninitialized global DECL named
   NAME whose size is SIZE bytes and alignment is ALIGN bytes.
   Try to use asm_output_aligned_bss to implement this macro.  */

#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
  asm_output_aligned_bss ((FILE), (DECL), (NAME), (SIZE), (ALIGN))

/* Switch into a generic section.  */
#undef TARGET_ASM_NAMED_SECTION
#define TARGET_ASM_NAMED_SECTION  m68k_coff_asm_named_section

/* Don't assume anything about startfiles.  */

#undef STARTFILE_SPEC
#define STARTFILE_SPEC ""


text:
A project based learning activity for people who are getting started with Git and GitHub.

You can play the game at: http://jadunn1.github.io/github-games/

Here is how you play the game:
1. Press the space bar to get started.
2. Press the up arrow to rotate the shape.
3. The goal is to create complete rows with no empty spaces.
4. Don't let the pieces stack up too high!

>> _*SUPPORTED BROWSERS*: Chrome, Firefox, Safari, Opera and IE9+_
* To start the game, press the spacebar.
* Use the left and right arrow keys to move the pieces to the desired place.
* Tap the up arrow to rotate the piece.
* To drop the piece, press and hold the down arrow.

This fun open source game was cloned from: https://github.com/jakesgordon/javascript-tetris


text:
@implementation TSSTPage (CoreDataProperties)

+ (NSFetchRequest<TSSTPage *> *)fetchRequest {
	return [[NSFetchRequest alloc] initWithEntityName:@"Image"];
}

@dynamic aspectRatio;
@dynamic height;
@dynamic imagePath;
@dynamic index;
@dynamic text;
@dynamic thumbnailData;
@dynamic width;
@dynamic group;
@dynamic session;

@end


text:
'use strict';

var assert = require('assert');
const lambdaPromiseHandler = require('../');

describe('Lambda Promise-handler', function() {
  describe('Setup', function() {
    it('should return a new function configured with default callbacks when executed with empty options', function() {
      const connector = lambdaPromiseHandler();
      assert.equal(connector.name, 'lambdaPromiseHandlerInit');
    });
    it('should return a new function, configured with custom callbacks', function () {
      const connector = lambdaPromiseHandler({});
      assert.equal(connector.name, 'lambdaPromiseHandlerInit');
    });
  });
  describe('Execution', function() {
    it('should execute a promise and call-back with the result', function(done) {
      const connector = lambdaPromiseHandler();
      const fn = connector(() => {
        return new Promise((resolve) => {
          resolve({ a: 1 });
        });
      });
      fn({}, {}, (err, response) => {
        assert.equal(response.a, 1);
        done();
      });
    });
    it('should execute in order (series)', function(done) {
      const connector = lambdaPromiseHandler();
      const fns = connector((req, res, payload) => {
        return new Promise((resolve) => {
          payload.a = 1;
          resolve();
        });
      }, (req, res, payload) => {
        return new Promise((resolve) => {
          assert.equal(payload.a, 1);
          payload.a += 1;
          resolve();
        });
      }, (req, res, payload) => {
        return new Promise((resolve) => {
          payload.a = payload.a * 100;
          assert.equal(payload.a, 200);
          resolve(payload);
        })
      });

      fns({}, {}, (err, response) => {
        assert.equal(response.a, 200);
        done();
      });
    });
    it('could have a custom successHandler which gets called with the response, before responding the request', function(done) {
      let count = 0;
      const connector = lambdaPromiseHandler({
        success(results) {
          count += 1;
          return results;
        },
      });

      const fns = connector(() => {
        return 'asd';
      });
      fns({}, {}, (err, response) => {
        assert.equal(count, 1);
        done();
      });
    });
    it('could have a custom getResponse method which transforms the default response', function(done) {
      let count = 0;
      const connector = lambdaPromiseHandler({
        success(results) {
          count += 1;
          return results;
        },
      });

      const fns = connector(() => {
        return 'asd';
      });
      fns({}, {}, (err, response) => {
        assert.equal(count, 1);
        done();
      });
    });
    it('could have a custom before promise', function(done) {
      let status = 'offline';
      const connector = lambdaPromiseHandler({
        before() {
          status = 'online';
        }
      });

      const fns = connector();
      fns({}, {}, () => {
        assert.equal(status, 'online');
        done();
      });
    });
    it('could have a custom after promise', function(done) {
      let status = 'offline';
      const connector = lambdaPromiseHandler({
        after() {
          status = 'online';
        }
      });

      const fns = connector();
      fns({}, {}, () => {
        assert.equal(status, 'online');
        done();
      });
    });
  });
  describe('Errors', function() {
    it('catches a throwing promise with a default error code', function(done) {
      const expectedError = 'Error #1';
      const connector = lambdaPromiseHandler();
      const fns = connector((req, res) => {
        return new Promise((resolve, reject) => {
          reject(new Error(expectedError));
        });
      });

      fns({}, {}, (err, response) => {
        assert.equal(err.message, `[500] ${expectedError}`);
        done();
      });
    });
    it('could have a custom successHandler which fails and still returns an error', function(done) {
      const connector = lambdaPromiseHandler({
        success() {
          throw new Error('Error #2');
        },
      });

      const fns = connector(() => {
        return 'asd';
      });
      fns({}, {}, (err, response) => {
        assert.equal(err.message, '[500] Error #2');
        done();
      });
    });
    it('catches a promise error with a custom error code', function(done) {
      const expectedError = '[404] Error #3';
      const connector = lambdaPromiseHandler({
        after() {

        },
      });
      const fns = connector((req, res) => {
        return new Promise((resolve, reject) => {
          reject(new Error(expectedError));
        });
      });

      fns({}, {}, (err, response) => {
        assert.equal(err.message, expectedError);
        done();
      });
    });
    it('could have a custom errorHandler', function(done) {
      let count = 0;
      const connector = lambdaPromiseHandler({
        error(err) {
          count += 1;
          return err;
        }
      });
      const fns = connector((req, res) => {
        return new Promise((resolve, reject) => {
          reject(new Error('blu'));
        });
      });

      fns({}, {}, (err, response) => {
        assert.equal(count, 1);
        done();
      });
    });
  });
});


text:
package com.vaadin.data.provider;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import com.vaadin.shared.data.sort.SortDirection;

/**
 * Base class for helper classes with fluent API for constructing sort order
 * lists. When the sort order is ready to be passed on, calling {@link #build()}
 * will create the list of sort orders.
 *
 * @param <T>
 *            the sort order type
 * @param <V>
 *            the sorting type
 *
 * @see SortOrderBuilder#thenAsc(Object)
 * @see SortOrderBuilder#thenDesc(Object)
 * @see #build()
 */
public abstract class SortOrderBuilder<T extends SortOrder<V>, V>
        implements Serializable {

    private final List<T> sortOrders = new ArrayList<>();

    /**
     * Appends sorting with ascending sort direction.
     *
     * @param by
     *            the object to sort by
     * @return this sort builder
     */
    public SortOrderBuilder<T, V> thenAsc(V by) {
        return append(createSortOrder(by, SortDirection.ASCENDING));
    }

    /**
     * Appends sorting with descending sort direction.
     *
     * @param by
     *            the object to sort by
     * @return this sort builder
     */
    public SortOrderBuilder<T, V> thenDesc(V by) {
        return append(createSortOrder(by, SortDirection.DESCENDING));
    }

    /**
     * Returns an unmodifiable copy of the list of current sort orders in this
     * sort builder.
     *
     * @return an unmodifiable sort order list
     */
    public final List<T> build() {
        return Collections.unmodifiableList(new ArrayList<>(sortOrders));
    }

    /**
     * Creates a sort order object with the given parameters.
     *
     * @param by
     *            the object to sort by
     * @param direction
     *            the sort direction
     *
     * @return the sort order object
     */
    protected abstract T createSortOrder(V by, SortDirection direction);

    /**
     * Append a sort order to {@code sortOrders}.
     *
     * @param sortOrder
     *            the sort order to append
     * @return this
     */
    private final SortOrderBuilder<T, V> append(T sortOrder) {
        sortOrders.add(sortOrder);
        return this;
    }
}


text:
angular.module('testResultService', [])

.factory('TestResults', function($http) {

	// create a new object
	var testResultsFactory = {};

	// get a single test result
	testResultsFactory.get = function(id) {
		return $http.get('/api/test-results/' + id);
	};

	// get all test results
	testResultsFactory.all = function() {
		return $http.get('/api/test-results/');
	};

	// create a test result
	testResultsFactory.create = function(qData) {
		return $http.post('/api/test-results/', qData);
	};

	// update a test result
	testResultsFactory.update = function(id, qData) {
		return $http.put('/api/test-results/' + id, qData);
	};

	// delete a test result
	testResultsFactory.delete = function(id) {
		return $http.delete('/api/test-results/' + id);
	};

	// get a single test result (latest) for a specific user
	testResultsFactory.latest = function(user_id) {
		return $http({
			url: '/api/test-results/',
			method: 'GET',
			params: { user_id: user_id }
		});
	};

	// return our entire testResultsFactory object
	return testResultsFactory;

});


text:
import unittest

import logging
import sys

from melody.constraints.equal_pitch_constraint import EqualPitchConstraint
from melody.constraints.not_equal_pitch_constraint import NotEqualPitchConstraint
from melody.constraints.relative_scalar_step_constraint import RelativeScalarStepConstraint
from melody.structure.motif import Motif
from melody.structure.form import Form
from structure.line import Line
from structure.beam import Beam
from structure.note import Note
from structure.tuplet import Tuplet
from timemodel.offset import Offset
from tonalmodel.diatonic_pitch import DiatonicPitch

from timemodel.duration import Duration

class TestForm(unittest.TestCase):
    logging.basicConfig(stream=sys.stdout, level=logging.DEBUG)

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def test_simple_form(self):
        line = Line()
        s = Beam()
        s.append(Note(DiatonicPitch.parse('C:4'), Duration(1, 8)))
        s.append(Note(DiatonicPitch.parse('D:4'), Duration(1, 8)))
        s.append(Note(DiatonicPitch.parse('E:4'), Duration(1, 8)))
        s.append(Note(DiatonicPitch.parse('F#:4'), Duration(1, 8)))
        line.pin(s)
        notes = s.get_all_notes()

        c = [
            EqualPitchConstraint([notes[0], notes[2]]),
            NotEqualPitchConstraint([notes[1], notes[3]])
        ]

        a = Motif(s, c, 'A')

        s1 = [
           Note(DiatonicPitch(4, 'c'), Duration(1, 8)),
           Note(DiatonicPitch(4, 'd'), Duration(1, 8)),
           Note(DiatonicPitch(4, 'e'), Duration(1, 8)),
        ]
        tuplet = Tuplet(Duration(1, 8), 2, s1)
        line.pin(tuplet, Offset(1, 2))
        notes = tuplet.get_all_notes()

        c1 = [
            EqualPitchConstraint([notes[0], notes[2]]),
            RelativeScalarStepConstraint(notes[1], notes[2], -2, 2)
        ]

        b = Motif(tuplet, c1, 'B')

        f = Form([a, b])
        print(f)

        constraints = [
            EqualPitchConstraint([a.actors[0], b.actors[1]])
        ]

        # Ensure a, b cloned for reliability - see comment in Form.
        ff = Form([a, b], constraints)
        print(ff)

        constr = ff.external_constraints
        assert len(constr) == 1

        actors = ff.actors
        assert len(actors) == 7

        assert isinstance(constr[0], EqualPitchConstraint)
        assert constr[0].actors[0] == actors[0]
        assert constr[0].actors[1] == actors[4 + 1]

        all_constr = ff.constraints
        assert len(all_constr) == 5

        # Add more notes to clone ff as:
        s3 = Beam()
        first_note = Note(DiatonicPitch.parse('C:5'), Duration(1, 8))
        s3.append(first_note)
        s3.append(Note(DiatonicPitch.parse('D:5'), Duration(1, 8)))
        s3.append(Note(DiatonicPitch.parse('E:5'), Duration(1, 8)))
        s3.append(Note(DiatonicPitch.parse('F#:5'), Duration(1, 8)))
        line.pin(s3, Offset(3))

        s2 = [
           Note(DiatonicPitch(5, 'c'), Duration(1, 8)),
           Note(DiatonicPitch(5, 'd'), Duration(1, 8)),
           Note(DiatonicPitch(5, 'e'), Duration(1, 8)),
        ]
        tuplet1 = Tuplet(Duration(1, 8), 2, s2)
        line.pin(tuplet1, Offset(7, 2))

        fff = ff.copy_to(first_note)
        assert fff is not None
        print(fff)

        constr = fff.external_constraints
        assert len(constr) == 1
        assert len(fff.constraints) == 5

        actors = fff.actors
        assert len(actors) == 7

        assert isinstance(constr[0], EqualPitchConstraint)
        assert constr[0].actors[0] == actors[0]
        assert constr[0].actors[1] == actors[4 + 1]

        all_constr = fff.constraints
        assert len(all_constr) == 5


text:
<!DOCTYPE html>

    <title>
    Units of Measurement
        - Social Media Week 2015
    </title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="keilw">
    <meta name="description" content="Static blog generated with JBake">

    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.css">
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css">
    <link rel="stylesheet" href="/css/base.css">

    <link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon">
    <link rel="icon" href="/img/favicon.ico" type="image/x-icon">

          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
            Toggle navigation

          </button>
          Units of Measurement

About

Calendar

                  Links

JSR 385

Specification

API

JavaDoc (API)

Reference Implementation

TCK (Technical Compatibility Kit)

Detail Page

Units Demos

Guide Book

References

Extensions

Units Libraries

SI Units

Unit Systems

 Archive

 Feed

Social Media Week 2015

iot

ioe

java

m2m

social

smw

qs

health

wearable

hitchbot

             28 February 2015
             keilw

For the 2nd time I was invited to speak at Social Media Week Copenhagen. This time with some live demos it evolved around Quantified Self and how you can share your workouts and other information on social channels.Quantified Self and the Social Internet of Things

  Social Media Week 2015 - Quantified Self and the Social Internet of Things  by Werner Keil

Followed by the 4th consecutive time talking at Social Media Week Hamburg. The same presentation in German

Quantified Social und das Internet der Dinge

  Quantified Social und das Internet der Dinge  by Werner Keil

Later that day I also met hitchBOT.

A wide range of sensors and a brain controlled by Android (so it's also at least somewhat related to Java ;-)

© Units of Measurement project 2022 | Mixed with Bootstrap v3.1.1 | Baked with JBake v2.6.5 |

             top


text:
@interface XLFormSelectorCell() <UIActionSheetDelegate, UIPickerViewDelegate, UIPickerViewDataSource, UIPopoverControllerDelegate>

@property (nonatomic) UIPickerView * pickerView;
@property (nonatomic) UIPopoverController *popoverController;

@end

@implementation XLFormSelectorCell

-(NSString *)valueDisplayText
{
    if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeMultipleSelector] || [self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeMultipleSelectorPopover]){
        if (!self.rowDescriptor.value || [self.rowDescriptor.value count] == 0){
            return self.rowDescriptor.noValueDisplayText;
        }
        if (self.rowDescriptor.valueTransformer){
            NSAssert([self.rowDescriptor.valueTransformer isSubclassOfClass:[NSValueTransformer class]], @"valueTransformer is not a subclass of NSValueTransformer");
            NSValueTransformer * valueTransformer = [self.rowDescriptor.valueTransformer new];
            NSString * tranformedValue = [valueTransformer transformedValue:self.rowDescriptor.value];
            if (tranformedValue){
                return tranformedValue;
            }
        }
        NSMutableArray * descriptionArray = [NSMutableArray arrayWithCapacity:[self.rowDescriptor.value count]];
        for (id option in self.rowDescriptor.selectorOptions) {
            NSArray * selectedValues = self.rowDescriptor.value;
            if ([selectedValues formIndexForItem:option] != NSNotFound){
                if (self.rowDescriptor.valueTransformer){
                    NSAssert([self.rowDescriptor.valueTransformer isSubclassOfClass:[NSValueTransformer class]], @"valueTransformer is not a subclass of NSValueTransformer");
                    NSValueTransformer * valueTransformer = [self.rowDescriptor.valueTransformer new];
                    NSString * tranformedValue = [valueTransformer transformedValue:option];
                    if (tranformedValue){
                        [descriptionArray addObject:tranformedValue];
                    }
                }
                else{
                    [descriptionArray addObject:[option displayText]];
                }

            }
        }
        return [descriptionArray componentsJoinedByString:@", "];
    }
    if (!self.rowDescriptor.value){
        return self.rowDescriptor.noValueDisplayText;
    }
    if (self.rowDescriptor.valueTransformer){
        NSAssert([self.rowDescriptor.valueTransformer isSubclassOfClass:[NSValueTransformer class]], @"valueTransformer is not a subclass of NSValueTransformer");
        NSValueTransformer * valueTransformer = [self.rowDescriptor.valueTransformer new];
        NSString * tranformedValue = [valueTransformer transformedValue:self.rowDescriptor.value];
        if (tranformedValue){
            return tranformedValue;
        }
    }
    return [self.rowDescriptor.value displayText];
}

-(UIView *)inputView
{
    if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorPickerView]){
        return self.pickerView;
    }
    return [super inputView];
}

- (BOOL)canBecomeFirstResponder
{
    if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorPickerView]){
        return YES;
    }
    return [super canBecomeFirstResponder];
}

#pragma mark - Properties

-(UIPickerView *)pickerView
{
    if (_pickerView) return _pickerView;
    _pickerView = [[UIPickerView alloc] init];
    _pickerView.delegate = self;
    _pickerView.dataSource = self;
    [_pickerView selectRow:[self selectedIndex] inComponent:0 animated:NO];
    return _pickerView;
}

#pragma mark - XLFormDescriptorCell

-(void)configure
{
    [super configure];
}

-(void)update
{
    [super update];
    self.accessoryType = self.rowDescriptor.disabled || !([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorPush] || [self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeMultipleSelector]) ? UITableViewCellAccessoryNone : UITableViewCellAccessoryDisclosureIndicator;
    [self.textLabel setText:self.rowDescriptor.title];
    self.textLabel.textColor  = self.rowDescriptor.disabled ? [UIColor grayColor] : [UIColor blackColor];
    self.selectionStyle = self.rowDescriptor.disabled || [self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeInfo] ? UITableViewCellSelectionStyleNone : UITableViewCellSelectionStyleDefault;
    self.textLabel.text = [NSString stringWithFormat:@"%@%@", self.rowDescriptor.title, self.rowDescriptor.required ? @"*" : @""];
    self.detailTextLabel.text = [self valueDisplayText];
    self.textLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
    self.detailTextLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];

}

-(void)formDescriptorCellDidSelectedWithFormController:(XLFormViewController *)controller
{

    if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorPush] || [self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorPopover]){
        if (self.rowDescriptor.selectorOptions){
            XLFormOptionsViewController * optionsViewController = [[XLFormOptionsViewController alloc] initWithOptions:self.rowDescriptor.selectorOptions style:UITableViewStyleGrouped titleHeaderSection:nil titleFooterSection:nil];
            optionsViewController.rowDescriptor = self.rowDescriptor;
            optionsViewController.title = self.rowDescriptor.selectorTitle;

			if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorPopover]) {
				self.popoverController = [[UIPopoverController alloc] initWithContentViewController:optionsViewController];
                self.popoverController.delegate = self;
                optionsViewController.popoverController = self.popoverController;
                if (self.detailTextLabel.window){
                    [self.popoverController presentPopoverFromRect:CGRectMake(0, 0, self.detailTextLabel.frame.size.width, self.detailTextLabel.frame.size.height) inView:self.detailTextLabel permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
                }
                else{
                    [self.popoverController presentPopoverFromRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height) inView:self permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
                }
                [controller.tableView deselectRowAtIndexPath:[controller.tableView indexPathForCell:self] animated:YES];
			} else {
				[controller.navigationController pushViewController:optionsViewController animated:YES];
			}
        }
        else{
            Class selectorClass = self.rowDescriptor.selectorControllerClass;
            UIViewController<XLFormRowDescriptorViewController> *selectorViewController = [[selectorClass alloc] init];
            if ([selectorViewController conformsToProtocol:@protocol(XLFormRowDescriptorViewController)]){
                selectorViewController.rowDescriptor = self.rowDescriptor;
            }

            NSMutableDictionary *selectorControllerConfig = self.rowDescriptor.selectorControllerConfig;
            if (selectorControllerConfig) {
                [selectorControllerConfig enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
                    [selectorViewController setValue:obj forKey:key];
                }];
            }

            selectorViewController.title = self.rowDescriptor.selectorTitle;

            if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorPopover]) {
                if (self.popoverController && self.popoverController.popoverVisible) {
                    [self.popoverController dismissPopoverAnimated:NO];
                }

                UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:selectorViewController];
                self.popoverController = [[UIPopoverController alloc] initWithContentViewController:navigationController];
                self.popoverController.delegate = self;
                if ([selectorViewController conformsToProtocol:@protocol(XLFormRowDescriptorPopoverViewController)]){
                    ((id<XLFormRowDescriptorPopoverViewController>)selectorViewController).popoverController = self.popoverController;
                }
                if (self.detailTextLabel.window){
                    [self.popoverController presentPopoverFromRect:CGRectMake(0, 0, self.detailTextLabel.frame.size.width, self.detailTextLabel.frame.size.height) inView:self.detailTextLabel permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
                }
                else{
                    [self.popoverController presentPopoverFromRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height) inView:self permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
                }
                [controller.tableView deselectRowAtIndexPath:[controller.tableView indexPathForCell:self] animated:YES];
            }
            else {
                [controller.navigationController pushViewController:selectorViewController animated:YES];
            }
        }
    }
    else if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeMultipleSelector] || [self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeMultipleSelectorPopover])
    {
        NSAssert(self.rowDescriptor.selectorOptions, @"selectorOptions property shopuld not be nil");
        XLFormOptionsViewController * optionsViewController = [[XLFormOptionsViewController alloc] initWithOptions:self.rowDescriptor.selectorOptions style:UITableViewStyleGrouped titleHeaderSection:nil titleFooterSection:nil];
        optionsViewController.rowDescriptor = self.rowDescriptor;
        optionsViewController.title = self.rowDescriptor.selectorTitle;

        if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeMultipleSelectorPopover]) {
            self.popoverController = [[UIPopoverController alloc] initWithContentViewController:optionsViewController];
            self.popoverController.delegate = self;
            optionsViewController.popoverController = self.popoverController;
            if (self.detailTextLabel.window){
                [self.popoverController presentPopoverFromRect:CGRectMake(0, 0, self.detailTextLabel.frame.size.width, self.detailTextLabel.frame.size.height) inView:self.detailTextLabel permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
            }
            else{
                [self.popoverController presentPopoverFromRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height) inView:self permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
            }
            [controller.tableView deselectRowAtIndexPath:[controller.tableView indexPathForCell:self] animated:YES];
        } else {
            [controller.navigationController pushViewController:optionsViewController animated:YES];
        }
    }
    else if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorActionSheet]){
        UIActionSheet * actionSheet = [[UIActionSheet alloc] initWithTitle:self.rowDescriptor.selectorTitle delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil];
        actionSheet.tag = [self.rowDescriptor hash];
        for (id option in self.rowDescriptor.selectorOptions) {
            [actionSheet addButtonWithTitle:[option displayText]];
        }
        actionSheet.cancelButtonIndex = [actionSheet addButtonWithTitle:NSLocalizedString(@"Cancel", nil)];
        [actionSheet showInView:controller.view];
        [controller.tableView deselectRowAtIndexPath:[controller.form indexPathOfFormRow:self.rowDescriptor] animated:YES];
    }
    else if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorAlertView]){
        UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:self.rowDescriptor.selectorTitle message:nil delegate:self cancelButtonTitle:nil otherButtonTitles:nil];
        alertView.tag = [self.rowDescriptor hash];
        for (id option in self.rowDescriptor.selectorOptions) {
            [alertView addButtonWithTitle:[option displayText]];
        }
        alertView.cancelButtonIndex = [alertView addButtonWithTitle:NSLocalizedString(@"Cancel", nil)];
        [alertView show];
        [controller.tableView deselectRowAtIndexPath:[controller.form indexPathOfFormRow:self.rowDescriptor] animated:YES];
    }
    else if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorPickerView]){
        [self becomeFirstResponder];
        [controller.tableView selectRowAtIndexPath:nil animated:YES scrollPosition:UITableViewScrollPositionNone];
    }
}

-(NSError *)formDescriptorCellLocalValidation
{
    if (self.rowDescriptor.required && self.rowDescriptor.value == nil){
        return [[NSError alloc] initWithDomain:XLFormErrorDomain code:XLFormErrorCodeRequired userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedString(@"%@ can't be empty", nil), self.rowDescriptor.title] }];

    }
    return nil;
}

#pragma mark - UIActionSheetDelegate

- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
    if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorActionSheet]){
        if ([actionSheet cancelButtonIndex] != buttonIndex){
            NSString * title = [actionSheet buttonTitleAtIndex:buttonIndex];
            for (id option in self.rowDescriptor.selectorOptions){
                if ([[option displayText] isEqualToString:title]){
                    [self.rowDescriptor setValue:option];
                    [self.formViewController.tableView reloadData];
                    break;
                }
            }
        }
    }
}

#pragma mark - UIAlertViewDelegate

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
    if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorAlertView]){
        if ([alertView cancelButtonIndex] != buttonIndex){
            NSString * title = [alertView buttonTitleAtIndex:buttonIndex];
            for (id option in self.rowDescriptor.selectorOptions){
                if ([[option displayText] isEqualToString:title]){
                    [self.rowDescriptor setValue:option];
                    [self.formViewController.tableView reloadData];
                    break;
                }
            }
        }
    }
}

#pragma mark - UIPickerViewDelegate

- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
{
    return [[self.rowDescriptor.selectorOptions objectAtIndex:row] displayText];
}

- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
    if ([self.rowDescriptor.rowType isEqualToString:XLFormRowDescriptorTypeSelectorPickerView]){
        self.rowDescriptor.value = [self.rowDescriptor.selectorOptions objectAtIndex:row];
        self.detailTextLabel.text = [self valueDisplayText];
        [self setNeedsLayout];
    }
}

#pragma mark - UIPickerViewDataSource

- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView
{
    return 1;
}

- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
{
    return self.rowDescriptor.selectorOptions.count;
}

#pragma mark - helpers

-(NSInteger)selectedIndex
{
    if (self.rowDescriptor.value){
        for (id option in self.rowDescriptor.selectorOptions){
            if ([[option valueData] isEqual:[self.rowDescriptor.value valueData]]){
                return [self.rowDescriptor.selectorOptions indexOfObject:option];
            }
        }
    }
    return -1;
}

#pragma mark - UIPopoverControllerDelegate

- (void)popoverControllerDidDismissPopover:(UIPopoverController *)popoverController
{
    [self.formViewController.tableView reloadData];
}

@end


text:
namespace ui {
class Accelerator;
}  // namespace ui

namespace extensions {

// Ozone-specific implementation of the GlobalShortcutListener interface.
//
// Connects Aura with the platform implementation, and manages data conversions
// required on the way: Aura operates with ui::Accelerator while the platform is
// only aware of the basic components such as the key code and modifiers.
class GlobalShortcutListenerOzone
    : public GlobalShortcutListener,
      public ui::PlatformGlobalShortcutListenerDelegate {
 public:
  GlobalShortcutListenerOzone();

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

  ~GlobalShortcutListenerOzone() override;

 private:
  // GlobalShortcutListener:
  void StartListening() override;
  void StopListening() override;
  bool RegisterAcceleratorImpl(const ui::Accelerator& accelerator) override;
  void UnregisterAcceleratorImpl(const ui::Accelerator& accelerator) override;

  // ui::PlatformGlobalShortcutListenerDelegate:
  void OnKeyPressed(ui::KeyboardCode key_code,
                    bool is_alt_down,
                    bool is_ctrl_down,
                    bool is_shift_down) override;
  void OnPlatformListenerDestroyed() override;

  bool is_listening_ = false;
  std::set<ui::Accelerator> registered_hot_keys_;

  // The platform implementation.
  ui::PlatformGlobalShortcutListener* platform_global_shortcut_listener_ =
      nullptr;
};

}  // namespace extensions

#endif  // CHROME_BROWSER_EXTENSIONS_GLOBAL_SHORTCUT_LISTENER_OZONE_H_


text:
package org.syphr.mythtv.protocol.impl;

import org.syphr.mythtv.commons.exception.ProtocolException;
import org.syphr.mythtv.commons.translate.Translator;

/* default */abstract class AbstractCommand63Message extends AbstractCommandOkResponse
{
    public AbstractCommand63Message(Translator translator, Parser parser)
    {
        super(translator, parser);
    }

    @Override
    protected String getMessage() throws ProtocolException
    {
        return getParser().combineArguments("MESSAGE", getSubCommand());
    }

    protected abstract String getSubCommand() throws ProtocolException;
}


text: Made with Jekyll


text: A simple cookbook to install/configure OpenTSDB


text:
#  `amp-o2-player`

    Description
    An amp-o2-player component displays the AOL O2Player.

    Availability
    Stable

    Required Script
    <script async custom-element="amp-o2-player" src="https://cdn.ampproject.org/v0/amp-o2-player-0.1.js"></script>

    Examples
    Annotated code example for amp-o2-player

## Example

The `width` and `height` attributes determine the aspect ratio of the player embedded in responsive layouts.

Example:

```html
<amp-o2-player
    data-pid="12345"
    data-bcid="5678"
    data-bid="54321"
    data-vid="98765"
    layout="responsive"
    width="480" height="270">
</amp-o2-player>
```

## Attributes

**data-pid**

The O2Player player id.

**data-bcid**

The O2Player bcid.

**data-bid**

The O2Player bid.

**data-vid**

The O2Player video id.

**data-macros**

The O2Player macros.

## Validation errors

The following lists validation errors specific to the `amp-o2-player` tag
(see also `amp-o2-player` in the [AMP validator specification](https://github.com/ampproject/amphtml/blob/master/extensions/amp-o2-player/0.1/validator-amp-o2-player.protoascii)):

    Validation Error
    Description

    The 'example1' tag is missing or incorrect, but required by 'example2'.
    Error thrown when required amp-o2-player extension .js script tag is missing or incorrect.

    The implied layout 'example1' is not supported by tag 'example2'.
    Error thrown when implied layout is set to CONTAINER; this layout type isn't supported.

    The specified layout 'example1' is not supported by tag 'example2'.
    Error thrown when specified layout is set to CONTAINER; this layout type isn't supported.

    The property 'example1' in attribute 'example2' in tag 'example3' is set to 'example4', which is invalid.
    Error thrown when invalid value is given for attributes height or width. For example, height=auto triggers this error for all supported layout types, with the exception of NODISPLAY.