text:
namespace ash {
namespace {

using ::content::WebContents;

// Margin between screen edge and SimpleWebViewDialog border.
const int kExternalMargin = 60;

// Margin between WebView and SimpleWebViewDialog border.
const int kInnerMargin = 2;

class ToolbarRowView : public views::View {
 public:
  METADATA_HEADER(ToolbarRowView);
  ToolbarRowView() {
    SetBackground(
        views::CreateThemedSolidBackground(ui::kColorDialogBackground));
  }

  ToolbarRowView(const ToolbarRowView&) = delete;
  ToolbarRowView& operator=(const ToolbarRowView&) = delete;
  ~ToolbarRowView() override = default;

  void Init(std::unique_ptr<views::View> back,
            std::unique_ptr<views::View> forward,
            std::unique_ptr<views::View> reload,
            std::unique_ptr<views::View> location_bar) {
    auto* layout = SetLayoutManager(std::make_unique<views::BoxLayout>());
    layout->set_main_axis_alignment(
        views::BoxLayout::MainAxisAlignment::kCenter);
    layout->set_cross_axis_alignment(
        views::BoxLayout::CrossAxisAlignment::kCenter);
    layout->set_between_child_spacing(
        ChromeLayoutProvider::Get()->GetDistanceMetric(
            views::DISTANCE_RELATED_CONTROL_HORIZONTAL));

    AddChildView(std::move(back));
    AddChildView(std::move(forward));
    AddChildView(std::move(reload));
    layout->SetFlexForView(AddChildView(std::move(location_bar)), 1);
  }
};

BEGIN_METADATA(ToolbarRowView, views::View)
END_METADATA

}  // namespace

// Stub implementation of ContentSettingBubbleModelDelegate.
class StubBubbleModelDelegate : public ContentSettingBubbleModelDelegate {
 public:
  StubBubbleModelDelegate() = default;
  StubBubbleModelDelegate(const StubBubbleModelDelegate&) = delete;
  StubBubbleModelDelegate& operator=(const StubBubbleModelDelegate&) = delete;
  ~StubBubbleModelDelegate() override = default;

 private:
  // ContentSettingBubbleModelDelegate implementation:
  void ShowCollectedCookiesDialog(content::WebContents* web_contents) override {
  }
  void ShowContentSettingsPage(ContentSettingsType type) override {}
  void ShowMediaSettingsPage() override {}
  void ShowLearnMorePage(ContentSettingsType type) override {}
};

// SimpleWebViewDialog class ---------------------------------------------------

SimpleWebViewDialog::SimpleWebViewDialog(Profile* profile)
    : profile_(profile),
      bubble_model_delegate_(new StubBubbleModelDelegate) {
  command_updater_ = std::make_unique<CommandUpdaterImpl>(this);
  command_updater_->UpdateCommandEnabled(IDC_BACK, true);
  command_updater_->UpdateCommandEnabled(IDC_FORWARD, true);
  command_updater_->UpdateCommandEnabled(IDC_STOP, true);
  command_updater_->UpdateCommandEnabled(IDC_RELOAD, true);
  command_updater_->UpdateCommandEnabled(IDC_RELOAD_BYPASSING_CACHE, true);
  command_updater_->UpdateCommandEnabled(IDC_RELOAD_CLEARING_CACHE, true);
}

SimpleWebViewDialog::~SimpleWebViewDialog() {
  for (auto& observer : observers_)
    observer.OnHostDestroying();

  if (web_view_ && web_view_->web_contents()) {
    web_view_->web_contents()->SetDelegate(nullptr);
    web_modal::WebContentsModalDialogManager::FromWebContents(
        web_view_->web_contents())
        ->SetDelegate(nullptr);
  }
}

void SimpleWebViewDialog::StartLoad(const GURL& url) {
  if (!web_view_container_)
    web_view_container_ = std::make_unique<views::WebView>(profile_);
  web_view_ = web_view_container_.get();
  web_view_->GetWebContents()->SetDelegate(this);
  web_view_->LoadInitialURL(url);

  WebContents* web_contents = web_view_->GetWebContents();
  DCHECK(web_contents);

  // Create the password manager that is needed for the proxy.
  ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient(
      web_contents,
      autofill::ChromeAutofillClient::FromWebContents(web_contents));

  // Set this as the web modal delegate so that web dialog can appear.
  web_modal::WebContentsModalDialogManager::CreateForWebContents(web_contents);
  web_modal::WebContentsModalDialogManager::FromWebContents(web_contents)
      ->SetDelegate(this);
}

void SimpleWebViewDialog::Init() {
  // Create the security state model that the location bar model needs.
  if (web_view_->GetWebContents())
    SecurityStateTabHelper::CreateForWebContents(web_view_->GetWebContents());
  location_bar_model_ = std::make_unique<LocationBarModelImpl>(
      this, content::kMaxURLDisplayChars);

  SetBackground(views::CreateThemedSolidBackground(ui::kColorDialogBackground));

  // Back/Forward buttons.
  auto back = std::make_unique<views::ImageButton>(base::BindRepeating(
      [](CommandUpdater* updater) { updater->ExecuteCommand(IDC_BACK); },
      command_updater_.get()));
  back->SetTriggerableEventFlags(ui::EF_LEFT_MOUSE_BUTTON |
                                 ui::EF_MIDDLE_MOUSE_BUTTON);
  back->SetImageHorizontalAlignment(views::ImageButton::ALIGN_RIGHT);
  back->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_BACK));
  back->SetFocusBehavior(views::View::FocusBehavior::ACCESSIBLE_ONLY);
  back->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_BACK));
  back->SetID(VIEW_ID_BACK_BUTTON);
  back_ = back.get();

  auto forward = std::make_unique<views::ImageButton>(base::BindRepeating(
      [](CommandUpdater* updater) { updater->ExecuteCommand(IDC_FORWARD); },
      command_updater_.get()));
  forward->SetTriggerableEventFlags(ui::EF_LEFT_MOUSE_BUTTON |
                                    ui::EF_MIDDLE_MOUSE_BUTTON);
  forward->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_FORWARD));
  forward->SetFocusBehavior(views::View::FocusBehavior::ACCESSIBLE_ONLY);
  forward->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_FORWARD));
  forward->SetID(VIEW_ID_FORWARD_BUTTON);
  forward_ = forward.get();

  // Location bar.
  auto location_bar = std::make_unique<LocationBarView>(
      nullptr, profile_, command_updater_.get(), this, true);
  location_bar_ = location_bar.get();

  // Reload button.
  auto reload = std::make_unique<ReloadButton>(command_updater_.get());
  reload->SetTriggerableEventFlags(ui::EF_LEFT_MOUSE_BUTTON |
                                   ui::EF_MIDDLE_MOUSE_BUTTON);
  reload->SetTooltipText(l10n_util::GetStringUTF16(IDS_TOOLTIP_RELOAD));
  reload->SetAccessibleName(l10n_util::GetStringUTF16(IDS_ACCNAME_RELOAD));
  reload->SetID(VIEW_ID_RELOAD_BUTTON);
  reload_ = reload.get();

  auto* layout = SetLayoutManager(std::make_unique<views::BoxLayout>());
  layout->SetOrientation(views::BoxLayout::Orientation::kVertical);

  // Use separate view to setup custom background.
  auto toolbar_row = std::make_unique<ToolbarRowView>();
  toolbar_row->Init(std::move(back), std::move(forward), std::move(reload),
                    std::move(location_bar));
  AddChildView(std::move(toolbar_row));

  web_view_container_->SetProperty(views::kMarginsKey,
                                   gfx::Insets(kInnerMargin));
  layout->SetFlexForView(AddChildView(std::move(web_view_container_)), 1);

  LoadImages();

  location_bar_->Init();
  UpdateReload(web_view_->web_contents()->IsLoading(), true);

  gfx::Rect screen_bounds = CalculateScreenBounds(gfx::Size());
  screen_bounds.Inset(kExternalMargin);
  SetPreferredSize(screen_bounds.size());
}

content::WebContents* SimpleWebViewDialog::OpenURL(
    const content::OpenURLParams& params) {
  // As there are no Browsers right now, this could not actually ever work.
  NOTIMPLEMENTED();
  return nullptr;
}

void SimpleWebViewDialog::NavigationStateChanged(
    WebContents* source,
    content::InvalidateTypes changed_flags) {
  if (location_bar_) {
    location_bar_->Update(nullptr);
    UpdateButtons();
  }
}

void SimpleWebViewDialog::LoadingStateChanged(WebContents* source,
                                              bool should_show_loading_ui) {
  bool is_loading = source->IsLoading();
  UpdateReload(is_loading && should_show_loading_ui, false);
  command_updater_->UpdateCommandEnabled(IDC_STOP, is_loading);
}

WebContents* SimpleWebViewDialog::GetWebContents() {
  return nullptr;
}

LocationBarModel* SimpleWebViewDialog::GetLocationBarModel() {
  return location_bar_model_.get();
}

