filters – How do I target a single page to modify the comment form of only that page?

If I want to globally change the comment form for a theme I would use add_filter for “comment_form_default_fields”. Then I might use add_action for “comment_form_logged_in_after” and “comment_form_after_fields”. What I want to do, however, is create a single page with customised comment form fields.

My first thought was to add filters and use hooks in a custom page template. But that will, at best, work for one or two sites. What I am hoping to find is another way that I can target a chosen page. Is there a hook, filter, or logical test I can apply to modify a single page?

Dynamically form a cell value in Google Sheets

This might be very trivial, but I was not able to obtain any concrete result from my Google searches, so asking here.

I want to fill a column with the content of some other column (in some other sheet). The value at the existing place is not organised to the current requirements, so I just can’t directly assign it to the new column. I have another column that specifies the ordering for the new column. So, I want to create my new column with the help of this ordering.

In short, I was wishing to assign my new column as sheet1!A${sheet2!A1} (this doesn’t work).

Say, if I have value 23 at sheet2!A1, then the corresponding value in the new column should be of the cell sheet1!A23.

mysql – Is there a faster way to load (not import, load) a preexisting table into the form editor of Workbench?

I am slowly adding data to one of the tables in a MySQL database via Workbench. In order to enter data into the table I click on the icon at the end of the table name in the list of tables in the Schema. The data loads eventually, but it’s taking longer and longer as the size of the table increases. At present it takes 3 minutes to load and I have entered less than 10% of the data that will eventually comprise the table.

Is there a faster way to load that data into the editor or am I stuck with waiting each time I want to add some data? All of the help I have found on the web relates to “importing” data into a database. I simply wonder if there isn’t a faster way to load a table.

Thanks for any help.

John G

linear algebra – Change of basis of a real symmetric matrix to its Jordan form is always orthogonal?

Let $S$ be a real $n times n$ symmetric matrix, which is diagonalizable, of course, and let its Jordan normal form be $J=text{diag}(lambda_1,…,lambda_n)$, where each $lambda_i$ is an eigenvalue. Consider $M$ the change of basis, i.e. $M$ is an invertible matrix such that $S=M^{-1}JM$. We know it is possible to choose $M$ such that it is orthogonal, but can we guarantee that $M$ is always orthogonal?

javascript – Angular dynamic Date-picker and dynamic dropdown validation and form submit

I am newbie in Angular and stuck at once place. I want to get JSON on form submit.
The form is custom combination of dynamic dropdown and dynamic mat datepicker.
I am not able to validate or get data on submit.
Here is my code of component .ts and html files

    import { Component, OnInit, Input } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';

