## visas – Taiwan maximum stay rules with reentry

As a US passport holder, you’re “visa-exempt” and will generally be granted 90 days on arrival, no questions asked:

The nationals of the following countries are eligible for the visa
exemption program, which permits a duration of stay up to 90 days: …
U.S.A. …

Now, making a quick visit to another country for the sole purpose of renewing your visa is known as a “visa run”. Most countries will get suspicious if you do this too often, but fortunately, anecdotal evidence for Taiwan seems to indicate that they don’t care:

According to experiences on this forum, you can continue to do this as
long as you like. Of course, like anything, Immigration has the final
say, but as long as you keep your nose clean (ie. don’t overstay your
visa, don’t commit any felonies, etc.) you should be fine.

(courtesy “Steve4nLanguage” on Forumosa, the definitive Taiwan forum)

1. No
2. No

All that said, I wouldn’t rely on this for more than a few renewals. If you’re planning on staying in Taiwan for a longer time, you’d definitely best be off working out some sort of “real” visa that actually allows you to work legally.

## algorithms – Maximum Circular Subarray sum

This is a question from the book Algorithms by Jeff Erickson.

Suppose A is a circular array. In this setting, a “contiguous subarray” can be either an interval A(i .. j) or a suffix followed by a prefix A(i .. n) · A(1 .. j). Describe and analyze an algorithm that finds a contiguous subarray of A with the largest sum.
The input array consists of real numbers.

My approach:

There are two possibilities

1.) No Wrapping around (We can use Kadane’s Algorithm)

2.) Wrapping around(ie; Starting index of the subarray is greater than the ending index) (I have doubt in this case)

Now return the maximum of two cases as result.

For the second case, searching on the internet provided an approach without proof.

The approach is to find the subarray with minimum sum and subtract it from the sum of the entire array (ie; sum(A) – min_subarray_sum(A)). How is this solution correct?

Link for the method used in the second case: https://www.geeksforgeeks.org/maximum-contiguous-circular-sum/

## algorithms – Path with maximum coins in directed graph

You can solve your problem in linear time w.r.t. the size of your graph $$G$$.

Start by computing, in $$O(n+m)$$ time, the strongly connected components $$C_1, C_2, dots, C_h$$ of $$G$$.
Next, construct a new graph $$G’ = (V’, E’)$$ from $$G$$ by identifying each strongly connected component $$C_i$$ into single vertex $$v$$ having $$k(v) = sum_{j in C_j} k_j$$ coins. Then, compute a topological order $$v_1, v_2, dots, v_h$$ of the vertices in $$G’$$. This requires time $$O(h + |E’|) = O(n+m)$$.

Consider the vertices in reverse topological order and compute, for each vertex $$v_i$$, the maximum number of coins $$eta(v_i)$$ that can be collected starting from $$v_i$$. This can be done as follows: if $$v_i$$ has no outoging edges in $$G’$$ then $$eta(v_i) = k(v_i)$$, otherwise:
$$eta(v_i) = k(v_i) + max_{(v_i, v_j) in E’} eta(v_j).$$

This requires time proportional to the number $$delta(v_i)$$ of outgoing edges of $$v_i$$. The overall time required to compute all values $$eta(v_i)$$ is then $$Oleft(h + sum_{i=1}^{h} delta(v_i) right) = O(h + |E’|) = O(n + m)$$.

Finally, return $$max_{i = 1, dots, h} eta(v_i)$$.

## Increase Maximum In-Call Volume – Earpiece and Speaker

I would like to increase the maximum in-call volume for the speaker and earpiece during calls.

The Huawei P40 Pro is capable of much higher volumes during media playback but the volume seems to be restricted for in-call volume levels.

Using the setedit android app, there are the following database table entries:
“volume_voice” “12”
“volume_voice_earpiece” “13”
“volume_voice_speaker” “15”

If I edit these entries, will that increase the maximum in-call volume? If so, to what value?

I have tried ‘volume booster’ apps but they do not affect in-call volumes.

## dnd 5e – Does reduction of maximum hit points stick to the form it is applied to?

Following up on How does Max-HP reduction affect wild-shaped/polymorphed creatures?, which states:

Damage taken in animal form doesn’t affect your original form’s HP unless you’re dropped to 0 HP in animal form and there’s excess damage. Nowhere is it suggested that max-HP reduction would work any differently. Because Wild Shape/Polymorph gives you a new pool of HP, only that pool is affected by the reduction.

## Context

