text:
package org.srcdeps.core.config;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.Collections;
import java.util.Properties;

import org.junit.Assert;
import org.junit.Test;
import org.srcdeps.core.BuildRequest.Verbosity;
import org.srcdeps.core.config.scalar.CharStreamSource;
import org.srcdeps.core.config.tree.walk.OverrideVisitor;

public class OverrideTest {
    @Test
    public void appendScmRepositoryUrl() {

        Configuration.Builder config = Configuration.builder() //
                .repository( //
                        ScmRepository.builder() //
                                .id("org.repo1") //
                                .include("org.example") //
                                .url("file:///whereever") //
                );
        ScmRepository.Builder nonOverlayedRepo = config.repositories.getChildren().get("org.repo1");
        Assert.assertEquals("org.repo1", nonOverlayedRepo.getName());
        Assert.assertEquals(Collections.singletonList("org.example"), nonOverlayedRepo.includes.asListOfValues());
        Assert.assertEquals(Collections.singletonList("file:///whereever"), nonOverlayedRepo.urls.asListOfValues());

        Properties props = new Properties();
        props.put("srcdeps.repositories[org.repo1].urls[1]", "file:///here");

        config.accept(new OverrideVisitor(props));

        ScmRepository.Builder overlayedRepo = config.repositories.getChildren().get("org.repo1");
        Assert.assertSame(nonOverlayedRepo, overlayedRepo);

        Assert.assertEquals("org.repo1", nonOverlayedRepo.getName());
        Assert.assertEquals(Collections.singletonList("org.example"), nonOverlayedRepo.includes.asListOfValues());
        Assert.assertEquals(Arrays.asList("file:///whereever", "file:///here"), nonOverlayedRepo.urls.asListOfValues());

    }

    @Test
    public void modifyListOfStrings() {

        Configuration.Builder config = Configuration.builder() //
                .forwardProperty("fwd1") //
                .forwardProperty("fwd2") //
                .maven( //
                        Maven.builder() //
                                .versionsMavenPluginVersion("0.1") //
                                .failWith( //
                                        MavenAssertions.failWithBuilder() //
                                                .addDefaults(false) //
                                                .goal("g1") //
                                                .profile("p1") //
                                                .property("prop1") //
                                ) //
                );
        Assert.assertEquals(Arrays.asList("fwd1", "fwd2"), config.forwardProperties.asListOfValues());

        MavenAssertions.FailWithBuilder failWith = config.maven.failWith;
        Assert.assertEquals(false, failWith.addDefaults.getValue());
        Assert.assertEquals(Collections.singleton("g1"), failWith.goals.asSetOfValues());
        Assert.assertEquals(Collections.singleton("p1"), failWith.profiles.asSetOfValues());
        Assert.assertEquals(Collections.singleton("prop1"), failWith.properties.asSetOfValues());

        Properties props = new Properties();
        props.put("srcdeps.forwardProperties", ""); // replace by empty
        props.put("srcdeps.maven.failWith.goals[1]", "g2"); // append
        props.put("srcdeps.maven.failWith.profiles", "pro1,pro2"); // replace
        props.put("srcdeps.maven.failWith.properties[-1]", "prop0"); // prepend

        config.accept(new OverrideVisitor(props));

        MavenAssertions.FailWithoutBuilder overlayedFailWith = config.maven.failWith;

        Assert.assertSame(failWith, overlayedFailWith);

        Assert.assertEquals(Collections.emptyList(), config.forwardProperties.asListOfValues());
        Assert.assertEquals(false, failWith.addDefaults.getValue());
        Assert.assertEquals(Arrays.asList("g1", "g2"), failWith.goals.asListOfValues());
        Assert.assertEquals(Arrays.asList("pro1", "pro2"), failWith.profiles.asListOfValues());
        Assert.assertEquals(Arrays.asList("prop0", "prop1"), failWith.properties.asListOfValues());

    }

    @Test
    public void overrideBoolean() {

        Configuration.Builder config = Configuration.builder().skip(true);
        Assert.assertEquals(true, config.skip.getValue());

        Properties props = new Properties();
        props.put("srcdeps.skip", "false");
        config.accept(new OverrideVisitor(props));
        Assert.assertEquals(false, config.skip.getValue());

    }

    @Test
    public void overridePath() {

        Path myDir = Paths.get("/my/dir");

        Configuration.Builder config = Configuration.builder().sourcesDirectory(myDir);
        Assert.assertEquals(myDir, config.sourcesDirectory.getValue());

        Properties props = new Properties();
        props.put("srcdeps.sourcesDirectory", "/your/dir");
        config.accept(new OverrideVisitor(props));
        Assert.assertEquals(Paths.get("/your/dir"), config.sourcesDirectory.getValue());

    }

    @Test
    public void overrideScmRepositoryMaven() {

        Configuration.Builder config = Configuration.builder().repository(ScmRepository.builder() //
                .id("org.repo1") //
                .include("org.example") //
                .url("file:///whereever") //
                .maven( //
                        ScmRepositoryMaven.builder() //
                                .versionsMavenPluginVersion("1.2")) //
        );

        ScmRepository.Builder nonOverlayedRepo = config.repositories.getChildren().get("org.repo1");
        Assert.assertEquals("org.repo1", nonOverlayedRepo.getName());
        Assert.assertEquals(Collections.singletonList("org.example"), nonOverlayedRepo.includes.asListOfValues());
        Assert.assertEquals(Collections.singletonList("file:///whereever"), nonOverlayedRepo.urls.asListOfValues());
        Assert.assertEquals("1.2", nonOverlayedRepo.maven.versionsMavenPluginVersion.getValue());

        Properties props = new Properties();
        props.put("srcdeps.repositories[org.repo1].maven.versionsMavenPluginVersion", "1.3");
        props.put("srcdeps.repositories[org.repo1].gradle.modelTransformer", "literal: foo");

        config.accept(new OverrideVisitor(props));

        ScmRepository.Builder overlayedRepo = config.repositories.getChildren().get("org.repo1");
        Assert.assertSame(nonOverlayedRepo, overlayedRepo);
        Assert.assertEquals("org.repo1", nonOverlayedRepo.getName());
        Assert.assertEquals(Collections.singletonList("org.example"), nonOverlayedRepo.includes.asListOfValues());
        Assert.assertEquals(Collections.singletonList("file:///whereever"), nonOverlayedRepo.urls.asListOfValues());
        Assert.assertEquals("1.3", nonOverlayedRepo.maven.versionsMavenPluginVersion.getValue());
        Assert.assertEquals(CharStreamSource.of("literal: foo"), nonOverlayedRepo.gradle.modelTransformer.getValue());

    }

    @Test
    public void overrideValuelessBooleanProperty() {
        Configuration.Builder config = Configuration.builder().skip(true);
        Assert.assertEquals(true, config.skip.getValue());

        Properties props = new Properties();
        props.put("srcdeps.skip", "");
        config.accept(new OverrideVisitor(props));
        Assert.assertEquals(true, config.skip.getValue());
    }

