text:
"use strict";

/**
 * @module gallery-anim-sequence
 */

/**********************************************************************
 * Manages a sequence of animations, so you don't have to chain them
 * manually. Each item in the sequence can be a single animation, an array
 * of animations to perform in parallel, a function which performs an
 * immediate action, or a delay in milliseconds.
 *
 * Pass `sequence` in the configuration to set the initial animation
 * sequence.
 *
 * This class exposes the same basic API as Y.Anim, so you can pass
 * Y.AnimSequence to anything that just needs to run/pause/stop an
 * animation.
 *
 * @main gallery-anim-sequence
 * @class AnimSequence
 * @constructor
 * @param config {Object} configuration
 */
function AnimSequence(config)
{
	this._list = [];
	AnimSequence.superclass.constructor.apply(this, arguments);
}

AnimSequence.NAME = "AnimSequence";

AnimSequence.ATTRS =
{
	/**
	 * If true, the animation runs backwards.  Immediate actions receive
	 * the value of reverse as the only argument.
	 *
	 * @attribute reverse
	 * @type {Boolean}
	 * @default false
	 */
	reverse:
	{
		value:     false,
		validator: Y.Lang.isBoolean
	},

	/**
	 * The number of times the animation should run.  Can be "infinite"
	 *
	 * @attribute iterations
	 * @type {Number|String}
	 * @default 1
	 */
	iterations:
	{
		value: 1,
		validator: function(value)
		{
			return Y.Lang.isNumber(value) || value == 'infinite';
		}
	},

	/**
	 * The number of times the animation has run.  Resets to zero when
	 * the animation finishes or is stopped.
	 *
	 * @attribute iterationCount
	 * @type {Number}
	 * @readOnly
	 */
	iterationCount:
	{
		value:    0,
		readOnly: true
	},

	/**
	 * The behavior of the animation when "iterations" > 1:
	 * If "normal", the animation will repeat in the same direction.
	 * If "alternate", the animation will flip "reverse" at the end of the sequence.
	 *
	 * @attribute direction
	 * @type {String}
	 * @default "normal"
	 */
	direction:
	{
		value: 'normal',
		validator: function(value)
		{
			return value == 'normal' || value == 'alternate';
		}
	},

	/**
	 * Whether or not the animation is currently running.
	 *
	 * @attribute running
	 * @type {Boolean}
	 * @default false
	 * @readonly
	 */
	running:
	{
		value:     false,
		validator: Y.Lang.isBoolean,
		readOnly:  true
	},

	/**
	 * Whether or not the animation is currently paused.
	 *
	 * @attribute paused
	 * @type {Boolean}
	 * @default false
	 * @readonly
	 */
	paused:
	{
		value:     false,
		validator: Y.Lang.isBoolean,
		readOnly:  true
	}
};

/**
 * @event start
 * @description Fires when the sequence begins.
 */
/**
 * @event item
 * @description Fires when an item in the sequence begins.
 * @param index {int} the item index
 */
/**
 * @event end
 * @description Fires after the sequence finishes.
 */

/**
 * @event pause
 * @description Fires when the sequence is paused.
 */
/**
 * @event resume
 * @description Fires when the sequence resumes (after being paused).
 */

function next()
{
	if (this.get('paused'))
	{
		return;
	}

	var reverse = this.get('reverse');
	if ((!reverse && this._index >= this._list.length) ||
		( reverse && this._index < 0))
	{
		var iter_max   = this.get('iterations'),
			iter_count = this.get('iterationCount') + 1;
		if (iter_max == 'infinite' || iter_count < iter_max)
		{
			if (this.get('direction') == 'alternate')
			{
				this.set('reverse', !reverse);
			}

			this._set('iterationCount', iter_count);
			this._index = this.get('reverse') ? this._list.length-1 : 0;
			next.call(this);
		}
		else
		{
			this._set('running', false);
			this.fire('end');
		}
		return;
	}

	var item = this._list[ this._index ];
	if (Y.Lang.isArray(item))
	{
		var tasks = new Y.Parallel();
		Y.each(item, function(a)
		{
			a.once('end', tasks.add());
			a.set('reverse', reverse);
			a.run();
		},
		this);

		tasks.done(Y.bind(next, this));
	}
	else if ((item instanceof Y.Anim) || (item instanceof Y.AnimSequence))
	{
		item.once('end', next, this);
		item.set('reverse', reverse);
		item.run();
	}
	else if (Y.Lang.isFunction(item))
	{
		Y.later(0, this, function()
		{
			item.call(null, reverse);
			next.call(this);
		});
	}
	else if (Y.Lang.isNumber(item))
	{
		Y.later(item, this, next);
	}
	else
	{
		throw Error('unknown item type in sequence: ' + item);
	}

	this._index += reverse ? -1 : +1;
}

Y.extend(AnimSequence, Y.Base,
{
	initializer: function(config)
	{
		if (Y.Lang.isArray(config.sequence))
		{
			this.append.apply(this, config.sequence);
		}
	},

	/**
	 * Append items to the sequence.
	 *
	 * @method append
	 * @param item* {Anim|Function|Array|Number} animation, function, list of animations and functions, or delay in milliseconds
	 */
	append: function(item)
	{
		if (arguments.length == 1)	// even for an array
		{
			this._list.push(item);
		}
		else
		{
			Y.each(Y.Array(arguments), function f(a)
			{
				this._list.push(a);
			},
			this);
		}
	},

	/**
	 * Prepend items to the sequence.
	 *
	 * @method prepend
	 * @param item* {Anim|Function|Array|Number} animation, function, list of animations and functions, or delay in milliseconds
	 */
	prepend: function(item)
	{
		if (arguments.length == 1)	// even for an array
		{
			this._list.unshift(item);
		}
		else
		{
			Y.each(Y.Array(arguments), function f(a)
			{
				this._list.unshift(a);
			},
			this);
		}
	},

	/**
	 * Starts or resumes the sequence.
	 *
	 * @method run
	 * @chainable
	 */
	run: function()
	{
		if (this.get('paused'))
		{
			this._set('paused', false);
			this.fire('resume');
		}
		else
		{
			this._set('iterationCount', 0);
			this._set('running', true);
			this.fire('start');
			this._index = this.get('reverse') ? this._list.length-1 : 0;
		}

		next.call(this);
		return this;
	},

	/**
	 * Stops and resets the sequence.
	 *
	 * @method stop
	 * @chainable
	 * @param finish {Boolean} If true, the animation will move to the last frame.
	 */
	stop: function(finish)
	{
		this._set('running', false);
		this._set('paused', false);

		for (var i=this._index; i<this._list.length; i++)
		{
			var item = this._list[i];
			if (Y.Lang.isArray(item))
			{
				Y.each(item, function(a)
				{
					a.run();	// so items beyond the current item will finish
					a.stop(finish);
				},
				this);
			}
			else if ((item instanceof Y.Anim) || (item instanceof Y.AnimSequence))
			{
				item.run();		// so items beyond the current item will finish
				item.stop(finish);
			}

			if (!finish)
			{
				break;
			}
		}

		this.fire('end');
		return this;
	},

	/**
	 * Pauses the sequence.  If the current item is a delay, the sequence will
	 * pause after the delay interval finishes.
	 *
	 * @method pause
	 * @chainable
	 */
	pause: function()
	{
		this._set('paused', true);

		var item = this._list[ this._index ];
		if (Y.Lang.isArray(item))
		{
			Y.each(item, function(a)
			{
				a.pause();
			},
			this);
		}
		else if ((item instanceof Y.Anim) || (item instanceof Y.AnimSequence))
		{
			item.pause();
		}

		this.fire('pause');
		return this;
	}
});

Y.AnimSequence = AnimSequence;


text:
package de.geeksfactory.opacclient.frontend;

import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import org.json.JSONException;

import java.io.IOException;
import java.util.List;

import de.geeksfactory.opacclient.OpacClient;
import de.geeksfactory.opacclient.R;
import de.geeksfactory.opacclient.objects.Account;
import de.geeksfactory.opacclient.objects.Library;

public class AccountListAdapter extends ArrayAdapter<Account> {
    private List<Account> objects;
    private Context context;
    private boolean highlight = true;

    public AccountListAdapter(Context context, List<Account> objects) {
        super(context, R.layout.listitem_account, objects);
        this.context = context;
        this.objects = objects;
    }

    public AccountListAdapter setHighlightActiveAccount(boolean highlight) {
        this.highlight = highlight;
        return this;
    }

