text:
        <li <?= $this->app->checkMenuSelection('TaskImportController', 'show') ?>>
            <?= $this->url->link(t('Tasks').' (CSV)', 'TaskImportController', 'show', array('project_id' => $project['id'])) ?>

        <?= $this->hook->render('template:task-import:sidebar') ?>

redpajama_set_name: RedPajamaGithub


text:
NS_BEGIN

/// <summary>
/// Handles dynamic memory allocation
/// </summary>
class Allocator
{
public:

private:

};

NS_END

#endif


text:
package iht.controllers.application.debts

import iht.config.AppConfig
import iht.connector.{CachingConnector, IhtConnector}
import iht.controllers.application.EstateController
import iht.forms.ApplicationForms._
import iht.models.application.ApplicationDetails
import iht.models.application.debts.{AllLiabilities, BasicEstateElementLiabilities}
import iht.utils.CommonHelper
import iht.views.html.application.debts.jointly_owned
import javax.inject.Inject
import play.api.mvc.MessagesControllerComponents
import uk.gov.hmrc.auth.core.AuthConnector
import uk.gov.hmrc.auth.core.retrieve.v2.Retrievals.{nino => ninoRetrieval}
import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendController

class JointlyOwnedDebtsControllerImpl @Inject()(val ihtConnector: IhtConnector,
                                                val cachingConnector: CachingConnector,
                                                val authConnector: AuthConnector,
                                                val jointlyOwnedView: jointly_owned,
implicit val appConfig: AppConfig,
val cc: MessagesControllerComponents) extends FrontendController(cc) with JointlyOwnedDebtsController {

}

trait JointlyOwnedDebtsController extends EstateController {

  val jointlyOwnedView: jointly_owned
  def onPageLoad = authorisedForIhtWithRetrievals(ninoRetrieval) { userNino =>
    implicit request =>
      estateElementOnPageLoad[BasicEstateElementLiabilities](jointlyOwnedDebts,
        jointlyOwnedView.apply, _.allLiabilities.flatMap(_.jointlyOwned), userNino)
  }

  def onSubmit = authorisedForIhtWithRetrievals(ninoRetrieval) { userNino =>
    implicit request => {
      val updateApplicationDetails: (ApplicationDetails, Option[String], BasicEstateElementLiabilities) =>
        (ApplicationDetails, Option[String]) =
        (appDetails, _, jointlyOwnedDebts) => {
          val updatedAD = appDetails.copy(allLiabilities = Some(appDetails.allLiabilities.fold
            (new AllLiabilities(jointlyOwned = Some(jointlyOwnedDebts)))

          (jointlyOwnedDebts.isOwned match {
            case Some(true) => _.copy(jointlyOwned = Some(jointlyOwnedDebts))
            case Some(false) => _.copy(jointlyOwned = Some(jointlyOwnedDebts.copy(value = None)))
            case None => throw new RuntimeException("Not able to retrieve the value of JointlyOwnedDebts question")
          })
          ))
          (updatedAD, None)
        }
      estateElementOnSubmit[BasicEstateElementLiabilities](
        jointlyOwnedDebts,
        jointlyOwnedView.apply,
        updateApplicationDetails,
        CommonHelper.addFragmentIdentifier(debtsRedirectLocation, Some(appConfig.DebtsOwedJointlyID)),
        userNino
      )
    }
  }
}


text:
require 'sqlite3'

db = SQLite3::Database.new 'va.sqlite3'
rows = db.execute('SELECT file_original_name, file_path from covers')

index = 0
rows.each do |row|
  Resource.create(designation: row[0], path: row[1])
  puts index
  index += 1
end


text:
function CompileMexfiles

	compileMexFile = ~true;
    if (compileMexFile)
        [dirName, ~] = fileparts(which(mfilename()));
        cd(dirName);
        % Compile the U3 mexfile
        %mex -v -output LJTemperatureProbeU3 LDFLAGS="\$LDFLAGS -weak_library /usr/local/Cellar/exodriver/2.5.3/lib/liblabjackusb.dylib -weak_library /usr/local/Cellar/libusb/1.0.21/lib/libusb-1.0.dylib" CFLAGS="\$CFLAGS -Wall -g -std=c11 -Wno-nullability-completeness" -I/usr/include -I/usr/local/Cellar/exodriver/2.5.3/include -I/usr/local/Cellar/libusb/1.0.21/include/libusb-1.0 "U3.c"

        % Compile the UE9 mexfile
        %mex -v -output LJTemperatureProbeUE9  LDFLAGS="\$LDFLAGS -weak_library /usr/local/Cellar/exodriver/2.5.3/lib/liblabjackusb.dylib -weak_library /usr/local/Cellar/libusb/1.0.21/lib/libusb-1.0.dylib" CFLAGS="\$CFLAGS -Wall -g -std=c11 -Wno-nullability-completeness" -I/usr/include -I/usr/local/Cellar/exodriver/2.5.3/include -I/usr/local/Cellar/libusb/1.0.21/include/libusb-1.0 "UE9.c"

        % Compile the U3IR mexfile
        mex -v -output u3IR  LDFLAGS="\$LDFLAGS -weak_library /usr/local/Cellar/exodriver/2.5.3/lib/liblabjackusb.dylib -weak_library /usr/local/Cellar/libusb/1.0.21/lib/libusb-1.0.dylib" CFLAGS="\$CFLAGS -Wall -g -std=c11 -Wno-nullability-completeness" -I/usr/include -I/usr/local/Cellar/exodriver/2.5.3/include -I/usr/local/Cellar/libusb/1.0.21/include/libusb-1.0 "u3IR.c"

        return;
    end

    isU3 = U3TemperatureProbe('identify');

   % isUE9 = UE9TemperatureProbe('identify');

    status = U3TemperatureProbe('open');
    if (status == 0)
        error('Could not open U3 device. Is it connected ?\n');
        return;
    end

    figure(1); clf;
    timeSeriesTemperature = [];

    for k = 1:100
        hold off;
        [status, tempData] = U3TemperatureProbe('measure');
        size(tempData)
        timeSeriesTemperature = cat(2, timeSeriesTemperature, tempData(:));

        subplot(1,2,1);
        plot((1:size(timeSeriesTemperature,2)), timeSeriesTemperature(1,:), 'ks-');
        set(gca, 'YLim', [20 110]);
        title('temperature, Celcius (sensor probe)')

        subplot(1,2,2);
        plot((1:size(timeSeriesTemperature,2)), timeSeriesTemperature(2,:), 'ks-');
        set(gca, 'YLim', [20 40]);
        title('temperature, Celcius (ambient)')
        drawnow
    end

    status = U3TemperatureProbe('close');

end


text:
using System;
using System.Collections;
using System.Xml.Serialization;

namespace Hanoi.Serialization.Extensions.ServiceDiscovery {
    /// <summary>
    ///   XEP-0030: Service Discovery
    /// </summary>
    [Serializable]
    [XmlType(Namespace = "http://jabber.org/protocol/disco#info")]
    [XmlRootAttribute("query", Namespace = "http://jabber.org/protocol/disco#info", IsNullable = false)]
    public class ServiceQuery {
        private ArrayList featuresField;
        private ArrayList identitiesField;
        private string node;

        public ServiceQuery() {
            identitiesField = new ArrayList();
            featuresField = new ArrayList();
        }

        /// <remarks />
        [XmlElementAttribute("identity", typeof (ServiceIdentity), Namespace = "http://jabber.org/protocol/disco#info")]
        public ArrayList Identities {
            get { return identitiesField; }
            set { identitiesField = value; }
        }

        /// <remarks />
        [XmlElementAttribute("feature", typeof (ServiceFeature), Namespace = "http://jabber.org/protocol/disco#info")]
        public ArrayList Features {
            get { return featuresField; }
            set { featuresField = value; }
        }

        /// <remarks />
        [XmlAttributeAttribute("node")]
        public string Node {
            get { return node; }
            set { node = value; }
        }
    }
}


text:
var learnerControllers = angular.module('learnerControllers', ['ui.router']);

learnerControllers.controller('learnerController', ['$scope', 'User', 'AttemptByExercise', 'ExerciseByModel', 'AttemptList', '$routeParams', '$location', '$stateParams',
    function ($scope, User, AttemptByExercise, ExerciseByModel, AttemptList, $routeParams, $location, $stateParams) {
        $scope.section = 'attempts';
        $scope.imageUrl = BASE_CONFIG.urls.images.uploads;
        $scope.imageExoUrl = BASE_CONFIG.urls.images.exercise;

        console.log('attempts loading...');

        // retrieve attempts
        if ($stateParams.modelId == '' || $stateParams.modelId == null) {
            $scope.models = AttemptList.query(
                function () {
                    // when data loaded
                    console.log('attempts loaded');
                    $scope.loadUsers($scope.models);
                });
        } else {
            $scope.models = [];
            $scope.models[0] = AttemptList.get({modelId: $stateParams.modelId},
                function () {
                    // when data loaded
                    console.log('attempt loaded');
                    $scope.loadUsers($scope.models);
                });

        }

        $scope.viewAttempt = function (attempt) {
            $location.path("/learner/attempt/" + attempt.id);
        };

        $scope.tryExercise = function (exercise) {
            // create attempt from exercise
            console.log('create attempt...');
            attempt = AttemptByExercise.create({exerciseId: exercise.id},
                function (attempt) {
                    console.log('redirection');
                    $scope.viewAttempt(attempt);
                });
        };

        $scope.tryModel = function (model) {
            // create exercise from model
            console.log('create exercise...');
            exercise = ExerciseByModel.try({modelId: model.id},
                function (exercise) {
                    $scope.tryExercise(exercise);
                });
        };
    }]);


text:
package org.apache.jackrabbit.oak.spi.commit;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import javax.annotation.Nonnull;

import org.apache.jackrabbit.oak.spi.state.NodeState;

/**
 * This {@code ValidatorProvider} aggregates a list of validator providers into
 * a single validator provider.
 */
public class CompositeValidatorProvider implements ValidatorProvider {

    public static ValidatorProvider compose(@Nonnull Collection<ValidatorProvider> providers) {
        switch (providers.size()) {
            case 0:
                return DefaultValidatorProvider.INSTANCE;
            case 1:
                return providers.iterator().next();
            default:
                return new CompositeValidatorProvider(providers);
        }
    }

    private final Collection<ValidatorProvider> providers;

    private CompositeValidatorProvider(Collection<ValidatorProvider> providers) {
        this.providers = providers;
    }

    public CompositeValidatorProvider(ValidatorProvider... providers) {
        this(Arrays.asList(providers));
    }

    @Override
    public Validator getRootValidator(NodeState before, NodeState after) {
        List<Validator> rootValidators = new ArrayList<Validator>(providers.size());

        for (ValidatorProvider provider : providers) {
            rootValidators.add(provider.getRootValidator(before, after));
        }

        return new CompositeValidator(rootValidators);
    }

}


text:
layout: page
title: Cube Music Executive Retreat
date: 2016-05-24
author: Natalie Ford
tags: weekly links, java
status: published
summary: Aenean id blandit dui. Sed eleifend.
banner: images/banner/wedding.jpg
booking:
  startDate: 04/28/2019
  endDate: 05/02/2019
  ctyhocn: PRCHHHX
  groupCode: CMER
published: true
---
Aenean imperdiet, diam vitae consequat aliquam, magna purus condimentum turpis, a sollicitudin ex enim et lorem. In quis metus in tellus congue tincidunt. Aenean efficitur odio euismod, auctor ligula maximus, accumsan urna. Sed vitae massa non leo aliquam finibus vel at tortor. Fusce pulvinar risus et quam dapibus, a vestibulum est mattis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed mattis ante a luctus feugiat.
Quisque et imperdiet elit. Suspendisse potenti. In molestie eu mi eu porta. Nunc faucibus tristique mattis. Cras eu facilisis magna. Pellentesque dictum fermentum accumsan. Proin tellus diam, fermentum quis ex ac, vestibulum faucibus leo. Suspendisse id est nisl. Vestibulum dapibus sit amet dui elementum vehicula.

