text:
<?php

namespace frontend\modules\bbii\models;

use frontend\modules\bbii\models\BbiiAR;
use frontend\modules\bbii\models\_query\BbiiForumQuery;

use Yii;

/**
 * This is the model class for table "bbii_forum".
 *
 * The followings are the available columns in table 'bbii_forum':
 * @property string $id
 * @property string $cat_id
 * @property string $name
 * @property string $subtitle
 * @property integer $type
 * @property integer $public
 * @property integer $moderated
 * @property integer $locked
 * @property integer $sort
 * @property integer $num_posts
 * @property integer $num_topics
 * @property integer $last_post_id
 * @property integer $membergroup_id
 * @property integer $poll
 */
class BbiiForum extends BbiiAR
{
    public static function find()
    {
        return new BbiiForumQuery(get_called_class());
    }

    /**
     * @return string the associated database table name
     */
    public static function tableName()
    {
        return 'bbii_forum';
    }

    /**
     * @return array validation rules for model attributes.
     */
    public function rules()
    {
        // NOTE: you should only define rules for those attributes that
        // will receive user inputs.
        // propert 'last_post_time' has been removed - DJE : 2015-05-20
        return [
            [['name'], 'required'],
            [['type', 'public', 'locked', 'moderated', 'sort', 'num_posts', 'num_topics', 'last_post_id', 'membergroup_id', 'poll'], 'integer'],
            [['name'], 'unique'],
            [['name', 'subtitle'],  'string', 'min' => 4,  'max' => 255],
            [['type'], 'validateType'],
            [['cat_id', 'subtitle'], 'default',  'value' => null],
            [['public'], 'default',  'value' => 1],
            [['locked', 'membergroup_id', 'poll'], 'default',  'value' => 0],
            [['name', 'subtitle', 'type', 'sort', 'num_posts', 'num_topics', 'last_post_id', 'membergroup_id', 'poll'], 'safe'],

            [['id', 'cat_id', 'name', 'subtitle', 'type', 'sort', 'num_posts', 'num_topics', 'last_post_id', 'membergroup_id', 'poll'], 'safe',  'on' => 'search'],
        ];
    }

    public function validateType($attr, $params) {
        if ($this->type == 0 && !empty($this->cat_id)) {
            $this->addError('cat_id', Yii::t('BbiiModule.bbii', 'A category cannot be assigned to a category.'));
        }
        if ($this->type == 1 && empty($this->cat_id)) {
            $this->addError('cat_id', Yii::t('BbiiModule.bbii', 'A forum needs to be assigned to a category.'));
        }
    }

    /**
     * @deprecated 2.7.5
     * @return array relational rules.
     */
    public function relations()
    {
        // NOTE: you may need to adjust the relation name and the related
        // class name for the relations automatically generated below.
        return array(
            'lastPost' => array(self::BELONGS_TO, 'BbiiPost', 'last_post_id'),
        );
    }

    /**
     * @return array customized attribute labels (name => label)
     */
    public function attributeLabels()
    {
        return array(
            'cat_id'         => Yii::t('BbiiModule.bbii', 'Category'),
            'id'             => 'ID',
            'last_post_id'   => 'Last Post',
            'locked'         => Yii::t('BbiiModule.bbii', 'Locked'),
            'membergroup_id' => Yii::t('BbiiModule.bbii', 'For member group'),
            'moderated'      => Yii::t('BbiiModule.bbii', 'Moderated'),
            'name'           => Yii::t('BbiiModule.bbii', 'Name'),
            'num_posts'      => Yii::t('BbiiModule.bbii', 'posts'),
            'num_topics'     => Yii::t('BbiiModule.bbii', 'topics'),
            'poll'           => Yii::t('BbiiModule.bbii', 'Poll'),
            'public'         => Yii::t('BbiiModule.bbii', 'Public'),
            'sort'           => 'Sort',
            'subtitle'       => Yii::t('BbiiModule.bbii', 'Subtitle'),
            'type'           => Yii::t('BbiiModule.bbii', 'Type'),
        );
    }

    /**
     * Retrieves a list of models based on the current search/filter conditions.
     *
     * @deprecated 2.1.5
     * @return ActiveDataProvider the data provider that can return the models based on the search/filter conditions.
     */
    /*public function search()
    {
        // Warning: Please modify the following code to remove attributes that
        // should not be searched.

        $criteria = new CDbCriteria;

        $criteria->compare('id',$this->id,true);
        $criteria->compare('cat_id',$this->cat_id,true);
        $criteria->compare('name',$this->name,true);
        $criteria->compare('subtitle',$this->subtitle,true);
        $criteria->compare('type',$this->type);
        $criteria->compare('sort',$this->sort);
        $criteria->compare('num_posts',$this->num_posts);
        $criteria->compare('num_topics',$this->num_topics);
        $criteria->compare('last_post_id',$this->last_post_id,true);
        $criteria->compare('poll',$this->poll,true);

        return new ActiveDataProvider($this, array(
            'criteria' => $criteria,
        ));
    }*/

    /**
     * Retrieves a list of models based on the current search/filter conditions.
     *
     * @param  [type] $params [description]
     * @return ActiveDataProvider The data provider that can return the models based on the search/filter conditions.
     */
    public function search($params = null) {
        $query        = BbiiForum::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        if (!($this->load($params) && $this->validate())) {
            return $dataProvider;
        }

        $this->addCondition('cat_id',        $this->cat_id,        true);
        $this->addCondition('id',            $this->id,            true);
        $this->addCondition('last_post_id',    $this->last_post_id,true);
        $this->addCondition('name',            $this->name,        true);
        $this->addCondition('num_posts',    $this->num_posts);
        $this->addCondition('num_topics',    $this->num_topics);
        $this->addCondition('poll',            $this->poll,        true);
        $this->addCondition('sort',            $this->sort);
        $this->addCondition('subtitle',        $this->subtitle,    true);
        $this->addCondition('type',            $this->type);

        return $dataProvider;
    }

    /**
     * [scopes description]
     *
     * @deprecated 2.0.1
     * @return [type] [description]
     */
    public function scopes() {
        return true;
        return array(
            'categories' => array(
                'condition' => 'type = 0',
                'order' => 'sort',
            ),
            'category' => array(
                'condition' => 'type = 0',
            ),
            'forum' => array(
                'condition' => 'type = 1',
            ),
            'public' => array(
                'condition' => 'public = 1',
            ),
            'sorted' => array(
                'order' => 'sort',
            ),
        );
    }

    public function membergroup($membergroup = 0) {
        $this->getDbCriteria()->mergeWith(array(
            'condition' => "(membergroup_id = 0 or membergroup_id = $membergroup)",
        ));
        return $this;
    }

    /**
     *
     * @version  2.1.1
     * @return
     */
    public static function getForumOptions() {
        $return = array();

        $groups = BbiiForum::find()->where('type = 0')->orderBy('sort')->all();
        foreach($groups as $group) {
            $forum = BbiiForum::find()->where('type = 1 and cat_id = ' . $group->id)->all();

            foreach($forum as $option) {
                if ($option->public || !\Yii::$app->user->isGuest) {
                    if ($option->membergroup_id == 0) {
                        $return[] = array('id' => $option->id,'name' => $option->name,'group' => $group->name);
                    } elseif (!\Yii::$app->user->isGuest) {
                        $groupId = BbiiMember::find(\Yii::$app->user->identity->id )->one()->group_id;
                        if ($option->membergroup_id == $groupId) {
                            $return[] = array('id' => $option->id,'name' => $option->name,'group' => $group->name);
                        }
                    }
                }
            }
        }
        return $return;
    }

    public static function getAllForumOptions() {
        $return = array();
        // $criteria = new CDbCriteria;
        // $criteria->condition = 'type = 0';
        // $criteria->order = 'sort';
        // $category = BbiiForum::find()->findAll($criteria);
        $category = BbiiForum::find()->where('type = 0')->orderBy('sort')->all();
        foreach($category as $group) {
            //$criteria->condition = 'type = 1 and cat_id = ' . $group->id;
            //$forum = BbiiForum::find()->findAll($criteria);
            $forum = BbiiForum::find()->where('type = 1 and cat_id = ' . $group->id)->all();
            foreach($forum as $option) {
                $return[] = array('id' => $option->id,'name' => $option->name,'group' => $group->name);
            }
        }
        return $return;
    }

    public function getLastPost()
    {

        return $this->hasOne(BbiiPost::className(), ['id' => 'last_post_id']);
    }
}


text:
using System.Web;
using System.Web.Mvc;

namespace BioInfo.Web.ExternalWeb
{
    public class FilterConfig
    {
        public static void RegisterGlobalFilters(GlobalFilterCollection filters)
        {
            filters.Add(new HandleErrorAttribute());
        }
    }
}

redpajama_set_name: RedPajamaGithub


text:
NS_ASSUME_NONNULL_BEGIN

@class DWDPContactsItemsFactory;
@class NSFetchedResultsController;

@interface DWContactsSearchDataSourceObject : NSObject <DWContactsDataSource>

- (instancetype)initWithContactRequestsFRC:(NSFetchedResultsController *)contactRequestsFRC
                               contactsFRC:(NSFetchedResultsController *)contactsFRC
                              itemsFactory:(DWDPContactsItemsFactory *)itemsFactory
                              trimmedQuery:(NSString *)trimmedQuery;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

@end

NS_ASSUME_NONNULL_END


text:
.class Landroid/widget/RemoteViews$SetPendingIntentTemplate;
.super Landroid/widget/RemoteViews$Action;
.source "RemoteViews.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/widget/RemoteViews;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "SetPendingIntentTemplate"
.end annotation

# static fields
.field public static final TAG:I = 0x8

# instance fields
.field pendingIntentTemplate:Landroid/app/PendingIntent;

.field final synthetic this$0:Landroid/widget/RemoteViews;

.field viewId:I

# direct methods
.method public constructor <init>(Landroid/widget/RemoteViews;ILandroid/app/PendingIntent;)V
    .locals 1
    .parameter
    .parameter "id"
    .parameter "pendingIntentTemplate"

    .prologue
    .line 346
    iput-object p1, p0, Landroid/widget/RemoteViews$SetPendingIntentTemplate;->this$0:Landroid/widget/RemoteViews;

    const/4 v0, 0x0

    invoke-direct {p0, v0}, Landroid/widget/RemoteViews$Action;-><init>(Landroid/widget/RemoteViews$1;)V

    .line 347
    iput p2, p0, Landroid/widget/RemoteViews$SetPendingIntentTemplate;->viewId:I

    .line 348
    iput-object p3, p0, Landroid/widget/RemoteViews$SetPendingIntentTemplate;->pendingIntentTemplate:Landroid/app/PendingIntent;

    .line 349
    return-void
.end method

.method public constructor <init>(Landroid/widget/RemoteViews;Landroid/os/Parcel;)V
    .locals 1
    .parameter
    .parameter "parcel"

    .prologue
    .line 351
    iput-object p1, p0, Landroid/widget/RemoteViews$SetPendingIntentTemplate;->this$0:Landroid/widget/RemoteViews;

    const/4 v0, 0x0

    invoke-direct {p0, v0}, Landroid/widget/RemoteViews$Action;-><init>(Landroid/widget/RemoteViews$1;)V

    .line 352
    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v0

    iput v0, p0, Landroid/widget/RemoteViews$SetPendingIntentTemplate;->viewId:I

    .line 353
    invoke-static {p2}, Landroid/app/PendingIntent;->readPendingIntentOrNullFromParcel(Landroid/os/Parcel;)Landroid/app/PendingIntent;

    move-result-object v0

    iput-object v0, p0, Landroid/widget/RemoteViews$SetPendingIntentTemplate;->pendingIntentTemplate:Landroid/app/PendingIntent;

    .line 354
    return-void
