Does something count as “dealing damage” if its damage is reduced to zero?

An example of a feature where this sort of thing matters is the Optional Favored Foe feature for the Ranger from Tasha’s Cauldron of Everything (emphasis mine):

[…] The first time on each of your turns that you hit the favored enemy and deal damage to it, including when you mark it, you can increase that damage by 1d4. […]

This clearly means that if you hit with an attack that never deals damage, you would not trigger Favored Foe, but what happens if you hit with an attack that can deal damage but that damage was reduced to zero by either damage reduction, resistance, immunity or some other sort of feature; have you still dealt damage?


This question is different from the following:

  • Does dealing 0 damage to a concentrating spellcaster require a saving throw?

As Constitution saving throws result from a creature taking damage, not from a creature dealing damage.

Step size is effectively zero; singularity or stiff system suspected

\[Eta] = 0.125; rg1s = Derivative[1][u1][t] - u1[t]*u3[t] - 3*u1[t]*u4[t] + u2[t]*u3[t] + 3*u2[t]*u4[t] + 2*(1 + 2*\[Eta])*u1[t]^2 == 0; rg2s = Derivative[1][u2][t] - u2[t]*u3[t] - 3*u2[t]*u4[t] + u1[t]*u3[t] + 3*u1[t]*u4[t] + 2*(1 + 2*\[Eta])*u2[t]^2 == 0; rg3t = Derivative[1][u3][t] - 0.5*((u1[t] - u2[t])^2 + u3[t]^2 - 3*u4[t]^2 + 6*u3[t]*u4[t]) == 0; rg4t = Derivative[1][u4][t] - 0.5*((u1[t] - u2[t])^2 + u3[t]^2 + 5*u4[t]^2 - 2*u3[t]*u4[t]) == 0; sol = NDSolve[{rg1s, rg2s, rg3t, rg4t, u1[0] == -0.6*0.2, u2[0] == -0.6*0.2, u3[0] == 0.6*0.2, u4[0] == 0.2}, {u1, u2, u3, u4}, {t, 1, 10}]I am trying to solve four coupled nonlinear differential equations. But, everytime I am getting NDSolve::ndsz: At t == 2.0833315360868916`, step size is effectively zero; singularity or stiff system suspected. I have tried all the possible ways to solve such kind of problem with similar kind of problems available in stack. I want to get the value of g1,g2,g3 and g4 for large value of t i.e. 1 to 100 but I am getting only for small value of t? Could you please suggest me some way to sort out the issue?

Thank you

Huge Article Surplus — $1.99 for 800 words — 5 Second Article Delivery — Zero Spinning

image
Enter “blackhatdiscount” for 50% off
image
Enter “blackhatdiscount” for 50% off
image
image
New Feature: Also, Get all files in an HTML ready format 
Q&A
Can I buy more than 50 articles at once?
Yes. We can handle purchases of 1000’s of articles but require you to fill out this form Custom Order. 
What do you mean by 800-word and 1700-word average articles?
There are two article lengths to pick from: 500-1200 words and 1200 to 3000 words. On average, they contain 800 and 1700 words respectively. The 1700 word average articles are about 10% cheaper per 100 words compared to the 800 word avearge articles.
What is your TAT?
We write articles in advanced for you so that they can be delivered instantly. 
What is the quality of your articles?
You can view samples here
Each article is uniquely written. Topics are heavily researched by analyzing over 10 thousand articles on each topic. We then match the keyword density of Google’s top 10 results. This can result in medium quality articles that can be used on any website and are ideal for Google’s spiders. 
You don’t have the topic I am in need of, what can I do?
We are adding new topics weekly and new articles daily. If we don’t have the topic you are looking for please fill out this form Suggest a Niche
How unique are your articles?
Most articles are 100% unique on Copyscape
Skype Contact: pauldemott
NEW Topics Daily
LIST OF ALL CURRENT TOPICS
image

When does NDSolve issue zero step size error NDSolve::ndsz?

I want to detect directly when step size becomes "effectively" zero. The below example from the documentation throws the error message as expected:

s = {}; NDSolve[{(2 - f[x]) f'[x] == f[x], f[0] == 1}, f, {x, 0, 5}, StepMonitor :> AppendTo[s, x]];  NDSolve::ndsz: At x == 0.3862940268757776`, step size is effectively zero; singularity or stiff system suspected. 

The below code indicates that none of the actual steps taken has zero length.

AnyTrue[Differences@s, PossibleZeroQ]  (* False *) 

How does NDSolve decide that the step size is zero? I can of course capture the NDSolveValue::ndsz error, but I want to know when exactly (depending on what parameters) the error is issued. In some extreme cases, NDSolve may generate an InterpolatingFunction solution that has practically zero domain length (but not according to PossibleZeroQ).

Reset sliders to default (zero) when a PopupMenu item is selected

