text:
package bio.terra.service.dataset;

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 bio.terra.app.model.GoogleCloudResource;
import bio.terra.app.model.GoogleRegion;
import bio.terra.common.EmbeddedDatabaseTest;
import bio.terra.common.category.Unit;
import bio.terra.common.fixtures.DaoOperations;
import bio.terra.common.fixtures.ProfileFixtures;
import bio.terra.common.fixtures.ResourceFixtures;
import bio.terra.common.iam.AuthenticatedUserRequest;
import bio.terra.model.BillingProfileModel;
import bio.terra.model.BillingProfileRequestModel;
import bio.terra.service.profile.ProfileDao;
import bio.terra.service.resourcemanagement.google.GoogleBucketResource;
import bio.terra.service.resourcemanagement.google.GoogleProjectResource;
import bio.terra.service.resourcemanagement.google.GoogleResourceDao;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
@AutoConfigureMockMvc
@ActiveProfiles({"google", "unittest"})
@Category(Unit.class)
@EmbeddedDatabaseTest
public class DatasetBucketDaoTest {
  private static final Logger logger = LoggerFactory.getLogger(DatasetBucketDaoTest.class);

  @Autowired private DatasetDao datasetDao;

  @Autowired private DatasetBucketDao datasetBucketDao;

  @Autowired private ProfileDao profileDao;

  @Autowired private GoogleResourceDao resourceDao;

  @Autowired private DaoOperations daoOperations;

  private BillingProfileModel billingProfile;
  private GoogleProjectResource projectResource;
  private Dataset dataset;
  private UUID datasetId;

  private final List<UUID> billingProfileIds = new ArrayList<>();
  private final List<UUID> datasetIds = new ArrayList<>();
  private final Map<String, String> bucketList = new HashMap<>();
  private final List<UUID> projectIds = new ArrayList<>();
  private final Map<UUID, UUID> datasetIdsToBucketResourceIds = new HashMap<>();
  private static final AuthenticatedUserRequest TEST_USER =
      AuthenticatedUserRequest.builder()
          .setSubjectId("DatasetUnit")
          .setEmail("dataset@unit.com")
          .setToken("token")
          .build();

  @Before
  public void setup() throws IOException {
    BillingProfileRequestModel profileRequest = ProfileFixtures.randomBillingProfileRequest();
    billingProfile = profileDao.createBillingProfile(profileRequest, "testUser");
    billingProfileIds.add(billingProfile.getId());

    projectResource = ResourceFixtures.randomProjectResource(billingProfile);
    UUID projectId = resourceDao.createProject(projectResource);
    projectResource.id(projectId);
    projectIds.add(projectId);

    dataset = daoOperations.createMinimalDataset(billingProfile.getId(), projectId, TEST_USER);
    datasetId = dataset.getId();
    datasetIds.add(datasetId);
  }

  @After
  public void teardown() {

    datasetIdsToBucketResourceIds.forEach(
        (datasetId, bucketResourceId) -> {
          try {
            datasetBucketDao.deleteDatasetBucketLink(datasetId, bucketResourceId);
          } catch (Exception ex) {
            logger.error(
                "[CLEANUP] Unable to delete dataset bucket link for dataset {} and bucket resource {}",
                datasetId,
                bucketResourceId);
          }
        });
    datasetIds.forEach(
        datasetId -> {
          try {
            datasetDao.delete(datasetId, TEST_USER);
          } catch (Exception ex) {
            logger.error("[CLEANUP] Unable to delete dataset {}", datasetId);
          }
        });
    bucketList.forEach(
        (bucketName, flightId) -> {
          try {
            resourceDao.deleteBucketMetadata(bucketName, flightId);
          } catch (Exception ex) {
            logger.error(
                "[CLEANUP] Unable to bucket metadata for bucket {} and flight {}",
                bucketName,
                flightId);
          }
        });
    projectIds.forEach(
        projectId -> {
          try {
            resourceDao.deleteProject(projectId);
          } catch (Exception ex) {
            logger.error("[CLEANUP] Unable to delete entry in database for projects {}", projectId);
          }
        });

    billingProfileIds.forEach(
        billingProfileId -> {
          try {
            profileDao.deleteBillingProfileById(billingProfileId);
          } catch (Exception ex) {
            logger.error("[CLEANUP] Unable to billing profile {}", billingProfileId);
          }
        });
  }

  @Test
  public void TestGetProjectForDatasetProfileCombo() throws Exception {
    UUID bucketResourceId = createBucketDbEntry(projectResource);
    datasetBucketDao.createDatasetBucketLink(datasetId, bucketResourceId);
    datasetIdsToBucketResourceIds.put(datasetId, bucketResourceId);

    String newProjectName =
        datasetBucketDao.getProjectResourceForBucket(datasetId, billingProfile.getId());

    assertEquals(
        "Should retrieve existing project", projectResource.getGoogleProjectId(), newProjectName);

    // Get Project given new billing profile
    BillingProfileRequestModel profileRequest2 = ProfileFixtures.randomBillingProfileRequest();
    BillingProfileModel billingProfile2 =
        profileDao.createBillingProfile(profileRequest2, "testUser");
    billingProfileIds.add(billingProfile2.getId());
    assertNull(
        "Should NOT retrieve existing project",
        datasetBucketDao.getProjectResourceForBucket(datasetId, billingProfile2.getId()));

    List<UUID> projectResourceIds =
        datasetBucketDao.getProjectResourceIdsForBucketPerDataset(datasetId);
    assertEquals("Just one bucket linked right now", 1, projectResourceIds.size());

    // Link dataset to new billing profile via bucket
    GoogleProjectResource ingestProjectResource =
        ResourceFixtures.randomProjectResource(billingProfile2);
    UUID ingestProjectId = resourceDao.createProject(ingestProjectResource);
    ingestProjectResource.id(ingestProjectId);
    UUID ingestBucketResourceId = createBucketDbEntry(ingestProjectResource);
    datasetBucketDao.createDatasetBucketLink(datasetId, ingestBucketResourceId);
    datasetIdsToBucketResourceIds.put(datasetId, ingestBucketResourceId);

    List<UUID> projectResourceIds_after =
        datasetBucketDao.getProjectResourceIdsForBucketPerDataset(datasetId);
    assertEquals(
        "Should return both projects for both billing profiles for dataset 1",
        2,
        projectResourceIds_after.size());

    // Get project given a new dataset
    Dataset dataset_second =
        daoOperations.createMinimalDataset(billingProfile2.getId(), ingestProjectId, TEST_USER);
    datasetIds.add(dataset_second.getId());
    createBucketDbEntry(projectResource);
    assertNull(
        "Should NOT retrieve existing project",
        datasetBucketDao.getProjectResourceForBucket(
            dataset_second.getId(), billingProfile.getId()));
  }

  @Test
  public void TestDatasetBucketLink() {
    UUID bucketResourceId = createBucketDbEntry(projectResource);

    // initial check - link should not yet exist
    boolean linkExists = datasetBucketDao.datasetBucketLinkExists(datasetId, bucketResourceId);
    assertFalse("Link should not yet exist.", linkExists);

    // create link
    datasetBucketDao.createDatasetBucketLink(datasetId, bucketResourceId);
    datasetIdsToBucketResourceIds.put(datasetId, bucketResourceId);
    linkExists = datasetBucketDao.datasetBucketLinkExists(datasetId, bucketResourceId);
    assertTrue("Link should now exist.", linkExists);

    // delete link
    datasetBucketDao.deleteDatasetBucketLink(datasetId, bucketResourceId);
    linkExists = datasetBucketDao.datasetBucketLinkExists(datasetId, bucketResourceId);
    assertFalse("Link should no longer exists.", linkExists);
  }

  @Test
  public void TestMultipleLinks() {
    UUID bucketResourceId = createBucketDbEntry(projectResource);

    // initial check - link should not yet exist
    boolean linkExists = datasetBucketDao.datasetBucketLinkExists(datasetId, bucketResourceId);
    assertFalse("Link should not yet exist.", linkExists);

    // create link
    datasetBucketDao.createDatasetBucketLink(datasetId, bucketResourceId);
    datasetIdsToBucketResourceIds.put(datasetId, bucketResourceId);
    linkExists = datasetBucketDao.datasetBucketLinkExists(datasetId, bucketResourceId);
    assertTrue("Link should now exist.", linkExists);
    int linkCount =
        datasetBucketDao.datasetBucketSuccessfulIngestCount(datasetId, bucketResourceId);
    assertEquals("Link count should be 1.", 1, linkCount);

    // create link
    datasetBucketDao.createDatasetBucketLink(datasetId, bucketResourceId);
    datasetIdsToBucketResourceIds.put(datasetId, bucketResourceId);
    linkExists = datasetBucketDao.datasetBucketLinkExists(datasetId, bucketResourceId);
    assertTrue("Link should now exist.", linkExists);
    linkCount = datasetBucketDao.datasetBucketSuccessfulIngestCount(datasetId, bucketResourceId);
    assertEquals("Link count should be 2.", 2, linkCount);

    // delete link
    datasetBucketDao.deleteDatasetBucketLink(datasetId, bucketResourceId);
    linkExists = datasetBucketDao.datasetBucketLinkExists(datasetId, bucketResourceId);
    assertFalse("Link should no longer exists.", linkExists);
  }

  @Test
  public void TestDecrementLink() {
    UUID bucketResourceId = createBucketDbEntry(projectResource);

    // initial check - link should not yet exist
    boolean linkExists = datasetBucketDao.datasetBucketLinkExists(datasetId, bucketResourceId);
    assertFalse("Link should not yet exist.", linkExists);

    // create link
    datasetBucketDao.createDatasetBucketLink(datasetId, bucketResourceId);
    datasetIdsToBucketResourceIds.put(datasetId, bucketResourceId);
    linkExists = datasetBucketDao.datasetBucketLinkExists(datasetId, bucketResourceId);
    assertTrue("Link should now exist.", linkExists);

    // decrement the link
    datasetBucketDao.decrementDatasetBucketLink(datasetId, bucketResourceId);
    int linkCount =
        datasetBucketDao.datasetBucketSuccessfulIngestCount(datasetId, bucketResourceId);
    assertEquals(
        "After decrementing bucket link, successful ingest count should equal 0.", 0, linkCount);
  }

  // Test key restraints - There must be entries in the dataset table and bucket_resource table
  // in order to create a link in the dataset_bucket table
  @Test(expected = Exception.class)
  public void DatasetMustExistToLink() {
    // create bucket for dataset
    UUID bucketResourceId = createBucketDbEntry(projectResource);

    // fake datasetId
    UUID randomDatasetId = UUID.randomUUID();

    // initial check - link should not yet exist
    boolean linkExists =
        datasetBucketDao.datasetBucketLinkExists(randomDatasetId, bucketResourceId);
    assertFalse("Link should not yet exist.", linkExists);

    // this should fail -> no requires real dataset and bucket to link
    datasetBucketDao.createDatasetBucketLink(randomDatasetId, bucketResourceId);
  }

