text:
const getSearchFilters = search => {
  if (!search || !search.trim()) {
    return [{
      match_all: {}
    }]
  }
  return [{
    simple_query_string : {
      query: `${search.trim()}`, //`${search.trim().split(" ").join("~1 + ")}~1`, // what about "quoted searches"?
      fields: [
        "name^3",
        "alternativeNames^3",
        "activities",
        "contact.email",
        "trustees.names",
        "areasOfOperation.name",
        "causes.name",
        "beneficiaries.name",
        "operations.name",
        "grants.description",
        "grants.fundingOrganization.name",
      ],
    }
  }]
}

module.exports = getSearchFilters


text:
class Operator : public Word {
	protected:
		virtual void read(Machine &m) = 0;

	private:
		virtual std::ostream &print(std::ostream &strm) const;
		friend std::ostream& operator<<(std::ostream&, const Word&);
};

class AdditionOperator : public Operator {
	protected:
		virtual void read(Machine &m);

	private:
		virtual std::ostream &print(std::ostream &strm) const;
		friend std::ostream& operator<<(std::ostream&, const Word&);
};

#endif

redpajama_set_name: RedPajamaGithub


text:
namespace DataImporter
{
    partial class ImportProgressForm
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.importLabel = new System.Windows.Forms.Label();
            this.progressBar1 = new System.Windows.Forms.ProgressBar();
            this.cancelButton = new System.Windows.Forms.Button();
            this.SuspendLayout();
            //
            // importLabel
            //
            this.importLabel.AutoSize = true;
            this.importLabel.Location = new System.Drawing.Point(12, 9);
            this.importLabel.Name = "importLabel";
            this.importLabel.Size = new System.Drawing.Size(59, 13);
            this.importLabel.TabIndex = 0;
            this.importLabel.Text = "Importing...";
            //
            // progressBar1
            //
            this.progressBar1.Location = new System.Drawing.Point(12, 25);
            this.progressBar1.Name = "progressBar1";
            this.progressBar1.Size = new System.Drawing.Size(356, 23);
            this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
            this.progressBar1.TabIndex = 1;
            //
            // cancelButton
            //
            this.cancelButton.Location = new System.Drawing.Point(293, 61);
            this.cancelButton.Name = "cancelButton";
            this.cancelButton.Size = new System.Drawing.Size(75, 23);
            this.cancelButton.TabIndex = 2;
            this.cancelButton.Text = "Cancel";
            this.cancelButton.UseVisualStyleBackColor = true;
            this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
            //
            // ImportProgressForm
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(380, 96);
            this.ControlBox = false;
            this.Controls.Add(this.cancelButton);
            this.Controls.Add(this.progressBar1);
            this.Controls.Add(this.importLabel);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "ImportProgressForm";
            this.ShowInTaskbar = false;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Importing...";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Label importLabel;
        private System.Windows.Forms.ProgressBar progressBar1;
        private System.Windows.Forms.Button cancelButton;
    }
}


text:
package com.codezjx.dribbbledroid.presenter;

/**
 * Created by codezjx on 2016/6/14.<br/>
 * Base presenter object in "MVP" pattern.
 */
public interface BasePresenter {

    /**
     * Start the relevant task
     */
    void start();

}


text:
const test = require('ava');
const sinon = require('sinon');
const AllSquare = require('../allSquare');
const Square = require('../square');
const SquareCondition = require('../squareCondition');

const squareFirst = new Square(3, 'red');
const squareSecond = new Square(2, 'red');
const squareThird= new Square(5, 'yellow');

const allSquare = new AllSquare([squareFirst, squareSecond, squareThird]);

test('AllSquare special square area is 0 when no such color', function (t) {
  t.is(allSquare.getSpecialSquareArea(new SquareCondition(3, 20, ['grey'])), 0);
});

test('AllSquare special square area', function (t) {
  t.is(allSquare.getSpecialSquareArea(new SquareCondition(5, 10, ['red'])), 9);
});


text:
<?php

namespace RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Language;

use RedKiteLabs\RedKiteCms\RedKiteCmsBundle\Core\Event\Content\Base\BaseBeforeActionEvent;

/**
 * Defines the AfterPageAddedEvent event
 *
 * @author RedKite Labs <webmaster@redkite-labs.com>
 *
 * @api
 */
class BeforeDeleteLanguageCommitEvent extends BaseBeforeActionEvent
{
}


text:
.EmailComposer {
  display: grid;
  grid-row-gap: 1ex;
  grid-template-columns: 0.3fr auto;
  grid-template-rows: auto;
  grid-template-areas:
    'komuLabel komuInput'
    'predmetLabel predmetInput'
    'text text'
    'submit none'
    'html html';
}

.EmailComposer button,
.EmailComposer input,
.EmailComposer textarea {
  border: 1px solid #b2b2b2;
  border-radius: 3px;
  padding: 3px;
}
.EmailComposer input {
  max-width: 30em;
}

.EmailComposer button:focus,
.EmailComposer input:focus,
.EmailComposer textarea:focus {
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);
}

.EmailComposer__text {
  grid-area: text;
  width: 90%;
}

.EmailComposer__submit {
  --gradient-color-start: 45, 206, 93;
  --gradient-color-end: 22, 112, 49;
  background-image: linear-gradient(
    rgba(var(--gradient-color-start), 0.75),
    rgba(var(--gradient-color-end), 0.75)
  );
  color: white;
  grid-area: submit;
  max-width: 10em;
}
.EmailComposer__submit:hover {
  background-image: linear-gradient(
    rgba(var(--gradient-color-start), 1),
    rgba(var(--gradient-color-end), 1)
  );
  border-color: #757575;
}

.EmailComposer__html {
  border: 1px solid green;
  border-radius: 3px;
  display: block;
  grid-area: html;
  padding: 3px;
  text-align: left;
  width: 90%;
}


text:
var group__magma__aux1 =
[
    [ "single precision", "group__magma__saux1.html", null ],
    [ "double precision", "group__magma__daux1.html", null ],
    [ "single-complex precision", "group__magma__caux1.html", null ],
    [ "double-complex precision", "group__magma__zaux1.html", null ]
];


text:
static float const OLKVertScratchButtonDefaultOuterHotZoneWidth = 15;
static float const OLKVertScratchButtonDefaultOuterHotZoneHeight = 30;
static float const OLKVertScratchButtonDefaultEscapeZoneWidth = 60;
static float const OLKVertScratchButtonDefaultEscapeZoneHeight = 100;
static float const OLKVertScratchButtonDefaultResetEscapeZoneWidth = 40;
static float const OLKVertScratchButtonDefaultResetEscapeZoneHeight = 100;
static float const OLKVertScratchButtonDefaultAlphaFadeOutAmtPerCycle = 0.1;

@implementation OLKVertScratchButton
{
    BOOL _innerHotZoneSet;
}

@synthesize topInit = _topInit;
@synthesize expandsOnInit = _expandsOnInit;
@synthesize expandsOutEdgePercent = _expandsOutEdgePercent;
@synthesize nonExpandedRect = _nonExpandedRect;

- (id)init
{
    if (self=[super init])
    {
        [self initControlZones];
        _expandsOutEdgePercent = 1;
    }
    return self;
}

- (id)copyWithZone:(NSZone *)zone {
    OLKVertScratchButton *copyOfSelf = [super copyWithZone:zone];
    copyOfSelf.topInit = _topInit;
    copyOfSelf.expandsOnInit = _expandsOnInit;
    copyOfSelf.expandsOutEdgePercent = _expandsOutEdgePercent;
    copyOfSelf.nonExpandedRect = _nonExpandedRect;

    return copyOfSelf;
}

- (void)initControlZones
{
    self.outerHotZone = NSMakeSize(OLKVertScratchButtonDefaultOuterHotZoneWidth, OLKVertScratchButtonDefaultOuterHotZoneHeight);
    self.escapeZone = NSMakeSize(OLKVertScratchButtonDefaultEscapeZoneWidth, OLKVertScratchButtonDefaultEscapeZoneHeight);
    self.resetEscapeZone = NSMakeSize(OLKVertScratchButtonDefaultResetEscapeZoneWidth, OLKVertScratchButtonDefaultResetEscapeZoneHeight);
}

- (void)setInnerHotZone:(float)innerHotZone
{
    [super setInnerHotZone:innerHotZone];
    _innerHotZoneSet = TRUE;
}

- (void)setSize:(NSSize)size
{
    [super setSize:size];
    if (!_innerHotZoneSet)
        self.innerHotZone = [self switcherOffsetYFromCatcher] + self.switcherOnImg.size.height*2;
    [self prepareLabelImage];
}

- (void)setTopInit:(BOOL)topInit
{
    _topInit = topInit;
    [self resetSwitcherToBeginPosition];
    if (self.autoCalcLabelRect)
        [self autoCalculateLabelRectBounds];
}

- (NSPoint)catcherTopPosition
{
    NSPoint offsetPoint;
    offsetPoint.x = 0;
    offsetPoint.y = self.size.height - self.catcherOnImg.size.height;
    return offsetPoint;
}

- (NSPoint)catcherDrawTopPosition
{
    NSPoint drawPoint = self.catcherTopPosition;
    drawPoint.x += self.drawLocation.x;
    drawPoint.y += self.drawLocation.y;
    return drawPoint;
}

- (NSPoint)catcherBottomPosition
{
    NSPoint offsetPoint;
    offsetPoint.x = 0;
    offsetPoint.y = 0;
    return offsetPoint;
}

- (NSPoint)catcherDrawBottomPosition
{
    return self.drawLocation;
}

- (NSRect)beginSwitcherRect
{
    if (!_expandsOnInit || _expandsOutEdgePercent == 1 || self.sliding)
        return [super beginSwitcherRect];

    NSRect buttonRect = [self beginCatcherRect];
    if (_topInit)
        buttonRect.size.height -= [self switcherOffsetYFromCatcher];
    else
        buttonRect.origin.y -= [self switcherOffsetYFromCatcher];

    return buttonRect;
}

- (NSRect)nonExpandedRect
{
    NSRect buttonRect;
    buttonRect.size.width = self.catcherOnImg.size.width;
    buttonRect.origin.x = 0;
    buttonRect.size.height = self.catcherOnImg.size.height*_expandsOutEdgePercent;
    if (_topInit)
        buttonRect.origin.y = 0;
    else
        buttonRect.origin.y = self.catcherOnImg.size.height - buttonRect.size.height;

    return buttonRect;
}

- (NSRect)beginCatcherRect
{
    if (!_expandsOnInit || _expandsOutEdgePercent == 1 || self.sliding)
        return [super beginCatcherRect];

    return self.nonExpandedRect;
}

- (NSPoint)beginCatcherPosition
{
    if (_topInit)
    {
        NSPoint catcherPos = self.catcherTopPosition;
        if (!_expandsOnInit || _expandsOutEdgePercent == 1 || self.sliding)
            return catcherPos;

        catcherPos.y += self.catcherOnImg.size.height - self.catcherOnImg.size.height*_expandsOutEdgePercent;
        return catcherPos;
    }
    return self.catcherBottomPosition;
}

- (NSPoint)beginCatcherDrawPosition
{
    NSPoint catcherPos = [self beginCatcherPosition];
    catcherPos.x += self.drawLocation.x;
    catcherPos.y += self.drawLocation.y;
    return catcherPos;
}

- (NSPoint)halfwayCatcherDrawPosition
{
    if (_topInit)
        return [self catcherDrawBottomPosition];
    else
        return [self catcherDrawTopPosition];
}

- (NSPoint)switcherDrawPosition
{
    NSPoint switcherPos = [super switcherDrawPosition];
    if (!_expandsOnInit || _expandsOutEdgePercent == 1 || self.sliding)
        return switcherPos;

    if (_topInit)
        switcherPos.y += self.catcherOnImg.size.height - self.catcherOnImg.size.height*_expandsOutEdgePercent;
    else
        switcherPos.y = self.drawLocation.y;

    return switcherPos;
}

- (void)resetSwitcherToBeginPosition
{
    self.switcherPosition = NSMakePoint([self switcherXPos], [self switcherBeginYPos]);
    [self.parentView setNeedsDisplayInRect:self.halfwayCatcherDrawRect];
    self.sliding = TRUE;
    [self.parentView setNeedsDisplayInRect:self.beginCatcherDrawRect];
    self.sliding = FALSE;
}

- (float)switcherOffsetYFromCatcher
{
    return ([self.catcherOnImg size].height - self.switcherOnImg.size.height)/2;
}

- (float)topSideSwitcherYPos
{
    return self.size.height - self.catcherOnImg.size.height + [self switcherOffsetYFromCatcher];
}

