// Copyright 2014 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 <queue>

#include "ash/common/accelerators/accelerator_controller.h"
#include "ash/common/accelerators/accelerator_table.h"
#include "ash/common/accessibility_types.h"
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/system/tray/system_tray.h"
#include "ash/common/wm_shell.h"
#include "ash/shell.h"
#include "base/command_line.h"
#include "base/macros.h"
#include "base/strings/pattern.h"
#include "base/strings/string_util.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
#include "chrome/browser/chromeos/accessibility/speech_monitor.h"
#include "chrome/browser/chromeos/login/login_manager_test.h"
#include "chrome/browser/chromeos/login/ui/login_display_host.h"
#include "chrome/browser/chromeos/login/ui/webui_login_view.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/extensions/api/braille_display_private/stub_braille_controller.h"
#include "chrome/browser/speech/tts_controller.h"
#include "chrome/browser/speech/tts_platform.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/interactive_test_utils.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/ui_test_utils.h"
#include "chromeos/chromeos_switches.h"
#include "components/signin/core/account_id/account_id.h"
#include "components/user_manager/user_names.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/url_constants.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_utils.h"
#include "extensions/browser/extension_host.h"
#include "extensions/browser/process_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/app_list/app_list_switches.h"
#include "ui/base/test/ui_controls.h"
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/views/widget/widget.h"

using extensions::api::braille_display_private::StubBrailleController;

namespace chromeos {

//
// Spoken feedback tests only in a logged in user's window.
//

class LoggedInSpokenFeedbackTest : public InProcessBrowserTest {
 public:
  LoggedInSpokenFeedbackTest()
      : animation_mode_(ui::ScopedAnimationDurationScaleMode::ZERO_DURATION) {}
  ~LoggedInSpokenFeedbackTest() override {}

  void SetUpInProcessBrowserTestFixture() override {
    AccessibilityManager::SetBrailleControllerForTest(&braille_controller_);
  }

  void TearDownOnMainThread() override {
    AccessibilityManager::SetBrailleControllerForTest(nullptr);
  }

  void SendKeyPress(ui::KeyboardCode key) {
    ASSERT_NO_FATAL_FAILURE(ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
        nullptr, key, false, false, false, false)));
  }

  void SendKeyPressWithControl(ui::KeyboardCode key) {
    ASSERT_NO_FATAL_FAILURE(ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
        nullptr, key, true, false, false, false)));
  }

  void SendKeyPressWithSearchAndShift(ui::KeyboardCode key) {
    ASSERT_NO_FATAL_FAILURE(ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
        nullptr, key, false, true, false, true)));
  }

  void SendKeyPressWithSearch(ui::KeyboardCode key) {
    ASSERT_NO_FATAL_FAILURE(ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
        nullptr, key, false, false, false, true)));
  }

  void RunJavaScriptInChromeVoxBackgroundPage(const std::string& script) {
    extensions::ExtensionHost* host =
        extensions::ProcessManager::Get(browser()->profile())
            ->GetBackgroundHostForExtension(
                extension_misc::kChromeVoxExtensionId);
    CHECK(content::ExecuteScript(host->host_contents(), script));
  }

  void SimulateTouchScreenInChromeVox() {
    // ChromeVox looks at whether 'ontouchstart' exists to know whether
    // or not it should respond to hover events. Fake it so that touch
    // exploration events get spoken.
    RunJavaScriptInChromeVoxBackgroundPage(
        "window.ontouchstart = function() {};");
  }

  bool PerformAcceleratorAction(ash::AcceleratorAction action) {
    ash::AcceleratorController* controller =
        ash::WmShell::Get()->accelerator_controller();
    return controller->PerformActionIfEnabled(action);
  }

  void DisableEarcons() {
    // Playing earcons from within a test is not only annoying if you're
    // running the test locally, but seems to cause crashes
    // (http://crbug.com/396507). Work around this by just telling
    // ChromeVox to not ever play earcons (prerecorded sound effects).
    RunJavaScriptInChromeVoxBackgroundPage(
        "cvox.ChromeVox.earcons.playEarcon = function() {};");
  }

  void EnableChromeVox() {
    // Test setup.
    // Enable ChromeVox, skip welcome message/notification, and disable earcons.
    ASSERT_FALSE(AccessibilityManager::Get()->IsSpokenFeedbackEnabled());

    AccessibilityManager::Get()->EnableSpokenFeedback(
        true, ash::A11Y_NOTIFICATION_NONE);
    EXPECT_TRUE(speech_monitor_.SkipChromeVoxEnabledMessage());
    DisableEarcons();
  }

  void PressRepeatedlyUntilUtterance(ui::KeyboardCode key,
                                     const std::string& expected_utterance) {
    // This helper function is needed when you want to poll for something
    // that happens asynchronously. Keep pressing |key|, until
    // the speech feedback that follows is |expected_utterance|.
    // Note that this doesn't work if pressing that key doesn't speak anything
    // at all before the asynchronous event occurred.
    while (true) {
      SendKeyPress(key);
      const std::string& utterance = speech_monitor_.GetNextUtterance();
      if (utterance == expected_utterance)
        break;
    }
  }

  SpeechMonitor speech_monitor_;

 private:
  StubBrailleController braille_controller_;
  ui::ScopedAnimationDurationScaleMode animation_mode_;

  DISALLOW_COPY_AND_ASSIGN(LoggedInSpokenFeedbackTest);
};

// This test is very flakey with ChromeVox Next since we generate a lot more
// utterances for text fields.
// TODO(dtseng): Fix properly.
IN_PROC_BROWSER_TEST_F(LoggedInSpokenFeedbackTest, DISABLED_AddBookmark) {
  EnableChromeVox();
  chrome::ExecuteCommand(browser(), IDC_SHOW_BOOKMARK_BAR);

  // Create a bookmark with title "foo".
  chrome::ExecuteCommand(browser(), IDC_BOOKMARK_PAGE);
  EXPECT_EQ("Bookmark added! dialog Bookmark name about:blank Edit text",
            speech_monitor_.GetNextUtterance());
  EXPECT_EQ("about:blank", speech_monitor_.GetNextUtterance());

  SendKeyPress(ui::VKEY_F);
  EXPECT_EQ("f", speech_monitor_.GetNextUtterance());
  SendKeyPress(ui::VKEY_O);
  EXPECT_EQ("o", speech_monitor_.GetNextUtterance());
  SendKeyPress(ui::VKEY_O);
  EXPECT_EQ("o", speech_monitor_.GetNextUtterance());

  SendKeyPress(ui::VKEY_TAB);
  EXPECT_EQ("Bookmark folder combo Box Bookmarks bar",
            speech_monitor_.GetNextUtterance());

  SendKeyPress(ui::VKEY_RETURN);

  EXPECT_TRUE(
      base::MatchPattern(speech_monitor_.GetNextUtterance(), "*oolbar*"));
  // Wait for active window change to be announced to avoid interference from
  // that below.
  while (speech_monitor_.GetNextUtterance() != "window about blank tab") {
    // Do nothing.
  }

  // Focus bookmarks bar and listen for "foo".
  chrome::ExecuteCommand(browser(), IDC_FOCUS_BOOKMARKS);
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    VLOG(0) << "Got utterance: " << utterance;
    if (utterance == "Bookmarks,")
      break;
  }
  EXPECT_EQ("foo,", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("button", speech_monitor_.GetNextUtterance());
}

IN_PROC_BROWSER_TEST_F(LoggedInSpokenFeedbackTest,
                       DISABLED_NavigateNotificationCenter) {
  EnableChromeVox();

  EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_MESSAGE_CENTER_BUBBLE));

  // Tab to request the initial focus.
  SendKeyPress(ui::VKEY_TAB);

  // Wait for it to say "Notification Center, window".
  while ("Notification Center, window" != speech_monitor_.GetNextUtterance()) {
  }

  // Tab until we get to the Do Not Disturb button.
  SendKeyPress(ui::VKEY_TAB);
  do {
    std::string ut = speech_monitor_.GetNextUtterance();

    if (ut == "Do not disturb")
      break;
    else if (ut == "Button")
      SendKeyPress(ui::VKEY_TAB);
  } while (true);
  EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("Not pressed", speech_monitor_.GetNextUtterance());

  SendKeyPress(ui::VKEY_SPACE);
  EXPECT_EQ("Do not disturb", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("Pressed", speech_monitor_.GetNextUtterance());

  SendKeyPress(ui::VKEY_SPACE);
  EXPECT_EQ("Do not disturb", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("Not pressed", speech_monitor_.GetNextUtterance());
}

//
// Spoken feedback tests in both a logged in browser window and guest mode.
//

enum SpokenFeedbackTestVariant {
  kTestAsNormalUser,
  kTestAsGuestUser
};

class SpokenFeedbackTest
    : public LoggedInSpokenFeedbackTest,
      public ::testing::WithParamInterface<SpokenFeedbackTestVariant> {
 protected:
  SpokenFeedbackTest() {}
  virtual ~SpokenFeedbackTest() {}

  void SetUpCommandLine(base::CommandLine* command_line) override {
    if (GetParam() == kTestAsGuestUser) {
      command_line->AppendSwitch(chromeos::switches::kGuestSession);
      command_line->AppendSwitch(::switches::kIncognito);
      command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile,
                                      "user");
      command_line->AppendSwitchASCII(
          switches::kLoginUser, user_manager::GuestAccountId().GetUserEmail());
    }
  }
};

INSTANTIATE_TEST_CASE_P(
    TestAsNormalAndGuestUser,
    SpokenFeedbackTest,
    ::testing::Values(kTestAsNormalUser,
                      kTestAsGuestUser));

// TODO(tommi): Flakily hitting HasOneRef DCHECK in
// AudioOutputResampler::Shutdown, see crbug.com/630031.
IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, DISABLED_EnableSpokenFeedback) {
  EnableChromeVox();
}

IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, FocusToolbar) {
  EnableChromeVox();
  chrome::ExecuteCommand(browser(), IDC_FOCUS_TOOLBAR);
  EXPECT_EQ("Reload", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
}

IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, DISABLED_TypeInOmnibox) {
  EnableChromeVox();

  // Location bar has focus by default so just start typing.
  SendKeyPress(ui::VKEY_X);
  EXPECT_EQ("x", speech_monitor_.GetNextUtterance());

  SendKeyPress(ui::VKEY_Y);
  EXPECT_EQ("y", speech_monitor_.GetNextUtterance());

  SendKeyPress(ui::VKEY_Z);
  EXPECT_EQ("z", speech_monitor_.GetNextUtterance());

  SendKeyPress(ui::VKEY_BACK);
  EXPECT_EQ("z", speech_monitor_.GetNextUtterance());
}

IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, FocusShelf) {
  EnableChromeVox();

  EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF));
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (base::MatchPattern(utterance, "Launcher"))
      break;
  }
  EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());

  EXPECT_EQ("Shelf", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("Tool bar", speech_monitor_.GetNextUtterance());
  EXPECT_EQ(", window", speech_monitor_.GetNextUtterance());

  SendKeyPress(ui::VKEY_TAB);
  EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "*"));
  EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "Button"));
}

IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, NavigateAppLauncher) {
  EnableChromeVox();

  EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF));

  // Wait for it to say "Launcher", "Button", "Shelf", "Tool bar".
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (base::MatchPattern(utterance, "Launcher"))
      break;
  }
  EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("Shelf", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("Tool bar", speech_monitor_.GetNextUtterance());

  // Click on the launcher, it brings up the app list UI.
  SendKeyPress(ui::VKEY_SPACE);
  while ("Search or type URL" != speech_monitor_.GetNextUtterance()) {
  }
  while ("Edit text" != speech_monitor_.GetNextUtterance()) {
  }

  // Close it and open it again.
  SendKeyPress(ui::VKEY_ESCAPE);
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (base::MatchPattern(utterance, "*window*"))
      break;
  }

  EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF));
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (base::MatchPattern(utterance, "Button"))
      break;
  }
  SendKeyPress(ui::VKEY_SPACE);

  // Now type a space into the text field and wait until we hear "space".
  // This makes the test more robust as it allows us to skip over other
  // speech along the way.
  SendKeyPress(ui::VKEY_SPACE);
  while (true) {
    if ("space" == speech_monitor_.GetNextUtterance())
      break;
  }

  // Now press the down arrow and we should be focused on an app button
  // in a dialog.
  SendKeyPress(ui::VKEY_DOWN);
  while ("Button" != speech_monitor_.GetNextUtterance()) {
  }
}

IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OpenStatusTray) {
  EnableChromeVox();

  EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_SYSTEM_TRAY_BUBBLE));
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (base::MatchPattern(utterance, "Status tray*"))
      break;
  }
  EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "time *"));
  EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
                                 "Battery is*full.,"));
  EXPECT_EQ("window", speech_monitor_.GetNextUtterance());
}

IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, NavigateSystemTray) {
  EnableChromeVox();

  EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_SYSTEM_TRAY_BUBBLE));
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (base::MatchPattern(utterance, "Status tray,"))
      break;
  }
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (base::MatchPattern(utterance, "window"))
      break;
  }

  SendKeyPress(ui::VKEY_TAB);
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (base::MatchPattern(utterance, "Button"))
      break;
  }

  // Next element.
  SendKeyPressWithSearch(ui::VKEY_RIGHT);
  EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "*"));
  EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "Button"));

  // Next button.
  SendKeyPressWithSearch(ui::VKEY_B);
  EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "*"));
  EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "Button"));

  // Navigate to Bluetooth sub-menu and open it.
  while (true) {
    SendKeyPress(ui::VKEY_TAB);
    std::string content = speech_monitor_.GetNextUtterance();
    std::string role = speech_monitor_.GetNextUtterance();
    if (base::MatchPattern(content, "*Bluetooth*") &&
        base::MatchPattern(role, "Button"))
      break;
  }
  SendKeyPress(ui::VKEY_RETURN);

  if (!ash::MaterialDesignController::IsSystemTrayMenuMaterial()) {
    while (true) {
      if (base::MatchPattern(speech_monitor_.GetNextUtterance(), "*Bluetooth"))
        break;
    }
  }

  // Navigate to return to previous menu button and press it.
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (base::MatchPattern(utterance, "Previous menu"))
      break;
    SendKeyPress(ui::VKEY_TAB);
  }
  SendKeyPress(ui::VKEY_RETURN);

  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (ash::MaterialDesignController::IsSystemTrayMenuMaterial()) {
      if (base::MatchPattern(utterance, "Bluetooth*"))
        break;
    } else {
      if (base::MatchPattern(utterance, "*Bluetooth"))
        break;
    }
  }
}

// See http://crbug.com/443608
IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, DISABLED_ScreenBrightness) {
  EnableChromeVox();

  EXPECT_TRUE(PerformAcceleratorAction(ash::BRIGHTNESS_UP));
  EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
                                 "Brightness * percent"));

  EXPECT_TRUE(PerformAcceleratorAction(ash::BRIGHTNESS_DOWN));
  EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
                                 "Brightness * percent"));
}

IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, VolumeSlider) {
  EnableChromeVox();

  // Volume slider does not fire valueChanged event on first key press because
  // it has no widget.
  EXPECT_TRUE(PerformAcceleratorAction(ash::VOLUME_UP));
  EXPECT_TRUE(PerformAcceleratorAction(ash::VOLUME_UP));
  EXPECT_TRUE(
      base::MatchPattern(speech_monitor_.GetNextUtterance(), "* percent*"));
}

IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OverviewMode) {
  EnableChromeVox();

  EXPECT_TRUE(PerformAcceleratorAction(ash::TOGGLE_OVERVIEW));
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (base::MatchPattern(utterance, "Edit text"))
      break;
  }

  EXPECT_EQ("Entered window overview mode", speech_monitor_.GetNextUtterance());

  SendKeyPress(ui::VKEY_TAB);
  // On Chrome OS accessibility title for tabbed browser windows contains app
  // name ("Chrome" or "Chromium") in overview mode.
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (base::MatchPattern(utterance, "Chromium - about:blank"))
      break;
  }
  EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
}

#if defined(MEMORY_SANITIZER)
// Fails under MemorySanitizer: http://crbug.com/472125
#define MAYBE_ChromeVoxShiftSearch DISABLED_ChromeVoxShiftSearch
#else
#define MAYBE_ChromeVoxShiftSearch ChromeVoxShiftSearch
#endif
IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, MAYBE_ChromeVoxShiftSearch) {
  EnableChromeVox();

  ui_test_utils::NavigateToURL(
      browser(),
      GURL("data:text/html;charset=utf-8,<button autofocus>Click me</button>"));
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (utterance == "Click me")
      break;
  }
  EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());

  // Press Search+/ to enter ChromeVox's "find in page".
  SendKeyPressWithSearch(ui::VKEY_OEM_2);
  EXPECT_EQ(", window", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("webView", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("Find in page.", speech_monitor_.GetNextUtterance());
}

#if defined(MEMORY_SANITIZER)
// Fails under MemorySanitizer: http://crbug.com/472125
#define MAYBE_ChromeVoxNavigateAndSelect DISABLED_ChromeVoxNavigateAndSelect
#else
#define MAYBE_ChromeVoxNavigateAndSelect ChromeVoxNavigateAndSelect
#endif
IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, MAYBE_ChromeVoxNavigateAndSelect) {
  EnableChromeVox();

  ui_test_utils::NavigateToURL(browser(),
                               GURL("data:text/html;charset=utf-8,"
                                    "
Title
"
                                    "<button autofocus>Click me</button>"));
  while (true) {
    std::string utterance = speech_monitor_.GetNextUtterance();
    if (utterance == "Click me")
      break;
  }
  EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());

  // Press Search+Left to navigate to the previous item.
  SendKeyPressWithSearch(ui::VKEY_LEFT);
  EXPECT_EQ("Title", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("Heading 1", speech_monitor_.GetNextUtterance());

  // Press Search+S to select the text.
  SendKeyPressWithSearch(ui::VKEY_S);
  EXPECT_EQ("Title", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("selected", speech_monitor_.GetNextUtterance());

  // Press again to end the selection.
  SendKeyPressWithSearch(ui::VKEY_S);
  EXPECT_EQ("End selection", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("Title", speech_monitor_.GetNextUtterance());
}

IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, DISABLED_ChromeVoxNextStickyMode) {
  EnableChromeVox();

  ui_test_utils::NavigateToURL(
      browser(),
      GURL("data:text/html;charset=utf-8,<button autofocus>Click me</button>"));
  while ("Button" != speech_monitor_.GetNextUtterance()) {
  }

  // Press the sticky-key sequence: Search Search.
  SendKeyPress(ui::VKEY_LWIN);

  // Sticky key has a minimum 100 ms check to prevent key repeat from toggling
  // it.
  content::BrowserThread::PostDelayedTask(
      content::BrowserThread::UI, FROM_HERE,
      base::Bind(&LoggedInSpokenFeedbackTest::SendKeyPress,
                 base::Unretained(this), ui::VKEY_LWIN),
      base::TimeDelta::FromMilliseconds(200));

  EXPECT_EQ("Sticky mode enabled", speech_monitor_.GetNextUtterance());

  SendKeyPress(ui::VKEY_H);
  while ("No next heading." != speech_monitor_.GetNextUtterance()) {
  }

  SendKeyPress(ui::VKEY_LWIN);

  // Sticky key has a minimum 100 ms check to prevent key repeat from toggling
  // it.
  content::BrowserThread::PostDelayedTask(
      content::BrowserThread::UI, FROM_HERE,
      base::Bind(&LoggedInSpokenFeedbackTest::SendKeyPress,
                 base::Unretained(this), ui::VKEY_LWIN),
      base::TimeDelta::FromMilliseconds(200));

  while ("Sticky mode disabled" != speech_monitor_.GetNextUtterance()) {
  }
}

IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, TouchExploreStatusTray) {
  EnableChromeVox();
  SimulateTouchScreenInChromeVox();

  // Send an accessibility hover event on the system tray, which is
  // what we get when you tap it on a touch screen when ChromeVox is on.
  ash::SystemTray* tray = ash::Shell::GetInstance()->GetPrimarySystemTray();
  tray->NotifyAccessibilityEvent(ui::AX_EVENT_HOVER, true);

  EXPECT_EQ("Status tray,", speech_monitor_.GetNextUtterance());
  EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "time*,"));
  EXPECT_TRUE(
      base::MatchPattern(speech_monitor_.GetNextUtterance(), "Battery*"));
  EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
}

IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, ChromeVoxNextTabRecovery) {
  EnableChromeVox();

  ui_test_utils::NavigateToURL(
      browser(), GURL("data:text/html;charset=utf-8,"
                      "<button id='b1' autofocus>11</button>"
                      "<button>22</button>"
                      "<button>33</button>"
                      "
Middle
"
                      "<button>44</button>"
                      "<button>55</button>"
                      "

"
                      ""));
  while ("Button" != speech_monitor_.GetNextUtterance()) {
  }

  // Press Search+H to go to the next heading
  SendKeyPressWithSearch(ui::VKEY_H);
  while ("Middle" != speech_monitor_.GetNextUtterance()) {
  }

  // To ensure that the setSequentialFocusNavigationStartingPoint has
  // executed before pressing Tab, the page has an event handler waiting
  // for the 'blur' event on the button, and when it loses focus it
  // triggers a live region announcement that we wait for, here.
  while ("button lost focus" != speech_monitor_.GetNextUtterance()) {
  }

  // Now we know that focus has left the button, so the sequential focus
  // navigation starting point must be on the heading. Press Tab and
  // ensure that we land on the first link past the heading.
  SendKeyPress(ui::VKEY_TAB);
  while ("44" != speech_monitor_.GetNextUtterance()) {
  }
}

//
// Spoken feedback tests that run only in guest mode.
//

class GuestSpokenFeedbackTest : public LoggedInSpokenFeedbackTest {
 protected:
  GuestSpokenFeedbackTest() {}
  ~GuestSpokenFeedbackTest() override {}

  void SetUpCommandLine(base::CommandLine* command_line) override {
    command_line->AppendSwitch(chromeos::switches::kGuestSession);
    command_line->AppendSwitch(::switches::kIncognito);
    command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user");
    command_line->AppendSwitchASCII(
        switches::kLoginUser, user_manager::GuestAccountId().GetUserEmail());
  }

 private:
  DISALLOW_COPY_AND_ASSIGN(GuestSpokenFeedbackTest);
};

