text:
<?php

$model = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Customer\Model\Attribute');
$model->setName(
    'custom_attribute1'
)->setEntityTypeId(
    2
)->setAttributeSetId(
    2
)->setAttributeGroupId(
    1
)->setFrontendInput(
    'text'
)->setFrontendLabel(
    'custom_attribute_frontend_label'
)->setIsUserDefined(
    1
);
$model->save();

$model2 = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Customer\Model\Attribute');
$model2->setName(
    'custom_attribute2'
)->setEntityTypeId(
    2
)->setAttributeSetId(
    2
)->setAttributeGroupId(
    1
)->setFrontendInput(
    'text'
)->setFrontendLabel(
    'custom_attribute_frontend_label'
)->setIsUserDefined(
    1
);
$model2->save();

/** @var \Magento\Customer\Model\Resource\Setup $setupResource */
$setupResource = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
    'Magento\Customer\Model\Resource\Setup',
    ['resourceName' => 'customer_setup']
);

$data = [['form_code' => 'customer_address_edit', 'attribute_id' => $model->getAttributeId()]];
$setupResource->getConnection()->insertMultiple($setupResource->getTable('customer_form_attribute'), $data);

$data2 = [['form_code' => 'customer_address_edit', 'attribute_id' => $model2->getAttributeId()]];
$setupResource->getConnection()->insertMultiple($setupResource->getTable('customer_form_attribute'), $data2);


text:
using System;

namespace EzApp.Data.Core.Attributes
{
    public class EzParameterAttribute : Attribute
    {
    }
}

redpajama_set_name: RedPajamaGithub


text:
    NOTE
    This page introduces the prototypes but is not part of any service being proposed.


text:
package de.ebf.security.test.guard.testcases;

import de.ebf.security.annotations.Permission;
import de.ebf.security.annotations.ProtectedResource;

@ProtectedResource
public class ProtectedClass implements PublicInterface, ProtectedInterface {

    @Permission("overrideProtectMe")
    @Override
    public void protectedMethod() {
        // TODO Auto-generated method stub

    }

    @Permission("protectedPublic")
    @Override
    public void publicMethod() {
        // TODO Auto-generated method stub

    }

}


text:
require File.expand_path('../../test_helper', __FILE__)

describe "Piece" do

  before do
    @site = setup_site
    Content.delete
    class ::Fridge < ::Piece; end
  end

  after do
    Object.send(:remove_const, :Fridge) rescue nil
    teardown_site
  end

  it "not be pages" do
    refute Piece.new.page?
  end

  describe "as page content" do
    before do
      ::Page.box :things
      ::Piece.box :things
      @page = ::Page.create
      @f1 = ::Piece.new
      @page.things << @f1
      @f2 = ::Piece.new
      @f1.things << @f2
      @f3 = ::Fridge.new
      @f2.things << @f3

      @page.save
      @f1.save
      @f2.save
      @f3.save

      @page = ::Page[@page.id]
      @f1 = ::Piece[@f1.id]
      @f2 = ::Piece[@f2.id]
      @f3 = Content[@f3.id]
    end

    it "have a link to the page" do
      @f1.page.must_equal @page
      @f2.page.must_equal @page
      @f3.page.must_equal @page
    end

    it "have a link to their box" do
      @f1.container.must_equal @page.things
      @f2.container.must_equal @f1.things
      @f3.container.must_equal @f2.things
    end

    it "have a link to their owner" do
      @f1.owner.must_equal @page
      @f2.owner.must_equal @f1
      @f3.owner.must_equal @f2
      @f1.parent.must_equal @page
      @f2.parent.must_equal @f1
      @f3.parent.must_equal @f2
    end

    it "return themselves as content_instance" do
      @f2.content_instance.must_equal @f2
    end

    it "know their depth in the piece tree" do
      @f1.depth.must_equal 1
      @f2.depth.must_equal 2
      @f3.depth.must_equal 3
    end

    it "be available from their containing page" do
      @page.content.length.must_equal 3
      Set.new(@page.content).must_equal Set.new([@f1, @f2, @f3])
      Set.new(@page.content.map(&:class)).must_equal Set.new([::Piece, ::Piece, Fridge])
    end

    it "have a link to their pieces" do
      @f1.entry.must_equal @page.contents.first
      @f2.entry.must_equal @page.contents.first.contents.first
    end
  end
end


text:
**********************************************************************
Celery Setup
**********************************************************************
For running celery you will need the celery package. This is a python package for asynchronus message passing and queuing. If you dont already have it, you can get that by::

	$ pip install celery

You will also need RabbitMQ whihc is the celery broker we use. If you dont already have it you cna get it by::

	$ sudo apt-get install rabbitmq-server

To find out more information about celery you can visit the `Celery Documentation <http://docs.celeryproject.org/en/latest/getting-started/first-steps-with-celery.html>`_

Starting and Stopping Celery
======================================================================

Within cloudmesh the use of celery is very simple as we have
introduced a number of easy to use commands. Celery server can be started by the following command::

   $ fab queue.start

For our test implementation we start workers for the queues

* rack
* pbs (called q1)
* rain
* provisioner (called p1,p2)
* launcher (called l1,l2)

Celery workers can be stopped by the following command which stops celery and kills all celery workers::

	$ fab queue.stop

Celery can be cleaned by the following command kills all celery
workers. It also deletes the log files::

	$ fab queue.clean

Please note that the way we deployed celery it uses rabitmq which is
installed via sudo. Thus the commands will ask you for the sudo
password to controll the workers.

Log and Pid Files
======================================================================

Celery produces log files for the workers and pid files containing the
the pid information for the processes running. One log and pid file is
created for each worker. All information written to the standard
output in the celery tasks will be found in log files.  If the name of
the worker is abc, we will have celery@abc.log and celery@abc.pid.  If
there are more than one worker for any task, the task can be performed
by any of the worker associated to it. The log will be in .log file
which actually did the task.  Make sure you check .log files of all
asoociated workers in case of issues. The default location is:

$HOME/cloudmesh/celery

Current Celery Based Tasks (Under Development)
======================================================================

* launcher (called l1,l2)
* provisioner (called p1,p2)
* pbs (called q1)
* rain
* rack

Launcher (Simulation)
----------------------------------------------------------------------
The launcher can be run from the web browser with::

* http://127.0.0.1:5000/cm/launch

You can select the server, and recipie and press the

.. raw:: html

   press to launch

button. This will submit the jobs to celery.
The status of all of the jobs can be viewed at

* http://127.0.0.1:5000/cm/launch/db_stats

You can clean the stats at

* http://127.0.0.1:5000/cm/launch/db_stats/cm/db_reset**.

Provisioner
---------------------------------------------------------------------
Bare-metal provisioning is done through Celery Distributed Task Queue.

The main function is found at provision in
*cloudmesh/provisioner/provisioner.py*.

pbs (qstat)
---------------------------------------------------------------------
Status of all jobs and queues across multiple clusters is being
collected through Celery Distributed Task Queue.

In FutureGrid Project, the queues are following as of May 2014:

 - 'india.futuregrid.org'
  - 'batch'
  - 'long'
  - 'b534'
  - 'systest'
  - 'reserved'
  - 'interactive'
 - 'delta.futuregrid.org'
  - 'delta'
  - 'delta-long'
 - 'echo.futuregrid.org'
   - 'echo'
 - 'bravo.futuregrid.org'
  - 'bravo'
  - 'bravo-long'

The main function of calling 'qstat' command is

qinfo() at *cloudmesh/pbs/pbs.py*. This is done by qstat command line tool
via ssh.

rain (bare-metal provisioning with cobbler and rain)
---------------------------------------------------------------------

With cobbler API, deploying bare-metal system or powering on/off a
system is enabled.

The main tasks are at *cloudmesh/rain/cobbler/queue/tasks.py*

rack (system temperatures)
---------------------------------------------------------------------
With IPMI sensor, hardware status can be monitored such as system
temperatures, voltages, fan speeds, and power consumption.

The main function is *cloudmesh/temperature/cm_temperature.py*.


text:
using System;

using ManagedIrbis;

using Microsoft.VisualStudio.TestTools.UnitTesting;

using ManagedIrbis.Infrastructure;

// ReSharper disable AssignNullToNotNullAttribute
// ReSharper disable ObjectCreationAsStatement

namespace UnitTests.ManagedIrbis.Infrastructure
{
    [TestClass]
    public class FileSpecificationTest
    {
        [TestMethod]
        public void FileSpecification_Constructor_1()
        {
            FileSpecification specification = new FileSpecification();
            Assert.AreEqual(false, specification.BinaryFile);
            Assert.AreEqual(IrbisPath.System, specification.Path);
            Assert.AreEqual(null, specification.Database);
            Assert.AreEqual(null, specification.FileName);
            Assert.AreEqual(null, specification.Content);

            specification = new FileSpecification
                (
                    IrbisPath.MasterFile,
                    "brief.pft"
                );
            Assert.AreEqual(false, specification.BinaryFile);
            Assert.AreEqual(IrbisPath.MasterFile, specification.Path);
            Assert.AreEqual(null, specification.Database);
            Assert.AreEqual("brief.pft", specification.FileName);
            Assert.AreEqual(null, specification.Content);

            specification = new FileSpecification
                (
                    IrbisPath.MasterFile,
                    "IBIS",
                    "brief.pft"
                );
            Assert.AreEqual(false, specification.BinaryFile);
            Assert.AreEqual(IrbisPath.MasterFile, specification.Path);
            Assert.AreEqual("IBIS", specification.Database);
            Assert.AreEqual("brief.pft", specification.FileName);
            Assert.AreEqual(null, specification.Content);
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentNullException))]
        public void FileSpecification_Constructor_2()
        {
            new FileSpecification
                (
                    IrbisPath.MasterFile,
                    null
                );
        }

        [TestMethod]
        public void FileSpecification_ToString_1()
        {
            FileSpecification specification = new FileSpecification();
            Assert.AreEqual
                (
                    "0..",
                    specification.ToString()
                );

            specification.Path = IrbisPath.MasterFile;
            specification.FileName = "brief.pft";
            Assert.AreEqual
                (
                    "2..brief.pft",
                    specification.ToString()
                );

            specification.Database = "IBIS";
            Assert.AreEqual
                (
                    "2.IBIS.brief.pft",
                    specification.ToString()
                );

            specification.BinaryFile = true;
            Assert.AreEqual
                (
                    "2.IBIS.@brief.pft",
                    specification.ToString()
                );

            specification.BinaryFile = false;
            specification.Content = "Hello";
            Assert.AreEqual
                (
                    "2.IBIS.&brief.pft&Hello",
                    specification.ToString()
                );
        }

        [TestMethod]
        public void FileSpecification_Equals_1()
        {
            FileSpecification first = new FileSpecification
                (
                    IrbisPath.MasterFile,
                    "IBIS",
                    "brief.pft"
                );
            FileSpecification second = new FileSpecification
                (
                    IrbisPath.MasterFile,
                    "IBIS",
                    "BRIEF.pft"
                );
            Assert.IsTrue(first.Equals(second));
            Assert.IsTrue(first.Equals((object)second));

            second.Database = "RDR";
            Assert.IsFalse(first.Equals(second));
            Assert.IsFalse(first.Equals((object)second));

            Assert.IsFalse(first.Equals((object)null));
            Assert.IsTrue(first.Equals((object)first));

            first = new FileSpecification
                (
                    IrbisPath.MasterFile,
                    "brief.pft"
                );
            second = new FileSpecification
                (
                    IrbisPath.MasterFile,
                    "BRIEF.pft"
                );
            Assert.IsTrue(first.Equals(second));
            Assert.IsTrue(first.Equals((object)second));
        }

