General question on choosing an Assembly language based on my goal

So I know assembly is so big and it seems learning assembly is like learning high level programming, you don’t need to learn them all, you can learn couple and this will be enough.

The thing is with high-level language it is easier to grasp and implement in your life. But I am having hard time with assembly, I learned ARM at university, but I am not sure which version it was. And, it wasn’t practical in real life. Also, it was too primitive. It doesn’t even help me read other assemblies. Because when i read other assembly, I am lost seeing too many new commands that I have never seen before.

But I want to learn a language where I can add it to my code or make stand-alone version out of it easily like C++ or C# for Windows, so basically a practical language, also a language with live community and not an abandoned one. i learned some programming languages and they are useless for me like CLIPS, ADA and Prolog.

So what are the useful and practical assembly languages out there to learn for windows. Is FAsm a good start? Also note that I do not know what I want to do with it, I will learn it them when I get good command of it I will decide, I may use it for images, or AI project or anyother use where my path will lead. I already know C++ (i use it for UE4 and AI code implementations), C# (desktop/web) app and java (desktop).

MongoDB query choosing the wrong index in winning plan, Though in executionTimeMillisEstimate as lower for the other index?

MongoDB Query chooses the wrong index in the winning plan. I have two indexes for the same field, one is a single field index and a Compound index with another field.

Eg. Field name: Field1, Contains Yes or No Field name: Field2, Contains 0 or 1 or 2 or 3

Index 1: {'Field1':1} Single Field Index Index 2: {'Field1':1,'Field2':1} Compound Index.

On Search Query {‘Field1′:’Yes’} for Field1 it uses the compound index, instead of single key index. Attached below is the query execution plan.

