text:
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { Map } from 'immutable';
import { Image, View, ScrollView, StyleSheet, Modal, Text } from 'react-native';
import Accordion from 'react-native-collapsible/Accordion';
import { addActivity, deleteActivity } from '../state/UserState';
import { setText, setAudio } from '../state/HemmoState';
import { getImage, getSizeByWidth, getFontSize } from '../services/graphics';
import AppButton from '../components/AppButton';
import { showSaveModal } from '../state/SessionState';
import DoneButton from '../components/DoneButton';

const styles = StyleSheet.create({
  container: {
    flex: 1,
    height: null,
    width: null,
  },
  thumbModal: {
    flex: 1,
    flexDirection: 'column',
    backgroundColor: 'rgba(255,255,255,0.8)',
    justifyContent: 'center',
    alignItems: 'center',
  },
  mainActivity: {
    alignSelf: 'center',
    marginTop: getFontSize(2),
  },
  subActivityContainer: {
    flexDirection: 'row',
    flexWrap: 'wrap',
    justifyContent: 'center',
  },
  subActivity: {
    margin: getFontSize(1),
  },
  chosenThumb: {
    position: 'absolute',
    alignSelf: 'flex-start',
    right: 0,
  },
  titleRow: {},
  closeButton: {
    position: 'absolute',
    top: getFontSize(2),
    left: getFontSize(2),
  },
  subActivityThumbImage: {
    margin: getFontSize(3),
    alignSelf: 'center',
  },
  thumbRow: {
    flex: 1,
    flexDirection: 'row',
    justifyContent: 'center',
    alignItems: 'center',
  },
  thumbModalQuestion: {
    alignSelf: 'center',
    textAlign: 'center',
    fontFamily: 'ComicNeue-Bold',
    fontSize: getFontSize(2),
  },
  voteButton: {
    margin: getFontSize(1),
  },
  selectedThumbButton: {
    margin: getFontSize(1),
  },
  unselectedThumbButton: {
    margin: getFontSize(1),
    opacity: 0.5,
  },
  headerTitle: {
    alignSelf: 'center',
    fontSize: getFontSize(3),
  },
});

const activities = require('../data/activities.js');

const animationDuration = 300;

const thumbs = [
  { value: 1, imageName: 'thumb_up' },
  { value: 0, imageName: 'thumb_middle' },
  { value: -1, imageName: 'thumb_down' },
];

const mapStateToProps = state => ({
  chosenActivities: state.getIn([
    'user',
    'currentUser',
    'answers',
    'activities',
  ]),
});

const mapDispatchToProps = dispatch => ({
  addActivity: activity => dispatch(addActivity(activity)),
  deleteActivity: activity => dispatch(deleteActivity(activity)),
  setText: text => dispatch(setText(text)),
  setAudio: audio => dispatch(setAudio(audio)),
  showSaveModal: () => dispatch(showSaveModal()),
});

@connect(mapStateToProps, mapDispatchToProps)
export default class ActivityViewContainer extends Component {
  static navigationOptions = {
    title: 'Tekeminen',
    headerRight: <View />, // Needed for a centered title,
    headerTitleStyle: styles.headerTitle,
    headerStyle: { height: getFontSize(8) },
  };

  static propTypes = {
    addActivity: PropTypes.func.isRequired,
    deleteActivity: PropTypes.func.isRequired,
    setText: PropTypes.func.isRequired,
    setAudio: PropTypes.func.isRequired,
    chosenActivities: PropTypes.instanceOf(Map).isRequired,
    showSaveModal: PropTypes.func.isRequired,
  };

  state = {
    modalVisible: false,
    chosenMainActivity: Map(),
    chosenSubActivity: Map(),
  };

  getSubActivityHeight = () =>
    getSizeByWidth('leikkiminen', 0.5).height + 2 * 5;

  getMainActivityHeight = () => getSizeByWidth('puuhasimme', 1).height + 2 * 5;

  chooseMainActivity = async activity => {
    const margin = 5;

    setTimeout(
      () =>
        this.scrollView.scrollTo({
          y:
            activity.get('id') *
            (getSizeByWidth('puuhasimme', 1).height + 2 * margin),
        }),
      0,
    );

    if (this.state.chosenMainActivity.get('id') === activity.get('id')) {
      await this.props.setAudio('');

      this.setState({
        chosenMainActivity: Map(),
      });
    } else {
      this.setState({
        chosenMainActivity: activity,
      });

      await this.props.setAudio(activity.get('audio'));
    }
  };

  chooseSubActivity = async subActivity => {
    await this.props.setAudio(subActivity.get('audio'));
    this.setState({ chosenSubActivity: subActivity, modalVisible: true });
  };

  chooseThumb = async thumbValue => {
    if (this.isSelected(thumbValue)) {
      await this.props.deleteActivity({
        main: this.state.chosenMainActivity.get('name'),
        sub: this.state.chosenSubActivity.get('name'),
      });
    } else {
      await this.props.addActivity({
        main: this.state.chosenMainActivity.get('name'),
        sub: this.state.chosenSubActivity.get('name'),
        thumb: thumbValue,
      });

      setTimeout(this.closeModal, 1000);
    }
  };

  closeModal = () => {
    this.props.setText('');
    this.props.setAudio('');

    this.setState({
      modalVisible: false,
      chosenSubActivity: Map(),
    });
  };

  isSelected = thumbValue =>
    thumbValue ===
    this.props.chosenActivities.getIn([
      this.state.chosenMainActivity.get('name'),
      this.state.chosenSubActivity.get('name'),
    ]);

  renderThumbButton = (thumb, i) =>
    <View
      key={i}
      style={
        this.isSelected(thumb.value)
          ? styles.selectedThumbButton
          : styles.unselectedThumbButton
      }
    >
      <AppButton
        background={thumb.imageName}
        onPress={() => this.chooseThumb(thumb.value)}
        width={getSizeByWidth('thumb_up', 0.2).width}
        shadow={this.isSelected(thumb.value)}
      />
    </View>;

  renderThumbButtons = () =>
    thumbs.map((thumb, i) => this.renderThumbButton(thumb, i));

  renderCloseButton = () =>
    <View style={styles.closeButton}>
      <AppButton
        background="close_small"
        onPress={this.closeModal}
        width={getSizeByWidth('close_small', 0.12).width}
      />
    </View>;

  renderThumbButtonRow = () =>
    <View style={styles.thumbRow}>
      {this.renderThumbButtons()}
    </View>;

  renderThumbModal = () =>
    this.state.modalVisible
      ? <Modal
          animationType={'fade'}
          transparent
          visible={this.state.modalVisible}
          onRequestClose={this.closeModal}
          supportedOrientations={['portrait', 'landscape']}
        >
          <View style={styles.thumbModal}>
            <Image
              source={getImage('modal').normal}
              style={getSizeByWidth('modal', 0.9)}
            >
              <View style={styles.titleRow}>
                {this.renderCloseButton()}
                <Image
                  source={
                    getImage(this.state.chosenSubActivity.get('key')).normal
                  }
                  style={[
                    styles.subActivityThumbImage,
                    getSizeByWidth('leikkiminen', 0.35),
                  ]}
                />
              </View>
              <Text style={styles.thumbModalQuestion}>
                {this.state.chosenSubActivity.get('text')}
              </Text>
              {this.renderThumbButtonRow()}
            </Image>
          </View>
        </Modal>
      : null;

  renderChosenThumb = thumb =>
    thumb !== undefined
      ? <Image
          source={getImage(thumb.imageName).shadow}
          style={[styles.chosenThumb, getSizeByWidth(thumb.imageName, 0.18)]}
        />
      : null;

  renderSubActivity = (subActivity, index) => {
    const existingThumbValue = this.props.chosenActivities.getIn([
      this.state.chosenMainActivity.get('name'),
      subActivity.get('name'),
    ]);

    const thumb = thumbs.find(t => t.value === existingThumbValue);

    return (
      <View style={styles.subActivity} key={index}>
        <AppButton
          background={subActivity.get('key')}
          onPress={() => this.chooseSubActivity(subActivity)}
          width={getSizeByWidth('leipominen', 0.43).width}
          shadow
        >
          {this.renderChosenThumb(thumb)}
        </AppButton>
      </View>
    );
  };

  renderSubActivities = mainActivity =>
    <View style={styles.subActivityContainer}>
      {mainActivity
        .get('subActivities')
        .map((subActivity, index) =>
          this.renderSubActivity(subActivity, index),
        )}
    </View>;

  renderMainActivity = (mainActivity, index) =>
    <View style={styles.mainActivity} key={index}>
      <AppButton
        background={mainActivity.get('key')}
        onPress={() => this.chooseMainActivity(mainActivity)}
        width={getSizeByWidth('puuhasimme', 0.9).width}
        shadow
      />
    </View>;

  renderMainActivities = () =>
    <ScrollView
      /**
       * This is a hack which allows scrolling to positions currently outside of
       * the ScrollView. As soon as an activity is selected, expand the scrolling
       * view height to equal to the height of all visible activities and
       * subactivities.
       */
      contentContainerStyle={{
        minHeight: this.state.chosenMainActivity.isEmpty()
          ? null
          : activities.length * this.getMainActivityHeight() +
            Math.ceil(
              this.state.chosenMainActivity.get('subActivities').size /
                2 *
                this.getSubActivityHeight(),
            ),
        paddingBottom: getSizeByWidth('done_button', 1).height,
      }}
      ref={scrollView => {
        this.scrollView = scrollView;
      }}
    >
      <Accordion
        align="bottom"
        duration={animationDuration}
        sections={activities}
        activeSection={
          !this.state.chosenMainActivity.isEmpty()
            ? this.state.chosenMainActivity.get('id')
            : false
        }
        renderHeader={this.renderMainActivity}
        renderContent={this.renderSubActivities}
        underlayColor={'#fff'}
      />
    </ScrollView>;

  render() {
    return (
      <Image source={getImage('forest').normal} style={styles.container}>
        {this.renderMainActivities()}
        {this.renderThumbModal()}
        <DoneButton
          onPress={this.props.showSaveModal}
          disabled={this.props.chosenActivities.size === 0}
        />
      </Image>
    );
  }
}


