sanitize_post() is not sanitizing Post Object

I wanted to sanitize a WP_Query post object without using foreach.

I used this method:

$  args = array( // ... ) $  data = array();  $  the_query = new WP_Query($  args);  $  data["post"] = $  the_query->posts;  array_map("sanitize_post", $  data["post"]);  return rest_ensure_response($  data); 


enter image description here

as you can see that filter is working and its turning to "Display" from "Raw".

But the problem is: <script> tags still standing in post_title field.

Whats the problem?

movement of 2d object

I was trying to move object by changing velocity

void FixedUpdate()     {         int velocity_x = rb.velocity.x;         int velocity_y = rb.velocity.y;         if(Input.GetKey("a")){             if(velocity_x<0){                              }else if(velocity_x>0){              }             else{                 velocityChange(-1, 0);             }         }else if(Input.GetKey("w")){             if(velocity_y<0){                              }else if(velocity_y>0){              }             else{                velocityChange(0, 1);             }         }else if(Input.GetKey("d")){             if(velocity_x<0){                              }else if(velocity_x>0){              }             else{                 velocityChange(1, 0);             }         }else if(Input.GetKey("s")){             if(velocity_y<0){                              }else if(velocity_y>0){              }             else{                velocityChange(0, -1);             }         }     }      void OnCollisionEnter2D(Collision2D collision){         if(collision.collider.tag =="obstacle"){            Debug.Log("Finish");         }     }     void velocityChange(int velocityX,velocityY){         rb.velocity = new Vector2(velocityX, velocityY);     } 

But, I am getting error.

Assets/movement.cs(57,48): error CS1001: Identifier expected

57 line :

void velocityChange(int velocityX,velocityY){ 

48 line :


40-49 line :

else if(Input.GetKey("s")){         if(velocity_y<0){                      }else if(velocity_y>0){          }         else{            velocityChange(0, -1);         }     } 

How complex of an object can be created via the Creation spell?

Inspired by this question about creating gunpowder with the Creation spell.

My reading of the spell (and components) would indicate that the spell can only create an item (or multiple items1) but of a single "type". This comes from most of the description using singular form when referring to type.

From the spell description:

You pull wisps of shadow material from the Shadowfell to create a nonliving object of vegetable matter within range: soft goods, rope, wood, or something similar. You can also use this spell to create mineral objects such as stone, crystal, or metal. The object created must be no larger than a 5-foot cube, and the object must be of a form and material that you have seen before.

And the required components:

Components: V, S, M (a tiny piece of matter of the same type of the item you plan to create)

But the linked question tries to create gunpowder; a combination of "a fuel (charcoal), an oxidizer (saltpeter or niter), and a stabilizer (sulfur) to allow for a constant reaction". This is not only multiple types of matter, but different types; some vegetable, some mineral 2.

There is also no mention of the time being different; as in, using the shortest duration of all types used in the creation.

I would think that if the spell was to able to create mixed types it would have very different phrasing.

So is the Creation spell limited to only one type of matter at a time, or can it be a combination of matter/types?

And if it possible to create something with multiple/mixed types, how complex can the item be?

  • Can they mix different elements of the same type like an apple and an orange to create a fruit salad?
  • Can they create a leather coat with a fur lining and metal buttons? Or would they have to create each thing separately and sew them together by hand?
  • How about a metal crown, with cloth padding on the interior and encrusted with gems?
  • They can create iron, but can they also create it fused with carbon to create steel?
  • People could be considered a combination of vegetable matter and minerals. Could a character create a corpse (nonliving object)?

1 I would also think that this creates only a single item (a rope), except for minerals it states "You can also use this spell to create mineral objects…". Otherwise the description sticks to singular object.

2 Admittedly, something like this could be done with multiple castings, each creating a specific type of matter. But the point of the question was do create a complete pile of gunpowder.

Permanent Polymorph Any Object and levelling up

Suppose a character is under the effect of a Polymorph Any Object spell with a duration of Permanent. When they gain their next level, they gain an ability score increase and apply it to one of the stats that is permanently changed (Str, Dex, Con, or Int). Then, later, the effect is dispelled. What happens to the stat boost? Is that lost, as well? Does it carry back to the original character’s stats? This carry-over seems to be one way if it does, as you do not augment your polymorphed form with previously attained ability score increases. But it also seems pretty harsh to have the character lose the ability score increase after they succeed on removing the Polymorph Any Object spell.

Similarly, what happens if a wizard turns themself into an ethergaunt permanently. This provides a rather small, but not insubstantial, intelligence boost. If they gain levels while they are an ethergaunt, would they gain more skill points than normal for having a higher intelligence score?

Unity animation moves a game object. Should I create all my animations again from the scratch?

Unity animation moves a game object. Should I create all my animations again from the scratch? Or how can I fix the issue?

I recorded approximately 15 animations in Unity. Now I try to animate in place and simultaneously use the physics engine of Unity to move game object. But I found out that the animations actually change position of my game object.

I tried to follow the advice from here:

I came across with the same problem, and I fixed it with parent game object. But, there is a small trick: Create a new game object inside your problematic game object, the new game object gets the parent (0,0,0,) coordinates and this will be the origin coordinates. Then, put the old game object as a child to the new one and make all the positions as you like. Try a few times and you will get there.

But the result was just the same. The game object still changes its position during animation. So, now I am afraid that I will have to start everything over again and do animations once more. Last time it took me two weeks to complete all the animations. So, I am hoping to find another solution, which would help to fix my problem without remaking all the animations.

enter image description here

Change mesh density of Graphics3D object made of Triangles

I am new to mesh discretisation on Mathematica. I have a Graphics3D object made up of Triangles, that I would like to convert into a MeshRegion object using DiscretizeGraphics (see

In particular, I would like to control the mesh density. The above link tells me to use the MaxCellMeasure option, but it doesn’t seem to make any difference to my graphics!


Table[DiscretizeGraphics[g,    MaxCellMeasure -> {"Area" -> m}], {m, {0.3, 0.01, 0.001}}] 

gives: enter image description here

As you can see, the meshing is unchanged. It doesn’t matter if I replace "Area" by "Volume" or "Length".

Can someone please tell me how to do this properly? Is this happening because my Graphics is already made up of triangles?

Can a user benefit from personal powers stored in an empowered object?

I realized while writing this question that I have another issue with empowered objects. Specifically, it is the object using the stored powers, rather than the wearer/wielder/user. Can such an object "target" the user with personal or "self-only" powers? I intend to have a more powerful psionic NPC loan a PC a Psychometabolic item, but most of the powers it’ll have access to are self-targeting and I realized I wasn’t sure if the PC could even use them.

Reversing audio digits of audio object

My question is about reversing the integers of an audio object file’s data.

If I make an audio object, and I wish to convert the audio-data to integers between 0 and 10000, I then wish to access the effect of reversing the sequence of the audio integers.

Thus, if I were to take one audio sample, and the integer associated with it were 5691, the the reverse of this is 1965.

I need to apply this integer reverse function to ALL of the audio samples in my audio object, and when I tried on Mathematica, I get some error messages, and I sort of do not know what they mean exactly.

Please advise.