security – Get the source of an output in the console

When I plug my phone into my computer, I can see the console output in Android Studio.
I recently noticed that whenever I start entering a password in a field designated for passwords (the ones that display ‘*’ for any character) the phone prints a very concerning message to the console:

D/HwAutofillHelper: inputType is password, now record

Since it is a Honor Phone, I suppose Hw is short for Huawei?

Nevertheless I’d like to know if there is a way to find out what process produced this output and what app it belongs to?

google sheets – How to link to source cell from filter output

I have a simple query that outputs columns A and B of a project dataset, when the value in column A is not empty:

QUERY(Projects!A2:B, “SELECT A,B WHERE A<>””)

This creates an easy to scan highlight of the important project data (in my case, project name and next action item). However, the project details are in another tab, so if I want to examine the project, I have to copy the name, go to the tab, and search for the project.

It would be super nice if the output of the QUERY could automatically hyperlink to the source data. Or maybe there is a hotkey I can press to jump to the source. Does this feature exist?

terminology – Is it preferable to describe a computer’s ephemeral visual data output device as a “monitor”, “display”, “screen”, or something else?

In English language UIs, is it preferable to describe a computer’s ephemeral data visual data output device as a “monitor”, “display”, “screen”, or something else?

All three of those English words can be used as verbs and nouns, leading to a little potential confusion.

Is there a standard or commonly accepted recommendation?

plotting – Why isn’t LogLinearPlot showing output?

I’m trying to make a log-x plot of a function evaluated over a specified range. The function is an interpolation function defined (by the range of data provided) between 1e5 and 1e9.
But when I try to plot the function over this range using LogLinearPlot, i get a series of errors about evaluations waaay outside of this range, and then no plot is shown.

In the interest of providing a fully working example, here is my function to plot – it simply accepts some points and provides a linear interpolation between them (probably an overly complicated way to do it)

fluxPoints = {s0, s1, s2, s3, s4};
fluxBinCenters = {1*10^5, 1*10^6, 1*10^7, 1*10^8, 1*10^9};
fluxSpectrumPoints = Transpose({fluxBinCenters, fluxPoints});
sourceFluxSpectrum = Interpolation(fluxSpectrumPoints, InterpolationOrder -> 1);
sourceSpectrum(E_, fluxpars_) := sourceFluxSpectrum(E) /. {s0 -> fluxpars((0)), s1 -> fluxpars((1)), s2 -> fluxpars((2)), s3 -> fluxpars((3)), s4 -> fluxpars((4))};

The following code explicitly specifies the x-points to evaluate, calculates the corresponding y-values, and plots them on the log-x axis as desired:

somefluxpars = {10*10^-8, 100*10^-8, 300*10^-8, 250*10^-8, 100*10^-8};
evalpoints = 10^Range(6, 9, 1);
evalfluxes = Table(sourceSpectrum(energy, somefluxpars), {energy, evalpoints});
spectrumPlot = Transpose({evalpoints, evalfluxes});
ListLogLinearPlot(spectrumPlot, PlotRange->All, Joined->True, Mesh->All)

This produces the plot:

Correct plot with expected values spanning the range 1e6 to 1e9

I would like to make this plot, but without having to manually specify the plot points.
However, when I try the following:

LogLinearPlot(sourceSpectrum(energy, somefluxpars), {energy, 1*10^6, 1*10^9}, {PlotRange -> {All, {1*10^6, 1*10^9}}, PlotPoints -> 4, Mesh -> Full})

I get a bunch of errors indicating that Mathematica tried to evaluate sourceSpectrum at x-values of 13, 16, 18… (well outside the requested plot range?!) and no curve is shown.

Empty plot axes and errors

I’ve tried various alterations on PlotRange->{1*10^6,1*10^9}, PlotRange->All, or dropping it entirely, but it has no effect.

If I use Plot instead of LogLinearPlot, then the data shows up as expected (but, of course, without the desired log x-scale).