text:
ConPaaS documentation
=====================

Contents:

.. toctree::
   :maxdepth: 2

   installation
   userguide
   manifest
   internals
   api

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

redpajama_set_name: RedPajamaGithub


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/monitoring/v3/group_service.proto

package com.google.monitoring.v3;

public interface ListGroupsResponseOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.monitoring.v3.ListGroupsResponse)
    com.google.protobuf.MessageOrBuilder {

  /**
   *
   *
   *

   * The groups that match the specified filters.
   *

   *
   * repeated .google.monitoring.v3.Group group = 1;
   */
  java.util.List<com.google.monitoring.v3.Group> getGroupList();
  /**
   *
   *
   *

   * The groups that match the specified filters.
   *

   *
   * repeated .google.monitoring.v3.Group group = 1;
   */
  com.google.monitoring.v3.Group getGroup(int index);
  /**
   *
   *
   *

   * The groups that match the specified filters.
   *

   *
   * repeated .google.monitoring.v3.Group group = 1;
   */
  int getGroupCount();
  /**
   *
   *
   *

   * The groups that match the specified filters.
   *

   *
   * repeated .google.monitoring.v3.Group group = 1;
   */
  java.util.List<? extends com.google.monitoring.v3.GroupOrBuilder> getGroupOrBuilderList();
  /**
   *
   *
   *

   * The groups that match the specified filters.
   *

   *
   * repeated .google.monitoring.v3.Group group = 1;
   */
  com.google.monitoring.v3.GroupOrBuilder getGroupOrBuilder(int index);

  /**
   *
   *
   *

   * If there are more results than have been returned, then this field is set
   * to a non-empty value.  To see the additional results,
   * use that value as `page_token` in the next call to this method.
   *

   *
   * string next_page_token = 2;
   *
   * @return The nextPageToken.
   */
  java.lang.String getNextPageToken();
  /**
   *
   *
   *

   * If there are more results than have been returned, then this field is set
   * to a non-empty value.  To see the additional results,
   * use that value as `page_token` in the next call to this method.
   *

   *
   * string next_page_token = 2;
   *
   * @return The bytes for nextPageToken.
   */
  com.google.protobuf.ByteString getNextPageTokenBytes();
}


text:
package com.google.api.ads.dfp.jaxws.v201508;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;

/**
 *
 *             Represents the actions that can be performed on product packages.
 *
 *
 *
Java class for ProductPackageAction complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="ProductPackageAction">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ProductPackageAction")
@XmlSeeAlso({
    UnarchiveProductPackages.class,
    ActivateProductPackages.class,
    ArchiveProductPackages.class,
    DeactivateProductPackages.class
})
public abstract class ProductPackageAction {

}


text:
Edit Clients

        <form class="form-horizontal" data-ng-submit="update()" novalidate>
            <fieldset>

                    Name

                        <input type="text" data-ng-model="clients.name" id="name" class="form-control" placeholder="Name" required>

                    Address
                        <input type="text" data-ng-model="clients.address" id="address" class="form-control" placeholder="address" required>

                    Location
                        <input type="text" data-ng-model="clients.location" id="location" class="form-control" placeholder="location" required>

                    <input type="submit" value="Update" class="btn btn-default">

            </fieldset>
        </form>


text:
package sg.yeefan.filedownloader;

/**
 * Interface for receiving progress information for a download.
 *
 * @author Tan Yee Fan
 */
public interface ProgressHandler {
	/**
	 * This method is called when a download is started. Implementations
	 * should return {@code true} to continue the download, or {@code false}
	 * to abort the download.
	 */
	public boolean start(FileDownloader downloader);

	/**
	 * This method is called to inform the handler the number of bytes that
	 * have been copied so far. Implementations should return {@code true}
	 * to continue the download, or {@code false} to abort the download.
	 */
	public boolean progress(FileDownloader downloader, long numBytesCopied);

	/**
	 * This method is called when a download is stopped, informing the
	 * handler whether the download has completed successfully or an error
	 * has occurred.
	 */
	public void stop(FileDownloader downloader, boolean complete);
}


text:
from setuptools import setup

install_requires = ['Django>=1.5']
try:
    from collections import OrderedDict
except ImportError:
    install_requires.append('ordereddict>=1.1')

setup(
    name='django-auth-policy',
    version='0.3',
    description='Enforces a couple of common authentication policies for the '
                'Django web framework.',
    author='Fox-IT B.V.',
    license='BSD',
    packages=['django_auth_policy'],
    install_requires=install_requires,
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Operating System :: OS Independent',
        'Programming Language :: Python',
        'Framework :: Django',
        'Topic :: Security',
        'Topic :: Internet :: WWW/HTTP :: Session',
        'Topic :: Software Development :: Libraries :: Python Modules'
    ],
)


text:
<?php

namespace App\Entity;

use App\Model\Infrastructure\EntityInterface;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Table(uniqueConstraints={
 *     @ORM\UniqueConstraint(name="User_Setting_User_U", columns={"user_id"})
 * })
 * @ORM\Entity
 */
class UserSetting implements EntityInterface
{
    /**
     * @var integer
     *
     * @ORM\Column(type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(type="string", length=2, nullable=false)
     */
    private $locale = 'en';

    /**
     * @var boolean
     *
     * @ORM\Column(type="boolean", nullable=false)
     */
    private $newsletter = '1';

    /**
     * @ORM\ManyToOne(targetEntity="App\Entity\User", inversedBy="userSettings", cascade={"persist"})
     * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
     */
    private $user;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set locale
     *
     * @param string $locale
     *
     * @return UserSetting
     */
    public function setLocale($locale)
    {
        $this->locale = $locale;

        return $this;
    }

    /**
     * Get locale
     *
     * @return string
     */
    public function getLocale()
    {
        return $this->locale;
    }

    /**
     * Set newsletter
     *
     * @param boolean $newsletter
     *
     * @return UserSetting
     */
    public function setNewsletter($newsletter)
    {
        $this->newsletter = $newsletter;

        return $this;
    }

    /**
     * Get newsletter
     *
     * @return boolean
     */
    public function getNewsletter()
    {
        return $this->newsletter;
    }

    public function getUser(): ?User
    {
        return $this->user;
    }

    public function setUser(?User $user): self
    {
        $this->user = $user;

        return $this;
    }
}


text:
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Mvc;
using DuckyData1._0._0Alpha.Models;

namespace DuckyData1._0._0Alpha.Controllers
{
    public class MusicFetchController : Controller
    {
        private ApplicationDbContext db = new ApplicationDbContext();
        private Manager m = new Manager();

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult Input()
        {
            var addForm = new fileInput();
            return View(addForm);
        }

        [HttpPost]
        public ActionResult Input(fileInput newItem)
        {
            if (ModelState.IsValid)
            {

                newItem.bytes = new byte[newItem.input.ContentLength];
                newItem.input.InputStream.Read(newItem.bytes, 0, newItem.input.ContentLength);
                //return RedirectToAction("ACRQuery", "MusicFetch", newItem);
                var result = m.RunQuery(newItem);
                var album = result.album;
                album = album.Substring(1, album.Length - 1);
                album = album.Replace("  ", " ");
                string tmp = string.Format("~/MusicFetch/Index?album={0}", album);
                if (tmp.Contains("acrid"))
                {
                    int indexOf = tmp.IndexOf(" acrid");
                    if (indexOf >= 0)
                    {
                        tmp = tmp.Remove(indexOf);
                    }
                }
                return Redirect(tmp);
            }
            return View();
        }

        public ActionResult _MediaInput()
        {
            var addForm = new fileInput();
            return PartialView(addForm);
        }

        [HttpPost]
        public ActionResult _MediaInput(fileInput newItem)
        {

            if (ModelState.IsValid)
            {

                newItem.bytes = new byte[newItem.input.ContentLength];
                newItem.input.InputStream.Read(newItem.bytes, 0, newItem.input.ContentLength);
                //return RedirectToAction("ACRQuery", "MusicFetch", newItem);
                var result = m.RunQuery(newItem);
                var album = result.album;
                album = album.Substring(1, album.Length - 1);
                album = album.Replace("  ", " ");
                string tmp = string.Format("~/MusicFetch/Index?album={0}", album);
                if (tmp.Contains("acrid"))
                {
                    int indexOf = tmp.IndexOf(" acrid");
                    if (indexOf >= 0)
                    {
                        tmp = tmp.Remove(indexOf);
                    }
                }
                return Redirect(tmp);
            }
            return View();

        }

        [Authorize]
        public ActionResult ACRQuery(fileInput input)
        {

            var result = m.RunQuery(input);
            //return RedirectToAction("Index", "MusicFetch", new { id = "?album=" + result.album });

            string url = string.Format("~/MusicFetch/Index?album={0}", result.album);
            return Redirect(url);
        }

        // GET: MusicFetch/Details/5
        public ActionResult Details(int? id)
        {
            if (id == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }
            MediaFile mediaFile = db.MediaFiles.Find(id);
            if (mediaFile == null)
            {
                return HttpNotFound();
            }
            return View(mediaFile);
        }

        // GET: MusicFetch/Create
        public ActionResult Create()
        {
            return View();
        }

