text:
package org.apache.roller.webservices.xmlrpc;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.StringBufferInputStream;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.xmlrpc.XmlRpcServer;

/**
 * Roller's XML RPC Servlet sets up XmlRpcHandler for Blogger & MetaWeblog API.
 *
 * @web.servlet name="RollerXMLRPCServlet"
 * @web.servlet-mapping url-pattern="/roller-services/xmlrpc"
 */
public class RollerXMLRPCServlet extends HttpServlet {

    static final long serialVersionUID = -4424719615968330852L;

    private static Log mLogger = LogFactory.getLog(RollerXMLRPCServlet.class);

    private transient XmlRpcServer mXmlRpcServer = new XmlRpcServer();
    private BloggerAPIHandler mBloggerHandler = null;
    private MetaWeblogAPIHandler mMetaWeblogHandler = null;

    /**
     * Initializes the servlet.
     */
    public void init(ServletConfig config) throws ServletException {

        super.init(config);
        try {
            mBloggerHandler = new BloggerAPIHandler();
            mXmlRpcServer.addHandler("blogger", mBloggerHandler);

            mMetaWeblogHandler = new MetaWeblogAPIHandler();
            mXmlRpcServer.addHandler("metaWeblog", mMetaWeblogHandler);
        } catch (Exception e) {
            mLogger.error("Initialization of XML-RPC servlet failed", e);
        }
    }

    protected void service(HttpServletRequest request,
            HttpServletResponse response)
            throws ServletException, IOException {

        InputStream is = request.getInputStream();

        if (mLogger.isDebugEnabled()) {
            BufferedReader br = new BufferedReader(new InputStreamReader(is));
            String line = null;
            StringBuffer sb = new StringBuffer();
            while ((line = br.readLine()) != null) {
                sb.append(line);
                sb.append("\n");
            }
            mLogger.debug(sb.toString());
            is = new StringBufferInputStream(sb.toString());
        }

        // execute XML-RPC request
        byte[] result = mXmlRpcServer.execute(is);

        if (mLogger.isDebugEnabled()) {
            String output = new String(result);
            mLogger.debug(output);
        }

        response.setContentType("text/xml");
        response.setContentLength(result.length);
        OutputStream output = response.getOutputStream();
        output.write(result);
        output.flush();
    }

}


text:
"use strict"

const isStandardSyntaxSelector = require("../../utils/isStandardSyntaxSelector")
const matchesStringOrRegExp = require("../../utils/matchesStringOrRegExp")
const parseSelector = require("../../utils/parseSelector")
const report = require("../../utils/report")
const ruleMessages = require("../../utils/ruleMessages")
const validateOptions = require("../../utils/validateOptions")
const _ = require("lodash")
const postcss = require("postcss")

const ruleName = "selector-pseudo-class-whitelist"

const messages = ruleMessages(ruleName, {
  rejected: selector => `Unexpected pseudo-class "${selector}"`,
})

const rule = function (whitelist) {
  return (root, result) => {
    const validOptions = validateOptions(result, ruleName, {
      actual: whitelist,
      possible: [_.isString],
    })
    if (!validOptions) {
      return
    }

    root.walkRules(rule => {
      const selector = rule.selector

      if (!isStandardSyntaxSelector(selector)) {
        return
      }
      if (selector.indexOf(":") === -1) {
        return
      }

      parseSelector(selector, result, rule, selectorTree => {
        selectorTree.walkPseudos(pseudoNode => {
          const value = pseudoNode.value

          // Ignore pseudo-elements

          if (value.slice(0, 2) === "::") {
            return
          }

          const name = value.slice(1)

          if (matchesStringOrRegExp(postcss.vendor.unprefixed(name).toLowerCase(), whitelist)) {
            return
          }

          report({
            index: pseudoNode.sourceIndex,
            message: messages.rejected(name),
            node: rule,
            result,
            ruleName,
          })
        })
      })
    })
  }
}

rule.primaryOptionArray = true

rule.ruleName = ruleName
rule.messages = messages
module.exports = rule

redpajama_set_name: RedPajamaGithub


text:
<!doctype html>

    <meta charset="UTF-8">
    <title><%= bowerComponentName%></title>

Yo <%= bowerComponentName%> !


text:
package org.hibernate.shards.strategy.selection;

import java.io.Serializable;

/**
 * @author maxr@google.com (Max Ross)
 */
public class ShardResolutionStrategyDataImpl implements ShardResolutionStrategyData {
  private final String entityName;
  private final Serializable id;

  public ShardResolutionStrategyDataImpl(Class<?> clazz, Serializable id) {
    this(clazz.getName(), id);
  }

  public ShardResolutionStrategyDataImpl(String entityName, Serializable id) {
    this.entityName = entityName;
    this.id = id;
  }

  public String getEntityName() {
    return entityName;
  }

  public Serializable getId() {
    return id;
  }

}


text:
const MAX_DECIMAL_PLACES = 3;

// test() is part of Jest's serializer API
export function test(maybeNumber) {
  return (
    typeof maybeNumber === 'number' &&
    Number.isFinite(maybeNumber) &&
    !Number.isInteger(maybeNumber) &&
    !Number.isNaN(maybeNumber)
  );
}

// print() is part of Jest's serializer API
export function print(number, serialize, indent) {
  const string = number.toString();
  const pieces = string.split('.');
  if (pieces.length === 2) {
    if (pieces[1].length > MAX_DECIMAL_PLACES) {
      return number.toFixed(MAX_DECIMAL_PLACES);
    }
  }

  return string;
}


text:
/**
 * 评论相关的控制逻辑
 * @author heroic
 */

/**
 * Module dependencies
 */
var async = require('async'),
  nconf = require('nconf');
var api = require('../api');
var NotFoundError = require('../utils/error').NotFoundError;

/** 用户发表的评论列表 */
exports.createdByUser = function(req, res, next) {
  var pageIndex = parseInt(req.query.pageIndex, 10);
  var pagination = {
    pageIndex: pageIndex,
    pageSize: nconf.get('pagination:pageSize')
  };

  api.Comment.query({
    conditions: {
      'author.id': req.user._id,
      deleted: false
    },
    pageIndex: pageIndex,
    pageSize: nconf.get('pagination:pageSize')
  }, function(err, count, comments) {
    if (err) {
      return next(err);
    }
    pagination.totalCount = count;

    async.map(comments, function(comment, next) {
      api.Topic.get({
        _id: comment.refId
      }, function(err, topic) {
        if (err) {
          return next(err);
        }
        comment.topic = topic || { deleted: true };
        next(null, comment);
      });
    }, function(err, comments) {
      if (err) {
        return next(err);
      }

      req.breadcrumbs(req.user.nickname, '/user/' + req.user.username);
      req.breadcrumbs('全部评论');
      res.render('user/comments', {
        comments: comments,
        pagination: pagination
      });
    });
  });
};

/** 发表评论 */
exports.create = function(req, res, next) {
  var data = req.body;
  data.refId = data.topicId;
  data.author = {
    id: req.currentUser.id
  };

  api.Comment.add(data, function(err) {
    if (err) {
      req.flash('redirectPath', '/topics/' + data.topicId);
      return next(err);
    }
    res.redirect('/topics/' + data.topicId);
  });
};

/** 获取单个评论数据的路由中间件 */
exports.load = function(req, res, next) {
  api.Comment.get({
    _id: req.params.id
  }, function(err, comment) {
    if (err) {
      return next(err);
    }
    if (!comment || comment.deleted) {
      return next(new NotFoundError('该评论不存在。'));
    }
    req.comment = comment;
    next();
  });
};


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq.Expressions;
using GlobalsFramework.Linq.ExpressionCaching;
using GlobalsFramework.Linq.ExpressionProcessing;
using GlobalsFramework.Linq.Helpers;

namespace GlobalsFramework.Linq.QueryProcessing.OrderingQueries
{
    internal abstract class OrderingQueryProcessor : IQueryProcessor
    {
        public abstract bool CanProcess(MethodCallExpression query);

        public abstract ProcessingResult ProcessQuery(MethodCallExpression query, ProcessingResult parentResult, DataContext context);

        protected LambdaExpression GetKeySelector(MethodCallExpression query)
        {
            return ((UnaryExpression)query.Arguments[1]).Operand as LambdaExpression;
        }

        protected object GetComparer(MethodCallExpression query)
        {
            var hasComparer = query.Arguments.Count > 2;
            return !hasComparer ? null : ((ConstantExpression)query.Arguments[2]).Value;
        }

        protected ProcessingResult GetKeys(LambdaExpression keySelector, ProcessingResult parentResult, DataContext context)
        {
            if (!parentResult.IsDeferred())
            {
                var keys = (IList)Activator.CreateInstance(typeof(List<>).MakeGenericType(keySelector.ReturnType));
                var compiledSelector = CompiledExpressionStorage.GetOrAddCompiledLambda(keySelector);

                foreach (var item in parentResult.GetItems())
                {
                    keys.Add(compiledSelector.DynamicInvoke(item));
                }

                return new ProcessingResult(true, keys);
            }

            var nodeReferences = parentResult.GetDeferredList();
            var keysResult = ExpressionProcessingHelper.ProcessExpression(keySelector.Body, nodeReferences, context);
            if (!keysResult.IsSuccess)
                return ProcessingResult.Unsuccessful;

            if (keysResult.IsSingleItem)
            {
                keysResult = ExpressionProcessingHelper.CopyInstances(keysResult, nodeReferences.Count,
                    () => ExpressionProcessingHelper.ProcessExpression(keySelector.Body, nodeReferences, context).Result);
            }

            keysResult = new ProcessingResult(true, keysResult.GetLoadedItems(keySelector.ReturnType));
            return QueryProcessingHelper.NormalizeMultipleResult(keysResult, keySelector.ReturnType);
        }
    }
}


text:
'use strict';

const models = require('./index');

/**
 * Parameters supplied to the Check Name Availability for Namespace and
 * NotificationHubs.
 *
 */
class CheckAvailabilityParameters {
  /**
   * Create a CheckAvailabilityParameters.
   * @member {string} [id] Resource Id
   * @member {string} name Resource name
   * @member {string} [type] Resource type
   * @member {string} location Resource location
   * @member {object} [tags] Resource tags
   * @member {object} [sku] The sku of the created namespace
   * @member {string} [sku.name] Name of the notification hub sku. Possible
   * values include: 'Free', 'Basic', 'Standard'
   * @member {string} [sku.tier] The tier of particular sku
   * @member {string} [sku.size] The Sku size
   * @member {string} [sku.family] The Sku Family
   * @member {number} [sku.capacity] The capacity of the resource
   * @member {boolean} [isAvailiable] True if the name is available and can be
   * used to create new Namespace/NotificationHub. Otherwise false.
   */
  constructor() {
  }