//        private void _TestSerialization
//            (
//                FileSpecification first
//            )
//        {
//            byte[] bytes = first.SaveToMemory();
//
//            FileSpecification second =
//                bytes.RestoreObjectFromMemory<FileSpecification>();
//
//            Assert.AreEqual(first.Database, second.Database);
//            Assert.AreEqual(first.BinaryFile, second.BinaryFile);
//            Assert.AreEqual(first.Content, second.Content);
//            Assert.AreEqual(first.FileName, second.FileName);
//            Assert.AreEqual(first.Path, second.Path);
//        }
//
//        [TestMethod]
//        public void FileSpecification_Serialization_1()
//        {
//            FileSpecification specification = new FileSpecification();
//            _TestSerialization(specification);
//
//            specification = new FileSpecification
//                (
//                    IrbisPath.MasterFile,
//                    "brief.pft"
//                );
//            _TestSerialization(specification);
//
//            specification = new FileSpecification
//                (
//                    IrbisPath.MasterFile,
//                    "IBIS",
//                    "brief.pft"
//                );
//            _TestSerialization(specification);
//        }

        [TestMethod]
        public void FileSpecification_Verify_1()
        {
            FileSpecification specification = new FileSpecification();
            Assert.IsFalse(specification.Verify(false));

            specification = new FileSpecification
                (
                    IrbisPath.MasterFile,
                    "brief.pft"
                );
            Assert.IsFalse(specification.Verify(false));

            specification = new FileSpecification
                (
                    IrbisPath.System,
                    "RC.MNU"
                );
            Assert.IsTrue(specification.Verify(false));

            specification = new FileSpecification
                (
                    IrbisPath.MasterFile,
                    "IBIS",
                    "brief.pft"
                );
            Assert.IsTrue(specification.Verify(false));
        }

        [TestMethod]
        public void FileSpecification_GetHashCode_1()
        {
            FileSpecification first = new FileSpecification
                (
                    IrbisPath.MasterFile,
                    "IBIS",
                    "brief.pft"
                );
            FileSpecification second = new FileSpecification
                (
                    IrbisPath.MasterFile,
                    "IBIS",
                    "BRIEF.pft"
                );

            Assert.AreNotEqual
                (
                    first.GetHashCode(),
                    second.GetHashCode()
                );
        }

        [TestMethod]
        public void FileSpecification_Parse_1()
        {
            FileSpecification specification = FileSpecification.Parse("2.IBIS.brief.pft");
            Assert.AreEqual(IrbisPath.MasterFile, specification.Path);
            Assert.AreEqual("IBIS", specification.Database);
            Assert.AreEqual("brief.pft", specification.FileName);
            Assert.IsNull(specification.Content);
            Assert.IsFalse(specification.BinaryFile);
        }

        [TestMethod]
        public void FileSpecification_Parse_2()
        {
            FileSpecification specification = FileSpecification.Parse("0..iri.mnu");
            Assert.AreEqual(IrbisPath.System, specification.Path);
            Assert.IsNull(specification.Database);
            Assert.AreEqual("iri.mnu", specification.FileName);
            Assert.IsNull(specification.Content);
            Assert.IsFalse(specification.BinaryFile);
        }

        [TestMethod]
        public void FileSpecification_Parse_3()
        {
            FileSpecification specification = FileSpecification.Parse("2.IBIS.@doclad99.doc");
            Assert.AreEqual(IrbisPath.MasterFile, specification.Path);
            Assert.AreEqual("IBIS", specification.Database);
            Assert.AreEqual("doclad99.doc", specification.FileName);
            Assert.IsNull(specification.Content);
            Assert.IsTrue(specification.BinaryFile);
        }

        [TestMethod]
        public void FileSpecification_Parse_4()
        {
            FileSpecification specification = FileSpecification.Parse("2.IBIS.brief.pft&Hello");
            Assert.AreEqual(IrbisPath.MasterFile, specification.Path);
            Assert.AreEqual("IBIS", specification.Database);
            Assert.AreEqual("brief.pft", specification.FileName);
            Assert.AreEqual("Hello", specification.Content);
            Assert.IsFalse(specification.BinaryFile);
        }

        [TestMethod]
        [ExpectedException(typeof(FormatException))]
        public void FileSpecification_Parse_5()
        {
            FileSpecification.Parse("Hello");
        }
    }
}


text:
package org.smartloli.kafka.eagle.common.util;

import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.smartloli.kafka.eagle.common.protocol.alarm.queue.BaseJobContext;
import org.smartloli.kafka.eagle.common.util.KConstants.AlarmQueue;

/**
 * TODO
 *
 * @author smartloli.
 *
 *         Created by Oct 25, 2019
 */
public class TestJob implements Job {
	@Override
	public void execute(JobExecutionContext arg0) throws JobExecutionException {
		BaseJobContext bjc = (BaseJobContext) arg0.getJobDetail().getJobDataMap().get(AlarmQueue.JOB_PARAMS);
		System.out.println("kafka eagle quartz job, date : [" + new Date().toString() + "],[" + bjc + "]");
	}
}


text:
package org.apache.syncope.wa.starter.pac4j.saml;

import org.apache.syncope.wa.bootstrap.WARestClient;
import org.apereo.cas.support.pac4j.authentication.clients.DelegatedClientFactoryCustomizer;
import org.pac4j.core.client.Client;
import org.pac4j.saml.client.SAML2Client;
import org.pac4j.saml.config.SAML2Configuration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class WASAML2ClientCustomizer implements DelegatedClientFactoryCustomizer<Client> {

    private static final Logger LOG = LoggerFactory.getLogger(WASAML2ClientCustomizer.class);

    protected final WARestClient restClient;

    public WASAML2ClientCustomizer(final WARestClient restClient) {
        this.restClient = restClient;
    }

    @Override
    public void customize(final Client client) {
        if (client instanceof SAML2Client) {
            LOG.debug("Customizing SAML2 client {}", client.getName());
            SAML2Client saml2Client = (SAML2Client) client;
            SAML2Configuration configuration = saml2Client.getConfiguration();
            configuration.setKeystoreGenerator(new WASAML2ClientKeystoreGenerator(restClient, saml2Client));
            configuration.setMetadataGenerator(new WASAML2ClientMetadataGenerator(restClient, saml2Client));
        }
    }
}