        // POST: MusicFetch/Create
        // To protect from overposting attacks, please enable the specific properties you want to bind to, for
        // more details see http://go.microsoft.com/fwlink/?LinkId=317598.
        [HttpPost]
        [ValidateAntiForgeryToken]
        public ActionResult Create([Bind(Include = "Id,fileName,mediaType,fileData")] MediaFile mediaFile)
        {
            if (ModelState.IsValid)
            {
                db.MediaFiles.Add(mediaFile);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(mediaFile);
        }

        // GET: MusicFetch/Edit/5
        public ActionResult Edit(int? id)
        {
            if (id == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }
            MediaFile mediaFile = db.MediaFiles.Find(id);
            if (mediaFile == null)
            {
                return HttpNotFound();
            }
            return View(mediaFile);
        }

        // POST: MusicFetch/Edit/5
        // To protect from overposting attacks, please enable the specific properties you want to bind to, for
        // more details see http://go.microsoft.com/fwlink/?LinkId=317598.
        [HttpPost]
        [ValidateAntiForgeryToken]
        public ActionResult Edit([Bind(Include = "Id,fileName,mediaType,fileData")] MediaFile mediaFile)
        {
            if (ModelState.IsValid)
            {
                db.Entry(mediaFile).State = EntityState.Modified;
                db.SaveChanges();
                return RedirectToAction("Index");
            }
            return View(mediaFile);
        }

        // GET: MusicFetch/Delete/5
        public ActionResult Delete(int? id)
        {
            if (id == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }
            MediaFile mediaFile = db.MediaFiles.Find(id);
            if (mediaFile == null)
            {
                return HttpNotFound();
            }
            return View(mediaFile);
        }

        // POST: MusicFetch/Delete/5
        [HttpPost, ActionName("Delete")]
        [ValidateAntiForgeryToken]
        public ActionResult DeleteConfirmed(int id)
        {
            MediaFile mediaFile = db.MediaFiles.Find(id);
            db.MediaFiles.Remove(mediaFile);
            db.SaveChanges();
            return RedirectToAction("Index");
        }

        // GET: MusicFetch/Upload
        public ActionResult upload()
        {
            return View();
        }

        // GET: MusicFetch/Upload
        public ActionResult CallBack()
        {
            return View();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                db.Dispose();
            }
            base.Dispose(disposing);
        }
    }
}


text:
package com.zbiljic.nodez;

import javax.annotation.Nullable;

import static java.lang.String.format;

/**
 * Static convenience methods that help a method or constructor check whether it was invoked
 * correctly (whether its <i>preconditions</i> have been met).
 */
final class Preconditions {

  private Preconditions() { /* No instance methods */ }

  /**
   * Ensures the truth of an expression involving one or more parameters to the calling method.
   *
   * @param expression           a boolean expression
   * @param errorMessageTemplate a template for the exception message should the check fail. The
   *                             message is formed by replacing each {@code %s} placeholder in the
   *                             template with an argument. These are matched by position - the
   *                             first {@code %s} gets {@code errorMessageArgs[0]}, etc. Unmatched
   *                             arguments will be appended to the formatted message in square
   *                             braces. Unmatched placeholders will be left as-is.
   * @param errorMessageArgs     the arguments to be substituted into the message template.
   *                             Arguments are converted to strings using {@link
   *                             String#valueOf(Object)}.
   * @throws IllegalArgumentException if {@code expression} is false
   * @throws NullPointerException     if the check fails and either {@code errorMessageTemplate} or
   *                                  {@code errorMessageArgs} is null (don't let this happen)
   */
  public static void checkArgument(
    boolean expression,
    @Nullable String errorMessageTemplate,
    @Nullable Object... errorMessageArgs) {
    if (!expression) {
      throw new IllegalArgumentException(format(errorMessageTemplate, errorMessageArgs));
    }
  }

  /**
   * Ensures the truth of an expression involving the state of the calling instance, but not
   * involving any parameters to the calling method.
   *
   * @param expression a boolean expression
   * @throws IllegalStateException if {@code expression} is false
   */
  public static void checkState(boolean expression) {
    if (!expression) {
      throw new IllegalStateException();
    }
  }

  /**
   * Ensures that an object reference passed as a parameter to the calling method is not null.
   *
   * @param reference an object reference
   * @return the non-null reference that was validated
   * @throws NullPointerException if {@code reference} is null
   */
  public static <T> T checkNotNull(T reference) {
    if (reference == null) {
      throw new NullPointerException();
    }
    return reference;
  }

  /**
   * Ensures that an object reference passed as a parameter to the calling method is not null.
   *
   * @param reference    an object reference
   * @param errorMessage the exception message to use if the check fails; will be converted to a
   *                     string using {@link String#valueOf(Object)}
   * @return the non-null reference that was validated
   * @throws NullPointerException if {@code reference} is null
   */
  public static <T> T checkNotNull(T reference, @Nullable Object errorMessage) {
    if (reference == null) {
      throw new NullPointerException(String.valueOf(errorMessage));
    }
    return reference;
  }

}


text:
package cabf_br

import (
	"testing"

	"github.com/zmap/zlint/v3/lint"
	"github.com/zmap/zlint/v3/test"
)

func TestGivenNameCorrectPolicy(t *testing.T) {
	inputPath := "givenNameCorrectPolicy.pem"
	expected := lint.Pass
	out := test.TestLint("e_sub_cert_given_name_surname_contains_correct_policy", inputPath)
	if out.Status != expected {
		t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status)
	}
}

func TestSurnameCorrectPolicy(t *testing.T) {
	inputPath := "surnameCorrectPolicy.pem"
	expected := lint.Pass
	out := test.TestLint("e_sub_cert_given_name_surname_contains_correct_policy", inputPath)
	if out.Status != expected {
		t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status)
	}
}

func TestGivenNameIncorrectPolicy(t *testing.T) {
	inputPath := "givenNameIncorrectPolicy.pem"
	expected := lint.Error
	out := test.TestLint("e_sub_cert_given_name_surname_contains_correct_policy", inputPath)
	if out.Status != expected {
		t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status)
	}
}

func TestSurnameIncorrectPolicy(t *testing.T) {
	inputPath := "surnameIncorrectPolicy.pem"
	expected := lint.Error
	out := test.TestLint("e_sub_cert_given_name_surname_contains_correct_policy", inputPath)
	if out.Status != expected {
		t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status)
	}
}


text:
<?php

namespace Drupal\libraries\ExternalLibrary\Type;

use Drupal\libraries\ExternalLibrary\LibraryInterface;

/**
 * An interface for library types that want to react to library instantiation.
 */
interface LibraryLoadingListenerInterface {

  /**
   * Reacts to the instantiation of a library.
   *
   * @param \Drupal\libraries\ExternalLibrary\LibraryInterface $library
   *   The library that is being instantiated.
   */
  public function onLibraryLoad(LibraryInterface $library);

}


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

public class ChangeSprite : MonoBehaviour {
    // Use this for initialization
	public void ChangeIt(Sprite sp) {
        GameObject.Find("ThingYes").GetComponent<Image>().sprite = sp;
    }
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

        <title>

    Reflecting Database Objects
 —
    SQLAlchemy 0.9 Documentation

        </title>

                <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
                <link rel="stylesheet" href="../_static/changelog.css" type="text/css" />
                <link rel="stylesheet" href="../_static/sphinx_paramlinks.css" type="text/css" />
                <link rel="stylesheet" href="../_static/docs.css" type="text/css" />

    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
        <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="SQLAlchemy 0.9 Documentation" href="../index.html" />
        <link rel="up" title="Schema Definition Language" href="schema.html" />
        <link rel="next" title="Column Insert/Update Defaults" href="defaults.html" />
        <link rel="prev" title="Describing Databases with MetaData" href="metadata.html" />

        Release: 0.9.9 | Release Date: March 10, 2015

SQLAlchemy 0.9 Documentation

SQLAlchemy 0.9 Documentation

                Contents |
                Index

                <form class="search" action="../search.html" method="get">
                  <input type="text" name="q" size="12" /> <input type="submit" value="Search" />
                  <input type="hidden" name="check_keywords" value="yes" />
                  <input type="hidden" name="area" value="default" />
                </form>

