loadable library and Perl binaries do not match

I do not use Perl, but I use Slic3r, which apparently uses Perl.

I do not know what it did, but an update broke Perl somewhere and I have no idea how to fix it. I have searched a lot, but most of the "solutions" found require some understanding of how Perl works and its packages. I do not have that.

Somewhere along the way I tried a script called find-broken-perl-packages but that did not work because there are a lot of things I did not install (Pacman command not found, /usr/lib/perl5/vendor_perl no such directory etc).

I also found another "solution" that suggested rebuilding everything cpan (I forget the command that I executed, it worked and it took F.O.R.E.V.E.R.), but that had no effect.

Without insulting the Perl crowd – I do not really care much about learning Perl beyond what I need to fix it so I can use Slic3r again.

When I try to run Slic3r, I get the error:

ListUtil.c: loadable library and perl binaries are mismatched (got handshake key 0xde00080, needed 0xce00080)

and when I try to let it go Build.PL Script to rebuild Slic3r, I get:

Cwd.c: loadable library and perl binaries are mismatched (got handshake key 0xde00080, needed 0xce00080)

lots times. I do not really need to recreate Slic3r, I just thought it might have fixed the problem.

Run Ubuntu 19.04

How do I sort column B to match column A in Google Sheet?

I have 3 columns in Google Sheet.
Column A contains 95 lines of value.
Columns B and C have 500 rows with the value:
Enter image description here

I have to sort column B to match column A.
Column C represents the value associated with column B.
After sorting, the expected result should look like this (I did it only for the first three lines, but in fact, column A and column B are the same for all column A values ​​- 95 rows).

Enter image description here

How do I do that? I'm trying all sorts, but so far nothing has worked.

python – The request signature we calculated does not match the signature you specified. Check your key and your signature method – generate_presigned_url with boto3

I've seen many people make this mistake, but none of their solutions helped me fix it.

I use Python3, with Flask and Boto3 for AWS communication.

This is my S3 client

aws_cli = awsclient('s3', aws_access_key_id=AWS_ACCESS_KEY_ID,
                aws_secret_access_key=AWS_SECRET_ACCESS_KEY, region_name=AWS_REGION_NAME_KEY)

And that's my method of generating:

upload_path = aws_cli.generate_presigned_url(
    ClientMethod='put_object',
    Params={
        'Bucket': AWS_BUCKET_NAME,
        'Key': "test.png",
        'ContentType': "multipart/form-data",
        'ACL': 'public-read'
    },
    HttpMethod='PUT'
)

Then I simply pass this URL to a hidden entrance:

form.upload_path.data = upload_path

And then I use JQuery to take all the parameters needed for the query:

$('document').ready(function() {
        $('form').on('submit', sendFile);
    });

    function sendFile(e) {
        e.preventDefault();

        console.log('enviar arquivo'); 

        const file = $('#image').get()(0).files(0);
        const upload_path = $('#upload_path').val();

        var fd = new FormData();
        fd.append('file', file);

        $.ajax({
            type: 'PUT',
            url: upload_path,
            data: fd,
            processData: false,
            contentType: false,
            crossDomain: true,
            success: function() {
                console.log('File uploaded');
            },
            error: function() {
                console.log("error");
            }
        });
    }

But then I only get the error:

    
SignatureDoesNotMatch

The request signature we calculated does not match the signature you provided. Check your key and signing method.

AccessKey...

GET 1568698474 x-amz-acl:public-read /bucketName/test.png

Signature...
0000...

000...
testest...


Can someone help me to fix the problem?

How do I change the autocompletion of the search API to get an exact match?

I have installed the autocomplete search API module. I've also configured it, but the requirement is that it only "starts with the word" search. The result is now the search for a word in the middle of a sentence / title. But I just have to start with title / sentence. I also checked in the secured configuration, but I did not find any such configurations for autocompletion. Is there a way to change the search that is available only in the backend?

Bitcoin Core – Create P2SH address does not match the address stored on the RPC node

I have a private key and I'm trying to create a P2SH address on testnet how my node was created, but they are not identical. Please help me a bit, thank you.

Private key: c5964e19634e473e9c8fed3b149c4d44b6d62d62724035aad3eb911a1495ae27

P2SH Address of 1 Threshold and 1 Pubkey:
2N4GriyLchUgwwCBonzYHgsCHNhYRHW45w7

P2WPKH address: 2NGA8uGdnaQ21phNpVyV5uye5cbUtudxBWh || tb1qld2fzw9gj30wxjamsz73fug62das7cyq0em4mn

Address from the node: 2N8qKVKuR3QAy2cA5fF2QbuCpBGfGCmbUHx

Here's more detail from getaddressinfo:

{
    "result": {
        "address": "2N8qKVKuR3QAy2cA5fF2QbuCpBGfGCmbUHx",
        "scriptPubKey": "a914aafc9f09b99cbb1ba46001ec4868ba4fb32543ca87",
        "ismine": true,
        "solvable": true,
        "desc": "sh(wpkh((a1696bdc/0'/0'/375509')02a7065a210c28d27a591e55ac6be092111349fc4b23927bb4d13c46a683bcfff7))#hrgzj3gs",
        "iswatchonly": false,
        "isscript": true,
        "iswitness": false,
        "script": "witness_v0_keyhash",
        "hex": "00146da71bc5de0c0b59bbf73520df7e7d4048d02594",
        "pubkey": "02a7065a210c28d27a591e55ac6be092111349fc4b23927bb4d13c46a683bcfff7",
        "embedded": {
            "isscript": false,
            "iswitness": true,
            "witness_version": 0,
            "witness_program": "6da71bc5de0c0b59bbf73520df7e7d4048d02594",
            "pubkey": "02a7065a210c28d27a591e55ac6be092111349fc4b23927bb4d13c46a683bcfff7",
            "address": "tb1qdkn3h3w7ps94nwlhx5sd7lnagpydqfv5pyqurf",
            "scriptPubKey": "00146da71bc5de0c0b59bbf73520df7e7d4048d02594"
        },
        "label": "test",
        "ischange": false,
        "timestamp": 1561438016,
        "hdkeypath": "m/0'/0'/375509'",
        "hdseedid": "e2e9dd17501f967b789c28c4be1dbf64897ad8d2",
        "hdmasterfingerprint": "a1696bdc",
        "labels": (
            {
                "name": "test",
                "purpose": "receive"
            }
        )
    },
    "error": null,
    "id": 1
}