text:
layout: page
title: "Jennifer Marie Lamping"
comments: true
description: "blanks"
keywords: "Jennifer Marie Lamping,CU,Boulder"
---
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script>
<!-- <script src="../assets/js/highcharts.js"></script> -->
<style type="text/css">@font-face {
	font-family: "Bebas Neue";
	src: url(https://www.filehosting.org/file/details/544349/BebasNeue Regular.otf) format("opentype");
	}
	h1.Bebas {
		font-family: "Bebas Neue", Verdana, Tahoma;
	}
</style>
</head>

#### TEACHING INFORMATION

**College**: College of Arts and Sciences

**Classes taught**: ECON 3070, ECON 7010, ECON 7030

#### ECON 3070: INTRMED MICROECON THEORY

**Terms taught**: Fall 2006, Fall 2006, Fall 2007, Fall 2008, Fall 2008, Fall 2009

**Instructor rating**: 4.85

**Standard deviation in instructor rating**: 0.4

**Average grade** (4.0 scale): 2.47

**Standard deviation in grades** (4.0 scale): 0.1

**Average workload** (raw): 2.84

**Standard deviation in workload** (raw): 0.31

#### ECON 7010: Microeconomic Theory 1

**Terms taught**: Fall 2006, Fall 2007, Fall 2008, Fall 2009, Fall 2010

**Instructor rating**: 4.95

**Standard deviation in instructor rating**: 0.3

**Average grade** (4.0 scale): 2.6

**Standard deviation in grades** (4.0 scale): 0.15

**Average workload** (raw): 4.48

**Standard deviation in workload** (raw): 0.33

#### ECON 7030: MICROECONOMIC THEORY 2

**Terms taught**: Spring 2010

**Instructor rating**: 4.05

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 2.89

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 3.88

**Standard deviation in workload** (raw): 0.0


text:
using ICSharpCode.SharpZipLib.Zip;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using System.Linq;
using System.IO;

/// <summary>
/// 补丁生成工具
/// </summary>
public class PatchUtil : Singleton<PatchUtil>
{
	string sourcePath = Application.streamingAssetsPath;//源文件路径
	string targetPath = Application.dataPath + "/../patch/";//补丁存放路径
	List<PatchInfo> patchList = new List<PatchInfo>();

	public void init()
	{
		patchList.Clear();
		updatePatchList();
	}

	void updatePatchList()
	{
		string[] foldList = Directory.GetDirectories(targetPath);
		for (int i = 0; i < foldList.Length; i++)
		{
			string folderName = foldList[i];
			string vername = Path.GetFileName(folderName).Replace("_", ".");
			PatchInfo info = new PatchInfo(vername);
			info.loadContent(folderName);
			if (info.isVaild)
			{
				patchList.Add(info);
			}
		}
	}

	public void buildPatch()
	{
		//1. 创建当前版本目录
		string folderName = VersionEditorManager.Instance().curVersion.Replace(".", "_");
		folderName = targetPath + folderName;
		if (Directory.Exists(folderName)) return;

		PatchInfo patchInfo = new PatchInfo(VersionEditorManager.Instance().curVersion);
		Directory.CreateDirectory(folderName);

		//2. 统计当前版本所有文件信息,保存至文本文件
		List<string> fileSystemEntries = new List<string>();

		fileSystemEntries.AddRange(Directory.GetFiles(sourcePath, "*", SearchOption.AllDirectories));

		FileStream fs = new FileStream(folderName + "/files.txt", FileMode.CreateNew);
		StreamWriter sw = new StreamWriter(fs);

		for (int i = 0; i < fileSystemEntries.Count; i++)
		{
			string file = fileSystemEntries[i];
			file = file.Replace("\\", "/");

			if (file.EndsWith(".meta") || file.Contains(".DS_Store") || (file.Contains(".manifest")&&!(file.Contains(BuildUtil.getPlatformManifest()) ))) continue;

			FileStream fileStream = new FileStream(file, FileMode.Open);

			int size = (int)fileStream.Length;

			string md5 = FileUtil.FSToMD5(fileStream);
			string value = file.Replace(sourcePath, string.Empty).Substring(1);
			string content = value + "|" + md5 + "|" + size;
			patchInfo.addFileInfo(content);
			sw.WriteLine(content);
			fileStream.Close();
			Packager.UpdateProgress(i, fileSystemEntries.Count, "Generating file list..");
		}
		sw.Close(); fs.Close();

		//3.与历史版本对比压缩所有差异文件
		foreach (PatchInfo pInfo in patchList)
		{
			ArrayList diffFiles = pInfo.getDiffFiles(patchInfo);
			if (diffFiles.Count == 0) continue;

			FileStream commonStream = new FileStream(pInfo.getPatchPath() + "/VersionContent.zip", FileMode.Create);
			ZipOutputStream commonZipper = new ZipOutputStream(commonStream);
			commonZipper.SetLevel(5);

			FileStream iosStream = new FileStream(pInfo.getPatchPath() + "/iOS.zip", FileMode.Create);
			ZipOutputStream iosZipper = new ZipOutputStream(iosStream);
			iosZipper.SetLevel(5);

			ZipOutputStream androidZipper = new ZipOutputStream(new FileStream(pInfo.getPatchPath() + "/Android.zip", FileMode.Create));
			androidZipper.SetLevel(5);
			ZipOutputStream winZipper = new ZipOutputStream(new FileStream(pInfo.getPatchPath() + "/Windows.zip", FileMode.Create));
			winZipper.SetLevel(5);

			string versionNum = pInfo.ver.proCurVersion;
			for (int i = 0; i < diffFiles.Count; i++)
			{
				string fileName = diffFiles[i] as string;
				ZipOutputStream compressor = commonZipper;
				if (fileName.Contains("AssetBundles/iOS/")|| fileName.Contains("Audio/GeneratedSoundBanks/iOS/"))
				{
					compressor = iosZipper;
				}
				else if(fileName.Contains("AssetBundles/Windows/") || fileName.Contains("Audio/GeneratedSoundBanks/Windows/"))
				{
					compressor = winZipper;
				}
				else if(fileName.Contains("AssetBundles/Android/") || fileName.Contains("Audio/GeneratedSoundBanks/Android/"))
				{
					compressor = androidZipper;
				}
				compressor.PutNextEntry(new ZipEntry(fileName));
				string fullPath = sourcePath + "/" + fileName;
				Packager.UpdateProgress(i, diffFiles.Count, " Compress version: " + versionNum + " on file: " + fileName);
				byte[] data = new byte[2048];
				using (FileStream input = File.OpenRead(fullPath))
				{
					int bytesRead;
					while ((bytesRead = input.Read(data, 0, data.Length)) > 0)
					{
						compressor.Write(data, 0, bytesRead);
					}
				}
			}
			commonZipper.Finish();
			iosZipper.Finish();
			androidZipper.Finish();
			winZipper.Finish();
		}

		//4. 记录当前版本号
		VersionEditorManager.Instance().saveVersion(targetPath + "version.txt");

		fs = new FileStream(folderName + "/mark.txt", FileMode.CreateNew);
		fs.Close ();
		EditorUtility.ClearProgressBar();
	}
}

/// <summary>
/// 补丁包信息
/// </summary>
public class PatchInfo
{
	public Dictionary<string, UpdateFileInfo> fileList = new Dictionary<string, UpdateFileInfo>();
	public Version ver = null;
	public bool isVaild = false;
	public string storePath = "";

	public PatchInfo(string name)
	{
		ver = new Version(name);
	}

	//从文本文件读取信息
	public void loadContent(string path)
	{
		fileList.Clear();
		string ret = null;
		path += "/files.txt";
		try
		{
			ret = File.ReadAllText(path);
			string[] fileContent = ret.Split(new string[] { "\n" }, System.StringSplitOptions.RemoveEmptyEntries);
			for (int i = 0; i < fileContent.Length; i++)
			{
				UpdateFileInfo fileInfo = new UpdateFileInfo(fileContent[i]);
				fileList[fileInfo.filePath] = fileInfo;
			}
			isVaild = true;
		}
		catch
		{
			Debug.Log(" 没有找到文件 files.txt");
		}
		storePath = Path.GetDirectoryName(path);
	}

	//添加文件信息
	public void addFileInfo(string content)
	{
		UpdateFileInfo info = new UpdateFileInfo(content);
		fileList[info.filePath] = info;
	}

	//获取差异文件
	public ArrayList getDiffFiles(PatchInfo other)
	{
		ArrayList list = new ArrayList();
		foreach (KeyValuePair<string, UpdateFileInfo> info in other.fileList)
		{
			string key = info.Key;
			UpdateFileInfo newInfo = info.Value;
			UpdateFileInfo curInfo = null;
			fileList.TryGetValue(key, out curInfo);
			if (curInfo != null && curInfo.equal(newInfo))
				continue;
			list.Add(key);
		}
		return list;
	}

	//获取补丁路径
	public string getPatchPath()
	{
		return storePath;
	}
}


text:
cask "zulu" do
  version "15.0.0,15.27.17-ca"
  sha256 "555dc9791fd3d9ea276ea273c5b2bc31224a02992eeb60f7d772780df21eef7d"

  url "https://cdn.azul.com/zulu/bin/zulu#{version.after_comma}-jdk#{version.before_comma}-macosx_x64.dmg",
      referer: "https://www.azul.com/downloads/zulu/zulu-mac/"
  name "Azul Zulu Java Standard Edition Development Kit"
  homepage "https://www.azul.com/downloads/zulu/zulu-mac/"

  depends_on macos: ">= :sierra"

  pkg "Double-Click to Install Zulu #{version.major}.pkg"

  uninstall pkgutil: "com.azulsystems.zulu.#{version.major}"
end


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

import static com.amazonaws.util.StringUtils.UTF8;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.OutputStreamWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.util.Map;
import java.util.List;

import com.amazonaws.AmazonClientException;
import com.amazonaws.services.opsworks.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.BinaryUtils;
import com.amazonaws.util.StringUtils;
import com.amazonaws.util.IdempotentUtils;
import com.amazonaws.util.StringInputStream;
import com.amazonaws.util.json.*;

/**
 * AgentVersionMarshaller
 */
public class AgentVersionJsonMarshaller {

    /**
     * Marshall the given parameter object, and output to a SdkJsonGenerator
     */
    public void marshall(AgentVersion agentVersion,
            SdkJsonGenerator jsonGenerator) {
        if (agentVersion == null) {
            throw new AmazonClientException(
                    "Invalid argument passed to marshall(...)");
        }

        try {
            jsonGenerator.writeStartObject();

            if (agentVersion.getVersion() != null) {
                jsonGenerator.writeFieldName("Version").writeValue(
                        agentVersion.getVersion());
            }
            if (agentVersion.getConfigurationManager() != null) {
                jsonGenerator.writeFieldName("ConfigurationManager");
                StackConfigurationManagerJsonMarshaller.getInstance().marshall(
                        agentVersion.getConfigurationManager(), jsonGenerator);
            }

            jsonGenerator.writeEndObject();
        } catch (Throwable t) {
            throw new AmazonClientException(
                    "Unable to marshall request to JSON: " + t.getMessage(), t);
        }
    }

    private static AgentVersionJsonMarshaller instance;

    public static AgentVersionJsonMarshaller getInstance() {
        if (instance == null)
            instance = new AgentVersionJsonMarshaller();
        return instance;
    }

}


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

#ifndef MODULE_H_
#define MODULE_H_

#include "Event.h"
#include <map>

extern double simulationTime;

extern std::map<int, int> linkExpEventT_capacity;				// a mapping for expected event types of link and total capacity of link

// Abstract class
class Module {
public:
	Module(int expectedEventType, enum ModuleType moduleID):moduleID_(moduleID), expectedEventType_(expectedEventType) {};
	virtual ~Module();

	virtual int getExpectedEventType() const = 0;
	virtual void work (Event*) = 0;
	enum ModuleType getModuleId() const;

protected:
	enum ModuleType moduleID_;
	int expectedEventType_;  // the event that will be fetched from eventsList
};

#endif /* MODULE_H_ */


text:
#include "El.hpp"

namespace El {
namespace ldl {

template<typename T>
DistMultiVecNode<T>::DistMultiVecNode( DistMultiVecNode<T>* parentNode )
: parent(parentNode), child(nullptr), duplicate(nullptr)
{ }

template<typename T>
DistMultiVecNode<T>::DistMultiVecNode
( const DistMap& invMap, const DistNodeInfo& info,
  const DistMultiVec<T>& X )
: parent(nullptr), child(nullptr), duplicate(nullptr)
{
    DEBUG_ONLY(CSE cse("DistMultiVecNode::DistMultiVecNode"))
    Pull( invMap, info, X );
}

template<typename T>
DistMultiVecNode<T>::DistMultiVecNode( const DistMatrixNode<T>& X )
: parent(nullptr), child(nullptr), duplicate(nullptr)
{
    DEBUG_ONLY(CSE cse("DistMultiVecNode::DistMultiVecNode"))
    *this = X;
}

template<typename T>
const DistMultiVecNode<T>&
DistMultiVecNode<T>::operator=( const DistMatrixNode<T>& X )
{
    DEBUG_ONLY(CSE cse("DistMultiVecNode::operator="))

    if( X.child == nullptr )
    {
        delete duplicate;
        duplicate = new MatrixNode<T>(this);
        *duplicate = *X.duplicate;

        matrix.Attach( X.matrix.Grid(), duplicate->matrix );

        return *this;
    }

    matrix.SetGrid( X.matrix.Grid() );
    matrix = X.matrix;

    delete child;
    child = new DistMultiVecNode<T>(this);
    *child = *X.child;

    return *this;
}

template<typename T>
void DistMultiVecNode<T>::Pull
( const DistMap& invMap, const DistNodeInfo& info,
  const DistMultiVec<T>& X )
{
    DEBUG_ONLY(CSE cse("DistMultiVecNode::Pull"))
    const Int width = X.Width();

    // Count the number of indices assigned to this process
    // (and build the subtree)
    int numRecvInds = 0;
    function<void(const NodeInfo&,MatrixNode<T>&)> localCount =
      [&]( const NodeInfo& node, MatrixNode<T>& XNode )
      {
        const Int numChildren = node.children.size();
        XNode.children.resize(numChildren);
        for( Int c=0; c<numChildren; ++c )
        {
            XNode.children[c] = new MatrixNode<T>(&XNode);
            localCount( *node.children[c], *XNode.children[c] );
        }

        XNode.matrix.Resize( node.size, width );
        numRecvInds += node.size;
      };
    function<void(const DistNodeInfo&,DistMultiVecNode<T>&)> count =
      [&]( const DistNodeInfo& node, DistMultiVecNode<T>& XNode )
      {
        if( node.child == nullptr )
        {
            delete XNode.duplicate;
            XNode.duplicate = new MatrixNode<T>(&XNode);
            localCount( *node.duplicate, *XNode.duplicate );

            XNode.matrix.Attach( *node.grid, XNode.duplicate->matrix );

            return;
        }
        XNode.child = new DistMultiVecNode<T>(&XNode);
        count( *node.child, *XNode.child );

        XNode.commMeta.Empty();
        XNode.matrix.SetGrid( *node.grid );
        XNode.matrix.Resize( node.size, width );
        numRecvInds += XNode.matrix.LocalHeight();
      };
    count( info, *this );

    // Pack the indices for mapping to the original ordering
    Int off = 0;
    vector<Int> mappedInds( numRecvInds );
    function<void(const NodeInfo&,MatrixNode<T>&)> localPack =
      [&]( const NodeInfo& node, MatrixNode<T>& XNode )
      {
        const Int numChildren = node.children.size();
        for( Int c=0; c<numChildren; ++c )
            localPack( *node.children[c], *XNode.children[c] );

        for( Int t=0; t<node.size; ++t )
            mappedInds[off++] = node.off+t;
      };
    function<void(const DistNodeInfo&,DistMultiVecNode<T>&)> pack =
      [&]( const DistNodeInfo& node, DistMultiVecNode<T>& XNode )
      {
        if( node.child == nullptr )
        {
            localPack( *node.duplicate, *XNode.duplicate );
            return;
        }
        pack( *node.child, *XNode.child );

        for( Int tLoc=0; tLoc<XNode.matrix.LocalHeight(); ++tLoc )
        {
            const Int t = XNode.matrix.GlobalRow(tLoc);
            mappedInds[off++] = node.off+t;
        }
      };
    pack( info, *this );

    // Convert the indices to the original ordering
    invMap.Translate( mappedInds );

    // Figure out how many entries each process owns that we need
    mpi::Comm comm = X.Comm();
    const int commSize = mpi::Size( comm );
    vector<int> recvSizes( commSize, 0 );
    for( int s=0; s<numRecvInds; ++s )
        ++recvSizes[ X.RowOwner( mappedInds[s] ) ];
    vector<int> recvOffs;
    Scan( recvSizes, recvOffs );
    vector<Int> recvInds( numRecvInds );
    auto offs = recvOffs;
    for( int s=0; s<numRecvInds; ++s )
    {
        const Int i = mappedInds[s];
        recvInds[ offs[X.RowOwner(i)]++ ] = i;
    }

    // Coordinate for the coming AllToAll to exchange the indices of X
    vector<int> sendSizes(commSize);
    mpi::AllToAll( recvSizes.data(), 1, sendSizes.data(), 1, comm );
    vector<int> sendOffs;
    const int numSendInds = Scan( sendSizes, sendOffs );

    // Request the indices
    vector<Int> sendInds( numSendInds );
    mpi::AllToAll
    ( recvInds.data(), recvSizes.data(), recvOffs.data(),
      sendInds.data(), sendSizes.data(), sendOffs.data(), comm );

    // Fulfill the requests
    vector<T> sendVals( numSendInds*width );
    const Int firstLocalRow = X.FirstLocalRow();
    for( Int s=0; s<numSendInds; ++s )
        for( Int j=0; j<width; ++j )
            sendVals[s*width+j] = X.GetLocal( sendInds[s]-firstLocalRow, j );

    // Reply with the values
    vector<T> recvVals( numRecvInds*width );
    for( int q=0; q<commSize; ++q )
    {
        sendSizes[q] *= width;
        sendOffs[q] *= width;
        recvSizes[q] *= width;
        recvOffs[q] *= width;
    }
    mpi::AllToAll
    ( sendVals.data(), sendSizes.data(), sendOffs.data(),
      recvVals.data(), recvSizes.data(), recvOffs.data(), comm );
    SwapClear( sendVals );
    SwapClear( sendSizes );
    SwapClear( sendOffs );

    // Unpack the values
    off = 0;
    offs = recvOffs;
    function<void(const NodeInfo&,MatrixNode<T>&)> localUnpack =
      [&]( const NodeInfo& node, MatrixNode<T>& XNode )
      {
        const Int numChildren = node.children.size();
        for( Int c=0; c<numChildren; ++c )
            localUnpack( *node.children[c], *XNode.children[c] );

        for( Int t=0; t<node.size; ++t )
        {
            const Int i = mappedInds[off++];
            const int q = X.RowOwner(i);
            for( Int j=0; j<width; ++j )
                XNode.matrix.Set( t, j, recvVals[offs[q]++] );
        }
      };
    function<void(const DistNodeInfo&,DistMultiVecNode<T>&)> unpack =
      [&]( const DistNodeInfo& node, DistMultiVecNode<T>& XNode )
      {
        if( node.child == nullptr )
        {
            localUnpack( *node.duplicate, *XNode.duplicate );
            return;
        }
        unpack( *node.child, *XNode.child );

        const Int localHeight = XNode.matrix.LocalHeight();
        for( Int tLoc=0; tLoc<localHeight; ++tLoc )
        {
            const Int i = mappedInds[off++];
            const int q = X.RowOwner(i);
            for( Int j=0; j<width; ++j )
                XNode.matrix.SetLocal( tLoc, j, recvVals[offs[q]++] );
        }
      };
    unpack( info, *this );
    DEBUG_ONLY(
      if( off != numRecvInds )
          LogicError("Unpacked wrong number of indices");
    )
}

template<typename T>
Int DistMultiVecNode<T>::LocalHeight() const
{
    DEBUG_ONLY(CSE cse("DistMultiVecNode::LocalHeight"))
    Int localHeight = 0;
    function<void(const DistMultiVecNode<T>&)> count =
      [&]( const DistMultiVecNode<T>& node )
      {
        if( node.child == nullptr )
        {
            localHeight += node.duplicate->Height();
            return;
        }
        count( *node.child );
        localHeight += node.matrix.LocalHeight();
      };
    count( *this );
    return localHeight;
}

template<typename T>
void DistMultiVecNode<T>::Push
( const DistMap& invMap, const DistNodeInfo& info,
        DistMultiVec<T>& X ) const
{
    DEBUG_ONLY(CSE cse("DistMultiVecNode::Push"))

    mpi::Comm comm = info.comm;
    const Int height = info.size + info.off;
    const Int width = matrix.Width();
    X.SetComm( comm );
    X.Resize( height, width );

    // Fill the set of indices that we need to map to the original ordering
    const int numSendInds = LocalHeight();
    vector<Int> mappedInds( numSendInds );
    {
        Int off=0;

        function<void(const NodeInfo&,MatrixNode<T>&)> localPack =
          [&]( const NodeInfo& node, MatrixNode<T>& XNode )
          {
            const Int numChildren = node.children.size();
            for( Int c=0; c<numChildren; ++c )
                localPack( *node.children[c], *XNode.children[c] );

            for( Int t=0; t<node.size; ++t )
                mappedInds[off++] = node.off+t;
          };
        function<void(const DistNodeInfo&,const DistMultiVecNode<T>&)>
          pack =
          [&]( const DistNodeInfo& node, const DistMultiVecNode<T>& XNode )
          {
            if( node.child == nullptr )
            {
                localPack( *node.duplicate, *XNode.duplicate );
                return;
            }
            pack( *node.child, *XNode.child );

            const Int nodeHeight = XNode.matrix.Height();
            const Int colShift = XNode.matrix.ColShift();
            const Int colStride = XNode.matrix.ColStride();
            for( Int t=colShift; t<nodeHeight; t+=colStride )
                mappedInds[off++] = node.off+t;
          };

        pack( info, *this );
    }

    // Convert the indices to the original ordering
    invMap.Translate( mappedInds );

    // Figure out how many indices each process owns that we need to send
    const int commSize = mpi::Size( comm );
    vector<int> sendSizes(commSize,0);
    for( Int s=0; s<numSendInds; ++s )
        ++sendSizes[ X.RowOwner(mappedInds[s]) ];
    vector<int> sendOffs;
    Scan( sendSizes, sendOffs );

    // Pack the send indices and values
    vector<T> sendVals( numSendInds*width );
    vector<Int> sendInds( numSendInds );
    {
        Int off=0;
        auto offs = sendOffs;

        function<void(const NodeInfo&,const MatrixNode<T>&)> localPack =
          [&]( const NodeInfo& node, const MatrixNode<T>& XNode )
          {
            const Int numChildren = node.children.size();
            for( Int c=0; c<numChildren; ++c )
                localPack( *node.children[c], *XNode.children[c] );

            for( Int t=0; t<node.size; ++t )
            {
                const Int i = mappedInds[off++];
                const int q = X.RowOwner(i);
                for( Int j=0; j<width; ++j )
                    sendVals[offs[q]*width+j] = XNode.matrix.Get(t,j);
                sendInds[offs[q]++] = i;
            }
          };
        function<void(const DistNodeInfo&,const DistMultiVecNode<T>&)>
          pack =
          [&]( const DistNodeInfo& node, const DistMultiVecNode<T>& XNode )
          {
            if( node.child == nullptr )
            {
                localPack( *node.duplicate, *XNode.duplicate );
                return;
            }
            pack( *node.child, *XNode.child );

            const Int localHeight = XNode.matrix.LocalHeight();
            for( Int tLoc=0; tLoc<localHeight; ++tLoc )
            {
                const Int i = mappedInds[off++];
                const int q = X.RowOwner(i);
                for( Int j=0; j<width; ++j )
                    sendVals[offs[q]*width+j] = XNode.matrix.GetLocal(tLoc,j);
                sendInds[offs[q]++] = i;
            }
          };
        pack( info, *this );
    }

    // Coordinate for the coming AllToAll to exchange the indices of x
    vector<int> recvSizes(commSize);
    mpi::AllToAll( sendSizes.data(), 1, recvSizes.data(), 1, comm );
    vector<int> recvOffs;
    const int numRecvInds = Scan( recvSizes, recvOffs );
    DEBUG_ONLY(
      if( numRecvInds != X.LocalHeight() )
          LogicError("numRecvInds was not equal to local height");
    )

    // Send the indices
    vector<Int> recvInds( numRecvInds );
    mpi::AllToAll
    ( sendInds.data(), sendSizes.data(), sendOffs.data(),
      recvInds.data(), recvSizes.data(), recvOffs.data(), comm );

    // Send the values
    vector<T> recvVals( numRecvInds*width );
    for( int q=0; q<commSize; ++q )
    {
        sendSizes[q] *= width;
        sendOffs[q] *= width;
        recvSizes[q] *= width;
        recvOffs[q] *= width;
    }
    mpi::AllToAll
    ( sendVals.data(), sendSizes.data(), sendOffs.data(),
      recvVals.data(), recvSizes.data(), recvOffs.data(), comm );
    SwapClear( sendVals );
    SwapClear( sendSizes );
    SwapClear( sendOffs );

    // Unpack the values
    const Int firstLocalRow = X.FirstLocalRow();
    for( Int s=0; s<numRecvInds; ++s )
    {
        const Int i = recvInds[s];
        const Int iLoc = i - firstLocalRow;
        for( Int j=0; j<width; ++j )
            X.SetLocal( iLoc, j, recvVals[s*width+j] );
    }
}

template<typename T>
void DistMultiVecNode<T>::ComputeCommMeta( const DistNodeInfo& info ) const
{
    DEBUG_ONLY(CSE cse("DistMultiVecNode::ComputeCommMeta"))
    if( commMeta.numChildSendInds.size() != 0 )
        return;

    commMeta.Empty();
    if( child == nullptr )
    {
        commMeta.localOff = info.duplicate->myOff;
        commMeta.localSize = info.duplicate->size;
        return;
    }

    // This is currently assumed (and will eventually be lifted)
    const Int numChildren = 2;
    vector<int> teamSizes(numChildren), teamOffs(numChildren);

    const int teamSize = mpi::Size( info.comm );
    const int teamRank = mpi::Rank( info.comm );
    const auto& childNode = *info.child;
    const int childTeamSize = mpi::Size( childNode.comm );
    const int childTeamRank = mpi::Rank( childNode.comm );
    const bool inFirstTeam = ( childTeamRank == teamRank );
    const bool leftIsFirst = ( childNode.onLeft==inFirstTeam );
    teamSizes[0] =
        ( childNode.onLeft ? childTeamSize : teamSize-childTeamSize );
    teamSizes[1] = teamSize - teamSizes[0];
    teamOffs[0] = ( leftIsFirst ? 0 : teamSizes[1] );
    teamOffs[1] = ( leftIsFirst ? teamSizes[0] : 0 );

    const auto& myRelInds =
        ( childNode.onLeft ? info.childRelInds[0] : info.childRelInds[1] );

    // Fill numChildSendInds
    commMeta.numChildSendInds.resize( teamSize );
    El::MemZero( commMeta.numChildSendInds.data(), teamSize );
    const Int updateSize = childNode.lowerStruct.size();
    // TODO: Use 'matrix' or 'work' instead?
    {
        const Int align = childNode.size % childTeamSize;
        const Int shift = Shift( childTeamRank, align, childTeamSize );
        const Int localHeight = Length( updateSize, shift, childTeamSize );
        for( Int iChildLoc=0; iChildLoc<localHeight; ++iChildLoc )
        {
            const Int iChild = shift + iChildLoc*childTeamSize;
            const int destRank = myRelInds[iChild] % teamSize;
            ++commMeta.numChildSendInds[destRank];
        }
    }

    // Compute the solve recv indices
    commMeta.childRecvInds.resize( teamSize );
    for( Int c=0; c<numChildren; ++c )
    {
        const Int numInds = info.childRelInds[c].size();
        vector<Int> inds;
        for( Int i=0; i<numInds; ++i )
            if( work.IsLocalRow( info.childRelInds[c][i] ) )
                inds.push_back( i );

        const Int numSolveInds = inds.size();
        for( Int iPre=0; iPre<numSolveInds; ++iPre )
        {
            const Int iChild = inds[iPre];
            const Int i = info.childRelInds[c][iChild];
            const Int iLoc = (i-teamRank) / teamSize;
            const int childRank = (info.childSizes[c]+iChild) % teamSizes[c];
            const int frontRank = teamOffs[c] + childRank;
            commMeta.childRecvInds[frontRank].push_back(iLoc);
        }
    }
    commMeta.localOff = child->commMeta.localOff + child->commMeta.localSize;
    commMeta.localSize = matrix.LocalHeight();
}

#define PROTO(T) template struct DistMultiVecNode<T>;
#include "El/macros/Instantiate.h"

} // namespace ldl
} // namespace El


text:
package com.norbitltd.spoiwo.model.enums

object FontFamily {

  lazy val NotApplicable = FontFamily("NotApplicable")
  lazy val Roman = FontFamily("Roman")
  lazy val Swiss = FontFamily("Swiss")
  lazy val Modern = FontFamily("Modern")
  lazy val Script = FontFamily("Script")
  lazy val Decorative = FontFamily("Decorative")

}

case class FontFamily private(value : String) {

  override def toString = value

}


text:
int main(int argv, char* argc[]) {
	if(argv < 3) return 1;

	auto numberOfPeople = atoi(argc[1]);
	auto numberOfSimulation = atoi(argc[2]);
	std::cout << numberOfPeople << ' ' << numberOfSimulation << '\n';
	std::cout.flush();
}


text:
"""
Run like
    $ python -m tests.ftp_server
"""
import os

from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer

from .fixture_tools import PYFTPSYNC_TEST_FOLDER

directory = os.path.join(PYFTPSYNC_TEST_FOLDER, "remote")

authorizer = DummyAuthorizer()
authorizer.add_user("tester", "secret", directory, perm="elradfmwMT")
authorizer.add_anonymous(directory, perm="elradfmwMT")

handler = FTPHandler
handler.authorizer = authorizer

server = FTPServer(("127.0.0.1", 8021), handler)
server.serve_forever()


text:
A puppet-module for use with boxen to install [Otto](https://www.ottoproject.io) by Hashicorp

## Usage

```puppet
include otto
```

## Required Puppet Modules

* `boxen`


text:
"""This module provides functions to register AWSAccessKeyIds and AWSSecretKeys.
"""

import argparse
from xml.dom.minidom import parseString as xmlparse

import requests

def _generate_args(description):
    """
    Generates the base application with required parameters.

    @param description: Description of the command.
    @return: The args associated with the command.
    """
    parser = argparse.ArgumentParser(
        description=description
    )

    parser.add_argument(
        'ec2stack_server_address',
        help='The address of the ec2stack server http://localhost:5000'
    )

    parser.add_argument(
        'AWSAccessKeyId',
        help='Your Cloudstack API Key'
    )

    parser.add_argument(
        'AWSSecretKey',
        help='Your Cloudstack Secret Key'
    )

    args = parser.parse_args()

    return vars(args)

def register():
    """
    Entry point for registering an api key and secret key.

    """
    args = _generate_args(
        'Command line utility for registering a secret key with ec2stack'
    )
    args['Action'] = 'RegisterSecretKey'
    _execute_request(args)

def remove():
    """
    Entry point for removing an api key and secret key.

    """
    args = _generate_args(
        'Command line utility for removing a secret key from ec2stack'
    )
    args['Action'] = 'RemoveSecretKey'
    _execute_request(args)

def _execute_request(args):
    """
    Executes the register/remove request.

    @param args: Request payload.
    """
    host = args.pop('ec2stack_server_address')
    response = requests.post(host, args)
    response = xmlparse(response.text)
    message = response.getElementsByTagName('Message')[0].firstChild.nodeValue
    print message


text:
TEMP_EXTRACT_FOLDER=/tmp/ask_crowdin/
TEMP_OUTPUT_FOLDER=/tmp/ask_crowdin_file/
TEMP_OUTPUT_FILE=all.zip

if [ -z "${CROWDIN_API}" ]; then
    echo "Could not find crowdin API environment variable at CROWDIN_API."
    exit 1
fi

rm -rf ${TEMP_EXTRACT_FOLDER} || true
rm -rf ${TEMP_OUTPUT_FOLDER} || true

if [ "$1" == "build" ]; then
    echo "Building translations..."
    wget -O export.txt https://api.crowdin.com/api/project/anysoftkeyboard/export?key=${CROWDIN_API}
    cat export.txt
    rm export.txt
else
    echo "Not exporting latest translations. Use 'build' argument to force build first."
fi

mkdir ${TEMP_EXTRACT_FOLDER}
mkdir ${TEMP_OUTPUT_FOLDER}
wget -O "${TEMP_OUTPUT_FOLDER}${TEMP_OUTPUT_FILE}" https://api.crowdin.com/api/project/anysoftkeyboard/download/all.zip?key=${CROWDIN_API}
unzip -o "${TEMP_OUTPUT_FOLDER}${TEMP_OUTPUT_FILE}" -d ${TEMP_EXTRACT_FOLDER}

pushd ${TEMP_EXTRACT_FOLDER}
find * -maxdepth 0 ! -path . -exec mv {} values-{} \;

popd
cp -R ${TEMP_EXTRACT_FOLDER} app/src/main/res

#fixing files a bit
rm -rf app/src/main/res/values-en-PT
rm -rf app/src/main/res/values-en
mv app/src/main/res/values-es-ES/strings.xml app/src/main/res/values-es/
rm -rf app/src/main/res/values-es-AR
rm -rf app/src/main/res/values-es-ES
mv app/src/main/res/values-he/strings.xml app/src/main/res/values-iw/
rm -rf app/src/main/res/values-he
mv app/src/main/res/values-hy-AM/strings.xml app/src/main/res/values-hy/
rm -rf app/src/main/res/values-hy-AM
mv app/src/main/res/values-sv-SE/strings.xml app/src/main/res/values-se/
rm -rf app/src/main/res/values-sv-SE/
mv app/src/main/res/values-pt-PT/strings.xml app/src/main/res/values-pt/
rm -rf app/src/main/res/values-pt-PT/
mv app/src/main/res/values-pt-BR/strings.xml app/src/main/res/values-pt-rBR/
rm -rf app/src/main/res/values-pt-BR/
mv app/src/main/res/values-tlh-AA/strings.xml app/src/main/res/values-tlh/
rm -rf app/src/main/res/values-tlh-AA


text:
	- Se instala en el servidor
	- Se configura con express o con http
	- Se descarga en el cliente
## Eventos y mensajes
	- Conexión
	- Emisión
	- Broadcast
## práctica
	- req: a partir de la tienda que guarda en MongoDB
	- res: Actulizar el stock en tiempo real respondiendo a los pedidos


text:
// Copyright (c) 2020-2021 Ubisoft Entertainment
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System.IO;
using System.Linq;
using Sharpmake;

namespace HelloLinux
{
    public static class ConfigurePriorities
    {
        public const int All = -75;
        public const int Platform = -50;
        public const int Optimization = -25;
        /*     SHARPMAKE DEFAULT IS 0     */
        public const int Blobbing = 10;
        public const int BuildSystem = 30;
        public const int PostAll = 100;
    }

    public abstract class CommonProject : Sharpmake.Project
    {
        protected CommonProject()
            : base(typeof(CommonTarget))
        {
            RootPath = Globals.RootDirectory;
            IsFileNameToLower = false;
            IsTargetFileNameToLower = false;

            SourceRootPath = @"[project.RootPath]\[project.Name]";
        }

        [ConfigurePriority(ConfigurePriorities.All)]
        [Configure]
        public virtual void ConfigureAll(Configuration conf, CommonTarget target)
        {
            conf.ProjectFileName = "[project.Name]_[target.Platform]";
            if (target.DevEnv != DevEnv.xcode4ios)
                conf.ProjectFileName += "_[target.DevEnv]";
            conf.ProjectPath = Path.Combine(Globals.TmpDirectory, @"projects\[project.Name]");
            conf.IsFastBuild = target.BuildSystem == BuildSystem.FastBuild;

            conf.IntermediatePath = Path.Combine(Globals.TmpDirectory, @"obj\[target.DirectoryName]\[project.Name]");
            conf.TargetPath = Path.Combine(Globals.OutputDirectory, "[target.DirectoryName]");

            // Note: uncomment the following line if we port this sample to windows
            //conf.TargetLibraryPath = conf.IntermediatePath; // .lib files must be with the .obj files when running in fastbuild distributed mode or we'll have missing symbols due to merging of the .pdb
            conf.TargetLibraryPath = Path.Combine(Globals.TmpDirectory, @"lib\[target.DirectoryName]\[project.Name]");

            // TODO: uncomment and fix this. Didn't find a way to have product with
            //       different names per configurations to work properly...
            //conf.TargetFileName += "_" + target.Optimization.ToString().ToLowerInvariant().First(); // suffix with lowered first letter of optim
            //if (conf.IsFastBuild)
            //conf.TargetFileName += "x";

            conf.Output = Configuration.OutputType.Lib; // defaults to creating static libs
        }

        [ConfigurePriority(ConfigurePriorities.PostAll)]
        [Configure]
        public virtual void PostConfigureAll(Configuration conf, CommonTarget target)
        {
            if (conf.Output == Configuration.OutputType.Exe || conf.Output == Configuration.OutputType.Dll)
            {
                // Create a separate package directory before building.
                string packageDir = $@"{Globals.TmpDirectory}/package";
                conf.EventPreBuild.Add($"mkdir -p {packageDir}");
                // Copy the build result to the package directory.
                conf.EventPostBuild.Add($@"cp [conf.TargetPath]/[conf.TargetFileFullNameWithExtension] {packageDir}");
            }
        }

        ////////////////////////////////////////////////////////////////////////
        #region Platfoms
        [ConfigurePriority(ConfigurePriorities.Platform)]
        [Configure(Platform.linux)]
        public virtual void ConfigureLinux(Configuration conf, CommonTarget target)
        {
        }
        #endregion
        ////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////
        #region Optimizations
        [ConfigurePriority(ConfigurePriorities.Optimization)]
        [Configure(Optimization.Debug)]
        public virtual void ConfigureDebug(Configuration conf, CommonTarget target)
        {
            conf.DefaultOption = Options.DefaultTarget.Debug;
        }

        [ConfigurePriority(ConfigurePriorities.Optimization)]
        [Configure(Optimization.Release)]
        public virtual void ConfigureRelease(Configuration conf, CommonTarget target)
        {
            conf.DefaultOption = Options.DefaultTarget.Release;
        }
        #endregion
        ////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////
        #region Blobs and unitys
        [Configure(Blob.FastBuildUnitys)]
        [ConfigurePriority(ConfigurePriorities.Blobbing)]
        public virtual void FastBuildUnitys(Configuration conf, CommonTarget target)
        {
            conf.FastBuildBlobbed = true;
            conf.FastBuildUnityPath = Path.Combine(Globals.TmpDirectory, @"unity\[project.Name]");
            conf.IncludeBlobbedSourceFiles = false;
            conf.IsBlobbed = false;
        }

        [Configure(Blob.NoBlob)]
        [ConfigurePriority(ConfigurePriorities.Blobbing)]
        public virtual void BlobNoBlob(Configuration conf, CommonTarget target)
        {
            conf.FastBuildBlobbed = false;
            conf.IsBlobbed = false;

            if (conf.IsFastBuild)
                conf.ProjectName += "_NoBlob";
        }
        #endregion
        ////////////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////////////
        #region Compilers and toolchains
        [ConfigurePriority(ConfigurePriorities.BuildSystem)]
        [Configure(BuildSystem.FastBuild)]
        public virtual void ConfigureFastBuild(Configuration conf, CommonTarget target)
        {
            conf.SolutionFolder = "FastBuild/" + conf.SolutionFolder;
            conf.ProjectName += "_FastBuild";

            conf.Defines.Add("USES_FASTBUILD");
        }
        #endregion
        ////////////////////////////////////////////////////////////////////////
    }
}


text:
using System;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Widget;

namespace GroceryList
{
	[Activity(Label = "About")]
	public class AboutActivity : Activity
	{
		protected override void OnCreate(Bundle bundle)
		{
			base.OnCreate(bundle);
			SetContentView(Resource.Layout.About);

			FindViewById<Button>(Resource.Id.learnMoreButton).Click += OnLearnMoreClick;
		}

		void OnLearnMoreClick(object sender, EventArgs e)
		{
			var intent = new Intent();

			//
			// Use ActionView with an http Data value to launch Android's web browser Activity.
			//
			intent.SetAction(Intent.ActionView);
			intent.SetData(Android.Net.Uri.Parse("http://www.xamarin.com"));

			StartActivity(intent);
		}
	}
}


text:
alias ls="ls --color=always -N"
alias ll="ls -alhF -N"
alias la="ls -A -N"
alias l="ls -CF -N"
# alias grep="grep -n --color=always"
# alias grep='grep --color=always'
alias fgrep='fgrep --color=always'
alias egrep='egrep --color=always'
alias diffy="diff -y --suppress-common-lines"
alias vi="vim"
alias vim="nvim"

# other
alias python="python3"
alias za="zathura --fork"
alias xclip="xclip -selection c"
alias rgh="rg --hidden"
alias rg="rg -p"

# paths
alias gowd="cd $GOPATH/src/github.com/yangkev"
alias wd="cd ~/src"
alias path="echo $PATH"


text:
<?php

namespace Never5\DownloadMonitor\Dependencies\PayPal\Api;

/**
 * Class InvoiceAddress
 *
 * Base Address object used as billing address in a payment or extended for Shipping Address.
 *
 * @package Never5\DownloadMonitor\Dependencies\PayPal\Api
 *
 * @property \Never5\DownloadMonitor\Dependencies\PayPal\Api\Phone phone
 */
class InvoiceAddress extends BaseAddress
{
    /**
     * Phone number in E.123 format.
     *
     * @param \Never5\DownloadMonitor\Dependencies\PayPal\Api\Phone $phone
     *
     * @return $this
     */
    public function setPhone($phone)
    {
        $this->phone = $phone;
        return $this;
    }

    /**
     * Phone number in E.123 format.
     *
     * @return \Never5\DownloadMonitor\Dependencies\PayPal\Api\Phone
     */
    public function getPhone()
    {
        return $this->phone;
    }

}


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

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>Boost.Sort: I:/modular-boost/libs/sort/include/boost/sort/spreadsort/spreadsort.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

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

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

Boost.Sort

Main Page

Namespaces

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

File List

File Members

include

boost

sort

spreadsort

Namespaces |
Functions

spreadsort.hpp File Reference

#include <algorithm>

#include <vector>

#include <cstring>

#include <string>

#include <limits>

#include <boost/type_traits.hpp>

#include <boost/sort/spreadsort/integer_sort.hpp>

#include <boost/sort/spreadsort/float_sort.hpp>

#include <boost/sort/spreadsort/string_sort.hpp>

Go to the source code of this file.

Namespaces

  	boost

  	boost::sort

Functions

template<class RandomAccessIter >

boost::enable_if_c< std::numeric_limits< typename std::iterator_traits< RandomAccessIter >::value_type >::is_integer, void >::type 	boost::sort::spreadsort (RandomAccessIter first, RandomAccessIter last)

 	Generic spreadsort variant detecting integer-type elements so call to integer_sort.  More...

template<class RandomAccessIter >

boost::enable_if_c< !std::numeric_limits< typename std::iterator_traits< RandomAccessIter >::value_type >::is_integer &&std::numeric_limits< typename std::iterator_traits< RandomAccessIter >::value_type >::is_iec559, void >::type 	boost::sort::spreadsort (RandomAccessIter first, RandomAccessIter last)

 	Generic spreadsort variant detecting float element type so call to float_sort.  More...

template<class RandomAccessIter >

boost::enable_if_c< is_same< typename std::iterator_traits< RandomAccessIter >::value_type, typename std::string >::value||is_same< typename std::iterator_traits< RandomAccessIter >::value_type, typename std::wstring >::value, void >::type 	boost::sort::spreadsort (RandomAccessIter first, RandomAccessIter last)

 	Generic spreadsort variant detecting string element type so call to string_sort for std::strings and std::wstrings.  More...

<address class="footer">
Generated on Fri Jan 9 2015 14:20:24 for Boost.Sort by

 1.8.9.1
</address>


text:
namespace {
const char kPreferenceMACs[] = "protection.macs";
const char kSuperMACPref[] = "protection.super_mac";
}

DictionaryHashStoreContents::DictionaryHashStoreContents(
    base::DictionaryValue* storage)
    : storage_(storage) {}

// static
void DictionaryHashStoreContents::RegisterProfilePrefs(
    user_prefs::PrefRegistrySyncable* registry) {
  registry->RegisterDictionaryPref(kPreferenceMACs);
  registry->RegisterStringPref(kSuperMACPref, std::string());
}

bool DictionaryHashStoreContents::IsCopyable() const {
  return false;
}

std::unique_ptr<HashStoreContents> DictionaryHashStoreContents::MakeCopy()
    const {
  NOTREACHED() << "DictionaryHashStoreContents does not support MakeCopy";
  return nullptr;
}

base::StringPiece DictionaryHashStoreContents::GetUMASuffix() const {
  // To stay consistent with existing reported data, do not append a suffix
  // when reporting UMA stats for this content.
  return base::StringPiece();
}

void DictionaryHashStoreContents::Reset() {
  storage_->RemovePath(kPreferenceMACs);
}

bool DictionaryHashStoreContents::GetMac(const std::string& path,
                                         std::string* out_value) {
  const base::DictionaryValue* macs_dict = GetContents();
  if (macs_dict)
    return macs_dict->GetString(path, out_value);

  return false;
}

bool DictionaryHashStoreContents::GetSplitMacs(
    const std::string& path,
    std::map<std::string, std::string>* split_macs) {
  DCHECK(split_macs);
  DCHECK(split_macs->empty());

  const base::DictionaryValue* macs_dict = GetContents();
  const base::DictionaryValue* split_macs_dict = NULL;
  if (!macs_dict || !macs_dict->GetDictionary(path, &split_macs_dict))
    return false;
  for (const auto item : split_macs_dict->GetDict()) {
    const std::string* mac_string = item.second.GetIfString();
    if (!mac_string) {
      NOTREACHED();
      continue;
    }
    split_macs->insert(make_pair(item.first, *mac_string));
  }
  return true;
}

void DictionaryHashStoreContents::SetMac(const std::string& path,
                                         const std::string& value) {
  base::DictionaryValue* macs_dict = GetMutableContents(true);
  macs_dict->SetString(path, value);
}

void DictionaryHashStoreContents::SetSplitMac(const std::string& path,
                                              const std::string& split_path,
                                              const std::string& value) {
  base::DictionaryValue* macs_dict = GetMutableContents(true);
  base::Value* split_dict = macs_dict->FindDictPath(path);
  if (!split_dict) {
    split_dict =
        macs_dict->SetPath(path, base::Value(base::Value::Type::DICTIONARY));
  }
  split_dict->SetKey(split_path, base::Value(value));
}

void DictionaryHashStoreContents::ImportEntry(const std::string& path,
                                              const base::Value* in_value) {
  base::DictionaryValue* macs_dict = GetMutableContents(true);
  macs_dict->SetPath(path, in_value->Clone());
}

bool DictionaryHashStoreContents::RemoveEntry(const std::string& path) {
  base::DictionaryValue* macs_dict = GetMutableContents(false);
  if (macs_dict)
    return macs_dict->RemovePath(path);

  return false;
}

std::string DictionaryHashStoreContents::GetSuperMac() const {
  std::string super_mac_string;
  storage_->GetString(kSuperMACPref, &super_mac_string);
  return super_mac_string;
}

void DictionaryHashStoreContents::SetSuperMac(const std::string& super_mac) {
  storage_->SetString(kSuperMACPref, super_mac);
}

const base::DictionaryValue* DictionaryHashStoreContents::GetContents() const {
  const base::DictionaryValue* macs_dict = NULL;
  storage_->GetDictionary(kPreferenceMACs, &macs_dict);
  return macs_dict;
}

base::DictionaryValue* DictionaryHashStoreContents::GetMutableContents(
    bool create_if_null) {
  base::DictionaryValue* macs_dict = NULL;
  storage_->GetDictionary(kPreferenceMACs, &macs_dict);
  if (!macs_dict && create_if_null) {
    macs_dict = static_cast<base::DictionaryValue*>(storage_->SetPath(
        kPreferenceMACs, base::Value(base::Value::Type::DICTIONARY)));
  }
  return macs_dict;
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="@color/m4399_rec_color_white"
    android:gravity="center"
    android:orientation="horizontal" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/m4399_rec_acount"
        android:textColor="@color/m4399_rec_color_grey"
        android:textSize="16sp" />

    <TextView
        android:id="@+id/role_info"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="4dp"
        android:textColor="@color/m4399_rec_color_grey"
        android:textSize="15sp" />

    <TextView
        android:id="@+id/youbi_vertical_line"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginRight="4dp"
        android:text="@string/m4399_rec_vertical_line"
        android:textColor="@color/m4399_rec_color_grey"
        android:textSize="16sp" />

    <cn.m4399.recharge.ui.widget.InquiryBar
        android:id="@+id/inquiry_bar"
        android:layout_width="wrap_content"
        android:layout_height="25dp" />

</LinearLayout>


text:
const Main = imports.ui.main;

function init() {
}

function enable() {
	removeRoundedCorners();
}

function disable() {
	restoreRoundedCorners();
}

function removeRoundedCorners() {
	Main.panel._leftCorner.actor.set_style("-panel-corner-radius: 0px");
	Main.panel._rightCorner.actor.set_style("-panel-corner-radius: 0px");
}

function restoreRoundedCorners() {
	Main.panel._leftCorner.actor.set_style("-panel-corner-radius: 10px");
	Main.panel._rightCorner.actor.set_style("-panel-corner-radius: 10px");
}


text:
float cum_dif = 0.0;
float last_dif = 0.0;
bool isDragging,touched = NO;
double menuHeight = 0.0;
double padding = 10.0;

@implementation ScrollMenu

-(id)init{
    self = [super init];
    if(self){

    }
    return self;
}

-(id)initWithCGRectBoundsAndDelegate:(CGPoint)center withHeight:(int)height withWidth:(int)width andDelegate:(id)newDelegate
{
    self = [self init];
    if(self){

        if(![[newDelegate class] conformsToProtocol:@protocol(ScrollMenuDelegate)]){
            [NSException raise:@"Delegate Exception" format:@"Delegate of class %@ is invalid", [newDelegate class]];
        }else{
            [newDelegate retain];
            delegate = newDelegate;
        }

        menuHeightBounds = height;
        menuWidthBounds = width;
        menuCenterBounds = center;

        menuItemAttributes = [[NSMutableDictionary alloc] init];

        //Set the background of the menu
        //TODO: Make this more generic, listen to the bounds method might need more params...
        menuBackground = [CCSprite spriteWithFile:@"Notification.png"];
        [menuBackground setPosition:center];
        [self addChild:menuBackground z:0];

        [menuBackground setScaleX:width * CC_CONTENT_SCALE_FACTOR()];
        [menuBackground setScaleY:height * CC_CONTENT_SCALE_FACTOR()];

        clippingNode = [ClippingNode node];
        [clippingNode setClippingRegion:[menuBackground boundingBox]];
        [self addChild:clippingNode z:1];

        [self setTouchEnabled:YES];
    }
    return self;
}

-(void)clearMenu
{
    if(mainMenu != nil){
        [clippingNode removeChild:mainMenu cleanup:YES];
    }

    menuHeight = 10;
    mainMenu = [CCMenu menuWithItems:nil];

    [menuItemAttributes release];
    menuItemAttributes = [[NSMutableDictionary alloc]init];

    //TODO make this more generic for positioning
    [mainMenu setPosition:ccp(menuCenterBounds.x,menuCenterBounds.y+(menuHeightBounds/2)-padding)];

    //[mainMenu setPosition:menuCenterBounds];
    [mainMenu alignItemsVertically];
    [mainMenu setTouchEnabled:NO];
    [clippingNode addChild:mainMenu];
}

#pragma mark -
#pragma mark touches

-(void) registerWithTouchDispatcher
{
    [[[CCDirector sharedDirector] touchDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES];
}

-(BOOL) ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event
{
    //Translate into COCOA coordinates
    CGPoint touchLocation = [touch locationInView: [touch view]];
    touchLocation = [[CCDirector sharedDirector] convertToGL: touchLocation];
    touchLocation = [self convertToNodeSpace:touchLocation];

    if(CGRectContainsPoint([menuBackground boundingBox], touchLocation)){
        //NSLog(@"Touch");
        touched = YES;
        return YES;
    }

    return NO;
}

- (void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event{
    //Only scroll if touched first and menu larger than screen size
    if(touched == NO || menuHeight < menuHeightBounds){
        //NSLog(@"NO SCROLL");
        return;
    }

    CGPoint prevPoint = [[CCDirector sharedDirector] convertToGL:[touch previousLocationInView:touch.view]];
    CGPoint curPoint = [[CCDirector sharedDirector] convertToGL:[touch locationInView:touch.view]];

    float diff = (prevPoint.y - curPoint.y);
    cum_dif += diff;

    if(abs(diff) > SCROLL_THRESHOLD){
        cum_dif = diff;
        isDragging = YES;
        [self scrollMenu];
    }

}

-(void) ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event
{
    //NSLog(@"End");
    if(touched){
        //Tapped in the Menu instead of dragging
        if((isDragging == NO) && [touch tapCount] == 1){

            CCMenuItemLabel* menuItem = (CCMenuItemLabel*)[mainMenu itemForTouch:touch];
            //This does happen
            if(menuItem == nil){
                return;
            }
            NSString* menuLabel = [[menuItem label]string];
            NSMutableDictionary* itemAttributes = [menuItemAttributes objectForKey:menuLabel];

            if (nil != [itemAttributes objectForKey:@"noMoreGames"])
            {
                UIAlertView* dialog = [[UIAlertView alloc] init];
                [dialog setDelegate:self];
                [dialog setTitle:@"Can Not Add Friend"];
                [dialog setMessage:@"Your friend has Empous Lite and is already playing the maximum number of games."];
                [dialog addButtonWithTitle:@"OK"];
                [dialog show];
                [dialog release];
            }

            else if(nil == [itemAttributes objectForKey:@"isDisabled"]){
                [delegate menuItemTouched:menuLabel];
            }

        }else{
            //Only scroll if touched first and menu larger than screen size
            if(touched == NO || menuHeight < menuHeightBounds){
                return;
            }

            CGPoint currentPosition = mainMenu.position;

            //Limit the movement to the size of the menu
            if(currentPosition.y < menuCenterBounds.y+(menuHeightBounds/2)-padding){
                currentPosition.y = menuCenterBounds.y+(menuHeightBounds/2)-padding;
            }

            if((menuHeight - (currentPosition.y - menuCenterBounds.y) -padding ) < menuHeightBounds/2){
                currentPosition.y = menuCenterBounds.y + (menuHeight - menuHeightBounds/2) - padding;
            }

            [mainMenu runAction:[CCMoveTo actionWithDuration:0.1f position:currentPosition]];
        }
    }

    touched = isDragging = NO;
    last_dif = 0.0;
}

-(void)scrollMenu
{
    float moveBy = 0.0;

    if(abs(cum_dif) > SCROLL_THRESHOLD){
        moveBy = cum_dif;
        cum_dif = 0.0;
    }

    if(moveBy != 0.0){
        CGPoint currentPosition = mainMenu.position;
        currentPosition.y -= moveBy;

        CCAction *moveMenu = [CCPlace actionWithPosition:currentPosition];
        [mainMenu runAction:moveMenu];
    }
}

-(void)addItem:(NSString*)menuItemText doesSupportContinents:(BOOL)supportsContinents;
{
    //Create the label and add it to the menu item
    CCLabelTTF* label = [CCLabelTTF labelWithString:menuItemText fontName:@"Helvetica Neue" fontSize:20];
    [label setPosition:ccp(30,0)];

    //Create the menu item using the label
    CCMenuItemLabel *menuItem = [CCMenuItemLabel itemWithLabel:label];
    [menuItem setAnchorPoint:ccp(0.0f,0.5f)];
    menuItem.position = ccp(-menuWidthBounds/2,0-menuHeight);

    //Create an icon if they support continents
    if (supportsContinents)
    {
        CCSprite* icon = [CCSprite spriteWithFile:@"Continent.png"];
        [icon setAnchorPoint:ccp(0.0,0)];
        [icon setPosition:ccp(5,0)];
        [menuItem addChild:icon];
    }

    //Add the menu item
    [mainMenu addChild:menuItem];
    menuHeight += [menuItem contentSize].height;

    //

    //Add the label to the dictionary
    NSMutableDictionary* itemAttributes = [[NSMutableDictionary alloc]init];
    [itemAttributes setObject:menuItem forKey:@"menuItem"];
    [menuItemAttributes setObject:itemAttributes forKey:menuItemText];
    [itemAttributes release];
}

-(void)removeItem:(NSString *)menuItemText
{
    //Get the entry out of the attributes dictionary
    NSMutableDictionary* itemAttributes = [menuItemAttributes objectForKey:menuItemText];
    if(nil != itemAttributes)
    {
        //Remove from menu
        CCMenuItemLabel* menuItem = [itemAttributes objectForKey:@"menuItem"];

        [mainMenu removeChild:menuItem cleanup:YES];

        //Remove from attributes list
        [itemAttributes removeObjectForKey:menuItemText];
    }
}

-(void)disableItemForNoMoreGames:(NSString *)menuItemText
{
    NSMutableDictionary* itemAttributes = [menuItemAttributes objectForKey:menuItemText];
    [itemAttributes setValue:@"1" forKey:@"noMoreGames"];
    [self disableItem:menuItemText];
}

-(void)disableItem:(NSString*)menuItemText
{
    NSMutableDictionary* itemAttributes = [menuItemAttributes objectForKey:menuItemText];
    if(nil != itemAttributes)
    {
        CCMenuItemLabel* menuItem = [itemAttributes objectForKey:@"menuItem"];
        [[menuItem label]setColor:ccGRAY];

        [[menuItemAttributes objectForKey:menuItemText] setValue:@"1" forKey:@"isDisabled"];
    }
}

-(void)enableItem:(NSString*)menuItemText
{
    NSMutableDictionary* itemAttributes = [menuItemAttributes objectForKey:menuItemText];
    if(nil != itemAttributes)
    {
        CCMenuItemLabel* menuItem = [itemAttributes objectForKey:@"menuItem"];
        [[menuItem label]setColor:ccWHITE];

        [[menuItemAttributes objectForKey:menuItemText] removeObjectForKey:@"isDisabled"];
    }
}

-(int)numberOfItems
{
    return [[mainMenu children] count];
}

-(CGRect)getMenuBackgroundBounds
{
    return [menuBackground boundingBox];
}
@end


text:
/*
 */
/***********************************************************************

 gsvtobin - Generate binary (float) fid data

Details:
	Input varian data file; Output binary (float) data file.
	Data arranged in re-imag pairs

Usage:  gsvtobin input_varian_float_file binary_file <dc>
        (note: gsbin expects .fid/fid file; assume FT'ed varian data, i.e. float)

Author: S. Sukumar

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

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>

#define NUM_ARGS	3   /* number of input arguments */
#define NP              main_header1.np
#define NBLOCKS         main_header1.nblocks
#define NTRACES         main_header1.ntraces
#define EBYTES          main_header1.ebytes

struct datafilehead
{
	long nblocks;		/* no of blocks in file */
	long ntraces;		/* no of traces per block */
	long np;		/* no elements re+im per trace */
	long ebytes;		/* no of byets per element */
	long tbytes;		/* no of bytes per trace */
	long bbytes;		/* no of bytes per block */
	short transf;		/* transposed storage flag */
	short status;		/* status of whole file */
	long spare1;		/* spare */
} main_header1, main_header2;

struct datablockhead
{
	short scale;		/* scaling factor */
	short status; 		/* status of data in block */
	short index;		/* block index */
	short spare3;		/* spare */
	long ctcount;		/* completed transients */
	float lpval;		/* left phase in phasefile */
	float rpval;		/* right phase in phasefile */
	float lvl;		/* level drift correction */
	float tlt;		/* tilt drift correction */
} *block_header1, *block_header2;

typedef struct datablockhead DATABLOCKHEAD;

int main(argc, argv)
int	argc;
char	*argv[];
{
	char	dir1[128],outdir[128];
	char	file1[128],outfid[128];
	char	**dataout,**data1;
	int	infile1,outfile,malloc_size;
	int	i,j,k,l,m;
	float   *d1;
	float   *f1;
	char	*fbuf;
	int	dcflag;
	int	t1sz,t2sz;

	/* Check arguments */
	if ((argc-1 < NUM_ARGS-1)||(argc-1 > NUM_ARGS))
	{
		printf("Usage: stripv input_directory output_filename <dc>");
		exit(1);
	}

	strcpy(dir1, argv[1]);      /* input file */
	strcpy(outdir, argv[2]);    /* output filename */

	strcpy(file1, dir1);
	strcpy(outfid, outdir);      /* output filename for binaries */

	/* open input files */
	if ((infile1 = open(file1, O_RDONLY)) < 0)
	{
		printf("stripv: cannot open input file #1\n");
		exit(1);
	}
	if ((outfile = open(outfid, O_CREAT|O_TRUNC|O_WRONLY, 0644)) < 0)
	{
		printf("stripv: cannot open output file \n");
		exit(1);
	}

	/* read main header */
	malloc_size = sizeof(main_header1);
	if (read(infile1, &main_header1, malloc_size) != malloc_size)
	{
		printf("stripv: cannot read header #1");
		exit(1);
	}
	/* allocate space for block header */
	if ((block_header1 = (DATABLOCKHEAD *)malloc(NBLOCKS*sizeof(DATABLOCKHEAD)))
						== NULL)
	{
		printf("stripv: unable to allocate space for datablock headers\n");
		exit(1);
	}
	/* allocate space for input data traces */
	if (( data1 = (char **) malloc(NBLOCKS*sizeof(char*))) == NULL)
	{
		printf("stripv: unable to allocate space for input data");
		exit(1);
	}

	/* Read in data and block_headers */
	malloc_size = NP*EBYTES*NTRACES*sizeof(char);
	for (i=0; i<NBLOCKS; i++)
	{
		if (read(infile1, &block_header1[i], sizeof(DATABLOCKHEAD)) < 0)
		{
			printf("stripv: unable to read block header, file #1\n");
			exit(1);
		}
		/* allocate space for each line of the data and read it in */
		if ((data1[i] = (char *)malloc(malloc_size)) == NULL)
		{
			printf("stripv: unable to allocate space for input data file #1");
			exit(1);
		}
		if (read(infile1, data1[i], malloc_size) != malloc_size)
		{
			printf("stripv: unable to read input data file #1\n");
			exit(1);
		}

	}

		/**
		printf("np=%d, ntraces=%d, nblocks=%d,\n",NP,NTRACES,NBLOCKS);
		exit(1);
		**/
                /* allocate space for each block of the data  */
                malloc_size = NP*NTRACES*EBYTES*sizeof(char);
                if ((fbuf = (char *)malloc(malloc_size)) == NULL)
                {
                        printf("pcepi: unable to allocate space for input data file #1");
                        exit(1);
                }
	/* Read data and save in dataout buffer */
	/** Assumes NBLOCKS = 1 **/

	for (i=0; i<NBLOCKS; i++)
	{
		/* float, dc correct, and write the data */
		d1 = (float *)data1[i];
		f1 = (float *)fbuf;
		k=0;
		t2sz=NTRACES;
		t1sz=NP/2;
		/* after ft2d, np refers to pe dimension */
		/*  ntraces refers to ro dim. */
		for (m=0; m<NP/2; m++)
		{
		  for (j=0; j<NTRACES; j++)
		  {
			f1[k] = d1[k];
			f1[k+1] = d1[k+1];
			k=k+2;
		  }

		}
		/* write out the data only from input buffer */
		if (write(outfile, fbuf, NP*EBYTES*NTRACES,sizeof(char)) <0)
		{
			printf("stripv: unable to write data \n");
			exit(1);
		}
	}
	/* clean up */
	if( close(infile1) )
	{
		printf("stripv: problems closing input file #1\n");
		exit(1);
	}
	if( close(outfile) )
	{
		printf("stripv: problems closing output file\n");
		exit(1);
	}
}

/***************************************************************************
                   MODIFICATION HISTORY

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


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Reflection;

namespace Aspose.Cloud
{
    public class BaseService
    {
        internal string AppKey { get; set; }
        internal string AppSid { get; set; }

        /// <summary>
        /// Aspose for Cloud Web App resource controller
        /// </summary>
        /// <param name="appSid">App SID - You can get it from https://cloud.aspose.com/</param>
        /// <param name="appKey">App key - You can get it from https://cloud.aspose.com/</param>
        protected BaseService(string appSid, string appKey)
        {
            AppSid = appSid;
            AppKey = appKey;
            AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
        }

        static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
        {
            using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Aspose.Cloud.Newtonsoft.Json.dll"))
            {
                byte[] assemblyData = new byte[stream.Length];
                stream.Read(assemblyData, 0, assemblyData.Length);
                return Assembly.Load(assemblyData);
            }
        }
    }
}


text:
import React, {Component} from 'react';
import PropTypes, {browseTo, withRouter} from '../../PropTypes.js';
import {Link} from 'react-router-dom';
import cn from 'classnames';

import MatchForm from '../Match/MatchForm.js';
import MatchScore from '../MatchScore.js';
import {ThrillerBadge, ThrillerIcon, CommentIcon} from '../../controls/Icon.js';
import {TheirTeamTitle} from './TheirTeamTitle.js';

const thrillerIconWith = 25;
const ThrillerIconSpan =  ;

// BigMatchCardHeader == MatchesToday on Club monitor
export class BigMatchCardHeader extends Component {
  static contextTypes = PropTypes.contextTypes;
  static propTypes = {
    match2: PropTypes.MatchModel.isRequired,
    children: PropTypes.node,
    user: PropTypes.UserModel.isRequired,
    isOpen: PropTypes.bool.isRequired,
    forceEdit: PropTypes.bool,
  }

  render() {
    const match = this.props.match2;
    const team = match.getTeam();
    const us = team.renderOwnTeamTitle();
    const them = match.renderOpponentTitle();

    return (

            <MatchForm match={match} t={this.context.t} user={this.props.user} big />

          {match.isHomeMatch ? `${us} vs ${them}` : `${them} vs ${us}`}
          <ThrillerBadge t={this.context.t} match={match} />

        {this.props.isOpen ? (

            {this.props.children}

        ) : null}

    );
  }
}

@withRouter
export class SmallMatchCardHeader extends Component {
  static contextTypes = PropTypes.contextTypes;
  static propTypes = {
    match2: PropTypes.MatchModel.isRequired, //
    children: PropTypes.node,
    user: PropTypes.UserModel.isRequired,
    isOpen: PropTypes.bool.isRequired,
    forceEdit: PropTypes.bool,
    noScoreEdit: PropTypes.bool,
    width: PropTypes.number,
    routed: PropTypes.bool,
    history: PropTypes.any.isRequired,
  }

  render() {
    const {match, match2, history, location, ...props} = this.props; // eslint-disable-line
    const newProps = {match: match2, onOpen: ::this._onOpen, ...props};
    return <MatchCardHeader {...newProps} />;
  }

  _onOpen(/*isOpen*/) {
    const matchRoute = this.context.t.route('match', {matchId: this.props.match2.id});
    this.props.history.push(matchRoute);
  }
}

class MatchCardHeader extends Component {
  static contextTypes = PropTypes.contextTypes;
  static propTypes = {
    config: PropTypes.object.isRequired,
    match: PropTypes.MatchModel.isRequired,
    children: PropTypes.node,
    user: PropTypes.UserModel.isRequired,
    isOpen: PropTypes.bool.isRequired,
    forceEdit: PropTypes.bool,
    onOpen: PropTypes.func.isRequired,
    noScoreEdit: PropTypes.bool,
    width: PropTypes.number,
    routed: PropTypes.bool,
  }

  render() {
    const match = this.props.match;
    const iPlay = this.props.user.playsIn(match.teamId);

    const scoreFormVisible = !this.props.noScoreEdit &&
      (match.isBeingPlayed() || this.props.forceEdit) &&
      this.props.user.canChangeMatchScore(this.props.match);

    // const scoreFormInHeader = !!this.props.routed;
    const smallAndScoring = scoreFormVisible && this.props.width < 480;

    var subtitle = [];
    subtitle.push(ThrillerIconSpan);

    if (!smallAndScoring) {
      // The date and scoring form overlapped on small devices
      // --> ScoreForm is on Today matches, so displaying the date is not really necessary
      subtitle.push({this.context.t('match.date', match.getDisplayDate())});
    }

    if (match.comments.size || match.description) {
      const hasNewComment = this.props.config.get('newMatchComment' + match.id);
      subtitle.push(

          {match.comments.size ? {match.comments.size} : null}
          <CommentIcon translate tooltip={hasNewComment ? 'match.hasNewComments' : undefined} />

      );
    }

    const matchForm = (

        <MatchForm match={match} t={this.context.t} user={this.props.user} />

    );

    const onOpenHandler = this.props.onOpen && !this.props.isOpen ? e => this._onExpandChange(e) : undefined;

    return (

          {!scoreFormVisible ? <MatchScore match={match} className="match-card-score" /> : null}
          {scoreFormVisible && !smallAndScoring ? matchForm : null}
          <MatchCardHeaderSmallTitle match={match} t={this.context.t} withLinks={this.props.isOpen} />

{subtitle}

          {scoreFormVisible && smallAndScoring ? matchForm : null}

        {this.props.isOpen ? (

            {this.props.children}

        ) : null}

    );
  }

  _onExpandChange(event) {
    // console.log('event', event.target.nodeName, event.target);

    const nodeName = event.target.nodeName;
    if (nodeName === 'INPUT' || nodeName === 'A' || nodeName === '') {
      return;
    }

    if (this.props.onOpen) {
      this.props.onOpen(true);
    }
  }
}

const MatchCardHeaderSmallTitle = ({match, withLinks, t}) => {
  const team = match.getTeam();

  const ourTitle = <OwnTeamTitle match={match} withLinks={withLinks} />;
  const theirTitle = <TheirTeamTitle match={match} withLinks={withLinks} />;

  return (

      {team.getThriller(match) ? <ThrillerIcon color="red" /> : ThrillerIconSpan}

      {match.isHomeMatch ? ourTitle : theirTitle}

        {t('match.vs')}

      {!match.isHomeMatch ? ourTitle : theirTitle}

  );
};

MatchCardHeaderSmallTitle.propTypes = {
  match: PropTypes.MatchModel.isRequired,
  withLinks: PropTypes.bool.isRequired,
  t: PropTypes.func.isRequired,
};

const OwnTeamTitle = ({match, withLinks}) => {
  const team = match.getTeam();
  const divisionRanking = team.getDivisionRanking();

  const title = team.renderOwnTeamTitle();
  if (!withLinks) {
    return {title};
  }

  return (

      {divisionRanking.position ? {divisionRanking.position + '. '} : ''}
      <Link to={browseTo.getTeam(team)} className="link-hover-underline">
        {title}
      </Link>

  );
};

OwnTeamTitle.propTypes = {
  match: PropTypes.MatchModel.isRequired,
  withLinks: PropTypes.bool.isRequired,
};


text:
require 'spec_helper'
describe 'docker' do

  context 'with defaults for all parameters' do
    it { should contain_class('docker') }
    it { should compile.with_all_deps }
  end
end


text:
package capabilities

import (
	cb "github.com/hyperledger/fabric/protos/common"
)

const (
	ordererTypeName = "Orderer"

	// OrdererV1_1 is the capabilities string for standard new non-backwards compatible Fabric v1.1 orderer capabilities.
	OrdererV1_1 = "V1_1"

	// OrdererV2_0 is the capabilities string that defines new Fabric v2.0 orderer capabilities.
	//
	// In particular, it defines whether the orderer supports a Kafka to Raft migration.
	// A Kafka-based Ordering Service Node requires this in order to receive and process a config update with
	// consensus-type migration commands. Migration is supported from Kafka to Raft only.
	// If not present, these config updates will be rejected.
	OrdererV2_0 = "V2_0"
)

// OrdererProvider provides capabilities information for orderer level config.
type OrdererProvider struct {
	*registry
	v11BugFixes   bool
	kafka2RaftMig bool
}

// NewOrdererProvider creates an orderer capabilities provider.
func NewOrdererProvider(capabilities map[string]*cb.Capability) *OrdererProvider {
	cp := &OrdererProvider{}
	cp.registry = newRegistry(cp, capabilities)
	_, cp.v11BugFixes = capabilities[OrdererV1_1]
	_, cp.kafka2RaftMig = capabilities[OrdererV2_0]
	return cp
}

// Type returns a descriptive string for logging purposes.
func (cp *OrdererProvider) Type() string {
	return ordererTypeName
}

// HasCapability returns true if the capability is supported by this binary.
func (cp *OrdererProvider) HasCapability(capability string) bool {
	switch capability {
	// Add new capability names here
	case OrdererV1_1:
		return true
	case OrdererV2_0:
		return true
	default:
		return false
	}
}

// PredictableChannelTemplate specifies whether the v1.0 undesirable behavior of setting the /Channel
// group's mod_policy to "" and copying versions from the channel config should be fixed or not.
func (cp *OrdererProvider) PredictableChannelTemplate() bool {
	return cp.v11BugFixes
}

// Resubmission specifies whether the v1.0 non-deterministic commitment of tx should be fixed by re-submitting
// the re-validated tx.
func (cp *OrdererProvider) Resubmission() bool {
	return cp.v11BugFixes
}

// ExpirationCheck specifies whether the orderer checks for identity expiration checks
// when validating messages
func (cp *OrdererProvider) ExpirationCheck() bool {
	return cp.v11BugFixes
}

// Kafka2RaftMigration checks whether the orderer permits a Kafka to Raft migration.
func (cp *OrdererProvider) Kafka2RaftMigration() bool {
	return cp.kafka2RaftMig
}


text:
package endtoend.java.comparison;

import static org.hamcrest.MatcherAssert.assertThat;
import static utils.matchers.ResultContainsTheseErrors.contains;

import org.junit.BeforeClass;
import org.junit.Test;

import java.io.IOException;

import utils.InferException;
import utils.InferResults;

public class NullPointerExceptionTest {

  public static final String SOURCE_FILE =
      "infer/tests/codetoanalyze/java/infer/NullPointerExceptions.java";

  public static final String NPE =
      "java.lang.NullPointerException";

  private static InferResults inferResults;

  @BeforeClass
  public static void loadResults() throws InterruptedException, IOException {
    inferResults = InferResults.loadTracingComparisonResults(
        NullPointerExceptionTest.class,
        SOURCE_FILE);
  }

  @Test
  public void errorsFoundByInferExpectedToBeFoundInTracingMode()
      throws IOException, InterruptedException, InferException {
    String[] methods = {
        "nullPointerException",
        "nullPointerExceptionInterProc",
        "nullPointerExceptionWithExceptionHandling",
        "nullPointerExceptionWithArray",
        "nullPointerExceptionWithNullObjectParameter",
        "nullPointerExceptionWithNullArrayParameter",
        "nullPointerExceptionFromFaillingResourceConstructor",
        "nullPointerExceptionFromFailingFileOutputStreamConstructor",
        "nullPointerExceptionUnlessFrameFails",
    };
    assertThat(
        "Results should contain " + NPE,
        inferResults,
        contains(
            NPE,
            SOURCE_FILE,
            methods
        )
    );
  }

}