  /**
   * Defines the metadata of CheckAvailabilityParameters
   *
   * @returns {object} metadata of CheckAvailabilityParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'CheckAvailabilityParameters',
      type: {
        name: 'Composite',
        className: 'CheckAvailabilityParameters',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          location: {
            required: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          sku: {
            required: false,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'Sku'
            }
          },
          isAvailiable: {
            required: false,
            serializedName: 'isAvailiable',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = CheckAvailabilityParameters;


text:
if (!!Package["accounts-base"]) {

  Meteor.publish('Constellation_search_by_emails', function (searchValue) {
    check(searchValue, String);
    return Meteor.users.find({"emails.0.address": {$regex: searchValue, $options: 'i'}});
  });

}


text:
package net.ljcomputing.gson.converter;

import java.lang.reflect.Type;
import java.util.List;

/**
 * Interface defining GSON converter service.
 *
 * @author James G. Willmore
 *
 */
public interface GsonConverterService {

  /**
   * Transform given source Object to JSON.
   *
   * @param source the source
   * @return the string
   */
  String toJson(Object source);

  /**
   * From json.
   *
   * @param json the json
   * @param target the target
   * @return the object
   */
  Object fromJson(String json, Class<?> target);

  /**
   * From json.
   *
   * @param json the json
   * @param target the target
   * @return the list
   */
  @SuppressWarnings("rawtypes")
  List fromJson(String json, Type target);

  /**
   * Merge.
   *
   * @param to the to
   * @param from the from
   * @return the object
   */
  Object merge(Object to, Object from);

  /**
   * Merge.
   *
   * @param to the to
   * @param from the from
   * @param ignoredProperties the ignored properties
   * @return the object
   */
  Object merge(Object to, Object from, String ... ignoredProperties);
}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              xmlns:app="http://schemas.android.com/apk/res-auto"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent">
    <android.support.v7.widget.Toolbar
        android:id="@+id/about_toolbar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        android:background="#ffffff"
        app:theme="@style/ThemeOverlay.AppCompat.Light"
        android:elevation="4dp">
    </android.support.v7.widget.Toolbar>
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:scrollbars="none">
        <LinearLayout
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:background="#ffffff">
                <ImageView
                    android:id="@+id/about_image"
                    android:layout_width="80dp"
                    android:layout_height="80dp"
                    android:src="@mipmap/usay"
                    android:layout_centerInParent="true"/>
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/about_version"
                    android:layout_below="@id/about_image"
                    android:layout_centerHorizontal="true"
                    android:textColor="#000000"
                    android:layout_marginTop="20dp"
                    android:layout_marginBottom="8dp"/>
            </RelativeLayout>
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/about_js"
                android:textSize="18sp"
                android:paddingStart="16dp"
                android:paddingEnd="16dp"
                android:layout_marginTop="16dp"/>
            <android.support.v7.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginEnd="16dp"
                android:layout_marginTop="8dp">
                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:autoLink="web"
                    android:linksClickable="true"
                    android:text="@string/help_str"
                    android:textIsSelectable="true"
                    android:textColor="#000000"
                    android:layout_marginStart="16dp"
                    android:layout_marginEnd="16dp"
                    android:layout_marginTop="16dp"
                    android:layout_marginBottom="16dp"/>
            </android.support.v7.widget.CardView>
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/about_openlib"
                android:textSize="18sp"
                android:paddingStart="16dp"
                android:paddingEnd="16dp"
                android:layout_marginTop="16dp"/>
            <android.support.v7.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:layout_marginEnd="16dp"
                android:layout_marginTop="8dp">
                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/used_libs_str"
                    android:textColor="#000000"
                    android:layout_marginStart="16dp"
                    android:layout_marginEnd="16dp"
                    android:layout_marginTop="16dp"
                    android:layout_marginBottom="16dp"/>
            </android.support.v7.widget.CardView>
        </LinearLayout>
    </ScrollView>
</LinearLayout>


text:
#ifndef BOOST_SPIRIT_ACTOR_SWAP_ACTOR_HPP
#define BOOST_SPIRIT_ACTOR_SWAP_ACTOR_HPP

#include <lslboost/spirit/home/classic/namespace.hpp>
#include <lslboost/spirit/home/classic/actor/ref_value_actor.hpp>

namespace lslboost { namespace spirit {

BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN

    ///////////////////////////////////////////////////////////////////////////
    //  Summary:
    //  A semantic action policy that swaps values.
    //  (This doc uses convention available in actors.hpp)
    //
    //  Actions (what it does):
    //      ref.swap( value_ref );
    //
    //  Policy name:
    //      swap_action
    //
    //  Policy holder, corresponding helper method:
    //      ref_value_actor, swap_a( ref );
    //      ref_const_ref_actor, swap_a( ref, value_ref );
    //
    //  () operators: both
    //
    //  See also ref_value_actor and ref_const_ref_actor for more details.
    ///////////////////////////////////////////////////////////////////////////
    template<
        typename T
    >
    class swap_actor
    {
    private:
        T& ref;
        T& swap_ref;

    public:
        swap_actor(
            T& ref_,
            T& swap_ref_)
            : ref(ref_), swap_ref(swap_ref_)
        {};

        template<typename T2>
        void operator()(T2 const& /*val*/) const
        {
            ref.swap(swap_ref);
        }

        template<typename IteratorT>
        void operator()(
            IteratorT const& /*first*/,
            IteratorT const& /*last*/
            ) const
        {
            ref.swap(swap_ref);
        }
    };

    template<
        typename T
    >
    inline swap_actor<T> swap_a(
        T& ref_,
        T& swap_ref_
    )
    {
        return swap_actor<T>(ref_,swap_ref_);
    }

BOOST_SPIRIT_CLASSIC_NAMESPACE_END

}}

#endif


text:
<?php
/**
 * 首页
 */
/* @var $this \yii\web\View */
/* @var $videos_one_hour :: render */
/* @var $videos_one_day :: render */
/* @var $tags_hot :: session */
/* @var $users_hot :: session */
/* @var $one_week_top :: render */
/* @var $one_month_top :: render */
/* @var $one_year_top :: render */
/* @var $is_other_user :: false :: 相对user_info.php那块而言 */
/* @var $is_other_user_video :: true :: 相对video_info_panel.php那块而言,视频不可以删除 */
/* @var $collections_array :: render */
/* @var $relations_array :: render */
/* 若用户已经登录,还需以下变量 */
/* @var $video_send :: render */
/* @var $games :: session */
/* @var $user :: session */
/* @var $session_user :: session */

use yii\helpers\Url;
use yii\helpers\Html;
use app\widgets\VideoInfoWidget;

$this->title = Yii::t('app', 'monbile');

$heads = Url::to('/heads/');
$videos = Url::to('/videos/');

$session = Yii::$app->getSession();
$session_user = $session->get('user');
$user = $session_user;
$games = $session->get('games');
$tags_hot = $session->get('tags_hot');
$users_hot = $session->get('users_hot');

$is_other_user = false;
$is_other_user_video = true;
?>
<input class="success_message" type="hidden" value="<?= $session->hasFlash('success_message') ? $session->getFlash('success_message') : '' ?>">

            <button type="button" class="close" data-dismiss="alert">×Close</button>

            <?php if ($session_user): ?>
                <?php require(__DIR__ . '/fragment/video_send.php'); ?>
            <?php endif; ?>
            <?php require(__DIR__ . '/fragment/video_search.php'); ?>

                    <?php //因视频少,先改为一天内和七天内   原本是'1小时内'和 '24小时内' ?>

一天内

七天内

周榜

月榜

年榜

                    <?php if ($session_user): ?>

我要"发"视频

                    <?php endif; ?>

我要"搜"视频

                        <?php if (count($videos_one_hour) < 1): ?>

该时段没有动态

                        <?php else: ?>
                            <?php foreach ($videos_one_hour as $video_info): ?>
                                <?php /*require(__DIR__ . '/fragment/video_info_panel.php'); */?>
                                <?= VideoInfoWidget::widget(['video_info'=>$video_info]) ?>
                            <?php endforeach; ?>

<button class="btn btn-primary btn-group-justified get_more" value="加载更多" data-type="one_hour" data-count-num="<?=count($videos_one_hour)?>">加载更多</button>

                        <? endif; ?>

                        <?php if (count($videos_one_day) < 1): ?>

该时段没有动态

                        <?php else: ?>
                            <?php foreach ($videos_one_day as $video_info): ?>
                                <?php /*require(__DIR__ . '/fragment/video_info_panel.php'); */?>
                                <?= VideoInfoWidget::widget(['video_info'=>$video_info]) ?>
                            <?php endforeach; ?>

<button class="btn btn-primary btn-group-justified get_more" value="加载更多" data-type="one_day" data-count-num="<?=count($videos_one_day)?>">加载更多</button>

                        <? endif; ?>

                        <?php if (count($one_week_top) < 1): ?>

榜单尚未公布,敬请期待

                        <?php else: ?>

                                <?=date("Y-m-d",strtotime($one_week_top[0]->top_date))?>日期
                                <a href="<?=Url::to(['/site/top-list'])?>">查看更多榜单

                            <?php foreach ($one_week_top as $key=>$top_info): ?>
                                <?php $video_info = $top_info->video; ?>
                                <?php require(__DIR__ . '/fragment/video_info_panel.php'); ?>
                            <?php endforeach; ?>
                        <? endif; ?>

                        <?php if (count($one_month_top) < 1): ?>

榜单尚未公布,敬请期待

                        <?php else: ?>

                                <?=date("Y-m",strtotime($one_month_top[0]->top_date))?>月期
                                <a href="<?=Url::to(['/site/top-list'])?>">查看更多榜单

                            <?php foreach ($one_month_top as $key=>$top_info): ?>
                                <?php $video_info = $top_info->video; ?>
                                <?php require(__DIR__ . '/fragment/video_info_panel.php'); ?>
                            <?php endforeach; ?>
                        <? endif; ?>

                        <?php if (count($one_year_top) < 1): ?>

榜单尚未公布,敬请期待

                        <?php else: ?>

                                <?=date("Y",strtotime($one_year_top[0]->top_date))?>年期
                                <a href="<?=Url::to(['/site/top-list'])?>">查看更多榜单

                            <?php foreach ($one_year_top as $key=>$top_info): ?>
                                <?php $video_info = $top_info->video; ?>
                                <?php require(__DIR__ . '/fragment/video_info_panel.php'); ?>
                            <?php endforeach; ?>
                        <? endif; ?>