IN_PROC_BROWSER_TEST_F(GuestSpokenFeedbackTest, FocusToolbar) {
  EnableChromeVox();

  chrome::ExecuteCommand(browser(), IDC_FOCUS_TOOLBAR);

  EXPECT_EQ("Reload", speech_monitor_.GetNextUtterance());
  EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
}

//
// Spoken feedback tests of the out-of-box experience.
//

class OobeSpokenFeedbackTest : public LoginManagerTest {
 protected:
  OobeSpokenFeedbackTest() : LoginManagerTest(false) {}
  ~OobeSpokenFeedbackTest() override {}

  void SetUpCommandLine(base::CommandLine* command_line) override {
    LoginManagerTest::SetUpCommandLine(command_line);
    // Many bots don't have keyboard/mice which triggers the HID detection
    // dialog in the OOBE.  Avoid confusing the tests with that.
    command_line->AppendSwitch(chromeos::switches::kDisableHIDDetectionOnOOBE);
  }

  SpeechMonitor speech_monitor_;

 private:
  DISALLOW_COPY_AND_ASSIGN(OobeSpokenFeedbackTest);
};

// Test is flaky: http://crbug.com/346797
IN_PROC_BROWSER_TEST_F(OobeSpokenFeedbackTest, DISABLED_SpokenFeedbackInOobe) {
  ui_controls::EnableUIControls();
  ASSERT_FALSE(AccessibilityManager::Get()->IsSpokenFeedbackEnabled());

  LoginDisplayHost* login_display_host = LoginDisplayHost::default_host();
  WebUILoginView* web_ui_login_view = login_display_host->GetWebUILoginView();
  views::Widget* widget = web_ui_login_view->GetWidget();
  gfx::NativeWindow window = widget->GetNativeWindow();

  // We expect to be in the language select dropdown for this test to work,
  // so make sure that's the case.
  js_checker().ExecuteAsync("$('language-select').focus()");
  AccessibilityManager::Get()->EnableSpokenFeedback(
      true, ash::A11Y_NOTIFICATION_NONE);
  ASSERT_TRUE(speech_monitor_.SkipChromeVoxEnabledMessage());
  // There's no guarantee that ChromeVox speaks anything when injected after
  // the page loads, which is by design.  Tab forward and then backward
  // to make sure we get the right feedback from the language and keyboard
  // selection fields.
  ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
      window, ui::VKEY_TAB, false, false, false, false));

  while (speech_monitor_.GetNextUtterance() != "Select your keyboard:") {
  }
  EXPECT_EQ("U S", speech_monitor_.GetNextUtterance());
  EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
                                 "Combo box * of *"));
  ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
      window, ui::VKEY_TAB, false, true /*shift*/, false, false));
  while (speech_monitor_.GetNextUtterance() != "Select your language:") {
  }
  EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance());
  EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
                                 "Combo box * of *"));
}

}  // namespace chromeos

