/*
 * Copyright 2012-15 Advanced Micro Devices, Inc.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 *
 * Authors: AMD
 *
 */

#include "dm_services.h"

#include "atom.h"

#include "include/bios_parser_types.h"

#include "command_table_helper.h"

bool dal_bios_parser_init_cmd_tbl_helper(
	const struct command_table_helper **h,
	enum dce_version dce)
{
	switch (dce) {
	case DCE_VERSION_8_0:
	case DCE_VERSION_8_1:
	case DCE_VERSION_8_3:
		*h = dal_cmd_tbl_helper_dce80_get_table();
		return true;

	case DCE_VERSION_10_0:
		*h = dal_cmd_tbl_helper_dce110_get_table();
		return true;

	case DCE_VERSION_11_0:
		*h = dal_cmd_tbl_helper_dce110_get_table();
		return true;

	case DCE_VERSION_11_2:
	case DCE_VERSION_11_22:
		*h = dal_cmd_tbl_helper_dce112_get_table();
		return true;

	default:
		/* Unsupported DCE */
		BREAK_TO_DEBUGGER();
		return false;
	}
}

/* real implementations */

bool dal_cmd_table_helper_controller_id_to_atom(
	enum controller_id id,
	uint8_t *atom_id)
{
	if (atom_id == NULL) {
		BREAK_TO_DEBUGGER();
		return false;
	}

	switch (id) {
	case CONTROLLER_ID_D0:
		*atom_id = ATOM_CRTC1;
		return true;
	case CONTROLLER_ID_D1:
		*atom_id = ATOM_CRTC2;
		return true;
	case CONTROLLER_ID_D2:
		*atom_id = ATOM_CRTC3;
		return true;
	case CONTROLLER_ID_D3:
		*atom_id = ATOM_CRTC4;
		return true;
	case CONTROLLER_ID_D4:
		*atom_id = ATOM_CRTC5;
		return true;
	case CONTROLLER_ID_D5:
		*atom_id = ATOM_CRTC6;
		return true;
	case CONTROLLER_ID_UNDERLAY0:
		*atom_id = ATOM_UNDERLAY_PIPE0;
		return true;
	case CONTROLLER_ID_UNDEFINED:
		*atom_id = ATOM_CRTC_INVALID;
		return true;
	default:
		/* Wrong controller id */
		BREAK_TO_DEBUGGER();
		return false;
	}
}

/**
* translate_transmitter_bp_to_atom
*
* @brief
*  Translate the Transmitter to the corresponding ATOM BIOS value
*
* @param
*   input transmitter
*   output digitalTransmitter
*    // =00: Digital Transmitter1 ( UNIPHY linkAB )
*    // =01: Digital Transmitter2 ( UNIPHY linkCD )
*    // =02: Digital Transmitter3 ( UNIPHY linkEF )
*/
uint8_t dal_cmd_table_helper_transmitter_bp_to_atom(
	enum transmitter t)
{
	switch (t) {
	case TRANSMITTER_UNIPHY_A:
	case TRANSMITTER_UNIPHY_B:
	case TRANSMITTER_TRAVIS_LCD:
		return 0;
	case TRANSMITTER_UNIPHY_C:
	case TRANSMITTER_UNIPHY_D:
		return 1;
	case TRANSMITTER_UNIPHY_E:
	case TRANSMITTER_UNIPHY_F:
		return 2;
	default:
		/* Invalid Transmitter Type! */
		BREAK_TO_DEBUGGER();
		return 0;
	}
}

uint32_t dal_cmd_table_helper_encoder_mode_bp_to_atom(
	enum signal_type s,
	bool enable_dp_audio)
{
	switch (s) {
	case SIGNAL_TYPE_DVI_SINGLE_LINK:
	case SIGNAL_TYPE_DVI_DUAL_LINK:
		return ATOM_ENCODER_MODE_DVI;
	case SIGNAL_TYPE_HDMI_TYPE_A:
		return ATOM_ENCODER_MODE_HDMI;
	case SIGNAL_TYPE_LVDS:
		return ATOM_ENCODER_MODE_LVDS;
	case SIGNAL_TYPE_EDP:
	case SIGNAL_TYPE_DISPLAY_PORT_MST:
	case SIGNAL_TYPE_DISPLAY_PORT:
	case SIGNAL_TYPE_VIRTUAL:
		if (enable_dp_audio)
			return ATOM_ENCODER_MODE_DP_AUDIO;
		else
			return ATOM_ENCODER_MODE_DP;
	case SIGNAL_TYPE_RGB:
		return ATOM_ENCODER_MODE_CRT;
	default:
		return ATOM_ENCODER_MODE_CRT;
	}
}

void dal_cmd_table_helper_assign_control_parameter(
	const struct command_table_helper *h,
	struct bp_encoder_control *control,
	DIG_ENCODER_CONTROL_PARAMETERS_V2 *ctrl_param)
{
	/* there are three transmitter blocks, each one has two links 4-lanes
	 * each, A+B, C+D, E+F, Uniphy A, C and E are enumerated as link 0 in
	 * each transmitter block B, D and F as link 1, third transmitter block
	 * has non splitable links (UniphyE and UniphyF can not be configured
	 * separately to drive two different streams)
	 */
	if ((control->transmitter == TRANSMITTER_UNIPHY_B) ||
		(control->transmitter == TRANSMITTER_UNIPHY_D) ||
		(control->transmitter == TRANSMITTER_UNIPHY_F)) {
		/* Bit2: Link Select
		 * =0: PHY linkA/C/E
		 * =1: PHY linkB/D/F
		 */
		ctrl_param->acConfig.ucLinkSel = 1;
	}

	/* Bit[4:3]: Transmitter Selection
	 * =00: Digital Transmitter1 ( UNIPHY linkAB )
	 * =01: Digital Transmitter2 ( UNIPHY linkCD )
	 * =02: Digital Transmitter3 ( UNIPHY linkEF )
	 * =03: Reserved
	 */
	ctrl_param->acConfig.ucTransmitterSel =
		(uint8_t)(h->transmitter_bp_to_atom(control->transmitter));

	/* We need to convert from KHz units into 10KHz units */
	ctrl_param->ucAction = h->encoder_action_to_atom(control->action);
	ctrl_param->usPixelClock = cpu_to_le16((uint16_t)(control->pixel_clock / 10));
	ctrl_param->ucEncoderMode =
		(uint8_t)(h->encoder_mode_bp_to_atom(
			control->signal, control->enable_dp_audio));
	ctrl_param->ucLaneNum = (uint8_t)(control->lanes_number);
}

bool dal_cmd_table_helper_clock_source_id_to_ref_clk_src(
	enum clock_source_id id,
	uint32_t *ref_clk_src_id)
{
	if (ref_clk_src_id == NULL) {
		BREAK_TO_DEBUGGER();
		return false;
	}

	switch (id) {
	case CLOCK_SOURCE_ID_PLL1:
		*ref_clk_src_id = ENCODER_REFCLK_SRC_P1PLL;
		return true;
	case CLOCK_SOURCE_ID_PLL2:
		*ref_clk_src_id = ENCODER_REFCLK_SRC_P2PLL;
		return true;
	case CLOCK_SOURCE_ID_DCPLL:
		*ref_clk_src_id = ENCODER_REFCLK_SRC_DCPLL;
		return true;
	case CLOCK_SOURCE_ID_EXTERNAL:
		*ref_clk_src_id = ENCODER_REFCLK_SRC_EXTCLK;
		return true;
	case CLOCK_SOURCE_ID_UNDEFINED:
		*ref_clk_src_id = ENCODER_REFCLK_SRC_INVALID;
		return true;
	default:
		/* Unsupported clock source id */
		BREAK_TO_DEBUGGER();
		return false;
	}
}

uint8_t dal_cmd_table_helper_encoder_id_to_atom(
	enum encoder_id id)
{
	switch (id) {
	case ENCODER_ID_INTERNAL_LVDS:
		return ENCODER_OBJECT_ID_INTERNAL_LVDS;
	case ENCODER_ID_INTERNAL_TMDS1:
		return ENCODER_OBJECT_ID_INTERNAL_TMDS1;
	case ENCODER_ID_INTERNAL_TMDS2:
		return ENCODER_OBJECT_ID_INTERNAL_TMDS2;
	case ENCODER_ID_INTERNAL_DAC1:
		return ENCODER_OBJECT_ID_INTERNAL_DAC1;
	case ENCODER_ID_INTERNAL_DAC2:
		return ENCODER_OBJECT_ID_INTERNAL_DAC2;
	case ENCODER_ID_INTERNAL_LVTM1:
		return ENCODER_OBJECT_ID_INTERNAL_LVTM1;
	case ENCODER_ID_INTERNAL_HDMI:
		return ENCODER_OBJECT_ID_HDMI_INTERNAL;
	case ENCODER_ID_EXTERNAL_TRAVIS:
		return ENCODER_OBJECT_ID_TRAVIS;
	case ENCODER_ID_EXTERNAL_NUTMEG:
		return ENCODER_OBJECT_ID_NUTMEG;
	case ENCODER_ID_INTERNAL_KLDSCP_TMDS1:
		return ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1;
	case ENCODER_ID_INTERNAL_KLDSCP_DAC1:
		return ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC1;
	case ENCODER_ID_INTERNAL_KLDSCP_DAC2:
		return ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DAC2;
	case ENCODER_ID_EXTERNAL_MVPU_FPGA:
		return ENCODER_OBJECT_ID_MVPU_FPGA;
	case ENCODER_ID_INTERNAL_DDI:
		return ENCODER_OBJECT_ID_INTERNAL_DDI;
	case ENCODER_ID_INTERNAL_UNIPHY:
		return ENCODER_OBJECT_ID_INTERNAL_UNIPHY;
	case ENCODER_ID_INTERNAL_KLDSCP_LVTMA:
		return ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA;
	case ENCODER_ID_INTERNAL_UNIPHY1:
		return ENCODER_OBJECT_ID_INTERNAL_UNIPHY1;
	case ENCODER_ID_INTERNAL_UNIPHY2:
		return ENCODER_OBJECT_ID_INTERNAL_UNIPHY2;
	case ENCODER_ID_INTERNAL_UNIPHY3:
		return ENCODER_OBJECT_ID_INTERNAL_UNIPHY3;
	case ENCODER_ID_INTERNAL_WIRELESS:
		return ENCODER_OBJECT_ID_INTERNAL_VCE;
	case ENCODER_ID_UNKNOWN:
		return ENCODER_OBJECT_ID_NONE;
	default:
		/* Invalid encoder id */
		BREAK_TO_DEBUGGER();
		return ENCODER_OBJECT_ID_NONE;
	}
}

{'repo_name': 'multipath-tcp/mptcp', 'stars': '660', 'repo_language': 'C', 'file_name': 'iwl-devtrace.c', 'mime_type': 'text/x-c', 'hash': 5104075091101718636, 'source_dataset': 'data'}


# -*- coding: utf-8 -*-
"""
Support functions for command line utilities (scripts).
"""
# Copyright (C) 2014-2015 Hartmut Goebel <h.goebel@crazy-compilers.com>
# Copyright (C) 2014-2015 DebOps <https://debops.org/>
# SPDX-License-Identifier: GPL-3.0-or-later

# This program is free software; you can redistribute
# it and/or modify it under the terms of the
# GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License,
# or (at your option) any later version.
#
# This program is distributed in the hope that it will
# be useful, but WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General
# Public License along with this program; if not,
# write to the Free Software Foundation, Inc., 59
# Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# An on-line copy of the GNU General Public License can
# be downloaded from the FSF web page at:
# https://www.gnu.org/copyleft/gpl.html

from __future__ import print_function

import os
import sys
import platform
import subprocess
try:
    from subprocess import DEVNULL  # py3k