            <?php if ($user): ?>
                <?= \app\widgets\UserInfoWidget::widget(['user'=>$user]) ?>
            <?php endif; ?>
            <?= \app\widgets\HotTagWidget::widget() ?>
            <?= \app\widgets\HotUserWidget::widget() ?>

<?= \app\widgets\CommentModalWidget::widget() ?>
<?= \app\widgets\SealPopoverWidget::widget() ?>


text:
/*
* <auto-generated>
*     This code was generated by a tool.
*
*     Changes to this file may cause incorrect behavior and will be lost if
*     the code is regenerated.
* </auto-generated>
*/

#import <Foundation/Foundation.h>
#import "MOZUClient.h"
#import "MOZUAPIContext.h"

#import "MOZULocationUsageCollection.h"
#import "MOZULocationUsage.h"

@interface MOZULocationUsageResource : NSObject

@property(readonly, nonatomic) MOZUAPIContext * apiContext;

-(id)initWithAPIContext:(MOZUAPIContext *)apiContext;

-(id)cloneWithAPIContextModification:(MOZUAPIContextModificationBlock)apiContextModification;

//
#pragma mark -
#pragma mark Get Operations
#pragma mark -
//

/**
Retrieves the configured site location usages for the location usage code specified in the request.
@param responseFields Use this field to include those fields which are not included by default.
*/

- (void)locationUsagesWithResponseFields:(NSString *)responseFields completionHandler:(void(^)(MOZULocationUsageCollection *result, MOZUAPIError *error, NSHTTPURLResponse *response))handler
;
/**
Retrieves the location usages for the site specified in the request header.
@param code User-defined code that uniqely identifies the channel group.
@param responseFields Use this field to include those fields which are not included by default.
*/

- (void)locationUsageWithCode:(NSString *)code responseFields:(NSString *)responseFields completionHandler:(void(^)(MOZULocationUsage *result, MOZUAPIError *error, NSHTTPURLResponse *response))handler
;

//
#pragma mark -
#pragma mark Post Operations
#pragma mark -
//

//
#pragma mark -
#pragma mark Put Operations
#pragma mark -
//

/**
Updates the location usage for the site based on the location usage code specified in the request.
@param body Configuration properties of a location usage type for a specified site. The direct ship location usage type consists of a single location that represents location that supports direct ship (DS) fulfillment. The in-store pickup location usage type consists of a list of location types that represent locations that support in-store pickup (SP) fulfillment. The store finder location usage type consists of a list of location codes, location types, or both.
@param code User-defined code that uniqely identifies the channel group.
@param responseFields Use this field to include those fields which are not included by default.
*/

- (void)updateLocationUsageWithBody:(MOZULocationUsage *)body code:(NSString *)code responseFields:(NSString *)responseFields completionHandler:(void(^)(MOZULocationUsage *result, MOZUAPIError *error, NSHTTPURLResponse *response))handler
;

//
#pragma mark -
#pragma mark Delete Operations
#pragma mark -
//

@end


text:
//
// Created by raver119 on 13.10.2017.
//

#include <op_boilerplate.h>
#if NOT_EXCLUDED(OP_gte_scalar)

#include <ops/declarable/CustomOperations.h>

namespace nd4j {
    namespace ops {
        BOOLEAN_OP_IMPL(gte_scalar, 2, true) {
            auto x = INPUT_VARIABLE(0);
            auto y = INPUT_VARIABLE(1);

            if (x->e<float>(0) >= y->e<float>(0))
                return ND4J_STATUS_TRUE;
            else
                return ND4J_STATUS_FALSE;
        }
        DECLARE_SYN(GreaterOrEquals, gte_scalar);
        DECLARE_SYN(greaterOrEquals, gte_scalar);

        DECLARE_TYPES(gte_scalar) {
            getOpDescriptor()
                    ->setAllowedInputTypes(0, DataType::ANY)
                    ->setAllowedInputTypes(1, DataType::ANY)
                    ->setAllowedOutputTypes(0, DataType::BOOL);
        }
    }
}

#endif


text:
module Succession {
    describe("Character", function () {
        it("sets a common name", function () {
            var character = new Character();

            character.realname = "John Doe";
            character.updateName();
            expect(character.name).toEqual("John Doe");

            var title = new Title("Empire", "Emperor-King", "Emperess-Queen", [new Province([], "Talula")]);
            character.addTitle(title);
            expect(character.name).toEqual("Emperor-King of Talula");

            character.removeTitle(title);
            expect(character.name).toEqual("John Doe");

            character = new Character();
            character.male = false;
            title.setOwner(character);
            expect(character.name).toEqual("Emperess-Queen of Talula");
        });

        it("generates court members", function () {
            var character = new Character();

            expect(character.court.length).toBe(0);

            character.fillCourt(10, []);

            expect(character.court.length).toBe(10);

            // TODO Test dynasty usage
        });

        it("generates a family", function () {
            var character = Character.generate(new Province(), new Dynasty(), true, 10, 50);
            expect(character.male).toBe(true);

            var family = character.generateFamily();

            expect(character.spouse).not.toBeNull();
            if (character.spouse) {
                expect(character.spouse.male).toBe(false);
                expect(character.spouse.dynasty).toBe(character.dynasty);
                expect(character.spouse.spouse).toBe(character);
                expect(family).toContain(character.spouse);
            }

            expect(character.father).not.toBeNull();
            if (character.father) {
                expect(character.father.male).toBe(true);
                expect(character.father.dynasty).toBe(character.dynasty);
                expect(character.father.children).toContain(character);
                expect(family).toContain(character.father);
            }

            expect(character.mother).not.toBeNull();
            if (character.mother) {
                expect(character.mother.male).toBe(false);
                expect(character.mother.dynasty).toBe(character.dynasty);
                expect(character.mother.children).toContain(character);
                expect(family).toContain(character.mother);
            }
        });

        it("advances age", function () {
            var char = new Character();
            char.age = new Time(25, 12);

            char.doStep();

            expect(char.age).toEqual(new Time(25, 13));

            char.setDead(new Time());
            char.doStep();

            expect(char.age).toEqual(new Time(25, 13));
        });

        it("sets experience and personality", function () {
            var char = new Character();

            expect(char.getExperience(GameplayPillar.DIPLOMACY)).toEqual(0);
            char.setExperience(GameplayPillar.DIPLOMACY, 0.1);
            expect(char.getExperience(GameplayPillar.DIPLOMACY)).toEqual(0.1);
            char.addExperience(GameplayPillar.DIPLOMACY, 0.1);
            expect(char.getExperience(GameplayPillar.DIPLOMACY)).toEqual(0.2);
            char.setExperience(GameplayPillar.DIPLOMACY, 0.3);
            expect(char.getExperience(GameplayPillar.DIPLOMACY)).toEqual(0.3);
            char.setExperience(GameplayPillar.DIPLOMACY, 2);
            expect(char.getExperience(GameplayPillar.DIPLOMACY)).toEqual(1);

            expect(char.getTrait(PersonalityTrait.LOYAL)).toEqual(0);
            char.setTrait(PersonalityTrait.LOYAL, 0.1);
            expect(char.getTrait(PersonalityTrait.LOYAL)).toEqual(0.1);
            char.setTrait(PersonalityTrait.LOYAL, 2);
            expect(char.getTrait(PersonalityTrait.LOYAL)).toEqual(1);
        });

        it("handles opposite personality traits", function () {
            var char = new Character();

            char.setTrait(PersonalityTrait.LOYAL, 0.8);
            expect(char.getTrait(PersonalityTrait.LOYAL)).toEqual(0.8);
            expect(char.getTrait(PersonalityTrait.TREACHEROUS)).toEqual(0.0);

            char.setTrait(PersonalityTrait.TREACHEROUS, 0.6);
            expect(char.getTrait(PersonalityTrait.LOYAL)).toEqual(0.4);
            expect(char.getTrait(PersonalityTrait.TREACHEROUS)).toEqual(0.6);
        });

        it("handles pregnancy and child birth", function () {
            var mother = new Character();
            mother.male = false;
            expect(mother.pregnant).toBeNull();

            mother.setPregnant();
            expect(mother.pregnant).toEqual(new Time());

            mother.doStep();
            expect(mother.pregnant).toEqual(new Time(0, 1));

            var father = new Character();
            father.male = true;
            mother.marry(father);
            var child = mother.giveBirth();
            expect(child).not.toBeNull();
            if (child) {
                expect(mother.pregnant).toBeNull();
                expect(child.age).toEqual(new Time());
                expect(child.province).toBe(mother.province);
                expect(child.dynasty).toBe(mother.dynasty);
                expect(child.father).toBe(father);
                expect(child.mother).toBe(mother);
                expect(father.children).toContain(child);
                expect(mother.children).toContain(child);
            }
        });
    });
}


text:
Sequel.migration do
  up{create_table(:sm22222){Integer :smc2}}
  down{drop_table(:sm22222)}
end


text:
package org.apache.spark

import org.scalatest.BeforeAndAfterAll

import org.apache.spark.network.TransportContext
import org.apache.spark.network.netty.SparkTransportConf
import org.apache.spark.network.server.TransportServer
import org.apache.spark.network.shuffle.{ExternalShuffleBlockHandler, ExternalShuffleClient}

/**
 * This suite creates an external shuffle server and routes all shuffle fetches through it.
 * Note that failures in this suite may arise due to changes in Spark that invalidate expectations
 * set up in `ExternalShuffleBlockHandler`, such as changing the format of shuffle files or how
 * we hash files into folders.
 */
class ExternalShuffleServiceSuite extends ShuffleSuite with BeforeAndAfterAll {
  var server: TransportServer = _
  var rpcHandler: ExternalShuffleBlockHandler = _

  override def beforeAll() {
    super.beforeAll()
    val transportConf = SparkTransportConf.fromSparkConf(conf, "shuffle", numUsableCores = 2)
    rpcHandler = new ExternalShuffleBlockHandler(transportConf, null)
    val transportContext = new TransportContext(transportConf, rpcHandler)
    server = transportContext.createServer()

    conf.set("spark.shuffle.manager", "sort")
    conf.set("spark.shuffle.service.enabled", "true")
    conf.set("spark.shuffle.service.port", server.getPort.toString)
  }

  override def afterAll() {
    try {
      server.close()
    } finally {
      super.afterAll()
    }
  }

  // This test ensures that the external shuffle service is actually in use for the other tests.
  test("using external shuffle service") {
    sc = new SparkContext("local-cluster[2,1,1024]", "test", conf)
    sc.env.blockManager.externalShuffleServiceEnabled should equal(true)
    sc.env.blockManager.shuffleClient.getClass should equal(classOf[ExternalShuffleClient])

    // In a slow machine, one slave may register hundreds of milliseconds ahead of the other one.
    // If we don't wait for all slaves, it's possible that only one executor runs all jobs. Then
    // all shuffle blocks will be in this executor, ShuffleBlockFetcherIterator will directly fetch
    // local blocks from the local BlockManager and won't send requests to ExternalShuffleService.
    // In this case, we won't receive FetchFailed. And it will make this test fail.
    // Therefore, we should wait until all slaves are up
    sc.jobProgressListener.waitUntilExecutorsUp(2, 60000)

    val rdd = sc.parallelize(0 until 1000, 10).map(i => (i, 1)).reduceByKey(_ + _)

    rdd.count()
    rdd.count()

    // Invalidate the registered executors, disallowing access to their shuffle blocks (without
    // deleting the actual shuffle files, so we could access them without the shuffle service).
    rpcHandler.applicationRemoved(sc.conf.getAppId, false /* cleanupLocalDirs */)

    // Now Spark will receive FetchFailed, and not retry the stage due to "spark.test.noStageRetry"
    // being set.
    val e = intercept[SparkException] {
      rdd.count()
    }
    e.getMessage should include ("Fetch failure will not retry stage due to testing config")
  }
}


text:
/*
 * EigenDecomposition.h
 *
 *  Created on: Sep 24, 2009
 *      Author: msuchard
 */

#ifndef EIGENDECOMPOSITION_H_
#define EIGENDECOMPOSITION_H_

#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cstring>
#include <cmath>
#include <cassert>
#include <vector>

#define BEAGLE_CPU_EIGEN_GENERIC	REALTYPE, T_PAD
#define BEAGLE_CPU_EIGEN_TEMPLATE	template <typename REALTYPE, int T_PAD>

namespace beagle {
namespace cpu {

BEAGLE_CPU_EIGEN_TEMPLATE
class EigenDecomposition {

protected:
    REALTYPE** gEigenValues;
    int kStateCount;
    int kEigenDecompCount;
    int kCategoryCount;
	long kFlags;
    REALTYPE* matrixTmp;
    REALTYPE* firstDerivTmp;
    REALTYPE* secondDerivTmp;

public:
	EigenDecomposition(int decompositionCount,
					   int stateCount,
					   int categoryCount,
                       long flags)
					   {

					   		kEigenDecompCount = decompositionCount;
					   		kStateCount = stateCount;
					   		kCategoryCount = categoryCount;
                            kFlags = flags;
					   	};

