text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.07.02 at 03:35:23 PM MSK
//

package ru.gov.zakupki.oos.types._1;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;

/**
 * Реквизиты НПА, устанавливающий требования к отдельным видам товаров, работ, услуг в планах закупок
 *
 *
Java class for zfcs_purchasePlanLegalActsType complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="zfcs_purchasePlanLegalActsType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <choice>
 *         <element name="existInRegulationRules">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="registryNum" type="{http://zakupki.gov.ru/oos/types/1}zfcs_regulationRulesNumberType"/>
 *                   <element name="actFullName" type="{http://zakupki.gov.ru/oos/types/1}zfcs_longTextMinType" minOccurs="0"/>
 *                   <element name="actDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
 *                   <element name="actNumber" minOccurs="0">
 *                     <simpleType>
 *                       <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *                         <minLength value="1"/>
 *                         <maxLength value="100"/>
 *                       </restriction>
 *                     </simpleType>
 *                   </element>
 *                   <element name="paragraphs" minOccurs="0">
 *                     <simpleType>
 *                       <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *                         <minLength value="1"/>
 *                         <maxLength value="256"/>
 *                       </restriction>
 *                     </simpleType>
 *                   </element>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *         <element name="missingInRegulationRules">
 *           <complexType>
 *             <complexContent>
 *               <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 <sequence>
 *                   <element name="actFullName" type="{http://zakupki.gov.ru/oos/types/1}zfcs_longTextMinType"/>
 *                   <element name="actDate" type="{http://www.w3.org/2001/XMLSchema}date"/>
 *                   <element name="actNumber">
 *                     <simpleType>
 *                       <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *                         <minLength value="1"/>
 *                         <maxLength value="100"/>
 *                       </restriction>
 *                     </simpleType>
 *                   </element>
 *                   <element name="paragraphs" minOccurs="0">
 *                     <simpleType>
 *                       <restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *                         <minLength value="1"/>
 *                         <maxLength value="256"/>
 *                       </restriction>
 *                     </simpleType>
 *                   </element>
 *                 </sequence>
 *               </restriction>
 *             </complexContent>
 *           </complexType>
 *         </element>
 *       </choice>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "zfcs_purchasePlanLegalActsType", propOrder = {
    "existInRegulationRules",
    "missingInRegulationRules"
})
public class ZfcsPurchasePlanLegalActsType {

    protected ZfcsPurchasePlanLegalActsType.ExistInRegulationRules existInRegulationRules;
    protected ZfcsPurchasePlanLegalActsType.MissingInRegulationRules missingInRegulationRules;

    /**
     * Gets the value of the existInRegulationRules property.
     *
     * @return
     *     possible object is
     *     {@link ZfcsPurchasePlanLegalActsType.ExistInRegulationRules }
     *
     */
    public ZfcsPurchasePlanLegalActsType.ExistInRegulationRules getExistInRegulationRules() {
        return existInRegulationRules;
    }

    /**
     * Sets the value of the existInRegulationRules property.
     *
     * @param value
     *     allowed object is
     *     {@link ZfcsPurchasePlanLegalActsType.ExistInRegulationRules }
     *
     */
    public void setExistInRegulationRules(ZfcsPurchasePlanLegalActsType.ExistInRegulationRules value) {
        this.existInRegulationRules = value;
    }

    /**
     * Gets the value of the missingInRegulationRules property.
     *
     * @return
     *     possible object is
     *     {@link ZfcsPurchasePlanLegalActsType.MissingInRegulationRules }
     *
     */
    public ZfcsPurchasePlanLegalActsType.MissingInRegulationRules getMissingInRegulationRules() {
        return missingInRegulationRules;
    }

    /**
     * Sets the value of the missingInRegulationRules property.
     *
     * @param value
     *     allowed object is
     *     {@link ZfcsPurchasePlanLegalActsType.MissingInRegulationRules }
     *
     */
    public void setMissingInRegulationRules(ZfcsPurchasePlanLegalActsType.MissingInRegulationRules value) {
        this.missingInRegulationRules = value;
    }

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

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="registryNum" type="{http://zakupki.gov.ru/oos/types/1}zfcs_regulationRulesNumberType"/>
     *         <element name="actFullName" type="{http://zakupki.gov.ru/oos/types/1}zfcs_longTextMinType" minOccurs="0"/>
     *         <element name="actDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
     *         <element name="actNumber" minOccurs="0">
     *           <simpleType>
     *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
     *               <minLength value="1"/>
     *               <maxLength value="100"/>
     *             </restriction>
     *           </simpleType>
     *         </element>
     *         <element name="paragraphs" minOccurs="0">
     *           <simpleType>
     *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
     *               <minLength value="1"/>
     *               <maxLength value="256"/>
     *             </restriction>
     *           </simpleType>
     *         </element>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "registryNum",
        "actFullName",
        "actDate",
        "actNumber",
        "paragraphs"
    })
    public static class ExistInRegulationRules {

        @XmlElement(required = true)
        protected String registryNum;
        protected String actFullName;
        @XmlSchemaType(name = "date")
        protected XMLGregorianCalendar actDate;
        protected String actNumber;
        protected String paragraphs;

        /**
         * Gets the value of the registryNum property.
         *
         * @return
         *     possible object is
         *     {@link String }
         *
         */
        public String getRegistryNum() {
            return registryNum;
        }

        /**
         * Sets the value of the registryNum property.
         *
         * @param value
         *     allowed object is
         *     {@link String }
         *
         */
        public void setRegistryNum(String value) {
            this.registryNum = value;
        }

        /**
         * Gets the value of the actFullName property.
         *
         * @return
         *     possible object is
         *     {@link String }
         *
         */
        public String getActFullName() {
            return actFullName;
        }

        /**
         * Sets the value of the actFullName property.
         *
         * @param value
         *     allowed object is
         *     {@link String }
         *
         */
        public void setActFullName(String value) {
            this.actFullName = value;
        }

        /**
         * Gets the value of the actDate property.
         *
         * @return
         *     possible object is
         *     {@link XMLGregorianCalendar }
         *
         */
        public XMLGregorianCalendar getActDate() {
            return actDate;
        }

        /**
         * Sets the value of the actDate property.
         *
         * @param value
         *     allowed object is
         *     {@link XMLGregorianCalendar }
         *
         */
        public void setActDate(XMLGregorianCalendar value) {
            this.actDate = value;
        }

        /**
         * Gets the value of the actNumber property.
         *
         * @return
         *     possible object is
         *     {@link String }
         *
         */
        public String getActNumber() {
            return actNumber;
        }

        /**
         * Sets the value of the actNumber property.
         *
         * @param value
         *     allowed object is
         *     {@link String }
         *
         */
        public void setActNumber(String value) {
            this.actNumber = value;
        }

        /**
         * Gets the value of the paragraphs property.
         *
         * @return
         *     possible object is
         *     {@link String }
         *
         */
        public String getParagraphs() {
            return paragraphs;
        }

        /**
         * Sets the value of the paragraphs property.
         *
         * @param value
         *     allowed object is
         *     {@link String }
         *
         */
        public void setParagraphs(String value) {
            this.paragraphs = value;
        }

    }

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

     * <complexType>
     *   <complexContent>
     *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       <sequence>
     *         <element name="actFullName" type="{http://zakupki.gov.ru/oos/types/1}zfcs_longTextMinType"/>
     *         <element name="actDate" type="{http://www.w3.org/2001/XMLSchema}date"/>
     *         <element name="actNumber">
     *           <simpleType>
     *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
     *               <minLength value="1"/>
     *               <maxLength value="100"/>
     *             </restriction>
     *           </simpleType>
     *         </element>
     *         <element name="paragraphs" minOccurs="0">
     *           <simpleType>
     *             <restriction base="{http://www.w3.org/2001/XMLSchema}string">
     *               <minLength value="1"/>
     *               <maxLength value="256"/>
     *             </restriction>
     *           </simpleType>
     *         </element>
     *       </sequence>
     *     </restriction>
     *   </complexContent>
     * </complexType>
     *

     *
     *
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "actFullName",
        "actDate",
        "actNumber",
        "paragraphs"
    })
    public static class MissingInRegulationRules {

        @XmlElement(required = true)
        protected String actFullName;
        @XmlElement(required = true)
        @XmlSchemaType(name = "date")
        protected XMLGregorianCalendar actDate;
        @XmlElement(required = true)
        protected String actNumber;
        protected String paragraphs;

        /**
         * Gets the value of the actFullName property.
         *
         * @return
         *     possible object is
         *     {@link String }
         *
         */
        public String getActFullName() {
            return actFullName;
        }

        /**
         * Sets the value of the actFullName property.
         *
         * @param value
         *     allowed object is
         *     {@link String }
         *
         */
        public void setActFullName(String value) {
            this.actFullName = value;
        }

        /**
         * Gets the value of the actDate property.
         *
         * @return
         *     possible object is
         *     {@link XMLGregorianCalendar }
         *
         */
        public XMLGregorianCalendar getActDate() {
            return actDate;
        }

        /**
         * Sets the value of the actDate property.
         *
         * @param value
         *     allowed object is
         *     {@link XMLGregorianCalendar }
         *
         */
        public void setActDate(XMLGregorianCalendar value) {
            this.actDate = value;
        }

        /**
         * Gets the value of the actNumber property.
         *
         * @return
         *     possible object is
         *     {@link String }
         *
         */
        public String getActNumber() {
            return actNumber;
        }

        /**
         * Sets the value of the actNumber property.
         *
         * @param value
         *     allowed object is
         *     {@link String }
         *
         */
        public void setActNumber(String value) {
            this.actNumber = value;
        }

        /**
         * Gets the value of the paragraphs property.
         *
         * @return
         *     possible object is
         *     {@link String }
         *
         */
        public String getParagraphs() {
            return paragraphs;
        }

        /**
         * Sets the value of the paragraphs property.
         *
         * @param value
         *     allowed object is
         *     {@link String }
         *
         */
        public void setParagraphs(String value) {
            this.paragraphs = value;
        }

    }

}