var R_DATA = {
  "grid": {
    "row": {
      "col": (
          "size": 3,
          "label": "Branch",
          "type": "dropdown",
          "id": "branchCd",
          "default": "${userBranchCd}",
          "ddCd": "4"
          "size": 3,
          "label": "From Date",
          "id": "fromDt",
          "type": "date",
          "default": "${currentDate-7}"
          "size": 4,
          "label": "To Date",
          "id": "toDt",
          "type": "date",
          "default": "${currentDate}"

  selector: 'app-dynamic-report-viewer',
  templateUrl: './dynamic-report-viewer.component.html',
  styleUrls: ('./dynamic-report-viewer.component.scss')
export class DynamicReportViewerComponent implements OnInit {
  testData: string;
  reportData: any;
  showReport: boolean = false;
  @Input() reportForm: FormGroup;
  @Input() reportScreenTitle: string;
  captureParent: any;
  formCol: any;
  formName: string;
  formSubmitted: {};
  constructor() {
    // const currentDate = new Date().getDate;
    // this.minDate = new Date(currentDate - 7);
    // this.maxDate = new Date(currentDate + 1, 11, 31);

  ngOnInit(): void {
    this.testData = '15';
    this.reportData = R_DATA.grid;
    // console.log(this.reportData);
    this.formCol = this.reportData.row.col
      this.formCol.forEach(element => {
          this.formName =
    this.reportForm = new FormGroup({
      "this.formName" : new FormControl('', Validators.required)

    // this.reportForm.controls('date').hasError('matDatepickerMin')
    // this.reportForm.controls('date').hasError('matDatepickerMax')
  captureData(e: any) {
    this.captureParent = e.text

  myFilter = (d: Date | null): boolean =>{
    const day = (d || new Date()).getDay();
    return day !== 0

  loadReport() {
    this.formSubmitted = {
      'this.formName': this.captureParent

    //let getReport = ()
    // console.log(getReport);
    this.showReport = false;

    // alert(JSON.stringify(this.reportForm.value));

and here is the respective html

<div class="card" (formGroup)="reportForm" (ngSubmit)="reportForm.valid && onSubmit()">
    <div class="card-header mt-2">
        <div class="grid" *ngIf="reportData">
            <div class="row" *ngIf="reportData.row">
                <div class="col col-{{list.size}}" *ngFor="let list of reportData.row.col">
                    <div (ngSwitch)="list.type">
                        <!-- <input *ngSwitchCase="'textbox'"  (formControlName)="" (id)="" (type)="list.type"> -->
                        <mat-form-field appearance="legacy" *ngSwitchCase="'date'">
                            <input matInput (matDatepicker)="picker" (id)="" (formControlName)="">
                            <mat-datepicker-toggle matSuffix (for)="picker"></mat-datepicker-toggle>
                            <mat-datepicker #picker></mat-datepicker>
                        <div *ngSwitchCase="'dropdown'">
                            <app-dynamic-dropdown (valueChange)="captureData($event)" id="{{}}" name="{{}}" ddCd="{{list.ddCd}}" displayLabel="{{list.label}}" isMandatory="true">

                <div class="col">
                    <button class="btn btn-warning" (click)=loadReport()>Submit</button>
    <div class="card-body">
        <iframe id="dynamic_report_iframe" *ngIf="showReport" width="100%" height="500px" ></iframe>

Any help or suggestion will be appreciated!

sharepoint online – SPO: Using JSON to Show/Hide Modern Form Field Based on Value Selected in Lookup Column

I am trying to modify the new-entry form of a modern list in SharePoint Online by hiding or showing a field based on the value selected in a preceding field on the same form. Microsoft offers straightforward guidance on how to do this using a JSON snippet.

While they don’t list a lookup column as an unsupported field type to use for this purpose, they don’t provide guidance on how to use one in this way, either. And from my testing, you can’t simply grab the value of a lookup field in the described way:

=if(($LookupField)=='Hourly', 'true', 'false')

If I use a choice field instead of a lookup field, this works fine. But doing some digging, in other contexts it looks like the value may be captured in a .lookupValue property, so I tried it this way:

=if(($LookupField.lookupValue)=='Hourly', 'true', 'false')

Still no luck. Does anyone know if it is possible to use the value from a lookup field in this way? And if so, what do I need to do to make the magic happen?

normalization – Find the highest normal form

So I am given the following list of attributes and complete set of non-trivial functional dependencies.

R(A,B,C,D) and F = { AB->CD, AC->BD, BC->D}

And I want to find the highest normal form (in the range of 1NF to BCNF)

So initially I find the 2 candidate keys: AB, AC

So prime attributes are: A,B,C

I think this is in 2NF as there are no partial dependencies (a proper subset of a CK determines a non prime attribute).

I also don’t see any transitive dependencies (a non prime attribute determines a non prime attribute) so also in 3NF.

But BC->D does not satisfy BCNF as BC is not a superkey so the relation is in 3NF.

But I was told that this relation is in 1NF. This was because it fails 3NF as “BC->D fails the: LHS is a superkey or RHS must be prime attribute” rule. But I thought these rules were interchangeable so I’m not sure what I’m doing wrong. Also I was told it fails 2NF as “proper subset of 1 candidate key U proper subset of another candidate key = proper subset of a candidate key”. But I don’t get how that makes sense.

Can someone help explain why this is the case?

PHP Form with reCAPTCHA v2

I managed to make a very simple contact form.

I used PHP for server-side validation and reCAPTCHA v2.

You can access the form at the following link:

And this is the code:


<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8">
  <title>Contact Form</title>
  <link rel="stylesheet" href="css/style.css">
  <link rel="stylesheet" href="css/normalize.css">
  <script src="" async defer></script>

  <div class="container">
    <?php include 'contact.php';?>
    <h2>Contact Us</h2>
    <form action="index.php" method="post">
        <label for="inputName">Name:</label>
        <input type="text" name="name" id="inputName" value="<?php echo $name; ?>" placeholder="Write your name here..">
        <span class="error"><?php echo $nameErr; ?></span>
        <label for="inputEmail">Email:</label>
        <input type="email" name="email" id="inputEmail" value="<?php echo $email; ?>" placeholder="Let us know how to contact you back..">
        <span class="error"><?php echo $emailErr; ?></span>
        <label for="inputComment">Message:</label>
        <textarea name="message" id="inputComment" rows="5" cols="30" placeholder="What would you like to tell us.."><?php echo $message; ?></textarea>
        <span class="error"><?php echo $messageErr; ?></span>
      <div class="group">
        <div class="g-recaptcha" data-sitekey="my-sitekey"></div>
        <span class="error"><?php echo $robot; ?></span>
        <input class="btn" type="submit" value="Send">




// Functions to filter user inputs
function filterName($field){
    // Sanitize user name
    $field = filter_var(trim($field), FILTER_SANITIZE_STRING);

    // Validate user name
    if(filter_var($field, FILTER_VALIDATE_REGEXP, array("options"=>array("regexp"=>"/^(a-zA-Zs)+$/")))){
        return $field;
    } else{
        return FALSE;
function filterEmail($field){
    // Sanitize e-mail address
    $field = filter_var(trim($field), FILTER_SANITIZE_EMAIL);

    // Validate e-mail address
    if(filter_var($field, FILTER_VALIDATE_EMAIL)){
        return $field;
    } else{
        return FALSE;
function filterString($field){
    // Sanitize string
    $field = filter_var(trim($field), FILTER_SANITIZE_STRING);
        return $field;
    } else{
        return FALSE;

// Define variables and initialize with empty values
$nameErr = $emailErr = $messageErr = "";
$name = $email = $message = $robot = "";

// Processing form data when form is submitted

    // Validate user name
        $nameErr = "Please enter your name.";
    } else{
        $name = filterName($_POST("name"));
        if($name == FALSE){
            $nameErr = "Please enter a valid name.";

    // Validate email address
        $emailErr = "Please enter your email address.";     
    } else{
        $email = filterEmail($_POST("email"));
        if($email == FALSE){
            $emailErr = "Please enter a valid email address.";

    // Validate user message
        $messageErr = "Please enter your message.";     
    } else{
        $message = filterString($_POST("message"));
        if($message == FALSE){
            $messageErr = "Please enter a valid message.";

        $secret = 'my_secret_code';
        $verifyResponse = file_get_contents('    secret='.$secret.'&response='.$_POST('g-recaptcha-response'));
        $responseData = json_decode($verifyResponse);

    if($responseData->success === false) {
        $robot = "Robot verification failed!";

    // Check input errors before sending email
    if(empty($nameErr) && empty($emailErr) && empty($messageErr) && ($responseData->success === true)){

        // Recipient email address
        $to = '';
        // Create email headers
        $headers = 'From: '. $email . "rn" .
        'Reply-To: '. $email . "rn" .
        'X-Mailer: PHP/' . phpversion();
        // Sending email
        if(mail($to, $message, $headers)){
            echo '<p class="success">Your message has been sent successfully!</p>';
            $name = $email = $message = "";
            /* header("Location: success.html"); */
        } else{
            echo '<p class="error">Unable to send email. Please try again!</p>';

I wonder if this form is safe? It also seems to me that I messed around a bit when I want to show that reCAPTCHA v2 is not ok.

Any suggestions and criticisms are welcome.

I am not finding my project form goggle cloud platform. Now I want to retrieve my project

I used the google cloud free trial. I am not finding my project now for due payment. I paid google due amount But now I am not finding my existing VM instance. I have no project backup. This project and database are very important for me. I want back my project. Please help me. I spend 1 almost 1 year building that project. I paid all the due amount. I was not able to pay for the crisis of money. Please help me.