This file contains hidden or 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
| Observable.from([1,2,3,4,5,6,7]) | |
| .map(x => x * 10) | |
| .filter(x => x < 30) | |
| .subscribe(x => console.log(x), null, () => console.log('finished!')); | |
| // ---- result ---- | |
| // 10 | |
| // 20 | |
| // finished! |
This file contains hidden or 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
| import React from 'react'; | |
| import { inject, observer } from 'mobx-react'; | |
| import { action, computed, observable } from 'mobx'; | |
| import userService from '../../Shared/API/User'; | |
| import logo from '../../assets/sesung-logo.png'; | |
| import './Login.css' | |
| @inject('global') | |
| @observer | |
| class Login extends React.Component { |
This file contains hidden or 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
| // login.html | |
| <form onSubmit={this.login.bind(this)}> | |
| <div className="form-group"> | |
| <label htmlFor="id" className="input-label">아이디</label> | |
| <input type="text" id="id" className="form-control" value={this.id} onChange={this.onChange.bind(this)} /> | |
| </div> | |
| <div className="form-group"> | |
| <label htmlFor="id" className="input-label">비밀번호</label> | |
| <input type="password" id="password" className="form-control" value={this.password} onChange={this.onChange.bind(this)} /> | |
| </div> |
This file contains hidden or 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
| this.http.get('http://url.com/sub-url').map(res => res.json()).subscribe(data => ...) |
This file contains hidden or 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
| this.http.get<User>('http://url.com/sub-url/').subscribe(data => ...) |
This file contains hidden or 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
| getUserList():Observable<User> { | |
| return http.get<User>('http://url.com/users/').retry(3); | |
| } |
This file contains hidden or 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
| this.http.get<User>(this.url) | |
| .subscribe( | |
| (data: User) => { // handle data for view }, | |
| (error: HttpErrorResponce) => { // When HTTP request has something wrong, you can do handle error }, | |
| () => { // When HTTP request complete, you can do something } | |
| ); |
This file contains hidden or 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
| npm install -g @angular/cli |
This file contains hidden or 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
| int i; | |
| int start_prime, end_prime; | |
| int * result_set; | |
| printf("어디부터 소수를 찾을까요? : "); | |
| scanf("%d", &start_prime); | |
| printf("어디까지 소수를 찾을까요? : "); | |
| scanf("%d", &end_prime); |
This file contains hidden or 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
| -- this is an example | |
| group: nameOfTheNewGroup | |
| Offices = { | |
| city:string, target:number, office:number | |
| '구미', 300, 1 | |
| } |
OlderNewer