text:
#ifndef ANDROID_HARDWARE_SPRD_CAMERA_PARAMETERS_H
#define ANDROID_HARDWARE_SPRD_CAMERA_PARAMETERS_H

#include <camera/CameraParameters.h>

namespace android {

class SprdCameraParameters : public CameraParameters {
public:
	enum ConfigType {
		kFrontCameraConfig,
		kBackCameraConfig
	};

	typedef struct {
		int width;
		int height;
	} Size;

	typedef struct {
		int x;
		int y;
		int width;
		int height;
	}Rect;

public:
    SprdCameraParameters();
    SprdCameraParameters(const String8 &params);
    ~SprdCameraParameters();

	void setDefault(ConfigType config);
	const char *getDefaultValue(ConfigType config, const char * const KEY) const;

	int chekFocusAreas(int max_num) const;
	void getFocusAreas(int *area, int *count);
	void getFocusAreas(int *area, int *count, Size *preview_size,
					 Rect *preview_rect, int orientation, bool mirror);
	const char* get_FocusAreas() const;
	void setFocusAreas(const char* value);
	int getFocusMode();
	const char* get_FocusMode() const;
	void setFocusMode(const char* value);
	int getWhiteBalance();
	const char* get_WhiteBalance() const;
	void setWhiteBalance(const char* value);
	int getCameraId();
	const char* get_CameraId() const;
	void setCameraId(const char* value);
	int getJpegQuality();
	void setJpegQuality(const char* value);
	int getJpegThumbnailQuality();
	void setJpegThumbnailQuality(const char* value);
	const char* get_Effect() const;
	int getEffect();
	void setEffect(const char* value);
	int getSceneMode();
	const char* get_SceneMode() const;
	void setSceneMode(const char* value);
	int getZoom();
	const char* get_Zoom() const;
	void setZoom(const char* value);
	int getBrightness();
	const char* get_Brightness() const;
	void setBrightness(const char* value);
	int getSharpness();
	const char* get_Sharpness() const;
	void setSharpness(const char* value);
	int getContrast();
	const char* get_Contrast() const;
	void setContrast(const char* value);
	int getSaturation();
	const char* get_Saturation() const;
	void setSaturation(const char* value);
	int getExposureCompensation();
	const char* get_ExposureCompensation() const;
	void setExposureCompensation(const char* value);
	int getAntiBanding();
	const char*  get_AntiBanding() const;
	void setAntiBanding(const char* value);
	int getIso();
	const char* get_Iso() const;
	void setIso(const char* value);
	int getRecordingHint();
	const char* get_RecordingHint() const;
	void setRecordingHint(const char* value);
	int getFlashMode();
	const char* get_FlashMode() const;
	void setFlashMode(const char* value);
	int getSlowmotion();
	const char* get_Slowmotion() const;
	void setSlowmotion(const char* value);
	const char* get_SlowmotionSupported() const;
	void setSlowmotionSupported(const char* value);
	int getPreviewEnv();
	const char* get_PreviewEnv() const;
	void setPreviewEnv(const char* value);
	int getPreviewFameRate();
	const char* get_PreviewFameRate() const;
	void setPreviewFameRate(const char* value);
	int getAutoExposureMode();
	const char* get_AutoExposureMode() const;
	void setAutoExposureMode(const char* value);
	int chekMeteringAreas(int max_num) const;
	void getMeteringAreas(int *area, int *count, Size *preview_size,
					 Rect *preview_rect, int orientation, bool mirror);
	const char* get_MeteringAreas() const;
	void setMeteringAreas(const char* value);
	const char* get_PreviewFpsRange() const;
	void setPreviewFpsRange(const char* value);
	const char* get_GPS_Processing_Method() const;
	void setGPSProcessingMethod(const char* value);
	void removeGPSProcessingMethod(void);
	const char* get_FocalLength() const;
	void setFocalLength(const char* value);
	const char* get_ExposureCompensationStep() const;
	void setExposureCompensationStep(const char* value);
	const char* get_MaxExposureCompensation() const;
	void setMaxExposureCompensation(const char* value);
	const char* get_MinExposureCompensation() const;
	void setMinExposureCompensation(const char* value);
	const char* get_SupportedSceneModes() const;
	void setSupportedSceneModes(const char* value);

	const char* get_SupportedPreviewSizes() const;
	void setSupportedPreviewSizes(const char* value);
	const char* get_SupportedPreviewFrameRate() const;
	void setSupportedPreviewFrameRate(const char* value);

	const char* get_SupportedPreviewFpsRange() const;
	void setSupportedPreviewFpsRange(const char* value);

	const char* get_SupportedPictureSizes() const;
	void setSupportedPictureSizes(const char* value);

	const char* get_SupportedFocusModes() const;
	void setSupportedFocusModes(const char* value);
	const char* get_AutoExposureLock() const;
	void setAutoExposureLock(const char* value);
	const char* get_AutoExposureLockSupported() const;
	void setAutoExposureLockSupported(const char* value);
	const char* get_AutoWhiteBalanceLock() const;
	void setAutoWhiteBalanceLock(const char* value);
	const char* get_AutoWhiteBalanceLockSupported() const;
	void setAutoWhiteBalanceLockSupported(const char* value);
	const char* get_HorizontalViewAngle() const;
	void setHorizontalViewAngle(const char* value);
	const char* get_VerticalViewAngle() const;
	void setVerticalViewAngle(const char* value);
	const char* get_VideoFrameFormat() const;
	void setVideoFrameFormat(const char* value);
	const char* get_SupportedVideoSizes() const;
	void setSupportedVideoSizes(const char* value);
	const char* get_JpegQuality() const;
	const char* get_JpegThumbnailQuality() const;
	const char* get_JpegThumbnailSize() const;
	void setJpegThumbnailSize(const char* value);
	const char* get_JpegThumbnailSizeValue() const;
	void setJpegThumbnailSizeValue(const char* value);
	const char* get_JpegThumbnailWidth() const;
	void setJpegThumbnailWidth(const char* value);
	const char* get_JpegThumbnailHeight() const;
	void setJpegThumbnailHeight(const char* value);
	const char* get_Rotation() const;
	void setRotation(const char* value);
	const char* get_GpsLatitude() const;
	void setGpsLatitude(const char* value);
	void removeGpsLatitude(void);
	const char* get_GpsLongitude() const;
	void setGpsLongitude(const char* value);
	void removeGpsLongitude(void);
	const char* get_GpsAltitude() const;
	void setGpsAltitude(const char* value);
	void removeGpsAltitude(void);
	const char* get_GpsTimestamp() const;
	void setGpsTimestamp(const char* value);
	void removeGpsTimestamp(void);
	const char* get_MaxNumDetectedFacesHW() const;
	void setMaxNumDetectedFacesHW(const char* value);
	const char* get_MaxNumDetectedFacesSW() const;
	void setMaxNumDetectedFacesSW(const char* value);
	const char* get_MaxZoom() const;
	void setMaxZoom(const char* value);
	const char* get_ZoomRatios() const;
	void setZoomRatios(const char* value);
	const char* get_ZoomSupported() const;
	void setZoomSupported(const char* value);
	const char* get_SmoothZoomSupported() const;
	void setSmoothZoomSupported(const char* value);
	const char* get_SupportedFlashMode() const;
	void setSupportedFlashMode(const char* value);
	const char* get_SupportedWhiteBalance() const;
	void setSupportedWhiteBalance(const char* value);
	const char* get_SupportedIso() const;
	void setSupportedIso(const char* value);
	const char* get_SupportedContrast() const;
	void setSupportedContrast(const char* value);
	const char* get_SupportedSaturation() const;
	void setSupportedSaturation(const char* value);
	const char* get_SupportedBrightness() const;
	void setSupportedBrightness(const char* value);
	const char* get_SupportedSharpness() const;
	void setSupportedSharpness(const char* value);
	const char* get_SupportedAntibanding() const;
	void setSupportedAntibanding(const char* value);
	const char* get_SupportedEffects() const;
	void setSupportedEffects(const char* value);
	const char* get_PictureFormat() const;
	void setPictureFormat(const char* value);
	const char* get_SupportedPictureFormat() const;
	void setSupportedPictureFormat(const char* value);
	void setSensorRotation(int value);
	void setSensorOrientation(int value);
	const char* get_VideoStabilition() const;
	void setVideoStabilition(const char* value);
	const char* get_VideoStabilitionSupported() const;
	void setVideoStabilitionSupported(const char* value);
	const char* get_FocusDistances() const;
	void setFocusDistances(const char* value);
	const char* get_MaxNumFocusAreas() const;
	void setMaxNumFocusAreas(const char* value);
	const char* get_SupportedPreviewFormat() const;
	void setSupportedPreviewFormat(const char* value);
	const char* get_VideoSnapshotSupported() const;
	void setVideoSnapshotSupported(const char* value);
	const char * get_maxNumMeteringArea() const;
	void setMaxNumMeteringArea(const char* value);
	void setZsl(int value);
	void setCapMode(int value);
	void setZSLSupport(const char* value);
	void updateSupportedPreviewSizes(int width, int height);
	void setFlashModeSupport(const char* value);

	// These sizes have to be a multiple of 16 in each dimension
	static const Size kPreviewSizes[];
	static const int kPreviewSettingCount;
	static const int kDefaultPreviewSize;

	static const unsigned int kFocusZoneMax = 5;
	static const unsigned int kMeteringAreasMax = 5;
	static const int kInvalidValue = 0xffffffff;
	static const int kFrontCameraConfigCount;
	static const int kBackCameraConfigCount;

	static const char KEY_FOCUS_AREAS[];
	static const char KEY_FOCUS_MODE[];
	static const char KEY_WHITE_BALANCE[];
	static const char KEY_CAMERA_ID[];
	static const char KEY_JPEG_QUALITY[];
	static const char KEY_JPEG_THUMBNAIL_QUALITY[];
	static const char KEY_JPEG_THUMBNAIL_SIZE[];
	static const char KEY_JPEG_THUMBNAIL_WIDTH[];
	static const char KEY_JPEG_THUMBNAIL_HEIGHT[];
	static const char KEY_EFFECT[];
	static const char KEY_SCENE_MODE[];
	static const char KEY_ZOOM[];
	static const char KEY_BRIGHTNESS[];
	static const char KEY_SUPPORTED_BRIGHTNESS[];
	static const char KEY_CONTRAST[];
	static const char KEY_SUPPORTED_CONTRAST[];
	static const char KEY_EXPOSURE_COMPENSATION[];
	static const char KEY_ANTI_BINDING[];
	static const char KEY_ISO[];
	static const char KEY_SUPPORTED_ISO[];
	static const char KEY_RECORDING_HINT[];
	static const char KEY_FLASH_MODE[];
	static const char KEY_SLOWMOTION[];
	static const char KEY_SUPPORTED_SLOWMOTION[];
	static const char KEY_SATURATION[];
	static const char KEY_SUPPORTED_SATURATION[];
	static const char KEY_SHARPNESS[];
	static const char KEY_SUPPORTED_SHARPNESS[];
	static const char KEY_PREVIEWFRAMERATE[];
	static const char KEY_AUTO_EXPOSURE[];
	static const char KEY_METERING_AREAS[];
	static const char KEY_PREVIEW_ENV[];
	static const char KEY_SENSOR_ROTATION[];
	static const char KEY_SENSOR_ORIENTATION[];
	static const char KEY_ZSL[];
	static const char KEY_CAPMODE[];
	static const char KEY_SUPPORTED_ZSL[];
	static const char KEY_SUPPORTED_FLASH_MODE[];

private:

};

}//namespace android