{     "queryPlanner" : {         "plannerVersion" : 1,         "namespace" : "xxxx",         "indexFilterSet" : false,         "parsedQuery" : {             "Field1" : {                 "$  eq" : "Yes"             }         },         "winningPlan" : {             "stage" : "FETCH",             "inputStage" : {                 "stage" : "IXSCAN",                 "keyPattern" : {                     "Field1" : 1,                     "Field2" : 1                 },                 "indexName" : "Field1_Field2_1",                 "isMultiKey" : false,                 "multiKeyPaths" : {                     "Field1" : [],                     "Field2" : []                 },                 "isUnique" : false,                 "isSparse" : false,                 "isPartial" : false,                 "indexVersion" : 2,                 "direction" : "forward",                 "indexBounds" : {                     "Field1" : [                          "[\"Yes\", \"Yes\"]"                     ],                     "Field2" : [                          "[MinKey, MaxKey]"                     ]                 }             }         },         "rejectedPlans" : [              {                 "stage" : "FETCH",                 "inputStage" : {                     "stage" : "IXSCAN",                     "keyPattern" : {                         "Field1" : 1                     },                     "indexName" : "Field1_1",                     "isMultiKey" : false,                     "multiKeyPaths" : {                         "Field1" : []                     },                     "isUnique" : false,                     "isSparse" : false,                     "isPartial" : false,                     "indexVersion" : 2,                     "direction" : "forward",                     "indexBounds" : {                         "Field1" : [                              "[\"Yes\", \"Yes\"]"                         ]                     }                 }             }         ]     },     "executionStats" : {         "executionSuccess" : true,         "nReturned" : 762490,         "executionTimeMillis" : 379131,         "totalKeysExamined" : 762490,         "totalDocsExamined" : 762490,         "executionStages" : {             "stage" : "FETCH",             "nReturned" : 762490,             "executionTimeMillisEstimate" : 377572,             "works" : 762491,             "advanced" : 762490,             "needTime" : 0,             "needYield" : 0,             "saveState" : 16915,             "restoreState" : 16915,             "isEOF" : 1,             "invalidates" : 0,             "docsExamined" : 762490,             "alreadyHasObj" : 0,             "inputStage" : {                 "stage" : "IXSCAN",                 "nReturned" : 762490,                 "executionTimeMillisEstimate" : 1250,                 "works" : 762491,                 "advanced" : 762490,                 "needTime" : 0,                 "needYield" : 0,                 "saveState" : 16915,                 "restoreState" : 16915,                 "isEOF" : 1,                 "invalidates" : 0,                 "keyPattern" : {                     "Field1" : 1,                     "Field2" : 1                 },                 "indexName" : "Field1_Field2_1",                 "isMultiKey" : false,                 "multiKeyPaths" : {                     "Field1" : [],                     "Field2" : []                 },                 "isUnique" : false,                 "isSparse" : false,                 "isPartial" : false,                 "indexVersion" : 2,                 "direction" : "forward",                 "indexBounds" : {                     "Field1" : [                          "[\"Yes\", \"Yes\"]"                     ],                     "Field2" : [                          "[MinKey, MaxKey]"                     ]                 },                 "keysExamined" : 762490,                 "seeks" : 1,                 "dupsTested" : 0,                 "dupsDropped" : 0,                 "seenInvalidated" : 0             }         },         "allPlansExecution" : [              {                 "nReturned" : 101,                 "executionTimeMillisEstimate" : 0,                 "totalKeysExamined" : 101,                 "totalDocsExamined" : 101,                 "executionStages" : {                     "stage" : "FETCH",                     "nReturned" : 101,                     "executionTimeMillisEstimate" : 0,                     "works" : 101,                     "advanced" : 101,                     "needTime" : 0,                     "needYield" : 0,                     "saveState" : 10,                     "restoreState" : 10,                     "isEOF" : 0,                     "invalidates" : 0,                     "docsExamined" : 101,                     "alreadyHasObj" : 0,                     "inputStage" : {                         "stage" : "IXSCAN",                         "nReturned" : 101,                         "executionTimeMillisEstimate" : 0,                         "works" : 101,                         "advanced" : 101,                         "needTime" : 0,                         "needYield" : 0,                         "saveState" : 10,                         "restoreState" : 10,                         "isEOF" : 0,                         "invalidates" : 0,                         "keyPattern" : {                             "Field1" : 1                         },                         "indexName" : "Field1_1",                         "isMultiKey" : false,                         "multiKeyPaths" : {                             "Field1" : []                         },                         "isUnique" : false,                         "isSparse" : false,                         "isPartial" : false,                         "indexVersion" : 2,                         "direction" : "forward",                         "indexBounds" : {                             "Field1" : [                                  "[\"Yes\", \"Yes\"]"                             ]                         },                         "keysExamined" : 101,                         "seeks" : 1,                         "dupsTested" : 0,                         "dupsDropped" : 0,                         "seenInvalidated" : 0                     }                 }             },              {                 "nReturned" : 101,                 "executionTimeMillisEstimate" : 260,                 "totalKeysExamined" : 101,                 "totalDocsExamined" : 101,                 "executionStages" : {                     "stage" : "FETCH",                     "nReturned" : 101,                     "executionTimeMillisEstimate" : 260,                     "works" : 101,                     "advanced" : 101,                     "needTime" : 0,                     "needYield" : 0,                     "saveState" : 10,                     "restoreState" : 10,                     "isEOF" : 0,                     "invalidates" : 0,                     "docsExamined" : 101,                     "alreadyHasObj" : 0,                     "inputStage" : {                         "stage" : "IXSCAN",                         "nReturned" : 101,                         "executionTimeMillisEstimate" : 0,                         "works" : 101,                         "advanced" : 101,                         "needTime" : 0,                         "needYield" : 0,                         "saveState" : 10,                         "restoreState" : 10,                         "isEOF" : 0,                         "invalidates" : 0,                         "keyPattern" : {                             "Field1" : 1,                             "Field2" : 1                         },                         "indexName" : "Field1_Field2_1",                         "isMultiKey" : false,                         "multiKeyPaths" : {                             "Field1" : [],                             "Field2" : []                         },                         "isUnique" : false,                         "isSparse" : false,                         "isPartial" : false,                         "indexVersion" : 2,                         "direction" : "forward",                         "indexBounds" : {                             "Field1" : [                                  "[\"Yes\", \"Yes\"]"                             ],                             "Field2" : [                                  "[MinKey, MaxKey]"                             ]                         },                         "keysExamined" : 101,                         "seeks" : 1,                         "dupsTested" : 0,                         "dupsDropped" : 0,                         "seenInvalidated" : 0                     }                 }             }         ]     },     "serverInfo" : {         "host" : "xxxxx",         "port" : 27017,         "version" : "3.6.0",         "gitVersion" : "xxxxx"     },     "ok" : 1.0 } 

The executionTimeMillisEstimate for single filed index is 0 where us executionTimeMillisEstimate for the compound index is 260, then why still it uses the compound index in winning plan. I am using a single field query for single field index why it uses compound index?

Choosing $r$ things from a set containing $l$ things of one kind, $m$ things of a different kind, $n$ things of a third kind,…

Here is a statement from a textbook that I’m referring to:

From a set containing $ l$ things of one kind, $ m$ things of a different kind, $ n$ things of a third kind and so on, the number of ways of choosing $ r$ things out of this set of objects is the coefficient of $ x^r$ in the expansion of $ $ (1+x+x^2+x^3+…+x^l)(1+x+x^2+x^3+…+x^m)(1+x+x^2+x^3+…+x^n).$ $

Can someone please explain the intuition behind this? How can it be derived?

Choosing compression method and settings for mp4 files

I’ve got a hard drive filled up with videos, and want them to take up as little space as possible.

 

Video encoding:

  • Around 20000 kbps datarate and bitrate
  • 30 frames/second
  • H.264 AVC

Audio encoding:

  • AAC
  • 96 kbps
  • Stereo channels
  • 48 KHz sample rate

 

They’re separated into multiple folders, and here’s an example folder:

  • 29 files
  • Total duration of around 6 hours
  • Total size of around 25 GB
  • File size tends to vary between 650 MB and 1.25 GB

 

What I want to know is how to choose settings like dictionary size, word size, solid block size, etc. I’m assuming that 7z with LZMA2 is best for the archive format and compression method.

Choosing Correct statistical test

