text:
<ng-template #modal let-c="close" let-d="dismiss">

{{ name }}

    <button type="button" class="close" aria-label="Close" (click)="d('Cross click')">
      ×
    </button>

    <ng-template #enablingContent>
      <ngb-accordion #acc="ngbAccordion" activeIds="panel-about-your-api-key" [closeOthers]="true">
        <ngb-panel title="About your key" id="panel-about-your-api-key">
          <ng-template ngbPanelContent>
            <stryker-api-key-generator [mode]="apiKeyMode" [apiKey]="apiKey" (generate)="enableRepository()" [slug]="repository.slug"></stryker-api-key-generator>
          </ng-template>
        </ngb-panel>
        <ngb-panel>
          <ng-template ngbPanelTitle>
            Badge
              <stryker-mutation-score-badge [repo]="repository" [style]="badgeStyle"></stryker-mutation-score-badge>

          </ng-template>
          <ng-template ngbPanelContent>

              This mutation score badge is tailor made for you.

                Pick a shiny style:
                <select id="styleSelector" [(ngModel)]="badgeStyle" class="ml-2 my-1 form-control">
                  <option *ngFor="let style of badgeStyles" [ngValue]="style">{{style}}</option>
                </select>

Examples:

                When you're ready, add this to your readme:

                [![Mutation testing badge]({{ badgeUrl }})]({{ reportUrl }})
                <stryker-clipboard-copy for="readmeBadgeExample">
                </stryker-clipboard-copy>

          </ng-template>
        </ngb-panel>
        <ngb-panel title="Usage">
          <ng-template ngbPanelContent>

              See
              the
                Stryker handbook ↗
              for an explanation on how you can configure the dashboard reporter or use cURL to send your report to the
              dashboard.

              When configuring the STRYKER_DASHBOARD_API_KEY in your CI/CD pipeline, please be sure to
              encrypt it via encrypted secrets.

🔑 Secrets in Azure DevOps ↗

🔑
                  Secret masking in CircleCI ↗

🔑 Secrets in GitHub Actions ↗

🔑 Secrets in GitLab CI ↗

🔑 Encrypted variables in Travis ↗

          </ng-template>
        </ngb-panel>
      </ngb-accordion>
    </ng-template>
    <ng-template #disablingContent>

If you are absolutely sure, you can disable Stryker for your repository now.

    </ng-template>

    <ng-template #enablingFooter>
      <button type="button" class="btn btn-outline-secondary" (click)="c('close')">Close</button>
    </ng-template>
    <ng-template #disablingFooter>
      <button type="button" class="btn btn-outline-danger" (click)="c('disable')">Disable</button>
    </ng-template>

</ng-template>


text:
using System;
using System.Linq;
using NUnit.Framework;
using SevenDigital.Api.Schema.Chart;
using SevenDigital.Api.Schema.TrackEndpoint;

namespace SevenDigital.Api.Wrapper.Integration.Tests.EndpointTests.TrackEndpoint
{
	[TestFixture]
	public class TrackChartTests
	{
		[Test]
		public void Can_hit_endpoint()
		{

			TrackChart release = Api<TrackChart>.Create
				.WithParameter("fromDate", "20110101")
				.WithParameter("toDate", "20110301")
				.WithParameter("country", "GB")
				.Please();

			Assert.That(release, Is.Not.Null);
			Assert.That(release.ChartItems.Count, Is.GreaterThan(0));
			Assert.That(release.FromDate, Is.GreaterThan(new DateTime(2011, 01, 01)));
			Assert.That(release.ToDate, Is.EqualTo(new DateTime(2011, 03, 01)));
			Assert.That(release.Type, Is.EqualTo(ChartType.track));

		}

		[Test]
		public void Can_hit_endpoint_with_paging()
		{
			TrackChart artistBrowse = Api<TrackChart>.Create
				.WithParameter("fromDate", "20090610")
				.WithParameter("toDate", "20110101")
				.WithParameter("page", "2")
				.WithParameter("pageSize", "20")
				.Please();

			Assert.That(artistBrowse, Is.Not.Null);
			Assert.That(artistBrowse.Page, Is.EqualTo(2));
			Assert.That(artistBrowse.PageSize, Is.EqualTo(20));
		}

		[Test]
		public void Can_hit_fluent_endpoint()
		{
			var release = Api<TrackChart>
							.Create
							.WithToDate(new DateTime(2011, 01, 31))
							.WithPeriod(ChartPeriod.Week)
							.Please();

			Assert.That(release, Is.Not.Null);
			Assert.That(release.ChartItems.Count, Is.EqualTo(10));
			Assert.That(release.Type, Is.EqualTo(ChartType.track));
			Assert.That(release.FromDate, Is.EqualTo(new DateTime(2011, 01, 25)));
			Assert.That(release.ToDate, Is.EqualTo(new DateTime(2011, 01, 31)));
			Assert.That(release.ChartItems.FirstOrDefault().Track, Is.Not.Null);
		}
	}
}

redpajama_set_name: RedPajamaGithub


text:
using Orchard.Layouts.Elements;
using Orchard.Layouts.Framework.Drivers;

namespace Orchard.Layouts.Drivers {
    public class RowElementDriver : ElementDriver<Row> {
    }
}


text:
from odoo import api, models

class EventRegistration(models.Model):
    _inherit = "event.registration"

    @api.model
    def create(self, vals):
        res = super(EventRegistration, self).create(vals)

        if res.event_id.attendee_signup and res.attendee_partner_id:
            login = res.attendee_partner_id.email
            user = self.env["res.users"].search([("login", "=ilike", login)])
            if not user:
                user = (
                    self.env["res.users"]
                    .sudo()
                    ._signup_create_user(
                        {"login": login, "partner_id": res.attendee_partner_id.id}
                    )
                )
                user.partner_id.signup_prepare()

        return res


text:
package main

import (
	"flag"
	"log"
	"net/http"
	"time"

	"code.google.com/p/go.net/websocket"
	"github.com/BurntSushi/xgbutil"
	"github.com/BurntSushi/xgbutil/keybind"
	"github.com/BurntSushi/xgbutil/xevent"
)

type websocket_connections struct {
	connections map[*connection]bool
	broadcast   chan string
	register    chan *connection
	unregister  chan *connection
}

var h = websocket_connections{
	broadcast:   make(chan string),
	register:    make(chan *connection),
	unregister:  make(chan *connection),
	connections: make(map[*connection]bool),
}

func (h *websocket_connections) run() {
	lastEvent := time.Now()
	eventTimeout := 50 * time.Millisecond
	for {
		select {
		case c := <-h.register:
			h.connections[c] = true
		case c := <-h.unregister:
			delete(h.connections, c)
			close(c.send)
		case m := <-h.broadcast:
			log.Printf("Sending %q\n", m)

			execEvent := true
			if time.Now().Sub(lastEvent) < eventTimeout {
				execEvent = false
			}
			lastEvent = time.Now()

			if execEvent {
				for c := range h.connections {
					select {
					case c.send <- m:
					default:
						delete(h.connections, c)
						close(c.send)
						go c.ws.Close()
					}
				}
			}
		}
	}
}

type connection struct {
	// The websocket connection.
	ws *websocket.Conn

	// Buffered channel of outbound messages.
	send chan string
}

func (c *connection) reader() {
	for {
		var message string
		err := websocket.Message.Receive(c.ws, &message)
		if err != nil {
			break
		}
		if message == "Ping" {
			err := websocket.Message.Send(c.ws, "Pong")
			if err != nil {
				break
			}
		}
	}
	c.ws.Close()
}

func (c *connection) writer() {
	for message := range c.send {
		err := websocket.Message.Send(c.ws, message)
		if err != nil {
			break
		}
	}
	c.ws.Close()
}

func wsHandler(ws *websocket.Conn) {
	c := &connection{send: make(chan string, 2), ws: ws}
	h.register <- c
	defer func() { h.unregister <- c }()
	go c.writer()
	c.reader()
}

func BindKeys(keymap map[string]string) {
	X, err := xgbutil.NewConn()
	if err != nil {
		log.Fatal(err)
	}
	keybind.Initialize(X)
	for k, v := range keymap {
		v := v
		err = keybind.KeyPressFun(func(X *xgbutil.XUtil, e xevent.KeyPressEvent) {
			h.broadcast <- v
		}).Connect(X, X.RootWin(), k, true)
		if err != nil {
			log.Fatal(err)
		}
	}
	log.Println("Program initialized. Start pressing keys!")
	xevent.Main(X)
}

var addr = flag.String("addr", "localhost:1337", "http service address")
var next_key = flag.String("next_key", "XF86AudioNext", "Key to skip to next track.")
var prev_key = flag.String("prev_key", "XF86AudioPrev", "Key to skip to previous track.")
var play_key = flag.String("play_key", "XF86AudioPlay", "Key to play .")
var pause_key = flag.String("pause_key", "XF86AudioPause", "Key to pause.")

func main() {
	flag.Parse()
	// Maybe make this flag or config file settable.
	var keymap = map[string]string{
		*next_key:  "19", // next
		*prev_key:  "20", // prev
		*play_key:  "16", // play
		*pause_key: "16", // pause
	}

	go h.run()
	go BindKeys(keymap)
	http.Handle("/", websocket.Handler(wsHandler))
	if err := http.ListenAndServe(*addr, nil); err != nil {
		log.Fatal("ListenAndServe:", err)
	}
}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Leptosiphon parviflorus var. rosaceus Hook.f.

### Remarks
null


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
J. Dept. Agric. Porto Rico 14(4): 347 (1930)

#### Original name
Uredo tolimensis F. Kern & Whetzel

### Remarks
null


text:
.class Lcom/android/server/usage/IntervalStats;
.super Ljava/lang/Object;
.source "IntervalStats.java"

# instance fields
.field public activeConfiguration:Landroid/content/res/Configuration;

.field public beginTime:J

.field public final configurations:Landroid/util/ArrayMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/util/ArrayMap",
            "<",
            "Landroid/content/res/Configuration;",
            "Landroid/app/usage/ConfigurationStats;",
            ">;"
        }
    .end annotation
.end field

.field public endTime:J

.field public events:Landroid/app/usage/TimeSparseArray;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/app/usage/TimeSparseArray",
            "<",
            "Landroid/app/usage/UsageEvents$Event;",
            ">;"
        }
    .end annotation
.end field

.field public lastTimeSaved:J

.field private final mStringCache:Landroid/util/ArraySet;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/util/ArraySet",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field public final packageStats:Landroid/util/ArrayMap;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Landroid/util/ArrayMap",
            "<",
            "Ljava/lang/String;",
            "Landroid/app/usage/UsageStats;",
            ">;"
        }
    .end annotation
.end field

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

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

    new-instance v0, Landroid/util/ArrayMap;

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

    iput-object v0, p0, Lcom/android/server/usage/IntervalStats;->packageStats:Landroid/util/ArrayMap;

    new-instance v0, Landroid/util/ArrayMap;

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

    iput-object v0, p0, Lcom/android/server/usage/IntervalStats;->configurations:Landroid/util/ArrayMap;

    new-instance v0, Landroid/util/ArraySet;

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

    iput-object v0, p0, Lcom/android/server/usage/IntervalStats;->mStringCache:Landroid/util/ArraySet;

    return-void
.end method

