text:
package org.notninja.verifier;

import java.lang.reflect.Constructor;
import java.util.HashMap;
import java.util.Map;

import org.notninja.verifier.verification.Verification;

/**
 * <p>
 * The default implementation of {@link CustomVerifierProvider} which uses reflection to instantiate the {@link
 * CustomVerifier} class while requiring that it has a constructor with a single {@link Verification} argument which can
 * be used to pass the current {@link Verification} into the instance upon instantiation.
 * </p>
 *
 * @author Alasdair Mercer
 * @since 0.2.0
 */
public final class DefaultCustomVerifierProvider implements CustomVerifierProvider {

    private static final Map<Class<?>, Constructor<?>> constructors = new HashMap<>();

    private static <T> Constructor<T> getConstructor(final Class<T> cls) throws ReflectiveOperationException {
        synchronized (constructors) {
            @SuppressWarnings("unchecked")
            Constructor<T> constructor = (Constructor<T>) constructors.get(cls);

            if (constructor == null) {
                constructor = cls.getConstructor(Verification.class);

                constructors.put(cls, constructor);
            }

            return constructor;
        }
    }

    @Override
    public <T, V extends CustomVerifier<T, V>> V getCustomVerifier(final Class<V> cls, final Verification<T> verification) {
        Verifier.verify(cls, "cls")
            .not().nulled();

        try {
            return getConstructor(cls).newInstance(verification);
        } catch (ReflectiveOperationException e) {
            throw new VerifierException("cls could not be instantiated", e);
        }
    }

    @Override
    public int getWeight() {
        return DEFAULT_IMPLEMENTATION_WEIGHT;
    }
}


text:
pid_t IPCMessage::GetSource()
{
	return msg.source;
}
pid_t IPCMessage::GetDestination()
{
	return msg.destination;
}
IPCMessage::IPCMessage(Message _Msg)
{
	msg = _Msg;
}
uint64_t IPCMessage::GetTimeStamp()
{
	return msg.timeStamp;
}
bool IPCMessage::operator<(const IPCMessage& _Msg)
{
	return msg.timeStamp <	_Msg.msg.timeStamp;
}
bool IPCMessage::operator<=(const IPCMessage& _Msg)
{
	return msg.timeStamp <=	_Msg.msg.timeStamp;
}
bool IPCMessage::operator>(const IPCMessage& _Msg)
{
	return !(*this<_Msg);
}
bool IPCMessage::operator>=(const IPCMessage& _Msg)
{
	return !(*this<=_Msg);
}

redpajama_set_name: RedPajamaGithub


text:
<?php

declare(strict_types=1);

namespace GrumPHP\Exception;

use GrumPHP\Util\Platform;
use Symfony\Component\Process\Process;

class PlatformException extends RuntimeException
{
    public static function commandLineStringLimit(Process $process): self
    {
        return new self(sprintf(
            'The Windows maximum amount of %s input characters exceeded while running process: %s ...',
            Platform::WINDOWS_COMMANDLINE_STRING_LIMITATION,
            substr($process->getCommandLine(), 0, 75)
        ));
    }
}


text:
import * as mongoose from 'mongoose';

interface IChatRoom{
  name:string;
}

interface IChatRoomModel extends IChatRoom, mongoose.Document{

};

var chatRoomSchema = new mongoose.Schema({
  name: {type: String, required: true },
});

var ChatRoom = mongoose.model<IChatRoomModel>("ChatRoom", chatRoomSchema);

export { ChatRoom };


text:
.module {
  border: 1px solid;
  border-radius: 4px;
  padding: 0.4em;
  margin: 0.3em;
  text-align: left;
}

.module .moduleTitle {
  font-size: 1.8em;
  font-weight: bold;
  cursor: pointer;
}

.module .moduleTitle .module_name {
  font-size: 1.2em;
  text-align: center;
  text-transform: capitalize;
  font-family: Arial, serif;
}

.module .moduleTitle .up .right * {
  font-size: 0.9em;
  line-height: 0.9em;
  vertical-align: middle;
}

.module .moduleTitle .reload_icon,
.module .moduleTitle .cancel_icon,
.module .moduleTitle .open_icon {
  display: none;
}

.module.failed:not(.collapsed) .moduleTitle .reload_icon,
.module.tested:hover .moduleTitle .reload_icon,
.module.cancelled:hover .moduleTitle .reload_icon,
.module.waiting:hover .moduleTitle .cancel_icon,
.module.loading:hover .moduleTitle .cancel_icon,
.module.testing:hover .moduleTitle .cancel_icon,
.module:hover .moduleTitle .open_icon {
  display: inline-block;
}

.module:not(.collapsed) .moduleTitle {
  margin-bottom: 0.6em;
}

.module .moduleTitle .time {
  padding-left: 0.3em;
}

.module .features_area .features_label,
.featureCode .featureCode_label {
  font-size: 1.4em;
  text-align: center;
  color: white;
  font-weight: bold;
  border-radius: 4px;
  margin: 0.6em 0;
  padding: 0.2em 0;
  font-family: Arial;
}

.module .features_area .features {
  min-height: 18em;
  max-height: 18em;
  overflow: auto;
  overflow-y: scroll;
  padding-left: 0.25em;
}

.module .features_area .feature.selected {
  background-color: #E8EAF6;
}

.module.selectable .features_area .feature {
  cursor: pointer;
}


text:
import com.twilio.twiml.voice.Redirect;
import com.twilio.twiml.VoiceResponse;
import com.twilio.twiml.TwiMLException;

public class Example {
    public static void main(String[] args) {
        Redirect redirect = new Redirect
            .Builder("http://www.foo.com/nextInstructions").build();
        VoiceResponse response = new VoiceResponse.Builder().redirect(redirect)
            .build();

        try {
            System.out.println(response.toXml());
        } catch (TwiMLException e) {
            e.printStackTrace();
        }
    }
}


text:
namespace UnicornHack.Data.Fragments;

public static partial class ConnectingMapFragmentData
{
    public static readonly ConnectingMapFragment RandomRectangle = new ConnectingMapFragment { Name = "randomRectangle", DynamicMap = new RectangleMap { MinSize = new Dimensions { Width = 5, Height = 5 } } };
}


text:
<?php

namespace common\models;

use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use common\models\TabelSbu;

/**
 * TabelSbuSearch represents the model behind the search form about `\common\models\TabelSbu`.
 */
