Does this magic item require that you already have the ability to use the feature that it modifies?

Last night the party was adventuring in Curse of Strahd.
In the previous session they had acquired the module-specific magic item

This item can be attuned to by a good creature. In last night’s session an NPC was able to attune to the item, unlocking its powers (emphasis mine):

Augury. You can use an action to cast an augury spell from the icon, with no material components required. Once used, this property can’t be used again until the next dawn.

Bane of the Undead. You can use the icon as a holy symbol while using the Turn Undead or Turn the Unholy feature. If you do so, increase the save DC by 2.

Cure Wounds. While holding the icon, you can take an action to heal one creature that you can see within 30 feet of you. The target regains 3d8 + 3 hit points, unless it is an undead, a construct, or a fiend. Once used, this property can’t be used again until the next dawn.

If I am reading this item correctly, anyone that can take an action can use Augury or Cure Wounds feature. The power is written in the format, ‘if you have an action, you use the action and the item grants you this ability’, even if you could not previously cast an augury or cure wounds, or even if you did not have Spellcasting ability.

However, it appears to me that what is granted by the Bane of the Undead feature is not the ability to Turn Undead, but rather a modification of that ability (+2 DC, use this as a holy symbol), to creatures that already have that feature. That is, in this sense "can use" and "can take" are granting you the ability, but "while using" requires that you already have the ability to do so. (This was important since the NPC in question did not inherently have the Turn Undead feature).

Am I interpreting this language correctly?

A good answer will show a similar example in a less ambiguous case. While this question is specifically about the 5e Curse of Strahd, I am open to an answer showing how that particular item ‘is supposed to work’ in a previous version of the module.

What happens when the feat Born of the Three Thunders modifies thunderhead?

The feat Born of the Three Thunders (CAr 76) reads, in part,

When you cast a spell with either the electricity descriptor or the sonic descriptor that deals hit point damage, you can declare that spell to be a spell of the three thunders, with half its damage dealt as electricity damage and half dealt as sonic damage. In addition, the spell concludes with a mighty thunderclap that stuns all creatures that take damage from the spell for 1 round unless they succeed on a Fortitude save, then knocks stunned creatures prone unless they succeed on a Reflex save (both saves at the same DC as the base spell).

It’s clear the feat is intended to work on instantaneous spells, but a few electricity spells and sonic spells that inflict damage have durations other than instantaneous. The one I’m interested in is the 1st-level Sor/Wiz spell thunderhead [evoc] (SpC 219), which has the electricity descriptor, has a 1-round-per-level duration, and says that it

creates a small thundercloud over the subject’s head. The cloud moves with the subject, following it unerringly even if he becomes invisible or leaves the region. In every round of the spell’s duration, a miniature bolt of lightning leaps from the thundercloud to strike the subject. Each bolt deals 1 point of electricity damage that is negated by a successful Reflex save.

Here’re the questions:

  1. Which of the following is true: When the miniature lightning bolts from spell thunderhead, when modified by the feat Born of the Three Thunders, strike a foe…
    • only the first miniature lightning bolt will trigger the effects of the feat Born of the Three Thunders.
    • each miniature lightning bolt will trigger the effects of the feat Born of the Three Thunders.
  2. Which of the following is true: At least one miniature lightning bolt from spell thunderhead, when modified by the feat Born of the Three Thunders, will…
    • have an equal chance (a coin toss) of inflicting either 1 point of electricity damage or point of sonic damage.
    • inflict 1 point of electricity damage and 1 point of sonic damage (because even if halved minimum damage is 1).
    • inflict 0 points of damage (because half of 1 rounded down is 0).

Note: There’s probably an argument that says the spell thunderhead, when modified by the feat Born of the Three Thunders, doesn’t do anything as the miniature lightning bolts inflict the damage and those come from the thundercloud which is created by the spell, and the thundercloud does no damage. I’d rather not entertain that possibility as it gets into the differences between the conjuration and evocation schools of magic. To avoid such arguments, assume that the feat Born of the Three Thunders actually has an effect when applied to the spell thunderhead. Thanks.

