software – deleting xml child node using php

function myFunction(xml) { var i; var xmlDoc = xml.responseXML; var table=”<td style=’height:50px’; colspan=’3′>All OrderCustomerShip toDateTotal”; var x = xmlDoc.getElementsByTagName(“olist”); for (i = 0; i <x.length; i++) { table += “<input type=’checkbox’ name=’choose()’ value=’x(‘+i+’)’/>”+ x(i).getElementsByTagName(“number”)(0).childNodes(0).nodeValue + “” + x(i).getElementsByTagName(“customer”)(0).childNodes(0).nodeValue + “”+ x(i).getElementsByTagName(“shipping”)(0).childNodes(0).nodeValue + “” + x(i).getElementsByTagName(“time”)(0).childNodes(0).nodeValue + “”;
} document.getElementById(“tab”).innerHTML = table;


here is my table which is displayed after being read from the xml file, the user has the choice to edit/delete a row from the table, and the data from the xml file has to be edited/deleted as well. How can I identify the user’s choice from the checkbox and delete the node from the xml file?

javascript – Objects are not valid as a React child (found: object with keys {price, item}). If you meant to render a collection of children, use an array instead

Tenho uma página(hall) onde pedidos com o nome do cliente,nº da mesa e os itens escolhidos, são enviados para o firebase e preciso pegar esses pedidos e mostrar em uma outra página(kitchen).

Parte do hall onde mostra item e o price:

      <div className={css(}>
        {, index) => <MenuButton onClick={()=>setOrder(order.concat({item:el(0), price:el(1)}))} el={el} key={index}/>)}

O componente Card:

const CardKitchen = (props) => {
  return (
      <p>Cliente: {props.customer}</p>
      Mesa: {props.table}
      <p>Status: {props.status}</p>
        <Button title= 'Pedido Pronto'/>

O arquivo Kitchen:

const Kitchen = () => {
  const (customer, setCustomer) = useState(());

  useEffect(() => {
    const order = ();
    .then(snapshot => {
      snapshot.forEach(doc => {

  }, ());

  const updateStatus = doc => {
      status: 'Pronto'
    setCustomer(customer.filter(item => !==

  return (
    <main className={css(styles.main)}>
      <section className={css(styles.title)}>Cozinha
        {, index) =>
          doc.status === 'Preparando' ? (
            <div key={index}>
              <Button onClick={() => updateStatus(doc)} children={'Pedido pronto'}/>
          ) : null

O erro:

sharepoint online – Cannot find Run a Child Flow in MS Flow

Just like the article you provide, you need to follow the steps then you can have a the “Run a Child Flow”. First You need to navigate to the solution on your left hand. first create a new solution(Or goes to an existing one). Then create the child Flow first. After that, create the Parent Flow in the solution, then you will find the Run a child flow action. And you can find the child flow you created before.
enter image description here

UK visa for child of EU national

Am a Portuguese nationality. My kid, 3 yrs old and husband is indian nationality. V want to move to UK. Since i never visited UK, v applied for EEA family permit visa for my son n husband. Submitted our application in 1st week of march. Still waiting for decision. Not sure how long it vl take for receiving the visa. Is there any other way to atleast take my 3 year old kid along wid me to UK. Any diff type of visa or procedure?

php – Getting IDs from Child Categories in Woocommerce

So I have a script that is/was working perfectly, but now have an issue as 2 of the categories fall under a parent category.

The categories without a parent work fine, but the 2 categories that now have a parent are not working (don’t echo anything) and I am assuming because the term_id is no longer correct – as in it no longer is being found by wp_get_post_terms(); (if that makes sense).

function display_item_category() {
        $args = array(
                'orderby' => 'name',
                'order' => 'ASC',
                'parent'   => 0,
                'exclude'   => '15',

    $product_cats = wp_get_post_terms( get_the_ID(), 'product_cat', $args );

    foreach ($product_cats as $term) {
        $category_link = get_category_link( $term );
        $the_cat = $term->term_id;

       if ( $the_cat == 20 ) {
        echo 'stuff';
       if ( $the_cat == 37 ) {
        echo 'stuff';
       if ( $the_cat == 19 ) {
        echo 'stuff';
       if ( $the_cat == 16 ) {
        echo 'stuff';
       if ( $the_cat == 42 ) {
        echo 'stuff';

unity – How to set the z axis bound of the collider of child of an instantiated object to zero

The simplest way to fix this is to spawn your prefab at a position that places its children in the same z-plane as the objects you’re hoping to detect.

So for example if the object you want to detect is at z=0, and your prefab’s children are at z = 1 relative to their parent, and their parent isn’t scaled in the z axis or rotated in the x/y axes, then you would need to spawn the parent at z = -1 to cancel-out the child colliders’ offsets so they’ll sit at the z = 0 plane.

Since you haven’t shown us enough details of your setup for us to tell you exactly what position values to change, another option is to exclude Z from consideration in your test. We can do this by adding an extension method:

public static class PhysicsExtensions {
    public static bool Envelops2D(this Bounds a, Bounds b) {
        return (b.max.x <= a.max.x)
             & (b.max.y <= a.max.y)
             & (b.min.x >= a.min.x) 
             & (b.min.y >= a.min.y);

Then you can change your if clauses to…

if (collider1.bounds.Envelops2D(other.bounds))
    if (other.bounds.Envelops2D(collider2.bounds))

Note that this is using only the bounding rectangles of your colliders, not their actual shapes. So for example this will say a radius-8 circle collider at (0, 0) envelops a radius-1 circle collider at (7, 7), even though that second circle is completely outside the first, but still inside its bounding rectangle. You can use radius and distance checks instead of bounds checks if you want to take the circular shape of the colliders into account.

node.js – How to launch a detached child process in Node, and reuse it on subsequent executions if already running?

I want to write a Node CLI that leaves a server/daemon running in the background, so subsequent calls to the CLI are much faster, as it can just print the latest info from the daemon (which is already primed with info as it’s been watching the filesystem).

My purpose is not type-checking, but the CLI architecture I want is similar to how flow seems to work: to be able to launch the background service if it’s not running (unique for the current working directory), or find the existing Node process if it’s already running, and communicate with it either way. Looking at how flow-bin is set up in my local node_modules, it seems to ship with binaries (>20MB each) for the three main platforms (which I guess are all compiled from OCaml?). The flow CLI entry point is actually a tiny Node bin script which just spawns the relevant binary for the current platform. So I guess somehow the binary itself checks for an already-running instance of itself, and shuts itself down if found…? But I’m not sure how that could work, as it would need to still print something to stdout.

Can anyone shed any light on the architecture I want – basically, launching a detached child process from a parent Node process, and then reusing the same child process on subsequent executions of the parent? Are there any other open source examples I could look at, preferably just using plain Node JavaScript instead of OCaml?

Master counter in multiple child loops

How can I run a master counter so that I can add it in children’s class or content somewhere. I want to add a counter in class of all the li elements which will be like li__1 to li__n. The problem here is that they all are in different ul and I am running different loops to create the ul and li.

(function gameOn(n) {

    const gamePad = `
    <div class="container">
        <div class="matrix">
            ${Array(n).fill().map((p, q) => `
                <ul class="row  ${q + 1}">
                    ${Array(n).fill().map((m, n) => `<li class="column ${n+1}"></li>`).join('')}
    const root = document.getElementById('root')
    root.innerHTML = '';
    root.innerHTML = gamePad;
html .container .matrix{width:85%;background:#716f71;padding:1rem;border-radius:4px;box-shadow:8px 9px 26px 0 rgba(46,61,73,.5);margin:0 0 3em;overflow:auto}@media(min-width: 768px){html .container .matrix{width:660px;height:660px}}html .container .matrix .row{display:flex;justify-content:space-around;align-items:center;margin:0;padding:0}html .container .matrix .row .column{height:4.7rem;width:4.7rem;margin:.2rem .2rem;background:#141214;font-size:0;color:#fff;border-radius:5px;cursor:pointer;box-shadow:5px 2px 20px 0 rgba(46,61,73,.5)}@media(min-width: 768px){html .container .matrix .row .column{height:125px;width:125px}}
<div id="root"></div>

woocommerce – Child theme functions.php is not executing

WordPress + WooCoomerce + Storefront theme + Storefront child theme.

I have the child theme’s functions.php file from previous site development iteration which used to work. After migrating to new hosting I set up from the scratch same set of WordPress + WooCoomerce + Storefront theme + made Storefront child theme. The only diference with previous iteration is set of plug-ins and CSS rules/styling but custom code in functions.php is not touching them at all. Hoever then I copied functions.php from the previous site iteration it seems to be not executed at all. Trying to fix that I plaied a bit with file permissions on OS level: now it is set to rwxrwxrwx (I know it is not safe but I totaly run out of ideas of what is happening)

What might be going wrong with functions.php?

Here goes the functions.php contents

// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;

// AUTO GENERATED - Do not modify or remove comment markers above or below:

if ( !function_exists( 'chld_thm_cfg_locale_css' ) ):
    function chld_thm_cfg_locale_css( $uri ){
        if ( empty( $uri ) && is_rtl() && file_exists( get_template_directory() . '/rtl.css' ) )
            $uri = get_template_directory_uri() . '/rtl.css';
        return $uri;
add_filter( 'locale_stylesheet_uri', 'chld_thm_cfg_locale_css' );
if ( !function_exists( 'child_theme_configurator_css' ) ):
    function child_theme_configurator_css() {
        wp_enqueue_style( 'chld_thm_cfg_separate', trailingslashit( get_stylesheet_directory_uri() ) . 'ctc-style.css', array( 'storefront-gutenberg-blocks','storefront-style','storefront-style','storefront-icons','storefront-jetpack-widgets','storefront-woocommerce-style' ) );
add_action( 'wp_enqueue_scripts', 'child_theme_configurator_css', 30 );


add_filter( 'storefront_credit_link', '__return_false' );

add_filter( 'woocommerce_variable_price_html', 'variation_price', 20, 2 );

function variation_price( $price, $product ) {
    $min_regular_price = $product->get_variation_regular_price( 'min', true );
    $min_sale_price = $product->get_variation_sale_price( 'min', true );
    $max_regular_price = $product->get_variation_regular_price( 'max', true );
    $max_sale_price = $product->get_variation_sale_price( 'max', true );
    if ( ! ( $min_regular_price == $max_regular_price && $min_sale_price == $max_sale_price ) ) {
        if ( $min_sale_price < $min_regular_price ) {
            $price = sprintf( '<span>from </span><del>%1$s</del><ins>%2$s</ins>', wc_price( $min_regular_price ), wc_price( $min_sale_price ) );
        } else {
            $price = sprintf( '<span>from </span>%1$s', wc_price( $min_regular_price ) );
    return $price;

function short_woocommerce_product_titles_words( $title, $id ) {
  if ( ( is_shop() || is_product_tag() || is_product_category() ) && get_post_type( $id ) === 'product' ) {
    $title_words = explode(" ", $title);
    if ( count($title_words) > 6 ) { // Kicks in if the product title is longer than 6 words
      // Shortens the title to 6 words and adds ellipsis at the end
      return implode(" ", array_slice($title_words, 0, 6)) . '...';
    } else {
      return $title; // If the title isn't longer than 6 words, it will be returned in its full length without the ellipsis
  } else {
    return $title;
add_filter( 'the_title', 'short_woocommerce_product_titles_words', 10, 2 );

remove_action( 'storefront_header', 'storefront_product_search', 40);
add_action( 'storefront_header', 'storefront_product_search', 25 );

react.js – Passing data as props to every single child component every time in React

This is my React component for rendering a post. I have data object as JSON which was fetched through an API in this component.
I’d like to separate as several react components instead of putting all together in one component.
So I created like this:

const PostDetail: React.FC = () => {
  const post = usePost(); // Fetched post data by using useSelector() from redux. It looks like: {author: {name: 'name', level: 1}, content: 'hello', createdAt: 1234567, upatedAt: 1234567, comments: (), ...more than 20 properties};

  return (
      <PostDetailTop post={post} />
      <PostDetailContent post={post} onClickEdit={onHandleEdit} onClickDelete={onHandleDelete} />
      <PostDetailBottom post={post} />
      <PostDetailComment post={post} />

interface Post {
  author: Member;
  content: string;
  createdAt: number;
  updatedAt: number;
  comments: Comment();

const PostDetailTop: React.FC<{post: Post}> = ({post}) => {
  const { author } = post;

  return (
    <div>author: {}</div>

const PostDetailBottom: React.FC<{post: Post}> = ({post}) => {
  const { createdAt, updatedAt } = post;

  return (
    <div>createdAt: {createdAt}, updatedAt: {updatedAt}</div>

interface PostDetailContentProps {
  post: Post;
  onClickEdit: () => void;
  onClickDelete: () => void;

const PostDetailTop: React.FC<PostDetailContentProps> = ({post, onClickEdit, onClickDelete}) => {
  const { content } = post;

  return (
      <button onClick={onClickEdit}>edit</button>
      <button onClick={onClickDelete}>delete</button>

const PostDetailComment: React.FC<{post: Post}> = ({post}) => {
  const { comments } = post;

  return (
    { => <div></div>)

I think this approach looks ugly.
Because every single component has to get the post object as props every time even though the child component doesn’t need the other properties of the post object.
But if I pass only necessary props to the component, it has to have it’s own Props interface even if I already defined Post interface.

I’d like to make this clean, simple and maintainable component.
Which one is better? Just passing a post object or passing a destructed post object?