## real analysis – series convergence with an integral condition

$$A$$ is a bounded measurable set of the real line and $$m$$ is the lebesgue measure on $$A$$. Also, {$${f_n}$$} is a consequence of measurable non-negative functions defined on $$A$$ such that $$int_{A}^{} f_n^2dm le4$$, for eveny natural number $$n$$. Prove that $$sum_{n=1}^infty frac {f_n}{n^2}$$ is almost everywhere convergent on $$A$$.

Unfortunately, I have no idea to start with but the fact that $$sum_{n=1}^infty frac {1}{n^2}$$ is convergent. I am wondering if there is a theorem that can bridge the gap between sigma and integral in terms of convergence.

Any help would be highly appreciated.

## database – Use created year as condition in Entity Query

Try this function `get_nodes_by_authored_month_date('news', '2018-02')`

``````
use DrupalnodeNodeInterface;

/**
* @param string \$bundle_type
* @param string \$year_month
*
* @return array|int
*/
function get_nodes_by_authored_month_date(\$bundle_type = '' , \$year_month = '') {

\$full_date = date_parse_from_format('Y-m', \$year_month);
//- Get number of days of month
\$number_of_days_of_month = cal_days_in_month(CAL_GREGORIAN, \$full_date('month'), \$full_date('year'));
//- Get the timestamp of the first minute in the month
\$first_minute_of_month = mktime(0, 0, 0, \$full_date('month'), 1, \$full_date('year'));
//- Get the timestamp of the last minute in the month
\$last_minute_of_month = mktime(23, 59, 59, \$full_date('month'), \$number_of_days_of_month, \$full_date('year'));

\$query = Drupal::entityQuery('node')
->condition('status', NodeInterface::PUBLISHED)
->condition('type', \$bundle_type)
->condition('created', (\$first_minute_of_month, \$last_minute_of_month), 'BETWEEN')
->range(0, 10);

return \$query->execute();
}
```
```

## Google sheets: Count all value where condition

I’m trying to count how many “products” appear in my tables with the same value

I made this little example to explain what I want: Values excepted (only the count):

• Apple with value 1 = 2 (count)
• Apple with value 2 = 1 (count)
• Banana with value 4 = 2 (count)
• Banana with value 1 = 1 (count)

As you can see, I want to count how many “Apple” has value 1 in my two tables, how many “Apple” has value 2 etc…

With Google Sheets, I know how to count, but not how to get the value in the right cell.

## matrices – find maximum number of sections that satisfies the condition in a grid

Here is the description of a problem

Given an array of strings representing an $$N$$x$$N$$ grid of $$red$$ and $$blue$$ cells and a target color $$r$$ or $$b$$, partition the grid into $$N$$ sections of $$N$$ contiguous cells. The goal is to have the maximum number of sections where more than half of cells are of the target color. Return the sections as an array of arrays of strings representing the coordinates of the cells in each section.

For example, in a 3×3 grid, given

$$begin{pmatrix} b & r & r\ b & b & b\ b & b & r end{pmatrix}$$

and a target color of $$b$$ the expected return would be

$$begin{eqnarray} section&=&(2,1) (1,1) (1,2)\ section&=&(1,3) (2,3) (2,2)\ section&=&(3,1) (3,2) (3,3) end{eqnarray}$$

To solve the problem, what I wanted to try is to represent the matrix as graph and then perform these steps

1. Find all the (N-1)-hop neighbors and create arrays like $$((1,1), (1,2), (1,3))$$ for $$N=3$$
2. Find all combinations of those arrays that covers the whole matrix
3. Rank it somehow?
4. ???

(failed to come up with a solution for step 3 and below).

However I believe my approach would be too complex if for example N will become like 6, 7 etc, because it is basically a brute force. So I have been wondering if there is some existing algorithm that tackles the same problem?

## matrix – Testing a condition to replace elements of amatrix

I want to write a code that checks each element of a given matrix `C2` and in case they are’t 0 or 1 , replaces them with 1. My code is so far as follows and the code should does the following for any $$ntimes n$$ matrices. Any ideas?

``````C2 = Table[RandomChoice[{1, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 30], {j, 1, 30}];
For[i = 2, i < 10, i++, C3 = MatrixPower[C2, i]; C2 = C3 + C2]
``````

## dnd 5e – Does the Devil’s Sight eldritch invocation counter the Blinded condition?

### No, you must be able to see to be able to see normally in darkness.

The blinded condition says:

A blinded creature can’t see and automatically fails any ability check that requires sight.

If devil’s sight granted conditional immunity to the blindness condition, it would say so. As written, Devil’s Sight improves sight; if you are blind, there is no sight to improve.

The only thing Truesight does in this case is magnify the ability that was lost to blindness:

Truesight enhances one’s ability to see: through magical darkness, invisibility, illusions, shapechanges, and into the Ethereal (PHB p.185).

But the blindness condition now says “you can’t see. The sight through illusions, darkness, &c. which you so enjoyed just a moment ago, you don’t have anymore (PHB p.290, paraphrased).”

In similar fashion, Devil’s Sight only improves that sense which is lost entirely to blindness.

## IF THEN condition in Linear Program

I have the following condition in an LP problem. I have a variable $$x_i in i = 1,2,..7$$ and I need to constrain the problem via:

if $$x_1$$ >5 then $$x_2 leq 30$$

I’m stumped on how to formulate that with integer variables.

Thanks

## probability – Showing almost-sure convergence, given condition.

Let $$(Omega, F, P)$$ be a probability space with $$X_1,…:Omegato R$$ independent random variables. Take $$E(X_i)=0$$ for all $$iin N$$ and
$$sum_i E(X_i^2 chi_{{|X_i|le 1}} + |X_i| chi_{{|X_i|>1)})< infty$$

show $$sum_i X_i$$ converges $$P$$– almost everywhere.

Now I am thinking to use Kolmogorov’s three series theorem. I am struggling to convert the characteristic functions to probabilities – this is a method I havent been able to understand properly in class.

## queueing – If I have this condition, should I queue the listeners or the notification?

I’m trying to wrap my head around a Queue system. I have read many resources about it but I keep ghosted with this question.

If I have listeners that loops over a collection of users, to send a notification via FCM or APNS or Pusher or SocketIO, etc, for each one of them, and the Event which triggers the listener were be able to be called by anyone at anytime, which one should I queue? The Listener? or the Notification? or both?

Most of them are only explaining the essence of how they works and how they’re implemented, I understand the concept, but not about what to queue, when and why it should be queued. Though, I still learning, and I would like to know more about queueing in practice.

## dnd 5e – Does Devil’s Sight counter the Blinded condition in D&D 5e?

### No, you must be able to see to be able to see normally in darkness.

The blinded condition says:

A blinded creature can’t see and automatically fails any ability check that requires sight.

If devil’s sight granted conditional immunity to the blindness condition, it would say so. As written, Devil’s Sight improves sight; if you are blind, there is no sight to improve.