text:
var url = "https://spreadsheets.google.com/feeds/list/19InJuGLdmjh-QpTaXixD3Iy88IZrKoHkOgQVxISTmlU/od6/public/values?alt=json";

 // array per contenere i dati/oggetto
var dati = [];
var scala = 30;

function setup() {
  pixelDensity(displayDensity());
  createCanvas(windowWidth, windowHeight);

  // richiedi i dati formato JSON e poi chiama la funzione gotSpreadsheet
  loadJSON(url, gotSpreadsheet);
  //print("ciao");
  colorMode(HSB);
  rectMode(CENTER);
} // setup()

function draw() {
  // piccolo loop per verificare di avere i dati,
  // stampa su schermo cerchi con i colori presenti nel google doc
  background(0,0,255);
  var padding = width/(dati.length+1);
  for (var i = 0; i < dati.length; i++) {
    fill(dati[i].hue,dati[i].saturation,dati[i].brightness);
    ellipse(padding + i * padding, height/2, sqrt(dati[i].raggio/PI)*scala, sqrt(dati[i].raggio/PI)*scala);
    stroke(90);
    line(padding + (i * padding) + 1, height/6,padding + i * padding, height/2,);
    fill(60);
  // function mousePressed() { ellipse(padding + i * padding, height/2, sqrt(dati[i].raggio/PI)*scala, sqrt(dati[i].raggio/PI)*scala); }

    noStroke();
    fill(0);
    //textAlign(CENTER, CENTER);
    //text(dati[i].colore, padding + (i * padding),height/3);
    push();
    translate(padding + (i * padding) + 1, height/3);
    rotate(-PI/2);
    fill(60);
    text(dati[i].colore, 0,0);
    textAlign(LEFT, CENTER);
    pop();
  }
  for (var i = 0; i < dati.length; i++) {
    fill(358,dati[i].decessi * 20,83, 100);
    ellipse(padding + i * padding, height/2, sqrt(dati[i].decessi/PI)*scala, sqrt(dati[i].decessi/PI)*scala);
    // if (dati[i].raggio < "15") {
  //  ellipse(padding + i * padding, height/2, dati[i].raggio * dati[i].raggio * PI);
//  } else if (dati[i].raggio > "20") {
  //  ellipse(padding + i * padding, height/2, (dati[i].raggio * dati[i].raggio) * PI, );
  //  }
    noStroke();
    fill(0);
    textAlign(CENTER, CENTER);
    textFont ("Titillium Web");
    textSize ("14");
  //  text(dati[i].colore, padding + (i * padding),height/3);

  }

  fill(358,94,80,100);
  ellipse (80,690, 15, 15);
  fill(60);
  text("decessi", 115, 690);
  fill(60);
  text("LEGENDA", 100, 660);

  fill(239,100,78,100);
  ellipse (80,710, 15, 15);
  fill(60);
  text("casi gravi", 120, 710);

} // draw()

function gotSpreadsheet(colori) {
  println(colori.feed.entry.length); // < debug, numero righe della tabella
  for (var i = 0; i < colori.feed.entry.length; i++) {
    // costruzione dell'oggetto singolo, la riga
    var colore = {
                  // dati, nomi delle colonne, i parametri
                  "colore": colori.feed.entry[i].gsx$colore.$t,
                  "hue": colori.feed.entry[i].gsx$hue.$t,
                  "saturation": colori.feed.entry[i].gsx$saturation.$t,
                  "brightness": colori.feed.entry[i].gsx$brightness.$t,
                  "alpha": colori.feed.entry[i].gsx$alpha.$t,
                  "forma": colori.feed.entry[i].gsx$forma.$t,
                  "raggio": colori.feed.entry[i].gsx$raggio.$t,
                  "decessi": colori.feed.entry[i].gsx$decessi.$t,
              }
              println(colore); // < debug, verifica oggetto 1x1
    dati.push(colore); // < inserimento nell'array del dato
  }
} // gotSpreadsheet(colori)

// se ridimensiona la finestra ricalcola width e height canvas
function windowResized() {
  resizeCanvas(windowWidth, windowHeight);
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using TreeDumpLibrary;

// https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x804 上介绍了"空白页"项模板

namespace WholebaycarNowawnawka
{
    /// <summary>
    /// 可用于自身或导航至 Frame 内部的空白页。
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            InitializeComponent();
            Loaded += MainPage_Loaded;
        }

        private void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            var xaml = VisualTreeDumper.DumpTree(this, null, Array.Empty<string>(), new AttachedProperty[0]);
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
NS_FT_BEGIN

// A ShaderNode which renders a provided Drawable
template <typename ShaderProgram>
class DrawableNode : public ShaderNode {
public:
    explicit DrawableNode(std::unique_ptr<Drawable> drawable, VertexShaderProgram* program = getShaderUtil<VertexShaderProgram>()) : ShaderNode(), drawable_(std::move(drawable)) {

    }

    virtual ~DrawableNode() {

    }

    virtual void draw() override {
        drawable_->draw();
    }

protected:
    std::unique_ptr<Drawable> drawable_;
};

NS_FT_END


text:
<?php

 	$va_messages = $this->getVar('messages');
 	$t_message = $this->getVar('message');
 	$va_snapshot = $t_message->get('set_snapshot');

 	$va_communication_ids = array();
 	foreach($va_messages[$t_message->get('transaction_id')] as $vn_i => $va_communication) {
 		$va_communication_ids[] = (int)$va_communication['communication_id'];
 	}

 	if (($vn_index = array_search($t_message->getPrimaryKey(), $va_communication_ids)) >= 0) {
		print "
";
		if ($vn_index > 0) {
			print "request, '', 'Sets', 'ViewMessage', array('communication_id' => $va_communication_ids[$vn_index - 1]))."\"); return false;'>‹ "._t('Previous')."";
		}else{
			print "‹ "._t('Previous');
		}
		print " | ";
		if ($vn_index < (sizeof($va_communication_ids) - 1)) {
			print "request, '', 'Sets', 'ViewMessage', array('communication_id' => $va_communication_ids[$vn_index + 1]))."\"); return false;'>"._t('Next')." ›";
		}else{
			print _t('Next')." ›";
		}
		print "
";
	}
 ?>

 <?php
	print caClientServicesFormatMessagePawtucket($this->request, $t_message->getFieldValuesArray(), array('replyButton' => ""._t('Reply').""));

	if (is_array($va_snapshot) && is_array($va_snapshot['items']) && sizeof($va_snapshot['items'])) {
		$va_ids = array();
		foreach($va_snapshot['items'] as $vn_id => $vn_dummy) { $va_ids[] = (int)$vn_id; }
		$t_object = new ca_objects();

		$qr_res = $t_object->makeSearchResult('ca_objects', $va_ids);
?>

		<?php print _t('Show attached media'); ?> ›

<?php
				while($qr_res->nextHit()) {
					$vs_representation_tag = $qr_res->getMediaTag('ca_object_representations.media', 'thumbnail');
					$vs_title = $qr_res->get('ca_objects.preferred_labels.name')."
";
					$vs_idno = $qr_res->get('ca_objects.idno')."
";
					$vn_object_id = $qr_res->get('ca_objects.object_id');
					$vn_representation_id = $qr_res->get('ca_object_representations.representation_id');

					$va_title = array();
?>

<?php
							if ($vs_representation_tag) {
								print caNavLink($this->request, $vs_representation_tag, '', 'Detail', 'Object', 'Show', array('object_id' => $vn_object_id));
							}

							if ($vs_title) {
								if (mb_strlen($vs_title) > 70) {
									$va_title[] = ''.mb_substr($vs_title, 0, 67).'...';
								} else {
									$va_title[] = ''.$vs_title.'';
								}
							}

							if ($vs_idno) {
								$va_title[] = ''._t('Id:').' '.$vs_idno;
							}
							$vs_title = join('
', $va_title);
?>

<?php print caNavLink($this->request, $vs_title, '', 'Detail', 'Object', 'Show', array('object_id' => $vn_object_id)); ?>

<?php
				}
?>

<?php
	}
?>


text:
package org.apache.ignite.internal;

import java.util.Collection;
import java.util.Collections;
import java.util.concurrent.Callable;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.CacheMode;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.configuration.IgniteConfiguration;
import org.junit.Test;

/**
 *
 */
public class IgniteClientReconnectBinaryContexTest extends IgniteClientReconnectAbstractTest {
    /** {@inheritDoc} */
    @Override protected int serverCount() {
        return 1;
    }

    /** {@inheritDoc} */
    @Override protected int clientCount() {
        return 1;
    }

    /** {@inheritDoc} */
    @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception {
        IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName);

        cfg.setPeerClassLoadingEnabled(false);

        return cfg;
    }

    /**
     * @throws Exception If failed.
     */
    @Test
    public void testReconnectCleaningUsersMetadata() throws Exception {
        Ignite client = grid(serverCount());

        assertTrue(client.cluster().localNode().isClient());

        Ignite srv = grid(0);

        CacheConfiguration<Integer, UserClass> cacheCfg = new CacheConfiguration<Integer, UserClass>()
            .setName(DEFAULT_CACHE_NAME)
            .setCacheMode(CacheMode.REPLICATED);

        IgniteCache<Integer, UserClass> cache = client.createCache(cacheCfg);

        Integer key = 1;
        UserClass val = new UserClass(1);

        cache.put(key, val); // For registering user types binary metadata

        reconnectServersRestart(log, client, Collections.singleton(srv), new Callable<Collection<Ignite>>() {
            @Override public Collection<Ignite> call() throws Exception {
                return Collections.singleton((Ignite)startGrid(0));
            }
        });

        cache = client.createCache(cacheCfg);

        cache.put(key, val);

        assertEquals(val, cache.get(key));
    }

    /** */
    private static class UserClass {
        /** */
        private final int field;

        /**
         * @param field Value.
         */
        private UserClass(int field) {
            this.field = field;
        }

        /** {@inheritDoc} */
        @Override public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;

            UserClass val = (UserClass)o;

            return field == val.field;
        }

        /** {@inheritDoc} */
        @Override public int hashCode() {
            return field;
        }
    }
}


text:
package com.huawei.streaming.window;

import java.util.ArrayDeque;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.huawei.streaming.event.IEvent;
import com.huawei.streaming.view.IDataCollection;
import com.huawei.streaming.view.IRenew;
import com.huawei.streaming.view.IView;
import com.huawei.streaming.view.ViewImpl;

/**
 * 根据事件来划分窗口,以特定的某个事件为分界来划分窗口
 */
public class EventBasedWindow extends ViewImpl implements IBatch, IWindow, IRenew
{

    /**
     * 序列化id
     */
    private static final long serialVersionUID = -6696709815769384593L;

    /**
     * 日志打印对象
     */
    private static final Logger LOG = LoggerFactory.getLogger(EventBasedWindow.class);

    /**
     * 窗口中上个批次中事件
     */
    private ArrayDeque<IEvent> lastBatch = null;

    /**
     * 窗口中当前批次中事件
     */
    private ArrayDeque<IEvent> curBatch = new ArrayDeque<IEvent>();

    /**
     * 窗口事件缓存集合
     */
    private IDataCollection dataCollection;

    /**
     * {@inheritDoc}
     */
    @Override
    public void update(IEvent[] newData, IEvent[] oldData)
    {
        if (null == newData || 0 == newData.length)
        {
            LOG.error("Input Length Batch Window newData is Null!");
            return;
        }

        //将事件加入有效数据中
        for (IEvent newEvent : newData)
        {
            //如果是标记事件,则将本批次的事件你发送出去
            if (newEvent.isFlagEvent())
            {
                sendBatchData();
            }
            else
            {
                curBatch.add(newEvent);
            }
        }
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void setDataCollection(IDataCollection dataCollection)
    {
        if (dataCollection == null)
        {
            LOG.error("Invalid dataCollection.");
            throw new IllegalArgumentException("Invalid dataCollection");
        }

        this.dataCollection = dataCollection;
    }

    /**
     * 返回窗口事件缓存集
     * @return 窗口事件缓存集
     */
    public IDataCollection getIDataCollection()
    {
        return dataCollection;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public void sendBatchData()
    {
        if (this.hasViews())
        {
            IEvent[] newData = null;
            IEvent[] oldData = null;
            if (!curBatch.isEmpty())
            {
                newData = curBatch.toArray(new IEvent[curBatch.size()]);
            }
            if ((lastBatch != null) && (!lastBatch.isEmpty()))
            {
                oldData = lastBatch.toArray(new IEvent[lastBatch.size()]);
            }

            if ((newData != null) || (oldData != null))
            {
                IDataCollection datacollection = getIDataCollection();
                if (datacollection != null)
                {
                    datacollection.update(newData, oldData);
                }

                updateChild(newData, oldData);

                LOG.debug("The batchdata has been send to childView.");
            }
        }

        lastBatch = curBatch;
        curBatch = new ArrayDeque<IEvent>();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public IView renewView()
    {
        EventBasedWindow renewWindow = new EventBasedWindow();

        IDataCollection datacollection = getIDataCollection();
        if (datacollection != null)
        {
            IDataCollection renewCollection = datacollection.renew();
            renewWindow.setDataCollection(renewCollection);
        }
        return renewWindow;
    }

}


text:
package com.lanceolata.zuo;

import java.util.Stack;

/**
 * Created by lance on 2017/6/9.
 */
public class Problem_01_02_TwoStacksImplementQueue {

    public static class TwoStacksQueue<T> {

        private Stack<T> data;
        private Stack<T> help;

        public TwoStacksQueue() {
            this.data = new Stack<T>();
            this.help = new Stack<T>();
        }

        public void push(T value) {
            data.push(value);
        }

        public T pop() {
            if (this.data.empty() && this.help.empty()) {
                throw new RuntimeException("Queue is empty");
            }

            while (!data.empty()) {
                this.help.push(this.data.pop());
            }
            return this.help.pop();
        }

        public T peek() {
            if (this.data.empty() && this.help.empty()) {
                throw new RuntimeException("Queue is empty");
            }

            while (!data.empty()) {
                this.help.push(this.data.pop());
            }
            return this.help.peek();
        }
    }

    public static void main(String[] args) {
        TwoStacksQueue test = new TwoStacksQueue<String>();
        test.push(1);
        System.out.println(test.peek());
        System.out.println(test.pop());
        test.push(2);
        test.push(3);
        System.out.println(test.peek());
        System.out.println(test.pop());
        System.out.println(test.peek());
        System.out.println(test.pop());
    }
}


text:
require File.dirname(__FILE__) + '/spec_helper'

describe "Stork::Resource::Timezone" do

end


text:
const LG = console.log; // eslint-disable-line no-console,no-unused-vars

const Instance = 'Partner';
const Table = 'partner';

module.exports = function (sequelize, DataTypes) {
  let Partner = sequelize.define(Instance, {
    partnerId: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      primaryKey: true,
      autoIncrement: true,
      field: 'partner_id',
      comment: 'partner_id',
    },
    partnerName: {
      type: DataTypes.STRING(100),
      allowNull: false,
      field: 'partner_name',
      comment: 'partner_name',
    },
    isCorporate: {
      type: DataTypes.CHAR(1),
      allowNull: false,
      field: 'is_corporate',
      comment: 'partner_company',
    },
    isClient: {
      type: DataTypes.CHAR(1),
      allowNull: false,
      field: 'is_client',
      comment: 'partner_client',
    },
    isSupplier: {
      type: DataTypes.CHAR(1),
      allowNull: false,
      field: 'is_supplier',
      comment: 'partner_supplier',
    },
    civilStatus: {
      type: DataTypes.CHAR(1),
      allowNull: true,
      field: 'civil_status',
      comment: 'partner_civil_status',
    },
    gender: {
      type: DataTypes.CHAR(1),
      allowNull: true,
      field: 'gender',
      comment: 'partner_gender',
    },
    nationality: {
      type: DataTypes.CHAR(2),
      allowNull: true,
      field: 'nationality',
      comment: 'partner_nationality',
    },
    citizenId: {
      type: DataTypes.STRING(15),
      allowNull: true,
      field: 'citizen_id',
      comment: 'partner_legal_id',
    },
    groupCode: {
      type: DataTypes.INTEGER(3),
      allowNull: true,
      field: 'group_code',
      comment: 'partner_group_code',
    },
    phonePrimary: {
      type: DataTypes.STRING(20),
      allowNull: true,
      field: 'phone_primary',
      comment: 'partner_telf_primary',
    },
    phoneSecondary: {
      type: DataTypes.STRING(20),
      allowNull: true,
      field: 'phone_secondary',
      comment: 'partner_telf_secundary',
    },
    phoneMobile: {
      type: DataTypes.STRING(20),
      allowNull: true,
      field: 'phone_mobile',
      comment: 'partner_celular_phone',
    },
    email: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'email',
      comment: 'partner_email',
    },
    webSite: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'web_site',
      comment: 'partner_webPage',
    },
    contactPerson: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'contact_person',
      comment: 'partner_contact_person',
    },
    notes: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'notes',
      comment: 'partner_notes',
    },
    salesRep: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'sales_rep',
      comment: 'partner_sales_person',
    },
    status: {
      type: DataTypes.CHAR(1),
      allowNull: false,
      field: 'status',
      comment: 'partner_status',
    },
    createdBy: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'created_by',
      comment: 'partner_create_by',
    },
    createdAt: {
      type: DataTypes.DATE,
      allowNull: false,
      field: 'createdAt',
      comment: 'partner_creation_date',
    },
    updatedAt: {
      type: DataTypes.DATE,
      allowNull: false,
      field: 'updatedAt',
      comment: 'partner_last_update',
    },
    deliveryCountry: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'delivery_country',
      comment: 'partner_country_acc',
    },
    deliveryState: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'delivery_state',
      comment: 'partner_state_acc',
    },
    deliveryCity: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'delivery_city',
      comment: 'partner_city_acc',
    },
    deliveryCounty: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'delivery_county',
      comment: 'partner_canton_acc',
    },
    deliveryParish: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'delivery_parish',
      comment: 'partner_parish_acc',
    },
    deliveryPostalCode: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'delivery_postal_code',
      comment: 'partner_postal_code_acc',
    },
    deliveryStreet: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'delivery_street',
      comment: 'street_acc',
    },
    deliveryStreetNo: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'delivery_street_no',
      comment: 'bulding_acc',
    },
    residenceCountry: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'residence_country',
      comment: 'country_res',
    },
    residenceState: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'residence_state',
      comment: 'state_res',
    },
    residenceCity: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'residence_city',
      comment: 'city_res',
    },
    residenceCounty: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'residence_county',
      comment: 'canton_res',
    },
    residenceParish: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'residence_parish',
      comment: 'parish_res',
    },
    residencePostalCode: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'residence_postal_code',
      comment: 'postal_code_res',
    },
    residenceStreet: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'residence_street',
      comment: 'street_res',
    },
    residenceStreetNo: {
      type: DataTypes.STRING(100),
      allowNull: true,
      field: 'residence_street_no',
      comment: 'bulding_res',
    },
  }, {
    tableName: Table,
    timestamps: true,
    paranoid: true,
  });

  return Partner;
};


text:
require 'test_helper'

class ActsAsVerifiedTest < ActiveSupport::TestCase
  def test_can_create_verification_through_model
      user = User.create
      new_verification = user.verifications.create
      assert new_verification.valid?
  end
  def test_instance_candidate_should_create_verified_instance
      user = User.new
      new_candidate = user.candidate()
      assert new_candidate.valid?
  end
end


text:
// This file is automatically generated.

package adila.db;

/*
 * Anydata iCraig CMP748
 *
 * DEVICE: CMP748
 * MODEL: CMP748
 */
final class cmp748_cmp748 {
    public static final String DATA = "Anydata|iCraig CMP748|";
}


text:
class FixViewCount < ActiveRecord::Migration
  def change
    Article.connection.execute('UPDATE articles SET view_count=0')
  end
end


text:
package com.amazonaws.services.codeartifact.model.transform;

import javax.annotation.Generated;

import com.amazonaws.SdkClientException;
import com.amazonaws.services.codeartifact.model.*;

import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;

/**
 * GetAuthorizationTokenRequestMarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class GetAuthorizationTokenRequestMarshaller {

    private static final MarshallingInfo<String> DOMAIN_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.QUERY_PARAM).marshallLocationName("domain").build();
    private static final MarshallingInfo<String> DOMAINOWNER_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.QUERY_PARAM).marshallLocationName("domain-owner").build();
    private static final MarshallingInfo<Long> DURATIONSECONDS_BINDING = MarshallingInfo.builder(MarshallingType.LONG)
            .marshallLocation(MarshallLocation.QUERY_PARAM).marshallLocationName("duration").build();

    private static final GetAuthorizationTokenRequestMarshaller instance = new GetAuthorizationTokenRequestMarshaller();

    public static GetAuthorizationTokenRequestMarshaller getInstance() {
        return instance;
    }

    /**
     * Marshall the given parameter object.
     */
    public void marshall(GetAuthorizationTokenRequest getAuthorizationTokenRequest, ProtocolMarshaller protocolMarshaller) {

        if (getAuthorizationTokenRequest == null) {
            throw new SdkClientException("Invalid argument passed to marshall(...)");
        }

        try {
            protocolMarshaller.marshall(getAuthorizationTokenRequest.getDomain(), DOMAIN_BINDING);
            protocolMarshaller.marshall(getAuthorizationTokenRequest.getDomainOwner(), DOMAINOWNER_BINDING);
            protocolMarshaller.marshall(getAuthorizationTokenRequest.getDurationSeconds(), DURATIONSECONDS_BINDING);
        } catch (Exception e) {
            throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
        }
    }

}


text:
FOUNDATION_EXPORT double QuillVersionNumber;

//! Project version string for Quill.
FOUNDATION_EXPORT const unsigned char QuillVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <Quill/PublicHeader.h>


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
    <type>com.microchip.mplab.nbide.embedded.makeproject</type>
    <configuration>
        <data xmlns="http://www.netbeans.org/ns/make-project/1">
            <name>PIC16F84ABlinky</name>
            <creation-uuid>f355d3b0-41ff-433a-bcf1-26ab9645f6f1</creation-uuid>
            <make-project-type>0</make-project-type>
            <c-extensions/>
            <cpp-extensions/>
            <header-extensions/>
            <asminc-extensions/>
            <sourceEncoding>ISO-8859-1</sourceEncoding>
            <make-dep-projects/>
            <sourceRootList/>
            <confList>
                <confElem>
                    <name>default</name>
                    <type>2</type>
                </confElem>
            </confList>
            <formatting>
                <project-formatting-style>false</project-formatting-style>
            </formatting>
        </data>
    </configuration>
</project>


text:
Minimal socket.io syntax compatible library for sending strings/JSON only
(binary compat stripped out).

I wanted a very lightweight client-side library compatible with
socket.io-server/client that easily could be "upgraded" to the full thing if
needed.

Tested with socket.io (server) 1.3.7 on Node.js 4.1.1.

## Features
* on
* emit
* connect

