Programming/css2018. 10. 25. 15:43

left랑 right가 헷갈리는 녀석일세..

left로 하면 오른쪽으로 가버리고..

right로 하면 왼쪽으로 가버림 -_-

(그러니까 left 면 왼쪽으로 부터 시작해서 그 위치니까 오른쪽 이 되는건가?)


[링크 : https://stackoverflow.com/.../css3-rotation-and-scaling-on-same-elements-messes-up-z-index]

[링크 : https://www.w3schools.com/css/css_tooltip.asp]

'Programming > css' 카테고리의 다른 글

@keyframe in css  (0) 2019.01.29
css transform zindex origin  (0) 2018.10.25
css로 백그라운드만 돌리기  (0) 2018.10.10
css 계층 구조? 상속? 선택자 조합자?  (0) 2018.09.05
sass scss  (0) 2018.09.05
Posted by 구차니
Programming/node.js2018. 10. 24. 19:25

기존의 녀석은 new 해서 생성하면 죽이거나 하는게 불가능 했는데

es6에서는 stop()이 추가됨으로서

해당 인스턴스를 삭제하고 종료하는게 가능하다


[링크 : https://github.com/Wifsimster/node-rtsp-stream-es6]

'Programming > node.js' 카테고리의 다른 글

node.js REST get/post 관련  (0) 2018.11.06
curl jwt  (0) 2018.10.26
node.js undefined 확인하기  (0) 2018.10.22
node.js를 이용한 자기 자신의 ip 얻기  (4) 2018.10.22
웹소켓 그리고 공유기?  (4) 2018.10.18
Posted by 구차니
Programming/wasm2018. 10. 24. 19:00

jsmpeg을 보다가 발견한 신기한 녀석

[링크 : https://github.com/phoboslab/jsmpeg/blob/master/build.sh]


Web ASM의 줄임말로 웹에서 빠른 실행을 위해서 쓴다고

(어느정도 바이너리 호환성이 있는건가..? x86용을 arm에서 쓴다던가 가능할진 찾아 봐야 할 듯)

[링크 : https://www.popit.kr/개발바보-webassembly-emscripten-asmjs/]

[링크 : https://webassembly.org/getting-started/developers-guide/]


+

중요한건... wasm으로 빌드한 부분이 누락되었나.. 왜 stop()하면 안되는거여... -_-

'Programming > wasm' 카테고리의 다른 글

wasm text 와 binary 상호변환  (0) 2021.10.26
emcc wasm 빌드  (0) 2021.10.25
wasm from c, cpp  (0) 2021.10.24
wasm  (0) 2021.10.22
web assembly  (0) 2021.10.19
Posted by 구차니

canvas에서 영상을 dataURL로 받으면 base64로 인코딩 되어서 해결책 찾는중..


window.atob (decoding)

window.btoa (encoding)

[링크 : http://1004lucifer.blogspot.com/2016/01/javascript-base64.html]

'Programming > javascript & HTML' 카테고리의 다른 글

js date time to epoch  (0) 2018.10.26
canvas to blob  (2) 2018.10.25
formdata dump  (0) 2018.10.24
js toHexString()  (0) 2018.10.23
jsmpeg div로 사용시 옵션  (0) 2018.10.18
Posted by 구차니

ajax로 formdata 보내기

[링크 : https://www.mkyong.com/jquery/jquery-ajax-submit-a-multipart-form/]



생성하기

[링크 : https://developer.mozilla.org/ko/docs/Web/API/FormData/FormData]


보는거 무지 복잡하네..

var formData = new FormData();

formData.append('key1', 'value1');

formData.append('key2', 'value2');


// Display the key/value pairs

for (var pair of formData.entries()) {

    console.log(pair[0]+ ', ' + pair[1]); 

[링크 : https://stackoverflow.com/questions/17066875/how-to-inspect-formdata]


+

var formData = new FormData();


formData.append('items', new Blob([JSON.stringify({

    name: "Book",

    quantity: "12"

})], {

    type: "application/json"

})); 

[링크 : https://stackoverflow.com/...multipart-form-data-with-a-different-content-type-on-each-parts-with-j]


+

var st = imagepath.replace(data:image/png or jpg; base64"/""); 

[링크 : https://stackoverflow.com/questions/22172604/convert-image-url-to-base64]

'Programming > javascript & HTML' 카테고리의 다른 글

canvas to blob  (2) 2018.10.25
자바스크립트 base64 인코딩, 디코딩  (0) 2018.10.24
js toHexString()  (0) 2018.10.23
jsmpeg div로 사용시 옵션  (0) 2018.10.18
js setinterval  (0) 2018.10.16
Posted by 구차니
Programming/jquery2018. 10. 23. 17:16

포인트(?)는 ajax에서 return $.ajax()를 해주어야 한다는 것


$.when(ajax1(), ajax2(), ajax3(), ajax4()).done(function(a1, a2, a3, a4){

    // the code here will be executed when all four ajax requests resolve.

    // a1, a2, a3 and a4 are lists of length 3 containing the response text,

    // status, and jqXHR object for each of the four ajax calls respectively.

});


function ajax1() {

    // NOTE:  This function must return the value 

    //        from calling the $.ajax() method.

    return $.ajax({

        url: "someUrl",

        dataType: "json",

        data:  yourJsonData,            

        ...

    });

[링크 : https://stackoverflow.com/questions/3709597/wait-until-all-jquery-ajax-requests-are-done]

'Programming > jquery' 카테고리의 다른 글

jquery selector와 document.getElementById 차이  (0) 2018.11.05
jquery trigger()  (0) 2018.10.25
jquery ajax data, header  (0) 2018.10.23
jquery shake  (0) 2018.10.16
jquery ani arc  (0) 2018.10.16
Posted by 구차니
Programming/jquery2018. 10. 23. 16:38

get의 header로 보낼때는 header 인가..

post의 body는 data


[링크 : https://stackoverflow.com/questions/3258645/pass-request-headers-in-a-jquery-ajax-get-call]

'Programming > jquery' 카테고리의 다른 글

jquery selector와 document.getElementById 차이  (0) 2018.11.05
jquery trigger()  (0) 2018.10.25
jqeury ajax 수행 완료 기다리기  (0) 2018.10.23
jquery shake  (0) 2018.10.16
jquery ani arc  (0) 2018.10.16
Posted by 구차니

원래 이런건 지원안해서 직접 만들어야 하나보네..


function toHexString(byteArray) {

  return Array.from(byteArray, function(byte) {

    return ('0' + (byte & 0xFF).toString(16)).slice(-2);

  }).join('')

[링크 : https://stackoverflow.com/questions/34309988/byte-array-to-hex-string-conversion-in-javascript]

'Programming > javascript & HTML' 카테고리의 다른 글

자바스크립트 base64 인코딩, 디코딩  (0) 2018.10.24
formdata dump  (0) 2018.10.24
jsmpeg div로 사용시 옵션  (0) 2018.10.18
js setinterval  (0) 2018.10.16
ajax each  (0) 2018.10.16
Posted by 구차니
Programming/C Win32 MFC2018. 10. 23. 09:57

귀찮으니 그냥 str* 으로 대충 짤까..

[링크 : https://dojang.io/mod/page/view.php?id=724]


+

적합성(?) 테스트 한 자료가 있어서 링크 복사

[링크 : http://jhhwang4195.tistory.com/94]

'Programming > C Win32 MFC' 카테고리의 다른 글

strptime  (0) 2021.02.17
while(-1) 이 될까?  (0) 2019.05.24
uuid in c  (0) 2018.10.22
엔디안 급 멘붕..  (0) 2018.05.29
const char *과 char * const 차이  (0) 2018.01.31
Posted by 구차니
Programming/node.js2018. 10. 22. 17:38

typeof를 이용해서 undefined 와 비교하면 됨

(req.body나 req.param 로 들어오는 녀석들 값 있는지 존재여부 비교하기 용)


if (typeof query !== 'undefined' && query !== null){

   doStuff();

[링크 : http://misoin.tistory.com/53]

[링크 : https://stackoverflow.com/.../how-can-i-check-whether-a-variable-is-defined-in-node-js]


+

2018.10.23

써보니. undefined는 변수로 사용되는 reserved keyword가 아니다

즉, "undefined"나 'undefined'와 비교를 해주어야 한다.

'Programming > node.js' 카테고리의 다른 글

curl jwt  (0) 2018.10.26
node-rtsp-stream 과 node-rtsp-stream-es6 차이  (0) 2018.10.24
node.js를 이용한 자기 자신의 ip 얻기  (4) 2018.10.22
웹소켓 그리고 공유기?  (4) 2018.10.18
node-rtsp-stream의 pid 얻기  (0) 2018.10.18
Posted by 구차니