본문 바로가기
728x90

전체 글97

스트림(Stream) https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html Stream (Java Platform SE 8 ) A sequence of elements supporting sequential and parallel aggregate operations. The following example illustrates an aggregate operation using Stream and IntStream: int sum = widgets.stream() .filter(w -> w.getColor() == RED) .mapToInt(w -> w.getWeight()) docs.oracle.com 1. 자바 8부터 컬렉션의 요소를 람다식으로 처.. 2021. 12. 10.
PostgreSQL 쿼리 -- 테이블 명세 조회SELECT c.relname AS table_name, pg_catalog.obj_description(c.oid, 'pg_class') AS table_comment, a.attname AS column_name, col_description(a.attrelid, a.attnum) AS column_comment, CASE WHEN pg_catalog.format_type(a.atttypid, a.atttypmod) LIKE 'timestamp%' THEN 'timestamp'-- WHEN pg_catalog.format_type(a.atttypid, a.atttypmod) LIKE 'character varying%' THEN '' .. 2021. 12. 10.
Vue.js 환경설정 1. node.js 설치 node.js 설치하면 npm 사용가능 설치 후 잘 설치되었는지 버전 확인 명령으로 확인 node -v https://nodejs.org/en/ Node.js Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. nodejs.org 2. VS Code(Visual Studio Code) 에디터 설치 https://code.visualstudio.com/ Visual Studio Code - Code Editing. Redefined Visual Studio Code is a code editor redefined and optimized for building and debugging modern web.. 2021. 12. 9.
람다식(Lambda Expressions) 자바는 객체 지향 프로그래밍 언어이지만 함수적 프로그래밍을 위해 자바8부터 람다식을 지원. 람다식의 형태는 매개변수를 가진 코드 블록이지만 런타임 시에는 익명 구현 객체를 생성함. 1. 람다식은 "(매개변수) -> {실행코드}" 형태로 작성됨. Runable runable = new Runable() { public void run() { ... } }; // 람다식 Runable runable = () -> { ... }; 2. 람다식 기본 문법 (매개변수, ...) -> { 실행코드; }; (int a) -> { System.out.println(a); } 매개변수의 타입은 런타임시 대입되는 값에 따라 알 수 있기 때문에 매개변수의 타입을 명시하지 않아도 됨. (a) -> { System.out.pr.. 2021. 11. 9.
728x90