  @Test(expected = Exception.class)
  public void BucketMustExistToLink() {
    // fake datasetId
    UUID randomBucketResourceId = UUID.randomUUID();

    // initial check - link should not yet exist
    boolean linkExists =
        datasetBucketDao.datasetBucketLinkExists(datasetId, randomBucketResourceId);
    assertFalse("Link should not yet exist.", linkExists);

    // this should fail -> no requires real dataset and bucket to link
    datasetBucketDao.createDatasetBucketLink(datasetId, randomBucketResourceId);
  }

  private UUID createBucketDbEntry(GoogleProjectResource projectResource2) {
    String ingestFileFlightId = UUID.randomUUID().toString();
    GoogleBucketResource bucketResource =
        resourceDao.createAndLockBucket(
            String.format("testbucket%s", ingestFileFlightId),
            projectResource2,
            (GoogleRegion)
                dataset.getDatasetSummary().getStorageResourceRegion(GoogleCloudResource.BUCKET),
            ingestFileFlightId);
    bucketList.put(bucketResource.getName(), ingestFileFlightId);
    return bucketResource.getResourceId();
  }
}


text:
<!DOCTYPE html>

    <meta http-equiv="refresh" content="0;URL=../../../../libc/constant.KERN_MAXPROCPERUID.html">

Redirecting to ../../../../libc/constant.KERN_MAXPROCPERUID.html...

redpajama_set_name: RedPajamaGithub


text:
package createclass

object UsesMissingClass {
  new ThisClassDoesNotExist()
}


text:
namespace {

class NewWindowDelegateImpl : public ChromeNewWindowDelegate {
 public:
  NewWindowDelegateImpl() {}
  virtual ~NewWindowDelegateImpl() {}

  // Overridden from ash::NewWindowDelegate:
  virtual void OpenFileManager() OVERRIDE {}
  virtual void OpenCrosh() OVERRIDE {}
  virtual void ShowKeyboardOverlay() OVERRIDE {}

 private:
  DISALLOW_COPY_AND_ASSIGN(NewWindowDelegateImpl);
};

class MediaDelegateImpl : public ash::MediaDelegate {
 public:
  MediaDelegateImpl() {}
  virtual ~MediaDelegateImpl() {}
  virtual void HandleMediaNextTrack() OVERRIDE {}
  virtual void HandleMediaPlayPause() OVERRIDE {}
  virtual void HandleMediaPrevTrack() OVERRIDE {}

 private:
  DISALLOW_COPY_AND_ASSIGN(MediaDelegateImpl);
};

class EmptyAccessibilityDelegate : public ash::AccessibilityDelegate {
 public:
  EmptyAccessibilityDelegate() {}
  virtual ~EmptyAccessibilityDelegate() {}

  virtual void ToggleHighContrast() OVERRIDE {
  }

  virtual bool IsHighContrastEnabled() const OVERRIDE {
    return false;
  }

  virtual bool IsSpokenFeedbackEnabled() const OVERRIDE {
    return false;
  }

  virtual void ToggleSpokenFeedback(
      ash::AccessibilityNotificationVisibility notify) OVERRIDE {
  }

  virtual void SetLargeCursorEnabled(bool enalbed) OVERRIDE {
  }

  virtual bool IsLargeCursorEnabled() const OVERRIDE {
    return false;
  }

  virtual void SetMagnifierEnabled(bool enabled) OVERRIDE {
  }

  virtual void SetMagnifierType(ash::MagnifierType type) OVERRIDE {
  }

  virtual bool IsMagnifierEnabled() const OVERRIDE {
    return false;
  }

  virtual void SetAutoclickEnabled(bool enabled) OVERRIDE {
  }

  virtual bool IsAutoclickEnabled() const OVERRIDE {
    return false;
  }

  virtual ash::MagnifierType GetMagnifierType() const OVERRIDE {
    return ash::kDefaultMagnifierType;
  }

  virtual void SaveScreenMagnifierScale(double scale) OVERRIDE {
  }

  virtual double GetSavedScreenMagnifierScale() OVERRIDE {
    return std::numeric_limits<double>::min();
  }

  virtual bool ShouldShowAccessibilityMenu() const OVERRIDE {
    return false;
  }

  virtual bool IsBrailleDisplayConnected() const OVERRIDE { return false; }

  virtual void SilenceSpokenFeedback() const OVERRIDE {
  }

  virtual void SetVirtualKeyboardEnabled(bool enabled) OVERRIDE {
  }

  virtual bool IsVirtualKeyboardEnabled() const OVERRIDE {
    return false;
  }

  virtual void TriggerAccessibilityAlert(
      ash::AccessibilityAlert alert) OVERRIDE {
  }

  virtual ash::AccessibilityAlert GetLastAccessibilityAlert() OVERRIDE {
    return ash::A11Y_ALERT_NONE;
  }

  base::TimeDelta PlayShutdownSound() const OVERRIDE {
    return base::TimeDelta();
  }

 private:
  DISALLOW_COPY_AND_ASSIGN(EmptyAccessibilityDelegate);
};

}  // namespace

bool ChromeShellDelegate::IsFirstRunAfterBoot() const {
  return false;
}

void ChromeShellDelegate::PreInit() {
}

void ChromeShellDelegate::PreShutdown() {
}

ash::NewWindowDelegate* ChromeShellDelegate::CreateNewWindowDelegate() {
  return new NewWindowDelegateImpl;
}

ash::MediaDelegate* ChromeShellDelegate::CreateMediaDelegate() {
  return new MediaDelegateImpl;
}

ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() {
  return new SessionStateDelegate;
}

ash::SystemTrayDelegate* ChromeShellDelegate::CreateSystemTrayDelegate() {
#if defined(OS_WIN)
  return CreateWindowsSystemTrayDelegate();
#else
  return new ash::DefaultSystemTrayDelegate;
#endif
}

ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() {
  return new EmptyAccessibilityDelegate;
}

ash::UserWallpaperDelegate* ChromeShellDelegate::CreateUserWallpaperDelegate() {
#if defined(OS_WIN)
  return ::CreateUserWallpaperDelegate();
#else
  return NULL;
#endif
}

void ChromeShellDelegate::Observe(int type,
                                  const content::NotificationSource& source,
                                  const content::NotificationDetails& details) {
  switch (type) {
    case chrome::NOTIFICATION_PROFILE_ADDED: {
      // Start the error notifier services to show sync/auth notifications.
      Profile* profile = content::Source<Profile>(source).ptr();
      SigninErrorNotifierFactory::GetForProfile(profile);
      SyncErrorNotifierFactory::GetForProfile(profile);
      break;
    }
    case chrome::NOTIFICATION_ASH_SESSION_STARTED: {
      // Start the error notifier services for the already loaded profiles.
      const std::vector<Profile*> profiles =
          g_browser_process->profile_manager()->GetLoadedProfiles();
      for (std::vector<Profile*>::const_iterator it = profiles.begin();
           it != profiles.end(); ++it) {
        SigninErrorNotifierFactory::GetForProfile(*it);
        SyncErrorNotifierFactory::GetForProfile(*it);
      }

#if defined(OS_WIN)
      // If we are launched to service a windows 8 search request then let the
      // IPC which carries the search string create the browser and initiate
      // the navigation.
      if (CommandLine::ForCurrentProcess()->HasSwitch(
          switches::kWindows8Search))
        break;
#endif
      // If Chrome ASH is launched when no browser is open in the desktop,
      // we should execute the startup code.
      // If there are browsers open in the desktop, we create a browser window
      // and open a new tab page, if session restore is not on.
      BrowserList* desktop_list = BrowserList::GetInstance(
          chrome::HOST_DESKTOP_TYPE_NATIVE);
      if (desktop_list->empty()) {
        // We pass a dummy command line here, because the browser is launched in
        // silent-mode by the metro viewer process, which causes the
        // StartupBrowserCreatorImpl class to not create any browsers which is
        // not the behavior we want.
        CommandLine dummy(CommandLine::NO_PROGRAM);
        StartupBrowserCreatorImpl startup_impl(
            base::FilePath(),
            dummy,
            chrome::startup::IS_NOT_FIRST_RUN);
        startup_impl.Launch(
            ProfileManager::GetActiveUserProfile(),
            std::vector<GURL>(),
            true,
            chrome::HOST_DESKTOP_TYPE_ASH);
      } else {
        Browser* browser =
            chrome::FindBrowserWithWindow(ash::wm::GetActiveWindow());
        if (browser && browser->is_type_tabbed()) {
          chrome::AddTabAt(browser, GURL(), -1, true);
          return;
        }

        chrome::ScopedTabbedBrowserDisplayer displayer(
            ProfileManager::GetActiveUserProfile(),
            chrome::HOST_DESKTOP_TYPE_ASH);
        chrome::AddTabAt(displayer.browser(), GURL(), -1, true);
      }
      break;
    }
    case chrome::NOTIFICATION_ASH_SESSION_ENDED:
      break;
    default:
      NOTREACHED() << "Unexpected notification " << type;
  }
}

void ChromeShellDelegate::PlatformInit() {
#if defined(OS_WIN)
  registrar_.Add(this,
                 chrome::NOTIFICATION_PROFILE_ADDED,
                 content::NotificationService::AllSources());
  registrar_.Add(this,
                 chrome::NOTIFICATION_ASH_SESSION_STARTED,
                 content::NotificationService::AllSources());
  registrar_.Add(this,
                 chrome::NOTIFICATION_ASH_SESSION_ENDED,
                 content::NotificationService::AllSources());
#endif
}


text:
import java.util.ArrayList; // Needed for ArrayList class

/**
   This program demonstrates inserting an item.
*/

public class ArrayListDemo4
{
  public ArrayListDemo4(){
      // Create an ArrayList to hold some names.
      ArrayList<String> nameList = new ArrayList<String>();

      // Add some names to the ArrayList.
      nameList.add("James");
      nameList.add("Catherine");
      nameList.add("Bill");

      // Display the items in nameList and their indices.
      for (int index = 0; index < nameList.size(); index++)
      {
         System.out.println("Index: " + index + " Name: " +
                            nameList.get(index));
      }

      // Now insert an  item at index 1.
      nameList.add(1, "Mary");

      System.out.println("Mary was added at index 1. " +
                         "Here are the items now.");

      // Display the items in nameList and their indices.
      for (int index = 0; index < nameList.size(); index++)
      {
         System.out.println("Index: " + index + " Name: " +
                            nameList.get(index));
      }
   }
}


text:
using System;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Web.Http;

namespace HealthMonitoring.SelfHost.Controllers
{
    public class StaticController : ApiController
    {
        [Route("dashboard")]
        public HttpResponseMessage GetDashboard()
        {
            return ReturnFileContent("dashboard.html");
        }

        [Route("")]
        public HttpResponseMessage GetHome()
        {
            return ReturnFileContent("home.html");
        }

        [Route("dashboard/{file}")]
        public HttpResponseMessage GetStatic(string file)
        {
            return ReturnFileContent(file);
        }

        private static HttpResponseMessage ReturnFileContent(string file)
        {
            var path = string.Format("{0}content/{1}", AppDomain.CurrentDomain.BaseDirectory, file);

            if (!File.Exists(path))
                return new HttpResponseMessage(HttpStatusCode.NotFound);

            return new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = new StringContent(File.ReadAllText(path),Encoding.UTF8,GetMediaType(file))
            };
        }

