air travel – Am I entitled to compensation under EU261 if my flight was rescheduled to four days later with only six days notice?

I have been notified a little less than six days before my originally scheduled departure time, about a schedule change resulting in my flight departing four days later. The flight numbers are the same, and the airline is refusing compensation in accordance with EU261 as they state that this situation does not regard a cancellation. The airline has stated that the reschedule was done because of commercial reasons (so, no extraordinary circumstances).

The airline offered me a refund, but that seems ridiculous to me – to me it seems simply unethical and unfair to reschedule a flight with such an extreme difference (96 hours) out of commercial reasons, and not compensate passengers, who booked unrefundable hotel stays and such, accordingly. Am I right that I am in this case entitled to EU261 compensation?

Is anyone aware of any jurisprudence?

postgresql – PHP Notice: Undefined variable: conn in C:Userslucasphp_ServerDBmanager.php on line 7

estou com um problema para conectar no banco de dados, mais especifico para registrar um valor

eu tentei fazer a conexão aqui

´´´
class DBConnection{

    private $conn;

        function __construct(){
            $this->conn = pg_connect("host='localhost' port='5432' dbname='desafio_softexpert' user='postgres' password='****'") or die("cannot connect to DB");
        }
        public function get_conn(){
            return $this->conn;
        }
}

´´´

e aqui queria que a variavel conn recebece o retorno da conexão, mas da um erro

´´´
include(“./DB/DBConnection.php”);
$DBConnection = new DBConnection();
$conn = $DBConnection->get_conn();

