Single pretty url query var parameter

I’ve registered a custom query var that I read from shortcodes running on a page ‘d’, so at the moment … [URL]/d/?v=value works.

The page is essentially a template and the value is actually an author slug, but what I would like is to have a pretty URL like [URL]/d/value (I use the author base (author_posts_url) & a template for actual profile pages, this is a kind of white-labelled form page for each user and I would like to keep the URL as short as possible, also unlikely to ever need additional variables and so would like to not even have the key of the key-value pair in the URL).

I’ve tried experimenting with add_rewrite_tag and add_rewrite_rule with no success (possibly because I don’t know regex), and completely glazed over when looking at rewrite_add_endpoint.

Any help or pointers will be much appreciated.

Single Row Cylindrical Roller Bearing in stock

Our History
Nanjing Younarui Bearing Co., Ltd was established in the year 2010. YNR is our brand and trademark. After 10 years of development, nowadays YNR has become into a group corporation with branch companies in Xi鈥檃n city, Shanxi Province and Wuhu City, Anhui Province.
Our Factory
Production Line Capacity: Bearing: 40,000 Pieces / Month;
Number of Product Categories: 20;
Number of Product Models: 3000
Our Product
Deep groove ball bearing, Cylindrical roller bearing, Taper roller bearing, Angular contact ball bearing, Self-aligning bearing, Pillow block bearing units and other special bearings
Product Application
Applicated for oil drilling, mining, excavation and mineral processing machinery. Our bearings meet the most stringent tolerances ensuring equipment runs at maximum load for peak output.
Our Certificate
SGS certificate (Alibaba Assessed Supplier), CPST Bearing Test Report (Eurones (Dongguan) Consumer Products Testing Service Co., Ltd), YNR trademark
Production Equipment
CNC Lathe: CJK0660, Quantity: 32 , Number of Year(s) Used: 3
CNC Grinding Machine: Pusen, Quantity: 35 , Number of Year(s) Used: 2
Wire-Cutting Machine: Boruige, Quantity: 11 , Number of Year(s) Used: 2
CNC Machining Center: VMC859L, Quantity: 12 , Number of Year(s) Used: 1
Projecto: VMS-3020F, Quantity: 1 , Number of Year(s) Used: 1
Hardness Tester, Quantity:3 , Number of Year(s) Used: 2
Surface Configuration Tester: N/A, Quantity: 1 , Number of Year(s) Used: 2
Spectrometer: BRUKER, Quantity: 1 , Number of Year(s) Used: 2
Length Measuring Instrument: JD25-C, Quantity: 1 , Number of Year(s) Used: 2
Production Market
Our products had been exported to the America, Europe, Southeast of Asia, Africa, the Middle East etc. with good quality and reasonable prices, have gotten good reputation among the customers.
Our Service
Provide OEM Service, 2000 square meters warehouse to keep huge stocks for fast delivery. One-stop purchasing for most types of bearings. Single Row Cylindrical Roller Bearing in stock
website:http://www.ynr-bearing.com/
website2:http://www.ynr-cojinetes.com/

Non cluster indexing with combination or on single entity for multiple columns

I am new to db design I also read concepts of non cluster indexing and know about the combined non cluster indexing but in my scenario I am having user table with multiple search on column

table column as follows   userName  fatherName  empId  cardNumber and so on. (above all 4 no one column is PK) 

I am having around 50 millions records over here due to large data search take huge time due to that I am thinking to create indexes in table but these all 4 searches are optional means possible user can fill all four or may be one or two of them but I was confused if I make all four separate index and one for all 4 then it might be creating issue on performance of while entering/inserting the data I created even a single index for all 4 column in combined but while I am searching with only card number then it takes huge time shall I created all four separate indexes would this work in combined search of empId and cardNumber

If I created separated once then what about combined searches If I create combinations then indices are 15 which obviously not a good way for insertion… lot of confusion I have can anyone help me thanks in advance

Core Web Vitals (CLS and LCP) errors for a client-rendered Single Page Application (built with React + Firebase)

I have a SPA (single page website) build with React + Firebase and I’ve been getting these Core Web Vitals errors (see images below).

My website is loading normally both on Desktop and Mobile. And I think it’s rendering in a very reasonable time. At least I think it’s way faster than most websites I visit, even though it’s client side rendered.

I’m guessing these errors on Core Web Vitals are being triggered because there’s a Spinner that runs while the app is loading its data.

For example: that report is probably measuring the Spinner vs Loaded content as layout shift. Because I can guarantee that my app has ZERO layout shift. Once the Spinner is gone and you see content on your screen, the app is 100% ready for you to browse and interact with.

Maybe to get rid of those errors I would have to do SSR + hydration, which I really don’t want to, because it’s a dynamic website and I would have to either remove caching completely, or to risk a content (state vs fresh) flickering on the screen once it’s fully hydrated.

