keyboard – Reason for difference in behaviour of autcomplete interactions in input fields

There seems to be two different schools of thought when it comes to the autocompletion of input fields and I am wondering if there is a particular reason or rationale for each.

Basically, when the user is completing an input field (usually text based) it is typical for autocomplete functionalities to be implemented when there has been previous inputs provided. The user can then choose to continue completing the input or to use the autocomplete feature by:

  • Pressing the ENTER key
  • Pressing the TAB key

Alternatively they can use the mouse and click on the autocomplete suggestion but it breaks the flow of typing from the keyboard.

Is there any particular reason (both from a technical AND user perspective) why some sites use the ENTER key while others use the TAB key for this? I think it creates a confusion because it is likely for a user to go to websites that implement this feature both ways.

number theory – Can we determine which integers can be written as the difference of two cubes?

I would like to know whether we can determine which integers can be written as the difference of two cubes. Algebraically, this can be stated as finding the image of $f:mathbb{Z^2}to mathbb{Z}, f(x,y)=x^3-y^3$. I came up with this idea after I saw that any integer that is not congruent to $2$ modulo $4$ can be written as the difference of two squares. I tried to apply the same reasoning here, but to no result. I thought about looking at $x^3$ modulo $6$ and modulo $8$, but this doesn’t produce anything, because there are far too many combinations. So I wonder if this is doable or not.

mac mini – What results in the price difference for seemingly the same product?

I am considering buy the latest Apple Mac Mini M1 with 512GB storage from Apple or from Amazon. Apple lists it at $899 while Amazon lists it at $859. What is the hardware/software different that results in Amazon being $40 cheaper than from Apple directly?

hardware wallet – What is the difference between PSBT support in Coldcard and Trezor?

The Coldcard handles PSBT directly and natively. A PSBT can given to the device by writing it to a microSD card and inserting the card into the device. It will be able to load the PSBT and process it as a transaction. Additionally when communicating with the device over USB, PSBTs can be given directly instead of being packed into another data structure.

However other hardware wallets like the Trezor do not have this capability yet. Instead these must be given transactions over USB and those transactions must be packed into device specific data structures. The HWI software does this translation for users – it takes PSBTs and converts them into the format that each hardware wallet uses.

canon rp – What is the difference between the autofocus (Eye AF) in the R/RP and R5/R6?

I myself own a Canon EOS R and cannot believe how much I needed eye AF until I tried it. After Canon has started shipping R5 and R6 I am wondering how the eye AF differs in these models compared to especially the R.

I have yet to find a review that goes into detail about this specifically.

I am hoping that someone in here can help?

What's The Difference Between A Url And A Link?

Hello friends,

What’s the difference between a URL and a link?

sql – Understanding the difference in output for finding Revenue by Store in Sakila Database

I am trying to find the Revenue by Store in Sakila Database(Demo Database from MySQL).

Sakila Structure

I am doing this :

SELECT store.store_id, SUM(payment.amount) as total_revenue
FROM rental
INNER JOIN payment on rental.rental_id = payment.rental_id
INNER JOIN staff on payment.staff_id = staff.staff_id
INNER JOIN store on staff.store_id = store.store_id
GROUP BY store.store_id
ORDER BY 2

This is the result of the above query:

+--------+-----------+
|store_id|sum(amount)|
+--------+-----------+
|1       |33482.50   |
|2       |33924.06   |
+--------+-----------+

But when I am doing this :

SELECT i.store_id, SUM(p.amount) as total_revenue
FROM rental r
INNER JOIN payment p ON r.rental_id = p.rental_id
INNER JOIN inventory i ON i.inventory_id = r.inventory_id
GROUP BY i.store_id
ORDER BY 2

I am getting this result:

+--------+-----------+
|store_id|sum(amount)|
+--------+-----------+
|1       |33679.79   |
|2       |33726.77   |
+--------+-----------+

Can some one explain what is the best way to find out the Total Revenue by Store ?

Calculate time difference in minute on SQL workbench J

I tried to calculate time difference between two time stamp column in minutes, but the timestampdiff function does not work on it, the error is telling me that “minute” column does not exist in the table I query, at same time some answers suggest that timestampdiff does not work for postgresql, but postfresql function like date_part does not work on my end as well, could anyone share experience or any document for the grammar and function on SQL workbench J? Thanks!

c# – Difference between methods – onClick.AddListener and On Click under UI button inspector?

