Bash Oiutput Correction – Code Revision Stack Exchange

#! / bin / bash

start () {
actual printf:% s  n & # 39; "$ (curl -s ifconfig.co)"
set - /etc/openvpn/ovpn_tcp/*.nordvpn.com.tcp.ovpn
shift $ ((RANDOM% $ #))
screen -S vpn -dm openvpn "$ 1" # connect
sleep 5 # wait for the connection
printf VPN IP:% s  n & # 39; "$ (curl -s ifconfig.co)"
}
Stop () {
-S vpn -X screen exit
pkill -f ovpn
}
status(){
printf current IP:% s  n & # 39; "$ (curl -s ifconfig.co)"
}

case "$ 1" in
beginning)
if screen -ls | grep -w vpn &> / dev / null; then
echo "VPN already connected";
status
other
beginning
Fi
;;
stop)
stop
;;
*)
status
;;
esac

The previous hit script gives the following answer in case vpn stop typed.

series of vpn stop if there is active vpn link:

[root@A ~]# vpn stop
Completed

series of vpn stop if there is no activity vpn link:

[root@A ~]# vpn stop
No screen session found.
Completed

What I am trying to achieve is:

series of vpn stop if there is active vpn link:

[root@A ~]# vpn stop
VPN connection closed successfully 

series of vpn stop if there is no activity vpn link:

[root@A ~]# vpn stop
There is no active VPN connection to stop it.

seo – Structure Permalink – Stack Exchange Webmasters

On my website, I had a wordpress permalink structure that was the following:

http://example.com/2012/03/post-name/

Having read in many places that a simpler permalink structure could improve SEO rankings, I've changed the structure and created permanent redirects to the following:

http://example.com/post-name/

It seems that Google does not like change. In the three months since the implementation of the change, traffic has decreased by about 50%.

Would changing the structure be helpful or would it simply spoil more?

Problema React.js – Stack overflow in Português

You are here to learn more about the following apps and issues:

The element type is not valid: we expect a string (for built-in components) or a class / function (for composite components) but got: undefined. You probably forgot to export your component from the file in which it was defined or you may have mixed the default imports and named imports.

insert a description of the image above

Php – Comments PhpMetrics – Software Engineering Stack Exchange

I've installed the PhpMetrics plug-in into my PhpStorm IDE and I have it running for my XMPP library. What surprised me, it is the following metric:

The weight of the comments measures the relationship between the logical code and the comments

This does not count in generated PHPDocs, but rather old, clear comments in the code itself. For me, it's really a bad practice and an anti-model if you have to comment on what each line does, but for whatever reason, PhpMetrics considers that it's really bad if this metric is 0.

Why does this happen? Why is commenting code line by line considered as good practice by PhpMetrics?

Can I change the logic to ignore this metric or rather to reverse it?

KeyStore Android Key Storage – Information Security Stack Exchange

Battery Exchange Network

The Stack Exchange network includes 175 question-and-answer communities, including Stack Overflow, the largest and most reliable online community on which developers can learn, share knowledge and build their careers.

Visit Stack Exchange

General Math – Stack Exchange on Research Problems, Suggested Approaches and Updates

The idea is to have a database of open research problems, where the answers will be updates or suggested approaches. A search problem by post.

I think this should be a separate MO site, as many of these messages will not be required to respond in the short term. Otherwise, if we start adding such messages in MO (for example, under the "outstanding issues" tag), they will quickly clutter up the usual MO messages that can be answered in the short term.

The reasons:

  1. It will be a great place to share not only research problems, but also our ideas for solving them. This is the main function of conferences; it would be good to have an online forum that fulfills the same goal, especially for early researchers who can not afford to attend all conferences.
  2. By having the wiki structure, users will be able to create updates on the original message.
  3. Currently, to find research problems, you need to deepen the articles or send an e-mail to the authors for their suggestions. But a powerful forum such as stack-exchange can serve as a large database to allow researchers to search for problems.
  4. An alternative is simply to add content in the Wikipedia article on the outstanding issues. However, the site will quickly become cluttered with the addition of sub-issues.
  5. Conversely, MO publications responding under the "outstanding issues" tag distract from the database. For example, there will be no questions of the form "open problems in random graphs" or "memories that solved an open problem". I think every article should be devoted to one open problem.

We will appreciate your comments or even better to follow the proposal:
Open Research Problems in Mathematics

Just 5 users to follow it.

dnd 5th – can a barrage stack be invoked with a martial attack – disarmament or stumble attack?

i am new to dnd 5th, i thought that a martial deity of adept superiority could be used to make a weapon disarming target launched when it is used in conjunction with the conspiracy barrage spell .

From the book …

Martial Adept:
You have a martial training that allows you to perform special combat maneuvers. You benefit from the following advantages:

You will learn two maneuvers of your choice from those available for the archetype of the battle master in the fighter class. If a maneuver you use requires your target to make a save roll to resist the effects of the maneuver, the DC save roll is equal to 8 + your skill bonus + your strength or dexterity modifier (your choice).
You gain a dice of superiority, which is a d6 (this die is added to all dice of superiority you have from another source). This die is used to fuel your maneuvers. A superior dice is spent when you use it. You recover your dice of superiority spent when you finish a short or long rest.

travel attack
When you hit a creature with a weapon attack, you can use a superior die to try to knock the target down. You add the superiority dice to the damage roll of the attack, and if the target is large or smaller, it must make a saving save of the force. In case of failure of the backup, you hit the target.

disarming attack
When you hit a creature with a weapon attack, you can use a superior die to try to disarm the target, forcing it to drop an item of your choice that it holds. You add the superiority die to the damage roll of the attack and the target must make a force save roll. In case of failure of the backup, the object you choose is deleted. The object arises at his feet.

conjure dam

Details of the spell
You launch a non-magical weapon or fire a piece of non-magical ammunition into the air to create a cone of identical weapons that shoot forward and then disappear. Each creature in a 60 foot cone must make a dexterity save throw. A creature suffers 3d8 damage on a failed save or half the damage on a successful save. The type of damage is the same as that of the weapon or ammunition used as a component.

can these two work together? and why not?

Warlock – If a Hexblade uses a sentient weapon, can they stack weapons charisma stats with their own weapons for attack and damage rolls?

So, I've been working on a half-elf hexagonal blade for a while and I've decided that it should have a moon blade, a long elf-sensitive sword. Sensitive weapons may not be pact weapons, but you can still choose to use charisma with them using hexagonal warrior. Are weapons charisma stats stacked with yours for attack and damage rolls?

Apache httpd error – Stack Exchange Webmasters

On the control panel of sharing hosting that I have purchased, I sometimes go to see Last lines of the log containing errors.
Today, I read this:

Saturday, May 18, 2019 13:09:00 GMT [notice] - www.example.com - AH00163: Apache / 2.4.39 (Unix) configured - resume normal operations
Saturday, May 18, 2019 13:09:00 GMT [notice] - www.example.com - AH00094: Command line: / apache / bin / httpd -D FOREGROUND & # 39;
Saturday, May 18, 2019 11:37:00 GMT [notice] - www.example.com - AH00163: Apache / 2.4.39 (Unix) configured - resume normal operations
Saturday, May 18, 2019 11:37:00 GMT [notice] - www.example.com - AH00094: Command line: / apache / bin / httpd -D FOREGROUND & # 39;

How should I interpret these lines? Is there anything I can do to investigate further?

c ++ – Multidimensional Utilities – Code Review Stack Exchange

I have implemented multidimensional utilities in C ++ 17.

Here is the header dimension.hpp:

/ **
* @file dimension.hpp
* Implements multidimensional utilities.
* /

#ifndef INC_DIMENSION_HPP_CAdUgZHijL
#define INC_DIMENSION_HPP_CAdUgZHijL

#understand 
#understand 
#understand 
#understand 

/ **
* The library of L. F.
* /
namespace LF_lib {

/ **
* Multidimensional utilities.
* /
multi namespace {

/ **
* Tag type to indicate unverified versions of functions.
* /
struct unchecked_t {
explicit unchecked_t () = default;
};

/ **
* Tag object to indicate unverified versions of functions.
* /
inline constexpr unchecked_t unchecked {};

/ **
* Encapsulates the dimensions @c N.
* Aggregate type containing only one public member type std :: array.
* @c N can be zero.
*
* @tparam N The number of dimensions
* /
model 
  struct Dimension {
using dimension_t = std :: array; /// <Type for dimensions.
using index_t = std :: array; /// <Type for indexes.

dimension_t dimensions; /// <Store the dimensions @c N.

/ **
* @observer names
* @ {
* /

/ **
* Returns the number of dimensions.
*
* @return @c N
* /
static constexpr std :: size_t order () noexcept {return N; }

/ **
* Returns the total size.
*
* @return The product of all dimensions
* /
constexpr std :: size_t size () const noexcept
{
std :: size_t res = 1;
for (std :: size_t dim: dimensions)
res * = dim;
returns res;
}

/ **
* @}
* /

/ **
* @name Access to items
* @ {
* /

/ **
* Check if the given clues are in the range.
*
* @param indices The indices
*
* @return @c true if clues[i] <dimensions[i]    for i = 0, 1, 2, ..., N-1, @c false otherwise
* /
constexpr valid bool (const index_t & indices) const noexcept
{
for (std :: size_t i = 0; i < N; ++i)
        if (indices[i] >= dimensions[i])
returns false;
return true;
}

/ **
* Returns the flat index of the element at @c indices.
*
* @param indices The indices
*
* @pre   valid (indices)
     * @throw std :: out_of_range At least one index is out of bounds
*
* @return (... ((indices[0] * dimensions[1] + indices[1]) * dimensions[2] + indices[2]) * ...) * dimensions[N-1] + indices[N-1]
     
     
     
     * /
constexpr std :: size_t to (const index_t & indices) const
{
if (! valid (indices))
throws std :: out_of_range {"LF_lib :: multi :: Dimension::at "
"out-of-range indices"};
return to (unverified, indices);
}

/ **
* Uncontrolled version of @c at.
* /
constexpr std :: size_t to (unchecked_t, const index_t & indices) const noexcept
{
std :: size_t res = 0;
for (std :: size_t i = 0; i <N; ++ i)
res = res * dimensions[i] + indices[i];
returns res;
}

/ **
* Parentheses notation from @c to.
* Let clues denote index_t {static_cast(args) ...}.
*
* @tparam Args The types of the indices
* @param args Indices
*
* @pre    sizeof ... (Args) == N
     * @pre    std :: conjunction_v <std :: is_convertible...>
     * @pre    valid (indices)
     * @return at (indices)
     * @throw std :: out_of_range At least one index is out of bounds
* /
model 
    constexpr std :: size_t operator () (Args && ... args) const
{
static_assert (sizeof ... (Args) == N,
"LF_lib :: multi :: Dimension:: operator () "
"must be called with N arguments");
static_assert (std :: conjunction_v <std :: is_convertible...>
"LF_lib :: multi :: Dimension:: operator () "
"must be called with arguments"
"implicitly convertible to std :: size_t");

index_t index {static_cast(args) ...};
if (! valid (indices))
throws std :: out_of_range {"LF_lib :: multi :: Dimension:: operator () "
"out-of-range indices"};
return to (unverified, indices);
}

/ **
* @}
* /
};

/ **
* Guide to deduction.
* Deduced Dimension    for the @c N. arguments
* /
model 
  Dimension (Args ...) -> Dimension;

}

}

#end if

You can run Doxygen to generate the documentation.
Here is a test, which is also an example of how Dimension can be used:

#include "dimension.hpp"
#understand 

using namespace LF_lib :: multi;

int main ()
{
{
Dimension constexpr<5> dim {1, 2, 3, 4, 5};
static_assert (dim.order () == 5);
static_assert (dim.size () == 120);

static_assert (! dim.valid ({1, 1, 1, 1, 1}));
static_assert (dim.at ({0, 1, 2, 3, 4}) == 119);
static_assert (dim.at ({0, 1, 2, 3, 4}) == dim.at (unchecked, {0, 1, 2, 3, 4}));
// static_assert (dim.at ({1, 1, 1, 1, 1}));

static_assert (dim (0, 1, 2, 2, 4) == dim.at ({0, 1, 2, 2, 4}));
}
{
Dimension constexpr<0> dim = {};
static_assert (dim.order () == 0);
static_assert (dim.size () == 1);

static_assert (dim.valid ({}));
static_assert (dim.at ({}) == 0);
static_assert (dim.at ({}) == dim.at (unchecked, {}));

static_assert (dim () == 0);
}
{
static_assert (std :: is_same_v <Dimension<5>, decltype (Dimension {1, 2, 3, 4, 5})>);
// static_assert (std :: is_same_v <Dimension<5>, decltype (Dimension (1, 2, 3, 4, 5))>);
static_assert (std :: is_same_v <Dimension<0>, decltype (Dimension {})>);
static_assert (std :: is_same_v <Dimension<0>, decltype (Dimension ())>);
}
}