text:
package org.ccnx.ccn;

import java.io.IOException;
import java.math.BigInteger;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SignatureException;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Random;
import java.util.logging.Level;

import junit.framework.Assert;

import org.ccnx.ccn.BasicInterestListener;
import org.ccnx.ccn.CCNBase;
import org.ccnx.ccn.ContentVerifier;
import org.ccnx.ccn.config.SystemConfiguration;
import org.ccnx.ccn.impl.CCNFlowControl;
import org.ccnx.ccn.impl.support.DataUtils;
import org.ccnx.ccn.impl.support.Log;
import org.ccnx.ccn.io.CCNReader;
import org.ccnx.ccn.io.CCNWriter;
import org.ccnx.ccn.io.content.ContentEncodingException;
import org.ccnx.ccn.profiles.SegmentationProfile;
import org.ccnx.ccn.profiles.VersionMissingException;
import org.ccnx.ccn.profiles.VersioningProfile;
import org.ccnx.ccn.protocol.CCNTime;
import org.ccnx.ccn.protocol.ContentName;
import org.ccnx.ccn.protocol.ContentObject;
import org.ccnx.ccn.protocol.Interest;
import org.ccnx.ccn.protocol.MalformedContentNameStringException;
import org.ccnx.ccn.protocol.PublisherPublicKeyDigest;
import org.junit.Test;

/**
 * Part of older test infrastructure. Tests a set of library read functionality; some
 * of which could be aggregated into other tests.
 */
public class CCNLibraryTest extends LibraryTestBase {
	static final String contentString = "This is a very small amount of content";

	private class NameSeen {
		private ContentName name;
		private boolean seen = false;

		private NameSeen(ContentName name) {
			this.name = name;
		}

		private boolean setSeen(ContentObject co) {
			if (name.isPrefixOf(co.name())) {
				seen = true;
				return true;
			}
			return false;
		}
	}

	@Test
	public void testEnumerate() {
		Log.info(Log.FAC_TEST, "Starting testEnumerate");
		Assert.assertNotNull(putHandle);
		Assert.assertNotNull(getHandle);

		try {

			CCNWriter writer = new CCNWriter("/CPOF", putHandle);
			ArrayList<NameSeen> testNames = new ArrayList<NameSeen>(3);
			testNames.add(new NameSeen(ContentName.fromNative("/CPOF/foo")));
			testNames.add(new NameSeen(ContentName.fromNative("/CPOF/bar/lid")));
			testNames.add(new NameSeen(ContentName.fromNative("/CPOF/bar/jar")));

			for (int i = 0; i < testNames.size(); i++) {
				writer.put(testNames.get(i).name, Integer.toString(i).getBytes());
			}

			CCNReader reader = new CCNReader(getHandle);
			ArrayList<ContentObject> availableNames =
				reader.enumerate(new Interest("/CPOF"), SystemConfiguration.NO_TIMEOUT);

			Iterator<ContentObject> nameIt = availableNames.iterator();

			while (nameIt.hasNext()) {
				ContentObject theName = nameIt.next();

				// Just get by name, to test equivalent to current
				// ONC interface.
				ContentObject theObject = getHandle.get(theName.name(), 1000);

				if (null == theObject) {
					Log.info(Log.FAC_TEST, "Missing content: enumerated name: " + theName.name() + " not gettable.");

				} else {
					Log.info(Log.FAC_TEST, "Retrieved name: " + theName.name());
				}

				for (NameSeen nt : testNames) {
					if (nt.setSeen(theName))
						break;
				}
			}

			for (NameSeen nt : testNames) {
				if (!nt.seen)
					Assert.fail("Didn't see name " + nt.name.toString() + " in enumeration");
			}

		} catch (Exception e) {
			Log.warning(Log.FAC_TEST, "Got an exception in enumerate test: " + e.getClass().getName() + ": " + e.getMessage());
			Log.logStackTrace(Log.FAC_TEST, Level.WARNING, e);
			Assert.fail("Exception in testEnumerate: " + e.getMessage());
		}
		Log.info(Log.FAC_TEST, "Completed testEnumerate");
	}

	@Test
	public void testPut() {
		Log.info(Log.FAC_TEST, "Starting testPut");

		Assert.assertNotNull(putHandle);
		Assert.assertNotNull(getHandle);

		ContentName name = null;
		byte[] content = null;
//		SignedInfo.ContentType type = SignedInfo.ContentType.LEAF;
		PublisherPublicKeyDigest publisher = null;

		content = DataUtils.getBytesFromUTF8String(contentString);

		try {
			name = ContentName.fromNative("/test/briggs/foo.txt");
		} catch (MalformedContentNameStringException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		try {
			CCNWriter segmenter = new CCNWriter(name, putHandle);
			ContentName result = segmenter.put(name, content, publisher);
			Log.info(Log.FAC_TEST, "Resulting ContentName: " + result);
		} catch (SignatureException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		Log.info(Log.FAC_TEST, "Completed testPut");
	}

	@Test
	public void testRevision() {
		Log.info(Log.FAC_TEST, "Starting testRevision");

		String key = "/test/key";
		byte[] data1 = "data".getBytes();
		byte[] data2 = "newdata".getBytes();
		ContentName revision1;
		ContentName revision2;

		try {
			ContentName keyName = ContentName.fromNative(key);
			CCNWriter segmenter = new CCNWriter(keyName, putHandle);
			revision1 = segmenter.newVersion(keyName, data1);
			revision2 = segmenter.newVersion(keyName, data2);
			long version1 = VersioningProfile.getLastVersionAsLong(revision1);
			long version2 = VersioningProfile.getLastVersionAsLong(revision2);
			Log.info(Log.FAC_TEST, "Version1: " + version1 + " version2: " + version2);
			Assert.assertTrue("Revisions are strange",
					version2 > version1);
		} catch (Exception e) {
			Log.warning(Log.FAC_TEST, "Exception in updating versions: " + e.getClass().getName() + ": " + e.getMessage());
			Assert.fail(e.getMessage());
		}
		Log.info(Log.FAC_TEST, "Completed testRevision");
	}

	@Test
	public void testVersion() throws Exception {
		Log.info(Log.FAC_TEST, "Starting testVersion");

		String name = "/test/smetters/stuff/versioned_name";
		ContentName cn = ContentName.fromNative(name);
		String name2 = "/test/smetters/stuff/.directory";
		ContentName cn2 = ContentName.fromNative(name2);
		String data = "The associated data.";
		String newdata = "The new associated data.";

		versionTest(cn, data.getBytes(), newdata.getBytes());
		versionTest(cn2, data.getBytes(), newdata.getBytes());
		Log.info(Log.FAC_TEST, "Completed testRevision");
	}

	@Test
	public void testGetLatestVersion() throws Exception {
		Log.info(Log.FAC_TEST, "Starting testGetLatestVersion");

		String name = "/test/simon/versioned_name-" + new Random().nextInt(10000);
		// include a base object, who's digest can potentially confuse getLatestVersion
		ContentName base = ContentName.fromNative(name);

		// Don't do repeated get latest versions for now, not working.
		final int testCount = 2;
		final byte [][] data = new byte[testCount][1];
		for (int i=0; i < testCount; ++i) {
			data[i][0] = (byte)i;
		}
		CCNFlowControl f = new CCNFlowControl(base, putHandle);
		ContentObject [] cos = new ContentObject[testCount];
		cos[0] = ContentObject.buildContentObject(base, data[0]);
		for (int i=1; i < testCount; ++i) {
			ContentName versionedName = VersioningProfile.addVersion(base);
			Thread.sleep(3);
			cos[i] = ContentObject.buildContentObject(versionedName, data[i]);
		}
		f.put(cos[0]);
		f.put(cos[1]);
		// java lacks nested functions, so use a class here...
		class t {
			void check(ContentObject o, int i) throws InvalidKeyException, ContentEncodingException,
						SignatureException, NoSuchAlgorithmException, InterruptedException {
				Log.info(Log.FAC_TEST, "Got content: " + o.name());
				Log.info(Log.FAC_TEST, "Original value: " + i + " returned value: " + Byte.toString(o.content()[0]));
				Assert.assertTrue(o.verify(putHandle.keyManager()));
				Assert.assertTrue(DataUtils.arrayEquals(o.content(), data[i]));
			}
			/**
			 * Make sure the data is written to ccnd by reading it
			 * @throws InterruptedException
			 * @throws NoSuchAlgorithmException
			 * @throws SignatureException
			 * @throws InvalidKeyException
			 */
			void readAndCheck(ContentName name, int index)
					throws ContentEncodingException,
						IOException, InvalidKeyException,
						SignatureException, NoSuchAlgorithmException, InterruptedException {
				Log.info(Log.FAC_TEST, "Getting content: " + name);
				check(getHandle.get(name, 2000), index);
			}
		} t test = new t();
		test.readAndCheck(base, 0);
		test.readAndCheck(cos[1].name(), 1);
		ContentVerifier putVerifier = new ContentObject.SimpleVerifier(putHandle.getDefaultPublisher());
		test.check(VersioningProfile.getLatestVersion(base, putHandle.getDefaultPublisher(), 2000, putVerifier, getHandle), 1);
		// Beef this up a bit...
		for (int i=2; i < testCount; ++i) {
			f.put(cos[i]);
			Log.info(Log.FAC_TEST, "Wrote content: " + cos[i].name());
			test.check(VersioningProfile.getLatestVersion(cos[i-1].name(), putHandle.getDefaultPublisher(), 2000, putVerifier, getHandle), i);
		}
		Log.info(Log.FAC_TEST, "Completed testGetLatestVersion");
	}

	@Test
	public void testRecall() {
		Log.info(Log.FAC_TEST, "Starting testRecall");

		String key = "/test/smetters/values/data";
		CCNTime time = CCNTime.now();
		try {
			ContentName keyName = ContentName.fromNative(key);
			CCNWriter writer = new CCNWriter(keyName, putHandle);
			ContentName name = writer.put(keyName, BigInteger.valueOf(time.getTime()).toByteArray());
			Log.info(Log.FAC_TEST, "Put under name: " + name);
			ContentObject result = getHandle.get(name, SystemConfiguration.NO_TIMEOUT);

			Log.info(Log.FAC_TEST, "Querying for returned name, Got back: " + (result == null ? "0"  : "1") + " results.");

			if (result == null) {
				Log.info(Log.FAC_TEST, "Didn't get back content we just put in.");
				Log.info(Log.FAC_TEST, "Put under name: " + keyName);
				Log.info(Log.FAC_TEST, "Final name: " + name);
				//Assert.fail("Didn't get back content we just put!");

				result = getHandle.get(name, SystemConfiguration.NO_TIMEOUT);

				Log.info(Log.FAC_TEST, "Recursive querying for returned name, Got back: " + (result == null ? "0"  : "1") + " results.");

				ContentName parentName = name.parent();
				Log.info(Log.FAC_TEST, "Inserted name's parent same as key name? " + parentName.equals(keyName));

			} else {
				byte [] content = result.content();
				Log.info(Log.FAC_TEST, "Got content: " + result.name());
				Log.info(Log.FAC_TEST, "Original time: " + time + " returned time: " + new Timestamp(new BigInteger(1, content).longValue()));
				Assert.assertNotNull("No content associated with name we just put!", content);
				Assert.assertTrue("didn't get back same data",
						time.equals(new Timestamp(new BigInteger(1, content).longValue())));
			}

			result = getHandle.get(keyName, SystemConfiguration.NO_TIMEOUT);

			Log.info(Log.FAC_TEST, "Querying for inserted name, Got back: "
							+ (result == null ? "0"  : "1") + " results.");

			if (result == null)
				Assert.fail("Didn't get back content we just put!");

			if (SegmentationProfile.segmentRoot(result.name()).equals(name) &&
					time.equals(new Timestamp(new BigInteger(1, result.content()).longValue()))) {
				Log.info(Log.FAC_TEST, "Got back name we inserted.");
			} else {
				Log.warning(Log.FAC_TEST, "Didn't get back data we just inserted:\n  result: " + result.name() +
								" (write time: " + result.signedInfo().getTimestamp() +
								   " content time: " + new Timestamp(new BigInteger(1, result.content()).longValue()) +
										")\n   orig: " + name +
										" (time: " + time + ")");
				Assert.fail("Didn't get back data we just inserted - result name: " +
						SegmentationProfile.segmentRoot(result.name()) +
						", auth: " + result.signedInfo() + " - orig name: " + name + "\n, orig time: " +
						time + " time content: " +
						new Timestamp(new BigInteger(1, result.content()).longValue()));
			}
		} catch (Exception e) {
			System.out.println("Exception in testing recall: " + e.getClass().getName() + ": " + e.getMessage());
			Assert.fail(e.getMessage());
		}
		Log.info(Log.FAC_TEST, "Completed testRecall");
	}

	public void versionTest(ContentName docName,
			byte [] content1,
			byte [] content2) throws Exception {

		CCNWriter writer = new CCNWriter(docName, putHandle);
		ContentName version1 = writer.newVersion(docName, content1);
		Log.info(Log.FAC_TEST, "Inserted first version as: " + version1);
		Assert.assertNotNull("New version is null!", version1);

		ContentVerifier putVerifier = new ContentObject.SimpleVerifier(putHandle.getDefaultPublisher());
		ContentObject latestVersion =
			VersioningProfile.getLatestVersion(docName, null, SystemConfiguration.NO_TIMEOUT, putVerifier, getHandle);
		Assert.assertTrue(latestVersion.verify(getHandle.keyManager()));
		Assert.assertNotNull("Retrieved latest version of " + docName + " got null!", latestVersion);
		Log.info(Log.FAC_TEST, "Latest version name: " + latestVersion.name());

		ContentName version2 =
			writer.newVersion(docName, content2);

		Assert.assertNotNull("New version is null!", version2);
		Log.info(Log.FAC_TEST, "Inserted second version as: " + version2);

		ContentObject newLatestVersion =
			VersioningProfile.getLatestVersion(docName, null, SystemConfiguration.NO_TIMEOUT, putVerifier, getHandle);
		Assert.assertTrue(newLatestVersion.verify(getHandle.keyManager()));
		Assert.assertNotNull("Retrieved new latest version of " + docName + " got null!", newLatestVersion);
		Log.info(Log.FAC_TEST, "Latest version name: " + newLatestVersion.name());

		Assert.assertTrue("Version is not a version of the parent name!", VersioningProfile.isVersionOf(version1, docName));
		Assert.assertTrue("Version is not a version of the parent name!", VersioningProfile.isVersionOf(version2, docName));
		Assert.assertTrue("Version numbers don't increase!", VersioningProfile.getLastVersionAsLong(version2) > VersioningProfile.getLastVersionAsLong(version1));
	}

	@Test
	public void testNotFound() throws Exception {
		Log.info(Log.FAC_TEST, "Starting testNotFound");

		try {
			String key = "/some_strange_key_we_should_never_find";
			ContentObject result = getHandle.get(ContentName.fromNative(key), 1000);
			Assert.assertTrue("found something when there shouldn't have been anything", result == null);
		} catch (Exception e) {
			Log.info(Log.FAC_TEST, "Exception in testing recall: " + e.getClass().getName() + ": " + e.getMessage());
			Assert.fail(e.getMessage());
		}
		Log.info(Log.FAC_TEST, "Completed testNotFound");
	}

	class TestListener extends BasicInterestListener {
		int _count = 0;
		Thread _mainThread;

		public TestListener(CCNBase queryProvider,
				Interest initialInterest,
				Thread mainThread) {
			super(queryProvider);
			_mainThread = mainThread;
		}

		public Interest handleContent(ContentObject co, Interest interest) {
			byte[] content = null;
			try {
				if (null != co) {
						Log.info(Log.FAC_TEST, "handleContent: got " + co.name());

						content = co.content();
						String strContent = new String(content);

						if (VersioningProfile.hasTerminalVersion(co.name())) {
							// We're writing this content using CCNWriter.put. That interface
							// does *not* version content for you, at least at the moment.
							// TODO We need to decide whether we expect it to. So don't require
							// versioning here yet.
							Log.info(Log.FAC_TEST, "Got update for " + co.name() + ": " + strContent +
								" (revision " + VersioningProfile.getLastVersionAsLong(co.name()) + ")");
						} else {
							Log.info(Log.FAC_TEST, "Got update for " + co.name() + ": " + strContent);
						}
						_count++;
						switch(_count) {
						case 1:
							Assert.assertEquals("data1", strContent);
							Log.info(Log.FAC_TEST, "Got data1 back!");
							_mainThread.interrupt();
							break;
						case 2:
							Assert.assertEquals("data2", strContent);
							Log.info(Log.FAC_TEST, "Got data2 back!");
							_mainThread.interrupt();
							break;
						default:
							Assert.fail("Somehow got a third update");
						}
				}
			} catch (VersionMissingException vex) {
				Assert.fail("No version when expecting one -- though be careful to make sure we should have been.");
			}
			return null;
		}
	}

	@Test
	public void testInterest() {
		Log.info(Log.FAC_TEST, "Starting testInterest");

		String key = "/test/interest";
		final Thread mainThread = Thread.currentThread();

		byte[] data1 = "data1".getBytes();
		byte[] data2 = "data2".getBytes();

		try {
			CCNWriter writer = new CCNWriter(key, putHandle);
			Interest ik = new Interest(key);
			TestListener tl = new TestListener(getHandle, ik, mainThread);
			getHandle.expressInterest(ik,
					tl);
			writer.put(ContentName.fromNative(key), data1);
			// wait a little bit before we move on...
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
			}

			writer.put(ContentName.fromNative(key), data2);

			// wait a little bit before we move on...
			try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
			}

			getHandle.cancelInterest(ik, tl);

		} catch (Exception e) {
			Log.warning(Log.FAC_TEST, "Exception in testing interests: " + e.getClass().getName() + ": " + e.getMessage());
			Assert.fail(e.getMessage());
		}
		Log.info(Log.FAC_TEST, "Completed testInterest");
	}

}