## How to use
Usage should hopefully be the same as with socket.io-client. If you find any
bugs, please report them.

To connect to the same host that the site is currently running on:
```javascript
var sock = io();
// or
var sock = io.connect();
```

To connect to a custom host:
```javascript
var sock = io('http://custom.host:7000');
// or
var sock = io.connect('http://custom.host:7000');
```

To register an event listener:
```javascript
sock.on('message', function(msg) {
    console.log(msg);
});
```

To send a message:
```javascript
sock.emit('message', 'Hello World!');
```

I also added a callback to the connect:
```javascript
// Passing null as URL argument to connect to current host
var sock = io(null, function() {
    // We're connected
});


text:
/* eslint-disable no-unused-vars */
import React from "react"
import CMS from "netlify-cms"
import "netlify-cms/dist/cms.css"


text:
		<?php
			require_once('./languages/language.php');
			if(isset($lang)){
				echo $lang["page_footer"];
			}
			else{
				echo "Nous vous remercions de tester notre jeu ! Afin que nous puissions l'améliorer, n'hésitez pas à nous faire part de vos idées d'amélioration ou bugs en ajoutant des « issues » ici.";
			}
			?>


text:
<?php
use PHPUnit\Framework\TestCase;
use Cygnite\Common\Pagination;
use Cygnite\Common\UrlManager\Url;
use Cygnite\Container\Container;
use Cygnite\Tests\Container\ContainerDependency;

class PaginationTest extends TestCase
{
    private $container;

    public function setUp()
    {
        $containerDependency = new ContainerDependency();
        $this->container = new Container(
            $containerDependency->getInjector(),
            $containerDependency->getDefinitiions(),
            $containerDependency->getControllerNamespace()
        );

        $this->container['request'] = \Cygnite\Http\Requests\Request::createFromGlobals();
        $this->container['router'] = $this->container->make(\Cygnite\Router\Router::class);
        $this->container['router']->setContainer($this->container);
        $this->container['router']->setRequest($this->container['request']);
        $this->url = new \Cygnite\Common\UrlManager\Url(new \Cygnite\Common\UrlManager\Manager($this->container));

        $this->container['request']->server->add('HTTP_HOST', 'localhost');
        $this->container['request']->server->add('REQUEST_URI', '/');
        Url::setBase('/cygnite/index.php/user');
    }

    public function testMakeMethod()
    {
        $pagination = Pagination::make(function ($p) {
            return $p;
        });
        $this->assertInstanceOf('Cygnite\Common\Pagination', $pagination);
    }

    public function testPagiationCreateLinks()
    {
        $pagination = new Pagination();
        $pagination->setTotalNumberOfPage(6);
        $pagination->setPerPage(2);

        $this->assertNotNull($pagination->createLinks());
        $this->assertEquals(
            trim("
 previous123next
"),
            trim($pagination->createLinks())
        );
    }
}

class User
{
    public $perPage = 2;
}


text:
$pluginVersion = "1"

#Setting this to true will alert you when there is a communication problem while posting plugin data to server
$heartbeat="true"
$displayName = "PostGresPortCheckPlugin" #Name of this plugin

$server = "localhost"	#Change this value to host
$port  = "5432"	#Change the port number (5432 by default)
$portStatus  = 1
$msg = ""

try
{
$conn = New-Object System.Net.Sockets.TcpClient($server, $port)
}
catch
{}

if ($conn.Connected) {
    $portStatus  = 1
	$msg = "Successfully connected to the port"
}
else
{
	$portStatus  = 0
	$msg = "Failed to connect to the port"
}

$data = "{""portStatus"":""$portStatus""}"

$toReturn = "{ `"version`" : `"$pluginVersion`",`"heartbeat`" : `"$heartbeat`",`"displayName`" : `"$displayName`",`"msg`" : `"$msg`",`"data`" : $data }"
Write-Host $toReturn


text:
/**
 * Created by Tom S.
 */

/*
interface jQueryStatic {
    parseJSON(json: string): any;
}
declare var $: jQueryStatic;
*/

/// <reference path="jQuery.d.ts"/>

interface IIdent {
    name: string;
    age: number;
}

class Human implements IIdent {
    public name: string;
    public age: number;
    private id: number;

    constructor(id: number, name: string, age: number) {
        this.id = id;
        this.name = name;
        this.age = age;
    }

    public sayMyName(): string {
        return this.name;
    }

    public convertStringToJSON(stringParam: string): string {
        return $.parseJSON(stringParam);
    }
}
let h1: IIdent;

h1 = new Human(1, "Tim Taler", 18);
console.log(h1.name);


text:
$ cd ~/IdeaProjects/bdp && cp ../dse-demo/target/dse-demo-1.0-SNAPSHOT.jar resources/solr/lib/ && cd -

insert into solr (id, json) values (1, '{"city":"brasilia","state":"df", "country":"brasil"}');

insert into solr (id, json) values (2, '{"city":"goiania","state":"go", "country":"brasil"}');

insert into solr (id, json) values (3, '{"city":"rio de janeiro","state":"rj", "country":"brasil"}');

$ export BLOG_PATH=/Users/edward/IdeaProjects/dse-demo/src/main/resources
$ ./create-schema.sh -t $BLOG_PATH/create-table.cql -x $BLOG_PATH/schema.xml -r $BLOG_PATH/solrconfig.xml -k blog.solr

create table post (id int primary key, post blob);

create table post (id int primary key, post text);

insert into post (id, post) values (5, textAsBlob('hello'));

insert into post (id, post) values (88, 0xcafe);

cd IdeaProjects/dse-demo/ && mvn package

cd ~/IdeaProjects/bdp && cp ../dse-demo/target/dse-demo-1.0-SNAPSHOT.jar resources/solr/lib/ && cd -

cd ~/IdeaProjects/bdp && cp ../dse-demo/target/dse-demo-1.0-SNAPSHOT.jar resources/solr/lib/

curl http://localhost:8983/solr/resource/blog.solr/solrconfig.xml --data-binary @solrconfig-json.xml -H 'Content-type:text/xml; charset=utf-8'

curl http://localhost:8983/solr/resource/blog.solr/schema.xml --data-binary @schema-json.xml -H 'Content-type:text/xml; charset=utf-8'
curl -X POST "http://localhost:8983/solr/admin/cores?action=CREATE&name=blog.solr"

curl http://localhost:8983/solr/resource/blog.post/solrconfig.xml --data-binary @solrconfig-avro.xml -H 'Content-type:text/xml; charset=utf-8'

curl http://localhost:8983/solr/resource/blog.post/schema.xml --data-binary @schema-avro.xml -H 'Content-type:text/xml; charset=utf-8'

curl -X POST "http://localhost:8983/solr/admin/cores?action=CREATE&name=blog.post"


text:
package com.github.hoqhuuep.islandcraft.bukkit;

import java.util.HashSet;
import java.util.Set;

import org.bukkit.Chunk;
import org.bukkit.World;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.world.ChunkLoadEvent;
import org.bukkit.event.world.WorldInitEvent;

import com.github.hoqhuuep.islandcraft.api.ICWorld;
import com.github.hoqhuuep.islandcraft.core.ICLogger;
import com.github.hoqhuuep.islandcraft.core.IslandCache;
import com.github.hoqhuuep.islandcraft.core.DefaultWorld;
import com.github.hoqhuuep.islandcraft.core.ICClassLoader;
import com.github.hoqhuuep.islandcraft.core.IslandDatabase;
import com.github.hoqhuuep.islandcraft.nms.BiomeGenerator;
import com.github.hoqhuuep.islandcraft.nms.NmsWrapper;

public class BiomeGeneratorListener implements Listener {
    private final Set<String> worldsDone;
    private final IslandCraftPlugin islandCraft;
    private final IslandDatabase database;
    private final NmsWrapper nms;
    private final IslandCache cache;
    private final ICClassLoader classLoader;

    public BiomeGeneratorListener(final IslandCraftPlugin plugin, final IslandDatabase database, final NmsWrapper nms) {
        this.islandCraft = plugin;
        this.database = database;
        this.nms = nms;
        if (!islandCraft.getConfig().contains("worlds") || !islandCraft.getConfig().isConfigurationSection("worlds")) {
            ICLogger.logger.warning("No configuration section for 'worlds' found in config.yml");
            throw new IllegalArgumentException("No configuration section for 'worlds' found in config.yml");
        }
        worldsDone = new HashSet<String>();
        cache = new IslandCache();
        classLoader = new ICClassLoader();
    }

    @EventHandler
    public void onWorldInit(final WorldInitEvent event) {
        final World world = event.getWorld();
        final String worldName = world.getName();
        if (worldsDone.contains(worldName)) {
            return;
        }
        islandCraft.reloadConfig();
        final ConfigurationSection worlds = islandCraft.getConfig().getConfigurationSection("worlds");
        if (worlds == null) {
            return;
        }
        final ConfigurationSection config = worlds.getConfigurationSection(worldName);
        if (config == null) {
            return;
        }
        ICLogger.logger.info("Installing biome generator in WorldInitEvent for world with name: " + worldName);
        final ICWorld icWorld = new DefaultWorld(worldName, world.getSeed(), database, new BukkitWorldConfig(worldName, config), cache, classLoader);
        final BiomeGenerator biomeGenerator = new IslandCraftBiomeGenerator(icWorld);
        nms.installBiomeGenerator(world, biomeGenerator);
        worldsDone.add(worldName);
        islandCraft.getIslandCraft().addWorld(icWorld);
    }

    @EventHandler
    public void onChunkLoad(final ChunkLoadEvent event) {
        // First time server is run it will generate some chunks to find spawn
        // point this happens before WorldInitEvent. This event catches the
        // first one of those chunks, applies the hack, and regenerates the
        // chunk with the new WorldChunkManager.
        final World world = event.getWorld();
        final String worldName = world.getName();
        if (worldsDone.contains(worldName)) {
            return;
        }
        final ConfigurationSection worlds = islandCraft.getConfig().getConfigurationSection("worlds");
        if (worlds == null) {
            return;
        }
        final ConfigurationSection config = worlds.getConfigurationSection(worldName);
        if (config == null) {
            return;
        }
        ICLogger.logger.info("Installing biome generator in ChunkLoadEvent for world with name: " + worldName);
        final ICWorld icWorld = new DefaultWorld(worldName, world.getSeed(), database, new BukkitWorldConfig(worldName, config), cache, classLoader);
        final BiomeGenerator biomeGenerator = new IslandCraftBiomeGenerator(icWorld);
        if (nms.installBiomeGenerator(world, biomeGenerator)) {
            // If this is the very first time, regenerate the chunk
            if (database.isEmpty(worldName)) {
                final Chunk chunk = event.getChunk();
                ICLogger.logger.info(String.format("Regenerating spawn chunk at x: %d, z: %d", chunk.getX(), chunk.getZ()));
                world.regenerateChunk(chunk.getX(), chunk.getZ());
            }
        }
        worldsDone.add(worldName);
        islandCraft.getIslandCraft().addWorld(icWorld);
    }
}


text:
CLI for Installr (http://installrapp.com/) API.

## Installation

    $ gem install installr

## Usage

### Authentication

1. Create new API token if you don't have one [https://www.installrapp.com/dashboard#/account](https://www.installrapp.com/dashboard#/account)
2. Run `installr init` This will prompt you to enter your API token and put it in `~/.installr` file.

### Create App

    $ installr create <app_name>

### List of Apps

    $ installr list

### App Details

    $ installr app

### Team Details

    $ installr team

### Invite Testers

    $ installr invite

## Contribution

Any pull requests, comments and recommendations are welcome.

    $ git clone git@github.com:attomos/installr.git
    $ cd installr
    $ bundle install
    $ rake build # or rake install

## Copyright

Copyright (c) 2014 Nattaphoom Ch.
See [LICENSE](https://github.com/attomos/installr/blob/master/LICENSE) for details.


text:
package main

import (
	"fmt"
	"net"
	"testing"
	"time"

	"os"
	"path/filepath"

	"github.com/golang/protobuf/proto"
	"github.com/hyperledger/fabric/core/chaincode"
	"github.com/hyperledger/fabric/core/chaincode/shim"
	"github.com/hyperledger/fabric/core/container"
	"github.com/hyperledger/fabric/core/crypto"
	"github.com/hyperledger/fabric/core/ledger"
	"github.com/hyperledger/fabric/core/util"
	"github.com/hyperledger/fabric/membersrvc/ca"
	pb "github.com/hyperledger/fabric/protos/peer"
	"github.com/op/go-logging"
	"github.com/spf13/viper"
	"golang.org/x/net/context"
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials"
	"google.golang.org/grpc/grpclog"

	"encoding/asn1"
	"reflect"
)

const (
	chaincodeStartupTimeoutDefault int = 5000
)

var (
	testLogger = logging.MustGetLogger("test")

	lis net.Listener

	administrator crypto.Client
	alice         crypto.Client
	bob           crypto.Client
	charlie       crypto.Client

	server *grpc.Server
	eca    *ca.ECA
	tca    *ca.TCA
	tlsca  *ca.TLSCA
)

func TestMain(m *testing.M) {
	removeFolders()
	setup()
	go initMemershipServices()

	fmt.Println("Wait for some secs for OBCCA")
	time.Sleep(2 * time.Second)

	go initVP()

	fmt.Println("Wait for some secs for VP")
	time.Sleep(2 * time.Second)

	go initChaincode()

	fmt.Println("Wait for some secs for Chaincode")
	time.Sleep(2 * time.Second)

	if err := initClients(); err != nil {
		panic(err)
	}

	fmt.Println("Wait for 10 secs for chaincode to be started")
	time.Sleep(10 * time.Second)

	ret := m.Run()

	closeListenerAndSleep(lis)

	removeFolders()
	os.Exit(ret)
}

func TestChaincode(t *testing.T) {
	// Administrator deploy the chaincode
	adminCert, err := administrator.GetTCertificateHandlerNext()
	if err != nil {
		t.Fatal(err)
	}

	if err := deploy(adminCert); err != nil {
		t.Fatal(err)
	}

	// Administrator assign role 'writer' to Alice
	aliceCert, err := alice.GetTCertificateHandlerNext()
	if err != nil {
		t.Fatal(err)
	}

	// This must fail
	if err := addRole(aliceCert, aliceCert, "writer"); err == nil {
		t.Fatal(err)
	}

	// This must succeed
	if err := addRole(adminCert, aliceCert, "writer"); err != nil {
		t.Fatal(err)
	}

	// Administrator assign role 'reader' to Bob
	bobCert, err := bob.GetTCertificateHandlerNext()
	if err != nil {
		t.Fatal(err)
	}

	// This must fail
	if err := addRole(bobCert, bobCert, "reader"); err == nil {
		t.Fatal(err)
	}

	// This must succeed
	if err := addRole(adminCert, bobCert, "reader"); err != nil {
		t.Fatal(err)
	}

	// Alice writes
	wValue := []byte("a")
	if err := write(alice, aliceCert, wValue); err != nil {
		t.Fatal(err)
	}

	// Bob reads
	var rValue []byte
	if rValue, err = read(bob, bobCert); err != nil {
		t.Fatal(err)
	}
	if !reflect.DeepEqual(wValue, rValue) {
		t.Fatal(fmt.Sprintf("Read value is different from what written [%s]!=[%s]", string(wValue), string(rValue)))
	}

	// Alice tries to read
	if _, err = read(alice, aliceCert); err == nil {
		t.Fatal(err)
	}

	// Bob tries to write
	if err = write(bob, bobCert, []byte("b")); err == nil {
		t.Fatal(err)
	}
}

func deploy(admCert crypto.CertificateHandler) error {
	// Prepare the spec. The metadata includes the identity of the administrator
	spec := &pb.ChaincodeSpec{
		Type:                 1,
		ChaincodeID:          &pb.ChaincodeID{Name: "mycc"},
		CtorMsg:              &pb.ChaincodeInput{Args: util.ToChaincodeArgs("init")},
		Metadata:             admCert.GetCertificate(),
		ConfidentialityLevel: pb.ConfidentialityLevel_PUBLIC,
	}

	// First build and get the deployment spec
	var ctx = context.Background()
	chaincodeDeploymentSpec, err := getDeploymentSpec(ctx, spec)
	if err != nil {
		return err
	}

	tid := chaincodeDeploymentSpec.ChaincodeSpec.ChaincodeID.Name

	// Now create the Transactions message and send to Peer.
	transaction, err := administrator.NewChaincodeDeployTransaction(chaincodeDeploymentSpec, tid)
	if err != nil {
		return fmt.Errorf("Error deploying chaincode: %s ", err)
	}

	ledger, err := ledger.GetLedger()
	ledger.BeginTxBatch("1")
	_, _, err = chaincode.Execute(ctx, chaincode.GetChain(chaincode.DefaultChain), transaction)
	if err != nil {
		return fmt.Errorf("Error deploying chaincode: %s", err)
	}
	ledger.CommitTxBatch("1", []*pb.Transaction{transaction}, nil, nil)

	return err
}

func addRole(admCert crypto.CertificateHandler, idCert crypto.CertificateHandler, role string) error {
	// Get a transaction handler to be used to submit the execute transaction
	// and bind the chaincode access control logic using the binding
	submittingCertHandler, err := administrator.GetTCertificateHandlerNext()
	if err != nil {
		return err
	}
	txHandler, err := submittingCertHandler.GetTransactionHandler()
	if err != nil {
		return err
	}
	binding, err := txHandler.GetBinding()
	if err != nil {
		return err
	}

	chaincodeInput := &pb.ChaincodeInput{Args: util.ToChaincodeArgs("addRole", string(idCert.GetCertificate()), role)}
	chaincodeInputRaw, err := proto.Marshal(chaincodeInput)
	if err != nil {
		return err
	}

	// Access control:
	// admCert signs admCert.GetCertificate() || chaincodeInputRaw || binding to confirm his identity
	sigma, err := admCert.Sign(append(admCert.GetCertificate(), append(chaincodeInputRaw, binding...)...))
	if err != nil {
		return err
	}

	rbacMetadata := RBACMetadata{admCert.GetCertificate(), sigma}
	rbacMetadataRaw, err := asn1.Marshal(rbacMetadata)
	if err != nil {
		return err
	}

	// Prepare spec and submit
	spec := &pb.ChaincodeSpec{
		Type:                 1,
		ChaincodeID:          &pb.ChaincodeID{Name: "mycc"},
		CtorMsg:              chaincodeInput,
		Metadata:             rbacMetadataRaw, // Proof of identity
		ConfidentialityLevel: pb.ConfidentialityLevel_PUBLIC,
	}

	var ctx = context.Background()
	chaincodeInvocationSpec := &pb.ChaincodeInvocationSpec{ChaincodeSpec: spec}

	tid := chaincodeInvocationSpec.ChaincodeSpec.ChaincodeID.Name

	// Now create the Transactions message and send to Peer.
	transaction, err := txHandler.NewChaincodeExecute(chaincodeInvocationSpec, tid)
	if err != nil {
		return fmt.Errorf("Error deploying chaincode: %s ", err)
	}

	ledger, err := ledger.GetLedger()
	ledger.BeginTxBatch("1")
	_, _, err = chaincode.Execute(ctx, chaincode.GetChain(chaincode.DefaultChain), transaction)
	if err != nil {
		return fmt.Errorf("Error deploying chaincode: %s", err)
	}
	ledger.CommitTxBatch("1", []*pb.Transaction{transaction}, nil, nil)

	return err
}

func write(invoker crypto.Client, invokerCert crypto.CertificateHandler, value []byte) error {
	// Get a transaction handler to be used to submit the execute transaction
	// and bind the chaincode access control logic using the binding

	submittingCertHandler, err := invoker.GetTCertificateHandlerNext()
	if err != nil {
		return err
	}
	txHandler, err := submittingCertHandler.GetTransactionHandler()
	if err != nil {
		return err
	}
	binding, err := txHandler.GetBinding()
	if err != nil {
		return err
	}

	chaincodeInput := &pb.ChaincodeInput{Args: util.ToChaincodeArgs("write", string(value))}
	chaincodeInputRaw, err := proto.Marshal(chaincodeInput)
	if err != nil {
		return err
	}

	// Access control:
	// invokerCert signs invokerCert.GetCertificate() || chaincodeInputRaw || binding to confirm his identity
	sigma, err := invokerCert.Sign(append(invokerCert.GetCertificate(), append(chaincodeInputRaw, binding...)...))
	if err != nil {
		return err
	}

	rbacMetadata := RBACMetadata{invokerCert.GetCertificate(), sigma}
	rbacMetadataRaw, err := asn1.Marshal(rbacMetadata)
	if err != nil {
		return err
	}

	// Prepare spec and submit
	spec := &pb.ChaincodeSpec{
		Type:                 1,
		ChaincodeID:          &pb.ChaincodeID{Name: "mycc"},
		CtorMsg:              chaincodeInput,
		Metadata:             rbacMetadataRaw,
		ConfidentialityLevel: pb.ConfidentialityLevel_PUBLIC,
	}

	var ctx = context.Background()
	chaincodeInvocationSpec := &pb.ChaincodeInvocationSpec{ChaincodeSpec: spec}

	tid := chaincodeInvocationSpec.ChaincodeSpec.ChaincodeID.Name

	// Now create the Transactions message and send to Peer.
	transaction, err := txHandler.NewChaincodeExecute(chaincodeInvocationSpec, tid)
	if err != nil {
		return fmt.Errorf("Error deploying chaincode: %s ", err)
	}

	ledger, err := ledger.GetLedger()
	ledger.BeginTxBatch("1")
	_, _, err = chaincode.Execute(ctx, chaincode.GetChain(chaincode.DefaultChain), transaction)
	if err != nil {
		return fmt.Errorf("Error deploying chaincode: %s", err)
	}
	ledger.CommitTxBatch("1", []*pb.Transaction{transaction}, nil, nil)

	return err

}

func read(invoker crypto.Client, invokerCert crypto.CertificateHandler) ([]byte, error) {
	// Get a transaction handler to be used to submit the query transaction
	// and bind the chaincode access control logic using the binding

	submittingCertHandler, err := invoker.GetTCertificateHandlerNext()
	if err != nil {
		return nil, err
	}
	txHandler, err := submittingCertHandler.GetTransactionHandler()
	if err != nil {
		return nil, err
	}
	binding, err := txHandler.GetBinding()
	if err != nil {
		return nil, err
	}

	chaincodeInput := &pb.ChaincodeInput{Args: util.ToChaincodeArgs("read")}
	chaincodeInputRaw, err := proto.Marshal(chaincodeInput)
	if err != nil {
		return nil, err
	}

	// Access control:
	// invokerCert signs invokerCert.GetCertificate() || chaincodeInputRaw || binding to confirm his identity
	sigma, err := invokerCert.Sign(append(invokerCert.GetCertificate(), append(chaincodeInputRaw, binding...)...))
	if err != nil {
		return nil, err
	}

	rbacMetadata := RBACMetadata{invokerCert.GetCertificate(), sigma}
	rbacMetadataRaw, err := asn1.Marshal(rbacMetadata)
	if err != nil {
		return nil, err
	}

	// Prepare spec and submit
	spec := &pb.ChaincodeSpec{
		Type:                 1,
		ChaincodeID:          &pb.ChaincodeID{Name: "mycc"},
		CtorMsg:              chaincodeInput,
		Metadata:             rbacMetadataRaw,
		ConfidentialityLevel: pb.ConfidentialityLevel_PUBLIC,
	}

	var ctx = context.Background()
	chaincodeInvocationSpec := &pb.ChaincodeInvocationSpec{ChaincodeSpec: spec}

	tid := chaincodeInvocationSpec.ChaincodeSpec.ChaincodeID.Name

	// Now create the Transactions message and send to Peer.
	transaction, err := txHandler.NewChaincodeQuery(chaincodeInvocationSpec, tid)
	if err != nil {
		return nil, fmt.Errorf("Error deploying chaincode: %s ", err)
	}

	ledger, err := ledger.GetLedger()
	ledger.BeginTxBatch("1")
	result, _, err := chaincode.Execute(ctx, chaincode.GetChain(chaincode.DefaultChain), transaction)
	if err != nil {
		return nil, fmt.Errorf("Error deploying chaincode: %s", err)
	}
	ledger.CommitTxBatch("1", []*pb.Transaction{transaction}, nil, nil)

	return result, err
}

func setup() {
	// Conf
	viper.SetConfigName("rbac") // name of config file (without extension)
	viper.AddConfigPath(".")    // path to look for the config file in
	err := viper.ReadInConfig() // Find and read the config file
	if err != nil {             // Handle errors reading the config file
		panic(fmt.Errorf("Fatal error config file [%s] \n", err))
	}

	// Logging
	var formatter = logging.MustStringFormatter(
		`%{color}[%{module}] %{shortfunc} [%{shortfile}] -> %{level:.4s} %{id:03x}%{color:reset} %{message}`,
	)
	logging.SetFormatter(formatter)

	logging.SetLevel(logging.DEBUG, "peer")
	logging.SetLevel(logging.DEBUG, "chaincode")
	logging.SetLevel(logging.DEBUG, "cryptoain")

	// Init the crypto layer
	if err := crypto.Init(); err != nil {
		panic(fmt.Errorf("Failed initializing the crypto layer [%s]", err))
	}

	hl := filepath.Join(os.TempDir(), "hyperledger")

	viper.Set("peer.fileSystemPath", filepath.Join(hl, "production"))
	viper.Set("server.rootpath", filepath.Join(hl, "ca"))

	removeFolders()
}

func initMemershipServices() {
	ca.CacheConfiguration() // Cache configuration
	eca = ca.NewECA(nil)
	tca = ca.NewTCA(eca)
	tlsca = ca.NewTLSCA(eca)

	var opts []grpc.ServerOption
	if viper.GetBool("peer.pki.tls.enabled") {
		// TLS configuration
		creds, err := credentials.NewServerTLSFromFile(
			filepath.Join(viper.GetString("server.rootpath"), "tlsca.cert"),
			filepath.Join(viper.GetString("server.rootpath"), "tlsca.priv"),
		)
		if err != nil {
			panic("Failed creating credentials for OBC-CA: " + err.Error())
		}
		opts = []grpc.ServerOption{grpc.Creds(creds)}
	}

	fmt.Printf("open socket...\n")
	sockp, err := net.Listen("tcp", viper.GetString("server.port"))
	if err != nil {
		panic("Cannot open port: " + err.Error())
	}
	fmt.Printf("open socket...done\n")

	server = grpc.NewServer(opts...)

	eca.Start(server)
	tca.Start(server)
	tlsca.Start(server)

	fmt.Printf("start serving...\n")
	server.Serve(sockp)
}

func initVP() {
	var opts []grpc.ServerOption
	if viper.GetBool("peer.tls.enabled") {
		creds, err := credentials.NewServerTLSFromFile(viper.GetString("peer.tls.cert.file"), viper.GetString("peer.tls.key.file"))
		if err != nil {
			grpclog.Fatalf("Failed to generate credentials %v", err)
		}
		opts = []grpc.ServerOption{grpc.Creds(creds)}
	}
	grpcServer := grpc.NewServer(opts...)

	//lis, err := net.Listen("tcp", viper.GetString("peer.address"))

	//use a different address than what we usually use for "peer"
	//we override the peerAddress set in chaincode_support.go
	// FIXME: Use peer.GetLocalAddress()
	peerAddress := "0.0.0.0:40404"
	var err error
	lis, err = net.Listen("tcp", peerAddress)
	if err != nil {
		return
	}

	getPeerEndpoint := func() (*pb.PeerEndpoint, error) {
		return &pb.PeerEndpoint{ID: &pb.PeerID{Name: "testpeer"}, Address: peerAddress}, nil
	}

	ccStartupTimeout := time.Duration(chaincodeStartupTimeoutDefault) * time.Millisecond
	userRunsCC := true

	// Install security object for peer
	var secHelper crypto.Peer
	if viper.GetBool("security.enabled") {
		enrollID := viper.GetString("security.enrollID")
		enrollSecret := viper.GetString("security.enrollSecret")
		var err error

		if viper.GetBool("peer.validator.enabled") {
			testLogger.Debug("Registering validator with enroll ID: %s", enrollID)
			if err = crypto.RegisterValidator(enrollID, nil, enrollID, enrollSecret); nil != err {
				panic(err)
			}
			testLogger.Debug("Initializing validator with enroll ID: %s", enrollID)
			secHelper, err = crypto.InitValidator(enrollID, nil)
			if nil != err {
				panic(err)
			}
		} else {
			testLogger.Debug("Registering non-validator with enroll ID: %s", enrollID)
			if err = crypto.RegisterPeer(enrollID, nil, enrollID, enrollSecret); nil != err {
				panic(err)
			}
			testLogger.Debug("Initializing non-validator with enroll ID: %s", enrollID)
			secHelper, err = crypto.InitPeer(enrollID, nil)
			if nil != err {
				panic(err)
			}
		}
	}

	pb.RegisterChaincodeSupportServer(grpcServer,
		chaincode.NewChaincodeSupport(chaincode.DefaultChain, getPeerEndpoint, userRunsCC,
			ccStartupTimeout, secHelper))

	grpcServer.Serve(lis)
}

func initChaincode() {
	err := shim.Start(new(RBACChaincode))
	if err != nil {
		panic(err)
	}
}

func initClients() error {
	// Administrator
	if err := crypto.RegisterClient("jim", nil, "jim", "6avZQLwcUe9b"); err != nil {
		return err
	}
	var err error
	administrator, err = crypto.InitClient("jim", nil)
	if err != nil {
		return err
	}

	// Alice
	if err := crypto.RegisterClient("lukas", nil, "lukas", "NPKYL39uKbkj"); err != nil {
		return err
	}
	alice, err = crypto.InitClient("lukas", nil)
	if err != nil {
		return err
	}

	// Bob
	if err := crypto.RegisterClient("diego", nil, "diego", "DRJ23pEQl16a"); err != nil {
		return err
	}
	bob, err = crypto.InitClient("diego", nil)
	if err != nil {
		return err
	}

	// Charlie
	if err := crypto.RegisterClient("charlie", nil, "charlie", "eriovioh309v"); err != nil {
		return err
	}
	charlie, err = crypto.InitClient("charlie", nil)
	if err != nil {
		return err
	}
	return nil
}

func closeListenerAndSleep(l net.Listener) {
	l.Close()
	time.Sleep(2 * time.Second)
}

func getDeploymentSpec(context context.Context, spec *pb.ChaincodeSpec) (*pb.ChaincodeDeploymentSpec, error) {
	fmt.Printf("getting deployment spec for chaincode spec: %v\n", spec)
	var codePackageBytes []byte
	//if we have a name, we don't need to deploy (we are in userRunsCC mode)
	if spec.ChaincodeID.Name == "" {
		var err error
		codePackageBytes, err = container.GetChaincodePackageBytes(spec)
		if err != nil {
			return nil, err
		}
	}
	chaincodeDeploymentSpec := &pb.ChaincodeDeploymentSpec{ChaincodeSpec: spec, CodePackage: codePackageBytes}
	return chaincodeDeploymentSpec, nil
}

func removeFolders() {
	if err := os.RemoveAll(filepath.Join(os.TempDir(), "hyperledger")); err != nil {
		fmt.Printf("Failed removing [%s] [%s]\n", "heperledger", err)
	}
}


text:
package com.fx.app.util;

import android.content.Context;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.provider.Settings;
import android.telephony.TelephonyManager;

public class DeviceInfo {

	public static String getMacAdress(Context context) {
		String macAdress = "";
		try {
			WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
			WifiInfo info = wifi.getConnectionInfo();
			if (info != null) {
				String mac = info.getMacAddress();
				if (mac != null) {
					mac = mac.replace(":", "").replace(".", "");
					mac = mac.toUpperCase();
					macAdress = mac;
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return macAdress;
	}

	public static String androidid(Context context) {
		String rtnstr = "";
		try {
			rtnstr = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return rtnstr;
	}

	public static String deviceid(Context context) {
		String rtnstr = "";
		try {
			TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
			rtnstr = tm.getDeviceId();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return rtnstr;
	}

	public static int ip(Context context) {
		int rtnstr =0;
		try {

			WifiManager wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
			WifiInfo wifiInfo = wifiManager.getConnectionInfo();
			rtnstr =wifiInfo.getIpAddress();

		} catch (Exception e) {
			e.printStackTrace();
		}
		return rtnstr;
	}

	public static String brand() {
		String rtnstr = "";
		try {
			rtnstr = android.os.Build.BRAND;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return rtnstr;
	}

	public static String model() {
		String rtnstr = "";
		try {
			rtnstr = android.os.Build.MODEL;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return rtnstr;
	}

	public static String osversion() {
		String rtnstr = "";
		try {
			rtnstr = android.os.Build.VERSION.RELEASE;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return rtnstr;
	}
}


text:
namespace Caen {

constexpr unsigned int CaenReadoutSize{sizeof(DataParser::CaenReadout)};

// Assume we start after the PacketHeader
int DataParser::parse(const char *Buffer, unsigned int Size) {
  Result.clear();
  unsigned int ParsedReadouts = 0;

  unsigned int BytesLeft = Size;
  char *DataPtr = (char *)Buffer;

  while (BytesLeft) {
    // Parse Data Header
    if (BytesLeft < sizeof(ESSReadout::Parser::DataHeader)) {
      XTRACE(DATA, WAR, "Not enough data left for header: %u", BytesLeft);
      Stats.ErrorDataHeaders++;
      Stats.ErrorBytes += BytesLeft;
      return ParsedReadouts;
    }

    auto Data = (CaenReadout *)((char *)DataPtr);

    ///\todo clarify distinction between logical and physical rings
    // for now just divide by two
    Data->RingId = Data->RingId / 2;

    if (BytesLeft < Data->DataLength) {
      XTRACE(DATA, WAR, "Data size mismatch, header says %u got %d",
             Data->DataLength, BytesLeft);
      Stats.ErrorDataHeaders++;
      Stats.ErrorBytes += BytesLeft;
      return ParsedReadouts;
    }

    if (Data->RingId > MaxRingId or Data->FENId > MaxFENId) {
      XTRACE(DATA, WAR, "Invalid RingId (%u) or FENId (%u)", Data->RingId,
             Data->FENId);
      Stats.ErrorDataHeaders++;
      Stats.ErrorBytes += BytesLeft;
      return ParsedReadouts;
    }

    XTRACE(DATA, DEB, "Ring %u, FEN %u, Length %u", Data->RingId, Data->FENId,
           Data->DataLength);
    Stats.DataHeaders++;

    if (Data->DataLength != CaenReadoutSize) {
      XTRACE(DATA, WAR, "Invalid data length %u, expected %u", Data->DataLength,
             CaenReadoutSize);
      Stats.ErrorDataHeaders++;
      Stats.ErrorBytes += BytesLeft;
      return ParsedReadouts;
    }

    XTRACE(DATA, DEB,
           "ring %u, fen %u, t(%11u,%11u) SeqNo %6u TubeId %3u , A "
           "0x%04x B "
           "0x%04x C 0x%04x D 0x%04x",
           Data->RingId, Data->FENId, Data->TimeHigh, Data->TimeLow,
           Data->DataSeqNum, Data->TubeId, Data->AmpA, Data->AmpB, Data->AmpC,
           Data->AmpD);

    ParsedReadouts++;
    Stats.Readouts++;

    Result.push_back(*Data);
    BytesLeft -= Data->DataLength;
    DataPtr += Data->DataLength;
  }

  return ParsedReadouts;
}
} // namespace Caen


text:
package org.apache.ibatis.session.defaults;

import org.apache.ibatis.exceptions.ExceptionFactory;
import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.executor.ErrorContext;
import org.apache.ibatis.logging.Log;
import org.apache.ibatis.logging.LogFactory;
import org.apache.ibatis.logging.jdbc.ConnectionLogger;
import org.apache.ibatis.mapping.Environment;
import org.apache.ibatis.session.*;
import org.apache.ibatis.transaction.Transaction;
import org.apache.ibatis.transaction.TransactionFactory;
import org.apache.ibatis.transaction.managed.ManagedTransactionFactory;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

public class DefaultSqlSessionFactory implements SqlSessionFactory {

  private static final Log log = LogFactory.getLog(Connection.class);

  private final Configuration configuration;
  private final TransactionFactory managedTransactionFactory;

  public DefaultSqlSessionFactory(Configuration configuration) {
    this.configuration = configuration;
    this.managedTransactionFactory = new ManagedTransactionFactory();
  }

  public SqlSession openSession() {
    return openSessionFromDataSource(configuration.getDefaultExecutorType(), null, false);
  }

  public SqlSession openSession(boolean autoCommit) {
    return openSessionFromDataSource(configuration.getDefaultExecutorType(), null, autoCommit);
  }

  public SqlSession openSession(ExecutorType execType) {
    return openSessionFromDataSource(execType, null, false);
  }

  public SqlSession openSession(TransactionIsolationLevel level) {
    return openSessionFromDataSource(configuration.getDefaultExecutorType(), level, false);
  }

  public SqlSession openSession(ExecutorType execType, TransactionIsolationLevel level) {
    return openSessionFromDataSource(execType, level, false);
  }

  public SqlSession openSession(ExecutorType execType, boolean autoCommit) {
    return openSessionFromDataSource(execType, null, autoCommit);
  }

  public SqlSession openSession(Connection connection) {
    return openSessionFromConnection(configuration.getDefaultExecutorType(), connection);
  }

  public SqlSession openSession(ExecutorType execType, Connection connection) {
    return openSessionFromConnection(execType, connection);
  }

  public Configuration getConfiguration() {
    return configuration;
  }

  private SqlSession openSessionFromDataSource(ExecutorType execType, TransactionIsolationLevel level, boolean autoCommit) {
    Connection connection = null;
    try {
      final Environment environment = configuration.getEnvironment();
      final DataSource dataSource = getDataSourceFromEnvironment(environment);
      TransactionFactory transactionFactory = getTransactionFactoryFromEnvironment(environment);
      connection = dataSource.getConnection();
      if (level != null) {
        connection.setTransactionIsolation(level.getLevel());
      }
      connection = wrapConnection(connection);
      Transaction tx = transactionFactory.newTransaction(connection, autoCommit);
      Executor executor = configuration.newExecutor(tx, execType);
      return new DefaultSqlSession(configuration, executor, autoCommit);
    } catch (Exception e) {
      closeConnection(connection);
      throw ExceptionFactory.wrapException("Error opening session.  Cause: " + e, e);
    } finally {
      ErrorContext.instance().reset();
    }
  }

  private SqlSession openSessionFromConnection(ExecutorType execType, Connection connection) {
    try {
      boolean autoCommit;
      try {
        autoCommit = connection.getAutoCommit();
      } catch (SQLException e) {
        // Failover to true, as most poor drivers
        // or databases won't support transactions
        autoCommit = true;
      }
      connection = wrapConnection(connection);
      final Environment environment = configuration.getEnvironment();
      final TransactionFactory transactionFactory = getTransactionFactoryFromEnvironment(environment);
      Transaction tx = transactionFactory.newTransaction(connection, autoCommit);
      Executor executor = configuration.newExecutor(tx, execType);
      return new DefaultSqlSession(configuration, executor, autoCommit);
    } catch (Exception e) {
      throw ExceptionFactory.wrapException("Error opening session.  Cause: " + e, e);
    } finally {
      ErrorContext.instance().reset();
    }
  }

  private DataSource getDataSourceFromEnvironment(Environment environment) {
    if (environment == null || environment.getDataSource() == null) {
      throw new SqlSessionException("Configuration does not include an environment with a DataSource, so session cannot be created unless a connection is passed in.");
    }
    return environment.getDataSource();
  }

  private TransactionFactory getTransactionFactoryFromEnvironment(Environment environment) {
    if (environment == null || environment.getTransactionFactory() == null) {
      return managedTransactionFactory;
    }
    return environment.getTransactionFactory();
  }

  private Connection wrapConnection(Connection connection) {
    if (log.isDebugEnabled()) {
      return ConnectionLogger.newInstance(connection);
    } else {
      return connection;
    }
  }

  private void closeConnection(Connection connection) {
    if (connection != null) {
      try {
        connection.close();
      } catch (SQLException e1) {
        // Intentionally ignore. Prefer previous error.
      }
    }
  }

}


text:
using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using PlayFab;
using PlayFab.ServerModels;
using strange.extensions.command.impl;
using strange.extensions.signal.impl;

public class CreateChannelSignal : Signal<CreateChannelMessage> { }
public class CreateChannelCommand : Command
{
    [Inject] public CreateChannelMessage Message { get; set; }
    [Inject] public ChatServerData ChatServerData { get; set; }
    [Inject] public SendCreateChannelReponseSignal Signal { get; set; }
    [Inject] public ServerSettingsData ServerSettings { get; set; }

    public override void Execute()
    {
        var channel = ChatServerData.ServerChannels.Find(c => c.ChannelId == Message.ChannelId);
        if (channel == null)
        {
            var newChannel = new ChatChannel()
            {
                ChannelId = Message.ChannelId,
				IsInviteOnly = Message.IsInviteOnly

            };
            newChannel.Members.Add(new ChatChannelMember()
            {
                MemberId = Message.MemberId,
                MemberName = Message.MemberName
            });
            ChatServerData.ServerChannels.Add(newChannel);
            Signal.Dispatch(new CreateChannelResponseMessage()
            {
                MemberId = Message.MemberId,
                ChannelId = newChannel.ChannelId,
                Created =  true
            });

            PlayFabServerAPI.WriteTitleEvent(new WriteTitleEventRequest()
            {
                EventName = "NewChatChannelCreated",
                Body = new Dictionary<string, object>()
                {
                    {"ChannelId", newChannel.ChannelId},
                    {"GameId", ServerSettings.GameId},
                    {"CreatedBy", Message.MemberId }
                }
            }, null, (error)=> {
                Debug.LogError(error.GenerateErrorReport());
            });

            PlayFabServerAPI.WritePlayerEvent(new WriteServerPlayerEventRequest()
            {
                EventName = "PlayerJoinedChat",
                PlayFabId = Message.MemberId,
                Body = new Dictionary<string, object>()
                {
                    {"ChannelId",  newChannel.ChannelId },
                }
            }, null, (error) => {
                Debug.LogError(error.GenerateErrorReport());
            });

            return;
        }
        else if (channel.IsInviteOnly)
        {
            Signal.Dispatch(new CreateChannelResponseMessage()
            {
                MemberId = Message.MemberId,
                ChannelId = channel.ChannelId,
                Created = false,
                Error = "Channel already exists and you were not invited."
            });
        }
        else
        {
            channel.Members.Add(new ChatChannelMember()
            {
                MemberId = Message.MemberId,
                MemberName = Message.MemberName
            });
            Signal.Dispatch(new CreateChannelResponseMessage()
            {
                MemberId = Message.MemberId,
                ChannelId = channel.ChannelId,
                Created = true
            });

            PlayFabServerAPI.WritePlayerEvent(new WriteServerPlayerEventRequest()
            {
                EventName = "PlayerJoinedChat",
                PlayFabId = Message.MemberId,
                Body = new Dictionary<string, object>()
                {
                    {"ChannelId",  channel.ChannelId },
                }
            }, null, (error) => {
                Debug.LogError(error.GenerateErrorReport());
            });

        }

    }
}

public class JoinChannelSignal : Signal<JoinChannelMessage> { }

public class JoinChannelCommand : Command
{
    [Inject] public JoinChannelMessage Message { get; set; }
    [Inject] public SendJoinedReponseSignal Signal { get; set; }
    [Inject] public ChatServerData ChatServerData { get; set; }

    public override void Execute()
    {
        var channel = ChatServerData.ServerChannels.Find(c => c.ChannelId == Message.ChannelId);
        if (channel != null)
        {
            channel.Members.Add( new ChatChannelMember()
            {
                MemberId = Message.MemberId,
                MemberName = Message.MemberName
            });
            Signal.Dispatch(new JoinChannelResponseMessage()
            {
                ChannelId = Message.ChannelId,
                Joined = true
            });

            PlayFabServerAPI.WritePlayerEvent(new WriteServerPlayerEventRequest()
            {
                EventName = "PlayerJoinedChat",
                PlayFabId = Message.MemberId,
                Body = new Dictionary<string, object>()
                {
                    {"ChannelId",  channel.ChannelId },
                }
            }, null, (error) => {
                Debug.LogError(error.GenerateErrorReport());
            });
        }
        else
        {
            Signal.Dispatch(new JoinChannelResponseMessage()
            {
                ChannelId = Message.ChannelId,
                Joined = false,
                Error = "Failed to Join Server."
            });
        }
    }
}

public class LeaveChannelSignal : Signal<LeaveChannelMessage> { }

public class LeaveChannelCommand : Command
{
    [Inject] public LeaveChannelMessage Message { get; set; }
    [Inject] public ChatServerData ChatServerData { get; set; }
    [Inject] public ServerSettingsData ServerSettings { get; set; }

    public override void Execute()
    {
        var channel = ChatServerData.ServerChannels.Find(c => c.ChannelId == Message.ChannelId);
        if (channel != null)
        {
            var member = channel.Members.Find(m => m.MemberId == Message.MemberId);
            if (member != null)
            {
                channel.Members.Remove(member);
                PlayFabServerAPI.WritePlayerEvent(new WriteServerPlayerEventRequest(){
                    EventName = "PlayerLeftChat",
                    PlayFabId = Message.MemberId,
                    Body = new Dictionary<string, object>()
                    {
                        {"ChannelId", channel.ChannelId}
                    }
                }, null, (error) => {
                    Debug.LogError(error.GenerateErrorReport());
                });
            }

            if (channel.Members.Count == 0 && channel.IsInviteOnly)
            {
                ChatServerData.ServerChannels.Remove(channel);
                PlayFabServerAPI.WriteTitleEvent(new WriteTitleEventRequest(){
                    EventName = "ChatChannelRemoved",
                    Body = new Dictionary<string, object>()
                    {
                        {"ChannelId", channel.ChannelId},
                        {"GameId", ServerSettings.GameId},
                        {"LastPlayer", Message.MemberId}
                    }
                }, null, (error) => {
                    Debug.LogError(error.GenerateErrorReport());
                });

            }

        }
    }
}

public class SendMessageSignal : Signal<ChatMessage> { }

public class SendMessageCommand : Command
{
    [Inject] public ChatMessage Message { get; set; }
    [Inject] public ChatServerData ChatServerData { get; set; }
    [Inject] public UnityNetworkingData UnityNetworkingData { get; set; }

    public override void Execute()
    {
        var channel = ChatServerData.ServerChannels.Find(c => c.ChannelId == Message.ChannelId);
        if (channel == null)
        {
            return;
        }
        foreach (var member in channel.Members)
        {
            var memberConn = UnityNetworkingData.Connections.Find(mc => mc.PlayFabId == member.MemberId);
            if (memberConn != null && memberConn.PlayFabId != Message.SenderUserId)
            {
                memberConn.Connection.Send(ChatServerMessageTypes.ChannelMessage, Message);
                Debug.Log("Message Sent to " + Message.SenderUserId);

                PlayFabServerAPI.WritePlayerEvent(new WriteServerPlayerEventRequest(){
                    EventName = "PlayerSentMessage",
                    PlayFabId = Message.SenderUserId,
                    Body = new Dictionary<string, object>()
                    {
                        {"ChannelId", channel.ChannelId},
                        {"MessageSent",Message.Message }
                    }
                }, null, (error) => {
                    Debug.LogError(error.GenerateErrorReport());
                });

            }
        }
    }
}

public class SendJoinedReponseSignal : Signal<JoinChannelResponseMessage> { }

public class SendJoinedReponseCommand : Command
{
    [Inject] public JoinChannelResponseMessage Message { get; set; }
    [Inject] public UnityNetworkingData UnityNetworkingData { get; set; }

    public override void Execute()
    {
        var playerConn = UnityNetworkingData.Connections.Find(c => c.PlayFabId == Message.MemberId);
        if (playerConn != null)
        {
            playerConn.Connection.Send(ChatServerMessageTypes.JoinChannelResponse, Message);
        }
    }
}

public class SendCreateChannelReponseSignal : Signal<CreateChannelResponseMessage> { }

public class SendCreateChannelReponseCommand : Command
{
    [Inject] public CreateChannelResponseMessage Message { get; set; }
    [Inject] public UnityNetworkingData UnityNetworkingData { get; set; }

    public override void Execute()
    {
        var playerConn = UnityNetworkingData.Connections.Find(c => c.PlayFabId == Message.MemberId);
        if (playerConn != null)
        {
            playerConn.Connection.Send(ChatServerMessageTypes.CreateChannelResponse, Message);
        }
    }
}


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2014.05.03 at 03:15:27 PM EDT
//

package API.amazon.mws.xml.JAXB;

import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for SoundLevel.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *

 *

 * <simpleType name="SoundLevel">
 *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     <enumeration value="decibels"/>
 *   </restriction>
 * </simpleType>
 *

 *
 */
@XmlType(name = "SoundLevel")
@XmlEnum
public enum SoundLevel {

    @XmlEnumValue("decibels")
    DECIBELS("decibels");
    private final String value;

    SoundLevel(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static SoundLevel fromValue(String v) {
        for (SoundLevel c: SoundLevel.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }

}


text:
import { Component, OnInit } from '@angular/core';
import { AngularFire, FirebaseListObservable } from 'angularfire2';
import { LocalDataSource } from 'ng2-smart-table';
import { LocalStorageService, LocalStorage, SessionStorageService } from 'ng2-webstorage';
import { Router, RouterModule } from '@angular/router';
import { FormBuilder, Validators, FormGroup, AbstractControl } from '@angular/forms';

@Component({
  selector: 'new-client',
  styleUrls: ['./newClient.scss'],
  templateUrl: './newClient.html'
})

export class NewClient {

  public view2: boolean = false;
  users: FirebaseListObservable<any>;

  constructor(public localSt: LocalStorageService,
              public af: AngularFire,
              public route: Router,
              public fb: FormBuilder) {

    this.users = af.database.list('/user/');
  }

  public searchClient() {
    console.log('cargado');
  }

}


text:
#ifndef __OPERATOR_H__
#define __OPERATOR_H__

#include <float.h>
#include <limits.h>

/*
 * Template class for an operation that can be mapped over an array.
 */
template <typename Ta, typename Tb=Ta>
class Functor
{
public:
    /*
     * Apply the operation to the given operand.
     */
    static __device__ Tb apply(const Ta &x);
};

template <typename Ta, typename Tb>
class fromIntegral : Functor<Ta, Tb>
{
public:
    static __device__ Tb apply(const Ta &x) { return (Tb) x; }
};

/*
 * Template class for binary operators. Certain algorithms may require the
 * operator to be associative (that is, Ta == Tb), such as parallel scan and
 * reduction.
 *
 * As this is template code, it should compile down to something efficient...
 */
template <typename Ta, typename Tb=Ta, typename Tc=Ta>
class BinaryOp
{
public:
    /*
     * Apply the operation to the given operands.
     */
    static __device__ Tc apply(const Ta &a, const Tb &b);

    /*
     * Return an identity element for the type Tc.
     *
     * This may have special meaning for a given implementation, for example a
     * `max' operation over integers may want to return INT_MIN.
     */
    static __device__ Tc identity();
};

