java에서 string, stringbuffer, stringbuilder 차이점을 알아보겠습니다. 1) String먼저 String과 다른 클래스(StringBuffer, StringBuilder)의 차이점은 두 문자열 클래스의 아주 기본적인 차이는 String은 immutable(불변), StringBuffer는 mutable(변함)에 있습니다. String은 문자열을 대표하는 것으로 문자열을 조작하는 경우 유용하게 사용할 수 있습니다. 문자열, 숫자, char 등은 concat할때는 StringBuffer, StringBuilder를 사용할 수 있습니다. 단, 복잡한 경우 의미가 있고, 단순한 경우에는 굳이 StringBuffer, StringBuilder를 쓰지 않고 +연산자를 활용해 직접 합지..
Angular를 사용하면서 ng-template와 ng-container를 쓰는일이 있습니다.그러다 문뜩 구체적으로 어떤 의미와 목적이 있는지 궁금해 공식 홈페이지에서 찾아봤습니다. ng-template는 HTML 랜더링을 하기위한 Angular 엘리먼트라고 합니다. 그리고 직접적으로 표현되지 않는다 하며, view에 랜더링 되기전에 와 내용에 대해서 주석처리 한다고 하는데 어떤 의미인지 살펴봐야겠습니다. 공식 홈페이지에 있는 예제는 다음과 같이 설명합니다. ng-template에 감싸진 부분이 structural directive 가 없으면 그 부분은 해당 엘리먼트가 사라집니다. structural directive 는 ngFor, ngIF, ngSwitch 등이 있습니다. Hip! Hip! Hoora..
함수형의 stateless component클래스 형태의 statefull componentRedux 가 연결된 container component 가 있다 1. stateless component React는 Props의 데이터형을 설정하기 위해 컴포넌트 클래스는 static 타입의 PropTypes 변수 안에 타입을 선언하는 방식을 사용한다. 하지만 이제는 TypeScript를 사용하므로 interface나 type을 사용해서 Props의 형태를 선언하면 된다.import * as React from 'react' type Props = {} // Props 타입 선언 // 컴포너트의 리턴 타입을 Props 타입과 함께 설정 const TSSFC: React.SFC = props => { const ..
React도 Angular와 마찬가지로 Lifecycle이 있다. class로 만들 때 사용가능 하며, velopert 블로그를 보고 정리한다. 컴포넌트가 브라우저에 나타나기전constructor 컴포넌트가 새로 만들어질 때 componentWillMount - 컴포넌트가 화면에 나타나기 직전 - 더 이상 필요하지 않아 16.3 부터 deprecated - UNSAFE_componentWillMount() componentDidMount - 컴포넌트가 화면에 나타났을 때 - 외부라이브러리 연동, 데이터 요청, 속성 변경등등 작업 컴포넌트 업데이트 (props, state의 변화에 따라) componentWillReceiveProps - 컴포넌트가 새로운 props를 받을 때 - state가 props에 ..
예외처리(try ~ except) def f(a, b): try: ifa andb: return(a * b) + (a / b) elifa: return '불능' else: return '부정' exceptErrorName: return '똑 바로 살아라' 예외발생시키기 raise문에오류/예외의이름을넘길수있다. class ShortInputException(Exception): length = 0 atleast = 0 '''A user-defined exception class.''' def __init__(self, length, atleast): Exception.__init__(self) self.length = length self.atleast = atleast def exam(): try: te..
- Total
- Today
- Yesterday
- CSS
- data grid component
- JPA
- Spring
- 파이썬3
- MySQL
- 파이썬
- Redux
- Router
- Python
- mobx
- Java
- Angular
- localStorage
- angular router
- JavaScript
- jQuery
- 페이스북 로그인
- facebook login
- https://www.tistory.com/auth/logout/
- JSON
- data component
- data gird component
- Spring Boot
- react
- data component module
- python3
- data table component
- React-router
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |