text:
(*

category:      Test
synopsis:      Basic two reactions with three species in one compartment
               and one event that assigns value to two species, subject to a delay.
componentTags: Compartment, Species, Reaction, Parameter, EventWithDelay
testTags:      Amount, BoundaryCondition
testType:      TimeCourse
levels:        2.1, 2.2, 2.3, 2.4, 3.1
generatedBy:   Numeric

The model contains one compartment called C.  There are three species
called S1, S2 and S3 and two parameters called k1 and k2.  Species S2 is
labeled as an SBML boundary species.  The model contains two reactions
defined as:

[{width:30em,margin: 1em auto}|  *Reaction*  |  *Rate*  |
| S1 + S2 -> S3 | $k1 * S1 * S2 * C$  |
| S3 -> S1 + S2 | $k2 * S3 * C$     |]

The model contains one event that assigns values to both species S1 and S2:

[{width:30em,margin: 1em auto}| | *Trigger*   | *Delay* | *Assignments* |
 | Event1                      | $S1 < 0.75$ | $1$     | $S2 = 1.5$    |
 |                             |             |         | $S1 = 1$      |]

The initial conditions are as follows:

[{width:30em,margin: 1em auto}| |*Value* |*Units*                   |
|Initial amount of S1          |$1.0$   |mole                      |
|Initial amount of S2          |$2.0$   |mole                      |
|Initial amount of S3          |$1.0$   |mole                      |
|Value of parameter k1         |$0.75$  |litre mole^-1^ second^-1^ |
|Value of parameter k2         |$0.25$  |second^-1^                |
|Volume of compartment C       |$1$     |litre                     |]

The species values are given as amounts of substance to make it easier to
use the model in a discrete stochastic simulator, but (as per usual SBML
principles) their symbols represent their values in concentration units
where they appear in expressions.

*)

newcase[ "00438" ];

addCompartment[ C, size -> 1 ];
addSpecies[ S1, initialAmount -> 1.0];
addSpecies[ S2, initialAmount -> 2.0, boundaryCondition -> True];
addSpecies[ S3, initialAmount -> 1.0];
addParameter[ k1, value -> 0.75 ];
addParameter[ k2, value -> 0.25 ];
addReaction[ S1 + S2 -> S3, reversible -> False,
	     kineticLaw -> k1 * S1 * S2 * C ];
addReaction[ S3 -> S1 + S2, reversible -> False,
	     kineticLaw -> k2 * S3 * C ];
addEvent[ trigger -> S1 < 0.75, delay->1, eventAssignment -> {S2->1.5, S1->1} ];

makemodel[]


text:
package collectors

import (
	"container/list"
	"time"

	"github.com/khlieng/name_pending/Godeps/_workspace/src/github.com/blevesearch/bleve/search"
)

type TopScoreCollector struct {
	k             int
	skip          int
	results       *list.List
	took          time.Duration
	maxScore      float64
	total         uint64
	facetsBuilder *search.FacetsBuilder
}

func NewTopScorerCollector(k int) *TopScoreCollector {
	return &TopScoreCollector{
		k:       k,
		skip:    0,
		results: list.New(),
	}
}

func NewTopScorerSkipCollector(k, skip int) *TopScoreCollector {
	return &TopScoreCollector{
		k:       k,
		skip:    skip,
		results: list.New(),
	}
}

func (tksc *TopScoreCollector) Total() uint64 {
	return tksc.total
}

func (tksc *TopScoreCollector) MaxScore() float64 {
	return tksc.maxScore
}

func (tksc *TopScoreCollector) Took() time.Duration {
	return tksc.took
}

func (tksc *TopScoreCollector) Collect(searcher search.Searcher) error {
	startTime := time.Now()
	next, err := searcher.Next()
	for err == nil && next != nil {
		tksc.collectSingle(next)
		if tksc.facetsBuilder != nil {
			err = tksc.facetsBuilder.Update(next)
			if err != nil {
				break
			}
		}
		next, err = searcher.Next()
	}
	// compute search duration
	tksc.took = time.Since(startTime)
	if err != nil {
		return err
	}
	return nil
}

func (tksc *TopScoreCollector) collectSingle(dm *search.DocumentMatch) {
	// increment total hits
	tksc.total++

	// update max score
	if dm.Score > tksc.maxScore {
		tksc.maxScore = dm.Score
	}

	for e := tksc.results.Front(); e != nil; e = e.Next() {
		curr := e.Value.(*search.DocumentMatch)
		if dm.Score < curr.Score {

			tksc.results.InsertBefore(dm, e)
			// if we just made the list too long
			if tksc.results.Len() > (tksc.k + tksc.skip) {
				// remove the head
				tksc.results.Remove(tksc.results.Front())
			}
			return
		}
	}
	// if we got to the end, we still have to add it
	tksc.results.PushBack(dm)
	if tksc.results.Len() > (tksc.k + tksc.skip) {
		// remove the head
		tksc.results.Remove(tksc.results.Front())
	}
}

func (tksc *TopScoreCollector) Results() search.DocumentMatchCollection {
	if tksc.results.Len()-tksc.skip > 0 {
		rv := make(search.DocumentMatchCollection, tksc.results.Len()-tksc.skip)
		i := 0
		skipped := 0
		for e := tksc.results.Back(); e != nil; e = e.Prev() {
			if skipped < tksc.skip {
				skipped++
				continue
			}
			rv[i] = e.Value.(*search.DocumentMatch)
			i++
		}
		return rv
	}
	return search.DocumentMatchCollection{}
}

func (tksc *TopScoreCollector) SetFacetsBuilder(facetsBuilder *search.FacetsBuilder) {
	tksc.facetsBuilder = facetsBuilder
}

func (tksc *TopScoreCollector) FacetResults() search.FacetResults {
	if tksc.facetsBuilder != nil {
		return tksc.facetsBuilder.Results()
	}
	return search.FacetResults{}
}

redpajama_set_name: RedPajamaGithub


text:
<md-content layout="vertical" flex id="content">

        <md-whiteframe class="md-whiteframe-z1" layout="column" flex="100" flex-gt-sm="30" layout-padding style="background-color: white">
            <form novalidate name="loginForm" ng-submit="loginForm.$valid && ctrl.login()">

Login

Login ou senha informados inválidos

                    <md-input-container>
                        Email
                        <input name="username" type="email" ng-model="ctrl.username" required>

O Email é obrigatório.

Informe um email válido.

                    </md-input-container>
                    <md-input-container>
                        Senha
                        <input name="password" type="password" ng-model="ctrl.password" required>

O senha é obrigatória.

                    </md-input-container>

                        <md-button type="submit" class="md-raised" flex="30" ng-click="null">Login</md-button>

            </form>
        </md-whiteframe>

</md-content>


text:
package net.krotscheck.jersey2.vfs2;

import org.apache.commons.vfs2.FileSystemException;
import org.apache.commons.vfs2.FileSystemManager;
import org.apache.commons.vfs2.VFS;
import org.glassfish.hk2.api.Factory;
import org.glassfish.hk2.utilities.binding.AbstractBinder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.inject.Singleton;

/**
 * This factory injects a singleton instance of the file system manager into the
 * jersey context.
 *
 * @author Michael Krotscheck
 */
public final class FileSystemManagerFactory
        implements Factory<FileSystemManager> {

    /**
     * Logger instance.
     */
    private static Logger logger =
            LoggerFactory.getLogger(FileSystemManagerFactory.class);

    /**
     * Provide the file system manager.
     *
     * @return A file system manager instance.
     */
    @Override
    public FileSystemManager provide() {
        try {
            return VFS.getManager();
        } catch (FileSystemException fse) {
            logger.error("Cannot create FileSystemManager", fse);
            throw new RuntimeException("Cannot create FileSystemManager", fse);
        }
    }

    /**
     * Dispose of the filesystem.
     *
     * @param manager The manager to dispose of.
     */
    @Override
    public void dispose(final FileSystemManager manager) {
        // Do nothing.
    }

    /**
     * HK2 Binder for our injector context.
     */
    public static final class Binder extends AbstractBinder {

        @Override
        protected void configure() {
            bindFactory(FileSystemManagerFactory.class)
                    .to(FileSystemManager.class)
                    .in(Singleton.class);
        }
    }
}


text:
<select id="coordinacion" name="jefatura" class="form-control input-sm" class="form-control" >
	<option> ___ SELECCIONE JEFARUTRA___</option>
	<option value="descalonizacion y Fortalecimiento">Descalonizacion y Fortalecimiento</option>
	<option value="Prevencion y Atencion de Riesgos">Prevencion y Atencion de Riesgos</option>
	<option value="Preinversion">Preinversion</option>
	<option value="Sistemas Tecnologias de informacion">Sistemas Tecnologias de informacion</option>
	<option value="Activos Fijos">Activos Fijos</option>
	<option value="Archivos Generales">Archivos Generales</option>
	<option value="Tesoreria y Credito Publico">Tesoreria y Credito Publico</option>
	<option value="contabilidad">contabilidad</option>
	<option value="Presupuestos">Presupuestos</option>
	<option value="CICC">CICC</option>

	<option value="Cultura">Jefatura de Cultura</option>
	<option value="Desarrollo Normativo">Desarrollo Normativo </option>
	<option value="Notaria de Gobierno">Notaria de Gobierno</option>
	<option value="Ordenamiento Territorial y Limites">Ordenamiento Territorial y Limites</option>
	<option value="Contrataciones">Jefatura de Contrataciones</option>
	<option value="Transporte Interprovincial">Transporte Interprovincial</option>
	<option value="Almacenes">Almacenes</option>

</select>


text:
/*
 * Copyright 2015 Cloudius Systems
 */

//
// response.cpp
// ~~~~~~~~~
//
// Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#include <seastar/http/reply.hh>
#include <seastar/core/print.hh>
#include <seastar/http/httpd.hh>
#include <seastar/core/loop.hh>