    @Test
    public void overrideVerbosity() {

        Configuration.Builder config = Configuration.builder().verbosity(Verbosity.trace);
        Assert.assertEquals(Verbosity.trace, config.verbosity.getValue());

        Properties props = new Properties();
        props.put("srcdeps.verbosity", "debug");
        config.accept(new OverrideVisitor(props));
        Assert.assertEquals(Verbosity.debug, config.verbosity.getValue());

    }

    @Test
    public void replaceScmRepositoryUrl() {

        Configuration.Builder config = Configuration.builder() //
                .skip(false) //
                .repository( //
                        ScmRepository.builder() //
                                .id("repo1") //
                                .include("org.example") //
                                .url("file:///whereever") //
                );
        ScmRepository.Builder nonOverlayedRepo = config.repositories.getChildren().get("repo1");
        Assert.assertEquals("repo1", nonOverlayedRepo.getName());
        Assert.assertEquals(Collections.singletonList("org.example"), nonOverlayedRepo.includes.asListOfValues());
        Assert.assertEquals(Collections.singletonList("file:///whereever"), nonOverlayedRepo.urls.asListOfValues());

        Properties props = new Properties();
        props.put("srcdeps.repositories[repo1].urls[0]", "file:///here");

        config.accept(new OverrideVisitor(props));

        ScmRepository.Builder overlayedRepo = config.repositories.getChildren().get("repo1");
        Assert.assertSame(nonOverlayedRepo, overlayedRepo);

        Assert.assertEquals("repo1", nonOverlayedRepo.getName());
        Assert.assertEquals(Collections.singletonList("org.example"), nonOverlayedRepo.includes.asListOfValues());
        Assert.assertEquals(Collections.singletonList("file:///here"), nonOverlayedRepo.urls.asListOfValues());

    }
}


text: This is the partial for cyclists.

redpajama_set_name: RedPajamaGithub


text:
package filepathext

import (
	"os"
	"path/filepath"
)

// SmartJoin joins two paths, but only if the second is not already an
// absolute path.
func SmartJoin(a, b string) string {
	if filepath.IsAbs(b) {
		return b
	}
	return filepath.Join(a, b)
}

// TryAbsToRel tries to convert an absolute path to relative based on the
// process working directory. If it can't, it returns the absolute path.
func TryAbsToRel(abs string) string {
	wd, err := os.Getwd()
	if err != nil {
		return abs
	}

	rel, err := filepath.Rel(wd, abs)
	if err != nil {
		return abs
	}

	return rel
}


text:
package org.apache.heron.scheduler.marathon;

import java.net.HttpURLConnection;
import java.util.logging.Level;
import java.util.logging.Logger;

import org.apache.heron.spi.utils.NetworkUtils;

public class MarathonController {
  private static final Logger LOG = Logger.getLogger(MarathonController.class.getName());

  private final String marathonURI;
  private final String marathonAuthToken;
  private final String topologyName;
  private final boolean isVerbose;

  public MarathonController(
      String marathonURI,
      String marathonAuthToken,
      String topologyName,
      boolean isVerbose
  ) {
    this.marathonURI = marathonURI;
    this.marathonAuthToken = marathonAuthToken;
    this.topologyName = topologyName;
    this.isVerbose = isVerbose;
  }

  /**
   * Kills a marathon app (topology)
   */
  public boolean killTopology() {
    // Setup Connection
    String topologyURI = String.format("%s/v2/groups/%s?force=true",
        this.marathonURI, this.topologyName);
    HttpURLConnection conn = NetworkUtils.getHttpConnection(topologyURI);

    // Attach a token if there is one specified
    if (this.marathonAuthToken != null) {
      conn.setRequestProperty("Authorization", String.format("token=%s", this.marathonAuthToken));
    }

    if (conn == null) {
      LOG.log(Level.SEVERE, "Failed to find marathon scheduler");
      return false;
    }

    try {
      // Send kill topology request
      if (!NetworkUtils.sendHttpDeleteRequest(conn)) {
        LOG.log(Level.SEVERE, "Failed to send delete request");
        return false;
      }

      // Check response
      boolean success = NetworkUtils.checkHttpResponseCode(conn, HttpURLConnection.HTTP_OK);

      if (success) {
        LOG.log(Level.INFO, "Successfully killed topology");
        return true;
      } else if (NetworkUtils.checkHttpResponseCode(conn, HttpURLConnection.HTTP_UNAUTHORIZED)) {
        LOG.log(Level.SEVERE, "Marathon requires authentication");
        return false;
      } else {
        LOG.log(Level.SEVERE, "Failed to kill topology");
        return false;
      }
    } finally {
      // Disconnect to release resources
      conn.disconnect();
    }
  }

  /**
   * Restarts a given marathon app (topology)
   * @param appId ID of marathon app
   */
  public boolean restartApp(int appId) {
    if (appId == -1) {
      // TODO (nlu): implement restart all
      String message = "Restarting the whole topology is not supported yet. "
          + "Please kill and resubmit the topology.";
      LOG.log(Level.SEVERE, message);
      return false;
    }

    // Setup Connection
    String restartRequest = String.format("%s/v2/apps/%s/%d/restart",
        this.marathonURI, this.topologyName, appId);
    HttpURLConnection conn = NetworkUtils.getHttpConnection(restartRequest);

    if (this.marathonAuthToken != null) {
      conn.setRequestProperty("Authorization", String.format("token=%s", this.marathonAuthToken));
    }

    if (conn == null) {
      LOG.log(Level.SEVERE, "Failed to find marathon scheduler");
      return false;
    }

    try {
      // send post request to restart app
      byte[] empty = new byte[0];
      if (!NetworkUtils.sendHttpPostRequest(conn, NetworkUtils.JSON_TYPE, empty)) {
        LOG.log(Level.SEVERE, "Failed to send post request");
        return false;
      }

      // Check response
      boolean success = NetworkUtils.checkHttpResponseCode(conn, HttpURLConnection.HTTP_OK);

      if (success) {
        LOG.log(Level.INFO, "Successfully restarted container {0}", appId);
        return true;
      } else if (NetworkUtils.checkHttpResponseCode(conn, HttpURLConnection.HTTP_UNAUTHORIZED)) {
        LOG.log(Level.SEVERE, "Marathon requires authentication");
        return false;
      } else {
        LOG.log(Level.SEVERE, "Failed to restart container {0}", appId);
        return false;
      }
    } finally {
      // Disconnect to release resources
      conn.disconnect();
    }
  }

