Any price comparison for car rental that send alerts when price drop at a certain amount set by user, without needing a reservation?

Do you know Any price comparison sites for car rental that send alerts when price drop at a certain amount set by user, so not just cents change or 5%, without needing a reservation to receive alerts?

Ideally would be to receive alerts for a destination when price per day, for a week long rental, reach X amount, without having to set the 100 alerts with different dates.

Don’t tell me Autoslash.

algorithms – Counterexample to greedy solution for set cover problem

I am looking for the answer to the exercise 1-6 in “The Algorithm Design Manual” book. it is stated as follows:

1-6. The set cover problem is as follows: given a set of subsets
S1,…,Sm of the universal set U = {1,…,n}, find the smallest subset
of enter image description here subsets such that enter
image description here. For example, there are the following
subsets, S1 = {1,3,5}, S2 = {2,4}, S3 = {1,4}, and S4 = {2,5} The set
cover would then be S1 and S2.

Find a counterexample for the following algorithm: Select the largest
subset for the cover, and then delete all its elements from the
universal set. Repeat by adding the subset containing the largest
number of uncovered elements until all are covered.

My answer is as follows:

S = {{1, 2}, {3, 4}, {2, 5}, {5}}, U={1,2,3,4,5} algorithm will use
following sets: {{1, 2}, {3, 4}, {2, 5}}, while {{1, 2}, {3, 4}, {5}}
would be more minimal

do you think its correct? I assume here that algorithm minimizes number of uncovered elements in each iteration and not the entire size of set to choose – thats why it might choose {2,5} instead of {5}.

I have found this answer on internet:

One counter-example consists of a series of subsets that increase in
size exponentially, plus 2 additional subsets that each cover half of
the elements. Example:
S1 = {1,2}

S2 = {3,4,5,6}

S3 = {7,8,9,10,11,12,13,14,15,16}

S4 = {1,2,3,4,5,6,7,8}

S5 = {9,10,11,12,13,14,15,16}
The greedy algorithm will choose.
S3,S2,S1, while the optimal solution is simply S4,S5

To my understandment, algorithm would choose S3,S4 and not S3,S2,S1. S4 has more uncovered elements than S2.

opengl – set model to transparent where texture is transparent

I finally got around to applying textures to my game, and I noticed that the areas that are transparent on the .png of the texture are not transparent on the actual model.It is illustrated in the image below.
enter image description here

I want the areas of the model that are supposed to be transparent to be transparent. The white areas are the areas that should be transparent. the white areas are transparent on the actual .png. Is there any way to do this using glfw? Is there some sort of transparency function GLFW has? I thought changing RGB to RGBA on the texture generator would fix it but it did not.
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data);
The data for the actual model is below (its formatted in json but still shows the vertices). The first 3 entries on each row are the coordinates, then 3 entries for the color, then the texture mapping.

{"vertices":(
0.00,0.00,0.0,0.0,0.0,0.0,0.0,0.0,
500.00,0.00,0.0,0.0,0.0,0.0,1.0,0.0,
500.00,500.00,0.0,0.0,0.0,0.0,1.0,1.0,
0.00,500.00,0.0,0.0,0.0,0.0,0.0,1.0

),
"indices":(
0,1,2,
0,3,2
),

"texturePath": "textures/planet1.png"}

Do I have to map the coordinates of the texture to a circular object rather than a square one like it is formatted now. I am hoping I don’t, because that would make my life so much simpler.

graphs – Is the maximum independent set problem on a subgraph NP-hard?

I’m working on an optimization problem which can be modelled using a graph $G=(V,E)$. This graph can be split into two subgraphs $G_1=(V_1,E_1)$ and $G_2=(V_2,E_2)$. The two subgraphs are non-overlapping, i.e., $V_{1}cap V_{2}=phi$ and $E_{1}cap E_{2}=phi$, with $V_{1}cup V_{2}=V$ and $E_{1}cup E_{2}=E$. In other words, the two subgraphs are not connected (although the vertices in $G_2$ are connected).

