Applying replacement rules to products doesn’t work as expected

I have the following issue: I’d like to apply some replacement rules, for example

rules:={f[x]/t :> ff[x], g[x]/t :> gg[x]} 

to an expression, e.g. like this:

(f[x]*g[x]/(t^2))/. rules 

Surprisingly, this doesn’t give the expected result


How do I fix this? Sorry if it’s an easy question, I’m still a beginner with Mathematica.

Googlebot crawls but doesn’t fetch pages

I’ve been seeing a surge in the number of "Crawled – currently not indexed" pages in search console recently. Screenshot below:

enter image description here

When I look in detail to URLs one by one, I see that some of them are crawled but not fetched, like below:

enter image description here

Site’s average response time to googlebot seems to be in the range of 200-300 ms. What can be a reason for these crawls but no fetches?

Parameter ‘Walk’ doesn’t exist?

I’m trying to make walk animation. But when I try to change animation idle to walk, ıt doesn’t work. It says ‘Parameter "Walk" doesn’t exist’but I added parameter and script works. I can manually change parameter and it works(walk animation is playing). But when I try to change via script, ıt doesn’t work.

enter image description here

Here are codes

public class Controller : MonoBehaviour     private Rigidbody rb;  private float xPos;  Vector3 playerMovement;  [SerializeField] Animator anim;      private void Awake() => rb = GetComponent<Rigidbody>();  private void Start() {           xPos = transform.position.x;  }         // Update is called once per frame void Update() {     Move();      }  private void Move() {          float mH = Input.GetAxis("Horizontal");       playerMovement = new Vector3(0, 0, mH);      rb.AddForce(playerMovement * 2f);      anim.SetFloat("Walk", 1);      transform.position = new Vector3(xPos, transform.position.y, transform.position.z);       } 

Woocommerce get_term_by() in transition_post_status hook doesn’t works

Im having this code

$  concours_termine_cat = get_term_by('slug' , 'concours-termine' , 'product_cat'); 

get_term_by is returning false, after debugging the get_term_by function

taxonomy_exists( 'product_cat');  

is returning false.

So I checked in taxonomy_exists function and looks like into $ wp_taxonomies product_cat doesn’t exist at this time of execution.

I call this hook like this add_action('transition_post_status' , 'vince_function_post_update' , 10 , 3);

get_the_excerpt doesn’t work with default items but works with my customs post types

the excerpt function not work in my custom post template using WordPress default posts in the query loop, but they work fine with custom post type.

I enabled the display of excerpt by checking the "excerpt" option in the post options fields.

I also added "add_post_type_support(‘page’ ‘excerpt’)" in my function.php file but it doesn’t working.

I suspect a problem coming from the database because the excerpts are displayed when I test the website locally with Xampp.

Here is a snippet of the code used in my page template:

<div class="container">                      <div class="row">                         <div class="col-lg-9 col-mg-9 mp-blog" style="padding-right: 24px;">                                                 <div class="row">                                  <?php                                 $  paged = (get_query_var('paged')) ? get_query_var('paged') : 1;                                  $  args = array(                                   'post_type'=>'post', // Your post type name                                   'posts_per_page' => 6,                                   'cat' => 26,                                   'paged' => $  paged,                                 );                                                                  $  loop = new WP_Query( $  args );                         if ( $  loop->have_posts() ) {                             while ( $  loop->have_posts() ) : $  loop->the_post();?>                        <?php the_excerpt();?>                        <?php endwhile;                              $  total_pages = $  loop->max_num_pages;      if ($  total_pages > 1){          $  current_page = max(1, get_query_var('paged'));     ?>     <div class="custom_pagination">        <?php         echo paginate_links(array(             'base' => get_pagenum_link(1) . '%_%',             'format' => '/page/%#%',             'current' => $  current_page,             'total' => $  total_pages,             'prev_text'    => __('« précédent'),             'next_text'    => __('suivant »'),         ));?>     </div>     <?php }     } wp_reset_postdata();?>                     </div>                 </div><!-------------- end of col-8 ------------------>               <div class="col-lg-3 col-mg-3" style="padding: 0;">                   <div id="tching" class="blog_right_sidebar" style="padding: 0 15px;">                       <?php get_sidebar(); ?>                   </div>               </div>             </div>          </div> 

PostgreSQL COPY TO doesn’t honor Linux group privileges

I have issues executing COPY to command, receiving below error msg:

ERROR: could not open file "/home/pgsql/TMP/out.txt" for writing: Permission denied

  • Postgres engine is being run as postgres user
  • Postgres user belongs to app group
  • TMP folder has below priviledges set:

drwxrws— 2 pgsql app 23 Mar 28 19:47 TMP

I don’t understand why it doesn’t work…

I did quick check login as postgres user and creating file and this worked:

sudo -i -u postgres

If I change priviledges to 777 all works as expected (I can do copy to command with no issues) So as to me it looks postgres doesn’t somehow honor Linux groups rights

Can someone guide me how to resolve that (777 is not an option to me…)

Why doesn’t ‘post__not_in’ work with ‘cat’?

When I write ‘cat’ => ’45’, then ‘post__not_in’ does not work, if you remove cat, then everything works without problems. I would be grateful for your help

$  args = array(        'posts_per_page' => 20,        'post__not_in' => array(7403,7404,7405),        'cat' => '45',   'meta_query' => array(      array(         'key' => 'главный_кр',         'value' => 'да'     ) )); 

$ query = new WP_Query( $ args );

Why doesn’t SQL Server use my index in this SELECT … WHERE?

I’ve created a table with a nonclustered PK (this is by design), and an additional nonclustered index on the column I’m filtering with a WHERE clause ([target_user_id]):

CREATE TABLE [dbo].[MP_Notification_Audit] (     [id]                    BIGINT             IDENTITY (1, 1) NOT NULL,     [type]                  INT                NOT NULL,     [source_user_id]        BIGINT             NOT NULL,     [target_user_id]        BIGINT             NOT NULL,     [discussion_id]         BIGINT             NULL,     [discussion_comment_id] BIGINT             NULL,     [discussion_media_id]   BIGINT             NULL,     [patient_id]            BIGINT             NULL,     [task_id]               BIGINT             NULL,     [date_created]          DATETIMEOFFSET (7) CONSTRAINT [DF_MP_Notification_Audit_date_created] DEFAULT (sysdatetimeoffset()) NOT NULL,     [clicked]               BIT                NULL,     [date_clicked]          DATETIMEOFFSET (7) NULL,     [title]                 NVARCHAR (MAX)     NULL,     [body]                  NVARCHAR (MAX)     NULL,     CONSTRAINT [PK_MP_Notification_Audit1] PRIMARY KEY NONCLUSTERED ([id] ASC) );  [...]  CREATE NONCLUSTERED INDEX [IX_MP_Notification_Audit_TargetUser] ON [dbo].[MP_Notification_Audit] (     [target_user_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY] GO 

This table has about 11,700 rows of data in, so it should be enough to trigger the use of indexes with WHERE clauses. If I SELECT just the column I’m filtering on, only the index is used and 133 matching rows are read – an index-only scan:

SELECT [target_user_id]   FROM [TestDb].[dbo].[MP_Notification_Audit]   WHERE [target_user_id] = 100017 

Execution plan 1

However, as soon as I add an extra column to the SELECT, the index is ignored and a table scan with a predicate is done to attain the result, reading over 11,700 rows:

SELECT [target_user_id], [patient_id]   FROM [TestDb].[dbo].[MP_Notification_Audit]   WHERE [target_user_id] = 100017 

Execution plan 2

Why is it ignoring my index in this second query? I’d have thought it would still be more efficient to use the index to get down to 133 RIDs, then query the extra row data required, than to go through every row of the table with a predicate? I know I can add columns to the index with INCLUDE with the extra fields needed in the SELECT clause to make it use the index again, but I’m interested as to why it doesn’t still use the index in this case.