## finite element method – Problem computing a cylindrical Heat equation with a parameter alpha

i have been struggling to compute a particular instance of cylindrical 3D heat equation.

Here is my code :

``````(*parameter*)
(Alpha) = 0.1;

eq = D(u(t, r, (Theta), z), t) ==
D(u(t, r, (Theta), z), r, r) + 1/r D(u(t, r, (Theta), z), r) +
1/(Alpha).b2r.b2 D(u(t, r, (Theta), z), (Theta), (Theta)) +
D(u(t, r, (Theta), z), z, z);

(*initial and boundary conditions*)

ic = {u(0, r, (Theta), z) == Exp(-r)};
bc = {u(t, 10^-6, (Theta), z) == 1,
u(t, 1, (Theta), z) == 0,
PeriodicBoundaryCondition(u(t, r, (Theta), z), (Theta) == 0,
TranslationTransform({2*Pi, 0})),
PeriodicBoundaryCondition(u(t, r, (Theta), z), (Theta) == 0,
TranslationTransform({2*Pi*(Alpha), 0})),
Derivative(0, 1, 0, 0)(u)(t, 1, (Theta), z) == 1,
Derivative(0, 1, 0, 0)(u)(t, 10^-6, (Theta), z) == 0};

(*solution*)

sol = NDSolve({eq, ic, bc},
u(t, r, (Theta), z), {t, 0, 1}, {r, 10^-6, 1}, {(Theta), 0,
2*Pi}, {z, 0, 1});

(*plot*)

Manipulate(
Plot3D(sol, {r, 0, 1}, {(Theta), 0, 2 Pi}), {t, 0, 10}, {z, 0, 1});

``````

The problem is, i keep getting an error like this :

``````NDSolve::femcnmd: The PDE coefficient {{-1,0,0},{0,-(1/(Alpha).b2r.b2),0},{0,0,-1}} does not evaluate to a numeric matrix of dimensions {3,3} at the coordinate {0.500002,3.14159,0.5}; it evaluated to {{1.,0.,0.},{0.,1/(Alpha).b2r.b2,0.},{0.,0.,1.}} instead.

``````

I am a relatively new mathematica user, so i do not see any issue that could arise from evaluating the coefficients at the point {0.500002,3.14159,0.5}.

Can you guys help me understand ? Thank you kindly.

## functional analysis – Can we use the duality notation such that the second variable is an element of the measure space?

I read article New Sequential Compactness Results for Spaces of Scalarly Integrable Functions by Erik J. Balder, on page 8 : Author defined the function $$a: Ttimes Eto mathbb{R}$$ by the usual duality between $$E$$ and $$E^*=F$$ $$( ⟨.,.⟩)$$ such that:
$$a(t,x)=langle x, trangle$$
But normally the second variable $$(tin T)$$ must be an element of dual of \$E£, right? Why does the author make this notation?

## TypeError: \$element[response.method] is undefined in Media Library Form API Element module. How to create custom field image media d8?

When I insert selected image, there is an error show in command
TypeError: \$element[response.method] is undefined ajax:618]
How to create custom field image media?

## combinatorics – Prove that there is an element of S that is present in at least three of the subsets \$A_1, A_2, ldots , A_7\$

Suppose that $$A_1, A_2, ldots , A_7$$ is a collection of seven subsets of a set $$S$$, each of size
3, and every two subsets $$A_i$$ and $$A_j$$ $$(i ne j)$$ have exactly one element in common.
Prove that there is an element of S that is present in at least three of the subsets
$$A_1, A_2, ldots , A_7$$.

## 8 – Setting value of form element from \$form_state not working

I need to track previous values of a few form elements on a form to detect when they change to invalidate some other options on the page. Essentially, if the value of these fields change a field that controls pagination should reset.

I’m trying to accomplish this with this:

``````\$values = \$form_state->getValues();
\$form('element1') = (
'#title' => \$this->t('Element 1'),
'#options' => (
// Omitted for brevity
),
'#weight' => '0',
'#ajax' => (
'callback' => (\$this, 'my_callback'),
'disable-refocus' => true
)
);

// dump(\$values('element1'));
\$form('element1_previous') = (
'#type' => 'value',
'#value' => (isset(\$values('element1'))) ? \$values('element1') : 'none',
);
``````