1 Praesent cursus erat id nulla placerat vestibulum
1 Cras eget dolor sodales, pellentesque enim eget, cursus diam
1 Sed pellentesque odio id efficitur blandit
1 Aenean vel libero consequat, semper erat et, auctor velit.

Nullam feugiat fermentum gravida. Nam eu arcu volutpat, sollicitudin velit vitae, pharetra odio. Etiam ultricies lobortis dui, non maximus enim ultricies in. Nunc accumsan tincidunt tortor. Mauris fermentum turpis eget quam placerat, in congue leo volutpat. Suspendisse tristique egestas ante a mollis. Mauris pellentesque nisi non mauris semper, eu fermentum justo bibendum. Maecenas pellentesque sed justo in porttitor. Donec consectetur elit vel augue porttitor aliquam. Pellentesque mollis viverra condimentum. Sed vitae ex est. Pellentesque aliquam non ipsum aliquam ornare. Ut at massa imperdiet, porta lorem eget, blandit risus. Integer tristique tincidunt vulputate. Nulla accumsan et nibh eget malesuada.
In egestas nisl magna, quis pretium libero ornare nec. Nulla elementum ullamcorper congue. Nunc sodales turpis felis, a interdum nibh porttitor vitae. Donec leo velit, vulputate in vestibulum quis, venenatis eget leo. Donec non semper tortor. Donec non pellentesque libero. Sed at aliquam enim. Suspendisse cursus ac nunc eu viverra. Donec laoreet vestibulum felis vel vestibulum.


text:
<bill session="110" type="s" number="975" updated="2009-01-09T13:47:44-05:00">
	<status><enacted date="1186977600" datetime="2007-08-13" /></status>

	<introduced date="1174622400" datetime="2007-03-23"/>
	<titles>
		<title type="official" as="introduced">A bill granting the consent and approval of Congress to an interstate forest fire protection compact.</title>
	</titles>
	<sponsor id="400546"/>
	<cosponsors>
		<cosponsor id="400619" joined="2007-03-23"/>
		<cosponsor id="300041" joined="2007-03-23"/>
		<cosponsor id="300003" joined="2007-03-23"/>
		<cosponsor id="300097" joined="2007-03-23"/>
		<cosponsor id="300058" joined="2007-06-04"/>
	</cosponsors>
	<actions>
		<action date="1174622400" datetime="2007-03-23"><text>Read twice and referred to the Committee on the Judiciary.</text></action>
		<action date="1184299200" datetime="2007-07-13"><text>Senate Committee on the Judiciary discharged by Unanimous Consent.</text><reference label="consideration" ref="CR S9226"/></action>
		<vote date="1184299200" how="by Unanimous Consent" datetime="2007-07-13" where="s" type="vote" result="pass" ><text>Passed Senate without amendment by Unanimous Consent.</text><reference label="text as passed Senate" ref="CR S9226"/></vote>
		<action date="1184558400" datetime="2007-07-16"><text>Message on Senate action sent to the House.</text></action>
		<action date="1184605320" datetime="2007-07-16T14:02:00-04:00"><text>Received in the House.</text></action>
		<action date="1184558400" datetime="2007-07-16"><text>Referred to the House Committee on the Judiciary.</text></action>
		<action date="1185835320" datetime="2007-07-30T19:42:00-04:00"><text>Ms. Lofgren, Zoe moved to suspend the rules and pass the bill.</text></action>
		<action date="1185835320" datetime="2007-07-30T19:42:00-04:00"><text>Considered under suspension of the rules. (consideration: CR 7/31/2007 H8917-8919)</text></action>
		<action date="1185835320" datetime="2007-07-30T19:42:00-04:00"><text>DEBATE - The House proceeded with forty minutes of debate on S. 975.</text></action>
		<vote date="1185835800" how="by voice vote" datetime="2007-07-30T19:50:00-04:00" where="h" type="vote2" result="pass" ><text>On motion to suspend the rules and pass the bill Agreed to by voice vote. (text: CR 7/31/2007 H8917-8918)</text></vote>
		<topresident date="1185768000" datetime="2007-07-30" ><text>Cleared for White House.</text></topresident>
		<topresident date="1186113600" datetime="2007-08-03" ><text>Presented to President.</text></topresident>
		<signed date="1186977600" datetime="2007-08-13" ><text>Signed by President.</text></signed>
		<enacted number="110-79" date="1186977600" datetime="2007-08-13" type="public" ><text>Became Public Law No: 110-79.</text></enacted>
	</actions>
	<committees>

	</committees>
	<relatedbills>

	</relatedbills>
	<subjects>

	</subjects>
	<amendments>

	</amendments>
	<summary>
	8/13/2007--Public Law. (This measure has not been amended since it was introduced. The summary of that version is repeated here.) Grants the consent and approval of Congress to the interstate forest fire protection compact for the Great Plains region of the United States set forth in this Act.
	</summary>
</bill>


text:
declare module 'setprototypeof' {
  declare module.exports: <T>(o: T, proto: Object | null) => T;
}


text:
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET</title>
<link rel="stylesheet" href="../../../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="../../../../index.html" title="Chapter 1. Geometry">
<link rel="up" href="../register.html" title="Macro's for adaption">
<link rel="prev" href="boost_geometry_register_point_2d_const.html" title="BOOST_GEOMETRY_REGISTER_POINT_2D_CONST">
<link rel="next" href="boost_geometry_register_point_3d.html" title="BOOST_GEOMETRY_REGISTER_POINT_3D">

Home
Libraries
People
FAQ
More

BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET

Macro to register a 2D point type (having separate get/set methods)

            Description

            The macro BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET registers a two-dimensional
            point type such that it is recognized by Boost.Geometry and that Boost.Geometry
            functionality can used with the specified type.. The get/set version
            registers get and set methods separately and can be used for classes
            with protected member variables and get/set methods to change coordinates

            Synopsis

#define BOOST_GEOMETRY_REGISTER_POINT_2D_GET_SET(Point, CoordinateType, CoordinateSystem,
                                          Get0, Get1, Set0,
                                          Set1)

            Parameters

<colgroup>
<col>
<col>
</colgroup>

                      Name

                      Description

                      Point

                      Point type to be registered

                      CoordinateType

                      Type of the coordinates of the point (e.g. double)

                      CoordinateSystem

                      Coordinate system (e.g. cs::cartesian)

                      Get0

                      Method to get the first (usually x) coordinate

                      Get1

                      Method to get the second (usually y) coordinate

                      Set0

                      Method to set the first (usually x) coordinate

                      Set1

                      Method to set the second (usually y) coordinate

            Header

            #include <boost/geometry/geometries/register/point.hpp>

Copyright © 2009-2015 Barend Gehrels, Bruno Lalande,
      Mateusz Loskot, Adam Wulkiewicz, Oracle and/or its affiliates

        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)


text:
'use strict';

//Fentoracrf service used to communicate Fentoracrf REST endpoints
angular.module('fentoracrf').factory('Fentoracrf', ['$resource',
	function($resource) {
		return $resource('fentoracrf/:fentoracrfId', { fentoracrfId: '@_id'
		}, {
			update: {
				method: 'PUT'
			}
		});
	}
]);


text:
package ru.job4j.StockCup;

import java.util.*;

/**
 * Created by Alekseev Kirill.
 * Package name: ru.job4j.StockCup
 * Create data: 07.03.2018 21:04
 */

public class BillOrder<E> {
    protected static final String[] BOOKS = {"ГазПром", "Лукойл", "Роснефть", "Макдональдс", "Apple", "Альфабет"};
    protected static final String[] TYPE = {"add", "delete"}; // 0 - add; 1 - delete;
    protected static final String[] ACTION = {"sale", "buy"}; // 0 - sale; 1 - buy;
    protected List<Order> saleOrders = new LinkedList<>();
    protected List<Order> buyOrders = new LinkedList<>();
    protected int genId = 0;

    public void createOrder(String book, String type, String action, int price, int volume) {
        Order order = new Order(genId += 8, book, action, price, volume);
        if (TYPE[0].equals(type)) { // 0 - addOrder
            addOrder(order, action);
            checkOrder();
        }
        if (TYPE[1].equals(type)) { // 1 - deleteOrder
            deleteOrder(getIndexByID(order.id), action);
        }

    }

    public void addOrder(Order order, String action) {
        if (ACTION[0].equals(action)) { //0 - addOrder with type "sale".
            saleOrders.add(order);
            Collections.sort(saleOrders);
        }
        if (ACTION[1].equals(action)) { // 1 - addOrder with type "buy".
            buyOrders.add(order);
            Collections.sort(buyOrders);
        }
    }

    public void deleteOrder(int index, String action) {
        if (ACTION[0].equals(action)) {
            if (index < saleOrders.size()) {
                saleOrders.remove(index);
            } else {
                throw new NoSuchElementException("No such Order in Billing.");
            }
        }
        if (ACTION[1].equals(action)) {
            if (index < buyOrders.size()) {
                buyOrders.remove(index);
            } else {
                throw new NoSuchElementException("No such Order in Billing.");
            }
        }
    }

    public int getIndexByID(int id) {
        for (int indexSale = 0; indexSale < saleOrders.size(); indexSale++) {
            if (id == saleOrders.get(indexSale).id) {
                return indexSale;
            }
        }
        for (int indexBuy = 0; indexBuy < buyOrders.size(); indexBuy++) {
            if (id == buyOrders.get(indexBuy).id) {
                return indexBuy;
            }
        }
        throw new NoSuchElementException("Nothing was found for this id.");
    }

    public void checkOrder() {
        for (int indexSale = 0; indexSale < saleOrders.size(); indexSale++) {
            Order saleOrder = saleOrders.get(indexSale);
            for (int indexBuy = 0; indexBuy < buyOrders.size(); indexBuy++) {
                Order buyOrder = buyOrders.get(indexBuy);
                if (saleOrder.equals(buyOrder)) {
                    if (saleOrder.price <= buyOrder.price) {
                        int volume = saleOrder.volume - buyOrder.volume;
                        if (volume > 0) { //change Order in saleOrders and delete Order in buyOrders
                            saleOrder.volume = volume;
                            deleteOrder(indexBuy, ACTION[1]);
                            indexBuy--;
                        }
                        if (volume == 0) { //delete Order in saleOrders and delete Order in buyOrders.
                            deleteOrder(indexSale, ACTION[0]);
                            deleteOrder(indexBuy, ACTION[1]);
                            indexSale--;
                            indexBuy--;
                        }
                        if (volume < 0) { //delete Order in saleOrders and change Order in buyOrders.
                            buyOrder.volume = volume * -1;
                            deleteOrder(indexSale, ACTION[0]);
                            indexSale--;
                        }
                    }
                }
            }
        }
    }
}


text:
import logging
import json

def save_dict(file, d):
    logging.info("Saving file {file}".format(file=file))
    with open(file, 'w') as f:
        json.dump(d, f, indent=2)

def load_dict(file):
    logging.info("Loading file {file}".format(file=file))
    with open(file, 'r') as f:
        return json.load(f)


text:
var Backbone = require('backbone');

exports = module.exports = Backbone.Router.extend({
	constructor: function(options) {
		Backbone.Router.call(this, options);
		this.vent = options.vent;
	},

	routes: {
		'projects': 'projects',
		'resume': 'resume',
		'blog': 'blog',
		'about': 'about',
		'': 'about'
	},

	about: function() {
		this.vent.trigger('route:about');
	},

	projects: function() {
		this.vent.trigger('route:projects');
	},

	resume: function() {
		this.vent.trigger('route:resume');
	},

	blog: function() {
		this.vent.trigger('route:blog');
	}
});


text:
<?php

class Moraso_Persistence_Config {

    protected $_data = null;

    protected function __construct() {

        $this->_load();
    }

    public static function factory() {

        static $instance;

        if (!isset($instance)) {
            $instance = new self();
        }

        return $instance;
    }

    private function _load($reload = false) {

        if (!$reload && ($this->_data !== null)) {
            return $this;
        }

        $config = Moraso_Db::fetchAll('' .
                        'select ' .
                        '   * ' .
                        'from ' .
                        '   _moraso_config');

        if (!$config) {
            return;
        }

        foreach ($config as $row) {

            $config = $row['config'];
            $env = $row['env'];
            $identifier = $row['identifier'];

            $this->_data[$config][$env][$identifier] = $row['value'];
        }

        return $this;
    }

    public function setValue($config, $env, $identifier, $value) {

        $this->_data[$config][$env][$identifier] = $value;
    }

    public function unsetValue($config, $env, $identifier) {

        if (isset($this->data[$config][$env][$identifier])) {
            unset($this->data[$config][$env][$identifier]);
        }
    }

    public function save() {

        if (empty($this->_data)) {
            return;
        }

        Moraso_Db::startTransaction();

        try {
            Moraso_Db::query('delete from _moraso_config');

            foreach ($this->_data as $config => $envRow) {
                foreach ($envRow as $env => $identifierRow) {
                    foreach ($identifierRow as $identifier => $value) {
                        Moraso_Db::put('_moraso_config', 'null', array(
                            'config' => $config,
                            'env' => $env,
                            'identifier' => $identifier,
                            'value' => $value
                        ));
                    }
                }
            }

            Moraso_Db::commit();
        } catch (Exception $e) {
            Moraso_Db::rollback();
            throw $e;
        }

        return $this;
    }

}


text:
<!--
  ~ Copyright (c) 1998-2018 John Caron and University Corporation for Atmospheric Research/Unidata
  ~ See LICENSE for license information.
  -->

<HTML>
<HEAD>
<TITLE>package ucar.nc2.dataset.conv</TITLE>
</HEAD>
<BODY>
<p>DO NOT USE: MARKED FOR DELETION IN VERSION 6.
</pre>
</BODY>
</HTML>


text:
package com.cloud.network.vpc;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import com.cloud.exception.InvalidParameterValueException;
import com.cloud.network.NetworkModel;
import com.cloud.network.element.NetworkElement;

import com.cloud.network.Network;
import com.cloud.network.Network.Capability;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;

import com.cloud.network.Network.Provider;
import com.cloud.network.Network.Service;
import com.cloud.network.vpc.dao.VpcOfferingServiceMapDao;
import org.powermock.reflect.Whitebox;

import static org.mockito.Mockito.mock;
import static org.powermock.api.mockito.PowerMockito.when;

public class VpcManagerImplTest {

    @Mock
    VpcOfferingServiceMapDao vpcOffSvcMapDao;
    VpcManagerImpl manager;

    @Before
    public void setup()
    {
        MockitoAnnotations.initMocks(this);
        manager = new VpcManagerImpl();
        manager._vpcOffSvcMapDao = vpcOffSvcMapDao;
    }

    @Test
    public void getVpcOffSvcProvidersMapForEmptyServiceTest() {
        long vpcOffId = 1L;
        List<VpcOfferingServiceMapVO> list = new ArrayList<VpcOfferingServiceMapVO>();
        list.add(mock(VpcOfferingServiceMapVO.class));
        when(manager._vpcOffSvcMapDao.listByVpcOffId(vpcOffId)).thenReturn(list);

        Map<Service, Set<Provider>> map = manager.getVpcOffSvcProvidersMap(vpcOffId);

        assertNotNull(map);
        assertEquals(map.size(),1);
    }

    protected Map<String, String> createFakeCapabilityInputMap() {
        Map<String, String> map = new HashMap<String, String>();
        map.put(VpcManagerImpl.CAPABILITYVALUE, VpcManagerImpl.TRUE_VALUE);
        map.put(VpcManagerImpl.CAPABILITYTYPE, Network.Capability.SupportedProtocols.getName());
        map.put(VpcManagerImpl.SERVICE, "");
        return map;
    }

    @Test
    public void testIsVpcOfferingForRegionLevelVpc() throws Exception {
        // Prepare
        Map<String, Map<String, String>> serviceCapabilitystList = new HashMap<>();
        // First add some other capabilities to be ignored
        serviceCapabilitystList.put("", createFakeCapabilityInputMap());

        Map<String, String> servicePair = new HashMap<>();
        servicePair.put(VpcManagerImpl.SERVICE, Service.Connectivity.getName());
        servicePair.put(VpcManagerImpl.CAPABILITYTYPE, Network.Capability.RegionLevelVpc.getName());
        servicePair.put(VpcManagerImpl.CAPABILITYVALUE, VpcManagerImpl.TRUE_VALUE);
        serviceCapabilitystList.put("", servicePair);

        // Execute
        boolean result = Whitebox.invokeMethod(this.manager, "isVpcOfferingForRegionLevelVpc",
                serviceCapabilitystList); //, Network.Capability.RedundantRouter.getName(), Service.SourceNat);

        // Assert
        assertEquals("VpcOffering should be created for Region Level Vpc", true, result);
    }

    @Test
    public void testIsVpcOfferingForRegionLevelVpcFalse() throws Exception {
        // Prepare
        Map<String, Map<String, String>> serviceCapabilitystList = new HashMap<>();
        // First add some other capabilities to be ignored
        serviceCapabilitystList.put("", createFakeCapabilityInputMap());
        serviceCapabilitystList.put("", createFakeCapabilityInputMap());

        // Execute
        boolean result = Whitebox.invokeMethod(this.manager, "isVpcOfferingForRegionLevelVpc",
                serviceCapabilitystList);

        // Assert
        assertEquals("VpcOffering should be created NOT for Region Level Vpc", false, result);
    }

    @Test(expected = InvalidParameterValueException.class)
    public void testCheckCapabilityPerServiceProviderFail() {
        // Prepare
        final Map<Capability, String> capabilities = new HashMap<>();
        capabilities.put(Capability.RegionLevelVpc, "");
        capabilities.put(Capability.DistributedRouter, "");
        Set<Network.Provider> providers = this.prepareVpcManagerForCheckingCapabilityPerService(Service.Connectivity, capabilities);

        // Execute
        this.manager.checkCapabilityPerServiceProvider(providers, Capability.RedundantRouter, Service.SourceNat);
    }

    @Test
    public void testCheckCapabilityPerServiceProvider() {
        // Prepare
        final Map<Capability, String> capabilities = new HashMap<>();
        capabilities.put(Capability.RegionLevelVpc, "");
        capabilities.put(Capability.DistributedRouter, "");
        Set<Network.Provider> providers = this.prepareVpcManagerForCheckingCapabilityPerService(Service.Connectivity, capabilities);

        // Execute
        this.manager.checkCapabilityPerServiceProvider(providers, Capability.DistributedRouter, Service.Connectivity);
        this.manager.checkCapabilityPerServiceProvider(providers, Capability.RegionLevelVpc, Service.Connectivity);
    }

    protected Set<Network.Provider> prepareVpcManagerForCheckingCapabilityPerService(Service service, Map<Capability, String> capabilities) {
        final Set<Network.Provider> providers = new HashSet<>();
        providers.add(Provider.VPCVirtualRouter);
        final Network.Capability capability = Capability.DistributedRouter;
        final boolean regionLevel = true;
        final boolean distributedRouter = true;
        final NetworkElement nwElement1 = mock(NetworkElement.class);
        this.manager._ntwkModel = mock(NetworkModel.class);
        when(this.manager._ntwkModel.getElementImplementingProvider(Provider.VPCVirtualRouter.getName()))
                .thenReturn(nwElement1);
        final Map<Service, Map<Network.Capability, String>> capabilitiesService1 = new HashMap<>();
        when(nwElement1.getCapabilities()).thenReturn(capabilitiesService1);
        capabilities.put(Capability.RegionLevelVpc, "");
        capabilities.put(Capability.DistributedRouter, "");
        capabilitiesService1.put(service, capabilities);

        return providers;
    }
}


text:
#include <linux/types.h>
#include <linux/mm.h>
#include <linux/blkdev.h>
#include <linux/sched.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>

#include <asm/setup.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/amigaints.h>
#include <asm/amigahw.h>
#include <asm/irq.h>

#include "scsi.h"
#include <scsi/scsi_host.h>
#include "wd33c93.h"
#include "a3000.h"

#include<linux/stat.h>

#define DMA(ptr) ((a3000_scsiregs *)((ptr)->base))
#define HDATA(ptr) ((struct WD33C93_hostdata *)((ptr)->hostdata))

static struct Scsi_Host *a3000_host = NULL;

static irqreturn_t a3000_intr (int irq, void *dummy, struct pt_regs *fp)
{
	unsigned long flags;
	unsigned int status = DMA(a3000_host)->ISTR;

	if (!(status & ISTR_INT_P))
		return IRQ_NONE;
	if (status & ISTR_INTS)
	{
		spin_lock_irqsave(a3000_host->host_lock, flags);
		wd33c93_intr (a3000_host);
		spin_unlock_irqrestore(a3000_host->host_lock, flags);
		return IRQ_HANDLED;
	}
	printk("Non-serviced A3000 SCSI-interrupt? ISTR = %02x\n", status);
	return IRQ_NONE;
}

static int dma_setup (Scsi_Cmnd *cmd, int dir_in)
{
    unsigned short cntr = CNTR_PDMD | CNTR_INTEN;
    unsigned long addr = virt_to_bus(cmd->SCp.ptr);

    /*
     * if the physical address has the wrong alignment, or if
     * physical address is bad, or if it is a write and at the
     * end of a physical memory chunk, then allocate a bounce
     * buffer
     */
    if (addr & A3000_XFER_MASK ||
	(!dir_in && mm_end_of_chunk (addr, cmd->SCp.this_residual)))
    {
	HDATA(a3000_host)->dma_bounce_len = (cmd->SCp.this_residual + 511)
	    & ~0x1ff;
	HDATA(a3000_host)->dma_bounce_buffer =
	    kmalloc (HDATA(a3000_host)->dma_bounce_len, GFP_KERNEL);

	/* can't allocate memory; use PIO */
	if (!HDATA(a3000_host)->dma_bounce_buffer) {
	    HDATA(a3000_host)->dma_bounce_len = 0;
	    return 1;
	}

	if (!dir_in) {
	    /* copy to bounce buffer for a write */
	    if (cmd->use_sg) {
		memcpy (HDATA(a3000_host)->dma_bounce_buffer,
			cmd->SCp.ptr, cmd->SCp.this_residual);
	    } else
		memcpy (HDATA(a3000_host)->dma_bounce_buffer,
			cmd->request_buffer, cmd->request_bufflen);
	}

	addr = virt_to_bus(HDATA(a3000_host)->dma_bounce_buffer);
    }

    /* setup dma direction */
    if (!dir_in)
	cntr |= CNTR_DDIR;

    /* remember direction */
    HDATA(a3000_host)->dma_dir = dir_in;

    DMA(a3000_host)->CNTR = cntr;

    /* setup DMA *physical* address */
    DMA(a3000_host)->ACR = addr;

    if (dir_in)
  	/* invalidate any cache */
	cache_clear (addr, cmd->SCp.this_residual);
    else
	/* push any dirty cache */
	cache_push (addr, cmd->SCp.this_residual);

    /* start DMA */
    mb();			/* make sure setup is completed */
    DMA(a3000_host)->ST_DMA = 1;
    mb();			/* make sure DMA has started before next IO */

    /* return success */
    return 0;
}

