text:
.class public Lcom/htc/wrap/android/provider/HtcWrapSettings$NameValueTable;
.super Lcom/htc/wrap/android/provider/Settings$NameValueTable;
.source "HtcWrapSettings.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/htc/wrap/android/provider/HtcWrapSettings;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "NameValueTable"
.end annotation

# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 127
    invoke-direct {p0}, Lcom/htc/wrap/android/provider/Settings$NameValueTable;-><init>()V

    return-void
.end method


text:
package org.apache.accumulo.fate.zookeeper;

import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.capture;
import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.createStrictMock;
import static org.easymock.EasyMock.eq;
import static org.easymock.EasyMock.expect;
import static org.easymock.EasyMock.expectLastCall;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;

import java.util.List;

import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.data.Stat;
import org.easymock.Capture;
import org.easymock.EasyMock;
import org.junit.Before;
import org.junit.Test;

public class ZooCacheTest {
  private static final String ZPATH = "/some/path/in/zk";
  private static final byte[] DATA = {(byte) 1, (byte) 2, (byte) 3, (byte) 4};
  private static final List<String> CHILDREN = java.util.Arrays.asList(new String[] {"huey", "dewey", "louie"});

  private ZooReader zr;
  private ZooKeeper zk;
  private ZooCache zc;

  @Before
  public void setUp() throws Exception {
    zr = createMock(ZooReader.class);
    zk = createStrictMock(ZooKeeper.class);
    expect(zr.getZooKeeper()).andReturn(zk);
    expectLastCall().anyTimes();
    replay(zr);

    zc = new ZooCache(zr, null);
  }

  @Test
  public void testGet() throws Exception {
    testGet(false);
  }

  @Test
  public void testGet_FillStat() throws Exception {
    testGet(true);
  }

  private void testGet(boolean fillStat) throws Exception {
    Stat myStat = null;
    if (fillStat) {
      myStat = new Stat();
    }
    long now = System.currentTimeMillis();
    Stat existsStat = new Stat();
    existsStat.setMtime(now);
    expect(zk.exists(eq(ZPATH), anyObject(Watcher.class))).andReturn(existsStat);
    expect(zk.getData(eq(ZPATH), anyObject(Watcher.class), eq(existsStat))).andReturn(DATA);
    replay(zk);

    assertFalse(zc.dataCached(ZPATH));
    assertArrayEquals(DATA, (fillStat ? zc.get(ZPATH, myStat) : zc.get(ZPATH)));
    verify(zk);
    if (fillStat) {
      assertEquals(now, myStat.getMtime());
    }

    assertTrue(zc.dataCached(ZPATH));
    assertSame(DATA, zc.get(ZPATH)); // cache hit
  }

  @Test
  public void testGet_NonExistent() throws Exception {
    expect(zk.exists(eq(ZPATH), anyObject(Watcher.class))).andReturn(null);
    replay(zk);

    assertNull(zc.get(ZPATH));
    verify(zk);
  }

  @Test
  public void testGet_Retry_NoNode() throws Exception {
    testGet_Retry(new KeeperException.NoNodeException(ZPATH));
  }

  @Test
  public void testGet_Retry_ConnectionLoss() throws Exception {
    testGet_Retry(new KeeperException.ConnectionLossException());
  }

  @Test
  public void testGet_Retry_BadVersion() throws Exception {
    testGet_Retry(new KeeperException.BadVersionException(ZPATH));
  }

  @Test
  public void testGet_Retry_Interrupted() throws Exception {
    testGet_Retry(new InterruptedException());
  }

  private void testGet_Retry(Exception e) throws Exception {
    expect(zk.exists(eq(ZPATH), anyObject(Watcher.class))).andThrow(e);
    Stat existsStat = new Stat();
    expect(zk.exists(eq(ZPATH), anyObject(Watcher.class))).andReturn(existsStat);
    expect(zk.getData(eq(ZPATH), anyObject(Watcher.class), eq(existsStat))).andReturn(DATA);
    replay(zk);

    assertArrayEquals(DATA, zc.get(ZPATH));
    verify(zk);
  }

  @Test
  public void testGet_Retry2_NoNode() throws Exception {
    testGet_Retry2(new KeeperException.NoNodeException(ZPATH));
  }

  @Test
  public void testGet_Retry2_ConnectionLoss() throws Exception {
    testGet_Retry2(new KeeperException.ConnectionLossException());
  }

  @Test
  public void testGet_Retry2_BadVersion() throws Exception {
    testGet_Retry2(new KeeperException.BadVersionException(ZPATH));
  }

  @Test
  public void testGet_Retry2_Interrupted() throws Exception {
    testGet_Retry2(new InterruptedException());
  }

  private void testGet_Retry2(Exception e) throws Exception {
    Stat existsStat = new Stat();
    expect(zk.exists(eq(ZPATH), anyObject(Watcher.class))).andReturn(existsStat);
    expect(zk.getData(eq(ZPATH), anyObject(Watcher.class), eq(existsStat))).andThrow(e);
    expect(zk.exists(eq(ZPATH), anyObject(Watcher.class))).andReturn(existsStat);
    expect(zk.getData(eq(ZPATH), anyObject(Watcher.class), eq(existsStat))).andReturn(DATA);
    replay(zk);

    assertArrayEquals(DATA, zc.get(ZPATH));
    verify(zk);
  }

  // ---

  @Test
  public void testGetChildren() throws Exception {
    expect(zk.getChildren(eq(ZPATH), anyObject(Watcher.class))).andReturn(CHILDREN);
    replay(zk);

    assertFalse(zc.childrenCached(ZPATH));
    assertEquals(CHILDREN, zc.getChildren(ZPATH));
    verify(zk);

    assertTrue(zc.childrenCached(ZPATH));
    // cannot check for sameness, return value is wrapped each time
    assertEquals(CHILDREN, zc.getChildren(ZPATH)); // cache hit
  }

  @Test
  public void testGetChildren_NoKids() throws Exception {
    expect(zk.getChildren(eq(ZPATH), anyObject(Watcher.class))).andReturn(null);
    replay(zk);

    assertNull(zc.getChildren(ZPATH));
    verify(zk);

    assertNull(zc.getChildren(ZPATH)); // cache hit
  }

  @Test
  public void testGetChildren_Retry() throws Exception {
    expect(zk.getChildren(eq(ZPATH), anyObject(Watcher.class))).andThrow(new KeeperException.BadVersionException(ZPATH));
    expect(zk.getChildren(eq(ZPATH), anyObject(Watcher.class))).andReturn(CHILDREN);
    replay(zk);

    assertEquals(CHILDREN, zc.getChildren(ZPATH));
    verify(zk);
  }

  @Test
  public void testGetChildren_EatNoNode() throws Exception {
    expect(zk.getChildren(eq(ZPATH), anyObject(Watcher.class))).andThrow(new KeeperException.NoNodeException(ZPATH));
    replay(zk);

    assertNull(zc.getChildren(ZPATH));
    verify(zk);
  }

  private static class TestWatcher implements Watcher {
    private final WatchedEvent expectedEvent;
    private boolean wasCalled;

    TestWatcher(WatchedEvent event) {
      expectedEvent = event;
      wasCalled = false;
    }

    @Override
    public void process(WatchedEvent event) {
      assertSame(expectedEvent, event);
      wasCalled = true;
    }

    boolean wasCalled() {
      return wasCalled;
    }
  }

  @Test
  public void testWatchDataNode_Deleted() throws Exception {
    testWatchDataNode(DATA, Watcher.Event.EventType.NodeDeleted, false);
  }

  @Test
  public void testWatchDataNode_DataChanged() throws Exception {
    testWatchDataNode(DATA, Watcher.Event.EventType.NodeDataChanged, false);
  }

  @Test
  public void testWatchDataNode_Created() throws Exception {
    testWatchDataNode(null, Watcher.Event.EventType.NodeCreated, false);
  }

  @Test
  public void testWatchDataNode_NoneSyncConnected() throws Exception {
    testWatchDataNode(null, Watcher.Event.EventType.None, true);
  }

  private void testWatchDataNode(byte[] initialData, Watcher.Event.EventType eventType, boolean stillCached) throws Exception {
    WatchedEvent event = new WatchedEvent(eventType, Watcher.Event.KeeperState.SyncConnected, ZPATH);
    TestWatcher exw = new TestWatcher(event);
    zc = new ZooCache(zr, exw);

    Watcher w = watchData(initialData);
    w.process(event);
    assertTrue(exw.wasCalled());
    assertEquals(stillCached, zc.dataCached(ZPATH));
  }

