text:
// Compiled by ClojureScript 1.9.495 {}
goog.provide('cljs.core.async.impl.protocols');
goog.require('cljs.core');
cljs.core.async.impl.protocols.MAX_QUEUE_SIZE = (1024);

/**
 * @interface
 */
cljs.core.async.impl.protocols.ReadPort = function(){};

/**
 * derefable val if taken, nil if take was enqueued
 */
cljs.core.async.impl.protocols.take_BANG_ = (function cljs$core$async$impl$protocols$take_BANG_(port,fn1_handler){
if((!((port == null))) && (!((port.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2 == null)))){
return port.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2(port,fn1_handler);
} else {
var x__7492__auto__ = (((port == null))?null:port);
var m__7493__auto__ = (cljs.core.async.impl.protocols.take_BANG_[goog.typeOf(x__7492__auto__)]);
if(!((m__7493__auto__ == null))){
return m__7493__auto__.call(null,port,fn1_handler);
} else {
var m__7493__auto____$1 = (cljs.core.async.impl.protocols.take_BANG_["_"]);
if(!((m__7493__auto____$1 == null))){
return m__7493__auto____$1.call(null,port,fn1_handler);
} else {
throw cljs.core.missing_protocol.call(null,"ReadPort.take!",port);
}
}
}
});

/**
 * @interface
 */
cljs.core.async.impl.protocols.WritePort = function(){};

/**
 * derefable boolean (false if already closed) if handled, nil if put was enqueued.
 *                             Must throw on nil val.
 */
cljs.core.async.impl.protocols.put_BANG_ = (function cljs$core$async$impl$protocols$put_BANG_(port,val,fn1_handler){
if((!((port == null))) && (!((port.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3 == null)))){
return port.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3(port,val,fn1_handler);
} else {
var x__7492__auto__ = (((port == null))?null:port);
var m__7493__auto__ = (cljs.core.async.impl.protocols.put_BANG_[goog.typeOf(x__7492__auto__)]);
if(!((m__7493__auto__ == null))){
return m__7493__auto__.call(null,port,val,fn1_handler);
} else {
var m__7493__auto____$1 = (cljs.core.async.impl.protocols.put_BANG_["_"]);
if(!((m__7493__auto____$1 == null))){
return m__7493__auto____$1.call(null,port,val,fn1_handler);
} else {
throw cljs.core.missing_protocol.call(null,"WritePort.put!",port);
}
}
}
});

/**
 * @interface
 */
cljs.core.async.impl.protocols.Channel = function(){};

cljs.core.async.impl.protocols.close_BANG_ = (function cljs$core$async$impl$protocols$close_BANG_(chan){
if((!((chan == null))) && (!((chan.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1 == null)))){
return chan.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1(chan);
} else {
var x__7492__auto__ = (((chan == null))?null:chan);
var m__7493__auto__ = (cljs.core.async.impl.protocols.close_BANG_[goog.typeOf(x__7492__auto__)]);
if(!((m__7493__auto__ == null))){
return m__7493__auto__.call(null,chan);
} else {
var m__7493__auto____$1 = (cljs.core.async.impl.protocols.close_BANG_["_"]);
if(!((m__7493__auto____$1 == null))){
return m__7493__auto____$1.call(null,chan);
} else {
throw cljs.core.missing_protocol.call(null,"Channel.close!",chan);
}
}
}
});

cljs.core.async.impl.protocols.closed_QMARK_ = (function cljs$core$async$impl$protocols$closed_QMARK_(chan){
if((!((chan == null))) && (!((chan.cljs$core$async$impl$protocols$Channel$closed_QMARK_$arity$1 == null)))){
return chan.cljs$core$async$impl$protocols$Channel$closed_QMARK_$arity$1(chan);
} else {
var x__7492__auto__ = (((chan == null))?null:chan);
var m__7493__auto__ = (cljs.core.async.impl.protocols.closed_QMARK_[goog.typeOf(x__7492__auto__)]);
if(!((m__7493__auto__ == null))){
return m__7493__auto__.call(null,chan);
} else {
var m__7493__auto____$1 = (cljs.core.async.impl.protocols.closed_QMARK_["_"]);
if(!((m__7493__auto____$1 == null))){
return m__7493__auto____$1.call(null,chan);
} else {
throw cljs.core.missing_protocol.call(null,"Channel.closed?",chan);
}
}
}
});

/**
 * @interface
 */
cljs.core.async.impl.protocols.Handler = function(){};

/**
 * returns true if has callback. Must work w/o lock
 */
cljs.core.async.impl.protocols.active_QMARK_ = (function cljs$core$async$impl$protocols$active_QMARK_(h){
if((!((h == null))) && (!((h.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1 == null)))){
return h.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(h);
} else {
var x__7492__auto__ = (((h == null))?null:h);
var m__7493__auto__ = (cljs.core.async.impl.protocols.active_QMARK_[goog.typeOf(x__7492__auto__)]);
if(!((m__7493__auto__ == null))){
return m__7493__auto__.call(null,h);
} else {
var m__7493__auto____$1 = (cljs.core.async.impl.protocols.active_QMARK_["_"]);
if(!((m__7493__auto____$1 == null))){
return m__7493__auto____$1.call(null,h);
} else {
throw cljs.core.missing_protocol.call(null,"Handler.active?",h);
}
}
}
});

/**
 * returns true if this handler may be blocked, otherwise it must not block
 */
cljs.core.async.impl.protocols.blockable_QMARK_ = (function cljs$core$async$impl$protocols$blockable_QMARK_(h){
if((!((h == null))) && (!((h.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1 == null)))){
return h.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1(h);
} else {
var x__7492__auto__ = (((h == null))?null:h);
var m__7493__auto__ = (cljs.core.async.impl.protocols.blockable_QMARK_[goog.typeOf(x__7492__auto__)]);
if(!((m__7493__auto__ == null))){
return m__7493__auto__.call(null,h);
} else {
var m__7493__auto____$1 = (cljs.core.async.impl.protocols.blockable_QMARK_["_"]);
if(!((m__7493__auto____$1 == null))){
return m__7493__auto____$1.call(null,h);
} else {
throw cljs.core.missing_protocol.call(null,"Handler.blockable?",h);
}
}
}
});

/**
 * commit to fulfilling its end of the transfer, returns cb. Must be called within lock
 */
cljs.core.async.impl.protocols.commit = (function cljs$core$async$impl$protocols$commit(h){
if((!((h == null))) && (!((h.cljs$core$async$impl$protocols$Handler$commit$arity$1 == null)))){
return h.cljs$core$async$impl$protocols$Handler$commit$arity$1(h);
} else {
var x__7492__auto__ = (((h == null))?null:h);
var m__7493__auto__ = (cljs.core.async.impl.protocols.commit[goog.typeOf(x__7492__auto__)]);
if(!((m__7493__auto__ == null))){
return m__7493__auto__.call(null,h);
} else {
var m__7493__auto____$1 = (cljs.core.async.impl.protocols.commit["_"]);
if(!((m__7493__auto____$1 == null))){
return m__7493__auto____$1.call(null,h);
} else {
throw cljs.core.missing_protocol.call(null,"Handler.commit",h);
}
}
}
});

/**
 * @interface
 */
cljs.core.async.impl.protocols.Buffer = function(){};

/**
 * returns true if buffer cannot accept put
 */
cljs.core.async.impl.protocols.full_QMARK_ = (function cljs$core$async$impl$protocols$full_QMARK_(b){
if((!((b == null))) && (!((b.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 == null)))){
return b.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1(b);
} else {
var x__7492__auto__ = (((b == null))?null:b);
var m__7493__auto__ = (cljs.core.async.impl.protocols.full_QMARK_[goog.typeOf(x__7492__auto__)]);
if(!((m__7493__auto__ == null))){
return m__7493__auto__.call(null,b);
} else {
var m__7493__auto____$1 = (cljs.core.async.impl.protocols.full_QMARK_["_"]);
if(!((m__7493__auto____$1 == null))){
return m__7493__auto____$1.call(null,b);
} else {
throw cljs.core.missing_protocol.call(null,"Buffer.full?",b);
}
}
}
});

/**
 * remove and return next item from buffer, called under chan mutex
 */
cljs.core.async.impl.protocols.remove_BANG_ = (function cljs$core$async$impl$protocols$remove_BANG_(b){
if((!((b == null))) && (!((b.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 == null)))){
return b.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(b);
} else {
var x__7492__auto__ = (((b == null))?null:b);
var m__7493__auto__ = (cljs.core.async.impl.protocols.remove_BANG_[goog.typeOf(x__7492__auto__)]);
if(!((m__7493__auto__ == null))){
return m__7493__auto__.call(null,b);
} else {
var m__7493__auto____$1 = (cljs.core.async.impl.protocols.remove_BANG_["_"]);
if(!((m__7493__auto____$1 == null))){
return m__7493__auto____$1.call(null,b);
} else {
throw cljs.core.missing_protocol.call(null,"Buffer.remove!",b);
}
}
}
});

/**
 * if room, add item to the buffer, returns b, called under chan mutex
 */
cljs.core.async.impl.protocols.add_BANG__STAR_ = (function cljs$core$async$impl$protocols$add_BANG__STAR_(b,itm){
if((!((b == null))) && (!((b.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2 == null)))){
return b.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2(b,itm);
} else {
var x__7492__auto__ = (((b == null))?null:b);
var m__7493__auto__ = (cljs.core.async.impl.protocols.add_BANG__STAR_[goog.typeOf(x__7492__auto__)]);
if(!((m__7493__auto__ == null))){
return m__7493__auto__.call(null,b,itm);
} else {
var m__7493__auto____$1 = (cljs.core.async.impl.protocols.add_BANG__STAR_["_"]);
if(!((m__7493__auto____$1 == null))){
return m__7493__auto____$1.call(null,b,itm);
} else {
throw cljs.core.missing_protocol.call(null,"Buffer.add!*",b);
}
}
}
});

/**
 * called on chan closed under chan mutex, return ignored
 */