	virtual ~EigenDecomposition() {};

    // sets the Eigen decomposition for a given matrix
    //
    // matrixIndex the matrix index to update
    // eigenVectors an array containing the Eigen Vectors
    // inverseEigenVectors an array containing the inverse Eigen Vectors
    // eigenValues an array containing the Eigen Values
    virtual void setEigenDecomposition(int eigenIndex,
                              const double* inEigenVectors,
                              const double* inInverseEigenVectors,
                              const double* inEigenValues) = 0;

    // calculate a transition probability matrices for a given list of node. This will
    // calculate for all categories (and all matrices if more than one is being used).
    //
    // nodeIndices an array of node indices that require transition probability matrices
    // edgeLengths an array of expected lengths in substitutions per site
    // count the number of elements in the above arrays
    virtual void updateTransitionMatrices(int eigenIndex,
                                 const int* probabilityIndices,
                                 const int* firstDerivativeIndices,
                                 const int* secondDerivativeIndices,
                                 const double* edgeLengths,
                                 const double* categoryRates,
                                 REALTYPE** transitionMatrices,
                                 int count) = 0;

    virtual void updateTransitionMatricesWithModelCategories(int* eigenIndices,
                                 const int* probabilityIndices,
                                 const int* firstDerivativeIndices,
                                 const int* secondDerivativeIndices,
                                 const double* edgeLengths,
                                 REALTYPE** transitionMatrices,
                                 int count) = 0;

};

}
}

#endif /* EIGENDECOMPOSITION_H_ */


text:
package javax.swing;

import java.awt.*;
import java.awt.event.*;
import java.beans.PropertyChangeListener;
import java.util.Locale;
import java.util.Vector;
import java.io.Serializable;

import javax.accessibility.*;

/**
 * An extended version of java.awt.Frame that adds support for
 * the JFC/Swing component architecture.
 * You can find task-oriented documentation about using JFrame
 * in The Java Tutorial, in the section
 * How to Make Frames.
 *
 *

 * The JFrame class is slightly incompatible with Frame.
 * Like all other JFC/Swing top-level containers,
 * a JFrame contains a JRootPane as its only child.
 * The content pane provided by the root pane should,
 * as a rule, contain
 * all the non-menu components displayed by the JFrame.
 * This is different from the AWT Frame case.
 * As a conveniance add and its variants, remove and
 * setLayout have been overridden to forward to the
 * contentPane as necessary. This means you can write:
 *

 *       frame.add(child);
 *

 * And the child will be added to the contentPane.
 * The content pane will
 * always be non-null. Attempting to set it to null will cause the JFrame
 * to throw an exception. The default content pane will have a BorderLayout
 * manager set on it.
 * Refer to {@link javax.swing.RootPaneContainer}
 * for details on adding, removing and setting the LayoutManager
 * of a JFrame.
 *

 * Unlike a Frame, a JFrame has some notion of how to
 * respond when the user attempts to close the window. The default behavior
 * is to simply hide the JFrame when the user closes the window. To change the
 * default behavior, you invoke the method
 * {@link #setDefaultCloseOperation}.
 * To make the JFrame behave the same as a Frame
 * instance, use
 * setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE).
 *

 * For more information on content panes
 * and other features that root panes provide,
 * see Using Top-Level Containers in The Java Tutorial.
 *

 * In a multi-screen environment, you can create a JFrame
 * on a different screen device.  See {@link java.awt.Frame} for more
 * information.
 *

 * Warning: Swing is not thread safe. For more
 * information see Swing's Threading
 * Policy.
 *

 * Warning:
 * Serialized objects of this class will not be compatible with
 * future Swing releases. The current serialization support is
 * appropriate for short term storage or RMI between applications running
 * the same version of Swing.  As of 1.4, support for long term storage
 * of all JavaBeansTM
 * has been added to the java.beans package.
 * Please see {@link java.beans.XMLEncoder}.
 *
 * @see JRootPane
 * @see #setDefaultCloseOperation
 * @see java.awt.event.WindowListener#windowClosing
 * @see javax.swing.RootPaneContainer
 *
 * @beaninfo
 *      attribute: isContainer true
 *      attribute: containerDelegate getContentPane
 *    description: A toplevel window which can be minimized to an icon.
 *
 * @author Jeff Dinkins
 * @author Georges Saab
 * @author David Kloba
 */
public class JFrame  extends Frame implements WindowConstants,
                                              Accessible,
                                              RootPaneContainer,
                              TransferHandler.HasGetTransferHandler
{
    /**
     * The exit application default window close operation. If a window
     * has this set as the close operation and is closed in an applet,
     * a SecurityException may be thrown.
     * It is recommended you only use this in an application.
     *

     * @since 1.3
     */
    public static final int EXIT_ON_CLOSE = 3;

    /**
     * Key into the AppContext, used to check if should provide decorations
     * by default.
     */
    private static final Object defaultLookAndFeelDecoratedKey =
            new StringBuffer("JFrame.defaultLookAndFeelDecorated");

    private int defaultCloseOperation = HIDE_ON_CLOSE;

    /**
     * The TransferHandler for this frame.
     */
    private TransferHandler transferHandler;

    /**
     * The JRootPane instance that manages the
     * contentPane
     * and optional menuBar for this frame, as well as the
     * glassPane.
     *
     * @see JRootPane
     * @see RootPaneContainer
     */
    protected JRootPane rootPane;

    /**
     * If true then calls to add and setLayout
     * will be forwarded to the contentPane. This is initially
     * false, but is set to true when the JFrame is constructed.
     *
     * @see #isRootPaneCheckingEnabled
     * @see #setRootPaneCheckingEnabled
     * @see javax.swing.RootPaneContainer
     */
    protected boolean rootPaneCheckingEnabled = false;

    /**
     * Constructs a new frame that is initially invisible.
     *

     * This constructor sets the component's locale property to the value
     * returned by JComponent.getDefaultLocale.
     *
     * @exception HeadlessException if GraphicsEnvironment.isHeadless()
     * returns true.
     * @see java.awt.GraphicsEnvironment#isHeadless
     * @see Component#setSize
     * @see Component#setVisible
     * @see JComponent#getDefaultLocale
     */
    public JFrame() throws HeadlessException {
        super();
        frameInit();
    }

    /**
     * Creates a Frame in the specified
     * GraphicsConfiguration of
     * a screen device and a blank title.
     *

     * This constructor sets the component's locale property to the value
     * returned by JComponent.getDefaultLocale.
     *
     * @param gc the GraphicsConfiguration that is used
     *          to construct the new Frame;
     *          if gc is null, the system
     *          default GraphicsConfiguration is assumed
     * @exception IllegalArgumentException if gc is not from
     *          a screen device.  This exception is always thrown when
     *      GraphicsEnvironment.isHeadless() returns true.
     * @see java.awt.GraphicsEnvironment#isHeadless
     * @see JComponent#getDefaultLocale
     * @since     1.3
     */
    public JFrame(GraphicsConfiguration gc) {
        super(gc);
        frameInit();
    }

    /**
     * Creates a new, initially invisible Frame with the
     * specified title.
     *

     * This constructor sets the component's locale property to the value
     * returned by JComponent.getDefaultLocale.
     *
     * @param title the title for the frame
     * @exception HeadlessException if GraphicsEnvironment.isHeadless()
     * returns true.
     * @see java.awt.GraphicsEnvironment#isHeadless
     * @see Component#setSize
     * @see Component#setVisible
     * @see JComponent#getDefaultLocale
     */
    public JFrame(String title) throws HeadlessException {
        super(title);
        frameInit();
    }

    /**
     * Creates a JFrame with the specified title and the
     * specified GraphicsConfiguration of a screen device.
     *

     * This constructor sets the component's locale property to the value
     * returned by JComponent.getDefaultLocale.
     *
     * @param title the title to be displayed in the
     *          frame's border. A null value is treated as
     *          an empty string, "".
     * @param gc the GraphicsConfiguration that is used
     *          to construct the new JFrame with;
     *          if gc is null, the system
     *          default GraphicsConfiguration is assumed
     * @exception IllegalArgumentException if gc is not from
     *          a screen device.  This exception is always thrown when
     *      GraphicsEnvironment.isHeadless() returns true.
     * @see java.awt.GraphicsEnvironment#isHeadless
     * @see JComponent#getDefaultLocale
     * @since     1.3
     */
    public JFrame(String title, GraphicsConfiguration gc) {
        super(title, gc);
        frameInit();
    }

    /** Called by the constructors to init the JFrame properly. */
    protected void frameInit() {
        enableEvents(AWTEvent.KEY_EVENT_MASK | AWTEvent.WINDOW_EVENT_MASK);
        setLocale( JComponent.getDefaultLocale() );
        setRootPane(createRootPane());
        setBackground(UIManager.getColor("control"));
        setRootPaneCheckingEnabled(true);
        if (JFrame.isDefaultLookAndFeelDecorated()) {
            boolean supportsWindowDecorations =
            UIManager.getLookAndFeel().getSupportsWindowDecorations();
            if (supportsWindowDecorations) {
                setUndecorated(true);
                getRootPane().setWindowDecorationStyle(JRootPane.FRAME);
            }
        }
        sun.awt.SunToolkit.checkAndSetPolicy(this);
    }

    /**
     * Called by the constructor methods to create the default
     * rootPane.
     */
    protected JRootPane createRootPane() {
        JRootPane rp = new JRootPane();
        // NOTE: this uses setOpaque vs LookAndFeel.installProperty as there
        // is NO reason for the RootPane not to be opaque. For painting to
        // work the contentPane must be opaque, therefor the RootPane can
        // also be opaque.
        rp.setOpaque(true);
        return rp;
    }

    /**
     * Processes window events occurring on this component.
     * Hides the window or disposes of it, as specified by the setting
     * of the defaultCloseOperation property.
     *
     * @param  e  the window event
     * @see    #setDefaultCloseOperation
     * @see    java.awt.Window#processWindowEvent
     */
    protected void processWindowEvent(WindowEvent e) {
        super.processWindowEvent(e);

        if (e.getID() == WindowEvent.WINDOW_CLOSING) {
            switch(defaultCloseOperation) {
              case HIDE_ON_CLOSE:
                 setVisible(false);
                 break;
              case DISPOSE_ON_CLOSE:
                 dispose();
                 break;
              case DO_NOTHING_ON_CLOSE:
                 default:
                 break;
              case EXIT_ON_CLOSE:
                  // This needs to match the checkExit call in
                  // setDefaultCloseOperation
                System.exit(0);
                break;
            }
        }
    }

//    public void setMenuBar(MenuBar menu) {
//        throw new IllegalComponentStateException("Please use setJMenuBar() with JFrame.");
//    }

    /**
     * Sets the operation that will happen by default when
     * the user initiates a "close" on this frame.
     * You must specify one of the following choices:
     *

     *

     *
DO_NOTHING_ON_CLOSE
     * (defined in WindowConstants):
     * Don't do anything; require the
     * program to handle the operation in the windowClosing
     * method of a registered WindowListener object.
     *
     *
HIDE_ON_CLOSE
     * (defined in WindowConstants):
     * Automatically hide the frame after
     * invoking any registered WindowListener
     * objects.
     *
     *
DISPOSE_ON_CLOSE
     * (defined in WindowConstants):
     * Automatically hide and dispose the
     * frame after invoking any registered WindowListener
     * objects.
     *
     *
EXIT_ON_CLOSE
     * (defined in JFrame):
     * Exit the application using the System
     * exit method.  Use this only in applications.
     *

     *

     * The value is set to HIDE_ON_CLOSE by default. Changes
     * to the value of this property cause the firing of a property
     * change event, with property name "defaultCloseOperation".
     *

     * Note: When the last displayable window within the
     * Java virtual machine (VM) is disposed of, the VM may
     * terminate.  See
     * AWT Threading Issues for more information.
     *
     * @param operation the operation which should be performed when the
     *        user closes the frame
     * @exception IllegalArgumentException if defaultCloseOperation value
     *             isn't one of the above valid values
     * @see #addWindowListener
     * @see #getDefaultCloseOperation
     * @see WindowConstants
     * @throws  SecurityException
     *        if EXIT_ON_CLOSE has been specified and the
     *        SecurityManager will
     *        not allow the caller to invoke System.exit
     * @see        java.lang.Runtime#exit(int)
     *
     * @beaninfo
     *   preferred: true
     *       bound: true
     *        enum: DO_NOTHING_ON_CLOSE WindowConstants.DO_NOTHING_ON_CLOSE
     *              HIDE_ON_CLOSE       WindowConstants.HIDE_ON_CLOSE
     *              DISPOSE_ON_CLOSE    WindowConstants.DISPOSE_ON_CLOSE
     *              EXIT_ON_CLOSE       WindowConstants.EXIT_ON_CLOSE
     * description: The frame's default close operation.
     */
    public void setDefaultCloseOperation(int operation) {
        if (operation != DO_NOTHING_ON_CLOSE &&
            operation != HIDE_ON_CLOSE &&
            operation != DISPOSE_ON_CLOSE &&
            operation != EXIT_ON_CLOSE) {
            throw new IllegalArgumentException("defaultCloseOperation must be one of: DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, DISPOSE_ON_CLOSE, or EXIT_ON_CLOSE");
        }
        if (this.defaultCloseOperation != operation) {
            if (operation == EXIT_ON_CLOSE) {
                SecurityManager security = System.getSecurityManager();
                if (security != null) {
                    security.checkExit(0);
                }
            }
            int oldValue = this.defaultCloseOperation;
            this.defaultCloseOperation = operation;
            firePropertyChange("defaultCloseOperation", oldValue, operation);
        }
    }

   /**
    * Returns the operation that occurs when the user
    * initiates a "close" on this frame.
    *
    * @return an integer indicating the window-close operation
    * @see #setDefaultCloseOperation
    */
    public int getDefaultCloseOperation() {
        return defaultCloseOperation;
    }

    /**
     * Sets the {@code transferHandler} property, which is a mechanism to
     * support transfer of data into this component. Use {@code null}
     * if the component does not support data transfer operations.
     *

     * If the system property {@code suppressSwingDropSupport} is {@code false}
     * (the default) and the current drop target on this component is either
     * {@code null} or not a user-set drop target, this method will change the
     * drop target as follows: If {@code newHandler} is {@code null} it will
     * clear the drop target. If not {@code null} it will install a new
     * {@code DropTarget}.
     *

     * Note: When used with {@code JFrame}, {@code TransferHandler} only
     * provides data import capability, as the data export related methods
     * are currently typed to {@code JComponent}.
     *

     * Please see
     *
     * How to Use Drag and Drop and Data Transfer, a section in
     * The Java Tutorial, for more information.
     *
     * @param newHandler the new {@code TransferHandler}
     *
     * @see TransferHandler
     * @see #getTransferHandler
     * @see java.awt.Component#setDropTarget
     * @since 1.6
     *
     * @beaninfo
     *        bound: true
     *       hidden: true
     *  description: Mechanism for transfer of data into the component
     */
    public void setTransferHandler(TransferHandler newHandler) {
        TransferHandler oldHandler = transferHandler;
        transferHandler = newHandler;
        SwingUtilities.installSwingDropTargetAsNecessary(this, transferHandler);
        firePropertyChange("transferHandler", oldHandler, newHandler);
    }

    /**
     * Gets the transferHandler property.
     *
     * @return the value of the transferHandler property
     *
     * @see TransferHandler
     * @see #setTransferHandler
     * @since 1.6
     */
    public TransferHandler getTransferHandler() {
        return transferHandler;
    }

    /**
     * Just calls paint(g).  This method was overridden to
     * prevent an unnecessary call to clear the background.
     *
     * @param g the Graphics context in which to paint
     */
    public void update(Graphics g) {
        paint(g);
    }

   /**
    * Sets the menubar for this frame.
    * @param menubar the menubar being placed in the frame
    *
    * @see #getJMenuBar
    *
    * @beaninfo
    *      hidden: true
    * description: The menubar for accessing pulldown menus from this frame.
    */
    public void setJMenuBar(JMenuBar menubar) {
        getRootPane().setMenuBar(menubar);
    }

   /**
    * Returns the menubar set on this frame.
    * @return the menubar for this frame
    *
    * @see #setJMenuBar
    */
    public JMenuBar getJMenuBar() {
        return getRootPane().getMenuBar();
    }

    /**
     * Returns whether calls to add and
     * setLayout are forwarded to the contentPane.
     *
     * @return true if add and setLayout
     *         are fowarded; false otherwise
     *
     * @see #addImpl
     * @see #setLayout
     * @see #setRootPaneCheckingEnabled
     * @see javax.swing.RootPaneContainer
     */
    protected boolean isRootPaneCheckingEnabled() {
        return rootPaneCheckingEnabled;
    }

    /**
     * Sets whether calls to add and
     * setLayout are forwarded to the contentPane.
     *
     * @param enabled  true if add and setLayout
     *        are forwarded, false if they should operate directly on the
     *        JFrame.
     *
     * @see #addImpl
     * @see #setLayout
     * @see #isRootPaneCheckingEnabled
     * @see javax.swing.RootPaneContainer
     * @beaninfo
     *      hidden: true
     * description: Whether the add and setLayout methods are forwarded
     */
    protected void setRootPaneCheckingEnabled(boolean enabled) {
        rootPaneCheckingEnabled = enabled;
    }

    /**
     * Adds the specified child Component.
     * This method is overridden to conditionally forward calls to the
     * contentPane.
     * By default, children are added to the contentPane instead
     * of the frame, refer to {@link javax.swing.RootPaneContainer} for
     * details.
     *
     * @param comp the component to be enhanced
     * @param constraints the constraints to be respected
     * @param index the index
     * @exception IllegalArgumentException if index is invalid
     * @exception IllegalArgumentException if adding the container's parent
     *                  to itself
     * @exception IllegalArgumentException if adding a window to a container
     *
     * @see #setRootPaneCheckingEnabled
     * @see javax.swing.RootPaneContainer
     */
    protected void addImpl(Component comp, Object constraints, int index)
    {
        if(isRootPaneCheckingEnabled()) {
            getContentPane().add(comp, constraints, index);
        }
        else {
            super.addImpl(comp, constraints, index);
        }
    }

    /**
     * Removes the specified component from the container. If
     * comp is not the rootPane, this will forward
     * the call to the contentPane. This will do nothing if
     * comp is not a child of the JFrame or
     * contentPane.
     *
     * @param comp the component to be removed
     * @throws NullPointerException if comp is null
     * @see #add
     * @see javax.swing.RootPaneContainer
     */
    public void remove(Component comp) {
        if (comp == rootPane) {
            super.remove(comp);
        } else {
            getContentPane().remove(comp);
        }
    }

    /**
     * Sets the LayoutManager.
     * Overridden to conditionally forward the call to the
     * contentPane.
     * Refer to {@link javax.swing.RootPaneContainer} for
     * more information.
     *
     * @param manager the LayoutManager
     * @see #setRootPaneCheckingEnabled
     * @see javax.swing.RootPaneContainer
     */
    public void setLayout(LayoutManager manager) {
        if(isRootPaneCheckingEnabled()) {
            getContentPane().setLayout(manager);
        }
        else {
            super.setLayout(manager);
        }
    }

    /**
     * Returns the rootPane object for this frame.
     * @return the rootPane property
     *
     * @see #setRootPane
     * @see RootPaneContainer#getRootPane
     */
    public JRootPane getRootPane() {
        return rootPane;
    }

    /**
     * Sets the rootPane property.
     * This method is called by the constructor.
     * @param root the rootPane object for this frame
     *
     * @see #getRootPane
     *
     * @beaninfo
     *   hidden: true
     * description: the RootPane object for this frame.
     */
    protected void setRootPane(JRootPane root)
    {
        if(rootPane != null) {
            remove(rootPane);
        }
        rootPane = root;
        if(rootPane != null) {
            boolean checkingEnabled = isRootPaneCheckingEnabled();
            try {
                setRootPaneCheckingEnabled(false);
                add(rootPane, BorderLayout.CENTER);
            }
            finally {
                setRootPaneCheckingEnabled(checkingEnabled);
            }
        }
    }

    /**
     * {@inheritDoc}
     */
    public void setIconImage(Image image) {
        super.setIconImage(image);
    }

    /**
     * Returns the contentPane object for this frame.
     * @return the contentPane property
     *
     * @see #setContentPane
     * @see RootPaneContainer#getContentPane
     */
    public Container getContentPane() {
        return getRootPane().getContentPane();
    }

    /**
     * Sets the contentPane property.
     * This method is called by the constructor.
     *

     * Swing's painting architecture requires an opaque JComponent
     * in the containment hiearchy. This is typically provided by the
     * content pane. If you replace the content pane it is recommended you
     * replace it with an opaque JComponent.
     *
     * @param contentPane the contentPane object for this frame
     *
     * @exception java.awt.IllegalComponentStateException (a runtime
     *            exception) if the content pane parameter is null
     * @see #getContentPane
     * @see RootPaneContainer#setContentPane
     * @see JRootPane
     *
     * @beaninfo
     *     hidden: true
     *     description: The client area of the frame where child
     *                  components are normally inserted.
     */
    public void setContentPane(Container contentPane) {
        getRootPane().setContentPane(contentPane);
    }

    /**
     * Returns the layeredPane object for this frame.
     * @return the layeredPane property
     *
     * @see #setLayeredPane
     * @see RootPaneContainer#getLayeredPane
     */
    public JLayeredPane getLayeredPane() {
        return getRootPane().getLayeredPane();
    }

    /**
     * Sets the layeredPane property.
     * This method is called by the constructor.
     * @param layeredPane the layeredPane object for this frame
     *
     * @exception java.awt.IllegalComponentStateException (a runtime
     *            exception) if the layered pane parameter is null
     * @see #getLayeredPane
     * @see RootPaneContainer#setLayeredPane
     *
     * @beaninfo
     *     hidden: true
     *     description: The pane that holds the various frame layers.
     */
    public void setLayeredPane(JLayeredPane layeredPane) {
        getRootPane().setLayeredPane(layeredPane);
    }

    /**
     * Returns the glassPane object for this frame.
     * @return the glassPane property
     *
     * @see #setGlassPane
     * @see RootPaneContainer#getGlassPane
     */
    public Component getGlassPane() {
        return getRootPane().getGlassPane();
    }

    /**
     * Sets the glassPane property.
     * This method is called by the constructor.
     * @param glassPane the glassPane object for this frame
     *
     * @see #getGlassPane
     * @see RootPaneContainer#setGlassPane
     *
     * @beaninfo
     *     hidden: true
     *     description: A transparent pane used for menu rendering.
     */
    public void setGlassPane(Component glassPane) {
        getRootPane().setGlassPane(glassPane);
    }

    /**
     * {@inheritDoc}
     *
     * @since 1.6
     */
    public Graphics getGraphics() {
        JComponent.getGraphicsInvoked(this);
        return super.getGraphics();
    }

    /**
     * Repaints the specified rectangle of this component within
     * time milliseconds.  Refer to RepaintManager
     * for details on how the repaint is handled.
     *
     * @param     time   maximum time in milliseconds before update
     * @param     x    the x coordinate
     * @param     y    the y coordinate
     * @param     width    the width
     * @param     height   the height
     * @see       RepaintManager
     * @since     1.6
     */
    public void repaint(long time, int x, int y, int width, int height) {
        if (RepaintManager.HANDLE_TOP_LEVEL_PAINT) {
            RepaintManager.currentManager(this).addDirtyRegion(
                              this, x, y, width, height);
        }
        else {
            super.repaint(time, x, y, width, height);
        }
    }

    /**
     * Provides a hint as to whether or not newly created JFrames
     * should have their Window decorations (such as borders, widgets to
     * close the window, title...) provided by the current look
     * and feel. If defaultLookAndFeelDecorated is true,
     * the current LookAndFeel supports providing window
     * decorations, and the current window manager supports undecorated
     * windows, then newly created JFrames will have their
     * Window decorations provided by the current LookAndFeel.
     * Otherwise, newly created JFrames will have their
     * Window decorations provided by the current window manager.
     *

     * You can get the same effect on a single JFrame by doing the following:
     *

     *    JFrame frame = new JFrame();
     *    frame.setUndecorated(true);
     *    frame.getRootPane().setWindowDecorationStyle(JRootPane.FRAME);
     *

     *
     * @param defaultLookAndFeelDecorated A hint as to whether or not current
     *        look and feel should provide window decorations
     * @see javax.swing.LookAndFeel#getSupportsWindowDecorations
     * @since 1.4
     */
    public static void setDefaultLookAndFeelDecorated(boolean defaultLookAndFeelDecorated) {
        if (defaultLookAndFeelDecorated) {
            SwingUtilities.appContextPut(defaultLookAndFeelDecoratedKey, Boolean.TRUE);
        } else {
            SwingUtilities.appContextPut(defaultLookAndFeelDecoratedKey, Boolean.FALSE);
        }
    }

    /**
     * Returns true if newly created JFrames should have their
     * Window decorations provided by the current look and feel. This is only
     * a hint, as certain look and feels may not support this feature.
     *
     * @return true if look and feel should provide Window decorations.
     * @since 1.4
     */
    public static boolean isDefaultLookAndFeelDecorated() {
        Boolean defaultLookAndFeelDecorated =
            (Boolean) SwingUtilities.appContextGet(defaultLookAndFeelDecoratedKey);
        if (defaultLookAndFeelDecorated == null) {
            defaultLookAndFeelDecorated = Boolean.FALSE;
        }
        return defaultLookAndFeelDecorated.booleanValue();
    }

    /**
     * Returns a string representation of this JFrame.
     * This method
     * is intended to be used only for debugging purposes, and the
     * content and format of the returned string may vary between
     * implementations. The returned string may be empty but may not
     * be null.
     *
     * @return  a string representation of this JFrame
     */
    protected String paramString() {
        String defaultCloseOperationString;
        if (defaultCloseOperation == HIDE_ON_CLOSE) {
            defaultCloseOperationString = "HIDE_ON_CLOSE";
        } else if (defaultCloseOperation == DISPOSE_ON_CLOSE) {
            defaultCloseOperationString = "DISPOSE_ON_CLOSE";
        } else if (defaultCloseOperation == DO_NOTHING_ON_CLOSE) {
            defaultCloseOperationString = "DO_NOTHING_ON_CLOSE";
        } else if (defaultCloseOperation == 3) {
            defaultCloseOperationString = "EXIT_ON_CLOSE";
        } else defaultCloseOperationString = "";
        String rootPaneString = (rootPane != null ?
                                 rootPane.toString() : "");
        String rootPaneCheckingEnabledString = (rootPaneCheckingEnabled ?
                                                "true" : "false");

        return super.paramString() +
        ",defaultCloseOperation=" + defaultCloseOperationString +
        ",rootPane=" + rootPaneString +
        ",rootPaneCheckingEnabled=" + rootPaneCheckingEnabledString;
    }

/////////////////
// Accessibility support
////////////////

    /** The accessible context property. */
    protected AccessibleContext accessibleContext = null;

    /**
     * Gets the AccessibleContext associated with this JFrame.
     * For JFrames, the AccessibleContext takes the form of an
     * AccessibleJFrame.
     * A new AccessibleJFrame instance is created if necessary.
     *
     * @return an AccessibleJFrame that serves as the
     *         AccessibleContext of this JFrame
     */
    public AccessibleContext getAccessibleContext() {
        if (accessibleContext == null) {
            accessibleContext = new AccessibleJFrame();
        }
        return accessibleContext;
    }

    /**
     * This class implements accessibility support for the
     * JFrame class.  It provides an implementation of the
     * Java Accessibility API appropriate to frame user-interface
     * elements.
     */
    protected class AccessibleJFrame extends AccessibleAWTFrame {

        // AccessibleContext methods
        /**
         * Get the accessible name of this object.
         *
         * @return the localized name of the object -- can be null if this
         * object does not have a name
         */
        public String getAccessibleName() {
            if (accessibleName != null) {
                return accessibleName;
            } else {
                if (getTitle() == null) {
                    return super.getAccessibleName();
                } else {
                    return getTitle();
                }
            }
        }

        /**
         * Get the state of this object.
         *
         * @return an instance of AccessibleStateSet containing the current
         * state set of the object
         * @see AccessibleState
         */
        public AccessibleStateSet getAccessibleStateSet() {
            AccessibleStateSet states = super.getAccessibleStateSet();

            if (isResizable()) {
                states.add(AccessibleState.RESIZABLE);
            }
            if (getFocusOwner() != null) {
                states.add(AccessibleState.ACTIVE);
            }
            // FIXME:  [[[WDW - should also return ICONIFIED and ICONIFIABLE
            // if we can ever figure these out]]]
            return states;
        }
    } // inner class AccessibleJFrame
}


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