    @SuppressWarnings("deprecation")
    @Override
    public View getView(int position, View contentView, ViewGroup viewGroup) {
        View view;

        // position always 0-7
        if (objects.get(position) == null) {
            LayoutInflater layoutInflater = (LayoutInflater) getContext()
                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            view = layoutInflater.inflate(R.layout.listitem_account, viewGroup,
                    false);
            return view;
        }

        Account item = objects.get(position);

        if (contentView == null) {
            LayoutInflater layoutInflater = (LayoutInflater) getContext()
                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
            view = layoutInflater.inflate(R.layout.listitem_account, viewGroup,
                    false);
        } else {
            view = contentView;
        }

        if (((OpacClient) ((Activity) context).getApplication()).getAccount()
                                                                .getId() == item.getId() &&
                highlight) {
            view.findViewById(R.id.rlItem).setBackgroundColor(
                    context.getResources().getColor(R.color.accent_red));
        } else {
            // should be replaced by setBackground which is not available before API level 16
            view.findViewById(R.id.rlItem).setBackgroundDrawable(null);
        }

        Library lib;
        try {
            lib = ((OpacClient) ((Activity) context).getApplication())
                    .getLibrary(item.getLibrary());
            TextView tvCity = (TextView) view.findViewById(R.id.tvCity);
            if (lib.getTitle() != null && !lib.getTitle().equals("null")) {
                tvCity.setText(lib.getCity() + "\n" + lib.getTitle());
            } else {
                tvCity.setText(lib.getCity());
            }
        } catch (IOException | JSONException e) {
            e.printStackTrace();
        }
        TextView tvName = (TextView) view.findViewById(R.id.tvName);
        if (item.getName() != null) {
            tvName.setText(item.getName());
        }
        TextView tvLabel = (TextView) view.findViewById(R.id.tvLabel);
        if (item.getLabel() != null) {
            tvLabel.setText(item.getLabel());
        }
        return view;
    }
}

redpajama_set_name: RedPajamaGithub


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.mycompany.rboss.domain;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 *
 * @author ib
 */
@Entity
public class OrderLineItem {
    @Id
    @GeneratedValue
    private int id;
    private int quantity;
    @ManyToOne
    @JoinColumn(name="productId")
    private Product product;

    public OrderLineItem() {
    }

    public OrderLineItem(int quantity, Product product) {
        this.quantity = quantity;
        this.product = product;
    }

    public int getId() {
        return id;
    }

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

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

}


text:
def test_standard(hatch, config_file):
    config_file.model.project = 'foo'
    config_file.save()

    result = hatch('config', 'restore')

    assert result.exit_code == 0, result.output
    assert result.output == 'Settings were successfully restored.\n'

    config_file.load()
    assert config_file.model.project == ''

def test_allow_invalid_config(hatch, config_file, helpers):
    config_file.model.project = ['foo']
    config_file.save()

    result = hatch('config', 'restore')

    assert result.exit_code == 0, result.output
    assert result.output == helpers.dedent(
        """
        Settings were successfully restored.
        """
    )


text:
require 'simplecov'
SimpleCov.start
if ENV['CI'] == 'true'
  require 'codecov'
  SimpleCov.formatter = SimpleCov::Formatter::Codecov
end

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'rb_safe'

require 'minitest/autorun'


text:
"""
WWW: http://4suite.com/4DOM         e-mail: support@4suite.com

Copyright (c) 2000 Fourthought Inc, USA.   All Rights Reserved.
See  http://4suite.com/COPYRIGHT  for license and copyright information
"""

from xml.dom.html.HTMLElement import HTMLElement
from xml.dom import Node

class HTMLOptionElement(HTMLElement):

    def __init__(self, ownerDocument, nodeName='OPTION'):
        HTMLElement.__init__(self, ownerDocument, nodeName)

    ### Attribute Methods ###

    def _get_defaultSelected(self):
        return self._get_selected()

    def _set_defaultSelected(self, selected):
        self._set_selected(selected)

    def _get_disabled(self):
        return self.getAttributeNode('DISABLED') and 1 or 0

    def _set_disabled(self,disabled):
        if disabled:
            self.setAttribute('DISABLED', 'DISABLED')
        else:
            self.removeAttribute('DISABLED')

    def _get_form(self):
        parent = self.parentNode
        while parent:
            if parent.nodeName == "FORM":
                return parent
            parent = parent.parentNode
        return None

    def _get_index(self):
        p = self.parentNode
        if p.tagName != 'SELECT':
            return -1
        options = p._get_options()
        try:
            return options.index(self)
        except:
            return -1

    def _get_label(self):
        return self.getAttribute('LABEL')

    def _set_label(self,label):
        self.setAttribute('LABEL',label)

    def _get_selected(self):
        return self.hasAttribute('SELECTED')

    def _set_selected(self, selected):
        if selected:
            self.setAttribute('SELECTED', 'SELECTED')
        else:
            self.removeAttribute('SELECTED')

    def _get_text(self):
        if not self.firstChild:
            return
        if self.firstChild == self.lastChild:
            return self.firstChild.data
        self.normalize()
        text = filter(lambda x: x.nodeType == Node.TEXT_NODE, self.childNodes)
        return text[0].data

    def _set_text(self, value):
        text = None
        for node in self.childNodes:
            if not text and node.nodeType == Node.TEXT_NODE:
                text = node
            else:
                self.removeChild(node)
        if text:
            text.data = value
        else:
            text = self.ownerDocument.createTextNode(value)
            self.appendChild(text)

    def _get_value(self):
        return self.getAttribute('VALUE')

    def _set_value(self,value):
        self.setAttribute('VALUE',value)

    ### Attribute Access Mappings ###

    _readComputedAttrs = HTMLElement._readComputedAttrs.copy()
    _readComputedAttrs.update ({
         'defaultSelected' : _get_defaultSelected,
         'disabled'        : _get_disabled,
         'form'            : _get_form,
         'index'           : _get_index,
         'label'           : _get_label,
         'selected'        : _get_selected,
         'text'            : _get_text,
         'value'           : _get_value,
      })

    _writeComputedAttrs = HTMLElement._writeComputedAttrs.copy()
    _writeComputedAttrs.update ({
         'defaultSelected' : _set_defaultSelected,
         'disabled'      : _set_disabled,
         'label'         : _set_label,
         'selected'      : _set_selected,
         'value'         : _set_value,
      })

    _readOnlyAttrs = filter(lambda k,m=_writeComputedAttrs: not m.has_key(k),
                     HTMLElement._readOnlyAttrs + _readComputedAttrs.keys())


text:
<?php

namespace app\components\fields;

use Yii;
use yii\helpers\Html;

use app\modules\category\models\Category;

class FieldSlugPrefix extends \yii\widgets\InputWidget {

	/**
	 * Renders the widget.
	 */
	public function run() {

        if (!isset($this->options['class']) OR empty($this->options['class']))
            $this->options['class'] = 'form-control';

        echo Html::activeTextInput($this->model, $this->attribute, $this->options);

//        $categories = Html::getAttributeValue($this->model, $this->attribute);
//        $model = new Category;

//        $items = [];
//        $category = Category::findOne(['module' => $this->model->moduleName, 'lft' => 1]);
//        $categories = $category->children()->all();
//        foreach ($categories as $cat) {
//            $items[(string) $cat->_id] = str_repeat('--', ($cat->depth)) . $cat->name;
//        }
//
//        echo Html::dropDownList('Article[slug_prefix][]', null, $items, $this->options);
	}
}


text:
#include "stdafx.h"
#include "../Fizz3d.h"
#include "../Engine.h"
#include "../NetworkClient.h"

using namespace std;

int _tmain(int argc, char* argv[])
{
	CEngine engine(NULL);
	engine.InitEngine();
	engine.MainLoop();

	return 0;
}


text:
external help file: Microsoft.Azure.Commands.OperationalInsights.dll-Help.xml
Module Name: AzureRM.OperationalInsights
online version:
schema: 2.0.0
---

# Invoke-AzureRmOperationalInsightsQuery

## SYNOPSIS
Returns search results based on the specified parameters.

## SYNTAX

### ByWorkspaceId (Default)
```
Invoke-AzureRmOperationalInsightsQuery -WorkspaceId <String> -Query <String> [-Timespan <TimeSpan>]
 [-Wait <Int32>] [-IncludeRender] [-IncludeStatistics] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]
```