  private Watcher watchData(byte[] initialData) throws Exception {
    Capture<Watcher> cw = EasyMock.newCapture();
    Stat existsStat = new Stat();
    if (initialData != null) {
      expect(zk.exists(eq(ZPATH), capture(cw))).andReturn(existsStat);
      expect(zk.getData(eq(ZPATH), anyObject(Watcher.class), eq(existsStat))).andReturn(initialData);
    } else {
      expect(zk.exists(eq(ZPATH), capture(cw))).andReturn(null);
    }
    replay(zk);
    zc.get(ZPATH);
    assertTrue(zc.dataCached(ZPATH));

    return cw.getValue();
  }

  @Test
  public void testWatchDataNode_Disconnected() throws Exception {
    testWatchDataNode_Clear(Watcher.Event.KeeperState.Disconnected);
  }

  @Test
  public void testWatchDataNode_Expired() throws Exception {
    testWatchDataNode_Clear(Watcher.Event.KeeperState.Expired);
  }

  private void testWatchDataNode_Clear(Watcher.Event.KeeperState state) throws Exception {
    WatchedEvent event = new WatchedEvent(Watcher.Event.EventType.None, state, null);
    TestWatcher exw = new TestWatcher(event);
    zc = new ZooCache(zr, exw);

    Watcher w = watchData(DATA);
    assertTrue(zc.dataCached(ZPATH));
    w.process(event);
    assertTrue(exw.wasCalled());
    assertFalse(zc.dataCached(ZPATH));
  }

  @Test
  public void testWatchChildrenNode_Deleted() throws Exception {
    testWatchChildrenNode(CHILDREN, Watcher.Event.EventType.NodeDeleted, false);
  }

  @Test
  public void testWatchChildrenNode_ChildrenChanged() throws Exception {
    testWatchChildrenNode(CHILDREN, Watcher.Event.EventType.NodeChildrenChanged, false);
  }

  @Test
  public void testWatchChildrenNode_Created() throws Exception {
    testWatchChildrenNode(null, Watcher.Event.EventType.NodeCreated, false);
  }

  @Test
  public void testWatchChildrenNode_NoneSyncConnected() throws Exception {
    testWatchChildrenNode(CHILDREN, Watcher.Event.EventType.None, true);
  }

  private void testWatchChildrenNode(List<String> initialChildren, Watcher.Event.EventType eventType, boolean stillCached) throws Exception {
    WatchedEvent event = new WatchedEvent(eventType, Watcher.Event.KeeperState.SyncConnected, ZPATH);
    TestWatcher exw = new TestWatcher(event);
    zc = new ZooCache(zr, exw);

    Watcher w = watchChildren(initialChildren);
    w.process(event);
    assertTrue(exw.wasCalled());
    assertEquals(stillCached, zc.childrenCached(ZPATH));
  }

  private Watcher watchChildren(List<String> initialChildren) throws Exception {
    Capture<Watcher> cw = EasyMock.newCapture();
    expect(zk.getChildren(eq(ZPATH), capture(cw))).andReturn(initialChildren);
    replay(zk);
    zc.getChildren(ZPATH);
    assertTrue(zc.childrenCached(ZPATH));

    return cw.getValue();
  }
}

redpajama_set_name: RedPajamaGithub


text:
package org.usfirst.frc.team4456.robot;

import edu.wpi.first.wpilibj.Joystick;

/**
 * Class for the XboxController
 * @author samega15
 */
public class XBoxController
{
	/*
	 * CURRENT CONTROLS
	 * Left Stick : Translate
	 * Right Stick : Rotate
	 */
	private Joystick xboxController;

	public XBoxController(int port)
	{
		xboxController = new Joystick(port);
	}

	/*
	 * BUTTONS
	 */
	public boolean getA()
	{
		return xboxController.getRawButton(Constants.button_A);
	}
	public boolean getB()
	{
		return xboxController.getRawButton(Constants.button_B);
	}
	public boolean getX()
	{
		return xboxController.getRawButton(Constants.button_X);
	}
	public boolean getY()
	{
		return xboxController.getRawButton(Constants.button_Y);
	}
	public boolean getLBumper()
	{
		return xboxController.getRawButton(Constants.button_leftBumper);
	}
	public boolean getRBumper()
	{
		return xboxController.getRawButton(Constants.button_rightBumper);
	}
	public boolean getBack()
	{
		return xboxController.getRawButton(Constants.button_Back);
	}
	public boolean getStart()
	{
		return xboxController.getRawButton(Constants.button_Start);
	}
	public boolean getLSClick()
	{
		return xboxController.getRawButton(Constants.button_leftStick);
	}
	public boolean getRSClick()
	{
		return xboxController.getRawButton(Constants.button_rightStick);
	}
	public int getDPad()
	{
		return xboxController.getPOV();
	}

	//BUTTONS DPAD
	public boolean getDPadUp()
	{
		return xboxController.getPOV() == 0;
	}
	public boolean getDPadRight()
	{
		return xboxController.getPOV() == 90;
	}
	public boolean getDPadDown()
	{
		return xboxController.getPOV() == 180;
	}
	public boolean getDPadLeft()
	{
		return xboxController.getPOV() == 270;
	}
	public boolean getDPadUpRight()
	{
		return xboxController.getPOV() == 45;
	}
	public boolean getDPadDownRight()
	{
		return xboxController.getPOV() == 135;
	}
	public boolean getDPadDownLeft()
	{
		return xboxController.getPOV() == 225;
	}
	public boolean getDPadUpLeft()
	{
		return xboxController.getPOV() == 315;
	}

	//1. = full RT, -1. = full LT
	public double getAxisTriggers()
	{
		return xboxController.getRawAxis(Constants.axis_rightTrigger) - xboxController.getRawAxis(Constants.axis_leftTrigger);
	}
	public double getAxisLStickX()
	{
		return xboxController.getRawAxis(Constants.axis_leftStick_X);
	}
	public double getAxisLStickY()
	{
		return xboxController.getRawAxis(Constants.axis_leftStick_Y);
	}
	public double getAxisRStickX()
	{
		return xboxController.getRawAxis(Constants.axis_rightStick_X);
	}
	public double getAxisRStickY()
	{
		return xboxController.getRawAxis(Constants.axis_rightStick_Y);
	}

	//POLAR
	public double getMagnitude()
	{
		return xboxController.getMagnitude();
	}
	public double getDirectionDegrees()
	{
		return xboxController.getDirectionDegrees();
	}

}


text:
package com.google.cloud.storage.contrib.nio;

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static java.util.Objects.requireNonNull;

import com.google.api.gax.paging.Page;
import com.google.cloud.storage.Bucket;
import com.google.cloud.storage.Storage;
import com.google.cloud.storage.StorageException;
import com.google.cloud.storage.StorageOptions;
import com.google.common.base.Strings;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.google.common.collect.ImmutableSet;
import com.google.common.util.concurrent.UncheckedExecutionException;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.FileStore;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.nio.file.PathMatcher;
import java.nio.file.WatchService;
import java.nio.file.attribute.FileTime;
import java.nio.file.attribute.UserPrincipalLookupService;
import java.util.HashMap;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nullable;
import javax.annotation.concurrent.ThreadSafe;

/**
 * Google Cloud Storage {@link FileSystem} implementation.
 *
 * @see Concepts
 *     and Terminology
 * @see Bucket and Object Naming
 *     Guidelines
 */
@ThreadSafe
public final class CloudStorageFileSystem extends FileSystem {

  public static final String URI_SCHEME = "gs";
  public static final String GCS_VIEW = "gcs";
  public static final String BASIC_VIEW = "basic";
  public static final int BLOCK_SIZE_DEFAULT = 2 * 1024 * 1024;
  public static final FileTime FILE_TIME_UNKNOWN = FileTime.fromMillis(0);
  public static final Set<String> SUPPORTED_VIEWS = ImmutableSet.of(BASIC_VIEW, GCS_VIEW);
  private final CloudStorageFileSystemProvider provider;
  private final String bucket;
  private final CloudStorageConfiguration config;
  private static final LoadingCache<ProviderCacheKey, CloudStorageFileSystemProvider>
      PROVIDER_CACHE_BY_CONFIG =
          CacheBuilder.newBuilder()
              .build(
                  new CacheLoader<ProviderCacheKey, CloudStorageFileSystemProvider>() {
                    @Override
                    public CloudStorageFileSystemProvider load(ProviderCacheKey key) {
                      CloudStorageConfiguration config = key.cloudStorageConfiguration;
                      StorageOptions storageOptions = key.storageOptions;
                      String userProject = config.userProject();
                      return (storageOptions == null)
                          ? new CloudStorageFileSystemProvider(userProject)
                          : new CloudStorageFileSystemProvider(userProject, storageOptions);
                    }
                  });

  // Users can change this: then this affects every filesystem object created
  // later, including via SPI. This is meant to be done only once, at the beginning
  // of some main program, in order to force all libraries to use some settings we like.
  // Libraries should never call this. It'll cause surprise to the writers of the main
  // program and they'll be unhappy. Instead, create your own filesystem object with the
  // right configuration and pass it along.
  private static CloudStorageConfiguration userSpecifiedDefault = CloudStorageConfiguration.DEFAULT;

  // Don't call this one, call the one in CloudStorageFileSystemProvider.
  static void setDefaultCloudStorageConfiguration(CloudStorageConfiguration config) {
    if (null == config) {
      userSpecifiedDefault = CloudStorageConfiguration.DEFAULT;
    } else {
      userSpecifiedDefault = config;
    }
  }

  static CloudStorageConfiguration getDefaultCloudStorageConfiguration() {
    return userSpecifiedDefault;
  }

  /**
   * Lists the project's buckets. Pass "null" to use the default project.
   *
   *
Example of listing buckets, specifying the page size and a name prefix.
   *
   *
{@code
   * String prefix = "bucket_";
   * Page<Bucket> buckets = CloudStorageFileSystem.listBuckets("my-project", BucketListOption.prefix(prefix));
   * Iterator<Bucket> bucketIterator = buckets.iterateAll();
   * while (bucketIterator.hasNext()) {
   *   Bucket bucket = bucketIterator.next();
   *   // do something with the bucket
   * }
   * }

   *
   * @throws StorageException upon failure
   */
  public static Page<Bucket> listBuckets(
      @Nullable String project, Storage.BucketListOption... options) {
    CloudStorageFileSystemProvider provider =
        new CloudStorageFileSystemProvider(
            null, StorageOptions.newBuilder().setProjectId(project).build());
    return provider.listBuckets(options);
  }

  /**
   * Returns Google Cloud Storage {@link FileSystem} object for {@code bucket}.
   *
   *
NOTE: You may prefer to use Java's standard API instead:
   *
   *
{@code
   * FileSystem fs = FileSystems.getFileSystem(URI.create("gs://bucket"));
   * }

   *
   *
However some systems and build environments might be flaky when it comes to Java SPI. This
   * is because services are generally runtime dependencies and depend on a META-INF file being
   * present in your jar (generated by Google Auto at compile-time). In such cases, this method
   * provides a simpler alternative.
   *
   * @see #forBucket(String, CloudStorageConfiguration)
   * @see java.nio.file.FileSystems#getFileSystem(java.net.URI)
   */
  @CheckReturnValue
  public static CloudStorageFileSystem forBucket(String bucket) {
    return forBucket(bucket, userSpecifiedDefault);
  }

  /**
   * Creates new file system instance for {@code bucket}, with customizable settings.
   *
   * @see #forBucket(String)
   */
  @CheckReturnValue
  public static CloudStorageFileSystem forBucket(String bucket, CloudStorageConfiguration config) {
    return forBucket(bucket, config, null);
  }

  /**
   * Returns Google Cloud Storage {@link FileSystem} object for {@code bucket}.
   *
   *
Google Cloud Storage file system objects are basically free. You can create as many as you
   * want, even if you have multiple instances for the same bucket. There's no actual system
   * resources associated with this object. Therefore calling {@link #close()} on the returned value
   * is optional.
   *
   *
Note: It is also possible to instantiate this class via Java's {@code
   * FileSystems.getFileSystem(URI.create("gs://bucket"))}. We discourage you from using that if
   * possible, for the reasons documented in {@link
   * CloudStorageFileSystemProvider#newFileSystem(URI, java.util.Map)}
   *
   * @see java.nio.file.FileSystems#getFileSystem(URI)
   */
  @CheckReturnValue
  public static CloudStorageFileSystem forBucket(
      String bucket, CloudStorageConfiguration config, @Nullable StorageOptions storageOptions) {
    checkArgument(
        !bucket.startsWith(URI_SCHEME + ":"), "Bucket name must not have schema: %s", bucket);
    checkNotNull(config);
    CloudStorageFileSystemProvider result;
    ProviderCacheKey providerCacheKey = new ProviderCacheKey(config, storageOptions);
    try {
      result = PROVIDER_CACHE_BY_CONFIG.get(providerCacheKey);
    } catch (ExecutionException | UncheckedExecutionException e) {
      throw new IllegalStateException(
          "Unable to resolve CloudStorageFileSystemProvider for the provided configuration", e);
    }
    return new CloudStorageFileSystem(result, bucket, config);
  }

  CloudStorageFileSystem(
      CloudStorageFileSystemProvider provider, String bucket, CloudStorageConfiguration config) {
    checkArgument(!bucket.isEmpty(), "bucket");
    this.bucket = bucket;
    if (config.useUserProjectOnlyForRequesterPaysBuckets()) {
      if (Strings.isNullOrEmpty(config.userProject())) {
        throw new IllegalArgumentException(
            "If useUserProjectOnlyForRequesterPaysBuckets is set, then userProject must be set too.");
      }
      // detect whether we want to pay for these accesses or not.
      if (!provider.requesterPays(bucket)) {
        // update config (just to ease debugging, we're not actually using config.userProject later.
        HashMap<String, String> disableUserProject = new HashMap<>();
        disableUserProject.put("userProject", "");
        config = CloudStorageConfiguration.fromMap(config, disableUserProject);
        // update the provider (this is the most important bit)
        provider = provider.withNoUserProject();
      }
    }
    this.provider = provider;
    this.config = config;
  }

  @Override
  public CloudStorageFileSystemProvider provider() {
    return provider;
  }

  /** Returns Cloud Storage bucket name being served by this file system. */
  public String bucket() {
    return bucket;
  }

  /** Returns configuration object for this file system instance. */
  public CloudStorageConfiguration config() {
    return config;
  }

  /** Converts Cloud Storage object name to a {@link Path} object. */
  @Override
  public CloudStoragePath getPath(String first, String... more) {
    checkArgument(
        !first.startsWith(URI_SCHEME + ":"),
        "Google Cloud Storage FileSystem.getPath() must not have schema and bucket name: %s",
        first);
    return CloudStoragePath.getPath(this, first, more);
  }

  /**
   * Does nothing currently. This method might be updated in the future to close all channels
   * associated with this file system object. However it's unlikely that even then, calling this
   * method will become mandatory.
   */
  @Override
  public void close() throws IOException {
    // TODO(#809): Synchronously close all channels associated with this FileSystem instance.
  }

  /** Returns {@code true}, even if you previously called the {@link #close()} method. */
  @Override
  public boolean isOpen() {
    return true;
  }

  /** Returns {@code false}. */
  @Override
  public boolean isReadOnly() {
    return false;
  }

  /** Returns {@value UnixPath#SEPARATOR}. */
  @Override
  public String getSeparator() {
    return Character.toString(UnixPath.SEPARATOR);
  }

  @Override
  public Iterable<Path> getRootDirectories() {
    return ImmutableSet.<Path>of(CloudStoragePath.getPath(this, UnixPath.ROOT));
  }

  /**
   * Returns nothing because Google Cloud Storage doesn't have disk partitions of limited size, or
   * anything similar.
   */
  @Override
  public Iterable<FileStore> getFileStores() {
    return ImmutableSet.of();
  }

  @Override
  public Set<String> supportedFileAttributeViews() {
    return SUPPORTED_VIEWS;
  }

  @Override
  public PathMatcher getPathMatcher(String syntaxAndPattern) {
    return FileSystems.getDefault().getPathMatcher(syntaxAndPattern);
  }

  /**
   * Throws {@link UnsupportedOperationException} because this feature hasn't been implemented yet.
   */
  @Override
  public UserPrincipalLookupService getUserPrincipalLookupService() {
    // TODO: Implement me.
    throw new UnsupportedOperationException();
  }

  /**
   * Throws {@link UnsupportedOperationException} because this feature hasn't been implemented yet.
   */
  @Override
  public WatchService newWatchService() throws IOException {
    // TODO: Implement me.
    throw new UnsupportedOperationException();
  }

  @Override
  public boolean equals(Object other) {
    return this == other
        || other instanceof CloudStorageFileSystem
            && Objects.equals(config, ((CloudStorageFileSystem) other).config)
            && Objects.equals(bucket, ((CloudStorageFileSystem) other).bucket);
  }

  @Override
  public int hashCode() {
    return Objects.hash(bucket);
  }

  @Override
  public String toString() {
    try {
      return new URI(URI_SCHEME, bucket, null, null).toString();
    } catch (URISyntaxException e) {
      throw new AssertionError(e);
    }
  }

  /**
   * In order to cache a {@link CloudStorageFileSystemProvider} we track the config used to
   * instantiate that provider. This class creates an immutable key encapsulating the config to
   * allow reliable resolution from the cache.
   */
  private static final class ProviderCacheKey {
    private final CloudStorageConfiguration cloudStorageConfiguration;
    @Nullable private final StorageOptions storageOptions;

