8 – Search views: How can I hide search results until the user submits the exposed form?

I have a fairly straightforward view, which exposes a simple keyword filter to the user.

Currently, when I first land on the page containing this view, all records are displayed (i.e., the search results are unfiltered).

How can I alter this behavior, so that no search results are displayed until the user has entered a keyword and submitted the form?

(I’m converting an old Drupal 7 site to Drupal 8. On the D7 site, the view does not show search results when I first land on the page. Is this a difference in behavior between the Views implementation in D7 and D8? I can’t find anything in the D7 site to suggest that this difference in behavior is caused by a module.)

When flying domestically in Thailand, which (origin airport, destination airport) results in a quarantine?

When flying domestically within Thailand, which (origin airport, destination airport) results in a quarantine, and if so what’s the quarantine conditions?

I’m mostly interested in origin airport = BKK/DMK or destination airport = BKK/DMK.

Poll Results: Preferred Virtualization Engine for Cheap VPS Hosting

On May 15th we asked our users to tell us which virtualization engine they most preferred as the basis of their cheap VPS hosting plans.  After 9 days of voting and 327 unique votes, the answer is in, and the community has decidedly voted in favor of KVM virtualization.

While voting will remain open we grabbed the results as of May 24th (after 9 days of voting and 327 votes).

Recently we’ve published a number of guides about different virtualization technologies, including KVM, Xen and OpenVZ. If you are not familiar with the differences you can start by reading a broad description of the three and then continue to learn more about KVM Virtualization followed by OpenVZ Virtualization.

Check out the results below:

poll results preferred virtualization engine for cheap vps

While it is not surprising that KVM Virtualization was the preferred hypervisor engine according to our users, what is surprising is the extent to which it led other options, including OpenVZ and Xen. Both VMWare and Hyper-V tend to be more on the enterprise side of the game, but even still, they both beat Xen. While the whole “low end box” era of cheap VPS hosting started with OpenVZ it is clear that the transition to dedicated resources and enhanced security/neighbor protections offered by KVM is well under way. A few year ago a 2GB RAM OpenVZ VPS was very exciting — even though it would have likely been RAM oversold many times over. Today, there are no shortage of great deals available on inexpensive KVM based VPS options, many of which now offer RAM allocations in excess of 2GB for less than $10/month.

If you are shopping for a cheap KVM based VPS, check out the latest offers on LowEndBox.

There are plenty of great OpenVZ VPS offers still available, too, should you prefer it.

Thanks to everyone who took a moment to vote and share their opinion on our Preferred Virtualization Engine Poll!

Related posts:

Poll: OpenVZ VPS, KVM VPS, Xen VPS or Other?

Poll: What do you use your VPS for?

Jon Biloh

I’m Jon Biloh and I own LowEndBox and LowEndTalk. I’ve spent my nearly 20 year career in IT building companies and now I’m excited to focus on building and enhancing the community at LowEndBox and LowEndTalk.

How can one customise library search results from the header search box?

As announced by Microsoft and discussed in this answer, the search box in the command bar has been removed from document libraries, leaving the header bar as the only place with a search box.

SharePoint library screenshot

When launching a search from this bar, the search results appear in the same view (rather than the Microsoft Search view, which only appears if the “Expand search to all items in this site” link at the bottom is clicked”). The page that’s opened appears to be the view with a query string appended – e.g. https://sitename.sharepoint.com/sites/groupname/Test/Forms/AllItems.aspx?view=7&q=searchterm

SharePoint library search results

I’d like to customise the results to promote particular content types.

I’ve tried so far:

  • adding a new result source and setting it as the default in the Microsoft 365 Admin Center
  • adding a query rule in the site settings

Nothing has had any impact so far on the results that appear. What settings need to be altered to have an effect on these results?

plotting – RegionFunction to clip ContourPlot3D results in unexpected shading