static void dma_stop (struct Scsi_Host *instance, Scsi_Cmnd *SCpnt,
		      int status)
{
    /* disable SCSI interrupts */
    unsigned short cntr = CNTR_PDMD;

    if (!HDATA(instance)->dma_dir)
	cntr |= CNTR_DDIR;

    DMA(instance)->CNTR = cntr;
    mb();			/* make sure CNTR is updated before next IO */

    /* flush if we were reading */
    if (HDATA(instance)->dma_dir) {
	DMA(instance)->FLUSH = 1;
	mb();			/* don't allow prefetch */
	while (!(DMA(instance)->ISTR & ISTR_FE_FLG))
	    barrier();
	mb();			/* no IO until FLUSH is done */
    }

    /* clear a possible interrupt */
    /* I think that this CINT is only necessary if you are
     * using the terminal count features.   HM 7 Mar 1994
     */
    DMA(instance)->CINT = 1;

    /* stop DMA */
    DMA(instance)->SP_DMA = 1;
    mb();			/* make sure DMA is stopped before next IO */

    /* restore the CONTROL bits (minus the direction flag) */
    DMA(instance)->CNTR = CNTR_PDMD | CNTR_INTEN;
    mb();			/* make sure CNTR is updated before next IO */

    /* copy from a bounce buffer, if necessary */
    if (status && HDATA(instance)->dma_bounce_buffer) {
	if (SCpnt && SCpnt->use_sg) {
	    if (HDATA(instance)->dma_dir && SCpnt)
		memcpy (SCpnt->SCp.ptr,
			HDATA(instance)->dma_bounce_buffer,
			SCpnt->SCp.this_residual);
	    kfree (HDATA(instance)->dma_bounce_buffer);
	    HDATA(instance)->dma_bounce_buffer = NULL;
	    HDATA(instance)->dma_bounce_len = 0;
	} else {
	    if (HDATA(instance)->dma_dir && SCpnt)
		memcpy (SCpnt->request_buffer,
			HDATA(instance)->dma_bounce_buffer,
			SCpnt->request_bufflen);

	    kfree (HDATA(instance)->dma_bounce_buffer);
	    HDATA(instance)->dma_bounce_buffer = NULL;
	    HDATA(instance)->dma_bounce_len = 0;
	}
    }
}

int __init a3000_detect(struct scsi_host_template *tpnt)
{
    wd33c93_regs regs;

    if  (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(A3000_SCSI))
	return 0;
    if (!request_mem_region(0xDD0000, 256, "wd33c93"))
	return 0;

    tpnt->proc_name = "A3000";
    tpnt->proc_info = &wd33c93_proc_info;

    a3000_host = scsi_register (tpnt, sizeof(struct WD33C93_hostdata));
    if (a3000_host == NULL)
	goto fail_register;

    a3000_host->base = ZTWO_VADDR(0xDD0000);
    a3000_host->irq = IRQ_AMIGA_PORTS;
    DMA(a3000_host)->DAWR = DAWR_A3000;
    regs.SASR = &(DMA(a3000_host)->SASR);
    regs.SCMD = &(DMA(a3000_host)->SCMD);
    wd33c93_init(a3000_host, regs, dma_setup, dma_stop, WD33C93_FS_12_15);
    if (request_irq(IRQ_AMIGA_PORTS, a3000_intr, SA_SHIRQ, "A3000 SCSI",
		    a3000_intr))
        goto fail_irq;
    DMA(a3000_host)->CNTR = CNTR_PDMD | CNTR_INTEN;

    return 1;

fail_irq:
    wd33c93_release();
    scsi_unregister(a3000_host);
fail_register:
    release_mem_region(0xDD0000, 256);
    return 0;
}

static int a3000_bus_reset(Scsi_Cmnd *cmd)
{
	/* FIXME perform bus-specific reset */

	/* FIXME 2: kill this entire function, which should
	   cause mid-layer to call wd33c93_host_reset anyway? */

	spin_lock_irq(cmd->device->host->host_lock);
	wd33c93_host_reset(cmd);
	spin_unlock_irq(cmd->device->host->host_lock);

	return SUCCESS;
}

#define HOSTS_C

static struct scsi_host_template driver_template = {
	.proc_name		= "A3000",
	.name			= "Amiga 3000 built-in SCSI",
	.detect			= a3000_detect,
	.release		= a3000_release,
	.queuecommand		= wd33c93_queuecommand,
	.eh_abort_handler	= wd33c93_abort,
	.eh_bus_reset_handler	= a3000_bus_reset,
	.eh_host_reset_handler	= wd33c93_host_reset,
	.can_queue		= CAN_QUEUE,
	.this_id		= 7,
	.sg_tablesize		= SG_ALL,
	.cmd_per_lun		= CMD_PER_LUN,
	.use_clustering		= ENABLE_CLUSTERING
};

#include "scsi_module.c"

int a3000_release(struct Scsi_Host *instance)
{
    wd33c93_release();
    DMA(instance)->CNTR = 0;
    release_mem_region(0xDD0000, 256);
    free_irq(IRQ_AMIGA_PORTS, a3000_intr);
    return 1;
}

MODULE_LICENSE("GPL");


text:
package com.github.sdedwards.m2e_nar.internal.cdt;

import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.core.runtime.CoreException;

import com.github.sdedwards.m2e_nar.internal.model.NarBuildArtifact;

public interface SettingsSynchroniser {

	public void fullSync(ICConfigurationDescription cfg, NarBuildArtifact artifactSettings) throws CoreException;

	public void pathsOnlySync(ICConfigurationDescription cfg, NarBuildArtifact artifactSettings) throws CoreException;

}


text:
@interface MAFlyingFrames : UIView

@property (nonatomic) float fBorderWidth;
@property (nonatomic) int reps;

@property (nonatomic) bool rotationClockwise;

@property (nonatomic) CGPoint center;
@property (nonatomic) CGPoint newCenter;
@property (nonatomic) CGPoint oldCenter;

@property (nonatomic) int count;
@property (nonatomic) int position;

@property (nonatomic) int degree;

@property (nonatomic) NSArray *creepOfTheWeek;

@property (nonatomic) UILabel *label;

@end


text:
#ifndef __HTTP_DIGEST_H
#define __HTTP_DIGEST_H

typedef enum {
  CURLDIGEST_NONE, /* not a digest */
  CURLDIGEST_BAD,  /* a digest, but one we don't like */
  CURLDIGEST_BADALGO, /* unsupported algorithm requested */
  CURLDIGEST_NOMEM,
  CURLDIGEST_FINE, /* a digest we act on */

  CURLDIGEST_LAST  /* last entry in this enum, don't use */
} CURLdigest;

enum {
  CURLDIGESTALGO_MD5,
  CURLDIGESTALGO_MD5SESS
};

/* this is for digest header input */
CURLdigest Curl_input_digest(struct connectdata *conn,
                             bool proxy, char *header);

/* this is for creating digest header output */
CURLcode Curl_output_digest(struct connectdata *conn,
                            bool proxy,
                            unsigned char *request,
                            unsigned char *uripath);
void Curl_digest_cleanup_one(struct digestdata *dig);

#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH)
void Curl_digest_cleanup(struct SessionHandle *data);
#else
#define Curl_digest_cleanup(x) do {} while(0)
#endif

#endif


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>zkmod</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="zkcl.html" title="zkcl" />
    <link rel="next" href="zkr.html" title="zkr" />

          zkmod

          Prev
          Orchestra Opcodes and Operators
           Next

          zkmod

zkmod —
      Facilitates the modulation of one signal by another.

Description

      Facilitates the modulation of one signal by another.

Syntax

kres zkmod ksig, kzkmod

Performance

      ksig -- the input signal

      kzkmod -- controls which zk variable is used for modulation. A positive value means additive modulation, a negative value means multiplicative modulation. A value of 0 means no change to ksig. kzkmod can be i-rate or k-rate

      zkmod facilitates the modulation of one signal by another, where the modulating signal comes from a zk variable. Either additive or mulitiplicative modulation can be specified.

Examples

      Here is an example of the zkmod opcode. It uses the file zkmod.csd.

            Example 1108. Example of the zkmod opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
; Audio out   Audio in    No messages
-odac           -iadc     -d     ;;;RT audio I/O
; For Non-realtime ouput leave only the line below:
; -o zkmod.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

; Initialize the global variables.
sr = 44100
kr = 4410
ksmps = 10
nchnls = 2

; Initialize the ZAK space.
; Create 2 a-rate variables and 2 k-rate variables.
zakinit 2, 2

; Instrument #1 -- a signal with jitter.
instr 1
  ; Generate a k-rate signal goes from 30 to 2,000.
  kline line 30, p3, 2000

  ; Add the signal into zk variable #1.
  zkw kline, 1
endin

; Instrument #2 -- generates audio output.
instr 2
  ; Create a k-rate signal modulated the jitter opcode.
  kamp init 20
  kcpsmin init 40
  kcpsmax init 60
  kjtr jitter kamp, kcpsmin, kcpsmax

  ; Get the frequency values from zk variable #1.
  kfreq zkr 1
  ; Add the the frequency values in zk variable #1 to
  ; the jitter signal.
  kjfreq zkmod kjtr, 1

  ; Use a simple sine waveform for the left speaker.
  aleft oscil 20000, kfreq, 1
  ; Use a sine waveform with jitter for the right speaker.
  aright oscil 20000, kjfreq, 1

  ; Generate the audio output.
  outs aleft, aright

  ; Clear the zk variables, prepare them for
  ; another pass.
  zkcl 0, 2
endin

</CsInstruments>
<CsScore>

; Table #1, a sine wave.
f 1 0 16384 10 1

; Play Instrument #1 for 2 seconds.
i 1 0 2
; Play Instrument #2 for 2 seconds.
i 2 0 2
e

</CsScore>
</CsoundSynthesizer>

See Also

      zamod,
      zkcl,
      zkr,
      zkwm,
      zkw

Credits

            Author: Robin Whittle

            Australia

            May 1997

New in version 3.45

Example written by Kevin Conder.

          Prev

            Up

           Next

          zkcl

            Home

           zkr


text:
from django.core import urlresolvers
from django.conf.urls import include, url
from django.utils.translation import ugettext_lazy as _

from wagtail.wagtailcore import hooks
from wagtail.wagtailsearch.urls import admin as admin_urls

from wagtail.wagtailadmin.menu import MenuItem

@hooks.register('register_admin_urls')
def register_admin_urls():
    return [
        url(r'^search/', include(admin_urls)),
    ]

@hooks.register('construct_main_menu')
def construct_main_menu(request, menu_items):
    # TEMPORARY: Only show if the user is a superuser
    if request.user.is_superuser:
        menu_items.append(
            MenuItem(_('Editors picks'), urlresolvers.reverse('wagtailsearch_editorspicks_index'), classnames='icon icon-pick', order=900)
        )


text:
var onHeaders = require('on-headers');
var onFinished = require('on-finished');
var pathToRegexp = require('path-to-regexp');
var debug = require('debug')('leanengine:apm');
var request = require('request');
var _ = require('underscore');

module.exports = function(options) {
  var aggregator = require('./aggregator').interval('request', 60000, _.extend({
    average: ['responseTime']
  }, options));

  var rewriteRules = [{
    match: /^GET .*\.(css|js|jpe?g|gif|png|woff2?|ico)$/,
    rewrite: 'GET *.$1'
  }, {
    match: /^(.*)[a-f0-9]{24}(.*)$/,
    rewrite: '$1:objectId$2'
  }];

  return function leanengineApm(req, res, next) {
    req._lc_startedAt = new Date();

    onHeaders(res, function() {
      res._lc_startedAt = new Date();
    });

    onFinished(res, function(err) {
      if (err)
        return console.error(err);

      var requestUrl = req.originalUrl.replace(/\?.*/, '');
      var responseTime = (res._lc_startedAt ? res._lc_startedAt.getTime() : Date.now()) - req._lc_startedAt.getTime();

      if (req.route) {
        // 如果这个请求属于一个路由,则用路由路径替换掉 URL 中匹配的部分
        var regexp = pathToRegexp(req.route.path).toString().replace(/^\/\^/, '').replace(/\/i$/, '');
        var matched = requestUrl.match(new RegExp(regexp, 'i'));

        if (matched[0]) {
          requestUrl = requestUrl.slice(0, matched.index) + req.route.path;
        }
      }

      requestUrl = req.method.toUpperCase() + ' ' + requestUrl;

      if (rewriteRules.some(function(rule) {
        if (requestUrl.match(rule.match)) {
          if (rule.ignore)
            return true;

          requestUrl = requestUrl.replace(rule.match, rule.rewrite);
        }
      })) {
        return debug('router: ignored %s', requestUrl);
      }

      debug('router: %s %s %sms', requestUrl, res.statusCode, responseTime);

      aggregator.put({
        count: 1,
        responseTime: responseTime,
        url: requestUrl,
        method: req.method,
        statusCode: res.statusCode
      });
    });

    next();
  };
};


