## PHP warning: in_array () expects parameter 2 to be an array, given a string

I cannot understand it. my journal keeps filling up
/includes/functions.php on line 700

line 700

if ( \$cam->\$item == '' . \$value . '' ) {
Code (markup):

## sharepoint online – How does the OverrideViewXml parameter work with ViewXml in RenderListDataAsStream in the rest API?

I am working to get data from the SharePoint list using the RenderListDataAsStream endpoint.
What I do is first get all the views defined for the list and display them in a drop-down list on the user interface, then when the user selects the view

• I get the ListViewXML for this view
• Create a custom filter query something like ...

then pass this ListViewXML as ViewXML and custom filter like OverrideViewXml in body parameters for the RenderListDataAsStream rest call.

From here it says that OverrideViewXml is intended for

Specifies the replacement XML to combine with View CAML. Applies only to the Request / Where part of the CAML view.

I want to know exactly how OverrideViewXml works in conjunction with ViewXml. When I specify ViewXML, the OverrideViewXml request is ignored or does not work. When I specify only OverrideViewXml and not ViewXml, the OverrideViewXml query works. For now, for me, the results do not come with any combination (whether "ANDing" or "ORing") of OverrideViewXml with ViewXML.

For rest calls, I use the PNP JS library (2.0.3) and the solution is in SPFX

## st.statistics – How to find the maximum likelihood estimate when the value of the estimate is outside the parameter range

Given that X1, …, Xn are independent and identically distributed Poisson variables (λ), we know that the maximum likelihood estimator of λ = X̄.

Suppose that X̄ = 2, and if λ can only take values ​​in (0,1), then what is the maximum likelihood estimate of λ?

## 7 – Why do D7 form constructors have a \$ form parameter?

In Drupal 7, the first parameter of a form creation function is \$ form.

When implementing a form creation function, you have the option of either adding elements to this existing table and returning it, or creating a new \$ form table, deleting which was passed to the function. In my experience, these two options generally work well.

What's the point? Is there ever a case where this parameter is necessary?

I think I vaguely remember that this is somehow relevant when a form is rebuilt, so it would be the old form .. but I really don't know what to do with it.

Note: The same question already exists for Drupal 8, but it seems to be a policy here that we need separate questions for D7 and D8. I was going to answer it for D7, and I realize that it would be irrelevant in question D8.

## magento2 – Data upgrade .. SQLSTATE[HY093]: Invalid parameter number: the parameter was not defined, the request was: INSERT IN

when i run an insert sql command in "UpgradeData.php", this gives me this error, can someone tell me where the problem is here?

if(version_compare(\$context->getVersion(), '1.0.2', '<')) {
\$query = "INSERT INTO authorization_rule(role_id,resource_id,permission) VALUES (:role_id,:ressource_id,:permission)";

\$setup->getConnection()->query(
\$query,
(

':role_id' => 5,
':resource_id' => 'Magento_Sales::unhold',
//':priviliges' => null,
':permission' => 'deny'
)
);
\$setup->getConnection()->query(
\$query,
(
':role_id' => 3,
':resource_id' => 'Magento_Sales::unhold',
//':priviliges' => null,
':permission' => 'deny'

)
);
}

the error is:

SQLSTATE (HY093): Invalid parameter number: the parameter was not defined, the request was: INSERT INTO authorization_rule (role_id, resource_id, permission) VALUES (: role_id ,: resource_id ,: permission)

## graphics – Parameter space for a theory

I was trying to learn how to plot parameter spaces.

For example, if I have a theory with a free parameter

$$g (z) = alpha (1 + z) ^ 2$$

I know you can plot the function ass function of $$z$$and get something like this ($$alpha = 1$$)

But I have another parameter which is a function of $$alpha$$, Let's say $$Omega (z) = alpha ^ 2 / (1 + z)$$. And I've seen that some people do this kind of plotting, it's called parameter space plots, you know how to do it?

## 2013 – List parameter not provided for connection of the Web Part

I am new to SP and my goal is to have a list, multiple qChartViews will display the list data and a DateFilter web part to select the date range for all charts.
I created a list and set the list parameter via SPD 2013 according to How do I compare two dates in the "Date Filter" Web Parts ?.

But in step 9, when I click on (any existing web part), the parameters added in the list (StartDate, EndDate) are missing in the list of connections, see the picture. What am i doing wrong?

I have several qChartView web parts and they are visible in the connection list, but the parameters of the list are not.

## Mysql error – mysql_num_rows () expects parameter 1 to be a resource, boolean given

I start playing with mysql, then I decided to edit some things, study and others, with an error in the code that I have spent hours and that I have not was able to solve, I searched in several places but I did not find anything that could solve my problem, the error, as already said in the title, is this one

Erro: mysql_num_rows() expects parameter 1 to be resource, boolean given

Line: 100```

Código da linha 98 até 107
function get_total_rows() {
\$tmp_result = mysql_query(\$this->sql);
\$all_rows = mysql_num_rows(\$tmp_result) or die(mysql_error(tmp_result));
if (!empty(\$this->max_rows) && \$all_rows > \$this->max_rows) {
\$all_rows = \$this->max_rows;
\$this->outstanding_rows = true;
}
mysql_free_result(\$tmp_result);
return \$all_rows;
}

## Add more query parameter to the wordpress url

As soon as someone clicks on an anchor tag in my website, I plan to redirect to the same page containing the information added via two URL query parameters, and then access it with the superglobal \$ _GET, as is generally done. I do this in wordpress.

Now I'm following exactly the instructions explained here https://developer.wordpress.org/reference/functions/add_query_arg/, which means I added both parameters via the wp function add_query_arg (). The link is perfectly constructed, but the site is not recognized! (Error 404 produced). If I do exactly the same thing but with a single parameter (using exactly the same syntax), it reloads the same page with the query parameter in the link, so with only one parameter, wordpress recognizes the page perfectly. Anyone with the same problem ?? No commas or other syntax issues.

\$previousMonth = date("m",mktime(0,0,0,\$month-1,1,\$year));
\$previousYear = date("Y",mktime(0,0,0,\$month-1,1,\$year));
array(
'month' => \$previousMonth,
'year' => \$previousYear
)
);
\$calendar .= "";

It doesn't work (error page 404, however with the two query parameters correctly displayed in the correct URL ;? Month = valuemonth & year = valueyear) .. However, interestingly, it works:

\$previousMonth = date("m",mktime(0,0,0,\$month-1,1,\$year));
\$previousYear = date("Y",mktime(0,0,0,\$month-1,1,\$year));