What is the maximum amount of melee weapon attacks a character can make reliably every turn?


Partially inspired by (but distinct from) this question.

I have a character concept for a character that make several attacks every turn like whirlwind of blades so I was wondering what the maximum number of melee weapon attacks a single character could make in one turn every turn. (So no consumable resources like spell slots or action surge.)

Stipulations:

  • Must be reliable and repeatable ad infinitum. (over and over again without end)
  • Must not rely on any consumable resources such as spell slots or action surge unless you have a way to not run out of the resource.
  • Hit or miss doesn’t matter. If your strategy relies on hitting provide counts for both with and without hitting.
  • Must be able to be accomplished by a single character with no help from another.
  • Must not require any magic items.
  • You can use any weapon provided it’s not a magic item and is a melee weapon (and is being used as one).
  • You make take any needed feats provided they come from a racial ability (like variant human) or are taken in place of an ASI
  • Assume there is only a single target.

The most I have come up with is dual wielding light one handed weapons as a level 20 fighter. This grants 4 attacks in a normal action plus one bonus action attack.

Using a fixed decimal when filling a currency amount input field

When entering currency amounts into an input field, I’ve seen two methods:

Keyed Decimal: The keypad includes the decimal character and the user enters the decimal along with the numbers. The Chase mobile app uses this approach.

Key  Display  5       $  5  4      $  54  .     $  54.  6    $  54.6  3   $  54.63 

Fixed Decimal: The keypad excludes the decimal character and the numbers fill around a fixed decimal. The PayPal and Square mobile apps both use this approach.

Key  Display  5    $  0.05  4    $  0.54  6    $  5.46  3   $  54.63 

The keyed decimal approach seems more straightforward to me, and it also requires 2 fewer keystrokes when entering non-decimal amounts (e.g. $ 10 only requires typing 1-0, instead of 1-0-0-0). However, users of our payment processing app have accidentally charged amounts like $ 123,456.00 instead of $ 1,234.56 because they were expecting a fixed decimal interaction instead of a keyed decimal interaction.

Is this just a matter of preference, or are there other merits to a fixed decimal approach that I may be overlooking?

[ Politics ] Open Question : If movies had equal amount of racial diversity in lead roles, can this help to reduce racism or is racism causing lack of racial diversity?

Back in the day, blacks had to sit in separate seats from whites at the movies. We’ve come a long way. We still hear about the lack of racial diversity for lead roles and during the oscar so white controversy, Will Smith said to Robin Roberts that he would’ve liked to have left a legacy when he retires to see a diverse range of lead actors. He felt disappointed that wasn’t going to happen. @blu, I don’t mean just blacks but rarely we see asians, hipsanics, middle eastern actors etc etc repreresented as heroes. @I hate commerce, you’re talking about segregation, I already mentioned we already went through that. @blu, I already have but there are actors like Scarlett Johansson that insist she can portray anyone she wants and had a backlash for portraying a Japanese character and also about a transgender person in which she had to cancel due to the lgbtq complaints. Many people didn’t like Christian Bale as Moses and it was controversial with white actors for leads in a middle eastern story. @I hate commerce, you’re so lost then. @blu, I guess what I’m saying is that minority’s especially asians feel they don’t have a place in Hollywood and they’re easily made fun of. *minorities

Integration of Interpolated function take an unacceptable amount of time

I have a simple integration which, when using an interpolation function, is taking too long to calculate:

c = 2.99792*10^5; A = 3.87624*10^-14; FreeElectronFractionData = {{3000, 1.0829044}, {2984.9246, 1.0828562}, {2969.8493, 1.0828473}, {2954.7739, 1.0828366}, {2939.6985, 1.0828238}, {2924.6231, 1.0828083}, {2909.5478, 1.0827898}, {2894.4724, 1.0827674},      {2879.397, 1.0827404}, {2864.3217, 1.0827077}, {2849.2463, 1.0826683}, {2834.1709, 1.0826207}, {2819.0955, 1.0825632}, {2804.0202, 1.0824939}, {2788.9448, 1.0824106}, {2773.8694, 1.0823111}, {2758.7941, 1.0821927},      {2743.7187, 1.0820531}, {2728.6433, 1.08189}, {2713.5679, 1.0817016}, {2698.4926, 1.0814865}, {2683.4172, 1.0812441}, {2668.3418, 1.0809745}, {2653.2664, 1.0806783}, {2638.1911, 1.0803569}, {2623.1157, 1.0800119},      {2608.0403, 1.0796454}, {2592.965, 1.0792594}, {2577.8896, 1.0788561}, {2562.8142, 1.0784377}, {2547.7388, 1.0780061}, {2532.6635, 1.0775631}, {2517.5881, 1.0771101}, {2502.5127, 1.0766486}, {2487.4374, 1.0761797},      {2472.362, 1.0757042}, {2457.2866, 1.0752228}, {2442.2112, 1.074736}, {2427.1359, 1.0742441}, {2412.0605, 1.0737472}, {2396.9851, 1.0732455}, {2381.9098, 1.0727387}, {2366.8344, 1.0722267}, {2351.759, 1.0717092},      {2336.6836, 1.0711857}, {2321.6083, 1.070656}, {2306.5329, 1.0701194}, {2291.4575, 1.0695754}, {2276.3822, 1.0690234}, {2261.3068, 1.0684627}, {2246.2314, 1.0678928}, {2231.156, 1.0673129}, {2216.0807, 1.0667222},      {2201.0053, 1.06612}, {2185.9299, 1.0655055}, {2170.8545, 1.064878}, {2155.7792, 1.0642365}, {2140.7038, 1.0635802}, {2125.6284, 1.0629083}, {2110.5531, 1.0622197}, {2095.4777, 1.0615136}, {2080.4023, 1.060789},      {2065.3269, 1.0600449}, {2050.2516, 1.0592803}, {2035.1762, 1.0584941}, {2020.1008, 1.0576853}, {2005.0255, 1.0568526}, {1989.9501, 1.0559951}, {1974.8747, 1.0551114}, {1959.7993, 1.0542004}, {1944.724, 1.0532609},      {1929.6486, 1.0522915}, {1914.5732, 1.051291}, {1899.4979, 1.0502581}, {1884.4225, 1.0491914}, {1869.3471, 1.0480894}, {1854.2717, 1.0469509}, {1839.1964, 1.0457743}, {1824.121, 1.044558}, {1809.0456, 1.0433006},      {1793.9703, 1.0420003}, {1778.8949, 1.0406552}, {1763.8195, 1.0392634}, {1748.7441, 1.0378224}, {1733.6688, 1.0363292}, {1718.5934, 1.0347802}, {1703.518, 1.0331707}, {1688.4426, 1.0314941}, {1673.3673, 1.0297415},      {1658.2919, 1.0279002}, {1643.2165, 1.025952}, {1628.1412, 1.0238707}, {1613.0658, 1.0216182}, {1597.9904, 1.0191391}, {1582.915, 1.0163525}, {1567.8397, 1.0131417}, {1552.7643, 1.0093401}, {1537.6889, 1.0047152},      {1522.6136, 0.99895508}, {1507.5382, 0.99166793}, {1492.4628, 0.9824059}, {1477.3874, 0.97072308}, {1462.3121, 0.95625418}, {1447.2367, 0.93878259}, {1432.1613, 0.91826926}, {1417.086, 0.89483803},      {1402.0106, 0.86873404}, {1386.9352, 0.84027554}, {1371.8598, 0.80981198}, {1356.7845, 0.77769325}, {1341.7091, 0.74424993}, {1326.6337, 0.70978283}, {1311.5584, 0.67455941}, {1296.483, 0.63881506},      {1281.4076, 0.60275746}, {1266.3322, 0.56657254}, {1251.2569, 0.53043096}, {1236.1815, 0.4944942}, {1221.1061, 0.45891987}, {1206.0307, 0.4238656}, {1190.9554, 0.3894916}, {1175.88, 0.35596148}, {1160.8046, 0.32344154},      {1145.7293, 0.29209849}, {1130.6539, 0.26209576}, {1115.5785, 0.23358875}, {1100.5031, 0.20671934}, {1085.4278, 0.18161021}, {1070.3524, 0.1583594}, {1055.277, 0.1370358}, {1040.2017, 0.11767584},      {1025.1263, 0.10028183}, {1010.0509, 0.084822106}, {994.97554, 0.07123293}, {979.90017, 0.05942197}, {964.8248, 0.049273035}, {949.74943, 0.040651617}, {934.67406, 0.033410795}, {919.59868, 0.027397081},      {904.52331, 0.022455872}, {889.44794, 0.018436284}, {874.37257, 0.015195242}, {859.2972, 0.012600771}, {844.22182, 0.01053444}, {829.14645, 0.008892887}, {814.07108, 0.007588385}, {798.99571, 0.006548454},      {783.92034, 0.005714659}, {768.84496, 0.005040865}, {753.76959, 0.004491226}, {738.69422, 0.004038206}, {723.61885, 0.003660784}, {708.54348, 0.003342951}, {693.46811, 0.003072499}, {678.39273, 0.002840079},      {663.31736, 0.002638491}, {648.24199, 0.002462145}, {633.16662, 0.002306669}, {618.09125, 0.00216861}, {603.01587, 0.002045214}, {587.9405, 0.00193427}, {572.86513, 0.001833981}, {557.78976, 0.001742876},      {542.71439, 0.00165974}, {527.63902, 0.001583562}, {512.56364, 0.001513494}, {497.48827, 0.001448819}, {482.4129, 0.001388928}, {467.33753, 0.001333298}, {452.26216, 0.00128148}, {437.18678, 0.001233084},      {422.11141, 0.00118777}, {407.03604, 0.001145243}, {391.96067, 0.00110524}, {376.8853, 0.001067531}, {361.80992, 0.001031911}, {346.73455, 0.000998196}, {331.65918, 0.000966223}, {316.58381, 0.000935844},      {301.50844, 0.000906924}, {286.43307, 0.00087934}, {271.35769, 0.00085298}, {256.28232, 0.00082774}, {241.20695, 0.000803522}, {226.13158, 0.000780232}, {211.05621, 0.000757781}, {195.98083, 0.00073608},      {180.90546, 0.000715041}, {165.83009, 0.00069457}, {150.75472, 0.00067457}, {135.67935, 0.000654928}, {120.60397, 0.000635516}, {105.5286, 0.000616174}, {90.453231, 0.000596693}, {75.377859, 0.000576785},      {60.302487, 0.000556011}, {45.227116, 0.000533637}, {30.151744, 0.000508209}, {15.076372, 0.000475883}, {0, 0.000410148}};   FreeElectronFraction := Interpolation[FreeElectronFractionData, InterpolationOrder -> 1]  ElectronNumberDensity[\[Eta]_] := (redShift = 6.64*^18^2/((c - Sqrt[c]*Sqrt[c - 2.*A*\[Eta]])/A)^2 - 1.; FreeElectronFraction[redShift]*1.42*^-7*(1. + redShift)^3)  Plot[NIntegrate[ElectronNumberDensity[eta], {eta, \[Eta], 3.78*^18}, MaxRecursion -> 15], {\[Eta], 1.47*^17, 2.66*^17}]  ListPlot[FreeElectronFractionData] 