except ImportError:
    # open DEVNULL like `subprocess` module does
    DEVNULL = os.open(os.devnull, os.O_RDWR)

from .. import find_debops_project as _find_debops_project, \
    find_monorepopath as _find_monorepopath, \
    find_playbookpath as _find_playbookpath, \
    find_inventorypath as _find_inventorypath

__author__ = "Hartmut Goebel <h.goebel@crazy-compilers.com>"
__copyright__ = "Copyright 2014-2015 by Hartmut Goebel "
"<h.goebel@crazy-compilers.com>"
__licence__ = "GNU General Public License version 3 (GPL v3) or later"

SCRIPT_NAME = os.path.basename(sys.argv[0])

# Don't check SSH fingerprint on connection (to enable, set INSECURE=1 on the
# command line)
INSECURE = bool(os.environ.get('INSECURE', False))

# External programms used. List here for easy substitution for
# hard-coded paths.
WHICH = 'which'

def error_msg(message, severity="Error"):
    """
    Display error message and exit
    """
    old = sys.stdout
    sys.stdout = sys.__stdout__
    print(SCRIPT_NAME+':', severity+':', message)
    sys.stdout = old
    if severity == "Error":
        raise SystemExit(1)

def require_commands(*cmd_names):
    """
    Check if required commands exist.
    """
    def command_exists(cmd_name):
        which = "where" if platform.system() == "Windows" else WHICH
        return not subprocess.call([which, cmd_name],
                                   stdout=DEVNULL, stderr=subprocess.STDOUT)

    for name in cmd_names:
        if not command_exists(name):
            error_msg("%s: command not found" % name)

def find_debops_project(path=None, required=True):
    project_root = _find_debops_project(path)
    if required and not project_root:
        # Exit if we are outside of project directory
        error_msg("Not a DebOps project directory")
    return project_root

def find_monorepopath(config, project_root, required=True):
    monorepo_path = _find_monorepopath(config, project_root)
    if required and not monorepo_path:
        error_msg("DebOps monorepo not installed")
    return monorepo_path

def find_playbookpath(config, project_root, required=True):
    playbooks_path = _find_playbookpath(config, project_root)
    if required and not playbooks_path:
        error_msg("DebOps playbooks not installed")
    return playbooks_path

def find_inventorypath(config, project_root, required=True):
    inventory = _find_inventorypath(config, project_root)
    if required and not inventory:
        error_msg("Ansible inventory not found")
    return inventory

{'repo_name': 'debops/debops', 'stars': '643', 'repo_language': 'Shell', 'file_name': '__init__.py', 'mime_type': 'text/x-python', 'hash': 2997987364142785407, 'source_dataset': 'data'}


---
title: 1126 - InvokedMethodThrewException
ms.date: 03/30/2017
ms.assetid: 0d3cff1a-97e6-4b6c-be18-108c6881bfc0
ms.openlocfilehash: 714a98a300426d80c3b494d701ae1bd53a49592f
ms.sourcegitcommit: 9b552addadfb57fab0b9e7852ed4f1f1b8a42f8e
ms.translationtype: MT
ms.contentlocale: es-ES
ms.lasthandoff: 04/23/2019
ms.locfileid: "61924012"
---
# 1126 - InvokedMethodThrewException
## Propiedades

|||
|-|-|
|ID|1126|
|Palabras clave|WFRuntime|
|Nivel|Información|
|Canal|Microsoft-Windows-Application Server-Applications/Debug|

## Descripción
 Indica que se produjo una excepción en el método invocado por la actividad InvokeMethod.

## Mensaje
 Se produjo una excepción en el método invocado por la actividad '%1' %2

## Detalles

|Nombre del elemento de datos|Tipo del elemento de datos|Descripción|
|--------------------|--------------------|-----------------|
|InvokeMethod|xs:string|Identificación y nombre para mostrar de la actividad InvokeMethod.|
|Excepción|xs:string|Detalles de la excepción para la excepción|
|AppDomain|xs:string|La cadena devuelta por AppDomain.CurrentDomain.FriendlyName.|

{'repo_name': 'dotnet/docs.es-es', 'stars': '120', 'repo_language': 'PowerShell', 'file_name': 'index.md', 'mime_type': 'text/plain', 'hash': 2436408377093862121, 'source_dataset': 'data'}


#!/bin/sh
echo "[+] Setting all those afl performance and coredump modes"
cd "$(ucf afl-path)" || exit 1
echo "[*] Every day I'm sudoing..."
sudo ./afl-system-config
echo "[+] Done. Let's start to fuzz!"

{'repo_name': 'fgsect/unicorefuzz', 'stars': '238', 'repo_language': 'Python', 'file_name': 'test_config.py', 'mime_type': 'text/x-python', 'hash': 3697763924571009869, 'source_dataset': 'data'}


/* mbed Microcontroller Library - stackheap
 * Setup a fixed single stack/heap memory model,
 * between the top of the RW/ZI region and the stackpointer
 *******************************************************************************
 * Copyright (c) 2014, STMicroelectronics
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 *    this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright notice,
 *    this list of conditions and the following disclaimer in the documentation
 *    and/or other materials provided with the distribution.
 * 3. Neither the name of STMicroelectronics nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *******************************************************************************
 */

#ifdef __cplusplus
extern "C" {
#endif

#include <rt_misc.h>
#include <stdint.h>

extern char Image$$RW_IRAM1$$ZI$$Limit[];

extern __value_in_regs struct __initial_stackheap __user_setup_stackheap(uint32_t R0, uint32_t R1, uint32_t R2, uint32_t R3) {
    uint32_t zi_limit = (uint32_t)Image$$RW_IRAM1$$ZI$$Limit;
    uint32_t sp_limit = __current_sp();

    zi_limit = (zi_limit + 7) & ~0x7;    // ensure zi_limit is 8-byte aligned

    struct __initial_stackheap r;
    r.heap_base = zi_limit;
    r.heap_limit = sp_limit;
    return r;
}

#ifdef __cplusplus
}
#endif

{'repo_name': 'tmk/tmk_keyboard', 'stars': '3041', 'repo_language': 'C', 'file_name': 'stm32l1xx_hal_tim.c', 'mime_type': 'text/x-c', 'hash': 156357780911541477, 'source_dataset': 'data'}


<?xml version="1.0"?>

<application class="MyApp" encoding="ISO-8859-15" for_version="2.8" header_extension=".h" indent_amount="4" indent_symbol="space" is_template="0" language="python" mark_blocks="1" name="app" option="0" overwrite="1" path="Sizers_classattr.py" source_extension=".cpp" top_window="dialog_1" use_gettext="1" use_new_namespace="1">
    <object class="MyDialog" name="dialog_1" base="EditDialog">
        <title>dialog_1</title>

        <object class="wxFlexGridSizer" name="grid_sizer_1" base="EditFlexGridSizer">
            <attribute>1</attribute>
            <rows>3</rows>
            <cols>1</cols>
            <vgap>0</vgap>
            <hgap>0</hgap>
            <growable_rows>0</growable_rows>
            <growable_cols>0</growable_cols>
            <object class="sizeritem">
                <option>1</option>
                <border>0</border>
                <flag>wxEXPAND</flag>
                <object class="wxFlexGridSizer" name="grid_sizer_2" base="EditFlexGridSizer">
                    <attribute>1</attribute>
                    <rows>1</rows>
                    <cols>3</cols>
                    <vgap>0</vgap>
                    <hgap>0</hgap>
                    <growable_rows>0</growable_rows>
                    <growable_cols>0,2</growable_cols>
                    <object class="sizeritem">
                        <option>1</option>
                        <border>0</border>
                        <flag>wxEXPAND</flag>
                        <object class="wxStaticBoxSizer" name="sizer_2" base="EditStaticBoxSizer">
                            <orient>wxHORIZONTAL</orient>
                            <attribute>1</attribute>
                            Unassigned Permissions:
                            <object class="sizeritem">
                                <option>1</option>
                                <border>5</border>
                                <flag>wxALL|wxEXPAND</flag>
                                <object class="wxListBox" name="list_box_1" base="EditListBox">
                                    <selection>-1</selection>
                                    <choices>
                                    </choices>
                                </object>
                            </object>
                        </object>
                    </object>
                    <object class="sizeritem">
                        <option>1</option>
                        <border>0</border>
                        <flag>wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</flag>
                        <object class="wxFlexGridSizer" name="sizer_4" base="EditFlexGridSizer">
                            <attribute>1</attribute>
                            <rows>4</rows>
                            <cols>1</cols>
                            <vgap>0</vgap>
                            <hgap>0</hgap>
                            <growable_rows>0,3</growable_rows>
                            <object class="sizeritem">
                                <option>0</option>
                                <border>0</border>
                                <flag>wxEXPAND</flag>
                                <object class="spacer" name="spacer" base="EditSpacer">
                                    <width>20</width>
                                    <height>20</height>
                                </object>
                            </object>
                            <object class="sizeritem">
                                <option>0</option>
                                <border>5</border>
                                <flag>wxALL</flag>
                                <object class="wxButton" name="button_4" base="EditButton">
                                    Add
                                    <stockitem>ADD</stockitem>
                                </object>
                            </object>
                            <object class="sizeritem">
                                <option>0</option>
                                <border>5</border>
                                <flag>wxALL</flag>
                                <object class="wxButton" name="button_5" base="EditButton">
                                    Remove
                                    <stockitem>REMOVE</stockitem>
                                </object>
                            </object>
                            <object class="sizeritem">
                                <option>0</option>
                                <border>0</border>
                                <flag>wxEXPAND</flag>
                                <object class="spacer" name="spacer" base="EditSpacer">
                                    <width>20</width>
                                    <height>20</height>
                                </object>
                            </object>
                        </object>
                    </object>
                    <object class="sizeritem">
                        <option>1</option>
                        <border>0</border>
                        <flag>wxEXPAND</flag>
                        <object class="wxStaticBoxSizer" name="sizer_3" base="EditStaticBoxSizer">
                            <orient>wxHORIZONTAL</orient>
                            <attribute>1</attribute>
                            Assigned Permissions:
                            <object class="sizeritem">
                                <option>1</option>
                                <border>5</border>
                                <flag>wxALL|wxEXPAND</flag>
                                <object class="wxListBox" name="list_box_2" base="EditListBox">
                                    <selection>-1</selection>
                                    <choices>
                                    </choices>
                                </object>
                            </object>
                        </object>
                    </object>
                </object>
            </object>
            <object class="sizeritem">
                <option>0</option>
                <border>5</border>
                <flag>wxALL|wxEXPAND</flag>
                <object class="wxStaticLine" name="static_line_1" base="EditStaticLine">

                    <attribute>1</attribute>
                </object>
            </object>
            <object class="sizeritem">
                <option>1</option>
                <border>0</border>
                <flag>wxEXPAND|wxALIGN_RIGHT</flag>
                <object class="wxBoxSizer" name="sizer_1" base="EditBoxSizer">
                    <orient>wxHORIZONTAL</orient>
                    <attribute>1</attribute>
                    <object class="sizeritem">
                        <option>0</option>
                        <border>5</border>
                        <flag>wxALL</flag>
                        <object class="wxButton" name="button_2" base="EditButton">
                            &OK
                            <stockitem>OK</stockitem>
                        </object>
                    </object>
                    <object class="sizeritem">
                        <option>0</option>
                        <border>5</border>
                        <flag>wxALL</flag>
                        <object class="wxButton" name="button_1" base="EditButton">
                            &Cancel
                            <stockitem>CANCEL</stockitem>
                        </object>
                    </object>
                </object>
            </object>
        </object>
    </object>
</application>

{'repo_name': 'wxGlade/wxGlade', 'stars': '129', 'repo_language': 'Python', 'file_name': 'wxglade.spec', 'mime_type': 'text/plain', 'hash': -7236791164308547027, 'source_dataset': 'data'}


// +build !ignore_autogenerated