const LocationBarModel* SimpleWebViewDialog::GetLocationBarModel() const {
  return location_bar_model_.get();
}

ContentSettingBubbleModelDelegate*
SimpleWebViewDialog::GetContentSettingBubbleModelDelegate() {
  return bubble_model_delegate_.get();
}

content::WebContents* SimpleWebViewDialog::GetActiveWebContents() const {
  return web_view_->web_contents();
}

void SimpleWebViewDialog::ExecuteCommandWithDisposition(int id,
                                                        WindowOpenDisposition) {
  WebContents* web_contents = web_view_->web_contents();
  switch (id) {
    case IDC_BACK:
      if (web_contents->GetController().CanGoBack()) {
        location_bar_->Revert();
        web_contents->GetController().GoBack();
      }
      break;
    case IDC_FORWARD:
      if (web_contents->GetController().CanGoForward()) {
        location_bar_->Revert();
        web_contents->GetController().GoForward();
      }
      break;
    case IDC_STOP:
      web_contents->Stop();
      break;
    case IDC_RELOAD:
    // Always reload bypassing cache.
    case IDC_RELOAD_BYPASSING_CACHE:
    case IDC_RELOAD_CLEARING_CACHE:
      location_bar_->Revert();
      web_contents->GetController().Reload(content::ReloadType::BYPASSING_CACHE,
                                           true);
      break;
    default:
      NOTREACHED();
  }
}

std::unique_ptr<views::WidgetDelegate>
SimpleWebViewDialog::MakeWidgetDelegate() {
  auto delegate = std::make_unique<views::WidgetDelegate>();
  delegate->SetInitiallyFocusedView(web_view_);
  delegate->SetOwnedByWidget(true);
  return delegate;
}

void SimpleWebViewDialog::LoadImages() {
  const ui::ThemeProvider* tp = GetThemeProvider();

  back_->SetImage(views::Button::STATE_NORMAL, tp->GetImageSkiaNamed(IDR_BACK));
  back_->SetImage(views::Button::STATE_HOVERED,
                  tp->GetImageSkiaNamed(IDR_BACK_H));
  back_->SetImage(views::Button::STATE_PRESSED,
                  tp->GetImageSkiaNamed(IDR_BACK_P));
  back_->SetImage(views::Button::STATE_DISABLED,
                  tp->GetImageSkiaNamed(IDR_BACK_D));

  forward_->SetImage(views::Button::STATE_NORMAL,
                     tp->GetImageSkiaNamed(IDR_FORWARD));
  forward_->SetImage(views::Button::STATE_HOVERED,
                     tp->GetImageSkiaNamed(IDR_FORWARD_H));
  forward_->SetImage(views::Button::STATE_PRESSED,
                     tp->GetImageSkiaNamed(IDR_FORWARD_P));
  forward_->SetImage(views::Button::STATE_DISABLED,
                     tp->GetImageSkiaNamed(IDR_FORWARD_D));
}

void SimpleWebViewDialog::UpdateButtons() {
  content::NavigationController& navigation_controller =
      web_view_->web_contents()->GetController();
  back_->SetEnabled(navigation_controller.CanGoBack());
  forward_->SetEnabled(navigation_controller.CanGoForward());
}

void SimpleWebViewDialog::UpdateReload(bool is_loading, bool force) {
  if (reload_) {
    reload_->ChangeMode(
        is_loading ? ReloadButton::Mode::kStop : ReloadButton::Mode::kReload,
        force);
  }
}

web_modal::WebContentsModalDialogHost*
SimpleWebViewDialog::GetWebContentsModalDialogHost() {
  return this;
}

gfx::NativeView SimpleWebViewDialog::GetHostView() const {
  return GetWidget()->GetNativeWindow();
}

gfx::Point SimpleWebViewDialog::GetDialogPosition(const gfx::Size& size) {
  const gfx::Size& host_size = this->size();
  return gfx::Point(host_size.width() / 2 - size.width() / 2,
                    host_size.height() / 2 - size.height() / 2);
}

gfx::Size SimpleWebViewDialog::GetMaximumDialogSize() {
  return size();
}

void SimpleWebViewDialog::AddObserver(
    web_modal::ModalDialogHostObserver* observer) {
  observers_.AddObserver(observer);
}

void SimpleWebViewDialog::RemoveObserver(
    web_modal::ModalDialogHostObserver* observer) {
  observers_.RemoveObserver(observer);
}

BEGIN_METADATA(SimpleWebViewDialog, views::View)
END_METADATA

}  // namespace ash


text:
using System.Windows;

namespace DataExplorer.Presentation.Core.Services
{
    public interface IControlFinder
    {
        T FindAncestor<T>(DependencyObject current) where T : DependencyObject;

        T FindDecendant<T>(DependencyObject parent) where T : DependencyObject;
    }
}

redpajama_set_name: RedPajamaGithub


text:
<component name="ProjectRunConfigurationManager">
  <configuration default="false" name="fsc" type="ScalaCompilationServerRunConfiguration" factoryName="Scala Compilation Server">
    <module name="sodatest-runtime" />
    <setting name="vmparams" value="-Xss2m" />
    <RunnerSettings RunnerId="Run" />
    <ConfigurationWrapper RunnerId="Run" />
    <method>
      <option name="Make" enabled="false" />
    </method>
  </configuration>
</component>


text:
/**
 * @file gis.h
 * @brief WELL GIS storage
 * @author Oleg Borschuk
 * @version
 * @date 2011-07-26
 */
#ifndef GIS_2XEDKE05

#define GIS_2XEDKE05

#include <string>
#include <sstream>
#include <vector>
#include <fstream>

#include "gis_iface.h"
#include "bs_serialize_decl.h"

namespace blue_sky
{

  class BS_API_PLUGIN gis : public gis_iface
    {

    public:

      typedef BS_SP (table_iface)                     sp_table_iface;
      typedef BS_SP (prop_iface)                      sp_prop_iface;

      // ------------------------------------
      // METHODS
      // ------------------------------------
    public:
      // destructor
      virtual ~gis ()
        {}
      // ------------------------------------
      // INTERFACE METHODS
      // ------------------------------------
      /**
       * @brief return SP to the table
       */
      virtual sp_table_iface get_table ()
        {
          return sp_table;
        }

      /**
       * @brief return SP to the property
       */
      virtual sp_prop_iface get_prop ()
        {
          return sp_prop;
        }

      /**
       * @brief read data from LAS file
       *
       * @param fname -- <INPUT> path to the LAS file
       *
       * @return 0 if ok
       */
      virtual int read_from_las_file (const std::string &fname);

      virtual sp_gis_t check_serial () const;
    public:
#ifdef BSPY_EXPORTING_PLUGIN
      /**
       * @brief pack(serialize) all information of class to text string
       *
       * @return string
       */
      virtual std::string to_str () const;

      /**
       * @brief Reastore all class information from input text string
       *
       * @param s -- <INPUT> string
       */
      virtual void from_str (const std::string &s);
      /**
       * @brief python print wrapper
       *
       * @return return table description
       */
      virtual std::string py_str () const;

#endif //BSPY_EXPORTING_PLUGIN

    protected:

      int read_ver_info (sp_prop_iface prop, std::string &s);
      int read_wel_info (sp_prop_iface prop, std::string &s, double ver);
      int read_par_info (sp_prop_iface prop, std::string &s, double ver);
      int read_cur_info (sp_prop_iface prop, std::string &s, int n);
      int read_asc_info (std::vector<t_double> &v, std::string &s, int n, std::ifstream &file, const double);
      int read_asc_info2 (std::vector<t_double> &v, std::string &s, int n, std::ifstream &file, const double);
      //int read_ver_info (sp_prop_iface prop, const string &s);
      //int read_ver_info (sp_prop_iface prop, const string &s);
      //int read_ver_info (sp_prop_iface prop, const string &s);
      //int read_ver_info (sp_prop_iface prop, const string &s);
      //int read_ver_info (sp_prop_iface prop, const string &s);
      // ------------------------------
      // VARIABLES
      // ------------------------------
    protected:
      sp_table_iface sp_table;      //!< table pointer
      sp_prop_iface sp_prop;        //!< ptoperties pointer

      BLUE_SKY_TYPE_DECL (gis);
      friend class bs_serialize;
    };

}; //end of blue_sky namespace

#endif /* end of include guard: GIS_2XEDKE05 */


text:
"""
Holds files for l1 regularization of LikelihoodModel, using cvxopt.
"""
import numpy as np
import statsmodels.base.l1_solvers_common as l1_solvers_common
from cvxopt import solvers, matrix