The 25 seconds doesn’t seem to be a lot, but this calculation is inside another integral which didn’t complete in eight hours. As nearly as I can tell, this integral is the culprit. Specifically the interpolation function.

I’ve seen other suggested solutions on this board, but none of them worked for me. One of the solutions looked promising: creating a pure function based on the interpolated data and using that in the integral, but that is beyond my skills.

What is the maximum amount of PC-controlled undead

I decided to make an unreasonable demand from nearby town and to gain an advantage in upcoming dispute I want an undead horde reinforcing my arguments. I am not looking for quality (after all, those buffoons can’t tell skeleton from lich), but quantity.

My question is: how many undead creatures a Player Character can have under their control at the same time?

Constraints:

  • Only official WOTC content.
  • Small and larger undead only: it is hard to be intimidated by something you have to look for.
  • Target number should be able to be attained without explicit DM cooperation. No dozens of tomes thrown at character, no unlikely situations, no DM fiat (so no Boons, for example).
  • No Legendary magic items.
  • After attaining desired amount of undead, character should be able to sustain that amount for at least seven days.

What is the maximum amount of PC-controlled undead

I decided to make an unreasonable demand from nearby town and to gain an advantage in upcoming dispute I want an undead horde reinforcing my arguments. I am not looking for quality (after all, those buffoons can’t tell skeleton from lich), but quantity.

My question is: how many undead creatures a Player Character can have under their control at the same time?

Constraints:

  • Only official WOTC content.
  • Small and larger undead only: it is hard to be intimidated by something you have to look for.
  • Target number should be able to be attained without explicit DM cooperation. No dozens of tomes thrown at character, no unlikely situations, no DM fiat (so no Boons, for example).
  • No Legendary magic items.
  • After attaining desired amount of undead, character should be able to sustain that amount for at least seven days.

What’s the Minimum Amount of Security Your Website Needs?

Have you checked that your website is secure even if you think your site is too small for the hackers to bother with?

Quote:

over half (54%) of the businesses surveyed for the 2018 State of SMB Cybersecurity report believe they’re too small to be a target for hackers. But the data paints a different picture:

  • 67% of small- and medium-sized businesses were attacked in 2018;
  • 82% of those attacked had antivirus software installed on their systems;
  • 72% had intrusion detection systems in place.

What’s the Minimum Amount of Security Your Website Needs?