        private static string GetMediaType(string file)
        {
            var ext = Path.GetExtension(file).ToLowerInvariant();
            switch (ext)
            {
                case ".html":
                    return "text/html";
                case ".js":
                    return "application/javascript";
                default:
                    return "text/plain";
            }
        }
    }
}


text:
<!--
  launch_test.xml - ROSlaunch tests

  Usage Instructions:

  1. Add the following to your CMakeLists.txt:

    find_package(roslaunch)
    roslaunch_add_file_check(test/launch_test.xml)

  2. Create a test directory under your package
  3. Add the "launch_text.xml" file and fill out the test below.  Use the
     following conventions:
    a. Encapsulate each launch file test in it's own namespace.  By
       convention the namespace should have the same name as the launch
       file (minus ".launch" extension)
    b. Create tests for each possible combination of parameters.  Utilize
       sub-namespaces under the main namespace.

  Notes:

  1. XML extension is used in order to avoid beinging included
  in roslaunch auto-complete.

  2. Group tags with namespaces are used to avoid node name collisions when
  testing multpile launch files
-->
<launch>
	<arg name="req_arg" value="default"/>
  <arg name="dx100" value="dx100"/>
  <arg name="fs100" value="fs100" />

  <group ns="load_mh5lf">
	  <include file="$(find motoman_mh5lf_support)/launch/load_mh5lf.launch"/>
  </group>

  <group ns="test_mh5lf">
	  <include file="$(find motoman_mh5lf_support)/launch/test_mh5lf.launch"/>
  </group>

  <group ns="robot_interface_streaming_mh5lf">
    <group ns="dx100" >
	    <include file="$(find motoman_mh5lf_support)/launch/robot_interface_streaming_mh5lf.launch">
		    <arg name="robot_ip"   value="$(arg req_arg)" />
        <arg name="controller" value="$(arg dx100)"/>
	    </include>
    </group>

    <group ns="fs100" >
	    <include file="$(find motoman_mh5lf_support)/launch/robot_interface_streaming_mh5lf.launch">
		    <arg name="robot_ip"   value="$(arg req_arg)" />
        <arg name="controller" value="$(arg fs100)"/>
	    </include>
    </group>
  </group>

  <group ns="robot_state_visualize_mh5lf">
    <group ns="dx100" >
	    <include file="$(find motoman_mh5lf_support)/launch/robot_state_visualize_mh5lf.launch">
		    <arg name="robot_ip"   value="$(arg req_arg)" />
        <arg name="controller" value="$(arg dx100)"/>
	    </include>
    </group>

    <group ns="fs100" >
	    <include file="$(find motoman_mh5lf_support)/launch/robot_state_visualize_mh5lf.launch">
		    <arg name="robot_ip"   value="$(arg req_arg)" />
        <arg name="controller" value="$(arg fs100)"/>
	    </include>
    </group>
  </group>

</launch>


text:
package com.zaradai.kunzite.logging;

public enum LogLevel {
    Debug,
    Info,
    Warn,
    Error
}


text:
package de.unioninvestment.eai.portal.portlet.crud.domain.form;

import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Locale;

import com.vaadin.ui.UI;

import de.unioninvestment.eai.portal.portlet.crud.config.AllFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.AnyFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.ComparisonFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.ContainsFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.CustomFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.EndsWithFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.EqualsFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.FilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.FormActionConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.GreaterFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.GreaterOrEqualFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.IncludeFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.LessFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.LessOrEqualFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.NotFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.NothingFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.RegExpFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.SQLFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.SearchConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.SearchTablesConfig;
import de.unioninvestment.eai.portal.portlet.crud.config.StartsWithFilterConfig;
import de.unioninvestment.eai.portal.portlet.crud.domain.exception.BusinessException;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.CheckBoxFormField;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.DataContainer;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.DataContainer.FilterPolicy;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.DateFormField;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.Form;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.FormAction;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.FormAction.ActionHandler;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.FormField;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.MultiOptionListFormField;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.OptionListFormField;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.Portlet;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.Table;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.All;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.Any;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.Contains;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.CustomFilter;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.CustomFilterFactory;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.EndsWith;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.Equal;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.Filter;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.Greater;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.Less;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.Not;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.Nothing;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.RegExpFilter;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.SQLFilter;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.SQLWhereFactory;
import de.unioninvestment.eai.portal.portlet.crud.domain.model.filter.StartsWith;
import de.unioninvestment.eai.portal.portlet.crud.domain.search.SearchableTablesFinder;
import de.unioninvestment.eai.portal.portlet.crud.domain.support.InitializingUI;
import de.unioninvestment.eai.portal.support.vaadin.context.Context;
import de.unioninvestment.eai.portal.support.vaadin.date.DateUtils;
import de.unioninvestment.eai.portal.support.vaadin.support.NumberFormatter;

/**
 * Implementiert die Suche in einer Tabelle abhängig von einer
 * Formulareinstellung.
 *
 * @author carsten.mjartan
 */
public class SearchFormAction implements ActionHandler {

	private final FormActionConfig actionConfig;
	private final Portlet portlet;
	private SQLWhereFactory whereFactory;
	private boolean requiresFilter;

	private int timeout = 0;
	private CustomFilterFactory customFilterFactory;

	/**
	 * @param actionConfig
	 *            die Konfiguration zur Suche
	 * @param portlet
	 *            das Portlet für die Auflösung von Element-IDs
	 */
	public SearchFormAction(FormActionConfig actionConfig, Portlet portlet) {
		this.actionConfig = actionConfig;
		this.portlet = portlet;
		SearchConfig searchConfig = actionConfig.getSearch();
		if (searchConfig != null) {
			this.timeout = searchConfig.getTimeoutInSeconds();
			this.requiresFilter = searchConfig.isRequiresFilter();
		}
	}

	/**
	 * @param seconds
	 *            die Timeoutzeit in Sekunden.
	 */
	public void setTimeout(int seconds) {
		if (seconds >= 0) {
			this.timeout = seconds;
		}
	}

	/**
	 * @param whereFactory
	 *            Factory für SQL-Where-Filter. Wird bei der Initialisierung des
	 *            Scripting-Modells gesetzt.
	 */
	public void setWhereFactory(SQLWhereFactory whereFactory) {
		this.whereFactory = whereFactory;
	}

	@Override
	public void execute(Form form) {
		boolean hasFilter = form.hasFilter();
		if (!requiresFilter || hasFilter) {
			List<Table> tables = findSearchableTables(form);

			for (Table table : tables) {
				if (policyAllowsFiltering(table)) {
					applyFiltersToTable(form, table);
				}
			}
		} else {
			throw new BusinessException("portlet.crud.search.filter.mandatory");
		}
	}

	private boolean policyAllowsFiltering(Table table) {
		InitializingUI application = (InitializingUI) UI.getCurrent();
		if (application != null && application.isInitializing()) {
			FilterPolicy policy = table.getContainer().getFilterPolicy();
			if (policy == FilterPolicy.NOTHING
					|| policy == FilterPolicy.NOTHING_AT_ALL) {
				return false;
			}
		}
		return true;
	}

	/**
	 * Gibt an, ob ein Where-Filter existiert.
	 *
	 * @return ob ein Where-Filter existiert
	 */
	public boolean whereFilterExists() {
		if (actionConfig.getSearch() != null) {
			for (FilterConfig config : actionConfig.getSearch()
					.getApplyFilters().getFilters()) {
				if (config instanceof SQLFilterConfig) {
					return true;
				}
			}
		}
		return false;
	}

	private void applyFiltersToTable(Form form, Table table) {
		List<Filter> filters = createFilters(form, table);
		DataContainer container = table.getContainer();
		if (this.timeout > 0) {
			container.replaceFilters(filters, false, true, this.timeout);
		} else {
			table.getContainer().replaceFilters(filters, false, true);
		}
	}

	/**
	 * Erzeugt zu einer Tabelle passenden Filter.
	 *
	 * @param form
	 *            Formularmodel
	 * @param table
	 *            Tabellenmodel
	 * @return Filterliste
	 */
	List<Filter> createFilters(Form form, Table table) {
		List<Filter> filters;
		List<FilterConfig> filterConfigs = createFilterConfigs(form, table);
		filters = getExplicitFiltersForTable(form, table, filterConfigs);
		return filters;
	}

	List<FilterConfig> createFilterConfigs(Form form, Table table) {
		List<FilterConfig> filterConfigs;
		if (actionConfig.getSearch() != null
				&& actionConfig.getSearch().getApplyFilters() != null) {
			filterConfigs = actionConfig.getSearch().getApplyFilters()
					.getFilters();
		} else {
			filterConfigs = createDefaultConfig(form, table);
		}
		return filterConfigs;
	}

	private List<FilterConfig> createDefaultConfig(Form form, Table table) {
		List<FilterConfig> result = new ArrayList<FilterConfig>();
		DataContainer container = table.getContainer();
		for (FormField field : form.getFields()) {
			String fieldName = field.getName();
			Class<?> columnType = container.getType(fieldName);
			if (columnType == null) {
				continue;
			} else if (field instanceof DateFormField
					|| field instanceof OptionListFormField
					|| field instanceof CheckBoxFormField
					|| Number.class.isAssignableFrom(columnType)) {
				EqualsFilterConfig config = new EqualsFilterConfig();
				config.setField(fieldName);
				config.setColumn(fieldName);
				result.add(config);
			} else {
				StartsWithFilterConfig config = new StartsWithFilterConfig();
				config.setField(fieldName);
				config.setColumn(fieldName);
				result.add(config);
			}
		}
		return result;
	}

