Web Access – URLDownload (and URLSave, Import) "Error processing content decryption"

I am downloading a file with a size of exactly 1000 KB (https://gitee.com/WolframPaclet1/WolframPacletExtreme1/raw/master/Paclets/MXNetResources-WIN64-12.0.37.paclet.601) URLDownload(URLSave, URLRead, import create the same situation). But one or two of the following messages:

URLRead::invhttp: Error while processing content unencoding: invalid code lengths set.
URLRead::invhttp: Error while processing content unencoding: invalid distance too far back.
URLRead::invhttp: Error while processing content unencoding: invalid stored block lengths.
URLRead::invhttp: Error while processing content unencoding: invalid block type.

is generated.

Chrome downloading is fine. The file downloaded with URLDownload has a size of approx. 1020000 bytes. The previous 1020000 bytes are the same as those downloaded from Chrome.

Perhaps URLDownload is out of date by a log?


"HTTP/1.1 200 OK

date: Tue, 31 Mar 2020 05:26:02 GMT

content-type: text/plain

transfer-encoding: chunked

connection: keep-alive

keep-alive: timeout=60

server: nginx

x-xss-protection: 1; mode=block

x-content-type-options: nosniff

x-ua-compatible: chrome=1

expires: Sun, 1 Jan 2000 01:00:00 GMT

pragma: must-revalidate, no-cache, private

etag: W/"81a7a3370ebada47949a3e644518da29"

content-disposition: inline; filename="MXNetResources-WIN64-12.0.37.paclet.601"

content-transfer-encoding: binary

cache-control: no-cache

set-cookie: oschina_new_user=false; path=/; expires=Sat, 31 Mar 2040 05:26:02 -0000

x-request-id: ee128f06-9ea5-4daa-b9e7-2ec2af51ed7d

x-runtime: 0.107804

content-encoding: gzip"
```

Partitioning – Btrfs reports "ERROR: minimum size for each btrfs device is 131072000", but my drives are much larger

I have x2 2TB drives that I want to make a single Raid0 logical drive. The mistake I get makes no sense. Can anyone explain what I'm missing here?

I use

lsblk -o name,mountpoint,size,uuid,fstype,model,serial

I see that both devices are mounted and the size is the same (953.4 G *). I know because I had different ftypes on them during installation, so I changed both to ext4 and then used them dd to make them identical in terms of partitioning.

* Yes, I know that this partition is not currently using the full size of this drive.

I'm trying to use btrfs

mkfs.btrfs -f -d raid0 -m raid0 zdata1 zdata2

but i get the error

ERROR: & # 39; zdata1 & # 39; is too small to create a usable file system

ERROR: The minimum size for each btrfs is 131072000

Javascript – "Error: Analysis error in line 1" Could you please help me?

I'm having trouble running the following code, according to JSONLint, the problem is on the first line, but I can't solve it …

If anyone can help, I am very grateful!

#!/usr/bin/env node

const axios = require('axios')
const chalk = require('chalk')
const ethers = require('ethers')
const moment = require('moment')
const _ = require('lodash')
const program = require('commander')
const Table = require('easy-table')
const BigNumber = require('bignumber.js')
const Saturn = require('@saturnnetwork/saturn.js').Saturn

const version = require('./package.json').version
const saturnApi = 'https://ticker.saturn.network/api/v2'
const epsilon = new BigNumber('0.00005')

const pipeline = async (funcs) => {
    return await funcs.reduce((promise, func) => {
        return promise.then(result => {
            return func().then(Array.prototype.concat.bind(result))
        })
    }, Promise.resolve(()))
}

function getChainId(chain) {
    if (chain === 'ETC') {
        return 61
    }
    if (chain === 'ETH') {
        return 1
    }
    console.log('Unknown chainId for chain', chain)
    process.exit(1)
}

function rpcNode(chain) {
    if (chain === 'ETC') {
        return 'https://etc-rpc.binancechain.io/'
    }
    if (chain === 'ETH') {
        return 'https://mainnet.infura.io/mew'
    }
    console.log('Unknown chainId for chain', chain)
    process.exit(1)
}

function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
}

function makeSaturnClient(blockchain, program, wallet) {
    let rpcnode = rpcNode(blockchain)
    let chainId = getChainId(blockchain)
    let provider = new ethers.providers.JsonRpcProvider(rpcnode, {
        chainId: chainId,
        name: blockchain
    })

    let saturn
    if (blockchain === 'ETC') {
        saturn = new Saturn(saturnApi, {
            etc: wallet.connect(provider)
        })
    } else {
        saturn = new Saturn(saturnApi, {
            eth: wallet.connect(provider)
        })
    }

    return saturn
}

let tradesForToken = async function(token, blockchain, action, timestamp) {
    let url = `${saturnApi}/trades/by_timestamp/${blockchain}/0x0000000000000000000000000000000000000000/${token}/${timestamp}.json`
    let subset = action === "buy" ? "buys" : "sells"

    let trades = await axios.get(url)
    if (trades.status !== 200) {
        throw new Error(`API error while fetching trade info. Status code ${trades.status}`)
    }
    return trades.data(subset)
}

let etherVolume = function(trades, wallet, action) {
    let filtered = _.filter(trades, (x) => {
        return (x.buyer === wallet.toLowerCase() || x.seller === wallet.toLowerCase())
    })
    if (filtered.length === 0) {
        return new BigNumber(0)
    }
    if (action === 'buy') {
        let amounts = _.map(filtered, (x) => new BigNumber(x.buytokenamount))
        return _.reduce(amounts, (x, y) => x.plus(y), new BigNumber(0))
    } else {
        let amounts = _.map(filtered, (x) => new BigNumber(x.selltokenamount))
        return _.reduce(amounts, (x, y) => x.plus(y), new BigNumber(0))
    }
}

let allowedLimit = async function(token, blockchain, action, wallet, limit) {
    let oneHourAgo = moment().subtract(1, 'hour').unix()
    let trades = await tradesForToken(token, blockchain, action, oneHourAgo)

    return new BigNumber(limit).minus(etherVolume(trades, wallet, action))
}

let orderInfo = async function(blockchain, tx) {
    let url = `${saturnApi}/orders/by_tx/${blockchain}/${tx}.json`

    let order = await axios.get(url)
    if (order.status !== 200) {
        throw new Error(`API error while fetching trade info. Status code ${trades.status}`)
    }
    let price = new BigNumber(order.data.price)
    let balance = new BigNumber(order.data.balance)
    return {
        price: price,
        tokenbalance: balance,
        etherbalance: price.times(balance)
    }
}

let tokenBalance = async function(blockchain, token, wallet) {
    let url = `${saturnApi}/tokens/balances/${blockchain}/${wallet}/${token}.json`

    let response = await axios.get(url)
    if (response.status !== 200) {
        throw new Error(`API error while fetching trade info. Status code ${trades.status}`)
    }

    return new BigNumber(response.data.balances.walletbalance)
}

let etherBalance = async function(blockchain, wallet) {
    let url = `${saturnApi}/tokens/balances/${blockchain}/${wallet}/0x0000000000000000000000000000000000000000.json`

    let response = await axios.get(url)
    if (response.status !== 200) {
        throw new Error(`API error while fetching trade info. Status code ${trades.status}`)
    }

    return new BigNumber(response.data.balances.walletbalance)
}



program
    .version(version, '-v, --version')
    .description('Watch a price of a given token on Saturn Network and auto buy/sell. More details are available at ' + chalk.underline.red('https://forum.saturn.network/t/saturn-trading-bot-guides/4046'))
    .option('-p, --pkey (pkey)', 'Private key of the wallet to use for trading')
    .option('-m, --mnemonic (mnemonic)', 'Mnemonic (i.e. from Saturn Wallet) of the wallet to use for trading')
    .option('-i, --walletid (walletid)', 'If using a mnemonic, choose which wallet to use. Default is Account 2 of Saturn Wallet / MetaMask.', 2)
    .option('-j, --json (json)', 'Trading bot config file')
    .option('-d, --delay (delay)', 'Polling delay in seconds', 60)
    .parse(process.argv)

if (!program.mnemonic && !program.pkey) {
    console.error('At least one of (pkey), (mnemonic) must be supplied')
    process.exit(1)
}

if (program.mnemonic && program.pkey) {
    console.error('Only one of (pkey), (mnemonic) must be supplied')
    process.exit(1)
}

let wallet
if (program.mnemonic) {
    let walletid = parseInt(program.walletid) - 1
    wallet = ethers.Wallet.fromMnemonic(program.mnemonic, `m/44'/60'/0'/0/${walletid}`)
} else {
    wallet = new ethers.Wallet(program.pkey)
}