How did you do on the checklist provided?

Apply discount amount on cart line items in Magento 2

I am trying to set discount amount on each cart item in the cart with some condition.

I have followed like this to achieve that.

Vendor/Module/etc/sales.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Sales:etc/sales.xsd"> <section name="quote">     <group name="totals">         <item name="testdiscount" instance="Vendor\Module\Model\Quote\Discount" sort_order="500"/>     </group> </section> 

then in Vendor\Module\Model\Quote\Discount.php

namespace Vendor\Module\Model\Quote; use Magento\Catalog\Model\ProductRepository; class Discount extends   \Magento\Quote\Model\Quote\Address\Total\AbstractTotal {  protected $  _priceCurrency;  protected $  _productRepository;  protected $  _resource;  public function __construct(    \Magento\Framework\Pricing\PriceCurrencyInterface $  priceCurrency,    \Magento\Framework\App\ResourceConnection $  resource,    ProductRepository $  productRepository   ){      $  this->_priceCurrency = $  priceCurrency;      $  this->_resource = $  resource;      $  this->_productRepository = $  productRepository;     }     public function collect(       \Magento\Quote\Model\Quote $  quote,       \Magento\Quote\Api\Data\ShippingAssignmentInterface $  shippingAssignment,       \Magento\Quote\Model\Quote\Address\Total $  total     )    {    $  data = $  quote->getItems();     if (!count($  data)) {         return $  this;     }    parent::collect($  quote, $  shippingAssignment, $  total);     foreach ($  data as $  item) {             $  productSku = $  item['sku'];             $  checkSkuExist  = $  this->checkProduct($  productSku);             if($  checkSkuExist){               $  item->setDiscountAmount(10);               $  item->setBaseDiscountAmount(10);               $  item->setTaxAmount(10);               $  item->setBaseTaxAmount(10);             }         }         return $  this;        }    public function checkProduct($  productSku){     $  connection = $  this->getConnection();     $  sql = "select * from custom_table where sku='".$  productSku."'";     $  resultProduct = $  connection->query($  sql);     $  resultQuery = $  resultProduct->fetchAll();     if(!empty($  resultQuery)){       $  parent_sku = $  resultQuery[0]['parent_sku'];     return true;    }   }else{   return false;    }    }   public function getConnection(){    $  connection = $  this->_resource->getConnection(\Magento\Framework\App\ResourceConnection::DEFAULT_CONNECTION);   return $  connection;     }  } 

Here When i am check the item SKU against the custom table, if the SKU present in the table then, applying the discount amount for that quote item.

Which is not applying any discount amount for the quote item.

Can anyone suggest me the better way how this can be achieve.

Thanks

How many inputs N can be placed into a function ln to get a certain amount of time?

it’s “gardening” time, which means studying algorithms. A question in Intro to Algorithms 3rd Edition is a chart asking me how many of N inputs can be placed into a function to get a certain amount of time.

lgN is the first function.

What are the max inputs of lgN to get 1 second? What is the max input of lgN to get 3 seconds? What is the max input of lgN to get 5 seconds?

[My attempt]

The first thing I did was acknowledge the amount of instructions per second my computer has, 4.0 gHZ means 4 billion instructions per second.

So, a log instruction can reasonably take 4 billion instructions, right? However, the more I thought about that the more it didn’t seem right. . . An instruction isn’t a function, and completing a fucntion can take more than a single instruction. Therefore, the idea that 4 billion instructions per second is 4 billion inputs for lg(N) was wrong.

So, I tried something different. Raw math. A computer with a 4gHZ computer does 4 billion instructions per second, right? So, all I have to do is get an input that makes lgN go over 4 billion or at least close to the mark. After all, if you entered a function like f(N*N) and that yielded about 4.127 billion in terms of time, you’d know that inputting that many inputs can measure up to about at least 1.127% of the time it took to complete an instruction, or a second.

So, inputting lg(4,000,000,000) as a start I end up with a raw 9.602.

The fact that I can have 4 billion inputs and have 9.602/4,000,000,000 is insane. . . That means my requirement for getting a second of time requires an astronomical number.

So, I decided to try something simpler, multiples of 2. I tried 2^4,000,000,000 and got infinity. Okay, getting warmer.

I tried 2^4000 and 2^1000. when I go far over 2^1000 I get infinity, for example.

lg(2^1023) = approximately 307. Whereas lg(2^1024) just goes straight to infinity.

So, I’m beginning to think that my process in trying to solve this problem is all wrong.

If any experienced algorithmic thinkers and or mathematicians can help me with this algorithm, I’d be extremely grateful.