text:
<?php
defined('SYSPATH') or die('No direct script access.');
/**
 * Model representing Contacts
 */
class Resource_Status_Model extends Table_Model {

	public $headers = array(
		'id',
		'status',
		'comments');

	protected $table_name = 'resource_status';

	protected $primary_val = 'status';

	protected $has_many = array('resources');

	public function __construct($id = NULL)
	{
		parent::__construct($id);
	}

	public function __set($key, $value)
	{
		if ($key === 'status' AND strlen($value) > 45)
		{
			throw new InvalidArgumentException('Nazev statusu je prilis dlouhy');
		}
		parent::__set($key, $value);
	}
}

?>


text:
using System;

namespace Drawing_Tool
{
    public class StartUp
    {
        public static void Main()
        {
            ReadQuadrangleData().Draw();
        }

        private static Quadrangle ReadQuadrangleData()
        {
            var quadrangleType = Console.ReadLine();
            var lenght = int.Parse(Console.ReadLine());

            if (quadrangleType.Equals("Square"))
            {
                Quadrangle square = new Square(lenght);
                return square;
            }
            else
            {
                var height = int.Parse(Console.ReadLine());
                Quadrangle rectangle = new Rectangle(lenght, height);
                return rectangle;
            }
        }
    }
}


text:
package Dlib.Models;

import java.io.Serializable;

public class CmsModuleTypeOptionValuePK implements Serializable {
    protected int moduleId;
    protected int optionId;

    public CmsModuleTypeOptionValuePK() {}

    public CmsModuleTypeOptionValuePK(int moduleId, int optionId) {
        this.moduleId = moduleId;
        this.optionId = optionId;
    }
}


text:
/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.pjsip.pjsua2;

public class Error extends java.lang.Exception {
  private transient long swigCPtr;
  protected transient boolean swigCMemOwn;

  protected Error(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(Error obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  @SuppressWarnings("deprecation")
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        pjsua2JNI.delete_Error(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  // Override getMessage()
  public String getMessage() {
    return getTitle();
  }

  // Disable serialization (check ticket #1868)
  private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
    throw new java.io.NotSerializableException("Check ticket #1868!");
  }
  private void readObject(java.io.ObjectInputStream in) throws java.io.IOException {
    throw new java.io.NotSerializableException("Check ticket #1868!");
  }

  public void setStatus(int value) {
    pjsua2JNI.Error_status_set(swigCPtr, this, value);
  }

  public int getStatus() {
    return pjsua2JNI.Error_status_get(swigCPtr, this);
  }

  public void setTitle(String value) {
    pjsua2JNI.Error_title_set(swigCPtr, this, value);
  }

  public String getTitle() {
    return pjsua2JNI.Error_title_get(swigCPtr, this);
  }

  public void setReason(String value) {
    pjsua2JNI.Error_reason_set(swigCPtr, this, value);
  }

  public String getReason() {
    return pjsua2JNI.Error_reason_get(swigCPtr, this);
  }

  public void setSrcFile(String value) {
    pjsua2JNI.Error_srcFile_set(swigCPtr, this, value);
  }

  public String getSrcFile() {
    return pjsua2JNI.Error_srcFile_get(swigCPtr, this);
  }

  public void setSrcLine(int value) {
    pjsua2JNI.Error_srcLine_set(swigCPtr, this, value);
  }

  public int getSrcLine() {
    return pjsua2JNI.Error_srcLine_get(swigCPtr, this);
  }

  public String info(boolean multi_line) {
    return pjsua2JNI.Error_info__SWIG_0(swigCPtr, this, multi_line);
  }

  public String info() {
    return pjsua2JNI.Error_info__SWIG_1(swigCPtr, this);
  }

  public Error() {
    this(pjsua2JNI.new_Error__SWIG_0(), true);
  }

  public Error(int prm_status, String prm_title, String prm_reason, String prm_src_file, int prm_src_line) {
    this(pjsua2JNI.new_Error__SWIG_1(prm_status, prm_title, prm_reason, prm_src_file, prm_src_line), true);
  }

}


text:
using System;
using Xunit;

namespace SetVersion.Lib.Tests
{
    public class CSharpFileProcessorTests : GetNewFileContentsTestingBase
    {
        public CSharpFileProcessorTests()
        {
            AVAttr = "[assembly: AssemblyVersion(\"1.2.3\")]";
            AFVAttr = "[assembly: AssemblyFileVersion(\"1.2.3\")]";
            AIVAttr = "[assembly: AssemblyInformationalVersion(\"1.2.3\")]";

            UsingSystemRef = "using System.Reflection;";
        }

        [Fact]
        public void Ctor_ForNullFileSystem_ThrowsArgumentNullException()
        {
            Action act = () => new CSharpFileProcessor(null);
            Assert.Throws<ArgumentNullException>("fileSystem", act);
        }

        protected override SourceCodeFileProcessor GetProcessor()
        {
            return new CSharpFileProcessor(fakeFileSystem);
        }
    }
}


text:
using Assman.ContentFiltering;
using Assman.TestSupport;

using NUnit.Framework;

namespace Assman
{
    [TestFixture]
    public class TestCssRelativePathFilter
    {
        private CssRelativePathFilter _filter;
        private ContentFilterContext _context;

        [SetUp]
        public void SetupContext()
        {
            _filter = new CssRelativePathFilter();
            _context = new ContentFilterContext
            {
                ResourceVirtualPath = "~/Styles/AStylesheet.css",
                Group = new StubResourceGroup("~/Styles/Consolidated/OneStylesheet.css")
            };
        }

        [Test]
        public void RelativePathIsUpdatedToBeRelativeToConsolidatedUrl()
        {
            var content = @".myclass {
                background-image:url(../Images/MyImage.png);
            }";

            var filteredContent = _filter.FilterContent(content, _context);

            filteredContent.ShouldEqual(@".myclass {
                background-image:url(../../Images/MyImage.png);
            }");
        }

        [Test]
        public void AbsolutePathIsLeftAlone()
        {
            var content = @".myclass {
                background-image:url(/Images/MyImage.png);
            }";

            var filteredContent = _filter.FilterContent(content, _context);

            filteredContent.ShouldEqual(@".myclass {
                background-image:url(/Images/MyImage.png);
            }");
        }

        [Test]
        public void HttpPathIsLeftAlone()
        {
            var content = @".myclass {
                background-image:url(http://www.mydomain.com/Images/MyImage.png);
            }";

            var filteredContent = _filter.FilterContent(content, _context);

            filteredContent.ShouldEqual(@".myclass {
                background-image:url(http://www.mydomain.com/Images/MyImage.png);
            }");
        }

        [Test]
        public void HttpsPathIsLeftAlone()
        {
            var content = @".myclass {
                background-image:url(https://www.mydomain.com/Images/MyImage.png);
            }";

            var filteredContent = _filter.FilterContent(content, _context);

            filteredContent.ShouldEqual(@".myclass {
                background-image:url(https://www.mydomain.com/Images/MyImage.png);
            }");
        }

        [Test]
        public void DoubleQuotesAroundUrlAreHandled()
        {
            var content = @".myclass {
                background-image:url(""https://www.mydomain.com/Images/MyImage.png"");
            }";

            var filteredContent = _filter.FilterContent(content, _context);

            filteredContent.ShouldEqual(@".myclass {
                background-image:url(""https://www.mydomain.com/Images/MyImage.png"");
            }");
        }

        [Test]
        public void SingleQuotesAroundUrlAreHandled()
        {
            var content = @".myclass {
                background-image:url('../Images/MyImage.png');
            }";

            var filteredContent = _filter.FilterContent(content, _context);

            filteredContent.ShouldEqual(@".myclass {
                background-image:url('../../Images/MyImage.png');
            }");
        }

        [Test]
        public void LeadingAndTrailingWhitespaceInUrlIsIgnoredAndStripped()
        {
            var content = @".myclass {
                background-image:url( '../Images/MyImage.png'  );
            }";

            var filteredContent = _filter.FilterContent(content, _context);

            filteredContent.ShouldEqual(@".myclass {
                background-image:url('../../Images/MyImage.png');
            }");
        }
    }
}


text:
'use strict';
(function() {
    $.addPageInit("#hallf-of-fame-page", function() {
            var $el = $("#hallf-of-fame-page");

            Hocalwire.PageLoader.init();
            Hocalwire.CommonJs.init();
            // initSliders();
            bindInView();

            bindGATrackingElements();
            $.addPageLoad(initSliders,true);
        }
    );

    function bindInView(){
        $("#send-mail").on("click",function(){
            Hocalwire.Services.AnalyticsService.sendGAEvent("contactus","submit","mail");
            sendMail();
        });

        $('.thumbnail').one('inview', function (event, visible) {
            if (visible == true) {
                $(this).addClass("animated fadeInDown");
            } else {
                $(this).removeClass("animated fadeInDown");
            }
        });

        //Animate triangles
        $('.triangle').bind('inview', function (event, visible) {
            if (visible == true) {
                $(this).addClass("animated fadeInDown");
            } else {
                $(this).removeClass("animated fadeInDown");
            }
        });

    };

    function initSliders(){
           //Initialize header slider.
        var images = $(".section img");
        Utils.registerLoadOnVisible(images,function(elem){
            Utils.lazyLoadImage(elem);
        },true);
        // $('#da-slider').cslider();

    };

    function bindGATrackingElements() {
        $("#send-mail").on("click",function(){
            Hocalwire.Services.AnalyticsService.sendGAEvent("contactus","submit","send-message");
            sendMail();
        });

        /******* Navigation ******/
        $(".js-nav-home").on("click",function(){
            Hocalwire.Services.AnalyticsService.sendGAEvent("home-nav","click","home");
        });
        $(".js-nav-whyus").on("click",function(){
            Hocalwire.Services.AnalyticsService.sendGAEvent("home-nav","click","whyus");
        });

        $(".js-nav-reviews").on("click",function(){
            Hocalwire.Services.AnalyticsService.sendGAEvent("home-nav","click","reviews");
        });

    }

})();


text:
module LongLat
  extend ActiveSupport::Concern

  def latitude
    self.longlat['coordinates'][1]
  end

  def longitude
    self.longlat['coordinates'][0]
  end

end


text:
package com.pengyifan.leetcode;

import java.util.Arrays;

/**
 * Given an array S of n integers, find three integers in S such that the sum is closest to a given
 * number, target. Return the sum of the three integers. You may assume that each input would have
 * exactly one solution.
 * <pre>
 *   For example, given array S = {-1 2 1 -4}, and target = 1.
 *   The sum that is closest to the target is 2. (-1 + 2 + 1 = 2).
 * </pre>
 */
public class ThreeSumClosest {
  public int threeSumClosest(int[] nums, int target) {
    if (nums == null || nums.length == 0) {
      return Integer.MIN_VALUE;
    }

    nums = sort(nums);

    int min = Integer.MAX_VALUE;
    for (int i = 0; i < nums.length; i++) {
      int j = i + 1;
      int k = nums.length - 1;
      while (j < k) {
        int sum = nums[i] + nums[j] + nums[k];
        if (isSmaller(sum, target, min)) {
          min = target - sum;
        }
        if (min == 0) {
          return target;
        }
        if (sum <= target) {
          j++;
        } else {
          k--;
        }
      }
    }
    return target - min;
  }

  private boolean isSmaller(int sum, int target, int min) {
    return Math.abs(min) > Math.abs(target - sum);
  }