I am attempting to use RegionFunction to trim an implicit surface drawn with ContourPlot3D to only show the portion inside of a sphere (instead of the bounding box from PlotRange). However, when I attempt to do so, the region specified gets shaded in a little – which I do not want. Here’s a minimal example showing the issue,

x^2 + y^2 - z^4 - 1 == 0, 
{x, -10, 10}, {y, -10, 10}, {z, -10, 10},
PlotPoints -> 50, Boxed -> False, Axes -> False, 
RegionFunction -> Function({x, y, z}, x^2 + y^2 + z^2 < 25)

and a screenshot of it below.


The Mathematica documentation does not appear to show this shading of the region, and indeed when I copy/paste the example of a Plot3D with Regionfunction from the documentation it does not show up for me either. I think I have had it working before for ContourPlot3D as well, but cannot find an old example of mine. What is going on?

router – New gateway results in Google and Amazon security lockout, “device not recognized”

The cable company recently replaced my old gateway/wireless router. After the new gateway was installed (a “Touchstone TG1682G Telephony Gateway”, if it matters), both Google and Amazon required additional verification before I could log in to my accounts on their websites. Google gave me a message that my device was unknown or could not be verified and required that I either provide a backup email or phone to receive a confirmation code before proceeding. Amazon required me to enter an emailed code. AOL didn’t seem to notice or care.

But my actual device that I was using to connect to these websites has not changed. It is the same computer I have always used. My IP address probably changed with the new gateway, but the cable company has always assigned new IP addresses several times per year and it has never triggered a security lockout by Google or Amazon. Previously I would get the occasional e-mail notification that a sign-in was made on a new device (either “Linux” or “Windows” depending on which OS I was using), but nothing was ever triggered by getting a new IP.

Based on my understanding of a similar question asked on Quora it would be highly irregular if my router hardware were known to websites.

What about the installation of a new gateway could trigger account lockout protocols for Google and Amazon? Does anyone know what might be going on here?

functions – Prevent A Specific Custom Post Type Showing In WP Search Results Page

I’ve excluded certain pages from the WP Search with the code below in my functions.php file.

I also need to exclude a custom post type called ‘sites’.

I can’t seem to find the custom post type equivalent of the post__not_in argument ?

I don’t want to remove it in the custom post type code itself under public => false because I still want it to have its own url etc.

Does anyone know how to remove a specific custom post type from showing up in WP Search?

Any help would be wonderful !