namespace seastar {

namespace httpd {

namespace status_strings {

const sstring continue_ = " 100 Continue\r\n";
const sstring switching_protocols = " 101 Switching Protocols\r\n";
const sstring ok = " 200 OK\r\n";
const sstring created = " 201 Created\r\n";
const sstring accepted = " 202 Accepted\r\n";
const sstring nonauthoritative_information = " 203 Non-Authoritative Information\r\n";
const sstring no_content = " 204 No Content\r\n";
const sstring reset_content = " 205 Reset Content\r\n";
const sstring multiple_choices = " 300 Multiple Choices\r\n";
const sstring moved_permanently = " 301 Moved Permanently\r\n";
const sstring moved_temporarily = " 302 Moved Temporarily\r\n";
const sstring see_other = " 303 See Other\r\n";
const sstring not_modified = " 304 Not Modified\r\n";
const sstring use_proxy = " 305 Use Proxy\r\n";
const sstring temporary_redirect = " 307 Temporary Redirect\r\n";
const sstring bad_request = " 400 Bad Request\r\n";
const sstring unauthorized = " 401 Unauthorized\r\n";
const sstring payment_required = " 402 Payment Required\r\n";
const sstring forbidden = " 403 Forbidden\r\n";
const sstring not_found = " 404 Not Found\r\n";
const sstring method_not_allowed = " 405 Method Not Allowed\r\n";
const sstring not_acceptable = " 406 Not Acceptable\r\n";
const sstring request_timeout = " 408 Request Timeout\r\n";
const sstring conflict = " 409 Conflict\r\n";
const sstring gone = " 410 Gone\r\n";
const sstring length_required = " 411 Length Required\r\n";
const sstring payload_too_large = " 413 Payload Too Large\r\n";
const sstring uri_too_long = " 414 URI Too Long\r\n";
const sstring unsupported_media_type = " 415 Unsupported Media Type\r\n";
const sstring expectation_failed = " 417 Expectation Failed\r\n";
const sstring unprocessable_entity = " 422 Unprocessable Entity\r\n";
const sstring upgrade_required = " 426 Upgrade Required\r\n";
const sstring too_many_requests = " 429 Too Many Requests\r\n";
const sstring internal_server_error = " 500 Internal Server Error\r\n";
const sstring not_implemented = " 501 Not Implemented\r\n";
const sstring bad_gateway = " 502 Bad Gateway\r\n";
const sstring service_unavailable = " 503 Service Unavailable\r\n";
const sstring gateway_timeout = " 504 Gateway Timeout\r\n";
const sstring http_version_not_supported = " 505 HTTP Version Not Supported\r\n";
const sstring insufficient_storage = " 507 Insufficient Storage\r\n";

static const sstring& to_string(reply::status_type status) {
    switch (status) {
    case reply::status_type::continue_:
        return continue_;
    case reply::status_type::switching_protocols:
        return switching_protocols;
    case reply::status_type::ok:
        return ok;
    case reply::status_type::created:
        return created;
    case reply::status_type::accepted:
        return accepted;
    case reply::status_type::nonauthoritative_information:
        return nonauthoritative_information;
    case reply::status_type::no_content:
        return no_content;
    case reply::status_type::reset_content:
        return reset_content;
    case reply::status_type::multiple_choices:
        return multiple_choices;
    case reply::status_type::moved_permanently:
        return moved_permanently;
    case reply::status_type::moved_temporarily:
        return moved_temporarily;
    case reply::status_type::see_other:
        return see_other;
    case reply::status_type::not_modified:
        return not_modified;
    case reply::status_type::use_proxy:
        return use_proxy;
    case reply::status_type::temporary_redirect:
        return temporary_redirect;
    case reply::status_type::bad_request:
        return bad_request;
    case reply::status_type::unauthorized:
        return unauthorized;
    case reply::status_type::payment_required:
        return payment_required;
    case reply::status_type::forbidden:
        return forbidden;
    case reply::status_type::not_found:
        return not_found;
    case reply::status_type::method_not_allowed:
        return method_not_allowed;
    case reply::status_type::not_acceptable:
        return not_acceptable;
    case reply::status_type::request_timeout:
        return request_timeout;
    case reply::status_type::conflict:
        return conflict;
    case reply::status_type::gone:
        return gone;
    case reply::status_type::length_required:
        return length_required;
    case reply::status_type::payload_too_large:
        return payload_too_large;
    case reply::status_type::uri_too_long:
        return uri_too_long;
    case reply::status_type::unsupported_media_type:
        return unsupported_media_type;
    case reply::status_type::expectation_failed:
        return expectation_failed;
    case reply::status_type::unprocessable_entity:
        return unprocessable_entity;
    case reply::status_type::upgrade_required:
        return upgrade_required;
    case reply::status_type::too_many_requests:
        return too_many_requests;
    case reply::status_type::internal_server_error:
        return internal_server_error;
    case reply::status_type::not_implemented:
        return not_implemented;
    case reply::status_type::bad_gateway:
        return bad_gateway;
    case reply::status_type::service_unavailable:
        return service_unavailable;
    case reply::status_type::gateway_timeout:
        return gateway_timeout;
    case reply::status_type::http_version_not_supported:
        return http_version_not_supported;
    case reply::status_type::insufficient_storage:
        return insufficient_storage;
    default:
        return internal_server_error;
    }
}
} // namespace status_strings

sstring reply::response_line() {
    return "HTTP/" + _version + status_strings::to_string(_status);
}

class http_chunked_data_sink_impl : public data_sink_impl {
    output_stream<char>& _out;

    future<> write_size(size_t s) {
        auto req = format("{:x}\r\n", s);
        return _out.write(req);
    }
public:
    http_chunked_data_sink_impl(output_stream<char>& out) : _out(out) {
    }
    virtual future<> put(net::packet data)  override { abort(); }
    using data_sink_impl::put;
    virtual future<> put(temporary_buffer<char> buf) override {
        if (buf.size() == 0) {
            // size 0 buffer should be ignored, some server
            // may consider it an end of message
            return make_ready_future<>();
        }
        auto size = buf.size();
        return write_size(size).then([this, buf = std::move(buf)] () mutable {
            return _out.write(buf.get(), buf.size());
        }).then([this] () mutable {
            return _out.write("\r\n", 2);
        });
    }
    virtual future<> close() override {
        return  make_ready_future<>();
    }
};

class http_chunked_data_sink : public data_sink {
public:
    http_chunked_data_sink(output_stream<char>& out)
        : data_sink(std::make_unique<http_chunked_data_sink_impl>(
                out)) {}
};

static output_stream<char> make_http_chunked_output_stream(output_stream<char>& out) {
    output_stream_options opts;
    opts.trim_to_size = true;
    return output_stream<char>(http_chunked_data_sink(out), 32000, opts);
}

void reply::write_body(const sstring& content_type, noncopyable_function<future<>(output_stream<char>&&)>&& body_writer) {
    set_content_type(content_type);
    _body_writer  = std::move(body_writer);
}

void reply::write_body(const sstring& content_type, const sstring& content) {
    _content = content;
    done(content_type);
}

future<> reply::write_reply_to_connection(connection& con) {
    add_header("Transfer-Encoding", "chunked");
    return con.out().write(response_line()).then([this, &con] () mutable {
        return write_reply_headers(con);
    }).then([&con] () mutable {
        return con.out().write("\r\n", 2);
    }).then([this, &con] () mutable {
        return _body_writer(make_http_chunked_output_stream(con.out()));
    });

}

future<> reply::write_reply_headers(connection& con) {
    return do_for_each(_headers, [&con](auto& h) {
        return con.out().write(h.first + ": " + h.second + "\r\n");
    });
}

}
} // namespace server


text:
require 'spec_helper'

describe Abacos, broken: true do
  subject { described_class }

  before do
    subject.key = ENV['ABACOS_KEY']
    subject.base_path = ENV['ABACOS_BASE_URL']
  end

  context "product services" do
    it "fetches products available" do
      VCR.use_cassette "products_available_1412880883" do
        products = subject.products_available
        expect(products).to be_a Array
      end
    end

    it "still returns an array when no product is returned" do
      VCR.use_cassette "no_products_available" do
        products = subject.products_available
        expect(products).to be_a Array
      end
    end

    it "raise custom exception on abacos response error" do
      VCR.use_cassette "products/wrong_credentials" do
        subject.key = 'wrong key'
        expect {
          products = subject.products_available
        }.to raise_error Abacos::ResponseError
      end
    end

    it "confirms products was received" do
      VCR.use_cassette "confirm_product_received" do
        result = subject.confirm_product_received "1BAB4A04-1987-4C3C-A7F0-D310985942D7"
        expect(result).to eq true
      end
    end

    it "fetches product prices" do
      VCR.use_cassette "price_online" do
        prices = subject.price_online ["3104654"]
        expect(prices).to be_a Array
      end

      VCR.use_cassette "price_online_multiple" do
        prices = subject.price_online ["3104654", "3103099-2"]
        expect(prices).to be_a Array
      end
    end

    it "fetches prices available" do
      VCR.use_cassette "prices_available" do
        result = subject.prices_available
      end
    end

    it "fetches stocks available" do
      VCR.use_cassette "stocks_available" do
        stocks = subject.stocks_available
        expect(stocks).to be_a Array
      end
    end

    it "confirms stock was received" do
      VCR.use_cassette "confirm_stock_received" do
        result = subject.confirm_stock_received "bdcec9fb-f0f5-4223-8fc6-f369cb19ab05"
        expect(result).to eq true
      end
    end

    it "fetches families available" do
      VCR.use_cassette "families_available" do
        families = subject.families_available
        expect(families).to be_a Array
      end
    end

    it "fetches branding available" do
      VCR.use_cassette "branding_available" do
        brandings = subject.branding_available
        expect(brandings).to be_a Array
      end
    end
  end

  context "order services" do
    it "adds order" do
      VCR.use_cassette "orders/add_order1412283955" do
        result = subject.add_orders [Factory.abacos_order]
      end
    end

    it "raises if can't create order" do
      VCR.use_cassette "orders/add_order1413223734" do
        expect {
          subject.add_orders [Factory.abacos_order]
        }.to raise_error Abacos::ResponseError
      end
    end

    it "receives order updates from abacos" do
      VCR.use_cassette "orders/orders_available" do
        o = subject.orders_available
      end
    end

    it "receives order status updates from abacos" do
      VCR.use_cassette "orders/orders_available_status1412903800" do
        result = subject.orders_available_status
        expect(result).to be_a Array
      end
    end

    it "confirm order status received" do
      VCR.use_cassette "orders/confirm_order_status_received" do
        result = subject.confirm_order_status_received "C85869D8-1B01-4ECB-A3E9-E782E562CD75"
        expect(result).to eq true
      end
    end
  end

  context "customer services" do
    it "adds customer" do
      VCR.use_cassette "add_customer_2014-10-02_17_25_31_-0300" do
        result = subject.add_customers [Factory.abacos_customer]
      end
    end

    it "raises if can save customer" do
      VCR.use_cassette "customers/add_customer1413224851" do
        expect {
          subject.add_customers [Factory.abacos_customer]
        }.to raise_error Abacos::ResponseError
      end
    end
  end

  context "invoices" do
    it "invoices available" do
      VCR.use_cassette "invoices/1415329420" do
        result = subject.invoices_available
        expect(result).to be_a Array
      end
    end
  end
end


text:
@interface CCTeamsService : NSObject <CCTeamsServiceProtocol>

@end


text:
package org.sozluk.parser

import dispatch._, Defaults._
import org.jsoup.nodes.Element
import org.jsoup.select.Elements
import scala.collection.JavaConversions._
import org.sozluk.common.Logger

object TdkParser {

  private def request(word: String) =
    url("http://www.tdk.gov.tr/index.php?option=com_bts").POST << Map(
      "kelime" -> word,
      "gonder" -> "ARA",
      "ayn" -> "tam",
      "kategori" -> "verilst")

  private def processResponse(response: Elements): List[String] = {
    response.map(_.text().trim()).filter(_.nonEmpty).toList
  }

  def parse(word: String): Future[Either[Throwable, List[String]]] =
    Http(request(word) OK as.jsoup.Query("p.thomicb")).either.right.map(processResponse)

  def main(args: Array[String]) {
    val word = args(0)
    val f = parse(word) map {
      _ match {
        case Left(t) =>
        case Right(head :: tail) if head == "Aşağıdaki sözlerden birini mi aramak istediniz?" =>
          Logger.info(s"Bunu mu demek istediniz => ${tail.mkString(",")}")
        case Right(meanings) =>
          meanings.foreach(Logger.info(_))
      }
    }

    import scala.concurrent.duration._
    import scala.concurrent.Await
    try {
      Await.result(f, 10 seconds)
    } finally {
      dispatch.Http.shutdown()
    }
  }
}


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.badVarPosMessage = badVarPosMessage;
exports.VariablesInAllowedPosition = VariablesInAllowedPosition;

var _error = require('../../error');

var _definition = require('../../type/definition');

var _typeComparators = require('../../utilities/typeComparators');

var _typeFromAST = require('../../utilities/typeFromAST');

function badVarPosMessage(varName, varType, expectedType) {
  return 'Variable "$' + varName + '" of type "' + String(varType) + '" used in ' + ('position expecting type "' + String(expectedType) + '".');
}

/**
 * Variables passed to field arguments conform to type
 */
