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
$ sqlplus -s | |
SQL> connect hr@oracle.com/hr | |
SQL> UPDATE employees SET current = false WHERE email = "Igor.Minar@oracle.com"; | |
SQL> COMMIT; | |
SQL> disconnect | |
SQL> exit | |
$ curl -X POST -H "Content-Type: application/json" \ | |
-d '{ "firstName":"Igor", "lastName":"Minar"}' \ | |
http://google.com/employee/ |
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
Array.prototype.push = function(x) { | |
return [].concat(this, x); | |
}; | |
Array.prototype.pop = function() { | |
return this.slice(0, this.length-1); | |
}; | |
Array.prototype.unshift = function(x) { | |
return [].concat(x, this); |
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
{ | |
"files.exclude": { | |
"**/*.js": { | |
"when": "$(basename).ts" | |
}, | |
"**/*.js.map": true | |
} | |
} |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es5", | |
"module": "commonjs", | |
"moduleResolution": "node", | |
"sourceMap": true, | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"removeComments": false, | |
"noImplicitAny": false |
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
{ | |
"name": "angular2-famous-painters", | |
"author": "noob", | |
"version": "1.0.0", | |
"scripts": { | |
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ", | |
"lite": "lite-server", | |
"postinstall": "typings install", | |
"tsc": "tsc", | |
"tsc:w": "tsc -w", |
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
import { Injectable } from '@angular/core'; | |
import { Painter } from './painter'; | |
import { PAINTERS } from './painters.mock'; | |
@Injectable() | |
export class PainterService { | |
getPainters(): Promise<Painter[]> { | |
return Promise.resolve(PAINTERS); |
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
import { Component } from '@angular/core'; | |
import { Painter } from './painter'; | |
@Component({ | |
inputs: ['painter'], | |
selector: 'my-painter-detail', | |
template: ` | |
<div *ngIf="painter"> | |
<h2>{{painter.name}}</h2> |
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
import { Painter } from './painter'; | |
export var PAINTERS: Painter[] = [ | |
{ | |
id: 1, | |
name: 'Michelangelo', | |
style: 'Renaissance', | |
examples: ['David', 'Sistine Chapel', 'The Last Judgement'] | |
}, | |
{ |
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
import { bootstrap } from '@angular/platform-browser-dynamic'; | |
import { AppComponent } from './app.component'; | |
bootstrap(AppComponent); |
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
import { Component, OnInit } from '@angular/core'; | |
import { Painter } from './painter'; | |
import { PainterDetailComponent } from './painter-detail.component'; | |
import { PainterService } from './painter.service'; | |
@Component({ | |
directives: [PainterDetailComponent], | |
providers: [PainterService], | |
selector: 'my-app', |