            SQLAlchemy Core

SQL Expression Language Tutorial

SQL Statements and Expressions API

Schema Definition Language

Describing Databases with MetaData

Reflecting Database Objects¶

Overriding Reflected Columns

Reflecting Views

Reflecting All Tables at Once

Fine Grained Reflection with Inspector

Limitations of Reflection

Column Insert/Update Defaults

Defining Constraints and Indexes

Customizing DDL

Column and Data Types

Engine and Connection Use

Core API Basics

Reflecting Database Objects¶

A <tt class="xref py py-class docutils literal">Table</tt> object can be instructed to load
information about itself from the corresponding database schema object already
existing within the database. This process is called reflection. In the
most simple case you need only specify the table name, a <tt class="xref py py-class docutils literal">MetaData</tt>
object, and the <tt class="docutils literal">autoload=True</tt> flag. If the
<tt class="xref py py-class docutils literal">MetaData</tt> is not persistently bound, also add the
<tt class="docutils literal">autoload_with</tt> argument:

>>> messages = Table('messages', meta, autoload=True, autoload_with=engine)
>>> [c.name for c in messages.columns]
['message_id', 'message_name', 'date']

The above operation will use the given engine to query the database for
information about the <tt class="docutils literal">messages</tt> table, and will then generate
<tt class="xref py py-class docutils literal">Column</tt>, <tt class="xref py py-class docutils literal">ForeignKey</tt>,
and other objects corresponding to this information as though the
<tt class="xref py py-class docutils literal">Table</tt> object were hand-constructed in Python.

When tables are reflected, if a given table references another one via foreign
key, a second <tt class="xref py py-class docutils literal">Table</tt> object is created within the
<tt class="xref py py-class docutils literal">MetaData</tt> object representing the connection.
Below, assume the table <tt class="docutils literal">shopping_cart_items</tt> references a table named
<tt class="docutils literal">shopping_carts</tt>. Reflecting the <tt class="docutils literal">shopping_cart_items</tt> table has the
effect such that the <tt class="docutils literal">shopping_carts</tt> table will also be loaded:

>>> shopping_cart_items = Table('shopping_cart_items', meta, autoload=True, autoload_with=engine)
>>> 'shopping_carts' in meta.tables:
True

The <tt class="xref py py-class docutils literal">MetaData</tt> has an interesting “singleton-like”
behavior such that if you requested both tables individually,
<tt class="xref py py-class docutils literal">MetaData</tt> will ensure that exactly one
<tt class="xref py py-class docutils literal">Table</tt> object is created for each distinct table
name. The <tt class="xref py py-class docutils literal">Table</tt> constructor actually returns to
you the already-existing <tt class="xref py py-class docutils literal">Table</tt> object if one
already exists with the given name. Such as below, we can access the already
generated <tt class="docutils literal">shopping_carts</tt> table just by naming it:

shopping_carts = Table('shopping_carts', meta)

Of course, it’s a good idea to use <tt class="docutils literal">autoload=True</tt> with the above table
regardless. This is so that the table’s attributes will be loaded if they have
not been already. The autoload operation only occurs for the table if it
hasn’t already been loaded; once loaded, new calls to
<tt class="xref py py-class docutils literal">Table</tt> with the same name will not re-issue any
reflection queries.

Overriding Reflected Columns¶

Individual columns can be overridden with explicit values when reflecting
tables; this is handy for specifying custom datatypes, constraints such as
primary keys that may not be configured within the database, etc.:

>>> mytable = Table('mytable', meta,
... Column('id', Integer, primary_key=True),   # override reflected 'id' to have primary key
... Column('mydata', Unicode(50)),    # override reflected 'mydata' to be Unicode
... autoload=True)

Reflecting Views¶

The reflection system can also reflect views. Basic usage is the same as that
of a table:

my_view = Table("some_view", metadata, autoload=True)

Above, <tt class="docutils literal">my_view</tt> is a <tt class="xref py py-class docutils literal">Table</tt> object with
<tt class="xref py py-class docutils literal">Column</tt> objects representing the names and types of
each column within the view “some_view”.

Usually, it’s desired to have at least a primary key constraint when
reflecting a view, if not foreign keys as well. View reflection doesn’t
extrapolate these constraints.

Use the “override” technique for this, specifying explicitly those columns
which are part of the primary key or have foreign key constraints:

my_view = Table("some_view", metadata,
                Column("view_id", Integer, primary_key=True),
                Column("related_thing", Integer, ForeignKey("othertable.thing_id")),
                autoload=True
)

Reflecting All Tables at Once¶

The <tt class="xref py py-class docutils literal">MetaData</tt> object can also get a listing of
tables and reflect the full set. This is achieved by using the
<tt class="xref py py-func docutils literal">reflect()</tt> method. After calling it, all
located tables are present within the <tt class="xref py py-class docutils literal">MetaData</tt>
object’s dictionary of tables:

meta = MetaData()
meta.reflect(bind=someengine)
users_table = meta.tables['users']
addresses_table = meta.tables['addresses']

<tt class="docutils literal">metadata.reflect()</tt> also provides a handy way to clear or delete all the rows in a database:

meta = MetaData()
meta.reflect(bind=someengine)
for table in reversed(meta.sorted_tables):
    someengine.execute(table.delete())

Fine Grained Reflection with Inspector¶

A low level interface which provides a backend-agnostic system of loading
lists of schema, table, column, and constraint descriptions from a given
database is also available. This is known as the “Inspector”:

from sqlalchemy import create_engine
from sqlalchemy.engine import reflection
engine = create_engine('...')
insp = reflection.Inspector.from_engine(engine)
print insp.get_table_names()

class <tt class="descclassname">sqlalchemy.engine.reflection.</tt><tt class="descname">Inspector</tt><big>(</big>bind<big>)</big>¶

Performs database schema inspection.

The Inspector acts as a proxy to the reflection methods of the
<tt class="xref py py-class docutils literal">Dialect</tt>, providing a
consistent interface as well as caching support for previously
fetched metadata.

A <tt class="xref py py-class docutils literal">Inspector</tt> object is usually created via the
<tt class="xref py py-func docutils literal">inspect()</tt> function:

from sqlalchemy import inspect, create_engine
engine = create_engine('...')
insp = inspect(engine)

The inspection method above is equivalent to using the
<tt class="xref py py-meth docutils literal">Inspector.from_engine()</tt> method, i.e.:

engine = create_engine('...')
insp = Inspector.from_engine(engine)

Where above, the <tt class="xref py py-class docutils literal">Dialect</tt> may opt
to return an <tt class="xref py py-class docutils literal">Inspector</tt> subclass that provides additional
methods specific to the dialect’s target database.

<tt class="descname">__init__</tt><big>(</big>bind<big>)</big>¶

Initialize a new <tt class="xref py py-class docutils literal">Inspector</tt>.

<col class="field-name" />
<col class="field-body" />

Parameters:	bind¶ – a <tt class="xref py py-class docutils literal">Connectable</tt>,
which is typically an instance of
<tt class="xref py py-class docutils literal">Engine</tt> or
<tt class="xref py py-class docutils literal">Connection</tt>.

For a dialect-specific instance of <tt class="xref py py-class docutils literal">Inspector</tt>, see
<tt class="xref py py-meth docutils literal">Inspector.from_engine()</tt>

<tt class="descname">default_schema_name</tt>¶

Return the default schema name presented by the dialect
for the current engine’s database user.

E.g. this is typically <tt class="docutils literal">public</tt> for Postgresql and <tt class="docutils literal">dbo</tt>
for SQL Server.

classmethod <tt class="descname">from_engine</tt><big>(</big>bind<big>)</big>¶

Construct a new dialect-specific Inspector object from the given
engine or connection.

<col class="field-name" />
<col class="field-body" />

Parameters:	bind¶ – a <tt class="xref py py-class docutils literal">Connectable</tt>,
which is typically an instance of
<tt class="xref py py-class docutils literal">Engine</tt> or
<tt class="xref py py-class docutils literal">Connection</tt>.

This method differs from direct a direct constructor call of
<tt class="xref py py-class docutils literal">Inspector</tt> in that the
<tt class="xref py py-class docutils literal">Dialect</tt> is given a chance to
provide a dialect-specific <tt class="xref py py-class docutils literal">Inspector</tt> instance, which may
provide additional methods.

See the example at <tt class="xref py py-class docutils literal">Inspector</tt>.

<tt class="descname">get_columns</tt><big>(</big>table_name, schema=None, **kw<big>)</big>¶

Return information about columns in table_name.

Given a string table_name and an optional string schema, return
column information as a list of dicts with these keys:

name

the column’s name

type

<tt class="xref py py-class docutils literal">TypeEngine</tt>

nullable

boolean

default

the column’s default value

attrs

dict containing optional column attributes

<col class="field-name" />
<col class="field-body" />

Parameters:

table_name¶ – string name of the table.  For special quoting,
use <tt class="xref py py-class docutils literal">quoted_name</tt>.

schema¶ – string schema name; if omitted, uses the default schema
of the database connection.  For special quoting,
use <tt class="xref py py-class docutils literal">quoted_name</tt>.

<tt class="descname">get_foreign_keys</tt><big>(</big>table_name, schema=None, **kw<big>)</big>¶

Return information about foreign_keys in table_name.

Given a string table_name, and an optional string schema, return
foreign key information as a list of dicts with these keys:

constrained_columns

a list of column names that make up the foreign key

referred_schema

the name of the referred schema

referred_table

the name of the referred table

referred_columns

a list of column names in the referred table that correspond to
constrained_columns

name

optional name of the foreign key constraint.

<col class="field-name" />
<col class="field-body" />

Parameters:

table_name¶ – string name of the table.  For special quoting,
use <tt class="xref py py-class docutils literal">quoted_name</tt>.

schema¶ – string schema name; if omitted, uses the default schema
of the database connection.  For special quoting,
use <tt class="xref py py-class docutils literal">quoted_name</tt>.

<tt class="descname">get_indexes</tt><big>(</big>table_name, schema=None, **kw<big>)</big>¶

Return information about indexes in table_name.

Given a string table_name and an optional string schema, return
index information as a list of dicts with these keys:

name

the index’s name

column_names

list of column names in order

unique

boolean

<col class="field-name" />
<col class="field-body" />

Parameters:

table_name¶ – string name of the table.  For special quoting,
use <tt class="xref py py-class docutils literal">quoted_name</tt>.

schema¶ – string schema name; if omitted, uses the default schema
of the database connection.  For special quoting,
use <tt class="xref py py-class docutils literal">quoted_name</tt>.

<tt class="descname">get_pk_constraint</tt><big>(</big>table_name, schema=None, **kw<big>)</big>¶

Return information about primary key constraint on table_name.

Given a string table_name, and an optional string schema, return
primary key information as a dictionary with these keys:

constrained_columns

a list of column names that make up the primary key

name

optional name of the primary key constraint.

<col class="field-name" />
<col class="field-body" />

Parameters:

table_name¶ – string name of the table.  For special quoting,
use <tt class="xref py py-class docutils literal">quoted_name</tt>.

schema¶ – string schema name; if omitted, uses the default schema
of the database connection.  For special quoting,
use <tt class="xref py py-class docutils literal">quoted_name</tt>.

<tt class="descname">get_primary_keys</tt><big>(</big>table_name, schema=None, **kw<big>)</big>¶

Return information about primary keys in table_name.

Deprecated since version 0.7: Call to deprecated method get_primary_keys.  Use get_pk_constraint instead.

Given a string table_name, and an optional string schema, return
primary key information as a list of column names.

<tt class="descname">get_schema_names</tt><big>(</big><big>)</big>¶

Return all schema names.

<tt class="descname">get_table_names</tt><big>(</big>schema=None, order_by=None<big>)</big>¶

Return all table names in referred to within a particular schema.

The names are expected to be real tables only, not views.
Views are instead returned using the <tt class="xref py py-meth docutils literal">Inspector.get_view_names()</tt>
method.

<col class="field-name" />
<col class="field-body" />

Parameters:

schema¶ – Schema name. If <tt class="docutils literal">schema</tt> is left at <tt class="docutils literal">None</tt>, the
database’s default schema is
used, else the named schema is searched.  If the database does not
support named schemas, behavior is undefined if <tt class="docutils literal">schema</tt> is not
passed as <tt class="docutils literal">None</tt>.  For special quoting, use <tt class="xref py py-class docutils literal">quoted_name</tt>.

order_by¶ –
Optional, may be the string “foreign_key” to sort
the result on foreign key dependencies.

Changed in version 0.8: the “foreign_key” sorting sorts tables
in order of dependee to dependent; that is, in creation
order, rather than in drop order.  This is to maintain
consistency with similar features such as
<tt class="xref py py-attr docutils literal">MetaData.sorted_tables</tt> and <tt class="xref py py-func docutils literal">util.sort_tables()</tt>.

See also

<tt class="xref py py-attr docutils literal">MetaData.sorted_tables</tt>

<tt class="descname">get_table_options</tt><big>(</big>table_name, schema=None, **kw<big>)</big>¶

Return a dictionary of options specified when the table of the
given name was created.

This currently includes some options that apply to MySQL tables.

<col class="field-name" />
<col class="field-body" />

Parameters:

table_name¶ – string name of the table.  For special quoting,
use <tt class="xref py py-class docutils literal">quoted_name</tt>.

schema¶ – string schema name; if omitted, uses the default schema
of the database connection.  For special quoting,
use <tt class="xref py py-class docutils literal">quoted_name</tt>.

<tt class="descname">get_unique_constraints</tt><big>(</big>table_name, schema=None, **kw<big>)</big>¶

Return information about unique constraints in table_name.

Given a string table_name and an optional string schema, return
unique constraint information as a list of dicts with these keys:

name

the unique constraint’s name

column_names

list of column names in order

<col class="field-name" />
<col class="field-body" />

Parameters:

table_name¶ – string name of the table.  For special quoting,
use <tt class="xref py py-class docutils literal">quoted_name</tt>.

schema¶ – string schema name; if omitted, uses the default schema
of the database connection.  For special quoting,
use <tt class="xref py py-class docutils literal">quoted_name</tt>.

New in version 0.8.4.

<tt class="descname">get_view_definition</tt><big>(</big>view_name, schema=None<big>)</big>¶

Return definition for view_name.

<col class="field-name" />
<col class="field-body" />

Parameters:	schema¶ – Optional, retrieve names from a non-default schema.
For special quoting, use <tt class="xref py py-class docutils literal">quoted_name</tt>.

<tt class="descname">get_view_names</tt><big>(</big>schema=None<big>)</big>¶

Return all view names in schema.

<col class="field-name" />
<col class="field-body" />

Parameters:	schema¶ – Optional, retrieve names from a non-default schema.
For special quoting, use <tt class="xref py py-class docutils literal">quoted_name</tt>.

<tt class="descname">reflecttable</tt><big>(</big>table, include_columns, exclude_columns=()<big>)</big>¶

Given a Table object, load its internal constructs based on
introspection.

This is the underlying method used by most dialects to produce
table reflection.  Direct usage is like:

from sqlalchemy import create_engine, MetaData, Table
from sqlalchemy.engine import reflection

engine = create_engine('...')
meta = MetaData()
user_table = Table('user', meta)
insp = Inspector.from_engine(engine)
insp.reflecttable(user_table, None)

<col class="field-name" />
<col class="field-body" />

Parameters:

table¶ – a <tt class="xref py py-class docutils literal">Table</tt> instance.

include_columns¶ – a list of string column names to include
in the reflection process.  If <tt class="docutils literal">None</tt>, all columns are reflected.

Limitations of Reflection¶

It’s important to note that the reflection process recreates <tt class="xref py py-class docutils literal">Table</tt>
metadata using only information which is represented in the relational database.
This process by definition cannot restore aspects of a schema that aren’t
actually stored in the database.   State which is not available from reflection
includes but is not limited to:

Client side defaults, either Python functions or SQL expressions defined using
the <tt class="docutils literal">default</tt> keyword of <tt class="xref py py-class docutils literal">Column</tt> (note this is separate from <tt class="docutils literal">server_default</tt>,
which specifically is what’s available via reflection).

Column information, e.g. data that might have been placed into the
<tt class="xref py py-attr docutils literal">Column.info</tt> dictionary

The value of the <tt class="docutils literal">.quote</tt> setting for <tt class="xref py py-class docutils literal">Column</tt> or <tt class="xref py py-class docutils literal">Table</tt>

The association of a particular <tt class="xref py py-class docutils literal">Sequence</tt> with a given <tt class="xref py py-class docutils literal">Column</tt>

The relational database also in many cases reports on table metadata in a
different format than what was specified in SQLAlchemy.   The <tt class="xref py py-class docutils literal">Table</tt>
objects returned from reflection cannot be always relied upon to produce the identical
DDL as the original Python-defined <tt class="xref py py-class docutils literal">Table</tt> objects.   Areas where
this occurs includes server defaults, column-associated sequences and various
idosyncrasies regarding constraints and datatypes.   Server side defaults may
be returned with cast directives (typically Postgresql will include a <tt class="docutils literal">::<type></tt>
cast) or different quoting patterns than originally specified.

Another category of limitation includes schema structures for which reflection
is only partially or not yet defined.  Recent improvements to reflection allow
things like views, indexes and foreign key options to be reflected.  As of this
writing, structures like CHECK constraints, table comments, and triggers are
not reflected.