/**
 * Copyright (c) 2015-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 *
 */

function VariablesInAllowedPosition(context) {
  var varDefMap = Object.create(null);

  return {
    OperationDefinition: {
      enter: function enter() {
        varDefMap = Object.create(null);
      },
      leave: function leave(operation) {
        var usages = context.getRecursiveVariableUsages(operation);

        usages.forEach(function (_ref) {
          var node = _ref.node,
              type = _ref.type;

          var varName = node.name.value;
          var varDef = varDefMap[varName];
          if (varDef && type) {
            // A var type is allowed if it is the same or more strict (e.g. is
            // a subtype of) than the expected type. It can be more strict if
            // the variable type is non-null when the expected type is nullable.
            // If both are list types, the variable item type can be more strict
            // than the expected item type (contravariant).
            var schema = context.getSchema();
            var varType = (0, _typeFromAST.typeFromAST)(schema, varDef.type);
            if (varType && !(0, _typeComparators.isTypeSubTypeOf)(schema, effectiveType(varType, varDef), type)) {
              context.reportError(new _error.GraphQLError(badVarPosMessage(varName, varType, type), [varDef, node]));
            }
          }
        });
      }
    },
    VariableDefinition: function VariableDefinition(node) {
      varDefMap[node.variable.name.value] = node;
    }
  };
}

// If a variable definition has a default value, it's effectively non-null.
function effectiveType(varType, varDef) {
  return !varDef.defaultValue || varType instanceof _definition.GraphQLNonNull ? varType : new _definition.GraphQLNonNull(varType);
}


text:
class PrefService;
class Profile;

namespace user_prefs {
class PrefRegistrySyncable;
}

// StartupPref specifies what should happen at startup for a specified profile.
// StartupPref is stored in the preferences for a particular profile.
struct SessionStartupPref {
  enum Type {
    // Indicates the user wants to open the New Tab page.
    DEFAULT,

    // Deprecated. See comment in session_startup_pref.cc
    HOMEPAGE,

    // Indicates the user wants to restore the last session.
    LAST,

    // Indicates the user wants to restore a specific set of URLs. The URLs
    // are contained in urls.
    URLS,

    // Number of values in this enum.
    TYPE_COUNT
  };

  // For historical reasons the enum and value registered in the prefs don't
  // line up. These are the values registered in prefs.
  // The values are also recorded in Settings.StartupPageLoadSettings histogram,
  // so make sure to update histograms.xml if you change these.
  static const int kPrefValueHomePage = 0;  // Deprecated
  static const int kPrefValueLast = 1;
  static const int kPrefValueURLs = 4;
  static const int kPrefValueNewTab = 5;
  static const int kPrefValueMax = 6;

  static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);

  // Returns the default value for |type|.
  static Type GetDefaultStartupType();

  // What should happen on startup for the specified profile.
  static void SetStartupPref(Profile* profile, const SessionStartupPref& pref);
  static void SetStartupPref(PrefService* prefs,
                             const SessionStartupPref& pref);
  static SessionStartupPref GetStartupPref(Profile* profile);
  static SessionStartupPref GetStartupPref(PrefService* prefs);

  // If the user had the "restore on startup" property set to the deprecated
  // "Open the home page" value, this migrates them to a value that will have
  // the same effect.
  static void MigrateIfNecessary(PrefService* prefs);

  // Whether the startup type and URLs are managed via policy.
  static bool TypeIsManaged(PrefService* prefs);
  static bool URLsAreManaged(PrefService* prefs);

  // Whether the startup type has not been overridden from its default.
  static bool TypeIsDefault(PrefService* prefs);

  // Converts an integer pref value to a SessionStartupPref::Type.
  static SessionStartupPref::Type PrefValueToType(int pref_value);

  explicit SessionStartupPref(Type type);

  ~SessionStartupPref();

  // What to do on startup.
  Type type;

  // The URLs to restore. Only used if type == URLS.
  std::vector<GURL> urls;
};

#endif  // CHROME_BROWSER_PREFS_SESSION_STARTUP_PREF_H__


text:
layout: post
Date: 2012-08-22
Title: In The Forest
---
⬆1.15 KB/S ⬇9.4KB/S

Being faced with the slowness of an edge connection, ten times slower than the good-old dial-up modem, as happens every time we retire to the cottage in the woods, frustration first abounds. Thoughts of engineering huge home-made amplifying masts out of tin foil and coathangers, or hoisting the receiver up the flagpole which all Swedish houses come equipped with fills my mind, and I find it hard to concentrate.

It would feel better not using my computer knowing that my connection was fast.


text:
# Templates

This part of the Best Practices Guide focuses on templates.

## Structure of templates/

The templates directory should be structured as follows:

- Template files should have the extension `.yaml` if they produce YAML output. The
  extension `.tpl` may be used for template files that produce no formatted content.
- Template file names should use dashed notation (`my-example-configmap.yaml`), not camelcase.
- Each resource definition should be in its own template file.
- Template file names should reflect the resource kind in the name. e.g. `foo-pod.yaml`,
  `bar-svc.yaml`

## Names of Defined Templates

Defined templates (templates created inside a `{{ define }} ` directive) are
globally accessible. That means that a chart and all of its subcharts will have
access to all of the templates created with `{{ define }}`.

For that reason, _all defined template names should be namespaced._

Correct:

```yaml
{{- define "nginx.fullname" }}
{{/* ... */}}
{{ end -}}
```

Incorrect:

```yaml
{{- define "fullname" -}}
{{/* ... */}}
{{ end -}}
```
It is highly recommended that new charts are created via `helm create` command as the template names are automatically defined as per this best practice.

## Formatting Templates

Templates should be indented using _two spaces_ (never tabs).

Template directives should have whitespace after the opening  braces and before the
closing braces:

Correct:
```
{{ .foo }}
{{ print "foo" }}
{{- print "bar" -}}
```

Incorrect:
```
{{.foo}}
{{print "foo"}}
{{-print "bar"-}}
```

Templates should chomp whitespace where possible:

```
foo:
  {{- range .Values.items }}
  {{ . }}
  {{ end -}}
```

Blocks (such as control structures) may be indented to indicate flow of the template code.

```
{{ if $foo -}}
  {{- with .Bar }}Hello{{ end -}}
{{- end -}}
```

However, since YAML is a whitespace-oriented language, it is often not possible for code indentation to follow that convention.

## Whitespace in Generated Templates

It is preferable to keep the amount of whitespace in generated templates to
a minimum. In particular, numerous blank lines should not appear adjacent to each
other. But occasional empty lines (particularly between logical sections) is
fine.

This is best:

```yaml
apiVersion: batch/v1
kind: Job
metadata:
  name: example
  labels:
    first: first
    second: second
```

This is okay:

```yaml
apiVersion: batch/v1
kind: Job

metadata:
  name: example

  labels:
    first: first
    second: second

```

But this should be avoided:

```yaml
apiVersion: batch/v1
kind: Job

metadata:
  name: example

  labels:
    first: first

    second: second

```

## Comments (YAML Comments vs. Template Comments)

Both YAML and Helm Templates have comment markers.

YAML comments:
```yaml
# This is a comment
type: sprocket
```

Template Comments:
```yaml
{{- /*
This is a comment.
*/ -}}
type: frobnitz
```

Template comments should be used when documenting features of a template, such as explaining a defined template:

```yaml
{{- /*
mychart.shortname provides a 6 char truncated version of the release name.
*/ }}
{{ define "mychart.shortname" -}}
{{ .Release.Name | trunc 6 }}
{{- end -}}

```

Inside of templates, YAML comments may be used when it is useful for Helm users to (possibly) see the comments during debugging.

```
# This may cause problems if the value is more than 100Gi
memory: {{ .Values.maxMem | quote }}
```

The comment above is visible when the user runs `helm install --debug`, while
comments specified in `{{- /* */ -}}` sections are not.

## Use of JSON in Templates and Template Output

YAML is a superset of JSON. In some cases, using a JSON syntax can be more
readable than other YAML representations.

For example, this YAML is closer to the normal YAML method of expressing lists:

```yaml
arguments:
  - "--dirname"
  - "/foo"
```

But it is easier to read when collapsed into a JSON list style:

```yaml
arguments: ["--dirname", "/foo"]
```

Using JSON for increased legibility is good. However, JSON syntax should not
be used for representing more complex constructs.

When dealing with pure JSON embedded inside of YAML (such as init container
configuration), it is of course appropriate to use the JSON format.


text:
using System.Threading.Tasks;
using FluentAssertions;
using Nest.Queryify.Abstractions;
using Nest.Queryify.UnitTests.Extensions;
using Nest.Queryify.UnitTests.Queries.Fixtures;
using Nest.Queryify.UnitTests.TestData;
using Xunit;

namespace Nest.Queryify.UnitTests.Repository
{
    public class ElasticsearchRepositoryGetByIdNotFoundSpecs
    {
        private readonly IElasticsearchRepository _repository;
        private IElasticClient _client;

        public ElasticsearchRepositoryGetByIdNotFoundSpecs()
        {
            var settings = new ConnectionSettings();

            var output =
                "Nest.Queryify.Tests.TestData.NotFoundGetResponse.json".ReadAsStringFromEmbeddedResource<ElasticClientQueryObjectTestFixture>();
            _client = new ElasticClient(settings, new InMemoryConnection(settings, output, 404));
            _repository = new ElasticsearchRepository(_client);
        }

        [Fact]
        public void ShouldRun()
        {
            var response = _repository.GetById<Person>("1");
            response.Found.Should().BeFalse();
            response.Id.Should().Be("1");
        }

        [Fact]
        public async Task ShouldRunAsync()
        {
            var response = await _repository.GetByIdAsync<Person>("1");
            response.Found.Should().BeFalse();
            response.Id.Should().Be("1");
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;

namespace TestFirst
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var webHostBuilder = CreateWebHostBuilder(args);
            webHostBuilder.Build().Run();
        }

        public static IWebHostBuilder CreateWebHostBuilder(string[] args)
        {
            return WebHost.CreateDefaultBuilder(args)
                .UseStartup<Startup>();
        }
    }
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Nova Hedwigia 55(1-2): 205 (1992)

#### Original name
Porina rugosa Ach.

### Remarks
null


text:
ActiveAddress.ApplicationAdapter = DS.FixtureAdapter.extend();

ActiveAddress.Contact.FIXTURES = [
{
  id: 4,
  first_name: 'Affro',
  surname: 'Kingsley',
  address: 'Henry Adams, Rockford',
  phone_number: '01234567890',
  email: 'kings@rocky.org'
},
{
  id: 1,
  first_name: 'Frodo',
  surname: 'Baggins',
  address: 'The Burrow, Shire',
  phone_number: '07913475574',
  email: 'frodo@middleearth.org'
},
{
  id: 2,
  first_name: 'Harry',
  surname: 'Potter',
  address: 'The Cupboard under the Stairs, 4 Privet Drive, Little Whinging, Surrey',
  phone_number: '01234567890',
  email: 'harry.potter@hogwarts.ac.uk'
},
{
  id: 3,
  first_name: 'Benjamin',
  surname: 'Button',
  address: '25 Whirley Way, Hogsmead',
  phone_number: '01429547601',
  email: 'ben.button@buttons.com'
}
]


text:
from __future__ import unicode_literals
from .. import Provider as CompanyProvider

class Provider(CompanyProvider):
    formats = (
        '{{last_name}} {{company_suffix}}',
        '{{last_name}} {{last_name}} {{company_suffix}}',
        '{{last_name}}',
    )

    company_suffixes = (
        's.r.o.', 'v.o.s.', 'a.s.', 'k.s.',
    )


text:
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

/*============================================================
**
**
**
**
**
**
** Purpose: Exception for accessing a file that doesn't exist.
**
**
===========================================================*/

using System;
using System.Runtime.Serialization;
using System.Security.Permissions;
using SecurityException = System.Security.SecurityException;
using System.Globalization;

namespace System.IO {
    // Thrown when trying to access a file that doesn't exist on disk.
    [Serializable]
    [System.Runtime.InteropServices.ComVisible(true)]
    public class FileNotFoundException : IOException {

        private String _fileName;  // The name of the file that isn't found.
        private String _fusionLog;  // fusion log (when applicable)

        public FileNotFoundException()
            : base(Environment.GetResourceString("IO.FileNotFound")) {
            SetErrorCode(__HResults.COR_E_FILENOTFOUND);
        }

        public FileNotFoundException(String message)
            : base(message) {
            SetErrorCode(__HResults.COR_E_FILENOTFOUND);
        }

        public FileNotFoundException(String message, Exception innerException)
            : base(message, innerException) {
            SetErrorCode(__HResults.COR_E_FILENOTFOUND);
        }

        public FileNotFoundException(String message, String fileName) : base(message)
        {
            SetErrorCode(__HResults.COR_E_FILENOTFOUND);
            _fileName = fileName;
        }

        public FileNotFoundException(String message, String fileName, Exception innerException)
            : base(message, innerException) {
            SetErrorCode(__HResults.COR_E_FILENOTFOUND);
            _fileName = fileName;
        }

        public override String Message
        {
            get {
                SetMessageField();
                return _message;
            }
        }

        private void SetMessageField()
        {
            if (_message == null) {
                if ((_fileName == null) &&
                    (HResult == System.__HResults.COR_E_EXCEPTION))
                    _message = Environment.GetResourceString("IO.FileNotFound");

                else if( _fileName != null)
                    _message = FileLoadException.FormatFileLoadExceptionMessage(_fileName, HResult);
            }
        }

        public String FileName {
            get { return _fileName; }
        }

        public override String ToString()
        {
            String s = GetType().FullName + ": " + Message;

            if (_fileName != null && _fileName.Length != 0)
                s += Environment.NewLine + Environment.GetResourceString("IO.FileName_Name", _fileName);

            if (InnerException != null)
                s = s + " ---> " + InnerException.ToString();

            if (StackTrace != null)
                s += Environment.NewLine + StackTrace;

            try
            {
                if(FusionLog!=null)
                {
                    if (s==null)
                        s=" ";
                    s+=Environment.NewLine;
                    s+=Environment.NewLine;
                    s+=FusionLog;
                }
            }
            catch(SecurityException)
            {

            }
            return s;

        }

        protected FileNotFoundException(SerializationInfo info, StreamingContext context) : base (info, context) {
            // Base class constructor will check info != null.

            _fileName = info.GetString("FileNotFound_FileName");
            try
            {
                _fusionLog = info.GetString("FileNotFound_FusionLog");
            }
            catch
            {
                _fusionLog = null;
            }
        }

        private FileNotFoundException(String fileName, String fusionLog,int hResult)
            : base(null)
        {
            SetErrorCode(hResult);
            _fileName = fileName;
            _fusionLog=fusionLog;
            SetMessageField();
        }

        public String FusionLog {
            [System.Security.SecuritySafeCritical]  // auto-generated
            get { return _fusionLog; }
        }

        [System.Security.SecurityCritical]  // auto-generated_required
        public override void GetObjectData(SerializationInfo info, StreamingContext context) {
            // Serialize data for our base classes.  base will verify info != null.
            base.GetObjectData(info, context);

            // Serialize data for this class
            info.AddValue("FileNotFound_FileName", _fileName, typeof(String));

            try
            {
                info.AddValue("FileNotFound_FusionLog", FusionLog, typeof(String));
            }
            catch (SecurityException)
            {
            }
        }
    }
}


text:
using Microsoft.Web.Administration;
using System;
using System.ComponentModel.Design;

namespace JexusManager.Main.Features.Main
{
    internal class ScheduleCollectionEditor : CollectionEditor
    {
        public ScheduleCollectionEditor(Type type)
            : base(type)
        {
        }

        protected override string GetDisplayText(object value)
        {
            Schedule time = (Schedule)value;
            return time.Time.ToString("c");
        }

        protected override bool CanSelectMultipleInstances()
        {
            return false;
        }

        protected override Type CreateCollectionItemType()
        {
            return typeof(Schedule);
        }
    }
}


text:
This documentation helps with migrating from V0_1_0 to V0_2_0.
The following steps needed to be executed in this sequence, either one command or a file named with that step.
Please note: in every file there is a configuration section to be configured prior to execution

step | type of action | difficulty level | configuration | action
---- | -------------- | ---------------- | ------------- | ------
step01 | script | online | `USE AUDIT;` | Execute `patchv_0_1_0_to_v0_2_0_step01_online.sql`
step02 | script | online | `USE AUDIT;` and the hardcoded related schemata | Execute `audit02_recreate_generic_views.sql`
step03 | script | online | `USE AUDIT;` | Execute `audit03_recreate_generic_procedures.sql`
step04 | script | online | `USE AUDIT;` | Execute `audit11_CreateConfigurationProc.sql` to (re)install audit11 procedure.
step05 | script | online | `USE AUDIT;` | Execute `audit12_check_configuration4one_table_proc.sql`
step06 | script | online | `USE AUDIT;` | Execute `audit13_recreate_data_table_triggers_proc.sql`
step07 | script | online | `USE AUDIT;` | Execute `audit14_recreate_audit_table_views_proc.sql`
step08 | script | online | `USE AUDIT;` and the list of data tables | Execute `audit30_script_generator_proc.sql`
step09 | procedure | prepare | Was done in step08! | `CALL audit30_script_generator();` to get an output script
step10 | script | online | Search for PLEASE_CHECK and update the output script | Execute the output script from step09


text:
use [HYCP FIFO]
go

drop VIEW FIFOPurchases
go

CREATE VIEW FIFOPurchases AS

SELECT
	PURCHSUM.*,
	[TransQuantity-EndBal] =
		Case
			when --starting purchase total <= ending balance and ending purchase total <= than ending balance
				(sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) - [QuantityA3]) <= [EndBal]
				AND sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) <= [EndBal]
					then [QuantityA3]
			when --starting purchase total > ending balance and ending purchase total are > ending balance
				(sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) - [QuantityA3]) > [EndBal]
				AND sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) > [EndBal]
					then 0
			when --starting purchase total is <= ending balance and ending purchase total is > ending balance = ending balance - starting purchase total
				(sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) - [QuantityA3]) <= [EndBal]
				AND sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) > [EndBal]
					then [EndBal] - (sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) - [QuantityA3])
			when --starting purchase total is > ending balance and ending purchase total is <= ending balance = ending purchase total - ending balance
				(sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) - [QuantityA3]) > [EndBal]
				AND sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) <= [EndBal]
					then sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) - [EndBal]
			else 0
		end,
	[TransQuantity-NotEndBal] =
		Case
			when --starting purchase total <= ending balance and ending purchase total <= than ending balance
				(sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) - [QuantityA3]) <= [EndBal]
				AND sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) <= [EndBal]
					then 0
			when --starting purchase total > ending balance and ending purchase total are > ending balance
				(sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) - [QuantityA3]) > [EndBal]
				AND sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) > [EndBal]
					then [QuantityA3]
			when --starting purchase total is <= ending balance and ending purchase total is > ending balance = starting purchase total - ending balance
				(sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) - [QuantityA3]) <= [EndBal]
				AND sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) > [EndBal]
					then sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) - [EndBal]
			when --starting purchase total is > ending balance and ending purchase total is <= ending balance (negative purchase) = ending balance - ending purchase total
				(sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) - [QuantityA3]) > [EndBal]
				AND sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) <= [EndBal]
					then [EndBal] - (sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and current row) - [QuantityA3])
			else 0
		end,
	[EndBal-NotInPurch] =
		Case
			when --purchase total <= ending balance
				[EndBal] > sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and unbounded following)
				AND row_number() OVER(partition by [Item Num] order by [GLDate] desc) = count([Item Num]) OVER(partition by [Item Num])
					then [EndBal] - sum([QuantityA3]) OVER(partition by [Item Num] order by [GLDate] desc rows between unbounded preceding and unbounded following)
			else 0
		end
FROM
	(
		SELECT
			[Item Num] = isnull(PURCH.[ItemNum], IB.[Item Num]),
			PURCH.[Explanation],
			[DocType] = isnull(PURCH.[DocType],'NP'),
			PURCH.[GLDate],
			[QuantityA3] = isnull(PURCH.[QuantityA3],0),
			[AmountAA] = isnull(PURCH.[AmountAA],0),
			[AmountA3] = isnull(PURCH.[AmountA3],0),
			PURCH.[mill],
			IB.[EndBal]
		FROM
			(
				SELECT
					[ItemNum],
					[Explanation],
					[DocType],
					[GLDate],
					[QuantityA3],
					[AmountAA],
					[AmountA3],
					[mill]
				FROM [dbo].[CPLGTrans]
				WHERE DocType = 'OV'
			) as PURCH
			FULL OUTER JOIN
			(
				SELECT
					[Item Num],
					[EndBal] = sum(isnull(quantity,0))
				FROM dbo.[Inventory Balance]
				group by [Item Num]
			) as IB
				on PURCH.[ItemNum] = IB.[Item Num]
	) AS [PURCHSUM]


text:
layout: page
title: Moyer Family Reunion
date: 2016-05-24
author: Deborah Moreno
tags: weekly links, java
status: published
summary: Etiam sollicitudin ornare hendrerit. Vestibulum iaculis iaculis velit.
banner: images/banner/leisure-03.jpg
booking:
  startDate: 10/09/2019
  endDate: 10/14/2019
  ctyhocn: DENLMHX
  groupCode: MFR
published: true
---
Nullam quis interdum dui, et posuere arcu. Suspendisse elit est, cursus id elit sit amet, pellentesque egestas nisi. Curabitur in euismod nunc, et convallis eros. Ut feugiat dapibus augue, a eleifend purus sollicitudin id. Morbi elementum nunc a metus blandit sagittis. Nullam ex lorem, lacinia non luctus sit amet, pharetra porttitor leo. Proin porta mollis nisl eget commodo.

* Integer placerat turpis id ullamcorper dignissim
* Cras sodales diam in orci dapibus, sit amet efficitur nibh rutrum
* Integer ut ante aliquet, dignissim dui id, varius ante
* Nam fermentum quam eget dolor ornare eleifend.

Praesent dictum elementum elementum. Duis ut tortor eget purus tempor auctor. Etiam convallis, mauris sed pellentesque auctor, quam lectus accumsan nisi, at dictum leo massa a enim. Integer porta arcu eu ipsum vulputate ultricies. Phasellus fringilla quis nibh malesuada rutrum. Aliquam a urna eget odio mollis volutpat. Ut sed rutrum arcu. Ut vestibulum rutrum pharetra. Sed viverra consequat tortor, at pellentesque ipsum hendrerit at. Suspendisse potenti.
Aliquam cursus sit amet nisl et porttitor. Nullam pharetra consectetur felis et efficitur. Ut rutrum metus erat, ut gravida lectus hendrerit ut. Curabitur vulputate ac ligula eu tristique. Cras arcu erat, imperdiet at efficitur aliquet, blandit at arcu. Nulla scelerisque malesuada ante, a vestibulum ex eleifend non. Fusce odio ex, rhoncus eu mollis et, ullamcorper ut arcu. Mauris tincidunt risus at tellus luctus iaculis. Nulla quis semper nulla, at vehicula turpis. Nullam maximus ipsum id enim rutrum vehicula. Pellentesque posuere quam at enim semper, sit amet ullamcorper eros placerat.