- (float)bottomSideSwitcherYPos
{
    return [self switcherOffsetYFromCatcher];
}

- (float)switcherHalfYPos
{
    if (_topInit)
        return [self bottomSideSwitcherYPos];
    else
        return [self topSideSwitcherYPos];
}

- (float)switcherBeginYPos
{
    if (_topInit)
        return [self topSideSwitcherYPos];
    else
        return [self bottomSideSwitcherYPos];
}

- (float)switcherXPos
{
    return (self.catcherOnImg.size.width - self.switcherOnImg.size.width)/2;
}

- (float)topSideCursorSwitcherYPos
{
    return [self topSideSwitcherYPos] +  self.switcherOnImg.size.height/2;
}

- (float)bottomSideCursorSwitcherYPos
{
    return [self bottomSideSwitcherYPos] + self.switcherOnImg.size.height/2;
}

- (float)cursorSwitcherBeginYPos
{
    if (_topInit)
        return [self topSideCursorSwitcherYPos];
    else
        return [self bottomSideCursorSwitcherYPos];
}

- (float)cursorSwitcherHalfwayYPos
{
    if (_topInit)
        return [self bottomSideCursorSwitcherYPos];
    else
        return [self topSideCursorSwitcherYPos];
}

- (BOOL)inHotZoneX:(NSPoint)position
{
    if (position.x < -self.outerHotZone.width)
        return NO;

    if (position.x > self.size.width+self.outerHotZone.width)
        return NO;

    return YES;
}

- (BOOL)inSlideInitiateZone:(NSPoint)position
{
    if (![self inHotZoneX:position])
        return NO;

    if (_topInit)
    {
        if (position.y < [self switcherBeginYPos] - self.outerHotZone.height)
            return NO;
        if (position.y > self.size.height + self.outerHotZone.height)
            return NO;
    }
    else
    {
        if (position.y > [self switcherBeginYPos] + self.switcherOnImg.size.height + self.outerHotZone.height)
            return NO;
        if (position.y < - self.outerHotZone.height)
            return NO;
    }
    return YES;
}

- (BOOL)detectSlideInitiate:(NSPoint)position
{
    if (![super detectSlideInitiate:position])
        return NO;

    if (_expandsOnInit)
    {
        [self.parentView setNeedsDisplayInRect:self.halfwayCatcherDrawRect];
        [self.parentView setNeedsDisplayInRect:self.beginCatcherDrawRect];
    }

    return YES;
}

- (NSPoint)containSwitcherMovementToHalfway:(NSPoint)position
{
    if (_topInit)
    {
        float bottomMaxYPos = [self bottomSideCursorSwitcherYPos];
        if (position.y < bottomMaxYPos)
            position.y = bottomMaxYPos;
    }
    else
    {
        float topMaxYPos = [self topSideCursorSwitcherYPos];
        if (position.y > topMaxYPos)
            position.y = topMaxYPos;
    }
    return position;
}

- (NSPoint)containSwitcherMovementToBegin:(NSPoint)position
{
    if (_topInit)
    {
        float topMaxYPos = [self topSideCursorSwitcherYPos];
        if (position.y > topMaxYPos)
            position.y = topMaxYPos;
    }
    else
    {
        float bottomMaxYPos = [self bottomSideCursorSwitcherYPos];
        if (position.y < bottomMaxYPos)
            position.y = bottomMaxYPos;
    }

    return position;
}

- (void)updateSwitcherPosition:(NSPoint)position
{
    self.switcherPosition = NSMakePoint(self.switcherXPos, position.y - self.switcherOnImg.size.height/2);
}

- (BOOL)positionReachedHalfwayHotzone:(NSPoint)position
{
    if (_topInit)
    {
        if (position.y < self.innerHotZone)
            return YES;
    }
    else
    {
        if (position.y > self.size.height - self.innerHotZone)
            return YES;
    }

    return NO;
}

- (BOOL)detectCompletion:(NSPoint)position
{
    if (_topInit)
    {
        if (position.y <= self.size.height-self.innerHotZone)
            return FALSE;
    }
    else if (position.y >= self.innerHotZone)
        return FALSE;

    [self triggerCompleted];

    return TRUE;
}

- (BOOL)shouldDrawHalfwayCatcher
{
    if (self.expandsOnInit && !self.sliding)
        return NO;
    return YES;
}

- (void)autoCalculateLabelRectBounds
{
    if (NSEqualSizes(NSZeroSize, self.size) || !self.label || ![self.label length])
        return;

    NSRect labelRectBounds;
    labelRectBounds.size.height = self.size.height - (self.catcherOnImg.size.height*2 + self.labelFontSize*2);
    labelRectBounds.size = [self.label boundingRectWithSize:NSMakeSize(10000, labelRectBounds.size.height) options:NSStringDrawingUsesLineFragmentOrigin attributes:self.labelBackAttributes].size;

    if (_topInit)
        labelRectBounds.origin.y = self.beginCatcherPosition.y - labelRectBounds.size.height - self.labelFontSize/2;
    else
        labelRectBounds.origin.y = self.beginCatcherPosition.y + self.beginCatcherRect.size.height + self.labelFontSize/2;

    labelRectBounds.origin.x = self.size.width/2 - labelRectBounds.size.width/2;
    self.labelRectBounds = labelRectBounds;
}

@end


text:
function git_is_inside() {
	result=$(git rev-parse --is-inside-work-tree 2> /dev/null)
	[ "$result" = "true" ]
}

# returns the top level of a git tree
function git_top_level() {
	local -n __var=$1
	local toplevel
	toplevel=$(git rev-parse --show-toplevel)
	__var="$toplevel"
}