{'repo_name': 'Samsung/ChromiumGStreamerBackend', 'stars': '105', 'repo_language': 'None', 'file_name': 'keyboard_utils.js', 'mime_type': 'text/plain', 'hash': -3022925047431543280, 'source_dataset': 'data'}


Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "MenuCommandTest", "MenuCommandTest\MenuCommandTest.vbproj", "{73D357F9-DBBC-495C-8AED-4853D76C5023}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "CommentAdornmentTest", "CommentAdornmentTest\CommentAdornmentTest.vbproj", "{9A694EBE-AEF0-47B9-98A8-A3A360688CBF}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Any CPU = Debug|Any CPU
		Release|Any CPU = Release|Any CPU
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{73D357F9-DBBC-495C-8AED-4853D76C5023}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{73D357F9-DBBC-495C-8AED-4853D76C5023}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{73D357F9-DBBC-495C-8AED-4853D76C5023}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{73D357F9-DBBC-495C-8AED-4853D76C5023}.Release|Any CPU.Build.0 = Release|Any CPU
		{9A694EBE-AEF0-47B9-98A8-A3A360688CBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
		{9A694EBE-AEF0-47B9-98A8-A3A360688CBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
		{9A694EBE-AEF0-47B9-98A8-A3A360688CBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
		{9A694EBE-AEF0-47B9-98A8-A3A360688CBF}.Release|Any CPU.Build.0 = Release|Any CPU
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

{'repo_name': 'MicrosoftDocs/visualstudio-docs', 'stars': '606', 'repo_language': 'Python', 'file_name': 'how-to-create-a-basic-3-d-model.md', 'mime_type': 'text/plain', 'hash': -7782784101025780944, 'source_dataset': 'data'}


///////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2019, ООО 1С-Софт
// Все права защищены. Эта программа и сопроводительные материалы предоставляются
// в соответствии с условиями лицензии Attribution 4.0 International (CC BY 4.0)
// Текст лицензии доступен по ссылке:
// https://creativecommons.org/licenses/by/4.0/legalcode
///////////////////////////////////////////////////////////////////////////////////////////////////////

#Область ОбработчикиСобытий

&НаКлиенте
Процедура ОбработкаКоманды(ПараметрКоманды, ПараметрыВыполненияКоманды)
	ОткрытьФорму("ОбщаяФорма.НастройкаКолонтитулов",,
		ПараметрыВыполненияКоманды.Источник,
		ПараметрыВыполненияКоманды.Уникальность,
		ПараметрыВыполненияКоманды.Окно);
КонецПроцедуры

#КонецОбласти

{'repo_name': 'BlizD/Tasks', 'stars': '135', 'repo_language': '1C Enterprise', 'file_name': 'Module.bsl', 'mime_type': 'text/plain', 'hash': -873333357133476052, 'source_dataset': 'data'}


@media screen {
  /* for entity popup */
  .tab-content {
    height: 100%;
    display: flex;
    flex-flow: column;
    min-height: 1px;
  }
  /**/

  /* Entry header export to csv button */
  .second-menu img {
    height: 15px;
  }
  /**/

  .flair_header {
    position: relative;
    word-wrap: break-word;
  }

  .alertgroup_open {
    border-radius: 10px !important;
    line-height: 12pt;
    padding-top: 5px;
    padding-left: 2px;
  }

  .alertgroup_closed {
    border-radius: 0px !important;
    line-height: 12pt;
    padding-top: 5px;
    padding-left: 2px;
  }

  .alertgroup_promoted {
    border-radius: 5px !important;
    border-color: orange !important;
    border-width: thick !important;
    line-height: 12pt;
    padding-top: 5px;
    padding-left: 2px;
  }

  .alertgroup {
    font-size: 10pt;
  }

  span.tag-new {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
  }

  input[type="text"]:not(.form-control),
  input[type="number"]:not(.form-control),
  input[role="combobox"]:not(.form-control, .report_input) {
    background-color: #292929;
    border-color: #292929;
    border-style: solid;
  }

  .list-filtered input[type="text"],
  .list-filtered input[type="text"]:focus {
    background-color: white;
    border-color: #cccccc;
    border-style: solid;
    color: black;
  }
  .ReactTags__tagInputField {
    /* background-color: #292929;
      border-color: #292929; */
    border-style: solid;
    margin-top: 5px;
    color: "black";
  }
  .detail-header-input {
    background-color: #292929;
    border-color: #292929;
    border-style: solid;
    margin-top: 5px;
  }

  .anchor {
    display: block;
    visibility: hidden;
  }

  .alert-wrapper {
    overflow: auto;
    display: block;
    padding-left: 5px;
    padding-right: 5px;
  }

  .main-header-info-null {
    color: #ececec;
    background-color: #292929;
    padding-right: 5px;
    padding-left: 5px;
    box-shadow: 0px 5px 5px -5px #333;
    display: flex;
    flex-flow: row;
  }

  .main-header-info-child {
    flex-grow: 1;
  }

  .entry-header-info-null {
    color: #ececec;
    background-color: #292929;
    padding-right: 5px;
    padding-bottom: 2px;
    width: 100%;
    box-shadow: 0px 5px 5px -5px #333;
  }

  .entry-container {
    height: 100%;
    display: initial;
  }

  .entry-wrapper-main {
    width: 100%;
    //height: 90vh;
    position: relative;
    overflow: auto;
  }

  .entry-wrapper-main-300 {
    width: 99vw;
    max-height: 300px;
    position: relative;
    overflow: auto;
  }

  .entry-wrapper-main-nh {
    width: 99vw;
    position: relative;
    //overflow: auto;
  }

  .entry-wrapper {
    background-color: #ffffff;
    border-radius: 5px;
    border: 1px solid #999999;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
  }

  .entry-outer {
    background-color: white;
    border-radius: 5px;
    border: 1px solid #999999;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
    margin-bottom: 10px;
  }

  .entry-header {
    background-color: #ddd;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.9);
    border-radius: 5px 5px 0px 0px;
    display: flow-root;
  }

  .entry-header-inner,
  .entry-body-inner {
    padding: (5px /4) 5px 0px (5px);
  }

  .entry-header-inner {
    height: 25px;
  }

  .entry-body-inner {
    overflow: auto;
    padding-top: 0px;
    padding-left: 10px;
  }

  .entry-body {
    padding-bottom: 2px;
    padding-top: 2px;
    border-radius: 0px 0px 5px 5px;
  }

  .details-table td,
  th {
    padding-left: 5px;
    padding-right: 20px;
    text-align: left;
    vertical-align: middle;
  }

  .details-table th {
    //font-size:12pt;
    outline: 0px solid transparent;
  }

  .details-subject {
    font-size: x-large;
  }

  .todo_open {
    background-color: #993333;
    color: white;
  }

  .todo_assigned {
    background-color: #b8b800;
  }

  .todo_completed {
    background-color: #669966;
    color: white;
  }

  .todo_open_outer {
    border: 2px solid #993333;
  }

  .todo_assigned_outer {
    border: 2px solid #b8b800;
  }

  .todo_completed_outer {
    border: 2px solid #669966;
  }

  .event_entry_container_alert {
    max-height: 500px;
    overflow: auto;
  }

  .toolbar {
    position: relative;
    padding-top: 5px;
    margin-bottom: 5px;
    border-top: 1px solid white;
  }
  .toolbar select {
    margin-bottom: 0px;
  }

  .entity {
    background-color: rgba(255, 245, 168, 0.5);
    border: 1px dotted green;
    border-radius: 6px 6px 6px 6px;
    cursor: pointer;
    padding: 1px;
  }

  .popover {
    width: auto;
    font-size: 10pt;
  }

  .search_result_row {
    display: inline-flex;
  }

  .search_highlight {
    background-color: yellow;
    font-weight: bolder;
  }

  .search-heading {
    margin: 0px;
  }

  .search_snippet_container {
    display: flex;
    //flex-flow: column;
    padding-left: 0px !important;
    padding-right: 0px !important;
    margin-bottom: 0px !important;
  }

  .search_snippet_header {
    font-weight: bolder;
    text-decoration: underline;
    //font-size: 12pt;
    //border-top: 1px solid #e0e0e0;
    padding-right: 10px;
  }

  .circleNumber {
    background: lightblue;
    border: 1px solid black;
    border-radius: 5em 5em 5em 5em;
    -moz-border-radius: 5em 5em 5em 5em;
    -webkit-border-radius: 5em 5em 5em 5em;
    margin: 1px;
    margin-left: 3px;
    padding: 1px;
  }

  /* Not sure if needed
    .refs td {
    max-height:100px;
    display:block;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right:20px;
    vertical-align:top;
    }
    */

  .close_toolbar {
    position: absolute;
    right: 10px;
    cursor: pointer;
    top: 5px;
    width: 20px;
  }

  .alertTableHorizontal {
    display: table;
    padding: 3px;
    width: 99.5%;
  }

  .alertTableHorizontal tr:nth-child(odd) {
    background-color: #eee;
  }

  .alertTableHorizontal tr:nth-child(even) {
    background-color: #fff;
  }

  .alertTableHorizontal tr:not(.not_selectable) {
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: black;
  }

  .alertTableHorizontal th:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.05) !important;
  }

  .alertTableHorizontal th:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.1) !important;
  }

  .alertTableHorizontal th {
    box-shadow: 0px -10px 5px -10px black inset;
  }

  .alertTableHorizontal td:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.05);
  }

  .alertTableHorizontal span:last-child {
  }

  .alertTableHorizontal span {
    /*  display: table-cell; */
    //  padding-left:5px;
    //  padding-right:5px;
  }

  .entityTableHorizontal {
    display: table;
    padding: 3px;
    border-radius: 5px;
    border: 1px solid black;
    width: 99.5%;
    margin-bottom: 10px;
  }

  .entityTableHorizontal > div {
    display: table-row;
    border-bottom: 1px solid #333;
  }

  .entityTableHorizontal > div:first-child {
    font-weight: bold;
  }

  .entityTableHorizontal tr:nth-child(odd) {
    background-color: #eee;
  }

  .entityTableHorizontal tr:nth-child(even) {
    background-color: #fff;
  }

  .entityTableHorizontal th:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.05) !important;
  }

  .entityTableHorizontal th:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.1) !important;
  }

  .entityTableHorizontal th {
    box-shadow: 0px -10px 5px -10px black inset;
  }

  .entityTableHorizontal span:last-child {
  }

  .entityTableWrapper {
    //overflow-y: auto;
    //display: inline-block;
    //max-height: 40vh;
  }

  .entry-wrapper-entity {
    overflow: auto;
    //max-height:30vh;
  }

  .entity-full-screen {
    background-color: #aec0d0;
    display: flex;
    flex-flow: row;
  }

  .entityPopUpMaxSizeDefault {
    max-height: 500px;
  }

  .entityPopUp {
    position: fixed;
    z-index: 100;
    background-color: #aec0d0;
    border: 1px solid black;
    display: flex;
    flex-flow: column;
    //top:0px;
    bottom: 5px;
    left: 0px;
    //right:0px;
  }

  .entityPopUpButtons {
    padding-top: 5px;
  }

  //Entity Popup Nav Bar Smaller
  .nav-tabs > li > a {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }

  .nav-pills > li > a {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
  }
  //End Entity Popup Nav Bar Smaller

  .incidentTable span:last-child {
    width: 100%;
  }
  .incidentTable select {
    margin-bottom: 2px;
  }

  .incidentTableWidth {
    width: 200px;
  }

  .incidentTable {
    display: table;
    padding: 3px;
    border-radius: 5px;
    border: 1px solid black;
    width: 99%;
    box-shadow: 0px 0px 7px;
    margin-bottom: 10px;
  }

  .incidentTable > div {
    display: table-row;
    //  border-bottom: 1px solid #333;
  }

  .incidentTable div:nth-child(odd) {
    background-color: #eee;
  }

  .incidentTable div:nth-child(even) {
    background-color: #fff;
  }

  .incidentTable span:first-child {
    font-weight: bold;
    padding-right: 10px;
    //width:200px;
    display: inline-block;
  }

  .incidentTable span:last-child {
    width: 100%;
  }
  .incidentTable select {
    margin-bottom: 2px;
  }

  .qtip td {
    vertical-align: top;
    line-height: normal;
    font-size: 11pt;
  }

  .qtip-scot {
    border-color: rgb(100, 100, 100) !important;
    color: #eee !important;
    background-color: #292929 !important;
    box-shadow: 10px 10px 10px #888888 !important;
    max-width: 500px !important;
    max-height: 500px !important;
    overflow: auto !important;
  }

  .qtip-scot textarea {
    background-color: #515151;
    color: white;
  }

  .qtip-scot th {
    padding-left: 3px;
  }

  .qtip-scot a {
    color: white;
  }

  /* not sure if necessary
    .popover-title {
    color: black;
    }
    */

  .blackholed {
    background-color: black;
    color: white;
  }

  .blocked {
    background-color: red;
    color: white;
  }

  .whitelist {
    background-color: white;
    color: black;
  }

  .warn {
    background-color: yellow;
    color: black;
  }

  .updated {
    white-space: nowrap;
  }

  .alert_data_cell {
    overflow-x: hidden;
    max-height: 200px;
    overflow-y: auto;
    font-weight: normal !important;
    padding: 3px;
    max-width: 500px;
    word-wrap: break-word;
  }

  .wait {
    cursor: progress !important;
  }

  .summary_entry {
    background-color: rgb(250, 250, 210);
  }

  .selected {
    background-color: #b1d0ae !important;
  }

  pre {
    white-space: pre-wrap; /* css-3 */
    white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
    white-space: -pre-wrap; /* Opera 4-6 */
    white-space: -o-pre-wrap; /* Opera 7 */
    word-wrap: break-word; /* Internet Explorer 5.5+ */
  }

  /* tables */
  .tablesorter {
    margin: 10px 0pt 15px;
    width: 98% !important;
    text-align: left;
  }
  .tablesorter thead tr .header {
    background-repeat: no-repeat;
    background-position: center left;
    cursor: pointer;
  }
  .tablesorter th {
  }
  .headerSortUp {
    padding-left: 15px;
    background-image: url("/images/asc.gif") !important;
  }
  .headerSortDown {
    padding-left: 15px;
    background-image: url("/images/desc.gif") !important;
  }

  .sources {
    overflow: hidden;
  }

  .alert_data_entry tr:nth-child(odd) th {
    background-color: #dadada;
  }
  .alert_data_entry tr:nth-child(even) th {
    background-color: #cccccc;
  }

  .alert_data_entry {
    border: 1px solid black;
  }

  .alert_data_entry td,
  th {
    padding: 5px;
  }

  .alert_data_entry tr:nth-child(odd) {
    background-color: #fcfcfc;
  }

  .alert_data_entry tr:nth-child(even) {
    background-color: #eeeeee;
  }

  .noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
  }

  .entity:active {
    background-color: red;
  }

  a:active {
    color: red;
  }

  .pointerEventsOff {
    pointer-events: none;
  }

  .list-view-table-header {
    display: table-row-group;
  }

  .ouo-warning {
    left: 49%;
    position: absolute;
    top: 0px;
    margin: auto;
    z-index: 999999;
    color: #ddd;
    font-size: 8pt;
  }

  .black-border-line {
    border-left: thick solid #101010;
  }

  .not_saved_entry {
    width: 99vw;
    display: table-cell;
    height: 400px;
  }

  .dashboard {
    text-align: center;
  }

  .dashboardStatusParent {
    text-align: center;
    padding-top: 50px;
  }

  .dashBoardStatusChild {
    display: flex;
    flex-flow: column;
  }

  .dashboardStatusDetail {
    font-weight: initial;
  }

  .dashboardStatusDetailNotRunning {
    font-weight: bold;
    color: red;
  }

  .dashboardStatusDetailRunning {
    font-weight: bold;
    color: green;
  }

  .mainNavPadding {
    padding-top: 50px;
  }

  .homePageDisplay {
    display: block;
    overflow: auto;
    height: 100vh;
    padding-bottom: 50px;
  }

  .height100percent {
    height: 100%;
  }

  .sourceButton {
    background-color: #fff;
    border-color: #ccc;
    color: #333;
    font-size: 12px;
    padding: 3px 5px;
    font-weight: 400;
    border-radius: 3px;
  }

  .sourceButtonClose {
    cursor: pointer;
    padding-left: 3px;
  }

  .tagButton {
    background-color: #fff;
    border-color: #ccc;
    color: #333;
    font-size: 12px;
    padding: 3px 5px;
    font-weight: 400;
    border-radius: 3px;
    margin-right: 2px;
  }

  .tagButtonClose {
    cursor: pointer;
    padding-left: 3px;
  }
  .permissionButton {
    background-color: #fff;
    border-color: #ccc;
    color: #333;
    font-size: 12px;
    padding: 3px 5px;
    font-weight: 400;
    border-radius: 3px;
  }

  .permissionButtonClose {
    cursor: pointer;
    padding-left: 3px;
  }

  .signature-entry-outer {
    background-color: white;
    border-radius: 5px;
    border: 1px solid #999999;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
    margin-bottom: 10px;
  }

  .signature-entry-header {
    background-color: #ddd;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.9);
    border-radius: 5px 5px 0px 0px;
  }

  .signature-entry-header-inner,
  .signature-entry-body-inner {
    padding: (5px /4) 5px 0px (5px);
  }

  .signature-entry-header-inner {
    height: 25px;
    display: inline-table;
  }

  .not_saved_signature_entry {
    width: 100%;
    display: block;
    //height: 400px;
  }

  .cursorEnabled > .ace_scroller {
    cursor: auto;
  }

  .cursorDisabled > .ace_scroller {
    cursor: not-allowed !important;
  }

  .signature_production_color {
    color: #5cb85c;
  }

  .signature_quality_color {
    color: #f0ad4e;
  }

  .list-buttons {
    display: inline-flex;
  }
}

/* PRINTING */