Should I care about these results? Is anybody that also manages a SPA also getting these kind of errors? Is there a way to fix this?

Found some related articles:

  • https://www.moovweb.com/post/google-penalizes-pwas-spas
  • https://www.enterspeed.com/core-web-vitals-can-affect-how-google-ranks-your-spa-website/

enter image description here

enter image description here

How to display all posts in a category at the end of a single post?

The "work" page for my portfolio is simply all the posts in the "work" category. They are displayed as a thumbnail grid. Here.

<?php get_header(); ?>  <div class="grid work thumb-wrap clearfix"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post();?>                               <a class="thumb" href="<?php the_permalink(); ?>">             <img src="http://www.nathanspence.com/wp-content/uploads/<?php echo get_post_meta($  post->ID, 'thumb', true); ?>"/>             <div class="post-excerpt">                 <h2><?php echo get_the_title($  ID); ?></h2>                 <div class="sub-title"><?php echo get_post_meta($  post->ID, 'project-name', true); ?></div>             </div>               </a>                               <?php endwhile; ?>         <?php endif; ?>  </div><!--end of "thumb-wrap"-->  <div class="push"></div>      </div><!--end of "page-wrap"-->   <?php get_footer(); ?> 

I want to duplicate this at the end of each single post. Here.

<?php get_header(); ?>  <div class="page-content">  <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>   <article class="work post-content ready-to-column clearfix">                      <header class="post-header column-left">         <h1><?php echo get_the_title($  ID); ?></h1>         <h2><?php echo get_post_meta($  post->ID, 'project-name', true); ?></h2>         <div class="project-info"><?php echo get_post_meta($  post->ID, 'project-info', true); ?></div>                        </header>          <div class="column-right">     <?php the_content(); ?>                                   </div><!---end of "right-column flex-column"--->               </article>      <?php endwhile; else: ?>     <p>Sorry, this post does not exist</p> <?php endif; ?>          <div class="grid work thumb-wrap clearfix"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post();?>                               <a class="thumb" href="<?php the_permalink(); ?>">             <img src="http://www.nathanspence.com/wp-content/uploads/<?php echo get_post_meta($  post->ID, 'thumb', true); ?>"/>             <div class="post-excerpt">                 <h2><?php echo get_the_title($  ID); ?></h2>                 <div class="sub-title"><?php echo get_post_meta($  post->ID, 'project-name', true); ?></div>             </div>               </a>                               <?php endwhile; ?>         <?php endif; ?>  </div><!--end of "thumb-wrap"-->  <div class="push"></div>      </div><!--end of "page-wrap"-->   <?php get_footer(); ?>  

As you can see, simply pasting it in just shows the current posts thumbnail. Any idea how I can do this?

Why does the triangle rendered by OpenGL ES 2.0 , with SDL 2.0 context, vanishes after a single render, if events are not polled?

I was experimenting with OpenGL ES 2.0 and being new to OpenGL, I was trying to render a simple triangle. But I was shocked to see that, if I do not call SDL_PollEvent(...) after glDrawArrays(...) in the game loop, I see the triangle render on the screen for a split second and then it vanishes altogether ! But, if I call SDL_PollEvent then everything is fine ! Can anyone explain to me the reason for this abnormal behavior???

However, this is the interesting part of my code:

This code works perfectly, if I uncomment the commented block of code:

uint32_t vbo;  glGenBuffers(1, &vbo); glBindBuffer(GL_ARRAY_BUFFER, vbo); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW);  glEnableVertexAttribArray(pos); glVertexAttribPointer(pos, 3, GL_FLOAT, GL_FALSE, 3*sizeof(float), (void*)0);  bool run = true; SDL_Event e; while (run) {     glDrawArrays(GL_TRIANGLES, 0, 3);   SDL_GL_SwapWindow(window);   /*while(SDL_PollEvent(&e)) {       switch(e.type)       {            case SDL_QUIT:                 run = false;                 break;        } } */ 

}

Vertex Shader:

precision mediump float;  attribute vec3 pos; void main() {     gl_Position = vec4(pos.xyz, 1.0);  } 

Fragment Shader:

precision mediump float;  void main() {       gl_FragColor = vec4(0.0, 0.0, 1.0, 1.0);  } 

Every help will be greatly appreciated, Thankyou everyone in advance !

For a single party, how can I make Dead in Thay a “fast-paced assault” and not a drawn-out series of skirmishes?

I having been running adventure modules from Tales from the Yawning Portal for a single group of 3-6 players (i.e. I have 6 players, but sometimes as few as 3 can attend a session). Part of the reason for me running modules is to minimise necessary preparation time.

We recently finished playing the first adventure, Sunless Citadel, when I asked the players which adventure in the book they would like to do next. Upon seeing the massive awesome-looking map for the Doomvault in Dead in Thay (with 107 rooms, all containing encounters, divided into 9 mini-dungeons), they unanimously voted for that one. I warned them that it would take many sessions to complete, and they were fine with that. So I got all the characters to advance to Level 9, threw them some bonus loot, and dropped them into the Doomvault.