class TabelSbuSearch extends TabelSbu
{
    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['KDSBU12', 'KDSBU', 'NMSBU', 'SATUAN', 'KETERANGAN', 'NMITEM', 'SATKEG', 'TAHUN'], 'safe'],
            [['BIAYA12', 'BIAYA'], 'number'],
            [['_NullFlags', 'id'], 'integer'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function scenarios()
    {
        // bypass scenarios() implementation in the parent class
        return Model::scenarios();
    }

    /**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
    public function search($params)
    {
        $query = TabelSbu::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        $query->andFilterWhere([
            'BIAYA12' => $this->BIAYA12,
            'BIAYA' => $this->BIAYA,
            '_NullFlags' => $this->_NullFlags,
            'TAHUN' => $this->TAHUN,
            'id' => $this->id,
        ]);

        $query->andFilterWhere(['like', 'KDSBU12', $this->KDSBU12])
            ->andFilterWhere(['like', 'KDSBU', $this->KDSBU])
            ->andFilterWhere(['like', 'NMSBU', $this->NMSBU])
            ->andFilterWhere(['like', 'SATUAN', $this->SATUAN])
            ->andFilterWhere(['like', 'KETERANGAN', $this->KETERANGAN])
            ->andFilterWhere(['like', 'NMITEM', $this->NMITEM])
            ->andFilterWhere(['like', 'SATKEG', $this->SATKEG]);

        return $dataProvider;
    }

      public function searchh($params)
    {
        $query = TabelSbu::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
             'pagination' => [
        'pageSize' => 5,
    ],
        ]);

        $this->load($params);

        if (!$this->validate()) {
            // uncomment the following line if you do not want to return any records when validation fails
            // $query->where('0=1');
            return $dataProvider;
        }

        $query->andFilterWhere([
            'BIAYA12' => $this->BIAYA12,
            'BIAYA' => $this->BIAYA,
            '_NullFlags' => $this->_NullFlags,
            'TAHUN' => $this->TAHUN,
            'id' => $this->id,
        ]);

        $query->andFilterWhere(['like', 'KDSBU12', $this->KDSBU12])
            ->andFilterWhere(['like', 'KDSBU', $this->KDSBU])
            ->andFilterWhere(['like', 'NMSBU', $this->NMSBU])
            ->andFilterWhere(['like', 'SATUAN', $this->SATUAN])
            ->andFilterWhere(['like', 'KETERANGAN', $this->KETERANGAN])
            ->andFilterWhere(['like', 'NMITEM', $this->NMITEM])
            ->andFilterWhere(['like', 'SATKEG', $this->SATKEG]);

        return $dataProvider;
    }
}


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

<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <string name="gms_app_name">microG Services Core</string>
    <string name="gms_settings_name">microG-Einstellungen</string>
    <string name="gms_settings_summary">microG Services Core einrichten</string>

    <string name="just_a_sec">Einen kurzen Moment…</string>
    <string name="google_account_label">Google</string>
    <string name="ask_permission_tos">Durch Fortsetzen erlaubst du dieser App und Google deine Informationen nach ihren entsprechenden AGB und Datenschutzrichtlinien zu nutzen.</string>
    <string name="ask_scope_permission_title"><xliff:g example="F-Droid">%1$s</xliff:g> versucht:</string>
    <string name="ask_service_permission_title"><xliff:g example="F-Droid">%1$s</xliff:g> versucht zu nutzen:</string>
    <string name="account_manager_title">Google Konto Manager</string>
    <string name="sorry">Entschuldigung…</string>
    <string name="auth_before_connect">"Eine App hat versucht, sich in einen Google-Account einzuloggen.

Falls dies beabsichtigt war, nutze den Einloggen-Button, um Googles Login-Seite aufzurufen, andernfalls drücke Abbrechen, um zur App, die diesen Dialog verursacht hat, zurückzukehren."</string>
    <string name="auth_sign_in">Einloggen</string>
    <string name="auth_connecting">"Dein Gerät verbindet sich mit den Google-Servern, um dich einzuloggen

Dies kann etwas dauern."</string>
    <string name="no_network_error_desc">"Du hast keine Netzwerkverbindung.

Dies könnte ein temporäres Problem sein oder dein Android Gerät hat keine bestehende Datenverbindung. Versuche es noch einmal wenn du mit einem Datennetz oder WLAN verbunden bist."</string>
    <string name="auth_general_error_desc">"Es ist ein Problem bei der Kommunikation mit den Google Servern aufgetreten.

Versuche es später noch einmal."</string>
    <string name="auth_finalize">"Dein Gerät verbindet sich zu Google um Informationen in deinem Konto zu speichern.

Dies kann einige Minuten dauern."</string>
    <string name="allow">Erlauben</string>
    <string name="deny">Ablehnen</string>
    <string name="auth_notification_title">Authentifizierung erforlderlich</string>
    <string name="auth_notification_content"><xliff:g example="F-Droid">%1$s</xliff:g> erfordert deine Autorisierung um auf dein Google Konto zuzugreifen.</string>

    <string name="perm_status_broadcast_label">Empfange interne Statusmeldungen</string>
    <string name="perm_c2dm_receive_label">Empfange C2DM Nachrichten</string>
    <string name="perm_c2dm_send_label">Sende C2DM Nachrichten an andere Apps</string>
    <string name="perm_gtalk_svc_label">Sende Nachrichten und empfange Benachrichtigungen von Google Servern</string>
    <string name="perm_extended_access_label">Erweiterter Zugriff zu Google-Diensten</string>
    <string name="perm_provision_label">Stelle microG-Services bereit</string>
    <string name="perm_provision_description">Erlaubt der app, microG-Services ohne Benutzerinteraktion zu konfigurieren</string>

    <string name="service_name_checkin">Google Geräte-Registrierung</string>
    <string name="service_name_mcs">Google Cloud Messaging</string>
    <string name="service_name_snet">Google SafetyNet</string>

    <string name="service_status_disabled">Deaktiviert</string>
    <string name="service_status_enabled">Aktiviert</string>
    <string name="service_status_automatic">Automatisch</string>
    <string name="service_status_manual">Manuell</string>
    <string name="service_status_enabled_short">Ein</string>
    <string name="service_status_disabled_short">Aus</string>

    <string name="games_title">Google Play Games</string>
    <string name="games_info_title"><xliff:g example="F-Droid">%1$s</xliff:g> möchte Play Games benutzen</string>
    <string name="games_info_content">Um Play Games zu nutzen, ist die Installation der Google Play Games App erforderlich. Diese App funktioniert eventuell auch ohne Play Games, verhält sich dabei unter Umständen aber ungewöhnlich.</string>

    <string name="pick_place_title">Ort auswählen</string>
    <string name="pick_place_desc">Ortsauswahl ist noch nicht verfügbar</string>
    <string name="place_picker_select_title">Diesen Ort auswählen</string>
    <string name="place_picker_nearby_places">Orte in der Nähe</string>
    <string name="place_picker_location_lat_lng">(%1$.7f, %2$.7f)</string>

    <string name="lacking_permission_toast">microG Services Core: Berechtigung für "<xliff:g example="Auf alle Netzwerke zugreifen">%1$s</xliff:g>" fehlt</string>

    <string name="network_type_mobile">Mobiles Internet</string>
    <string name="network_type_wifi">WLAN</string>
    <string name="network_type_roaming">Roaming</string>
    <string name="network_type_other">Sonstige Netwerke</string>

    <string name="self_check_cat_fake_sig">Signaturtäuschungs-Unterstützung</string>
    <string name="self_check_cat_gms_packages">Installierte Pakete</string>
    <string name="self_check_cat_system">System</string>

    <string name="self_check_name_fake_sig_perm">System unterstützt Signaturtäuschung:</string>
    <string name="self_check_resolution_fake_sig_perm">Dein ROM hat keine integrierte Unterstützung für Signaturtäuschung. Du kannst aber auch externe Systeme zur Signaturtäuschung nutzen. Bitte schaue in die Dokumentation für Informationen zur Signaturtäuschung und wie die microG auf ROMs nutzt die sie nicht unterstützen.</string>
    <string name="self_check_name_perm_granted">Berechtigung zur Signaturtäuschung erteilt:</string>
    <string name="self_check_resolution_perm_granted">Dies ist ein guter Hinweis darauf, dass dein ROM Signaturtäuschung unterstützt, jedoch zunächst eine Aktion notwendig ist, um es zu aktivieren. Bitte lese die Dokumentation um herauszufinden welche Aktion dies ist.</string>
    <string name="self_check_name_system_spoofs">System täuscht Signatur:</string>
    <string name="self_check_resolution_system_spoofs">Bitte lese die Dokumentation für weitere Anweisungen.</string>

    <string name="self_check_pkg_gms">Play-Dienste (GmsCore)</string>
    <string name="self_check_pkg_vending">Play Store (Phonesky)</string>
    <string name="self_check_pkg_gsf">Dienste-Framework (GSF)</string>
    <string name="self_check_name_app_installed"><xliff:g example="F-Droid">%1$s</xliff:g> installiert:</string>
    <string name="self_check_resolution_app_installed">Installiere die App <xliff:g example="F-Droid">%1$s</xliff:g> oder eine kompatible. Bitte schaue in der Dokumentation nach um herauszufinden welche Apps kompatibel sind.</string>
    <string name="self_check_name_correct_sig"><xliff:g example="F-Droid">%1$s</xliff:g> hat die richtige Signatur:</string>
    <string name="self_check_resolution_correct_sig">Entweder ist das installierte <xliff:g example="F-Droid">%1$s</xliff:g> nicht mit microG kompatibel oder Signaturtäuschung wurde dafür nicht aktiviert. Mehr Infos in der Dokumentation.</string>

    <string name="self_check_name_battery_optimizations">Batterieoptimierung deaktiviert:</string>
    <string name="self_check_resolution_battery_optimizations">Hier drücken um Batterieoptimierungen für microG zu deaktivieren. Wenn das nicht geschieht funktionieren einige Apps nicht ordnungsgemäß.</string>

    <string name="prefcat_about">Infos</string>
    <string name="prefcat_components">Komponenten</string>
    <string name="prefcat_configuration">Einstellungen</string>
    <string name="prefcat_google_services">Google-Dienste</string>
    <string name="prefcat_location_service">Standortdienst</string>
    <string name="prefcat_operation_mode">Modus</string>
    <string name="prefcat_services">Dienste</string>
    <string name="prefcat_test">Test</string>

    <string name="cond_gcm_bat_title">Batterieoptimierung aktiv</string>
    <string name="cond_gcm_bat_summary">Google Cloud Messaging ist aktiv, aber Batterieoptimierungen wurden für microG nicht deaktiviert. Damit Push-Nachrichten zugestellt werden können, muss Batterieoptimierung deaktiviert werden.</string>
    <string name="cond_gcm_bat_action">Batterieoptimierung deaktivieren</string>
    <string name="cond_perm_title">Berechtigung fehlt</string>

    <string name="prefs_account">Kontoeinstellungen</string>
    <string name="prefs_account_privacy">Persönliche Daten & Privatsphäre</string>
    <string name="prefs_account_security">Anmeldung & Sicherheit</string>

    <string name="pref_auth_trust_google_title">Vertraue Google bei App Rechten</string>
    <string name="pref_auth_trust_google_summary">Wenn deaktiviert, wird der Nutzer gefragt bevor eine App Autorisierungsanfrage an Google geschickt wird. Einige Apps werden das Google Konto nicht nutzen können, wenn deaktiviert.</string>
    <string name="pref_auth_visible_title">Erlaube Apps, Accounts zu finden</string>
    <string name="pref_auth_visible_summary">Alle Apps können die E-Mail-Adresse deines Google-Accounts ohne vorherige Autorisierung sehen, falls aktiviert.</string>

    <string name="pref_checkin_enable_summary">Registriert das Gerät zur Nutzung von Google-Diensten und erzeugt eine eindeutige Kennung. microG entfernt identifizierende Daten außer dem Namen  des Google-Kontos.</string>

    <string name="checkin_not_registered">Nicht registiert</string>
    <string name="checkin_last_registration">Letzte Registierung: <xliff:g example="Yesterday, 02:20 PM">%1$s</xliff:g></string>
    <string name="checkin_enable_switch">Gerät registrieren</string>

    <string name="pref_info_status">Status</string>
    <string name="pref_more_settings">Mehr</string>

    <string name="pref_add_account_title">Konto</string>
    <string name="pref_add_account_summary">Google-Konto hinzufügen</string>
    <string name="pref_gcm_enable_mcs_summary">Google Cloud Messaging ist ein Push-Nachrichten-Dienst, der von vielen Apps genutzt wird. Zur Benutzung muss die Geräte-Registrierung aktiviert werden.</string>
    <string name="pref_gcm_heartbeat_title">Cloud Messaging Hearbeat-Intervall</string>
    <string name="pref_gcm_heartbeat_summary">Das Intervall in Sekunden, in dem das System die Google-Server kontaktiert. Ein höheres Intervall wird die Akkunutzung reduzieren, kann jedoch Push-Nachrichten verzögern.\nVeraltet, wird in zukünftiger Version ersetzt.</string>
    <string name="pref_gcm_apps_title">Apps die Cloud Messaging benutzen</string>
    <string name="pref_gcm_apps_summary">Liste der für Google Cloud Messaging registierten Apps.</string>
    <string name="pref_gcm_confirm_new_apps_title">Neue Apps bestätigen</string>
    <string name="pref_gcm_confirm_new_apps_summary">Frage nach, bevor neue Apps sich für Push-Nachrichten registrieren</string>
    <string name="pref_gcm_ping_interval">Abfrage-Intervall: <xliff:g example="10 minutes">%1$s</xliff:g></string>

    <string name="pref_about_title">Über microG Services Core</string>
    <string name="pref_about_summary">Versionsinformation und genutzte Bibliotheken</string>
    <string name="gcm_app_error_unregistering">Fehler bei der Abmeldung</string>
    <string name="gcm_app_not_installed_anymore">Nicht mehr installiert</string>
    <string name="gcm_unregister_app">Abmelden</string>
    <string name="gcm_not_registered">Nicht registriert</string>
    <string name="gcm_no_message_yet">Bisher keine Nachrichten erhalten</string>
    <string name="gcm_last_message_at">Letzte Nachricht: <xliff:g example="Yesterday, 02:20 PM">%1$s</xliff:g></string>
    <string name="gcm_registered">Registriert</string>
    <string name="gcm_registered_since">Registriert seit: <xliff:g example="Yesterday, 02:20 PM">%1$s</xliff:g></string>
    <string name="gcm_unregister_confirm_title"><xliff:g example="F-Droid">%1$s</xliff:g> abmelden?</string>
    <string name="gcm_unregister_confirm_message">Einige Apps registrieren sich nicht automatisch erneut und haben keine Möglichkeit dies manuell anzustoßen. Diese Apps funktionieren eventuell nach dem abmelden nicht mehr richtig.\nFortsetzen?</string>
    <string name="gcm_unregister_after_deny_message">Du hast einer App die Erlaubnis der Registrierung entzogen, die bereits registriert ist.\nWillst du diese App jetzt auch abmelden damit sie zukünftig keine Push-Nachrichten erhält?</string>
    <string name="gcm_messages_counter">Nachrichten: <xliff:g example="123">%1$d</xliff:g> (<xliff:g example="12345">%2$d</xliff:g> bytes)</string>
    <string name="gcm_network_state_disconnected">Nicht verbunden</string>
    <string name="gcm_network_state_connected">Verbunden seit <xliff:g example="2 hours ago">%1$s</xliff:g></string>
    <string name="gcm_enable_switch">Push-Nachrichten erhalten</string>

    <string name="pref_push_app_allow_register_title">Registrierung erlauben</string>
    <string name="pref_push_app_allow_register_summary">Erlaubt es der App, sich für Push-Nachrichten zu registrieren</string>
    <string name="pref_push_app_wake_for_delivery_title">App beim Erhalt einer Push-Nachricht starten</string>
    <string name="pref_push_app_wake_for_delivery_summary">App starten, während im Hintergrund die eingehenden Nachrichten abgerufen werden.</string>
    <string name="prefcat_push_apps_title">Apps, die Push-Nachrichten benutzen</string>
    <string name="prefcat_push_apps_registered_title">Registrierte Apps</string>
    <string name="prefcat_push_apps_unregistered_title">Nicht-registrierte Apps</string>
    <string name="prefcat_push_networks_title">Verwendbare Netzwerke</string>

    <string name="snet_intro">Google SafetyNet ist ein System, um Geräte zu zertifizieren und so sicherzustellen, dass sie ausreichend geschützt und kompatibel mit Android sind. Einige Anwendungen benutzen SafetyNet aus Sicherheitsgründen oder um einen Kopierschutz zu erzwingen.\n\nmicroG GmsCore enthält eine freie Implementierung von SafetyNet, jedoch verlangen die Google-Server, dass die Anfragen durch das proprietäre DroidGuard signiert sind. Eine unschädliche gemachte Version von DroidGuard ist als separate \"DroidGuard Helper\"-App verfügbar.</string>
    <string name="snet_enable_switch">Geräte-Zertifizierung erlauben</string>

    <string name="pref_snet_testdrive_title">SafetyNet-Zertifizierung testen</string>

    <string name="pref_snet_status_official_title">Offizielle Server nutzen</string>
    <string name="pref_snet_status_official_summary">Erfordert eine ungerootetes ROM und den microG DroidGuard Helper</string>
    <string name="pref_snet_status_official_info">offizieller Server</string>
    <string name="pref_snet_status_third_party_title">Alternativen Server nutzen</string>
    <string name="pref_snet_status_third_party_summary">Alternative Server können auch SafetyNet-Anfragen beantworten, die nicht durch DroidGuard signiert wurden</string>
    <string name="pref_snet_status_third_party_info">Dritt-Server</string>
    <string name="pref_snet_custom_url_title">Alternative Server URL</string>
    <string name="pref_snet_custom_url_summary">Vollständige URL des alternativen Servers, der SafetyNet-Anfragen beantwortet</string>
    <string name="pref_snet_self_signed_title">Selbst signieren</string>
    <string name="pref_snet_self_signed_summary">Statt einen Server zu nutzen, die SafetyNet Signatur lokal mit einem eigens erstellten Zertifikat signieren. Die meisten Apps werden diese Signaturen nicht akzeptieren.</string>
    <string name="pref_snet_status_self_signed_info">Selbst-signiertes Zertifikat</string>

</resources>


text:
package com.airbnb.common.ml.strategy.data

trait BinaryScoringSample
  extends Serializable {

  // the main feature in the sample.
  // i.e. for pricing problem, this is the price seen by users
  def observedValue: Double

  // the value used as base for scoring
  // i.e. min(observed value) or observed value
  def scoringPivot: Double

  // a more stabled value than observedValue
  // can be avg(observedValue) or avg(trueValue) or other format
  // we allow scoringPivot != basePivot due to the very first implementation
  // use a different scoringPivot improved performance
  def basePivot: Double

  // the feature associated with observedValue or pivotValue
  // i.e. probability of the value
  def x: Double

  // return value between observedValue and basePivot scaled by x
  protected def scaleObservedValueByX: Double = {
    if (observedValue != basePivot) {
      val min = math.min(observedValue, basePivot)
      val max = math.max(observedValue, basePivot)
      min + (max - min) * x
    } else {
      basePivot
    }
  }

  protected def observedOrPivot: Double = {
    if (observedValue != basePivot) {
      math.min(observedValue, basePivot)
    } else {
      basePivot
    }
  }

}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Michelia 2(no. 8): 631 (1882)

#### Original name
Leptostroma castaneae Spreng., 1827

### Remarks
null


text:
/*******************
Promulgate
-----------

This library lets other devices trigger actions using a very simple API.
You can also send commands to other devices to trigger actions.

Requires the Streaming and SoftwareSerial libraries.
(SoftwareSerial is included with Arduino now)

Erin K / RobotGrrl - May 21, 2014
Last update Jan. 2, 2018
--> http://RobotMissions.org
--> http://RobotGrrl.com/blog
--> http://RoboBrrd.com

MIT license, check LICENSE for more information
All text above must be included in any redistribution
*******************/

#if ARDUINO >= 100
	#include "Arduino.h"
#else
	#include "WProgram.h"
#endif

#include "Streaming.h"
#include <Stream.h>

#ifndef _PROMULGATE_H_
#define _PROMULGATE_H_

class Promulgate {

	public:

		Promulgate();
		Promulgate(Stream *in, Stream *out);

		enum Level {
		  ERROR_,
		  WARN,
		  INFO,
		  DEBUG
		} the_level;

		Level LOG_LEVEL;

		void reply(char cmd, uint8_t key, uint8_t val, char delim);

		void set_debug_stream(Stream *db);
		void set_rx_callback( void (*rxCallback)(char action, char cmd, uint8_t key, uint16_t val, char delim) );
		void set_tx_callback( void (*txCallback)() );
		void useBase64Parsing(bool b);

		void parse_message(char msg[], uint8_t len);
		void organize_message(char c);
		void parse_message64(char msg[], uint8_t len);

		void transmit_action(char action, char cmd, uint8_t key, uint16_t val, char delim);

	private:

		boolean          reading_message;
		char             ser[20];
		uint8_t          ser_len;
		bool             use_base64_parsing;

		Stream *in_stream;
		Stream *out_stream;
		Stream *debug_stream;

		void begin();
		void reset_buffer();

		void core_action(char cmd, uint8_t key, uint16_t val, char delim);

		void (*_rxCallback)(char action, char cmd, uint8_t key, uint16_t val, char delim);
		void (*_txCallback)();

};

#endif


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">
    <meta name="description" content="">
    <meta name="author" content="">
    <title><?=$title?> - Pulse PHP7</title>
    <link rel="icon" type="image/png" href="<?=basePath()?>/Pulse/Internal/images/pulseLogo.png" />

    <link href="<?=iasset('bootstrap.min.css')?>" rel="stylesheet">
    <link href="<?=iasset('bootstrap-datetimepicker.css')?>" rel="stylesheet">
    <link href="<?=iasset('bootstrap-select.min.css')?>" rel="stylesheet">
    <link href="<?=iasset('fontawesome-iconpicker.min.css')?>" rel="stylesheet">
    <link href="<?=iasset('fileinput.min.css')?>" rel="stylesheet">
    <link href="<?=basepath()?>/Pulse/Internal/codemirror/lib/codemirror.css" rel="stylesheet">

    <link href="<?=iasset('admin.css')?>" rel="stylesheet">
    <link href="<?=iasset('sb-admin.css')?>" rel="stylesheet">
    <link href="<?=iasset('summernote.css')?>" rel="stylesheet">

    <link href="<?=iasset('font-awesome.min.css')?>" rel="stylesheet" type="text/css">

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

                </button>
                <a class="navbar-brand" href="<?=path('adashboard')?>"> PULSE Framework

                     <?=$_SESSION['pulse.name']?>

                            <a href="<?=basepath()?>"> My Home

                            <a href="<?=path('alogout')?>"> Log Out

            <?php
            if($_SESSION['pulse.user']=='admin'):
            ?>

                    <li<?php if(isActive()=='dashboard'){ echo' class="active"'; } ?>>
                        <a href="<?=path('adashboard')?>"> Dashboard

                    <li<?php if(isActive()=='tables'){ echo' class="active"'; } ?>>
                        <a href="<?=path('atables')?>"> Tables

                    <li<?php if(isActive()=='nav'){ echo' class="active"'; } ?>>
                        <a href="<?=path('anav')?>"> Navigation menu

                    <li<?php if(isActive()=='invoke'){ echo' class="active"'; } ?>>
                        <a href="<?=path('invoke')?>"> Invoke API

                    <li<?php if(isActive()=='config'){ echo' class="active"'; } ?>>
                        <a href="<?=path('config')?>"> Configuration

            <?php
            else:
            ?>

                    <?php
                    // Foreach replication Active parent
                    $pActive=1;
                    $parentActive=null;
                    foreach ($nav as $key => $value) {
                        if($getid==$value['table_id_fk']){
                            // Check active parent
                            $parentActive = $value['parent'];
                        }
                        $pActive++;
                    }
                    // NAV foreach
                    $navCount=1;
                    $entChild=0;
                    foreach ($nav as $key => $value) {

                        // Collapse parent
                        if($parentActive==$value['id']){
                            $classCollapseIn=' in';
                            $classAriaExp=' aria-expanded="true"';
                            $parentActive=null;
                        } else {
                            $classCollapseIn='';
                            $classAriaExp='';
                        }

                    if($value['parent']==null){
                            if($navCount>1 and $entChild==1){
                                echo '

';
                                $entChild=0;
                            }

                    if($value['table_id_fk']==null){
                    ?>
                    <li<?php if($getid==$value['table_id_fk']){ echo' class="active" style="background-color:#000;"'; } ?>>
                        <a href="javascript:void(0);" data-toggle="collapse" data-target="#<?=permalink($value['name'])?>"><i class="fa fa-fw <?=$value['icon']?>"> <?=$value['name']?>
                        <ul id="<?=permalink($value['name'])?>" class="collapse<?=$classCollapseIn?>"<?=$classAriaExp?>>
                    <?php
                    } else {
                            if(!empty($value['table_id_fk'])){
                                $hrefLink = basePath().'/admin/central/'.$value['table_id_fk'].'/'.permalink($value['name']);
                            } else {
                                $hrefLink = 'javascript:void(0);';
                            }
                    ?>
                    <li<?php if($getid==$value['table_id_fk']){ echo' class="active" style="background-color:#000;"'; } ?>>
                        <a href="<?=$hrefLink?>"><i class="fa fa-fw <?=$value['icon']?>"> <?=$value['name']?>

                    <?php
                    }
                    } else {
                        $entChild = 1;
                        if(!empty($value['table_id_fk'])){
                            $hrefLink = basePath().'/admin/central/'.$value['table_id_fk'].'/'.permalink($value['name']);
                        } else {
                            $hrefLink = 'javascript:void(0);';
                        }
                        ?>
                        <li<?php if($getid==$value['table_id_fk']){ echo' class="active" style="background-color:#000;"'; } ?>>
                            <a href="<?=$hrefLink?>"><i class="fa fa-fw <?=$value['icon']?>"> <?=$value['name']?>

                        <?php
                    }
                    $navCount++;
                    }
                    ?>

            <?php
            endif;
            ?>

                <?php require_once $_SESSION['path.now'].'.php'; ?>


text:
class Line : public MeshBase
{
public:
	Line(const std::vector<glm::vec3> &v, const std::vector<glm::vec4> &c);

	void GenerateBuffer();

	void ChangeColor(glm::vec4 &color);
	//void ChangeVertexColor(glm::vec4 &color);
	void SetFromTo(glm::vec3 &f, glm::vec3 &t);

	void SetShader(GenericShader * shader);
	void Render(GenericShader * shader);

private:
	std::vector<glm::vec4> colors;

	GLuint cSize;
};

#endif


text:
<?php

// Groups ID
$id = \csphere\core\http\Input::get('get', 'id');

// Add breadcrumb navigation
$bread = new \csphere\core\template\Breadcrumb('admin');
$bread->add('content');
$bread->plugin('groups', 'manage');
$bread->add('edit', 'groups/edit/id/' . $id);
$bread->trace();

 // Get RAD class for this action
$rad = new \csphere\core\rad\Edit('groups');

// Delegate action
$rad->delegate();


text:
package com.alibaba.csp.sentinel.dashboard.rule.nacos;

/**
 * @author Eric Zhao
 * @since 1.4.0
 */
public final class NacosConfigUtil {

    public static final String GROUP_ID = "SENTINEL_GROUP";

    public static final String FLOW_DATA_ID_POSTFIX = "-flow-rules";
    public static final String PARAM_FLOW_DATA_ID_POSTFIX = "-param-rules";
    public static final String CLUSTER_MAP_DATA_ID_POSTFIX = "-cluster-map";

    /**
     * cc for `cluster-client`
     */
    public static final String CLIENT_CONFIG_DATA_ID_POSTFIX = "-cc-config";
    /**
     * cs for `cluster-server`
     */
    public static final String SERVER_TRANSPORT_CONFIG_DATA_ID_POSTFIX = "-cs-transport-config";
    public static final String SERVER_FLOW_CONFIG_DATA_ID_POSTFIX = "-cs-flow-config";
    public static final String SERVER_NAMESPACE_SET_DATA_ID_POSTFIX = "-cs-namespace-set";

    private NacosConfigUtil() {}
}


text:
package pokeraidbot.infrastructure;

import dataimport.GymDataImportTool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import pokeraidbot.Utils;
import pokeraidbot.domain.pokemon.Pokemon;
import pokeraidbot.domain.pokemon.PokemonTypes;

import java.io.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class CSVPokemonDataReader {
    private String resourceName;
    private static final Logger LOGGER = LoggerFactory.getLogger(CSVPokemonDataReader.class);

    public CSVPokemonDataReader(String resourceName) {
        this.resourceName = resourceName;
    }

    public Set<Pokemon> readAll() {
        String line;
        Set<Pokemon> pokemons = new HashSet<>();
        try {
            final InputStream resourceAsStream = CSVPokemonDataReader.class.getResourceAsStream(resourceName);
            if (resourceAsStream == null) {
                throw new FileNotFoundException(resourceName);
            }
            final InputStreamReader inputStreamReader = new InputStreamReader(resourceAsStream, "UTF-8");
            BufferedReader br = new BufferedReader(inputStreamReader);

            while ((line = br.readLine()) != null) {
                String[] rowElements = line.split(GymDataImportTool.separator);
                if (rowElements[0].equalsIgnoreCase("Ndex")) {
                    // This is the header of the file, ignore
                } else {
                    String id = rowElements[0].trim();
                    String name = rowElements[1].trim();
                    String type1 = rowElements[2].trim();
                    String type2 = rowElements[3].trim();
                    List<String> types = new ArrayList<>();
                    if (!type1.equalsIgnoreCase("None")) {
                        types.add(type1);
                    }
                    if (!type2.equalsIgnoreCase("None")) {
                        types.add(type2);
                    }
                    final PokemonTypes pokemonTypes = new PokemonTypes(types);
                    Pokemon pokemon = new Pokemon(Integer.parseInt(id), name, "About not used",
                            pokemonTypes, "", Utils.getWeaknessesFor(pokemonTypes),
                            Utils.getResistantTo(pokemonTypes));
                    pokemons.add(pokemon);
                }
            }

        } catch (IOException e) {
            LOGGER.error("Error while trying to open pokemon file " + resourceName + ": " + e.getMessage());
        }

        LOGGER.info("Parsed " + pokemons.size() + " pokemons from \"" + resourceName + "\".");

        return pokemons;
    }
}


text:
{% load i18n %}

	<form action="{% url 'papermail-delete' papermail.id %}" method="post">
		{% csrf_token %}

{% trans "Do you want to delete " %} {{ papermail.name_file }} ?

			<input type="submit" class="button" value="{% trans "I'm sure" %}">

</form>

<button class="close-button" data-close aria-label="Close modal" type="button">
	×
</button>


text:
<layout>

    <data>

        <variable
            name="model"
            type="com.olimou.android.content.ContentModel"/>
    </data>

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
                  xmlns:app="http://schemas.android.com/apk/res-auto"
                  xmlns:tools="http://schemas.android.com/tools"
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:orientation="vertical"
                  tools:context="com.olimou.android.content.ContentFragment">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:visibility="gone"
            tools:visibility="gone">

            <android.support.v7.widget.AppCompatButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="@{model::titleToggle}"
                android:text="Title"/>

            <android.support.v7.widget.AppCompatButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="@{model::contentToggle}"
                android:text="Content"/>

            <android.support.v7.widget.AppCompatButton
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:onClick="@{model::buttonToggle}"
                android:text="Button"/>
        </LinearLayout>

        <com.olimou.android.status_null.StatusNull
            android:id="@+id/status_null"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:SN_button_text="@{model.button, default=Action}"
            app:SN_button_text_color="@color/colorPrimary"
            app:SN_circle_color="@color/colorPrimary"
            app:SN_circle_size="80dp"
            app:SN_content="@{model.content, default=Content}"
            app:SN_icon="@drawable/ic_android_black_24dp"
            app:SN_icon_color="@android:color/white"
            app:SN_title="@{model.title, default=Title}"/>

    </LinearLayout>

</layout>


text:
namespace HanRuEdu.LDAL
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;

    [MetadataType(typeof(EDU_ZZJX_10_A01_LWSJ_metadata))]
    public partial class EDU_ZZJX_10_A01_LWSJ
    {
        public EDU_ZZJX_10_A01_LWSJ()
        {
            LWMC = "";
            LWZY = "";
            LWNR = "";
            SCSJ = DateTime.Now;
        }
        public class EDU_ZZJX_10_A01_LWSJ_metadata
        {
            [Required(ErrorMessage = "±ØÌî")]
            [Display(Name = "񅧏")]
            public Int32 ID { get; set; }

            [Required(ErrorMessage = "±ØÌî")]
            [Display(Name = "ѧУ")]
            public Int32 SCHOOLID { get; set; }

            [Required(ErrorMessage = "±ØÌî")]
            [Display(Name = "ѧÄê")]
            public Int32 XNID { get; set; }

            [Required(ErrorMessage = "±ØÌî")]
            [Display(Name = "ѧÆÚ")]
            public Int32 XQID { get; set; }

            [Required(ErrorMessage = "±ØÌî",AllowEmptyStrings = true)]
            [Display(Name = "ÂÛÎÄÃû³Æ")]
            [StringLength(100)]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public String LWMC { get; set; }

            [Required(ErrorMessage = "±ØÌî",AllowEmptyStrings = true)]
            [Display(Name = "ÂÛÎÄÕªÒª")]
            [StringLength(100)]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public String LWZY { get; set; }

            [Required(ErrorMessage = "±ØÌî",AllowEmptyStrings = true)]
            [Display(Name = "ÂÛÎÄÄÚÈÝ")]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public String LWNR { get; set; }

            [Required(ErrorMessage = "±ØÌî")]
            [Display(Name = "ÉÏ´«½Ìʦ")]
            public Int32 SCJSID { get; set; }

            [Required(ErrorMessage = "±ØÌî")]
            [Display(Name = "ÉÏ´«Ê±¼ä")]
            public DateTime SCSJ { get; set; }

            [Required(ErrorMessage = "±ØÌî")]
            [Display(Name = "ÂÛÎÄÀàÐÍ")]
            public Int32 LWLXID { get; set; }

        }
    }
}


