text:
Version 1.2.6:

- Fixed a bug where alternating changes between up- and downgoing zenith angles are not detected correctly and the same results returned

Version 1.2.5:

- Migrated to github actions for CI. Thx @jncots

Version 1.2.3:

- Binary wheel for aarch64 on linux. Thanks to @obidev

Version 1.2.2:

- Added wheels for Python 3.9 on 64 bit systems
- Removed binary wheels for 32bit due to lack of h5py wheels and mainstream has transitioned to 64bit. 32bit users can build MCEq from source.

Version 1.2.0:

- New data tables: physics will be affected mostly low energies < 30 GeV and minor
corrections can be visible for particle ratios at higher energies.
[See dedicated doc page](http://mceq.readthedocs.org/en/latest/v12v11_diff.html).
- tests have been updated to the new version and will fail if used with the old database file
- SIBYLL23C release is updated to patch level 04 instead of the previous 01. The results are very similar and changes are smaller than in CORSIKA because MCEq uses the air target and not the Nitrogen/Oxygen mix.
- QGSJET tables had bugs and there are more pronounced changes
- Projectile equivalence tables updated (thx to [CORSIKA8 team](https://www.ikp.kit.edu/corsika/88.php))
- Documentation badge
- Minor (cosmetic and technical) updates of crflux and particletools packages
- crflux includes the spline for the GlobalSplineFitBeta class and will be updated during install.
- set_density_profile accepts a density object as parameter in parallel to the previous definition
- some config values that can produce inconsistent results (A_target for ex.) are saved in the objects that can trigger such inconsistencies. Changing config values in runtime should be more safe, but not free of failures. It is still not recommended to change config values in runtime if this can be avoided.

Version 1.1.3:

- Added atmospheres for KM3NeT by @Kakiczi (<https://github.com/Kakiczi>)
- new keyword for MCEqRun "build_matrices"=False (to prevent matrix building on init)
- Equivalent projectile mappings separated for SIBYLL 2.1 and 2.3

Version 1.1.2:

- Hotfix for MKL library handler

Version 1.1.0:

Minor version bump because of an interface change in some convenience functions, for example
dNdxlab in particledata. Those now consistently accept kinetic energy arguments. In the
previous versions some of these functions required laboratory energies others kinetic, that
may have generated some confusion. Other changes include:

- multiple calls to `set_single_particle` can define an initial state by using an the `append` flag
- updated to crflux 1.0.3 (Windows compatibility)
- Flux and result array are re-created when interaction model changes (not resized)
- Fixed ctypes bug in NRLMSISE
- Long description fixed in setup.py
- added license to scikit-hep project's azure-build-helpers by Henryii@github
- build includes Python 3.8 binaries (except for 32bit Linux)
- tests moved into MCEq package
- improved ctypes library finding
- new convenience function MCEqRun.closest_energy to obtain the closest grid point
- new convenience functions mceq_config.set_mkl_threads allows setting thread count in run time
- new CorsikaAtmosphere location "ANTARES/KM3NeT-ORCA"
- tests for atmospheres

Version 1.0.9:

- disable_decays flag in advanced options fixed
- threshold energy not used in n_mu, n_e
- new generic function 'n_particles' for arbitrary particle types
- new config option dedx_material

Version 1.0.8:

- Fixed a Python3 compatibility issue in density profiles
- Cross checked and corrected the functionality of "disabled particles" in config file
- Version tagged for paper submission

Version 1.0.6 and 1.0.7:

- A few typos corrected

Version 1.0.5:

- Check added to make sure depth grids are strictly increasing
- Tutorial updated to reflect this fact
- New advanced variable in config "stability_margin"
- New method in MCEqRun to set the entire spectrum for combinations
    of particles as initial condition

Version 1.0.4:
    First official version distributed over PyPi

Version 1.0.0:

General remark::
    This is a major rewrite of the MCEq core code. Mostly obsolete stuff is removed.
    The interfaces to the various data sources are handled in a different way via the
    container 'ParticleManager'. Each MCEqParticle object knows its properties, for
    instance if it can decay or interact, and if requires to be included in continuous
    losses. The matrix generation could be simplified a lot and the class MCEqRun became
    what it was meant to be - a user interface. Several experimental and less successful
    solver implementations have been removed. The splitting between energy and time solvers
    is not necessary anymore since the only successful energy (derivative) solver is the
    one based on DifferentialOperators that are not part of the "C Matrix". With the new
    structure it became simpler to exchange physical models or track particle decays of
    any kind.


text:
using System.Collections.Generic;
using System.IO;
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;

// This file demonstrates how you could have a item database setup where the database is defined
// inside of a scriptable object

namespace FullInspector.Samples.ItemDatabase {
    public class ItemDatabaseSample : BaseScriptableObject<FullSerializerSerializer> {
        // name -> item
        public Dictionary<string, IItem> Items;
    }

    public interface IItem {
    }

    public class ArmorItem : IItem {
        public float Armor;
    }

    public class HealthBoostItem : IItem {
        public float HealthIncrease;
        public float Cooldown;
    }

    public class WeaponItem : IItem {
        public enum WeaponType {
            Sword, Axe, Hammer
        }

        public WeaponType Type;
        public float AttackStrength;
    }

#if UNITY_EDITOR
    public class ItemDatabaseEditorIntegration {
        [MenuItem("Window/Full Inspector/Testing/Create ItemDatabase Scriptable Object")]
        public static void CreateAsset() {
            CreateAsset<ItemDatabaseSample>();
        }

        /// <summary>
        //	This makes it easy to create, name and place unique new ScriptableObject asset files.
        /// </summary>
        public static void CreateAsset<T>() where T : ScriptableObject {
            T asset = ScriptableObject.CreateInstance<T>();

            string path = AssetDatabase.GetAssetPath(Selection.activeObject);
            if (path == "") {
                path = "Assets";
            }
            else if (Path.GetExtension(path) != "") {
                path = path.Replace(Path.GetFileName(AssetDatabase.GetAssetPath(Selection.activeObject)), "");
            }

            string assetPathAndName = AssetDatabase.GenerateUniqueAssetPath(path + "/New " + typeof(T).ToString() + ".asset");

            AssetDatabase.CreateAsset(asset, assetPathAndName);

            AssetDatabase.SaveAssets();
            EditorUtility.FocusProjectWindow();
            Selection.activeObject = asset;
        }
    }
#endif
}

redpajama_set_name: RedPajamaGithub


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

package com.facebook.presto.execution.scheduler;

import com.facebook.presto.metadata.InsertTableHandle;
import com.facebook.presto.metadata.OutputTableHandle;
import com.facebook.presto.spi.SchemaTableName;
import com.facebook.presto.spi.TableHandle;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

import static java.util.Objects.requireNonNull;

@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "@type")
@JsonSubTypes({
        @JsonSubTypes.Type(value = ExecutionWriterTarget.CreateHandle.class, name = "CreateHandle"),
        @JsonSubTypes.Type(value = ExecutionWriterTarget.InsertHandle.class, name = "InsertHandle"),
        @JsonSubTypes.Type(value = ExecutionWriterTarget.DeleteHandle.class, name = "DeleteHandle")})
@SuppressWarnings({"EmptyClass", "ClassMayBeInterface"})
public abstract class ExecutionWriterTarget
{
    public static class CreateHandle
            extends ExecutionWriterTarget
    {
        private final OutputTableHandle handle;
        private final SchemaTableName schemaTableName;

        @JsonCreator
        public CreateHandle(
                @JsonProperty("handle") OutputTableHandle handle,
                @JsonProperty("schemaTableName") SchemaTableName schemaTableName)
        {
            this.handle = requireNonNull(handle, "handle is null");
            this.schemaTableName = requireNonNull(schemaTableName, "schemaTableName is null");
        }

        @JsonProperty
        public OutputTableHandle getHandle()
        {
            return handle;
        }

        @JsonProperty
        public SchemaTableName getSchemaTableName()
        {
            return schemaTableName;
        }

        @Override
        public String toString()
        {
            return handle.toString();
        }
    }

    public static class InsertHandle
            extends ExecutionWriterTarget
    {
        private final InsertTableHandle handle;
        private final SchemaTableName schemaTableName;

        @JsonCreator
        public InsertHandle(
                @JsonProperty("handle") InsertTableHandle handle,
                @JsonProperty("schemaTableName") SchemaTableName schemaTableName)
        {
            this.handle = requireNonNull(handle, "handle is null");
            this.schemaTableName = requireNonNull(schemaTableName, "schemaTableName is null");
        }

        @JsonProperty
        public InsertTableHandle getHandle()
        {
            return handle;
        }

        @JsonProperty
        public SchemaTableName getSchemaTableName()
        {
            return schemaTableName;
        }

        @Override
        public String toString()
        {
            return handle.toString();
        }
    }

    public static class DeleteHandle
            extends ExecutionWriterTarget
    {
        private final TableHandle handle;
        private final SchemaTableName schemaTableName;

        @JsonCreator
        public DeleteHandle(
                @JsonProperty("handle") TableHandle handle,
                @JsonProperty("schemaTableName") SchemaTableName schemaTableName)
        {
            this.handle = requireNonNull(handle, "handle is null");
            this.schemaTableName = requireNonNull(schemaTableName, "schemaTableName is null");
        }

        @JsonProperty
        public TableHandle getHandle()
        {
            return handle;
        }

        @JsonProperty
        public SchemaTableName getSchemaTableName()
        {
            return schemaTableName;
        }

        @Override
        public String toString()
        {
            return handle.toString();
        }
    }
}


text:
export DOMAINS="floppybox.baylaunch.com"
export AWS_HOST=3
export HEROKU_APP="floppybox"

source ../recbro/lib/_include.sh || echo "no include"


text:
package no.acntech.sandbox.exception;

import java.util.UUID;

import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;

@ResponseStatus(code = HttpStatus.CONFLICT)
public class OrderExistsException extends RuntimeException {

    public OrderExistsException(UUID orderId) {
        super("An order already exists for order-id " + orderId);
    }
}


text:
'use strict';

var overview = angular.module("sher.overview", ["chart.js", "angular-peity"]);

overview.controller("tableCtrl", ['$scope', '$state', 'TaskManager', function ($scope, $state, TaskManager) {
	TaskManager.refresh().$promise.then(function(response) {
        $scope.tasks = TaskManager.getTaskManager().slice(0, 5);
    });

    $scope.rowClick = function(taskID){
		$state.go('navbar.detail',{taskID: taskID});
	};
}
]);

overview.controller("heathyCtrl", ['$scope', '$interval', 'TaskManager', function ($scope, $interval, TaskManager) {
    var totalPoints = 60;

    var reload = function() {
        TaskManager.systemUsage(function(response) {
            $scope.cpu.data = shiftAndPush($scope.cpu.data, response.message.used_cpus, response.message.free_cpus);;
            $scope.mem.data = shiftAndPush($scope.mem.data, response.message.used_mem, response.message.free_mem);;
            $scope.disk.data = shiftAndPush($scope.disk.data, response.message.used_disk, response.message.free_disk);;
        });
    }

    $scope.cpu = {
        data: emptyArray(totalPoints),
        options: {
            max: 100,
            min: 0,
            stroke: "#9048d6",
            strokeWidth: 2,
            fill: "#3d365e",
            width: "100%",
            height: "140px",
        }
    };

    $scope.mem = {
    	data: emptyArray(totalPoints),
        options: {
            max: 100,
            min: 0,
            stroke: "#8b54d7",
            strokeWidth: 2,
            fill: "#3d365e",
            width: "100%",
            height: "60px",
        }
    };
    $scope.disk = {
    	data: emptyArray(totalPoints),
        options: {
            max: 100,
            min: 0,
            stroke: "#8b54d7",
            strokeWidth: 2,
            fill: "#3d365e",
            width: "100%",
            height: "60px",
        }
    };

    reload();
    // 加载任务, 定时监控
    var timer = $interval(function() {
        reload();
    }, 1000);

    // 离开页面时删除计时器
    $scope.$on("$destroy", function(event) {
        $interval.cancel(timer);
    })
}
]);

overview.controller("jobCtrl", ['$scope', '$interval', '$state', 'JobManager', function ($scope, $interval, $state, JobManager) {
    var reload = function () {
        JobManager.refresh().$promise.then(function(response) {
            $scope.jobs = {
                total: JobManager.getJobsByStatus('all'),
                running: JobManager.getJobsByStatus('running'),
                finished: JobManager.getJobsByStatus('finished'),
                failed: JobManager.getJobsByStatus('failed')
            }

            $scope.job = {
                data: [$scope.jobs.running.length, $scope.jobs.finished.length, $scope.jobs.failed.length],
                options: {
                    fill: ["#33c87e", "#8b8f9a", "#f94965"],
                    radius: 30,
                    innerRadius: 27,
                }
            }
        });
    }
    $scope.job = {
        data: [0, 0, 0],
        options: {
            fill: ["#33c87e", "#8b8f9a", "#f94965"],
            radius: 30,
            innerRadius: 27,
        }
    }
    reload()

    // 加载任务, 定时监控
    var timer = $interval(function() {
        reload();
    }, 1000);

    // 离开页面时删除计时器
    $scope.$on("$destroy", function(event) {
        $interval.cancel(timer);
    })
}
]);

overview.controller("taskCtrl", ['$scope', '$interval', '$state', 'TaskManager', function ($scope, $interval, $state, TaskManager) {
    $scope.tasks = {
        running: 0,
        waiting: 0,
        waitTimeLastMinite: 0,
        waitTimeUnit: "ms",
        failureRatePercent: 0
    }
    var reload = function () {
        TaskManager.refresh().$promise.then(function(response) {
            $scope.tasks = {
                running: TaskManager.getTasks('running').length,
                waiting: TaskManager.getTasks('waiting').length,
                waitTimeLastMinite: 23.6,
                waitTimeUnit: "ms",
                failureRatePercent: 12
            }

            $scope.overview = {
                data: [$scope.tasks.waiting, $scope.tasks.running],
                options: {
                    fill: ["#fac543", "#33c87e"],
                    radius: 75,
                    innerRadius: 71,
                }
            }
        });

        TaskManager.systemMetric(function (response) {
            $scope.waitTime.data = []
            response.message.wait_time.forEach(function (metric) {
                $scope.waitTime.data.push(metric.value/1000000000)
            })
            $scope.failRate.data = []
            response.message.failure_rate.forEach(function (metric) {
                $scope.failRate.data.push(metric.value)
            })
        })
    }

    $scope.overview = {
        data: [0, 0],
        options: {
            fill: ["#fac543", "#33c87e"],
            radius: 75,
            innerRadius: 71,
        }
    }
    $scope.waitTime = {
        data: emptyArray(60),
        options: {
            stroke: "#f7c543",
            strokeWidth: 2,
            fill: ["#f7c543"],
            width: "100%",
            height: "120px",
        }
    }
    $scope.failRate = {
        data: emptyArray(60),
        options: {
            max: 100,
            min: 0,
            stroke: "#f74a66",
            strokeWidth: 2,
            fill: ["#f74a66"],
            width: "100%",
            height: "120px",
        }
    }

    reload();

    // 加载任务, 定时监控
    var timer = $interval(function() {
        reload();
    }, 1000);

    // 离开页面时删除计时器
    $scope.$on("$destroy", function(event) {
        $interval.cancel(timer);
    })
}
]);

overview.controller("clusterCtrl", ['$scope', '$interval', '$state', 'Nodes', function ($scope, $interval, $state, Nodes) {
	var reload = function () {
		Nodes.refresh().$promise.then(function(response) {
			$scope.masters = Nodes.getAllMasters();
			$scope.slaves = Nodes.getAllSlaves().slice(0, 6);;
			$scope.master_running = Nodes.filterMaster("RUNNING").length;
			$scope.master_lost = Nodes.filterMaster("LOST").length;
			$scope.slave_running = Nodes.filterSlave("RUNNING").length;
			$scope.slave_lost = Nodes.filterSlave("LOST").length;
	    });
	}

	reload();

    // 加载任务, 定时监控
    var node_timer = $interval(function() {
        reload();
    }, 1000);

    // 离开页面时删除计时器
    $scope.$on("$destroy", function(event) {
        $interval.cancel(node_timer);
    })
}
]);

function isZeroArray(array) {
	for(var i = 0; i < array.length; i++) {
		if(array[i] != 0) {
			return false;
		}
	}
	return true;
}

function emptyArray(size) {
    var result = [];
    while (data.length < size) {
        data.push(0);
    }
}

function shiftAndPush(arr, used, free) {
    arr.shift();
    arr.push(used/(used+free)*100);
    return arr;
}


text:
"use strict";

var app = require("connect")();
var http = require("http");
var swaggerTools = require("swagger-tools");
var jsyaml = require("js-yaml");
var fs = require("fs");
var serverPort = 8080;

// swaggerRouter configuration
var options = {
  swaggerUi: "/swagger.json",
  controllers: "./controllers",
  useStubs: process.env.NODE_ENV === "development" ? true : false // Conditionally turn on stubs (mock mode)
};

// The Swagger document (require it, build it programmatically, fetch it from a URL, ...)
var spec = fs.readFileSync("./api/swagger.yaml", "utf8");
var swaggerDoc = jsyaml.safeLoad(spec);

// Initialize the Swagger middleware
swaggerTools.initializeMiddleware(swaggerDoc, function(middleware) {
  // Interpret Swagger resources and attach metadata to request - must be first in swagger-tools middleware chain
  app.use(middleware.swaggerMetadata());

  // Validate Swagger requests
  app.use(middleware.swaggerValidator());

  // Route validated requests to appropriate controller
  app.use(middleware.swaggerRouter(options));

  // Serve the Swagger documents and Swagger UI
  app.use(middleware.swaggerUi());

  // Start the server
  http.createServer(app).listen(serverPort, function() {
    console.log(
      "Your server is listening on port %d (http://localhost:%d)",
      serverPort,
      serverPort
    );
    console.log(
      "Swagger-ui is available on http://localhost:%d/docs",
      serverPort
    );
  });
});


text:
using System.Web.Mvc.Filters;

namespace Autofac.Integration.Mvc.Test.Stubs;

public class TestCombinationFilter : IActionFilter, IAuthenticationFilter, IAuthorizationFilter, IExceptionFilter, IResultFilter
{
    public void OnActionExecuted(ActionExecutedContext filterContext)
    {
    }

    public void OnActionExecuting(ActionExecutingContext filterContext)
    {
    }

    public void OnAuthentication(AuthenticationContext filterContext)
    {
    }

    public void OnAuthenticationChallenge(AuthenticationChallengeContext filterContext)
    {
    }

    public void OnAuthorization(AuthorizationContext filterContext)
    {
    }

    public void OnException(ExceptionContext filterContext)
    {
    }

    public void OnResultExecuted(ResultExecutedContext filterContext)
    {
    }

    public void OnResultExecuting(ResultExecutingContext filterContext)
    {
    }
}


text:
* Silenced some deprecation warnings by fixing the deprecations so that Rails 2.3.9 is a better experience. [Philip Arndt](http://github.com/parndt)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.14...0.9.7.15)

## 0.9.7.14 [11 October 2010]
* Updated ``WYMeditor`` to fix some issues with inserting images and links. [David Jones](http://github.com/djones)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.13...0.9.7.14)

## 0.9.7.13 [23 August 2010]

* Russian language support (RU). [Sun](http://github.com/sunchess)
* We <3 HTML5 (better supported HTML5 semantics) [Joe Sak](http://github.com/joemsak) and [Philip Arndt](http://github.com/parndt)
* Fixed issue with Refinery's 404 page. [Philip Arndt](http://github.com/parndt)
* Fixed recent inquiries display on dashboard when HTML present. [Steven Heidel](http://github.com/stevenheidel)
* Better dutch (NL) translations. [Michael van Rooijen](http://github.com/meskyanichi)
* Fixed for IE and added fixes to WYMeditor from the core project. [Philip Arndt](http://github.com/parndt)
* Added pagination for search results to the plugin generator. [Amanda Wagener](http://github.com/awagener)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.12...0.9.7.13)

## 0.9.7.12 [11 August 2010]

* Smoothed the sortable list in the admin UI. [Joe Sak](http://github.com/joemsak)
* Binding link dialogue URL checker to paste action. [Joe Sak](http://github.com/joemsak)
* Kill hidden overflow on dialogues for smaller browser windows. [Joe Sak](http://github.com/joemsak) and [Philip Arndt](http://github.com/parndt)
* Refactored the ``parse_branch`` method to speed up reordering on the server. [Joshua Davey](http://github.com/jgdavey)
* Running ``refinerycms`` with ``-v`` or ``--version`` will now output the version number. [Steven Heidel](http://github.com/stevenheidel)
* Made the core codebase not rely so heavily on ``@page[:body]`` by adding ``Page.default_parts`` and using ``.first`` on that instead. [Philip Arndt](http://github.com/parndt)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.11...0.9.7.12)

## 0.9.7.11 [07 August 2010]

* Removed ``app/controllers/application.rb`` due to its serious deprecation. Fixed deprecations in how we use acts_as_indexed. [Philip Arndt](http://github.com/parndt)
* Added passing cucumber features for search for: [Uģis Ozols](http://github.com/ugisozols)
  - Images
  - Files
  - Inquiries
  - Pages
* Moved HTML5 enabling script to a partial so that IE always runs it first. [Philip Arndt](http://github.com/parndt)
* Fixed some invalid HTML. [Bo Frederiksen](http://github.com/bofrede)
* Added Danish translation for WYMeditor. [Bo Frederiksen](http://github.com/bofrede)
* Fixes for Tooltips [Philip Arndt](http://github.com/parndt)
  - Tooltips were not showing in dialogues, they now are.
  - Tooltips would not position properly above links, they now do.
  - The Tooltips' nibs (the arrow) would not sit properly centered above the element if the tooltip had to move for the browser window size, they now do.
* Lots of fixes for translations. [Uģis Ozols](http://github.com/ugisozols)
* Fix XSS vulnerability on page meta information by escaping the relevant fields properly [David Jones](http://github.com/djones)
* Ensure that the generator script grabs the first attribute that is a string, not just the first attribute, when choosing the field for Dashboard activity. [Joe Sak](http://github.com/joemsak)
* Updated ``json-pure`` to ``1.4.5``, now using the actual gem [Philip Arndt](http://github.com/parndt)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.10...0.9.7.11)

## 0.9.7.10 [02 August 2010]

* Added options to site_bar partial to allow particular components to be disabled (CSS, JS, jQuery or cornering script) so that they don't interfere with these already being included in the theme. [Philip Arndt](http://github.com/parndt)
* Fixed the schema file as it was invalid somehow. [Steven Heidel](http://github.com/stevenheidel)
* Made search more consistent and added it to Spam/Ham. [Uģis Ozols](http://github.com/ugisozols)
* Fixed a bug with adding new resources. [Steven Heidel](http://github.com/stevenheidel)
* Fixed a range of issues with translation keys and grammar between different languages. [Uģis Ozols](http://github.com/ugisozols)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.9...0.9.7.10)

## 0.9.7.9 [30 July 2010]

* Added a theme generator to create the basic file structure of a new theme. [David Jones](http://github.com/djones) and [Levi Cole](http://github.com/levicole)
* Renamed ``script/generate refinery`` to ``script/generate refinery_plugin``. [David Jones](http://github.com/djones)
* Add deprecation notice to ``script/generate refinery``. [David Jones](http://github.com/djones)
* Updated documentation to reflect new generator changes. [David Jones](http://github.com/djones)
* Added tests for both plugin and theme generators. [David Jones](http://github.com/djones) and [Levi Cole](http://github.com/levicole)
* Refactored the ``refinerycms`` & ``refinery-upgrade-097-to-097`` tasks to make better use of Pathname. [Philip Arndt](http://github.com/parndt)
* Added more cucumber features and tagged existing ones. [Philip Arndt](http://github.com/parndt), [James Fiderlick](http://github.com/jamesfid) and [Steven Heidel](http://github.com/stevenheidel)
* Removed mysterious ``page_translations`` table if you had it. [Philip Arndt](http://github.com/parndt)
* Added workaround for tests that involve dialogues. [Uģis Ozols](http://github.com/ugisozols)
* Added as default the ability for forms to know whether they are inside a modal / dialog. [Philip Arndt](http://github.com/parndt)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.8...0.9.7.9)

## 0.9.7.8 [23 July 2010]

* Refactored Amazon S3 and gem installation to make it easier to install on Heroku. [Steven Heidel](http://github.com/stevenheidel)
* Made project more testable. Renamed rake refinery:test_all to rake test:refinery [Philip Arndt](http://github.com/parndt)
* Documentation improved [David Jones](http://github.com/djones), [Philip Arndt](http://github.com/parndt) and [Steven Heidel](http://github.com/stevenheidel)
* Installed spork for use with systems that support forking for performance improvements. Doesn't run on Windows. [Philip Arndt](http://github.com/parndt) and [James Fiderlick](http://github.com/jamesfid)
* Improvements and new translations for Norsk Bokmål localisation. [Ken Paulsen](http://github.com/ken-guru)
* Ensured that RefinerySetting restrictions work properly using a before_save handler. [Joe Sak](http://github.com/joemsak)
* Updated jquery-html5-placeholder-shim to latest version. [Amanda Wagener](http://github.com/awagener)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.7...0.9.7.8)

## 0.9.7.7 [20 July 2010]

* Fixed an issue in the plugin generator that saw locales being created with singular_name not the interpreted version. [Philip Arndt](http://github.com/parndt) and [Joe Sak](http://github.com/joemsak)
* Fixed an issue with non-MySQL databases. [Lee Irving](http://github.com/magpieuk)
* Refactored versioning and .gitignore file so that both are easier to follow and use. [Steven Heidel](http://github.com/stevenheidel)
* Added rake refinery:test_all command to run all tests Refinery has. [Steven Heidel](http://github.com/stevenheidel)
* Fixed deprecation warnings with translate rake tasks. [Steven Heidel](http://github.com/stevenheidel)
* Bugfixes, some IE compatibility. [Philip Arndt](http://github.com/parndt)
* Fix syntax errors in existing resource dialog. [David Jones](http://github.com/djones)
* Identified and fixed a positioning bug in dialogues [Joe Sak](http://github.com/joemsak) and [Philip Arndt](http://github.com/parndt)
* Fixed issue that was causing Refinery to load in rake tasks twice if they lived under ``"#{Rails.root}/vendor/plugins"``. [David Jones](http://github.com/djones) and [Philip Arndt](http://github.com/parndt)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.6...0.9.7.7)

## 0.9.7.6 [15 July 2010]

* Bugfixes, fixed some failing tests. [Philip Arndt](http://github.com/parndt)
* More pt-BR translation keys translated. [Kivanio Barbosa](http://github.com/kivanio)
* Locked gems using ``Gemfile.lock``. [David Jones](http://github.com/djones)
* Changed 'refinery' task to 'refinerycms' as that is our gem's name. [Steven Heidel](http://github.com/stevenheidel)
* Fixed bug where settings were still considered restricted if NULL. [Steven Heidel](http://github.com/stevenheidel)
* Ensures that bundler is available before creating an application from a gem. [Philip Arndt](http://github.com/parndt)
* Application generator (from gem) and application upgrade bin task. (from 0.9.6) is now Ruby 1.9.2 compatible. [Philip Arndt](http://github.com/parndt)
* bin/refinery-upgrade-from-096-to-097 will no longer allow you to run it if Gemfile is present and thus signifying an upgraded app. [Philip Arndt](http://github.com/parndt)
* Cleaned up syntax, changed CSS involving dialogues. [Philip Arndt](http://github.com/parndt)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.5...0.9.7.6)

## 0.9.7.5 [08 July 2010]

* Wrote an upgrade task for migrating from 0.9.6.x releases of RefineryCMS. Just run refinery-update-096-to-097 inside your application's directory. [Philip Arndt](http://github.com/parndt)
* Improved code used to include gem rake tasks and script/generate tasks into the Refinery application to fix issue with these tasks not being found. [Philip Arndt](http://github.com/parndt)
* Fixed a broken migration that would mean pages were missing upon upgrading. [Jesper Hvirring Henriksen](http://github.com/hvirring)
* More pt-BR translation keys translated. [Kivanio Barbosa](http://github.com/kivanio)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.4...0.9.7.5)

## 0.9.7.4 [07 July 2010]

* Fixed critical issue in the i18n routing pattern that was matching prefixes like /news/ as a locale incorrectly. [Philip Arndt](http://github.com/parndt)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.3...0.9.7.4)

## 0.9.7.3 [07 July 2010]

* Falls back to default locale when a translation key can not be located in the current locale, only in production mode. [Philip Arndt](http://github.com/parndt)
* Fixed issue creating a Refinery site using bin/refinery where directory paths contained spaces. [Philip Arndt](http://github.com/parndt)
* Fixed issue when using script/generate refinery surrounding the migration incorrectly using the plugin's title. [Philip Arndt](http://github.com/parndt)
* Added verbose=true option when running rake refinery:update that prints out everything it's doing. [Philip Arndt](http://github.com/parndt)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.2...0.9.7.3)

## 0.9.7.2 [06 July 2010]

* Bugfixes with users and roles. [Philip Arndt](http://github.com/parndt) and [Amanda Wagener](http://github.com/awagener)
* Fixed the rake translate:lost_in_translation LOCALE=en and rake translate:lost_in_translation_all tasks so that they accurately reflect the missing i18n translation keys. [Philip Arndt](http://github.com/parndt)
* Refactored routing of i18n to allow different default frontend and backend locales. [Philip Arndt](http://github.com/parndt)
* Added better grammar support for some i18n. [Halan Pinheiro](http://github.com/halan)
* Improved output of rake refinery:update task and removed bin/refinery-update-core task. [Steven Heidel](http://github.com/stevenheidel)
* Set config.ru to run in production RAILS_ENV by default. [Philip Arndt](http://github.com/parndt)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7.1...0.9.7.2)

## 0.9.7.1 [03 July 2010]

* Bugfixes in the gem installation method process. [Philip Arndt](http://github.com/parndt)
* Made installing from gem faster. [Philip Arndt](http://github.com/parndt)
* Provided example files for sqlite3, mysql and postgresql. [Philip Arndt](http://github.com/parndt)
* Created option for specifying a database adapter (sqlite3, mysql or postgresql) when creating from Gem. [Philip Arndt](http://github.com/parndt)
* Other bugfixes including UI consistency around signup. [Philip Arndt](http://github.com/parndt)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.7...0.9.7.1)

## 0.9.7 [02 July 2010]

* Full backend internationalisation (i18n) support and frontend i18n routing. [Maarten Hoogendoorn](http://github.com/moretea) and [Philip Arndt](http://github.com/parndt) and many others
* Marketable URLs, such as "/contact". [Joshua Davey](http://github.com/jgdavey) and [Joe Sak](http://github.com/joemsak).
* Switched to bundler and rack. [Alex Coles](http://github.com/myabc) and [Philip Arndt](http://github.com/parndt)
* Added options to Refinery Settings :restricted, :scoping, :callback_proc_as_string. [Steven Heidel](http://github.com/stevenheidel) and [Philip Arndt](http://github.com/parndt)
* Added caching abilities to frontend and to RefinerySetting to drastically speed up the application under certain conditions. [Philip Arndt](http://github.com/parndt)
* Added spam filtering to contact form. [David Jones](http://github.com/djones)
* Full Refinery UI redesign. [Resolve Digital](http://github.com/resolve)
* User Role support. [Amanda Wagener](http://github.com/awagener) and [Philip Arndt](http://github.com/parndt)
* [See full list](http://github.com/resolve/refinerycms/compare/0.9.6.34...0.9.7)
* [See blog post](http://refinerycms.com/blog/refinery-cms-0-9-7-released)

## 0.9.6.34 [09 May 2010]

* Bugfixes.

## 0.9.6.33 [06 May 2010]

* Bugfixes.

## 0.9.6.32 [05 May 2010]

* Bugfixes.

## 0.9.6.31 [19 April 2010]

* Bugfixes.

## 0.9.6.30 [15 April 2010]

* Bugfixes.

## 0.9.6.29 [14 April 2010]

* Bugfixes.

## 0.9.6.28 [12 April 2010]

* Bugfixes.

## 0.9.6.27 [12 April 2010]

* Bugfixes.

## 0.9.6.26 [07 April 2010]

* Bugfixes.

## 0.9.6.25 [01 April 2010]

* Bugfixes.

## 0.9.6.24 [26 March 2010]

* Bugfixes.

## 0.9.6.23 [26 March 2010]

* Bugfixes.

## 0.9.6.22 [26 March 2010]

* Bugfixes.

## 0.9.6.21 [23 March 2010]

* Bugfixes.

## 0.9.6.19 [03 March 2010]

* Bugfixes.

## 0.9.6.18 [02 March 2010]

* Bugfixes.

## 0.9.6.17 [02 March 2010]

* Bugfixes.

## 0.9.6.16 [02 March 2010]

* Bugfixes.

## 0.9.6.15 [01 March 2010]

* Bugfixes.

## 0.9.6.14 [24 February 2010]

* Bugfixes.

## 0.9.6.13 [23 February 2010]

* Bugfixes.

## 0.9.6.12 [16 February 2010]

* Bugfixes.

## 0.9.6.11 [16 February 2010]

* Bugfixes.

## 0.9.6.10 [15 February 2010]

* Bugfixes.

## 0.9.6.9 [15 February 2010]

* Bugfixes.

## 0.9.6.8 [14 February 2010]

* Bugfixes.

## 0.9.6.7 [10 February 2010]

* Bugfixes.

## 0.9.6.6 [10 February 2010]

* Bugfixes.

## 0.9.6.5 [08 February 2010]

* Bugfixes.

## 0.9.6.4 [07 February 2010]

* Bugfixes.

## 0.9.6.3 [07 February 2010]

* Bugfixes.

## 0.9.6.2 [04 February 2010]

* Bugfixes.

## 0.9.6.1 [04 February 2010]

* Bugfixes.

## 0.9.6 [04 February 2010]

* Minor release.

## 0.9.5.31 [27 January 2010]

* Bugfixes.

## 0.9.5.30 [24 January 2010]

* Bugfixes.

## 0.9.5.29 [23 December 2009]

* Bugfixes.

## 0.9.5.28 [17 December 2009]

* Bugfixes.

## 0.9.5.27 [16 December 2009]

* Bugfixes.

## 0.9.5.26 [13 December 2009]

* Bugfixes.

## 0.9.5.25 [09 December 2009]

* Bugfixes.

## 0.9.5.24 [08 December 2009]

* Bugfixes.

## 0.9.5.23 [07 December 2009]

* Bugfixes.

## 0.9.5.22 [07 December 2009]

* Bugfixes.

## 0.9.5.21 [06 December 2009]

* Bugfixes.

## 0.9.5.20 [03 December 2009]

* Bugfixes.

## 0.9.5.19 [30 November 2009]

* Bugfixes.

## 0.9.5.18 [29 November 2009]

* Bugfixes.

## 0.9.5.16 [26 November 2009]

* Bugfixes.

## 0.9.5.15 [22 November 2009]

* Bugfixes.

## 0.9.5.14 [19 November 2009]

* Bugfixes.

## 0.9.5.13 [18 November 2009]

* Bugfixes.

## 0.9.5.12 [18 November 2009]

* Bugfixes.

## 0.9.5.11 [18 November 2009]

* Bugfixes.

## 0.9.5.10 [17 November 2009]

* Bugfixes.

## 0.9.5.9 [16 November 2009]

* Bugfixes.

## 0.9.5.8 [15 November 2009]

* Bugfixes.

## 0.9.5.7 [09 November 2009]

* Bugfixes.

## 0.9.5.6 [09 November 2009]

* Bugfixes.

## 0.9.5.5 [08 November 2009]

* Bugfixes.

## 0.9.5.4 [04 November 2009]

* Bugfixes.

## 0.9.5.3 [04 November 2009]

* Bugfixes.

## 0.9.5.2 [04 November 2009]

* Bugfixes.

## 0.9.5.1 [03 November 2009]

* Bugfixes.

## 0.9.5 [03 November 2009]

* Minor release.

## 0.9.4.4 [29 October 2009]

* Bugfixes.

## 0.9.4.3 [19 October 2009]

* Bugfixes.

## 0.9.4.2 [19 October 2009]

* Bugfixes.

## 0.9.4 [15 October 2009]

* Minor release.

## 0.9.3 [11 October 2009]

* Optimise loading of WYM Editors.
* Supported more plugins' menu matches.

## 0.9.2.2 [08 October 2009]

* Bugfixes.

## 0.9.2.1 [08 October 2009]

* Fix bug with using instance_methods vs using methods to detect whether friendly_id is present.

## 0.9.2 [08 October 2009]

* Update rails gem requirement to 2.3.4.

## 0.9.1.2 [07 October 2009]

* Updated JS libraries and added lots of convenience methods.

## 0.9.1.1 [05 October 2009]

* HTML & CSS changes.

## 0.9.1 [04 October 2009]

* Bugfixes.
* Renamed project from Refinery to refinerycms and released as a gem.

## 0.9 [29 May 2009]

* Initial public release.


text:
<?php

namespace React\SocketClient;

use React\SocketClient\ConnectorInterface;
use React\EventLoop\LoopInterface;
use React\Promise\Timer;
use React\Stream\Stream;
use React\Promise\Promise;
use React\Promise\CancellablePromiseInterface;

class TimeoutConnector implements ConnectorInterface
{
    private $connector;
    private $timeout;
    private $loop;

    public function __construct(ConnectorInterface $connector, $timeout, LoopInterface $loop)
    {
        $this->connector = $connector;
        $this->timeout = $timeout;
        $this->loop = $loop;
    }

    public function connect($uri)
    {
        return Timer\timeout($this->connector->connect($uri), $this->timeout, $this->loop);
    }
}


text:
#pragma once

#include "search/search_quality/assessment_tool/context.hpp"

#include "base/checked_cast.hpp"

#include <cstddef>
#include <vector>

#include <QtGui/QStandardItemModel>
#include <QtWidgets/QMainWindow>
#include <QtWidgets/QTableView>

class SamplesView : public QTableView
{
  Q_OBJECT

public:
  explicit SamplesView(QWidget * parent);

  void SetSamples(ContextList::SamplesSlice const & samples) { m_model->SetSamples(samples); }
  bool IsSelected(size_t index) const;
  void OnUpdate(size_t index) { m_model->OnUpdate(index); }
  void Clear() { m_model->SetSamples(ContextList::SamplesSlice{}); }

  // QMainWindow overrides:
  void contextMenuEvent(QContextMenuEvent * event) override;

signals:
  void FlipSampleUsefulness(int index);

private:
  class Model : public QStandardItemModel
  {
  public:
    explicit Model(QWidget * parent);

    void SetSamples(ContextList::SamplesSlice const & samples)
    {
      removeRows(0, rowCount());
      m_samples = samples;
      if (m_samples.IsValid())
        insertRows(0, base::checked_cast<int>(m_samples.Size()));
    }

    void OnUpdate(size_t index)
    {
      auto const ix = createIndex(base::checked_cast<int>(index) /* row */, 0 /* column */);

      // Need to refresh view when some item is updated.
      emit dataChanged(ix, ix);
    }

    bool SampleIsUseless(int index) const { return m_samples.IsUseless(index); }

    // QStandardItemModel overrides:
    QVariant data(QModelIndex const & index, int role = Qt::DisplayRole) const override;

  private:
    ContextList::SamplesSlice m_samples;
  };

  Model * m_model = nullptr;
};


text:
using namespace eprosima::fastrtps;
using namespace eprosima::fastrtps::rtps;
using test_UDPv4Transport = eprosima::fastdds::rtps::test_UDPv4Transport;
using test_UDPv4TransportDescriptor = eprosima::fastdds::rtps::test_UDPv4TransportDescriptor;

void reliability_disable_heartbeat_piggyback(
        bool disable_heartbeat_piggyback)
{
    PubSubReader<KeyedHelloWorldPubSubType> reader(TEST_TOPIC_NAME);
    PubSubWriter<KeyedHelloWorldPubSubType> writer(TEST_TOPIC_NAME);

    bool heartbeat_found = false;
    bool start_reception = false;
    EntityId_t writer_id;

    auto testTransport = std::make_shared<test_UDPv4TransportDescriptor>();
    testTransport->drop_heartbeat_messages_filter_ = [&heartbeat_found, &writer_id, &start_reception](CDRMessage_t& msg)
            -> bool
            {
                if (start_reception)
                {
                    auto old_pos = msg.pos;
                    EntityId_t writer_id_msg;
                    msg.pos += 4;
                    CDRMessage::readEntityId(&msg, &writer_id_msg);
                    if (writer_id == writer_id_msg)
                    {
                        heartbeat_found = true;
                    }
                    msg.pos = old_pos;
                }
                return false;
            };

    writer.reliability(eprosima::fastrtps::RELIABLE_RELIABILITY_QOS)
            .history_kind(eprosima::fastrtps::KEEP_LAST_HISTORY_QOS)
            .history_depth(1)
            .heartbeat_period_seconds(180000)
            .disable_heartbeat_piggyback(disable_heartbeat_piggyback)
            .disable_builtin_transport()
            .add_user_transport_to_pparams(testTransport)
            .init();
    writer_id = writer.datawriter_guid().entityId;

    reader.history_kind(eprosima::fastrtps::KEEP_ALL_HISTORY_QOS)
            .reliability(eprosima::fastrtps::RELIABLE_RELIABILITY_QOS)
            .init();

    ASSERT_TRUE(reader.isInitialized());
    ASSERT_TRUE(writer.isInitialized());

    // Wait for discovery.
    writer.wait_discovery();
    reader.wait_discovery();

    std::this_thread::sleep_for(std::chrono::seconds(1));

    auto data = default_keyedhelloworld_data_generator(10, true);
    reader.startReception(data);
    start_reception = true;
    // Send data
    writer.send(data);
    // In this test all data should be sent.
    ASSERT_TRUE(data.empty());
    // Block reader until reception finished or timeout.
    reader.block_for_all();

    ASSERT_EQ(heartbeat_found, !disable_heartbeat_piggyback);
}

TEST(Reliability, DisableHeartbeatPiggybackFalse)
{
    reliability_disable_heartbeat_piggyback(false);
}

TEST(Reliability, DisableHeartbeatPiggybackTrue)
{
    reliability_disable_heartbeat_piggyback(true);
}


text:
HTMLWidgets.widget({

  name: 'comicR',

  type: 'output',

  initialize: function(el, width, height) {

    return { }

  },

  renderValue: function(el, x, instance) {

    // handle config options if provided
    if( Object.keys(x.options).length > 0 ){
      COMIC.init(x.options);
    }  else { // if not provided reset to defaults
      // these are the default values if you do not call "init"
      COMIC.init({
          ff: 8,      // fuzz factor for line drawing: bigger -> fuzzier
          ffc: 0.4,   // fuzz factor for curve drawing: bigger -> fuzzier
          fsteps: 50, // number of pixels per step: smaller -> fuzzier
          msteps: 4,  // min number of steps: bigger -> fuzzier
      });
    }

    if (x.selector ===  null) {
      [].forEach.call(document.getElementsByTagName('svg'),function(el){COMIC.magic(el)})
    } else {
      [].forEach.call(document.querySelectorAll(x.selector),function(el){COMIC.magic(el)})
    }

  },

  resize: function(el, width, height, instance) {

  }

});


text:
<!doctype html>

	<meta charset="utf-8">
	<title>{SystemName}: {UserProfileFor}: {UserName}</title>
	<meta name="keywords" content="{SystemName}" />
	<meta name="description" content="{SystemName}"/>
	<link rel="shortcut icon" href="images/icons/favicon.ico" />

	<link href="{SystemURL}/css/styles1.css" rel="stylesheet" type="text/css" media="screen" title="styles1" />
	<link href="{SystemURL}/css/styles2.css" rel="alternate stylesheet" type="text/css" title="styles2" media="screen" />
	<link href="{SystemURL}/css/styles3.css" rel="alternate stylesheet" type="text/css" title="styles3" media="screen" />
	<link href="{SystemURL}/css/styles4.css" rel="alternate stylesheet" type="text/css" title="styles4" media="screen" />
	<link href="{SystemURL}/css/styles5.css" rel="alternate stylesheet" type="text/css" title="styles5" media="screen" />

{SystemName}: {UserName}

{UserProfileFor}: {UserName} ({UserType})

{UserProfileFor}:

{UserName}

{IsOnlineText}:

{IsOnline}

{IfUserIsOnlineBegin}

{OnlineLocationText}:

{OnlineLocation}

{IfUserIsOnlineEnd}

{ResidentSince}:

{UserBorn}

{AccountType}:

{UserType}

{PartnersName}:

{UserPartner}

{AboutMe}:

{UserAboutMe}

		LANGUAGES:

<a href="?language=en" rel="en" class="languageswitch" alt="{en}" title=" {en}">en

<a href="?language=fr" rel="fr" class="languageswitch" alt="{fr}" title=" {fr}">fr

<a href="?language=de" rel="de" class="languageswitch" alt="{de}" title=" {de}">de

<a href="?language=it" rel="it" class="languageswitch" alt="{it}" title=" {it}">it

<a href="?language=es" rel="es" class="languageswitch" alt="{es}" title=" {es}">es

		CHOIX: enfrdeites

		STYLES:

1

2

3

4

5

		CHOIX: 12345| Copyright {SystemName} 2011 © 2012


text:
package com.zimbra.qa.selenium.framework.util;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;

import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

public class SleepMetrics {
	private static Logger logger = LogManager.getLogger(SleepMetrics.class);

	/**
	 * A list of class + methods being tracked
	 */
	private static List<SleepEntry> metrics = new ArrayList<SleepEntry>();

	/**
	 * Record to the logger the current sleep data report.
	 */
	public static void report() {

		logger.info("SleepMetrics:");

		Collections.sort(metrics);

		for (SleepEntry entry : metrics) {
			logger.info(entry.toString());
		}

	}

	/**
	 * Record the amount of 'sleep' time
	 * @param stack Current stack trace (i.e. (new Throwable()).getStackTrace())
	 * @param delay The desired Sleep(msec) delay
	 * @param start The start time of Sleep()
	 * @param finish The finish time of Sleep() (i.e in case interrupted)
	 */
	public static void RecordSleep(StackTraceElement[] stack, long delay, Date start, Date finish) {

		for ( StackTraceElement e : stack ) {

			// Skip any non-zimbra classes
			if ( !e.getClassName().startsWith("com.zimbra.qa.selenium") ) {
				continue;
			}

			// Skip any 'Abstract' methods - walk up the chain to find the real class
			if ( e.getClassName().contains(".Abs") ) {
				continue;
			}

			// Skip the SleepUtil class, since all sleep goes through that
			if ( e.getClassName().startsWith("com.zimbra.qa.selenium.framework.util.SleepUtil") ) {
				continue;
			}

			RecordSleep(e, delay, finish.getTime() - start.getTime());
			return;
		}
	}

	/**
	 * Record the amount of 'sleep' time
	 * @param e The stack element that requested the sleep (i.e. the class + method)
	 * @param delay The desired Sleep(msec) delay
	 * @param actual The actual time of Sleep() (i.e in case interrupted)
	 */
	public static void RecordSleep(StackTraceElement e, long delay, long actual) {
		SleepEntry entry = getEntry( e.getClassName(), e.getMethodName() );
		if ( entry == null ) {
			entry = new SleepEntry(e.getClassName(), e.getMethodName());
			entry.addSleep(actual);
			metrics.add(entry);
		} else {
			entry.addSleep(actual);
		}

	}

	/**
	 * Record the amount of 'processing' time
	 * @param stack Current stack trace (i.e. (new Throwable()).getStackTrace())
	 * @param start The start time of processing
	 * @param finish The finish time of processing
	 */
	public static void RecordProcessing(StackTraceElement[] stack, Date start, Date finish) {

		for ( StackTraceElement e : stack ) {

			// Skip any non-zimbra classes
			if ( !e.getClassName().startsWith("com.zimbra.qa.selenium") ) {
				continue;
			}

			// Skip any 'Abstract' methods - walk up the chain to find the real class
			if ( e.getClassName().contains(".Abs") ) {
				continue;
			}

			RecordProcessing(e, finish.getTime() - start.getTime());
			return;
		}
	}

	/**
	 * Record the amount of 'processing' time
	 * @param e The stack element that processed (i.e. the class + method)
	 * @param actual The total time (msec) that was spent processing
	 */
	public static void RecordProcessing(StackTraceElement e, long actual) {
		SleepEntry entry = getEntry( e.getClassName(), e.getMethodName() );
		if ( entry == null ) {
			entry = new SleepEntry(e.getClassName(), e.getMethodName());
			entry.addExecution(actual);
			metrics.add(entry);
		} else {
			entry.addExecution(actual);
		}
	}

	/**
	 * Search the list of entries for this class + method
	 * @param clazz
	 * @param method
	 * @return The existing entry if present, or null if not-present
	 */
	private static SleepEntry getEntry(String clazz, String method) {
		for (SleepEntry e : metrics ) {
			if ( e.className.equals(clazz) && e.methodName.equals(method) ) {
				return (e);
			}
		}
		return (null);
	}

	private static class SleepEntry implements Comparable<SleepEntry> {
		private static Logger logger = LogManager.getLogger(SleepMetrics.class);

		public String className;
		public String methodName;
		public long totalSleep;
		public long totalExecution;

		public SleepEntry(String clazz, String method) {
			className = clazz;
			methodName = method;
			totalSleep = 0;
			totalExecution = 0;

			logger.info("Entry: "+ className +"."+ methodName +"() - new entry");
		}

		public void addSleep(long delay) {
			totalSleep += delay;
			logger.info("Entry: "+ className +"."+ methodName +"() - Sleep: "+ delay +"/"+ totalSleep);
		}

		public void addExecution(long delay) {
			totalExecution += delay;
			logger.info("Entry: "+ className +"."+ methodName +"() -  Exec: "+ delay +"/"+ totalExecution);
		}

		public String toString() {

			// "Entry: com.zimbra.qa.selenium.class.method() - 1234 msec"

			StringBuilder sb = new StringBuilder("Report: ");
			sb.append(className).append('.').append(methodName).append("() -");
			sb.append(" Sleep: ").append(totalSleep).append(" msec");
			sb.append(" Exec: ").append(totalExecution).append(" msec");
			return (sb.toString());
		}

		@Override
		public int compareTo(SleepEntry that) {
			final int BEFORE = -1;
			final int EQUAL = 0;
			final int AFTER = 1;

			if (that == null) {
				return (BEFORE);
			}

			if ( this == that ) {
				return (EQUAL);
			}

			if ( this.totalSleep > that.totalSleep ) {
				return (BEFORE);
			}

			if ( this.totalSleep < that.totalSleep ) {
				return (AFTER);
			}

			if ( this.totalExecution > that.totalExecution ) {
				return (BEFORE);
			}

			if ( this.totalExecution < that.totalExecution ) {
				return (AFTER);
			}

			return (EQUAL);
		}

	}
}


text:
<?php

/**
 * @file
 * Definition of Drupal\text\Plugin\field\formatter\TextPlainFormatter.
 */

namespace Drupal\text\Plugin\field\formatter;

use Drupal\field\Annotation\FieldFormatter;
use Drupal\Core\Annotation\Translation;
use Drupal\field\Plugin\Type\Formatter\FormatterBase;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\Field\FieldInterface;

/**
 * Plugin implementation of the 'text_plain' formatter.
 *
 * @FieldFormatter(
 *   id = "text_plain",
 *   label = @Translation("Plain text"),
 *   field_types = {
 *     "text",
 *     "text_long",
 *     "text_with_summary"
 *   },
 *   edit = {
 *     "editor" = "direct"
 *   }
 * )
 */
class TextPlainFormatter extends FormatterBase {

  /**
   * Implements Drupal\field\Plugin\Type\Formatter\FormatterInterface::viewElements().
   */
  public function viewElements(EntityInterface $entity, $langcode, FieldInterface $items) {
    $elements = array();

    foreach ($items as $delta => $item) {
      // The text value has no text format assigned to it, so the user input
      // should equal the output, including newlines.
      $elements[$delta] = array('#markup' => nl2br(check_plain($item->value)));
    }

    return $elements;
  }

}


text:
module Ebay # :nodoc:
  module Types # :nodoc:
    # == Attributes
    #  numeric_node :entries_per_page, 'EntriesPerPage', :optional => true
    #  numeric_node :page_number, 'PageNumber', :optional => true
    class Pagination
      include XML::Mapping
      include Initializer
      root_element_name 'Pagination'
      numeric_node :entries_per_page, 'EntriesPerPage', :optional => true
      numeric_node :page_number, 'PageNumber', :optional => true
    end
  end
end


text:
	<button type="button" class="btn btn-default btn-circle" ng-click="show('js')"></button>
	<button type="button" class="btn btn-default btn-circle" ng-click="show('node')" disabled></button>
	<button type="button" class="btn btn-default btn-circle" ng-click="show('ruby')" disabled></button>
	<button type="button" class="btn btn-default btn-circle" ng-click="show('php')" disabled></button>
	<button type="button" class="btn btn-default btn-circle" ng-click="show('grails')" disabled></button>

			Place the following code where you'd like ORi to load:

			<textarea readonly="true" wrap="off">

	Please enable JavaScript to view the chat powered by ORi.
			</textarea>

			(Optional) See our JavaScript configuration variables documentation for ways to further customize the ORi embed code.

			(Optional) Place html tags to improve how your pages will look on our Mobile apps.

Secure Implementation

To safeguarde your users' personal data we support encripted data.

You can either implement the enpription by your self following our guide or choose the library for your backend language for easy implementation:

		Select Language

				 NodeJS

				 Ruby on Rails

				 PHP

				 Python

Verify Installation

Confirm your installation was successful by clicking on the button below.

	<button class="btn btn-primary btn-lg" translate>Verify</button>


text:
require 'rails_helper'

describe Celebrity do

  let(:revision_class) { Samsara.revision_class }

  subject do
    Celebrity.new(first_name: "Brigitte", last_name: "Bardot", gender: 2, birth_date: Date.civil(1934,9,28))
  end

  it "is audited" do
    expect(Celebrity.is_audited?).to be true
  end

  context "after create" do
    context "while samsara is not active" do
      before do
        Samsara.disable!
        subject.save
      end

      it "does not create a revision" do
        expect(revision_class.count).to be 0
      end
    end

    context "while samsara is active" do
      before do
        Samsara.enable!
      end

      context "trying to save an invalid celebrity" do
        before do
          subject.gender = 3
          subject.save
        end

        it "does not create a revision" do
          expect(revision_class.count).to be 0
        end
      end

      context "saving a valid celebrity" do
        before do
          subject.save
        end

        it "creates a revision" do
          expect(revision_class.count).to be 1
        end

        context "the created revision" do
          let(:revision) { revision_class.first }

          it "is linked to the celebrity" do
            expect(revision.subject).to eq subject
          end

          it "has set the action" do
            expect(revision.action).to eq "create"
          end

          it "has stored the original attributes" do
            expect(revision.original_attributes).to eq({:birth_date=>nil, :first_name=>nil, :gender=>nil, :id=>nil, :last_name=>nil})
          end

          it "has stored the modified attributes" do
            expect(revision.modified_attributes).to eq(first_name: "Brigitte", last_name: "Bardot", gender: 2, birth_date: "1934-09-28", id: subject.id)
          end
        end
      end
    end
  end

  context "after update" do
    before do
      Samsara.disable!
      subject.save!
    end

    context "while samsara is not active" do
      before do
        subject.last_name = "Margot"
        subject.save!
      end

      it "does not create a revision" do
        expect(revision_class.count).to be 0
      end
    end

    context "while samsara is active" do

      before do
        Samsara.enable!
      end

      context "not changing the celebrity" do
        before do
          subject.save!
        end

        it "does not create a revision" do
          expect(revision_class.count).to be 0
        end
      end

      context "trying to save an invalid celebrity" do
        before do
          subject.gender = 3
          subject.save
        end

        it "does not create a revision" do
          expect(revision_class.count).to be 0
        end
      end

      context "changing the celebrity" do
        before do
          subject.last_name = "Margot"
          subject.save
        end

        it "creates a revision" do
          expect(revision_class.count).to be 1
        end

        context "the created revision" do
          let(:revision) { revision_class.first }

          it "is linked to the celebrity" do
            expect(revision.subject).to eq subject
          end

          it "has set the action" do
            expect(revision.action).to eq "update"
          end

          it "has stored the original attributes" do
            expect(revision.original_attributes).to eq(last_name: "Bardot")
          end

          it "has stored the modified attributes" do
            expect(revision.modified_attributes).to eq(first_name: "Brigitte", last_name: "Margot", gender: 2, birth_date: "1934-09-28", id: subject.id)
          end
        end
      end
    end
  end

  context "after destroy" do
    before do
      Samsara.disable!
      subject.save!
    end

    context "while samsara is not active" do
      before do
        subject.destroy!
      end

      it "does not create a revision" do
        expect(revision_class.count).to be 0
      end
    end

    context "while samsara is active" do
      before do
        Samsara.enable!
      end

      context "failing to destroy" do
        before do
          allow(subject).to receive(:destroy).and_return false
          subject.destroy
        end

        it "does not create a revision" do
          expect(revision_class.count).to be 0
        end
      end

      context "successfully destroying the celebrity" do
        before do
          subject.destroy!
        end

        it "creates a revision" do
          expect(revision_class.count).to be 1
        end

        context "the created revision" do
          let(:revision) { revision_class.first }

          it "is linked to the celebrity" do
            expect(revision.subject_type).to eq "Celebrity"
            expect(revision.subject_id).to eq subject.id
          end

          it "has set the action" do
            expect(revision.action).to eq "destroy"
          end

          it "has stored the original attributes" do
            expect(revision.original_attributes).to eq({:birth_date=>nil, :first_name=>nil, :gender=>nil, :id=>nil, :last_name=>nil})
          end

          it "has stored the modified attributes" do
            expect(revision.modified_attributes).to eq(first_name: "Brigitte", last_name: "Bardot", gender: 2, birth_date: "1934-09-28", id: subject.id)
          end
        end
      end
    end
  end

end


text:
CSS 3D Rotate With Mouse Move Demo

       CSS 3D rotate

  See the Pen
  CSS 3D rotate with mouse move by xgqfrms (@xgqfrms)
  on CodePen.


text:
#ifndef WebRTCConfiguration_h
#define WebRTCConfiguration_h

#include "WebCommon.h"
#include "WebNonCopyable.h"
#include "WebPrivatePtr.h"
#include "WebVector.h"

namespace blink {

class RTCIceServer;
class RTCConfiguration;
class WebString;
class WebURL;

class WebRTCICEServer {
public:
    WebRTCICEServer() { }
    WebRTCICEServer(const WebRTCICEServer& other) { assign(other); }
    ~WebRTCICEServer() { reset(); }

    WebRTCICEServer& operator=(const WebRTCICEServer& other)
    {
        assign(other);
        return *this;
    }

    BLINK_PLATFORM_EXPORT void assign(const WebRTCICEServer&);

    BLINK_PLATFORM_EXPORT void reset();
    bool isNull() const { return m_private.isNull(); }

    BLINK_PLATFORM_EXPORT WebURL uri() const;
    BLINK_PLATFORM_EXPORT WebString username() const;
    BLINK_PLATFORM_EXPORT WebString credential() const;

#if INSIDE_BLINK
    BLINK_PLATFORM_EXPORT WebRTCICEServer(const WTF::PassRefPtr<RTCIceServer>&);
#endif

private:
    WebPrivatePtr<RTCIceServer> m_private;
};

enum WebRTCIceTransports {
    WebRTCIceTransportsNone,
    WebRTCIceTransportsRelay,
    WebRTCIceTransportsAll
};

class WebRTCConfiguration {
public:
    WebRTCConfiguration() { }
    WebRTCConfiguration(const WebRTCConfiguration& other) { assign(other); }
    ~WebRTCConfiguration() { reset(); }

    WebRTCConfiguration& operator=(const WebRTCConfiguration& other)
    {
        assign(other);
        return *this;
    }

    BLINK_PLATFORM_EXPORT void assign(const WebRTCConfiguration&);

    BLINK_PLATFORM_EXPORT void reset();
    bool isNull() const { return m_private.isNull(); }

    BLINK_PLATFORM_EXPORT size_t numberOfServers() const;
    BLINK_PLATFORM_EXPORT WebRTCICEServer server(size_t index) const;

    BLINK_PLATFORM_EXPORT WebRTCIceTransports iceTransports() const;

#if INSIDE_BLINK
    BLINK_PLATFORM_EXPORT WebRTCConfiguration(const WTF::PassRefPtr<RTCConfiguration>&);
#endif

private:
    WebPrivatePtr<RTCConfiguration> m_private;
};

} // namespace blink

#endif // WebRTCConfiguration_h


text:
import {Filter} from '../core/decorators';

@Filter('paging')
export class PagingFilter implements ng.IFilter {

    constructor($q : ng.IQService) {
        console.log('Q service in pagingFilter:', $q);
    }

    filter(value: Array<any>, pageNumber: number, pageSize: number): any {
        if (value instanceof Array) {
            return value.slice((pageNumber - 1) * pageSize, pageNumber * pageSize);
        }
    }

}


text:
(function (exports) {
  'use strict';

  var snakBarElement = document.querySelector('.snackbar');
  var snakBarMsg = document.querySelector('.snackbar__msg');
  var snakBarAction = document.querySelector('.snackbar__action');

  //To show notification
  function showSnackBar(msg) {
    if (!msg) return;

    if (snakBarElement.classList.contains('snackbar--show')) {
      hideSnackBar();
    }

    snakBarElement.classList.add('snackbar--show');
    snakBarMsg.textContent = msg;

    setTimeout(function () {
      hideSnackBar();
  }, 6000);
  }

  function hideSnackBar() {
    snakBarElement.classList.remove('snackbar--show');
  }

  //To hide notification
  snakBarAction.addEventListener('click', function () {
    hideSnackBar();
  });

  exports.showSnackBar = showSnackBar; //Make this method available in global

})(typeof window === 'undefined' ? module.exports : window);


text:
"""
Created on 31 Oct 2020

@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
"""

from scs_core.data.datetime import LocalizedDatetime

from scs_core.gas.afe_calib import AFECalib

from scs_host.sys.host import Host

# --------------------------------------------------------------------------------------------------------------------

calib = AFECalib.load(Host)
print(calib)
print("-")

calibrated_on = calib.calibrated_on
print("calibrated_on: %s" % calibrated_on)

calibration_currency = calib.currency()
print("calibration_currency: %s" % calibration_currency)
print("-")

now = LocalizedDatetime.construct_from_iso8601('2016-11-01T12:00:00Z')
print("now: %s" % now)

calibration_currency = calib.currency_at(now)
print("calibration_currency: %s" % calibration_currency)
print("-")


text:
	<button type="button" class="btn btn-default" data-ninejs-attach="action"></button>
	<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" data-ninejs-attach="anchor">

		Toggle Dropdown
	</button>


text:
<?php

use tests\codeception\_pages\LoginPage;
use tests\codeception\_pages\ArticlecreatePage;

/* @var $scenario Codeception\Scenario */

$I = new FunctionalTester($scenario);
$I->wantTo('ensure that article create works');

// Вход
$loginPage = LoginPage::openBy($I);
$I->amGoingTo('try to login with correct credentials');
$loginPage->login('admin', 'admin1');

// Добавление статьи
$noticelistPage = ArticlecreatePage::openBy($I);
$I->see('Create article', 'h1');

$I->fillField('Header','Article header');
$I->fillField('Article Text','Article text text text');

$I->click('Create');

// Добавленная статья в БД
$article = $I->seeRecord('app\models\Article', array('article_text' =>'Article text text text'));

//Добавленная статья - уведомление пользователю
$noticelist= $I->seeRecord('app\modules\rgknotice\models\Noticelist', array('notice_header' =>'Заголовок уведомления'));


text:
module JustinCredible.SampleApp.Models {

    /**
     * A simple class that can be used to define a key/value pair of objects.
     */
    export class KeyValuePair<T, U> {
        public key: T;
        public value: U;

        constructor(key?: T, value?: U) {
            this.key = key;
            this.value = value;
        }
    }

    /**
     * Describes an object that can be disposed of, having any resources it was using
     * be released and/or cleaned up.
     */
    export interface IDisposable {
        dispose(): void;
    }

}


text:
using Newtonsoft.Json.Linq;
using NFluent;
using WireMock.Matchers;
using Xunit;

namespace WireMock.Net.Tests.Matchers
{
    public class LinqMatcherTests
    {
        [Fact]
        public void LinqMatcher_For_String_SinglePattern_IsMatch_Positive()
        {
            // Assign
            string input = "2018-08-31 13:59:59";

            // Act
            var matcher = new LinqMatcher("DateTime.Parse(it) > \"2018-08-01 13:50:00\"");

            // Assert
            Check.That(matcher.IsMatch(input)).IsEqualTo(1.0d);
        }

        [Fact]
        public void LinqMatcher_For_String_IsMatch_Negative()
        {
            // Assign
            string input = "2018-08-31 13:59:59";

            // Act
            var matcher = new LinqMatcher("DateTime.Parse(it) > \"2019-01-01 00:00:00\"");

            // Assert
            Check.That(matcher.IsMatch(input)).IsEqualTo(0.0d);
        }

        [Fact]
        public void LinqMatcher_For_String_IsMatch_RejectOnMatch()
        {
            // Assign
            string input = "2018-08-31 13:59:59";

            // Act
            var matcher = new LinqMatcher(MatchBehaviour.RejectOnMatch, "DateTime.Parse(it) > \"2018-08-01 13:50:00\"");

            // Assert
            Check.That(matcher.IsMatch(input)).IsEqualTo(0.0d);
        }

        [Fact]
        public void LinqMatcher_For_Object_IsMatch()
        {
            // Assign
            var input = new
            {
                Id = 9,
                Name = "Test"
            };

            // Act
            var matcher = new LinqMatcher("Id > 1 AND Name == \"Test\"");
            double match = matcher.IsMatch(input);

            // Assert
            Assert.Equal(1.0, match);
        }

        [Fact]
        public void LinqMatcher_For_JObject_IsMatch()
        {
            // Assign
            var input = new JObject
            {
                { "IntegerId", new JValue(9) },
                { "LongId", new JValue(long.MaxValue) },
                { "Name", new JValue("Test") }
            };

            // Act
            var matcher = new LinqMatcher("IntegerId > 1 AND LongId > 1 && Name == \"Test\"");
            double match = matcher.IsMatch(input);

            // Assert
            Assert.Equal(1.0, match);
        }

        [Fact]
        public void LinqMatcher_GetName()
        {
            // Assign
            var matcher = new LinqMatcher("x");

            // Act
            string name = matcher.Name;

            // Assert
            Check.That(name).Equals("LinqMatcher");
        }

        [Fact]
        public void LinqMatcher_GetPatterns()
        {
            // Assign
            var matcher = new LinqMatcher("x");

            // Act
            var patterns = matcher.GetPatterns();

            // Assert
            Check.That(patterns).ContainsExactly("x");
        }
    }
}