text:
import json
import sys
import traceback

from kubernetes.client.rest import ApiException

def api_exception(e):
    """
    Returns the proper Exception class for the given kubernetes.client.rest.ApiException object
    https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#success-codes
    """
    _, _, exc_traceback = sys.exc_info()
    tb = '\n'.join(traceback.format_tb(exc_traceback))
    return {
        400: BadRequestError,
        401: UnauthorizedError,
        403: ForbiddenError,
        404: NotFoundError,
        405: MethodNotAllowedError,
        409: ConflictError,
        410: GoneError,
        422: UnprocessibleEntityError,
        429: TooManyRequestsError,
        500: InternalServerError,
        503: ServiceUnavailableError,
        504: ServerTimeoutError,
    }.get(e.status, DynamicApiError)(e, tb)

class DynamicApiError(ApiException):
    """ Generic API Error for the dynamic client """
    def __init__(self, e, tb=None):
        self.status = e.status
        self.reason = e.reason
        self.body = e.body
        self.headers = e.headers
        self.original_traceback = tb

    def __str__(self):
        error_message = [str(self.status), "Reason: {}".format(self.reason)]
        if self.headers:
            error_message.append("HTTP response headers: {}".format(self.headers))

        if self.body:
            error_message.append("HTTP response body: {}".format(self.body))

        if self.original_traceback:
            error_message.append("Original traceback: \n{}".format(self.original_traceback))

        return '\n'.join(error_message)

    def summary(self):
        if self.body:
            if self.headers and self.headers.get('Content-Type') == 'application/json':
                message = json.loads(self.body).get('message')
                if message:
                    return message

            return self.body
        else:
            return "{} Reason: {}".format(self.status, self.reason)

class ResourceNotFoundError(Exception):
    """ Resource was not found in available APIs """
class ResourceNotUniqueError(Exception):
    """ Parameters given matched multiple API resources """

class KubernetesValidateMissing(Exception):
    """ kubernetes-validate is not installed """

# HTTP Errors
class BadRequestError(DynamicApiError):
    """ 400: StatusBadRequest """
class UnauthorizedError(DynamicApiError):
    """ 401: StatusUnauthorized """
class ForbiddenError(DynamicApiError):
    """ 403: StatusForbidden """
class NotFoundError(DynamicApiError):
    """ 404: StatusNotFound """
class MethodNotAllowedError(DynamicApiError):
    """ 405: StatusMethodNotAllowed """
class ConflictError(DynamicApiError):
    """ 409: StatusConflict """
class GoneError(DynamicApiError):
    """ 410: StatusGone """
class UnprocessibleEntityError(DynamicApiError):
    """ 422: StatusUnprocessibleEntity """
class TooManyRequestsError(DynamicApiError):
    """ 429: StatusTooManyRequests """
class InternalServerError(DynamicApiError):
    """ 500: StatusInternalServer """
class ServiceUnavailableError(DynamicApiError):
    """ 503: StatusServiceUnavailable """
class ServerTimeoutError(DynamicApiError):
    """ 504: StatusServerTimeout """


text:
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Extensions.Logging;
using Umbraco.Cms.Core.IO;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.PropertyEditors;
using Umbraco.Cms.Core.Serialization;
using Umbraco.Cms.Infrastructure.Migrations.PostMigrations;
using Umbraco.Cms.Infrastructure.Persistence.Dtos;
using Umbraco.Extensions;

namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0
{
    public class RadioAndCheckboxPropertyEditorsMigration : PropertyEditorsMigrationBase
    {
        private readonly IIOHelper _ioHelper;
        private readonly IConfigurationEditorJsonSerializer _configurationEditorJsonSerializer;

        public RadioAndCheckboxPropertyEditorsMigration(
            IMigrationContext context,
            IIOHelper ioHelper,
            IConfigurationEditorJsonSerializer configurationEditorJsonSerializer)
            : base(context)
        {
            _ioHelper = ioHelper;
            _configurationEditorJsonSerializer = configurationEditorJsonSerializer;
        }

        protected override void Migrate()
        {
            var refreshCache = false;

            refreshCache |= Migrate(GetDataTypes(Cms.Core.Constants.PropertyEditors.Aliases.RadioButtonList), false);
            refreshCache |= Migrate(GetDataTypes(Cms.Core.Constants.PropertyEditors.Aliases.CheckBoxList), true);

            // if some data types have been updated directly in the database (editing DataTypeDto and/or PropertyDataDto),
            // bypassing the services, then we need to rebuild the cache entirely, including the umbracoContentNu table
            if (refreshCache)
                Context.AddPostMigration<RebuildPublishedSnapshot>();
        }

        private bool Migrate(IEnumerable<DataTypeDto> dataTypes, bool isMultiple)
        {
            var refreshCache = false;
            ConfigurationEditor configurationEditor = null;

            foreach (var dataType in dataTypes)
            {
                ValueListConfiguration config;

                if (dataType.Configuration.IsNullOrWhiteSpace())
                    continue;

                // parse configuration, and update everything accordingly
                if (configurationEditor == null)
                    configurationEditor = new ValueListConfigurationEditor(_ioHelper);
                try
                {
                    config = (ValueListConfiguration) configurationEditor.FromDatabase(dataType.Configuration, _configurationEditorJsonSerializer);
                }
                catch (Exception ex)
                {
                    Logger.LogError(
                        ex, "Invalid configuration: \"{Configuration}\", cannot convert editor.",
                        dataType.Configuration);

                    continue;
                }

                // get property data dtos
                var propertyDataDtos = Database.Fetch<PropertyDataDto>(Sql()
                    .Select<PropertyDataDto>()
                    .From<PropertyDataDto>()
                    .InnerJoin<PropertyTypeDto>().On<PropertyTypeDto, PropertyDataDto>((pt, pd) => pt.Id == pd.PropertyTypeId)
                    .InnerJoin<DataTypeDto>().On<DataTypeDto, PropertyTypeDto>((dt, pt) => dt.NodeId == pt.DataTypeId)
                    .Where<PropertyTypeDto>(x => x.DataTypeId == dataType.NodeId));

                // update dtos
                var updatedDtos = propertyDataDtos.Where(x => UpdatePropertyDataDto(x, config, isMultiple));

                // persist changes
                foreach (var propertyDataDto in updatedDtos)
                    Database.Update(propertyDataDto);

                UpdateDataType(dataType);
                refreshCache = true;
            }

            return refreshCache;
        }

        private void UpdateDataType(DataTypeDto dataType)
        {
            dataType.DbType = ValueStorageType.Nvarchar.ToString();
            Database.Update(dataType);
        }
    }
}


text:
package models

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"context"

	"github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
)

// TimezoneCluster Provides the cluster-wide time zone information that localizes time found on messages displayed on each node's:
// * console messages;
// * logging to internal ONTAP log files; and
// * localized REST API full ISO-8601 date, time, and time zone format information.
// Machine-to-machine interfaces, such as file access protocols (NFS, CIFS), block access protocols (SAN), and other protocols
// such as Manage ONTAP (ONTAPI), use second or subsecond time values that are based on world time or UTC.
//
// swagger:model timezone_cluster
type TimezoneCluster struct {

	// The ONTAP time zone name or identification in either IANA time zone format "Area/Location", or an ONTAP traditional time zone.
	// </br>
	// The initial first node in cluster setting for time zone is "Etc/UTC".
	// "Etc/UTC" is the IANA timezone "Area/Location" specifier for
	// Coordinated Universal Time (UTC), which is an offset of 0.
	// ### IANA time zone format
	// The IANA time zone, formatted as "Area/Location", is based on geographic areas that have had the same time zone offset for many years.
	// </br>
	// "Location" represents a compound name using additional forward slashes.
	// </br>
	// An example of the "Area/Location" time zone is "America/New_York" and represents most of the United States Eastern Time Zone.
	// Examples of "Area/Location" with "Location" as a compound name are "America/Argentina/Buenos_Aires" and "America/Indiana/Indianapolis".
	// ### ONTAP traditional time zone
	// Examples of the traditional time zones are "EST5EDT" for the United States Eastern Time Zone and "CET" for Central European Time Zone.
	//
	// Example: America/New_York
	Name string `json:"name,omitempty"`
}

// Validate validates this timezone cluster
func (m *TimezoneCluster) Validate(formats strfmt.Registry) error {
	return nil
}

// ContextValidate validates this timezone cluster based on context it is used
func (m *TimezoneCluster) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

// MarshalBinary interface implementation
func (m *TimezoneCluster) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *TimezoneCluster) UnmarshalBinary(b []byte) error {
	var res TimezoneCluster
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}


text:
<jxb:bindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  version="2.0">
  <jxb:bindings
    node="/xsd:schema"
    schemaLocation="http://sashimi.sourceforge.net/schema_revision/mzXML_3.2/general_types_1.0.xsd">

    <jxb:bindings node="//xsd:complexType[@name='namevalueType']">
      <jxb:bindings node=".//xsd:attribute[@name='value']">
        <jxb:property name="value_namevalueType"/>
      </jxb:bindings>
    </jxb:bindings>

    <jxb:bindings node="//xsd:complexType[@name='ontologyEntryType']">
      <jxb:bindings node=".//xsd:attribute[@name='value']">
        <jxb:property name="value_ontologyEntryType"/>
      </jxb:bindings>
    </jxb:bindings>
  </jxb:bindings>
</jxb:bindings>


text:
package org.assertj.db.display;

import org.assertj.db.type.Request;
import org.assertj.db.type.Row;
import org.assertj.db.type.Value;

/**
 * Display methods for a value in a {@link Row} of a {@link Request}.
 *
 * @author Régis Pouiller
 *
 */
public class RequestRowValueDisplay
        extends
        AbstractRowValueDisplay<Request, RequestDisplay, RequestColumnDisplay, RequestColumnValueDisplay, RequestRowDisplay, RequestRowValueDisplay> {

  /**
   * Constructor.
   *
   * @param origin The assertion of {@link org.assertj.db.navigation.origin.Origin}.
   * @param value  The value to assert.
   */
  public RequestRowValueDisplay(RequestRowDisplay origin, Value value) {
    super(RequestRowValueDisplay.class, origin, value);
  }
}


text:
#region License
// Copyright (c) Amos Voron. All rights reserved.
// Licensed under the Apache 2.0 License. See LICENSE in the project root for license information.
#endregion

namespace QueryTalk.Wall
{
    /// <summary>
    /// This class is not intended for public use.
    /// </summary>
    public class ParamChainer : EndChainer
    {
        private string _paramName;

        internal override string Method
        {
            get
            {
                return Text.Method.Param;
            }
        }

        internal Variable Param { get; set; }

        internal ParamChainer(Chainer prev, string paramName, DT dt)
            : base(prev)
        {
            _paramName = paramName;

            if (dt.IsScalar() || dt.HasAtSign())
            {
                CheckParamAndThrow();
            }
        }

        private void CheckParamAndThrow()
        {
            CheckNullAndThrow(Arg(() => _paramName, _paramName));

            var check = Variable.TryValidateName(_paramName, out chainException);
            TryThrow();

            if (!check)
            {
                Throw(QueryTalkExceptionType.InvalidVariableName, ArgVal(() => _paramName, _paramName));
            }
        }
    }
}


text:
import datetime

from flask import render_template, redirect, url_for, g, request, flash
from flask_login import login_required
from flask_babel import gettext