  /**
   * Restarts a given marathon app (topology)
   * @param appConf App configuration
   */
  // submit a topology as a group, containers as apps in the group
  public boolean submitTopology(String appConf) {
    if (this.isVerbose) {
      LOG.log(Level.INFO, "Topology conf is: " + appConf);
    }

    // Marathon atleast till 1.4.x does not allow upper case jobids
    if (!this.topologyName.equals(this.topologyName.toLowerCase())) {
      LOG.log(Level.SEVERE, "Marathon scheduler does not allow upper case topologies");
      return false;
    }

    // Setup Connection
    String schedulerURI = String.format("%s/v2/groups", this.marathonURI);
    HttpURLConnection conn = NetworkUtils.getHttpConnection(schedulerURI);

    // Attach a token if there is one specified
    if (this.marathonAuthToken != null) {
      conn.setRequestProperty("Authorization", String.format("token=%s", this.marathonAuthToken));
    }

    if (conn == null) {
      LOG.log(Level.SEVERE, "Failed to find marathon scheduler");
      return false;
    }

    try {
      // Send post request with marathon conf for topology
      if (!NetworkUtils.sendHttpPostRequest(conn, NetworkUtils.JSON_TYPE, appConf.getBytes())) {
        LOG.log(Level.SEVERE, "Failed to send post request");
        return false;
      }

      // Check response
      boolean success = NetworkUtils.checkHttpResponseCode(conn, HttpURLConnection.HTTP_CREATED);

      if (success) {
        LOG.log(Level.INFO, "Topology submitted successfully");
        return true;
      } else if (NetworkUtils.checkHttpResponseCode(conn, HttpURLConnection.HTTP_UNAUTHORIZED)) {
        LOG.log(Level.SEVERE, "Marathon requires authentication");
        return false;
      } else {
        LOG.log(Level.SEVERE, "Failed to submit topology");
        return false;
      }
    } finally {
      // Disconnect to release resources
      conn.disconnect();
    }
  }
}


text:
namespace FootballDb
{
    using System;
    using System.Collections.Generic;

    public partial class TeamMatch
    {
        public int Id { get; set; }
        public int HomeTeamId { get; set; }
        public int AwayTeamId { get; set; }
        public Nullable<int> HomeGoals { get; set; }
        public Nullable<int> AwayGoals { get; set; }
        public Nullable<System.DateTime> MatchDate { get; set; }
        public Nullable<int> LeagueId { get; set; }

        public virtual League League { get; set; }
        public virtual Team AwayTeam { get; set; }
        public virtual Team HomeTeam { get; set; }
    }
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed><tipo>Rua</tipo><logradouro>Paim Filho</logradouro><bairro>Planalto</bairro><cidade>Viamão</cidade><uf>RS</uf><cep>94465160</cep></feed>


text:
import React from "react"
import presets, { colors } from "../../utils/presets"
import { rhythm, options } from "../../utils/typography"
import sharedStyles from "../shared/styles"
import ShareMenu from "../../components/share-menu"
import MdLaunch from "react-icons/lib/md/launch"
import MdStar from "react-icons/lib/md/star"

const Meta = ({ starter, repoName, imageSharp, demo }) => (
  <div
    css={{
      fontFamily: options.headerFontFamily.join(`,`),
      color: colors.gray.dark,
      display: `flex`,
      flexWrap: `wrap`,
      width: `100%`,
      minWidth: `320px`,
      flexDirection: `column-reverse`,
      padding: sharedStyles.gutter,
      paddingTop: 0,
      [presets.Phablet]: {
        flexDirection: `row`,
        flexWrap: `nowrap`,
        paddingBottom: 0,
      },
      [presets.Desktop]: {
        padding: sharedStyles.gutterDesktop,
        paddingTop: 0,
        paddingBottom: 0,
      },
    }}
  >
    <div
      css={{
        marginTop: rhythm(3 / 4),
        paddingRight: 15,
        display: `flex`,
        flexWrap: `wrap`,
        justifyContent: `space-between`,
        flexShrink: 0,
        [presets.Phablet]: {
          justifyContent: `flex-start`,
        },
      }}
    >

          <MdStar style={{ verticalAlign: `sub` }} />
          {` `}
          {starter.stars}

        <span
          css={{
            color: colors.gray.calm,
            fontFamily: options.headerFontFamily.join(`,`),
            paddingRight: 8,
          }}
        >
          Updated

        {showDate(starter.lastUpdated)}

    <div
      css={{
        marginTop: rhythm(3 / 4),
        marginRight: 15,
        display: `flex`,
        flexWrap: `nowrap`,
        flexGrow: 1,
        justifyContent: `space-between`,
        borderBottom: `1px solid ${colors.ui.light}`,
        paddingBottom: rhythm(2 / 4),
        [presets.Phablet]: {
          borderBottom: 0,
        },
      }}
    >
      <div
        css={{
          paddingRight: 15,
          paddingBottom: 15,
          whiteSpace: `nowrap`,
          overflow: `hidden`,
          textOverflow: `ellipsis`,
        }}
      >
        {`By  `}
        <a
          css={{
            "&&": {
              boxShadow: `none`,
              borderBottom: 0,
              color: colors.lilac,
              cursor: `pointer`,
              fontFamily: options.headerFontFamily.join(`,`),
              "&:hover": {
                background: `transparent`,
                color: colors.gatsby,
              },
            },
          }}
          href={`https://github.com/${starter.owner}`}
        >
          {starter.owner}

      <div
        css={{
          flex: `2 0 auto`,
          textAlign: `right`,
          position: `relative`,
          zIndex: 1,
        }}
      >
        <a
          href={demo}
          css={{
            border: 0,
            borderRadius: presets.radius,
            color: colors.accent,
            fontFamily: options.headerFontFamily.join(`,`),
            fontWeight: `bold`,
            marginRight: rhythm(1.5 / 4),
            padding: `${rhythm(1 / 6)} ${rhythm(2 / 3)}`, // @todo same as site showcase but wrong for some reason
            textDecoration: `none`,
            WebkitFontSmoothing: `antialiased`,
            "&&": {
              backgroundColor: colors.accent,
              borderBottom: `none`,
              boxShadow: `none`,
              color: colors.gatsby,
              "&:hover": {
                backgroundColor: colors.accent,
              },
            },
          }}
        >
          <MdLaunch
            style={{
              verticalAlign: `sub`,
            }}
          />
          {` Visit demo `}

        <ShareMenu
          url={`https://github.com/${starter.githubFullName}`}
          title={`Check out ${repoName} on the @Gatsby Starter Showcase!`}
          image={imageSharp.childImageSharp.resize.src}
          theme={`accent`}
        />

)

function showDate(dt) {
  const date = new Date(dt)
  return date.toLocaleDateString(`en-US`, {
    month: `short`,
    day: `numeric`,
    year: `numeric`,
  })
}

export default Meta


text:
<?php

/**
 * @package BLW\Core
 * @version 1.0.0
 * @author Walter Otsyula <wotsyula@mast3rpee.tk>
 */
namespace BLW\Type;

/**
 * Tests BLW Library Iterable trait.
 * @package BLW\Core
 * @author  mAsT3RpEE <wotsyula@mast3rpee.tk>
 *
 *  @coversDefaultClass \BLW\Type\AIterable
 */
class Iterable2Test extends IterableTest
{}


text:
Meter Plugin Development Checklist
----------------------------------

The following is a master checklist for the development of a Boundary Meter Plug

## Contents

### Required

- [ ][plugin.json](manifest.md)
- [ ]metrics.json
- [ ][README.md](documentation.md)
- [ ]LICENSE
- [ ]icon.png
- [ ]Erat solis corpus
- [ ]In est verum strata ad Nocte

## Documentation

- [ ]Description of the plugin
- [ ]Setup instructions
- [ ]Field Descriptions
- [ ]Metrics Generated
- [ ]Erat solis corpus
- [ ]In est verum strata ad Nocte

## Testing

- [ ]Verfied Output on Standard Out
- [ ]Verified
- [ ]Meae quoque
- [ ]Tibia auratis fatorum perspicit non consuetas quae
- [ ]Erat solis corpus
- [ ]In est verum strata ad Nocte

## Platform

Tier 1 platform coverage for GA (General Availability)

- [ ]Linux
  - [ ]Centos 5.10
  - [ ]Centos 6.5
  - [ ]Amazon Linux AMI release 2014.03
  - [ ]Ubuntu 12.04 LTS
  - [ ]Ubuntu 14.04.1 LTS

- [ ]Windows
  - [ ]Windows 2012
  - [ ]Windows 2008R2

## Production
- [ ]In nulla producet Iuppiter
- [ ]Quod silvasque insula uror cuncta
- [ ]Meae quoque
- [ ]Tibia auratis fatorum perspicit non consuetas quae
- [ ]Erat solis corpus
- [ ]In est verum strata ad Nocte


text:
<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/topLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:keepScreenOn="true">