Java package architecture (AMD64) does not match System (i386) on Ubuntu

I have Ubuntu:

Ubuntu 12.04.1 LTS

This is the output from cat /proc/cpuinfo:

processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 15
model       : 47
model name  : AMD Athlon(tm) 64 Processor 3400+
stepping    : 2
cpu MHz     : 1000.000
cache size  : 512 KB
fdiv_bug    : no
hlt_bug     : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 1
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow up extd_apicid pni lahf_lm
bogomips    : 2000.17
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp tm stc

This is the output from dpkg --version:

Debian `dpkg' package management program version 1.16.1.2 (i386).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.

Although dpkg is compiled for i386, I seem to have Amd64 as the processor. But if I install Java:

sudo dpkg -i sun-java6-bin_6-06-0ubuntu1_amd64.deb 

I have this error:

dpkg: error processing sun-java6-bin_6-06-0ubuntu1_amd64.deb (--install):
 package architecture (amd64) does not match system (i386)
Errors were encountered while processing:
 sun-java6-bin_6-06-0ubuntu1_amd64.deb

Any ideas?

Java values ​​do not match

I convert byte array to binary and another byte array to hex, then hex to binary. Both have the same value, but the one where I convert the byte array to hex and then to binary has three missing zeros at the beginning. I'm not sure what that is.

Here is the current code I have:

import java.math.BigInteger;

import javax.xml.bind.DatatypeConverter;

public class Example{

    public static String toHexString(byte() array) {
        return DatatypeConverter.printHexBinary(array);
    }

    static String hexToBin(String s) {
        String preBin = new BigInteger(s, 16).toString(2);
        Integer length = preBin.length();
        if (length < 8) {
            for (int i = 0; i < 8 - length; i++) {
                preBin = "0" + preBin;
            }
        }
        return preBin;
    }

    public static String getBinaryStringByBytes(byte() bytes) {
        StringBuilder ret = new StringBuilder();
        if (bytes != null) {
            for (byte b : bytes) {
                ret.append(Integer.toBinaryString(b & 255 | 256).substring(1));
            }
        }
        return ret.toString();
    }

    public static void main(String() args) {
        byte() data = new byte() { 16, 12, 0, 1, -110, 88, 36, 87, 101 };
        System.out.println(hexToBin(toHexString(data)));
        System.out.println(getBinaryStringByBytes(data));
    }

}

expected result is
000100000000110000000000000000011001001001011000001001000101011101100101

current result
100000000110000000000000000011001001001011000001001000101011101100101

replacement – Replaces subexpressions that match a pattern, unless they are under specific headings

Suppose I have a rule, eg. Re(x_) :> (x + Conjugate(x))/2, I want to apply it to all matching subexpressions in an expression, with the exception of all subexpressions that are somewhere under the head Hold(…) or Function(…) (in every depth). What is the easiest way to do that? Can this be done without explicit filtering of positions?


For example, the result of the replacement in the expression:

{z + Re(a), Hold(1 + Re(b)), Function(z, Abs(Re(c)))}

should be

{z + (a + Conjugate(a))/2, Hold(1 + Re(b)), Function(z, Abs(Re(c)))}

from where Re(b) and Re(c) stay unchanged as they are below Hold and Function,

mysql – REPLACE (orig, match, replacement) multiple matches in a query

I'm trying to categorize Magic The Gathering cards. Here's a simplified version of what I'm doing / trying.

Is it reasonable / feasible to get my desired output from MySQL? If so, how?

Or do I have to use some PHP? (which I can pretty easily find out) I would rather do it by a query if I can.


I run:

SELECT REPLACE(orig.text, matches.text, matches.replacement) 
    FROM orig 
JOIN matches 
    ON orig.text LIKE CONCAT('%',matches.text,'%') ;

I want:

| (who) (action) really (speed)
| (who) (action) really (speed)
| (who) (action) really (speed)
| (who) (action) really (speed)
| (who) (action) really (speed)  

In the actual app there would be another column, for example the card name.


I actually get:

| REPLACE(orig.text,matches.text,matches.replacement) |
+-----------------------------------------------------+
| (who) run really fast                               |
| (who) run really slow                               |
| (who) shop really fast                              |
| (who) shop really qu(who)ckly                       |
| (who) shop really slowly                            |
| i (action) really fast                              |
| i (action) really slow                              |
| i run really (speed)                                |
| i shop really (speed)                               |
| i shop really (speed)                               |
| i shop really (speed)                               |
| i (action) really fast                              |
| i (action) really quickly                           |
| i (action) really slowly                            |


orig table

| i run really fast     |
| i run really slow     |
| i shop really fast    |
| i shop really quickly |
| i shop really slowly 

Matches table

| text    | replacement |
+---------+-------------+
| i       | (who)       |
| run     | (action)    |
| fast    | (speed)     |
| slowly  | (speed)     |
| quickly | (speed)     |
| shop    | (action)    |