json으로 값을 받아서 중복되는 하나의 key 목록을 얻고 싶은데

assign이나 for문으로 합치는데, 그걸 도와주는 모듈도 있지만 흐음...


[링크 : https://stackoverflow.com/questions/21450060/how-to-join-two-javascript-objects-without-using-jquery]

[링크 : https://www.npmjs.com/package/merge-json]


+ 2018.10.02

xls 등으로 출력을 하도록 하니 알아서 생성되는 듯

굳이 하나의 json으로 합치지 않아도 되는 듯

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

json2xls 사용 주의  (0) 2018.10.02
json key 추가/삭제  (0) 2018.09.28
jquery 선택자  (0) 2018.09.27
jquery n번째 요소 선택하기, select 선택하기  (0) 2018.09.27
css 배경 이미지 회전, 크기 등  (0) 2018.09.27
Posted by 구차니
Linux/Ubuntu2018. 9. 28. 06:59

'Linux > Ubuntu' 카테고리의 다른 글

lp lpr  (0) 2018.12.18
ubuntu desktop shortcut  (0) 2018.12.06
tmux  (0) 2018.08.13
우분투 자동 업데이트  (0) 2018.05.21
E: /var/lib/dpkg/lock 잠금 파일을 얻을 수 없습니다  (0) 2018.05.17
Posted by 구차니
Programming/node.js2018. 9. 27. 23:04

집에서는 잘 안하긴 했지만.. 회사에서도 윈도우인데 잘 돌아갔는데..

왜 안되나 해서 찾아보니.. 파이썬이 없어서 그런건가?


D:\work\node>npm install http-request


> mmmagic@0.5.1 install D:\work\node\node_modules\mmmagic

> node-gyp rebuild



D:\work\node\node_modules\mmmagic>if not defined npm_config_node_gyp (node "C:\P

rogram Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..

\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Fil

es\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )

gyp ERR! configure error

gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT

HON env variable.

gyp ERR! stack     at PythonFinder.failNoPython (C:\Program Files\nodejs\node_mo

dules\npm\node_modules\node-gyp\lib\configure.js:484:19)

gyp ERR! stack     at PythonFinder.<anonymous> (C:\Program Files\nodejs\node_mod

ules\npm\node_modules\node-gyp\lib\configure.js:509:16)

gyp ERR! stack     at C:\Program Files\nodejs\node_modules\npm\node_modules\grac

eful-fs\polyfills.js:284:29

gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)

gyp ERR! System Windows_NT 6.1.7601

gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodej

s\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"

gyp ERR! cwd D:\work\node\node_modules\mmmagic

gyp ERR! node -v v8.12.0

gyp ERR! node-gyp -v v3.8.0

gyp ERR! not ok

npm WARN cancer@1.0.0 No description

npm WARN cancer@1.0.0 No repository field.


npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! mmmagic@0.5.1 install: `node-gyp rebuild`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the mmmagic@0.5.1 install script.

npm ERR! This is probably not a problem with npm. There is likely additional log

ging output above.


npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2018-09-27T13_58_50

_212Z-debug.log 


하는데 드럽게 오래걸리네...

근데 회사는 윈10이라 그런건가.. 무슨 차이지?

(관리자 권한으로 아래는 실행해야 함)

npm install --global --production windows-build-tools

npm install --global node-gyp 

[링크 : https://code.i-harness.com/ko-kr/q/e6ce22]

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

waveform 출력하는 자바스크립트 모듈  (0) 2018.10.05
xz로 압축된 node.js 설치하기  (0) 2018.10.02
node.js 를 이용한 HTML 데이터 추출(크롤링)  (4) 2018.09.27
npm audit  (0) 2018.09.19
promise-mysql  (0) 2018.09.18
Posted by 구차니

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

json key 추가/삭제  (0) 2018.09.28
json merge  (0) 2018.09.28
jquery n번째 요소 선택하기, select 선택하기  (0) 2018.09.27
css 배경 이미지 회전, 크기 등  (0) 2018.09.27
svg.js  (0) 2018.09.21
Posted by 구차니
Programming/node.js2018. 9. 27. 19:05

테스트 용으로 단간한 계정정보를 받아와서 ID와 PW 그리고 역활에 대해서 출력하고

jquery를 이용하여 table에 값을 추가하고

select-option 에 항목 값을 지정하는 예제


    $.ajax({

        type: "POST",

        url: '/list',

        success: function (data) {

        },

        error: function (data) {

        },

        complete: function (data) {

            var result = JSON.parse(data.responseText);

            for(var idx = 0; idx < result.length; idx++)

            {

                $('#userlist > tbody:last').append('<tr class="unsel"><td><input class="uncheck" name="chk_del", type="checkbox"</td><td><input class="user-editbox" type="text" value="'+ result[idx].user_id + '"></td><td><input class="user-editbox" type="text" value="'+ result[idx].user_pw + '"></td><td><select class="user-role"><option value="admin">admin</option><option value="user">user</option><option value="server">server</option></select></td><td><input class="user-editbox" type="text" value="DESC."></td></tr>');

                switch(result[idx].user_role)

                {

                    case 0: //admin

                        $('.user-role').eq(idx).val('admin');

                        break;

                    case 1: //user

                        $('.user-role').eq(idx).val('user');

                            break;

                    case 2: //server

                        $('.user-role').eq(idx).val('server');

                            break;

                }

            }

        }

    });



찾은 요소 n번째 접근하기 : .eq(index)

[링크 : http://egloos.zum.com/survival/v/464374]


$('#fruits').val('값');

[링크 : https://zetawiki.com/wiki/JQuery_select_값으로_선택]

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

json merge  (0) 2018.09.28
jquery 선택자  (0) 2018.09.27
css 배경 이미지 회전, 크기 등  (0) 2018.09.27
svg.js  (0) 2018.09.21
ajax  (0) 2018.09.20
Posted by 구차니
Programming/d32018. 9. 27. 15:10


[링크 : http://www.adeveloperdiary.com/d3-js/create-a-simple-donut-chart-using-d3-js/] 도넛 그래프

[링크 : http://bl.ocks.org/aaizemberg/raw/78bd3dade9593896a59d/] 색상


타이틀 달린 도넛 그래프

[링크 : https://littletechblogger..../d3-donut-chart-with-labels-using-angular-directive-and-json-data-example/]


+

2018.10.10

[링크 : http://webframeworks.kr/getstarted/d3js/]

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

d3 관련 검색..  (0) 2018.10.12
d3 multi level pie 그래프  (0) 2018.10.11
d3 font color / weight  (0) 2018.10.02
d3 tooltop  (0) 2018.10.01
d3 를 이용하여 도넛 그래프 그리기  (0) 2018.09.28
Posted by 구차니

배경을 돌리면 안에 내용도 같이 돌아버리니까

배경만 돌리려면 조금 까다롭다.


[링크 : https://www.sitepoint.com/css3-transform-background-image/]

[링크 : https://www.w3schools.com/cssref/pr_background-position.asp]

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

jquery 선택자  (0) 2018.09.27
jquery n번째 요소 선택하기, select 선택하기  (0) 2018.09.27
svg.js  (0) 2018.09.21
ajax  (0) 2018.09.20
polar clock  (0) 2018.09.20
Posted by 구차니
embeded/odroid2018. 9. 26. 22:27

dist-upgrade 하다가 용량 부족으로 뻗었는데

두개 동시에 업데이트 하니까 서포트 까지 뜨거워서 잡기 힘들 정도.. -_-

그런 이유로 써멀 구리스 발라 주려고 하니 TIM(Thermal Interface Material)이 두께가 있어서

MLCC 등이 방열판에 닿지 않는것 같은데, 반대로 이거 떼면 쇼트 날지도 모르겠다.


그런 이유로.. 어쩔수 없이 팬을 달아야 하나..

아니면 쿨러를 달아주어야 하나 고민중..


[링크 : https://www.hardkernel.com/main/products/prdt_info.php?g_code=G138760358261]

'embeded > odroid' 카테고리의 다른 글

HEVC, H.265 지원 싱글보드  (0) 2019.04.23
odroid U3 18.03 업데이트  (6) 2018.09.29
odroid U3 eMMC 복구  (0) 2018.09.26
odroid 고민..  (2) 2018.09.26
odroid XU4 팬 컨트롤  (0) 2018.09.24
Posted by 구차니
embeded/odroid2018. 9. 26. 21:59

eMMC 장착 안하고 해서 그런가..?

U-Boot 2010.12-00000-g9777ca6-dirty (Nov 26 2015 - 10:10:11) for Exynox4412



CPU: S5PC220 [Samsung SOC on SMP Platform Base on ARM CortexA9]

APLL = 1000MHz, MPLL = 800MHz

DRAM:  2 GiB


PMIC VERSION : 0x00, CHIP REV : 2

TrustZone Enabled BSP

BL1 version: 20121128



Checking Boot Mode ... SDMMC

MMC Device 0: 15193 MB

MMC Device 1 not found

*** Warning - using default environment


USB3503 NINT = OUTPUT LOW!

ModeKey Check... run normal_boot

No ethernet found.

Hit any key to stop autoboot:  0

Exynos4412 #

Exynos4412 # movi init 1

emmc reset...

REVISION: 2.0

[ERROR] response timeout error : 00000104 cmd 1

Card NOT detected or Init Failed!!

Exynos4412 # movi init 1

emmc reset...

REVISION: 2.0


껐다 켜고 하니 잘되네..

일단 위의 경우에는 eMMC 안꼽고 movi init 1을 해서 그런건가 싶긴한데.. 다시 해보긴 귀찮네

U-Boot 2010.12-00000-g9777ca6-dirty (Nov 26 2015 - 10:10:11) for Exynox4412



CPU: S5PC220 [Samsung SOC on SMP Platform Base on ARM CortexA9]

APLL = 1000MHz, MPLL = 800MHz

DRAM:  2 GiB


PMIC VERSION : 0x00, CHIP REV : 2

TrustZone Enabled BSP

BL1 version: 20121128



Checking Boot Mode ... SDMMC

MMC Device 0: 15193 MB

MMC Device 1 not found

*** Warning - using default environment


USB3503 NINT = OUTPUT LOW!

ModeKey Check... run normal_boot

No ethernet found.

Hit any key to stop autoboot:  0

Exynos4412 #

Exynos4412 # movi init 1

emmc reset...

REVISION: 2.0

Manufacture ID 0x11 [ 7456MB ]

NAME: S5P_MSHC4

Device: S5P_MSHC4

Manufacturer ID: 11

OEM: 100

Name: 008G9

Tran Speed: 0

Rd Block Len: 512

MMC version 4.0

High Capacity: Yes

Size: 0MB (block: 7456)

Bus Width: 8-bit DDR

Boot Partition Size: 4096 KB

Exynos4412 # run copy_uboot_sd2emmc

reading FWBL1 ..device 0 Start 1, Count 30

MMC read: dev # 0, block # 1, count 30 ... 30 blocks read: OK

completed

eMMC OPEN Success.!!

                        !!!Notice!!!

!You must close eMMC boot Partition after all image writing!

!eMMC boot partition has continuity at image writing time.!

!So, Do not close boot partition, Before, all images is written.!

writing FWBL1 ..device 1 Start 0, Count 30

MMC write: dev # 1, block # 0, count 30 ... 30 blocks written: OK

completed

eMMC CLOSE Success.!!

reading BL2 ..device 0 Start 31, Count 32

MMC read: dev # 0, block # 31, count 32 ... 32 blocks read: OK

completed

eMMC OPEN Success.!!

                        !!!Notice!!!

!You must close eMMC boot Partition after all image writing!

!eMMC boot partition has continuity at image writing time.!

!So, Do not close boot partition, Before, all images is written.!

writing BL2 ..device 1 Start 30, Count 32

MMC write: dev # 1, block # 30, count 32 ... 32 blocks written: OK

completed

eMMC CLOSE Success.!!

reading bootloader..device 0 Start 63, Count 2048

MMC read: dev # 0, block # 63, count 2048 ... 2048 blocks read: OK

completed

eMMC OPEN Success.!!

                        !!!Notice!!!

!You must close eMMC boot Partition after all image writing!

!eMMC boot partition has continuity at image writing time.!

!So, Do not close boot partition, Before, all images is written.!

writing bootloader..device 1 Start 62, Count 2048

MMC write: dev # 1, block # 62, count 2048 ... 2048 blocks written: OK

completed

eMMC CLOSE Success.!!

reading 0 TrustZone S/W.. Start 2111, Count 312

MMC read: dev # 0, block # 2111, count 312 ... 312 blocks read: OK

completed

eMMC OPEN Success.!!

                        !!!Notice!!!

!You must close eMMC boot Partition after all image writing!

!eMMC boot partition has continuity at image writing time.!

!So, Do not close boot partition, Before, all images is written.!

writing 1 TrustZone S/W.. Start 2110, Count 312

MMC write: dev # 1, block # 2110, count 312 ... 312 blocks written: OK

completed

eMMC CLOSE Success.!!


MMC write: dev # 1, block # 2423, count 32 ... 32 blocks written: OK


[링크 : https://wiki.odroid.com/old_product/accessory/emmc/emmc_recovery_u3]

2018/09/24 - [embeded/odroid] - odroid U3/XU4 eMMC 복구 방법


아무튼 eMMC에 미리 쓰고 나서 SD 메모리에 하나더 쓰고

그걸 이용해서 eMMC에 부트로더 넣어주면 끝!

'embeded > odroid' 카테고리의 다른 글

odroid U3 18.03 업데이트  (6) 2018.09.29
odroid U3 방열판/쿨러  (0) 2018.09.26
odroid 고민..  (2) 2018.09.26
odroid XU4 팬 컨트롤  (0) 2018.09.24
odroid U3/XU4 eMMC 복구 방법  (0) 2018.09.24
Posted by 구차니