@media print {
  .detail-buttons {
    display: none;
  }
  .list-buttons {
    display: none !important;
  }
  .add-tag-button {
    display: none;
  }
  .remove-tag-button {
    display: none;
  }
  .add-source-button {
    display: none;
  }
  .remove-source-button {
    display: none;
  }
  .tagButtonClose {
    display: none;
  }
  .sourceButtonClose {
    display: none;
  }
  nav {
    display: block !important;
  }
  .navbar {
    min-height: 50px !important;
    border: 1px solid transparent !important;
  }
  .navbar-fixed-top {
    position: relative !important;
    right: 0 !important;
    left: 0 !important;
    top: 0 !important;
    border-width: 0 0 1px !important;
    z-index: 1030 !important;
    border-radius: 0 !important;
  }
  .navbar-inverse {
    background-color: #ddd !important;
    border-color: #080808 !important;
    -webkit-print-color-adjust: exact !important;
  }

  /*.mainNavPadding         { padding-top: 50px !important }*/

  body {
    margin-top: 0 !important;
  }

  /*entry printing css*/

  .entry-header-info-null {
    -webkit-print-color-adjust: exact !important;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.9);
    background-color: #ddd !important;
  }

  .entry-header {
    background-color: #ddd;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.9);
    border-radius: 5px 5px 0px 0px;
  }

  .entry-wrapper-main {
    width: auto;
    height: auto;
    overflow: visible;
    display: block;
  }

  .summary_entry {
    -webkit-print-color-adjust: exact !important;
    background-color: rgb(250, 250, 210) !important;
  }

  .entry-outer {
    background-color: white;
    border-radius: 5px;
    border: 1px solid #999999;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
    margin-bottom: 10px;
  }

  .entry-header {
    -webkit-print-color-adjust: exact !important;
    background-color: #ddd !important;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.9);
    border-radius: 5px 5px 0px 0px;
  }

  .entry-body-inner {
    overflow: auto;
    padding-top: 0px;
    padding-left: 10px;
  }

  .entry-container {
    height: 100%;
    display: initial;
  }

  .entry-header-inner {
    height: 25px;
  }

  .detail-container {
    overflow: visible;
  }

  .entity {
    -webkit-print-color-adjust: exact !important;
    background-color: rgba(255, 245, 168, 0.5) !important;
    border: 1px dotted green;
    border-radius: 6px 6px 6px 6px;
    cursor: pointer;
    padding: 1px;
  }

  .circleNumber {
    -webkit-print-color-adjust: exact !important;
    background: lightblue !important;
    border: 1px solid black;
    border-radius: 5em 5em 5em 5em;
    -moz-border-radius: 5em 5em 5em 5em;
    -webkit-border-radius: 5em 5em 5em 5em;
    margin: 1px;
    margin-left: 3px;
    padding: 1px;
  }

  /* alert printing css */
  .alertTableHorizontal {
    -webkit-print-color-adjust: exact !important;
    display: block;
    padding: 3px;
    border-radius: 5px;
    border: 1px solid black;
    width: 99.5%;
    margin-bottom: 10px;
  }

  .alertTableHorizontal > div {
    -webkit-print-color-adjust: exact !important;
    display: table-row !important;
    border-bottom: 1px solid #333 !important;
  }

  .alertTableHorizontal > div:first-child {
    font-weight: bold !important;
  }

  .alertTableHorizontal tr:nth-child(odd) {
    -webkit-print-color-adjust: exact !important;
    background-color: #eee;
  }

  .alertTableHorizontal tr:nth-child(even) {
    background-color: #fff;
    -webkit-print-color-adjust: exact !important;
  }

  .alertTableHorizontal tr:not(.not_selectable) {
    border-bottom-width: 1px !important;
    border-bottom-style: solid !important;
    border-bottom-color: black !important;
    -webkit-print-color-adjust: exact !important;
  }

  .alertTableHorizontal th:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.05);
    -webkit-print-color-adjust: exact !important;
  }

  .alertTableHorizontal th:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.1);
    -webkit-print-color-adjust: exact !important;
  }

  .alertTableHorizontal th {
    box-shadow: 0px -10px 5px -10px black inset !important;
    -webkit-print-color-adjust: exact !important;
  }

  .alertTableHorizontal td:nth-child(odd) {
    background-color: rgba(0, 0, 0, 0.05) !important;
    -webkit-print-color-adjust: exact !important;
  }

  .alertTableHorizontal td {
    display: inline-block;
  }

  .alertTableHorizontal th {
    display: inline-block;
  }

  .tablesorter-filter-row {
    display: inline-block;
  }

  .selected {
    background-color: #b1d0ae !important;
    -webkit-print-color-adjust: exact !important;
  }

  /*signature printing css */
  .signature-entry-outer {
    -webkit-print-color-adjust: exact !important;
    background-color: white !important;
    border-radius: 5px !important;
    border: 1px solid #999999 !important;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.6) !important;
    margin-bottom: 10px !important;
  }

  .signature-entry-header {
    -webkit-print-color-adjust: exact !important;
    background-color: #ddd !important;
    box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.9) !important;
    border-radius: 5px 5px 0px 0px !important;
  }

  .signature-entry-header-inner,
  .signature-entry-body-inner {
    padding: (5px /4) 5px 0px (5px) !important;
  }

  .signature-entry-header-inner {
    height: 25px !important;
  }

  /* misc printing css */
  .close_toolbar {
    position: absolute;
    right: 10px;
    cursor: pointer;
    top: 5px;
    width: 20px;
  }

  #list-view-container {
    display: none;
  }
}

{'repo_name': 'sandialabs/scot', 'stars': '199', 'repo_language': 'Perl', 'file_name': 'cookies.js', 'mime_type': 'text/plain', 'hash': -4052754953950269781, 'source_dataset': 'data'}


/* Class = "NSWindow"; title = "Preferences"; ObjectID = "F0z-JX-Cv5"; */
"F0z-JX-Cv5.title" = "पसंद";

/* Class = "NSTextFieldCell"; title = "No Result"; ObjectID = "jUU-3A-jLW"; */
"jUU-3A-jLW.title" = "कोई परिणाम नही";

{'repo_name': 'iina/iina', 'stars': '24331', 'repo_language': 'Swift', 'file_name': 'integrate_doc_types.rb', 'mime_type': 'text/x-ruby', 'hash': 914621788165572445, 'source_dataset': 'data'}


/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef PK11INSTALL_H
#define PK11INSTALL_H

#include <prio.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef void (*Pk11Install_ErrorHandler)(char *);

typedef enum {
    PK11_INSTALL_NO_ERROR = 0,
    PK11_INSTALL_DIR_DOESNT_EXIST,
    PK11_INSTALL_FILE_DOESNT_EXIST,
    PK11_INSTALL_FILE_NOT_READABLE,
    PK11_INSTALL_ERROR_STRING,
    PK11_INSTALL_JAR_ERROR,
    PK11_INSTALL_NO_INSTALLER_SCRIPT,
    PK11_INSTALL_DELETE_TEMP_FILE,
    PK11_INSTALL_OPEN_SCRIPT_FILE,
    PK11_INSTALL_SCRIPT_PARSE,
    PK11_INSTALL_SEMANTIC,
    PK11_INSTALL_SYSINFO,
    PK11_INSTALL_NO_PLATFORM,
    PK11_INSTALL_BOGUS_REL_DIR,
    PK11_INSTALL_NO_MOD_FILE,
    PK11_INSTALL_ADD_MODULE,
    PK11_INSTALL_JAR_EXTRACT,
    PK11_INSTALL_DIR_NOT_WRITEABLE,
    PK11_INSTALL_CREATE_DIR,
    PK11_INSTALL_REMOVE_DIR,
    PK11_INSTALL_EXEC_FILE,
    PK11_INSTALL_WAIT_PROCESS,
    PK11_INSTALL_PROC_ERROR,
    PK11_INSTALL_USER_ABORT,
    PK11_INSTALL_UNSPECIFIED
} Pk11Install_Error;
#define PK11_INSTALL_SUCCESS PK11_INSTALL_NO_ERROR

/**************************************************************************
 *
 * P k 1 1 I n s t a l l _ I n i t
 *
 * Does initialization that otherwise would be done on the fly.  Only
 * needs to be called by multithreaded apps, before they make any calls
 * to this library.
 */
void
Pk11Install_Init();

/**************************************************************************
 *
 * P k 1 1 I n s t a l l _ S e t E r r o r H a n d l e r
 *
 * Sets the error handler to be used by the library.  Returns the current
 * error handler function.
 */
Pk11Install_ErrorHandler
Pk11Install_SetErrorHandler(Pk11Install_ErrorHandler handler);

/**************************************************************************
 *
 * P k 1 1 I n s t a l l _ R e l e a s e
 *
 * Releases static data structures used by the library.  Don't use the
 * library after calling this, unless you call Pk11Install_Init()
 * first.  This function doesn't have to be called at all unless you're
 * really anal about freeing memory before your program exits.
 */
void
Pk11Install_Release();

/*************************************************************************
 *
 * P k 1 1 I n s t a l l _ D o I n s t a l l
 *
 * jarFile is the path of a JAR in the PKCS #11 module JAR format.
 * installDir is the directory relative to which files will be
 *   installed.
 * feedback is a file descriptor to which to write informative (not error)
 * status messages: what files are being installed, what modules are being
 * installed.  If feedback==NULL, no messages will be displayed.
 * If force != 0, interactive prompts will be suppressed.
 * If noverify == PR_TRUE, signatures won't be checked on the JAR file.
 */
Pk11Install_Error
Pk11Install_DoInstall(char *jarFile, const char *installDir,
                      const char *tempDir, PRFileDesc *feedback, short force,
                      PRBool noverify);

#ifdef __cplusplus
}
#endif

#endif /*PK11INSTALL_H*/

{'repo_name': 'Feodor2/Mypal', 'stars': '149', 'repo_language': 'None', 'file_name': 'moz.build', 'mime_type': 'text/plain', 'hash': -448681900404470901, 'source_dataset': 'data'}


# ##### BEGIN GPL LICENSE BLOCK #####
#
#  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 2
#  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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

import collections
import numpy as np

import bpy
from bpy.props import StringProperty, EnumProperty, BoolProperty, FloatVectorProperty

from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import (updateNode, repeat_last, fullList)

# pylint: disable=E1101
# pylint: disable=W0613

# modified (kosvor, zeffii) 2017 end november. When Blender changed VertexColor map to rgb+a

vcol_options = [(k, k, '', i) for i, k in enumerate(["RGB", "RGBA"])]

def set_vertices(loop_count, obj, index_socket, indices, input_colors, colors):
    vertex_index = np.zeros(loop_count, dtype=int)
    loops = obj.data.loops
    loops.foreach_get("vertex_index", vertex_index)
    if index_socket.is_linked:
        idx_lookup = collections.defaultdict(list)
        for idx, v_idx in enumerate(vertex_index):
            idx_lookup[v_idx].append(idx)

        for idx, col in zip(indices, input_colors):
            colors[idx_lookup[idx]] = col
    else:
        if len(obj.data.vertices) > len(input_colors):
            fullList(input_colors, len(obj.data.vertices))
        for idx, v_idx in enumerate(vertex_index):
            colors[idx] = input_colors[v_idx]

def set_polygons(polygon_count, obj, index_socket, indices, input_colors, colors):
    p_start = np.empty(polygon_count, dtype=int)
    p_total = np.empty(polygon_count, dtype=int)
    obj.data.polygons.foreach_get("loop_start", p_start)
    obj.data.polygons.foreach_get("loop_total", p_total)
    if index_socket.is_linked:
        for idx, color in zip(indices, input_colors):
            start_slice = p_start[idx]
            stop_slice = start_slice + p_total[idx]
            colors[start_slice:stop_slice] = color
    else:
        if len(input_colors) < polygon_count:
            fullList(input_colors, polygon_count)
        for idx in range(polygon_count):
            color = input_colors[idx]
            start_slice = p_start[idx]
            stop_slice = start_slice + p_total[idx]
            colors[start_slice:stop_slice] = color

def set_loops(loop_count, obj, index_socket, indices, input_colors, colors):
    if index_socket.is_linked:
        for idx, color in zip(indices, input_colors):
            colors[idx] = color
    else:
        if len(input_colors) < loop_count:
            fullList(input_colors, loop_count)
        elif len(input_colors) > loop_count:
            input_colors = input_colors[:loop_count]
        colors[:] = input_colors

class SvVertexColorNodeMK3(bpy.types.Node, SverchCustomTreeNode):
    '''
    Triggers: vcol vertex colors
    Tooltip: Set the vertex colors of the named Layer
    '''

    bl_idname = 'SvVertexColorNodeMK3'
    bl_label = 'Vertex color mk3'
    bl_icon = 'COLOR'

    modes = [
        ("vertices", "Vert", "Vcol - color per vertex", 1),
        ("polygons", "Face", "Pcol - color per face", 2),
        ("loops", "Loop", "Color per loop", 3)]

    mode: EnumProperty(items=modes, default='vertices', update=updateNode)
    object_ref: StringProperty(default='', update=updateNode)
    vertex_color: StringProperty(default='SvCol', update=updateNode)
    clear: BoolProperty(name='clear c', default=True, update=updateNode)

    clear_c: FloatVectorProperty(
        name='cl_color', subtype='COLOR', min=0, max=1, size=4,
        default=(0, 0, 0, 1), update=updateNode)

    use_active: BoolProperty(
        default=False, name="Use active layer",
        description="Use active vertex layer")

    unit_color: FloatVectorProperty(
        name='', default=(.3, .3, .2, 1.0),
        size=4, min=0.0, max=1.0, subtype='COLOR', update=updateNode)

    vcol_size: EnumProperty(
        items=vcol_options,
        name='Num Color Components',
        description="3 = rgb, 4 = rgba.  older versions of Blender only support 3 components",
        default="RGBA", update=updateNode)

    def draw_buttons(self, context, layout):
        layout.prop(self, 'use_active')
        layout.prop(self, 'vertex_color')
        layout.prop(self, "mode", expand=True)

    def draw_buttons_ext(self, context, layout):
        row = layout.row(align=True)
        row.prop(self, "clear", text="clear unindexed")
        row.prop(self, "clear_c", text="")
        layout.prop(self, "vcol_size", expand=True)

    def sv_init(self, context):
        inew = self.inputs.new
        inew('SvObjectSocket', 'Object')
        inew('SvStringsSocket', "Index")
        color_socket = inew('SvColorSocket', "Color")
        color_socket.prop_name = 'unit_color'

    def get_vertex_color_layer(self, obj):
        vcols = obj.data.vertex_colors
        vertex_color = None
        if vcols:
            active = self.use_active and vcols.active
            vertex_color = vcols.active if active else vcols.get(self.vertex_color)
        return vertex_color or vcols.new(name=self.vertex_color)

    def process(self):

        color_socket = self.inputs["Color"]
        index_socket = self.inputs["Index"]

        # self upgrade, shall only be called once if encountered.
        if color_socket.bl_idname == 'SvStringsSocket':
            color_socket.replace_socket('SvColorSocket')

        objects = self.inputs["Object"].sv_get()
        color_data = color_socket.sv_get(deepcopy=False, default=[None])
        index_data = index_socket.sv_get(deepcopy=False, default=[None])

        num_components = int(len(self.vcol_size))

        for obj, input_colors, indices in zip(objects, repeat_last(color_data), repeat_last(index_data)):
            if not input_colors:
                continue

            loops = obj.data.loops
            loop_count = len(loops)

            vertex_color = self.get_vertex_color_layer(obj)
            colors = np.empty(loop_count * num_components, dtype=np.float32)

            # we have index and colors, set colors of incoming index
            # first get all colors so we can write to them
            if self.clear:
                colors.shape = (loop_count, num_components)
                colors[:] = self.clear_c[:num_components]
            elif index_socket.is_linked:
                vertex_color.data.foreach_get("color", colors)

            colors.shape = (loop_count, num_components)
            standard_params = obj, index_socket, indices, input_colors, colors

            if self.mode == "vertices":
                set_vertices(loop_count, *standard_params)
            elif self.mode == "polygons":
                set_polygons(len(obj.data.polygons), *standard_params)
            elif self.mode == "loops":
                set_loops(loop_count, *standard_params)

            # write out data
            colors.shape = (loop_count * num_components,)
            vertex_color.data.foreach_set("color", colors)
            obj.data.update()

def register():
    bpy.utils.register_class(SvVertexColorNodeMK3)

def unregister():
    bpy.utils.unregister_class(SvVertexColorNodeMK3)

{'repo_name': 'nortikin/sverchok', 'stars': '968', 'repo_language': 'Python', 'file_name': 'quadratic_bubble.txt', 'mime_type': 'text/plain', 'hash': -7229027634393553469, 'source_dataset': 'data'}


h4.poll-title
  margin-bottom: 7px

ul.choice-list
  padding-left: 0px
  margin: 7px 0px

li.poll-choice
  list-style-type: none

  .poll-choice-bar
    width: 0%
    height: 10px
    background-color: $banner-color

  .choice-percentage
    font-size: 1em

{'repo_name': 'dukechronicle/chronline', 'stars': '116', 'repo_language': 'Ruby', 'file_name': '422.html', 'mime_type': 'text/html', 'hash': 2623275549127738910, 'source_dataset': 'data'}


//#############################################################################
//
//  This file is part of ImagePlay.
//
//  ImagePlay 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.
//
//  ImagePlay 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 ImagePlay.  If not, see <http://www.gnu.org/licenses/>.
//
//#############################################################################

#ifndef IPPROCESSINPUTOUTPUTWIDGET_H
#define IPPROCESSINPUTOUTPUTWIDGET_H

#include <QWidget>

#include "IPL_processes.h"
#include "MainWindow.h"

//-----------------------------------------------------------------------------
//!IPProcessInputOutputWidget displays errors and messages for IPLProcess
/*!
 *
 */
class IPProcessInputOutputWidget : public QWidget
{
    Q_OBJECT
public:
    explicit                    IPProcessInputOutputWidget  (QWidget *parent = 0);
    void                        init                        (IPProcessStep* process);
    void                        updateInputsOutputs         ();

private:
    IPProcessStep*              _processStep;
    MainWindow*                 _mainWindow;
};

#endif // IPPROCESSINPUTOUTPUTWIDGET_H

{'repo_name': 'cpvrlab/ImagePlay', 'stars': '1065', 'repo_language': 'C++', 'file_name': 'tutorial.md', 'mime_type': 'text/plain', 'hash': -4643646158515912717, 'source_dataset': 'data'}


/**
  ******************************************************************************
  * @file    TIM/TIM_OCActive/Inc/stm32f4xx_it.h
  * @author  MCD Application Team
  * @brief   This file contains the headers of the interrupt handlers.
  ******************************************************************************
  * @attention
  *
  *
© COPYRIGHT(c) 2017 STMicroelectronics

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

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __STM32F4xx_IT_H
#define __STM32F4xx_IT_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */

void NMI_Handler(void);
void HardFault_Handler(void);
void MemManage_Handler(void);
void BusFault_Handler(void);
void UsageFault_Handler(void);
void SVC_Handler(void);
void DebugMon_Handler(void);
void PendSV_Handler(void);
void SysTick_Handler(void);
#ifdef __cplusplus
}
#endif

#endif /* __STM32F4xx_IT_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

{'repo_name': 'STMicroelectronics/STM32CubeF4', 'stars': '123', 'repo_language': 'C', 'file_name': 'Project.uvprojx', 'mime_type': 'text/xml', 'hash': -6397743756735805682, 'source_dataset': 'data'}


/* radare - LGPL - Copyright 2009-2020 - pancake */

#include <r_core.h>

R_API void r_core_visual_mark_reset(RCore *core) {
	size_t i;
	for (i = 0; i < UT8_MAX; i++) {
		core->marks[i] = UT64_MAX;
	}
	core->marks_init = true;
}

R_API bool r_core_visual_mark_dump(RCore *core) {
	size_t i;
	if (!core->marks_init) {
		return false;
	}
	bool res = false;
	for (i = 0; i < UT8_MAX; i++) {
		if (core->marks[i] != UT64_MAX) {
			if (i > ASCII_MAX) {
				r_cons_printf ("fV %d 0x%"PFMT64x"\n", i - ASCII_MAX - 1, core->marks[i]);
			} else {
				r_cons_printf ("fV %c 0x%"PFMT64x"\n", i, core->marks[i]);
			}
			res = true;
		}
	}
	return res;
}

R_API void r_core_visual_mark_set(RCore *core, ut8 ch, ut64 addr) {
	if (!core->marks_init) {
		r_core_visual_mark_reset (core);
	}
	core->marks[ch] = addr;
}

R_API void r_core_visual_mark_del(RCore *core, ut8 ch) {
	if (!core->marks_init) {
		return;
	}
	core->marks[ch] = UT64_MAX;
}

R_API void r_core_visual_mark(RCore *core, ut8 ch) {
	if (IS_DIGIT (ch)) {
		ch += ASCII_MAX + 1;
	}
	r_core_visual_mark_set (core, ch, core->offset);
}

R_API void r_core_visual_mark_seek(RCore *core, ut8 ch) {
	if (core->marks_init && core->marks[ch] != UT64_MAX) {
		r_core_seek (core, core->marks[ch], true);
	}
}

{'repo_name': 'radareorg/radare2', 'stars': '12786', 'repo_language': 'C', 'file_name': 'rabin2.sb', 'mime_type': 'text/plain', 'hash': 2981310378601692108, 'source_dataset': 'data'}


<?php
/**
 * The template for displaying content in the single.php template
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<?php the_title(); ?>

		<?php if ( 'post' === get_post_type() ) : ?>

			<?php twentyeleven_posted_on(); ?>

		<?php endif; ?>

		<?php the_content(); ?>
		<?php
		wp_link_pages(
			array(
				'before' => '
' . __( 'Pages:', 'twentyeleven' ) . '',
				'after'  => '
',
			)
		);
		?>

		<?php
		/* translators: Used between list items, there is a space after the comma. */
		$categories_list = get_the_category_list( __( ', ', 'twentyeleven' ) );

		/* translators: Used between list items, there is a space after the comma. */
		$tags_list = get_the_tag_list( '', __( ', ', 'twentyeleven' ) );

		if ( $tags_list && ! is_wp_error( $tags_list ) ) {
			/* translators: 1: Categories list, 2: Tag list, 3: Permalink, 4: Post title, 5: Author name, 6: Author URL. */
			$utility_text = __( 'This entry was posted in %1$s and tagged %2$s by %5$s. Bookmark the permalink.', 'twentyeleven' );
		} elseif ( $categories_list ) {
			/* translators: 1: Categories list, 2: Tag list, 3: Permalink, 4: Post title, 5: Author name, 6: Author URL. */
			$utility_text = __( 'This entry was posted in %1$s by %5$s. Bookmark the permalink.', 'twentyeleven' );
		} else {
			/* translators: 1: Categories list, 2: Tag list, 3: Permalink, 4: Post title, 5: Author name, 6: Author URL. */
			$utility_text = __( 'This entry was posted by %5$s. Bookmark the permalink.', 'twentyeleven' );
		}

		printf(
			$utility_text,
			$categories_list,
			$tags_list,
			esc_url( get_permalink() ),
			the_title_attribute( 'echo=0' ),
			get_the_author(),
			esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) )
		);
		?>

		<?php edit_post_link( __( 'Edit', 'twentyeleven' ), '', '' ); ?>

		<?php
		// If a user has filled out their description and this is a multi-author blog, show a bio on their entries.
		if ( get_the_author_meta( 'description' ) && ( ! function_exists( 'is_multi_author' ) || is_multi_author() ) ) :
			?>

				<?php
				/** This filter is documented in author.php */
				$author_bio_avatar_size = apply_filters( 'twentyeleven_author_bio_avatar_size', 68 );
				echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );
				?>

				<?php
				/* translators: %s: Author name. */
				printf( __( 'About %s', 'twentyeleven' ), get_the_author() );
				?>

				<?php the_author_meta( 'description' ); ?>

					<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
						<?php
						/* translators: %s: Author name. */
						printf( __( 'View all posts by %s →', 'twentyeleven' ), get_the_author() );
						?>

		<?php endif; ?>

{'repo_name': 'markjaquith/WordPress', 'stars': '230', 'repo_language': 'PHP', 'file_name': 'media-widgets.js', 'mime_type': 'text/plain', 'hash': 2640945952050291387, 'source_dataset': 'data'}


