React with Typescript 세미나 강의를 듣고 정리하며 공유한다. React 에는 부모 컴포넌트로부터 데이터를 받을 수 있는 props와 component안에서 사용할 수 있는 state가 있다. props와 state의 정의 및 특징(출처: React with Typescript 세미나 강의) 다음은 props와 state 예제이다. // App tsx // React typescript이기 때문에 Props인터페이스와 State를 만들어 줘야한다. export interface Props { name: string; company?: string; } interface State { age: number; } class App extends React.Component { static d..
Angular 4.3부터 추가된 HttpClientModule에는 http 요청에 인터셉터를 적용할 수 있다. 인터셉터를 간단히 설명하면 api나 특정 data를 요청 할 때 그 요청을 가로채는 역할을 한다. 인터셉터를 사용하기 위해서는 HttpInterceptor를 구현해야 한다. interface HttpInterceptor { // intercept의 첫번째 인자는 처리할 요청을 받고, 두번째는 다음 인터셉터를 가리키는 HTTP 핸들러다. intercept(req: HttpRequest, next: HttpHandler): Observable } ex) 서버에서 보내준 헤더 받기 export class HeaderInterceptor implements HttpInterceptor { interce..
파이썬 또한 객체 지향 언어이며모든 데이터들은 객체로 표현되거나 객체 사이의 관계로 표현된다. #class 선언 class Singer: def sing(self): return "Lalala~" #객체 인스턴스 생성 및 사용 taeji = Singer() taeji.sing() 'Lalala~' 상속>>> class Person: def __init__(self, name, age): self.Name = name self.Age = age def about(self): print("이름: " + self.Name + "나이: " + self.Age) >>> class Employee(Person): def __init__(self, name, age, salary, hiredate): Person._..
Angular를 사용하다가 Data Chart를 표현해야할 때가 있었다. Google에서 Angular Data Chrart를 찾다가 좋은것을 찾아 공유한다. 모듈명은 NGX-CHARTS이다. 예제 여러가지 차트 및 스킨 옵션등을 제공한다. 기본적인 사용법은 NPM에서 모듈 추가 후에 임포트 해서 사용하는 것이다. npm install @swimlane/ngx-charts --save추가 후에 moudle.ts에 추가를 해준다. import { NgxChartsModule } from '@swimlane/ngx-charts'; @NgModule({ imports: [ RouterModule.forChild(routes), FormsModule, CommonModule, NgxChartsModule ], ..
파이썬은모듈을불러올때.pyc라는확장자를가지는바이트컴파일된파일을가져와모듈을불러온다 추가import 모듈 from 모듈import 변수나함수 ex) import math 모듈 예제 이동 project -- test +-- sub1 -- __init__.py -- aa.py -- bb.py +-- sub2 -- __init__.py -- cc.py -- dd.py -- ee.py -- ff.py -- __init__.py -- gg.py ee.py에서 다른 모듈 참조(하위 폴더 내 파일, 동일 폴더 내 파일 참조)# aa.py를 참조할 경우 from sub1 import aa # ff.py를 참조할 경우 import ff # 또는 from . import ff # from . 은 동일폴더라는 의미를 나타냄. ..
- Total
- Today
- Yesterday
- Redux
- Router
- CSS
- 페이스북 로그인
- MySQL
- data gird component
- Java
- Spring Boot
- Angular
- localStorage
- angular router
- data component module
- 파이썬
- data table component
- react
- 파이썬3
- facebook login
- JavaScript
- python3
- jQuery
- https://www.tistory.com/auth/logout/
- Python
- data grid component
- JSON
- mobx
- React-router
- Spring
- data component
- JPA
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |