entities – Base table or view not found: 1146 Table ‘drupal8_formation.profiles’ doesn’t exist

i have this following error when i want to get access to the module ‘profile’:

SQLSTATE(42S02): Base table or view not found: 1146 Table ‘mydatabase.profile’ doesn’t exist: SELECT base_table.profile_id AS profile_id, base_table.profile_id AS base_table_profile_id FROM {profiles} base_table GROUP BY base_table.profile_id LIMIT 1 OFFSET 0; Array ( ) dans DrupalCoreEntityEntityStorageBase->hasData() (ligne 580 de /var/www/html/core/lib/Drupal/Core/Entity/EntityStorageBase.php).

can anyone help me please ?


<?php

namespace DrupalprofileEntity;

use DrupalCoreEntityContentEntityBase;
use DrupalCoreEntityEntityTypeInterface;
use DrupalCoreFieldBaseFieldDefinition;

/**
 * Defines the user entity class.
 *
 *
 * @ContentEntityType(
 *   id = "profile",
 *   label = @Translation("Profile"),
 *   handlers = {
 *     "list_builder" = "DrupalprofileProfileListBuilder",
 *     "route_provider" = {
 *       "html" = "DrupalCoreEntityRoutingDefaultHtmlRouteProvider",
 *     },
 *     "form" = {
 *       "default" = "DrupalprofileFormProfileEntityForm",
 *       "add" = "DrupalprofileFormProfileEntityForm",
 *       "edit" = "DrupalprofileFormProfileEntityForm",
 *       "delete" = "DrupalprofileFormProfileEntityDeleteForm",
 *     },
 *   },
 *   admin_permission = "administer",
 *   base_table = "profile",
 *   data_table = "profile_field_data",
 *   translatable = TRUE,
 *   entity_keys = {
 *     "id" = "profile_id",
 *     "label" = "last_name",
 *     "langcode" = "langcode",
 *     "uuid" = "uuid"
 *   },
 *   links = {
 *     "add-form" = "/profile/add",
 *     "canonical" = "/profile/{profile}",
 *     "edit-form" = "/profile/{profile}/edit",
 *     "delete-form" = "/admin/profile/{profile}/delete",
 *     "collection" = "/admin/profile",
 *   },
 * )
 */

/*
    Creation of the Profile entity class
*/
class Profile extends ContentEntityBase implements ProfileInterface {