function setup(varargin)

run vlfeat/toolbox/vl_setup ;
run matlab/vl_setupnn ;
addpath examples ;

opts.useGpu = false ;
opts.verbose = false ;
opts = vl_argparse(opts, varargin) ;

try
  vl_nnconv(single(1),single(1),[]) ;
catch
  warning('VL_NNCONV() does not seem to be compiled. Trying to compile it now.') ;
  vl_compilenn('enableGpu', opts.useGpu, 'verbose', opts.verbose) ;
end

if opts.useGpu
  try
    vl_nnconv(gpuArray(single(1)),gpuArray(single(1)),[]) ;
  catch
    vl_compilenn('enableGpu', opts.useGpu, 'verbose', opts.verbose) ;
    warning('GPU support does not seem to be compiled in MatConvNet. Trying to compile it now') ;
  end
end

{'repo_name': 'layumi/2015_Face_Detection', 'stars': '136', 'repo_language': 'HTML', 'file_name': 'matconv cuDNN.xcscheme', 'mime_type': 'text/xml', 'hash': -1103008734019534666, 'source_dataset': 'data'}


#!/usr/bin/python
#
# Copyright (c) 2008 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
# along with this software; if not, see
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
#
# Red Hat trademarks are not licensed under GPLv2. No permission is
# granted to use or replicate Red Hat trademarks that are incorporated
# in this software or its documentation.

"""
Scan for unused datasource queries. Run from web or java with:

    ../scripts/datasource-query-usage.py **/*_queries.xml

Writes out used_queries and unused_queries files.

Be sure to remove the used_queries and unused_queries files in the directory
before re-running.
"""

import os
import os.path
import sys
import xml.parsers.expat
import commands

def start_element(name, attrs, filename):
    if name == "mode":
        query_name = attrs['name']
        grep_for_hits(filename, query_name)

def dummy_element(name):
    pass

def grep_for_hits(filename, query_name):
    cmd = "grep -r %s * | grep -v '.xml' | wc -l" \
            % query_name
    (status, output) = commands.getstatusoutput(cmd)
    hits = int(output)
    used = open("used_queries", "a")
    unused = open("unused_queries", "a")
    if hits == 0:
        print("  Unused query: %s" % query_name)
        unused.write(filename + "." + query_name + "\n")
    else:
        used.write(filename + "." + query_name + "\n")
    used.close()
    unused.close()

if __name__ == "__main__":
    cwd = os.getcwd()
    files = sys.argv[1:]
    for filename in files:
        print("Scanning %s" % filename)
        f = open(filename, 'r')
        p = xml.parsers.expat.ParserCreate()

        p.StartElementHandler = lambda x, y: start_element(x, y, os.path.basename(filename))
        p.EndElementHandler = dummy_element
        p.CharacterDataHandler = dummy_element

        p.Parse(f.read())

{'repo_name': 'uyuni-project/uyuni', 'stars': '127', 'repo_language': 'Java', 'file_name': 'configure-tftpsync.sh', 'mime_type': 'text/x-shellscript', 'hash': -8616593239572892129, 'source_dataset': 'data'}


/* This is a file which gets included in other files...
 * To implement each precision, we first include a file
 * defining all the macros, then we include this file.
 */

/* mathvec.c
 *
 * these are functions which are implemented for float and double.
 */

// BUILD_FOR_GPU means that we are building for openCL or cuda...