.end method

# virtual methods
.method public apply(Landroid/view/View;Landroid/view/ViewGroup;Landroid/widget/RemoteViews$OnClickHandler;)V
    .locals 6
    .parameter "root"
    .parameter "rootParent"
    .parameter "handler"

    .prologue
    .line 364
    iget v3, p0, Landroid/widget/RemoteViews$SetPendingIntentTemplate;->viewId:I

    invoke-virtual {p1, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    .line 365
    .local v2, target:Landroid/view/View;
    if-nez v2, :cond_0

    .line 420
    :goto_0
    return-void

    .line 368
    :cond_0
    instance-of v3, v2, Landroid/widget/AdapterView;

    if-eqz v3, :cond_1

    move-object v0, v2

    .line 369
    check-cast v0, Landroid/widget/AdapterView;

    .line 371
    .local v0, av:Landroid/widget/AdapterView;,"Landroid/widget/AdapterView<*>;"
    new-instance v1, Landroid/widget/RemoteViews$SetPendingIntentTemplate$1;

    invoke-direct {v1, p0, p3}, Landroid/widget/RemoteViews$SetPendingIntentTemplate$1;-><init>(Landroid/widget/RemoteViews$SetPendingIntentTemplate;Landroid/widget/RemoteViews$OnClickHandler;)V

    .line 413
    .local v1, listener:Landroid/widget/AdapterView$OnItemClickListener;
    invoke-virtual {v0, v1}, Landroid/widget/AdapterView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 414
    iget-object v3, p0, Landroid/widget/RemoteViews$SetPendingIntentTemplate;->pendingIntentTemplate:Landroid/app/PendingIntent;

    invoke-virtual {v0, v3}, Landroid/widget/AdapterView;->setTag(Ljava/lang/Object;)V

    goto :goto_0

    .line 416
    .end local v0           #av:Landroid/widget/AdapterView;,"Landroid/widget/AdapterView<*>;"
    .end local v1           #listener:Landroid/widget/AdapterView$OnItemClickListener;
    :cond_1
    const-string v3, "RemoteViews"

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "Cannot setPendingIntentTemplate on a view which is notan AdapterView (id: "

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    iget v5, p0, Landroid/widget/RemoteViews$SetPendingIntentTemplate;->viewId:I

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, ")"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-static {v3, v4}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method

.method public writeToParcel(Landroid/os/Parcel;I)V
    .locals 2
    .parameter "dest"
    .parameter "flags"

    .prologue
    .line 357
    const/16 v0, 0x8

    invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeInt(I)V

    .line 358
    iget v0, p0, Landroid/widget/RemoteViews$SetPendingIntentTemplate;->viewId:I

    invoke-virtual {p1, v0}, Landroid/os/Parcel;->writeInt(I)V

    .line 359
    iget-object v0, p0, Landroid/widget/RemoteViews$SetPendingIntentTemplate;->pendingIntentTemplate:Landroid/app/PendingIntent;

    const/4 v1, 0x0

    invoke-virtual {v0, p1, v1}, Landroid/app/PendingIntent;->writeToParcel(Landroid/os/Parcel;I)V

    .line 360
    return-void
.end method


text:
/* ###
 * IP: GHIDRA
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package agent.lldb.model.iface2;

import java.util.concurrent.CompletableFuture;

import SWIG.SBMemoryRegionInfo;
import ghidra.dbg.target.TargetMemory;
import ghidra.program.model.address.Address;

public interface LldbModelTargetMemoryContainer extends LldbModelTargetObject, TargetMemory {

	public LldbModelTargetMemoryRegion getTargetMemory(SBMemoryRegionInfo region);

	@Override
	public CompletableFuture<byte[]> readMemory(Address address, int length);

	@Override
	public CompletableFuture<Void> writeMemory(Address address, byte[] data);

}


text:
{% extends "mapentity/mapentity_form.html" %}
{% load i18n crispy_forms_tags %}

{% block mainform %}
    <form id="mainform" action="{% if object.pk %}{{ object.get_update_url }}{% else %}{{ object.get_add_url }}{% endif %}" class="form-horizontal" method="POST">

    {% crispy form %}

    <fieldset class="formset">
        {{ funding_formset.management_form }}
        {% for funding_form in funding_formset %}
            <div class="form-row inline controls controls-row {{ funding_formset.prefix }}">
            {% crispy funding_form %}
            </div>
        {% endfor %}
    </fieldset>

    </form>
{% endblock mainform %}

{% block extrabody %}
{{ block.super }}
<script type="text/javascript">
$(function() {
    // TODO: do this with crispyforms !
    $("fieldset.formset").detach().appendTo('#mainform fieldset');

    $(".clearfix").removeClass("clearfix");

    $('.form-row.inline.{{ funding_formset.prefix }}').formset({
        prefix: '{{ funding_formset.prefix }}',
        keepFieldValues: "[name='csrfmiddlewaretoken']",
        addCssClass: 'btn btn-success add-row',
        deleteCssClass: 'delete-row',
        addText: '{% trans "Add funding" %}',
        deleteText: '{% trans "Remove" %}',
    })
})
</script>
{% endblock extrabody %}


text:
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
  <msapplication>
    <tile>
      <square70x70logo src="/img/icons/favicon-76.png"/>
      <square150x150logo src="/img/icons/favicon-228.png"/>
      <TileColor>#ffffff</TileColor>
    </tile>
  </msapplication>
</browserconfig>


text:
# [redux-storage][]

[![build](https://travis-ci.org/michaelcontento/redux-storage.svg?branch=master)](https://travis-ci.org/michaelcontento/redux-storage)
[![dependencies](https://david-dm.org/michaelcontento/redux-storage.svg)](https://david-dm.org/michaelcontento/redux-storage)
[![devDependencies](https://david-dm.org/michaelcontento/redux-storage/dev-status.svg)](https://david-dm.org/michaelcontento/redux-storage#info=devDependencies)

[![license](https://img.shields.io/npm/l/redux-storage.svg?style=flat-square)](https://www.npmjs.com/package/redux-storage)
[![npm version](https://img.shields.io/npm/v/redux-storage.svg?style=flat-square)](https://www.npmjs.com/package/redux-storage)
[![npm downloads](https://img.shields.io/npm/dm/redux-storage.svg?style=flat-square)](https://www.npmjs.com/package/redux-storage)
[![Code Climate](https://codeclimate.com/github/michaelcontento/redux-storage/badges/gpa.svg)](https://codeclimate.com/github/michaelcontento/redux-storage)

Save and load the [Redux][] state with ease.

# Moved to the react-stack organisation

My focus has left the node / react ecosystem and this module has got a new home
over at [react-stack](https://github.com/react-stack/redux-storage)!
## Features

* Flexible storage engines
    * [localStorage][]: based on window.localStorage
        * Or for environments without `Promise` support [localStorageFakePromise][]
    * [reactNativeAsyncStorage][]: based on `react-native/AsyncStorage`
* Flexible state merger functions
    * [simple][merger-simple]: merge plain old JS structures (default)
    * [immutablejs][merger-immutablejs]: merge plain old JS **and** [Immutable][]
        objects
* Storage engines can be async
* Load and save actions that can be observed
    * [SAVE][]: `{ type: 'REDUX_STORAGE_SAVE', payload: /* state tree */ }`
    * [LOAD][]: `{ type: 'REDUX_STORAGE_LOAD', payload: /* state tree */ }`
* Various engine decorators
    * [debounce][]: batch multiple save operations
    * [engines][]: use different storage types
    * [filter][]: only store a subset of the whole state tree
    * [immutablejs][]: load parts of the state tree as [Immutable][] objects
    * [migrate][]: versioned storage with migrations
* Black- and whitelist actions from issuing a save operation

## Installation

    npm install --save redux-storage

And you need to install at least one [redux-storage-engine][npm-engine], as
[redux-storage][] is only the *"management core"*.

## Usage

```js
import * as storage from 'redux-storage'

// Import redux and all your reducers as usual
import { createStore, applyMiddleware, combineReducers } from 'redux';
import * as reducers from './reducers';

// We need to wrap the base reducer, as this is the place where the loaded
// state will be injected.
//
// Note: The reducer does nothing special! It just listens for the LOAD
//       action and merge in the provided state :)
// Note: A custom merger function can be passed as second argument
const reducer = storage.reducer(combineReducers(reducers));

// Now it's time to decide which storage engine should be used
//
// Note: The arguments to `createEngine` are different for every engine!
import createEngine from 'redux-storage-engine-localstorage';
const engine = createEngine('my-save-key');

// And with the engine we can create our middleware function. The middleware
// is responsible for calling `engine.save` with the current state afer
// every dispatched action.
//
// Note: You can provide a list of action types as second argument, those
//       actions will be filtered and WON'T trigger calls to `engine.save`!
const middleware = storage.createMiddleware(engine);

// As everything is prepared, we can go ahead and combine all parts as usual
const createStoreWithMiddleware = applyMiddleware(middleware)(createStore);
const store = createStoreWithMiddleware(reducer);

// At this stage the whole system is in place and every action will trigger
// a save operation.
//
// BUT (!) an existing old state HAS NOT been restored yet! It's up to you to
// decide when this should happen. Most of the times you can/should do this
// right after the store object has been created.

// To load the previous state we create a loader function with our prepared
// engine. The result is a function that can be used on any store object you
// have at hand :)
const load = storage.createLoader(engine);
load(store);

// Notice that our load function will return a promise that can also be used
// to respond to the restore event.
load(store)
    .then((newState) => console.log('Loaded state:', newState))
    .catch(() => console.log('Failed to load previous state'));
```

## Details

### Engines, Decorators & Mergers

They all are published as own packages on npm. But as a convention all engines
share the keyword [redux-storage-engine][npm-engine], decorators can be found
with [redux-storage-decorator][npm-decorator] and mergers with
[redux-storage-merger][npm-merger]. So it's pretty trivial to find all
the additions to [redux-storage][] you need :smile:

### Actions

[redux-storage][] will trigger actions after every load or save operation from
the underlying engine.

You can use this, for example, to display a loading screen until the old state
has been restored like this:

```js
import { LOAD, SAVE } from 'redux-storage';

function storageAwareReducer(state = { loaded: false }, action) {
    switch (action.type) {
        case LOAD:
            return { ...state, loaded: true };

        case SAVE:
            console.log('Something has changed and written to disk!');

        default:
            return state;
    }
}
```

### Middleware

If you pass an array of action types as second argument to `createMiddleware`,
those will be added to a internal blacklist and won't trigger calls to
`engine.save`.

```js
import { createMiddleware } from 'redux-storage'

import { APP_START } from './constants';

const middleware = createMiddleware(engine, [ APP_START ]);
```

If you want to whitelist all actions that are allowed to issue a `engine.save`,
just specify them as third argument.

```js
import { createMiddleware } from 'redux-storage'

import { SHOULD_SAVE } from './constants';