function insert_in_DB($query){
    $result = pg_query ($conn, $query);
    if (!$result)
        echo "query did not execute";
    $rs = pg_fetch_assoc($result);
    if (!$rs)
      echo "0 records";

´´´

magento2 – Missing ‘return’ statement in frontend Controller execute() method (IDE warning notice)

I recently use PhpStorm to write my code and it finds an error in a controller who get data from a <form> to save them in a custom model. (works fine even without correction).

Class StockRequestForm extends MagentoFrameworkAppActionAction
{
    public function __construct(....) 
    {
        ....
    }

    /**
     * @inheritDoc
     */
    public function execute()
    {
        $resultRedirect = $this->resultFactory->create(MagentoFrameworkControllerResultFactory::TYPE_REDIRECT);
        if (!$this->helper->getFormKeyValidation($this->getRequest())) {
          $this->messageManager->addErrorMessage('Invalid request!');
          return $resultRedirect->setRefererOrBaseUrl();
        }

        $post = (array)$this->getRequest()->getPost();
        if (!empty($post)) {
            try {
                ... // saving $model
                $this->messageManager->addSuccessMessage(__('You're request have been submitted.'));
                return $resultRedirect->setRefererOrBaseUrl();
            } catch (Exception $e) {
                $this->messageManager->addErrorMessage($e->getMessage());
                return $resultRedirect->setRefererOrBaseUrl();
            }
    
        $this->_view->loadLayout();
        $this->_view->renderLayout();

    } // here the missing 'return' statement !
}

Magento2: Notice: Undefined variable: _product

I use product slider from mageplaza.

Above product name I try display brand name from attribute: newbrand_name

to file productslider.phtml I add below code:

<?php
$optionText = '';
$attr = $_product->getResource()->getAttribute('newbrand_name');
if ($attr->usesSource()) {
    $optionText = $attr->getSource()->getOptionText($_product->getNewbrandName());
}
?>
<?php if ($optionText) { ?>
    <div class="brand-name"><?php echo $optionText ?></div><br />
<?php } ?>

In frontend I get issue:

Notice: Undefined variable: _product in /home/shop/domains/domain.com/public_html/app/code/Mageplaza/Productslider/view/frontend/templates/productslider.phtml on line 50

Here is full file code:

<?php
/**
 * Mageplaza
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Mageplaza.com license that is
 * available through the world-wide-web at this URL:
 * https://www.mageplaza.com/LICENSE.txt
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade this extension to newer
 * version in the future.
 *
 * @category    Mageplaza
 * @package     Mageplaza_Productslider
 * @copyright   Copyright (c) Mageplaza (https://www.mageplaza.com/)
 * @license     https://www.mageplaza.com/LICENSE.txt
 */

use MageplazaProductsliderBlockAbstractSlider;
use MagentoFrameworkAppActionAction;

/** @var AbstractSlider $block */
$mode = 'grid';
$title = $block->getTitle();
$blockId = $block->getSliderId() . uniqid('-', false);
$items = $block->getProductCollection();
if ($items && $items->getSize()) : ?>
    <div class="mp-product-slider-block block widget block-products-list <?= /** @noEscape */ $mode ?>">
        <h2 class="mp-product-slider-title"><?= $block->escapeHtml($title) ?></h2>
        <p class="mp-ps-info"><?= $block->escapeHtml($block->getDescription()) ?></p>
    </div>
    <div class="block-content mp-product-slider-content">
        <div class="products-<?= /** @noEscape */  $mode ?> <?= /** @noEscape */  $mode ?>">
            <ol class="product-items widget-viewed-grid">
                <?php $iterator = 1; ?>
                <div id="mp-list-items-<?= /** @noEscape */ $blockId ?>" class="owl-carousel owl-theme">
                    <?php foreach ($items as $_item) : ?>
                        <?= ($iterator++ == 1) ? '<li class="product-item product-slider"">' : '</li><li class="product-item product-slider"">' ?>
                        <div class="slider-product-item-info">
                            <a href="<?= $block->escapeUrl($block->getProductUrl($_item)) ?>"
                               class="product photo slider-product-item-photo">
                                <?= $block->getImage($_item, 'recently_viewed_products_grid_content_widget')->toHtml(); ?>
                            </a>
                            <div class="product details slider-product-item-details">
                            <?php 
                                        $optionText = '';
                                        $attr = $_product->getResource()->getAttribute('newbrand_name');
                                        if ($attr->usesSource()) {
                                           $optionText = $attr->getSource()->getOptionText($_product->getNewbrandName());
                                        }
                                    ?>
                                    <?php if($optionText){ ?>
                                        <div class="brand-name"><?php echo $optionText ?></div><br />
                                    <?php } ?>
                                <strong class="product name product-item-name">
                                    <a title="<?= $block->escapeHtml($_item->getCustomName()) ?>"
                                       href="<?= $block->escapeUrl($block->getProductUrl($_item)) ?>">
                                        <?= $block->escapeHtml($_item->getCustomName()) ?>
                                    </a>
                                </strong>

                                <?php if ($block->canShowReview()) : ?>
                                    <?= $block->getReviewsSummaryHtml($_item, 'short', true) ?>
                                <?php endif; ?>

                                <?php if ($block->canShowPrice()) : ?>
                                    <?= /** @noEscape */ $block->getProductPrice($_item) ?>
                                <?php endif; ?>

                                <div class="product actions slider-product-item-actions product-item-actions">
                                    <?php if ($block->canShowAddToCart()) : ?>
                                        <div class="actions-primary">
                                            <?php if ($_item->isSaleable()) : ?>
                                                <?php $postParams = $block->getAddToCartPostParams($_item); ?>
                                                <form data-role="tocart-form" data-product-sku="<?= $block->escapeHtml($_item->getSku()) ?>" action="<?= /* @NoEscape */ $postParams('action') ?>" method="post">
                                                    <input type="hidden" name="product" value="<?= /* @escapeNotVerified */ $postParams('data')('product') ?>">
                                                    <input type="hidden" name="<?= /* @escapeNotVerified */ Action::PARAM_NAME_URL_ENCODED ?>" value="<?= /* @escapeNotVerified */ $postParams('data')(Action::PARAM_NAME_URL_ENCODED) ?>">
                                                    <?= $block->getBlockHtml('formkey') ?>
                                                    <button type="submit"
                                                            title="<?= $block->escapeHtml(__('Add to Cart')) ?>"
                                                            class="action tocart primary">
                                                        <span><?= /** @noEscape */ __('Add to Cart') ?></span>
                                                    </button>
                                                </form>
                                            <?php else : ?>
                                                <?php if ($_item->getIsSalable()) : ?>
                                                    <div class="stock available"><span><?= $block->escapeHtml(__('In stock')) ?></span></div>
                                                <?php else : ?>
                                                    <div class="stock unavailable"><span><?= $block->escapeHtml(__('Out of stock')) ?></span></div>
                                                <?php endif; ?>
                                            <?php endif; ?>
                                        </div>
                                        <div class="secondary-addto-links actions-secondary"
                                             data-role="add-to-links">
                                            <?php if ($this->helper('MagentoWishlistHelperData')->isAllow()) : ?>
                                                <a href="#"
                                                   data-post='<?= /** @noEscape */ $block->getAddToWishlistParams($_item); ?>'
                                                   class="action towishlist" data-action="add-to-wishlist"
                                                   title="<?= /** @noEscape */ __('Add to Wish List') ?>">
                                                    <span><?= /** @noEscape */ __('Add to Wish List') ?></span>
                                                </a>
                                            <?php endif; ?>
                                            <?php if ($block->getAddToCompareUrl()) : ?>
                                                <?php $compareHelper = $this->helper('MagentoCatalogHelperProductCompare'); ?>
                                                <a href="#" class="action tocompare"
                                                   data-post='<?= /** @noEscape */ $compareHelper->getPostDataParams($_item); ?>'
                                                   data-role="add-to-links"
                                                   title="<?= /** @noEscape */ __('Add to Compare') ?>">
                                                    <span><?= /** @noEscape */ __('Add to Compare') ?></span>
                                                </a>
                                            <?php endif; ?>
                                        </div>
                                    <?php endif; ?>
                                </div>
                            </div>
                        </div>
                        <?= ($iterator === count($items) + 1) ? '</li>' : '' ?>
                    <?php endforeach ?>
                </div>
            </ol>
        </div>
        <?= $block->getPagerHtml() ?>
    </div>
    <script>
        require(('jquery', 'mageplaza/core/owl.carousel'), function ($) {
            $('#mp-list-items-<?= /** @noEscape */ $blockId ?>').owlCarousel(<?= /** @noEscape */ $block->getAllOptions()?>);
        });
    </script>
<?php endif; ?>

Can A Website Can Get Sued Or Receive A Dmca Notice? How?

If you grow large enough, you will get someone’s attention.

There is indeed other sites like it and there are many reasons why they make not be down yet (hosted in a place where copyright laws are not the same as the US, live in a different place etc). It doesn’t matter if others are doing it, if you are based in (or live within) the United States it would be illegal and in time you could get caught. It is the same way as many other people could be speeding on a public road and not get caught, while you do and happen to do it when the police is around.

It is risky to do, even more so when you openly admit to doing it. If you had a file sharing site you could deny you are aware of what is being uploaded but on a site like yours when it openly invites people to download games – I would be pretty sure in a law suit the other party would have a easy win.

The DMCA is designed to protect ISPs such as web hosts in case their customers are uploading copyright material, sharing copyright material while in your case you ARE the one that is sharing it. The only thing as I said earlier is linking to illegal sharing is not yet “agreed” on what will happen in the United States so at best you are operating in a grey area.

All that said, I do not know US law perfectly and only advising based on when I ran a web hosting business and we got legal advise on how to deal with the US DMCA while being in the UK.

 

Question on how to handle DMCA counter notice


Can anyone advise, what happens in the following scenario..

EU based client

USA based hosting service

Someone from USA sends a DMCA notice

Scenario:
USA host receives a DMCA notice.. (for pics and videos, no watermarks or anything on either, no known or famous people or anything such involved)

EU based client files a counter notice that ends with – “I hereby consent to the jurisdiction of FRENCH (example) court…..”

From Hosting company point of view – is that legitimate, allowed way for client to respond? is their any hosting company liability if done like that?

Additionally, if USA sender of DMCA proceeds with a lawsuit of any kind, does it in any way effect the hosting company?

Is client even allowed to demand jurisdiction of his own EU country court in such counter notice?

Let me know if anyone knows or had similar experiences.

user behavior – Error notice vs upgrade banner

We have two distinct styles for the following:

  • An error message (which is a red/black banner at the top of the page)
  • An upgrade message (which is a light-colored banner prompting the user to upgrade their plan)

We are restricting video uploads to users on a Free plan. When they attempt to upload, we inform them that this is only possible when they upgrade their plan.

In this case, which prompt should we use? An error message prompting them to upgrade, or a basic upgrade message? I was thinking about the latter so it isn’t so scary for the user.

pdo – Notice: Trying to access array offset on value of type bool in C:xampphtdocscrudindex.php on (line 54, line 57, line60)

<title>Cadastro Pessoa</title>
<link rel="stylesheet" href="estilo.css" />

cadastrarPessoa($nome,$telefone,$email))
{

                    echo "E-mail já cadastrado";
                }

            }
            else
            {
                echo "Preencha todos os campos";
            }
    }



    if (isset($_GET('idAtualizar')))
    {
        $idAtualizar = trim($_GET('idAtualizar'));
        $res = $p->listarDados($idAtualizar);
    }



?>

<section id="esquerda">
    <form method="POST">
        <h2>Cadastrar Pessoa</h2>
        <label for="nome">Nome</label>
        <input type="text" name="nome" id="nome" 
        value = "<?php if(isset($res)){echo $res('nome');} ?>" />
        <label for="telefone">Telefone</label>
        <input type="text" name="telefone" id="telefone"
        value = "<?php if(isset($res)){echo $res('telefone');} ?>" />
        <label for="email">E-mail</label>
        <input type="email" name="email" id="email" 
        value = "<?php if(isset($res)){echo $res('email');} ?>" />
        <input type="submit" 
        value = "<?php if(isset($res)){echo "Atualizar";}else{echo "Cadastrar";} ?>" />
    </form>

</section>

<section id="direita">
    <table>
        <tr>
            <th>Nome</th>
            <th>Telefone</th>
            <th colspan="2">Email</th>

        </tr>

        <?php
            $dados = $p->buscarDados();
            if(count($dados) > 0)
            {
                for ($i=0; $i < count($dados); $i++) 
                { 
        ?>          
                    <tr>
        <?php                           
                    foreach ($dados($i) as $key => $value) 
                    {
                        if($key != "id")
                        {
                            echo "<td>".$value."</td>";
                        }
                     } 
        ?>                  
                        <td>
                            <?php //echo $dados($i)('id'); ?>
                            <a href="index.php?idAtualizar=<?php $dados($i)('id'); ?>">Editar</a>
                            <a href="index.php?id=<?php $dados($i)('id'); ?>">Exclur</a>
                        </td>
                    </tr>
        <?php
                }
            }
            else
            {
                echo "Não existe cadastro ainda";
            }


        ?>

    </table>



</section>

excluirPessoa($idPessoa);
header(“location: index.php”);
}