Crucially, I’ve been able to establish that the finding the optimal solution of the problem corresponds to finding the maximum independent set on $G_2$. My question is simple: given that finding the maximum independent set on a graph is NP-hard, does this imply that the problem I’m working with is NP-hard too (although we are dealing with a subgraph)?

Why do I have to set MySQL user password with mysql_native_password to connect with Workbench?

I’ve noticed if I set the mysql user’s password like below, I cannot connect with MySQL Workbench.
ALTER USER 'root'@'localhost' IDENTIFIED BY 'myPassword'

If I use this below I can connect to it:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'myPassword';

I remember at MySQL 8 there was a default password policy change.
But still after years of that change, do the drivers (c/c++, node.js etc) not support the new password authentication?
Does MySQL’s own Workbench don’t support the new way of authentication?
Or am I missing something?

blockchain – Could a miner set a maximium transaction fee

Yes, miners can choose exactly what transactions to include in their candidate blocks, including the choice to not include anything at all.

Of course, if a high fee paying transaction is available, and one miner chooses to not include it, other miners still can. This is only untrue if an entire cartel with sufficient hashrate that is actively performing a 51% attack chooses not to include a transaction – in that case, it can be censored as long as the attack lasts.

domains – I would like to set up a subdomain for my website that redirects to my discord invite link

If I correctly understand this you would need to set up a subdomains to point to a link that you own, and then either do a redirect to the invite link or embed it in an iframe.

I’ve only skimmed their terms and conditions but I see nothing therein preventing you from doing a redirect. Their terms may preclude you from legally going the iframe route.

dnd 5e – How should I set up and execute air battles in my session to avoid easy encounters?

Combat balance is always tricky, and airship-related elements can make it harder. I’ll try to focus on the novel environment of the airship, since that’s the meat of the question. But for completeness, a few issues about combat balance generally:

  • Combat difficulty estimates (like a hard encounter, deadly encounter,
    etc.) are just that– estimates. And not very precise ones. Further,
    the difficulty of an encounter is mostly defined around the
    likelihood of PC KOs. Even a deadly encounter is one that PC party is
    expected to win
  • Powerful parties are powerful. They have lots of options to deal with
    a variety of situations, and one manifestation of that is that they
    can approach a given encounter in many ways. Some of those ways will
    make certain combats pretty easy for them, such as gaining access to
    Polymorph. With options like that available, an encounter may need to be much harder to suit those powerful options
  • You are running a game for a pretty large party. 5 to 6 party members (and even up to 8!)
    gives a big edge in terms of action economy, and allows for lots of
    synergies between PCs (which tends to make combats easier).
    If you have that many PCs, you likely need to include more enemies
    per combat in order to keep things challenging
  • 3 to 5 hard combats per day is below the number assumed in a typical
    adventuring day, and consequently it’s not surprising if the party
    overperforms

Tweaks to ordinary combat-balance issues are covered pretty well in answers to other questions, and are not quite in scope here.


Airship combat between individual characters and enemies can be tricky to balance

As you’ve discovered! If you can get enemies onto the deck of the ship you can have a pretty typical combat encounter, plus an obvious terrain feature that allows shoving enemies over the side to plummet to the ground.

But if you have flying enemies that menace the ship by flying around it you can start to lose terrain features and tactics that add variety and challenge to combats. For an easy example, consider cover: outside of using the body of the ship, cover is probably going to be hard to come by. This favors spellcasters and ranged fighters, who get to act like fixed turrets.