I am setting up a UI with sliders that are enabled or disabled according to the item in a PopupMenu. I have been trying to figure out how to reset the sliders to the default value of zero when I select another item from the PopupMenu. After reading the documentation I think that Refresh should do the trick but I am missing something. It seems that after refresh the sliders need to be updated but I cannot figure out how. Can you help? Please see the mwe below. I am using v 12.1.1.0. Thank you!

BU

(* Initialization section *) dMin = -500; dMax = 500; dStep = 0.1; aMin = 0; aMax = 500; aStep = 0.1;  PopupMenu[Dynamic[tType], {   {0, 0, 1, 0, 0, 0} -> "t1",   {1, 0, 1, 1, 0, 0} -> "t2",   {1, 0, 1, 1, 1, 1} -> "t3",   {1, 1, 1, 1, 1, 1} -> "t4",   {2, 1, 1, 1, 0, 0} -> "t5",   {3, 1, 1, 1, 0, 0} -> "t6",   {0, 1, 1, 1, 0, 0} -> "t7",   {0, 1, 1, 1, 1, 1} -> "t8"}]  Manipulate[Grid[{    {"a", Slider[      Dynamic[aa], {If[tType[[1]] == 3 , 1.5 bb, dMin],        If[tType[[1]] == 2, 1.5 bb, If[1.5 bb <= dMax, dMax, 1.5*dMax]],        dStep}, Enabled -> tType[[1]] > 0,       Appearance -> {Small, "UpArrow", "Labeled"},       Background -> LightBlue, ImageMargins -> 0]},    {"b", Slider[Dynamic[bb], {dMin, dMax, dStep},       Enabled -> tType[[2]] > 0,       Exclusions -> {If[tType[[2]] > 0, 0, None]},       Appearance -> {Small, "UpArrow", "Labeled"},       Background -> LightBlue, ImageMargins -> 0]},(*     excludes zero from types 4 t0 8 *)    {"c", Slider[Dynamic[cc], {dMin, dMax, dStep},       Enabled -> tType[[3]] > 0,       Appearance -> {Small, "UpArrow", "Labeled"},       Background -> LightBlue, ImageMargins -> 0]},    {"d", Slider[Dynamic[dd], {aMin, aMax, aStep},       Enabled -> tType[[4]] > 0,       Appearance -> {Small, "UpArrow", "Labeled"},       Background -> LightBlue, ImageMargins -> 0]},    {"e", Slider[Dynamic[ee], {dMin, dMax, dStep},       Enabled -> tType[[5]] > 0,       Appearance -> {Small, "UpArrow", "Labeled"},       Background -> LightMagenta, ImageMargins -> 0]},    {"f", Slider[Dynamic[ff], {aMin, aMax, aStep},       Enabled -> tType[[6]] > 0,       Appearance -> {Small, "UpArrow", "Labeled"},       Background -> LightMagenta, ImageMargins -> 0]}},   Frame -> Outer, ItemSize -> {{1, 21}}],   Dynamic[tType,    Refresh[{aa = 0, bb = 0, cc = 0, dd = 0, ee = 0, ff = 0},     TrackedSymbols :> {tType}]], AppearanceElements -> None] 

Recovery possibilities with Zero knowledge encryption

I have some encryption understanding however I fail to get my head around following scenarios. I would like to know if they are possible with a zero knowledge encryption system.

What the system can or can’t do can be added to the answer. Example:

  • The system needs to keep a encrypted copy of the key.
  • The user has to have the key on a USB stick.

In the end, all scenarios ask the same questions.

  • Can the user access his data?
  • Does the system know about his data?

Scenario 1: User logs in on a new computer. Does not have the key with him.

Scenario 2: User logs in on a new computer. Does have the key with him (e.g. USB stick).

Scenario 3: User lost his password. His identity has been verified and approved.

Scenario 4: New sub-users are assigned to the same resource.

Google Search and YouTube search change spelling to spelling with zero results

NOTE: How to remove "Did You Mean:" from Google Search? does not answer this question. The suggested fixes in this question is to set up FB, IG, and other social media pages. We have had these for months. We have 576 Instagram followers, 293 followers on Facebook, 17,425 views on Vimeo, Youtube, Pinterest and LinkedIn presence. Here is the response in a YouTube search:

enter image description here

Let’s be clear. If you search for my company name and product name YT changes the spelling to something that doesn’t exist and suggests a video with no matching result terms (using either spelling) disparaging OTHER luxury handbags, while leaving the viewer with the impression it is referring to our handbags.

Google

When a user searches for our business, Aslaen Vaugn, Google changes the spelling to Aslan Vaughn and displays these results:

enter image description here

If you misspell part of the name (aslan vaugn or aslaen vaughn), it shows my company at the top of the results. For the first few months it just seemed like it was taking some time to percolate, but over 7 months we have had 17,500 unique visitors and 90 backlinks.