def fit_l1_cvxopt_cp(
        f, score, start_params, args, kwargs, disp=False, maxiter=100,
        callback=None, retall=False, full_output=False, hess=None):
    """
    Solve the l1 regularized problem using cvxopt.solvers.cp

    Specifically:  We convert the convex but non-smooth problem

    .. math:: \\min_\\beta f(\\beta) + \\sum_k\\alpha_k |\\beta_k|

    via the transformation to the smooth, convex, constrained problem in twice
    as many variables (adding the "added variables" :math:`u_k`)

    .. math:: \\min_{\\beta,u} f(\\beta) + \\sum_k\\alpha_k u_k,

    subject to

    .. math:: -u_k \\leq \\beta_k \\leq u_k.

    Parameters
    ----------
    All the usual parameters from LikelhoodModel.fit
    alpha : non-negative scalar or numpy array (same size as parameters)
        The weight multiplying the l1 penalty term
    trim_mode : 'auto, 'size', or 'off'
        If not 'off', trim (set to zero) parameters that would have been zero
            if the solver reached the theoretical minimum.
        If 'auto', trim params using the Theory above.
        If 'size', trim params if they have very small absolute value
    size_trim_tol : float or 'auto' (default = 'auto')
        For use when trim_mode === 'size'
    auto_trim_tol : float
        For sue when trim_mode == 'auto'.  Use
    qc_tol : float
        Print warning and don't allow auto trim when (ii) in "Theory" (above)
        is violated by this much.
    qc_verbose : Boolean
        If true, print out a full QC report upon failure
    abstol : float
        absolute accuracy (default: 1e-7).
    reltol : float
        relative accuracy (default: 1e-6).
    feastol : float
        tolerance for feasibility conditions (default: 1e-7).
    refinement : int
        number of iterative refinement steps when solving KKT equations
        (default: 1).
    """
    start_params = np.array(start_params).ravel('F')

    ## Extract arguments
    # k_params is total number of covariates, possibly including a leading constant.
    k_params = len(start_params)
    # The start point
    x0 = np.append(start_params, np.fabs(start_params))
    x0 = matrix(x0, (2 * k_params, 1))
    # The regularization parameter
    alpha = np.array(kwargs['alpha_rescaled']).ravel('F')
    # Make sure it's a vector
    alpha = alpha * np.ones(k_params)
    assert alpha.min() >= 0

    ## Wrap up functions for cvxopt
    f_0 = lambda x: _objective_func(f, x, k_params, alpha, *args)
    Df = lambda x: _fprime(score, x, k_params, alpha)
    G = _get_G(k_params)  # Inequality constraint matrix, Gx \leq h
    h = matrix(0.0, (2 * k_params, 1))  # RHS in inequality constraint
    H = lambda x, z: _hessian_wrapper(hess, x, z, k_params)

    ## Define the optimization function
    def F(x=None, z=None):
        if x is None:
            return 0, x0
        elif z is None:
            return f_0(x), Df(x)
        else:
            return f_0(x), Df(x), H(x, z)

    ## Convert optimization settings to cvxopt form
    solvers.options['show_progress'] = disp
    solvers.options['maxiters'] = maxiter
    if 'abstol' in kwargs:
        solvers.options['abstol'] = kwargs['abstol']
    if 'reltol' in kwargs:
        solvers.options['reltol'] = kwargs['reltol']
    if 'feastol' in kwargs:
        solvers.options['feastol'] = kwargs['feastol']
    if 'refinement' in kwargs:
        solvers.options['refinement'] = kwargs['refinement']

    ### Call the optimizer
    results = solvers.cp(F, G, h)
    x = np.asarray(results['x']).ravel()
    params = x[:k_params]

    ### Post-process
    # QC
    qc_tol = kwargs['qc_tol']
    qc_verbose = kwargs['qc_verbose']
    passed = l1_solvers_common.qc_results(
        params, alpha, score, qc_tol, qc_verbose)
    # Possibly trim
    trim_mode = kwargs['trim_mode']
    size_trim_tol = kwargs['size_trim_tol']
    auto_trim_tol = kwargs['auto_trim_tol']
    params, trimmed = l1_solvers_common.do_trim_params(
        params, k_params, alpha, score, passed, trim_mode, size_trim_tol,
        auto_trim_tol)

    ### Pack up return values for statsmodels
    # TODO These retvals are returned as mle_retvals...but the fit wasn't ML
    if full_output:
        fopt = f_0(x)
        gopt = float('nan')  # Objective is non-differentiable
        hopt = float('nan')
        iterations = float('nan')
        converged = 'True' if results['status'] == 'optimal'\
            else results['status']
        retvals = {
            'fopt': fopt, 'converged': converged, 'iterations': iterations,
            'gopt': gopt, 'hopt': hopt, 'trimmed': trimmed}
    else:
        x = np.array(results['x']).ravel()
        params = x[:k_params]

    ### Return results
    if full_output:
        return params, retvals
    else:
        return params

def _objective_func(f, x, k_params, alpha, *args):
    """
    The regularized objective function.
    """
    x_arr = np.asarray(x)
    params = x_arr[:k_params].ravel()
    u = x_arr[k_params:]
    # Call the numpy version
    objective_func_arr = f(params, *args) + (alpha * u).sum()
    # Return
    return matrix(objective_func_arr)

def _fprime(score, x, k_params, alpha):
    """
    The regularized derivative.
    """
    x_arr = np.asarray(x)
    params = x_arr[:k_params].ravel()
    # Call the numpy version
    # The derivative just appends a vector of constants
    fprime_arr = np.append(score(params), alpha)
    # Return
    return matrix(fprime_arr, (1, 2 * k_params))

def _get_G(k_params):
    """
    The linear inequality constraint matrix.
    """
    I = np.eye(k_params)
    A = np.concatenate((-I, -I), axis=1)
    B = np.concatenate((I, -I), axis=1)
    C = np.concatenate((A, B), axis=0)
    # Return
    return matrix(C)

def _hessian_wrapper(hess, x, z, k_params):
    """
    Wraps the hessian up in the form for cvxopt.

    cvxopt wants the hessian of the objective function and the constraints.
        Since our constraints are linear, this part is all zeros.
    """
    x_arr = np.asarray(x)
    params = x_arr[:k_params].ravel()
    zh_x = np.asarray(z[0]) * hess(params)
    zero_mat = np.zeros(zh_x.shape)
    A = np.concatenate((zh_x, zero_mat), axis=1)
    B = np.concatenate((zero_mat, zero_mat), axis=1)
    zh_x_ext = np.concatenate((A, B), axis=0)
    return matrix(zh_x_ext, (2 * k_params, 2 * k_params))


text:
<TITLE>Review for Money Talks (1997)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Money Talks (1997)

reviewed by
Steve Kong

MONEY TALKS (1997)

A film review by Steve Kong
Copyright 1997 Steve Kong

It's hard to review a movie like Money Talks. The movie to aim itself at a
mass audience, but the audience for the film is actually more limited. Not
because of its formula buddy/comedy/action script, but by its lead actor,
Chris Tucker.

The formula for Money Talks is pretty simplistic. A reporter (Charlie
Sheen) setups up a ticket scalper (Chris Tucker) to be arrested. After the
scalper is arrested, he escapes, but not before hearing about some super
secret lucrative dirty dealing. Now that the scalper has escaped, he goes
and finds the reporter who put him away. The scalper is now being hunted by
the cops because they thing he is a cop killer. His last chance? The
reporter maybe able to clear his name. The reporter who put him away feels
guilty and helps the scalper out. Along the way we run into really bad
guys, cops, and gangsters. Throw in a wedding, some stunts, and a few
comedic lines and you have the formula for Money Talks.

The limitation of this film is Chris Tucker. Tucker is a nasally voiced
fast talking cheap knock-off of Eddie Murphy. I think some will find it
hard to watch Tucker for more than five minutes. I've gotten used to him
after seeing him in The 5th Element, so he wasn't so bad. His annoying
screen presence though is what carries the film. His presence far
overshadows that of Charlie Sheen. Sheen gives a very bland performance in
this film, but it's probably expected by looking at Sheen's last few films.

The action is rather bland. Most of it consists of car chases and gun
fights. Director Brett Ratner shows that he is a rookie at shooting and
editing action. Most action sequences are chaotic, badly edited, and end up
losing the audience. The comedy of the film is much better than the action,
I found myself laughing out loud many times during the film.

Overall, Money Talks is a formula film that does entertain. While I
recommend this film, it is a weak recommendation, see it during a matinee
showing or on video. And keep in mind that Tucker is pretty obnoxious and
annoying, if you can't tolerate an actor like this, then this film is
definitely not for you.

!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!
 steve kong      boiled@earthlink.net
 spy on me at:   http://boiled.sbay.org/steve-cam/
 movie reviews:  http://boiled.sbay.org/boiled/
 "try not.  do.  or do not.  there is no try." - yoda
!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!=!

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
using System;
using System.Data.Entity;
using CommonServiceLocator;

