plugins – Always get creating a new table with foreign key

I create a table in WordPress database with this SQL query:

CREATE TABLE IF NOT EXISTS wp_ccwwhsh_sent_messages(
    `recipient_id` BIGINT NOT NULL,
    `phone` VARCHAR(15) NOT NULL,
    `content` TEXT NOT NULL,
    `sending_confirm` DATETIME NULL,
    PRIMARY KEY(`id`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

and it works.
If a try to create a new tabled linked to the first one with:

CREATE TABLE IF NOT EXISTS wp_ccwwhsh_replies_to_messages(
    `timestamp` DATETIME NOT NULL,
    `message_id` BIGINT NOT NULL,
    `content` TEXT NOT NULL,
    PRIMARY KEY(`id`),
    FOREIGN KEY(`message_id`) REFERENCES wp_ccwwhsh_sent_messages(`id`) ON DELETE CASCADE
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

I get error #1005 - Impossible to create the table wordpress-dev.wp_ccwwhsh_replies_to_messages (errno: 150 "Foreign key constraint is incorrectly formed"), what’s wrong?

Creating a Sharepoint 2013 List with multiple rows under one column header using InfoPath 2013

As SharePoint’s list includes the built-in Title column, which is always a required field, no blank entries can be added to a list. Therefore you’d need to be populating the list with entries which add content to each field which is required. An input of “This is a placeholder” can do it for you, but possibly a “blank” input (as described here) does the job too.

Creating a list that shows the numerical values not in boolean form

Based from the equation I used in the code below, I found how many values are divisible by 5. However, this is in boolean form. I only know how many are divisible by 5. I need to formulate a conjecture by exploring the values, but I’m having trouble figuring out how to create a list that gives me the numerical values that are divisible by 5 based from given function. Here’s is my program.

expn = Flatten[Table[1^n + 2^n + 3^n + 4^n, {n, 1, 10000}]];
sumpowern = Mod[Total /@ expn, 5] ;
Count[sumpowern, 0]
posints = Length[Select[Divisible[Total /@ expn , 5], TrueQ]] 

creating user and sshkey with ansible user module

You can copy the public key directly into your playbook. For example:

- name: Set authorized key
    user: zahr1
    state: present
    key: "ssh-ed25519 AAAAA.....0 zahr1@localhost"

You can also specify multiple keys.

- name: Set authorized key
    user: zahr1
    state: present
    key: "{{ item }}"
    - "ssh-ed25519 AAAAA.....1 zahr1@localhost"
    - "ssh-rsa AAAAA.....2 zahr1@localhost"
    - "ssh-dsa AAAAA.....3 zahr1@localhost"

Note that ansible.posix.authorized_key is for Ansible 2.10 and later (see its documentation as it must be installed separately with ansible-galaxy). Older versions of Ansible will use the now-deprecated authorized_key.

Jenkins build job execute jobs in parallel how to create the programmatically without creating pipeline in jenkins GUI

i have 2 functions which I like to execute them in parallel, each job will run on slave or where there are enough resources. the problem is that I dont want to create pipelines in Jenkins GUI and then from that pipeline to execute my function. i like to be able to create the pipeline on the fly in code.
this is example what i have now :

//downstream job
build job: "my_job_pipeline_1",
parameters: (string(name: 'PROJECT_NAME', value: "${PROJECT_NAME}"),
propagate: false,
wait: true

//downstream job
build job: "my_job_pipeline_2", 
parameters: (string(name: 'PROJECT_NAME', value: "${PROJECT_NAME}"),
propagate: false,
wait: true 

This called from my main pipeline but for this to work I have to create 2 pipelines in Jenkins GUI
my_job_pipeline_2 and my_job_pipeline_1
can i create those pipelines programmatically ?

magento2.3 – creating invoices by admin for pay on delivery

I was wondering if there was any way to create an order and send the invoice to the customer for a pay on delivery. We created a new site, but in the past customers ordered by sending their order directly to me and then I enter the order and create an invoice and wait for them to send a check. I would like to be able to continue to do this for the select customers.

I know there is a way to have pay on delivery for a payment option but when I select it, it becomes visible for the customer to view which we do not want.


amazon web services – AWS CloudFormation – Creating Layer Version and Function that uses layer

I have a Cloudformation template that currently looks roughly like the following.

    Type: AWS::Lambda::LayerVersion
        - nodejs12.x
        - nodejs10.x
      Content: ../layers/nodejs/
      LayerName: myLayer
      ### etc...
    Type: AWS::Lambda::Function
    DependsOn: MyLayer
      Code: lambdas/my-lambda.js
      Description: A lambda that makes use of MyLayer
      FunctionName: myLambda
      Handler: my-lambda.handler
      Layers: !Ref CommonLayer
      ### etc... 

The core idea here is I want to create a new LayerVersion and have the Lambda update to this latest LayerVersion on every deployment. I am having trouble inserting MyLayer’s Arn into MyLambda’s Layer property. Here is what I have tried:

  1. !Ref CommonLayer which I saw returns the Arn based on this CloudFormation Cheatsheet. I get a failure when creating the stack at the creation of MyLambda (output shows MyLayer has been successfully created) saying: “Value of property Layers must be of type List of String”

  2. !GetAtt CommonLayer.Arn however this function is just not supported for Layers/ the return value does not have an Arn field.

Is this a YAML syntax type problem or is my goal of creating a Layer and then a Lambda that depends on said Layer not possible in one Cloudformation template?

json – Creating default object from empty value PHP

Desde hace unas horas empezó a salir un error en mi app, no entiendo que puede estar fallando, nunca entendí mucho el manejo de objetos en PHP pero la verdad que ahora me mato, busque varias soluciones posible en internet pero no puedo entender en que estoy fallando.
El script debería de devolver un Objeto JSON , que antes lo hacia pero ahora dejo de funcionar solo.

Debería de devolver:

{"kdt":{"1":{"kdtRow":"(071) - Mars  (moto)"}}}

Pero me devuelve:

<b>Warning</b>:  Creating default object from empty value in <b>/home/c1851041/public_html/app/api.php</b> on line <b>447</b><br />

Mi script:

header("Content-Type: application/json; charset=UTF-8");
$bl = $cnn->prepare('SELECT * FROM kdts WHERE activo=1 and tipo=1 and libre=1 and estado=1 order by kdt asc');
foreach ($bl as $row)
        $myObj->kdtRow = "(".str_pad($row('kdt'), 3, "0", STR_PAD_LEFT).") - ".$row('nombre')."  (".$row('typeVehi').")";
$myJSON = json_encode($myObj);
echo $myJSON;

Alguno le ha pasado?, busco y busco pero no encuentro nada que me ayude a entender lo que sucede.