Mmap iterator: how to resolve compiler error: cannot take the address of an rvalue of type ‘vector’

I am working on an Iterator for a MultiMap that will visit each value in the vector associated with the current key before advancing to the beginning of the vector of the next key.

The problem I am currently having is that my compiler will not allow:

_values = &((*_treeIt).values);

which produces the error: cannot take the address of an rvalue of type ‘vector’ _values = &((*_treeIt).values);

Here is the relevant code that won’t compile:
https://pastebin.com/6kkPNzRQ

What will motivate management to address operations shortfall?

The business I work for is a restaurant (franchise, one of 80+.) In 3 years it has rarely operated with a full staff because attracting workers to this location is difficult. My question is about how to best handle the problem of seeing that all the work to be done gets done. As I see it, management has the choice of: A. Accomplish only the minimum needed to operate lawfully and meet health codes; B. Paying higher wages to attract and hire more workers; C. Asking/requiring employees to work overtime to accomplish all work normally tasked to be done; D. Operating at a slower pace serving guests and allow more time to accomplish non-essential work such as washing windows, cleaning vents, organizing stock, vacuuming, grounds maintenance, etc. (not to mention training,) all of which are now suffering. Of these, only A. has been implemented. Neither B. nor C. have occurred and D. is considered simply out of the question. This is a booming location but they don’t treat it any differently than the others. What will bring management to accept that something has got to change? Maybe as far as they are concerned, it doesn’t.

Why does SIM respond to AT+CIPSEND with “+CME ERROR: operation not allowed” when the IP address and the…

I am working with a team to send data from Raspberry Pi over 2G network to a server using a GSM module called “SIM800L EBV”. We encountered an AT+CIPSEND error that has only occurred in Zambia, Africa while having been working correctly in the US (Arkansas, Colorado, and Washington state) for two years.
Below is a copy of our SIM log. We noticed from our log that the AT+CIFSR to request an IP address is working. And when AT+CIPSTART is run to start the TCP connection to the server “obfuscated.org” at port 11002, the response is OK and CONNECT OK indicating that the TCP connection to the server has been established. However, when AT+CIPSEND is run, we received an “+CME ERROR: operation not allowed”.

SIM_Log

Has anyone encountered this problem before? Does anyone know about any supporting information that might help solve the problem? Is there any suggestion on how to get around this CME error? Is there any other command to replace this AT+CIPSEND command? Why does it work fine in the United States but not in Zambia?

Many thanks!

For easy contact, send us an email at teamece19.4@gmail.com

For reference, below is a picture of the SIM800L EVB module.
SIM800L_EVB

How can I store user contacts (address book) with zero knowledge?

I want to provide a user with remote contact list (address book) that they can access and update from arbitrary clients on multiple devices. But I want to have zero knowledge of those contacts. Existing mechanisms (eg XMPP roster, CardDAV) store these details in the clear. Is there an existing mechanism for client-side encryption/decryption of an address book?

Notes (including security model):

  • The address book will be potentially be used by a variety of clients (XMPP, email, VoIP), so I am open to any mechanism/format.

  • I assume contacts could still be inferred from the routing logs of XMPP/email/other services. The server would need to be trusted on this anyway, so this is acceptable. It’s the “permanent” storage of the full list of contact details that I’m wanting to address here.

Disable sp.utilities.utility.sendemail from address

Below REST API(SharePoint 2013) code i am using to send email to users.Its working fine without any issues.With below code if i add “From” attribute with as hard coded address, the email notification sent to user with from address which i specified in “From” attributes.So, i would like to disable this functionality even when i hard code “From” attributes in REST API.

 var urlTemplate = appweburl + "/_api/SP.Utilities.Utility.SendEmail";
$.ajax({
    contentType: 'application/json',
    url: urlTemplate,
    type: "POST",
    data: JSON.stringify({
        'properties': {
            '__metadata': { 'type': 'SP.Utilities.EmailProperties' },
            'From': 'steve.curran@somewhere.com',
            'To': { 'results': ['smc750@somewhere.com'] },
                'Body': 'Hello',
                'Subject':'remember'
            }
    }
  ),
    headers: {
        "Accept": "application/json;odata=verbose",
        "content-type": "application/json;odata=verbose",
        "X-RequestDigest": $("#__REQUESTDIGEST").val()
    },
    success: function (data) {
        var result = data.d.results;
        var i = result.length;
    },
    error: function (err) {
        alert(JSON.stringify(err));
    }

});

I gone through below Link to “Disable Sendmail Impersonation”.I would like to know if configure my web application with “$webapp.OutboundMailOverrideEnvelopeSender = $true”, can email will be triggered with unique name which was configured in Outbound SMTP settings even when i specify “From” attributes in REST API.

https://docs.microsoft.com/en-us/sharepoint/administration/outgoing-email-planning#disable-sharepoint-email-impersonation–

Contact Form 7 How to Alter the From email address?