?>

Rackspace: is the 90 day notice unfair?

We've been with Rackspace for 11 years, and our last footprint is 4 decent-sized servers and one HW FW that we booked 3 years ago. We go out … | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1808090&goto=newpost

differential equations: why does ParallelTable notice where the table is running silently?

I have a code that involves ParametricNDSolveValue and FindRoot to find a path (actually, the path of a line that is everywhere normal to the magnetic field) that passes through a given point {rn, zn} on the rz plane. I call first ParametricNDSolveValue To find the path zs (z0) starting from point {0, z0} on the z axis:

dzdr$(r_, z_) /; r < 1/10^5 = (
 r (-9 Sin(2 z) + 4 Sin(4 z)))/(-9 + 9 Cos(2 z) - 2 Cos(4 z));

dzdr$(r_, z_) /; 
  r >= 1/10^5 = (2 r (9 BesselI(1, 2 r) Sin(2 z) - 
      2 BesselI(1, 4 r) Sin(4 z)))/(18 r + 2 r^3 - 
    9 r BesselI(0, 2 r) Cos(2 z) - 9 BesselI(1, 2 r) Cos(2 z) - 
    9 r BesselI(2, 2 r) Cos(2 z) + 2 r BesselI(0, 4 r) Cos(4 z) + 
    BesselI(1, 4 r) Cos(4 z) + 2 r BesselI(2, 4 r) Cos(4 z));