# returns the name of the current git repo
function git_repo_name() {
	local -n __var=$1
	local toplevel
	toplevel=$(git rev-parse --show-toplevel)
	local name=${toplevel##*/}
	__var="$name"
}


text:
from __future__ import annotations
from datetime import date, datetime  # noqa: F401

import re  # noqa: F401
from typing import Any, Dict, List, Optional  # noqa: F401

from pydantic import AnyUrl, BaseModel, EmailStr, Field, validator  # noqa: F401

class AllView(BaseModel):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.

    AllView - a model defined in OpenAPI

        _class: The _class of this AllView [Optional].
        name: The name of this AllView [Optional].
        url: The url of this AllView [Optional].
    """

    _class: Optional[str] = Field(alias="_class", default=None)
    name: Optional[str] = Field(alias="name", default=None)
    url: Optional[str] = Field(alias="url", default=None)

AllView.update_forward_refs()


text:
package org.springframework.boot.autoconfigure.integration;

import javax.sql.DataSource;

import org.springframework.boot.sql.init.DatabaseInitializationMode;
import org.springframework.core.io.ResourceLoader;
import org.springframework.util.Assert;

/**
 * Initializer for Spring Integration schema.
 *
 * @author Vedran Pavic
 * @since 2.0.0
 * @deprecated since 2.6.0 for removal in 2.8.0 in favor of
 * {@link IntegrationDataSourceScriptDatabaseInitializer}
 */
@Deprecated
public class IntegrationDataSourceInitializer extends org.springframework.boot.jdbc.AbstractDataSourceInitializer {

	private final IntegrationProperties.Jdbc properties;

	public IntegrationDataSourceInitializer(DataSource dataSource, ResourceLoader resourceLoader,
			IntegrationProperties properties) {
		super(dataSource, resourceLoader);
		Assert.notNull(properties, "IntegrationProperties must not be null");
		this.properties = properties.getJdbc();
	}

	@Override
	protected org.springframework.boot.jdbc.DataSourceInitializationMode getMode() {
		DatabaseInitializationMode mode = this.properties.getInitializeSchema();
		switch (mode) {
		case ALWAYS:
			return org.springframework.boot.jdbc.DataSourceInitializationMode.ALWAYS;
		case EMBEDDED:
			return org.springframework.boot.jdbc.DataSourceInitializationMode.EMBEDDED;
		case NEVER:
		default:
			return org.springframework.boot.jdbc.DataSourceInitializationMode.NEVER;
		}
	}

	@Override
	protected String getSchemaLocation() {
		return this.properties.getSchema();
	}

}


text:
export default function() {

  return `
    <md-button
      class="md-accordion-button"
      layout="column"
      ng-attr-href="{{ $mdAccordionButton.href }}"
      ng-attr-target="{{ $mdAccordionButton.target }}">

    </md-button>
  `;

}


text:
# IC.js

InterCity.js - express.js-based, modular and lightweight NodeJS framework/structure

Main components:
* [Express.js](http://expressjs.com/) (HTTP Server)
* [Nunjucks](http://mozilla.github.io/nunjucks/) (View Engine)

## Installation

Development Environment:

``` bash
  npm install
```

Production Environment:

``` bash
  npm install --production
```

## Running server (CLI options)

Setting Port to listen on (default=8080):

``` bash
  PORT=8080 node app.js
```

Enabling Server logs (disabled by default):

``` bash
  DEBUG=IC node app.js
```

Setting Environment (default=development):

``` bash
  NODE_ENV=<production|development> node app.js
```

You can mix options, examples:

``` bash
  NODE_ENV=production PORT=80 DEBUG=IC node app.js
```

## Your app in the browser

You can preview your app under [http://localhost:8080](http://localhost:8080) address unless you specified different port.

## Reload app automatically every time you change the code

The app doesn't reload itself automatically. To avoid overhead with restarting the app manually every time you change your code, you can use [nodemon](https://github.com/remy/nodemon) tool. Simply run following commands:

``` bash
sudo npm install -g nodemon
```

In your app directory:
``` bash
DEBUG=IC nodemon app.js
```

## Extending the application

### Extending Views

Since [Nunjucks](http://mozilla.github.io/nunjucks/) support [builtin filters](http://mozilla.github.io/nunjucks/templating.html#builtin-filters) as well as [custom filters](http://mozilla.github.io/nunjucks/api.html#custom-filters), you can roll out your own filters easily by creating JavaScript file in the `views/filters` directory.

``` javascript
  // Location: config/filters/nl2br.js

  module.exports = function (nunjucks) {

    /**
     * Replaces all occurences of newline with <br> tags
     *
     *   Sample Usage:
     *
     *     {{ 'Hello\n\nWorld' | nl2br }} -> Hello<br><br>World
     *
     */
    return function (string) {
      return new nunjucks.runtime.SafeString(string.replace(/\n/g, '<br>'));
    };

  };
}
```

The code above would create `nl2br` filter that will be globally available in all your nunjucks templates. Filter is nothing else than the name of the file without extension, e.g. `nl2br.js -> nl2br`.

## Contributing
Feel free to contribute or contact me at contact@maciejsmolinski.com with any questions


text:
<resources>
    <string name="app_name">PholarImageProcess</string>
    <string name="action_settings">Settings</string>
</resources>


text:
namespace EcoCardio.Repository.Migrations
{
    using System;
    using System.Data.Entity.Migrations;

    public partial class AddUtilizador : DbMigration
    {
        public override void Up()
        {
            RenameTable(name: "dbo.Servicoes", newName: "Servico");
            CreateTable(
                "dbo.Utilizador",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        Nome = c.String(nullable: false, maxLength: 256),
                        Password = c.String(nullable: false, maxLength: 256),
                        Username = c.String(nullable: false, maxLength: 256),
                        Profile = c.Int(nullable: false),
                    })
                .PrimaryKey(t => t.Id)
                .Index(t => t.Username, unique: true);

        }

        public override void Down()
        {
            DropIndex("dbo.Utilizador", new[] { "Username" });
            DropTable("dbo.Utilizador");
            RenameTable(name: "dbo.Servico", newName: "Servicoes");
        }
    }
}


text:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class News extends CI_Controller {

    public function __construct()
    {
        parent::__construct();
        $this -> load -> model("newsmodel");
        $this->load->library('session');
    }

    public function getNews(){
        $nickname = $this-> session-> userdata('nickname');
    	if($this-> session-> userdata('nickname') == NULL){

            echo json_encode(array("result" => "34")); // cookie missing , Session do not have valid values!

        }else {

	    	$data = $model = $this -> newsmodel -> getNews($nickname);
	    	echo json_encode($data);
	    }
    }

    public function setNews(){
    	$nickname = $this-> session-> userdata('nickname');
    	if( $_SERVER['REQUEST_METHOD'] != 'POST'){

    		echo json_encode(array('result' => '20')); // errorCode : Method should be POST

    	}else if($nickname == NULL){

            echo json_encode(array("result" => "34")); // cookie missing , Session do not have valid values!

        }else if($this -> usermodel -> isAdmin($nickname) == 0 ){

			echo json_encode(array("result" => "60")); // You are not admin

        }else if(!isset($_POST['title']) || !isset($_POST['body']) ){

    		echo json_encode(array("result" => "27")); // Post Parameters are invalid

    	}else {

    		$success = $this-> newsmodel -> setNews($_POST['title'], $_POST['body'], $nickname);

    		if(!$success)

    			echo json_encode(array("result" => "59")); // Add news Unsuccessful
    		else
				echo json_encode(array("result" => "30")); // Success

    	}
    }

}
?>


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

-->
<manifest package="com.albedinsky.android.dialog.base">
    <application/>
</manifest>


text:
title: Qbservable.Timeout<TSource>(IQbservable<TSource>, TimeSpan, IObservable<TSource>)
---
# Qbservable.Timeout\<TSource\> Method (IQbservable\<TSource\>, TimeSpan, IObservable\<TSource\>)

Returns the source queryable observable sequence or the other queryable observable sequence if dueTime elapses.

**Namespace:**  [System.Reactive.Linq](System.Reactive.Linq/System.Reactive.Linq)
**Assembly:**  System.Reactive.Providers (in System.Reactive.Providers.dll)

## Syntax

```vb
'Declaration
<ExtensionAttribute> _
Public Shared Function Timeout(Of TSource) ( _
    source As IQbservable(Of TSource), _
    dueTime As TimeSpan, _
    other As IObservable(Of TSource) _
) As IQbservable(Of TSource)
```

```vb
'Usage
Dim source As IQbservable(Of TSource)
Dim dueTime As TimeSpan
Dim other As IObservable(Of TSource)
Dim returnValue As IQbservable(Of TSource)

returnValue = source.Timeout(dueTime, _
    other)
```

```csharp
public static IQbservable<TSource> Timeout<TSource>(
    this IQbservable<TSource> source,
    TimeSpan dueTime,
    IObservable<TSource> other
)
```

```c++
[ExtensionAttribute]
public:
generic<typename TSource>
static IQbservable<TSource>^ Timeout(
    IQbservable<TSource>^ source,
    TimeSpan dueTime,
    IObservable<TSource>^ other
)
```

```fsharp
static member Timeout :
        source:IQbservable<'TSource> *
        dueTime:TimeSpan *
        other:IObservable<'TSource> -> IQbservable<'TSource>
```

```javascript
JScript does not support generic types and methods.
```

#### Type Parameters

- TSource
  The type source.

#### Parameters

- source
  Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
  The source sequence to perform a timeout for.

- dueTime
  Type: [System.TimeSpan](https://msdn.microsoft.com/en-us/library/269ew577)
  The time when a timeout occurs.

- other
  Type: [System.IObservable](https://msdn.microsoft.com/en-us/library/Dd990377)\<TSource\>
  The sequence to return in case of a timeout.

#### Return Value

Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
The source sequence switching to the other sequence in case of a timeout.

#### Usage Note

In Visual Basic and C\#, you can call this method as an instance method on any object of type [IQbservable](IQbservable/IQbservable(TSource))\<TSource\>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [](https://msdn.microsoft.com/en-us/library/Bb384936) or [](https://msdn.microsoft.com/en-us/library/Bb383977).

## See Also

#### Reference

[Qbservable Class](Qbservable/Qbservable)

[Timeout Overload](Timeout/Qbservable.Timeout)

[System.Reactive.Linq Namespace](System.Reactive.Linq/System.Reactive.Linq)

# Qbservable.Timeout\<TSource\> Method (IQbservable\<TSource\>, DateTimeOffset, IObservable\<TSource\>, IScheduler)

Returns the source queryable observable sequence or the other queryable observable sequence if dueTime elapses.

**Namespace:**  [System.Reactive.Linq](System.Reactive.Linq/System.Reactive.Linq)
**Assembly:**  System.Reactive.Providers (in System.Reactive.Providers.dll)

## Syntax

```vb
'Declaration
<ExtensionAttribute> _
Public Shared Function Timeout(Of TSource) ( _
    source As IQbservable(Of TSource), _
    dueTime As DateTimeOffset, _
    other As IObservable(Of TSource), _
    scheduler As IScheduler _
) As IQbservable(Of TSource)
```

```vb
'Usage
Dim source As IQbservable(Of TSource)
Dim dueTime As DateTimeOffset
Dim other As IObservable(Of TSource)
Dim scheduler As IScheduler
Dim returnValue As IQbservable(Of TSource)

returnValue = source.Timeout(dueTime, _
    other, scheduler)
```

```csharp
public static IQbservable<TSource> Timeout<TSource>(
    this IQbservable<TSource> source,
    DateTimeOffset dueTime,
    IObservable<TSource> other,
    IScheduler scheduler
)
```

```c++
[ExtensionAttribute]
public:
generic<typename TSource>
static IQbservable<TSource>^ Timeout(
    IQbservable<TSource>^ source,
    DateTimeOffset dueTime,
    IObservable<TSource>^ other,
    IScheduler^ scheduler
)
```

```fsharp
static member Timeout :
        source:IQbservable<'TSource> *
        dueTime:DateTimeOffset *
        other:IObservable<'TSource> *
        scheduler:IScheduler -> IQbservable<'TSource>
```

```javascript
JScript does not support generic types and methods.
```

#### Type Parameters

- TSource
  The type source.

#### Parameters

- source
  Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
  The source sequence to perform a timeout for.

- dueTime
  Type: [System.DateTimeOffset](https://msdn.microsoft.com/en-us/library/Bb341783)
  The maximum duration between values before a timeout occurs.

- other
  Type: [System.IObservable](https://msdn.microsoft.com/en-us/library/Dd990377)\<TSource\>
  The sequence to return in case of a timeout.

- scheduler
  Type: [System.Reactive.Concurrency.IScheduler](IScheduler/IScheduler)
  The scheduler to run the timeout timers on.

#### Return Value

Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
The source sequence switching to the other sequence in case of a timeout.

#### Usage Note

In Visual Basic and C\#, you can call this method as an instance method on any object of type [IQbservable](IQbservable/IQbservable(TSource))\<TSource\>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [](https://msdn.microsoft.com/en-us/library/Bb384936) or [](https://msdn.microsoft.com/en-us/library/Bb383977).

## See Also

#### Reference

[Qbservable Class](Qbservable/Qbservable)

[Timeout Overload](Timeout/Qbservable.Timeout)

[System.Reactive.Linq Namespace](System.Reactive.Linq/System.Reactive.Linq)

# Qbservable.Timeout\<TSource\> Method (IQbservable\<TSource\>, TimeSpan, IScheduler)

Returns either the queryable observable sequence or a TimeoutException if dueTime elapses.

**Namespace:**  [System.Reactive.Linq](System.Reactive.Linq/System.Reactive.Linq)
**Assembly:**  System.Reactive.Providers (in System.Reactive.Providers.dll)

## Syntax

```vb
'Declaration
<ExtensionAttribute> _
Public Shared Function Timeout(Of TSource) ( _
    source As IQbservable(Of TSource), _
    dueTime As TimeSpan, _
    scheduler As IScheduler _
) As IQbservable(Of TSource)
```

```vb
'Usage
Dim source As IQbservable(Of TSource)
Dim dueTime As TimeSpan
Dim scheduler As IScheduler
Dim returnValue As IQbservable(Of TSource)

returnValue = source.Timeout(dueTime, _
    scheduler)
```

```csharp
public static IQbservable<TSource> Timeout<TSource>(
    this IQbservable<TSource> source,
    TimeSpan dueTime,
    IScheduler scheduler
)
```

```c++
[ExtensionAttribute]
public:
generic<typename TSource>
static IQbservable<TSource>^ Timeout(
    IQbservable<TSource>^ source,
    TimeSpan dueTime,
    IScheduler^ scheduler
)
```

```fsharp
static member Timeout :
        source:IQbservable<'TSource> *
        dueTime:TimeSpan *
        scheduler:IScheduler -> IQbservable<'TSource>
```

```javascript
JScript does not support generic types and methods.
```

#### Type Parameters

- TSource
  The type source.

#### Parameters

- source
  Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
  The source sequence to perform a timeout for.

- dueTime
  Type: [System.TimeSpan](https://msdn.microsoft.com/en-us/library/269ew577)
  The maximum duration between values before a timeout occurs.

- scheduler
  Type: [System.Reactive.Concurrency.IScheduler](IScheduler/IScheduler)
  The scheduler to run the timeout timers on.

#### Return Value

Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
The source sequence with a TimeoutException in case of a timeout.

#### Usage Note

In Visual Basic and C\#, you can call this method as an instance method on any object of type [IQbservable](IQbservable/IQbservable(TSource))\<TSource\>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [](https://msdn.microsoft.com/en-us/library/Bb384936) or [](https://msdn.microsoft.com/en-us/library/Bb383977).

## See Also

#### Reference

[Qbservable Class](Qbservable/Qbservable)

[Timeout Overload](Timeout/Qbservable.Timeout)

[System.Reactive.Linq Namespace](System.Reactive.Linq/System.Reactive.Linq)

# Qbservable.Timeout\<TSource\> Method (IQbservable\<TSource\>, TimeSpan, IObservable\<TSource\>, IScheduler)

Returns the source queryable observable sequence or the other queryable observable sequence if dueTime elapses.

**Namespace:**  [System.Reactive.Linq](System.Reactive.Linq/System.Reactive.Linq)
**Assembly:**  System.Reactive.Providers (in System.Reactive.Providers.dll)

## Syntax

```vb
'Declaration
<ExtensionAttribute> _
Public Shared Function Timeout(Of TSource) ( _
    source As IQbservable(Of TSource), _
    dueTime As TimeSpan, _
    other As IObservable(Of TSource), _
    scheduler As IScheduler _
) As IQbservable(Of TSource)
```

```vb
'Usage
Dim source As IQbservable(Of TSource)
Dim dueTime As TimeSpan
Dim other As IObservable(Of TSource)
Dim scheduler As IScheduler
Dim returnValue As IQbservable(Of TSource)

returnValue = source.Timeout(dueTime, _
    other, scheduler)
```

```csharp
public static IQbservable<TSource> Timeout<TSource>(
    this IQbservable<TSource> source,
    TimeSpan dueTime,
    IObservable<TSource> other,
    IScheduler scheduler
)
```

```c++
[ExtensionAttribute]
public:
generic<typename TSource>
static IQbservable<TSource>^ Timeout(
    IQbservable<TSource>^ source,
    TimeSpan dueTime,
    IObservable<TSource>^ other,
    IScheduler^ scheduler
)
```

```fsharp
static member Timeout :
        source:IQbservable<'TSource> *
        dueTime:TimeSpan *
        other:IObservable<'TSource> *
        scheduler:IScheduler -> IQbservable<'TSource>
```

```javascript
JScript does not support generic types and methods.
```

#### Type Parameters

- TSource
  The type source.

#### Parameters

- source
  Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
  The source sequence to perform a timeout for.

- dueTime
  Type: [System.TimeSpan](https://msdn.microsoft.com/en-us/library/269ew577)
  The time when a timeout occurs.

- other
  Type: [System.IObservable](https://msdn.microsoft.com/en-us/library/Dd990377)\<TSource\>
  The sequence to return in case of a timeout.

- scheduler
  Type: [System.Reactive.Concurrency.IScheduler](IScheduler/IScheduler)
  The scheduler to run the timeout timers on.

#### Return Value

Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
The source sequence switching to the other sequence in case of a timeout.

#### Usage Note

In Visual Basic and C\#, you can call this method as an instance method on any object of type [IQbservable](IQbservable/IQbservable(TSource))\<TSource\>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [](https://msdn.microsoft.com/en-us/library/Bb384936) or [](https://msdn.microsoft.com/en-us/library/Bb383977).

## See Also

#### Reference

[Qbservable Class](Qbservable/Qbservable)

[Timeout Overload](Timeout/Qbservable.Timeout)

[System.Reactive.Linq Namespace](System.Reactive.Linq/System.Reactive.Linq)

# Qbservable.Timeout\<TSource\> Method (IQbservable\<TSource\>, DateTimeOffset, IScheduler)

Returns either the queryable observable sequence or a TimeoutException if dueTime elapses.

**Namespace:**  [System.Reactive.Linq](System.Reactive.Linq/System.Reactive.Linq)
**Assembly:**  System.Reactive.Providers (in System.Reactive.Providers.dll)

## Syntax

```vb
'Declaration
<ExtensionAttribute> _
Public Shared Function Timeout(Of TSource) ( _
    source As IQbservable(Of TSource), _
    dueTime As DateTimeOffset, _
    scheduler As IScheduler _
) As IQbservable(Of TSource)
```

```vb
'Usage
Dim source As IQbservable(Of TSource)
Dim dueTime As DateTimeOffset
Dim scheduler As IScheduler
Dim returnValue As IQbservable(Of TSource)

returnValue = source.Timeout(dueTime, _
    scheduler)
```

```csharp
public static IQbservable<TSource> Timeout<TSource>(
    this IQbservable<TSource> source,
    DateTimeOffset dueTime,
    IScheduler scheduler
)
```

```c++
[ExtensionAttribute]
public:
generic<typename TSource>
static IQbservable<TSource>^ Timeout(
    IQbservable<TSource>^ source,
    DateTimeOffset dueTime,
    IScheduler^ scheduler
)
```

```fsharp
static member Timeout :
        source:IQbservable<'TSource> *
        dueTime:DateTimeOffset *
        scheduler:IScheduler -> IQbservable<'TSource>
```

```javascript
JScript does not support generic types and methods.
```

#### Type Parameters

- TSource
  The type source.

#### Parameters

- source
  Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
  The source sequence to perform a timeout for.

- dueTime
  Type: [System.DateTimeOffset](https://msdn.microsoft.com/en-us/library/Bb341783)
  The maximum duration between values before a timeout occurs.

- scheduler
  Type: [System.Reactive.Concurrency.IScheduler](IScheduler/IScheduler)
  The scheduler to run the timeout timers on.

#### Return Value

Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
The source sequence with a TimeoutException in case of a timeout.

#### Usage Note

In Visual Basic and C\#, you can call this method as an instance method on any object of type [IQbservable](IQbservable/IQbservable(TSource))\<TSource\>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [](https://msdn.microsoft.com/en-us/library/Bb384936) or [](https://msdn.microsoft.com/en-us/library/Bb383977).

## See Also

#### Reference

[Qbservable Class](Qbservable/Qbservable)

[Timeout Overload](Timeout/Qbservable.Timeout)

[System.Reactive.Linq Namespace](System.Reactive.Linq/System.Reactive.Linq)

# Qbservable.Timeout\<TSource\> Method (IQbservable\<TSource\>, DateTimeOffset, IObservable\<TSource\>)

Returns either the queryable observable sequence or an TimeoutException if dueTime elapses.

**Namespace:**  [System.Reactive.Linq](System.Reactive.Linq/System.Reactive.Linq)
**Assembly:**  System.Reactive.Providers (in System.Reactive.Providers.dll)

## Syntax

```vb
'Declaration
<ExtensionAttribute> _
Public Shared Function Timeout(Of TSource) ( _
    source As IQbservable(Of TSource), _
    dueTime As DateTimeOffset, _
    other As IObservable(Of TSource) _
) As IQbservable(Of TSource)
```

```vb
'Usage
Dim source As IQbservable(Of TSource)
Dim dueTime As DateTimeOffset
Dim other As IObservable(Of TSource)
Dim returnValue As IQbservable(Of TSource)

returnValue = source.Timeout(dueTime, _
    other)
```

```csharp
public static IQbservable<TSource> Timeout<TSource>(
    this IQbservable<TSource> source,
    DateTimeOffset dueTime,
    IObservable<TSource> other
)
```

```c++
[ExtensionAttribute]
public:
generic<typename TSource>
static IQbservable<TSource>^ Timeout(
    IQbservable<TSource>^ source,
    DateTimeOffset dueTime,
    IObservable<TSource>^ other
)
```

```fsharp
static member Timeout :
        source:IQbservable<'TSource> *
        dueTime:DateTimeOffset *
        other:IObservable<'TSource> -> IQbservable<'TSource>
```

```javascript
JScript does not support generic types and methods.
```

#### Type Parameters

- TSource
  The type source.

#### Parameters

- source
  Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
  The source sequence to perform a timeout for.

- dueTime
  Type: [System.DateTimeOffset](https://msdn.microsoft.com/en-us/library/Bb341783)
  The maximum duration between values before a timeout occurs.

- other
  Type: [System.IObservable](https://msdn.microsoft.com/en-us/library/Dd990377)\<TSource\>
  The source sequence switching to the other sequence in case of a timeout.

#### Return Value

Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
The source sequence with a TimeoutException in case of a timeout.

#### Usage Note

In Visual Basic and C\#, you can call this method as an instance method on any object of type [IQbservable](IQbservable/IQbservable(TSource))\<TSource\>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [](https://msdn.microsoft.com/en-us/library/Bb384936) or [](https://msdn.microsoft.com/en-us/library/Bb383977).

## See Also

#### Reference

[Qbservable Class](Qbservable/Qbservable)

[Timeout Overload](Timeout/Qbservable.Timeout)

[System.Reactive.Linq Namespace](System.Reactive.Linq/System.Reactive.Linq)

# Qbservable.Timeout\<TSource\> Method (IQbservable\<TSource\>, TimeSpan)

Returns either the queryable observable sequence or a TimeoutException if dueTime elapses.

**Namespace:**  [System.Reactive.Linq](System.Reactive.Linq/System.Reactive.Linq)
**Assembly:**  System.Reactive.Providers (in System.Reactive.Providers.dll)

## Syntax

```vb
'Declaration
<ExtensionAttribute> _
Public Shared Function Timeout(Of TSource) ( _
    source As IQbservable(Of TSource), _
    dueTime As TimeSpan _
) As IQbservable(Of TSource)
```

```vb
'Usage
Dim source As IQbservable(Of TSource)
Dim dueTime As TimeSpan
Dim returnValue As IQbservable(Of TSource)

returnValue = source.Timeout(dueTime)
```

```csharp
public static IQbservable<TSource> Timeout<TSource>(
    this IQbservable<TSource> source,
    TimeSpan dueTime
)
```

```c++
[ExtensionAttribute]
public:
generic<typename TSource>
static IQbservable<TSource>^ Timeout(
    IQbservable<TSource>^ source,
    TimeSpan dueTime
)
```

```fsharp
static member Timeout :
        source:IQbservable<'TSource> *
        dueTime:TimeSpan -> IQbservable<'TSource>
```

```javascript
JScript does not support generic types and methods.
```

#### Type Parameters

- TSource
  The type source.

#### Parameters

- source
  Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
  The source sequence to perform a timeout for.

- dueTime
  Type: [System.TimeSpan](https://msdn.microsoft.com/en-us/library/269ew577)
  The time when a timeout occurs.

#### Return Value

Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
The source sequence with a TimeoutException in case of a timeout.

#### Usage Note

In Visual Basic and C\#, you can call this method as an instance method on any object of type [IQbservable](IQbservable/IQbservable(TSource))\<TSource\>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [](https://msdn.microsoft.com/en-us/library/Bb384936) or [](https://msdn.microsoft.com/en-us/library/Bb383977).

## See Also

#### Reference

[Qbservable Class](Qbservable/Qbservable)

[Timeout Overload](Timeout/Qbservable.Timeout)

[System.Reactive.Linq Namespace](System.Reactive.Linq/System.Reactive.Linq)

# Qbservable.Timeout\<TSource\> Method (IQbservable\<TSource\>, DateTimeOffset)

Returns either the queryable observable sequence or a TimeoutException if dueTime elapses.

**Namespace:**  [System.Reactive.Linq](System.Reactive.Linq/System.Reactive.Linq)
**Assembly:**  System.Reactive.Providers (in System.Reactive.Providers.dll)

## Syntax

```vb
'Declaration
<ExtensionAttribute> _
Public Shared Function Timeout(Of TSource) ( _
    source As IQbservable(Of TSource), _
    dueTime As DateTimeOffset _
) As IQbservable(Of TSource)
```

```vb
'Usage
Dim source As IQbservable(Of TSource)
Dim dueTime As DateTimeOffset
Dim returnValue As IQbservable(Of TSource)

returnValue = source.Timeout(dueTime)
```

```csharp
public static IQbservable<TSource> Timeout<TSource>(
    this IQbservable<TSource> source,
    DateTimeOffset dueTime
)
```

```c++
[ExtensionAttribute]
public:
generic<typename TSource>
static IQbservable<TSource>^ Timeout(
    IQbservable<TSource>^ source,
    DateTimeOffset dueTime
)
```

```fsharp
static member Timeout :
        source:IQbservable<'TSource> *
        dueTime:DateTimeOffset -> IQbservable<'TSource>
```

```javascript
JScript does not support generic types and methods.
```

#### Type Parameters

- TSource
  The type source.

#### Parameters

- source
  Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
  The source sequence to perform a timeout for.

- dueTime
  Type: [System.DateTimeOffset](https://msdn.microsoft.com/en-us/library/Bb341783)
  The maximum duration between values before a timeout occurs.

#### Return Value

Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TSource\>
The source sequence with a TimeoutException in case of a timeout.

#### Usage Note

In Visual Basic and C\#, you can call this method as an instance method on any object of type [IQbservable](IQbservable/IQbservable(TSource))\<TSource\>. When you use instance method syntax to call this method, omit the first parameter. For more information, see [](https://msdn.microsoft.com/en-us/library/Bb384936) or [](https://msdn.microsoft.com/en-us/library/Bb383977).

## See Also

#### Reference

[Qbservable Class](Qbservable/Qbservable)

[Timeout Overload](Timeout/Qbservable.Timeout)

[System.Reactive.Linq Namespace](System.Reactive.Linq/System.Reactive.Linq)


text:
/*
 * MergeLocationConfig.c is automatically generated from MergeLocationConfig.c.erb,
 * using definitions from src/ruby_supportlib/phusion_passenger/nginx/config_options.rb.
 * Edits to MergeLocationConfig.c will be lost.
 *
 * To update MergeLocationConfig.c:
 *   rake nginx
 *
 * To force regeneration of MergeLocationConfig.c:
 *   rm -f src/nginx_module/MergeLocationConfig.c
 *   rake src/nginx_module/MergeLocationConfig.c
 */

/* 0: NGX_CONF_ERROR, 1: OK */
int generated_merge_part(passenger_loc_conf_t *conf, passenger_loc_conf_t *prev, ngx_conf_t *cf) {

		ngx_conf_merge_value(conf->socket_backlog,
			prev->socket_backlog,
			NGX_CONF_UNSET);

		ngx_conf_merge_uint_value(conf->core_file_descriptor_ulimit,
			prev->core_file_descriptor_ulimit,
			NGX_CONF_UNSET_UINT);

		ngx_conf_merge_uint_value(conf->app_file_descriptor_ulimit,
			prev->app_file_descriptor_ulimit,
			NGX_CONF_UNSET_UINT);

		ngx_conf_merge_value(conf->enabled,
			prev->enabled,
			NGX_CONF_UNSET);

		ngx_conf_merge_str_value(conf->ruby,
			prev->ruby,
			NULL);

		ngx_conf_merge_str_value(conf->python,
			prev->python,
			NULL);

		ngx_conf_merge_str_value(conf->nodejs,
			prev->nodejs,
			NULL);

		ngx_conf_merge_str_value(conf->meteor_app_settings,
			prev->meteor_app_settings,
			NULL);

		ngx_conf_merge_str_value(conf->environment,
			prev->environment,
			NULL);

		ngx_conf_merge_value(conf->friendly_error_pages,
			prev->friendly_error_pages,
			NGX_CONF_UNSET);

		ngx_conf_merge_value(conf->min_instances,
			prev->min_instances,
			NGX_CONF_UNSET);

		ngx_conf_merge_value(conf->max_instances_per_app,
			prev->max_instances_per_app,
			NGX_CONF_UNSET);

		ngx_conf_merge_value(conf->max_requests,
			prev->max_requests,
			NGX_CONF_UNSET);

		ngx_conf_merge_value(conf->start_timeout,
			prev->start_timeout,
			NGX_CONF_UNSET);

		if (merge_string_array(cf, &prev->base_uris, &conf->base_uris) != NGX_OK) {
			ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
				"cannot merge \"passenger_base_uri\" configurations");
			return 0;
		}

		ngx_conf_merge_str_value(conf->document_root,
			prev->document_root,
			NULL);

		ngx_conf_merge_str_value(conf->user,
			prev->user,
			NULL);

		ngx_conf_merge_str_value(conf->group,
			prev->group,
			NULL);

		ngx_conf_merge_str_value(conf->app_group_name,
			prev->app_group_name,
			NULL);

		ngx_conf_merge_str_value(conf->app_root,
			prev->app_root,
			NULL);

		ngx_conf_merge_str_value(conf->app_rights,
			prev->app_rights,
			NULL);

		ngx_conf_merge_value(conf->union_station_support,
			prev->union_station_support,
			NGX_CONF_UNSET);

		if (merge_string_array(cf, &prev->union_station_filters, &conf->union_station_filters) != NGX_OK) {
			ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
				"cannot merge \"union_station_filter\" configurations");
			return 0;
		}

		ngx_conf_merge_value(conf->debugger,
			prev->debugger,
			NGX_CONF_UNSET);

		ngx_conf_merge_value(conf->max_preloader_idle_time,
			prev->max_preloader_idle_time,
			NGX_CONF_UNSET);

		if (merge_string_keyval_table(cf, &prev->env_vars, &conf->env_vars) != NGX_OK) {
			ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
				"cannot merge \"passenger_env_var\" configurations");
			return 0;
		}

		ngx_conf_merge_uint_value(conf->headers_hash_max_size,
			prev->headers_hash_max_size,
			512);

		ngx_conf_merge_uint_value(conf->headers_hash_bucket_size,
			prev->headers_hash_bucket_size,
			64);

		ngx_conf_merge_str_value(conf->spawn_method,
			prev->spawn_method,
			NULL);

		ngx_conf_merge_value(conf->load_shell_envvars,
			prev->load_shell_envvars,
			NGX_CONF_UNSET);

		ngx_conf_merge_str_value(conf->union_station_key,
			prev->union_station_key,
			NULL);

		ngx_conf_merge_value(conf->max_request_queue_size,
			prev->max_request_queue_size,
			NGX_CONF_UNSET);

		ngx_conf_merge_value(conf->request_queue_overflow_status_code,
			prev->request_queue_overflow_status_code,
			NGX_CONF_UNSET);

		ngx_conf_merge_str_value(conf->restart_dir,
			prev->restart_dir,
			NULL);

		ngx_conf_merge_str_value(conf->app_type,
			prev->app_type,
			NULL);

		ngx_conf_merge_str_value(conf->startup_file,
			prev->startup_file,
			NULL);

		ngx_conf_merge_value(conf->sticky_sessions,
			prev->sticky_sessions,
			NGX_CONF_UNSET);

		ngx_conf_merge_str_value(conf->sticky_sessions_cookie_name,
			prev->sticky_sessions_cookie_name,
			NULL);

		ngx_conf_merge_str_value(conf->vary_turbocache_by_cookie,
			prev->vary_turbocache_by_cookie,
			NULL);

		ngx_conf_merge_value(conf->abort_websockets_on_process_shutdown,
			prev->abort_websockets_on_process_shutdown,
			NGX_CONF_UNSET);

		ngx_conf_merge_value(conf->force_max_concurrent_requests_per_process,
			prev->force_max_concurrent_requests_per_process,
			NGX_CONF_UNSET);

	return 1;
}


text:
set -eu
LUVI_VERSION=2.3.3
LIT_VERSION=2.2.10

LUVI_ARCH=`uname -s`_`uname -m`
LUVI_URL="https://github.com/luvit/luvi/releases/download/v$LUVI_VERSION/luvi-regular-$LUVI_ARCH"
LIT_URL="https://lit.luvit.io/packages/luvit/lit/v$LIT_VERSION.zip"

# Download Files
echo "Downloading $LUVI_URL to luvi"
curl -L $LUVI_URL > luvi
chmod +x luvi
echo "Downloading $LIT_URL to lit.zip"
curl -L $LIT_URL > lit.zip

# Create lit using lit
./luvi lit.zip -- make lit.zip

# Cleanup
rm -f lit.zip


text:
/*globals KIP,document*/

// Shield
//------------------------------------------
/**
 * Creates an overlay that prevents the user from taking actions underneath, when data is loading
 * @param {string} id   - The identifier to use for this shield
 * @param {string} type - The type of info the shield will display. Options are "plain", "trivia", "game"
 * @class Shield
 */
KIP.Objects.Shield = function (id, type) {
  "use strict";
  this.id = id;
  this.type = type || "plain";
  this.addEntertainment = true;

  this.options = {
    animateSpeed : 300
  };

  if (type === "trivia") {
    this.options.animateSpeed = 3000;
  }

  // Create the general div & use it to block events
  KIP.Objects.Drawable.call(this, "shield" + id, "shield");
  this.div.addEventListener("click", function (e) {
    e.stopPropagation();
    return false;
  });

  // Create the container that will hold whatever display we opt for
  this.container = KIP.Functions.CreateSimpleElement("shield" + this.id + "|container", "container");
  this.div.appendChild(this.container);
};

// Inherit from Drawable
KIP.Objects.Shield.prototype = Object.create(KIP.Objects.Drawable.prototype);

// Shield.Show
//------------------------------------------------
/**
 * Draws the shield as the topmost element on the screen
 */
KIP.Objects.Shield.prototype.Show = function () {
  "use strict";
  var aFunc;
  if ((!this.noStyles) && (!this.addedStyles)) {
    this.AddStyles();
    this.addedStyles = true;
  }
  if (this.addEntertainment) {
    this.AddEntertainment(this.entertainmentType);
  } else if (this.animateFunc) {
    aFunc = this.animateFunc;
    this.animate = window.setInterval(aFunc, this.options.animateSpeed);
  }
  this.Draw(document.body);
  this.showing = true;
};

// Shield.Hide
//-------------------------------------------------
/**
 * Removes the shield from the screen
 */
KIP.Objects.Shield.prototype.Hide = function () {
  "use strict";
  this.Erase();
  if (this.animate) {
    window.clearInterval(this.animate);
  }
  this.showing = false;
};

// Shield.AddEntertainment
//------------------------------------------------------------
/**
 * Creates the content of the shield. If a type is not specified on the shield, shows a generic "loading" display.
 */
KIP.Objects.Shield.prototype.AddEntertainment = function () {
  "use strict";
  var div, frm, aFunc, cHead, cText;
  frm = 0;

  switch(this.type) {

    // Knowledge: fun facts
    case "trvia":
      div = KIP.Functions.CreateSimpleElement("", "trivia");
      cHead = KIP.Functions.CreateSimpleElement("", "header", "", "", "", div);
      cText = KIP.Functions.CreateSimpleElement("", "text", "", "", "", div);

      this.animateFunc = aFunc = function () {

        // Grab the appropriate frame
        frm += 1;
        frm %= this.trivia.length;

        // Display the fact
        cHead.innerHTML = this.trivia[frm].header;
        cText.innerHTML = this.trivia[frm].text;
      };

      break;

    // Game : keyboard DDR
    case "game":
      break;

    // Default: a regular "loading" display
    default:
      div = KIP.Functions.CreateSimpleElement("", "plain", "Loading");

      // Animate the "..."
      this.animateFunc = aFunc = function () {
        var s;
        frm += 1;
        s = "";
        switch (frm % 6){
          case 0:
            s = "";
            break;
          case 1:
            s = ".";
            break;
          case 2:
            s = "..";
            break;
          case 3:
          case 4:
          case 5:
            s = "...";
            break;
        }
        div.innerHTML = "Loading" + s;
      };
      break;
  }

  // Track the animation so we can remove it as appropriate
  if (aFunc) {
    this.animate = window.setInterval(aFunc, this.options.animateSpeed);
  }

  // Actually add the entertainment we have created
  this.container.appendChild(div);
  this.addEntertainment = false;
};

// Shield.AddTrivia
//-----------------------------------------------------------------
/**
 * Adds a fact to the array of facts to display while loading
 * @param {string} header - The text to display above the actual trivia (e.g., "Did you know" or "Fun fact!")
 * @param {string} text - The actual text to display as the trivia element
 * @param {number} [timing] - How long this piece of trivia should display. If not specified, defaults to the triviaTiming option.
 */
KIP.Objects.Shield.prototype.AddTrivia = function (header, text, timing) {
  "use strict";

  // Create our trivia array if needed
  if (!this.trivia) this.trivia = [];

  // Add the trivia to the array of data
  this.trivia.push({
    header: header,
    text: text,
    timing: (timing || this.options.animateSpeed)
  });
};

// Shield.AddStyles
//-----------------------------------------------------
/**
 * Add the appropriate CSS to show the shield
 */
KIP.Objects.Shield.prototype.AddStyles = function () {
  "use strict";
  var cls;

  if (KIP.Globals.AddedShieldStyles) return;

  // ====== SHIELD STYLES ====== //
  cls = {
    "background-color" : "rgba(0,0,0,0.7)",
    "position" : "fixed",
    "left" : "0",
    "top" : "0",
    "width": "100%",
    "height" : "100%"
  };

  //
  KIP.Functions.CreateCSSClass(".shield", cls);

  // ====== CONTAINER STYLES ===== //
  cls = {
    "display" : "flex",
    "align-items" : "center",
    "justify-content" : "center",
    "height" : "100%"
  };
  KIP.Functions.CreateCSSClass(".shield .container", cls);

  // ===== PLAIN STYLES ===== //
  cls = {
    "font-family": '"Segoe UI", "Calibri", "Arial"',
    "font-size" : "25px",
    "color" : "#FFF",
    "text-align" : "left",
    "width" : "170px"
  };
  KIP.Functions.CreateCSSClass(".shield .plain", cls);

};


text:
"""
This module contains a series of classes that are used to model (in a very
simplified manner) services, groups of proxied hosts, and proxied hosts.

There are potentially many uses for such classes, but they are currently used
in order to separate configuration/application logic and the libraries. They do
this by mapping configuration information to model class instances.
"""
from txlb import util
from txlb.schedulers import leastc

class HostMapper(object):
    """
    This is a peace-of-mind convenience class for developers that use the
    load-balancing API, providing a quick and intuitive means of configuring a
    load-balancing service without a config file or lots of structured data.

    @type proxyName: string
    @param proxyName: the name that the proxy service will be known by

    @type proxy: string or list
    @param proxy: a string or list of strings of the form 'host:port' that
                  represent the host:port where the proxy will respond to
                  requests

    @type groupName: string
    @param groupName: the group that the host will be put into

    @type address: string
    @param address: a string of the form 'host:port' that is being
                    load-balanced by the proxy service

    @type enabled: boolean or None
    @param enabled: a boolean that indicates whether the group for the host is
                    to be enabled, disabled, or ignored (None)
    """
    def __init__(self, proxyName='proxy1', proxy=[], groupName='group1',
                 lbType=leastc, host='', address='', enabled=True, weight=1):
        if isinstance(proxy, str):
            proxy = [proxy]
        self.proxyName = proxyName
        self.proxyAddresses = [util.splitHostPort(x) for x in proxy]
        self.groupName = groupName
        self.lbType = lbType
        self.hostName = host
        self.hostAddress = util.splitHostPort(address)
        self.groupEnabled = enabled
        self.hostWeight = weight

def convertMapperToModel(listOfMappers):
    """
    This is the method that does the actual conversion from simple mapper
    data structure to an appropriate collection of models.
    """
    # create some dictionaries that will be used to ensure non-duplication of
    # services and service groups
    proxyHolder = {}
    groupHolder = {}
    for mapper in listOfMappers:
        service = ProxyService(mapper.proxyName, mapper.proxyAddresses)
        service = proxyHolder.setdefault(mapper.proxyName, service)
        group = ProxyGroup(
            mapper.groupName, mapper.lbType, mapper.groupEnabled)
        group = groupHolder.setdefault(mapper.groupName, group)
        host = ProxyHost(
            mapper.hostName, mapper.hostAddress[0], mapper.hostAddress[1],
            mapper.hostWeight)
        group.addHost(host)
        service.addGroup(group)
    # we only need the list of proxies, so we just return the values of the
    # dict
    return proxyHolder.values()

class ProxyService(object):
    """
    A class that represents a collection of groups whose hosts need to be
    proxied.
    """
    def __init__(self, name, addresses=[], groups=[]):
        self.groups = {}
        self.name = name
        self.addresses = addresses
        if groups:
            for group in groups:
                self.addGroup(group)

    def getEnabledGroup(self):
        """
        There should only ever be one enabled group. This method returns it. If
        there is more than one enabled group, only the first one this method
        finds will be returned.
        """
        groups = [x for x in self.groups.values() if x.isEnabled]
        if groups:
            return groups[0]

    def addGroup(self, proxyGroup):
        """
        Update the service's group data structure with a new ProxyGroup
        instance.
        """
        self.groups[proxyGroup.name] = proxyGroup

    def getGroups(self):
        """
        Return the keys and values of the groups attribute.
        """
        return self.groups.items()

    def getGroup(self, groupName):
        """
        Return the group with the given name.
        """
        return self.groups[groupName]

class ProxyGroup(object):
    """
    A class that represnts a group of hosts that need to be proxied.
    """
    def __init__(self, name, scheduler=None, enabled=False, hosts=[]):
        self.hosts = {}
        self.name = name
        self.isEnabled = enabled
        self.lbType = scheduler
        self.weights = {}
        if hosts:
            for host in hosts:
                self.addHost(host)

    def enable(self):
        """
        This method is required to be called in order for a group to be
        enabled. Only an enabled group can generate connection proxies.
        """
        self.isEnabled = True

    def disable(self):
        """
        This method needs to be called in order to disable a group. If it is
        not called, and there are two enabled groups, only one group will be
        retuted by ProxyService.getEneabledGroup.
        """
        self.isEnabled = False

    def addHost(self, proxyHost):
        """
        Update the group's hosts data structure with a new ProxyHost instance.
        """
        self.hosts[proxyHost.name] = proxyHost
        self.weights[(proxyHost.hostname, proxyHost.port)] = proxyHost.weight

    def getHosts(self):
        """
        Return the keys and values of the hosts attribute.
        """
        return self.hosts.items()

    def getHost(self, name):
        """
        A convenience method for getting a host proxy from the group proxy,
        given the ProxyHost name.
        """
        return self.hosts[name]

    def delHost(self, name):
        """
        Remove the host from the group model.
        """
        del self.hosts[name]

    def getHostByHostame(self, hostname):
        """
        A convenience method for getting a host proxy from the group proxy,
        given its hostname.
        """
        host, port = util.splitHostPort(hostname)
        for host in self.hosts.values():
            if host.hostname == host and host.port == port:
                return host

    def getHostWeight(self, hostPort):
        """
        Get the weighted value for a given host proxy, given either the host
        proxy's name or hostname.
        """
        return self.weights[hostPort]

    def getWeights(self):
        """
        Get all the weights associated with this host proxies for this group.
        """
        return self.weights

    def getWeightDistribution(self, hostPorts=[]):
        """
        Build a sample population of host, one per weight value (e.g., a host
        with a weight of 1 will have one entry in the distribution; one with a
        weight of 5 will have 5 entries in the distribution). Optionally,
        filter by (host, port) tuples, including only those hosts that are that
        are passed in hostnames filter keyword argument.
        """
        weights = self.getWeights().items()
        if hostPorts:
            weights = [(x, y) for x, y in weights if x in hostPorts]
        for hostPort, weight in weights:
            for x in xrange(weight):
                yield hostPort

class ProxyHost(object):
    """
    A class that represents a host that needs to be proxied.
    """
    def __init__(self, name='', ipOrHost='', port=0, weight=1):
        self.name = name
        self.hostname = ipOrHost
        self.port = int(port)
        self.weight = weight
        self.fileTypes = []
        self.protocols = []

    def setWeight(self, weight):
        """
        This method is useful when the weighting for a host needs to be changed
        programmatically while a service is actively being load-balanced.
        """
        self.weight = weight

    def setAcceptedFileTypes(self, fileTypes=[]):
        """
        This sets the list of file types that the proxied host should accept.

        An empty list means "accept all."
        """
        self.fileTypes = fileTypes

    def setAcceptedProtcols(self, protocols=[]):
        """
        This sets the protocols (e.g., schema, for HTTP requests) that the
        proxied host should accept.

        An empty list means "accept all."
        """
        self.protocols = protocols


text:
JamendoFM:
===========================

JamendoFM is a HTML5 mobile radio client for Jamendo


text:
static NSString * const RNCallKitPerformAnswerCallAction
    = @"performAnswerCallAction";
static NSString * const RNCallKitPerformEndCallAction
    = @"performEndCallAction";
static NSString * const RNCallKitPerformSetMutedCallAction
    = @"performSetMutedCallAction";
static NSString * const RNCallKitProviderDidReset
    = @"providerDidReset";

@interface RNCallKit : RCTEventEmitter <JMCallKitListener>
@end

@implementation RNCallKit

RCT_EXPORT_MODULE();

- (NSArray<NSString *> *)supportedEvents {
    return @[
        RNCallKitPerformAnswerCallAction,
        RNCallKitPerformEndCallAction,
        RNCallKitPerformSetMutedCallAction,
        RNCallKitProviderDidReset
    ];
}

- (void)dealloc {
    [JMCallKitProxy removeListener:self];
}

- (dispatch_queue_t)methodQueue {
    // Make sure all our methods run in the main thread.
    return dispatch_get_main_queue();
}

// End call
RCT_EXPORT_METHOD(endCall:(NSString *)callUUID
                  resolve:(RCTPromiseResolveBlock)resolve
                   reject:(RCTPromiseRejectBlock)reject) {
    DDLogInfo(@"[RNCallKit][endCall] callUUID = %@", callUUID);

    NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];

    if (!callUUID_) {
        reject(nil, [NSString stringWithFormat:@"Invalid UUID: %@", callUUID], nil);
        return;
    }

    CXEndCallAction *action
        = [[CXEndCallAction alloc] initWithCallUUID:callUUID_];
    [self requestTransaction:[[CXTransaction alloc] initWithAction:action]
                     resolve:resolve
                      reject:reject];
}

// Mute / unmute (audio)
RCT_EXPORT_METHOD(setMuted:(NSString *)callUUID
                     muted:(BOOL)muted
                   resolve:(RCTPromiseResolveBlock)resolve
                    reject:(RCTPromiseRejectBlock)reject) {
    DDLogInfo(@"[RNCallKit][setMuted] callUUID = %@", callUUID);

    NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];

    if (!callUUID_) {
        reject(nil, [NSString stringWithFormat:@"Invalid UUID: %@", callUUID], nil);
        return;
    }

    CXSetMutedCallAction *action
        = [[CXSetMutedCallAction alloc] initWithCallUUID:callUUID_ muted:muted];
    [self requestTransaction:[[CXTransaction alloc] initWithAction:action]
                     resolve:resolve
                      reject:reject];
}

RCT_EXPORT_METHOD(setProviderConfiguration:(NSDictionary *)dictionary) {
    DDLogInfo(@"[RNCallKit][setProviderConfiguration:] dictionary = %@", dictionary);

    if (![JMCallKitProxy isProviderConfigured]) {
        JMCallKitProxy.enabled = true;
        [self configureProviderFromDictionary:dictionary];
    }

    // register to receive CallKit proxy events
    [JMCallKitProxy addListener:self];
}

// Start outgoing call
RCT_EXPORT_METHOD(startCall:(NSString *)callUUID
                     handle:(NSString *)handle
                      video:(BOOL)video
                    resolve:(RCTPromiseResolveBlock)resolve
                     reject:(RCTPromiseRejectBlock)reject) {
    DDLogInfo(@"[RNCallKit][startCall] callUUID = %@", callUUID);

    NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];

    if (!callUUID_) {
        reject(nil, [NSString stringWithFormat:@"Invalid UUID: %@", callUUID], nil);
        return;
    }

    // Don't start a new call if there's an active call for the specified
    // callUUID. JitsiMeetView was configured for an incoming call.
    if ([JMCallKitProxy hasActiveCallForUUID:callUUID]) {
        resolve(nil);
        return;
    }

    CXHandle *handle_
        = [[CXHandle alloc] initWithType:CXHandleTypeGeneric value:handle];
    CXStartCallAction *action
        = [[CXStartCallAction alloc] initWithCallUUID:callUUID_
                                               handle:handle_];
    action.video = video;
    CXTransaction *transaction = [[CXTransaction alloc] initWithAction:action];
    [self requestTransaction:transaction resolve:resolve reject:reject];
}

// Indicate call failed
RCT_EXPORT_METHOD(reportCallFailed:(NSString *)callUUID
                           resolve:(RCTPromiseResolveBlock)resolve
                            reject:(RCTPromiseRejectBlock)reject) {
    NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];

    if (!callUUID_) {
        reject(nil, [NSString stringWithFormat:@"Invalid UUID: %@", callUUID], nil);
        return;
    }

    [JMCallKitProxy reportCallWith:callUUID_
                           endedAt:nil
                            reason:CXCallEndedReasonFailed];
    resolve(nil);
}

// Indicate outgoing call connected.
RCT_EXPORT_METHOD(reportConnectedOutgoingCall:(NSString *)callUUID
                                      resolve:(RCTPromiseResolveBlock)resolve
                                       reject:(RCTPromiseRejectBlock)reject) {
    NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];

    if (!callUUID_) {
        reject(nil, [NSString stringWithFormat:@"Invalid UUID: %@", callUUID], nil);
        return;
    }

    [JMCallKitProxy reportOutgoingCallWith:callUUID_
                               connectedAt:nil];
    resolve(nil);
}

// Update call in case we have a display name or video capability changes.
RCT_EXPORT_METHOD(updateCall:(NSString *)callUUID
                     options:(NSDictionary *)options
                     resolve:(RCTPromiseResolveBlock)resolve
                      reject:(RCTPromiseRejectBlock)reject) {
    DDLogInfo(@"[RNCallKit][updateCall] callUUID = %@ options = %@", callUUID, options);

    NSUUID *callUUID_ = [[NSUUID alloc] initWithUUIDString:callUUID];

    if (!callUUID_) {
        reject(nil, [NSString stringWithFormat:@"Invalid UUID: %@", callUUID], nil);
        return;
    }

    NSString *displayName = options[@"displayName"];
    BOOL hasVideo = [(NSNumber*)options[@"hasVideo"] boolValue];

    [JMCallKitProxy reportCallUpdateWith:callUUID_
                                  handle:nil
                             displayName:displayName
                                hasVideo:hasVideo];

    resolve(nil);
}

#pragma mark - Helper methods

- (void)configureProviderFromDictionary:(NSDictionary* )dictionary {
    DDLogInfo(@"[RNCallKit][providerConfigurationFromDictionary: %@]", dictionary);

    if (!dictionary) {
        dictionary = @{};
    }

    // localizedName
    NSString *localizedName = dictionary[@"localizedName"];
    if (!localizedName) {
        localizedName
            = [[NSBundle mainBundle] infoDictionary][@"CFBundleDisplayName"];
    }

    // iconTemplateImageData
    NSString *iconTemplateImageName = dictionary[@"iconTemplateImageName"];
    NSData *iconTemplateImageData;
    UIImage *iconTemplateImage;
    if (iconTemplateImageName) {
        // First try to load the resource from the main bundle.
        iconTemplateImage = [UIImage imageNamed:iconTemplateImageName];

        // If that didn't work, use the one built-in.
        if (!iconTemplateImage) {
            iconTemplateImage = [UIImage imageNamed:iconTemplateImageName
                                           inBundle:[NSBundle bundleForClass:self.class]
                      compatibleWithTraitCollection:nil];
        }

        if (iconTemplateImage) {
            iconTemplateImageData = UIImagePNGRepresentation(iconTemplateImage);
        }
    }

    NSString *ringtoneSound = dictionary[@"ringtoneSound"];

    [JMCallKitProxy
        configureProviderWithLocalizedName:localizedName
                             ringtoneSound:ringtoneSound
                     iconTemplateImageData:iconTemplateImageData];
}

- (void)requestTransaction:(CXTransaction *)transaction
                   resolve:(RCTPromiseResolveBlock)resolve
                    reject:(RCTPromiseRejectBlock)reject {
    DDLogInfo(@"[RNCallKit][requestTransaction] transaction = %@", transaction);

    [JMCallKitProxy request:transaction
                 completion:^(NSError * _Nullable error) {
        if (error) {
            DDLogError(@"[RNCallKit][requestTransaction] Error requesting transaction (%@): (%@)", transaction.actions, error);
            reject(nil, @"Error processing CallKit transaction", error);
        } else {
            resolve(nil);
        }
    }];
}

#pragma mark - JMCallKitListener

// Called when the provider has been reset. We should terminate all calls.
- (void)providerDidReset {
    DDLogInfo(@"[RNCallKit][CXProviderDelegate][providerDidReset:]");

    [self sendEventWithName:RNCallKitProviderDidReset body:nil];
}

// Answering incoming call
- (void) performAnswerCallWithUUID:(NSUUID *)UUID {
    DDLogInfo(@"[RNCallKit][CXProviderDelegate][provider:performAnswerCallAction:]");

    [self sendEventWithName:RNCallKitPerformAnswerCallAction
                       body:@{ @"callUUID": UUID.UUIDString }];
}

// Call ended, user request
- (void) performEndCallWithUUID:(NSUUID *)UUID {
    DDLogInfo(@"[RNCallKit][CXProviderDelegate][provider:performEndCallAction:]");

    [self sendEventWithName:RNCallKitPerformEndCallAction
                       body:@{ @"callUUID": UUID.UUIDString }];
}

// Handle audio mute from CallKit view
- (void) performSetMutedCallWithUUID:(NSUUID *)UUID
                             isMuted:(BOOL)isMuted {
    DDLogInfo(@"[RNCallKit][CXProviderDelegate][provider:performSetMutedCallAction:]");

    [self sendEventWithName:RNCallKitPerformSetMutedCallAction
                       body:@{
                           @"callUUID": UUID.UUIDString,
                           @"muted": @(isMuted)
                       }];
}

// Starting outgoing call
- (void) performStartCallWithUUID:(NSUUID *)UUID
                          isVideo:(BOOL)isVideo {
    DDLogInfo(@"[RNCallKit][CXProviderDelegate][provider:performStartCallAction:]");

    [JMCallKitProxy reportOutgoingCallWith:UUID
                       startedConnectingAt:nil];
}

- (void) providerDidActivateAudioSessionWithSession:(AVAudioSession *)session {
    DDLogInfo(@"[RNCallKit][CXProviderDelegate][provider:didActivateAudioSession:]");

    [JitsiAudioSession activateWithAudioSession:session];
}

- (void) providerDidDeactivateAudioSessionWithSession:(AVAudioSession *)session {
    DDLogInfo(@"[RNCallKit][CXProviderDelegate][provider:didDeactivateAudioSession:]");

    [JitsiAudioSession deactivateWithAudioSession:session];
}

- (void) providerTimedOutPerformingActionWithAction:(CXAction *)action {
    DDLogWarn(@"[RNCallKit][CXProviderDelegate][provider:timedOutPerformingAction:]");
}

// The bridge might already be invalidated by the time a CallKit event is processed,
// just ignore it and don't emit it.
- (void)sendEventWithName:(NSString *)name body:(id)body {
    if (!self.bridge) {
        return;
    }

    [super sendEventWithName:name body:body];
}

@end


text:
<?php declare(strict_types=1);

namespace Shopware\Psh\Test\Unit\Integration\Listing;

use PHPUnit\Framework\TestCase;
use Shopware\Psh\Config\ScriptsPath;
use Shopware\Psh\Listing\DescriptionReader;
use Shopware\Psh\Listing\Script;
use Shopware\Psh\Listing\ScriptFinder;
use Shopware\Psh\Listing\ScriptPathNotValid;

class ScriptFinderTest extends TestCase
{
    public function test_script_finder_holds_contract_if_no_paths_present(): void
    {
        $finder = new ScriptFinder([], new DescriptionReader());
        self::assertInstanceOf(ScriptFinder::class, $finder);
        self::assertIsArray($finder->getAllScripts());
    }

    public function test_script_finder_finds_scripts_if_one_directory_is_passed(): void
    {
        $finder = new ScriptFinder(
            [$this->createScriptsPath(__DIR__ . '/_scripts')],
            new DescriptionReader()
        );

        self::assertInstanceOf(ScriptFinder::class, $finder);
        self::assertCount(4, $finder->getAllScripts());
    }

    public function test_script_finder_finds_scripts_if_two_directories_are_passed_and_filters_noise(): void
    {
        $finder = new ScriptFinder(
            [$this->createScriptsPath(__DIR__ . '/_scripts'), $this->createScriptsPath(__DIR__ . '/_scripts_with_misc_stuff')],
            new DescriptionReader()
        );

        $scripts = $finder->getAllScripts();
        self::assertInstanceOf(ScriptFinder::class, $finder);
        self::assertCount(6, $scripts);
        self::assertContainsOnlyInstancesOf(Script::class, $finder->getAllScripts());

        self::assertFalse($scripts['test']->isHidden());
        self::assertTrue($scripts['.hidden']->isHidden());
    }

    public function test_script_finder_finds_script_by_name_if_two_directories_are_passed_and_filters_noise(): void
    {
        $finder = new ScriptFinder(
            [$this->createScriptsPath(__DIR__ . '/_scripts'), $this->createScriptsPath(__DIR__ . '/_scripts_with_misc_stuff')],
            new DescriptionReader()
        );
        self::assertInstanceOf(ScriptFinder::class, $finder);

        $script = $finder->findScriptByName('foo');
        self::assertInstanceOf(Script::class, $script);
        self::assertEquals('foo', $script->getName());
    }

    public function test_script_finder_prefixes_script_names_with_namespace_if_present(): void
    {
        $finder = new ScriptFinder(
            [$this->createScriptsPath(__DIR__ . '/_scripts'), $this->createScriptsPath(__DIR__ . '/_scripts_with_misc_stuff', 'biz')],
            new DescriptionReader()
        );
        self::assertInstanceOf(ScriptFinder::class, $finder);

        $script = $finder->findScriptByName('biz:test');
        self::assertInstanceOf(Script::class, $script);
        self::assertEquals('biz:test', $script->getName());
    }

    public function test_script_finder_throws_exception_if_path_is_not_valid(): void
    {
        $finder = new ScriptFinder(
            [$this->createScriptsPath(__DIR__ . '/_scripts_not_valid_directory')],
            new DescriptionReader()
        );

        $this->expectException(ScriptPathNotValid::class);
        $finder->getAllScripts();
    }

    public function test_script_finder_adds_description_to_script(): void
    {
        $finder = new ScriptFinder(
            [$this->createScriptsPath(__DIR__ . '/_scripts')],
            new DescriptionReader()
        );

        $script = $finder->findScriptByName('description');
        self::assertSame('My description', $script->getDescription());
    }

    public function test_script_finder_finds_partial_name(): void
    {
        $finder = new ScriptFinder(
            [$this->createScriptsPath(__DIR__ . '/_scripts'), $this->createScriptsPath(__DIR__ . '/_scripts_with_misc_stuff')],
            new DescriptionReader()
        );

        self::assertInstanceOf(ScriptFinder::class, $finder);
        self::assertCount(2, $finder->findScriptsByPartialName('test'));
        self::assertContainsOnlyInstancesOf(Script::class, $finder->getAllScripts());
    }

    private function createScriptsPath(string $path, ?string $namespace = null): ScriptsPath
    {
        return new ScriptsPath($path, __DIR__, false, $namespace);
    }
}


text:
package com.psidox.dockyard.controller.model.docker;

import com.psidox.dockyard.controller.model.application.Group;
import com.psidox.dockyard.controller.model.application.GroupImplementation;

import javax.persistence.*;
import java.util.List;

import static javax.persistence.GenerationType.IDENTITY;

@Entity
@Table(name = "docker")
public class Docker implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
	private Integer id;

    @Column
    private String name;

    @OneToMany(mappedBy = "docker", fetch = FetchType.LAZY, cascade={CascadeType.ALL})
    private List<DockerImage> dockerImages;

    @ManyToMany(mappedBy = "dockers", fetch = FetchType.LAZY, cascade={CascadeType.ALL})
    private List<Group> groups;

    public Integer getId() {
        return this.id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<DockerImage> getDockerImages() {
        return dockerImages;
    }

    public void setDockerImages(List<DockerImage> dockerImages) {
        this.dockerImages = dockerImages;
    }

    public List<Group> getGroups() {
        return groups;
    }

    public void setGroups(List<Group> groups) {
        this.groups = groups;
    }

}


text:
Big Integer library module
==========================

A library providing a arbitrary length integer implementation for Node and browser javascript coding.
This library was put together as an implementation of Programming Praxis "Big Number" exercises in 2011.

## Installation

    npm install dt-big-integer --save

## Usage

    var bigInt = require('dt-big-integer');

    var zero = bigInt();
    var one = bigInt(1);
    var bigger = bitInt(123456789);

## Methods

### toNumber()
### toString()

### isZero()
### isNeg()
### isPos()
### isEven()
### isOdd()

### compareTo()
### eq()
### ne()
### lt()
### gt()
### le()
### ge()

### abs()
### neg()
### sign()
### add()
### subtract()
### multiply()

## Tests

    npm test

## Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style.
Add unit tests for any new or changed functionality. Lint and test your code.

## Release History

* 0.2.0 Second Release

    Completed Programming Praxis excercise "Big Numbers: Addition,
    Subtraction, And Multiplication": May 31, 2011

* 0.1.0 First Release

    Completed Programming Praxis excercise "Big Numbers:
    Getting Started": May 24, 2011


text:
<?php

namespace PHPExiftool\Driver\Tag\DICOM;

use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;

/**
 * @ExclusionPolicy("all")
 */
class AllowLossyCompression extends AbstractTag
{

    protected $Id = '2200,000F';

    protected $Name = 'AllowLossyCompression';

    protected $FullName = 'DICOM::Main';

    protected $GroupName = 'DICOM';

    protected $g0 = 'DICOM';

    protected $g1 = 'DICOM';

    protected $g2 = 'Image';

    protected $Type = '?';

    protected $Writable = false;

    protected $Description = 'Allow Lossy Compression';
}


text:
<?php

namespace App\Listeners;

use Carbon\Carbon;
use Illuminate\Auth\Events\Login;
use Illuminate\Http\Request;

class SetUserLoginCredentials
{
    /**
     * @var Request
     */
    protected $request;

    /**
     * Create the event handler.
     *
     * @param Request $request
     */
    public function __construct(Request $request)
    {
        $this->request = $request;
    }

    /**
     * Update authenticated user's login timestamp and ip address
     *
     * @param Login $event
     * @return void
     */
    public function handle(Login $event)
    {
        $event->user->logged_in_at = Carbon::now();
        $event->user->ip_address = $this->request->getClientIp();
        $event->user->save();
    }
}


text:
from scrapy import Spider, Item, Field, Request

class JakartaNotebookSpider(Spider):

    name = 'jakartanotebook_spider'
    start_urls = [
        'http://www.jakartanotebook.com/index-product'
    ]

    def parse(self, response):
        items = response.xpath('//div[@class="all"]/table/tbody/tr')
        for item in items:
            print item.xpath('td[1]/a/text()').extract() #barang
            print item.xpath('td[2]/a/text()').extract() #harga
            print item.xpath('td[1]/a/@href').extract() #link barang


text:
import { Component } from '@angular/core';

@Component({
    selector: 'favorite-films',
    moduleId: module.id,
    templateUrl: 'favorite-films.component.html'
})

export class FavoriteFilmsComponent{}


text:
package com.richardradics.commons.animations;

import android.view.animation.Interpolator;

/**
 * Created by radicsrichard on 15. 03. 28..
 */
public class MaterialInterpolator implements Interpolator {

    @Override
    public float getInterpolation(float x) {
        return (float) (6 * Math.pow(x, 2) - 8 * Math.pow(x, 3) + 3 * Math.pow(x, 4));
    }
}


text:
coImgui::~coImgui()
{
	ImGui_ImplOpenGL3_Shutdown();
	ImGui::DestroyContext(context);
}

coResult coImgui::Init(HWND hwnd_)
{
    hwnd = hwnd_;
	context = ImGui::CreateContext();
	ImGuiIO& io = ImGui::GetIO();
    io.ImeWindowHandle = hwnd;
    io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors;
	ImGui::StyleColorsDark();

    io.KeyMap[ImGuiKey_Tab] = VK_TAB;
    io.KeyMap[ImGuiKey_LeftArrow] = VK_LEFT;
    io.KeyMap[ImGuiKey_RightArrow] = VK_RIGHT;
    io.KeyMap[ImGuiKey_UpArrow] = VK_UP;
    io.KeyMap[ImGuiKey_DownArrow] = VK_DOWN;
    io.KeyMap[ImGuiKey_PageUp] = VK_PRIOR;
    io.KeyMap[ImGuiKey_PageDown] = VK_NEXT;
    io.KeyMap[ImGuiKey_Home] = VK_HOME;
    io.KeyMap[ImGuiKey_End] = VK_END;
    io.KeyMap[ImGuiKey_Insert] = VK_INSERT;
    io.KeyMap[ImGuiKey_Delete] = VK_DELETE;
    io.KeyMap[ImGuiKey_Backspace] = VK_BACK;
    io.KeyMap[ImGuiKey_Space] = VK_SPACE;
    io.KeyMap[ImGuiKey_Enter] = VK_RETURN;
    io.KeyMap[ImGuiKey_Escape] = VK_ESCAPE;
    io.KeyMap[ImGuiKey_KeyPadEnter] = VK_RETURN;
    io.KeyMap[ImGuiKey_A] = 'A';
    io.KeyMap[ImGuiKey_C] = 'C';
    io.KeyMap[ImGuiKey_V] = 'V';
    io.KeyMap[ImGuiKey_X] = 'X';
    io.KeyMap[ImGuiKey_Y] = 'Y';
    io.KeyMap[ImGuiKey_Z] = 'Z';

	return ImGui_ImplOpenGL3_Init();
}

void coImgui::DrawDemo()
{
	ImGui::ShowDemoWindow(&demo);
}

void coImgui::Begin()
{
	ImGuiIO& io = ImGui::GetIO();

	io.DeltaTime = 1.0f / 60.0f;
	io.KeyCtrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0;
	io.KeyShift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0;
	io.KeyAlt = (::GetKeyState(VK_MENU) & 0x8000) != 0;
	io.KeySuper = false;

	if (hwnd != NULL)
	{
		// Size
		RECT rect = { 0, 0, 0, 0 };
		::GetClientRect(hwnd, &rect);
		io.DisplaySize = ImVec2((float)(rect.right - rect.left), (float)(rect.bottom - rect.top));

		// Mouse pos
		io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
		POINT pos;
		if (HWND active_window = ::GetForegroundWindow())
			if (active_window == hwnd || ::IsChild(active_window, hwnd))
				if (::GetCursorPos(&pos) && ::ScreenToClient(hwnd, &pos))
					io.MousePos = ImVec2((float)pos.x, (float)pos.y);
	}

    // Update OS mouse cursor with the cursor requested by imgui
    ImGuiMouseCursor mouseCursor = io.MouseDrawCursor ? ImGuiMouseCursor_None : ImGui::GetMouseCursor();
    if (lastMouseCursor != mouseCursor)
    {
        lastMouseCursor = mouseCursor;
        UpdateMouseCursor();
    }

	ImGui_ImplOpenGL3_NewFrame();
	ImGui::NewFrame();
}

void coImgui::End()
{
	ImGui::Render();
	ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
}

coBool coImgui::UpdateMouseCursor()
{
    ImGuiIO& io = ImGui::GetIO();
    if (io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange)
        return false;

    ImGuiMouseCursor imgui_cursor = ImGui::GetMouseCursor();
    if (imgui_cursor == ImGuiMouseCursor_None || io.MouseDrawCursor)
    {
        // Hide OS mouse cursor if imgui is drawing it or if it wants no cursor
        ::SetCursor(NULL);
    }
    else
    {
        // Show OS mouse cursor
        LPTSTR win32_cursor = IDC_ARROW;
        switch (imgui_cursor)
        {
        case ImGuiMouseCursor_Arrow:        win32_cursor = IDC_ARROW; break;
        case ImGuiMouseCursor_TextInput:    win32_cursor = IDC_IBEAM; break;
        case ImGuiMouseCursor_ResizeAll:    win32_cursor = IDC_SIZEALL; break;
        case ImGuiMouseCursor_ResizeEW:     win32_cursor = IDC_SIZEWE; break;
        case ImGuiMouseCursor_ResizeNS:     win32_cursor = IDC_SIZENS; break;
        case ImGuiMouseCursor_ResizeNESW:   win32_cursor = IDC_SIZENESW; break;
        case ImGuiMouseCursor_ResizeNWSE:   win32_cursor = IDC_SIZENWSE; break;
        case ImGuiMouseCursor_Hand:         win32_cursor = IDC_HAND; break;
        case ImGuiMouseCursor_NotAllowed:   win32_cursor = IDC_NO; break;
        }
        ::SetCursor(::LoadCursor(NULL, win32_cursor));
    }
    return true;
}

LRESULT coImgui::_ProcessWindowMessages(UINT msg, WPARAM wParam, LPARAM lParam)
{
    if (ImGui::GetCurrentContext() == nullptr)
        return 0;

    ImGuiIO& io = ImGui::GetIO();
    switch (msg)
    {
    case WM_LBUTTONDOWN: case WM_LBUTTONDBLCLK:
    case WM_RBUTTONDOWN: case WM_RBUTTONDBLCLK:
    case WM_MBUTTONDOWN: case WM_MBUTTONDBLCLK:
    case WM_XBUTTONDOWN: case WM_XBUTTONDBLCLK:
    {
        int button = 0;
        if (msg == WM_LBUTTONDOWN || msg == WM_LBUTTONDBLCLK) { button = 0; }
        if (msg == WM_RBUTTONDOWN || msg == WM_RBUTTONDBLCLK) { button = 1; }
        if (msg == WM_MBUTTONDOWN || msg == WM_MBUTTONDBLCLK) { button = 2; }
        if (msg == WM_XBUTTONDOWN || msg == WM_XBUTTONDBLCLK) { button = (GET_XBUTTON_WPARAM(wParam) == XBUTTON1) ? 3 : 4; }
        if (!ImGui::IsAnyMouseDown() && ::GetCapture() == NULL)
            ::SetCapture(hwnd);
        io.MouseDown[button] = true;
        return 0;
    }
    case WM_LBUTTONUP:
    case WM_RBUTTONUP:
    case WM_MBUTTONUP:
    case WM_XBUTTONUP:
    {
        int button = 0;
        if (msg == WM_LBUTTONUP) { button = 0; }
        if (msg == WM_RBUTTONUP) { button = 1; }
        if (msg == WM_MBUTTONUP) { button = 2; }
        if (msg == WM_XBUTTONUP) { button = (GET_XBUTTON_WPARAM(wParam) == XBUTTON1) ? 3 : 4; }
        io.MouseDown[button] = false;
        if (!ImGui::IsAnyMouseDown() && ::GetCapture() == hwnd)
            ::ReleaseCapture();
        return 0;
    }
    case WM_MOUSEWHEEL:
        io.MouseWheel += (float)GET_WHEEL_DELTA_WPARAM(wParam) / (float)WHEEL_DELTA;
        return 0;
    case WM_MOUSEHWHEEL:
        io.MouseWheelH += (float)GET_WHEEL_DELTA_WPARAM(wParam) / (float)WHEEL_DELTA;
        return 0;
    case WM_KEYDOWN:
    case WM_SYSKEYDOWN:
        if (wParam < 256)
            io.KeysDown[wParam] = 1;
        return 0;
    case WM_KEYUP:
    case WM_SYSKEYUP:
        if (wParam < 256)
            io.KeysDown[wParam] = 0;
        return 0;
    case WM_KILLFOCUS:
        memset(io.KeysDown, 0, sizeof(io.KeysDown));
        return 0;
    case WM_CHAR:
        // You can also use ToAscii()+GetKeyboardState() to retrieve characters.
        if (wParam > 0 && wParam < 0x10000)
            io.AddInputCharacterUTF16((unsigned short)wParam);
        return 0;
    case WM_SETCURSOR:
        if (LOWORD(lParam) == HTCLIENT && UpdateMouseCursor())
            return 1;
        return 0;
    case WM_DEVICECHANGE:
        return 0;
    }
    return 0;
}


text:
package edu.mayo.cts2.framework.service.profile.conceptdomainbinding.name;

import edu.mayo.cts2.framework.model.service.core.NameOrURI;

/**
 * The Class ConceptDomainBindingReadId.
 *
 * @author Kevin Peterson
 */
public class ConceptDomainBindingReadId extends NameOrURI {

	private static final long serialVersionUID = 1L;

	private NameOrURI conceptDomain;

	/**
	 * Instantiates a new concept domain binding read id.
	 *
	 * @param localName the local name
	 * @param conceptDomain the concept domain
	 */
	public ConceptDomainBindingReadId(String localName, NameOrURI conceptDomain) {
		super();
		this.setName(localName);
		this.conceptDomain = conceptDomain;
	}

	/**
	 * Instantiates a new concept domain binding read id.
	 *
	 * @param uri the uri
	 */
	public ConceptDomainBindingReadId(String uri) {
		super();
		this.setUri(uri);
	}

	/**
	 * Gets the concept domain.
	 *
	 * @return the concept domain
	 */
	public NameOrURI getConceptDomain() {
		return conceptDomain;
	}

	/**
	 * Sets the concept domain.
	 *
	 * @param conceptDomain the new concept domain
	 */
	public void setConceptDomain(NameOrURI conceptDomain){
		this.conceptDomain = conceptDomain;
	}
}


text:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/icon_b">

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="30dp"
        android:id="@+id/imageView21"
        android:src="@drawable/spl_1"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_above="@+id/imageView45"
        android:paddingTop="150dp" />

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:id="@+id/imageView45"
        android:src="@drawable/spl_2"
        android:layout_alignParentBottom="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />
</RelativeLayout>


text:
    setWindowFlags(windowFlags()& ~Qt::WindowMaximizeButtonHint);
    setFixedSize(this->width(), this->height());


text:
package main

import (
	"flag"
	"fmt"
	"go/build"
	"log"
	"os"
	"runtime"
	"runtime/pprof"

	"code.google.com/p/go.tools/importer"
	"code.google.com/p/go.tools/ssa"
	"code.google.com/p/go.tools/ssa/interp"
)

var buildFlag = flag.String("build", "", `Options controlling the SSA builder.
The value is a sequence of zero or more of these letters:
C	perform sanity [C]hecking of the SSA form.
D	include [D]ebug info for every function.
P	log [P]ackage inventory.
F	log [F]unction SSA code.
S	log [S]ource locations as SSA builder progresses.
G	use binary object files from gc to provide imports (no code).
L	build distinct packages seria[L]ly instead of in parallel.
N	build [N]aive SSA form: don't replace local loads/stores with registers.
`)

var runFlag = flag.Bool("run", false, "Invokes the SSA interpreter on the program.")

var interpFlag = flag.String("interp", "", `Options controlling the SSA test interpreter.
The value is a sequence of zero or more more of these letters:
R	disable [R]ecover() from panic; show interpreter crash instead.
T	[T]race execution of the program.  Best for single-threaded programs!
`)

const usage = `SSA builder and interpreter.
Usage: ssadump [<flag> ...] [<file.go> ...] [<arg> ...]
       ssadump [<flag> ...] <import/path>   [<arg> ...]
Use -help flag to display options.

Examples:
% ssadump -run -interp=T hello.go     # interpret a program, with tracing
% ssadump -build=FPG hello.go         # quickly dump SSA form of a single package
`

var cpuprofile = flag.String("cpuprofile", "", "write cpu profile to file")

func init() {
	// If $GOMAXPROCS isn't set, use the full capacity of the machine.
	// For small machines, use at least 4 threads.
	if os.Getenv("GOMAXPROCS") == "" {
		n := runtime.NumCPU()
		if n < 4 {
			n = 4
		}
		runtime.GOMAXPROCS(n)
	}
}

func main() {
	flag.Parse()
	args := flag.Args()

	impctx := importer.Config{Build: &build.Default}

	var debugMode bool
	var mode ssa.BuilderMode
	for _, c := range *buildFlag {
		switch c {
		case 'D':
			debugMode = true
		case 'P':
			mode |= ssa.LogPackages | ssa.BuildSerially
		case 'F':
			mode |= ssa.LogFunctions | ssa.BuildSerially
		case 'S':
			mode |= ssa.LogSource | ssa.BuildSerially
		case 'C':
			mode |= ssa.SanityCheckFunctions
		case 'N':
			mode |= ssa.NaiveForm
		case 'G':
			impctx.Build = nil
		case 'L':
			mode |= ssa.BuildSerially
		default:
			log.Fatalf("Unknown -build option: '%c'.", c)
		}
	}

	var interpMode interp.Mode
	for _, c := range *interpFlag {
		switch c {
		case 'T':
			interpMode |= interp.EnableTracing
		case 'R':
			interpMode |= interp.DisableRecover
		default:
			log.Fatalf("Unknown -interp option: '%c'.", c)
		}
	}

	if len(args) == 0 {
		fmt.Fprint(os.Stderr, usage)
		os.Exit(1)
	}

	// Profiling support.
	if *cpuprofile != "" {
		f, err := os.Create(*cpuprofile)
		if err != nil {
			log.Fatal(err)
		}
		pprof.StartCPUProfile(f)
		defer pprof.StopCPUProfile()
	}

	// Load, parse and type-check the program.
	imp := importer.New(&impctx)
	infos, args, err := imp.LoadInitialPackages(args)
	if err != nil {
		log.Fatal(err)
	}

	// Create and build SSA-form program representation.
	prog := ssa.NewProgram(imp.Fset, mode)
	if err := prog.CreatePackages(imp); err != nil {
		log.Fatal(err)
	}
	if debugMode {
		for _, pkg := range prog.AllPackages() {
			pkg.SetDebugMode(true)
		}
	}
	prog.BuildAll()

	// Run the interpreter on the first package with a main function.
	if *runFlag {
		var main *ssa.Package
		for _, info := range infos {
			pkg := prog.Package(info.Pkg)
			if pkg.Func("main") != nil || pkg.CreateTestMainFunction() != nil {
				main = pkg
				break
			}
		}
		if main == nil {
			log.Fatal("No main function")
		}
		interp.Interpret(main, interpMode, main.Object.Path(), args)
	}
}