enter image description here

The only results for Aslan Vaugn is the birth announcement of the second child of a musician in New Jersey. It is a Facebook post and has 14 likes. Google is favoring a spelling that has only two results with 14+ views over my company with dozens of results and tens of thousands of views.

How is this possible? An FB post with 14 likes is that much more popular than a business with 17,500 unique visitors and 40,000 page views (despite the Google obfuscation)? Do I have an enemy at Google? On other search engines my company covers the first few pages in results. Through Google, you cannot find our company no matter how many pages in you go. Unless you search for the term in quotes, "aslaen vaugn". In which case we cover the first few pages here like in the other search engines:

enter image description here

Include a leading zero in pagination

I’m new to WordPress Development and have been teaching myself over the last few months how to develop a theme from scratch. Normally I can figure issues out on my own through forums, but I can’t really find much on this one.

I’ve been trying to add leading zeros to my pagination if the number is less than 10.

I.e: < Newer 01 02 03 … 10 Older >

Here is my pagination code. Any pointers in the right direction would be appreciated!

if ( !function_exists('palfrey_pagination') ) { function palfrey_pagination( $  range = 5 ) {      if( is_singular() )         return;      // $  paged - number of the current page     global $  paged, $  wp_query;      // Stop execution if there's only 1 page.     if( $  wp_query->max_num_pages <= 1 )         return;       $  paged = get_query_var( 'paged' ) ? absint( get_query_var( 'paged' ) ) : 1;      if ( !$  max_page )         $  max   = intval( $  wp_query->max_num_pages );      if ( $  max_page > 1 )             if ( !$  paged ) $  paged = 1;       // Add current page to the array.     if ( $  paged >= 1 )         $  links[] = $  paged;       // Add the pages around the current page to the array.     if ( $  paged >= 3 ) {         $  links[] = $  paged - 1;         $  links[] = $  paged - 2;     }       if ( ( $  paged + 2 ) <= $  max ) {         $  links[] = $  paged + 2;         $  links[] = $  paged + 1;     }          // The pagination     echo "\n" . '<div class="content-block-common-large">                     <div class="block-wrap">                         <div class="inline-group flex-group relative align-center column-align-bottom">                             <div class="column responsive width-450">                                 <ul class="pagination display-block relative align-center width-1of1">' . "\n";       // Link to 'Newer' posts.     if ( get_previous_posts_link() ) {         printf( '<li>%s</li>' . "\n", get_previous_posts_link( '<div class="display-inline-block relative float-left"><span class="pagination-prev">Newer</span></div>' ) );     }else{     echo '<li><div class="display-inline-block relative float-left pointer-events-none" style="opacity: .6;"><span class="pagination-prev">Newer</span></div></li>';     }          // Link to first page, plus ellipses if necessary.     if ( ! in_array( 1, $  links ) ) {         $  class = 1 == $  paged ? ' class="active"' : '';           printf( '<li%s><a href="%s">%s</a></li>' . "\n", $  class, esc_url( get_pagenum_link( 1 ) ), '1' );           if ( ! in_array( 2, $  links ) )             echo '<li>…</li>';     }       // Link to current page, plus 2 pages in either direction if necessary.     sort( $  links );     foreach ( (array) $  links as $  link ) {         $  class = $  paged == $  link ? ' class="active"' : '';         printf( '<li%s><a href="%s">%s</a></li>' . "\n", $  class, esc_url( get_pagenum_link( $  link) ), $  link );     }       // Link to last page, plus ellipses if necessary.     if ( ! in_array( $  max, $  links ) ) {         if ( ! in_array( $  max - 1, $  links ) )             echo '<li>…</li>' . "\n";           $  class = $  paged == $  max ? ' class="active"' : '';         printf( '<li%s><a href="%s">%s</a></li>' . "\n", $  class, esc_url( get_pagenum_link( $  max) ), $  max );     }       // Link to 'Older' posts.     if ( get_next_posts_link() ) {         printf( '<li>%s</li>' . "\n", get_next_posts_link( '<div class="display-inline-block relative float-right"><span class="pagination-next">Older</span></div>' ) );     }else{     echo '<li><div class="display-inline-block relative float-right pointer-events-none" style="opacity: .6;"><span class="pagination-next">Older</span></div></li>';     }       echo "\n" . '           </ul>                         </div>                     </div>                 </div>             </div>' . "\n";       } } 

How to find lines of matrix that has the property of being zero everywhere except for 1 entry?

I am interested in finding the lines where all entries are equal to zeros except for one.

Example: Given the follwoing matrix:

\begin{bmatrix}0 &0 &3 & 8\ 0 & 4 & 0 & 0 \ 0 &1 & 0 & 1\end{bmatrix}

Only the second line verify this property.

Of course, the brute force way is to go over the entries and check them one by one. But I am wondering if there is another most efficient way I don’t know about.