My preferred approach to combat between PCs on or in a vehicle and enemies that move around that vehicle (this includes airships, regular ships, wagons, mine carts, and so on) tend to focus on treating the vehicle as a unique environment which is a part of the fight(s):

  • A rollable table of ship-related effects is a great tool to have, and
    can really alter player tactics. For example, if the airship suddenly
    rolls to the side PCs may need DEX saves to keep their footing or
    risk falling prone/taking damage/pitching over the side. Rolling a d6
    every round or two to impose environmental effects like that can make
    a combat harder without fiddling with enemy composition, as well as
    adding variety to combats generally
  • Flying hundreds of feet in the air offers unique opportunities and
    dangers. Does the airship have to fly through a thunderstorm,
    possibly creating a risk of lightning damage or driving winds? Can
    the PCs defeat the enemies and survive the harsh environment? Does the environment make certain strategies more or less attractive, by adjusting the potential risks and rewards? Can enemies weave in and out of clouds, breaking line-of-sight and attacking from unexpected angles?
  • What are the enemies’ goals? If they want to kill or otherwise impede
    the PCs, they might as well focus on damaging the airship itself.
    This can change combat from an HP-reduction grind into a race against
    time, and can also keep enemies out of easy reach of spells and
    ranged attacks. If the enemies want something other than slaughter, the fight being relatively easy for the PCs may not be enough to truly “win” the combat encounter
  • Some condition exists that means things get worse until that
    condition is fixed. In one combat I ran, my players were in a small
    ship trying to escape from a massive Orcish warship, which had shot a
    large hauser-connected harpoon into their deck. As long as the ships
    stayed attached, orcs kept climbing across the rope to board the
    ship. The PCs had to fight the boarders and cut through the hauser
    or rip out the harpoon, or else the fight would (effectively) never
    end and they would eventually be overwhelmed

Adventure-day design is a different beast than single-encounter design

Encounter design is always an art, and designing a challenging combat is different from designing a difficult adventuring day. A combat might be tough, but with lots of resources a party might be able to prevail. An adventuring day being tough, in contrast, means more questions about whether or not it’s worth spending resources right now (for an easier current combat) versus keeping something in reserve for potential future combats, and surviving those later combats when the resources are gone.

And however easily your players dispatch threats in a given fight, if they have more fights they will eventually run low on resources and face much greater danger. More combat encounters per day, with fewer opportunities for rest, lead to much greater challenges for the party.

content type – How do I make fields for documents but not the doc set they reside in?

I need to be able to create document sets where each document with the doc set has a required field, without requiring that that field be required when the doc set is created.

When I click on “+ New” in our document library, the only option is to create a new document set. This is how we want it, but at the Doc Set level, we only care about a location and borrower name as seen in the following image:
Required Fields for Document Set

Once we click save, however we need to have a required column (called “Borrower Doc Type”) that ensures users designate what type of borrower document they’re uploading to the document set. This is a Choice column that will be different for each document with in the doc set. We have tried the following:

  • adding the custom “Borrower Doc Type” column to the Doc Set as required – This makes it so that the user is prompted to add the “Borrower Doc Type” when the doc set is created, but that is wrong because there is no single Doc Type that applies to the entire Document Set. We just need to know the document type of the files added to the doc set.
  • adding the custom “Borrower Doc Type” column to the document library – This ensures that the user doesn’t have to enter the Borrower Doc Type when the document set is created, but it does not make the column required for documents uploaded to the document set.

We’re using SharePoint Online via Office365. I feel like I’m running around in circles trying to figure this out, but I’m positive it should be a simple solution.

content type – Hot do I make fields for documents but not the doc set they reside in?

I need to be able to create document sets where each document with the doc set has a required field, without requiring that that field be required when the doc set is created.

When I click on “+ New” in our document library, the only option is to create a new document set. This is how we want it, but at the Doc Set level, we only care about a location and borrower name as seen in the following image:
Required Fields for Document Set

Once we click save, however we need to have a required column (called “Borrower Doc Type”) that ensures users designate what type of borrower document they’re uploading to the document set. This is a Choice column that will be different for each document with in the doc set. We have tried the following:

  • adding the custom “Borrower Doc Type” column to the Doc Set as required – This makes it so that the user is prompted to add the “Borrower Doc Type” when the doc set is created, but that is wrong because there is no single Doc Type that applies to the entire Document Set. We just need to know the document type of the files added to the doc set.
  • adding the custom “Borrower Doc Type” column to the document library – This ensures that the user doesn’t have to enter the Borrower Doc Type when the document set is created, but it does not make the column required for documents uploaded to the document set.

We’re using SharePoint Online via Office365. I feel like I’m running around in circles trying to figure this out, but I’m positive it should be a simple solution.