SharePoint Classic view via URL parameter

Is it possible to force SharePoint to use Classic experience with URL parameters?

(For example https://companyname.sharepoint.com/Lists/ListName/AllItems.aspx?ClassicExperience=True)

There is a Bookmark list that we uses on a daily basis, but some of our custom developed pages are not properly showing in the Modern experience, and our colleges have to click on “Change back to old SharePoint” link every single time.

There is a link that leads to the Classic SharePoint:

<a class="LeftNav-notificationLink" role="menuitem" data-bind="attr: { href: $data.url, target: $data.openInNewTab &amp;&amp; $data.openInNewTab() ? '_blank' : null, tabindex: $component.isLeftNavVisible() ? 0: -1, 'aria-label': $data.altText }, visible: !$data.show || $data.show(), click: $component.onClick.bind($component), automation: $data.automationId, automationType: 'Link'" href="https://sharepoint.stackexchange.com/#" tabindex="0" aria-label="Kattintson vagy nyomja le az enter billentyűt, ha vissza szeretne térni a klasszikus SharePointra" data-automationtype="Link">
<span class="LeftNav-linkText" data-bind="text: $data.text">Vissza a klasszikus SharePointra</span>
</a>

Find parameter distribution how i know any initial value i must put?

Using your data and probability distribution from a previous question of yours, the following works fine on Mathematica 12.2 (Windows 10):

dist = ProbabilityDistribution({"CDF", Divide(1 - Exp(λ (1 - Exp((1 - Exp(-(x/α)^γ))^β))), 
    1 - Exp(λ - λ Exp(1)))}, {x, 0, ∞}, Assumptions -> {λ > 0, β > 0, α > 0, γ > 0})

data = {70, 90, 96, 97, 99, 103, 104, 104, 105, 107, 108, 108, 108, 
   109, 109, 112, 112, 113, 114, 114, 114, 116, 119, 120, 120, 120, 
   121, 121, 123, 124, 124, 124, 124, 124, 128, 128, 129, 129, 130, 
   130, 130, 131, 131, 131, 131, 131, 132, 132, 132, 133, 134, 134, 
   134, 134, 136, 136, 137, 138, 138, 138, 139, 139, 141, 141, 142, 
   142, 142, 142, 142, 142, 142, 142, 144, 144, 145, 146, 148, 148, 
   149, 151, 151, 152, 155, 156, 155, 156, 157, 157, 157, 157, 158, 
   159, 162, 163, 163, 164, 166, 166, 168, 170, 174, 201, 212};

mle = FindDistributionParameters(data, dist, {{λ, 47}, {β, 1.5}, {α, 20}, {γ, -4}})
(* {λ -> 2.91285, β -> 3.45368, α -> 133.646, γ -> 3.37814} *)

Show(Histogram(data, "FreedmanDiaconis", "PDF"),
  Plot(PDF(dist /. mle, x), {x, Min(data), Max(data)}))

Histogram and distribution fit

So you might want to try starting values closer to the maximum likelihood estimates or increase the maximum number of iterations (say, MaxIterations->5000).

rvalue parameter in C

I write this code

#include <iostream>
using namespace std;
class Foo
{

public:
    int a = 0;
    Foo()
    {
        cout << "ctor: " << this << endl;

    }
    ~Foo() {
       cout << "dtor: " << this << endl;
    }
};

Foo f()
{
    Foo foo;
    cout << "f " << &foo << endl;
    return foo;
}
void ff(Foo &&ffoo)
{
    cout << "ff " << &ffoo << endl;

}

int main()
{
    ff(f());
    std::cout << "Hello World!n";
}

output looks fine:

ctor: 0x7ffeda89bd7c
f 0x7ffeda89bd7c
ff 0x7ffeda89bd7c
dtor: 0x7ffeda89bd7c

but when I delete the ~Foo() like this:

#include <iostream>
using namespace std;
class Foo
{

public:
    int a = 0;
    Foo()
    {
        cout << "ctor: " << this << endl;
    }
    // ~Foo() {
    //    cout << "dtor: " << this << endl;
    // }
};

Foo f()
{
    Foo foo;
    cout << "f " << &foo << endl;
    return foo;
}
void ff(Foo &&ffoo)
{
    cout << "ff " << &ffoo << endl;

}
int main()
{
    ff(f());
    std::cout << "Hello World!n";
}

And I got this output:

ctor: 0x7fffd5c8bf4c
f 0x7fffd5c8bf4c
ff 0x7fffd5c8bf6c
Hello World!

why the address of ffoo is different from f? Isn’t it supposed to be the same ?

compile cmd is:

g++ tmp.cpp 
g++ --version
g++ (Debian 8.3.0-6) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.

termux – Emulate tsu when the device su binary doesn’t support command as a parameter

The stock su binary from the semi-officially rooted Meizu smartphone (Android 7, Flyme 7) does not support passing commands as parameters (–c option) so tsu fails with an error “invalid option — c”.
I’m trying to emulate the actions that tsu performs with a script that I manually should start after executing the su binary. The debug output of tsu revealed the environment variables and its values that tsu tried to set so I prepared the following script with them and I start the script with the source alias (in order to preserve the changes for the current session)

export PATH=/data/data/com.termux/files/usr/bin:/data/data/com.termux/files/usr/bin/applets:/system/bin:/system/xbin:/sbin:/sbin/bin
export ANDROID_DATA=/data  
export TMPDIR=/data/data/com.termux/files/home/.suroot/.tmp
export PREFIX=/data/data/com.termux/files/usr
export TERM=xterm-256color
export LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
export ANDROID_ROOT=/system
export HOME=/data/data/com.termux/files/home/.suroot

Is this the correct way to emulate tsu actions for termux to work correctly from the superuser? I see that some apps I installed from the general termux user work (mc, nano), but I suspect I can face an unexpected issue in the future. Probably there’s a more suitable way to achieve the same effect (when the su binary is too basic)?

PHP 7.2 error "warning count() parameter must be an array or an object that implements countable" [closed]

function wpsc_have_shipping_quote() {

    $has_quote = false;    
    global $wpsc_cart;

    if ( $wpsc_cart->shipping_quote_count > 0 || count( $wpsc_cart->shipping_quotes ) > 0 ) {    
        $has_quote = true;    
    }

    return $has_quote;
}

after update to PHP 7.2 – error in line 4 "warning count() parameter must be an array or an object that implements countable in wordpress"

function wpsc_have_shipping_quote() {

$has_quote = false;

global $wpsc_cart;

if ( $wpsc_cart->shipping_quote_count > 0 || count( $wpsc_cart->shipping_quotes ) > 0 ) {

$has_quote = true;

}
return $has_quote;
}

Update mongodb positional field with with another positional field passed as parameter into momentjs

I’m trying to update all documents in an array. I looked into positional operator $(), but the issue is I’m trying to update the field with the previous value passed to date library momentjs.
The query I tried and failed is

 await collection.update(
  {},
  {
    $set: {
      'activities.$().duration.startTime': moment(
        'activities.$().duration.startTime',
        'DD/MM/YYYY HH:mm:ss',
      ).toISOString(),
    },
  },
  { multi: true },
);

This sets startTime field as null. So my question is how can I pass the existing value of activities.$().duration.startTime to moment function.

parameter estimation – UMVU etimator for gamma distribution with unknown alpha

Given $X_1,X_2,…,X_n$ iid $gamma(α,β)$ with unknown $α$. What will be the “Uniform minimum variance unbaised” Estimator for $α$ and $β$.

If $α$ is known then we know the UMVUE for $1/β$ is $(nα-1)/(sum X_i)$. But can you please help with what if $α$ is unknown? i.e. what will be the estmator of $α$ and $β$.

google – What do I put in htaccess to create a 410 error page when a URL parameter is present?

You could do this using the following rewrite rule in .htaccess:

RewriteEngine on 
RewriteCond %{QUERY_STRING} searchkey
RewriteRule .* - (G,L)
  • .* means that it will do this for any URL on your site (as long as the condition of having “searchkey” in the query string is met)
  • - means to leave the URL alone and not change it
  • G means “Gone” — send the 410 status
  • L means “Last” — so that no other rewrite rules are executed

Since you have a custom 410 gone page, you could also use the following .htaccess directive to show it instead of the default 410 gone error page:

ErrorDocument 410 /410.php

performance tuning – How to set the parameter range before a symbolic calculation to speed up the calculation?

I am doing a tensor calculation with many parameters. Since there are several constant parameters though the journey, the calculation always takes a looooong time to complete, as mathematica tends to discuss all the conditions which are totally unnecessary, such as whether the parameter $epsilon$ is complex or not.
I only know using the Assumptions can include such paramater range, but it has to be used after the calculation in Simplify, which cant be used to speed up the calculation.

So how can I set the parameter range(like $epsilon$ is a real positive parameter) before the calculation to make it quicker? I suffered a lot and I’ve been tring for a whole day.Could anybody help me?

The electromagnetic field

To calculate the force

I’m sorry the mathematica codes with its special format cannot be copied here so I just show two simple pictures. It aims at working out the force of a electromagnetic wave, the first pic is about the field and the the second is the force. The only
variables are $rho,phi,z$,k and r, all of them are real, and the other symbol like $epsilon$ or c is just positive constant. This caculation can give a complicated solution with pages and conditions, but once I use Simplify and Assumptions, the software falls into endless running. I have no idea how to deal with it.