/*
Copyright The Kubernetes Authors.

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.
*/

// Code generated by deepcopy-gen. DO NOT EDIT.

package eventratelimit

import (
	runtime "k8s.io/apimachinery/pkg/runtime"
)

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Configuration) DeepCopyInto(out *Configuration) {
	*out = *in
	out.TypeMeta = in.TypeMeta
	if in.Limits != nil {
		in, out := &in.Limits, &out.Limits
		*out = make([]Limit, len(*in))
		copy(*out, *in)
	}
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Configuration.
func (in *Configuration) DeepCopy() *Configuration {
	if in == nil {
		return nil
	}
	out := new(Configuration)
	in.DeepCopyInto(out)
	return out
}

// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Configuration) DeepCopyObject() runtime.Object {
	if c := in.DeepCopy(); c != nil {
		return c
	}
	return nil
}

// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Limit) DeepCopyInto(out *Limit) {
	*out = *in
	return
}

// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Limit.
func (in *Limit) DeepCopy() *Limit {
	if in == nil {
		return nil
	}
	out := new(Limit)
	in.DeepCopyInto(out)
	return out
}

{'repo_name': 'trailofbits/audit-kubernetes', 'stars': '164', 'repo_language': 'Go', 'file_name': 'BUILD', 'mime_type': 'text/plain', 'hash': 5880728509995288257, 'source_dataset': 'data'}


const Joi = require('@hapi/joi');

const arn = Joi.alternatives().try(
  Joi.string(),
  Joi.object().keys({
    Ref: Joi.string(),
  }),
  Joi.object().keys({
    'Fn::GetAtt': Joi.array().items(Joi.string()),
  }),
);

const sqsWithParams = Joi.object().keys({
  arn: arn.required(),
  messageGroupId: Joi.string().required(),
});

const kinesisWithParams = Joi.object().keys({
  arn: arn.required(),
  partitionKeyPath: Joi.string(),
});

const target = Joi.object().keys({
  sns: arn,
  sqs: Joi.alternatives().try(sqsWithParams, arn),
  kinesis: Joi.alternatives().try(kinesisWithParams, arn),
  firehose: arn,
  lambda: arn,
  stepFunctions: arn,
});

const targets = Joi.array().items(target);

const schema = Joi.object().keys({
  ABORTED: targets,
  FAILED: targets,
  RUNNING: targets,
  SUCCEEDED: targets,
  TIMED_OUT: targets,
});

module.exports = schema;

{'repo_name': 'serverless-operations/serverless-step-functions', 'stars': '658', 'repo_language': 'JavaScript', 'file_name': 'invoke.test.js', 'mime_type': 'text/plain', 'hash': 4356220167774753471, 'source_dataset': 'data'}


--TEST--
Should throw error when add auth
--SKIPIF--
<?php
if (!extension_loaded('zookeeper')) {
    echo 'Zookeeper extension is not loaded'
};
--FILE--
<?php
$client = new Zookeeper('localhost:2181');
echo $client->addAuth(array());
--EXPECTF--
Warning: Zookeeper::addAuth() expects at least %d parameters, %d given in %s on line %d

{'repo_name': 'andreiz/php-zookeeper', 'stars': '457', 'repo_language': 'C', 'file_name': 'build.sh', 'mime_type': 'text/x-shellscript', 'hash': 7929437801552949632, 'source_dataset': 'data'}


const { loadSchema } = require('@graphql-tools/load');
const { GraphQLFileLoader } = require('@graphql-tools/graphql-file-loader');
const { printSchemaWithDirectives } = require('@graphql-tools/utils');
const { writeFileSync } = require('fs');
const { resolve } = require('path');
const { DIRECTIVES } = require('graphql-to-config-schema');

async function main() {
  const schema = await loadSchema([DIRECTIVES, './**/yaml-config.graphql'], {
    loaders: [new GraphQLFileLoader()],
    assumeValidSDL: true,
  });

  writeFileSync(resolve(__dirname, '../schema.graphql'), printSchemaWithDirectives(schema));
}

main().catch(console.error);

{'repo_name': 'Urigo/graphql-cli', 'stars': '1511', 'repo_language': 'TypeScript', 'file_name': 'workflow.ts', 'mime_type': 'text/x-java', 'hash': 6785168333683274609, 'source_dataset': 'data'}


//dependencies
@import '../../../core/src/sass/_module.scss';

//this module
@import '_module.scss';

{'repo_name': 'govau/design-system-components', 'stars': '650', 'repo_language': 'HTML', 'file_name': 'config.yml', 'mime_type': 'text/plain', 'hash': -3587423094592029462, 'source_dataset': 'data'}


#include <fc/network/rate_limiting.hpp>
#include <fc/network/tcp_socket_io_hooks.hpp>
#include <fc/network/tcp_socket.hpp>
#include <list>
#include <algorithm>
#include <fc/network/ip.hpp>
#include <fc/fwd_impl.hpp>
#include <fc/asio.hpp>
#include <fc/log/logger.hpp>
#include <fc/io/stdio.hpp>
#include <fc/exception/exception.hpp>
#include <fc/thread/thread.hpp>

namespace fc
{

  namespace detail
  {
    // data about a read or write we're managing
    class rate_limited_operation
    {
    public:
      size_t                        length;
      size_t                        offset;
      size_t                        permitted_length;
      promise<size_t>::ptr          completion_promise;

      rate_limited_operation(size_t length,
                             size_t offset,
                             promise<size_t>::ptr&& completion_promise) :
        length(length),
        offset(offset),
        permitted_length(0),
        completion_promise(completion_promise)
      {}

      virtual void perform_operation() = 0;
    };

    class rate_limited_tcp_write_operation : public rate_limited_operation
    {
    public:
      boost::asio::ip::tcp::socket& socket;
      const char*                   raw_buffer;
      std::shared_ptr<const char>   shared_buffer;

      rate_limited_tcp_write_operation(boost::asio::ip::tcp::socket& socket,
                                       const char* buffer,
                                       size_t length,
                                       size_t offset,
                                       promise<size_t>::ptr completion_promise) :
        rate_limited_operation(length, offset, std::move(completion_promise)),
        socket(socket),
        raw_buffer(buffer)
      {
        assert(false);
      }
      rate_limited_tcp_write_operation(boost::asio::ip::tcp::socket& socket,
                                       const std::shared_ptr<const char>& buffer,
                                       size_t length,
                                       size_t offset,
                                       promise<size_t>::ptr completion_promise) :
        rate_limited_operation(length, offset, std::move(completion_promise)),
        socket(socket),
        raw_buffer(nullptr),
        shared_buffer(buffer)
      {}
      virtual void perform_operation() override
      {
        if (raw_buffer)
          asio::async_write_some(socket,
                                 raw_buffer, permitted_length,
                                 completion_promise);
        else
          asio::async_write_some(socket,
                                 shared_buffer, permitted_length, offset,
                                 completion_promise);
      }
    };

    class rate_limited_tcp_read_operation : public rate_limited_operation
    {
    public:
      boost::asio::ip::tcp::socket& socket;
      char*                         raw_buffer;
      std::shared_ptr<char>         shared_buffer;

      rate_limited_tcp_read_operation(boost::asio::ip::tcp::socket& socket,
                                      char* buffer,
                                      size_t length,
                                      size_t offset,
                                      promise<size_t>::ptr completion_promise) :
        rate_limited_operation(length, offset, std::move(completion_promise)),
        socket(socket),
        raw_buffer(buffer)
      {}
      rate_limited_tcp_read_operation(boost::asio::ip::tcp::socket& socket,
                                      const std::shared_ptr<char>& buffer,
                                      size_t length,
                                      size_t offset,
                                      promise<size_t>::ptr completion_promise) :
        rate_limited_operation(length, offset, std::move(completion_promise)),
        socket(socket),
        raw_buffer(nullptr),
        shared_buffer(buffer)
      {}
      virtual void perform_operation() override
      {
        if (raw_buffer)
          asio::async_read_some(socket,
                                raw_buffer, permitted_length,
                                completion_promise);
        else
          asio::async_read_some(socket,
                                shared_buffer, permitted_length, offset,
                                completion_promise);

      }
    };

    struct is_operation_shorter
    {
      // less than operator designed to bring the shortest operations to the end
      bool operator()(const rate_limited_operation* lhs, const rate_limited_operation* rhs)
      {
        return lhs->length > rhs->length;
      }
    };

    class average_rate_meter
    {
    private:
      mutable double         _average_rate;
      mutable uint32_t       _unaccounted_bytes;
      mutable time_point     _last_update_time;
      microseconds           _time_constant;

      void update_const(uint32_t bytes_transferred = 0) const;
    public:
      average_rate_meter(const microseconds& time_constant = seconds(10));
      void set_time_constant(const microseconds& time_constant);
      void update(uint32_t bytes_transferred = 0);
      uint32_t get_average_rate() const;
    };
    average_rate_meter::average_rate_meter(const microseconds& time_constant) :
      _average_rate(0.),
      _unaccounted_bytes(0),
      _last_update_time(time_point_sec::min()),
      _time_constant(time_constant)
    {}
    void average_rate_meter::set_time_constant(const microseconds& time_constant)
    {
      _time_constant = time_constant;
    }
    void average_rate_meter::update(uint32_t bytes_transferred /* = 0 */)
    {
      update_const(bytes_transferred);
    }
    void average_rate_meter::update_const(uint32_t bytes_transferred /* = 0 */) const
    {
      time_point now = time_point::now();
      if (now <= _last_update_time)
        _unaccounted_bytes += bytes_transferred;
      else
      {
        microseconds time_since_last_update = now - _last_update_time;
        if (time_since_last_update > _time_constant)
          _average_rate = bytes_transferred / (_time_constant.count() / (double)seconds(1).count());
        else
        {
          bytes_transferred += _unaccounted_bytes;
          double seconds_since_last_update = time_since_last_update.count() / (double)seconds(1).count();
          double rate_since_last_update = bytes_transferred / seconds_since_last_update;
          double alpha = time_since_last_update.count() / (double)_time_constant.count();
          _average_rate = rate_since_last_update * alpha + _average_rate * (1.0 - alpha);
        }
        _last_update_time = now;
        _unaccounted_bytes = 0;
      }
    }
    uint32_t average_rate_meter::get_average_rate() const
    {
      update_const();
      return (uint32_t)_average_rate;
    }

    class rate_limiting_group_impl : public tcp_socket_io_hooks
    {
    public:
      uint32_t _upload_bytes_per_second;
      uint32_t _download_bytes_per_second;
      uint32_t _burstiness_in_seconds;

      microseconds _granularity; // how often to add tokens to the bucket
      uint32_t _read_tokens;
      uint32_t _unused_read_tokens; // gets filled with tokens for unused bytes (if I'm allowed to read 200 bytes and I try to read 200 bytes, but can only read 50, tokens for the other 150 get returned here)
      uint32_t _write_tokens;
      uint32_t _unused_write_tokens;

      typedef std::list<rate_limited_operation*> rate_limited_operation_list;
      rate_limited_operation_list _read_operations_in_progress;
      rate_limited_operation_list _read_operations_for_next_iteration;
      rate_limited_operation_list _write_operations_in_progress;
      rate_limited_operation_list _write_operations_for_next_iteration;

      time_point _last_read_iteration_time;
      time_point _last_write_iteration_time;

      future<void> _process_pending_reads_loop_complete;
      promise<void>::ptr _new_read_operation_available_promise;
      future<void> _process_pending_writes_loop_complete;
      promise<void>::ptr _new_write_operation_available_promise;

      average_rate_meter _actual_upload_rate;
      average_rate_meter _actual_download_rate;

      rate_limiting_group_impl(uint32_t upload_bytes_per_second, uint32_t download_bytes_per_second,
                               uint32_t burstiness_in_seconds = 1);
      ~rate_limiting_group_impl();