  public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {

    $fields('profile_id') = BaseFieldDefinition::create('integer')
        ->setLabel('Profile ID')
        ->setReadOnly(TRUE)
        ->setSetting('unsigned', TRUE);

    $fields('langcode') = BaseFieldDefinition::create('language')
        ->setLabel('Language code');

    $fields('uuid') = BaseFieldDefinition::create('uuid')
        ->setLabel('UUID')
        ->setReadOnly(TRUE);

   // Field Gender
   $fields('gender') = BaseFieldDefinition::create('list_string')
      ->setLabel(t('Gender'))
      ->setDescription(t('The gender of the Profile entity.'))
      ->setSettings(array(
        'allowed_values' => array(
          'female' => 'female',
          'male' => 'male',
        ),
      ))
      ->setDisplayOptions('view', array(
        'label' => 'above',
        'type' => 'string',
        'weight' => -4,
      ))
      ->setDisplayOptions('form', array(
        'type' => 'options_select',
        'weight' => -4,
      ))
      ->setDisplayConfigurable('form', TRUE)
      ->setDisplayConfigurable('view', TRUE);
     // Field Firsnt_name
    $fields('last_name') = BaseFieldDefinition::create('string')
      ->setLabel(t('Last Name'))
      ->setDescription(t('The last name of the Profile entity.'))
      ->setSettings(array(
        'default_value' => '',
        'max_length' => 255,
        'text_processing' => 0,
      ))
      ->setDisplayOptions('view', array(
        'label' => 'above',
        'type' => 'string',
        'weight' => -5,
      ))
      ->setDisplayOptions('form', array(
        'type' => 'string',
        'weight' => -5,
      ))
      ->setDisplayConfigurable('form', TRUE)
      ->setDisplayConfigurable('view', TRUE);

     // Field First name
    $fields('first_name') = BaseFieldDefinition::create('string')
      ->setLabel(t('First Name'))
      ->setDescription(t('The first name of the Profile entity.'))
      ->setSettings(array(
        'default_value' => '',
        'max_length' => 255,
        'text_processing' => 0,
      ))
      ->setDisplayOptions('view', array(
        'label' => 'above',
        'type' => 'string',
        'weight' => -5,
      ))
      ->setDisplayOptions('form', array(
        'type' => 'string',
        'weight' => -5,
      ))
      ->setDisplayConfigurable('form', TRUE)
      ->setDisplayConfigurable('view', TRUE);
     // Field Birth Date
    $fields('birth_date') = BaseFieldDefinition::create('datetime')
      ->setLabel(t('Birth Date'))
      ->setDescription(t('The Birth DAte of the Profile entity.'))
      ->setSetting('datetime_type','date')
      ->setRequired(TRUE)
      ->setDisplayOptions('view', array(
        'label' => 'above',
        'type' => 'string',
        'weight' => -5,
      ))
      ->setDisplayConfigurable('form', TRUE)
      ->setDisplayConfigurable('view', TRUE);
     // Field Birth Date
    $fields('email') = BaseFieldDefinition::create('email')
      ->setLabel(t('Email'))
      ->setDescription(t('Your email.'))
      ->setRequired(TRUE)
      ->setDisplayOptions('view', array(
        'label' => 'above',
        'type' => 'string',
        'weight' => -5,
      ))
      ->setDisplayOptions('form', array(
        'type' => 'string',
        'weight' => -5,
      ))
      ->setDisplayConfigurable('form', TRUE)
      ->setDisplayConfigurable('view', TRUE);
    // Entity Created
    $fields('created') = BaseFieldDefinition::create('created')
      ->setLabel(t('Created'))
      ->setDescription(t('The time that the entity was created.'));
    // Entity Changed
    $fields('changed') = BaseFieldDefinition::create('changed')
      ->setLabel(t('Changed'))
      ->setDescription(t('The time that the entity was last edited.'));

    return   $fields;
  }
}

I made a base for a game but dont have ideas

I need help with game design, what I have so far is a 2d game with an astronaut dog as the main character, the dog is in a spaceship with some core reactor, and I have the base down with all of that stuff, but now I don’t know what to make the game.

group theory – Finite notation for natural numbers in base $(a+Sqrt[b])/2$

Natural numbers in base 10 have a finite notation. But there are other bases of the form (a+√b)/2, where all natural numbers can be written in a finite notation. In base (5+√17)/2 for example the decimal number 11 would be written as 21.4

What is the condition for possible values (a,b) so that natural numbers can be written in a finite notation ?

Knowledge Base | Web Hosting Talk

Knowledge Base | Web Hosting Talk


‘);
var sidebar_align = ‘right’;
var content_container_margin = parseInt(‘350px’);
var sidebar_width = parseInt(‘330px’);
//–>









  1. Question Knowledge Base


    What’s the best knowledge base script these days?













Similar Threads


  1. Replies: 1


    Last Post: 01-31-2002, 12:10 PM


  2. Replies: 2


    Last Post: 12-05-2001, 01:03 AM


  3. Replies: 4


    Last Post: 07-10-2001, 11:25 PM


  4. Replies: 0


    Last Post: 07-10-2001, 10:28 PM


  5. Replies: 4


    Last Post: 02-02-2001, 06:49 PM



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  








php – Como hacer dinámico el select option en base a un monto para calcular unas cuotas?

