text:
Incorrect massive liquidation price estimate

The positions screen is showing a ridiculous liquidation price estimate.
This is on the LINKUSD market in the current incentive and it may be localised to that market because it seems fine on another BTC one, but something is wrong as it is showing 3 trilion as the liquidaton price on a long.

Liquidation price is calculated as
maximum(0, ((marginLevel.maintenanceLevel- marginAccountBalance - generalAccountBalance) / openVolume) + markPrice)
So its not clear what is happening here.
Implemented as per this notepad apparently.
My pubkey is cc856111fad9a9692f253aa38537da6eebac2a534f231d5500d41c81748be4f2 if that is useful

Data used to render attached positions table
{
  "data": {
    "party": {
      "id": "cc856111fad9a9692f253aa38537da6eebac2a534f231d5500d41c81748be4f2",
      "marginsConnection": {
        "edges": [
          {
            "node": {
              "maintenanceLevel": "0",
              "searchLevel": "0",
              "initialLevel": "0",
              "collateralReleaseLevel": "0",
              "asset": {
                "id": "b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663"
              },
              "market": {
                "id": "ad2e531441c2e8a43e85423db399a4acc8f9a8a2376304a4c377d0da8eb31e80"
              }
            }
          },
          {
            "node": {
              "maintenanceLevel": "165527571425306370533",
              "searchLevel": "182080328567837007586",
              "initialLevel": "413818928563265926332",
              "collateralReleaseLevel": "446924442848327200439",
              "asset": {
                "id": "eb30d55e90e1f9e5c4727d6fa2a5a8cd36ab9ae9738eb8f3faf53e2bee4861ee"
              },
              "market": {
                "id": "e503cadb437861037cddfd7263d25b69102098a97573db23f8e5fc320cea1ce9"
              }
            }
          }
        ]
      }
    }
  }
}

{
  "data": {
    "party": {
      "id": "cc856111fad9a9692f253aa38537da6eebac2a534f231d5500d41c81748be4f2",
      "positionsConnection": {
        "edges": [
          {
            "node": {
              "realisedPNL": "-100000",
              "openVolume": "0",
              "unrealisedPNL": "0",
              "averageEntryPrice": "0",
              "updatedAt": "2022-11-17T16:51:31.461742Z",
              "market": {
                "id": "ad2e531441c2e8a43e85423db399a4acc8f9a8a2376304a4c377d0da8eb31e80"
              }
            }
          },
          {
            "node": {
              "realisedPNL": "4652700000000000000",
              "openVolume": "5000",
              "unrealisedPNL": "101082000000000000",
              "averageEntryPrice": "621798",
              "updatedAt": "2022-11-17T16:51:30.535686Z",
              "market": {
                "id": "e503cadb437861037cddfd7263d25b69102098a97573db23f8e5fc320cea1ce9"
              }
            }
          }
        ]
      }
    }
  }
}

{
  "data": {
    "party": {
      "id": "cc856111fad9a9692f253aa38537da6eebac2a534f231d5500d41c81748be4f2",
      "accountsConnection": {
        "edges": [
          {
            "node": {
              "type": "ACCOUNT_TYPE_GENERAL",
              "balance": "99680470",
              "market": null,
              "asset": {
                "id": "b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663"
              }
            }
          },
          {
            "node": {
              "type": "ACCOUNT_TYPE_GENERAL",
              "balance": "1000000000000000000",
              "market": null,
              "asset": {
                "id": "fc7fd956078fb1fc9db5c19b88f0874c4299b2a7639ad05a47a28c0aef291b55"
              }
            }
          },
          {
            "node": {
              "type": "ACCOUNT_TYPE_MARGIN",
              "balance": "0",
              "market": {
                "id": "e503cadb437861037cddfd7263d25b69102098a97573db23f8e5fc320cea1ce9"
              },
              "asset": {
                "id": "eb30d55e90e1f9e5c4727d6fa2a5a8cd36ab9ae9738eb8f3faf53e2bee4861ee"
              }
            }
          },
          {
            "node": {
              "type": "ACCOUNT_TYPE_MARGIN",
              "balance": "0",
              "market": {
                "id": "ad2e531441c2e8a43e85423db399a4acc8f9a8a2376304a4c377d0da8eb31e80"
              },
              "asset": {
                "id": "b340c130096819428a62e5df407fd6abe66e444b89ad64f670beb98621c9c663"
              }
            }
          },
          {
            "node": {
              "type": "ACCOUNT_TYPE_GENERAL",
              "balance": "500073047037899902397",
              "market": null,
              "asset": {
                "id": "72f051ea66686ae004086f1ad086866f720f25896319abf3427cae101a58d985"
              }
            }
          },
          {
            "node": {
              "type": "ACCOUNT_TYPE_GENERAL",
              "balance": "2778577003362000000000",
              "market": null,
              "asset": {
                "id": "eb30d55e90e1f9e5c4727d6fa2a5a8cd36ab9ae9738eb8f3faf53e2bee4861ee"
              }
            }
          },
          {
            "node": {
              "type": "ACCOUNT_TYPE_GENERAL",
              "balance": "500000000000000000000",
              "market": null,
              "asset": {
                "id": "9e0bb9bd7ea2ec51efcdc98b432b6f0b055b2ed7973cfac9b44899d6e6c5deab"
              }
            }
          }
        ]
      }
    }
  }
}

{
  "data": {
    "marketsConnection": {
      "edges": [
        {
          "node": {
            "data": {
              "market": {
                "id": "ad2e531441c2e8a43e85423db399a4acc8f9a8a2376304a4c377d0da8eb31e80"
              },
              "bestBidPrice": "1655548269",
              "bestOfferPrice": "1656048529",
              "markPrice": "1656048529",
              "trigger": "AUCTION_TRIGGER_UNSPECIFIED",
              "staticMidPrice": "1655798399",
              "marketTradingMode": "TRADING_MODE_CONTINUOUS",
              "indicativeVolume": "0",
              "indicativePrice": "0",
              "bestStaticBidPrice": "1655548269",
              "bestStaticOfferPrice": "1656048529",
              "targetStake": "8011657738",
              "suppliedStake": "632332240104",
              "auctionStart": null,
              "auctionEnd": null
            }
          }
        },
        {
          "node": {
            "data": {
              "market": {
                "id": "e503cadb437861037cddfd7263d25b69102098a97573db23f8e5fc320cea1ce9"
              },
              "bestBidPrice": "617210",
              "bestOfferPrice": "618922",
              "markPrice": "617210",
              "trigger": "AUCTION_TRIGGER_UNSPECIFIED",
              "staticMidPrice": "618066",
              "marketTradingMode": "TRADING_MODE_CONTINUOUS",
              "indicativeVolume": "0",
              "indicativePrice": "0",
              "bestStaticBidPrice": "617210",
              "bestStaticOfferPrice": "618922",
              "targetStake": "162788043989043000000000",
              "suppliedStake": "195156754062475602500000",
              "auctionStart": null,
              "auctionEnd": null
            }
          }
        },
        {
          "node": {
            "data": {
              "market": {
                "id": "e9ec6d5c46a7e7bcabf9ba7a893fa5a5eeeec08b731f06f7a6eb7bf0e605b829"
              },
              "bestBidPrice": "119651112",
              "bestOfferPrice": "119851277",
              "markPrice": "119851277",
              "trigger": "AUCTION_TRIGGER_UNSPECIFIED",
              "staticMidPrice": "119751194",
              "marketTradingMode": "TRADING_MODE_CONTINUOUS",
              "indicativeVolume": "0",
              "indicativePrice": "0",
              "bestStaticBidPrice": "119651112",
              "bestStaticOfferPrice": "119851277",
              "targetStake": "2268476140",
              "suppliedStake": "10000000000",
              "auctionStart": null,
              "auctionEnd": null
            }
          }
        },
        {
          "node": {
            "data": {
              "market": {
                "id": "e3119d341022a401cc68ba3a7ead5c431028d0060b3a49fc115025d7784c646f"
              },
              "bestBidPrice": "126485803",
              "bestOfferPrice": "126485819",
              "markPrice": "126512031",
              "trigger": "AUCTION_TRIGGER_UNSPECIFIED",
              "staticMidPrice": "126485811",
              "marketTradingMode": "TRADING_MODE_CONTINUOUS",
              "indicativeVolume": "0",
              "indicativePrice": "0",
              "bestStaticBidPrice": "126459591",
              "bestStaticOfferPrice": "126512031",
              "targetStake": "16243581016",
              "suppliedStake": "22700000000",
              "auctionStart": null,
              "auctionEnd": null
            }
          }
        },
        {
          "node": {
            "data": {
              "market": {
                "id": "07549b2cf93abbf6fb8ad976af3f24876e5946df85a3b6f0a6338672c7453bfa"
              },
              "bestBidPrice": "0",
              "bestOfferPrice": "666000",
              "markPrice": "62606060",
              "trigger": "AUCTION_TRIGGER_LIQUIDITY",
              "staticMidPrice": "0",
              "marketTradingMode": "TRADING_MODE_MONITORING_AUCTION",
              "indicativeVolume": "0",
              "indicativePrice": "0",
              "bestStaticBidPrice": "0",
              "bestStaticOfferPrice": "666000",
              "targetStake": "34614890574000000000000",
              "suppliedStake": "37000000000000000000000",
              "auctionStart": "2022-11-14T15:55:48.671550297Z",
              "auctionEnd": "2022-11-15T09:59:58.671550297Z"
            }
          }
        },
        {
          "node": {
            "data": {
              "market": {
                "id": "90e71c52b2f40db78efc24abe4217382993868cd24e45b3dd17147be4afaf884"
              },
              "bestBidPrice": "6300000",
              "bestOfferPrice": "0",
              "markPrice": "6409409",
              "trigger": "AUCTION_TRIGGER_LIQUIDITY",
              "staticMidPrice": "0",
              "marketTradingMode": "TRADING_MODE_MONITORING_AUCTION",
              "indicativeVolume": "0",
              "indicativePrice": "0",
              "bestStaticBidPrice": "6300000",
              "bestStaticOfferPrice": "0",
              "targetStake": "4385379",
              "suppliedStake": "2200533468",
              "auctionStart": "2022-11-13T02:06:34.565209529Z",
              "auctionEnd": "2022-11-17T06:36:41.565209529Z"
            }
          }
        },
        {
          "node": {
            "data": {
              "market": {
                "id": "acff1b95980c3355e65c7162c35917388702525c0475ba753f03d0efc9c6d6a3"
              },
              "bestBidPrice": "17800000",
              "bestOfferPrice": "0",
              "markPrice": "18264533",
              "trigger": "AUCTION_TRIGGER_LIQUIDITY",
              "staticMidPrice": "0",
              "marketTradingMode": "TRADING_MODE_MONITORING_AUCTION",
              "indicativeVolume": "0",
              "indicativePrice": "0",
              "bestStaticBidPrice": "17800000",
              "bestStaticOfferPrice": "0",
              "targetStake": "24243062",
              "suppliedStake": "470849933066",
              "auctionStart": "2022-11-13T02:06:16.111262839Z",
              "auctionEnd": "2022-11-17T06:36:41.111262839Z"
            }
          }
        },
        {
          "node": {
            "data": {
              "market": {
                "id": "c80c1cc89dcc5a302e443b7fcd215cdadbb259f6b180db6253a5572ad6406253"
              },
              "bestBidPrice": "0",
              "bestOfferPrice": "0",
              "markPrice": "6704358",
              "trigger": "AUCTION_TRIGGER_LIQUIDITY",
              "staticMidPrice": "0",
              "marketTradingMode": "TRADING_MODE_MONITORING_AUCTION",
              "indicativeVolume": "0",
              "indicativePrice": "0",
              "bestStaticBidPrice": "0",
              "bestStaticOfferPrice": "0",
              "targetStake": "965153",
              "suppliedStake": "186747360002",
              "auctionStart": "2022-11-13T02:05:57.52491992Z",
              "auctionEnd": "2022-11-17T06:36:40.52491992Z"
            }
          }
        },
        {
          "node": {
            "data": {
              "market": {
                "id": "8b4aaea9cf7cbbeee90aa6ccea21bd5b9ec15c1872d6b0b3a58e31b741dd948a"
              },
              "bestBidPrice": "0",
              "bestOfferPrice": "0",
              "markPrice": "7529",
              "trigger": "AUCTION_TRIGGER_LIQUIDITY",
              "staticMidPrice": "0",
              "marketTradingMode": "TRADING_MODE_MONITORING_AUCTION",
              "indicativeVolume": "0",
              "indicativePrice": "0",
              "bestStaticBidPrice": "0",
              "bestStaticOfferPrice": "0",
              "targetStake": "4977",
              "suppliedStake": "71416699245",
              "auctionStart": "2022-11-13T02:05:55.343344558Z",
              "auctionEnd": "2022-11-17T06:36:40.343344558Z"
            }
          }
        },
        {
          "node": {
            "data": {
              "market": {
                "id": "325dfa07e1be5192376616241d23b4d71740fe712e298130bfd35d27738f1ce4"
              },
              "bestBidPrice": "500000",
              "bestOfferPrice": "0",
              "markPrice": "581671",
              "trigger": "AUCTION_TRIGGER_LIQUIDITY",
              "staticMidPrice": "0",
              "marketTradingMode": "TRADING_MODE_MONITORING_AUCTION",
              "indicativeVolume": "0",
              "indicativePrice": "0",
              "bestStaticBidPrice": "500000",
              "bestStaticOfferPrice": "0",
              "targetStake": "372996",
              "suppliedStake": "73883612485",
              "auctionStart": "2022-11-13T02:05:42.565491876Z",
              "auctionEnd": "2022-11-17T06:36:40.565491876Z"
            }
          }
        },
        {
          "node": {
            "data": {
              "market": {
                "id": "de48ad0adc668a80a074e790d118b6a64fa4909fc60ebbc2c335be3b675fec93"
              },
              "bestBidPrice": "0",
              "bestOfferPrice": "0",
              "markPrice": "0",
              "trigger": "AUCTION_TRIGGER_OPENING",
              "staticMidPrice": "0",
              "marketTradingMode": "TRADING_MODE_OPENING_AUCTION",
              "indicativeVolume": "0",
              "indicativePrice": "0",
              "bestStaticBidPrice": "0",
              "bestStaticOfferPrice": "0",
              "targetStake": "0",
              "suppliedStake": "1",
              "auctionStart": "2022-11-11T16:27:05.914266339Z",
              "auctionEnd": "2022-11-11T16:30:35.914266339Z"
            }
          }
        }
      ]
    }
  }
}

