Artificer Eldritch Cannon Protector temp hit points and Wildshape

I’m trying to understand how wild shape interacts with the temp hit points provided by eldritch cannon’s protector feature.

Here is the scenario:

  1. Artificer puts out eldritch cannon and gives temp hit points to the party
  2. Druid wild shapes
  3. Druid takes damage
  4. Artifcer re-applies temp hit points in the next round

My question is more or less order of operations with hit points. Does the druid wild shape carry those hit points and we remove that damage first? In this scenario every time the artificer applies temp hit points it buffs the wild shape form and allows for the druid to stay in wild shape much longer.

Or do we exhaust the wild shape hit points first and apply the temp hit points to the druid’s form that will be waiting for them after the druid breaks wild shape.

Essentially I need to know if temp hit points provided by the artificer allows for the druid to stay in wild shape longer.

Generate all combinations for variables and insert into temp table

0

I have one requirement there are 4 variables and i want all combinations of 4 variables and insert into temp table .

DECLARE StartDateTime DATETIME; DECLARE Age INT;  DECLARE Duration INT ; DECLARE TotalDD INT;  CREATE TEMPORARY TABLE tempTable(     Duration INT,     TotalDD INT,     Age INT,     StartDateTime DATETIME,     ); SET Age = 16; SET TotalDD = 14; SET Duration = 30; SET StartDateTime = CURDATE(); 

Excepted Result:

Duration age TotalDD StartDateTime 30 null null null null 16 null null 30 null null null 30 16 null null null null 14 20200622 30 null 14 null 30 16 null 20200622 

……….. ………. so on

Select Into a temp table in DB2

Let me preface this question in that while I have a strong background in T-SQL but I am still just a newbie when it comes to DB2.

The root query looks roughly like this:

Select      Col1, Col2, Col3 From (     Select A.Col1, B.Col2, B.Col3     From SchemaA.TableA as A         Inner Join SchemaA.TableB as B             On A.Id = B.ParentId     Where          A.Col2 = 'TypeValue'     Fetch First 5 Rows Only -- This is not allowed in a union or sub select      Union      Select A.Col1, B.Col2, B.Col3     From SchemaB.TableA as A         Inner Join SchemaB.TableB as B             On A.Id = B.ParentId     Where          A.Col2 = 'TypeValue'     Fetch First 5 Rows Only -- This is not allowed in a union or sub select ) as Hybrid 

Because Fetch First X Rows is not allowed in subselects or with unions, this isn’t going to work. Since we’re limiting the output, it makes sense to limit the input.

I figure I can achieve a fake union by feeding my subselects into temp tables instead and returning that output instead.

In T-SQL, I can create a temp table on the fly with a query like this how would I do that in DB2?

Select * Into #Temp From TableA 

How would I do that in DB2? Or would do I need to create the table before inserting data into it?

Greedy heuristic for buying fewest fridges of set temperature for products that can be kept in some temp. ranges?


We have a set of $ n$ products, each $ i$ th product can be kept in a temperature between $ c_i$ and $ h_i$ .

We have to buy fewest number of fridges for these products. The fridges can only have a fixed temperature.

For me I think of this problem as intervals of product temperatures that are placed on the axis. enter image description here

My idea to solve it is to see which product’s temperature range overlaps with most other products temperature ranges, then we can place these products in one fridge.

But the algorithm for this would be inefficient..

What’s a simple greedy solution for this? any ideas?

Does the Armor of Agathys spell still damage attackers if you have temp HP from another source, such as the Dark One’s Blessing feature? [duplicate]

This question already has an answer here:

  • How does Armor of Agathys interact with getting temporary hit points? 3 answers

Recently, I played a warlock in a 5e one-shot. We were playing at level 7 and I was a Pact of the Blade warlock with the Fiend patron. As a Fiend Warlock, I have a feature called “Dark One’s Blessing”, :

Starting at 1st level, when you reduce a hostile creature to 0 hit points, you gain temporary hit points equal to your Charisma modifier + your warlock level (minimum of 1).

The description of the Armor of Agathys spell reads:

A protective magical force surrounds you, manifesting as a spectral frost that covers you and your gear. You gain 5 temporary hit points for the duration. If a creature hits you with a melee attack while you have these hit points, the creature takes 5 cold damage.

At Higher Levels. When you cast this spell using a spell slot o f 2nd level or higher, both the temporary hit points and the cold damage increase by 5 for each slot level above 1st.