“Who Cares?”
A buddy wants to play an electricity-chucking dude. And while dragonfire adept and warlock are interesting, a wizard with the feat Storm Bolt (CM 47) serves this purpose, too, and is… um… a wizard. So, yeah. In looking for ways to make electricity better, the feat Born of the Three Thunders makes electricity attacks more versatile, which is awesome. The feat Mark of the Dauntless (Dra 142) later, and the Wiz6 can do pretty well, shocking folks all day long if he keeps at least 1 Born of the Three Thunders lightning bolt prepared. The thunderhead thing arose because I wanted an interesting 1st-level electricity spell that could be Born of the Three Thunders. (By the way, I know the Storm Bolt feat and the Born of the Three Thunders feat don’t interact. It’s just a theme thing.)

How do I create an HTTP PUT request that modifies the resource in many ways

I have a NodeJs backend that interacts with MySQL database. Let us assume that I have a schema similar to this:

Book   id   name   Author   id   book_id   name 

So, I have two tables named Book and Author having 1-M relationship between them such that 1 book can have multiple authors.

Now, I have designed a GET request for a particular book which takes a book_id as a parameter and return its details

  endpoint: http:api.some_domain.com/book/34    response:    {      book_id: 34      name: "Stack Exchange Essentials"      author: [        {          id: 1,          book_id: 34,          name: "John"        },        {          id: 2,          book_id: 34,          name: "Henry"        }      ]   } 

Now, my goal is to design a PUT request for a book resource that will be responsible for:

  1. Updating a book name
  2. Updating the authors’ name
  3. Removing the existing author
  4. Addition of a new author

How do I handle the above problem?

  • Should I create a separate PUT and PATCH requests to handle full and partial update of the resource?

  • Should I handle author deletion in a separate DELETE request

  • If I handle everything in 1 single request, should I expect client to send me the full updated resource?

Please note that I have used Book and Author here for simplicity, but in reality I have different resources. Also note that an Author cannot be directly fetched without a book.

Alter table default character set modifies the rows in MySQL 5.6

I am using MySQL 5.6 and I want to modify the default encoding of one table (from latin1 to utf8) WITHOUT modifying the existing columns and rows. Based on documentation I have tried the following command:

ALTER TABLE mytable DEFAULT CHARACTER SET utf8; 

It modified the default character set encoding of my table and did NOT modify the collation of the columns, as expected, BUT I was really surprised to see: Query OK, 32141 rows affected (6.31 sec) Records: 32141 Duplicates: 0 Warnings: 0

Except “32141 rows affected”, the results are as expected as you can see below:

MySQL> select count(*) from mytable; +----------+ | count(*) | +----------+ |    32141 | +----------+ 1 row in set (0.01 sec) 
MySQL> show table status like 'mytable'; +-----------------------+--------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+---------+ | Name                  | Engine | Version | Row_format | Rows  | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation       | Checksum | Create_options | Comment | +-----------------------+--------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+---------+ | mytable | InnoDB |      10 | Compact    | 16723 |          20798 |   347815936 |               0 |     21561344 |  15728640 |           NULL | NULL        | NULL        | NULL       | utf8_general_ci |     NULL | partitioned    |         | +-----------------------+--------+---------+------------+-------+----------------+-------------+-----------------+--------------+-----------+----------------+-------------+-------------+------------+-----------------+----------+----------------+---------+  
MySQL> show create table mytable; CREATE TABLE `mytable` (   `ID` varchar(255) NOT NULL,   `COL1` double DEFAULT NULL,   `COL2` longtext CHARACTER SET latin1,   `COL3` datetime DEFAULT NULL,   `COL4` varchar(255) CHARACTER SET latin1 DEFAULT NULL,   `COL5` int(11) DEFAULT NULL,   `COL6` datetime DEFAULT NULL,   `COL7` varchar(255) CHARACTER SET latin1 DEFAULT NULL,   `COL8` datetime(3) NOT NULL,   `COL9` int(11) NOT NULL DEFAULT '-1',   `COL10` int(11) DEFAULT '0',   `COL11` double DEFAULT '0',   PRIMARY KEY (`ID`,`COL9`),   KEY `idx1` (`COL7`,`COL3`,`COL6`),   KEY `idx2` (`COL1`,`COL4`,`COL3`,`COL6`),   KEY `idx3` (`ID`,`COL3`,`COL6`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 /*!50100 PARTITION BY RANGE (`COL9`) (PARTITION p0 VALUES LESS THAN (1) ENGINE = InnoDB,  PARTITION p1 VALUES LESS THAN (2) ENGINE = InnoDB,  PARTITION p2 VALUES LESS THAN (3) ENGINE = InnoDB,  PARTITION p3 VALUES LESS THAN (4) ENGINE = InnoDB,  PARTITION p4 VALUES LESS THAN (5) ENGINE = InnoDB,  PARTITION p5 VALUES LESS THAN (6) ENGINE = InnoDB,  PARTITION p6 VALUES LESS THAN (7) ENGINE = InnoDB,  PARTITION p7 VALUES LESS THAN (8) ENGINE = InnoDB,  PARTITION p8 VALUES LESS THAN (9) ENGINE = InnoDB,  PARTITION p9 VALUES LESS THAN (10) ENGINE = InnoDB,  PARTITION p10 VALUES LESS THAN (11) ENGINE = InnoDB,  PARTITION p11 VALUES LESS THAN (100) ENGINE = InnoDB,  PARTITION p12 VALUES LESS THAN (101) ENGINE = InnoDB,  PARTITION p13 VALUES LESS THAN (102) ENGINE = InnoDB,  PARTITION p14 VALUES LESS THAN (103) ENGINE = InnoDB,  PARTITION p15 VALUES LESS THAN (104) ENGINE = InnoDB,  PARTITION p16 VALUES LESS THAN (105) ENGINE = InnoDB,  PARTITION p17 VALUES LESS THAN (106) ENGINE = InnoDB,  PARTITION p18 VALUES LESS THAN (107) ENGINE = InnoDB,  PARTITION p19 VALUES LESS THAN (108) ENGINE = InnoDB,  PARTITION p20 VALUES LESS THAN (109) ENGINE = InnoDB,  PARTITION p21 VALUES LESS THAN (110) ENGINE = InnoDB,  PARTITION p22 VALUES LESS THAN (111) ENGINE = InnoDB,  PARTITION p23 VALUES LESS THAN (200) ENGINE = InnoDB,  PARTITION p24 VALUES LESS THAN (201) ENGINE = InnoDB,  PARTITION p25 VALUES LESS THAN (202) ENGINE = InnoDB,  PARTITION p26 VALUES LESS THAN (203) ENGINE = InnoDB,  PARTITION p27 VALUES LESS THAN (204) ENGINE = InnoDB,  PARTITION p28 VALUES LESS THAN (205) ENGINE = InnoDB,  PARTITION p29 VALUES LESS THAN (206) ENGINE = InnoDB,  PARTITION p30 VALUES LESS THAN (207) ENGINE = InnoDB,  PARTITION p31 VALUES LESS THAN (208) ENGINE = InnoDB,  PARTITION p32 VALUES LESS THAN (209) ENGINE = InnoDB,  PARTITION p33 VALUES LESS THAN (210) ENGINE = InnoDB,  PARTITION p34 VALUES LESS THAN (211) ENGINE = InnoDB,  PARTITION p35 VALUES LESS THAN MAXVALUE ENGINE = InnoDB) */ 
MySQL> show full columns from mytable; +--------------------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+ | Field                    | Type         | Collation         | Null | Key | Default | Extra | Privileges                      | Comment | +--------------------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+ | ID                       | varchar(255) | latin1_swedish_ci | NO   | PRI | NULL    |       | select,insert,update,references |         | | COL1                     | double       | NULL              | YES  | MUL | NULL    |       | select,insert,update,references |         | | COL2                     | longtext     | latin1_swedish_ci | YES  |     | NULL    |       | select,insert,update,references |         | | COL3                     | datetime     | NULL              | YES  |     | NULL    |       | select,insert,update,references |         | | COL4                     | varchar(255) | latin1_swedish_ci | YES  |     | NULL    |       | select,insert,update,references |         | | COL5                     | int(11)      | NULL              | YES  |     | NULL    |       | select,insert,update,references |         | | COL6                     | datetime     | NULL              | YES  |     | NULL    |       | select,insert,update,references |         | | COL7                     | varchar(255) | latin1_swedish_ci | YES  | MUL | NULL    |       | select,insert,update,references |         | | COL8                     | datetime(3)  | NULL              | NO   |     | NULL    |       | select,insert,update,references |         | | COL9                     | int(11)      | NULL              | NO   | PRI | -1      |       | select,insert,update,references |         | | COL10                    | int(11)      | NULL              | YES  |     | 0       |       | select,insert,update,references |         | | COL11                    | double       | NULL              | YES  |     | 0       |       | select,insert,update,references |         | +--------------------------+--------------+-------------------+------+-----+---------+-------+---------------------------------+---------+ 

My connection parameters are as follows:

MySQL> show variables where variable_name like '%char%' or variable_name like '%collation%'; +--------------------------+--------------------------------------------------+ | Variable_name            | Value                                            | +--------------------------+--------------------------------------------------+ | character_set_client     | utf8mb4                                          | | character_set_connection | utf8mb4                                          | | character_set_database   | utf8mb4                                          | | character_set_filesystem | binary                                           | | character_set_results    | utf8mb4                                          | | character_set_server     | utf8mb4                                          | | character_set_system     | utf8                                             | | collation_connection     | utf8mb4_general_ci                               | | collation_database       | utf8mb4_general_ci                               | | collation_server         | utf8mb4_general_ci                               | +--------------------------+--------------------------------------------------+ 

Note that the data was created: – from a java application – at the time of data creation, the connection parameters were set to latin1 Also note that there are no FK linked with this table.

When I try to reproduce with some newly created tables, it seems that the rows are not modified. See below “0 rows affected”:

MySQL> select count(*) from mytesttable; +----------+ | count(*) | +----------+ |        3 | +----------+ 3 row in set (0.10 sec) 
MySQL> alter table mytesttable character set utf8; Query OK, 0 rows affected (0.03 sec) Records: 0  Duplicates: 0  Warnings: 0 

I tried to changed my connection parameters back to latin1 during the data creation but it didn’t change the result: still “0 rows affected”.

So my questions: 1) Is my understanding of the command correct? (that it shouldn’t modify the rows) 2) What could explain that the rows are affected in the 1st case?