namespace NLayer.DataAccess.DB.EF.Extensions
{
    /// <summary>
    /// The UnitOfWork factory.
    /// </summary>
    public class UnitOfWorkFactory : IUnitOfWorkFactory
    {
        /// <summary>
        /// Creates the specified UnitOfWork.
        /// </summary>
        /// <param name="contextType">Type of the context.</param>
        /// <returns></returns>
        public ITransactionalUnitOfWork Create(Type contextType)
        {
            return new UnitOfWork(ServiceLocator.Current.GetInstance<DbContext>(contextType.Name));
        }
    }
}


text:
package org.dcm4chex.rid.mbean;

import org.dcm4che.data.Dataset;
import org.dcm4chex.rid.common.RIDResponseObject;

/**
 * @author franz.willer
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public abstract class BasicRIDResponseObject implements RIDResponseObject {

    private String contentType;
    private int returnCode;
    private String errorMessage;
    private Dataset patInfo;

    public BasicRIDResponseObject( String contentType, int retCode, String errMsg ) {
        this.contentType = contentType;
        returnCode = retCode;
        errorMessage = errMsg;
    }

    public long length() {
        return -1L;
    }

    /* (non-Javadoc)
     * @see org.dcm4chex.rid.common.RIDResponseObject#getContentType()
     */
    public String getContentType() {
        return contentType;
    }

    /* (non-Javadoc)
     * @see org.dcm4chex.rid.common.RIDResponseObject#getReturnCode()
     */
    public int getReturnCode() {
        return returnCode;
    }

    /* (non-Javadoc)
     * @see org.dcm4chex.rid.common.RIDResponseObject#getErrorMessage()
     */
    public String getErrorMessage() {
        return errorMessage;
    }

    /**
     * @return the patInfo
     */
    public Dataset getPatInfo() {
        return patInfo;
    }

    /**
     * @param patInfo the patInfo to set
     */
    public void setPatInfo(Dataset patInfo) {
        this.patInfo = patInfo;
    }

}


text:
"""
Get music transcription dataset from:
http://c4dm.eecs.qmul.ac.uk/rdr/handle/123456789/13

E. Benetos, A. Klapuri, and S. Dixon,
"Score-informed transcription for automatic piano tutoring,"
in Proc. 20th European Signal Processing Conference, pp. 2153-2157, Aug. 2012.

"""
import random
import sys

from os import listdir, makedirs, stat
from os.path import isdir, isfile, join, dirname, realpath, exists

# add data to path
DATA_DIR = dirname(dirname(realpath(__file__)))
sys.path.append(DATA_DIR)
from utils import execute_bash, collect_files_with_ext
from midi.utils import midiread

from scipy.io import wavfile
import numpy as np

THIS_DATA_DIR  = dirname(realpath(__file__))
DOWNLOADED_ZIP = join(THIS_DATA_DIR, "dataset.zip")
DOWNLOADED_DIR = join(THIS_DATA_DIR, "dataset")
FILE_URL="http://c4dm.eecs.qmul.ac.uk/rdr/bitstream/handle/123456789/13/Score-informed%20Piano%20Transcription%20Dataset.zip?sequence=1"

if __name__ == '__main__':
    if not exists(DOWNLOADED_ZIP):
        execute_bash("wget -O {path} {url}".format(url=FILE_URL, path=DOWNLOADED_ZIP))
    if exists(DOWNLOADED_DIR) and isdir(DOWNLOADED_DIR):
        execute_bash("rm -rf %s" % (DOWNLOADED_DIR))
    execute_bash("rm %s " % (join(THIS_DATA_DIR, "*.npy")))
    makedirs(DOWNLOADED_DIR)
    execute_bash("unzip %s -d %s" % (DOWNLOADED_ZIP, DOWNLOADED_DIR))

    files = collect_files_with_ext(DOWNLOADED_DIR, ".wav")

    for subpath, name in files:
        if name.endswith(".wav") and "Chromatic" not in name:
            sampling_rate, music = wavfile.read(subpath)
            np.save(join(THIS_DATA_DIR, name.replace(".wav", ".npy")), music)
            piece = midiread(str(subpath).replace(".wav", "_correct.mid"))
            np.save(join(THIS_DATA_DIR, name.replace(".wav", ".mid.npy")), piece.piano_roll)

    execute_bash("rm -rf %s" % (DOWNLOADED_DIR))
    execute_bash("rm -rf %s" % (DOWNLOADED_ZIP))


text:
HELM_LATEST_VERSION="v2.7.2"

wget http://storage.googleapis.com/kubernetes-helm/helm-${HELM_LATEST_VERSION}-linux-amd64.tar.gz
tar -xvf helm-${HELM_LATEST_VERSION}-linux-amd64.tar.gz
sudo mv linux-amd64/helm /usr/local/bin
rm -f helm-${HELM_LATEST_VERSION}-linux-amd64.tar.gz
rm -rf linux-amd64

# Setup Helm so that it will work with helm dep commands. Only the client
# needs to be setup. In addition, the incubator repo needs to be
# available for charts that depend on it.
helm init -c
helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/

# Install A YAML Linter
# Pinning to a version for consistency
sudo pip install yamllint==1.8.1

# Install YAML Command line reader
wget https://github.com/mikefarah/yaml/releases/download/1.13.1/yaml_linux_amd64
chmod +x yaml_linux_amd64
sudo mv yaml_linux_amd64 /usr/local/bin/yaml

# Install SemVer testing tool
wget https://github.com/Masterminds/vert/releases/download/v0.1.0/vert-v0.1.0-linux-amd64
chmod +x vert-v0.1.0-linux-amd64
sudo mv vert-v0.1.0-linux-amd64 /usr/local/bin/vert


text:
<?php

/**
 * @see Class_Exception
 */

namespace Wbengine\Config\Exception;

//require_once dirname(__DIR__).'/SessionException.php';

class RuntimeException extends \Exception {

}


text:
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)
[![npm version](https://badge.fury.io/js/caperjs.svg)](https://badge.fury.io/js/caperjs)
[![Gitter](https://badges.gitter.im/WMXPY/Caper-js.svg)](https://gitter.im/WMXPY/Caper.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
![downloads](https://img.shields.io/npm/dm/caperjs.svg)

> Achived

:rainbow: A light weight object oriented Ajax and text animate library for JavaScript

## Install

```bash
    $ npm install caperjs --save
```

## Documents

-   See [Wiki of caper element](https://github.com/WMXPY/Caper.js/wiki/caper-element-intro)

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.


text:
<?php

namespace Miser\Entities;

/**
 * Class Entity
 */
abstract class Entity
{
    /**
     * @param string  $key
     *
     * @return mixed
     */
    public function __get(string $key)
    {
        return $this->{$key};
    }

    /**
     * @return array
     */
    public function toArray()
    {
        $reflect = new \ReflectionClass($this);
        $properties = $reflect->getProperties(\ReflectionProperty::IS_PROTECTED);

        $array = [];

        foreach ($properties as $property) {
            $property->setAccessible(true);
            $array[$property->getName()] = $property->getValue($this);
        }

        return $array;
    }
}


text:
@interface RBPersistenceService ()

@property (nonatomic) NSManagedObjectContext *managedObjectContext;

@end

@implementation RBPersistenceService

- (id)initWithManagedObjectContext:(NSManagedObjectContext *)managedObjectContext {
    self = [super init];
    if (self) {
        _managedObjectContext = managedObjectContext;
    }
    return self;
}

- (void)saveRedditItem:(RBRedditItem *)item {
    RedditItemEntity *entity = [NSEntityDescription insertNewObjectForEntityForName:@"RedditItem" inManagedObjectContext:_managedObjectContext];
    entity.title = item.title;
    entity.author = item.author;
    entity.permalink = item.permalink;
    entity.uuid = item.uuid;
    entity.subreddit = item.subreddit;
    NSError *error = nil;
    BOOL success = [_managedObjectContext save:&error];
    if (!success) {
        // STORY: handle failure to save - bubble up to business layer
        NSLog(@"Failed to save item.");
    }
}

- (void)deleteRedditItem:(RBRedditItem *)item {
    NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] initWithEntityName:@"RedditItem"];
    NSString *format = @"title = %@ AND author = %@ AND permalink = %@ AND uuid = %@ AND subreddit = %@";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:format,
                              item.title,
                              item.author,
                              item.permalink,
                              item.uuid,
                              item.subreddit];
    fetchRequest.predicate = predicate;
    NSError *error = nil;
    NSArray *items = [_managedObjectContext executeFetchRequest:fetchRequest error:&error];
    if (!error) {
        if ([items count] == 1) {
            RedditItemEntity *entity = items[0];
            [_managedObjectContext deleteObject:entity];
            BOOL success = [_managedObjectContext save:&error];
            if (!success) {
                // STORY: handle this error - bubble up to management layer
            }
        }
    } else {
        // STORY: handle this error - bubble up to management layer
    }
}

- (void)save {
    NSError *error = nil;
    BOOL success = [_managedObjectContext save:&error];
    if (!success) {
        // STORY: log this error - bubble up to management layer
        NSLog(@"Error saving managed object context: %@", error);
    }
}

- (NSArray *)findAllItemsForSubreddit:(NSString *)feedName {
    NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] initWithEntityName:@"RedditItem"];
    NSString *format = @"subreddit = %@";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:format, feedName];
    fetchRequest.predicate = predicate;
    NSError *error = nil;
    NSArray *items = [_managedObjectContext executeFetchRequest:fetchRequest error:&error];
    if (!items) {
        // STORY: handle this error - bubble up to management layer
        return nil;
    } else {
        return items;
    }
}