    public ProviderCacheKey(
        CloudStorageConfiguration cloudStorageConfiguration,
        @Nullable StorageOptions storageOptions) {
      this.cloudStorageConfiguration =
          requireNonNull(cloudStorageConfiguration, "cloudStorageConfiguration must be non null");
      this.storageOptions = storageOptions;
    }

    @Override
    public boolean equals(Object o) {
      if (this == o) {
        return true;
      }
      if (!(o instanceof ProviderCacheKey)) {
        return false;
      }
      ProviderCacheKey that = (ProviderCacheKey) o;
      return cloudStorageConfiguration.equals(that.cloudStorageConfiguration)
          && Objects.equals(storageOptions, that.storageOptions);
    }

    @Override
    public int hashCode() {
      return Objects.hash(cloudStorageConfiguration, storageOptions);
    }

    @Override
    public String toString() {
      return "ConfigTuple{"
          + "cloudStorageConfiguration="
          + cloudStorageConfiguration
          + ", storageOptions="
          + storageOptions
          + '}';
    }
  }
}


text:
class AuthException(Exception):
    pass

class ResourceException(Exception):
    pass


text:
""" PROJECT SCRAPER """

from bs4 import BeautifulSoup
import urllib2

def scraper(url, outer_tag, outer_attr, outer_attr_name, inner_tag, inner_attr, inner_attr_name):

	''' BEAUTIFUL SOUP INIT '''
	web=urllib2.urlopen(url)
	soup=BeautifulSoup(web,'html.parser',from_encoding='utf-8')

	''' ***** CONTENT LIST ***** '''
	content=[]

	for outer_ in soup.find_all(outer_tag,{outer_attr : outer_attr_name}):
		for inner_ in outer_.find_all( inner_tag,{inner_attr : inner_attr_name}):
			content.append(inner_.text.encode('utf-8'))
	for i in range(len(content)):
		content[i]=' '.join(content[i].split())
		#content[i]= ''.join([ch for ch in content[i] if ord(ch)<=128])
		#content[i]=content[i].strip()
	print content

def decode_prams():
	pass

if __name__=='__main__':
	print 'url'
	url=raw_input()
	print 'outer tag name'
	outer_tag=raw_input()
	print ' outer attr'
	outer_attr=raw_input()
	print 'outer attr name'
	outer_attr_name=raw_input()
	print 'inner tag'
	inner_tag=raw_input()
	print 'inner attr'
	inner_attr=raw_input()
	print 'inner attr name'
	inner_attr_name=raw_input()
	scraper(url, outer_tag, outer_attr, outer_attr_name, inner_tag, inner_attr, inner_attr_name)


text:
#ifndef AMGCL_RELAXATION_GAUSS_SEIDEL_HPP
#define AMGCL_RELAXATION_GAUSS_SEIDEL_HPP

/**
 * \file   amgcl/relaxation/gauss_seidel.hpp
 * \author Denis Demidov <dennis.demidov@gmail.com>
 * \brief  Gauss-Seidel relaxation scheme.
 */

#include <numeric>

#include <memory>

#include <amgcl/backend/interface.hpp>
#include <amgcl/util.hpp>

#ifdef _OPENMP
#  include <omp.h>
#endif

namespace amgcl {
namespace relaxation {

/// Gauss-Seidel relaxation.
/**
 * \note This is a serial relaxation and is only applicable to backends that
 * support matrix row iteration (e.g. amgcl::backend::builtin or
 * amgcl::backend::eigen).
 *
 * \param Backend Backend for temporary structures allocation.
 * \ingroup relaxation
 */
template <class Backend>
struct gauss_seidel {
    /// Relaxation parameters.
    struct params {
        /// Use serial version of the algorithm
        bool serial;

        params() : serial(false) {}

#ifndef AMGCL_NO_BOOST
        params(const boost::property_tree::ptree &p)
            : AMGCL_PARAMS_IMPORT_VALUE(p, serial)
        {
            check_params(p, {"serial"});
        }

        void get(boost::property_tree::ptree &p, const std::string &path) const {
            AMGCL_PARAMS_EXPORT_VALUE(p, path, serial);
        }
#endif
    };

    bool is_serial;

    /// \copydoc amgcl::relaxation::damped_jacobi::damped_jacobi
    template <class Matrix>
    gauss_seidel( const Matrix &A, const params &prm, const typename Backend::params&)
        : is_serial(prm.serial || num_threads() < 4)
    {
        if(!is_serial) {
            forward  = std::make_shared< parallel_sweep<true>  >(A);
            backward = std::make_shared< parallel_sweep<false> >(A);
        }
    }

    /// \copydoc amgcl::relaxation::damped_jacobi::apply_pre
    template <class Matrix, class VectorRHS, class VectorX, class VectorTMP>
    void apply_pre(
            const Matrix &A, const VectorRHS &rhs, VectorX &x, VectorTMP&
            ) const
    {
        if (is_serial)
            serial_sweep(A, rhs, x, true);
        else
            forward->sweep(rhs, x);
    }

    /// \copydoc amgcl::relaxation::damped_jacobi::apply_post
    template <class Matrix, class VectorRHS, class VectorX, class VectorTMP>
    void apply_post(
            const Matrix &A, const VectorRHS &rhs, VectorX &x, VectorTMP&
            ) const
    {
        if (is_serial)
            serial_sweep(A, rhs, x, false);
        else
            backward->sweep(rhs, x);
    }

    template <class Matrix, class VectorRHS, class VectorX>
    void apply(const Matrix &A, const VectorRHS &rhs, VectorX &x) const
    {
        backend::clear(x);
        if (is_serial) {
            serial_sweep(A, rhs, x, true);
            serial_sweep(A, rhs, x, false);
        } else {
            forward->sweep(rhs, x);
            backward->sweep(rhs, x);
        }
    }

    size_t bytes() const {
        size_t b = 0;
        if (forward)  b += forward->bytes();
        if (backward) b += backward->bytes();
        return b;
    }

    private:
        static int num_threads() {
#ifdef _OPENMP
            return omp_get_max_threads();
#else
            return 1;
#endif
        }

        static int thread_id() {
#ifdef _OPENMP
            return omp_get_thread_num();
#else
            return 0;
#endif
        }

        template <class Matrix, class VectorRHS, class VectorX>
        static void serial_sweep(
                const Matrix &A, const VectorRHS &rhs, VectorX &x, bool forward)
        {
            typedef typename backend::value_type<Matrix>::type val_type;
            typedef typename math::rhs_of<val_type>::type rhs_type;

            const ptrdiff_t n = backend::rows(A);

            const ptrdiff_t beg = forward ? 0 : n-1;
            const ptrdiff_t end = forward ? n : -1;
            const ptrdiff_t inc = forward ? 1 : -1;

            for(ptrdiff_t i = beg; i != end; i += inc) {
                val_type D = math::identity<val_type>();
                rhs_type X;
                X = rhs[i];

                for (auto a = backend::row_begin(A, i); a; ++a) {
                    ptrdiff_t c = a.col();
                    val_type  v = a.value();

                    if (c == i)
                        D = v;
                    else
                        X -= v * x[c];
                }

                x[i] = math::inverse(D) * X;
            }
        }

        template <bool forward>
        struct parallel_sweep {
            typedef typename Backend::value_type value_type;
            typedef typename math::rhs_of<value_type>::type rhs_type;

            struct task {
                ptrdiff_t beg, end;
                task(ptrdiff_t beg, ptrdiff_t end) : beg(beg), end(end) {}
            };

            int nthreads;

            // thread-specific storage:
            std::vector< std::vector<task>       > tasks;
            std::vector< std::vector<ptrdiff_t>  > ptr;
            std::vector< std::vector<ptrdiff_t>  > col;
            std::vector< std::vector<value_type> > val;
            std::vector< std::vector<ptrdiff_t>  > ord;