{
  "data": {
    "marketsConnection": {
      "edges": [
        {
          "node": {
            "id": "ad2e531441c2e8a43e85423db399a4acc8f9a8a2376304a4c377d0da8eb31e80",
            "decimalPlaces": 5,
            "positionDecimalPlaces": 3,
            "state": "STATE_ACTIVE",
            "tradingMode": "TRADING_MODE_CONTINUOUS",
            "fees": {
              "factors": {
                "makerFee": "0.0002",
                "infrastructureFee": "0.0005",
                "liquidityFee": "0.0001"
              }
            },
            "tradableInstrument": {
              "instrument": {
                "id": "",
                "name": "BTCUSD Monthly (Dec 2022)",
                "code": "BTCUSD.MF21",
                "metadata": {
                  "tags": [
                    "formerly:076BB86A5AA41E3E",
                    "base:BTC",
                    "quote:USD",
                    "class:fx/crypto",
                    "monthly",
                    "sector:crypto",
                    "auto:btcusd"
                  ]
                },
                "product": {
                  "settlementAsset": {
                    "symbol": "tDAI",
                    "decimals": 5
                  },
                  "quoteName": "USD"
                }
              }
            },
            "marketTimestamps": {
              "open": "2022-11-12T19:47:55.711958932Z",
              "close": null
            }
          }
        },
        {
          "node": {
            "id": "e503cadb437861037cddfd7263d25b69102098a97573db23f8e5fc320cea1ce9",
            "decimalPlaces": 5,
            "positionDecimalPlaces": 1,
            "state": "STATE_ACTIVE",
            "tradingMode": "TRADING_MODE_CONTINUOUS",
            "fees": {
              "factors": {
                "makerFee": "0.0002",
                "infrastructureFee": "0.0005",
                "liquidityFee": "0.001"
              }
            },
            "tradableInstrument": {
              "instrument": {
                "id": "",
                "name": "LINKUSD",
                "code": "LINKUSD",
                "metadata": {
                  "tags": [
                    "base:LINK",
                    "quote:mUSDT-II",
                    "class:fx/crypto",
                    "monthly",
                    "sector:defi",
                    "settlement-expiry-date:2022-11-21T10:00:00.000Z"
                  ]
                },
                "product": {
                  "settlementAsset": {
                    "symbol": "mUSDT-II",
                    "decimals": 18
                  },
                  "quoteName": "USD"
                }
              }
            },
            "marketTimestamps": {
              "open": "2022-11-16T12:48:48.751190767Z",
              "close": null
            }
          }
        },
        {
          "node": {
            "id": "e9ec6d5c46a7e7bcabf9ba7a893fa5a5eeeec08b731f06f7a6eb7bf0e605b829",
            "decimalPlaces": 5,
            "positionDecimalPlaces": 3,
            "state": "STATE_ACTIVE",
            "tradingMode": "TRADING_MODE_CONTINUOUS",
            "fees": {
              "factors": {
                "makerFee": "0.0002",
                "infrastructureFee": "0.0005",
                "liquidityFee": "0.0001"
              }
            },
            "tradableInstrument": {
              "instrument": {
                "id": "",
                "name": "ETHUSD",
                "code": "ETHUSD",
                "metadata": {
                  "tags": [
                    "formerly:4BC6D2154BE74E1F",
                    "base:ETH",
                    "quote:DAI",
                    "class:fx/crypto",
                    "monthly",
                    "sector:defi"
                  ]
                },
                "product": {
                  "settlementAsset": {
                    "symbol": "tDAI",
                    "decimals": 5
                  },
                  "quoteName": "USD"
                }
              }
            },
            "marketTimestamps": {
              "open": "2022-11-15T12:47:01.632822068Z",
              "close": null
            }
          }
        },
        {
          "node": {
            "id": "e3119d341022a401cc68ba3a7ead5c431028d0060b3a49fc115025d7784c646f",
            "decimalPlaces": 5,
            "positionDecimalPlaces": 3,
            "state": "STATE_TRADING_TERMINATED",
            "tradingMode": "TRADING_MODE_NO_TRADING",
            "fees": {
              "factors": {
                "makerFee": "0.0002",
                "infrastructureFee": "0.0005",
                "liquidityFee": "0.01"
              }
            },
            "tradableInstrument": {
              "instrument": {
                "id": "",
                "name": "ETHUSD",
                "code": "ETHUSD",
                "metadata": {
                  "tags": [
                    "formerly:4BC6D2154BE74E1F",
                    "base:ETH",
                    "quote:DAI",
                    "class:fx/crypto",
                    "monthly",
                    "sector:defi"
                  ]
                },
                "product": {
                  "settlementAsset": {
                    "symbol": "tDAI",
                    "decimals": 5
                  },
                  "quoteName": "USD"
                }
              }
            },
            "marketTimestamps": {
              "open": "2022-11-14T14:03:52.0161126Z",
              "close": null
            }
          }
        },
        {
          "node": {
            "id": "07549b2cf93abbf6fb8ad976af3f24876e5946df85a3b6f0a6338672c7453bfa",
            "decimalPlaces": 5,
            "positionDecimalPlaces": 1,
            "state": "STATE_TRADING_TERMINATED",
            "tradingMode": "TRADING_MODE_NO_TRADING",
            "fees": {
              "factors": {
                "makerFee": "0.0002",
                "infrastructureFee": "0.0005",
                "liquidityFee": "0.01"
              }
            },
            "tradableInstrument": {
              "instrument": {
                "id": "",
                "name": "LINKUSD",
                "code": "LINKUSD",
                "metadata": {
                  "tags": [
                    "base:LINK",
                    "quote:mUSDT-II",
                    "class:fx/crypto",
                    "monthly",
                    "sector:defi",
                    "settlement-expiry-date:2022-11-21T10:00:00.000Z"
                  ]
                },
                "product": {
                  "settlementAsset": {
                    "symbol": "mUSDT-II",
                    "decimals": 18
                  },
                  "quoteName": "USD"
                }
              }
            },
            "marketTimestamps": {
              "open": "2022-11-11T17:04:51.038009124Z",
              "close": null
            }
          }
        },
        {
          "node": {
            "id": "90e71c52b2f40db78efc24abe4217382993868cd24e45b3dd17147be4afaf884",
            "decimalPlaces": 5,
            "positionDecimalPlaces": 3,
            "state": "STATE_SUSPENDED",
            "tradingMode": "TRADING_MODE_MONITORING_AUCTION",
            "fees": {
              "factors": {
                "makerFee": "0.0002",
                "infrastructureFee": "0.0005",
                "liquidityFee": "0.001"
              }
            },
            "tradableInstrument": {
              "instrument": {
                "id": "",
                "name": "AAVEDAI Monthly (Dec 2022)",
                "code": "AAVEDAI.MF21",
                "metadata": {
                  "tags": [
                    "formerly:2839D9B2329C9E70",
                    "base:AAVE",
                    "quote:DAI",
                    "class:fx/crypto",
                    "monthly",
                    "sector:defi",
                    "auto:aavedai"
                  ]
                },
                "product": {
                  "settlementAsset": {
                    "symbol": "tDAI",
                    "decimals": 5
                  },
                  "quoteName": "DAI"
                }
              }
            },
            "marketTimestamps": {
              "open": "2022-11-12T20:16:11.305547391Z",
              "close": null
            }
          }
        },
        {
          "node": {
            "id": "acff1b95980c3355e65c7162c35917388702525c0475ba753f03d0efc9c6d6a3",
            "decimalPlaces": 5,
            "positionDecimalPlaces": 3,
            "state": "STATE_SUSPENDED",
            "tradingMode": "TRADING_MODE_MONITORING_AUCTION",
            "fees": {
              "factors": {
                "makerFee": "0.0002",
                "infrastructureFee": "0.0005",
                "liquidityFee": "0.001"
              }
            },
            "tradableInstrument": {
              "instrument": {
                "id": "",
                "name": "Tesla Quarterly (Feb 2023)",
                "code": "TSLA.QM21",
                "metadata": {
                  "tags": [
                    "formerly:5A86B190C384997F",
                    "quote:EURO",
                    "ticker:TSLA",
                    "class:equities/single-stock-futures",
                    "sector:tech",
                    "listing_venue:NASDAQ",
                    "country:US",
                    "auto:tsla"
                  ]
                },
                "product": {
                  "settlementAsset": {
                    "symbol": "tEURO",
                    "decimals": 5
                  },
                  "quoteName": "EURO"
                }
              }
            },
            "marketTimestamps": {
              "open": "2022-11-11T16:49:58.055844456Z",
              "close": null
            }
          }
        },
        {
          "node": {
            "id": "c80c1cc89dcc5a302e443b7fcd215cdadbb259f6b180db6253a5572ad6406253",
            "decimalPlaces": 5,
            "positionDecimalPlaces": 3,
            "state": "STATE_SUSPENDED",
            "tradingMode": "TRADING_MODE_MONITORING_AUCTION",
            "fees": {
              "factors": {
                "makerFee": "0.0002",
                "infrastructureFee": "0.0005",
                "liquidityFee": "0.001"
              }
            },
            "tradableInstrument": {
              "instrument": {
                "id": "",
                "name": "Apple Monthly (Dec 2022)",
                "code": "AAPL.MF21",
                "metadata": {
                  "tags": [
                    "formerly:4899E01009F1A721",
                    "quote:USD",
                    "ticker:AAPL",
                    "class:equities/single-stock-futures",
                    "sector:tech",
                    "listing_venue:NASDAQ",
                    "country:US",
                    "auto:aapl"
                  ]
                },
                "product": {
                  "settlementAsset": {
                    "symbol": "tUSDC",
                    "decimals": 5
                  },
                  "quoteName": "USD"
                }
              }
            },
            "marketTimestamps": {
              "open": "2022-11-11T16:51:53.946493236Z",
              "close": null
            }
          }
        },
        {
          "node": {
            "id": "8b4aaea9cf7cbbeee90aa6ccea21bd5b9ec15c1872d6b0b3a58e31b741dd948a",
            "decimalPlaces": 5,
            "positionDecimalPlaces": 3,
            "state": "STATE_SUSPENDED",
            "tradingMode": "TRADING_MODE_MONITORING_AUCTION",
            "fees": {
              "factors": {
                "makerFee": "0.0002",
                "infrastructureFee": "0.0005",
                "liquidityFee": "0.001"
              }
            },
            "tradableInstrument": {
              "instrument": {
                "id": "",
                "name": "ETHBTC Quarterly (Feb 2023)",
                "code": "ETHBTC.QM21",
                "metadata": {
                  "tags": [
                    "formerly:1F0BB6EB5703B099",
                    "base:ETH",
                    "quote:BTC",
                    "class:fx/crypto",
                    "quarterly",
                    "sector:crypto",
                    "auto:ethbtc"
                  ]
                },
                "product": {
                  "settlementAsset": {
                    "symbol": "tBTC",
                    "decimals": 5
                  },
                  "quoteName": "BTC"
                }
              }
            },
            "marketTimestamps": {
              "open": "2022-11-12T19:47:55.711958932Z",
              "close": null
            }
          }
        },
        {
          "node": {
            "id": "325dfa07e1be5192376616241d23b4d71740fe712e298130bfd35d27738f1ce4",
            "decimalPlaces": 5,
            "positionDecimalPlaces": 3,
            "state": "STATE_SUSPENDED",
            "tradingMode": "TRADING_MODE_MONITORING_AUCTION",
            "fees": {
              "factors": {
                "makerFee": "0.0002",
                "infrastructureFee": "0.0005",
                "liquidityFee": "0.001"
              }
            },
            "tradableInstrument": {
              "instrument": {
                "id": "",
                "name": "UNIDAI Monthly (Dec 2022)",
                "code": "UNIDAI.MF21",
                "metadata": {
                  "tags": [
                    "formerly:3C58ED2A4A6C5D7E",
                    "base:UNI",
                    "quote:DAI",
                    "class:fx/crypto",
                    "monthly",
                    "sector:defi",
                    "auto:unidai"
                  ]
                },
                "product": {
                  "settlementAsset": {
                    "symbol": "tDAI",
                    "decimals": 5
                  },
                  "quoteName": "DAI"
                }
              }
            },
            "marketTimestamps": {
              "open": "2022-11-12T19:47:58.309555486Z",
              "close": null
            }
          }
        },
        {
          "node": {
            "id": "de48ad0adc668a80a074e790d118b6a64fa4909fc60ebbc2c335be3b675fec93",
            "decimalPlaces": 5,
            "positionDecimalPlaces": 3,
            "state": "STATE_PENDING",
            "tradingMode": "TRADING_MODE_OPENING_AUCTION",
            "fees": {
              "factors": {
                "makerFee": "0.0002",
                "infrastructureFee": "0.0005",
                "liquidityFee": "0.01"
              }
            },
            "tradableInstrument": {
              "instrument": {
                "id": "",
                "name": "ETHDAI Monthly (Dec 2022)",
                "code": "ETHDAI.MF21",
                "metadata": {
                  "tags": [
                    "formerly:4BC6D2154BE74E1F",
                    "base:ETH",
                    "quote:DAI",
                    "class:fx/crypto",
                    "monthly",
                    "sector:defi",
                    "auto:ethdai"
                  ]
                },
                "product": {
                  "settlementAsset": {
                    "symbol": "tDAI",
                    "decimals": 5
                  },
                  "quoteName": "DAI"
                }
              }
            },
            "marketTimestamps": {
              "open": "2022-11-11T16:27:05.914266549Z",
              "close": null
            }
          }
        }
      ]
    }
  }
}