  private int[] sort(int[] nums) {
    Arrays.sort(nums);
    return nums;
  }
}


text:
package ru.vyarus.dropwizard.guice.injector.lookup;

import com.google.inject.Injector;
import io.dropwizard.Application;

import javax.inject.Provider;

/**
 * Lazy injector provider. Used internally instead of direct injector reference when injector is not constructed yet.
 * It is not registered in guice context and used purely as lazy reference to injector during startup
 * (in jersey bindings logic).
 *
 * @author Vyacheslav Rusakov
 * @see InjectorLookup
 * @since 19.04.2015
 */
public class InjectorProvider implements Provider<Injector> {

    private final Application application;
    private Injector injector;

    public InjectorProvider(final Application application) {
        this.application = application;
    }

    @Override
    public Injector get() {
        if (injector == null) {
            injector = InjectorLookup.getInjector(application).get();
        }
        return injector;
    }
}


text:
/* tslint:disable */

import { ConcreteFragment } from "relay-runtime";
declare const _MockRelayRendererFixtures_artist$ref: unique symbol;
export type MockRelayRendererFixtures_artist$ref = typeof _MockRelayRendererFixtures_artist$ref;
export type MockRelayRendererFixtures_artist = {
    readonly name: string | null;
    readonly " $refType": MockRelayRendererFixtures_artist$ref;
};

const node: ConcreteFragment = {
  "kind": "Fragment",
  "name": "MockRelayRendererFixtures_artist",
  "type": "Artist",
  "metadata": null,
  "argumentDefinitions": [],
  "selections": [
    {
      "kind": "ScalarField",
      "alias": null,
      "name": "name",
      "args": null,
      "storageKey": null
    },
    {
      "kind": "ScalarField",
      "alias": null,
      "name": "__id",
      "args": null,
      "storageKey": null
    }
  ]
};
(node as any).hash = '00923700fab4960aafc6cd20281ef191';
export default node;


text:
package example.basic_routing;

import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author maurice.zeijen@smies.com
 *
 */
public class AComponent  {

	private static final Logger log = LoggerFactory.getLogger(AComponent.class);

	/**
	 * Receives the Map payload and log's the contents of it.
	 *
	 * @param payload
	 * @return
	 * @throws Exception
	 */
	public Object onCall(Map<String, String> payload) throws Exception {
		String id = payload.get("id");
		String value = payload.get("value");
		String idValue = id + "=" + value;

		log.info("Component A is called with the id and value: "+ idValue);

		return idValue;
	}

}


text:
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.

namespace NServiceKit.Html
{
    /// Values that represent InputType.
	public enum InputType
	{
        /// An enum constant representing the check box option.
		CheckBox,

        /// An enum constant representing the hidden option.
		Hidden,

        /// An enum constant representing the password option.
		Password,

        /// An enum constant representing the radio option.
		Radio,