neural networks – Using the features embedding of the output from a transformers to represent probabilities of categorical data

I was considering using a transformer, on input data which can be represented as an embedding, so I can use the attention mechanism in the transformer architecture. As my data is of variable input and output length and the input is sequential. My question is that my output data is suppose to be either numerical or probabilities for each output variable. The output was originally supposed to 13 numerical outputs but I decided to use a probability score as way of normalizing the output. My question is can I use two output vectors with 7 features each instead of 13 numeric outputs. Each feature would map to one of the original output vectors and the the last feature would always be 0. As PyTorch expects your output to be the same number of features as your input. My input variables are embedded as 7 features. Should this approach work, as I am unsure of how the loss function works or is there a loss function that would allow for this.

c# – How to output a variable if “is” is false?

So I’m writing some code for a website with c#.

And I’ve used the “is” in my if and then created a variable for output like this:


if (test is Class1 item)
{
   <p>@item.title</p>

}
else if(!(test is Class1 item))
{
   <p>@item.title</p>

}


So my question is, how do I create a variable from type e.g. Class2 in the second if-else?

Thanks in advance!

utxo – What happens if 2 transaction spend to the same output?

I’m looking though the blockchain, and I’ve found 2 transactions in different blocks, which have the same hash:

block 91812:

    "result": {
        "hash": "00000000000af0aed4792b1acee3d966af36cf5def14935db8de83d6f9306f2f",
        "confirmations": 545294,
        "strippedsize": 616,
        "size": 616,
        "weight": 2464,
        "height": 91812,
        "version": 1,
        "versionHex": "00000001",
        "merkleroot": "49991d7653bec6efebee7d11f27ca2dffcc35ebe95ee5eebd602916b2f2fa665",
        "tx": [
            {
                "txid": "d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599",
                "hash": "d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599",
                "version": 1,
                "size": 133,
                "vsize": 133,
                "weight": 532,
                "locktime": 0,
                "vin": [
                    {
                        "coinbase": "0456720e1b00",
                        "sequence": 4294967295
                    }
                ],
                "vout": [
                    {
                        "value": 50.00000000,
                        "n": 0,
                        "scriptPubKey": {
                            "asm": "046896ecfc449cb8560594eb7f413f199deb9b4e5d947a142e7dc7d2de0b811b8e204833ea2a2fd9d4c7b153a8ca7661d0a0b7fc981df1f42f55d64b26b3da1e9c OP_CHECKSIG",
                            "hex": "41046896ecfc449cb8560594eb7f413f199deb9b4e5d947a142e7dc7d2de0b811b8e204833ea2a2fd9d4c7b153a8ca7661d0a0b7fc981df1f42f55d64b26b3da1e9cac",
                            "type": "pubkey"
                        }
                    }
                ],
                "hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff060456720e1b00ffffffff0100f2052a010000004341046896ecfc449cb8560594eb7f413f199deb9b4e5d947a142e7dc7d2de0b811b8e204833ea2a2fd9d4c7b153a8ca7661d0a0b7fc981df1f42f55d64b26b3da1e9cac00000000"
            },
            {
                "txid": "777ed67c58761dcaf3762e64576591c8d39317bcbebf0cb335e138d6ea438ce2",
                "hash": "777ed67c58761dcaf3762e64576591c8d39317bcbebf0cb335e138d6ea438ce2",
                "version": 1,
                "size": 402,
                "vsize": 402,
                "weight": 1608,
                "locktime": 0,
                "vin": [
                    {
                        "txid": "f98b11a5f11d08c3ac31c465092bb5d4c09bd2c815fa23959d654ef9b91414f1",
                        "vout": 0,
                        "scriptSig": {
                            "asm": "3044022068b2a587ec9374325c17c79f9102358fdd0574eeb3bebea08affab3e07afd93c0220248ac15de4e2b6391ff12c348ba6cc024448dba20611a40a35f8b67b6f966cd5[ALL] 046d337916441e20c469623303b47fd0c23326956a183e3274801f1a863e04b7f1dc2bee3388292571955955f8a24445ae35781dd9e39e8472bff623d3375f490e",
                            "hex": "473044022068b2a587ec9374325c17c79f9102358fdd0574eeb3bebea08affab3e07afd93c0220248ac15de4e2b6391ff12c348ba6cc024448dba20611a40a35f8b67b6f966cd50141046d337916441e20c469623303b47fd0c23326956a183e3274801f1a863e04b7f1dc2bee3388292571955955f8a24445ae35781dd9e39e8472bff623d3375f490e"
                        },
                        "sequence": 4294967295
                    },
                    {
                        "txid": "0c4d26699fbd1dd2ecc564ee3f02afd2e5f1837e03044fffa838b1283a2f7cb3",
                        "vout": 0,
                        "scriptSig": {
                            "asm": "304402206ccc7e10f33ed2e73c000780e972c479cf0a74d4a5825d74eebb8ec87d31da3202207a945ff0062c9df5d7a9c51483f0d8fc9d0cad1670319c8fbebde2198f8eea22[ALL] 0450a6524d0f7519571e8fb761ac8285f88c5ad9976454ee2148db5e0d13caa534f6bc56678a328dab8319fd62feabc977e478776c9cf0e705575be61dccdf8383",
                            "hex": "47304402206ccc7e10f33ed2e73c000780e972c479cf0a74d4a5825d74eebb8ec87d31da3202207a945ff0062c9df5d7a9c51483f0d8fc9d0cad1670319c8fbebde2198f8eea2201410450a6524d0f7519571e8fb761ac8285f88c5ad9976454ee2148db5e0d13caa534f6bc56678a328dab8319fd62feabc977e478776c9cf0e705575be61dccdf8383"
                        },
                        "sequence": 4294967295
                    }
                ],
                "vout": [
                    {
                        "value": 20.00000000,
                        "n": 0,
                        "scriptPubKey": {
                            "asm": "OP_DUP OP_HASH160 dda4521a9cd99e92323ae4762467dab928b65f45 OP_EQUALVERIFY OP_CHECKSIG",
                            "hex": "76a914dda4521a9cd99e92323ae4762467dab928b65f4588ac",
                            "reqSigs": 1,
                            "type": "pubkeyhash",
                            "addresses": [
                                "1MCwBbhNGp5hRm5rC1Aims2YFRe2SXPYKt"
                            ]
                        }
                    }
                ],
                "hex": "0100000002f11414b9f94e659d9523fa15c8d29bc0d4b52b0965c431acc3081df1a5118bf9000000008a473044022068b2a587ec9374325c17c79f9102358fdd0574eeb3bebea08affab3e07afd93c0220248ac15de4e2b6391ff12c348ba6cc024448dba20611a40a35f8b67b6f966cd50141046d337916441e20c469623303b47fd0c23326956a183e3274801f1a863e04b7f1dc2bee3388292571955955f8a24445ae35781dd9e39e8472bff623d3375f490effffffffb37c2f3a28b138a8ff4f04037e83f1e5d2af023fee64c5ecd21dbd9f69264d0c000000008a47304402206ccc7e10f33ed2e73c000780e972c479cf0a74d4a5825d74eebb8ec87d31da3202207a945ff0062c9df5d7a9c51483f0d8fc9d0cad1670319c8fbebde2198f8eea2201410450a6524d0f7519571e8fb761ac8285f88c5ad9976454ee2148db5e0d13caa534f6bc56678a328dab8319fd62feabc977e478776c9cf0e705575be61dccdf8383ffffffff0100943577000000001976a914dda4521a9cd99e92323ae4762467dab928b65f4588ac00000000"
            }
        ],
        "time": 1289757588,
        "mediantime": 1289756309,
        "nonce": 1166692788,
        "bits": "1b0e7256",
        "difficulty": 4536.353723275037,
        "chainwork": "00000000000000000000000000000000000000000000000001b349c8e6a815b0",
        "nTx": 2,
        "previousblockhash": "000000000002afe839294d4e038b5c831bc09632fd717c0980f8f216dc2b360f",
        "nextblockhash": "0000000000006626b8604240c5bb5305830e67fcfa8bae10d64cea0e2eb121d4"
    },
    "error": null,
    "id": "183626"
}

