Inaccessible base class despite friendship

There are tons of questions regarding this error and all of the answers seem to imply that downcasting is impossible. Only this answer mentions friendship as possible solution, at least as I understand it. However the following code (irrelevant stuff removed for clarity) does not compile:

class C;  class A {     friend class C;  // this does not help };  class B : protected A {     friend class C;  // this does not help either };  class C {     void foo(A* a) {}; };  B b; C c;;  // this produces error: class A is an inaccessible base of B 

Why friendship does not work on a reference? After all, “C” is perfectly capable of calling protected methods of “A” through pointer to “B”.

Criar uma variável com um campo da base de dados

Tenho o seguinte código;

$  sql = "SELECT *      FROM utilizador      WHERE login = '".$  login."' AND password ='".$  pass."'"; //faz pergunta sobre a tabela $  existe = mysqli_query($  ligaBD, $  sql); //Nº de registos que resultaram do SQL $  num_registos = mysqli_num_rows($  existe); 

A minha pergunta é como ao fazer o login, criar uma variável por exemplo $ login e essa mesma variável ficar com o valor do campo login da base de dados.

No consigo actualizar los campos en la base de dartos

Ahora tengo el siguiente problema es que no consigo actualizar los datos en la base de datos, todo me ha funcionado antes pero ahora ya no me esta actualizando nada. Necesito de su valiosa ayuda.

Este es mi archivo editar.view.php donde extraigo los datos en cada campo de la base de datos.

<section class="jumbotron">     <div class="container">         <div class="post">             <article>                 <h2 class="titulo">Editar Artículo</h2>                  <form class="form-Articulo" enctype="multipart/form-data" action="<?php echo htmlspecialchars($  _SERVER['PHP_SELF']); ?>" method="post">                     <div class="form-group">                         <input type="hidden" name="id" value="<?php echo $  post['id']; ?>">                     </div>                     <div class="form-group">                         <input type="text" class="form-control" name="titulo" value="<?php echo $  post['titulo']; ?>">                      </div>                     <div class="form-group">                         <input type="text" class="form-control" name="extracto" value="<?php echo $  post['extracto']; ?>">                      </div>                     <div class="form-group">                         <input type="text" class="form-control" name="autor" value="<?php echo $  post['autor']; ?>">                     </div>                     <div class="form-group">                         <textarea name="texto" class="form-control area"><?php echo $  post['texto']; ?></textarea>                      </div>                     <div class="form-group">                         <input type="file" name="thumb">                     </div>                     <div class="form-group">                         <input type="hidden" name="almacenada" value="<?php echo $  post['thumb']; ?>">                     </div>                      <button class="btn btn-primary btn-article" type="submit">Guardar datos</button>                 </form>             </article>         </div>     </div> </section> 

Y este es mi archivo editar.php que contiene toda la conexión

session_start();  require 'config.php'; require '../funciones.php';  comprobarSesion();  if (!$  conexion) {     header('Location: ../error.php'); }  if ($  _SERVER['REQUEST_METHOD'] == 'POST') {      $  titulo = limpiarDatos($  _POST['titulo']);     $  extracto = limpiarDatos($  _POST['extracto']);     $  autor = limpiarDatos($  _POST['autor']);     $  texto = $  _POST['texto'];     $  id = limpiarDatos($  _POST['id']);     $  thumb_guardada = $  _POST['almacenada'];     $  thumb = $  _FILES['thumb'];      if (empty($  thumb['name'])) {         $  thumb = $  thumb_guardada;     }     else {          $  nuevo_archivo = '../' . $  blog_config['carpeta_img'] . $  _FILES['thumb']['name'];          move_uploaded_file($  _FILES['thumb']['tmp_name'], $  nuevo_archivo);         $  thumb = $  _FILES['thumb']['name'];     }      $  consulta = $  conexion->prepare(         'UPDATE articulos SET titulo = :titulo, extracto = :extracto, :autor = autor, texto = :texto, thumb = :thumb WHERE id = :id'     );      $  consulta->execute(array(          ':titulo' => $  titulo,         ':extracto' => $  extracto,         ':autor' => $  autor,         ':texto' => $  texto,         ':thumb' => $  thumb,         ':id' => $  id      ));      header('Location: ' . RUTA . '/admin/panel.php'); }  else {      $  id_articulo = id_articulo($  _GET['id']);      if (empty($  id_articulo)) {         header('Location: ' . RUTA . '/admin/panel.php');     }      $  post = obtener_post_por_id($  conexion, $  id_articulo);      if (!$  post) {         header('Location: ' . RUTA . '/admin/panel.php');     }      $  post = $  post[0];  }  require '../vista/editar.view.php'; 

Cuando quiero editar el id o el articulo seleccionado al guardar no me ejecuta los cambios en la base de datos, osea no se actualiza la información.

Cabe mencionar que en el campo textarea al editar la información para actualizarla la introduje con etiquetas HTML para darle formato al texto en cuanto a color y títulos.

Agradecería su valiosa ayuda o asesoramiento.

Fazer uma consultar com base externa no Zend Framework