I have a data of 2 groups that is 15 members on each group. our dependent values are time and score. I am sure that my data is not normally distributed. I am confused which test to use for my effective result. Could someone please help me on this problem

when we tried test the normality we got signification values of( Shapiro-wilk result: (1group: .227) (2 group : .0009)) score ( shapir-wilk result: (1 group : .000) (2 group: .001)).

Could someone recommend me good statistical test to perform and please guide if i missed something to test.

Two players choosing one of three numbers


$ A$ and $ B$ play the following game. Initially, for positive integer $ n$ , each player takes turns choosing one of three numbers:

  • $ 1$

  • the number of digits of $ n$

  • the sum of the digits of $ n$ .

and then updates the number $ n$ by subtracting the number selected. If $ n$ becomes $ 0$ , the person who has that turn wins. Who will be the winner if $ A$ is always the first to go?

For example:

  • With $ n=3$ , the result is $ A$ , because $ A$ chooses the number that is the sum of the digits of $ n = 3$ , after selecting, $ n$ is updated and becomes $ 0$ . So $ A$ wins.

  • With $ n=10$ , the result is $ B$ , because $ A$ can only choose $ 1$ or $ 2$ (because the number of digits of $ 10$ is $ 2$ and the sum of the digits of $ 10$ is $ 1$ ). So, when choosing, $ n$ can only be $ 8$ or $ 9$ . Next $ B$ selects $ 8$ or $ 9$ and wins.

My problem is to determine who the winner is when $ n$ is known.

With the Deflect Missiles monk feature, does the player know the damage of the attack before choosing to deflect?

The monk’s Deflect Missiles feature description says (PHB, pg. 78):

Starting at 3rd level, you can use your reaction to deflect or catch the missile when you are hit by a ranged weapon attack.

I take this to mean that the player controlling the monk gets to decide whether or not to use Deflect Missiles after they know whether or not the attack hits.

It continues:

When you do so, the damage you take from the attack is reduced by 1d10 + your Dexterity modifier + your monk level.

Does the monk’s player get to know the damage before they decide to use Deflect Missiles? Or is damage is rolled after they choose to use the feature?

How to make reviewers in Stack Exchange’s low-quality review realise the consequences of choosing a canned comment?


Summary

How can the interface for choosing canned comments when opting to delete in Stack Exchange’s low-quality queue be improved to make reviewers more aware of the actual effects of their choice.

Current situation

The current interface faced by reviewers who opt to delete a post in the low-quality queue on Stack Exchange is this:

  1. They are shown the post and then can make their actual choice, i.e., whether they want it to be deleted, want to edit it, etc:

    main interface of the low-quality queue

  2. Reviewers who opt to delete, are presented with a choice of canned comments to be left on the post on their behalf:

    selection of canned comments in the low-quality queue

The problem

Many reviewers never or almost never choose the no comment needed option, even though there already is a comment expressing the same thing on the post (thus making the new comment redundant) or none of the comments applies. Please assume this problem as given for the purpose of this question. If you want to debate this, here is a question on Meta SE where it would probably be well placed.

As far as I can tell, the reason for this is a mix of:

  • A variation of banner blindness that makes reviewers never (re)read the header of the canned-comment dialogue.

  • Users think that their choice in the canned-comment dialogue does more than just leaving a comment such as contributing to some statistics or affecting what happens to the post (e.g., this is a commentary actually effecting comment conversion).

  • Users think that no comment needed is not the right thing to do and may be held against them. (This is is not completely unjustified, because it is actually true, when one of the canned comments is spot-on and there is no equivalent comment yet.)

  • The interface focusses on the reason for deletion (e.g., “This is a ‘thank you’ comment.”), not on the comment that is actually chosen.

My question

How could the interface be improved such that it is more clear that the canned comments are just canned comments and that leaving no comment can be a valid choice?

What I considered so far

The following options do not convince me though at least the first one would be better than nothing:

  • One could add more explanation to the no comment needed option such as a text explaining that “This is a good choice if an existing comment already addresses the post’s issues.” However, I fear that this may be affected by the same banner blindness and will be ignored.

  • One could add another level of dialogue: After opting for deletion, users will be presented with a dialogue that allows them only to choose between no comment, canned comment, and possibly custom comment (explaining these choices) and only presents them with a selection of canned comments if they choose canned comment. The disadvantage of this is that it is yet another layer of dialogue and it is not clear what the choices of canned comments are in the first layer.

  • Remove the bold headings displaying the reason for deletion (e.g., “This is a ‘thank you’ comment.”). This should considerably increase the effort for finding the right comment, when one is appropriate.

Azure SQL Server – big query choosing bad execution plan

I’m using Azure SQL Server v12 and I have big, complex query that runs ok but when I add more joins, it doesn’t matter which table I’m joining to, it gets super slow. The important thing to point out is that by adding a simple join it’s choosing a different execution for the whole query and I receive warning on sort operations that are not performed in the original query.

I cannot post the query or the execution plan but I want to know if someone faced a similar case. My intuition tells me that SQL Server is choosing a bad execution plan because the query is so big that it times out when it tries to pick one.

Should I indicate the join type and index name for each join to keep the original execution plan? is that the best way to go?