        Previous:
        Describing Databases with MetaData
        Next:
        Column Insert/Update Defaults

        © Copyright 2007-2015, the SQLAlchemy authors and contributors.
        Created using Sphinx 1.2.3.


text:
import Umzug from 'umzug';
import config from '../config';
import { sequelize } from '../models/';
import server from '../../api/api';

var umzug = new Umzug({
  // The logging function.
  // A function that gets executed everytime migrations start and have ended.
  logging: function(info) {
    // if we are in the test environment we want to disable logging
    if (config.environment !== 'test') {
      console.log(info);
    }
  },

  // The storage.
  // Possible values: 'json', 'sequelize', an object
  storage: 'sequelize',

  // The options for the storage.
  // Check the available storages for further details.
  storageOptions: {
    sequelize: sequelize
  },

  migrations: {
    // The params that gets passed to the migrations.
    // Might be an array or a synchronous function which returns an array.
    params: [sequelize.getQueryInterface(), sequelize.constructor],

    // The path to the migrations directory.
    path: './src/shared/migrations',

    // The pattern that determines whether or not a file is a migration.
    pattern: /\.js$/
  }
});

/**
 * executes all migrations
 */
export function up() {
  return umzug
    .executed()
    .then(function() {
      return umzug.pending();
    })
    .then(function(pendingMigrations) {
      if (pendingMigrations.length > 0) {
        return umzug.up();
      }
      server.log('info', 'All migrations set!');
    });
}

/**
 * Deletes all migrations. A clear database will be established
 */
export function dropMigration() {
  return umzug
    .executed()
    .then(function (migrations) {
      // "migrations" will be an Array of already executed migrations.
      if (migrations.length === 0) {
        server.log('info', 'Migration are already dropped!');
        return;
      }
      return umzug.down({ to: migrations[0] });
    });
}

/**
 * Drops all tables
 */
export function dropTables() {
  return sequelize.drop();
}


text:
package org.gradle.nativeplatform.toolchain.internal.msvcpp;

import org.gradle.api.Named;
import org.gradle.nativeplatform.platform.internal.ArchitectureInternal;
import org.gradle.nativeplatform.platform.internal.NativePlatformInternal;
import org.gradle.util.VersionNumber;

import java.io.File;

public class WindowsSdk implements Named {
    private static final String[] BINPATHS_X86 = {
        "bin/x86",
        "Bin"
    };
    private static final String[] BINPATHS_AMD64 = {
        "bin/x64"
    };
    private static final String[] BINPATHS_IA64 = {
        "bin/IA64"
    };
    private static final String[] BINPATHS_ARM = {
        "bin/arm"
    };
    private static final String LIBPATH_SDK8 = "Lib/win8/um/";
    private static final String LIBPATH_SDK81 = "Lib/winv6.3/um/";
    private static final String[] LIBPATHS_X86 = {
        LIBPATH_SDK81 + "x86",
        LIBPATH_SDK8 + "x86",
        "lib"
    };
    private static final String[] LIBPATHS_AMD64 = {
        LIBPATH_SDK81 + "x64",
        LIBPATH_SDK8 + "x64",
        "lib/x64"
    };
    private static final String[] LIBPATHS_IA64 = {
        "lib/IA64"
    };
    private static final String[] LIBPATHS_ARM = {
        LIBPATH_SDK81 + "arm",
        LIBPATH_SDK8 + "arm"
    };

    private final File baseDir;
    private final VersionNumber version;
    private final String name;

    public WindowsSdk(File baseDir, VersionNumber version, String name) {
        this.baseDir = baseDir;
        this.version = version;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public VersionNumber getVersion() {
        return version;
    }

    public File getResourceCompiler(NativePlatformInternal platform) {
        return new File(getBinDir(platform), "rc.exe");
    }

    public File getBinDir(NativePlatformInternal platform) {
        if (architecture(platform).isAmd64()) {
            return getAvailableFile(BINPATHS_AMD64);
        }
        if (architecture(platform).isIa64()) {
            return getAvailableFile(BINPATHS_IA64);
        }
        if (architecture(platform).isArm()) {
            return getAvailableFile(BINPATHS_ARM);
        }
        return getAvailableFile(BINPATHS_X86);
    }

    public File[] getIncludeDirs() {
        File[] includesSdk8 = new File[] {
            new File(baseDir, "Include/shared"),
            new File(baseDir, "Include/um")
        };
        for (File file : includesSdk8) {
            if (!file.isDirectory()) {
                return new File[] {
                    new File(baseDir, "Include")
                };
            }
        }
        return includesSdk8;
    }

    public File getLibDir(NativePlatformInternal platform) {
        if (architecture(platform).isAmd64()) {
            return getAvailableFile(LIBPATHS_AMD64);
        }
        if (architecture(platform).isIa64()) {
            return getAvailableFile(LIBPATHS_IA64);
        }
        if (architecture(platform).isArm()) {
            return getAvailableFile(LIBPATHS_ARM);
        }
        return getAvailableFile(LIBPATHS_X86);
    }

    private ArchitectureInternal architecture(NativePlatformInternal platform) {
        return platform.getArchitecture();
    }

    private File getAvailableFile(String... candidates) {
        for (String candidate : candidates) {
            File file = new File(baseDir, candidate);
            if (file.isDirectory()) {
                return file;
            }
        }

        return new File(baseDir, candidates[0]);
    }

}


text:
class AddPapersToAuthors < ActiveRecord::Migration
  def change

  end
end


text:
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<meta name="description" content="">
		<meta name="author" content="">

		<title>Shree Sai Samartha Enterprise - {title}</title>
		<script src="<?php echo base_url('assets/dist/backend.min.js'); ?>"></script>