text:
<?php

declare(strict_types=1);

namespace Sphp\Html\Scripts;

use Sphp\Html\Tag;

/**
 * Defines an HTML script tag
 *
 * @author  Sami Holck <sami.holck@gmail.com>
 * @license https://opensource.org/licenses/MIT The MIT License
 * @filesource
 */
interface ScriptTag extends Script, Tag {

  /**
   * Sets the value of the type attribute
   *
   * Specifies the MIME type of the script
   *
   * @param  string $type the value of the type attribute (mime-type)
   * @return $this for a fluent interface
   * @link   https://www.w3schools.com/tags/att_script_type.asp type attribute
   */
  public function setType(string $type);
}

redpajama_set_name: RedPajamaGithub


text:
require 'rails/generators'
require 'rails/generators/active_record'

module WulinMaster
  class ScreenAndGridGenerator < ActiveRecord::Generators::Base
    source_root File.expand_path('templates', __dir__)
    argument :attributes, type: :array, default: [], banner: "field:type field:type"
    class_option :model, type: :boolean, default: true, desc: "Create model"
    class_option :migration, type: :boolean, default: true, desc: 'Create migration file for current grid'
    class_option :controller, type: :boolean, default: true, desc: 'Create controller for current grid'
    class_option :routes, type: :boolean, default: true, desc: 'Config routes for current grid'
    class_option :views, type: :boolean, default: true, desc: 'Config views directory for current grid'

    def create_migration_file
      migration_template "grid_migration.rb", "db/migrate/create_#{table_name}.rb" if options.migration?
    end

    def create_controller
      template "controller.rb", "app/controllers/#{table_name}_controller.rb" if options.controller?
    end

    def create_screen
      template "screen.rb", "app/screens/#{underscored_name}_screen.rb"
    end

    def create_grid
      template "grid.rb", "app/grids/#{underscored_name}_grid.rb"
    end

    def create_model
      template "model.rb", "app/models/#{underscored_name}.rb" if options.model?
    end

    def add_route
      route "resources :#{table_name}" if options.routes?
    end

    def create_view_directory
      empty_directory "app/views/#{table_name}" if options.views?
    end

    private

    def underscored_name
      name.underscore.singularize
    end

    def class_name
      name.classify
    end

    def human_name
      name.underscore.humanize.pluralize
    end
  end
end


text:
namespace ymaps.interfaces {

    interface ICopyrightsAccessor extends ICopyrightsProvider {

    }
}


text:
package config // import "github.com/docker/docker/daemon/config"

import (
	"testing"

	"github.com/docker/docker/opts"
	units "github.com/docker/go-units"
	"github.com/spf13/pflag"
	"gotest.tools/v3/assert"
	is "gotest.tools/v3/assert/cmp"
	"gotest.tools/v3/fs"
)

func TestGetConflictFreeConfiguration(t *testing.T) {
	configFileData := `
		{
			"debug": true,
			"default-ulimits": {
				"nofile": {
					"Name": "nofile",
					"Hard": 2048,
					"Soft": 1024
				}
			},
			"log-opts": {
				"tag": "test_tag"
			}
		}`

	file := fs.NewFile(t, "docker-config", fs.WithContent(configFileData))
	defer file.Remove()

	flags := pflag.NewFlagSet("test", pflag.ContinueOnError)
	var debug bool
	flags.BoolVarP(&debug, "debug", "D", false, "")
	flags.Var(opts.NewNamedUlimitOpt("default-ulimits", nil), "default-ulimit", "")
	flags.Var(opts.NewNamedMapOpts("log-opts", nil, nil), "log-opt", "")

	cc, err := getConflictFreeConfiguration(file.Path(), flags)
	assert.NilError(t, err)

	assert.Check(t, cc.Debug)

	expectedUlimits := map[string]*units.Ulimit{
		"nofile": {
			Name: "nofile",
			Hard: 2048,
			Soft: 1024,
		},
	}

	assert.Check(t, is.DeepEqual(expectedUlimits, cc.Ulimits))
}

func TestDaemonConfigurationMerge(t *testing.T) {
	configFileData := `
		{
			"debug": true,
			"default-ulimits": {
				"nofile": {
					"Name": "nofile",
					"Hard": 2048,
					"Soft": 1024
				}
			},
			"log-opts": {
				"tag": "test_tag"
			}
		}`

	file := fs.NewFile(t, "docker-config", fs.WithContent(configFileData))
	defer file.Remove()

	c := &Config{
		CommonConfig: CommonConfig{
			AutoRestart: true,
			LogConfig: LogConfig{
				Type:   "syslog",
				Config: map[string]string{"tag": "test"},
			},
		},
	}

	flags := pflag.NewFlagSet("test", pflag.ContinueOnError)

	var debug bool
	flags.BoolVarP(&debug, "debug", "D", false, "")
	flags.Var(opts.NewNamedUlimitOpt("default-ulimits", nil), "default-ulimit", "")
	flags.Var(opts.NewNamedMapOpts("log-opts", nil, nil), "log-opt", "")

	cc, err := MergeDaemonConfigurations(c, flags, file.Path())
	assert.NilError(t, err)

	assert.Check(t, cc.Debug)
	assert.Check(t, cc.AutoRestart)

	expectedLogConfig := LogConfig{
		Type:   "syslog",
		Config: map[string]string{"tag": "test_tag"},
	}

	assert.Check(t, is.DeepEqual(expectedLogConfig, cc.LogConfig))

	expectedUlimits := map[string]*units.Ulimit{
		"nofile": {
			Name: "nofile",
			Hard: 2048,
			Soft: 1024,
		},
	}

	assert.Check(t, is.DeepEqual(expectedUlimits, cc.Ulimits))
}

func TestDaemonConfigurationMergeShmSize(t *testing.T) {
	data := `{"default-shm-size": "1g"}`

	file := fs.NewFile(t, "docker-config", fs.WithContent(data))
	defer file.Remove()

	c := &Config{}

	flags := pflag.NewFlagSet("test", pflag.ContinueOnError)
	shmSize := opts.MemBytes(DefaultShmSize)
	flags.Var(&shmSize, "default-shm-size", "")

	cc, err := MergeDaemonConfigurations(c, flags, file.Path())
	assert.NilError(t, err)

	expectedValue := 1 * 1024 * 1024 * 1024
	assert.Check(t, is.Equal(int64(expectedValue), cc.ShmSize.Value()))
}