cljs.core.async.impl.protocols.close_buf_BANG_ = (function cljs$core$async$impl$protocols$close_buf_BANG_(b){
if((!((b == null))) && (!((b.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1 == null)))){
return b.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1(b);
} else {
var x__7492__auto__ = (((b == null))?null:b);
var m__7493__auto__ = (cljs.core.async.impl.protocols.close_buf_BANG_[goog.typeOf(x__7492__auto__)]);
if(!((m__7493__auto__ == null))){
return m__7493__auto__.call(null,b);
} else {
var m__7493__auto____$1 = (cljs.core.async.impl.protocols.close_buf_BANG_["_"]);
if(!((m__7493__auto____$1 == null))){
return m__7493__auto____$1.call(null,b);
} else {
throw cljs.core.missing_protocol.call(null,"Buffer.close-buf!",b);
}
}
}
});

cljs.core.async.impl.protocols.add_BANG_ = (function cljs$core$async$impl$protocols$add_BANG_(var_args){
var args9328 = [];
var len__7937__auto___9331 = arguments.length;
var i__7938__auto___9332 = (0);
while(true){
if((i__7938__auto___9332 < len__7937__auto___9331)){
args9328.push((arguments[i__7938__auto___9332]));

var G__9333 = (i__7938__auto___9332 + (1));
i__7938__auto___9332 = G__9333;
continue;
} else {
}
break;
}

var G__9330 = args9328.length;
switch (G__9330) {
case 1:
return cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$1((arguments[(0)]));

break;
case 2:
return cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)]));

break;
default:
throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args9328.length)].join('')));

}
});

cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$1 = (function (b){
return b;
});

cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (b,itm){
if(!((itm == null))){
} else {
throw (new Error("Assert failed: (not (nil? itm))"));
}

return cljs.core.async.impl.protocols.add_BANG__STAR_.call(null,b,itm);
});

cljs.core.async.impl.protocols.add_BANG_.cljs$lang$maxFixedArity = 2;

/**
 * @interface
 */
cljs.core.async.impl.protocols.UnblockingBuffer = function(){};

//# sourceMappingURL=protocols.js.map


text:
package org.apache.karaf.itests;

import java.util.EnumSet;

import org.apache.karaf.features.FeaturesService;

import org.junit.Test;
import org.junit.runner.RunWith;

import org.ops4j.pax.exam.junit.PaxExam;
import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
import org.ops4j.pax.exam.spi.reactors.PerClass;

@RunWith(PaxExam.class)
@ExamReactorStrategy(PerClass.class)
public class ConditionalFeaturesTest extends KarafTestSupport {

    @Test
    public void testScr() throws Exception {
        featureService.installFeature("management", EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));
        //Remove management and install scr
        featureService.uninstallFeature("management", EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));
        featureService.installFeature("scr", EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));
        assertBundleNotInstalled("org.apache.karaf.scr.management");

        //Add management back
        featureService.installFeature("management", EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));
        assertBundleInstalled("org.apache.karaf.scr.management");
    }

    @Test
    public void testWebconsole() throws Exception {
        try {
            featureService.uninstallFeature("scr", EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));
        } catch (Exception e) {
        }
        featureService.installFeature("eventadmin", EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));
        featureService.installFeature("webconsole", EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));

        assertBundleInstalled("org.apache.karaf.webconsole.features");
        assertBundleInstalled("org.apache.karaf.webconsole.instance");
        assertBundleInstalled("org.apache.karaf.webconsole.gogo");
        assertBundleInstalled("org.apache.karaf.webconsole.http");
        assertBundleInstalled("org.apache.felix.webconsole.plugins.event");

        // add eventadmin
        featureService.uninstallFeature("eventadmin", EnumSet.of(FeaturesService.Option.NoAutoRefreshBundles));
        assertBundleNotInstalled("org.apache.felix.webconsole.plugins.event");
    }
}

redpajama_set_name: RedPajamaGithub


text:
package xworker.io.netty.demo;

import org.xmeta.ActionContext;
import org.xmeta.Thing;
import org.xmeta.World;

import xworker.swt.util.SwtUtils;
import xworker.swt.util.ThingCompositeCreator;

public class NettyDemo {
	public static Object create(ActionContext actionContext) {
		Thing self = actionContext.getObject("self");

		ThingCompositeCreator cc = SwtUtils.createCompositeCreator(self, actionContext);
		cc.setCompositeThing(World.getInstance().getThing("xworker.netty.demo.prototypes.NettyDemoShell/@mainTabFolder"));
		//设置参数
		cc.getNewActionContext().put("nettyServerThing", self.doAction("getNettyServer", actionContext));
		cc.getNewActionContext().put("nettyClientThing", self.doAction("getNettyClient", actionContext));

		return cc.create();
	}
}


text:
//=============================================================================================================

//*************************************************************************************************************
//=============================================================================================================
// INCLUDES
//=============================================================================================================

#include "data3Dtreedelegate.h"
#include "data3Dtreemodel.h"

#include <disp/imagesc.h>

//*************************************************************************************************************
//=============================================================================================================
// QT INCLUDES
//=============================================================================================================

#include <QSpinBox>
#include <QDoubleSpinBox>
#include <QComboBox>
#include <QPushButton>

//*************************************************************************************************************
//=============================================================================================================
// Eigen INCLUDES
//=============================================================================================================

//*************************************************************************************************************
//=============================================================================================================
// USED NAMESPACES
//=============================================================================================================

using namespace UTILSLIB;
using namespace DISP3DLIB;
using namespace DISPCHARTSLIB;
using namespace DISPLIB;

//*************************************************************************************************************
//=============================================================================================================
// DEFINE MEMBER METHODS
//=============================================================================================================

Data3DTreeDelegate::Data3DTreeDelegate(QObject* parent)
: QItemDelegate(parent)
{
}

//*************************************************************************************************************