    <SurfaceView
        android:id="@+id/surfaceview"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

    <android.support.v7.widget.RecyclerView
        android:id="@+id/recycler_view"
        android:layout_width="@dimen/image_preview"
        android:layout_height="match_parent"
        android:layout_alignParentEnd="true"
        android:layout_alignParentRight="true"
        android:layout_margin="10dp"
        android:scrollbars="vertical" />

</RelativeLayout>


text:
/**
* In this sample, we demonstrate how to generate and use the blob level shared access signature and the container level
* shared access signature.
*
* In the blob level shared access signature sample, there are the following steps:
*
* a. Create a container and a blob.
*
* b. Generate a shared access signature URL for the blob.
*
* c. Download that blob through that URL (should fail as the policy was never uploaded).
*
* In the container level shared access signature sample, there are the following steps:
*
* a. Create a container and a blob.
*
* b. Upload a "ReadWrite" policy and a "Read" permission to the container, generate their shared access
* signatures.
*
* c. Use both shared access signatures to read that blob (Expect a failure from the "Read" permission shared access signature since it has already expired.).
*/

var fs = require('fs');
if (!fs.existsSync) {
  fs.existsSync = require('path').existsSync;
}

var azure;
if (fs.existsSync('./../../lib/azure.js')) {
  azure = require('./../../lib/azure');
} else {
  azure = require('azure');
}

var BlobConstants = azure.Constants.BlobConstants;
var ServiceClient = azure.ServiceClient;
var CloudBlobClient = azure.CloudBlobClient;

var util = require('util');

var container = 'sassample';
var blob = 'sassample';

var blobService = azure.createBlobService();

function createContainer() {
  // Step 0: Create the container.
  blobService.createContainerIfNotExists(container, function (error) {
    if (error) {
      console.log(error);
    }
    else {
      console.log('Created the container ' + container);
      createBlob();
    }
  });
}

function createBlob() {
  // Step 1: Create the blob
  blobService.createBlockBlobFromText(container, blob, 'test blob', function (error) {
    if (error) {
      console.log(error);
    }
    else {
      console.log('Created the blob ' + container);
      downloadBlobUsingSharedAccessSignature();
    }
  });
}

function downloadBlobUsingSharedAccessSignature() {
  var startDate = new Date();
  var expiryDate = new Date(startDate);
  expiryDate.setMinutes(startDate.getMinutes() + 5);

  var sharedAccessPolicy = {
    AccessPolicy: {
      Permissions: azure.Constants.BlobConstants.SharedAccessPermissions.READ,
      Start: startDate,
      Expiry: expiryDate
    }
  };

  var signature = blobService.generateSharedAccessSignature(container, blob, sharedAccessPolicy);

  var sharedBlobService = azure.createBlobService();
  var sharedAccessSignature = new azure.SharedAccessSignature(sharedBlobService.storageAccount, sharedBlobService.storageAccessKey);
  sharedBlobService.authenticationProvider = sharedAccessSignature;

  sharedAccessSignature.permissionSet = [signature];

  // Step 3: Download the blob by using the shared access signature URL. Since the read policy was never uploaded this should fail.
  sharedBlobService.getBlobProperties(container, blob, function (error) {
    if (error) {
      console.log('Failed to download the blob since the permission was invalid.');
    } else {
      console.log('Downloaded the blob ' + blob + ' by using the shared access signature URL ' + signature.url());
    }

    createPolicies();
  });
}

function createPolicies() {
  // Step 4: Create a "ReadWrite" policy and a "Read" policy.
  var readWriteStartDate = new Date();
  var readWriteExpiryDate = new Date(readWriteStartDate);
  readWriteExpiryDate.setMinutes(readWriteStartDate.getMinutes() + 10);

  var readWriteSharedAccessPolicy = {
    Id: 'readwrite',
    AccessPolicy: {
      Start: readWriteStartDate,
      Expiry: readWriteExpiryDate,
      Permissions: 'rw'
    }
  };

  var readSharedAccessPolicy = {
    Id: 'read',
    AccessPolicy: {
      Expiry: readWriteStartDate,
      Permissions: 'r'
    }
  };

  var options = {};
  options.signedIdentifiers = [readWriteSharedAccessPolicy, readSharedAccessPolicy];

  blobService.setContainerAcl(container, BlobConstants.BlobContainerPublicAccessType.CONTAINER, options, function(error) {
    if (error) {
      console.log(error);
    } else {
      console.log('Uploaded the permissions for the container ' + container);
      usePermissions(readWriteSharedAccessPolicy, readSharedAccessPolicy);
    }
  });
}

function usePermissions(readWriteSharedAccessPolicy, readSharedAccessPolicy) {
  // Step 5: Read, write the blob using the shared access signature from "ReadWrite" policy.
  var sharedAccessSignature = blobService.generateSharedAccessSignature(container, null, readWriteSharedAccessPolicy);

  var sharedBlobService = azure.createBlobService();
  var sharedAccessSignatureProvider = new azure.SharedAccessSignature(sharedBlobService.storageAccount, sharedBlobService.storageAccessKey);
  sharedBlobService.authenticationProvider = sharedAccessSignatureProvider;

  sharedAccessSignatureProvider.permissionSet = [sharedAccessSignature];

  sharedBlobService.getBlobProperties(container, blob, function (error) {
    if (error) {
      console.log('Failed to download the blob since the permission was invalid.');
    } else {
      console.log('Downloaded the blob ' + blob + ' by using the shared access signature URL ' + sharedAccessSignature.url());
    }

    useIncorrectPermission(readSharedAccessPolicy);
  });
}

function useIncorrectPermission(readSharedAccessPolicy) {
  // Step 6: Expect an exception from using the already expired "Read" permission to read the blob.
  var sharedAccessSignature = blobService.generateSharedAccessSignature(container, null, readSharedAccessPolicy);

  var sharedBlobService = azure.createBlobService();
  var sharedAccessSignatureProvider = new azure.SharedAccessSignature(sharedBlobService.storageAccount, sharedBlobService.storageAccessKey);
  sharedBlobService.authenticationProvider = sharedAccessSignatureProvider;

  sharedAccessSignatureProvider.permissionSet = [sharedAccessSignature];

  sharedBlobService.getBlobProperties(container, blob, function (error) {
    if (error) {
      console.log('Failed to download the blob since the permission was invalid.');
    } else {
      console.log('Downloaded the blob ' + blob + ' by using the shared access signature URL ' + sharedAccessSignature.url());
    }
  });
}

var arguments = process.argv;

if (arguments.length > 3) {
  console.log('Incorrect number of arguments');
}
else if (arguments.length == 3) {
  // Adding a third argument on the command line, whatever it is, will delete the container before running the sample.
  blobService.deleteContainer(container, function (error) {
    if (error) {
      console.log(error);
    } else {
      createContainer();
    }
  });
}
else {
  createContainer();
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<meta http-equiv="content-type" content="text/html; charset=utf-8" >
<title>Berlin 2013
 -  Proposal</title>
<meta name="author" content="Alex Papadimoulis" >

<link rel="alternate" type="application/rss+xml" title="devopsdays RSS Feed" href="http://www.devopsdays.org/feed/" >

<link rel="stylesheet" href="/css/devops.min.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="/css/blueprint/print.css" type="text/css" media="print">

      Home

      Contact

      Events

      Presentations

      Blog

Berlin 2013
 -  Proposal

Gold sponsors

welcome
propose
program
location
register
sponsor
contact

Back to proposals overview - program

Implementing DevOps… and Making it Actually Stick

Abstract:

If you've ever been involved in promoting cultural changes within an
organization, you may have experienced something even more
disheartening than flat-out rejection: a full rollback of cultural
change and a decade-long resentment of anyone remotely associated with
the implementation. This has happened at countless organizations with
agile, with SOA, with virtualization – and it's starting to happen
with DevOps.

How can such as simple idea that's been so successful at so many
companies become such a resounding failure at others? It's not the
organization, and it's certainly not DevOps. The problem lies in the
implementation, and ultimately, with its promoters and champions.

In this talk, I'll discuss both technical and organizational
strategies for a successful long-term DevOps implementation, go over a
few big failures at big companies, and cover the common and
not-so-common pitfalls when promoting this type of cultural change.

Speaker:

Alex Papadimoulis

Please enable JavaScript to view the comments powered by Disqus.
blog comments powered by Disqus

Gold Sponsors

Silver sponsors

Evening sponsors


text:
package org.checkerframework.checker.nullness.qual;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
@Documented
public @interface Nullable {}


text:
package polymorphichelpers

import (
	"fmt"

	appsv1 "k8s.io/api/apps/v1"
	corev1 "k8s.io/api/core/v1"
	extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
	"k8s.io/apimachinery/pkg/runtime/schema"
)

// Check whether the kind of resources could be exposed
func canBeExposed(kind schema.GroupKind) error {
	switch kind {
	case
		corev1.SchemeGroupVersion.WithKind("ReplicationController").GroupKind(),
		corev1.SchemeGroupVersion.WithKind("Service").GroupKind(),
		corev1.SchemeGroupVersion.WithKind("Pod").GroupKind(),
		appsv1.SchemeGroupVersion.WithKind("Deployment").GroupKind(),
		appsv1.SchemeGroupVersion.WithKind("ReplicaSet").GroupKind(),
		extensionsv1beta1.SchemeGroupVersion.WithKind("Deployment").GroupKind(),
		extensionsv1beta1.SchemeGroupVersion.WithKind("ReplicaSet").GroupKind():
		// nothing to do here
	default:
		return fmt.Errorf("cannot expose a %s", kind)
	}
	return nil
}


text:
import io
import os
import re

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

def read(*names, **kwargs):
    """Python 2 and Python 3 compatible text file reading.

    Required for single-sourcing the version string.
    """
    with io.open(
        os.path.join(os.path.dirname(__file__), *names),
        encoding=kwargs.get("encoding", "utf8")
    ) as fp:
        return fp.read()

def find_version(*file_paths):
    """
    Search the file for a version string.

    file_path contain string path components.

    Reads the supplied Python module as text without importing it.
    """
    version_file = read(*file_paths)
    version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
                              version_file, re.M)
    if version_match:
        return version_match.group(1)
    raise RuntimeError("Unable to find version string.")

version = find_version('serial', '__init__.py')

setup(
    name="pyserial",
    description="Python Serial Port Extension",
    version=version,
    author="Chris Liechti",
    author_email="cliechti@gmx.net",
    url="https://github.com/pyserial/pyserial",
    packages=['serial', 'serial.tools', 'serial.urlhandler', 'serial.threaded'],
    license="BSD",
    long_description="""\
Python Serial Port Extension for Win32, OSX, Linux, BSD, Jython, IronPython

Stable:

- Documentation: http://pythonhosted.org/pyserial/
- Download Page: https://pypi.python.org/pypi/pyserial

Latest:

- Documentation: http://pyserial.readthedocs.io/en/latest/
- Project Homepage: https://github.com/pyserial/pyserial
""",
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Intended Audience :: Developers',
        'Intended Audience :: End Users/Desktop',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        'Operating System :: POSIX',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: MacOS :: MacOS X',
        'Programming Language :: Python',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.2',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Topic :: Communications',
        'Topic :: Software Development :: Libraries',
        'Topic :: Software Development :: Libraries :: Python Modules',
        'Topic :: Terminals :: Serial',
    ],
    platforms='any',
    scripts=['serial/tools/miniterm.py'],
)