      virtual size_t readsome(boost::asio::ip::tcp::socket& socket, char* buffer, size_t length) override;
      virtual size_t readsome(boost::asio::ip::tcp::socket& socket, const std::shared_ptr<char>& buffer, size_t length, size_t offset) override;
      template <typename BufferType>
      size_t readsome_impl(boost::asio::ip::tcp::socket& socket, const BufferType& buffer, size_t length, size_t offset);
      virtual size_t writesome(boost::asio::ip::tcp::socket& socket, const char* buffer, size_t length) override;
      virtual size_t writesome(boost::asio::ip::tcp::socket& socket, const std::shared_ptr<const char>& buffer, size_t length, size_t offset) override;
      template <typename BufferType>
      size_t writesome_impl(boost::asio::ip::tcp::socket& socket, const BufferType& buffer, size_t length, size_t offset);

      void process_pending_reads();
      void process_pending_writes();
      void process_pending_operations(time_point& last_iteration_start_time,
                                      uint32_t& limit_bytes_per_second,
                                      rate_limited_operation_list& operations_in_progress,
                                      rate_limited_operation_list& operations_for_next_iteration,
                                      uint32_t& tokens,
                                      uint32_t& unused_tokens);
    };

    rate_limiting_group_impl::rate_limiting_group_impl(uint32_t upload_bytes_per_second, uint32_t download_bytes_per_second,
                                                       uint32_t burstiness_in_seconds) :
      _upload_bytes_per_second(upload_bytes_per_second),
      _download_bytes_per_second(download_bytes_per_second),
      _burstiness_in_seconds(burstiness_in_seconds),
      _granularity(milliseconds(50)),
      _read_tokens(_download_bytes_per_second),
      _unused_read_tokens(0),
      _write_tokens(_upload_bytes_per_second),
      _unused_write_tokens(0)
    {
    }

    rate_limiting_group_impl::~rate_limiting_group_impl()
    {
      try
      {
        _process_pending_reads_loop_complete.cancel_and_wait();
      }
      catch (...)
      {
      }
      try
      {
        _process_pending_writes_loop_complete.cancel_and_wait();
      }
      catch (...)
      {
      }
    }

    size_t rate_limiting_group_impl::readsome(boost::asio::ip::tcp::socket& socket, const std::shared_ptr<char>& buffer, size_t length, size_t offset)
    {
      return readsome_impl(socket, buffer, length, offset);
    }

    size_t rate_limiting_group_impl::readsome(boost::asio::ip::tcp::socket& socket, char* buffer, size_t length)
    {
      return readsome_impl(socket, buffer, length, 0);
    }

    template <typename BufferType>
    size_t rate_limiting_group_impl::readsome_impl(boost::asio::ip::tcp::socket& socket, const BufferType& buffer, size_t length, size_t offset)
    {
      size_t bytes_read;
      if (_download_bytes_per_second)
      {
        promise<size_t>::ptr completion_promise(new promise<size_t>("rate_limiting_group_impl::readsome"));
        rate_limited_tcp_read_operation read_operation(socket, buffer, length, offset, completion_promise);
        _read_operations_for_next_iteration.push_back(&read_operation);

        // launch the read processing loop it if isn't running, or signal it to resume if it's paused.
        if (!_process_pending_reads_loop_complete.valid() || _process_pending_reads_loop_complete.ready())
          _process_pending_reads_loop_complete = async([=](){ process_pending_reads(); }, "process_pending_reads" );
        else if (_new_read_operation_available_promise)
          _new_read_operation_available_promise->set_value();

        try
        {
          bytes_read = completion_promise->wait();
        }
        catch (...)
        {
          _read_operations_for_next_iteration.remove(&read_operation);
          _read_operations_in_progress.remove(&read_operation);
          throw;
        }
        _unused_read_tokens += read_operation.permitted_length - bytes_read;
      }
      else
        bytes_read = asio::read_some(socket, buffer, length, offset);

      _actual_download_rate.update(bytes_read);

      return bytes_read;
    }

    size_t rate_limiting_group_impl::writesome(boost::asio::ip::tcp::socket& socket, const char* buffer, size_t length)
    {
      return writesome_impl(socket, buffer, length, 0);
    }

    size_t rate_limiting_group_impl::writesome(boost::asio::ip::tcp::socket& socket, const std::shared_ptr<const char>& buffer, size_t length, size_t offset)
    {
      return writesome_impl(socket, buffer, length, offset);
    }

    template <typename BufferType>
    size_t rate_limiting_group_impl::writesome_impl(boost::asio::ip::tcp::socket& socket, const BufferType& buffer, size_t length, size_t offset)
    {
      size_t bytes_written;
      if (_upload_bytes_per_second)
      {
        promise<size_t>::ptr completion_promise(new promise<size_t>("rate_limiting_group_impl::writesome"));
        rate_limited_tcp_write_operation write_operation(socket, buffer, length, offset, completion_promise);
        _write_operations_for_next_iteration.push_back(&write_operation);

        // launch the write processing loop it if isn't running, or signal it to resume if it's paused.
        if (!_process_pending_writes_loop_complete.valid() || _process_pending_writes_loop_complete.ready())
          _process_pending_writes_loop_complete = async([=](){ process_pending_writes(); }, "process_pending_writes");
        else if (_new_write_operation_available_promise)
          _new_write_operation_available_promise->set_value();

        try
        {
          bytes_written = completion_promise->wait();
        }
        catch (...)
        {
          _write_operations_for_next_iteration.remove(&write_operation);
          _write_operations_in_progress.remove(&write_operation);
          throw;
        }
        _unused_write_tokens += write_operation.permitted_length - bytes_written;
      }
      else
        bytes_written = asio::write_some(socket, buffer, length, offset);

      _actual_upload_rate.update(bytes_written);

      return bytes_written;
    }

    void rate_limiting_group_impl::process_pending_reads()
    {
      for (;;)
      {
        process_pending_operations(_last_read_iteration_time, _download_bytes_per_second,
                                   _read_operations_in_progress, _read_operations_for_next_iteration, _read_tokens, _unused_read_tokens);

        _new_read_operation_available_promise = new promise<void>("rate_limiting_group_impl::process_pending_reads");
        try
        {
          if (_read_operations_in_progress.empty())
            _new_read_operation_available_promise->wait();
          else
            _new_read_operation_available_promise->wait(_granularity);
        }
        catch (const timeout_exception&)
        {
        }
        _new_read_operation_available_promise.reset();
      }
    }
    void rate_limiting_group_impl::process_pending_writes()
    {
      for (;;)
      {
        process_pending_operations(_last_write_iteration_time, _upload_bytes_per_second,
                                   _write_operations_in_progress, _write_operations_for_next_iteration, _write_tokens, _unused_write_tokens);

        _new_write_operation_available_promise = new promise<void>("rate_limiting_group_impl::process_pending_writes");
        try
        {
          if (_write_operations_in_progress.empty())
            _new_write_operation_available_promise->wait();
          else
            _new_write_operation_available_promise->wait(_granularity);
        }
        catch (const timeout_exception&)
        {
        }
        _new_write_operation_available_promise.reset();
      }
    }
    void rate_limiting_group_impl::process_pending_operations(time_point& last_iteration_start_time,
                                                              uint32_t& limit_bytes_per_second,
                                                              rate_limited_operation_list& operations_in_progress,
                                                              rate_limited_operation_list& operations_for_next_iteration,
                                                              uint32_t& tokens,
                                                              uint32_t& unused_tokens)
    {
      // lock here for multithreaded
      std::copy(operations_for_next_iteration.begin(),
                operations_for_next_iteration.end(),
                std::back_inserter(operations_in_progress));
      operations_for_next_iteration.clear();

      // find out how much time since our last read/write
      time_point this_iteration_start_time = time_point::now();
      if (limit_bytes_per_second) // the we are limiting up/download speed
      {
        microseconds time_since_last_iteration = this_iteration_start_time - last_iteration_start_time;
        if (time_since_last_iteration > seconds(1))
          time_since_last_iteration = seconds(1);
        else if (time_since_last_iteration < microseconds(0))
          time_since_last_iteration = microseconds(0);

        tokens += (uint32_t)((limit_bytes_per_second * time_since_last_iteration.count()) / 1000000);
        tokens += unused_tokens;
        unused_tokens = 0;
        tokens = std::min(tokens, limit_bytes_per_second * _burstiness_in_seconds);

        if (tokens)
        {
          // sort the pending reads/writes in order of the number of bytes they need to write, smallest first
          std::vector<rate_limited_operation*> operations_sorted_by_length;
          operations_sorted_by_length.reserve(operations_in_progress.size());
          for (rate_limited_operation* operation_data : operations_in_progress)
            operations_sorted_by_length.push_back(operation_data);
          std::sort(operations_sorted_by_length.begin(), operations_sorted_by_length.end(), is_operation_shorter());

          // figure out how many bytes each reader/writer is allowed to read/write
          uint32_t bytes_remaining_to_allocate = tokens;
          while (!operations_sorted_by_length.empty())
          {
            uint32_t bytes_permitted_for_this_operation = bytes_remaining_to_allocate / operations_sorted_by_length.size();
            uint32_t bytes_allocated_for_this_operation = std::min<size_t>(operations_sorted_by_length.back()->length, bytes_permitted_for_this_operation);
            operations_sorted_by_length.back()->permitted_length = bytes_allocated_for_this_operation;
            bytes_remaining_to_allocate -= bytes_allocated_for_this_operation;
            operations_sorted_by_length.pop_back();
          }
          tokens = bytes_remaining_to_allocate;

          // kick off the reads/writes in first-come order
          for (auto iter = operations_in_progress.begin(); iter != operations_in_progress.end();)
          {
            if ((*iter)->permitted_length > 0)
            {
              rate_limited_operation* operation_to_perform = *iter;
              iter = operations_in_progress.erase(iter);
              operation_to_perform->perform_operation();
            }
            else
              ++iter;
          }
        }
      }
      else // down/upload speed is unlimited
      {
        // we shouldn't end up here often.  If the rate is unlimited, we should just execute
        // the operation immediately without being queued up.  This should only be hit if
        // we change from a limited rate to unlimited
        for (auto iter = operations_in_progress.begin();
             iter != operations_in_progress.end();)
        {
          rate_limited_operation* operation_to_perform = *iter;
          iter = operations_in_progress.erase(iter);
          operation_to_perform->permitted_length = operation_to_perform->length;
          operation_to_perform->perform_operation();
        }
      }
      last_iteration_start_time = this_iteration_start_time;
    }

  }

  rate_limiting_group::rate_limiting_group(uint32_t upload_bytes_per_second, uint32_t download_bytes_per_second, uint32_t burstiness_in_seconds /* = 1 */) :
    my(new detail::rate_limiting_group_impl(upload_bytes_per_second, download_bytes_per_second, burstiness_in_seconds))
  {
  }

  rate_limiting_group::~rate_limiting_group()
  {
  }

  uint32_t rate_limiting_group::get_actual_upload_rate() const
  {
    return my->_actual_upload_rate.get_average_rate();
  }

  uint32_t rate_limiting_group::get_actual_download_rate() const
  {
    return my->_actual_download_rate.get_average_rate();
  }

  void rate_limiting_group::set_actual_rate_time_constant(microseconds time_constant)
  {
    my->_actual_upload_rate.set_time_constant(time_constant);
    my->_actual_download_rate.set_time_constant(time_constant);
  }

  void rate_limiting_group::set_upload_limit(uint32_t upload_bytes_per_second)
  {
    my->_upload_bytes_per_second = upload_bytes_per_second;
  }

  uint32_t rate_limiting_group::get_upload_limit() const
  {
    return my->_upload_bytes_per_second;
  }

  void rate_limiting_group::set_download_limit(uint32_t download_bytes_per_second)
  {
    my->_download_bytes_per_second = download_bytes_per_second;
  }

