Godot distance between 3d and 2d nodes

Godot has the distance_to methods for Vector3 and Vector2 but what would be the best way to get the distance from a 3d node to a 2d node? For example, I’m looking to see how far away the 3d kinematic body is from a 2d text label.

Currently, I’m trying something like:

var player_global_origin = player.global_transform.origin var player_vec2 = Vector2(player_global_origin.z, player_global_origin.x)  var distance_to_label = player_vec2.distance_to(label.get_global_transform().origin) 

Which seems to work ok when just moving forwards and backwards but it feels like it’s easy to break.

page.php not working in my website [closed]

enter image description here

Fatal error: Uncaught Error: Call to undefined function woodmart_get_content_class() in /home/u9766796/public_html/wp-content/themes/woodmart/woodmart2/page.php:17 Stack trace: #0 /home/u9766796/public_html/wp-includes/template-loader.php(106): include() #1 /home/u9766796/public_html/wp-blog-header.php(19): require_once('/home/u9766796/...') #2 /home/u9766796/public_html/index.php(17): require('/home/u9766796/...') #3 {main} thrown in /home/u9766796/public_html/wp-content/themes/woodmart/woodmart2/page.php on line 17

I have shopping website but I’m new to WordPress and i downloaded All in One SEO plugin even though I have Yoast SEO on my site after that my site crashed and became inaccessible even if I removed the plugin from cpanel. I now get this page.php problem. How can I solve this problem and reopen my site?

copy fields value to another field

When user registering on my site, they have to entry their phone number for auth (firebase).I have create the phone number field using buddypress’s xprofile plugin, the field named "phone". For some reason, I need to sync the Phone field to user_url field, I tried some plugin like SyncField ,BuddyPress to WordPress Full Sync to help, but the field cannot be sync without modify the content. Any idea to make it work?

copy postgresql db rows from one table to another depending on an id

I want to restructure my database. Therefore I want to move some columns from one table to another. The problem is that I do not want to simply insert the new column somehow into the destinationtable. Both tables have an id and I want to copy the column data depending on the id of both tables.


id bigint not null a character varying b date ... 


id bigint not null c character varying d date ... 

I have tried with insert into to no avail because this would add new rows in the destination table which is not what I want. Same with select into.

insert into table2 as t2 (c,d) select t1.a, t1.b from table1 as t1 where t1.id = t2.id 

How can I add transparent color option in my color setting?

I have created font color settings at customizer but it does not include transparent color, How can I add transparent option also.

enter code here 

class site_font_color { public static function register ( $ wp_customize ) {