- (NSArray *)findAllItemsForSubreddit:(NSString *)feedName notUUID:(NSString *)uuid {
    NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] initWithEntityName:@"RedditItem"];
    NSString *format = @"subreddit = %@ && uuid <> %@";
    NSPredicate *predicate = [NSPredicate predicateWithFormat:format, feedName, uuid];
    fetchRequest.predicate = predicate;
    NSError *error = nil;
    NSArray *items = [_managedObjectContext executeFetchRequest:fetchRequest error:&error];
    if (!items) {
        // STORY: handle this error - bubble up to management layer
        return nil;
    } else {
        return items;
    }
}

@end


text:
template<typename T>
void call_f0(T x) {
  x.Base::f0();
}

struct Base {
  void f0();
};

struct X0 : Base {
  typedef Base CrazyBase;
};

void test_f0(X0 x0) {
  call_f0(x0);
}

template<typename TheBase, typename T>
void call_f0_through_typedef(T x) {
  typedef TheBase Base2;
  x.Base2::f0();
}

void test_f0_through_typedef(X0 x0) {
  call_f0_through_typedef<Base>(x0);
}

template<typename TheBase, typename T>
void call_f0_through_typedef2(T x) {
  typedef TheBase CrazyBase;
#if __cplusplus <= 199711L
  // expected-note@-2 {{lookup from the current scope refers here}}
#endif

  x.CrazyBase::f0(); // expected-error 2{{no member named}}
#if __cplusplus <= 199711L
  // expected-error@-2 {{lookup of 'CrazyBase' in member access expression is ambiguous}}
#endif

}

struct OtherBase { };

struct X1 : Base, OtherBase {
  typedef OtherBase CrazyBase;
#if __cplusplus <= 199711L
  // expected-note@-2 {{lookup in the object type 'X1' refers here}}
#endif
};

void test_f0_through_typedef2(X0 x0, X1 x1) {
  call_f0_through_typedef2<Base>(x0);
  call_f0_through_typedef2<OtherBase>(x1); // expected-note{{instantiation}}
  call_f0_through_typedef2<Base>(x1); // expected-note{{instantiation}}
}

struct X2 {
  operator int() const;
};

template<typename T, typename U>
T convert(const U& value) {
  return value.operator T(); // expected-error{{operator long}}
}

void test_convert(X2 x2) {
  convert<int>(x2);
  convert<long>(x2); // expected-note{{instantiation}}
}

template<typename T>
void destruct(T* ptr) {
  ptr->~T();
  ptr->T::~T();
}

template<typename T>
void destruct_intptr(int *ip) {
  ip->~T();
  ip->T::~T();
}

void test_destruct(X2 *x2p, int *ip) {
  destruct(x2p);
  destruct(ip);
  destruct_intptr<int>(ip);
}

// PR5220
class X3 {
protected:
  template <int> float* &f0();
  template <int> const float* &f0() const;
  void f1() {
    (void)static_cast<float*>(f0<0>());
  }
  void f1() const{
    (void)f0<0>();
  }
};

// Fun with template instantiation and conversions
struct X4 {
  int& member();
  float& member() const;
};

template<typename T>
struct X5 {
  void f(T* ptr) { int& ir = ptr->member(); }
  void g(T* ptr) { float& fr = ptr->member(); }
};

void test_X5(X5<X4> x5, X5<const X4> x5c, X4 *xp, const X4 *cxp) {
  x5.f(xp);
  x5c.g(cxp);
}

// In theory we can do overload resolution at template-definition time on this.
// We should at least not assert.
namespace test4 {
  struct Base {
    template <class T> void foo() {}
  };

  template <class T> struct Foo : Base {
    void test() {
      foo<int>();
    }
  };
}

namespace test5 {
  template<typename T>
  struct X {
    using T::value;

    T &getValue() {
      return &value;
    }
  };
}

// PR8739
namespace test6 {
  struct A {};
  struct B {};
  template <class T> class Base;
  template <class T> class Derived : public Base<T> {
    A *field;
    void get(B **ptr) {
      // It's okay if at some point we figure out how to diagnose this
      // at instantiation time.
      *ptr = field; // expected-error {{assigning to 'test6::B *' from incompatible type 'test6::A *}}
    }
  };
}


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

<title>org.springframework.http.converter.xml (Spring Framework 5.1.18.RELEASE API)</title>
<meta name="date" content="2020-09-15">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Spring Framework

Prev Package

Next Package

Frames

No Frames

All Classes

@NonNullApi
 @NonNullFields

Package org.springframework.http.converter.xml

Provides HttpMessageConverter implementations for handling XML.

See: Description

Class Summary

Class
Description

AbstractJaxb2HttpMessageConverter<T>

Abstract base class for HttpMessageConverters
 that use JAXB2.

AbstractXmlHttpMessageConverter<T>

Abstract base class for HttpMessageConverters
 that convert from/to XML.

Jaxb2CollectionHttpMessageConverter<T extends Collection>

An HttpMessageConverter that can read XML collections using JAXB2.

Jaxb2RootElementHttpMessageConverter

Implementation of HttpMessageConverter that can read and write XML using JAXB2.

MappingJackson2XmlHttpMessageConverter

Implementation of HttpMessageConverter
 that can read and write XML using
 Jackson 2.x extension component for reading and writing XML encoded data.

MarshallingHttpMessageConverter

Implementation of HttpMessageConverter
 that can read and write XML using Spring's Marshaller and Unmarshaller abstractions.

SourceHttpMessageConverter<T extends Source>

Implementation of HttpMessageConverter
 that can read and write Source objects.

Package org.springframework.http.converter.xml Description

Provides HttpMessageConverter implementations for handling XML.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Spring Framework

Prev Package

Next Package

Frames

No Frames

All Classes


text: google-site-verification: google0e7f0f365e47c899.html


text:
package com.intellij.openapi.roots.ui.configuration.classpath;

import com.intellij.ide.IdeBundle;
import com.intellij.openapi.module.ModuleType;
import com.intellij.openapi.roots.LibraryOrderEntry;
import com.intellij.openapi.roots.OrderEntry;
import com.intellij.openapi.roots.libraries.Library;
import com.intellij.openapi.roots.libraries.LibraryType;
import com.intellij.openapi.roots.ui.configuration.projectRoot.StructureConfigurableContext;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.ui.popup.JBPopupFactory;
import com.intellij.openapi.ui.popup.ListPopup;
import com.intellij.openapi.ui.popup.PopupStep;
import com.intellij.openapi.ui.popup.util.BaseListPopupStep;
import com.intellij.util.Icons;
import org.jetbrains.annotations.NotNull;

import javax.swing.*;
import java.util.ArrayList;
import java.util.List;

/**
* @author nik
*/
class AddNewLibraryItemAction extends ChooseAndAddAction<Library> {
  private final StructureConfigurableContext myContext;
  private LibraryType myLibraryType;

  public AddNewLibraryItemAction(final ClasspathPanel classpathPanel,
                                 StructureConfigurableContext context, LibraryType libraryType) {
    super(classpathPanel);
    myContext = context;
    myLibraryType = libraryType;
  }

  protected ClasspathTableItem<?> createTableItem(final Library item) {
    final OrderEntry[] entries = myClasspathPanel.getRootModel().getOrderEntries();
    for (OrderEntry entry : entries) {
      if (entry instanceof LibraryOrderEntry) {
        final LibraryOrderEntry libraryOrderEntry = (LibraryOrderEntry)entry;
        if (item.equals(libraryOrderEntry.getLibrary())) {
          return ClasspathTableItem.createLibItem(libraryOrderEntry, myContext);
        }
      }
    }
    return ClasspathTableItem.createLibItem(myClasspathPanel.getRootModel().addLibraryEntry(item), myContext);
  }

  protected ClasspathElementChooser<Library> createChooser() {
    return new NewLibraryChooser(myClasspathPanel.getProject(), myClasspathPanel.getRootModel(), myLibraryType, myContext, myClasspathPanel.getComponent());
  }

  public static void chooseTypeAndExecute(final ClasspathPanel classpathPanel,
                                          final StructureConfigurableContext context,
                                          final DialogWrapper parentDialog,
                                          JButton contextButton) {
    if (hasSuitableTypes(classpathPanel)) {
      final ListPopup popup = JBPopupFactory.getInstance().createListPopup(createChooseTypeStep(classpathPanel, context, parentDialog));
      popup.showUnderneathOf(contextButton);
    }
    else {
      if (parentDialog != null) parentDialog.close(DialogWrapper.CANCEL_EXIT_CODE);
      new AddNewLibraryItemAction(classpathPanel, context, null).execute();
    }
  }

