mysql – Improves range of match operation and which one is executed first, range or match

I am using MySQL version 5.6.10

I have a very big table large_table and a relatively small table small_table

The small_table has only the records of the date 2019-11-20

There is a column where I want to update small_table whose entry is in large_table, I have a unique key to find the line and then get the column large_table and update it in `small_table.

I ran the following query

    small_table, large_table 
    small_table.start_time = large_table.start_time 
    small_table.uuid = large_table.uuid 

The above query takes a very long time. I was wondering if I could improve the query by specifying the date range in large_table to like

    small_table, large_table 
    small_table.start_time = large_table.start_time 
    small_table.uuid = large_table.uuid and
    large_table.time >= '2019-11-20' and large_table.time < '2019-11-21'

Would the above query reduce the execution time?

Basically, I want to know what is Would it make a difference to specify area and match, or does the area matter if the match is specified,

As @danblack mentioned in the comment, I would like to add another question.

I could tell you if I have an index small_table or large_table but I know what impact it would have in another case.

So I would like to know too How would that affect if

  1. large_table had indexing, but small_table Not
  2. small_table had indexing, but large_table Not
  3. Both small_table and large_table had indexing
  4. Both small_table and large_table had no indexing

dnd 5e – Can the bonus action Two Weapon Combat with a crossbow be used after an unarmed attack has been executed?

Two arms fighting

When you execute Attack and attack with a light melee weapon that you hold in one hand, you can use a bonus action to attack with another light melee weapon that you hold in the other hand. You will not add your ability modifier to the damage of the bonus attack unless this modifier is negative.

Unarmed attacks are not carried out with "light" weapons, they are not suitable for TWF.

You could, however, for example:

  1. Attack with a light weapon, eg a dagger
  2. Divide your dagger as a free object interaction
  3. Load your crossbow with your now free hand
  4. Fire Hand crossbow

The problem you come across is that you can not pull and wrap your dagger at the same time without performing any action.

However, Jeremey Crawford has a suggestion:

The intention is that you can drop something effortlessly. As a DM I would let you drop something and draw something

So if you can play with your DM by Crawford's rules, you can work around this by having several daggers:

  1. Draw a dagger
  2. Attack with the dagger
  3. Drop the dagger
  4. Load your crossbow
  5. Fire Hand crossbow
  6. Repeat as often as you have daggers
  7. Stop and pick up all your daggers

To emphasize again, unarmed attacks are not "easy". You must use a weapon with the Light property.

Code is not executed correctly

I'm trying to do a search in an XML base and the

using System;

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

ConsoleApplicationMegasenaq2 Namespace
Class program
static gap Main (string () args)
// Use the XmlTextReader class
XmlTextReader ceps = new XmlTextReader ("File: /// C: /ceps.xml");

        string logradouro = "", cep = "", d6 = "";

        Console.Write("Entre com o CEP: ");
        cep = Console.ReadLine();

        while (ceps.Read())
            if (ceps.NodeType == XmlNodeType.Element && ceps.Name == "cep")
                cep = (ceps.ReadString());
            if (ceps.NodeType == XmlNodeType.Element && ceps.Name == "logradouro")
                logradouro = (ceps.ReadString());
            if (ceps.NodeType == XmlNodeType.Element && ceps.Name == "d6")

                d6 = (ceps.ReadString());

                if (cep == logradouro)
                    Console.WriteLine("O nome da rua é: "
                    + logradouro
        } // Fim While
        ceps.Close(); // Fecha o arquivo xml

    } // Fim main
} // Fim class

} // end namespace

Unit – Coroutine only partially executed

I have a coroutine that I can use to pull and spawn an opponent in my game. This coroutine works fine except for the very first call. I'm pretty sure that's because I'm probably loading something before it's done, but I do not know enough to know where.

This is my code (notice the debug.log entries). I have removed everything that I consider irrelevant code.

  1. EnemyHandler.cs

    public class EnemyHandler : MonoBehaviour
    IEnumerator LoadMob()
        Debug.Log("Checkpoint 1");
        WWWForm form = new WWWForm();
        WWW www = new WWW("my-url-here",form);
        yield return www;
        Debug.Log("@@@@@@ Checkpoint 2 @@@@@@");
        string() webResults = www.text.Split('t');
        int returncode = int.Parse(webResults(0));
        switch (returncode)
            case 0:
            //Mob Loaded Successfully
            //Mob variables are set here
            Debug.Log("@@@@@@ Checkpoint 3 @@@@@@");
     public void CallMobLoad(int requested_mob_id)
         mob_id = requested_mob_id;
         Debug.Log("Coroutine called! Checkpoint 0");

2.GameManager.cs (This is my main class)

public class GameManager : MonoBehaviour
    public GameObject spawnManager;
    public static EnemyHandler thisenemy;

    void Start()
     thisenemy = spawnManager.AddComponent();

CallMobLoad is called once at startup and every time a monster dies. It never works when called in Start (), but it always works after that.

In addition, the first call only calls the first Debug.Log "Checkpoint 1", none of the other checkpoints is hit. Each subsequent call works properly and applies to all checkpoints.

I really want to learn how / why this happens. Any help is greatly appreciated!

7 – D7 Form return callback function is not executed in the form added in the node

So I have a form function in my module file

function mysimple_form($form, &$form_state) {

    $form('#method') = 'get';
    $form('#action') = '/buy/{_val_}';
    $form('search_location') = array(
        '#type' => 'textfield',
        '#title' => 'Search',
        '#default_value' => t('kathmandu'),
        '#size' => 60,
        '#maxlength' => 128,
        '#required' => TRUE,
        '#attributes' => array(
          'placeholder' => t('Search')
    $form('submit') = array(
        '#type' => 'submit',
        '#value' => t('Search'),
    $form('#submit')() = 'mysimple_form_submit';
    return $form;

And I have the callback function

function mysimple_form_submit($form, &$form_state) {

and I'll call my form in the hook node view as below

function mymodule_node_view($node, $view_mode, $langcode) {

     $form = drupal_get_form('mysimple_form');
     $node->content('simpleform') = array(
        '#weight' => -1,
        '#markup'=> drupal_render($form)

The form is displayed perfectly, but the callback function does not seem to work.
I tried variations like that

$form('actions')('#submit)() = 'mysimple_form_submit';


$form('actions')('submit')('#submit)() = 'mysimple_form_submit';

None of them calls the callback function, so I ask that question.

sharepoint online – The SPFx extension is only executed on the start page

I've created a spfx extension that applies the styling that I only want to run on the homepage. How can I achieve this? Here is onInit method, I tried it and still apply the styling, even if "isWebWelcomePage" is wrong. Am I doing something wrong?

public onInit(): Promise {

    if (this.context.pageContext.legacyPageContext.isWebWelcomePage) {
        //Apply style overrides

        //Make sure style is loaded after placeholader changes
        this.context.placeholderProvider.changedEvent.add(this, () => {
        this.context.application.navigatedEvent.add(this, () => {

        //Load CSS definde in properties
        if ( {
   => {
    return Promise.resolve();

unity code is executed selectively only when a specific trigger collider has been hit

I have not found any relevant information. So the best solutions I can think of are just workarounds, and there are probably no integrated solutions to do that. It is indeed very uncomfortable.

(SerializeField) private GameObject _hammerHeadGameObject;

(SerializeField) private LayerMask _impulseLayerMask;
(SerializeField) private CinemachineImpulseSource _cinemachineImpulseSource;
(SerializeField) private GamepadHapticSettings _hapticSettings;

private void OnCollisionEnter(Collision other)
    if ((this._impulseLayerMask & (1 << other.collider.gameObject.layer)) != 0)
        for (int a = 0; a < other.contactCount; a++)
            if (other.contacts(a).thisCollider.gameObject == this._hammerHeadGameObject)


private void OnTriggerEnter(Collider other)

This is an example of how I get Collider Collision, Not the most efficient solution, but it works. The problem with Collider – There is a high probability that it is not possible to make contacts, at least I have not figured out how to do it.


We can simulate our own collision to get information. The process is pretty simple:

  1. Trigger a collision.
  2. Find out what kind of collider it is.
  3. Simulate a collision with the same settings (limits, size, offset …).
  4. Get Kollider that got hit (these are the ones you're looking for).

Small example:

private void OnTriggerEnter(Collider other)
    if ((other as BoxCollider) != null)
        BoxCollider boxCollider = (other as BoxCollider);

        Collider() colliders = Physics.OverlapBox(, boxCollider.size / 2f, boxCollider.transform.rotation); // I am not sure about (/ 2f) - not tested.

Basically, we solve this from a different perspective from the original. We take the collision information from other colliders who hit the colliders we need information about.

The same applies to the second solution.


In this approach we reverse the collision. Instead of finding the collision in the original object. We have attached the script to other objects that may collide with it. And in a collision, we notify the object that it has been hit and pass it to a collider that has been hit.

private void OnTriggerEnter(Collider other)
    if (other.TryGetComponent(out ObjectThatCanBeHit objectThatCanBeHit))
        objectThatCanBeHit.CollisionHappened(other); // There we process that collision.

All in all, the first solution is more flexible, but requires more computing power for many collisions. Although the second one can be very intense, it all depends on the number of objects in the scene and the number of collisions. It would therefore require a kind of benchmark, I just say that for the first step more computing power is required from the first sight and the intuition.

c – My last case, if only statements are executed

I'm a beginner and I've tried to create a code that solves a second-degree equation using double and boolean values, but for some reason only the last if statements that appear in the console each time

        printf("The equation is from first degree");
    else if(D<0){
    else if (D=0){
        printf("The solution is : %lf",S);
    else if((X=true)&&(A=false)){
        printf("The solutions is: %lf and %lf",S1,S2);
    else if ((A=false)&&(X=false)){
        printf("There is no solutions.");
    return 0;

I expected different results for different values ​​of a, b, and c, but the console only shows that there is no solution, no matter what the value is

sharepoint online – The property or field & # 39; ItemCount & # 39; was not initialized. It was not requested or the request was not executed

I have the following code in our server-side event receiver. The code should connect to a Sharepoint online list and show the total number of items. Here is the code:

     currentItem("Status") = "Pending";
     if (currentItem.ContentType.Name.ToLower().Contains("project"))

           using (ClientContext context = new ClientContext("https://***"))
             string s = "***";
             SecureString passWord = new SecureString();
             foreach (var c in s)
             context.Credentials = new SharePointOnlineCredentials("admin@****", passWord);
             List list = context.Web.Lists.GetByTitle("Project");
             var countItems = list.ItemCount;

   catch (Exception e)
     var errormessage = e.Message;

but I get this exception: –

Microsoft.SharePoint.Client.PropertyOrFieldNotInitializedException was caught
  Message=The property or field 'ItemCount' has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
       at Microsoft.SharePoint.Client.ClientObject.CheckUninitializedProperty(String propName)
       at Microsoft.SharePoint.Client.List.get_ItemCount()
       at OrderManagement.EventReceiver1.EventReceiver1.ItemUpdated(SPItemEventProperties properties)

Can someone give me some advice on how to fix this?