multisite – Gravity Forms does not allow emails as usernames

I want to allow users to log in with their email address as their username, but I still get the error (from Gravity Forms).

The user name may only contain alphanumeric characters (A-Z, 0-9).
Underscores, hyphens and spaces

I am working in a multi-site environment and here is the code I am testing:

add_filter( 'gform_field_validation', function ( $result, $value, $form, $field ) {
    if ( $field->get_input_type() === 'email' ) {
        $result('is_valid') = true;
        $result('message')  = '';

    return $result;
}, 10, 4 );

Even if I return the array $ result (& # 39; is_value & # 39;) = true, I keep getting the error. It seems that after this a hook is called that overwrites the $ result.
Any ideas what could be wrong?

Thank you very much

Java – I have gravity issues in my game

I'm trying to determine if the player is on an object with the "canHoldWeight" tag. However, the detection of whether the player is on an object does not work.

falling code called on every tick:

    boolean isObjectSolid;
    boolean isOnObject;
    boolean falling = true;

    for (int i = 0; i < InitObject.getSizeOfAll(); i++)
        GObject object = InitObject.getObjectFromAll(i);

        isOnObject = checkCollision(InitObject.player, object);
        isObjectSolid = object.isHoldWeight();

        if (checkCollision(InitObject.player, object) && isObjectSolid)
            falling = false;

GObject code (parents of the player and the "ground")

public int rX, rY, hSpeed, vSpeed;
public int x;
public int y;
public boolean dying;
public double dx;
public double dy;
public boolean canHoldWeight;
private Rectangle bounds;
private boolean visible;
private Image image;

public GObject (Image img, int startX, int startY)
    image = img;
    visible = true;

    rX = startX;
    rY = startY;

    hSpeed = vSpeed = 0;
    bounds = new Rectangle(startX, startY, img.getWidth(null), img.getHeight(null));

public Rectangle getBounds ()
    bounds.x = rX;
    bounds.y = rY;
    return bounds;

public boolean checkCollision (GObject obj1, GObject obj2)
    if (obj1.getBounds().intersects(obj2.getBounds()))
        return true;
    } else
        return false;

If you need more information please let me know: D

Physics – Unexpected behavior of bodies affected by gravity in 2D

I'm on my phone and can't give a super detailed answer, but it starts.

This answer does not cover the physics calculation that you use, only the logic.

It looks like trash data is in your loop.

When evaluating a body with itself, you don't update the angle or acceleration, but stick to what was used with a previous body. Whatever is there is still used when the body affects itself.

I would expect bodies to not self-influence in this loop, so maybe it should look a little more like this:

def move_bodies():
    def get_dist(b1, b2):
        return math.hypot(b2('x') - b1('x'), b2('y') - b1('y'))

    for body in bodies:
        for other_body in bodies:
            if body == other_body:

            dist = get_dist(body, other_body)
            angle = math.atan2(other_body('y') - body('y'), other_body('x') - body('x'))
            acceleration = (GRAVITY_CONSTANT * body('m') * other_body('m') / dist ** 2) / body('m')

            body('x') += math.cos(angle) * body('vx')
            body('vx') += acceleration

            body('y') += math.sin(angle) * body('vy')
            body('vy') += acceleration

As a final note, this will most likely lead to inaccurate results. If you update the x and y values ​​of bodies during the loop, you change how the next bodies are affected.

A more accurate approach would be to use the "current position" to perform the calculations and to store them in another location for further processing:

def move_bodies():
    def get_dist(b1, b2):
        return math.hypot(b2('x') - b1('x'), b2('y') - b1('y'))

    for body in bodies:
        for other_body in bodies:
            if body == other_body:

            dist = get_dist(body, other_body)
            angle = math.atan2(other_body('y') - body('y'), other_body('x') - body('x'))
            acceleration = (GRAVITY_CONSTANT * body('m') * other_body('m') / dist ** 2) / body('m')

            body('x_sum') += math.cos(angle) * body('vx')
            body('vx_sum') += acceleration

            body('y_sum') += math.sin(angle) * body('vy')
            body('vy_sum') += acceleration

    for body in bodies:
        body('x') = body('x_sum') / (len(bodies) - 1)
        body('vx') = body('vx_sum') / (len(bodies) - 1)

        body('y') = body('y_sum') / (len(bodies) - 1)
        body('vy') = body('vy_sum') / (len(bodies) - 1)

        body('x_sum') = 0
        body('vx_sum') = 0

        body('y_sum') = 0
        body('vy_sum') = 0

rest api – Correct the XML / JSON syntax to extract the element and insert it in Gravity form

I spent the entire day collecting and displaying the contents of an API call to Zillow on the form from which it was sent with this batch:

WordPress 5.3
GravityForms (paid)
Gravity Forms Address Autocomplete (paid: link to paid plugin)
Forms: Third Party Integration (Free: Link to WordPress Plugin Page)
Forms: Third Party Inject Results (Free: Link to WordPress Plug-in Page)
Zillow GetSearchResults API (free: link to Zillow API)

After hours of disappointment, I finally connected to Zillow and successfully received the answer contained in this file: Link to the debug text file for third-party integration with the answers.

After connecting, I should be able to either extract XML or JSON and replace / overwrite the contents of a field within the original gravity form (or, in my case, the confirmation) (visible here: link to the gravity form)), by following the instructions attached to GitHub's Inject results for third-party results. It uses a syntax that I just can not figure out.