El problema que tengo es que no logro hacer dinamico el select option cuando intento no me esta obteniendo los datos del array para luego usarlos si coloco 20000 me debe mostrar solo el opt_1 pero no lo esta haciendo.

            //1) Defino Las Variables Correspondintes
            var opt_1 = new Array ("-", "3 meses", "6 meses");
            var opt_3 = new Array ("-", "3 meses", "6 meses","9 meses", "12 meses");
            var opt_3 = new Array ("-", "3 meses", "6 meses","9 meses", "12 meses","18 meses", "24 meses");
            var opt_4 = new Array ("-", "3 meses", "6 meses","9 meses", "12 meses","18 meses", "24 meses","36 meses", "48 meses");
            // 2) crear una funcion que permita ejecutar el cambio dinamico
            $("#valores").change(function cambia() {
                var valor =  $("#valores").val();
                //se chequea si esta definida
                if(valor<=30000){
                    //selecionamos
                    mis_opts=eval("opt_1");
                    //se calcula el numero de valor
                    num_opts=mis_opts.length;
                    //marco el numero de opt en el select
                    document.formulario1.opt.length = num_opts;
                    //para cada opt del array, la pongo en el select
                    for(i=0; i<num_opts; i++){
                        document.formulario1.opt.options(i).value=mis_opts(i);
                        document.formulario1.opt.options(i).text=mis_opts(i);
                    }
                    }else{
                        //si no habia ningun valor
                        document.formulario1.opt.length = 1;
                        //ponemos un guion en la unica opt que he dejado
                        document.formulario1.opt.options(0).value="-";
                        document.formulario1.opt.options(0).text="-";
                    }
                    //hacer un reset de las opts
                    document.formulario1.opt.options(0).selected = true;
                    
                }
            )
<!-- begin snippet: js hide: false console: true babel: false -->
    <head>
        <title>Select Dinamico</title>
        
        <style type="text/css">
        .seleccion{
            border: 3px solid #58ACFA;
            background-color:#2ECCFA;
            color:white;
            font-size:17px;
            width:150px;
            height:35px;
        }
    </style>
    </head>
    <body>
        <form name="formulario1" action="#">
            <input type="text" name="valors" id="valores" readonly="cambia()" value="20000">
        
            <select class="seleccion" name="opt">
                <option value="-">-
            </select>
            
        </form>
        
        <script type="text/javascript">
            //1) Defino Las Variables Correspondintes
            var opt_1 = new Array ("-", "3 meses", "6 meses");
            var opt_3 = new Array ("-", "3 meses", "6 meses","9 meses", "12 meses");
            var opt_3 = new Array ("-", "3 meses", "6 meses","9 meses", "12 meses","18 meses", "24 meses");
            var opt_4 = new Array ("-", "3 meses", "6 meses","9 meses", "12 meses","18 meses", "24 meses","36 meses", "48 meses");
            // 2) crear una funcion que permita ejecutar el cambio dinamico
            $("#valores").change(function cambia() {
                var valor =  $("#valores").val();
                //se chequea si esta definida
                if(valor<=30000){
                    //selecionamos
                    mis_opts=eval("opt_1");
                    //se calcula el numero de valor
                    num_opts=mis_opts.length;
                    //marco el numero de opt en el select
                    document.formulario1.opt.length = num_opts;
                    //para cada opt del array, la pongo en el select
                    for(i=0; i<num_opts; i++){
                        document.formulario1.opt.options(i).value=mis_opts(i);
                        document.formulario1.opt.options(i).text=mis_opts(i);
                    }
                    }else{
                        //si no habia ningun valor
                        document.formulario1.opt.length = 1;
                        //ponemos un guion en la unica opt que he dejado
                        document.formulario1.opt.options(0).value="-";
                        document.formulario1.opt.options(0).text="-";
                    }
                    //hacer un reset de las opts
                    document.formulario1.opt.options(0).selected = true;
                    
                }
            )
            
        
        </script>
    </body>