  public static BaseListPopupStep<LibraryType> createChooseTypeStep(final ClasspathPanel classpathPanel,
                                                                    final StructureConfigurableContext context,
                                                                    final DialogWrapper parentDialog) {
    return new BaseListPopupStep<LibraryType>("Select Library Type", getSuitableTypes(classpathPanel)) {
          @NotNull
          @Override
          public String getTextFor(LibraryType value) {
            return value != null ? value.getCreateActionName() : IdeBundle.message("create.default.library.type.action.name");
          }

          @Override
          public Icon getIconFor(LibraryType aValue) {
            return aValue != null ? aValue.getIcon() : Icons.LIBRARY_ICON;
          }

          @Override
          public PopupStep onChosen(final LibraryType selectedValue, boolean finalChoice) {
            return doFinalStep(new Runnable() {
              @Override
              public void run() {
                if (parentDialog != null) parentDialog.close(DialogWrapper.CANCEL_EXIT_CODE);
                new AddNewLibraryItemAction(classpathPanel, context, selectedValue).execute();
              }
            });
          }
        };
  }

  public static boolean hasSuitableTypes(ClasspathPanel panel) {
    return getSuitableTypes(panel).size() > 1;
  }

  private static List<LibraryType> getSuitableTypes(ClasspathPanel classpathPanel) {
    List<LibraryType> suitableTypes = new ArrayList<LibraryType>();
    suitableTypes.add(null);
    final ModuleType moduleType = classpathPanel.getRootModel().getModule().getModuleType();
    for (LibraryType libraryType : LibraryType.EP_NAME.getExtensions()) {
      if (libraryType.isSuitableModuleType(moduleType)) {
        suitableTypes.add(libraryType);
      }
    }
    return suitableTypes;
  }
}


text:
var describe = require("Jody").describe,
    mock = require("../lib/mock.js"),
    fs,
    fsMock;

describe("Mock node Standard Lib").
  beforeEach(function () {
    fsMock = mock("fs");
    fs = require('fs');
  }).
  it("Should replace standard module", function () {

    fs.should().beEqual(fsMock);

  }).
  it("Should call mock methods", function ()
  {
    mockWasCalled = false;

    fsMock.readdir = function (path, cb) {
      mockWasCalled = true;
    };

    fs.readdir("a path", function () {});

    mockWasCalled.should().beTrue();
  });

describe("Mock user created lib").
  it("Should replace lib in require", function () {
    var runnerMock = mock("../lib/runner.js"),
        mockWasCalled = false;

    runnerMock.runAllSpecs = function () {
      mockWasCalled = true;
    }

    var runner = require("../lib/runner.js");
    runner.runAllSpecs();

    mockWasCalled.should().beTrue();

  });


text:
const path = require('path')

module.exports = {
  publicPath: process.env.NODE_ENV === 'production' ? '/nippou-player/' : '',
  pwa: {
    name: 'Nippou Player',
    themeColor: '#000000',
    iconPaths: {
      favicon32: 'img/icons/favicon-32x32.png',
      favicon16: 'img/icons/favicon-16x16.png',
      appleTouchIcon: 'img/icons/apple-touch-icon.png',
      maskIcon: 'img/icons/safari-pinned-tab.svg',
      msTileImage: 'img/icons/mstile-150x150.png'
    }
  },
  configureWebpack: {
    resolve: {
      modules: [
        path.resolve(__dirname, 'src'),
        path.resolve(__dirname, 'src/components')
      ]
    }
  }
}


text:
//
//  Player.hpp
//  Audiologger
//
//  Created by Malte Poll on 15.02.16.
//  Copyright © 2016 Malte Poll. All rights reserved.
//

#pragma once

#include <mutex>
#include <thread>
#include <time.h>
#include "portaudio.h"
#include "sndfile.hh"

#define NUM_CHANNELS 2
#define PA_SAMPLE_TYPE paFloat32
#define SAMPLE_RATE (44100)
#define FRAMES_PER_BUFFER (1024)
#define SAMPLE_SIZE (4)
#define NUM_SECONDS 10

class Player{
    /* specific init methods for portaudio and sndfile and constructor */
    void init_portaudio();
    void init_sndfile();
    void init();

    /* Class specific data */
    double duration = 0;
    time_t playbackStartingTime = 0;

    bool playing = false;
    char* destPath = nullptr;
    char* sampleBlock = nullptr; //Buffer for playback. Worker reads it from file

    /* portaudio related */
    PaStream *stream = nullptr; //Portaudio Stream Object used to get mic input
    PaStreamParameters outputParameters; //Parameters used to open the stream

    /* sndfile related */
    SF_INFO fileInfo; //fileInfo for the sndfile lib
    SNDFILE* filePtr; //pointer to the opened .wav file

    /* worker vars */ //Might go into own class later for clarity
    bool stopPlaybackThread = false; //Tells the worker when to stop
    bool playbackThreadFinishedPlaying = false;
    std::mutex stopPlaybackThread_mutex;
    std::mutex playbackThreadFinishedPlaying_mutex;//mutex for variable above. Needed for threadsafety
    std::thread* worker = nullptr; //pointer to worker thread

public:
    /* constructor and destructor */
    Player();
    Player(const char destPath[]);
    Player(std::string destPath);
    ~Player();

    /* functions to start and stop a playing. Also to get info if it is currently playing */
    int startPlaying();
    int stopPlaying();
    bool hasPlayerFinished();
    bool isPlaying();

    /* getter and setter for destPath */
    char* getDestPath();
    void setDestPath(const char destPath[]);

    double getDuration();
    void setDuration(double dur);

    double getTimePlayed();
    double getTimeLeft();
};


text:
package com.github.enadim.spring.cloud.ribbon.examples.service2;

import com.github.enadim.spring.cloud.ribbon.examples.ribbon.RibbonClientsFavoriteZoneConfig;
import com.github.enadim.spring.cloud.ribbon.support.EnableContextPropagation;
import com.github.enadim.spring.cloud.ribbon.support.EnableHttpLogging;
import com.github.enadim.spring.cloud.ribbon.support.EurekaInstanceProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.ribbon.RibbonClients;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

import static org.springframework.web.bind.annotation.RequestMethod.GET;

@SpringBootApplication
@EnableEurekaClient
@RibbonClients(defaultConfiguration = {RibbonClientsFavoriteZoneConfig.class})
@EnableContextPropagation
@EnableConfigurationProperties(EurekaInstanceProperties.class)
@RestController
@EnableHttpLogging
public class Service2 {
    @Autowired
    protected EurekaInstanceProperties eurekaInstanceMetadataProperties;

    @RequestMapping(method = GET, value = "/service2/message")
    @ResponseStatus(HttpStatus.OK)
    public String getMessage(@RequestParam(value = "useCase") String useCase) {
        return eurekaInstanceMetadataProperties.getInstanceId();
    }

    public static void main(String[] args) {
        SpringApplication.run(Service2.class, args);
    }
}


text:
// Originally submitted to OSEHRA 2/21/2017 by DSS, Inc.
// Authored by DSS, Inc. 2014-2017

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VA.Gov.Artemis.CDA.ValueSets
{
    public class HistoryOfInfectionValueSet: ValueSet
    {
        public HistoryOfInfectionValueSet()
        {
            this.ValueSetName = "Antepartum Coded History of Infection Value Set";
            this.Id = "1.3.6.1.4.1.19376.1.5.3.1.1.16.5.6";

            InitializeCodes();
        }

        private void InitializeCodes()
        {
            this.Items.Add(new ValueSetItem("170464005", Common.CodingSystem.SnomedCT, "Live with someone with TB or exposed to TB", ""));
            this.Items.Add(new ValueSetItem("402888002", Common.CodingSystem.SnomedCT, "History of Genital Herpes", ""));
            this.Items.Add(new ValueSetItem("240480009", Common.CodingSystem.SnomedCT, "Exposed to Genital Herpes", ""));
            this.Items.Add(new ValueSetItem("49882001", Common.CodingSystem.SnomedCT, "Rash since LMP", ""));
            this.Items.Add(new ValueSetItem("34014006", Common.CodingSystem.SnomedCT, "Viral illness since LMP", ""));
            this.Items.Add(new ValueSetItem("49882001", Common.CodingSystem.SnomedCT, "Rash or viral illness since LMP", ""));
            this.Items.Add(new ValueSetItem("235871004", Common.CodingSystem.SnomedCT, "Hepatitis B", ""));
            this.Items.Add(new ValueSetItem("235872006", Common.CodingSystem.SnomedCT, "Hepatitis C", ""));
            this.Items.Add(new ValueSetItem("8098009", Common.CodingSystem.SnomedCT, "History of STD", ""));
            this.Items.Add(new ValueSetItem("15628003", Common.CodingSystem.SnomedCT, "History of Gonorrhea", ""));
            this.Items.Add(new ValueSetItem("312099009", Common.CodingSystem.SnomedCT, "History of Chlamydia", ""));
            this.Items.Add(new ValueSetItem("302812006", Common.CodingSystem.SnomedCT, "History of HPV", ""));
            this.Items.Add(new ValueSetItem("165816005", Common.CodingSystem.SnomedCT, "History of HIV", ""));
            this.Items.Add(new ValueSetItem("76272004", Common.CodingSystem.SnomedCT, "History of Syphilis", ""));
        }
    }
}