	private List<Filter> getExplicitFiltersForTable(Form form, Table table,
			List<FilterConfig> filterConfigs) {
		List<Filter> result = new ArrayList<Filter>();
		DataContainer container = table.getContainer();
		for (FilterConfig config : filterConfigs) {
			if (!filterMatchesTable(table, config)) {
				continue;
			}

			if (config instanceof ComparisonFilterConfig) {
				ComparisonFilterConfig comparisonFilterConfig = (ComparisonFilterConfig) config;

				FormField formField = form.getFields().get(
						comparisonFilterConfig.getField());

				if (formField instanceof MultiOptionListFormField) {
					if (config instanceof EqualsFilterConfig) {
						EqualsFilterConfig equalsFilterConfig = (EqualsFilterConfig) config;
						MultiOptionListFormField multiSelectionFormField = (MultiOptionListFormField) form
								.getFields().get(equalsFilterConfig.getField());
						List<Filter> filterList = new ArrayList<Filter>();
						for (String value : multiSelectionFormField.getValues()) {
							filterList.add(new Equal(equalsFilterConfig
									.getColumn(), value));
						}
						result.add(new Any(filterList));
						continue;

					} else {
						throw new IllegalArgumentException(
								"Filter des Typs '"
										+ config.getClass().getSimpleName()
										+ "' kann nicht auf Multiselect-Felder angewendet werden");
					}
				}

				String fieldValue = formField.getValue();
				if (fieldValue == null || fieldValue.trim().equals("")) {
					continue;
				}

				String columnName = comparisonFilterConfig.getColumn();
				Class<?> columnType = container.getType(columnName);
				if (columnType == null) {
					continue;
				} else if (String.class.isAssignableFrom(columnType)) {
					addGeneralFilterByConfig(result, config, fieldValue,
							columnName);
				} else if (Number.class.isAssignableFrom(columnType)) {
					NumberFormatter numberFormatter = new NumberFormatter(
							(NumberFormat) container.getFormat(columnName));
					Locale locale = Context.getLocale();
					@SuppressWarnings("unchecked")
					Number numberValue = numberFormatter.convertToModel(
							fieldValue, (Class<? extends Number>) columnType,
							locale);
					if (!addGeneralFilterByConfig(result, config, numberValue,
							columnName)) {
						throw new IllegalArgumentException(
								"Filter des Typs '"
										+ config.getClass().getSimpleName()
										+ "' kann nicht auf Number-Spalten angewendet werden");
					}
				} else if (Date.class.isAssignableFrom(columnType)
						&& formField instanceof DateFormField) {
					DateFormField dateFormField = (DateFormField) formField;
					addTemporalFilterByConfig(result, config,
							DateUtils.adjustDateType(
									dateFormField.getBeginDate(), columnType),
							DateUtils.adjustDateType(
									dateFormField.getEndDate(), columnType),
							columnName);
				} else {
					throw new IllegalArgumentException("Cannot filter column '"
							+ columnName + ": Unkown column type '"
							+ columnType + "'");
				}

			} else if (config instanceof AnyFilterConfig) {
				List<Filter> explicitFiltersForTable = getExplicitFiltersForTable(
						form, table, ((AnyFilterConfig) config).getFilters());
				if (explicitFiltersForTable.size() > 0) {
					result.add(new Any(explicitFiltersForTable));
				}
			} else if (config instanceof AllFilterConfig) {
				List<Filter> subfilters = getExplicitFiltersForTable(form,
						table, ((AllFilterConfig) config).getFilters());
				if (subfilters.size() > 0) {
					result.add(new All(subfilters));
				}
			} else if (config instanceof NotFilterConfig) {
				List<Filter> subfilters = getExplicitFiltersForTable(form,
						table, ((NotFilterConfig) config).getFilters());
				if (subfilters.size() > 0) {
					result.add(new Not(subfilters));
				}
			} else if (config instanceof CustomFilterConfig) {
				CustomFilterConfig customFilterConfig = (CustomFilterConfig) config;
				CustomFilter filter = customFilterFactory
						.createCustomFilter(customFilterConfig);
				if (filter != null) {
					result.add(filter);
				}

			} else if (config instanceof SQLFilterConfig) {
				SQLFilterConfig sqlFilterConfig = (SQLFilterConfig) config;
				SQLFilter filter = whereFactory
						.createFilter(sqlFilterConfig.getColumn(),
								sqlFilterConfig.getWhere());
				if (filter != null) {
					result.add(filter);
				}
			} else if (config instanceof IncludeFilterConfig) {
				IncludeFilterConfig includeFilterConfig = (IncludeFilterConfig) config;
				FormAction formAction = getActionForIncludeFilter(includeFilterConfig);

				SearchFormAction otherActionHandler = (SearchFormAction) formAction
						.getActionHandler();

				List<Filter> filters = otherActionHandler.createFilters(
						formAction.getForm(), table);

				if (filters != null) {
					result.add(new All(filters));
				}
			}
		}
		return result;
	}

	FormAction getActionForIncludeFilter(IncludeFilterConfig includeFilterConfig) {
		String id = ((FormActionConfig) includeFilterConfig.getAction())
				.getId();
		FormAction formAction = (FormAction) portlet.getElementById(id);
		return formAction;
	}

	private void addTemporalFilterByConfig(List<Filter> result,
			FilterConfig config, Date beginDate, Date endDate, String columnName) {
		if (config instanceof EqualsFilterConfig) {
			Filter beginFilter = new Greater(columnName, beginDate, true);
			Filter endFilter = new Less(columnName, endDate, false);
			result.add(new All(Arrays.asList(beginFilter, endFilter)));
		} else if (config instanceof GreaterOrEqualFilterConfig) {
			result.add(new Greater(columnName, beginDate, true));
		} else if (config instanceof GreaterFilterConfig) {
			result.add(new Greater(columnName, endDate, true));
		} else if (config instanceof LessOrEqualFilterConfig) {
			result.add(new Less(columnName, endDate, false));
		} else if (config instanceof LessFilterConfig) {
			result.add(new Less(columnName, beginDate, false));
		} else {
			throw new IllegalArgumentException("Filter des Typs '"
					+ config.getClass().getSimpleName()
					+ "' kann nicht auf temporale Spalten angewendet werden");
		}
	}

	boolean filterMatchesTable(Table table, FilterConfig config) {
		return config.getTable() == null
				|| config.getTable().equals(table.getId());
	}

	private boolean addGeneralFilterByConfig(List<Filter> result,
			FilterConfig config, Object fieldValue, String columnName) {
		if (config instanceof EqualsFilterConfig) {
			result.add(new Equal(columnName, fieldValue));
		} else if (config instanceof GreaterFilterConfig) {
			result.add(new Greater(columnName, fieldValue, false));
		} else if (config instanceof GreaterOrEqualFilterConfig) {
			result.add(new Greater(columnName, fieldValue, true));
		} else if (config instanceof LessFilterConfig) {
			result.add(new Less(columnName, fieldValue, false));
		} else if (config instanceof LessOrEqualFilterConfig) {
			result.add(new Less(columnName, fieldValue, true));
		} else if (config instanceof StartsWithFilterConfig) {
			result.add(new StartsWith(columnName, (String) fieldValue,
					((StartsWithFilterConfig) config).isCaseSensitive()));
		} else if (config instanceof EndsWithFilterConfig) {
			result.add(new EndsWith(columnName, (String) fieldValue,
					((EndsWithFilterConfig) config).isCaseSensitive()));
		} else if (config instanceof ContainsFilterConfig) {
			result.add(new Contains(columnName, (String) fieldValue,
					((ContainsFilterConfig) config).isCaseSensitive()));
		} else if (config instanceof RegExpFilterConfig) {
			String valueString = fieldValue == null ? null : fieldValue
					.toString();
			result.add(new RegExpFilter(columnName, valueString,
					((RegExpFilterConfig) config).getModifiers()));
		} else if (config instanceof NothingFilterConfig) {
			result.add(new Nothing());
		} else {
			return false;
		}
		return true;
	}

	/**
	 * Durchläuft des Modelbaum und liefert alle für die Suche nötigen
	 * Tabellenkomponenten.
	 *
	 * @param form
	 *            - das aktuelle Formular als Ausgangspunkt für die Suche
	 * @return - eine Liste aller relevanten Tabellen für die Suche.
	 */
	public List<Table> findSearchableTables(Form form) {
		SearchTablesConfig tables = actionConfig.getSearch() == null ? null
				: actionConfig.getSearch().getTables();
		return new SearchableTablesFinder().findSearchableTables(form, tables);
	}

	public void setCustomFilterFactory(CustomFilterFactory filterFactory) {
		this.customFilterFactory = filterFactory;
	}

}


text:
package game_ngb5;

import javafx.scene.image.Image;

public class Drone extends Enemy {

	public Drone(Hero hero, Integer xLoc, Integer yLoc, Integer HP) {
		super(hero, xLoc, yLoc, HP);

	}

	@Override
	public void move() {
		this.setY(this.getY()+5);
	}

	@Override
	public void chooseImage() {
		Image enemyImage = new Image(this.getClass().getResource("enemy_image.png").toExternalForm());
		this.setImage(enemyImage);
	}

}


text:
require "helper"
require "google/cloud/dialogflow"
require "gapic/common"
require "gapic/grpc"

class Google::Cloud::Dialogflow::ClientConstructionMinitest < Minitest::Test
  def test_agents
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.agents do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::Agents::Client, client
    end
  end

  def test_contexts
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.contexts do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::Contexts::Client, client
    end
  end

  def test_intents
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.intents do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::Intents::Client, client
    end
  end

  def test_entity_types
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.entity_types do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::EntityTypes::Client, client
    end
  end

  def test_session_entity_types
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.session_entity_types do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::SessionEntityTypes::Client, client
    end
  end

  def test_sessions
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.sessions do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::Sessions::Client, client
    end
  end

  def test_participants
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.participants do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::Participants::Client, client
    end
  end

  def test_answer_records
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.answer_records do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::AnswerRecords::Client, client
    end
  end

  def test_conversations
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.conversations do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::Conversations::Client, client
    end
  end

  def test_conversation_datasets
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.conversation_datasets do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::ConversationDatasets::Client, client
    end
  end

  def test_conversation_models
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.conversation_models do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::ConversationModels::Client, client
    end
  end

  def test_conversation_profiles
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.conversation_profiles do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::ConversationProfiles::Client, client
    end
  end

  def test_documents
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.documents do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::Documents::Client, client
    end
  end

  def test_fulfillments
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.fulfillments do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::Fulfillments::Client, client
    end
  end

  def test_environments
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.environments do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::Environments::Client, client
    end
  end

  def test_knowledge_bases
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.knowledge_bases do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::KnowledgeBases::Client, client
    end
  end

  def test_versions
    Gapic::ServiceStub.stub :new, :stub do
      grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure
      client = Google::Cloud::Dialogflow.versions do |config|
        config.credentials = grpc_channel
      end
      assert_kind_of Google::Cloud::Dialogflow::V2::Versions::Client, client
    end
  end
end


text: REAPING2_CLASS_EXPORT_IMPLEMENT( IAccelerationComponent, IAccelerationComponent );


text:
var React = require('react');
var PropTypes = React.PropTypes;
var reactNativeBootstrapSliderObj = require('react-bootstrap-native-slider');
var ReactNativeBootstrapSlider = reactNativeBootstrapSliderObj.ReactNativeBootstrapSlider;
// var reactBootstrapSliderObj = require("react-bootstrap-slider");
// var ReactBootstrapSlider = reactBootstrapSliderObj.ReactBootstrapSlider;
var SliderStartYr = React.createClass({
  getInitialState(){
    var today = new Date();
    var year = today.getFullYear();
    return {
      currentValue: 100,
      step: 1,
      max: year,
      min: -2000,
      range: true
    }
  },
  handleUpdateValue(e) {
    this.setState({ currentValue: e.target.value });
  },

  componentDidMount: function(){
    // componentDidMount is called by react when the component
    // has been rendered on the page. We can set the interval here:
  },

  componentWillUnmount: function(){
    // This method is called immediately before the component is removed
    // from the page and destroyed. We can clear the interval here:
    // clearInterval(this);
  },

  render(){
    var newValue = this.state.currentValue;
    return(

        <ReactNativeBootstrapSlider
        value={this.state.currentValue}
        handleChange={this.handleUpdateValue}
        step={this.state.step}
        max={this.state.max}
        min={this.state.min} />
      {Math.abs(this.state.min)} BC
      {this.state.max} AD

       Start Year: {Math.abs(newValue)}

       <input ref="sliderStart" type="hidden" value={newValue} name="start_year"/>

    )
  }
})