from . import flicket_bp
from application import app, db
from application.flicket.forms.flicket_forms import ReplyForm, SubscribeUser
from application.flicket.models.flicket_models import FlicketTicket
from application.flicket.models.flicket_models import FlicketStatus
from application.flicket.models.flicket_models import FlicketPriority
from application.flicket.models.flicket_models import FlicketPost
from application.flicket.models.flicket_models import FlicketSubscription
from application.flicket.models.flicket_user import FlicketUser
from application.flicket.scripts.flicket_functions import add_action
from application.flicket.scripts.flicket_functions import block_quoter
from application.flicket.scripts.flicket_upload import UploadAttachment
from application.flicket.scripts.email import FlicketMail
from application.flicket.scripts.subscriptions import subscribe_user

# view ticket details
@flicket_bp.route(app.config['FLICKET'] + 'ticket_view/<ticket_id>/', methods=['GET', 'POST'])
@flicket_bp.route(app.config['FLICKET'] + 'ticket_view/<ticket_id>/<int:page>/', methods=['GET', 'POST'])
@login_required
def ticket_view(ticket_id, page=1):
    # todo: make sure underscores aren't allowed in usernames as it breaks markdown?

    # is ticket number legitimate
    ticket = FlicketTicket.query.filter_by(id=ticket_id).first()

    if not ticket:
        flash(gettext('Cannot find ticket: "%(value)s"', value=ticket_id), category='warning')
        return redirect(url_for('flicket_bp.tickets'))

    # find all replies to ticket.
    replies = FlicketPost.query.filter_by(ticket_id=ticket_id).order_by(FlicketPost.date_added.asc())

    # get reply id's
    post_id = request.args.get('post_id')
    ticket_rid = request.args.get('ticket_rid')

    form = ReplyForm()
    subscribers_form = SubscribeUser()

    # add subscribed user
    if subscribers_form.sub_user.data and subscribers_form.validate_on_submit():
        user = FlicketUser.query.filter_by(username=subscribers_form.username.data).first()
        if user:
            if subscribe_user(ticket, user):
                flash(gettext('User subscribed.'), category='success')
            else:
                flash(gettext('User already subscribed.'), category="warning")
        else:
            flash(gettext('Invalid username.'), category='warning')
        return redirect(url_for('flicket_bp.ticket_view', ticket_id=ticket_id))

    # add reply post
    if (form.submit.data or form.submit_close.data) and form.validate_on_submit():
        # upload file if user has selected one and the file is in accepted list of
        files = request.files.getlist("file")
        upload_attachments = UploadAttachment(files)
        if upload_attachments.are_attachments():
            upload_attachments.upload_files()

        new_reply = FlicketPost(
            ticket=ticket,
            user=g.user,
            date_added=datetime.datetime.now(),
            content=form.content.data,
            hours=form.hours.data,
        )

        if ticket.status_id != form.status.data:
            status = FlicketStatus.query.get(form.status.data)
            ticket.current_status = status
            add_action(ticket, 'status', data={'status_id': status.id, 'status': status.status})

        if ticket.ticket_priority_id != form.priority.data:
            priority = FlicketPriority.query.get(form.priority.data)
            ticket.ticket_priority = priority
            add_action(ticket, 'priority', data={'priority_id': priority.id, 'priority': priority.priority})

        db.session.add(new_reply)

        # add files to database.
        upload_attachments.populate_db(new_reply)

        # change ticket status to open if closed.
        if ticket.current_status.status.lower() == 'closed':
            ticket_open = FlicketStatus.query.filter_by(status='Open').first()
            ticket.current_status = ticket_open

        # subscribe to the ticket
        if not ticket.is_subscribed(g.user):
            subscribe = FlicketSubscription(
                ticket=ticket,
                user=g.user
            )
            db.session.add(subscribe)

        # add count of 1 to users total posts.
        g.user.total_posts += 1

        print('updating updating')
        ticket.last_updated = datetime.datetime.now()

        db.session.commit()

        # send email notification
        mail = FlicketMail()
        mail.reply_ticket(ticket=ticket, reply=new_reply, user=g.user)

        flash(gettext('You have replied to ticket %(value_1)s: %(value_2)s.', value_1=ticket.id_zfill,
                      value_2=ticket.title), category="success")

        # if the reply has been submitted for closure.
        if form.submit_close.data:
            return redirect(url_for('flicket_bp.change_status', ticket_id=ticket.id, status='Closed'))

        return redirect(url_for('flicket_bp.ticket_view', ticket_id=ticket_id))

    # get post id and populate contents for auto quoting
    if post_id:
        query = FlicketPost.query.filter_by(id=post_id).first()
        reply_contents = gettext("%(value_1)s wrote on %(value_2)s\r\n\r\n%(value_3)s",
                                 value_1=query.user.name,
                                 value_2=query.date_added,
                                 value_3=query.content)
        form.content.data = block_quoter(reply_contents)

    if ticket_rid:
        reply_contents = gettext("%(value_1)s wrote on %(value_2)s\r\n\r\n%(value_3)s",
                                 value_1=ticket.user.name,
                                 value_2=ticket.date_added,
                                 value_3=ticket.content)
        form.content.data = block_quoter(reply_contents)

    replies = replies.paginate(page, app.config['posts_per_page'])

    form.status.data = ticket.status_id
    form.priority.data = ticket.ticket_priority_id

    title = f"Ticket #{ticket.id_zfill} {ticket.title}"

    # display or not category change link
    change_category = app.config['change_category']
    if change_category and app.config['change_category_only_admin_or_super_user']:
        if not g.user.is_admin and not g.user.is_super_user:
            change_category = False

    return render_template('flicket_view.html',
                           title=title,
                           ticket=ticket,
                           form=form,
                           subscribers_form=subscribers_form,
                           replies=replies,
                           change_category=change_category,
                           page=page)


text:
var Jane = function (base) {
    var Jane = Object.create (base).init ({ "name" : "Jane" });
    Jane.isJane = "isJane";

    Jane.monitor = Object.create (EventSubscriber).init ({ "name" : "Jane.monitor" });
    Jane.monitor.receiveEvent = function (source, event, parameter) {
        DEBUGLOG(this.name + " receives " + event + " from " + source.name);
        // Jane is merely letting an outside client know that something happened.
        // No parameters are passed along.
        Jane.postEvent (event, null);
    };

    Jane.constants = {
        D_STRING(PK)
    };

    Jane.events = {
        D_STRING(DATA_REFERENCE_ADDED),
        D_STRING(DATA_REFERENCE_SELECTED),
        D_STRING(DATA_REFERENCE_REMOVED),

        D_STRING(DATA_POPULATING),
        D_STRING(DATA_POPULATED),
        D_STRING(DATA_FLUSHED),
        D_STRING(DATA_CHANGED),
        D_STRING(HIGHLIGHT_CHANGED)
    };

    Jane.dataRefs = {
        index : {},
        root  : null,
        depth : 0,

        addNode : function (name, dataRef) {
            DEBUGLOG("node - " + name);
            var parent = ((dataRef != null) && ("source" in dataRef) && (dataRef.source.name in this.index)) ? this.index[dataRef.source.name] : this.root;
            var depth = (parent != null) ? parent.depth + 1 : 0;
            this.depth = Math.max (depth, this.depth);
            var node = {
                "name"          : name,
                "depth"         : depth,
                "children"      : [],
                "parent"        : parent,
                "dataRef"       : dataRef
            };
            this.index[name] = node;
            if (parent != null) {
                parent.children.push (node);
            }
            return node;
        },

        removeNode: function (node) {
            // recursive function to remove the node starting with all its children
            while (node.children.count > 0) {
                var child = node.children[0];
                this.removeNode (child);
            }

            // remove this node from it's parent's list
            if (node.parent != null) {
                var index = node.parent.children.indexOf (node);
                if (index >= 0) {
                    node.parent.children.splice (index, 1);
                }

                // let go of the parent
                node.parent = null;
            }

            // remove this node from the index
            delete this.index[node.name];
        }
    };
    Jane.dataRefs.root = Jane.dataRefs.addNode ("Jane", null);

    Jane.addDataReference = function (dataRef) {
        if (! (dataRef.name in this.dataRefs.index)) {
            this.dataRefs.addNode (dataRef.name, dataRef);
            dataRef.addSubscriberReadOnly(this.monitor);
            this.postEvent (Jane.events.DATA_REFERENCE_ADDED, dataRef);
            return dataRef;
        }
        return null;
    };

    Jane.removeDataReference = function (dataRef) {
        // remove the requested node, and any children as well
        if (dataRef.name in this.dataRefs.index) {
            var node = this.dataRefs.index[dataRef.name];
            // flush this data source
            node.dataRef.flush ();

            Jane.dataRefs.removeNode (node);
            this.postEvent (Jane.events.DATA_REFERENCE_REMOVED, dataRef);
        }
    };

    Jane.reset = function () {
        // remove all the children of the root
        while (this.dataRefs.root.children.length > 0) {
            this.removeDataReference (this.dataRefs.root.children[0].dataRef);
            this.dataRefs.depth = 0;
        }
    };

    Jane.getDataReference = function (name) {
        if (name in this.dataRefs.index) {
            return this.dataRefs.index[name].dataRef;
        }
        return null;
    };

    Jane.onJane = function () {
        // do nothing, but this is here as a placeholder in case a naive
        // user copies code from a widget that acts like this
        DEBUGLOG("ALERT - Use jane-client.js instead");
    };

    Jane.EventSource = EventSource;
    Jane.EventSubscriber = EventSubscriber;

    window.top.Jane = Jane;
    return Jane;
} (EventSource);


text:
package org.eigenbase.sql.fun;

import org.eigenbase.sql.*;
import org.eigenbase.sql.validate.*;

/**
 * SqlNewOperator represents an SQL new specification such as
 * NEW UDT(1, 2). When used in an SqlCall, SqlNewOperator takes a
 * single operand, which is an invocation of the constructor method; but when
 * used in a RexCall, the operands are the initial values to be used for the new
 * instance.
 *
 * @author John V. Sichi
 * @version $Id$
 */
public class SqlNewOperator
    extends SqlPrefixOperator
{
    //~ Constructors -----------------------------------------------------------

    public SqlNewOperator()
    {
        super("NEW", SqlKind.NEW_SPECIFICATION, 0, null, null, null);
    }

    //~ Methods ----------------------------------------------------------------

    // override SqlOperator
    public SqlNode rewriteCall(SqlValidator validator, SqlCall call)
    {
        // New specification is purely syntactic, so we rewrite it as a
        // direct call to the constructor method.
        return call.getOperands()[0];
    }

    // override SqlOperator
    public boolean requiresDecimalExpansion()
    {
        return false;
    }
}

// End SqlNewOperator.java


text:
using QuickGraph;
using System;
using System.Collections.Generic;
using System.Linq;
using GraphX.PCL.Logic.Models;

namespace SimpleGraph
{
    /// <summary>
    /// Logics core object which contains all algorithms and logic settings
    /// </summary>
    public class GXLogicCoreExample : GXLogicCore<DataVertex, DataEdge, BidirectionalGraph<DataVertex, DataEdge>> { }
}


text:
package ros

import (
	"fmt"
	"net/http"

	"github.com/denverdino/aliyungo/common"
	"github.com/denverdino/aliyungo/util"
)

//https://help.aliyun.com/document_detail/28916.html?spm=5176.doc49066.6.588.d7Ntjs
type Resource struct {
	Id           string
	Name         string
	Type         string
	Status       string
	StatusReason string
	Updated      string
	PhysicalId   string
}