		<?php
			// Grocery CRUD scripts
			if ( !empty($crud_data) )
			{
				foreach ($crud_data->css_files as $file)
					echo link_tag($file).PHP_EOL;

				foreach ($crud_data->js_files as $file)
					echo "<script src='$file'></script>".PHP_EOL;
			}
		?>

		<link href="<?php echo base_url('assets/dist/backend.min.css'); ?>" rel="stylesheet">

		<!--[if lt IE 9]>
			<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
			<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
		<![endif]-->
	</head>

	<body class="{theme}">


text:
require 'rails_admin/config/model'
require 'rails_admin/config/sections/list'
require 'rails_admin/config/sections/navigation'
require 'active_support/core_ext/class/attribute_accessors'

module RailsAdmin
  module Config
    # Stores model configuration objects in a hash identified by model's class
    # name.
    #
    # @see RailsAdmin::Config.model
    @@registry = {}

    # Configuration option to specify which models you want to exclude.
    @@excluded_models = []
    mattr_accessor :excluded_models

    # Configuration option to specify which method names will be searched for
    # to be used as a label for object records. This defaults to [:name, :title]
    mattr_accessor :label_methods
    self.label_methods = [:name, :title]

    # Shortcut to access the list section's class configuration
    # within a config DSL block
    #
    # @see RailsAdmin::Config::Sections::List
    def self.list
      RailsAdmin::Config::Sections::List
    end

    # Loads a model configuration instance from the registry or registers
    # a new one if one is yet to be added.
    #
    # First argument can be an instance of requested model, it's class object,
    # it's class name as a string or symbol or a RailsAdmin::AbstractModel
    # instance.
    #
    # If a block is given it is evaluated in the context of configuration instance.
    #
    # Returns given model's configuration
    #
    # @see RailsAdmin::Config.registry
    def self.model(entity, &block)
      key = begin
        if entity.kind_of?(RailsAdmin::AbstractModel)
          entity.model.name.to_sym
        elsif entity.kind_of?(Class)
          entity.name.to_sym
        elsif entity.kind_of?(String) || entity.kind_of?(Symbol)
          entity.to_sym
        else
          entity.class.name.to_sym
        end
      end
      config = @@registry[key] ||= RailsAdmin::Config::Model.new(entity)
      config.instance_eval(&block) if block
      config
    end

    # Returns all model configurations
    #
    # If a block is given it is evaluated in the context of configuration
    # instances.
    #
    # @see RailsAdmin::Config.registry
    def self.models(&block)
      RailsAdmin::AbstractModel.all.map{|m| model(m, &block)}
    end

    # Shortcut to access the navigation section's class configuration
    # within a config DSL block
    #
    # @see RailsAdmin::Config::Sections::Navigation
    def self.navigation
      RailsAdmin::Config::Sections::Navigation
    end

    # Reset a provided model's configuration. If omitted, reset all model
    # configurations.
    #
    # @see RailsAdmin::Config.registry
    def self.reset(model = nil)
      if model.kind_of?(Class) || model.kind_of?(String) || model.kind_of?(Symbol)
        key = model.kind_of?(Class) ? model.name.to_sym : model.to_sym
        @@registry.delete(key)
      else
        @@registry.clear
      end
    end
  end
end


text:
package com.babylove.www.spring.ioc.demo10;

/**
 * 模拟数据库驱动管理
 * @author zhangjiawei
 *
 */
public class MyDriverManager {

	private String username;

	private String password;

	private String url;

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Override
	public String toString() {
		return "MyDriverManager [username=" + username + ", password=" + password + ", url=" + url + "]";
	}
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>db_reverse_iterator</title>
    <link rel="stylesheet" href="apiReference.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="start" href="index.html" title="Berkeley DB C++ Standard Template Library API Reference" />
    <link rel="up" href="db_reverse_iterator.html" title="Chapter 20.  Db_reverse_iterator" />
    <link rel="prev" href="stldb_reverse_iteratoroperator_ge.html" title="operator>=" />
    <link rel="next" href="stldb_reverse_iteratoroperator_assign.html" title="operator=" />

          db_reverse_iterator

          Prev
          Chapter 20.
 Db_reverse_iterator
           Next

db_reverse_iterator

Function Details

db_reverse_iterator(const iterator &vi)

Constructor. Construct from an iterator of wrapped type.

db_reverse_iterator(const self &ritr)

Copy constructor.

db_reverse_iterator(const db_reverse_iterator< twin_itr_t,
    iterator > &ritr)

Copy constructor.

db_reverse_iterator()

Default constructor.

Class

  db_reverse_iterator

          Prev

            Up

           Next

          operator>=

            Home

           operator=


text:
// Template Source: Enum.java.tt
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All Rights Reserved.  Licensed under the MIT License.  See License in the project root for license information.
// ------------------------------------------------------------------------------

package com.microsoft.graph.models;

/**
 * The Enum Win32Lob App Return Code Type.
*/
public enum Win32LobAppReturnCodeType
{
    /**
    * failed
    */
    FAILED,
    /**
    * success
    */
    SUCCESS,
    /**
    * soft Reboot
    */
    SOFT_REBOOT,
    /**
    * hard Reboot
    */
    HARD_REBOOT,
    /**
    * retry
    */
    RETRY,
    /**
    * For Win32LobAppReturnCodeType values that were not expected from the service
    */
    UNEXPECTED_VALUE
}


text:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

	<meta http-equiv='Content-type' content='application/xhtml+xml; charset=utf-8' />
	<title>Core Build Process</title>
	<link rel="stylesheet" type="text/css" href="../pipeline.css"/>

Core Build Process

Linus Ericson, Markus Gylling, Romain Deltour

Latest update: 2007-12-21

A step-by-step guide on building the Pipeline core.

Note: In the following guide {DATE} is the date of the date of the release in YYYYMMDD format.

Make sure the project is updated to the latest svn version.

If you are making an official release (i.e. not just local for your own needs) Make sure to have run the entire suite in org.daisy.pipeline.test.TestDriver (using the main method of TestDriver) in the IDE.

If you are making an official release, modify the date in org/daisy/util/Version.java and org/daisy/pipeline/Version.java. Commit.

Make sure the build-core.xml is updated, i.e. the JARs defined in the <fileset> with id="fileset.utilJars" are correct.

Excluding a certain transformer:

make sure the transformer is not used by any scripts...

In build-core.xml, edit the <patternset> with id="patternset.transformers". Add an exclude line: <exclude name="int_daisy_validator/**/*.*"/>

If you are making an official build, make sure the UserAgreement.txt file lists the corrent libraries.

If you are making an official build, create a tag:

from the "SVN Repository Exploring" perspective, right click on trunk/dmfc and select "Branch/Tag..."

set the "To URL" to "https://daisymfc.svn.sourceforge.net/svnroot/daisymfc/tags/v{DATE}"

Or from the command line: svn copy https://daisymfc.svn.sourceforge.net/svnroot/daisymfc/trunk/dmfc https://daisymfc.svn.sourceforge.net/svnroot/daisymfc/tags/v{DATE} -m "Tagging the v{DATE} release."

Make sure the following is run on a clean pipeline checkout:

Run the "all" target in the build script. The generated files are:

dist/pipeline-${DATE}.zip

dist/pipeline-${DATE}-src.zip

dist/org.daisy.util-docs-${DATE}.zip

dist/org.daisy.pipeline-framework-docs-${DATE}.zip

dist/org.daisy.pipeline-transformers-docs-${DATE}.zip

Test the generated build!

Minimally, run a couple of scripts, preferably using both pipeline.bat and pipeline.sh.

If creating an official release, make sure to have run the entire suite in org.daisy.pipeline.test.TestDriver (using the main method of TestDriver).

make sure the javadoc looks OK

Upload to sf.net

Create a release named "pipeline-{ISO-DATE}" (where {ISO-DATE} is the release date in YYYY-MM-DD format) in the "pipeline" package and upload the generated zip files.

Make sure to update edit the download page (using the "Create/Edit Download Page" link) to point to pipeline-${DATE}.zip.

Change the download link on the Pipeline sourceforge website download section to http://downloads.sourceforge.net/daisymfc/pipeline-{DATE}.zip

Rebuild the documentation suite using org.daisy.pipeline.util.DocIndexGenerator to regenerate indices, and then upload the whole /doc directory on the Pipeline sourceforge website.

Note: make sure write acces is given to both user and group, if not run from the sf shell:

	$ cd /home/groups/d/da/daisymfc

	$ chgrp daisymfc . -R

	$ find . -type f -exec chmod 664 {} \;

	$ find . -type d -exec chmod 775 {} \;


text:
<!DOCTYPE html>
<html>
  <head>
    <title>Angular QuickStart</title>
    <base href="/">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="styles.css">
    <link rel="stylesheet" href="app/font-awesome-4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../node_modules/bootstrap/dist/css/bootstrap.css" />

    <!-- Polyfill(s) for older browsers -->
    <script src="../node_modules/core-js/client/shim.min.js"></script>

    <script src="../node_modules/zone.js/dist/zone.js"></script>
    <script src="../node_modules/systemjs/dist/system.src.js"></script>

    <script src="systemjs.config.js"></script>
    <script>
      System.import('main.js').catch(function(err){ console.error(err); });
    </script>
  </head>