/*
 * Return the minimum or maximum value of a type
 */
template <typename T> inline __device__ T getMin();
template <typename T> inline __device__ T getMax();

#define SPEC_MINMAX(type,vmin,vmax)                                            \
    template <> inline __device__ type getMin() { return vmin; };              \
    template <> inline __device__ type getMax() { return vmax; }               \

SPEC_MINMAX(float,        -FLT_MAX,  FLT_MAX);
SPEC_MINMAX(int,           INT_MIN,  INT_MAX);
SPEC_MINMAX(char,          CHAR_MIN, CHAR_MAX);
SPEC_MINMAX(unsigned int,  0,        UINT_MAX);
SPEC_MINMAX(unsigned char, 0,        UCHAR_MAX);

/*
 * Basic binary arithmetic operations. We take advantage of automatic type
 * promotion to keep the parameters general.
 */
#define BASIC_OP(name,expr,id)                                                 \
    template <typename Ta, typename Tb=Ta, typename Tc=Ta>                     \
    class name : BinaryOp<Ta, Tb, Tc>                                          \
    {                                                                          \
    public:                                                                    \
        static __device__ Tc apply(const Ta &a, const Tb &b) { return expr; }  \
        static __device__ Tc identity() { return id; }                         \
    }

#define LOGICAL_OP(name,expr,id)                                               \
    template <typename Ta, typename Tb=Ta>                                     \
    class name : BinaryOp<Ta, Tb, bool>                                        \
    {                                                                          \
    public:                                                                    \
        static __device__ bool apply(const Ta &a, const Tb &b) { return expr; }\
        static __device__ bool identity() { return id; }                       \
    }