if (!program.json) {
    console.error('Must specify bot config .json file location')
    process.exit(1)
}

console.log(chalk.green(`Loading pricewatch-bot v${version} ...`))
console.log(chalk.green(`Trading address: ${chalk.underline(wallet.address)}nUsing the following strategies`))
let botconfig = require(program.json)
console.log(Table.print(botconfig, {
    houretherlimit: {
        name: 'Hourly ether limit'
    },
    action: {
        printer: function(val, width) {
            let text = val === "buy" ? chalk.green.bold(val) : chalk.red.bold(val)
            return width ? Table.padLeft(text, width) : text
        }
    },
    blockchain: {
        printer: function(val, width) {
            let text = val === "ETC" ? chalk.black.bgGreen.bold(val) : chalk.black.bgWhite.bold(val)
            return width ? Table.padLeft(text, width) : text
        }
    }
}))


let trade = async function() {
    try {
        let schedule = ()
        await Promise.all(_.map(botconfig, async (row) => {
            let saturn = makeSaturnClient(row.blockchain.toUpperCase(), program, wallet)
            let info = await saturn.query.getTokenInfo(row.token, row.blockchain)

            if (row.action === 'buy') {
                let threshold = new BigNumber(row.price)
                let bestBuyPrice = new BigNumber(info.best_sell_price)

                if (bestBuyPrice.isLessThanOrEqualTo(threshold)) {
                    schedule.push(async () => {
                        console.log(chalk.yellow(`Buy opportunity for ${row.blockchain}::${row.token} @ ${chalk.green(info.best_sell_price)}`))
                        let tradeLimit = await allowedLimit(
                            row.token.toLowerCase(),
                            row.blockchain.toUpperCase(),
                            row.action,
                            wallet.address,
                            row.houretherlimit
                        )
                        if (!tradeLimit.gt(epsilon)) {
                            console.log(chalk.yellow(`Hourly trade limit reached. Skipping...`))
                            return true
                        }
                        let order = await orderInfo(row.blockchain, info.best_sell_order_tx)

                        let tradeEtherAmount = tradeLimit.gt(order.etherbalance) ?
                            order.etherbalance : tradeLimit

                        let walletBalance = await etherBalance(row.blockchain, wallet.address)
                        if (!walletBalance.gt(epsilon)) {
                            console.log(chalk.yellow(`Not enough ${row.blockchain} in your wallet to complete transaction. Skipping...`))
                            return true
                        }

                        tradeEtherAmount = tradeEtherAmount.gt(walletBalance) ? walletBalance : tradeEtherAmount

                        let tokenAmount = tradeEtherAmount.dividedBy(order.price).toFixed(parseInt(info.decimals))
                        let tx = await saturn(row.blockchain.toLowerCase()).newTrade(tokenAmount, info.best_sell_order_tx)

                        console.log(chalk.yellow(`Attempting to buy ${tokenAmount} tokensntx: ${chalk.underline(tx)}`))
                        await saturn.query.awaitTradeTx(tx, saturn(row.blockchain.toLowerCase()))
                    })
                }
            } else if (row.action === 'sell') {
                let threshold = new BigNumber(row.price)
                let bestSellPrice = new BigNumber(info.best_buy_price)

                if (bestSellPrice.isGreaterThanOrEqualTo(threshold)) {
                    schedule.push(async () => {
                        console.log(chalk.yellow(`Sell opportunity for ${row.blockchain}::${row.token} @ ${chalk.red(info.best_buy_price)}`))
                        let tradeLimit = await allowedLimit(
                            row.token.toLowerCase(),
                            row.blockchain.toUpperCase(),
                            row.action,
                            wallet.address,
                            row.houretherlimit
                        )
                        if (!tradeLimit.gt(epsilon)) {
                            console.log(chalk.yellow(`Hourly trade limit reached. Skipping...`))
                            return true
                        }
                        let order = await orderInfo(row.blockchain, info.best_buy_order_tx)

                        let tradeEtherAmount = tradeLimit.gt(order.etherbalance) ?
                            order.etherbalance : tradeLimit

                        let tokenAmount = tradeEtherAmount.dividedBy(order.price).toFixed(parseInt(info.decimals))

                        let walletBalance = await tokenBalance(row.blockchain, row.token, wallet.address)
                        if (!walletBalance.gt(epsilon)) {
                            console.log(chalk.yellow(`Not enough ${row.blockchain}::${row.token} in your wallet to complete transaction. Skipping...`))
                            return true
                        }

                        tokenAmount = new BigNumber(tokenAmount).gt(walletBalance) ? walletBalance : tokenAmount
                        let tx = await saturn(row.blockchain.toLowerCase()).newTrade(tokenAmount, info.best_buy_order_tx)

                        console.log(chalk.yellow(`Attempting to sell ${tokenAmount} tokensntx: ${chalk.underline(tx)}`))
                        await saturn.query.awaitTradeTx(tx, saturn(row.blockchain.toLowerCase()))
                    })
                }
            } else {
                throw new Error(`Unknown action ${row.action}`)
            }
        }))
        if (schedule.length) {
            await pipeline(schedule)
        }
    } catch (error) {
        console.error(error.message)
    }

    setTimeout(trade, parseInt(program.delay) * 1000)
};