customization – Use same slug base for Custom Post Type posts, and multiple taxonomy terms

I have done a lot of digging the past few days, and can come close, but not exactly what I need.
I’m trying to alter a custom taxonomy/CPT permalink structure to all use the same slug base: /resources/.

CPT: 'resources'

TAX1, non-hierarchical: 'type'

TAX2, hierarchical: 'section'

I need the structure to look like this:

/resources/ = static page with blocks WORKS
/resources/$type-term/ = archive for all Resources posts with this term DOESN’T WORK – 404
/resources/$type-term/page/1 = pagination for type-term archive DOESN’T WORK
/resources/$section-term-parent/ = static page with blocks WORKS
/resources/$section-term-parent/$section-term-child/ = archive for all Resources posts with this child term WORKS
/resources/$section-term-parent/$section-term-child/page/2 = pagination for section-child-term archive WORKS
/resources/$post-name = url for all Resources posts DOESN’T WORK – 404

I need to remove the taxonomy names from both taxonomies, and use only the term name. Both taxonomies need to have /resources/ before them in the URL. The single posts need /resources/ before the post slug. It needs to be set at the WP level and not .htaccess because we have a load balancer directing all non-resources traffic to another system. If it’s not in /resources/ it will never hit WP.

I can only get one taxonomy at a time to use the structure, but not both. Whichever taxonomy I declare second is the one that works. I am using %category%/%postname% in my global permalink rules.

Registering content types:

add_action( 'init', 'create_format_taxonomy', 1 );
function create_format_taxonomy() {
    $labels = array(
        'name'                      => _x( 'Formats', 'taxonomy general name', 'mysite' ),
    );

    $args = array(
        'hierarchical'              => true,
        'labels'                    => $labels,
        'show_ui'                   => true,
        'show_admin_column'         => true,
        'update_count_callback'     => '_update_post_term_count',
        'query_var'                 => true,
        'rewrite'                   => array( 'slug' => 'resources', 'with_front' => true ),
        'show_in_rest'              => true,
        'rest_base'                 => 'format',
        'rest_controller_class'     => 'WP_REST_Terms_Controller',
    );

    register_taxonomy( 'format', 'resources', $args );
}


add_action( 'init', 'create_resources_cpt' );
function create_resources_cpt() {
    $labels = array(
        'name'               => _x( 'Resources', 'Post type general name', 'mysite' ),
    );

    $args = array(
        'labels'             => $labels,
        'public'             => true,
        'publicly_queryable' => true,
        'show_ui'            => true,
        'show_in_menu'       => true,
        'query_var'          => true,
        'rewrite'            => array( 'slug' => 'resources', 'with_front' => false ),
        'capability_type'    => 'post',
        'has_archive'        => false,
        'hierarchical'       => false,
        'menu_position'      => 15,
        'show_in_rest'       => true,
           'supports'        => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments', 'revisions' ),
        'taxonomies'         => array( 'format', 'section' ),
    );

    register_post_type( 'resources', $args );
}



function create_section_taxonomy() {

    $labels = array(
        'name'                  => _x( 'Sections', 'taxonomy general name', 'mysite' ),
    );

    $args = array(
        'hierarchical'          => true,
        'labels'                => $labels,
        'show_ui'               => true,
        'show_admin_column'     => true,
        'query_var'             => true,
        'rewrite'               => array( 'slug' => 'resources', 'with_front' => false ),
        'show_in_rest'          => true,
        'rest_base'             => 'section',
        'rest_controller_class' => 'WP_REST_Terms_Controller',
    );

    register_taxonomy( 'section', array( 'resources' ), $args );
}

add_action( 'init', 'create_section_taxonomy', 1 );

I am using single_template and template_redirect hooks for the parent term static pages, this works fine. However the Format link is not working. If I change the order – register Section before Format, then Format works and Section doesn’t. The only way the single post url works is if I change the slug in the CPT definition to something other than resources.