### ByWorkspaceObject
```
Invoke-AzureRmOperationalInsightsQuery -Workspace <PSWorkspace> -Query <String> [-Timespan <TimeSpan>]
 [-Wait <Int32>] [-IncludeRender] [-IncludeStatistics] [-AsJob] [-DefaultProfile <IAzureContextContainer>]
 [<CommonParameters>]
```

## DESCRIPTION
The **Invoke-AzureRmOperationalInsightsQuery** cmdlet returns the search results based on the specified parameters.

You can access the status of the search in the Metadata property of the returned object.
If the status is Pending, then the search has not completed, and the results will be from the archive.

You can retrieve the results of the search from the Value property of the returned object.

## EXAMPLES

### Example 1: Get search results using a query
```
PS C:\> $queryResults = Invoke-AzureRmOperationalInsightsQuery -WorkspaceId "63613592-b6f7-4c3d-a390-22ba13102111" -Query "union * | take 10"
PS C:\> $queryResults.Results
...
```

Once invoked, $queryResults.Results will contain all of the resulting rows from your query.

### Example 2: Convert $results.Result IEnumberable to an array
```
PS C:\> $queryResults = Invoke-AzureRmOperationalInsightsQuery -WorkspaceId "63613592-b6f7-4c3d-a390-22ba13102111" -Query "union * | take 10"
PS C:\> $resultsArray = [System.Linq.Enumerable]::ToArray($results.Results)
...
```

Some queries can result in very large data sets being returned. Because of this, the default behavior of the cmdlet is to return an IEnumerable to reduce memory costs. If you'd prefer to have an array of results, you can use the LINQ Enumerable.ToArray() extension method to convert the IEnumerable to an array.

### Example 3: Get search results using a query over a specific timeframe
```
PS C:\> $queryResults = Invoke-AzureRmOperationalInsightsQuery -WorkspaceId "63613592-b6f7-4c3d-a390-22ba13102111" -Query "union * | take 10" -Timespan (New-TimeSpan -Hours 24)
PS C:\> $queryResults.Results
...
```

The results from this query will be limited to the past 24 hours.

### Example 4: Include render & statistics in query result
```
PS C:\> $queryResults = Invoke-AzureRmOperationalInsightsQuery -WorkspaceId "63613592-b6f7-4c3d-a390-22ba13102111" -Query "union * | take 10" -IncludeRender -IncludeStatistics
PS C:\> $queryResults.Results
...
PS C:\> $queryResults.Render
...
PS C:\> $queryResults.Statistics
...
```