BASIC_OP(Plus,  a + b,    0);
BASIC_OP(Times, a * b,    1);
BASIC_OP(Min,   min(a,b), getMax<Ta>());
BASIC_OP(Max,   max(a,b), getMin<Ta>());

LOGICAL_OP(Eq,  a == b,   false);

#undef SPEC_MINMAX
#undef BASIC_OP
#endif


text:
namespace llvm {

namespace sampleprof {

/// \brief Sample-based profile reader.
///
/// Each profile contains sample counts for all the functions
/// executed. Inside each function, statements are annotated with the
/// collected samples on all the instructions associated with that
/// statement.
///
/// For this to produce meaningful data, the program needs to be
/// compiled with some debug information (at minimum, line numbers:
/// -gline-tables-only). Otherwise, it will be impossible to match IR
/// instructions to the line numbers collected by the profiler.
///
/// From the profile file, we are interested in collecting the
/// following information:
///
/// * A list of functions included in the profile (mangled names).
///
/// * For each function F:
///   1. The total number of samples collected in F.
///
///   2. The samples collected at each line in F. To provide some
///      protection against source code shuffling, line numbers should
///      be relative to the start of the function.
///
/// The reader supports two file formats: text and binary. The text format
/// is useful for debugging and testing, while the binary format is more
/// compact. They can both be used interchangeably.
class SampleProfileReader {
public:
  SampleProfileReader(std::unique_ptr<MemoryBuffer> B, LLVMContext &C)
      : Profiles(0), Ctx(C), Buffer(std::move(B)) {}