text:
@interface MWKLanguageLinkFetcher ()

@property (strong, nonatomic) AFHTTPRequestOperationManager* manager;

@end

@implementation MWKLanguageLinkFetcher

- (instancetype)initAndFetchLanguageLinksForPageTitle:(MWKTitle*)title
                                          withManager:(AFHTTPRequestOperationManager*)manager
                                   thenNotifyDelegate:(id <FetchFinishedDelegate>)delegate {
    self = [self initWithManager:manager delegate:delegate];
    [self fetchLanguageLinksForTitle:title success:nil failure:nil];
    return self;
}

- (instancetype)initWithManager:(AFHTTPRequestOperationManager*)manager delegate:(id<FetchFinishedDelegate>)delegate {
    NSParameterAssert(manager);
    self = [super init];
    if (self) {
        self.manager               = manager;
        self.fetchFinishedDelegate = delegate;
    }
    return self;
}

- (void)finishWithError:(NSError*)error fetchedData:(id)fetchedData block:(void (^)(id))block {
    [super finishWithError:error fetchedData:fetchedData];
    if (block) {
        dispatchOnMainQueue(^{
            block(error ? : fetchedData);
        });
    }
}

- (void)fetchLanguageLinksForTitle:(MWKTitle*)title
                           success:(void (^)(NSArray*))success
                           failure:(void (^)(NSError*))failure {
    if (!title.text.length) {
        NSError* error = [NSError errorWithDomain:WMFNetworkingErrorDomain
                                             code:WMFNetworkingError_InvalidParameters
                                         userInfo:nil];
        [self finishWithError:error fetchedData:nil block:failure];
        return;
    }
    NSURL* url           = [[SessionSingleton sharedInstance] urlForLanguage:title.site.language];
    NSDictionary* params = @{
        @"action": @"query",
        @"prop": @"langlinks",
        @"titles": title.text,
        @"lllimit": @"500",
        @"llprop": WMFJoinedPropertyParameters(@[@"langname", @"autonym"]),
        @"llinlanguagecode": [[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode],
        @"redirects": @"",
        @"format": @"json"
    };
    [[MWNetworkActivityIndicatorManager sharedManager] push];
    [self.manager GET:url.absoluteString
           parameters:params
              success:^(AFHTTPRequestOperation* operation, NSDictionary* indexedLanguageLinks) {
        [[MWNetworkActivityIndicatorManager sharedManager] pop];
        NSAssert(indexedLanguageLinks.count < 2,
                 @"Expected language links to return one or no objects for the title we fetched, but got: %@",
                 indexedLanguageLinks);
        NSArray* languageLinksForTitle = [[indexedLanguageLinks allValues] firstObject];
        [self finishWithError:nil fetchedData:languageLinksForTitle block:success];
    } failure:^(AFHTTPRequestOperation* operation, NSError* error) {
        [[MWNetworkActivityIndicatorManager sharedManager] pop];
        [self finishWithError:error fetchedData:nil block:failure];
    }];
}

@end


text:
if [ ! $(expr index "$-" i) -eq 0 ]; then

  # Aliases for getting around on a deployed production/staging Rails server.
  if [ -z "${PROJECT_ROOT}" ]; then
  	echo "You must define PROJECT_ROOT in ~/.bash_profile for this to work it should point at the deploy_to location of your app."
  fi

  # TODO add support and autodetection for /data root, maybe the /u root, and allowing user to override the root

  PROJECT_CURRENT="${PROJECT_ROOT}/current"
  PROJECT_SHARED="${PROJECT_ROOT}/shared"

  if [ -d "$PROJECT_CURRENT" ]; then
    alias current="cd ${PROJECT_CURRENT}"
    alias shared="cd ${PROJECT_SHARED}"
    alias logs="cd ${PROJECT_SHARED}/log"
    alias sc="cd ${PROJECT_CURRENT} && script/console"
  else
    echo "$PROJECT_CURRENT doesn't exist - not creating handy deploy box aliases."
  fi
fi


text:
namespace arangodb {
namespace aql {
struct AstNode;

class SortCondition {
 public:
  SortCondition(SortCondition const&) = delete;
  SortCondition& operator=(SortCondition const&) = delete;

  /// @brief create an empty sort condition
  SortCondition();

  /// @brief create the sort condition
  SortCondition(std::vector<std::pair<VariableId, bool>> const&,
                std::vector<std::vector<arangodb::basics::AttributeName>> const&,
                std::unordered_map<VariableId, AstNode const*> const&);

  /// @brief destroy the sort condition
  ~SortCondition();

 public:
  /// @brief whether or not the condition consists only of attribute accesses
  inline bool isOnlyAttributeAccess() const { return _onlyAttributeAccess; }

  /// @brief whether or not all conditions have the same sort order
  inline bool isUnidirectional() const { return _unidirectional; }

  /// @brief whether or not all sort directions are ascending
  /// note that the return value of this function is only meaningful if the
  /// sort is unidirectional
  inline bool isAscending() const {
    TRI_ASSERT(isUnidirectional());
    return _ascending;
  }

  /// @brief whether or not all sort directions are descending
  /// this is the reverse of isAscending()
  inline bool isDescending() const { return !isAscending(); }

  /// @brief whether or not there are fields
  inline bool isEmpty() const { return _fields.empty(); }

  /// @brief number of attributes in condition
  inline size_t numAttributes() const { return _fields.size(); }

  /// @brief returns the number of attributes in the sort condition covered
  /// by the specified index fields
  size_t coveredAttributes(
      Variable const*,
      std::vector<std::vector<arangodb::basics::AttributeName>> const&) const;

 private:

  /// @brief fields used in the sort conditions
  std::vector<std::pair<Variable const*,
                        std::vector<arangodb::basics::AttributeName>>> _fields;

  /// @brief const attributes
  std::vector<std::vector<arangodb::basics::AttributeName>> const _constAttributes;

  /// @brief whether or not the sort is unidirectional
  bool _unidirectional;

  /// @brief whether the sort only consists of attribute accesses
  bool _onlyAttributeAccess;

  /// @brief whether or not all sorts are in ascending order.
  /// this is only meaningful if the sort is unidirectional
  bool _ascending;
};
}
}

#endif


text:
package mercury;

/**
 * Created by smartial on 10/13/15.
 */
public class TestInference {

}


text:
The logical_disk collector exposes metrics about logical disks (in contrast to physical disks)

|||
-|-
Metric name prefix  | `logical_disk`
Data source         | Perflib
Counters             | `LogicalDisk` ([`Win32_PerfRawData_PerfDisk_LogicalDisk`](https://msdn.microsoft.com/en-us/windows/hardware/aa394307(v=vs.71)))
Enabled by default? | Yes

## Flags

### `--collector.logical_disk.volume-whitelist`

If given, a disk needs to match the whitelist regexp in order for the corresponding disk metrics to be reported

### `--collector.logical_disk.volume-blacklist`

If given, a disk needs to *not* match the blacklist regexp in order for the corresponding disk metrics to be reported

## Metrics

Name | Description | Type | Labels
-----|-------------|------|-------
`requests_queued` | Number of requests outstanding on the disk at the time the performance data is collected | gauge | `volume`
`read_bytes_total` | Rate at which bytes are transferred from the disk during read operations | counter | `volume`
`reads_total` | Rate of read operations on the disk | counter | `volume`
`write_bytes_total` | Rate at which bytes are transferred to the disk during write operations  | counter | `volume`
`writes_total` | Rate of write operations on the disk  | counter | `volume`
`read_seconds_total` | Seconds the disk was busy servicing read requests | counter | `volume`
`write_seconds_total` | Seconds the disk was busy servicing write requests | counter | `volume`
`free_bytes` | Unused space of the disk in bytes | gauge | `volume`
`size_bytes` | Total size of the disk in bytes | gauge | `volume`
`idle_seconds_total` | Seconds the disk was idle (not servicing read/write requests) | counter | `volume`
`split_ios_total` | Number of I/Os to the disk split into multiple I/Os | counter | `volume`

### Example metric
Query the rate of write operations to a disk
```
rate(wmi_logical_disk_read_bytes_total{instance="localhost", volume=~"C:"}[2m])
```

## Useful queries
Calculate rate of total IOPS for disk
```
rate(wmi_logical_disk_reads_total{instance="localhost", volume="C:"}[2m]) + rate(wmi_logical_disk_writes_total{instance="localhost", volume="C:"}[2m])
```

## Alerting examples
**prometheus.rules**
```yaml
groups:
- name: Windows Disk Alerts
  rules:

  # Sends an alert when disk space usage is above 95%
  - alert: DiskSpaceUsage
    expr: 100.0 - 100 * (wmi_logical_disk_free_bytes / wmi_logical_disk_size_bytes) > 95
    for: 10m
    labels:
      severity: high
    annotations:
      summary: "Disk Space Usage (instance {{ $labels.instance }})"
      description: "Disk Space on Drive is used more than 95%\n  VALUE = {{ $value }}\n  LABELS: {{ $labels }}"

  # Alerts on disks with over 85% space usage predicted to fill within the next four days
  - alert: DiskFilling
    expr: 100 * (wmi_logical_disk_free_bytes / wmi_logical_disk_size_bytes) < 15 and predict_linear(wmi_logical_disk_free_bytes[6h], 4 * 24 * 3600) < 0
    for: 10m
    labels:
      severity: warning
    annotations:
      summary: "Disk full in four days (instance {{ $labels.instance }})"
      description: "{{ $labels.volume }} is expected to fill up within four days. Currently {{ $value | humanize }}% is available.\n VALUE = {{ $value }}\n LABELS: {{ $labels }}"
```


text:
module INSPECTOR {

    /**
     * A search bar can be used to filter elements in the tree panel.
     * At each keypress on the input, the treepanel will be filtered.
     */
    export class SearchBar extends BasicElement {

        private _tab   : PropertyTab;
        private _inputElement: HTMLInputElement;

        constructor(tab:PropertyTab) {
            super();
            this._tab = tab;
            this._div.classList.add('searchbar');

            let filter = Inspector.DOCUMENT.createElement('i');
            filter.className = 'fa fa-search';

            this._div.appendChild(filter);
            // Create input
            this._inputElement = Inspector.DOCUMENT.createElement('input');
            this._inputElement.placeholder = 'Filter by name...';
            this._div.appendChild(this._inputElement);

            this._inputElement.addEventListener('keyup', (evt : KeyboardEvent)=> {
                let filter = this._inputElement.value;
                this._tab.filter(filter);
            })
        }

        /** Delete all characters typped in the input element */
        public reset() {
            this._inputElement.value = '';
        }

        public update() {
            // Nothing to update
        }

    }
}


text:
typedef void(^QDDownloaderCreateBlock)(QDDownloadModel* model, BOOL added);

#define MaxConcurrentCount 3
static NSString * const kQDDownloadSessionIdentifier = @"xyz.chaisong.fileDownload.sessionIdentifier";
static NSString * const kQDDownloaderLockName = @"xyz.chaisong.downloader.lock";

@interface QDDownloader () <NSURLSessionDownloadDelegate, CSNetWorkChangeExt> {
    NSMutableDictionary *_executings;
    NSMutableDictionary *_waitings;
    NSMutableArray *_waitingURLs;
}

@property (nonatomic, strong) NSURLSession *session;
@property (readwrite, nonatomic, strong) NSOperationQueue *operationQueue;
@property (readwrite, nonatomic, strong) NSRecursiveLock *lock;

@end

@implementation QDDownloader

- (instancetype)init {
    if (self = [super init]) {
        self.lock = [[NSRecursiveLock alloc] init];
        self.lock.name = kQDDownloaderLockName;

        self.operationQueue = [[NSOperationQueue alloc] init];
        self.operationQueue.maxConcurrentOperationCount = MaxConcurrentCount;

        NSURLSessionConfiguration *sessionConfiguration = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:kQDDownloadSessionIdentifier];
        self.session = [NSURLSession sessionWithConfiguration:sessionConfiguration
                                                     delegate:self
                                                delegateQueue:self.operationQueue];
        _waitings = [NSMutableDictionary dictionary];
        _executings = [NSMutableDictionary dictionaryWithCapacity:MaxConcurrentCount];
        _waitingURLs = [NSMutableArray array];
    }
    return self;
}

- (void) onServiceInit {
    REGISTER_OBSERVER(CSNetWorkChangeExt, self);

}
- (void)onServiceTerminate {
    UNREGISTER_ALL_OBSERVER(self);
}

//启动下载时候会遍历所有已经运行的和未运行的请求,只要相同的url有1个是QDDownloaderAnyNetwork,则所有的都是无视网络环境
- (QDDownloadOperation* ) downloadWithURL:(NSURL *)url
                                     options:(QDDownloaderOptions)options
                                    progress:(QDDownloaderProgressBlock)progressBlock
                                    complete:(QDDownloaderCompletedBlock)completedBlock {
    __block QDDownloadOperation *operation;

    WeakSelf;

    [self addProgressCallback:progressBlock completedBlock:completedBlock forURL:url createCallback:^(QDDownloadModel *model, BOOL added) {
        StrongSelf;
        if (options & QDDownloaderAnyNetwork) {
            model.requestOnAnyNetWork = YES; //有一个请求无视网络,那就无视网络环境
        }
        if (added) {
            model.operation = [[QDDownloadOperation alloc] initWithModel:model session:wself.session];
        }
        [self flushWaitingQueue];
        operation = model.operation;
    }];
    return operation;
}

- (void)setSuspended:(BOOL)suspended {
    [self.lock lock];
    NSMutableArray* array = [NSMutableArray arrayWithCapacity:MaxConcurrentCount];
    [_executings enumerateKeysAndObjectsUsingBlock:^(NSURL*  _Nonnull key, QDDownloadModel*  _Nonnull model, BOOL * _Nonnull stop) {
        if (model.operation) {
            if (suspended) {
                [model.operation.downloadTask suspend];
                [array addObject:model];
            } else {
                [model.operation.downloadTask resume];
            }
        }
    }];
    if (array.count > 0) {
        for (QDDownloadModel* model in array) { //把暂停的request放回去
            [_executings removeObjectForKey:model.URL];
            _waitings[model.URL] = model;
            [_waitingURLs addObject:model.URL];
        }
    }
    if (!suspended) { //重新启动 需要去启动下载
        [self flushWaitingQueue];
    }
    [self.lock unlock];
}

- (void)suspendOnlyWiFiRequest {

    [self.lock lock];
    NSMutableArray* array = [NSMutableArray arrayWithCapacity:MaxConcurrentCount];
    [_executings enumerateKeysAndObjectsUsingBlock:^(NSURL*  _Nonnull key, QDDownloadModel*  _Nonnull model, BOOL * _Nonnull stop) {
        if (model.operation && !model.requestOnAnyNetWork) {
            [model.operation.downloadTask suspend];
            [array addObject:model];
        }
    }];
    if (array.count > 0) {
        for (QDDownloadModel* model in array) { //把暂停的request放回去
            [_executings removeObjectForKey:model.URL];
            _waitings[model.URL] = model;
            [_waitingURLs addObject:model.URL];
        }
        [self flushWaitingQueue];//有删除才有必要新增
    }

    [self.lock unlock];
}

- (void)cancelAllDownloads {
    [self.lock lock];
    [_executings enumerateKeysAndObjectsUsingBlock:^(id  _Nonnull key, QDDownloadModel*  _Nonnull model, BOOL * _Nonnull stop) {
        if (model.operation) {
            [model.operation.downloadTask cancel];
        }
    }];
    [_waitingURLs removeAllObjects];
    [_waitings removeAllObjects];
    [_executings removeAllObjects];
    [self.lock unlock];
}

- (void)cancelDownload:(NSURL*) URL {
    [self.lock lock];
    QDDownloadModel* model = _executings[URL];
    if (!model) {
        model = _waitings[URL];
    }
    if (model) {
        [model.operation cancel];
    }
    [self.lock unlock];
}

- (void)addProgressCallback:(QDDownloaderProgressBlock)progressBlock completedBlock:(QDDownloaderCompletedBlock)completedBlock forURL:(NSURL *)url createCallback:(QDDownloaderCreateBlock)createCallback {
    // The URL will be used as the key to the callbacks dictionary so it cannot be nil. If it is nil immediately call the completed block with no image or data.
    if (url == nil) {
        if (completedBlock != nil) {
            completedBlock(nil, nil, NO);
        }
        return;
    }

    [self.lock lock];
    BOOL first = NO;

    QDDownloadModel* model = _executings[url];
    if (model) {
        if (progressBlock) {
            [model.progressBlocks addObject:progressBlock];
        }
        if (completedBlock) {
            [model.completeBlocks addObject:completedBlock];
        }
    } else {
        model = _waitings[url];
        if (!model) {
            model = [[QDDownloadModel alloc] init];
            model.URL = url;
            _waitings[url] = model;
            [_waitingURLs addObject:url];
            first = YES;
        }
        if (progressBlock) {
            [model.progressBlocks addObject:progressBlock];
        }
        if (completedBlock) {
            [model.completeBlocks addObject:completedBlock];
        }
    }
    [self.lock unlock];

    createCallback(model, first);
}

- (void) flushWaitingQueue {
    if (_executings.count < MaxConcurrentCount && _waitingURLs.count > 0) {
        BOOL findAvailUrl = NO;
        if (GET_SERVICE(QDNetworkReachabilityManager).reachableViaWiFi) { //wifi
            NSURL* url = [[_waitingURLs firstObject] copy];
            QDDownloadModel* model = [_waitings objectForKey:url];
            if (model) {
                if (!model.operation.isCancel) {
                    _executings[url] = model;
                    [model.operation start];
                }
                [_waitingURLs removeObject:url];
                [_waitings removeObjectForKey:url];
            }
            findAvailUrl = YES;
        } else if (GET_SERVICE(QDNetworkReachabilityManager).reachableViaWWAN) { //这里要判断下载了
            NSURL* url;
            QDDownloadModel* model;

            NSMutableArray* needFailURLs = [NSMutableArray arrayWithCapacity:_waitings.count];

            for (url in _waitingURLs) {
                model = [_waitings objectForKey:url];
                if (model) {
                    if (model.requestOnAnyNetWork) {
                        findAvailUrl = YES;
                        break;
                    } else {
                        NSError* resultError = [NSError errorWithDomain:@"QDDownloader" code:3 userInfo:@{@"msg":@"网络不支持", @"当前网络":@"Cellular", @"需要网络":@"WiFi"}];
                        dispatch_async(dispatch_get_main_queue(), ^{
                            for (QDDownloaderCompletedBlock completeBlock in model.completeBlocks) {
                                completeBlock(nil, resultError, NO);
                            }
                        });
                        [needFailURLs addObject:url];
                    }
                }
            }

            [_waitingURLs removeObjectsInArray:needFailURLs];
            [_waitings removeObjectsForKeys:needFailURLs];

            if (findAvailUrl) {
                if (!model.operation.isCancel) {
                    _executings[url] = model;
                    [model.operation start];
                }
                [_waitingURLs removeObject:url];
                [_waitings removeObjectForKey:url];
            }
        } else { //无网络
            NSURL* url;
            QDDownloadModel* model;
            for (url in _waitingURLs) {
                model = [_waitings objectForKey:url];
                if (model) {
                    NSError* resultError = [NSError errorWithDomain:@"QDDownloader" code:3 userInfo:@{@"msg":@"网络不支持", @"当前网络":@"无网络", @"需要网络":model.requestOnAnyNetWork? @"AnyNetwork": @"WiFi"}];
                    dispatch_async(dispatch_get_main_queue(), ^{
                        for (QDDownloaderCompletedBlock completeBlock in model.completeBlocks) {
                            completeBlock(nil, resultError, NO);
                        }
                    });
                }
            }
            [_waitingURLs removeAllObjects];
            [_waitings removeAllObjects];
        }

        if (findAvailUrl) {
            [self flushWaitingQueue];
        }
    }
}

- (void)changeStatusFrom:(QDNetworkReachabilityStatus)last to:(QDNetworkReachabilityStatus)current {
    if (current == last) {
        return;
    }
    if (current != QDNetworkReachabilityStatusReachableViaWiFi && current != QDNetworkReachabilityStatusReachableViaWWAN) { //无网络,全暂停
        [self setSuspended:YES];
        return;
    }
    if (current == QDNetworkReachabilityStatusReachableViaWiFi) { //当前是wifi,启动新请求
        [self setSuspended:NO];
    } else { //否则,暂停所有wifi请求
        [self suspendOnlyWiFiRequest];
    }
}

#pragma mark - NSURLSessionDownloadDelegate
- (void)URLSession:(NSURLSession *)session
      downloadTask:(NSURLSessionDownloadTask *)downloadTask
didFinishDownloadingToURL:(NSURL *)location {
    //本地的文件路径,使用fileURLWithPath:来创建
    [self.lock lock];
    QDDownloadModel* model = _executings[downloadTask.originalRequest.URL];
    [self.lock unlock];

    if (model) {
        NSString* hashCode = model.sha256HashCode;

        if (!CSEmptyString(hashCode) && ![hashCode isEqualToString:[QDDownloader SHA256HashCodeWithURL:model.URL]]) {
            model.hashCodeVerifyFail = YES;
            return;
        }
        if (!model.localPath) {
            [[QDDownloadCache defaultCache] addFile:location.path forURL:model.URL];
            model.localPath = [[QDDownloadCache defaultCache] filePathForURL:model.URL];
        } else {
            NSURL *toURL = [NSURL fileURLWithPath:model.localPath];
            NSFileManager *manager = [NSFileManager defaultManager];
            [manager moveItemAtURL:location toURL:toURL error:nil];
        }
    }
}

- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error {

    [self.lock lock];
    QDDownloadModel *model = [_executings[task.originalRequest.URL] copy];
    if (task.state == NSURLSessionTaskStateCanceling || task.state == NSURLSessionTaskStateCompleted) {
        [_executings removeObjectForKey:task.originalRequest.URL];
    }
    [self flushWaitingQueue];
    [self.lock unlock];

    if (model) {
        dispatch_async(dispatch_get_main_queue(), ^{
            NSString* localPath = model.localPath;
            if (error == nil && task.state == NSURLSessionTaskStateCompleted) { //下载成功
                if (!CSEmptyString(model.sha256HashCode) && model.hashCodeVerifyFail) { //验证失败
                    NSError* resultError = [NSError errorWithDomain:@"QDDownloader" code:4 userInfo:@{@"msg":@"hashcode验证失败", @"url":model.URL, @"hashcode":model.sha256HashCode}];
                    for (QDDownloaderCompletedBlock completeBlock in model.completeBlocks) {
                        completeBlock(localPath, resultError, NO);
                    }
                    return;
                }
            }

            for (QDDownloaderCompletedBlock completeBlock in model.completeBlocks) {
                completeBlock(localPath, error, task.state == NSURLSessionTaskStateCompleted);
            }
        });
    }
}

- (void)URLSession:(NSURLSession *)session
      downloadTask:(NSURLSessionDownloadTask *)downloadTask
      didWriteData:(int64_t)bytesWritten
 totalBytesWritten:(int64_t)totalBytesWritten
totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite {

    [self.lock lock];
    QDDownloadModel *model = [_executings[downloadTask.originalRequest.URL] copy];
    [self.lock unlock];

    if (model) {
        dispatch_async(dispatch_get_main_queue(), ^{
            for (QDDownloaderProgressBlock progressBlock in model.progressBlocks) {
                progressBlock(totalBytesWritten, totalBytesExpectedToWrite);
            }
        });
    }
}

- (void)URLSession:(NSURLSession *)session
      downloadTask:(NSURLSessionDownloadTask *)downloadTask
 didResumeAtOffset:(int64_t)fileOffset
expectedTotalBytes:(int64_t)expectedTotalBytes {
    [self.lock lock];
    QDDownloadModel *model = [_executings[downloadTask.originalRequest.URL] copy];
    [self.lock unlock];

    if (model) {
        dispatch_async(dispatch_get_main_queue(), ^{
            for (QDDownloaderProgressBlock progressBlock in model.progressBlocks) {
                progressBlock(fileOffset, expectedTotalBytes);
            }
        });
    }
}

#pragma mark - Util
//所有的下载完成都走这里
+ (NSString*)SHA256HashCodeWithURL:(NSURL*)URL {
    NSData* dataIn = [NSData dataWithContentsOfURL:URL];
    return [QDDownloader SHA256HashCode:dataIn];
}

//所有的本地读取都走这里
+ (NSString*)SHA256HashCodeWithFilePath:(NSString*)filePath {
    NSData* dataIn = [NSData dataWithContentsOfFile:filePath];
    return [QDDownloader SHA256HashCode:dataIn];
}

+ (NSString*)SHA256HashCode:(NSData*)dataIn {
    if (dataIn == nil) {
        return nil;
    }
    uint32_t length = (uint32_t) dataIn.length;
    uint8_t digest[CC_SHA256_DIGEST_LENGTH]={0};
    CC_SHA256(dataIn.bytes, length, digest);
    NSData *out=[NSData dataWithBytes:digest length:CC_SHA256_DIGEST_LENGTH];
    NSString *hash=[out description];
    hash = [hash stringByReplacingOccurrencesOfString:@" " withString:@""];
    hash = [hash stringByReplacingOccurrencesOfString:@"<" withString:@""];
    hash = [hash stringByReplacingOccurrencesOfString:@">" withString:@""];

    return hash;
}

@end


text:
<?php

namespace DSchoenbauer\Orm\Framework;

/**
 * Allows for the incorporation of variables into a string
 *
 */
trait InterpolateTrait
{

    public function interpolate($message, array $context = array())
    {
        // build a replacement array with braces around the context keys
        $replace = array();
        foreach ($context as $key => $val) {
            // check that the value can be casted to string
            if (!is_array($val) && (!is_object($val) || method_exists($val, '__toString'))) {
                $replace['{' . $key . '}'] = $val;
            }
        }

        // interpolate replacement values into the message and return
        return strtr($message, $replace);
    }
}


text:
package com.time2desenho.wikalendario.controller;

import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.media.Ringtone;
import android.media.RingtoneManager;
import android.net.Uri;
import android.support.v4.app.NotificationCompat;

import com.time2desenho.wikalendario.R;
import com.time2desenho.wikalendario.model.Event;
import com.time2desenho.wikalendario.model.Notification;

public class NotificationReceiver extends BroadcastReceiver implements EventObserver{
    @Override
    public void onReceive(Context context, Intent intent) {
        registerNotification(context,intent);
    }

    public void registerNotification(Context context,Intent intent) {
        NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
        PendingIntent p = PendingIntent.getActivity(context, 0, intent, 0);

        NotificationController notificationController = new NotificationController(context);
        Notification notification = notificationController.notificationByEvent();

        if(notification!=null) {
            NotificationCompat.Builder builder = new NotificationCompat.Builder(context);
            builder.setContentTitle(notification.getTitle());
            builder.setContentText(notification.getDescription());
            builder.setSmallIcon(R.drawable.icon_notification_1);
            builder.setLargeIcon(selectIconNotification(context));
            builder.setContentIntent(p);
            android.app.Notification n = builder.build();

            n.vibrate = new long[]{150, 300, 150, 600};
            n.flags = android.app.Notification.FLAG_AUTO_CANCEL;
            nm.notify(R.mipmap.ic_launcher, n);

            try {
                Uri som = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
                Ringtone toque = RingtoneManager.getRingtone(context, som);
                toque.play();
            } catch (Exception exception) {
                exception.printStackTrace();
            }
        }
    }

    public Bitmap selectIconNotification(Context context){
        int idImage = R.drawable.icon_notification_2;
        return BitmapFactory.decodeResource(context.getResources(), idImage);
    }

    @Override
    public void notifyNewEvent(Event event) {

    }
}


text:
Sequel.migration do
  up do
    alter_table(:schedule_exceptions) do
      add_column :options, 'hstore'
    end
  end

  down do
    alter_table(:schedule_exceptions) do
      drop_column :options
    end
  end
end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;

namespace Day14
{
    public class OneTimePadGenerator
    {
        private string salt;
        private MD5 md5;
        private Queue<string> hashes;
        private List<string> keys;
        private int index;
        private int iterations;

        public OneTimePadGenerator(string salt, int iterations)
        {
            this.salt = salt;
            this.iterations = iterations;
            this.md5 = MD5.Create();
            this.keys = new List<string>();
            this.hashes = new Queue<string>(1000);
            this.index = 0;
        }

        private string ApplyMd5(string input)
        {
            StringBuilder sb = new StringBuilder();

            var t2 = md5.ComputeHash(Encoding.ASCII.GetBytes(input));

            foreach (byte o in t2)
                sb.Append(o.ToString("X2"));

            return sb.ToString().ToLower();
        }

        private string GetNextHash()
        {
            var tmp = salt + index++;
            for(int x=0; x<iterations; x++)
            {
                tmp = ApplyMd5(tmp);
            }

            return tmp;
        }

        public int GetIndexForKey(int keyno)
        {
            for(int x=0; x<1000; ++x)
            {
                var t1 = GetNextHash();
                hashes.Enqueue(t1);
            }

            var regex = new Regex(@"([a-z\d])\1\1");
            while(keys.Count < keyno)
            {
                hashes.Enqueue(GetNextHash());
                var hash = hashes.Dequeue();
                var m = regex.Match(hash);
                if(m.Success)
                {
                    var fiveSequenceMatch = new string(m.Value[0], 5);
                    if(hashes.Where(x => x.Contains(fiveSequenceMatch)).Any())
                    {
                        keys.Add(hash);
                    }
                }
            }

            return index - 1001; // Subtract queue size to obtain actual index
        }
    }

    public class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine("+-------------------------+");
            Console.WriteLine("| Advent of Code - Day 14 |");
            Console.WriteLine("+-------------------------+");

            const string salt = "jlmsuwbz";
            const int keyNo = 64;
            const int iterations = 2017; // Use a value of 1 is for part 1

            var generator = new OneTimePadGenerator(salt, iterations);

            var index = generator.GetIndexForKey(keyNo);

            Console.WriteLine($"Index for the {keyNo}th key is {index}");

            Console.WriteLine($"  -Glædelig jul!");
        }
    }
}