Within my Unity Project in my code, (see below), I have a button called Check which executes when CheckPress() function is called. I read two approaches by which this can be done.

Appraoch 1: Using Check.onClick.AddListener(CheckPress); and then attaching script to Canvas. When I press run and click the Check button, this works.

Approach 2: The other approach I read is that, I can attach my script to Canvas. From there I select the button Check from hierarchy, then under inspector I see On Click(), I click + sign and then drag the Canvas and place it in Object (see the attached image), then under No Function I select the CheckButtonBehaviour Script and select the CheckPress(). When I press run and click the Check button, this also works as intended.

I wanted to know if these two approaches are same or different. If they are different, then in which context either approach should be implemented.

using System.Collections.Generic;
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
using System.IO;
using System.Threading;
using UnityEditor;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System;
using System.Linq;


public class CheckButtonBehaviour : MonoBehaviour
{

public Button Check;
public Button Play;
public Button NextSignal;

public List<string> signals = new List<string> {"Speech1", "Speech2", "Speech3", "Speech4"};
public List<string> shuffledSignals = new List<string>();
public int index = 1;
public int counter = 3;


private static int localPort;
private string IP;  
public int port = 8050;
IPEndPoint remoteEndPoint;
UdpClient client;


void Start()
{
    
    var rndr = new System.Random();
    shuffledSignals = signals.OrderBy(i => rndr.Next()).ToList();

    IP = "127.0.0.1";
    port = 8050;
    remoteEndPoint = new IPEndPoint(IPAddress.Parse(IP), port);
    client = new UdpClient();
    Play.gameObject.SetActive(false);
    NextSignal.gameObject.SetActive(false);

    Check.onClick.AddListener(CheckPress);

}

public void CheckPress()    
{
    

    byte() data0 = Encoding.ASCII.GetBytes("starting"); ///OLD CODE part
    client.Send(data0, data0.Length, remoteEndPoint);
    Debug.Log("<color=blue>Something is sent to MAX</color> : starting");

    Check.gameObject.SetActive(true);
    Check.interactable = false;
    Check.enabled = false;

    Play.gameObject.SetActive(true);
    NextSignal.gameObject.SetActive(true);

   
}

multi signature – Difference between createmultisig and addmultisigaddress on v 0.20.0?

What is difference between createmultisig and addmultisigaddress? I ran 2 methods for 2 same bitcoin address on bitcoin-cli but gives different addresses as multisig to me. the results are as follows:

>  bitcoin-cli -testnet createmultisig 2 "("03f47a5115cd9e5e21b94136db90e2e3d6ac7e40396d8e62f73df3fd3fcfb3f214","0395ad430034c1761bbe9b4dfd784fb06229970d54016a7e090fc6ceb3814611b5")"
RESULT:
{
  "address": "**2Mt1jgrBoojAHbJS5zGJTZnx4TFktUCCNxu**",
  "redeemScript": "522103f47a5115cd9e5e21b94136db90e2e3d6ac7e40396d8e62f73df3fd3fcfb3f214210395ad430034c1761bbe9b4dfd784fb06229970d54016a7e090fc6ceb3814611b552ae",
  "descriptor": "sh(multi(2,03f47a5115cd9e5e21b94136db90e2e3d6ac7e40396d8e62f73df3fd3fcfb3f214,0395ad430034c1761bbe9b4dfd784fb06229970d54016a7e090fc6ceb3814611b5))#6nexfs8d"
} ```

> bitcoin-cli -testnet addmultisigaddress 2 "("2NEy9um4CpWerPeaEhPa3TckNYWnh58yDXN","2Mxr2oaph8iapbnbL1MSEvfZH8EQaXYuhAy")"

RESULT: 
 {
  "address": "**tb1qjyvx2kwl4kq2cypj5zawhw5gpwxmphxe487z3hxj9m36ux8tylpszpazsu**",
  "redeemScript": "522103f47a5115cd9e5e21b94136db90e2e3d6ac7e40396d8e62f73df3fd3fcfb3f214210395ad430034c1761bbe9b4dfd784fb06229970d54016a7e090fc6ceb3814611b552ae",
  "descriptor": "wsh(multi(2,(a025344d/0'/0'/0')03f47a5115cd9e5e21b94136db90e2e3d6ac7e40396d8e62f73df3fd3fcfb3f214,(a025344d/0'/0'/1')0395ad430034c1761bbe9b4dfd784fb06229970d54016a7e090fc6ceb3814611b5))#gmdd9d2p"
}

why those addresses is different?

thank you