Thanks a lot for your help

Uploading a file to Sharepoint on iPad modifies filename

I am using an iPad to upload files to a Sharepoint library from onedrive The SPO library is using modern experience

The added file names are changed after upload A guid is prepended to the file name Eg file to upload – testc3.docx Filename modified to 817BFD26-C1E2-4384-9663-1D9C59EC9C4Etestc3.docx

Anybody any ideas how I can prevent this from happening? Everything works fine on PC

view after uploading files on ipad

Tomcat 8.5 running on Ubuntu shutting down when git modifies files in a running context

Having an issue with Tomcat shutting down after a git post-receive hook is triggered and runs the command to checkout a branch (git --work-tree=/opt/myApplication --git-dir=/var/git-data/myApplication.git checkout development -f) to a folder that is being served by Tomcat. I am seeing the following events in the catalina.out log:

25-Apr-2019 15:14:14.360 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.reload Reloading context [/myApplication] 25-Apr-2019 15:14:14.360 INFO [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.core.StandardContext.reload Reloading Context with name [/myApplication] has started  

It seems odd that it’s attempting to reload the context because I have the option reloadable set to false. The server is running Ubuntu 18.04 with Apache Tomcat 8.5.39. I have the same setup on a RHEL server that doesn’t exhibit this behavior.

Composer- Is it possible to make a patch that modifies a module’s composer.json?

I want to confirm some behavior of Composer to see if this is a limitation of Composer or something I did wrong.

This is based on an issue in the Markdown module queue.

Basically, here’s the issue.

  1. The Markdown module requires ^0.15 of a library.
  2. I wrote a patch to require ~0.15 of the library. (to allow 0.16, 0.17, etc.)

But, when I apply this patch via Composer, and then try to update the library, I still get a drupal/markdown 1.2.0 requires league/commonmark (^0.15.0) even though the module’s (patched) code on my site requires ~0.15.

So, is there no way to “patch” a composer.json so that it will be picked up for composer update? Am I reliant on the module maintainer to commit the patch?