sharepoint online – How to sort by name with the Highlighted Content Web Part

The Highlighted Content Web Part built in SharePoint Online allows for us to set a custom query and several sort options below it.

enter image description here

So far that is working for me, but I noticed that none of the bottom sorting options allow us to sort results by their name (i.e. document library titles).

Is there a way we can enforce sorting by name, in either ascending or descending order) within the Query text box?

web part – SharePoint Online – Is it possible to provide custom formatting for Highlighted Content webpart List Layout

Out of the box Highlighted content web part does not support custom JSON formatting.

You can only Choose either of default layout: Grid, List, Filmstrip, or Carousel.

However there is a SPFx web part sample, developed by community members which supports custom HTML templates.

You can find it at: Content Query web part

fa.functional analysis – Is radial part of a Schwartz class function also in Schwartz class?

Let $finmathcal{S}(mathbb{R}^n)$, Schwartz class. Consider the function $g$ defined on $(0,infty)$ by $$g(r)=int_{S^{n-1}}f(rw)dmu(w),$$
where $dmu$ is the normalised surface measure of $S^{n-1}.$

1)Is $sup_r|r^kg(r)|<infty,$ for any $kinmathbb{N}$?

  1. Is $ginmathcal{S}((0,infty))?$

Answer of only (1) will also be appreciated.

dnd 5e – If I get access to a spell attack that’s NOT part of a spell, can I use it when I take the Attack action?

Some creatures have entries in their stat block that are classified as ‘melee spell attack’, or ‘ranged spell attack’, without actually being tied to the casting of a spell. Some PC subclasses also get some of those, notably the Way of the Sun Soul and the Circle of Stars, but they are framed in such a way that still leaves no doubt as to when you can use it (with the Attack action, for the Monk, and as a bonus action on your turn, for the Druid). So let’s say I get access to the former, monster-like spell attacks.

  1. Can I use it when I take the Attack action?
  2. If not, is the reason that they are listed as ‘Actions’ on the creature’s stat block? So just like I can only use the Circle of Stars Archer feature as a bonus action, this would leave me with an Action and not a general combat option. It’s probably this, but I still need clarification about point 3.
  3. The rules for the Attack action state: “With this action, you make one melee or ranged Attack”. Nowhere here it says ‘weapon attack’. So even if the only attack option for a PC still is given by holding a weapon or having the possibility to make an unarmed strike, would this allow me to make a spell attack as a part of it if such an option were available to me outside of explicitly permittive wordings (as I said, I understand that casting a spell is its own thing, using a feature like the Archer form is its own thing, etc.).

I hope I made my question clear.

Validating REST API requests against previous requests as part of a larger process

I am building a REST API for warehouse inventory picking.

I have a very shallow understanding of REST, so to me that just == stateless and try to make your URL mappings nouns instead of verbs.

The picking process looks like this:

  1. Scan QR on a the shipping instruction sheet which contains an order number along with all SKU’s and their quantities. This could be
    thought of as an aggregate for the entire picking transaction, kicking
    off the order as “in progress”.

  2. Iterate the following steps until all SKUs are picked

    2.a: Scan QR on the physical location being picked from

    2.b: Scan QR on the inventory container at the location

    2.c: Scan QR on the customer label that will be attached to the inventory container

  3. Scan QR on the physical delivery location and drop off the order

Each one of these steps has it’s own API endpoint and needs to validate things like

  • Does the order number match the order this user is currently picking?
  • Is this location allowed to be picked from for this order number?
  • Is this a valid inventory container for the order? (SKU not already picked, SKU actually on the order, correct quantity, that sort of thing)
  • Does the SKU on the customer label match the SKU that was previously scanned on the inventory container?

I don’t understand how I could create a stateless REST API that meets these requirements. Without state, how do I validate the integrity of every request to make sure the order is being picked correctly?

I had the thought that maybe I’ll just have the client pass in the current state of the order on every request (giving me all the data I need to validate a request) but then that assumes I actually trust the client to maintain the correct state, which of course is a bad idea.

Or maybe I could maintain the state of the order on a backend database, and have the client pass me the order number on every request to look it up? This just seems like state with extra steps.

Or maybe I need to move past the idea that this HAS to be a stateless system and break the rules of REST?

Thanks in advance for any advice!

stored procedures – SQL Server Management Send Mail as Part of a Job

I have a SQL Job that I would like to send an email through, but for some reason I can’t get any details on why the email is not sending. This code works as expected when executed in the query window, and SQL Server Agent will also send error emails to me, so my email profile seems to be set up correctly. The code:

EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'MailProfile',
@recipients = 'myaccount@emailcom',
@subject = 'Bad Data Report',
@query = N' USE Database;
   DECLARE @yesterday date = getdate() - 1;  select * from Timecards WHERE Date = @yesterday AND (DailyHours > 24.1 OR DailyHours < 0 ) ',
@exclude_query_output = 1,
@attach_query_result_as_file = 1,
@query_result_header = 1,
@query_attachment_filename = 'BadDataQuery.txt'

Following some advice from similar issues on this site, I tried looking through sysmail_allitems and sysmail_faileditems, but neither log any attempts to send. I also created a stored procedure that I had the job call as a roundabout way to send the email, but that also did not send an email nor leave an error. Any ideas what might be going on?

number theory – the piecewise goes wrong caused by a very small imaginary part (maybe)