A druid gets seduced by a succubus. They kiss while the druid is in bear form – this is not hypothetical as yesterday exactly this had happened. The druid gets lowered Maximum Hit Points because of this forced romance. So according to the linked Q&A, the reduction would only apply to the bear form.

## Question

If the druid reverts back to normal, the HP reduction is not active anymore. What if the druid wild shapes another time, back into a bear: does it get a fresh “pool of HP”, or does the Reduced Max HP stay with its bear form until it gets “cured”?

In other words: are shapeshifters actually really resilient against abilities that reduce maximum hit points?

## Example

For clarity, let’s use these numbers:

1. Druid: 45 HP
2. Wild Shapes into Brown Bear: 34 HP, but reduced to 10 Maximum HP (after two kisses).
3. Druid reverts back to normal: 45 HP
4. Wild Shapes back into Brown Bear: 34 HP, or still at 10 HP?

## linux – How to make window maximum on VirtualBox and how to install KDE on CentOS 8.1?

Installed CentOS 8.1 on VirtualBox 6.1.

Have installed Guest Additions(Devices -> Install Guest Additions CD image…) to CentOS, but after reboot, it still can’t make maximum size.

The second time I tried to do again, it said

Why?

Another, its default desktop environment is gnome, I want to install KDE on it. But tried these ways all failed.

sudo yum groupinstall 'KDE' 'X Window System'
Module or Group 'KDE' is not available.
Module or Group 'X Window System' is not available.
Error: Nothing to do.

sudo yum groups install "KDE Plasma Workspaces"
Module or Group 'KDE Plasma Workspaces' is not available.
Error: Nothing to do.

Where can I find the official way?

## dnd 5e – What is the maximum number of Cantrips you can get by 20th level?

How to get the most, 38, cantrips (on the side of not-viable): (You only miss out on 6 and a blaster doesn’t need Shillelagh, Green-Flame Blade, Booming Blade, or Lightning Lure. The other two I didn’t include are Spare the Dying and Encode Thoughts, but you can substitute any of these 6 where you like)

## Classes:

You may want to shuffle cantrips with shared lists around to land your attack spells on your primary casting ability or get the cantrips that I didn’t choose, for this list I’ve assume Charisma.

• Warlock 4 (The Celestial, Pact of the Tome): Light, Sacred Flame, Eldritch Blast, Magic Stone, Toll the Dead, 3 cantrips in your Book of Shadows✝ +8
• Sorcerer 1: Acid Splash, Chill Touch, Ray of Frost, Shocking Grasp +4
• Cleric 1 (Arcana Domain): Word of Radiance, Guidance, Resistance, Sword Burst, Poison Spray +5
• Bard 10 (College of Lore): Thunderclap, Blade Ward, Friends, Mending, Primal Savagery, Thorn Whip, Mage Hand, Message +8
• Druid 2 (Circle of the Land): Infestation, Control Flames, Druidcraft +3
• Wizard 2 (School of Illusion): Minor Illusion, Mold Earth, Gust, Create Bonfire +4

✝ See Races for which ones to choose.

## Feats:

• Magic Initate: Two cantrips✝ +2
• Spell Sniper: One cantrip✝ +1

✝See Races for which ones to choose.

## Races:

• There are multiple races that work for this build and which one you choose determines which options you select for your feats and Book of Shadows. You want to select attack spells so that they coincide with your primary casting ability. Frostbite and Fire Bolt are fully interchangeable in every list. +1

Elf (High)

High elf gives you one wizard cantrip (choose Fire Bolt) and sets your primary casting ability to Intelligence (this is where your 1 ASI should go to reach 18 Intelligence).

Tiefling gives you Thaumaturgy and sets your primary casting ability to Charisma or Intelligence (choose either, this determines whether you choose Wizard or Bard/Sorcerer for your feats).

• Choose Wizard or Bard for Magic Initiate to get Dancing Lights and
Fire Bolt or Vicious Mockery
• Choose Wizard or Sorcerer for Spell Sniper to get Frostbite
• Your Book of Shadows should contain Produce Flame, Shape Water, and
whichever you didn’t get from Magic Initiate

Half-Elf (Variant)

Half-Elf (Variant) gives you the option to get the High-Elf Cantrip feature (choose Fire Bolt if going Intelligence or Dancing Lights if going Charisma or Wisdom) and sets your primary casting ability to Intelligence, Wisdom, or Charisma (choose any, this determines your choices for your feats).

