WordPress doesn’t send a notification email when submitting a comment using REST API

When I submit a comment on the WordPress website, it sends me a notification email.
but when I submit a comment through REST API, WordPress doesn’t send me a notification email.
What should I do to make WordPress send a notification email when I submit a comment with REST API?

Simplifying equations in python using wolframclient

I’ve this mathematical expression and want it to Simplify it in python using wolframclient wrapper.

1/700*((-1316*w + b - 0.0)^2 + (-1116*w + b - 1.0)^2) 

I’ve tried this method:

In[1]: mathematica_session.evaluate(wlexpr('1/700*((-1316*w+b-0.0)^2+(-1116*w+b-1.0)^2)')) Out[1]: Times[Rational[1, 700], Plus[Power[Plus[0.0, Global`b, Times[-1316, Global`w]], 2], Power[Plus[-1.0, Global`b, Times[-1116, Global`w]], 2]]] 

And then this method:

In[2]: mathematica_session.evaluate(wl.Simplify('1/700*((-1316*w+b-0.0)^2+(-1116*w+b-1.0)^2)')) Out[2]: '1/700*((-1316*w+b-0.0)^2+(-1116*w+b-1.0)^2)' 

And finally this is the result when I tried this on directly Mathematica:

In[1]: Simplify[1/700*((-1316*w + b - 0.0)^2 + (-1116*w + b - 1.0)^2)] Out[1]: 0.00285714 (0.5 + b^2 + b (-1. - 2432. w) + 1116. w + 1.48866*10^6 w^2) 

And this is the result I want in python. So what I’m missing or doing wrong in python?

MySQL is claiming all of my memory when it’s only using a few gigs

So, I have been having an issue with memory being "buffered" or "active", it seems my MariaDB installation is just marking all the memory on my system as it’s own? I don’t know for sure what is going on but it will show that I have almost no memory free but 24Gb available on free -wh ? I need to know if this is an issue and if yes please tell me what settings I need to change.

My system has 32GB of RAM and it’s constantly having to use SWAP because of this memory being buffered/active (swappiness is set to 1). Please check my server/mariadb settings below.

free -wh
smem -p
innodb engine status
cat /proc/meminfo

How do i easily clamp my cameras rotation when using transform.rotate()

I’m making a fps controller, and I’m trying to clamp my cameras x rotation. Here’s my code so far:

using System.Collections; using System.Collections.Generic; using UnityEngine;  public class Player : MonoBehaviour {     // Start is called before the first frame update      [SerializeField] Camera cam;     [SerializeField] float camSpeed;     [SerializeField] float walkSpeed;     [SerializeField] float jumpSpeed;      float yaw;     float camPitch;     Vector3 direction;     Vector3 worldDirection;      Rigidbody myrigbody;     void Start()     {         myrigbody = GetComponent<Rigidbody>();     }      // Update is called once per frame     void Update()     {         camPitch = -Input.GetAxis("Mouse Y") * camSpeed;         cam.transform.Rotate(new Vector3(camPitch, 0, 0));         yaw = (yaw + Input.GetAxis("Mouse X") * camSpeed) % 360f;          direction = new Vector3(Input.GetAxis("Horizontal") * walkSpeed, myrigbody.velocity.y, Input.GetAxis("Vertical") * walkSpeed);         worldDirection = transform.TransformVector(direction);          if(Input.GetKeyDown(KeyCode.Space))         {             myrigbody.AddForce(new Vector3(0, jumpSpeed, 0), ForceMode.Impulse);         }     }     private void FixedUpdate()     {         myrigbody.MoveRotation(Quaternion.Euler(0, yaw, 0));         myrigbody.velocity = worldDirection;     } } 

I know that I want to clamp my cameras X rotation within a range of -89 to 89, but no matter what I try I can’t figure out how to clamp the rotation while using cam.transform.Rotate(). I don’t think I can clamp camPitch, because it is reset every frame, and I can’t figure out a way to directly clamp the cameras rotation. The cameras rotation is not resetting, so if I could somehow clamp it it would work. Is this possible, or do I need to try a different method? How do i get this to clamp correctly?

Choosing a specific future date using Microsoft Dynamics CRM Advanced Search

Is it possible to use the advanced filter to select a specific future date, dynamically? For example if I want to return all data with a "date" field populated for 30 days from today, but no data from before or after that? From what I am seeing the only filter option similar is "Next X Days" but it’s inclusive of all days to that point.

Using Cache to make website faster

I am building a website with node.js express webserver and i use Mongo db database.

On my website people can register a profile they can upload pictures and write text.

Now i hear often that many things can be load from a cache then the website run faster.

Now i ask myself if i need to code something into my script to make for example the Mongo db use cache for requests or if i need to code anything to make the browser or webserver to use pictures from cache.

Can somebody help me to understand this cache thing?

Using CSS, how can I remove a Woocommerce grid from a specific page that has ::before & ::after inserted in it [closed]

Everything between the before and after needs to go

The specific page ID is 6329

I have tried different variations of the CSS below, but still can’t get it to work!

CSS used:

.page-id-6329 .products.columns-3 {       display: none !important; } 

and other variations on the same lines with no success. I think it has to do with the ::before and ::after, but have no idea how to write the CSS.

I am setting up a website that caters for retail and wholesale. The retail will show the normal category grid to the user, while the wholesale will have a special page where a list of products shown in a table. The wholesale page, as it is now, shows the category grid AND the table underneath. I just need to get the grid to disappear for that particular page.

Any help will be appreciated. Thanks

Google Analytics – Match URLs on Unique Number in Content Drilldown Using RegEx?

I am trying to track pageviews on Google Analytics for knowledge base articles (on Zendesk). Each article has a unique number. However, the title of the page is sometimes appended to the URL, and GA tracks this as a separate page. If the title of the article changes, it generates a new URL.

For example, these would all be the same article, so I want to see a single pageviews count, but GA would show as 3 separate stats

/hc/en-us/articles/360039413394 /hc/en-us/articles/360039413394-How-To-Make-A-Sandwich /hc/en-us/articles/360039413394-How-To-Make-A-Turkey-Sandwich 

I want GA to roll up the articles matching on the unique number, and ignoring everything after that. Is there a built-in way to do this? Is there a way to do this with Regex? Where would I add the Regex for the Content Drilldown page? Help!

Thank you.

Why does Unity show dark regions on a model with animation created using Blender?

I sculpted a model in blender, and I want to import that to Unity. When I import just the model(without animation), Unity shows as is. However, when I attach armature to the body and automatically assign weights to it with the intention of creating an animation, Unity import shows dark regions all over the model. All the face normals look fine. I am not sure what the issue is.

Model in Blender: Model in Blender:

Weights: Weights

Dark patches in Unity: Dark patches in Unity