QWidget *Data3DTreeDelegate::createEditor(QWidget* parent, const QStyleOptionViewItem& option , const QModelIndex& index) const
{
    const Data3DTreeModel* pData3DTreeModel = static_cast<const Data3DTreeModel*>(index.model());
    const AbstractTreeItem* pAbstractItem = static_cast<const AbstractTreeItem*>(pData3DTreeModel->itemFromIndex(index));

    switch(pAbstractItem->type()) {
        case MetaTreeItemTypes::SurfaceColorGyri: {
            QColorDialog *pColorDialog = new QColorDialog(parent);
            connect(pColorDialog, &QColorDialog::currentColorChanged,
                    this, &Data3DTreeDelegate::onEditorEdited);
            pColorDialog->setWindowTitle("Select Gyri Color");
            pColorDialog->show();
            return pColorDialog;
        }

        case MetaTreeItemTypes::SurfaceColorSulci: {
            QColorDialog *pColorDialog = new QColorDialog();
            connect(pColorDialog, &QColorDialog::currentColorChanged,
                    this, &Data3DTreeDelegate::onEditorEdited);
            pColorDialog->setWindowTitle("Select Sulci Color");
            pColorDialog->show();
            return pColorDialog;
        }

        case MetaTreeItemTypes::ColormapType: {
            QComboBox* pComboBox = new QComboBox(parent);
            connect(pComboBox, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
                    this, &Data3DTreeDelegate::onEditorEdited);
            pComboBox->addItem("Hot Negative 1");
            pComboBox->addItem("Hot Negative 2");
            pComboBox->addItem("Hot");
            return pComboBox;
        }

        case MetaTreeItemTypes::ThresholdValue: {
            Spline* pSpline = new Spline("Spline Histogram", 0);
            connect(pSpline, static_cast<void (Spline::*)(double, double, double)>(&Spline::borderChanged),
            this, &Data3DTreeDelegate::onEditorEdited);
            QStandardItem* pParentItem = static_cast<QStandardItem*>(pAbstractItem->QStandardItem::parent());
            QModelIndex indexParent = pData3DTreeModel->indexFromItem(pParentItem);
            MatrixXd matRTData = index.model()->data(indexParent, Data3DTreeModelItemRoles::RTData).value<MatrixXd>();
            Eigen::VectorXd resultClassLimit;
            Eigen::VectorXi resultFrequency;
            MNEMath::histcounts(matRTData, false, 50, resultClassLimit, resultFrequency, 0.0, 0.0);
            pSpline->setData(resultClassLimit, resultFrequency, 0);
            QVector3D vecThresholdValues = index.model()->data(index, MetaTreeItemRoles::ThresholdValue).value<QVector3D>();
            pSpline->setThreshold(vecThresholdValues);
            AbstractTreeItem* pParentItemAbstract = static_cast<AbstractTreeItem*>(pParentItem);
            QList<QStandardItem*> pColormapItem = pParentItemAbstract->findChildren(MetaTreeItemTypes::ColormapType);
            for(int i = 0; i < pColormapItem.size(); ++i)
            {
                QModelIndex indexColormapItem = pData3DTreeModel->indexFromItem(pColormapItem.at(i));
                QString colorMap = index.model()->data(indexColormapItem, MetaTreeItemRoles::ColormapType).value<QString>();
                pSpline->setColorMap(colorMap);
            }
            return pSpline;
        }

        case MetaTreeItemTypes::StreamingTimeInterval: {
            QSpinBox* pSpinBox = new QSpinBox(parent);
            connect(pSpinBox, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
                    this, &Data3DTreeDelegate::onEditorEdited);
            pSpinBox->setSuffix(" mSec");
            pSpinBox->setMinimum(17);
            pSpinBox->setMaximum(50000);
            pSpinBox->setSingleStep(10);
            pSpinBox->setValue(index.model()->data(index, MetaTreeItemRoles::StreamingTimeInterval).toInt());
            return pSpinBox;
        }

        case MetaTreeItemTypes::VisualizationType: {
            QComboBox* pComboBox = new QComboBox(parent);
            pComboBox->addItem("Vertex based");
            pComboBox->addItem("Smoothing based");
            pComboBox->addItem("Annotation based");
            return pComboBox;
        }

        case MetaTreeItemTypes::SurfaceColor: {
            QColorDialog *pColorDialog = new QColorDialog();
            connect(pColorDialog, &QColorDialog::currentColorChanged,
                    this, &Data3DTreeDelegate::onEditorEdited);
            pColorDialog->setWindowTitle("Select Surface Color");
            pColorDialog->show();
            return pColorDialog;
        }

        case MetaTreeItemTypes::PointColor: {
            QColorDialog *pColorDialog = new QColorDialog();
            connect(pColorDialog, &QColorDialog::currentColorChanged,
                    this, &Data3DTreeDelegate::onEditorEdited);
            pColorDialog->setWindowTitle("Select Point Color");
            pColorDialog->show();
            return pColorDialog;
        }

        case MetaTreeItemTypes::NumberAverages: {
            QSpinBox* pSpinBox = new QSpinBox(parent);
            connect(pSpinBox, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),
                    this, &Data3DTreeDelegate::onEditorEdited);
            pSpinBox->setMinimum(1);
            pSpinBox->setMaximum(100);
            pSpinBox->setSingleStep(1);
            pSpinBox->setValue(index.model()->data(index, MetaTreeItemRoles::NumberAverages).toInt());
            return pSpinBox;
        }

        case MetaTreeItemTypes::SurfaceAlpha: {
            QDoubleSpinBox* pDoubleSpinBox = new QDoubleSpinBox(parent);
            connect(pDoubleSpinBox, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
                    this, &Data3DTreeDelegate::onEditorEdited);
            pDoubleSpinBox->setMinimum(0.01);
            pDoubleSpinBox->setMaximum(1.0);
            pDoubleSpinBox->setSingleStep(0.01);
            pDoubleSpinBox->setValue(index.model()->data(index, MetaTreeItemRoles::SurfaceAlpha).toDouble());
            return pDoubleSpinBox;
        }

        case MetaTreeItemTypes::SurfaceTessInner: {
            QDoubleSpinBox* pDoubleSpinBox = new QDoubleSpinBox(parent);
            connect(pDoubleSpinBox, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
                    this, &Data3DTreeDelegate::onEditorEdited);
            pDoubleSpinBox->setMinimum(1.0);
            pDoubleSpinBox->setMaximum(100.0);
            pDoubleSpinBox->setSingleStep(1.0);
            pDoubleSpinBox->setValue(index.model()->data(index, MetaTreeItemRoles::SurfaceTessInner).toDouble());
            return pDoubleSpinBox;
        }

        case MetaTreeItemTypes::SurfaceTessOuter: {
            QDoubleSpinBox* pDoubleSpinBox = new QDoubleSpinBox(parent);
            connect(pDoubleSpinBox, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
                    this, &Data3DTreeDelegate::onEditorEdited);
            pDoubleSpinBox->setMinimum(1.0);
            pDoubleSpinBox->setMaximum(100.0);
            pDoubleSpinBox->setSingleStep(1.0);
            pDoubleSpinBox->setValue(index.model()->data(index, MetaTreeItemRoles::SurfaceTessOuter).toDouble());
            return pDoubleSpinBox;
        }

        case MetaTreeItemTypes::SurfaceTriangleScale: {
            QDoubleSpinBox* pDoubleSpinBox = new QDoubleSpinBox(parent);
            connect(pDoubleSpinBox, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
                    this, &Data3DTreeDelegate::onEditorEdited);
            pDoubleSpinBox->setMinimum(0.01);
            pDoubleSpinBox->setMaximum(100.0);
            pDoubleSpinBox->setSingleStep(0.01);
            pDoubleSpinBox->setValue(index.model()->data(index, MetaTreeItemRoles::SurfaceTriangleScale).toDouble());
            return pDoubleSpinBox;
        }

        case MetaTreeItemTypes::SurfaceTranslateX: {
            QDoubleSpinBox* pDoubleSpinBox = new QDoubleSpinBox(parent);
            connect(pDoubleSpinBox, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
                    this, &Data3DTreeDelegate::onEditorEdited);
            pDoubleSpinBox->setMinimum(-10000.0);
            pDoubleSpinBox->setMaximum(10000.0);
            pDoubleSpinBox->setSingleStep(0.01);
            pDoubleSpinBox->setValue(index.model()->data(index, MetaTreeItemRoles::SurfaceTranslateX).toDouble());
            return pDoubleSpinBox;
        }

        case MetaTreeItemTypes::SurfaceTranslateY: {
            QDoubleSpinBox* pDoubleSpinBox = new QDoubleSpinBox(parent);
            connect(pDoubleSpinBox, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
                    this, &Data3DTreeDelegate::onEditorEdited);
            pDoubleSpinBox->setMinimum(-10000.0);
            pDoubleSpinBox->setMaximum(10000.0);
            pDoubleSpinBox->setSingleStep(0.01);
            pDoubleSpinBox->setValue(index.model()->data(index, MetaTreeItemRoles::SurfaceTranslateY).toDouble());
            return pDoubleSpinBox;
        }

        case MetaTreeItemTypes::SurfaceTranslateZ: {
            QDoubleSpinBox* pDoubleSpinBox = new QDoubleSpinBox(parent);
            connect(pDoubleSpinBox, static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),
                    this, &Data3DTreeDelegate::onEditorEdited);
            pDoubleSpinBox->setMinimum(-10000.0);
            pDoubleSpinBox->setMaximum(10000.0);
            pDoubleSpinBox->setSingleStep(0.01);
            pDoubleSpinBox->setValue(index.model()->data(index, MetaTreeItemRoles::SurfaceTranslateZ).toDouble());
            return pDoubleSpinBox;
        }

        case MetaTreeItemTypes::NetworkThreshold: {
            Spline* pSpline = new Spline("Spline Histogram", 0);
            connect(pSpline, static_cast<void (Spline::*)(double, double, double)>(&Spline::borderChanged),
                this, &Data3DTreeDelegate::onEditorEdited);

            QStandardItem* pParentItem = static_cast<QStandardItem*>(pAbstractItem->QStandardItem::parent());
            QModelIndex indexParent = pData3DTreeModel->indexFromItem(pParentItem);
            MatrixXd matRTData = index.model()->data(indexParent, Data3DTreeModelItemRoles::NetworkDataMatrix).value<MatrixXd>();
            Eigen::VectorXd resultClassLimit;
            Eigen::VectorXi resultFrequency;
            MNEMath::histcounts(matRTData, false, 50, resultClassLimit, resultFrequency, 0.0, 0.0);
            pSpline->setData(resultClassLimit, resultFrequency, 0);
            QVector3D vecThresholdValues = index.model()->data(index, MetaTreeItemRoles::NetworkThreshold).value<QVector3D>();
            pSpline->setThreshold(vecThresholdValues);

            return pSpline;
        }

        case MetaTreeItemTypes::NetworkMatrix: {
            QStandardItem* pParentItem = static_cast<QStandardItem*>(pAbstractItem->QStandardItem::parent());
            QModelIndex indexParent = pData3DTreeModel->indexFromItem(pParentItem);
            MatrixXd matRTData = index.model()->data(indexParent, Data3DTreeModelItemRoles::NetworkDataMatrix).value<MatrixXd>();

            ImageSc* pPlotLA = new ImageSc(matRTData);
            pPlotLA->show();
            //return pPlotLA;
        }

        default: // do nothing;
            break;
    }

    return QItemDelegate::createEditor(parent, option, index);
}

//*************************************************************************************************************

