我正在尝试使用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) 输出是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)