            template <class Matrix>
            parallel_sweep(const Matrix &A)
                : nthreads(num_threads()), tasks(nthreads),
                  ptr(nthreads), col(nthreads), val(nthreads), ord(nthreads)
            {
                ptrdiff_t n    = backend::rows(A);
                ptrdiff_t nlev = 0;

                std::vector<ptrdiff_t> level(n, 0);
                std::vector<ptrdiff_t> order(n, 0);

                // 1. split rows into levels.
                ptrdiff_t beg = forward ? 0 : n-1;
                ptrdiff_t end = forward ? n :  -1;
                ptrdiff_t inc = forward ? 1 :  -1;

                for(ptrdiff_t i = beg; i != end; i += inc) {
                    ptrdiff_t l = level[i];

                    for(auto a = row_begin(A, i); a; ++a) {
                        ptrdiff_t c = a.col();

                        if (forward) {
                            if (c >= i) continue;
                        } else {
                            if (c <= i) continue;
                        }

                        l = std::max(l, level[c]+1);
                    }

                    level[i] = l;
                    nlev = std::max(nlev, l+1);
                }

                // 2. reorder matrix rows.
                std::vector<ptrdiff_t> start(nlev+1, 0);

                for(ptrdiff_t i = 0; i < n; ++i)
                    ++start[level[i]+1];

                std::partial_sum(start.begin(), start.end(), start.begin());

                for(ptrdiff_t i = 0; i < n; ++i)
                    order[start[level[i]]++] = i;

                std::rotate(start.begin(), start.end() - 1, start.end());
                start[0] = 0;

                // 3. Organize matrix rows into tasks.
                //    Each level is split into nthreads tasks.
                std::vector<ptrdiff_t> thread_rows(nthreads, 0);
                std::vector<ptrdiff_t> thread_cols(nthreads, 0);

#pragma omp parallel
                {
                    int tid = thread_id();
                    tasks[tid].reserve(nlev);

                    for(ptrdiff_t lev = 0; lev < nlev; ++lev) {
                        // split each level into tasks.
                        ptrdiff_t lev_size = start[lev+1] - start[lev];
                        ptrdiff_t chunk_size = (lev_size + nthreads - 1) / nthreads;

                        ptrdiff_t beg = std::min(tid * chunk_size, lev_size);
                        ptrdiff_t end = std::min(beg + chunk_size, lev_size);

                        beg += start[lev];
                        end += start[lev];

                        tasks[tid].push_back(task(beg, end));

                        // count rows and nonzeros in the current task
                        thread_rows[tid] += end - beg;
                        for(ptrdiff_t i = beg; i < end; ++i) {
                            ptrdiff_t j = order[i];
                            thread_cols[tid] += row_nonzeros(A, j);
                        }
                    }
                }

                // 4. reorganize matrix data for better cache and NUMA locality.
#pragma omp parallel
                {
                    int tid = thread_id();

                    col[tid].reserve(thread_cols[tid]);
                    val[tid].reserve(thread_cols[tid]);
                    ord[tid].reserve(thread_rows[tid]);
                    ptr[tid].reserve(thread_rows[tid] + 1);
                    ptr[tid].push_back(0);

                    for(task &t : tasks[tid]) {
                        ptrdiff_t loc_beg = ptr[tid].size() - 1;
                        ptrdiff_t loc_end = loc_beg;

                        for(ptrdiff_t r = t.beg; r < t.end; ++r, ++loc_end) {
                            ptrdiff_t i = order[r];

                            ord[tid].push_back(i);

                            for(auto a = row_begin(A, i); a; ++a) {
                                col[tid].push_back(a.col());
                                val[tid].push_back(a.value());
                            }

                            ptr[tid].push_back(col[tid].size());
                        }

                        t.beg = loc_beg;
                        t.end = loc_end;
                    }
                }
            }

            template <class Vector1, class Vector2>
            void sweep(const Vector1 &rhs, Vector2 &x) const {
#pragma omp parallel
                {
                    int tid = thread_id();

                    for(const task &t : tasks[tid]) {
                        for(ptrdiff_t r = t.beg; r < t.end; ++r) {
                            ptrdiff_t i   = ord[tid][r];
                            ptrdiff_t beg = ptr[tid][r];
                            ptrdiff_t end = ptr[tid][r+1];

                            value_type D = math::identity<value_type>();
                            rhs_type X;
                            X = rhs[i];

                            for(ptrdiff_t j = beg; j < end; ++j) {
                                ptrdiff_t  c = col[tid][j];
                                value_type v = val[tid][j];

                                if (c == i)
                                    D = v;
                                else
                                    X -= v * x[c];
                            }

                            x[i] = math::inverse(D) * X;
                        }

                        // each task corresponds to a level, so we need
                        // to synchronize across threads at this point:
#pragma omp barrier
                        ;
                    }
                }
            }

            size_t bytes() const {
                size_t b = 0;

                for(int i = 0; i < nthreads; ++i) {
                    b += sizeof(task) * tasks[i].size();
                    b += backend::bytes(ptr[i]);
                    b += backend::bytes(col[i]);
                    b += backend::bytes(val[i]);
                    b += backend::bytes(ord[i]);
                }

                return b;
            }
        };

        std::shared_ptr< parallel_sweep<true>  > forward;
        std::shared_ptr< parallel_sweep<false> > backward;
};

} // namespace relaxation

namespace backend {

template <class Backend>
struct relaxation_is_supported<
    Backend,
    relaxation::gauss_seidel,
    typename std::enable_if<
        !Backend::provides_row_iterator::value
        >::type
    > : std::false_type
{};

} // namespace backend
} // namespace amgcl

#endif


text:
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

using System;
using Org.Apache.REEF.Common.Poison;
using Org.Apache.REEF.Common.Tasks;
using Org.Apache.REEF.Common.Tasks.Events;
using Org.Apache.REEF.Driver;
using Org.Apache.REEF.Driver.Context;
using Org.Apache.REEF.Driver.Evaluator;
using Org.Apache.REEF.Driver.Task;
using Org.Apache.REEF.Tang.Annotations;
using Org.Apache.REEF.Tang.Implementations.Configuration;
using Org.Apache.REEF.Tang.Implementations.Tang;
using Org.Apache.REEF.Tang.Interface;
using Org.Apache.REEF.Tang.Util;
using Org.Apache.REEF.Utilities.Logging;
using Xunit;

namespace Org.Apache.REEF.Tests.Functional.Failure
{
    [Collection("FunctionalTests")]
    public sealed class TestEvaluatorWithCompletedTaskDelayedPoison : ReefFunctionalTest
    {
        private const string ExpectedCompletedTask = "A completed task was expected.";

        [Fact]
        [Trait("Description", "Test evaluator failure by injecting immediate fault in completed task handler.")]
        public void TestPoisonedCompletedTaskHandlerWithDelay()
        {
            var testFolder = DefaultRuntimeFolder + TestId;
            TestRun(DriverConfigurations(), typeof(PoisonedEvaluatorDriver), 1, "poisonedCompletedTaskWithDelayTest", "local", testFolder);
            ValidateMessageSuccessfullyLoggedForDriver(BasePoisonedEvaluatorWithActiveContextDriver.FailedEvaluatorMessage, testFolder);
            ValidateMessageSuccessfullyLoggedForDriver(ExpectedCompletedTask, testFolder);

            // verify that no unexpected events happened
            ValidateMessageSuccessfullyLoggedForDriver(BasePoisonedEvaluatorDriver.UnexpectedClosedContext, testFolder, 0);
            ValidateMessageSuccessfullyLoggedForDriver(BasePoisonedEvaluatorDriver.UnexpectedFailedContext, testFolder, 0);
            ValidateMessageSuccessfullyLoggedForDriver(BasePoisonedEvaluatorDriver.UnexpectedFailedTask, testFolder, 0);
            CleanUp(testFolder);
        }

        private static IConfiguration DriverConfigurations()
        {
            return DriverConfiguration.ConfigurationModule
                .Set(DriverConfiguration.OnDriverStarted, GenericType<PoisonedEvaluatorDriver>.Class)
                .Set(DriverConfiguration.OnEvaluatorAllocated, GenericType<PoisonedEvaluatorDriver>.Class)
                .Set(DriverConfiguration.OnEvaluatorFailed, GenericType<PoisonedEvaluatorDriver>.Class)
                .Set(DriverConfiguration.OnContextActive, GenericType<PoisonedEvaluatorDriver>.Class)
                .Set(DriverConfiguration.OnContextClosed, GenericType<PoisonedEvaluatorDriver>.Class)
                .Set(DriverConfiguration.OnContextFailed, GenericType<PoisonedEvaluatorDriver>.Class)
                .Set(DriverConfiguration.OnTaskCompleted, GenericType<PoisonedEvaluatorDriver>.Class)
                .Set(DriverConfiguration.OnTaskFailed, GenericType<PoisonedEvaluatorDriver>.Class)
                .Build();
        }

        private sealed class PoisonedEvaluatorDriver :
            BasePoisonedEvaluatorWithActiveContextDriver,
            IObserver<IActiveContext>
        {
            [Inject]
            private PoisonedEvaluatorDriver(IEvaluatorRequestor requestor) : base(requestor)
            {
            }

            public void OnNext(IActiveContext value)
            {
                var taskConfig = TaskConfiguration.ConfigurationModule
                    .Set(TaskConfiguration.Identifier, TaskId)
                    .Set(TaskConfiguration.Task, GenericType<SleepTask>.Class)
                    .Set(TaskConfiguration.OnClose, GenericType<SleepTask>.Class)
                    .Set(TaskConfiguration.OnTaskStop, GenericType<PoisonedEventHandler<ITaskStop>>.Class)
                    .Build();

                var poisonConfig = TangFactory.GetTang().NewConfigurationBuilder()
                    .BindIntNamedParam<CrashTimeout>("0")
                    .BindIntNamedParam<CrashMinDelay>("50")
                    .BindNamedParameter<CrashProbability, double>(GenericType<CrashProbability>.Class, "1.0")
                    .Build();

                value.SubmitTask(Configurations.Merge(taskConfig, poisonConfig));
            }

            public override void OnNext(ICompletedTask value)
            {
                Logger.Log(Level.Info, ExpectedCompletedTask);
            }
        }
    }
}