  virtual ~SampleProfileReader() {}

  /// \brief Read and validate the file header.
  virtual std::error_code readHeader() = 0;

  /// \brief Read sample profiles from the associated file.
  virtual std::error_code read() = 0;

  /// \brief Print the profile for \p FName on stream \p OS.
  void dumpFunctionProfile(StringRef FName, raw_ostream &OS = dbgs());

  /// \brief Print all the profiles on stream \p OS.
  void dump(raw_ostream &OS = dbgs());

  /// \brief Return the samples collected for function \p F.
  FunctionSamples *getSamplesFor(const Function &F) {
    return &Profiles[F.getName()];
  }

  /// \brief Return all the profiles.
  StringMap<FunctionSamples> &getProfiles() { return Profiles; }

  /// \brief Report a parse error message.
  void reportParseError(int64_t LineNumber, Twine Msg) const {
    Ctx.diagnose(DiagnosticInfoSampleProfile(Buffer->getBufferIdentifier(),
                                             LineNumber, Msg));
  }

  /// \brief Create a sample profile reader appropriate to the file format.
  static ErrorOr<std::unique_ptr<SampleProfileReader>>
  create(StringRef Filename, LLVMContext &C);

protected:
  /// \brief Map every function to its associated profile.
  ///
  /// The profile of every function executed at runtime is collected
  /// in the structure FunctionSamples. This maps function objects
  /// to their corresponding profiles.
  StringMap<FunctionSamples> Profiles;