digital signature – Are there any security implications to changing the base of a hash?

Most libraries represent SHA-1 hashes as a base-16 number such as:

bc74202f5aad8a824ebf6fb7e328f11dd09c2c6d

However, it’s just a big number. Here it is in base-10:

1075879955064864040725976314787412657512793255021

And in base-36 via our modern lingua franca of JavaScript:

BigInt("0xbc74202f5aad8a824ebf6fb7e328f11dd09c2c6d").
  toString(36) // "m0hh4v3d74j4omuceropkdthqgkvka5"

It’s certainly shorter.

Base-36 is a little “untidy” because 2160 = 1640, but 2160 = 36160 log362 = 3630.9482… (see this StackOverflow question), so instead of nice neat 40 characters each time, the number of characters varies.

Since it’s the same underlying number, I would not expect any security implications. If there are, they would apply to every SHA-1 because an attacker could just change the base themselves.

(The answer would be different if the hash was truncated instead.)

strings – Is there any guideline from Unicode on how to deal with graphemes that have no base character?

A valid sequence of code-points can begin with one or more combining mark, which form a grapheme cluster that has no base glyph.

I’m unsure how that should be handled, if at all.

For example, consider a string consisting solely of an accent, with no “letter” attached. Is that grapheme cluster valid? should it be “sanitized” somehow, for example by prefixing it with a U+FFFD?

More specifically, I am worried about handling string concatenation. If I append that “string consisting solely in an accent” to another string, not necessarily I want the accent to be part of the other string’s last grapheme.

Does Unicode specify anything about how to handle these cases?

javascript – Como puedo seleccionar elementos de la base de datos de 5 en 5 hasta el ultimo? vuejs php

Estoy intentado imprimir de a poco los resultados de la base de datos, para eso los voy seleccionando de 5 en 5, para no traer todos de una, el problema es que yo los agarro por el id, con la consulta BETWEEN, es decir SELECT * FROM TABLA WHERE id BETWEEN 1 and 5, este seleccionara del 1 al 5, y en js guardo el ultimo id es decir 5, le sumo 1 y 5, quedando la siguente consulta SELECT * FROM TABLA WHERE id BETWEEN 6 and 10, el problema es cuando en la BD tengo 16 id, seleccionara hasta el 15, pero al seleccionar el 16 da error ya que no hay mas, como pudiera solucionar eso?

aqui el codigo:

php:

public static function getfinishedproducts($begin, $end) {
    if($begin == "" && $end == "") {
       $begin = 1;
       $end = 5;   
    }else {
        $begin = $begin;
        $end = $end;
    }
    $query = self::connect()->prepare("SELECT * FROM `finished_products` WHERE `id` BETWEEN :begin AND :end");
    $query->execute((":begin"=>$begin,":end"=>$end));
    return $row = $query->fetchAll(PDO::FETCH_ASSOC); 
}

js:

 mounted() {
    this.showFinishedproducts();
},
methods: {
    showFinishedproducts: function() {
        axios.get("index.php?url=get_finished_products").then((response) => {
            console.log(response.data);
            this.begin = parseInt(response.data(5-1).id) + this.BEGIN;
            this.end = parseInt(response.data(5-1).id) + this.END;
            console.log("Actualizado: " + this.begin + " " + this.end);
            //this.listFinishedproducts = response.data;
            //this.filterFinishedproducts = response.data;
        });
    },
    hola: function() {
        axios.post("index.php?url=get_finished_products",{'begin':this.begin,'end':this.end}).then((response) => {
            this.begin = parseInt(response.data(5-1).id) + this.BEGIN;
            this.end = parseInt(response.data(5-1).id) + this.END;
            console.log("Actualizado: " + this.begin + " " + this.end);
            console.log(response.data);
            //console.log(this.length);
            //this.listFinishedproducts = response.data;
            //this.filterFinishedproducts = response.data;
        });
    }

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123