## If an item produces the effect of a spell, can I dispel it?

Some magic items, like a Potion of Growth or Oil of Slipperiness, produce the effect of a spell. For example:

When you drink this potion, you gain the “enlarge” effect of the enlarge/reduce spell for 1d4 hours (no concentration required).

When a magic item produces the effect of a spell, can this effect be ended by dispel magic in the same manner as the actual spell?

(Note that I’m not asking about items that actually allow the user to cast spells, such as a Wand of Magic Missiles.)

## su produces “registered driver” messages

I tried to install my fingerprint reader and now each time I run sudo -i I see this list of messages:

\$   sudo -i [sudo] password for user: fp:debug [fp_init]  fp:debug [register_driver] registered driver upekts fp:debug [register_driver] registered driver aes3500 fp:debug [register_driver] registered driver aes4000 fp:debug [register_driver] registered driver aes2501 fp:debug [register_driver] registered driver aes2550 fp:debug [register_driver] registered driver uru4000 fp:debug [register_driver] registered driver vcom5s fp:debug [register_driver] registered driver upeksonly fp:debug [register_driver] registered driver aes1610 fp:debug [register_driver] registered driver aes1660 fp:debug [register_driver] registered driver aes2660 fp:debug [register_driver] registered driver vfs101 fp:debug [register_driver] registered driver vfs301 fp:debug [register_driver] registered driver vfs5011 fp:debug [register_driver] registered driver upektc fp:debug [register_driver] registered driver upektc_img fp:debug [register_driver] registered driver etes603 fp:debug [register_driver] registered driver vfs0050 fp:debug [register_driver] registered driver elan fp:debug [fp_exit] 

I don’t know how I caused this exactly. I think I compiled this: https://github.com/nmikhailov/Validity90 and installed some of these packages:

libbsapi policykit-1-fingerprint-gui fingerprint-gui

I was not able to get the fingerprint sensor working. How do I now get rid of these messages?

## The solution to my wind farm layout optimization using GA produces different results every time i run it. Is their a way to curb it?

Each layout consists of 1000 turbines or more and is ranked based on power produced.
The way my algorithm works is:-

>>Initial parents created(2 layouts) >>Crossover and Mutation of Initial Parents and population is created >>Calculation of power produced by each layout >>Sorting of layouts using power values >>Top 2 layouts producing max power selected for next generation >>The steps are repeated till termination criteria is reached 

each time I run the algorithm, I get a different configuration of layout. Can anyone help me out in reducing the ambiguity in the output?

## Magento 1 on Percona DB produces errors

We are trying to migrate our DB to MySQL 5.7 on Percona XtraDB cluster.

In the MySQL log file there are errors preventing some operations to be performed.

The errors visible with the current setting are of 2 types:

2019-06-24T08:00:03.187120Z 99531 [ERROR] WSREP: Percona-XtraDB-Cluster prohibits use of GET_LOCK with pxc_strict_mode = ENFORCING

or

2019-06-24T08:39:21.115870Z 100000 [ERROR] WSREP: Percona-XtraDB-Cluster prohibits use of DML command on a table (log_url) without an explicit primary key with pxc_strict_mode = ENFORCING or MASTER

Currently the DB cluster is set with

pxc_strict_mode=ENFORCING

Note, we have tried to set up a different mode and locked for stabilizing the BD using the following mode without success

pxc_strict_mode=PERMISSIVE

But the result is instability at the engine level ending in the whole database being unresponsive and requiring a reboot.

However when setting the mode to PERMISSIVE we have the following errors matching the one above:

2019-06-18T09:30:55.552852Z 753 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of GET_LOCK with pxc_strict_mode = PERMISSIVE

2019-06-18T09:30:55.570212Z 753 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of RELEASE_LOCK with pxc_strict_mode = PERMISSIVE

Or

2019-06-17T15:30:18.766308Z 764 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of DML command on a table (catalog_category_product_index_idx) without an explicit primary key with pxc_strict_mode = PERMISSIVE

2019-06-17T15:30:18.770449Z 764 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of DML command on a table (catalog_category_product_index_enbl_idx) without an explicit primary key with pxc_strict_mode = PERMISSIVE