I define a piecewise function Lens(x_,y_), which contains Subscript(Y, i). Y() is a different function for different values of i.
But some Y() calculations will produce a small imaginary part of 0.000000I, which will tell me when I run my segmented function Less::nord: tried to use 37344.8-3240.47i for an invalid comparison. and the stack trace 30102.9 + 0. I <= 31825 < 37344.8 - 3240.47 I.
And then I take my piecewise function Lens(x_,y_) and convert it to an array LensArray and plot it using the MatrixPlot function. The MatrixPlot result is correct.

The imaginary part is supposed to be extremely small, so if I put Abs() in front of Y() or Chop() in front of Y() it shouldn’t matter, but it does make a big difference when I MatrixPlot.
So I guess at some points the imaginary part greatly affects the compare of the piecewise function, but if I Plot Y() alone, the function can be plotted, which means that the imaginary part of Y() is small enough to be ignored. I’m not quite sure why the piecewise function is making this kind of comparison: Yrange((i)) <= y < Yrange((i + 1)) indicates it’s an invalid comparison.

And then I check the matrix of LensArray, and I see that the matrix is fine, but when I take the discrete Fourier transform of the matrix of LensArray it tells me that Fourier::fftl : LensArray is not a non-empty list, it's not a rectangular array of numeric quantities.
I checked the stack trace, but I see the matrix LensArray is really an array of numbers.

So how can I take the Fourier to the LensArray correctly?

The defining function of LensArray and MatrixPlot

δ = 1.2131226805013586 10^-6;
β = 4.75349804 10^-8;
χ = -2 δ + 2 I β;
δ1 = -1.2131226805013586 10^-6;
δ2 = (1.2131226805013586 10^-6)/(1 - 1.2131226805013586 10^-6);
f = 5151736.70155;

xStart = -50;
xEnd = 50;
Δx = 1;
Nx = (xEnd - xStart)/Δx + 1;
Nz = 2000 + 1;
Maxz = 50000;

   i) = ((-1)/9) (q1((i))^2 - q1((i)) q2((i)) + q2((i))^2), {i, 1, 
Table(Subscript(Bxr, i) = 
   Module({δs}, δs = 
     If(OddQ(i), δ1, δ2); ((-(q1((i)) - 
            q2((i))))/(4δs)) x^2 + (1/54) (q1((i)) + 
        q2((i))) (9 q1 ((i)) q2((i)) - 2 (q1((i)) + q2((i)))^2)), {i, 
   1, 62});
Table(Subscript(β, i) = 
   ArcCos(Subscript(Bxr, i)/(-Subscript(Axr, i))^((3/2))), {i, 1, 62});
Table(Subscript(Y, i) = 
   Abs(-(2 Sqrt(-Subscript(Axr, i)) Cos(
         Subscript(β, i)/3) - (1/3) (q1((i)) + q2((i))))), {i, 
   1, 62});
Len1 = {χ, 
   0 <= y < (Sqrt(x^2 + f^2) - f)/δ + 10 && 
    0 < y < Yrange((1)) && -50 <= x <= 50};

Lens(x_, y_) = 
      Subscript(Y, i) + Apcie((i)) <= y < 
        Subscript(Y, i + 1) + Apcie((i + 1)) && 
       Yrange((i)) <= y < Yrange((i + 1)) && -50 <= x <= 50}, {i, 1, 
      61, 2})));

Lensarray = Array(Lens, {Nx, Nz}, {{xStart, xEnd}, {0, Maxz}});
MatrixPlot(Abs(Lensarray), ColorFunction -> "Monochrome", 
 PlotLegends -> Automatic)


The definition of the matrix:





If you want to look at the function Subscript(Y, i) separately:

Print("Q1 = ", DecimalForm(q1 = 122500. - 517.194735, {20, 6}));

Print("Q2 = ", DecimalForm(q2 = 114200., {20, 6}));
Print("A24 = ", 
   A24 = 97.001875 (122500. - 517.194735)/122500., {20, 6}));
δ = -1.2131226805013586 10^-6;
Axr = -1/9 (q1^2 - q1 q2 + q2^2);
Bxr(x_) := -(q1 - q2)/(4 δ) x^2 + 
   1/54 (q1 + q2) (9 q1 q2 - 2 (q1 + q2)^2);

β(x_, bxr_) := ArcCos(bxr(x)/(-Axr)^(3/2));
Y(x_, β2_) := 
  2 Sqrt(-Axr) Cos(β2(x, Bxr)/3) - 1/3 (q1 + q2);
Xd0 = 2 (-δ/(q1 - q2))^(1/2) (Bxr(0) + (-Axr)^(3/2))^(1/2);
DecimalForm(Y(A24/2, β), {12, 6})
Plot(-Y(x, β), {x, -Xd0, Xd0})

The imaginary part was answered,but I still can’t think of a solution to the above Fourier problem.

How to check for a part of a string in a class NoneType in python?

I have an object with class ‘NoneType’ for which I want to write a condition.
Here are 4 examples of my NoneTypes but in my dataset there are 100 possible combinations:


I want to write the following condition: if NoneType contains (‘Text1’ AND ‘Variant2’) OR (‘Text2’) OR (‘Variant3’) then Feature = True

How could I solve this?

Thank you in advance!

Determining if there is a password for the private part of the certificate

Is it possible to somehow unambiguously determine that the private key container has a password? I just need to know if there is a password or not.

Replacement of QueryString web part in SharePoint Modern UI

Is there any replacement of QueryString Web Parts in Modern UI? SPFx is the last option.