const middleware = createMiddleware(engine, [], [ SHOULD_SAVE ]);
```

## License

    The MIT License (MIT)

    Copyright (c) 2015 Michael Contento

    Permission is hereby granted, free of charge, to any person obtaining a copy of
    this software and associated documentation files (the "Software"), to deal in
    the Software without restriction, including without limitation the rights to
    use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
    the Software, and to permit persons to whom the Software is furnished to do so,
    subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
    FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
    COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
    IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
    CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

  [merger-simple]: https://github.com/michaelcontento/redux-storage-merger-simple
  [merger-immutablejs]: https://github.com/michaelcontento/redux-storage-merger-immutablejs
  [npm-engine]: https://www.npmjs.com/browse/keyword/redux-storage-engine
  [npm-decorator]: https://www.npmjs.com/browse/keyword/redux-storage-decorator
  [npm-merger]: https://www.npmjs.com/browse/keyword/redux-storage-merger
  [Redux]: https://github.com/gaearon/redux
  [Immutable]: https://github.com/facebook/immutable-js
  [redux-storage]: https://github.com/michaelcontento/redux-storage
  [react-native]: https://facebook.github.io/react-native/
  [localStorage]: https://github.com/michaelcontento/redux-storage-engine-localStorage
  [localStorageFakePromise]: https://github.com/michaelcontento/redux-storage-engine-localStorageFakePromise
  [reactNativeAsyncStorage]: https://github.com/michaelcontento/redux-storage-engine-reactNativeAsyncStorage
  [LOAD]: https://github.com/michaelcontento/redux-storage/blob/master/src/constants.js#L1
  [SAVE]: https://github.com/michaelcontento/redux-storage/blob/master/src/constants.js#L2
  [debounce]: https://github.com/michaelcontento/redux-storage-decorator-debounce
  [engines]: https://github.com/allegro/redux-storage-decorator-engines
  [filter]: https://github.com/michaelcontento/redux-storage-decorator-filter
  [migrate]: https://github.com/mathieudutour/redux-storage-decorator-migrate
  [immutablejs]: https://github.com/michaelcontento/redux-storage-decorator-immutablejs


text:
<?php

namespace Sentient\Data\Metadata\Annotation;

use Doctrine\Common\Annotations\Annotation;

/**
 * Class EntityName
 * @package Sentient\Data\Metadata\Annotation
 * @Annotation
 */
class EntityName extends Annotation {

}


text:
using System.Web;
using System.Web.Http.WebHost;
using System.Web.Routing;
using System.Web.SessionState;

namespace Umbraco.Web.WebApi
{
    /// <summary>
    /// A custom WebApi route handler that enables session on the HttpContext - use with caution!
    /// </summary>
    /// <remarks>
    /// WebApi controllers (and REST in general) shouldn't have session state enabled since it's stateless,
    /// enabling session state puts additional locks on requests so only use this when absolutely needed
    /// </remarks>
    internal class SessionHttpControllerRouteHandler : HttpControllerRouteHandler
    {
        protected override IHttpHandler GetHttpHandler(RequestContext requestContext)
        {
            return new SessionHttpControllerHandler(requestContext.RouteData);
        }

        /// <summary>
        /// A custom WebApi handler that enables session on the HttpContext
        /// </summary>
        private class SessionHttpControllerHandler : HttpControllerHandler, IRequiresSessionState
        {
            public SessionHttpControllerHandler(RouteData routeData) : base(routeData)
            { }
        }
    }
}


text:
AngularJS introspection utilities

## Overview

AngularJS ships with various functions to check types, such as `angular.isNumber()`, `angular.isUndefined()`, and `angular.isElement()`.  This extension adds many functions to AngularJS' builtins, including a general-purpose [type-checking function](#type) and a [cloning function](#clone).

This is particularly useful if you want the type-checking functionality of Lo-Dash or Underscore, but without the libraries themselves.  Many of these functions were derived from Lo-Dash implementations.

### Type-Checking Functions

Each of these functions accept a value and return a boolean.

- `isNull()` / `isNotNull()`
- `isBoolean()` / `isNotBoolean()`
- `isNaN()` / `isNotNaN()`
- `isFinite()` / `isNotFinite()`
- `isInfinite()` / `isNotInfinite()`
- `isArguments()` / `isNotArguments()`
- `isRegExp()` / `isNotRegExp()`
- `isEmpty()` / `isNotEmpty()`
- `isInteger()` / `isNotInteger()`
- `isFloat()` / `isNotFloat()`
- `isObjectish()` / `isNotObjectish()` (returns `true` if the value is not `null` and may contain properties)

In addition, the negation of the AngularJS built-ins are provided:

- `isNotUndefined()`
- `isNotArray()`
- `isNotDate()`
- `isNotElement()`
- `isNotObject()`
- `isNotString()`
- `isNotFunction()`
- `isNotNumber()`

### `type()`

The `type()` function will accept a value and return one of the following strings:

`null`, `string`, `array`, `date`, `regexp`, `arguments`, `boolean`, `number`, `undefined`, `function`, `element`, `object`

> An `element` is considered to be a DOM node, jqLite object, or jQuery object.

### `clone()`

The `clone()` function will return a deep clone of some value.  This differs from `angular.copy()` in the following ways:

- Simply returns the cloned value; does not accept a `destination` parameter.
- Works on DOM nodes, jqLite elements or jQuery objects.
- If a nested value implements a `clone()` function, that function will be called.  This is useful for complex nested objects.
- Calls `angular.copy()` internally so your `$$hashKey`s are not befouled.
- Accepts an optional second Object parameter, `extra`, which can be extended onto the clone.  This is useful, for example, if you have a unique identifier in an object, and wish to re-generate it.

## Usage (Browser)

In the browser, if not using AMD, the functions are attached to the `angular` object as to not further pollute the global scope.

```js
var foo = {
  bar: 1,
  baz: function() {
    return this.bar + 1;
  }
};

angular.isInteger(foo.bar);           // true
angular.type(foo.bar);                // 'number'
angular.isNotFunction(foo.baz);       // false
angular.type(foo.baz);                // 'function'

// example of using second parameter
angular.clone(foo, {bar: 2}).baz();   // 3
```

## Usage (CommonJS/NodeJS)

In a NodeJS context, `require()` the `angular-types` module.

```js
var types = require('angular-types'),
  quux = 1;