text:
function setStreamType(constraints, stream) {
    if (constraints.mandatory && constraints.mandatory.chromeMediaSource) {
        stream.isScreen = true;
    } else if (constraints.mozMediaSource || constraints.mediaSource) {
        stream.isScreen = true;
    } else if (constraints.video) {
        stream.isVideo = true;
    } else if (constraints.audio) {
        stream.isAudio = true;
    }
}
var currentUserMediaRequest = {
    streams: [],
    mutex: false,
    queueRequests: []
};

function getUserMediaHandler(options) {
    if (currentUserMediaRequest.mutex === true) {
        currentUserMediaRequest.queueRequests.push(options);
        return;
    }
    currentUserMediaRequest.mutex = true;

    // easy way to match
    var idInstance = JSON.stringify(options.localMediaConstraints);

    function streaming(stream, returnBack) {
        setStreamType(options.localMediaConstraints, stream);
        options.onGettingLocalMedia(stream, returnBack);

        stream.addEventListener('ended', function() {
            delete currentUserMediaRequest.streams[idInstance];

            currentUserMediaRequest.mutex = false;
            if (currentUserMediaRequest.queueRequests.indexOf(options)) {
                delete currentUserMediaRequest.queueRequests[currentUserMediaRequest.queueRequests.indexOf(options)];
                currentUserMediaRequest.queueRequests = removeNullEntries(currentUserMediaRequest.queueRequests);
            }
        }, false);

        currentUserMediaRequest.streams[idInstance] = {
            stream: stream
        };
        currentUserMediaRequest.mutex = false;

        if (currentUserMediaRequest.queueRequests.length) {
            getUserMediaHandler(currentUserMediaRequest.queueRequests.shift());
        }
    }

    if (currentUserMediaRequest.streams[idInstance]) {
        streaming(currentUserMediaRequest.streams[idInstance].stream, true);
    } else {
        if (isPluginRTC) {
            var mediaElement = document.createElement('video');
            Plugin.getUserMedia({
                audio: true,
                video: true
            }, function(stream) {
                stream.streamid = stream.id || getRandomString();
                streaming(stream);
            }, function(error) {});

            return;
        }

        navigator.getMedia = navigator.webkitGetUserMedia || navigator.mozGetUserMedia;

        if (typeof DetectRTC !== 'undefined') {
            if (!DetectRTC.hasMicrophone) {
                options.localMediaConstraints.audio = false;
            }

            if (!DetectRTC.hasWebcam) {
                options.localMediaConstraints.video = false;
            }
        }

        navigator.getMedia(options.localMediaConstraints, function(stream) {
            stream.streamid = stream.id || getRandomString();
            if (!stream.stop) {
                stream.stop = function() {
                    fireEvent(stream, 'ended');
                };
            }
            streaming(stream);
        }, function(error) {
            options.onLocalMediaError(error, options.localMediaConstraints);
        });
    }
}