Does it matter if a brute force search for a password returns a collision and not the password?

Assume the following very basic hashing algorithm.

h(k) = k mod 17

Let’s say we create a password 12345 for a website that uses this very basic hashing algorithm. That would yield the hash of 3.

Say a brute force attacker comes by and starts guessing numbers starting at 1 they would only have to get to 3 before they got a hash collision and obviously 3 is not the original password.

Is the problem that the password hashing space (0-16) is much smaller than the space of the allowed password, or is there something else I’m overlooking?

Does the Axis matter for the consideration of “Sharing an alignment component”?

Specifically in regards to the Insinuator archetype for the Antipaladin, my question is really about their variant Smite Impudence feature.

It states:

Smite Impudence (Su):

Once per day, an insinuator can beseech the forces empowering him to punish their shared enemies. As a swift action, the insinuator chooses one target within sight to smite.

An insinuator cannot use smite against a target that shares an alignment with the outsider he has invoked for the day.

And then goes on to describe functionality exactly as any other smite (+Cha to hit, +lvl to damage, etc.)

Essentially, at the start of each day, you pick an outsider that has an alignment within one step of yours, and then can Smite targets that have alignments that oppose it, ie LE can smite CG, CN, NG, and TN, but not LG, LN, LE, NE, or CE.

My question is, on the dual alignment axis of Good Vs Evil and Chaos Vs Law, how does Neutral apply? Specifically, does a LN creature have protection from an NE smite? They are both Neutral, but from a different Axis. Does the Axis matter for the consideration of the alignment component, or is simply being Neutral on either axis enough to thwart the Smite?

Rotate object always at same speed on screen, no matter camera distance?

I am rotating a globe like XCOM’s hologlobe,

enter image description here

I rotate it using Quaternion.RotateTowards(Quaternion from, Quaternion to, float maxDegreesDelta).

I found a good value for maxDegreesDelta, in my case it is 5.0f.

There is a limit on how close or far the camera can be, let’s assume clos is 1.0f and far is 2.0f.

I want to be able to zoom into the globe, but obviously when I do, it rotates a bit too fast then.

When zoomed out, rotation speed is satisfying:

enter image description here

When zoomed in, rotation is too fast, making it more difficult to manipulate:

enter image description here

And the problem is even more evident as game view size gets bigger, i.e. fullscreen.

Using Mathf.Lerp and Mathf.InverseLerp, I’ve tried to make maxDegreesDelta and mouse delta proportional to the distance the camera is but it’s hardly convincing.

Note: I rotate the globe, not the camera.

Question:

How can I ensure object rotates at same speed on screen, no matter how close or far camera is ?

How do I join getting one row from the left table, no matter how many matches i get from the right table?

I have two tables – one is a data table and the other is a mapping table. I want to join them together, but only preserve the data from the right table. However, it is possible that the match table may contains multiple records that match to a single record in the right table. I cannot use a DISTINCT because there may be identical rows in the right table, and I want to preserve the same number of rows from the right-table in the result set.

Here is a sample of the data I am working with:

       DataTable                           MappingTable +-----+-----+-----+-----+           +------+------+------+------+ | ID1 | ID2 | ID3 | ID1 |           | ID1  | ID2  | ID3  | ID1  | +-----+-----+-----+-----+           +------+------+------+------+ |  1  |  1  |  1  |  1  |           |  1   | NULL | NULL | NULL | |  1  |  1  |  1  |  1  |           | NULL | NULL | NULL |  1   | |  2  |  1  |  1  |  1  |           |  3   |  3   | NULL | NULL | |  3  |  1  |  1  |  3  |           +------+------+------+------+ |  4  |  1  |  1  |  4  | |  2  |  2  |  1  |  1  | |  3  |  2  |  1  |  3  | |  3  |  3  |  1  |  3  | |  2  |  1  |  0  |  1  | |  2  |  1  |  0  |  1  | |  4  |  3  |  2  |  3  | +-----+-----+-----+-----+ 