text:
<#

.SYNOPSIS
	WESPaC Nightly Data Pull
.DESCRIPTION
	File launching Kettle data conversion that will loop continuously until it has completed.
	It is best to set this file as a scheduled tasks that can't run for more than 12 hours in case of WESPaC db problems.
	Also, all log files are now archived and destroyed after 14 days.
.NOTES
	File Name	:	pull-wespac-nightly.ps1
	Author		:	Kris Hagel - kris@krishagel.com
	Date		:	August 10, 2012
.LINK
	https://github.com/krishagel/edage

#>

# Include Secure Database Settings (This file is usually housed in Active Directory Module)
. "Z:\edage-secure\read-secureSettings.ps1"

Import-Module mysqllib

$conn = New-MySQLConnection -server $dbserver -user $dbuser -password $dbpass -database $staging_db

$main_base_number = 10000

# Archive Log Files
$nowClean = Get-Date -Format Mdyyyy
$newName1 = $nowClean + '-wespac_nightly-pull.log'
$newName2 = $nowClean + '-wespac_demographics-edage.log'
$newName3 = $nowClean + '-wespac_nightly-optional-pull.log'
Rename-Item Z:\logs\wespac_nightly-pull.log $newName1
Rename-Item Z:\logs\wespac_demographics-edage.log $newName2
Rename-Item Z:\logs\wespac_nightly-optional-pull.log $newName3