void Data3DTreeDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const
{
    const Data3DTreeModel* pData3DTreeModel = static_cast<const Data3DTreeModel*>(index.model());
    const AbstractTreeItem* pAbstractItem = static_cast<const AbstractTreeItem*>(pData3DTreeModel->itemFromIndex(index));

    switch(pAbstractItem->type()) {
        case MetaTreeItemTypes::SurfaceColorGyri: {
            QColor color = index.model()->data(index, MetaTreeItemRoles::SurfaceColorGyri).value<QColor>();
            QColorDialog* pColorDialog = static_cast<QColorDialog*>(editor);
            pColorDialog->setCurrentColor(color);
            break;
        }

        case MetaTreeItemTypes::SurfaceColorSulci: {
            QColor color = index.model()->data(index, MetaTreeItemRoles::SurfaceColorSulci).value<QColor>();
            QColorDialog* pColorDialog = static_cast<QColorDialog*>(editor);
            pColorDialog->setCurrentColor(color);
            break;
        }

        case MetaTreeItemTypes::ColormapType: {
            QString colormap = index.model()->data(index, MetaTreeItemRoles::ColormapType).toString();
            QComboBox* pComboBox = static_cast<QComboBox*>(editor);
            pComboBox->setCurrentText(colormap);
            break;
        }

        case MetaTreeItemTypes::ThresholdValue: {
            Spline* pSpline = static_cast<Spline*>(editor);
            int width = pSpline->size().width();
            int height = pSpline->size().height();
            if (pSpline->size().width() < 200 && pSpline->size().height() < 200)
            {
                pSpline->resize(600,400);   //resize histogram to be readable with default size
            }
            else
            {
                width = pSpline->size().width();   //keeps the size of the histogram
                height = pSpline->size().height();
                pSpline->resize(width,height);
            }
            return;
        }

        case MetaTreeItemTypes::StreamingTimeInterval: {
            int value = index.model()->data(index, MetaTreeItemRoles::StreamingTimeInterval).toInt();
            QSpinBox* pSpinBox = static_cast<QSpinBox*>(editor);
            pSpinBox->setValue(value);
            break;
        }

        case MetaTreeItemTypes::VisualizationType: {
            QString visType = index.model()->data(index, MetaTreeItemRoles::VisualizationType).toString();
            QComboBox* pComboBox = static_cast<QComboBox*>(editor);
            pComboBox->setCurrentText(visType);
            break;
        }

        case MetaTreeItemTypes::SurfaceColor: {
            QColor color = index.model()->data(index, MetaTreeItemRoles::SurfaceColor).value<QColor>();
            QColorDialog* pColorDialog = static_cast<QColorDialog*>(editor);
            pColorDialog->setCurrentColor(color);
            break;
        }

        case MetaTreeItemTypes::PointColor: {
            QColor color = index.model()->data(index, MetaTreeItemRoles::PointColor).value<QColor>();
            QColorDialog* pColorDialog = static_cast<QColorDialog*>(editor);
            pColorDialog->setCurrentColor(color);
            break;
        }

        case MetaTreeItemTypes::NumberAverages: {
            int value = index.model()->data(index, MetaTreeItemRoles::NumberAverages).toInt();
            QSpinBox* pSpinBox = static_cast<QSpinBox*>(editor);
            pSpinBox->setValue(value);
            break;
        }

        case MetaTreeItemTypes::SurfaceAlpha: {
            int value = index.model()->data(index, MetaTreeItemRoles::SurfaceAlpha).toDouble();
            QSpinBox* pSpinBox = static_cast<QSpinBox*>(editor);
            pSpinBox->setValue(value);
            break;
        }

        case MetaTreeItemTypes::SurfaceTessInner: {
            int value = index.model()->data(index, MetaTreeItemRoles::SurfaceTessInner).toDouble();
            QSpinBox* pSpinBox = static_cast<QSpinBox*>(editor);
            pSpinBox->setValue(value);
            break;
        }

        case MetaTreeItemTypes::SurfaceTessOuter: {
            int value = index.model()->data(index, MetaTreeItemRoles::SurfaceTessOuter).toDouble();
            QSpinBox* pSpinBox = static_cast<QSpinBox*>(editor);
            pSpinBox->setValue(value);
            break;
        }

        case MetaTreeItemTypes::SurfaceTriangleScale: {
            int value = index.model()->data(index, MetaTreeItemRoles::SurfaceTriangleScale).toDouble();
            QSpinBox* pSpinBox = static_cast<QSpinBox*>(editor);
            pSpinBox->setValue(value);
            break;
        }

        case MetaTreeItemTypes::SurfaceTranslateX: {
            double value = index.model()->data(index, MetaTreeItemRoles::SurfaceTranslateX).toDouble();
            QDoubleSpinBox* pDoubleSpinBox = static_cast<QDoubleSpinBox*>(editor);
            pDoubleSpinBox->setValue(value);
            break;
        }

        case MetaTreeItemTypes::SurfaceTranslateY: {
            double value = index.model()->data(index, MetaTreeItemRoles::SurfaceTranslateY).toDouble();
            QDoubleSpinBox* pDoubleSpinBox = static_cast<QDoubleSpinBox*>(editor);
            pDoubleSpinBox->setValue(value);
            break;
        }

        case MetaTreeItemTypes::SurfaceTranslateZ: {
            double value = index.model()->data(index, MetaTreeItemRoles::SurfaceTranslateZ).toDouble();
            QDoubleSpinBox* pDoubleSpinBox = static_cast<QDoubleSpinBox*>(editor);
            pDoubleSpinBox->setValue(value);
            break;
        }

        case MetaTreeItemTypes::NetworkThreshold: {
            Spline* pSpline = static_cast<Spline*>(editor);
            int width = pSpline->size().width();
            int height = pSpline->size().height();
            if (pSpline->size().width() < 200 && pSpline->size().height() < 200)   //pSpline initializes with size (137,15)
            {
                pSpline->resize(800,600);   //resize histogram to be readable with default size
            }
            else
            {
                width = pSpline->size().width();   //keeps the size of the histogram
                height = pSpline->size().height();
                pSpline->resize(width,height);
            }
            return;
        }

        default: // do nothing;
            break;
    }

    QItemDelegate::setEditorData(editor, index);
}

//*************************************************************************************************************

void Data3DTreeDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const
{
    const Data3DTreeModel* pData3DTreeModel = static_cast<const Data3DTreeModel*>(index.model());
    const AbstractTreeItem* pAbstractItem = static_cast<const AbstractTreeItem*>(pData3DTreeModel->itemFromIndex(index));

    switch(pAbstractItem->type()) {
        case MetaTreeItemTypes::SurfaceColorGyri: {
            QColorDialog* pColorDialog = static_cast<QColorDialog*>(editor);
            QColor color = pColorDialog->currentColor();
            QVariant data;
            data.setValue(color);

            model->setData(index, data, MetaTreeItemRoles::SurfaceColorGyri);
            model->setData(index, data, Qt::DecorationRole);
            return;
        }

        case MetaTreeItemTypes::SurfaceColorSulci: {
            QColorDialog* pColorDialog = static_cast<QColorDialog*>(editor);
            QColor color = pColorDialog->currentColor();
            QVariant data;
            data.setValue(color);

            model->setData(index, data, MetaTreeItemRoles::SurfaceColorSulci);
            model->setData(index, data, Qt::DecorationRole);
            return;
        }

        case MetaTreeItemTypes::ColormapType: {
            QComboBox* pColorMapType = static_cast<QComboBox*>(editor);
            QVariant data;
            data.setValue(pColorMapType->currentText());

            model->setData(index, data, MetaTreeItemRoles::ColormapType);
            model->setData(index, data, Qt::DisplayRole);
            return;
        }

        case MetaTreeItemTypes::ThresholdValue: {
            Spline* pSpline = static_cast<Spline*>(editor);
            QVector3D returnVector;
            returnVector = pSpline->getThreshold();

            QString displayThreshold;
            displayThreshold = QString("%1,%2,%3").arg(returnVector.x()).arg(returnVector.y()).arg(returnVector.z());
            QVariant dataDisplay;
            dataDisplay.setValue(displayThreshold);
            model->setData(index, dataDisplay, Qt::DisplayRole);

            model->setData(index, returnVector, MetaTreeItemRoles::ThresholdValue);
            return;
        }

        case MetaTreeItemTypes::StreamingTimeInterval: {
            QSpinBox* pSpinBox = static_cast<QSpinBox*>(editor);

            QVariant data;
            data.setValue(pSpinBox->value());

            model->setData(index, data, MetaTreeItemRoles::StreamingTimeInterval);
            model->setData(index, data, Qt::DisplayRole);
            break;
        }

        case MetaTreeItemTypes::VisualizationType: {
            QComboBox* pVisType = static_cast<QComboBox*>(editor);
            QVariant data;
            data.setValue(pVisType->currentText());

            model->setData(index, data, MetaTreeItemRoles::VisualizationType);
            model->setData(index, data, Qt::DisplayRole);
            return;
        }

        case MetaTreeItemTypes::SurfaceColor: {
            QColorDialog* pColorDialog = static_cast<QColorDialog*>(editor);
            QColor color = pColorDialog->currentColor();
            QVariant data;
            data.setValue(color);

            model->setData(index, data, MetaTreeItemRoles::SurfaceColor);
            model->setData(index, data, Qt::DecorationRole);
            return;
        }

        case MetaTreeItemTypes::PointColor: {
            QColorDialog* pColorDialog = static_cast<QColorDialog*>(editor);
            QColor color = pColorDialog->currentColor();
            QVariant data;
            data.setValue(color);

            model->setData(index, data, MetaTreeItemRoles::PointColor);
            model->setData(index, data, Qt::DecorationRole);
            return;
        }

        case MetaTreeItemTypes::NumberAverages: {
            QSpinBox* pSpinBox = static_cast<QSpinBox*>(editor);

            QVariant data;
            data.setValue(pSpinBox->value());

            model->setData(index, data, MetaTreeItemRoles::NumberAverages);
            model->setData(index, data, Qt::DisplayRole);
            break;
        }

        case MetaTreeItemTypes::SurfaceAlpha: {
            QDoubleSpinBox* pDoubleSpinBox = static_cast<QDoubleSpinBox*>(editor);
            QVariant data;
            data.setValue(pDoubleSpinBox->value());

            model->setData(index, data, MetaTreeItemRoles::SurfaceAlpha);
            model->setData(index, data, Qt::DisplayRole);
            break;
        }

        case MetaTreeItemTypes::SurfaceTessInner: {
            QDoubleSpinBox* pDoubleSpinBox = static_cast<QDoubleSpinBox*>(editor);
            QVariant data;
            data.setValue(pDoubleSpinBox->value());

            model->setData(index, data, MetaTreeItemRoles::SurfaceTessInner);
            model->setData(index, data, Qt::DisplayRole);
            break;
        }

        case MetaTreeItemTypes::SurfaceTessOuter: {
            QDoubleSpinBox* pDoubleSpinBox = static_cast<QDoubleSpinBox*>(editor);
            QVariant data;
            data.setValue(pDoubleSpinBox->value());

            model->setData(index, data, MetaTreeItemRoles::SurfaceTessOuter);
            model->setData(index, data, Qt::DisplayRole);
            break;
        }

        case MetaTreeItemTypes::SurfaceTriangleScale: {
            QDoubleSpinBox* pDoubleSpinBox = static_cast<QDoubleSpinBox*>(editor);
            QVariant data;
            data.setValue(pDoubleSpinBox->value());

            model->setData(index, data, MetaTreeItemRoles::SurfaceTriangleScale);
            model->setData(index, data, Qt::DisplayRole);
            break;
        }

        case MetaTreeItemTypes::SurfaceTranslateX: {
            QDoubleSpinBox* pDoubleSpinBox = static_cast<QDoubleSpinBox*>(editor);
            QVariant data;
            data.setValue(pDoubleSpinBox->value());

            model->setData(index, data, MetaTreeItemRoles::SurfaceTranslateX);
            model->setData(index, data, Qt::DisplayRole);
            break;
        }

        case MetaTreeItemTypes::SurfaceTranslateY: {
            QDoubleSpinBox* pDoubleSpinBox = static_cast<QDoubleSpinBox*>(editor);
            QVariant data;
            data.setValue(pDoubleSpinBox->value());

            model->setData(index, data, MetaTreeItemRoles::SurfaceTranslateY);
            model->setData(index, data, Qt::DisplayRole);
            break;
        }

        case MetaTreeItemTypes::SurfaceTranslateZ: {
            QDoubleSpinBox* pDoubleSpinBox = static_cast<QDoubleSpinBox*>(editor);
            QVariant data;
            data.setValue(pDoubleSpinBox->value());

            model->setData(index, data, MetaTreeItemRoles::SurfaceTranslateZ);
            model->setData(index, data, Qt::DisplayRole);
            break;
        }

        case MetaTreeItemTypes::NetworkThreshold: {
            Spline* pSpline = static_cast<Spline*>(editor);
            QVector3D returnVector;
            returnVector = pSpline->getThreshold();

            QString displayThreshold;
            displayThreshold = QString("%1,%2,%3").arg(returnVector.x()).arg(returnVector.y()).arg(returnVector.z());
            QVariant dataDisplay;
            dataDisplay.setValue(displayThreshold);
            model->setData(index, dataDisplay, Qt::DisplayRole);

            model->setData(index, returnVector, MetaTreeItemRoles::NetworkThreshold);
            return;
        }

        default: // do nothing;
            break;
    }

    QItemDelegate::setModelData(editor, model, index);
}