func (client *Client) DescribeResources(stackId, stackName string) ([]*Resource, error) {
	response := make([]*Resource, 0)
	err := client.Invoke("", http.MethodGet, fmt.Sprintf("/stacks/%s/%s/resources", stackName, stackId), nil, nil, &response)
	if err != nil {
		return nil, err
	}

	return response, nil
}

//https://help.aliyun.com/document_detail/28917.html?spm=5176.doc28916.6.589.BUPJqx
func (client *Client) DescribeResource(stackId, stackName, resourceName string) (*Resource, error) {
	response := &Resource{}
	err := client.Invoke("", http.MethodGet, fmt.Sprintf("/stacks/%s/%s/resources/%s", stackName, stackId, resourceName), nil, nil, &response)
	if err != nil {
		return nil, err
	}

	return response, nil
}

//https://help.aliyun.com/document_detail/28918.html?spm=5176.doc28917.6.590.smknll
type SupportStatus string

const (
	SUPPORT_STATUS_UNKNOWN     = "UNKNOWN"
	SUPPORT_STATUS_SUPPORTED   = "SUPPORTED"
	SUPPORT_STATUS_DEPRECATED  = "DEPRECATED"
	SUPPORT_STATUS_UNSUPPORTED = "UNSUPPORTED"
	SUPPORT_STATUS_HIDDEN      = "HIDDEN"
)

type DescribeResoureTypesRequest struct {
	SupportStatus SupportStatus
}

type DescribeResoureTypesResponse struct {
	common.Response
	ResourceTypes []string
}