text:
import { IconNames } from '@blueprintjs/icons';
import axios from 'axios';
import React from 'react';

import { StatusDialog } from '../../../dialogs/status-dialog/status-dialog';
import { pluralIfNeeded, QueryManager } from '../../../utils';
import { HomeViewCard } from '../home-view-card/home-view-card';

export interface StatusCardProps {}

export interface StatusCardState {
  statusLoading: boolean;
  version?: string;
  extensionCount?: number;
  statusError?: string;

  showStatusDialog: boolean;
}

interface StatusSummary {
  version: string;
  extensionCount: number;
}

export class StatusCard extends React.PureComponent<StatusCardProps, StatusCardState> {
  private versionQueryManager: QueryManager<null, StatusSummary>;

  constructor(props: StatusCardProps, context: any) {
    super(props, context);

    this.state = {
      statusLoading: true,
      showStatusDialog: false,
    };

    this.versionQueryManager = new QueryManager({
      processQuery: async () => {
        const statusResp = await axios.get('/status');
        return {
          version: statusResp.data.version,
          extensionCount: statusResp.data.modules.length,
        };
      },
      onStateChange: ({ result, loading, error }) => {
        this.setState({
          statusLoading: loading,
          version: result ? result.version : undefined,
          extensionCount: result ? result.extensionCount : undefined,
          statusError: error,
        });
      },
    });
  }

  componentDidMount(): void {
    this.versionQueryManager.runQuery(null);
  }

  componentWillUnmount(): void {
    this.versionQueryManager.terminate();
  }

  private handleStatusDialogOpen = () => {
    this.setState({ showStatusDialog: true });
  };

  private handleStatusDialogClose = () => {
    this.setState({ showStatusDialog: false });
  };

  renderStatusDialog() {
    const { showStatusDialog } = this.state;
    if (!showStatusDialog) return;

    return <StatusDialog onClose={this.handleStatusDialogClose} />;
  }

  render(): JSX.Element {
    const { version, extensionCount, statusLoading, statusError } = this.state;

    return (
      <>
        <HomeViewCard
          className="status-card"
          onClick={this.handleStatusDialogOpen}
          icon={IconNames.GRAPH}
          title="Status"
          loading={statusLoading}
          error={statusError}
        >
          {version &&
{`Apache Druid is running version ${version}`}
}
          {extensionCount &&
{`${pluralIfNeeded(extensionCount, 'extension')} loaded`}
}
        </HomeViewCard>
        {this.renderStatusDialog()}
      </>
    );
  }
}


text:
from __future__ import print_function
import inspect
import sys

from jinja2 import Template

from insights import dr, rule
from insights.core.context import ExecutionContext
from insights.core.spec_factory import ContentProvider
from insights.core.plugins import is_datasource
from insights.formats import render, Formatter

class TemplateFormat(Formatter):
    """
    Subclasses should implement create_template_context to return a dictionary
    to use when rendering the jinja2 template defined by the class level
    TEMPLATE attribute.
    """

    TEMPLATE = ""
    """ jinja2 template to use for rule result rendering. """

    def find_root(self):
        """
        Finds the root directory used during the evaluation. Note this could be
        a non-existent temporary directory if analyzing an archive.
        """
        for comp in self.broker:
            try:
                if issubclass(comp, ExecutionContext):
                    return self.broker[comp].root
            except:
                pass
        return "Unknown"

    def get_datasources(self, comp, broker):
        """
        Get the most relevant activated datasources for each rule.
        """
        graph = dr.get_dependency_graph(comp)
        ds = []
        for cand in graph:
            if cand in broker and is_datasource(cand):
                val = broker[cand]
                if not isinstance(val, list):
                    val = [val]

                results = []
                for v in val:
                    if isinstance(v, ContentProvider):
                        results.append(v.cmd or v.path or "python implementation")
                ds.extend(results)
        return ds

    def collect_rules(self, comp, broker):
        """
        Rule results are stored as dictionaries in the ``self.rules`` list.
        Each dictionary contains the folowing keys:
            name: fully qualified name of the rule
            id: fully qualified rule name with "." replaced with "_"
            response_type: the class name of the response object (make_info, etc.)
            body: rendered content for the rule as provided in the rule module.
            mod_doc: pydoc of the module containing the rule
            rule_doc: pydoc of the rule
            source_path: absolute path to the source file of the rule
            tags: the list of tags associated with the rule
            datasources: sorted list of command or files contributing to the rule
        """
        if comp in broker:
            name = dr.get_name(comp)
            rule_id = name.replace(".", "_")
            val = broker[comp]
            links = dr.get_delegate(comp).links or {}
            self.rules.append({
                "name": name,
                "id": rule_id,
                "response_type": type(val).__name__,
                "body": render(comp, val),
                "mod_doc": sys.modules[comp.__module__].__doc__ or "",
                "rule_doc": comp.__doc__ or "",
                "source_path": inspect.getabsfile(comp),
                "tags": list(dr.get_tags(comp)),
                "datasources": sorted(set(self.get_datasources(comp, broker))),
                "links": links
            })

    def preprocess(self):
        """
        Watches rules go by as they evaluate and collects information about
        them for later display in postprocess.
        """
        self.rules = []
        self.broker.add_observer(self.collect_rules, rule)

    def create_template_context(self):
        raise NotImplementedError()

    def postprocess(self):
        """
        Builds a dictionary of rule data as context for a jinja2 template that
        renders the final output.
        """
        ctx = self.create_template_context()
        print(Template(self.TEMPLATE).render(ctx), file=self.stream)


text: Rails.application.config.session_store :cookie_store, key: '_yourapp_session'


text:
CONST(URI_SERVER_ADDRESS, "");

@interface Constant : NSObject
//@property (readonly) NSString *uri_server_address;
//+ (Constant *)sharedConstant;
@end


text:
layout: page.hbs
title: Installing Node.js via package manager
---

# Installing Node.js via package manager

***Note:*** The packages on this page are maintained and supported by their respective packagers, **not** the Node.js core team. Please report any issues you encounter to the package maintainer. If it turns out your issue is a bug in Node.js itself, the maintainer will report the issue upstream.

----------------------------