The situation was that there was a pack of ‘minions’ (4th-edition term, I know… but they were low-AC 5 hp monsters that died in 1 hit most of the time) attacking my group. The dragonborn wizard knew Fly, and grabbed the halfling and flew out of reach of the group of minions; I was left there with Armor of Agathys cast on me at level 4, so I had 20 temp hp and did 20 damage to each minion.

The question comes from the functionality of Temp HP (THP)… It does not stack. Instead, you must choose which set to acquire, either keeping the THP you currently have or using the new number provided by whatever is trying to give you more THP.

Once I was below 20 THP from the attacks made on me by this swarm of minions, I started taking the 10 (warlock level + CHA mod= 7+3) THP provided by Dark One’s Blessing. After rereading Armor of Agathys today, I noted it says ‘while you have these hit points’… leading me to believe that choosing to take the 10THP from Dark One’s Blessing would remove the Armor of Agathys and its damaging capability.

TL;DR

Does Armor of Agathys only work if you have THP from the spell specifically, or does it still work if you gain more THP from another source (like from Dark One’s Blessing) while the spell is still active?

Using Temp Tables in Azure Data Studio Notebooks

tl;dr I want to use temp tables across multiple cells in a Jupyter Notebook to save CPU time on our SQL Server instances.

I’m trying to modernize a bunch of the monitoring queries that I run daily as a DBA. We use a real monitoring tool for almost all of our server level stuff, but we’re a small shop, so monitoring the actual application logs falls on the DBA team as well (we’re trying to fix that). Currently we just have a pile of mostly undocumented stored procedures we run every morning, but I want something a little less arcane, so I am looking into Jupyter Notebooks in Azure SQL Data Studio.

One of our standard practices is take all of the logs from the past day and drop them into a temp table, filtering out all of the noise. After that we run a dozen or so aggregate queries on the filtered temp table to produce meaningful results. I want to do something like this:

Cell 1

Markdown description of the loading process, with details on available variables 

Cell 2

T SQL statements to populate temp table(s) 

Cell 3

Markdown description of next aggregate 

Cell 4

T SQL to produce aggregate 

The problem is that, it seems, each cell is run in an independent session, so the temp tables from cell 2 are all gone by the time I run any later cells (even if I use the “Run cells” button to run everything in order).

I could simply create staging tables in the user database and write my filtered logs there, but eventually I’d like to be able to pass off the notebooks to the dev teams and have them run the monitoring queries themselves. We don’t give write access on any prod reporting replicas, and it would not be feasible to create a separate schema which devs can write to (for several reasons, not the least of which being that I am nowhere near qualified to recreate tempdb in a user database).

Why would you populate a temp table for reporting?

I’m maintaining a legacy accounting application that runs nearly all of its reports by populating a temp table at runtime. The temp table is dropped on a daily basis and includes information about the report’s configuration (i.e. which terminal ran it, landscape vs. portrait etc…). Is there a reason to have the application do this rather than select the configuration view in real time and pull the data it needs from a custom view?

Magento 2 generates thousands of temp table queries on product update

I have a Magento 2.2.5 store with ~20k products and ~250 categories arranged in a tree of maximum 2 sub categories.

One of the top categories has 5k products and when I try to remove a product from the category, or remove the category for a specific product the server takes more than 2 minutes and times out.

After reading the general_log, I saw thousands of queries like this:

SELECT `e`.* FROM `tmp_select_e5e424ef98e4a8a4026e18df9d8088e0` AS `e` WHERE (hash_key = '1_44083') 

peaking the database server to 100%: enter image description here

I think this has something to do with url_rewrites, but I can’t seem to understand how is this a problem with only 5k products.

Are there any configurations I can set maybe loosing functionalities, to be able to do something as simple as removing a product from a category?

Thanks a lot.

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘magento.temp’ doesn’t exist, query was: SHOW CREATE TABLE temp

Magento 2.3.* composer upgrade successfully upgraded. But after that used to update schema using following commands but facing error.

bin/magento setup:upgrade 

Error:

Cache cleared successfully File system cleanup: /generated/code/Composer /generated/code/MSP /generated/code/Magento /generated/code/Symfony The directory ‘/generated/metadata/’ doesn’t exist – skipping cleanup Updating modules: Schema creation/updates: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘magento.temp’ doesn’t exist, query was: SHOW CREATE TABLE temp

Help is much appreciated..I have tried many times facing issues, is there any permission issue? Thanks.