  uint32_t rate_limiting_group::get_download_limit() const
  {
    return my->_download_bytes_per_second;
  }

  void rate_limiting_group::add_tcp_socket(tcp_socket* tcp_socket_to_limit)
  {
    tcp_socket_to_limit->set_io_hooks(my.get());
  }

  void rate_limiting_group::remove_tcp_socket(tcp_socket* tcp_socket_to_stop_limiting)
  {
    tcp_socket_to_stop_limiting->set_io_hooks(NULL);
  }

} // namespace fc

{'repo_name': 'steemit/steem', 'stars': '1849', 'repo_language': 'C++', 'file_name': 'CMakeLists.txt', 'mime_type': 'text/plain', 'hash': 3456422482403117368, 'source_dataset': 'data'}


.class public Lcom/f/a/b/a/a;
.super Ljava/io/InputStream;

# instance fields
.field private final a:Ljava/io/InputStream;

.field private final b:I

# direct methods
.method public constructor <init>(Ljava/io/InputStream;I)V
    .locals 0

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

    iput-object p1, p0, Lcom/f/a/b/a/a;->a:Ljava/io/InputStream;

    iput p2, p0, Lcom/f/a/b/a/a;->b:I

    return-void
.end method

# virtual methods
.method public available()I
    .locals 1

    iget v0, p0, Lcom/f/a/b/a/a;->b:I

    return v0
.end method

.method public close()V
    .locals 1

    iget-object v0, p0, Lcom/f/a/b/a/a;->a:Ljava/io/InputStream;

    invoke-virtual {v0}, Ljava/io/InputStream;->close()V

    return-void
.end method

.method public mark(I)V
    .locals 1

    iget-object v0, p0, Lcom/f/a/b/a/a;->a:Ljava/io/InputStream;

    invoke-virtual {v0, p1}, Ljava/io/InputStream;->mark(I)V

    return-void
.end method

.method public markSupported()Z
    .locals 1

    iget-object v0, p0, Lcom/f/a/b/a/a;->a:Ljava/io/InputStream;

    invoke-virtual {v0}, Ljava/io/InputStream;->markSupported()Z

    move-result v0

    return v0
.end method

.method public read()I
    .locals 1

    iget-object v0, p0, Lcom/f/a/b/a/a;->a:Ljava/io/InputStream;

    invoke-virtual {v0}, Ljava/io/InputStream;->read()I

    move-result v0

    return v0
.end method