ifdef(`BUILD_FOR_GPU',`

// We need to have stub host functions to populate the table of entries???

',` dnl else // ! BUILD_FOR_GPU

dnl	All of the functions in this section are not available as gpu subroutines...
dnl	At least as far as cuda is concerned - what about openCL?

dnl	These 3 are not really math functions, but they only
dnl	are applicable to floating point arguments.

_VEC_FUNC_2V(		visinf,	dst = (dest_type) isinf( src1 )	)
_VEC_FUNC_2V(		visnan,	dst = (dest_type) isnan( src1 )	)
_VEC_FUNC_2V(		visnorm,	dst = (dest_type) isnormal( src1 )	)

_VEC_FUNC_2V(		vj0,		dst = (dest_type)j0	( src1 )		)
_VEC_FUNC_2V(		vj1,		dst = (dest_type)j1	( src1 )		)
_VEC_FUNC_2V(		vgamma,		dst = gamma_func ( src1 )		)
_VEC_FUNC_2V(		vlngamma,	dst = lngamma_func ( src1 )		)

// vuni has no source, so mixed precision makes no sense
ifdef(`MIXED_PRECISION',`',` dnl ifndef MIXED_PRECISION
_VEC_FUNC_1V(		vuni,		dst = (dest_type)drand48()	)
') dnl endif // ! MIXED_PRECISION

') dnl endif /* ! BUILD_FOR_GPU */

_VEC_FUNC_2V(		vrint,		dst = rint_func	( src1 )		)

_VEC_FUNC_2V(		vfloor,	dst = floor_func	( src1 )		)
_VEC_FUNC_2V(		vtrunc,	dst = trunc_func	( src1 )		)
/* BUG should use roundf for float!? */
_VEC_FUNC_2V(		vround,	dst = round_func	( src1 )		)
_VEC_FUNC_2V(		vceil,		dst = ceil_func	( src1 )		)
_VEC_FUNC_2V(		vsqrt,		dst = sqrt_func	( src1 )		)
_VEC_FUNC_2V(		vlog,		dst = log_func	( src1 )		)
_VEC_FUNC_2V(		vlog10,	dst = log10_func	( src1 )		)
_VEC_FUNC_2V(		rvexp,		dst = exp_func	( src1 )		)
_VEC_FUNC_2V(		vatan,		dst = atan_func	( src1 )		)
_VEC_FUNC_2V(		vtan,		dst = tan_func	( src1 )		)
_VEC_FUNC_2V(		vcos,		dst = cos_func	( src1 )		)
_VEC_FUNC_2V(		verf,		dst = erf_func	( src1 )		)
_VEC_FUNC_2V(		verfinv,	dst = erfinv_func ( src1 )		)
_VEC_FUNC_2V(		vacos,		dst = acos_func	( src1 )		)
_VEC_FUNC_2V(		vsin,		dst = sin_func	( src1 )		)
_VEC_FUNC_2V(		vasin,		dst = asin_func	( src1 )		)
// does openCL have atan2f? NO!
_VEC_FUNC_2V_MIXED(	vatn2,		dst = atan2_func (csrc1.im,csrc1.re)	)
_VEC_FUNC_3V( 	rvpow,		dst = pow_func (src1,src2)		)
_VEC_FUNC_3V(	vatan2,	dst = atan2_func ( src2, src1 )		)

_VEC_FUNC_2V_SCAL(	vsatan2,	dst = atan2_func ( src1, scalar1_val )	)
_VEC_FUNC_2V_SCAL(	vsatan22,	dst = atan2_func ( scalar1_val, src1 )	)

_VEC_FUNC_2V_SCAL(	vspow2,	dst = pow_func ( scalar1_val, src1 )	)
_VEC_FUNC_2V_SCAL(	vspow,		dst = pow_func ( src1, scalar1_val )	)

/* Complex powers - need to go to polar coords!
 *
 * (a+bi)^(c+di)
 * (r e^it)^(c+di)		r^2 = a^2 + b^2  t=atan2(b,a) (check order!)
 * r^(c+di) (e^it)^(c+di)
 * r^c r^di e^(-dt+i ct)
 * r^c e^(-dt) r^id e^ict
 *
 * r = e^log(r)
 * r^c = (e ^ log(r))^c
 *     = e ^ ( c log r )
 *
 * r^c e^(-dt) r^id e^ict
 * e^(c log(r) - dt ) e^(i(d log(r) + ct))
 *
 * How many temp vars?
 *       a   b
 *	 |\/|
 *	 |/\|
 *       r  t
 *	 |
 *	log(r)		t
 *      exp(c log(r) - dt)        cos(d log(r) + ct)	sin(d log(r) + ct)
 *
 */

// We put this in brackets because there is a comma in the call to atan2

_VEC_FUNC_CPX_3V_T1( cvpow,					\
	r = sqrt_func (csrc1.re*csrc1.re+csrc1.im*csrc1.im);	\
	theta=atan2_func (csrc1.re,csrc1.im);			\
	arg = csrc2.im * log_func (r) + csrc2.re * theta;	\
	r = csrc2.re * log_func (r) - csrc2.im * theta;		\
	cdst.re = r*cos_func (arg);				\
	cdst.im = r*sin_func (arg);				\
)

{'repo_name': 'nasa/QuIP', 'stars': '110', 'repo_language': 'C', 'file_name': 'Makefile.am', 'mime_type': 'text/x-makefile', 'hash': -5565688464591963072, 'source_dataset': 'data'}


/*
   +----------------------------------------------------------------------+
   | HipHop for PHP                                                       |
   +----------------------------------------------------------------------+
   | Copyright (c) 2010-present Facebook, Inc. (http://www.facebook.com)  |
   +----------------------------------------------------------------------+
   | This source file is subject to version 3.01 of the PHP license,      |
   | that is bundled with this package in the file LICENSE, and is        |
   | available through the world-wide-web at the following url:           |
   | http://www.php.net/license/3_01.txt                                  |
   | If you did not receive a copy of the PHP license and are unable to   |
   | obtain it through the world-wide-web, please send a note to          |
   | license@php.net so we can mail you a copy immediately.               |
   +----------------------------------------------------------------------+
*/

#include "hphp/runtime/base/member-reflection.h"

#include "hphp/util/build-info.h"
#include "hphp/util/embedded-data.h"
#include "hphp/util/logger.h"

#include <cstdio>
#include <dlfcn.h>
#include <string>
#include <unordered_map>

namespace HPHP {

///////////////////////////////////////////////////////////////////////////////

std::unordered_map<std::string, const char*(*)(const void*, const void*)> const*
  g_member_reflection_vtable = nullptr;

#define X(name) \
  const char* nameof_member(const HPHP::name* base, const void* internal) { \
    if (!g_member_reflection_vtable) return nullptr; \
    auto it = g_member_reflection_vtable->find("HPHP::"#name); \
    if (it == std::end(*g_member_reflection_vtable)) return nullptr; \
    return it->second(base, internal); \
  }
HPHP_REFLECTABLES
#undef X

bool init_member_reflection(const std::string& extractPath,
                            const std::string& fallbackPath,
                            bool trust) {
  g_member_reflection_vtable =
    reinterpret_cast<decltype(g_member_reflection_vtable)>(
      dlsym(RTLD_DEFAULT, detail::kMemberReflectionTableName)
    );
  if (g_member_reflection_vtable) return true;

  embedded_data desc;
  if (!get_embedded_data("member_reflection", &desc)) {
    // We might not be embedding the shared object, depending on platform, so
    // don't cry too loudly if we don't find it.
    Logger::Verbose("init_member_reflection: Unable to find embedded data");
    return false;
  }

  auto const handle = dlopen_embedded_data(
    desc,
    extractPath,
    fallbackPath,
    buildId().toString(),
    trust
  );
  if (!handle) {
    Logger::Warning("init_member_reflection: "
                    "Failed to dlopen embedded data");
    return false;
  }

  g_member_reflection_vtable =
    reinterpret_cast<decltype(g_member_reflection_vtable)>(
      dlsym(handle, detail::kMemberReflectionTableName)
    );
  if (!g_member_reflection_vtable) {
    Logger::Warning("init_member_reflection: dlsym failed: %s", dlerror());
    return false;
  }

  return true;
}

#define X(name)

#undef X

///////////////////////////////////////////////////////////////////////////////

}

{'repo_name': 'facebook/hhvm', 'stars': '16595', 'repo_language': 'C++', 'file_name': 'test_0_1323266_1.txt', 'mime_type': 'text/plain', 'hash': -1574043869757074387, 'source_dataset': 'data'}


<Application x:Class="Hearthstone_Deck_Tracker.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:utility="clr-namespace:Hearthstone_Deck_Tracker.Utility"
             xmlns:wpf="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
             xmlns:converters="clr-namespace:Hearthstone_Deck_Tracker.Utility.Converters"
             xmlns:enums="clr-namespace:Hearthstone_Deck_Tracker.Enums"
             Startup="App_OnStartup"
             DispatcherUnhandledException="App_DispatcherUnhandledException">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary>
                    <Color x:Key="GrayTextColor1">#FF7F7F7F</Color>
                    <Color x:Key="GrayTextColor2">#FFAAAAAA</Color>
                    <SolidColorBrush x:Key="GrayTextColorBrush" Color="#FF7F7F7F"/>
                    <SolidColorBrush x:Key="HSReplayNetBlue" Color="#1D3657"/>
                    <SolidColorBrush x:Key="HSReplayNetPremiumGold" Color="#FFB00D"/>
                </ResourceDictionary>
                <ResourceDictionary>
                    <ImageSource x:Key="AppIcon">pack://siteoforigin:,,,/Images/HearthstoneDeckTracker.ico</ImageSource>
                    <ImageSource x:Key="JoustScreenshot">Resources/joust-screenshot.jpg</ImageSource>
                    <ImageSource x:Key="HsReplayInfo1">Resources/hsreplay_info_1.png</ImageSource>
                    <ImageSource x:Key="HsReplayInfo2">Resources/hsreplay_info_2.png</ImageSource>
                    <ImageSource x:Key="HsReplayInfo3">Resources/hsreplay_info_3.png</ImageSource>
                    <ImageSource x:Key="HsReplayIcon">Resources/hsreplay_logo_blue.png</ImageSource>
                    <ImageSource x:Key="HsReplayIconBlue">Resources/hsreplay_logo_blue.png</ImageSource>
                    <ImageSource x:Key="HsReplayIconWhite">Resources/hsreplay_logo_white.png</ImageSource>
                    <ImageSource x:Key="ClassIconDemonHunterRound">Resources/ClassIcons/Round/demonhunter.png</ImageSource>
                    <ImageSource x:Key="ClassIconDruidRound">Resources/ClassIcons/Round/druid.png</ImageSource>
                    <ImageSource x:Key="ClassIconHunterRound">Resources/ClassIcons/Round/hunter.png</ImageSource>
                    <ImageSource x:Key="ClassIconMageRound">Resources/ClassIcons/Round/mage.png</ImageSource>
                    <ImageSource x:Key="ClassIconPaladinRound">Resources/ClassIcons/Round/paladin.png</ImageSource>
                    <ImageSource x:Key="ClassIconPriestRound">Resources/ClassIcons/Round/priest.png</ImageSource>
                    <ImageSource x:Key="ClassIconRogueRound">Resources/ClassIcons/Round/rogue.png</ImageSource>
                    <ImageSource x:Key="ClassIconShamanRound">Resources/ClassIcons/Round/shaman.png</ImageSource>
                    <ImageSource x:Key="ClassIconWarlockRound">Resources/ClassIcons/Round/warlock.png</ImageSource>
                    <ImageSource x:Key="ClassIconWarriorRound">Resources/ClassIcons/Round/warrior.png</ImageSource>
                    <ImageSource x:Key="DustIcon">Resources/dust.png</ImageSource>
                    <ImageSource x:Key="TwitchExtDecklist">Resources/twitch_ext_decklist.png</ImageSource>
                    <ImageSource x:Key="TwitchExtSecret">Resources/twitch_ext_secret.png</ImageSource>
                    <ImageSource x:Key="CollectionPromo">Resources/collection_promo.jpg</ImageSource>
                    <ImageSource x:Key="HearthstoneIcon">Resources/hearthstone-icon.png</ImageSource>
                    <ImageSource x:Key="BgsToastBackground">Resources/bgs-toast-background.jpg</ImageSource>
                </ResourceDictionary>
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
                <ResourceDictionary Source="Resources/Icons.xaml"/>
                <ResourceDictionary>
                    <utility:ConfigWrapper x:Key="ConfigWrapper"/>
                    <utility:GlobalCommands x:Key="GlobalCommands"/>
                    <converters:InverseBoolToVisibilityConverter x:Key="InverseBoolToVisibility"/>
                    <converters:BoolToVisibilityConverter x:Key="BoolToVisibility"/>
                    <enums:EnumDescriptionConverter x:Key="EnumDescriptionConverter"/>
                </ResourceDictionary>
                <ResourceDictionary>
                    <Style TargetType="{x:Type Hyperlink}">
                        <Setter Property="Foreground" Value="#FF47B1DF" />
                    </Style>
                    <Style TargetType="TextBlock" x:Key="WinrateGaugeTextStyle">
                        <Setter Property="FontWeight" Value="SemiBold"/>
                        <Setter Property="TextAlignment" Value="Center"/>
                        <Setter Property="TextWrapping" Value="Wrap"/>
                        <Setter Property="VerticalAlignment" Value="Center"/>
                        <Setter Property="Width" Value="80"/>
                    </Style>
                    <Style TargetType="wpf:Gauge" x:Key="WinrateGaugeStyle">
                        <Setter Property="Width" Value="90"/>
                        <Setter Property="Height" Value="90"/>
                        <Setter Property="From" Value="0"/>
                        <Setter Property="To" Value="100"/>
                        <Setter Property="InnerRadius" Value="40"/>
                        <Setter Property="Uses360Mode" Value="True"/>
                        <Setter Property="LabelFormatter" Value="{Binding EmptyFormatter}"/>
                        <Setter Property="GaugeActiveFill" Value="{DynamicResource AccentColorBrush}"/>
                        <Setter Property="GaugeBackground" Value="{DynamicResource AccentColorBrush4}"/>
                        <Setter Property="GaugeRenderTransform">
                            <Setter.Value>
                                <RotateTransform Angle="90"/>
                            </Setter.Value>
                        </Setter>
                    </Style>
                    <Style TargetType="ListView" BasedOn="{StaticResource MetroListView}">
                        <Setter Property="ScrollViewer.PanningMode" Value="VerticalOnly"/>
                        <EventSetter Event="ManipulationBoundaryFeedback" Handler="HandleManipulationBoundaryFeedback"/>
                    </Style>
                    <Style TargetType="ListBox" BasedOn="{StaticResource MetroListBox}">
                        <Setter Property="ScrollViewer.PanningMode" Value="VerticalOnly"/>
                        <EventSetter Event="ManipulationBoundaryFeedback" Handler="HandleManipulationBoundaryFeedback"/>
                    </Style>
                    <Style TargetType="GroupBox" BasedOn="{StaticResource MetroGroupBox}">
                        <Setter Property="Margin" Value="5"/>
                    </Style>
                    <Style TargetType="ScrollViewer">
                        <Setter Property="PanningMode" Value="VerticalOnly"/>
                        <EventSetter Event="ManipulationBoundaryFeedback" Handler="HandleManipulationBoundaryFeedback"/>
                    </Style>
                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

{'repo_name': 'HearthSim/Hearthstone-Deck-Tracker', 'stars': '3943', 'repo_language': 'C#', 'file_name': 'DeckComparer.cs', 'mime_type': 'text/plain', 'hash': 2412117952171783585, 'source_dataset': 'data'}


### YamlMime:ManagedReference
items:
- uid: BenchmarkDotNet.Loggers
  commentId: N:BenchmarkDotNet.Loggers
  id: BenchmarkDotNet.Loggers
  children:
  - BenchmarkDotNet.Loggers.IFlushableLogger
  - BenchmarkDotNet.Loggers.LazySynchronizedStreamLogger
  langs:
  - csharp
  - vb
  name: BenchmarkDotNet.Loggers
  nameWithType: BenchmarkDotNet.Loggers
  fullName: BenchmarkDotNet.Loggers
  type: Namespace
  assemblies:
  - CodeJam.PerfTests
references:
- uid: BenchmarkDotNet.Loggers.IFlushableLogger
  commentId: T:BenchmarkDotNet.Loggers.IFlushableLogger
  parent: BenchmarkDotNet.Loggers
  isExternal: false
  name: IFlushableLogger
  nameWithType: IFlushableLogger
  fullName: BenchmarkDotNet.Loggers.IFlushableLogger
- uid: BenchmarkDotNet.Loggers.LazySynchronizedStreamLogger
  commentId: T:BenchmarkDotNet.Loggers.LazySynchronizedStreamLogger
  isExternal: false
  name: LazySynchronizedStreamLogger
  nameWithType: LazySynchronizedStreamLogger
  fullName: BenchmarkDotNet.Loggers.LazySynchronizedStreamLogger
- uid: BenchmarkDotNet.Loggers
  commentId: N:BenchmarkDotNet.Loggers
  isExternal: false
  name: BenchmarkDotNet.Loggers
  nameWithType: BenchmarkDotNet.Loggers
  fullName: BenchmarkDotNet.Loggers

{'repo_name': 'rsdn/CodeJam', 'stars': '183', 'repo_language': 'C#', 'file_name': 'TableDataTest.cs', 'mime_type': 'text/x-c', 'hash': 6271897777781567864, 'source_dataset': 'data'}


.studio-container {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  height: 100%;
  background-color: #FFFFFF;
}

.studio-menu-sidebar {
  width: 199px;
  min-width: 199px;
  overflow-y: auto;
  border-right: 1px solid #ccc;
  background-color: #efefef;
}

.studio-property-sidebar {
  width: 199px;
  min-width: 199px;
  overflow-y: auto;
  border-right: 1px solid #ccc;
  background-color: #efefef;
}

.studio-property-panel {
  border-bottom: 1px solid #ccc;
  background-color: #FFFFFF;
  padding: 5px 8px 0px 8px;
}

.studio-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.studio-editor-container {
  height: 320px;
}

.studio-result-control-container {
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 5px 8px;
  display: flex;
  justify-content: space-between;
}

.studio-result-container {
  overflow-y: auto;
}

.studio-datasource-container {
  padding: 5px 8px;
  border-bottom: 1px solid #ccc;
  display: flex;
}

.studio-datasource-select {
  width: 300px;
}

.studio-query-menu-item {
  border-left: 3px solid #EBECF0;
  margin: 5px 0px;
  padding: 3px 3px 3px 8px;
  font-weight: 700;
  color: #8993A4;
  cursor: pointer;
}

.studio-query-menu-item:hover {
  border-left: 3px solid #0065FF;
}

.studio-query-menu-item-active {
  border-left: 3px solid #0065FF;
  color: #0065FF;
}

{'repo_name': 'shzlw/poli', 'stars': '1675', 'repo_language': 'Java', 'file_name': 'schema-postgresql.sql', 'mime_type': 'text/plain', 'hash': -6827050978954497453, 'source_dataset': 'data'}