# Remove Log Files Older Than 14 Days
$now = Get-Date
$folder = "Z:\logs"
$lastEdit = $now.AddDays(-14)
$files = Get-Childitem $folder -Recurse | Where {$_.LastWriteTime -le "$lastEdit"}
foreach ($file in $files) {
	if ($file -ne $NULL){
        Remove-Item $file.FullName | out-null
    }
}

# Execute Conversions

do {
	# run main data conversion
	Z:\data-integration\Kitchen.bat /file:"Z:\Educational-Data-and-Account-Generation-Engine\etl\WESPaC\conversions\WESPaC-Nightly-Data-Pull.kjb" :level=debug > Z:\logs\wespac_nightly-pull.log

	$res = Invoke-MySQLQuery "SELECT count('family-id') as howMany from family_guardian" -conn $conn
	$count = $res.howMany
}
until ($count -gt $main_base_number)

# run edage daily changes conversion
Z:\data-integration\Kitchen.bat /file:"Z:\Educational-Data-and-Account-Generation-Engine\etl\WESPaC\conversions\WESPaC-Demographics-Job.kjb" :level=debug > Z:\logs\wespac_demographics-edage.log

# run optional data conversion
Z:\data-integration\Kitchen.bat /file:"Z:\Educational-Data-and-Account-Generation-Engine\etl\WESPaC\conversions\WESPaC-Nightly-Optional-Data-Pull.kjb" :level=debug > Z:\logs\wespac_nightly-optional-pull.log


text:
package com.jivesoftware.sdk.api.tile.data;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.codehaus.jackson.map.annotate.JsonSerialize;

/**
 * Tile activity entry data
 * Created by rrutan on 2/9/14.
 */
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class ActivityEntry {
    private ActivityAction action; // required
    private ActivityActor actor;
    private ActivityObject object; // required
    private ActivityJive jive;

    private String id;
    private ActivityEntryResources resources;

    private ActivityStatus status;

    public ActivityStatus getStatus() {
        return status;
    }

    public void setStatus(ActivityStatus status) {
        this.status = status;
    }

    public String getId() {
        return id;
    }

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

    public ActivityEntryResources getResources() {
        return resources;
    }

    public void setResources(ActivityEntryResources resources) {
        this.resources = resources;
    }

    public ActivityAction getAction() {
        return action;
    }

    public void setAction(ActivityAction action) {
        this.action = action;
    }

    public ActivityActor getActor() {
        return actor;
    }

    public void setActor(ActivityActor actor) {
        this.actor = actor;
    }

    public ActivityObject getObject() {
        return object;
    }

    public void setObject(ActivityObject object) {
        this.object = object;
    }

    public ActivityJive getJive() {
        return jive;
    }

    public void setJive(ActivityJive jive) {
        this.jive = jive;
    }
}


text: from .inline import *


text:
var nssocket = require('nssocket');
var outbound = new nssocket.NsSocket({
  reconnect:true
});
outbound.data(['you', 'there'], function () {
  outbound.send(['iam', 'here'], { iam: true, indeedHere: true });
});

outbound.connect(6785);


text:
package missinggo

import "reflect"

func IsZeroValue(i interface{}) bool {
	return IsEmptyValue(reflect.ValueOf(i))
}

// Returns whether the value represents the empty value for its type. Used for
// example to determine if complex types satisfy the common "omitempty" tag
// option for marshalling. Taken from
// http://stackoverflow.com/a/23555352/149482.
func IsEmptyValue(v reflect.Value) bool {
	switch v.Kind() {
	case reflect.Func, reflect.Map, reflect.Slice:
		return v.IsNil()
	case reflect.Array:
		z := true
		for i := 0; i < v.Len(); i++ {
			z = z && IsEmptyValue(v.Index(i))
		}
		return z
	case reflect.Struct:
		z := true
		for i := 0; i < v.NumField(); i++ {
			z = z && IsEmptyValue(v.Field(i))
		}
		return z
	}
	// Compare other types directly:
	z := reflect.Zero(v.Type())
	return v.Interface() == z.Interface()
}


text:
import { TKeyboardShortcutsMapReadOnly } from "readium-desktop/common/keyboard";

export interface KeyboardState {
    shortcuts: TKeyboardShortcutsMapReadOnly;
}


text:
using MySql.Data.MySqlClient;
using RVaarWebService.Domein;
using System;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace RVaarWebService
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Service1" in both code and config file together.
    public class RVaarServiceImpl : RVaarService
    {
        public string GetData(string value)
        {
            return string.Format("You entered: {0}", value);
        }

        public CompositeType GetDataUsingDataContract(CompositeType composite)
        {
            if (composite == null)
            {
                throw new ArgumentNullException("composite");
            }
            if (composite.BoolValue)
            {
                composite.StringValue += "Suffix";
            }
            return composite;
        }

        public static string connectieString = "yourConnectionstringHere";

        public List<MarkerOption> geefKruispunten()
        {
            List<MarkerOption> array = new List<MarkerOption>();
            MySqlConnection con = new MySqlConnection();
            con.ConnectionString = connectieString;

            string query = "select * from graph";
            MySqlCommand cmd = new MySqlCommand(query, con);
            con.Open();
            MySqlDataReader reader = cmd.ExecuteReader();
            try
            {
                while (reader.Read())
                {
                    MarkerOption option = new MarkerOption();
                    option.zetLatitude(reader.GetFloat("y1"));
                    option.zetLongitude(reader.GetFloat("x1"));
                    option.zetNaam(reader.GetString("lnaam"));
                    array.Add(option);
                }
            }
            finally
            {
                reader.Close();
                con.Close();

            }
            return array;
        }

        public List<TipsTricks> geefTips()
        {
            List<TipsTricks> array = new List<TipsTricks>();
            MySqlConnection con = new MySqlConnection();
            con.ConnectionString = connectieString;

            string query = "SELECT TT.ID, TT.OMSCHRIJVING, TT.GEBRUIKER_NIVEAU, TC.OMSCHRIJVING AS CATEGORIE FROM TIPSTRICKS TT, TIPSTRICKS_CATEGORIE TC WHERE TT.CATEGORIE = TC.ID";
            MySqlCommand cmd = new MySqlCommand(query, con);
            con.Open();
            MySqlDataReader reader = cmd.ExecuteReader();
            try
            {
                while (reader.Read())
                {
                    TipsTricks tt = new TipsTricks();
                    tt.zetID(reader.GetInt32("ID"));
                    tt.zetOmschrijving(reader.GetString("OMSCHRIJVING"));
                    tt.zetGebruikerNiveau(reader.GetInt32("GEBRUIKER_NIVEAU"));
                    tt.zetCategorie(reader.GetString("CATEGORIE"));
                    array.Add(tt);
                }
            }
            finally
            {
                reader.Close();
                con.Close();

            }
            return array;
        }

        public List<TipsTricks> geefTipsBijCategorie(string categorieNaam)
        {
            List<TipsTricks> array = new List<TipsTricks>();
            MySqlConnection con = new MySqlConnection();
            con.ConnectionString = connectieString;

            string query = "SELECT TT.ID, TT.OMSCHRIJVING, TT.GEBRUIKER_NIVEAU, TC.OMSCHRIJVING AS CATEGORIE FROM TIPSTRICKS TT, TIPSTRICKS_CATEGORIE TC WHERE TT.CATEGORIE = TC.ID AND TC.OMSCHRIJVING = '" + categorieNaam + "'";
            MySqlCommand cmd = new MySqlCommand(query, con);
            con.Open();
            MySqlDataReader reader = cmd.ExecuteReader();
            try
            {
                while (reader.Read())
                {
                    TipsTricks tt = new TipsTricks();
                    tt.zetID(reader.GetInt32("ID"));
                    tt.zetOmschrijving(reader.GetString("OMSCHRIJVING"));
                    tt.zetGebruikerNiveau(reader.GetInt32("GEBRUIKER_NIVEAU"));
                    tt.zetCategorie(reader.GetString("CATEGORIE"));
                    array.Add(tt);
                }
            }
            finally
            {
                reader.Close();
                con.Close();

            }
            return array;
        }
    }
}