.method public read([B)I
    .locals 1

    iget-object v0, p0, Lcom/f/a/b/a/a;->a:Ljava/io/InputStream;

    invoke-virtual {v0, p1}, Ljava/io/InputStream;->read([B)I

    move-result v0

    return v0
.end method

.method public read([BII)I
    .locals 1

    iget-object v0, p0, Lcom/f/a/b/a/a;->a:Ljava/io/InputStream;

    invoke-virtual {v0, p1, p2, p3}, Ljava/io/InputStream;->read([BII)I

    move-result v0

    return v0
.end method

.method public reset()V
    .locals 1

    iget-object v0, p0, Lcom/f/a/b/a/a;->a:Ljava/io/InputStream;

    invoke-virtual {v0}, Ljava/io/InputStream;->reset()V

    return-void
.end method

.method public skip(J)J
    .locals 2

    iget-object v0, p0, Lcom/f/a/b/a/a;->a:Ljava/io/InputStream;

    invoke-virtual {v0, p1, p2}, Ljava/io/InputStream;->skip(J)J

    move-result-wide v0

    return-wide v0
.end method

{'repo_name': 'KashaMalaga/XiaomiMiBand', 'stars': '135', 'repo_language': 'Lua', 'file_name': 'CERT.SF', 'mime_type': 'text/plain', 'hash': -8665515371255375132, 'source_dataset': 'data'}


config BR2_TARGET_ROOTFS_ROMFS
	bool "romfs root filesystem"
	help
	  Build a romfs image of the root filesystem.

{'repo_name': 'Metrological/buildroot', 'stars': '123', 'repo_language': 'Makefile', 'file_name': 'Config.in', 'mime_type': 'text/plain', 'hash': -5634861389369645842, 'source_dataset': 'data'}


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

        <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
        <title>Rgaa30 Test.3-1-1 NMI 01</title>

Rgaa30 Test.3-1-1 NMI 01

 Pour chaque mot ou ensemble de mots dont la mise en couleur est porteuse d'
                information, l'
                information ne doit pas être donnée uniquement par la couleur. Cette règle est-elle respectée ?

                 NMI.

{'repo_name': 'Asqatasun/Asqatasun', 'stars': '202', 'repo_language': 'Java', 'file_name': 'main.yml', 'mime_type': 'text/plain', 'hash': -727593479486861326, 'source_dataset': 'data'}


// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/performance_manager/public/decorators/v8_per_frame_memory_decorator.h"

#include "base/bind.h"
#include "base/check.h"
#include "base/containers/flat_map.h"
#include "base/containers/flat_set.h"
#include "base/stl_util.h"
#include "base/timer/timer.h"
#include "components/performance_manager/public/graph/frame_node.h"
#include "components/performance_manager/public/graph/node_attached_data.h"
#include "components/performance_manager/public/graph/node_data_describer_registry.h"
#include "components/performance_manager/public/graph/process_node.h"
#include "components/performance_manager/public/performance_manager.h"
#include "components/performance_manager/public/render_process_host_proxy.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"

namespace performance_manager {

namespace {

// Forwards the pending receiver to the RenderProcessHost and binds it on the
// UI thread.
void BindReceiverOnUIThread(
    mojo::PendingReceiver<performance_manager::mojom::V8PerFrameMemoryReporter>
        pending_receiver,
    RenderProcessHostProxy proxy) {
  auto* render_process_host = proxy.Get();
  if (render_process_host) {
    render_process_host->BindReceiver(std::move(pending_receiver));
  }
}

internal::BindV8PerFrameMemoryReporterCallback* g_test_bind_callback = nullptr;

// Private implementations of the node attached data. This keeps the complexity
// out of the header file.

class NodeAttachedFrameData
    : public ExternalNodeAttachedDataImpl<NodeAttachedFrameData> {
 public:
  explicit NodeAttachedFrameData(const FrameNode* frame_node) {}
  ~NodeAttachedFrameData() override = default;

  NodeAttachedFrameData(const NodeAttachedFrameData&) = delete;
  NodeAttachedFrameData& operator=(const NodeAttachedFrameData&) = delete;

  const V8PerFrameMemoryDecorator::FrameData* data() const {
    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
    return data_available_ ? &data_ : nullptr;
  }

 private:
  friend class NodeAttachedProcessData;

  V8PerFrameMemoryDecorator::FrameData data_;
  bool data_available_ = false;
  SEQUENCE_CHECKER(sequence_checker_);
};

class NodeAttachedProcessData
    : public ExternalNodeAttachedDataImpl<NodeAttachedProcessData> {
 public:
  explicit NodeAttachedProcessData(const ProcessNode* process_node)
      : process_node_(process_node) {}
  ~NodeAttachedProcessData() override = default;

  NodeAttachedProcessData(const NodeAttachedProcessData&) = delete;
  NodeAttachedProcessData& operator=(const NodeAttachedProcessData&) = delete;

  const V8PerFrameMemoryDecorator::ProcessData* data() const {
    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
    return data_available_ ? &data_ : nullptr;
  }

  void Initialize(const V8PerFrameMemoryDecorator* decorator);
  void ScheduleNextMeasurement();

 private:
  void StartMeasurement();
  void EnsureRemote();
  void OnPerFrameV8MemoryUsageData(
      performance_manager::mojom::PerProcessV8MemoryUsageDataPtr result);

  const ProcessNode* const process_node_;
  const V8PerFrameMemoryDecorator* decorator_ = nullptr;

  mojo::Remote<performance_manager::mojom::V8PerFrameMemoryReporter>
      resource_usage_reporter_;

  enum class State {
    kUninitialized,
    kWaiting,    // Waiting to take a measurement.
    kMeasuring,  // Waiting for measurement results.
    kIdle,       // No measurements scheduled.
  };
  State state_ = State::kUninitialized;

  // Used to schedule the next measurement.
  base::TimeTicks last_request_time_;
  base::OneShotTimer timer_;

  V8PerFrameMemoryDecorator::ProcessData data_;
  bool data_available_ = false;
  SEQUENCE_CHECKER(sequence_checker_);
};

void NodeAttachedProcessData::Initialize(
    const V8PerFrameMemoryDecorator* decorator) {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  DCHECK_EQ(nullptr, decorator_);
  decorator_ = decorator;
  DCHECK_EQ(state_, State::kUninitialized);

  state_ = State::kWaiting;
  ScheduleNextMeasurement();
}

void NodeAttachedProcessData::ScheduleNextMeasurement() {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  DCHECK_NE(nullptr, decorator_);
  DCHECK_NE(state_, State::kUninitialized);

  if (state_ == State::kMeasuring) {
    // Don't restart the timer until the current measurement finishes.
    // ScheduleNextMeasurement will be called again at that point.
    return;
  }

  if (decorator_->GetMinTimeBetweenRequestsPerProcess().is_zero()) {
    // All measurements have been cancelled.
    state_ = State::kIdle;
    timer_.Stop();
    last_request_time_ = base::TimeTicks();
    return;
  }

  state_ = State::kWaiting;
  if (last_request_time_.is_null()) {
    // This is the first measurement. Perform it immediately.
    StartMeasurement();
    return;
  }

  base::TimeTicks next_request_time =
      last_request_time_ + decorator_->GetMinTimeBetweenRequestsPerProcess();
  timer_.Start(FROM_HERE, next_request_time - base::TimeTicks::Now(), this,
               &NodeAttachedProcessData::StartMeasurement);
}

void NodeAttachedProcessData::StartMeasurement() {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  DCHECK_EQ(state_, State::kWaiting);
  state_ = State::kMeasuring;
  last_request_time_ = base::TimeTicks::Now();

  EnsureRemote();
  resource_usage_reporter_->GetPerFrameV8MemoryUsageData(
      base::BindOnce(&NodeAttachedProcessData::OnPerFrameV8MemoryUsageData,
                     base::Unretained(this)));
}

void NodeAttachedProcessData::OnPerFrameV8MemoryUsageData(
    performance_manager::mojom::PerProcessV8MemoryUsageDataPtr result) {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  DCHECK_EQ(state_, State::kMeasuring);

  // Distribute the data to the frames.
  // If a frame doesn't have corresponding data in the result, clear any data
  // it may have had. Any datum in the result that doesn't correspond to an
  // existing frame is likewise accured to unassociated usage.
  uint64_t unassociated_v8_bytes_used = result->unassociated_bytes_used;

  // Create a mapping from token to per-frame usage for the merge below.
  std::vector<std::pair<FrameToken, mojom::PerFrameV8MemoryUsageDataPtr>> tmp;
  for (auto& entry : result->associated_memory) {
    tmp.emplace_back(
        std::make_pair(FrameToken(entry->frame_token), std::move(entry)));
  }
  DCHECK_EQ(tmp.size(), result->associated_memory.size());

  base::flat_map<FrameToken, mojom::PerFrameV8MemoryUsageDataPtr>
      associated_memory(std::move(tmp));
  // Validate that the frame tokens were all unique. If there are duplicates,
  // the map will arbirarily drop all but one record per unique token.
  DCHECK_EQ(associated_memory.size(), result->associated_memory.size());

  base::flat_set<const FrameNode*> frame_nodes = process_node_->GetFrameNodes();
  for (const FrameNode* frame_node : frame_nodes) {
    auto it = associated_memory.find(frame_node->GetFrameToken());
    if (it == associated_memory.end()) {
      // No data for this node, clear any data associated with it.
      NodeAttachedFrameData::Destroy(frame_node);
    } else {
      // There should always be data for the main isolated world for each frame.
      DCHECK(base::Contains(it->second->associated_bytes, 0));

      NodeAttachedFrameData* frame_data =
          NodeAttachedFrameData::GetOrCreate(frame_node);
      for (const auto& kv : it->second->associated_bytes) {
        if (kv.first == 0) {
          frame_data->data_available_ = true;
          frame_data->data_.set_v8_bytes_used(kv.second->bytes_used);
        } else {
          // TODO(crbug.com/1080672): Where to stash the rest of the data?
        }
      }

      // Clear this datum as its usage has been consumed.
      associated_memory.erase(it);
    }
  }

  for (const auto& it : associated_memory) {
    // Accrue the data for non-existent frames to unassociated bytes.
    unassociated_v8_bytes_used += it.second->associated_bytes[0]->bytes_used;
  }

  data_available_ = true;
  data_.set_unassociated_v8_bytes_used(unassociated_v8_bytes_used);

  // Schedule another measurement for this process node.
  state_ = State::kIdle;
  ScheduleNextMeasurement();
}

void NodeAttachedProcessData::EnsureRemote() {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  if (resource_usage_reporter_.is_bound())
    return;

  // This interface is implemented in //content/renderer/performance_manager.
  mojo::PendingReceiver<performance_manager::mojom::V8PerFrameMemoryReporter>
      pending_receiver = resource_usage_reporter_.BindNewPipeAndPassReceiver();

  RenderProcessHostProxy proxy = process_node_->GetRenderProcessHostProxy();

  if (g_test_bind_callback) {
    g_test_bind_callback->Run(std::move(pending_receiver), std::move(proxy));
  } else {
    content::GetUIThreadTaskRunner({})->PostTask(
        FROM_HERE,
        base::BindOnce(&BindReceiverOnUIThread, std::move(pending_receiver),
                       std::move(proxy)));
  }
}

}  // namespace

namespace internal {

void SetBindV8PerFrameMemoryReporterCallbackForTesting(
    BindV8PerFrameMemoryReporterCallback* callback) {
  g_test_bind_callback = callback;
}

}  // namespace internal

V8PerFrameMemoryDecorator::MeasurementRequest::MeasurementRequest(
    const base::TimeDelta& sample_frequency)
    : sample_frequency_(sample_frequency) {
  DCHECK_GT(sample_frequency_, base::TimeDelta());
}

V8PerFrameMemoryDecorator::MeasurementRequest::MeasurementRequest(
    const base::TimeDelta& sample_frequency,
    Graph* graph)
    : sample_frequency_(sample_frequency) {
  DCHECK_GT(sample_frequency_, base::TimeDelta());
  StartMeasurement(graph);
}

V8PerFrameMemoryDecorator::MeasurementRequest::~MeasurementRequest() {
  if (decorator_)
    decorator_->RemoveMeasurementRequest(this);
  // TODO(crbug.com/1080672): Delete the decorator and its NodeAttachedData
  // when the last request is destroyed. Make sure this doesn't mess up any
  // measurement that's already in progress.
}

void V8PerFrameMemoryDecorator::MeasurementRequest::StartMeasurement(
    Graph* graph) {
  DCHECK_EQ(nullptr, decorator_);
  decorator_ = graph->GetRegisteredObjectAs<V8PerFrameMemoryDecorator>();
  if (!decorator_) {
    // Create the decorator when the first measurement starts.
    auto decorator_ptr = std::make_unique<V8PerFrameMemoryDecorator>();
    decorator_ = decorator_ptr.get();
    graph->PassToGraph(std::move(decorator_ptr));
  }

  decorator_->AddMeasurementRequest(this);
}

void V8PerFrameMemoryDecorator::MeasurementRequest::OnDecoratorUnregistered() {
  decorator_ = nullptr;
}

const V8PerFrameMemoryDecorator::FrameData*
V8PerFrameMemoryDecorator::FrameData::ForFrameNode(const FrameNode* node) {
  auto* node_data = NodeAttachedFrameData::Get(node);
  return node_data ? node_data->data() : nullptr;
}

const V8PerFrameMemoryDecorator::ProcessData*
V8PerFrameMemoryDecorator::ProcessData::ForProcessNode(
    const ProcessNode* node) {
  auto* node_data = NodeAttachedProcessData::Get(node);
  return node_data ? node_data->data() : nullptr;
}

V8PerFrameMemoryDecorator::V8PerFrameMemoryDecorator() = default;

V8PerFrameMemoryDecorator::~V8PerFrameMemoryDecorator() {
  DCHECK(measurement_requests_.empty());
}

void V8PerFrameMemoryDecorator::OnPassedToGraph(Graph* graph) {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  DCHECK_EQ(nullptr, graph_);
  graph_ = graph;

  graph->RegisterObject(this);

  // Iterate over the existing process nodes to put them under observation.
  for (const ProcessNode* process_node : graph->GetAllProcessNodes())
    OnProcessNodeAdded(process_node);

  graph->AddProcessNodeObserver(this);
  graph->GetNodeDataDescriberRegistry()->RegisterDescriber(
      this, "V8PerFrameMemoryDecorator");
}

void V8PerFrameMemoryDecorator::OnTakenFromGraph(Graph* graph) {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  DCHECK_EQ(graph, graph_);
  for (MeasurementRequest* request : measurement_requests_) {
    request->OnDecoratorUnregistered();
  }
  measurement_requests_.clear();
  UpdateProcessMeasurementSchedules();

  graph->GetNodeDataDescriberRegistry()->UnregisterDescriber(this);
  graph->RemoveProcessNodeObserver(this);
  graph->UnregisterObject(this);
  graph_ = nullptr;
}

void V8PerFrameMemoryDecorator::OnProcessNodeAdded(
    const ProcessNode* process_node) {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  DCHECK_EQ(nullptr, NodeAttachedProcessData::Get(process_node));

  // Only renderer processes have frames. Don't attempt to connect to other
  // process types.
  if (process_node->GetProcessType() != content::PROCESS_TYPE_RENDERER)
    return;

  NodeAttachedProcessData* process_data =
      NodeAttachedProcessData::GetOrCreate(process_node);
  process_data->Initialize(this);
}

base::Value V8PerFrameMemoryDecorator::DescribeFrameNodeData(
    const FrameNode* frame_node) const {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  const FrameData* const frame_data = FrameData::ForFrameNode(frame_node);
  if (!frame_data)
    return base::Value();

  base::Value dict(base::Value::Type::DICTIONARY);
  dict.SetIntKey("v8_bytes_used", frame_data->v8_bytes_used());
  return dict;
}

base::Value V8PerFrameMemoryDecorator::DescribeProcessNodeData(
    const ProcessNode* process_node) const {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  const ProcessData* const process_data =
      ProcessData::ForProcessNode(process_node);
  if (!process_data)
    return base::Value();

  DCHECK_EQ(content::PROCESS_TYPE_RENDERER, process_node->GetProcessType());

  base::Value dict(base::Value::Type::DICTIONARY);
  dict.SetIntKey("unassociated_v8_bytes_used",
                 process_data->unassociated_v8_bytes_used());
  return dict;
}

base::TimeDelta V8PerFrameMemoryDecorator::GetMinTimeBetweenRequestsPerProcess()
    const {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  return measurement_requests_.empty()
             ? base::TimeDelta()
             : measurement_requests_.front()->sample_frequency();
}

void V8PerFrameMemoryDecorator::AddMeasurementRequest(
    MeasurementRequest* request) {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  DCHECK(request);
  DCHECK(!base::Contains(measurement_requests_, request))
      << "MeasurementRequest object added twice";
  // Each user of this decorator is expected to issue a single
  // MeasurementRequest, so the size of measurement_requests_ is too low to
  // make the complexity of real priority queue worthwhile.
  for (std::vector<MeasurementRequest*>::const_iterator it =
           measurement_requests_.begin();
       it != measurement_requests_.end(); ++it) {
    if (request->sample_frequency() < (*it)->sample_frequency()) {
      measurement_requests_.insert(it, request);
      UpdateProcessMeasurementSchedules();
      return;
    }
  }
  measurement_requests_.push_back(request);
  UpdateProcessMeasurementSchedules();
}

void V8PerFrameMemoryDecorator::RemoveMeasurementRequest(
    MeasurementRequest* request) {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  DCHECK(request);
  size_t num_erased = base::Erase(measurement_requests_, request);
  DCHECK_EQ(num_erased, 1ULL);
  UpdateProcessMeasurementSchedules();
}

void V8PerFrameMemoryDecorator::UpdateProcessMeasurementSchedules() const {
  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
  DCHECK(graph_);
#if DCHECK_IS_ON()
  // Check the data invariant on measurement_requests_, which will be used by
  // ScheduleNextMeasurement.
  for (size_t i = 1; i < measurement_requests_.size(); ++i) {
    DCHECK(measurement_requests_[i - 1]);
    DCHECK(measurement_requests_[i]);
    DCHECK_LE(measurement_requests_[i - 1]->sample_frequency(),
              measurement_requests_[i]->sample_frequency());
  }
#endif
  for (const ProcessNode* node : graph_->GetAllProcessNodes()) {
    NodeAttachedProcessData* process_data = NodeAttachedProcessData::Get(node);
    if (!process_data) {
      DCHECK_NE(content::PROCESS_TYPE_RENDERER, node->GetProcessType())
          << "NodeAttachedProcessData should have been created for all "
             "renderer processes in OnProcessNodeAdded.";
      continue;
    }
    process_data->ScheduleNextMeasurement();
  }
}

V8PerFrameMemoryRequest::V8PerFrameMemoryRequest(
    const base::TimeDelta& sample_frequency)
    : request_(std::make_unique<V8PerFrameMemoryDecorator::MeasurementRequest>(
          sample_frequency)) {
  // Unretained is safe since the destructor will run on the same sequence as
  // StartMeasurement.
  PerformanceManager::CallOnGraph(
      FROM_HERE,
      base::BindOnce(
          &V8PerFrameMemoryDecorator::MeasurementRequest::StartMeasurement,
          base::Unretained(request_.get())));
}

V8PerFrameMemoryRequest::~V8PerFrameMemoryRequest() {
  PerformanceManager::CallOnGraph(
      FROM_HERE,
      base::BindOnce(
          [](std::unique_ptr<V8PerFrameMemoryDecorator::MeasurementRequest>
                 request) { request.reset(); },
          std::move(request_)));
}

}  // namespace performance_manager

{'repo_name': 'nwjs/chromium.src', 'stars': '111', 'repo_language': 'None', 'file_name': 'AndroidManifest.xml', 'mime_type': 'text/xml', 'hash': 2597553554640388866, 'source_dataset': 'data'}


/**
 * Marlin 3D Printer Firmware
 * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
 *
 * Based on Sprinter and grbl.
 * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 */
#pragma once

/**
 * Test X86_64-specific configuration values for errors at compile-time.
 */

// Emulating RAMPS
#if ENABLED(SPINDLE_LASER_PWM) && !(SPINDLE_LASER_PWM_PIN == 4 || SPINDLE_LASER_PWM_PIN == 6 || SPINDLE_LASER_PWM_PIN == 11)
  #error "SPINDLE_LASER_PWM_PIN must use SERVO0, SERVO1 or SERVO3 connector"
#endif

#if ENABLED(FAST_PWM_FAN)
  #error "FAST_PWM_FAN is not yet implemented for this platform."
#endif

#if HAS_TMC_SW_SERIAL
  #error "TMC220x Software Serial is not supported on this platform."
#endif

{'repo_name': 'bigtreetech/BIGTREETECH-SKR-V1.3', 'stars': '568', 'repo_language': 'C++', 'file_name': 'index.html', 'mime_type': 'text/html', 'hash': 8204924445733861565, 'source_dataset': 'data'}


/* demo only */

html {
 position: relative;
 width: 100%;
 height: 100%;
 min-width: 980px; /* enough for two-column demo UI */
 -moz-osx-font-smoothing: grayscale;
 -webkit-font-smoothing: antialiased;
 /* http://files.christophzillgens.com/webkit-font-smoothing.html */
 /* font-smoothing: subpixel-antialiased; */
 /* general font niceness? */
 font-smoothing: antialiased;
 text-rendering: optimizeLegibility;
 background: #fff;
 color: #000;
 transition: background 0.2s ease-in-out;
}

body {
 font-family: helvetica, verdana, tahoma, arial, sans-serif;
 font-weight: 300;
 margin: 0px;
 padding: 0.5em;
 transition: color 0.2s ease-in-out;
 padding-bottom: 64px; /* room for the bottom bar UI player */
}

h1 {
 display: inline-block;
 font-family: "helvetica neue", helvetica, verdana, tahoma, arial, sans-serif;
 font-size: 2em;
 font-weight: 300;
 margin: 0px 0px 0.25em 0px;
 padding: 0px 0px 0.15em 0px;
 border-bottom: 1px dotted #ccc;
}

h1 a {
 font-size: 100%;
 text-decoration: none;
 color: #000;
}

h1 a:hover {
 color: #336699;
 text-decoration: underline;
}

h2 {
 margin: 0px;
 padding: 0px;
 font-weight: 300;
}

h3 {
 font-weight: 300;
 margin: 1em 0px 0.5em 0px;
 padding: 0px;
}

p {
 margin-top: 0.5em;
}

.demo-wrapper {
 position: relative;
 width: 100%;
 /* whitespace trickery */
 font-size: 0px;
}

.demo-left,
.demo-right {
 font-size: 16px;
 font-size: 1rem;
 position: relative;
 display: inline-block;
 width: 48%;
 vertical-align: top;
}

.demo-left {
 margin-right: 2%;
 border-right: 1px dotted transparent;
}

.demo-wrapper .demo-bd {
 padding-right: 1em;
}

.demo-right {
 left: -1px; /* sneaky */
 margin-left: -2%;
 border-left: 1px dotted transparent;
}

.demo-left,
.demo-right {
 border-color: #ccc;
}

.demo-right .demo-bd {
 padding-left: 1em;
 padding-right: 0.5em;
}

.about {
 color: #333;
 font-size: small;
 line-height: 1.5em;
 margin-bottom: 0.5em;
}

.about a {
 text-decoration: none;
}

.note {
 font-size: 0.5em;
 color: #333;
}

#size-field {
 vertical-align: middle;
}

#colors {
 margin-bottom: 0.5em;
}

#colors * {
 vertical-align: middle;
}

.sm2-bar-ui {
 /* demo silliness */
 transition: all 0.2s ease-in-out;
}

{'repo_name': 'scottschiller/SoundManager2', 'stars': '4565', 'repo_language': 'JavaScript', 'file_name': 'index.html', 'mime_type': 'text/html', 'hash': 6281663672748443112, 'source_dataset': 'data'}


; RUN: opt < %s -analyze -delinearize | FileCheck %s

; void foo(long n, long m, long o, long p, double A[n][m][o+p]) {
;
;   for (long i = 0; i < n; i++)
;     for (long j = 0; j < m; j++)
;       for (long k = 0; k < o; k++)
;         A[i+3][j-4][k+7] = 1.0;
; }

; AddRec: {{{(56 + (8 * (-4 + (3 * %m)) * (%o + %p)) + %A),+,(8 * (%o + %p) * %m)}<%for.cond4.preheader.lr.ph.us>,+,(8 * (%o + %p))}<%for.body6.lr.ph.us.us>,+,8}<%for.body6.us.us>
; CHECK: Base offset: %A
; CHECK: ArrayDecl[UnknownSize][%m][(%o + %p)] with elements of 8 bytes.
; CHECK: ArrayRef[{3,+,1}<nuw><%for.cond4.preheader.lr.ph.us>][{-4,+,1}<nw><%for.body6.lr.ph.us.us>][{7,+,1}<nw><%for.body6.us.us>]

define void @foo(i64 %n, i64 %m, i64 %o, i64 %p, double* nocapture %A) nounwind uwtable {
entry:
  %add = add nsw i64 %p, %o
  %cmp22 = icmp sgt i64 %n, 0
  br i1 %cmp22, label %for.cond1.preheader.lr.ph, label %for.end16

for.cond1.preheader.lr.ph:                        ; preds = %entry
  %cmp220 = icmp sgt i64 %m, 0
  %cmp518 = icmp sgt i64 %o, 0
  br i1 %cmp220, label %for.cond4.preheader.lr.ph.us, label %for.end16

for.inc14.us:                                     ; preds = %for.cond4.preheader.lr.ph.us, %for.inc11.us.us
  %inc15.us = add nsw i64 %i.023.us, 1
  %exitcond43 = icmp eq i64 %inc15.us, %n
  br i1 %exitcond43, label %for.end16, label %for.cond4.preheader.lr.ph.us

for.cond4.preheader.lr.ph.us:                     ; preds = %for.inc14.us, %for.cond1.preheader.lr.ph
  %i.023.us = phi i64 [ %inc15.us, %for.inc14.us ], [ 0, %for.cond1.preheader.lr.ph ]
  %add8.us = add nsw i64 %i.023.us, 3
  %0 = mul i64 %add8.us, %m
  %sub.us = add i64 %0, -4
  br i1 %cmp518, label %for.body6.lr.ph.us.us, label %for.inc14.us

for.inc11.us.us:                                  ; preds = %for.body6.us.us
  %inc12.us.us = add nsw i64 %j.021.us.us, 1
  %exitcond42 = icmp eq i64 %inc12.us.us, %m
  br i1 %exitcond42, label %for.inc14.us, label %for.body6.lr.ph.us.us

for.body6.lr.ph.us.us:                            ; preds = %for.cond4.preheader.lr.ph.us, %for.inc11.us.us
  %j.021.us.us = phi i64 [ %inc12.us.us, %for.inc11.us.us ], [ 0, %for.cond4.preheader.lr.ph.us ]
  %tmp.us.us = add i64 %sub.us, %j.021.us.us
  %tmp17.us.us = mul i64 %tmp.us.us, %add
  br label %for.body6.us.us

for.body6.us.us:                                  ; preds = %for.body6.us.us, %for.body6.lr.ph.us.us
  %k.019.us.us = phi i64 [ 0, %for.body6.lr.ph.us.us ], [ %inc.us.us, %for.body6.us.us ]
  %arrayidx.sum.us.us = add i64 %k.019.us.us, 7
  %arrayidx9.sum.us.us = add i64 %arrayidx.sum.us.us, %tmp17.us.us
  %arrayidx10.us.us = getelementptr inbounds double, double* %A, i64 %arrayidx9.sum.us.us
  store double 1.000000e+00, double* %arrayidx10.us.us, align 8
  %inc.us.us = add nsw i64 %k.019.us.us, 1
  %exitcond = icmp eq i64 %inc.us.us, %o
  br i1 %exitcond, label %for.inc11.us.us, label %for.body6.us.us

for.end16:                                        ; preds = %for.cond1.preheader.lr.ph, %for.inc14.us, %entry
  ret void
}

{'repo_name': 'ucb-bar/esp-llvm', 'stars': '106', 'repo_language': 'C++', 'file_name': 'float-intrinsics-double.ll', 'mime_type': 'text/plain', 'hash': -7401677887916827708, 'source_dataset': 'data'}


package org.apereo.cas.oidc.claims;

import org.apereo.cas.oidc.OidcConstants;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.List;

/**
 * This is {@link OidcPhoneScopeAttributeReleasePolicy}.
 *
 * @author Misagh Moayyed
 * @since 5.1.0
 */
public class OidcPhoneScopeAttributeReleasePolicy extends BaseOidcScopeAttributeReleasePolicy {
    /**
     * Claims allowed by this attribute release policy.
     */
    public static final List<String> ALLOWED_CLAIMS = List.of("phone_number", "phone_number_verified");

    private static final long serialVersionUID = 1532960981124784595L;

    public OidcPhoneScopeAttributeReleasePolicy() {
        super(OidcConstants.StandardScopes.PHONE.getScope());
        setAllowedAttributes(ALLOWED_CLAIMS);
    }

    @JsonIgnore
    @Override
    public List<String> getAllowedAttributes() {
        return super.getAllowedAttributes();
    }
}

{'repo_name': 'apereo/cas', 'stars': '7776', 'repo_language': 'Java', 'file_name': 'CacheStatisticsTests.java', 'mime_type': 'text/x-java', 'hash': -6314712591886473707, 'source_dataset': 'data'}


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Flot Examples</title>
    <link href="layout.css" rel="stylesheet" type="text/css">

Flot Examples

With the navigate plugin it is easy to add panning and zooming.
    Drag to pan, double click to zoom (or use the mouse scrollwheel).

The plugin fires events (useful for synchronizing several
    plots) and adds a couple of public methods so you can easily build
    a little user interface around it, like the little buttons at the
    top right in the plot.

{'repo_name': 'insionng/zenpress', 'stars': '466', 'repo_language': 'Go', 'file_name': 'nestable.js', 'mime_type': 'text/plain', 'hash': 3964680628279526632, 'source_dataset': 'data'}


//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace csharp_wpf.Properties
{

    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
    {

        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

        public static Settings Default
        {
            get {
                return defaultInstance;
            }
        }
    }
}

{'repo_name': 'AmmyUI/AmmyUI', 'stars': '347', 'repo_language': 'C#', 'file_name': 'ammy-wpf.nuspec', 'mime_type': 'text/xml', 'hash': -4463224865517098596, 'source_dataset': 'data'}


/* @ngInject */
function title(dispatchers, pageTitlesModel, $state) {
    const bindTitle = (el, title) => _rAF(() => el.text(title));

    return {
        restrict: 'E',
        scope: {},
        link(scope, el) {
            const { on, unsubscribe } = dispatchers();

            on('$stateChangeSuccess', (e, state) => {
                bindTitle(el, pageTitlesModel.find(state));
            });

            // Update the counter
            on('elements', (e, { type }) => {
                type === 'refresh' &&
                    !$state.is('secured.label.element') &&
                    bindTitle(el, pageTitlesModel.find($state.current));
            });

            scope.$on('$destroy', unsubscribe);
        }
    };
}
export default title;

{'repo_name': 'ProtonMail/WebClient', 'stars': '2674', 'repo_language': 'JavaScript', 'file_name': 'index.js', 'mime_type': 'text/plain', 'hash': -7740212025992396939, 'source_dataset': 'data'}


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

import com.google.gwt.dev.jjs.SourceOrigin;
import com.google.gwt.dev.jjs.ast.Context;
import com.google.gwt.dev.jjs.ast.HasName;
import com.google.gwt.dev.jjs.ast.JArrayRef;
import com.google.gwt.dev.jjs.ast.JArrayType;
import com.google.gwt.dev.jjs.ast.JBinaryOperation;
import com.google.gwt.dev.jjs.ast.JCastMap;
import com.google.gwt.dev.jjs.ast.JCastOperation;
import com.google.gwt.dev.jjs.ast.JClassType;
import com.google.gwt.dev.jjs.ast.JExpression;
import com.google.gwt.dev.jjs.ast.JInstanceOf;
import com.google.gwt.dev.jjs.ast.JProgram;
import com.google.gwt.dev.jjs.ast.JReferenceType;
import com.google.gwt.dev.jjs.ast.JType;
import com.google.gwt.dev.jjs.ast.JTypeOracle;
import com.google.gwt.dev.jjs.ast.JVisitor;
import com.google.gwt.thirdparty.guava.common.collect.HashMultimap;
import com.google.gwt.thirdparty.guava.common.collect.Lists;
import com.google.gwt.thirdparty.guava.common.collect.Maps;
import com.google.gwt.thirdparty.guava.common.collect.Multimap;
import com.google.gwt.thirdparty.guava.common.collect.Sets;

import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * Builds minimal cast maps to cover cast and instanceof operations. Depends
 * on {@link CatchBlockNormalizer}, {@link CompoundAssignmentNormalizer},
 * {@link Devirtualizer}, and {@link LongCastNormalizer} having already run.
 * <p>
 * May or may not include trivial casts depending on configuration.
 */
public class ComputeCastabilityInformation {
  private class AssignTypeCastabilityVisitor extends JVisitor {

    private final Set<JReferenceType> alreadyRan = Sets.newHashSet();
    private final Map<JReferenceType, JCastMap> castableTypesMap = Maps.newIdentityHashMap();
    private final List<JArrayType> instantiatedArrayTypes = Lists.newArrayList();
    private final Multimap<JReferenceType, JReferenceType> castSourceTypesPerCastTargetType =
        HashMultimap.create();

    {
      for (JArrayType arrayType : program.getAllArrayTypes()) {
        if (typeOracle.isInstantiatedType(arrayType)) {
          instantiatedArrayTypes.add(arrayType);
        }
      }

      // Force entries for Object and String.
      recordCastInternal(program.getTypeJavaLangObject(), program.getTypeJavaLangObject());
      recordCastInternal(program.getTypeJavaLangString(), program.getTypeJavaLangObject());

      // Force entries for interfaces implemented by  String
      recordCastInternal(program.getIndexedType("Serializable"), program.getTypeJavaLangObject());
      recordCastInternal(program.getIndexedType("CharSequence"), program.getTypeJavaLangObject());
      recordCastInternal(program.getIndexedType("Comparable"), program.getTypeJavaLangObject());
    }

    public void computeTypeCastabilityMaps() {
      // do String first (which will pull in Object also, it's superclass).
      computeCastMap(program.getTypeJavaLangString());
      assert (castableTypesMap.size() == 2);

      /*
       * Compute the list of classes than can successfully satisfy cast
       * requests, along with the set of types they can be successfully cast to.
       * Do it in super type order.
       */
      for (JReferenceType type : program.getDeclaredTypes()) {
        if (type instanceof JClassType) {
          computeCastMap(type);
        }
      }

      for (JArrayType type : instantiatedArrayTypes) {
        computeCastMap(type);
      }

      // pass our info to JProgram
      program.initTypeInfo(castableTypesMap);
    }

    /*
     * If this expression could possibly generate an ArrayStoreException, we
     * must record a query on the element type being assigned to.
     */
    @Override
    public void endVisit(JBinaryOperation x, Context ctx) {
      if (!x.getOp().isAssignment() || !(x.getLhs() instanceof JArrayRef)) {
        return;
      }

      // first, calculate the transitive closure of all possible runtime types
      // the lhs could be
      JArrayRef lhsArrayRef = (JArrayRef) x.getLhs();
      JType elementType = lhsArrayRef.getType();
      if (elementType.isNullType()) {
        // will generate a null pointer exception instead
        return;
      }

      // primitives are statically correct
      if (!(elementType instanceof JReferenceType)) {
        return;
      }

      // This array reference always refers to an array of the declared class, not a subclass.
      if (!lhsArrayRef.getInstance().getType().canBeSubclass()) {
        return;
      }

      /*
       * For every instantiated array type that could -in theory- be the
       * runtime type of the lhs, we must record a cast from the rhs to the
       * prospective element type of the lhs.
       */
      JType rhsType = x.getRhs().getType();
      assert (rhsType instanceof JReferenceType);

      JArrayType lhsArrayType = lhsArrayRef.getArrayType();
      for (JArrayType arrayType : instantiatedArrayTypes) {
        if (!typeOracle.castFailsTrivially(arrayType, lhsArrayType)) {
          JType itElementType = arrayType.getElementType();
          if (itElementType instanceof JReferenceType) {
            recordCast(itElementType, x.getRhs());
          }
        }
      }
    }

    @Override
    public void endVisit(JCastOperation x, Context ctx) {
      if (x.getCastType().isNullType()) {
        return;
      }
      recordCast(x.getCastType(), x.getExpr());
    }

    @Override
    public void endVisit(JInstanceOf x, Context ctx) {
      assert (!x.getTestType().isNullType());
      recordCast(x.getTestType(), x.getExpr());
    }

    /**
     * Returns true if the cast *might* succeed at runtime considering the semantics of JSO casts.
     */
    private boolean castSucceedsTriviallyJsoSemantics(
        JReferenceType fromType, JReferenceType toType) {

      fromType = fromType.getUnderlyingType();
      toType = toType.getUnderlyingType();

      if (typeOracle.castSucceedsTrivially(fromType, toType)) {
        return true;
      }

      // Casting to a native type might succeed (even in cases where the same cast would never
      // succeed in the Java type system, due to JSOs and native JsType sematics).
      if (toType.isJsNative()) {
        return true;
      }

      if (fromType instanceof JArrayType && toType instanceof JArrayType) {
        JArrayType fromArrayType = (JArrayType) fromType;
        JArrayType toArrayType = (JArrayType) toType;
        return (fromArrayType.getLeafType().isJsoType() &&
            toArrayType.getLeafType().isJsoType());
      }

      return fromType.isJsoType() && toType.isJsoType();
    }

    /**
     * Create the mapping from a class to the types it can be cast to.
     */
    private void computeCastMap(JReferenceType type) {
      if (type == null || alreadyRan.contains(type)) {
        return;
      }
      assert (type == type.getUnderlyingType());

      alreadyRan.add(type);

      // Visit super type.
      if (type instanceof JClassType) {
        computeCastMap(((JClassType) type).getSuperClass());
      }

      if (!typeOracle.isInstantiatedType(type) ||
          type.isJsoType() || type.isJsNative()) {
        return;
      }

      // Find all possible query types which I can satisfy
      Set<JReferenceType> castableTypes = Sets.newTreeSet(HasName.BY_NAME_COMPARATOR);

      /*
       * NOTE: non-deterministic iteration over HashSet and HashMap. Okay
       * because we're sorting the results.
       */
      for (JReferenceType castTargetType : castSourceTypesPerCastTargetType.keySet()) {
        if (!castSucceedsTriviallyJsoSemantics(type, castTargetType)) {
          // Cannot cast type to castTargetType, hence no entry in the cast map.
          continue;
        }

        Collection<JReferenceType> castSourceTypes =
            castSourceTypesPerCastTargetType.get(castTargetType);
        /**
         * Handles JSO[] -> JSO[] case now that canCastTrivially doesn't deal
         * with JSO cross-casts anymore.
         */
        for (JReferenceType castSourceType : castSourceTypes) {
          if (castSucceedsTriviallyJsoSemantics(type, castSourceType)) {
            boolean isTrivialCast = castTargetType == program.getTypeJavaLangObject()
                || castTargetType == program.getJavaScriptObject();
            if (recordTrivialCasts || !isTrivialCast) {
              castableTypes.add(castTargetType);
            }
            break;
          }
        }
      }

      /*
       * Don't add an entry for empty answer sets, except for Object and String
       * which require entries.
       */
      if (castableTypes.isEmpty() && type != program.getTypeJavaLangObject()
          && type != program.getTypeJavaLangString()) {
        return;
      }

      // add an entry for me
      castableTypesMap.put(type, new JCastMap(SourceOrigin.UNKNOWN, program.getTypeJavaLangObject(),
          Collections.unmodifiableSet(castableTypes)));
    }

    private void recordCast(JType targetType, JExpression rhs) {
      if (!(targetType instanceof JReferenceType) || targetType.isJsNative()) {
        return;
      }
      targetType = targetType.getUnderlyingType();
      assert rhs.getType() instanceof JReferenceType;

      JReferenceType rhsType = (JReferenceType) rhs.getType().getUnderlyingType();
      if (!recordTrivialCasts
          && typeOracle.castSucceedsTrivially(rhsType, (JReferenceType) targetType)) {
        // don't record a type for trivial casts that won't generate code
        return;
      }

      if (!recordTrivialCasts && targetType.isJsoType()) {
        // If the target type is a JavaScriptObject, don't record an id.
        return;
      }

      recordCastInternal((JReferenceType) targetType, rhsType);
    }

    private void recordCastInternal(JReferenceType toType, JReferenceType rhsType) {
      toType = toType.getUnderlyingType();
      rhsType = rhsType.getUnderlyingType();

      if (toType instanceof JArrayType) {
        // Arrays of any subclass of JavaScriptObject are considered arrays of JavaScriptObject
        // for casting and instanceof purposes.
        toType =  (JReferenceType) program.normalizeJsoType(toType);
      }

      castSourceTypesPerCastTargetType.put(toType, rhsType);
    }
  }

  public static void exec(JProgram program, boolean recordTrivialCasts) {
    new ComputeCastabilityInformation(program, recordTrivialCasts).execImpl();
  }

  public static void exec(JProgram program) {
    new ComputeCastabilityInformation(program, false).execImpl();
  }

  private final boolean recordTrivialCasts;

  private final JProgram program;

  private final JTypeOracle typeOracle;

  private ComputeCastabilityInformation(JProgram program, boolean recordTrivialCasts) {
    this.program = program;
    this.typeOracle = program.typeOracle;
    this.recordTrivialCasts = recordTrivialCasts;
  }

  private void execImpl() {
    AssignTypeCastabilityVisitor assigner = new AssignTypeCastabilityVisitor();
    assigner.accept(program);
    assigner.computeTypeCastabilityMaps();
  }
}

{'repo_name': 'gwtproject/gwt', 'stars': '1219', 'repo_language': 'Java', 'file_name': 'package-list', 'mime_type': 'text/plain', 'hash': 7106619742042720750, 'source_dataset': 'data'}


package org.tinylcy.examples;

import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.ZooKeeper;

import java.util.concurrent.CountDownLatch;

/**
 * Created by chenyangli.
 */
public class SessionExample implements Watcher {

    private static CountDownLatch connectedSignal = new CountDownLatch(1);

    public static void main(String[] args) throws Exception {
        ZooKeeper zk = new ZooKeeper("127.0.0.1:2181", 5000, new SessionExample());
        connectedSignal.await();
        System.out.println(zk.getState());
    }

    public void process(WatchedEvent watchedEvent) {
        if (watchedEvent.getState() == Event.KeeperState.SyncConnected) {
            connectedSignal.countDown();
        }
    }
}

{'repo_name': 'tinylcy/buddha', 'stars': '140', 'repo_language': 'Java', 'file_name': 'GetChildrenExample.java', 'mime_type': 'text/x-c', 'hash': 57401434134770177, 'source_dataset': 'data'}


<!DOCTYPE html>

	<TITLE> ZTREE DEMO - multiTree</TITLE>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" href="../../../css/demo.css" type="text/css">
	<link rel="stylesheet" href="../../../css/zTreeStyle/zTreeStyle.css" type="text/css">

多棵树之间 的 数据交互

[ 文件路径: exedit/multiTree.html ]

1、setting 配置信息说明

zTree 对于多棵树之间拖拽的操作非常简单，只需要创建两棵可拖拽的树即可，同时可根据 各种事件回调函数 以及 zTree 的方法配合实现较复杂的操作规则，这里只是基本演示。

关于配置信息请参考拖拽、编辑等 Demo 的详细说明

2、treeNode 节点数据说明

对 节点数据 没有特殊要求，用户可以根据自己的需求添加自定义属性

{'repo_name': 'white-cat/jeeweb-mybatis', 'stars': '239', 'repo_language': 'Java', 'file_name': 'jeeweb-oracle-v1.01.sql', 'mime_type': 'text/plain', 'hash': -5678673346671375835, 'source_dataset': 'data'}