 -->
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
    <item android:state_selected="true" android:drawable="@color/bg_row_selected" />
    <item android:state_pressed="true" android:state_selected="false" android:drawable="@color/bg_row_selected" />
    <item android:state_selected="false" android:drawable="@color/white"/>
</selector>


text:
package iojjj.android.bootstrap.threading;

import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;

/**
 * Helper class for threading
 */
public class ThreadUtils {

    private static final class MainThreadHandlerHolder {
        public static final Handler INSTANCE = new Handler(Looper.getMainLooper());
    }

    /**
     * Get handler for UI thread
     * @return handler for UI thread
     */
    public static Handler getMainHandler() {
        return MainThreadHandlerHolder.INSTANCE;
    }

    /**
     * Execute runnable on UI thread
     * @param r runnable
     */
    public static void runOnUiThread(@NonNull final Runnable r) {
        if (Thread.currentThread().equals(Looper.getMainLooper().getThread())) {
            r.run();

            return;
        }
        getMainHandler().post(r);
    }

    /**
     * Execute runnable on UI thread with delay
     * @param r runnable
     * @param delayMillis delay in milliseconds
     */
    public static void runOnUiThread(@NonNull final Runnable r, final long delayMillis) {
        getMainHandler().postDelayed(r, delayMillis);
    }