2019-06-17T15:30:18.795257Z 764 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of DML command on a table (catalog_category_anc_categs_index_idx) without an explicit primary key with pxc_strict_mode = PERMISSIVE

2019-06-17T15:30:18.797970Z 764 [Warning] WSREP: Percona-XtraDB-Cluster doesn’t recommend use of DML command on a table (catalog_category_anc_categs_index_idx) without an explicit primary key with pxc_strict_mode = PERMISSIVE

Having this information shows that there are missing primary keys on at least these tables:

• catalog_category_product_index_idx

• catalog_category_product_index_enbl_idx

• catalog_category_anc_categs_index_idx

• … and possibly others

Can we add a primary key on these tables ? or is there a setting that I missed regarding the following configuration with the following environment ?

Environment is composed of:

o MySQL 5.7

o Percona XtraDB cluster

o Magento 1.9.4.1

## MySQL XOR produces incorrect results

Why does the expression conv('9000084e703720f9', 16, 10) ^ conv('801A93A5A18A773F', 16, 10) produces wrong result?

In a step by step explanation:

SELECT conv('9000084e703720f9', 16, 10); 

Result: 10376302674444755193

SELECT conv('801A93A5A18A773F', 16, 10); 

Result: 9230852725838346047

SELECT 10376302674444755193 ^ 9230852725838346047; 

Result: 1160411291139790790

But by this query:

SELECT conv('9000084e703720f9', 16, 10) ^ conv('801A93A5A18A773F', 16, 10)  

Result: 0

I don’t understand why does this return zero?

## Yeoman generator produces an old version of SPFx

I have Yeoman generator (@microsoft/generator-sharepoint) version 1.8.2, I can verify this by running: npm list --depth=0 -g .. When I try to run yo @microsoft/sharepoint , I noticed 2 things:

The wizard doesn’t show support for SharePoint 2019, so it only gives me the choice of SharePoint online only, or SharePoint 2016 onwards. The second thing is that the project scaffolded shows this:

    "@microsoft/sp-core-library": "1.5.1",     "@microsoft/sp-webpart-base": "1.5.1",     "@microsoft/sp-lodash-subset": "1.5.1",     "@microsoft/sp-office-ui-fabric-core": "1.5.1" 

What do I need to do to get the latest version of SPFx? (1.8).

## How to make an app that makes the flashlight respond to the music that the phone produces?

I want to create an app for android (Music Strobe type app) that makes the flashlight bounce to the beat of the song. When the beat is strong it will use the flash to the max when the beat slightly weaker it will use a slightly weaker flash. Basically, the flash is supposed to “dance” to the beat of the song. Is there any APIs anyone knows that could be useful?

I have tried to make it work with some classes Ive found online but they didnt work.

# Background

Let $$G(V,E)$$ be a graph.
Let $$S$$ be the set of all combinations of $$|V|$$ edges.
Let $$A$$ & $$B$$ be two subsets of $$S$$, where:

• each subset is a collection of all elements of $$S$$ that share a common “aggregate property”
• the aggregate properties of $$A$$ & $$B$$ are different
• $$|A| \gt 0$$
• $$|B| \gt 0$$
• $$|A \cap B| \geq 0$$
• $$A \not\subseteq B$$
• $$B \not\subseteq A$$

DEFINITION: Aggregate Property, $$P$$, of $$Q \in S$$
Given some $$Q \in S$$, one must examine every element in $$Q$$ in order to verify property $$P$$.

• Example for $$Q \in A$$: [sum of edges in $$Q$$] $$\leq 40$$
• Example for $$Q \in B$$: [edges in $$Q$$ form Hamiltonian Cycle in $$G$$]

Let $$\alpha$$ be any algorithm that returns an element in $$A$$, given $$G$$.
Let $$\beta$$ be any algorithm that returns an element in $$B$$, given $$G$$.

Each dot represents an edge in the graph $$G$$:

Reminder, the aggregate properties of A and B are not the same, thus:

Key Idea 1: Any algorithm which starts at Level 1 and ends at Level 2 and produces a set of edges with a unique relationship, A, must be an algorithm for α, and NOT β.

