일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- hashchange
- Sentry
- IONIC3
- 변화감지
- sealize
- ion-range
- typescript
- error
- border-width
- Git
- 테두리굵기
- zsh
- NVM
- Ionic
- aab 배포
- php
- 자바스크립개념
- rxjs
- change detection
- angular5
- code .
- oh-my-zsh
- getElementsByClassName
- 이미지바꾸기
- fromEvent
- angular
- JavaScript
- ChangeDetectorRef
- Visual Studio Code
- VSCode
- Today
- Total
목록programming (94)
hsunny study blog
자바스크립트에서 배열을 선언하는 방식은 2가지가 있습니다. Array 객체를 이용한 선언 객체 리터럴을 이용한 선언 let arr = new Array(); let arr = []; 두 방식의 차이점에 대해 이야기해보도록 하겠습니다. 왜 new Array() 보다 []의 선호도가 높을까? new Array()는 직관적이지 않습니다. - Array 객체의 constructor에 전달하는 숫자가 1개인 경우와 2개 이상인 경우 A. //run Chrome let arr1 = new Array(5); console.log(arr1); // [empty × 5] arr1.length // 5 arr1[0]; // undefined B. //run Chrome let arr2 = new Array(1, 2, 3,..
Math.sqrt(x) 숫자의 제곱근을 반환합니다. 매개변수 X : 숫자 만약 x 가 음수라면 Math.sqrt() 함수는 NaN를 반환합니다. sqrt()는 Math의 정적 메서드 이므로 만든 Math 객체의 메서드가 아니라 항상 Math.sqrt()함수를 사용해야합니다. (Math는 생성자가 없습니다.) 예제 Math.sqrt(9); // 3 Math.sqrt(2); // 1.414213562373095 Math.sqrt(1); // 1 Math.sqrt(0); // 0 Math.sqrt(-1); // NaN 참고사이트 https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Math/sqrt
테스트파일 생성 GIT 폴더 하위에 git-reset-test.md 파일을 생성해주었습니다. ➜ study git:(master) git status On branch master Your branch is up to date with 'origin/master'. Untracked files: (use "git add ..." to include in what will be committed) GIT/git-reset-test.md nothing added to commit but untracked files present (use "git add" to track) ➜ study git:(master) ✗ git add GIT/git-reset-test.md ➜ study git:(master) ✗ ..
git remote 명령어를 사용하면 현재 프로젝트에 저장된 리모트 저장소들을 모두 확인할 수 있습니다. -v 옵션을 주면 단축이름과 URL을 함께 확인할 수 있습니다. ➜ ddunny.github.io git:(master) git remote origin ➜ ddunny.github.io git:(master) git remote -v origin https://github.com/ddunny/ddunny.github.io.git (fetch) origin https://github.com/ddunny/ddunny.github.io.git (push)
serialize() form 요소들(input, textarea, select)을 쿼리스트링 형태로 인코딩합니다. 사용 HTML 1 2 3 4 jQuery 1 2 var str = $('#form').serialize(); console.log('str: '+ str); // str: name=sunny&tel=12345678
parse_str ( string $encoded_string [, array &$result ] ) : void parse_str의 파라미터를 1개만 사용할 수도 있고, 2개를 사용할 수도 있습니다. 더보기 공식문서 www.php.net/manual/en/function.parse-str.php PHP: parse_str - Manual I wrote a pair of functions using parse_str() that will write values in an array to a textfile and vice versa, read those values from the textfile back into the array. Quite useful if you need to store lots ..
서버의 통신을 받고 Component에 데이터를 뿌려 화면의 초기화를 진행합니다. 초기 셋팅이 완료된 화면에서 사용자의 액션에 따라 데이터의 값과 화면의 UI가 변경되어야 하는 경우(동기화)가 있습니다. 변경에 따른 이벤트를 단순히 EventEmmiter 를 이용한 Output 과 Input 만으로 Parent와 Child Component 간의 데이터 처리를 하는데에는 한계가 있었습니다. angular change detection 를 구글링 하면 여러 해결 방법들이 나옵니다. ngZone , onChange() life cycle, DoCheck() life cycle, ChangeDetectionStrategy 등이 Change Detection 방법입니다. 찾아보면서 학습한 내용을 공유합니다. :..
서버에서 이미 불러온 이력이 있는 이미지 주소의 경우, 서버 쪽에서 이미지를 변경했을 때 변경한 이미지가 바로 반영되지 않는 문제가 있습니다. *같은 이름(A.jpg)으로 이미지를 교체하는 경우 해결 방법 서버측에서 이미지를 전송할 때, 혹은 아이오닉 내에서 이미지 뒤에 랜덤값을 넣어주면 됩니다. src="이미지주소?{랜덤값}" 왜 이게 해결방법일까? 앱 설치 후 서버에서 new.jpg?0 를 최초 호출했을 때 앱에 캐시됩니다. new.jpg?0으로 앱에 캐시되고 앱이 new.jpg?0을 필요로 할 때마다 화면에 보여주기 위하여 캐시에서 가져갑니다. 사용자가 new.jpg?1로 호출을 하면 캐시에는 new.jpg?1이 없기 때문에 앱이 다시 새로 가져와 캐시합니다. 이러한 이유로 이미지이름 뒤에 변수를 ..