text:
using UnityEngine;
using System.Collections;

public class AI_Attack : AI_State
{
	public GameObject enemyAttack;
	public int numFireballsInBurst = 3;
	public float burstFireRate = 0.8f;
	public float attackCooldownTime = 5.0f;

	private float burstFireTimer = 0.0f;
	private int burstFireCount = 0;
	private float attackIntervalTimer = 0.0f;
	private bool isAttacking = false;
	private bool isSuicidal = false;

	void Start()
	{
		attackIntervalTimer = attackCooldownTime;
	}

	override public void OnEnter()
	{
		// stop
		navAgent.ResetPath ();
		navAgent.velocity = Vector3.zero;

		//------MARCO WAS HERE------
		//Animator anim = GetComponent<Animator>();
		Animator anim = GetComponentInChildren<Animator>();
		//anim.SetTrigger("attack");
		anim.CrossFade ("Attack", 0f);
		//------MARCO WAS HERE------

		print ("[Enemy] Entered Attack State");
	}

	void Update()
	{
		// time bertween burstFire attacks
		attackIntervalTimer += Time.deltaTime;
	}

	override public void OnUpdate()
	{
		Vector3 playerPos = PlayerManager.GetPlayerPosition ();
		float distToTargetSqr = (playerPos - transform.position).sqrMagnitude;
		transform.LookAt (new Vector3(playerPos.x, transform.position.y, playerPos.z));

		if(isAttacking)
		{
			// increment burstfire timer
			burstFireTimer += Time.deltaTime;

			// if firing is available
			if(burstFireTimer >= burstFireRate)
			{
				GameObject.Instantiate (enemyAttack, transform.position + transform.forward, transform.rotation);
				++burstFireCount;
				burstFireTimer = 0.0f;

				print ("[Enemy] Fired number " + burstFireCount);

				if(burstFireCount == numFireballsInBurst)
				{
					attackIntervalTimer = 0.0f;
					burstFireCount = 0;
					isAttacking = false;
				}
			}
		}
		else
		//if(!isAttacking)
		{
			// set attacking flag
			if(attackIntervalTimer > attackCooldownTime)
			{
				isAttacking = true;
				print ("[Enemy] Starting attack cycle");
			}

			if(distToTargetSqr > owner.attackDistance * owner.attackDistance)
			{
				owner.ChangeState(AI_StateMachine.AIStates.Seek);
			}
			else if(distToTargetSqr > owner.pursueDistance * owner.pursueDistance)
			{
				owner.ChangeState(AI_StateMachine.AIStates.Idle);
			}
		}

		if(!isSuicidal && enemyScript.loadout.health < enemyScript.loadout.maxHealth / 4)
		{
			owner.attackDistance = 1000.0f;
			owner.pursueDistance = 1000.0f;
			owner.alertDistance = 0.0f;
			enemyScript.explodeOnTouch = true;
			navAgent.SetDestination(playerPos);
			navAgent.speed = enemyScript.suicideSpeed;
			isSuicidal = true;
		}
		else if(isSuicidal)
		{
			navAgent.SetDestination(playerPos);
		}
	}

	override public void OnExit ()
	{
	}
}


text:
select 1 as id
union all
select * from {{ ref('node_0') }}
union all
select * from {{ ref('node_24') }}
union all
select * from {{ ref('node_30') }}
union all
select * from {{ ref('node_348') }}
union all
select * from {{ ref('node_614') }}
union all
select * from {{ ref('node_747') }}
union all
select * from {{ ref('node_866') }}


text:
<?php

declare(strict_types=1);

namespace Eelly\SDK\Data\Api;

use Eelly\SDK\EellyClient;
use Eelly\SDK\Data\Service\SummaryDimensionInterface;
use Eelly\DTO\SummaryDimensionDTO;

/**
 *
 * @author shadonTools<localhost.shell@gmail.com>
 */
class SummaryDimension implements SummaryDimensionInterface
{
    /**
     * @author eellytools<localhost.shell@gmail.com>
     */
    public function getSummaryDimension(int $summaryDimensionId): SummaryDimensionDTO
    {
        return EellyClient::request('data/summaryDimension', 'getSummaryDimension', true, $summaryDimensionId);
    }

    /**
     * @author eellytools<localhost.shell@gmail.com>
     */
    public function getSummaryDimensionAsync(int $summaryDimensionId)
    {
        return EellyClient::request('data/summaryDimension', 'getSummaryDimension', false, $summaryDimensionId);
    }

    /**
     * @author eellytools<localhost.shell@gmail.com>
     */
    public function addSummaryDimension(array $data): bool
    {
        return EellyClient::request('data/summaryDimension', 'addSummaryDimension', true, $data);
    }

    /**
     * @author eellytools<localhost.shell@gmail.com>
     */
    public function addSummaryDimensionAsync(array $data)
    {
        return EellyClient::request('data/summaryDimension', 'addSummaryDimension', false, $data);
    }

    /**
     * @author eellytools<localhost.shell@gmail.com>
     */
    public function updateSummaryDimension(int $summaryDimensionId, array $data): bool
    {
        return EellyClient::request('data/summaryDimension', 'updateSummaryDimension', true, $summaryDimensionId, $data);
    }

    /**
     * @author eellytools<localhost.shell@gmail.com>
     */
    public function updateSummaryDimensionAsync(int $summaryDimensionId, array $data)
    {
        return EellyClient::request('data/summaryDimension', 'updateSummaryDimension', false, $summaryDimensionId, $data);
    }

    /**
     * @author eellytools<localhost.shell@gmail.com>
     */
    public function deleteSummaryDimension(int $summaryDimensionId): bool
    {
        return EellyClient::request('data/summaryDimension', 'deleteSummaryDimension', true, $summaryDimensionId);
    }

    /**
     * @author eellytools<localhost.shell@gmail.com>
     */
    public function deleteSummaryDimensionAsync(int $summaryDimensionId)
    {
        return EellyClient::request('data/summaryDimension', 'deleteSummaryDimension', false, $summaryDimensionId);
    }