No matter what I do the value of `\$values('element1_previous`) is `none`. If I uncomment the `dump()` statement right before it I can see the value of `\$values('element1')` changing each time AJAX is submitted so the value is there.

If I do something like:

``````\$form('element1_previous') = (
'#type' => 'value',
'#value' => rand()
);
``````

I can see `\$values('element1_previous')` being set to a different integer each AJAX submission. I just can’t assign the value of `\$form('element1')` to that field.

What am I doing wrong? Is there a better way I could handle this?

## html – Localization of multi style text element in Vue

After following up this question, I’m thinking if there’s a better/shorter way to write this text element that has part with different style, while allowing localizations:

``````<p>
<span class="has-text-grey">{{ \$store.releaseList != null ? \$store.releaseList.length : 0 }}</span>
<span> versions released</span>
</p>
``````

With `vue-i18n`:

``````<p v-html="\$t('downloads.releases.table.versions-total')
.replace('{0}', '<span class=has-text-grey>{1}</span>')
.replace('{1}', \$store.releaseList != null ? \$store.releaseList.length : 0)">
</p>
``````

The localizable text would be `{0} versions released`.

I could set the localizable text to `<span class=has-text-grey>{0}</span> versions released`, but that would make the life of the translators (usually people without knowledge about HTML) a bit more difficult.

Is there any better built in way to add support for localizations in a multi-styled text?

## USB Flash Disk with Security Element

I am thinking of buying USB flash disk with Security Element(stores Private-Key/Secret-Key/X.509-Certificates) and some encrypted data(8 Megabyte). The disk has to be protected against cloning and possibly maintains logs of insert history with UNIX timestamp & USB Host ID when inserted.

I found YubiKey & NitroKey, but they do not have additional storage. Is there a USB Device like that satisfy above requirements.

(Or) Is there any cost effective SoC+Security Element Over USB with flash storage available to implement my requirement using Opensource?

Thanks

## javascript – jQuery get index of .active element, but with reference to its original siblings

I am toggling an `active` class to an object in jquery in a grid like so :

``````\$(".cinema-seats .seat").on("click", function () {
\$(this).toggleClass("active");
}
``````

Basically, if I have a 3×3 grid of boxes, and click on 2 boxes randomly, they will be assigned active classes. Now, I want to get the index of the active boxes, but with respect to the original 3×3 grid.

For example,

``````   box 1(active)       box2             box3
box 4               box5(active)     box6
box 4               box5             box6
``````

Now, as output, I am expecting to get 1,5 as they are the indexes of the active classes with respect to the boxes.

This is a small example, I want to do this with a 7×14 grid, arranged into columns and rows and have only one class => “.seats” in common. Again, I want to get the index (n-th child) of the active boxes with respect to all the seats.

Codepen – https://codepen.io/divi7/pen/zYvbbVN

## javascript – How to toggle selected or clicked element not all

Am trying to toggle only clicked element and adding some class to it but it’s applying to all.
How can i do that?.any suggestion would be helpful.thank you

``````<li>
Wordz
<label class="checkbox">
<input type="checkbox" />
<span class="secondary"></span>
</label>
</li>
<li>
Phraser
<label class="checkbox">
<input type="checkbox" />
<span class="secondary"></span>
</label>
</li>

\$("li").click(function(e){
\$(".checkbox span").toggleClass("checked");
});
``````

## list manipulation – Enumerating over matrix element values in Table

I have a $$N$$ dimensional array $$M$$, and a function $$f({M_{i}})$$ in terms of the array elements, where each matrix element $$M_{i}$$ can be 0 or 1. I’d like to construct a table

``````Table(f({M_{ij}}), {M_{1},0,1},{M_{2},0,1},...,{M_{N},0,1})
``````

For a given N, I can write down the code to construct the table, but for general N, it there a convenient way to write the above code? Namely, I’d like to keep N as an input variable.

As an example, let us use

``````n=3;
Mat=Table(M(i),{i,1,n});
``````

and define f as the sum of all the elements in Mat. so the table I want to construct is

``````Table(Sum(M(i),{i,1,n}), {M(1),0,1},{M(2),0,1}, {M(3),0,1})
``````

The outcome is

``````{{{0, 1}, {1, 2}}, {{1, 2}, {2, 3}}}
``````

Of course, when I change n to other values, I need to rewrite the code for the table. So there should be a way for us to construct the table without modifying the code.