module.exports = SliderStartYr;


text:
define([
	"intern!object",
	"intern/chai!assert",
	"delite/register",
	"deliteful/Switch"
], function (registerSuite, assert, register, Switch) {
	var container, html = "<d-switch id='b1' checkedLabel='\u05d0\u05d1\u05d2' " +
		"uncheckedLabel='ABC' checked='true' textDir='ltr'></d-switch>" +
		"<d-switch id='b2' checkedLabel='\u05d0\u05d1\u05d2' uncheckedLabel='ABC'" +
		" checked='false' textDir='rtl'></d-switch>" +
		"<d-switch id='b3' checkedLabel='\u05d0\u05d1\u05d2' uncheckedLabel='ABC'" +
		" checked='true' title='ABC \u05d0\u05d1\u05d2' textDir='auto'></d-switch>";

	registerSuite({
		name: "deliteful/Switch (bidi)",
		setup: function () {
			container = document.createElement("div");
			document.body.appendChild(container);
		},
		markup: {
			beforeEach: function () {
				container.innerHTML = html;
			},
			"ltr": function () {
				register.parse();
				var b1 = document.getElementById("b1");
				var div1 = b1.querySelector(".d-switch-leading");
				var div2 = b1.querySelector(".d-switch-trailing");
				assert.strictEqual(b1.effectiveDir === "ltr" ? div1.textContent : div2.textContent,
					"\u202a\u05d0\u05d1\u05d2\u202c", "ltr: wrong displayed value for 'checkedLabel'");
			},
			"rtl": function () {
				register.parse();
				var b2 = document.getElementById("b2");
				var div1 = b2.querySelector(".d-switch-leading");
				var div2 = b2.querySelector(".d-switch-trailing");
				assert.strictEqual(b2.effectiveDir === "ltr" ? div2.textContent : div1.textContent,
					"\u202bABC\u202c", "rtl: wrong displayed value for 'uncheckedLabel'");
			},
			"auto": function () {
				register.parse();
				var b3 = document.getElementById("b3");
				var div1 = b3.querySelector(".d-switch-leading");
				var div2 = b3.querySelector(".d-switch-trailing");
				assert.strictEqual(b3.effectiveDir === "ltr" ? div1.textContent : div2.textContent,
					"\u202b\u05d0\u05d1\u05d2\u202c", "auto: wrong displayed value for 'uncheckedLabel'");
				assert.strictEqual(b3.title, "\u202aABC \u05d0\u05d1\u05d2\u202c",
					"auto: wrong value for 'title'");
			},
			afterEach: function () {
				container.innerHTML = "";
			}
		},
		dynChanges: {
			beforeEach: function () {
				container.innerHTML = html;
			},
			"textDir": function () {
				var b1 = new Switch({id: "b1", checkedLabel: "\u05d0\u05d1\u05d2",
					uncheckedLabel: "ABC", checked: true});
				container.appendChild(b1);
				b1.attachedCallback();
				b1.textDir = "ltr";
				b1.deliver();
				var div1 = b1.querySelector(".d-switch-leading");
				var div2 = b1.querySelector(".d-switch-trailing");
				assert.strictEqual(b1.effectiveDir === "ltr" ? div1.textContent : div2.textContent,
					"\u202a\u05d0\u05d1\u05d2\u202c", "ltr: wrong displayed value for 'checkedLabel'");
				b1.checked = false;
				b1.deliver();
				assert.strictEqual(b1.effectiveDir === "ltr" ? div2.textContent : div1.textContent,
					"\u202aABC\u202c", "ltr: wrong displayed value for 'uncheckedLabel'");
				b1.textDir = "rtl";
				b1.deliver();
				assert.strictEqual(b1.effectiveDir === "ltr" ? div2.textContent : div1.textContent,
					"\u202bABC\u202c", "rtl: wrong displayed value for 'uncheckedLabel'");
				b1.checked = true;
				b1.deliver();
				assert.strictEqual(b1.effectiveDir === "ltr" ? div1.textContent : div2.textContent,
					"\u202b\u05d0\u05d1\u05d2\u202c", "rtl: wrong displayed value for 'checkedLabel'");
				b1.textDir = "auto";
				b1.deliver();
				assert.strictEqual(b1.effectiveDir === "ltr" ? div1.textContent : div2.textContent,
					"\u202b\u05d0\u05d1\u05d2\u202c", "auto: wrong displayed value for 'checkedLabel'");
				b1.checked = false;
				b1.deliver();
				assert.strictEqual(b1.effectiveDir === "ltr" ? div2.textContent : div1.textContent,
					"\u202aABC\u202c", "auto: wrong displayed value for 'uncheckedLabel'");
			},
			"labels": function () {
				var b2 = new Switch({id: "b2"});
				container.appendChild(b2);
				b2.attachedCallback();
				b2.textDir = "rtl";
				b2.uncheckedLabel = "ABC";
				b2.deliver();
				var div1 = b2.querySelector(".d-switch-leading");
				var div2 = b2.querySelector(".d-switch-trailing");
				assert.strictEqual(b2.effectiveDir === "ltr" ? div2.textContent : div1.textContent,
					"\u202bABC\u202c", "unchekedLabel: wrong displayed rtl value");
				b2.checkedLabel = "\u05d0\u05d1\u05d2";
				b2.textDir = "ltr";
				b2.checked = true;
				b2.deliver();
				assert.strictEqual(b2.effectiveDir === "ltr" ? div1.textContent : div2.textContent,
					"\u202a\u05d0\u05d1\u05d2\u202c", "checkdLabel: wrong displayed ltr value");
			},
			"title": function () {
				var b3 = new Switch({id: "b3"});
				container.appendChild(b3);
				b3.attachedCallback();
				b3.textDir = "auto";
				b3.title = "\u05d0\u05d1\u05d2 ABC";
				b3.deliver();
				assert.strictEqual("\u202b\u05d0\u05d1\u05d2 ABC\u202c", b3.title,
					"title: wrong value for 'auto' (1)");
				b3.textDir = "ltr";
				b3.title = "ABC \u05d0\u05d1\u05d2";
				b3.deliver();
				assert.strictEqual("\u202aABC \u05d0\u05d1\u05d2\u202c", b3.title,
					"title: wrong value for 'auto' (2)");
			},
			afterEach: function () {
				container.innerHTML = "";
			}
		},
		teardown: function () {
			container.parentNode.removeChild(container);
		}
	});
});


text:
<?php
/**
 * Created by PhpStorm.
 * User: sz
 * Date: 09.09.15
 * Time: 12:44
 */

namespace frontend\controllers;

use common\models\Lang;
use frontend\components\Helper;
use yii\helpers\VarDumper;

class Controller extends \yii\web\Controller
{
    public $topMenu;

    public function init(){
        parent::init();

        $this->topMenu = Helper::fillDefaultMenu();
    }

    protected function _findModel($modelName, $id){
        $model = $modelName::findOne($id);
        if(!$model)
            throw new NotFoundHttpException();
        return $model;
    }

    public function beforeAction($action){

        return parent::beforeAction($action);
    }

}


text:
CREATE TABLE IACUC_PROTOCOL_UNITS (
    IACUC_PROTOCOL_UNITS_ID NUMBER(12,0) NOT NULL,
    IACUC_PROT_INVESTIGATORS_ID NUMBER(12,0) NOT NULL,
    PROTOCOL_NUMBER VARCHAR2(20) NOT NULL,
    SEQUENCE_NUMBER NUMBER(4,0) NOT NULL,
    UNIT_NUMBER VARCHAR2(8) NOT NULL,
    LEAD_UNIT_FLAG VARCHAR2(1) NOT NULL,
    PERSON_ID VARCHAR2(40) NOT NULL,
    UPDATE_TIMESTAMP DATE,
    UPDATE_USER VARCHAR2(60),
    VER_NBR NUMBER(8,0) DEFAULT 1 NOT NULL,
    OBJ_ID VARCHAR2(36) NOT NULL)
/

ALTER TABLE IACUC_PROTOCOL_UNITS
ADD CONSTRAINT PK_IACUC_PROTOCOL_UNITS
PRIMARY KEY (IACUC_PROTOCOL_UNITS_ID)
/


text:
import os
import sys
from os.path import dirname, join, normpath

PYTHON_DIR = normpath(join(dirname(__file__), '../../../../src/'))
sys.path.insert(0,PYTHON_DIR)
PYTHON_DIR = normpath(join(dirname(__file__), '../../../../src/plugins/policy/'))
sys.path.insert(0,PYTHON_DIR)

from policymanager import PolicyManager

scope1 = "myTable"
scope2 = "myTable2"

class Resquest():

    user = None
    entity = None
    obj = None

class Thing():

    att1 = None
    att2 = None

mapping = {"att1":"metaObj['att1']",
           "att2":"metaObj['att2'"}

myThing = Thing()
myThing.att1=1024
myThing.att2=512

def printMessage(message):
    print "\n\n\n###################################"
    print message
    print "###################################"

PolicyManager.initialize(scope1,mapping,"RegexParser","RAWFile",fileName="database/myPolicyEngine.db")
PolicyManager.initialize(scope2,mapping,"RegexParser","RAWFile",fileName="database/myPolicyEngine2.db")

printMessage("Adding rule...")

PolicyManager.addRule(scope1,"if ( att1 < 512 ) then accept do log denyMessage Memory is greater than 512 MB #Preventing VMs with more than 512 MB")
PolicyManager.dump(scope1)

PolicyManager.addRule(scope2,"if ( att1 < 128 ) then accept do log denyMessage Memory is greater than 512 MB #Preventing VMs with more than 512 MB")
PolicyManager.dump(scope2)

printMessage("Addunning Rule...")

PolicyManager.addRule(scope1,"if ( att2 < 512 ) then accept do log denyMessage Memory is greater than 512 MB #Preventing VMs with more than 512 MB")
PolicyManager.dump(scope1)

printMessage("Evaluating table " +scope1+"...")

try:
    PolicyManager.evaluate(scope1, myThing)
    printMessage("Policy passed!")
except Exception:
    printMessage("Policy NOT passed!")

printMessage("Evaluating table " +scope2+"...")

try:
    PolicyManager.evaluate(scope2, myThing)
    printMessage("Policy passed!")
except Exception:
    printMessage("Policy NOT passed!")

myThing.att1=128

printMessage("Evaluating again the table " +scope1+"...")

try:
    PolicyManager.evaluate(scope1, myThing)
    printMessage( "Policy passed!")
except Exception:
    printMessage( "Policy NOT passed!")

printMessage("Removing first rule...")

PolicyManager.removeRule(scope1, index=0)
PolicyManager.dump(scope1)