text:
package siteseeker;

import siteseeker.web.RequestParameters;

import java.util.Enumeration;
import java.util.Iterator;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class SimpleRequestParameters implements RequestParameters {
    private Map<String, String> valuesByName = new ConcurrentHashMap<String, String>();

    public String getValue(String name) {
        return valuesByName.get(name);
    }

    public String[] getValues(String name) {
        return new String[] {getValue(name)};
    }

    public Enumeration<String> getParameterNames() {
        final Iterator<String> keys = valuesByName.keySet().iterator();
        return new Enumeration<String>() {
            public boolean hasMoreElements() {
                return keys.hasNext();
            }

            public String nextElement() {
                return keys.next();
            }
        };
    }

    public void setParameter(String parameterName, String value) {
        valuesByName.put(parameterName, value);
    }

    public SimpleRequestParameters withQuery(String query) {
        return this;
    }
}


text:
void init_xml_node_set();

extern VALUE cNokogiriXmlNodeSet ;
VALUE Nokogiri_wrap_xml_node_set(xmlNodeSetPtr node_set, VALUE document) ;

typedef struct _nokogiriNodeSetTuple {
  xmlNodeSetPtr node_set;
  st_table     *namespaces;
} nokogiriNodeSetTuple;
#endif


text:
All URIs are relative to *https://api.kinow.com/api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getActorCoverImage**](#getActorCoverImage) | **GET** /actors/{actor_id}/cover |
[**getCategoryBanner**](#getCategoryBanner) | **GET** /categories/{category_id}/banner |
[**getDirectorCoverImage**](#getDirectorCoverImage) | **GET** /directors/{director_id}/cover |
[**getProductCoverImage**](#getProductCoverImage) | **GET** /products/{product_id}/cover |
[**getProductImages**](#getProductImages) | **GET** /products/{product_id}/images |
[**getProductScreenshots**](#getProductScreenshots) | **GET** /products/{product_id}/screenshots |
[**getSliderImage**](#getSliderImage) | **GET** /widgets/slider/images |
[**getSubscriptionCoverImage**](#getSubscriptionCoverImage) | **GET** /subscriptions/{subscription_id}/cover |
[**getVideoCover**](#getVideoCover) | **GET** /videos/{video_id}/cover |
[**uploadActorCover**](#uploadActorCover) | **POST** /actors/{actor_id}/cover |
[**uploadCategoryCover**](#uploadCategoryCover) | **POST** /categories/{category_id}/cover |
[**uploadDirectorCover**](#uploadDirectorCover) | **POST** /directors/{director_id}/cover |
[**uploadProductCover**](#uploadProductCover) | **POST** /products/{product_id}/cover |
[**uploadSubscriptionCover**](#uploadSubscriptionCover) | **POST** /subscriptions/{subscription_id}/cover |

## **getActorCoverImage**
> \Kinow\Client\Model\Image getActorCoverImage($actor_id)

Get cover image of an actor

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();
$actor_id = 789; // int | Actor ID to fetch

try {
    $result = $api_instance->getActorCoverImage($actor_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->getActorCoverImage: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **actor_id** | **int**| Actor ID to fetch |

### Return type

[**\Kinow\Client\Model\Image**](#Image)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

## **getCategoryBanner**
> \Kinow\Client\Model\Image getCategoryBanner($category_id)

Get Category banner

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();
$category_id = 789; // int | Category ID to fetch

try {
    $result = $api_instance->getCategoryBanner($category_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->getCategoryBanner: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **category_id** | **int**| Category ID to fetch |

### Return type

[**\Kinow\Client\Model\Image**](#Image)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

## **getDirectorCoverImage**
> \Kinow\Client\Model\Image getDirectorCoverImage($director_id)

Get cover image of a director

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();
$director_id = 789; // int | Director ID to fetch

try {
    $result = $api_instance->getDirectorCoverImage($director_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->getDirectorCoverImage: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **director_id** | **int**| Director ID to fetch |

### Return type

[**\Kinow\Client\Model\Image**](#Image)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

## **getProductCoverImage**
> \Kinow\Client\Model\Image getProductCoverImage($product_id)

Get cover image of a product

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();
$product_id = 789; // int | Product ID to fetch

try {
    $result = $api_instance->getProductCoverImage($product_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->getProductCoverImage: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **product_id** | **int**| Product ID to fetch |

### Return type

[**\Kinow\Client\Model\Image**](#Image)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

## **getProductImages**
> \Kinow\Client\Model\ProductImagesResponse getProductImages($product_id, $type, $page, $per_page)

Get images attached to product

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();
$product_id = 789; // int | Product ID to fetch
$type = "type_example"; // string | Filter on specific Image type
$page = 789; // int |
$per_page = 789; // int |

try {
    $result = $api_instance->getProductImages($product_id, $type, $page, $per_page);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->getProductImages: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **product_id** | **int**| Product ID to fetch |
 **type** | **string**| Filter on specific Image type | [optional]
 **page** | **int**|  | [optional]
 **per_page** | **int**|  | [optional]

### Return type

[**\Kinow\Client\Model\ProductImagesResponse**](#ProductImagesResponse)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

## **getProductScreenshots**
> \Kinow\Client\Model\Screenshot[] getProductScreenshots($product_id)

Get product screenshots

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();
$product_id = 789; // int | Product ID to fetch

try {
    $result = $api_instance->getProductScreenshots($product_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->getProductScreenshots: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **product_id** | **int**| Product ID to fetch |

### Return type

[**\Kinow\Client\Model\Screenshot[]**](#Screenshot)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

## **getSliderImage**
> \Kinow\Client\Model\Image[] getSliderImage()

Get slider images

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();

try {
    $result = $api_instance->getSliderImage();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->getSliderImage: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**\Kinow\Client\Model\Image[]**](#Image)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

## **getSubscriptionCoverImage**
> \Kinow\Client\Model\Image getSubscriptionCoverImage($subscription_id)

Get cover image of a subscription

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();
$subscription_id = 789; // int | Subscription ID to fetch

try {
    $result = $api_instance->getSubscriptionCoverImage($subscription_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->getSubscriptionCoverImage: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **subscription_id** | **int**| Subscription ID to fetch |

### Return type

[**\Kinow\Client\Model\Image**](#Image)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

## **getVideoCover**
> \Kinow\Client\Model\Image getVideoCover($video_id)

Get video cover

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();
$video_id = 789; // int | Video ID to fetch

try {
    $result = $api_instance->getVideoCover($video_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->getVideoCover: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **video_id** | **int**| Video ID to fetch |

### Return type

[**\Kinow\Client\Model\Image**](#Image)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

## **uploadActorCover**
> \Kinow\Client\Model\Image uploadActorCover($actor_id, $file, $hash, $hash_algorithm)

Upload actor cover

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();
$actor_id = 3.4; // float | Actor ID to fetch
$file = "/path/to/file.txt"; // \SplFileObject |
$hash = "hash_example"; // string |
$hash_algorithm = "hash_algorithm_example"; // string | Hash algorithm to check the hash file (default value is: sha256)

try {
    $result = $api_instance->uploadActorCover($actor_id, $file, $hash, $hash_algorithm);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->uploadActorCover: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **actor_id** | **float**| Actor ID to fetch |
 **file** | **\SplFileObject**|  |
 **hash** | **string**|  |
 **hash_algorithm** | **string**| Hash algorithm to check the hash file (default value is: sha256) | [optional]

### Return type

[**\Kinow\Client\Model\Image**](#Image)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: Not defined

## **uploadCategoryCover**
> \Kinow\Client\Model\Image uploadCategoryCover($category_id, $file, $hash, $hash_algorithm)

Upload Category cover

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();
$category_id = 3.4; // float | Category ID to fetch
$file = "/path/to/file.txt"; // \SplFileObject |
$hash = "hash_example"; // string |
$hash_algorithm = "hash_algorithm_example"; // string | Hash algorithm to check the hash file (default value is: sha256)

try {
    $result = $api_instance->uploadCategoryCover($category_id, $file, $hash, $hash_algorithm);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->uploadCategoryCover: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **category_id** | **float**| Category ID to fetch |
 **file** | **\SplFileObject**|  |
 **hash** | **string**|  |
 **hash_algorithm** | **string**| Hash algorithm to check the hash file (default value is: sha256) | [optional]

### Return type

[**\Kinow\Client\Model\Image**](#Image)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: Not defined

## **uploadDirectorCover**
> \Kinow\Client\Model\Image uploadDirectorCover($director_id, $file, $hash, $hash_algorithm)

Upload director cover

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();
$director_id = 3.4; // float | Director ID to fetch
$file = "/path/to/file.txt"; // \SplFileObject |
$hash = "hash_example"; // string |
$hash_algorithm = "hash_algorithm_example"; // string | Hash algorithm to check the hash file (default value is: sha256)

try {
    $result = $api_instance->uploadDirectorCover($director_id, $file, $hash, $hash_algorithm);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->uploadDirectorCover: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **director_id** | **float**| Director ID to fetch |
 **file** | **\SplFileObject**|  |
 **hash** | **string**|  |
 **hash_algorithm** | **string**| Hash algorithm to check the hash file (default value is: sha256) | [optional]

### Return type

[**\Kinow\Client\Model\Image**](#Image)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: Not defined

## **uploadProductCover**
> \Kinow\Client\Model\Image uploadProductCover($product_id, $file, $hash, $hash_algorithm)

Upload product cover

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();
$product_id = 3.4; // float | Product ID to fetch
$file = "/path/to/file.txt"; // \SplFileObject |
$hash = "hash_example"; // string |
$hash_algorithm = "hash_algorithm_example"; // string | Hash algorithm to check the hash file (default value is: sha256)

try {
    $result = $api_instance->uploadProductCover($product_id, $file, $hash, $hash_algorithm);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->uploadProductCover: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **product_id** | **float**| Product ID to fetch |
 **file** | **\SplFileObject**|  |
 **hash** | **string**|  |
 **hash_algorithm** | **string**| Hash algorithm to check the hash file (default value is: sha256) | [optional]

### Return type

[**\Kinow\Client\Model\Image**](#Image)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: Not defined

## **uploadSubscriptionCover**
> \Kinow\Client\Model\Image uploadSubscriptionCover($subscription_id, $file, $hash, $hash_algorithm)

Upload subscription cover

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiClientId
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Id', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Id', 'Bearer');
// Configure API key authorization: ApiClientSecret
Kinow\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Client-Secret', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Kinow\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Client-Secret', 'Bearer');

$api_instance = new Kinow\Client\Api\ImagesApi();
$subscription_id = 3.4; // float | Subscription ID to fetch
$file = "/path/to/file.txt"; // \SplFileObject |
$hash = "hash_example"; // string |
$hash_algorithm = "hash_algorithm_example"; // string | Hash algorithm to check the hash file (default value is: sha256)

try {
    $result = $api_instance->uploadSubscriptionCover($subscription_id, $file, $hash, $hash_algorithm);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ImagesApi->uploadSubscriptionCover: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **subscription_id** | **float**| Subscription ID to fetch |
 **file** | **\SplFileObject**|  |
 **hash** | **string**|  |
 **hash_algorithm** | **string**| Hash algorithm to check the hash file (default value is: sha256) | [optional]

### Return type

[**\Kinow\Client\Model\Image**](#Image)

### Authorization

[ApiClientId](#ApiClientId), [ApiClientSecret](#ApiClientSecret)

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: Not defined


text:
require 'ansible/ruby/modules/base'

module Ansible
  module Ruby
    module Modules
      # The manageiq_policies module supports adding and deleting policy_profiles in ManageIQ.
      class Manageiq_policies < Base
        # @return [:absent, :present, :list, nil] absent - policy_profiles should not exist,,present - policy_profiles should exist,,list - list current policy_profiles and policies.
        attribute :state
        validates :state, expression_inclusion: {:in=>[:absent, :present, :list], :message=>"%{value} needs to be :absent, :present, :list"}, allow_nil: true

        # @return [Array<Hash>, Hash, nil] list of dictionaries, each includes the policy_profile 'name' key.,required if state is present or absent.
        attribute :policy_profiles
        validates :policy_profiles, type: TypeGeneric.new(Hash)

        # @return [:provider, :host, :vm, :blueprint, :category, :cluster, :"data store", :group, :"resource pool", :service, :"service template", :template, :tenant, :user] the type of the resource to which the profile should be [un]assigned
        attribute :resource_type
        validates :resource_type, presence: true, expression_inclusion: {:in=>[:provider, :host, :vm, :blueprint, :category, :cluster, :"data store", :group, :"resource pool", :service, :"service template", :template, :tenant, :user], :message=>"%{value} needs to be :provider, :host, :vm, :blueprint, :category, :cluster, :\"data store\", :group, :\"resource pool\", :service, :\"service template\", :template, :tenant, :user"}

        # @return [String] the name of the resource to which the profile should be [un]assigned
        attribute :resource_name
        validates :resource_name, presence: true, type: String
      end
    end
  end
end


text:
'xs:ENTITY with only letters':
{|xml||
	<ENTITY>myElement</ENTITY>
|}.

'xs:ENTITY beginning with an underscore':
{|xml||
	<ENTITY>_myElement</ENTITY>
|}.

'xs:ENTITY containing a number':
{|xml||
	<ENTITY>myElement3</ENTITY>
|}.

'xs:ENTITY with a hyphen in-between':
{|xml||
	<ENTITY>my-element</ENTITY>
|}.

'xs:ENTITY with a period in-between':
{|xml||
	<ENTITY>my.element</ENTITY>
|}.

'xs:ENTITY with a colon in-between'(fail):
{|xml||
	<ENTITY>pre:myelement3</ENTITY>
|}.

'xs:ENTITY beginning with a colon'(fail):
{|xml||
	<ENTITY>:myElement</ENTITY>
|}.

'xs:ENTITY beginning with a number'(fail):
{|xml||
	<ENTITY>3rdElement</ENTITY>
|}.

'xs:ENTITY beginning with a hyphen'(fail):
{|xml||
	<ENTITY>-myelement</ENTITY>
|}.

'xs:ENTITY beginning with a period'(fail):
{|xml||
	<ENTITY>.myelement</ENTITY>
|}.

'xs:ENTITY with an empty value'(fail):
{|xml||
	<ENTITY></ENTITY>
|}.


text:
package edu.gemini.spModel.inst;

public interface VignettableScienceAreaInstrument {
    public ScienceAreaGeometry getVignettableScienceArea();
}


text:
namespace renderer  { class Assembly; }
namespace renderer  { class Material; }

//
// Interface of an appleseed material plugin.
//

class IAppleseedMtl
  : public BaseInterface
{
  public:
    static Interface_ID interface_id();

    // BaseInterface methods.
    Interface_ID GetID() override;

    // The sides (front and/or back) on which this material should be applied.
    // The return value is a combination of renderer::ObjectInstance::Side values.
    virtual int get_sides() const = 0;

    // Can this material emit light, even if this particular instance does not
    // (for instance because its emission is set to 0)?
    virtual bool can_emit_light() const = 0;

    // Create an appleseed material.
    virtual foundation::auto_release_ptr<renderer::Material> create_material(
        renderer::Assembly& assembly,
        const char*         name,
        const bool          use_max_procedural_maps,
        const TimeValue     time) = 0;
};

//
// IAppleseedMtl class implementation.
//

inline Interface_ID IAppleseedMtl::interface_id()
{
    return Interface_ID(0x1d87d86, 0x209f11dc);
}

inline Interface_ID IAppleseedMtl::GetID()
{
    return interface_id();
}


text:
package wotakutools.view.panel;

import java.awt.Color;

import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JPanel;
import wotakutools.view.panel.MainPanel.SwitchResuletCharaaniPanel;

/**
 * メインとなる自作パネル
 * @author shun kawai
 */
public class MainPanel extends JPanel{
    private SelectPanel sp;
    private ResultPanel rp;
    public MainPanel(){
        super();
        super.setBackground(Color.CYAN);
        super.setLayout(new GridLayout(1, 2));
        this.sp = new SelectPanel();
        this.rp = new ResultPanel();

        sp.addActionListenerCharaani(new SwitchResuletCharaaniPanel(this));
        sp.addActionListenerFortune(new SwitchResuletFortunePanel(this));
        super.add(this.sp);
        super.add(this.rp);

    }
    class SwitchResuletCharaaniPanel implements ActionListener {
        private MainPanel p;
        public SwitchResuletCharaaniPanel(MainPanel p){
            this.p = p;
        }
        public void actionPerformed(ActionEvent e){
            p.rp.switchCharaaniPanel();
        }
    }
    class SwitchResuletFortunePanel implements ActionListener {
        private MainPanel p;
        public SwitchResuletFortunePanel(MainPanel p){
            this.p = p;
        }
        public void actionPerformed(ActionEvent e){
            p.rp.switchFortunePanel();
        }
    }
}


text:
export class Answer {
	"id": number;
	"questionId": number;
	"sourceTitle": string;
	"sourceUrl": string;
	"type": string;
	"videoId": string;
	"rating": number;
	"start": number;
	"end": number;
}


text:
title: 		Popup Example 2
layout:		examples
base:		"../"
---

PopUp Example 2

Open HTML Popup

scroll..

scroll..

scroll..

scroll..


text:
=================
Policy management
=================

OpenStack provides a default set of Role Based Access Control (RBAC)
policies, defined in a ``policy.json`` file, for each service. Operators
edit these files to customize the policies for their OpenStack
installation. If the application of consistent RBAC policies across
sites is a requirement, then it is necessary to ensure proper
synchronization of the ``policy.json`` files to all installations.

This must be done using system administration tools such as rsync as
functionality for synchronizing policies across regions is not currently
provided within OpenStack.


text:
FROM scaleway/docker:armhf-latest
MAINTAINER Fabio Maia

# Prepare rootfs for image-builder
RUN /usr/local/sbin/builder-enter

# Install packages
RUN apt-get -q update                   \
 && apt-get --force-yes -y -qq upgrade  \
 && apt-get --force-yes install -y -q build-essential tar \
 && apt-get clean

# Disable systemd and go back to upstart
# kubernets does not have configuration files for systemd in ubuntu yet
RUN apt-get --force-yes install -y -q upstart-sysv && \
    update-initramfs -u && \
    apt-get clean

# Install Go
RUN apt-get -y install golang && \
    echo "export GOPATH=/usr/src/go_workspace" >> ~/.bashrc && \
    mkdir /usr/src/go_workspace

# kubelet expects the loader to be in this location
RUN ln -s /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3

RUN mkdir -p /opt/bin

# Install Etcd
RUN cd /usr/src/ && git clone https://github.com/coreos/etcd.git -b release-2.2 && \
    cd /usr/src/etcd && \
    ./build && \
    mv /usr/src/etcd/bin/* /opt/bin/ && \
    rm -rf /usr/src/etcd

# Install flannel
RUN cd /usr/src && \
    git clone https://github.com/coreos/flannel.git && \
    cd flannel && ./build && \
    mv /usr/src/flannel/bin/* /opt/bin/ && \
    rm -rf /usr/src/flannel

# Install kubernetes
RUN cd /usr/src && \
    wget https://github.com/kubernetes/kubernetes/releases/download/v1.3.0-alpha.4/kubernetes.tar.gz && \
    tar zxvf kubernetes.tar.gz kubernetes/server/kubernetes-server-linux-arm.tar.gz

RUN cd /usr/src/kubernetes/server && tar zxvf kubernetes-server-linux-arm.tar.gz kubernetes/server/bin && cd kubernetes/server/bin && \
    cp federated-apiserver hyperkube kube-apiserver kube-controller-manager kubectl kubelet kubemark kube-proxy kube-scheduler /opt/bin/ && \
    rm -rf /usr/src/kubernetes && rm -rf /usr/src/kubernetes.tar.gz

RUN cd /usr/src && wget https://github.com/kubernetes/kubernetes/archive/v1.3.0-alpha.4.tar.gz && \
    tar zxvf v1.3.0-alpha.4.tar.gz

RUN cd /usr/src/kubernetes-1.3.0-alpha.4/cluster/ubuntu/minion/init_conf && cp * /etc/init/ && \
    cd /usr/src/kubernetes-1.3.0-alpha.4/cluster/ubuntu/minion/init_scripts && cp * /etc/init.d/ && \
    cd /usr/src/kubernetes-1.3.0-alpha.4/cluster/ubuntu/minion-flannel/init_conf && cp * /etc/init/ && \
    cd /usr/src/kubernetes-1.3.0-alpha.4/cluster/ubuntu/minion-flannel/init_scripts && cp * /etc/init.d/

RUN cd /usr/src/kubernetes-1.3.0-alpha.4/cluster/ubuntu/master/init_conf && cp * /etc/init/ && \
    cd /usr/src/kubernetes-1.3.0-alpha.4/cluster/ubuntu/master/init_scripts && cp * /etc/init.d/ && \
    cd /usr/src/kubernetes-1.3.0-alpha.4/cluster/ubuntu/master-flannel/init_conf && cp * /etc/init/ && \
    cd /usr/src/kubernetes-1.3.0-alpha.4/cluster/ubuntu/master-flannel/init_scripts && cp * /etc/init.d/

# For some reason flannel does not come with execution permisison
RUN chmod +x /etc/init.d/flanneld

# Copy installation files required for configuring master
RUN mkdir -p /root/kube/cluster/lib

RUN cd /usr/src/kubernetes-1.3.0-alpha.4/cluster && cp saltbase/salt/generate-cert/make-ca-cert.sh /root/kube/ && \
    cp ubuntu/reconfDocker.sh /root/kube/ && \
    cp ubuntu/config-default.sh /root/kube/ && \
    cp common.sh /root/kube/cluster && \
    cp lib/* /root/kube/cluster/lib/ && \
    cp kubectl.sh /root/kube/cluster/ && \
    cp kube-util.sh /root/kube/cluster

RUN cd /root/kube/ && curl -L -O https://storage.googleapis.com/kubernetes-release/easy-rsa/easy-rsa.tar.gz

# Copy installation files required for configuring minion

RUN rm -rf /usr/src/kubernetes-1.3.0-alpha.4 && rm -rf /usr/src/kubernetes-1.3.0-alpha.4/

# Add file used to configure master and minion nodes correctly
ADD ./overlay/root/kube/configure.sh /root/kube/

# Clean rootfs from image-builder
RUN /usr/local/sbin/builder-leave


text:
<?php

/**
 * Get the number of keys
 *
 * @author Ivan Shumkov
 * @package Rediska
 * @subpackage Commands
 * @version 0.5.6
 * @link http://rediska.geometria-lab.net
 * @license http://www.opensource.org/licenses/bsd-license.php
 */
class Rediska_Command_GetKeysCount extends Rediska_Command_Abstract
{
    /**
     * Create command
     *
     * @return Rediska_Connection_Exec
     */
    public function create()
    {
        $commands = array();
        $command = array('DBSIZE');
        foreach($this->_rediska->getConnections() as $connection) {
            $commands[] = new Rediska_Connection_Exec($connection, $command);
        }

        return $commands;
    }

    /**
     * Parse response
     *
     * @param array $responses
     * @return integer
     */
    public function parseResponses($responses)
    {
        return array_sum($responses);
    }
}


text:
echo "Installing Git..."

# Check if Git is already installed on the machine
if hash git 2>/dev/null; then

	# You already have it installed, come on then!
	echo "Git is already installed on your machine, as I can see."
	git --version

else

	echo "OK, performing installation..."

	# Install Git with Apt
	sudo apt-get update
	sudo apt-get install git -y

fi


text:
var Linkable = {
    onclick: function(textarea, e) {
        if (e.ctrlKey) {
            window.open(textarea.value, '_blank')
            return false;
        }
    },
    onmouseover: function(textarea, e) {
        textarea.focus();
        Linkable.onkey(textarea, e)
    },
    onkeyevent: function(textarea, e) {
        textarea.style.cursor = e.ctrlKey ? 'pointer' : '';
    }
};


text:
package ar.edu.ungs.persistence.entities.consulta;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import ar.edu.ungs.persistence.entities.recepcion.Cita;

@Entity
@Table(name = "CONSULTA")
public class Consulta {

	@Id
	@Column(name="ID")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;

	@OneToOne
	@JoinColumn(name = "CITA_ID")
	private Cita cita;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Cita getCita() {
		return cita;
	}

	public void setCita(Cita cita) {
		this.cita = cita;
	}

}


text:
import { TestBed } from '@angular/core/testing';
import { FullscreenService } from '../core/fullscreen-service/fullscreen.service';
import { MimeDomHelper } from '../core/mime-dom-helper';
import { MimeResizeService } from '../core/mime-resize-service/mime-resize.service';
import { SharedModule } from '../shared/shared.module';
import { ViewDialogConfigStrategyFactory } from './view-dialog-config-strategy-factory';
import { ViewDialogService } from './view-dialog.service';

describe('ViewDialogService', () => {
  let service: ViewDialogService;

  beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [SharedModule],
      providers: [
        ViewDialogService,
        MimeResizeService,
        MimeDomHelper,
        FullscreenService,
        ViewDialogConfigStrategyFactory,
      ],
    });
    service = TestBed.inject(ViewDialogService);
  });

  it('should be created', () => {
    expect(service).toBeTruthy();
  });
});


text:
module FunWith
  module VersionStrings
    module VersionizeExtender
      def version( str = nil )
        @fwvs_version_string ||= str.fwvs_version_string
        @fwvs_version_string
      end
    end
  end
end


text:
prefix
======

css vendor prefixes