In the past we were able to put a user email address in the From field. But now we get the message: ” this email address does not belong to the same domain as”.
I know you should use ie. noreply@mydomain.com

Because of an internal develop emailprogram I need to have the user email address in the From field. The internal develop email program has some features which depends on the From field in a email message.

Is there a way i can trick CF7 so it use the / overwrites the “this email address does not belong to the same domain” warning? Jus like < CF 3.1

Hope you get my question

class representing Digital PLC Address

I have a project were i work with digital adresses for a plc. The requirement is that the user gives a start address e.g. 1000.0 and then for example the next 20 things are numbered in increasing order.

In this example this would mean:

1000.0
1000.1
1000.2
1000.3
1000.4
1000.5
1000.6
1000.7
1001.0
1001.1
1001.2
1001.3
1001.4
1001.5
1001.6
1001.7
1002.0
1002.1
1002.2
1002.3

Also i whant to prevent that invalid adresses can be created at the start like 1000.8

To acomplish this behaviour i created a class Digital_plc_address. I would like to know what can be improved. Are there any bad styles in it?

Is it good practice to make a class to report invalid_input errors when the class cannot be created?

I did some quick checks of the class in main. I know i could have done better with unit tests but i thought for this small class its ok to check it like this.

digital_plc_adress.h

#ifndef DIGITAL_PLC_ADDRESS_GUARD151120181614
#define DIGITAL_PLC_ADDRESS_GUARD151120181614

#include 

namespace digital_plc_address {

    class Digital_plc_address {
        /*
        Class representing a digital plc address.
        Each address is represented by a byte address and the digits of the 
        bytes from 0-7. e.g  100.6 , 5.2
        Creating invalid addresses like 100.8 is not allowed by the class.
        */
    public:
        Digital_plc_address(int byte, char digit = 0);
        explicit Digital_plc_address(const std::string& Digital_plc_address);

        class Invalid_format {};

        std::string as_string() const;

        Digital_plc_address& operator++();
    private:
        int m_byte;
        char m_digit;
    };
}

#endif

digital_plc_address.cpp

#include "digital_plc_address.h"

#include 
#include 
#include 
#include 

namespace digital_plc_address {

    Digital_plc_address::Digital_plc_address(int byte, char digit)
        :m_byte{ byte }, m_digit{ digit }
    {
        if (m_byte < 0 || m_byte > std::numeric_limits::max()
            || m_digit < 0 || m_digit > 7) {
            throw Invalid_format{};
        }
    }

    Digital_plc_address::Digital_plc_address(const std::string& Digital_plc_address)
    {
        std::regex valid_format(R"(d+.[0-7]{1})");

        if (!std::regex_match(Digital_plc_address, valid_format)) {
            throw Invalid_format{};
        }

        std::istringstream ist{ Digital_plc_address };

        std::string byte_str;
        std::getline(ist, byte_str, '.');

        m_byte = std::stoi(byte_str);
        m_digit = Digital_plc_address.back() - '0';
    }

    std::string Digital_plc_address::as_string() const
    {
        return std::to_string(m_byte) + '.' + std::to_string(m_digit);
    }

    Digital_plc_address& Digital_plc_address::operator++()
    {
        if (m_digit == 7) {
            m_digit = 0;
            ++m_byte;
        }
        else {
            ++m_digit;
        }
        return *this;
    }
}

main.cpp

#include "digital_plc_address.h"

#include 


void print_io(int a)
{
    try {
        digital_plc_address::Digital_plc_address t{ a };
        std::cout << t.as_string() << 'n';
    }
    catch (digital_plc_address::Digital_plc_address::Invalid_format) {
        std::cout << "Invalid input: " << a << 'n';
    }
}

void print_io(int a, char b)
{
    try {
        digital_plc_address::Digital_plc_address t{ a,b };
        std::cout << t.as_string() << 'n';
    }
    catch (digital_plc_address::Digital_plc_address::Invalid_format) {
        std::cout << "Invalid input: " << a << 't' << b <<'n';
    }
}

void print_io(const std::string& s)
{
    try {
        digital_plc_address::Digital_plc_address t{ s };
        std::cout << t.as_string() << 'n';
    }
    catch (digital_plc_address::Digital_plc_address::Invalid_format) {
        std::cout << "Invalid input: " << s << 'n';
    }
}

int main() 
try{

    digital_plc_address::Digital_plc_address inc{ 10 };

    for (int i = 0; i < 20; ++i) {
        ++inc;
        std::cout << inc.as_string() << 'n';
    }

    print_io(100);
    print_io(100, 1);
    print_io(50, 7);

    print_io("100");
    print_io("100.1");
    print_io("50.7");

    print_io("-50.7");

    print_io("50.-7");

    print_io("50.8");

    std::getchar();
}
catch (digital_plc_address::Digital_plc_address::Invalid_format) {
    std::cout << "error";
    std::getchar();
}