Let $$\gamma$$ be any algorithm that returns a set of edges with both properties A and B, and which doesn’t ensure one before the other (does not go to Level 3, as described below).
By definition, $$\gamma$$ is an algorithm for $$\alpha$$.
By definition, $$\gamma$$ is an algorithm for $$\beta$$.
Thus $$\alpha$$ and $$\beta$$ can be equal.
Since $$\alpha$$ and $$\beta$$ can be equal, A and B are no longer distinct, for they can be ensured using the same algorithm, $$\gamma$$.
Thus A and B are actually the same property.

Key Idea 2: If an algorithm, γ, which starts at Level 1 and ends at Level 2, produces a set of edges with 2 relationships, M and N, then M and N must be the same relationship.

In order to ensure 2 distinct properties, $$\gamma$$ must go to a 3rd Level:

So now, $$\gamma$$ has 2 options:

• Perform $$\alpha$$, then run $$\beta$$ (worst-case = $$|A|$$, must search for output of $$\alpha$$ that has $$B$$-Property)
• Perform $$\beta$$, then run $$\alpha$$ (worst-case = $$|B|$$, must search for output of $$\beta$$ that has $$A$$-Property)

# Question

Given the above background, is the time-complexity of any algorithm $$\gamma$$ (one that produces a set of edges in the intersection of $$A$$ and $$B$$, so that this produced set will have 2 aggregate properties) upper-bounded by $$|A|$$ or $$|B|$$?

If yes, and we demonstrate an $$A$$ and $$B$$ with exponential sizes in relation to the input graph, could we use this technique to show that $$\gamma$$ MUST take exponential time in the worst-case?

# Note Regarding k-SAT

This model does not apply to k-SAT because a solution to k-SAT must have only 1 aggregate property:

• truth values make a proposition True

Whereas a solution for TSP must have 2 aggregate properties:

• sum of edges $$\leq L$$
• edges form Hamiltonian Cycle in $$G$$

## Drawing several BeginArea inside a BeginScrollview (GUILayout) produces an unexpected behaviour

Well, I have a question with a GUILayout.BeginArea within a BeginScrollview.

        if (m_searchedItems?.Length > 0)         {             m_scroll = GlobalGUI.BeginScrollView(f_isEditor, m_scroll, viewSize);              for (int y = 0; y < rows; ++y)             {                 GUILayout.BeginHorizontal();                  for (int x = 0; x < columns; ++x)                 {                     // Show items thumbnails...                      var tTexture = GetThumbnail(item);                      Rect? texRect = null;                      if (tTexture != null) // Check if the texture is available or it's being requested                         texRect = GlobalGUILayout.DrawTexture(tWidth, tHeight, tTexture);                      // The method from above returns an Nullable<Rect> of the texture. (https://i.imgur.com/pizrwji.png)                     if (texRect.HasValue)                     {                         // Show title w/ marquee                         // .... Code ....                          var btnsRect = new Rect(texRect.Value.position + Vector2.up * (tHeight - 26), new Vector2(texRect.Value.width, 21));                          // Show buttons                         GUILayout.BeginArea(btnsRect, "aaaaa"); // "aaaaa" string is for a test                         {                             GUILayout.BeginHorizontal();                              if (GUILayout.Button(m_infoTexture, GUILayout.Width(21)))                                 GetInfo(item);                              if (GUILayout.Button("Install"))                                 DoInstall(item);                              GUILayout.EndHorizontal();                         }                         GUILayout.EndArea();                     }                 }                  GUILayout.EndHorizontal();             }              GlobalGUI.EndScrollView(f_isEditor);         } `

As you can see, I am trying to show a list of items within said BeginScrollview:

Of course, each must have two buttons to perform actions (line 30 of the code).

But, as you can see, in the image that I have attached, I have blueed the test string “aaaaa” so you can see that it is very highlighted, which gives me to understand that all the BeginArea are being drawn in the same position.

But what worries me most about this is that the buttons aren’t displayed.

However, if all this is implemented with the GUI class, instead of the GUILayout class this does not happen.

Which could be the problem?