Weighted Activity Selection Problem with allowing shifting starting time

I have some activities with weights, and I would like to select non overlapping activities by maximizing the total weight. This is known problem and solution exists.

In my case, I am allowed to shift the start time of activities in some extend while duration remains same. This will give me some flexibility and I might increase my utilization.

Example scenario is something like the following:

(start, end, profit) a1: 10 12 120 a2: 10 13 100 a3: 14 18 150 a4: 14 20 100 

Without shifting flexibility, I would choose (a1, a3) and thats it. On the other hand I might shift the intervals by 5 units (In real case even 1000x greater than original task duration) to the left/right. In that case I might come up this schedule and all tasks can be selected.

a1: 8 10 120 (shifted -2 to left) a2: 10 13 100 a3: 14 18 150 a4: 18 23 100 (shifted +4 to right) 

Are there any feasible solution to this problem?

What are the security implications of allowing API consumer to decide primary key stored in database?


Story

We are developing an API that which allow consumer to create or modify (i.e. upsert) objects stored in database via an endpoint with HTTP PUT.

The primary key of the object stored in this way is a GUID instead of an auto-increment number to prevent potential conflicts in future and it was decided that the GUID should be provided by API consumer in both scenario during object creation and modification.

We are being informed that the advantage of this approach allows us to focus the intention of storing objects without differentiate between create or modify.

Question

In this case, we expect the API consumer to pass a GUID as object identifier and what can go wrong security-wise if we allow someone else to decide the primary key of the object stored?

I understand I may treat the provided GUID as candidate key and generating another unique identifier internally but it seems redundant and wonder if it’s a plausible approach.

Windows not allowing Linux to use Wifi adpter

I have a 256 SSD in my computer containing windows and 500GB partition on my 1TB HDD containing Linux. Due to my fast startup being enabled as soon as I shut down and switch to linux it can not use my Wifi Adapter. Is there any way to use the drivers without disabling since I use both OS’s frequently?

It is a Intel Wireless Driver (Intel® Wi-Fi 6 AX201) and I have the necessay drivers installed since I have used it before when I did a complete shutdown.

enter image description here

Would allowing versatile weapons wielded in two hands to benefit from Dueling be unbalanced?

As a DM, would allowing players using a versatile weapon in two hands to benefit from Dueling create unforeseen imbalance in the game? The reason for this change is because it appears that the longsword, when used without a shield, is far outmatched by the greatsword in terms of damage. Whilst the longsword has the ability to be used when grappling, this is not a significant enough advantage as a character could simply drop their greatsword (which would be a non-action) and use their object interaction to draw a onehanded weapon, like a rapier.

Whilst Jeremy Crawford’s unofficial ruling was that versatile weapons only benefited from Dueling if wielded in one hand, I disagree with this ruling. From a thematical stand point, it does not make sense that I would be more effective at using a weapon designed for two hands, such as a longsword, one-handed. From a mechanical stand point, allowing this only seems to make otherwise sub-par options slightly better.


From this post from a few years ago that compared the damage values of various weapons:

Average weapon damage:

EX: E[1d6] = (1 + 2 + 3 + 4 + 5 + 6)/6 = 21/6 = 7/2 = 3.5 or

(1/2)*[6+1] = 3.5

Greatsword & Maul: E[2d6] = 3.5 + 3.5 = 7

Greataxe = E[1d12] = 6.5

Glaive, Pike & Halberd = E[1d10] = 5.5

Greatclub = E[1d8] = 4.5

Averages with Great Weapon Fighting:

E[1d6|GWF] = (3.5+3.5+3+4+5+6)/6 = 25/6 = 4.2, so:

Greatsword & Maul = E[2d6|GWF]= 4.2 + 4.2 = 8.4, gain of 1.4

Greataxe = E[1d12|GWF]= (6.5+6.5+3+4+5+6+7+8+9+10+11+12)/12 = 88/12 = 7.3, gain of .8

Polearms = E[1d10|GWF]= (5.5+5.5+3+4+5+6+7+8+9+10)/10 = 63/10 = 6.3, a gain of .8

Greatclub = E[1d8|GWF]=(4.5+4.5+3+4+5+6+7+8)/8 = 42/8 = 5.3, a gain of .8

A longsword, having a damage die of 1d10, would therefore do 5.5 average damage and 6.3 if used with Great Weapon Fighting with a max damage of 10. If compared with using a greatsword, which has an average of 7 damage and 8.33 damage with Great Weapon Fighting with a max damage of 12, it is fairly clear which weapon is better in terms of damage.

However, if instead we compare a longsword wielded in two hands which benefits from Dueling to a greatsword, we get 7.5 average damage (5.5 +2 from Dueling) vs 7, or 8.3 if the greatsword is benefiting from Great Weapon Fighting. These numbers are significantly closer together, making longswords and other versatile weapons more viable options. Even spears and quarterstaffs become more viable options as their average damage increases from 5.3 with GWF to 6.5 with Dueling.


Considering that only Fighters, Paladins and Rangers can take Dueling, it does not unbalance the game in terms of giving everyone a damage boost. Additionally, none of the new damage increases outshine the greatsword as it still has a minimum of 2 damage and 12 max damage, 2 points higher than any versatile martial weapon or 4 points higher than a versatile simple weapon. Furthermore, versatile weapons would still not benefit from Great Weapon Master’s second benefit, meaning weapon’s like the greatsword could still outperform versatile weapons massively.

