小编Roc*_*tim的帖子

RsJX'Map'运算符在Angular 6中不起作用

我正在尝试使用map来自RxJS的运算符,但它会抛出一个错误说

"Observable"类型中不存在属性"map".

这是代码:

    import { Injectable } from "@angular/core";
    import { Http } from "@angular/http";
    import "rxjs/add/operator/map";
    @Injectable()

    export class DataService {
     constructor(public http: Http) {}

     getData() {
       return this.http
        .get("https://jsonplaceholder.typicode.com/users")
        .map(res => res.json());
      }
    }
Run Code Online (Sandbox Code Playgroud)

typescript angular angular6 rxjs6

1
推荐指数
2
解决办法
3228
查看次数

请解释输出为9的结果如何?

输出是9,我无法理解整个按位XOR概念.

public class XOR {

    public static void main( String[] args ) {
        int a = 12;
        int b = 5;
        int c = a ^ b;
        System.out.print( c );
    }

}
Run Code Online (Sandbox Code Playgroud)

java printing byte xor

-3
推荐指数
1
解决办法
126
查看次数

标签 统计

angular ×1

angular6 ×1

byte ×1

java ×1

printing ×1

rxjs6 ×1

typescript ×1

xor ×1