很抱歉,如果这是一个nobb问题,但我正在构建一个Angular应用程序,而我当前的tsconfig.json文件在'compilerOptions'中将'es6'作为'target':
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false,
"types" : []
},
"exclude": [
"node_modules"
]
}
Run Code Online (Sandbox Code Playgroud)
是否有可能有多个目标?例如,我可以添加es5吗?我只是因为我正在阅读为es5编写的教程,但是由于我的项目的当前状态,我需要使用es6 - 即,我无法降级.我的所有代码都必须符合es6 - 如果两者都包括在内,我会想象我的代码可以符合es5和es6.
我在 liquibase 变更集中编写了一个 sql 标签。该sql代码假设在名为“Purchase”的表中进行数据迁移。所以我有以下sql查询:
UPDATE purchase
SET location_id = (SELECT location_id FROM shop WHERE shop.id = purchase.shop_id);
Run Code Online (Sandbox Code Playgroud)
然后,
ALTER TABLE purchase DROP COLUMN shop_id;
Run Code Online (Sandbox Code Playgroud)
但在尝试执行第二个查询时出现以下错误,该查询应该删除表中的“shop_id”列
ERROR: cannot ALTER TABLE because it has pending trigger events
Run Code Online (Sandbox Code Playgroud)
请问这个错误是何时抛出的,我该如何解决它。
在我的liquibasechangese中,我的sql标签写如下
<sql>
UPDATE purchase
SET location_id = (SELECT location_id FROM shop WHERE shop.id = purchase.shop_id);
ALTER TABLE purchase DROP COLUMN shop_id;
</sql
Run Code Online (Sandbox Code Playgroud)
请问有人可以帮助我吗?在此先感谢您的帮助
我是java的新手
这是我的第一个真实项目(纸牌游戏:二十一点)
我做了一个测试课,并被告知要使用打印行试图找出我的问题,但是我无法理解为什么null异常不断出现.我没有任何设置为null,并且我的数组已使用"new"初始化.我也可以发布IO类,但我相当肯定问题不在其中.
public static void main(String[] args) {
// Initializing just a single player
Player x = new Player();
// Quick test to make sure it reads the initial value of 0
System.out.println(x.getMoney());
// Testing user input using an IO class given
System.out.println("How much would you guys like to play with?(Bet money)");
double y = IO.readDouble();
x.addMoney(y);
System.out.println(x.getMoney());
// Successfully prints out the value y
Player[] total = new Player[4];
total[1].addMoney(y);
System.out.println(total[1].getMoney());
// returns the null pointer exception error …Run Code Online (Sandbox Code Playgroud) 我最近将我的项目从 angular 7 升级到了 angular 9。
当我运行测试 ( ng test) 时,我总是会http://localhost:9876/_karma_webpack_/附加到错误,因此在 Visual Studio 代码中,我们无法单击错误直接访问文件。
为了测试,我expect(2).toEqual(1);在app.component.spec.ts文件中添加了
例如,使用开箱即用的 angular 7 projet,我在 ng test 中收到此错误:
Chrome 81.0.4044 (Windows 10.0.0) AppComponent should have as title 'angular7app' FAILED
Expected 2 to equal 1.
at UserContext.<anonymous> (src/app/app.component.spec.ts:23:12)
Run Code Online (Sandbox Code Playgroud)
至于角度 9,我收到此错误:
Chrome 81.0.4044.122 (Windows 10) AppComponent should have as title 'untaire' FAILED
Error: Expected 2 to be 1.
at <Jasmine>
at UserContext.<anonymous> (http://localhost:9877/_karma_webpack_/src/app/app.component.spec.ts:23:12)
Run Code Online (Sandbox Code Playgroud)
当我检查 package.json 中的版本时,这些是影响 Karma 和 jasmine 的更改:
"@types/jasmine": …Run Code Online (Sandbox Code Playgroud) angular ×2
jasmine2.0 ×1
java ×1
javascript ×1
liquibase ×1
postgresql ×1
sql ×1
typescript ×1