//*************************************************************************************************************

void Data3DTreeDelegate::updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem &option, const QModelIndex &/* index */) const
{
    editor->setGeometry(option.rect);
}

//*************************************************************************************************************

void Data3DTreeDelegate::onEditorEdited()
{
    QWidget* editor = qobject_cast<QWidget*>(QObject::sender());
    emit commitData(editor);
}


text:
REM This file should be executed from the command line prior to the first
REM build.  It will be necessary to refresh the Eclipse project once the
REM .bat file has been executed (normally just press F5 to refresh).

REM Copies all the required files from their location within the standard
REM FreeRTOS directory structure to under the Eclipse project directory.
REM This permits the Eclipse project to be used in 'managed' mode and without
REM having to setup any linked resources.

REM Have the files already been copied?
IF EXIST src\FreeRTOS Goto END

	REM Create the required directory structure.
	MD src\FreeRTOS
	MD src\FreeRTOS\include
	MD src\FreeRTOS\portable\GCC\ARM_CM3_MPU
	MD src\FreeRTOS\portable\MemMang

	REM Copy the core kernel files.
	copy ..\..\Source\tasks.c src\FreeRTOS
	copy ..\..\Source\queue.c src\FreeRTOS
	copy ..\..\Source\list.c src\FreeRTOS

	REM Copy the common header files

	copy ..\..\Source\include\*.* src\FreeRTOS\include

	REM Copy the portable layer files
	copy ..\..\Source\portable\GCC\ARM_CM3_MPU\*.* src\FreeRTOS\portable\GCC\ARM_CM3_MPU

	REM Copy the basic memory allocation files
	copy ..\..\Source\portable\MemMang\heap_2.c src\FreeRTOS\portable\MemMang

: END


text:
#import <UserNotifications/UserNotifications.h>
#import "EaseSDKHelper.h"

#import "EaseConvertToCommonEmoticonsHelper.h"

//@interface EMChatImageOptions : NSObject<IChatImageOptions>
//
//@property (assign, nonatomic) CGFloat compressionQuality;
//
//@end

static EaseSDKHelper *helper = nil;

@implementation EaseSDKHelper

@synthesize isShowingimagePicker = _isShowingimagePicker;

- (instancetype)init
{
    self = [super init];
    if (self) {
        [self commonInit];
    }

    return self;
}

+(instancetype)shareHelper
{
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        helper = [[EaseSDKHelper alloc] init];
    });

    return helper;
}

#pragma mark - private

- (void)commonInit
{

}

#pragma mark - app delegate notifications

- (void)_setupAppDelegateNotifications
{
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(appDidEnterBackgroundNotif:)
                                                 name:UIApplicationDidEnterBackgroundNotification
                                               object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(appWillEnterForeground:)
                                                 name:UIApplicationWillEnterForegroundNotification
                                               object:nil];
}

- (void)appDidEnterBackgroundNotif:(NSNotification*)notif
{
    [[EMClient sharedClient] applicationDidEnterBackground:notif.object];
}

- (void)appWillEnterForeground:(NSNotification*)notif
{
    [[EMClient sharedClient] applicationWillEnterForeground:notif.object];
}

#pragma mark - register apns

- (void)_registerRemoteNotification
{
    UIApplication *application = [UIApplication sharedApplication];
    application.applicationIconBadgeNumber = 0;

    if (NSClassFromString(@"UNUserNotificationCenter")) {
        [[UNUserNotificationCenter currentNotificationCenter] requestAuthorizationWithOptions:UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert completionHandler:^(BOOL granted, NSError *error) {
            if (granted) {
#if !TARGET_IPHONE_SIMULATOR
                [application registerForRemoteNotifications];
#endif
            }
        }];
        return;
    }

    if([application respondsToSelector:@selector(registerUserNotificationSettings:)])
    {
        UIUserNotificationType notificationTypes = UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert;
        UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:notificationTypes categories:nil];
        [application registerUserNotificationSettings:settings];
    }

#if !TARGET_IPHONE_SIMULATOR
    if ([application respondsToSelector:@selector(registerForRemoteNotifications)]) {
        [application registerForRemoteNotifications];
    }else{
        UIRemoteNotificationType notificationTypes = UIRemoteNotificationTypeBadge |
        UIRemoteNotificationTypeSound |
        UIRemoteNotificationTypeAlert;
        [[UIApplication sharedApplication] registerForRemoteNotificationTypes:notificationTypes];
    }
#endif
}

#pragma mark - init Hyphenate

- (void)hyphenateApplication:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
                    appkey:(NSString *)appkey
              apnsCertName:(NSString *)apnsCertName
               otherConfig:(NSDictionary *)otherConfig
{
    [self _setupAppDelegateNotifications];
    [self _registerRemoteNotification];

    EMOptions *options = [EMOptions optionsWithAppkey:appkey];
    options.apnsCertName = apnsCertName;
    options.isAutoAcceptGroupInvitation = NO;
    if ([otherConfig objectForKey:kSDKConfigEnableConsoleLogger]) {
        options.enableConsoleLog = YES;
    }

    BOOL sandBox = [otherConfig objectForKey:@"easeSandBox"] && [[otherConfig objectForKey:@"easeSandBox"] boolValue];
    if (!sandBox) {
        [[EMClient sharedClient] initializeSDKWithOptions:options];
    }
}

- (void)hyphenateApplication:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo
{
    [[EMClient sharedClient] application:application didReceiveRemoteNotification:userInfo];
}

- (void)dealloc
{

}

#pragma mark - send message

+ (EMMessage *)sendTextMessage:(NSString *)text
                            to:(NSString *)toUser
                   messageType:(EMChatType)messageType
                    messageExt:(NSDictionary *)messageExt

{
    NSString *willSendText = [EaseConvertToCommonEmoticonsHelper convertToCommonEmoticons:text];
    EMTextMessageBody *body = [[EMTextMessageBody alloc] initWithText:willSendText];
    NSString *from = [[EMClient sharedClient] currentUsername];
    EMMessage *message = [[EMMessage alloc] initWithConversationID:toUser from:from to:toUser body:body ext:messageExt];
    message.chatType = messageType;

    return message;
}

+ (EMMessage *)sendCmdMessage:(NSString *)action
                            to:(NSString *)to
                   messageType:(EMChatType)messageType
                    messageExt:(NSDictionary *)messageExt
                     cmdParams:(NSArray *)params
{
    EMCmdMessageBody *body = [[EMCmdMessageBody alloc] initWithAction:action];
    if (params) {
        body.params = params;
    }
    NSString *from = [[EMClient sharedClient] currentUsername];
    EMMessage *message = [[EMMessage alloc] initWithConversationID:to from:from to:to body:body ext:messageExt];
    message.chatType = messageType;

    return message;
}

+ (EMMessage *)sendLocationMessageWithLatitude:(double)latitude
                                     longitude:(double)longitude
                                       address:(NSString *)address
                                            to:(NSString *)to
                                   messageType:(EMChatType)messageType
                                    messageExt:(NSDictionary *)messageExt
{
    EMLocationMessageBody *body = [[EMLocationMessageBody alloc] initWithLatitude:latitude longitude:longitude address:address];
    NSString *from = [[EMClient sharedClient] currentUsername];
    EMMessage *message = [[EMMessage alloc] initWithConversationID:to from:from to:to body:body ext:messageExt];
    message.chatType = messageType;

    return message;
}

+ (EMMessage *)sendImageMessageWithImageData:(NSData *)imageData
                                          to:(NSString *)to
                                 messageType:(EMChatType)messageType
                                  messageExt:(NSDictionary *)messageExt
{
    EMImageMessageBody *body = [[EMImageMessageBody alloc] initWithData:imageData displayName:@"image.png"];
    NSString *from = [[EMClient sharedClient] currentUsername];
    EMMessage *message = [[EMMessage alloc] initWithConversationID:to from:from to:to body:body ext:messageExt];
    message.chatType = messageType;

    return message;
}

+ (EMMessage *)sendImageMessageWithImage:(UIImage *)image
                                      to:(NSString *)to
                             messageType:(EMChatType)messageType
                              messageExt:(NSDictionary *)messageExt
{
    NSData *data = UIImageJPEGRepresentation(image, 1);

    return [self sendImageMessageWithImageData:data to:to messageType:messageType messageExt:messageExt];
}

+ (EMMessage *)sendVoiceMessageWithLocalPath:(NSString *)localPath
                                    duration:(NSInteger)duration
                                          to:(NSString *)to
                                 messageType:(EMChatType)messageType
                                  messageExt:(NSDictionary *)messageExt
{
    EMVoiceMessageBody *body = [[EMVoiceMessageBody alloc] initWithLocalPath:localPath displayName:@"audio"];
    body.duration = (int)duration;
    NSString *from = [[EMClient sharedClient] currentUsername];
    EMMessage *message = [[EMMessage alloc] initWithConversationID:to from:from to:to body:body ext:messageExt];
    message.chatType = messageType;

    return message;
}