text:
<!-- Copyright Microsoft Corporation 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. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.microsoft.azure</groupId>
	<artifactId>azure-storage</artifactId>
	<version>4.3.0</version>
	<packaging>jar</packaging>

	<name>Microsoft Azure Storage Client SDK</name>
	<description>SDK for Microsoft Azure Storage Clients</description>
	<url>https://github.com/Azure/azure-storage-java</url>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<url>scm:git:https://github.com/Azure/azure-storage-java</url>
		<connection>scm:git:git://github.com/Azure/azure-storage-java.git</connection>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<legal><![CDATA[[INFO] Any downloads listed may be third party software.  Microsoft grants you no rights for third party software.]]></legal>
	</properties>

	<developers>
		<developer>
			<id>microsoft</id>
			<name>Microsoft</name>
		</developer>
	</developers>

	<dependencies>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-core</artifactId>
			<version>2.6.0</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.12</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.4</version>
		</dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>1.7.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
			<groupId>com.microsoft.azure</groupId>
			<artifactId>azure-keyvault-core</artifactId>
			<version>0.8.0</version>
		</dependency>
		<dependency>
			<groupId>com.microsoft.azure</groupId>
			<artifactId>azure-keyvault-extensions</artifactId>
			<version>0.8.0</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<sourceDirectory>microsoft-azure-storage/src</sourceDirectory>
		<testSourceDirectory>microsoft-azure-storage-test/src</testSourceDirectory>
		<testResources>
			<testResource>
				<directory>microsoft-azure-storage-test/res</directory>
			</testResource>
		</testResources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.2</version>
				<executions>
					<execution>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.8</version>
				<configuration>
					<excludePackageNames>*.core</excludePackageNames>
					<show>public</show>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.13</version>
					<configuration>
						<parallel>classes</parallel>
						<threadCount>2</threadCount>
						<includes>
							<include>**/Test*.java</include>
							<include>**/*Test.java</include>
							<include>**/*Tests.java</include>
							<include>**/*TestCase.java</include>
						</includes>
						<argLine>-Dfile.encoding=UTF-8</argLine>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>


text:
<suite name="SauceTestSuite" verbose="5" parallel="tests" thread-count="10">
    <parameter name="username" value="${userName}"/>
    <parameter name="key" value="${accessKey}"/>
    <test name="WebDriverTests">
        <parameter name="os" value="Windows 2003"/>
        <parameter name="browser" value="firefox"/>
        <parameter name="browserVersion" value="17"/>
        <classes>
            <class name="SeleniumRCTest"/>
            <class name="SeleniumRCWithHelperTest"/>
        </classes>
    </test>

    <listeners>
        <listener class-name="com.saucelabs.testng.SauceOnDemandTestListener"/>
    </listeners>
</suite>


text:
1 Assembly of the War council.
  - Reveal Assets of the Dragon Spankers
  - They must appoint a General.
  - Information aquired by the Harpers:
    - The Cult has ammassed a force at the Northern end of the Sunset Mountains outside of a dormant volcano known as
      The Well of Dragons.
    - The Red Wizards were in the process of summoning the Temple of Tiamat to this plane of existence.
  - Plan their attack.

2. Gather Supplies and Information and Army Mobilizes.
3. Set Scene of the Final batttle. Reveal Enemy assets, Have the War Council Engage in RTS Style Battle warfare
  - If things get hairy:
     - The kobolds from the castle in the Mere of the Dead men can provide reinforcements ( Kobold brandishing a hand axe
     riding and Otyugh) Leading a band of Kobolds wearing shoddy armor with paintings of ulfgar Big axe on their flags.
4. Storming / Sneaking into the Well of the dragons
  - If they use thier assets for recon they can discover the back entrance, Otherwise they may have to fight through
  to the front.

5 Stopping the Ritual:
  - 10 rounds till full summon
    - requires 5 wizards to use an action to summon.
  - After 10 rounds Tiamat Emerges in head order 1 per round
     - White, black, green, blue and red.
  - She then proceeds to eat all the wizards then fight the adventurers.


text:
package com.bt.pi.core.application.resource;

import javax.annotation.Resource;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.bt.pi.core.application.resource.leased.LeasedResourceAllocationRecordHeartbeater;
import com.bt.pi.core.application.resource.watched.SharedResourceWatchingStrategy;
import com.bt.pi.core.conf.Property;

public abstract class AbstractResourceWatchingStrategy<ResourceIdType, ResourceType> implements SharedResourceWatchingStrategy<ResourceIdType> {
    private static final Log LOG = LogFactory.getLog(AbstractResourceWatchingStrategy.class);
    private static final String SHARED_RESOURCE_REFRESH_INITIAL_WAIT_TIME_MILIS = "shared.resource.refresh.initial.wait.time.milis";
    private static final String SHARED_RESOURCE_REFRESH_INTERVAL_MILIS = "shared.resource.refresh.interval.milis";
    private static final String SHARED_RESOURCE_CONSUMER_INITIAL_WAIT_TIME_MILIS = "shared.resource.consumer.initial.wait.time.milis";
    private static final String SHARED_RESOURCE_CONSUMER_INTERVAL_MILIS = "shared.resource.consumer.interval.milis";
    private static final String DEFAULT_RESOURCE_REFRESH_INITIAL_WAIT_TIME_MILIS = "300000";
    private static final String DEFAULT_RESOURCE_REFRESH_INTERVAL_MILIS = "600000";
    private static final String DEFAULT_CONSUMER_INITIAL_WAIT_TIME_MILIS = "240000";
    private static final String DEFAULT_RESOURCE_CONSUMER_INTERVAL_MILIS = "660000";
    private CachingConsumedResourceRegistry cachingConsumedResourceRegistry;
    private long initialConsumerWatcherIntervalMillis;
    private long initialResourceRefreshIntervalMillis;
    private long repeatingConsumerWatcherIntervalMillis;
    private long repeatingResourceRefreshIntervalMillis;
    private LeasedResourceAllocationRecordHeartbeater leasedResourceAllocationRecordHeartbeater;

    public AbstractResourceWatchingStrategy() {
        this.cachingConsumedResourceRegistry = null;
        this.initialConsumerWatcherIntervalMillis = Long.parseLong(DEFAULT_CONSUMER_INITIAL_WAIT_TIME_MILIS);
        this.initialResourceRefreshIntervalMillis = Long.parseLong(DEFAULT_RESOURCE_REFRESH_INITIAL_WAIT_TIME_MILIS);
        this.repeatingConsumerWatcherIntervalMillis = Long.parseLong(DEFAULT_RESOURCE_CONSUMER_INTERVAL_MILIS);
        this.repeatingResourceRefreshIntervalMillis = Long.parseLong(DEFAULT_RESOURCE_REFRESH_INTERVAL_MILIS);
    }

    @Override
    public long getRepeatingConsumerWatcherIntervalMillis() {
        return this.repeatingConsumerWatcherIntervalMillis;
    }

    @Property(key = SHARED_RESOURCE_CONSUMER_INTERVAL_MILIS, defaultValue = DEFAULT_RESOURCE_CONSUMER_INTERVAL_MILIS)
    public void setRepeatingConsumerWatcherIntervalMillis(long value) {
        this.repeatingConsumerWatcherIntervalMillis = value;
    }

    @Override
    public long getRepeatingResourceRefreshIntervalMillis() {
        return this.repeatingResourceRefreshIntervalMillis;
    }

    @Property(key = SHARED_RESOURCE_REFRESH_INTERVAL_MILIS, defaultValue = DEFAULT_RESOURCE_REFRESH_INTERVAL_MILIS)
    public void setRepeatingResourceRefreshIntervalMillis(long value) {
        this.repeatingResourceRefreshIntervalMillis = value;
    }

    @Override
    public long getInitialResourceRefreshIntervalMillis() {
        return this.initialResourceRefreshIntervalMillis;
    }

    @Property(key = SHARED_RESOURCE_REFRESH_INITIAL_WAIT_TIME_MILIS, defaultValue = DEFAULT_RESOURCE_REFRESH_INITIAL_WAIT_TIME_MILIS)
    public void setInitialResourceRefreshIntervalMillis(long value) {
        this.initialResourceRefreshIntervalMillis = value;
    }

    @Property(key = SHARED_RESOURCE_CONSUMER_INITIAL_WAIT_TIME_MILIS, defaultValue = DEFAULT_CONSUMER_INITIAL_WAIT_TIME_MILIS)
    public void setInitialConsumerWatcherIntervalMillis(long value) {
        this.initialConsumerWatcherIntervalMillis = value;
    }

    @Override
    public long getInitialConsumerWatcherIntervalMillis() {
        return this.initialConsumerWatcherIntervalMillis;
    }

    @Resource
    public void setCachingConsumedResourceRegistry(CachingConsumedResourceRegistry aCachingConsumedResourceRegistry) {
        this.cachingConsumedResourceRegistry = aCachingConsumedResourceRegistry;
    }

    @Resource
    public void setLeasedResourceAllocationRecordHeartbeater(LeasedResourceAllocationRecordHeartbeater aLeasedResourceAllocationRecordHeartbeater) {
        this.leasedResourceAllocationRecordHeartbeater = aLeasedResourceAllocationRecordHeartbeater;
    }

    protected LeasedResourceAllocationRecordHeartbeater getLeasedResourceAllocationRecordHeartbeater() {
        return leasedResourceAllocationRecordHeartbeater;
    }

    protected CachingConsumedResourceRegistry getCachingConsumedResourceRegistry() {
        if (cachingConsumedResourceRegistry == null) {
            LOG.warn("null cachingConsumedRegistry");
            throw new NullPointerException("Resource registry has not been set! If this is desired behavour, override this method.");
        }
        return cachingConsumedResourceRegistry;
    }

    public abstract Runnable getSharedResourceRefreshRunner(ResourceIdType resourceId);

    @Override
    public Runnable getConsumerWatcher(ResourceIdType resourceId, String consumerId) {
        return null;
    };
}


text:
namespace Songhay.Models;

/// <summary>
/// Defines an image used by XHTML(5) clients
/// </summary>
public class XhtmlImage
{
    /// <summary>
    /// Gets or sets the location.
    /// </summary>
    public Uri? Location { get; set; }

    /// <summary>
    /// Gets or sets the height.
    /// </summary>
    public string? Height { get; set; }

    /// <summary>
    /// Gets or sets the height in pixels.
    /// </summary>
    public int? HeightInPixels { get; set; }

    /// <summary>
    /// Gets or sets the width.
    /// </summary>
    public string? Width { get; set; }

    /// <summary>
    /// Gets or sets the width in pixels.
    /// </summary>
    public int? WidthInPixels { get; set; }
}


text:
layout: page
title: Aayush Arora, frontend developer.
name: Aayush Arora
github: aayusharora
url: https://aayusharora.github.io/
tags: web, javascript, angularjs, nodejs, jQuery, bootstrap, css, html, knockoutjs
availability: available
rate: flexible / project based
projects: fossasia/open-event-webapp
linkedin: https://www.linkedin.com/in/angularboy/
---

Aayush is a frontend developer specialised in frameworks like AngularJS, jQuery and KnockoutJS. He has contributed as a Google Summer Of Code developer with Fossasia community and is mentoring for Google Summer Of Code 2017. His areas of interest lies in Human Computer Interaction, Virtual Reality, UX research and Data Visualizations.


text:
/**
  __The session provides access to the current authentication state as well as
  any data the authenticator resolved with__ (see
  [`Authenticators.Base#authenticate`](#SimpleAuth-Authenticators-Base-authenticate)).
  It is created when Ember Simple Auth is set up and __injected into all
  controllers and routes so that these parts of the application can always
  access the current authentication state and other data__, depending on the
  authenticator in use and whether the session is actually authenticated (see
  [`Authenticators.Base`](#SimpleAuth-Authenticators-Base)).

  The session also provides methods to authenticate and to invalidate itself
  (see
  [`Session#authenticate`](#SimpleAuth-Session-authenticate),
  [`Session#invaldiate`](#SimpleAuth-Session-invaldiate)).
  These methods are usually invoked through actions from routes or controllers.
  To authenticate the session manually, simple call the
  [`Session#authenticate`](#SimpleAuth-Session-authenticate)
  method with the authenticator factory to use as well as any options the
  authenticator needs to authenticate the session:

  ```js
  this.get('session').authenticate('authenticator:custom', { some: 'option' }).then(function() {
    // authentication was successful
  }, function() {
    // authentication failed
  });
  ```

  The session also observes the store and - if it is authenticated - the
  authenticator for changes (see
  [`Authenticators.Base`](#SimpleAuth-Authenticators-Base)
  end [`Stores.Base`](#SimpleAuth-Stores-Base)).

  @class Session
  @namespace SimpleAuth
  @module simple-auth/session
  @extends Ember.ObjectProxy
  @uses Ember.Evented
*/
export default Ember.ObjectProxy.extend(Ember.Evented, {
  /**
    Triggered __whenever the session is successfully authenticated__. When the
    application uses the
    [`ApplicationRouteMixin` mixin](#SimpleAuth-ApplicationRouteMixin),
    [`ApplicationRouteMixin.actions#sessionAuthenticationSucceeded`](#SimpleAuth-ApplicationRouteMixin-sessionAuthenticationSucceeded)
    will be invoked whenever this event is triggered.

    @event sessionAuthenticationSucceeded
  */
  /**
    Triggered __whenever an attempt to authenticate the session fails__. When
    the application uses the
    [`ApplicationRouteMixin` mixin](#SimpleAuth-ApplicationRouteMixin),
    [`ApplicationRouteMixin.actions#sessionAuthenticationFailed`](#SimpleAuth-ApplicationRouteMixin-sessionAuthenticationFailed)
    will be invoked whenever this event is triggered.

    @event sessionAuthenticationFailed
    @param {Object} error The error object; this depends on the authenticator in use, see [SimpleAuth.Authenticators.Base#authenticate](#SimpleAuth-Authenticators-Base-authenticate)
  */
  /**
    Triggered __whenever the session is successfully invalidated__. When the
    application uses the
    [`ApplicationRouteMixin` mixin](#SimpleAuth-ApplicationRouteMixin),
    [`ApplicationRouteMixin.actions#sessionInvalidationSucceeded`](#SimpleAuth-ApplicationRouteMixin-sessionInvalidationSucceeded)
    will be invoked whenever this event is triggered.

    @event sessionInvalidationSucceeded
  */
  /**
    Triggered __whenever an attempt to invalidate the session fails__. When the
    application uses the
    [`ApplicationRouteMixin` mixin](#SimpleAuth-ApplicationRouteMixin),
    [`ApplicationRouteMixin.actions#sessionInvalidationFailed`](#SimpleAuth-ApplicationRouteMixin-sessionInvalidationFailed)
    will be invoked whenever this event is triggered.

    @event sessionInvalidationFailed
    @param {Object} error The error object; this depends on the authenticator in use, see [SimpleAuth.Authenticators.Base#invalidate](#SimpleAuth-Authenticators-Base-invalidate)
  */
  /**
    Triggered __whenever the server rejects the authorization information
    passed with a request and responds with status 401__. When the application
    uses the
    [`ApplicationRouteMixin` mixin](#SimpleAuth-ApplicationRouteMixin),
    [`ApplicationRouteMixin.actions#authorizationFailed`](#SimpleAuth-ApplicationRouteMixin-authorizationFailed)
    will be invoked whenever this event is triggered.

    @event authorizationFailed
  */

  /**
    The authenticator factory to use as it is registered with Ember's
    container, see
    [Ember's API docs](http://emberjs.com/api/classes/Ember.Application.html#method_register).
    This is only set when the session is currently authenticated.

    @property authenticator
    @type String
    @readOnly
    @default null
  */
  authenticator: null,
  /**
    The store used to persist session properties.

    @property store
    @type SimpleAuth.Stores.Base
    @readOnly
    @default null
  */
  store: null,
  /**
    The Ember.js container,

    @property container
    @type Container
    @readOnly
    @default null
  */
  container: null,
  /**
    Returns whether the session is currently authenticated.

    @property isAuthenticated
    @type Boolean
    @readOnly
    @default false
  */
  isAuthenticated: false,
  /**
    @property attemptedTransition
    @private
  */
  attemptedTransition: null,
  /**
    @property content
    @private
  */
  content: null,

  /**
    Initializes the content object so references aren't shared across
    instances.

    @method initializeContent
    @private
  */
  initializeContent: Ember.on('init', function() {
    this.set('content', { secure: {} });
  }),

  /**
    Authenticates the session with an `authenticator` and appropriate
    `options`. __This delegates the actual authentication work to the
    `authenticator`__ and handles the returned promise accordingly (see
    [`Authenticators.Base#authenticate`](#SimpleAuth-Authenticators-Base-authenticate)).
    All data the authenticator resolves with will be saved in the session's
    `secure` property.

    __This method returns a promise itself. A resolving promise indicates that
    the session was successfully authenticated__ while a rejecting promise
    indicates that authentication failed and the session remains
    unauthenticated.

    @method authenticate
    @param {String} authenticator The authenticator factory to use as it is registered with Ember's container, see [Ember's API docs](http://emberjs.com/api/classes/Ember.Application.html#method_register)
    @param {Any} [...args] The arguments to pass to the authenticator; depending on the type of authenticator these might be a set of credentials, a Facebook OAuth Token, etc.
    @return {Ember.RSVP.Promise} A promise that resolves when the session was authenticated successfully
  */
  authenticate: function() {
    var args          = Array.prototype.slice.call(arguments);
    var authenticator = args.shift();
    Ember.assert('Session#authenticate requires the authenticator factory to be specified, was "' + authenticator + '"!', !Ember.isEmpty(authenticator));
    var _this            = this;
    var theAuthenticator = this.container.lookup(authenticator);
    Ember.assert('No authenticator for factory "' + authenticator + '" could be found!', !Ember.isNone(theAuthenticator));
    return new Ember.RSVP.Promise(function(resolve, reject) {
      theAuthenticator.authenticate.apply(theAuthenticator, args).then(function(content) {
        _this.setup(authenticator, content, true);
        resolve();
      }, function(error) {
        _this.clear();
        _this.trigger('sessionAuthenticationFailed', error);
        reject(error);
      });
    });
  },

  /**
    Invalidates the session with the authenticator it is currently
    authenticated with (see
    [`Session#authenticator`](#SimpleAuth-Session-authenticator)). __This
    invokes the authenticator's `invalidate` method and handles the returned
    promise accordingly__ (see
    [`Authenticators.Base#invalidate`](#SimpleAuth-Authenticators-Base-invalidate)).

    __This method returns a promise itself. A resolving promise indicates that
    the session was successfully invalidated__ while a rejecting promise
    indicates that the promise returned by the `authenticator` rejected and
    thus invalidation was cancelled. In that case the session remains
    authenticated. Once the session is successfully invalidated it clears all
    of its data.

    @method invalidate
    @return {Ember.RSVP.Promise} A promise that resolves when the session was invalidated successfully
  */
  invalidate: function() {
    Ember.assert('Session#invalidate requires the session to be authenticated!', this.get('isAuthenticated'));
    var _this = this;
    return new Ember.RSVP.Promise(function(resolve, reject) {
      var authenticator = _this.container.lookup(_this.authenticator);
      authenticator.invalidate(_this.content.secure).then(function() {
        authenticator.off('sessionDataUpdated');
        _this.clear(true);
        resolve();
      }, function(error) {
        _this.trigger('sessionInvalidationFailed', error);
        reject(error);
      });
    });
  },

  /**
    @method restore
    @private
  */
  restore: function() {
    var _this = this;
    return new Ember.RSVP.Promise(function(resolve, reject) {
      var restoredContent = _this.store.restore();
      var authenticator   = (restoredContent.secure || {}).authenticator;
      if (!!authenticator) {
        delete restoredContent.secure.authenticator;
        _this.container.lookup(authenticator).restore(restoredContent.secure).then(function(content) {
          _this.set('content', restoredContent);
          _this.setup(authenticator, content);
          resolve();
        }, function() {
          _this.clear();
          reject();
        });
      } else {
        _this.clear();
        reject();
      }
    });
  },

  /**
    @method setup
    @private
  */
  setup: function(authenticator, secureContent, trigger) {
    trigger = !!trigger && !this.get('isAuthenticated');
    this.beginPropertyChanges();
    this.setProperties({
      isAuthenticated: true,
      authenticator:   authenticator
    });
    Ember.set(this.content, 'secure', secureContent);
    this.bindToAuthenticatorEvents();
    this.updateStore();
    this.endPropertyChanges();
    if (trigger) {
      this.trigger('sessionAuthenticationSucceeded');
    }
  },

  /**
    @method clear
    @private
  */
  clear: function(trigger) {
    trigger = !!trigger && this.get('isAuthenticated');
    this.beginPropertyChanges();
    this.setProperties({
      isAuthenticated: false,
      authenticator:   null
    });
    Ember.set(this.content, 'secure', {});
    this.updateStore();
    this.endPropertyChanges();
    if (trigger) {
      this.trigger('sessionInvalidationSucceeded');
    }
  },

  /**
    @method setUnknownProperty
    @private
  */
  setUnknownProperty: function(key, value) {
    Ember.assert('"secure" is a reserved key used by Ember Simple Auth!', key !== 'secure');
    var result = this._super(key, value);
    this.updateStore();
    return result;
  },

  /**
    @method updateStore
    @private
  */
  updateStore: function() {
    var data = this.content;
    if (!Ember.isEmpty(this.authenticator)) {
      Ember.set(data, 'secure', Ember.merge({ authenticator: this.authenticator }, data.secure || {}));
    }
    this.store.persist(data);
  },

  /**
    @method bindToAuthenticatorEvents
    @private
  */
  bindToAuthenticatorEvents: function() {
    var _this = this;
    var authenticator = this.container.lookup(this.authenticator);
    authenticator.off('sessionDataUpdated');
    authenticator.off('sessionDataInvalidated');
    authenticator.on('sessionDataUpdated', function(content) {
      _this.setup(_this.authenticator, content);
    });
    authenticator.on('sessionDataInvalidated', function(content) {
      _this.clear(true);
    });
  },

  /**
    @method bindToStoreEvents
    @private
  */
  bindToStoreEvents: Ember.observer('store', function() {
    var _this = this;
    this.store.on('sessionDataUpdated', function(content) {
      var authenticator = (content.secure || {}).authenticator;
      if (!!authenticator) {
        delete content.secure.authenticator;
        _this.container.lookup(authenticator).restore(content.secure).then(function(secureContent) {
          _this.set('content', content);
          _this.setup(authenticator, secureContent, true);
        }, function() {
          _this.set('content', content);
          _this.clear(true);
        });
      } else {
        _this.set('content', content);
        _this.clear(true);
      }
    });
  })
});


