grub2 – Kubuntu won’t boot, ACPI error/exception

I have kubuntu installed but I can’t check the version since I can’t boot up. I’m not very Linux saavy. I haven’t used this computer in a couple weeks and after trying to restart it after a power loss get this:

( 0.00000) ACPI Error: (SB_.PCIO.XHC_.RHUB.HS11) Namespace lookup failure, AE_NOT_FOUND (20170831/dswload-210)
( 0.00000) ACPI Exception: AE_NOT_FOUND, During name lookup/catalog (20170831/psobject-253)
( 0.00000) ACPI Exception: AE_NOT_FOUND, (SSDT:DELL__MT) while loading table (20170831/tbxfload-228)
( 0.00000) ACPI Error: 1 table load failures, 7 successful (20170831/tbxfload-246)

BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3.3) built-in shell (ash)
Enter ‘help’ for a list of built-in commands.

(initramfs)

One suggestion I found was to set acpi=off in the kernel line of the GRUB menu on boot, but my menu has no kernel line, so maybe they were outdated instructions. I see nothing referencing ACPI in the GRUB boot menu. Any help is appreciated!

file permissions – “[ErrorException] chmod(): Operation not permitted” running “composer update”

I’m running Magento 2.4.2 and I’m using Composer v2.0.11. 2 days ago, after running, as usual, composer update, I suddenly received this error:

(ErrorException)
chmod(): Operation not permitted

You can see composer update -v output down below:

enter image description here

What I tried

  • I tried to apply chmod -R 777 . and chown -R www-data:www-data .
  • I tried to apply chmod u+x bin/magento

Any ideas?

C++ Error/exception handling

I know the following code are horrible, so I’d like a review. Criticism are welcome. I want to know what went wrong, and how I can avoid the same mistake in the future.


Version 1

const unsigned int set_max {32};
std::vector<unsigned int> base;
base.reserve(argc-1);
for (int i = 1; i < argc; ++i) {
  unsigned long tmp;
  try { tmp = std::stoul(argv(i), nullptr, 10); }
  catch (std::invalid_argument) { std::cerr << "Invalid base! Conversion failed.n"; return -2; }
  catch (std::out_of_range) { std::cerr << "Invalid base! Too large.n"; return -2; }
  if (tmp > std::numeric_limits<unsigned int>::max()) { std::cerr << "Invalid base! Too large.n"; return -2; }
  if (tmp < 2) { std::cerr << "Invalid base! Must at least be 2.n"; return -2; }
  if (tmp > set_max) { std::cerr << "Invalid base! Must be within " << set_max << ".n"; return -2; }
  base.push_back(static_cast<unsigned int>(tmp));
}

Version 2

const int set_max {32};
std::vector<unsigned int> base;
base.reserve(argc-1);
try { for (int i = 1; i < argc; ++i) {
  unsigned long tmp; try { tmp = std::stoul(argv(i), nullptr, 0); }
  catch (std::invalid_argument                         ) { throw std::string("Conversion failed"                        ); }
  catch (std::out_of_range                             ) { throw std::string("Too large"                                ); }
  if    (tmp > std::numeric_limits<unsigned int>::max()) { throw std::string("Too large"                                ); }
  if    (tmp < 2                                       ) { throw std::string("Must at least be 2"                       ); }
  if    (tmp > set_max                                 ) { throw std::string("Must be within " + std::to_string(set_max)); }
  base.push_back(static_cast<unsigned int>(tmp));
} } catch (std::string &err_msg) { std::cerr << "Invalid base! " << err_msg << ".n"; return -2; }

mysql – ErrorException na linha 206 do Util.php: A função create_function () está obsoleta

Olá, ao instalar meu script, estou recebendo o seguinte erro:

ErrorException na linha 206 do Util.php: A função create_function () está obsoleta

meu código

{
// php doesn’t garbage collect functions created by create_function ()
// so use a static variable to avoid adding a new function to memory
// every time this function is called.
static $ callbacks = array ();
if (! isset ($ callbacks ($ delimiter))) {
$ callbacks ($ delimiter) = create_function (‘$ matches’, “return ‘$ delimiter’. strtolower ( $ matches (1));”);
}

return preg_replace_callback ('/ ((A-Z)) /', $ callbacks ($ delimiter), $ string);

}

OBS: ja tentei mudar create_fuction para fuction

Exception – Laravel can not catch ErrorException

I'm trying to spot an exception when sending an email, but Laravel does not. I've read that Laravel turns every warning and error into an ErrorException, but that does not seem to work in my case.

$ transportExchange = new SmtpTransport ($ myHost, 25, & # 39; tls & # 39;);
$ transportExchange-> setUsername (& # 39; ... & # 39;);
$ transportExchange-> setPassword (& # 39; ... & # 39;);
$ configExchange = new Swift_Mailer ($ transportExchange);

To attempt {
Mail :: setSwiftMailer ($ configExchange);
Mail :: to ($ email['to']) -> send (new GeneralEmail ($ email));
} catch (ErrorException $ ex) {
do something();
}

If the password is incorrect, I get a Laravel error screen with stream_socket_enable_crypto (): SSL operation failed with code 1

Instead, I want to reach the do_something () statement.