repo: vegaprotocol/frontend-monorepo


text:
[BUG] Transfer between ACCOUNT_TYPE_VESTED_REWARDS and ACCOUNT_TYPE_GENERAL

https://github.com/vegaprotocol/frontend-monorepo/blob/06cfd79415e8a57b3edddece133e818ea662729f/libs/accounts/src/lib/transfer-form.tsx#L299C1-L299C60
In my opinion bug is that the system checks the wrong "From account" - it should check the amount in "ACCOUNT_TYPE_VESTED_REWARDS" but for some reasons it checks the amount on "General"

It got fixed

Does not work anymore

I have done this many times over the past couple of months and it works fine, so whatever this issue was has been resolved now.

Fixed long time ago;

source: gharchive/issue

license: MIT

license_type: permissive

license_source: github-api


text:
Upgrade to Chocolatey package v1.0.11 failing

Current behavior
devtoys package v1.0.11, as currently published on the Chocolatey Community Repository, currently points to v1.0.9.0 of DevToys.
This causes a package upgrade from v1.0.10.0 to fail, because a newer version of DevToys is currently installed.
How to reproduce it (as minimally and precisely as possible)

choco install devtoys --version=1.0.10.0 --source="'https://community.chocolatey.org/api/v2'"
choco upgrade devtoys --source="'https://community.chocolatey.org/api/v2'"

Expected behavior
devtoys package v1.0.11 should consume version 1.0.11.0 of DevToys instead of v1.0.9.0.
A package fix version will need to be published to correct the issue.
I would also recommend unlisting the current v1.0.11 package to help avoid future failures.
Screenshots
No response
Workaround
No response
Affected platforms
Windows
Affected DevToys kind
DevToys (app with GUI)
DevToys Version
1.0.10.0
Relevant Assets/Logs
chocolatey.log

Hi,
Good catch! Thank you very much for reporting this issue and sorry for the inconvenience.
I indeed made a mistake...
I pushed a new version 1.0.11.20230410. It should be available within a few hours.

repo: veler/DevToys


text:
Repo using HTTP address now fails on commit sync and builds

Getting the following output when I try a sync from a fresh restart on Velocity project using HTTP address
architect_1  | 2018-08-12T12:52:39.396Z	INFO	sync/manager.go:52	synchronising project	{"slug": "velocity"}
architect_1  | 2018-08-12T12:52:39.548Z	INFO	velocity/git.go:168	fetching repository	{"cmd": "git fetch --progress --depth=1 --recurse-submodules"}
architect_1  | 2018-08-12T12:52:39.549Z	INFO	sync/manager.go:63	could not clone repository	{"error": "ssh-agent not found"}
architect_1  | 2018-08-12T12:52:39.551Z	INFO	sync/manager.go:88	finished synchronising project	{"slug": "velocity"}

but SSH repository works fine 👍

repo: velocity-ci/velocity

license_source: bigquery


text:
[BO] Store settings

What settings do we want to add to a store for management of wishlists.
My initial thoughts are the following:

Bool - Ability to enable/disable wishlists
Bool - Do wishlist names have to be unique per customer
Option - When loading a wishlist into the basket, should it override the existing basket, add the items to it, or Prompt the user as to what they want to do.

Not sure the best approach to store settings for Vendr packages at the moment.
It could be a separate node under Vendr settings, but would probably require a "Wishlist" node injects under each store). It would also be a config file similar to the Order Editor Config in Vendr core.
I don't think Wishlist names need to be unique per customer. From what I have seen in other ecommerce systems it is mosly used when having multiple wishlists per customer, e.g. you could create a wishlist "Christmas", "Birthday", etc. When adding a product to wishlist you could get an overlay/modal where the customer can select a wishlist to add this product.
I think wishlists should affect existing baskets/carts, but wishlist order lines usually have a "Add to cart" button and sometimes a feature like "merge wishlist with basket".

As a start I don't think we need to worry much about settings. The developer can decide whether to use wishlists or not. It would be great to go with default settings and later look further at which part that need to be configurable, but I guess if isn't crucial for an initial release.
Maybe @mattbrailsford has some thoughts on how Vendr packages should handle settings.

I was thinking about this yesterday and wondering if there should be a plugin solution for this. Either rendering new blocks in the store settings, or something like content apps. I'd need to give it some more thought though.