        /// An enum constant representing the text option.
		Text
	}
}


text:
![](https://raw.githubusercontent.com/maxfriedrich/quiet-facebook/master/screenshot.png)

## Installation

- **Chrome and Firefox:** Install the stylesheet [via Userstyles.org, using the Stylish extension](https://userstyles.org/styles/128616/quiet-facebook-official).
- **Safari:** Clone this repository or download the ZIP to disk, open Safari Preferences, Advanced, select downloaded `quiet-facebook.css` in Style sheet dropdown.


text:
var dir_abeb556203832c253bc3f8b2ef6689bb =
[
    [ "AuthenticationController.cs", "_authentication_controller_8cs.html", [
      [ "AuthenticationController", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_authentication_controller.html", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_authentication_controller" ]
    ] ],
    [ "ClusterManagement.cs", "_cluster_management_8cs.html", [
      [ "ClusterManagement", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_cluster_management.html", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_cluster_management" ]
    ] ],
    [ "ConfigurationConnection.cs", "_configuration_connection_8cs.html", [
      [ "ConfigurationConnection", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_configuration_connection.html", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_configuration_connection" ]
    ] ],
    [ "CurrentUserApi.cs", "_current_user_api_8cs.html", [
      [ "CurrentUserApi", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_current_user_api.html", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_current_user_api" ]
    ] ],
    [ "MigrationConnection.cs", "_migration_connection_8cs.html", [
      [ "MigrationConnection", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_migration_connection.html", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_migration_connection" ]
    ] ],
    [ "NodeManagerApi.cs", "_node_manager_api_8cs.html", "_node_manager_api_8cs" ],
    [ "NodeManagerController.cs", "_node_manager_controller_8cs.html", [
      [ "NodeManagerController", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_node_manager_controller.html", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_node_manager_controller" ]
    ] ],
    [ "NugetPackagesConnection.cs", "_nuget_packages_connection_8cs.html", [
      [ "NugetPackagesConnection", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_nuget_packages_connection.html", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_nuget_packages_connection" ]
    ] ],
    [ "RolesConnection.cs", "_roles_connection_8cs.html", [
      [ "RolesConnection", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_roles_connection.html", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_roles_connection" ]
    ] ],
    [ "UsersConnection.cs", "_users_connection_8cs.html", [
      [ "UsersConnection", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_users_connection.html", "class_kluster_kite_1_1_node_manager_1_1_web_api_1_1_users_connection" ]
    ] ]
];


text:
#ifndef CR_LIMITS_H
#define CR_LIMITS_H

#include "chromium.h"
#include "cr_version.h"

#ifdef __cplusplus
extern "C" {
#endif

/* glGetString strings */
#define CR_RENDERER "Chromium"
#define CR_VENDOR "Humper"

#define CR_MAX_TEXTURE_UNITS		8
#define CR_MAX_GENERAL_COMBINERS	8
#define CR_MAX_TEXTURE_SIZE		4096
#define CR_MAX_3D_TEXTURE_SIZE		512
#define CR_MAX_CUBE_TEXTURE_SIZE	4096
#define CR_MAX_RECTANGLE_TEXTURE_SIZE	4096
#define CR_MAX_TEXTURE_ANISOTROPY	8.0
#define CR_MAX_LIGHTS			8
#define CR_MAX_CLIP_PLANES		8
#define CR_MAX_PROJECTION_STACK_DEPTH	32
#define CR_MAX_MODELVIEW_STACK_DEPTH	32
#define CR_MAX_TEXTURE_STACK_DEPTH	10
#define CR_MAX_COLOR_STACK_DEPTH	2
#define CR_MAX_ATTRIB_STACK_DEPTH	16
#define CR_MAX_CLIENT_ATTRIB_STACK_DEPTH	16
#define CR_MAX_NAME_STACK_DEPTH		64
#define CR_MAX_ELEMENTS_INDICES		16384
#define CR_MAX_ELEMENTS_VERTICES	16384
#define CR_MAX_EVAL_ORDER		8
#define CR_MAX_LIST_NESTING		64
#define CR_MAX_PIXEL_MAP_TABLE		256
#define CR_MAX_VIEWPORT_DIM		16384
#define CR_SUBPIXEL_BITS		8
#define CR_ALIASED_POINT_SIZE_MIN	1.0
#define CR_ALIASED_POINT_SIZE_MAX	64.0
#define CR_SMOOTH_POINT_SIZE_MIN	1.0
#define CR_SMOOTH_POINT_SIZE_MAX	64.0
#define CR_POINT_SIZE_GRANULARITY	0.5
#define CR_ALIASED_LINE_WIDTH_MIN	1.0
#define CR_ALIASED_LINE_WIDTH_MAX	64.0
#define CR_SMOOTH_LINE_WIDTH_MIN	1.0
#define CR_SMOOTH_LINE_WIDTH_MAX	64.0
#define CR_LINE_WIDTH_GRANULARITY	0.5
#define CR_MAX_VERTEX_ATTRIBS           16
#define CR_MAX_TEXTURE_LOD_BIAS         8.0
#ifdef CR_NV_fragment_program
#define CR_MAX_TEXTURE_COORDS           2
#define CR_MAX_TEXTURE_IMAGE_UNITS      2
#define CR_MAX_FRAGMENT_LOCAL_PARAMS    64
#endif
#ifdef CR_NV_vertex_program
#define CR_MAX_PROGRAM_MATRICES           8
#define CR_MAX_PROGRAM_MATRIX_STACK_DEPTH 4
#endif
#ifdef CR_ARB_fragment_program
#define CR_MAX_FRAGMENT_PROGRAM_INSTRUCTIONS       72
#define CR_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMS       24
#define CR_MAX_FRAGMENT_PROGRAM_ENV_PARAMS         24
#define CR_MAX_FRAGMENT_PROGRAM_TEMPS              16
#define CR_MAX_FRAGMENT_PROGRAM_ATTRIBS            10
#define CR_MAX_FRAGMENT_PROGRAM_ADDRESS_REGS        1
#define CR_MAX_FRAGMENT_PROGRAM_ALU_INSTRUCTIONS   48
#define CR_MAX_FRAGMENT_PROGRAM_TEX_INSTRUCTIONS   24
#define CR_MAX_FRAGMENT_PROGRAM_TEX_INDIRECTIONS    4
#endif
#ifdef CR_ARB_vertex_program
#define CR_MAX_VERTEX_PROGRAM_INSTRUCTIONS 128
#define CR_MAX_VERTEX_PROGRAM_LOCAL_PARAMS  96
#define CR_MAX_VERTEX_PROGRAM_ENV_PARAMS   256 /* for GL_NV_vertex_program2 */
#define CR_MAX_VERTEX_PROGRAM_TEMPS         12
#define CR_MAX_VERTEX_PROGRAM_ATTRIBS       16
#define CR_MAX_VERTEX_PROGRAM_ADDRESS_REGS   1
#endif

#if defined(CR_ARB_vertex_program) || defined(CR_ARB_fragment_program)
/* These must be the max of the fragment and vertex program limits */
#define CR_MAX_PROGRAM_LOCAL_PARAMS  (CR_MAX_VERTEX_PROGRAM_LOCAL_PARAMS > CR_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMS ? CR_MAX_VERTEX_PROGRAM_LOCAL_PARAMS : CR_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMS)

#define CR_MAX_PROGRAM_ENV_PARAMS  (CR_MAX_VERTEX_PROGRAM_ENV_PARAMS > CR_MAX_FRAGMENT_PROGRAM_ENV_PARAMS ? CR_MAX_VERTEX_PROGRAM_ENV_PARAMS : CR_MAX_FRAGMENT_PROGRAM_ENV_PARAMS)
#endif

/* Just need these for autogenerated code in state_get.c, etc */
#if defined(CR_ARB_vertex_program) || defined(CR_NV_vertex_program)
#define CR_any_vertex_program 1
#endif

#if defined(CR_ARB_fragment_program) || defined(CR_NV_fragment_program)
#define CR_any_fragment_program 1
#endif

#if defined(CR_any_vertex_program) || defined(CR_any_fragment_program)
#define CR_any_program 1
#endif

/*
 * OpenGL's implementation-dependent values (not part of any attribute group).
 */
typedef struct {
	GLuint maxTextureUnits;
	GLuint maxTextureSize;
	GLuint max3DTextureSize;	/* OpenGL 1.2 */
#ifdef CR_ARB_texture_cube_map
	GLuint maxCubeMapTextureSize;
#endif
	GLuint maxLights;
	GLuint maxClipPlanes;
	GLuint maxProjectionStackDepth;
	GLuint maxModelviewStackDepth;
	GLuint maxTextureStackDepth;
	GLuint maxColorStackDepth;	/* OpenGL 1.2 */
	GLuint maxAttribStackDepth;
	GLuint maxClientAttribStackDepth;
	GLuint maxNameStackDepth;
	GLuint maxElementsIndices;
	GLuint maxElementsVertices;
	GLuint maxEvalOrder;
	GLuint maxListNesting;
	GLuint maxPixelMapTable;
	GLint maxViewportDims[2];
	GLuint subpixelBits;
	GLfloat aliasedPointSizeRange[2];
	GLfloat smoothPointSizeRange[2];
	GLfloat pointSizeGranularity;
	GLfloat aliasedLineWidthRange[2];
	GLfloat smoothLineWidthRange[2];
	GLfloat lineWidthGranularity;
#ifdef CR_EXT_texture_lod_bias
	GLfloat maxTextureLodBias;
#endif
#ifdef CR_EXT_texture_filter_anisotropic
	GLfloat maxTextureAnisotropy;
#endif
#ifdef CR_ARB_texture_compression
	GLuint numCompressedFormats;
	GLenum compressedFormats[10];
#endif
#ifdef CR_NV_register_combiners
	GLuint maxGeneralCombiners;
#endif
#ifdef CR_NV_texture_rectangle
	GLuint maxRectTextureSize;
#endif
#ifdef CR_NV_fragment_program
	GLuint maxTextureCoords;
	GLuint maxTextureImageUnits;
	/*GLuint maxFragmentProgramLocalParams;*/
#endif
#ifdef CR_NV_vertex_program
	GLuint maxProgramMatrixStackDepth;
	GLuint maxProgramMatrices;
#endif
#ifdef CR_ARB_fragment_program
	GLuint maxFragmentProgramInstructions;
	GLuint maxFragmentProgramLocalParams;
	GLuint maxFragmentProgramEnvParams;
	GLuint maxFragmentProgramTemps;
	GLuint maxFragmentProgramAttribs;
	GLuint maxFragmentProgramAddressRegs;
	GLuint maxFragmentProgramAluInstructions;
	GLuint maxFragmentProgramTexInstructions;
	GLuint maxFragmentProgramTexIndirections;
#endif
#ifdef CR_ARB_vertex_program
	GLuint maxVertexProgramInstructions;
	GLuint maxVertexProgramLocalParams;
	GLuint maxVertexProgramEnvParams;
	GLuint maxVertexProgramTemps;
	GLuint maxVertexProgramAttribs;
	GLuint maxVertexProgramAddressRegs;
#endif
	const GLubyte *extensions;

	/* Framebuffer/visual attributes */
	GLuint redBits, greenBits, blueBits, alphaBits;
	GLuint depthBits, stencilBits, indexBits;
	GLuint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits;
	GLuint auxBuffers;
	GLboolean rgbaMode;
	GLboolean doubleBuffer;
	GLboolean stereo;
	GLuint sampleBuffers;
	GLuint samples;
	GLuint level;

} CRLimitsState;

/* Booleans to indicate which OpenGL extensions are supported at runtime.
 * XXX might merge this into the above structure someday.
 */
typedef struct {
	GLboolean ARB_depth_texture;
	GLboolean ARB_fragment_program;
	GLboolean ARB_imaging;
	GLboolean ARB_multisample;
	GLboolean ARB_multitexture;
	GLboolean ARB_occlusion_query;
	GLboolean ARB_point_parameters;
	GLboolean ARB_point_sprite;
	GLboolean ARB_shadow;
	GLboolean ARB_shadow_ambient;
	GLboolean ARB_texture_border_clamp; /* or SGIS_texture_border_clamp */
	GLboolean ARB_texture_compression;
	GLboolean ARB_texture_cube_map; /* or EXT_texture_cube_map */
	GLboolean ARB_texture_env_add; /* standard in OpenGL 1.3 */
	GLboolean ARB_texture_env_combine; /* standard in OpenGL 1.3 */
	GLboolean ARB_texture_env_crossbar; /* standard in OpenGL 1.4 */
	GLboolean ARB_texture_env_dot3; /* standard in OpenGL 1.3 */
	GLboolean ARB_texture_mirrored_repeat;
	GLboolean ARB_texture_non_power_of_two; /* standard in 1.5 */
	GLboolean ARB_transpose_matrix;
	GLboolean ARB_vertex_buffer_object;
	GLboolean ARB_vertex_program;
	GLboolean ARB_window_pos;
	GLboolean EXT_blend_color;
	GLboolean EXT_blend_logic_op;
	GLboolean EXT_blend_func_separate;
	GLboolean EXT_blend_minmax;
	GLboolean EXT_blend_subtract;
	GLboolean EXT_clip_volume_hint;
	GLboolean EXT_fog_coord;
	GLboolean EXT_multi_draw_arrays;
	GLboolean EXT_secondary_color;
	GLboolean EXT_separate_specular_color;
	GLboolean EXT_shadow_funcs;
	GLboolean EXT_stencil_wrap;
	GLboolean EXT_texture_edge_clamp; /* or SGIS_texture_edge_clamp */
	GLboolean EXT_texture_filter_anisotropic;
	GLboolean EXT_texture_lod_bias;
	GLboolean EXT_texture3D;
	GLboolean IBM_rasterpos_clip;
	GLboolean NV_fog_distance;
	GLboolean NV_fragment_program;
	GLboolean NV_register_combiners;
	GLboolean NV_register_combiners2;
	GLboolean NV_texgen_reflection;
	GLboolean NV_texture_rectangle;
	GLboolean NV_vertex_program;
	GLboolean NV_vertex_program1_1;
	GLboolean NV_vertex_program2;
	GLboolean SGIS_generate_mipmap;

	/* derived from above */
	GLboolean any_vertex_program;    /* NV or ARB */
	GLboolean any_fragment_program;  /* NV or ARB */
	GLboolean any_program;  /* vertex or fragment */
} CRExtensionState;

extern void crStateLimitsInit(CRLimitsState *limits);
extern void crStateLimitsDestroy(CRLimitsState *limits);

extern void crStateLimitsPrint(const CRLimitsState *limits);

extern GLfloat crStateComputeVersion(float minVersion);

extern GLubyte * crStateMergeExtensions(GLuint n, const GLubyte **extensions);

extern void crStateExtensionsInit( CRLimitsState *limits, CRExtensionState *extensions );

#ifdef __cplusplus
}
#endif

#endif /* CR_STATE_FOG_H */


text:
#include "fsl_lpuart_freertos.h"
#include <FreeRTOS.h>
#include <event_groups.h>
#include <semphr.h>

/*******************************************************************************
 * Definitions
 ******************************************************************************/

/*******************************************************************************
 * Prototypes
 ******************************************************************************/

/*******************************************************************************
 * Variables
 ******************************************************************************/

/*******************************************************************************
 * Code
 ******************************************************************************/

static void LPUART_RTOS_Callback(LPUART_Type *base, lpuart_handle_t *state, status_t status, void *param)
{
    lpuart_rtos_handle_t *handle = (lpuart_rtos_handle_t *)param;
    BaseType_t xHigherPriorityTaskWoken, xResult;

    xHigherPriorityTaskWoken = pdFALSE;
    xResult = pdFAIL;

    if (status == kStatus_LPUART_RxIdle)
    {
        xResult = xEventGroupSetBitsFromISR(handle->rx_event, RTOS_UART_COMPLETE, &xHigherPriorityTaskWoken);
    }
    else if (status == kStatus_LPUART_TxIdle)
    {
        xResult = xEventGroupSetBitsFromISR(handle->tx_event, RTOS_UART_COMPLETE, &xHigherPriorityTaskWoken);
    }

    if (xResult != pdFAIL)
    {
        portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
    }
}

/*FUNCTION**********************************************************************
 *
 * Function Name : LPUART_RTOS_Init
 * Description   : Initializes the LPUART instance for application
 *
 *END**************************************************************************/
int LPUART_RTOS_Init(lpuart_rtos_handle_t *handle, lpuart_handle_t *t_handle, const struct rtos_lpuart_config *cfg)
{
    lpuart_config_t defcfg;

    if (NULL == handle)
    {
        return kStatus_InvalidArgument;
    }
    if (NULL == t_handle)
    {
        return kStatus_InvalidArgument;
    }
    if (NULL == cfg)
    {
        return kStatus_InvalidArgument;
    }
    if (NULL == cfg->base)
    {
        return kStatus_InvalidArgument;
    }
    if (0 == cfg->srcclk)
    {
        return kStatus_InvalidArgument;
    }
    if (0 == cfg->baudrate)
    {
        return kStatus_InvalidArgument;
    }

    handle->base = cfg->base;
    handle->t_state = t_handle;

    handle->tx_sem = xSemaphoreCreateMutex();
    if (NULL == handle->tx_sem)
    {
        return kStatus_Fail;
    }
    handle->rx_sem = xSemaphoreCreateMutex();
    if (NULL == handle->rx_sem)
    {
        vSemaphoreDelete(handle->tx_sem);
        return kStatus_Fail;
    }
    handle->tx_event = xEventGroupCreate();
    if (NULL == handle->tx_event)
    {
        vSemaphoreDelete(handle->rx_sem);
        vSemaphoreDelete(handle->tx_sem);
        return kStatus_Fail;
    }
    handle->rx_event = xEventGroupCreate();
    if (NULL == handle->rx_event)
    {
        vEventGroupDelete(handle->rx_event);
        vSemaphoreDelete(handle->rx_sem);
        vSemaphoreDelete(handle->tx_sem);
        return kStatus_Fail;
    }
    LPUART_GetDefaultConfig(&defcfg);

    defcfg.baudRate_Bps = cfg->baudrate;
    defcfg.parityMode = cfg->parity;
    defcfg.stopBitCount = cfg->stopbits;

    LPUART_Init(handle->base, &defcfg, cfg->srcclk);
    LPUART_TransferCreateHandle(handle->base, handle->t_state, LPUART_RTOS_Callback, handle);
    LPUART_TransferStartRingBuffer(handle->base, handle->t_state, cfg->buffer, cfg->buffer_size);

    LPUART_EnableTx(handle->base, true);
    LPUART_EnableRx(handle->base, true);

    return 0;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : LPUART_RTOS_Deinit
 * Description   : Deinitializes the LPUART instance and frees resources
 *
 *END**************************************************************************/
int LPUART_RTOS_Deinit(lpuart_rtos_handle_t *handle)
{
    LPUART_Deinit(handle->base);

    vEventGroupDelete(handle->tx_event);
    vEventGroupDelete(handle->rx_event);

    /* Give the semaphore. This is for functional safety */
    xSemaphoreGive(handle->tx_sem);
    xSemaphoreGive(handle->rx_sem);

    vSemaphoreDelete(handle->tx_sem);
    vSemaphoreDelete(handle->rx_sem);

    /* Invalidate the handle */
    handle->base = NULL;
    handle->t_state = NULL;

    return 0;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : UART_RTOS_Send
 * Description   : Initializes the UART instance for application
 *
 *END**************************************************************************/
int LPUART_RTOS_Send(lpuart_rtos_handle_t *handle, const uint8_t *buffer, uint32_t length)
{
    EventBits_t ev;
    int retval = kStatus_Success;

    if (NULL == handle->base)
    {
        /* Invalid handle. */
        return kStatus_Fail;
    }
    if (0 == length)
    {
        return 0;
    }
    if (NULL == buffer)
    {
        return kStatus_InvalidArgument;
    }

    if (pdFALSE == xSemaphoreTake(handle->tx_sem, 0))
    {
        /* We could not take the semaphore, exit with 0 data received */
        return kStatus_Fail;
    }

    handle->tx_xfer.data = (uint8_t *)buffer;
    handle->tx_xfer.dataSize = (uint32_t)length;

    ev = xEventGroupClearBits(handle->tx_event, RTOS_UART_COMPLETE);
    assert(ev == 0);

    /* Non-blocking call */
    LPUART_TransferSendNonBlocking(handle->base, handle->t_state, &handle->tx_xfer);

    ev = xEventGroupWaitBits(handle->tx_event, RTOS_UART_COMPLETE, pdTRUE, pdFALSE, portMAX_DELAY);
    if (!(ev & RTOS_UART_COMPLETE))
    {
        retval = kStatus_Fail;
    }

    if (pdFALSE == xSemaphoreGive(handle->tx_sem))
    {
        /* We could not post the semaphore, exit with error */
        retval = kStatus_Fail;
    }

    return retval;
}

/*FUNCTION**********************************************************************
 *
 * Function Name : LPUART_RTOS_Recv
 * Description   : Receives chars for the application
 *
 *END**************************************************************************/
int LPUART_RTOS_Receive(lpuart_rtos_handle_t *handle, uint8_t *buffer, uint32_t length, size_t *received)
{
    EventBits_t ev;
    size_t n = 0;
    int retval = kStatus_Success;

    if (NULL == handle->base)
    {
        /* Invalid handle. */
        return kStatus_Fail;
    }
    if (0 == length)
    {
        if (received != NULL)
        {
            *received = n;
        }
        return 0;
    }
    if (NULL == buffer)
    {
        return kStatus_InvalidArgument;
    }

    if (pdFALSE == xSemaphoreTake(handle->rx_sem, portMAX_DELAY))
    {
        /* We could not take the semaphore, exit with 0 data received */
        return kStatus_Fail;
    }

    handle->rx_xfer.data = buffer;
    handle->rx_xfer.dataSize = (uint32_t)length;

    ev = xEventGroupClearBits(handle->rx_event, RTOS_UART_COMPLETE);
    assert(ev == 0);

    /* Non-blocking call */
    LPUART_TransferReceiveNonBlocking(handle->base, handle->t_state, &handle->rx_xfer, &n);

    if (n < length)
    {
        ev = xEventGroupWaitBits(handle->rx_event, RTOS_UART_COMPLETE, pdTRUE, pdFALSE, portMAX_DELAY);
        if (ev & RTOS_UART_COMPLETE)
        {
            n = length;
        }
        else
        {
            retval = kStatus_Fail;
        }
    }

    if (pdFALSE == xSemaphoreGive(handle->rx_sem))
    {
        /* We could not post the semaphore, exit with error */
        retval = kStatus_Fail;
    }

    if (received != NULL)
    {
        *received = n;
    }

    return retval;
}


text:
from datetime import datetime, date, time
from django.shortcuts import render_to_response, redirect
from django.template.context import RequestContext
from django.contrib import admin, messages
from django.contrib.auth.models import User
from django.contrib.auth.admin import UserAdmin
import autocomplete_light

from intranet.admin import ModelAdminPlus
from models import Solicitacao, HorarioSolicitacao, tipos_de_refeicao_choices
from forms import SolicitacaoAddForm
from views import solicitacao_add_view

class AdUserAdmin(UserAdmin):
    list_display = ("username", "first_name", "last_name")
    list_filter = []
    readonly_fields = ("first_name", "last_name")
    fieldsets = (
        (None, {'fields': ("first_name", "last_name", 'groups',)}),
    )
    def get_actions(self, request):
        actions = super(AdUserAdmin, self).get_actions(request)
        if actions.has_key("delete_selected"):
            del actions["delete_selected"]
        return actions

    def has_delete_permission(self, request, obj=None):
        if request.user.is_superuser:
            return True
        else:
            return False

del UserAdmin.form

class SolicitacaoAdmin(ModelAdminPlus):
    readonly = True
    list_display = ("aluno_nome", "data", "motivo", "aceito")
    string_overrides = {
        "changelist_title": u"Solicitações de Refeição",
    }

    def __init__(self, *args, **kwargs):
        super(SolicitacaoAdmin, self).__init__(*args, **kwargs)
        self.list_display_links = (None, )

    def queryset(self, request):
        qs = super(SolicitacaoAdmin, self).queryset(request)
        if request.user.is_superuser:
            return qs
        horarios = HorarioSolicitacao.objects.filter(hora_inicio__lt=datetime.now()).order_by("-hora_fim")
        if(horarios.count() > 0):
            horario = horarios[0]
            datahora_inicio = datetime.combine(datetime.today(), horario.hora_inicio)
            datahora_fim = datetime.combine(datetime.today(), horario.hora_fim)
            return qs.filter(data__lt=datahora_fim, data__gt=datahora_inicio)

    def add_view(self, request, form_url='', extra_context=None):
        return solicitacao_add_view(request, form_url, extra_context)

    def deferir(self, request, queryset):
        for obj in queryset:
            obj.aceito = True
            obj.save()
        messages.info(request, "As incrições foram deferidas.")

    def indeferir(self, request, queryset):
        for obj in queryset:
            obj.aceito = False
            obj.save()
        messages.info(request, "As incrições foram indeferidas.")

    def limparRegistros(self, request, obj=None):
        for horario in HorarioSolicitacao.objects.all():
            agora = datetime.time(datetime.now())
            if agora > horario.hora_inicio and agora < horario.hora_fim:
                messages.warning(request, "Não permitido limpar registros durante o horário de solicitações.")
                return
        Solicitacao.objects.all().delete()
        messages.info(request, "Todos os itens foram removidos.")
    limparRegistros.short_description = "Limpar registros"

    def imprimirLista(self, request, obj=None):
        horarios = HorarioSolicitacao.objects.filter(hora_inicio__lt=datetime.now()).order_by("-hora_fim")
        if(horarios.count() > 0):
            horario = horarios[0]
            datahora_inicio = datetime.combine(datetime.today(), horario.hora_inicio)
            datahora_fim = datetime.combine(datetime.today(), horario.hora_fim)
            context = {
                "data": date.today(),
                "ficha": "Lista do %s" % (horario.get_tipo_display()),
                "alunos": [x.aluno for x in Solicitacao.objects.filter(aceito=True, data__lt=datahora_fim, data__gt=datahora_inicio)],
            }
            context["alunos"].sort(key=lambda x: x.full_name)
            return render_to_response("solicitacao_imprimir.html", context, context_instance=RequestContext(request))
    imprimirLista.short_description = "Imprimir lista"

    list_buttons = (imprimirLista,)
    actions = [deferir, indeferir]

    def has_change_permission(self, request, obj=None):
        if obj is None:
            return super(SolicitacaoAdmin, self).has_change_permission(request, obj)
        else:
            return False

class HorarioSolicitacaoAdmin(ModelAdminPlus):
    list_display = ("tipo", "hora_inicio", "hora_fim")
    string_overrides = {
        "changelist_title": u"Horários de Solicitações",
    }

admin.site.unregister(User)
admin.site.register(User, AdUserAdmin)
admin.site.register(Solicitacao, SolicitacaoAdmin)
admin.site.register(HorarioSolicitacao, HorarioSolicitacaoAdmin)


text:
package org.jsoup;

import org.junit.jupiter.api.extension.AfterEachCallback;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.ArgumentsProvider;
import org.junit.jupiter.params.provider.ArgumentsSource;

import java.lang.annotation.*;
import java.util.Locale;
import java.util.stream.Stream;

public class MultiLocaleExtension implements AfterEachCallback, ArgumentsProvider {
    private final Locale defaultLocale = Locale.getDefault();

    @Override
    public void afterEach(ExtensionContext context) {
        Locale.setDefault(defaultLocale);
    }

    @Override
    public Stream<? extends Arguments> provideArguments(ExtensionContext extensionContext) {
        return Stream.of(Arguments.of(Locale.ENGLISH), Arguments.arguments(new Locale("tr")));
    }

    @Documented
    @Target(ElementType.METHOD)
    @Retention(RetentionPolicy.RUNTIME)
    @ArgumentsSource(MultiLocaleExtension.class)
    @ExtendWith(MultiLocaleExtension.class)
    @ParameterizedTest
    public @interface MultiLocaleTest {
    }

}


text:
package watch

import (
	"bytes"
	"testing"
	"time"

	"github.com/issue9/assert/v3"
)

func TestLogger(t *testing.T) {
	a := assert.New(t, false)

	erro := new(bytes.Buffer)
	out := new(bytes.Buffer)
	logs := NewConsoleLogger(true, erro, out)
	a.NotNil(logs)

	logs.Output(LogTypeError, "error")
	time.Sleep(300 * time.Microsecond)
	a.NotEmpty(erro.String())
	a.Empty(out.String())

	erro.Reset()
	out.Reset()
	logs.Output(LogTypeIgnore, "message")
	time.Sleep(300 * time.Microsecond)
	a.Empty(erro.String())
	a.NotEmpty(out.String())

	// ignore=false
	erro.Reset()
	out.Reset()
	logs = NewConsoleLogger(false, erro, out)
	a.NotNil(logs)
	logs.Output(LogTypeIgnore, "message")
	time.Sleep(300 * time.Microsecond)
	a.Empty(out.String())
}

func TestAsWriter(t *testing.T) {
	a := assert.New(t, false)
	erro := &bytes.Buffer{}
	out := &bytes.Buffer{}
	logs := NewConsoleLogger(true, erro, out)
	a.NotNil(logs)

	w := asWriter(LogTypeInfo, logs)
	n, err := w.Write([]byte("abc"))
	a.NotError(err).Equal(n, 3)
	time.Sleep(300 * time.Microsecond)
	a.Contains(out.String(), "abc").NotContains(erro.String(), "abc")

	w = asWriter(LogTypeError, logs)
	n, err = w.Write([]byte("defg"))
	a.NotError(err).Equal(n, 4)
	time.Sleep(300 * time.Microsecond)
	a.Contains(out.String(), "abc").Contains(erro.String(), "defg")
}


text:
#pragma once

void defineContour();


text:
layout: post
date: '2016-01-08'
title: "Amanda Wakeley Dahlia Wedding Dress Sleeveless Chapel Train Sheath/Column"
category: Amanda Wakeley
tags: [Amanda Wakeley,Sheath/Column,Strapless,Chapel Train,Sleeveless]
---
### Amanda Wakeley Dahlia Wedding Dress
Just **$289.99**
###   Sleeveless Chapel Train Sheath/Column

BRANDS	Amanda Wakeley

Silhouette	Sheath/Column

Neckline	Strapless

Hemline/Train	Chapel Train

Sleeve	Sleeveless

Buy it: [https://www.readybrides.com/en/amanda-wakeley/17532-amanda-wakeley-dahlia-wedding-dress.html](https://www.readybrides.com/en/amanda-wakeley/17532-amanda-wakeley-dahlia-wedding-dress.html)


text:
/**
 * @license
 * SPDX-License-Identifier: Apache-2.0
 */

import '../environment/dev';

import {ensureTokenIsValid, secretToken} from './secrets';

/**
 * A complete CSS style sheet, safe to use in style contexts in an HTML document
 * or DOM APIs.
 */
export abstract class SafeStyleSheet {
  // @ts-ignore: error TS6133: 'brand' is declared but its value is never read.
  private readonly brand!: never;  // To prevent structural typing.
}

/** Implementation for `SafeStyleSheet` */
class StyleSheetImpl extends SafeStyleSheet {
  readonly privateDoNotAccessOrElseWrappedStyleSheet: string;

  constructor(styleSheet: string, token: object) {
    super();
    if (process.env.NODE_ENV !== 'production') {
      ensureTokenIsValid(token);
    }
    this.privateDoNotAccessOrElseWrappedStyleSheet = styleSheet;
  }

  override toString(): string {
    return this.privateDoNotAccessOrElseWrappedStyleSheet;
  }
}

/**
 * Builds a new `SafeStyleSheet` from the given string, without enforcing
 * safety guarantees. This shouldn't be exposed to application developers, and
 * must only be used as a step towards safe builders or safe constants.
 */
export function createStyleSheet(styleSheet: string): SafeStyleSheet {
  return new StyleSheetImpl(styleSheet, secretToken);
}

/**
 * Checks if the given value is a `SafeStyleSheet` instance.
 */
export function isStyleSheet(value: unknown): value is SafeStyleSheet {
  return value instanceof StyleSheetImpl;
}

/**
 * Returns the string value of the passed `SafeStyleSheet` object while
 * ensuring it has the correct type.
 */
export function unwrapStyleSheet(value: SafeStyleSheet): string {
  if (value instanceof StyleSheetImpl) {
    return value.privateDoNotAccessOrElseWrappedStyleSheet;
  } else {
    let message = '';
    if (process.env.NODE_ENV !== 'production') {
      message = 'Unexpected type when unwrapping SafeStyleSheet';
    }
    throw new Error(message);
  }
}