  /// \brief LLVM context used to emit diagnostics.
  LLVMContext &Ctx;

  /// \brief Memory buffer holding the profile file.
  std::unique_ptr<MemoryBuffer> Buffer;
};

class SampleProfileReaderText : public SampleProfileReader {
public:
  SampleProfileReaderText(std::unique_ptr<MemoryBuffer> B, LLVMContext &C)
      : SampleProfileReader(std::move(B), C) {}

  /// \brief Read and validate the file header.
  std::error_code readHeader() override { return sampleprof_error::success; }

  /// \brief Read sample profiles from the associated file.
  std::error_code read() override;
};

class SampleProfileReaderBinary : public SampleProfileReader {
public:
  SampleProfileReaderBinary(std::unique_ptr<MemoryBuffer> B, LLVMContext &C)
      : SampleProfileReader(std::move(B), C), Data(nullptr), End(nullptr) {}

  /// \brief Read and validate the file header.
  std::error_code readHeader() override;

  /// \brief Read sample profiles from the associated file.
  std::error_code read() override;

  /// \brief Return true if \p Buffer is in the format supported by this class.
  static bool hasFormat(const MemoryBuffer &Buffer);

protected:
  /// \brief Read a numeric value of type T from the profile.
  ///
  /// If an error occurs during decoding, a diagnostic message is emitted and
  /// EC is set.
  ///
  /// \returns the read value.
  template <typename T> ErrorOr<T> readNumber();