    /**
     * @author eellytools<localhost.shell@gmail.com>
     */
    public function listSummaryDimensionPage(array $condition = [], int $currentPage = 1, int $limit = 10): array
    {
        return EellyClient::request('data/summaryDimension', 'listSummaryDimensionPage', true, $condition, $currentPage, $limit);
    }

    /**
     * @author eellytools<localhost.shell@gmail.com>
     */
    public function listSummaryDimensionPageAsync(array $condition = [], int $currentPage = 1, int $limit = 10)
    {
        return EellyClient::request('data/summaryDimension', 'listSummaryDimensionPage', false, $condition, $currentPage, $limit);
    }

    /**
     * @return self
     */
    public static function getInstance(): self
    {
        static $instance;
        if (null === $instance) {
            $instance = new self();
        }

        return $instance;
    }
}


text:
<?php

namespace ONGR\ElasticsearchBundle\Result;

/**
 * This class is able to iterate over raw result.
 */
class RawResultIterator extends AbstractResultsIterator
{
    /**
     * @var array
     */
    protected $rawData;

    /**
     * Constructor.
     *
     * @param array $rawData
     */
    public function __construct($rawData)
    {
        $this->rawData = $rawData;

        // Alias documents to have shorter path.
        if (isset($rawData['hits']['hits'])) {
            $this->documents = &$rawData['hits']['hits'];
        }
    }

    /**
     * {@inheritdoc}
     */
    protected function convertDocument($rawData)
    {
        return $rawData;
    }

    /**
     * Returns count of records found by given query.
     *
     * @return int
     */
    public function getTotalCount()
    {
        return $this->rawData['hits']['total'];
    }
}


text:
title: 'Frohe Weihnachten'
published: true
date: '24-12-2016 17:53'
taxonomy:
    category:
        - news
    tag:
        - news
        - gga
external_links:
    process: true
    title: false
    no_follow: true
    target: _blank
    mode: active
process:
    markdown: true
    twig: true
twig_first: true
routable: true
visible: true
---

####Liebe Mitglieder, liebe Unterstützer von "Freunde von God's Golden Acre Deutschland e.V.",

das Jahr neigt sich langsam dem Ende zu, die Feiertage stehen bevor...

Wir blicken dankbar und zufrieden auf ein für unseren Verein erfolgreiches Jahr 2016 zurück. Wir konnten einiges in Bewegung setzen, unsere Konzerttour im Juni war ein voller Erfolg und wir durften einige neue Mitglieder in unseren Reihen begrüßen.

An dieser Stelle möchten wir uns ganz herzlich für eure Unterstützung bedanken.

Euch allen wünschen wir aus dem Verein aber auch im Namen von God's Golden Acre heute ein Frohes Fest und ein paar besinnliche Tage sowie einen guten Rutsch ins neue Jahr.

für den Vorstand
Jenny Simon


text:
<?php

namespace Clue\React\Docker;

use React\SocketClient\ConnectorInterface;
use React\Stream\Stream;
use React\EventLoop\LoopInterface;
use React\Promise\Deferred;
use RuntimeException;

/**
 * dummy unix domain socket connector
 *
 * The path to connect to is set once during instantiation, the actual
 * target host is then ignored.
 *
 * Unix domain sockets use atomic operations, so we can as well emulate
 * async behavior.
 *
 * Use a small delay of 0.001s to avoid a race condition in the http library,
 * see https://github.com/clue/php-buzz-react/issues/19
 */
class UnixConnector implements ConnectorInterface
{
    private $loop;
    private $path;

    public function __construct(LoopInterface $loop, $path)
    {
        $this->loop = $loop;
        $this->path = $path;
    }

    public function create($host, $port)
    {
        $deferred = new Deferred();

        $path = $this->path;
        $loop = $this->loop;
        $this->loop->addTimer(0.001, function() use ($deferred, $path, $loop) {
            $resource = @stream_socket_client($this->path, $errno, $errstr, 1.0);

            if (!$resource) {
                $deferred->reject(new RuntimeException('Unable to connect to unix domain socket path: ' . $errstr, $errno));
            } else {
                $deferred->resolve(new Stream($resource, $this->loop));
            }
        });

        return $deferred->promise();
    }
}


text:
lumiere0b.ng-lite
====================

A light-weight library for dynamic DOM change

## Example

```html
<p><input type="text" data-model="a"></p>
<p>
  scope.a = <span data-bind="a"></span><br>
  scope.b = scope.a * 2 = <span data-bind="b"></span>
</p>

<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="dist/lumiere0b.ng-lite.min.js"></script>
<script>
(function ($) {
  var ngl;
  $(document).ready(function () {
    ngl = new ngLite();

    ngl.bootstrap();
    ngl.registerController(function (scope) {
      scope.b = isNaN(scope.a) ? '' : scope.a * 2;
    });

    ngl.digest();
  });
})(window.jQuery)
</script>
```


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
in Sharma, Arendholz & Thind, Mycotaxon 25(1): 124 (1986)

#### Original name
Hyaloscypha uncinata Arendh. & R. Sharma

### Remarks
null


text:
import React from 'react';
import styled from 'react-emotion';
import { Testimonial } from '@appbaseio/designkit';

const Wrapper = styled('div')`
	display: grid;
	grid-template-rows: repeat(6, 60px);
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	grid-gap: 30px;
	margin-top: ${props => (props.small ? 0 : '50px')};
`;

export default () => (
	<Wrapper>
		<Testimonial.Card row={6} background="#66A1FF" color="#fff">
			<Testimonial.Author>

Heitor Correa

CTO, Hariken

			</Testimonial.Author>

				Having appbase.io by our side has been like having a specialist inside the team. They are
				saving us at least 40 hours every month.

		</Testimonial.Card>

		<Testimonial.Card row={3}>
			<Testimonial.Author>

Charlie Wood

CTO, Numerous App

			</Testimonial.Author>

				Great customer support from @appbaseio, which we use for in-app search.

		</Testimonial.Card>

		<Testimonial.Card row={4} background="#893FF3" color="#fff">
			<Testimonial.Author>

Kishan Patel

CTO, Lyearn

			</Testimonial.Author>

				We use Reactivesearch for powering our search at Lyearn. It has saved us at least a month of
				work.

		</Testimonial.Card>

		<Testimonial.Card color="#fff" row={3} small background="#52D65B">

				The time savings have been off the charts in getting our search up and running!

			<Testimonial.Author>

Rob Whitley, Co-Founder, Salespipe

			</Testimonial.Author>
		</Testimonial.Card>

		<Testimonial.Card row={2}>
			<Testimonial.Author>

Patrick Hogan

CEO, Tenfold

			</Testimonial.Author>

				Appbase is fast, like Usain Bolt.

		</Testimonial.Card>
	</Wrapper>
);


text:
@protocol PASApplicationDetailSwitchCellDelegate <NSObject>

- (void)switchButtonStateChanged:(BOOL)state;

@end

@interface PASApplicationDetailSwitchCell : UITableViewCell

@property (nonatomic, weak) id<PASApplicationDetailSwitchCellDelegate> delegate;

+ (instancetype)cellCreatedWithTableView:(UITableView *)tableView;

@end