    $  wp_customize->add_setting('site_emakers_fontcolor', array(         'default' => 'No'     ));      $  wp_customize->add_control(new WP_Customize_Control($  wp_customize, 'site_emakers_fontcolor-control', array(         'label' => 'Display the Site Font Color?',         'section' => 'colors',         'settings' => 'site_emakers_fontcolor',         'type' => 'select',         'choices' => array('No'=> 'No', 'Yes' => 'Yes')     )));        $  wp_customize->add_setting( 'site_emakers_fontcolor',         array(             'default'    => '#000000',             'type'       => 'theme_mod',             'capability' => 'edit_theme_options',             'transport'  => 'refresh',             'priority'   => 120,             'sanitize_callback'  => 'esc_attr',         )     );      $  wp_customize->add_control( new WP_Customize_Color_Control(         $  wp_customize,         'mytheme_site_emakers_fontcolor',         array(             'label'      => __( 'Site Font Color', 'customtheme' ),             'settings'   => 'site_emakers_fontcolor',             'priority'   => 10,             'section'    => 'colors',         )     ) );  }   public static function site_output() {     ?>      <style type="text/css">          <?php self::generate_css('.site *, :not(.btn-secondary, .btn)',  'color', 'site_emakers_fontcolor'); ?>     </style>      <?php }   public static function generate_css( $  selector, $  style, $  mod_name, $  prefix='', $  postfix='', $  echo=true ) {     $  return = '';     $  mod = get_theme_mod($  mod_name);     if ( ! empty( $  mod ) ) {         $  return = sprintf('%s { %s:%s; }',             $  selector,             $  style,             $  prefix.$  mod.$  postfix         );         if ( $  echo ) {             echo $  return;         }     }     return $  return; } 


add_action( ‘customize_register’ , array( ‘site_font_color’ , ‘register’ ) );

add_action( ‘wp_head’ , array( ‘site_font_color’ , ‘site_output’ ) );

Selecting elements of sublists or reshaping a list of lists

I have this list

{{{0.05792, 0.31744}, 0., 0., 0., 0.,    0.}, {0., {0.28832, 0.49024}, {0.17173, 0.386393}, 0., 0.,    0.}, {0., {0.17173, 0.386393}, {0.104, 0.352}, 0., 0., 0.}, {0., 0.,    0., {0.30752, 0.38464}, {0.322232, 0.260264}, {0.214663,     0.107331}}, {0., 0.,    0., {0.322232, 0.260264}, {0.392, 0.496}, {0.277128,     0.415692}}, {0., 0.,    0., {0.214663, 0.107331}, {0.277128, 0.415692}, {0.2, 0.4}}} 

or in the matrix form: enter image description here

I would like to convert this list to a list of two matrices, each of the same size as the input matrix, i.e. 6 by 6, where the non-zero entries for the first matrix are given by the first element of the lists in the input matrix and the same for the second matrix.

If it helps I can also create a matrix where the zeros are replaced by a list of two zeros to match the dimension.

How to change string output in hierarchy tree postgresql?

I have a table like this:

------------------------------------------------- |  id  | description         | parent_id   |  cost -------------------------------------------------- | 1    |  Radiology         |       NULL  | 0.00 | 2    |  Lab Tests         |       NULL  | 0.00 | 3    |  Normal Radiology  |         1   | 0.00 | 4    |  Resonance         |         1   | 100.00 | 1100 |  Cerebral Resonance|         4   | 200.00 | 1900 |  Blood Tests       |         2   | 10.00 | 2044 |  Calcium           |         2   | 50.00  --------------------------------------------------- 

I need to generate this kind of output:

Radiology    -->Normal Radiology    -->Resonance       -->Cerebral Resonance with contrast Lab Test     --> Blood Test     --> Calcium 

I’m working on Postgresql. I’ve been trying this with recursive CTE but I was unable to generate what I like:

WITH RECURSIVE hierarchy AS (     SELECT  id, CAST(description AS TEXT) AS parent_list     FROM    orders     WHERE   parent_id is null     UNION       SELECT  c.id,             CAST(c2.parent_list || ' --> ' || c.description as text) as parent_list     FROM orders c     INNER JOIN hierarchy c2 ON c.parent_id = c2.id )    SELECT  id, parent_list FROM    hierarchy GROUP BY id, parent_list ORDER BY parent_list; 

That recursive CTE produces the following non desirable output:

Radiology Radiology--> Normal Radiology Radiology--> Resonance Radiology--> Resonance --> Cerebral Resonance with contrast Lab Test Lab Test --> Blood Test Lab Test --> Calcium 

Can anyone please give a piece of advice?

why isnt this playing a sound?

This code is supposed to play a sound when I press ‘E’ but it’s not working. also keep in mind I’m new to unity and coding in general so don’t be to harsh if I made a really dumb mistake.

using System.Collections; using System.Collections.Generic; using UnityEngine;  public class flashlightonoffsound : MonoBehaviour {      public AudioSource flashlightsound;      // Use this for initialization     void Start()     {      }      // Update is called once per frame     void Update()     {         if (Input.GetKeyDown(KeyCode.E))         {             flashlightsound.Play();         }         else         {             flashlightsound.Stop();         }              } } 

Multilingual website proper url, how should it look like?

Tell me which option is a proper option and if any of these options has some serious flaw that one should avoid at all costs

English website root folder installed main websie www.mainsite.com

subsite english version www.mainsite.com/help

subsite german version www.mainsite.com/de/hilfe

PLEASE note that help and hilfe are not just pages but entire websites created with wordpress subsite. IN other words those are separate websites/blogs and not just pages of the mainsite.

would this be okay from the SEO point of view? Basically the german version of the website having /de/ in its url? English version not having en.

But version being subsites.

mainsite simply being in english. Would that be a big problem?