+ (EMMessage *)sendVideoMessageWithURL:(NSURL *)url
                                    to:(NSString *)to
                           messageType:(EMChatType)messageType
                            messageExt:(NSDictionary *)messageExt
{
    EMVideoMessageBody *body = [[EMVideoMessageBody alloc] initWithLocalPath:[url path] displayName:@"video.mp4"];
    NSString *from = [[EMClient sharedClient] currentUsername];
    EMMessage *message = [[EMMessage alloc] initWithConversationID:to from:from to:to body:body ext:messageExt];
    message.chatType = messageType;

    return message;
}

@end


text:
package no.torand.surfsentry.domain;

import java.time.LocalTime;
import java.time.format.DateTimeFormatter;

public class TimeInterval {
    private final LocalTime from;
    private final LocalTime to;

    public static TimeInterval valueOf(String value) {
        if (value.length() != 5 && value.indexOf("-") != 2) {
            throw new IllegalArgumentException("Not recognizable as a time interval string on the form \"hh-hh\": " + value);
        }
        String hourFrom = value.substring(0, 2);
        String hourTo = value.substring(3, 5);

        return new TimeInterval(Integer.valueOf(hourFrom), Integer.valueOf(hourTo));
    }

    public TimeInterval(int hoursFrom, int hoursTo) {
        this.from = LocalTime.of(hoursFrom, 0, 0);
        this.to = LocalTime.of(hoursTo, 59, 59);
    }

    public boolean containsNow() {
        LocalTime now = LocalTime.now();
        return from.isBefore(now) && to.isAfter(now);
    }

    @Override
    public String toString() {
        DateTimeFormatter formatter = DateTimeFormatter.ISO_TIME;
        return from.format(formatter) + "-" + to.format(formatter);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof TimeInterval)) return false;

        TimeInterval that = (TimeInterval) o;

        if (!from.equals(that.from)) return false;
        return to.equals(that.to);

    }

    @Override
    public int hashCode() {
        int result = from.hashCode();
        result = 31 * result + to.hashCode();
        return result;
    }
}


text:
/*******************************************************************************
 * \file flight_controller.hpp
 *
 * \author MAV'RIC Team
 * \author Julien Lecoeur
 *
 * \brief   Interface for flight controllers
 *
 ******************************************************************************/

#ifndef FLIGHT_CONTROLLER_HPP_
#define FLIGHT_CONTROLLER_HPP_

#include "control/controller.hpp"
#include "manual_control/manual_control.hpp"
#include "flight_controller/flight_command_source.hpp"

/**
 * \brief   Interface for flight controllers
 */
class Flight_controller: public Controller<position_command_t>,
                         public Controller<velocity_command_t>,
                         public Controller<attitude_command_t>,
                         public Controller<rate_command_t>,
                         public Controller<torque_command_t>,
                         public Controller<thrust_command_t>
{
public:
    /**
     * \brief   Main update function
     */
    virtual bool update(void) = 0;

    /**
     * \brief   Sets actuators in safety mode
     */
    virtual bool failsafe(void) = 0;

    /**
     * \brief   Set of command setters
     */
    virtual bool set_command(const position_command_t& command) = 0;
    virtual bool set_command(const velocity_command_t& command) = 0;
    virtual bool set_command(const attitude_command_t& command) = 0;
    virtual bool set_command(const rate_command_t& command) = 0;
    virtual bool set_command(const torque_command_t& command) = 0;
    virtual bool set_command(const thrust_command_t& command) = 0;

    /**
     * \brief   Set command from manual control in rate mode
     *
     * \param   manual_control  Reference to manual_control
     */
    virtual bool set_manual_rate_command(const Manual_control& manual_control) = 0;

    /**
     * \brief   Set command from manual control in attitude mode
     *
     * \param   manual_control  Reference to manual_control
     */
    virtual bool set_manual_attitude_command(const Manual_control& manual_control) = 0;

    /**
     * \brief   Set command from manual control in velocity mode
     *
     * \param   manual_control  Reference to manual_control
     */
    virtual bool set_manual_velocity_command(const Manual_control& manual_control) = 0;

    /**
     * \brief   Set command from autonomous command source
     *
     * \param   command_source  Reference to source of control command
     */
    virtual bool set_flight_command(const Flight_command_source& command_source)
    {
        return command_source.write_flight_command(*this);
    };

    /**
     * \brief  Get const reference to command structure
     */
    const command_t& command(void) const
    {
        return command_;
    }

protected:
    command_t command_;
};

#endif  // FLIGHT_CONTROLLER_HPP_


text:
from optparse import make_option

from django.core.management.base import BaseCommand

import commonware.log

from amo.utils import chunked
from mkt.constants.base import LOGIN_SOURCE_FXA
from mkt.users.models import UserProfile
from mkt.users.tasks import fxa_email_types, send_fxa_mail
from mkt.webapps.models import AddonUser

log = commonware.log.getLogger('z.users')

def get_user_ids(is_developers):
    developer_ids = (AddonUser.objects
                     .values_list('user_id', flat=True)
                     .distinct())
    if is_developers:
        return list(developer_ids.exclude(user__source=LOGIN_SOURCE_FXA))

    user_ids = (UserProfile.objects
                .exclude(source=LOGIN_SOURCE_FXA)
                .values_list('id', flat=True))
    return list(set(user_ids).difference(set(developer_ids)))

class Command(BaseCommand):
    """
    A temporary management command to send emails to people throughout
    the Firefox Accounts transition.

    Type must be one of the email choices as specfied in the emails dict above.
    """
    option_list = BaseCommand.option_list + (
        make_option('--type', action='store', type='string',
                    dest='type', help='Type of email to send.'),
    )

    def handle(self, *args, **kwargs):
        mail_type = kwargs.get('type')
        if mail_type not in fxa_email_types:
            raise ValueError('{0} email not known.'.format(mail_type))

        audience, phase = mail_type.split('-')
        is_live = phase in ['during', 'after']
        is_developers = audience == 'developers'

        all_ids = get_user_ids(is_developers)

        log.info('Sending: {0} {1} emails'.format(len(all_ids), mail_type))
        for chunked_ids in chunked(all_ids, 100):
            send_fxa_mail.delay(chunked_ids, mail_type, is_live)


text:
<?php

namespace Maghead\Console\Command\SchemaCommand;

use Maghead\Console\Command\BaseCommand;
use Maghead\Generator\Schema\SchemaGenerator;
use Maghead\Schema\SchemaUtils;

/**
 * $ maghead schema build path/to/Schema path/to/SchemaDir.
 */
class BuildCommand extends BaseCommand
{
    public function usage()
    {
        return 'schema build [paths|classes]';
    }

    public function brief()
    {
        return 'build schema files.';
    }

    public function arguments($args)
    {
        $args->add('file')
            ->isa('file')
            ;
    }

    public function options($opts)
    {
        $opts->add('f|force', 'force generate all schema files.');
        parent::options($opts);
    }

    public function execute()
    {
        $args = func_get_args();
        $config = $this->getConfig();

        $this->logger->debug('Finding schemas...');
        $schemas = $this->loadSchemasFromArguments($args);

        $generator = new SchemaGenerator($config);
        if ($this->options->force) {
            $generator->setForceUpdate(true);
        }

        $classMap = array();
        foreach ($schemas as $schema) {
            $cls = get_class($schema);

            if ($this->logger->isDebug()) {
                $this->logger->debug("Checking $cls");
            }

            if ($schema->virtual) {
                $this->logger->info("Skipping virtual $cls");
                continue;
            }

            $generated = $generator->generateSchemaFiles($schema);
            if (!empty($generated)) {
                if ($this->logger->isDebug()) {
                    // $filepath = str_replace(getcwd().'/', '', $schema->getClassFileName());
                    $this->logger->debug('Updated '.get_class($schema));
                    foreach ($generated as $class => $file) {
                        $this->logger->debug(' - Updated '.$file);
                    }
                } else {
                    $this->logger->info('Updated '.get_class($schema));
                }
                $classMap += $generated;
            }
        }
    }
}


text:
<?php

/**
 * Hosted Pro link infoblock
 *
 * @category   Mage
 * @package    Mage_Paypal
 * @author     Magento Core Team <core@magentocommerce.com>
 */
class Mage_Paypal_Block_Hosted_Pro_Info extends Mage_Paypal_Block_Payment_Info
{
    /**
     * Don't show CC type
     *
     * @return false
     */
    public function getCcTypeName()
    {
        return false;
    }
}


text:
package lab10;

public class Notify{

	public static void main(String args[]){
		Chat obj = new Chat();

		Thread1 t1 = new Thread1(obj);
		Thread2 t2 = new Thread2(obj);
	}

}


text:
function [metainfo, segmentPoints] = PulsePhaseEstimate(obj, qubit, direction, numPulses, amplitude)

[thisPath, ~] = fileparts(mfilename('fullpath'));
scriptName = fullfile(thisPath, 'PhaseEstimationSequence.py');
[status, result] = system(sprintf('python "%s" %s %s %d %f', scriptName, qubit, direction, numPulses, amplitude), '-echo');

segmentPoints = -1:0.25:numPulses+0.75;

metainfo = obj.getMetaInfo('RepeatCal');

end


text:
package models.organization

import models.{CourseId, QuizId}
import org.joda.time.DateTime

case class Course2Quiz(courseId: CourseId, quizId: QuizId, viewHide: Boolean, startDate: Option[DateTime], endDate: Option[DateTime]) {

  def isValidTime(access: models.Access, now: org.joda.time.DateTime) =
    if(access >= models.Edit) {
      true
    } else {
    (startDate, endDate) match {
      case (Some(start), Some(end)) => start.isBefore(now) && end.isAfter(now)
      case (Some(start), None     ) => start.isBefore(now)
      case (None,        Some(end)) =>                        end.isAfter(now)
      case (None,        None     ) => true
    }
  }

  def isInvalidTime(access: models.Access, now: org.joda.time.DateTime) = !isValidTime(access, now)

  def hide(access: models.Access) = (access <= models.View) && viewHide

  def show(access: models.Access) = !hide(access)

  def currentlyHidden(access: models.Access, now: org.joda.time.DateTime) = isInvalidTime(access, now) || hide(access)

}