    /**
     * Execute runnable in background thread
     * @param runnable runnable
     * @param executor any executor
     * @return a Future representing pending completion of the task
     */
    @Nullable
    public static Future runOnExecutor(@NonNull final Runnable runnable, @NonNull ExecutorService executor) {
        return runOnExecutor(runnable, executor, false);
    }

    /**
     * Execute runnable in background thread
     * @param runnable runnable
     * @param immediately if set to true, runnable will be executed immediately if current thread is not a UI thread
     * @param executor any executor
     * @return a Future representing pending completion of the task or null if runnable was executed immediately
     */
    @Nullable
    public static Future runOnExecutor(@NonNull final Runnable runnable, @NonNull ExecutorService executor, boolean immediately) {
        if (immediately && !Thread.currentThread().equals(Looper.getMainLooper().getThread())) {
            runnable.run();
            return null;
        }
        return executor.submit(runnable);
    }
}


text:
#include "gtools.h"
#include "schreier.h"

typedef struct TracesOptions {
	boolean getcanon;
	boolean writeautoms;
	boolean cartesian;
	boolean digraph;
	boolean defaultptn;
	int linelength;
	FILE* outfile;
	int strategy;
	int verbosity;
	permnode **generators;
	void (*userautomproc)(int,int*,int);
} TracesOptions;

#define DEFAULTOPTIONS_TRACES(opts) TracesOptions opts \
= { FALSE, FALSE, FALSE, FALSE, TRUE, 0, NULL, 0, 0, NULL, NULL }

typedef struct TracesStats {
	double grpsize1;
	int grpsize2;
	int numgenerators;
	int numorbits;
	int treedepth;
	int canupdates;
	unsigned long numnodes;
	unsigned long interrupted;
	unsigned long peaknodes;
} TracesStats;

#ifdef __cplusplus
extern "C" {
#endif

extern void Traces(sparsegraph*,int*,int*,int*,TracesOptions*,
				   TracesStats*,sparsegraph*);
extern void refine_tr(sparsegraph*,int*,int*,int*,int*,TracesOptions*);
extern void traces_freedyn(void);

#ifdef __cplusplus
}
#endif


text:
package org.wso2.carbon.identity.oauth2;

import org.apache.commons.lang.StringUtils;
import org.wso2.carbon.identity.base.IdentityException;

/**
 * OAuth scope consent exception.
 */
public class IdentityOAuth2ScopeConsentException extends IdentityException {

