text:
WINRT_EXPORT namespace winrt {

namespace Windows::UI::ApplicationSettings {

template <typename L> CredentialCommandCredentialDeletedHandler::CredentialCommandCredentialDeletedHandler(L lambda) :
    CredentialCommandCredentialDeletedHandler(impl::make_delegate<impl_CredentialCommandCredentialDeletedHandler<L>, CredentialCommandCredentialDeletedHandler>(std::forward<L>(lambda)))
{}

template <typename F> CredentialCommandCredentialDeletedHandler::CredentialCommandCredentialDeletedHandler(F * function) :
    CredentialCommandCredentialDeletedHandler([=](auto && ... args) { function(args ...); })
{}

template <typename O, typename M> CredentialCommandCredentialDeletedHandler::CredentialCommandCredentialDeletedHandler(O * object, M method) :
    CredentialCommandCredentialDeletedHandler([=](auto && ... args) { ((*object).*(method))(args ...); })
{}

inline void CredentialCommandCredentialDeletedHandler::operator()(const Windows::UI::ApplicationSettings::CredentialCommand & command) const
{
    check_hresult((*this)->abi_Invoke(get(command)));
}

template <typename L> WebAccountCommandInvokedHandler::WebAccountCommandInvokedHandler(L lambda) :
    WebAccountCommandInvokedHandler(impl::make_delegate<impl_WebAccountCommandInvokedHandler<L>, WebAccountCommandInvokedHandler>(std::forward<L>(lambda)))
{}

template <typename F> WebAccountCommandInvokedHandler::WebAccountCommandInvokedHandler(F * function) :
    WebAccountCommandInvokedHandler([=](auto && ... args) { function(args ...); })
{}

template <typename O, typename M> WebAccountCommandInvokedHandler::WebAccountCommandInvokedHandler(O * object, M method) :
    WebAccountCommandInvokedHandler([=](auto && ... args) { ((*object).*(method))(args ...); })
{}

inline void WebAccountCommandInvokedHandler::operator()(const Windows::UI::ApplicationSettings::WebAccountCommand & command, const Windows::UI::ApplicationSettings::WebAccountInvokedArgs & args) const
{
    check_hresult((*this)->abi_Invoke(get(command), get(args)));
}

template <typename L> WebAccountProviderCommandInvokedHandler::WebAccountProviderCommandInvokedHandler(L lambda) :
    WebAccountProviderCommandInvokedHandler(impl::make_delegate<impl_WebAccountProviderCommandInvokedHandler<L>, WebAccountProviderCommandInvokedHandler>(std::forward<L>(lambda)))
{}

template <typename F> WebAccountProviderCommandInvokedHandler::WebAccountProviderCommandInvokedHandler(F * function) :
    WebAccountProviderCommandInvokedHandler([=](auto && ... args) { function(args ...); })
{}

template <typename O, typename M> WebAccountProviderCommandInvokedHandler::WebAccountProviderCommandInvokedHandler(O * object, M method) :
    WebAccountProviderCommandInvokedHandler([=](auto && ... args) { ((*object).*(method))(args ...); })
{}

inline void WebAccountProviderCommandInvokedHandler::operator()(const Windows::UI::ApplicationSettings::WebAccountProviderCommand & command) const
{
    check_hresult((*this)->abi_Invoke(get(command)));
}

}

namespace impl {

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::IAccountsSettingsPane> : produce_base<D, Windows::UI::ApplicationSettings::IAccountsSettingsPane>
{
    HRESULT __stdcall add_AccountCommandsRequested(abi_arg_in<Windows::Foundation::TypedEventHandler<Windows::UI::ApplicationSettings::AccountsSettingsPane, Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs>> handler, event_token * cookie) noexcept override
    {
        try
        {
            *cookie = detach(this->shim().AccountCommandsRequested(*reinterpret_cast<const Windows::Foundation::TypedEventHandler<Windows::UI::ApplicationSettings::AccountsSettingsPane, Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs> *>(&handler)));
            return S_OK;
        }
        catch (...)
        {
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall remove_AccountCommandsRequested(event_token cookie) noexcept override
    {
        try
        {
            this->shim().AccountCommandsRequested(cookie);
            return S_OK;
        }
        catch (...)
        {
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::IAccountsSettingsPaneCommandsRequestedEventArgs> : produce_base<D, Windows::UI::ApplicationSettings::IAccountsSettingsPaneCommandsRequestedEventArgs>
{
    HRESULT __stdcall get_WebAccountProviderCommands(abi_arg_out<Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::WebAccountProviderCommand>> value) noexcept override
    {
        try
        {
            *value = detach(this->shim().WebAccountProviderCommands());
            return S_OK;
        }
        catch (...)
        {
            *value = nullptr;
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall get_WebAccountCommands(abi_arg_out<Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::WebAccountCommand>> value) noexcept override
    {
        try
        {
            *value = detach(this->shim().WebAccountCommands());
            return S_OK;
        }
        catch (...)
        {
            *value = nullptr;
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall get_CredentialCommands(abi_arg_out<Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::CredentialCommand>> value) noexcept override
    {
        try
        {
            *value = detach(this->shim().CredentialCommands());
            return S_OK;
        }
        catch (...)
        {
            *value = nullptr;
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall get_Commands(abi_arg_out<Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::SettingsCommand>> value) noexcept override
    {
        try
        {
            *value = detach(this->shim().Commands());
            return S_OK;
        }
        catch (...)
        {
            *value = nullptr;
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall get_HeaderText(abi_arg_out<hstring> value) noexcept override
    {
        try
        {
            *value = detach(this->shim().HeaderText());
            return S_OK;
        }
        catch (...)
        {
            *value = nullptr;
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall put_HeaderText(abi_arg_in<hstring> value) noexcept override
    {
        try
        {
            this->shim().HeaderText(*reinterpret_cast<const hstring *>(&value));
            return S_OK;
        }
        catch (...)
        {
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall abi_GetDeferral(abi_arg_out<Windows::UI::ApplicationSettings::IAccountsSettingsPaneEventDeferral> deferral) noexcept override
    {
        try
        {
            *deferral = detach(this->shim().GetDeferral());
            return S_OK;
        }
        catch (...)
        {
            *deferral = nullptr;
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::IAccountsSettingsPaneEventDeferral> : produce_base<D, Windows::UI::ApplicationSettings::IAccountsSettingsPaneEventDeferral>
{
    HRESULT __stdcall abi_Complete() noexcept override
    {
        try
        {
            this->shim().Complete();
            return S_OK;
        }
        catch (...)
        {
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::IAccountsSettingsPaneStatics> : produce_base<D, Windows::UI::ApplicationSettings::IAccountsSettingsPaneStatics>
{
    HRESULT __stdcall abi_GetForCurrentView(abi_arg_out<Windows::UI::ApplicationSettings::IAccountsSettingsPane> current) noexcept override
    {
        try
        {
            *current = detach(this->shim().GetForCurrentView());
            return S_OK;
        }
        catch (...)
        {
            *current = nullptr;
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall abi_Show() noexcept override
    {
        try
        {
            this->shim().Show();
            return S_OK;
        }
        catch (...)
        {
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::IAccountsSettingsPaneStatics2> : produce_base<D, Windows::UI::ApplicationSettings::IAccountsSettingsPaneStatics2>
{
    HRESULT __stdcall abi_ShowManageAccountsAsync(abi_arg_out<Windows::Foundation::IAsyncAction> asyncInfo) noexcept override
    {
        try
        {
            *asyncInfo = detach(this->shim().ShowManageAccountsAsync());
            return S_OK;
        }
        catch (...)
        {
            *asyncInfo = nullptr;
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall abi_ShowAddAccountAsync(abi_arg_out<Windows::Foundation::IAsyncAction> asyncInfo) noexcept override
    {
        try
        {
            *asyncInfo = detach(this->shim().ShowAddAccountAsync());
            return S_OK;
        }
        catch (...)
        {
            *asyncInfo = nullptr;
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::ICredentialCommand> : produce_base<D, Windows::UI::ApplicationSettings::ICredentialCommand>
{
    HRESULT __stdcall get_PasswordCredential(abi_arg_out<Windows::Security::Credentials::IPasswordCredential> value) noexcept override
    {
        try
        {
            *value = detach(this->shim().PasswordCredential());
            return S_OK;
        }
        catch (...)
        {
            *value = nullptr;
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall get_CredentialDeleted(abi_arg_out<Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler> value) noexcept override
    {
        try
        {
            *value = detach(this->shim().CredentialDeleted());
            return S_OK;
        }
        catch (...)
        {
            *value = nullptr;
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::ICredentialCommandFactory> : produce_base<D, Windows::UI::ApplicationSettings::ICredentialCommandFactory>
{
    HRESULT __stdcall abi_CreateCredentialCommand(abi_arg_in<Windows::Security::Credentials::IPasswordCredential> passwordCredential, abi_arg_out<Windows::UI::ApplicationSettings::ICredentialCommand> instance) noexcept override
    {
        try
        {
            *instance = detach(this->shim().CreateCredentialCommand(*reinterpret_cast<const Windows::Security::Credentials::PasswordCredential *>(&passwordCredential)));
            return S_OK;
        }
        catch (...)
        {
            *instance = nullptr;
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall abi_CreateCredentialCommandWithHandler(abi_arg_in<Windows::Security::Credentials::IPasswordCredential> passwordCredential, abi_arg_in<Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler> deleted, abi_arg_out<Windows::UI::ApplicationSettings::ICredentialCommand> instance) noexcept override
    {
        try
        {
            *instance = detach(this->shim().CreateCredentialCommandWithHandler(*reinterpret_cast<const Windows::Security::Credentials::PasswordCredential *>(&passwordCredential), *reinterpret_cast<const Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler *>(&deleted)));
            return S_OK;
        }
        catch (...)
        {
            *instance = nullptr;
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::ISettingsCommandFactory> : produce_base<D, Windows::UI::ApplicationSettings::ISettingsCommandFactory>
{
    HRESULT __stdcall abi_CreateSettingsCommand(abi_arg_in<Windows::IInspectable> settingsCommandId, abi_arg_in<hstring> label, abi_arg_in<Windows::UI::Popups::UICommandInvokedHandler> handler, abi_arg_out<Windows::UI::Popups::IUICommand> instance) noexcept override
    {
        try
        {
            *instance = detach(this->shim().CreateSettingsCommand(*reinterpret_cast<const Windows::IInspectable *>(&settingsCommandId), *reinterpret_cast<const hstring *>(&label), *reinterpret_cast<const Windows::UI::Popups::UICommandInvokedHandler *>(&handler)));
            return S_OK;
        }
        catch (...)
        {
            *instance = nullptr;
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::ISettingsCommandStatics> : produce_base<D, Windows::UI::ApplicationSettings::ISettingsCommandStatics>
{
    HRESULT __stdcall get_AccountsCommand(abi_arg_out<Windows::UI::Popups::IUICommand> value) noexcept override
    {
        try
        {
            *value = detach(this->shim().AccountsCommand());
            return S_OK;
        }
        catch (...)
        {
            *value = nullptr;
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::ISettingsPane> : produce_base<D, Windows::UI::ApplicationSettings::ISettingsPane>
{
    HRESULT __stdcall add_CommandsRequested(abi_arg_in<Windows::Foundation::TypedEventHandler<Windows::UI::ApplicationSettings::SettingsPane, Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs>> handler, event_token * cookie) noexcept override
    {
        try
        {
            *cookie = detach(this->shim().CommandsRequested(*reinterpret_cast<const Windows::Foundation::TypedEventHandler<Windows::UI::ApplicationSettings::SettingsPane, Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs> *>(&handler)));
            return S_OK;
        }
        catch (...)
        {
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall remove_CommandsRequested(event_token cookie) noexcept override
    {
        try
        {
            this->shim().CommandsRequested(cookie);
            return S_OK;
        }
        catch (...)
        {
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::ISettingsPaneCommandsRequest> : produce_base<D, Windows::UI::ApplicationSettings::ISettingsPaneCommandsRequest>
{
    HRESULT __stdcall get_ApplicationCommands(abi_arg_out<Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::SettingsCommand>> value) noexcept override
    {
        try
        {
            *value = detach(this->shim().ApplicationCommands());
            return S_OK;
        }
        catch (...)
        {
            *value = nullptr;
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::ISettingsPaneCommandsRequestedEventArgs> : produce_base<D, Windows::UI::ApplicationSettings::ISettingsPaneCommandsRequestedEventArgs>
{
    HRESULT __stdcall get_Request(abi_arg_out<Windows::UI::ApplicationSettings::ISettingsPaneCommandsRequest> request) noexcept override
    {
        try
        {
            *request = detach(this->shim().Request());
            return S_OK;
        }
        catch (...)
        {
            *request = nullptr;
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::ISettingsPaneStatics> : produce_base<D, Windows::UI::ApplicationSettings::ISettingsPaneStatics>
{
    HRESULT __stdcall abi_GetForCurrentView(abi_arg_out<Windows::UI::ApplicationSettings::ISettingsPane> current) noexcept override
    {
        try
        {
            *current = detach(this->shim().GetForCurrentView());
            return S_OK;
        }
        catch (...)
        {
            *current = nullptr;
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall abi_Show() noexcept override
    {
        try
        {
            this->shim().Show();
            return S_OK;
        }
        catch (...)
        {
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall get_Edge(Windows::UI::ApplicationSettings::SettingsEdgeLocation * value) noexcept override
    {
        try
        {
            *value = detach(this->shim().Edge());
            return S_OK;
        }
        catch (...)
        {
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::IWebAccountCommand> : produce_base<D, Windows::UI::ApplicationSettings::IWebAccountCommand>
{
    HRESULT __stdcall get_WebAccount(abi_arg_out<Windows::Security::Credentials::IWebAccount> value) noexcept override
    {
        try
        {
            *value = detach(this->shim().WebAccount());
            return S_OK;
        }
        catch (...)
        {
            *value = nullptr;
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall get_Invoked(abi_arg_out<Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler> value) noexcept override
    {
        try
        {
            *value = detach(this->shim().Invoked());
            return S_OK;
        }
        catch (...)
        {
            *value = nullptr;
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall get_Actions(Windows::UI::ApplicationSettings::SupportedWebAccountActions * value) noexcept override
    {
        try
        {
            *value = detach(this->shim().Actions());
            return S_OK;
        }
        catch (...)
        {
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::IWebAccountCommandFactory> : produce_base<D, Windows::UI::ApplicationSettings::IWebAccountCommandFactory>
{
    HRESULT __stdcall abi_CreateWebAccountCommand(abi_arg_in<Windows::Security::Credentials::IWebAccount> webAccount, abi_arg_in<Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler> invoked, Windows::UI::ApplicationSettings::SupportedWebAccountActions actions, abi_arg_out<Windows::UI::ApplicationSettings::IWebAccountCommand> instance) noexcept override
    {
        try
        {
            *instance = detach(this->shim().CreateWebAccountCommand(*reinterpret_cast<const Windows::Security::Credentials::WebAccount *>(&webAccount), *reinterpret_cast<const Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler *>(&invoked), actions));
            return S_OK;
        }
        catch (...)
        {
            *instance = nullptr;
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::IWebAccountInvokedArgs> : produce_base<D, Windows::UI::ApplicationSettings::IWebAccountInvokedArgs>
{
    HRESULT __stdcall get_Action(Windows::UI::ApplicationSettings::WebAccountAction * action) noexcept override
    {
        try
        {
            *action = detach(this->shim().Action());
            return S_OK;
        }
        catch (...)
        {
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::IWebAccountProviderCommand> : produce_base<D, Windows::UI::ApplicationSettings::IWebAccountProviderCommand>
{
    HRESULT __stdcall get_WebAccountProvider(abi_arg_out<Windows::Security::Credentials::IWebAccountProvider> value) noexcept override
    {
        try
        {
            *value = detach(this->shim().WebAccountProvider());
            return S_OK;
        }
        catch (...)
        {
            *value = nullptr;
            return impl::to_hresult();
        }
    }

    HRESULT __stdcall get_Invoked(abi_arg_out<Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler> value) noexcept override
    {
        try
        {
            *value = detach(this->shim().Invoked());
            return S_OK;
        }
        catch (...)
        {
            *value = nullptr;
            return impl::to_hresult();
        }
    }
};

template <typename D>
struct produce<D, Windows::UI::ApplicationSettings::IWebAccountProviderCommandFactory> : produce_base<D, Windows::UI::ApplicationSettings::IWebAccountProviderCommandFactory>
{
    HRESULT __stdcall abi_CreateWebAccountProviderCommand(abi_arg_in<Windows::Security::Credentials::IWebAccountProvider> webAccountProvider, abi_arg_in<Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler> invoked, abi_arg_out<Windows::UI::ApplicationSettings::IWebAccountProviderCommand> instance) noexcept override
    {
        try
        {
            *instance = detach(this->shim().CreateWebAccountProviderCommand(*reinterpret_cast<const Windows::Security::Credentials::WebAccountProvider *>(&webAccountProvider), *reinterpret_cast<const Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler *>(&invoked)));
            return S_OK;
        }
        catch (...)
        {
            *instance = nullptr;
            return impl::to_hresult();
        }
    }
};

}

namespace Windows::UI::ApplicationSettings {

template <typename D> Windows::UI::ApplicationSettings::SettingsCommand impl_ISettingsCommandFactory<D>::CreateSettingsCommand(const Windows::IInspectable & settingsCommandId, hstring_ref label, const Windows::UI::Popups::UICommandInvokedHandler & handler) const
{
    Windows::UI::ApplicationSettings::SettingsCommand instance { nullptr };
    check_hresult(static_cast<const ISettingsCommandFactory &>(static_cast<const D &>(*this))->abi_CreateSettingsCommand(get(settingsCommandId), get(label), get(handler), put(instance)));
    return instance;
}

template <typename D> Windows::UI::ApplicationSettings::SettingsCommand impl_ISettingsCommandStatics<D>::AccountsCommand() const
{
    Windows::UI::ApplicationSettings::SettingsCommand value { nullptr };
    check_hresult(static_cast<const ISettingsCommandStatics &>(static_cast<const D &>(*this))->get_AccountsCommand(put(value)));
    return value;
}

template <typename D> Windows::UI::ApplicationSettings::WebAccountProviderCommand impl_IWebAccountProviderCommandFactory<D>::CreateWebAccountProviderCommand(const Windows::Security::Credentials::WebAccountProvider & webAccountProvider, const Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler & invoked) const
{
    Windows::UI::ApplicationSettings::WebAccountProviderCommand instance { nullptr };
    check_hresult(static_cast<const IWebAccountProviderCommandFactory &>(static_cast<const D &>(*this))->abi_CreateWebAccountProviderCommand(get(webAccountProvider), get(invoked), put(instance)));
    return instance;
}

template <typename D> Windows::Security::Credentials::WebAccountProvider impl_IWebAccountProviderCommand<D>::WebAccountProvider() const
{
    Windows::Security::Credentials::WebAccountProvider value { nullptr };
    check_hresult(static_cast<const IWebAccountProviderCommand &>(static_cast<const D &>(*this))->get_WebAccountProvider(put(value)));
    return value;
}

template <typename D> Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler impl_IWebAccountProviderCommand<D>::Invoked() const
{
    Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler value {};
    check_hresult(static_cast<const IWebAccountProviderCommand &>(static_cast<const D &>(*this))->get_Invoked(put(value)));
    return value;
}

template <typename D> Windows::UI::ApplicationSettings::WebAccountAction impl_IWebAccountInvokedArgs<D>::Action() const
{
    Windows::UI::ApplicationSettings::WebAccountAction action {};
    check_hresult(static_cast<const IWebAccountInvokedArgs &>(static_cast<const D &>(*this))->get_Action(&action));
    return action;
}

template <typename D> Windows::UI::ApplicationSettings::WebAccountCommand impl_IWebAccountCommandFactory<D>::CreateWebAccountCommand(const Windows::Security::Credentials::WebAccount & webAccount, const Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler & invoked, Windows::UI::ApplicationSettings::SupportedWebAccountActions actions) const
{
    Windows::UI::ApplicationSettings::WebAccountCommand instance { nullptr };
    check_hresult(static_cast<const IWebAccountCommandFactory &>(static_cast<const D &>(*this))->abi_CreateWebAccountCommand(get(webAccount), get(invoked), actions, put(instance)));
    return instance;
}

template <typename D> Windows::Security::Credentials::WebAccount impl_IWebAccountCommand<D>::WebAccount() const
{
    Windows::Security::Credentials::WebAccount value { nullptr };
    check_hresult(static_cast<const IWebAccountCommand &>(static_cast<const D &>(*this))->get_WebAccount(put(value)));
    return value;
}

template <typename D> Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler impl_IWebAccountCommand<D>::Invoked() const
{
    Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler value {};
    check_hresult(static_cast<const IWebAccountCommand &>(static_cast<const D &>(*this))->get_Invoked(put(value)));
    return value;
}

template <typename D> Windows::UI::ApplicationSettings::SupportedWebAccountActions impl_IWebAccountCommand<D>::Actions() const
{
    Windows::UI::ApplicationSettings::SupportedWebAccountActions value {};
    check_hresult(static_cast<const IWebAccountCommand &>(static_cast<const D &>(*this))->get_Actions(&value));
    return value;
}

template <typename D> Windows::UI::ApplicationSettings::CredentialCommand impl_ICredentialCommandFactory<D>::CreateCredentialCommand(const Windows::Security::Credentials::PasswordCredential & passwordCredential) const
{
    Windows::UI::ApplicationSettings::CredentialCommand instance { nullptr };
    check_hresult(static_cast<const ICredentialCommandFactory &>(static_cast<const D &>(*this))->abi_CreateCredentialCommand(get(passwordCredential), put(instance)));
    return instance;
}

template <typename D> Windows::UI::ApplicationSettings::CredentialCommand impl_ICredentialCommandFactory<D>::CreateCredentialCommandWithHandler(const Windows::Security::Credentials::PasswordCredential & passwordCredential, const Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler & deleted) const
{
    Windows::UI::ApplicationSettings::CredentialCommand instance { nullptr };
    check_hresult(static_cast<const ICredentialCommandFactory &>(static_cast<const D &>(*this))->abi_CreateCredentialCommandWithHandler(get(passwordCredential), get(deleted), put(instance)));
    return instance;
}

template <typename D> Windows::Security::Credentials::PasswordCredential impl_ICredentialCommand<D>::PasswordCredential() const
{
    Windows::Security::Credentials::PasswordCredential value { nullptr };
    check_hresult(static_cast<const ICredentialCommand &>(static_cast<const D &>(*this))->get_PasswordCredential(put(value)));
    return value;
}

template <typename D> Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler impl_ICredentialCommand<D>::CredentialDeleted() const
{
    Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler value {};
    check_hresult(static_cast<const ICredentialCommand &>(static_cast<const D &>(*this))->get_CredentialDeleted(put(value)));
    return value;
}

template <typename D> void impl_IAccountsSettingsPaneEventDeferral<D>::Complete() const
{
    check_hresult(static_cast<const IAccountsSettingsPaneEventDeferral &>(static_cast<const D &>(*this))->abi_Complete());
}

template <typename D> Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::WebAccountProviderCommand> impl_IAccountsSettingsPaneCommandsRequestedEventArgs<D>::WebAccountProviderCommands() const
{
    Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::WebAccountProviderCommand> value;
    check_hresult(static_cast<const IAccountsSettingsPaneCommandsRequestedEventArgs &>(static_cast<const D &>(*this))->get_WebAccountProviderCommands(put(value)));
    return value;
}

template <typename D> Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::WebAccountCommand> impl_IAccountsSettingsPaneCommandsRequestedEventArgs<D>::WebAccountCommands() const
{
    Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::WebAccountCommand> value;
    check_hresult(static_cast<const IAccountsSettingsPaneCommandsRequestedEventArgs &>(static_cast<const D &>(*this))->get_WebAccountCommands(put(value)));
    return value;
}

template <typename D> Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::CredentialCommand> impl_IAccountsSettingsPaneCommandsRequestedEventArgs<D>::CredentialCommands() const
{
    Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::CredentialCommand> value;
    check_hresult(static_cast<const IAccountsSettingsPaneCommandsRequestedEventArgs &>(static_cast<const D &>(*this))->get_CredentialCommands(put(value)));
    return value;
}

template <typename D> Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::SettingsCommand> impl_IAccountsSettingsPaneCommandsRequestedEventArgs<D>::Commands() const
{
    Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::SettingsCommand> value;
    check_hresult(static_cast<const IAccountsSettingsPaneCommandsRequestedEventArgs &>(static_cast<const D &>(*this))->get_Commands(put(value)));
    return value;
}

template <typename D> hstring impl_IAccountsSettingsPaneCommandsRequestedEventArgs<D>::HeaderText() const
{
    hstring value;
    check_hresult(static_cast<const IAccountsSettingsPaneCommandsRequestedEventArgs &>(static_cast<const D &>(*this))->get_HeaderText(put(value)));
    return value;
}

template <typename D> void impl_IAccountsSettingsPaneCommandsRequestedEventArgs<D>::HeaderText(hstring_ref value) const
{
    check_hresult(static_cast<const IAccountsSettingsPaneCommandsRequestedEventArgs &>(static_cast<const D &>(*this))->put_HeaderText(get(value)));
}

template <typename D> Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral impl_IAccountsSettingsPaneCommandsRequestedEventArgs<D>::GetDeferral() const
{
    Windows::UI::ApplicationSettings::AccountsSettingsPaneEventDeferral deferral { nullptr };
    check_hresult(static_cast<const IAccountsSettingsPaneCommandsRequestedEventArgs &>(static_cast<const D &>(*this))->abi_GetDeferral(put(deferral)));
    return deferral;
}

template <typename D> Windows::UI::ApplicationSettings::AccountsSettingsPane impl_IAccountsSettingsPaneStatics<D>::GetForCurrentView() const
{
    Windows::UI::ApplicationSettings::AccountsSettingsPane current { nullptr };
    check_hresult(static_cast<const IAccountsSettingsPaneStatics &>(static_cast<const D &>(*this))->abi_GetForCurrentView(put(current)));
    return current;
}

template <typename D> void impl_IAccountsSettingsPaneStatics<D>::Show() const
{
    check_hresult(static_cast<const IAccountsSettingsPaneStatics &>(static_cast<const D &>(*this))->abi_Show());
}

template <typename D> Windows::Foundation::IAsyncAction impl_IAccountsSettingsPaneStatics2<D>::ShowManageAccountsAsync() const
{
    Windows::Foundation::IAsyncAction asyncInfo;
    check_hresult(static_cast<const IAccountsSettingsPaneStatics2 &>(static_cast<const D &>(*this))->abi_ShowManageAccountsAsync(put(asyncInfo)));
    return asyncInfo;
}

template <typename D> Windows::Foundation::IAsyncAction impl_IAccountsSettingsPaneStatics2<D>::ShowAddAccountAsync() const
{
    Windows::Foundation::IAsyncAction asyncInfo;
    check_hresult(static_cast<const IAccountsSettingsPaneStatics2 &>(static_cast<const D &>(*this))->abi_ShowAddAccountAsync(put(asyncInfo)));
    return asyncInfo;
}

template <typename D> event_token impl_IAccountsSettingsPane<D>::AccountCommandsRequested(const Windows::Foundation::TypedEventHandler<Windows::UI::ApplicationSettings::AccountsSettingsPane, Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs> & handler) const
{
    event_token cookie {};
    check_hresult(static_cast<const IAccountsSettingsPane &>(static_cast<const D &>(*this))->add_AccountCommandsRequested(get(handler), &cookie));
    return cookie;
}

template <typename D> event_revoker<IAccountsSettingsPane> impl_IAccountsSettingsPane<D>::AccountCommandsRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler<Windows::UI::ApplicationSettings::AccountsSettingsPane, Windows::UI::ApplicationSettings::AccountsSettingsPaneCommandsRequestedEventArgs> & handler) const
{
    return impl::make_event_revoker<D, IAccountsSettingsPane>(this, &ABI::Windows::UI::ApplicationSettings::IAccountsSettingsPane::remove_AccountCommandsRequested, AccountCommandsRequested(handler));
}

template <typename D> void impl_IAccountsSettingsPane<D>::AccountCommandsRequested(event_token cookie) const
{
    check_hresult(static_cast<const IAccountsSettingsPane &>(static_cast<const D &>(*this))->remove_AccountCommandsRequested(cookie));
}

template <typename D> Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::SettingsCommand> impl_ISettingsPaneCommandsRequest<D>::ApplicationCommands() const
{
    Windows::Foundation::Collections::IVector<Windows::UI::ApplicationSettings::SettingsCommand> value;
    check_hresult(static_cast<const ISettingsPaneCommandsRequest &>(static_cast<const D &>(*this))->get_ApplicationCommands(put(value)));
    return value;
}

template <typename D> Windows::UI::ApplicationSettings::SettingsPaneCommandsRequest impl_ISettingsPaneCommandsRequestedEventArgs<D>::Request() const
{
    Windows::UI::ApplicationSettings::SettingsPaneCommandsRequest request { nullptr };
    check_hresult(static_cast<const ISettingsPaneCommandsRequestedEventArgs &>(static_cast<const D &>(*this))->get_Request(put(request)));
    return request;
}

template <typename D> Windows::UI::ApplicationSettings::SettingsPane impl_ISettingsPaneStatics<D>::GetForCurrentView() const
{
    Windows::UI::ApplicationSettings::SettingsPane current { nullptr };
    check_hresult(static_cast<const ISettingsPaneStatics &>(static_cast<const D &>(*this))->abi_GetForCurrentView(put(current)));
    return current;
}

template <typename D> void impl_ISettingsPaneStatics<D>::Show() const
{
    check_hresult(static_cast<const ISettingsPaneStatics &>(static_cast<const D &>(*this))->abi_Show());
}

template <typename D> Windows::UI::ApplicationSettings::SettingsEdgeLocation impl_ISettingsPaneStatics<D>::Edge() const
{
    Windows::UI::ApplicationSettings::SettingsEdgeLocation value {};
    check_hresult(static_cast<const ISettingsPaneStatics &>(static_cast<const D &>(*this))->get_Edge(&value));
    return value;
}

template <typename D> event_token impl_ISettingsPane<D>::CommandsRequested(const Windows::Foundation::TypedEventHandler<Windows::UI::ApplicationSettings::SettingsPane, Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs> & handler) const
{
    event_token cookie {};
    check_hresult(static_cast<const ISettingsPane &>(static_cast<const D &>(*this))->add_CommandsRequested(get(handler), &cookie));
    return cookie;
}

template <typename D> event_revoker<ISettingsPane> impl_ISettingsPane<D>::CommandsRequested(auto_revoke_t, const Windows::Foundation::TypedEventHandler<Windows::UI::ApplicationSettings::SettingsPane, Windows::UI::ApplicationSettings::SettingsPaneCommandsRequestedEventArgs> & handler) const
{
    return impl::make_event_revoker<D, ISettingsPane>(this, &ABI::Windows::UI::ApplicationSettings::ISettingsPane::remove_CommandsRequested, CommandsRequested(handler));
}

template <typename D> void impl_ISettingsPane<D>::CommandsRequested(event_token cookie) const
{
    check_hresult(static_cast<const ISettingsPane &>(static_cast<const D &>(*this))->remove_CommandsRequested(cookie));
}

inline Windows::UI::ApplicationSettings::AccountsSettingsPane AccountsSettingsPane::GetForCurrentView()
{
    return get_activation_factory<AccountsSettingsPane, IAccountsSettingsPaneStatics>().GetForCurrentView();
}

inline void AccountsSettingsPane::Show()
{
    get_activation_factory<AccountsSettingsPane, IAccountsSettingsPaneStatics>().Show();
}

inline Windows::Foundation::IAsyncAction AccountsSettingsPane::ShowManageAccountsAsync()
{
    return get_activation_factory<AccountsSettingsPane, IAccountsSettingsPaneStatics2>().ShowManageAccountsAsync();
}

inline Windows::Foundation::IAsyncAction AccountsSettingsPane::ShowAddAccountAsync()
{
    return get_activation_factory<AccountsSettingsPane, IAccountsSettingsPaneStatics2>().ShowAddAccountAsync();
}

inline CredentialCommand::CredentialCommand(const Windows::Security::Credentials::PasswordCredential & passwordCredential) :
    CredentialCommand(get_activation_factory<CredentialCommand, ICredentialCommandFactory>().CreateCredentialCommand(passwordCredential))
{}

inline CredentialCommand::CredentialCommand(const Windows::Security::Credentials::PasswordCredential & passwordCredential, const Windows::UI::ApplicationSettings::CredentialCommandCredentialDeletedHandler & deleted) :
    CredentialCommand(get_activation_factory<CredentialCommand, ICredentialCommandFactory>().CreateCredentialCommandWithHandler(passwordCredential, deleted))
{}

inline SettingsCommand::SettingsCommand(const Windows::IInspectable & settingsCommandId, hstring_ref label, const Windows::UI::Popups::UICommandInvokedHandler & handler) :
    SettingsCommand(get_activation_factory<SettingsCommand, ISettingsCommandFactory>().CreateSettingsCommand(settingsCommandId, label, handler))
{}

inline Windows::UI::ApplicationSettings::SettingsCommand SettingsCommand::AccountsCommand()
{
    return get_activation_factory<SettingsCommand, ISettingsCommandStatics>().AccountsCommand();
}

inline Windows::UI::ApplicationSettings::SettingsPane SettingsPane::GetForCurrentView()
{
    return get_activation_factory<SettingsPane, ISettingsPaneStatics>().GetForCurrentView();
}

inline void SettingsPane::Show()
{
    get_activation_factory<SettingsPane, ISettingsPaneStatics>().Show();
}

inline Windows::UI::ApplicationSettings::SettingsEdgeLocation SettingsPane::Edge()
{
    return get_activation_factory<SettingsPane, ISettingsPaneStatics>().Edge();
}

inline WebAccountCommand::WebAccountCommand(const Windows::Security::Credentials::WebAccount & webAccount, const Windows::UI::ApplicationSettings::WebAccountCommandInvokedHandler & invoked, Windows::UI::ApplicationSettings::SupportedWebAccountActions actions) :
    WebAccountCommand(get_activation_factory<WebAccountCommand, IWebAccountCommandFactory>().CreateWebAccountCommand(webAccount, invoked, actions))
{}

inline WebAccountProviderCommand::WebAccountProviderCommand(const Windows::Security::Credentials::WebAccountProvider & webAccountProvider, const Windows::UI::ApplicationSettings::WebAccountProviderCommandInvokedHandler & invoked) :
    WebAccountProviderCommand(get_activation_factory<WebAccountProviderCommand, IWebAccountProviderCommandFactory>().CreateWebAccountProviderCommand(webAccountProvider, invoked))
{}

}

}


text:
// Nuke idb: /Users/{user}/Library/Application Support/Firefox/Profiles/i9soh8wz.default/indexedDB/

window.requestFileSystem = window.requestFileSystem ||
                           window.webkitRequestFileSystem;
window.URL = window.URL || window.webkitURL;

var openFSButton = document.querySelector('#openFSButton');
var preview = document.querySelector('#preview');
var logger = new Logger('#log');
var fs = null;
var cwd = null;
var html = [];

function onError(e) {
  console.log(e);
  logger.log('Error ' + e.code + ' - ' + e.name);
}

function clearFS() {
  fs.root.createReader().readEntries(function(results) {
    [].forEach.call(results, function(entry) {
      if (entry.isDirectory) {
        entry.removeRecursively(function() {}, onError);
      } else {
        entry.remove(function() {}, onError);
      }
    });
    getAllEntries(fs.root);
  }, onError);

  // idb.drop(function(e) {
  //   logger.log('
Database deleted!
');
  // }, onError);
}

function openFS() {
  window.requestFileSystem(TEMPORARY, 1024*1024, function(myFs) {
    fs = myFs;
    cwd = fs.root;
    openFSButton.disabled = true;
    logger.log('
Opened ' + fs.name, + '
');
    getAllEntries(fs.root);
  }, function(e) {
    logger.log(e);
  });
}

function writeFile(file, i) {
  cwd.getFile(file.name, {create: true, exclusive: false}, function(fileEntry) {
    fileEntry.createWriter(function(fileWriter) {
      fileWriter.onwritestart = function() {
        console.log('WRITE START');
      };
      fileWriter.onwriteend = function() {
        console.log('WRITE END');
      };
      fileWriter.write(file);
    }, onError);

    getAllEntries(cwd);
  }, onError);
}

function getAllEntries(dirEntry) {
  dirEntry.createReader().readEntries(function(results) {
    html = [];
    // var paths = results.map(function(el) { return el.fullPath.substring(1); });
    // renderFromPathObj(buildFromPathList(paths));
    // document.querySelector('#entries2').innerHTML = html.join('');

    var frag = document.createDocumentFragment();
    // Native readEntries() returns an EntryArray, which doesn't have forEach.
    [].forEach.call(results, function(entry) {
      var li = document.createElement('li');
      li.dataset.type = entry.isFile ? 'file' : 'folder';

      var deleteLink = document.createElement('a');
      deleteLink.href = '';
      deleteLink.innerHTML = '';
      deleteLink.classList.add('delete');
      deleteLink.onclick = function(e) {
        e.preventDefault();

        if (entry.isDirectory) {
          entry.removeRecursively(function() {
          logger.log('
Removed ' + entry.name + '
');
          getAllEntries(window.cwd);
        });
        } else {
          entry.remove(function() {
          logger.log('
Removed ' + entry.name + '
');
          getAllEntries(window.cwd);
        });
        }
        return false;
      };

      var span = document.createElement('span');
      span.appendChild(deleteLink);

      if (entry.isFile) {

        entry.file(function(f) {

          var size = Math.round(f.size * 100 / (1024 * 1024)) / 100;
          span.title = size + 'MB';

          if (size < 1) {
            size = Math.round(f.size * 100 / 1024) / 100;
            span.title = size + 'KB';
          }

          span.title += ', last modified: ' +
                        f.lastModifiedDate.toLocaleDateString();

          if (f.type.match('audio/') || f.type.match('video/ogg')) {

            var audio = new Audio();

            if (audio.canPlayType(f.type)) {
              audio.src = window.URL.createObjectURL(f);
              //audio.type = f.type;
              //audio.controls = true;
              audio.onended = function(e) {
                window.URL.revokeObjectURL(this.src);
              };

              var a = document.createElement('a');
              a.href = '';
              a.dataset.fullPath = entry.fullPath;
              a.textContent = entry.fullPath;
              a.appendChild(audio);
              a.onclick = playPauseAudio;

              span.appendChild(a);
            } else {
              span.appendChild(document.createTextNode(entry.fullPath + " (can't play)"));
            }
          } else {
            var a = document.createElement('a');
            a.href = '';
            a.textContent = entry.fullPath;

            a.onclick = function(e) {
              e.preventDefault();

              var iframe = preview.querySelector('iframe');
              if (!iframe) {
                iframe = document.createElement('iframe');
              } else {
                window.URL.revokeObjectURL(iframe.src);
              }

              preview.innerHTML = '';

              if (this.classList.contains('active')) {
                this.classList.remove('active');
                return;
              } else {
                this.classList.add('active');
              }

              iframe.src = window.URL.createObjectURL(f);
              preview.innerHTML = '';
              preview.appendChild(iframe);

              return false;
            };

            span.appendChild(a)
          }

          /*var img = document.createElement('img');
          img.src = 'images/icons/file.png';
          img.title = 'This item is a file';
          img.alt = img.title;
          span.appendChild(img);*/

          li.appendChild(span);
        }, onError);
      } else {
        var span2 = document.createElement('span');

        var folderLink = document.createElement('a');
        folderLink.textContent = entry.fullPath;
        folderLink.href = '';
        folderLink.onclick = function(e) {
          e.preventDefault();
          cwd.getDirectory(this.textContent, {}, function(dirEntry) {
            window.cwd = dirEntry; // TODO: not sure why we need to use window.cwd here.
            getAllEntries(dirEntry);
          }, onError);
          return false;
        };

        span2.appendChild(folderLink);
        span.appendChild(span2);
        span.classList.add('bold');
        var img = document.createElement('img');
        img.src = 'images/icons/folder.png';
        img.alt = 'This item is a folder';
        img.title = img.alt;
        span.title = img.alt;
        span.appendChild(img);

        li.appendChild(span);
      }
      frag.appendChild(li);
    });

    var entries = document.querySelector('#entries');
    entries.innerHTML = '

';
    entries.appendChild(frag);

  }, onError);
}

function create(el) {
  cwd.getFile(el.value, {create: true, exclusive: true}, function(fileEntry) {
    logger.log('
Created empty file ' + fileEntry.fullPath, + '
');
    getAllEntries(cwd);
    el.value = '';
  }, onError);
}

function mkdir(el) {
  cwd.getDirectory(el.value, {create: true, exclusive: true}, function(dirEntry) {
    logger.log('
Created folder ' + dirEntry.fullPath, + '
');
    getAllEntries(cwd);
    el.value = '';
  }, onError);
}

function buildFromPathList(paths) {
  var tree = {};
  for (var i = 0, path; path = paths[i]; ++i) {
    var pathParts = path.split('/');
    var subObj = tree;
    for (var j = 0, folderName; folderName = pathParts[j]; ++j) {
      if (!subObj[folderName]) {
        subObj[folderName] = j < pathParts.length - 1 ? {} : null;
      }
      subObj = subObj[folderName];
    }
  }
  return tree;
}

function renderFromPathObj(object) {
  for (var folder in object) {
    if (!object[folder]) { // file's will have a null value
      html.push('
', folder, '
');
    } else {
      html.push('
', folder);
      html.push('
');
      renderFromPathObj(object[folder]);
      html.push('
');
    }
  }
}

function playPauseAudio(e) {
  var a = e.target;
  var audio = a.querySelector('audio');
  if (audio.paused) {
    audio.play();
    a.classList.add('active');
  } else {
    audio.pause();
    a.classList.remove('active');
  }
  e.preventDefault();
}

window.addEventListener('DOMContentLoaded', function(e) {

}, false);

window.addEventListener('load', function(e) {
  var dnd = new DnDFileController('body', function(files) {
    [].forEach.call(files, writeFile);
  });
  openFS();
}, false);

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

  <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Solve a DCP Problem — psolve • CVXR</title>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous" />

<link href="../pkgdown.css" rel="stylesheet">

<meta property="og:title" content="Solve a DCP Problem — psolve" />

<meta property="og:description" content="Solve a DCP compliant optimization problem." />
<meta name="twitter:card" content="summary" />

      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
        Toggle navigation

      </button>

        CVXR
        0.99.4

  Reference

    Articles

      Disciplined Convex Optimization in R

  Changelog

Solve a DCP Problem

psolve.Rd

Solve a DCP compliant optimization problem.

psolve(object, solver, ignore_dcp = FALSE, warm_start = FALSE,
  verbose = FALSE, parallel = FALSE, ...)

# S4 method for Problem
psolve(object, solver, ignore_dcp = FALSE,
  warm_start = FALSE, verbose = FALSE, parallel = FALSE, ...)

# S3 method for Problem
solve(a, b, ...)

Arguments

    <colgroup><col class="name" /><col class="desc" /></colgroup>

      object, a

A Problem object.

      solver, b

(Optional) A string indicating the solver to use. Defaults to "ECOS".

      ignore_dcp

(Optional) A logical value indicating whether to override the DCP check for a problem.

      warm_start

(Optional) A logical value indicating whether the previous solver result should be used to warm start.

      verbose

(Optional) A logical value indicating whether to print additional solver output.

      parallel

(Optional) A logical value indicating whether to solve in parallel if the problem is separable.

      ...

Additional options that will be passed to the specific solver. In general, these options will override any default settings imposed by CVXR.

Value

A list containing the solution to the problem:

status

The status of the solution. Can be "optimal", "optimal_inaccurate", "infeasible", "infeasible_inaccurate", "unbounded", "unbounded_inaccurate", or "solver_error".

value

The optimal value of the objective function.

solver

The name of the solver.

solve_time

The time (in seconds) it took for the solver to solve the problem.

setup_time

The time (in seconds) it took for the solver to set up the problem.

num_iters

The number of iterations the solver had to go through to find a solution.

getValue

A function that takes a Variable object and retrieves its primal value.

getDualValue

A function that takes a Constraint object and retrieves its dual value(s).

Examples

a <- Variable(name = "a")
prob <- Problem(Minimize(norm_inf(a)), list(a >= 2))
result <- psolve(prob, solver = "ECOS", verbose = TRUE)
result$status

#> [1] "optimal"

result$value

#> [1] 2

result$getValue(a)

#> [1] 2

result$getDualValue(constraints(prob)[[1]])

#> [1] 1

Contents

Arguments

Value

Examples

Developed by Anqi Fu, Balasubramanian Narasimhan, Steven Diamond, John Miller.

Site built with pkgdown 1.3.0.


text:
"use strict";

const utils = require("../utils");

/**
 * Class Action.
 *
 * Provides base class for actions. These get run by a Task and should be used
 * only by a Task.
 */
class Action {

  /**
   * Action constructor.
   *
   * Instantiating an action will immediately start it.
   *
   * @param data
   *    The task data.
   */
  constructor(data) {
    this._data = data;
    this._promise = this.complete(data);

    if (!(this._promise instanceof Promise)) {
      throw new Error(`Action '${this.constructor.name}' didn't return a promise. Got '${this._promise}'`)
    }
  }

  /**
   * Completes the action.
   *
   * Must be implemented by every child.
   *
   * @param data
   *    The task data.
   */
  complete(data) {
    utils.mustImplement(this, "complete");
  }

  /**
   * Optionally reverts the things that the action completed.
   *
   * @param data
   *    The task data.
   *
   * @return {Promise|void}
   */
  revert(data) {

  }

}

module.exports = Action;


text:
package lombok;

import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

/**
 * The singular annotation is used together with {@code @Builder} to create single element 'add' methods in the builder for collections.
 */
@Target({FIELD, PARAMETER})
@Retention(SOURCE)
public @interface Singular {
	/** @return The singular name of this field. If it's a normal english plural, lombok will figure it out automatically. Otherwise, this parameter is mandatory. */
	String value() default "";
}


text:
describe Time do
  it 'responds to :raw_now' do
    expect(Time.respond_to?(:raw_now)).to be true
  end
end


text:
<!DOCTYPE html>

    <title>google-analytics · Mark Edmondson</title>
    <meta name="generator" content="Hugo 0.55.5" />
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="author" content="Mark Edmondson">

      <meta name="description" content="The code bit of the blog">

      <link href="https://code.markedmondson.me/tags/google-analytics/index.xml" rel="alternate" type="application/rss+xml" title="Mark Edmondson" />
      <link href="https://code.markedmondson.me/tags/google-analytics/index.xml" rel="feed" type="application/rss+xml" title="Mark Edmondson" />

    <link rel="canonical" href="https://code.markedmondson.me/tags/google-analytics/"/>
    <link rel="icon" href="https://code.markedmondson.me/favicon.ico">
    <link rel="apple-touch-icon" href="https://code.markedmondson.me/apple-touch-icon.png"/>
    <link rel="stylesheet" href="https://code.markedmondson.me/css/style.css">
    <link rel="stylesheet" href="https://code.markedmondson.me/css/github.css" rel="stylesheet" id="theme-stylesheet">
    <link rel="stylesheet" href="https://code.markedmondson.me/css/font-awesome.min.css">
    <link rel="stylesheet" href="https://code.markedmondson.me/fancybox/jquery.fancybox.css">

    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400italic,400,600' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro' rel='stylesheet' type='text/css'>
    <meta property="og:title" content="google-analytics" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://code.markedmondson.me/tags/google-analytics/" />

<meta property="og:updated_time" content="2020-11-27T09:29:50+01:00"/>

<meta itemprop="name" content="google-analytics">
<meta itemprop="description" content="">

    <meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="google-analytics"/>
<meta name="twitter:description" content=""/>
<meta name="twitter:site" content="@HoloMarkeD"/>

          Mark Edmondson

          Home

          My R Packages

          Non-code blog

          Past Presentations

          <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form">
              <input type="search" name="q" class="search-form-input" placeholder="Search">
              <button type="submit" class="search-form-submit">
              </button>
              <input type="hidden" name="sitesearch" value="https://code.markedmondson.me/" />
         </form>

          Home

          My R Packages

          Non-code blog

          Past Presentations

          <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form">
          <input type="search" name="q" class="search-form-input" placeholder="Search">
          <input type="hidden" name="sitesearch" value="https://code.markedmondson.me/" />
          </form>

Mark Edmondson

Coding in digital analytics

      Copenhagen, Denmark

              Follow

        28
        Posts

          17

            Tags

            google-analytics

            Data Privacy Engineering with Google Tag Manager Server Side and Consent Mode

                <time datetime="2020-11-27 09:29:50 +0100 CET" itemprop="datePublished">2020-11-27</time>

            gago: Blazingly fast Google Analytics API downloads with Go

                <time datetime="2019-10-09 00:00:00 +0000 UTC" itemprop="datePublished">2019-10-09</time>

            Auto Google Analytics Data Imports from Cloud Storage

                <time datetime="2018-11-29 00:00:00 +0000 UTC" itemprop="datePublished">2018-11-29</time>

            Turning GA360 BigQuery exports into partitioned tables using Cloud Functions

                <time datetime="2018-10-09 00:00:00 +0000 UTC" itemprop="datePublished">2018-10-09</time>

            Talking Google Analytics dashboards via R, Shiny and Text-to-Speech APIs

                <time datetime="2018-08-15 00:00:00 +0000 UTC" itemprop="datePublished">2018-08-15</time>

            Five Ways to Schedule R scripts on Google Cloud Platform

                <time datetime="2017-07-09 00:00:00 +0000 UTC" itemprop="datePublished">2017-07-09</time>

            My R Packages

                <time datetime="2017-01-24 21:20:50 +0100 CET" itemprop="datePublished">2017-01-24</time>

            Insights sorting by delta metrics in the Google Analytics API v4

                <time datetime="2016-12-01 23:03:57 +0100 CET" itemprop="datePublished">2016-12-01</time>

            Efficient anti-sampling with the Google Analytics Reporting API

                <time datetime="2016-08-05 23:03:57 +0100 +0100" itemprop="datePublished">2016-08-05</time>

            SEO keyword research using searchConsoleR and googleAnalyticsR

                <time datetime="2016-06-21 23:03:57 +0100 +0100" itemprop="datePublished">2016-06-21</time>

        Recents

Data Privacy Engineering with Google Tag Manager Server Side and Consent Mode

                        <time datetime="2020-11-27 09:29:50 +0100 CET" itemprop="datePublished">2020-11-27</time>

Using Google Tag Manager Server Side to Trigger Webhook Events

                        <time datetime="2020-09-04 12:50:50 +0100 +0100" itemprop="datePublished">2020-09-04</time>

Google Tag Manager Server Side on Cloud Run - Pros and Cons

                        <time datetime="2020-08-21 00:00:00 +0000 UTC" itemprop="datePublished">2020-08-21</time>

Shiny on Google Cloud Run - Scale-to-Zero R Web Apps

                        <time datetime="2020-08-01 00:00:00 +0000 UTC" itemprop="datePublished">2020-08-01</time>

Online payments for data science apps (DSaaS) using R, Shiny, Firebase, Paddle and Google Cloud Functions

                        <time datetime="2020-06-28 00:00:00 +0000 UTC" itemprop="datePublished">2020-06-28</time>

        Tags

                    R

                20

                    big-query

                5

                    blogging

                2

                    cloud-functions

                4

                    cloud-run

                3

                    docker

                9

                    firebase

                1

                    google-analytics

                10

                    google-app-engine

                4

                    google-auth

                4

                    google-cloud-storage

                4

                    google-compute-engine

                7

                    google-language

                2

                    google-tag-manager

                6

                    python

                5

                    rstudio-server

                4

                    search-console

                3

      © 2020
      Powered by Hugo. Theme by PPOffice.


text:
using GraphQL.Types;

namespace SAHB.GraphQL.Client.Testserver.Tests.Schemas.Hello
{
    public class HelloQuerySchema : Schema
    {
        public HelloQuerySchema()
        {
            Query = new GraphQLQuery();
        }

        private class GraphQLQuery : ObjectGraphType
        {
            public GraphQLQuery()
            {
                Field<StringGraphType>("hello", resolve: context => "query");
            }
        }
    }
}


text:
<script>
    $(document).ready(function(){

        $('#equipmentEditForm').validate({
            rules: {
                equipmentid: "required",
                equipmentname: "required"
            },
            messages: {
                equipmentid: "Could not get the equipment data",
                equipmentname: "Equipment Name cannot be empty"
            },
            errorElement: 'em',
            errorPlacement: function ( error, element ) {
                // Add the `help-block` class to the error element
                error.addClass( 'form-control-feedback' );
                if ( element.prop( 'type' ) === 'checkbox' ) {
                    error.insertAfter( element.parent( 'label' ) );
                } else {
                    error.insertAfter( element );
                }
            },
            highlight: function ( element, errorClass, validClass ) {
                $( element ).addClass( 'form-control-danger' ).removeClass( 'form-control-success' );
                $( element ).parents( '.form-group' ).addClass( 'has-danger' ).removeClass( 'has-success' );
            },
            unhighlight: function (element, errorClass, validClass) {
                $( element ).addClass( 'form-control-success' ).removeClass( 'form-control-danger' );
                $( element ).parents( '.form-group' ).addClass( 'has-success' ).removeClass( 'has-danger' );
            }
        });

    });
</script>


text:
Comable::Core::Engine.routes.draw do
  namespace :admin do
    root to: 'dashboard#show'

    resource :dashboard, only: :show

    resources :products do
      resources :variants, except: :index

      resources :stocks

      collection do
        get :export
        post :import
      end
    end

    resources :stocks do
      collection do
        get :export
        post :import
      end
    end

    resources :variants, only: :index

    resources :orders, except: :create do
      collection do
        get :export
      end

      member do
        post :cancel
        post :resume
        post :cancel_payment
        post :resume_payment
        post :ship
        post :cancel_shipment
        post :resume_shipment
      end
    end

    resources :draft_orders

    resources :categories
    resources :stock_locations
    resources :pages

    resources :navigations do
      post :search_linkable_ids, on: :collection
    end

    resources :users
    resources :shipment_methods
    resources :payment_methods
    resources :trackers

    resources :themes do
      member do
        get 'tree', action: :tree, as: :tree
        get 'file/*path', action: :show_file, constraints: { path: /.+/, format: false }, as: :file
        put 'file/*path', action: :update_file, constraints: { path: /.+/, format: false }
        put :use
      end
    end

    resource :store, controller: :store, only: [:show, :edit, :update]

    devise_for :users, path: :user, class_name: Comable::User.name, module: :devise, router_name: :comable, controllers: {
      sessions: 'comable/admin/user_sessions'
    }

    get :profile, controller: :users
  end
end


text:
This file is a map of the tests scenarios which will be covered to ensure the DAO is fully tested before release. This is currently a work in progress, so if you notice there are missing scenarios please add them to this file following the same format/template. If you want to create a test based on a scenario here then please go ahead and claim it. Just make sure you claim and check off any scenarios which you write so others are aware of what is still todo.

## Scenarios

### Scenario 001

| ID          |  DAO_003 |
| ----------- | -----: |
| Reporter    | @proletesseract |
| Author      | @proletesseract |
| Satus       | Done |
| Description | It should create a proposal and let it expire |
| File        | `./001-proposal-expired.py`

1. **Given** I have created a proposal
2. **When** The proposal is not voted on
3. **Then** the proposal should expire

#### Test Steps
- Activate DAO
- Donate to the DAO
- Create a proposal
- Do not cast any votes
- End the full round of voting cycles
- Check proposal expired

### Scenario 002

| ID          |  DAO_002 |
| ----------- | -----: |
| Reporter    | @proletesseract |
| Author      | @proletesseract |
| Satus       | Done |
| Description | It should create a proposal and the network should reject the proposal |
| File        | `./002-proposal-rejected.py`

1. **Given** I have created a proposal
2. **When** The proposal receives the consensus of `no` votes
3. **Then** the proposal should be rejected

#### Test Steps
- Activate DAO
- Donate to the DAO
- Create a proposal
- Votes `no` on the proposal
- End the full round of voting cycles
- Check proposal is rejected

### Scenario 003

| ID          |  DAO_003 |
| ----------- | -----: |
| Reporter    | @proletesseract |
| Author      | @proletesseract |
| Satus       | Done |
| Description | It should create a proposal and the network should accept the proposal |
| File        | `./003-proposal-accepted.py`

1. **Given** I have created a proposal
2. **When** The proposal receives the consensus of `yes` votes
3. **Then** the proposal should be accepted

#### Test Steps
- Activate DAO
- Donate to the DAO
- Create a proposal
- Votes `yes` on the proposal
- End the full round of voting cycles
- Check proposal is rejected

### Scenario 004

| ID          |  DAO_004 |
| ----------- | -----: |
| Reporter    | @proletesseract |
| Author      | @proletesseract |
| Satus       | Done |
| Description | It should fail to create a payment request for an expired proposal |
| File        | `./004-proposal-expired-preq.py`

1. **Given** I have an expired proposal
2. **When** A payment request is made
3. **Then** the payment request should not exist

#### Test Steps
- Activate DAO
- Donate to the DAO
- Create a proposal
- Do not cast any votes
- End the full round of voting cycles
- Submit a payment request
- Check payment request does not exist

### Scenario 005

| ID          |  DAO_005 |
| ----------- | -----: |
| Reporter    | @proletesseract |
| Author      | @proletesseract |
| Satus       | Done |
| Description | It should fail to create a payment request for a rejected proposal |
| File        | `./005-proposal-expired-preq.py`

1. **Given** I have a rejected proposal
2. **When** A payment request is made
3. **Then** the payment request should not exist

#### Test Steps
- Activate DAO
- Donate to the DAO
- Create a proposal
- Votes `no` on the proposal
- End the full round of voting cycles
- Submit a payment request
- Check payment request does not exist

### Scenario 006

| ID          |  DAO_006 |
| ----------- | -----: |
| Reporter    | @proletesseract |
| Author      | @proletesseract |
| Satus       | Done |
| Description | It should create a payment request for an accepted proposal |
| File        | `./006-proposal-accepted-preq.py`

1. **Given** I have an accepted proposal
2. **When** A payment request is made
3. **Then** the payment request should exist

#### Test Steps
- Activate DAO
- Donate to the DAO
- Create a proposal
- Votes `yes` on the proposal
- End the full round of voting cycles
- Submit a payment request
- Check payment request exists


text:
export interface Region {
  RegionID: number;
  RegionDescription: string;
}


text:
from __future__ import absolute_import

from .requests import *


text:
import sys
import time
from typing import Optional, Union

import numpy as np

import ray
from ray.air import session
from ray.air.config import DatasetConfig, ScalingConfig
from ray.data import DatasetPipeline, Dataset
from ray.data.preprocessors import BatchMapper, Chain
from ray.train.data_parallel_trainer import DataParallelTrainer
from ray.util.annotations import DeveloperAPI

@DeveloperAPI
class DummyTrainer(DataParallelTrainer):
    """A Trainer that does nothing except read the data for a given number of epochs.

    It prints out as much debugging statistics as possible.

    This is useful for debugging data ingest problem. This trainer supports normal
    scaling options same as any other Trainer (e.g., num_workers, use_gpu).
    """

    def __init__(
        self,
        *args,
        scaling_config: Optional[ScalingConfig] = None,
        num_epochs: int = 1,
        prefetch_blocks: int = 1,
        batch_size: Optional[int] = 4096,
        **kwargs
    ):
        if not scaling_config:
            scaling_config = ScalingConfig(num_workers=1)
        super().__init__(
            train_loop_per_worker=DummyTrainer.make_train_loop(
                num_epochs, prefetch_blocks, batch_size
            ),
            *args,
            scaling_config=scaling_config,
            **kwargs
        )

    def preprocess_datasets(self):
        print("Starting dataset preprocessing")
        start = time.perf_counter()
        super().preprocess_datasets()
        print("Preprocessed datasets in", time.perf_counter() - start, "seconds")
        if self.preprocessor:
            print("Preprocessor", self.preprocessor)
            print(
                "Preprocessor transform stats:\n\n{}".format(
                    self.preprocessor.transform_stats()
                )
            )

    @staticmethod
    def make_train_loop(
        num_epochs: int, prefetch_blocks: int, batch_size: Optional[int]
    ):
        """Make a debug train loop that runs for the given amount of epochs."""

        def train_loop_per_worker():
            import pandas as pd

            rank = session.get_world_rank()
            data_shard = session.get_dataset_shard("train")
            start = time.perf_counter()
            epochs_read, batches_read, bytes_read = 0, 0, 0
            batch_delays = []

            def generate_epochs(data: Union[Dataset, DatasetPipeline], epochs: int):
                if isinstance(data, DatasetPipeline):
                    for epoch in data_shard.iter_epochs(epochs):
                        yield epoch
                else:
                    # Dataset
                    for _ in range(epochs):
                        yield data

            print("Starting train loop on worker", rank)
            for epoch_data in generate_epochs(data_shard, num_epochs):
                epochs_read += 1
                batch_start = time.perf_counter()
                for batch in epoch_data.iter_batches(
                    prefetch_blocks=prefetch_blocks, batch_size=batch_size
                ):
                    batch_delay = time.perf_counter() - batch_start
                    batch_delays.append(batch_delay)
                    batches_read += 1
                    if isinstance(batch, pd.DataFrame):
                        bytes_read += int(
                            batch.memory_usage(index=True, deep=True).sum()
                        )
                    elif isinstance(batch, np.ndarray):
                        bytes_read += batch.nbytes
                    else:
                        # NOTE: This isn't recursive and will just return the size of
                        # the object pointers if list of non-primitive types.
                        bytes_read += sys.getsizeof(batch)
                    session.report(
                        dict(
                            bytes_read=bytes_read,
                            batches_read=batches_read,
                            epochs_read=epochs_read,
                            batch_delay=batch_delay,
                        )
                    )
                    batch_start = time.perf_counter()
            delta = time.perf_counter() - start

            print("Time to read all data", delta, "seconds")
            print(
                "P50/P95/Max batch delay (s)",
                np.quantile(batch_delays, 0.5),
                np.quantile(batch_delays, 0.95),
                np.max(batch_delays),
            )
            print("Num epochs read", epochs_read)
            print("Num batches read", batches_read)
            print("Num bytes read", round(bytes_read / (1024 * 1024), 2), "MiB")
            print(
                "Mean throughput", round(bytes_read / (1024 * 1024) / delta, 2), "MiB/s"
            )

            if rank == 0:
                print("Ingest stats from rank=0:\n\n{}".format(data_shard.stats()))

        return train_loop_per_worker

if __name__ == "__main__":

    import argparse

    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--num-epochs", "-e", type=int, default=1, help="Number of epochs to read."
    )
    parser.add_argument(
        "--prefetch-blocks",
        "-b",
        type=int,
        default=1,
        help="Number of blocks to prefetch when reading data.",
    )

    parser.add_argument(
        "--use-stream-api",
        "-s",
        action="store_true",
        help="If enabled, the input Dataset will be streamed (as a DatasetPipeline).",
    )
    args = parser.parse_args()

    # Generate a synthetic dataset of ~10GiB of float64 data. The dataset is sharded
    # into 100 blocks (parallelism=100).
    dataset = ray.data.range_tensor(50000, shape=(80, 80, 4), parallelism=100)

    # An example preprocessor chain that just scales all values by 4.0 in two stages.
    preprocessor = Chain(
        BatchMapper(lambda df: df * 2, batch_format="pandas"),
        BatchMapper(lambda df: df * 2, batch_format="pandas"),
    )

    # Setup the dummy trainer that prints ingest stats.
    # Run and print ingest stats.
    trainer = DummyTrainer(
        scaling_config=ScalingConfig(num_workers=1, use_gpu=False),
        datasets={"train": dataset},
        preprocessor=preprocessor,
        num_epochs=args.num_epochs,
        prefetch_blocks=args.prefetch_blocks,
        dataset_config={"train": DatasetConfig(use_stream_api=args.use_stream_api)},
        batch_size=None,
    )
    print("Dataset config", trainer.get_dataset_config())
    trainer.fit()

    # Print memory stats (you can also use "ray memory --stats-only" to monitor this
    # during the middle of the run.
    try:
        print(
            "Memory stats at end of ingest:\n\n{}".format(
                ray._private.internal_api.memory_summary(stats_only=True)
            )
        )
    except Exception:
        print("Error getting Ray memory stats")


text:
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Metadata;

namespace SimplCommerce.WebHost.Migrations
{
    public partial class AddedVendor : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_Orders_Order_Orders_OrderAddress_BillingAddressId",
                table: "Orders_Order");

            migrationBuilder.AddColumn<long>(
                name: "ParentId",
                table: "Orders_Order",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "VendorId",
                table: "Orders_Order",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "VendorId",
                table: "Core_User",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "VendorId",
                table: "Catalog_Product",
                nullable: true);

            migrationBuilder.CreateTable(
                name: "Core_Vendor",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
                    Description = table.Column<string>(nullable: true),
                    Email = table.Column<string>(nullable: true),
                    IsActive = table.Column<bool>(nullable: false),
                    IsDeleted = table.Column<bool>(nullable: false),
                    Name = table.Column<string>(nullable: true),
                    SeoTitle = table.Column<string>(nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Core_Vendor", x => x.Id);
                });

            migrationBuilder.CreateIndex(
                name: "IX_Orders_Order_ParentId",
                table: "Orders_Order",
                column: "ParentId");

            migrationBuilder.AddForeignKey(
                name: "FK_Orders_Order_Orders_OrderAddress_BillingAddressId",
                table: "Orders_Order",
                column: "BillingAddressId",
                principalTable: "Orders_OrderAddress",
                principalColumn: "Id",
                onDelete: ReferentialAction.Restrict);

            migrationBuilder.AddForeignKey(
                name: "FK_Orders_Order_Orders_Order_ParentId",
                table: "Orders_Order",
                column: "ParentId",
                principalTable: "Orders_Order",
                principalColumn: "Id",
                onDelete: ReferentialAction.Restrict);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropForeignKey(
                name: "FK_Orders_Order_Orders_OrderAddress_BillingAddressId",
                table: "Orders_Order");

            migrationBuilder.DropForeignKey(
                name: "FK_Orders_Order_Orders_Order_ParentId",
                table: "Orders_Order");

            migrationBuilder.DropTable(
                name: "Core_Vendor");

            migrationBuilder.DropIndex(
                name: "IX_Orders_Order_ParentId",
                table: "Orders_Order");

            migrationBuilder.DropColumn(
                name: "ParentId",
                table: "Orders_Order");

            migrationBuilder.DropColumn(
                name: "VendorId",
                table: "Orders_Order");

            migrationBuilder.DropColumn(
                name: "VendorId",
                table: "Core_User");

            migrationBuilder.DropColumn(
                name: "VendorId",
                table: "Catalog_Product");

            migrationBuilder.AddForeignKey(
                name: "FK_Orders_Order_Orders_OrderAddress_BillingAddressId",
                table: "Orders_Order",
                column: "BillingAddressId",
                principalTable: "Orders_OrderAddress",
                principalColumn: "Id",
                onDelete: ReferentialAction.Cascade);
        }
    }
}


text:
<?php

namespace Hoa\Irc;

use Hoa\Core;

/**
 * Class \Hoa\Irc\Exception.
 *
 * Extending the \Hoa\Core\Exception class.
 *
 * @copyright  Copyright © 2007-2015 Hoa community
 * @license    New BSD License
 */
class Exception extends Core\Exception
{
}


text:
opp:
====

*Config file section*

+----------------------------------------------------------------------------+---------+
| Valid in :doc:`machine config files </config/instructions/machine_config>` | **YES** |
+----------------------------------------------------------------------------+---------+
| Valid in :doc:`mode config files </config/instructions/mode_config>`       | **NO**  |
+----------------------------------------------------------------------------+---------+

.. overview

The ``opp:`` section of your config is where you configure your OPP platform.
See :doc:`/hardware/opp/index` for details.

This is an example:

.. code-block:: mpf-config

    hardware:
      platform: opp
      driverboards: gen2
    opp:
      ports: COM7

.. config

Required settings
-----------------

The following sections are required in the ``opp:`` section of your config:

ports:
~~~~~~
List of one (or more) values, each is a type: ``string``. Defaults to empty.

Serial ports to use.

Optional settings
-----------------

The following sections are optional in the ``opp:`` section of your config. (If you don't include them, the default will be used).

baud:
~~~~~
Single value, type: ``integer``. Default: ``115200``

Baud rate to use on the serial port.

chains:
~~~~~~~
One or more sub-entries. Each in the format of ``string`` : ``string``

This is an example:

.. code-block:: mpf-config

   opp:
     ports: /dev/ttyOPP0, /dev/ttyOPP1
     chains:
       0: /dev/ttyOPP0
       1: /dev/ttyOPP1

If you switch was number ``1-3`` before it will be ``0-1-3`` or ``1-1-3`` afterwards.

console_log:
~~~~~~~~~~~~
Single value, type: one of the following options: none, basic, full. Default: ``none``

Log level for the console log for this platform.

debug:
~~~~~~
Single value, type: ``boolean`` (``true``/``false``). Default: ``false``

Set this to true if you want to see more debug output.

driverboards:
~~~~~~~~~~~~~
Single value, type: one of the following options: gen2. Default: ``gen2``

Similar to ``driverboards`` in the :doc:`/config/hardware` section.
Use this setting if you use multiple playforms (i.e. FAST and OPP) in one
machine.

file_log:
~~~~~~~~~
Single value, type: one of the following options: none, basic, full. Default: ``basic``

Log level for the file log for this platform.

incand_update_hz:
~~~~~~~~~~~~~~~~~
Single value, type: ``integer``. Default: ``25``

The update rate for incandecant bulbs.
Do not set this too high or you might saturate the OPP bus.

poll_hz:
~~~~~~~~
Single value, type: ``integer``. Default: ``100``

How many times per section the OPP hardware is polled for switch changes. Default is 100.

Related How To guides
---------------------

* :doc:`/hardware/opp/index`


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">

		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
		<title>PMD 4.2.6 Reference Package net.sourceforge.pmd.dcd.asm</title>
		<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />

        	net.sourceforge.pmd.dcd.asm

Classes

            	PrintVisitor

            	TypeSignatureVisitor


text:
package kami.dataloader

import net.ceedubs.ficus.Ficus._
import com.typesafe.config.{ Config, ConfigFactory }

final class Environment(config: Config) {
  object interface {
    object ws {
      val host = config.as[String]("ws.host")
      val port = config.as[Int]("ws.port")
    }
  }
}

object Environment {
  lazy val instance = new Environment(ConfigFactory.load())
}