types.isInteger(quux);
```

## Usage (AMD/RequireJS)

Using RequireJS, just require `types`.

```js
define(['/path/to/types'], function(types) {
  var quux = 1;
  types.isInteger(quux);
});
```

## Installation

If using in NodeJS (a la Browserify):

```
npm install angular-types
```

Otherwise, use Bower:

```
bower install angular-types
```

## Author

[Christopher Hiller](http://boneskull.github.io)

## License

Copyright © 2014 Decipher, Inc.  Licensed MIT


text:
set -xe

# Default Gradle settings are not optimal for Android builds, override them
# here to make the most out of the GitHub Actions build servers
GRADLE_OPTS="$GRADLE_OPTS -Xms4g -Xmx4g"
GRADLE_OPTS="$GRADLE_OPTS -XX:MaxMetaspaceSize=512m"
GRADLE_OPTS="$GRADLE_OPTS -XX:+HeapDumpOnOutOfMemoryError"
GRADLE_OPTS="$GRADLE_OPTS -Dfile.encoding=UTF-8"
export GRADLE_OPTS

# Crawl all gradlew files which indicate an Android project
# You may edit this if your repo has a different project structure
for GRADLEW in `find . -name "gradlew"` ; do
    SAMPLE=$(dirname "${GRADLEW}")
    # Tell Gradle that this is a CI environment and disable parallel compilation
    bash "$GRADLEW" -p "$SAMPLE" -Pci --no-parallel --stacktrace $@
done


text:
namespace BonDriver_DVB {

#define MAX_CH				128
#define MAX_CN_LEN			64

#define TS_SYNC_BYTE		0x47
#define TS_PKTSIZE			188
#define TTS_PKTSIZE			192
#define TS_FEC_PKTSIZE		204
#define TTS_FEC_PKTSIZE		208
#define TS_BUFSIZE			(TS_PKTSIZE * 256)
#define TS_FIFOSIZE			512
#define WAIT_TIME			10	// デバイスからのread()でエラーが発生した場合の、次のread()までの間隔(ms)
#define TUNER_NAME			"BonDriver_DVB"

////////////////////////////////////////////////////////////////////////////////

#include "Common.h"
static const size_t g_TsFifoSize = TS_FIFOSIZE;
#include "TsQueue.h"

////////////////////////////////////////////////////////////////////////////////

struct stFrequency {
	int frequencyno;
	unsigned int tsid;
};

struct stChannel {
	char strChName[MAX_CN_LEN];
	stFrequency freq;
	DWORD ServiceID;	// WORDで良いんだけどアライメント入るとどうせ同じなので
	BOOL bUnused;
};

class cBonDriverDVB : public IBonDriver2 {
	pthread_cond_t m_c;
	pthread_mutex_t m_m;
	cTSFifo m_fifoTS;
	cRawTSFifo m_fifoRawTS;
	TS_DATA *m_LastBuf;
	cCriticalSection m_writeLock;
	char m_TunerName[64];
	BOOL m_bTuner;
	float m_fCNR;
	DWORD m_dwSpace;
	DWORD m_dwChannel;
	DWORD m_dwServiceID;
	int m_fefd;
	int m_dmxfd;
	int m_dvrfd;
	pthread_t m_hTsRead;
	pthread_t m_hTsSplit;
	DWORD m_tRet;
	volatile BOOL m_bStopTsRead;
	volatile BOOL m_bChannelChanged;
	volatile BOOL m_bUpdateCNR;
	cEvent m_StopTsSplit;
	DWORD m_dwUnitSize;
	DWORD m_dwSyncBufPos;
	BYTE m_SyncBuf[256];

	void TsFlush(BOOL bUseServiceID)
	{
		m_fifoTS.Flush();
		if (bUseServiceID)
			m_fifoRawTS.Flush();
	}
	static void *TsReader(LPVOID pv);
	static void *TsSplitter(LPVOID pv);
	BOOL TsSync(BYTE *pSrc, DWORD dwSrc, BYTE **ppDst, DWORD *pdwDst);
	static inline unsigned short GetPID(BYTE *p){ return (((unsigned short)(p[0] & 0x1f) << 8) | p[1]); }
	static inline unsigned short GetSID(BYTE *p){ return (((unsigned short)p[0] << 8) | p[1]); }

public:
	static cCriticalSection m_sInstanceLock;
	static cBonDriverDVB *m_spThis;
	static BOOL m_sbInit;

	cBonDriverDVB();
	virtual ~cBonDriverDVB();

	// IBonDriver
	const BOOL OpenTuner(void);
	void CloseTuner(void);
	const BOOL SetChannel(const BYTE bCh);
	const float GetSignalLevel(void);
	const DWORD WaitTsStream(const DWORD dwTimeOut = 0);
	const DWORD GetReadyCount(void);
	const BOOL GetTsStream(BYTE *pDst, DWORD *pdwSize, DWORD *pdwRemain);
	const BOOL GetTsStream(BYTE **ppDst, DWORD *pdwSize, DWORD *pdwRemain);
	void PurgeTsStream(void);
	void Release(void);

	// IBonDriver2
	LPCTSTR GetTunerName(void);
	const BOOL IsTunerOpening(void);
	LPCTSTR EnumTuningSpace(const DWORD dwSpace);
	LPCTSTR EnumChannelName(const DWORD dwSpace, const DWORD dwChannel);
	const BOOL SetChannel(const DWORD dwSpace, const DWORD dwChannel);
	const DWORD GetCurSpace(void);
	const DWORD GetCurChannel(void);
};

}
#endif	// _BONDRIVER_DVB_H_


text:
<?php

declare(strict_types=1);

namespace GrumPHP\Event;

use GrumPHP\Task\Context\ContextInterface;
use GrumPHP\Task\TaskInterface;
use Symfony\Component\EventDispatcher\Event;

class TaskEvent extends Event
{
    /**
     * @var TaskInterface
     */
    private $task;

    /**
     * @var ContextInterface
     */
    private $context;

    public function __construct(TaskInterface $task, ContextInterface $context)
    {
        $this->task = $task;
        $this->context = $context;
    }

    public function getTask(): TaskInterface
    {
        return $this->task;
    }

    public function getContext(): ContextInterface
    {
        return $this->context;
    }
}


text:
/**
@module ember
*/

import compile from './compile';

export interface BootstrapOptions {
  context?: NodeSelector;
  hasTemplate(templateName: string): boolean;
  setTemplate(templateName: string, template: string): void;
}

/**
  Find templates stored in the head tag as script tags and make them available
  to `Ember.CoreView` in the global `Ember.TEMPLATES` object.

  Script tags with `text/x-handlebars` will be compiled
  with Ember's template compiler and are suitable for use as a view's template.

  @private
  @method bootstrap
  @for Ember.HTMLBars
  @static
  @param ctx
*/
function bootstrap({ context, hasTemplate, setTemplate }: BootstrapOptions) {
  if (!context) {
    context = document;
  }

  let selector = 'script[type="text/x-handlebars"]';

  let elements = context.querySelectorAll(selector);

  for (let i = 0; i < elements.length; i++) {
    let script = elements[i];

    // Get the name of the script
    // First look for data-template-name attribute, then fall back to its
    // id if no name is found.
    let templateName =
      script.getAttribute('data-template-name') || script.getAttribute('id') || 'application';
    let template;

    template = compile(script.innerHTML, {
      moduleName: templateName,
    });

    // Check if template of same name already exists.
    if (hasTemplate(templateName)) {
      throw new Error(`Template named "${templateName}" already exists.`);
    }

    // For templates which have a name, we save them and then remove them from the DOM.
    setTemplate(templateName, template);

    // Remove script tag from DOM.
    script.parentNode!.removeChild(script);
  }
}

export default bootstrap;


text:
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

'use strict';

base.require('tracks.container_track');
base.require('tracks.slice_track');
base.require('filter');
base.require('model');
base.require('ui');
base.exportTo('tracing.tracks', function() {

  /**
   * Visualizes a Cpu using a series of of SliceTracks.
   * @constructor
   */
  var CpuTrack =
      tracing.ui.define(tracing.tracks.ContainerTrack);
  CpuTrack.prototype = {
    __proto__: tracing.tracks.ContainerTrack.prototype,

    decorate: function() {
      this.classList.add('cpu-track');
    },

    get cpu() {
      return this.cpu_;
    },

    set cpu(cpu) {
      this.cpu_ = cpu;
      this.updateChildTracks_();
    },

    get tooltip() {
      return this.tooltip_;
    },

    set tooltip(value) {
      this.tooltip_ = value;
      this.updateChildTracks_();
    },

    get heading() {
      return this.heading_;
    },

    set heading(h) {
      this.heading_ = h;
      this.updateChildTracks_();
    },

    applyCategoryFilter_: function() {
      if (this.categoryFilter.matchCpu(this.cpu_))
        this.updateChildTracks_();
      else
        this.visible = false;
    },

    updateChildTracks_: function() {
      this.detach();
      if (this.cpu_) {
        var slices = tracing.filterSliceArray(this.categoryFilter_,
                                              this.cpu_.slices);
        if (slices.length) {
          var track = new tracing.tracks.SliceTrack();
          track.slices = slices;
          track.heading = this.heading_;
          track.tooltip = this.tooltip_;
          this.addTrack_(track);
        }

        for (var counterName in this.cpu_.counters) {
          var counter = this.cpu_.counters[counterName];
          track = new tracing.tracks.CounterTrack();
          track.heading = 'CPU ' + this.cpu_.cpuNumber + ' ' +
              counter.name + ':';
          track.counter = counter;
          this.addTrack_(track);
        }
      }
      this.addControlButtonElements_(false);
    }
  };

  return {
    CpuTrack: CpuTrack
  };
});


text:
MOVE bin\* %LIBRARY_BIN%
MOVE include\* %LIBRARY_INC%
MOVE jre %LIBRARY_PREFIX%\jre
MOVE lib\* %LIBRARY_LIB%
MOVE src.zip %LIBRARY_PREFIX%\jre\src.zip

:: ensure that JAVA_HOME is set correctly
mkdir %PREFIX%\etc\conda\activate.d
echo set "JAVA_HOME_CONDA_BACKUP=%%JAVA_HOME%%" > "%PREFIX%\etc\conda\activate.d\java_home.bat"
echo set "JAVA_HOME=%%CONDA_PREFIX%%\Library" >> "%PREFIX%\etc\conda\activate.d\java_home.bat"
mkdir %PREFIX%\etc\conda\deactivate.d
echo set "JAVA_HOME=%%JAVA_HOME_CONDA_BACKUP%%" > "%PREFIX%\etc\conda\deactivate.d\java_home.bat"


text:
// -*- C++ -*-

// Copyright (C) 2007-2020 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either version 3, or (at your option) any later
// version.

// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Public License for more details.

// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.

// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

/** @file parallel/features.h
 *  @brief Defines on whether to include algorithm variants.
 *
 *  Less variants reduce executable size and compile time.
 *  This file is a GNU parallel extension to the Standard C++ Library.
 */

// Written by Johannes Singler.

#ifndef _GLIBCXX_PARALLEL_FEATURES_H
#define _GLIBCXX_PARALLEL_FEATURES_H 1

#ifndef _GLIBCXX_MERGESORT
/** @def _GLIBCXX_MERGESORT
 *  @brief Include parallel multi-way mergesort.
 *  @see __gnu_parallel::_Settings::sort_algorithm */
#define _GLIBCXX_MERGESORT 1
#endif

#ifndef _GLIBCXX_QUICKSORT
/** @def _GLIBCXX_QUICKSORT
 *  @brief Include parallel unbalanced quicksort.
 *  @see __gnu_parallel::_Settings::sort_algorithm */
#define _GLIBCXX_QUICKSORT 1
#endif

#ifndef _GLIBCXX_BAL_QUICKSORT
/** @def _GLIBCXX_BAL_QUICKSORT
 *  @brief Include parallel dynamically load-balanced quicksort.
 *  @see __gnu_parallel::_Settings::sort_algorithm */
#define _GLIBCXX_BAL_QUICKSORT 1
#endif

#ifndef _GLIBCXX_FIND_GROWING_BLOCKS
/** @brief Include the growing blocks variant for std::find.
 *  @see __gnu_parallel::_Settings::find_algorithm */
#define _GLIBCXX_FIND_GROWING_BLOCKS 1
#endif

#ifndef _GLIBCXX_FIND_CONSTANT_SIZE_BLOCKS
/** @brief Include the equal-sized blocks variant for std::find.
 *  @see __gnu_parallel::_Settings::find_algorithm */
#define _GLIBCXX_FIND_CONSTANT_SIZE_BLOCKS 1
#endif

#ifndef _GLIBCXX_FIND_EQUAL_SPLIT
/** @def _GLIBCXX_FIND_EQUAL_SPLIT
 *  @brief Include the equal splitting variant for std::find.
 *  @see __gnu_parallel::_Settings::find_algorithm */
#define _GLIBCXX_FIND_EQUAL_SPLIT 1
#endif

#ifndef _GLIBCXX_TREE_INITIAL_SPLITTING
/** @def _GLIBCXX_TREE_INITIAL_SPLITTING
 *  @brief Include the initial splitting variant for
 *  _Rb_tree::insert_unique(_IIter beg, _IIter __end).
 *  @see __gnu_parallel::_Rb_tree */
#define _GLIBCXX_TREE_INITIAL_SPLITTING 1
#endif

#ifndef _GLIBCXX_TREE_DYNAMIC_BALANCING
/** @def _GLIBCXX_TREE_DYNAMIC_BALANCING
 *  @brief Include the dynamic balancing variant for
 *  _Rb_tree::insert_unique(_IIter beg, _IIter __end).
 *  @see __gnu_parallel::_Rb_tree */
#define _GLIBCXX_TREE_DYNAMIC_BALANCING 1
#endif

#ifndef _GLIBCXX_TREE_FULL_COPY
/** @def _GLIBCXX_TREE_FULL_COPY
 *  @brief In order to sort the input sequence of
 *  _Rb_tree::insert_unique(_IIter beg, _IIter __end) a
 *  full copy of the input elements is done.
 *  @see __gnu_parallel::_Rb_tree */
#define _GLIBCXX_TREE_FULL_COPY 1
#endif

#endif /* _GLIBCXX_PARALLEL_FEATURES_H */


text:
package com.example.carcloud;

import com.example.carcloud.LightService.BoundStartedServiceBinder;

import android.support.v7.app.ActionBarActivity;
import android.app.Service;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends ActionBarActivity {
    private boolean serviceState;
    private ServiceConnection boundStartedServiceConnection;
    private static String TAG = "carcloud";
    private Service myService;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button b1 = (Button) findViewById(R.id.button1);

        boundStartedServiceConnection = new ServiceConnection() {
            @Override
            public void onServiceConnected(ComponentName name, IBinder service) {
                // TODO Auto-generated method stub
                Log.v(TAG, "Service bound");

            }

            @Override
            public void onServiceDisconnected(ComponentName name) {
                // TODO Auto-generated method stub
                Log.v(TAG, "Service disconnected");
            }
        };

        b1.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View arg0) {
                // TODO Auto-generated method stub
                if (serviceState == true) {
                    serviceState = false;
                    stopService(createExplizitIntent());
                }
            }

        });
        //serviceState = true;
        //startService(createExplizitIntent());
    }

    private Intent createExplizitIntent() {
        Intent explizitIntent = new Intent(LightService.MY_SERVICE);
        explizitIntent.setComponent(createComponentName());
        return explizitIntent;
    }
    private ComponentName createComponentName() {
        return new ComponentName("com.example.carcloud", "LightService");
    }

    @Override
    protected void onStart() {
        super.onStart();
        Intent intent = new Intent(this, LightService.class);
        //intent.setComponent(createComponentName());
        bindService(intent, boundStartedServiceConnection, Context.BIND_AUTO_CREATE);
    }

    @Override
    protected void onStop() {
        super.onStop();
        unbindService(boundStartedServiceConnection);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}


text:
package com.baidubce.services.batch.model;

import com.baidubce.auth.BceCredentials;
import com.baidubce.model.AbstractBceRequest;

/**
 * Provides option for describing a Batch-Compute Job. The essential option is job ID.
 */
public class GetJobRequest extends AbstractBceRequest {
    private String jobId;

    public String getJobId() {
        return jobId;
    }

    public void setJobId(String jobId) {
        this.jobId = jobId;
    }

    /**
     * Configure the job ID for the request.
     *
     * @param jobId The ID of Batch-Compute job.
     * @return GetJobRequest
     */
    public GetJobRequest withJobId(String jobId) {
        this.setJobId(jobId);
        return this;
    }

    /**
     * Configure request credential for the request.
     *
     * @param credentials a valid instance of BceCredentials.
     * @return GetJobRequest
     */
    public GetJobRequest withRequestCredentials(BceCredentials credentials) {
        this.setRequestCredentials(credentials);
        return this;
    }
}


text:
package zbxutils

import (
	"bytes"
	"fmt"
	"net"
	"strconv"
	"time"
)

const (
	DefaultAgentPort    = 10050                           // Default port for contacting the Zabbix Agent
	DefaultAgentHost    = "localhost"                     // Default host for contacting the Zabbix Agent
	DefaultAgentTimeout = time.Duration(30 * time.Second) // Default timeout when contacting the Zabbix Agent

	PingKey     = "agent.ping"     // The key to ping the remote zabbix agent
	HostnameKey = "agent.hostname" // The key to retrieve the hostname of the remote zabbix agent
	VersionKey  = "agent.version"  // The key to retrieve the version of the remote zabbix agent
)

// Agent represents a remote zabbix agent.
type Agent struct {
	host string
	port int
}

// Creates a new Agent on localhost with a default port of 10050.
func NewAgent() *Agent {
	return &Agent{host: DefaultAgentHost, port: DefaultAgentPort}
}

// Creates a new Agent with a custom host and default port of 10050.
func NewAgentHost(host string) *Agent {
	return &Agent{host: host, port: DefaultAgentPort}
}

// Creates a new Agent with a custom host and port.
func NewAgentHostPort(host string, port int) *Agent {
	return &Agent{host: host, port: port}
}

// Run the check (key) against the Zabbix agent with the default timeout
func (a *Agent) Get(key string) (*Payload, error) {
	return a.GetWithTimeout(key, DefaultAgentTimeout)
}

// Run the check (key) against the Zabbix agent with the specified timeout
func (a *Agent) GetWithTimeout(key string, timeout time.Duration) (*Payload, error) {
	conn, err := net.DialTimeout("tcp", a.hostPort(), timeout)
	if err != nil {
		return nil, err
	}
	defer conn.Close()

	_, err = fmt.Fprintf(conn, key)
	if err != nil {
		return nil, err
	}

	payload, err := NewPayloadFromReader(conn)
	if err != nil {
		return nil, err
	}

	if payload.NotSupported() {
		return payload, fmt.Errorf("%s is not supported", key)
	}

	return payload, nil
}

// Call agent.ping and verifies it returns "1" for success.
func (a *Agent) Ping() (bool, error) {
	payload, err := a.Get(PingKey)
	if err != nil {
		return false, err
	}

	success := bytes.Equal([]byte{'1'}, payload.Data)
	return success, nil
}

// Calls agent.hostname on the zabbix agent and returns the result.
func (a *Agent) Hostname() (string, error) {
	payload, err := a.Get(HostnameKey)
	if err != nil {
		return "", err
	}

	return string(payload.Data), nil
}

// Calls agent.version on the zabbix host and returns the result.
func (a *Agent) Version() (string, error) {
	payload, err := a.Get(VersionKey)
	if err != nil {
		return "", err
	}

	return string(payload.Data), nil
}

// Join host and port
func (a *Agent) hostPort() string {
	return net.JoinHostPort(a.host, strconv.Itoa(a.port))
}


text:
module FunkyApiClient
  module ApiCalls
    extend ActiveSupport::Concern

    included do
      extend FunkyApiClient::ResponseHandlers::ClassCallHandler
      include FunkyApiClient::ResponseHandlers::InstanceCallHandler
    end

    module ClassMethods
      def class_call(method_name, relative_path, plain_response = false)
        define_singleton_method(method_name) do |params: {}, headers: {}|
          path_parser = FunkyApiClient::PathParser.new(relative_path)
          response = FunkyApiClient::HttpRequest.perform(
            :get,
            path_parser.call(params),
            query: params.stringify_keys.except(*path_parser.ruote_keys),
            headers: headers
          )
          handle_class_call_response(response, plain_response)
        end
      end

      def instance_call(method_name, relative_path, method_type, serialization_method_name = nil)
        define_method(method_name) do |params: {}, headers: {}|
          path_parser = FunkyApiClient::PathParser.new(relative_path)
          response = FunkyApiClient::HttpRequest.perform(
            method_type,
            path_parser.call(params),
            query: params.stringify_keys.except(*path_parser.ruote_keys),
            body: serialization_method_name ? send(serialization_method_name) : nil,
            headers: headers
          )
          handle_instance_call_response(response)
        end
      end
    end
  end
end


text:
class FilePath;
class Profile;

namespace content {
class NavigationController;
}

namespace extensions {

// Downloads and installs extensions from the web store.
class WebstoreInstaller :public content::NotificationObserver,
                         public content::DownloadItem::Observer,
                         public base::RefCountedThreadSafe<
  WebstoreInstaller, content::BrowserThread::DeleteOnUIThread> {
 public:
  enum Flag {
    FLAG_NONE = 0,

    // Inline installs trigger slightly different behavior (install source
    // is different, download referrers are the item's page in the gallery).
    FLAG_INLINE_INSTALL = 1 << 0
  };

  enum FailureReason {
    FAILURE_REASON_CANCELLED,
    FAILURE_REASON_OTHER
  };

  class Delegate {
   public:
    virtual void OnExtensionDownloadStarted(const std::string& id,
                                            content::DownloadItem* item);
    virtual void OnExtensionDownloadProgress(const std::string& id,
                                             content::DownloadItem* item);
    virtual void OnExtensionInstallSuccess(const std::string& id) = 0;
    virtual void OnExtensionInstallFailure(const std::string& id,
                                           const std::string& error,
                                           FailureReason reason) = 0;

   protected:
    virtual ~Delegate() {}
  };

  // Contains information about what parts of the extension install process can
  // be skipped or modified. If one of these is present, it means that a CRX
  // download was initiated by WebstoreInstaller. The Approval instance should
  // be checked further for additional details.
  struct Approval : public base::SupportsUserData::Data {
    static scoped_ptr<Approval> CreateWithInstallPrompt(Profile* profile);
    static scoped_ptr<Approval> CreateWithNoInstallPrompt(
        Profile* profile,
        const std::string& extension_id,
        scoped_ptr<base::DictionaryValue> parsed_manifest);

    virtual ~Approval();

    // The extension id that was approved for installation.
    std::string extension_id;

    // The profile the extension should be installed into.
    Profile* profile;

    // The expected manifest, before localization.
    scoped_ptr<base::DictionaryValue> parsed_manifest;

    // Whether to use a bubble notification when an app is installed, instead of
    // the default behavior of transitioning to the new tab page.
    bool use_app_installed_bubble;

    // Whether to skip the post install UI like the extension installed bubble.
    bool skip_post_install_ui;

    // Whether to skip the install dialog once the extension has been downloaded
    // and unpacked. One reason this can be true is that in the normal webstore
    // installation, the dialog is shown earlier, before any download is done,
    // so there's no need to show it again.
    bool skip_install_dialog;

    // Whether we should record an oauth2 grant for the extensions.
    bool record_oauth2_grant;

    // Used to show the install dialog.
    ExtensionInstallPrompt::ShowDialogCallback show_dialog_callback;

   private:
    Approval();
  };

  // Gets the Approval associated with the |download|, or NULL if there's none.
  // Note that the Approval is owned by |download|.
  static const Approval* GetAssociatedApproval(
      const content::DownloadItem& download);

  // Creates a WebstoreInstaller for downloading and installing the extension
  // with the given |id| from the Chrome Web Store. If |delegate| is not NULL,
  // it will be notified when the install succeeds or fails. The installer will
  // use the specified |controller| to download the extension. Only one
  // WebstoreInstaller can use a specific controller at any given time. This
  // also associates the |approval| with this install.
  // Note: the delegate should stay alive until being called back.
  WebstoreInstaller(Profile* profile,
                    Delegate* delegate,
                    content::NavigationController* controller,
                    const std::string& id,
                    scoped_ptr<Approval> approval,
                    int flags);

  // Starts downloading and installing the extension.
  void Start();

  // content::NotificationObserver
  virtual void Observe(int type,
                       const content::NotificationSource& source,
                       const content::NotificationDetails& details) OVERRIDE;

  // Removes the reference to the delegate passed in the constructor. Used when
  // the delegate object must be deleted before this object.
  void InvalidateDelegate();

  // Instead of using the default download directory, use |directory| instead.
  // This does *not* transfer ownership of |directory|.
  static void SetDownloadDirectoryForTests(FilePath* directory);

 private:
  friend struct content::BrowserThread::DeleteOnThread<
   content::BrowserThread::UI>;
  friend class base::DeleteHelper<WebstoreInstaller>;
  virtual ~WebstoreInstaller();

  // DownloadManager::DownloadUrl callback.
  void OnDownloadStarted(content::DownloadItem* item, net::Error error);

  // DownloadItem::Observer implementation:
  virtual void OnDownloadUpdated(content::DownloadItem* download) OVERRIDE;
  virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE;

  // Starts downloading the extension to |file_path|.
  void StartDownload(const FilePath& file_path);

  // Reports an install |error| to the delegate for the given extension if this
  // managed its installation. This also removes the associated PendingInstall.
  void ReportFailure(const std::string& error, FailureReason reason);

  // Reports a successful install to the delegate for the given extension if
  // this managed its installation. This also removes the associated
  // PendingInstall.
  void ReportSuccess();

  content::NotificationRegistrar registrar_;
  Profile* profile_;
  Delegate* delegate_;
  content::NavigationController* controller_;
  std::string id_;
  // The DownloadItem is owned by the DownloadManager and is valid from when
  // OnDownloadStarted is called (with no error) until OnDownloadDestroyed().
  content::DownloadItem* download_item_;
  scoped_ptr<Approval> approval_;
  GURL download_url_;
};

}  // namespace extensions

#endif  // CHROME_BROWSER_EXTENSIONS_WEBSTORE_INSTALLER_H_


text:
'use strict';

describe('Unit testing response model', function () {

    beforeEach(module('RESTer'));

    it('Response model initialization', function () {
        var responseModel = new ResponseModel();
        expect(responseModel.statusText).toEqual('');
        expect(responseModel.statusCode).toEqual('');
        expect(responseModel.contentType).toEqual('');
        expect(responseModel.responseTime).toEqual('');
        expect(responseModel.data).toEqual('');
    });

    it('Response model reset', function () {
        var responseModel = new ResponseModel();

        responseModel.statusText = '2Test Status Text';
        responseModel.statusCode = '200';
        responseModel.contentType = 'json';
        responseModel.responseTime = '123';
        responseModel.data = 'Test Body';

        responseModel.reset();

        expect(responseModel.statusText).toEqual('');
        expect(responseModel.statusCode).toEqual('');
        expect(responseModel.contentType).toEqual('');
        expect(responseModel.responseTime).toEqual('');
        expect(responseModel.data).toEqual('');
    });

    it('Response model set valid', function () {
        var responseModel = new ResponseModel();

        var xhr = {
            getResponseHeader: function () {
                return "json";
            },
            responseText: 'Test Response Text',
            status: '200',
            statusText: 'OK'
        };

        var responseTime = '123';

        responseModel.set(xhr, responseTime);

        expect(responseModel.statusText).toEqual('200: OK');
        expect(responseModel.statusCode).toEqual('200');
        expect(responseModel.contentType).toEqual('json');
        expect(responseModel.responseTime).toEqual('123');
        expect(responseModel.data).toEqual('Test Response Text');
    });

    it('Response model set undefined arguments', function () {
        var responseModel = new ResponseModel();

        responseModel.set();

        expect(responseModel.statusText).toEqual('');
        expect(responseModel.statusCode).toEqual('');
        expect(responseModel.contentType).toEqual('');
        expect(responseModel.responseTime).toEqual('');
        expect(responseModel.data).toEqual('');
    });

    it('Response model set undefined response time', function () {
        var responseModel = new ResponseModel();

        var xhr = {
            getResponseHeader: function () {
                return "json";
            },
            responseText: 'Test Response Text',
            status: '200',
            statusText: 'OK'
        };

        responseModel.set(xhr);

        expect(responseModel.statusText).toEqual('200: OK');
        expect(responseModel.statusCode).toEqual('200');
        expect(responseModel.contentType).toEqual('json');
        expect(responseModel.responseTime).toEqual('0');
        expect(responseModel.data).toEqual('Test Response Text');
    });

});


text:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
        <Target>System.out</Target>
        <encoder>
            <pattern>%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n</pattern>
        </encoder>
    </appender>
    <logger name="org.matrix" additivity="false" level="TRACE">
        <appender-ref ref="stdout"/>
    </logger>
    <root level="WARN">
        <appender-ref ref="stdout"/>
    </root>
</configuration>


text:
"""
 This is the blade_platform module which dues with the environment
 variable.

"""

import os
import subprocess

import configparse
from blade_util import var_to_list

class SconsPlatform(object):
    """The scons platform class that it handles and gets the platform info. """
    def __init__(self):
        """Init. """
        self.gcc_version = self._get_gcc_version('gcc')
        self.python_inc = self._get_python_include()
        self.php_inc_list = self._get_php_include()
        self.java_inc_list = self._get_java_include()
        self.nvcc_version = self._get_nvcc_version('nvcc')
        self.cuda_inc_list = self._get_cuda_include()

    @staticmethod
    def _get_gcc_version(compiler):
        """Get the gcc version. """
        p = subprocess.Popen(
            compiler + ' --version',
            env=os.environ,
            stderr=subprocess.PIPE,
            stdout=subprocess.PIPE,
            shell=True,
            universal_newlines=True)
        (stdout, stderr) = p.communicate()
        if p.returncode == 0:
            version_line = stdout.splitlines(True)[0]
            version = version_line.split()[2]
            return version
        return ''

    @staticmethod
    def _get_nvcc_version(compiler):
        """Get the nvcc version. """
        p = subprocess.Popen(
            compiler + ' --version',
            env=os.environ,
            stderr=subprocess.PIPE,
            stdout=subprocess.PIPE,
            shell=True,
            universal_newlines=True)
        (stdout, stderr) = p.communicate()
        if p.returncode == 0:
            version_line = stdout.splitlines(True)[-1]
            version = version_line.split()[5]
            return version
        return ''

    @staticmethod
    def _get_python_include():
        """Get the python include dir. """
        p = subprocess.Popen(
            'python-config --includes',
            env=os.environ,
            stderr=subprocess.PIPE,
            stdout=subprocess.PIPE,
            shell=True,
            universal_newlines=True)
        (stdout, stderr) = p.communicate()
        if p.returncode == 0:
            include_line = stdout.splitlines(True)[0]
            header = include_line.split()[0][2:]
            return header
        return ''

    @staticmethod
    def _get_php_include():
        p = subprocess.Popen(
            'php-config --includes',
            env=os.environ,
            stderr=subprocess.PIPE,
            stdout=subprocess.PIPE,
            shell=True,
            universal_newlines=True)
        (stdout, stderr) = p.communicate()
        if p.returncode == 0:
            include_line = stdout.splitlines(True)[0]
            headers = include_line.split()
            header_list = ["'%s'" % s[2:] for s in headers]
            return header_list
        return []

    @staticmethod
    def _get_java_include():
        include_list = []
        java_home = os.environ.get('JAVA_HOME', '')
        if java_home:
            include_list.append('%s/include' % java_home)
            include_list.append('%s/include/linux' % java_home)
            return include_list
        p = subprocess.Popen(
            'java -version',
            env=os.environ,
            stdout=subprocess.PIPE,
            stderr=subprocess.STDOUT,
            shell=True,
            universal_newlines=True)
        (stdout, stderr) = p.communicate()
        if p.returncode == 0:
            version_line = stdout.splitlines(True)[0]
            version = version_line.split()[2]
            version = version.replace('"', '')
            include_list.append('/usr/java/jdk%s/include' % version)
            include_list.append('/usr/java/jdk%s/include/linux' % version)
            return include_list
        return []

    @staticmethod
    def _get_cuda_include():
        include_list = []
        cuda_path = os.environ.get('CUDA_PATH')
        if cuda_path:
            include_list.append('%s/include' % cuda_path)
            include_list.append('%s/samples/common/inc' % cuda_path)
            return include_list
        p = subprocess.Popen(
            'nvcc --version',
            env=os.environ,
            stderr=subprocess.PIPE,
            stdout=subprocess.PIPE,
            shell=True,
            universal_newlines=True)
        (stdout, stderr) = p.communicate()
        if p.returncode == 0:
            version_line = stdout.splitlines(True)[-1]
            version = version_line.split()[4]
            version = version.replace(',', '')
            if os.path.isdir('/usr/local/cuda-%s' % version):
                include_list.append('/usr/local/cuda-%s/include' % version)
                include_list.append('/usr/local/cuda-%s/samples/common/inc' % version)
                return include_list
        return []

    def get_gcc_version(self):
        """Returns gcc version. """
        return self.gcc_version

    def get_python_include(self):
        """Returns python include. """
        return self.python_inc

    def get_php_include(self):
        """Returns a list of php include. """
        return self.php_inc_list

    def get_java_include(self):
        """Returns a list of java include. """
        return self.java_inc_list

    def get_nvcc_version(self):
        """Returns nvcc version. """
        return self.nvcc_version

    def get_cuda_include(self):
        """Returns a list of cuda include. """
        return self.cuda_inc_list

class CcFlagsManager(object):
    """The CcFlagsManager class.

    This class manages the compile warning flags.

    """
    def __init__(self, options):
        self.options = options
        self.cpp_str = ''

    def _filter_out_invalid_flags(self, flag_list, language=''):
        """filter the unsupported compliation flags. """
        flag_list_var = var_to_list(flag_list)
        xlanguage = ''
        if language:
            xlanguage = '-x' + language

        ret_flag_list = []
        for flag in flag_list_var:
            cmd_str = 'echo "" | %s %s %s >/dev/null 2>&1' % (
                      self.cpp_str, xlanguage, flag)
            if subprocess.call(cmd_str, shell=True) == 0:
                ret_flag_list.append(flag)
        return ret_flag_list

    def set_cpp_str(self, cpp_str):
        """set up the cpp_str. """
        self.cpp_str = cpp_str

    def get_flags_except_warning(self):
        """Get the flags that are not warning flags. """
        flags_except_warning = ['-m%s' % self.options.m, '-mcx16', '-pipe']
        linkflags = ['-m%s' % self.options.m]
        if self.options.profile == 'debug':
            flags_except_warning += ['-ggdb3', '-fstack-protector']
        elif self.options.profile == 'release':
            flags_except_warning += ['-g', '-DNDEBUG']
        flags_except_warning += [
                '-D_FILE_OFFSET_BITS=64',
                '-D__STDC_CONSTANT_MACROS',
                '-D__STDC_FORMAT_MACROS',
                '-D__STDC_LIMIT_MACROS',
        ]

        if getattr(self.options, 'gprof', False):
            flags_except_warning.append('-pg')
            linkflags.append('-pg')

        if getattr(self.options, 'gcov', False):
            if SconsPlatform().gcc_version > '4.1':
                flags_except_warning.append('--coverage')
                linkflags.append('--coverage')
            else:
                flags_except_warning.append('-fprofile-arcs')
                flags_except_warning.append('-ftest-coverage')
                linkflags += ['-Wl,--whole-archive', '-lgcov',
                              '-Wl,--no-whole-archive']

        flags_except_warning = self._filter_out_invalid_flags(
                flags_except_warning)

        return (flags_except_warning, linkflags)

    def get_warning_flags(self):
        """Get the warning flags. """
        cc_config = configparse.blade_config.get_config('cc_config')
        cppflags = cc_config['warnings']
        cxxflags = cc_config['cxx_warnings']
        cflags = cc_config['c_warnings']

        filtered_cppflags = self._filter_out_invalid_flags(cppflags)
        filtered_cxxflags = self._filter_out_invalid_flags(cxxflags, 'c++')
        filtered_cflags = self._filter_out_invalid_flags(cflags, 'c')

        return (filtered_cppflags, filtered_cxxflags, filtered_cflags)


text:
<?php
///////////////////////////////////////////////////////////////////////////////
//
// © Copyright f-project.net 2010-present. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
///////////////////////////////////////////////////////////////////////////////

namespace fproject\components;

/**
 *
 * The base class for all ActiveRecord model classes of F-Project framework
 *
 * */
class ActiveRecord extends \yii\db\ActiveRecord
{
    /**
     * Save a list of models, each model may be inserted or updated depend on its existence.
     * This method could be used to achieve better performance during insertion/update of the large
     * amount of data to the database table.
     * @param \yii\db\ActiveRecord[] $models list of models to be saved.
     * If a key is not a valid column name, the corresponding value will be ignored.
     * @param array $attributeNames name list of attributes that need to be update. Defaults to empty,
     * meaning all fields of corresponding active record will be saved.
     * This parameter is ignored in the case of insertion
     * @param int $mode the save mode flag.
     * If this flag value is set to 0, any model that have a PK value is NULL will be inserted, otherwise it will be update.
     * If this flag value is set to 1, all models will be inserted regardless to PK values.
     * If this flag value is set to 2, all models will be updated regardless to PK values
     * @return \stdClass An instance of stdClass that may have one of the following fields:
     * - The 'lastId' field is the last model ID (auto-incremental primary key) inserted.
     * - The 'insertCount' is the number of rows inserted.
     * - The 'updateCount' is the number of rows updated.
     * @throws \yii\base\InvalidConfigException
     * @throws \yii\db\Exception
     */
    public static function batchSave($models, $attributeNames=[], $mode=DbHelper::SAVE_MODE_AUTO)
    {
        $returnModels=[];
        $a = DbHelper::batchSave($models, $attributeNames, $mode, $returnModels);
        if(isset($a))
        {
            $insertModels = isset($returnModels['inserted']) ? $returnModels['inserted'] : null;
            $updateModels = isset($returnModels['updated']) ? $returnModels['updated'] : null;
            static::afterBatchSave($attributeNames, $mode, $insertModels, $updateModels);
        }
        return $a;
    }

    /** @inheritdoc */
    public static function deleteAll($condition = '', $params = [])
    {
        $r = parent::deleteAll($condition, $params);
        static::afterBatchDelete($condition, $params);
        return $r;
    }

    /**
     * The post-process after batch-saving models
     * @param $attributeNames
     * @param int $mode
     * @param null $insertModels
     * @param null $updateModels
     */
    public static function afterBatchSave($attributeNames, $mode=DbHelper::SAVE_MODE_AUTO, $insertModels=null, $updateModels=null)
    {
        //Abstract method
    }

    /**
     * The post-process after batch-deleting models
     * @param string $condition
     * @param array $params
     */
    public static function afterBatchDelete($condition, $params = [])
    {
        //Abstract method
    }
}


text:
<link rel="import" href="../../polymer.html">

<dom-module id="x-foo">

  <template>

  </template>

</dom-module>

<dom-module id="x-app">

  <template>
    <x-foo id="foo"></x-foo>
  </template>

</dom-module>

<dom-module id="x-setup">
  <template>

  </template>

</dom-module>

<dom-module id="x-dynamic">

</dom-module>

<dom-module id="x-prevent">

</dom-module>

<dom-module id="x-buttons">

</dom-module>

<dom-module id="x-document-listener">

</dom-module>


text:
package nl.famscheper.rh01477141.config;

import org.apache.deltaspike.core.api.config.view.navigation.NavigationParameter;
import org.apache.deltaspike.core.api.config.view.navigation.NavigationParameterContext;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.inject.Named;

/**
 * Definition of navigation actions for the example folder.
 *
 * @author Erik-Berndt Scheper
 * @since 30-09-2015
 */
@Named
@ApplicationScoped
public class ExampleViewDefinition {

    @Inject
    private NavigationParameterContext navigationParameterContext;

    public Class<? extends ExampleViewConfig> demoPage() {
        return ExampleViewConfig.DemoPage.class;
    }

    public Class<? extends ExampleViewConfig> securedAdminPage() {
        return ExampleViewConfig.SecuredAdminPage.class;
    }

    public Class<? extends ExampleViewConfig> securedUserPage() {
        return ExampleViewConfig.SecuredUserPage.class;
    }

    @NavigationParameter(key = "param4", value = "Parameter from the Controller class")
    public Class<ExampleViewConfig.NavigationParameterPage> navigationParameterPage() {
        this.navigationParameterContext.addPageParameter("param3",
                "I also come from a navigation parameter using Dynamic Configuration via NavigationParameterContext");
        return ExampleViewConfig.NavigationParameterPage.class;
    }

}


text:
title: Clojure   Vectors
localeTitle: Clojure Vectors
---
Вектор, пожалуй, самый простой тип коллекции в Clojure. Вы можете думать об этом как о массиве в Javascript. Определим простой вектор:
```
(def a-vector [1 2 3 4 5])
 ;; Alternatively, use the vector function:
 (def another-vector (vector 1 2 3 4 5))
 ;; You can use commas to separate items, since Clojure treats them as whitespace.
 (def comma-vector [1, 2, 3, 4, 5])
```

Вы увидите, что он использует квадратные скобки, как и массив в JS. Так как Clojure, как JS, динамически типизируется, векторы могут содержать элементы любого типа, включая другие векторы.
```
(def mixed-type-vector [1 "foo" :bar ["spam" 22] #"^baz$"])
```

## Добавление элементов в вектор

Вы можете добавлять элементы к вектору, используя `conj` . Вы также можете добавить к списку, используя `into` , но обратите внимание, что `into` предназначен для слияния двух векторов, поэтому оба его аргумента должны быть векторами, а использование `into` них медленнее, чем использование `conj` .
```
(time (conj [1 2] 3))
 ; => "Elapsed time: 0.032206 msecs"
 ;    [1 2 3]
 (time (into [1] [2 3]))
 ; => "Elapsed time: 0.078499 msecs"
 ;    [1 2 3]
```

![:rocket:](//forum.freecodecamp.com/images/emoji/emoji_one/rocket.png?v=2 ": Ракета:") [IDEOne!](https://ideone.com/wBSUEd)

## Получение элементов из вектора

Вы можете извлекать элементы из вектора с помощью `get` . Это эквивалентно использованию записи в виде скобок для доступа к элементам в массиве на многих императивных языках. Элементы в векторе 0-индексируются, считая слева.
```
var arr = [1, 2, 3, 4, 5];
 arr[0];
 // => 1
```

В Clojure это будет написано так:
```
(def a-vector [1 2 3 4 5])
 (get a-vector 0)
 ; => 1
```

Вы также можете `get` значение по умолчанию, если вы укажете ему индекс, который не находится в массиве.
```
;; the list doesn't have 2147483647 elements, so it'll return a string instead.
 (get a-vector 2147483646 "sorry, not found!")
 ; => "sorry, not found!"
```

## Преобразование других коллекций в векторы

Невекторные структуры данных могут быть преобразованы в векторы с использованием функции `vec` . С hashmaps это создает 2D-вектор, содержащий пары ключей и значений.
```
(vec '(1 2 3 4 5))
 ; => [1 2 3 4 5]
 (vec {:jack "black" :barry "white"})
 ; => [[:jack "black"] [:barry "white"]]
```

## Когда использовать вектор?

Вектор должен использоваться почти во всех случаях, если вам нужна коллекция, потому что у них кратчайшее время произвольного доступа, что позволяет легко извлекать элементы из вектора. Обратите внимание, что векторы упорядочены. Если заказ не имеет значения, лучше использовать набор. Также обратите внимание, что векторы предназначены для добавления элементов; если вам нужно добавить элементы, вы можете использовать список.

| [![:point_left:](//forum.freecodecamp.com/images/emoji/emoji_one/point_left.png?v=2 ": Point_left:") Предыдущая](//forum.freecodecamp.com/t/clojure-lists-they-are-everything/18417) | [![:book:](//forum.freecodecamp.com/images/emoji/emoji_one/book.png?v=2 ":книга:") Главная ![:book:](//forum.freecodecamp.com/images/emoji/emoji_one/book.png?v=2 ":книга:")](//forum.freecodecamp.com/t/clojure-resources/18422) | [следующий ![:point_right:](//forum.freecodecamp.com/images/emoji/emoji_one/point_right.png?v=2 ": Point_right:")](//forum.freecodecamp.com/t/clojure-hashmaps/18414) |
| [Списки](//forum.freecodecamp.com/t/clojure-lists-they-are-everything/18417) | [Содержание](//forum.freecodecamp.com/t/clojure-resources/18422) | [Hashmaps](//forum.freecodecamp.com/t/clojure-hashmaps/18414) |


text:
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#pragma once

#include "BlueprintGraphDefinitions.h"

DECLARE_DELEGATE_OneParam(FOnPinTypeChanged, const FEdGraphPinType&)

//////////////////////////////////////////////////////////////////////////
// SPinTypeSelector

typedef TSharedPtr<class UEdGraphSchema_K2::FPinTypeTreeInfo> FPinTypeTreeItem;
typedef STreeView<FPinTypeTreeItem> SPinTypeTreeView;

DECLARE_DELEGATE_ThreeParams(FGetPinTypeTree, TArray<FPinTypeTreeItem >&, bool, bool);

/** Widget for modifying the type for a variable or pin */
class KISMETWIDGETS_API SPinTypeSelector : public SCompoundWidget
{
public:
	SLATE_BEGIN_ARGS( SPinTypeSelector )
		: _TargetPinType()
		, _Schema(NULL)
		, _bAllowExec(false)
		, _bAllowWildcard(false)
		, _bAllowArrays(true)
		, _TreeViewWidth(300.f)
		, _TreeViewHeight(400.f)
		, _Font( FEditorStyle::GetFontStyle( TEXT("NormalFont") ) )
		, _bCompactSelector( false )
		{}
		SLATE_ATTRIBUTE( FEdGraphPinType, TargetPinType )
		SLATE_ARGUMENT( const UEdGraphSchema_K2*, Schema )
		SLATE_ARGUMENT( bool, bAllowExec )
		SLATE_ARGUMENT( bool, bAllowWildcard )
		SLATE_ARGUMENT( bool, bAllowArrays )
		SLATE_ATTRIBUTE( FOptionalSize, TreeViewWidth )
		SLATE_ATTRIBUTE( FOptionalSize, TreeViewHeight )
		SLATE_EVENT( FOnPinTypeChanged, OnPinTypePreChanged )
		SLATE_EVENT( FOnPinTypeChanged, OnPinTypeChanged )
		SLATE_ATTRIBUTE( FSlateFontInfo, Font )
		SLATE_ARGUMENT( bool, bCompactSelector )
	SLATE_END_ARGS()
public:
	void Construct(const FArguments& InArgs, FGetPinTypeTree GetPinTypeTreeFunc);

	// SWidget interface
	virtual FReply OnMouseButtonDown( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent ) override;
	virtual FReply OnMouseButtonUp( const FGeometry& MyGeometry, const FPointerEvent& MouseEvent ) override;
	virtual void OnMouseLeave( const FPointerEvent& MouseEvent ) override;
	// End of SWidget interface

protected:
	/** Gets the icon (pin or array) for the type being manipulated */
	const FSlateBrush* GetTypeIconImage() const;

	/** Gets the type-specific color for the type being manipulated */
	FSlateColor GetTypeIconColor() const;

	/** Gets a succinct type description for the type being manipulated */
	virtual FText GetTypeDescription() const;

	TSharedPtr<SComboButton>		TypeComboButton;
	TSharedPtr<SSearchBox>			FilterTextBox;
	TSharedPtr<SPinTypeTreeView>	TypeTreeView;

	/** The pin attribute that we're modifying with this widget */
	TAttribute<FEdGraphPinType>		TargetPinType;

	/** Delegate that is called every time the pin type changes (before and after). */
	FOnPinTypeChanged			OnTypeChanged;
	FOnPinTypeChanged			OnTypePreChanged;

	/** Delegate for the type selector to retrieve the pin type tree (passed into the Construct so the tree can depend on the situation) */
	FGetPinTypeTree				GetPinTypeTree;

	/** Schema in charge of determining available types for this pin */
	UEdGraphSchema_K2*			Schema;

	/** Whether or not to allow exec type wires in the type selection */
	bool						bAllowExec;

	/** Whether or not to allow wildcard as an option in the type selection */
	bool						bAllowWildcard;

	/** Desired width of the tree view widget */
	TAttribute<FOptionalSize>	TreeViewWidth;

	/** Desired height of the tree view widget */
	TAttribute<FOptionalSize>	TreeViewHeight;

	/** TRUE when the right mouse button is pressed, keeps from handling a right click that does not begin in the widget */
	bool bIsRightMousePressed;

	/** TRUE if displaying a compact selector widget, some functionality is enabled in different ways if this is TRUE */
	bool bIsCompactSelector;

	/** Array checkbox support functions */
	ECheckBoxState IsArrayChecked() const;
	void OnArrayCheckStateChanged(ECheckBoxState NewState);

	/** Toggles the variable type as an array */
	void OnArrayStateToggled();

	/** Array containing the unfiltered list of all supported types this pin could possibly have */
	TArray<FPinTypeTreeItem>		TypeTreeRoot;
	/** Array containing a filtered list, according to the text in the searchbox */
	TArray<FPinTypeTreeItem>		FilteredTypeTreeRoot;

	/** Treeview support functions */
	virtual TSharedRef<ITableRow> GenerateTypeTreeRow(FPinTypeTreeItem InItem, const TSharedRef<STableViewBase>& OwnerTree);
	void OnTypeSelectionChanged(FPinTypeTreeItem Selection, ESelectInfo::Type SelectInfo);
	void GetTypeChildren(FPinTypeTreeItem InItem, TArray<FPinTypeTreeItem>& OutChildren);

	/** Reference to the menu content that's displayed when the type button is clicked on */
	TSharedPtr<SMenuOwner> MenuContent;
	virtual TSharedRef<SWidget>	GetMenuContent();

	/** Type searching support */
	FText SearchText;
	void OnFilterTextChanged(const FText& NewText);
	void OnFilterTextCommitted(const FText& NewText, ETextCommit::Type CommitInfo);

	/** Helper to generate the filtered list of types, based on the search string matching */
	bool GetChildrenMatchingSearch(const FText& SearchText, const TArray<FPinTypeTreeItem>& UnfilteredList, TArray<FPinTypeTreeItem>& OutFilteredList);

	/**
	 * Determine the best icon to represent the given pin.
	 *
	 * @param PinType		The pin get the icon for.
	 * @param returns a brush that best represents the icon (or Kismet.VariableList.TypeIcon if none is available )
	 */
	const FSlateBrush* GetIconFromPin( const FEdGraphPinType& PinType ) const;

	/** Callback to get the tooltip text for the pin type combo box */
	FText GetToolTipForComboBoxType() const;

	/** Callback to get the tooltip for the array button widget */
	FText GetToolTipForArrayWidget() const;

	/**
	 * Helper function to add an object reference menu entry to a MenuBuilder
	 *
	 * @param InOutMenuBuilder		Menu builder to add the menu entry to
	 * @param InItem				Tree item to use for the callback when a menu item is selected
	 * @param InPinType				Pin type for generation of the widget to display for the menu entry
	 * @param InIconBrush			Brush icon to use for the menu entry item
	 * @param InTooltip				The simple tooltip to use for the menu item, an advanced tooltip link will be auto-generated based on the PinCategory
	 */
	void AddObjectReferenceMenuEntry(FMenuBuilder& InOutMenuBuilder, FPinTypeTreeItem InItem, FEdGraphPinType& InPinType, const FSlateBrush* InIconBrush, FText InSimpleTooltip) const;

	/** Gets the allowable object types for an tree item, used for building the sub-menu */
	TSharedRef< SWidget > GetAllowedObjectTypes(FPinTypeTreeItem InItem) const;

	/**
	 * When a pin type is selected, handle it
	 *
	 * @param InItem				Item selected
	 * @param InPinCategory			This is the PinType's category, must be provided separately as the PinType in the tree item is always Object Types for any object related type.
	 */
	void OnSelectPinType(FPinTypeTreeItem InItem, FString InPinCategory);
};


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Data.Entity.Infrastructure.Annotations;

namespace Ex1_Person
{
   /// <inheritdoc/>
   public partial class PersonModel : DbContext
   {
      #region DbSets
      public virtual System.Data.Entity.DbSet<global::Ex1_Person.Person> People { get; set; }
      #endregion DbSets

      #region Constructors

      partial void CustomInit();

      /// <summary>
      /// Default connection string
      /// </summary>
      public static string ConnectionString { get; set; } = @"Data Source=(localdb)\mssqllocaldb;Initial Catalog=EFVisualExamples;Integrated Security=True";
      /// <inheritdoc />
      public PersonModel() : base(ConnectionString)
      {
         Configuration.LazyLoadingEnabled = true;
         Configuration.ProxyCreationEnabled = true;
         System.Data.Entity.Database.SetInitializer<PersonModel>(new PersonModelDatabaseInitializer());
         CustomInit();
      }

      /// <inheritdoc />
      public PersonModel(string connectionString) : base(connectionString)
      {
         Configuration.LazyLoadingEnabled = true;
         Configuration.ProxyCreationEnabled = true;
         System.Data.Entity.Database.SetInitializer<PersonModel>(new PersonModelDatabaseInitializer());
         CustomInit();
      }

      /// <inheritdoc />
      public PersonModel(string connectionString, System.Data.Entity.Infrastructure.DbCompiledModel model) : base(connectionString, model)
      {
         Configuration.LazyLoadingEnabled = true;
         Configuration.ProxyCreationEnabled = true;
         System.Data.Entity.Database.SetInitializer<PersonModel>(new PersonModelDatabaseInitializer());
         CustomInit();
      }

      /// <inheritdoc />
      public PersonModel(System.Data.Common.DbConnection existingConnection, bool contextOwnsConnection) : base(existingConnection, contextOwnsConnection)
      {
         Configuration.LazyLoadingEnabled = true;
         Configuration.ProxyCreationEnabled = true;
         System.Data.Entity.Database.SetInitializer<PersonModel>(new PersonModelDatabaseInitializer());
         CustomInit();
      }

      /// <inheritdoc />
      public PersonModel(System.Data.Common.DbConnection existingConnection, System.Data.Entity.Infrastructure.DbCompiledModel model, bool contextOwnsConnection) : base(existingConnection, model, contextOwnsConnection)
      {
         Configuration.LazyLoadingEnabled = true;
         Configuration.ProxyCreationEnabled = true;
         System.Data.Entity.Database.SetInitializer<PersonModel>(new PersonModelDatabaseInitializer());
         CustomInit();
      }

      /// <inheritdoc />
      public PersonModel(System.Data.Entity.Infrastructure.DbCompiledModel model) : base(model)
      {
         Configuration.LazyLoadingEnabled = true;
         Configuration.ProxyCreationEnabled = true;
         System.Data.Entity.Database.SetInitializer<PersonModel>(new PersonModelDatabaseInitializer());
         CustomInit();
      }

      /// <inheritdoc />
      public PersonModel(System.Data.Entity.Core.Objects.ObjectContext objectContext, bool dbContextOwnsObjectContext) : base(objectContext, dbContextOwnsObjectContext)
      {
         Configuration.LazyLoadingEnabled = true;
         Configuration.ProxyCreationEnabled = true;
         System.Data.Entity.Database.SetInitializer<PersonModel>(new PersonModelDatabaseInitializer());
         CustomInit();
      }

      #endregion Constructors

      partial void OnModelCreatingImpl(System.Data.Entity.DbModelBuilder modelBuilder);
      partial void OnModelCreatedImpl(System.Data.Entity.DbModelBuilder modelBuilder);

      /// <inheritdoc />
      protected override void OnModelCreating(System.Data.Entity.DbModelBuilder modelBuilder)
      {
         base.OnModelCreating(modelBuilder);
         OnModelCreatingImpl(modelBuilder);

         modelBuilder.HasDefaultSchema("dbo");

         modelBuilder.Entity<global::Ex1_Person.Person>()
                     .ToTable("People")
                     .HasKey(t => t.Id);
         modelBuilder.Entity<global::Ex1_Person.Person>()
                     .Property(t => t.Id)
                     .IsRequired()
                     .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
         modelBuilder.Entity<global::Ex1_Person.Person>()
                     .Property(t => t.FirstName)
                     .HasMaxLength(25);
         modelBuilder.Entity<global::Ex1_Person.Person>()
                     .Property(t => t.MiddleName)
                     .HasMaxLength(35);
         modelBuilder.Entity<global::Ex1_Person.Person>()
                     .Property(t => t.LastName)
                     .HasMaxLength(35);
         modelBuilder.Entity<global::Ex1_Person.Person>()
                     .Property(t => t.PreferredName)
                     .HasMaxLength(75);
         modelBuilder.Entity<global::Ex1_Person.Person>()
                     .Property(t => t.Email)
                     .HasMaxLength(45);
         modelBuilder.Entity<global::Ex1_Person.Person>()
                     .Property(t => t.Phone)
                     .HasMaxLength(15);

         OnModelCreatedImpl(modelBuilder);
      }
   }
}


text:
                <img src="<?= base_url() ?>/asset/img/<?= $this->config->item('SITE')['logo'] ?>" class="img-circle" alt="User Image"/>

<?= $this->config->item('main_sidebar_title') ?>

PARTY ADVANCE CRUD s

<?php echo anchor('party_advance/party_advnce_payment_register', '  Party Advance Payment Register'); ?>

<?php echo anchor('party_advance/payment_method', '  Payment Method'); ?>

            <?php $this->load->view($this->config->item('ADMIN_THEME') . 'sidebar_common'); ?>


text:
package com.sebuilder.interpreter.webdriverfactory;

import java.io.File;
import java.util.HashMap;
import org.openqa.selenium.firefox.FirefoxBinary;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;

public class Firefox implements WebDriverFactory {
	/**
	 * @param config Key/value pairs treated as required capabilities, with the exception of:
	 *

	 *
binary: path to Firefox binary to use

	 *
profile: path to Firefox profile to use

	 *

	 * @return A FirefoxDriver.
	 */
	@Override
	public RemoteWebDriver make(HashMap<String, String> config) {
		FirefoxBinary fb = config.containsKey("binary")
				? new FirefoxBinary(new File(config.get("binary")))
				: new FirefoxBinary();
		FirefoxProfile fp = config.containsKey("profile")
				? new FirefoxProfile(new File(config.get("profile")))
				: new FirefoxProfile();
		HashMap<String, String> caps = new HashMap<String, String>(config);
		caps.remove("binary");
		caps.remove("profile");
		return new FirefoxDriver(fb, fp, new DesiredCapabilities(caps));
	}
}


text:
// This header file #undefs all the stuff you had to #define to include
// glstuff_src.h or glstuff_src.cxx.

#undef GLP
#undef CLP
#undef CLASSPREFIX_QUOTED
#undef CONFIGOBJ
#undef GLCAT
#undef EXPCL
#undef EXPTP


text:
package jadx.plugins.input.java.data.attributes.types;

import java.util.ArrayList;
import java.util.List;

import jadx.plugins.input.java.data.attributes.IJavaAttribute;
import jadx.plugins.input.java.data.attributes.IJavaAttributeReader;
import jadx.plugins.input.java.data.attributes.types.data.RawBootstrapMethod;

public class JavaBootstrapMethodsAttr implements IJavaAttribute {

	private final List<RawBootstrapMethod> list;

	public JavaBootstrapMethodsAttr(List<RawBootstrapMethod> list) {
		this.list = list;
	}

	public List<RawBootstrapMethod> getList() {
		return list;
	}

	public static IJavaAttributeReader reader() {
		return (clsData, reader) -> {
			int len = reader.readU2();
			List<RawBootstrapMethod> list = new ArrayList<>(len);
			for (int i = 0; i < len; i++) {
				int methodHandleIdx = reader.readU2();
				int argsCount = reader.readU2();
				int[] args = new int[argsCount];
				for (int j = 0; j < argsCount; j++) {
					args[j] = reader.readU2();
				}
				list.add(new RawBootstrapMethod(methodHandleIdx, args));
			}
			return new JavaBootstrapMethodsAttr(list);
		};
	}
}


text:
/* $OpenBSD: vswscanf.c,v 1.3 2015/08/31 02:53:57 guenther Exp $ */

/*-
 * Copyright (c) 1990, 1993
 *	The Regents of the University of California.  All rights reserved.
 *
 * This code is derived from software contributed to Berkeley by
 * Donn Seeley at UUNET Technologies, Inc.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include "local.h"

static int	eofread(void *, char *, int);

static int
eofread(void *cookie, char *buf, int len)
{
	return (0);
}

int
vswscanf(const wchar_t * __restrict str, const wchar_t * __restrict fmt,
    __va_list ap)
{
	mbstate_t mbs;
	FILE f;
	struct __sfileext fext;
	char *mbstr;
	size_t len, mlen;
	int r;
	const wchar_t *strp;

	/*
	 * XXX Convert the wide character string to multibyte, which
	 * __vfwscanf() will convert back to wide characters.
	 */
	len = wcslen(str) * MB_CUR_MAX;
	if ((mbstr = malloc(len + 1)) == NULL)
		return (EOF);
	bzero(&mbs, sizeof(mbs));
	strp = str;
	if ((mlen = wcsrtombs(mbstr, &strp, len, &mbs)) == (size_t)-1) {
		free(mbstr);
		return (EOF);
	}
	if (mlen == len)
		mbstr[len] = '\0';
	_FILEEXT_SETUP(&f, &fext);
	f._flags = __SRD;
	f._bf._base = f._p = (unsigned char *)mbstr;
	f._bf._size = f._r = mlen;
	f._read = eofread;
	f._lb._base = NULL;
	r = __vfwscanf(&f, fmt, ap);
	free(mbstr);

	return (r);
}
DEF_STRONG(vswscanf);