  public function excluirFiliadosNaoEnviados($  base) {          $  sql = "SELECT FROM " . $  base . ".debito_automatico";       $  acao = $  this->conexao->prepare($  sql);         if($  acao->execute()){         return true;       }else{         return false;       }    } 


public function prepararfiliadosAction() {      $  base = DATABASE_GERAL;       if($  this->repositorio->excluirFiliadosNaoEnviados($  base)) {         echo $  this->repositorio->prepararFiliados($  this->getMesCompetencia()) ? 'true' : 'false';     }      $  this->_helper->layout->disableLayout();     $  this->_helper->viewRenderer->setNoRender(TRUE); } 

A consulta não esta funcionando sempre retornando false.

Porqué no me inserta la imagen en mi base de datos

tengo un formulario con un codigo php que se dedica a enviar los datos nombre, precio e imagen a una base de datos y la inserte en una carpeta y en mi base me guarde la dirección.

Tengo el siguiente codigo:

<?php if(isset($  enviar)){ 	$  name = clear($  name); 	$  price = clear($  price); 	 	$  imagen = ""; 	if(is_uploaded_file($  _FILES['imagen']['tmp_name'])){ 		$  imagen = $  name.rand(0,1000).".png"; 		move_uploaded_file($  _FILES['imagen']['tmp_name'], "productos/".$  imagen); 	} 	$  mysql_query("INSERT INTO productosima (name,price,imagen) VALUES ('$  name','$  price','$  imagen')"); 	alert("Producto agregado"); 	redir("?p=ejemploinsertardatos"); }  ?>    <form method="post" action="" enctype="multipart/form-data"> 	<div class="form-group"> 		<input type="text" class="form-control" name="name" placeholder="Nombre del producto"/> 	</div>   	<div class="form-group"> 		<input type="text" class="form-control" name="price" placeholder="Precio del producto"/> 	</div>   	<label>Imagen del producto</label>  	<div class="form-group"> 		<input type="file" class="form-control" name="imagen" title="Imagen del producto" placeholder="Imagen del producto"/>     </div>      <div class="form-group"> 		<button type="submit" class="btn btn-success" name="enviar"><i class= "fa fa-check"></i>  Agregar Producto</button>     </div>       </form>

El formulario sale, me deja poner el archivo y todo, pero veo que luego cuando le doy al boton de enviar no se me guarda.

Base image is blank

i hope someone can help me. Base image is not showing when I choose the product, but small and thumbnail works fine.This happened after I imported products again but with the Default attribute (I updated the products with just default attribute). It´s not even working if I create a product manually and browsing the image. I have tried the following things:

  • 1- reindex, static content deployment, flush and clean cache, etc… 2- give permission to pub/media folder
    1. run the command php bin/magento catalog:images:resize
    2. Check that Default attribute is ok and enabled.
    3. Unchecked base image from product and check it again.
    4. check in the db table catalog_product_entity_media_gallery; that the image path was ok.
    5. imported many test products with images in pub/media/import There are 2 weird things here:
      1. Only in base image it´s not showing anything, but I can even see the image URL and the image itself if I use inspect element in the area of the base image.
      2. If I add an additional image it shows both, base and additional image in an incorrect size, but I don´t want to add additional images. This is how it looks like. enter image description here

Thanks a lot!

Base change and family of stable maps

Suppose that family F of stable maps given by maps $ f:C \to S,\mu:C \to P^r$ and sections $ \rho_i:S \to C$

Suppose that $ \Sigma(F)$ be union of all one dimensional components of locus of nodes in fibers of $ f$ and let $ \pi_{F}:N(F) \to C$ be normalization of $ C$ along $ \Sigma(F)$

My question is why we can choose some base change $ \phi:S’ \to S$ such that $ \pi_{F’}^{-1}(\Sigma(F’))$ is disjoint union of sections of $ N(F’) \to S’?$

($ F’$ is pullback family induced by $ \phi$ )

Problem installing Knowledge base module

I installed Drupal using the Bitnami stack. I’m trying to install the knowledge base module from . I have installed and enabled the modules upon which it is dependent but when I try to enable the knowledge base module itself I get the error

Unable to install KnowledgeBase due to unmet dependencies: core.entity_form_display.node.kb_content.default (field.field.node.kb_content.body)

Obviously I am still missing a dependency and it’s telling me what it is but what is but how do I fulfill the requirement?

Further, I can see the core.entity_form_display.node.kb_content.default yml file in C:\Bitnami\drupal-8.7.2-1\apps\drupal\htdocs\modules\kb\config\install when I use file explorer.

Is the yml file in the wrong place? Or do I need to do something with it so the knowledgebase install knows about it?

Can someone tell me what I need to do? Please excuse if it’s obvious I am a newbie to Drupal.

Thanks for any help, Roscoe

Imagem no Json sem usar Base 64


Eu estou a criar um json e em cada informação do json preciso de colocar uma imagem mas eu não queria um código gigante por isso Não quero usar base64 existe alguma maneira de colocar um link no json que leva para uma imagem?

[  {         "titulo": "Texto titulo",         "localizacao": "Texto localização",         "texto": "Texto grande de exemplo para usar como teste geral",         "imagem": "",         "id": 0   } ]

no guarda los datos en la base de dato

tengo un problema con mi codigo, al querer ingresar a mi ruta para ingresar datos me aparece el siguiente error “SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘patente’ cannot be null (SQL: insert into cars (patente, marca, modelo, color, `fecha_in ▶”, alguien sabe que puedo hacer?

public function ingresar(Request $ request){

    $  patente=$  request['patente'];      $  marca=$  request['marca'];      $  modelo=$  request['modelo'];      $  color=$  request['color'];      $  fecha_ingreso=$  request['fecha_ingreso'];      $  car=new Car();      $  car->patente=$  patente;      $  car->marca=$  marca;      $  car->modelo=$  modelo;      $  car->color=$  color;      $  car->fecha_ingreso=$  fecha_ingreso;      $  car->save();      return redirect()->back();  } 


Route::match([‘get’, ‘post’],’/ingresar’,[

'uses'=>'CarController@ingresar',  'as'=>'cars.ingresar' 


Pequeña muestra de mi formulario

        <div class="col-md-6"></div>              <form action="{{route('cars.ingresar')}}"  method="post">                 @csrf                 <div class="row form-group">                      <div class="col-md-12">                          <label for="true">Patente:</label>                          <input type="text" name="patente" size="6" maxlength="6"  class="form-control"  required>                      </div>                  </div>