text:
<?php
require_once("../../util/inc.php");
require_once("../../util/thirdparty/stemming/StemmingFactory.class.php");
header("Content-Type: application/rss+xml; charset=utf-8");

$self = HTTP_ROOT . "/interfaces/rss/tag.php";
if ($_SERVER["QUERY_STRING"]) {
	$self .= "?" . htmlspecialchars($_SERVER["QUERY_STRING"]);
}

$tag = strtolower(getArrayElement($_GET, "tag"));

if (!getArrayElement($_GET, "noCache")) {
	setDBCacheTimeout(600);
}

printXMLHeader();
?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title><![CDATA[Twick.it - <?php loc('rss.topicsByTag', $tag) ?>]]></title>
    <link><?php echo(HTTP_ROOT) ?></link>
    <description><![CDATA[<?php loc('rss.topicsByTag', $tag) ?>]]></description>
    <language><?php echo(getLanguage()) ?></language>
    <copyright>Twick.it</copyright>
    <atom:link href="<?php echo($self) ?>" rel="self" type="application/rss+xml" />
    <!-- <pubDate>Erstellungsdatum("Tue, 8 Jul 2008 2:43:19")</pubDate>-->

 	<?php
	foreach(Topic::findRelatedTopicsByTitle(StemmingFactory::stem($tag)) as $topic) {
		$twick = $topic->findBestTwick();
		$user = $twick->findUser();
	?>
    <item>
      <title><![CDATA[<?php echo($topic->getTitle()) ?>]]></title>
      <description><![CDATA[<?php echo($twick->getLongText()) ?>]]></description>
      <link><?php echo($topic->getUrl()) ?></link>
      <author><![CDATA[noreply@twick.it (<?php echo($user->getDisplayName()) ?>)]]></author>
      <guid><?php echo($topic->getUrl()) ?></guid>
      <pubDate><?php echo(convertDateForRss($twick->getCreationDate())) ?></pubDate>
    </item>
 	<?php
	}
	?>
  </channel>
</rss>


text:
<resources>
  <string name="app_name">DragSelectRecyclerView</string>
  <string name="cab_title_x">Selection (%1$d)</string>
  <string name="done">Done</string>
  <string name="range_selection">Range Selection</string>
  <string name="path_selection">Path Selection</string>
</resources>


text:
package org.apache.spark.sql.execution.command

import org.scalactic.source.Position
import org.scalatest.Tag

import org.apache.spark.sql.{QueryTest, Row}
import org.apache.spark.sql.catalyst.analysis.NoSuchNamespaceException
import org.apache.spark.sql.connector.catalog.CatalogV2Implicits._
import org.apache.spark.sql.internal.SQLConf
import org.apache.spark.sql.test.SQLTestUtils
import org.apache.spark.sql.types.StructType

trait ShowTablesSuiteBase extends QueryTest with SQLTestUtils {
  protected def version: String
  protected def catalog: String
  protected def defaultNamespace: Seq[String]
  protected def defaultUsing: String
  case class ShowRow(namespace: String, table: String, isTemporary: Boolean)
  protected def getRows(showRows: Seq[ShowRow]): Seq[Row]
  // Gets the schema of `SHOW TABLES`
  protected def showSchema: StructType

  protected def runShowTablesSql(sqlText: String, expected: Seq[ShowRow]): Unit = {
    val df = spark.sql(sqlText)
    assert(df.schema === showSchema)
    checkAnswer(df, getRows(expected))
  }

  override def test(testName: String, testTags: Tag*)(testFun: => Any)
      (implicit pos: Position): Unit = {
    super.test(s"SHOW TABLES $version: " + testName, testTags: _*)(testFun)
  }

  test("show an existing table") {
    withNamespace(s"$catalog.ns") {
      sql(s"CREATE NAMESPACE $catalog.ns")
      withTable(s"$catalog.ns.table") {
        sql(s"CREATE TABLE $catalog.ns.table (name STRING, id INT) $defaultUsing")
        runShowTablesSql(s"SHOW TABLES IN $catalog.ns", Seq(ShowRow("ns", "table", false)))
      }
    }
  }

  test("show table in a not existing namespace") {
    val msg = intercept[NoSuchNamespaceException] {
      runShowTablesSql(s"SHOW TABLES IN $catalog.unknown", Seq())
    }.getMessage
    assert(msg.matches("(Database|Namespace) 'unknown' not found;"))
  }

  test("show tables with a pattern") {
    withNamespace(s"$catalog.ns1", s"$catalog.ns2") {
      sql(s"CREATE NAMESPACE $catalog.ns1")
      sql(s"CREATE NAMESPACE $catalog.ns2")
      withTable(
        s"$catalog.ns1.table",
        s"$catalog.ns1.table_name_1a",
        s"$catalog.ns1.table_name_2b",
        s"$catalog.ns2.table_name_2b") {
        sql(s"CREATE TABLE $catalog.ns1.table (id bigint, data string) $defaultUsing")
        sql(s"CREATE TABLE $catalog.ns1.table_name_1a (id bigint, data string) $defaultUsing")
        sql(s"CREATE TABLE $catalog.ns1.table_name_2b (id bigint, data string) $defaultUsing")
        sql(s"CREATE TABLE $catalog.ns2.table_name_2b (id bigint, data string) $defaultUsing")

        runShowTablesSql(
          s"SHOW TABLES FROM $catalog.ns1",
          Seq(
            ShowRow("ns1", "table", false),
            ShowRow("ns1", "table_name_1a", false),
            ShowRow("ns1", "table_name_2b", false)))

        runShowTablesSql(
          s"SHOW TABLES FROM $catalog.ns1 LIKE '*name*'",
          Seq(
            ShowRow("ns1", "table_name_1a", false),
            ShowRow("ns1", "table_name_2b", false)))

        runShowTablesSql(
          s"SHOW TABLES FROM $catalog.ns1 LIKE 'table_name_1*|table_name_2*'",
          Seq(
            ShowRow("ns1", "table_name_1a", false),
            ShowRow("ns1", "table_name_2b", false)))

        runShowTablesSql(
          s"SHOW TABLES FROM $catalog.ns1 LIKE '*2b'",
          Seq(ShowRow("ns1", "table_name_2b", false)))
      }
    }
  }

  test("show tables with current catalog and namespace") {
    withSQLConf(SQLConf.DEFAULT_CATALOG.key -> catalog) {
      val tblName = (catalog +: defaultNamespace :+ "table").quoted
      withTable(tblName) {
        sql(s"CREATE TABLE $tblName (name STRING, id INT) $defaultUsing")
        val ns = defaultNamespace.mkString(".")
        runShowTablesSql("SHOW TABLES", Seq(ShowRow(ns, "table", false)))
      }
    }
  }

  test("change current catalog and namespace with USE statements") {
    withNamespace(s"$catalog.ns") {
      sql(s"CREATE NAMESPACE $catalog.ns")
      withTable(s"$catalog.ns.table") {
        sql(s"CREATE TABLE $catalog.ns.table (name STRING, id INT) $defaultUsing")

        sql(s"USE $catalog")
        // No table is matched since the current namespace is not ["ns"]
        assert(defaultNamespace != Seq("ns"))
        runShowTablesSql("SHOW TABLES", Seq())

        // Update the current namespace to match "ns.tbl".
        sql(s"USE $catalog.ns")
        runShowTablesSql("SHOW TABLES", Seq(ShowRow("ns", "table", false)))
      }
    }
  }
}


text:
using System;
using System.Collections.Generic;
using System.Globalization;
using Xunit;
using DynamicaLabs.Tools;
using System.Linq;

namespace DynamicaLabs.XrmTools.Tests
{
    public class JsonSettingsProviderTests
    {
        private static readonly IFileProvider Provider = new PhysicalFileProvider();

        private static readonly JsonSettingsProvider JsonSettingsProvider = new JsonSettingsProvider(Provider,
            "settings.json");

        [Fact]
        public void TestGetSingle()
        {
            Assert.Equal("value1", JsonSettingsProvider.Get("test1"));
        }

        [Fact]
        public void TestSetSingle()
        {
            JsonSettingsProvider.Set(new KeyValuePair<string, string>("test11", "value2"));
            Assert.Equal("value2", JsonSettingsProvider.Get("test11"));
        }

        [Fact]
        public void TestGetMany()
        {
            var settings = JsonSettingsProvider.GetMany(new[] {"test1", "test2", "test3"}).ToList();
            Assert.Equal(3, settings.Count);
            Assert.False(settings.Any(it => it.Value == null));
            for (var i = 1; i <= 3; i++)
            {
                Assert.Contains($"value{i}", settings.Select(it => it.Value));
            }
        }

