Does the order of columns in a covering index matter?

I have the following covering indices:

INDEX (col1, col3); -- index 1 INDEX (col1, col2, col3); -- index 2 

because I would like to support the following type of queries:


  SELECT ...     FROM my_table    WHERE col1 = ... AND          col2 = ... ORDER BY col3 


  SELECT ...     FROM my_table    WHERE col1 = ...  ORDER BY col3 

I am unfamiliar with how a covering index works. Is index 1 redundant? Or does a covering index requires that the columns be side by side?

Bonus action spellcasting, does the order of casting matter? [duplicate]

This question already has an answer here:

  • Does order matter when casting a cantrip with a casting time of a bonus action and another spell? 2 answers
  • Which uses of Bonus-Action spellcasting are legal? 1 answer

If you cast let’s say Magic Missile, and then used your bonus action to Quicken Spell let’s say Eldritch Blast, would that not work because of this?:

A spell cast with a bonus action is especially swift. You must use a bonus action on your turn to cast the spell, provided that you haven’t already taken a bonus action this turn. You can’t cast another spell during the same turn, except for a cantrip with a casting time of 1 action.

If you cast a non-cantrip spell as your action, does that just negate your ability to use spells in your bonus action, cantrip or not?

Or is it in order where you only have to cast a spell with your main action first, and only then can you still have your bonus action?

But then that would mean you still had your bonus action, and since you already cast a spell with your main action, can you then use a bonus action to cast a non-cantrip spell, since it only prohibits the casting of non-cantrip spells after a bonus action spell has been used (and it hasn’t been yet)?

Similarly: If you cast a bonus action cantrip first, does that mean you are unable to then cast a non-cantrip spell for your action?

I was always under the assumption that you were only unable to cast non-cantrip spells with either full action or bonus action if the other has already been used to cast a non-cantrip. (hence why Action Surge spellcasting works as that is another full action rather than a bonus action)

In case the question is a bit too badly written by myself to parse, some examples: Are these valid, if not, which of them are?:


Action: Fireball

Action Surge: Fireball

Bonus Action: Shillelagh


Action: Fireball

Bonus Action: Shillelagh

Action Surge: Fireball


Bonus Action: Shillelagh

Action: Fireball

Action Surge: Fireball

Ubuntu 18.04 White(strange)-Noise problem from headphone?( No Matter Sound is play or not)

I’m using win10 and ubuntu 18.04. Whenever enter ubuntu after the grub menu(ıt starts at log.) there is constantly annoying noise from headphone . On win10 there is not problem. Noise comes out only through my headphone. Speakers work properly. I have tried many of solutions below other titles but none of them resolved. This weird noise never goes away. I even muted each input and output volume or listen to any video there is always boring noise. My laptop is Asus n552vw and my kernel version is 4.15 . Is there anyone who can help me ? 🙁

Solutions that I have tried :

-$ alsamixer – disable the loopback

-Adding 0 in the /sys/module/snd_hda_intel/parameters/power_save file

-INTEL_AUDIO_POWERSAVE=false in /usr/lib/pm-utils/power.d/intel-audio-powersave

-adding options snd-hda-intel model=dell-headset-multi in the /etc/modprobe.d/alsa-base.conf

-change the option values SOUND_POWER_SAVE_ON_AC=0 SOUND_POWER_SAVE_ON_BAT=0 in the /etc/default/tlp

-Muted input volume and at hdajackretask changed pin 0x12 internal mic to not connected

( I guess I collected almost all solutions under the single title at least)

Do the order of “Disallow” and “Sitemap” lines in robots.txt matter?

One can sort robots.txt this way:

User-agent: DESIRED_INPUT Sitemap: Disallow: / 


User-agent: DESIRED_INPUT Disallow: / Sitemap: 

I assume both are okay because it’s likely the file is compiled in correct order by generally all crawlers.
Is it a best practice to put Disallow: before Sitemap: to prevent an extremely unlikely bug of a crawler’s bad compilation of crawling before ignoring Disallow:?

Xubuntu setup not allowing to create an extended partition, limits to four total, no matter if primary or logical

I have just been installing Xubuntu on my netbook and after I have let the setup wipe the disk and install it by itself out of laziness. It was half into the setup that I noticed I haven’t seen it create a swap partition in the confirmation dialog, so I have let it complete and then restarted it to manually partition it.

After reading a bit more on the matter itself before doing random things, I have come to the knowledge to place the swap partition at the beginning of the drive so it can be accessed fast and also to place /boot within the first 100 GB of the drive so the BIOS can find and boot from it. I also read more about the importance and advantages of partitions in general and decided to create a few more than just swap, /boot and /.

So halfway into it, having created swap first as logical partition, /boot second as primary partition and / as well as /var as logical partition, the setup refused to create more, stating it was not possible for me to create more than four primary partitions.

Now this was the moment when confusion hit me like a train as I have already read before about that (which is why I have had selected logical for anything but /boot in the first place), because I have only created a single primary partition and not four as the setup stated.

During my research I found that the solution for creating more than four was to use extended partitions but the setup (as opposed to gparted) did not even give me the option to select anything but primary and logical, whereas it obviously didn’t even care what I selected and created only primaries.

I messed around a bit with it and was able to create tons of small logical partitions in a row, but as soon as I have applied the above mentioned configuration, it was over.

So, does the order of the logical and primary partitions matter? If yes, how am I supposed to adhere to “place swap at the beginning of the drive” and “keep your /boot within the first 100GB of the drive” and have more than just two more additional partitions?

When I summon a cat familiar, why does it matter if it is a fey or fiend or celestial?

It says in the summoning spell that when you summon an animal it is a fey fiend or celestial (your choice). What does this do? Do they get any abilities or buffs from these like types? Also if my imp familiar holds me as a rat after wildshaping can it turn me invisible with it? It says anything the imp holds turns invisible as well. Also if my imo steals something can I dismiss it and summon it again holding the object?

For what applications of the traveling salesman problem, does visiting each city at most once truely matter?

Traditionally, the traveling salesman problem has you visit a city at least once and at most once.

However, if you were an actual traveling salesman, you would want the least cost route to visit each city at least once, and you wouldn’t be bothered visiting a city 2, 3, or more times. For given city, you might stop and hawk your wares only once, and on subsequent visits, only drive through the city without stopping.

Consider an undirected graph having a city incident to exactly two edges. The cost on one of these edges is only 10 units, while the cost on the other is 99,999,999,999. If you insist on visiting each city at most once, then you are forced to incur the cost of the high cost edge. However, if you allow yourself to visit cities multiple times, then you simply leave the way you came in (on the low cost edge). The low cost edge leads you back to a city you’ve passed through before.

The traveling salesman problem is highly contrived for an actual traveling salesman. I want to give students an application for which there’s a real incentive to visit each city at most once. For what applications is visiting each city a critical aspect of the problem?

Does magic subschool matter for Spell Specialization?

Spell Specialization says:

Select one spell of a school for which you have taken the Spell Focus feat. Treat your caster level as being two higher for all level-variable effects of the spell.

Every time you gain an even level in the spellcasting class you chose your spell from, you can choose a new spell to replace the spell selected with this feat, and that spell becomes your specialized spell.

Does the feat only matter for the school or does the subschool matter as well?

Example: I have Spell Focus Evocation. If I use Spell Specialization on Magic Missile, school Evocation [force], can I switch it to Fireball, school Evocation [fire]?