text:
import pava
import unittest

class IfElseTest(unittest.TestCase):
    def test_add(self):
        pava.run_java_test('int', 'boolean x=true; if (x) { return 1; } else { return 2;}')
        pava.run_java_test('int', 'boolean x=false; if (x) { return 1; } else { return 2;}')
        pava.run_java_test('int', 'boolean x=true; if (!x) { return 1; } else { return 2;}')
        pava.run_java_test('int', 'boolean x=false; if (!x) { return 1; } else { return 2;}')

if __name__ == "__main__":
    unittest.main()


text:
package fr.univnantes.termsuite.ui.util;

import java.util.Collection;
import java.util.Map;
import java.util.Set;

import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;

import fr.univnantes.termsuite.model.Lang;
import fr.univnantes.termsuite.ui.model.termsuiteui.ELang;

public class LangUtil {
	private static Map<ELang, String> countries = Maps.newHashMap();
	private static Map<ELang, Lang> tsLangs = Maps.newHashMap();

	static {
		countries.put(ELang.FR, "France");
		countries.put(ELang.EN, "United-Kingdom");
		countries.put(ELang.DE, "Germany");
		countries.put(ELang.IT, "Italy");
		countries.put(ELang.ES, "Spain");
//		countries.put(ELang.LV, "Latvia");
		countries.put(ELang.RU, "Russia");
//		countries.put(ELang.DA, "Denmark");
//		countries.put(ELang.ZH, "China");
		countries = ImmutableMap.copyOf(countries);

		tsLangs.put(ELang.FR, Lang.FR);
		tsLangs.put(ELang.EN, Lang.EN);
		tsLangs.put(ELang.IT, Lang.IT);
		tsLangs.put(ELang.ES, Lang.ES);
		tsLangs.put(ELang.DE, Lang.DE);
		tsLangs.put(ELang.RU, Lang.RU);
//		tsLangs.put(ELang.DA, Lang.DA);
//		tsLangs.put(ELang.LV, Lang.LV);
//		tsLangs.put(ELang.ZH, Lang.ZH);
		tsLangs = ImmutableMap.copyOf(tsLangs);
	}