    public IdentityOAuth2ScopeConsentException(String message) {
        super(message);
        this.setErrorCode(getDefaultErrorCode());
    }

    public IdentityOAuth2ScopeConsentException(String errorCode, String message) {
        super(errorCode, message);
    }

    public IdentityOAuth2ScopeConsentException(String message, Throwable cause) {
        super(message, cause);
        this.setErrorCode(getDefaultErrorCode());
    }

    public IdentityOAuth2ScopeConsentException(String errorCode, String message, Throwable cause) {
        super(errorCode, message, cause);
    }

    private String getDefaultErrorCode() {

        String errorCode = super.getErrorCode();
        if (StringUtils.isEmpty(errorCode)) {
            errorCode = Oauth2ScopeConstants.ErrorMessages.ERROR_CODE_UNEXPECTED.getCode();
        }
        return errorCode;
    }
}


text:
help:
	@echo ""
	@echo "Targets:"
	@echo "  make all         # binaries (without dosexe, diag.)"
	@echo "  make dosexe      # DOS lilo.com utility"
	@echo "  make diagnostic  # standalone diagnostics"
	@echo "  make alles       # all above + static binary"
	@echo "  make docs        # doc/[user,tech].html docs"
	@echo "  make floppy      # 2 standalone bootable diagnostic floppies"
	@echo ""
	@echo "  make install     # install binaries++ into root directory"
	@echo "  make install DESTDIR=<dir>  # install binaries++ into directory"
	@echo ""
	@echo "  make uninstall     # remove binaries++ from root directory"
	@echo "  make uninstall DESTDIR=<dir>  # rmove binaries++ from directory"
	@echo ""
	@echo "Maintenance:"
	@echo "  make test        # test for all needed utilities (as86, ld86, etc.)"
	@echo "  make tidy        # remove listings & other unnecessary files"
	@echo "  make clean       # remove objects & ready for a fresh 'make all'"
	@echo "  make distclean   # remove editor temps, & all of the above"
	@echo ""

#
# everything needed to run, just short of installation
#
all: test
	$(MAKE) -C src all
	$(MAKE) -C images all

#
# everything above plus the statically linked version
#
alles: test
	$(MAKE) -C src alles
	$(MAKE) -C images all

#
# documentation files
#
docs:

#
# if you have the 'bcc' compiler, then you can make the diagnostics, too
# bcc = Bruce Evans' C 16bit compiler (also for BIOS- and DOS code)
#
it:	docs alles diagnostic dosexe

#
# make the bootable diagnostic floppies
#
floppy: test
	@echo
	@echo Make sure you have 2 blank, formatted, 1.44Mb floppies
	@echo before you proceed from this point.
	@echo "Press <Enter> to continue, <^C> to abort ..."
	@read
	@$(MAKE) -C src floppy1
	@echo Done.
	@echo
	@echo Remove the floppy from the drive.  Label it "\"1.6\""
	@echo "Press <Enter> to continue, <^C> to abort ..."
	@read
	@$(MAKE) -C src floppy2
	@echo Done.
	@echo
	@echo Remove the floppy from the drive.  Label it "\"2.4\""
	@echo

diagnostic: test
	$(MAKE) -C src diagnostic

dosexe: test
	$(MAKE) -C dos lilo

#
# test for compilers & utilities
#
test: test.img
test.img:
	./checkit
	echo Tested >test.img

#
# shorthand install, if one knows that one has the 'bcc' compiler
#
ins:
	$(MAKE) -C src ins

#
#  normal install, but doesn't make the diagnostic binaries
#
install:  all
	$(MAKE) -C src install
	$(MAKE) -C images install
	$(MAKE) -C hooks install
	$(MAKE) -C sample install
	$(MAKE) -C scripts install
	$(MAKE) -C man install
	$(MAKE) -C dos install

tidy:
	$(MAKE) -C src tidy
	$(MAKE) -C diagnose tidy
	$(MAKE) -C dos tidy

clean: tidy
	rm -f test.img
	$(MAKE) -C src clean
	$(MAKE) -C images clean
	$(MAKE) -C diagnose clean
	$(MAKE) -C dos clean

spotless: distclean
distclean: clean
	$(MAKE) -C src distclean
	$(MAKE) -C diagnose distclean
	$(MAKE) -C dos distclean

uninstall:
	$(MAKE) -C src uninstall
	$(MAKE) -C images uninstall
	$(MAKE) -C hooks uninstall
	$(MAKE) -C sample uninstall
	$(MAKE) -C scripts uninstall
	$(MAKE) -C man uninstall


text:
<?php
/**
 * DO NOT EDIT CUSTOM MARKERS
 * Generated from Class.tpl by PhpTestClassGenerator.php on 2016-05-16 21:44:52.
 */

use \PHPUnit_Framework_TestCase as PHPUnit_Framework_TestCase;
/* * Generated from UseStatements.tpl by PhpTestClassGenerator.php on 2016-05-16 21:44:52. */
use \utilities\Stopwatch as Stopwatch;
/* {useStatements} */

class DatabaseTest extends PHPUnit_Framework_TestCase
{
    protected function setUp()
    {
		test_initializeDatabase(false);
    }

    protected function tearDown()
    {
    }

/*	 Test functions */

	/**
	 * @covers	instance
	 * 			T_FUNCTION T_STATIC T_PUBLIC T_FINAL instance ( )
	 * @todo	Implement testInstance().
	 * Generated from Function.tpl by PhpTestClassGenerator.php on 2016-05-16 21:44:52.
	 */
	public function testInstance()
	{
		$db = Database::instance();
		$this->assertNotNull( $db );
	}

	/**
	 * @covers	verifyDatabase
	 * 			T_FUNCTION T_PUBLIC verifyDatabase ( )
	 * @todo	Implement testVerifyDatabase().
	 * Generated from Function.tpl by PhpTestClassGenerator.php on 2016-05-16 21:44:52.
	 */
	public function testVerifyDatabase()
	{
		$this->markTestIncomplete('This test has not been implemented yet.');
	}

/* {functions} */
}


text:
package com.sjcqs.rawlauncher.utils.interfaces;

/**
 * Created by satyan on 8/25/17.
 */

public interface Reloadable {

    void reload();

}


text:
<?php

namespace JeroenNoten\LaravelNewsletter\Mailgun;

use Illuminate\Contracts\Routing\UrlRoutable;

class MailingList implements UrlRoutable
{
    public $address;
    public $name;
    public $description;
    public $membersCount;

    public function __construct($data)
    {
        $this->name = $data->name;
        $this->description = $data->description;
        $this->membersCount = $data->members_count;
        $this->address = $data->address;
    }

    public function isDomain($domain)
    {
        return $this->getDomain() == $domain;
    }

    public function getId()
    {
        return head($this->getAddressParts());
    }

    public function getDomain()
    {
        return last($this->getAddressParts());
    }

    private function getAddressParts()
    {
        return explode('@', $this->address);
    }

    public function getRouteKey()
    {
        return $this->getId();
    }

