FAIL src/vectorstores/tests/closevector_web.test.ts
● Test suite failed to run
Jest encountered an unexpected token
Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax.
Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface GWxApiOpts<T, K> { | |
success?: (callbackPayload: T) => any, | |
fail?: (callbackPayload: K) => any | |
} | |
type WxApiOpts<T, K, V> = { | |
[X in keyof V]: V[X] | |
} & GWxApiOpts<T, K> | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface WxApiOpts<T, K>{ | |
[k: string]: any, | |
success?: (callbackPayload: T) => any, | |
fail?: (callbackPayload: K) => any | |
} | |
/** | |
* 本方法将类似于 wx.request 等函数转化为 Promise 调用方式 | |
* @param callbackStyleFunction 被转换的函数,该类型函数只接受一个 Object 类型参数,且必须具备 success 和 fail 回调。 | |
* @param opts 防止 success 回调叫 success 的情况,传此参数进行重载。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* not offical link state mixin, created by jolamjiang, 20160201184405 | |
* Usage: | |
* <input type="text" className="form-control" id="rule-name" valueLink={this.linkState('rule.rule_name')} /> | |
*/ | |
'use strict'; | |
var ReactLink = require('react/lib/ReactLink'); | |
function getKeyValueRecursively(obj, key) { | |
if (!obj || !key) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var autoToc = (function() { | |
function getHeadingArray(container, headingStartLevel) { | |
var array = []; | |
var currentNode = document.querySelector(container + ' h' + headingStartLevel); | |
var counter = 0; | |
while (currentNode) { | |
if (currentNode.tagName.match(/^H[1-9]$/)) { | |
var id = "SECTION-" + ++counter; | |
currentNode.setAttribute('id', id); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Block Douyu Author | |
// @namespace http://jiangdl.com/ | |
// @version 0.1 | |
// @description Block Douyu Author | |
// @author You | |
// @match http://www.douyutv.com/directory/game/* | |
// @grant none | |
// ==/UserScript== |
cpp 版显示 wrong answer,没有输出, python 版显示 runtime error,没有提示,但是本地测试过测试用例都没有问题,算法应该是正确的。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstring> | |
#include <algorithm> | |
#define MAX 300007 | |
using namespace std; | |
struct Edge { | |
int u; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <cstring> | |
#include <iostream> | |
const int maxN = 2048; | |
int dpLR[maxN]; | |
int dpRL[maxN]; | |
bool dpPalin[maxN][maxN]; | |
char s[maxN]; | |
long long ans = 0; |
NewerOlder