#endif


text:
using System;
using System.Collections.Generic;

using NUnit.Framework;

using VersionOne.SDK.ObjectModel.Filters;

namespace VersionOne.SDK.ObjectModel.Tests {
    [TestFixture]
    public class RegressionSuiteTester : BaseSDKTester {
        private const string RegressionSuiteName = "Regression Suite Name";
        private const string RegressionSuiteDescription = "Description for Regression Suite";
        private const string RegressionSuiteReference = "Reference for Regression Suite";
        private const string TestSetName = "test set 1";

        protected override Project CreateSandboxProject(Project rootProject) {
            return EntityFactory.CreateProjectWithSchedule(SandboxName, rootProject);
        }

        [Test]
        public void CreateRegressionSuiteTest() {
            var regressionPlan = EntityFactory.CreateRegressionPlan("Name", SandboxProject);
            var regressionSuite = EntityFactory.CreateRegressionSuite(RegressionSuiteName, regressionPlan);
            Assert.AreEqual(RegressionSuiteName, regressionSuite.Name);
            Assert.AreEqual(regressionPlan, regressionSuite.RegressionPlan);
        }

        [Test]
        public void CreateRegressionSuiteWithAttributes() {
            var member = EntityFactory.CreateMember("test user");
            var regressionPlan = EntityFactory.CreateRegressionPlan("Name", SandboxProject);
            var attributes = new Dictionary<string, object> {
                {"Description", RegressionSuiteDescription},
                {"Reference", RegressionSuiteReference},
                {"Owner", member.ID.Token}
            };
            var regressionSuite = EntityFactory.CreateRegressionSuite(RegressionSuiteName, regressionPlan, attributes);

            Assert.AreEqual(RegressionSuiteName, regressionSuite.Name);
            Assert.AreEqual(RegressionSuiteDescription, regressionSuite.Description);
            Assert.AreEqual(RegressionSuiteReference, regressionSuite.Reference);
            Assert.AreEqual(member, regressionSuite.Owner);

            ResetInstance();
            var regressionSuiteNew = Instance.Get.RegressionSuiteByID(regressionSuite.ID);
            Assert.AreEqual(RegressionSuiteName, regressionSuiteNew.Name);
            Assert.AreEqual(RegressionSuiteDescription, regressionSuiteNew.Description);
            Assert.AreEqual(RegressionSuiteReference, regressionSuiteNew.Reference);
            Assert.AreEqual(member, regressionSuiteNew.Owner);
        }

        [Test]
        public void UpdateRegressionSuiteTest() {
            const string addonForName = "updated";

            var regressionPlan = EntityFactory.CreateRegressionPlan("Name", SandboxProject);
            var regressionSuite = EntityFactory.CreateRegressionSuite(RegressionSuiteName, regressionPlan);

            ResetInstance();

            var member = EntityFactory.CreateMember("test user");
            var regressionSuiteNew = Instance.Get.RegressionSuiteByID(regressionSuite.ID);
            regressionSuiteNew.Name = RegressionSuiteName + addonForName;
            regressionSuiteNew.Description = RegressionSuiteDescription;
            regressionSuiteNew.Reference = RegressionSuiteReference;
            regressionSuiteNew.Owner = member;
            regressionSuiteNew.Save();

            ResetInstance();

            regressionSuite = Instance.Get.RegressionSuiteByID(regressionSuite.ID);
            Assert.AreEqual(RegressionSuiteName + addonForName, regressionSuite.Name);
            Assert.AreEqual(RegressionSuiteDescription, regressionSuite.Description);
            Assert.AreEqual(RegressionSuiteReference, regressionSuite.Reference);
            Assert.AreEqual(member, regressionSuite.Owner);
        }

        [Test]
        public void DeleteRegressionSuiteTest() {
            var regressionPlan = EntityFactory.CreateRegressionPlan("Name", SandboxProject);
            var regressionSuite = EntityFactory.CreateRegressionSuite(RegressionSuiteName, regressionPlan);

            ResetInstance();

            var regressionSuiteNew = Instance.Get.RegressionSuiteByID(regressionSuite.ID);
            regressionSuiteNew.Delete();

            ResetInstance();

            regressionSuiteNew = Instance.Get.RegressionSuiteByID(regressionSuite.ID);
            Assert.IsNull(regressionSuiteNew);
        }

        [Test]
        public void CreateTestSetTest() {
            var regressionPlan = EntityFactory.CreateRegressionPlan("Name", SandboxProject);
            var regressionSuite = EntityFactory.CreateRegressionSuite(RegressionSuiteName, regressionPlan);
            var testSet = EntityFactory.Create(() => regressionSuite.CreateTestSet(TestSetName));

            ResetInstance();

            var filter = new TestSetFilter();
            filter.RegressionSuite.Add(regressionSuite);
            var testSets = new List<TestSet>(Instance.Get.TestSets(filter));
            CollectionAssert.Contains(testSets, testSet);
            Assert.IsTrue(testSets[0].RegressionSuite.Equals(regressionSuite));
        }

        [Test]
        public void AssignRegressionTest() {
            const string regressionTestName = "regression test for assign N";

            var regressionTests = new List<RegressionTest>(4);

            // create 4 regression tests
            for (var i = 0; i < 4; i++)  {
                regressionTests.Add(EntityFactory.CreateRegressionTest(regressionTestName + i, SandboxProject));
            }

            var regressionPlan = EntityFactory.CreateRegressionPlan("Name", SandboxProject);
            var regressionSuite = EntityFactory.CreateRegressionSuite(RegressionSuiteName, regressionPlan);

            Assert.AreEqual(0, regressionSuite.RegressionTests.Count);
            // assign 3 regression tests
            for (var i = 0; i < 3; i++) {
                regressionSuite.AssignRegressionTest(regressionTests[i]);
            }
            regressionSuite.Save();
            Assert.AreEqual(3, regressionSuite.RegressionTests.Count);

            ResetInstance();

            var regressionSuiteNew = Instance.Get.RegressionSuiteByID(regressionSuite.ID);
            Assert.AreEqual(3, regressionSuiteNew.RegressionTests.Count);

            // test that 3 regression tests have info about regression suite
            for (var i = 0; i < 3; i++)  {
                var regressionTest = Instance.Get.RegressionTestByID(regressionTests[i].ID);
                Assert.AreEqual(1, regressionTest.RegressionSuites.Count);
                CollectionAssert.Contains(regressionTest.RegressionSuites, regressionSuite);
                CollectionAssert.Contains(regressionSuite.RegressionTests, regressionTest);
            }

            var regressionTestNotAssigned = Instance.Get.RegressionTestByID(regressionTests[3].ID);
            CollectionAssert.DoesNotContain(regressionSuite.RegressionTests, regressionTestNotAssigned);
        }

        [Test]
        public void UnassignRegressionTest() {
            const string regressionTestName = "regression test for unassign N";

            var regressionTests = new List<RegressionTest>(4);
            var regressionPlan = EntityFactory.CreateRegressionPlan("Name", SandboxProject);
            var regressionSuite = EntityFactory.CreateRegressionSuite(RegressionSuiteName, regressionPlan);

            // create 4 and assign 3 regression tests
            for (var i = 0; i < 4; i++)  {
                var regTest = EntityFactory.CreateRegressionTest(regressionTestName + i, SandboxProject);
                regressionTests.Add(regTest);

                // assign all regression tests except 4th
                if (i != 3)  {
                    regressionSuite.AssignRegressionTest(regTest);
                }
            }
            regressionSuite.Save();

            ResetInstance();

            var regressionSuiteNew = Instance.Get.RegressionSuiteByID(regressionSuite.ID);
            Assert.AreEqual(3, regressionSuiteNew.RegressionTests.Count);

            // unassign 3 regression tests
            for (var i = 0; i < 3; i++) {
                regressionSuite.UnassignRegressionTest(regressionTests[i]);
            }

            regressionSuite.Save();

            ResetInstance();

            regressionSuiteNew = Instance.Get.RegressionSuiteByID(regressionSuite.ID);
            Assert.AreEqual(0, regressionSuiteNew.RegressionTests.Count);

            // test that all regression tests don't have info about regression suite
            for (var i = 0; i < 3; i++) {
                var regressionTest = Instance.Get.RegressionTestByID(regressionTests[i].ID);
                Assert.AreEqual(0, regressionTest.RegressionSuites.Count);
                CollectionAssert.DoesNotContain(regressionTest.RegressionSuites, regressionSuite);
                CollectionAssert.DoesNotContain(regressionSuite.RegressionTests, regressionTest);
            }
        }

        [Test]
        [ExpectedException(typeof(InvalidOperationException))]
        public void UnassignUnrelatedRegressionTestTest() {
            var regressionPlan = EntityFactory.CreateRegressionPlan("Name", SandboxProject);
            var regressionSuite1 = EntityFactory.CreateRegressionSuite("suite 1", regressionPlan);
            var regressionSuite2 = EntityFactory.CreateRegressionSuite("suite 2", regressionPlan);

            var test = EntityFactory.CreateRegressionTest("my test", SandboxProject);
            regressionSuite1.AssignRegressionTest(test);

            ResetInstance();

            regressionSuite2.UnassignRegressionTest(test);
        }

        [Test]
        public void AssignUnassignRegressionCachingTest() {
            const string regressionTestName = "regression test for caching N";

            var regressionTests = new List<RegressionTest>(4);
            var regressionPlan = EntityFactory.CreateRegressionPlan("Name", SandboxProject);
            var regressionSuite = EntityFactory.CreateRegressionSuite(RegressionSuiteName, regressionPlan);

            // create and assign 4 regression tests
            for (var i = 0; i < 4; i++) {
                var regTest = EntityFactory.CreateRegressionTest(regressionTestName + i, SandboxProject);
                regressionTests.Add(regTest);
                regressionSuite.AssignRegressionTest(regTest);
            }

            ResetInstance();

            var regressionSuiteNew = Instance.Get.RegressionSuiteByID(regressionSuite.ID);
            Assert.AreEqual(4, regressionSuiteNew.RegressionTests.Count);

            //all regression tests assigned to regression suite
            for (var i = 0; i < 4; i++) {
                Assert.AreEqual(1, regressionTests[i].RegressionSuites.Count);
            }

            // unassign 2 regression tests
            for (var i = 0; i < 2; i++) {
                regressionSuite.UnassignRegressionTest(regressionTests[i]);
            }

            Assert.AreEqual(0, regressionTests[0].RegressionSuites.Count);
            Assert.AreEqual(0, regressionTests[1].RegressionSuites.Count);
            Assert.AreEqual(1, regressionTests[2].RegressionSuites.Count);
            Assert.AreEqual(1, regressionTests[3].RegressionSuites.Count);
            Assert.AreEqual(2, regressionSuite.RegressionTests.Count);
        }