Yeah, it would help if we can inherit from a base class in Vendr core or maybe something similar as we payment provider settings. We should also consider that some settings are store specific (but I think Vendr at the moment doesn't have soem global settings at the moment - the ones in settings section are store specific). I guess this is okay, although it in some cases might require to enter same value in a settings property on multiple stores.
Maybe it would be great to have the by default under the "Settings" tab on the store settings node. In some cases for Reviews or Wishlist maybe we want to inject our own tree node to store the settings here.
Regarding payment provider I have some additonal issues here, where it would be great to be able to group these a bit more:
https://github.com/vendrhub/vendr/issues/64
https://github.com/vendrhub/vendr/issues/65
https://github.com/vendrhub/vendr/issues/105

The reason I suggested about the unique wishlist names per customer is that I had that exact requirement from a client, so I'd be keen to keep that as a setting if we can.

Ahh, yes  I think the wishlist names doesn't need to be unique, but per customer it probably don't make sense to have mutliple wishlists with same name.
Not sure we need a setting for this, it could probably be handled in the service or repository.
However we might also consider if anonymous customers can create wishlists (in some ecommerce systems this is possible) and in this scenario we don't have a customer reference by default.

Currently I don't think we have a standard dag to handle settings for add-ons in Vendr expect for payment providers.
We could store some settings in web.config or in Order Editor Config or a specific config file in the plugin. However sometimes we want to modify the settings from backoffice and per store. It could be useful to add properties in backoffice e.g  in store settings node and allow some grouping + sorting.

I am not sure about the setting "Ability to enable/disable wishlists".
If the package was installed in a project, I guess wishlists are supported to be used. Furthermore it this was an option, it should probably be considered, what happens if wishlists were enabled and later disabled. In that case I guess we don't want some wishlist specific stuff in "Commerce" section and the customers won't be able to see wishlists?
Not sure it is big requirement though. As a start if would be great to keep it simple and with minimum settings/configurations.

authors: NikRimington bjarnef mattbrailsford

repo: vendrcontrib/vendr-wishlists


text:
ConvertUtil.toMap(Entry<K, V>...) 新增 null element校验

ConvertUtil.toMap(Entry<K, V>...) 新增 null element校验
如果有元素是null ,那么抛出异常

    public static <V, K> Map<K, V> toMap(Map.Entry<K, V>...mapEntrys){
        if (null == mapEntrys){
            return emptyMap();
        }
        Validate.noNullElements(mapEntrys, "mapEntrys can't has null elememt!");

        Map<K, V> map = newLinkedHashMap(mapEntrys.length);
        for (Map.Entry<K, V> entry : mapEntrys){
            map.put(entry.getKey(), entry.getValue());
        }
        return map;
    }

新增
Validate.noNullElements(mapEntrys, "mapEntrys can't has null elememt!");

注意 null的使用
比如
    @Test(expected = IllegalArgumentException.class)
    public void testToMapWithNullElement(){
        toMap((Map.Entry<String, String>) null);
    }

以及

    @Test
    public void testToMapNullArray3(){
        assertEquals(emptyMap(), toMap((Map.Entry<String, String>[]) null));
    }

    @Test
    public void testToMapNullArray2(){
        Map.Entry<String, String>[] entries = null;
        assertEquals(emptyMap(), toMap(entries));
    }

    @Test
    public void testToMapNullArray1(){
        assertEquals(emptyMap(), toMap());
    }

repo: venusdrogon/feilong-core


text:
Project Config support?

Hey team! Just wondering, is there anything on the roadmap for this plugin to support the Craft 3.1 Project Config feature, so that field settings can be saved into the project.yaml file and synced between environments?

@Kashkin @lindseydiloreto Any progress on this? I'd really like to use it on a new project but i need config support!

Hey @adrienne, I'm not really responsible for Button Box, generally speaking. I added the "Triggers" functionality, but outside of maintaining that feature, I don't actually contribute to this plugin at all.
To be honest, I may someday extract that Triggers functionality into a separate plugin. Button Box doesn't tend to get much love, it's been handled by a random series of developers since Josh left the company. I'm not really sure who is in charge of it anymore.

@lindseydiloreto - if you're interested in forking the whole plugin including Triggers, i would be willing to help with that!

Interesting proposition @adrienne... let me think about that. If I did fork this plugin, I'd keep the fork private. I'm not interested in publicly maintaining my own version of it.
I'll DM you on Discord!

Not sure where this conversation trailed off to @lindseydiloreto and @adrienne but ButtonBox, like every other Craft field is supported by project config whether you want to or not!

Good to know, thanks @engram-design! Really glad to see that Verbb has acquired Button Box, it gives me hope for the future of it. 🙂

authors: adrienne engram-design lindseydiloreto michaelroper

repo: verbb/buttonbox


text:
Learning course: Chapter 2 root layout link leads to 404 page

What is the learning course issue?
The learning guide's Second chapter has the wrong link for the root layout reference in the Global Styles section, which leads to the Not Found page.
Is there any context that might help us understand?
Navigate to https://nextjs.org/learn/dashboard-app/css-styling#global-styles
In this paragraph, there is a wrong link for [root layout]: https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts#root-layout-required

"You can import global.css in any component in your application, but it's usually good practice to add it to your top-level component. In Next.js, this is the root layout (more on this later)."

Does the docs page already exist? Please link to it.
I believe the correct link should be this one: https://nextjs.org/docs/app/building-your-application/routing/layouts-and-templates#root-layout-required

Duplicate of https://github.com/vercel/next-learn/issues/889

repo: vercel/next-learn


text:
Convert repository to template?

Is it possible to convert this repository from a conventional repo to a GitHub template? It provides better workflows for creating private copies.

Sorry for the late reply. I don't have access to the repo settings anymore, so would need @leerob or someone from the Vercel team to do this.

Hey! I think we're going to leave this as is - thank you for the suggestion though! 😄

authors: RobRoseKnows leerob thorwebdev

repo: vercel/nextjs-subscription-payments


text:
pageSWRs returns cached data only on the second render

This is a bug introduced by #317. When the pages are fully cached and trying to render, setPageSWRs will be called in the next tick.

The new pagination API has launched: https://swr.vercel.app/docs/pagination. Feel free to reopen if you are still encountering an issue!

repo: vercel/swr


text:
Make systemd unit more production-like

Type: feature
Fixed the following things in systemd unit:

Added Restart=always to ensure verdaccio keeps running after fail caused by plugins (e.g. verdaccio-ldap, see https://github.com/Alexandre-io/verdaccio-ldap/issues/39)
Removed totally useless ExecStop clause
Added --config start parameter

Please read errors

I updated commit, and my big comment to your second question vanished from conversation :( I hope you still have it in your mailbox.

@tiandrey Ooops, yes, for some reason it also disappeared for me :-/ I don't see your comment anywhere. I'm adding my comment again (luckily I use a paste manager xD)

Your comment email just came in, I'm pasting
@tiandrey wrote:

I personally use fpm (https://github.com/jordansissel/fpm) - it builds DEBs and RPMs from npm just fine. And it automatically installs configs from conf subdir to /etc/verdaccio.

@tiandrey could you add a new section here https://github.com/verdaccio/verdaccio/blob/master/docs/server.md and document all these new things? There was no info before, but I'm sure user will ask in the future.

Sure. Updated docs.

It looks good to me, except the pending question about the Restart option.

source: gharchive/pull-request

authors: dlouzan juanpicado tiandrey

repo: verdaccio/verdaccio


text:
Web book to listen QOS 2 message acknowledgment from client

Environment

VerneMQ Version: Latest
OS: Linux

Expected behaviour
VerneMQ to publish web hooks for QOS 2 message acknowledgement from client, once the messages are delivered successfully.
Actual behaviour
In the current architecture, a web hook called on_deliver is invoked  when the message is being delivered/send to client. But for qos-2 setting, message is considered successfully delivered only when the client acknowledge it back. Is there a hook available to capture it. Or does the on_deliver hook itself can be considered as the source to confirm the message is being delivered successfully to client.
Please treat this issue as a question/need opinion tag.

Discussed in https://groups.google.com/g/vernemq-users/c/RoyC2cZOr1Y

@ioolkos
Shall continue the discussions here, on the requirement.
To highlight, we are performing an evaluation on VerneMQ, and Quoting the one of the major data recovery business objective below,

To monitor and identify if there are misses, and then re initiate or republish is an important part of business operation for us.

We consider the following cases for message persistence, which must be used for recovery.

Offline messages (which are available via web-hook)
Messages which are not acknowledged, but delivered. (waiting acknowledgment).

Currently there are no option to track the messages which are not acknowledged in case of QoS-2.
It would be great if you consider adding this hook as enhancement in your next milestone.

@anupbvr thanks for your suggestions. First action point is to understand the requested feature in detail, second to decide whether this is something that matches technical roadmap of VerneMQ and whether we want to support & maintain those added features in the future.
And third, find a possible sponsor for development.

authors: anupbvr ioolkos

repo: vernemq/vernemq


text:
添加依赖 libcap-bin，以便安装OpenClash时自动安装libcap-bin

解决 https://github.com/vernesong/OpenClash/issues/839
添加依赖 libcap-bin，以便安装OpenClash时自动安装libcap-bin

为什么关掉了

repo: vernesong/OpenClash


text:
This fixes #55 vertx-hazelcast isn't OSGi friendly

This adds OSGi meta data regarding imports/exports of packages

@cescoffier would you mind to have a look? Thanks

It's a great first step, but I see one issue.
The Vert.x Hazelcast bundle would resolve and export its content. But, because we use a SPI in Vert.x Core, it would not be able to find Hazelcast as an implementation.  So, in the bundle creating the Vert.x instance it must create the Hazelcast cluster manager instance and pass it to the Vert.x instance (Vert.x Options). Is it what you do?
This way works, but it creates a strong coupling between the bundle creating the Vert.x instance, Vert.x Core and the Vert.x Hazelcast bundle. This coupling would not be able to handle the OSGi dynamics (typically any attempt to reload will probably fail).
Despite this shortcoming, I think it's a great first step and definitely 👍 .

authors: ANierbeck cescoffier tsegismont


text:
added new UTs for eval,read and filter vDataframe and deleted old UTs

added new UTs for eval,read and filter vDataframe and deleted old UTs
Deleted old tests

deleted test_vDF_filter_sample.py old unit test file as all functions are covered under new_test VerticaPy/verticapy/tests_new/core/vdataframe/test_filter.py and VerticaPy/verticapy/tests_new/core/vdataframe/test_read.py
deleted test_vDF_dropna function from old test_vDF_preprocessing.py as this test is covered under new_test VerticaPy/verticapy/tests_new/core/vdataframe/test_filter.py
deleted test_vDF_eval function from old test_vDF_feature_engineering.py as this test is covered under new_test VerticaPy/verticapy/tests_new/core/vdataframe/test_eval.py
deleted test_vDF_get_columns,test_vDF_head,test_vDF_tail,test_vDF_iloc functions from old test_vDF_utilities.py as this test is covered under new_test VerticaPy/verticapy/tests_new/core/vdataframe/test_read.py
deleted test_vDF_nlargest, test_vDF_nsmallest functions from old test_vDF_descriptive_statistics.py as this test is covered under new_test VerticaPy/verticapy/tests_new/core/vdataframe/test_read.py

please @mail4umar review to see if the structure is what you need.

repo: vertica/VerticaPy


text:
shapes available

I see a circle, is there a way to fill it to make it a disc?
Also is there a way to draw a multiline by feeding it a Vector3[]?

I don't support solid shapes: https://github.com/vertxxyz/Vertx.Debugging/issues/15
And Shape.LineStrip takes an Enumerable of Vector3 which is draws a connected line between the input points.

authors: laurentopia vertxxyz


text:
[docs] Add entire DataStream API package guidance

Users always confused by shade/class conflicts when users use datastream api to build their own application, especially their Application designed to deploy on multiple version flink cluster.
We can give an example or tutorial to let user understand better.

Hi @leonardBang  I am very interested in this，and I want do some job for flink-cdc，can I help to do that？
Thank you

@caicancai Sure, assign this ticket to you.

Is there a document reference format？

Hi, @caicancai . Is there any progress about this issue ? You could take a look at the existed documents. if I recall it correctly,  there is not a fixed format for the documents now. Thanks~

I was busy with work some time ago, and this part of the work has been carried out recently, and I will try to complete it in the next two weeks @ruanhang1993

@ruanhang1993 Sorry, there has been no progress recently. Since I am using the TiDB CDC Connector recently, I am improving this part of the function. If necessary, let others complete this feature first

@ruanhang1993 Sorry, due to the busy work some time ago, this work has been carried out, but it is difficult for me and it will take a certain amount of time

@ruanhang1993 I will finish it in this time

Hi, @caicancai . Thanks for your reply. I will review it when you need my helps.

Hi，@ruanhang1993 .
I want to ask whether it is possible to write various datastream APIs in this way
Operators
Operators transform one or more DataStreams into a new DataStream. Programs can combine multiple transformations into sophisticated dataflow topologies.
Filter
DataStream → DataStream
Evaluates a boolean function for each element and retains those for which the function returns true. A filter that filters out zero values:
Java

import com.ververica.cdc.connectors.mysql.source.MySqlSource;
import com.ververica.cdc.debezium.JsonDebeziumDeserializationSchema;
import org.apache.flink.api.common.eventtime.WatermarkStrategy;
import org.apache.flink.api.common.functions.FilterFunction;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;
import org.apache.flink.util.Collector;

public class MySqlSourceExample2 {
    public static void main(String[] args) throws Exception {

        MySqlSource<String> mySqlSource = MySqlSource.<String>builder()
            .hostname("yourHostname")
            .port(yourPort)
            .databaseList("yourDatabaseName") // set captured database, If you need to synchronize the whole database, Please set tableList to ".*".
            .tableList("yourDatabaseName.yourTableName") // set captured table
            .username("yourUsername")
            .password("yourPassword")
            .deserializer(new JsonDebeziumDeserializationSchema()) // converts SourceRecord to JSON String
            .build();

        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        env.enableCheckpointing(3000);

        DataStream<String> stream = env.fromSource(mySqlSource, WatermarkStrategy.noWatermarks(), "MySQL Source");
        DataStream<String> words = stream.filter(new FilterFunction<String>() {
            @Override
            public boolean filter(String value) throws Exception {
                return value != " ";
            }
        });
        words.print();
        env.execute();
    }
}

Is the guidance written based on these DataStreams enough?

@ruanhang1993

@caicancai Sorry for my late reply.
I think this guide aims at providing a demo about how to package the jar and avoiding the classes conflict. The datastream API could be found in the Flink documents. We do not need to describe them here.
We should provide the pom.xml and the example codes for each cdc connector. Let developers know how to package their   code.

@ruanhang1993 Thanks for your reply, I've started working on this, there may have been a problem with the previous directions, so sorry

I've started work on this

@ruanhang1993  Do I need different datastream APIs to depend on flink versions, for example, some datastream APIs only exist in flink1.16, but not in flink1.10

@ruanhang1993 Hello, I was a little busy a while ago, and I have some questions that need your answers. Do I need to consider the dependence of different datastream APIs on the flink version? For example, some datastream APIs only exist in flink1.16, but not in flink1.10.

I think the solution is mainly:
Try to use the high-level API provided by Flink
Do not use Flink internal classes directly
Use other common classes (such as the Java standard class library)
Explicitly specify Flink version dependencies
Ensure that the version of the Flink cluster and the version of the application code are consistent during deployment

I think this kind of is unavoidable, so what I can do is to use the shade plugin to repackage exclude Flink classes

Hi, @caicancai .
We can provide a demo in Flink 1.16 or 1.17 in the first version.

@ruanhang1993 Thank you for your reply, then I will start writing the document this weekend

我的一些经验是：
比如我做的是mariadb、oceanbase组合的stream api同步。
我就把：
flink-sql-connector-mysql-cdc-2.4.1.jar
flink-sql-connector-oceanbase-cdc-2.4.1.jar
复制同步依赖的flinkcdc的jar到lib/中
之后如果对应的jar存在相关的类，就采用jar里面的东西。
比如：
import com.ververica.cdc.connectors.shaded.org.apache.kafka.connect.data.Field;
import com.ververica.cdc.connectors.shaded.org.apache.kafka.connect.data.Schema;
import com.ververica.cdc.connectors.shaded.org.apache.kafka.connect.data.Struct;
import com.ververica.cdc.connectors.shaded.org.apache.kafka.connect.source.SourceRecord;
另外是mysql驱动的问题：
应用上述的flink-sql-connector-*.jar都存在mysql驱动，当时版本有冲突，那么，我向flink/lib中放入一个
mariadb-java-client-2.7.9.jar ，之后使用org.mariadb.jdbc.Driver 作为驱动名字，验证没有问题。
希望有所帮助。

@caicancai Do you have any progress on this issue?

@gtk96 Sorry, due to the busy time, there is no progress in this part for the time being. You can distribute this feature to others. I'm sorry to have caused any trouble

@ruanhang1993 @GOODBOY008 @Jiabao-Sun Please assign this task to me. I have implemented a simple pom sample locally and successfully run it in the local flink session cluster. Where should I add a pom example?

Thanks @gtk96, assigned to you.

Thanks @gtk96, assigned to you.

hi @Jiabao-Sun Where is the best place to add this user guidance example?

How about Getting Started section?

Hi, can Flink CDC support PyFlink DataStream API?

authors: Jiabao-Sun MartinHou caicancai gtk96 jikuanyu leonardBang ruanhang1993

repo: ververica/flink-cdc-connectors


text:
Math Input (MathEditor port)

Just as CSharpMath started as a port of iosMath, MathEditor, which builds on iosMath, could be ported to add editing support to CSharpMath.
@verybadcat can you keep us updated about your thoughts on doing this port? Thanks!

I'm targeting this for 0.2.0 for now.

I'm afraid that this will take longer than expected. Can you please allow a few more days?

0.2.0-alpha has been put on NuGet.
Touch response (navigation) is still being worked on.
The main property is CSharpMath.Forms.EditableMathView.Default.

Great! Is this ready to test? We are a bit overloaded here for the next few days but can test soon.

0.2.0-alpha2 is ready!
Still bugfixes to go though.

0.2.0-alpha3 brings an editor which left/right buttons are usable.
Please test~

I intend to wrap this up very soon. Touch insertion will be pushed to the F# version. Is there an API shape that you would like to be seen?

Gif looks good @Happypig375 . Could we have a normal cursor?
This is the API that I would like:

A view with Skiasharp dependency only (not Forms).
Properties and instance methods on the input View for inserts/commands.
A property for getting latex (perhaps to be replaced with a structural version in the future F# version).
A method for setting the cursor position based on a coordinate (understood that this is pushed to the F# version).

Inserts/commands needed:

Left, right, up, down, backspace, clear
left bracket "(", right bracket ")", 0-9, decimal place, divide, times (cdot), minus, plus
Characters a-z, A-Z, greek
Functions including sin, cos, tan ,sin^-1, cos^-1, tan^-1, power, sqrt, nth root, modulus ("| |"), sinh, cosh, tanh, exp ("e^"), ln, log, "!".

Some intelligence will be needed eventually about combining inputs. E.g. if the user types "s" then "i" then "n" it should get combined into the sin function. (To accomodate keyboard usage.) MathQuill is a good reference for good behavior.
Does this conform to what you had in mind?

repo: verybadcat/CSharpMath

license: mit


text:
[openCypher tck case] exists function

Unsupported.
neo4j test:
neo4j@neo4j> MATCH (n)
             WHERE EXISTS (n.name)
             RETURN n.name AS name, EXISTS ((n)-[:MARRIED]->()) AS is_married;
+-------------------+
| name | is_married |
+-------------------+
| "a"  | FALSE      |
| "b"  | FALSE      |
| "c"  | FALSE      |
| "a"  | FALSE      |
| "b"  | FALSE      |
| "c"  | FALSE      |
+-------------------+

refer to :https://neo4j.com/docs/cypher-manual/current/functions/predicate/#functions-exists

Supported in https://github.com/vesoft-inc/nebula-graph/pull/808

authors: Aiee czpmango

repo: vesoft-inc/nebula-graph


text:
Do not depend on on ClusterInfo config as it changes to often and cau…

…ses a instant clusterwide hickup on any container cluster changes like node retirement.
The corner case it was used for is not worth the cost.
@bratseth PR

I will make a component out of the RpcResourcePool first

Yes, the root cause need to be fixed independently.

That was quick, thanks!

I always have a few branch lying around, just in case...... :)

authors: baldersheim bjormel

repo: vespa-engine/vespa


text:
Arnej/fix concat collapsing

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.
@havardpe please review

look good, some minor nitpicks


text:
Update tests to use Phoenix.HTML.FormData.to_form/2 instead of form_for

On master we are failing two tests:
1) test support setting form and field from changeset (new) (LivePhoneTest)
     test/live_phone_test.exs:63
     ** (FunctionClauseError) no function clause matching in PhoenixHTMLHelpers.Form.form_for/4

     The following arguments were given to PhoenixHTMLHelpers.Form.form_for/4:

         # 1
         #Ecto.Changeset<action: nil, changes: %{}, errors: [], data: #LivePhoneTestApp.User<>, valid?: true>

         # 2
         "/"

         # 3
         []

         # 4
         []

     Attempted function clauses (showing 1 out of 1):

         def form_for(form_data, action, options, fun) when is_function(fun, 1)

     code: form = form_for(changeset, "/")
     stacktrace:
       (phoenix_html_helpers 1.0.1) lib/phoenix_html_helpers/form.ex:261: PhoenixHTMLHelpers.Form.form_for/4
       test/live_phone_test.exs:70: (test)

.

  2) test support setting form and field from changeset (edit) (LivePhoneTest)
     test/live_phone_test.exs:77
     ** (FunctionClauseError) no function clause matching in PhoenixHTMLHelpers.Form.form_for/4

     The following arguments were given to PhoenixHTMLHelpers.Form.form_for/4:

         # 1
         #Ecto.Changeset<action: nil, changes: %{phone: "+16502530000"}, errors: [], data: #LivePhoneTestApp.User<>, valid?: true>

         # 2
         "/"

         # 3
         []

         # 4
         []

     Attempted function clauses (showing 1 out of 1):

         def form_for(form_data, action, options, fun) when is_function(fun, 1)

     code: form = form_for(changeset, "/")
     stacktrace:
       (phoenix_html_helpers 1.0.1) lib/phoenix_html_helpers/form.ex:261: PhoenixHTMLHelpers.Form.form_for/4
       test/live_phone_test.exs:88: (test)

Uses the newer Phoenix.HTML.FormData.to_form/2 as a replacement for Phoenix.HTML.Form.form_for/2.
I'm not completely sure this is a drop-in replacement even though the tests now pass.

Looks good to me.  I think you can safely use it as a drop in replacement.  Before it was deprecated, form_for mostly just called to_form, see:
https://github.com/phoenixframework/phoenix_html/blob/d6c9d5369096540462d837e231f1a1eb5fb50042/lib/phoenix_html/form.ex#L608-L611

authors: axelclark jmillxyz


text:
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

From https://github.com/vicamo/docker-pyenv/actions/runs/1567481376:

Buster:

~3.0.1~: depending on ssl1.0
~3.2.6~: depending on ssl1.0
~3.3.7~: depending on ssl1.0
~3.4.10~: depending on ssl1.0

Bullseye:

~2.6.9~: depending on ssl1.0
~3.0.1~: depending on ssl1.0
~3.4.10~: depending on ssl1.0

Bionic:

2.6.9
3.0.1
3.2.6
3.3.7
3.4.10

Focal:

~2.6.9~: depending on ssl1.0
~3.0.1~: depending on ssl1.0
~3.2.6~: depending on ssl1.0
~3.3.7~: depending on ssl1.0
~3.4.10~: depending on ssl1.0

Basically the only possible builds fall on Bionic because all others has no libssl1.0 available. On Bionic, libssl1.0-dev conflicts with libssl-dev, and yet the shared libraries can coexist, so it's possible to build those python versions on Bionic at the price of a massive change.

repo: vicamo/docker-pyenv


text:
当数据全部在0到1的区间时，Y轴的自动刻度显示问题

当数据全部在0到1的区间时，Y轴的自动刻度显示还是整数，看起来很怪，如下图：

需要提供一下完整的示例代码方便确认

测试代码如下：
func Test2MakeChart(t *testing.T) {

	d := LineInfo{
		Title: "Line",
		YAxisData: [][]float64{
			{
				0.34,
				0.56,
				0.02,
				// 134,
				0.11,
				0.02,
				0.76,
				0.55,
			},
			{
				0.22,
				0.33,
				0.12,
				0.43,
				0.23,
				0.21,
				0.11,
			},
		},
		XAxisData: []string{
			"Mon",
			"Tue",
			"Wed",
			"Thu",
			"Fri",
			"Sat",
			"Sun",
		},
		LegendLabels: []string{
			"Email",
			"Union Ads",
		},
	}
	err := MakeChart(d, "/Users/luohui/temp", "test2")
	if err != nil {
		fmt.Printf("error: %s\n", err.Error())
		return
	}
	fmt.Printf("ok\n")

}

type LineInfo struct {
	Title        string
	XAxisData    []string
	YAxisData    [][]float64
	LegendLabels []string
}

func WriteFile(buf []byte, path string, filename string) error {
	err := os.MkdirAll(path, 0700)
	if err != nil {
		return err
	}

	file := filepath.Join(path, filename+".png")
	err = os.WriteFile(file, buf, 0600)
	if err != nil {
		return err
	}
	return nil
}

func GetNullValue() float64 {
	return charts.GetNullValue()
}

func MakeChart(data LineInfo, path string, filename string) error {

	p, err := charts.LineRender(
		data.YAxisData,
		charts.TitleTextOptionFunc(data.Title),
		charts.HeightOptionFunc(config.ChartHeight),
		charts.WidthOptionFunc(config.ChartWidth),
		//charts.SVGTypeOption(),
		charts.XAxisDataOptionFunc(data.XAxisData),
		charts.LegendLabelsOptionFunc(data.LegendLabels, "50"),
		func(opt *charts.ChartOption) {
			opt.Legend.Padding = charts.Box{
				Top:    5,
				Bottom: 10,
			}
			opt.SymbolShow = charts.FalseFlag()
			opt.LineStrokeWidth = 1
			opt.ValueFormatter = func(f float64) string {
				return fmt.Sprintf("%.0f", f)
			}
		},
	)

	if err != nil {
		return err
	}

	buf, err := p.Bytes()
	if err != nil {
		return err
	}

	err = WriteFile(buf, path, filename)
	if err != nil {
		return err
	}

	return nil
}

上述代码生成的图表如下：

opt.ValueFormatter = func(f float64) string {
  return fmt.Sprintf("%.0f", f)
}

此处设置了显示浮点数不截取了整数，如果需要显示小数需要设置为return fmt.Sprintf("%.2f", f)

好的，我使用的方法问题，多谢了

authors: farmerluo vicanso

repo: vicanso/go-charts


text:
🛑 SC is down

In 6d49444, SC (https://shop.line.me/) was down:

HTTP code: 504
Response time: 1227 ms

Resolved: SC is back up in 0e1572e.

repo: vichaos/upptime


text:
How to add content to sections?

This looks fantastic! After playing around with it for a bit, could you please add an example how I add content to a section or trigger an event? I might be missing something, I imagined something like selected.Home.write("abc")  etc.

Hi @chrieke, separating the items into sections is a reasonable request and I just added a simple way to add a separator between option items:
selected = option_menu("Main Menu", ["Home", "---", 'Settings'],
        icons=['house', None, 'gear'], menu_icon="cast", default_index=1)

where setting an option to "---" will insert a section separator.
To "trigger an event" in Streamlit, you just select an option, which will be passed to the backend for you to act on. For example, you can decide what to do once the selected option changes:
if selected == "Home":
    # do something
else:
    # do something else

authors: chrieke victoryhb

repo: victoryhb/streamlit-option-menu


text:
List of tasks in Obsidian

Hey!
Task creation has been working great! Any possibility you could add a way to list all of the tasks in a certain List that are Open in Obsidian. I don't need to interact with them, just listing them would be really useful!
Thank you,
Robin

Due to the TickTick open API limit, I am unable to fetch all tasks in a certain list.  https://developer.ticktick.com/docs#/openapi

Due to the TickTick open API limit, I am unable to fetch all tasks in a certain list.  https://developer.ticktick.com/docs#/openapi

Huh, count me surprised. Does "Get Project with Data" not provide the tasks for a project/list? It seems that in the Example on the page it includes tasks in there.

authors: Robinaite viduy viduycheung

repo: viduycheung/ticktick-obsidian


text:
Deploy RiakCS

Euca deploy will need to deploy a RiakCS cluster along side the Euca install.

@shaon Assigning this to you since you wrote the cookbook that we used to deploy Riak in the past.

repo: viglesiasce/euca-deploy


text:
use notification level when set

All notifications were using the INFO log level instead of the level that was passed to vim.notify.
With this commit the log level is set to INFO when level is nil.

Nice catch, and thanks for the contribution !
I'll add some tests about this in the future, so that we can catch these kind of bugs.
Or do you want to handle that as we go ?

Oh right, that looks like something I can add to this PR.

I tried a few things but I can't seem to get run_tests.sh to run both files in the test directory...
Running the nvim command manually with tests/notify.lua seems to work though.

(oh wait one of them should not pass as it is)

OK the tests don't seem to work on my machine, when I change the values in tests/status.lua the tests keep passing. It might be quitting the nvim instance before running scheduled assertion.

Okay, thanks for the fix anyway.
I am going to take the PR over from here (keeping your change, obviously), to integrate the tests.

authors: odrling vigoux


text:
🛑 Booking is down

In 0f38425, Booking ($SITE_URL) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Booking is back up in a07dc0b.

repo: villekulla-nma/monitor-booking


text:
Fix the powerline separator color

Hi,
The vim-airline-theme is a great project. However, I found some color problems in onedark theme when I enable the powerline font in the vimrc.  let g:airline_powerline_fonts = 1
The default terminal will looks little strange. (I give the screenshot below and mark the problem with the red circles.)

Therefore, I do a slight modification and I think it looks nice.

thanks!

authors: chrisbra hhchung

repo: vim-airline/vim-airline-themes


text:
Error detected while processing function 63 wordcount update

environment

vim: 8.0 (2016 Sep 12, compiled Jun 16 2017 07:21:39)
vim-airline: latest (please could you add in the contributing guidelines how you find this)
OS: Fedora 25
Have you reproduced with a minimal vimrc: No, I can't. airline is conflicting with something that I've got in my .vimrc, exactly what I can't seem to figure out
What is your airline configuration: Don't know, haven't configured anything with it
if you are using terminal:
terminal: bash
$TERM variable: xterm-256
color configuration (:set t_Co?): 256

actual behavior
When trying to edit a text file (e.g. opening help), then it produces the following errors:
Error detected while processing function <SNR>63 wordcount update:
line 15:
E117: Unknown function: airline#extensions#wordcount#formatters#default#format
E15: Invalid expression: airline#extensions#wordcount#formatters#{s:formatter}#format()
line 16:
E121: Undefined variable: b:airline_wordcount
E15: Invalid expression: b:airline_wordcount

I've had similar frustrating errors on Windows (with a text file) in GVim and Ubuntu
expected behavior
No errors.
I tried getting a minimal .vimrc but it was frustratingly inconsistent pinpointing the error. Here is my full .vimrc file, perhaps there's some use amongst it.
Frankly I'm not expecting a solution to this issue, I'm just recording it for my sanity and just in case someone else comes across it as I got zero hits for this exact error message with Google.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Vundle <https://github.com/VundleVim/Vundle.vim>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

Plugin 'vim-syntastic/syntastic'
Plugin 'tpope/vim-surround'
Plugin 'tpope/vim-unimpaired'
Plugin 'tpope/vim-fugitive'
Plugin 'altercation/vim-colors-solarized'
Plugin 'mtscout6/syntastic-local-eslint.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'mxw/vim-jsx'
Plugin 'vim-scripts/cream-showinvisibles'
" @link https://github.com/amix/vimrc
Plugin 'junegunn/goyo.vim'
Plugin 'heavenshell/vim-jsdoc'
" Plugin 'ndreynolds/vim-cakephp'
" Plugin 'amix/vim-zenroom2'
" Plugin 'scrooloose/nerdtree'
" Plugin 'mattn/emmet-vim'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
" Plugin 'shawncplus/phpcomplete.vim'

" The following are examples of different formats supported.
" Keep Plugin commands between vundle#begin/end.

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required
" To ignore plugin indent changes, instead use:
"filetype plugin on
"
" Brief help
" :PluginList       - lists configured plugins
" :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
"
" see :h vundle for more details or wiki for FAQ
" Put your non-Plugin stuff after this line

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sets how many lines of history VIM has to remember
set history=500

" Enable filetype plugins
filetype plugin on
filetype indent on

" Set to auto read when a file is changed from the outside
set autoread

" With a map leader it's possible to do extra key combinations
" like <leader>w saves the current file
let mapleader = ","
let g:mapleader = ","

" Fast saving
" nmap <leader>w :w!<cr>
" ICC: Ctrl-S is back!
nmap <leader>s :w!<cr>

" :W sudo saves the file
" (useful for handling the permission-denied error)
" command W w !sudo tee % > /dev/null

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => VIM user interface
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Set 7 lines to the cursor - when moving vertically using j/k
set so=7

" Avoid garbled characters in Chinese language windows OS
let $LANG='en'
set langmenu=en
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim

" Turn on the WiLd menu
set wildmenu

" Ignore compiled files
set wildignore=*.o,*~,*.pyc
if has("win16") || has("win32")
    set wildignore+=.git\*,.hg\*,.svn\*
else
    set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
endif

"Always show current position
set ruler

" Height of the command bar
set cmdheight=2

" A buffer becomes hidden when it is abandoned
set hid

" Configure backspace so it acts as it should act
set backspace=eol,start,indent
set whichwrap+=<,>,h,l

" Ignore case when searching
set ignorecase

" When searching try to be smart about cases
set smartcase

" Highlight search results
set hlsearch

" Makes search act like search in modern browsers
set incsearch

" Don't redraw while executing macros (good performance config)
set lazyredraw

" For regular expressions turn magic on
set magic

" Show matching brackets when text indicator is over them
set showmatch
" How many tenths of a second to blink when matching brackets
set mat=2

" No annoying sound on errors
set noerrorbells
set novisualbell
set t_vb=
set tm=500

" Properly disable sound on errors on MacVim
if has("gui_macvim")
    autocmd GUIEnter * set vb t_vb=
endif

" Add a bit extra margin to the left
set foldcolumn=1

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors and Fonts
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Enable syntax highlighting
syntax enable

" Enable 256 colors palette in Gnome Terminal
if $COLORTERM == 'gnome-terminal'
    set t_Co=256
endif

set background=dark

try
	let g:solarized_hitrail=1
	colorscheme solarized
catch
endtry

" Set extra options when running in GUI mode
if has("gui_running")
    set guioptions-=T
    set guioptions-=e
    set t_Co=256
    set guitablabel=%M\ %t
endif

" Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8

" Use Unix as the standard file type
set ffs=unix,dos,mac

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Files, backups and undo
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowb
set noswapfile

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text, tab and indent related
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Use spaces instead of tabs
set expandtab

" Be smart when using tabs ;)
set smarttab

" 1 tab == 4 spaces
set shiftwidth=4
set tabstop=4

" Linebreak on 500 characters
set lbr
set tw=500

set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines

""""""""""""""""""""""""""""""
" => Visual mode related
""""""""""""""""""""""""""""""
" Visual mode pressing * or # searches for the current selection
" Super useful! From an idea by Michael Naumann
vnoremap <silent> * :<C-u>call VisualSelection('', '')<CR>/<C-R>=@/<CR><CR>
vnoremap <silent> # :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR>

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Moving around, tabs, windows and buffers
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Map <Space> to / (search) and Ctrl-<Space> to ? (backwards search)
" map <space> /
" map <c-space> ?

" Disable highlight when <leader><cr> is pressed
map <silent> <leader><cr> :noh<cr>

" Smart way to move between windows
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l

" Close the current buffer
map <leader>bd :Bclose<cr>:tabclose<cr>gT

" Close all the buffers
map <leader>ba :bufdo bd<cr>

map <leader>l :bnext<cr>
map <leader>h :bprevious<cr>

" Useful mappings for managing tabs
map <leader>tn :tabnew<cr>
map <leader>to :tabonly<cr>
map <leader>tc :tabclose<cr>
map <leader>tm :tabmove
map <leader>t<leader> :tabnext

" Let 'tl' toggle between this and the last accessed tab
let g:lasttab = 1
nmap <leader>tl :exe "tabn ".g:lasttab<CR>
au TabLeave * let g:lasttab = tabpagenr()

" Opens a new tab with the current buffer's path
" Super useful when editing files in the same directory
map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/

" Switch CWD to the directory of the open buffer
map <leader>cd :cd %:p:h<cr>:pwd<cr>

" Specify the behavior when switching between buffers
try
  set switchbuf=useopen,usetab,newtab
  set stal=2
catch
endtry

" Return to last edit position when opening files (You want this!)
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif

""""""""""""""""""""""""""""""
" => Status line
""""""""""""""""""""""""""""""
" Always show the status line
set laststatus=2

" Format the status line
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Ln:\ %l\ \ Col:\ %c\ %Y

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Trailing whitespace
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" Delete trailing white space on save, useful for Python and CoffeeScript ;)
func! DeleteTrailingWS()
  exe "normal mz"
  %s/\s\+$//ge
  exe "normal `z"
endfunc
autocmd BufWrite *.py :call DeleteTrailingWS()
autocmd BufWrite *.coffee :call DeleteTrailingWS()
autocmd BufWrite *.nsi :call DeleteTrailingWS()
autocmd BufWrite *.js :call DeleteTrailingWS()
autocmd BufWrite *.jsx :call DeleteTrailingWS()
autocmd BufWrite *.php :call DeleteTrailingWS()

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Ag searching and cope displaying
"    requires ag.vim - it's much better than vimgrep/grep
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" When you press gv you Ag after the selected text
vnoremap <silent> gv :call VisualSelection('gv', '')<CR>

" Open Ag and put the cursor in the right position
map <leader>g :Ag

" When you press <leader>r you can search and replace the selected text
vnoremap <silent> <leader>r :call VisualSelection('replace', '')<CR>

" Do :help cope if you are unsure what cope is. It's super useful!
"
" When you search with Ag, display your results in cope by doing:
"   <leader>cc
"
" To go to the next search result do:
"   <leader>n
"
" To go to the previous search results do:
"   <leader>p
"
map <leader>cc :botright cope<cr>
map <leader>co ggVGy:tabnew<cr>:set syntax=qf<cr>pgg
map <leader>n :cn<cr>
map <leader>p :cp<cr>

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Spell checking
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Pressing ,ss will toggle and untoggle spell checking
map <leader>ss :setlocal spell!<cr>

" Shortcuts using <leader>
map <leader>sn ]s
map <leader>sp [s
map <leader>sa zg
map <leader>s? z=

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Misc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Remove the Windows ^M - when the encodings gets messed up
" noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm

" Quickly open a buffer for scribble
" map <leader>q :e ~/buffer<cr>

" Quickly open a markdown buffer for scribble
" map <leader>x :e ~/buffer.md<cr>

" Toggle paste mode on and off
" map <leader>pp :setlocal paste!<cr>

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Helper functions
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! CmdLine(str)
    exe "menu Foo.Bar :" . a:str
    emenu Foo.Bar
    unmenu Foo
endfunction

function! VisualSelection(direction, extra_filter) range
    let l:saved_reg = @"
    execute "normal! vgvy"

    let l:pattern = escape(@", "\\/.*'$^~[]")
    let l:pattern = substitute(l:pattern, "\n$", "", "")

    if a:direction == 'gv'
        call CmdLine("Ag '" . l:pattern . "' " )
    elseif a:direction == 'replace'
        call CmdLine("%s" . '/'. l:pattern . '/')
    endif

    let @/ = l:pattern
    let @" = l:saved_reg
endfunction

" Returns true if paste mode is enabled
function! HasPaste()
    if &paste
        return 'PASTE MODE  '
    endif
    return ''
endfunction

" Don't close window, when deleting a buffer
command! Bclose call <SID>BufcloseCloseIt()
function! <SID>BufcloseCloseIt()
   let l:currentBufNum = bufnr("%")
   let l:alternateBufNum = bufnr("#")

   if buflisted(l:alternateBufNum)
     buffer #
   else
     bnext
   endif

   if bufnr("%") == l:currentBufNum
     new
   endif

   if buflisted(l:currentBufNum)
     execute("bdelete! ".l:currentBufNum)
   endif
endfunction

" Make VIM remember position in file after reopen
" if has("autocmd")
"   au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
"endif

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Syntastic + eslint
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
try
   set statusline+=%#warningmsg#
   set statusline+=%{SyntasticStatuslineFlag()}
   set statusline+=%*

   let g:syntastic_always_populate_loc_list = 1
   let g:syntastic_auto_loc_list = 1
   let g:syntastic_check_on_open = 0
   let g:syntastic_check_on_wq = 1
   " eslint
   " @todo add link to where I got these from
   let g:syntastic_javascript_checkers = ['eslint']
   let g:syntastic_javascript_eslint_exe = 'npm run lint --'

   " Sillyness with unicode
   " @link https://codeyarns.com/2014/11/06/how-to-use-syntastic-plugin-for-vim/
   let g:syntastic_error_symbol = "✗"
catch
endtry

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" =>  ICC hacks
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" Save the session on quit and reload in on start
" @link http://stackoverflow.com/questions/5142099/how-to-auto-save-vim-session-on-quit-and-auto-reload-on-start-including-split-wi#6052704
fu! SaveSess()
    if empty(argv())
        execute 'mksession! ' . getcwd() . '/.session.vim'
    endif
endfunction

fu! RestoreSess()
if empty(argv()) && filereadable(getcwd() . '/.session.vim')
    execute 'so ' . getcwd() . '/.session.vim'
    if bufexists(1)
        for l in range(1, bufnr('$'))
            if bufwinnr(l) == -1
                exec 'sbuffer ' . l
            endif
        endfor
    endif
endif
syntax on
endfunction

autocmd VimLeave * call SaveSess()
autocmd VimEnter * call RestoreSess()

" Commenting blocks of code.
" @link http://stackoverflow.com/a/24046914/327074
let s:comment_map = {
    \   "c": '\/\/',
    \   "cpp": '\/\/',
    \   "go": '\/\/',
    \   "java": '\/\/',
    \   "javascript": '\/\/',
    \   "javascript.jsx": '\/\/',
    \   "lua": '--',
    \   "scala": '\/\/',
    \   "php": '\/\/',
    \   "python": '#',
    \   "ruby": '#',
    \   "rust": '\/\/',
    \   "sh": '#',
    \   "desktop": '#',
    \   "fstab": '#',
    \   "conf": '#',
    \   "profile": '#',
    \   "bashrc": '#',
    \   "bash_profile": '#',
    \   "mail": '>',
    \   "eml": '>',
    \   "bat": 'REM',
    \   "cmd": 'REM',
    \   "nsis": ';',
    \   "ahk": ';',
    \   "vim": '"',
    \   "tex": '%',
    \   "sql": '--',
    \   "yaml": '#'
    \ }

function! ToggleComment()
    if has_key(s:comment_map, &filetype)
        let comment_leader = s:comment_map[&filetype]
        if getline('.') =~ "^\\s*" . comment_leader . " "
            " Uncomment the line
            execute "silent s/^\\(\\s*\\)" . comment_leader . " /\\1/"
        else
            if getline('.') =~ "^\\s*" . comment_leader
                " Uncomment the line
                execute "silent s/^\\(\\s*\\)" . comment_leader . "/\\1/"
            else
                " Comment the line
                execute "silent s/^\\(\\s*\\)/\\1" . comment_leader . " /"
            end
        end
    else
        echo "No comment leader found for filetype"
    end
endfunction

nnoremap <leader><Space> :call ToggleComment()<cr>
vnoremap <leader><Space> :call ToggleComment()<cr>

"""""""""""""""""""""""""""""""""""""""""""""""""
" => ICC Leaders
"""""""""""""""""""""""""""""""""""""""""""""""""

" MRU Buffer
map <leader><Tab> :b#<cr>
" Ctrl-S baby
map <leader>s :w<cr>
" this one has the high likelihood of losing code
" where's the land of confirmations when you need it?
" map <leader>w :Bclose<cr>
" surround with quotes
map <leader>' ysiw'
map <leader>" ysiw"
" buffers
map <leader>ll :ls<cr>
" toggle distraction free
map <leader>g :Goyo<cr>
" Javascript doc block
map <leader>// :JsDoc<cr>
" tabs to 4-spaces
map <leader>ts :%s/\t/    /g<cr>

autocmd FileType javascript.jsx setlocal foldmethod=indent
autocmd FileType javascript setlocal foldmethod=indent

On Mo, 03 Jul 2017, Ian Channing wrote:

environment

vim: 8.0 (2016 Sep 12, compiled Jun 16 2017 07:21:39)
vim-airline: latest (please could you add in the contributing guidelines how you find this)
OS: Fedora 25
Have you reproduced with a minimal vimrc: No, I can't. airline is conflicting with something that I've got in my .vimrc, exactly what I can't seem to figure out
What is your airline configuration: Don't know, haven't configured anything with it
if you are using terminal:
terminal: bash
$TERM variable: xterm-256
color configuration (:set t_Co?): 256

actual behavior
When trying to edit a text file (e.g. opening help), then it produces the following errors:
Error detected while processing function <SNR>63 wordcount update:
line 15:
E117: Unknown function: airline#extensions#wordcount#formatters#default#format
E15: Invalid expression: airline#extensions#wordcount#formatters#{s:formatter}#format()
line 16:
E121: Undefined variable: b:airline_wordcount
E15: Invalid expression: b:airline_wordcount

That is unexpected. Do you have the file
autoload/airline/extensions/wordcount/formatters/default.vim in your
airline working copy? If yes, does it contain a function
airline#extensions#wordcount#formatters#default#format()
What does git status in your working copy of the vim-airline directory
tell you? What about git log -v -1
Best,
Christian
Wer dem Chef in den Hintern kriecht, muß damit rechnen, daß er ihm
eines Tages zum Hals heraushängt.

Any update here? Can you reproduce with a minimal vimrc?

Hi Christian,
Thanks for the quick response. Yes I have got the file, it's in ~/.vim/bundle/vim-airline/autoload/airline/extensions/wordcount/formatters/default.vim.
I can confirm that the file contains, the function:
function! airline#extensions#wordcount#formatters#default#format()

Git status:
[ian@localhost vim-airline]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean

If I delete from the section after I specify the statusline, which is from the following lines and below then the problem goes away. But if I then add back in the lines again the problem doesn't return.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Trailing whitespace
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Here's the gitlog outpu:
[ian@localhost vim-airline]$ git log -v -1
commit b78c2ec475022cd9de7b7c7c080482cdc5e1b8fb
Author: Christian Brabandt <cb@256bit.org>
Date:   Sun Jul 2 20:42:32 2017 +0200

    Always enable airline by setting laststatus=2

    Previously the user was expected to set 'laststatus' himself to 2 if he
    wanted to have airline be shown by default.

    However it doesn't make much sense to have airline installed but not
    display the statusline. Therefore, set the 'laststatus' to 2, if it
    isn't set to it already.

Cheers,
Ian

I am sorry, I don't understand that part:

If I delete from the section after I specify the statusline, which is from the following lines and below then the problem goes away. But if I then add back in the lines again the problem doesn't return.

Also can you reproduce with a minimal vimrc? Could it be that permissions are wrong?

I'm trying to reproduce with a minimal .vimrc, but it's proving tricky.
If you look in my full vimrc I have the following sections in the middle:
""""""""""""""""""""""""""""""
" => Status line
""""""""""""""""""""""""""""""
" Always show the status line
set laststatus=2

" Format the status line
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Ln:\ %l\ \ Col:\ %c\ %Y

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Trailing whitespace
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" Delete trailing white space on save, useful for Python and CoffeeScript ;)

If I delete the trailing white space section and everything that comes after it then the problem goes away - I can edit text files without the error.
However if I then go back and add all the vimrc code back in then the problem doesn't reappear. At least not directly.
I'm sorry I can't be more specific. I'll try and recreate it consistently.
My guess is that it has something to do with sessions, but I'm not sure.

I now highly suspect that this is due to the way that I was saving sessions automatically. See below fo the  section of code in my .vimrc.
This was loading a saved session automatically. I'm guessing that this is causing problems with my plugins in someway. I've had similar unexplainable errors with the UltiSnips plugin too.
" Save the session on quit and reload in on start
" @link http://stackoverflow.com/questions/5142099/how-to-auto-save-vim-session-on-quit-and-auto-reload-on-start-including-split-wi#6052704
fu! SaveSess()
    if empty(argv())
        execute 'mksession! ' . getcwd() . '/.session.vim'
    endif
endfunction

fu! RestoreSess()
if empty(argv()) && filereadable(getcwd() . '/.session.vim')
    execute 'so ' . getcwd() . '/.session.vim'
    if bufexists(1)
        for l in range(1, bufnr('$'))
            if bufwinnr(l) == -1
                exec 'sbuffer ' . l
            endif
        endfor
    endif
endif
syntax on
endfunction

autocmd VimLeave * call SaveSess()
autocmd VimEnter * call RestoreSess()

okay, closing then.

As a final note I switched to using obsession.vim, to save my sessions. This doesn't save the full session, which it claims helps prevent conflicts with plugins. I can now save my session, reload it and UltiSnips is working as well as Airline, both in GVim and regular Vim.

authors: chrisbra ianchanning

repo: vim-airline/vim-airline


text:
nvimlsp extension stopped working due to check using deprecated LspInstallInfo command

environment

vim: nvim nightly commit 459a6c845e87662aa9aa0d6a0a68dc8d817a0498
vim-airline: c7a633ce8f4547e680377efe8ea70493fcce1349
OS: Ubuntu 20.04
Have you reproduced with a minimal vimrc: No
What is your airline configuration:

"### Airline ###            {{{2
let g:airline_powerline_fonts = 1
let g:airline#extensions#whitespace#enabled = 0

" Display buffers in tabline
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#buffer_nr_show = 1
let g:airline#extensions#tabline#formatter = 'unique_tail_improved'

" Custom icon for vim-obsession
let g:airline#extensions#obsession#indicator_text = ''
" Remove icon for total number of lines in buffer
if !exists('g:airline_symbols')
    let g:airline_symbols = {}
endif
let g:airline_symbols.maxlinenr = ''

" Don't auto-invoke Tmuxline
let g:airline#extensions#tmuxline#enabled = 0

" LSP support
let g:airline#extensions#nvimlsp#enabled = 1
let g:airline#extensions#nvimlsp#error_symbol = 'E'
let g:airline#extensions#nvimlsp#warning_symbol = 'W'

if you are using Neovim:

does it happen in Vim: N/A

actual behavior
When LSP diagnostic messages occur in the current buffer, no warning or error
count is displayed by airline. I have verified that the relevant sections are
still enabled by turning whitespace checking on, this works as expected.
expected behavior
Error and warning counts should be displayed.

I believe this is being caused by the line
if !exists(':LspInstallInfo')

in nvimlsp.vim. This command was removed from Neovim's LSP support as the
automatic installation feature has been removed.
If the intent is to test whether the built in LSP is active, I believe the
relevant function to use is vim.lsp.buf_get_clients() from the Lua API. A
value > 0 indicates that at least one LSP is connected to the current buffer.

The intent was to check, whether the vim lsp plugin was installed. That means we need to check whether this is actually executed in Neovim plus  vim.lsp.buf_get_clients(). What is with older Neovims? is vim.lsp.buf_get_clients() supported in all Neovims out there?
Sounds more complicated than a simple variable or command to check for existence.

From the git history it appears that vim.lsp.buf_get_clients() has existed ever since the first LSP implementation was added to neovim, so it seems safe to use in that regard.
I agree that this is more complicated, but IMHO is also "more correct" than testing for the existence of the nvim-lspconfig plugin, as technically speaking it's possible to use neovim's LSP client without the use of the plugin. I don't know whether anyone actually does this, so this may be a moot point.
If you would prefer the old approach, you could instead test on the command :LspInfo. It was added on Jan 9th, and :LspInstallInfo was removed on Jan 23rd, so there is some overlap.
With all that said, I commented out the lines checking for :LspInstallInfo and airline still didn't display an error count, so there seems to be something more going on. Running the individual commands in the airline#extensions#nvimlsp#get function works just fine so now I'm not sure what the problem with my setup actually is.

you probably need to adjust extensions.vim because this also checks for the :LspInstallInfo command. I think I have done that now, please check.

authors: chrisbra dutchgecko


text:
vterm.c  line 133.44: 1506-294 (S) Syntax error in expression on #if directive

Hello,
Tried to compile vim 8.0.1130 for Aix 7.1 with  XL C/C++ for AIX, V11.1 compiler, using this config :
./configure --with-features=huge --enable-gui=no --enable-terminal
but have the error:
cc -qlanglvl=extc89 -c -I. -Ilibvterm/include -Iproto -DHAVE_CONFIG_H     -g        -DINLINE=""  -DVSNPRINTF=vim_vsnprintf  -DIS_COMBINING_FUNCTION=utf_iscomposing_uint  -DWCWIDTH_FUNCTION=utf_uint2cells -o objects/term_vterm.o libvterm/src/vterm.c
"libvterm/src/vterm.c", line 133.44: 1506-294 (S) Syntax error in expression on #if directive.
make: The error code from the last command is 1.
Changed the line 133 in vterm.c file from :
#if _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE || _BSD_SOURCE
to :
#if _XOPEN_SOURCE >= 500 || defined(_ISOC99_SOURCE) || defined(_BSD_SOURCE)
and now the compiling is ok.
Is this modification correct ? Could you change the vim code source to work with Aix compiler ? Thanks in advance.

IIUC, for at least some compilers, the first form is equivalent to
#if _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE != 0 || _BSD_SOURCE != 0

which, assuming short-circuit evaluation, would be a syntax error if (_XOPEN_SOURCE < 500 && !defined(_ISOC99_SOURCE)) or (_XOPEN_SOURCE < 500 && _ISOC99_SOURCE != 0 && !defined(_BSD_SOURCE))
The second form only tests the latter two macros for being defined rather than nonzero, it cannot give a syntax error unless _XOPEN_SOURCE is undefined. I think it is correct insofar as _ISOC99_SOURCE and _BSD_SOURCE would each be either undefined or defined as 1.

Zuloloxi wrote:

Tried to compile vim 8.0.1130 for Aix 7.1 with  XL C/C++ for AIX, V11.1 compiler, using this config :
./configure --with-features=huge --enable-gui=no --enable-terminal
but have the error:
cc -qlanglvl=extc89 -c -I. -Ilibvterm/include -Iproto -DHAVE_CONFIG_H     -g        -DINLINE=""  -DVSNPRINTF=vim_vsnprintf  -DIS_COMBINING_FUNCTION=utf_iscomposing_uint  -DWCWIDTH_FUNCTION=utf_uint2cells -o objects/term_vterm.o libvterm/src/vterm.c
"libvterm/src/vterm.c", line 133.44: 1506-294 (S) Syntax error in expression on #if directive.
make: The error code from the last command is 1.
Changed the line 133 in vterm.c file from :
#if _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE || _BSD_SOURCE
to :
#if _XOPEN_SOURCE >= 500 || defined(_ISOC99_SOURCE) || defined(_BSD_SOURCE)
and now the compile is ok.
Is this modification correct ? Could you change the vim code source to
work with Aix compiler ? Thanks in advance.

Looks OK to me.  We should probably also check if _XOPEN_SOURCE is
defined before using the value.
--
Living in Hollywood is like living in a bowl of granola.  What ain't
fruits and nuts is flakes.
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \
\\  an exciting new programming language -- http://www.Zimbu.org        ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

authors: brammool tonymec zuloloxi

repo: vim/vim

license: Vim