text:
@interface KOViewController ()
@property (nonatomic, strong) KOPopupView *popup;
@end

@implementation KOViewController

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

- (IBAction)showPressed:(id)sender{
    if(!self.popup)
        self.popup = [KOPopupView popupView];
    [self.popup.handleView addSubview:self.alertView];
    self.alertView.center = CGPointMake(self.popup.handleView.frame.size.width/2.0,
                                        self.popup.handleView.frame.size.height/2.0);
    [self.popup show];

}

- (IBAction)hidePressed:(id)sender{
    [self.popup hideAnimated:YES];
}

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration{
    [self.popup willRotateToOrientation:toInterfaceOrientation withDuration:duration];
}

@end


text:
/**
 * style.css
 */

main {
    padding-top: 30px;
}

/**
 * header
 */
header .navbar {
    boder-radius: 0;
}

/**
 * animations
 */
.spinner {
    animation: spin 1s infinite;
    -webkit-animation: spin 1s infinite;
    -moz-animation: spin 1s infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin {
    from { -webkit-transform: rotate(0deg); }
    to { -webkit-transform: rotate(360deg); }
}

@-moz-keyframes spin {
    from { -moz-transform: rotate(0deg); }
    to { -moz-transform: rotate(360deg); }
}

.show-hide-message.ng-hide.remove {
    animation: zoomIn 0.3s both ease;
    -webkit-animation: zoomIn 0.3s both ease;
    -moz-animation: zoomIn 0.3s both ease;
}


text:
package arms

//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.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

// PageBeanInSearchAlertRules is a nested struct in arms response
type PageBeanInSearchAlertRules struct {
	PageNumber int               `json:"PageNumber" xml:"PageNumber"`
	PageSize   int               `json:"PageSize" xml:"PageSize"`
	TotalCount int               `json:"TotalCount" xml:"TotalCount"`
	AlertRules []AlertRuleEntity `json:"AlertRules" xml:"AlertRules"`
}


text:
<!DOCTYPE HTML>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>Jasmine Spec Runner v2.0.0</title>

  <link rel="shortcut icon" type="image/png" href="lib/jasmine-2.0.0/jasmine_favicon.png">
  <link rel="stylesheet" type="text/css" href="lib/jasmine-2.0.0/jasmine.css">

  <script type="text/javascript" src="lib/jasmine-2.0.0/jasmine.js"></script>
  <script type="text/javascript" src="lib/jasmine-2.0.0/jasmine-html.js"></script>
  <script type="text/javascript" src="lib/jasmine-2.0.0/boot.js"></script>

  <!-- include source files here... -->
  <script src="/bower_components/jquery/dist/jquery.min.js"></script>
  <script src="/bower_components/jqueryui/ui/minified/jquery-ui.min.js"></script>
  <script src="/bower_components/twitter/dist/js/bootstrap.min.js"></script>

  <!-- timezone -->
  <script src="/bower_components/timezone-js/src/date.js"></script>
  <script src="/bower_components/angular-tz-extensions/packages/jstimezonedetect/jstz.min.js"></script>
  <!-- rrule -->
  <script src="/bower_components/underscore/underscore.js"></script>
  <script src="/bower_components/rrule/lib/rrule.js"></script>

  <script src="/bower_components/angular/angular.min.js"></script>
  <script src="/bower_components/angular-mocks/angular-mocks.js"></script>
  <script src="/bower_components/angular-route/angular-route.min.js"></script>
  <script src="/bower_components/angular-tz-extensions/lib/angular-tz-extensions.js"></script>
  <script src="/lib/angular-scheduler.js"></script>
  <script src="/app/js/sampleApp.js"></script>

  <!-- include spec files here... -->
  <script type="text/javascript" src="GetRRule.js"></script>

</head>

<body>
</body>
</html>


text:
******************
Create Replica Set
******************

Users may create replica sets to point to their interested sub sets of data at different granularity. They may do so, by
creating a replica set from the scratch, or by duplicating an existing replica set. The created (or duplicated) replica
sets can later be modified by the user.

For the ease of expression, port 9090 is used as an example in all the examples below.

Make sure to replace 9090 above with the correct value as defined in REST_PORT in MEDIator CommonConstants.

Create Replica Set from Scratch
###############################

Replica sets can be created using a POST call following the format of,

/POST

/replicasets

**Sample POST request**

http://localhost:9090/replicasets?iUserID=12&iCollection=TCGA-GBM&iPatientID=TCGA-06-6701%2CTCGA-08-0831&iStudyInstanceUID=1.3.6.1.4.1.14519.5.2.1.4591.4001.151679082681232740021018262895&iSeriesInstanceUID=1.3.6.1.4.1.14519.5.2.1.4591.4001.179004339156422100336233996679

This creates a replica set for the user with the user ID 12, with the given attributes of the images hosted in TCIA.

**Sample POST response**

The expected response of the REST call is the ID of the replica set that was created in the previous replica set
creation POST request.

This is a random generated number.

-4764762120292626164

Duplicate Replica Set
#####################

Instead of creating a replica set from scratch, users may share their replica sets with their friends who may duplicate
the replica set to have it as their own. The POST call for the duplicate replica set follows the format as below,

/POST

/replicaset

**Sample POST request**

http://localhost:9090/replicaset?userID=1234567&replicaSetID=-7196077834010820228

The inputs to this POST method are the ID of the current user who is duplicating the replica set, as well as the ID of
the replica set that has been duplicated by the user.

**Sample POST response**

-5054196249282594410

Similar to the create replica set method above, the duplicate method too returns the ID of the newly created replica set.
This is because the internals of the create and duplicate replica set methods function in a similar way, generating a
replica set with a randomly generated replica set ID.


text: [API-Spec](/api-spec/index.html)


text:
package eu.neclab.iotplatform.ngsi.api.datamodel;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty;

/**
 * Implements UpdateContextElementRequest
 * as defined in the FI-WARE binding of NGSI 9/10.
 */
@XmlRootElement(name = "updateContextElementRequest")
@XmlAccessorType(XmlAccessType.FIELD)
public class UpdateContextElementRequest extends NgsiStructure {

	@XmlElement(name = "attributeDomainName")
	private String attributeDomainName = null;

	@XmlElementWrapper(name = "contextAttributeList")
	@XmlElement(name = "contextAttribute")
	@JsonProperty("attributes")
	private List<ContextAttribute> contextAttribute;

	@XmlElementWrapper(name = "domainMetadata")
	@XmlElement(name = "contextMetadata")
	@JsonProperty("domainMetadata")
	private List<ContextMetadata> contextMetadata;

	public UpdateContextElementRequest() {

	}

	public UpdateContextElementRequest(String attributeDomainName,
			List<ContextAttribute> contextAttributeList,
			List<ContextMetadata> domainMetadata) {
		super();
		this.attributeDomainName = attributeDomainName;
		this.contextAttribute = contextAttributeList;
		this.contextMetadata = domainMetadata;
	}

	public String getAttributeDomainName() {
		return attributeDomainName;
	}

	public void setAttributeDomainName(String attributeDomainName) {
		this.attributeDomainName = attributeDomainName;
	}

	@JsonIgnore
	public List<ContextAttribute> getContextAttributeList() {
		if (contextAttribute == null) {
			contextAttribute = new ArrayList<ContextAttribute>();
		}
		return contextAttribute;
	}

	@JsonIgnore
	public void setContextAttributeList(
			List<ContextAttribute> contextAttributeList) {
		this.contextAttribute = contextAttributeList;
	}

	@JsonIgnore
	public List<ContextMetadata> getDomainMetadata() {
		if (contextMetadata == null) {
			contextMetadata = new ArrayList<ContextMetadata>();
		}
		return contextMetadata;
	}

	@JsonIgnore
	public void setDomainMetadata(List<ContextMetadata> domainMetadata) {
		this.contextMetadata = domainMetadata;
	}

}


text:
package org.dol.encrypt;

public class StrKeyPair {

	public StrKeyPair(
			String publickKey, String privateKey)
	{
		this.setPublicKey(publickKey);
		this.setPrivateKey(privateKey);

	}

	private String publicKey;
	private String privateKey;

	public String getPublicKey() {
		return publicKey;
	}

	public String getPrivateKey() {
		return privateKey;
	}

	private void setPublicKey(String publicKey) {
		this.publicKey = publicKey;
	}

	private void setPrivateKey(String privateKey) {
		this.privateKey = privateKey;
	}

}


text:
using abremir.AllMyBricks.App.Configuration;
using abremir.AllMyBricks.App.Services;
using abremir.AllMyBricks.Platform.Interfaces;
using LightInject;
using Xamarin.Forms;

namespace abremir.AllMyBricks.App
{
    public partial class App : Application
    {

        public App()
        {
            InitializeComponent();

            DependencyService.Register<MockDataStore>();
            MainPage = new AppShell();
        }

        protected override void OnStart()
        {
            var allMyBricksOnboardingUrl = Settings.AllMyBricksOnboardingUrl;

            IoC.Configure(allMyBricksOnboardingUrl);

            ClearThumbnailCacheIfRequired();
        }

        protected override void OnSleep()
        {
            ClearThumbnailCacheIfRequired();
        }

        protected override void OnResume()
        {
        }

        private void ClearThumbnailCacheIfRequired()
        {
            var preferencesService = IoC.IoCContainer.GetInstance<IPreferencesService>();

            if (preferencesService.ClearThumbnailCache)
            {
                var fileSystemService = IoC.IoCContainer.GetInstance<IFileSystemService>();

                if (fileSystemService.ClearThumbnailCache())
                {
                    preferencesService.ClearThumbnailCache = false;
                }
            }
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<Tokens version="1.0">
	<File path="Classes/SBJsonParser.html">

		<Token>
			<TokenIdentifier>//apple_ref/occ/cl/SBJsonParser</TokenIdentifier>
			<Abstract type="html">Parse JSON Strings and NSData objects</Abstract>
			<DeclaredIn>SBJsonParser.h</DeclaredIn>

			<NodeRef refid="1"/>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instm/SBJsonParser/setMaxDepth:</TokenIdentifier>
			<Abstract type="html">The maximum recursing depth.</Abstract>
			<DeclaredIn>SBJsonParser.h</DeclaredIn>

			<Declaration>@property NSUInteger maxDepth</Declaration>

			<Anchor>//api/name/maxDepth</Anchor>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instp/SBJsonParser/maxDepth</TokenIdentifier>
			<Abstract type="html">The maximum recursing depth.</Abstract>
			<DeclaredIn>SBJsonParser.h</DeclaredIn>

			<Declaration>@property NSUInteger maxDepth</Declaration>

			<Anchor>//api/name/maxDepth</Anchor>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instm/SBJsonParser/setError:</TokenIdentifier>
			<Abstract type="html">Description of parse error</Abstract>
			<DeclaredIn>SBJsonParser.h</DeclaredIn>

			<Declaration>@property (copy) NSString *error</Declaration>

			<ReturnValue><Abstract type="html">A string describing the error encountered, or nil if no error occured.</Abstract></ReturnValue>
			<Anchor>//api/name/error</Anchor>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instp/SBJsonParser/error</TokenIdentifier>
			<Abstract type="html">Description of parse error</Abstract>
			<DeclaredIn>SBJsonParser.h</DeclaredIn>

			<Declaration>@property (copy) NSString *error</Declaration>

			<ReturnValue><Abstract type="html">A string describing the error encountered, or nil if no error occured.</Abstract></ReturnValue>
			<Anchor>//api/name/error</Anchor>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instm/SBJsonParser/objectWithData:</TokenIdentifier>
			<Abstract type="html">Return the object represented by the given NSData object.</Abstract>
			<DeclaredIn>SBJsonParser.h</DeclaredIn>

			<Declaration>- (id)objectWithData:(NSData *)data</Declaration>
			<Parameters>
				<Parameter>
					<Name>data</Name>
					<Abstract type="html">An NSData containing UTF8 encoded data to parse.</Abstract>
				</Parameter>
			</Parameters>
			<ReturnValue><Abstract type="html">The NSArray or NSDictionary represented by the object, or nil if an error occured.</Abstract></ReturnValue>
			<Anchor>//api/name/objectWithData:</Anchor>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instm/SBJsonParser/objectWithString:</TokenIdentifier>
			<Abstract type="html">Return the object represented by the given string</Abstract>
			<DeclaredIn>SBJsonParser.h</DeclaredIn>

			<Declaration>- (id)objectWithString:(NSString *)repr</Declaration>

			<ReturnValue><Abstract type="html">The NSArray or NSDictionary represented by the object, or nil if an error occured.</Abstract></ReturnValue>
			<Anchor>//api/name/objectWithString:</Anchor>
		</Token>

		<Token>
			<TokenIdentifier>//apple_ref/occ/instm/SBJsonParser/objectWithString:error:</TokenIdentifier>
			<Abstract type="html">Return the object represented by the given string</Abstract>
			<DeclaredIn>SBJsonParser.h</DeclaredIn>

			<Declaration>- (id)objectWithString:(NSString *)jsonText error:(NSError **)error</Declaration>
			<Parameters>
				<Parameter>
					<Name>jsonText</Name>
					<Abstract type="html">the json string to parse</Abstract>
				</Parameter><Parameter>
					<Name>error</Name>
					<Abstract type="html">pointer to an NSError object to populate on error</Abstract>
				</Parameter>
			</Parameters>
			<ReturnValue><Abstract type="html">The NSArray or NSDictionary represented by the object, or nil if an error occured.</Abstract></ReturnValue>
			<Anchor>//api/name/objectWithString:error:</Anchor>
		</Token>

	</File>
</Tokens>


text:
package org.apache.storm.misc.metric;

import java.io.IOException;
import java.util.Collection;
import java.util.Map;
import java.util.List;
import java.net.ServerSocket;
import java.net.InetAddress;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;

import org.apache.storm.metric.api.IMetricsConsumer.TaskInfo;
import org.apache.storm.metric.api.IMetricsConsumer.DataPoint;

import com.esotericsoftware.kryo.io.Input;
import org.apache.storm.serialization.KryoValuesDeserializer;
import org.apache.storm.utils.Utils;

import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;

/**
 * A server that can listen for metrics from the HttpForwardingMetricsConsumer.
 */
public abstract class HttpForwardingMetricsServer {
    private Map _conf;
    private Server _server = null;
    private int _port = -1;
    private String _url = null;

    ThreadLocal<KryoValuesDeserializer> _des = new ThreadLocal<KryoValuesDeserializer>() {
        @Override
        protected KryoValuesDeserializer initialValue() {
            return new KryoValuesDeserializer(_conf);
        }
    };

    private class MetricsCollectionServlet extends HttpServlet
    {
        protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
        {
            Input in = new Input(request.getInputStream());
            List<Object> metrics = _des.get().deserializeFrom(in);
            handle((TaskInfo)metrics.get(0), (Collection<DataPoint>)metrics.get(1));
            response.setStatus(HttpServletResponse.SC_OK);
        }
    }

    public HttpForwardingMetricsServer(Map<String, Object> conf) {
        _conf = Utils.readStormConfig();
        if (conf != null) {
            _conf.putAll(conf);
        }
    }

    //This needs to be thread safe
    public abstract void handle(TaskInfo taskInfo, Collection<DataPoint> dataPoints);

    public void serve(Integer port) {
        try {
            if (_server != null) throw new RuntimeException("The server is already running");

            if (port == null || port <= 0) {
                ServerSocket s = new ServerSocket(0);
                port = s.getLocalPort();
                s.close();
            }
            _server = new Server(port);
            _port = port;
            _url = "http://"+InetAddress.getLocalHost().getHostName()+":"+_port+"/";

            ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
            context.setContextPath("/");
            _server.setHandler(context);

            context.addServlet(new ServletHolder(new MetricsCollectionServlet()),"/*");

            _server.start();
         } catch (RuntimeException e) {
             throw e;
         } catch (Exception e) {
             throw new RuntimeException(e);
         }
    }

    public void serve() {
        serve(null);
    }

    public int getPort() {
        return _port;
    }

    public String getUrl() {
        return _url;
    }
}


text:
<?php
$files = new scReadDir();

// Test our action.
if (isset($_REQUEST['scAction']) && $files->testAction($_REQUEST['scAction']))
	$files->doAction($_REQUEST['scAction']);
else
{
	if (isset($dir_base_dir))
		$files->setBaseDir($dir_base_dir);
	if (isset($dir))
		$files->setDir($dir);
	if (isset($dir_ignores))
		$files->addIgnore($dir_ignores);
	if (isset($dir_date_string))
		$files->changeDateString($dir_date_string);
	if (isset($dir_order))
		$files->setOrder($dir_order);
	if (isset($dir_order_callback))
		$files->setOrderCallback($dir_order_callback);

	$files->template($files->readDir());
}

/*
 * Read a directory
*/
class scReadDir
{
	private $dir = null;
	private $base_dir = null;
	private $dir_title = '';
	private $ignore_files = array('.', '..', '.DS_Store', 'robots.txt', '.htaccess', 'favicon.ico', 'error_log', '.index.php', '.ftpquota');
	private $date_string = 'M d, y G:i:s';
	private $sort_method = 'krsort';
	private $sort_callback = null;

	/*
	 * Set the defaults, can be adjusted later.
	*/
	public function __construct()
	{
		$this->setBaseDir($_SERVER['DOCUMENT_ROOT']);
		$this->setDir(dirname(__FILE__));
	}

	/*
	 * Test if we are doing a action and its valid.
	 * @param $action string the action to test for.
	*/
	public function testAction($action)
	{
		if
		(
			strpos('.', $action) === false &&
			strpos(':', $action) === false &&
			strpos('/', $action) === false &&
			strpos('http', $action) === false &&
			file_exists('/srv/smf.test/index_files/' . $action . '.php')
		)
			return true;
		else
			return false;
	}

	/*
	 * Do the action, testing should of been done before hand.
	 * @param $action string the action to run.
	*/
	public function doAction($action)
	{
		require_once('/srv/smf.test/index_files/' . $action . '.php');
		exit;
	}

	/*
	 * Set the base directory, usually $_SERVER['DOCUMENT_ROOT'].
	 * @param $base_dir string The base directory.
	*/
	public function setBaseDir($base_dir)
	{
		$this->base_dir = $base_dir;
	}

	/*
	 * Set the base to scan, usually dirname(__FILE__) (of this file).
	 * @param $base_dir string The directory to scan.
	*/
	public function setDir($dir)
	{
		$this->dir = $dir;
		$this->dir_title = str_replace($this->base_dir, '', $dir);
	}

	/*
	 * Add a pattern to the ignore list of files we skip.
	 * @param $files array/string The files we wish to ignore. If this isn't an array it is converted into one.
	*/
	public function addIgnore($files)
	{
		if (!is_array($files))
			$files = array($files);

		$this->ignore_files	= array_merge($files, $this->ignore_files);
	}

	/*
	 * Change the date string we are using.
	 * @param $files string The date string using the format from php.net/date.
	*/
	public function changeDateString($date)
	{
		$this->date_string = $date;
	}

	/*
	 * When using u*sort order methods we need a callback, which can be set here. This has to be set prior to using setOrder method.
	 * @param $callback string The callback function/.
	*/
	public function setOrderCallback($callback)
	{
		if (is_callable($callback))
			$this->sort_callback = $callback;
		else
			$this->sort_callback = null;
	}

	/*
	 * Set a sort order.  Custom functions should set a u*sort method and then a callback.
	 * @param $order string The *sort function to use.
	*/
	public function setOrder($order)
	{
		if (in_array($order, array('ksort', 'krsort', 'rsort', 'sort', 'asort', 'arsort')))
			$this->sort_method = $order;
		elseif (!empty($this->sort_callback) && is_callable($this->sort_callback) && in_array($order, 'usort', 'uksort', 'uasort'))
			$this->sort_method = $order;
		else
			$this->sort_method = 'krsort';
	}

	/*
	 * Actually read a directory. We do not transverse directorys here.
	 * We could use use scandir rather than opendir+readdir, but would still need to loop anyways.
	 * @return array(
	 *			$title String The name of the file with a capital first letter.
	 *			$href String The link to the file, this is relative to make it easier.
	 *			$desc String A Description of the file.
	 * );
	*/
	public function readDir()
	{
		clearstatcache();

		// Prepare for reading.
		$directory_array = array();

		// Open, Read, save.
		$handle = opendir($this->dir);
		while ($file = readdir($handle))
		{
			if (in_array($file, $this->ignore_files))
				continue;

			$modified = date($this->date_string, filemtime($this->dir . '/' . $file));
			$accessed = date($this->date_string, fileatime($this->dir . '/' . $file));

			$directory_array[$file] = array(
				'title' => ucfirst($file),
				'href' => $file,
				'desc' => 'Last Modified: ' . $modified . '

					Last Accessed: ' . $accessed . '
',
			);
		}

		// Sort them.
		$func = $this->sort_method;
		if (!empty($this->sort_callback))
			$func($directory_array, $this->sort_callback);
		elseif (!empty($func))
			$func($directory_array);

		return $directory_array;
	}

	/*
	 * The template we use.
	 * This calls back the scSite class for its header, menu and footer.
	 * @return void No return, however output is executed at this point.
	*/
	public function template($files)
	{
		if (dirname($this->dir . '/../') != $this->base_dir && $this->dir != $this->base_dir)
			scSite::_()->addNavItem('../', 'Return to Previous Directory');

		if ($this->dir . '/../' != $this->base_dir && $this->dir != $this->base_dir)
			scSite::_()->addNavItem('/', 'Return Home');

		scSite::_()->templateHeader();

		echo '

';

		$i = 0;
		foreach ($files as $file)
		{
			if ($i % 3 == 0 && $i != 0)
				echo '

';

			echo '

', $file['title'], '

', $file['desc'] ,'

';

			++$i;
		}

		echo '

';

		scSite::_()->templateFooter();
	}
}


text:
package cofh.api.transport;

interface IEnderAttuned {

	public String getChannelString();

	public int getFrequency();

	public boolean setFrequency(int frequency);

	public boolean clearFrequency();

}


text:
package com.o19s.es.ltr.utils;

@FunctionalInterface
public interface CheckedBiFunction<T, U, R, E extends Exception> {
    R apply(T var1, U var2) throws E;
}


text:
using OceanChip.Common.Components;
using OceanChip.Common.Remoting;
using OceanChip.Common.Serializing;
using OceanChip.Queue.Protocols.Brokers.Requests;
using OceanChip.Queue.Protocols.NameServers.Requests;
using OceanChip.Queue.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OceanChip.Queue.NameServer.RequestHandlers
{
    public class RegisterBrokerRequestHandler:AbstractRequestHandler<BrokerRegistrationRequest>
    {

        public RegisterBrokerRequestHandler(NameServerController nameServerController)
            :base(nameServerController)
        {
        }

        protected override byte[] Process(IRequestHandlerContext context,BrokerRegistrationRequest request)
        {
            _nameServerController.ClusterManager.RegisterBroker(context.Connection, request);
            return EmptyBytes;
        }
    }
}


text:
import { ShaderSource } from "../../Source/Cesium.js";

describe("Renderer/ShaderSource", function () {
  var mockContext = {
    webgl2: false,
  };

  it("combines #defines", function () {
    var source = new ShaderSource({
      defines: ["A", "B", ""],
    });

    var shaderText = source.createCombinedVertexShader(mockContext);
    expect(shaderText).toContain("#define A");
    expect(shaderText).toContain("#define B");
    expect(shaderText.match(/#define/g).length).toEqual(2);
  });

  it("combines sources", function () {
    var source = new ShaderSource({
      sources: ["void func() {}", "void main() {}"],
    });
    var shaderText = source.createCombinedVertexShader(mockContext);
    expect(shaderText).toContain("#line 0\nvoid func() {}");
    expect(shaderText).toContain("#line 0\nvoid main() {}");
  });

  it("combines #defines and sources", function () {
    var source = new ShaderSource({
      defines: ["A", "B", ""],
      sources: ["void func() {}", "void main() {}"],
    });
    var shaderText = source.createCombinedVertexShader(mockContext);
    expect(shaderText).toContain("#define A");
    expect(shaderText).toContain("#define B");
    expect(shaderText.match(/#define/g).length).toEqual(2);
    expect(shaderText).toContain("#line 0\nvoid func() {}");
    expect(shaderText).toContain("#line 0\nvoid main() {}");
  });

  it("creates a pick shader with a uniform", function () {
    var source = new ShaderSource({
      sources: ["void main() { gl_FragColor = vec4(1.0); }"],
      pickColorQualifier: "uniform",
    });
    var shaderText = source.createCombinedVertexShader(mockContext);
    expect(shaderText).toContain("uniform vec4 czm_pickColor;");
    expect(shaderText).toContain("gl_FragColor = czm_pickColor;");
  });

  it("creates a pick shader with a varying", function () {
    var source = new ShaderSource({
      sources: ["void main() { gl_FragColor = vec4(1.0); }"],
      pickColorQualifier: "varying",
    });
    var shaderText = source.createCombinedVertexShader(mockContext);
    expect(shaderText).toContain("varying vec4 czm_pickColor;");
    expect(shaderText).toContain("gl_FragColor = czm_pickColor;");
  });

  it("throws with invalid qualifier", function () {
    expect(function () {
      return new ShaderSource({
        pickColorQualifier: "const",
      });
    }).toThrowDeveloperError();
  });

  it("combines #version to shader", function () {
    var source = new ShaderSource({
      sources: ["#version 300 es\nvoid main() {gl_FragColor = vec4(1.0); }"],
    });
    var shaderText = source.createCombinedVertexShader(mockContext);
    expect(shaderText).toStartWith("#version 300 es\n");
  });

  it("clones", function () {
    var source = new ShaderSource({
      defines: ["A"],
      sources: ["void main() { gl_FragColor = vec4(1.0); }"],
      pickColorQualifier: "varying",
      includeBuiltIns: false,
    });
    var clone = source.clone();
    expect(clone.defines).toBeDefined();
    expect(clone.defines.length).toEqual(1);
    expect(clone.defines[0]).toEqual(source.defines[0]);
    expect(clone.sources).toBeDefined();
    expect(clone.sources.length).toEqual(1);
    expect(clone.sources[0]).toEqual(source.sources[0]);
    expect(clone.pickColorQualifier).toEqual(source.pickColorQualifier);
    expect(clone.includeBuiltIns).toEqual(source.includeBuiltIns);
  });
});


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
	<maintainer type="person">
		<email>joseph.brendler@gmail.comm</email>
		<name>Joe Brendler</name>
	</maintainer>
	<upstream>
		<remote-id type="github">RPi-Distro/firmware-nonfree</remote-id>
	</upstream>
	<use>
		<flag name="43455-fix">Use RPF's brcmfmac43455-sdio.bin in /lib/firmware/brcm.</flag>
	</use>
	<longdescription>
		Adds text files that are necessary for
                operation of the RPi3 and RPi4's integrated WiFi,
                plus an additional clm blob.  (Adapted from work
		abandoned by sakaki)
	</longdescription>
</pkgmetadata>


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

         name: update.pl
  description: uses ADL = algorithm definition language

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

/*========================================================================
     Module Declaration
========================================================================*/

:- module(update,[update/0]).

:- use_module(library(tis_access)).
:- use_module(library(tis_operators)).

/*========================================================================
     Load rules
========================================================================*/

:- ensure_loaded(library(update_rules)).

/*========================================================================
     Load the ADL interpreter
========================================================================*/

:- ensure_loaded(library(dme_adl)).

/*========================================================================
   The update algorithm
========================================================================*/

update_algorithm( [
		   if not ($latest_moves == failed)
		   then [
			getLatestMoves,
			try backupSharedUsr,
			try irrelevantFollowup,
			try noFollowup,
			repeat(
			       [ repeat
			           ( [ integrate,
				     try downdate_issues,
				     try removeFindout,
				     try load_plan ]
              		            orelse apply shift( /private/nim ) )
			         until fully_shifted( $/private/nim ),
				 apply shift( /private/nim ),
				 try select_action,
				 accommodate, try retract
			       ] ),
			apply cancel_shift( /private/nim ),
			repeat exec_plan,
			try downdate_qud,
			repeat downdate_issues,
			repeat exec_plan,
			repeat removeYesNo %SL021125
		       ]
		  else
		  [ ( failedFollowup orelse try unclearFollowup ),
		    try noContact, %DH 031201
		    apply clear( /shared/lu/moves ) ] % this really needed???
		  ] ).

/*========================================================================
   Main predicate
========================================================================*/

update :-
	update_algorithm( Algorithm ),
	adl_exec( Algorithm ).


text:
@interface JobOrEduListViewController : UIViewController

@property (nonatomic, assign) BOOL isJob;
@property (nonatomic, strong) ProfileInfo *profileInfo;

@end


text:
<?php

namespace Zend\I18n\Translator;

use Zend\I18n\Exception;
use Zend\ServiceManager\AbstractPluginManager;

/**
 * Plugin manager implementation for translation loaders.
 *
 * Enforces that loaders retrieved are either instances of
 * Loader\FileLoaderInterface or Loader\RemoteLoaderInterface. Additionally,
 * it registers a number of default loaders.
 */
class LoaderPluginManager extends AbstractPluginManager
{
    /**
     * Default set of loaders.
     *
     * @var array
     */
    protected $invokableClasses = array(
        'gettext'  => 'Zend\I18n\Translator\Loader\Gettext',
        'ini'      => 'Zend\I18n\Translator\Loader\Ini',
        'phparray' => 'Zend\I18n\Translator\Loader\PhpArray',
    );

    /**
     * Validate the plugin.
     *
     * Checks that the filter loaded is an instance of
     * Loader\FileLoaderInterface or Loader\RemoteLoaderInterface.
     *
     * @param  mixed $plugin
     * @return void
     * @throws Exception\RuntimeException if invalid
     */
    public function validatePlugin($plugin)
    {
        if ($plugin instanceof Loader\FileLoaderInterface || $plugin instanceof Loader\RemoteLoaderInterface) {
            // we're okay
            return;
        }

        throw new Exception\RuntimeException(sprintf(
            'Plugin of type %s is invalid; must implement %s\Loader\FileLoaderInterface or %s\Loader\RemoteLoaderInterface',
            (is_object($plugin) ? get_class($plugin) : gettype($plugin)),
            __NAMESPACE__
        ));
    }
}


text:
Imports System.Reflection
Imports ExcelDna.Registration
Imports ExcelDna.Registration.VisualBasic

Friend Module RegistrationHelper

    Sub PerformRegistration(assemblies As IEnumerable(Of Assembly))

        Dim conversionConfig As ParameterConversionConfiguration
        conversionConfig = New ParameterConversionConfiguration() _
                            .AddParameterConversion(ParameterConversions.GetOptionalConversion(treatEmptyAsMissing:=False)) _
                            .AddParameterConversion(AddressOf RangeParameterConversion.ParameterConversion, Nothing)

        GetAllPublicSharedFunctions(assemblies) _
        .ProcessParamsRegistrations() _
        .UpdateRegistrationsForRangeParameters() _
        .ProcessParameterConversions(conversionConfig) _
        .RegisterFunctions()

        GetAllPublicSharedSubs(assemblies).RegisterCommands()
    End Sub

    ' Gets the Public Shared methods that don't return Void
    Private Function GetAllPublicSharedFunctions(assemblies As IEnumerable(Of Assembly)) As IEnumerable(Of ExcelFunctionRegistration)
        Return From ass In assemblies
               From typ In ass.GetTypes()
               Where Not typ.FullName.Contains(".My.") AndAlso typ.IsPublic
               From mi In typ.GetMethods(BindingFlags.Public Or BindingFlags.Static)
               Where Not mi.ReturnType = GetType(Void)
               Select New ExcelFunctionRegistration(mi)
    End Function

    ' Gets the Public Shared methods that return Void
    Private Function GetAllPublicSharedSubs(assemblies As IEnumerable(Of Assembly)) As IEnumerable(Of ExcelCommandRegistration)
        Return From ass In assemblies
               From typ In ass.GetTypes()
               Where Not typ.FullName.Contains(".My.") AndAlso typ.IsPublic
               From mi In typ.GetMethods(BindingFlags.Public Or BindingFlags.Static)
               Where mi.ReturnType = GetType(Void)
               Select New ExcelCommandRegistration(mi)
    End Function

End Module


text:
<?php

namespace MicrodataDOM;

class DOMDocument extends \DOMDocument
{
    /**
     * @var DOMXPath
     */
    protected $xpath;

    /**
     * {@inheritDoc}
     */
    public function __construct($version = null, $encoding = null)
    {
        parent::__construct($version, $encoding);

        $this->registerNodeClass('DOMDocument', __CLASS__);
        $this->registerNodeClass('DOMElement', 'MicrodataDOM\\DOMElement');
    }

    /**
     * Return all, top-level microdata items whose types include all the types specified, or, if no types are specified,
     * all, top-level microdata items.
     *
     * @param array|string $typeNames
     * @return \DOMNodeList
     * @throws \InvalidArgumentException
     */
    public function getItems($typeNames = [])
    {
        if (is_array($typeNames)) {
            $types = $typeNames;
        } elseif (is_string($typeNames)) {
            $types = preg_split('/\s+/', trim($typeNames));
        } else {
            throw new \InvalidArgumentException('Expected array or string for argument 1');
        }

        $xpathQuery = implode(
            ' and ',
            array_map(
                function ($type) {
                    return 'contains(concat(" ", normalize-space(@itemtype), " "), " ' . htmlspecialchars(trim($type)) . ' ")';
                },
                $types
            )
        );

        return $this->xpathQuery('//*[@itemscope and not(@itemprop)' . ($xpathQuery ? ' and (' . $xpathQuery . ')' : '') . ']');
    }

    /**
     * Return an array of all microdata items in a Microdata JSON structure.
     *
     * @see http://www.w3.org/TR/microdata/#json
     * @return mixed[string]
     */
    public function toArray()
    {
        $results = [];

        foreach ($this->getItems() as $item) {
            $results['items'][] = $item->toArray();
        }

        return $results;
    }

    /**
     * Execute an XPath query against the document and, optionally, within a specific node.
     *
     * @internal
     * @param string $expression
     * @param \DOMNode $contextnode
     * @return type
     */
    public function xpathQuery($expression, \DOMNode $contextnode = null)
    {
        if (null === $this->xpath) {
            $this->xpath = new \DOMXpath($this);
        }

        return $this->xpath->query($expression, $contextnode);
    }

    /**
     * Attempt to convert possibly-relative URLs into an absolute URL based on the document context.
     *
     * @internal
     * @param string $url
     * @return string
     */
    public function makeAbsoluteUrl($url)
    {
        if (null !== parse_url($url, PHP_URL_SCHEME)) {
            return $url;
        } elseif (null === $this->documentURI) {
            return $url;
        }

        $base = parse_url($this->documentURI);

        if ('//' == substr($url, 0, 2)) {
            return $base['scheme'] . ':' . $url;
        }

        $basepartial = $base['scheme'] . '://' . $base['host'] . (!empty($base['port']) ? (':' . $base['port']) : '');

        if ('' == $url) {
            return $this->documentURI;
        } elseif ('/' == $url[0]) {
            return $basepartial . $url;
        } elseif ('#' == $url[0]) {
            return $basepartial . $base['path'] . (!empty($base['query']) ? ('?' . $base['query']) : '') . $url;
        } elseif ('?' == $url[0]) {
            return $basepartial . $base['path'] . $url;
        } elseif ('/' == substr($base['path'], -1)) {
            return $basepartial . $base['path'] . $url;
        }

        return $basepartial . dirname($base['path']) . '/' . $url;
    }
}


text:
ConnectStateManager::ConnectStateManager(Connect* newConnectGame) : currentState(NULL), connectGame(newConnectGame) {
    setState(getCanDropState());
}

void ConnectStateManager::onClick(int x, int y, PlayerManager* players, Board* board) {
    currentState->onClick(x, y, players, board);
}

void ConnectStateManager::onMouseMove(int x, int y, Board* board, Color& playersCurrentColor) {
    currentState->onMouseMove(x, y, board, playersCurrentColor);
}

void ConnectStateManager::update(Timer* countdown, const unsigned moveTimeLimit, const unsigned switchPlayerTimeLimit, Board* board) {
    currentState->update(countdown, moveTimeLimit, switchPlayerTimeLimit, board);
}

void ConnectStateManager::draw(SpriteManager* sprites, Player* currentPlayer, PlayerIndicator* playerIndicator, Timer* countdown, const Position countdownPosition) {
    currentState->draw(sprites, currentPlayer, playerIndicator, countdown, countdownPosition);
}

bool ConnectStateManager::gameOver() const {
    return currentState->gameOver();
}

void ConnectStateManager::rotateTurns() {
   connectGame->rotateTurns();
}

void ConnectStateManager::setState(ConnectState* newState) {
    if (currentState) {
        delete currentState;
        currentState = NULL;
    }
    currentState = newState;
}

ConnectState* ConnectStateManager::getCanDropState() {
    return new CanDropCheckerState(this);
}

ConnectState* ConnectStateManager::getCantDropState() {
    return new CantDropCheckerState(this);
}

ConnectState* ConnectStateManager::getResettingState() {
    return new ResettingState(this);
}
ConnectState* ConnectStateManager::getGameOverState() {
    return new GameOverState(this);
}


text:
public class SuperCondo implements Condo{

   public String getCondoInfo(){
      return "superCondo.html";
   }
}


text:
<resources
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <style name="SkeletonTheme" parent="@style/_SkeletonTheme" />

    <style name="_SkeletonTheme" parent="@style/Theme.MaterialComponents.Light.NoActionBar" tools:ignore="ResourceName">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="colorPrimary">@color/primaryColor</item>
        <item name="colorAccent">@color/accentColor</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowBackground">@color/contentBackgroundColor</item>
        <item name="android:scrollingCache">false</item>
        <item name="android:listViewStyle">@style/SkeletonTheme.ListViewStyle</item>
        <item name="android:listSeparatorTextViewStyle">@style/SkeletonTheme.ListSeparatorTextViewStyle</item>
        <item name="android:imageButtonStyle">@style/SkeletonTheme.ImageButtonStyle</item>
        <item name="buttonStyle">@style/SkeletonTheme.ButtonStyle</item>
        <item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>

        <item name="textAppearanceHeadline1">@style/TextAppearance.MaterialComponents.Headline1</item>
        <item name="textAppearanceHeadline2">@style/TextAppearance.MaterialComponents.Headline2</item>
        <item name="textAppearanceHeadline3">@style/TextAppearance.MaterialComponents.Headline3</item>
        <item name="textAppearanceHeadline4">@style/TextAppearance.MaterialComponents.Headline4</item>
        <item name="textAppearanceHeadline5">@style/TextAppearance.MaterialComponents.Headline5</item>
        <item name="textAppearanceHeadline6">@style/TextAppearance.MaterialComponents.Headline6</item>
        <item name="textAppearanceSubtitle1">@style/TextAppearance.MaterialComponents.Subtitle1</item>
        <item name="textAppearanceSubtitle2">@style/TextAppearance.MaterialComponents.Subtitle2</item>
        <item name="textAppearanceBody1">@style/TextAppearance.MaterialComponents.Body1</item>
        <item name="textAppearanceBody2">@style/TextAppearance.MaterialComponents.Body2</item>
        <item name="textAppearanceCaption">@style/TextAppearance.MaterialComponents.Caption</item>
        <item name="textAppearanceButton">@style/TextAppearance.MaterialComponents.Button</item>
        <item name="textAppearanceOverline">@style/TextAppearance.MaterialComponents.Overline</item>
    </style>

    <style name="SkeletonTheme.Toolbar" parent="ThemeOverlay.MaterialComponents.Dark.ActionBar" />
    <style name="SkeletonTheme.Toolbar.Overlay" parent="@style/SkeletonTheme.Toolbar">
        <item name="android:windowActionBarOverlay">true</item>
        <item name="windowActionBarOverlay">true</item>
    </style>
    <style name="SkeletonTheme.Toolbar.Popup" parent="@style/ThemeOverlay.MaterialComponents.Light" />

</resources>


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center_vertical"
    android:minHeight="?android:attr/listPreferredItemHeight"
    android:orientation="vertical"
    android:paddingBottom="@dimen/list_entry_padding_vertical"
    android:paddingLeft="@dimen/list_entry_padding_horizontal"
    android:paddingRight="@dimen/list_entry_padding_horizontal"
    android:paddingTop="@dimen/list_entry_padding_vertical" >

    <TextView
        android:id="@+id/wallet_import_keys_file_row_filename"
        android:layout_width="match_parent"
        android:layout_height="wrap_content" />

    <TextView
        android:id="@+id/wallet_import_keys_file_row_security"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textColor="@color/fg_less_significant" />

    <TextView
        android:id="@+id/wallet_import_keys_file_row_created"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textColor="@color/fg_less_significant" />

</LinearLayout>


text:
package com.dci.intellij.dbn.object;

import com.dci.intellij.dbn.object.common.DBSchemaObject;
import com.dci.intellij.dbn.object.identifier.DBMethodIdentifier;

import java.util.List;

public interface DBMethod extends DBSchemaObject {
    DBMethodIdentifier getIdentifier();
    List<DBArgument> getArguments();
    DBArgument getArgument(String name);
    DBProgram getProgram();
    String getMethodType();
    int getOverload();
    boolean isEmbedded();
    boolean isDeterministic();
    boolean hasDeclaredArguments();
}


text:
package org.apache.ignite.util;

import java.io.Serializable;
import java.util.Set;
import org.apache.ignite.Ignite;
import org.apache.ignite.internal.IgniteEx;
import org.apache.ignite.internal.processors.configuration.distributed.DistributedChangeableProperty;
import org.apache.ignite.internal.processors.configuration.distributed.SimpleDistributedProperty;
import org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing;
import org.apache.ignite.internal.util.typedef.G;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import static org.apache.ignite.internal.commandline.CommandHandler.EXIT_CODE_INVALID_ARGUMENTS;
import static org.apache.ignite.internal.commandline.CommandHandler.EXIT_CODE_OK;
import static org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.DFLT_PDS_WAL_REBALANCE_THRESHOLD;
import static org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager.HISTORICAL_REBALANCE_THRESHOLD_DMS_KEY;
import static org.apache.ignite.testframework.GridTestUtils.assertContains;

/**
 * Checks command line property commands.
 */
public class GridCommandHandlerPropertiesTest extends GridCommandHandlerClusterByClassAbstractTest {
    /** */
    @Before
    public void init() {
        injectTestSystemOut();
    }

    /** */
    @After
    public void clear() {
    }

    /**
     * Check the command '--property help'.
     * Steps:
     */
    @Test
    public void testHelp() {
        assertEquals(EXIT_CODE_OK, execute("--property", "help"));

        String out = testOut.toString();

        assertContains(log, out, "Print property command help:");
        assertContains(log, out, "control.(sh|bat) --property help");

        assertContains(log, out, "Print list of available properties:");
        assertContains(log, out, "control.(sh|bat) --property list");

        assertContains(log, out, "Get the property value:");
        assertContains(log, out, "control.(sh|bat) --property get --name <property_name>");

        assertContains(log, out, "Set the property value:");
        assertContains(log, out, "control.(sh|bat) --property set --name <property_name> --val <property_value>");
    }

    /**
     * Check the command '--property list'.
     * Steps:
     */
    @Test
    public void testList() {
        assertEquals(EXIT_CODE_OK, execute("--property", "list"));

        String out = testOut.toString();

        for (DistributedChangeableProperty<Serializable> pd : crd.context()
            .distributedConfiguration().properties())
            assertContains(log, out, pd.getName());
    }

    /**
     * Check the command '--property get'.
     * Steps:
     */
    @Test
    public void testGet() {
        for (DistributedChangeableProperty<Serializable> pd : crd.context()
            .distributedConfiguration().properties()) {
            assertEquals(EXIT_CODE_OK, execute("--property", "get", "--name", pd.getName()));
            String out = testOut.toString();

            assertContains(log, out, pd.getName() + " = " + pd.get());
        }
    }

    /**
     * Check the set command fro property 'sql.disabledFunctions'.
     * Steps:
     */
    @Test
    public void testPropertyDisabledSqlFunctions() {
        assertEquals(
            EXIT_CODE_OK,
            execute(
                "--property", "set",
                "--name", "sql.disabledFunctions",
                "--val", "LENGTH, SESSION_ID"
            )
        );

        for (Ignite ign : G.allGrids()) {
            Set<String> disabledFuncs = ((IgniteH2Indexing)((IgniteEx)ign).context().query().getIndexing())
                .distributedConfiguration().disabledFunctions();

            assertEquals(2, disabledFuncs.size());

            assertTrue(disabledFuncs.contains("LENGTH"));
            assertTrue(disabledFuncs.contains("SESSION_ID"));
        }
    }

    /**
     * Checks the set command for property 'checkpoint.deviation'.
     */
    @Test
    public void testPropertyCheckpointDeviation() {
        for (Ignite ign : G.allGrids()) {
            if (ign.configuration().isClientMode())
                continue;

            SimpleDistributedProperty<Integer> cpFreqDeviation = U.field(((IgniteEx)ign).context().cache().context().database(),
                "cpFreqDeviation");

            assertNull(cpFreqDeviation.get());
        }

        assertEquals(
            EXIT_CODE_OK,
            execute(
                "--property", "set",
                "--name", "checkpoint.deviation",
                "--val", "20"
            )
        );

        for (Ignite ign : G.allGrids()) {
            if (ign.configuration().isClientMode())
                continue;

            SimpleDistributedProperty<Integer> cpFreqDeviation = U.field(((IgniteEx)ign).context().cache().context().database(),
                "cpFreqDeviation");

            assertNotNull(cpFreqDeviation.get());

            assertEquals(20, cpFreqDeviation.get().intValue());
        }
    }

    /**
     * Check the set command fro property 'sql.defaultQueryTimeout'.
     * Steps:
     */
    @Test
    public void testPropertyDefaultQueryTimeout() {
        int dfltVal = ((IgniteH2Indexing)crd.context().query().getIndexing())
            .distributedConfiguration().defaultQueryTimeout();

        int newVal = dfltVal + 1000;

        assertEquals(EXIT_CODE_OK, execute("--property", "set", "--name", "sql.defaultQueryTimeout", "--val",
            Integer.toString(newVal)));

        for (Ignite ign : G.allGrids()) {
            assertEquals(
                "Invalid default query timeout on node: " + ign.name(),
                newVal,
                ((IgniteH2Indexing)((IgniteEx)ign).context().query().getIndexing())
                    .distributedConfiguration().defaultQueryTimeout()
            );
        }

        assertEquals(
            EXIT_CODE_INVALID_ARGUMENTS,
            execute(
                "--property", "set",
                "--name", "sql.defaultQueryTimeout",
                "--val", "invalidVal"
            )
        );
    }

    /**
     * Check the set command for property 'history.rebalance.threshold'.
     */
    @Test
    public void testPropertyWalRebalanceThreshold() {
        assertDistributedPropertyEquals(HISTORICAL_REBALANCE_THRESHOLD_DMS_KEY, DFLT_PDS_WAL_REBALANCE_THRESHOLD);

        int newVal = DFLT_PDS_WAL_REBALANCE_THRESHOLD * 2;

        assertEquals(
                EXIT_CODE_OK,
                execute(
                        "--property", "set",
                        "--name", HISTORICAL_REBALANCE_THRESHOLD_DMS_KEY,
                        "--val", Integer.toString(newVal)
                )
        );

        assertDistributedPropertyEquals(HISTORICAL_REBALANCE_THRESHOLD_DMS_KEY, newVal);
    }

    /**
     * Validates that distributed property has specified value across all nodes.
     *
     * @param propName Distributed property name.
     * @param expected Expected property value.
     * @param <T> Property type.
     */
    private <T extends Serializable> void assertDistributedPropertyEquals(String propName, T expected) {
        for (Ignite ign : G.allGrids()) {
            IgniteEx ignEx = (IgniteEx) ign;

            if (ign.configuration().isClientMode())
                continue;

            DistributedChangeableProperty<Serializable> prop =
                    ignEx.context().distributedConfiguration().property(propName);

            assertEquals(
                "Validation has failed on the cluster node [name=" + ign.configuration().getIgniteInstanceName(),
                prop.get(),
                expected);
        }
    }
}


text:
begin
  # We expect this to work once Puppet supports Rubygems in #7788
  require "puppet_x/puppetlabs/registry"
  require "puppet_x/puppetlabs/registry/provider_base"
rescue LoadError => detail
  # Work around #7788 (Rubygems support for modules)
  require 'pathname' # JJM WORK_AROUND #14073
  module_base = Pathname.new(__FILE__).dirname
  require module_base + "../../../" + "puppet_x/puppetlabs/registry"
  require module_base + "../../../" + "puppet_x/puppetlabs/registry/provider_base"
end

Puppet::Type.type(:registry_key).provide(:registry) do
  include PuppetX::Puppetlabs::Registry::ProviderBase

  defaultfor :operatingsystem => :windows
  confine    :operatingsystem => :windows

  def self.instances
    hkeys.keys.collect do |hkey|
      new(:provider => :registry, :name => "#{hkey.to_s}")
    end
  end

  def create
    Puppet.debug("Creating registry key #{self}")
    hive.create(subkey, Win32::Registry::KEY_ALL_ACCESS | access) {|reg| true }
  end

  def exists?
    Puppet.debug("Checking existence of registry key #{self}")
    !!hive.open(subkey, Win32::Registry::KEY_READ | access) {|reg| true } rescue false
  end

  def destroy
    Puppet.debug("Destroying registry key #{self}")

    raise ArgumentError, "Cannot delete root key: #{path}" unless subkey
    reg_delete_key_ex = Win32API.new('advapi32', 'RegDeleteKeyEx', 'LPLL', 'L')

    # hive.hkey returns an integer value that's like a FD
    if reg_delete_key_ex.call(hive.hkey, subkey, access, 0) != 0
      raise "Failed to delete registry key: #{self}"
    end
  end

  def values
    names = []
    # Only try and get the values for this key if the key itself exists.
    if exists? then
      hive.open(subkey, Win32::Registry::KEY_READ | access) do |reg|
        reg.each_value do |name, type, data| names << name end
      end
    end
    names
  end

  private

  def path
    @path ||= PuppetX::Puppetlabs::Registry::RegistryKeyPath.new(resource.parameter(:path).value)
  end
end


text:
databag_params = search( :node,	"name:#{node.name}" )

unless databag_params.nil?
	databag_params.each do |data|
		node.consume_attributes( data.to_hash )
	end
end


text:
import {
    action,
    ObservableMap,
    IComputedValue,
    observable,
    isObservableObject,
    isObservableArray,
    isObservableMap,
    isComputedProp,
    isComputed,
    computed,
    keys,
    _getAdministration,
    $mobx,
    makeObservable,
} from "mobx"
import { ComputedValue } from "mobx/dist/internal"
import { invariant, getAllMethodsAndProperties } from "./utils"

export interface IViewModel<T> {
    model: T
    reset(): void
    submit(): void
    isDirty: boolean
    changedValues: Map<keyof T, T[keyof T]>
    isPropertyDirty(key: keyof T): boolean
    resetProperty(key: keyof T): void
}

const RESERVED_NAMES = ["model", "reset", "submit", "isDirty", "isPropertyDirty", "resetProperty"]

export class ViewModel<T> implements IViewModel<T> {
    localValues: ObservableMap<keyof T, T[keyof T]> = observable.map({})
    localComputedValues: ObservableMap<keyof T, IComputedValue<T[keyof T]>> = observable.map({})

    @computed
    get isDirty() {
        return this.localValues.size > 0
    }

    @computed
    get changedValues() {
        return new Map(this.localValues)
    }

    constructor(public model: T) {
        makeObservable(this)
        invariant(isObservableObject(model), "createViewModel expects an observable object")
        const ownMethodsAndProperties = getAllMethodsAndProperties(this)

        // use this helper as Object.getOwnPropertyNames doesn't return getters
        getAllMethodsAndProperties(model).forEach((key: any) => {
            if (ownMethodsAndProperties.includes(key)) {
                return
            }
            if (key === ($mobx as any) || key === "__mobxDidRunLazyInitializers") {
                return
            }
            invariant(
                RESERVED_NAMES.indexOf(key) === -1,
                `The propertyname ${key} is reserved and cannot be used with viewModels`
            )
            if (isComputedProp(model, key)) {
                const computedBox = _getAdministration(model, key) as ComputedValue<T[keyof T]> // Fixme: there is no clear api to get the derivation
                const get = computedBox.derivation.bind(this)
                const set = computedBox.setter_?.bind(this)
                this.localComputedValues.set(key, computed(get, { set }))
            }

            const descriptor = Object.getOwnPropertyDescriptor(model, key)
            const additionalDescriptor = descriptor ? { enumerable: descriptor.enumerable } : {}

            Object.defineProperty(this, key, {
                ...additionalDescriptor,
                configurable: true,
                get: () => {
                    if (isComputedProp(model, key)) return this.localComputedValues.get(key)!.get()
                    if (this.isPropertyDirty(key)) return this.localValues.get(key)
                    else return this.model[key as keyof T]
                },
                set: action((value: any) => {
                    if (isComputedProp(model, key)) {
                        this.localComputedValues.get(key)!.set(value)
                    } else if (value !== this.model[key as keyof T]) {
                        this.localValues.set(key, value)
                    } else {
                        this.localValues.delete(key)
                    }
                }),
            })
        })
    }

    isPropertyDirty = (key: keyof T): boolean => {
        return this.localValues.has(key)
    }

    @action.bound
    submit() {
        keys(this.localValues).forEach((key: keyof T) => {
            const source = this.localValues.get(key)!
            const destination = this.model[key]
            if (isObservableArray(destination)) {
                destination.replace(source as any)
            } else if (isObservableMap(destination)) {
                destination.clear()
                destination.merge(source)
            } else if (!isComputed(source)) {
                this.model[key] = source
            }
        })
        this.localValues.clear()
    }

    @action.bound
    reset() {
        this.localValues.clear()
    }

    @action.bound
    resetProperty(key: keyof T) {
        this.localValues.delete(key)
    }
}

/**
 * `createViewModel` takes an object with observable properties (model)
 * and wraps a viewmodel around it. The viewmodel proxies all enumerable properties of the original model with the following behavior:
 *  - as long as no new value has been assigned to the viewmodel property, the original property will be returned.
 *  - any future change in the model will be visible in the viewmodel as well unless the viewmodel property was dirty at the time of the attempted change.
 *  - once a new value has been assigned to a property of the viewmodel, that value will be returned during a read of that property in the future. However, the original model remain untouched until `submit()` is called.
 *
 * The viewmodel exposes the following additional methods, besides all the enumerable properties of the model:
 * - `submit()`: copies all the values of the viewmodel to the model and resets the state
 * - `reset()`: resets the state of the viewmodel, abandoning all local modifications
 * - `resetProperty(propName)`: resets the specified property of the viewmodel
 * - `isDirty`: observable property indicating if the viewModel contains any modifications
 * - `isPropertyDirty(propName)`: returns true if the specified property is dirty
 * - `changedValues`: returns a key / value map with the properties that have been changed in the model so far
 * - `model`: The original model object for which this viewModel was created
 *
 * You may use observable arrays, maps and objects with `createViewModel` but keep in mind to assign fresh instances of those to the viewmodel's properties, otherwise you would end up modifying the properties of the original model.
 * Note that if you read a non-dirty property, viewmodel only proxies the read to the model. You therefore need to assign a fresh instance not only the first time you make the assignment but also after calling `reset()` or `submit()`.
 *
 * @example
 * class Todo {
 *   \@observable title = "Test"
 * }
 *
 * const model = new Todo()
 * const viewModel = createViewModel(model);
 *
 * autorun(() => console.log(viewModel.model.title, ",", viewModel.title))
 * // prints "Test, Test"
 * model.title = "Get coffee"
 * // prints "Get coffee, Get coffee", viewModel just proxies to model
 * viewModel.title = "Get tea"
 * // prints "Get coffee, Get tea", viewModel's title is now dirty, and the local value will be printed
 * viewModel.submit()
 * // prints "Get tea, Get tea", changes submitted from the viewModel to the model, viewModel is proxying again
 * viewModel.title = "Get cookie"
 * // prints "Get tea, Get cookie" // viewModel has diverged again
 * viewModel.reset()
 * // prints "Get tea, Get tea", changes of the viewModel have been abandoned
 *
 * @param {T} model
 * @returns {(T & IViewModel<T>)}
 * ```
 */
export function createViewModel<T>(model: T): T & IViewModel<T> {
    return new ViewModel(model) as any
}


text:
package one.util.huntbugs;

import static org.junit.Assert.*;

import java.util.Arrays;

import one.util.huntbugs.analysis.AnalysisOptions;
import one.util.huntbugs.analysis.Context;
import one.util.huntbugs.repo.Repository;
import one.util.huntbugs.warning.rule.CategoryRule;
import one.util.huntbugs.warning.rule.CompositeRule;
import one.util.huntbugs.warning.rule.RegexRule;

import org.junit.Test;

/**
 * @author Tagir Valeev
 *
 */
public class RuleTest {
    @Test
    public void testRules() {
        AnalysisOptions options = new AnalysisOptions();
        Context ctx = new Context(Repository.createNullRepository(), options);
        assertEquals(60, ctx.getWarningType("RoughConstantValue").getMaxScore());
        options.setRule(new CategoryRule("BadPractice", -10));
        ctx = new Context(Repository.createNullRepository(), options);
        assertEquals(50, ctx.getWarningType("RoughConstantValue").getMaxScore());
        options.setRule(new CompositeRule(Arrays.asList(options.getRule(), new RegexRule("Rough.+", -20))));
        ctx = new Context(Repository.createNullRepository(), options);
        assertEquals(30, ctx.getWarningType("RoughConstantValue").getMaxScore());
    }
}


text:
@doc "Stop after 10 iterations" ->
go_to_ten{T}(i::Int, history::Vector{Interval{T}}) = i < 10

@doc """Find values of `vars` such that `obj` is maximized or minimized.
  Assumes obj function is between `lb` and `ub`

  Optimizes by solving series questions of the form:
  Is there some model such that `cost` < `x`
  Uses binary search to efficiently find smallest `x` where the answer is true

  `obj`  - The cost value to be minimized (should be asserted to be a function of other variables)
  `lb`   - lower bound on cost
  `ub`   - upper bound on cost
  `dontstop` - boolean valued function determines when to continue optimization
""" ->
function minimize{T<:Real}(ctx::Context, obj::Ex{T}, vars::Ex...;
                          lb::T = typemin(T),
                          ub::T = typemax(T),
                          dontstop::Function = go_to_ten)
  @assert lb < ub "lower bound not less than upper bound"
  # Check its possible to get cost within specified bounds
  add!(ctx,(obj >= lb) & (obj <= ub))
  !is_satisfiable(ctx) && error("No model has objective value between $lb and $ub")

  local cost_bounds = Interval(lb,ub) # Bounds optimal cost
  local cost # best cost seen so far
  local optimal_model # best model (of vars) seen so far
  local last_test_issat # wheter last test was satisfiable
  history = Interval{T}[] # record history of cost_bounds intervals
  i = 0
  while dontstop(i, history)
    i += 1
    push_ctx!(ctx)

    # Test whether optimal cost is in upper or lower half of cost_bounds
    lhalf, uhalf = mid_split(cost_bounds)
    # current_lb, current_ub = uhalf.l, uhalf.u
    current_lb, current_ub = lhalf.l, lhalf.u
    add!(ctx,(obj >= current_lb) & (obj <= current_ub))

    # if SAT, optimal cost is the lower half, split lower half next iteration
    if is_satisfiable(ctx)
      last_test_issat = true

      # Actually, we know that optimal cost must be less than the cost
      # found from the last test. Use that as an upper bound for effiency
      amodel = model(ctx,obj,vars...)
      cost = amodel[1]
      optimal_model = amodel[2:end]
      # cost_bounds = Interval(cost.l, current_ub)
      cost_bounds = Interval(current_lb, cost.u)
    else
      # Otherwise it must be in the upperhalf, split upper half next iteration
      last_test_issat = false
      # cost_bounds = lhalf
      cost_bounds = uhalf
    end

    push!(history, cost_bounds)
    pop_ctx!(ctx)
  end

  if last_test_issat
    return cost, optimal_model
  else
    # If the last test returns UNSAT, we do not know what the best cost is
    # But we do have a best interval which must contain it
    push_ctx!(ctx)
    add!(ctx,(obj >= history[end].l) & (obj <= history[end].u))
    !is_satisfiable() && error("Should be satisfiable, cost must be within $(history[end])")
    amodel = model(ctx,obj,vars...)
    cost = amodel[1]
    optimal_model = amodel[2:end]
    pop_ctx!(ctx)
    return cost, optimal_model
  end
end

minimize(obj,vars::Ex...;args...) = minimize(global_context(), obj, vars...; args...)


text:
/* simpleQuery.h
 */

#ifndef SIMPLE_QUERY_HPP
#define SIMPLE_QUERY_HPP

/* This is a high level file type API call */

#include "rods.hpp"
#include "rcMisc.hpp"
#include "procApiRequest.hpp"
#include "apiNumber.hpp"
#include "initServer.hpp"
#include "icatDefines.hpp"

typedef struct {
    char *sql;
    char *arg1;
    char *arg2;
    char *arg3;
    char *arg4;
    int control;
    int form;
    int maxBufSize;
} simpleQueryInp_t;

#define simpleQueryInp_PI "str *sql; str *arg1; str *arg2; str *arg3; str *arg4; int control; int form; int maxBufSize;"

typedef struct {
    int control;
    char *outBuf;
} simpleQueryOut_t;

#define simpleQueryOut_PI "int control; str *outBuf;"

#if defined(RODS_SERVER)
#define RS_SIMPLE_QUERY rsSimpleQuery
/* prototype for the server handler */
int
rsSimpleQuery( rsComm_t *rsComm, simpleQueryInp_t *simpleQueryInp,
               simpleQueryOut_t **simpleQueryOut );
int
_rsSimpleQuery( rsComm_t *rsComm, simpleQueryInp_t *simpleQueryInp,
                simpleQueryOut_t **simpleQueryOut );
#else
#define RS_SIMPLE_QUERY NULL
#endif

extern "C" {

    /* prototype for the client call */
    int
    rcSimpleQuery( rcComm_t *conn, simpleQueryInp_t *simpleQueryInp,
                   simpleQueryOut_t **simpleQueryOut );

}

#endif	/* SIMPLE_QUERY_H */


text:
SHELL = /bin/bash

DIST 	 	 := backend/lesimo/admin/static/dist
SRC          := frontend/src
NODE_MODULES := frontend/node_modules
BOWER		 := frontend/bower_components

.PHONY: all css resources js

$(DIST)/codemirror/bundle.js: $(NODE_MODULES)/codemirror/mode/markdown/markdown.js \
						   $(NODE_MODULES)/codemirror/mode/xml/xml.js \
						   $(NODE_MODULES)/codemirror/mode/jinja2/jinja2.js \
						   $(NODE_MODULES)/codemirror/mode/css/css.js \
						   $(NODE_MODULES)/codemirror/mode/htmlmixed/htmlmixed.js \
						   $(BOWER)/jquery-ui/jquery-ui.js
	@mkdir -p $(@D)
	cat $^ > $@

$(DIST)/codemirror: $(NODE_MODULES)/codemirror $(DIST)/codemirror/bundle.js
	cp -r $</{lib,keymap} $@

$(DIST)/css/bundle.css: $(NODE_MODULES)/bootstrap/dist/css/bootstrap.css \
					 $(NODE_MODULES)/bootstrap/dist/css/bootstrap-theme.css \
					 $(NODE_MODULES)/css-toggle-switch/dist/toggle-switch.css \
					 $(NODE_MODULES)/jquery-ui/themes/base/jquery-ui.css \
					 $(NODE_MODULES)/font-awesome/css/font-awesome.css \
					 $(BOWER)/angular-bootstrap-datetimepicker/src/css/datetimepicker.css \
					 $(SRC)/css/style.css
	@mkdir -p $(@D)
	cat $^ > $@

$(DIST)/css/bundle.min.css: $(DIST)/css/bundle.css
	@mkdir -p $(@D)
	./$(NODE_MODULES)/clean-css/bin/cleancss $< -o $@

$(DIST)/fonts: $(NODE_MODULES)/bootstrap/dist/fonts/* $(NODE_MODULES)/font-awesome/fonts/*
	@mkdir -p $@
	cp $^ $@

$(DIST)/js/bundle.js: $(NODE_MODULES)/jquery/dist/jquery.js \
				   $(NODE_MODULES)/bootstrap/dist/js/bootstrap.js \
				   $(NODE_MODULES)/angular/angular.js \
				   $(NODE_MODULES)/angular-cookies/angular-cookies.js \
				   $(NODE_MODULES)/angular-ui-codemirror/src/ui-codemirror.js \
				   $(NODE_MODULES)/moment/moment.js \
				   $(BOWER)/angular-date-time-input/src/dateTimeInput.js \
				   $(BOWER)/angular-bootstrap-datetimepicker/src/js/datetimepicker.js \
				   $(SRC)/js/src/*.js
	@mkdir -p $(@D)
	cat $^ > $@
	./$(NODE_MODULES)/karma/bin/karma start frontend/karma.conf.js --check='$(abspath $@)'

$(DIST)/js/bundle.min.js: $(DIST)/js/bundle.js ;
	@mkdir -p $(@D)
	./$(NODE_MODULES)/minifier/index.js --output $@ $<
	./$(NODE_MODULES)/karma/bin/karma start frontend/karma.conf.js --check='$(abspath $@)'

$(DIST)/css/images: $(BOWER)/jquery-ui/themes/base/images/*
	@mkdir -p $@
	cp -r $^ $@

$(DIST)/images: $(DIST)/css/images;

css: $(DIST)/css/bundle.min.css;

js: $(DIST)/js/bundle.min.js;

resources: $(DIST)/fonts $(DIST)/images;

all: js css resources $(DIST)/codemirror;

clean:
	rm -r $(DIST)/


text:
<?php

declare(strict_types=1);

namespace Sonata\UserBundle\Mailer;

use Sonata\UserBundle\Model\UserInterface;
use Symfony\Component\Mailer\MailerInterface as SymfonyMailerInterface;
use Symfony\Component\Mime\Email;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Twig\Environment;

final class Mailer implements MailerInterface
{
    private UrlGeneratorInterface $urlGenerator;

    private Environment $twig;

    private SymfonyMailerInterface $mailer;

    /**
     * @var array<string, string>
     */
    private array $fromEmail;

    private string $emailTemplate;

    /**
     * @param array<string, string> $fromEmail
     */
    public function __construct(
        UrlGeneratorInterface $urlGenerator,
        Environment $twig,
        SymfonyMailerInterface $mailer,
        array $fromEmail,
        string $emailTemplate
    ) {
        $this->urlGenerator = $urlGenerator;
        $this->twig = $twig;
        $this->mailer = $mailer;
        $this->fromEmail = $fromEmail;
        $this->emailTemplate = $emailTemplate;
    }

    public function sendResettingEmailMessage(UserInterface $user): void
    {
        $url = $this->urlGenerator->generate('sonata_user_admin_resetting_reset', [
            'token' => $user->getConfirmationToken(),
        ], UrlGeneratorInterface::ABSOLUTE_URL);

        $rendered = $this->twig->render($this->emailTemplate, [
            'user' => $user,
            'confirmationUrl' => $url,
        ]);

        // Render the email, use the first line as the subject, and the rest as the body
        $renderedLines = preg_split('/\R/', trim($rendered), 2, \PREG_SPLIT_NO_EMPTY);
        \assert(false !== $renderedLines && [] !== $renderedLines);

        $subject = array_shift($renderedLines);
        $body = implode('', $renderedLines);
        $fromName = current($this->fromEmail);
        $fromAddress = current(array_keys($this->fromEmail));

        $this->mailer->send(
            (new Email())
                ->from(sprintf('%s <%s>', $fromName, $fromAddress))
                ->to((string) $user->getEmail())
                ->subject($subject)
                ->html($body)
        );
    }

    public function sendConfirmationEmailMessage(UserInterface $user): void
    {
        throw new \LogicException('This method is not implemented.');
    }
}


text:
var level = require('level');
var db = level('/tmp/timerweeee');
var timer = require('../index')(db);

var start = {
  title: 'doing some work',
  project: 'timerbot',
  person: 'seth'
};

timer.start(start, function (err, block) {
  if (err) console.log(err);
  else console.log(err, block)
});


text:
export INTERMEDIATE_CONF=`pwd`/INTERMEDIATE_CA/openssl.conf

if [ "$1" == "" ]; then
  echo "usage: $0 fqdn.goes.here.com [-f]"
  echo
  echo "    -f  Force generation of new key"
  echo "    -s  Do not generate a key or csr, just sign the csr."
  echo "        You must have an existing CSR and KEY."
  echo
  exit 127
fi

FQDN=$1
KEYFILE=./INTERMEDIATE_CA/private/${FQDN}.key
CSRFILE=./INTERMEDIATE_CA/csrs/${FQDN}.csr
CERTOUT=./INTERMEDIATE_CA/certs/${FQDN}.cert

if [ "$2" != "-s" ]; then
    if [ -f ${KEYFILE} -a "$2" != "-f" ]; then
	echo "${KEYFILE}.key exists. Remove it before re-generating."
	exit 1
    fi

    echo
    echo "=== Generate Key ==="
    if [ "$2" == "-f" ]; then
	echo " * Forcibly regenerating the key for $FQDN"
    fi
    echo

    openssl genrsa -out ${KEYFILE} 2048

    echo
    echo "=== Generate Request CSR ==="
    echo
    if [ ! -d ./INTERMEDIATE_CA/csrs ];
    then
	mkdir ./INTERMEDIATE_CA/csrs
    fi

# create request
echo "

${FQDN}

" | openssl req -config ${INTERMEDIATE_CONF} -new -key ${KEYFILE} -out ${CSRFILE}

fi

# sanity check
if [ ! -f ${KEYFILE} -o ! -f ${CSRFILE} ]; then
    echo "ERROR: Either the CSR file or the Keyfile is missing."
    exit 127
fi

echo
echo
echo "=== Sign Request with Intermediate ==="
echo

# sign the request with the Intermediate CA
openssl ca -config ${INTERMEDIATE_CONF} -policy policy_anything \
    -out ${CERTOUT} -infiles ${CSRFILE}

# and store the server files in the certs/ directory<br />
#mv ${FQDN}.csr ${FQDN}.cert certs/

if [ -f ${CERTOUT} ]; then
    echo
    echo "=== Complete ==="
    echo

    echo "Certificate: ${CERTOUT}"
    echo "Private Key: ${KEYFILE}"
    echo "   CA Chain: `pwd`/ca.chain.pem"
else
    echo
    echo "=== Signing failed! ==="
    echo
    echo "You can retry signing again with the -s or -f options."
fi