        [Test]
        [ExpectedException(typeof(InvalidOperationException))]
        public void CanNotCloseTest() {
            var regressionPlan = EntityFactory.CreateRegressionPlan("Name",
                                                                                SandboxProject);
            var regressionSuite = EntityFactory.CreateRegressionSuite(RegressionSuiteName, regressionPlan);

            Assert.IsTrue(regressionSuite.IsActive);
            Assert.IsFalse(regressionSuite.IsClosed);

            Assert.IsFalse(regressionSuite.CanClose);
            Assert.IsTrue(regressionSuite.CanDelete);

            regressionSuite.Close();
        }

        [Test]
        [ExpectedException(typeof(InvalidOperationException))]
        public void CanNotReactivateTest() {
            var regressionPlan = EntityFactory.CreateRegressionPlan("Name", SandboxProject);
            var regressionSuite = EntityFactory.CreateRegressionSuite(RegressionSuiteName, regressionPlan);

            Assert.IsFalse(regressionSuite.CanReactivate);
            regressionSuite.Reactivate();
        }

        [TearDown]
        public new void TearDown() {
            NewSandboxProject();
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
package ledgerconfig

import (
	"testing"

	"github.com/hyperledger/fabric/common/ledger/testutil"
	ledgertestutil "github.com/hyperledger/fabric/core/ledger/testutil"
	"github.com/spf13/viper"
)

func TestIsCouchDBEnabledDefault(t *testing.T) {
	setUpCoreYAMLConfig()
	// During a build the default values should be false.

	// If the  ledger test are run with CouchDb enabled, need to provide a mechanism
	// To let this test run but still test default values.
	if IsCouchDBEnabled() == true {
		ledgertestutil.ResetConfigToDefaultValues()
		defer viper.Set("ledger.state.stateDatabase", "CouchDB")
	}
	defaultValue := IsCouchDBEnabled()
	testutil.AssertEquals(t, defaultValue, false) //test default config is false
}

func TestIsCouchDBEnabled(t *testing.T) {
	setUpCoreYAMLConfig()
	defer ledgertestutil.ResetConfigToDefaultValues()
	viper.Set("ledger.state.stateDatabase", "CouchDB")
	updatedValue := IsCouchDBEnabled()
	testutil.AssertEquals(t, updatedValue, true) //test config returns true
}

func TestLedgerConfigPathDefault(t *testing.T) {
	setUpCoreYAMLConfig()
	testutil.AssertEquals(t,
		GetRootPath(),
		"/var/hyperledger/production/ledgersData")
	testutil.AssertEquals(t,
		GetLedgerProviderPath(),
		"/var/hyperledger/production/ledgersData/ledgerProvider")
	testutil.AssertEquals(t,
		GetStateLevelDBPath(),
		"/var/hyperledger/production/ledgersData/stateLeveldb")
	testutil.AssertEquals(t,
		GetHistoryLevelDBPath(),
		"/var/hyperledger/production/ledgersData/historyLeveldb")
	testutil.AssertEquals(t,
		GetBlockStorePath(),
		"/var/hyperledger/production/ledgersData/chains")
}

func TestLedgerConfigPath(t *testing.T) {
	setUpCoreYAMLConfig()
	defer ledgertestutil.ResetConfigToDefaultValues()
	viper.Set("peer.fileSystemPath", "/tmp/hyperledger/production")
	testutil.AssertEquals(t,
		GetRootPath(),
		"/tmp/hyperledger/production/ledgersData")
	testutil.AssertEquals(t,
		GetLedgerProviderPath(),
		"/tmp/hyperledger/production/ledgersData/ledgerProvider")
	testutil.AssertEquals(t,
		GetStateLevelDBPath(),
		"/tmp/hyperledger/production/ledgersData/stateLeveldb")
	testutil.AssertEquals(t,
		GetHistoryLevelDBPath(),
		"/tmp/hyperledger/production/ledgersData/historyLeveldb")
	testutil.AssertEquals(t,
		GetBlockStorePath(),
		"/tmp/hyperledger/production/ledgersData/chains")
}

func TestGetQueryLimitDefault(t *testing.T) {
	setUpCoreYAMLConfig()
	defaultValue := GetQueryLimit()
	testutil.AssertEquals(t, defaultValue, 10000) //test default config is 10000
}

func TestGetQueryLimitUnset(t *testing.T) {
	viper.Reset()
	defaultValue := GetQueryLimit()
	testutil.AssertEquals(t, defaultValue, 10000) //test default config is 10000
}

func TestGetQueryLimit(t *testing.T) {
	setUpCoreYAMLConfig()
	defer ledgertestutil.ResetConfigToDefaultValues()
	viper.Set("ledger.state.couchDBConfig.queryLimit", 5000)
	updatedValue := GetQueryLimit()
	testutil.AssertEquals(t, updatedValue, 5000) //test config returns 5000
}

func TestIsHistoryDBEnabledDefault(t *testing.T) {
	setUpCoreYAMLConfig()
	defaultValue := IsHistoryDBEnabled()
	testutil.AssertEquals(t, defaultValue, false) //test default config is false
}

func TestIsHistoryDBEnabledTrue(t *testing.T) {
	setUpCoreYAMLConfig()
	defer ledgertestutil.ResetConfigToDefaultValues()
	viper.Set("ledger.history.enableHistoryDatabase", true)
	updatedValue := IsHistoryDBEnabled()
	testutil.AssertEquals(t, updatedValue, true) //test config returns true
}

func TestIsHistoryDBEnabledFalse(t *testing.T) {
	setUpCoreYAMLConfig()
	defer ledgertestutil.ResetConfigToDefaultValues()
	viper.Set("ledger.history.enableHistoryDatabase", false)
	updatedValue := IsHistoryDBEnabled()
	testutil.AssertEquals(t, updatedValue, false) //test config returns false
}

func setUpCoreYAMLConfig() {
	//call a helper method to load the core.yaml
	ledgertestutil.SetupCoreYAMLConfig()
}


text:
package org.neo4j.jdbc.bolt;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.neo4j.driver.GraphDatabase;
import org.neo4j.driver.Result;
import org.neo4j.driver.Session;
import org.neo4j.jdbc.Neo4jResultSet;
import org.neo4j.jdbc.bolt.data.StatementData;
import org.neo4j.jdbc.bolt.utils.JdbcConnectionTestUtils;
import org.testcontainers.containers.Neo4jContainer;

import java.sql.Array;
import java.sql.BatchUpdateException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.neo4j.jdbc.bolt.utils.Neo4jContainerUtils.createNeo4jContainer;

/**
 * @author AgileLARUS
 * @since 3.0.0
 */
public class BoltNeo4jStatementIT {

	@ClassRule
	public static final Neo4jContainer<?> neo4j = createNeo4jContainer();

	@Rule public ExpectedException expectedEx = ExpectedException.none();

	static Connection connection;

	@Before
	public void setUp(){
		connection = JdbcConnectionTestUtils.verifyConnection(connection, neo4j);
	}

	@After
	public void tearDown(){
		JdbcConnectionTestUtils.closeConnection(connection);
	}

	/*------------------------------*/
	/*          executeQuery        */
	/*------------------------------*/
	@Test public void executeQueryShouldExecuteAndReturnCorrectData() throws SQLException {
		JdbcConnectionTestUtils.executeTransactionally(neo4j, StatementData.STATEMENT_CREATE);
		Statement statement = connection.createStatement();
		ResultSet rs = statement.executeQuery(StatementData.STATEMENT_MATCH_ALL_STRING);

		assertTrue(rs.next());
		assertEquals("test", rs.getString(1));
		assertFalse(rs.next());
		JdbcConnectionTestUtils.executeTransactionally(neo4j, StatementData.STATEMENT_CREATE_REV);
	}

	@Test public void executeQueryShouldExecuteAndReturnCorrectDataOnAutoCommitFalseStatement() throws SQLException {
		JdbcConnectionTestUtils.executeTransactionally(neo4j, StatementData.STATEMENT_CREATE);
		Statement statement = connection.createStatement();
		connection.setAutoCommit(false);

		ResultSet rs = statement.executeQuery(StatementData.STATEMENT_MATCH_ALL_STRING);

		assertTrue(rs.next());
		assertEquals("test", rs.getString(1));
		assertFalse(rs.next());
		JdbcConnectionTestUtils.executeTransactionally(neo4j, StatementData.STATEMENT_CREATE_REV);
		connection.commit();
	}

	@Test public void executeQueryShouldExecuteAndReturnCorrectDataOnAutoCommitFalseStatementAndCreatedWithParams() throws SQLException {
		JdbcConnectionTestUtils.executeTransactionally(neo4j, StatementData.STATEMENT_CREATE);
		Statement statement = connection.createStatement(Neo4jResultSet.TYPE_FORWARD_ONLY, Neo4jResultSet.CONCUR_READ_ONLY);
		connection.setAutoCommit(false);

		ResultSet rs = statement.executeQuery(StatementData.STATEMENT_MATCH_ALL_STRING);

		assertTrue(rs.next());
		assertEquals("test", rs.getString(1));
		assertFalse(rs.next());
		JdbcConnectionTestUtils.executeTransactionally(neo4j, StatementData.STATEMENT_CREATE_REV);
		connection.commit();
	}

	/*------------------------------*/
	/*         executeUpdate        */
	/*------------------------------*/
	@Test public void executeUpdateShouldExecuteAndReturnCorrectData() throws SQLException {
		Statement statement = connection.createStatement();
		int lines = statement.executeUpdate(StatementData.STATEMENT_CREATE);
		assertEquals(1, lines);

		lines = statement.executeUpdate(StatementData.STATEMENT_CREATE);
		assertEquals(1, lines);

		lines = statement.executeUpdate(StatementData.STATEMENT_CREATE_REV);
		assertEquals(2, lines);
		statement.close();
	}

	/*------------------------------*/
	/*            execute           */
	/*------------------------------*/
	@Test public void executeShouldExecuteAndReturnFalse() throws SQLException {
		Statement statement = connection.createStatement();
		boolean result = statement.execute(StatementData.STATEMENT_CREATE);
		assertFalse(result);

		result = statement.execute(StatementData.STATEMENT_CREATE_REV);
		assertFalse(result);
		statement.close();

	}

	@Test public void executeShouldExecuteAndReturnTrue() throws SQLException {
		Statement statement = connection.createStatement();
		boolean result = statement.execute(StatementData.STATEMENT_MATCH_ALL);
		assertTrue(result);
		statement.close();

	}

	@Test public void executeBadCypherQueryOnAutoCommitShouldReturnAnSQLException() throws SQLException {
		expectedEx.expect(SQLException.class);
		expectedEx.expectMessage("Invalid input");

		Statement statement = connection.createStatement();
		statement.execute("AZERTYUIOP");
		statement.close();

	}

	@Test public void executeBadCypherQueryWithoutAutoCommitShouldReturnAnSQLException() throws SQLException {
		expectedEx.expect(SQLException.class);
		expectedEx.expectMessage("Invalid input");

		connection.setAutoCommit(false);

		Statement statement = connection.createStatement();
		try {
			statement.execute("AZERTYUIOP");
		} catch (Exception e) {
			statement.close();
			throw e;
		}
	}

	/*------------------------------*/
	/*         executeBatch         */
	/*------------------------------*/
	@Test public void executeBatchShouldWork() throws SQLException {
		Statement statement = connection.createStatement();
		connection.setAutoCommit(true);
		statement.addBatch(StatementData.STATEMENT_CREATE);
		statement.addBatch(StatementData.STATEMENT_CREATE);
		statement.addBatch(StatementData.STATEMENT_CREATE);

		int[] result = statement.executeBatch();

		assertArrayEquals(new int[]{1, 1, 1}, result);

		JdbcConnectionTestUtils.executeTransactionally(neo4j, StatementData.STATEMENT_CREATE_REV);
		statement.close();
	}

	@Test public void executeBatchShouldWorkWhenError() throws SQLException {
		connection.setAutoCommit(true);
		Statement statement = connection.createStatement();
		statement.addBatch(StatementData.STATEMENT_CREATE);
		statement.addBatch(StatementData.STATEMENT_CREATE);
		statement.addBatch("wrong query");
		statement.addBatch(StatementData.STATEMENT_CREATE);

		try {
			statement.executeBatch();
			fail();
		} catch (BatchUpdateException e){
			assertArrayEquals(new int[]{1, 1}, e.getUpdateCounts());
		}

		JdbcConnectionTestUtils.executeTransactionally(neo4j, StatementData.STATEMENT_CREATE_REV);
		statement.close();
	}

	@Test public void executeBatchShouldWorkWithTransaction() throws SQLException {
		Statement statement = connection.createStatement();
		connection.setAutoCommit(false);
		statement.addBatch(StatementData.STATEMENT_CREATE);
		statement.addBatch(StatementData.STATEMENT_CREATE);
		statement.addBatch(StatementData.STATEMENT_CREATE);

		try (org.neo4j.driver.Driver driver = GraphDatabase.driver(neo4j.getBoltUrl());
			 Session session = driver.session()) {
			Result res = session.run(StatementData.STATEMENT_COUNT_NODES);
			while (res.hasNext()){
				assertEquals(0L, res.next().get("total").asLong());
			}
		}

		int[] result = statement.executeBatch();

		assertArrayEquals(new int[]{1, 1, 1}, result);

		connection.commit();

		try (org.neo4j.driver.Driver driver = GraphDatabase.driver(neo4j.getBoltUrl());
			 Session session = driver.session()) {
			Result res = session.run(StatementData.STATEMENT_COUNT_NODES);
			while (res.hasNext()){
				assertEquals(3L, res.next().get("total").asLong());
			}
		}

		JdbcConnectionTestUtils.executeTransactionally(neo4j, StatementData.STATEMENT_CREATE_REV);
		statement.close();

	}

	/*------------------------------*/
	/*             close            */
	/*------------------------------*/
	@Test public void closeShouldNotCloseTransaction() throws SQLException {
		connection.setAutoCommit(false);

		Statement statement = connection.createStatement();
		statement.execute("RETURN true AS result");
		statement.close();

		assertTrue(((BoltNeo4jConnection) connection).getTransaction().isOpen());
	}

	/*
	Array
	 */

	@Test public void testGetEmptyArrayByIndex() throws SQLException {
		connection.setAutoCommit(true);

		Statement statement = connection.createStatement();
		statement.execute("RETURN [] AS result");

		ResultSet resultSet = statement.getResultSet();
		resultSet.next();
		Array array = resultSet.getArray(1);
		Object[] arrayResult = (Object[]) array.getArray();
		assertEquals(0, arrayResult.length);

		statement.close();
	}

	@Test public void testGetEmptyArrayByName() throws SQLException {
		connection.setAutoCommit(true);

		Statement statement = connection.createStatement();
		statement.execute("RETURN [] AS result");

		ResultSet resultSet = statement.getResultSet();
		resultSet.next();
		Array array = resultSet.getArray("result");
		Object[] arrayResult = (Object[]) array.getArray();
		assertEquals(0, arrayResult.length);

		statement.close();
	}

	@Test public void testGetOneArrayByIndex() throws SQLException {
		connection.setAutoCommit(true);

		Statement statement = connection.createStatement();
		statement.execute("RETURN [10] AS result");

		ResultSet resultSet = statement.getResultSet();
		resultSet.next();
		Array array = resultSet.getArray(1);
		Long[] arrayResult = (Long[]) array.getArray();
		assertEquals(new Long(10), arrayResult[0]);

		statement.close();
	}

	@Test public void testGetOneArrayByName() throws SQLException {
		connection.setAutoCommit(true);

		Statement statement = connection.createStatement();
		statement.execute("RETURN [10] AS result");

		ResultSet resultSet = statement.getResultSet();
		resultSet.next();
		Array array = resultSet.getArray("result");
		Long[] arrayResult = (Long[]) array.getArray();
		assertEquals(new Long(10), arrayResult[0]);

		statement.close();
	}

	@Test public void testCallProcedure() throws SQLException {
		connection.setAutoCommit(true);

		try (Statement statement = connection.createStatement()) {
			statement.execute("CALL db.schema.visualization");

			ResultSet resultSet = statement.getResultSet();
			resultSet.next();
			Array arrayNodes = resultSet.getArray("nodes");
			Object[] nodesArray = (Object[]) arrayNodes.getArray();
			assertEquals(0, nodesArray.length);
			Array arrayRels = resultSet.getArray("relationships");
			Object[] relsArray = (Object[]) arrayRels.getArray();
			assertEquals(0, relsArray.length);
		}
	}

	@Test public void testSimpleReturn() throws SQLException {
		connection.setAutoCommit(true);

		try (Statement statement = connection.createStatement()) {
			statement.execute("RETURN 1 AS id");

			ResultSet resultSet = statement.getResultSet();
			resultSet.next();
			final long id = resultSet.getLong("id");
			assertEquals(1L, id);
		}
	}

	@Test public void testUnwindNope() throws SQLException {
		connection.setAutoCommit(true);

		try (Statement statement = connection.createStatement()) {
			final boolean execute = statement.execute("UNWIND [] AS nope RETURN nope");
			assertTrue(execute);

			ResultSet resultSet = statement.getResultSet();
			resultSet.next();
			final Object nope = resultSet.getObject("nope");
			assertNull(nope);
		}
	}

	@Test public void testCreate() throws SQLException {
		connection.setAutoCommit(true);

		try (Statement statement = connection.createStatement()) {
			final boolean execute = statement.execute("CREATE (n:NodeTestToDelete)");
			assertFalse(execute);
			assertNull(statement.getResultSet());
		}
		JdbcConnectionTestUtils.executeTransactionally(neo4j, "MATCH (n:NodeTestToDelete) DELETE n");
	}

	@Test public void testExplain() throws SQLException {
		connection.setAutoCommit(true);

		try (Statement statement = connection.createStatement()) {
			final boolean execute = statement.execute("EXPLAIN CREATE (n:NodeTestToDelete)");
			assertFalse(execute);
			assertNull(statement.getResultSet());
		}
	}

	@Test public void testProfile() throws SQLException {
		connection.setAutoCommit(true);

		try (Statement statement = connection.createStatement()) {
			final boolean execute = statement.execute("PROFILE CREATE (n:NodeTestToDelete)");
			assertFalse(execute);
			assertNull(statement.getResultSet());
		}
		JdbcConnectionTestUtils.executeTransactionally(neo4j, "MATCH (n:NodeTestToDelete) DELETE n");
	}

}


text:
sap.ui.define(["exports", "sap/ui/webc/common/thirdparty/base/UI5Element"], function (_exports, _UI5Element) {
  "use strict";

  Object.defineProperty(_exports, "__esModule", {
    value: true
  });
  _exports.default = void 0;
  _UI5Element = _interopRequireDefault(_UI5Element);

  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

  /**
   * @public
   */
  const metadata = {
    tag: "ui5-menu-item",
    properties:
    /** @lends sap.ui.webcomponents.main.MenuItem.prototype */
    {
      /**
       * Defines the text of the tree item.
       *
       * @type {String}
       * @defaultValue ""
       * @public
       */
      text: {
        type: String
      },

      /**
       * Defines the icon to be displayed as graphical element within the component.
       * The SAP-icons font provides numerous options.
       *

       * Example:
       * See all the available icons in the <ui5-link target="_blank" href="https://openui5.hana.ondemand.com/test-resources/sap/m/demokit/iconExplorer/webapp/index.html" class="api-table-content-cell-link">Icon Explorer</ui5-link>.
       *
       * @type {string}
       * @defaultvalue ""
       * @public
       */
      icon: {
        type: String
      },

      /**
       * Defines whether a visual separator should be rendered before the item.
       *
       * @type {boolean}
       * @defaultvalue false
       * @public
       */
      startsSection: {
        type: Boolean
      },

      /**
       * Defines whether ui5-menu-item is in disabled state.
       *

       * Note: A disabled ui5-menu-item is noninteractive.
       * @type {boolean}
       * @defaultvalue false
       * @public
       */
      disabled: {
        type: Boolean
      },

      /**
       * Indicates if the any of the element siblings have children items.
       * @type {boolean}
       * @private
       */
      _siblingsWithChildren: {
        type: Boolean,
        noAttribute: true
      },

      /**
       * Indicates if the any of the element siblings have icon.
       * @type {boolean}
       * @private
       */
      _siblingsWithIcon: {
        type: Boolean,
        noAttribute: true
      },

      /**
       * Stores Menu object with submenu items
       * @type {object}
       * @private
       */
      _subMenu: {
        type: Object
      },

      /**
       * Defines whether the submenu closing must be prevented
       * @type {boolean}
       * @private
       */
      _preventSubMenuClose: {
        type: Boolean,
        noAttribute: true
      }
    },
    managedSlots: true,
    slots:
    /** @lends sap.ui.webcomponents.main.MenuItem.prototype */
    {
      /**
       * Defines the items of this component.
       *
       * @type {sap.ui.webcomponents.main.IMenuItem[]}
       * @slot items
       * @public
       */
      "default": {
        propertyName: "items",
        type: HTMLElement,
        invalidateOnChildChange: true
      }
    }
  };
  /**
   * @class
   *
   *
Overview

   *
   * ui5-menu-item is the item to use inside a ui5-menu.
   * An arbitrary hierarchy structure can be represented by recursively nesting menu items.
   *
   *
Usage

   *
   * ui5-menu-item is an abstract element, representing a node in a ui5-menu. The menu itself is rendered as a list,
   * and each ui5-menu-item is represented by a list item (ui5-li) in that list. Therefore, you should only use
   * ui5-menu-item directly in your apps. The ui5-li list item is internal for the list, and not intended for public use.
   *
   * For the ui5-menu-item
   *
ES6 Module Import

   *
   * import @ui5/webcomponents/dist/MenuItem.js";
   *
   * @constructor
   * @author SAP SE
   * @alias sap.ui.webcomponents.main.MenuItem
   * @extends UI5Element
   * @tagname ui5-menu-item
   * @implements sap.ui.webcomponents.main.IMenuItem
   * @since 1.3.0
   * @public
   */

  class MenuItem extends _UI5Element.default {
    static get metadata() {
      return metadata;
    }

    get hasChildren() {
      return !!this.items.length;
    }

    get hasDummyIcon() {
      return this._siblingsWithIcon && !this.icon;
    }

    get subMenuOpened() {
      return !!Object.keys(this._subMenu).length;
    }

  }

  MenuItem.define();
  var _default = MenuItem;
  _exports.default = _default;
});


text:
package com.example.hp.exercise10_sharepreference;

import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;

import com.google.gson.Gson;
/**
 * Created by hp on 12/31/2016.
 */

public class Pref {
    SharedPreferences preferences;
    SharedPreferences.Editor editor;
    Context mycontex;
    public static String SettingKey = "setting";
    private static String domain = "myapp";
    public Pref(Context context)
    {
        mycontex = context;
        preferences = mycontex.getSharedPreferences(domain,mycontex.MODE_PRIVATE);
        editor = preferences.edit();
    }
    public Setting getsetting()
    {
        Gson gson  = new Gson();
        Setting output;
        output = gson.fromJson(preferences.getString(SettingKey,""),Setting.class);
        return  output;
    }
    public void setsetting(Setting input)
    {
        Gson gson  = new Gson();
        editor.putString(SettingKey,gson.toJson(input));
        editor.commit();
    }
    public void initialize()
    {

        Setting empty =  new Setting();

        empty.setUsername("");
        empty.setUsername("");
        empty.setThemecolor("");
        Gson gson  = new Gson();

        editor.putString(SettingKey,gson.toJson(empty));

        editor.commit();

    }

}


text:
namespace Eunomia.NET.Interfaces.Parsers
{
    public interface IDocumentBuilderFactory
    {
        IDocumentBuilderFactory NewInstance();
    }
}


text:
import NBA from 'nba'
import request from 'superagent'

module.exports = (playerName, dispatch) => {
  const playerToAdd = NBA.findPlayer(playerName)
  if(playerToAdd) {
    dispatch({type: 'INITIATE_PLAYER', payload: {
      playerId: playerToAdd.playerId,
      playerName: playerToAdd.fullName
    }})
    dispatch({type: 'HANDLE_FORM_NAME_CHANGE', payload: ""})
    dispatch({type: 'CLEAR_SUGGESTIONS'})
    NBA.stats.playerProfile({ PlayerID: playerToAdd.playerId})
      .then(function (response) {
        const playerInfo = response.careerTotalsRegularSeason[0]
        playerInfo.playerName = playerName
        dispatch({type: 'HYDRATE_PLAYER', payload: playerInfo})
      })
  }
}


text:
/*
 * src/wish_frame.h
 *
 * This file is a source file from the libwish project.
 * You are free to distribute it as long as you respect the terms
 * and conditions of the MIT license.
 *
 * (c) Maxime Bacoux, 2016 - 2017
 */

#ifndef WISH_FRAME_H
#define WISH_FRAME_H

#include <wish.h>

struct wish_frame_s
{
    wish_unicode*   ch;
    wish_attr*      attr;
    wish_size       cursor;
};

typedef struct wish_frame_s wish_frame;

void wish_frame_init(wish_frame* frame, int w, int h);
void wish_frame_resize(wish_frame* frame, int w, int h);
void wish_frame_copy(wish_frame* dst, wish_frame* src, int w, int h);
void wish_frame_free(wish_frame* frame);

#endif


text:
// Defines the CLStream type - the CL-specific implementation of the generic
// StreamExecutor Stream interface.

#ifndef TENSORFLOW_STREAM_EXECUTOR_CL_CL_STREAM_H_
#define TENSORFLOW_STREAM_EXECUTOR_CL_CL_STREAM_H_

#include "tensorflow/stream_executor/cl/cl_driver.h"
#include "tensorflow/stream_executor/platform/thread_annotations.h"
#include "tensorflow/stream_executor/stream_executor_internal.h"

#include <iostream>

namespace perftools {
namespace gputools {
namespace cl {

class CLExecutor;

// Wraps a CUstream in order to satisfy the platform-independent
// StreamInterface.
//
// Thread-safe post-initialization.
class CLStream : public internal::StreamInterface {
 public:
  explicit CLStream(CLExecutor *parent)
      : parent_(parent), cl_stream_(nullptr), completed_event_(nullptr) {}

  // Note: teardown is handled by a parent's call to DeallocateStream.
  ~CLStream() override {}

  void *CudaStreamHack() override {
    std::cout << "cl_stream.h CLStream::CudaStreamHack()" << std::endl;
    return cl_stream_;
  }
  void **CudaStreamMemberHack() override {
    // std::cout << "cl_stream.h CLStream::CudaStreamMemberHack()" << std::endl;
    return reinterpret_cast<void **>(&cl_stream_);
  }

  // Explicitly initialize the CL resources associated with this stream, used
  // by StreamExecutor::AllocateStream().
  bool Init();

  // Explicitly destroy the CL resources associated with this stream, used by
  // StreamExecutor::DeallocateStream().
  void Destroy();

  // Returns true if no work is pending or executing on the stream.
  bool IsIdle() const;

  // Retrieves an event which indicates that all work enqueued into the stream
  // has completed. Ownership of the event is not transferred to the caller, the
  // event is owned by this stream.
  CUevent* completed_event() { return &completed_event_; }

  // Returns the CUstream value for passing to the CL API.
  //
  // Precond: this CLStream has been allocated (otherwise passing a nullptr
  // into the NVIDIA library causes difficult-to-understand faults).
  CUstream cl_stream() const {
    // std::cout << "cl_stream.h CLStream::cl_stream()" << std::endl;
    DCHECK(cl_stream_ != nullptr);
    return const_cast<CUstream>(cl_stream_);
  }

  CLExecutor *parent() const { return parent_; }

 private:
  CLExecutor *parent_;  // Executor that spawned this stream.
  CUstream cl_stream_;  // Wrapped CL stream handle.

  // Event that indicates this stream has completed.
  CUevent completed_event_ = nullptr;
};

// Helper functions to simplify extremely common flows.
// Converts a Stream to the underlying CLStream implementation.
CLStream *AsCLStream(Stream *stream);

// Extracts a CUstream from a CLStream-backed Stream object.
CUstream AsCLStreamValue(Stream *stream);

}  // namespace cl
}  // namespace gputools
}  // namespace perftools

#endif  // TENSORFLOW_STREAM_EXECUTOR_CL_CL_STREAM_H_


text:
<!DOCTYPE html>

	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
	<title>Find Distance Along Line</title>
	<link rel="stylesheet" href="https://js.arcgis.com/3.21/esri/css/esri.css">
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

Find Distance Along A Line

Select a linear unit, enter a distance and click the "Place Point" buton to place a marker on the line the specified distance from the start.

Got It!

			Unit
			<select class="form-control input-elements" id="unit">
				<option>Feet</option>
				<option>Yards</option>
				<option>Miles</option>
				<option>Meters</option>
				<option>Kilometers</option>
			</select>

			Distance
			<input type = "text" class = "form-control input-elements" id = "distance" >

			<button id = "placePointBtn" type = "submit" class = "btn btn-primary">Place Point</button>


text:
var PresetShareController = require('./controller.PresetShare.common.js');
var PresetController = require('./controller.Preset.common.js');
var PresetRenderController = require('./controller.PresetRender.common.js');
var AddNewWidgetController = require('./controller.AddNewWidget.common.js');

LOGPRESSO.shared.presetVersion = '1.5.1';
LOGPRESSO.shared.renderPresetVersion;

logpresso.controller('PresetShareController', PresetShareController);
logpresso.controller('PresetController', PresetController);
logpresso.controller('PresetRenderController', ['$scope', '$element', '$timeout', '$compile', 'socket', 'eventSender', 'serviceWorkerLogdb', 'serviceDashboardWidget', 'serviceWidget', 'serviceTranslate', 'serviceUtility', PresetRenderController]);
logpresso.controller('AddNewWidgetController', ['$scope', '$element', '$timeout', 'serviceTranslate', 'serviceLogdb', 'serviceDashboardWidget', 'serviceWorkerLogdb', 'serviceUtility', 'eventSender', '$injector', 'serviceWidget', 'serviceNotification', '$window', AddNewWidgetController]);

logpresso.controller('DashboardController', ['$scope', '$rootScope', '$element', 'socket', 'eventSender', '$timeout', function DashboardController($scope, $rootScope, $element, socket, eventSender, $timeout) {
	$scope.isShowDataSource = false;

	eventSender.dashboard.$event.on('suspend', function() {
		$timeout(function() {
			$element.find('button.b-pause').click();
		});

	});
	eventSender.dashboard.$event.on('resume', function() {
		$timeout(function() {
			$element.find('button.b-play').click();
			eventSender.dashboard.resizeWidgets();
		});
	});

	$timeout(function() {
		eventSender.dashboard.initPreset();
	});

	$('#view-dashboard').addClass('out');

	$(window).on('resize', debounce(function() {
		eventSender.dashboard.resizeWidgets();
	}, 200));

	$rootScope.$on('msg:cannotRunQueryDetailView', function(event,args){
		$scope.query = args.query;
		$scope.raw = args.raw;
		$element.find('.showDetailCannotRunQuery')[0].showDialog();
	});
}]);

logpresso.controller('WidgetPropertyReadonlyController', function($scope, eventSender) {
	eventSender.dashboard.sendWidgetContextToPropertyReadonlyWindow = function(context) {
		$scope.ctx = context;
	}
});

logpresso.controller('WidgetPropertyEditController', ['$scope', '$element', 'eventSender', 'serviceWidget', '$timeout', 'serviceLogdb', 'serviceWorkerLogdb', 'serviceUtility', 'serviceNotification', 'serviceTranslate', function WidgetPropertyEditController($scope, $element, eventSender, serviceWidget, $timeout, serviceLogdb, serviceWorkerLogdb, serviceUtility, serviceNotification, serviceTranslate) {
	$scope.step = {
		id: 'loading'
	};

	$scope.dataFields;
	$scope.columnInfo = [];
	var saveCallback;

	/* 데이터소스 변경 */
	$scope.queryString = '';
	$scope.dataModel = [];

	$scope.onLoading = function() {
		$scope.dataModel = [];
		$scope.$digest();
	}

	$scope.onFailed = function(raw, type, note) {
		serviceNotification.notify({
			type: 'error',
			title: serviceTranslate('$S_str_ErrorRunQuery'),
			msg: serviceTranslate('$S_msg_ErrorRunQuery',{'p0': note}),
			autohide: false
		});
	}

	$scope.onTail = function(helper) {
		var qi = $element.find('query-input')[0];
		qi.getInstance().getResult(0, 300, function(m) {
			$scope.ctx.data.query = $scope.queryString;
			serviceWorkerLogdb.data.getColumnType(m.body.result, function(types) {

				var ctxcnt = $element.find('*[context-container]')[0];

				if(JSON.stringify($scope.columnInfo) != JSON.stringify(types)) {
					$scope.columnInfo = types;
					ctxcnt.setColumnInfo($scope.columnInfo);
				}

				$scope.dataModel = m.body.result;
				$scope.dataFields = m.body.field_order;
				ctxcnt.setDataModel($scope.dataModel);

				$scope.$apply();
			});
		});

	}

	/* 컨텍스트 변경 */
	$scope.ctx;
	$scope.ctxOriginal;
	$scope.resultctx;
	var rendered;

	$scope.types = serviceWidget.getTypes();

	function preview() {
		var canvas = $element.find('.preview');
		canvas.empty();

		$scope.step.id = 'preview';

		try {
			logpresso.inject.dashboardWidget($scope.ctxOriginal.type).success(function(service) {
				rendered = service.render(canvas, $scope.dataModel, $scope.resultctx);

				$timeout(function() {
					canvas.find('*[disabled-on-preview]').remove();
				});
			});

		}
		catch(e) {
			console.log($scope.selectedType.id, e)
		}
	}

	function getContextResult() {
		if(angular.isDefined(rendered)) {
			if(angular.isFunction(rendered.onDestroy)) {
				rendered.onDestroy();
			}
		}

		return $element.find('*[context-container]')[0].getContext();
		/*
		// 변경 여부 확인
		if(serviceUtility.deepCompare(JSON.parse(angular.toJson($scope.ctxOriginal.data)), JSON.parse(angular.toJson($scope.resultctx)))) {
			notify('success', 'TEST PASSED', true);
		}
		else {
			notify('danger', 'DIFFERENT', true);
		}
		*/
	}

	function openPropertyErrorModal(type, raw) {
		$('.dashboard-container .mdlOpenPropertyError')[0].showDialog();
		$('.dashboard-container .mdlOpenPropertyError .alert').text(type);
		$('.dashboard-container .mdlOpenPropertyError .raw.jsstack').text(raw);
		$('.dashboard-container .mdlOpenPropertyError .raw.ctx').text(JSON.stringify($scope.ctxOriginal));
	}

	function bindContext() {
		try {
			var ctxcnt = $element.find('*[context-container]')[0];
			ctxcnt.setColumnInfo($scope.columnInfo);
		}
		catch(e) {
			openPropertyErrorModal('1. setColumnInfo error',  e.stack);
			$('.dashboard-container .mdlPropertyReadonly')[0].hideDialog();
			$('.dashboard-container .mdlProperty')[0].hideDialog();
		}

		try {
			ctxcnt.setDataModel($scope.dataModel);
		}
		catch(e) {
			openPropertyErrorModal('2. setDataModel error', e.stack);
			$('.dashboard-container .mdlPropertyReadonly')[0].hideDialog();
			$('.dashboard-container .mdlProperty')[0].hideDialog();
		}

		try {
			ctxcnt.setModel($scope.ctx.data);
			$scope.step.id = 'context';
		}
		catch(e) {
			openPropertyErrorModal('3. setModel error', e.stack);
			$('.dashboard-container .mdlPropertyReadonly')[0].hideDialog();
			$('.dashboard-container .mdlProperty')[0].hideDialog();
		}

	}

	eventSender.dashboard.sendWidgetContextToPropertyWindow = function(tbscope, w, onPropertyChanged) {
		// clear
		$scope.columnInfo = [];
		$scope.resultctx = undefined;
		$scope.dataFields = undefined;
		$scope.step.id = 'loading';
		saveCallback = onPropertyChanged;
		$scope.isDarkMode = false;

		$scope.ctxOriginal = w;
		$scope.ctx = angular.copy(w);
		$scope.queryString = $scope.ctx.data.query;
		$scope.dataModel = tbscope._data;

		var found = $scope.types.filter(function(type) {
			return type.id === w.type;
		});

		if(found.length == 0) return;

		if(tbscope._data == null) {
			// 아직 데이터가 로딩되지 않은 경우, 컨텍스트는 보여야하니까...
			var src = 'apps/' + found[0].manifest + '/' + found[0].id + '/' + found[0].property;

			if($scope.srcPropertySheet == src) {
				bindContext();
			}
			else {
				$scope.srcPropertySheet = src;
			}
			setTimeout(function() {
				$scope.$apply();
			},100);
			return;
		}

		// 데이터가 이미 다 로딩된 경우, 컨텍스트 및 데이터까지 한꺼번에 보이기
		serviceWorkerLogdb.data.getColumnType(tbscope._data, function(types) {
			types = types.filter(function(t) {
				return t.key !== '$$hashKey';
			});
			// clean data
			// tbscope._data = null;
			// delete tbscope._data;
			// 주석처리함: 이거 하면 두번째 info 눌렀을때 데이터를 못봄...

			$scope.columnInfo = types;
			var src = 'apps/' + found[0].manifest + '/' + found[0].id + '/' + found[0].property;

			if($scope.srcPropertySheet == src) {
				bindContext();
			}
			else {
				$scope.srcPropertySheet = src;
			}
			$scope.$apply();
		});
	}

	$scope.srcPropertySheet = '';
	$scope.onloadPropertySheet = function() {
		$timeout(bindContext);
	}

	/* 변경사항 저장 */
	$scope.preview = function() {
		if(!$scope.dataModel || !$scope.dataModel.length) {
			notify('danger', serviceTranslate("$S_msg_ErrorNoDataSource"), true);
			$scope.step.id = 'datasource';
			return;
		}

		$scope.resultctx = getContextResult();
		if($scope.resultctx == null) {
			notify('danger', serviceTranslate("$S_msg_ErrorUndefinedProperty"), true);
			$scope.step.id = 'context';
			return;
		}
		else {
			preview();
		}
	}

	$scope.saveChanges = function() {
		if(!$scope.dataModel || !$scope.dataModel.length) {
			notify('danger', serviceTranslate("$S_msg_ErrorNoDataSource"), true);
			$scope.step.id = 'datasource';
			return;
		}

		$scope.resultctx = getContextResult();
		if($scope.resultctx == null) {
			notify('danger', serviceTranslate("$S_msg_ErrorUndefinedProperty"), true);
			$scope.step.id = 'context';
			return;
		}
		else {
			$scope.dispose();
			saveCallback($scope.resultctx, $scope.ctx.interval);
		}
	}

	$scope.dispose = function() {
		$element.find('query-input')[0].dispose();
	}

	$scope.isDarkMode = false;
	$scope.$watch('isDarkMode', function() {
		if(!!rendered) {
			if(typeof rendered.setStyle === 'function') {
				rendered.setStyle();
			}
		}
	});

}]);


text:
<!DOCTYPE html>

	<meta charset="UTF-8">
	<title>Week Number on Calendar - jQuery EasyUI Demo</title>
	<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
	<link rel="stylesheet" type="text/css" href="../demo.css">

Week Number on Calendar

This example shows how to display the week number on calendar.


text:
@interface SelectCityViewController : UIViewController

@end


text:
(function() { "use strict";

var Util = require("../modules/util");

function Commander(world)
{
    this.world = world;
    this.commanders = {};
}

Commander.prototype = {
    constructor: Commander
};

Commander.prototype.push = function(frame, commander)
{
    if (!frame || frame < this.world.frame) {
        return;
    }
    if (!this.commanders[frame]) {
        this.commanders[frame] = [];
    }
    if (commander) {
        this.commanders[frame].push(commander);
    }
};

Commander.prototype.exeJoin = function(commander)
{
    // update random seed
    if (commander.join.ai === false) {
        this.world.seed = commander.connid;
    }

    // join
    var player = this.world.players[commander.connid];
    if (player) {
        Util.logError("player[" + commander.connid + "] already existed");
        return false;
    }
    player = this.world.addPlayer(commander.connid, commander.join.name);
    if (!player) {
        return false;
    }

    player.createTank();

    // server run ai logic
    if (commander.join.ai === true && this.world.isLocal === false) {
        player.tank.bindAI();
    }
    return true;
};

Commander.prototype.exeQuit = function(commander)
{
    this.world.removePlayer(commander.connid);
    return true;
};

Commander.prototype.exeReborn = function(commander)
{
    var player = this.world.players[commander.connid];
    if (!player) {
        Util.logError("player[" + commander.connid + "] not found");
        return false;
    }
    if (player.tank) {
        Util.logError("player[" + commander.connid + "] tank existed");
        return false;
    }
    player.createTank();
    player.name = commander.reborn.name;
    return true;
};

Commander.prototype.exeMove = function(commander)
{
    var player = this.world.players[commander.connid];
    if (!player) {
        Util.logError("player[" + commander.connid + "] not found");
        return false;
    }
    if (!player.tank) {
        Util.logError("player[" + commander.connid + "] tank not found");
        return false;
    }
    player.tank.motion.forceAngle = commander.move.angle;
    player.tank.motion.force = commander.move.force;
    return true;
};

Commander.prototype.exeRotate = function(commander)
{
    var player = this.world.players[commander.connid];
    if (!player) {
        Util.logError("player[" + commander.connid + "] not found");
        return false;
    }
    if (!player.tank) {
        Util.logError("player[" + commander.connid + "] tank not found");
        return false;
    }
    player.tank.rotation = commander.rotate.angle;
    return true;
};

Commander.prototype.exeFire = function(commander)
{
    var player = this.world.players[commander.connid];
    if (!player) {
        Util.logError("player[" + commander.connid + "] not found");
        return false;
    }
    if (!player.tank) {
        Util.logError("player[" + commander.connid + "] tank not found");
        return false;
    }
    player.tank.revertFireStatus();
    return true;
};

Commander.prototype.exeAddProp = function(commander)
{
    var player = this.world.players[commander.connid];
    if (!player) {
        Util.logError("player[" + commander.connid + "] not found");
        return false;
    }
    if (!player.tank) {
        Util.logError("player[" + commander.connid + "] tank not found");
        return false;
    }
    var pt = commander.addProp.propType;
    if (player.tank.freeSkillPoints <= 0) {
        Util.logError("player[" + commander.connid + "] tank no free skill points");
        return false;
    }
    if (player.tank.addProp(pt) !== true) {
        Util.logError("player[" + commander.connid + "] tank add prop[" + pt + "] fail");
        return false;
    }
    -- player.tank.freeSkillPoints;
    if (this.world.stagePropView) {
        if (player === this.world.getSelf()) {
            this.world.stagePropView.onPropAdd(pt);
        }
    }
    return true;
};

Commander.prototype.execute = function()
{
    var commanders = this.commanders[this.world.frame];
    var dispatchCommanders = [];
    var ct = this.world.proto.CommanderType;
    if (commanders) {
        for (var i in commanders) {
            var commander = commanders[i];
            var result = false;
            switch (commander.cmd) {
                case ct.CT_JOIN:
                    result = this.exeJoin(commander);
                    break;
                case ct.CT_QUIT:
                    result = this.exeQuit(commander);
                    break;
                case ct.CT_REBORN:
                    result = this.exeReborn(commander);
                    break;
                case ct.CT_MOVE:
                    result = this.exeMove(commander);
                    break;
                case ct.CT_ROTATE:
                    result = this.exeRotate(commander);
                    break;
                case ct.CT_FIRE:
                    result = this.exeFire(commander);
                    break;
                case ct.CT_ADD_PROP:
                    result = this.exeAddProp(commander);
                    break;
                default:
                    Util.logError("invalid commander:" + commander.cmd);
                    break;
            }
            if (result !== true) {
                Util.logError("commander[" + commander.cmd + "] execute error ignore");
            } else {
                Util.logDebug("frame[" + this.world.frame + "] client[" + commander.connid + "] cmd=" + commander.cmd);
                dispatchCommanders.push(commander);
            }
        }
    }

    // server dispatcher
    if (this.world.isLocal === false) {
        this.world.synchronizer.syncCommanders(dispatchCommanders);

        // dump commander record
        if (this.world.recorder) {
            this.world.recorder.append(this.world.frame, dispatchCommanders);
        }
    }

    // release
    delete this.commanders[this.world.frame];
};

module.exports = Commander;

})();


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace Web.Controllers
{
    public class ValuesController : ApiController
    {
        // GET api/values
        public IEnumerable<string> Get()
        {
            return new string[] { "value1", "value2" };
        }

        // GET api/values/5
        public string Get(int id)
        {
            return "value";
        }

        // POST api/values
        public void Post([FromBody]string value)
        {
        }

        // PUT api/values/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/values/5
        public void Delete(int id)
        {
        }
    }
}


text:
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Carnage-X</title>

    <script type="text/javascript" src="src/libs/underscore/underscore-1.6.0.js"></script>
    <script type="text/javascript" src="src/game/config.js"></script>
    <script type="text/javascript" src="src/engine/core.js"></script>
    <script type="text/javascript" src="src/game/main.js"></script>
</head>
<body>
</body>
</html>


text:
const KoaRouter = require('koa-router');

const router = new KoaRouter();

router.get('hello', '/', async (ctx) => {
  await ctx.render('hello/index', {
    nameUrl: name => ctx.router.url('hello.name', name),
    notice: ctx.flashMessage.notice,
  });
});

router.post('hello', '/', async (ctx) => {
  ctx.flashMessage.notice = 'Form successfully processed';
  // this is just to show how to send an e-mail using a mailer helper fn
  // but it will never be executed
  ctx.redirect(router.url('hello'));
});

router.get('hello.name', '/:name', (ctx) => {
  ctx.body = { message: `Hello ${ctx.params.name}!` };
});

module.exports = router;


text:
namespace {

class Impl : public dap::net::Server {
 public:
  Impl() : stopped{true} {}

  ~Impl() { stop(); }

  bool start(int port,
             const OnConnect& onConnect,
             const OnError& onError) override {
    std::unique_lock<std::mutex> lock(mutex);
    stopWithLock();
    socket = std::unique_ptr<dap::Socket>(
        new dap::Socket("localhost", std::to_string(port).c_str()));

    if (!socket->isOpen()) {
      onError("Failed to open socket");
      return false;
    }

    stopped = false;
    thread = std::thread([=] {
      while (true) {
        if (auto rw = socket->accept()) {
          onConnect(rw);
          continue;
        }
        if (!stopped) {
          onError("Failed to accept connection");
        }
        break;
      };
    });

    return true;
  }

  void stop() override {
    std::unique_lock<std::mutex> lock(mutex);
    stopWithLock();
  }

 private:
  bool isRunning() { return !stopped; }

  void stopWithLock() {
    if (!stopped.exchange(true)) {
      socket->close();
      thread.join();
    }
  }

  std::mutex mutex;
  std::thread thread;
  std::unique_ptr<dap::Socket> socket;
  std::atomic<bool> stopped;
  OnError errorHandler;
};

}  // anonymous namespace

namespace dap {
namespace net {

std::unique_ptr<Server> Server::create() {
  return std::unique_ptr<Server>(new Impl());
}

std::shared_ptr<ReaderWriter> connect(const char* addr,
                                      int port,
                                      uint32_t timeoutMillis) {
  return Socket::connect(addr, std::to_string(port).c_str(), timeoutMillis);
}

}  // namespace net
}  // namespace dap


text:
import optparse
from puqutil import dump_hdf5
from numpy import sin, pi

usage = "usage: %prog --x x"
parser = optparse.OptionParser(usage)
parser.add_option("--x", type=float)
(options, args) = parser.parse_args()
x = options.x
f = sin(x % (pi/2))
dump_hdf5('f', f, "$f(x)= sin(x\ mod\ \\frac{\pi}{2})$")


text:
//
//  ReadMe.h
//  ReadMe
//
//  Created by Benoît Layer on 08/03/2014.
//  Copyright (c) 2014 Benoît Layer. All rights reserved.
//

#import <Foundation/Foundation.h>

@class ReadMe;

@protocol ReadMeDelegate <NSObject>
/**
 Called on the delegate when a new word should be diplayed. This method is called on the main thread.
 @param readMe The readme object.
 @param newWord The word to be diplayed.
 @param orp Optimal recognition point. The place where the eyes should focus. Usually resulting in a colored letter. Index starting to 0 for first letter
 */
- (void)readMe:(ReadMe *)readMe didReadWord:(NSString *)newWord withORP:(int)orp;

/**
 Called when ReadMe has finished parsing a text.
 @param readMe The readme object.
 */
- (void)readMeDidFinishReading:(ReadMe *)readMe;
@end

@interface ReadMe : NSObject

@property (nonatomic, weak) id<ReadMeDelegate>  delegate;
@property (nonatomic)       int                 wordsPerMinute;

/**
 Returns the ReadMe singleton.
 @return The readme singleton.
 */
+ (instancetype)sharedInstance;

/**
 Stops the readme process.
 */
- (void)stopReading;

/**
 Starts the readme process.
 @param text The whole text to read.
 */
- (void)readText:(NSString *)text;

@end


text:
/** @file
 * Implementiation of a PL111 CLCD controller
 */

#ifndef __DEV_ARM_PL111_HH__
#define __DEV_ARM_PL111_HH__

#include <fstream>
#include <memory>

#include "base/bmpwriter.hh"
#include "base/framebuffer.hh"
#include "base/output.hh"
#include "dev/arm/amba_device.hh"
#include "params/Pl111.hh"
#include "sim/serialize.hh"

namespace gem5
{

class VncInput;

class Pl111: public AmbaDmaDevice
{
  protected:
    static const uint64_t AMBA_ID       = 0xb105f00d00141111ULL;
    /** ARM PL111 register map*/
    static const int LcdTiming0       = 0x000;
    static const int LcdTiming1       = 0x004;
    static const int LcdTiming2       = 0x008;
    static const int LcdTiming3       = 0x00C;
    static const int LcdUpBase        = 0x010;
    static const int LcdLpBase        = 0x014;
    static const int LcdControl       = 0x018;
    static const int LcdImsc          = 0x01C;
    static const int LcdRis           = 0x020;
    static const int LcdMis           = 0x024;
    static const int LcdIcr           = 0x028;
    static const int LcdUpCurr        = 0x02C;
    static const int LcdLpCurr        = 0x030;
    static const int LcdPalette       = 0x200;
    static const int CrsrImage        = 0x800;
    static const int ClcdCrsrCtrl     = 0xC00;
    static const int ClcdCrsrConfig   = 0xC04;
    static const int ClcdCrsrPalette0 = 0xC08;
    static const int ClcdCrsrPalette1 = 0xC0C;
    static const int ClcdCrsrXY       = 0xC10;
    static const int ClcdCrsrClip     = 0xC14;
    static const int ClcdCrsrImsc     = 0xC20;
    static const int ClcdCrsrIcr      = 0xC24;
    static const int ClcdCrsrRis      = 0xC28;
    static const int ClcdCrsrMis      = 0xC2C;

    static const int LcdPaletteSize   = 128;
    static const int CrsrImageSize    = 256;

    static const int LcdMaxWidth      = 1024; // pixels per line
    static const int LcdMaxHeight     = 768;  // lines per panel

    static const int dmaSize            = 8;    // 64 bits
    static const int maxOutstandingDma  = 16;   // 16 deep FIFO of 64 bits

    static const int buffer_size = LcdMaxWidth * LcdMaxHeight * sizeof(uint32_t);

    enum LcdMode
    {
        bpp1 = 0,
        bpp2,
        bpp4,
        bpp8,
        bpp16,
        bpp24,
        bpp16m565,
        bpp12
    };

    BitUnion8(InterruptReg)
        Bitfield<1> underflow;
        Bitfield<2> baseaddr;
        Bitfield<3> vcomp;
        Bitfield<4> ahbmaster;
    EndBitUnion(InterruptReg)

    BitUnion32(TimingReg0)
        Bitfield<7,2> ppl;
        Bitfield<15,8> hsw;
        Bitfield<23,16> hfp;
        Bitfield<31,24> hbp;
    EndBitUnion(TimingReg0)

    BitUnion32(TimingReg1)
        Bitfield<9,0> lpp;
        Bitfield<15,10> vsw;
        Bitfield<23,16> vfp;
        Bitfield<31,24> vbp;
    EndBitUnion(TimingReg1)

    BitUnion32(TimingReg2)
        Bitfield<4,0> pcdlo;
        Bitfield<5> clksel;
        Bitfield<10,6> acb;
        Bitfield<11> avs;
        Bitfield<12> ihs;
        Bitfield<13> ipc;
        Bitfield<14> ioe;
        Bitfield<25,16> cpl;
        Bitfield<26> bcd;
        Bitfield<31,27> pcdhi;
    EndBitUnion(TimingReg2)

    BitUnion32(TimingReg3)
        Bitfield<6,0> led;
        Bitfield<16> lee;
    EndBitUnion(TimingReg3)

    BitUnion32(ControlReg)
        Bitfield<0> lcden;
        Bitfield<3,1> lcdbpp;
        Bitfield<4> lcdbw;
        Bitfield<5> lcdtft;
        Bitfield<6> lcdmono8;
        Bitfield<7> lcddual;
        Bitfield<8> bgr;
        Bitfield<9> bebo;
        Bitfield<10> bepo;
        Bitfield<11> lcdpwr;
        Bitfield<13,12> lcdvcomp;
        Bitfield<16> watermark;
    EndBitUnion(ControlReg)

    /**
     * Event wrapper for dmaDone()
     *
     * This event calls pushes its this pointer onto the freeDoneEvent
     * vector and calls dmaDone() when triggered.
     */
    class DmaDoneEvent : public Event
    {
      private:
        Pl111 &obj;

      public:
        DmaDoneEvent(Pl111 *_obj)
            : Event(), obj(*_obj) {}

        void process() {
            obj.dmaDoneEventFree.push_back(this);
            obj.dmaDone();
        }

        const std::string name() const {
            return obj.name() + ".DmaDoneEvent";
        }
    };

    /** Horizontal axis panel control register */
    TimingReg0 lcdTiming0;

    /** Vertical axis panel control register */
    TimingReg1 lcdTiming1;

    /** Clock and signal polarity control register */
    TimingReg2 lcdTiming2;

    /** Line end control register */
    TimingReg3 lcdTiming3;

    /** Upper panel frame base address register */
    uint32_t lcdUpbase;

    /** Lower panel frame base address register */
    uint32_t lcdLpbase;

    /** Control register */
    ControlReg lcdControl;

    /** Interrupt mask set/clear register */
    InterruptReg lcdImsc;

    /** Raw interrupt status register - const */
    InterruptReg lcdRis;

    /** Masked interrupt status register */
    InterruptReg lcdMis;

    /** 256x16-bit color palette registers
     * 256 palette entries organized as 128 locations of two entries per word */
    uint32_t lcdPalette[LcdPaletteSize];

    /** Cursor image RAM register
     * 256-word wide values defining images overlaid by the hw cursor mechanism */
    uint32_t cursorImage[CrsrImageSize];

    /** Cursor control register */
    uint32_t clcdCrsrCtrl;

    /** Cursor configuration register */
    uint32_t clcdCrsrConfig;

    /** Cursor palette registers */
    uint32_t clcdCrsrPalette0;
    uint32_t clcdCrsrPalette1;

    /** Cursor XY position register */
    uint32_t clcdCrsrXY;

    /** Cursor clip position register */
    uint32_t clcdCrsrClip;

    /** Cursor interrupt mask set/clear register */
    InterruptReg clcdCrsrImsc;

    /** Cursor interrupt clear register */
    InterruptReg clcdCrsrIcr;

    /** Cursor raw interrupt status register - const */
    InterruptReg clcdCrsrRis;

    /** Cursor masked interrupt status register - const */
    InterruptReg clcdCrsrMis;

    /** Pixel clock */
    Tick pixelClock;

    PixelConverter converter;
    FrameBuffer fb;

    /** VNC server */
    VncInput *vnc;

    /** Helper to write out bitmaps */
    BmpWriter bmp;

    /** Picture of what the current frame buffer looks like */
    OutputStream *pic;

    /** Frame buffer width - pixels per line */
    uint16_t width;

    /** Frame buffer height - lines per panel */
    uint16_t height;

    /** Bytes per pixel */
    uint8_t bytesPerPixel;

    /** CLCDC supports up to 1024x768 */
    uint8_t *dmaBuffer;

    /** Start time for frame buffer dma read */
    Tick startTime;

    /** Frame buffer base address */
    Addr startAddr;

    /** Frame buffer max address */
    Addr maxAddr;

    /** Frame buffer current address */
    Addr curAddr;

    /** DMA FIFO watermark */
    uint32_t waterMark;

    /** Number of pending dma reads */
    uint32_t dmaPendingNum;

    PixelConverter pixelConverter() const;

    /** Send updated parameters to the vnc server */
    void updateVideoParams();

    /** DMA framebuffer read */
    void readFramebuffer();

    /** Generate dma framebuffer read event */
    void generateReadEvent();

    /** Function to generate interrupt */
    void generateInterrupt();

    /** fillFIFO event */
    void fillFifo();

    /** start the dmas off after power is enabled */
    void startDma();

    /** DMA done event */
    void dmaDone();

    /** DMA framebuffer read event */
    EventFunctionWrapper readEvent;

    /** Fill fifo */
    EventFunctionWrapper fillFifoEvent;

    /**@{*/
    /**
     * All pre-allocated DMA done events
     *
     * The PL111 model preallocates maxOutstandingDma number of
     * DmaDoneEvents to avoid having to heap allocate every single
     * event when it is needed. In order to keep track of which events
     * are in flight and which are ready to be used, we use two
     * different vectors. dmaDoneEventAll contains all
     * DmaDoneEvents that the object may use, while dmaDoneEventFree
     * contains a list of currently unused events. When an
     * event needs to be scheduled, the last element of the
     * dmaDoneEventFree is used and removed from the list. When an
     * event fires, it is added to the end of the
     * dmaEventFreeList. dmaDoneEventAll is never used except for in
     * initialization and serialization.
     */
    std::vector<DmaDoneEvent> dmaDoneEventAll;

    /** Unused DMA done events that are ready to be scheduled */
    std::vector<DmaDoneEvent *> dmaDoneEventFree;
    /**@}*/

    /** Wrapper to create an event out of the interrupt */
    EventFunctionWrapper intEvent;

    bool enableCapture;

  public:
    using Params = Pl111Params;
    Pl111(const Params &p);
    ~Pl111();

    Tick read(PacketPtr pkt) override;
    Tick write(PacketPtr pkt) override;

    void serialize(CheckpointOut &cp) const override;
    void unserialize(CheckpointIn &cp) override;

    /**
     * Determine the address ranges that this device responds to.
     *
     * @return a list of non-overlapping address ranges
     */
    AddrRangeList getAddrRanges() const override;
};

} // namespace gem5

#endif


text:
CREATE TABLE mod_bam_reporting_timeperiods_exclusions (
  timeperiod_id int NOT NULL,
  excluded_timeperiod_id int NOT NULL,

  UNIQUE (timeperiod_id, excluded_timeperiod_id),
  FOREIGN KEY (timeperiod_id) REFERENCES mod_bam_reporting_timeperiods (timeperiod_id)
    ON DELETE CASCADE,
  FOREIGN KEY (excluded_timeperiod_id) REFERENCES mod_bam_reporting_timeperiods (timeperiod_id)
    ON DELETE CASCADE
);


text:
package net.minecraft.tileentity;

import java.util.Random;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.ContainerDispenser;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;

public class TileEntityDispenser extends TileEntityLockable implements IInventory
{
    private static final Random field_174913_f = new Random();
    private ItemStack[] field_146022_i = new ItemStack[9];
    protected String field_146020_a;
    private static final String __OBFID = "CL_00000352";

    /**
     * Returns the number of slots in the inventory.
     */
    public int getSizeInventory()
    {
        return 9;
    }

    /**
     * Returns the stack in slot i
     */
    public ItemStack getStackInSlot(int slotIn)
    {
        return this.field_146022_i[slotIn];
    }

    /**
     * Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a
     * new stack.
     */
    public ItemStack decrStackSize(int index, int count)
    {
        if (this.field_146022_i[index] != null)
        {
            ItemStack var3;

            if (this.field_146022_i[index].stackSize <= count)
            {
                var3 = this.field_146022_i[index];
                this.field_146022_i[index] = null;
                this.markDirty();
                return var3;
            }
            else
            {
                var3 = this.field_146022_i[index].splitStack(count);

                if (this.field_146022_i[index].stackSize == 0)
                {
                    this.field_146022_i[index] = null;
                }

                this.markDirty();
                return var3;
            }
        }
        else
        {
            return null;
        }
    }

    /**
     * When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem -
     * like when you close a workbench GUI.
     */
    public ItemStack getStackInSlotOnClosing(int index)
    {
        if (this.field_146022_i[index] != null)
        {
            ItemStack var2 = this.field_146022_i[index];
            this.field_146022_i[index] = null;
            return var2;
        }
        else
        {
            return null;
        }
    }

    public int func_146017_i()
    {
        int var1 = -1;
        int var2 = 1;

        for (int var3 = 0; var3 < this.field_146022_i.length; ++var3)
        {
            if (this.field_146022_i[var3] != null && field_174913_f.nextInt(var2++) == 0)
            {
                var1 = var3;
            }
        }

        return var1;
    }

    /**
     * Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
     */
    public void setInventorySlotContents(int index, ItemStack stack)
    {
        this.field_146022_i[index] = stack;

        if (stack != null && stack.stackSize > this.getInventoryStackLimit())
        {
            stack.stackSize = this.getInventoryStackLimit();
        }

        this.markDirty();
    }

    public int func_146019_a(ItemStack p_146019_1_)
    {
        for (int var2 = 0; var2 < this.field_146022_i.length; ++var2)
        {
            if (this.field_146022_i[var2] == null || this.field_146022_i[var2].getItem() == null)
            {
                this.setInventorySlotContents(var2, p_146019_1_);
                return var2;
            }
        }

        return -1;
    }

    /**
     * Gets the name of this command sender (usually username, but possibly "Rcon")
     */
    public String getName()
    {
        return this.hasCustomName() ? this.field_146020_a : "container.dispenser";
    }

    public void func_146018_a(String p_146018_1_)
    {
        this.field_146020_a = p_146018_1_;
    }

    /**
     * Returns true if this thing is named
     */
    public boolean hasCustomName()
    {
        return this.field_146020_a != null;
    }

    public void readFromNBT(NBTTagCompound compound)
    {
        super.readFromNBT(compound);
        NBTTagList var2 = compound.getTagList("Items", 10);
        this.field_146022_i = new ItemStack[this.getSizeInventory()];

        for (int var3 = 0; var3 < var2.tagCount(); ++var3)
        {
            NBTTagCompound var4 = var2.getCompoundTagAt(var3);
            int var5 = var4.getByte("Slot") & 255;

            if (var5 >= 0 && var5 < this.field_146022_i.length)
            {
                this.field_146022_i[var5] = ItemStack.loadItemStackFromNBT(var4);
            }
        }

        if (compound.hasKey("CustomName", 8))
        {
            this.field_146020_a = compound.getString("CustomName");
        }
    }

    public void writeToNBT(NBTTagCompound compound)
    {
        super.writeToNBT(compound);
        NBTTagList var2 = new NBTTagList();

        for (int var3 = 0; var3 < this.field_146022_i.length; ++var3)
        {
            if (this.field_146022_i[var3] != null)
            {
                NBTTagCompound var4 = new NBTTagCompound();
                var4.setByte("Slot", (byte)var3);
                this.field_146022_i[var3].writeToNBT(var4);
                var2.appendTag(var4);
            }
        }

        compound.setTag("Items", var2);

        if (this.hasCustomName())
        {
            compound.setString("CustomName", this.field_146020_a);
        }
    }

    /**
     * Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't
     * this more of a set than a get?*
     */
    public int getInventoryStackLimit()
    {
        return 64;
    }

    /**
     * Do not make give this method the name canInteractWith because it clashes with Container
     */
    public boolean isUseableByPlayer(EntityPlayer playerIn)
    {
        return this.worldObj.getTileEntity(this.pos) != this ? false : playerIn.getDistanceSq((double)this.pos.getX() + 0.5D, (double)this.pos.getY() + 0.5D, (double)this.pos.getZ() + 0.5D) <= 64.0D;
    }

    public void openInventory(EntityPlayer playerIn) {}

    public void closeInventory(EntityPlayer playerIn) {}

    /**
     * Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
     */
    public boolean isItemValidForSlot(int index, ItemStack stack)
    {
        return true;
    }

    public String getGuiID()
    {
        return "minecraft:dispenser";
    }

    public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
    {
        return new ContainerDispenser(playerInventory, this);
    }

    public int getField(int id)
    {
        return 0;
    }

    public void setField(int id, int value) {}

    public int getFieldCount()
    {
        return 0;
    }

    public void clearInventory()
    {
        for (int var1 = 0; var1 < this.field_146022_i.length; ++var1)
        {
            this.field_146022_i[var1] = null;
        }
    }
}


text:
@class OFFriendImporter;

@interface OFGameCenterIntegrationController : OFViewController
{
	UILabel* nowPlayingLabel;
}

@property (nonatomic, retain) IBOutlet UILabel* nowPlayingLabel;

- (IBAction) onContinue;

@end


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Ann. Bot. (Oxford) 10:44. 1794

#### Original name
null

### Remarks
null


text:
package com.streamsets.pipeline.stage.destination.hdfs.metadataexecutor;

import com.streamsets.pipeline.api.ConfigDefBean;
import com.streamsets.pipeline.api.ConfigGroups;
import com.streamsets.pipeline.api.Executor;
import com.streamsets.pipeline.api.GenerateResourceBundle;
import com.streamsets.pipeline.api.PipelineLifecycleStage;
import com.streamsets.pipeline.api.StageDef;
import com.streamsets.pipeline.configurablestage.DExecutor;

@StageDef(
  version = 1,
  label = "HDFS File Metadata",
  description = "Changes HDFS file metadata such as renaming files or changing permissions.",
  icon = "hdfs-executor.png",
  privateClassLoader = true,
  onlineHelpRefUrl = "index.html#Executors/HDFSMetadata.html#task_m3v_5lk_fx",
  producesEvents = true
)
@ConfigGroups(value = Groups.class)
@PipelineLifecycleStage
@GenerateResourceBundle
public class HdfsMetadataDExecutor extends DExecutor {

  @ConfigDefBean
  public HdfsConnectionConfig connection;

  @ConfigDefBean
  public HdfsActionsConfig  actions;

  @Override
  protected Executor createExecutor() {
    return new HdfsMetadataExecutor(connection, actions);
  }
}