(async () => await trade())()

SQL Plus (Oracle XE database): "Error updating link" when trying to change properties

I am learning SQL with SQL Plus as part of a college class and cannot change any of the properties of the SQL Plus command prompt due to the following error:

I checked the file location mentioned there and there is a SQL Plus link, but nothing ends with ".lnk". I am using SQL Plus version 18.4.0.0.0 and not the standard command prompt. Does anyone know how to fix this?

Thank you very much,
lee

raspbian – Microsoft Remote Desktop throws "error code: 0x204"

I recently reformatted my Raspberry Pi 3 (Model B) and installed the latest Raspbian operating system based on Debian buster Use the NOOBS installer. Everything went smoothly and SSH worked perfectly when I connected from my Mac via Terminal. However, I no longer seemed to be able to access the PI using Microsoft Remote Desktop because I had to access it again and again Error code: 0x204 Error. Before reformatting and installing the newer operating system, I was able to use MS RDP without any problems if the Pi was running Debian stretch is based on Raspbian, but that was a long time ago, so I can't remember how I did it. Please, if someone could explain to me some of the doubts that I deal with below:

  • Port forwarding: I don't remember needing to enable port forwarding on my router for it to work because disclosing public IP addresses and accessing the PI over the internet doesn't look like what I would do, and this Setting not set to be activated when I go to the administrator portal of my router to check and my old configuration at the end of the MS RDP was still aligned to an old one internal IP pi had forgiven that beforehand.
  • I have taken steps in this guide to no avail.
  • Catalina is running on my Mac, but I doubt that this has anything to do with the problem as I see the same error when I try to start RDP from Windows 10. Restarting / restarting these client computers does not make any changes.
  • I am aware of the possibility of using a VNC server and this works fine, although I prefer to use MS RDP than SSH. But overall, I wonder if there are certain Debian packages that I need to install?

After a few hours on this topic and a lot of googling, I ran out of ideas and paths at this point that I can explore. Please let me know if I can try something else.

The complete error message is as follows:

We couldn't connect to the remote PC. Make sure the PC is turned on and connected to the network, and that remote access is enabled.

Error code: 0x204

google sheets – "Error The value & # 39; ____ & # 39; was not found in the VLOOKUP evaluation."

Please see my public table here:

https://docs.google.com/spreadsheets/d/11RMN7uN_woEQVzlDEkX6vSARTCGYYBjWs11ZDU-6Shc/edit#gid=1276951687

My goal is to transfer the location code from Tab 1 to Tab 2 (Tab 2 is a subset of certain postcodes, and I need them with the associated location codes next to them).

I tried to use a VLOOKUP but got the following error:

Error: Did not find value '30096' in VLOOKUP evaluation.

In this case, I would expect to see the location code 79459 in this cell.

I probably have a misunderstanding about how VLOOKUP works and / or how it is used. I tried to follow the instructions.