text:
package risk

// [START dlp_l_diversity]
import (
	"context"
	"fmt"
	"io"
	"strings"
	"time"

	dlp "cloud.google.com/go/dlp/apiv2"
	"cloud.google.com/go/dlp/apiv2/dlppb"
	"cloud.google.com/go/pubsub"
)

// riskLDiversity computes the L Diversity of the given columns.
func riskLDiversity(w io.Writer, projectID, dataProject, pubSubTopic, pubSubSub, datasetID, tableID, sensitiveAttribute string, columnNames ...string) error {
	// projectID := "my-project-id"
	// dataProject := "bigquery-public-data"
	// pubSubTopic := "dlp-risk-sample-topic"
	// pubSubSub := "dlp-risk-sample-sub"
	// datasetID := "nhtsa_traffic_fatalities"
	// tableID := "accident_2015"
	// sensitiveAttribute := "city"
	// columnNames := "state_number", "county"
	ctx := context.Background()
	client, err := dlp.NewClient(ctx)
	if err != nil {
		return fmt.Errorf("dlp.NewClient: %v", err)
	}

	// Create a PubSub Client used to listen for when the inspect job finishes.
	pubsubClient, err := pubsub.NewClient(ctx, projectID)
	if err != nil {
		return fmt.Errorf("Error creating PubSub client: %v", err)
	}
	defer pubsubClient.Close()

	// Create a PubSub subscription we can use to listen for messages.
	s, err := setupPubSub(projectID, pubSubTopic, pubSubSub)
	if err != nil {
		return fmt.Errorf("setupPubSub: %v", err)
	}

	// topic is the PubSub topic string where messages should be sent.
	topic := "projects/" + projectID + "/topics/" + pubSubTopic

	// Build the QuasiID slice.
	var q []*dlppb.FieldId
	for _, c := range columnNames {
		q = append(q, &dlppb.FieldId{Name: c})
	}

	// Create a configured request.
	req := &dlppb.CreateDlpJobRequest{
		Parent: fmt.Sprintf("projects/%s/locations/global", projectID),
		Job: &dlppb.CreateDlpJobRequest_RiskJob{
			RiskJob: &dlppb.RiskAnalysisJobConfig{
				// PrivacyMetric configures what to compute.
				PrivacyMetric: &dlppb.PrivacyMetric{
					Type: &dlppb.PrivacyMetric_LDiversityConfig_{
						LDiversityConfig: &dlppb.PrivacyMetric_LDiversityConfig{
							QuasiIds: q,
							SensitiveAttribute: &dlppb.FieldId{
								Name: sensitiveAttribute,
							},
						},
					},
				},
				// SourceTable describes where to find the data.
				SourceTable: &dlppb.BigQueryTable{
					ProjectId: dataProject,
					DatasetId: datasetID,
					TableId:   tableID,
				},
				// Send a message to PubSub using Actions.
				Actions: []*dlppb.Action{
					{
						Action: &dlppb.Action_PubSub{
							PubSub: &dlppb.Action_PublishToPubSub{
								Topic: topic,
							},
						},
					},
				},
			},
		},
	}
	// Create the risk job.
	j, err := client.CreateDlpJob(ctx, req)
	if err != nil {
		return fmt.Errorf("CreateDlpJob: %v", err)
	}
	fmt.Fprintf(w, "Created job: %v\n", j.GetName())

	// Wait for the risk job to finish by waiting for a PubSub message.
	// This only waits for 10 minutes. For long jobs, consider using a truly
	// asynchronous execution model such as Cloud Functions.
	ctx, cancel := context.WithTimeout(ctx, 10*time.Minute)
	defer cancel()
	err = s.Receive(ctx, func(ctx context.Context, msg *pubsub.Message) {
		// If this is the wrong job, do not process the result.
		if msg.Attributes["DlpJobName"] != j.GetName() {
			msg.Nack()
			return
		}
		msg.Ack()
		time.Sleep(500 * time.Millisecond)
		j, err := client.GetDlpJob(ctx, &dlppb.GetDlpJobRequest{
			Name: j.GetName(),
		})
		if err != nil {
			fmt.Fprintf(w, "GetDlpJob: %v", err)
			return
		}
		h := j.GetRiskDetails().GetLDiversityResult().GetSensitiveValueFrequencyHistogramBuckets()
		for i, b := range h {
			fmt.Fprintf(w, "Histogram bucket %v\n", i)
			fmt.Fprintf(w, "  Size range: [%v,%v]\n", b.GetSensitiveValueFrequencyLowerBound(), b.GetSensitiveValueFrequencyUpperBound())
			fmt.Fprintf(w, "  %v unique values total\n", b.GetBucketSize())
			for _, v := range b.GetBucketValues() {
				var qvs []string
				for _, qv := range v.GetQuasiIdsValues() {
					qvs = append(qvs, qv.String())
				}
				fmt.Fprintf(w, "    QuasiID values: %s\n", strings.Join(qvs, ", "))
				fmt.Fprintf(w, "    Class size: %v\n", v.GetEquivalenceClassSize())
				for _, sv := range v.GetTopSensitiveValues() {
					fmt.Fprintf(w, "    Sensitive value %v occurs %v times\n", sv.GetValue(), sv.GetCount())
				}
			}
		}
		// Stop listening for more messages.
		cancel()
	})
	if err != nil {
		return fmt.Errorf("Recieve: %v", err)
	}
	return nil
}

// [END dlp_l_diversity]

redpajama_set_name: RedPajamaGithub


text:
var expect = require('expect.js');
var eio = require('../');
var env = require('./support/env');

describe('connection', function () {
  this.timeout(20000);

  it('should connect to localhost', function (done) {
    var socket = new eio.Socket();
    socket.on('open', function () {
      socket.on('message', function (data) {
        expect(data).to.equal('hi');
        socket.close();
        done();
      });
    });
  });

  it('should receive multibyte utf-8 strings with polling', function (done) {
    var socket = new eio.Socket();
    socket.on('open', function () {
      socket.send('cash money €€€');
      socket.on('message', function (data) {
        if ('hi' === data) return;
        expect(data).to.be('cash money €€€');
        socket.close();
        done();
      });
    });
  });

  it('should receive emoji', function (done) {
    var socket = new eio.Socket();
    socket.on('open', function () {
      socket.send('\uD800\uDC00-\uDB7F\uDFFF\uDB80\uDC00-\uDBFF\uDFFF\uE000-\uF8FF');
      socket.on('message', function (data) {
        if ('hi' === data) return;
        expect(data).to.be('\uD800\uDC00-\uDB7F\uDFFF\uDB80\uDC00-\uDBFF\uDFFF\uE000-\uF8FF');
        socket.close();
        done();
      });
    });
  });

  it('should not send packets if socket closes', function (done) {
    var socket = new eio.Socket();
    socket.on('open', function () {
      var noPacket = true;
      socket.on('packetCreate', function () {
        noPacket = false;
      });
      socket.close();
      socket.send('hi');
      setTimeout(function () {
        expect(noPacket).to.be(true);
        done();
      }, 1200);
    });
  });

  // no `Worker` on old IE
  if (global.Worker) {
    it('should work in a worker', function (done) {
      var worker = new Worker('/test/support/worker.js');
      worker.onmessage = function (e) {
        expect(e.data);
        done();
      };
    });
  }

  it('should not connect at all when JSONP forced and disabled', function (done) {
    var socket = eio.Socket({ transports: ['polling'], forceJSONP: true, jsonp: false });
    socket.on('error', function (msg) {
      expect(msg).to.be('No transports available');
      done();
    });
  });

  if (env.wsSupport && !env.isOldSimulator && !env.isAndroid && !env.isIE11) {
    it('should connect with ws when JSONP forced and disabled', function (done) {
      var socket = eio.Socket({ transports: ['polling', 'websocket'], forceJSONP: true, jsonp: false });

      socket.on('open', function () {
        expect(socket.transport.name).to.be('websocket');
        socket.close();
        done();
      });
    });

    it('should defer close when upgrading', function (done) {
      var socket = new eio.Socket();
      socket.on('open', function () {
        var upgraded = false;
        socket.on('upgrade', function () {
          upgraded = true;
        }).on('upgrading', function () {
          socket.on('close', function () {
            expect(upgraded).to.be(true);
            done();
          });
          socket.close();
        });
      });
    });

    it('should close on upgradeError if closing is deferred', function (done) {
      var socket = new eio.Socket();
      socket.on('open', function () {
        var upgradeError = false;
        socket.on('upgradeError', function () {
          upgradeError = true;
        }).on('upgrading', function () {
          socket.on('close', function () {
            expect(upgradeError).to.be(true);
            done();
          });
          socket.close();
          socket.transport.onError('upgrade error');
        });
      });
    });

    it('should not send packets if closing is deferred', function (done) {
      var socket = new eio.Socket();
      socket.on('open', function () {
        var noPacket = true;
        socket.on('upgrading', function () {
          socket.on('packetCreate', function () {
            noPacket = false;
          });
          socket.close();
          socket.send('hi');
        });
        setTimeout(function () {
          expect(noPacket).to.be(true);
          done();
        }, 1200);
      });
    });

    it('should send all buffered packets if closing is deferred', function (done) {
      var socket = new eio.Socket();
      socket.on('open', function () {
        socket.on('upgrading', function () {
          socket.send('hi');
          socket.close();
        }).on('close', function () {
          expect(socket.writeBuffer).to.have.length(0);
          done();
        });
      });
    });
  }
});