  /// \brief Read a string from the profile.
  ///
  /// If an error occurs during decoding, a diagnostic message is emitted and
  /// EC is set.
  ///
  /// \returns the read value.
  ErrorOr<StringRef> readString();

  /// \brief Return true if we've reached the end of file.
  bool at_eof() const { return Data >= End; }

  /// \brief Points to the current location in the buffer.
  const uint8_t *Data;

  /// \brief Points to the end of the buffer.
  const uint8_t *End;
};

} // End namespace sampleprof

} // End namespace llvm

#endif // LLVM_PROFILEDATA_SAMPLEPROFREADER_H


text:
PRAGMA_DISABLE_DEPRECATION_WARNINGS

#include "CoreShell.h"
#include "ManageObject.h"
#include "TypeConvertor.h"
#include "Runtime/Engine/Classes/GameFramework/Character.h"
#include "ManageCharacter.generated.h"

// Source file C:\Program Files\Epic Games\UE_4.22\Engine\Source\Runtime\Engine\Classes\GameFramework\Character.h:210

UCLASS()
class UNREALDOTNETRUNTIME_API AManageCharacter : public ACharacter, public IManageObject
{
	GENERATED_UCLASS_BODY()

public:
	bool bIsManageAttach = false;
	bool AddWrapperIfNotAttach() override;
	void SetManageType(const FDotnetTypeName& ManageType) override;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "C#")
	FDotnetTypeName ManageClassName;

	virtual void BaseChange() override;
	virtual void CheckJumpInput(float DeltaTime) override;
	virtual void ClearJumpInput(float DeltaTime) override;
	virtual void ClientCheatFly_Implementation() override;
	virtual void ClientCheatGhost_Implementation() override;
	virtual void ClientCheatWalk_Implementation() override;
	virtual void Crouch(bool bClientSimulation) override;
	virtual void Falling() override;
	virtual void Jump() override;
	virtual void NotifyJumpApex() override;
	virtual void OnEndCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust) override;
	virtual void OnJumped_Implementation() override;
	virtual void OnRep_IsCrouched() override;
	virtual void OnRep_ReplicatedBasedMovement() override;
	virtual void OnStartCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust) override;
	virtual void ResetJumpState() override;
	virtual void StopJumping() override;
	virtual void UnCrouch(bool bClientSimulation) override;
	virtual void AddControllerPitchInput(float Val) override;
	virtual void AddControllerRollInput(float Val) override;
	virtual void AddControllerYawInput(float Val) override;
	virtual void DestroyPlayerInputComponent() override;
	virtual void DetachFromControllerPendingDestroy() override;
	virtual void OnRep_Controller() override;
	virtual void OnRep_PlayerState() override;
	virtual void PawnClientRestart() override;
	virtual void PawnStartFire(uint8 FireModeNum) override;
	virtual void RecalculateBaseEyeHeight() override;
	virtual void Restart() override;
	virtual void SetPlayerDefaults() override;
	virtual void SpawnDefaultController() override;
	virtual void TurnOff() override;
	virtual void UnPossessed() override;
	virtual void UpdateNavigationRelevance() override;
	virtual void BeginPlay() override;
	virtual void ClearCrossLevelReferences() override;
	virtual void Destroyed() override;
	virtual void ForceNetRelevant() override;
	virtual void ForceNetUpdate() override;
	virtual void GatherCurrentMovement() override;
	virtual void InvalidateLightingCacheDetailed(bool bTranslationOnly) override;
	virtual void K2_DestroyActor() override;
	virtual void LifeSpanExpired() override;
	virtual void MarkComponentsAsPendingKill() override;
	virtual void NotifyActorBeginCursorOver() override;
	virtual void NotifyActorEndCursorOver() override;
	virtual void OnRep_AttachmentReplication() override;
	virtual void OnRep_Instigator() override;
	virtual void OnRep_Owner() override;
	virtual void OnRep_ReplicatedMovement() override;
	virtual void OnRep_ReplicateMovement() override;
	virtual void OnReplicationPausedChanged(bool bIsReplicationPaused) override;
	virtual void OutsideWorldBounds() override;
	virtual void PostActorCreated() override;
	virtual void PostInitializeComponents() override;
	virtual void PostNetInit() override;
	virtual void PostNetReceiveLocationAndRotation() override;
	virtual void PostNetReceivePhysicState() override;
	virtual void PostNetReceiveRole() override;
	virtual void PostRegisterAllComponents() override;
	virtual void PostUnregisterAllComponents() override;
	virtual void PreInitializeComponents() override;
	virtual void PreRegisterAllComponents() override;
	virtual void PrestreamTextures(float Seconds, bool bEnableStreaming, int32 CinematicTextureGroups) override;
	virtual void RegisterActorTickFunctions(bool bRegister) override;
	virtual void RegisterAllComponents() override;
	virtual void ReregisterAllComponents() override;
	virtual void RerunConstructionScripts() override;
	virtual void Reset() override;
	virtual void RewindForReplay() override;
	virtual void SetActorHiddenInGame(bool bNewHidden) override;
	virtual void SetLifeSpan(float InLifespan) override;
	virtual void SetReplicateMovement(bool bInReplicateMovement) override;
	virtual void TearOff() override;
	virtual void TeleportSucceeded(bool bIsATest) override;
	virtual void Tick(float DeltaSeconds) override;
	virtual void TornOff() override;
	virtual void UnregisterAllComponents(bool bForReregister) override;
	virtual void BeginDestroy() override;
	virtual void FinishDestroy() override;
	virtual void MarkAsEditorOnlySubobject() override;
	virtual void PostCDOContruct() override;
	virtual void PostEditImport() override;
	virtual void PostInitProperties() override;
	virtual void PostLoad() override;
	virtual void PostNetReceive() override;
	virtual void PostRepNotifies() override;
	virtual void PostSaveRoot(bool bCleanupIsRequired) override;
	virtual void PreDestroyFromReplication() override;
	virtual void PreNetReceive() override;
	virtual void ShutdownAfterError() override;
	virtual void CreateCluster() override;
	virtual void OnClusterMarkedAsPendingKill() override;

	void _Supper__BaseChange();
	void _Supper__CheckJumpInput(float DeltaTime);
	void _Supper__ClearJumpInput(float DeltaTime);
	void _Supper__ClientCheatFly_Implementation();
	void _Supper__ClientCheatGhost_Implementation();
	void _Supper__ClientCheatWalk_Implementation();
	void _Supper__Crouch(bool bClientSimulation);
	void _Supper__Falling();
	void _Supper__Jump();
	void _Supper__NotifyJumpApex();
	void _Supper__OnEndCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust);
	void _Supper__OnJumped_Implementation();
	void _Supper__OnRep_IsCrouched();
	void _Supper__OnRep_ReplicatedBasedMovement();
	void _Supper__OnStartCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust);
	void _Supper__ResetJumpState();
	void _Supper__StopJumping();
	void _Supper__UnCrouch(bool bClientSimulation);
	void _Supper__AddControllerPitchInput(float Val);
	void _Supper__AddControllerRollInput(float Val);
	void _Supper__AddControllerYawInput(float Val);
	void _Supper__DestroyPlayerInputComponent();
	void _Supper__DetachFromControllerPendingDestroy();
	void _Supper__OnRep_Controller();
	void _Supper__OnRep_PlayerState();
	void _Supper__PawnClientRestart();
	void _Supper__PawnStartFire(uint8 FireModeNum);
	void _Supper__RecalculateBaseEyeHeight();
	void _Supper__Restart();
	void _Supper__SetPlayerDefaults();
	void _Supper__SpawnDefaultController();
	void _Supper__TurnOff();
	void _Supper__UnPossessed();
	void _Supper__UpdateNavigationRelevance();
	void _Supper__BeginPlay();
	void _Supper__ClearCrossLevelReferences();
	void _Supper__Destroyed();
	void _Supper__ForceNetRelevant();
	void _Supper__ForceNetUpdate();
	void _Supper__GatherCurrentMovement();
	void _Supper__InvalidateLightingCacheDetailed(bool bTranslationOnly);
	void _Supper__K2_DestroyActor();
	void _Supper__LifeSpanExpired();
	void _Supper__MarkComponentsAsPendingKill();
	void _Supper__NotifyActorBeginCursorOver();
	void _Supper__NotifyActorEndCursorOver();
	void _Supper__OnRep_AttachmentReplication();
	void _Supper__OnRep_Instigator();
	void _Supper__OnRep_Owner();
	void _Supper__OnRep_ReplicatedMovement();
	void _Supper__OnRep_ReplicateMovement();
	void _Supper__OnReplicationPausedChanged(bool bIsReplicationPaused);
	void _Supper__OutsideWorldBounds();
	void _Supper__PostActorCreated();
	void _Supper__PostInitializeComponents();
	void _Supper__PostNetInit();
	void _Supper__PostNetReceiveLocationAndRotation();
	void _Supper__PostNetReceivePhysicState();
	void _Supper__PostNetReceiveRole();
	void _Supper__PostRegisterAllComponents();
	void _Supper__PostUnregisterAllComponents();
	void _Supper__PreInitializeComponents();
	void _Supper__PreRegisterAllComponents();
	void _Supper__PrestreamTextures(float Seconds, bool bEnableStreaming, int32 CinematicTextureGroups);
	void _Supper__RegisterActorTickFunctions(bool bRegister);
	void _Supper__RegisterAllComponents();
	void _Supper__ReregisterAllComponents();
	void _Supper__RerunConstructionScripts();
	void _Supper__Reset();
	void _Supper__RewindForReplay();
	void _Supper__SetActorHiddenInGame(bool bNewHidden);
	void _Supper__SetLifeSpan(float InLifespan);
	void _Supper__SetReplicateMovement(bool bInReplicateMovement);
	void _Supper__TearOff();
	void _Supper__TeleportSucceeded(bool bIsATest);
	void _Supper__Tick(float DeltaSeconds);
	void _Supper__TornOff();
	void _Supper__UnregisterAllComponents(bool bForReregister);
	void _Supper__BeginDestroy();
	void _Supper__FinishDestroy();
	void _Supper__MarkAsEditorOnlySubobject();
	void _Supper__PostCDOContruct();
	void _Supper__PostEditImport();
	void _Supper__PostInitProperties();
	void _Supper__PostLoad();
	void _Supper__PostNetReceive();
	void _Supper__PostRepNotifies();
	void _Supper__PostSaveRoot(bool bCleanupIsRequired);
	void _Supper__PreDestroyFromReplication();
	void _Supper__PreNetReceive();
	void _Supper__ShutdownAfterError();
	void _Supper__CreateCluster();
	void _Supper__OnClusterMarkedAsPendingKill();
};

PRAGMA_ENABLE_DEPRECATION_WARNINGS


text:
package org.apache.xerces.impl.xs.util;

/**
 * @xerces.internal
 *
 * @author Henry Zongaro, IBM
 * @version $Id$
 */
public final class XIntPool {
    private static final short POOL_SIZE = 10;
    private static final XInt[] fXIntPool = new XInt[POOL_SIZE];

    static {
        for (int i = 0; i < POOL_SIZE; i++)
            fXIntPool[i] = new XInt(i);
    }

    public final XInt getXInt(int value) {
        if (value >= 0 && value < fXIntPool.length)
            return fXIntPool[value];
        else
            return new XInt(value);
    }
}


text:
<?php

$I = new FunctionalTester($scenario);
$I->amOnPage(script(__FILE__));

$I->seeCheckboxIsChecked('input[name=foo]');