(env:Envelope/env:Body/ns1:Response/ns1:Resultstatus) => foo
(env:Envelope/env:Body/ns1:Response/ns1:Result) => bar
(env:Envelope/env:Body/ns1:Response/ns1:Description) => baz



(Body/Response/ResultStatus) => foo
(Body/Response/Result) => bar
(Body/Response/Description) => baz

I'm trying to extract / display the content of the "zestimate" element, especially the content of the "amount" element (if I found that out, I might want to use all the elements in "zestimate").

I tried so many unsuccessful variations that I burned out. I had to contact someone who might know which syntax / format to use.

The successful Zillow XML response, as well as the fields I need to capture, can be seen in the text file associated with the Zillow XML response

I searched high and low, but the correct syntax / formatting information for that particular theme / plugin is rare.

I would be very grateful if a guru would help me format the correct syntax so that I can continue my damn life. lol

Thank you in advance.

c ++ – OpenCV calculates the center of gravity for a single contour

Recently, I reviewed OpenCV code, which finds the focus of an outline, and found that it has potential for optimization.

Looking back in my code, I noticed that I calculated the mass that I use with contours.size (), which makes me believe that I compute the moments and the center of gravity for all my contours.

In my cases, this is not needed because I have a function that returns the largest contour I have found getMaxAreaContourId(contours, imageSize); that returns an int that I like to use contours(largestContour) and largestContour would be set from the result of getMaxAreaContourId

So if I'm not mistaken, can I find out the moment and mass from a single contour and completely remove two for-loops?

Because in the end I do the following:

int CenterOfContourX = mc(largestContour).x;
int CenterOfContourY = mc(largestContour).y;

Actually, the ultimate goal is to end up with two integers that are the focus of my outline.

Code for optimization:

// Get the moments
for( int i = 0; i < contours.size(); i++ )
{ mu(i) = moments( contours(i), false ); }

// Get the mass centers:
std::vector mc( contours.size() );
for( int i = 0; i < contours.size(); i++ )
{ mc(i) = cv::Point2f( mu(i).m10/mu(i).m00 , mu(i).m01/mu(i).m00 ); }

Physics – Bullet Raycast vehicle – compound shape and center of gravity / mass

I use btBoxShape as a collision form for a rigid chassis body (Raycast vehicle). An initial vehicle position is defined by btDefaultMotionState during the creation of the rigid chassis body (a vehicle is dropped from an initial altitude – btVector3 (0, 5, 0)). I want to use btCompoundShape to lower the center of gravity / mass of the vehicle. Is it possible ? I create a composite shape and add a shell shape as a child shape:

compound->addChildShape(localTransform, chassisShape);

Then, when creating a rigid body, a compound shape is used instead of a shell shape, and btDefaultMotionState is set as before. I'm wondering how to make a local transformation for the composite shape.

When I use btVector (0, -1, 0) for localTransform, I get the following result when a vehicle falls from an initial altitude. It looks like I am doing something wrong.

mp.mathematical physics – What do physicists understand by a topological quantum gravity theory?

This is a jargon-like question.

The fact that this is more likely to be posted in a physics forum indicates two things

  1. I know too little physics.
  2. An explanation with more math taste is more appreciated.


I should first explain what a gravitational theory is in my imagination: it seems to be a theory governing the relationship between space and matter. For example, Hilbert addressed this issue by introducing a function for the metrics space. As a consequence, Einstein's field equations were introduced, relating the curvature of the space-time and mass-energy momentum tensor.

A quantum field theory seems (to me) to be a field theory in which possibly every field could occur. In our case, the fields are the metrics whose amplitudes can be calculated by a certain "quantized" action weight


This leads to the confusing part: A topological theory (seems) means a theory that does not depend on the geometry (especially the metric)! What then does a topological quantum gravity theory mean?

[GET][NULLED] – Rocket Genius Gravity forms WordPress plugin v2.4.14.11


(GET) (NULLED) – Rocket Genius Gravity forms WordPress plugin v2.4.14.11