.method private getCachedStringRef(Ljava/lang/String;)Ljava/lang/String;
    .locals 2

    iget-object v1, p0, Lcom/android/server/usage/IntervalStats;->mStringCache:Landroid/util/ArraySet;

    invoke-virtual {v1, p1}, Landroid/util/ArraySet;->indexOf(Ljava/lang/Object;)I

    move-result v0

    if-gez v0, :cond_0

    iget-object v1, p0, Lcom/android/server/usage/IntervalStats;->mStringCache:Landroid/util/ArraySet;

    invoke-virtual {v1, p1}, Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z

    return-object p1

    :cond_0
    iget-object v1, p0, Lcom/android/server/usage/IntervalStats;->mStringCache:Landroid/util/ArraySet;

    invoke-virtual {v1, v0}, Landroid/util/ArraySet;->valueAt(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    return-object v1
.end method

.method private isStatefulEvent(I)Z
    .locals 1

    packed-switch p1, :pswitch_data_0

    const/4 v0, 0x0

    return v0

    :pswitch_0
    const/4 v0, 0x1

    return v0

    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_0
        :pswitch_0
        :pswitch_0
    .end packed-switch
.end method

# virtual methods
.method buildEvent(Ljava/lang/String;Ljava/lang/String;)Landroid/app/usage/UsageEvents$Event;
    .locals 2

    new-instance v0, Landroid/app/usage/UsageEvents$Event;

    invoke-direct {v0}, Landroid/app/usage/UsageEvents$Event;-><init>()V

    invoke-direct {p0, p1}, Lcom/android/server/usage/IntervalStats;->getCachedStringRef(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Landroid/app/usage/UsageEvents$Event;->mPackage:Ljava/lang/String;

    if-eqz p2, :cond_0

    invoke-direct {p0, p2}, Lcom/android/server/usage/IntervalStats;->getCachedStringRef(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Landroid/app/usage/UsageEvents$Event;->mClass:Ljava/lang/String;

    :cond_0
    return-object v0
.end method

.method getOrCreateConfigurationStats(Landroid/content/res/Configuration;)Landroid/app/usage/ConfigurationStats;
    .locals 4

    iget-object v1, p0, Lcom/android/server/usage/IntervalStats;->configurations:Landroid/util/ArrayMap;

    invoke-virtual {v1, p1}, Landroid/util/ArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/usage/ConfigurationStats;

    if-nez v0, :cond_0

    new-instance v0, Landroid/app/usage/ConfigurationStats;

    invoke-direct {v0}, Landroid/app/usage/ConfigurationStats;-><init>()V

    iget-wide v2, p0, Lcom/android/server/usage/IntervalStats;->beginTime:J

    iput-wide v2, v0, Landroid/app/usage/ConfigurationStats;->mBeginTimeStamp:J

    iget-wide v2, p0, Lcom/android/server/usage/IntervalStats;->endTime:J

    iput-wide v2, v0, Landroid/app/usage/ConfigurationStats;->mEndTimeStamp:J

    iput-object p1, v0, Landroid/app/usage/ConfigurationStats;->mConfiguration:Landroid/content/res/Configuration;

    iget-object v1, p0, Lcom/android/server/usage/IntervalStats;->configurations:Landroid/util/ArrayMap;

    invoke-virtual {v1, p1, v0}, Landroid/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :cond_0
    return-object v0
.end method

.method getOrCreateUsageStats(Ljava/lang/String;)Landroid/app/usage/UsageStats;
    .locals 4

    iget-object v1, p0, Lcom/android/server/usage/IntervalStats;->packageStats:Landroid/util/ArrayMap;

    invoke-virtual {v1, p1}, Landroid/util/ArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/usage/UsageStats;

    if-nez v0, :cond_0

    new-instance v0, Landroid/app/usage/UsageStats;

    invoke-direct {v0}, Landroid/app/usage/UsageStats;-><init>()V

    invoke-direct {p0, p1}, Lcom/android/server/usage/IntervalStats;->getCachedStringRef(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Landroid/app/usage/UsageStats;->mPackageName:Ljava/lang/String;

    iget-wide v2, p0, Lcom/android/server/usage/IntervalStats;->beginTime:J

    iput-wide v2, v0, Landroid/app/usage/UsageStats;->mBeginTimeStamp:J

    iget-wide v2, p0, Lcom/android/server/usage/IntervalStats;->endTime:J

    iput-wide v2, v0, Landroid/app/usage/UsageStats;->mEndTimeStamp:J

    iget-object v1, p0, Lcom/android/server/usage/IntervalStats;->packageStats:Landroid/util/ArrayMap;

    iget-object v2, v0, Landroid/app/usage/UsageStats;->mPackageName:Ljava/lang/String;

    invoke-virtual {v1, v2, v0}, Landroid/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :cond_0
    return-object v0
.end method

.method update(Ljava/lang/String;JI)V
    .locals 8

    const/4 v6, 0x1

    invoke-virtual {p0, p1}, Lcom/android/server/usage/IntervalStats;->getOrCreateUsageStats(Ljava/lang/String;)Landroid/app/usage/UsageStats;

    move-result-object v0

    const/4 v1, 0x2

    if-eq p4, v1, :cond_0

    const/4 v1, 0x3

    if-ne p4, v1, :cond_2

    :cond_0
    iget v1, v0, Landroid/app/usage/UsageStats;->mLastEvent:I

    if-eq v1, v6, :cond_1

    iget v1, v0, Landroid/app/usage/UsageStats;->mLastEvent:I

    const/4 v2, 0x4

    if-ne v1, v2, :cond_2

    :cond_1
    iget-wide v2, v0, Landroid/app/usage/UsageStats;->mTotalTimeInForeground:J

    iget-wide v4, v0, Landroid/app/usage/UsageStats;->mLastTimeUsed:J

    sub-long v4, p2, v4

    add-long/2addr v2, v4

    iput-wide v2, v0, Landroid/app/usage/UsageStats;->mTotalTimeInForeground:J

    :cond_2
    invoke-direct {p0, p4}, Lcom/android/server/usage/IntervalStats;->isStatefulEvent(I)Z

    move-result v1

    if-eqz v1, :cond_3

    iput p4, v0, Landroid/app/usage/UsageStats;->mLastEvent:I

    :cond_3
    const/4 v1, 0x6

    if-eq p4, v1, :cond_4

    iput-wide p2, v0, Landroid/app/usage/UsageStats;->mLastTimeUsed:J

    :cond_4
    iput-wide p2, v0, Landroid/app/usage/UsageStats;->mEndTimeStamp:J

    if-ne p4, v6, :cond_5

    iget v1, v0, Landroid/app/usage/UsageStats;->mLaunchCount:I

    add-int/lit8 v1, v1, 0x1

    iput v1, v0, Landroid/app/usage/UsageStats;->mLaunchCount:I

    :cond_5
    iput-wide p2, p0, Lcom/android/server/usage/IntervalStats;->endTime:J

    return-void
.end method

.method updateChooserCounts(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .locals 6

    const/4 v5, 0x0

    invoke-virtual {p0, p1}, Lcom/android/server/usage/IntervalStats;->getOrCreateUsageStats(Ljava/lang/String;)Landroid/app/usage/UsageStats;

    move-result-object v3

    iget-object v4, v3, Landroid/app/usage/UsageStats;->mChooserCounts:Landroid/util/ArrayMap;

    if-nez v4, :cond_0

    new-instance v4, Landroid/util/ArrayMap;

    invoke-direct {v4}, Landroid/util/ArrayMap;-><init>()V

    iput-object v4, v3, Landroid/app/usage/UsageStats;->mChooserCounts:Landroid/util/ArrayMap;

    :cond_0
    iget-object v4, v3, Landroid/app/usage/UsageStats;->mChooserCounts:Landroid/util/ArrayMap;

    invoke-virtual {v4, p3}, Landroid/util/ArrayMap;->indexOfKey(Ljava/lang/Object;)I

    move-result v2

    if-gez v2, :cond_1

    new-instance v0, Landroid/util/ArrayMap;

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

    iget-object v4, v3, Landroid/app/usage/UsageStats;->mChooserCounts:Landroid/util/ArrayMap;

    invoke-virtual {v4, p3, v0}, Landroid/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

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

    move-result-object v4

    invoke-virtual {v0, p2, v4}, Landroid/util/ArrayMap;->getOrDefault(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/Integer;

    invoke-virtual {v4}, Ljava/lang/Integer;->intValue()I

    move-result v1

    add-int/lit8 v4, v1, 0x1

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

    move-result-object v4

    invoke-virtual {v0, p2, v4}, Landroid/util/ArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    return-void

    :cond_1
    iget-object v4, v3, Landroid/app/usage/UsageStats;->mChooserCounts:Landroid/util/ArrayMap;

    invoke-virtual {v4, v2}, Landroid/util/ArrayMap;->valueAt(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/util/ArrayMap;

    goto :goto_0
.end method

.method updateConfigurationStats(Landroid/content/res/Configuration;J)V
    .locals 6

    iget-object v2, p0, Lcom/android/server/usage/IntervalStats;->activeConfiguration:Landroid/content/res/Configuration;

    if-eqz v2, :cond_0

    iget-object v2, p0, Lcom/android/server/usage/IntervalStats;->configurations:Landroid/util/ArrayMap;

    iget-object v3, p0, Lcom/android/server/usage/IntervalStats;->activeConfiguration:Landroid/content/res/Configuration;

    invoke-virtual {v2, v3}, Landroid/util/ArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/app/usage/ConfigurationStats;

    iget-wide v2, v0, Landroid/app/usage/ConfigurationStats;->mTotalTimeActive:J

    iget-wide v4, v0, Landroid/app/usage/ConfigurationStats;->mLastTimeActive:J

    sub-long v4, p2, v4

    add-long/2addr v2, v4

    iput-wide v2, v0, Landroid/app/usage/ConfigurationStats;->mTotalTimeActive:J

    const-wide/16 v2, 0x1

    sub-long v2, p2, v2

    iput-wide v2, v0, Landroid/app/usage/ConfigurationStats;->mLastTimeActive:J

    :cond_0
    if-eqz p1, :cond_1

    invoke-virtual {p0, p1}, Lcom/android/server/usage/IntervalStats;->getOrCreateConfigurationStats(Landroid/content/res/Configuration;)Landroid/app/usage/ConfigurationStats;

    move-result-object v1

    iput-wide p2, v1, Landroid/app/usage/ConfigurationStats;->mLastTimeActive:J

    iget v2, v1, Landroid/app/usage/ConfigurationStats;->mActivationCount:I

    add-int/lit8 v2, v2, 0x1

    iput v2, v1, Landroid/app/usage/ConfigurationStats;->mActivationCount:I

    iget-object v2, v1, Landroid/app/usage/ConfigurationStats;->mConfiguration:Landroid/content/res/Configuration;

    iput-object v2, p0, Lcom/android/server/usage/IntervalStats;->activeConfiguration:Landroid/content/res/Configuration;

    :cond_1
    iput-wide p2, p0, Lcom/android/server/usage/IntervalStats;->endTime:J

    return-void
.end method


text:
package com.opengamma.strata.basics.index;

import java.io.Serializable;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;

import org.joda.beans.Bean;
import org.joda.beans.BeanDefinition;
import org.joda.beans.ImmutableBean;
import org.joda.beans.ImmutableDefaults;
import org.joda.beans.JodaBeanUtils;
import org.joda.beans.MetaProperty;
import org.joda.beans.Property;
import org.joda.beans.PropertyDefinition;
import org.joda.beans.impl.direct.DirectFieldsBeanBuilder;
import org.joda.beans.impl.direct.DirectMetaBean;
import org.joda.beans.impl.direct.DirectMetaProperty;
import org.joda.beans.impl.direct.DirectMetaPropertyMap;

import com.opengamma.strata.basics.currency.Currency;
import com.opengamma.strata.basics.location.Country;
import com.opengamma.strata.basics.schedule.Frequency;

/**
 * A price index implementation based on an immutable set of rules.
 *

 * A standard immutable implementation of {@link PriceIndex}.
 *

 * In most cases, applications should refer to indices by name, using {@link PriceIndex#of(String)}.
 * The named index will typically be resolved to an instance of this class.
 * As such, it is recommended to use the {@code PriceIndex} interface in application
 * code rather than directly referring to this class.
 */
@BeanDefinition
public final class ImmutablePriceIndex
    implements PriceIndex, ImmutableBean, Serializable {

  /**
   * The index name, such as 'GB-HICP'.
   */
  @PropertyDefinition(validate = "notNull", overrideGet = true)
  private final String name;
  /**
   * The region of the index.
   */
  @PropertyDefinition(validate = "notNull", overrideGet = true)
  private final Country region;
  /**
   * The currency of the index.
   */
  @PropertyDefinition(validate = "notNull", overrideGet = true)
  private final Currency currency;
  /**
   * Whether the index is active, defaulted to true.
   *

   * Over time some indices become inactive and are no longer produced.
   * If this occurs, this flag will be set to false.
   */
  @PropertyDefinition(overrideGet = true)
  private final boolean active;
  /**
   * The publication frequency of the index.
   * Most price indices are published monthly, but some are published quarterly.
   */
  @PropertyDefinition(validate = "notNull", overrideGet = true)
  private final Frequency publicationFrequency;

  //-------------------------------------------------------------------------
  @ImmutableDefaults
  private static void applyDefaults(Builder builder) {
    builder.active = true;
  }

  @Override
  public FloatingRateName getFloatingRateName() {
    return FloatingRateName.of(name);
  }

  //-------------------------------------------------------------------------
  @Override
  public boolean equals(Object obj) {
    if (obj == this) {
      return true;
    }
    if (obj instanceof ImmutablePriceIndex) {
      return name.equals(((ImmutablePriceIndex) obj).name);
    }
    return false;
  }

  @Override
  public int hashCode() {
    return name.hashCode();
  }

  //-------------------------------------------------------------------------
  /**
   * Returns the name of the index.
   *
   * @return the name of the index
   */
  @Override
  public String toString() {
    return getName();
  }

  //------------------------- AUTOGENERATED START -------------------------
  ///CLOVER:OFF
  /**
   * The meta-bean for {@code ImmutablePriceIndex}.
   * @return the meta-bean, not null
   */
  public static ImmutablePriceIndex.Meta meta() {
    return ImmutablePriceIndex.Meta.INSTANCE;
  }

  static {
    JodaBeanUtils.registerMetaBean(ImmutablePriceIndex.Meta.INSTANCE);
  }

  /**
   * The serialization version id.
   */
  private static final long serialVersionUID = 1L;

  /**
   * Returns a builder used to create an instance of the bean.
   * @return the builder, not null
   */
  public static ImmutablePriceIndex.Builder builder() {
    return new ImmutablePriceIndex.Builder();
  }

  private ImmutablePriceIndex(
      String name,
      Country region,
      Currency currency,
      boolean active,
      Frequency publicationFrequency) {
    JodaBeanUtils.notNull(name, "name");
    JodaBeanUtils.notNull(region, "region");
    JodaBeanUtils.notNull(currency, "currency");
    JodaBeanUtils.notNull(publicationFrequency, "publicationFrequency");
    this.name = name;
    this.region = region;
    this.currency = currency;
    this.active = active;
    this.publicationFrequency = publicationFrequency;
  }

  @Override
  public ImmutablePriceIndex.Meta metaBean() {
    return ImmutablePriceIndex.Meta.INSTANCE;
  }

  @Override
  public <R> Property<R> property(String propertyName) {
    return metaBean().<R>metaProperty(propertyName).createProperty(this);
  }

  @Override
  public Set<String> propertyNames() {
    return metaBean().metaPropertyMap().keySet();
  }

  //-----------------------------------------------------------------------
  /**
   * Gets the index name, such as 'GB-HICP'.
   * @return the value of the property, not null
   */
  @Override
  public String getName() {
    return name;
  }

  //-----------------------------------------------------------------------
  /**
   * Gets the region of the index.
   * @return the value of the property, not null
   */
  @Override
  public Country getRegion() {
    return region;
  }

  //-----------------------------------------------------------------------
  /**
   * Gets the currency of the index.
   * @return the value of the property, not null
   */
  @Override
  public Currency getCurrency() {
    return currency;
  }

  //-----------------------------------------------------------------------
  /**
   * Gets whether the index is active, defaulted to true.
   *

   * Over time some indices become inactive and are no longer produced.
   * If this occurs, this flag will be set to false.
   * @return the value of the property
   */
  @Override
  public boolean isActive() {
    return active;
  }

  //-----------------------------------------------------------------------
  /**
   * Gets the publication frequency of the index.
   * Most price indices are published monthly, but some are published quarterly.
   * @return the value of the property, not null
   */
  @Override
  public Frequency getPublicationFrequency() {
    return publicationFrequency;
  }

  //-----------------------------------------------------------------------
  /**
   * Returns a builder that allows this bean to be mutated.
   * @return the mutable builder, not null
   */
  public Builder toBuilder() {
    return new Builder(this);
  }

  //-----------------------------------------------------------------------
  /**
   * The meta-bean for {@code ImmutablePriceIndex}.
   */
  public static final class Meta extends DirectMetaBean {
    /**
     * The singleton instance of the meta-bean.
     */
    static final Meta INSTANCE = new Meta();

    /**
     * The meta-property for the {@code name} property.
     */
    private final MetaProperty<String> name = DirectMetaProperty.ofImmutable(
        this, "name", ImmutablePriceIndex.class, String.class);
    /**
     * The meta-property for the {@code region} property.
     */
    private final MetaProperty<Country> region = DirectMetaProperty.ofImmutable(
        this, "region", ImmutablePriceIndex.class, Country.class);
    /**
     * The meta-property for the {@code currency} property.
     */
    private final MetaProperty<Currency> currency = DirectMetaProperty.ofImmutable(
        this, "currency", ImmutablePriceIndex.class, Currency.class);
    /**
     * The meta-property for the {@code active} property.
     */
    private final MetaProperty<Boolean> active = DirectMetaProperty.ofImmutable(
        this, "active", ImmutablePriceIndex.class, Boolean.TYPE);
    /**
     * The meta-property for the {@code publicationFrequency} property.
     */
    private final MetaProperty<Frequency> publicationFrequency = DirectMetaProperty.ofImmutable(
        this, "publicationFrequency", ImmutablePriceIndex.class, Frequency.class);
    /**
     * The meta-properties.
     */
    private final Map<String, MetaProperty<?>> metaPropertyMap$ = new DirectMetaPropertyMap(
        this, null,
        "name",
        "region",
        "currency",
        "active",
        "publicationFrequency");

    /**
     * Restricted constructor.
     */
    private Meta() {
    }

    @Override
    protected MetaProperty<?> metaPropertyGet(String propertyName) {
      switch (propertyName.hashCode()) {
        case 3373707:  // name
          return name;
        case -934795532:  // region
          return region;
        case 575402001:  // currency
          return currency;
        case -1422950650:  // active
          return active;
        case -1407208304:  // publicationFrequency
          return publicationFrequency;
      }
      return super.metaPropertyGet(propertyName);
    }

    @Override
    public ImmutablePriceIndex.Builder builder() {
      return new ImmutablePriceIndex.Builder();
    }

    @Override
    public Class<? extends ImmutablePriceIndex> beanType() {
      return ImmutablePriceIndex.class;
    }

    @Override
    public Map<String, MetaProperty<?>> metaPropertyMap() {
      return metaPropertyMap$;
    }

    //-----------------------------------------------------------------------
    /**
     * The meta-property for the {@code name} property.
     * @return the meta-property, not null
     */
    public MetaProperty<String> name() {
      return name;
    }

    /**
     * The meta-property for the {@code region} property.
     * @return the meta-property, not null
     */
    public MetaProperty<Country> region() {
      return region;
    }

    /**
     * The meta-property for the {@code currency} property.
     * @return the meta-property, not null
     */
    public MetaProperty<Currency> currency() {
      return currency;
    }

    /**
     * The meta-property for the {@code active} property.
     * @return the meta-property, not null
     */
    public MetaProperty<Boolean> active() {
      return active;
    }

    /**
     * The meta-property for the {@code publicationFrequency} property.
     * @return the meta-property, not null
     */
    public MetaProperty<Frequency> publicationFrequency() {
      return publicationFrequency;
    }

    //-----------------------------------------------------------------------
    @Override
    protected Object propertyGet(Bean bean, String propertyName, boolean quiet) {
      switch (propertyName.hashCode()) {
        case 3373707:  // name
          return ((ImmutablePriceIndex) bean).getName();
        case -934795532:  // region
          return ((ImmutablePriceIndex) bean).getRegion();
        case 575402001:  // currency
          return ((ImmutablePriceIndex) bean).getCurrency();
        case -1422950650:  // active
          return ((ImmutablePriceIndex) bean).isActive();
        case -1407208304:  // publicationFrequency
          return ((ImmutablePriceIndex) bean).getPublicationFrequency();
      }
      return super.propertyGet(bean, propertyName, quiet);
    }

    @Override
    protected void propertySet(Bean bean, String propertyName, Object newValue, boolean quiet) {
      metaProperty(propertyName);
      if (quiet) {
        return;
      }
      throw new UnsupportedOperationException("Property cannot be written: " + propertyName);
    }

  }

  //-----------------------------------------------------------------------
  /**
   * The bean-builder for {@code ImmutablePriceIndex}.
   */
  public static final class Builder extends DirectFieldsBeanBuilder<ImmutablePriceIndex> {

    private String name;
    private Country region;
    private Currency currency;
    private boolean active;
    private Frequency publicationFrequency;

    /**
     * Restricted constructor.
     */
    private Builder() {
      applyDefaults(this);
    }

    /**
     * Restricted copy constructor.
     * @param beanToCopy  the bean to copy from, not null
     */
    private Builder(ImmutablePriceIndex beanToCopy) {
      this.name = beanToCopy.getName();
      this.region = beanToCopy.getRegion();
      this.currency = beanToCopy.getCurrency();
      this.active = beanToCopy.isActive();
      this.publicationFrequency = beanToCopy.getPublicationFrequency();
    }

    //-----------------------------------------------------------------------
    @Override
    public Object get(String propertyName) {
      switch (propertyName.hashCode()) {
        case 3373707:  // name
          return name;
        case -934795532:  // region
          return region;
        case 575402001:  // currency
          return currency;
        case -1422950650:  // active
          return active;
        case -1407208304:  // publicationFrequency
          return publicationFrequency;
        default:
          throw new NoSuchElementException("Unknown property: " + propertyName);
      }
    }

    @Override
    public Builder set(String propertyName, Object newValue) {
      switch (propertyName.hashCode()) {
        case 3373707:  // name
          this.name = (String) newValue;
          break;
        case -934795532:  // region
          this.region = (Country) newValue;
          break;
        case 575402001:  // currency
          this.currency = (Currency) newValue;
          break;
        case -1422950650:  // active
          this.active = (Boolean) newValue;
          break;
        case -1407208304:  // publicationFrequency
          this.publicationFrequency = (Frequency) newValue;
          break;
        default:
          throw new NoSuchElementException("Unknown property: " + propertyName);
      }
      return this;
    }

    @Override
    public Builder set(MetaProperty<?> property, Object value) {
      super.set(property, value);
      return this;
    }

    @Override
    public Builder setString(String propertyName, String value) {
      setString(meta().metaProperty(propertyName), value);
      return this;
    }

    @Override
    public Builder setString(MetaProperty<?> property, String value) {
      super.setString(property, value);
      return this;
    }

    @Override
    public Builder setAll(Map<String, ? extends Object> propertyValueMap) {
      super.setAll(propertyValueMap);
      return this;
    }

    @Override
    public ImmutablePriceIndex build() {
      return new ImmutablePriceIndex(
          name,
          region,
          currency,
          active,
          publicationFrequency);
    }

    //-----------------------------------------------------------------------
    /**
     * Sets the index name, such as 'GB-HICP'.
     * @param name  the new value, not null
     * @return this, for chaining, not null
     */
    public Builder name(String name) {
      JodaBeanUtils.notNull(name, "name");
      this.name = name;
      return this;
    }

    /**
     * Sets the region of the index.
     * @param region  the new value, not null
     * @return this, for chaining, not null
     */
    public Builder region(Country region) {
      JodaBeanUtils.notNull(region, "region");
      this.region = region;
      return this;
    }

    /**
     * Sets the currency of the index.
     * @param currency  the new value, not null
     * @return this, for chaining, not null
     */
    public Builder currency(Currency currency) {
      JodaBeanUtils.notNull(currency, "currency");
      this.currency = currency;
      return this;
    }

    /**
     * Sets whether the index is active, defaulted to true.
     *

     * Over time some indices become inactive and are no longer produced.
     * If this occurs, this flag will be set to false.
     * @param active  the new value
     * @return this, for chaining, not null
     */
    public Builder active(boolean active) {
      this.active = active;
      return this;
    }

    /**
     * Sets the publication frequency of the index.
     * Most price indices are published monthly, but some are published quarterly.
     * @param publicationFrequency  the new value, not null
     * @return this, for chaining, not null
     */
    public Builder publicationFrequency(Frequency publicationFrequency) {
      JodaBeanUtils.notNull(publicationFrequency, "publicationFrequency");
      this.publicationFrequency = publicationFrequency;
      return this;
    }

    //-----------------------------------------------------------------------
    @Override
    public String toString() {
      StringBuilder buf = new StringBuilder(192);
      buf.append("ImmutablePriceIndex.Builder{");
      buf.append("name").append('=').append(JodaBeanUtils.toString(name)).append(',').append(' ');
      buf.append("region").append('=').append(JodaBeanUtils.toString(region)).append(',').append(' ');
      buf.append("currency").append('=').append(JodaBeanUtils.toString(currency)).append(',').append(' ');
      buf.append("active").append('=').append(JodaBeanUtils.toString(active)).append(',').append(' ');
      buf.append("publicationFrequency").append('=').append(JodaBeanUtils.toString(publicationFrequency));
      buf.append('}');
      return buf.toString();
    }

  }

  ///CLOVER:ON
  //-------------------------- AUTOGENERATED END --------------------------
}


text:
<?php

use yii\db\Migration;

class m150801_194319_yii2user_migrations extends Migration
{
    public function up()
    {
        $controller = Yii::$app->controller;
        $msg = " => Migrating up yii2-user's migrations in @vendor/dektrium/yii2-user/migrations";

        echo "\n\n";
        echo $controller->ansiFormat($msg, \yii\helpers\Console::FG_GREEN) . "\n";

        system(Yii::getAlias("@app/yii") . " migrate/up  --interactive=0 --migrationPath=@vendor/dektrium/yii2-user/migrations", $errorCode);

        if ($errorCode == "0") {
            return true;
        } else {
            return false;
        }
    }

    public function down()
    {
        $controller = Yii::$app->controller;
        $msg = " => Migrating down yii2-user's migrations in @vendor/dektrium/yii2-user/migrations";

        echo "\n\n";
        echo $controller->ansiFormat($msg, \yii\helpers\Console::FG_GREEN) . "\n";

        system(Yii::getAlias("@app/yii") . " migrate/down  --interactive=0 --migrationPath=@vendor/dektrium/yii2-user/migrations", $errorCode);

        if ($errorCode == "0") {
            return true;
        } else {
            return false;
        }
    }
}


text:
"""
Copyright 2016 Rasmus Larsen

This software may be modified and distributed under the terms
of the MIT license. See the LICENSE.txt file for details.
"""

import tensorflow as tf

class BaseNet(object):
    def __init__(self, config):
        self.sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True,
                                                     log_device_placement=False,
                                                     inter_op_parallelism_threads=4,
                                                     intra_op_parallelism_threads=4))  # TF uses all cores by default...
        self.saver = tf.train.Saver()

        self.tensorboard = config['tensorboard']
        if self.tensorboard:
            self.merged = tf.merge_all_summaries()
            self.writer = tf.train.SummaryWriter("logs/", self.sess.graph)

        self.sess.run(tf.initialize_all_variables())

    def save(self, name):
        self.saver.save(self.sess, "save/model_" + name + ".ckpt")

    def load(self, name):
        self.saver.restore(self.sess, 'save/breakout_398.ckpt')#"save/model_" + name + ".ckpt")
        if self.tensorboard:  # generate a tensorboard summary from the loaded model
            summaries = self.sess.run(self.merged)
            self.writer.add_summary(summaries)
            self.writer.flush()

    @staticmethod
    def make_weight(shape):
        return tf.get_variable('weight', shape,
                               initializer=tf.uniform_unit_scaling_initializer(factor=1.43))  # 1.43 for relu

    @staticmethod
    def make_bias(shape):
        return tf.get_variable('bias', shape,
                               initializer=tf.constant_initializer(0.001))

    @staticmethod
    def conv2d(x, W, stride):
        return tf.nn.conv2d(x, W, strides=[1, stride, stride, 1], padding="SAME")

    @staticmethod
    def conv2d_transpose(x, W, shape, stride):
        return tf.nn.conv2d_transpose(x, W, shape, strides=[1, stride, stride, 1], padding="SAME")


text:
<!DOCTYPE HTML>

        <title> contact </title>
        <link rel="stylesheet" type="text/css" href="css/normalize.css">
        <link rel="stylesheet" type="text/css" href="css/style.css">

                Malcolm Munroe

                About
                Portfolio
                Contact

Contact

            <form id="contact-form">

                        Name
                        <input type="text" name="name" id="name" placeholder="John Doe" required="required">

                        Email
                        <input type="text" name="email" id="name" placeholder="example@gmail.com" required="required">

                        Message
                        <textarea id="message" name="message" required="required"></textarea>

                <input type="submit" name="submit">
            </form>

Connect With Me

 @ Copyright 2017 Malcolm Munroe


text:
package integration

import (
	"container/list"
	"context"
	"fmt"
	"os"
	"path/filepath"
	"sync"
	"testing"

	"github.com/google/go-cmp/cmp"
	"github.com/google/go-cmp/cmp/cmpopts"
	clientset "github.com/kubeflow/mpi-operator/v2/pkg/client/clientset/versioned"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/util/wait"
	"k8s.io/apimachinery/pkg/watch"
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/rest"
	"sigs.k8s.io/controller-runtime/pkg/envtest"
)

var (
	restConfig *rest.Config
)

func TestMain(m *testing.M) {
	env := &envtest.Environment{
		CRDDirectoryPaths: []string{filepath.Join("..", "..", "..", "manifests", "base")},
	}
	var err error
	restConfig, err = env.Start()
	if err != nil {
		panic(fmt.Sprintf("Failed to start envtest.Environment: %v", err))
	}

	code := m.Run()

	if err = env.Stop(); err != nil {
		panic(fmt.Sprintf("Failed to stop envtest.Environment: %v", err))
	}

	os.Exit(code)
}

type testSetup struct {
	kClient   kubernetes.Interface
	mpiClient clientset.Interface
	namespace string
	events    *eventChecker
}

func newTestSetup(ctx context.Context, t *testing.T) testSetup {
	t.Helper()
	kubeClient, err := kubernetes.NewForConfig(restConfig)
	if err != nil {
		t.Fatalf("Creating kubernetes client: %v", err)
	}
	mpiClient, err := clientset.NewForConfig(restConfig)
	if err != nil {
		t.Fatalf("Creating MPI client: %v", err)
	}
	ns, cleanup, err := createTestNamespace(ctx, kubeClient)
	if err != nil {
		t.Fatalf("Creating test namespace: %v", err)
	}
	t.Cleanup(cleanup)
	t.Logf("Using namespace %s", ns)

	evChecker, stop, err := newEventChecker(ctx, kubeClient, ns)
	if err != nil {
		t.Fatalf("Failed to create an event watcher: %v", err)
	}
	t.Cleanup(stop)
	go evChecker.run()
	return testSetup{
		kClient:   kubeClient,
		mpiClient: mpiClient,
		namespace: ns,
		events:    evChecker,
	}
}

func createTestNamespace(ctx context.Context, client kubernetes.Interface) (string, func(), error) {
	ns := &corev1.Namespace{
		ObjectMeta: metav1.ObjectMeta{
			GenerateName: "test-",
		},
	}
	var err error
	ns, err = client.CoreV1().Namespaces().Create(ctx, ns, metav1.CreateOptions{})
	if err != nil {
		return "", nil, err
	}
	cleanup := func() {
		_ = client.CoreV1().Namespaces().Delete(context.Background(), ns.Name, metav1.DeleteOptions{})
	}
	return ns.Name, cleanup, nil
}

type eventChecker struct {
	sync.Mutex
	ch       <-chan watch.Event
	expected list.List
}

func newEventChecker(ctx context.Context, client kubernetes.Interface, ns string) (*eventChecker, func(), error) {
	watch, err := client.CoreV1().Events(ns).Watch(ctx, metav1.ListOptions{})
	if err != nil {
		return nil, nil, err
	}
	stop := func() {
		watch.Stop()
	}
	return &eventChecker{
		ch: watch.ResultChan(),
	}, stop, nil
}

func (c *eventChecker) expect(ev corev1.Event) {
	c.Lock()
	c.expected.PushBack(&ev)
	c.Unlock()
}

func (c *eventChecker) run() {
	for {
		watchEvent, more := <-c.ch
		if !more {
			break
		}
		if watchEvent.Type != watch.Added {
			continue
		}
		ev, ok := watchEvent.Object.(*corev1.Event)
		if !ok {
			continue
		}
		c.Lock()
		if c.expected.Len() != 0 {
			front := c.expected.Front()
			diff := cmp.Diff(front.Value, ev, cmpopts.IgnoreTypes(metav1.ObjectMeta{}), cmpopts.IgnoreFields(corev1.Event{}, "FirstTimestamp", "LastTimestamp", "Count", "Message"), cmpopts.IgnoreFields(corev1.ObjectReference{}, "ResourceVersion"))
			if diff == "" {
				c.expected.Remove(front)
			}
		}
		c.Unlock()
	}
}

func (c *eventChecker) verify(t *testing.T) {
	t.Helper()
	err := wait.Poll(waitInterval, wait.ForeverTestTimeout, func() (bool, error) {
		c.Lock()
		defer c.Unlock()
		return c.expected.Len() == 0, nil
	})
	if err != nil {
		for v := c.expected.Front(); v != nil; v = v.Next() {
			t.Errorf("Unsatisfied event %s", v.Value)
		}
	}
}


text:
=head1 LICENSE

Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
Copyright [2016-2017] EMBL-European Bioinformatics Institute

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.

=cut

=head1 CONTACT

 Please email comments or questions to the public Ensembl
 developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.

 Questions may also be sent to the Ensembl help desk at
 <http://www.ensembl.org/Help/Contact>.

=cut
package Bio::EnsEMBL::Variation::Pipeline::ProteinFunction::ProteinFunction_conf;

use strict;
use warnings;

use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf');

use Bio::EnsEMBL::Variation::Pipeline::ProteinFunction::Constants qw(FULL UPDATE NONE);

sub default_options {
    my ($self) = @_;

    return {

        # NB: You can find some documentation on this pipeline on confluence here:
        #
        # http://www.ebi.ac.uk/seqdb/confluence/display/EV/Protein+function+pipeline

        # Pipeline wide settings

        # If the debug_mode flag is set to 1 then we will only run the pipeline on a single gene
        # (currently set to BRCA1 in InitJobs.pm), this is useful when testing new installations
        # of sift and polyphen, alterations to the pipeline etc. When set to 0 the full pipeline
        # will be run

        hive_force_init => 1,
        hive_use_param_stack => 0,
        hive_use_triggers => 0,
        hive_auto_rebalance_semaphores => 0,
        hive_no_init => 0,

        debug_mode              => 0,

        # the location of your ensembl checkout, the hive looks here for SQL files etc.

        ensembl_cvs_root_dir    => $ENV{'HOME'} . '/src',
        hive_root_dir           => $ENV{'HOME'} . '/src/ensembl-hive',

        pipeline_name           => 'protein_function',
        pipeline_dir            => '/hps/nobackup/production/ensembl/'.$ENV{USER}.'/'.$self->o('pipeline_name'),

        species_dir             => $self->o('pipeline_dir').'/'.$self->o('species'),

        # directory used for the hive's own output files

        output_dir              => $self->o('species_dir').'/hive_output',

        # this registry file should contain connection details for the core, variation
        # and compara databases (if you are using compara alignments). If you are
        # doing an UPDATE run for either sift or polyphen, the variation database
        # should have existing predictions in the protein_function_predictions table

        ensembl_registry        => $self->o('species_dir').'/ensembl.registry',

        # peptide sequences for all unique translations for this species will be dumped to this file

        fasta_file              => $self->o('species_dir').'/'.$self->o('species').'_translations.fa',

        # set this flag to include LRG translations in the analysis

        include_lrg             => 0,

        # include RefSeq transcripts, and edit with accompanying BAM?
        include_refseq          => 0,
        bam                     => '/nfs/production/panda/ensembl/variation/data/dump_vep/interim_GRCh38.p10_knownrefseq_alignments_2017-01-13.bam',

        # GRCh37 bam
        # bam                     => '/nfs/production/panda/ensembl/variation/data/dump_vep/interim_GRCh37.p13_knownrefseq_alignments_2017-01-13.bam',

        # connection details for the hive's own database

        pipeline_db => {
            -host   => 'mysql-ens-var-prod-1.ebi.ac.uk',
            -port   => 4449,
            -user   => 'ensadmin',
            -pass   => $self->o('password'),
            -dbname => $ENV{USER}.'_'.$self->o('pipeline_name').'_'. $self->o('species') .'_hive',
            -driver => 'mysql',
        },

        # configuration for the various resource options used in the pipeline

        default_lsf_options => '-qproduction-rh7 -R"select[mem>2000] rusage[mem=2000]" -M2000',
        medmem_lsf_options  => '-qproduction-rh7 -R"select[mem>8000] rusage[mem=8000]" -M8000',
        urgent_lsf_options  => '-qproduction-rh7 -R"select[mem>2000] rusage[mem=2000]" -M2000',
        highmem_lsf_options => '-qproduction-rh7 -R"select[mem>16000] rusage[mem=16000]" -M16000', # this is Sanger LSF speak for "give me 15GB of memory"
        long_lsf_options    => '-qproduction-rh7 -R"select[mem>2000] rusage[mem=2000]" -M2000',

        # Polyphen specific parameters

        # location of the software

        pph_dir                 => '/nfs/production/panda/ensembl/variation/software/polyphen-2.2.2',

        # where we will keep polyphen's working files etc. as the pipeline runs

        pph_working             => $self->o('species_dir').'/polyphen_working',

        # specify the Weka classifier models here, if you don't want predictions from
        # one of the classifier models set the value to the empty string

        humdiv_model            => $self->o('pph_dir').'/models/HumDiv.UniRef100.NBd.f11.model',

        humvar_model            => $self->o('pph_dir').'/models/HumVar.UniRef100.NBd.f11.model',

        # the run type for polyphen (& sift) can be one of FULL to run predictions for
        # all translations regardless of whether we already have predictions in the
        # database, NONE to exclude this analysis, or UPDATE to run predictions for any
        # new or changed translations in the database. The variation database specified
        # in the registry above is used to identify translations we already have
        # predictions for.

        pph_run_type            => NONE,

        # set this flag to use compara protein families as the alignments rather than
        # polyphen's own alignment pipeline

        pph_use_compara         => 0,

        # the maximum number of workers to run in parallel for polyphen and weka. Weka
        # runs much faster then polyphen so you don't need as many workers.

        pph_max_workers         => 500,

        weka_max_workers        => 20,

        # Sift specific parameters

        # location of the software

        sift_dir                => '/nfs/panda/ensemblgenomes/external/sift',

        sift_working            => $self->o('species_dir').'/sift_working',

        # the location of blastpgp etc.

        ncbi_dir                => '/nfs/panda/ensemblgenomes/external/ncbi-blast-2+/bin',

        # the protein database used to build alignments if you're not using compara

        blastdb                 => '/nfs/production/panda/ensembl/variation/data/sift5.2.2/uniref90/uniref90.fasta',

        # the following parameters mean the same as for polyphen

        sift_run_type           => UPDATE,

        sift_use_compara        => 0,

        sift_max_workers        => 500,
    };
}

#sub pipeline_create_commands {
#    my ($self) = @_;
#    return [
#        'mysql '.$self->dbconn_2_mysql('pipeline_db', 0).q{-e 'DROP DATABASE IF EXISTS }.$self->o('pipeline_db', '-dbname').q{'},
#        @{$self->SUPER::pipeline_create_commands},
#        'mysql '.$self->dbconn_2_mysql('pipeline_db', 1).q{-e 'INSERT INTO meta (meta_key, meta_value) VALUES ("hive_output_dir", "}.$self->o('output_dir').q{")'},
#    ];
#}

sub resource_classes {
    my ($self) = @_;
    return {
          'default' => { 'LSF' => $self->o('default_lsf_options') },
          'medmem'  => { 'LSF' => $self->o('medmem_lsf_options')  },
          'urgent'  => { 'LSF' => $self->o('urgent_lsf_options')  },
          'highmem' => { 'LSF' => $self->o('highmem_lsf_options') },
          'long'    => { 'LSF' => $self->o('long_lsf_options')    },
    };
}

sub pipeline_analyses {
    my ($self) = @_;

    my @common_params = (
        fasta_file          => $self->o('fasta_file'),
        ensembl_registry    => $self->o('ensembl_registry'),
        species             => $self->o('species'),
        debug_mode          => $self->o('debug_mode'),
    );

    return [
        {   -logic_name => 'init_jobs',
            -module     => 'Bio::EnsEMBL::Variation::Pipeline::ProteinFunction::InitJobs',
            -parameters => {
                sift_run_type   => $self->o('sift_run_type'),
                pph_run_type    => $self->o('pph_run_type'),
                include_lrg     => $self->o('include_lrg'),
                polyphen_dir    => $self->o('pph_dir'),
                sift_dir        => $self->o('sift_dir'),
                blastdb         => $self->o('blastdb'),
                include_refseq  => $self->o('include_refseq'),
                bam             => $self->o('bam'),
                species_dir     => $self->o('species_dir'),
                @common_params,
            },
            -input_ids  => [{}],
            -rc_name    => 'highmem',
            -flow_into  => {
                2 => [ 'run_polyphen' ],
                3 => [ 'run_sift' ],
            },
        },

        {   -logic_name     => 'run_polyphen',
            -module         => 'Bio::EnsEMBL::Variation::Pipeline::ProteinFunction::RunPolyPhen',
            -parameters     => {
                pph_dir     => $self->o('pph_dir'),
                pph_working => $self->o('pph_working'),
                use_compara => $self->o('pph_use_compara'),
                @common_params,
            },
            -max_retry_count => 0,
            -input_ids      => [],
            -hive_capacity  => $self->o('pph_max_workers'),
            -rc_name        => 'highmem',
            -flow_into      => {
                2   => [ 'run_weka' ],
            },
        },

        {   -logic_name     => 'run_weka',
            -module         => 'Bio::EnsEMBL::Variation::Pipeline::ProteinFunction::RunWeka',
            -parameters     => {
                pph_dir         => $self->o('pph_dir'),
                humdiv_model    => $self->o('humdiv_model'),
                humvar_model    => $self->o('humvar_model'),
                @common_params,
            },
            -max_retry_count => 0,
            -input_ids      => [],
            -hive_capacity  => $self->o('weka_max_workers'),
            -rc_name        => 'default',
            -flow_into      => {},
        },

        {   -logic_name     => 'run_sift',
            -module         => 'Bio::EnsEMBL::Variation::Pipeline::ProteinFunction::RunSift',
            -parameters     => {
                sift_dir        => $self->o('sift_dir'),
                sift_working    => $self->o('sift_working'),
                ncbi_dir        => $self->o('ncbi_dir'),
                blastdb         => $self->o('blastdb'),
                use_compara     => $self->o('sift_use_compara'),
                @common_params,
            },
            -failed_job_tolerance => 10,
            -max_retry_count => 5,
            -input_ids      => [],
            -hive_capacity  => $self->o('sift_max_workers'),
            -rc_name        => 'medmem',
            -flow_into      => {
              -1 => ['run_sift_highmem'],
            }
        },

        {   -logic_name     => 'run_sift_highmem',
            -module         => 'Bio::EnsEMBL::Variation::Pipeline::ProteinFunction::RunSift',
            -parameters     => {
                sift_dir        => $self->o('sift_dir'),
                sift_working    => $self->o('sift_working'),
                ncbi_dir        => $self->o('ncbi_dir'),
                blastdb         => $self->o('blastdb'),
                use_compara     => $self->o('sift_use_compara'),
                @common_params,
            },
            -input_ids      => [],
            -rc_name        => 'highmem',
        },

    ];
}

1;


text:
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 10.4.3-1-70-s
description: >
    checking 'this' (strict function declaration called by
    Function.prototype.apply(globalObject))
includes: [fnGlobalObject.js]
---*/

function f() { "use strict"; return this;};

assert.sameValue(f.apply(fnGlobalObject()), fnGlobalObject(), 'f.apply(fnGlobalObject())');


text:
namespace aos {

// Clips a value so that it is in [min, max]
static inline double Clip(double value, double min, double max) {
  if (value > max) {
    value = max;
  } else if (value < min) {
    value = min;
  }
  return value;
}

template <typename T>
static inline int sign(T val) {
  if (val > T(0)) {
    return 1;
  } else {
    return -1;
  }
}

}  // namespace aos

#endif  // AOS_COMMON_MATH_H_


text:
class Expression:
    def __init__(self, env, expr):
        self.env = env
        self.tmpl = env.jinja_env.from_string("{{ __result__(%s) }}" % expr)

    def evaluate(self, pad=None, this=None, values=None, alt=None):
        result = []

        def result_func(value):
            result.append(value)
            return ""

        values = self.env.make_default_tmpl_values(pad, this, values, alt)
        values["__result__"] = result_func
        self.tmpl.render(values)
        return result[0]

class FormatExpression:
    def __init__(self, env, expr):
        self.env = env
        self.tmpl = env.jinja_env.from_string(expr)

    def evaluate(self, pad=None, this=None, values=None, alt=None):
        values = self.env.make_default_tmpl_values(pad, this, values, alt)
        return self.tmpl.render(values)


text:
importScripts("worky.js");

// Create the event interface
var worker = Worky();

// Listen for events from window
worker.on("hello to worker2", function (data) {
    worker.emit("some event", data.magic, 7);
});


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="generator" content="ExDoc v0.16.3">
    <title>Search – Google Directions Generator v0.1.0</title>
    <link rel="stylesheet" href="dist/app-5b9e160cec.css" />

      <link rel="canonical" href="https://hexdocs.pm/google_directions_generator/search.html" />

<button class="sidebar-toggle">

  Toggle Sidebar
</button>

        Google Directions Generator

        v0.1.0

  <form class="sidebar-search" action="search.html">
    <button type="submit" class="search-button">

    </button>
    <input name="q" type="text" id="search-list" class="search-input" placeholder="search" aria-label="Search" autocomplete="off" />
  </form>

Pages

Modules

Search

            Built using
            ExDoc (v0.16.3),

            designed by
            Friedel Ziegelmayer.

        <button class="night-mode-toggle">Switch theme</button>


text:
<#
      .SYNOPSIS
      Intune remediation script for Attack surface reduction rules

      .DESCRIPTION
      Intune remediation script for Attack surface reduction rules

      .EXAMPLE
      PS C:\> .\Remediation-Windows10ASR.ps1

      .LINK
      http://jhochwald.com

      .LINK
      https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/attack-surface-reduction-rules-reference

      .NOTES
      Simple Intune remediation script
#>
[CmdletBinding(ConfirmImpact = 'None')]
param ()

#region ARM64Handling
# Restart Process using PowerShell 64-bit
if ($ENV:PROCESSOR_ARCHITEW6432 -eq 'AMD64')
{
   try
   {
      &"$ENV:WINDIR\SysNative\WindowsPowershell\v1.0\PowerShell.exe" -File $PSCOMMANDPATH
   }
   catch
   {
      Throw ('Failed to start {0}' -f $PSCOMMANDPATH)
   }

   exit
}
#endregion ARM64Handling

#region IntuneWorkaround
# We do NOT have the CSV for Intune Check/Remediation, so we simulate it

<#
      I reuse this as much as possible, so I try to keep it generic!
      This is the source for my DSC setup, my regular Intune, the Intune Check/Remediation, and some plain PowerShell scripts

      Source: https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/attack-surface-reduction-rules-reference

      2022-03-19 - Joerg Hochwald - http://jhochwald.com
#>
$AttackSurfaceReductionRulesList = '
   "Block abuse of exploited vulnerable signed drivers","lock abuse of exploited vulnerable signed drivers (not yet available)","56a863a9-875e-4185-98a7-b882c64b5ce5","Enabled"
   "Block Adobe Reader from creating child processes","Process creation from Adobe Reader (beta)","7674ba52-37eb-4a4f-a9a1-f0f9a1619a2c","Enabled"
   "Block all Office applications from creating child processes","Office apps launching child processes","d4f940ab-401b-4efc-aadc-ad5f3c50688a","Enabled"
   "Block credential stealing from the Windows local security authority subsystem","Flag credential stealing from the Windows local security authority subsystem","9e6c4e1f-7d60-472f-ba1a-a39ef669e4b2","Enabled"
   "Block executable content from email client and webmail","Block executable content from email client and webmail","be9ba2d9-53ea-4cdc-84e5-9b1eeee46550","Enabled"
   "Block executable files from running unless they meet a prevalence, age, or trusted list criterion","Executables that don''t meet a prevalence, age, or trusted list criteria","01443614-cd74-433a-b99e-2ecdc07bfc25","Enabled"
   "Block execution of potentially obfuscated scripts","Obfuscated js/vbs/ps/macro code","5beb7efe-fd9a-4556-801d-275e5ffc04cc","Enabled"
   "Block JavaScript or VBScript from launching downloaded executable content","js/vbs executing payload downloaded from Internet (no exceptions)","d3e037e1-3eb8-44c8-a917-57927947596d","Enabled"
   "Block Office applications from creating executable content","Office apps/macros creating executable content","3b576869-a4ec-4529-8536-b80a7769e899","Enabled"
   "Block Office applications from injecting code into other processes","Office apps injecting code into other processes (no exceptions)","75668c1f-73b5-4cf0-bb93-3ecf5cb7cc84","Enabled"
   "Block Office communication application from creating child processes","Process creation from Office communication products (beta)","26190899-1602-49e8-8b27-eb1d0a1ce869","Enabled"
   "Block persistence through WMI event subscription","Not available","e6db77e5-3df2-4cf1-b95a-636979351e5b","Enabled"
   "Block process creations originating from PSExec and WMI commands","Process creation from PSExec and WMI commands","d1e49aac-8f56-4280-b9ba-993a6d77406c","AuditMode"
   "Block untrusted and unsigned processes that run from USB","Untrusted and unsigned processes that run from USB","b2b3f03d-6a65-4f7b-a9c7-1c7ef74a9ba4","Enabled"
   "Block Win32 API calls from Office macros","Win32 imports from Office macro code","92e97fa1-2edf-4476-bdd6-9dd0b4dddc7b","Enabled"
   "Use advanced protection against ransomware","Advanced ransomware protection","c1db55ab-c21a-4637-bb3f-a12568109d35","Enabled"
'
$AttackSurfaceReductionRules = ($AttackSurfaceReductionRulesList | ConvertFrom-Csv -Delimiter ',' -Header 'Name', 'IntuneName', 'GUID', 'Action' -ErrorAction SilentlyContinue | Select-Object -Property 'Name', 'GUID', 'Action', @{
      Label      = 'AttackSurfaceReductionRules_Actions'
      Expression = {
         switch ($PSItem.Action)
         {
            AuditMode
            {
               2
            }
            Disabled
            {
               0
            }
            Enabled
            {
               1
            }
            NotConfigured
            {
               5
            }
            Warn
            {
               6
            }
            default
            {
               5
            }
         }
      }
   })
#endregion IntuneWorkaround

# Get the configured Rules
$RulesIds = (Get-MpPreference | Select-Object -ExpandProperty AttackSurfaceReductionRules_Ids)

# Get the configured Rules Actions
$RulesActions = (Get-MpPreference | Select-Object -ExpandProperty AttackSurfaceReductionRules_Actions)

# Check if we have them all - More local rules are OK!
if ($RulesIds.Count -lt $AttackSurfaceReductionRules.Count)
{
   exit 1
}

# Start the counter
$RuleCounter = 0

# Loop over them all
foreach ($RulesId in $RulesIds)
{
   if ($AttackSurfaceReductionRules.GUID -contains $RulesId)
   {
      if ($RulesActions[$RuleCounter] -ne ($AttackSurfaceReductionRules | Where-Object -FilterScript {
               $PSItem.GUID -eq $RulesId
            }).AttackSurfaceReductionRules_Actions)
      {
         # This rule does NOT match the desired state
         try
         {
            # MAKE IT SO
            $null = (Add-MpPreference -AttackSurfaceReductionRules_Ids $AttackSurfaceReductionRules.GUID -AttackSurfaceReductionRules_Actions (($AttackSurfaceReductionRules | Where-Object -FilterScript {
                        $PSItem.GUID -eq $RulesId
                     }).Action) -ErrorAction SilentlyContinue -Force)
         }
         catch
         {
            Write-Warning -Message 'How can this be the case?'

            exit 1
         }
      }

      # Count up
      $RuleCounter++
   }
   else
   {
      Write-Verbose -Message ('{0} is not handled yet!' -f $RulesId)
   }
}

# We are good to go
exit 0


text:
import * as React from 'react'
import { render } from 'react-dom'
import { compose, createStore, applyMiddleware } from 'redux'
import { Provider,ElementClass } from 'react-redux'
import App from '../containers/TodoApp'
import { devTools, persistState } from 'redux-devtools';
import { DebugPanel, DevTools, LogMonitor } from 'redux-devtools/lib/react';

export default function GetRenderElement<P>(reducer,component : React.ReactElement<P>, initialState:any){

	// const finalCreateStore = compose(
	// 	// Enables your middleware:
	// 	applyMiddleware(), // any Redux middleware, e.g. redux-thunk
	// 	// Provides support for DevTools:
	// 	devTools(),
	// 	// Lets you write ?debug_session=<name> in address bar to persist debug sessions
	// 	persistState(window.location.href.match(/[?&]debug_session=([^&]+)\b/))
	const finalCreateStore = compose(
	// Enables your middleware:
	applyMiddleware(), // any Redux middleware, e.g. redux-thunk
	// Provides support for DevTools:
	devTools()
	)(createStore);

	let store = finalCreateStore(reducer, initialState);
	var result =
	{
		Element :<div>
				<Provider store={store}>
					{component}
					</Provider>
				<DebugPanel top right bottom>
					<DevTools store={store} monitor={LogMonitor} />
					</DebugPanel>
					</div>,
	   Store: store

	}
	return result;
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Fake Link</title>

    <link href="{{config.url}}/admin/css/bootstrap.min.css" rel="stylesheet">

    <link href="{{config.url}}/admin/css/style.css" rel="stylesheet">

            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
                Toggle navigation

            </button>

Links

Media

Config

Signed in as Admin - Logout

            <form class="" onsubmit="return false;">
                <input id="inputTitle" class="form-control input-lg" type="text" placeholder="Title" value="{{config.title}}" />

                <textarea name="" id="inputDescription" rows="5" class="form-control input-lg" placeholder="Description">{{config.description}}</textarea>

                <input id="inputUrl" class="form-control input-lg" type="text" placeholder="Url: http://" value="{{config.url}}" />

                <select name="" id="selectTheme" class="form-control input-lg">
                    <option value="{{page.Template}}">Select a Theme</option>
                    {% for theme in themes %}
                    <option value="{{theme}}" {{ config.theme == theme ? 'selected' }}>{{theme}}</option>
                    {% endfor %}
                </select>

                <input id="inputUser" class="form-control input-lg" type="text" placeholder="User" value="{{config.user}}" />

                <input id="inputPassword" class="form-control input-lg" type="password" placeholder="Password" />

                <input id="inputRepeat" class="form-control input-lg" type="password" placeholder="Repeat Password" />

                <button id="btnSave" type="button" class="btn btn-success btn-lg btn-block">Save</button>

            </form>


text:
<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
    <!--   <baseDirectory>/</baseDirectory> -->
    <id>zip</id>
    <includeBaseDirectory>false</includeBaseDirectory>
    <formats>
        <format>zip</format>
    </formats>
    <fileSets>
        <fileSet>
            <directory>${project.build.directory}</directory>
            <outputDirectory>/</outputDirectory>
            <includes>
                <include>/*.jar</include>
                <include>/lib/*.*</include>
            </includes>
        </fileSet>
    </fileSets>
</assembly>


text:
require 'gitreport'

describe 'GitReport::Storage' do

  before :each do
    @tempfile = Tempfile.new('storage')
    @tempdir = File.dirname(@tempfile.path)
    @storage = GitReport::Storage.new(@tempdir, @tempfile)
    class Foo
      attr_accessor :foo, :bar

      def initialize foo, bar
        @foo = foo
        @bar = bar
      end
    end
  end

  describe '#save!' do
    it 'should save the given object to a file' do
      f1 = Foo.new("foo1", "bar1")
      f2 = Foo.new("foo2", "bar2")

      @storage.save! [f1,f2]

      restore = Marshal.load(Base64.decode64(File.read "#{@tempdir}/#{@tempfile}"))

      restore.first.foo.should == f1.foo
      restore.first.bar.should == f1.bar
      restore.last.foo.should  == f2.foo
      restore.last.bar.should  == f2.bar
    end
  end

  describe '#load' do
    it 'should load previously stored objects' do
      f1 = Foo.new("foo1", "bar1")
      f2 = Foo.new("foo2", "bar2")

      @storage.save! [f1,f2]

      restore = @storage.load

      restore.first.foo.should == f1.foo
      restore.first.bar.should == f1.bar
      restore.last.foo.should  == f2.foo
      restore.last.bar.should  == f2.bar
    end

    it 'should return an empty array in case no storage exists yet' do
      tempfile = nil
      tempdir = File.dirname(@tempfile.path)
      storage = GitReport::Storage.new(@tempdir, @tempfile)

      expect{ storage.load }.to_not raise_error
      storage.load.should == []
    end

  end

end


text:
<?php

namespace Tusbol\SlideshowModule\Test\Unit\Slideshow;

class SlideshowPresenterTest extends \TestCase
{

}


text:
@function can-stache.from from
@description Return a template loaded from an element.
@parent can-stache.static

@signature `stache.from(id)`

Load a template from an HTML element (usually a `<script>` element)
specified by id.  This is used typically for demo purposes.

For example, with a `<script>` tag as follows in your HTML:

```html
<script type='text/stache' id='my-template'>
  <h1>{{message}}</h1>
</script>
```

Load and render that template like:

```js
const template = stache.from( "my-template" );
template( { message: "Hello There!" } );
```

@param {String} id The id of the element, whose `innerHTML` will be used to create a template.
@return {can-stache.view} A renderer function that will render the
template.

@body


text:
/**
@ngdoc object
@name Metadata.Validator
@description

Represents a custom validator defined for verifying a field's data integrity.

# TODO Usages and examples

@param {Object} type
{@link Metadata.ValidatorType ValidatorType}
Defines the type of validation to execute on the field (e.g. `REGEXP`, `RANGE`, ...).

@param {string} value
Defines the value to be validated with. This value must comply with the structure required for the {@link Metadata.ValidatorTypes validator type} selected. See the docs for more details.

*/


text:
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "DOMBindingBase.h"

#include "nsIJSContextStack.h"

#include "jsfriendapi.h"
#include "mozilla/dom/DOMJSClass.h"
#include "nsContentUtils.h"
#include "nsWrapperCacheInlines.h"

USING_WORKERS_NAMESPACE

DOMBindingBase::DOMBindingBase(JSContext* aCx)
: mJSContext(aCx)
{
  if (!aCx) {
    AssertIsOnMainThread();
  }
}

DOMBindingBase::~DOMBindingBase()
{
  if (!mJSContext) {
    AssertIsOnMainThread();
  }
}

NS_IMPL_ADDREF(DOMBindingBase)
NS_IMPL_RELEASE(DOMBindingBase)
NS_INTERFACE_MAP_BEGIN(DOMBindingBase)
  NS_INTERFACE_MAP_ENTRY(nsISupports)
  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
NS_INTERFACE_MAP_END

void
DOMBindingBase::_trace(JSTracer* aTrc)
{
  JSObject* obj = GetJSObject();
  if (obj) {
    JS_CALL_OBJECT_TRACER(aTrc, obj, "cached wrapper");
  }
}

void
DOMBindingBase::_finalize(JSFreeOp* aFop)
{
  ClearWrapper();
  NS_RELEASE_THIS();
}

JSContext*
DOMBindingBase::GetJSContextFromContextStack() const
{
  AssertIsOnMainThread();
  MOZ_ASSERT(!mJSContext);

  if (!mContextStack) {
    mContextStack = nsContentUtils::ThreadJSContextStack();
    MOZ_ASSERT(mContextStack);
  }

  JSContext* cx;
  if (NS_FAILED(mContextStack->Peek(&cx))) {
    MOZ_NOT_REACHED("This should never fail!");
  }

  MOZ_ASSERT(cx);
  return cx;
}

#ifdef DEBUG
JSObject*
DOMBindingBase::GetJSObject() const
{
  // Make sure that the public method results in the same bits as our private
  // method.
  MOZ_ASSERT(GetJSObjectFromBits() == GetWrapperPreserveColor());
  return GetJSObjectFromBits();
}

void
DOMBindingBase::SetJSObject(JSObject* aObject)
{
  // Make sure that the public method results in the same bits as our private
  // method.
  SetWrapper(aObject);

  uintptr_t oldWrapperPtrBits = mWrapperPtrBits;

  SetWrapperBits(aObject);

  MOZ_ASSERT(oldWrapperPtrBits == mWrapperPtrBits);
}
#endif


text:
using System;
using System.Xml;
using System.Xml.Schema;
using System.Xml.Serialization;
using Newtonsoft.Json;

namespace proactima.jsonobject
{
    [Serializable]
    public partial class ImmutableJsonObject : IXmlSerializable
    {
        public void ReadXml(XmlReader reader)
        {
            var asEncoded = reader.ReadInnerXml();
            string asString;

            try
            {
                asString = EncodingHelper.Base64Decode(asEncoded);
            }
            catch (FormatException)
            {
                asString = asEncoded;
            }

            var asJson = JsonObject.Parse(asString, true);
            _json = ImmutableDictionary(asJson);
        }

        public void WriteXml(XmlWriter writer)
        {
            var base64Encoded = EncodingHelper.Base64Encode(JsonConvert.SerializeObject(this));
            writer.WriteRaw(base64Encoded);
        }

        XmlSchema IXmlSerializable.GetSchema()
        {
            return new XmlSchema();
        }

        public XmlSchema GetSchema()
        {
            return new XmlSchema();
        }
    }
}


text:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "getIntrospectionQuery", {
  enumerable: true,
  get: function get() {
    return _introspectionQuery.getIntrospectionQuery;
  }
});
Object.defineProperty(exports, "introspectionQuery", {
  enumerable: true,
  get: function get() {
    return _introspectionQuery.introspectionQuery;
  }
});
Object.defineProperty(exports, "getOperationAST", {
  enumerable: true,
  get: function get() {
    return _getOperationAST.getOperationAST;
  }
});
Object.defineProperty(exports, "getOperationRootType", {
  enumerable: true,
  get: function get() {
    return _getOperationRootType.getOperationRootType;
  }
});
Object.defineProperty(exports, "introspectionFromSchema", {
  enumerable: true,
  get: function get() {
    return _introspectionFromSchema.introspectionFromSchema;
  }
});
Object.defineProperty(exports, "buildClientSchema", {
  enumerable: true,
  get: function get() {
    return _buildClientSchema.buildClientSchema;
  }
});
Object.defineProperty(exports, "buildASTSchema", {
  enumerable: true,
  get: function get() {
    return _buildASTSchema.buildASTSchema;
  }
});
Object.defineProperty(exports, "buildSchema", {
  enumerable: true,
  get: function get() {
    return _buildASTSchema.buildSchema;
  }
});
Object.defineProperty(exports, "getDescription", {
  enumerable: true,
  get: function get() {
    return _buildASTSchema.getDescription;
  }
});
Object.defineProperty(exports, "extendSchema", {
  enumerable: true,
  get: function get() {
    return _extendSchema.extendSchema;
  }
});
Object.defineProperty(exports, "lexicographicSortSchema", {
  enumerable: true,
  get: function get() {
    return _lexicographicSortSchema.lexicographicSortSchema;
  }
});
Object.defineProperty(exports, "printSchema", {
  enumerable: true,
  get: function get() {
    return _schemaPrinter.printSchema;
  }
});
Object.defineProperty(exports, "printType", {
  enumerable: true,
  get: function get() {
    return _schemaPrinter.printType;
  }
});
Object.defineProperty(exports, "printIntrospectionSchema", {
  enumerable: true,
  get: function get() {
    return _schemaPrinter.printIntrospectionSchema;
  }
});
Object.defineProperty(exports, "typeFromAST", {
  enumerable: true,
  get: function get() {
    return _typeFromAST.typeFromAST;
  }
});
Object.defineProperty(exports, "valueFromAST", {
  enumerable: true,
  get: function get() {
    return _valueFromAST.valueFromAST;
  }
});
Object.defineProperty(exports, "valueFromASTUntyped", {
  enumerable: true,
  get: function get() {
    return _valueFromASTUntyped.valueFromASTUntyped;
  }
});
Object.defineProperty(exports, "astFromValue", {
  enumerable: true,
  get: function get() {
    return _astFromValue.astFromValue;
  }
});
Object.defineProperty(exports, "TypeInfo", {
  enumerable: true,
  get: function get() {
    return _TypeInfo.TypeInfo;
  }
});
Object.defineProperty(exports, "coerceValue", {
  enumerable: true,
  get: function get() {
    return _coerceValue.coerceValue;
  }
});
Object.defineProperty(exports, "isValidJSValue", {
  enumerable: true,
  get: function get() {
    return _isValidJSValue.isValidJSValue;
  }
});
Object.defineProperty(exports, "isValidLiteralValue", {
  enumerable: true,
  get: function get() {
    return _isValidLiteralValue.isValidLiteralValue;
  }
});
Object.defineProperty(exports, "concatAST", {
  enumerable: true,
  get: function get() {
    return _concatAST.concatAST;
  }
});
Object.defineProperty(exports, "separateOperations", {
  enumerable: true,
  get: function get() {
    return _separateOperations.separateOperations;
  }
});
Object.defineProperty(exports, "stripIgnoredCharacters", {
  enumerable: true,
  get: function get() {
    return _stripIgnoredCharacters.stripIgnoredCharacters;
  }
});
Object.defineProperty(exports, "isEqualType", {
  enumerable: true,
  get: function get() {
    return _typeComparators.isEqualType;
  }
});
Object.defineProperty(exports, "isTypeSubTypeOf", {
  enumerable: true,
  get: function get() {
    return _typeComparators.isTypeSubTypeOf;
  }
});
Object.defineProperty(exports, "doTypesOverlap", {
  enumerable: true,
  get: function get() {
    return _typeComparators.doTypesOverlap;
  }
});
Object.defineProperty(exports, "assertValidName", {
  enumerable: true,
  get: function get() {
    return _assertValidName.assertValidName;
  }
});
Object.defineProperty(exports, "isValidNameError", {
  enumerable: true,
  get: function get() {
    return _assertValidName.isValidNameError;
  }
});
Object.defineProperty(exports, "BreakingChangeType", {
  enumerable: true,
  get: function get() {
    return _findBreakingChanges.BreakingChangeType;
  }
});
Object.defineProperty(exports, "DangerousChangeType", {
  enumerable: true,
  get: function get() {
    return _findBreakingChanges.DangerousChangeType;
  }
});
Object.defineProperty(exports, "findBreakingChanges", {
  enumerable: true,
  get: function get() {
    return _findBreakingChanges.findBreakingChanges;
  }
});
Object.defineProperty(exports, "findDangerousChanges", {
  enumerable: true,
  get: function get() {
    return _findBreakingChanges.findDangerousChanges;
  }
});
Object.defineProperty(exports, "findDeprecatedUsages", {
  enumerable: true,
  get: function get() {
    return _findDeprecatedUsages.findDeprecatedUsages;
  }
});

var _introspectionQuery = require("./introspectionQuery");

var _getOperationAST = require("./getOperationAST");

var _getOperationRootType = require("./getOperationRootType");

var _introspectionFromSchema = require("./introspectionFromSchema");

var _buildClientSchema = require("./buildClientSchema");

var _buildASTSchema = require("./buildASTSchema");

var _extendSchema = require("./extendSchema");

var _lexicographicSortSchema = require("./lexicographicSortSchema");

var _schemaPrinter = require("./schemaPrinter");

var _typeFromAST = require("./typeFromAST");

var _valueFromAST = require("./valueFromAST");

var _valueFromASTUntyped = require("./valueFromASTUntyped");

var _astFromValue = require("./astFromValue");

var _TypeInfo = require("./TypeInfo");

var _coerceValue = require("./coerceValue");

var _isValidJSValue = require("./isValidJSValue");

var _isValidLiteralValue = require("./isValidLiteralValue");

var _concatAST = require("./concatAST");

var _separateOperations = require("./separateOperations");

var _stripIgnoredCharacters = require("./stripIgnoredCharacters");

var _typeComparators = require("./typeComparators");

var _assertValidName = require("./assertValidName");

var _findBreakingChanges = require("./findBreakingChanges");

var _findDeprecatedUsages = require("./findDeprecatedUsages");


text:
namespace base {
typedef Callback<void(void)> Closure;
}

namespace message_center {
class MessageCenter;
}

namespace tracked_objects {
class Location;
}

namespace user_prefs {
class PrefRegistrySyncable;
}

class Notification;
class Profile;

// ExtensionWelcomeNotification is a keyed service which manages showing and
// hiding a welcome notification for built-in components that show
// notifications. The Welcome Notification presumes network connectivity since
// it relies on synced preferences to work. This is generally fine since the
// current consumers on the welcome notification also presume network
// connectivity.
//
// This class expects to be created and called from the UI thread.
class ExtensionWelcomeNotification
    : public KeyedService,
      public syncable_prefs::PrefServiceSyncableObserver {
 public:
  // Allows for overriding global calls.
  class Delegate {
   public:
    Delegate() {}
    virtual ~Delegate() {}
    virtual message_center::MessageCenter* GetMessageCenter() = 0;
    virtual base::Time GetCurrentTime() = 0;
    virtual void PostTask(
        const tracked_objects::Location& from_here,
        const base::Closure& task) = 0;
   private:
    DISALLOW_COPY_AND_ASSIGN(Delegate);
  };

  // Requested time from showing the welcome notification to expiration.
  static const int kRequestedShowTimeDays;

  // The extension Id associated with the Google Now extension.
  static const char kChromeNowExtensionID[];

  ~ExtensionWelcomeNotification() override;

  // To workaround the lack of delegating constructors prior to C++11, we use
  // static Create methods.
  // Creates an ExtensionWelcomeNotification with the default delegate.
  static ExtensionWelcomeNotification* Create(Profile* const profile);

  // Creates an ExtensionWelcomeNotification with the specified delegate.
  static ExtensionWelcomeNotification* Create(Profile* const profile,
                                              Delegate* const delegate);

  // syncable_prefs::PrefServiceSyncableObserver
  void OnIsSyncingChanged() override;

  // Adds in the welcome notification if required for components built
  // into Chrome that show notifications like Chrome Now.
  void ShowWelcomeNotificationIfNecessary(const Notification& notification);

  // Handles Preference Registration for the Welcome Notification.
  static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* prefs);

 private:
  enum PopUpRequest { POP_UP_HIDDEN = 0, POP_UP_SHOWN = 1, };

  ExtensionWelcomeNotification(
      Profile* const profile,
      ExtensionWelcomeNotification::Delegate* const delegate);

  // Gets the message center from the delegate.
  message_center::MessageCenter* GetMessageCenter() const;

  // Unconditionally shows the welcome notification.
  void ShowWelcomeNotification(const base::string16& display_source,
                               const PopUpRequest pop_up_request);

  // Hides the welcome notification.
  void HideWelcomeNotification();

  // Whether the notification has been dismissed.
  bool UserHasDismissedWelcomeNotification() const;

  // Called when the Welcome Notification Dismissed pref has been changed.
  void OnWelcomeNotificationDismissedChanged();

  // Starts the welcome notification expiration timer.
  void StartExpirationTimer();

  // Stops the welcome notification expiration timer.
  void StopExpirationTimer();

  // Expires the welcome notification by hiding it and marking it dismissed.
  void ExpireWelcomeNotification();

  // Gets the expiration timestamp or a null time is there is none.
  base::Time GetExpirationTimestamp() const;

  // Sets the expiration timestamp from now.
  void SetExpirationTimestampFromNow();

  // True if the welcome notification has expired, false otherwise.
  bool IsWelcomeNotificationExpired() const;

  // Prefs listener for welcome_notification_dismissed.
  BooleanPrefMember welcome_notification_dismissed_pref_;

  // Prefs listener for welcome_notification_dismissed_local.
  // Dismissal flag migrated from a synced pref to a local one.
  BooleanPrefMember welcome_notification_dismissed_local_pref_;

  // The notifier for the extension that we're listening for.
  message_center::NotifierId notifier_id_;

  // The profile which owns this object.
  Profile* profile_;

  // Notification ID of the Welcome Notification.
  std::string welcome_notification_id_;

  // If the preferences are still syncing, store the last notification here
  // so we can replay ShowWelcomeNotificationIfNecessary once the sync finishes.
  // Simplifying Assumption: The delayed notification has passed the
  // extension ID check. This means we do not need to store all of the
  // notifications that may also show a welcome notification.
  scoped_ptr<Notification> delayed_notification_;

  // If the welcome notification is shown, this timer tracks when to hide the
  // welcome notification.
  scoped_ptr<base::OneShotTimer> expiration_timer_;

  // Delegate for Chrome global calls like base::Time::GetTime() for
  // testability.
  scoped_ptr<Delegate> delegate_;

  DISALLOW_COPY_AND_ASSIGN(ExtensionWelcomeNotification);
};

#endif  // CHROME_BROWSER_NOTIFICATIONS_EXTENSION_WELCOME_NOTIFICATION_H_


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

  <title>collect_specs (Gem::Indexer)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />

# File lib/rubygems/indexer.rb, line 351
  def collect_specs(gems = gem_file_list)
    index = Gem::SourceIndex.new

    progress = ui.progress_reporter gems.size,
                                    "Loading #{gems.size} gems from #{@dest_directory}",
                                    "Loaded all gems"

    Gem.time 'loaded' do
      gems.each do |gemfile|
        if File.size(gemfile.to_s) == 0 then
          alert_warning "Skipping zero-length gem: #{gemfile}"
          next
        end

        begin
          spec = Gem::Format.from_file_by_path(gemfile).spec
          spec.loaded_from = gemfile

          unless gemfile =~ /\/#{Regexp.escape spec.original_name}.*\.gem\z/i then
            expected_name = spec.full_name
            expected_name << " (#{spec.original_name})" if
              spec.original_name != spec.full_name
            alert_warning "Skipping misnamed gem: #{gemfile} should be named #{expected_name}"
            next
          end

          abbreviate spec
          sanitize spec

          index.add_spec spec, spec.original_name

          progress.updated spec.original_name

        rescue SignalException => e
          alert_error "Received signal, exiting"
          raise
        rescue Exception => e
          alert_error "Unable to process #{gemfile}\n#{e.message} (#{e.class})\n\t#{e.backtrace.join "\n\t"}"
        end
      end

      progress.done
    end

    index
  end


text:
#include "gep/interfaces/resourceManager.h"
#include "gep/container/hashmap.h"
#include "gep/container/DynamicArray.h"
#include "gep/directory.h"
#include "gep/threading/thread.h"
#include "gep/container/queue.h"
#include "gep/threading/semaphore.h"

namespace gep
{
    // forward declarations
    class ResourceLoaderThread;

    class ResourceManager
        : public IResourceManager
    {
    private:
        struct ReloadInfo
        {
            ResourcePtr<IResource> pResource;
            IResourceLoader* pLoader;
            uint32 updateNum;
        };

        struct PatchInfo
        {
            ResourcePtr<IResource> ptr;
            IResource* pResource;
            IResourceLoader* pLoader;
            bool isFinalized;
        };

        Hashmap<std::string, IResource*, StringHashPolicy> m_resourceDummies;
        Hashmap<std::string, ReloadInfo, StringHashPolicy> m_fileChangedListener;
        Hashmap<IResourceLoader*, bool, PointerHashPolicy> m_failedInitialLoad;
        Hashmap<std::string, ResourcePtr<IResource>, StringHashPolicy> m_loadedResources;
        Mutex m_fileChangedLock;
        DynamicArray<IResource*> m_newResources;
        Mutex m_newResourceMutex;
        DynamicArray<PatchInfo> m_resourcesToPatch;
        Mutex m_patchResourceMutex;
        ResourceLoaderThread* m_pResourceLoader;
        Mutex m_loadingResourceMutex;
        DirectoryWatcher m_dataDirWatcher;
        float m_timeSinceLastCheck;
        uint32 m_updateNum;

        void removeFromNewList(IResource* pResource);

        hkLoader* m_pHkResourceLoader;

    protected:
        virtual ResourcePtr<IResource> doLoadResource(IResourceLoader& loader, LoadAsync loadAsync) override;

    public:
        ResourceManager();

        // ISubsystem interface
        virtual void initialize() override;
        virtual void destroy() override;
        virtual void update(float elapsedTime) override;

        virtual void initializeInGameThread() override;
        virtual void destroyInGameThread() override;

        // IResourceManager interface
        virtual void deleteResource(IResource* pResource) override;
        virtual void registerResourceType(const char* name, IResource* pDummy) override;
        virtual void finalizeResourcesWithFlags(uint32 flags) override;
        virtual void registerLoaderForReload(const std::string& filename, IResourceLoader* pLoader, ResourcePtr<IResource> pResource) override;
        virtual void deregisterLoaderForReload(const std::string& filename, IResourceLoader* pLoader) override;
        virtual void reloadResource(ResourcePtr<IResource> pResource);

        void resourceFinishedLoading(ResourcePtr<IResource> ptr, IResource* pResource, IResourceLoader* pLoader);

        hkLoader* getHavokResourceLoader() const { return m_pHkResourceLoader; }
    };

#define g_resourceManager (*static_cast<ResourceManager*>(g_globalManager.getResourceManager()))

    class ResourceLoaderThread : public Thread
    {
    private:
        struct ToLoadInfo
        {
            ResourcePtr<IResource> ptr;
            IResourceLoader* pLoader;
        };
        Queue<ToLoadInfo, MutexLockPolicy> m_resourcesToLoad;
        Semaphore m_toLoadCounter;
        ResourceManager* m_pResourceManager;
        bool m_isRunning;

    public:

        ResourceLoaderThread(ResourceManager* pResourceManager);
        ~ResourceLoaderThread();

        void loadResource(ResourcePtr<IResource> ptr, IResourceLoader* pLoader);

        virtual void run() override;

        void stop(); // stops the resource loader thread
    };
}


text:
/*******************************************************************************
 * Name:Simple, lightweight web storage (cookies, session&local storage) module
 * Version: 1.0.0
 * Author: Michal Nerc (http://michalnerc.pl)
 ******************************************************************************/

// Export luna object
module.exports = require("./sources/storage");


text:
<?php

namespace Saxulum\Tests\BundleProvider\Sample;

use Saxulum\BundleProvider\Provider\AbstractBundleProvider;
use Silex\Application;

class BundleProvider extends AbstractBundleProvider
{
    public function register(Application $app)
    {
        $this->addCommands($app);
        $this->addControllers($app);
        $this->addDoctrineOrmMappings($app);
        $this->addTranslatorResources($app);
        $this->addTwigLoaderFilesystemPath($app);
    }

    public function boot(Application $app) {}
}