pfun = ParametricNDSolveValue({D(z(r), r) == dzdr$(r, z(r)), 
   z(0) == z0}, z, {r, 0, 1.5}, {{z0, -((Pi)/2), (Pi)/2}})

zs({r_?NumericQ, z0_?NumericQ}) := pfun(z0)(r)

In the second step I define the function getZ0 ({rn, zn}) which requires FindRoot To find the starting point z0 for the path that passes through a given point {rn, zn}:

getZ0({rn_?NumericQ, zn_?NumericQ}, z0Start_?NumericQ) := Module(
  {sol}
  , sol = 
   FindRoot(zs({rn, z0}) - zn, {z0, z0Start, -((Pi)/2), (Pi)/2});
  sol((1, 2))
  )
getZ0({rn_?NumericQ, zn_?NumericQ}) := getZ0({rn, zn}, zn)

Finally, I want to evaluate getZ0 on a rectangular grid using Table:

Table({{rn, zn}, getZ0({rn, zn})}, {zn, -((Pi)/2), (Pi)/2, 
  1/2 (Pi)/2}, {rn, 0, 1, 0.5})

This works fine however substituting Table with ParallelTable results in a sequence of warnings of types: FindRoot::lstol, ParametricNDSolveValue::ndsz, InterpolatingFunction::dmval.
However, both routines seemed to give the same results.

In fact, the differential equation that is solved by ParametricNDSolveValue it is singular at two points (where the magnetic field is zero). But I wonder why there are no warnings when I use Table rather than ParallelTable?