  <body>
    <my-app>Loading AppComponent content here ...</my-app>
  </body>
</html>


text:
"""
SciPy: A scientific computing package for Python
================================================

Documentation is available in the docstrings and
online at http://docs.scipy.org.

Contents
--------
SciPy imports all the functions from the NumPy namespace, and in
addition provides:

Subpackages
-----------
Using any of these subpackages requires an explicit import.  For example,
``import scipy.cluster``.

::

 cluster                      --- Vector Quantization / Kmeans
 fftpack                      --- Discrete Fourier Transform algorithms
 integrate                    --- Integration routines
 interpolate                  --- Interpolation Tools
 io                           --- Data input and output
 lib                          --- Python wrappers to external libraries
 lib.lapack                   --- Wrappers to LAPACK library
 linalg                       --- Linear algebra routines
 misc                         --- Various utilities that don't have
                                  another home.
 ndimage                      --- n-dimensional image package
 odr                          --- Orthogonal Distance Regression
 optimize                     --- Optimization Tools
 signal                       --- Signal Processing Tools
 sparse                       --- Sparse Matrices
 sparse.linalg                --- Sparse Linear Algebra
 sparse.linalg.dsolve         --- Linear Solvers
 sparse.linalg.dsolve.umfpack --- :Interface to the UMFPACK library:
                                  Conjugate Gradient Method (LOBPCG)
 sparse.linalg.eigen.lobpcg   --- Locally Optimal Block Preconditioned
                                  Conjugate Gradient Method (LOBPCG) [*]
 special                      --- Airy Functions [*]
 lib.blas                     --- Wrappers to BLAS library [*]
 sparse.linalg.eigen          --- Sparse Eigenvalue Solvers [*]
 stats                        --- Statistical Functions [*]
 lib                          --- Python wrappers to external libraries
                                  [*]
 lib.lapack                   --- Wrappers to LAPACK library [*]
 integrate                    --- Integration routines [*]
 ndimage                      --- n-dimensional image package [*]
 linalg                       --- Linear algebra routines [*]
 spatial                      --- Spatial data structures and algorithms
 special                      --- Airy Functions
 stats                        --- Statistical Functions

Utility tools
-------------
::

 test              --- Run scipy unittests
 show_config       --- Show scipy build configuration
 show_numpy_config --- Show numpy build configuration
 __version__       --- Scipy version string
 __numpy_version__ --- Numpy version string

"""
from __future__ import division, print_function, absolute_import

__all__ = ['test']

from numpy import show_config as show_numpy_config
if show_numpy_config is None:
    raise ImportError("Cannot import scipy when running from numpy source directory.")
from numpy import __version__ as __numpy_version__

# Import numpy symbols to scipy name space
import numpy as _num
linalg = None
from numpy import *
from numpy.random import rand, randn
from numpy.fft import fft, ifft
from numpy.lib.scimath import *

__all__ += _num.__all__
__all__ += ['randn', 'rand', 'fft', 'ifft']

del _num
# Remove the linalg imported from numpy so that the scipy.linalg package can be
# imported.
del linalg
__all__.remove('linalg')

# We first need to detect if we're being called as part of the scipy
# setup procedure itself in a reliable manner.
try:
    __SCIPY_SETUP__
except NameError:
    __SCIPY_SETUP__ = False

if __SCIPY_SETUP__:
    import sys as _sys
    _sys.stderr.write('Running from scipy source directory.\n')
    del _sys
else:
    try:
        from scipy.__config__ import show as show_config
    except ImportError:
        msg = """Error importing scipy: you cannot import scipy while
        being in scipy source directory; please exit the scipy source
        tree first, and relaunch your python intepreter."""
        raise ImportError(msg)

    from scipy.version import version as __version__
    from scipy.lib._version import NumpyVersion as _NumpyVersion
    if _NumpyVersion(__numpy_version__) < '1.6.2':
        import warnings
        warnings.warn("Numpy 1.6.2 or above is recommended for this version of "
                      "scipy (detected version %s)" % __numpy_version__,
                      UserWarning)

    del _NumpyVersion

    from numpy.testing import Tester
    test = Tester().test
    bench = Tester().bench


text:
set -evx

mkdir -p model
cd model
wget http://data.mxnet.io/models/imagenet-11k/resnet-152/resnet-152-symbol.json
wget http://data.mxnet.io/models/imagenet-11k/resnet-152/resnet-152-0000.params
wget http://data.mxnet.io/models/imagenet-11k/synset.txt
cd ..


text:
* Backported `stateSerializer` prop in `TanokInReact`
* Fixed `@tanokComponent` passing wrong subName to `StreamWrapper.subWithMeta`

## 2.0.5
* Fixed force updating of `TanokInReact` on state change

## 2.0.4
* Fixed compatability in v1/v2 `tanok` versions in `TanokInReact` component

## 2.0.3
* Reexport `StreamWrapper` from entry point (mostly for creating mocks for propType checker in tests)

## 2.0.2
* Made `tanok` v2 tanok compatible with v1 model and dispatcher

## 2.0.0
* *BREAKING* Changed signatures for middlwares, so now they may receive `streamWrapper` #28
* *BREAKING* Changed signature for `makeStreamState`, passing only `streamWrapper` instead of `eventStream` #30
* *BREAKING* Removed `TanokComponent` prop `eventStream` as alternative name to `tanokStream` #37
* *BREAKING* Removed deprecated `TanokComponent.subStream` #37
* Introducing `connect`, stores and all this redux madness #34
* Moved docs to http://tanok.js.org/ #31 #32
* Added check for test coverage #29
* Reorganized examples #33

## 1.3.0
* Added shutdown behavior to `streamWrapper` that allows graceful shutdown of app #26

## 1.2.3
* Fixed corrupting initial state type in TanokInReact

## 1.2.2
* Check for return value of effect, `flatMap` it only if it's Promise or Observable.
* Fixes to `TanokInReact` HOC

## 1.2.1
* Removed `effectBus` as it is actually not needed
* Fixed name collision in `on` decorator

## 1.2.0

* All effects are passed through one effects bus, this allows effect cancelation
* Fixed `TanokDispatcher` inheritance bug, which caused multiple call of `init`
* `tanok` function now also returns `streamWrapper` and `shutdown` function, that allows graceful shutdown of your tanok instance
* Extracted `makeStreamState` and `streamWithEffects` out of `tanok` function.
* Added new React HOC `TanokInReact` which allows to run complete tanok app inside simple React component
* Dropped `create-react-class` package in favor of React.Component class-based Root
* Using `es2015-loose` preset for building tanok

## 1.1.0

* Create less files in rollup build, as most of them are never used as separate things
* Renamed `effectWrapper` to `childFx`
* Grouped all built-in effects in `fxs.js`
* Moved `TanokDispatcher` base class out of `core.js` module

## 1.0

### Breaking
*  Field `StreamWrapper.parent` was renamed to `StreamWrapper.streamName` in  and in messages that `StreamWrapper.send` pushes to stream
* Removed `meta` parameter from `StreamWrapper.send`, now it is passed to `TanokComponent.sub(name, metadata)`
* Signature for `effectWrapper` is also changed and now can get metadata to pass it to dispatcher

### Other
* Updated rollup version for building
* Changed react peerDependency to `*`


text:
// This code is part of the Fungus library (http://fungusgames.com) maintained by Chris Gregan (http://twitter.com/gofungus).
// It is released for free under the MIT open source license (https://github.com/snozbot/fungus/blob/master/LICENSE)

#if UNITY_5_3_OR_NEWER

using UnityEngine;
using System.Collections.Generic;
using UnityEngine.SceneManagement;

namespace Fungus
{
    /// <summary>
    /// The Save History is a list of previously created Save Points, sorted chronologically.
    /// </summary>
    [System.Serializable]
    public class SaveHistory
    {
        /// <summary>
        /// Version number of current save data format.
        /// </summary>
        protected const int SaveDataVersion = 1;

        [SerializeField] protected int version = SaveDataVersion;

        [SerializeField] protected List<string> savePoints = new List<string>();

        [SerializeField] protected List<string> rewoundSavePoints = new List<string>();

        #region Public methods

        /// <summary>
        /// Returns the number of Save Points in the Save History.
        /// </summary>
        public int NumSavePoints { get { return savePoints.Count; } }

        /// <summary>
        /// Returns the current number of rewound Save Points in the Save History.
        /// </summary>
        public int NumRewoundSavePoints { get { return rewoundSavePoints.Count; } }

        /// <summary>
        /// Creates a new Save Point using a key and description, and adds it to the Save History.
        /// </summary>
        public void AddSavePoint(string savePointKey, string savePointDescription)
        {
            // Creating a new Save Point invalidates all rewound Save Points, so delete them.
            ClearRewoundSavePoints();

            string sceneName = SceneManager.GetActiveScene().name;
            var savePointData = SavePointData.Encode(savePointKey, savePointDescription, sceneName);
            savePoints.Add(savePointData);
        }

        /// <summary>
        /// Rewinds to the previous Save Point in the Save History.
        /// The latest Save Point is moved to a seperate list of rewound save points.
        /// </summary>
        public void Rewind()
        {
            if (savePoints.Count > 0)
            {
                rewoundSavePoints.Add(savePoints[savePoints.Count - 1]);
                savePoints.RemoveAt(savePoints.Count - 1);
            }
        }

        /// <summary>
        /// Fast forwards to the next Save Point in the Save History.
        /// The most recently rewound Save Point is moved back to the main list of save points.
        /// </summary>
        public void FastForward()
        {
            if (rewoundSavePoints.Count > 0)
            {
                savePoints.Add(rewoundSavePoints[rewoundSavePoints.Count - 1]);
                rewoundSavePoints.RemoveAt(rewoundSavePoints.Count - 1);
            }
        }

        /// <summary>
        /// Loads the latest Save Point.
        /// </summary>
        public void LoadLatestSavePoint()
        {
            if (savePoints.Count > 0)
            {
                var savePointData = savePoints[savePoints.Count - 1];
                SavePointData.Decode(savePointData);
            }
        }

        /// <summary>
        /// Clears all Save Points.
        /// </summary>
        public void Clear()
        {
            savePoints.Clear();
            rewoundSavePoints.Clear();
        }

        /// <summary>
        /// Clears rewound Save Points only. The main Save Point list is not changed.
        /// </summary>
        public void ClearRewoundSavePoints()
        {
            rewoundSavePoints.Clear();
        }

        public virtual string GetDebugInfo()
        {
            string debugInfo = "Save points:\n";

            foreach (var savePoint in savePoints)
            {
                debugInfo += savePoint.Substring(0, savePoint.IndexOf(',')).Replace("\n", "").Replace("{", "").Replace("}","") + "\n";
            }

            debugInfo += "Rewound points:\n";

            foreach (var savePoint in rewoundSavePoints)
            {
                debugInfo += savePoint.Substring(0, savePoint.IndexOf(',')).Replace("\n", "").Replace("{", "").Replace("}","") + "\n";
            }

            return debugInfo;
        }