* [Arch Linux](#arch-linux)
* [Debian and Ubuntu based Linux distributions](#debian-and-ubuntu-based-linux-distributions)
* [Enterprise Linux and Fedora](#enterprise-linux-and-fedora)
* [FreeBSD and OpenBSD](#freebsd-and-openbsd)
* [Gentoo](#gentoo)
* [NetBSD](#netbsd)
* [openSUSE and SLE](#opensuse-and-sle)
* [OSX](#osx)
* [SmartOS and illumos](#smartos-and-illumos)
* [Void Linux](#void-linux)
* [Windows](#windows)

----------------------------

## Arch Linux

Node.js and npm packages are available in the Community Repository.

```bash
pacman -S nodejs npm
```

## Debian and Ubuntu based Linux distributions

Also including: **Linux Mint**, **Linux Mint Debian Edition (LMDE)**, **elementaryOS** and others.

Node.js is available from the [NodeSource](https://nodesource.com) Debian and Ubuntu binary distributions repository (formerly [Chris Lea's](https://github.com/chrislea) Launchpad PPA). Support for this repository, along with its scripts, can be found on GitHub at [nodesource/distributions](https://github.com/nodesource/distributions).

**NOTE:** If you are using Ubuntu Precise or Debian Wheezy, you might want to read about [running Node.js >= 4.x on older distros](https://github.com/nodesource/distributions/blob/master/OLDER_DISTROS.md).

```bash
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
```

Alternatively, for Node.js v6:

```bash
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
```

***Optional***: install build tools

To compile and install native addons from npm you may also need to install build tools:

```bash
sudo apt-get install -y build-essential
```

**Available architectures:**

* **i386** (32-bit)
* **amd64** (64-bit)
* **armhf** (ARM 32-bit hard-float, ARMv7 and up: _arm-linux-gnueabihf_)

**Supported Ubuntu versions:**

* **Ubuntu 12.04 LTS** (Precise Pangolin)
* **Ubuntu 14.04 LTS** (Trusty Tahr)
* **Ubuntu 16.04 LTS** (Xenial Xerus)

**Supported Debian versions:**

* **Debian 7** (wheezy)
* **Debian 8 / stable** (jessie)
* **Debian testing** (stretch, aliased to jessie)
* **Debian unstable** (sid)

A Node.js package is also available in the [official repo](http://packages.debian.org/search?searchon=names&keywords=nodejs) for Debian Sid (unstable), Jessie (testing) and Wheezy (wheezy-backports) as "nodejs". It only installs a `nodejs` binary.

The [nodejs-legacy package](http://packages.debian.org/search?searchon=names&keywords=nodejs-legacy) installs a `node` symlink that is needed by many modules to build and run correctly.
The Node.js modules available in the distribution official repositories do not need it.

**Supported Linux Mint versions:**

* **Linux Mint 13 "Maya"** (via Ubuntu 12.04 LTS)
* **Linux Mint 17 "Qiana"** (via Ubuntu 14.04 LTS)
* **Linux Mint 17.1 "Rebecca"** (via Ubuntu 14.04 LTS)
* **Linux Mint 17.2 "Rafaela"** (via Ubuntu 14.04 LTS)
* **Linux Mint Debian Edition (LMDE) 2 "Betsy"** (via Debian 8)

**Supported elementary OS versions:**

* **elementary OS Luna** (via Ubuntu 12.04 LTS)
* **elementary OS Freya** (via Ubuntu 14.04 LTS)

**Supported Trisquel versions:**

* **Trisquel 6 "Toutatis"** (via Ubuntu 12.04 LTS)
* **Trisquel 7 "Belenos"** (via Ubuntu 14.04 LTS)

**Supported BOSS versions:**

* **BOSS 5.0 "Anokha"** (via Debian 7)

## Enterprise Linux and Fedora

Including **Red Hat® Enterprise Linux®** / **RHEL**, **CentOS** and **Fedora**.

Node.js is available from the [NodeSource](https://nodesource.com) Enterprise Linux and Fedora binary distributions repository. Support for this repository, along with its scripts, can be found on GitHub at [nodesource/distributions](https://github.com/nodesource/distributions).

Note that the Node.js packages for EL 5 (RHEL5 and CentOS 5) depend on the **[EPEL](https://fedoraproject.org/wiki/EPEL)** repository being available. The setup script will check and provide instructions if it is not installed.

Run as root on RHEL, CentOS or Fedora, for Node.js v4 LTS Argon:

```bash
curl --silent --location https://rpm.nodesource.com/setup_4.x | bash -
```

Alternatively for Node.js v6:

```bash
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
```

Alternatively for Node.js 0.10:

```bash
curl --silent --location https://rpm.nodesource.com/setup | bash -
```

Then install, as root:

```bash
yum -y install nodejs
```

***Optional***: install build tools

To compile and install native addons from npm you may also need to install build tools:

```bash
yum install gcc-c++ make
# or: yum groupinstall 'Development Tools'
```

**Available architectures:**

* **i386** (32-bit, not available for EL7)
* **x86_64** (64-bit)

**Supported Red Hat® Enterprise Linux® versions:**

* **RHEL 5** (32-bit and 64-bit)
* **RHEL 6** (32-bit and 64-bit)
* **RHEL 7** (64-bit)

**Supported CentOS versions:**

* **CentOS 5** (32-bit and 64-bit)
* **CentOS 6** (32-bit and 64-bit)
* **CentOS 7** (64-bit)

**Supported CloudLinux versions:**
* **CloudLinux 6** (32-bit and 64-bit)

**Supported Fedora versions:**

* **Fedora 21 (Twenty One)** (32-bit and 64-bit)
* **Fedora 20 (Heisenbug)** (32-bit and 64-bit)
* **Fedora 19 (Schrödinger's Cat)** (32-bit and 64-bit)

**Other distributions known to be supported:**

* **Oracle Linux** (mirrors RHEL very closely)
* **Amazon Linux** (tested on 2014.03)

### Alternatives

Official **Fedora** [Node.js](https://apps.fedoraproject.org/packages/nodejs) and [npm](https://apps.fedoraproject.org/packages/npm) packages are available in Fedora 18 and later.  Install with:

```bash
sudo yum install nodejs npm
```

In a hurry for the latest updates?  [Grab them from updates-testing.](https://fedoraproject.org/wiki/QA:Updates_Testing)

**Enterprise Linux** (RHEL and CentOS) users may use the Node.js and npm packages from the [EPEL](https://fedoraproject.org/wiki/EPEL) repository.

Install the appropriate *epel-release* RPM for your version (found on the [EPEL](https://fedoraproject.org/wiki/EPEL) repository homepage), then run:

```bash
sudo yum install nodejs npm --enablerepo=epel
```

In a hurry for the latest updates?  [Grab them from epel-testing.](https://fedoraproject.org/wiki/EPEL/testing)

**Available architectures:**

* **i686** (32-bit, not available for EL7)
* **x86_64** (64-bit)
* **armv6hl** (Raspberry Pi, [Pidora](http://pidora.ca) only)
* **armv7hl** (32-bit ARM hard-float, ARMv7 and up, Fedora only)

**Supported Red Hat® Enterprise Linux® versions:**

* **RHEL 6** (i686/x86_64)
* **RHEL 7** (x86_64)

Additionally, versions of **CentOS** and **Scientific Linux** corresponding to the above RHEL versions are also officially supported by all EPEL packages, including nodejs.  Amazon Linux is not officially supported by EPEL due to significant incompatibilities previously reported to the epel-devel mailing list, however you might find that nodejs at least still works.

**Supported Fedora versions:**

* **Fedora Rawhide** (i686/x86_64/armv7hl)
* **Fedora 21** (i686/x86_64/armv7hl)
* **Fedora 20 (Heisenbug)** (i686/x86_64/armv6hl/armv7hl)
* **Fedora 19 (Schrödinger's Cat)** (i686/x86_64/armv7hl)

## FreeBSD and OpenBSD

Node.js is available through the ports system.

```bash
/usr/ports/www/node
```

Development versions are also available using ports

```bash
cd /usr/ports/www/node-devel/ && make install clean
```

Or packages on FreeBSD:

```bash
pkg_add -r node-devel
```

Using [pkg-ng](https://wiki.freebsd.org/pkgng) on FreeBSD

```bash
pkg install node
```

Or the development versions:

```bash
pkg install node-devel
```

## Gentoo

Node.js is available in the portage tree.

```bash
emerge nodejs
```

## NetBSD

Node.js is available in the pkgsrc tree:

```bash
cd /usr/pkgsrc/lang/nodejs && make install
```

Or install a binary package (if available for your platform) using pkgin:

```bash
pkgin -y install nodejs
```

## openSUSE and SLE

[Download Node.js via openSUSE one-click](http://software.opensuse.org/download.html?project=devel%3Alanguages%3Anodejs&package=nodejs).

Available RPM packages for: openSUSE 11.4, 12.1, 12.2, 12.3, 13.1, Factory and Tumbleweed; SLE 11 (with SP1/SP2/SP3 variations).

Example install on openSUSE 13.1:

```bash
sudo zypper ar \
  http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ \
  Node.js
sudo zypper in nodejs nodejs-devel
```

## OSX

Simply download the [Macintosh Installer](http://nodejs.org/#download) direct from the [nodejs.org](http://nodejs.org) web site.

_If you want to download the package with bash:_

```bash
curl "https://nodejs.org/dist/latest/node-${VERSION:-$(wget -qO- https://nodejs.org/dist/latest/ | sed -nE 's|.*>node-(.*)\.pkg</a>.*|\1|p')}.pkg" > "$HOME/Downloads/node-latest.pkg" && sudo installer -store -pkg "$HOME/Downloads/node-latest.pkg" -target "/"
```

### Alternatives

Using **[Homebrew](http://brew.sh/)**:

```bash
brew install node
```

Using **[MacPorts](http://www.macports.org/)**:

```bash
port install nodejs
```

Using **[pkgsrc](https://pkgsrc.joyent.com/install-on-osx/)**:

Install the binary package:

```bash
pkgin -y install nodejs
```

Or build manually from pkgsrc:

```bash
cd pkgsrc/lang/nodejs && bmake install
```

## SmartOS and illumos

SmartOS images come with pkgsrc pre-installed.  On other illumos distributions, first install **[pkgsrc](https://pkgsrc.joyent.com/install-on-illumos/)**, then you may install the binary package as normal:

```bash
pkgin -y install nodejs
```

Or build manually from pkgsrc:

```bash
cd pkgsrc/lang/nodejs && bmake install
```

## Void Linux

Void Linux ships node.js stable in the main repository.

```bash
xbps-install -Sy nodejs
```

## Windows

Simply download the [Windows Installer](http://nodejs.org/#download) directly from the [nodejs.org](http://nodejs.org) web site.

### Alternatives

Using **[Chocolatey](http://chocolatey.org)**:

```bash
cinst nodejs
# or for full install with npm
cinst nodejs.install
```

Using **[Scoop](http://scoop.sh/)**:

```bash
scoop install nodejs
```


text:
require 'serverspec'
require 'pathname'
require 'net/http'
require 'net/smtp'

set :backend, :exec