Below is the join I am using. I wrote a custom function to handle the NULL-matching behavior, which I am including here as well.

SELECT * FROM DataTable P JOIN MappingTable M ON dbo.fNullMatchCheckIntS(P.ID1,M.ID1,0,1) = 1     AND dbo.fNullMatchCheckIntS(P.ID2,M.ID2,0,1) = 1     AND dbo.fNullMatchCheckIntS(P.ID3,M.ID3,0,1) = 1     AND dbo.fNullMatchCheckIntS(P.ID4,M.ID4,0,1) = 1 

CREATE FUNCTION dbo.fNullMatchCheckIntS (     @Value1 INT     ,@Value2 INT     ,@AutoMatchIfValue1IsNull BIT     ,@AutoMatchIfValue2IsNull BIT )     RETURNS BIT AS  BEGIN      DECLARE @Result BIT = 0      SELECT         @AutoMatchIfValue1IsNull = ISNULL(@AutoMatchIfValue1IsNull,0)         ,@AutoMatchIfValue2IsNull = ISNULL(@AutoMatchIfValue2IsNull,0)      IF         (@AutoMatchIfValue1IsNull = 1 AND @Value1 IS NULL)         OR (@AutoMatchIfValue2IsNull = 1 AND @Value2 IS NULL)         OR @Value1 = @Value2         OR (@Value1 IS NULL AND @Value2 IS NULL)     BEGIN         SET @Result = 1     END      RETURN @Result END 

The problem with the way the join works is that the first two rows in the DataTable match on the first two rows in the MappingTable, giving me four identical records in the result, but I only want 2. I know that I could add an identity column to the DataTable and then use DISTINCT or PARTITION to get the result I am looking for, but I would like to avoid that route if possible.

EDIT: I figured out a way to do this using EXISTS, but it looks a little ugly in my opinion. Still interested in other answers if anyone has an idea. Thanks!

SELECT * FROM DataTable D WHERE EXISTS (     SELECT D.ID1, D.ID2, D.ID3, D.ID4     FROM MappingTable M      WHERE dbo.fNullMatchCheckIntS(D.ID1,M.ID1,0,1) = 1         AND dbo.fNullMatchCheckIntS(D.ID2,M.ID2,0,1) = 1         AND dbo.fNullMatchCheckIntS(D.ID3,M.ID3,0,1) = 1         AND dbo.fNullMatchCheckIntS(D.ID4,M.ID4,0,1) = 1 ) 

If you cast True Polymorph on matter made with the Creation spell will the creature disappear after the duration of Creation ends?

Cast creation to make vegetables that last a day, then cast true polymorph to make a dwarf from the vegetables, does the Creature disappear after a day? It says that if you use the matter created by Creation as a component the spell fails but True Polymorph doesn’t use the target as a component.

Can solid voxelization be done with 1-direction raytracing if the raytracer is watertight? Does the direction matter?

This article and some others mention requiring the following when voxelizing:

1: Shooting rays from multiple directions (maybe with a voting system to decide if the voxel is active?)

2: Shooting rays (or advancing down the slice) from the side of the model with greatest cross-sectional area

3: Stretching primitives

However, the basis is different. That’s surface voxelization which involves doing intersection tests of the primitives against the voxels.

If doing solid (not surface) voxelization using a watertight ray-triangle intersection test, do I need to do any of that? Are there any cases where the voxelization will be “wrong”? If so, which do I need?

(For my use case, using a non-raytracing approach isn’t workable, sadly)

I wish I could tag this properly, I would include voxelization, raytracing, and primitives. No existing tags fit this question.

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:

1)

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

2)

  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?:

1)

Action: Fireball

Action Surge: Fireball

Bonus Action: Shillelagh

2)

Action: Fireball

Bonus Action: Shillelagh

Action Surge: Fireball

3)

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)