We are now three sessions in, and I have identified a few potential issues.

The lengthy preamble to the adventure says:

The incursion into the Doomvault is intended to be a fast-paced assault in which the characters have little time for typical rests. A few areas of the dungeon offer access to special magic that allows characters to gain the benefit of a rest.

However, our experience so far has been contrary to this. I provide a transcript of the game so far below:

  • In the first session, with 5 players, they fought through 3 rooms occupied by ordinary enemies, then one room occupied by a big (CR 10) boss monster. This took 40 minutes of in-game time.

  • In the second session, with 3 players (all casters), they took a long rest, had one encounter with two-and-a-half rooms’ worth of enemies (although a well-placed conjure woodland beings tipped the balance in their favour), then killed another big (CR 10) boss monster. After the rest, this took 1 hour of in-game time.

  • In the third session, with 3 players (2 casters), they took a short rest, killed a relatively strong monster, found a source of healing, fought two gorgons, returned to the gatehouse, twiddled their thumbs and restocked for what I declared to be 9 hours, took a long rest, returned to the dungeon, and fought a small room’s worth of enemies.

  • In the fourth session, with 4 players (2.5 casters), they had 3 combat encounters.

  • In the fifth session, with 3 players (2.5 casters), they dealt with a minor trap, had one combat encounter, took a long rest, had one large combat encounter, then took a short rest.

(For those unfamiliar with Dead in Thay, the gatehouse is an unmapped area through which the players entered the Doomvault and is under control of allies to the party. The module assumes that no encounters will happen in the gatehouse. I have thus assumed that it can function as a safe-room.)

So far, we have had 14 encounters, 3 long rests and 2 short rests. Over an in-game time of 49:20, the party has only spent 3:55 inside the dungeon, with the rest of the time sheltering in the gatehouse – far from a fast-paced assault! Typically, the call to take a long rest was done because the casters were out of spell slots, and with small party sizes the casters needed their spell slots for the party to deal enough damage to push through the encounters. While the players have found ways to recover hit-points within the Doomvault, nothing they have lets them recover spell slots besides a long rest.

I do not believe this to be a fault in the party (besides being too small half the time), but rather a characteristic of Dead in Thay. Page 84 of the DMG talks of the Adventuring Day, which is how many encounters a party can have between two long rests. For three level 9 PCs, an adventuring day contains 22,500 XP worth of encounters. Between the first two long rests, my three level 9 PCs had 31,900 XP worth of encounters, so it is hardly surprising that the party’s resources are so taxed. Between the second two long rests, we had 29,050 XP of encounters, mostly for 4 PCs, 2 lvl 9 and 2 lvl 10, which is around the right amount for an adventuring day.

If I had all 6 of my players, they could probably get further, but their adventuring day would still be much, much shorter than a full day. And because of this, and how a character can only benefit from a long rest once every 24 hours (PHB 186) (a rule I have already stretched a little), I anticipate that this will result in many more periods of inactivity in the gatehouse.

I am aware that the Thayans of the Doomvault can and will run some degree of preparations and repairs while the party is resting. However, the highly segregated nature of the Doomvault leads me to think that damage dealt to one section won’t draw that much attention from another section unless it is utterly catastrophic. And since access into and out of the Doomvault is being tightly controlled against the Thayans, their ability to replenish lost monsters is limited. The modifications the Thayans could make to the Doomvault during rests would be highly situational and rather limited, as far as I can tell, although maybe I’m just unimaginative.

Further reading about Dead in Thay online indicates that the adventure was originally designed for many groups of players to tackle simultaneously. This makes me fear that the Doomvault will become a long grind rather than a fast-paced assault for a single party.

On a related point, Dead in Thay includes a feature called ‘Alert Level’ which increases the difficulty of random encounters the longer players spend in the Doomvault; a feature intended to add to the feeling of a ‘fast-paced assault’. However, if the players only spend 2 hours a day inside the Doomvault, then the Alert Level never goes up by the rules as written, which is boring. I am considering having time spent in the gatehouse not decrease the Alert Level (but not increase it either), or possibly make Alert Level increase faster (1 per hour rather than 1 per 4 hours).

My question is this:
For a single party, how can I make Dead in Thay a “fast-paced assault” and not a drawn-out series of skirmishes?

Specifically, I would like to know how to

  • avoid the “15-minute working day” in a module densely packed with encounters (I am aware of several questions which handle this question generically; advice specific to Dead in Thay is thus preferable),
  • avoid burn-out in this mega-dungeon, and
  • make the Alert Level meaningful (although this is a minor point compared to the above two),

preferably without having to re-write the module.

An answer should preferably include your own experience in running Dead in Thay and how you tackled these issues (or if they are issues at all), although experience from other adventure modules of similar scale and density is acceptable.