function tp_remove_pages( $query ) {
  if ( ! $query->is_admin && $query->is_search && $query->is_main_query() ) {
    $query->set( 'post__not_in', array( 11,84,118,115,123,132 ) );
add_action( 'pre_get_posts', 'tp_remove_pages' );

How to add position to products in product listing comes from search results in magento 1?

Hope you are doing good.

You can do it by following the below steps:

  1. Click on a category in the category tree to display the category related information.
  2. Then, click on “Category Products” tab that will display the category products grid.
  3. In the last column of product grid set/update the product position.
  4. If you see no product listed in the “Category Products” tab, it means that the category has no products assigned to it. So click the “Reset Filter” button to list all products, now select the products first and then in the last column of the product grid set the product position.
  5. Last, save the category.

Besides, The product position is a global attribute and there is a table with the relation between category id and product ids and also the position for that product in that category. The table is: catalog_category_product.

I hope that works for you.

Last you can also check for Magento DevDoc but its for version 2.

Make Google search results link directly to linked page

Google search results usually link to google.com/url with a bunch of gibberish.

How can I make them link directly to the result?

I’d like a solution that works for both Chrome and Firefox

differential equations – Mathematica vs. MATLAB: why am I getting different results for PDE with non-constant boundary condition?

I am trying to solve the same PDE in Mathematica and MATLAB, $nabla^2phi=0$ where $phi=f(x,y)$ It has a Dirichlet boundary condition on the left, a section of non-constant Neumann boundary condition on the right and zero flux everywhere else. The non-constant boundary condition is defined by $frac1{sigma_i}left(frac{sigma_i}{4e}frac{partial mu}{partial x}-I_eright)$ where $mu=f(x,y)$ was previously solved for and all other variables are constants. I have developed code for to solve this PDE in both Mathematica and MATLAB however, they do not produce the same results, and I do not know which code is incorrect.

Below is the full Mathematica code:

e = 1.60217662*10^-19;
sigi = 18; 
F = 96485; 
n = -0.02; 
c = 1;
pO2 = 1.52*10^-19;
Ie = -(2*F)*(c*pO2^n);
mu2 = -5.98*10^-19;
l = 10*10^-6;
y1 = 0.01;
y2 = 0.0025;
y3 = 0.0075;
meshRefine(vertices_, area_) := area > 10^-12;
mesh = ToElementMesh(
   DiscretizeRegion(ImplicitRegion(True, {{x, 0, l}, {y, 0, y1}})), 
   MeshRefinementFunction -> meshRefine);
bcmu = {DirichletCondition(mu(x, y) == 0, (x == 0 && 0 < y < y1)), 
   mu(x, y) == 
    mu2, (x == l && 
     y2 < y < y3))};
solmu = NDSolve({Laplacian(mu(x, y), {x, y}) == 
    0 + NeumannValue(0, 
      y == 0 || 
       y == y1 || (x == l && 0 <= y <= y2) || (x == l && 
         y3 <= y <= y1)), bcmu}, 
  mu, {x, y} (Element) mesh);
bcphi = DirichletCondition(phi(x, y) == 0, (x == 0 && 0 < y < y1));
A = (Ie - sigi/(4*e)*(D(mu(x, y) /. solmu, x) /. x -> l))/(-sigi);
solphi = NDSolve({Laplacian(phi(x, y), {x, y}) == 
     0 + NeumannValue(0, 
       y == 0 || 
        y == y1 || (x == l && 0 <= y <= y1) || (x == l && 
          y3 <= y <= y1)) + 
      NeumannValue(-A((1)), x == l && y2 < y < y3), bcphi}, 
   phi, {x, y} (Element) mesh);
DensityPlot(phi(x, y) /. solphi, {x, 0, l}, {y, 0, y1}, 
 PlotLabel -> "Phi vs. x and y", PlotLegends -> Automatic)

The code produces this result for phi:

Mathematica result

And here is the MATLAB code:

% Define constants
e = 1.60217662*10^-19;
sigi = 18;
F = 96485;
n = -0.02;
c = 1;
pO2 = 1.52*10^-19;
Ie = -(2*F)*(c*pO2^n);
mu2 = -5.98*10^-19;
l = 10*10^-6;
y1 = 0.01;
y2 = 0.0025;
y3 = 0.0075;

% Rectangle is code 3, 4 sides, followed by x-coordinates and then y-coordinates
R1 = (3,4,0,l,l,0,0,0,y2,y2)';
R2 = (3,4,0,l,l,0,y2,y2,y3,y3)';
R3 = (3,4,0,l,l,0,y3,y3,y1,y1)';
geom = (R1,R2,R3);
% Names for the two geometric objects
ns = (char('R1','R2','R3'))';
% Set formula
sf = 'R1+R2+R3';
% Create geometry
g = decsg(geom,sf,ns);

% Create mu geometry model
mumodel = createpde;

% Apply boundary conditions

% Solve PDE for mu
solmu = solvepde(mumodel);

% Create phi geometry model
phimodel = createpde;

% Make sure initial condition is suitable

% Define nonconstant Neumann boundary condition
bcfun = @(location,state)(sigi/(4*e)*evaluateGradient(solmu,l,location.y)-Ie)/sigi;

% Apply boundary conditions

% Solve PDE for phi and plot results
solphi = solvepde(phimodel);
phi = solphi.NodalSolution;
title('Phi vs. x and y')

The MATLAB code produces this as the results for phi:
MATLAB result

Which code is correct? Where is the error?