Note that a champion fighter could take both Dueling and GWF, benefiting from both fighting styles simultaneously, but even then a longsword only deals 8.3 average damage, comparable to the greatsword’s 8.33, but this requires the fighter to forego the +1 AC from Defense and requires them to be at least 10th level. Finally, as stated previously, versatile weapons would not benefit from GWM’s second feature so, by choosing to use a longsword instead of a greatsword, they are losing a further +10 potential damage.

However, whilst this all seems very balanced to me, what I want to know is are there any potential interactions which would make this change to Dueling unbalanced?

How is this allowing me to bypass recaptcha

I am testing this site, i was testing rate limit on login page, it was captcha protected, i could not even intercept the post request on burp so from Google Chrome i looked at the logs and in its post request it was passing this captcha parameter and also other recaptcha requests. So then i ran firefox again which is connected with burp, this time i used private tab and tested the same login page, to my surprise there were no recaptcha requests, also no captcha parameter or value in login post request, allowed me to test unlimited payloads and still giving right response for password, can anyone explain to me what is happening here, why running browser on private allowing me to bypass recaptcha i know this is a vulnerability but how and what is causing it

Is allowing Barbarian features to work with Dex-based attacks imbalancing?

The barbarian requires that you make attacks using Strength in order to get a number of benefits. This, to me, sounds very much like someone trying to enforce their personal notion of what a barbarian “should look like,” rather than a serious balance limitation. As that kind of mechanic annoys me to no end, I’d like to remove the limitation.

I realize that there might be issues with Hexblade if we open things up entirely; maybe not so bad (or no worse than Hexblade is normally), but maybe it is. Either way, that is beyond the scope of this question: the point of this question is solely opening up barbarian class features to Dex-based attacks.

So, what are the mechanical balance implications of allowing Dexterity-based attacks to benefit from barbarian class features? Primarily, does this cause Dexterity-based barbarians to overshadow the more traditional Strength-based barbarians, or do Strength-based attacks still have their niche? I don’t want to make Dexterity-based barbarians better than Strength-based ones, I just want to make them also work, ideally about equally well.

Are there balance issues when allowing attack of opportunity against any creature?

As shown in this question and answer, I am confused by the terms hostile and enemy. So I was wondering if in my own game I could simply remove the requirement hostile from the attack of opportunity, because I think there it is particularly useless. PHB p195:

You can make an opportunity attack when a hostile creature that you can see moves out of your range.

I’m thinking attacks are allowed against allies, why shouldn’t attacks of opportunity be.

Are there any balance issues if I homerule that particular text like this? Any spells, effects or others that now unexpected work differently?

You can make an opportunity attack when a creature that you can see moves out of your range.

What would be the balance implications of a house rule allowing a readied spell to be held indefinitely?

As established by this question, readied spells can only be held until the beginning of your next turn.

What would the balance implications be if there were no upper limit on how long the spell’s energy could be held? Or if the upper limit were higher?

Are there any future balance issues when allowing multiclassing for dex barbarians?

A player of mine plays a dex barbarian and multiclassed into fighter for a fighting style. I didn’t understand at that time that he can’t do that without a strength score of 13 (which he doesn’t have). I am leaning to houserule the multiclassing requirements for barbarian to be as the fighter, 13 strength or dex. Are there any problems as they level up that I should be aware of?

Why do I want to allow it? As I understand them, the multiclassing requirements are designed to avoid players to take another class for the features without having any of the stats that normally enable a character to have these features. Someone that is not intelligent can’t suddenly become a wizard. Very logical.

However for the dex barbarian, it is not like he does not have the stats for his class. He has a 16 dex, that is above average and the main stat of a dex barbarian. So I do not see a reason why he can’t multiclass.

Allowing users to select large items to export from a paginated list

On a website I’m designing, users have access to a search function that lists items with potentially much content inside (they’re meant to be grammar exercises, and so multiple grammar problems can be listed in each item). The current view uses pagination (6 items per page) and looks like this:

enter image description here

Users should be able to enter a special mode in which they select the items to export to a file. While there could potentially be hundreds of items and multiple results pages, I want the design to be usable at no more than 40-50 items, suggesting to narrow down the search query if the result set is larger.

This leaves me with a problem: allowing users to select items for exporting from a list that doesn’t fit on a single page, because the items are so large. While there are many questions (1, 2, 3) and solutions about selecting items from a long list, those items are typically just small, simple text labels one-two words long, in which case list builders or a grid-based layout with checkboxes can be used; here, this is impractical.

The solution I thought of was to switch from using pagination to infinite scroll, and, when the user clicks the ‘export’ button, load all items from the server if the user hasn’t scrolled to the bottom yet, and then simply allow individual item selection via checkboxes (that is, a checkbox appears next to each item; if the item is to be exported, the checkbox should be checked).

  • Are there any significant downsides to this approach? One problem I can see is that beyond around 10 items, there will likely be a lot of scrolling involved, because of the height of each item. How much of an issue is this?
  • Is there another solution I could consider?
  • I believe my solution should be usable on mobile devices as well, since it doesn’t require anything more refined than checkboxes. Are there any difficulties I’m missing?