The Devil’s Tongue variant Tiefling gives you Vicious Mockery and sets your primary casting ability to Charisma or Intelligence (choose either, this determines whether you choose Wizard or Sorcerer for your feats).

Drow gives you Dancing Lights and sets your primary casting ability to Charisma.

Fire genasi gives you Produce Flame and sets your primary casting ability to Intelligence.

Water genasi gives you Shape Water and sets your primary casting ability to Wisdom.

Yuan-Ti Pureblood gives you Poison Spray and sets your primary casting ability to Charisma or Intelligence (choose either, this determines whether you choose Wizard or Bard/Sorcerer for your feats).

• Choose Wizard or Bard for Magic Initiate to get Dancing Lights and
Fire Bolt or Vicious Mockery
• Choose Wizard or Sorcerer for Spell Sniper to get Frostbite
whichever you didn’t get from Magic Initiate
• Replace Poison Spray with Shape Water in the Wizard section.

## Magic Items:

While you can’t know the other two possible cantrips, you can gain access to them through attuning to the following magic items:

• Staff of the Magi: This gets you Mage Hand so you can choose a different spell for Magical Secrets. Since this also gets you light, you could choose The Undying patron instead of The Celestial for Spare the Dying instead of Sacred Flame. +1
• Ring of Shooting Stars (for non-Drow): This one is more limited as you can only use Dancing Lights in dim light or darkness with it but its lets you choose Prestidigitation or True Strike instead of Dancing Lights in all the places you would usually choose Dancing Lights under Race. +1 ish

To make this build semi-viable ,you would have to learn the feats from a special trainer instead of from ASI (DMG 231).

This would allow your primary casting ability to be brought to 20 and 1 secondary ability to be increased once.

## complexity theory: logic behind a single tape NTM that solves the TSP in \$ O ({n} ^ 4) \$ maximum time

I was reading the classic text "Introduction to Theory of Automata, Languages ​​and Computing" by Hofcroft, Ullman, Motwani, where I came across an assertion that a "single tape NTM can solve TSP in $$O ({n} ^ 4)$$ maximum time "where $$n$$ is the length of the input given to the turing machine (an instance of the TSP). The authors have assumed the coding scheme as follows:

The TSP problem could be expressed as: "Given this graph $$G$$ and limit $$W$$ , does $$G$$ have a hamiltonian weight circuit $$W$$ or less?"

Let's consider a possible code for the charts and the weight limits that might be the input. The code has five symbols, $$0$$, $$1$$, the left and right parentheses, and the comma.

1. Assign integers $$1$$ through $$m$$ to the nodes.

2. Start the code with the value of $$m$$ in binary and weight limit $$W$$ in binary, separated by a comma.

3. If there is a border between nodes $$i$$ and $$j$$ with weight $$w$$, site $$(i, j, w)$$ in the code integers $$i$$, $$j$$ and $$w$$ they are binary encoded. The order of $$i$$ and $$j$$ within a border, and the order of the borders within the code are irrelevant. Therefore, one of the possible codes for the graph in Fig. With limit $$W = 40$$ is

$$100, 101000 (1, 10, 1111) (1, 11, 1010) (10, 11, 1100) (10, 100, 10100) (11, 100, 10010)$$

The authors go to the claim in the following way:

It appears that all ways of solving TSP involve testing essentially all cycles and calculating their total weight. By being smart, we can eliminate some obviously bad choices. But it seems that no matter what we do, we must examine an exponential number of cycles before we can conclude that there are none with the desired weight limit. $$W$$ , or to find one if we are not lucky in the order in which we consider the cycles.

On the other hand, if we had a non-deterministic computer, we could guess a permutation of the nodes and calculate the total weight for the node cycle in that order. If there were a real non-deterministic computer, no branch would use more than $$O (n)$$ steps if the input was long $$n$$. In a multitape $$NTM$$, we can guess a permutation in $$O ({n} ^ 2)$$ steps and check your total weight in a similar amount of time. Therefore, a single tape $$NTM$$ you can solve the TSP in $$O ({n} ^ 4)$$ time at most.

I cannot understand the part of the previous paragraph in bold. Let me focus on the points of my problem.

1. What do they mean that the branch would not take more than $$O (n)$$ ?
2. In a multitape $$NTM$$How can we guess a permutation in $$O ({n} ^ 2)$$ Steps?
3. How are we getting to the final? $$O ({n} ^ 4)$$ ?

I do not understand the logic or the calculation of complexity, since very little is written in the text.

## Maximum number of words per article?

I found some links without the end of the articles. What is the maximum number of words that can be published?