text:
"""
Module for testing main configuration
"""

#pylint: disable=W0614
import herculeum.config.levels
from hamcrest import assert_that, is_, not_none  # pylint: disable-msg=E0611
from herculeum.config import Configuration
from mockito import mock
from pyherc.data import Model
from pyherc.ports.inventory import InventoryParameters

class TestMainConfiguration():
    """
    Tests for main configuration
    """
    def __init__(self):
        """
        Default constructor
        """
        self.config = None

    def setup(self):
        """
        Setup test case
        """
        self.config = Configuration(Model(),
                                    herculeum.config.levels,
                                    mock(),
                                    mock())

        self.config.initialise()

    def test_initialisation(self):
        """
        Test that main configuration can be read and initialised properly

        Note:
            This test reads configuration from resources directory
        """
        config = self.config
        assert_that(config.surface_manager, is_(not_none()))
        assert_that(config.action_factory, is_(not_none()))
        assert_that(config.item_generator, is_(not_none()))
        assert_that(config.creature_generator, is_(not_none()))
        assert_that(config.level_generator_factory, is_(not_none()))
        assert_that(config.level_size, is_(not_none()))
        assert_that(config.model, is_(not_none()))
        assert_that(config.rng, is_(not_none()))

    def test_first_gate_generator(self):
        """
        Test that first gate level generator can be retrieved and used
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('first gate')
        level = generator(None)

    def test_upper_mines_generator(self):
        """
        Test that upper mines level generator can be retrieved
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('upper mines')
        level = generator(None)

    def test_lower_mines_generator(self):
        """
        Test that lower mines level can be created
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('lower mines')
        level = generator(None)

    def test_forge_generator(self):
        """
        Test that forge can be generated
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('forge')
        level = generator(None)

    def test_lower_caverns_generator(self):
        """
        Test that lower caverns can be generated
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('lower caverns')
        level = generator(None)

    def test_middle_caverns_generator(self):
        """
        Test that middle caverns can be generated
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('middle caverns')
        level = generator(None)

    def test_upper_caverns_generator(self):
        """
        Test that upper caverns can be generated
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('upper caverns')
        level = generator(None)

    def test_second_gate_generator(self):
        """
        Test that second gate can be generated
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('second gate')
        level = generator(None)

    def test_lower_maze_generator(self):
        """
        Test that lower maze can be generated
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('lower maze')
        level = generator(None)

    def test_courtyard_generator(self):
        """
        Test that courtyard can be generated
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('courtyard')
        level = generator(None)

    def test_upper_maze_generator(self):
        """
        Test that upper maze can be generated
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('upper maze')
        level = generator(None)

    def test_third_gate_generator(self):
        """
        Test that third gate can be generated
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('third gate')
        level = generator(None)

    def test_lower_catacombs_generator(self):
        """
        Test that lower catacombs can be generated
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('lower catacombs')
        level = generator(None)

    def test_central_catacombs_generator(self):
        """
        Test that central catacombs can be generated
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('central catacombs')
        level = generator(None)

    def test_upper_catacombs_generator(self):
        """
        Test that upper catacombs can be generated
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('upper catacombs')
        level = generator(None)

    def test_final_gate_generator(self):
        """
        Test that final gate can be generated
        """
        factory = self.config.level_generator_factory
        generator = factory.get_generator('final gate')
        level = generator(None)

    def test_inventory_factory_has_been_initialised(self):
        """
        Test that inventory action factory has been initialised
        """
        factory = self.config.action_factory.get_sub_factory(
                            InventoryParameters(character = None,
                                                item = None,
                                                sub_action = 'pick up'))

        assert_that(factory, is_(not_none()))

    def test_player_character_generator_has_been_initialised(self):
        """
        Test that player character generator is initialised during
        configuration phase
        """
        assert_that(self.config.player_generator, is_(not_none()))


text:
import React from 'react'
import {render} from 'enzyme'
import NotFound from 'src/common/components/NotFound'

describe('<NotFound />', function () {
  it('contains `h1` header', function () {
    const wrapper = render(<NotFound />)
    expect(wrapper.find('h1').length).equal(1)
  })
})


text:
require('./init');
var expect = require('chai').expect;
var request = require('supertest');
var settingsController = require('../lib/api/v1/settings-controller');
var botMaster = require('../lib/fetching/bot-master');
var Source = require('../models/source');

describe('Settings controller', function() {
  before(function(done) {
    botMaster.kill();
    botMaster.addListeners('source', Source.schema);
    botMaster.addListeners('fetching', settingsController);

    Source.create({nickname: 'one', media: 'dummy', keywords: 'one'});
    Source.create({nickname: 'two', media: 'dummy', keywords: 'two'});
    Source.create({nickname: 'three', media: 'dummy', keywords: 'three'});

    var config = require('../config/secrets');
    config.updateFetching(false, function(err){
      done();
    });
  });

  describe('GET /api/v1/settings/fetching', function() {
    it('should return fetching status as disabled', function(done) {
      request(settingsController)
        .get('/api/v1/settings/fetching')
        .expect(200, {enabled: false}, done);
    });
  });

  describe('PUT /api/v1/settings/fetching/on', function() {
    it('should enable all bots', function(done) {
      request(settingsController)
        .put('/api/v1/settings/fetching/on')
        .expect(200)
        .end(function(err, res) {
          if (err) return done(err);
          // Allow time for bots to be fully started
          setTimeout(function() {
            botMaster.bots.forEach(function(bot) {
              expect(bot).to.have.property('enabled');
              expect(bot.enabled).to.be.true;
            });
            done();
          }, 100);
        });
    });
  });

  describe('GET /api/v1/settings/fetching', function() {
    it('should return fetching status as enabled', function(done) {
      request(settingsController)
        .get('/api/v1/settings/fetching')
        .expect(200, {enabled: true}, done);
    });
  });

  describe('PUT /api/v1/settings/fetching/off', function() {
    it('should disable all bots', function(done) {
      request(settingsController)
        .put('/api/v1/settings/fetching/off')
        .expect(200)
        .end(function(err, res) {
          if (err) return done(err);
          // Allow time for bots to be fully stopped
          setTimeout(function() {
            botMaster.bots.forEach(function(bot) {
              expect(bot).to.have.property('enabled');
              expect(bot.enabled).to.be.false;
            });
            done();
          }, 100);
        });
    });
  });

  describe('GET /api/v1/settings/fetching', function() {
    it('should return fetching status as disabled', function(done) {
      request(settingsController)
        .get('/api/v1/settings/fetching')
        .expect(200, {enabled: false}, done);
    });
  });

});


text:
QM_NAME=PERF0

MQ_DEFAULT_INSTALLATION_PATH=/opt/mqm
MQ_INSTALLATION_PATH=${MQ_INSTALLATION_PATH:=$MQ_DEFAULT_INSTALLATION_PATH}
. $MQ_INSTALLATION_PATH/bin/setmqenv

#Override the following two variables for non-default file locations
LOG_DIR=$MQ_DATA_PATH/log
DATA_DIRECTORY=$MQ_DATA_PATH/qmgrs

if crtmqm -u SYSTEM.DEAD.LETTER.QUEUE -h 50000 -lc -ld $LOG_DIR -md $DATA_DIRECTORY -lf 16384 -lp 16 $QM_NAME
then
	echo "Modifying $DATA_DIRECTORY/$QM_NAME/qm.ini"
    perl ./modifyQmIni.pl $DATA_DIRECTORY/$QM_NAME/qm.ini ./qm_update.ini

    #strmqm -c $QM_NAME
    strmqm $QM_NAME
    runmqsc $QM_NAME < "./mqsc/base.mqsc"
    runmqsc $QM_NAME < "./mqsc/rr.mqsc"
else
	echo "Cannot create queue manager $QM_NAME"
fi


text:
package org.jasig.cas.support.saml;

import org.apache.commons.lang3.StringUtils;
import org.jasig.cas.support.saml.authentication.principal.GoogleAccountsServiceFactory;
import org.jasig.cas.support.saml.authentication.principal.SamlService;
import org.jasig.cas.support.saml.authentication.principal.SamlServiceFactory;
import org.jasig.cas.util.PrivateKeyFactoryBean;
import org.jasig.cas.util.PublicKeyFactoryBean;
import org.jasig.cas.util.UniqueTicketIdGenerator;
import org.jasig.cas.web.AbstractServletContextInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.FileSystemResource;
import org.springframework.stereotype.Component;
import org.springframework.util.ResourceUtils;

import javax.servlet.ServletContextEvent;
import javax.servlet.annotation.WebListener;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.util.ArrayList;
import java.util.List;

/**
 * Initializes the CAS root servlet context to make sure
 * SAML validation endpoint can be activated by the main CAS servlet.
 * @author Misagh Moayyed
 * @since 4.2
 */
@WebListener
@Component
public class SamlServletContextListener extends AbstractServletContextInitializer {

    @Autowired
    @Qualifier("samlServiceFactory")
    private SamlServiceFactory samlServiceFactory;

    @Autowired
    @Qualifier("googleAccountsServiceFactory")
    private GoogleAccountsServiceFactory googleAccountsServiceFactory;

    @Autowired
    @Qualifier("samlServiceTicketUniqueIdGenerator")
    private UniqueTicketIdGenerator samlServiceTicketUniqueIdGenerator;

    @Override
    public void initializeServletContext(final ServletContextEvent sce) {
        addEndpointMappingToCasServlet(sce, SamlProtocolConstants.ENDPOINT_SAML_VALIDATE);
    }

    @Override
    protected void initializeRootApplicationContext() {
        addServiceFactory(samlServiceFactory);
        addServiceFactory(googleAccountsServiceFactory);
        addServiceTicketUniqueIdGenerator(SamlService.class.getCanonicalName(),
                this.samlServiceTicketUniqueIdGenerator);
    }

    @Override
    protected void initializeServletApplicationContext() {
        addControllerToCasServletHandlerMapping(SamlProtocolConstants.ENDPOINT_SAML_VALIDATE,
                "samlValidateController");
    }

    @Component
    @Configuration
    private static class GoogleAppsConfigurationInitializer {

        private final Logger logger = LoggerFactory.getLogger(getClass());

        @Value("${cas.saml.googleapps.publickey.file:}")
        private String publicKeyLocation;

        @Value("${cas.saml.googleapps.privatekey.file:}")
        private String privateKeyLocation;

        @Value("${cas.saml.googleapps.key.alg:}")
        private String keyAlgorithm;

        protected GoogleAppsConfigurationInitializer() {}

        @Bean(name="googleAppsPrivateKey", autowire = Autowire.BY_NAME)
        public PrivateKey getGoogleAppsPrivateKey() throws Exception {
            if (!isValidConfiguration()) {
                logger.debug("Google Apps private key bean will not be created, because it's not configured");
                return null;

            }
            final PrivateKeyFactoryBean bean = new PrivateKeyFactoryBean();

            if (this.privateKeyLocation.startsWith(ResourceUtils.CLASSPATH_URL_PREFIX)) {
                bean.setLocation(new ClassPathResource(
                    StringUtils.removeStart(this.privateKeyLocation, ResourceUtils.CLASSPATH_URL_PREFIX)));
            } else {
                bean.setLocation(new FileSystemResource(this.privateKeyLocation));
            }

            bean.setAlgorithm(this.keyAlgorithm);
            bean.afterPropertiesSet();

            logger.debug("Creating Google Apps private key instance via {}", this.publicKeyLocation);
            return bean.getObject();
        }

        @Bean(name="googleAppsPublicKey", autowire = Autowire.BY_NAME)
        public PublicKey getGoogleAppsPublicKey() throws Exception {
            if (!isValidConfiguration()) {
                logger.debug("Google Apps public key bean will not be created, because it's not configured");
                return null;
            }

            final PublicKeyFactoryBean bean = new PublicKeyFactoryBean();
            if (this.publicKeyLocation.startsWith(ResourceUtils.CLASSPATH_URL_PREFIX)) {
                bean.setLocation(new ClassPathResource(
                    StringUtils.removeStart(this.publicKeyLocation, ResourceUtils.CLASSPATH_URL_PREFIX)));
            } else {
                bean.setLocation(new FileSystemResource(this.publicKeyLocation));
            }

            bean.setAlgorithm(this.keyAlgorithm);
            bean.afterPropertiesSet();

            logger.debug("Creating Google Apps public key instance via {}", this.publicKeyLocation);
            return bean.getObject();
        }

        @Bean(name="serviceFactoryList")
        public List getServiceFactoryList() {
            return new ArrayList();
        }

        private boolean isValidConfiguration() {
            return StringUtils.isNotBlank(this.privateKeyLocation)
                    || StringUtils.isNotBlank(this.publicKeyLocation)
                    || StringUtils.isNotBlank(this.keyAlgorithm);
        }
    }

}


text:
package org.apache.shardingsphere.route.time;

import lombok.Getter;
import org.apache.shardingsphere.route.time.exception.TimeServiceInitException;

import javax.sql.DataSource;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Properties;

/**
 * Time service configuration.
 *
 * <p>
 * Need to create a time-service.properties under the classpath.
 * </p>
 */
@Getter
public final class TimeServiceConfiguration {

    private static final TimeServiceConfiguration CONFIG = new TimeServiceConfiguration();

    private String driverClassName;

    private DataSource dataSource;

    private TimeServiceConfiguration() {
        init();
    }

    private void init() {
        try (InputStream inputStream = TimeServiceConfiguration.class.getResourceAsStream("/time-service.properties")) {
            Properties properties = new Properties();
            properties.load(inputStream);
            String dataSourceType = (String) properties.remove("dataSourceType");
            driverClassName = (String) properties.get("driverClassName");
            Class dataSourceClass = Class.forName(dataSourceType);
            dataSource = (DataSource) dataSourceClass.newInstance();
            for (String each : properties.stringPropertyNames()) {
                PropertyDescriptor propertyDescriptor = new PropertyDescriptor(each, dataSourceClass);
                Method writeMethod = propertyDescriptor.getWriteMethod();
                writeMethod.invoke(dataSource, properties.getProperty(each));
            }
        } catch (final ClassNotFoundException | InstantiationException | IllegalAccessException | IntrospectionException | InvocationTargetException | IOException ex) {
            throw new TimeServiceInitException("please check your time-service.properties", ex);
        }
    }

    /**
     * Get configuration instance.
     *
     * @return time service configuration
     */
    public static TimeServiceConfiguration getInstance() {
        return CONFIG;
    }
}


text:
.PHONY: help clean dev docs package test

help:
	@echo "This project assumes that an active Python virtualenv is present."
	@echo "The following make targets are available:"
	@echo "	 dev 	install all deps for dev env"
	@echo "	 test	run all tests with coverage"

clean:
	rm -rf dist/*

dev:
	pip install coverage
	pip install codecov
	pip install pylint
	pip install twine
	pip install -e .

package:
	python setup.py sdist
	python setup.py bdist_wheel

test:
	coverage run -m unittest discover


text:
title: Mandy Brown
summary: Designer, writer, editor (A Book Apart)
date: 2012-03-19
categories:
- designer
- editor
- mac
- writer
---

### Who are you, and what do you do?

I'm [Mandy Brown](http://aworkinglibrary.com/ "Mandy's website."). I'm co-founder and editor of [A Book Apart](http://www.abookapart.com/ "Small books for people who make websites."), a former contributing editor at [*A List Apart*](http://www.alistapart.com/ "Articles for people who make websites."), and communications director at [Typekit][] (recently acquired by Adobe).

### What hardware do you use?

I have a year-and-a-half old 15" [MacBook Pro][macbook-pro] with a matte screen, an [iPhone 4][iphone-4], and an [iPad 1][ipad]. The Macbook is in my lap or bag most of the time, though on occasion, I travel with the iPad and an [Apple wireless keyboard][keyboard]. I use a [Magic Mouse][magic-mouse] when sitting at my desk at Studiomates.

I carry everything around in a [Moop messenger bag][messenger-no-1]; there's enough room for the Macbook, a Moleskin, and a print book. (I still carry those around. I know - it's ridiculous.)

### And what software?

I'm still running [Snow Leopard][macos], largely out of laziness. I'll get around to updating soon, perhaps. I use [Propane][] to connect to Typekit's Campfire account; we're virtual, with folks spread out between San Francisco and Berlin, so this is where much of our work happens. I'm also routinely on [Skype][]. I often forget that my iPhone is actually, you know, a *phone*.

I spend a lot of my time in a browser; usually [Safari][]. [Chrome][] is arguably a better browser, but I seem to be sticking with Safari out of inertia and appreciation for its stronger visual polish. I keep [Firefox][] around for testing and because [Firebug][] is still the best way to debug a site. I use [1Password][] to log in everywhere. It's completely insane how many logins one person can acquire.

[Things][] remains my to-do app, especially now that the cloud sync is in public beta. I like the way it lets me organize to-dos into different projects; when you have a lot of projects, that bit of separation is key. And anyways, I don't try new things frivolously (as may be clear by now); I wait for something to be broken to switch.

[TextExpander][] is like a magical assistant. I honestly don't know what I did without it. I use it most routinely in [Mail][], for things like signatures, addresses, phone numbers, and salutations. Such a tiny little courtesy it serves, but it's a lovely thing.

I use [Photoshop][] CS5 for sketching layouts and cropping jpegs, and [InDesign][] for working on the books. Editing for the books usually happens in either [Word][] or [Pages][]; I have no love for either, but Word plays nicely with InDesign, so we're a little but stuck with it for now.

I've been using [IA Writer][ia-writer] a bit lately for writing; I love the look of it, but find myself going back to [Writeboards][writeboard] in my [Backpack][] account out of a need to mark and compare versions.

I recently started using [nvALT 2][nvalt] to take notes and I'm smitten. The Markdown support, keyboard-centric design, searching, and autosave are all excellent. I'm taking more and better notes as a result.

I use [TextMate][] to code; I don't even really care that it hasn't been updated in a while - it suits my purposes as is. I'm proud to say I use the [Terminal][] for working with [Git][], though sometimes I still have to ask Typekit's engineers for help remembering certain commands. (They are a patient bunch.)

Nearly everything I work on is stored in [Dropbox][]. I feel good knowing my laptop could be stolen or smashed, and I could pick up a new machine, hook it up to Dropbox, and get back to work moments later. I keep [Crashplan][] installed as an extra level of backup.

On my iPhone, I use [TweetBot][tweetbot-ios], and mute posts from Foursquare and the like. My iPad is almost exclusively an [Instapaper][instapaper-ios] device, though I also use [GoodReader][goodreader-ios] for reviewing manuscripts.

### What would be your dream setup?

I'm pretty happy with what I have, though I'm looking forward to eventually trading in the MacBook Pro for a 13" Air. I love that each new machine I get is smaller and lighter than the last. I used to think I needed a huge monitor, but now that so much of my work is writing and editing, that's no longer the case. I'd rather have devices that are smaller, more focused, and more comfortably portable.

[1password]: https://1password.com "Password management software for Mac OS X."
[backpack]: https://en.wikipedia.org/wiki/37_signals#Backpack "An intra-company web service for sharing calendars, documents and files."
[chrome]: https://www.google.com/intl/en/chrome/browser/ "A WebKit-based browser, where each tab runs in its own thread."
[crashplan]: https://www.crashplan.com/en-us/ "An online backup service."
[dropbox]: https://www.dropbox.com/ "Online syncing and storage."
[firebug]: https://getfirebug.com/ "A Firefox addon for web development."
[firefox]: https://www.mozilla.org/en-US/firefox/new/ "A cross-platform open-source web browser."
[git]: https://git-scm.com/ "A version control system."
[goodreader-ios]: http://goodreader.com/ "A PDF reader for the iPad."
[ia-writer]: https://ia.net/writer/updates/ia-writer-for-mac "A full-screen writing tool for the Mac."
[indesign]: https://www.adobe.com/products/indesign.html "A desktop/web publishing application."
[instapaper-ios]: https://www.instapaper.com/iphone "An iPhone app for reading Instapaper saved pages."
[ipad]: https://www.apple.com/ipad/ "A tablet device."
[iphone-4]: https://en.wikipedia.org/wiki/IPhone_4 "A smartphone."
[keyboard]: https://www.apple.com/keyboard/ "The keyboard."
[macbook-pro]: https://www.apple.com/macbook-pro/ "A laptop."
[macos]: https://en.wikipedia.org/wiki/MacOS "An operating system for Mac hardware."
[magic-mouse]: https://en.wikipedia.org/wiki/Magic_Mouse "A multi-touch mouse."
[mail]: https://en.wikipedia.org/wiki/Mail_(application) "The default Mac OS X mail client."
[messenger-no-1]: https://www.moopshop.com/products/messenger-no-1-in-waxed-canvas "A bag."
[nvalt]: https://brettterpstra.com/projects/nvalt/ "A fork of Notational Velocity with extra features."
[pages]: https://www.apple.com/pages/ "A Mac word processor and layout tool from Apple."
[photoshop]: https://www.adobe.com/products/photoshop.html "A bitmap image editor."
[propane]: http://propaneapp.com/ "A native Mac client for the Campfire chat service."
[safari]: https://www.apple.com/safari/ "A fast web browser."
[skype]: https://www.skype.com/en/ "Voice and video chat software."
[terminal]: https://en.wikipedia.org/wiki/Terminal_(OS_X) "A console application included with Mac OS X."
[textexpander]: https://smilesoftware.com/textexpander "A Mac app for adding custom abbreviations for often-used text."
[textmate]: https://macromates.com/ "A text editor for the Mac."
[things]: https://culturedcode.com/things/ "A task management application for the Mac."
[tweetbot-ios]: https://tapbots.com/tweetbot/ "A Twitter client for iOS."
[typekit]: https://typekit.com/ "A service for web fonts."
[word]: https://products.office.com/en-us/word "A document editor."
[writeboard]: https://basecamp.com/retired/writeboard "Web-based sharable text document."


text:
package de.endrullis.idea.postfixtemplates.languages.dart;

import com.intellij.codeInsight.template.postfix.templates.PostfixTemplateProvider;
import com.intellij.openapi.util.Condition;
import com.intellij.psi.PsiElement;
import de.endrullis.idea.postfixtemplates.templates.SimpleStringBasedPostfixTemplate;
import de.endrullis.idea.postfixtemplates.templates.SpecialType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.HashMap;
import java.util.Map;

import static de.endrullis.idea.postfixtemplates.languages.dart.DartPostfixTemplatesUtils.IS_ANY;

@SuppressWarnings("WeakerAccess")
public class CustomDartStringPostfixTemplate extends SimpleStringBasedPostfixTemplate {

	private static final Map<String, Condition<PsiElement>> type2psiCondition = new HashMap<>() {{
		put(SpecialType.ANY.name(), IS_ANY);
	}};

	public CustomDartStringPostfixTemplate(String matchingClass, String conditionClass, String name, String example, String template, PostfixTemplateProvider provider, PsiElement psiElement) {
		super(name, example, template, provider, psiElement, selectorAllExpressionsWithCurrentOffset(getCondition(matchingClass, conditionClass)));
	}

	@NotNull
	public static Condition<PsiElement> getCondition(final @NotNull String matchingClass, final @Nullable String conditionClass) {
		return type2psiCondition.get(matchingClass);
	}

}


text:
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK

#include <memory>
#include <string>
#include <tuple>
#include <boost/test/unit_test.hpp>

#include "jml/arch/futex.h"
#include "jml/arch/timers.h"
#include "jml/utils/testing/watchdog.h"
#include "soa/service/message_loop.h"
#include "soa/service/rest_proxy.h"
#include "soa/service/http_client.h"
#include "soa/utils/print_utils.h"

#include "test_http_services.h"

using namespace std;
using namespace Datacratic;

/* helpers functions used in tests */
namespace {

typedef tuple<HttpClientError, int, string> ClientResponse;

#define CALL_MEMBER_FN(object, pointer)  (object.*(pointer))

/* sync request helpers */
template<typename Func>
ClientResponse
doRequest(MessageLoop & loop,
          const string & baseUrl, const string & resource,
          Func func,
          const RestParams & queryParams, const RestParams & headers,
          int timeout = -1)
{
    ClientResponse response;

    auto client = make_shared<HttpClient>(baseUrl, 4);
    loop.addSource("client", client);
    client->waitConnectionState(AsyncEventSource::CONNECTED);

    int done(false);
    auto onResponse = [&] (const HttpRequest & rq,
                           HttpClientError error,
                           int status,
                           string && headers,
                           string && body) {
        int & code = get<1>(response);
        code = status;
        string & body_ = get<2>(response);
        body_ = move(body);
        HttpClientError & errorCode = get<0>(response);
        errorCode = error;
        done = true;
        ML::futex_wake(done);
    };
    auto cbs = make_shared<HttpClientSimpleCallbacks>(onResponse);

    CALL_MEMBER_FN(*client, func)(resource, cbs, queryParams, headers,
                                  timeout);

    while (!done) {
        int oldDone = done;
        ML::futex_wait(done, oldDone);
    }

    loop.removeSource(client.get());
    client->waitConnectionState(AsyncEventSource::DISCONNECTED);

    return response;
}

ClientResponse
doGetRequest(MessageLoop & loop,
             const string & baseUrl, const string & resource,
             const RestParams & queryParams = RestParams(),
             const RestParams & headers = RestParams(),
             int timeout = -1)
{
    return doRequest(loop, baseUrl, resource, &HttpClient::get,
                     queryParams, headers, timeout);
}

ClientResponse
doDeleteRequest(MessageLoop & loop,
                const string & baseUrl, const string & resource,
                const RestParams & queryParams = RestParams(),
                const RestParams & headers = RestParams(),
                int timeout = -1)
{
    return doRequest(loop, baseUrl, resource, &HttpClient::del,
                     queryParams, headers, timeout);
}

ClientResponse
doUploadRequest(MessageLoop & loop,
                bool isPut,
                const string & baseUrl, const string & resource,
                const string & body, const string & type)
{
    ClientResponse response;

    auto client = make_shared<HttpClient>(baseUrl, 4);
    loop.addSource("client", client);
    client->waitConnectionState(AsyncEventSource::CONNECTED);

    int done(false);
    auto onResponse = [&] (const HttpRequest & rq,
                           HttpClientError error,
                           int status,
                           string && headers,
                           string && body) {
        int & code = get<1>(response);
        code = status;
        string & body_ = get<2>(response);
        body_ = move(body);
        HttpClientError & errorCode = get<0>(response);
        errorCode = error;
        done = true;
        ML::futex_wake(done);
    };

    auto cbs = make_shared<HttpClientSimpleCallbacks>(onResponse);
    HttpRequest::Content content(body, type);
    if (isPut) {
        client->put(resource, cbs, content);
    }
    else {
        client->post(resource, cbs, content);
    }

    while (!done) {
        int oldDone = done;
        ML::futex_wait(done, oldDone);
    }

    loop.removeSource(client.get());
    client->waitConnectionState(AsyncEventSource::DISCONNECTED);

    return response;
}

}

#if 1
BOOST_AUTO_TEST_CASE( test_http_client_get )
{
    cerr << "client_get\n";
    ML::Watchdog watchdog(10);
    auto proxies = make_shared<ServiceProxies>();
    HttpGetService service(proxies);

    service.addResponse("GET", "/coucou", 200, "coucou");
    service.start();

    MessageLoop loop;
    loop.start();

    service.waitListening();

#if 0
    /* request to bad ip
       Note: if the ip resolution timeout is very high on the router, the
       Watchdog timeout might trigger first */
    {
        ::fprintf(stderr, "request to bad ip\n");
        string baseUrl("http://123.234.12.23");
        auto resp = doGetRequest(loop, baseUrl, "/");
        BOOST_CHECK_EQUAL(get<0>(resp), HttpClientError::CouldNotConnect);
        BOOST_CHECK_EQUAL(get<1>(resp), 0);
    }
#endif

#if 0
    /* request to bad hostname
       Note: will fail when the name service returns a "default" value for all
       non resolved hosts */
    {
        ::fprintf(stderr, "request to bad hostname\n");
        string baseUrl("http://somewhere.lost");
        auto resp = doGetRequest(loop, baseUrl, "/");
        BOOST_CHECK_EQUAL(get<0>(resp), HttpClientError::HostNotFound);
        BOOST_CHECK_EQUAL(get<1>(resp), 0);
    }
#endif

    /* request with timeout */
    {
        ::fprintf(stderr, "request with timeout\n");
        string baseUrl("http://127.0.0.1:" + to_string(service.port()));
        auto resp = doGetRequest(loop, baseUrl, "/timeout", {}, {}, 1);
        BOOST_CHECK_EQUAL(get<0>(resp), HttpClientError::Timeout);
        BOOST_CHECK_EQUAL(get<1>(resp), 0);
    }

    /* request connection close */
    {
        ::fprintf(stderr, "testing behaviour with connection: close\n");
        string baseUrl("http://127.0.0.1:" + to_string(service.port()));
        auto resp = doGetRequest(loop, baseUrl, "/connection-close");
        BOOST_CHECK_EQUAL(get<0>(resp), HttpClientError::None);
        BOOST_CHECK_EQUAL(get<1>(resp), 204);
    }

    /* request to /nothing -> 404 */
    {
        ::fprintf(stderr, "request with 404\n");
        string baseUrl("http://127.0.0.1:"
                       + to_string(service.port()));
        auto resp = doGetRequest(loop, baseUrl, "/nothing");
        BOOST_CHECK_EQUAL(get<0>(resp), HttpClientError::None);
        BOOST_CHECK_EQUAL(get<1>(resp), 404);
    }

    /* request to /coucou -> 200 + "coucou" */
    {
        ::fprintf(stderr, "request with 200\n");
        string baseUrl("http://127.0.0.1:"
                       + to_string(service.port()));
        auto resp = doGetRequest(loop, baseUrl, "/coucou");
        BOOST_CHECK_EQUAL(get<0>(resp), HttpClientError::None);
        BOOST_CHECK_EQUAL(get<1>(resp), 200);
        BOOST_CHECK_EQUAL(get<2>(resp), "coucou");
    }

    /* headers and cookies */
    {
        string baseUrl("http://127.0.0.1:" + to_string(service.port()));
        auto resp = doGetRequest(loop, baseUrl, "/headers", {},
                                 {{"someheader", "somevalue"}});
        Json::Value expBody;
        expBody["accept"] = "*/*";
        expBody["host"] = baseUrl.substr(7);
        expBody["someheader"] = "somevalue";
        Json::Value jsonBody = Json::parse(get<2>(resp));
        BOOST_CHECK_EQUAL(jsonBody, expBody);
    }

    /* query-params */
    {
        string baseUrl("http://127.0.0.1:" + to_string(service.port()));
        auto resp = doGetRequest(loop, baseUrl, "/query-params",
                                 {{"value", "hello"}});
        string body = get<2>(resp);
        BOOST_CHECK_EQUAL(body, "?value=hello");
    }

    service.shutdown();
}
#endif

#if 1
BOOST_AUTO_TEST_CASE( test_http_client_post )
{
    cerr << "client_post\n";
    ML::Watchdog watchdog(10);
    auto proxies = make_shared<ServiceProxies>();
    HttpUploadService service(proxies);
    service.start();

    MessageLoop loop;
    loop.start();

    /* request to /coucou -> 200 + "coucou" */
    {
        string baseUrl("http://127.0.0.1:"
                       + to_string(service.port()));
        auto resp = doUploadRequest(loop, false, baseUrl, "/post-test",
                                    "post body", "application/x-nothing");
        BOOST_CHECK_EQUAL(get<0>(resp), HttpClientError::None);
        BOOST_CHECK_EQUAL(get<1>(resp), 200);
        Json::Value jsonBody = Json::parse(get<2>(resp));
        BOOST_CHECK_EQUAL(jsonBody["verb"], "POST");
        BOOST_CHECK_EQUAL(jsonBody["payload"], "post body");
        BOOST_CHECK_EQUAL(jsonBody["type"], "application/x-nothing");
    }

    service.shutdown();
}
#endif

#if 1
BOOST_AUTO_TEST_CASE( test_http_client_put )
{
    cerr << "client_put\n";
    ML::Watchdog watchdog(10);
    auto proxies = make_shared<ServiceProxies>();
    HttpUploadService service(proxies);
    service.start();

    MessageLoop loop;
    loop.start();

    string baseUrl("http://127.0.0.1:"
                   + to_string(service.port()));
    string bigBody;
    for (int i = 0; i < 65535; i++) {
        bigBody += "this is one big body,";
    }
    auto resp = doUploadRequest(loop, true, baseUrl, "/put-test",
                                bigBody, "application/x-nothing");
    BOOST_CHECK_EQUAL(get<0>(resp), HttpClientError::None);
    BOOST_CHECK_EQUAL(get<1>(resp), 200);
    Json::Value jsonBody = Json::parse(get<2>(resp));
    BOOST_CHECK_EQUAL(jsonBody["verb"], "PUT");
    BOOST_CHECK_EQUAL(jsonBody["payload"], bigBody);
    BOOST_CHECK_EQUAL(jsonBody["type"], "application/x-nothing");

    service.shutdown();
}
#endif

#if 1
BOOST_AUTO_TEST_CASE( http_test_client_delete )
{
    cerr << "client_delete" << endl;
    ML::Watchdog watchdog(10);

    auto proxies = make_shared<ServiceProxies>();
    HttpGetService service(proxies);

    service.addResponse("DELETE", "/deleteMe", 200, "Deleted");
    service.start();

    MessageLoop loop;
    loop.start();

    string baseUrl("http://127.0.0.1:" + to_string(service.port()));
    auto resp = doDeleteRequest(loop, baseUrl, "/deleteMe", {}, {}, 1);

    BOOST_CHECK_EQUAL(get<0>(resp), HttpClientError::None);
    BOOST_CHECK_EQUAL(get<1>(resp), 200);

    service.shutdown();
}
#endif

#if 1
BOOST_AUTO_TEST_CASE( test_http_client_put_multi )
{
    cerr << "client_put_multi\n";
    auto proxies = make_shared<ServiceProxies>();
    HttpUploadService service(proxies);
    service.start();

    string baseUrl("http://127.0.0.1:"
                   + to_string(service.port()));

    MessageLoop loop;
    loop.start();

    auto client = make_shared<HttpClient>(baseUrl);
    loop.addSource("client", client);
    client->waitConnectionState(AsyncEventSource::CONNECTED);

    size_t maxRequests(500);
    int done(0);

    auto makeBody = [&] (size_t i) {
        int multiplier = (i < maxRequests / 2) ? -2 : 2;
        size_t bodySize = 2000 + multiplier * i;
        string body = ML::format("%.4x", bodySize);
        size_t rndSize = bodySize - body.size();
        body += randomString(rndSize);

        return body;
    };

    for (size_t i = 0; i < maxRequests; i++) {
        auto sendBody = makeBody(i);
        auto onResponse = [&, sendBody] (const HttpRequest & rq,
                                         HttpClientError error,
                                         int status,
                                         string && headers,
                                         string && body) {
            BOOST_CHECK_EQUAL(error, HttpClientError::None);
            BOOST_CHECK_EQUAL(status, 200);
            Json::Value jsonBody = Json::parse(body);
            BOOST_CHECK_EQUAL(jsonBody["verb"], "PUT");
            BOOST_CHECK_EQUAL(jsonBody["payload"], sendBody);
            BOOST_CHECK_EQUAL(jsonBody["type"], "text/plain");
            done++;
            if (done == maxRequests) {
                ML::futex_wake(done);
            }
        };

        auto cbs = make_shared<HttpClientSimpleCallbacks>(onResponse);
        HttpRequest::Content content(sendBody, "text/plain");
        while (!client->put("/", cbs, content)) {
            ML::sleep(0.2);
        }
    };

    while (done < maxRequests) {
        int oldDone = done;
        ML::futex_wait(done, oldDone);
    }

    loop.shutdown();
    service.shutdown();
}
#endif

#if 1
/* Ensures that all requests are correctly performed under load, including
   when "Connection: close" is encountered once in a while.
   Not a performance test. */
BOOST_AUTO_TEST_CASE( test_http_client_stress_test )
{
    cerr << "stress_test\n";
    // const int mask = 0x3ff; /* mask to use for displaying counts */
    // ML::Watchdog watchdog(300);
    auto proxies = make_shared<ServiceProxies>();
    auto doStressTest = [&] (int numParallel) {
        ::fprintf(stderr, "stress test with %d parallel connections\n",
                  numParallel);

        HttpGetService service(proxies);
        service.start();
        service.waitListening();

        string baseUrl("http://127.0.0.1:"
                       + to_string(service.port()));

        MessageLoop loop;
        loop.start();

        auto client = make_shared<HttpClient>(baseUrl, numParallel);
        loop.addSource("client", client);
        client->waitConnectionState(AsyncEventSource::CONNECTED);

        int maxReqs(30000), numReqs(0), missedReqs(0);
        int numResponses(0);

        auto onDone = [&] (const HttpRequest & rq,
                           HttpClientError errorCode, int status,
                           string && headers, string && body) {
            numResponses++;

            BOOST_CHECK_EQUAL(errorCode, HttpClientError::None);
            BOOST_CHECK_EQUAL(status, 200);

            int bodyNbr;
            try {
                bodyNbr = stoi(body);
            }
            catch (...) {
                ::fprintf(stderr, "exception when parsing body: %s\n",
                          body.c_str());
                throw;
            }

            if (numResponses == numReqs) {
                ML::futex_wake(numResponses);
            }
        };

        while (numReqs < maxReqs) {
            const char * url = "/counter";
            auto cbs = make_shared<HttpClientSimpleCallbacks>(onDone);
            if (client->get(url, cbs)) {
                numReqs++;
                // if ((numReqs & mask) == 0 || numReqs == maxReqs) {
                //     ::fprintf(stderr, "performed %d requests\n", numReqs);
                // }
            }
            else {
                missedReqs++;
            }
        }

        ::fprintf(stderr, "all requests performed, awaiting responses...\n");
        while (numResponses < maxReqs) {
            int old(numResponses);
            ML::futex_wait(numResponses, old);
        }
        ::fprintf(stderr, "performed %d requests; missed: %d\n",
                  maxReqs, missedReqs);

        loop.shutdown();
        service.shutdown();
    };

    doStressTest(1);
    doStressTest(8);
    doStressTest(128);
}
#endif

#if 1
/* Ensure that the move constructor and assignment operator behave
   reasonably well. */
BOOST_AUTO_TEST_CASE( test_http_client_move_constructor )
{
    cerr << "move_constructor\n";
    ML::Watchdog watchdog(30);
    auto proxies = make_shared<ServiceProxies>();

    HttpGetService service(proxies);
    service.addResponse("GET", "/", 200, "coucou");
    service.start();
    service.waitListening();

    MessageLoop loop;
    loop.start();

    string baseUrl("http://127.0.0.1:"
                   + to_string(service.port()));

    auto doGet = [&] (HttpClient & getClient) {
        loop.addSource("client", getClient);
        getClient.waitConnectionState(AsyncEventSource::CONNECTED);

        int done(false);

        auto onDone = [&] (const HttpRequest & rq,
                           HttpClientError errorCode, int status,
                           string && headers, string && body) {
            done = true;
            ML::futex_wake(done);
        };
        auto cbs = make_shared<HttpClientSimpleCallbacks>(onDone);

        getClient.get("/", cbs);
        while (!done) {
            int old = done;
            ML::futex_wait(done, old);
        }

        loop.removeSource(&getClient);
        getClient.waitConnectionState(AsyncEventSource::DISCONNECTED);
    };

    /* move constructor */
    cerr << "testing move constructor\n";
    auto makeClient = [&] () {
        return HttpClient(baseUrl, 1);
    };
    HttpClient client1(move(makeClient()));
    doGet(client1);

    /* move assignment operator */
    cerr << "testing move assignment op.\n";
    HttpClient client2("http://nowhere", 1);
    client2 = move(client1);
    doGet(client2);

    service.shutdown();
}
#endif

#if 1
/* Ensure that an infinite number of requests can be queued when queue size is
 * 0, even from within callbacks. */
BOOST_AUTO_TEST_CASE( test_http_client_unlimited_queue )
{
    static const int maxLevel(4);

    ML::Watchdog watchdog(30);
    auto proxies = make_shared<ServiceProxies>();

    HttpGetService service(proxies);
    service.addResponse("GET", "/", 200, "coucou");
    service.start();
    service.waitListening();

    MessageLoop loop;
    loop.start();

    string baseUrl("http://127.0.0.1:"
                   + to_string(service.port()));

    auto client = make_shared<HttpClient>(baseUrl, 4, 0);
    loop.addSource("client", client);
    client->waitConnectionState(AsyncEventSource::CONNECTED);

    atomic<int> pending(0);
    int done(0);

    function<void(int)> doGet = [&] (int level) {
        pending++;
        auto onDone = [&,level] (const HttpRequest & rq,
                                 HttpClientError errorCode, int status,
                                 string && headers, string && body) {
            if (level < maxLevel) {
                for (int i = 0; i < 10; i++) {
                    doGet(level+1);
                }
            }
            pending--;
            done++;
        };
        auto cbs = make_shared<HttpClientSimpleCallbacks>(onDone);
        client->get("/", cbs);
    };

    doGet(0);

    while (pending > 0) {
        ML::sleep(1);
        cerr << "requests done: " + to_string(done) + "\n";
    }

    loop.shutdown();
    service.shutdown();
}
#endif

#if 1
/* Test connection restoration after a timeout occurs. */
BOOST_AUTO_TEST_CASE( test_http_client_connection_timeout )
{
    ML::Watchdog watchdog(30);
    auto proxies = make_shared<ServiceProxies>();

    HttpGetService service(proxies);
    service.addResponse("GET", "/", 200, "coucou");
    service.start();
    service.waitListening();

    MessageLoop loop;
    loop.start();

    string baseUrl("http://127.0.0.1:" + to_string(service.port()));

    auto client = make_shared<HttpClient>(baseUrl, 1);
    client->enableDebug(true);
    loop.addSource("client", client);
    client->waitConnectionState(AsyncEventSource::CONNECTED);

    int done(0);
    auto onDone = [&] (const HttpRequest & rq,
                       HttpClientError errorCode, int status,
                       string && headers, string && body) {
        done++;
        ML::futex_wake(done);
    };
    auto cbs = make_shared<HttpClientSimpleCallbacks>(onDone);
    client->get("/timeout", cbs, {}, {}, 1);
    client->get("/", cbs, {}, {}, 1);

    while (done < 2) {
        ML::futex_wait(done, done);
    }

    loop.shutdown();
    service.shutdown();
}
#endif

#if 1
/* Test connection restoration after the server closes the connection, under
 * various circumstances. */
BOOST_AUTO_TEST_CASE( test_http_client_connection_closed )
{
    ML::Watchdog watchdog(30);
    auto proxies = make_shared<ServiceProxies>();

    HttpGetService service(proxies);
    service.addResponse("GET", "/", 200, "coucou");
    service.start();
    service.waitListening();

    MessageLoop loop;
    loop.start();

    string baseUrl("http://127.0.0.1:" + to_string(service.port()));

    /* response sent, "Connection: close" header */
    {
        cerr << "* connection-close\n";
        auto client = make_shared<HttpClient>(baseUrl, 1);
        loop.addSource("client", client);
        client->waitConnectionState(AsyncEventSource::CONNECTED);

        int done(0);
        auto onDone = [&] (const HttpRequest & rq,
                           HttpClientError errorCode, int status,
                           string && headers, string && body) {
            done++;
            ML::futex_wake(done);
        };
        auto cbs = make_shared<HttpClientSimpleCallbacks>(onDone);
        client->get("/connection-close", cbs);
        client->get("/", cbs);

        while (done < 2) {
            ML::futex_wait(done, done);
        }

        loop.removeSourceSync(client.get());
    }

    /* response sent, no "Connection: close" header */
    {
        cerr << "* no connection-close\n";
        auto client = make_shared<HttpClient>(baseUrl, 1);
        loop.addSource("client", client);
        client->waitConnectionState(AsyncEventSource::CONNECTED);

        int done(0);
        auto onDone = [&] (const HttpRequest & rq,
                           HttpClientError errorCode, int status,
                           string && headers, string && body) {
            done++;
            ML::futex_wake(done);
        };
        auto cbs = make_shared<HttpClientSimpleCallbacks>(onDone);
        client->get("/quiet-connection-close", cbs);
        client->get("/", cbs);

        while (done < 2) {
            ML::futex_wait(done, done);
        }

        loop.removeSourceSync(client.get());
    }

    /* response not sent */
    {
        cerr << "* no response at all\n";
        auto client = make_shared<HttpClient>(baseUrl, 1);
        loop.addSource("client", client);
        client->waitConnectionState(AsyncEventSource::CONNECTED);

        int done(0);
        auto onDone = [&] (const HttpRequest & rq,
                           HttpClientError errorCode, int status,
                           string && headers, string && body) {
            done++;
            ML::futex_wake(done);
        };
        auto cbs = make_shared<HttpClientSimpleCallbacks>(onDone);
        client->get("/abrupt-connection-close", cbs);
        client->get("/", cbs);

        while (done < 2) {
            ML::futex_wait(done, done);
        }

        loop.removeSourceSync(client.get());
    }

    loop.shutdown();
    service.shutdown();
}
#endif


text:
The following setting is often modified from the default as part of the tuning effort for the **postgresql** service:

`postgresql['max_connections']`

:   The maximum number of allowed concurrent connections. This value should only be tuned when the `opscode_erchef['db_pool_size']` value used by the **opscode-erchef** service is modified. Default value: `350`.
    If there are more than two front end machines in a cluster, the
    `postgresql['max_connections']` setting should be increased. The
    increased value depends on the number of machines in the front end,
    but also the number of services that are running on each of these
    machines.

    -   Each front end machine always runs the **oc_bifrost** and
        **opscode-erchef** services.
    -   The Reporting add-on adds the **reporting** service.

    Each of these services requires 25 connections, above the default
    value.

    Use the following formula to help determine what the increased value
    should be:

    ```ruby
    new_value = current_value + [
                (# of front end machines - 2) * (25 * # of services)
             ]
    ```

    For example, if the current value is 350, there are four front end
    machines, and all add-ons are installed, then the formula looks
    like:

    ```ruby
    550 = 350 + [(4 - 2) * (25 * 4)]
    ```


text:
'use strict';

exports.__esModule = true;

var _core = require('../core');

var core = _interopRequireWildcard(_core);

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

/**
 * Holds all information related to an Interaction event
 *
 * @class
 * @memberof PIXI.interaction
 */
var InteractionData = function () {
  /**
   *
   */
  function InteractionData() {
    _classCallCheck(this, InteractionData);

    /**
     * This point stores the global coords of where the touch/mouse event happened
     *
     * @member {PIXI.Point}
     */
    this.global = new core.Point();

    /**
     * The target DisplayObject that was interacted with
     *
     * @member {PIXI.DisplayObject}
     */
    this.target = null;

    /**
     * When passed to an event handler, this will be the original DOM Event that was captured
     *
     * @see https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent
     * @see https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent
     * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent
     * @member {MouseEvent|TouchEvent|PointerEvent}
     */
    this.originalEvent = null;

    /**
     * Unique identifier for this interaction
     *
     * @member {number}
     */
    this.identifier = null;
  }

  /**
   * This will return the local coordinates of the specified displayObject for this InteractionData
   *
   * @param {PIXI.DisplayObject} displayObject - The DisplayObject that you would like the local
   *  coords off
   * @param {PIXI.Point} [point] - A Point object in which to store the value, optional (otherwise
   *  will create a new point)
   * @param {PIXI.Point} [globalPos] - A Point object containing your custom global coords, optional
   *  (otherwise will use the current global coords)
   * @return {PIXI.Point} A point containing the coordinates of the InteractionData position relative
   *  to the DisplayObject
   */

  InteractionData.prototype.getLocalPosition = function getLocalPosition(displayObject, point, globalPos) {
    return displayObject.worldTransform.applyInverse(globalPos || this.global, point);
  };

  return InteractionData;
}();

exports.default = InteractionData;
//# sourceMappingURL=InteractionData.js.map


text:
@interface Intro : CCScene {

	//Declaring intro images
	CCSprite *introImage1;
	CCSprite *introImage2;
	CCSprite *introImage3;

	//Counter for images to change by time
	int timeCounter;
}

-(void) introLoop:(ccTime)dt;

@end


text:
<include target="./_header.html" />
<div class="content" id="content">
	{$content}
</div>
<include target="./_footer.html" />


text:
<?xml version="1.0" encoding="UTF-8"?>

<configuration scan="true">
    <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <charset>utf-8</charset>
            <Pattern>%date{HH:mm:ss.SSS} %-5p [%.15t] %c: %m%n</Pattern>
        </encoder>
    </appender>

    <logger name="com.infinitechaos.vpcviewer" level="DEBUG"/>

    <logger name="javax.activation" level="WARN"/>
    <logger name="javax.mail" level="WARN"/>
    <logger name="javax.xml.bind" level="WARN"/>
    <logger name="ch.qos.logback" level="WARN"/>
    <logger name="com.codahale.metrics" level="WARN"/>
    <logger name="com.ryantenney" level="WARN"/>
    <logger name="com.sun.xml.internal.bind" level="WARN"/>
    <logger name="com.zaxxer" level="WARN"/>
    <logger name="io.undertow" level="WARN"/>
    <logger name="org.apache" level="WARN"/>
    <logger name="org.apache.catalina.startup.DigesterFactory" level="OFF"/>
    <logger name="org.bson" level="WARN"/>
    <logger name="org.hibernate.validator" level="WARN"/>
    <logger name="org.hibernate" level="WARN"/>
    <logger name="org.hibernate.ejb.HibernatePersistence" level="OFF"/>
    <logger name="org.springframework" level="WARN"/>
    <logger name="org.springframework.web" level="WARN"/>
    <logger name="org.springframework.security" level="WARN"/>
    <logger name="org.springframework.cache" level="WARN"/>
    <logger name="org.thymeleaf" level="WARN"/>
    <logger name="org.xnio" level="WARN"/>
    <logger name="com.mangofactory.swagger" level="WARN"/>
    <logger name="com.wordnik.swagger" level="WARN"/>
    <logger name="sun.rmi.loader" level="WARN"/>
    <logger name="sun.rmi.transport" level="WARN"/>
    <logger name="com.amazonaws" level="INFO"/>

    <contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
        <resetJUL>true</resetJUL>
    </contextListener>

    <root level="INFO">
        <appender-ref ref="CONSOLE"/>
    </root>

</configuration>


text:
def export_to_jdbc(self, connection_url, table_name):
    """
    Write current frame to JDBC table

    Parameters
    ----------

    :param connection_url: (str) JDBC connection url to database server
    :param table_name: (str) JDBC table name

    Example
    -------

    <skip>

        >>> from sparktk import TkContext
        >>> c=TkContext(sc)
        >>> data = [[1, 0.2, -2, 5], [2, 0.4, -1, 6], [3, 0.6, 0, 7], [4, 0.8, 1, 8]]
        >>> schema = [('a', int), ('b', float),('c', int) ,('d', int)]
        >>> my_frame = tc.frame.create(data, schema)
        <progress>
    </skip>

    connection_url : (string) : "jdbc:{datasbase_type}://{host}/{database_name}

    Sample connection string for postgres
    ex: jdbc:postgresql://localhost/postgres [standard connection string to connect to default 'postgres' database]

    table_name: (string): table name. It will create new table with given name if it does not exists already.

    <skip>
        >>> my_frame.export_to_jdbc("jdbc:postgresql://localhost/postgres", "demo_test")
        <progress>
    </skip>

    Verify exported frame in postgres

        From bash shell

        $sudo -su ppostgres psql
        postgres=#\d

    You should see demo_test table.

    Run postgres=#select * from demo_test (to verify frame).
    """
    self._scala.exportToJdbc(connection_url, table_name)


text:
namespace aura {
namespace client {
class StackingClient;
}
}

class ActiveDesktopMonitor;

class ChromeBrowserMainExtraPartsAura : public ChromeBrowserMainExtraParts {
 public:
  ChromeBrowserMainExtraPartsAura();
  virtual ~ChromeBrowserMainExtraPartsAura();

  // Overridden from ChromeBrowserMainExtraParts:
  virtual void PreProfileInit() OVERRIDE;
  virtual void PostMainMessageLoopRun() OVERRIDE;

 private:
  scoped_ptr<aura::client::StackingClient> stacking_client_;
  scoped_ptr<ActiveDesktopMonitor> active_desktop_monitor_;

  DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsAura);
};

#endif  // CHROME_BROWSER_UI_AURA_CHROME_BROWSER_MAIN_EXTRA_PARTS_AURA_H_


text:
            The goal of the NetBeans OpenGL Pack Project is to provide an easy to use OpenGL development environment integrated into NetBeans.
            The NetBeans OpenGL Pack provides modules like an GLSL shader editor, hardware compiler/linker integration or tools for displaying hardware information.
            The pack includes ready to run JOGL (JSR 231) demo projects and all OpenGL samples of the OpenGL Programming Guide (also known as Red Book).

    Features:

JOGL (JSR 231) project templates

Ready to run JOGL demos and examples of the OpenGL Programming Guide (also known as Red Book)

Integration of JOGL GUI components to the NetBeans Form Designer

OpenGL Shading Language (GLSL 1.3) editor with compiler error annotation, code folding, syntax highlighting, auto completion and documentation.

Easy access to the GLSL compiler and linker of your graphics driver integrated in the editor

OpenGL Capabilities Viewer

OpenGL Quicksearch

Java Applet and Webstart support


text:
openssl req -new -key ecc-root-key.pem -out ecc-root-cert.csr -sha256 <<EOF
US
California
Sunnyvale
Istio
Test
Root CA
test@istio.io

EOF
openssl x509 -req -days 3650 -in ecc-root-cert.csr -sha256 -signkey ecc-root-key.pem -out ecc-root-cert.pem

# Intermediate CA
#openssl ecparam -genkey -name prime256v1 -out ecc-int-key.pem -noout
openssl req -new -key ecc-int-key.pem -out ecc-int-cert.csr -config int-cert.cfg -batch -sha256

openssl x509 -req -days 3650 -in ecc-int-cert.csr -sha256 -CA ecc-root-cert.pem -CAkey ecc-root-key.pem -CAcreateserial -out ecc-int-cert.pem -extensions v3_req -extfile int-cert.cfg

# Intermediate CA2
#openssl ecparam -genkey -name prime256v1 -out ecc-int2-key.pem -noout
openssl req -new -key ecc-int2-key.pem -out ecc-int2-cert.csr -config int2-cert.cfg -batch -sha256

openssl x509 -req -days 3650 -in ecc-int2-cert.csr -sha256 -CA ecc-int-cert.pem -CAkey ecc-int-key.pem -CAcreateserial -out ecc-int2-cert.pem -extensions v3_req -extfile int2-cert.cfg

cat ecc-root-cert.pem > ecc-int-cert-chain.pem
cat ecc-int-cert.pem >> ecc-int-cert-chain.pem
cp ecc-int-cert-chain.pem ecc-int2-cert-chain.pem
cat ecc-int2-cert.pem >> ecc-int2-cert-chain.pem

rm ./*csr
rm ./*srl


text:
class Assessor::ReviewAuditCertificatesController < Assessor::BaseController
  include ReviewAuditCertificatesMixin
end