반응형

WEB/JavaScript 57

[Node.js] iconv 인코딩모듈 설치, 사용 관련

================================= ================================= ================================= npm install iconv 위와같이 했는데 윈도우에서 설치에 오류가 난다면... 비쥬얼스튜디오(현재버전은 VS2017 Community 버전) 비쥬얼스튜디오 커뮤니티 버전은 무료로 사용할 수 있다. 설치 런처에서 파이썬 관련 설치를 모두 해주면 된다. 비쥬얼스튜디오 다운로드 링크: https://visualstudio.microsoft.com/ko/free-developer-offers/ 비쥬얼스튜디오 설치런처를 설치하고 설치하면서 "개별 구성 요소" 에 들어가 아래 그림과 같이 설정을 체크해 주면 된다. 위에 빨간 표..

WEB/JavaScript 2018.10.22

[Node.js] Node.js에서 C++의 struct 비슷기능[cpp-struct-js] 이용하기, C/C++ TCP/IP소켓 통신시 struct를 버퍼를 보내거나 받을때 변환 관련

=====================================================================      출처ㅣ https://www.npmjs.com/package/cpp-struct-js  cpp-struct-jsThe intention of this module is to interace node.js with an Arduino software I am writing. For this I need to read binary structures that are generated by C++ code running on an Arduino system.Supported types:uint8,16,32int8,16,32floatstringsOnly one dimensiona..

WEB/JavaScript 2018.10.11

[Node.js] Node.js를 WebStorm 을 이용하여 ES6의 import, export 모듈화하여 개발 또는 모듈화 프로그래밍 관련

================================= ================================= ================================= 출처: https://medium.com/@oieduardorabelo/usando-es-modules-em-node-js-hoje-278ef1fd86bf 주의: ES6 -> import import * as HTTP from "http"; 이렇게 문법이 되는 모듈이 있고 안되는 모듈이 있다. 만약에 위와같이 했는데 안된다면 아래와 같이 해주면 된다. import EXPRESS from "express"; import WS from "ws"; 코드 넘어가서 확인해서 수정해되 되지만 귀찮을 경우 저렇게 해주면 왠간하면 된다, ..

WEB/JavaScript 2018.10.01

[Node.js] Node.js 소켓, 웹소켓, (TCP/IP),통신 관련 프로그래밍 관련

================================= ================================= ================================= 출처: http://nerobong2.blogspot.com/2017/01/nodejs-nodejs.html nodejs란? 자바스크립트 기반 서버 사이드 스크립트 언어설치방법은 따로 블로그 하지 않겟다.(매우간단함.)설치완료 하면 node_modules 라는 폴더가 생성되고 기본 내장 js 모듈 파일들이 존재하며require 키워드를 통해 어디서든 사용가능 하다.단 라이브러리를 추가할때는 node_modules 폴더가 존재하는 위치에서 mpn ~~ 을 실행하길 추천한다.테스트 os 는 윈도우 실제 적용환경은 리눅스(cent..

WEB/JavaScript 2018.10.01

[Node.js] Node.js를 Cloud9에서 구현하기 (socket.io를 통한 채팅 프로그램 적용)

================================= ================================= ================================= 출처: https://community.c9.io/t/writing-a-node-js-app/1731 Cloud9 IDE was built on top of the Node.js platform, and as such, you have full access to the node runtime. Currently, we support running versions v0.6.x, v0.8.x, and v0.10.x. In this section, we’ll walk you through the creation of a simpl..

WEB/JavaScript 2018.09.30

[JavaScript] 자바스크립트 폰트(FontFamily) 로드 확인 관련

================================= ================================= ================================= fontfaceobserver의 JS 깃허브 https://github.com/bramstein/fontfaceobserver 들어가면 최신 "FontFaceObserver"의 JS를 받을수 있다. 통합 프로젝트 파일을 받고 나서 "fontfaceobserver.js" 파일을 따로 복사해서 쓰며된다. 아래코드 예제처럼 로드가 성공하거나 실패하면 Call 된다. How to use Include your @font-face rules as usual. Fonts can be supplied by either a font ser..

WEB/JavaScript 2018.05.28

[JavaScript] HTML5 캔버스 ctx.fillText는 줄 바꿈 관련

=====================================================================       출처: https://code.i-harness.com/ko/q/4cb491  어쩌면이 파티에 조금 늦을 지 모르지만 캔버스에 텍스트를 배치하는 데 필요한 다음 자습서를 찾았습니다.http://www.html5canvastutorials.com/tutorials/html5-canvas-wrap-text-tutorial/그로부터 여러 줄이 작동한다고 생각할 수있었습니다. (미안 해요. 라미레즈, 네가 나를 위해 일하지 않았다!). 캔버스에 텍스트를 줄 바꿈하는 내 전체 코드는 다음과 같습니다.여기서 c 는 내 캔버스의 ID이고 text 는 내 텍스트 상자의 ID입니다.아마..

WEB/JavaScript 2018.05.14

[JavaScript] 자바스크립트를 동적으로 로딩하기, 자바스크립트로 html에 코드 넣기 관련

=====================================================================     출처: https://www.hooni.net/xe/study/2173    Dynamic Script Loading 동적으로 자바스크립트를 로딩하는 방법 중 하나는 script 태그를 자바스크립트 코드에서 직접 생성하는 것인데요. 다음과 같이 script 태그를 생성하고 src에 로딩할 주소를 넣음으로서 로딩하게 됩니다. ?12345var head= document.getElementsByTagName('head')[0];var script= document.createElement('script');script.type= 'text/javascript';script.sr..

WEB/JavaScript 2018.04.13
반응형