    public function getRouteKeyName()
    {
    }
}


text:
[![GoDoc](https://godoc.org/github.com/fsnotify/fsnotify?status.svg)](https://godoc.org/github.com/fsnotify/fsnotify) [![Go Report Card](https://goreportcard.com/badge/github.com/fsnotify/fsnotify)](https://goreportcard.com/report/github.com/fsnotify/fsnotify)

fsnotify utilizes [golang.org/x/sys](https://godoc.org/golang.org/x/sys) rather than `syscall` from the standard library. Ensure you have the latest version installed by running:

```console
go get -u golang.org/x/sys/...
```

Cross platform: Windows, Linux, BSD and macOS.

| Adapter               | OS                               | Status                                                                                |
| --------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| inotify               | Linux 2.6.27 or later, Android\* | Supported |
| kqueue                | BSD, macOS, iOS\*                | Supported |
| ReadDirectoryChangesW | Windows                          | Supported |
| FSEvents              | macOS                            | [Planned](https://github.com/fsnotify/fsnotify/issues/11)                                                                       |
| FEN                   | Solaris 11                       | [In Progress](https://github.com/fsnotify/fsnotify/issues/12)                                                                   |
| fanotify              | Linux 2.6.37+                    | [Planned](https://github.com/fsnotify/fsnotify/issues/114)                                                                      |
| USN Journals          | Windows                          | [Maybe](https://github.com/fsnotify/fsnotify/issues/53)                                                                         |
| Polling               | *All*                            | [Maybe](https://github.com/fsnotify/fsnotify/issues/9)                                                                          |

\* Android and iOS are untested.

Please see [the documentation](https://godoc.org/github.com/fsnotify/fsnotify) and consult the [FAQ](#faq) for usage information.

## API stability

fsnotify is a fork of [howeyc/fsnotify](https://godoc.org/github.com/howeyc/fsnotify) with a new API as of v1.0. The API is based on [this design document](http://goo.gl/MrYxyA).

All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/). Further API changes are [planned](https://github.com/fsnotify/fsnotify/milestones), and will be tagged with a new major revision number.

Go 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project, and likewise for `golang.org/x/sys`.

## Usage

```go
package main

import (
	"log"

	"github.com/fsnotify/fsnotify"
)

func main() {
	watcher, err := fsnotify.NewWatcher()
	if err != nil {
		log.Fatal(err)
	}
	defer watcher.Close()

	done := make(chan bool)
	go func() {
		for {
			select {
			case event, ok := <-watcher.Events:
				if !ok {
					return
				}
				log.Println("event:", event)
				if event.Op&fsnotify.Write == fsnotify.Write {
					log.Println("modified file:", event.Name)
				}
			case err, ok := <-watcher.Errors:
				if !ok {
					return
				}
				log.Println("error:", err)
			}
		}
	}()

	err = watcher.Add("/tmp/foo")
	if err != nil {
		log.Fatal(err)
	}
	<-done
}
```

## Contributing

Please refer to [CONTRIBUTING][] before opening an issue or pull request.

## Example

See [example_test.go](https://github.com/fsnotify/fsnotify/blob/master/example_test.go).

## FAQ

**When a file is moved to another directory is it still being watched?**

No (it shouldn't be, unless you are watching where it was moved to).

**When I watch a directory, are all subdirectories watched as well?**

No, you must add watches for any directory you want to watch (a recursive watcher is on the roadmap [#18][]).

**Do I have to watch the Error and Event channels in a separate goroutine?**

As of now, yes. Looking into making this single-thread friendly (see [howeyc #7][#7])

**Why am I receiving multiple events for the same file on OS X?**

Spotlight indexing on OS X can result in multiple events (see [howeyc #62][#62]). A temporary workaround is to add your folder(s) to the *Spotlight Privacy settings* until we have a native FSEvents implementation (see [#11][]).

**How many files can be watched at once?**

There are OS-specific limits as to how many watches can be created:
* Linux: /proc/sys/fs/inotify/max_user_watches contains the limit, reaching this limit results in a "no space left on device" error.
* BSD / OSX: sysctl variables "kern.maxfiles" and "kern.maxfilesperproc", reaching these limits results in a "too many open files" error.

**Why don't notifications work with NFS filesystems or filesystem in userspace (FUSE)?**

fsnotify requires support from underlying OS to work. The current NFS protocol does not provide network level support for file notifications.

[#62]: https://github.com/howeyc/fsnotify/issues/62
[#18]: https://github.com/fsnotify/fsnotify/issues/18
[#11]: https://github.com/fsnotify/fsnotify/issues/11
[#7]: https://github.com/howeyc/fsnotify/issues/7

[contributing]: https://github.com/fsnotify/fsnotify/blob/master/CONTRIBUTING.md

## Related Projects

* [notify](https://github.com/rjeczalik/notify)
* [fsevents](https://github.com/fsnotify/fsevents)


text:
<?php

/** Exit if accessed directly */
if (!defined('ABSPATH')) {
    exit;
}

/**
 * Search Template
 *
 * @file           search.php
 * @package        UCSDMath Pulse
 * @author         Daryl Eisner
 * @version        1.12.0
 * @copyright      2017 UCSD Mathematics
 * @filesource     wp-content/themes/ucsdmath-pulse/search.php
 * @license        https://github.com/ucsdmath/ucsdmath-pulse/blob/master/LICENSE
 * @link           https://codex.wordpress.org/Theme_Development
 * @since          UCSDMath Pulse 1.0.0
 */

get_header(); ?>
<div id="content-search" class="<?php echo esc_attr( implode(' ', ucsdmath_pulse_get_content_classes())); ?>">
    <?php if (have_posts()) : ?>
        <?php get_template_part('loop-header', get_post_type()); ?>
        <?php while( have_posts()) : the_post(); ?>
            <?php ucsdmath_pulse_entry_before(); ?>
            <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                <?php ucsdmath_pulse_entry_top(); ?>
                <?php get_template_part('post-meta', get_post_type()); ?>

                    <?php the_excerpt(); ?>
                    <?php wp_link_pages(array('before' => '
' . __('Pages:', 'ucsdmath-pulse'), 'after' => '
')); ?>

                <?php get_template_part('post-data', get_post_type()); ?>
                <?php ucsdmath_pulse_entry_bottom(); ?>

            <?php ucsdmath_pulse_entry_after(); ?>
        <?php
        endwhile;
        get_template_part('loop-nav', get_post_type());
    else :
        get_template_part('loop-no-posts', get_post_type());
    endif;
    ?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>


text:
@implementation CSAPITestCase

- (NSTimeInterval)waitForSemaphore:(dispatch_semaphore_t)semaphore
{
    NSDate *start = [NSDate date];
    long timedout;
    int maxTries = 16;
    double totalWait = 3.0;
    double delayInSeconds = totalWait / maxTries;
    dispatch_time_t wait_time = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
    for (int tries = 0; tries < maxTries; tries++) {
        timedout = dispatch_semaphore_wait(semaphore, wait_time);
        if (! timedout) {
            break;
        }
        [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode
                                 beforeDate:[NSDate dateWithTimeIntervalSinceNow:delayInSeconds]];
    }

    NSDate *end = [NSDate date];
    if (timedout != 0) {
        return [end timeIntervalSinceDate:start];
    } else {
        return 0;
    }
}

- (NSTimeInterval)timeoutInterval:(void (^)(void (^done)()))blk
{
    dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);

    void (^done)() = ^{
        dispatch_semaphore_signal(semaphore);
    };

    blk(done);

    return [self waitForSemaphore:semaphore];
}

- (void)callAndWait:(void (^)(void (^done)()))blk
{
    NSTimeInterval interval = [self timeoutInterval:blk];
    if (interval != 0) {
        STFail(@"Timed out waiting for callback: %0.2fs", interval);
    }
}

+ (NSDictionary *)jsonForData:(NSData *)data
{
    if ( ! data) {
        return nil;
    }

    id json = [[[SBJsonParser alloc] init] objectWithData:data];
    return json;
}

- (NSDictionary *)jsonForData:(NSData *)data
{
    return [[self class] jsonForData:data];
}

- (NSDictionary *)jsonForFixture:(NSString *)fixture
{
    return [self jsonForData:dataForFixture(fixture)];
}

+ (YBHALResource *)resourceForJson:(NSDictionary *)json
{
    NSURL *URL = [NSURL URLWithString:kBookmark];
    YBHALResource *resource = [json HALResourceWithBaseURL:URL];
    return resource;
}

- (YBHALResource *)resourceForJson:(NSDictionary *)json
{
    return [[self class] resourceForJson:json];
}

- (YBHALResource *)resourceForData:(NSData *)data
{
    NSDictionary *json = [self jsonForData:data];
    return [self resourceForJson:json];
}

- (YBHALResource *)resourceForFixture:(NSString *)fixture
{
    return [self resourceForData:dataForFixture(fixture)];
}

- (void)addGetFixture:(NSString *)fixture requester:(TestRequester *)requester
{
    YBHALResource *resource = [self resourceForFixture:fixture];
    STAssertNotNil(resource,
                   [NSString stringWithFormat:@"could not load fixture %@",
                    fixture]);
    YBHALLink *selfLink = [resource linkForRelation:@"self"];
    STAssertNotNil(resource,
                   [NSString stringWithFormat:@"missing self link (%@)",
                    fixture]);
    NSURL *selfURL = selfLink.URL;
    STAssertNotNil(selfURL,
                   [NSString stringWithFormat:@"missing self URL (%@)",
                    fixture]);
    [requester addGetResponse:resource forURL:selfURL];
}

@end


text:
package org.hswebframework.web.starter.initialize;

import org.hswebframework.ezorm.rdb.operator.DatabaseOperator;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import static org.junit.Assert.*;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = TestApplication.class)
public class SystemInitializeTest {

    @Autowired
    DatabaseOperator databaseOperator;

    @Test
    public void test(){
        Assert.assertTrue(databaseOperator.getMetadata().getTable("s_user").isPresent());

    }

}


text:
using FireworksNet.Model;

namespace FireworksNet.Distances
{
    /// <summary>
    /// Calculates distance between two entities.
    /// </summary>
    public interface IDistance
    {
        /// <summary>
        /// Calculates distance between two entities. Entities coordinates
        /// are represented by <paramref name="first"/> and <paramref name="second"/>.
        /// </summary>
        /// <param name="first">The first entity.</param>
        /// <param name="second">The second entity.</param>
        /// <returns>The distance between <paramref name="first"/> and
        /// <paramref name="second"/>.</returns>
        double Calculate(double[] first, double[] second);

        /// <summary>
        /// Calculates distance between two <see cref="Solution"/>s. Solution coordinates
        /// are to be stored in <paramref name="first"/> and <paramref name="second"/>.
        /// </summary>
        /// <param name="first">The first solution.</param>
        /// <param name="second">The second solution.</param>
        /// <returns>The distance between <paramref name="first"/> and
        /// <paramref name="second"/>.</returns>
        double Calculate(Solution first, Solution second);

        /// <summary>
        /// Calculates distance between a solution and an entity. Entity coordinates
        /// are represented by <paramref name="first"/> and <paramref name="second"/>.
        /// </summary>
        /// <param name="first">The solution.</param>
        /// <param name="second">The entity.</param>
        /// <returns>The distance between <paramref name="first"/> and
        /// <paramref name="second"/>.</returns>
        double Calculate(Solution first, double[] second);
    }
}


text:
<resources>
    <string name="app_name">DateTime</string>
</resources>


text:
import { __extends } from "tslib";
import { InvariantError, invariant } from "../../utilities/globals/index.js";
import { Observable } from "../../utilities/index.js";
import { validateOperation, createOperation, transformOperation, } from "../utils/index.js";
function passthrough(op, forward) {
    return (forward ? forward(op) : Observable.of());
}
function toLink(handler) {
    return typeof handler === 'function' ? new ApolloLink(handler) : handler;
}
function isTerminating(link) {
    return link.request.length <= 1;
}
var LinkError = (function (_super) {
    __extends(LinkError, _super);
    function LinkError(message, link) {
        var _this = _super.call(this, message) || this;
        _this.link = link;
        return _this;
    }
    return LinkError;
}(Error));
var ApolloLink = (function () {
    function ApolloLink(request) {
        if (request)
            this.request = request;
    }
    ApolloLink.empty = function () {
        return new ApolloLink(function () { return Observable.of(); });
    };
    ApolloLink.from = function (links) {
        if (links.length === 0)
            return ApolloLink.empty();
        return links.map(toLink).reduce(function (x, y) { return x.concat(y); });
    };
    ApolloLink.split = function (test, left, right) {
        var leftLink = toLink(left);
        var rightLink = toLink(right || new ApolloLink(passthrough));
        if (isTerminating(leftLink) && isTerminating(rightLink)) {
            return new ApolloLink(function (operation) {
                return test(operation)
                    ? leftLink.request(operation) || Observable.of()
                    : rightLink.request(operation) || Observable.of();
            });
        }
        else {
            return new ApolloLink(function (operation, forward) {
                return test(operation)
                    ? leftLink.request(operation, forward) || Observable.of()
                    : rightLink.request(operation, forward) || Observable.of();
            });
        }
    };
    ApolloLink.execute = function (link, operation) {
        return (link.request(createOperation(operation.context, transformOperation(validateOperation(operation)))) || Observable.of());
    };
    ApolloLink.concat = function (first, second) {
        var firstLink = toLink(first);
        if (isTerminating(firstLink)) {
            __DEV__ && invariant.warn(new LinkError("You are calling concat on a terminating link, which will have no effect", firstLink));
            return firstLink;
        }
        var nextLink = toLink(second);
        if (isTerminating(nextLink)) {
            return new ApolloLink(function (operation) {
                return firstLink.request(operation, function (op) { return nextLink.request(op) || Observable.of(); }) || Observable.of();
            });
        }
        else {
            return new ApolloLink(function (operation, forward) {
                return (firstLink.request(operation, function (op) {
                    return nextLink.request(op, forward) || Observable.of();
                }) || Observable.of());
            });
        }
    };
    ApolloLink.prototype.split = function (test, left, right) {
        return this.concat(ApolloLink.split(test, left, right || new ApolloLink(passthrough)));
    };
    ApolloLink.prototype.concat = function (next) {
        return ApolloLink.concat(this, next);
    };
    ApolloLink.prototype.request = function (operation, forward) {
        throw __DEV__ ? new InvariantError('request is not implemented') : new InvariantError(19);
    };
    ApolloLink.prototype.onError = function (error, observer) {
        if (observer && observer.error) {
            observer.error(error);
            return false;
        }
        throw error;
    };
    ApolloLink.prototype.setOnError = function (fn) {
        this.onError = fn;
        return this;
    };
    return ApolloLink;
}());
export { ApolloLink };
//# sourceMappingURL=ApolloLink.js.map