Working with CLI and missing my namespace classes inside

I’m very new to WordPress development. I hit this error when i developering my own class and namespace to do the life easier to reuse my code on cross of platforms/frameworks.

I have added my CLI command like this

wp product:sync 

And when i run my CLI command whitout my class its run as it shut, I can get access to the internel WordPress functions did not working.


<?php  namespace WMS\Controllers;  use WMS\Controllers\CLI\CLI_Products;  class CLI {     function init()     {         add_action('cli_init', function () {             $  product_cli = new CLI_Products();              \WP_CLI::add_command('product:sync', $  product_cli->execute());             \WP_CLI::add_command('stock:sync', $  product_cli->hello_world());             \WP_CLI::add_command('order:sync', $  product_cli->hello_world());         });     } } 


<?php  namespace WMS\Controllers\CLI;  use WMS\Controllers\WMSApi\APIService\Items;  class CLI_Products {     public function hello_world()     {         \WP_CLI::line('Hello World!');     }      function execute()     {         $  api_items = new Items();          $  args = array(             'post_type'      => 'product',             'posts_per_page' => 10         );          $  loop = new \WP_Query($  args);         while ($  loop->have_posts()) {             $  loop->the_post();             global $  product;              if ($  product->get_sku()) {                 $  item = [                     'sku' => $  product->get_sku(),                     'description' => get_the_title()                 ];                  print_r($  item);             } else {                 echo 'Product missing SKU number';             }         }          $  items->import($  item);         wp_reset_query();     } } 

So when I run this command its giving this error

PHP Fatal error: Uncaught Error: Class ‘WMS\Controllers\WMSApi\APIService\Items’ not found in /var/www/frontend/wp-content/plugins/wordpress-woocommerce-plugin/src/Controllers/CLI/Product_Controller.php:16 Stack trace: #0 /var/www/frontend/wp-content/plugins/wordpress-woocommerce-plugin/src/Controllers/CLI_Controller.php(14): WMS\Controllers\CLI\CLI_Products->execute()

So its look like the main file did not load success, is there a way or work a round to load custom class/namespaces inside my CLI commands?

The type or namespace name ‘RigidBody2D’ could not be found (are you missing a using directive or an assembly reference?) [duplicate]

using System.Collections; using System.Collections.Generic; using.UnityEngine;

public class Player_Move_Proto : MonoBehaviour { public int playerSpeed = 10; public bool facingRight = true; public int playerJumpPower = 1250; public float moveX;

// Update is called once per frame void Update() {    PlayerMove (); }  void PlayerMove() {     moveX = Input.GetAxis("Horizontal");      if (moveX < 0.0f && facingRight == false){         FlipPlayer ();    }    else if (moveX > 0.0f && facingRight == true) {       FlipPlayer ();           }     gameObject.GetComponent<RigidBody2D>().velocity = new Vector2 (moveX * playerSpeed, gameObject.GetComponent<RigidBody2D>().velocity.y); }  void Jump() {  }  void FlipPlayer() {  } 


Adding IDs to urls to open up namespace – SEO considerations?

I’m working with a site that has millions of pages along the lines of: 

One of the problems is that particularly for people names, there are lots of duplicates, so we end up with 

We instead want to move to a url scheme (much like StackExchange) like: (where 1234 is a unique ID).

I assume that if we:

  • put in 301 redirects from every old page to new page
  • updated our sitemap with the new urls

then we’ll be pretty much covered. But could there be any short-term SEO implications that we should expect? (Dips in traffic, etc.?) Are there any pieces of this puzzle that we’re missing?

Unity error CS0246 (namespace could not be found) [on hold]

I’m trying to follow this this tutorial:

After I created a script to try and rotate the cube, I got an error in Unity:

Assets\InteractiveCube.cs(4,7): error CS0246: The type or namespace name 'HoloToolkit' could not be found (are you missing a using directive or an assembly reference?) 

This is the line of code it breaks on:

using HoloToolkit.Unity.InputModule; 

I have the latest version of the Mixed Reality Toolkit downloaded. I am using Unity 2018.4.8f1 and Visual Studio.

If you have encountered this problem and know how to solve it, please let me know! If you know of an alternative to accomplish the same task, I would love to know as well!

Can/should multiple application contexts share a common microservice in a single namespace?

My current employer has a single namespace into which all microservices for all projects are deployed.

Projects A, B and C all use microservice x in this common namespace:

enter image description here

Rather than each design and implement their own microservice that performs the same behaviour (for example for some common domain object CRUD operations against a database), Projects A, B and C all use and claim shared-ownership of a common implementation – microservice x – and service it in accordance with their project requirements.

Projects are upsetting the shared ecosystem for each other when deploying revised versions of x (downtime, breaking changes).

I am unclear if this is an example of what Kubernetes best practices considers to be an example of an “overcrowded namespace” anti-pattern – I am thrown by the fact that each project utilises a common microservice and I thought one of the points of microservices was to expose common things in a kind of public way like this?

Is it appropriate for this “public exposure” to manifest as a single service instance in a common namespace?

Or should the namespaces split apart and they all have their own deployment of microservice x like this?

enter image description here

why is webclient in the System.Net Namespace but net is not in the System namespace

I’m a student. I’ve have been trying to figure out out to start the road to Windows development but it seems that I can’t even figure out how to interpret the language/api structure.

Question 1: When I compare this code for C# (originally from :

using (var client = new WebClient()) {     client.DownloadFile("", "a.mpeg"); } 

To this Powershell code (originally from video at 0:55 and modified the file location to match the example above) :

(New-Object System.Net.Webclient).DownloadFile("","c:\psexamples\a.mpeg) 

I see that both languages are using some function/method called DowloadFile from a collection? called webclient that resides in a collection? called Net which resides in a collection? called System…I think.

When I look at Microsoft api documentation for System.Net namespace WebClient is a listed Class ( However; when I look at System namespace; Net is not a listed class (

Question 2: I am definitely not learning this in school and cannot see when or in what class in the future that I could possibly be exposed to any of this. When and where am I supposed to learn this stuff?

Question 3: I am going to a state school that is still super expensive. If my goal is to become a Microsoft developer; should I drop the expensive school thing and just go straight to the answer for Question 2?

Change default namespace of every item

I am facing trouble to rename the namespace of my items that I create in my SharePoint project. The namespace that I am required to modify should only have the project name in it and nothing else, but despite me changing the default namespace in the Project Properties, the result is still the same when I add a new item. For example, the name of my project is TestProject1 and the subsequent items that I aim to create should only have TestProject1 as its namespace and nothing else. Thanks for your time 🙂


I have uploaded my application on app store but it is crashing on launch. I did tried every solution regarding it after reading all stack overflow and google answers but unable to resolve it. I can provide you my crash report if that’s helpful. I did tried changing schema from debug to release I did tried looking for unwrap operator coz some people were asking it is due to these crashes

Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Termination Signal: Illegal instruction: 4 Termination Reason: Namespace SIGNAL, Code 0x4 Terminating Process: exc handler [29508] Triggered by Thread: 0 Thread 0 name: Dispatch queue: Thread 0 Crashed: I only want to see where is the crash or solution to resolve the crash one more thing it is getting stuck when I am running release schema on Xcode…on library pod ‘SwiftIconFont’, ‘~> 2.7.3’

How to fix error: no member named ‘chrono’ in namespace ‘std’

My code will not complie-I receive error: no member named ‘chrono’ in namespace ‘std’.

Many online sources have suggested that this may be because I am using an outdated version of gcc, but I have verified that I am using gcc version 6.5.0, which should include the chrono library. I cloned all of this code off of a professor for whom I’m working’s git hub, so I think the problem is with my system/compiler rather than with the code itself. For reference, I am using ubuntu on a windows computer.

Here is the error message: ../src/cpp/sgsolver_maxminmax_3player.cpp:144:24: error: no member named ‘chrono’ in namespace ‘std’ unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();

Thanks so much for your help!