	public static Lang getTermsuiteLang(ELang lang) {
		Preconditions.checkArgument(isLangSupported(lang), "Language not found: %s", lang.getName());
		return tsLangs.get(lang);
	}

	public static Collection<ELang> getSupportedLanguages() {
		return tsLangs.keySet();
	}

	public static Collection<String> getSupportedLanguagesAsResourcePatterns() {
		Set<String> patterns = Sets.newHashSet();
		for(ELang supportedLang:getSupportedLanguages())
			patterns.add(getCode(supportedLang) + "/");
		return patterns;
	}

	private static String getCode(ELang supportedLang) {
		return getTermsuiteLang(supportedLang).getCode();
	}

	public static boolean isLangSupported(ELang lang) {
		return tsLangs.containsKey(lang);
	}

	public static boolean isLangSupportedByCode(String code) {
		ELang lang = getLangByCode(code);
		if(lang == null)
			return false;
		else
			return isLangSupported(lang);
	}

	public static String getCountry(ELang lang) {
		return countries.get(lang);
	}

	public static ELang getLangByCode(String code) {
		return ELang.getByName(code.toUpperCase());
	}

	public static ELang getLangByNameUC(String name) {
		for(Lang l:Lang.values())
			if(l.getNameUC().equals(name))
				return ELang.getByName(l.getCode().toUpperCase());
		return null;
	}
	public static ELang getLangByNameDC(String name) {
		for(Lang l:Lang.values())
			if(l.getName().equals(name))
				return ELang.getByName(l.getCode().toUpperCase());
		return null;
	}

	public static ELang getLanguageByString(String target) {
		ELang targetLang = getLangByCode(target);
		if(targetLang == null)
			targetLang = getLangByNameDC(target);
		if(targetLang == null)
			targetLang = getLangByNameUC(target);

		return targetLang;
	}

}


text:
using System;
using PublicClass;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;

namespace Models
{
    [Serializable]
    [Table("Sys_Table")]
    [ModelAttribute("Sys_Table", "")]
    public partial class TheSysTableInfo : BaseMODEL
    {

        private int? _tableid;
        /// <summary>
        /// 表格编号
        /// </summary>
        [ModelAttribute(4,"","表格编号")]
        [Key]
        public int? tableid
        {
            get { return _tableid; }
            set { _tableid = value; }
        }

        private string _tablename;
        /// <summary>
        /// 表格名称
        /// </summary>
        [ModelAttribute(50,0,false,"","表格名称")]
        public string tablename
        {
            get { return _tablename; }
            set { _tablename = value; }
        }

        private string _tablecode;
        /// <summary>
        /// 数据表名称
        /// </summary>
        [ModelAttribute(50,0,false,"","数据表名称")]
        public string tablecode
        {
            get { return _tablecode; }
            set { _tablecode = value; }
        }

        private string _tabletype;
        /// <summary>
        /// 表类型(table,view)
        /// </summary>
        [ModelAttribute(50,0,false,"","表类型(table,view)")]
        public string tabletype
        {
            get { return _tabletype; }
            set { _tabletype = value; }
        }

        private DateTime? _creadtime;
        /// <summary>
        /// 创建日期
        /// </summary>
        [ModelAttribute(4,0,false,"","创建日期")]
        public DateTime? creadtime
        {
            get { return _creadtime; }
            set { _creadtime = value; }
        }

        private string _tablecolumns;
        /// <summary>
        /// 表格列数据
        /// </summary>
        [ModelAttribute(1000,0,false,"","表格列数据")]
        public string tablecolumns
        {
            get { return _tablecolumns; }
            set { _tablecolumns = value; }
        }

        /// <summary>
        /// 数据枚举
        /// </summary>
        public enum QueryItem
        {
           tableid , tablename , tablecode , tabletype , creadtime , tablecolumns
        }
    }
}


text:
<?php
namespace CakephpBlueimpUpload\Model\Table;

use Cake\ORM\Query;
use Cake\ORM\RulesChecker;
use Cake\ORM\Table;
use Cake\Validation\Validator;
use CakephpBlueimpUpload\Model\Entity\Upload;
use Cake\Core\Configure;

/**
 * AlaxosUploads Model
 */
class UploadsTable extends Table
{

    /**
     * Initialize method
     *
     * @param array $config The configuration for the Table.
     * @return void
     */
    public function initialize(array $config)
    {
        $table = Configure::check('CakephpBlueimpUpload.upload_table') ? Configure::read('CakephpBlueimpUpload.upload_table') : 'uploads';

        $this->setTable($table);
        $this->setDisplayField('id');
        $this->setPrimaryKey('id');
        $this->addBehavior('Timestamp');
        $this->addBehavior('Alaxos.UserLink');
    }

    /**
     * Default validation rules.
     *
     * @param \Cake\Validation\Validator $validator Validator instance.
     * @return \Cake\Validation\Validator
     */
    public function validationDefault(Validator $validator)
    {
        $validator
            ->add('id', 'valid', ['rule' => 'numeric'])
            ->allowEmpty('id', 'create');

        $validator
            ->requirePresence('upload_id', 'create')
            ->notEmpty('upload_id');

        $validator
            ->requirePresence('original_filename', 'create')
            ->notEmpty('original_filename');

        $validator
            ->requirePresence('unique_filename', 'create')
            ->notEmpty('unique_filename');

        $validator
            ->allowEmpty('subfolder');

        $validator
            ->allowEmpty('mimetype');

        $validator
            ->add('size', 'valid', ['rule' => 'numeric'])
            ->requirePresence('size', 'create')
            ->notEmpty('size');

        $validator
            ->requirePresence('hash', 'create')
            ->notEmpty('hash');

        $validator
            ->add('upload_complete', 'valid', ['rule' => 'boolean'])
            ->requirePresence('upload_complete', 'create')
            ->notEmpty('upload_complete');

        $validator
            ->allowEmpty('label');

        $validator
            ->add('created_by', 'valid', ['rule' => 'numeric'])
            ->requirePresence('created_by', 'create')
            ->notEmpty('created_by');

        $validator
            ->add('modified_by', 'valid', ['rule' => 'numeric'])
            ->allowEmpty('modified_by');

        return $validator;
    }
}


text:
#pragma once

#include "SVGAnimatedBoolean.h"
#include "SVGAnimatedEnumeration.h"
#include "SVGAnimatedLength.h"
#include "SVGElement.h"
#include "SVGExternalResourcesRequired.h"
#include "SVGNames.h"
#include "SVGTests.h"
#include "SVGUnitTypes.h"

namespace WebCore {

class SVGMaskElement final : public SVGElement, public SVGTests, public SVGExternalResourcesRequired {
public:
    static Ref<SVGMaskElement> create(const QualifiedName&, Document&);

    // SVGTests
    Ref<SVGStringList> requiredFeatures();
    Ref<SVGStringList> requiredExtensions();
    Ref<SVGStringList> systemLanguage();

private:
    SVGMaskElement(const QualifiedName&, Document&);

    bool isValid() const final { return SVGTests::isValid(); }
    bool needsPendingResourceHandling() const final { return false; }

    static bool isSupportedAttribute(const QualifiedName&);
    void parseAttribute(const QualifiedName&, const AtomicString&) final;
    void svgAttributeChanged(const QualifiedName&) final;
    void childrenChanged(const ChildChange&) final;

    RenderPtr<RenderElement> createElementRenderer(RenderStyle&&, const RenderTreePosition&) final;

    bool selfHasRelativeLengths() const final { return true; }

    BEGIN_DECLARE_ANIMATED_PROPERTIES(SVGMaskElement)
        DECLARE_ANIMATED_ENUMERATION(MaskUnits, maskUnits, SVGUnitTypes::SVGUnitType)
        DECLARE_ANIMATED_ENUMERATION(MaskContentUnits, maskContentUnits, SVGUnitTypes::SVGUnitType)
        DECLARE_ANIMATED_LENGTH(X, x)
        DECLARE_ANIMATED_LENGTH(Y, y)
        DECLARE_ANIMATED_LENGTH(Width, width)
        DECLARE_ANIMATED_LENGTH(Height, height)
        DECLARE_ANIMATED_BOOLEAN_OVERRIDE(ExternalResourcesRequired, externalResourcesRequired)
    END_DECLARE_ANIMATED_PROPERTIES

    // SVGTests
    void synchronizeRequiredFeatures() final { SVGTests::synchronizeRequiredFeatures(*this); }
    void synchronizeRequiredExtensions() final { SVGTests::synchronizeRequiredExtensions(*this); }
    void synchronizeSystemLanguage() final { SVGTests::synchronizeSystemLanguage(*this); }
};

} // namespace WebCore