        [Fact]
        public void TestSetMany()
        {
            var val = DateTime.Now;
            JsonSettingsProvider.SetMany(new[]
            {
                new KeyValuePair<string, string>("to-set1", val.ToString(CultureInfo.InvariantCulture) + "1"),
                new KeyValuePair<string, string>("to-set2", val.ToString(CultureInfo.InvariantCulture) + "2"),
                new KeyValuePair<string, string>("to-set3", val.ToString(CultureInfo.InvariantCulture) + "3")
            });
            var settings =
                JsonSettingsProvider.GetMany(new[] {"test1", "test2", "test3", "to-set1", "to-set2", "to-set3"})
                    .ToList();
            Assert.Equal(6, settings.Count);
            Assert.False(settings.Any(it => it.Value == null));
            for (var i = 1; i <= 3; i++)
            {
                Assert.Contains($"value{i}", settings.Select(it => it.Value));
                Assert.Contains($"{val.ToString(CultureInfo.InvariantCulture)}{i}", settings.Select(it => it.Value));
            }
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright 2005-2014 The Kuali Foundation

 Licensed under the Educational Community 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.opensource.org/licenses/ecl1.php

 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.
-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans.xsd">
    <bean id="CoiNoteType" parent="CoiNoteType-parentBean" />
    <bean id="CoiNoteType-parentBean" abstract="true" parent="BusinessObjectEntry">
        <property name="businessObjectClass" value="org.kuali.kra.coi.CoiNoteType" />
        <property name="objectLabel" value="COI Note Type" />
        <property name="inquiryDefinition" >
            <ref bean="CoiNoteType-inquiryDefinition" />
        </property>
        <property name="lookupDefinition" >
            <ref bean="CoiNoteType-lookupDefinition" />
        </property>
        <property name="titleAttribute" value="noteTypeCode" />
        <property name="attributes" >
            <list>
                <ref bean="CoiNoteType-noteTypeCode" />
                <ref bean="CoiNoteType-description" />
                <ref bean="CoiNoteType-sortId" />
                <ref bean="CoiNoteType-active"/>
                <ref bean="CoiNoteType-versionNumber" />
            </list>
        </property>
    </bean>

    <!-- Attribute Definitions -->
    <bean id="CoiNoteType-noteTypeCode" parent="CoiNoteType-noteTypeCode-parentBean" />
    <bean id="CoiNoteType-noteTypeCode-parentBean" abstract="true" parent="AttributeDefinition" >
        <property name="name" value="noteTypeCode" />
        <property name="forceUppercase" value="false" />
        <property name="label" value="Note Type Code" />
        <property name="shortLabel" value="Note Type Code" />
        <property name="maxLength" value="3" />
        <property name="validationPattern" >
            <bean parent="NumericValidationPattern" />
        </property>
    <property name="validCharactersConstraint">
      <bean parent="NumericPatternConstraint"/>
    </property>
        <property name="control" >
      <bean parent="TextControlDefinition" p:size="3"/>
    </property>
    <property name="controlField">
      <bean p:size="3" parent="Uif-TextControl"/>
        </property>
        <property name="summary" value="Note Type Code" />
        <property name="description" value="Note Type Code" />
    </bean>

    <bean id="CoiNoteType-description" parent="CoiNoteType-description-parentBean" />
    <bean id="CoiNoteType-description-parentBean" abstract="true" parent="AttributeDefinition" >
        <property name="name" value="description" />
        <property name="forceUppercase" value="false" />
        <property name="label" value="Note Type Description" />
        <property name="shortLabel" value="Note Type Descr" />
        <property name="maxLength" value="20" />
        <property name="validationPattern" >
            <bean parent="AlphaNumericValidationPattern" p:allowWhitespace="true"/>
        </property>
    <property name="validCharactersConstraint">
      <bean parent="AlphaNumericPatternConstraint">
        <property name="allowWhitespace" value="true"/>
      </bean>
    </property>
        <property name="control" >
      <bean parent="TextControlDefinition" p:size="20"/>
    </property>
    <property name="controlField">
      <bean p:size="20" parent="Uif-TextControl"/>
        </property>
        <property name="summary" value="Note Type Descr" />
        <property name="description" value="Note Type Descr" />
    </bean>

    <bean id="CoiNoteType-active" parent="CoiNoteType-active-parentBean"/>
    <bean id="CoiNoteType-active-parentBean" abstract="true" parent="AttributeReferenceDummy-genericBoolean">
      <property name="name" value="active"/>
      <property name="label" value="Is Active"/>
      <property name="shortLabel" value="Is Active"/>
      <property name="summary" value="Is Active"/>
      <property name="description" value="Is Active"/>
    </bean>

    <bean id="CoiNoteType-sortId" parent="CoiNoteType-sortId-parentBean" />
    <bean id="CoiNoteType-sortId-parentBean" abstract="true" parent="AttributeDefinition" >
        <property name="name" value="sortId" />
        <property name="forceUppercase" value="false" />
        <property name="label" value="Sort Id" />
        <property name="shortLabel" value="Sort Id" />
        <property name="maxLength" value="3" />
        <property name="validationPattern" >
            <bean parent="NumericValidationPattern" />
        </property>
    <property name="validCharactersConstraint">
      <bean parent="NumericPatternConstraint"/>
    </property>
        <property name="control" >
      <bean parent="TextControlDefinition" p:size="3"/>
    </property>
    <property name="controlField">
      <bean p:size="3" parent="Uif-TextControl"/>
        </property>
        <property name="summary" value="Sort Id" />
        <property name="description" value="Sort Id" />
    </bean>

    <bean id="CoiNoteType-versionNumber" parent="CoiNoteType-versionNumber-parentBean" />
  <bean id="CoiNoteType-versionNumber-parentBean" abstract="true" parent="AttributeReferenceDummy-versionNumber"/>
    <!-- Business Object Inquiry Definition -->
    <bean id="CoiNoteType-inquiryDefinition" parent="CoiNoteType-inquiryDefinition-parentBean" />
  <bean id="CoiNoteType-InquiryView" parent="CoiNoteType-InquiryView-parentBean"/>
    <bean id="CoiNoteType-inquiryDefinition-parentBean" abstract="true" parent="InquiryDefinition">
        <property name="title" value="Note Type Code" />
        <property name="inquirySections" >
            <list>
                <bean parent="InquirySectionDefinition">
                    <property name="title" value="Note Type Code" />
                    <property name="numberOfColumns" value="1" />
                    <property name="inquiryFields" >
                        <list>
              <bean parent="FieldDefinition" p:attributeName="noteTypeCode" p:forceInquiry="true"/>
              <bean parent="FieldDefinition" p:attributeName="description"/>
              <bean parent="FieldDefinition" p:attributeName="active"/>
              <bean parent="FieldDefinition" p:attributeName="sortId"/>
            </list>
          </property>
        </bean>
      </list>
    </property>
  </bean>

  <bean id="CoiNoteType-InquiryView-parentBean" abstract="true" parent="Uif-InquiryView">
    <property name="headerText" value="Note Type Code"/>
    <property name="dataObjectClassName" value="org.kuali.kra.coi.CoiNoteType"/>
    <property name="items">
      <list>
        <bean parent="Uif-Disclosure-GridSection">
          <property name="headerText" value="Note Type Code"/>
          <property name="layoutManager.numberOfColumns" value="2"/>
          <property name="items">
            <list>
              <bean p:propertyName="noteTypeCode" parent="Uif-DataField"/>
              <bean p:propertyName="description" parent="Uif-DataField"/>
              <bean p:propertyName="active" parent="Uif-DataField"/>
              <bean p:propertyName="sortId" parent="Uif-DataField"/>
                        </list>
                    </property>
                </bean>
            </list>
        </property>
    </bean>

    <!-- Business Object Lookup Definition -->
    <bean id="CoiNoteType-lookupDefinition" parent="CoiNoteType-lookupDefinition-parentBean" />
  <bean id="CoiNoteType-LookupView" parent="CoiNoteType-LookupView-parentBean"/>
    <bean id="CoiNoteType-lookupDefinition-parentBean" abstract="true" parent="LookupDefinition">
        <property name="title" value="COI Note Type Lookup" /><property name="defaultSort" >
      <bean parent="SortDefinition"/>
        </property>
        <property name="lookupFields" >
            <list>
        <bean parent="FieldDefinition" p:attributeName="noteTypeCode" p:forceInquiry="true"/>
        <bean parent="FieldDefinition" p:attributeName="description"/>
        <bean parent="FieldDefinition" p:attributeName="active"/>
        <bean parent="FieldDefinition" p:attributeName="sortId"/>
      </list>
    </property>
    <property name="resultFields">
      <list>
        <bean parent="FieldDefinition" p:attributeName="noteTypeCode" p:forceInquiry="true"/>
        <bean parent="FieldDefinition" p:attributeName="description"/>
        <bean parent="FieldDefinition" p:attributeName="active"/>
        <bean parent="FieldDefinition" p:attributeName="sortId"/>
      </list>
    </property>
  </bean>

  <bean id="CoiNoteType-LookupView-parentBean" abstract="true" parent="Uif-LookupView">
    <property name="dataObjectClassName" value="org.kuali.kra.coi.CoiNoteType"/>
    <property name="headerText" value="COI Note Type Lookup"/>
    <property name="criteriaFields">
      <list>
        <bean p:propertyName="noteTypeCode" parent="Uif-LookupCriteriaInputField"/>
        <bean p:propertyName="description" parent="Uif-LookupCriteriaInputField"/>
        <bean p:propertyName="active" parent="Uif-LookupCriteriaInputField"/>
        <bean p:propertyName="sortId" parent="Uif-LookupCriteriaInputField"/>
            </list>
        </property>
        <property name="resultFields" >
            <list>
        <bean p:propertyName="noteTypeCode" parent="Uif-DataField"/>
        <bean p:propertyName="description" parent="Uif-DataField"/>
        <bean p:propertyName="active" parent="Uif-DataField"/>
        <bean p:propertyName="sortId" parent="Uif-DataField"/>
            </list>
        </property>
    </bean>
</beans>


text:
namespace Google.Cloud.Logging.V2.Snippets
{
    // [START logging_v2_generated_ConfigServiceV2_UpdateSink_async]
    using Google.Cloud.Logging.V2;
    using Google.Protobuf.WellKnownTypes;
    using System.Threading.Tasks;

    public sealed partial class GeneratedConfigServiceV2ClientSnippets
    {
        /// <summary>Snippet for UpdateSinkAsync</summary>
        /// <remarks>
        /// This snippet has been automatically generated and should be regarded as a code template only.
        /// It will require modifications to work:
        /// - It may require correct/in-range values for request initialization.
        /// - It may require specifying regional endpoints when creating the service client as shown in
        ///   https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
        /// </remarks>
        public async Task UpdateSinkRequestObjectAsync()
        {
            // Create client
            ConfigServiceV2Client configServiceV2Client = await ConfigServiceV2Client.CreateAsync();
            // Initialize request argument(s)
            UpdateSinkRequest request = new UpdateSinkRequest
            {
                SinkNameAsLogSinkName = LogSinkName.FromProjectSink("[PROJECT]", "[SINK]"),
                Sink = new LogSink(),
                UniqueWriterIdentity = false,
                UpdateMask = new FieldMask(),
            };
            // Make the request
            LogSink response = await configServiceV2Client.UpdateSinkAsync(request);
        }
    }
    // [END logging_v2_generated_ConfigServiceV2_UpdateSink_async]
}