        #endregion
    }
}

#endif


text:
package com.redhat.gps.brms.util;

import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.ResourceConfiguration;
import org.drools.builder.ResourceType;
import org.drools.io.Resource;

/**
 * Utility class for JBoss BRMS {@link KnowledgeBuilder KnowledgeBuilders}. Created to synchronize all 'add' methods to the
 * {@link KnowlegdeBuilder} as a workaround for: https://issues.jboss.org/browse/JBRULES-3283
 *
 *
 * @author Duncan Doyle
 */
@Deprecated
public class KnowledgeBuilderUtil {

	/**
	 * Synchronizes the call to {@link KnowlegdeBuilder#add} as a workaround for: https://issues.jboss.org/browse/JBRULES-3283
	 *
	 * @param kbuilder
	 *            the {@link KnowledgeBuilder} to which to add the resource.
	 * @param resource
	 *            the {@link Resource} to add.
	 * @param resourceType
	 *            {@link the ResourceType} of the resource to add.
	 */
	public static synchronized void add(KnowledgeBuilder kbuilder, Resource resource, ResourceType resourceType) {
		kbuilder.add(resource, resourceType);
	}

	/**
	 * Synchronizes the call to {@link KnowlegdeBuilder#add} as a workaround for: https://issues.jboss.org/browse/JBRULES-3283
	 *
	 * @param kbuilder
	 *            the {@link KnowledgeBuilder} to which to add the resource.
	 * @param resource
	 *            the {@link Resource} to add.
	 * @param resourceType
	 *            {@link the ResourceType} of the resource to add.
	 * @param resourceConfiguration
	 *            the {@link ResourceConfiguration} to add.
	 */
	public static synchronized void add(KnowledgeBuilder kbuilder, Resource resource, ResourceType resourceType,
			ResourceConfiguration resourceConfiguration) {
		kbuilder.add(resource, resourceType, resourceConfiguration);
	}

}


text:
RSpec.describe MiqProvisionConfiguredSystemRequest do
  let(:admin)             { FactoryBot.create(:user) }
  let(:configured_system) { FactoryBot.create(:configured_system, :manager => FactoryBot.create(:ext_management_system), :hostname => "foo") }
  let(:request)           { FactoryBot.create(:miq_provision_configured_system_request, :requester => admin, :options => {:src_configured_system_ids => [configured_system.id]}) }
  let(:vm_amazon)         { FactoryBot.create(:vm_amazon) }

  before { @zone1 = EvmSpecHelper.local_miq_server.zone }

  it("#my_role should be 'ems_operations'") { expect(request.my_role).to eq('ems_operations') }
  it("#originating_controller should be 'configured_system'") { expect(request.originating_controller).to eq('configured_system') }
  it("#src_configured_systems from options hash src_ids") { expect(request.src_configured_systems.first).to eq(configured_system) }
  it("#requested_task_idx from options hash src_configured_system_ids") { expect(request.requested_task_idx.first).to eq(configured_system.id) }

  context ".request_task_class_from" do
    it "retrieves the provision task class" do
      expect(described_class.request_task_class_from('options' => {:src_vm_id => vm_amazon.id})).to eq ManageIQ::Providers::Foreman::ConfigurationManager::ProvisionTask
    end
  end

  describe '.new_request_task' do
    it 'returns subclassed task' do
      expect(ManageIQ::Providers::Foreman::ConfigurationManager::ProvisionTask).to receive(:new).with({:request_type =>'ATTRS'})
      described_class.new_request_task(:request_type =>'ATTRS')
    end
  end

  context "#event_name" do
    it "configured_system_provision_request_mode" do
      expect(request.event_name("mode")).to eq("configured_system_provision_request_mode")
    end
  end

  context "#host_name" do
    it "single host" do
      expect(request.host_name).to eq("foo")
    end

    it "multiple hosts" do
      request.update(:options => {:src_configured_system_ids => [1, 2, 3]})

      expect(request.host_name).to eq("Multiple Hosts")
    end
  end

  context '#my_zone' do
    it "with valid source should have the VM's zone, not the requests zone" do
      expect(request.my_zone).to     eq(configured_system.my_zone)
      expect(request.my_zone).not_to eq(@zone1.name)
    end
  end

  context "#my_queue_name" do
    it "with valid source should have the system's queue_name_for_ems_operations" do
      expect(request.my_queue_name).to eq(configured_system.queue_name_for_ems_operations)
    end

    it "with no source should be nil" do
      request.update(:options => {:src_configured_system_ids => []})

      expect(request.my_queue_name).to be_nil
    end
  end
end


text:
<?php

namespace ZendTest\Code\Generator\DocBlock\Tag;

use Zend\Code\Generator\DocBlock\Tag\ReturnTag;

/**
 *
 * @group Zend_Code_Generator
 * @group Zend_Code_Generator_Php
 */
class ReturnTagTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var ReturnTag
     */
    protected $tag;

    public function setUp()
    {
        $this->tag = new ReturnTag();
    }

    public function tearDown()
    {
        $this->tag = null;
    }

    public function testDatatypeGetterAndSetterPersistValue()
    {
        $this->tag->setDatatype('Foo');
        $this->assertEquals('Foo', $this->tag->getDatatype());
    }

    public function testReturnProducesCorrectDocBlockLine()
    {
        $this->tag->setDatatype('string');
        $this->tag->setDescription('bar bar bar');
        $this->assertEquals('@return string bar bar bar', $this->tag->generate());
    }

    public function testConstructorWithOptions()
    {
        $this->tag->setOptions(array(
            'datatype' => 'string|null',
        ));
        $tagWithOptionsFromConstructor = new ReturnTag(array(
            'datatype' => 'string|null',
        ));
        $this->assertEquals($this->tag->generate(), $tagWithOptionsFromConstructor->generate());
    }
}


text:
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using MyGeneration;

namespace SampleUIPlugin
{
    public class SampleSimplePluginManager : ISimplePluginManager
    {
        public string Name
        {
            get { return "Sample Simple Plugin"; }
        }

        public string Description
        {
            get { return "This is a sample simple plugin. It basically shows how to add a simple plugin into MyGeneration. - komma8.komma1"; }
        }

        public Uri AuthorUri
        {
            get
            {
                return new Uri("http://sourceforge.net/projects/mygeneration/");
            }
        }

        public bool AddToolbarIcon
        {
            get
            {
                return true;
            }
        }

        public Image MenuImage
        {
            get { return Properties.Resources.puter; }
        }

        public void Execute(IMyGenerationMDI mdi, params string[] args)
        {
            SampleDialogContent sdc = new SampleDialogContent(mdi);
            DialogResult result = sdc.ShowDialog(mdi.DockPanel.Parent.FindForm());
        }
    }
}


text:
[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Build Status](https://travis-ci.org/czim/laravel-cms-models.svg?branch=master)](https://travis-ci.org/czim/laravel-cms-models)
[![Coverage Status](https://coveralls.io/repos/github/czim/laravel-cms-models/badge.svg?branch=master)](https://coveralls.io/github/czim/laravel-cms-models?branch=master)

# CMS for Laravel - Main Models Module

This module offers the means to edit Eloquent models through the Laravel CMS.

Features:

- Model listings
- Edit forms for creating and updating model records
- Elaborate (optional) module configuration and customization.
    - Customizable listing columns, scopes, filters, sorting, etc.
    - Customizable edit form html, fields, validation rules, create vs. edit forms, etc.
    - Customizable model references, display labels, etc.
- Support for Translatable models
- Support for Listify'd models, with drag/drop reordering
- Support for nested child-parent listings and breadcrumb trails

To be used to with the [Laravel CMS Core](https://github.com/czim/laravel-cms-core).

For a better end-user experience when using file uploads, installing the [Laravel CMS Upload Module](https://github.com/czim/laravel-cms-upload-module) is recommended.

## Version Compatibility

 Laravel             | Package
:--------------------|:--------
 5.3                 | 1.3
 5.4                 | 1.4
 5.5                 | 1.5
 5.6                 | 1.6
 5.7                 | 1.7

## Changelog

[View the changelog](CHANGELOG.md).

## Installation

Add the module class to your `cms-modules.php` configuration file:

``` php
    'modules' => [
        // ...
        Czim\CmsModels\Modules\ModelModuleGenerator::class,
    ],
```

Add the service provider to your `cms-modules.php` configuration file:

``` php
    'providers' => [
        // ...
        Czim\CmsModels\Providers\CmsModelsServiceProvider::class,
        // ...
    ],
```

To publish the config:

``` bash
php artisan vendor:publish
```

## Configuration

Models may be added with basic functionality by simply registering them in the `cms-models` config, or special CMS model configuration files may be created for them to customize them as needed.

### Adding and Configuring Models

To register models with the CMS module, you can either:

- Add their full class name to the `cms-models.models` config array:

    ```php
    <?php
          'models' => [
              App\Models\YourModel::class,
          ],
    ```

- Create a model configuration file for them in the configured directory.
    By default, this is in the `app/Cms/Models/` directory;
    this is defined under the `cms-models.collector.source.dir` key.

For more details about customizing how models are configured, see [the documentation on Model Configuration](documentation/ModelConfiguration.md).

## Troubleshooting

If you run into problems, please consult the [CMS core troubleshooting section](https://github.com/czim/laravel-cms-core/blob/master/documentation/Troubleshooting.md).

## Further information

- [General information](documentation/General.md) about the CMS
- [Model Configuration](documentation/ModelConfiguration.md)
- [Strategies](documentation/Strategies.md) for all kinds of CMS setup and interaction

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Credits

- [All Contributors][link-contributors]

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[ico-version]: https://img.shields.io/packagist/v/czim/laravel-cms-models.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-downloads]: https://img.shields.io/packagist/dt/czim/laravel-cms-models.svg?style=flat-square

[link-packagist]: https://packagist.org/packages/czim/laravel-cms-models
[link-downloads]: https://packagist.org/packages/czim/laravel-cms-models
[link-author]: https://github.com/czim
[link-contributors]: ../../contributors