See [https://dev.loganalytics.io/documentation/Using-the-API/RequestOptions](https://dev.loganalytics.io/documentation/Using-the-API/RequestOptions) for details on the render and statistics info.

## PARAMETERS

### -AsJob
Run cmdlet in the background
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.

```yaml
Type: IAzureContextContainer
Parameter Sets: (All)
Aliases: AzureRmContext, AzureCredential

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -IncludeRender
If specified, rendering information for metric queries will be included in the response.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -IncludeStatistics
If specified, query statistics will be included in the response.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Query
The query to execute.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Timespan
The timespan to bound the query by.

```yaml
Type: TimeSpan
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Wait
Puts an upper bound on the amount of time the server will spend processing the query.
See: https://dev.loganalytics.io/documentation/Using-the-API/Timeouts

```yaml
Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Workspace
The workspace

```yaml
Type: PSWorkspace
Parameter Sets: ByWorkspaceObject
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
```

### -WorkspaceId
The workspace ID.

```yaml
Type: String
Parameter Sets: ByWorkspaceId
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### Microsoft.Azure.Commands.OperationalInsights.Models.PSWorkspace
If piped in, the workspace ID will be extracted from the PSWorkspace. Otherwise you can use the workspaceId parameter to specify the workspace ID manually.

## OUTPUTS

### Microsoft.Azure.Commands.OperationalInsights.Models.PSQueryResponse
The ***PSQueryResponse*** contains the Results, Render & Statistics of the query.

## NOTES

## RELATED LINKS


text:
/**
 * @fileoverview This library provides functions for navigating to and dealing
 *     with views of the current gadget.
 */

var gadgets = gadgets || {};

/**
 * Implements the gadgets.views API spec. See
 * http://code.google.com/apis/gadgets/docs/reference/gadgets.views.html
 */
gadgets.views = function() {

  /**
   * Reference to the current view object.
   */
  var currentView = null;

  /**
   * Map of all supported views for this container.
   */
  var supportedViews = {};

  /**
   * Map of parameters passed to the current request.
   */
  var params = {};

  /**
   * Initializes views. Assumes that the current view is the "view"
   * url parameter (or default if "view" isn't supported), and that
   * all view parameters are in the form view-<name>
   * TODO: Use unified configuration when it becomes available.
   *
   */
  function init(config) {
    var supported = config["views"];

    for (var s in supported) if (supported.hasOwnProperty(s)) {
      var obj = supported[s];
      if (!obj) {
        continue;
      }
      supportedViews[s] = new gadgets.views.View(s, obj.isOnlyVisible);
      var aliases = obj.aliases || [];
      for (var i = 0, alias; alias = aliases[i]; ++i) {
        supportedViews[alias] = new gadgets.views.View(s, obj.isOnlyVisible);
      }
    }

    var urlParams = gadgets.util.getUrlParameters();
    // View parameters are passed as a single parameter.
    if (urlParams["view-params"]) {
      params = gadgets.json.parse(urlParams["view-params"]) || params;
    }
    currentView = supportedViews[urlParams.view] || supportedViews["default"];
  }

  gadgets.config.register("views", null, init);

  return {

    /**
     * Binds a URL template with variables in the passed environment
     * to produce a URL string.
     *
     * The URL template conforms to the IETF draft spec:
     * http://bitworking.org/projects/URI-Templates/spec/draft-gregorio-uritemplate-03.html
     *
     * @param {string} urlTemplate A URL template for a container view.
     * @param {Map<string, string>} environment A set of named variables.
     * @return {string} A URL string with substituted variables.
     */
    bind : function(urlTemplate, environment) {
      if (typeof urlTemplate != 'string') {
        throw new Error('Invalid urlTemplate');
      }

      if (typeof environment != 'object') {
        throw new Error('Invalid environment');
      }

      var varRE = /^([a-zA-Z0-9][a-zA-Z0-9_\.\-]*)(=([a-zA-Z0-9\-\._~]|(%[0-9a-fA-F]{2}))*)?$/,
          expansionRE = new RegExp('\\{([^}]*)\\}','g'),
          opRE = /^-([a-zA-Z]+)\|([^|]*)\|(.+)$/,
          result = [],
          textStart = 0,
          group,
          match,
          varName,
          defaultValue,
          op,
          arg,
          vars,
          flag;

      function getVar(varName, defaultVal) {
        return environment.hasOwnProperty(varName) ?
               environment[varName] : defaultVal;
      }

      function matchVar(v) {
        if (!(match = v.match(varRE))) {
          throw new Error('Invalid variable : ' + v);
        }
      }

      function matchVars(vs, j, map) {
        var i, va = vs.split(',');
        for (i = 0; i < va.length; ++i) {
          matchVar(va[i]);
          if (map(j, getVar(match[1]), match[1])) {
            break;
          }
        }
        return j;
      }

      while (group = expansionRE.exec(urlTemplate)) {
        result.push(urlTemplate.substring(textStart, group.index));
        textStart = expansionRE.lastIndex;
        if (match = group[1].match(varRE)) {
          varName = match[1];
          defaultValue = match[2] ? match[2].substr(1) : '';
          result.push(getVar(varName, defaultValue));
        } else {
          if (match = group[1].match(opRE)) {
            op = match[1];
            arg = match[2];
            vars = match[3];
            flag = 0;
            switch (op) {
            case 'neg':
              flag = 1;
            case 'opt':
              if (matchVars(vars, {flag: flag}, function(j, v) {
                    if (typeof v != 'undefined' && (typeof v != 'object' || v.length)) {
                      j.flag = !j.flag;
                      return 1;
                    }
                  }).flag) {
                result.push(arg);
              }
              break;
            case 'join':
              result.push(matchVars(vars, [], function(j, v, k) {
                if (typeof v === 'string') {
                  j.push(k + '=' + v);
                }
              }).join(arg));
              break;
            case 'list':
              matchVar(vars);
              value = getVar(match[1]);
              if (typeof value === 'object' && typeof value.join === 'function') {
                result.push(value.join(arg));
              }
              break;
            case 'prefix':
              flag = 1;
            case 'suffix':
              matchVar(vars);
              value = getVar(match[1], match[2] && match[2].substr(1));
              if (typeof value === 'string') {
                result.push(flag ? arg + value : value + arg);
              } else if (typeof value === 'object' && typeof value.join === 'function') {
                result.push(flag ? arg + value.join(arg) : value.join(arg) + arg);
              }
              break;
            default:
              throw new Error('Invalid operator : ' + op);
            }
          } else {
            throw new Error('Invalid syntax : ' + group[0]);
          }
        }
      }

      result.push(urlTemplate.substr(textStart));

      return result.join('');
    },

    /**
     * Attempts to navigate to this gadget in a different view. If the container
     * supports parameters will pass the optional parameters along to the gadget
     * in the new view.
     *
     * @param {gadgets.views.View} view The view to navigate to
     * @param {Map.<String, String>} opt_params Parameters to pass to the
     *     gadget after it has been navigated to on the surface
     * @param {string} opt_ownerId The ID of the owner of the page to navigate to;
     *                 defaults to the current owner.
     */
    requestNavigateTo : function(view, opt_params, opt_ownerId) {
      gadgets.rpc.call(
          null, "requestNavigateTo", null, view.getName(), opt_params, opt_ownerId);
    },

    /**
     * Returns the current view.
     *
     * @return {gadgets.views.View} The current view
     */
    getCurrentView : function() {
      return currentView;
    },

    /**
     * Returns a map of all the supported views. Keys each gadgets.view.View by
     * its name.
     *
     * @return {Map<gadgets.views.ViewType | String, gadgets.views.View>}
     *   All supported views, keyed by their name attribute.
     */
    getSupportedViews : function() {
      return supportedViews;
    },

    /**
     * Returns the parameters passed into this gadget for this view. Does not
     * include all url parameters, only the ones passed into
     * gadgets.views.requestNavigateTo
     *
     * @return {Map.<String, String>} The parameter map
     */
    getParams : function() {
      return params;
    }
  };
}();

gadgets.views.View = function(name, opt_isOnlyVisible) {
  this.name_ = name;
  this.isOnlyVisible_ = !!opt_isOnlyVisible;
};

/**
 * @return {String} The view name.
 */
gadgets.views.View.prototype.getName = function() {
  return this.name_;
};

/**
 * Returns the associated URL template of the view.
 * The URL template conforms to the IETF draft spec:
 * http://bitworking.org/projects/URI-Templates/spec/draft-gregorio-uritemplate-03.html
 * @return {string} A URL template.
 */
gadgets.views.View.prototype.getUrlTemplate = function() {
  return gadgets.config &&
         gadgets.config.views &&
         gadgets.config.views[this.name_] &&
         gadgets.config.views[this.name_].urlTemplate;
};

/**
 * Binds the view's URL template with variables in the passed environment
 * to produce a URL string.
 * @param {Map<string, string>} environment A set of named variables.
 * @return {string} A URL string with substituted variables.
 */
gadgets.views.View.prototype.bind = function(environment) {
  return gadgets.views.bind(this.getUrlTemplate(), environment);
};

/**
 * @return {Boolean} True if this is the only visible gadget on the page.
 */
gadgets.views.View.prototype.isOnlyVisibleGadget = function() {
  return this.isOnlyVisible_;
};

gadgets.views.ViewType = gadgets.util.makeEnum([
  "CANVAS", "HOME", "PREVIEW", "PROFILE",
  // TODO Deprecate the following ViewTypes.
  "FULL_PAGE", "DASHBOARD", "POPUP"
]);


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
namespace Fallout_Shelter_Save_Data.VaultData
{
    public class ConstructMgr
    {
        public string KEY_ROOM_DESERIALISE_ID = "roomDeserializeID";
        private int roomID;
        public int RoomDeserialiseID { get { return roomID; } set { roomID = value; } }
        public int RoomDeserializeID { get { return roomID; } set { roomID = value; } }
        public JObject ToObject()
        {
            JObject newobj = new JObject();
            newobj[KEY_ROOM_DESERIALISE_ID] = roomID;
            return newobj;
        }
        public string ToJSON()
        {
            return ToObject().ToString();
        }
    }
}


text:
.class public Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;
.super Lcn/com/smartdevices/bracelet/ui/SystemBarTintActivity;

# interfaces
.implements Landroid/view/View$OnClickListener;

# static fields
.field private static final a:Ljava/lang/String; = "AlarmRepeatActivity"

# instance fields
.field private b:Lcn/com/smartdevices/bracelet/view/SelectDaysView;

.field private c:I

.field private d:Landroid/widget/TextView;

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

    invoke-direct {p0}, Lcn/com/smartdevices/bracelet/ui/SystemBarTintActivity;-><init>()V

    return-void
.end method

.method static synthetic a(Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;)I
    .locals 1

    iget v0, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->c:I

    return v0
.end method

.method static synthetic a(Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;I)I
    .locals 0

    iput p1, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->c:I

    return p1
.end method

.method private a()V
    .locals 5

    const/4 v1, 0x0

    move v0, v1

    move v2, v1

    :goto_0
    sget-object v3, Lcn/com/smartdevices/bracelet/model/AlarmClockItem;->WEEK_MASK:[I

    array-length v3, v3

    if-ge v0, v3, :cond_1

    sget-object v3, Lcn/com/smartdevices/bracelet/model/AlarmClockItem;->WEEK_MASK:[I

    aget v3, v3, v0

    iget v4, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->c:I

    and-int/2addr v3, v4

    if-eqz v3, :cond_0

    add-int/lit8 v2, v2, 0x1

    :cond_0
    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_1
    const-string v0, "AlarmRepeatActivity"

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "bits="

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

    move-result-object v3

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

    move-result-object v3

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

    move-result-object v3

    invoke-static {v0, v3}, Lcn/com/smartdevices/bracelet/Debug;->i(Ljava/lang/String;Ljava/lang/String;)V

    iget-object v0, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->d:Landroid/widget/TextView;

    const v3, 0x7f0d0012

    invoke-virtual {p0, v3}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->getString(I)Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x1

    new-array v4, v4, [Ljava/lang/Object;

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    aput-object v2, v4, v1

    invoke-static {v3, v4}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    return-void
.end method

.method static synthetic b(Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;)Lcn/com/smartdevices/bracelet/view/SelectDaysView;
    .locals 1

    iget-object v0, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->b:Lcn/com/smartdevices/bracelet/view/SelectDaysView;

    return-object v0
.end method

.method private b()V
    .locals 4

    const v0, 0x7f0a0041

    invoke-virtual {p0, v0}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0a0042

    invoke-virtual {p0, v0}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    const v0, 0x7f0a0092

    invoke-virtual {p0, v0}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->d:Landroid/widget/TextView;

    const v0, 0x7f0a0093

    invoke-virtual {p0, v0}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcn/com/smartdevices/bracelet/view/SelectDaysView;

    iput-object v0, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->b:Lcn/com/smartdevices/bracelet/view/SelectDaysView;

    const-string v0, "AlarmRepeatActivity"

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "Days : "

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

    move-result-object v1

    iget v2, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->c:I

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

    move-result-object v1

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

    move-result-object v1

    invoke-static {v0, v1}, Lcn/com/smartdevices/bracelet/Debug;->i(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {p0}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    const v1, 0x7f07000d

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->b:Lcn/com/smartdevices/bracelet/view/SelectDaysView;

    new-instance v2, Lcn/com/smartdevices/bracelet/view/DayRepeatAdapter;

    iget v3, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->c:I

    invoke-direct {v2, p0, v0, v3}, Lcn/com/smartdevices/bracelet/view/DayRepeatAdapter;-><init>(Landroid/content/Context;[Ljava/lang/String;I)V

    invoke-virtual {v1, v2}, Lcn/com/smartdevices/bracelet/view/SelectDaysView;->setAdapter(Lcn/com/smartdevices/bracelet/view/WeekAdapter;)V

    iget-object v0, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->b:Lcn/com/smartdevices/bracelet/view/SelectDaysView;

    new-instance v1, Lcn/com/smartdevices/bracelet/ui/i;

    invoke-direct {v1, p0}, Lcn/com/smartdevices/bracelet/ui/i;-><init>(Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;)V

    invoke-virtual {v0, v1}, Lcn/com/smartdevices/bracelet/view/SelectDaysView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    return-void
.end method

.method static synthetic c(Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;)V
    .locals 0

    invoke-direct {p0}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->a()V

    return-void
.end method

# virtual methods
.method public onClick(Landroid/view/View;)V
    .locals 3

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

    move-result v0

    packed-switch v0, :pswitch_data_0

    :goto_0
    return-void

    :pswitch_0
    invoke-virtual {p0}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->finish()V

    goto :goto_0

    :pswitch_1
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    const-string v1, "Days"

    iget v2, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->c:I

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const/4 v1, -0x1

    invoke-virtual {p0, v1, v0}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->setResult(ILandroid/content/Intent;)V

    invoke-virtual {p0}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->finish()V

    goto :goto_0

    :pswitch_data_0
    .packed-switch 0x7f0a0041
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 3

    const/4 v2, 0x0

    invoke-super {p0, p1}, Lcn/com/smartdevices/bracelet/ui/SystemBarTintActivity;->onCreate(Landroid/os/Bundle;)V

    const v0, 0x7f030016

    invoke-virtual {p0, v0}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->setContentView(I)V

    invoke-virtual {p0}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    if-nez v0, :cond_0

    iput v2, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->c:I

    :cond_0
    const-string v1, "Days"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->c:I

    invoke-direct {p0}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->b()V

    invoke-direct {p0}, Lcn/com/smartdevices/bracelet/ui/AlarmRepeatActivity;->a()V

    return-void
.end method

.method protected onPause()V
    .locals 1

    invoke-super {p0}, Lcn/com/smartdevices/bracelet/ui/SystemBarTintActivity;->onPause()V

    const-string v0, "PageAlarmNewRepeatCustom"

    invoke-static {v0}, Lcn/com/smartdevices/bracelet/UmengAnalytics;->endPage(Ljava/lang/String;)V

    invoke-static {p0}, Lcn/com/smartdevices/bracelet/UmengAnalytics;->endSession(Landroid/content/Context;)V

    return-void
.end method

.method protected onResume()V
    .locals 1

    invoke-super {p0}, Lcn/com/smartdevices/bracelet/ui/SystemBarTintActivity;->onResume()V

    const-string v0, "PageAlarmNewRepeatCustom"

    invoke-static {v0}, Lcn/com/smartdevices/bracelet/UmengAnalytics;->startPage(Ljava/lang/String;)V

    invoke-static {p0}, Lcn/com/smartdevices/bracelet/UmengAnalytics;->startSession(Landroid/content/Context;)V

    return-void
.end method


text:
:Authors: - Josh Bailey

==================
FAUCET on NoviFlow
==================

------------
Introduction
------------

NoviFlow provide a range of switches known to work with FAUCET.

These instructions have been tested on NS1248, NS1132, NS2116, NS2128, NS2122, NS2150, NS21100 switches,
using software versions NW400.1.8 to NW400.3.1, running with FAUCET v1.6.4.

When using a more recent FAUCET version, different table configurations may be required.

-----
Setup
-----

**Configure the CPN on the switch**

In this example, the server running FAUCET is 10.0.1.8; configuration for CPN interfaces is not shown.

.. code:: bash

  set config controller controllergroup 1 controllerid 1 priority 1 ipaddr 10.0.1.8 port 6653 security none
  set config switch dpid 0x1

**Configure the tables**

  These matches are known to pass the unit tests as of FAUCET 1.6.4, but take care to adjust
  ACL table matches and any changes for future versions.

.. code:: bash

   set config pipeline tablesizes 1024 1024 1024 1024 1024 1024 1024 1024 1024 tablewidths 80 40 40 40 40 40 40 40 40
   set config table tableid 0 matchfields 0 3 4 5 6 10 14 23 29 31
   set config table tableid 1 matchfields 0 3 4 5 6
   set config table tableid 2 matchfields 0 5 6 10 11 12 14
   set config table tableid 3 matchfields 0 3 4 5 6 10 29
   set config table tableid 4 matchfields 5 6 12
   set config table tableid 5 matchfields 5 6 27
   set config table tableid 6 matchfields 3 5 10 23
   set config table tableid 7 matchfields 0 3 6
   set config table tableid 8 matchfields 0 3 6

**Create faucet.yaml**

::

    $ cat /etc/ryu/faucet/faucet.yaml
    vlans:
        100:
            name: "test"
    dps:
        noviflow-1:
            dp_id: 0x1
            hardware: "NoviFlow"
            interfaces:
                1:
                    native_vlan: 100
                2:
                    native_vlan: 100

**Run FAUCET**

::

    $ ryu-manager faucet.faucet --verbose

**Test connectivity**

Host(s) on ports 1 and 2 should now be able to communicate, and FAUCET's log file should indicate learning is occurring:

::

    May 14 17:06:15 faucet DEBUG    DPID 1 (0x1) connected
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Configuring DP
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Delete VLAN vid:100 ports:1,2,3,4
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) VLANs changed/added: [100]
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Configuring VLAN vid:100 ports:1,2,3,4
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Configuring VLAN vid:100 ports:1,2,3,4
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Port 1 added
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Sending config for port 1
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Port 2 added
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Sending config for port 2
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Port 3 added
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Sending config for port 3
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Port 4 added
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Sending config for port 4
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Packet_in src:62:4c:f5:bb:33:3c in_port:2 vid:100
    May 14 17:06:15 faucet.valve INFO     learned 1 hosts on vlan 100
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Packet_in src:62:4c:f5:bb:33:3c in_port:2 vid:100
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Packet_in src:2a:e1:65:3c:49:e4 in_port:3 vid:100
    May 14 17:06:15 faucet.valve INFO     DPID 1 (0x1) Packet_in src:2a:e1:65:3c:49:e4 in_port:3 vid:100
    May 14 17:06:15 faucet.valve INFO     learned 2 hosts on vlan 100


text:
@interface LEWaitItem ()

@end

@implementation LEWaitItem

- (void)awakeFromDictionary:(NSDictionary *__nonnull)dictionary {
  [super awakeFromDictionary:dictionary];

  //  Extract Text
  _text = dictionary[@"text"];
  _style = dictionary[@"style"];
  _renderedText = dictionary[@"rendered_text"];
  NSParameterAssert(_text);

  //  Extract Time

  NSString *number = dictionary[@"time"];

  _time = [number doubleValue];

  if ([number isKindOfClass:[NSString class]]) {
    if ([number hasSuffix:@"h"]) {
      _time = _time * 3600;
    } else if ([number hasSuffix:@"m"]) {
      _time = _time * 60;
    } else if ([number hasSuffix:@"d"]) {
      _time = _time * 3600 * 24;
    }
  }

  NSParameterAssert(_time > 0);
}

- (void)dumpToDictionary:(NSMutableDictionary *__nonnull)dictionary {
  [super dumpToDictionary:dictionary];

  dictionary[@"text"] = self.text;
  dictionary[@"style"] = self.style;
  dictionary[@"rendered_text"] = self.renderedText;
  dictionary[@"time"] = @(self.time);
}

@end


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="de.stefanhoth.android.got2048.fragments.PlayingFieldFragment">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="@dimen/score_header_height"
        android:background="@color/score_header_background"
        android:orientation="horizontal"
        android:padding="@dimen/score_header_padding">

        <TextView
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:gravity="center|end"
            android:maxLines="2"
            android:text="@string/label_score_current" />

        <TextView
            android:id="@+id/txt_score_current"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:gravity="center"
            android:singleLine="true"
            android:text="42"
            android:textColor="@android:color/holo_blue_dark"
            android:textSize="20sp" />

        <TextView
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:gravity="center|end"
            android:maxLines="2"
            android:text="@string/label_score_best" />

        <TextView
            android:id="@+id/txt_score_best"
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:layout_weight="1"
            android:gravity="center"
            android:singleLine="true"
            android:text="1338"
            android:textColor="@android:color/holo_blue_dark"
            android:textSize="20sp" />

    </LinearLayout>

    <de.stefanhoth.android.got2048.widgets.SquareGridView xmlns:squaregrid="http://schemas.android.com/apk/res-auto"

        android:id="@+id/playing_field"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_gravity="center_horizontal"
        android:background="@color/game_background"
        android:stretchMode="columnWidth"
        android:horizontalSpacing="2dp"
        android:verticalSpacing="2dp"
        android:padding="10dp"

        squaregrid:gridsize="4" />

    <TextView
        android:id="@+id/game_status"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        style="@android:style/TextAppearance.Holo.Large"
        android:textColor="@android:color/holo_red_light"
        android:gravity="center"
        tools:text="GAME OVER" />

</LinearLayout>


text:
/* tsqllint-disable */

/* a script with tsqllint disabled */

select * from foo


text: export * from './sibling-with-names'


text:
name: Blank Issue
about: Create a blank issue.
---


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <title>drip-api: LogController</title>

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">

  <link rel="stylesheet" href="css/style.css">

        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
          Toggle navigation

        </button>
        drip-api: LogController

Resources

Data Types

Files and Libraries

GET /user/v1.0/logs/

Back to Top

Home

Resources

LogController

LogController Resource

This controller is responsible for storing TOSCA descriptions that can be
used by the planner.

GET /user/v1.0/logs/

Security Roles Allowed

ADMIN, USER

Response Codes

            code
            condition

            401
            Bad credentials

Response Body

            media type
            data type

            application/json
            DRIPLogRecord
 (JSON)

            application/xml
            DRIPLogRecord
 (XML)

Example

Request

GET /user/v1.0/logs/
Accept: application/json

Response

HTTP/1.1 200 Looks Good
Content-Type: application/json

{
  "level" : "...",
  "loggerName" : "...",
  "message" : "...",
  "millis" : 12345,
  "sequenceNumber" : 12345,
  "sourceClassName" : "...",
  "sourceMethodName" : "...",
  "owner" : "user1",
  "id" : "58e3946e0fb4f562d84ba1ad",
  "timestamp" : 1499793079011
}

Generated by Enunciate.


text:
require 'spec_helper'

describe Travis::Services::FindAnnotations do
  include Support::ActiveRecord

  let(:job) { Factory(:test) }
  let!(:annotation) { Factory(:annotation, job: job) }
  let(:service) { described_class.new(params) }

  attr_reader :params

  describe 'run' do
    it 'finds annotations by a given list of ids' do
      @params = { ids: [annotation.id] }
      service.run.should eq([annotation])
    end

    it 'finds annotations by job_id' do
      @params = { job_id: job.id }
      service.run.should eq([annotation])
    end
  end
end


text:
#pragma once
#include <kernel_headers/laset.hpp>
#include <program.hpp>
#include <traits.hpp>
#include <string>
#include <mutex>
#include <map>
#include <dispatch.hpp>
#include <Param.hpp>
#include <debug_opencl.hpp>
#include <types.hpp>
#include <traits.hpp>

using cl::Buffer;
using cl::Program;
using cl::Kernel;
using cl::make_kernel;
using cl::EnqueueArgs;
using cl::NDRange;
using std::string;

namespace opencl
{

namespace kernel
{

static const int BLK_X = 64;
static const int BLK_Y = 32;

template<int num>
const char *laset_name() { return "laset_none"; }
template<> const char *laset_name<0>() { return "laset_full"; }
template<> const char *laset_name<1>() { return "laset_lower"; }
template<> const char *laset_name<2>() { return "laset_upper"; }

template<typename T, int uplo>
void laset(int m, int  n,
           T offdiag, T diag,
           cl_mem dA, size_t dA_offset, magma_int_t ldda)
{

    static std::once_flag compileFlags[DeviceManager::MAX_DEVICES];
    static std::map<int, Program*>  setProgs;
    static std::map<int, Kernel*> setKernels;

    int device = getActiveDeviceId();

    std::call_once(compileFlags[device], [device] () {

            std::ostringstream options;
            options << " -D T=" << dtype_traits<T>::getName()
                    << " -D BLK_X=" << BLK_X
                    << " -D BLK_Y=" << BLK_Y
                    << " -D IS_CPLX=" << af::iscplx<T>();

            if (std::is_same<T, double>::value ||
                std::is_same<T, cdouble>::value) {
                options << " -D USE_DOUBLE";
            }

            cl::Program prog;
            buildProgram(prog, laset_cl, laset_cl_len, options.str());
            setProgs[device] = new Program(prog);
            setKernels[device] = new Kernel(*setProgs[device], laset_name<uplo>());
        });

    int groups_x = (m - 1) / BLK_X + 1;
    int groups_y = (n - 1) / BLK_Y + 1;

    NDRange local(BLK_X, 1);
    NDRange global(groups_x * local[0],
                   groups_y * local[1]);

    auto lasetOp = make_kernel<int, int, T, T, cl_mem, unsigned long long, int>(*setKernels[device]);
    lasetOp(EnqueueArgs(getQueue(), global, local),
            m, n, offdiag, diag, dA, dA_offset, ldda);
}

}
}


text:
namespace Microsoft.Azure.Management.AppService.Fluent.Models
{
    using Microsoft.Rest;
    using Microsoft.Rest.Serialization;
    using Newtonsoft.Json;
    using System.Linq;

    /// <summary>
    /// The source control OAuth token.
    /// </summary>
    [Rest.Serialization.JsonTransformation]
    public partial class SourceControlInner : ProxyOnlyResourceInner
    {
        /// <summary>
        /// Initializes a new instance of the SourceControlInner class.
        /// </summary>
        public SourceControlInner()
        {
            CustomInit();
        }

        /// <summary>
        /// Initializes a new instance of the SourceControlInner class.
        /// </summary>
        /// <param name="kind">Kind of resource.</param>
        /// <param name="token">OAuth access token.</param>
        /// <param name="tokenSecret">OAuth access token secret.</param>
        /// <param name="refreshToken">OAuth refresh token.</param>
        /// <param name="expirationTime">OAuth token expiration.</param>
        public SourceControlInner(string id = default(string), string name = default(string), string type = default(string), string kind = default(string), string token = default(string), string tokenSecret = default(string), string refreshToken = default(string), System.DateTime? expirationTime = default(System.DateTime?))
            : base(id, name, type, kind)
        {
            Token = token;
            TokenSecret = tokenSecret;
            RefreshToken = refreshToken;
            ExpirationTime = expirationTime;
            CustomInit();
        }

        /// <summary>
        /// An initialization method that performs custom operations like setting defaults
        /// </summary>
        partial void CustomInit();

        /// <summary>
        /// Gets or sets oAuth access token.
        /// </summary>
        [JsonProperty(PropertyName = "properties.token")]
        public string Token { get; set; }

        /// <summary>
        /// Gets or sets oAuth access token secret.
        /// </summary>
        [JsonProperty(PropertyName = "properties.tokenSecret")]
        public string TokenSecret { get; set; }

        /// <summary>
        /// Gets or sets oAuth refresh token.
        /// </summary>
        [JsonProperty(PropertyName = "properties.refreshToken")]
        public string RefreshToken { get; set; }

        /// <summary>
        /// Gets or sets oAuth token expiration.
        /// </summary>
        [JsonProperty(PropertyName = "properties.expirationTime")]
        public System.DateTime? ExpirationTime { get; set; }

    }
}


text:
require "spec_helper"

describe ApplicationController do
  controller do
    ugly_javascript

    def index
      respond_to do |format|
        format.html { render nothing: true }
        format.js   { render nothing: true }
      end
    end
  end

  describe 'GET javascript' do
    it do
      get :index
      expect(response).to be_success
    end

    it do
      get :index
      expect(Uglifier).to_not receive(:compile)
    end
  end

  describe 'GET index.js' do
    it do
      get :index, format: "js"
      expect(response).to be_success
    end

    it do
      expect(Uglifier).to receive(:compile)
      get :index, format: "js"
    end
  end
end


text:
Instead of providing a module, a bundle, a bridge or similar framework integration `prooph/psr7-middleware` ships with
*interop factories*.

## Factory-Driven Middleware Creation

The concept behind these factories is simple but powerful. It allows us to provide you with bootstrapping logic for
the message buses without the need to rely on a specific framework. However, the factories have three requirements.

### Requirements

1. Your Inversion of Control container must implement the [interop-container interface](https://github.com/container-interop/container-interop).
2. [interop-config](https://github.com/sandrokeil/interop-config) must be installed
3. The application configuration should be registered with the service id `config` in the container.

*Note: Don't worry, if your environment doesn't provide the requirements. You can
always bootstrap a middleware by hand. Just look at the factories for inspiration in this case.*

## Customizing via Configuration

In the `config` folder of `prooph/psr7-middleware` you will find example configuration files.
Configuration is a simple PHP array flavored with some comments to help you understand the structure.

Now follow the simple steps below to integrate `prooph/psr7-middleware` in your framework and/or application.

1. Merge configuration into your application config either by hand or by using the mechanism of your framework.
2. Customize the configuration so that it meet your needs. The comments in the config file will tell you more.
3. (Only required if not done by your framework) Make your application config available as a service in the
Inversion of Control container. Use `config` as the service id (common id for application config).
4. Register the middleware as services in your IoC container and use the located in `src/Container` to create the different middleware.
How you can register a middlware depends on your container. Some containers like [zend-servicemanager](https://github.com/zendframework/zend-servicemanager)
or [pimple-interop](https://github.com/moufmouf/pimple-interop) allow you to map a service id to an `invokable factory`.
If you use such an IoC container you are lucky. In this case you can use the `prooph/psr7-middleware` factories as-is.
We recommend using `Prooph\Middleware\<CommandMiddleware/EventMiddleware/QueryMiddleware::class/MessageMiddleware::class` as service id.

*Note: If you're still unsure how to do it you might have a look at the `CommandMiddlewareFactoryTest` located in the `tests/Container` folder.


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>My AngularJS App</title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="bower_components/html5-boilerplate/dist/css/normalize.css">
  <link rel="stylesheet" href="bower_components/html5-boilerplate/dist/css/main.css">
  <link rel="stylesheet" href="app.css">
  <link rel="stylesheet" href="bower_components/angular-bootstrap/ui-bootstrap-csp.css">
  <link rel="stylesheet" href="bower_components/bootstrap-css-only/css/bootstrap.css">

        <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">

        </button>

          Home

              een andere link ofzo


text:
package org.nnsoft.be3.annotations;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

/**
 * It defines the base URI to identify a bean when it's
 * serialized in RDF.
 *
 * @author Davide Palmisano ( dpalmisano@gmail.com )
 */
@Retention(RetentionPolicy.RUNTIME)
public @interface RDFClassType {

    String type();

}


text:
/*can@2.2.7#control/control*/
define([
    'can/util/library',
    'can/construct'
], function (can) {
    var bind = function (el, ev, callback) {
            can.bind.call(el, ev, callback);
            return function () {
                can.unbind.call(el, ev, callback);
            };
        }, isFunction = can.isFunction, extend = can.extend, each = can.each, slice = [].slice, paramReplacer = /\{([^\}]+)\}/g, special = can.getObject('$.event.special', [can]) || {}, delegate = function (el, selector, ev, callback) {
            can.delegate.call(el, selector, ev, callback);
            return function () {
                can.undelegate.call(el, selector, ev, callback);
            };
        }, binder = function (el, ev, callback, selector) {
            return selector ? delegate(el, can.trim(selector), ev, callback) : bind(el, ev, callback);
        }, basicProcessor;
    var Control = can.Control = can.Construct({
            setup: function () {
                can.Construct.setup.apply(this, arguments);
                if (can.Control) {
                    var control = this, funcName;
                    control.actions = {};
                    for (funcName in control.prototype) {
                        if (control._isAction(funcName)) {
                            control.actions[funcName] = control._action(funcName);
                        }
                    }
                }
            },
            _shifter: function (context, name) {
                var method = typeof name === 'string' ? context[name] : name;
                if (!isFunction(method)) {
                    method = context[method];
                }
                return function () {
                    context.called = name;
                    return method.apply(context, [this.nodeName ? can.$(this) : this].concat(slice.call(arguments, 0)));
                };
            },
            _isAction: function (methodName) {
                var val = this.prototype[methodName], type = typeof val;
                return methodName !== 'constructor' && (type === 'function' || type === 'string' && isFunction(this.prototype[val])) && !!(special[methodName] || processors[methodName] || /[^\w]/.test(methodName));
            },
            _action: function (methodName, options) {
                paramReplacer.lastIndex = 0;
                if (options || !paramReplacer.test(methodName)) {
                    var convertedName = options ? can.sub(methodName, this._lookup(options)) : methodName;
                    if (!convertedName) {
                        can.dev.log('can/control/control.js: No property found for handling ' + methodName);
                        return null;
                    }
                    var arr = can.isArray(convertedName), name = arr ? convertedName[1] : convertedName, parts = name.split(/\s+/g), event = parts.pop();
                    return {
                        processor: processors[event] || basicProcessor,
                        parts: [
                            name,
                            parts.join(' '),
                            event
                        ],
                        delegate: arr ? convertedName[0] : undefined
                    };
                }
            },
            _lookup: function (options) {
                return [
                    options,
                    window
                ];
            },
            processors: {},
            defaults: {}
        }, {
            setup: function (element, options) {
                var cls = this.constructor, pluginname = cls.pluginName || cls._fullName, arr;
                this.element = can.$(element);
                if (pluginname && pluginname !== 'can_control') {
                    this.element.addClass(pluginname);
                }
                arr = can.data(this.element, 'controls');
                if (!arr) {
                    arr = [];
                    can.data(this.element, 'controls', arr);
                }
                arr.push(this);
                this.options = extend({}, cls.defaults, options);
                this.on();
                return [
                    this.element,
                    this.options
                ];
            },
            on: function (el, selector, eventName, func) {
                if (!el) {
                    this.off();
                    var cls = this.constructor, bindings = this._bindings, actions = cls.actions, element = this.element, destroyCB = can.Control._shifter(this, 'destroy'), funcName, ready;
                    for (funcName in actions) {
                        if (actions.hasOwnProperty(funcName)) {
                            ready = actions[funcName] || cls._action(funcName, this.options, this);
                            if (ready) {
                                bindings.control[funcName] = ready.processor(ready.delegate || element, ready.parts[2], ready.parts[1], funcName, this);
                            }
                        }
                    }
                    can.bind.call(element, 'removed', destroyCB);
                    bindings.user.push(function (el) {
                        can.unbind.call(el, 'removed', destroyCB);
                    });
                    return bindings.user.length;
                }
                if (typeof el === 'string') {
                    func = eventName;
                    eventName = selector;
                    selector = el;
                    el = this.element;
                }
                if (func === undefined) {
                    func = eventName;
                    eventName = selector;
                    selector = null;
                }
                if (typeof func === 'string') {
                    func = can.Control._shifter(this, func);
                }
                this._bindings.user.push(binder(el, eventName, func, selector));
                return this._bindings.user.length;
            },
            off: function () {
                var el = this.element[0], bindings = this._bindings;
                if (bindings) {
                    each(bindings.user || [], function (value) {
                        value(el);
                    });
                    each(bindings.control || {}, function (value) {
                        value(el);
                    });
                }
                this._bindings = {
                    user: [],
                    control: {}
                };
            },
            destroy: function () {
                if (this.element === null) {
                    can.dev.warn('can/control/control.js: Control already destroyed');
                    return;
                }
                var Class = this.constructor, pluginName = Class.pluginName || Class._fullName, controls;
                this.off();
                if (pluginName && pluginName !== 'can_control') {
                    this.element.removeClass(pluginName);
                }
                controls = can.data(this.element, 'controls');
                controls.splice(can.inArray(this, controls), 1);
                can.trigger(this, 'destroyed');
                this.element = null;
            }
        });
    var processors = can.Control.processors;
    basicProcessor = function (el, event, selector, methodName, control) {
        return binder(el, event, can.Control._shifter(control, methodName), selector);
    };
    each([
        'change',
        'click',
        'contextmenu',
        'dblclick',
        'keydown',
        'keyup',
        'keypress',
        'mousedown',
        'mousemove',
        'mouseout',
        'mouseover',
        'mouseup',
        'reset',
        'resize',
        'scroll',
        'select',
        'submit',
        'focusin',
        'focusout',
        'mouseenter',
        'mouseleave',
        'touchstart',
        'touchmove',
        'touchcancel',
        'touchend',
        'touchleave',
        'inserted',
        'removed'
    ], function (v) {
        processors[v] = basicProcessor;
    });
    return Control;
});


text:
double YUCIGaussianDistributionPDF(double x, double sigma) {
    return 1.0/sqrt(2 * M_PI * sigma * sigma) * exp((- x * x) / (2 * sigma * sigma));
}


text:
package com.anrisoftware.globalpom.core.posixlocale;

import static com.google.inject.Guice.createInjector;

import com.google.inject.AbstractModule;
import com.google.inject.Injector;
import com.google.inject.assistedinject.FactoryModuleBuilder;

/**
 * Installs the POSIX locale factory.
 *
 * @author Erwin Müller, erwin.mueller@deventm.de
 * @since 2.6
 */
public class PosixLocaleModule extends AbstractModule {

    /**
     * Returns the POSIX locale factory.
     *
     * @return the {@link PosixLocaleFactory}.
     */
    public static PosixLocaleFactory getPosixLocaleFactory() {
        return getFactory();
    }

    /**
     * Returns the POSIX locale factory.
     *
     * @return the {@link PosixLocaleFactory}.
     */
    public static PosixLocaleFactory getFactory() {
        return InjectorInstance.factory;
    }

    private static class InjectorInstance {

        static final Injector injector = createInjector(new PosixLocaleModule());

        static final PosixLocaleFactory factory = injector
                .getInstance(PosixLocaleFactory.class);
    }

    @Override
    protected void configure() {
        install(new FactoryModuleBuilder().implement(PosixLocale.class,
                PosixLocale.class).build(PosixLocaleFactory.class));
    }

}


text:
package com.hxxc.user.app.ui.mine.tradelist;

import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.widget.TextView;

import com.flyco.tablayout.CommonTabLayout;
import com.flyco.tablayout.listener.CustomTabEntity;
import com.flyco.tablayout.listener.OnTabSelectListener;
import com.hxxc.user.app.R;
import com.hxxc.user.app.UserInfoConfig;
import com.hxxc.user.app.adapter.FragmentAdapter;
import com.hxxc.user.app.data.entity.TabEntity;
import com.hxxc.user.app.ui.base.BaseRxActivity;
import com.hxxc.user.app.ui.mine.tradelist.pinned.TradeTFragment;

import java.util.ArrayList;
import java.util.Arrays;

import butterknife.BindView;

/**
 * Created by houwen.lai on 2016/11/8.
 * 交易记录
 */

public class TradeListActivity extends BaseRxActivity{

    @BindView(R.id.toolbar)
    Toolbar toolbar;
    @BindView(R.id.toolbar_title)
    TextView toolbar_title;

    @BindView(R.id.cTabLayout_trade_list)
    CommonTabLayout cTabLayout;
    @BindView(R.id.viewpager_trade_list)
    ViewPager viewpager;

    private ArrayList<Fragment> mFragments = new ArrayList<>();
    private String[] mTitles = {"全部", "收入", "支出"};
    private String[] mStatus = {"0", "1", "2"};//
    private ArrayList<CustomTabEntity> mTabEntities = new ArrayList<>();
    int postion =0;

    @Override
    public int getLayoutId() {
        return R.layout.trade_list;
    }

    @Override
    public void initView() {
        toolbar_title.setText("交易记录");
        setSupportActionBar(toolbar);
        android.support.v7.app.ActionBar actionBar = getSupportActionBar();
        if (actionBar != null){
            actionBar.setDisplayHomeAsUpEnabled(true);
            actionBar.setDisplayShowTitleEnabled(false);
        }

        if (getIntent().hasExtra("index")){
            postion = getIntent().getIntExtra("index",0);
        }

        tabLayoutInit();
    }

    @Override
    public void initPresenter() {

    }
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case android.R.id.home:
                finish();
                return true;
        }
        return super.onOptionsItemSelected(item);
    }

    private void tabLayoutInit() {
        mFragments.clear();
        mTabEntities.clear();
//        mFragments.add(TradeFragment.newInstance(mStatus[0]));//  所有
//        mFragments.add(TradeFragment.newInstance(mStatus[1]));//  收入
//        mFragments.add(TradeFragment.newInstance(mStatus[2]));//  支出
        mFragments.add(TradeTFragment.newInstance(mStatus[0]));//  所有
        mFragments.add(TradeTFragment.newInstance(mStatus[1]));//  收入
        mFragments.add(TradeTFragment.newInstance(mStatus[2]));//  支出
        for (int i = 0; i < mTitles.length; i++) {
            mTabEntities.add(new TabEntity(mTitles[i]));
        }
        cTabLayout.setIconVisible(false);
        cTabLayout.setTabData(mTabEntities);
        cTabLayout.setOnTabSelectListener(new OnTabSelectListener() {
            @Override
            public void onTabSelect(int position) {
                viewpager.setCurrentItem(position);
            }

            @Override
            public void onTabReselect(int position) {
                if (position == 0) {

                }

            }
        });

        viewpager.setAdapter(new FragmentAdapter(getSupportFragmentManager(), mFragments, Arrays.asList(mTitles)));
        viewpager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
            @Override
            public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {

            }

            @Override
            public void onPageSelected(int position) {
                cTabLayout.setCurrentTab(position);
            }

            @Override
            public void onPageScrollStateChanged(int state) {

            }
        });

        cTabLayout.setCurrentTab(postion);
        viewpager.setCurrentItem(postion);
    }
}


text:
CC :=gcc
LDFLAGS := -L/usr/lib
LDLIBS  := -lm

all: rand_uniform rand_exp rand_normal pi integral_unbiased integral_importance

rand_uniform:rand_uniform.c
		$(CC) $(LFDFLAGS) $(LDLIBS) rand_uniform.c -o rand_uniform

rand_exp:rand_exp.c
		$(CC) $(LFDFLAGS) $(LDLIBS) rand_exp.c -o rand_exp

rand_normal:rand_normal.c
		$(CC) $(LFDFLAGS) $(LDLIBS) rand_normal.c -o rand_normal

pi:pi.c
		$(CC) $(LFDFLAGS) $(LDLIBS) pi.c -o pi

integral_unbiased:integral_unbiased.c
		$(CC) $(LFDFLAGS) $(LDLIBS) integral_unbiased.c -o integral_unbiased

integral_importance:integral_importance.c
		$(CC) $(LFDFLAGS) $(LDLIBS) integral_importance.c -o integral_importance

# Useful phony targets
.PHONY: clobber clean
clobber: clean
		$(RM)  *.dat rand_uniform rand_exp rand_normal pi integral_unbiased integral_importance


text:
package com.simplifiedlogic.nitro.jlink.data;

import java.io.Serializable;

/**
 * Data about a drawing view
 *
 * @author Adam Andrews
 *
 */
public class ViewDetailData implements Serializable {

	private static final long serialVersionUID = 1L;

	private String name;
	private int sheetNo;
	private JLPoint location;
	private double textHeight;
	private String model;
	private String simpRep;

	/**
	 * @return The view name
	 */
	public String getName() {
		return name;
	}
	/**
	 * @param name The view name
	 */
	public void setName(String name) {
		this.name = name;
	}
	/**
	 * @return The sheet number that contains the view
	 */
	public int getSheetNo() {
		return sheetNo;
	}
	/**
	 * @param sheetNo The sheet number that contains the view
	 */
	public void setSheetNo(int sheetNo) {
		this.sheetNo = sheetNo;
	}
	/**
	 * @return The text height for the view
	 */
	public double getTextHeight() {
		return textHeight;
	}
	/**
	 * @param textHeight The text height for the view
	 */
	public void setTextHeight(double textHeight) {
		this.textHeight = textHeight;
	}
	/**
	 * @return The coordinates of the center of the view's bounding box
	 */
	public JLPoint getLocation() {
		return location;
	}
	/**
	 * @param location The coordinates of the center of the view's bounding box
	 */
	public void setLocation(JLPoint location) {
		this.location = location;
	}
	/**
	 * @return The view model name
	 */
	public String getModel() {
		return model;
	}
	/**
	 * @param model The view model name
	 */
	public void setModel(String model) {
		this.model = model;
	}
	/**
	 * @return The view's simplified rep, if any
	 */
	public String getSimpRep() {
		return simpRep;
	}
	/**
	 * @param simpRep The view's simplified rep
	 */
	public void setSimpRep(String simpRep) {
		this.simpRep = simpRep;
	}
}


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

namespace Craswell.Automation.DataAccess
{
    /// <summary>
    /// The web repository configuration data model.
    /// </summary>
    public class WebRepositoryConfigurationData : IWebRepositoryConfiguration
    {
        /// <summary>
        /// Gets or sets the identifier.
        /// </summary>
        /// <value>The identifier.</value>
        public virtual int Id { get; set; }

        /// <summary>
        /// Gets the address.
        /// </summary>
        /// <value>The address.</value>
        public virtual Uri Address { get; set; }

        /// <summary>
        /// Gets the username.
        /// </summary>
        /// <value>The username.</value>
        public virtual string Username { get; set; }

        /// <summary>
        /// Gets the password.
        /// </summary>
        /// <value>The password.</value>
        public virtual string Password { get; set; }

        /// <summary>
        /// Gets the security questions.
        /// </summary>
        /// <value>The security questions.</value>
        public virtual IDictionary<string, string> SecurityQuestions { get; set; }
    }
}