and block 91842

{
    "result": {
        "hash": "00000000000a4d0a398161ffc163c503763b1f4360639393e0e4c8e300e0caec",
        "confirmations": 545263,
        "strippedsize": 214,
        "size": 214,
        "weight": 856,
        "height": 91842,
        "version": 1,
        "versionHex": "00000001",
        "merkleroot": "d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599",
        "tx": [
            {
                "txid": "d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599",
                "hash": "d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599",
                "version": 1,
                "size": 133,
                "vsize": 133,
                "weight": 532,
                "locktime": 0,
                "vin": [
                    {
                        "coinbase": "0456720e1b00",
                        "sequence": 4294967295
                    }
                ],
                "vout": [
                    {
                        "value": 50.00000000,
                        "n": 0,
                        "scriptPubKey": {
                            "asm": "046896ecfc449cb8560594eb7f413f199deb9b4e5d947a142e7dc7d2de0b811b8e204833ea2a2fd9d4c7b153a8ca7661d0a0b7fc981df1f42f55d64b26b3da1e9c OP_CHECKSIG",
                            "hex": "41046896ecfc449cb8560594eb7f413f199deb9b4e5d947a142e7dc7d2de0b811b8e204833ea2a2fd9d4c7b153a8ca7661d0a0b7fc981df1f42f55d64b26b3da1e9cac",
                            "type": "pubkey"
                        }
                    }
                ],
                "hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff060456720e1b00ffffffff0100f2052a010000004341046896ecfc449cb8560594eb7f413f199deb9b4e5d947a142e7dc7d2de0b811b8e204833ea2a2fd9d4c7b153a8ca7661d0a0b7fc981df1f42f55d64b26b3da1e9cac00000000"
            }
        ],
        "time": 1289768691,
        "mediantime": 1289767893,
        "nonce": 3778549762,
        "bits": "1b0e7256",
        "difficulty": 4536.353723275037,
        "chainwork": "00000000000000000000000000000000000000000000000001b55d6596dd0790",
        "nTx": 1,
        "previousblockhash": "00000000000a1e92acbcbdf594cac25d1095544d5fbf5113bfec85a9eb4b1120",
        "nextblockhash": "0000000000016ca756e810d44aee6be7eabad75d2209d7f4542d1fd53bafc984"
    },
    "error": null,
    "id": "183686"
}

Both have coinbase transactions, which spend to d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599-0. Also, first transaction output is not spent by the time second transaction is added to blockchain.

What does this mean? If d5d27987d2a3dfc724e359870c6644b40e497bdc0589a033220fe15429d88599-0 is ever one of the inputs, how much bitcoin does it contain? 50 or 100?

utxo – How can I create a transaction that spends an anyonecanspend output using btc-lib?

I managed to create an UTXO that only contains “OP_TRUE” as script:

{
"value": 0.00000546,
"n": 1,
"scriptPubKey": {
    "asm": "1",
    "hex": "51",
    "type": "nonstandard",
    "isTruncated": false
}

I have the txid and the vout number. Now I would like to create a tx that spends this utxo but I can’t manage to do it using btc-lib.

this is what I tried:

    var utxodata = {}
    utxodata.txid = mytxid
    utxodata.vout = 1
    utxodata.script= "0x51"
    utxodata.satoshis = 546
    var tx = new btc.Transaction().from(utxodata)
    tx = tx.to(myaddress, 546)
    tx = tx.sign(myprivateKey)

which gives:

Error: Invalid script: "0x51"

Can you provide some help please?