func (client *Client) DescribeResoureTypes(supportStatus SupportStatus) (*DescribeResoureTypesResponse, error) {
	query := util.ConvertToQueryValues(&DescribeResoureTypesRequest{
		SupportStatus: supportStatus,
	})

	response := &DescribeResoureTypesResponse{}
	err := client.Invoke("", http.MethodGet, "/resource_types", query, nil, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}

//https://help.aliyun.com/document_detail/28919.html?spm=5176.doc28918.6.591.7QkDYC
type DescribeResoureTypeResponse struct {
	common.Response
	ResourceType  string
	Attributes    interface{}
	SupportStatus interface{}
	Properties    interface{}
}

func (client *Client) DescribeResoureType(typeName string) (*DescribeResoureTypeResponse, error) {
	response := &DescribeResoureTypeResponse{}
	err := client.Invoke("", http.MethodGet, fmt.Sprintf("/resource_types/%s", typeName), nil, nil, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}

//https://help.aliyun.com/document_detail/28920.html?spm=5176.doc28919.6.592.IiEwar
type DescribeResoureTypeTemplateResponse struct {
	common.Response
	ROSTemplateFormatVersion string
	Parameters               interface{}
	Outputs                  interface{}
	Resources                interface{}
}

func (client *Client) DescribeResoureTypeTemplate(typeName string) (*DescribeResoureTypeTemplateResponse, error) {
	response := &DescribeResoureTypeTemplateResponse{}
	err := client.Invoke("", http.MethodGet, fmt.Sprintf("/resource_types/%s/template", typeName), nil, nil, response)
	if err != nil {
		return nil, err
	}

	return response, nil
}


text:
#include "config.h"
#include "public/web/WebDocument.h"

#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/V8ElementRegistrationOptions.h"
#include "core/css/StyleSheetContents.h"
#include "core/dom/CSSSelectorWatch.h"
#include "core/dom/Document.h"
#include "core/dom/DocumentType.h"
#include "core/dom/Element.h"
#include "core/dom/Fullscreen.h"
#include "core/dom/StyleEngine.h"
#include "core/events/Event.h"
#include "core/html/HTMLAllCollection.h"
#include "core/html/HTMLBodyElement.h"
#include "core/html/HTMLCollection.h"
#include "core/html/HTMLElement.h"
#include "core/html/HTMLFormElement.h"
#include "core/html/HTMLHeadElement.h"
#include "core/html/HTMLLinkElement.h"
#include "core/layout/LayoutObject.h"
#include "core/loader/DocumentLoader.h"
#include "core/rendering/RenderView.h"
#include "modules/accessibility/AXObject.h"
#include "modules/accessibility/AXObjectCacheImpl.h"
#include "platform/weborigin/SecurityOrigin.h"
#include "public/platform/WebURL.h"
#include "public/web/WebAXObject.h"
#include "public/web/WebDOMEvent.h"
#include "public/web/WebDocumentType.h"
#include "public/web/WebElement.h"
#include "public/web/WebElementCollection.h"
#include "public/web/WebFormElement.h"
#include "public/web/WebNodeList.h"
#include "web/WebLocalFrameImpl.h"
#include "wtf/PassRefPtr.h"
#include <v8.h>

namespace blink {

WebURL WebDocument::url() const
{
    return constUnwrap<Document>()->url();
}

WebSecurityOrigin WebDocument::securityOrigin() const
{
    if (!constUnwrap<Document>())
        return WebSecurityOrigin();
    return WebSecurityOrigin(constUnwrap<Document>()->securityOrigin());
}

WebString WebDocument::encoding() const
{
    return constUnwrap<Document>()->encodingName();
}

WebString WebDocument::contentLanguage() const
{
    return constUnwrap<Document>()->contentLanguage();
}

WebString WebDocument::referrer() const
{
    return constUnwrap<Document>()->referrer();
}

WebColor WebDocument::themeColor() const
{
    return constUnwrap<Document>()->themeColor().rgb();
}

WebURL WebDocument::openSearchDescriptionURL() const
{
    return const_cast<Document*>(constUnwrap<Document>())->openSearchDescriptionURL();
}

WebLocalFrame* WebDocument::frame() const
{
    return WebLocalFrameImpl::fromFrame(constUnwrap<Document>()->frame());
}

bool WebDocument::isHTMLDocument() const
{
    return constUnwrap<Document>()->isHTMLDocument();
}

bool WebDocument::isXHTMLDocument() const
{
    return constUnwrap<Document>()->isXHTMLDocument();
}

bool WebDocument::isPluginDocument() const
{
    return constUnwrap<Document>()->isPluginDocument();
}

WebURL WebDocument::baseURL() const
{
    return constUnwrap<Document>()->baseURL();
}

WebURL WebDocument::firstPartyForCookies() const
{
    return constUnwrap<Document>()->firstPartyForCookies();
}

WebElement WebDocument::documentElement() const
{
    return WebElement(constUnwrap<Document>()->documentElement());
}

WebElement WebDocument::body() const
{
    return WebElement(constUnwrap<Document>()->body());
}

WebElement WebDocument::head()
{
    return WebElement(unwrap<Document>()->head());
}

WebString WebDocument::title() const
{
    return WebString(constUnwrap<Document>()->title());
}

WebElementCollection WebDocument::all()
{
    return WebElementCollection(unwrap<Document>()->all());
}

void WebDocument::images(WebVector<WebElement>& results)
{
    RefPtrWillBeRawPtr<HTMLCollection> images = unwrap<Document>()->images();
    size_t sourceLength = images->length();
    Vector<WebElement> temp;
    temp.reserveCapacity(sourceLength);
    for (size_t i = 0; i < sourceLength; ++i) {
        Element* element = images->item(i);
        if (element && element->isHTMLElement())
            temp.append(WebElement(element));
    }
    results.assign(temp);
}

void WebDocument::forms(WebVector<WebFormElement>& results) const
{
    RefPtrWillBeRawPtr<HTMLCollection> forms = const_cast<Document*>(constUnwrap<Document>())->forms();
    size_t sourceLength = forms->length();
    Vector<WebFormElement> temp;
    temp.reserveCapacity(sourceLength);
    for (size_t i = 0; i < sourceLength; ++i) {
        Element* element = forms->item(i);
        // Strange but true, sometimes node can be 0.
        if (element && element->isHTMLElement())
            temp.append(WebFormElement(toHTMLFormElement(element)));
    }
    results.assign(temp);
}

WebURL WebDocument::completeURL(const WebString& partialURL) const
{
    return constUnwrap<Document>()->completeURL(partialURL);
}

WebElement WebDocument::getElementById(const WebString& id) const
{
    return WebElement(constUnwrap<Document>()->getElementById(id));
}

WebElement WebDocument::focusedElement() const
{
    return WebElement(constUnwrap<Document>()->focusedElement());
}

WebDocumentType WebDocument::doctype() const
{
    return WebDocumentType(constUnwrap<Document>()->doctype());
}

void WebDocument::insertStyleSheet(const WebString& sourceCode)
{
    RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
    ASSERT(document);
    RefPtrWillBeRawPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(CSSParserContext(*document, 0));
    parsedSheet->parseString(sourceCode);
    document->styleEngine()->addAuthorSheet(parsedSheet);
}

void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors)
{
    RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
    Vector<String> selectors;
    selectors.append(webSelectors.data(), webSelectors.size());
    CSSSelectorWatch::from(*document).watchCSSSelectors(selectors);
}

void WebDocument::cancelFullScreen()
{
    Fullscreen::fullyExitFullscreen(*unwrap<Document>());
}

WebElement WebDocument::fullScreenElement() const
{
    Element* fullScreenElement = 0;
    if (Fullscreen* fullscreen = Fullscreen::fromIfExists(*const_cast<WebDocument*>(this)->unwrap<Document>()))
        fullScreenElement = fullscreen->webkitCurrentFullScreenElement();
    return WebElement(fullScreenElement);
}

WebDOMEvent WebDocument::createEvent(const WebString& eventType)
{
    TrackExceptionState exceptionState;
    WebDOMEvent event(unwrap<Document>()->createEvent(eventType, exceptionState));
    if (exceptionState.hadException())
        return WebDOMEvent();
    return event;
}

WebReferrerPolicy WebDocument::referrerPolicy() const
{
    return static_cast<WebReferrerPolicy>(constUnwrap<Document>()->referrerPolicy());
}

WebElement WebDocument::createElement(const WebString& tagName)
{
    TrackExceptionState exceptionState;
    WebElement element(unwrap<Document>()->createElement(tagName, exceptionState));
    if (exceptionState.hadException())
        return WebElement();
    return element;
}

WebSize WebDocument::scrollOffset() const
{
    if (FrameView* view = constUnwrap<Document>()->view())
        return view->scrollOffset();
    return WebSize();
}

WebSize WebDocument::minimumScrollOffset() const
{
    if (FrameView* view = constUnwrap<Document>()->view())
        return toIntSize(view->minimumScrollPosition());
    return WebSize();
}

WebSize WebDocument::maximumScrollOffset() const
{
    if (FrameView* view = constUnwrap<Document>()->view())
        return toIntSize(view->maximumScrollPosition());
    return WebSize();
}

void WebDocument::setIsTransitionDocument(bool isTransitionDocument)
{
    // When isTransitionDocument is true, it ensures the transition UA
    // stylesheet gets applied. When isTransitionDocument is false, it ensures
    // the transition UA stylesheet is not applied when reverting the transition.
    unwrap<Document>()->setIsTransitionDocument(isTransitionDocument);
}

void WebDocument::beginExitTransition(const WebString& cssSelector, bool exitToNativeApp)
{
    RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
    if (!exitToNativeApp)
        document->hideTransitionElements(cssSelector);
    document->styleEngine()->setExitTransitionStylesheetsEnabled(true);
}

void WebDocument::revertExitTransition()
{
    RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
    document->styleEngine()->setExitTransitionStylesheetsEnabled(false);
}

void WebDocument::hideTransitionElements(const WebString& cssSelector)
{
    RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
    document->hideTransitionElements(cssSelector);
}

void WebDocument::showTransitionElements(const WebString& cssSelector)
{
    RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
    document->showTransitionElements(cssSelector);
}

WebAXObject WebDocument::accessibilityObject() const
{
    const Document* document = constUnwrap<Document>();
    AXObjectCacheImpl* cache = toAXObjectCacheImpl(document->axObjectCache());
    return cache ? WebAXObject(cache->getOrCreate(document->renderView())) : WebAXObject();
}

WebAXObject WebDocument::accessibilityObjectFromID(int axID) const
{
    const Document* document = constUnwrap<Document>();
    AXObjectCacheImpl* cache = toAXObjectCacheImpl(document->axObjectCache());
    return cache ? WebAXObject(cache->objectFromAXID(axID)) : WebAXObject();
}

WebVector<WebDraggableRegion> WebDocument::draggableRegions() const
{
    WebVector<WebDraggableRegion> draggableRegions;
    const Document* document = constUnwrap<Document>();
    if (document->hasAnnotatedRegions()) {
        const Vector<AnnotatedRegionValue>& regions = document->annotatedRegions();
        draggableRegions = WebVector<WebDraggableRegion>(regions.size());
        for (size_t i = 0; i < regions.size(); i++) {
            const AnnotatedRegionValue& value = regions[i];
            draggableRegions[i].draggable = value.draggable;
            draggableRegions[i].bounds = IntRect(value.bounds);
        }
    }
    return draggableRegions;
}

v8::Handle<v8::Value> WebDocument::registerEmbedderCustomElement(const WebString& name, v8::Handle<v8::Value> options, WebExceptionCode& ec)
{
    v8::Isolate* isolate = v8::Isolate::GetCurrent();
    Document* document = unwrap<Document>();
    TrackExceptionState exceptionState;
    ElementRegistrationOptions registrationOptions;
    V8ElementRegistrationOptions::toImpl(isolate, options, registrationOptions, exceptionState);
    if (exceptionState.hadException())
        return v8::Handle<v8::Value>();
    ScriptValue constructor = document->registerElement(ScriptState::current(isolate), name, registrationOptions, exceptionState, CustomElement::EmbedderNames);
    ec = exceptionState.code();
    if (exceptionState.hadException())
        return v8::Handle<v8::Value>();
    return constructor.v8Value();
}

WebURL WebDocument::manifestURL() const
{
    const Document* document = constUnwrap<Document>();
    HTMLLinkElement* linkElement = document->linkManifest();
    if (!linkElement)
        return WebURL();
    return linkElement->href();
}

WebDocument::WebDocument(const PassRefPtrWillBeRawPtr<Document>& elem)
    : WebNode(elem)
{
}

WebDocument& WebDocument::operator=(const PassRefPtrWillBeRawPtr<Document>& elem)
{
    m_private = elem;
    return *this;
}

WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const
{
    return toDocument(m_private.get());
}

} // namespace blink


text:
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_BUTTON_PRESS_REQUEST_H_
#define SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_BUTTON_PRESS_REQUEST_H_

#include "rc_rpc_plugin/commands/rc_command_request.h"

namespace rc_rpc_plugin {
namespace app_mngr = application_manager;

namespace commands {
class ButtonPressRequest : public RCCommandRequest {
 public:
  ButtonPressRequest(
      const application_manager::commands::MessageSharedPtr& message,
      const RCCommandParams& params);

  /**
   * @brief Execute command
   * send HMI request if message contains appropriate
   * button name and module type
   * otherwise sends negative sesponse to mobile
   */
  void Execute() FINAL;

  /**
   * @brief AcquireResource Tries to acquire specific resource
   * @param message Incoming message containg the resource name
   * @return Acquire result
   */
  AcquireResult::eType AcquireResource(
      const app_mngr::commands::MessageSharedPtr& message) FINAL;

  /**
   * @brief IsResourceFree check resource state
   * @param module_type Resource name
   * @param module_id Resource id
   * @return True if free, otherwise - false
   */
  bool IsResourceFree(const std::string& module_type,
                      const std::string& module_id) const FINAL;

  /**
   * @brief SetResourceState changes state of resource
   * @param state State to set for resource
   */
  void SetResourceState(const std::string& module_type,
                        const ResourceState::eType state) FINAL;

  /**
   * @brief Interface method that is called whenever new event received
   *
   * @param event The received event
   */
  void on_event(const app_mngr::event_engine::Event& event) FINAL;

  std::string ModuleType() const FINAL;

  std::string ModuleId() const FINAL;

  /**
   * @brief ButtonPressRequest class destructor
   */
  ~ButtonPressRequest();

 private:
  const mobile_apis::ButtonName::eType GetButtonId() const;
  std::string GetButtonName() const;
};

}  // namespace commands
}  // namespace rc_rpc_plugin

#endif  // SRC_COMPONENTS_APPLICATION_MANAGER_RPC_PLUGINS_RC_RPC_PLUGIN_INCLUDE_RC_RPC_PLUGIN_COMMANDS_MOBILE_BUTTON_PRESS_REQUEST_H_


text:
prodserver: collectstatic
	cd contentcuration/ && gunicorn contentcuration.wsgi:application --timeout=500 --error-logfile=/var/log/gunicorn-error.log --workers=3 --bind=0.0.0.0:8000 --pid=/tmp/contentcuration.pid --log-level=debug || sleep infinity

collectstatic:
	python contentcuration/manage.py collectstatic --noinput
	python contentcuration/manage.py collectstatic_js_reverse
	python contentcuration/manage.py loadconstants

migrate:
	python contentcuration/manage.py migrate

devserver:
	cd contentcuration && python manage.py runserver --settings=contentcuration.dev_settings 0.0.0.0:8000

vagrantdevserver:
	echo "Server to run on 192.168.31.9:8000"
	vagrant ssh -c 'cd /vagrant/contentcuration;python manage.py runserver --settings=contentcuration.dev_settings 0.0.0.0:8000;cd -;'


text:
using System;
using System.Collections.Generic;
using System.Drawing;
using Cirrious.MvvmCross.Binding.Touch.Views;
using Cirrious.MvvmCross.Dialog.Touch;
using Cirrious.MvvmCross.Interfaces.ViewModels;
using Cirrious.MvvmCross.Touch.Interfaces;
using Cirrious.MvvmCross.Views;
using CrossUI.Touch.Dialog.Elements;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Xamarin.Media;
using WshLst.Core.Models;
using WshLst.Core.ViewModels;

namespace WshLst.MonoTouch
{
	public class BaseBindingTableViewController<TViewModel> : MvxBindingTouchTableViewController<TViewModel> where TViewModel : BaseViewModel
	{
		public BaseBindingTableViewController(MvxShowViewModelRequest request)	: base (request)
		{
		}

		LoadingHUDView _loadingView;

		public override void ViewDidAppear(bool animated)
		{
			base.ViewDidAppear(animated);
			ViewModel.PropertyChanged += handlePropertyChanged;
		}

		public override void ViewDidUnload()
		{
			ViewModel.PropertyChanged -= handlePropertyChanged;
			base.ViewDidUnload();
		}

		public virtual void HandlePropertyChanged(System.ComponentModel.PropertyChangedEventArgs e)
		{
		}

		void handlePropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
		{
			if (e.PropertyName.Equals("IsLoading"))
			{
				if (ViewModel.IsLoading && _loadingView == null)
				{
					InvokeOnMainThread(() =>
					{
						_loadingView = new LoadingHUDView("Loading...", "");
						View.AddSubview(_loadingView);
						_loadingView.StartAnimating();
					});
				}
				else if (!ViewModel.IsLoading && _loadingView != null)
				{
					InvokeOnMainThread(() =>
					{
						_loadingView.StopAnimating();
						_loadingView.RemoveFromSuperview();
						_loadingView = null;
					});
				}
			}

			HandlePropertyChanged(e);
		}
	}
}


text:
function unquote(e::Expr)
    @assert e.head == :quote
    return e.args[1]
end

function unquote(e::QuoteNode)
    return e.value
end

macro delegate(source::Expr, targets::Expr)
    typename = esc(source.args[1])
    fieldname = unquote(source.args[2])
    funcnames = targets.args
    n = length(funcnames)
    fdefs = Vector{Any}(undef, n)
    for i in 1:n
        funcname = esc(funcnames[i])
        fdefs[i] = quote
                     ($funcname)(a::($typename), args...) =
                       ($funcname)(a.$fieldname, args...)
                   end
    end
    return Expr(:block, fdefs...)
end

macro delegate_return_parent(source::Expr, targets::Expr)
    typename = esc(source.args[1])
    fieldname = unquote(source.args[2])
    funcnames = targets.args
    n = length(funcnames)
    fdefs = Vector{Any}(undef, n)
    for i in 1:n
        funcname = esc(funcnames[i])
        fdefs[i] = quote
                     ($funcname)(a::($typename), args...) =
                       (($funcname)(a.$fieldname, args...); a)
                   end
    end
    return Expr(:block, fdefs...)
end


text:
layout: post
title: Whatsapp introduced new Emojis on latest version
date: '2016-02-06T12:35:00.000+05:30'
author: pawneshwer
comments: true
categories:
- Whatsapp
description: news emojies in official whatsapp, latest version of whatsapp have more emojies. latest cool emojies in whatsapp official version. cool emojies whatsapp
keywords: whatsapp brand new emojies,whatsapp new smily,whatsapp new smiles
modified_time: '2016-02-20T06:50:41.005+05:30'
thumbnail: https://3.bp.blogspot.com/-AhYAIUEph84/VrWalOgCA1I/AAAAAAAAIOo/RTgRehbtmA8/s72-c/Screenshot_2016-02-06-12-22-21%2Bcopy.png
blogger_id: tag:blogger.com,1999:blog-1967791069058877982.post-7646636877682159511
blogger_orig_url: http://www.edablogs.com/2016/02/whatsapp-introduced-new-emojis.html
redirect_from:
- /2016/02/whatsapp-introduced-new-emojis.html
---

## New emojies in whatsapp and whatsapp web :

Good news for whatsapp users. [Whatsapp](http://whatsapp.com "WhatsApp") introduced more Emojies in latest version. Few days ago this version is only available on Whatsapp.com. But Now this version is officially available on playstore. So who haven't updated their whatsapp, update now to get latest emojis.

[![Whatsapp introduced new Emojis on latest version](https://3.bp.blogspot.com/-AhYAIUEph84/VrWalOgCA1I/AAAAAAAAIOo/RTgRehbtmA8/s320/Screenshot_2016-02-06-12-22-21%2Bcopy.png "Whatsapp introduced new Emojis on latest version")](https://3.bp.blogspot.com/-AhYAIUEph84/VrWalOgCA1I/AAAAAAAAIOo/RTgRehbtmA8/s1600/Screenshot_2016-02-06-12-22-21%2Bcopy.png)

These new emojies are available on whatsapp web from few months. But they are only visible on whatsapp web. In whatsapp only sqaure boxes are visible. So update whatsapp and enjoy more emojies. Means more fun.

But if your friends doesn't updated their whatsapp then they will not able to watch new emojies sent by you. So also tell your friends to update their whatsapp to latest version so they can also enjoy new cool emojies.

Whatsapp is becoming better day by day. few days ago whatsapp made it free for lifetime. And few days ago whatsapp increased [Whatsapp group member limit from 100 to 256.](http://www.edablogs.com/2016/02/now-256-members-are-allowed-in-whatsapp-group.html "Now 256 members are allowed in whatsapp group") And now they add some more new Emojies. which are cool.

So try and tell us whats more new in latest whatsapp. And last thing remaining in whatsapp, that is theme option. If whatsapp introduce theme option in whatsapp then whatsapp becode more coolest then ever. Maybe in latest update they will add theme option too.

So just wait. and for now update your whatsapp to get more emojies.